@bahmni/appointments-app 0.0.1-dev.357 → 0.0.1-dev.359
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-DZnCF3U4-DBH8rn_k.js → DocumentsTable-5x3z64yX-CSOa1w2b.js} +5 -5
- package/dist/{FormsTable-BYg45PXE-CucdzIBr.js → FormsTable-DK5LbwNj-C2DBnweN.js} +68 -68
- package/dist/{LNWAZHJI-B2EFalNC.js → LNWAZHJI-LP1BJ8un.js} +2 -2
- package/dist/{MWZ6AO7Z-C9aQmtgC.js → MWZ6AO7Z-BnJpnu5N.js} +2 -2
- package/dist/{Observations-BG4bqMBN-THn6wLBj.js → Observations-BtZFJSMF-zocPrlvQ.js} +37 -37
- package/dist/{YPM2AS64-CEWIAV9K.js → YPM2AS64-C7orWZJL.js} +1 -1
- package/dist/{index-BUlGp_VU.js → index-0hByRScr.js} +38 -38
- package/dist/{index-Xes8d4CI.js → index-2Favs9NV.js} +25 -25
- package/dist/{index-CTQF7H5n.js → index-DLLiLOmJ.js} +3947 -3947
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
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
|
|
2
|
+
import { Z as f, a0 as B, a1 as O, a2 as V, a3 as X, a4 as ee, a5 as te, a6 as ie, _ as ae, a7 as ne, u as Q, 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, $ as oe, a as de, G as $, aj as ce, I as me, ak as Ae, al as Ie, am as ue, K as _e, Q as Te, U as Le } from "./index-DLLiLOmJ.js";
|
|
3
|
+
import { useState as g, useMemo as N, useEffect as h, useRef as ve, useCallback as E } from "react";
|
|
4
4
|
import { useQuery as M, useQueryClient as Ne } from "@tanstack/react-query";
|
|
5
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 X().uuid;
|
|
8
8
|
} catch {
|
|
9
9
|
return "";
|
|
10
10
|
}
|
|
11
|
-
},
|
|
11
|
+
}, K = (e) => ({
|
|
12
12
|
id: "",
|
|
13
13
|
text: e
|
|
14
14
|
}), ye = (e) => ({
|
|
@@ -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: O(
|
|
@@ -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
|
+
}), w = (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 = w(e.selectedServiceItems), o = w(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,
|
|
@@ -82,11 +82,11 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
82
82
|
providerUuid: s
|
|
83
83
|
}))
|
|
84
84
|
);
|
|
85
|
-
},
|
|
85
|
+
}, he = (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
|
+
})), Se = () => {
|
|
90
90
|
const {
|
|
91
91
|
data: e,
|
|
92
92
|
isLoading: a,
|
|
@@ -108,7 +108,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
108
108
|
const u = await ie(
|
|
109
109
|
G
|
|
110
110
|
);
|
|
111
|
-
return
|
|
111
|
+
return he(u);
|
|
112
112
|
}
|
|
113
113
|
return I.filter(
|
|
114
114
|
(u) => u.tags?.some((v) => v.display === G)
|
|
@@ -137,7 +137,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
137
137
|
isLoading: a || o || L || s,
|
|
138
138
|
isError: n || c || m || _
|
|
139
139
|
};
|
|
140
|
-
}, Pe = "UnavailabilityForm-module_formContent__WmNHR", Be = "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",
|
|
140
|
+
}, Pe = "UnavailabilityForm-module_formContent__WmNHR", Be = "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", ke = "UnavailabilityForm-module_datePicker__6HgbO", xe = "UnavailabilityForm-module_timePicker__DHNpK", d = {
|
|
141
141
|
formContent: Pe,
|
|
142
142
|
formField: Be,
|
|
143
143
|
loading: Oe,
|
|
@@ -145,14 +145,14 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
145
145
|
grid: Fe,
|
|
146
146
|
column: Ce,
|
|
147
147
|
dateTimeColumn: Ye,
|
|
148
|
-
datePicker:
|
|
149
|
-
timePicker:
|
|
148
|
+
datePicker: ke,
|
|
149
|
+
timePicker: xe
|
|
150
150
|
}, He = ({
|
|
151
151
|
errors: e,
|
|
152
152
|
formDataRef: a,
|
|
153
153
|
onClearErrors: n
|
|
154
154
|
}) => {
|
|
155
|
-
const { t } = Q(), { loginLocations: o, services: c, providers: A, isLoading: L, isError: m } =
|
|
155
|
+
const { t } = Q(), { loginLocations: o, services: c, providers: A, isLoading: L, isError: m } = Se(), [l, s] = g({
|
|
156
156
|
locationUuid: "",
|
|
157
157
|
selectedServiceItems: [],
|
|
158
158
|
selectedProviderItems: [],
|
|
@@ -187,7 +187,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
187
187
|
_,
|
|
188
188
|
t("ADMIN_UNAVAILABILITY_FORM_ALL_SERVICES")
|
|
189
189
|
),
|
|
190
|
-
|
|
190
|
+
K,
|
|
191
191
|
{
|
|
192
192
|
loading: "",
|
|
193
193
|
error: "",
|
|
@@ -199,11 +199,11 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
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
|
),
|
|
206
|
-
|
|
206
|
+
K,
|
|
207
207
|
{
|
|
208
208
|
loading: "",
|
|
209
209
|
error: "",
|
|
@@ -212,7 +212,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
212
212
|
),
|
|
213
213
|
[I]
|
|
214
214
|
);
|
|
215
|
-
return
|
|
215
|
+
return h(() => {
|
|
216
216
|
if (o.length === 0) return;
|
|
217
217
|
const i = De(), b = o.some(
|
|
218
218
|
(y) => y.uuid === i
|
|
@@ -221,12 +221,12 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
221
221
|
...y,
|
|
222
222
|
locationUuid: b ? i : ""
|
|
223
223
|
}));
|
|
224
|
-
}, [o]),
|
|
224
|
+
}, [o]), h(() => {
|
|
225
225
|
_.length > 0 && s((i) => ({
|
|
226
226
|
...i,
|
|
227
227
|
selectedServiceItems: v
|
|
228
228
|
}));
|
|
229
|
-
}, [v]),
|
|
229
|
+
}, [v]), h(() => {
|
|
230
230
|
I.length > 0 && s((i) => ({
|
|
231
231
|
...i,
|
|
232
232
|
selectedProviderItems: D
|
|
@@ -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",
|
|
@@ -327,7 +327,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
327
327
|
}
|
|
328
328
|
),
|
|
329
329
|
/* @__PURE__ */ r(
|
|
330
|
-
|
|
330
|
+
k,
|
|
331
331
|
{
|
|
332
332
|
id: "start-time",
|
|
333
333
|
"data-testid": "start-time-input",
|
|
@@ -342,7 +342,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
342
342
|
use24HourFormat: !1,
|
|
343
343
|
className: d.timePicker,
|
|
344
344
|
children: /* @__PURE__ */ p(
|
|
345
|
-
|
|
345
|
+
x,
|
|
346
346
|
{
|
|
347
347
|
id: "start-time-period",
|
|
348
348
|
"data-testid": "start-time-period-select",
|
|
@@ -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",
|
|
@@ -402,7 +402,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
402
402
|
}
|
|
403
403
|
),
|
|
404
404
|
/* @__PURE__ */ r(
|
|
405
|
-
|
|
405
|
+
k,
|
|
406
406
|
{
|
|
407
407
|
id: "end-time",
|
|
408
408
|
"data-testid": "end-time-input",
|
|
@@ -417,7 +417,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
417
417
|
use24HourFormat: !1,
|
|
418
418
|
className: d.timePicker,
|
|
419
419
|
children: /* @__PURE__ */ p(
|
|
420
|
-
|
|
420
|
+
x,
|
|
421
421
|
{
|
|
422
422
|
id: "end-time-period",
|
|
423
423
|
"data-testid": "end-time-period-select",
|
|
@@ -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",
|
|
@@ -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]), y = N(() => u ? u.map((T) => fe(T, e)) : [], [u, e]),
|
|
540
|
+
], [e]), y = N(() => u ? u.map((T) => fe(T, e)) : [], [u, e]), S = 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
|
-
s(T), !(Object.keys(T).length > 0) && await
|
|
567
|
-
}, [e,
|
|
566
|
+
s(T), !(Object.keys(T).length > 0) && await S(Re(m.current, e));
|
|
567
|
+
}, [e, S]), W = E(
|
|
568
568
|
(T) => {
|
|
569
|
-
s((
|
|
570
|
-
const P = { ...
|
|
571
|
-
return T.forEach((
|
|
569
|
+
s((Z) => {
|
|
570
|
+
const P = { ...Z };
|
|
571
|
+
return T.forEach((J) => delete P[J]), P;
|
|
572
572
|
});
|
|
573
573
|
},
|
|
574
574
|
[]
|
|
575
|
-
), z =
|
|
575
|
+
), z = E(() => {
|
|
576
576
|
c(!1), m.current = null, s({});
|
|
577
577
|
}, []);
|
|
578
578
|
return /* @__PURE__ */ r(
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as i, jsxs as y } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { B as V, C as O, u as C, F as P, E as h, a as B, $ as G, G as L, _ as x, I as U, J as F, K as H, Q as q, U as $, V as j, W as k, Y as K } from "./index-DLLiLOmJ.js";
|
|
3
3
|
import { useState as I, useMemo as c } from "react";
|
|
4
|
-
import { useQueryClient as
|
|
4
|
+
import { useQueryClient as Q, useQuery as W } from "@tanstack/react-query";
|
|
5
5
|
const Y = V(
|
|
6
|
-
|
|
6
|
+
O,
|
|
7
7
|
"useAppointmentsConfig",
|
|
8
8
|
"AppointmentsConfigProvider"
|
|
9
|
-
),
|
|
9
|
+
), w = ({
|
|
10
10
|
serviceName: e,
|
|
11
11
|
isDeleting: a,
|
|
12
12
|
onConfirm: t,
|
|
@@ -14,7 +14,7 @@ const Y = V(
|
|
|
14
14
|
}) => {
|
|
15
15
|
const { t: n } = C();
|
|
16
16
|
return /* @__PURE__ */ i(
|
|
17
|
-
|
|
17
|
+
P,
|
|
18
18
|
{
|
|
19
19
|
id: "delete-service-modal",
|
|
20
20
|
testId: "delete-service-modal-test-id",
|
|
@@ -36,7 +36,7 @@ const Y = V(
|
|
|
36
36
|
"speciality",
|
|
37
37
|
"durationMins",
|
|
38
38
|
"description"
|
|
39
|
-
],
|
|
39
|
+
], Z = "app:appointments:manageServices", z = "app:appointments:adminTab", J = "index-module_page__Gsfbu", X = "index-module_noPrivilegeContainer__Pu5WZ", ee = "index-module_table__GAPmb", d = {
|
|
40
40
|
page: J,
|
|
41
41
|
noPrivilegeContainer: X,
|
|
42
42
|
table: ee
|
|
@@ -75,28 +75,28 @@ function ie(e, a) {
|
|
|
75
75
|
}));
|
|
76
76
|
}
|
|
77
77
|
const oe = () => {
|
|
78
|
-
const { t: e } = C(), a =
|
|
78
|
+
const { t: e } = C(), a = Q(), { addNotification: t } = B(), { userPrivileges: s } = G(), { appointmentsConfig: n } = Y(), [E, _] = I(null), [b, p] = I(!1), l = n?.serviceTableFields ?? [
|
|
79
79
|
...u
|
|
80
|
-
],
|
|
80
|
+
], m = L(s, z), M = L(
|
|
81
81
|
s,
|
|
82
|
-
|
|
83
|
-
),
|
|
82
|
+
Z
|
|
83
|
+
), S = c(
|
|
84
84
|
() => te(l),
|
|
85
85
|
[l]
|
|
86
86
|
), { data: A, isLoading: v, isError: D } = W({
|
|
87
87
|
queryKey: ["allAppointmentServices"],
|
|
88
88
|
queryFn: x,
|
|
89
|
-
enabled:
|
|
90
|
-
}),
|
|
89
|
+
enabled: m
|
|
90
|
+
}), R = c(
|
|
91
91
|
() => ae(l, e),
|
|
92
92
|
[l]
|
|
93
|
-
),
|
|
94
|
-
() => ie(A ?? [],
|
|
95
|
-
[A,
|
|
93
|
+
), N = c(
|
|
94
|
+
() => ie(A ?? [], S),
|
|
95
|
+
[A, S]
|
|
96
96
|
), g = async () => {
|
|
97
97
|
p(!0);
|
|
98
98
|
try {
|
|
99
|
-
await
|
|
99
|
+
await K(E.id), t({
|
|
100
100
|
title: e("ADMIN_ALL_SERVICES_DELETE_SUCCESS_TITLE"),
|
|
101
101
|
message: e("ADMIN_ALL_SERVICES_DELETE_SUCCESS_MESSAGE"),
|
|
102
102
|
type: "success",
|
|
@@ -112,7 +112,7 @@ const oe = () => {
|
|
|
112
112
|
p(!1);
|
|
113
113
|
}
|
|
114
114
|
}, T = (r, o) => o === "actions" ? /* @__PURE__ */ i(
|
|
115
|
-
|
|
115
|
+
j,
|
|
116
116
|
{
|
|
117
117
|
id: `delete-service-${r.id}-btn`,
|
|
118
118
|
testId: `delete-service-${r.id}-btn-test-id`,
|
|
@@ -121,17 +121,17 @@ const oe = () => {
|
|
|
121
121
|
label: e("ADMIN_ALL_SERVICES_DELETE_ICON_LABEL"),
|
|
122
122
|
disabled: !M,
|
|
123
123
|
onClick: () => _(r),
|
|
124
|
-
children: /* @__PURE__ */ i(
|
|
124
|
+
children: /* @__PURE__ */ i(k, {})
|
|
125
125
|
}
|
|
126
126
|
) : u.includes(o) ? r[o] ?? "-" : r.attributes[o] ?? "-", f = [
|
|
127
127
|
{ id: "home", label: e("BREADCRUMB_HOME"), href: U },
|
|
128
128
|
{ id: "admin", label: e("BREADCRUMB_ADMIN"), isCurrentPage: !0 }
|
|
129
129
|
];
|
|
130
130
|
return /* @__PURE__ */ i(
|
|
131
|
-
|
|
131
|
+
F,
|
|
132
132
|
{
|
|
133
|
-
header: /* @__PURE__ */ i(
|
|
134
|
-
main:
|
|
133
|
+
header: /* @__PURE__ */ i(q, { breadcrumbItems: f, userMenu: /* @__PURE__ */ i($, {}) }),
|
|
134
|
+
main: m ? /* @__PURE__ */ y(
|
|
135
135
|
"div",
|
|
136
136
|
{
|
|
137
137
|
id: "all-appointment-service-page",
|
|
@@ -140,12 +140,12 @@ const oe = () => {
|
|
|
140
140
|
className: d.page,
|
|
141
141
|
children: [
|
|
142
142
|
/* @__PURE__ */ i(
|
|
143
|
-
|
|
143
|
+
H,
|
|
144
144
|
{
|
|
145
145
|
id: "all-services",
|
|
146
146
|
title: e("ADMIN_ALL_SERVICES_TITLE"),
|
|
147
|
-
headers:
|
|
148
|
-
rows:
|
|
147
|
+
headers: R,
|
|
148
|
+
rows: N,
|
|
149
149
|
ariaLabel: "all-services-table",
|
|
150
150
|
loading: v,
|
|
151
151
|
errorStateMessage: D ? e("ADMIN_ALL_SERVICES_ERROR_MESSAGE") : null,
|
|
@@ -155,7 +155,7 @@ const oe = () => {
|
|
|
155
155
|
}
|
|
156
156
|
),
|
|
157
157
|
E && /* @__PURE__ */ i(
|
|
158
|
-
|
|
158
|
+
w,
|
|
159
159
|
{
|
|
160
160
|
serviceName: E.name,
|
|
161
161
|
isDeleting: b,
|