-
Notifications
You must be signed in to change notification settings - Fork 514
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
added toast messages on facility and skills dialog #7448
added toast messages on facility and skills dialog #7448
Conversation
@soumya-maheshwari is attempting to deploy a commit to the Open Healthcare Network Team on Vercel. A member of the Team first needs to authorize it. |
✅ Deploy Preview for care-egov-staging ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
src/Components/Users/ManageUsers.tsx
Outdated
if (res && res.status === 204) user.home_facility_object = null; | ||
if (res?.status !== 204) { | ||
Notification.Error({ |
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.
if (res && res.status === 204) user.home_facility_object = null; | |
if (res?.status !== 204) { | |
Notification.Error({ | |
if (!res?.ok) { | |
user.home_facility_object = null; | |
Notification.Error({ |
src/Components/Users/ManageUsers.tsx
Outdated
if (res && res.status === 200) user.home_facility_object = facility; | ||
if (res?.status !== 200) { | ||
Notification.Error({ |
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.
if (res && res.status === 200) user.home_facility_object = facility; | |
if (res?.status !== 200) { | |
Notification.Error({ | |
if (!res?.ok) { | |
user.home_facility_object = facility; | |
Notification.Error({ |
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.
Hi @rithviknishad,
I just wanted to confirm the proposed changes. It seems like user.home_facility_object = facility; should be moved to the else statement. If this adjustment aligns with our intentions, I can proceed with pushing the code.
Let me know if there are any concerns.
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 yes, you are right. my bad
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 yes, you are right. my bad
I've made some updates to the pull request:
Please review the changes and let me know if there are any further adjustments needed. Looking forward to your feedback!
src/Components/Users/ManageUsers.tsx
Outdated
pathParams: { username }, | ||
body: { facility: unlinkFacilityData?.facility?.id?.toString() }, | ||
}); | ||
if (res?.status !== 204) { |
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.
if (res?.status !== 204) { | |
if (!res?.ok) { |
src/Components/Users/ManageUsers.tsx
Outdated
|
||
console.log(res); | ||
|
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.
console.log(res); |
src/Components/Users/ManageUsers.tsx
Outdated
@@ -667,10 +694,17 @@ function UserFacilities(props: { user: any }) { | |||
pathParams: { username }, | |||
body: { facility: facility.id.toString() }, | |||
}); | |||
|
|||
console.log(res); | |||
|
|||
if (res?.status !== 201) { |
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.
if (res?.status !== 201) { | |
if (!res?.ok) { |
LGTM |
@soumya-maheshwari Your efforts have helped advance digital healthcare and TeleICU systems. 🚀 Thank you for taking the time out to make CARE better. We hope you continue to innovate and contribute; your impact is immense! 🙌 |
* added toast messages on facility and skills dialog * Requested changes done
Proposed Changes
I've implemented toast messages for success and error events in the linking/unlinking facility and skill section in the users page
@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers
Merge Checklist
screenshots
video2.mp4