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

MCR-3772 MCR-3771 Edit and submit standalone rate #2238

Merged
merged 28 commits into from
Feb 12, 2024
Merged

Conversation

haworku
Copy link
Contributor

@haworku haworku commented Feb 6, 2024

Summary

  • State can submit an edited rate from rate form and is routed to dashboard where edits have been applied
  • State can edit a rate form for a single unlocked rate

🔍 Most important changes here are to the new files in the V2 folder. That is the new rate details page and standalone form.

Related issues

https://jiraent.cms.gov/browse/MCR-3772
https://jiraent.cms.gov/browse/MCR-3771

Test cases covered

No tests implemented. We are not turning this on for awhile. I moved testing out this ticket and into new ticket.

QA guidance

Please run through the manual QA steps on these tickets and check the acceptance criteria. No automated tests yet.

@haworku haworku marked this pull request as draft February 6, 2024 16:40
Copy link
Contributor

@macrael macrael left a comment

Choose a reason for hiding this comment

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

Looks great, so excited for us to move off HPP

@ruizajtruss
Copy link
Contributor

Reviewed AC for tickets:

  1. If I am a state user and I submit rate edits on the standalone rate form. Then I am navigated back to my dashboard and the submission that contained that rate I just re-submitted should appear at the top with the “Date Updated” updated to the date I submitted the edit.

    • I was able to successfully update the standalone rate as a state user using the new form and I was navigated back to the dashboard as expected 🎉
  2. If I navigate to the submission summary page that contains that rate and on the rate summary Then I will see the submitted rate edits displayed on the submission summary page and on the rate summary (See related rate summary design)

    • I was able to verify the changes were reflected on the rate summary and submission summary pages 🎉
  3. If I am a state user and I submitted rate edits. Then the rate is locked and I can no longer access the rate form at rate-id/edit and I would be re-routed to rate-id URL

    • The rate is no longer accessible at the /rates/:id/edit URL and redirects to the /rates/:id URL as expected 🎉
  4. If I am a CMS user and the state submitted rate edits Then when I view the rate summary page I see the resubmitted edits displayed (See related rate summary design)

    • The edited details are being reflected in the rate summary for the CMS user on both the submission and rate summary pages 🎉
  5. If I am a CMS user and the state submitted rate edits Then the “unlock rate” button on the rate summary page should be active again (See related rate summary design)

    • The unlock button is re-enabled after edits are submitted!
  6. If I am a CMS user and the state submitted rate edits Then when I navigate to the submission summary page that contains that rate I will see the state’s submitted rate edits displayed. (See related submission summary design)

    • Verified as working! 🎉

Copy link
Contributor

@ruizajtruss ruizajtruss left a comment

Choose a reason for hiding this comment

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

I caught one small bug in this PR

If you edit a standalone rate as a State user, submit the edit, then login as a CMS user and click the Rate Reviews tab on the CMS dashboard the Rate Review name comes back as Missing Field:

image

If you click into it you are met with Unknown Rate Name as well:
image

I've been able to replicate this consistently

@haworku
Copy link
Contributor Author

haworku commented Feb 12, 2024

@ruizajtruss TY - looking at the api and the error message this is an issue with how rateCertificationName is generated. I am working on a fix now that hopefully is also re- useable for link rates work.

Copy link
Contributor

@macrael macrael left a comment

Choose a reason for hiding this comment

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

looks good to me! good catch @ruizajtruss

@@ -975,7 +975,7 @@ type ContractFormData {
}

"Either new capitation rates (NEW) or updates to previously certified capitation rates (AMENDMENT)"
enum RateType {
enum RateAmendmentType {
Copy link
Contributor Author

@haworku haworku Feb 12, 2024

Choose a reason for hiding this comment

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

I changed the name on this because I was seeing types getting confused in my editor when RateType was both

  1. the enum for a rate's type (radio button response)
  2. the complex data object coming back from apollo client representing the entire rate (the full data model).

@@ -0,0 +1,37 @@
/*
Recursively replaces all nulls with undefineds
GQL return <Maybe> types are T | null instead of T | undefined which match our zod .optional() domain types
Copy link
Contributor Author

@haworku haworku Feb 12, 2024

Choose a reason for hiding this comment

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

@macrael I looked into changing graphql return types to be more generous via codegen settings first in the maybeValue but I was still seeing type issues. Feels like this could be something to look at more holistically. For now, doing this hack again (what we did in toDomain with protos) to quickly get around it in order to move on

@haworku haworku merged commit e7f0999 into main Feb 12, 2024
28 checks passed
@haworku haworku deleted the MCR-3777-single-rate branch February 12, 2024 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants