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

Production Release | Dec Week 1 #6796

Merged
merged 24 commits into from
Dec 5, 2023
Merged

Production Release | Dec Week 1 #6796

merged 24 commits into from
Dec 5, 2023

Conversation

gigincg
Copy link
Member

@gigincg gigincg commented Dec 5, 2023

WHAT

🤖[deprecated] Generated by Copilot at b4edef2

This pull request adds, modifies, and deletes several Cypress tests and page objects for the facility features, updates the README.md file, fixes some bugs and UI issues in the facility, consultation, and asset components, and refactors some code for better performance and readability.

Proposed Changes

  • Fixes #issue?
  • Change 1
  • Change 2
  • More?

@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

🤖[deprecated] Generated by Copilot at b4edef2

  • Add a new component for the facility bed capacity, to display and manage the bed types and capacities for a facility (link)
  • Modify the facility card component to use the request function instead of the dispatchAction function, to send notification messages to the facility (link)
  • Remove the import statement for useDispatch from the facility card component, as it was not used (link)
  • Add the import statements for request and routes to the facility card component, to use them for sending notification messages to the facility (link)
  • Remove the dispatchAction variable from the facility card component, as it was not used (link)
  • Modify the discharge modal component to use a TextFormField component with type datetime-local for the discharge date or death date field, to make it more consistent and user-friendly (link)
  • Remove the date field for the discharge date from the discharge modal component for the REF and LAMA discharge reasons, as it was redundant with the previous date field (link)
  • Simplify the label for the discharge notes field in the discharge modal component by using an object lookup instead of multiple conditional expressions, to make it more readable and concise (link)
  • Remove the handleDateChange function from the discharge modal component, as it was replaced by a simpler onChange handler for the discharge date field (link)
  • Remove the commented code for setting the discharge data from the discharge modal component, as it was not needed (link)
  • Remove the import statements for useDispatch and sendNotificationMessages from the discharge modal component, as they were not used (link)
  • Modify the consultation details component to pass the shifting data from the consultation details component to the patient details component as a prop (link)
  • Modify the consultation details component to navigate to the patient notes page if the showPatientNotesPopup flag is true, to handle the case when the notes are not available in the popup (link)
  • Remove the buttons for discharge summary and discharge from care from the consultation details component, as they were moved to the patient details component (link)
  • Remove the button for track shifting or shift patient from the consultation details component, as it was moved to the patient details component (link)
  • Remove the DischargeSummaryModal and DischargeModal components from the consultation details component, as they were not used (link)
  • Remove the hasActiveShiftingRequest function from the consultation details component, as it was not used (link)
  • Remove the state variables for openDischargeSummaryDialog and openDischargeDialog from the consultation details component, as they were not used (link)
  • Remove the useTranslation hook from the consultation details component, as it was not used (link)
  • Remove the import statements for ButtonV2, Cancel, Submit, CareIcon, DischargeModal, and DischargeSummaryModal from the consultation details component, as they were not used (link)
  • Modify the consultation form component to check if the admission date is before 01/01/2000, and set an error message if so, to validate the admission date input (link)
  • Modify the feed component to change the facilityMiddlewareHostname variable from a let to a state variable, to trigger a re-render when it changes (link)
  • Modify the add inventory form component to check if the user has selected grams as unit, and convert it to kg before submitting the form, to match the updated UI and API for the unit options (link)
  • Modify the add inventory form component to change the unitName comparison from Gram to gram, to match the updated UI for the unit options (link)
  • Modify the result list component to move the label for the phone number field from a separate div to the PhoneNumberFormField component, to make it more consistent and compact (link)
  • Modify the location select component to make the errors property optional for the LocationSelectProps interface, to avoid passing an empty string when there are no errors (link)
  • Add a new property to the AssetLocationObject interface, to store the middleware address of the asset location (link)
  • Modify the tooltip-text class to adjust the position and width of the tooltip for the ABDM health facility, to make it more visible and readable (link, link)
  • Remove the getDimensionOrDash function from the utils file, as it was not used anywhere in the codebase (link)
  • Change the bed type constants to remove the Non-Covid prefix, to match the updated UI for the bed types (link)
  • Change the Cypress Tests badge in the README file to use a custom endpoint from Cypress Dashboard instead of GitHub Actions, to show the latest test results and status more accurately (link)
  • Change the username for the staging API credentials in the README file from devdistrictadmin to dev-districtadmin, to match the updated credentials in the backend (link)
  • Modify the clickDischargePatient method in the patient consultation page object to click the show-more button and then click the discharge from care option, to match the updated UI for the discharge modal (link)
  • Add new methods to the facility creation page object to check the visibility of the selectBedType and areaOfSpecialization elements, to use them for the bed capacity and doctor capacity validation tests (link, link)
  • Add new methods to the facility creation page object to fill the B, C, and D type cylinder capacities and expected requirements, to use them for the facility creation test with oxygen and cylinder details (link)
  • Add new methods to the facility creation page object to get the elements for the total bed capacity, total doctor capacity, facility name, address, phone number, available features, and oxygen info, to use them for the facility creation and update verification tests (link)
  • Add new methods to the facility creation page object to scroll to the facility triage section, fill the triage entry fields, fill the entry date, click the edit button, click the buttons multiple times, verify the triage table contains a value, click the add facility triage button, and click the facility feature option, to use them for the facility triage test (link)
  • Add new methods to the facility creation page object to verify the state, district, and facility type badge content, to use them for the advanced filter test (link)
  • Modify the clickUpdateFacilityType method in the facility creation page object to take a facilityType parameter, to make it more reusable and dynamic for different facility types (link)
  • Add a new import statement for the UserPage page object to the facility homepage test file, to use its methods for the facility homepage test (link)
  • Add three new constants for the state, district, and facility type values to the facility homepage test file, to use them for the advanced filter test (link)
  • Add a new test case for the advanced filter functionality to the facility homepage test file, to verify that the user can filter the facilities by state, district, and facility type, and clear the filters (link)
  • Add a new Cypress test file for the facility creation feature, to test the functionality of adding, updating, deleting, and filtering facilities with different bed and doctor capacities, oxygen and cylinder capacities, and triage entries (link)
  • Delete the file cypress/e2e/facility_spec/facility.cy.ts, as it was replaced by the new facility creation test file (link)

