-
Notifications
You must be signed in to change notification settings - Fork 40
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
Move the tabs implementation in the commons-lib -cacx #1894
Conversation
Please test this locally. @hadijahkyampeire , @CynthiaKamau |
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.
Thanks @lucyjemutai, so what needs to be done is, make a reusable component in the commons lib which we shall use for all Encounter list tabs and it should handle all the logic of getting tabs, it should only take in the json config and the package default config.
...s/esm-cervical-cancer-app/src/cervical-cancer/cacx-visits/cacx-visits-services.component.tsx
Outdated
Show resolved
Hide resolved
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.
Sorry @lucyjemutai for the earlier review, I had seen as if it was in cacx, code looks good but we need to move the tab variable logic to this new component
...s/esm-cervical-cancer-app/src/cervical-cancer/cacx-visits/cacx-visits-services.component.tsx
Outdated
Show resolved
Hide resolved
Maybe we should name the folder encounter-list-tabs and also name the component and scss file accordingly. |
} | ||
|
||
export const TabsComponent: React.FC<TabsComponentProps> = ({ patientUuid, configSchema }) => { | ||
const config = useConfig(); |
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.
This will not work because at this point the config is for the commons lib, we need to pass the config at the package/app level since the configs are different across packages.
</Tabs> | ||
</div> | ||
); | ||
return <TabsComponent patientUuid={patientUuid} configSchema={cacxConfigSchema} />; |
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.
The package config should also be passed at this point
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.
LGTM thanks @lucyjemutai
Requirements
OHRI-123 My PR title
.Summary
Move the tabs implementation in the commons-lib -cacx module
Screenshots
Related Issue
Other