-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3497 from bcgov/NDT-304-Add-Indication-for-Auto-p…
…opulation-of-Benefits-and-Budget-Details-upon-RFI-Upload feat: add indication to Template upload
- Loading branch information
Showing
15 changed files
with
305 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import { Link } from '@button-inc/bcgov-theme'; | ||
import { useRouter } from 'next/router'; | ||
import styled from 'styled-components'; | ||
|
||
const HintText = styled.p` | ||
color: ${(props) => props.theme.color.darkGrey}; | ||
font-style: italic; | ||
font-size: 13px; | ||
a { | ||
color: ${(props) => props.theme.color.links}; | ||
font-size: 13px; | ||
&:hover { | ||
text-decoration: underline; | ||
} | ||
} | ||
`; | ||
|
||
interface Props { | ||
templateNumber: number; | ||
} | ||
|
||
const TemplateDescription: React.FC<Props> = ({ templateNumber }) => { | ||
const applicationId = useRouter().query.applicationId as string; | ||
if (!templateNumber) return null; | ||
const link = ( | ||
<Link | ||
href={`/analyst/application/${applicationId}?section=${templateNumber === 1 ? 'benefits' : 'budgetDetails'}`} | ||
passHref | ||
> | ||
{templateNumber === 1 ? 'Benefits' : 'Budget Details'} | ||
</Link> | ||
); | ||
|
||
return ( | ||
(templateNumber === 1 || templateNumber === 2) && ( | ||
<HintText> | ||
* RFI upload for Template {templateNumber} automatically updates the | ||
data for{' '} | ||
{templateNumber === 1 | ||
? 'Final Eligible Households and Indigenous' | ||
: 'Total Eligible Costs and Total Project Costs'}{' '} | ||
in the {link} section. Please verify the changes on the application | ||
page.* | ||
</HintText> | ||
) | ||
); | ||
}; | ||
|
||
export default TemplateDescription; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.