@bahmni/appointments-app 0.0.1-dev.338 → 0.0.1-dev.342
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/App.d.ts.map +1 -1
- package/dist/{DocumentsTable-Cq55el4h-E-cUWEQ_.js → DocumentsTable-CwsQxB8z-CwsUelGo.js} +11 -11
- package/dist/{FormsTable-DJJY3k8g-Bp5eTglp.js → FormsTable-D7qAq2oV-BFG4xmCS.js} +68 -68
- package/dist/{LNWAZHJI-DYsryw0S.js → LNWAZHJI-DYLA9-Fk.js} +4 -4
- package/dist/{MWZ6AO7Z-Bua8tHFc.js → MWZ6AO7Z-BGlwn-5g.js} +5 -5
- package/dist/{Observations-CHGrTi3--CLZAD84c.js → Observations-CuU8iPzI-3KTugQKM.js} +36 -36
- package/dist/{YPM2AS64-B_IYwKmv.js → YPM2AS64-mOL-lbUD.js} +1 -1
- package/dist/{index-BETQTa2N.js → index-C9IFErQw.js} +45 -45
- package/dist/{index-DAgbckWt.js → index-DjcvXRG2.js} +60 -60
- package/dist/{index-BijQdYmK.js → index-eyrL1dkG.js} +34683 -34524
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/locales/locale_en.json +4 -1
- package/dist/locales/locale_es.json +4 -1
- package/dist/pages/admin/allServices/index.d.ts.map +1 -1
- package/dist/pages/admin/appointmentUnavailability/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as i, jsxs as y } from "react/jsx-runtime";
|
|
2
|
+
import { I as V, p as P, u as C, F as O, q as B, B as h, r as x, s as L, W as G, P as U, t as F, x as q, J as H, y as W, D as k, U as w, G as Q } from "./index-eyrL1dkG.js";
|
|
3
3
|
import { useState as I, useMemo as _ } from "react";
|
|
4
|
-
import { useQueryClient as
|
|
5
|
-
const
|
|
6
|
-
|
|
4
|
+
import { useQueryClient as $, useQuery as j } from "@tanstack/react-query";
|
|
5
|
+
const J = V(
|
|
6
|
+
P,
|
|
7
7
|
"useAppointmentsConfig",
|
|
8
8
|
"AppointmentsConfigProvider"
|
|
9
|
-
),
|
|
9
|
+
), K = ({
|
|
10
10
|
serviceName: e,
|
|
11
11
|
isDeleting: a,
|
|
12
12
|
onConfirm: t,
|
|
13
13
|
onCancel: s
|
|
14
14
|
}) => {
|
|
15
|
-
const { t:
|
|
16
|
-
return /* @__PURE__ */
|
|
17
|
-
|
|
15
|
+
const { t: n } = C();
|
|
16
|
+
return /* @__PURE__ */ i(
|
|
17
|
+
O,
|
|
18
18
|
{
|
|
19
19
|
id: "delete-service-modal",
|
|
20
20
|
testId: "delete-service-modal-test-id",
|
|
@@ -23,11 +23,11 @@ const Q = V(
|
|
|
23
23
|
danger: !0,
|
|
24
24
|
onRequestClose: s,
|
|
25
25
|
onRequestSubmit: t,
|
|
26
|
-
primaryButtonText:
|
|
27
|
-
secondaryButtonText:
|
|
26
|
+
primaryButtonText: n("ADMIN_ALL_SERVICES_DELETE_BUTTON_LABEL"),
|
|
27
|
+
secondaryButtonText: n("ADMIN_ALL_SERVICES_DELETE_CANCEL"),
|
|
28
28
|
primaryButtonDisabled: a,
|
|
29
|
-
modalHeading:
|
|
30
|
-
children:
|
|
29
|
+
modalHeading: n("ADMIN_ALL_SERVICES_DELETE_MODAL_TITLE"),
|
|
30
|
+
children: n("ADMIN_ALL_SERVICES_DELETE_CONFIRM_BODY", { serviceName: e })
|
|
31
31
|
}
|
|
32
32
|
);
|
|
33
33
|
}, u = [
|
|
@@ -36,15 +36,15 @@ const Q = V(
|
|
|
36
36
|
"speciality",
|
|
37
37
|
"durationMins",
|
|
38
38
|
"description"
|
|
39
|
-
],
|
|
40
|
-
page:
|
|
41
|
-
noPrivilegeContainer:
|
|
42
|
-
table:
|
|
39
|
+
], Y = "app:appointments:manageServices", Z = "app:appointments:adminTab", z = "index-module_page__Gsfbu", X = "index-module_noPrivilegeContainer__Pu5WZ", ee = "index-module_table__GAPmb", d = {
|
|
40
|
+
page: z,
|
|
41
|
+
noPrivilegeContainer: X,
|
|
42
|
+
table: ee
|
|
43
43
|
};
|
|
44
|
-
function
|
|
44
|
+
function te(e) {
|
|
45
45
|
return e.filter((a) => !u.includes(a));
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function ae(e, a) {
|
|
48
48
|
return [
|
|
49
49
|
...e.map((t) => ({
|
|
50
50
|
key: t,
|
|
@@ -58,7 +58,7 @@ function te(e, a) {
|
|
|
58
58
|
}
|
|
59
59
|
];
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function ie(e, a) {
|
|
62
62
|
return e.map((t) => ({
|
|
63
63
|
id: t.uuid,
|
|
64
64
|
name: t.name,
|
|
@@ -69,34 +69,34 @@ function ae(e, a) {
|
|
|
69
69
|
attributes: Object.fromEntries(
|
|
70
70
|
a.map((s) => [
|
|
71
71
|
s,
|
|
72
|
-
t.attributes?.find((
|
|
72
|
+
t.attributes?.find((n) => n.attributeType === s)?.value ?? null
|
|
73
73
|
])
|
|
74
74
|
)
|
|
75
75
|
}));
|
|
76
76
|
}
|
|
77
|
-
const
|
|
78
|
-
const { t: e } = C(), a =
|
|
77
|
+
const oe = () => {
|
|
78
|
+
const { t: e } = C(), a = $(), { addNotification: t } = h(), { userPrivileges: s } = x(), { appointmentsConfig: n } = J(), [E, c] = I(null), [M, p] = I(!1), l = n?.serviceTableFields ?? [
|
|
79
79
|
...u
|
|
80
|
-
], m = L(s,
|
|
80
|
+
], m = L(s, Z), b = L(
|
|
81
81
|
s,
|
|
82
|
-
|
|
82
|
+
Y
|
|
83
83
|
), S = _(
|
|
84
|
-
() =>
|
|
84
|
+
() => te(l),
|
|
85
85
|
[l]
|
|
86
|
-
), { data: A, isLoading:
|
|
86
|
+
), { data: A, isLoading: v, isError: D } = j({
|
|
87
87
|
queryKey: ["allAppointmentServices"],
|
|
88
|
-
queryFn:
|
|
88
|
+
queryFn: G,
|
|
89
89
|
enabled: m
|
|
90
90
|
}), R = _(
|
|
91
|
-
() =>
|
|
91
|
+
() => ae(l, e),
|
|
92
92
|
[l]
|
|
93
93
|
), N = _(
|
|
94
|
-
() =>
|
|
94
|
+
() => ie(A ?? [], S),
|
|
95
95
|
[A, S]
|
|
96
96
|
), g = async () => {
|
|
97
97
|
p(!0);
|
|
98
98
|
try {
|
|
99
|
-
await
|
|
99
|
+
await Q(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",
|
|
@@ -111,7 +111,7 @@ const le = () => {
|
|
|
111
111
|
} finally {
|
|
112
112
|
p(!1);
|
|
113
113
|
}
|
|
114
|
-
}, T = (r, o) => o === "actions" ? /* @__PURE__ */
|
|
114
|
+
}, T = (r, o) => o === "actions" ? /* @__PURE__ */ i(
|
|
115
115
|
k,
|
|
116
116
|
{
|
|
117
117
|
id: `delete-service-${r.id}-btn`,
|
|
@@ -119,18 +119,18 @@ const le = () => {
|
|
|
119
119
|
"aria-label": `delete-service-${r.id}-btn-aria-label`,
|
|
120
120
|
kind: "ghost",
|
|
121
121
|
label: e("ADMIN_ALL_SERVICES_DELETE_ICON_LABEL"),
|
|
122
|
-
disabled: !
|
|
122
|
+
disabled: !b,
|
|
123
123
|
onClick: () => c(r),
|
|
124
|
-
children: /* @__PURE__ */
|
|
124
|
+
children: /* @__PURE__ */ i(w, {})
|
|
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
|
-
return /* @__PURE__ */
|
|
131
|
-
|
|
130
|
+
return /* @__PURE__ */ i(
|
|
131
|
+
F,
|
|
132
132
|
{
|
|
133
|
-
header: /* @__PURE__ */
|
|
133
|
+
header: /* @__PURE__ */ i(H, { breadcrumbItems: f, userMenu: /* @__PURE__ */ i(W, {}) }),
|
|
134
134
|
main: m ? /* @__PURE__ */ y(
|
|
135
135
|
"div",
|
|
136
136
|
{
|
|
@@ -139,7 +139,7 @@ const le = () => {
|
|
|
139
139
|
"aria-label": "all-appointment-service-page-aria-label",
|
|
140
140
|
className: d.page,
|
|
141
141
|
children: [
|
|
142
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ i(
|
|
143
143
|
q,
|
|
144
144
|
{
|
|
145
145
|
id: "all-services",
|
|
@@ -147,25 +147,25 @@ const le = () => {
|
|
|
147
147
|
headers: R,
|
|
148
148
|
rows: N,
|
|
149
149
|
ariaLabel: "all-services-table",
|
|
150
|
-
loading:
|
|
151
|
-
errorStateMessage:
|
|
150
|
+
loading: v,
|
|
151
|
+
errorStateMessage: D ? e("ADMIN_ALL_SERVICES_ERROR_MESSAGE") : null,
|
|
152
152
|
emptyStateMessage: e("ADMIN_ALL_SERVICES_EMPTY_MESSAGE"),
|
|
153
153
|
renderCell: T,
|
|
154
154
|
className: d.table
|
|
155
155
|
}
|
|
156
156
|
),
|
|
157
|
-
E && /* @__PURE__ */
|
|
158
|
-
|
|
157
|
+
E && /* @__PURE__ */ i(
|
|
158
|
+
K,
|
|
159
159
|
{
|
|
160
160
|
serviceName: E.name,
|
|
161
|
-
isDeleting:
|
|
161
|
+
isDeleting: M,
|
|
162
162
|
onConfirm: g,
|
|
163
163
|
onCancel: () => c(null)
|
|
164
164
|
}
|
|
165
165
|
)
|
|
166
166
|
]
|
|
167
167
|
}
|
|
168
|
-
) : /* @__PURE__ */
|
|
168
|
+
) : /* @__PURE__ */ i(
|
|
169
169
|
"div",
|
|
170
170
|
{
|
|
171
171
|
id: "all-appointment-service-no-view-privilege",
|
|
@@ -179,5 +179,5 @@ const le = () => {
|
|
|
179
179
|
);
|
|
180
180
|
};
|
|
181
181
|
export {
|
|
182
|
-
|
|
182
|
+
oe as default
|
|
183
183
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { jsx as r, jsxs as p } from "react/jsx-runtime";
|
|
2
|
-
import { M as f,
|
|
3
|
-
import { useState as g, useMemo as N, useEffect as h, useRef as
|
|
4
|
-
import { useQuery as
|
|
5
|
-
const
|
|
2
|
+
import { M as f, O as P, Q as O, T as V, X as z, $ as ee, a0 as te, a1 as ie, W as ae, a2 as ne, u as Q, a3 as R, a4 as le, a5 as re, a6 as se, a7 as E, a8 as F, a9 as C, aa as Y, ab as x, ac as k, ad as $, r as oe, B as de, s as H, ae as ce, P as me, af as Ae, ag as Ie, ah as ue, x as _e, J as Te, y as Le } from "./index-eyrL1dkG.js";
|
|
3
|
+
import { useState as g, useMemo as N, useEffect as h, 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", q = "Get Appointment Unavailability", pe = "Add Appointment Unavailability", w = "Appointment Location", ye = () => {
|
|
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
|
+
}), Me = (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 Ne = "Available for appointments", q = "Get Appointment Unavailability", b
|
|
|
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,7 +36,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", b
|
|
|
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
42
|
startTime: O(
|
|
@@ -44,7 +44,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", b
|
|
|
44
44
|
),
|
|
45
45
|
endDate: f(e.endDate, a, !1, V).formattedResult,
|
|
46
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
50
|
const o = P(
|
|
@@ -55,15 +55,15 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", b
|
|
|
55
55
|
o !== null && c !== null && c <= o && (n.dateTime = a("ADMIN_UNAVAILABILITY_DATETIME_ERROR_MESSAGE"));
|
|
56
56
|
}
|
|
57
57
|
return n;
|
|
58
|
-
},
|
|
58
|
+
}, fe = (e, a) => ({
|
|
59
59
|
id: e.uuid,
|
|
60
60
|
startDateTime: f(`${e.startDate}T${e.startTime}`, a, !0).formattedResult,
|
|
61
61
|
endDateTime: f(`${e.endDate}T${e.endTime}`, a, !0).formattedResult,
|
|
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
|
-
}), K = (e) => e.filter((a) => !a.isSelectAll).map((a) => a.id),
|
|
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,
|
|
@@ -82,23 +82,23 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", b
|
|
|
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,
|
|
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(
|
|
@@ -108,7 +108,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", b
|
|
|
108
108
|
const u = await ie(
|
|
109
109
|
w
|
|
110
110
|
);
|
|
111
|
-
return
|
|
111
|
+
return he(u);
|
|
112
112
|
}
|
|
113
113
|
return I.filter(
|
|
114
114
|
(u) => u.tags?.some((v) => v.display === w)
|
|
@@ -119,14 +119,14 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", b
|
|
|
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 Ne = "Available for appointments", q = "Get Appointment Unavailability", b
|
|
|
137
137
|
isLoading: a || o || L || s,
|
|
138
138
|
isError: n || c || m || _
|
|
139
139
|
};
|
|
140
|
-
},
|
|
141
|
-
formContent:
|
|
142
|
-
formField:
|
|
143
|
-
loading:
|
|
144
|
-
error:
|
|
145
|
-
grid:
|
|
146
|
-
column:
|
|
147
|
-
dateTimeColumn:
|
|
148
|
-
datePicker:
|
|
149
|
-
timePicker:
|
|
150
|
-
},
|
|
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", xe = "UnavailabilityForm-module_datePicker__6HgbO", ke = "UnavailabilityForm-module_timePicker__DHNpK", d = {
|
|
141
|
+
formContent: Be,
|
|
142
|
+
formField: Pe,
|
|
143
|
+
loading: Oe,
|
|
144
|
+
error: Ve,
|
|
145
|
+
grid: Fe,
|
|
146
|
+
column: Ce,
|
|
147
|
+
dateTimeColumn: Ye,
|
|
148
|
+
datePicker: xe,
|
|
149
|
+
timePicker: ke
|
|
150
|
+
}, $e = ({
|
|
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: [],
|
|
@@ -168,12 +168,12 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", b
|
|
|
168
168
|
), I = N(
|
|
169
169
|
() => A.filter(
|
|
170
170
|
(i) => i.attributes?.some(
|
|
171
|
-
(b) => b.attributeType?.display ===
|
|
171
|
+
(b) => b.attributeType?.display === be && b.value
|
|
172
172
|
)
|
|
173
173
|
),
|
|
174
174
|
[A]
|
|
175
175
|
), u = N(
|
|
176
|
-
() => R(!1, !1, o,
|
|
176
|
+
() => R(!1, !1, o, Me, {
|
|
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", b
|
|
|
183
183
|
() => R(
|
|
184
184
|
!1,
|
|
185
185
|
!1,
|
|
186
|
-
|
|
186
|
+
De(
|
|
187
187
|
_,
|
|
188
188
|
t("ADMIN_UNAVAILABILITY_FORM_ALL_SERVICES")
|
|
189
189
|
),
|
|
@@ -195,11 +195,11 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", b
|
|
|
195
195
|
}
|
|
196
196
|
),
|
|
197
197
|
[_]
|
|
198
|
-
),
|
|
198
|
+
), y = 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 Ne = "Available for appointments", q = "Get Appointment Unavailability", b
|
|
|
214
214
|
);
|
|
215
215
|
return h(() => {
|
|
216
216
|
if (o.length === 0) return;
|
|
217
|
-
const i =
|
|
218
|
-
(
|
|
217
|
+
const i = ye(), b = o.some(
|
|
218
|
+
(M) => M.uuid === i
|
|
219
219
|
);
|
|
220
|
-
s((
|
|
221
|
-
...
|
|
220
|
+
s((M) => ({
|
|
221
|
+
...M,
|
|
222
222
|
locationUuid: b ? i : ""
|
|
223
223
|
}));
|
|
224
224
|
}, [o]), h(() => {
|
|
@@ -229,9 +229,9 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", b
|
|
|
229
229
|
}, [v]), h(() => {
|
|
230
230
|
I.length > 0 && s((i) => ({
|
|
231
231
|
...i,
|
|
232
|
-
selectedProviderItems:
|
|
232
|
+
selectedProviderItems: y
|
|
233
233
|
}));
|
|
234
|
-
}, [
|
|
234
|
+
}, [y]), a.current = {
|
|
235
235
|
...l,
|
|
236
236
|
filteredServicesCount: _.length,
|
|
237
237
|
availableProvidersCount: I.length
|
|
@@ -484,7 +484,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", b
|
|
|
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: y,
|
|
488
488
|
itemToString: (i) => i?.text ?? "",
|
|
489
489
|
selectedItems: l.selectedProviderItems,
|
|
490
490
|
onChange: (i) => s({
|
|
@@ -501,16 +501,16 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", b
|
|
|
501
501
|
]
|
|
502
502
|
}
|
|
503
503
|
);
|
|
504
|
-
},
|
|
505
|
-
page:
|
|
506
|
-
},
|
|
507
|
-
const { t: e } = Q(), a =
|
|
504
|
+
}, He = "index-module_page__s2h2y", qe = {
|
|
505
|
+
page: He
|
|
506
|
+
}, je = () => {
|
|
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({}), _ = H(
|
|
508
508
|
n,
|
|
509
509
|
q
|
|
510
510
|
), I = H(n, [
|
|
511
|
-
|
|
511
|
+
pe,
|
|
512
512
|
q
|
|
513
|
-
]), { data: u, isLoading: v, isError:
|
|
513
|
+
]), { data: u, isLoading: v, isError: y } = D({
|
|
514
514
|
queryKey: ["appointmentUnavailabilities"],
|
|
515
515
|
queryFn: ce,
|
|
516
516
|
enabled: _
|
|
@@ -537,7 +537,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", b
|
|
|
537
537
|
key: "providerName",
|
|
538
538
|
header: e("ADMIN_UNAVAILABILITY_COLUMN_PROVIDER")
|
|
539
539
|
}
|
|
540
|
-
], [e]),
|
|
540
|
+
], [e]), M = N(() => u ? u.map((T) => fe(T, e)) : [], [u, e]), S = U(
|
|
541
541
|
async (T) => {
|
|
542
542
|
L(!0);
|
|
543
543
|
try {
|
|
@@ -562,13 +562,13 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", b
|
|
|
562
562
|
[t, a, e]
|
|
563
563
|
), j = U(async () => {
|
|
564
564
|
if (!m.current) return;
|
|
565
|
-
const T =
|
|
566
|
-
s(T), !(Object.keys(T).length > 0) && await S(
|
|
565
|
+
const T = ge(m.current, e);
|
|
566
|
+
s(T), !(Object.keys(T).length > 0) && await S(Re(m.current, e));
|
|
567
567
|
}, [e, S]), W = U(
|
|
568
568
|
(T) => {
|
|
569
569
|
s((X) => {
|
|
570
570
|
const B = { ...X };
|
|
571
|
-
return T.forEach((
|
|
571
|
+
return T.forEach((Z) => delete B[Z]), B;
|
|
572
572
|
});
|
|
573
573
|
},
|
|
574
574
|
[]
|
|
@@ -578,7 +578,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", b
|
|
|
578
578
|
return /* @__PURE__ */ r(
|
|
579
579
|
Ie,
|
|
580
580
|
{
|
|
581
|
-
headerWSideNav: /* @__PURE__ */ r(Te, { breadcrumbItems: i }),
|
|
581
|
+
headerWSideNav: /* @__PURE__ */ r(Te, { breadcrumbItems: i, userMenu: /* @__PURE__ */ r(Le, {}) }),
|
|
582
582
|
hasSideNav: !1,
|
|
583
583
|
mainDisplay: /* @__PURE__ */ r(
|
|
584
584
|
"div",
|
|
@@ -586,7 +586,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", b
|
|
|
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: qe.page,
|
|
590
590
|
children: /* @__PURE__ */ r(
|
|
591
591
|
_e,
|
|
592
592
|
{
|
|
@@ -595,10 +595,10 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", b
|
|
|
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: M,
|
|
599
599
|
ariaLabel: "unavailability-table",
|
|
600
600
|
loading: v,
|
|
601
|
-
errorStateMessage:
|
|
601
|
+
errorStateMessage: y ? 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 Ne = "Available for appointments", q = "Get Appointment Unavailability", b
|
|
|
622
622
|
onSecondaryButtonClick: J,
|
|
623
623
|
isSecondaryButtonDisabled: A,
|
|
624
624
|
content: /* @__PURE__ */ r(
|
|
625
|
-
|
|
625
|
+
$e,
|
|
626
626
|
{
|
|
627
627
|
errors: l,
|
|
628
628
|
formDataRef: m,
|
|
@@ -636,5 +636,5 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", b
|
|
|
636
636
|
);
|
|
637
637
|
};
|
|
638
638
|
export {
|
|
639
|
-
|
|
639
|
+
je as default
|
|
640
640
|
};
|