Skip to content

Commit

Permalink
(feat) O3-4044 Ward App - use vertical tiling for ward patient cards
Browse files Browse the repository at this point in the history
  • Loading branch information
chibongho committed Nov 15, 2024
1 parent 38d415f commit 6180999
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
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;

0 comments on commit 6180999

Please sign in to comment.