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

(feat) O3-4044 Ward App - use vertical tiling for ward patient cards #1377

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions packages/esm-ward-app/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,4 @@ export function startupApp() {
'Bed management module',
'Enables features related to bed management / assignment. Requires the backend bed management module to be installed.',
);

registerFeatureFlag(
'ward-view-vertical-tiling',
'Ward view vertical tiling',
'Enable tiling of bed cards vertically in the ward view.',
);
}
3 changes: 1 addition & 2 deletions packages/esm-ward-app/src/ward-view/ward-view.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ const WardView: React.FC<{}> = () => {
const { t } = useTranslation();

const locationUuid = location?.uuid;
const isVertical = useFeatureFlag('ward-view-vertical-tiling');
const wardConfig = useWardConfig(locationUuid);

if (isLoadingLocation) {
Expand All @@ -27,7 +26,7 @@ const WardView: React.FC<{}> = () => {
const wardId = wardConfig.id;

return (
<div className={classNames(styles.wardView, { [styles.verticalTiling]: isVertical })}>
<div className={classNames(styles.wardView, styles.verticalTiling)}>
<ExtensionSlot name={wardId} />
</div>
);
Expand Down
9 changes: 4 additions & 5 deletions packages/esm-ward-app/src/ward-view/ward.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@ import styles from './ward-view.scss';
const Ward = ({ wardBeds, wardUnassignedPatients }: { wardBeds: ReactNode; wardUnassignedPatients: ReactNode }) => {
const { location } = useWardLocation();
const { t } = useTranslation();
const isVertical = useFeatureFlag('ward-view-vertical-tiling');

const {wardPatientGroupDetails} = useAppContext<WardViewContext>('ward-view-context') ?? {};
const { wardPatientGroupDetails } = useAppContext<WardViewContext>('ward-view-context') ?? {};
const { bedLayouts } = wardPatientGroupDetails ?? {};
const { isLoading: isLoadingAdmissionLocation, error: errorLoadingAdmissionLocation } =
wardPatientGroupDetails?.admissionLocationResponse ?? {};
wardPatientGroupDetails?.admissionLocationResponse ?? {};
const {
isLoading: isLoadingInpatientAdmissions,
error: errorLoadingInpatientAdmissions,
Expand Down Expand Up @@ -56,7 +55,7 @@ const Ward = ({ wardBeds, wardUnassignedPatients }: { wardBeds: ReactNode; wardU
if (!wardPatientGroupDetails) return <></>;

return (
<div className={classNames(styles.wardViewMain, { [styles.verticalTiling]: isVertical })}>
<div className={classNames(styles.wardViewMain, styles.verticalTiling)}>
{wardBeds}
{bedLayouts?.length == 0 && isBedManagementModuleInstalled && (
<InlineNotification
Expand Down Expand Up @@ -103,4 +102,4 @@ const EmptyBeds = () => {
);
};

export default Ward;
export default Ward;
Loading