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 Permit Holder API hookup #50

Merged
merged 43 commits into from
Aug 31, 2021

Conversation

j-bunk
Copy link
Contributor

@j-bunk j-bunk commented Aug 18, 2021

Notion ticket link

View + Edit Permit Holder API hookup

Implementation description

General TODO list:

  • EditUserInformationModal API hookup
  • EditDoctorInformationModal API hookup
  • applicantApplicationProcessingHistoryResolver field resolver
  • Overall page hookup and passing relevant data down to the cards
  • Other (handling dynamic route, addressing some notes from the Notion ticket etc.)

Notes

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

@@ -71,10 +71,10 @@ CREATE TABLE physicians (
address_line_1 VARCHAR(255) NOT NULL,
address_line_2 VARCHAR(255),
city VARCHAR(255) NOT NULL,
province Province NOT NULL,
province Province NOT NULL DEFAULT 'BC',
Copy link
Contributor Author

@j-bunk j-bunk Aug 18, 2021

Choose a reason for hiding this comment

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

Upserting a physician was failing because province and status are not specified in EditDoctorInformationModal so I added default values to db. The default values could have also been specified somewhere else instead but I think BC and ACTIVE are sensible defaults to have on the database level so we don't have to specify these values every time we handle physician creation

</Box>
)}

{medicalInformation.notes && (
{application.notes && (
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think application.notes isn't correct here as I believe this refers to notes on the application itself and not notes relating to medical information but I kept it here as a placeholder. There doesn't seem to be a field for that so I'm not sure what should be used here

Copy link
Member

Choose a reason for hiding this comment

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

Yes, this is correct. We don't have medical information notes on a per-application basis. It is best to just leave the application.notes here, as it is most likely that the notes attached to an application are related to the medical information

@OustanDing OustanDing added the wip Work in progress label Aug 18, 2021
@angeladietz angeladietz force-pushed the jb/view-permit-holder-api-hookup branch from d8fd6b4 to e8a2161 Compare August 24, 2021 12:38
@angeladietz angeladietz requested a review from a team August 28, 2021 20:24
@angeladietz angeladietz added needs dev review Needs dev review and removed wip Work in progress labels Aug 28, 2021
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.

Great work guys! And thanks a lot @chrischan325 @angeladietz and @jennifertsai for picking up this ticket. I left some items to resolve. Some of the request changes will break the other files (eg. the moving the types to a tools file rather than leaving it in the page file) so be careful of that. Thanks again y'all :))

components/permit-holders/AppHistoryCard.tsx Outdated Show resolved Hide resolved
components/permit-holders/AppHistoryCard.tsx Outdated Show resolved Hide resolved
components/permit-holders/AppHistoryCard.tsx Show resolved Hide resolved
components/permit-holders/AppHistoryCard.tsx Outdated Show resolved Hide resolved
components/permit-holders/AppHistoryCard.tsx Show resolved Hide resolved
pages/admin/permit-holder/[permitHolderId].tsx Outdated Show resolved Hide resolved
pages/admin/permit-holder/[permitHolderId].tsx Outdated Show resolved Hide resolved
pages/admin/permit-holder/[permitHolderId].tsx Outdated Show resolved Hide resolved
prisma/schema.prisma Outdated Show resolved Hide resolved
prisma/schema.prisma Outdated Show resolved Hide resolved
@OustanDing OustanDing added wip Work in progress and removed needs dev review Needs dev review labels Aug 29, 2021
@OustanDing OustanDing added needs dev review Needs dev review and removed wip Work in progress labels Aug 30, 2021
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.

A lot better! A couple of small things and we should be good to go :)

components/permit-holders/DoctorInformationCard.tsx Outdated Show resolved Hide resolved
components/permit-holders/DoctorInformationCard.tsx Outdated Show resolved Hide resolved
components/permit-holders/GuardianInformationCard.tsx Outdated Show resolved Hide resolved
components/permit-holders/PermitHolderHeader.tsx Outdated Show resolved Hide resolved
components/permit-holders/PermitHolderHeader.tsx Outdated Show resolved Hide resolved
pages/admin/permit-holder/[permitHolderId].tsx Outdated Show resolved Hide resolved
pages/admin/permit-holder/[permitHolderId].tsx Outdated Show resolved Hide resolved
pages/admin/permit-holder/[permitHolderId].tsx Outdated Show resolved Hide resolved
pages/admin/permit-holder/[permitHolderId].tsx Outdated Show resolved Hide resolved
components/permit-holders/DoctorInformationCard.tsx Outdated Show resolved Hide resolved
components/permit-holders/DoctorInformationCard.tsx Outdated Show resolved Hide resolved
components/permit-holders/DoctorInformationCard.tsx Outdated Show resolved Hide resolved
components/permit-holders/DoctorInformationCard.tsx Outdated Show resolved Hide resolved
components/permit-holders/DoctorInformationCard.tsx Outdated Show resolved Hide resolved
components/permit-holders/GuardianInformationCard.tsx Outdated Show resolved Hide resolved
components/permit-holders/PermitHolderHeader.tsx Outdated Show resolved Hide resolved
components/requests/modals/EditDoctorInformationModal.tsx Outdated Show resolved Hide resolved
components/requests/modals/EditDoctorInformationModal.tsx Outdated Show resolved Hide resolved
tools/pages/admin/permit-holders/types.ts Outdated Show resolved Hide resolved
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.

LGTM!

@chrischan325 chrischan325 merged commit 471b3d4 into staging Aug 31, 2021
@chrischan325 chrischan325 deleted the jb/view-permit-holder-api-hookup branch August 31, 2021 20:34
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
5 participants