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

Issues/7350/log update consistency #8278

Conversation

renoseHarsh
Copy link
Contributor

@renoseHarsh renoseHarsh commented Aug 8, 2024

Proposed Changes

Screenshot 2024-08-09 at 12 43 28 AM
  • In the patient dashboard src/CAREUI/display/Timeline.tsx added a check to see if the current Timeine is for "daily round" If yes change it to "log update".
2
  • For Notification Title changed the NOTIFICATION_EVENTS in src/Common/constants.tsx
  • For Notification Description added a loop to go through incoming API call results in src/Components/Notifications/NotificationsList.tsx and change messages from 'consultation' to 'log'
Screenshot 2024-08-09 at 12 19 24 AM
  • For viewing saved log updates changed "Consultation Update" to "Log Update" in file src/Components/CriticalCareRecording/CriticalCare__Index.res
Screenshot 2024-08-09 at 12 33 14 AM
  • For breadcrumbs added mapping for "daily-round" to "Log Update" in src/Components/Common/Breadcrumbs.tsx
  • For Title changed "Consultation" to "Log"
Screenshot 2024-08-09 at 12 36 09 AM

@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

@renoseHarsh renoseHarsh requested a review from a team as a code owner August 8, 2024 19:13
Copy link

vercel bot commented Aug 8, 2024

@renoseHarsh is attempting to deploy a commit to the Open Healthcare Network Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

netlify bot commented Aug 8, 2024

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit 85523c8
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/66b518c2b6f4230008c51803
😎 Deploy Preview https://deploy-preview-8278--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.

Comment on lines +55 to +58
let newName: string | null = null;
if (props.name === "daily round details Event") {
newName = props.name.replace("daily round", "log update");
}
Copy link
Member

Choose a reason for hiding this comment

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

This is not the right way to solve the problem.

It should instead be changed in the props passed to this component.

Reusable components such as these should not contain any implementation specific to a particular usage.

@@ -13,6 +13,7 @@ const MENU_TAGS: { [key: string]: string } = {
external_results: "External Results",
users: "Users",
notice_board: "Notice Board",
"daily-rounds": "Log Update",
Copy link
Member

Choose a reason for hiding this comment

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

Change the URL's path param itself instead

Suggested change
"daily-rounds": "Log Update",

Comment on lines +354 to +370
"PATIENT_CONSULTATION_UPDATED",
"PATIENT_CONSULTATION_UPDATE_CREATED",
"PATIENT_CONSULTATION_UPDATE_UPDATED",
"PATIENT_CONSULTATION_CREATED",
];
const modifiedData = res.data.results.map((notification: any) => {
if (toChangeId.includes(notification.event)) {
return {
...notification,
message: notification.message.replace(
"Consultation",
"Log Updates",
),
};
} else {
return notification;
}
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't seem to be the right way to do it.

Why is patient consultation created event being renamed to log update? Consultation creation is not relevant to log updates right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can you clarify if the way I am modifying data is wrong or is it just the part that I have 'PATIENT_CONSULTATION_CREATED' in toChangeId wrong?

Copy link
Member

Choose a reason for hiding this comment

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

Consultation Create notification message need not be replaced with log updates right?

@@ -113,7 +113,7 @@ let make = (
<div>
<div
className="bg-white px-2 md:px-6 py-5 border-b border-secondary-200 sm:px-6 max-w-5xl mx-auto border mt-4 shadow rounded-lg">
<h1 className="text-4xl sm:text-5xl"> {str("Consultation Update")} </h1>
<h1 className="text-4xl sm:text-5xl"> {str("Log Update")} </h1>
Copy link
Member

Choose a reason for hiding this comment

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

Why wrap it in str(...)?

Suggested change
<h1 className="text-4xl sm:text-5xl"> {str("Log Update")} </h1>
<h1 className="text-4xl sm:text-5xl">Log Update</h1>

@rithviknishad
Copy link
Member

@renoseHarsh It'd be great if you could give a more meaningful title for the PR 😄

@renoseHarsh
Copy link
Contributor Author

Thank you for the feedback. I will make the necessary changes accordingly.

@renoseHarsh renoseHarsh closed this Aug 9, 2024
@renoseHarsh renoseHarsh deleted the issues/7350/log-update-consistency branch August 9, 2024 05:01
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Log Update"- consistency in terminology
3 participants