From 2dde747376edeb7ba18720f197859a3c6e294f4d Mon Sep 17 00:00:00 2001 From: frozenhelium Date: Mon, 12 May 2025 10:30:07 +0545 Subject: [PATCH 1/5] feat(dref): make end date of Operation read only - DREF Application form - DREF Operational Update form - DREF Final Report form --- app/src/views/DrefFinalReportForm/Submission/index.tsx | 1 + .../views/DrefOperationalUpdateForm/Submission/index.tsx | 1 + .../Submission/styles.module.css | 9 ++++++--- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/app/src/views/DrefFinalReportForm/Submission/index.tsx b/app/src/views/DrefFinalReportForm/Submission/index.tsx index 254e223a60..3f66df1154 100644 --- a/app/src/views/DrefFinalReportForm/Submission/index.tsx +++ b/app/src/views/DrefFinalReportForm/Submission/index.tsx @@ -110,6 +110,7 @@ function Submission(props: Props) { onChange={setFieldValue} error={error?.operation_end_date} disabled={disabled} + readOnly /> )} {value.type_of_dref === TYPE_LOAN && ( diff --git a/app/src/views/DrefOperationalUpdateForm/Submission/styles.module.css b/app/src/views/DrefOperationalUpdateForm/Submission/styles.module.css index efdc9f5abd..7bb7c082b3 100644 --- a/app/src/views/DrefOperationalUpdateForm/Submission/styles.module.css +++ b/app/src/views/DrefOperationalUpdateForm/Submission/styles.module.css @@ -6,9 +6,12 @@ .warning { display: flex; align-items: flex-start; - gap: var(--go-ui-spacing-sm); - padding: var(--go-ui-spacing-sm) 0; + gap: var(--go-ui-spacing-2xs); + padding: var(--go-ui-spacing-2xs) 0; color: var(--go-ui-color-warning); - font-weight: var(--go-ui-font-weight-semibold); + + .icon { + font-size: var(--go-ui-height-icon-multiplier); + } } } From 3792319948a9b390b5670c709097df5729bb53fb Mon Sep 17 00:00:00 2001 From: frozenhelium Date: Mon, 12 May 2025 11:07:51 +0545 Subject: [PATCH 2/5] fix(dref-export): add overflow wrap for link fix the font size and spacing issues in the DREF exports --- app/src/components/printable/Link/styles.module.css | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/components/printable/Link/styles.module.css b/app/src/components/printable/Link/styles.module.css index d2ba012a94..8544da0276 100644 --- a/app/src/components/printable/Link/styles.module.css +++ b/app/src/components/printable/Link/styles.module.css @@ -1,4 +1,5 @@ .link { + overflow-wrap: anywhere; color: var(--go-ui-color-blue); font-size: var(--go-ui-font-size-md); } From cbf7e2e82d6b804a1462c9787b898eba8aebed53 Mon Sep 17 00:00:00 2001 From: frozenhelium Date: Mon, 12 May 2025 12:00:13 +0545 Subject: [PATCH 3/5] feat(dref-export): update styling of Risk section update styling of Risk and Security consideration to match styling of Previous Operations for all DREF exports --- .../printable/Link/styles.module.css | 2 +- app/src/views/DrefApplicationExport/index.tsx | 138 ++++++++---------- .../DrefApplicationExport/styles.module.css | 17 ++- app/src/views/DrefFinalReportExport/index.tsx | 124 +++++++--------- .../DrefFinalReportExport/styles.module.css | 17 ++- .../DrefOperationalUpdateExport/index.tsx | 124 +++++++--------- .../styles.module.css | 17 ++- 7 files changed, 220 insertions(+), 219 deletions(-) diff --git a/app/src/components/printable/Link/styles.module.css b/app/src/components/printable/Link/styles.module.css index 8544da0276..898738d75d 100644 --- a/app/src/components/printable/Link/styles.module.css +++ b/app/src/components/printable/Link/styles.module.css @@ -1,5 +1,5 @@ .link { overflow-wrap: anywhere; color: var(--go-ui-color-blue); - font-size: var(--go-ui-font-size-md); + font-size: inherit; } diff --git a/app/src/views/DrefApplicationExport/index.tsx b/app/src/views/DrefApplicationExport/index.tsx index 19e8676972..7f09f6723a 100644 --- a/app/src/views/DrefApplicationExport/index.tsx +++ b/app/src/views/DrefApplicationExport/index.tsx @@ -285,13 +285,15 @@ export function Component() { const hasChildrenSafeguardingDefined = isDefined( drefResponse?.has_child_safeguarding_risk_analysis_assessment, ); - const showRiskAndSecuritySection = riskSecurityDefined - || riskSecurityConcernDefined - || hasAntiFraudPolicy + const hasRiskAndSecurityPoliciesDefined = hasAntiFraudPolicy || hasSexualAbusePolicy || hasChildProtectionPolicy || hasWhistleblowerProtectionPolicy - || hasAntiSexualHarassmentPolicy + || hasAntiSexualHarassmentPolicy; + + const showRiskAndSecuritySection = riskSecurityDefined + || riskSecurityConcernDefined + || hasRiskAndSecurityPoliciesDefined || hasChildrenSafeguardingDefined; const plannedInterventionDefined = isDefined(drefResponse) @@ -697,7 +699,8 @@ export function Component() { label={strings.childSafeguardingRiskLevelLabel} value={drefResponse?.child_safeguarding_risk_level} valueType="text" - strongLabel + strongValue + variant="contents" /> )} @@ -981,66 +984,56 @@ export function Component() { /> {showRiskAndSecuritySection && ( - <> - - {strings.riskAndSecuritySectionHeading} - + {hasAntiFraudPolicy && ( - - - + )} {hasSexualAbusePolicy && ( - - - + )} {hasChildProtectionPolicy && ( - - - + )} {hasWhistleblowerProtectionPolicy && ( - - - + )} {hasAntiSexualHarassmentPolicy && ( - - - + )} {riskSecurityDefined && ( - + <> +
+ {strings.riskSecurityHeading} +
{strings.drefApplicationExportRisk}
@@ -1059,32 +1052,27 @@ export function Component() { ), )} -
+ )} {riskSecurityConcernDefined && ( - - - {drefResponse?.risk_security_concern} - - + )} {hasChildrenSafeguardingDefined && ( - - - + )} - +
)} {plannedInterventionDefined && ( <> diff --git a/app/src/views/DrefApplicationExport/styles.module.css b/app/src/views/DrefApplicationExport/styles.module.css index 7390b4facd..45f3576203 100644 --- a/app/src/views/DrefApplicationExport/styles.module.css +++ b/app/src/views/DrefApplicationExport/styles.module.css @@ -154,12 +154,27 @@ } } - .risk-list, + .risk-and-security-section, .source-information-list { display: grid; grid-template-columns: 1fr 1fr; grid-gap: var(--go-ui-width-separator-md); + .potential-risks-heading { + grid-column: span 2; + background-color: var(--pdf-element-bg); + padding: var(--go-ui-spacing-sm) var(--go-ui-spacing-xs); + color: var(--go-ui-color-black); + font-weight: var(--go-ui-font-weight-semibold); + } + + .risk-security-concern { + grid-column: span 2; + background-color: var(--pdf-element-bg); + padding: var(--go-ui-spacing-sm) var(--go-ui-spacing-xs); + gap: var(--go-ui-spacing-sm); + } + .risk, .name, .link, diff --git a/app/src/views/DrefFinalReportExport/index.tsx b/app/src/views/DrefFinalReportExport/index.tsx index 6784095ef3..1c9c0b844b 100644 --- a/app/src/views/DrefFinalReportExport/index.tsx +++ b/app/src/views/DrefFinalReportExport/index.tsx @@ -778,66 +778,56 @@ export function Component() { /> {showRiskAndSecuritySection && ( - <> - - {strings.riskAndSecuritySectionHeading} - + {hasAntiFraudPolicy && ( - - - + )} {hasSexualAbusePolicy && ( - - - + )} {hasChildProtectionPolicy && ( - - - + )} {hasWhistleblowerProtectionPolicy && ( - - - + )} {hasAntiSexualHarassmentPolicy && ( - - - + )} {riskSecurityDefined && ( - + <> +
+ {strings.riskSecurityHeading} +
{strings.riskLabel}
@@ -856,32 +846,26 @@ export function Component() { ), )} -
+ )} {riskSecurityConcernDefined && ( - - - {drefResponse?.risk_security_concern} - - + )} {hasChildrenSafeguardingDefined && ( - - - + )} - +
)} {plannedInterventionDefined && ( <> diff --git a/app/src/views/DrefFinalReportExport/styles.module.css b/app/src/views/DrefFinalReportExport/styles.module.css index f28e6618de..9f04c3f2d9 100644 --- a/app/src/views/DrefFinalReportExport/styles.module.css +++ b/app/src/views/DrefFinalReportExport/styles.module.css @@ -134,12 +134,27 @@ } } - .risk-list, + .risk-and-security-section, .source-information-list { display: grid; grid-template-columns: 1fr 1fr; grid-gap: var(--go-ui-width-separator-md); + .potential-risks-heading { + grid-column: span 2; + background-color: var(--pdf-element-bg); + padding: var(--go-ui-spacing-sm) var(--go-ui-spacing-xs); + color: var(--go-ui-color-black); + font-weight: var(--go-ui-font-weight-semibold); + } + + .risk-security-concern { + grid-column: span 2; + background-color: var(--pdf-element-bg); + padding: var(--go-ui-spacing-sm) var(--go-ui-spacing-xs); + gap: var(--go-ui-spacing-sm); + } + .risk, .name, .link, diff --git a/app/src/views/DrefOperationalUpdateExport/index.tsx b/app/src/views/DrefOperationalUpdateExport/index.tsx index bbf698f8ea..6f4992b1d5 100644 --- a/app/src/views/DrefOperationalUpdateExport/index.tsx +++ b/app/src/views/DrefOperationalUpdateExport/index.tsx @@ -949,66 +949,56 @@ export function Component() { /> {showRiskAndSecuritySection && ( - <> - - {strings.riskAndSecuritySectionHeading} - + {hasAntiFraudPolicy && ( - - - + )} {hasSexualAbusePolicy && ( - - - + )} {hasChildProtectionPolicy && ( - - - + )} {hasWhistleblowerProtectionPolicy && ( - - - + )} {hasAntiSexualHarassmentPolicy && ( - - - + )} {riskSecurityDefined && ( - + <> +
+ {strings.riskSecurityHeading} +
{strings.drefOperationalRisk}
@@ -1027,32 +1017,26 @@ export function Component() { ), )} -
+ )} {riskSecurityConcernDefined && ( - - - {drefResponse?.risk_security_concern} - - + )} {hasChildrenSafeguardingDefined && ( - - - + )} - +
)} {plannedInterventionDefined && ( <> diff --git a/app/src/views/DrefOperationalUpdateExport/styles.module.css b/app/src/views/DrefOperationalUpdateExport/styles.module.css index 189ec8e509..108639a55b 100644 --- a/app/src/views/DrefOperationalUpdateExport/styles.module.css +++ b/app/src/views/DrefOperationalUpdateExport/styles.module.css @@ -163,12 +163,27 @@ } } - .risk-list, + .risk-and-security-section, .source-information-list { display: grid; grid-template-columns: 1fr 1fr; grid-gap: var(--go-ui-width-separator-md); + .potential-risks-heading { + grid-column: span 2; + background-color: var(--pdf-element-bg); + padding: var(--go-ui-spacing-sm) var(--go-ui-spacing-xs); + color: var(--go-ui-color-black); + font-weight: var(--go-ui-font-weight-semibold); + } + + .risk-security-concern { + grid-column: span 2; + background-color: var(--pdf-element-bg); + padding: var(--go-ui-spacing-sm) var(--go-ui-spacing-xs); + gap: var(--go-ui-spacing-sm); + } + .risk, .name, .link, From 407287ed72e2223a85631b3f332a48257d005e74 Mon Sep 17 00:00:00 2001 From: frozenhelium Date: Mon, 12 May 2025 12:06:34 +0545 Subject: [PATCH 4/5] feat(dref-final-report-export): update condition for NS actions - update visibility condition of NS actionk - hide description if the NS conducted any intervention is answered as `No` --- app/src/views/DrefFinalReportExport/index.tsx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/app/src/views/DrefFinalReportExport/index.tsx b/app/src/views/DrefFinalReportExport/index.tsx index 1c9c0b844b..71eb020f7f 100644 --- a/app/src/views/DrefFinalReportExport/index.tsx +++ b/app/src/views/DrefFinalReportExport/index.tsx @@ -174,8 +174,7 @@ export function Component() { const partnerNsActionsDefined = isTruthyString(drefResponse?.partner_national_society?.trim()); const showMovementPartnersActionsSection = ifrcActionsDefined || partnerNsActionsDefined; - const showNsActionsSection = isDefined(drefResponse?.has_national_society_conducted) - || isTruthyString(drefResponse?.national_society_conducted_description); + const showNsActionsSection = isDefined(drefResponse?.has_national_society_conducted); const icrcActionsDefined = isTruthyString(drefResponse?.icrc?.trim()); @@ -550,12 +549,14 @@ export function Component() { valueType="boolean" strongLabel /> - + {drefResponse?.has_national_society_conducted === true && ( + + )} )} {showMovementPartnersActionsSection && ( From 9ed818155cb15e17e38463fb47de985e9214dd94 Mon Sep 17 00:00:00 2001 From: frozenhelium Date: Mon, 12 May 2025 12:22:51 +0545 Subject: [PATCH 5/5] chore(changeset): add changeset for DREF superticket feedbacks --- .changeset/rich-geckos-end.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .changeset/rich-geckos-end.md diff --git a/.changeset/rich-geckos-end.md b/.changeset/rich-geckos-end.md new file mode 100644 index 0000000000..2a1f2dc09f --- /dev/null +++ b/.changeset/rich-geckos-end.md @@ -0,0 +1,10 @@ +--- +"go-web-app": minor +--- + +Address feedbacks in [DREF superticket feedbacks](https://github.com/IFRCGo/go-web-app/issues/1816) + +- Make end date of operation readonly field in all DREF forms +- Fix font and spacing issues in the DREF exports (caused by link text overflow) +- Update styling of Risk and Security Considerations section to match that of Previous Operations +- Update visibility condition of National Society Actions in Final Report export