@bahmni/appointments-app 0.0.1-dev.353 → 0.0.1-dev.355
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-TI2cownA-CO7WQWOy.js → DocumentsTable-BhIePIn7-BSWGkN7I.js} +1 -1
- package/dist/{FormsTable-DY1pz_8H-T2cQhzAn.js → FormsTable-CABJ9J_5-CgvRlSpt.js} +27 -27
- package/dist/{LNWAZHJI-B729UFyV.js → LNWAZHJI-BOkev9ER.js} +2 -2
- package/dist/{MWZ6AO7Z-BrFNx6nP.js → MWZ6AO7Z-BLrA5Vyz.js} +2 -2
- package/dist/{Observations-a7Heef0b-CpEIZTuI.js → Observations-KUm4RnZW-CYs1mi0j.js} +8 -8
- package/dist/{YPM2AS64-CbBUq3Jp.js → YPM2AS64-DNmVm9tg.js} +1 -1
- package/dist/{index-Bg7FJdx0.js → index-BgDoxHNf.js} +24 -24
- package/dist/{index-Dm38860f.js → index-CIIVjYDi.js} +10 -10
- package/dist/{index-Cs_HlPMV.js → index-Ux2KguE2.js} +741 -746
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as r, jsxs as h, Fragment as Q } from "react/jsx-runtime";
|
|
2
|
-
import { m as x, u as W, a as Y, H as J,
|
|
2
|
+
import { m as x, u as W, a as Y, H as J, t as X, g as Z, e as ee, d as te } from "./index-Ux2KguE2.js";
|
|
3
3
|
import { useQuery as ae } from "@tanstack/react-query";
|
|
4
4
|
import { useState as l, useCallback as _, useEffect as I, useMemo as p } from "react";
|
|
5
5
|
const ne = "DocumentsTable-module_documentsTableBody__6iR3w", oe = "DocumentsTable-module_viewAttachmentsLink__aQ1on", re = "DocumentsTable-module_documentViewerContainer__F5m8D", de = "DocumentsTable-module_attachmentItem__17KA7", se = "DocumentsTable-module_attachmentCounter__WFiI3", me = "DocumentsTable-module_attachmentError__RI4U2", ce = "DocumentsTable-module_documentIframe__ptq5I", le = "DocumentsTable-module_documentImage__KQVgS", d = {
|
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
import { jsx as i, jsxs as x, Fragment as he } from "react/jsx-runtime";
|
|
2
|
-
import { u as ge, m as pe, w as Ne, x as Oe, h as be, V as Ie, X as Te, y as Ae, k as Ee, J as _e, A as ve, N as Fe, o as z, g as Se, b as K, c as P,
|
|
3
|
-
import { useQueryClient as
|
|
2
|
+
import { u as ge, m as pe, w as Ne, x as Oe, h as be, V as Ie, X as Te, y as Ae, k as Ee, J as _e, A as ve, N as Fe, o as z, g as Se, b as K, c as P, t as Ce, e as Q, f as Re, i as Be, d as Le, W as Me, I as Ue } from "./index-Ux2KguE2.js";
|
|
3
|
+
import { useQueryClient as De, useQuery as b } from "@tanstack/react-query";
|
|
4
4
|
import { useState as X, useMemo as d, useCallback as l } from "react";
|
|
5
|
-
const
|
|
6
|
-
formsTableBody:
|
|
5
|
+
const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_modalHeading__wnTmA", qe = "FormsTable-module_customAccordianItem__isszs", I = {
|
|
6
|
+
formsTableBody: ke,
|
|
7
7
|
modalHeading: we,
|
|
8
8
|
customAccordianItem: qe
|
|
9
9
|
}, He = "startConsultation", xe = ({
|
|
10
|
-
episodeOfCareUuids:
|
|
10
|
+
episodeOfCareUuids: C,
|
|
11
11
|
encounterUuids: c,
|
|
12
12
|
config: J,
|
|
13
13
|
disableActions: W = !1,
|
|
14
14
|
activeEncounterUuid: h = null
|
|
15
15
|
}) => {
|
|
16
|
-
const { t: n } = ge(), u = pe(), [g,
|
|
16
|
+
const { t: n } = ge(), u = pe(), [g, R] = X(!1), [s, B] = X(null), {
|
|
17
17
|
numberOfVisits: Y,
|
|
18
18
|
hideThumbnail: Z = !1,
|
|
19
19
|
forms: p
|
|
20
20
|
} = J ?? {}, ee = Ne(
|
|
21
21
|
Ue.EDIT_OBSERVATIONS
|
|
22
|
-
), { userPrivileges: N } = Oe(), T = ee && !W && !!h,
|
|
23
|
-
|
|
22
|
+
), { userPrivileges: N } = Oe(), T = ee && !W && !!h, L = be(
|
|
23
|
+
C,
|
|
24
24
|
c
|
|
25
|
-
), re =
|
|
26
|
-
data:
|
|
25
|
+
), re = De(), {
|
|
26
|
+
data: M = [],
|
|
27
27
|
isLoading: U,
|
|
28
|
-
isError:
|
|
28
|
+
isError: D,
|
|
29
29
|
error: oe,
|
|
30
30
|
refetch: ae
|
|
31
31
|
} = b({
|
|
32
|
-
queryKey: ["forms", u,
|
|
32
|
+
queryKey: ["forms", u, C],
|
|
33
33
|
queryFn: () => Ie(u, void 0, Y),
|
|
34
|
-
enabled: !!u && !
|
|
35
|
-
}),
|
|
36
|
-
let e =
|
|
34
|
+
enabled: !!u && !L
|
|
35
|
+
}), k = d(() => {
|
|
36
|
+
let e = M;
|
|
37
37
|
return c && c.length > 0 && (e = e.filter(
|
|
38
38
|
(r) => c.includes(r.encounterUuid)
|
|
39
39
|
)), Array.isArray(p) && p.length > 0 && (e = e.filter(
|
|
40
40
|
(r) => p.some((o) => o.toLowerCase() === r.formName.toLowerCase())
|
|
41
41
|
)), e;
|
|
42
|
-
}, [
|
|
42
|
+
}, [M, c, p]), { data: O = [] } = b({
|
|
43
43
|
queryKey: ["observationForms"],
|
|
44
44
|
queryFn: () => Te()
|
|
45
45
|
}), w = l(
|
|
@@ -136,7 +136,7 @@ const De = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
136
136
|
],
|
|
137
137
|
[]
|
|
138
138
|
), V = d(() => {
|
|
139
|
-
const e =
|
|
139
|
+
const e = k.reduce(
|
|
140
140
|
(r, o) => {
|
|
141
141
|
const a = o.formName;
|
|
142
142
|
r[a] ??= [];
|
|
@@ -160,10 +160,10 @@ const De = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
160
160
|
)
|
|
161
161
|
})
|
|
162
162
|
).sort((r, o) => r.formName.localeCompare(o.formName));
|
|
163
|
-
}, [
|
|
164
|
-
|
|
163
|
+
}, [k, n]), G = l((e) => {
|
|
164
|
+
B(e), R(!0);
|
|
165
165
|
}, []), $ = l(() => {
|
|
166
|
-
|
|
166
|
+
R(!1), B(null);
|
|
167
167
|
}, []), F = l((e) => {
|
|
168
168
|
globalThis.dispatchEvent(
|
|
169
169
|
new CustomEvent(He, {
|
|
@@ -180,7 +180,7 @@ const De = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
180
180
|
(e, r) => {
|
|
181
181
|
switch (r) {
|
|
182
182
|
case "recordedOn":
|
|
183
|
-
return /* @__PURE__ */ i(
|
|
183
|
+
return /* @__PURE__ */ i(Ce, { onClick: () => G(e), children: e.recordedOn });
|
|
184
184
|
case "recordedBy":
|
|
185
185
|
return e.recordedBy;
|
|
186
186
|
case "actions":
|
|
@@ -202,23 +202,23 @@ const De = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
202
202
|
[G, F, f, n]
|
|
203
203
|
);
|
|
204
204
|
return /* @__PURE__ */ x(he, { children: [
|
|
205
|
-
/* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: U ||
|
|
205
|
+
/* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: U || D || V.length === 0 || L ? /* @__PURE__ */ i(
|
|
206
206
|
Q,
|
|
207
207
|
{
|
|
208
208
|
headers: fe,
|
|
209
209
|
ariaLabel: n("FORMS_HEADING"),
|
|
210
210
|
rows: [],
|
|
211
211
|
loading: U,
|
|
212
|
-
errorStateMessage:
|
|
212
|
+
errorStateMessage: D ? oe?.message : void 0,
|
|
213
213
|
emptyStateMessage: n("FORMS_UNAVAILABLE"),
|
|
214
214
|
renderCell: j,
|
|
215
215
|
className: I.formsTableBody,
|
|
216
216
|
dataTestId: "forms-table"
|
|
217
217
|
}
|
|
218
|
-
) : /* @__PURE__ */ i(
|
|
218
|
+
) : /* @__PURE__ */ i(Re, { align: "start", children: V.map((e, r) => {
|
|
219
219
|
const { formName: o, records: a } = e, t = ue(a);
|
|
220
220
|
return /* @__PURE__ */ i(
|
|
221
|
-
|
|
221
|
+
Be,
|
|
222
222
|
{
|
|
223
223
|
title: o,
|
|
224
224
|
className: I.customAccordianItem,
|
|
@@ -244,7 +244,7 @@ const De = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
244
244
|
);
|
|
245
245
|
}) }) }),
|
|
246
246
|
g && s && /* @__PURE__ */ i(
|
|
247
|
-
|
|
247
|
+
Le,
|
|
248
248
|
{
|
|
249
249
|
id: "modalIdForActionAreaLayout",
|
|
250
250
|
portalId: "main-display-area",
|
|
@@ -271,7 +271,7 @@ const De = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
271
271
|
size: "md",
|
|
272
272
|
testId: "form-details-modal",
|
|
273
273
|
children: /* @__PURE__ */ i(
|
|
274
|
-
|
|
274
|
+
Me,
|
|
275
275
|
{
|
|
276
276
|
observations: de,
|
|
277
277
|
isLoading: te || ne,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-
|
|
2
|
-
import { an as p, ao as d, ap as e } from "./index-
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-DNmVm9tg.js";
|
|
2
|
+
import { an as p, ao as d, ap as e } from "./index-Ux2KguE2.js";
|
|
3
3
|
var f = (a) => {
|
|
4
4
|
const [r, o] = c({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as s, T as c, P as u, a as i, b as m, C as P, Q as d } from "./YPM2AS64-
|
|
2
|
-
import { an as v, ao as C, ap as e } from "./index-
|
|
1
|
+
import { c as s, T as c, P as u, a as i, b as m, C as P, Q as d } from "./YPM2AS64-DNmVm9tg.js";
|
|
2
|
+
import { an as v, ao as C, ap as e } from "./index-Ux2KguE2.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as S, jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import { m as
|
|
2
|
+
import { m as Q, a as V, u as N, v as q, E as k, J as z, T as M, O as j, L as w, F as x, e as H, C as J, Q as D, z as P, p as Y, j as W, n as X, l as Z, q as ee } from "./index-Ux2KguE2.js";
|
|
3
3
|
import { useQueries as ae, useQuery as te } from "@tanstack/react-query";
|
|
4
4
|
import { useRef as se, useEffect as $, useMemo as T } from "react";
|
|
5
5
|
const F = (a, n, d, l, b, r) => {
|
|
@@ -113,20 +113,20 @@ 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 =
|
|
116
|
+
} = n, r = se(/* @__PURE__ */ new Set()), t = Q(), { addNotification: s } = V(), { t: o } = N(), i = ae({
|
|
117
117
|
queries: d.map((e) => ({
|
|
118
118
|
queryKey: de(e),
|
|
119
|
-
queryFn: () =>
|
|
119
|
+
queryFn: () => q(e),
|
|
120
120
|
enabled: !!e
|
|
121
121
|
}))
|
|
122
122
|
});
|
|
123
123
|
$(() => {
|
|
124
124
|
i.forEach((e, h) => {
|
|
125
125
|
if (e.isError && !r.current.has(h)) {
|
|
126
|
-
const
|
|
126
|
+
const K = d[h];
|
|
127
127
|
s({
|
|
128
128
|
title: o("ERROR_DEFAULT_TITLE"),
|
|
129
|
-
message: o("ERROR_FETCHING_CONCEPT", { conceptName:
|
|
129
|
+
message: o("ERROR_FETCHING_CONCEPT", { conceptName: K }),
|
|
130
130
|
type: "error"
|
|
131
131
|
}), r.current.add(h);
|
|
132
132
|
} else e.isError || r.current.delete(h);
|
|
@@ -164,7 +164,7 @@ const F = (a, n, d, l, b, r) => {
|
|
|
164
164
|
{ key: "name", header: "name" },
|
|
165
165
|
{ key: "value", header: "value" },
|
|
166
166
|
{ key: "form", header: "form" }
|
|
167
|
-
], g = L || !v, _ = O && v, G = (!c || c.entry?.length === 0 || p.length === 0) && v, A = _ ? o("ERROR_FETCHING_OBSERVATIONS") : null,
|
|
167
|
+
], g = L || !v, _ = O && v, G = (!c || c.entry?.length === 0 || p.length === 0) && v, A = _ ? o("ERROR_FETCHING_OBSERVATIONS") : null, U = G ? o("NO_OBSERVATIONS_FOUND") : void 0, B = f.length > 0 && !g && !_, E = n.titleTranslationKey, y = E ? o(E) : "";
|
|
168
168
|
return /* @__PURE__ */ S(
|
|
169
169
|
"div",
|
|
170
170
|
{
|
|
@@ -183,7 +183,7 @@ const F = (a, n, d, l, b, r) => {
|
|
|
183
183
|
children: /* @__PURE__ */ u("p", { children: y })
|
|
184
184
|
}
|
|
185
185
|
),
|
|
186
|
-
|
|
186
|
+
B ? /* @__PURE__ */ u(
|
|
187
187
|
oe,
|
|
188
188
|
{
|
|
189
189
|
groupedData: f,
|
|
@@ -198,7 +198,7 @@ const F = (a, n, d, l, b, r) => {
|
|
|
198
198
|
ariaLabel: o("OBSERVATIONS"),
|
|
199
199
|
loading: g,
|
|
200
200
|
errorStateMessage: A,
|
|
201
|
-
emptyStateMessage:
|
|
201
|
+
emptyStateMessage: U,
|
|
202
202
|
dataTestId: "observations-table"
|
|
203
203
|
}
|
|
204
204
|
)
|
|
@@ -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-Ux2KguE2.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as r, jsxs as p } from "react/jsx-runtime";
|
|
2
|
-
import { $ as f, a0 as B, a1 as O, a2 as V, a3 as Z, a4 as ee, a5 as te, a6 as ie,
|
|
2
|
+
import { $ as f, a0 as B, a1 as O, a2 as V, a3 as Z, 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 E, ad as F, ae as C, af as Y, ag as x, ah as k, ai as H, x as oe, a as de, G as $, aj as ce, K as me, ak as Ae, al as Ie, am as ue, P as _e, R as Te, S as Le } from "./index-Ux2KguE2.js";
|
|
3
3
|
import { useState as g, useMemo as N, useEffect as S, useRef as ve, useCallback as U } from "react";
|
|
4
|
-
import { useQuery as
|
|
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
7
|
return Z().uuid;
|
|
@@ -11,10 +11,10 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
11
11
|
}, K = (e) => ({
|
|
12
12
|
id: "",
|
|
13
13
|
text: e
|
|
14
|
-
}),
|
|
14
|
+
}), ye = (e) => ({
|
|
15
15
|
display: e,
|
|
16
16
|
uuid: ""
|
|
17
|
-
}),
|
|
17
|
+
}), Me = (e, a) => {
|
|
18
18
|
const n = e.map((t) => ({
|
|
19
19
|
id: t.uuid,
|
|
20
20
|
text: t.name,
|
|
@@ -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
|
+
} = M({
|
|
95
95
|
queryKey: ["currentUser"],
|
|
96
96
|
queryFn: ee
|
|
97
97
|
}), {
|
|
98
98
|
data: t = [],
|
|
99
99
|
isLoading: o,
|
|
100
100
|
isError: c
|
|
101
|
-
} =
|
|
101
|
+
} = M({
|
|
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
|
+
} = M({
|
|
123
123
|
queryKey: ["appointmentServices"],
|
|
124
124
|
queryFn: ae
|
|
125
125
|
}), {
|
|
126
126
|
data: l = [],
|
|
127
127
|
isLoading: s,
|
|
128
128
|
isError: _
|
|
129
|
-
} =
|
|
129
|
+
} = M({
|
|
130
130
|
queryKey: ["providers"],
|
|
131
131
|
queryFn: ne
|
|
132
132
|
});
|
|
@@ -147,7 +147,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
147
147
|
dateTimeColumn: Ye,
|
|
148
148
|
datePicker: xe,
|
|
149
149
|
timePicker: ke
|
|
150
|
-
},
|
|
150
|
+
}, He = ({
|
|
151
151
|
errors: e,
|
|
152
152
|
formDataRef: a,
|
|
153
153
|
onClearErrors: n
|
|
@@ -173,7 +173,7 @@ const be = "Available for appointments", q = "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")
|
|
@@ -183,7 +183,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
183
183
|
() => R(
|
|
184
184
|
!1,
|
|
185
185
|
!1,
|
|
186
|
-
|
|
186
|
+
Me(
|
|
187
187
|
_,
|
|
188
188
|
t("ADMIN_UNAVAILABILITY_FORM_ALL_SERVICES")
|
|
189
189
|
),
|
|
@@ -215,10 +215,10 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
215
215
|
return S(() => {
|
|
216
216
|
if (o.length === 0) return;
|
|
217
217
|
const i = De(), b = o.some(
|
|
218
|
-
(
|
|
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]), S(() => {
|
|
@@ -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
|
+
H,
|
|
454
454
|
{
|
|
455
455
|
id: "service-multiselect",
|
|
456
456
|
"data-testid": "service-multiselect",
|
|
@@ -478,7 +478,7 @@ 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
|
+
H,
|
|
482
482
|
{
|
|
483
483
|
id: "provider-multiselect",
|
|
484
484
|
"data-testid": "provider-multiselect",
|
|
@@ -501,16 +501,16 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
501
501
|
]
|
|
502
502
|
}
|
|
503
503
|
);
|
|
504
|
-
},
|
|
505
|
-
page:
|
|
504
|
+
}, $e = "index-module_page__s2h2y", qe = {
|
|
505
|
+
page: $e
|
|
506
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({}), _ =
|
|
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({}), _ = $(
|
|
508
508
|
n,
|
|
509
509
|
q
|
|
510
|
-
), I =
|
|
510
|
+
), I = $(n, [
|
|
511
511
|
pe,
|
|
512
512
|
q
|
|
513
|
-
]), { data: u, isLoading: v, isError: D } =
|
|
513
|
+
]), { data: u, isLoading: v, isError: D } = M({
|
|
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]),
|
|
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 {
|
|
@@ -595,7 +595,7 @@ const be = "Available for appointments", q = "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
601
|
errorStateMessage: D ? e("ADMIN_UNAVAILABILITY_ERROR_MESSAGE") : null,
|
|
@@ -622,7 +622,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
622
622
|
onSecondaryButtonClick: z,
|
|
623
623
|
isSecondaryButtonDisabled: A,
|
|
624
624
|
content: /* @__PURE__ */ r(
|
|
625
|
-
|
|
625
|
+
He,
|
|
626
626
|
{
|
|
627
627
|
errors: l,
|
|
628
628
|
formDataRef: m,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as i, jsxs as y } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { r as V, s as O, u as C, B as P, D as h, a as B, x as G, G as L, _ as x, K as U, M as H, P as q, R as F, S as k, U as K, Y as j, Z as Q } from "./index-Ux2KguE2.js";
|
|
3
3
|
import { useState as I, useMemo as c } from "react";
|
|
4
4
|
import { useQueryClient as $, useQuery as W } from "@tanstack/react-query";
|
|
5
5
|
const Y = V(
|
|
@@ -75,9 +75,9 @@ function ie(e, a) {
|
|
|
75
75
|
}));
|
|
76
76
|
}
|
|
77
77
|
const oe = () => {
|
|
78
|
-
const { t: e } = C(), a = $(), { addNotification: t } = B(), { userPrivileges: s } = G(), { appointmentsConfig: n } = Y(), [E, _] = I(null), [M,
|
|
78
|
+
const { t: e } = C(), a = $(), { addNotification: t } = B(), { userPrivileges: s } = G(), { appointmentsConfig: n } = Y(), [E, _] = I(null), [M, p] = I(!1), l = n?.serviceTableFields ?? [
|
|
79
79
|
...u
|
|
80
|
-
],
|
|
80
|
+
], S = L(s, z), b = L(
|
|
81
81
|
s,
|
|
82
82
|
w
|
|
83
83
|
), m = c(
|
|
@@ -86,7 +86,7 @@ const oe = () => {
|
|
|
86
86
|
), { data: A, isLoading: v, isError: D } = W({
|
|
87
87
|
queryKey: ["allAppointmentServices"],
|
|
88
88
|
queryFn: x,
|
|
89
|
-
enabled:
|
|
89
|
+
enabled: S
|
|
90
90
|
}), R = c(
|
|
91
91
|
() => ae(l, e),
|
|
92
92
|
[l]
|
|
@@ -94,7 +94,7 @@ const oe = () => {
|
|
|
94
94
|
() => ie(A ?? [], m),
|
|
95
95
|
[A, m]
|
|
96
96
|
), g = async () => {
|
|
97
|
-
|
|
97
|
+
p(!0);
|
|
98
98
|
try {
|
|
99
99
|
await Q(E.id), t({
|
|
100
100
|
title: e("ADMIN_ALL_SERVICES_DELETE_SUCCESS_TITLE"),
|
|
@@ -109,7 +109,7 @@ const oe = () => {
|
|
|
109
109
|
type: "error"
|
|
110
110
|
});
|
|
111
111
|
} finally {
|
|
112
|
-
|
|
112
|
+
p(!1);
|
|
113
113
|
}
|
|
114
114
|
}, T = (r, o) => o === "actions" ? /* @__PURE__ */ i(
|
|
115
115
|
K,
|
|
@@ -128,10 +128,10 @@ const oe = () => {
|
|
|
128
128
|
{ id: "admin", label: e("BREADCRUMB_ADMIN"), isCurrentPage: !0 }
|
|
129
129
|
];
|
|
130
130
|
return /* @__PURE__ */ i(
|
|
131
|
-
|
|
131
|
+
H,
|
|
132
132
|
{
|
|
133
|
-
header: /* @__PURE__ */ i(
|
|
134
|
-
main:
|
|
133
|
+
header: /* @__PURE__ */ i(F, { breadcrumbItems: f, userMenu: /* @__PURE__ */ i(k, {}) }),
|
|
134
|
+
main: S ? /* @__PURE__ */ y(
|
|
135
135
|
"div",
|
|
136
136
|
{
|
|
137
137
|
id: "all-appointment-service-page",
|
|
@@ -140,7 +140,7 @@ const oe = () => {
|
|
|
140
140
|
className: d.page,
|
|
141
141
|
children: [
|
|
142
142
|
/* @__PURE__ */ i(
|
|
143
|
-
|
|
143
|
+
q,
|
|
144
144
|
{
|
|
145
145
|
id: "all-services",
|
|
146
146
|
title: e("ADMIN_ALL_SERVICES_TITLE"),
|