Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1759 - Reissue MSFAA - Part 2 - NOA UI Changes #1936

Merged
merged 10 commits into from
May 15, 2023

Conversation

andrewsignori-aot
Copy link
Collaborator

@andrewsignori-aot andrewsignori-aot commented May 11, 2023

  • Enabled the visualization of the MSFAAs in the NOA with additional signed/cancellation messages and the "Reissue MSFAA" button for the Ministry in case there is a canceled MSFAA associated with pending disbursement.
  • Added MSFAACancelledDate and MSFAADateSigned to the API return following the approach in place. Renamed the COE status previously named Status to COEStatus since the object itself is related to the disbursement and now we have a status for it.
  • The form.io components are duplicated to deal with one MSFAA or two MSFAA scenarios. If anyone has a better idea please let's talk about it. The current approach, even with some duplication at the form.io definition level is still easy to follow.
  • The canReissueMSFAA logic to display the button uses the props.canReissueMSFAA and it loses the reactivity in the way that it is right now. I did not find it too important to keep the reactivity for this case.

Two disbursements, same MSFAA, MSFAA signed.

image

Two disbursements, same MSFAA, MSFAA not signed.

image

Two disbursements (at least one is pending), same MSFAA, MSFAA canceled.

image

Two disbursements (first is sent, second is pending), different MSFAA, second MSFAA waiting to be signed.

image

Two disbursements (first is sent, second is pending), different MSFAA, both are canceled on different dates.

image

Student view

image

Reissue MSFAA confirmation modal.

image

@hellolynn-tbtb
Copy link
Contributor

Nice work! @andrewsignori-aot Just missing a few things. No problem if you do it in the next PR!

image

Comment on lines 14 to 16
:assessmentId="assessmentId"
:can-reissue-m-s-f-a-a="true"
@reissue-m-s-f-a-a="reissueMSFAA"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a problem, just curious: should we use kebab case for the attributes too? If that's case assessmentId should be assessment-id 😄

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. I did not do that manually 😄, that was the VS Code suggestion while auto-completing.
We have been doing it for the component's name (e.g. notice-of-assessment-form-view) because it looks like more HTML style (IMO). For instance when we declare data custom attributes we will use data-*.
Should we change assessmentId to assessment-id? Yes, but we do not need to go back and do it all over the place. Does it make sense?
@ann-aot @guru-aot @dheepak-aot @sh16011993

image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes 😄 we can do it and make sense

Copy link
Collaborator

@andrepestana-aot andrepestana-aot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job. I left some comments.

@@ -19,15 +19,9 @@
data-cy="primaryFooterButton"
color="primary"
@click="$emit('primaryClick')"
:loading="processing"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

reissueMSFAA: (
applicationId: number,
loadNOA: () => Promise<void>,
processing: (processing: boolean) => void,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This approach is also good

@andrewsignori-aot
Copy link
Collaborator Author

Nice work! @andrewsignori-aot Just missing a few things. No problem if you do it in the next PR!

image

UI adjusted as below @hellolynn-tbtb
image

...assessment,
canReissueMSFAA,
};
console.log(assessment);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why we need a console.log here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was a leftover from before. It is removed already.

Copy link
Collaborator

@guru-aot guru-aot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nice work @andrewsignori-aot

schedule.coeStatus;
disbursementDetails[`${disbursementIdentifier}MSFAANumber`] =
schedule.msfaaNumber.msfaaNumber;
disbursementDetails[`${disbursementIdentifier}MSFAACancelledDate`] =
schedule.msfaaNumber.cancelledDate;
disbursementDetails[`${disbursementIdentifier}MSFAADateSigned`] =
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we send the date signed in API?, I couldn't see that in UI either in figma or screenshots.

image

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The signed date received from the API is used by the method getMSFAAStatus.

/**
* Defines the MSFAA status based on the signed date and cancelled dates.
* @param signedDate signed date.
* @param cancelledDate cancelled date.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return comment

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

const getMSFAAStatus = (
signedDate?: Date,
cancelledDate?: Date,
): MSFAAStatus => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return comment

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

* Defines the icon class to displayed depending on the MSFAA status.
* @param msfaaStatus MSFAA status.
*/
const getMSFAAStatusClass = (msfaaStatus: MSFAAStatus): string => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return comment

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

Copy link
Contributor

@ann-aot ann-aot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 added some minor comments

await ApplicationService.shared.reissueMSFAA(applicationId);
snackBar.success("MSFAA was reissued successfully.");
await reloadNOA();
} catch (error: unknown) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need error in the catch?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, removing it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

@dheepak-aot
Copy link
Collaborator

Good to see the MSFAA and Re-Issue MSFAA happening. Added few comments.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@github-actions
Copy link

Backend Unit Tests Coverage Report

Totals Coverage
Statements: 18.11% ( 2040 / 11266 )
Methods: 8.19% ( 119 / 1453 )
Lines: 20.94% ( 1792 / 8557 )
Branches: 10.27% ( 129 / 1256 )

@github-actions
Copy link

E2E Workflow Workers Coverage Report

Totals Coverage
Statements: 33.02% ( 177 / 536 )
Methods: 22.08% ( 17 / 77 )
Lines: 40.1% ( 158 / 394 )
Branches: 3.08% ( 2 / 65 )

@github-actions
Copy link

E2E Queue Consumers Coverage Report

Totals Coverage
Statements: 68.32% ( 371 / 543 )
Methods: 57.97% ( 40 / 69 )
Lines: 70.47% ( 327 / 464 )
Branches: 40% ( 4 / 10 )

Copy link
Collaborator

@dheepak-aot dheepak-aot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making the changes. LGTM 👍

@github-actions
Copy link

E2E SIMS API Coverage Report

Totals Coverage
Statements: 41.54% ( 2918 / 7025 )
Methods: 34.76% ( 317 / 912 )
Lines: 46.8% ( 2455 / 5246 )
Branches: 16.84% ( 146 / 867 )

Copy link
Contributor

@ann-aot ann-aot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing the changes 👍 Good work @andrewsignori-aot

Copy link
Collaborator

@andrepestana-aot andrepestana-aot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the answers.

@andrewsignori-aot andrewsignori-aot merged commit 6e3c85f into main May 15, 2023
@andrewsignori-aot andrewsignori-aot temporarily deployed to DEV May 15, 2023 20:50 — with GitHub Actions Inactive
@andrewsignori-aot andrewsignori-aot deleted the feature/#1759-msfaa-reissue-noa-ui branch May 15, 2023 20:50
@andrewsignori-aot andrewsignori-aot temporarily deployed to DEV May 15, 2023 20:50 — with GitHub Actions Inactive
@andrewsignori-aot andrewsignori-aot temporarily deployed to DEV May 15, 2023 21:07 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SIMS-Api SIMS-Api
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants