Skip to content

Commit 3c10ea9

Browse files
barshathakurisamshara
authored andcommitted
Fix styling for download with pga
1 parent 7927522 commit 3c10ea9

File tree

5 files changed

+49
-33
lines changed

5 files changed

+49
-33
lines changed

app/src/components/domain/DrefExportModal/index.tsx

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import {
2828
} from '#utils/restRequest';
2929

3030
import i18n from './i18n.json';
31+
import styles from './styles.module.css';
3132

3233
type ExportTypeEnum = components<'read'>['schemas']['ExportTypeEnum'];
3334
type ExportStatusEnum = components<'read'>['schemas']['ExportStatusEnum'];
@@ -225,35 +226,33 @@ function DrefExportModal(props: Props) {
225226
|| exportStatusResponse?.status === EXPORT_STATUS_PENDING)
226227
&& drefType === DREF_TYPE_IMMINENT
227228
&& !drefImminentExportError && (
228-
<Message
229-
actions={
230-
exportStatusResponse?.pdf_file ? (
231-
<Message
232-
title={strings.drefExportSuccessfully}
233-
description={strings.drefClickDownloadLink}
234-
actions={(
235-
<Link
236-
variant="secondary"
237-
href={exportStatusResponse?.pdf_file}
238-
external
239-
>
240-
{strings.drefDownloadPDF}
241-
</Link>
242-
)}
243-
/>
244-
) : (
245-
<Button
246-
variant="secondary"
247-
name={undefined}
248-
onClick={handleDrefImminent}
249-
>
250-
{isPga
251-
? strings.drefDownloadPDFWithPGA
252-
: strings.drefDownloadPDFwithoutPGA}
253-
</Button>
254-
)
255-
}
256-
/>
229+
<div className={styles.downloadButton}>
230+
{exportStatusResponse?.pdf_file ? (
231+
<Message
232+
title={strings.drefExportSuccessfully}
233+
description={strings.drefClickDownloadLink}
234+
actions={(
235+
<Link
236+
variant="secondary"
237+
href={exportStatusResponse?.pdf_file}
238+
external
239+
>
240+
{strings.drefDownloadPDF}
241+
</Link>
242+
)}
243+
/>
244+
) : (!exportStatusResponse && (
245+
<Button
246+
variant="secondary"
247+
name={undefined}
248+
onClick={handleDrefImminent}
249+
>
250+
{isPga
251+
? strings.drefDownloadPDFWithPGA
252+
: strings.drefDownloadPDFwithoutPGA}
253+
</Button>
254+
))}
255+
</div>
257256
)}
258257
{isDefined(exportStatusResponse)
259258
&& exportStatusResponse.status === EXPORT_STATUS_COMPLETED
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.download-button {
2+
display: flex;
3+
align-items: center;
4+
flex-direction: column;
5+
padding: var(--go-ui-spacing-sm);
6+
}

app/src/views/DrefApplicationForm/Operation/i18n.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"drefFormMen": "Men",
5757
"drefFormTotalTargeted": "Total targeted population is different from that in Operation Overview",
5858
"drefFormTotalTargetedPopulation": "Total targeted population is not equal to sum of other population fields",
59-
"drefFormOperationUploadDocumentButtonLabel": "Upload any additional support document (Optional)",
59+
"drefFormUploadDocumentButtonLabel": "Upload any additional support document (Optional)",
6060
"drefFormUploadTargetingDocumentButtonLabel": "Upload document",
6161
"drefFormProposedActionSelectBudgetNote": "Please note that if Surge Personnel are deployed, the Surge Deployment cost will be CHF 10,000, and the Indirect Costs will be CHF 5,800. Conversely, if Surge Personnel are not deployed, the Surge Deployment cost will not be applicable, and the Indirect Costs will be CHF 5,000.",
6262
"drefFormProposedActionSelectActivitiesLabel": "Select the activity",

app/src/views/DrefApplicationForm/Operation/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ function Operation(props: Props) {
473473
clearable
474474
disabled={disabled}
475475
>
476-
{strings.drefFormUploadSupportingDocumentButtonLabel}
476+
{strings.drefFormUploadTargetingDocumentButtonLabel}
477477
</GoSingleFileInput>
478478
</InputSection>
479479
</Container>
@@ -808,7 +808,7 @@ function Operation(props: Props) {
808808
)}
809809
{value.type_of_dref === TYPE_IMMINENT && (
810810
<InputSection
811-
title={strings.drefFormUploadSupportingDocumentButtonLabel}
811+
title={strings.drefFormUploadDocumentButtonLabel}
812812
description={strings.drefUploadSupportingDocumentTitle}
813813
>
814814
<GoSingleFileInput
@@ -823,7 +823,7 @@ function Operation(props: Props) {
823823
clearable
824824
disabled={disabled}
825825
>
826-
{strings.drefFormOperationUploadDocumentButtonLabel}
826+
{strings.drefFormUploadSupportingDocumentButtonLabel}
827827
</GoSingleFileInput>
828828
</InputSection>
829829
)}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"parent": "000013-1738649630110.json",
3+
"actions": [
4+
{
5+
"action": "update",
6+
"key": "drefFormOperationUploadDocumentButtonLabel",
7+
"newKey": "drefFormUploadDocumentButtonLabel",
8+
"namespace": "drefApplicationForm"
9+
}
10+
]
11+
}

0 commit comments

Comments
 (0)