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

Move the tabs implementation in the commons-lib -cacx #1894

Merged
merged 7 commits into from
Jul 4, 2024

Conversation

lucyjemutai
Copy link
Contributor

Requirements

  • This PR has a title that briefly describes the work done including the ticket number. If there is a ticket, make sure your PR title includes the ticket number in the format OHRI-123 My PR title.
  • My work includes tests or is validated by existing tests.

Summary

Move the tabs implementation in the commons-lib -cacx module

Screenshots

Related Issue

Other

@lucyjemutai lucyjemutai marked this pull request as ready for review July 3, 2024 05:13
@lucyjemutai
Copy link
Contributor Author

Please test this locally. @hadijahkyampeire , @CynthiaKamau

Copy link
Contributor

@hadijahkyampeire hadijahkyampeire left a 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.

Copy link
Contributor

@hadijahkyampeire hadijahkyampeire left a 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

@hadijahkyampeire
Copy link
Contributor

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();
Copy link
Contributor

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} />;
Copy link
Contributor

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

Copy link
Contributor

@hadijahkyampeire hadijahkyampeire left a comment

Choose a reason for hiding this comment

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

LGTM thanks @lucyjemutai

@hadijahkyampeire hadijahkyampeire merged commit a5b1671 into UCSF-IGHS:dev Jul 4, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants