-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
76 changed files
with
1,511 additions
and
1,167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
packages/esm-ward-app/src/beds/unassigned-patient.component.tsx
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import React, { type ReactNode } from 'react'; | ||
import { type Bed } from '../types'; | ||
import EmptyBed from './empty-bed.component'; | ||
import styles from './ward-bed.scss'; | ||
import { useTranslation } from 'react-i18next'; | ||
import { Tag } from '@carbon/react'; | ||
|
||
export interface WardBedProps { | ||
patientCards: Array<ReactNode>; | ||
bed: Bed; | ||
} | ||
|
||
const WardBed: React.FC<WardBedProps> = ({ bed, patientCards }) => { | ||
return patientCards?.length > 0 ? <OccupiedBed bed={bed} patientCards={patientCards} /> : <EmptyBed bed={bed} />; | ||
}; | ||
|
||
const OccupiedBed: React.FC<WardBedProps> = ({ patientCards }) => { | ||
// interlace patient card with bed dividers between each of them | ||
const patientCardsWithDividers = patientCards.flatMap((patientCard, index) => { | ||
if (index == 0) { | ||
return [patientCard]; | ||
} else { | ||
return [<BedShareDivider key={'divider-' + index} />, patientCard]; | ||
} | ||
}); | ||
|
||
return <div className={styles.occupiedBed}>{patientCardsWithDividers}</div>; | ||
}; | ||
|
||
const BedShareDivider = () => { | ||
const { t } = useTranslation(); | ||
return ( | ||
<div className={styles.bedDivider}> | ||
<div className={styles.bedDividerLine}></div> | ||
<Tag>{t('bedShare', 'Bed share')}</Tag> | ||
<div className={styles.bedDividerLine}></div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default WardBed; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
@use '@carbon/layout'; | ||
@use '@openmrs/esm-styleguide/src/vars'; | ||
@use '@carbon/type'; | ||
|
||
.occupiedBed { | ||
display: flex; | ||
flex-direction: column; | ||
background-color: vars.$ui-02; | ||
height: fit-content; | ||
} | ||
|
||
.bedDivider { | ||
background-color: vars.$ui-02; | ||
color: vars.$text-02; | ||
padding: layout.$spacing-01; | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
} | ||
|
||
.bedDividerLine { | ||
height: 1px; | ||
background-color: vars.$ui-05; | ||
width: 30%; | ||
} | ||
.emptyBed { | ||
display: flex; | ||
gap: layout.$spacing-04; | ||
justify-content: center; | ||
align-items: center; | ||
border: 1px dashed vars.$ui-04; | ||
padding: layout.$spacing-03 layout.$spacing-04; | ||
height: fit-content; | ||
} | ||
|
||
.emptyBed:hover:not(.skeleton) { | ||
border: 1px solid transparent; | ||
box-shadow: inset 0px 0px 0px 2px vars.$color-blue-60-2; | ||
cursor: pointer; | ||
} | ||
|
||
.emptyBedText { | ||
@include type.type-style('heading-compact-01'); | ||
color: vars.$text-02; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 0 additions & 9 deletions
9
packages/esm-ward-app/src/config-schema-admission-request-note.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.