-
Notifications
You must be signed in to change notification settings - Fork 3
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
[refactor] update schema types (again) #29
[refactor] update schema types (again) #29
Conversation
IJP-59 update schema types (again)
Add new types corresponding to each table. Update existing type dependencies. |
cd04975
to
2d9e762
Compare
2d9e762
to
c6e95b4
Compare
country?: string; | ||
client_location?: string; | ||
legal_server_id: number; | ||
hours_per_month?: number; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want hours_per_month
to be optional? I think David added a tag on the case listing card component that corresponds to a case's anticipated hrs/month. Are we ok with not displaying that tag for all cards if some cases don't have that info, or should we make it required to show the hrs/month data for all case listing cards?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great point!! the hours per month is an additional field that is going to be added to LegalServer, and so there is the possibility of it being null
if someone forgets to input it on LegalServer. generally we're making all LegalServer fields nullable because there's always the possibility of someone forgetting to fill them out on there.
@davidqing6432 wondering if you have ideas for modifications to the case listing card in the case that some of these fields are null?
src/types/schema.ts
Outdated
// table field types | ||
export type ImmigrationLawExperienceEnum = 'LOW' | 'MEDIUM' | 'HIGH'; | ||
|
||
export type AdjudicatingAgencyEnum = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related to your message on Slack, what are your thoughts on making adjudicating agency a string instead of an enum? I think that might allow for more flexibility, in case they add another potential agency afterward
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I think that makes sense given legal server data may not be standardized to fit into the enum
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also note that we will be pulling experience_needed
from legal server as well, and we may want to ask them about the format it'll be in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fantastic, Jinkang! I have a couple of clarifying questions and comments on here, but largely this looks good to merge. THANK YOU SO MUCH FOR WORKING ON THIS
96d3073
to
43ddb27
Compare
43ddb27
to
755b51d
Compare
🎋 Description
🌴 What's new in this PR
Modified
src/types/schema.ts
:enums
and join tablesUpdated the following pages to handle new type changes:
src/app/cases/page.tsx
src/app/create-profile/page.tsx
src/app/interest/page.tsx
src/app/profile/page.tsx
Updated the following components to handle new type changes:
src/components/ListingCard.tsx
Unplanned:
src/api/supabase/queries/
to have consistent error messages.src/utils/helpers.ts
🌲 Screenshots
🌳 How to review
First review changes in
types/schema.ts
, then review in any order.🌱 Next steps
🔗 Relevant Links
ℹ️ Online sources
🪴 Related PRs
CC: @pragyakallanagoudar