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

[Feature] View Request Page API Hookup #51

Merged
merged 26 commits into from
Aug 22, 2021

Conversation

jeffreyzhang2001
Copy link
Contributor

@jeffreyzhang2001 jeffreyzhang2001 commented Aug 19, 2021

Notion ticket link

Ticket Name

Implementation description

  • Request page API hookup - Renewals only
  • Add editing functionality to various cards in View Request page
  • Add functionality for approving and rejecting requests
  • Add functionality for various steps of request approval

Notes

  • This is a huge PR. Leaving out replacements for a separate PR
  • Need to add functionality for document upload (post-MVP)
  • Will need to do filesystem cleanup
  • Modified GraphQL codegen configuration to disallow optionals (possibly undefined) fields except in input types. This is a breaking change but will provide cleaner type checking and validation. Change made by @OustanDing

Checklist

  • My PR name is descriptive, is in imperative tense and starts with one of the following: [Feature],[Improvement] or [Fix],
  • I have run the appropriate linter(s)
  • I have requested a review from the RCD team on GitHub, or specific people who are associated with this ticket

Copy link
Member

@OustanDing OustanDing left a comment

Choose a reason for hiding this comment

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

Really really good job! Thanks so much for all your hard work. Sorry there are so many comments, but they will really benefit the maintainability of the project <3

components/requests/DoctorInformationCard.tsx Outdated Show resolved Hide resolved
components/requests/PaymentInformationCard.tsx Outdated Show resolved Hide resolved
components/requests/PersonalInformationCard.tsx Outdated Show resolved Hide resolved
pages/admin/request/[requestId].tsx Outdated Show resolved Hide resolved
pages/admin/request/[requestId].tsx Outdated Show resolved Hide resolved
pages/admin/request/[requestId].tsx Outdated Show resolved Hide resolved
pages/admin/request/[requestId].tsx Outdated Show resolved Hide resolved
pages/admin/request/[requestId].tsx Outdated Show resolved Hide resolved
@OustanDing OustanDing changed the title Request Page API Hookup [Feature] Request Page API Hookup Aug 22, 2021
@OustanDing OustanDing changed the title [Feature] Request Page API Hookup [Feature] View Request Page API Hookup Aug 22, 2021
@OustanDing
Copy link
Member

@jeffreyzhang2001 Did some general cleanup to resolve the TS errors we were running into. I changed the types generation config to disallow optionals (do not allow undefined for optional fields in queries) and moved around some of the logic to make our code cleaner. For instance, instead of having all the switch statements to handle the rendering and logic for the various approval steps, it was better for both maintainability and readability to just hardcode the components and their respective logic. It is more code and is more repetitive but the tradeoffs are worth it.

Also removed replacement logic from the request/[id] page as it was complicating things. Will address later.

@OustanDing
Copy link
Member

cc @carelynntsai Removed replacement applications from this page to reduce complexity. Also removed the country field from the editing modals since we only allow Canada in the applicant-facing form.

@OustanDing OustanDing added the needs dev review Needs dev review label Aug 22, 2021
@OustanDing OustanDing merged commit 591f638 into staging Aug 22, 2021
@OustanDing OustanDing deleted the jz/request-page-API-hookup branch August 22, 2021 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs dev review Needs dev review
Projects
None yet
2 participants