@bahmni/appointments-app 0.0.1-dev.329 → 0.0.1-dev.331
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-y7KKSEft-Bu2e155r.js → DocumentsTable-BWdWCSEF-Cpnzq0wf.js} +43 -43
- package/dist/FormsTable-BeIgWoc7-BPWtraA4.js +234 -0
- package/dist/{LNWAZHJI-C9TP9MTc.js → LNWAZHJI-N8VLUrXt.js} +2 -2
- package/dist/{MWZ6AO7Z-tcjSIrcv.js → MWZ6AO7Z-m58ABGmj.js} +2 -2
- package/dist/{Observations-BVrVtdFC-CBFpx7Yu.js → Observations-BjoSIa29-rm3uPnHU.js} +58 -58
- package/dist/{YPM2AS64-CdtvSJkL.js → YPM2AS64-CJKBvHg9.js} +1 -1
- package/dist/{index-BP9aJpz3.js → index-CX3JDWBT.js} +48 -48
- package/dist/{index-DUl_sIXv.js → index-YPHzSbMw.js} +42 -42
- package/dist/{index-Bjd0Amzt.js → index-rGSUMz8Z.js} +75372 -64266
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/FormsTable-DWjxOeF0-BW0BApo4.js +0 -234
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as r, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import { M as f, N as B, O, Q as V, S as Z, T as ee, Y as te, a0 as ie, X 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, C as oe, q as de, D as $, ad as ce, F as me, ae as Ae, af as Ie, ag as ue, I as _e, J as Te } from "./index-rGSUMz8Z.js";
|
|
3
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
|
-
const Ne = "Available for appointments", q = "Get Appointment Unavailability",
|
|
5
|
+
const Ne = "Available for appointments", q = "Get Appointment Unavailability", be = "Add Appointment Unavailability", w = "Appointment Location", pe = () => {
|
|
6
6
|
try {
|
|
7
7
|
return Z().uuid;
|
|
8
8
|
} catch {
|
|
@@ -11,10 +11,10 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
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,
|
|
@@ -47,9 +47,9 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
47
47
|
}), Ue = (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 = B(
|
|
51
51
|
`${e.startTime} ${e.startTimePeriod}`
|
|
52
|
-
), c =
|
|
52
|
+
), c = B(
|
|
53
53
|
`${e.endTime} ${e.endTimePeriod}`
|
|
54
54
|
);
|
|
55
55
|
o !== null && c !== null && c <= o && (n.dateTime = a("ADMIN_UNAVAILABILITY_DATETIME_ERROR_MESSAGE"));
|
|
@@ -137,10 +137,10 @@ 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
|
-
}, he = "UnavailabilityForm-module_formContent__WmNHR",
|
|
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
141
|
formContent: he,
|
|
142
|
-
formField:
|
|
143
|
-
loading:
|
|
142
|
+
formField: Pe,
|
|
143
|
+
loading: Be,
|
|
144
144
|
error: Oe,
|
|
145
145
|
grid: Ve,
|
|
146
146
|
column: Fe,
|
|
@@ -168,12 +168,12 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
168
168
|
), I = N(
|
|
169
169
|
() => A.filter(
|
|
170
170
|
(i) => i.attributes?.some(
|
|
171
|
-
(
|
|
171
|
+
(b) => b.attributeType?.display === Ne && b.value
|
|
172
172
|
)
|
|
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,7 +183,7 @@ 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
|
),
|
|
@@ -195,7 +195,7 @@ 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,
|
|
@@ -214,12 +214,12 @@ const Ne = "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 = pe(), b = o.some(
|
|
218
|
+
(y) => y.uuid === i
|
|
219
219
|
);
|
|
220
|
-
s((
|
|
221
|
-
...
|
|
222
|
-
locationUuid:
|
|
220
|
+
s((y) => ({
|
|
221
|
+
...y,
|
|
222
|
+
locationUuid: b ? i : ""
|
|
223
223
|
}));
|
|
224
224
|
}, [o]), S(() => {
|
|
225
225
|
_.length > 0 && s((i) => ({
|
|
@@ -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
|
|
@@ -250,7 +250,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
250
250
|
className: d.error,
|
|
251
251
|
children: t("ADMIN_UNAVAILABILITY_FORM_LOAD_ERROR_MESSAGE")
|
|
252
252
|
}
|
|
253
|
-
) : /* @__PURE__ */
|
|
253
|
+
) : /* @__PURE__ */ p(
|
|
254
254
|
"div",
|
|
255
255
|
{
|
|
256
256
|
id: "unavailability-form-content",
|
|
@@ -281,7 +281,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
281
281
|
invalidText: e.location
|
|
282
282
|
}
|
|
283
283
|
) }),
|
|
284
|
-
/* @__PURE__ */
|
|
284
|
+
/* @__PURE__ */ p(
|
|
285
285
|
se,
|
|
286
286
|
{
|
|
287
287
|
id: "unavailability-form-grid",
|
|
@@ -289,7 +289,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
289
289
|
"aria-label": "unavailability-form-grid-aria-label",
|
|
290
290
|
className: d.grid,
|
|
291
291
|
children: [
|
|
292
|
-
/* @__PURE__ */
|
|
292
|
+
/* @__PURE__ */ p(
|
|
293
293
|
E,
|
|
294
294
|
{
|
|
295
295
|
id: "unavailability-form-start-date-time",
|
|
@@ -341,7 +341,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
341
341
|
pattern: "(1[012]|[0-9]):[0-5][0-9]",
|
|
342
342
|
use24HourFormat: !1,
|
|
343
343
|
className: d.timePicker,
|
|
344
|
-
children: /* @__PURE__ */
|
|
344
|
+
children: /* @__PURE__ */ p(
|
|
345
345
|
k,
|
|
346
346
|
{
|
|
347
347
|
id: "start-time-period",
|
|
@@ -364,7 +364,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
364
364
|
]
|
|
365
365
|
}
|
|
366
366
|
),
|
|
367
|
-
/* @__PURE__ */
|
|
367
|
+
/* @__PURE__ */ p(
|
|
368
368
|
E,
|
|
369
369
|
{
|
|
370
370
|
id: "unavailability-form-end-date-time",
|
|
@@ -416,7 +416,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
416
416
|
pattern: "(1[012]|[0-9]):[0-5][0-9]",
|
|
417
417
|
use24HourFormat: !1,
|
|
418
418
|
className: d.timePicker,
|
|
419
|
-
children: /* @__PURE__ */
|
|
419
|
+
children: /* @__PURE__ */ p(
|
|
420
420
|
k,
|
|
421
421
|
{
|
|
422
422
|
id: "end-time-period",
|
|
@@ -484,7 +484,7 @@ const Ne = "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({
|
|
@@ -508,9 +508,9 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
508
508
|
n,
|
|
509
509
|
q
|
|
510
510
|
), I = $(n, [
|
|
511
|
-
|
|
511
|
+
be,
|
|
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: _
|
|
@@ -522,7 +522,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
522
522
|
href: "/appointments"
|
|
523
523
|
},
|
|
524
524
|
{ id: "admin", label: e("BREADCRUMB_ADMIN"), isCurrentPage: !0 }
|
|
525
|
-
],
|
|
525
|
+
], b = N(() => [
|
|
526
526
|
{ key: "startDateTime", header: e("ADMIN_UNAVAILABILITY_COLUMN_START") },
|
|
527
527
|
{ key: "endDateTime", header: e("ADMIN_UNAVAILABILITY_COLUMN_END") },
|
|
528
528
|
{
|
|
@@ -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
|
|
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(
|
|
@@ -594,11 +594,11 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
594
594
|
"data-testid": "appointment-unavailability-actions-table-test-id",
|
|
595
595
|
"aria-label": "appointment-unavailability-actions-table-aria-label",
|
|
596
596
|
title: e("ADMIN_UNAVAILABILITY_TITLE"),
|
|
597
|
-
headers:
|
|
598
|
-
rows:
|
|
597
|
+
headers: b,
|
|
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
|
}
|