Skip to content

Commit 7e4e5cf

Browse files
shreeyash07frozenhelium
authored andcommitted
fix(eap): add missing response error from status update
1 parent 19267e7 commit 7e4e5cf

4 files changed

Lines changed: 20 additions & 3 deletions

File tree

app/src/views/AccountMyFormsEap/EapTableActions/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ function EapTableActions(props: Props) {
488488
{eap.eap_type === EAP_TYPE_FULL && (
489489
<>
490490
{environment === 'development' && isCreated && (
491-
<ListView>
491+
<ListView layout="block">
492492
<Link
493493
to="eapSummaryExport"
494494
urlParams={{ eapId: eap.id }}

app/src/views/EapFullForm/RiskAnalysis/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ function RiskAnalysis(props: Props) {
6666
const strings = useTranslation(i18n);
6767

6868
const error = getErrorObject(formError);
69+
6970
const {
7071
setValue: onRiskSourceInformationChange,
7172
removeValue: onRiskSourceInformationRemove,

app/src/views/EapFullForm/index.tsx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,12 @@ export function Component() {
388388
]?.client_id;
389389
}
390390

391+
match = matchArray(locations, ['prioritized_impacts', NUM]);
392+
if (isDefined(match)) {
393+
const [index] = match;
394+
return formValue?.prioritized_impacts?.[index!]?.client_id;
395+
}
396+
391397
match = matchArray(locations, ['prioritized_impact_images', NUM]);
392398
if (isDefined(match)) {
393399
const [index] = match;
@@ -404,6 +410,12 @@ export function Component() {
404410
?.client_id;
405411
}
406412

413+
match = matchArray(locations, ['early_actions', NUM]);
414+
if (isDefined(match)) {
415+
const [index] = match;
416+
return formValue?.early_actions?.[index!]?.client_id;
417+
}
418+
407419
match = matchArray(locations, [
408420
'trigger_statement_source_of_information',
409421
NUM,
@@ -786,13 +798,17 @@ export function Component() {
786798
navigate('accountMyFormsEap');
787799
},
788800
onFailure: (error) => {
801+
const {
802+
value: { formErrors, messageForNotification },
803+
} = error;
789804
alert.show(
790805
strings.submitFailedSuccess,
791806
{
792807
variant: 'danger',
793-
description: error.value.messageForNotification,
808+
description: messageForNotification,
794809
},
795810
);
811+
processServerErrors(formErrors, value);
796812
},
797813
});
798814

app/src/views/EapSimplifiedExport/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ export function Component() {
232232
<PrintableContainer>
233233
<Image
234234
src={cover_image_file.file}
235-
alt=""
235+
alt={cover_image_file.caption ?? '--'}
236236
caption={cover_image_file.caption}
237237
/>
238238
</PrintableContainer>

0 commit comments

Comments
 (0)