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

made a reusable component for table in routine and nursing care procedures #8608

Open
wants to merge 14 commits into
base: develop
Choose a base branch
from

Conversation

Sahil-Sinha-11
Copy link

@Sahil-Sinha-11 Sahil-Sinha-11 commented Sep 24, 2024

Changes made
fixes: #8562

  1. Added a reusable component.
  2. fixed width of the 2nd column onwards

@ohcnetwork/care-fe-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

@Sahil-Sinha-11 Sahil-Sinha-11 requested a review from a team as a code owner September 24, 2024 09:35
Copy link

netlify bot commented Sep 24, 2024

Deploy Preview for care-ohc ready!

Name Link
🔨 Latest commit 665ad21
🔍 Latest deploy log https://app.netlify.com/sites/care-ohc/deploys/671142f36f5fc70008cf12f1
😎 Deploy Preview https://deploy-preview-8608--care-ohc.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 Sep 24, 2024

image

  • add the translation to the options
  • the dates are shown as invalid under the nursing care section

image

  • as per issue, the first row should be frozen while scrolling, which is still not solved

@Sahil-Sinha-11 @rithviknishad

Comment on lines 13 to 19
const SharedSectionTable: React.FC<SharedSectionTableProps> = ({
data,
rows,
choices = {},
translateKey,
t,
}) => {
Copy link
Member

Choose a reason for hiding this comment

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

  1. Rename this to be LogUpdateAnalayseTable since it's built for it.
  2. use useTranslations instead of passing it as a prop.
  3. i18n suffix LOG_UPDATE_FIELD_LABEL__ is not going to change, so skip passing it as a prop.
Suggested change
const SharedSectionTable: React.FC<SharedSectionTableProps> = ({
data,
rows,
choices = {},
translateKey,
t,
}) => {
const LogUpdateAnalayseTable: React.FC<SharedSectionTableProps> = ({
data,
rows,
choices = {},
}) => {

Copy link
Member

Choose a reason for hiding this comment

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

Let's keep this in ConsultationNursingTab file itself. Keeping one section here and one section in a separate file isn't nice.

@Sahil-Sinha-11
Copy link
Author

Sahil-Sinha-11 commented Sep 27, 2024

Hey @rithviknishad I am not able to find where the dates input for nursing care is . I think the format in which it is entered is giving invalid date. How can I change it? should i change the date format in the logUpdateAnalyseTable itself if it is in other format? 02:18 AM; "15/05/2024" to " 2024-09-20 09:24:23.859000+00:00 "

@Sahil-Sinha-11
Copy link
Author

Sahil-Sinha-11 commented Sep 28, 2024

Hey @rithviknishad I fixed the date issue and fixed the 1st column in in mobile view.

@Sahil-Sinha-11
Copy link
Author

Screenshot 2024-10-06 at 11 56 20 AM Hey @rithviknishad This is how the page looks like , please tell me if I need to change anything.

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

github-actions bot commented Oct 8, 2024

👋 Hi, @Sahil-Sinha-11,
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

nihal467 commented Oct 8, 2024

@Sahil-Sinha-11 fix the lint issue

@nihal467
Copy link
Member

nihal467 commented Oct 8, 2024

LGTM @khavinshankar @rithviknishad @Sahil-Sinha-11 fix the lint issue

@nihal467 nihal467 added tested and removed needs testing merge conflict pull requests with merge conflict labels Oct 8, 2024
Copy link
Member

@khavinshankar khavinshankar left a comment

Choose a reason for hiding this comment

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

@Sahil-Sinha-11 Nice work, some minor changes here and there

const RoutineSection = ({ consultationId }: ConsultationTabProps) => {
const NursingPlot = ({ consultationId }: any) => {
const { t } = useTranslation();
const [results, setResults] = useState<any>({});
Copy link
Member

Choose a reason for hiding this comment

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

try to avoid any as much as possible, please add a valid type here

Copy link
Member

Choose a reason for hiding this comment

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

@Sahil-Sinha-11 the changes look good, just this, can you please replace this any with respective type

Copy link
Member

Choose a reason for hiding this comment

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

Component name does not match the file name

Copy link
Member

Choose a reason for hiding this comment

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

Also let's not keep it in components folder and instead keep it somewhere more appropriate to where it's used as it's a table specific to daily rounds related fields.

Copy link
Author

Choose a reason for hiding this comment

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

Hey @rithviknishad I made the changes.

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.

Enhancements to Nursing tab UI
5 participants