@bahmni/appointments-app 0.0.1-dev.304 → 0.0.1-dev.310
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-BRN1ibfx-D8mfBXSe.js → DocumentsTable-CaUlpFeN-tP3Ae1Oq.js} +33 -33
- package/dist/{FormsTable-u8hD7pNk-qzWGlOCB.js → FormsTable-DQSl0827-Dd7VMHeO.js} +64 -64
- package/dist/{LNWAZHJI-Dg48uTT1.js → LNWAZHJI-GlIhJZrA.js} +2 -2
- package/dist/{MWZ6AO7Z-CD1aKjwW.js → MWZ6AO7Z-CApsd_-m.js} +2 -2
- package/dist/{Observations-DUdH2i49-CoCPm7fD.js → Observations-BIksHFko-BwXwvrEO.js} +43 -43
- package/dist/{YPM2AS64-DI4sX8te.js → YPM2AS64-BLWysMFu.js} +1 -1
- package/dist/{index-85wcKDtk.js → index-BqA0gDZR.js} +41 -41
- package/dist/{index-CdyKXvT4.js → index-Cx_n4bX4.js} +123764 -123615
- package/dist/{index-B2M5V2AS.js → index-oGx1tICP.js} +40 -40
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { jsx as r, jsxs as b } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { R as f, S as P, T as O, W as V, X as z, Y as ee, Z as te, a0 as ie, C 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, w as oe, J as de, B as $, ad as ce, D as me, ae as Ae, af as Ie, ag as ue, I as _e, K as Te } from "./index-Cx_n4bX4.js";
|
|
3
3
|
import { useState as g, useMemo as N, useEffect as S, useRef as Le, useCallback as U } from "react";
|
|
4
|
-
import { useQuery as
|
|
5
|
-
const Ne = "Available for appointments", q = "Get Appointment Unavailability", pe = "Add Appointment Unavailability",
|
|
4
|
+
import { useQuery as M, useQueryClient as ve } from "@tanstack/react-query";
|
|
5
|
+
const Ne = "Available for appointments", q = "Get Appointment Unavailability", pe = "Add Appointment Unavailability", w = "Appointment Location", be = () => {
|
|
6
6
|
try {
|
|
7
|
-
return
|
|
7
|
+
return z().uuid;
|
|
8
8
|
} catch {
|
|
9
9
|
return "";
|
|
10
10
|
}
|
|
11
|
-
},
|
|
11
|
+
}, G = (e) => ({
|
|
12
12
|
id: "",
|
|
13
13
|
text: e
|
|
14
|
-
}),
|
|
14
|
+
}), De = (e) => ({
|
|
15
15
|
display: e,
|
|
16
16
|
uuid: ""
|
|
17
|
-
}),
|
|
17
|
+
}), ye = (e, a) => {
|
|
18
18
|
const n = e.map((t) => ({
|
|
19
19
|
id: t.uuid,
|
|
20
20
|
text: t.name,
|
|
@@ -25,7 +25,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
25
25
|
text: a,
|
|
26
26
|
isSelectAll: !0
|
|
27
27
|
}), n;
|
|
28
|
-
},
|
|
28
|
+
}, Me = (e, a) => {
|
|
29
29
|
const n = e.map((t) => ({
|
|
30
30
|
id: t.uuid,
|
|
31
31
|
text: t.person?.display,
|
|
@@ -91,14 +91,14 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
91
91
|
data: e,
|
|
92
92
|
isLoading: a,
|
|
93
93
|
isError: n
|
|
94
|
-
} =
|
|
94
|
+
} = M({
|
|
95
95
|
queryKey: ["currentUser"],
|
|
96
96
|
queryFn: ee
|
|
97
97
|
}), {
|
|
98
98
|
data: t = [],
|
|
99
99
|
isLoading: o,
|
|
100
100
|
isError: c
|
|
101
|
-
} =
|
|
101
|
+
} = M({
|
|
102
102
|
queryKey: ["providerLoginLocations", e?.uuid],
|
|
103
103
|
queryFn: async () => {
|
|
104
104
|
const I = await te(
|
|
@@ -106,12 +106,12 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
106
106
|
);
|
|
107
107
|
if (I.length === 0) {
|
|
108
108
|
const u = await ie(
|
|
109
|
-
|
|
109
|
+
w
|
|
110
110
|
);
|
|
111
111
|
return Re(u);
|
|
112
112
|
}
|
|
113
113
|
return I.filter(
|
|
114
|
-
(u) => u.tags?.some((v) => v.display ===
|
|
114
|
+
(u) => u.tags?.some((v) => v.display === w)
|
|
115
115
|
);
|
|
116
116
|
},
|
|
117
117
|
enabled: !!e?.uuid
|
|
@@ -119,14 +119,14 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
119
119
|
data: A = [],
|
|
120
120
|
isLoading: L,
|
|
121
121
|
isError: m
|
|
122
|
-
} =
|
|
122
|
+
} = M({
|
|
123
123
|
queryKey: ["appointmentServices"],
|
|
124
124
|
queryFn: ae
|
|
125
125
|
}), {
|
|
126
126
|
data: l = [],
|
|
127
127
|
isLoading: s,
|
|
128
128
|
isError: _
|
|
129
|
-
} =
|
|
129
|
+
} = M({
|
|
130
130
|
queryKey: ["providers"],
|
|
131
131
|
queryFn: ne
|
|
132
132
|
});
|
|
@@ -173,7 +173,7 @@ const Ne = "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, De, {
|
|
177
177
|
loading: "",
|
|
178
178
|
error: "",
|
|
179
179
|
empty: t("ADMIN_UNAVAILABILITY_FORM_NO_LOCATIONS")
|
|
@@ -183,11 +183,11 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
183
183
|
() => R(
|
|
184
184
|
!1,
|
|
185
185
|
!1,
|
|
186
|
-
|
|
186
|
+
ye(
|
|
187
187
|
_,
|
|
188
188
|
t("ADMIN_UNAVAILABILITY_FORM_ALL_SERVICES")
|
|
189
189
|
),
|
|
190
|
-
|
|
190
|
+
G,
|
|
191
191
|
{
|
|
192
192
|
loading: "",
|
|
193
193
|
error: "",
|
|
@@ -195,15 +195,15 @@ const Ne = "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
|
+
Me(
|
|
203
203
|
I,
|
|
204
204
|
t("ADMIN_UNAVAILABILITY_FORM_ALL_PROVIDERS")
|
|
205
205
|
),
|
|
206
|
-
|
|
206
|
+
G,
|
|
207
207
|
{
|
|
208
208
|
loading: "",
|
|
209
209
|
error: "",
|
|
@@ -215,10 +215,10 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
215
215
|
return S(() => {
|
|
216
216
|
if (o.length === 0) return;
|
|
217
217
|
const i = be(), p = o.some(
|
|
218
|
-
(
|
|
218
|
+
(y) => y.uuid === i
|
|
219
219
|
);
|
|
220
|
-
s((
|
|
221
|
-
...
|
|
220
|
+
s((y) => ({
|
|
221
|
+
...y,
|
|
222
222
|
locationUuid: p ? i : ""
|
|
223
223
|
}));
|
|
224
224
|
}, [o]), S(() => {
|
|
@@ -229,9 +229,9 @@ const Ne = "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
|
|
@@ -450,7 +450,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
450
450
|
lg: 8,
|
|
451
451
|
className: d.column,
|
|
452
452
|
children: /* @__PURE__ */ r(
|
|
453
|
-
|
|
453
|
+
H,
|
|
454
454
|
{
|
|
455
455
|
id: "service-multiselect",
|
|
456
456
|
"data-testid": "service-multiselect",
|
|
@@ -478,13 +478,13 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
478
478
|
lg: 8,
|
|
479
479
|
className: d.column,
|
|
480
480
|
children: /* @__PURE__ */ r(
|
|
481
|
-
|
|
481
|
+
H,
|
|
482
482
|
{
|
|
483
483
|
id: "provider-multiselect",
|
|
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({
|
|
@@ -501,8 +501,8 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
501
501
|
]
|
|
502
502
|
}
|
|
503
503
|
);
|
|
504
|
-
},
|
|
505
|
-
page:
|
|
504
|
+
}, He = "index-module_page__s2h2y", $e = {
|
|
505
|
+
page: He
|
|
506
506
|
}, Qe = () => {
|
|
507
507
|
const { t: e } = Q(), a = ve(), { userPrivileges: n } = oe(), { addNotification: t } = de(), [o, c] = g(!1), [A, L] = g(!1), m = Le(null), [l, s] = g({}), _ = $(
|
|
508
508
|
n,
|
|
@@ -510,7 +510,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
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 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]),
|
|
540
|
+
], [e]), y = N(() => u ? u.map((T) => ge(T, e)) : [], [u, e]), h = U(
|
|
541
541
|
async (T) => {
|
|
542
542
|
L(!0);
|
|
543
543
|
try {
|
|
@@ -564,15 +564,15 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
564
564
|
if (!m.current) return;
|
|
565
565
|
const T = Ue(m.current, e);
|
|
566
566
|
s(T), !(Object.keys(T).length > 0) && await h(fe(m.current, e));
|
|
567
|
-
}, [e, h]),
|
|
567
|
+
}, [e, h]), J = U(
|
|
568
568
|
(T) => {
|
|
569
|
-
s((
|
|
570
|
-
const B = { ...
|
|
571
|
-
return T.forEach((
|
|
569
|
+
s((X) => {
|
|
570
|
+
const B = { ...X };
|
|
571
|
+
return T.forEach((Z) => delete B[Z]), B;
|
|
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(
|
|
@@ -595,10 +595,10 @@ const Ne = "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: p,
|
|
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,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
|
}
|