Skip to content

Commit 3132809

Browse files
authored
Merge pull request #1658 from IFRCGo/fix/field-report-title-generation
fix: field report title generation logic
2 parents 5e0c339 + ac6555f commit 3132809

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

app/src/views/FieldReportForm/ContextFields/TitlePreview/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ interface Props {
1515
isCovidReport?: boolean;
1616
startDate?: string;
1717
title: string;
18+
id?: number;
1819
}
1920

2021
function TitlePreview(props: Props) {
@@ -25,6 +26,7 @@ function TitlePreview(props: Props) {
2526
isCovidReport,
2627
startDate,
2728
title,
29+
id,
2830
} = props;
2931

3032
const strings = useTranslation(i18n);
@@ -37,7 +39,8 @@ function TitlePreview(props: Props) {
3739
dtype: disasterType,
3840
event,
3941
title,
40-
}), [country, isCovidReport, startDate, disasterType, event, title]);
42+
id,
43+
}), [country, isCovidReport, startDate, disasterType, event, title, id]);
4144

4245
const debouncedVariables = useDebouncedValue(variables);
4346

app/src/views/FieldReportForm/ContextFields/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@ function ContextFields(props: Props) {
315315
isCovidReport={value.is_covid_report}
316316
startDate={value.start_date}
317317
title={value.title}
318+
id={value.id}
318319
/>
319320
) : (
320321
<TextOutput

0 commit comments

Comments
 (0)