@kenyaemr/esm-bed-management-app 1.0.1-pre.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +12 -0
- package/.eslintignore +2 -0
- package/.eslintrc +37 -0
- package/.husky/pre-commit +4 -0
- package/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/vcs.xml +6 -0
- package/.prettierignore +14 -0
- package/.turbo.json +18 -0
- package/.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs +541 -0
- package/.yarn/plugins/@yarnpkg/plugin-version.cjs +550 -0
- package/.yarn/versions/6816f0d4.yml +0 -0
- package/LICENSE +373 -0
- package/README.md +40 -0
- package/dist/187.js +1 -0
- package/dist/187.js.map +1 -0
- package/dist/207.js +1 -0
- package/dist/207.js.map +1 -0
- package/dist/26.js +2 -0
- package/dist/26.js.LICENSE.txt +32 -0
- package/dist/26.js.map +1 -0
- package/dist/283.js +1 -0
- package/dist/283.js.map +1 -0
- package/dist/294.js +2 -0
- package/dist/294.js.LICENSE.txt +9 -0
- package/dist/294.js.map +1 -0
- package/dist/330.js +2 -0
- package/dist/330.js.LICENSE.txt +44 -0
- package/dist/330.js.map +1 -0
- package/dist/352.js +1 -0
- package/dist/352.js.map +1 -0
- package/dist/404.js +1 -0
- package/dist/404.js.map +1 -0
- package/dist/455.js +2 -0
- package/dist/455.js.LICENSE.txt +9 -0
- package/dist/455.js.map +1 -0
- package/dist/558.js +2 -0
- package/dist/558.js.LICENSE.txt +14 -0
- package/dist/558.js.map +1 -0
- package/dist/574.js +1 -0
- package/dist/629.js +1 -0
- package/dist/629.js.map +1 -0
- package/dist/707.js +1 -0
- package/dist/707.js.map +1 -0
- package/dist/800.js +2 -0
- package/dist/800.js.LICENSE.txt +3 -0
- package/dist/800.js.map +1 -0
- package/dist/884.js +1 -0
- package/dist/884.js.map +1 -0
- package/dist/933.js +1 -0
- package/dist/933.js.map +1 -0
- package/dist/959.js +1 -0
- package/dist/959.js.map +1 -0
- package/dist/esm-kenyaemr-bed-management-app.js +1 -0
- package/dist/esm-kenyaemr-bed-management-app.js.buildmanifest.json +532 -0
- package/dist/esm-kenyaemr-bed-management-app.js.map +1 -0
- package/dist/main.js +1 -0
- package/dist/main.js.map +1 -0
- package/dist/routes.json +1 -0
- package/i18next-parser.config.js +89 -0
- package/jest.config.js +0 -0
- package/package.json +112 -0
- package/src/__mocks__/react-i18next.js +55 -0
- package/src/admin-card-link.component.tsx +27 -0
- package/src/assets/landing-page.png +0 -0
- package/src/assets/logo.svg +1 -0
- package/src/bed-administration/bed-administration-form.component.tsx +326 -0
- package/src/bed-administration/bed-administration-form.scss +0 -0
- package/src/bed-administration/bed-administration-table.component.tsx +317 -0
- package/src/bed-administration/bed-administration-table.scss +112 -0
- package/src/bed-administration/bed-administration-types.ts +12 -0
- package/src/bed-administration/bed-administration.resource.ts +59 -0
- package/src/bed-administration/edit-bed-form.component.tsx +100 -0
- package/src/bed-administration/new-bed-form.component.tsx +112 -0
- package/src/bed-admission/active-patients/active-patients-table.component.tsx +299 -0
- package/src/bed-admission/active-patients/active-visits.resource.ts +171 -0
- package/src/bed-admission/active-patients/admission-action-button-styles.scss +0 -0
- package/src/bed-admission/active-patients/admission-action-button.component.tsx +26 -0
- package/src/bed-admission/active-patients/index.tsx +15 -0
- package/src/bed-admission/active-patients/patient-queues.resource.ts +136 -0
- package/src/bed-admission/active-patients/styles.scss +284 -0
- package/src/bed-admission/active-patients/view-action-menu.component.tsx +33 -0
- package/src/bed-admission/admitted-patients/active-admissions.resource.ts +121 -0
- package/src/bed-admission/admitted-patients/admitted-patients-table.component.tsx +280 -0
- package/src/bed-admission/admitted-patients/admitted-patients.component.tsx +22 -0
- package/src/bed-admission/admitted-patients/location-combo-box.component.tsx +55 -0
- package/src/bed-admission/admitted-patients/styles.scss +284 -0
- package/src/bed-admission/bed-admission-tabs-styles.scss +30 -0
- package/src/bed-admission/bed-admission-tabs.component.tsx +69 -0
- package/src/bed-admission/bed-admission.component.tsx +15 -0
- package/src/bed-admission/bed-admission.resource.ts +35 -0
- package/src/bed-admission/bed-layout/bed-layout-list.component.tsx +101 -0
- package/src/bed-admission/bed-layout/bed-layout.component.tsx +64 -0
- package/src/bed-admission/bed-layout/bed-layout.scss +118 -0
- package/src/bed-admission/bed-layout/min-bed-layout.component.tsx +26 -0
- package/src/bed-admission/createDashboardLink.tsx +47 -0
- package/src/bed-admission/discharged-patients/discharged-patients.componet.tsx +19 -0
- package/src/bed-admission/helpers/functions.ts +102 -0
- package/src/bed-admission/types.ts +133 -0
- package/src/config-schema.ts +21 -0
- package/src/declarations.d.ts +7 -0
- package/src/empty-state/empty-state.component.tsx +69 -0
- package/src/empty-state/empty-state.scss +62 -0
- package/src/header/header.component.tsx +51 -0
- package/src/header/header.scss +72 -0
- package/src/header/illustration.component.tsx +13 -0
- package/src/home.component.tsx +15 -0
- package/src/home.scss +5 -0
- package/src/index.ts +65 -0
- package/src/left-panel/left-panel.component.tsx +33 -0
- package/src/left-panel/left-panel.scss +41 -0
- package/src/left-panel-link.component.tsx +49 -0
- package/src/root.component.tsx +35 -0
- package/src/root.scss +11 -0
- package/src/routes.json +46 -0
- package/src/setup-tests.ts +1 -0
- package/src/summary/summary.component.tsx +74 -0
- package/src/summary/summary.resource.ts +123 -0
- package/src/summary/summary.scss +72 -0
- package/src/types.ts +152 -0
- package/src/ward-card/ward-card.component.tsx +41 -0
- package/src/ward-card/ward-card.scss +51 -0
- package/src/ward-with-beds/ward-with-beds.component.tsx +186 -0
- package/src/ward-with-beds/ward-with-beds.scss +27 -0
- package/src/workspace/allocate-bed-workspace.component.tsx +141 -0
- package/src/workspace/allocate-bed.scss +117 -0
- package/src/workspace/overlay.component.tsx +55 -0
- package/src/workspace/overlay.scss +96 -0
- package/translations/en.json +7 -0
- package/tsconfig.json +23 -0
- package/webpack.config.js +1 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Button, Header } from "@carbon/react";
|
|
3
|
+
import { ArrowLeft, Close } from "@carbon/react/icons";
|
|
4
|
+
import { isDesktop, useLayoutType } from "@openmrs/esm-framework";
|
|
5
|
+
import styles from "./overlay.scss";
|
|
6
|
+
import { useTranslation } from "react-i18next";
|
|
7
|
+
|
|
8
|
+
interface OverlayProps {
|
|
9
|
+
closePanel: () => void;
|
|
10
|
+
header: string;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const Overlay: React.FC<OverlayProps> = ({ closePanel, children, header }) => {
|
|
15
|
+
const layout = useLayoutType();
|
|
16
|
+
const { t } = useTranslation();
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<div
|
|
20
|
+
className={
|
|
21
|
+
isDesktop(layout) ? styles.desktopOverlay : styles.tabletOverlay
|
|
22
|
+
}
|
|
23
|
+
>
|
|
24
|
+
{isDesktop(layout) ? (
|
|
25
|
+
<div className={styles.desktopHeader}>
|
|
26
|
+
<div className={styles.headerContent}>{header}</div>
|
|
27
|
+
<Button
|
|
28
|
+
className={styles.closePanelButton}
|
|
29
|
+
onClick={closePanel}
|
|
30
|
+
kind="ghost"
|
|
31
|
+
hasIconOnly
|
|
32
|
+
renderIcon={(props) => <Close size={16} {...props} />}
|
|
33
|
+
iconDescription={t("closeOverlay", "Close overlay")}
|
|
34
|
+
/>
|
|
35
|
+
</div>
|
|
36
|
+
) : (
|
|
37
|
+
<Header
|
|
38
|
+
aria-label="Tablet overlay"
|
|
39
|
+
className={styles.tabletOverlayHeader}
|
|
40
|
+
>
|
|
41
|
+
<Button
|
|
42
|
+
onClick={closePanel}
|
|
43
|
+
hasIconOnly
|
|
44
|
+
renderIcon={(props) => <ArrowLeft size={16} {...props} />}
|
|
45
|
+
iconDescription={t("closeOverlay", "Close overlay")}
|
|
46
|
+
/>
|
|
47
|
+
<div className={styles.headerContent}>{header}</div>
|
|
48
|
+
</Header>
|
|
49
|
+
)}
|
|
50
|
+
{children}
|
|
51
|
+
</div>
|
|
52
|
+
);
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export default Overlay;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
@use '@carbon/styles/scss/spacing';
|
|
2
|
+
@use '@carbon/styles/scss/type';
|
|
3
|
+
@import '~@openmrs/esm-styleguide/src/vars';
|
|
4
|
+
@import '../root.scss';
|
|
5
|
+
|
|
6
|
+
.desktopOverlay {
|
|
7
|
+
position: fixed;
|
|
8
|
+
top: spacing.$spacing-09;
|
|
9
|
+
width: 37rem;
|
|
10
|
+
right: 0;
|
|
11
|
+
bottom: 0;
|
|
12
|
+
border-left: 1px solid $text-03;
|
|
13
|
+
background-color: $ui-01;
|
|
14
|
+
overflow-y: auto;
|
|
15
|
+
height: calc(100vh - 3rem);
|
|
16
|
+
z-index: 99999;
|
|
17
|
+
display: grid;
|
|
18
|
+
grid-template-rows: 1fr auto;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.desktopOverlay::after {
|
|
22
|
+
height: 100%;
|
|
23
|
+
border-left: 1px solid $text-03;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.tabletOverlay {
|
|
27
|
+
position: fixed;
|
|
28
|
+
top: 0;
|
|
29
|
+
bottom: 0;
|
|
30
|
+
left: 0;
|
|
31
|
+
right: 0;
|
|
32
|
+
z-index: 9999;
|
|
33
|
+
background-color: $ui-01;
|
|
34
|
+
overflow: hidden;
|
|
35
|
+
padding-top: spacing.$spacing-09;
|
|
36
|
+
display: grid;
|
|
37
|
+
grid-template-rows: 1fr auto;
|
|
38
|
+
overflow-y: auto;
|
|
39
|
+
height: 100vh;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.tabletOverlayHeader {
|
|
43
|
+
button {
|
|
44
|
+
@include brand-01(background-color);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.headerContent {
|
|
48
|
+
color: $ui-02;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.desktopHeader {
|
|
53
|
+
display: flex;
|
|
54
|
+
justify-content: space-between;
|
|
55
|
+
align-items: center;
|
|
56
|
+
background-color: $ui-03;
|
|
57
|
+
border-bottom: 1px solid $text-03;
|
|
58
|
+
position: absolute;
|
|
59
|
+
position: -webkit-sticky;
|
|
60
|
+
width: 100%;
|
|
61
|
+
z-index: 1000;
|
|
62
|
+
top: 0;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.headerContent {
|
|
66
|
+
@include type.type-style('heading-compact-02');
|
|
67
|
+
padding: 0 spacing.$spacing-05;
|
|
68
|
+
color: $ui-05;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.closePanelButton {
|
|
72
|
+
background-color: $ui-background;
|
|
73
|
+
color: $ui-05;
|
|
74
|
+
fill: $ui-05;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* Desktop */
|
|
78
|
+
:global(.omrs-breakpoint-gt-tablet) {
|
|
79
|
+
.overlayContent {
|
|
80
|
+
padding: 0 0 0 0;
|
|
81
|
+
overflow-y: auto;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* Tablet */
|
|
86
|
+
:global(.omrs-breakpoint-lt-desktop) {
|
|
87
|
+
.overlayContent {
|
|
88
|
+
padding: 0 0 0 0;
|
|
89
|
+
overflow-y: auto;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.wardLabel {
|
|
94
|
+
@include type.type-style('label-01');
|
|
95
|
+
// color: colors.$gray-70;
|
|
96
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"esModuleInterop": true,
|
|
4
|
+
"module": "esnext",
|
|
5
|
+
"allowSyntheticDefaultImports": true,
|
|
6
|
+
"jsx": "react",
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
"moduleResolution": "node",
|
|
9
|
+
"lib": [
|
|
10
|
+
"dom",
|
|
11
|
+
"es5",
|
|
12
|
+
"scripthost",
|
|
13
|
+
"es2015",
|
|
14
|
+
"es2015.promise",
|
|
15
|
+
"es2016.array.include",
|
|
16
|
+
"es2018",
|
|
17
|
+
"es2020"
|
|
18
|
+
],
|
|
19
|
+
"resolveJsonModule": true,
|
|
20
|
+
"noEmit": true,
|
|
21
|
+
"target": "esnext"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("openmrs/default-webpack-config");
|