@bahmni/appointments-app 0.0.1-dev.374 → 0.0.1-dev.375
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-Cx3H-xNc-DBQpfty0.js → DocumentsTable-Dcy-W7Gb-CqfXnHok.js} +10 -10
- package/dist/{FormsTable-BRgVe8lS-BwEn3xHh.js → FormsTable-BncKn8RO-CRUU-wIL.js} +50 -50
- package/dist/{LNWAZHJI-DONWiCcE.js → LNWAZHJI-Q8vd3r0i.js} +2 -2
- package/dist/{MWZ6AO7Z-DUEio9jI.js → MWZ6AO7Z-BtRCbHUQ.js} +2 -2
- package/dist/{Observations-BZ0HyAoB-BaYywK1u.js → Observations-BNztTkr8-4l7UpWbS.js} +37 -37
- package/dist/{YPM2AS64-BRt08MSG.js → YPM2AS64-nIz2f1HE.js} +1 -1
- package/dist/{index-DblS1eQP.js → index-CQneCT4a.js} +35 -35
- package/dist/{index-hZSxk8Qj.js → index-DAsY1pGM.js} +17168 -17119
- package/dist/{index-_cpREWKn.js → index-DQ5fGOFT.js} +25 -25
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsx as r, jsxs as p } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { useState as g, useMemo as N, useEffect as S, useRef as ve, useCallback as
|
|
2
|
+
import { X as f, a0 as O, a1 as P, a2 as V, a3 as J, a4 as ee, a5 as te, a6 as ie, O as ae, a7 as ne, u as K, a8 as R, a9 as le, aa as re, ab as se, ac as U, ad as F, ae as C, af as Y, ag as k, ah as x, ai as H, Q as oe, G as de, r as $, aj as ce, t as me, ak as Ae, al as Ie, am as ue, v as _e, y as Te, D as Le } from "./index-DAsY1pGM.js";
|
|
3
|
+
import { useState as g, useMemo as N, useEffect as S, useRef as ve, useCallback as E } from "react";
|
|
4
4
|
import { useQuery as M, useQueryClient as Ne } from "@tanstack/react-query";
|
|
5
|
-
const be = "Available for appointments", q = "Get Appointment Unavailability", pe = "Add Appointment Unavailability", G = "Appointment Location",
|
|
5
|
+
const be = "Available for appointments", q = "Get Appointment Unavailability", pe = "Add Appointment Unavailability", G = "Appointment Location", De = () => {
|
|
6
6
|
try {
|
|
7
|
-
return
|
|
7
|
+
return J().uuid;
|
|
8
8
|
} catch {
|
|
9
9
|
return "";
|
|
10
10
|
}
|
|
11
11
|
}, w = (e) => ({
|
|
12
12
|
id: "",
|
|
13
13
|
text: e
|
|
14
|
-
}),
|
|
14
|
+
}), ye = (e) => ({
|
|
15
15
|
display: e,
|
|
16
16
|
uuid: ""
|
|
17
17
|
}), Me = (e, a) => {
|
|
@@ -25,7 +25,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
25
25
|
text: a,
|
|
26
26
|
isSelectAll: !0
|
|
27
27
|
}), n;
|
|
28
|
-
},
|
|
28
|
+
}, Ue = (e, a) => {
|
|
29
29
|
const n = e.map((t) => ({
|
|
30
30
|
id: t.uuid,
|
|
31
31
|
text: t.person?.display,
|
|
@@ -36,7 +36,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
36
36
|
text: a,
|
|
37
37
|
isSelectAll: !0
|
|
38
38
|
}), n;
|
|
39
|
-
},
|
|
39
|
+
}, Ee = (e, a) => ({
|
|
40
40
|
locationUuid: e.locationUuid,
|
|
41
41
|
startDate: f(e.startDate, a, !1, V).formattedResult,
|
|
42
42
|
startTime: P(
|
|
@@ -62,8 +62,8 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
62
62
|
locationName: e.location.name,
|
|
63
63
|
appointmentServiceName: e.service?.name ?? a("ADMIN_UNAVAILABILITY_ALL"),
|
|
64
64
|
providerName: e.provider?.name ?? a("ADMIN_UNAVAILABILITY_ALL")
|
|
65
|
-
}),
|
|
66
|
-
const n =
|
|
65
|
+
}), Q = (e) => e.filter((a) => !a.isSelectAll).map((a) => a.id), Re = (e, a) => {
|
|
66
|
+
const n = Ee(
|
|
67
67
|
{
|
|
68
68
|
locationUuid: e.locationUuid,
|
|
69
69
|
startDate: e.startDate,
|
|
@@ -74,7 +74,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
74
74
|
endTimePeriod: e.endTimePeriod
|
|
75
75
|
},
|
|
76
76
|
a
|
|
77
|
-
), t =
|
|
77
|
+
), t = Q(e.selectedServiceItems), o = Q(e.selectedProviderItems), A = t.length === e.filteredServicesCount || t.length === 0 ? [void 0] : t, m = o.length === e.availableProvidersCount || o.length === 0 ? [void 0] : o;
|
|
78
78
|
return A.flatMap(
|
|
79
79
|
(l) => m.map((s) => ({
|
|
80
80
|
...n,
|
|
@@ -152,7 +152,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
152
152
|
formDataRef: a,
|
|
153
153
|
onClearErrors: n
|
|
154
154
|
}) => {
|
|
155
|
-
const { t } =
|
|
155
|
+
const { t } = K(), { loginLocations: o, services: c, providers: A, isLoading: L, isError: m } = he(), [l, s] = g({
|
|
156
156
|
locationUuid: "",
|
|
157
157
|
selectedServiceItems: [],
|
|
158
158
|
selectedProviderItems: [],
|
|
@@ -173,7 +173,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
173
173
|
),
|
|
174
174
|
[A]
|
|
175
175
|
), u = N(
|
|
176
|
-
() => R(!1, !1, o,
|
|
176
|
+
() => R(!1, !1, o, ye, {
|
|
177
177
|
loading: "",
|
|
178
178
|
error: "",
|
|
179
179
|
empty: t("ADMIN_UNAVAILABILITY_FORM_NO_LOCATIONS")
|
|
@@ -195,11 +195,11 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
195
195
|
}
|
|
196
196
|
),
|
|
197
197
|
[_]
|
|
198
|
-
),
|
|
198
|
+
), D = N(
|
|
199
199
|
() => R(
|
|
200
200
|
!1,
|
|
201
201
|
!1,
|
|
202
|
-
|
|
202
|
+
Ue(
|
|
203
203
|
I,
|
|
204
204
|
t("ADMIN_UNAVAILABILITY_FORM_ALL_PROVIDERS")
|
|
205
205
|
),
|
|
@@ -214,11 +214,11 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
214
214
|
);
|
|
215
215
|
return S(() => {
|
|
216
216
|
if (o.length === 0) return;
|
|
217
|
-
const i =
|
|
218
|
-
(
|
|
217
|
+
const i = De(), b = o.some(
|
|
218
|
+
(y) => y.uuid === i
|
|
219
219
|
);
|
|
220
|
-
s((
|
|
221
|
-
...
|
|
220
|
+
s((y) => ({
|
|
221
|
+
...y,
|
|
222
222
|
locationUuid: b ? i : ""
|
|
223
223
|
}));
|
|
224
224
|
}, [o]), S(() => {
|
|
@@ -229,9 +229,9 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
229
229
|
}, [v]), S(() => {
|
|
230
230
|
I.length > 0 && s((i) => ({
|
|
231
231
|
...i,
|
|
232
|
-
selectedProviderItems:
|
|
232
|
+
selectedProviderItems: D
|
|
233
233
|
}));
|
|
234
|
-
}, [
|
|
234
|
+
}, [D]), a.current = {
|
|
235
235
|
...l,
|
|
236
236
|
filteredServicesCount: _.length,
|
|
237
237
|
availableProvidersCount: I.length
|
|
@@ -290,7 +290,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
290
290
|
className: d.grid,
|
|
291
291
|
children: [
|
|
292
292
|
/* @__PURE__ */ p(
|
|
293
|
-
|
|
293
|
+
U,
|
|
294
294
|
{
|
|
295
295
|
id: "unavailability-form-start-date-time",
|
|
296
296
|
"data-testid": "unavailability-form-start-date-time-test-id",
|
|
@@ -365,7 +365,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
365
365
|
}
|
|
366
366
|
),
|
|
367
367
|
/* @__PURE__ */ p(
|
|
368
|
-
|
|
368
|
+
U,
|
|
369
369
|
{
|
|
370
370
|
id: "unavailability-form-end-date-time",
|
|
371
371
|
"data-testid": "unavailability-form-end-date-time-test-id",
|
|
@@ -440,7 +440,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
440
440
|
}
|
|
441
441
|
),
|
|
442
442
|
/* @__PURE__ */ r(
|
|
443
|
-
|
|
443
|
+
U,
|
|
444
444
|
{
|
|
445
445
|
id: "unavailability-form-service",
|
|
446
446
|
"data-testid": "unavailability-form-service-test-id",
|
|
@@ -468,7 +468,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
468
468
|
}
|
|
469
469
|
),
|
|
470
470
|
/* @__PURE__ */ r(
|
|
471
|
-
|
|
471
|
+
U,
|
|
472
472
|
{
|
|
473
473
|
id: "unavailability-form-provider",
|
|
474
474
|
"data-testid": "unavailability-form-provider-test-id",
|
|
@@ -484,7 +484,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
484
484
|
"data-testid": "provider-multiselect",
|
|
485
485
|
titleText: t("ADMIN_UNAVAILABILITY_FORM_PROVIDER_LABEL"),
|
|
486
486
|
placeholder: t("ADMIN_UNAVAILABILITY_FORM_PROVIDER_LABEL"),
|
|
487
|
-
items:
|
|
487
|
+
items: D,
|
|
488
488
|
itemToString: (i) => i?.text ?? "",
|
|
489
489
|
selectedItems: l.selectedProviderItems,
|
|
490
490
|
onChange: (i) => s({
|
|
@@ -504,13 +504,13 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
504
504
|
}, $e = "index-module_page__s2h2y", qe = {
|
|
505
505
|
page: $e
|
|
506
506
|
}, je = () => {
|
|
507
|
-
const { t: e } =
|
|
507
|
+
const { t: e } = K(), a = Ne(), { userPrivileges: n } = oe(), { addNotification: t } = de(), [o, c] = g(!1), [A, L] = g(!1), m = ve(null), [l, s] = g({}), _ = $(
|
|
508
508
|
n,
|
|
509
509
|
q
|
|
510
510
|
), I = $(n, [
|
|
511
511
|
pe,
|
|
512
512
|
q
|
|
513
|
-
]), { data: u, isLoading: v, isError:
|
|
513
|
+
]), { data: u, isLoading: v, isError: D } = M({
|
|
514
514
|
queryKey: ["appointmentUnavailabilities"],
|
|
515
515
|
queryFn: ce,
|
|
516
516
|
enabled: _
|
|
@@ -537,7 +537,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
537
537
|
key: "providerName",
|
|
538
538
|
header: e("ADMIN_UNAVAILABILITY_COLUMN_PROVIDER")
|
|
539
539
|
}
|
|
540
|
-
], [e]),
|
|
540
|
+
], [e]), y = N(() => u ? u.map((T) => fe(T, e)) : [], [u, e]), h = E(
|
|
541
541
|
async (T) => {
|
|
542
542
|
L(!0);
|
|
543
543
|
try {
|
|
@@ -560,19 +560,19 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
560
560
|
}
|
|
561
561
|
},
|
|
562
562
|
[t, a, e]
|
|
563
|
-
), j =
|
|
563
|
+
), j = E(async () => {
|
|
564
564
|
if (!m.current) return;
|
|
565
565
|
const T = ge(m.current, e);
|
|
566
566
|
s(T), !(Object.keys(T).length > 0) && await h(Re(m.current, e));
|
|
567
|
-
}, [e, h]), W =
|
|
567
|
+
}, [e, h]), W = E(
|
|
568
568
|
(T) => {
|
|
569
569
|
s((Z) => {
|
|
570
570
|
const B = { ...Z };
|
|
571
|
-
return T.forEach((
|
|
571
|
+
return T.forEach((z) => delete B[z]), B;
|
|
572
572
|
});
|
|
573
573
|
},
|
|
574
574
|
[]
|
|
575
|
-
),
|
|
575
|
+
), X = E(() => {
|
|
576
576
|
c(!1), m.current = null, s({});
|
|
577
577
|
}, []);
|
|
578
578
|
return /* @__PURE__ */ r(
|
|
@@ -595,10 +595,10 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
595
595
|
"aria-label": "appointment-unavailability-actions-table-aria-label",
|
|
596
596
|
title: e("ADMIN_UNAVAILABILITY_TITLE"),
|
|
597
597
|
headers: b,
|
|
598
|
-
rows:
|
|
598
|
+
rows: y,
|
|
599
599
|
ariaLabel: "unavailability-table",
|
|
600
600
|
loading: v,
|
|
601
|
-
errorStateMessage:
|
|
601
|
+
errorStateMessage: D ? e("ADMIN_UNAVAILABILITY_ERROR_MESSAGE") : null,
|
|
602
602
|
emptyStateMessage: e("ADMIN_UNAVAILABILITY_EMPTY_MESSAGE"),
|
|
603
603
|
actionButton: !o && I ? {
|
|
604
604
|
label: e("ADMIN_UNAVAILABILITY_ADD_BUTTON"),
|
|
@@ -619,7 +619,7 @@ const be = "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: X,
|
|
623
623
|
isSecondaryButtonDisabled: A,
|
|
624
624
|
content: /* @__PURE__ */ r(
|
|
625
625
|
He,
|