@bahmni/appointments-app 0.0.1-dev.375 → 0.0.1-dev.377
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-Dcy-W7Gb-CqfXnHok.js → DocumentsTable-DltqOolY-D_7o42_B.js} +17 -17
- package/dist/{FormsTable-BncKn8RO-CRUU-wIL.js → FormsTable-0kw7u2Y0-BmMpsOq4.js} +85 -85
- package/dist/{LNWAZHJI-Q8vd3r0i.js → LNWAZHJI-z-XZbovb.js} +2 -2
- package/dist/{MWZ6AO7Z-BtRCbHUQ.js → MWZ6AO7Z-DWlUkEHd.js} +2 -2
- package/dist/{Observations-BNztTkr8-4l7UpWbS.js → Observations-BoGO_vsc-D1T0iF03.js} +42 -42
- package/dist/{YPM2AS64-nIz2f1HE.js → YPM2AS64-Dw55EsK8.js} +1 -1
- package/dist/{index-CQneCT4a.js → index-BY_f8YCQ.js} +56 -56
- package/dist/{index-DQ5fGOFT.js → index-B_aaBzFi.js} +40 -40
- package/dist/{index-DAsY1pGM.js → index-BwEjPsd2.js} +87071 -81808
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { g as q,
|
|
1
|
+
import { jsxs as S, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { g as q, K as w, u as N, j as k, Y as x, c as z, l as Q, m as j, o as G, q as H, W as M, r as Y, z as A, t as P, V as W, v as J, x as X, y as Z, A as ee } from "./index-BwEjPsd2.js";
|
|
3
3
|
import { useQueries as ae, useQuery as te } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as se, useEffect as
|
|
5
|
-
const
|
|
6
|
-
const t =
|
|
4
|
+
import { useRef as se, useEffect as _, useMemo as g } from "react";
|
|
5
|
+
const D = (a, n, d, l, b, r) => {
|
|
6
|
+
const t = P(a, n, b), s = t.value, i = W(s);
|
|
7
7
|
let o = s;
|
|
8
8
|
i === "Image" && (o = /* @__PURE__ */ u(
|
|
9
|
-
|
|
9
|
+
X,
|
|
10
10
|
{
|
|
11
11
|
imageSrc: s,
|
|
12
12
|
alt: s,
|
|
@@ -14,7 +14,7 @@ const F = (a, n, d, l, b, r) => {
|
|
|
14
14
|
hideThumbnail: r
|
|
15
15
|
}
|
|
16
16
|
)), i === "Video" && (o = /* @__PURE__ */ u(
|
|
17
|
-
|
|
17
|
+
Z,
|
|
18
18
|
{
|
|
19
19
|
id: `${s}-video`,
|
|
20
20
|
videoSrc: s,
|
|
@@ -25,7 +25,7 @@ const F = (a, n, d, l, b, r) => {
|
|
|
25
25
|
provider: t.provider
|
|
26
26
|
}), p = a.display, y = a.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = l ? `${l}-${y}-${p}-${d}-${n}` : `${y}-${p}-${d}-${n}`;
|
|
27
27
|
return /* @__PURE__ */ u(
|
|
28
|
-
|
|
28
|
+
J,
|
|
29
29
|
{
|
|
30
30
|
header: t.header,
|
|
31
31
|
value: o,
|
|
@@ -37,13 +37,13 @@ const F = (a, n, d, l, b, r) => {
|
|
|
37
37
|
`obs-${a.id}`
|
|
38
38
|
);
|
|
39
39
|
}, re = (a, n, d, l, b, r, t) => /* @__PURE__ */ u(
|
|
40
|
-
|
|
40
|
+
A,
|
|
41
41
|
{
|
|
42
42
|
title: a.display,
|
|
43
43
|
id: `grouped-obs-${a.display}-${l}`,
|
|
44
44
|
open: d,
|
|
45
45
|
children: a.members?.map(
|
|
46
|
-
(s, i) =>
|
|
46
|
+
(s, i) => D(
|
|
47
47
|
s,
|
|
48
48
|
i,
|
|
49
49
|
b,
|
|
@@ -59,17 +59,17 @@ const F = (a, n, d, l, b, r) => {
|
|
|
59
59
|
title: n = "",
|
|
60
60
|
hideThumbnail: d
|
|
61
61
|
}) => {
|
|
62
|
-
const { t: l } =
|
|
63
|
-
const i =
|
|
64
|
-
return /* @__PURE__ */
|
|
65
|
-
|
|
62
|
+
const { t: l } = N(), b = (r, t, s) => {
|
|
63
|
+
const i = Y(r.encounterDetails, l);
|
|
64
|
+
return /* @__PURE__ */ S(
|
|
65
|
+
A,
|
|
66
66
|
{
|
|
67
67
|
title: i,
|
|
68
68
|
id: `encounter-${r.encounterId}`,
|
|
69
69
|
open: t,
|
|
70
70
|
children: [
|
|
71
71
|
r.observations.map(
|
|
72
|
-
(o, m) =>
|
|
72
|
+
(o, m) => D(
|
|
73
73
|
o,
|
|
74
74
|
m,
|
|
75
75
|
s,
|
|
@@ -105,7 +105,7 @@ const F = (a, n, d, l, b, r) => {
|
|
|
105
105
|
)
|
|
106
106
|
}
|
|
107
107
|
);
|
|
108
|
-
}, oe = "Observations-module_observations__RKSyo", ne = "Observations-module_title__TJL3z",
|
|
108
|
+
}, oe = "Observations-module_observations__RKSyo", ne = "Observations-module_title__TJL3z", $ = {
|
|
109
109
|
observations: oe,
|
|
110
110
|
title: ne
|
|
111
111
|
}, de = (a) => ["conceptUuid", a], le = (a, n) => ["observations", a, ...n], pe = ({ config: a }) => {
|
|
@@ -113,91 +113,91 @@ const F = (a, n, d, l, b, r) => {
|
|
|
113
113
|
conceptNames: d = [],
|
|
114
114
|
conceptUuid: l = [],
|
|
115
115
|
hideThumbnail: b = !1
|
|
116
|
-
} = n, r = se(/* @__PURE__ */ new Set()), t = q(), { addNotification: s } =
|
|
116
|
+
} = n, r = se(/* @__PURE__ */ new Set()), t = q(), { addNotification: s } = w(), { t: i } = N(), o = ae({
|
|
117
117
|
queries: d.map((e) => ({
|
|
118
118
|
queryKey: de(e),
|
|
119
119
|
queryFn: () => k(e),
|
|
120
120
|
enabled: !!e
|
|
121
121
|
}))
|
|
122
122
|
});
|
|
123
|
-
|
|
123
|
+
_(() => {
|
|
124
124
|
o.forEach((e, h) => {
|
|
125
125
|
if (e.isError && !r.current.has(h)) {
|
|
126
|
-
const
|
|
126
|
+
const B = d[h];
|
|
127
127
|
s({
|
|
128
128
|
title: i("ERROR_DEFAULT_TITLE"),
|
|
129
|
-
message: i("ERROR_FETCHING_CONCEPT", { conceptName:
|
|
129
|
+
message: i("ERROR_FETCHING_CONCEPT", { conceptName: B }),
|
|
130
130
|
type: "error"
|
|
131
131
|
}), r.current.add(h);
|
|
132
132
|
} else e.isError || r.current.delete(h);
|
|
133
133
|
});
|
|
134
134
|
}, [o, d]);
|
|
135
|
-
const m =
|
|
135
|
+
const m = g(() => o.map((e) => e.data?.uuid).filter((e) => !!e), [o]), p = g(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), y = g(() => d.length === 0 ? !0 : o.every((e) => !e.isLoading), [o, d.length]), {
|
|
136
136
|
data: c,
|
|
137
|
-
isLoading:
|
|
137
|
+
isLoading: F,
|
|
138
138
|
isError: T,
|
|
139
|
-
refetch:
|
|
139
|
+
refetch: f
|
|
140
140
|
} = te({
|
|
141
141
|
queryKey: le(t, p),
|
|
142
|
-
queryFn: () =>
|
|
142
|
+
queryFn: () => x(t, p),
|
|
143
143
|
enabled: !!t && p.length > 0 && y
|
|
144
144
|
});
|
|
145
|
-
|
|
145
|
+
z(
|
|
146
146
|
(e) => {
|
|
147
147
|
e.patientUUID === t && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
148
148
|
(h) => p.includes(h)
|
|
149
|
-
) &&
|
|
149
|
+
) && f();
|
|
150
150
|
},
|
|
151
|
-
[t,
|
|
152
|
-
),
|
|
151
|
+
[t, f]
|
|
152
|
+
), _(() => {
|
|
153
153
|
T && s({
|
|
154
154
|
title: i("ERROR_DEFAULT_TITLE"),
|
|
155
155
|
message: i("ERROR_FETCHING_OBSERVATIONS"),
|
|
156
156
|
type: "error"
|
|
157
157
|
});
|
|
158
158
|
}, [T]);
|
|
159
|
-
const
|
|
159
|
+
const R = g(() => {
|
|
160
160
|
if (!c) return [];
|
|
161
|
-
const e =
|
|
162
|
-
return
|
|
163
|
-
}, [c]),
|
|
161
|
+
const e = Q(c), h = j(e);
|
|
162
|
+
return G(h);
|
|
163
|
+
}, [c]), K = [
|
|
164
164
|
{ key: "name", header: "name" },
|
|
165
165
|
{ key: "value", header: "value" },
|
|
166
166
|
{ key: "form", header: "form" }
|
|
167
|
-
],
|
|
168
|
-
return /* @__PURE__ */
|
|
167
|
+
], O = F || !y, I = T && y, L = (!c || c.entry?.length === 0 || p.length === 0) && y, V = I ? i("ERROR_FETCHING_OBSERVATIONS") : null, C = L ? i("NO_OBSERVATIONS_FOUND") : void 0, U = R.length > 0 && !O && !I, E = n.titleTranslationKey, v = E ? i(E) : "";
|
|
168
|
+
return /* @__PURE__ */ S(
|
|
169
169
|
"div",
|
|
170
170
|
{
|
|
171
171
|
id: "observations",
|
|
172
172
|
"data-testid": E ? `observations-${v}` : "observations",
|
|
173
173
|
"aria-label": "observations-aria-label",
|
|
174
|
-
className:
|
|
174
|
+
className: $.observations,
|
|
175
175
|
children: [
|
|
176
176
|
/* @__PURE__ */ u(
|
|
177
|
-
|
|
177
|
+
H,
|
|
178
178
|
{
|
|
179
179
|
id: "observations-title",
|
|
180
180
|
testId: E ? `observations-title-${v}` : "observations-title",
|
|
181
181
|
title: v,
|
|
182
|
-
className:
|
|
182
|
+
className: $.title,
|
|
183
183
|
children: /* @__PURE__ */ u("p", { children: v })
|
|
184
184
|
}
|
|
185
185
|
),
|
|
186
186
|
U ? /* @__PURE__ */ u(
|
|
187
187
|
ie,
|
|
188
188
|
{
|
|
189
|
-
groupedData:
|
|
189
|
+
groupedData: R,
|
|
190
190
|
title: v,
|
|
191
191
|
hideThumbnail: b
|
|
192
192
|
}
|
|
193
193
|
) : /* @__PURE__ */ u(
|
|
194
|
-
|
|
194
|
+
M,
|
|
195
195
|
{
|
|
196
|
-
headers:
|
|
196
|
+
headers: K,
|
|
197
197
|
rows: [],
|
|
198
198
|
ariaLabel: i("OBSERVATIONS"),
|
|
199
|
-
loading:
|
|
200
|
-
errorStateMessage:
|
|
199
|
+
loading: O,
|
|
200
|
+
errorStateMessage: V,
|
|
201
201
|
emptyStateMessage: C,
|
|
202
202
|
dataTestId: "observations-table"
|
|
203
203
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aq as we, ar as z, as as xt, at as B, ao as q, ap as y, au as Ro, av as ye, aw as R, ax as _, ay as k, az as N, aA as A, aB as bs, aC as ir, aD as $e, aE as U, aF as Hn, aG as Vn, aH as dt, aI as D, aJ as xs, aK as cn, aL as Be, aM as ws, aN as qt, aO as zt, aP as $s, aQ as Cs, aR as $n, aS as Ss, aT as Nr, aU as Bt, aV as zo, aW as ks, aX as Es, aY as j, aZ as Ur, a_ as Ms, a$ as Ds, b0 as sr, b1 as As, b2 as Ts, b3 as zn, b4 as Fs, b5 as Is, b6 as Z, b7 as Ps, b8 as Ls } from "./index-
|
|
1
|
+
import { aq as we, ar as z, as as xt, at as B, ao as q, ap as y, au as Ro, av as ye, aw as R, ax as _, ay as k, az as N, aA as A, aB as bs, aC as ir, aD as $e, aE as U, aF as Hn, aG as Vn, aH as dt, aI as D, aJ as xs, aK as cn, aL as Be, aM as ws, aN as qt, aO as zt, aP as $s, aQ as Cs, aR as $n, aS as Ss, aT as Nr, aU as Bt, aV as zo, aW as ks, aX as Es, aY as j, aZ as Ur, a_ as Ms, a$ as Ds, b0 as sr, b1 as As, b2 as Ts, b3 as zn, b4 as Fs, b5 as Is, b6 as Z, b7 as Ps, b8 as Ls } from "./index-BwEjPsd2.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|
|
@@ -1,20 +1,20 @@
|
|
|
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
|
|
4
|
-
import { useQuery as
|
|
5
|
-
const be = "Available for appointments",
|
|
2
|
+
import { $ as f, a0 as P, a1 as O, a2 as V, a3 as J, a4 as ee, a5 as te, a6 as ie, G as ae, a7 as ne, u as Q, 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 k, ah as x, ai as $, X as oe, K as de, E as q, aj as ce, M as me, ak as Ae, al as Ie, am as ue, P as _e, R as Te, S as Le } from "./index-BwEjPsd2.js";
|
|
3
|
+
import { useState as g, useMemo as N, useEffect as S, useRef as ve, useCallback as U } from "react";
|
|
4
|
+
import { useQuery as D, useQueryClient as Ne } from "@tanstack/react-query";
|
|
5
|
+
const be = "Available for appointments", w = "Get Appointment Unavailability", pe = "Add Appointment Unavailability", G = "Appointment Location", Me = () => {
|
|
6
6
|
try {
|
|
7
7
|
return J().uuid;
|
|
8
8
|
} catch {
|
|
9
9
|
return "";
|
|
10
10
|
}
|
|
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) => {
|
|
18
18
|
const n = e.map((t) => ({
|
|
19
19
|
id: t.uuid,
|
|
20
20
|
text: t.name,
|
|
@@ -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
|
+
}, 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", q = "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: O(
|
|
43
43
|
`${e.startTime} ${e.startTimePeriod}`
|
|
44
44
|
),
|
|
45
45
|
endDate: f(e.endDate, a, !1, V).formattedResult,
|
|
46
|
-
endTime:
|
|
46
|
+
endTime: O(`${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 = P(
|
|
51
51
|
`${e.startTime} ${e.startTimePeriod}`
|
|
52
|
-
), c =
|
|
52
|
+
), c = P(
|
|
53
53
|
`${e.endTime} ${e.endTimePeriod}`
|
|
54
54
|
);
|
|
55
55
|
o !== null && c !== null && c <= o && (n.dateTime = a("ADMIN_UNAVAILABILITY_DATETIME_ERROR_MESSAGE"));
|
|
@@ -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
|
+
}), K = (e) => e.filter((a) => !a.isSelectAll).map((a) => a.id), Re = (e, a) => {
|
|
66
|
+
const n = Ue(
|
|
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 = K(e.selectedServiceItems), o = K(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,
|
|
@@ -91,14 +91,14 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
91
91
|
data: e,
|
|
92
92
|
isLoading: a,
|
|
93
93
|
isError: n
|
|
94
|
-
} =
|
|
94
|
+
} = D({
|
|
95
95
|
queryKey: ["currentUser"],
|
|
96
96
|
queryFn: ee
|
|
97
97
|
}), {
|
|
98
98
|
data: t = [],
|
|
99
99
|
isLoading: o,
|
|
100
100
|
isError: c
|
|
101
|
-
} =
|
|
101
|
+
} = D({
|
|
102
102
|
queryKey: ["providerLoginLocations", e?.uuid],
|
|
103
103
|
queryFn: async () => {
|
|
104
104
|
const I = await te(
|
|
@@ -119,14 +119,14 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
119
119
|
data: A = [],
|
|
120
120
|
isLoading: L,
|
|
121
121
|
isError: m
|
|
122
|
-
} =
|
|
122
|
+
} = D({
|
|
123
123
|
queryKey: ["appointmentServices"],
|
|
124
124
|
queryFn: ae
|
|
125
125
|
}), {
|
|
126
126
|
data: l = [],
|
|
127
127
|
isLoading: s,
|
|
128
128
|
isError: _
|
|
129
|
-
} =
|
|
129
|
+
} = D({
|
|
130
130
|
queryKey: ["providers"],
|
|
131
131
|
queryFn: ne
|
|
132
132
|
});
|
|
@@ -137,22 +137,22 @@ 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
|
-
}, Be = "UnavailabilityForm-module_formContent__WmNHR",
|
|
140
|
+
}, Be = "UnavailabilityForm-module_formContent__WmNHR", Pe = "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: Be,
|
|
142
|
-
formField:
|
|
143
|
-
loading:
|
|
142
|
+
formField: Pe,
|
|
143
|
+
loading: Oe,
|
|
144
144
|
error: Ve,
|
|
145
145
|
grid: Fe,
|
|
146
146
|
column: Ce,
|
|
147
147
|
dateTimeColumn: Ye,
|
|
148
148
|
datePicker: ke,
|
|
149
149
|
timePicker: xe
|
|
150
|
-
},
|
|
150
|
+
}, $e = ({
|
|
151
151
|
errors: e,
|
|
152
152
|
formDataRef: a,
|
|
153
153
|
onClearErrors: n
|
|
154
154
|
}) => {
|
|
155
|
-
const { t } =
|
|
155
|
+
const { t } = Q(), { loginLocations: o, services: c, providers: A, isLoading: L, isError: m } = he(), [l, s] = g({
|
|
156
156
|
locationUuid: "",
|
|
157
157
|
selectedServiceItems: [],
|
|
158
158
|
selectedProviderItems: [],
|
|
@@ -183,11 +183,11 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
183
183
|
() => R(
|
|
184
184
|
!1,
|
|
185
185
|
!1,
|
|
186
|
-
|
|
186
|
+
De(
|
|
187
187
|
_,
|
|
188
188
|
t("ADMIN_UNAVAILABILITY_FORM_ALL_SERVICES")
|
|
189
189
|
),
|
|
190
|
-
|
|
190
|
+
H,
|
|
191
191
|
{
|
|
192
192
|
loading: "",
|
|
193
193
|
error: "",
|
|
@@ -195,15 +195,15 @@ const be = "Available for appointments", q = "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
|
),
|
|
206
|
-
|
|
206
|
+
H,
|
|
207
207
|
{
|
|
208
208
|
loading: "",
|
|
209
209
|
error: "",
|
|
@@ -214,7 +214,7 @@ 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 =
|
|
217
|
+
const i = Me(), b = o.some(
|
|
218
218
|
(y) => y.uuid === i
|
|
219
219
|
);
|
|
220
220
|
s((y) => ({
|
|
@@ -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: 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", q = "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",
|
|
@@ -365,7 +365,7 @@ const be = "Available for appointments", q = "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",
|
|
@@ -440,7 +440,7 @@ const be = "Available for appointments", q = "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",
|
|
@@ -450,7 +450,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
450
450
|
lg: 8,
|
|
451
451
|
className: d.column,
|
|
452
452
|
children: /* @__PURE__ */ r(
|
|
453
|
-
|
|
453
|
+
$,
|
|
454
454
|
{
|
|
455
455
|
id: "service-multiselect",
|
|
456
456
|
"data-testid": "service-multiselect",
|
|
@@ -468,7 +468,7 @@ const be = "Available for appointments", q = "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",
|
|
@@ -478,13 +478,13 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
478
478
|
lg: 8,
|
|
479
479
|
className: d.column,
|
|
480
480
|
children: /* @__PURE__ */ r(
|
|
481
|
-
|
|
481
|
+
$,
|
|
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: 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", q = "Get Appointment Unavailability", p
|
|
|
501
501
|
]
|
|
502
502
|
}
|
|
503
503
|
);
|
|
504
|
-
},
|
|
505
|
-
page:
|
|
504
|
+
}, qe = "index-module_page__s2h2y", we = {
|
|
505
|
+
page: qe
|
|
506
506
|
}, je = () => {
|
|
507
|
-
const { t: e } =
|
|
507
|
+
const { t: e } = Q(), 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
|
-
|
|
510
|
-
), I =
|
|
509
|
+
w
|
|
510
|
+
), I = q(n, [
|
|
511
511
|
pe,
|
|
512
|
-
|
|
513
|
-
]), { data: u, isLoading: v, isError:
|
|
512
|
+
w
|
|
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", 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]), h =
|
|
540
|
+
], [e]), y = N(() => u ? u.map((T) => fe(T, e)) : [], [u, e]), h = U(
|
|
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 = 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 h(Re(m.current, e));
|
|
567
|
-
}, [e, h]), W =
|
|
567
|
+
}, [e, h]), W = U(
|
|
568
568
|
(T) => {
|
|
569
|
-
s((
|
|
570
|
-
const B = { ...
|
|
571
|
-
return T.forEach((
|
|
569
|
+
s((z) => {
|
|
570
|
+
const B = { ...z };
|
|
571
|
+
return T.forEach((Z) => delete B[Z]), B;
|
|
572
572
|
});
|
|
573
573
|
},
|
|
574
574
|
[]
|
|
575
|
-
), X =
|
|
575
|
+
), X = 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", q = "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: we.page,
|
|
590
590
|
children: /* @__PURE__ */ r(
|
|
591
591
|
_e,
|
|
592
592
|
{
|
|
@@ -598,7 +598,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
598
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"),
|
|
@@ -622,7 +622,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
622
622
|
onSecondaryButtonClick: X,
|
|
623
623
|
isSecondaryButtonDisabled: A,
|
|
624
624
|
content: /* @__PURE__ */ r(
|
|
625
|
-
|
|
625
|
+
$e,
|
|
626
626
|
{
|
|
627
627
|
errors: l,
|
|
628
628
|
formDataRef: m,
|