@bahmni/appointments-app 0.0.1-dev.367 → 0.0.1-dev.368
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-7Vlcy4Vm-DZwayhCt.js → DocumentsTable-CHqKtoG4-TVNgZWt9.js} +8 -8
- package/dist/{FormsTable-CJVrUcXB-DR4AQs-i.js → FormsTable-Crz5nzU3-Dbpsv60C.js} +54 -54
- package/dist/{LNWAZHJI-CBrOxebh.js → LNWAZHJI-BDHWcl0N.js} +2 -2
- package/dist/{MWZ6AO7Z-C_vM_bx4.js → MWZ6AO7Z-BSs-P-OB.js} +2 -2
- package/dist/{Observations-Be_tZGhM-DeKwp5M-.js → Observations-CHjSKw9X-DCtceCpI.js} +15 -15
- package/dist/{YPM2AS64-Cny94FDr.js → YPM2AS64-u0K5Mm6A.js} +1 -1
- package/dist/{index-NuZ0Q4DH.js → index-C9Y39EYu.js} +39 -39
- package/dist/{index-DytszOX3.js → index-DAXJhipW.js} +1 -1
- package/dist/{index-hbNIbppV.js → index-DC5e3wD2.js} +19 -19
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as r, jsxs as p, Fragment as x } from "react/jsx-runtime";
|
|
2
|
-
import { g as G, u as Y, K as W,
|
|
2
|
+
import { g as G, u as Y, K as W, m as J, w as X, a as Z, U as ee, p as te } from "./index-C9Y39EYu.js";
|
|
3
3
|
import { useQuery as ae } from "@tanstack/react-query";
|
|
4
4
|
import { useState as l, useCallback as h, useEffect as I, useMemo as _ } 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 = {
|
|
@@ -34,14 +34,14 @@ const Te = [
|
|
|
34
34
|
"uploadedOn",
|
|
35
35
|
"uploadedBy"
|
|
36
36
|
], pe = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i, B = (a) => a.attachments.length > 0 ? a.attachments : a.documentUrl ? [{ url: a.documentUrl, contentType: a.contentType }] : [], Ne = ({ config: a, encounterUuids: g }) => {
|
|
37
|
-
const [s,
|
|
37
|
+
const [s, w] = l(!1), [o, U] = l(
|
|
38
38
|
null
|
|
39
39
|
), [$, O] = l(
|
|
40
40
|
/* @__PURE__ */ new Set()
|
|
41
41
|
), E = G(), { t: n } = Y(), { addNotification: L } = W(), k = Number(a?.pageSize) || 5, [f, C] = l(1), [u, V] = l(k), [F, A] = l(void 0), M = h((e) => {
|
|
42
|
-
U(e),
|
|
42
|
+
U(e), w(!0);
|
|
43
43
|
}, []), H = h(() => {
|
|
44
|
-
|
|
44
|
+
w(!1), U(null), O(/* @__PURE__ */ new Set());
|
|
45
45
|
}, []), v = h((e) => {
|
|
46
46
|
O((t) => new Set(t).add(e));
|
|
47
47
|
}, []), { data: i, isLoading: q, isError: b, error: y } = ae({
|
|
@@ -76,9 +76,9 @@ const Te = [
|
|
|
76
76
|
if (!s || !o) return;
|
|
77
77
|
const t = /* @__PURE__ */ new Set(), m = B(o);
|
|
78
78
|
for (let c = 0; c < m.length; c++) {
|
|
79
|
-
const
|
|
79
|
+
const S = R(m[c].url);
|
|
80
80
|
try {
|
|
81
|
-
(await fetch(
|
|
81
|
+
(await fetch(S, {
|
|
82
82
|
method: "HEAD",
|
|
83
83
|
signal: e.signal
|
|
84
84
|
})).ok || t.add(c);
|
|
@@ -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 = R(e.url), c = e.contentType?.toLowerCase().includes("pdf"),
|
|
172
|
+
const m = R(e.url), c = e.contentType?.toLowerCase().includes("pdf"), S = (e.contentType?.toLowerCase().includes("image") ?? !1) || pe.test(e.url ?? ""), D = $.has(t);
|
|
173
173
|
return m === "#" || D ? /* @__PURE__ */ p(
|
|
174
174
|
"div",
|
|
175
175
|
{
|
|
@@ -196,7 +196,7 @@ const Te = [
|
|
|
196
196
|
"/",
|
|
197
197
|
T.length
|
|
198
198
|
] }),
|
|
199
|
-
|
|
199
|
+
S ? /* @__PURE__ */ r(
|
|
200
200
|
"img",
|
|
201
201
|
{
|
|
202
202
|
src: m,
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { jsx as i, jsxs as z, Fragment as
|
|
2
|
-
import { u as
|
|
3
|
-
import { useQueryClient as
|
|
4
|
-
import { useState as
|
|
5
|
-
const ke = "FormsTable-module_formsTableBody__SvGha",
|
|
1
|
+
import { jsx as i, jsxs as z, Fragment as ge } from "react/jsx-runtime";
|
|
2
|
+
import { u as he, g as pe, E as be, J as Ne, b as Oe, f as Te, d as Ee, c as Ie, Q as Ae, e as _e, R as ve, V as Se, s as K, a as Fe, h as Q, t as x, w as Re, U as P, S as Ue, $ as Ce, p as Be, Y as Le, T as Me } from "./index-C9Y39EYu.js";
|
|
3
|
+
import { useQueryClient as De, useQuery as O } from "@tanstack/react-query";
|
|
4
|
+
import { useState as G, useMemo as d, useCallback as l } from "react";
|
|
5
|
+
const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_modalHeading__wnTmA", qe = "FormsTable-module_customAccordianItem__isszs", T = {
|
|
6
6
|
formsTableBody: ke,
|
|
7
|
-
modalHeading:
|
|
8
|
-
customAccordianItem:
|
|
9
|
-
},
|
|
7
|
+
modalHeading: we,
|
|
8
|
+
customAccordianItem: qe
|
|
9
|
+
}, Ve = "startConsultation", ze = ({
|
|
10
10
|
episodeOfCareUuids: R,
|
|
11
11
|
encounterUuids: u,
|
|
12
12
|
config: J,
|
|
13
13
|
disableActions: X = !1,
|
|
14
|
-
activeEncounterUuid:
|
|
14
|
+
activeEncounterUuid: g = null
|
|
15
15
|
}) => {
|
|
16
|
-
const { t: n } =
|
|
16
|
+
const { t: n } = he(), c = pe(), [h, U] = G(!1), [s, C] = G(null), {
|
|
17
17
|
numberOfVisits: Z,
|
|
18
18
|
hideThumbnail: W = !1,
|
|
19
19
|
forms: p
|
|
20
20
|
} = J ?? {}, ee = be(
|
|
21
|
-
|
|
22
|
-
), { userPrivileges: b } =
|
|
21
|
+
Me.EDIT_OBSERVATIONS
|
|
22
|
+
), { userPrivileges: b } = Ne(), E = ee && !X && !!g, B = Oe(
|
|
23
23
|
R,
|
|
24
24
|
u
|
|
25
|
-
), re =
|
|
25
|
+
), re = De(), {
|
|
26
26
|
data: L = [],
|
|
27
|
-
isLoading:
|
|
28
|
-
isError:
|
|
27
|
+
isLoading: M,
|
|
28
|
+
isError: D,
|
|
29
29
|
error: oe,
|
|
30
30
|
refetch: ae
|
|
31
|
-
} =
|
|
31
|
+
} = O({
|
|
32
32
|
queryKey: ["forms", c, R],
|
|
33
33
|
queryFn: () => Te(c, void 0, Z),
|
|
34
34
|
enabled: !!c && !B
|
|
@@ -39,12 +39,12 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
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
|
-
}, [L, u, p]), { data:
|
|
42
|
+
}, [L, u, p]), { data: N = [] } = O({
|
|
43
43
|
queryKey: ["observationForms"],
|
|
44
44
|
queryFn: () => Ee()
|
|
45
|
-
}),
|
|
45
|
+
}), w = l(
|
|
46
46
|
(e) => {
|
|
47
|
-
const r =
|
|
47
|
+
const r = N.find((a) => a.name === e);
|
|
48
48
|
if (!r?.privileges || r.privileges.length === 0) return !0;
|
|
49
49
|
if (!b || b.length === 0) return !1;
|
|
50
50
|
const o = new Set(b.map((a) => a.name));
|
|
@@ -52,34 +52,34 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
52
52
|
(a) => o.has(a.privilegeName) && a.editable
|
|
53
53
|
);
|
|
54
54
|
},
|
|
55
|
-
[
|
|
55
|
+
[N, b]
|
|
56
56
|
), f = l(
|
|
57
|
-
(e) => !
|
|
58
|
-
[
|
|
59
|
-
),
|
|
60
|
-
(e) =>
|
|
61
|
-
[
|
|
57
|
+
(e) => !g || e.encounterUuid !== g ? !1 : w(e.formName),
|
|
58
|
+
[g, w]
|
|
59
|
+
), q = l(
|
|
60
|
+
(e) => N.find((r) => r.name === e)?.uuid,
|
|
61
|
+
[N]
|
|
62
62
|
), I = d(() => {
|
|
63
63
|
if (s)
|
|
64
|
-
return
|
|
65
|
-
}, [s,
|
|
64
|
+
return q(s.formName);
|
|
65
|
+
}, [s, q]), {
|
|
66
66
|
data: m,
|
|
67
67
|
isLoading: te,
|
|
68
68
|
isError: se,
|
|
69
69
|
error: A
|
|
70
|
-
} =
|
|
70
|
+
} = O({
|
|
71
71
|
queryKey: ["formMetadata", I],
|
|
72
72
|
queryFn: () => Ie(I),
|
|
73
|
-
enabled: !!I &&
|
|
73
|
+
enabled: !!I && h
|
|
74
74
|
}), {
|
|
75
75
|
data: _,
|
|
76
76
|
isLoading: ne,
|
|
77
77
|
isError: ie,
|
|
78
78
|
error: v
|
|
79
|
-
} =
|
|
79
|
+
} = O({
|
|
80
80
|
queryKey: ["formsEncounterFHIR", s?.encounterUuid],
|
|
81
81
|
queryFn: () => Ae(s.encounterUuid),
|
|
82
|
-
enabled: !!s?.encounterUuid &&
|
|
82
|
+
enabled: !!s?.encounterUuid && h
|
|
83
83
|
});
|
|
84
84
|
_e(
|
|
85
85
|
(e) => {
|
|
@@ -117,25 +117,25 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
117
117
|
return K(A).message;
|
|
118
118
|
if (v)
|
|
119
119
|
return K(v).message;
|
|
120
|
-
}, [A, v]),
|
|
120
|
+
}, [A, v]), y = 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
|
+
), V = d(
|
|
127
|
+
() => [...y, { key: "actions", header: n("ACTIONS") }],
|
|
128
|
+
[y, n]
|
|
129
129
|
), ce = l(
|
|
130
|
-
(e) => E && e.some((r) => f(r)) ?
|
|
131
|
-
[E, f,
|
|
132
|
-
), fe =
|
|
130
|
+
(e) => E && e.some((r) => f(r)) ? V : y,
|
|
131
|
+
[E, f, V, y]
|
|
132
|
+
), fe = y, ye = d(
|
|
133
133
|
() => [
|
|
134
134
|
{ key: "recordedOn", sortable: !0 },
|
|
135
135
|
{ key: "recordedBy", sortable: !0 }
|
|
136
136
|
],
|
|
137
137
|
[]
|
|
138
|
-
),
|
|
138
|
+
), H = d(() => {
|
|
139
139
|
const e = k.reduce(
|
|
140
140
|
(r, o) => {
|
|
141
141
|
const a = o.formName;
|
|
@@ -166,7 +166,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
166
166
|
U(!1), C(null);
|
|
167
167
|
}, []), S = l((e) => {
|
|
168
168
|
globalThis.dispatchEvent(
|
|
169
|
-
new CustomEvent(
|
|
169
|
+
new CustomEvent(Ve, {
|
|
170
170
|
detail: {
|
|
171
171
|
editOnly: "observationForms",
|
|
172
172
|
editTitle: "EDIT_OBSERVATION_FORM_TITLE",
|
|
@@ -185,14 +185,14 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
185
185
|
return e.recordedBy;
|
|
186
186
|
case "actions":
|
|
187
187
|
return f(e) ? /* @__PURE__ */ i(
|
|
188
|
-
|
|
188
|
+
Q,
|
|
189
189
|
{
|
|
190
190
|
label: n("EDIT_OBSERVATION_FORM"),
|
|
191
191
|
kind: "ghost",
|
|
192
192
|
size: "sm",
|
|
193
193
|
testId: `edit-form-${e.encounterUuid}`,
|
|
194
194
|
onClick: () => S(e),
|
|
195
|
-
children: /* @__PURE__ */ i(
|
|
195
|
+
children: /* @__PURE__ */ i(x, {})
|
|
196
196
|
}
|
|
197
197
|
) : null;
|
|
198
198
|
default:
|
|
@@ -201,21 +201,21 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
201
201
|
},
|
|
202
202
|
[$, S, f, n]
|
|
203
203
|
);
|
|
204
|
-
return /* @__PURE__ */ z(
|
|
205
|
-
/* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children:
|
|
206
|
-
|
|
204
|
+
return /* @__PURE__ */ z(ge, { children: [
|
|
205
|
+
/* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: M || D || H.length === 0 || B ? /* @__PURE__ */ i(
|
|
206
|
+
P,
|
|
207
207
|
{
|
|
208
208
|
headers: fe,
|
|
209
209
|
ariaLabel: n("FORMS_HEADING"),
|
|
210
210
|
rows: [],
|
|
211
|
-
loading:
|
|
212
|
-
errorStateMessage:
|
|
211
|
+
loading: M,
|
|
212
|
+
errorStateMessage: D ? oe?.message : void 0,
|
|
213
213
|
emptyStateMessage: n("FORMS_UNAVAILABLE"),
|
|
214
214
|
renderCell: j,
|
|
215
215
|
className: T.formsTableBody,
|
|
216
216
|
dataTestId: "forms-table"
|
|
217
217
|
}
|
|
218
|
-
) : /* @__PURE__ */ i(Ue, { align: "start", children:
|
|
218
|
+
) : /* @__PURE__ */ i(Ue, { align: "start", children: H.map((e, r) => {
|
|
219
219
|
const { formName: o, records: a } = e, t = ce(a);
|
|
220
220
|
return /* @__PURE__ */ i(
|
|
221
221
|
Ce,
|
|
@@ -225,14 +225,14 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
225
225
|
testId: `accordian-title-${o}`,
|
|
226
226
|
open: r === 0,
|
|
227
227
|
children: /* @__PURE__ */ i(
|
|
228
|
-
|
|
228
|
+
P,
|
|
229
229
|
{
|
|
230
230
|
headers: t,
|
|
231
231
|
ariaLabel: n("FORMS_HEADING"),
|
|
232
232
|
rows: a,
|
|
233
233
|
loading: !1,
|
|
234
234
|
errorStateMessage: "",
|
|
235
|
-
sortable:
|
|
235
|
+
sortable: ye,
|
|
236
236
|
emptyStateMessage: n("FORMS_UNAVAILABLE"),
|
|
237
237
|
renderCell: j,
|
|
238
238
|
className: T.formsTableBody,
|
|
@@ -243,17 +243,17 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
243
243
|
o
|
|
244
244
|
);
|
|
245
245
|
}) }) }),
|
|
246
|
-
|
|
246
|
+
h && s && /* @__PURE__ */ i(
|
|
247
247
|
Be,
|
|
248
248
|
{
|
|
249
249
|
id: "modalIdForActionAreaLayout",
|
|
250
250
|
portalId: "main-display-area",
|
|
251
|
-
open:
|
|
251
|
+
open: h,
|
|
252
252
|
onRequestClose: Y,
|
|
253
253
|
modalHeading: /* @__PURE__ */ z("div", { className: T.modalHeading, children: [
|
|
254
254
|
/* @__PURE__ */ i("span", { children: s.formName }),
|
|
255
255
|
E && f(s) && /* @__PURE__ */ i(
|
|
256
|
-
|
|
256
|
+
Q,
|
|
257
257
|
{
|
|
258
258
|
label: n("EDIT_OBSERVATION_FORM"),
|
|
259
259
|
kind: "ghost",
|
|
@@ -262,7 +262,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
262
262
|
onClick: () => {
|
|
263
263
|
Y(), S(s);
|
|
264
264
|
},
|
|
265
|
-
children: /* @__PURE__ */ i(
|
|
265
|
+
children: /* @__PURE__ */ i(x, {})
|
|
266
266
|
}
|
|
267
267
|
)
|
|
268
268
|
] }),
|
|
@@ -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-u0K5Mm6A.js";
|
|
2
|
+
import { an as p, ao as d, ap as e } from "./index-C9Y39EYu.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-u0K5Mm6A.js";
|
|
2
|
+
import { an as v, ao as C, ap as e } from "./index-C9Y39EYu.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as S, jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import { g as
|
|
2
|
+
import { g as V, K as q, u as N, i as M, j as k, e as x, k as H, x as Q, A as G, l as j, U as w, H as z, W as A, M as P, v as W, n as J, o as X, q as Z, r as ee } from "./index-C9Y39EYu.js";
|
|
3
3
|
import { useQueries as ae, useQuery as te } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as se, useEffect as
|
|
4
|
+
import { useRef as se, useEffect as _, useMemo as E } from "react";
|
|
5
5
|
const D = (a, n, d, l, b, r) => {
|
|
6
|
-
const t = P(a, n, b), s = t.value, o =
|
|
6
|
+
const t = P(a, n, b), s = t.value, o = W(s);
|
|
7
7
|
let i = s;
|
|
8
8
|
o === "Image" && (i = /* @__PURE__ */ u(
|
|
9
9
|
X,
|
|
@@ -25,7 +25,7 @@ const D = (a, n, d, l, b, r) => {
|
|
|
25
25
|
provider: t.provider
|
|
26
26
|
}), p = a.display, v = a.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = l ? `${l}-${v}-${p}-${d}-${n}` : `${v}-${p}-${d}-${n}`;
|
|
27
27
|
return /* @__PURE__ */ u(
|
|
28
|
-
|
|
28
|
+
J,
|
|
29
29
|
{
|
|
30
30
|
header: t.header,
|
|
31
31
|
value: i,
|
|
@@ -113,20 +113,20 @@ const D = (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 = V(), { addNotification: s } = q(), { t: o } = N(), i = ae({
|
|
117
117
|
queries: d.map((e) => ({
|
|
118
118
|
queryKey: de(e),
|
|
119
119
|
queryFn: () => M(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);
|
|
@@ -149,7 +149,7 @@ const D = (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"),
|
|
@@ -158,13 +158,13 @@ const D = (a, n, d, l, b, r) => {
|
|
|
158
158
|
}, [T]);
|
|
159
159
|
const O = E(() => {
|
|
160
160
|
if (!c) return [];
|
|
161
|
-
const e =
|
|
162
|
-
return
|
|
161
|
+
const e = H(c), h = Q(e);
|
|
162
|
+
return G(h);
|
|
163
163
|
}, [c]), L = [
|
|
164
164
|
{ key: "name", header: "name" },
|
|
165
165
|
{ key: "value", header: "value" },
|
|
166
166
|
{ key: "form", header: "form" }
|
|
167
|
-
],
|
|
167
|
+
], $ = F || !v, f = T && v, U = (!c || c.entry?.length === 0 || p.length === 0) && v, C = f ? o("ERROR_FETCHING_OBSERVATIONS") : null, K = U ? o("NO_OBSERVATIONS_FOUND") : void 0, Y = O.length > 0 && !$ && !f, R = n.titleTranslationKey, y = R ? o(R) : "";
|
|
168
168
|
return /* @__PURE__ */ S(
|
|
169
169
|
"div",
|
|
170
170
|
{
|
|
@@ -174,7 +174,7 @@ const D = (a, n, d, l, b, r) => {
|
|
|
174
174
|
className: I.observations,
|
|
175
175
|
children: [
|
|
176
176
|
/* @__PURE__ */ u(
|
|
177
|
-
|
|
177
|
+
j,
|
|
178
178
|
{
|
|
179
179
|
id: "observations-title",
|
|
180
180
|
testId: R ? `observations-title-${y}` : "observations-title",
|
|
@@ -191,12 +191,12 @@ const D = (a, n, d, l, b, r) => {
|
|
|
191
191
|
hideThumbnail: b
|
|
192
192
|
}
|
|
193
193
|
) : /* @__PURE__ */ u(
|
|
194
|
-
|
|
194
|
+
w,
|
|
195
195
|
{
|
|
196
196
|
headers: L,
|
|
197
197
|
rows: [],
|
|
198
198
|
ariaLabel: o("OBSERVATIONS"),
|
|
199
|
-
loading:
|
|
199
|
+
loading: $,
|
|
200
200
|
errorStateMessage: C,
|
|
201
201
|
emptyStateMessage: K,
|
|
202
202
|
dataTestId: "observations-table"
|
|
@@ -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-C9Y39EYu.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|
|
@@ -106901,7 +106901,7 @@ I90();
|
|
|
106901
106901
|
const B90 = [];
|
|
106902
106902
|
for (let t = 0; t < 256; ++t)
|
|
106903
106903
|
B90.push((t + 256).toString(16).slice(1));
|
|
106904
|
-
R0(() => Promise.resolve().then(() => na0)), R0(() => Promise.resolve().then(() => La0)), R0(() => Promise.resolve().then(() => sc0)), R0(() => Promise.resolve().then(() => wc0)), R0(() => import("./DocumentsTable-
|
|
106904
|
+
R0(() => Promise.resolve().then(() => na0)), R0(() => Promise.resolve().then(() => La0)), R0(() => Promise.resolve().then(() => sc0)), R0(() => Promise.resolve().then(() => wc0)), R0(() => import("./DocumentsTable-CHqKtoG4-TVNgZWt9.js")), R0(() => Promise.resolve().then(() => ms0)), R0(() => import("./FormsTable-Crz5nzU3-Dbpsv60C.js")), R0(() => Promise.resolve().then(() => Yi0)), R0(() => import("./Observations-CHjSKw9X-DCtceCpI.js")), R0(
|
|
106905
106905
|
() => Promise.resolve().then(() => Qs0)
|
|
106906
106906
|
), R0(
|
|
106907
106907
|
() => Promise.resolve().then(() => vi0)
|
|
@@ -195145,7 +195145,7 @@ var abt = (t, e = !1) => {
|
|
|
195145
195145
|
const e = Wa2(() => {
|
|
195146
195146
|
const r = this, [o] = this.#n, [a] = this.#o, [c] = this.#a, [l] = this.#c, [i] = this.#p, [s] = this.#e;
|
|
195147
195147
|
let d;
|
|
195148
|
-
return this.#l ? d = this.#l : (d = qa2(() => import("./LNWAZHJI-
|
|
195148
|
+
return this.#l ? d = this.#l : (d = qa2(() => import("./LNWAZHJI-BDHWcl0N.js")), this.#l = d), hc2(this.#h, this.#r), ja2(d, Fa2({
|
|
195149
195149
|
get queryFlavor() {
|
|
195150
195150
|
return r.#d;
|
|
195151
195151
|
},
|
|
@@ -195243,7 +195243,7 @@ var abt = (t, e = !1) => {
|
|
|
195243
195243
|
const e = Wa2(() => {
|
|
195244
195244
|
const r = this, [o] = this.#n, [a] = this.#o, [c] = this.#a, [l] = this.#c, [i] = this.#p, [s] = this.#e, [d] = this.#l;
|
|
195245
195245
|
let u;
|
|
195246
|
-
return this.#i ? u = this.#i : (u = qa2(() => import("./MWZ6AO7Z-
|
|
195246
|
+
return this.#i ? u = this.#i : (u = qa2(() => import("./MWZ6AO7Z-BSs-P-OB.js")), this.#i = u), hc2(this.#h, this.#r), ja2(u, Fa2({
|
|
195247
195247
|
get queryFlavor() {
|
|
195248
195248
|
return r.#d;
|
|
195249
195249
|
},
|
|
@@ -195403,11 +195403,11 @@ const RVt = {
|
|
|
195403
195403
|
}), GVt = R0(
|
|
195404
195404
|
() => import("./index-CFigb5vF.js").then((t) => ({ default: t.IndexPage }))
|
|
195405
195405
|
), YVt = R0(
|
|
195406
|
-
() => import("./index-
|
|
195406
|
+
() => import("./index-DC5e3wD2.js").then((t) => ({
|
|
195407
195407
|
default: t.default
|
|
195408
195408
|
}))
|
|
195409
195409
|
), JVt = R0(
|
|
195410
|
-
() => import("./index-
|
|
195410
|
+
() => import("./index-DAXJhipW.js").then((t) => ({
|
|
195411
195411
|
default: t.default
|
|
195412
195412
|
}))
|
|
195413
195413
|
), XVt = [
|
|
@@ -195450,34 +195450,34 @@ function dbt() {
|
|
|
195450
195450
|
}
|
|
195451
195451
|
export {
|
|
195452
195452
|
es as $,
|
|
195453
|
-
|
|
195454
|
-
|
|
195453
|
+
jzt as A,
|
|
195454
|
+
mHt as B,
|
|
195455
195455
|
xHt as C,
|
|
195456
|
-
|
|
195456
|
+
Oxt as D,
|
|
195457
195457
|
uM as E,
|
|
195458
195458
|
jz as F,
|
|
195459
|
-
|
|
195460
|
-
|
|
195461
|
-
|
|
195459
|
+
xxt as G,
|
|
195460
|
+
Zzt as H,
|
|
195461
|
+
tyt as I,
|
|
195462
195462
|
Zc as J,
|
|
195463
195463
|
$r as K,
|
|
195464
|
-
|
|
195465
|
-
|
|
195466
|
-
|
|
195467
|
-
|
|
195468
|
-
|
|
195469
|
-
|
|
195464
|
+
Wzt as L,
|
|
195465
|
+
Izt as M,
|
|
195466
|
+
W90 as N,
|
|
195467
|
+
Vxt as O,
|
|
195468
|
+
YB0 as P,
|
|
195469
|
+
NJ2 as Q,
|
|
195470
195470
|
hY1 as R,
|
|
195471
195471
|
Qi as S,
|
|
195472
|
-
|
|
195472
|
+
Uzt as T,
|
|
195473
195473
|
lt as U,
|
|
195474
|
-
|
|
195475
|
-
|
|
195474
|
+
kzt as V,
|
|
195475
|
+
szt as W,
|
|
195476
195476
|
uxt as X,
|
|
195477
195477
|
wM as Y,
|
|
195478
195478
|
mxt as Z,
|
|
195479
|
-
|
|
195480
|
-
|
|
195479
|
+
dxt as _,
|
|
195480
|
+
a2 as a,
|
|
195481
195481
|
Fxt as a$,
|
|
195482
195482
|
gxt as a0,
|
|
195483
195483
|
bf0 as a1,
|
|
@@ -195542,7 +195542,7 @@ export {
|
|
|
195542
195542
|
Gxt as ax,
|
|
195543
195543
|
fg as ay,
|
|
195544
195544
|
c4 as az,
|
|
195545
|
-
|
|
195545
|
+
as as b,
|
|
195546
195546
|
n8 as b0,
|
|
195547
195547
|
Byt as b1,
|
|
195548
195548
|
Qxt as b2,
|
|
@@ -195553,28 +195553,28 @@ export {
|
|
|
195553
195553
|
Xxt as b7,
|
|
195554
195554
|
uyt as b8,
|
|
195555
195555
|
dbt as b9,
|
|
195556
|
-
|
|
195557
|
-
|
|
195558
|
-
|
|
195559
|
-
|
|
195556
|
+
Ozt as c,
|
|
195557
|
+
kJ2 as d,
|
|
195558
|
+
an as e,
|
|
195559
|
+
$zt as f,
|
|
195560
195560
|
Kt as g,
|
|
195561
|
-
|
|
195562
|
-
|
|
195563
|
-
|
|
195564
|
-
|
|
195561
|
+
Gi as h,
|
|
195562
|
+
_zt as i,
|
|
195563
|
+
Tzt as j,
|
|
195564
|
+
Bzt as k,
|
|
195565
195565
|
uE as l,
|
|
195566
|
-
|
|
195567
|
-
|
|
195566
|
+
Dzt as m,
|
|
195567
|
+
TB2 as n,
|
|
195568
195568
|
cF2 as o,
|
|
195569
195569
|
xt as p,
|
|
195570
|
-
|
|
195571
|
-
|
|
195570
|
+
vF2 as q,
|
|
195571
|
+
dF2 as r,
|
|
195572
195572
|
Ut as s,
|
|
195573
195573
|
Hg as t,
|
|
195574
195574
|
E2 as u,
|
|
195575
195575
|
aVe as v,
|
|
195576
|
-
|
|
195577
|
-
|
|
195578
|
-
|
|
195579
|
-
|
|
195576
|
+
kl as w,
|
|
195577
|
+
Pzt as x,
|
|
195578
|
+
IVt as y,
|
|
195579
|
+
Im0 as z
|
|
195580
195580
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as r, jsxs as p } from "react/jsx-runtime";
|
|
2
|
-
import { Z as f, a0 as B, a1 as O, a2 as V, a3 as X, a4 as ee, a5 as te, a6 as ie,
|
|
2
|
+
import { Z as f, a0 as B, a1 as O, a2 as V, a3 as X, 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 k, ah as x, ai as H, J as oe, K as de, z as $, aj as ce, B as me, ak as Ae, al as Ie, am as ue, G as _e, I as Te, N as Le } from "./index-C9Y39EYu.js";
|
|
3
3
|
import { useState as g, useMemo as N, useEffect as h, 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 = () => {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as a, jsxs as y } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { L as V, y as O, u as I, F as P, C as h, K as B, J as G, z as A, _ as x, B as U, D as F, G as H, I as q, N as K, O as j, P as k, X as Q } from "./index-C9Y39EYu.js";
|
|
3
3
|
import { useState as C, useMemo as c } from "react";
|
|
4
|
-
import { useQueryClient as
|
|
5
|
-
const
|
|
4
|
+
import { useQueryClient as $, useQuery as W } from "@tanstack/react-query";
|
|
5
|
+
const Y = V(
|
|
6
6
|
O,
|
|
7
7
|
"useAppointmentsConfig",
|
|
8
8
|
"AppointmentsConfigProvider"
|
|
9
|
-
),
|
|
9
|
+
), w = ({
|
|
10
10
|
serviceName: e,
|
|
11
11
|
isDeleting: i,
|
|
12
12
|
onConfirm: t,
|
|
@@ -36,7 +36,7 @@ const z = V(
|
|
|
36
36
|
"speciality",
|
|
37
37
|
"durationMins",
|
|
38
38
|
"description"
|
|
39
|
-
],
|
|
39
|
+
], z = "app:appointments:manageServices", J = "app:appointments:adminTab", Z = "index-module_page__Gsfbu", X = "index-module_noPrivilegeContainer__Pu5WZ", ee = "index-module_table__GAPmb", d = {
|
|
40
40
|
page: Z,
|
|
41
41
|
noPrivilegeContainer: X,
|
|
42
42
|
table: ee
|
|
@@ -75,28 +75,28 @@ function ae(e, i) {
|
|
|
75
75
|
}));
|
|
76
76
|
}
|
|
77
77
|
const oe = () => {
|
|
78
|
-
const { t: e } = I(), i =
|
|
78
|
+
const { t: e } = I(), i = $(), { addNotification: t } = B(), { userPrivileges: s } = G(), { appointmentsConfig: n } = Y(), [E, _] = C(null), [b, p] = C(!1), l = n?.serviceTableFields ?? [
|
|
79
79
|
...u
|
|
80
|
-
], m =
|
|
80
|
+
], m = A(s, J), M = A(
|
|
81
81
|
s,
|
|
82
|
-
|
|
82
|
+
z
|
|
83
83
|
), S = c(
|
|
84
84
|
() => te(l),
|
|
85
85
|
[l]
|
|
86
|
-
), { data:
|
|
86
|
+
), { data: L, isLoading: v, isError: D } = W({
|
|
87
87
|
queryKey: ["allAppointmentServices"],
|
|
88
88
|
queryFn: x,
|
|
89
89
|
enabled: m
|
|
90
|
-
}),
|
|
90
|
+
}), N = c(
|
|
91
91
|
() => ie(l, e),
|
|
92
92
|
[l]
|
|
93
|
-
),
|
|
94
|
-
() => ae(
|
|
95
|
-
[
|
|
93
|
+
), R = c(
|
|
94
|
+
() => ae(L ?? [], S),
|
|
95
|
+
[L, S]
|
|
96
96
|
), g = async () => {
|
|
97
97
|
p(!0);
|
|
98
98
|
try {
|
|
99
|
-
await
|
|
99
|
+
await Q(E.id), t({
|
|
100
100
|
title: e("ADMIN_ALL_SERVICES_DELETE_SUCCESS_TITLE"),
|
|
101
101
|
message: e("ADMIN_ALL_SERVICES_DELETE_SUCCESS_MESSAGE"),
|
|
102
102
|
type: "success",
|
|
@@ -112,7 +112,7 @@ const oe = () => {
|
|
|
112
112
|
p(!1);
|
|
113
113
|
}
|
|
114
114
|
}, T = (r, o) => o === "actions" ? /* @__PURE__ */ a(
|
|
115
|
-
|
|
115
|
+
j,
|
|
116
116
|
{
|
|
117
117
|
id: `delete-service-${r.id}-btn`,
|
|
118
118
|
testId: `delete-service-${r.id}-btn-test-id`,
|
|
@@ -121,7 +121,7 @@ const oe = () => {
|
|
|
121
121
|
label: e("ADMIN_ALL_SERVICES_DELETE_ICON_LABEL"),
|
|
122
122
|
disabled: !M,
|
|
123
123
|
onClick: () => _(r),
|
|
124
|
-
children: /* @__PURE__ */ a(
|
|
124
|
+
children: /* @__PURE__ */ a(k, {})
|
|
125
125
|
}
|
|
126
126
|
) : u.includes(o) ? r[o] ?? "-" : r.attributes[o] ?? "-", f = [
|
|
127
127
|
{ id: "home", label: e("BREADCRUMB_HOME"), href: U },
|
|
@@ -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,
|
|
@@ -155,7 +155,7 @@ const oe = () => {
|
|
|
155
155
|
}
|
|
156
156
|
),
|
|
157
157
|
E && /* @__PURE__ */ a(
|
|
158
|
-
|
|
158
|
+
w,
|
|
159
159
|
{
|
|
160
160
|
serviceName: E.name,
|
|
161
161
|
isDeleting: b,
|
package/dist/index.js
CHANGED