@bahmni/appointments-app 0.0.1-dev.395 → 0.0.1-dev.397
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-C1A0EhCk-7nohhGd6.js → DocumentsTable-CyCmTrjB-DB3bllk4.js} +10 -10
- package/dist/{FormsTable-C2Gb9B6j-DxbNwHv2.js → FormsTable-CMtT3i5o-CMUc-_U8.js} +85 -85
- package/dist/{LNWAZHJI-NkAZbvuR.js → LNWAZHJI-Dj2t68TS.js} +2 -2
- package/dist/{MWZ6AO7Z-DxGzwtcu.js → MWZ6AO7Z-CVK0RtJg.js} +2 -2
- package/dist/{Observations-Clr4S77q-2GUh9NW7.js → Observations-Cco2HyR_-BnfST746.js} +26 -26
- package/dist/{YPM2AS64-DqGSUw2Q.js → YPM2AS64-B_E24tMN.js} +1 -1
- package/dist/{index-D7HdHx-h.js → index-BOlu0-kU.js} +27 -27
- package/dist/{index-CMuNDXdK.js → index-Cjx4xv_3.js} +25977 -25941
- package/dist/{index-C1yXPNzY.js → index-D_O_BwJy.js} +33 -33
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as r, jsxs as p } from "react/jsx-runtime";
|
|
2
|
-
import { X as f, a0 as
|
|
3
|
-
import { useState as g, useMemo as N, useEffect as
|
|
2
|
+
import { X as f, a0 as P, a1 as O, a2 as V, a3 as Z, a4 as ee, a5 as te, a6 as ie, M as ae, a7 as ne, u as Q, a8 as R, a9 as le, aa as re, ab as se, ac as E, ad as F, ae as C, af as Y, ag as x, ah as k, ai as $, e as oe, L as de, D as q, aj as ce, H as me, ak as Ae, al as Ie, am as ue, Q as _e, R as Te, S as Le } from "./index-Cjx4xv_3.js";
|
|
3
|
+
import { useState as g, useMemo as N, useEffect as S, useRef as ve, useCallback as U } from "react";
|
|
4
4
|
import { useQuery as D, useQueryClient as Ne } from "@tanstack/react-query";
|
|
5
5
|
const be = "Available for appointments", G = "Get Appointment Unavailability", pe = "Add Appointment Unavailability", w = "Appointment Location", Me = () => {
|
|
6
6
|
try {
|
|
@@ -39,17 +39,17 @@ const be = "Available for appointments", G = "Get Appointment Unavailability", p
|
|
|
39
39
|
}, Ue = (e, a) => ({
|
|
40
40
|
locationUuid: e.locationUuid,
|
|
41
41
|
startDate: f(e.startDate, a, !1, V).formattedResult,
|
|
42
|
-
startTime:
|
|
42
|
+
startTime: O(
|
|
43
43
|
`${e.startTime} ${e.startTimePeriod}`
|
|
44
44
|
),
|
|
45
45
|
endDate: f(e.endDate, a, !1, V).formattedResult,
|
|
46
|
-
endTime:
|
|
46
|
+
endTime: O(`${e.endTime} ${e.endTimePeriod}`)
|
|
47
47
|
}), ge = (e, a) => {
|
|
48
48
|
const n = {}, t = a("ADMIN_UNAVAILABILITY_FORM_REQUIRED");
|
|
49
49
|
if (e.locationUuid || (n.location = t), e.startDate || (n.startDate = t), e.startTime || (n.startTime = t), e.endDate || (n.endDate = t), e.endTime || (n.endTime = t), e.startDate && e.startTime && e.endDate && e.endTime && e.startDate.toDateString() === e.endDate.toDateString()) {
|
|
50
|
-
const o =
|
|
50
|
+
const o = P(
|
|
51
51
|
`${e.startTime} ${e.startTimePeriod}`
|
|
52
|
-
), c =
|
|
52
|
+
), c = P(
|
|
53
53
|
`${e.endTime} ${e.endTimePeriod}`
|
|
54
54
|
);
|
|
55
55
|
o !== null && c !== null && c <= o && (n.dateTime = a("ADMIN_UNAVAILABILITY_DATETIME_ERROR_MESSAGE"));
|
|
@@ -82,11 +82,11 @@ const be = "Available for appointments", G = "Get Appointment Unavailability", p
|
|
|
82
82
|
providerUuid: s
|
|
83
83
|
}))
|
|
84
84
|
);
|
|
85
|
-
},
|
|
85
|
+
}, Se = (e) => !e.entry || e.entry.length === 0 ? [] : e.entry.map((a) => ({
|
|
86
86
|
uuid: a.resource?.id ?? "",
|
|
87
87
|
display: a.resource?.name ?? "",
|
|
88
88
|
childLocations: []
|
|
89
|
-
})),
|
|
89
|
+
})), he = () => {
|
|
90
90
|
const {
|
|
91
91
|
data: e,
|
|
92
92
|
isLoading: a,
|
|
@@ -108,7 +108,7 @@ const be = "Available for appointments", G = "Get Appointment Unavailability", p
|
|
|
108
108
|
const u = await ie(
|
|
109
109
|
w
|
|
110
110
|
);
|
|
111
|
-
return
|
|
111
|
+
return Se(u);
|
|
112
112
|
}
|
|
113
113
|
return I.filter(
|
|
114
114
|
(u) => u.tags?.some((v) => v.display === w)
|
|
@@ -137,10 +137,10 @@ const be = "Available for appointments", G = "Get Appointment Unavailability", p
|
|
|
137
137
|
isLoading: a || o || L || s,
|
|
138
138
|
isError: n || c || m || _
|
|
139
139
|
};
|
|
140
|
-
}, Be = "UnavailabilityForm-module_formContent__WmNHR",
|
|
140
|
+
}, Be = "UnavailabilityForm-module_formContent__WmNHR", Pe = "UnavailabilityForm-module_formField__8he7o", Oe = "UnavailabilityForm-module_loading__IDEY6", Ve = "UnavailabilityForm-module_error__jDeOm", Fe = "UnavailabilityForm-module_grid__t6NKR", Ce = "UnavailabilityForm-module_column__QFdnQ", Ye = "UnavailabilityForm-module_dateTimeColumn__6bi0F", xe = "UnavailabilityForm-module_datePicker__6HgbO", ke = "UnavailabilityForm-module_timePicker__DHNpK", d = {
|
|
141
141
|
formContent: Be,
|
|
142
|
-
formField:
|
|
143
|
-
loading:
|
|
142
|
+
formField: Pe,
|
|
143
|
+
loading: Oe,
|
|
144
144
|
error: Ve,
|
|
145
145
|
grid: Fe,
|
|
146
146
|
column: Ce,
|
|
@@ -152,7 +152,7 @@ const be = "Available for appointments", G = "Get Appointment Unavailability", p
|
|
|
152
152
|
formDataRef: a,
|
|
153
153
|
onClearErrors: n
|
|
154
154
|
}) => {
|
|
155
|
-
const { t } =
|
|
155
|
+
const { t } = Q(), { loginLocations: o, services: c, providers: A, isLoading: L, isError: m } = he(), [l, s] = g({
|
|
156
156
|
locationUuid: "",
|
|
157
157
|
selectedServiceItems: [],
|
|
158
158
|
selectedProviderItems: [],
|
|
@@ -212,7 +212,7 @@ const be = "Available for appointments", G = "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 = Me(), b = o.some(
|
|
218
218
|
(y) => y.uuid === i
|
|
@@ -221,12 +221,12 @@ const be = "Available for appointments", G = "Get Appointment Unavailability", p
|
|
|
221
221
|
...y,
|
|
222
222
|
locationUuid: b ? 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: M
|
|
@@ -503,8 +503,8 @@ const be = "Available for appointments", G = "Get Appointment Unavailability", p
|
|
|
503
503
|
);
|
|
504
504
|
}, qe = "index-module_page__s2h2y", Ge = {
|
|
505
505
|
page: qe
|
|
506
|
-
},
|
|
507
|
-
const { t: e } =
|
|
506
|
+
}, je = () => {
|
|
507
|
+
const { t: e } = Q(), a = Ne(), { userPrivileges: n } = oe(), { addNotification: t } = de(), [o, c] = g(!1), [A, L] = g(!1), m = ve(null), [l, s] = g({}), _ = q(
|
|
508
508
|
n,
|
|
509
509
|
G
|
|
510
510
|
), I = q(n, [
|
|
@@ -537,7 +537,7 @@ const be = "Available for appointments", G = "Get Appointment Unavailability", p
|
|
|
537
537
|
key: "providerName",
|
|
538
538
|
header: e("ADMIN_UNAVAILABILITY_COLUMN_PROVIDER")
|
|
539
539
|
}
|
|
540
|
-
], [e]), y = N(() => u ? u.map((T) => fe(T, e)) : [], [u, e]),
|
|
540
|
+
], [e]), y = N(() => u ? u.map((T) => fe(T, e)) : [], [u, e]), h = U(
|
|
541
541
|
async (T) => {
|
|
542
542
|
L(!0);
|
|
543
543
|
try {
|
|
@@ -560,15 +560,15 @@ const be = "Available for appointments", G = "Get Appointment Unavailability", p
|
|
|
560
560
|
}
|
|
561
561
|
},
|
|
562
562
|
[t, a, e]
|
|
563
|
-
),
|
|
563
|
+
), j = U(async () => {
|
|
564
564
|
if (!m.current) return;
|
|
565
565
|
const T = ge(m.current, e);
|
|
566
|
-
s(T), !(Object.keys(T).length > 0) && await
|
|
567
|
-
}, [e,
|
|
566
|
+
s(T), !(Object.keys(T).length > 0) && await h(Re(m.current, e));
|
|
567
|
+
}, [e, h]), W = U(
|
|
568
568
|
(T) => {
|
|
569
|
-
s((
|
|
570
|
-
const B = { ...
|
|
571
|
-
return T.forEach((
|
|
569
|
+
s((X) => {
|
|
570
|
+
const B = { ...X };
|
|
571
|
+
return T.forEach((J) => delete B[J]), B;
|
|
572
572
|
});
|
|
573
573
|
},
|
|
574
574
|
[]
|
|
@@ -616,7 +616,7 @@ const be = "Available for appointments", G = "Get Appointment Unavailability", p
|
|
|
616
616
|
"aria-label": "appointment-unavailability-form-panel-aria-label",
|
|
617
617
|
title: e("ADMIN_UNAVAILABILITY_FORM_TITLE"),
|
|
618
618
|
primaryButtonText: e("ADMIN_UNAVAILABILITY_FORM_ADD"),
|
|
619
|
-
onPrimaryButtonClick:
|
|
619
|
+
onPrimaryButtonClick: j,
|
|
620
620
|
isPrimaryButtonDisabled: A,
|
|
621
621
|
secondaryButtonText: e("ADMIN_UNAVAILABILITY_FORM_CANCEL"),
|
|
622
622
|
onSecondaryButtonClick: z,
|
|
@@ -636,5 +636,5 @@ const be = "Available for appointments", G = "Get Appointment Unavailability", p
|
|
|
636
636
|
);
|
|
637
637
|
};
|
|
638
638
|
export {
|
|
639
|
-
|
|
639
|
+
je as default
|
|
640
640
|
};
|