@bahmni/appointments-app 0.0.1-dev.394 → 0.0.1-dev.395
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-Cz-E1n_9-ev_6HncJ.js → DocumentsTable-C1A0EhCk-7nohhGd6.js} +19 -19
- package/dist/{FormsTable-D2iNj6MO-Cooe1uL_.js → FormsTable-C2Gb9B6j-DxbNwHv2.js} +76 -76
- package/dist/{LNWAZHJI-CMWV8frw.js → LNWAZHJI-NkAZbvuR.js} +2 -2
- package/dist/{MWZ6AO7Z-BPCEO6bV.js → MWZ6AO7Z-DxGzwtcu.js} +2 -2
- package/dist/{Observations-mnzr0Nxn-C8ffI22P.js → Observations-Clr4S77q-2GUh9NW7.js} +40 -40
- package/dist/{YPM2AS64-IiNGFbba.js → YPM2AS64-DqGSUw2Q.js} +1 -1
- package/dist/{index-B0zxSHSO.js → index-C1yXPNzY.js} +29 -29
- package/dist/{index-BnMAhwqo.js → index-CMuNDXdK.js} +10748 -10742
- package/dist/{index-CXUQOc97.js → index-D7HdHx-h.js} +54 -54
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
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 h, useRef as ve, useCallback as
|
|
2
|
+
import { X as f, a0 as O, a1 as P, a2 as V, a3 as Z, a4 as ee, a5 as te, a6 as ie, M as ae, a7 as ne, u as j, 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, v as q, aj as ce, z as me, ak as Ae, al as Ie, am as ue, H as _e, J as Te, O as Le } from "./index-CMuNDXdK.js";
|
|
3
|
+
import { useState as g, useMemo as N, useEffect as h, useRef as ve, useCallback as U } from "react";
|
|
4
4
|
import { useQuery as D, useQueryClient as Ne } from "@tanstack/react-query";
|
|
5
|
-
const be = "Available for appointments",
|
|
5
|
+
const be = "Available for appointments", G = "Get Appointment Unavailability", pe = "Add Appointment Unavailability", w = "Appointment Location", Me = () => {
|
|
6
6
|
try {
|
|
7
7
|
return Z().uuid;
|
|
8
8
|
} catch {
|
|
@@ -11,7 +11,7 @@ const be = "Available for appointments", w = "Get Appointment Unavailability", p
|
|
|
11
11
|
}, H = (e) => ({
|
|
12
12
|
id: "",
|
|
13
13
|
text: e
|
|
14
|
-
}),
|
|
14
|
+
}), ye = (e) => ({
|
|
15
15
|
display: e,
|
|
16
16
|
uuid: ""
|
|
17
17
|
}), De = (e, a) => {
|
|
@@ -25,7 +25,7 @@ const be = "Available for appointments", w = "Get Appointment Unavailability", p
|
|
|
25
25
|
text: a,
|
|
26
26
|
isSelectAll: !0
|
|
27
27
|
}), n;
|
|
28
|
-
},
|
|
28
|
+
}, Ee = (e, a) => {
|
|
29
29
|
const n = e.map((t) => ({
|
|
30
30
|
id: t.uuid,
|
|
31
31
|
text: t.person?.display,
|
|
@@ -36,20 +36,20 @@ const be = "Available for appointments", w = "Get Appointment Unavailability", p
|
|
|
36
36
|
text: a,
|
|
37
37
|
isSelectAll: !0
|
|
38
38
|
}), n;
|
|
39
|
-
},
|
|
39
|
+
}, Ue = (e, a) => ({
|
|
40
40
|
locationUuid: e.locationUuid,
|
|
41
41
|
startDate: f(e.startDate, a, !1, V).formattedResult,
|
|
42
|
-
startTime:
|
|
42
|
+
startTime: P(
|
|
43
43
|
`${e.startTime} ${e.startTimePeriod}`
|
|
44
44
|
),
|
|
45
45
|
endDate: f(e.endDate, a, !1, V).formattedResult,
|
|
46
|
-
endTime:
|
|
46
|
+
endTime: P(`${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 = O(
|
|
51
51
|
`${e.startTime} ${e.startTimePeriod}`
|
|
52
|
-
), c =
|
|
52
|
+
), c = O(
|
|
53
53
|
`${e.endTime} ${e.endTimePeriod}`
|
|
54
54
|
);
|
|
55
55
|
o !== null && c !== null && c <= o && (n.dateTime = a("ADMIN_UNAVAILABILITY_DATETIME_ERROR_MESSAGE"));
|
|
@@ -63,7 +63,7 @@ const be = "Available for appointments", w = "Get Appointment Unavailability", p
|
|
|
63
63
|
appointmentServiceName: e.service?.name ?? a("ADMIN_UNAVAILABILITY_ALL"),
|
|
64
64
|
providerName: e.provider?.name ?? a("ADMIN_UNAVAILABILITY_ALL")
|
|
65
65
|
}), K = (e) => e.filter((a) => !a.isSelectAll).map((a) => a.id), Re = (e, a) => {
|
|
66
|
-
const n =
|
|
66
|
+
const n = Ue(
|
|
67
67
|
{
|
|
68
68
|
locationUuid: e.locationUuid,
|
|
69
69
|
startDate: e.startDate,
|
|
@@ -106,12 +106,12 @@ const be = "Available for appointments", w = "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 he(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
|
|
@@ -137,13 +137,13 @@ const be = "Available for appointments", w = "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", Oe = "UnavailabilityForm-module_formField__8he7o", Pe = "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: Oe,
|
|
143
|
+
loading: Pe,
|
|
144
144
|
error: Ve,
|
|
145
|
-
grid:
|
|
146
|
-
column:
|
|
145
|
+
grid: Fe,
|
|
146
|
+
column: Ce,
|
|
147
147
|
dateTimeColumn: Ye,
|
|
148
148
|
datePicker: xe,
|
|
149
149
|
timePicker: ke
|
|
@@ -152,7 +152,7 @@ const be = "Available for appointments", w = "Get Appointment Unavailability", p
|
|
|
152
152
|
formDataRef: a,
|
|
153
153
|
onClearErrors: n
|
|
154
154
|
}) => {
|
|
155
|
-
const { t } =
|
|
155
|
+
const { t } = j(), { loginLocations: o, services: c, providers: A, isLoading: L, isError: m } = Se(), [l, s] = g({
|
|
156
156
|
locationUuid: "",
|
|
157
157
|
selectedServiceItems: [],
|
|
158
158
|
selectedProviderItems: [],
|
|
@@ -173,7 +173,7 @@ const be = "Available for appointments", w = "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", w = "Get Appointment Unavailability", p
|
|
|
195
195
|
}
|
|
196
196
|
),
|
|
197
197
|
[_]
|
|
198
|
-
),
|
|
198
|
+
), M = N(
|
|
199
199
|
() => R(
|
|
200
200
|
!1,
|
|
201
201
|
!1,
|
|
202
|
-
|
|
202
|
+
Ee(
|
|
203
203
|
I,
|
|
204
204
|
t("ADMIN_UNAVAILABILITY_FORM_ALL_PROVIDERS")
|
|
205
205
|
),
|
|
@@ -214,11 +214,11 @@ const be = "Available for appointments", w = "Get Appointment Unavailability", p
|
|
|
214
214
|
);
|
|
215
215
|
return h(() => {
|
|
216
216
|
if (o.length === 0) return;
|
|
217
|
-
const i =
|
|
218
|
-
(
|
|
217
|
+
const i = Me(), 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]), h(() => {
|
|
@@ -229,9 +229,9 @@ const be = "Available for appointments", w = "Get Appointment Unavailability", p
|
|
|
229
229
|
}, [v]), h(() => {
|
|
230
230
|
I.length > 0 && s((i) => ({
|
|
231
231
|
...i,
|
|
232
|
-
selectedProviderItems:
|
|
232
|
+
selectedProviderItems: M
|
|
233
233
|
}));
|
|
234
|
-
}, [
|
|
234
|
+
}, [M]), a.current = {
|
|
235
235
|
...l,
|
|
236
236
|
filteredServicesCount: _.length,
|
|
237
237
|
availableProvidersCount: I.length
|
|
@@ -290,7 +290,7 @@ const be = "Available for appointments", w = "Get Appointment Unavailability", p
|
|
|
290
290
|
className: d.grid,
|
|
291
291
|
children: [
|
|
292
292
|
/* @__PURE__ */ p(
|
|
293
|
-
|
|
293
|
+
E,
|
|
294
294
|
{
|
|
295
295
|
id: "unavailability-form-start-date-time",
|
|
296
296
|
"data-testid": "unavailability-form-start-date-time-test-id",
|
|
@@ -301,10 +301,10 @@ const be = "Available for appointments", w = "Get Appointment Unavailability", p
|
|
|
301
301
|
className: `${d.column} ${d.dateTimeColumn}`,
|
|
302
302
|
children: [
|
|
303
303
|
/* @__PURE__ */ r(
|
|
304
|
-
|
|
304
|
+
F,
|
|
305
305
|
{
|
|
306
306
|
datePickerType: "single",
|
|
307
|
-
minDate:
|
|
307
|
+
minDate: C(),
|
|
308
308
|
value: l.startDate ?? void 0,
|
|
309
309
|
onChange: (i) => {
|
|
310
310
|
i[0] && (n(["startDate", "dateTime"]), s({
|
|
@@ -365,7 +365,7 @@ const be = "Available for appointments", w = "Get Appointment Unavailability", p
|
|
|
365
365
|
}
|
|
366
366
|
),
|
|
367
367
|
/* @__PURE__ */ p(
|
|
368
|
-
|
|
368
|
+
E,
|
|
369
369
|
{
|
|
370
370
|
id: "unavailability-form-end-date-time",
|
|
371
371
|
"data-testid": "unavailability-form-end-date-time-test-id",
|
|
@@ -376,10 +376,10 @@ const be = "Available for appointments", w = "Get Appointment Unavailability", p
|
|
|
376
376
|
className: `${d.column} ${d.dateTimeColumn}`,
|
|
377
377
|
children: [
|
|
378
378
|
/* @__PURE__ */ r(
|
|
379
|
-
|
|
379
|
+
F,
|
|
380
380
|
{
|
|
381
381
|
datePickerType: "single",
|
|
382
|
-
minDate: l.startDate ??
|
|
382
|
+
minDate: l.startDate ?? C(),
|
|
383
383
|
value: l.endDate ?? void 0,
|
|
384
384
|
onChange: (i) => {
|
|
385
385
|
i[0] && (n(["endDate", "dateTime"]), s({
|
|
@@ -440,7 +440,7 @@ const be = "Available for appointments", w = "Get Appointment Unavailability", p
|
|
|
440
440
|
}
|
|
441
441
|
),
|
|
442
442
|
/* @__PURE__ */ r(
|
|
443
|
-
|
|
443
|
+
E,
|
|
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", w = "Get Appointment Unavailability", p
|
|
|
468
468
|
}
|
|
469
469
|
),
|
|
470
470
|
/* @__PURE__ */ r(
|
|
471
|
-
|
|
471
|
+
E,
|
|
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", w = "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: M,
|
|
488
488
|
itemToString: (i) => i?.text ?? "",
|
|
489
489
|
selectedItems: l.selectedProviderItems,
|
|
490
490
|
onChange: (i) => s({
|
|
@@ -501,16 +501,16 @@ const be = "Available for appointments", w = "Get Appointment Unavailability", p
|
|
|
501
501
|
]
|
|
502
502
|
}
|
|
503
503
|
);
|
|
504
|
-
}, qe = "index-module_page__s2h2y",
|
|
504
|
+
}, qe = "index-module_page__s2h2y", Ge = {
|
|
505
505
|
page: qe
|
|
506
|
-
},
|
|
507
|
-
const { t: e } =
|
|
506
|
+
}, Qe = () => {
|
|
507
|
+
const { t: e } = j(), 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, [
|
|
511
511
|
pe,
|
|
512
|
-
|
|
513
|
-
]), { data: u, isLoading: v, isError:
|
|
512
|
+
G
|
|
513
|
+
]), { data: u, isLoading: v, isError: M } = D({
|
|
514
514
|
queryKey: ["appointmentUnavailabilities"],
|
|
515
515
|
queryFn: ce,
|
|
516
516
|
enabled: _
|
|
@@ -537,7 +537,7 @@ const be = "Available for appointments", w = "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]), S = U(
|
|
541
541
|
async (T) => {
|
|
542
542
|
L(!0);
|
|
543
543
|
try {
|
|
@@ -560,11 +560,11 @@ const be = "Available for appointments", w = "Get Appointment Unavailability", p
|
|
|
560
560
|
}
|
|
561
561
|
},
|
|
562
562
|
[t, a, e]
|
|
563
|
-
),
|
|
563
|
+
), Q = U(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 S(Re(m.current, e));
|
|
567
|
-
}, [e, S]),
|
|
567
|
+
}, [e, S]), W = U(
|
|
568
568
|
(T) => {
|
|
569
569
|
s((J) => {
|
|
570
570
|
const B = { ...J };
|
|
@@ -572,7 +572,7 @@ const be = "Available for appointments", w = "Get Appointment Unavailability", p
|
|
|
572
572
|
});
|
|
573
573
|
},
|
|
574
574
|
[]
|
|
575
|
-
),
|
|
575
|
+
), z = U(() => {
|
|
576
576
|
c(!1), m.current = null, s({});
|
|
577
577
|
}, []);
|
|
578
578
|
return /* @__PURE__ */ r(
|
|
@@ -586,7 +586,7 @@ const be = "Available for appointments", w = "Get Appointment Unavailability", p
|
|
|
586
586
|
id: "appointment-unavailability-page",
|
|
587
587
|
"data-testid": "appointment-unavailability-page-test-id",
|
|
588
588
|
"aria-label": "appointment-unavailability-page-aria-label",
|
|
589
|
-
className:
|
|
589
|
+
className: Ge.page,
|
|
590
590
|
children: /* @__PURE__ */ r(
|
|
591
591
|
_e,
|
|
592
592
|
{
|
|
@@ -595,10 +595,10 @@ const be = "Available for appointments", w = "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: M ? 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"),
|
|
@@ -616,17 +616,17 @@ const be = "Available for appointments", w = "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: Q,
|
|
620
620
|
isPrimaryButtonDisabled: A,
|
|
621
621
|
secondaryButtonText: e("ADMIN_UNAVAILABILITY_FORM_CANCEL"),
|
|
622
|
-
onSecondaryButtonClick:
|
|
622
|
+
onSecondaryButtonClick: z,
|
|
623
623
|
isSecondaryButtonDisabled: A,
|
|
624
624
|
content: /* @__PURE__ */ r(
|
|
625
625
|
$e,
|
|
626
626
|
{
|
|
627
627
|
errors: l,
|
|
628
628
|
formDataRef: m,
|
|
629
|
-
onClearErrors:
|
|
629
|
+
onClearErrors: W
|
|
630
630
|
}
|
|
631
631
|
)
|
|
632
632
|
}
|
|
@@ -636,5 +636,5 @@ const be = "Available for appointments", w = "Get Appointment Unavailability", p
|
|
|
636
636
|
);
|
|
637
637
|
};
|
|
638
638
|
export {
|
|
639
|
-
|
|
639
|
+
Qe as default
|
|
640
640
|
};
|
package/dist/index.js
CHANGED