Skip to content

Commit 745058a

Browse files
authored
Merge pull request #2341 from IFRCGo/fix/eap-key-actors-validation
EAP: Hotfix for full form validation and miss match string
2 parents 08108db + 78b60fe commit 745058a

4 files changed

Lines changed: 23 additions & 5 deletions

File tree

app/src/views/EapFullForm/FinanceLogistics/i18n.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
"financeReadinessCostDescription1": "For each item of readiness costs in the budget, explain why these are necessary for the upkeep of the EAP and how these were calculated.",
2222
"financeReadinessCostDescription2": "Indicate who will manage these funds and describe how it will be ensured that they are only used for the indicated purposes.",
2323
"financeReadinessBudgetLabel": "Readiness Budget(CHF)",
24-
"financePrePositioningTitle": "Pre-positioning cost(CHF)",
24+
"financePrePositioningTitle": "Pre-positioning cost",
2525
"financePrePositioningExplanatoryNote": "In order to ensure the feasibility of the rapid distribution of items in the short timeframe between forecast and event, pre-positioning of goods might be necessary. They should normally have a lifetime of at least the lifecycle of the EAP and should only be replenished after an activation. The DREF covers these costs, combined with readiness, to a maximum amount of 65% of the EAP budget (combined with the readiness activities). Please note that costs that are not for the procurement of the items but related to the maintenance of the stock, such as warehousing, are part of the readiness costs of an EAP (see section 9.2.)",
2626
"financePrePositioningDescription1": "If funds for pre-positioning are requested from the DREF, explain for which items and why no other option is possible. Explain why standard response stocks cannot be used.",
2727
"financePrePositioningDescription2": "Expiry date of the items should not be prior to the end of the lifecycle of the EAP",
2828
"financePrePositioningDescription3": "Provide information about the location of the storage facilities and costs of storage, etc.",
29-
"financePrePositioningBudgetLabel": "Pre-Positioning Budget",
29+
"financePrePositioningBudgetLabel": "Pre-Positioning Budget(CHF)",
3030
"financeEarlyActionCostTitle": "Early action cost",
3131
"financeEarlyActionBudgetLabel": "Early Actions Budget(CHF)",
3232
"financeEarlyActionCostDescription1": "In the budget, list all these costs under the section early action costs.",

app/src/views/EapFullForm/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,8 @@ export function Component() {
817817

818818
const isLatestVersion = currentFullEapId === latestFullEapId;
819819

820-
const fullEapFormAccess = (isNotDefined(eapDetailResponse?.eap_type)
820+
const fullEapFormAccess = (fetchingEap
821+
|| isNotDefined(eapDetailResponse?.eap_type)
821822
|| eapDetailResponse?.eap_type === EAP_TYPE_FULL)
822823
&& isNotDefined(fullEapResponseError);
823824

app/src/views/EapFullForm/schema.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -637,8 +637,7 @@ export const formSchema: EapFullFormSchema = {
637637
},
638638

639639
key_actors: {
640-
required: isSubmit,
641-
validation: requiredListCondition,
640+
validation: isSubmit ? requiredListCondition : undefined,
642641
keySelector: (item) => item.client_id,
643642
member: () => ({
644643
fields: (): KeyActorsFormFields => ({
@@ -721,6 +720,7 @@ export const formSchema: EapFullFormSchema = {
721720
},
722721
prioritized_impacts: {
723722
keySelector: (item) => item.client_id,
723+
validation: isSubmit ? requiredListCondition : undefined,
724724
member: () => ({
725725
fields: (): PrioritizedImpactsFields => ({
726726
client_id: {},
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"parent": "000079-1777278136025.json",
3+
"actions": [
4+
{
5+
"action": "update",
6+
"key": "financePrePositioningBudgetLabel",
7+
"namespace": "eapFullForm",
8+
"newValue": "Pre-Positioning Budget(CHF)"
9+
},
10+
{
11+
"action": "update",
12+
"key": "financePrePositioningTitle",
13+
"namespace": "eapFullForm",
14+
"newValue": "Pre-positioning cost"
15+
}
16+
]
17+
}

0 commit comments

Comments
 (0)