From d6de21c4aa31a78a0d247c35ca5e5964d4531456 Mon Sep 17 00:00:00 2001 From: Courtney Myers Date: Tue, 27 Dec 2022 15:22:42 -0500 Subject: [PATCH 1/5] Apply text changes to the application form and payment request form message that support payment request form submission deletion --- app/client/src/config.tsx | 2 +- app/client/src/routes/applicationForm.tsx | 39 ++++++++++++++--------- 2 files changed, 25 insertions(+), 16 deletions(-) diff --git a/app/client/src/config.tsx b/app/client/src/config.tsx index 898bfd20..168ad495 100644 --- a/app/client/src/config.tsx +++ b/app/client/src/config.tsx @@ -69,7 +69,7 @@ export const messages = { "The CSB Payment Request form enrollment period is closed.", closeOutFormClosed: "The CSB Close-Out form enrollment period is closed.", paymentRequestFormWillBeDeleted: - "The Application form submission associated with this Payment Request form submission requires edits, so this this form has been set to read-only mode. Visit your dashboard to make edits to the associated Application form submission.", + "A request to edit the Application form associated with this draft or submitted Payment Request form has been made, so this this form has been set to read-only mode. Visit your dashboard to make edits to the associated Application form submission.", }; async function fetchData(url: string, options: RequestInit) { diff --git a/app/client/src/routes/applicationForm.tsx b/app/client/src/routes/applicationForm.tsx index 7c9fab84..5c00cd64 100644 --- a/app/client/src/routes/applicationForm.tsx +++ b/app/client/src/routes/applicationForm.tsx @@ -230,27 +230,36 @@ function ApplicationFormContent({ email }: { email: string }) { description: ( <>

- This Application form submission requires edits, but before you - can make edits, the associated Payment Request form submission - needs to be deleted. + This Application form submission has been opened at the request of + the applicant to make edits, but before you can make edits, the + associated Payment Request form submission needs to be deleted. If + the request to make edits to your Application form submission was + made in error, contact the Clean School Bus Program helpline at{" "} + cleanschoolbus@epa.gov + .

- If you’d like to view the Payment Request form submission instead, - please close this dialog box, and you will be re-directed to the - associated Payment Request form submission page. + If you’d like to view the Payment Request form submission before + deletion, please close this dialog box, and you will be + re-directed to the associated Payment Request form.

- If you’d like to proceed with deleting the associated Payment - Request Form submission, please select the{" "} + To proceed with deleting the associated Payment Request form + submission, please select the{" "} Delete Payment Request Form Submission button - below, and the Payment Request Form submission will be deleted. -

-

- - Please note: once deleted, the submission will be removed from - your dashboard and cannot be recovered. - + below, and the Payment Request form submission will be deleted. + The Application form will then be open for editing.

+ +
+
+

+ Please note: Once deleted, the Payment + Request form submission will be removed from your dashboard + and cannot be recovered. +

+
+
), confirmText: "Delete Payment Request Form Submission", From 0b50b173598821838c3e4184b95c176452fa89e7 Mon Sep 17 00:00:00 2001 From: Courtney Myers Date: Tue, 27 Dec 2022 16:14:49 -0500 Subject: [PATCH 2/5] Update accepted (funding approved) payment request form submissions to use blue background for check icon, like acceped (selected) application form submissions --- app/client/src/routes/allRebates.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/client/src/routes/allRebates.tsx b/app/client/src/routes/allRebates.tsx index d6b91c5f..f5071195 100644 --- a/app/client/src/routes/allRebates.tsx +++ b/app/client/src/routes/allRebates.tsx @@ -420,6 +420,10 @@ function ApplicationSubmission({ rebate }: { rebate: Rebate }) { ? "text-italic" : ""; + const statusIconClassNames = applicationSelected + ? "usa-icon text-primary" // blue + : "usa-icon"; + const statusIcon = applicationNeedsEdits ? `${icons}#priority_high` // ! : applicationHasBeenWithdrawn @@ -500,7 +504,7 @@ function ApplicationSubmission({ rebate }: { rebate: Rebate }) {
- + {text} ); diff --git a/app/client/src/routes/allRebates.tsx b/app/client/src/routes/allRebates.tsx index f5071195..0ef379ff 100644 --- a/app/client/src/routes/allRebates.tsx +++ b/app/client/src/routes/allRebates.tsx @@ -737,9 +737,7 @@ function PaymentRequestSubmission({ rebate }: { rebate: Rebate }) { ? "text-italic" : ""; - const statusIconClassNames = paymentRequestFundingApproved - ? "usa-icon text-primary" // blue - : "usa-icon"; + const statusIconClassNames = "usa-icon"; const statusIcon = paymentRequestNeedsEdits ? `${icons}#priority_high` // ! @@ -747,8 +745,6 @@ function PaymentRequestSubmission({ rebate }: { rebate: Rebate }) { ? `${icons}#close` // ✕ : paymentRequestFundingNotApproved ? `${icons}#cancel` // ✕ inside a circle - : paymentRequestFundingApproved - ? `${icons}#check_circle` // check inside a circle : paymentRequest.formio.state === "draft" ? `${icons}#more_horiz` // three horizontal dots : paymentRequest.formio.state === "submitted" @@ -761,8 +757,6 @@ function PaymentRequestSubmission({ rebate }: { rebate: Rebate }) { ? "Withdrawn" : paymentRequestFundingNotApproved ? "Funding Not Approved" - : paymentRequestFundingApproved - ? "Funding Approved" : paymentRequest.formio.state === "draft" ? "Draft" : paymentRequest.formio.state === "submitted" @@ -801,7 +795,14 @@ function PaymentRequestSubmission({ rebate }: { rebate: Rebate }) { {paymentRequestNeedsClarification ? ( + ) : paymentRequestFundingApproved ? ( + ) : ( <> From 089331ef1d7f5bc8c363dea3e939f874b7008648 Mon Sep 17 00:00:00 2001 From: Courtney Myers Date: Tue, 27 Dec 2022 17:28:59 -0500 Subject: [PATCH 4/5] Update application form submissions to support 'Needs Clarification' status --- app/client/src/routes/allRebates.tsx | 32 +++++++++++++++++++--------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/app/client/src/routes/allRebates.tsx b/app/client/src/routes/allRebates.tsx index 0ef379ff..509d3769 100644 --- a/app/client/src/routes/allRebates.tsx +++ b/app/client/src/routes/allRebates.tsx @@ -405,10 +405,13 @@ function ApplicationSubmission({ rebate }: { rebate: Rebate }) { bap: application.bap, }); + const applicationNeedsClarification = + application.bap?.status === "Needs Clarification"; + const applicationHasBeenWithdrawn = application.bap?.status === "Withdrawn"; const applicationNotSelected = - paymentRequest.bap?.status === "Coordinator Denied"; + application.bap?.status === "Coordinator Denied"; const applicationSelected = application.bap?.status === "Accepted"; @@ -503,15 +506,24 @@ function ApplicationSubmission({ rebate }: { rebate: Rebate }) { Application
- - {statusText} + {applicationNeedsClarification ? ( + + ) : ( + <> + + {statusText} + + )} From 9d5f122d7229ba05d418b08f737631f6de8fa2ec Mon Sep 17 00:00:00 2001 From: Courtney Myers Date: Tue, 27 Dec 2022 17:36:16 -0500 Subject: [PATCH 5/5] Update sorted rebates logic to move payment requests needing edits to be shown among the top of the list of a user's rebates --- app/client/src/routes/allRebates.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/client/src/routes/allRebates.tsx b/app/client/src/routes/allRebates.tsx index 509d3769..1d630946 100644 --- a/app/client/src/routes/allRebates.tsx +++ b/app/client/src/routes/allRebates.tsx @@ -337,12 +337,19 @@ export function useSortedRebates(rebates: { [rebateId: string]: Rebate }) { bap: r1.application.bap, }); + const r1PaymentRequestNeedsEdits = submissionNeedsEdits({ + formio: r1.paymentRequest.formio, + bap: r1.paymentRequest.bap, + }); + const r1ApplicationSelected = r1.application.bap?.status === "Accepted"; const r1ApplicationSelectedButNoPaymentRequest = r1ApplicationSelected && !Boolean(r1.paymentRequest.formio); - return r1ApplicationNeedsEdits || r1ApplicationSelectedButNoPaymentRequest + return r1ApplicationNeedsEdits || + r1PaymentRequestNeedsEdits || + r1ApplicationSelectedButNoPaymentRequest ? -1 : 0; });