-
Notifications
You must be signed in to change notification settings - Fork 0
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
Caregiver CaseOverview component #218
Conversation
Visit the preview URL for this PR (updated for commit 2985845): https://childrens-aid-society--pr218-jenny-caregiver-lsh8dhfd.web.app (expires Mon, 11 Dec 2023 20:08:32 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 93f6cb7bff946a1edd29d684408e6d31442cf0b1 |
caregivers = caregiver_service.get_all_caregivers() | ||
return jsonify(list(map(lambda user: user.__dict__, caregivers))), 200 | ||
except Exception as error: | ||
return jsonify(error), 400 |
Check warning
Code scanning / CodeQL
Information exposure through an exception Medium
Stack trace information
f3e469a
to
9c947d5
Compare
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 work!! The PUT, POST, and GET work amazingly :))
Ik this wasn't in the figma, but could we also have a delete button next to each caregiver? i saw that u implemented the delete caregiver logic in the caregiverAPIClient
; could u hook it up w the delete btn?
9c947d5
to
01518ad
Compare
return jsonify(updated_caregiver.__dict__), 200 | ||
|
||
except Exception as error: | ||
return jsonify(str(error)), 400 |
Check warning
Code scanning / CodeQL
Information exposure through an exception Medium
Stack trace information
except Exception as e: | ||
error_message = getattr(e, "message", None) | ||
return ( | ||
jsonify({"error": (error_message if error_message else str(e))}), |
Check warning
Code scanning / CodeQL
Information exposure through an exception Medium
Stack trace information
01518ad
to
10f0681
Compare
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.
Nice! Delete works swellingly :))
Just some small typos to fix & formatting for PUT
10f0681
to
c200c3d
Compare
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.
oh sry, adding the formattedDate
to the PUT method was redundant, feel free to remove 😅
could u instead go into NewCaregiverModal.tsx
and add it to line 127:
defaultValue={caregiver ? formattedDate(caregiver.dateOfBirth) : ""}
other than that, lgtm!! tysm for working on this :))
c200c3d
to
3531be5
Compare
3531be5
to
2985845
Compare
Notion ticket link
Case Overview Visiting Family component
Implementation description
frontend:
get_caregivers_by_intake_id
backend:
caregiver_service
functions for editing existing caregiver,update_caregiver
caregiver_routes
for routes to PUT (edit)get_caregiver_by_intake_id
andupdate_caregiver
caregiver.py
model edited to add enum values forcaregiver_relationship_to_child
Steps to test
What should reviewers focus on?
Checklist