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

fix(location): duty doctors and staff for each location in a facility #6512

Closed
wants to merge 6 commits into from

Conversation

aeswibon
Copy link
Member

@aeswibon aeswibon commented Oct 28, 2023

Bug Fix

WHAT

🤖 Generated by Copilot at 15b419f

This pull request adds the feature of assigning and updating duty staff for a location in the asset management module. It also adds localization support for the location management components using the react-i18next module. It modifies the type definitions, models, actions, and api modules to support this feature and improves the code quality and organization. It also adds the Location.json file to the src/Locale/en folder for the English translation of the location-related text.

Proposed Changes

  • Adds Duty Staff section to location form
  • Stores doctors and staff with each location

Associated Issue

Screenshot

  • Normal: Modal for Assigning Duty Staff
    image

  • Success: Assigning duty staff
    image

  • Success: Removing duty staff
    image

@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 the screenshot or demo video for the changelog entry, and attach it to issue
  • Request for Peer Reviews
  • Completion of QA

HOW

🤖 Generated by Copilot at 15b419f

  • Add the Location.json file to the src/Locale/en folder with the key-value pairs for the text in the location management components (link)
  • Update the index.js file in the src/Locale/en folder to import and export the Location.json file (link, link)
  • Use the useTranslation hook and the t function to enable the localization of the text in the LocationManagement and LocationCard components (link, link, link, link, link)
  • Add the UserAssignedModel interface to the AssetTypes.tsx module and import it in the models.tsx and AssetTypes.tsx modules (link, link, link)
  • Add the duty_staff_objects field to the LocationModel interface in the models.tsx module and pass it as a prop to the LocationCard component (link, link)
  • Add the createFacilityAssetLocationDutyStaff function to the actions.tsx module and the createFacilityAssetLocationDutyStaff property to the routes object in the api.tsx module (link, link)
  • Update the AddLocationForm component in the AddLocationForm.tsx module to include the state variables, logic, and UI elements for adding and updating the duty staff for a location (link, link, link, link, link, link, link, link)
  • Remove the unused imports of the FacilityModel, LocationModel, and WardModel interfaces from the api.tsx module and move them to a more appropriate place (link, link)

@aeswibon aeswibon requested a review from a team October 28, 2023 13:18
@aeswibon aeswibon requested a review from a team as a code owner October 28, 2023 13:18
@aeswibon aeswibon requested a review from gigincg October 28, 2023 13:18
@vercel
Copy link

vercel bot commented Oct 28, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
care-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 3, 2024 1:10pm

@netlify
Copy link

netlify bot commented Oct 28, 2023

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit a530c2b
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/65955c976063b40007d71a52
😎 Deploy Preview https://deploy-preview-6512--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.

@nihal467
Copy link
Member

@cp-coder the maximum 3 users limitation per location was discussed in EOD, as I am unable to find it mentioned in the issue

@nihal467 nihal467 added the question Further information is requested label Oct 29, 2023
@aeswibon
Copy link
Member Author

aeswibon commented Oct 29, 2023

@cp-coder the maximum 3 users limitation per location was discussed in EOD, as I am unable to find it mentioned in the issue

Actually, Aakash wanted a validation for limiting the number of staffs assigned to any particular location that's why I added a limit of 3 doctors and 3 staffs per location. I had a talk with him in the EOD.

@aeswibon aeswibon removed the question Further information is requested label Oct 29, 2023
@nihal467
Copy link
Member

@cp-coder don't keep the limitation, remove the maximum limitation

@aeswibon
Copy link
Member Author

@nihal467 I have removed the max limit

@github-actions github-actions bot added the merge conflict pull requests with merge conflict label Oct 31, 2023
@github-actions
Copy link

👋 Hi, @cp-coder,
Conflicts have been detected against the base branch. Please rebase your branch against the base branch.


This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there.

@github-actions github-actions bot added merge conflict pull requests with merge conflict and removed merge conflict pull requests with merge conflict labels Nov 8, 2023
Copy link

github-actions bot commented Nov 9, 2023

👋 Hi, @cp-coder,
Conflicts have been detected against the base branch. Please rebase your branch against the base branch.


This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there.

@nihal467
Copy link
Member

@cp-coder there is a merge conflict and backend require changes

@aeswibon aeswibon removed the merge conflict pull requests with merge conflict label Nov 17, 2023
@aeswibon aeswibon added needs testing and removed changes required merge conflict pull requests with merge conflict labels Jan 3, 2024
@github-actions github-actions bot added the merge conflict pull requests with merge conflict label Jan 4, 2024
Copy link

github-actions bot commented Jan 4, 2024

👋 Hi, @aeswibon,
Conflicts have been detected against the base branch. Please rebase your branch against the base branch.


This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there.

@rithviknishad
Copy link
Member

Marking as hold as the requirements have changed and a more refined feature "User Availability" will be built that adds more depth and it would replace the "Duty Staff for Locations" feature.

Issue: #6968

Copy link

github-actions bot commented Mar 8, 2024

Hi, This pr has been automatically marked as stale because it has not had any recent activity. It will be automatically closed if no further activity occurs for 7 more days. Thank you for your contributions.

@nihal467
Copy link
Member

@rithviknishad can you clear the merge conflict , as there are bigger file changes

@bodhish
Copy link
Member

bodhish commented Sep 20, 2024

Closing this PR due to lack of recent progress.

@bodhish bodhish closed this Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duty doctors and Staff for each Location in a Facility
5 participants