Skip to content

Commit 537c393

Browse files
committed
fix(eap-form): add eap forms access according to eap type
1 parent f1ae8f3 commit 537c393

8 files changed

Lines changed: 356 additions & 327 deletions

File tree

app/src/utils/constants.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,4 +242,3 @@ export const EAP_STATUS_NS_ADDRESSING_COMMENTS = 30 satisfies EapStatus;
242242
export const EAP_STATUS_TECHNICALLY_VALIDATED = 40 satisfies EapStatus;
243243
export const EAP_STATUS_PENDING_PFA = 50 satisfies EapStatus;
244244
export const EAP_STATUS_APPROVED = 60 satisfies EapStatus;
245-
export const EAP_STATUS_ACTIVATED = 70 satisfies EapStatus;

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import { type components } from '#generated/types';
3030
import useGlobalEnums from '#hooks/domain/useGlobalEnums';
3131
import useAlert from '#hooks/useAlert';
3232
import {
33-
EAP_STATUS_ACTIVATED,
3433
EAP_STATUS_APPROVED,
3534
EAP_STATUS_NS_ADDRESSING_COMMENTS,
3635
EAP_STATUS_PENDING_PFA,
@@ -67,8 +66,7 @@ const validStatusTransition: Record<EapStatus, EapStatus[]> = {
6766
EAP_STATUS_PENDING_PFA,
6867
],
6968
[EAP_STATUS_PENDING_PFA]: [EAP_STATUS_APPROVED],
70-
[EAP_STATUS_APPROVED]: [EAP_STATUS_ACTIVATED],
71-
[EAP_STATUS_ACTIVATED]: [],
69+
[EAP_STATUS_APPROVED]: [],
7270
};
7371

7472
export interface Props {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import {
2121

2222
import GoSingleFileInput from '#components/domain/GoSingleFileInput';
2323
import Link from '#components/Link';
24+
import NonFieldError from '#components/NonFieldError';
2425
import TabPage from '#components/TabPage';
2526
import { useRequest } from '#utils/restRequest';
2627

@@ -29,7 +30,6 @@ import { type PartialEapFullFormType } from '../schema';
2930
import SectionQualityCriteria from '../SectionQualityCriteria';
3031

3132
import i18n from './i18n.json';
32-
import NonFieldError from '#components/NonFieldError';
3333

3434
interface Props {
3535
value: PartialEapFullFormType;

app/src/views/EapFullForm/i18n.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
"submitButtonLabel": "Submit for approval",
3131
"submitConfirmButtonLabel": "Confirm",
3232
"submitConfirmHeading": "Submit EAP for approval",
33-
"submitConfirmMessage": "Are you sure you want to submit the EAP? Reviewers will be notified and you'll no longer be able to edit the form!"
33+
"submitConfirmMessage": "Are you sure you want to submit the EAP? Reviewers will be notified and you'll no longer be able to edit the form!",
34+
"formLoadErrorTitle": "Failed to load Full EAP form!",
35+
"formLoadErrorHelpText": "Please make sure that the Full EAP form with given id exists and you have the permission to view it"
3436
}
3537
}

app/src/views/EapFullForm/index.tsx

Lines changed: 186 additions & 174 deletions
Large diffs are not rendered by default.

app/src/views/EapSimplifiedForm/i18n.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
"submitButtonLabel": "Submit for approval",
2929
"submitConfirmButtonLabel": "Confirm",
3030
"submitConfirmHeading": "Submit EAP for approval",
31-
"submitConfirmMessage": "Are you sure you want to submit the EAP? Reviewers will be notified and you'll no longer be able to edit the form!"
31+
"submitConfirmMessage": "Are you sure you want to submit the EAP? Reviewers will be notified and you'll no longer be able to edit the form!",
32+
"formLoadErrorTitle": "Failed to load Simplified EAP form!",
33+
"formLoadErrorHelpText": "Please make sure that the Simplified EAP form with given id exists and you have the permission to view it"
3234
}
3335
}

0 commit comments

Comments
 (0)