@bahmni/appointments-app 0.0.1-dev.286 → 0.0.1-dev.289
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-CTZvYQiU-Cy2h5XUJ.js → DocumentsTable-DXWkjdux-DPHdJIkQ.js} +9 -9
- package/dist/{FormsTable-TGKGC2Zf-31lzkdNH.js → FormsTable-DLJpQ6yJ-BsnUkeXd.js} +34 -34
- package/dist/{LNWAZHJI-CSR35rFA.js → LNWAZHJI-MQmeJpyh.js} +2 -2
- package/dist/{MWZ6AO7Z-CCRrPBT_.js → MWZ6AO7Z-DFzfj7oi.js} +2 -2
- package/dist/{Observations-DI0NQ7gj-Bk4ZogWi.js → Observations-Dk1JBpvB-CLxEklVq.js} +26 -26
- package/dist/{YPM2AS64-CLvRhvlv.js → YPM2AS64-BYVUVZZ1.js} +1 -1
- package/dist/{index-Bx6916Te.js → index-CKmNESyE.js} +55 -55
- package/dist/{index-CY9ZHiEQ.js → index-CWWn6JGL.js} +17 -17
- package/dist/{index-C4a20Q8s.js → index-tUeb3uQs.js} +33 -33
- 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 x } from "react/jsx-runtime";
|
|
2
|
-
import { u as G, a as W, h as Y,
|
|
2
|
+
import { u as G, a as W, h as Y, k as J, w as X, m as Z, c as ee, n as te } from "./index-CKmNESyE.js";
|
|
3
3
|
import { useQuery as ae } from "@tanstack/react-query";
|
|
4
4
|
import { useState as l, useCallback as _, useEffect as N, 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 = {
|
|
@@ -18,7 +18,7 @@ const ne = "DocumentsTable-module_documentsTableBody__6iR3w", oe = "DocumentsTab
|
|
|
18
18
|
uploadedBy: "DOCUMENTS_UPLOADED_BY",
|
|
19
19
|
attachments: "DOCUMENTS_ATTACHMENTS"
|
|
20
20
|
};
|
|
21
|
-
function
|
|
21
|
+
function R(a) {
|
|
22
22
|
return !a || a.includes(":") ? "#" : `/openmrs/auth?requested_document=/document_images/${a}`;
|
|
23
23
|
}
|
|
24
24
|
function ie(a, g) {
|
|
@@ -33,12 +33,12 @@ const Te = [
|
|
|
33
33
|
"attachments",
|
|
34
34
|
"uploadedOn",
|
|
35
35
|
"uploadedBy"
|
|
36
|
-
], he = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i,
|
|
36
|
+
], he = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i, B = (a) => a.attachments.length > 0 ? a.attachments : a.documentUrl ? [{ url: a.documentUrl, contentType: a.contentType }] : [], fe = ({ config: a, encounterUuids: g }) => {
|
|
37
37
|
const [s, w] = l(!1), [o, U] = l(
|
|
38
38
|
null
|
|
39
|
-
), [
|
|
39
|
+
), [k, D] = l(
|
|
40
40
|
/* @__PURE__ */ new Set()
|
|
41
|
-
), E = G(), { t: n } = W(), { addNotification: L } = Y(),
|
|
41
|
+
), E = G(), { t: n } = W(), { addNotification: L } = Y(), $ = Number(a?.pageSize) || 5, [O, C] = l(1), [u, V] = l($), [F, A] = l(void 0), M = _((e) => {
|
|
42
42
|
U(e), w(!0);
|
|
43
43
|
}, []), H = _(() => {
|
|
44
44
|
w(!1), U(null), D(/* @__PURE__ */ new Set());
|
|
@@ -74,9 +74,9 @@ const Te = [
|
|
|
74
74
|
const e = new AbortController();
|
|
75
75
|
return (async () => {
|
|
76
76
|
if (!s || !o) return;
|
|
77
|
-
const t = /* @__PURE__ */ new Set(), m =
|
|
77
|
+
const t = /* @__PURE__ */ new Set(), m = B(o);
|
|
78
78
|
for (let c = 0; c < m.length; c++) {
|
|
79
|
-
const S =
|
|
79
|
+
const S = R(m[c].url);
|
|
80
80
|
try {
|
|
81
81
|
(await fetch(S, {
|
|
82
82
|
method: "HEAD",
|
|
@@ -104,7 +104,7 @@ const Te = [
|
|
|
104
104
|
})),
|
|
105
105
|
[f]
|
|
106
106
|
), T = p(
|
|
107
|
-
() => o ?
|
|
107
|
+
() => o ? B(o) : [],
|
|
108
108
|
[o]
|
|
109
109
|
), Q = _(
|
|
110
110
|
(e, t) => {
|
|
@@ -169,7 +169,7 @@ const Te = [
|
|
|
169
169
|
size: "lg",
|
|
170
170
|
testId: "document-view-modal",
|
|
171
171
|
children: /* @__PURE__ */ r("div", { className: d.documentViewerContainer, children: T.map((e, t) => {
|
|
172
|
-
const m =
|
|
172
|
+
const m = R(e.url), c = e.contentType?.toLowerCase().includes("pdf"), S = (e.contentType?.toLowerCase().includes("image") ?? !1) || he.test(e.url ?? ""), I = k.has(t);
|
|
173
173
|
return m === "#" || I ? /* @__PURE__ */ h(
|
|
174
174
|
"div",
|
|
175
175
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as s, jsxs as
|
|
2
|
-
import { a as ee, u as re, v as ae,
|
|
1
|
+
import { jsx as s, jsxs as W, Fragment as X } from "react/jsx-runtime";
|
|
2
|
+
import { a as ee, u as re, v as ae, Z as oe, S as te, I as se, $ as ne, e as de, _ as R, m as ie, w as me, c as q, O as ue, L as le, n as ce, q as fe, D as ye } from "./index-CKmNESyE.js";
|
|
3
3
|
import { useQueryClient as be, useQuery as f } from "@tanstack/react-query";
|
|
4
4
|
import { useState as U, useMemo as d, useCallback as y } from "react";
|
|
5
5
|
const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_customAccordianItem__isszs", A = {
|
|
@@ -13,21 +13,21 @@ const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_cu
|
|
|
13
13
|
config: H
|
|
14
14
|
}) => {
|
|
15
15
|
const { t } = ee(), u = re(), [l, O] = U(!1), [o, I] = U(null), {
|
|
16
|
-
numberOfVisits:
|
|
17
|
-
hideThumbnail:
|
|
16
|
+
numberOfVisits: w,
|
|
17
|
+
hideThumbnail: $ = !1,
|
|
18
18
|
forms: c
|
|
19
19
|
} = H ?? {}, L = ae(
|
|
20
20
|
m,
|
|
21
21
|
n
|
|
22
|
-
),
|
|
22
|
+
), k = be(), {
|
|
23
23
|
data: T = [],
|
|
24
24
|
isLoading: F,
|
|
25
25
|
isError: _,
|
|
26
|
-
error:
|
|
27
|
-
refetch:
|
|
26
|
+
error: K,
|
|
27
|
+
refetch: j
|
|
28
28
|
} = f({
|
|
29
29
|
queryKey: ["forms", u, m],
|
|
30
|
-
queryFn: () => oe(u, void 0,
|
|
30
|
+
queryFn: () => oe(u, void 0, w),
|
|
31
31
|
enabled: !!u && !L
|
|
32
32
|
}), v = d(() => {
|
|
33
33
|
let e = T;
|
|
@@ -39,15 +39,15 @@ const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_cu
|
|
|
39
39
|
}, [T, n, c]), { data: B = [] } = f({
|
|
40
40
|
queryKey: ["observationForms"],
|
|
41
41
|
queryFn: () => te()
|
|
42
|
-
}),
|
|
42
|
+
}), D = y(
|
|
43
43
|
(e) => B.find((r) => r.name === e)?.uuid,
|
|
44
44
|
[B]
|
|
45
45
|
), b = d(() => {
|
|
46
46
|
if (o)
|
|
47
|
-
return
|
|
48
|
-
}, [o,
|
|
49
|
-
isLoading:
|
|
50
|
-
isError:
|
|
47
|
+
return D(o.formName);
|
|
48
|
+
}, [o, D]), {
|
|
49
|
+
isLoading: x,
|
|
50
|
+
isError: V,
|
|
51
51
|
error: p
|
|
52
52
|
} = f({
|
|
53
53
|
queryKey: ["formMetadata", b],
|
|
@@ -65,36 +65,36 @@ const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_cu
|
|
|
65
65
|
});
|
|
66
66
|
de(
|
|
67
67
|
(e) => {
|
|
68
|
-
e.patientUUID === u && e.updatedConcepts.size > 0 && (
|
|
68
|
+
e.patientUUID === u && e.updatedConcepts.size > 0 && (j(), k.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
69
69
|
},
|
|
70
70
|
[u]
|
|
71
71
|
);
|
|
72
72
|
const Q = d(() => !g?.entry || !o?.formName ? [] : g.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => {
|
|
73
73
|
const r = Ne(e);
|
|
74
74
|
return !r || r.includes(o.formName);
|
|
75
|
-
}), [g, o?.formName]),
|
|
75
|
+
}), [g, o?.formName]), P = d(() => {
|
|
76
76
|
if (p)
|
|
77
|
-
return
|
|
77
|
+
return R(p).message;
|
|
78
78
|
if (N)
|
|
79
|
-
return
|
|
80
|
-
}, [p, N]),
|
|
79
|
+
return R(N).message;
|
|
80
|
+
}, [p, N]), E = d(
|
|
81
81
|
() => [
|
|
82
82
|
{ key: "recordedOn", header: t("RECORDED_ON") },
|
|
83
83
|
{ key: "recordedBy", header: t("RECORDED_BY") }
|
|
84
84
|
],
|
|
85
85
|
[t]
|
|
86
|
-
),
|
|
86
|
+
), Y = d(
|
|
87
87
|
() => [
|
|
88
88
|
{ key: "recordedOn", sortable: !0 },
|
|
89
89
|
{ key: "recordedBy", sortable: !0 }
|
|
90
90
|
],
|
|
91
91
|
[]
|
|
92
|
-
),
|
|
92
|
+
), M = d(() => {
|
|
93
93
|
const e = v.reduce(
|
|
94
94
|
(r, a) => {
|
|
95
95
|
const i = a.formName;
|
|
96
96
|
r[i] ??= [];
|
|
97
|
-
const h = a.providers.map((
|
|
97
|
+
const h = a.providers.map((J) => J.providerName).filter(Boolean).join(", ");
|
|
98
98
|
return r[i].push({
|
|
99
99
|
id: a.encounterUuid,
|
|
100
100
|
formName: a.formName,
|
|
@@ -116,7 +116,7 @@ const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_cu
|
|
|
116
116
|
).sort((r, a) => r.formName.localeCompare(a.formName));
|
|
117
117
|
}, [v, t]), S = y((e) => {
|
|
118
118
|
I(e), O(!0);
|
|
119
|
-
}, []),
|
|
119
|
+
}, []), Z = y(() => {
|
|
120
120
|
O(!1), I(null);
|
|
121
121
|
}, []), C = y(
|
|
122
122
|
(e, r) => {
|
|
@@ -131,21 +131,21 @@ const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_cu
|
|
|
131
131
|
},
|
|
132
132
|
[S]
|
|
133
133
|
);
|
|
134
|
-
return /* @__PURE__ */
|
|
135
|
-
/* @__PURE__ */ s("div", { id: "forms-table", "data-testid": "forms-table", children: F || _ ||
|
|
134
|
+
return /* @__PURE__ */ W(X, { children: [
|
|
135
|
+
/* @__PURE__ */ s("div", { id: "forms-table", "data-testid": "forms-table", children: F || _ || M.length === 0 || L ? /* @__PURE__ */ s(
|
|
136
136
|
q,
|
|
137
137
|
{
|
|
138
|
-
headers:
|
|
138
|
+
headers: E,
|
|
139
139
|
ariaLabel: t("FORMS_HEADING"),
|
|
140
140
|
rows: [],
|
|
141
141
|
loading: F,
|
|
142
|
-
errorStateMessage: _ ?
|
|
142
|
+
errorStateMessage: _ ? K?.message : void 0,
|
|
143
143
|
emptyStateMessage: t("FORMS_UNAVAILABLE"),
|
|
144
144
|
renderCell: C,
|
|
145
145
|
className: A.formsTableBody,
|
|
146
146
|
dataTestId: "forms-table"
|
|
147
147
|
}
|
|
148
|
-
) : /* @__PURE__ */ s(ue, { align: "start", children:
|
|
148
|
+
) : /* @__PURE__ */ s(ue, { align: "start", children: M.map((e, r) => {
|
|
149
149
|
const { formName: a, records: i } = e;
|
|
150
150
|
return /* @__PURE__ */ s(
|
|
151
151
|
le,
|
|
@@ -157,12 +157,12 @@ const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_cu
|
|
|
157
157
|
children: /* @__PURE__ */ s(
|
|
158
158
|
q,
|
|
159
159
|
{
|
|
160
|
-
headers:
|
|
160
|
+
headers: E,
|
|
161
161
|
ariaLabel: t("FORMS_HEADING"),
|
|
162
162
|
rows: i,
|
|
163
163
|
loading: !1,
|
|
164
164
|
errorStateMessage: "",
|
|
165
|
-
sortable:
|
|
165
|
+
sortable: Y,
|
|
166
166
|
emptyStateMessage: t("FORMS_UNAVAILABLE"),
|
|
167
167
|
renderCell: C,
|
|
168
168
|
className: A.formsTableBody,
|
|
@@ -179,7 +179,7 @@ const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_cu
|
|
|
179
179
|
id: "modalIdForActionAreaLayout",
|
|
180
180
|
portalId: "main-display-area",
|
|
181
181
|
open: l,
|
|
182
|
-
onRequestClose:
|
|
182
|
+
onRequestClose: Z,
|
|
183
183
|
modalHeading: o.formName,
|
|
184
184
|
modalLabel: `${o.recordedOn} | ${o.recordedBy}`,
|
|
185
185
|
passiveModal: !0,
|
|
@@ -189,12 +189,12 @@ const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_cu
|
|
|
189
189
|
fe,
|
|
190
190
|
{
|
|
191
191
|
observations: Q,
|
|
192
|
-
isLoading:
|
|
193
|
-
isError:
|
|
194
|
-
errorMessage:
|
|
192
|
+
isLoading: x || z,
|
|
193
|
+
isError: V || G,
|
|
194
|
+
errorMessage: P,
|
|
195
195
|
emptyStateMessage: t("NO_FORM_DATA_AVAILABLE"),
|
|
196
196
|
testIdPrefix: o.formName,
|
|
197
|
-
hideThumbnail:
|
|
197
|
+
hideThumbnail: $
|
|
198
198
|
}
|
|
199
199
|
)
|
|
200
200
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c, T as l, P as m, a as i, D as u, Q as v } from "./YPM2AS64-
|
|
2
|
-
import { ah as d, ai as f, aj as e } from "./index-
|
|
1
|
+
import { c, T as l, P as m, a as i, D as u, Q as v } from "./YPM2AS64-BYVUVZZ1.js";
|
|
2
|
+
import { ah as d, ai as f, aj as e } from "./index-CKmNESyE.js";
|
|
3
3
|
var h = (a) => {
|
|
4
4
|
const [r, t] = c({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as s, T as c, P as i, a as u, b as m, C as P, Q as d } from "./YPM2AS64-
|
|
2
|
-
import { ah as h, ai as v, aj as e } from "./index-
|
|
1
|
+
import { c as s, T as c, P as i, a as u, b as m, C as P, Q as d } from "./YPM2AS64-BYVUVZZ1.js";
|
|
2
|
+
import { ah as h, ai as v, aj as e } from "./index-CKmNESyE.js";
|
|
3
3
|
var C = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as I, jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import { u as B, h as V, a as S,
|
|
2
|
+
import { u as B, h as V, a as S, b as w, R as j, e as k, W as z, d as Q, K as x, z as G, c as M, j as P, f as H, U as W, g as J, i as Y, H as X, l as Z, N as ee } from "./index-CKmNESyE.js";
|
|
3
3
|
import { useQueries as ae, useQuery as te } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as se, useEffect as
|
|
5
|
-
const
|
|
4
|
+
import { useRef as se, useEffect as $, useMemo as E } from "react";
|
|
5
|
+
const D = (a, n, d, l, b, r) => {
|
|
6
6
|
const t = W(a, n, b), s = t.value, o = J(s);
|
|
7
7
|
let i = s;
|
|
8
8
|
o === "Image" && (i = /* @__PURE__ */ u(
|
|
@@ -23,7 +23,7 @@ const H = (a, n, d, l, b, r) => {
|
|
|
23
23
|
)), o === "PDF" && (i = /* @__PURE__ */ u(ee, { id: `${s}-pdf`, src: s }));
|
|
24
24
|
const m = b("OBSERVATIONS_RECORDED_BY", {
|
|
25
25
|
provider: t.provider
|
|
26
|
-
}), p = a.display,
|
|
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
|
Y,
|
|
29
29
|
{
|
|
@@ -37,13 +37,13 @@ const H = (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
|
+
H,
|
|
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, o) =>
|
|
46
|
+
(s, o) => D(
|
|
47
47
|
s,
|
|
48
48
|
o,
|
|
49
49
|
b,
|
|
@@ -62,14 +62,14 @@ const H = (a, n, d, l, b, r) => {
|
|
|
62
62
|
const { t: l } = S(), b = (r, t, s) => {
|
|
63
63
|
const o = P(r.encounterDetails, l);
|
|
64
64
|
return /* @__PURE__ */ I(
|
|
65
|
-
|
|
65
|
+
H,
|
|
66
66
|
{
|
|
67
67
|
title: o,
|
|
68
68
|
id: `encounter-${r.encounterId}`,
|
|
69
69
|
open: t,
|
|
70
70
|
children: [
|
|
71
71
|
r.observations.map(
|
|
72
|
-
(i, m) =>
|
|
72
|
+
(i, m) => D(
|
|
73
73
|
i,
|
|
74
74
|
m,
|
|
75
75
|
s,
|
|
@@ -120,7 +120,7 @@ const H = (a, n, d, l, b, r) => {
|
|
|
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
126
|
const q = d[h];
|
|
@@ -132,15 +132,15 @@ const H = (a, n, d, l, b, r) => {
|
|
|
132
132
|
} else e.isError || r.current.delete(h);
|
|
133
133
|
});
|
|
134
134
|
}, [i, d]);
|
|
135
|
-
const m =
|
|
135
|
+
const m = E(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), p = E(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), y = E(() => d.length === 0 ? !0 : i.every((e) => !e.isLoading), [i, d.length]), {
|
|
136
136
|
data: c,
|
|
137
|
-
isLoading:
|
|
137
|
+
isLoading: L,
|
|
138
138
|
isError: T,
|
|
139
139
|
refetch: g
|
|
140
140
|
} = te({
|
|
141
141
|
queryKey: le(t, p),
|
|
142
|
-
queryFn: () =>
|
|
143
|
-
enabled: !!t && p.length > 0 &&
|
|
142
|
+
queryFn: () => j(t, p),
|
|
143
|
+
enabled: !!t && p.length > 0 && y
|
|
144
144
|
});
|
|
145
145
|
k(
|
|
146
146
|
(e) => {
|
|
@@ -149,54 +149,54 @@ const H = (a, n, d, l, b, r) => {
|
|
|
149
149
|
) && g();
|
|
150
150
|
},
|
|
151
151
|
[t, g]
|
|
152
|
-
),
|
|
152
|
+
), $(() => {
|
|
153
153
|
T && s({
|
|
154
154
|
title: o("ERROR_DEFAULT_TITLE"),
|
|
155
155
|
message: o("ERROR_FETCHING_OBSERVATIONS"),
|
|
156
156
|
type: "error"
|
|
157
157
|
});
|
|
158
158
|
}, [T]);
|
|
159
|
-
const O =
|
|
159
|
+
const O = E(() => {
|
|
160
160
|
if (!c) return [];
|
|
161
161
|
const e = z(c), h = Q(e);
|
|
162
162
|
return x(h);
|
|
163
|
-
}, [c]),
|
|
163
|
+
}, [c]), F = [
|
|
164
164
|
{ key: "name", header: "name" },
|
|
165
165
|
{ key: "value", header: "value" },
|
|
166
166
|
{ key: "form", header: "form" }
|
|
167
|
-
],
|
|
167
|
+
], f = L || !y, _ = T && y, U = (!c || c.entry?.length === 0 || p.length === 0) && y, A = _ ? o("ERROR_FETCHING_OBSERVATIONS") : null, K = U ? o("NO_OBSERVATIONS_FOUND") : void 0, C = O.length > 0 && !f && !_, R = n.titleTranslationKey, v = R ? o(R) : "";
|
|
168
168
|
return /* @__PURE__ */ I(
|
|
169
169
|
"div",
|
|
170
170
|
{
|
|
171
171
|
id: "observations",
|
|
172
|
-
"data-testid":
|
|
172
|
+
"data-testid": R ? `observations-${v}` : "observations",
|
|
173
173
|
"aria-label": "observations-aria-label",
|
|
174
174
|
className: N.observations,
|
|
175
175
|
children: [
|
|
176
176
|
/* @__PURE__ */ u(
|
|
177
|
-
|
|
177
|
+
G,
|
|
178
178
|
{
|
|
179
179
|
id: "observations-title",
|
|
180
|
-
testId:
|
|
181
|
-
title:
|
|
180
|
+
testId: R ? `observations-title-${v}` : "observations-title",
|
|
181
|
+
title: v,
|
|
182
182
|
className: N.title,
|
|
183
|
-
children: /* @__PURE__ */ u("p", { children:
|
|
183
|
+
children: /* @__PURE__ */ u("p", { children: v })
|
|
184
184
|
}
|
|
185
185
|
),
|
|
186
186
|
C ? /* @__PURE__ */ u(
|
|
187
187
|
oe,
|
|
188
188
|
{
|
|
189
189
|
groupedData: O,
|
|
190
|
-
title:
|
|
190
|
+
title: v,
|
|
191
191
|
hideThumbnail: b
|
|
192
192
|
}
|
|
193
193
|
) : /* @__PURE__ */ u(
|
|
194
|
-
|
|
194
|
+
M,
|
|
195
195
|
{
|
|
196
|
-
headers:
|
|
196
|
+
headers: F,
|
|
197
197
|
rows: [],
|
|
198
198
|
ariaLabel: o("OBSERVATIONS"),
|
|
199
|
-
loading:
|
|
199
|
+
loading: f,
|
|
200
200
|
errorStateMessage: A,
|
|
201
201
|
emptyStateMessage: K,
|
|
202
202
|
dataTestId: "observations-table"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ak as we, al as z, am as xt, an as B, ai as q, aj as y, ao as Ro, ap as ye, aq as R, ar as _, as as k, at as N, au as A, av as bs, aw as ir, ax as $e, ay as U, az as Hn, aA as Vn, aB as dt, aC as D, aD as xs, aE as cn, aF as Be, aG as ws, aH as qt, aI as zt, aJ as $s, aK as Cs, aL as $n, aM as Ss, aN as Nr, aO as Bt, aP as zo, aQ as ks, aR as Es, aS as j, aT as Ur, aU as Ms, aV as Ds, aW as sr, aX as As, aY as Ts, aZ as zn, a_ as Fs, a$ as Is, b0 as Z, b1 as Ps, b2 as Ls } from "./index-
|
|
1
|
+
import { ak as we, al as z, am as xt, an as B, ai as q, aj as y, ao as Ro, ap as ye, aq as R, ar as _, as as k, at as N, au as A, av as bs, aw as ir, ax as $e, ay as U, az as Hn, aA as Vn, aB as dt, aC as D, aD as xs, aE as cn, aF as Be, aG as ws, aH as qt, aI as zt, aJ as $s, aK as Cs, aL as $n, aM as Ss, aN as Nr, aO as Bt, aP as zo, aQ as ks, aR as Es, aS as j, aT as Ur, aU as Ms, aV as Ds, aW as sr, aX as As, aY as Ts, aZ as zn, a_ as Fs, a$ as Is, b0 as Z, b1 as Ps, b2 as Ls } from "./index-CKmNESyE.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|
|
@@ -169749,8 +169749,18 @@ Ry.propTypes = Dy.propTypes;
|
|
|
169749
169749
|
const mr = () => {
|
|
169750
169750
|
const t = fKe();
|
|
169751
169751
|
return !t.patientUuid || t.patientUuid === "" ? null : t.patientUuid;
|
|
169752
|
-
}, KUe = S2(void 0),
|
|
169752
|
+
}, KUe = S2(void 0), Sy = () => {
|
|
169753
169753
|
const t = se(KUe);
|
|
169754
|
+
if (!t)
|
|
169755
|
+
throw new Error(
|
|
169756
|
+
"useUserPrivilege must be used within a UserPrivilegeProvider"
|
|
169757
|
+
);
|
|
169758
|
+
return t;
|
|
169759
|
+
}, ky = (t) => {
|
|
169760
|
+
const { userPrivileges: e } = Sy();
|
|
169761
|
+
return Ey(e, t);
|
|
169762
|
+
}, GUe = S2(void 0), Rr = () => {
|
|
169763
|
+
const t = se(GUe);
|
|
169754
169764
|
if (!t)
|
|
169755
169765
|
throw new Error(
|
|
169756
169766
|
"useNotification must be used within a NotificationProvider"
|
|
@@ -169763,7 +169773,7 @@ const mr = () => {
|
|
|
169763
169773
|
t(e);
|
|
169764
169774
|
});
|
|
169765
169775
|
}, [t]), null;
|
|
169766
|
-
},
|
|
169776
|
+
}, YUe = n.memo(({ children: t }) => {
|
|
169767
169777
|
const [e, r] = g1([]), o = W1(() => /* @__PURE__ */ new Map(), []), a = C1(
|
|
169768
169778
|
(i) => {
|
|
169769
169779
|
const s = IO0();
|
|
@@ -169793,7 +169803,7 @@ const mr = () => {
|
|
|
169793
169803
|
}), () => {
|
|
169794
169804
|
o.forEach((i) => clearTimeout(i)), o.clear();
|
|
169795
169805
|
}), [e, c, o]), /* @__PURE__ */ ne(
|
|
169796
|
-
|
|
169806
|
+
GUe.Provider,
|
|
169797
169807
|
{
|
|
169798
169808
|
value: {
|
|
169799
169809
|
notifications: e,
|
|
@@ -169814,18 +169824,8 @@ const mr = () => {
|
|
|
169814
169824
|
}
|
|
169815
169825
|
);
|
|
169816
169826
|
});
|
|
169817
|
-
|
|
169818
|
-
const
|
|
169819
|
-
const t = se(YUe);
|
|
169820
|
-
if (!t)
|
|
169821
|
-
throw new Error(
|
|
169822
|
-
"useUserPrivilege must be used within a UserPrivilegeProvider"
|
|
169823
|
-
);
|
|
169824
|
-
return t;
|
|
169825
|
-
}, ky = (t) => {
|
|
169826
|
-
const { userPrivileges: e } = Sy();
|
|
169827
|
-
return Ey(e, t);
|
|
169828
|
-
}, hG0 = "AllergiesTable-module_mildSeverity__NCNu-", pG0 = "AllergiesTable-module_moderateSeverity__lsUlB", fG0 = "AllergiesTable-module_severeSeverity__amsyH", mG0 = "AllergiesTable-module_allergyName__eTq4L", wG0 = "AllergiesTable-module_allergyCategory__8KWd5", gG0 = "AllergiesTable-module_activeStatus__Lvg78", vG0 = "AllergiesTable-module_inactiveStatus__7iadA", EG0 = "AllergiesTable-module_allergiesTableBody__Fqg2Z", MG0 = "AllergiesTable-module_allergiesTableWrapper__Jxpwd", An = {
|
|
169827
|
+
YUe.displayName = "NotificationProvider";
|
|
169828
|
+
const hG0 = "AllergiesTable-module_mildSeverity__NCNu-", pG0 = "AllergiesTable-module_moderateSeverity__lsUlB", fG0 = "AllergiesTable-module_severeSeverity__amsyH", mG0 = "AllergiesTable-module_allergyName__eTq4L", wG0 = "AllergiesTable-module_allergyCategory__8KWd5", gG0 = "AllergiesTable-module_activeStatus__Lvg78", vG0 = "AllergiesTable-module_inactiveStatus__7iadA", EG0 = "AllergiesTable-module_allergiesTableBody__Fqg2Z", MG0 = "AllergiesTable-module_allergiesTableWrapper__Jxpwd", An = {
|
|
169829
169829
|
mildSeverity: hG0,
|
|
169830
169830
|
moderateSeverity: pG0,
|
|
169831
169831
|
severeSeverity: fG0,
|
|
@@ -175495,7 +175495,7 @@ const f1t = async (t) => (await hUe(t, "completed")).map(h1t), aNe = ({
|
|
|
175495
175495
|
}),
|
|
175496
175496
|
[e, o, c]
|
|
175497
175497
|
);
|
|
175498
|
-
return /* @__PURE__ */ d1(
|
|
175498
|
+
return /* @__PURE__ */ d1(KUe.Provider, { value: i, children: t });
|
|
175499
175499
|
};
|
|
175500
175500
|
xWe.displayName = "UserPrivilegeProvider";
|
|
175501
175501
|
S2(void 0);
|
|
@@ -175576,7 +175576,7 @@ function Itt(t, e, r) {
|
|
|
175576
175576
|
return o;
|
|
175577
175577
|
};
|
|
175578
175578
|
}
|
|
175579
|
-
b0(() => Promise.resolve().then(() => CG0)), b0(() => Promise.resolve().then(() => rY0)), b0(() => Promise.resolve().then(() => TY0)), b0(() => Promise.resolve().then(() => BY0)), b0(() => import("./DocumentsTable-
|
|
175579
|
+
b0(() => Promise.resolve().then(() => CG0)), b0(() => Promise.resolve().then(() => rY0)), b0(() => Promise.resolve().then(() => TY0)), b0(() => Promise.resolve().then(() => BY0)), b0(() => import("./DocumentsTable-DXWkjdux-DPHdJIkQ.js")), b0(() => Promise.resolve().then(() => DX0)), b0(() => import("./FormsTable-DLJpQ6yJ-BsnUkeXd.js")), b0(() => Promise.resolve().then(() => wX0)), b0(() => import("./Observations-Dk1JBpvB-CLxEklVq.js")), b0(
|
|
175580
175580
|
() => Promise.resolve().then(() => qX0)
|
|
175581
175581
|
), b0(
|
|
175582
175582
|
() => Promise.resolve().then(() => kQ0)
|
|
@@ -177416,7 +177416,7 @@ var urt = (t, e = !1) => {
|
|
|
177416
177416
|
const e = PWe(() => {
|
|
177417
177417
|
const r = this, [o] = this.#n, [a] = this.#o, [c] = this.#a, [l] = this.#c, [i] = this.#p, [s] = this.#e;
|
|
177418
177418
|
let d;
|
|
177419
|
-
return this.#l ? d = this.#l : (d = BWe(() => import("./LNWAZHJI-
|
|
177419
|
+
return this.#l ? d = this.#l : (d = BWe(() => import("./LNWAZHJI-MQmeJpyh.js")), this.#l = d), lKe(this.#h, this.#r), kWe(d, ZWe({
|
|
177420
177420
|
get queryFlavor() {
|
|
177421
177421
|
return r.#d;
|
|
177422
177422
|
},
|
|
@@ -177514,7 +177514,7 @@ var urt = (t, e = !1) => {
|
|
|
177514
177514
|
const e = PWe(() => {
|
|
177515
177515
|
const r = this, [o] = this.#n, [a] = this.#o, [c] = this.#a, [l] = this.#c, [i] = this.#p, [s] = this.#e, [d] = this.#l;
|
|
177516
177516
|
let u;
|
|
177517
|
-
return this.#i ? u = this.#i : (u = BWe(() => import("./MWZ6AO7Z-
|
|
177517
|
+
return this.#i ? u = this.#i : (u = BWe(() => import("./MWZ6AO7Z-DFzfj7oi.js")), this.#i = u), lKe(this.#h, this.#r), kWe(u, ZWe({
|
|
177518
177518
|
get queryFlavor() {
|
|
177519
177519
|
return r.#d;
|
|
177520
177520
|
},
|
|
@@ -177674,11 +177674,11 @@ const Qet = {
|
|
|
177674
177674
|
}), u2t = b0(
|
|
177675
177675
|
() => import("./index-CFigb5vF.js").then((t) => ({ default: t.IndexPage }))
|
|
177676
177676
|
), h2t = b0(
|
|
177677
|
-
() => import("./index-
|
|
177677
|
+
() => import("./index-CWWn6JGL.js").then((t) => ({
|
|
177678
177678
|
default: t.default
|
|
177679
177679
|
}))
|
|
177680
177680
|
), p2t = b0(
|
|
177681
|
-
() => import("./index-
|
|
177681
|
+
() => import("./index-tUeb3uQs.js").then((t) => ({
|
|
177682
177682
|
default: t.default
|
|
177683
177683
|
}))
|
|
177684
177684
|
), f2t = [
|
|
@@ -177711,7 +177711,7 @@ function wrt() {
|
|
|
177711
177711
|
console.error("Failed to initialize app:", o), e(!0);
|
|
177712
177712
|
}
|
|
177713
177713
|
})();
|
|
177714
|
-
}, []), t ? /* @__PURE__ */ d1(FAe, { children: /* @__PURE__ */ d1(pKe, { client: w2t, children: /* @__PURE__ */ d1(
|
|
177714
|
+
}, []), t ? /* @__PURE__ */ d1(FAe, { children: /* @__PURE__ */ d1(pKe, { client: w2t, children: /* @__PURE__ */ d1(YUe, { children: /* @__PURE__ */ ne(xWe, { children: [
|
|
177715
177715
|
/* @__PURE__ */ d1(uG0, {}),
|
|
177716
177716
|
/* @__PURE__ */ ne(d2t, { children: [
|
|
177717
177717
|
/* @__PURE__ */ d1(dKe, { fallback: /* @__PURE__ */ d1(wm1, {}), children: /* @__PURE__ */ d1(wKe, { children: m2t(f2t) }) }),
|
|
@@ -177720,33 +177720,33 @@ function wrt() {
|
|
|
177720
177720
|
] }) }) }) }) : /* @__PURE__ */ d1(wm1, {});
|
|
177721
177721
|
}
|
|
177722
177722
|
export {
|
|
177723
|
-
|
|
177723
|
+
_tt as $,
|
|
177724
177724
|
r2t as A,
|
|
177725
|
-
|
|
177726
|
-
|
|
177727
|
-
|
|
177725
|
+
L2t as B,
|
|
177726
|
+
IY2 as C,
|
|
177727
|
+
Ctt as D,
|
|
177728
177728
|
x2t as E,
|
|
177729
|
-
|
|
177730
|
-
|
|
177729
|
+
I52 as F,
|
|
177730
|
+
Q0t as G,
|
|
177731
177731
|
Y_0 as H,
|
|
177732
|
-
|
|
177733
|
-
|
|
177734
|
-
|
|
177732
|
+
Ttt as I,
|
|
177733
|
+
rtt as J,
|
|
177734
|
+
Btt as K,
|
|
177735
177735
|
zi as L,
|
|
177736
|
-
|
|
177736
|
+
ott as M,
|
|
177737
177737
|
e$0 as N,
|
|
177738
177738
|
Vi as O,
|
|
177739
|
-
|
|
177740
|
-
|
|
177741
|
-
|
|
177742
|
-
|
|
177743
|
-
|
|
177744
|
-
|
|
177739
|
+
C20 as P,
|
|
177740
|
+
ttt as Q,
|
|
177741
|
+
Att as R,
|
|
177742
|
+
$tt as S,
|
|
177743
|
+
p0t as T,
|
|
177744
|
+
Stt as U,
|
|
177745
177745
|
w0t as V,
|
|
177746
|
-
|
|
177746
|
+
ktt as W,
|
|
177747
177747
|
m0t as X,
|
|
177748
177748
|
ctt as Y,
|
|
177749
|
-
|
|
177749
|
+
Ott as Z,
|
|
177750
177750
|
Ht as _,
|
|
177751
177751
|
o0 as a,
|
|
177752
177752
|
Js as a$,
|
|
@@ -177813,33 +177813,33 @@ export {
|
|
|
177813
177813
|
Wtt as ax,
|
|
177814
177814
|
Ol as ay,
|
|
177815
177815
|
hrt as az,
|
|
177816
|
-
|
|
177816
|
+
Ltt as b,
|
|
177817
177817
|
Z1t as b0,
|
|
177818
177818
|
ort as b1,
|
|
177819
177819
|
x1t as b2,
|
|
177820
177820
|
wrt as b3,
|
|
177821
177821
|
V0 as c,
|
|
177822
|
-
|
|
177822
|
+
Ztt as d,
|
|
177823
177823
|
gn as e,
|
|
177824
|
-
|
|
177825
|
-
|
|
177824
|
+
dtt as f,
|
|
177825
|
+
jO0 as g,
|
|
177826
177826
|
Rr as h,
|
|
177827
|
-
|
|
177828
|
-
|
|
177829
|
-
|
|
177830
|
-
|
|
177827
|
+
M_0 as i,
|
|
177828
|
+
Rtt as j,
|
|
177829
|
+
Dtt as k,
|
|
177830
|
+
i$0 as l,
|
|
177831
177831
|
b2 as m,
|
|
177832
177832
|
Zt as n,
|
|
177833
|
-
|
|
177834
|
-
|
|
177833
|
+
Itt as o,
|
|
177834
|
+
Sv as p,
|
|
177835
177835
|
pWe as q,
|
|
177836
|
-
|
|
177837
|
-
|
|
177838
|
-
|
|
177836
|
+
Sy as r,
|
|
177837
|
+
ltt as s,
|
|
177838
|
+
J0t as t,
|
|
177839
177839
|
mr as u,
|
|
177840
177840
|
ud as v,
|
|
177841
177841
|
v8 as w,
|
|
177842
|
-
|
|
177843
|
-
|
|
177842
|
+
n0t as x,
|
|
177843
|
+
R2t as y,
|
|
177844
177844
|
W7 as z
|
|
177845
177845
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as n, jsxs as f } from "react/jsx-runtime";
|
|
2
|
+
import { o as V, A as h, a as C, p as O, T as P, h as B, r as G, s as L, t as x, x as U, y as q, B as F, C as w, E as k, F as K, G as $ } from "./index-CKmNESyE.js";
|
|
3
3
|
import { useState as I, useMemo as _ } from "react";
|
|
4
|
-
import { useQueryClient as
|
|
4
|
+
import { useQueryClient as j, useQuery as H } from "@tanstack/react-query";
|
|
5
5
|
const Q = V(
|
|
6
6
|
h,
|
|
7
7
|
"useAppointmentsConfig",
|
|
@@ -36,9 +36,9 @@ const Q = V(
|
|
|
36
36
|
"speciality",
|
|
37
37
|
"durationMins",
|
|
38
38
|
"description"
|
|
39
|
-
],
|
|
40
|
-
page:
|
|
41
|
-
noPrivilegeContainer:
|
|
39
|
+
], Y = "app:appointments:manageServices", Z = "app:appointments:adminTab", z = "index-module_page__Gsfbu", J = "index-module_noPrivilegeContainer__Pu5WZ", X = "index-module_table__GAPmb", d = {
|
|
40
|
+
page: z,
|
|
41
|
+
noPrivilegeContainer: J,
|
|
42
42
|
table: X
|
|
43
43
|
};
|
|
44
44
|
function ee(e) {
|
|
@@ -75,17 +75,17 @@ function ae(e, a) {
|
|
|
75
75
|
}));
|
|
76
76
|
}
|
|
77
77
|
const le = () => {
|
|
78
|
-
const { t: e } = C(), a =
|
|
78
|
+
const { t: e } = C(), a = j(), { addNotification: t } = B(), { userPrivileges: s } = G(), { appointmentsConfig: i } = Q(), [E, c] = I(null), [M, u] = I(!1), l = i?.serviceTableFields ?? [
|
|
79
79
|
...p
|
|
80
|
-
], m = L(s,
|
|
80
|
+
], m = L(s, Z), b = L(
|
|
81
81
|
s,
|
|
82
|
-
|
|
82
|
+
Y
|
|
83
83
|
), S = _(
|
|
84
84
|
() => ee(l),
|
|
85
85
|
[l]
|
|
86
|
-
), { data: A, isLoading: v, isError: D } =
|
|
86
|
+
), { data: A, isLoading: v, isError: D } = H({
|
|
87
87
|
queryKey: ["allAppointmentServices"],
|
|
88
|
-
queryFn:
|
|
88
|
+
queryFn: x,
|
|
89
89
|
enabled: m
|
|
90
90
|
}), R = _(
|
|
91
91
|
() => te(l, e),
|
|
@@ -112,7 +112,7 @@ const le = () => {
|
|
|
112
112
|
u(!1);
|
|
113
113
|
}
|
|
114
114
|
}, T = (r, o) => o === "actions" ? /* @__PURE__ */ n(
|
|
115
|
-
|
|
115
|
+
k,
|
|
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 le = () => {
|
|
|
121
121
|
label: e("ADMIN_ALL_SERVICES_DELETE_ICON_LABEL"),
|
|
122
122
|
disabled: !b,
|
|
123
123
|
onClick: () => c(r),
|
|
124
|
-
children: /* @__PURE__ */ n(
|
|
124
|
+
children: /* @__PURE__ */ n(K, {})
|
|
125
125
|
}
|
|
126
|
-
) : p.includes(o) ? r[o] ?? "-" : r.attributes[o] ?? "-",
|
|
126
|
+
) : p.includes(o) ? r[o] ?? "-" : r.attributes[o] ?? "-", y = [
|
|
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__ */ n(
|
|
131
131
|
q,
|
|
132
132
|
{
|
|
133
|
-
header: /* @__PURE__ */ n(
|
|
134
|
-
main: m ? /* @__PURE__ */
|
|
133
|
+
header: /* @__PURE__ */ n(w, { breadcrumbItems: y }),
|
|
134
|
+
main: m ? /* @__PURE__ */ f(
|
|
135
135
|
"div",
|
|
136
136
|
{
|
|
137
137
|
id: "all-appointment-service-page",
|
|
@@ -140,7 +140,7 @@ const le = () => {
|
|
|
140
140
|
className: d.page,
|
|
141
141
|
children: [
|
|
142
142
|
/* @__PURE__ */ n(
|
|
143
|
-
|
|
143
|
+
F,
|
|
144
144
|
{
|
|
145
145
|
id: "all-services",
|
|
146
146
|
title: e("ADMIN_ALL_SERVICES_TITLE"),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as r, jsxs as b } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { J as f, M as P, P as O, Q as V, V as Z, X as ee, Y as te, a0 as ie, t as ae, a1 as ne, a 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 w, r as oe, h as de, s as $, ad as ce, x as me, ae as Ae, af as Ie, ag as ue, B as _e, C as Te } from "./index-CKmNESyE.js";
|
|
3
3
|
import { useState as g, useMemo as N, useEffect as h, useRef as Le, useCallback as U } from "react";
|
|
4
4
|
import { useQuery as M, useQueryClient as ve } from "@tanstack/react-query";
|
|
5
5
|
const Ne = "Available for appointments", q = "Get Appointment Unavailability", pe = "Add Appointment Unavailability", G = "Appointment Location", be = () => {
|
|
@@ -8,13 +8,13 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
8
8
|
} catch {
|
|
9
9
|
return "";
|
|
10
10
|
}
|
|
11
|
-
},
|
|
11
|
+
}, K = (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 = 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,7 +62,7 @@ const Ne = "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
|
-
}),
|
|
65
|
+
}), H = (e) => e.filter((a) => !a.isSelectAll).map((a) => a.id), fe = (e, a) => {
|
|
66
66
|
const n = Ee(
|
|
67
67
|
{
|
|
68
68
|
locationUuid: e.locationUuid,
|
|
@@ -74,7 +74,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
74
74
|
endTimePeriod: e.endTimePeriod
|
|
75
75
|
},
|
|
76
76
|
a
|
|
77
|
-
), t =
|
|
77
|
+
), t = H(e.selectedServiceItems), o = H(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,
|
|
@@ -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
|
-
}, Se = "UnavailabilityForm-module_formContent__WmNHR",
|
|
140
|
+
}, Se = "UnavailabilityForm-module_formContent__WmNHR", Be = "UnavailabilityForm-module_formField__8he7o", Pe = "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: Se,
|
|
142
|
-
formField:
|
|
143
|
-
loading:
|
|
142
|
+
formField: Be,
|
|
143
|
+
loading: Pe,
|
|
144
144
|
error: Oe,
|
|
145
145
|
grid: Ve,
|
|
146
146
|
column: Fe,
|
|
@@ -173,7 +173,7 @@ const Ne = "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, De, {
|
|
177
177
|
loading: "",
|
|
178
178
|
error: "",
|
|
179
179
|
empty: t("ADMIN_UNAVAILABILITY_FORM_NO_LOCATIONS")
|
|
@@ -183,11 +183,11 @@ 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
|
),
|
|
190
|
-
|
|
190
|
+
K,
|
|
191
191
|
{
|
|
192
192
|
loading: "",
|
|
193
193
|
error: "",
|
|
@@ -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,
|
|
@@ -203,7 +203,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
203
203
|
I,
|
|
204
204
|
t("ADMIN_UNAVAILABILITY_FORM_ALL_PROVIDERS")
|
|
205
205
|
),
|
|
206
|
-
|
|
206
|
+
K,
|
|
207
207
|
{
|
|
208
208
|
loading: "",
|
|
209
209
|
error: "",
|
|
@@ -215,10 +215,10 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
215
215
|
return h(() => {
|
|
216
216
|
if (o.length === 0) return;
|
|
217
217
|
const i = be(), p = o.some(
|
|
218
|
-
(
|
|
218
|
+
(y) => y.uuid === i
|
|
219
219
|
);
|
|
220
|
-
s((
|
|
221
|
-
...
|
|
220
|
+
s((y) => ({
|
|
221
|
+
...y,
|
|
222
222
|
locationUuid: p ? i : ""
|
|
223
223
|
}));
|
|
224
224
|
}, [o]), h(() => {
|
|
@@ -229,9 +229,9 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
229
229
|
}, [v]), h(() => {
|
|
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
|
|
@@ -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({
|
|
@@ -510,7 +510,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
510
510
|
), I = $(n, [
|
|
511
511
|
pe,
|
|
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: _
|
|
@@ -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]), S = 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 S(fe(m.current, e));
|
|
567
|
-
}, [e, S]),
|
|
567
|
+
}, [e, S]), W = U(
|
|
568
568
|
(T) => {
|
|
569
|
-
s((
|
|
570
|
-
const
|
|
571
|
-
return T.forEach((z) => delete
|
|
569
|
+
s((J) => {
|
|
570
|
+
const B = { ...J };
|
|
571
|
+
return T.forEach((z) => delete B[z]), B;
|
|
572
572
|
});
|
|
573
573
|
},
|
|
574
574
|
[]
|
|
575
|
-
),
|
|
575
|
+
), X = U(() => {
|
|
576
576
|
c(!1), m.current = null, s({});
|
|
577
577
|
}, []);
|
|
578
578
|
return /* @__PURE__ */ r(
|
|
@@ -595,10 +595,10 @@ const Ne = "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: p,
|
|
598
|
-
rows:
|
|
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: X,
|
|
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: W
|
|
630
630
|
}
|
|
631
631
|
)
|
|
632
632
|
}
|
package/dist/index.js
CHANGED