Skip to content
This repository has been archived by the owner on May 2, 2022. It is now read-only.

Story 51 - Un-Assigned Patients Notification + Boilerplate Setup #147

Merged
merged 6 commits into from
Mar 28, 2022

Conversation

martinsenecal
Copy link
Collaborator

@martinsenecal martinsenecal commented Mar 27, 2022

Related Issue

Proposed Changes (Description)

In the admin dashboard, admins will need to be notified if there are more patients than the number of available slots (based on the nb of current patients and doctors). This notification will allow them to modify settings, or add more medical staff.

There's no need to send a pop-up notification to the admin for it. A simple red dot on the UnAssigned Patients Tab is enough.

& Boilerplate Setup for Notifications System (Cloud Functions that will be used for the other user stories)

Checklist

  • Tests
  • Documentation
  • Build Successful
  • Follow Coding Guidelines

@martinsenecal martinsenecal changed the title Story 51 Story 51 - Un-Assigned Patients Notification + Boilerplate Setup Mar 27, 2022
@KrisTheCanadian KrisTheCanadian self-requested a review March 27, 2022 21:34
@github-actions
Copy link

github-actions bot commented Mar 27, 2022

Visit the preview URL for this PR (updated for commit 230561b):

https://soen-390-ba781--pr147-story-51-kqyz7jju.web.app

(expires Mon, 04 Apr 2022 00:13:57 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

@KrisTheCanadian
Copy link
Owner

KrisTheCanadian commented Mar 27, 2022

Codecov Report

Merging #147 (230561b) into dev (f7861fa) will decrease coverage by 0.29%.
The diff coverage is 48.98%.

@@            Coverage Diff             @@
##              dev     #147      +/-   ##
==========================================
- Coverage   56.24%   55.95%   -0.28%     
==========================================
  Files          51       53       +2     
  Lines        1364     1412      +48     
  Branches      344      347       +3     
==========================================
+ Hits          767      790      +23     
- Misses        593      618      +25     
  Partials        4        4              
Impacted Files Coverage Δ
...ashboard/AdminDashboard/UnassignedPatientTable.tsx 0.00% <0.00%> (ø)
...onents/dashboard/AdminDashboard/AdminDashboard.tsx 56.25% <42.86%> (-27.08%) ⬇️
src/components/layout/NotificationsMenuItem.tsx 60.00% <60.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f7861fa...230561b. Read the comment docs.

dispatchDoctor({ title: 'Title Test', message: 'testing', userId: state.id });
};

useEffect(() => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't we unsubscribe from firestore when you unmount the component here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

setOpen(false);
};

useEffect(() => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here, I believe we need to make sure to unsubscribe

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

Copy link
Collaborator

@Alexialsousa Alexialsousa left a comment

Choose a reason for hiding this comment

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

i agree with mimi's comments or else it looks good!

@martinsenecal martinsenecal merged commit 551997f into dev Mar 28, 2022
@martinsenecal martinsenecal deleted the story-51 branch March 28, 2022 00:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants