@bahmni/appointments-app 0.0.1-dev.321 → 0.0.1-dev.326
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/dist/{DocumentsTable-DJp5cpq1-Zvz-C_PZ.js → DocumentsTable-DEMSFjaR-B8EqUDcw.js} +28 -28
- package/dist/{FormsTable-eYSyFNI4-CysYuVv0.js → FormsTable-DMc11j4e-B5rGamFZ.js} +60 -60
- package/dist/{LNWAZHJI-BPBOHU88.js → LNWAZHJI-D0uslb_d.js} +2 -2
- package/dist/{MWZ6AO7Z-DztcRXca.js → MWZ6AO7Z-BKPfZxbE.js} +2 -2
- package/dist/{Observations-DqC-iu2a-tXm2UPGx.js → Observations-Cy5krW_v-19CuO1Nm.js} +35 -35
- package/dist/{YPM2AS64-CltVmxsF.js → YPM2AS64-CdcsUwMF.js} +1 -1
- package/dist/{index-B7sGltbf.js → index-B2O-OqkN.js} +18 -18
- package/dist/{index-B_zaavk_.js → index-CL4z60eV.js} +21 -21
- package/dist/{index-B7wnFMyi.js → index-FpExOSHJ.js} +7144 -7142
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as r, jsxs as b } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { useState as g, useMemo as N, useEffect as
|
|
2
|
+
import { S as f, T as B, V as O, W as V, X as Z, Y as ee, _ as te, a0 as ie, U as ae, a1 as ne, u as Q, a2 as R, a3 as le, a4 as re, a5 as se, a6 as E, a7 as F, a8 as C, a9 as Y, aa as x, ab as k, ac as H, $ as oe, o as de, H as $, ad as ce, J as me, ae as Ae, af as Ie, ag as ue, L as _e, M as Te } from "./index-FpExOSHJ.js";
|
|
3
|
+
import { useState as g, useMemo as N, useEffect as S, useRef as Le, useCallback as U } from "react";
|
|
4
4
|
import { useQuery as M, useQueryClient as ve } from "@tanstack/react-query";
|
|
5
5
|
const Ne = "Available for appointments", q = "Get Appointment Unavailability", pe = "Add Appointment Unavailability", w = "Appointment Location", be = () => {
|
|
6
6
|
try {
|
|
@@ -86,7 +86,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
86
86
|
uuid: a.resource?.id ?? "",
|
|
87
87
|
display: a.resource?.name ?? "",
|
|
88
88
|
childLocations: []
|
|
89
|
-
})),
|
|
89
|
+
})), Se = () => {
|
|
90
90
|
const {
|
|
91
91
|
data: e,
|
|
92
92
|
isLoading: a,
|
|
@@ -137,8 +137,8 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
137
137
|
isLoading: a || o || L || s,
|
|
138
138
|
isError: n || c || m || _
|
|
139
139
|
};
|
|
140
|
-
},
|
|
141
|
-
formContent:
|
|
140
|
+
}, he = "UnavailabilityForm-module_formContent__WmNHR", Pe = "UnavailabilityForm-module_formField__8he7o", Be = "UnavailabilityForm-module_loading__IDEY6", Oe = "UnavailabilityForm-module_error__jDeOm", Ve = "UnavailabilityForm-module_grid__t6NKR", Fe = "UnavailabilityForm-module_column__QFdnQ", Ce = "UnavailabilityForm-module_dateTimeColumn__6bi0F", Ye = "UnavailabilityForm-module_datePicker__6HgbO", xe = "UnavailabilityForm-module_timePicker__DHNpK", d = {
|
|
141
|
+
formContent: he,
|
|
142
142
|
formField: Pe,
|
|
143
143
|
loading: Be,
|
|
144
144
|
error: Oe,
|
|
@@ -152,7 +152,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
152
152
|
formDataRef: a,
|
|
153
153
|
onClearErrors: n
|
|
154
154
|
}) => {
|
|
155
|
-
const { t } = Q(), { loginLocations: o, services: c, providers: A, isLoading: L, isError: m } =
|
|
155
|
+
const { t } = Q(), { loginLocations: o, services: c, providers: A, isLoading: L, isError: m } = Se(), [l, s] = g({
|
|
156
156
|
locationUuid: "",
|
|
157
157
|
selectedServiceItems: [],
|
|
158
158
|
selectedProviderItems: [],
|
|
@@ -212,7 +212,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
212
212
|
),
|
|
213
213
|
[I]
|
|
214
214
|
);
|
|
215
|
-
return
|
|
215
|
+
return S(() => {
|
|
216
216
|
if (o.length === 0) return;
|
|
217
217
|
const i = be(), p = o.some(
|
|
218
218
|
(D) => D.uuid === i
|
|
@@ -221,12 +221,12 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
221
221
|
...D,
|
|
222
222
|
locationUuid: p ? i : ""
|
|
223
223
|
}));
|
|
224
|
-
}, [o]),
|
|
224
|
+
}, [o]), S(() => {
|
|
225
225
|
_.length > 0 && s((i) => ({
|
|
226
226
|
...i,
|
|
227
227
|
selectedServiceItems: v
|
|
228
228
|
}));
|
|
229
|
-
}, [v]),
|
|
229
|
+
}, [v]), S(() => {
|
|
230
230
|
I.length > 0 && s((i) => ({
|
|
231
231
|
...i,
|
|
232
232
|
selectedProviderItems: y
|
|
@@ -537,7 +537,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
537
537
|
key: "providerName",
|
|
538
538
|
header: e("ADMIN_UNAVAILABILITY_COLUMN_PROVIDER")
|
|
539
539
|
}
|
|
540
|
-
], [e]), D = N(() => u ? u.map((T) => ge(T, e)) : [], [u, e]),
|
|
540
|
+
], [e]), D = N(() => u ? u.map((T) => ge(T, e)) : [], [u, e]), h = U(
|
|
541
541
|
async (T) => {
|
|
542
542
|
L(!0);
|
|
543
543
|
try {
|
|
@@ -563,16 +563,16 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
563
563
|
), j = U(async () => {
|
|
564
564
|
if (!m.current) return;
|
|
565
565
|
const T = Ue(m.current, e);
|
|
566
|
-
s(T), !(Object.keys(T).length > 0) && await
|
|
567
|
-
}, [e,
|
|
566
|
+
s(T), !(Object.keys(T).length > 0) && await h(fe(m.current, e));
|
|
567
|
+
}, [e, h]), J = U(
|
|
568
568
|
(T) => {
|
|
569
|
-
s((
|
|
570
|
-
const P = { ...
|
|
571
|
-
return T.forEach((
|
|
569
|
+
s((X) => {
|
|
570
|
+
const P = { ...X };
|
|
571
|
+
return T.forEach((z) => delete P[z]), P;
|
|
572
572
|
});
|
|
573
573
|
},
|
|
574
574
|
[]
|
|
575
|
-
),
|
|
575
|
+
), W = U(() => {
|
|
576
576
|
c(!1), m.current = null, s({});
|
|
577
577
|
}, []);
|
|
578
578
|
return /* @__PURE__ */ r(
|
|
@@ -619,14 +619,14 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
619
619
|
onPrimaryButtonClick: j,
|
|
620
620
|
isPrimaryButtonDisabled: A,
|
|
621
621
|
secondaryButtonText: e("ADMIN_UNAVAILABILITY_FORM_CANCEL"),
|
|
622
|
-
onSecondaryButtonClick:
|
|
622
|
+
onSecondaryButtonClick: W,
|
|
623
623
|
isSecondaryButtonDisabled: A,
|
|
624
624
|
content: /* @__PURE__ */ r(
|
|
625
625
|
ke,
|
|
626
626
|
{
|
|
627
627
|
errors: l,
|
|
628
628
|
formDataRef: m,
|
|
629
|
-
onClearErrors:
|
|
629
|
+
onClearErrors: J
|
|
630
630
|
}
|
|
631
631
|
)
|
|
632
632
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as n, jsxs as y } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { E as V, F as P, u as C, P as O, G as h, o as x, $ as B, H as L, U as G, J as U, K as q, L as F, M as H, N as $, Q as k, R as w } from "./index-FpExOSHJ.js";
|
|
3
3
|
import { useState as I, useMemo as _ } from "react";
|
|
4
|
-
import { useQueryClient as K, useQuery as
|
|
5
|
-
const
|
|
6
|
-
|
|
4
|
+
import { useQueryClient as K, useQuery as Q } from "@tanstack/react-query";
|
|
5
|
+
const j = V(
|
|
6
|
+
P,
|
|
7
7
|
"useAppointmentsConfig",
|
|
8
8
|
"AppointmentsConfigProvider"
|
|
9
9
|
), W = ({
|
|
@@ -14,7 +14,7 @@ const Q = V(
|
|
|
14
14
|
}) => {
|
|
15
15
|
const { t: a } = C();
|
|
16
16
|
return /* @__PURE__ */ n(
|
|
17
|
-
|
|
17
|
+
O,
|
|
18
18
|
{
|
|
19
19
|
id: "delete-service-modal",
|
|
20
20
|
testId: "delete-service-modal-test-id",
|
|
@@ -36,9 +36,9 @@ const Q = V(
|
|
|
36
36
|
"speciality",
|
|
37
37
|
"durationMins",
|
|
38
38
|
"description"
|
|
39
|
-
],
|
|
40
|
-
page:
|
|
41
|
-
noPrivilegeContainer:
|
|
39
|
+
], J = "app:appointments:manageServices", Y = "app:appointments:adminTab", Z = "index-module_page__Gsfbu", z = "index-module_noPrivilegeContainer__Pu5WZ", X = "index-module_table__GAPmb", d = {
|
|
40
|
+
page: Z,
|
|
41
|
+
noPrivilegeContainer: z,
|
|
42
42
|
table: X
|
|
43
43
|
};
|
|
44
44
|
function ee(e) {
|
|
@@ -75,26 +75,26 @@ function ie(e, i) {
|
|
|
75
75
|
}));
|
|
76
76
|
}
|
|
77
77
|
const le = () => {
|
|
78
|
-
const { t: e } = C(), i = K(), { addNotification: t } = x(), { userPrivileges: s } = B(), { appointmentsConfig: a } =
|
|
78
|
+
const { t: e } = C(), i = K(), { addNotification: t } = x(), { userPrivileges: s } = B(), { appointmentsConfig: a } = j(), [E, c] = I(null), [M, p] = I(!1), l = a?.serviceTableFields ?? [
|
|
79
79
|
...u
|
|
80
|
-
],
|
|
80
|
+
], m = L(s, Y), b = L(
|
|
81
81
|
s,
|
|
82
|
-
|
|
82
|
+
J
|
|
83
83
|
), S = _(
|
|
84
84
|
() => ee(l),
|
|
85
85
|
[l]
|
|
86
|
-
), { data: A, isLoading: v, isError:
|
|
86
|
+
), { data: A, isLoading: v, isError: R } = Q({
|
|
87
87
|
queryKey: ["allAppointmentServices"],
|
|
88
88
|
queryFn: G,
|
|
89
|
-
enabled:
|
|
90
|
-
}),
|
|
89
|
+
enabled: m
|
|
90
|
+
}), D = _(
|
|
91
91
|
() => te(l, e),
|
|
92
92
|
[l]
|
|
93
93
|
), N = _(
|
|
94
94
|
() => ie(A ?? [], S),
|
|
95
95
|
[A, S]
|
|
96
96
|
), g = async () => {
|
|
97
|
-
|
|
97
|
+
p(!0);
|
|
98
98
|
try {
|
|
99
99
|
await w(E.id), t({
|
|
100
100
|
title: e("ADMIN_ALL_SERVICES_DELETE_SUCCESS_TITLE"),
|
|
@@ -109,7 +109,7 @@ const le = () => {
|
|
|
109
109
|
type: "error"
|
|
110
110
|
});
|
|
111
111
|
} finally {
|
|
112
|
-
|
|
112
|
+
p(!1);
|
|
113
113
|
}
|
|
114
114
|
}, T = (r, o) => o === "actions" ? /* @__PURE__ */ n(
|
|
115
115
|
$,
|
|
@@ -130,8 +130,8 @@ const le = () => {
|
|
|
130
130
|
return /* @__PURE__ */ n(
|
|
131
131
|
q,
|
|
132
132
|
{
|
|
133
|
-
header: /* @__PURE__ */ n(
|
|
134
|
-
main:
|
|
133
|
+
header: /* @__PURE__ */ n(H, { breadcrumbItems: f }),
|
|
134
|
+
main: m ? /* @__PURE__ */ y(
|
|
135
135
|
"div",
|
|
136
136
|
{
|
|
137
137
|
id: "all-appointment-service-page",
|
|
@@ -140,15 +140,15 @@ const le = () => {
|
|
|
140
140
|
className: d.page,
|
|
141
141
|
children: [
|
|
142
142
|
/* @__PURE__ */ n(
|
|
143
|
-
|
|
143
|
+
F,
|
|
144
144
|
{
|
|
145
145
|
id: "all-services",
|
|
146
146
|
title: e("ADMIN_ALL_SERVICES_TITLE"),
|
|
147
|
-
headers:
|
|
147
|
+
headers: D,
|
|
148
148
|
rows: N,
|
|
149
149
|
ariaLabel: "all-services-table",
|
|
150
150
|
loading: v,
|
|
151
|
-
errorStateMessage:
|
|
151
|
+
errorStateMessage: R ? e("ADMIN_ALL_SERVICES_ERROR_MESSAGE") : null,
|
|
152
152
|
emptyStateMessage: e("ADMIN_ALL_SERVICES_EMPTY_MESSAGE"),
|
|
153
153
|
renderCell: T,
|
|
154
154
|
className: d.table
|