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

added toast messages on facility and skills dialog #7448

Merged
merged 3 commits into from
Mar 27, 2024

Conversation

soumya-maheshwari
Copy link
Contributor

Proposed Changes

@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers

Merge Checklist

  • Add specs that demonstrate bug / test a new feature.
  • Update product documentation.
  • Ensure that UI text is kept in I18n files.
  • Prep screenshot or demo video for changelog entry, and attach it to issue.
  • Request for Peer Reviews
  • Completion of QA

screenshots

video2.mp4

@soumya-maheshwari soumya-maheshwari requested a review from a team as a code owner March 21, 2024 14:38
Copy link

vercel bot commented Mar 21, 2024

@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.

Copy link

netlify bot commented Mar 21, 2024

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit b1467e7
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/6603142c4ab9e5000878e0f0
😎 Deploy Preview https://deploy-preview-7448--care-egov-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Comment on lines 661 to 663
if (res && res.status === 204) user.home_facility_object = null;
if (res?.status !== 204) {
Notification.Error({
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
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({

Comment on lines 641 to 643
if (res && res.status === 200) user.home_facility_object = facility;
if (res?.status !== 200) {
Notification.Error({
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
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({

Copy link
Contributor Author

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.

image

Copy link
Member

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

Copy link
Contributor Author

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!

pathParams: { username },
body: { facility: unlinkFacilityData?.facility?.id?.toString() },
});
if (res?.status !== 204) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (res?.status !== 204) {
if (!res?.ok) {

Comment on lines 697 to 699

console.log(res);

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
console.log(res);

@@ -667,10 +694,17 @@ function UserFacilities(props: { user: any }) {
pathParams: { username },
body: { facility: facility.id.toString() },
});

console.log(res);

if (res?.status !== 201) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (res?.status !== 201) {
if (!res?.ok) {

src/Components/Users/SkillsSlideOver.tsx Outdated Show resolved Hide resolved
@nihal467
Copy link
Member

LGTM

@khavinshankar khavinshankar merged commit 83333fc into coronasafe:develop Mar 27, 2024
33 of 35 checks passed
Copy link

@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! 🙌

Ashesh3 pushed a commit to UdaySagar-Git/care_fe that referenced this pull request Apr 2, 2024
* added toast messages on facility and skills dialog

* Requested changes done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing Toast Messages for Success and Error in Linking/Unlinking Facility and Skill sections in users page
5 participants