@bahmni/clinical-app 0.0.1-dev.349 → 0.0.1-dev.351
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/{ConsultationPage-3qK8RV6o.js → ConsultationPage-B1R3tOYy.js} +7421 -7414
- package/dist/{DocumentsTable-CUERw540-DNwq47jg.js → DocumentsTable-Coa5XzQ2-J1_v3YXX.js} +34 -34
- package/dist/{FormsTable-BiSt9X9y-GfSnOhAP.js → FormsTable-EUYG9eiE-C8zIDz6W.js} +73 -73
- package/dist/{LNWAZHJI-DklJAly_.js → LNWAZHJI-B5S9GjFk.js} +2 -2
- package/dist/{MWZ6AO7Z-pJNxlx6T.js → MWZ6AO7Z-jUP35wPA.js} +2 -2
- package/dist/{Observations-DG-AmCpd-BuJ3kLZo.js → Observations-DbnQKYME-hQ4qeOY0.js} +73 -73
- package/dist/{YPM2AS64-CWWMfFV2.js → YPM2AS64-BiN3i_MG.js} +181 -181
- package/dist/components/dashboardSection/DashboardSection.d.ts.map +1 -1
- package/dist/{hook-Dfbe9Yfh.js → hook-CcvJOz2O.js} +1 -1
- package/dist/hooks/useEncounterSession.d.ts.map +1 -1
- package/dist/{index-BmPRpoe2.js → index-B9zeDDla.js} +16 -16
- package/dist/{index-aVz5vm6R.js → index-BUeio6DV.js} +35084 -34826
- package/dist/{index-DhSka-Il.js → index-BofloRYy.js} +3 -3
- package/dist/index.js +1 -1
- package/dist/locales/locale_en.json +2 -0
- package/dist/locales/locale_es.json +2 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as r, jsxs as h, Fragment as x } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { m as G, u as W, o as X, K as Y, X as J, g as Z, Q as ee, a as te } from "./index-BUeio6DV.js";
|
|
3
3
|
import { useQuery as ae } from "@tanstack/react-query";
|
|
4
|
-
import { useState as l, useCallback as _, useEffect as
|
|
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 = {
|
|
6
6
|
documentsTableBody: ne,
|
|
7
7
|
viewAttachmentsLink: oe,
|
|
@@ -21,10 +21,10 @@ const ne = "DocumentsTable-module_documentsTableBody__6iR3w", oe = "DocumentsTab
|
|
|
21
21
|
function R(a) {
|
|
22
22
|
return !a || a.includes(":") ? "#" : `/openmrs/auth?requested_document=/document_images/${a}`;
|
|
23
23
|
}
|
|
24
|
-
function ie(a,
|
|
24
|
+
function ie(a, g) {
|
|
25
25
|
return a.map((s) => ({
|
|
26
26
|
key: s,
|
|
27
|
-
header:
|
|
27
|
+
header: g(ue[s])
|
|
28
28
|
}));
|
|
29
29
|
}
|
|
30
30
|
const Te = [
|
|
@@ -33,44 +33,44 @@ const Te = [
|
|
|
33
33
|
"attachments",
|
|
34
34
|
"uploadedOn",
|
|
35
35
|
"uploadedBy"
|
|
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 }] : [],
|
|
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 }] : [], Ne = ({ config: a, encounterUuids: g }) => {
|
|
37
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 } = W(), { addNotification: L } = X(), 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
|
}, []), q = _(() => {
|
|
44
|
-
w(!1), U(null),
|
|
44
|
+
w(!1), U(null), O(/* @__PURE__ */ new Set());
|
|
45
45
|
}, []), v = _((e) => {
|
|
46
|
-
|
|
46
|
+
O((t) => new Set(t).add(e));
|
|
47
47
|
}, []), { data: i, isLoading: H, isError: b, error: y } = ae({
|
|
48
48
|
queryKey: [
|
|
49
49
|
"documents",
|
|
50
|
-
g,
|
|
51
50
|
E,
|
|
52
|
-
|
|
51
|
+
g,
|
|
52
|
+
f,
|
|
53
53
|
u
|
|
54
54
|
],
|
|
55
|
-
enabled: !!
|
|
55
|
+
enabled: !!E,
|
|
56
56
|
queryFn: () => Y(
|
|
57
|
-
g,
|
|
58
57
|
E,
|
|
58
|
+
g,
|
|
59
59
|
u,
|
|
60
|
-
|
|
60
|
+
f
|
|
61
61
|
)
|
|
62
62
|
});
|
|
63
|
-
|
|
63
|
+
I(() => {
|
|
64
64
|
i && A(i.total);
|
|
65
|
-
}, [i]),
|
|
65
|
+
}, [i]), I(() => {
|
|
66
66
|
C(1), A(void 0);
|
|
67
|
-
}, [
|
|
67
|
+
}, [E]), I(() => {
|
|
68
68
|
b && L({
|
|
69
69
|
title: n("ERROR_DEFAULT_TITLE"),
|
|
70
70
|
message: y?.message ?? "",
|
|
71
71
|
type: "error"
|
|
72
72
|
});
|
|
73
|
-
}, [b, y, L, n]),
|
|
73
|
+
}, [b, y, L, n]), I(() => {
|
|
74
74
|
const e = new AbortController();
|
|
75
75
|
return (async () => {
|
|
76
76
|
if (!s || !o) return;
|
|
@@ -82,31 +82,31 @@ const Te = [
|
|
|
82
82
|
method: "HEAD",
|
|
83
83
|
signal: e.signal
|
|
84
84
|
})).ok || t.add(c);
|
|
85
|
-
} catch (
|
|
86
|
-
|
|
85
|
+
} catch (D) {
|
|
86
|
+
D instanceof Error && D.name !== "AbortError" && t.add(c);
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
-
e.signal.aborted ||
|
|
89
|
+
e.signal.aborted || O(t);
|
|
90
90
|
})(), () => e.abort();
|
|
91
91
|
}, [s, o]);
|
|
92
|
-
const
|
|
92
|
+
const K = _(
|
|
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(
|
|
98
98
|
() => a?.fields ?? Te,
|
|
99
99
|
[a?.fields]
|
|
100
|
-
), Q = p(() => [...i?.documents ?? []].sort((e, t) => !e.uploadedOn && !t.uploadedOn ? 0 : e.uploadedOn ? t.uploadedOn ? new Date(t.uploadedOn).getTime() - new Date(e.uploadedOn).getTime() : -1 : 1), [i]), j = p(() => ie(
|
|
101
|
-
() =>
|
|
100
|
+
), Q = p(() => [...i?.documents ?? []].sort((e, t) => !e.uploadedOn && !t.uploadedOn ? 0 : e.uploadedOn ? t.uploadedOn ? new Date(t.uploadedOn).getTime() - new Date(e.uploadedOn).getTime() : -1 : 1), [i]), j = p(() => ie(N, n), [N, n]), P = p(
|
|
101
|
+
() => N.map((e) => ({
|
|
102
102
|
key: e,
|
|
103
103
|
sortable: e !== "attachments"
|
|
104
104
|
})),
|
|
105
|
-
[
|
|
105
|
+
[N]
|
|
106
106
|
), T = p(
|
|
107
107
|
() => o ? B(o) : [],
|
|
108
108
|
[o]
|
|
109
|
-
),
|
|
109
|
+
), z = _(
|
|
110
110
|
(e, t) => {
|
|
111
111
|
switch (t) {
|
|
112
112
|
case "documentIdentifier":
|
|
@@ -148,13 +148,13 @@ const Te = [
|
|
|
148
148
|
errorStateMessage: b ? y?.message : null,
|
|
149
149
|
sortable: P,
|
|
150
150
|
emptyStateMessage: n("DOCUMENTS_NO_RECORDS"),
|
|
151
|
-
renderCell:
|
|
151
|
+
renderCell: z,
|
|
152
152
|
className: d.documentsTableBody,
|
|
153
153
|
dataTestId: "documents-table",
|
|
154
154
|
pageSize: u,
|
|
155
155
|
totalItems: F,
|
|
156
|
-
page:
|
|
157
|
-
onPageChange:
|
|
156
|
+
page: f,
|
|
157
|
+
onPageChange: K
|
|
158
158
|
}
|
|
159
159
|
) }),
|
|
160
160
|
s && o && /* @__PURE__ */ r(
|
|
@@ -169,8 +169,8 @@ 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"), S = (e.contentType?.toLowerCase().includes("image") ?? !1) || he.test(e.url ?? ""),
|
|
173
|
-
return m === "#" ||
|
|
172
|
+
const m = R(e.url), c = e.contentType?.toLowerCase().includes("pdf"), S = (e.contentType?.toLowerCase().includes("image") ?? !1) || he.test(e.url ?? ""), D = $.has(t);
|
|
173
|
+
return m === "#" || D ? /* @__PURE__ */ h(
|
|
174
174
|
"div",
|
|
175
175
|
{
|
|
176
176
|
className: d.attachmentError,
|
|
@@ -223,5 +223,5 @@ const Te = [
|
|
|
223
223
|
] });
|
|
224
224
|
};
|
|
225
225
|
export {
|
|
226
|
-
|
|
226
|
+
Ne as default
|
|
227
227
|
};
|
|
@@ -1,93 +1,93 @@
|
|
|
1
|
-
import { jsx as i, jsxs as
|
|
2
|
-
import { u as ge,
|
|
3
|
-
import { useQueryClient as
|
|
1
|
+
import { jsx as i, jsxs as G, Fragment as he } from "react/jsx-runtime";
|
|
2
|
+
import { u as ge, m as pe, i as Oe, H as Ne, b as be, q as Te, O as Ee, W as Ie, y as Ae, G as _e, l as ve, e as Fe, n as Q, g as Re, E as z, c as x, X as Se, Q as P, d as Me, f as Ce, a as Be, R as Le, h as Ue } from "./index-BUeio6DV.js";
|
|
3
|
+
import { useQueryClient as qe, useQuery as b } from "@tanstack/react-query";
|
|
4
4
|
import { useState as X, useMemo as d, useCallback as l } from "react";
|
|
5
|
-
const
|
|
6
|
-
formsTableBody:
|
|
5
|
+
const De = "FormsTable-module_formsTableBody__SvGha", ke = "FormsTable-module_modalHeading__wnTmA", He = "FormsTable-module_customAccordianItem__isszs", T = {
|
|
6
|
+
formsTableBody: De,
|
|
7
7
|
modalHeading: ke,
|
|
8
|
-
customAccordianItem:
|
|
9
|
-
},
|
|
8
|
+
customAccordianItem: He
|
|
9
|
+
}, we = "startConsultation", Ge = ({
|
|
10
10
|
episodeOfCareUuids: S,
|
|
11
11
|
encounterUuids: u,
|
|
12
|
-
config:
|
|
13
|
-
disableActions:
|
|
12
|
+
config: W,
|
|
13
|
+
disableActions: Y = !1,
|
|
14
14
|
activeEncounterUuid: h = null
|
|
15
15
|
}) => {
|
|
16
|
-
const { t: n } = ge(), c = pe(), [g,
|
|
16
|
+
const { t: n } = ge(), c = pe(), [g, M] = X(!1), [s, C] = X(null), {
|
|
17
17
|
numberOfVisits: Z,
|
|
18
18
|
hideThumbnail: J = !1,
|
|
19
19
|
forms: p
|
|
20
|
-
} =
|
|
21
|
-
|
|
22
|
-
), { userPrivileges:
|
|
20
|
+
} = W ?? {}, ee = Oe(
|
|
21
|
+
Ue.EDIT_OBSERVATIONS
|
|
22
|
+
), { userPrivileges: O } = Ne(), E = ee && !Y && !!h, B = be(
|
|
23
23
|
S,
|
|
24
24
|
u
|
|
25
|
-
), re =
|
|
26
|
-
data:
|
|
27
|
-
isLoading:
|
|
28
|
-
isError:
|
|
25
|
+
), re = qe(), {
|
|
26
|
+
data: L = [],
|
|
27
|
+
isLoading: U,
|
|
28
|
+
isError: q,
|
|
29
29
|
error: ae,
|
|
30
30
|
refetch: oe
|
|
31
|
-
} =
|
|
31
|
+
} = b({
|
|
32
32
|
queryKey: ["forms", c, S],
|
|
33
|
-
queryFn: () =>
|
|
34
|
-
enabled: !!c && !
|
|
35
|
-
}),
|
|
36
|
-
let e =
|
|
33
|
+
queryFn: () => Te(c, void 0, Z),
|
|
34
|
+
enabled: !!c && !B
|
|
35
|
+
}), D = d(() => {
|
|
36
|
+
let e = L;
|
|
37
37
|
return u && u.length > 0 && (e = e.filter(
|
|
38
38
|
(r) => u.includes(r.encounterUuid)
|
|
39
39
|
)), Array.isArray(p) && p.length > 0 && (e = e.filter(
|
|
40
40
|
(r) => p.some((a) => a.toLowerCase() === r.formName.toLowerCase())
|
|
41
41
|
)), e;
|
|
42
|
-
}, [
|
|
42
|
+
}, [L, u, p]), { data: N = [] } = b({
|
|
43
43
|
queryKey: ["observationForms"],
|
|
44
44
|
queryFn: () => Ee()
|
|
45
45
|
}), k = l(
|
|
46
46
|
(e) => {
|
|
47
|
-
const r =
|
|
47
|
+
const r = N.find((o) => o.name === e);
|
|
48
48
|
if (!r?.privileges || r.privileges.length === 0) return !0;
|
|
49
|
-
if (!
|
|
50
|
-
const a = new Set(
|
|
49
|
+
if (!O || O.length === 0) return !1;
|
|
50
|
+
const a = new Set(O.map((o) => o.name));
|
|
51
51
|
return r.privileges.some(
|
|
52
52
|
(o) => a.has(o.privilegeName) && o.editable
|
|
53
53
|
);
|
|
54
54
|
},
|
|
55
|
-
[
|
|
55
|
+
[N, O]
|
|
56
56
|
), f = l(
|
|
57
57
|
(e) => !h || e.encounterUuid !== h ? !1 : k(e.formName),
|
|
58
58
|
[h, k]
|
|
59
|
-
),
|
|
60
|
-
(e) =>
|
|
61
|
-
[
|
|
59
|
+
), H = 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 H(s.formName);
|
|
65
|
+
}, [s, H]), {
|
|
66
66
|
data: m,
|
|
67
67
|
isLoading: te,
|
|
68
68
|
isError: se,
|
|
69
|
-
error:
|
|
70
|
-
} =
|
|
69
|
+
error: A
|
|
70
|
+
} = b({
|
|
71
71
|
queryKey: ["formMetadata", I],
|
|
72
72
|
queryFn: () => Ie(I),
|
|
73
73
|
enabled: !!I && g
|
|
74
74
|
}), {
|
|
75
|
-
data:
|
|
75
|
+
data: _,
|
|
76
76
|
isLoading: ne,
|
|
77
77
|
isError: ie,
|
|
78
78
|
error: v
|
|
79
|
-
} =
|
|
79
|
+
} = b({
|
|
80
80
|
queryKey: ["formsEncounterFHIR", s?.encounterUuid],
|
|
81
|
-
queryFn: () =>
|
|
81
|
+
queryFn: () => Ae(s.encounterUuid),
|
|
82
82
|
enabled: !!s?.encounterUuid && g
|
|
83
83
|
});
|
|
84
|
-
|
|
84
|
+
_e(
|
|
85
85
|
(e) => {
|
|
86
86
|
e.patientUUID === c && e.updatedConcepts.size > 0 && (oe(), re.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
87
87
|
},
|
|
88
88
|
[c]
|
|
89
89
|
);
|
|
90
|
-
const de = d(() => !
|
|
90
|
+
const de = d(() => !_?.entry || !s?.formName ? [] : _.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => ve(e) ? Fe(e)?.toLowerCase() === s.formName.toLowerCase() : !0), [_, s?.formName]), le = d(() => {
|
|
91
91
|
if (!m?.schema) return;
|
|
92
92
|
const e = [], r = (a) => {
|
|
93
93
|
(a ?? []).forEach((o) => {
|
|
@@ -103,8 +103,8 @@ const qe = "FormsTable-module_formsTableBody__SvGha", ke = "FormsTable-module_mo
|
|
|
103
103
|
const e = {}, r = (a, o) => {
|
|
104
104
|
for (const t of a)
|
|
105
105
|
if (t.type === "section") {
|
|
106
|
-
const
|
|
107
|
-
r(t.controls ?? [],
|
|
106
|
+
const R = t.label?.value ?? "Section";
|
|
107
|
+
r(t.controls ?? [], R);
|
|
108
108
|
} else
|
|
109
109
|
t.id != null && o && (e[String(t.id)] = o), t.controls && r(t.controls, o);
|
|
110
110
|
};
|
|
@@ -113,38 +113,38 @@ const qe = "FormsTable-module_formsTableBody__SvGha", ke = "FormsTable-module_mo
|
|
|
113
113
|
null
|
|
114
114
|
), Object.keys(e).length > 0 ? e : void 0;
|
|
115
115
|
}, [m]), ue = d(() => {
|
|
116
|
-
if (
|
|
117
|
-
return
|
|
116
|
+
if (A)
|
|
117
|
+
return Q(A).message;
|
|
118
118
|
if (v)
|
|
119
|
-
return
|
|
120
|
-
}, [
|
|
119
|
+
return Q(v).message;
|
|
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
|
-
),
|
|
126
|
+
), w = d(
|
|
127
127
|
() => [...y, { key: "actions", header: n("ACTIONS") }],
|
|
128
128
|
[y, n]
|
|
129
129
|
), ce = l(
|
|
130
|
-
(e) => E && e.some((r) => f(r)) ?
|
|
131
|
-
[E, f,
|
|
130
|
+
(e) => E && e.some((r) => f(r)) ? w : y,
|
|
131
|
+
[E, f, w, y]
|
|
132
132
|
), fe = y, ye = d(
|
|
133
133
|
() => [
|
|
134
134
|
{ key: "recordedOn", sortable: !0 },
|
|
135
135
|
{ key: "recordedBy", sortable: !0 }
|
|
136
136
|
],
|
|
137
137
|
[]
|
|
138
|
-
),
|
|
139
|
-
const e =
|
|
138
|
+
), V = d(() => {
|
|
139
|
+
const e = D.reduce(
|
|
140
140
|
(r, a) => {
|
|
141
141
|
const o = a.formName;
|
|
142
142
|
r[o] ??= [];
|
|
143
|
-
const t = a.providers.map((
|
|
143
|
+
const t = a.providers.map((R) => R.providerName).filter(Boolean).join(", ");
|
|
144
144
|
return r[o].push({
|
|
145
145
|
id: a.encounterUuid,
|
|
146
146
|
formName: a.formName,
|
|
147
|
-
recordedOn:
|
|
147
|
+
recordedOn: Re(a.encounterDateTime, n, !0).formattedResult,
|
|
148
148
|
recordedBy: t ?? "--",
|
|
149
149
|
encounterDateTime: a.encounterDateTime,
|
|
150
150
|
encounterUuid: a.encounterUuid
|
|
@@ -160,13 +160,13 @@ const qe = "FormsTable-module_formsTableBody__SvGha", ke = "FormsTable-module_mo
|
|
|
160
160
|
)
|
|
161
161
|
})
|
|
162
162
|
).sort((r, a) => r.formName.localeCompare(a.formName));
|
|
163
|
-
}, [
|
|
164
|
-
|
|
163
|
+
}, [D, n]), K = l((e) => {
|
|
164
|
+
C(e), M(!0);
|
|
165
165
|
}, []), $ = l(() => {
|
|
166
|
-
|
|
166
|
+
M(!1), C(null);
|
|
167
167
|
}, []), F = l((e) => {
|
|
168
168
|
globalThis.dispatchEvent(
|
|
169
|
-
new CustomEvent(
|
|
169
|
+
new CustomEvent(we, {
|
|
170
170
|
detail: {
|
|
171
171
|
editOnly: "observationForms",
|
|
172
172
|
editTitle: "EDIT_OBSERVATION_FORM_TITLE",
|
|
@@ -180,12 +180,12 @@ const qe = "FormsTable-module_formsTableBody__SvGha", ke = "FormsTable-module_mo
|
|
|
180
180
|
(e, r) => {
|
|
181
181
|
switch (r) {
|
|
182
182
|
case "recordedOn":
|
|
183
|
-
return /* @__PURE__ */ i(Se, { onClick: () =>
|
|
183
|
+
return /* @__PURE__ */ i(Se, { onClick: () => K(e), children: e.recordedOn });
|
|
184
184
|
case "recordedBy":
|
|
185
185
|
return e.recordedBy;
|
|
186
186
|
case "actions":
|
|
187
187
|
return f(e) ? /* @__PURE__ */ i(
|
|
188
|
-
|
|
188
|
+
z,
|
|
189
189
|
{
|
|
190
190
|
label: n("EDIT_OBSERVATION_FORM"),
|
|
191
191
|
kind: "ghost",
|
|
@@ -199,29 +199,29 @@ const qe = "FormsTable-module_formsTableBody__SvGha", ke = "FormsTable-module_mo
|
|
|
199
199
|
return null;
|
|
200
200
|
}
|
|
201
201
|
},
|
|
202
|
-
[
|
|
202
|
+
[K, F, f, n]
|
|
203
203
|
);
|
|
204
|
-
return /* @__PURE__ */
|
|
205
|
-
/* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children:
|
|
204
|
+
return /* @__PURE__ */ G(he, { children: [
|
|
205
|
+
/* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: U || q || V.length === 0 || B ? /* @__PURE__ */ i(
|
|
206
206
|
P,
|
|
207
207
|
{
|
|
208
208
|
headers: fe,
|
|
209
209
|
ariaLabel: n("FORMS_HEADING"),
|
|
210
210
|
rows: [],
|
|
211
|
-
loading:
|
|
212
|
-
errorStateMessage:
|
|
211
|
+
loading: U,
|
|
212
|
+
errorStateMessage: q ? ae?.message : void 0,
|
|
213
213
|
emptyStateMessage: n("FORMS_UNAVAILABLE"),
|
|
214
214
|
renderCell: j,
|
|
215
|
-
className:
|
|
215
|
+
className: T.formsTableBody,
|
|
216
216
|
dataTestId: "forms-table"
|
|
217
217
|
}
|
|
218
|
-
) : /* @__PURE__ */ i(
|
|
218
|
+
) : /* @__PURE__ */ i(Me, { align: "start", children: V.map((e, r) => {
|
|
219
219
|
const { formName: a, records: o } = e, t = ce(o);
|
|
220
220
|
return /* @__PURE__ */ i(
|
|
221
|
-
|
|
221
|
+
Ce,
|
|
222
222
|
{
|
|
223
223
|
title: a,
|
|
224
|
-
className:
|
|
224
|
+
className: T.customAccordianItem,
|
|
225
225
|
testId: `accordian-title-${a}`,
|
|
226
226
|
open: r === 0,
|
|
227
227
|
children: /* @__PURE__ */ i(
|
|
@@ -235,7 +235,7 @@ const qe = "FormsTable-module_formsTableBody__SvGha", ke = "FormsTable-module_mo
|
|
|
235
235
|
sortable: ye,
|
|
236
236
|
emptyStateMessage: n("FORMS_UNAVAILABLE"),
|
|
237
237
|
renderCell: j,
|
|
238
|
-
className:
|
|
238
|
+
className: T.formsTableBody,
|
|
239
239
|
dataTestId: `forms-table-${a}`
|
|
240
240
|
}
|
|
241
241
|
)
|
|
@@ -244,16 +244,16 @@ const qe = "FormsTable-module_formsTableBody__SvGha", ke = "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
252
|
onRequestClose: $,
|
|
253
|
-
modalHeading: /* @__PURE__ */
|
|
253
|
+
modalHeading: /* @__PURE__ */ G("div", { className: T.modalHeading, children: [
|
|
254
254
|
/* @__PURE__ */ i("span", { children: s.formName }),
|
|
255
255
|
E && f(s) && /* @__PURE__ */ i(
|
|
256
|
-
|
|
256
|
+
z,
|
|
257
257
|
{
|
|
258
258
|
label: n("EDIT_OBSERVATION_FORM"),
|
|
259
259
|
kind: "ghost",
|
|
@@ -271,7 +271,7 @@ const qe = "FormsTable-module_formsTableBody__SvGha", ke = "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 qe = "FormsTable-module_formsTableBody__SvGha", ke = "FormsTable-module_mo
|
|
|
289
289
|
] });
|
|
290
290
|
};
|
|
291
291
|
export {
|
|
292
|
-
|
|
292
|
+
Ge 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 {
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-BiN3i_MG.js";
|
|
2
|
+
import { bO as d, bP as f, bQ as e } from "./index-BUeio6DV.js";
|
|
3
3
|
var p = (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 u, a as i, b as m, C as P, Q as d } from "./YPM2AS64-
|
|
2
|
-
import {
|
|
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-BiN3i_MG.js";
|
|
2
|
+
import { bO as v, bP as C, bQ as e } from "./index-BUeio6DV.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|