-
Notifications
You must be signed in to change notification settings - Fork 412
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
base: develop
Are you sure you want to change the base?
made a reusable component for table in routine and nursing care procedures #8608
Conversation
✅ Deploy Preview for care-ohc ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
const SharedSectionTable: React.FC<SharedSectionTableProps> = ({ | ||
data, | ||
rows, | ||
choices = {}, | ||
translateKey, | ||
t, | ||
}) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Rename this to be
LogUpdateAnalayseTable
since it's built for it. - use
useTranslations
instead of passing it as a prop. - i18n suffix
LOG_UPDATE_FIELD_LABEL__
is not going to change, so skip passing it as a prop.
const SharedSectionTable: React.FC<SharedSectionTableProps> = ({ | |
data, | |
rows, | |
choices = {}, | |
translateKey, | |
t, | |
}) => { | |
const LogUpdateAnalayseTable: React.FC<SharedSectionTableProps> = ({ | |
data, | |
rows, | |
choices = {}, | |
}) => { |
There was a problem hiding this comment.
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.
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 " |
Hey @rithviknishad I fixed the date issue and fixed the 1st column in in mobile view. |
Hey @rithviknishad This is how the page looks like , please tell me if I need to change anything. |
👋 Hi, @Sahil-Sinha-11, This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there. |
@Sahil-Sinha-11 fix the lint issue |
LGTM @khavinshankar @rithviknishad @Sahil-Sinha-11 fix the lint issue |
There was a problem hiding this 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
src/Components/Facility/ConsultationDetails/ConsultationNursingTab.tsx
Outdated
Show resolved
Hide resolved
const RoutineSection = ({ consultationId }: ConsultationTabProps) => { | ||
const NursingPlot = ({ consultationId }: any) => { | ||
const { t } = useTranslation(); | ||
const [results, setResults] = useState<any>({}); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
src/Components/Facility/Consultations/components/SharedTable.tsx
Outdated
Show resolved
Hide resolved
src/Components/Facility/Consultations/components/SharedTable.tsx
Outdated
Show resolved
Hide resolved
src/Components/Facility/Consultations/components/SharedTable.tsx
Outdated
Show resolved
Hide resolved
…gTab.tsx Co-authored-by: Khavin Shankar <khavinshankar@gmail.com>
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Changes made
fixes: #8562
@ohcnetwork/care-fe-code-reviewers
Merge Checklist