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

feat(init waiver): init waiver submission forms #361

Merged
merged 62 commits into from
Feb 8, 2024
Merged

feat(init waiver): init waiver submission forms #361

merged 62 commits into from
Feb 8, 2024

Conversation

13bfrancis
Copy link
Collaborator

@13bfrancis 13bfrancis commented Feb 2, 2024

Purpose

This will be adding the ability to submit waiver forms for both capitated and contracting. This will be important as it will unlock the ability to start work on app-k's and continue to figure out what we need to do to evolve these forms.

Linked Issues to Close

Closes https://qmacbis.atlassian.net/browse/OY2-27135

Approach

A minimalistic and minimal abstraction approach was taken. After much discussion with the group, we don't know yet enough about where this is gonna head to make any decisions. The important thing in this current state was to get something out there that we can continue to evolve on.

Assorted Notes/Considerations/Learning

  • On this branch, we're verifying that IDs for new waivers do not already exist, and we're verifying that IDs for existing waivers (that amendments and renewals want to modify) do exist. There may be more opportunity for validation; that will be worked in another ticket

13bfrancis and others added 30 commits January 22, 2024 11:34
run different queries based on the authority (waiver, spa, chip, etc)
this should set one of the dropdown fields in seatool which is mapped to the type table in the db
the type and sub-type queries will be important in PI 3 when we have more understanding
@mdial89f mdial89f self-requested a review February 3, 2024 19:01
Copy link
Contributor

@mdial89f mdial89f left a comment

Choose a reason for hiding this comment

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

@13bfrancis I stepped through the AC of the tickets in question and made some edits. None of them were functional... most just copy/paste of exact language required.

Approving

@mdial89f mdial89f added status: TESTING PR is being tested by QA and removed status: READY PR is ready for review labels Feb 5, 2024
? rules.filter((r) => r.check(checks, user)).map((r) => r.action)
: [];
return [
...((checks.isWaiver || checks.isSpa)

Choose a reason for hiding this comment

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

This can be done inside the ActionRules for closer control. We should move away from conditionally outputting outside of those rules

Choose a reason for hiding this comment

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

Also unsure why we're spreading an array inside an array

formData
) => {
try {
// AK-0260.R04.02

Choose a reason for hiding this comment

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

?

Comment on lines 87 to 116
export const zAmendmentOriginalWaiverNumberSchema = z
.string()
.regex(
/^[A-Z]{2}-\d{4,5}.R\d{2}.\d{2}$/,
"The 1915(b) Waiver Amendment Number must be in the format of SS-####.R##.## or SS-#####.R##.##. For amendments, the last two digits start with ‘01’ and ascends."
)
.refine((value) => isAuthorizedState(value), {
message:
"You can only submit for a state you have access to. If you need to add another state, visit your IDM user profile to request access.",
})
// This should already exist.
.refine(async (value) => !(await idIsUnique(value)), {
message:
"According to our records, this 1915(b) Waiver Number does not yet exist. Please check the 1915(b) Waiver Amendment Number and try entering it again.",
});
export const zRenewalOriginalWaiverNumberSchema = z
.string()
.regex(
/^[A-Z]{2}-\d{4,5}.R\d{2}.\d{2}$/,
"The 1915(b) Waiver Renewal Number must be in the format of SS-####.R##.## or SS-#####.R##.##."
)
.refine((value) => isAuthorizedState(value), {
message:
"You can only submit for a state you have access to. If you need to add another state, visit your IDM user profile to request access.",
})
// This should already exist
.refine(async (value) => !(await idIsUnique(value)), {
message:
"According to our records, this 1915(b) Waiver Number does not yet exist. Please check the 1915(b) Waiver Amendment Number and try entering it again.",
});

Choose a reason for hiding this comment

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

Am I missing the need for this redundancy?

Copy link
Collaborator

@daniel-belcher daniel-belcher left a comment

Choose a reason for hiding this comment

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

Other than the remaining concerns from Kevin, this looks like a solid foundation for these forms.

@mdial89f mdial89f merged commit ef8e91e into master Feb 8, 2024
5 of 16 checks passed
Copy link
Contributor

🎉 This PR is included in version 1.7.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Copy link
Contributor

🎉 This PR is included in version 1.5.0-val.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released on @val released status: TESTING PR is being tested by QA type: FEAT Submit new features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants