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

Fixes date time initial value formatting for Log update measured at, Discharge (death date time) and Bed start date time #5927

Merged
merged 1 commit into from
Jul 27, 2023

Conversation

rithviknishad
Copy link
Member

@rithviknishad rithviknishad commented Jul 26, 2023

WHAT

🤖 Generated by Copilot at 3b6492f

The pull request updates several components in the src/Components/Facility and src/Components/Patient directories to use moment library for date and time formatting. This improves the code readability, consistency, and compatibility. It also fixes some UI and data issues in the DischargeModal and ConsultationForm components.

Proposed Changes

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

HOW

🤖 Generated by Copilot at 3b6492f

  • Use moment library to format date and time values consistently and compatibly across different browsers and time zones (link, link, link, link, link)
  • Remove unused formatDateTime function from Beds component (link)
  • Make discharge_date, death_datetime, and death_confirmed_doctor fields optional instead of nullable in PreDischargeFormInterface and IProps interfaces in DischargeModal.tsx to avoid sending null values to the backend API (link, link)
  • Use undefined instead of null as the initial value of death_confirmed_doctor field in preDischargeForm state in DischargeModal.tsx for the same reason as above (link)
  • Use TextFormField component to render the input for death_datetime field in DischargeModal.tsx to ensure consistency and reusability of the UI components and to leverage the props and validations provided by the component (link)

@rithviknishad rithviknishad added urgent needs testing P1 breaking issue or vital feature labels Jul 26, 2023
@rithviknishad rithviknishad requested a review from a team July 26, 2023 07:01
@rithviknishad rithviknishad requested a review from a team as a code owner July 26, 2023 07:01
@vercel
Copy link

vercel bot commented Jul 26, 2023

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

Name Status Preview Updated (UTC)
care-storybook ✅ Ready (Inspect) Visit Preview Jul 26, 2023 7:01am

@netlify
Copy link

netlify bot commented Jul 26, 2023

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit 3b6492f
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/64c0c4dc5cde650008b8f6d0
😎 Deploy Preview https://deploy-preview-5927--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

LGTM

@khavinshankar khavinshankar merged commit 89aa07f into develop Jul 27, 2023
29 checks passed
@khavinshankar khavinshankar deleted the fix-date-time-textinput-value-formatting branch July 27, 2023 04:32
@github-actions
Copy link

@rithviknishad 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
cypress passed P1 breaking issue or vital feature tested urgent
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Log update date and time field is malfunctioning
3 participants