@kenyaemr/esm-appointments-app 7.0.3-pre.89 → 8.0.1-pre.95
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/.turbo/turbo-build.log +23 -22
- package/dist/130.js +1 -1
- package/dist/130.js.map +1 -1
- package/dist/23.js +2 -0
- package/dist/23.js.map +1 -0
- package/dist/265.js +1 -1
- package/dist/271.js +1 -1
- package/dist/319.js +1 -1
- package/dist/460.js +1 -1
- package/dist/529.js +1 -1
- package/dist/574.js +1 -1
- package/dist/581.js +1 -0
- package/dist/581.js.map +1 -0
- package/dist/644.js +1 -1
- package/dist/646.js +2 -0
- package/dist/646.js.map +1 -0
- package/dist/757.js +1 -1
- package/dist/788.js +1 -1
- package/dist/807.js +1 -1
- package/dist/833.js +1 -1
- package/dist/85.js +1 -0
- package/dist/85.js.map +1 -0
- package/dist/89.js +1 -0
- package/dist/89.js.map +1 -0
- package/dist/kenyaemr-esm-appointments-app.js +1 -1
- package/dist/kenyaemr-esm-appointments-app.js.buildmanifest.json +167 -143
- package/dist/kenyaemr-esm-appointments-app.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +2 -2
- package/src/admin/appointment-services/appointment-services.scss +5 -5
- package/src/appointments/appointment-tabs.scss +6 -7
- package/src/appointments/appointment-tabs.test.tsx +4 -11
- package/src/appointments/common-components/appointments-actions.test.tsx +121 -74
- package/src/appointments/common-components/appointments-table.scss +6 -6
- package/src/appointments/common-components/appointments-table.test.tsx +30 -32
- package/src/appointments/common-components/end-appointment.test.tsx +20 -19
- package/src/appointments/details/appointment-details.component.tsx +1 -1
- package/src/appointments/details/appointment-details.scss +13 -13
- package/src/appointments/details/appointment-details.test.tsx +49 -48
- package/src/appointments/scheduled/scheduled-appointments.component.tsx +1 -1
- package/src/appointments/scheduled/scheduled-appointments.scss +3 -1
- package/src/appointments/unscheduled/unscheduled-appointments.test.tsx +35 -37
- package/src/appointments.component.tsx +0 -1
- package/src/calendar/appointments-calendar-view-view.scss +3 -4
- package/src/calendar/appointments-calendar-view.test.tsx +1 -5
- package/src/calendar/header/calendar-header.scss +4 -4
- package/src/calendar/monthly/days-of-week.scss +1 -1
- package/src/calendar/monthly/monthly-view-workload.scss +10 -10
- package/src/config-schema.ts +88 -90
- package/src/empty-state/empty-state.scss +4 -4
- package/src/form/appointments-form.component.tsx +58 -26
- package/src/form/appointments-form.resource.ts +2 -2
- package/src/form/appointments-form.scss +11 -11
- package/src/form/appointments-form.test.tsx +42 -43
- package/src/header/appointments-header.scss +12 -12
- package/src/home/home-appointments.scss +0 -1
- package/src/homepage-tile/appointments-tile.component.tsx +23 -0
- package/src/homepage-tile/appointments-tile.scss +39 -0
- package/src/homepage-tile/appointments.resource.ts +15 -0
- package/src/hooks/useClinicalMetrics.ts +1 -1
- package/src/hooks/useDefaultLocation.ts +1 -1
- package/src/hooks/usePatientAppointmentHistory.ts +1 -1
- package/src/hooks/useProviders.ts +1 -1
- package/src/index.ts +5 -0
- package/src/metrics/appointments-metrics.scss +0 -1
- package/src/metrics/appointments-metrics.test.tsx +25 -31
- package/src/metrics/metrics-card.component.tsx +6 -33
- package/src/metrics/metrics-card.scss +8 -8
- package/src/metrics/metrics-header.scss +1 -1
- package/src/past-visit/past-visit.component.tsx +1 -1
- package/src/past-visit/past-visit.resource.ts +1 -1
- package/src/past-visit/past-visit.scss +19 -14
- package/src/patient-appointments/patient-appointments-action-menu.scss +6 -0
- package/src/patient-appointments/patient-appointments-base.component.tsx +6 -6
- package/src/patient-appointments/patient-appointments-base.scss +24 -29
- package/src/patient-appointments/patient-appointments-base.test.tsx +13 -11
- package/src/patient-appointments/patient-appointments-header.scss +4 -5
- package/src/patient-appointments/patient-appointments-overview.component.tsx +2 -2
- package/src/patient-appointments/patient-appointments-overview.scss +0 -1
- package/src/patient-appointments/patient-appointments.resource.ts +1 -1
- package/src/patient-appointments/patient-upcoming-appointments-card.component.tsx +3 -3
- package/src/patient-appointments/patient-upcoming-appointments-card.scss +11 -10
- package/src/patient-search/patient-search.scss +15 -14
- package/src/routes.json +5 -0
- package/src/types/index.ts +4 -0
- package/src/workload/monthly-view-workload/monthly-workload.scss +21 -6
- package/src/workload/monthly-view-workload/monthlyWorkCard.tsx +2 -2
- package/src/workload/workload.scss +3 -3
- package/translations/am.json +2 -0
- package/translations/ar.json +2 -0
- package/translations/en.json +2 -0
- package/translations/es.json +2 -0
- package/translations/fr.json +30 -28
- package/translations/he.json +2 -0
- package/translations/km.json +2 -0
- package/translations/zh.json +2 -0
- package/translations/zh_CN.json +2 -0
- package/dist/224.js +0 -1
- package/dist/224.js.map +0 -1
- package/dist/445.js +0 -2
- package/dist/445.js.map +0 -1
- package/dist/857.js +0 -2
- package/dist/857.js.map +0 -1
- package/dist/904.js +0 -1
- package/dist/904.js.map +0 -1
- package/src/root.scss +0 -50
- /package/dist/{857.js.LICENSE.txt → 23.js.LICENSE.txt} +0 -0
- /package/dist/{445.js.LICENSE.txt → 646.js.LICENSE.txt} +0 -0
- /package/src/helpers/{time.tsx → time.ts} +0 -0
- /package/src/patient-appointments/{patient-appointments-table.tsx → patient-appointments-table.component.tsx} +0 -0
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
@use '@carbon/colors';
|
|
2
|
-
@use '@carbon/
|
|
3
|
-
@use '@carbon/
|
|
4
|
-
@
|
|
5
|
-
|
|
6
|
-
// TO DO Move this styles to style - guide
|
|
7
|
-
// https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-styleguide/src/_vars.scss
|
|
8
|
-
$color-blue-30: #a6c8ff;
|
|
9
|
-
$color-blue-10: #edf5ff;
|
|
2
|
+
@use '@carbon/layout';
|
|
3
|
+
@use '@carbon/type';
|
|
4
|
+
@use '@openmrs/esm-styleguide/src/vars' as *;
|
|
10
5
|
|
|
11
6
|
.widgetCard {
|
|
12
7
|
border: 1px solid $ui-03;
|
|
13
8
|
max-width: 60rem;
|
|
14
9
|
margin: auto;
|
|
15
|
-
margin-top:
|
|
10
|
+
margin-top: layout.$spacing-05;
|
|
16
11
|
}
|
|
17
12
|
|
|
18
13
|
.productiveHeading01 {
|
|
@@ -31,35 +26,35 @@ $color-blue-10: #edf5ff;
|
|
|
31
26
|
}
|
|
32
27
|
|
|
33
28
|
.contentSwitcherWrapper > div button:first-child {
|
|
34
|
-
border-top: 1px solid
|
|
35
|
-
border-bottom: 1px solid
|
|
36
|
-
border-left: 1px solid
|
|
29
|
+
border-top: 1px solid colors.$blue-30;
|
|
30
|
+
border-bottom: 1px solid colors.$blue-30;
|
|
31
|
+
border-left: 1px solid colors.$blue-30;
|
|
37
32
|
border-right: none;
|
|
38
|
-
border-radius:
|
|
33
|
+
border-radius: layout.$spacing-02 0 0px layout.$spacing-02;
|
|
39
34
|
}
|
|
40
35
|
|
|
41
36
|
.contentSwitcherWrapper > div button:last-child {
|
|
42
|
-
border-top: 1px solid
|
|
43
|
-
border-bottom: 1px solid
|
|
44
|
-
border-right: 1px solid
|
|
37
|
+
border-top: 1px solid colors.$blue-30;
|
|
38
|
+
border-bottom: 1px solid colors.$blue-30;
|
|
39
|
+
border-right: 1px solid colors.$blue-30;
|
|
45
40
|
border-left: none;
|
|
46
|
-
border-radius: 0px
|
|
41
|
+
border-radius: 0px layout.$spacing-02 layout.$spacing-02 0px;
|
|
47
42
|
}
|
|
48
43
|
|
|
49
44
|
.contentSwitcherWrapper > div > button[aria-selected='true'],
|
|
50
45
|
.contentSwitcherWrapper > div > button[aria-selected='true']:first-child {
|
|
51
|
-
background-color:
|
|
52
|
-
color:
|
|
53
|
-
border-color:
|
|
54
|
-
border-right: 1px solid
|
|
46
|
+
background-color: colors.$blue-10;
|
|
47
|
+
color: colors.$blue-60;
|
|
48
|
+
border-color: colors.$blue-60;
|
|
49
|
+
border-right: 1px solid colors.$blue-60;
|
|
55
50
|
}
|
|
56
51
|
|
|
57
52
|
.contentSwitcherWrapper > div > button[aria-selected='true'],
|
|
58
53
|
.contentSwitcherWrapper > div > button[aria-selected='true']:last-child {
|
|
59
|
-
background-color:
|
|
60
|
-
color:
|
|
61
|
-
border-color:
|
|
62
|
-
border-left: 1px solid
|
|
54
|
+
background-color: colors.$blue-10;
|
|
55
|
+
color: colors.$blue-60;
|
|
56
|
+
border-color: colors.$blue-60;
|
|
57
|
+
border-left: 1px solid colors.$blue-60;
|
|
63
58
|
}
|
|
64
59
|
|
|
65
60
|
.contentSwitcherWrapper > div > button[aria-selected='true']:focus {
|
|
@@ -68,16 +63,16 @@ $color-blue-10: #edf5ff;
|
|
|
68
63
|
|
|
69
64
|
.divider {
|
|
70
65
|
width: 1px;
|
|
71
|
-
height:
|
|
66
|
+
height: layout.$spacing-05;
|
|
72
67
|
color: colors.$gray-20;
|
|
73
|
-
margin: 0
|
|
68
|
+
margin: 0 layout.$spacing-05;
|
|
74
69
|
}
|
|
75
70
|
|
|
76
71
|
.content {
|
|
77
72
|
@include type.type-style('heading-compact-01');
|
|
78
73
|
color: $text-02;
|
|
79
|
-
margin-top:
|
|
80
|
-
margin-bottom:
|
|
74
|
+
margin-top: layout.$spacing-05;
|
|
75
|
+
margin-bottom: layout.$spacing-03;
|
|
81
76
|
}
|
|
82
77
|
|
|
83
78
|
.tile {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { screen } from '@testing-library/react';
|
|
3
3
|
import userEvent from '@testing-library/user-event';
|
|
4
|
-
import { openmrsFetch } from '@openmrs/esm-framework';
|
|
4
|
+
import { type FetchResponse, openmrsFetch } from '@openmrs/esm-framework';
|
|
5
5
|
import { mockAppointmentsData } from '__mocks__';
|
|
6
6
|
import { mockPatient, patientChartBasePath, renderWithSwr, waitForLoadingToFinish } from 'tools';
|
|
7
|
+
import { type AppointmentsFetchResponse } from '../types';
|
|
7
8
|
import AppointmentsBase from './patient-appointments-base.component';
|
|
8
9
|
|
|
9
10
|
const testProps = {
|
|
@@ -11,18 +12,21 @@ const testProps = {
|
|
|
11
12
|
patientUuid: mockPatient.id,
|
|
12
13
|
};
|
|
13
14
|
|
|
14
|
-
const mockOpenmrsFetch =
|
|
15
|
+
const mockOpenmrsFetch = jest.mocked(openmrsFetch);
|
|
15
16
|
|
|
16
17
|
describe('AppointmensOverview', () => {
|
|
17
18
|
it('renders an empty state if appointments data is unavailable', async () => {
|
|
18
|
-
mockOpenmrsFetch.
|
|
19
|
+
mockOpenmrsFetch.mockResolvedValueOnce({
|
|
20
|
+
data: [],
|
|
21
|
+
} as unknown as FetchResponse<AppointmentsFetchResponse>);
|
|
19
22
|
|
|
20
|
-
|
|
23
|
+
renderWithSwr(<AppointmentsBase {...testProps} />);
|
|
21
24
|
|
|
22
25
|
await waitForLoadingToFinish();
|
|
23
26
|
|
|
24
27
|
expect(screen.getByRole('heading', { name: /appointments/i })).toBeInTheDocument();
|
|
25
28
|
expect(screen.getByRole('button', { name: /add/i })).toBeInTheDocument();
|
|
29
|
+
expect(screen.getByText(/there are no upcoming appointments to display for this patient/i)).toBeInTheDocument();
|
|
26
30
|
});
|
|
27
31
|
|
|
28
32
|
it('renders an error state if there was a problem fetching appointments data', async () => {
|
|
@@ -36,7 +40,7 @@ describe('AppointmensOverview', () => {
|
|
|
36
40
|
|
|
37
41
|
mockOpenmrsFetch.mockRejectedValueOnce(error);
|
|
38
42
|
|
|
39
|
-
|
|
43
|
+
renderWithSwr(<AppointmentsBase {...testProps} />);
|
|
40
44
|
|
|
41
45
|
await waitForLoadingToFinish();
|
|
42
46
|
|
|
@@ -51,9 +55,11 @@ describe('AppointmensOverview', () => {
|
|
|
51
55
|
it(`renders a tabular overview of the patient's appointment schedule if available`, async () => {
|
|
52
56
|
const user = userEvent.setup();
|
|
53
57
|
|
|
54
|
-
mockOpenmrsFetch.
|
|
58
|
+
mockOpenmrsFetch.mockResolvedValueOnce({
|
|
59
|
+
...mockAppointmentsData,
|
|
60
|
+
} as unknown as FetchResponse<AppointmentsFetchResponse>);
|
|
55
61
|
|
|
56
|
-
|
|
62
|
+
renderWithSwr(<AppointmentsBase {...testProps} />);
|
|
57
63
|
|
|
58
64
|
await waitForLoadingToFinish();
|
|
59
65
|
|
|
@@ -85,7 +91,3 @@ describe('AppointmensOverview', () => {
|
|
|
85
91
|
expect(nextPageButton).toBeDisabled();
|
|
86
92
|
});
|
|
87
93
|
});
|
|
88
|
-
|
|
89
|
-
function renderAppointments() {
|
|
90
|
-
renderWithSwr(<AppointmentsBase {...testProps} />);
|
|
91
|
-
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
@use '@carbon/styles/scss/type';
|
|
2
1
|
@use '@carbon/colors';
|
|
3
2
|
@use '@carbon/layout';
|
|
4
3
|
|
|
@@ -7,9 +6,9 @@
|
|
|
7
6
|
}
|
|
8
7
|
|
|
9
8
|
.patientAvatar {
|
|
10
|
-
width:
|
|
11
|
-
height:
|
|
12
|
-
margin:
|
|
9
|
+
width: layout.$spacing-11;
|
|
10
|
+
height: layout.$spacing-11;
|
|
11
|
+
margin: layout.$spacing-05;
|
|
13
12
|
border-radius: 1px;
|
|
14
13
|
}
|
|
15
14
|
|
|
@@ -22,6 +21,6 @@
|
|
|
22
21
|
// Overriding styles for RTL support
|
|
23
22
|
html[dir='rtl'] {
|
|
24
23
|
.titleContent {
|
|
25
|
-
margin-left:
|
|
24
|
+
margin-left: layout.$spacing-05;
|
|
26
25
|
}
|
|
27
26
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { usePatient, useLayoutType, isDesktop,
|
|
2
|
+
import { usePatient, useLayoutType, isDesktop, WorkspaceContainer } from '@openmrs/esm-framework';
|
|
3
3
|
import PatientAppointmentsBase from './patient-appointments-base.component';
|
|
4
4
|
import { useParams } from 'react-router-dom';
|
|
5
5
|
import PatientAppointmentContext, { PatientAppointmentContextTypes } from '../hooks/patientAppointmentContext';
|
|
@@ -26,7 +26,7 @@ const PatientAppointmentsOverview: React.FC = () => {
|
|
|
26
26
|
<div className={styles.patientAppointmentsOverview}>
|
|
27
27
|
<PatientAppointmentsHeader patient={response.patient} />
|
|
28
28
|
<PatientAppointmentsBase patientUuid={response.patient.id} />
|
|
29
|
-
<
|
|
29
|
+
<WorkspaceContainer overlay contextKey={`patient/${params.patientUuid}`} />
|
|
30
30
|
</div>
|
|
31
31
|
</PatientAppointmentContext.Provider>
|
|
32
32
|
);
|
|
@@ -33,7 +33,7 @@ const PatientUpcomingAppointmentsCard: React.FC<PatientUpcomingAppointmentsProps
|
|
|
33
33
|
|
|
34
34
|
const ac = useMemo<AbortController>(() => new AbortController(), []);
|
|
35
35
|
useEffect(() => () => ac.abort(), [ac]);
|
|
36
|
-
const { data: appointmentsData,
|
|
36
|
+
const { data: appointmentsData, error, isLoading } = usePatientAppointments(patientUuid, startDate, ac);
|
|
37
37
|
|
|
38
38
|
const todaysAppointments = appointmentsData?.todaysAppointments?.length ? appointmentsData?.todaysAppointments : [];
|
|
39
39
|
const futureAppointments = appointmentsData?.upcomingAppointments?.length
|
|
@@ -49,8 +49,8 @@ const PatientUpcomingAppointmentsCard: React.FC<PatientUpcomingAppointmentsProps
|
|
|
49
49
|
setUpcomingAppointment(appointment);
|
|
50
50
|
};
|
|
51
51
|
|
|
52
|
-
if (
|
|
53
|
-
return <ErrorState headerTitle={headerTitle} error={
|
|
52
|
+
if (error) {
|
|
53
|
+
return <ErrorState headerTitle={headerTitle} error={error} />;
|
|
54
54
|
}
|
|
55
55
|
if (isLoading) {
|
|
56
56
|
return (
|
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
@use '@carbon/
|
|
2
|
-
@use '@carbon/
|
|
3
|
-
@
|
|
1
|
+
@use '@carbon/layout';
|
|
2
|
+
@use '@carbon/type';
|
|
3
|
+
@use '@openmrs/esm-styleguide/src/vars' as *;
|
|
4
4
|
|
|
5
5
|
.container {
|
|
6
|
-
margin:
|
|
6
|
+
margin: layout.$spacing-05;
|
|
7
7
|
|
|
8
8
|
& section {
|
|
9
|
-
margin:
|
|
9
|
+
margin: layout.$spacing-05 0;
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.sectionTitle {
|
|
14
14
|
@include type.type-style('heading-compact-02');
|
|
15
15
|
color: $text-02;
|
|
16
|
-
margin: 0 0
|
|
16
|
+
margin: 0 0 layout.$spacing-03 0;
|
|
17
17
|
}
|
|
18
|
+
|
|
18
19
|
.checkbox {
|
|
19
20
|
&:not(:first-child) {
|
|
20
|
-
margin:
|
|
21
|
+
margin: 0;
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
.input {
|
|
25
|
-
margin:
|
|
26
|
+
margin: 0 layout.$spacing-05 layout.$spacing-05;
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
.headerLabel {
|
|
@@ -36,11 +37,11 @@
|
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
.structuredList {
|
|
39
|
-
padding:
|
|
40
|
+
padding: layout.$spacing-03 layout.$spacing-03 layout.$spacing-03;
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
.inlineNotification {
|
|
43
44
|
width: 100%;
|
|
44
45
|
max-width: unset;
|
|
45
|
-
padding:
|
|
46
|
+
padding: 0;
|
|
46
47
|
}
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
@use '@carbon/
|
|
2
|
-
@use '@
|
|
3
|
-
@import '~@openmrs/esm-styleguide/src/vars';
|
|
1
|
+
@use '@carbon/layout';
|
|
2
|
+
@use '@openmrs/esm-styleguide/src/vars' as *;
|
|
4
3
|
|
|
5
4
|
.padded {
|
|
6
|
-
padding:
|
|
5
|
+
padding: layout.$spacing-05;
|
|
7
6
|
}
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
.searchBarWrapper {
|
|
9
|
+
[data-extension-id='patient-search-bar'] {
|
|
10
|
+
& > div {
|
|
11
|
+
width: 100%;
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
& input {
|
|
14
|
+
background-color: $ui-02;
|
|
15
|
+
border-bottom: none;
|
|
16
|
+
min-height: layout.$spacing-09;
|
|
17
|
+
}
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
& button {
|
|
20
|
+
height: layout.$spacing-09;
|
|
21
|
+
}
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
}
|
package/src/routes.json
CHANGED
package/src/types/index.ts
CHANGED
|
@@ -61,6 +61,7 @@ export interface Appointment {
|
|
|
61
61
|
export interface AppointmentsFetchResponse {
|
|
62
62
|
data: Array<Appointment>;
|
|
63
63
|
}
|
|
64
|
+
|
|
64
65
|
export interface AppointmentService {
|
|
65
66
|
appointmentServiceId: number;
|
|
66
67
|
creatorName: string;
|
|
@@ -133,6 +134,7 @@ export interface AppointmentPayload {
|
|
|
133
134
|
uuid?: string;
|
|
134
135
|
providerUuid?: string | OpenmrsResource;
|
|
135
136
|
}
|
|
137
|
+
|
|
136
138
|
export interface AppointmentCountMap {
|
|
137
139
|
allAppointmentsCount: number;
|
|
138
140
|
missedAppointmentsCount;
|
|
@@ -144,6 +146,7 @@ export interface AppointmentSummary {
|
|
|
144
146
|
appointmentService: OpenmrsResource;
|
|
145
147
|
appointmentCountMap: Record<string, AppointmentCountMap>;
|
|
146
148
|
}
|
|
149
|
+
|
|
147
150
|
export interface Provider {
|
|
148
151
|
uuid: string;
|
|
149
152
|
display: string;
|
|
@@ -158,6 +161,7 @@ export enum DurationPeriod {
|
|
|
158
161
|
weekly,
|
|
159
162
|
daily,
|
|
160
163
|
}
|
|
164
|
+
|
|
161
165
|
export interface Identifier {
|
|
162
166
|
identifier: string;
|
|
163
167
|
identifierName?: string;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
@use '@carbon/styles/scss/type';
|
|
2
1
|
@use '@carbon/colors';
|
|
3
2
|
@use '@carbon/layout';
|
|
4
|
-
@
|
|
3
|
+
@use '@carbon/type';
|
|
4
|
+
@use '@openmrs/esm-styleguide/src/vars' as *;
|
|
5
|
+
|
|
5
6
|
.monthly-cell {
|
|
6
7
|
border-left: 1px solid colors.$gray-20;
|
|
7
8
|
border-bottom: 1px solid colors.$gray-20;
|
|
@@ -11,6 +12,7 @@
|
|
|
11
12
|
cursor: pointer;
|
|
12
13
|
text-align: right;
|
|
13
14
|
@include type.type-style('body-compact-02');
|
|
15
|
+
|
|
14
16
|
&:nth-child(-n + 7) {
|
|
15
17
|
border-top: 1px solid colors.$gray-20;
|
|
16
18
|
}
|
|
@@ -32,10 +34,12 @@
|
|
|
32
34
|
&-current {
|
|
33
35
|
color: colors.$black;
|
|
34
36
|
}
|
|
37
|
+
|
|
35
38
|
&:hover {
|
|
36
39
|
background-color: colors.$blue-30-hover;
|
|
37
40
|
color: colors.$white;
|
|
38
41
|
}
|
|
42
|
+
|
|
39
43
|
&-active {
|
|
40
44
|
background-color: colors.$magenta-30;
|
|
41
45
|
color: colors.$white;
|
|
@@ -57,18 +61,20 @@
|
|
|
57
61
|
display: list-item;
|
|
58
62
|
|
|
59
63
|
span:not(:first-child) {
|
|
60
|
-
margin:
|
|
64
|
+
margin: 0 layout.$spacing-04;
|
|
61
65
|
}
|
|
62
66
|
}
|
|
67
|
+
|
|
63
68
|
.identifierTag {
|
|
64
69
|
display: flex;
|
|
65
70
|
align-items: center;
|
|
66
71
|
}
|
|
72
|
+
|
|
67
73
|
.weekly-cell {
|
|
68
74
|
position: relative;
|
|
69
75
|
border-right: 1px solid colors.$gray-20;
|
|
70
76
|
border-bottom: 1px solid colors.$gray-20;
|
|
71
|
-
min-height:
|
|
77
|
+
min-height: 7.5rem;
|
|
72
78
|
color: colors.$white;
|
|
73
79
|
|
|
74
80
|
.week-time {
|
|
@@ -97,6 +103,7 @@
|
|
|
97
103
|
}
|
|
98
104
|
}
|
|
99
105
|
}
|
|
106
|
+
|
|
100
107
|
.selectedDate {
|
|
101
108
|
background-color: #005d5d;
|
|
102
109
|
height: 100%;
|
|
@@ -114,7 +121,7 @@
|
|
|
114
121
|
grid-template-columns: 4fr 1fr;
|
|
115
122
|
justify-content: flex-start;
|
|
116
123
|
text-align: left;
|
|
117
|
-
margin:
|
|
124
|
+
margin: layout.$spacing-01;
|
|
118
125
|
@include type.type-style('label-01');
|
|
119
126
|
color: #020f1b;
|
|
120
127
|
cursor: pointer;
|
|
@@ -171,11 +178,13 @@
|
|
|
171
178
|
.wrapper {
|
|
172
179
|
position: relative;
|
|
173
180
|
}
|
|
181
|
+
|
|
174
182
|
.monthlyCalendar {
|
|
175
183
|
display: grid;
|
|
176
184
|
grid-template-columns: repeat(7, minmax(0px, 1fr));
|
|
177
185
|
grid-template-rows: repeat(6, minmax(0px, 1fr));
|
|
178
186
|
}
|
|
187
|
+
|
|
179
188
|
.selectedDate {
|
|
180
189
|
background-color: red;
|
|
181
190
|
}
|
|
@@ -183,6 +192,7 @@
|
|
|
183
192
|
.calendarViewContainer {
|
|
184
193
|
margin: 5px;
|
|
185
194
|
}
|
|
195
|
+
|
|
186
196
|
.backgroundColor {
|
|
187
197
|
margin: 1px 0 0;
|
|
188
198
|
transition: width 0.24s ease-in-out;
|
|
@@ -190,6 +200,7 @@
|
|
|
190
200
|
min-height: calc(100vh - 80px);
|
|
191
201
|
background-color: colors.$white;
|
|
192
202
|
}
|
|
203
|
+
|
|
193
204
|
.container {
|
|
194
205
|
display: flex;
|
|
195
206
|
justify-content: center;
|
|
@@ -197,10 +208,12 @@
|
|
|
197
208
|
width: 100%;
|
|
198
209
|
height: layout.$spacing-06;
|
|
199
210
|
}
|
|
211
|
+
|
|
200
212
|
.workLoadCard {
|
|
201
213
|
display: flex;
|
|
202
214
|
color: colors.$black;
|
|
203
215
|
}
|
|
216
|
+
|
|
204
217
|
.activeWorkloadCard {
|
|
205
218
|
background-color: colors.$blue-10;
|
|
206
219
|
|
|
@@ -208,12 +221,14 @@
|
|
|
208
221
|
color: colors.$blue-60;
|
|
209
222
|
}
|
|
210
223
|
}
|
|
224
|
+
|
|
211
225
|
.workLoadContainer {
|
|
212
226
|
display: flex;
|
|
213
227
|
flex-direction: column;
|
|
214
228
|
background-color: white;
|
|
215
|
-
padding-bottom:
|
|
229
|
+
padding-bottom: layout.$spacing-05;
|
|
216
230
|
}
|
|
231
|
+
|
|
217
232
|
.headerContainer {
|
|
218
233
|
display: flex;
|
|
219
234
|
justify-content: center;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
|
-
import
|
|
3
|
+
import dayjs, { type Dayjs } from 'dayjs';
|
|
4
4
|
import { useLayoutType } from '@openmrs/esm-framework';
|
|
5
5
|
import { isSameMonth } from '../../helpers';
|
|
6
|
-
import
|
|
6
|
+
import styles from './monthly-workload.scss';
|
|
7
7
|
|
|
8
8
|
interface MonthlyWorkloadComponentProps {
|
|
9
9
|
date: Dayjs;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@use '@carbon/colors';
|
|
2
2
|
@use '@carbon/layout';
|
|
3
3
|
@use '@carbon/type';
|
|
4
|
-
@
|
|
4
|
+
@use '@openmrs/esm-styleguide/src/vars' as *;
|
|
5
5
|
|
|
6
6
|
.workLoadCard {
|
|
7
7
|
display: flex;
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
display: flex;
|
|
19
19
|
flex-direction: column;
|
|
20
20
|
background-color: white;
|
|
21
|
-
padding-bottom:
|
|
21
|
+
padding-bottom: layout.$spacing-05;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
.cardContainer {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
.tileContainer {
|
|
31
|
-
padding:
|
|
31
|
+
padding: layout.$spacing-03;
|
|
32
32
|
flex: 1;
|
|
33
33
|
display: flex;
|
|
34
34
|
align-items: center;
|
package/translations/am.json
CHANGED
|
@@ -129,6 +129,7 @@
|
|
|
129
129
|
"saveAndClose": "Save and close",
|
|
130
130
|
"scheduled": "Scheduled",
|
|
131
131
|
"scheduledAppointments": "Scheduled appointments",
|
|
132
|
+
"scheduledForToday": "Scheduled For Today",
|
|
132
133
|
"selectALocation": "Select a location",
|
|
133
134
|
"selectAppointmentStatus": "Select status",
|
|
134
135
|
"selectAppointmentType": "Select an appointment type",
|
|
@@ -147,6 +148,7 @@
|
|
|
147
148
|
"time": "Time",
|
|
148
149
|
"today": "Today",
|
|
149
150
|
"todays": "Today's",
|
|
151
|
+
"type": "Type",
|
|
150
152
|
"unscheduled": "Unscheduled",
|
|
151
153
|
"unscheduledAppointments": "Unscheduled appointments",
|
|
152
154
|
"unscheduledAppointments_lower": "unscheduled appointments",
|
package/translations/ar.json
CHANGED
|
@@ -129,6 +129,7 @@
|
|
|
129
129
|
"saveAndClose": "Save and close",
|
|
130
130
|
"scheduled": "مجدول",
|
|
131
131
|
"scheduledAppointments": "المواعيد المجدولة",
|
|
132
|
+
"scheduledForToday": "Scheduled For Today",
|
|
132
133
|
"selectALocation": "Select a location",
|
|
133
134
|
"selectAppointmentStatus": "اختر الحالة",
|
|
134
135
|
"selectAppointmentType": "اختر نوع الموعد",
|
|
@@ -147,6 +148,7 @@
|
|
|
147
148
|
"time": "الوقت",
|
|
148
149
|
"today": "اليوم",
|
|
149
150
|
"todays": "Today's",
|
|
151
|
+
"type": "Type",
|
|
150
152
|
"unscheduled": "غير مجدول",
|
|
151
153
|
"unscheduledAppointments": "المواعيد غير المجدولة",
|
|
152
154
|
"unscheduledAppointments_lower": "مواعيد غير مجدولة",
|
package/translations/en.json
CHANGED
|
@@ -129,6 +129,7 @@
|
|
|
129
129
|
"saveAndClose": "Save and close",
|
|
130
130
|
"scheduled": "Scheduled",
|
|
131
131
|
"scheduledAppointments": "Scheduled appointments",
|
|
132
|
+
"scheduledForToday": "Scheduled For Today",
|
|
132
133
|
"selectALocation": "Select a location",
|
|
133
134
|
"selectAppointmentStatus": "Select status",
|
|
134
135
|
"selectAppointmentType": "Select an appointment type",
|
|
@@ -147,6 +148,7 @@
|
|
|
147
148
|
"time": "Time",
|
|
148
149
|
"today": "Today",
|
|
149
150
|
"todays": "Today's",
|
|
151
|
+
"type": "Type",
|
|
150
152
|
"unscheduled": "Unscheduled",
|
|
151
153
|
"unscheduledAppointments": "Unscheduled appointments",
|
|
152
154
|
"unscheduledAppointments_lower": "unscheduled appointments",
|
package/translations/es.json
CHANGED
|
@@ -129,6 +129,7 @@
|
|
|
129
129
|
"saveAndClose": "Save and close",
|
|
130
130
|
"scheduled": "Programada",
|
|
131
131
|
"scheduledAppointments": "Citas programadas",
|
|
132
|
+
"scheduledForToday": "Scheduled For Today",
|
|
132
133
|
"selectALocation": "Select a location",
|
|
133
134
|
"selectAppointmentStatus": "Seleccionar estado",
|
|
134
135
|
"selectAppointmentType": "Seleccionar tipo de cita",
|
|
@@ -147,6 +148,7 @@
|
|
|
147
148
|
"time": "Tiempo",
|
|
148
149
|
"today": "Hoy",
|
|
149
150
|
"todays": "Today's",
|
|
151
|
+
"type": "Type",
|
|
150
152
|
"unscheduled": "No programada",
|
|
151
153
|
"unscheduledAppointments": "Citas no programadas",
|
|
152
154
|
"unscheduledAppointments_lower": "citas no programadas",
|