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 location type to location form #6592

Merged
merged 4 commits into from
Dec 11, 2023

Conversation

GokulramGHV
Copy link
Member

@GokulramGHV GokulramGHV commented Nov 13, 2023

WHAT

🤖 Generated by Copilot at a0f328d

This pull request adds a new feature to categorize asset locations by type, such as ward, ICU, or pharmacy. It modifies the AssetTypes.tsx file to define the types and the AddLocationForm.tsx file to enable the user input and the API integration. This feature may improve the asset management and allocation in the facility.

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

HOW

🤖 Generated by Copilot at a0f328d

  • Add a new enum type AssetLocationType to define the possible types of locations where assets can be stored (link)
  • Add a new property location_type to the interface AssetLocationObject to store the type of location as an AssetLocationType value (link)
  • Import the SelectFormField component and the AssetLocationType enum to use them in the AddLocationForm component (link)
  • Add a new state variable and a new error field for the location type input in the AddLocationForm component (link)
  • Set the initial value of the location type input to the existing location type or an empty string depending on the mode of the form (link)
  • Add a new validation check for the location type input to ensure that it is not empty and set the corresponding error message (link)
  • Add the location type property to the initial and final payload objects for the API request to create or update a location (link, link)
  • Add a new SelectFormField component to the AddLocationForm component to render a dropdown menu for the user to select the location type from the predefined options and pass the relevant props to the component (link)

@GokulramGHV GokulramGHV requested a review from a team November 13, 2023 10:13
@GokulramGHV GokulramGHV requested a review from a team as a code owner November 13, 2023 10:13
@GokulramGHV GokulramGHV requested a review from bodhish November 13, 2023 10:13
Copy link

vercel bot commented Nov 13, 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 Dec 9, 2023 11:39am

Copy link

netlify bot commented Nov 13, 2023

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit 95d0cc6
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/657451b5f15b080008197a28
😎 Deploy Preview https://deploy-preview-6592--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

nihal467 commented Nov 20, 2023

@GokulramGHV @rithviknishad

  • all the existing location are marked as location type as "Other" , was it intentional ?
    image
  • Add a badge or suitable element to the UI to display the existing location type. Currently, without opening each location, it's difficult to determine the assigned location type. ( Get the UI approved in EOD Call )
  • Currently we have location name, location description, middleware address, buttons, location type are been shown in this place, so better make a mock UI for this page, along with that, we can show Created date and modified date to this UI

image

  • as per issue, this is not a mandatory field, so was it intentional ?

@nihal467
Copy link
Member

nihal467 commented Nov 27, 2023

@GokulramGHV as per the latest discussion work only on the below things :

  • Create a badge to show location type in the location list page
  • create a mock up entire UI of the location list where location name, location description, middleware address, buttons, location type, created date and modified date

Discussion note on 27/11/2023 - Engineering Call

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

github-actions bot commented Dec 1, 2023

👋 Hi, @GokulramGHV,
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 removed the merge conflict pull requests with merge conflict label Dec 7, 2023
@nihal467
Copy link
Member

nihal467 commented Dec 11, 2023

LGTM, will take up the UI as a separate issue

@khavinshankar khavinshankar merged commit 05549b5 into ohcnetwork:develop Dec 11, 2023
27 of 36 checks passed
@nihal467 nihal467 mentioned this pull request Dec 11, 2023
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs testing P1 breaking issue or vital feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Classifying location as an ICU or Ward for a Location
4 participants