sriharsh05 and others added 24 commits November 29, 2023 10:21
…lyHome and FacilityUsers (#6575)

* replace useDispatch with useQuery and request in facilityCard, facilityHome and facilityUsers

* remove delete model and let useQuery handel delete response

* remove unused useStates variables in FacilityUsers

* replace useState variables with useQuery variables and also replaced useEffect with useQuery

* handle loading states

* Implemented a dedicated component for the triage table in FacilityHome

* Implemented a dedicated component for the doctor list in FacilityHome

* implemeted a dedicated component for bed capacity in facility home

* remove trailing slash

* Removed unused fire requests

* Fix deleting bed and doctor capacity bug and remove redundant code

* fix doctor capacity total count bug

---------

Co-authored-by: Rithvik Nishad <[email protected]>
* changed bed type text in constants file

* made corresponding change in cypress test

---------

Co-authored-by: Rithvik Nishad <[email protected]>
* Rearranging buttons in the Patient consultation

* fix discharge patient cypress

* Remove unused imports in ConsultationDetails
component
* Hide KASP Advance Filter

* removed KASP Advance Filter

* removed unused filter
* make error optional and render only when required

* fix markup and remove unnecessary tw classes

* hide location filter if facility is not selected

* revert changes to error component
* showing errors wrong number in PhoneNumberFormField

* made error field show only when there is an error

* Update src/Components/Form/FormFields/FormField.tsx

Co-authored-by: Rithvik Nishad <[email protected]>

* changed margin to remove extra space in userfilter

* Apply suggestions from code review

---------

Co-authored-by: Rithvik Nishad <[email protected]>
* Adds support for capturing time in Discharge Date

* Refactor discharge form field labels and add
conditional rendering for death-related fields

* show time in patient card

* fix minor issue

* fix discharge prescriptions being shown
* Update tooltip position in ConfigureHealthFacility
component

* Update tooltip positioning in
ConfigureHealthFacility component
…lity Tab (#6785)

* Inital File Change

* revert vite

* Final converted remaining test part

* minor fix

* minor fix component change
* facility update

* minor fix

* Facility Triage Test
@gigincg gigincg requested a review from a team as a code owner December 5, 2023 07:56
Copy link

netlify bot commented Dec 5, 2023

Deploy Preview for care-egov-staging ready!

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

Copy link

vercel bot commented Dec 5, 2023

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

Name Status Preview Updated (UTC)
care-storybook ✅ Ready (Inspect) Visit Preview Dec 5, 2023 7:56am

@gigincg gigincg merged commit cfe74b8 into master Dec 5, 2023
35 of 40 checks passed
Copy link

github-actions bot commented Dec 5, 2023

@gigincg We truly appreciate your efforts. Thank you for taking the time to contribute; this is a very valuable contribution to us 🥇. We always welcome your contribution 🙂, so feel free to contribute to anything anytime, and never lose that spirit of innovation 🙌.

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

Successfully merging this pull request may close these issues.

9 participants