Skip to content

Commit 2538f3d

Browse files
authored
Merge pull request #1075 from IFRCGo/feature/fix-dref-export
Fix dref export issue
2 parents da69d8b + 96120aa commit 2538f3d

File tree

4 files changed

+18
-6
lines changed

4 files changed

+18
-6
lines changed

.changeset/sharp-hornets-run.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"go-web-app": patch
3+
---
4+
5+
Fix DREF exports margins and use consistent date format

app/src/views/DrefApplicationExport/index.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,17 @@ import {
44
useState,
55
} from 'react';
66
import { useParams } from 'react-router-dom';
7-
import {
8-
Container,
9-
DateOutput,
10-
} from '@ifrc-go/ui';
7+
import { DateOutput } from '@ifrc-go/ui';
118
import { useTranslation } from '@ifrc-go/ui/hooks';
129
import {
10+
Container,
1311
DescriptionText,
1412
Heading,
1513
Image,
1614
TextOutput,
1715
type TextOutputProps,
1816
} from '@ifrc-go/ui/printable';
17+
import { DEFAULT_PRINT_DATE_FORMAT } from '@ifrc-go/ui/utils';
1918
import {
2019
_cs,
2120
isDefined,
@@ -443,6 +442,7 @@ export function Component() {
443442
className={styles.metaItem}
444443
label={strings.operationStartDateLabel}
445444
value={drefResponse?.date_of_approval}
445+
valueType="date"
446446
strongValue
447447
/>
448448
<TextOutput
@@ -504,6 +504,7 @@ export function Component() {
504504
>
505505
<DateOutput
506506
value={drefResponse?.event_date}
507+
format={DEFAULT_PRINT_DATE_FORMAT}
507508
/>
508509
</Container>
509510
)}
@@ -665,6 +666,7 @@ export function Component() {
665666
>
666667
<DateOutput
667668
value={drefResponse?.ns_respond_date}
669+
format={DEFAULT_PRINT_DATE_FORMAT}
668670
/>
669671
</Container>
670672
)}

app/src/views/DrefFinalReportExport/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,19 @@ import {
55
} from 'react';
66
import { useParams } from 'react-router-dom';
77
import {
8-
Container,
98
DateOutput,
109
NumberOutput,
1110
} from '@ifrc-go/ui';
1211
import { useTranslation } from '@ifrc-go/ui/hooks';
1312
import {
13+
Container,
1414
DescriptionText,
1515
Heading,
1616
Image,
1717
TextOutput,
1818
type TextOutputProps,
1919
} from '@ifrc-go/ui/printable';
20+
import { DEFAULT_PRINT_DATE_FORMAT } from '@ifrc-go/ui/utils';
2021
import {
2122
_cs,
2223
isDefined,
@@ -427,6 +428,7 @@ export function Component() {
427428
>
428429
<DateOutput
429430
value={drefResponse?.event_date}
431+
format={DEFAULT_PRINT_DATE_FORMAT}
430432
/>
431433
</Container>
432434
)}

app/src/views/DrefOperationalUpdateExport/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,19 @@ import {
88
useParams,
99
} from 'react-router-dom';
1010
import {
11-
Container,
1211
DateOutput,
1312
NumberOutput,
1413
} from '@ifrc-go/ui';
1514
import { useTranslation } from '@ifrc-go/ui/hooks';
1615
import {
16+
Container,
1717
DescriptionText,
1818
Heading,
1919
Image,
2020
TextOutput,
2121
type TextOutputProps,
2222
} from '@ifrc-go/ui/printable';
23+
import { DEFAULT_PRINT_DATE_FORMAT } from '@ifrc-go/ui/utils';
2324
import {
2425
_cs,
2526
isDefined,
@@ -492,6 +493,7 @@ export function Component() {
492493
>
493494
<DateOutput
494495
value={drefResponse?.event_date}
496+
format={DEFAULT_PRINT_DATE_FORMAT}
495497
/>
496498
</Container>
497499
)}
@@ -655,6 +657,7 @@ export function Component() {
655657
>
656658
<DateOutput
657659
value={drefResponse?.ns_respond_date}
660+
format={DEFAULT_PRINT_DATE_FORMAT}
658661
/>
659662
</Container>
660663
)}

0 commit comments

Comments
 (0)