@bahmni/appointments-app 0.0.1-dev.356 → 0.0.1-dev.357
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-igkOp6aa-CrQO-DE5.js → DocumentsTable-DZnCF3U4-DBH8rn_k.js} +6 -6
- package/dist/{FormsTable-DgBISlV7-BYoIelgq.js → FormsTable-BYg45PXE-CucdzIBr.js} +56 -56
- package/dist/{LNWAZHJI-ChtUeqp_.js → LNWAZHJI-B2EFalNC.js} +2 -2
- package/dist/{MWZ6AO7Z-D_c5f3Zu.js → MWZ6AO7Z-C9aQmtgC.js} +2 -2
- package/dist/{Observations-CC3lzylE-C274PFEo.js → Observations-BG4bqMBN-THn6wLBj.js} +32 -32
- package/dist/{YPM2AS64-Bp3pJk3W.js → YPM2AS64-CEWIAV9K.js} +1 -1
- package/dist/{index-BLQQArrV.js → index-BUlGp_VU.js} +6 -6
- package/dist/{index-BHf3TQ_s.js → index-CTQF7H5n.js} +37 -37
- package/dist/{index-DdhEqnDR.js → index-Xes8d4CI.js} +14 -14
- 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,
|
|
2
|
+
import { m as x, u as W, a as Y, b as J, t as X, g as Z, e as ee, d as te } from "./index-CTQF7H5n.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 = {
|
|
@@ -38,9 +38,9 @@ const Te = [
|
|
|
38
38
|
null
|
|
39
39
|
), [$, O] = l(
|
|
40
40
|
/* @__PURE__ */ new Set()
|
|
41
|
-
), E = x(), { t: n } = W(), { addNotification: L } = Y(), k = Number(a?.pageSize) || 5, [f, C] = l(1), [u,
|
|
41
|
+
), E = x(), { t: n } = W(), { addNotification: L } = Y(), k = Number(a?.pageSize) || 5, [f, C] = l(1), [u, V] = l(k), [F, A] = l(void 0), M = _((e) => {
|
|
42
42
|
U(e), w(!0);
|
|
43
|
-
}, []),
|
|
43
|
+
}, []), H = _(() => {
|
|
44
44
|
w(!1), U(null), O(/* @__PURE__ */ new Set());
|
|
45
45
|
}, []), v = _((e) => {
|
|
46
46
|
O((t) => new Set(t).add(e));
|
|
@@ -91,7 +91,7 @@ const Te = [
|
|
|
91
91
|
}, [s, o]);
|
|
92
92
|
const j = _(
|
|
93
93
|
(e, t) => {
|
|
94
|
-
t !== u ? (
|
|
94
|
+
t !== u ? (V(t), C(1), A(void 0)) : C(e);
|
|
95
95
|
},
|
|
96
96
|
[u]
|
|
97
97
|
), N = p(
|
|
@@ -152,7 +152,7 @@ const Te = [
|
|
|
152
152
|
className: d.documentsTableBody,
|
|
153
153
|
dataTestId: "documents-table",
|
|
154
154
|
pageSize: u,
|
|
155
|
-
totalItems:
|
|
155
|
+
totalItems: F,
|
|
156
156
|
page: f,
|
|
157
157
|
onPageChange: j
|
|
158
158
|
}
|
|
@@ -163,7 +163,7 @@ const Te = [
|
|
|
163
163
|
id: "modalIdForActionAreaLayout",
|
|
164
164
|
portalId: "main-display-area",
|
|
165
165
|
open: s,
|
|
166
|
-
onRequestClose:
|
|
166
|
+
onRequestClose: H,
|
|
167
167
|
modalHeading: o.documentIdentifier,
|
|
168
168
|
passiveModal: !0,
|
|
169
169
|
size: "lg",
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { jsx as i, jsxs as
|
|
2
|
-
import { u as ge, m as pe, w as Ne, x as Oe, h as be,
|
|
1
|
+
import { jsx as i, jsxs as $, Fragment as ye } from "react/jsx-runtime";
|
|
2
|
+
import { u as ge, m as pe, w as Ne, x as Oe, h as be, M as Te, X as Ie, H as Ee, k as _e, c as Ae, _ as ve, z as Fe, o as x, g as Se, f as K, i as P, t as Me, e as Q, j as Ce, l as Re, d as Be, W as Le, n as Ue } from "./index-CTQF7H5n.js";
|
|
3
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 ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_modalHeading__wnTmA",
|
|
5
|
+
const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_modalHeading__wnTmA", He = "FormsTable-module_customAccordianItem__isszs", T = {
|
|
6
6
|
formsTableBody: ke,
|
|
7
7
|
modalHeading: we,
|
|
8
|
-
customAccordianItem:
|
|
9
|
-
},
|
|
10
|
-
episodeOfCareUuids:
|
|
8
|
+
customAccordianItem: He
|
|
9
|
+
}, qe = "startConsultation", $e = ({
|
|
10
|
+
episodeOfCareUuids: M,
|
|
11
11
|
encounterUuids: c,
|
|
12
12
|
config: W,
|
|
13
13
|
disableActions: Y = !1,
|
|
14
|
-
activeEncounterUuid:
|
|
14
|
+
activeEncounterUuid: y = null
|
|
15
15
|
}) => {
|
|
16
|
-
const { t: n } = ge(), u = pe(), [g,
|
|
16
|
+
const { t: n } = ge(), u = pe(), [g, C] = X(!1), [s, R] = X(null), {
|
|
17
17
|
numberOfVisits: Z,
|
|
18
18
|
hideThumbnail: J = !1,
|
|
19
19
|
forms: p
|
|
20
20
|
} = W ?? {}, ee = Ne(
|
|
21
21
|
Ue.EDIT_OBSERVATIONS
|
|
22
|
-
), { userPrivileges: N } = Oe(),
|
|
23
|
-
|
|
22
|
+
), { userPrivileges: N } = Oe(), I = ee && !Y && !!y, B = be(
|
|
23
|
+
M,
|
|
24
24
|
c
|
|
25
25
|
), re = De(), {
|
|
26
|
-
data:
|
|
26
|
+
data: L = [],
|
|
27
27
|
isLoading: U,
|
|
28
28
|
isError: D,
|
|
29
29
|
error: oe,
|
|
30
30
|
refetch: ae
|
|
31
31
|
} = b({
|
|
32
|
-
queryKey: ["forms", u,
|
|
33
|
-
queryFn: () =>
|
|
34
|
-
enabled: !!u && !
|
|
32
|
+
queryKey: ["forms", u, M],
|
|
33
|
+
queryFn: () => Te(u, void 0, Z),
|
|
34
|
+
enabled: !!u && !B
|
|
35
35
|
}), k = d(() => {
|
|
36
|
-
let e =
|
|
36
|
+
let e = L;
|
|
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
|
+
}, [L, c, p]), { data: O = [] } = b({
|
|
43
43
|
queryKey: ["observationForms"],
|
|
44
|
-
queryFn: () =>
|
|
44
|
+
queryFn: () => Ie()
|
|
45
45
|
}), w = l(
|
|
46
46
|
(e) => {
|
|
47
47
|
const r = O.find((a) => a.name === e);
|
|
@@ -54,15 +54,15 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
54
54
|
},
|
|
55
55
|
[O, N]
|
|
56
56
|
), f = l(
|
|
57
|
-
(e) => !
|
|
58
|
-
[
|
|
59
|
-
),
|
|
57
|
+
(e) => !y || e.encounterUuid !== y ? !1 : w(e.formName),
|
|
58
|
+
[y, w]
|
|
59
|
+
), H = l(
|
|
60
60
|
(e) => O.find((r) => r.name === e)?.uuid,
|
|
61
61
|
[O]
|
|
62
62
|
), E = d(() => {
|
|
63
63
|
if (s)
|
|
64
|
-
return
|
|
65
|
-
}, [s,
|
|
64
|
+
return H(s.formName);
|
|
65
|
+
}, [s, H]), {
|
|
66
66
|
data: m,
|
|
67
67
|
isLoading: te,
|
|
68
68
|
isError: se,
|
|
@@ -114,22 +114,22 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
114
114
|
), Object.keys(e).length > 0 ? e : void 0;
|
|
115
115
|
}, [m]), ce = d(() => {
|
|
116
116
|
if (_)
|
|
117
|
-
return
|
|
117
|
+
return x(_).message;
|
|
118
118
|
if (v)
|
|
119
|
-
return
|
|
120
|
-
}, [_, v]),
|
|
119
|
+
return x(v).message;
|
|
120
|
+
}, [_, v]), h = d(
|
|
121
121
|
() => [
|
|
122
122
|
{ key: "recordedOn", header: n("RECORDED_ON") },
|
|
123
123
|
{ key: "recordedBy", header: n("RECORDED_BY") }
|
|
124
124
|
],
|
|
125
125
|
[n]
|
|
126
|
-
),
|
|
127
|
-
() => [...
|
|
128
|
-
[
|
|
126
|
+
), q = d(
|
|
127
|
+
() => [...h, { key: "actions", header: n("ACTIONS") }],
|
|
128
|
+
[h, n]
|
|
129
129
|
), ue = l(
|
|
130
|
-
(e) =>
|
|
131
|
-
[
|
|
132
|
-
), fe =
|
|
130
|
+
(e) => I && e.some((r) => f(r)) ? q : h,
|
|
131
|
+
[I, f, q, h]
|
|
132
|
+
), fe = h, he = d(
|
|
133
133
|
() => [
|
|
134
134
|
{ key: "recordedOn", sortable: !0 },
|
|
135
135
|
{ key: "recordedBy", sortable: !0 }
|
|
@@ -160,13 +160,13 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
160
160
|
)
|
|
161
161
|
})
|
|
162
162
|
).sort((r, o) => r.formName.localeCompare(o.formName));
|
|
163
|
-
}, [k, n]),
|
|
164
|
-
|
|
165
|
-
}, []),
|
|
166
|
-
|
|
163
|
+
}, [k, n]), z = l((e) => {
|
|
164
|
+
R(e), C(!0);
|
|
165
|
+
}, []), j = l(() => {
|
|
166
|
+
C(!1), R(null);
|
|
167
167
|
}, []), F = l((e) => {
|
|
168
168
|
globalThis.dispatchEvent(
|
|
169
|
-
new CustomEvent(
|
|
169
|
+
new CustomEvent(qe, {
|
|
170
170
|
detail: {
|
|
171
171
|
editOnly: "observationForms",
|
|
172
172
|
editTitle: "EDIT_OBSERVATION_FORM_TITLE",
|
|
@@ -176,11 +176,11 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
176
176
|
}
|
|
177
177
|
})
|
|
178
178
|
);
|
|
179
|
-
}, []),
|
|
179
|
+
}, []), G = l(
|
|
180
180
|
(e, r) => {
|
|
181
181
|
switch (r) {
|
|
182
182
|
case "recordedOn":
|
|
183
|
-
return /* @__PURE__ */ i(
|
|
183
|
+
return /* @__PURE__ */ i(Me, { onClick: () => z(e), children: e.recordedOn });
|
|
184
184
|
case "recordedBy":
|
|
185
185
|
return e.recordedBy;
|
|
186
186
|
case "actions":
|
|
@@ -199,10 +199,10 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
199
199
|
return null;
|
|
200
200
|
}
|
|
201
201
|
},
|
|
202
|
-
[
|
|
202
|
+
[z, F, f, n]
|
|
203
203
|
);
|
|
204
|
-
return /* @__PURE__ */
|
|
205
|
-
/* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: U || D || V.length === 0 ||
|
|
204
|
+
return /* @__PURE__ */ $(ye, { children: [
|
|
205
|
+
/* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: U || D || V.length === 0 || B ? /* @__PURE__ */ i(
|
|
206
206
|
Q,
|
|
207
207
|
{
|
|
208
208
|
headers: fe,
|
|
@@ -211,17 +211,17 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
211
211
|
loading: U,
|
|
212
212
|
errorStateMessage: D ? oe?.message : void 0,
|
|
213
213
|
emptyStateMessage: n("FORMS_UNAVAILABLE"),
|
|
214
|
-
renderCell:
|
|
215
|
-
className:
|
|
214
|
+
renderCell: G,
|
|
215
|
+
className: T.formsTableBody,
|
|
216
216
|
dataTestId: "forms-table"
|
|
217
217
|
}
|
|
218
|
-
) : /* @__PURE__ */ i(
|
|
218
|
+
) : /* @__PURE__ */ i(Ce, { 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
|
+
Re,
|
|
222
222
|
{
|
|
223
223
|
title: o,
|
|
224
|
-
className:
|
|
224
|
+
className: T.customAccordianItem,
|
|
225
225
|
testId: `accordian-title-${o}`,
|
|
226
226
|
open: r === 0,
|
|
227
227
|
children: /* @__PURE__ */ i(
|
|
@@ -232,10 +232,10 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
232
232
|
rows: a,
|
|
233
233
|
loading: !1,
|
|
234
234
|
errorStateMessage: "",
|
|
235
|
-
sortable:
|
|
235
|
+
sortable: he,
|
|
236
236
|
emptyStateMessage: n("FORMS_UNAVAILABLE"),
|
|
237
|
-
renderCell:
|
|
238
|
-
className:
|
|
237
|
+
renderCell: G,
|
|
238
|
+
className: T.formsTableBody,
|
|
239
239
|
dataTestId: `forms-table-${o}`
|
|
240
240
|
}
|
|
241
241
|
)
|
|
@@ -244,15 +244,15 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
244
244
|
);
|
|
245
245
|
}) }) }),
|
|
246
246
|
g && s && /* @__PURE__ */ i(
|
|
247
|
-
|
|
247
|
+
Be,
|
|
248
248
|
{
|
|
249
249
|
id: "modalIdForActionAreaLayout",
|
|
250
250
|
portalId: "main-display-area",
|
|
251
251
|
open: g,
|
|
252
|
-
onRequestClose:
|
|
253
|
-
modalHeading: /* @__PURE__ */
|
|
252
|
+
onRequestClose: j,
|
|
253
|
+
modalHeading: /* @__PURE__ */ $("div", { className: T.modalHeading, children: [
|
|
254
254
|
/* @__PURE__ */ i("span", { children: s.formName }),
|
|
255
|
-
|
|
255
|
+
I && f(s) && /* @__PURE__ */ i(
|
|
256
256
|
K,
|
|
257
257
|
{
|
|
258
258
|
label: n("EDIT_OBSERVATION_FORM"),
|
|
@@ -260,7 +260,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
260
260
|
size: "sm",
|
|
261
261
|
testId: `edit-form-modal-${s.encounterUuid}`,
|
|
262
262
|
onClick: () => {
|
|
263
|
-
|
|
263
|
+
j(), F(s);
|
|
264
264
|
},
|
|
265
265
|
children: /* @__PURE__ */ i(P, {})
|
|
266
266
|
}
|
|
@@ -271,7 +271,7 @@ const ke = "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
|
+
Le,
|
|
275
275
|
{
|
|
276
276
|
observations: de,
|
|
277
277
|
isLoading: te || ne,
|
|
@@ -289,5 +289,5 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
289
289
|
] });
|
|
290
290
|
};
|
|
291
291
|
export {
|
|
292
|
-
|
|
292
|
+
$e as default
|
|
293
293
|
};
|
|
@@ -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-CEWIAV9K.js";
|
|
2
|
+
import { an as p, ao as d, ap as e } from "./index-CTQF7H5n.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-CEWIAV9K.js";
|
|
2
|
+
import { an as v, ao as C, ap as e } from "./index-CTQF7H5n.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as S, jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import { m as
|
|
2
|
+
import { m as q, a as K, u as N, y as Q, V as k, c as M, L as w, D as x, R as H, F as j, e as z, T as P, p as D, O as J, q as Y, r as W, s as X, v as Z, A as ee } from "./index-CTQF7H5n.js";
|
|
3
3
|
import { useQueries as ae, useQuery as te } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as se, useEffect as $, useMemo as
|
|
4
|
+
import { useRef as se, useEffect as $, useMemo as R } from "react";
|
|
5
5
|
const F = (a, n, d, l, b, r) => {
|
|
6
6
|
const t = J(a, n, b), s = t.value, o = Y(s);
|
|
7
7
|
let i = s;
|
|
@@ -23,7 +23,7 @@ const F = (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
|
W,
|
|
29
29
|
{
|
|
@@ -113,92 +113,92 @@ 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 } = K(), { 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 B = 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: B }),
|
|
130
130
|
type: "error"
|
|
131
131
|
}), r.current.add(h);
|
|
132
132
|
} else e.isError || r.current.delete(h);
|
|
133
133
|
});
|
|
134
134
|
}, [i, d]);
|
|
135
|
-
const m =
|
|
135
|
+
const m = R(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), p = R(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), y = R(() => d.length === 0 ? !0 : i.every((e) => !e.isLoading), [i, d.length]), {
|
|
136
136
|
data: c,
|
|
137
137
|
isLoading: L,
|
|
138
|
-
isError:
|
|
139
|
-
refetch:
|
|
138
|
+
isError: E,
|
|
139
|
+
refetch: O
|
|
140
140
|
} = te({
|
|
141
141
|
queryKey: le(t, p),
|
|
142
142
|
queryFn: () => k(t, p),
|
|
143
|
-
enabled: !!t && p.length > 0 &&
|
|
143
|
+
enabled: !!t && p.length > 0 && y
|
|
144
144
|
});
|
|
145
|
-
|
|
145
|
+
M(
|
|
146
146
|
(e) => {
|
|
147
147
|
e.patientUUID === t && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
148
148
|
(h) => p.includes(h)
|
|
149
|
-
) &&
|
|
149
|
+
) && O();
|
|
150
150
|
},
|
|
151
|
-
[t,
|
|
151
|
+
[t, O]
|
|
152
152
|
), $(() => {
|
|
153
|
-
|
|
153
|
+
E && s({
|
|
154
154
|
title: o("ERROR_DEFAULT_TITLE"),
|
|
155
155
|
message: o("ERROR_FETCHING_OBSERVATIONS"),
|
|
156
156
|
type: "error"
|
|
157
157
|
});
|
|
158
|
-
}, [
|
|
159
|
-
const f =
|
|
158
|
+
}, [E]);
|
|
159
|
+
const f = R(() => {
|
|
160
160
|
if (!c) return [];
|
|
161
|
-
const e =
|
|
162
|
-
return
|
|
163
|
-
}, [c]),
|
|
161
|
+
const e = w(c), h = x(e);
|
|
162
|
+
return H(h);
|
|
163
|
+
}, [c]), G = [
|
|
164
164
|
{ key: "name", header: "name" },
|
|
165
165
|
{ key: "value", header: "value" },
|
|
166
166
|
{ key: "form", header: "form" }
|
|
167
|
-
], g = L || !
|
|
167
|
+
], g = L || !y, _ = E && y, A = (!c || c.entry?.length === 0 || p.length === 0) && y, V = _ ? o("ERROR_FETCHING_OBSERVATIONS") : null, C = A ? o("NO_OBSERVATIONS_FOUND") : void 0, U = f.length > 0 && !g && !_, T = n.titleTranslationKey, v = T ? o(T) : "";
|
|
168
168
|
return /* @__PURE__ */ S(
|
|
169
169
|
"div",
|
|
170
170
|
{
|
|
171
171
|
id: "observations",
|
|
172
|
-
"data-testid":
|
|
172
|
+
"data-testid": T ? `observations-${v}` : "observations",
|
|
173
173
|
"aria-label": "observations-aria-label",
|
|
174
174
|
className: I.observations,
|
|
175
175
|
children: [
|
|
176
176
|
/* @__PURE__ */ u(
|
|
177
|
-
|
|
177
|
+
j,
|
|
178
178
|
{
|
|
179
179
|
id: "observations-title",
|
|
180
|
-
testId:
|
|
181
|
-
title:
|
|
180
|
+
testId: T ? `observations-title-${v}` : "observations-title",
|
|
181
|
+
title: v,
|
|
182
182
|
className: I.title,
|
|
183
|
-
children: /* @__PURE__ */ u("p", { children:
|
|
183
|
+
children: /* @__PURE__ */ u("p", { children: v })
|
|
184
184
|
}
|
|
185
185
|
),
|
|
186
|
-
|
|
186
|
+
U ? /* @__PURE__ */ u(
|
|
187
187
|
oe,
|
|
188
188
|
{
|
|
189
189
|
groupedData: f,
|
|
190
|
-
title:
|
|
190
|
+
title: v,
|
|
191
191
|
hideThumbnail: b
|
|
192
192
|
}
|
|
193
193
|
) : /* @__PURE__ */ u(
|
|
194
|
-
|
|
194
|
+
z,
|
|
195
195
|
{
|
|
196
|
-
headers:
|
|
196
|
+
headers: G,
|
|
197
197
|
rows: [],
|
|
198
198
|
ariaLabel: o("OBSERVATIONS"),
|
|
199
199
|
loading: g,
|
|
200
|
-
errorStateMessage:
|
|
201
|
-
emptyStateMessage:
|
|
200
|
+
errorStateMessage: V,
|
|
201
|
+
emptyStateMessage: C,
|
|
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-CTQF7H5n.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
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, I 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, J as me, ak as Ae, al as Ie, am as ue, N as _e, Q as Te, S as Le } from "./index-CTQF7H5n.js";
|
|
3
3
|
import { useState as g, useMemo as N, useEffect as S, useRef as ve, useCallback as U } from "react";
|
|
4
4
|
import { useQuery as M, useQueryClient as Ne } from "@tanstack/react-query";
|
|
5
5
|
const be = "Available for appointments", q = "Get Appointment Unavailability", pe = "Add Appointment Unavailability", G = "Appointment Location", De = () => {
|
|
@@ -8,7 +8,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
8
8
|
} catch {
|
|
9
9
|
return "";
|
|
10
10
|
}
|
|
11
|
-
},
|
|
11
|
+
}, w = (e) => ({
|
|
12
12
|
id: "",
|
|
13
13
|
text: e
|
|
14
14
|
}), ye = (e) => ({
|
|
@@ -62,7 +62,7 @@ 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
|
-
}),
|
|
65
|
+
}), K = (e) => e.filter((a) => !a.isSelectAll).map((a) => a.id), Re = (e, a) => {
|
|
66
66
|
const n = Ue(
|
|
67
67
|
{
|
|
68
68
|
locationUuid: e.locationUuid,
|
|
@@ -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,
|
|
@@ -187,7 +187,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
187
187
|
_,
|
|
188
188
|
t("ADMIN_UNAVAILABILITY_FORM_ALL_SERVICES")
|
|
189
189
|
),
|
|
190
|
-
|
|
190
|
+
w,
|
|
191
191
|
{
|
|
192
192
|
loading: "",
|
|
193
193
|
error: "",
|
|
@@ -203,7 +203,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
203
203
|
I,
|
|
204
204
|
t("ADMIN_UNAVAILABILITY_FORM_ALL_PROVIDERS")
|
|
205
205
|
),
|
|
206
|
-
|
|
206
|
+
w,
|
|
207
207
|
{
|
|
208
208
|
loading: "",
|
|
209
209
|
error: "",
|
|
@@ -106880,7 +106880,7 @@ I90();
|
|
|
106880
106880
|
const B90 = [];
|
|
106881
106881
|
for (let t = 0; t < 256; ++t)
|
|
106882
106882
|
B90.push((t + 256).toString(16).slice(1));
|
|
106883
|
-
R0(() => Promise.resolve().then(() => na0)), R0(() => Promise.resolve().then(() => La0)), R0(() => Promise.resolve().then(() => sc0)), R0(() => Promise.resolve().then(() => wc0)), R0(() => import("./DocumentsTable-
|
|
106883
|
+
R0(() => Promise.resolve().then(() => na0)), R0(() => Promise.resolve().then(() => La0)), R0(() => Promise.resolve().then(() => sc0)), R0(() => Promise.resolve().then(() => wc0)), R0(() => import("./DocumentsTable-DZnCF3U4-DBH8rn_k.js")), R0(() => Promise.resolve().then(() => ms0)), R0(() => import("./FormsTable-BYg45PXE-CucdzIBr.js")), R0(() => Promise.resolve().then(() => Yi0)), R0(() => import("./Observations-BG4bqMBN-THn6wLBj.js")), R0(
|
|
106884
106884
|
() => Promise.resolve().then(() => Qs0)
|
|
106885
106885
|
), R0(
|
|
106886
106886
|
() => Promise.resolve().then(() => vi0)
|
|
@@ -195116,7 +195116,7 @@ var abt = (t, e = !1) => {
|
|
|
195116
195116
|
const e = Wa2(() => {
|
|
195117
195117
|
const r = this, [o] = this.#n, [a] = this.#o, [c] = this.#a, [l] = this.#c, [i] = this.#p, [s] = this.#e;
|
|
195118
195118
|
let d;
|
|
195119
|
-
return this.#l ? d = this.#l : (d = qa2(() => import("./LNWAZHJI-
|
|
195119
|
+
return this.#l ? d = this.#l : (d = qa2(() => import("./LNWAZHJI-B2EFalNC.js")), this.#l = d), hc2(this.#h, this.#r), ja2(d, Fa2({
|
|
195120
195120
|
get queryFlavor() {
|
|
195121
195121
|
return r.#d;
|
|
195122
195122
|
},
|
|
@@ -195214,7 +195214,7 @@ var abt = (t, e = !1) => {
|
|
|
195214
195214
|
const e = Wa2(() => {
|
|
195215
195215
|
const r = this, [o] = this.#n, [a] = this.#o, [c] = this.#a, [l] = this.#c, [i] = this.#p, [s] = this.#e, [d] = this.#l;
|
|
195216
195216
|
let u;
|
|
195217
|
-
return this.#i ? u = this.#i : (u = qa2(() => import("./MWZ6AO7Z-
|
|
195217
|
+
return this.#i ? u = this.#i : (u = qa2(() => import("./MWZ6AO7Z-C9aQmtgC.js")), this.#i = u), hc2(this.#h, this.#r), ja2(u, Fa2({
|
|
195218
195218
|
get queryFlavor() {
|
|
195219
195219
|
return r.#d;
|
|
195220
195220
|
},
|
|
@@ -195374,11 +195374,11 @@ const RVt = {
|
|
|
195374
195374
|
}), KVt = R0(
|
|
195375
195375
|
() => import("./index-CFigb5vF.js").then((t) => ({ default: t.IndexPage }))
|
|
195376
195376
|
), YVt = R0(
|
|
195377
|
-
() => import("./index-
|
|
195377
|
+
() => import("./index-Xes8d4CI.js").then((t) => ({
|
|
195378
195378
|
default: t.default
|
|
195379
195379
|
}))
|
|
195380
195380
|
), JVt = R0(
|
|
195381
|
-
() => import("./index-
|
|
195381
|
+
() => import("./index-BUlGp_VU.js").then((t) => ({
|
|
195382
195382
|
default: t.default
|
|
195383
195383
|
}))
|
|
195384
195384
|
), XVt = [
|
|
@@ -195421,28 +195421,28 @@ function dbt() {
|
|
|
195421
195421
|
}
|
|
195422
195422
|
export {
|
|
195423
195423
|
mxt as $,
|
|
195424
|
-
|
|
195425
|
-
|
|
195426
|
-
|
|
195427
|
-
|
|
195428
|
-
|
|
195424
|
+
dF2 as A,
|
|
195425
|
+
IVt as B,
|
|
195426
|
+
jz as C,
|
|
195427
|
+
Pzt as D,
|
|
195428
|
+
xHt as E,
|
|
195429
195429
|
uE as F,
|
|
195430
195430
|
Im0 as G,
|
|
195431
|
-
|
|
195432
|
-
|
|
195433
|
-
|
|
195434
|
-
|
|
195435
|
-
|
|
195436
|
-
|
|
195437
|
-
|
|
195438
|
-
|
|
195439
|
-
|
|
195440
|
-
|
|
195441
|
-
|
|
195431
|
+
Ozt as H,
|
|
195432
|
+
dxt as I,
|
|
195433
|
+
mHt as J,
|
|
195434
|
+
Oxt as K,
|
|
195435
|
+
Bzt as L,
|
|
195436
|
+
$zt as M,
|
|
195437
|
+
xxt as N,
|
|
195438
|
+
Izt as O,
|
|
195439
|
+
Wzt as P,
|
|
195440
|
+
tyt as Q,
|
|
195441
|
+
jzt as R,
|
|
195442
195442
|
W90 as S,
|
|
195443
|
-
|
|
195443
|
+
Zzt as T,
|
|
195444
195444
|
Vxt as U,
|
|
195445
|
-
|
|
195445
|
+
Tzt as V,
|
|
195446
195446
|
wM as W,
|
|
195447
195447
|
kJ2 as X,
|
|
195448
195448
|
YB0 as Y,
|
|
@@ -195513,7 +195513,7 @@ export {
|
|
|
195513
195513
|
Kxt as ax,
|
|
195514
195514
|
fg as ay,
|
|
195515
195515
|
c4 as az,
|
|
195516
|
-
|
|
195516
|
+
Dzt as b,
|
|
195517
195517
|
n8 as b0,
|
|
195518
195518
|
Byt as b1,
|
|
195519
195519
|
Qxt as b2,
|
|
@@ -195524,28 +195524,28 @@ export {
|
|
|
195524
195524
|
Xxt as b7,
|
|
195525
195525
|
uyt as b8,
|
|
195526
195526
|
dbt as b9,
|
|
195527
|
-
|
|
195527
|
+
an as c,
|
|
195528
195528
|
xt as d,
|
|
195529
195529
|
lt as e,
|
|
195530
|
-
|
|
195530
|
+
Ki as f,
|
|
195531
195531
|
a2 as g,
|
|
195532
195532
|
as as h,
|
|
195533
|
-
|
|
195534
|
-
|
|
195533
|
+
Hg as i,
|
|
195534
|
+
Qi as j,
|
|
195535
195535
|
NJ2 as k,
|
|
195536
|
-
|
|
195536
|
+
es as l,
|
|
195537
195537
|
Gt as m,
|
|
195538
|
-
|
|
195538
|
+
Uzt as n,
|
|
195539
195539
|
Ut as o,
|
|
195540
|
-
|
|
195541
|
-
|
|
195542
|
-
|
|
195543
|
-
|
|
195540
|
+
szt as p,
|
|
195541
|
+
aVe as q,
|
|
195542
|
+
TB2 as r,
|
|
195543
|
+
cF2 as s,
|
|
195544
195544
|
kl as t,
|
|
195545
195545
|
E2 as u,
|
|
195546
|
-
|
|
195546
|
+
vF2 as v,
|
|
195547
195547
|
uM as w,
|
|
195548
195548
|
Zc as x,
|
|
195549
|
-
|
|
195550
|
-
|
|
195549
|
+
_zt as y,
|
|
195550
|
+
kzt as z
|
|
195551
195551
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as i, jsxs as y } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { P as V, B as P, u as C, C as O, E as h, a as B, x as G, G as L, I as x, J as U, K as H, N as q, Q as F, S as K, U as Q, Y as j, Z as k } from "./index-CTQF7H5n.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(
|
|
6
|
-
|
|
6
|
+
P,
|
|
7
7
|
"useAppointmentsConfig",
|
|
8
8
|
"AppointmentsConfigProvider"
|
|
9
9
|
), Z = ({
|
|
@@ -14,7 +14,7 @@ const Y = V(
|
|
|
14
14
|
}) => {
|
|
15
15
|
const { t: n } = C();
|
|
16
16
|
return /* @__PURE__ */ i(
|
|
17
|
-
|
|
17
|
+
O,
|
|
18
18
|
{
|
|
19
19
|
id: "delete-service-modal",
|
|
20
20
|
testId: "delete-service-modal-test-id",
|
|
@@ -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), [
|
|
78
|
+
const { t: e } = C(), a = $(), { addNotification: t } = B(), { userPrivileges: s } = G(), { appointmentsConfig: n } = Y(), [E, _] = I(null), [b, p] = I(!1), l = n?.serviceTableFields ?? [
|
|
79
79
|
...u
|
|
80
|
-
], S = L(s, z),
|
|
80
|
+
], S = L(s, z), M = L(
|
|
81
81
|
s,
|
|
82
82
|
w
|
|
83
83
|
), m = c(
|
|
@@ -87,16 +87,16 @@ const oe = () => {
|
|
|
87
87
|
queryKey: ["allAppointmentServices"],
|
|
88
88
|
queryFn: x,
|
|
89
89
|
enabled: S
|
|
90
|
-
}),
|
|
90
|
+
}), N = c(
|
|
91
91
|
() => ae(l, e),
|
|
92
92
|
[l]
|
|
93
|
-
),
|
|
93
|
+
), R = c(
|
|
94
94
|
() => ie(A ?? [], m),
|
|
95
95
|
[A, m]
|
|
96
96
|
), g = async () => {
|
|
97
97
|
p(!0);
|
|
98
98
|
try {
|
|
99
|
-
await
|
|
99
|
+
await k(E.id), t({
|
|
100
100
|
title: e("ADMIN_ALL_SERVICES_DELETE_SUCCESS_TITLE"),
|
|
101
101
|
message: e("ADMIN_ALL_SERVICES_DELETE_SUCCESS_MESSAGE"),
|
|
102
102
|
type: "success",
|
|
@@ -112,14 +112,14 @@ const oe = () => {
|
|
|
112
112
|
p(!1);
|
|
113
113
|
}
|
|
114
114
|
}, T = (r, o) => o === "actions" ? /* @__PURE__ */ i(
|
|
115
|
-
|
|
115
|
+
Q,
|
|
116
116
|
{
|
|
117
117
|
id: `delete-service-${r.id}-btn`,
|
|
118
118
|
testId: `delete-service-${r.id}-btn-test-id`,
|
|
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: !M,
|
|
123
123
|
onClick: () => _(r),
|
|
124
124
|
children: /* @__PURE__ */ i(j, {})
|
|
125
125
|
}
|
|
@@ -130,7 +130,7 @@ const oe = () => {
|
|
|
130
130
|
return /* @__PURE__ */ i(
|
|
131
131
|
H,
|
|
132
132
|
{
|
|
133
|
-
header: /* @__PURE__ */ i(F, { breadcrumbItems: f, userMenu: /* @__PURE__ */ i(
|
|
133
|
+
header: /* @__PURE__ */ i(F, { breadcrumbItems: f, userMenu: /* @__PURE__ */ i(K, {}) }),
|
|
134
134
|
main: S ? /* @__PURE__ */ y(
|
|
135
135
|
"div",
|
|
136
136
|
{
|
|
@@ -144,8 +144,8 @@ const oe = () => {
|
|
|
144
144
|
{
|
|
145
145
|
id: "all-services",
|
|
146
146
|
title: e("ADMIN_ALL_SERVICES_TITLE"),
|
|
147
|
-
headers:
|
|
148
|
-
rows:
|
|
147
|
+
headers: N,
|
|
148
|
+
rows: R,
|
|
149
149
|
ariaLabel: "all-services-table",
|
|
150
150
|
loading: v,
|
|
151
151
|
errorStateMessage: D ? e("ADMIN_ALL_SERVICES_ERROR_MESSAGE") : null,
|
|
@@ -158,7 +158,7 @@ const oe = () => {
|
|
|
158
158
|
Z,
|
|
159
159
|
{
|
|
160
160
|
serviceName: E.name,
|
|
161
|
-
isDeleting:
|
|
161
|
+
isDeleting: b,
|
|
162
162
|
onConfirm: g,
|
|
163
163
|
onCancel: () => _(null)
|
|
164
164
|
}
|
package/dist/index.js
CHANGED