@bahmni/home-app 0.0.1-dev.270 → 0.0.1-dev.272
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-DEvlbfDU-DOf8A73N.js → DocumentsTable-CBd3EBSh-B4OHxuy5.js} +72 -72
- package/dist/{FormsTable-DBD0f2fD-Blmor6o1.js → FormsTable-DMJEteY7-CP90OJYg.js} +64 -64
- package/dist/{LNWAZHJI-C846sF0P.js → LNWAZHJI-BgY0XGmk.js} +2 -2
- package/dist/{MWZ6AO7Z-D3M0ORyB.js → MWZ6AO7Z-DLWYcD0I.js} +2 -2
- package/dist/{Observations-D6WZol9t-D4iyEESy.js → Observations-CKw5OQxh-DVOOzXG8.js} +62 -62
- package/dist/{YPM2AS64-B--5WOex.js → YPM2AS64-n7d56V9h.js} +138 -138
- package/dist/{index-DGdvkBtM.js → index-C41R8NHV.js} +213 -213
- package/dist/{index-DS-CiIQB.js → index-Dv1mIf-k.js} +167 -160
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,112 +1,112 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import { u as
|
|
1
|
+
import { jsx as r, jsxs as p, Fragment as x } from "react/jsx-runtime";
|
|
2
|
+
import { u as G, a as W, h as Y, t as J, b as X, m as Z, c as ee, n as te } from "./index-Dv1mIf-k.js";
|
|
3
3
|
import { useQuery as ae } from "@tanstack/react-query";
|
|
4
|
-
import { useState as
|
|
5
|
-
const ne = "
|
|
4
|
+
import { useState as l, useCallback as h, useEffect as O, useMemo as _ } from "react";
|
|
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", ce = "DocumentsTable-module_attachmentError__RI4U2", me = "DocumentsTable-module_documentIframe__ptq5I", le = "DocumentsTable-module_documentImage__KQVgS", d = {
|
|
6
6
|
documentsTableBody: ne,
|
|
7
7
|
viewAttachmentsLink: oe,
|
|
8
8
|
documentViewerContainer: re,
|
|
9
9
|
attachmentItem: de,
|
|
10
10
|
attachmentCounter: se,
|
|
11
11
|
attachmentError: ce,
|
|
12
|
-
documentIframe:
|
|
13
|
-
documentImage:
|
|
14
|
-
},
|
|
12
|
+
documentIframe: me,
|
|
13
|
+
documentImage: le
|
|
14
|
+
}, ue = {
|
|
15
15
|
documentIdentifier: "DOCUMENTS_DOCUMENT_IDENTIFIER",
|
|
16
16
|
documentType: "DOCUMENTS_TYPE",
|
|
17
17
|
uploadedOn: "DOCUMENTS_UPLOADED_ON",
|
|
18
18
|
uploadedBy: "DOCUMENTS_UPLOADED_BY",
|
|
19
19
|
action: "DOCUMENTS_ACTION"
|
|
20
20
|
};
|
|
21
|
-
function
|
|
21
|
+
function R(a) {
|
|
22
22
|
return !a || a.includes(":") ? "#" : `/openmrs/auth?requested_document=/document_images/${a}`;
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function ie(a, g) {
|
|
25
25
|
return a.map((s) => ({
|
|
26
26
|
key: s,
|
|
27
|
-
header: g(
|
|
27
|
+
header: g(ue[s])
|
|
28
28
|
}));
|
|
29
29
|
}
|
|
30
|
-
const
|
|
30
|
+
const Te = [
|
|
31
31
|
"documentIdentifier",
|
|
32
32
|
"documentType",
|
|
33
33
|
"uploadedOn",
|
|
34
34
|
"uploadedBy",
|
|
35
35
|
"action"
|
|
36
|
-
],
|
|
37
|
-
const [s, w] =
|
|
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 }] : [], Ie = ({ config: a, encounterUuids: g }) => {
|
|
37
|
+
const [s, w] = l(!1), [o, U] = l(
|
|
38
38
|
null
|
|
39
|
-
), [
|
|
39
|
+
), [$, D] = l(
|
|
40
40
|
/* @__PURE__ */ new Set()
|
|
41
|
-
), E =
|
|
42
|
-
|
|
43
|
-
}, []),
|
|
44
|
-
w(!1),
|
|
45
|
-
}, []),
|
|
46
|
-
|
|
47
|
-
}, []), { data:
|
|
41
|
+
), E = G(), { 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 = h((e) => {
|
|
42
|
+
U(e), w(!0);
|
|
43
|
+
}, []), q = h(() => {
|
|
44
|
+
w(!1), U(null), D(/* @__PURE__ */ new Set());
|
|
45
|
+
}, []), v = h((e) => {
|
|
46
|
+
D((t) => new Set(t).add(e));
|
|
47
|
+
}, []), { data: i, isLoading: H, isError: b, error: y } = ae({
|
|
48
48
|
queryKey: [
|
|
49
49
|
"documents",
|
|
50
50
|
E,
|
|
51
51
|
g,
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
f,
|
|
53
|
+
u
|
|
54
54
|
],
|
|
55
55
|
enabled: !!E,
|
|
56
56
|
queryFn: () => J(
|
|
57
57
|
E,
|
|
58
58
|
g,
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
u,
|
|
60
|
+
f
|
|
61
61
|
)
|
|
62
62
|
});
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}, [
|
|
66
|
-
|
|
67
|
-
}, [E]),
|
|
68
|
-
|
|
63
|
+
O(() => {
|
|
64
|
+
i && A(i.total);
|
|
65
|
+
}, [i]), O(() => {
|
|
66
|
+
C(1), A(void 0);
|
|
67
|
+
}, [E]), O(() => {
|
|
68
|
+
b && L({
|
|
69
69
|
title: n("ERROR_DEFAULT_TITLE"),
|
|
70
|
-
message:
|
|
70
|
+
message: y?.message ?? "",
|
|
71
71
|
type: "error"
|
|
72
72
|
});
|
|
73
|
-
}, [
|
|
73
|
+
}, [b, y, L, n]), O(() => {
|
|
74
74
|
const e = new AbortController();
|
|
75
75
|
return (async () => {
|
|
76
76
|
if (!s || !o) return;
|
|
77
77
|
const t = /* @__PURE__ */ new Set(), c = B(o);
|
|
78
|
-
for (let
|
|
79
|
-
const S =
|
|
78
|
+
for (let m = 0; m < c.length; m++) {
|
|
79
|
+
const S = R(c[m].url);
|
|
80
80
|
try {
|
|
81
81
|
(await fetch(S, {
|
|
82
82
|
method: "HEAD",
|
|
83
83
|
signal: e.signal
|
|
84
|
-
})).ok || t.add(
|
|
85
|
-
} catch (
|
|
86
|
-
|
|
84
|
+
})).ok || t.add(m);
|
|
85
|
+
} catch (N) {
|
|
86
|
+
N instanceof Error && N.name !== "AbortError" && t.add(m);
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
-
e.signal.aborted ||
|
|
89
|
+
e.signal.aborted || D(t);
|
|
90
90
|
})(), () => e.abort();
|
|
91
91
|
}, [s, o]);
|
|
92
|
-
const
|
|
92
|
+
const j = h(
|
|
93
93
|
(e, t) => {
|
|
94
|
-
t !==
|
|
94
|
+
t !== u ? (V(t), C(1), A(void 0)) : C(e);
|
|
95
95
|
},
|
|
96
|
-
[
|
|
97
|
-
),
|
|
98
|
-
() => a?.fields ??
|
|
96
|
+
[u]
|
|
97
|
+
), I = _(
|
|
98
|
+
() => a?.fields ?? Te,
|
|
99
99
|
[a?.fields]
|
|
100
|
-
), P =
|
|
101
|
-
() =>
|
|
100
|
+
), 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]), z = _(() => ie(I, n), [I, n]), K = _(
|
|
101
|
+
() => I.map((e) => ({
|
|
102
102
|
key: e,
|
|
103
103
|
sortable: e !== "action"
|
|
104
104
|
})),
|
|
105
|
-
[
|
|
106
|
-
),
|
|
105
|
+
[I]
|
|
106
|
+
), T = _(
|
|
107
107
|
() => o ? B(o) : [],
|
|
108
108
|
[o]
|
|
109
|
-
),
|
|
109
|
+
), Q = h(
|
|
110
110
|
(e, t) => {
|
|
111
111
|
switch (t) {
|
|
112
112
|
case "documentIdentifier":
|
|
@@ -125,7 +125,7 @@ const _e = [
|
|
|
125
125
|
return e.attachments.length > 0 || e.documentUrl ? /* @__PURE__ */ r(
|
|
126
126
|
X,
|
|
127
127
|
{
|
|
128
|
-
onClick: () =>
|
|
128
|
+
onClick: () => M(e),
|
|
129
129
|
className: d.viewAttachmentsLink,
|
|
130
130
|
"data-testid": `view-attachments-${e.id}`,
|
|
131
131
|
children: n("DOCUMENTS_VIEW_ATTACHMENTS")
|
|
@@ -135,9 +135,9 @@ const _e = [
|
|
|
135
135
|
return null;
|
|
136
136
|
}
|
|
137
137
|
},
|
|
138
|
-
[
|
|
138
|
+
[M, n]
|
|
139
139
|
);
|
|
140
|
-
return /* @__PURE__ */
|
|
140
|
+
return /* @__PURE__ */ p(x, { children: [
|
|
141
141
|
/* @__PURE__ */ r("div", { "data-testid": "documents-table", children: /* @__PURE__ */ r(
|
|
142
142
|
ee,
|
|
143
143
|
{
|
|
@@ -145,16 +145,16 @@ const _e = [
|
|
|
145
145
|
ariaLabel: n("DOCUMENTS_TABLE_HEADING"),
|
|
146
146
|
rows: P,
|
|
147
147
|
loading: H,
|
|
148
|
-
errorStateMessage:
|
|
149
|
-
sortable:
|
|
148
|
+
errorStateMessage: b ? y?.message : null,
|
|
149
|
+
sortable: K,
|
|
150
150
|
emptyStateMessage: n("DOCUMENTS_NO_RECORDS"),
|
|
151
|
-
renderCell:
|
|
151
|
+
renderCell: Q,
|
|
152
152
|
className: d.documentsTableBody,
|
|
153
153
|
dataTestId: "documents-table",
|
|
154
|
-
pageSize:
|
|
155
|
-
totalItems:
|
|
156
|
-
page:
|
|
157
|
-
onPageChange:
|
|
154
|
+
pageSize: u,
|
|
155
|
+
totalItems: F,
|
|
156
|
+
page: f,
|
|
157
|
+
onPageChange: j
|
|
158
158
|
}
|
|
159
159
|
) }),
|
|
160
160
|
s && o && /* @__PURE__ */ r(
|
|
@@ -163,38 +163,38 @@ const _e = [
|
|
|
163
163
|
id: "modalIdForActionAreaLayout",
|
|
164
164
|
portalId: "main-display-area",
|
|
165
165
|
open: s,
|
|
166
|
-
onRequestClose:
|
|
166
|
+
onRequestClose: q,
|
|
167
167
|
modalHeading: o.documentIdentifier,
|
|
168
168
|
passiveModal: !0,
|
|
169
169
|
size: "lg",
|
|
170
170
|
testId: "document-view-modal",
|
|
171
|
-
children: /* @__PURE__ */ r("div", { className: d.documentViewerContainer, children:
|
|
172
|
-
const c =
|
|
173
|
-
return c === "#" ||
|
|
171
|
+
children: /* @__PURE__ */ r("div", { className: d.documentViewerContainer, children: T.map((e, t) => {
|
|
172
|
+
const c = R(e.url), m = e.contentType?.toLowerCase().includes("pdf"), S = (e.contentType?.toLowerCase().includes("image") ?? !1) || pe.test(e.url ?? ""), N = $.has(t);
|
|
173
|
+
return c === "#" || N ? /* @__PURE__ */ p(
|
|
174
174
|
"div",
|
|
175
175
|
{
|
|
176
176
|
className: d.attachmentError,
|
|
177
177
|
"data-testid": `attachment-error-${t}`,
|
|
178
178
|
children: [
|
|
179
|
-
|
|
179
|
+
T.length > 1 && /* @__PURE__ */ p("p", { className: d.attachmentCounter, children: [
|
|
180
180
|
t + 1,
|
|
181
181
|
"/",
|
|
182
|
-
|
|
182
|
+
T.length
|
|
183
183
|
] }),
|
|
184
184
|
/* @__PURE__ */ r("p", { children: n("DOCUMENTS_ERROR_LOADING_ATTACHMENT") })
|
|
185
185
|
]
|
|
186
186
|
},
|
|
187
187
|
`${o.id}-${e.url}`
|
|
188
|
-
) : /* @__PURE__ */
|
|
188
|
+
) : /* @__PURE__ */ p(
|
|
189
189
|
"div",
|
|
190
190
|
{
|
|
191
191
|
className: d.attachmentItem,
|
|
192
192
|
"data-testid": `attachment-item-${t}`,
|
|
193
193
|
children: [
|
|
194
|
-
|
|
194
|
+
T.length > 1 && /* @__PURE__ */ p("p", { className: d.attachmentCounter, children: [
|
|
195
195
|
t + 1,
|
|
196
196
|
"/",
|
|
197
|
-
|
|
197
|
+
T.length
|
|
198
198
|
] }),
|
|
199
199
|
S ? /* @__PURE__ */ r(
|
|
200
200
|
"img",
|
|
@@ -202,15 +202,15 @@ const _e = [
|
|
|
202
202
|
src: c,
|
|
203
203
|
alt: o.documentIdentifier,
|
|
204
204
|
className: d.documentImage,
|
|
205
|
-
onError: () =>
|
|
205
|
+
onError: () => v(t)
|
|
206
206
|
}
|
|
207
207
|
) : /* @__PURE__ */ r(
|
|
208
208
|
"iframe",
|
|
209
209
|
{
|
|
210
|
-
src:
|
|
210
|
+
src: m ? `${c}#toolbar=0` : c,
|
|
211
211
|
className: d.documentIframe,
|
|
212
212
|
title: o.documentIdentifier,
|
|
213
|
-
onError: () =>
|
|
213
|
+
onError: () => v(t)
|
|
214
214
|
}
|
|
215
215
|
)
|
|
216
216
|
]
|
|
@@ -223,5 +223,5 @@ const _e = [
|
|
|
223
223
|
] });
|
|
224
224
|
};
|
|
225
225
|
export {
|
|
226
|
-
|
|
226
|
+
Ie as default
|
|
227
227
|
};
|
|
@@ -1,63 +1,63 @@
|
|
|
1
1
|
import { jsx as s, jsxs as W, Fragment as Z } from "react/jsx-runtime";
|
|
2
|
-
import { a as ee, u as re, w as ae,
|
|
2
|
+
import { a as ee, u as re, w as ae, e as oe, Q as te, X as se, J as ne, d as de, R as S, m as ie, b as me, c as U, T as ue, C as le, n as ce, f as fe, Y as ye } from "./index-Dv1mIf-k.js";
|
|
3
3
|
import { useQueryClient as pe, useQuery as f } from "@tanstack/react-query";
|
|
4
|
-
import { useState as
|
|
5
|
-
const be = "
|
|
4
|
+
import { useState as q, useMemo as d, useCallback as y } from "react";
|
|
5
|
+
const be = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_customAccordianItem__isszs", A = {
|
|
6
6
|
formsTableBody: be,
|
|
7
|
-
customAccordianItem:
|
|
8
|
-
},
|
|
7
|
+
customAccordianItem: ge
|
|
8
|
+
}, Ne = (m) => m ? m.extension?.find(
|
|
9
9
|
(n) => n.url === ye
|
|
10
|
-
)?.valueString : void 0,
|
|
10
|
+
)?.valueString : void 0, Ie = ({
|
|
11
11
|
episodeOfCareUuids: m,
|
|
12
12
|
encounterUuids: n,
|
|
13
13
|
config: w
|
|
14
14
|
}) => {
|
|
15
|
-
const { t } = ee(), u = re(), [l,
|
|
16
|
-
numberOfVisits:
|
|
17
|
-
hideThumbnail:
|
|
15
|
+
const { t } = ee(), u = re(), [l, T] = q(!1), [o, O] = q(null), {
|
|
16
|
+
numberOfVisits: k,
|
|
17
|
+
hideThumbnail: H = !1,
|
|
18
18
|
forms: c
|
|
19
|
-
} = w ?? {},
|
|
19
|
+
} = w ?? {}, I = ae(
|
|
20
20
|
m,
|
|
21
21
|
n
|
|
22
|
-
),
|
|
23
|
-
data:
|
|
24
|
-
isLoading:
|
|
25
|
-
isError:
|
|
22
|
+
), K = pe(), {
|
|
23
|
+
data: F = [],
|
|
24
|
+
isLoading: L,
|
|
25
|
+
isError: B,
|
|
26
26
|
error: Q,
|
|
27
27
|
refetch: j
|
|
28
28
|
} = f({
|
|
29
29
|
queryKey: ["forms", u, m],
|
|
30
|
-
queryFn: () => oe(u, void 0,
|
|
31
|
-
enabled: !!u && !
|
|
32
|
-
}),
|
|
33
|
-
let e =
|
|
30
|
+
queryFn: () => oe(u, void 0, k),
|
|
31
|
+
enabled: !!u && !I
|
|
32
|
+
}), C = d(() => {
|
|
33
|
+
let e = F;
|
|
34
34
|
return n && n.length > 0 && (e = e.filter(
|
|
35
35
|
(r) => n.includes(r.encounterUuid)
|
|
36
36
|
)), Array.isArray(c) && c.length > 0 && (e = e.filter(
|
|
37
37
|
(r) => c.some((a) => a.toLowerCase() === r.formName.toLowerCase())
|
|
38
38
|
)), e;
|
|
39
|
-
}, [
|
|
39
|
+
}, [F, n, c]), { data: E = [] } = f({
|
|
40
40
|
queryKey: ["observationForms"],
|
|
41
41
|
queryFn: () => te()
|
|
42
|
-
}),
|
|
43
|
-
(e) =>
|
|
44
|
-
[
|
|
42
|
+
}), M = y(
|
|
43
|
+
(e) => E.find((r) => r.name === e)?.uuid,
|
|
44
|
+
[E]
|
|
45
45
|
), p = d(() => {
|
|
46
46
|
if (o)
|
|
47
|
-
return
|
|
48
|
-
}, [o,
|
|
47
|
+
return M(o.formName);
|
|
48
|
+
}, [o, M]), {
|
|
49
49
|
isLoading: x,
|
|
50
|
-
isError:
|
|
50
|
+
isError: V,
|
|
51
51
|
error: b
|
|
52
52
|
} = f({
|
|
53
53
|
queryKey: ["formMetadata", p],
|
|
54
54
|
queryFn: () => se(p),
|
|
55
55
|
enabled: !!p && l
|
|
56
56
|
}), {
|
|
57
|
-
data:
|
|
58
|
-
isLoading:
|
|
59
|
-
isError:
|
|
60
|
-
error:
|
|
57
|
+
data: g,
|
|
58
|
+
isLoading: $,
|
|
59
|
+
isError: z,
|
|
60
|
+
error: N
|
|
61
61
|
} = f({
|
|
62
62
|
queryKey: ["formsEncounterFHIR", o?.encounterUuid],
|
|
63
63
|
queryFn: () => ne(o.encounterUuid),
|
|
@@ -65,36 +65,36 @@ const be = "_formsTableBody_ourq9_5", Ne = "_customAccordianItem_ourq9_10", A =
|
|
|
65
65
|
});
|
|
66
66
|
de(
|
|
67
67
|
(e) => {
|
|
68
|
-
e.patientUUID === u && e.updatedConcepts.size > 0 && (j(),
|
|
68
|
+
e.patientUUID === u && e.updatedConcepts.size > 0 && (j(), K.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
69
69
|
},
|
|
70
70
|
[u]
|
|
71
71
|
);
|
|
72
|
-
const
|
|
73
|
-
const r =
|
|
72
|
+
const G = d(() => !g?.entry || !o?.formName ? [] : g.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => {
|
|
73
|
+
const r = Ne(e);
|
|
74
74
|
return !r || r.includes(o.formName);
|
|
75
|
-
}), [
|
|
75
|
+
}), [g, o?.formName]), J = d(() => {
|
|
76
76
|
if (b)
|
|
77
|
-
return
|
|
78
|
-
if (
|
|
79
|
-
return
|
|
80
|
-
}, [b,
|
|
77
|
+
return S(b).message;
|
|
78
|
+
if (N)
|
|
79
|
+
return S(N).message;
|
|
80
|
+
}, [b, N]), R = 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
|
-
),
|
|
93
|
-
const e =
|
|
92
|
+
), _ = d(() => {
|
|
93
|
+
const e = C.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((P) => P.providerName).filter(Boolean).join(", ");
|
|
98
98
|
return r[i].push({
|
|
99
99
|
id: a.encounterUuid,
|
|
100
100
|
formName: a.formName,
|
|
@@ -114,38 +114,38 @@ const be = "_formsTableBody_ourq9_5", Ne = "_customAccordianItem_ourq9_10", A =
|
|
|
114
114
|
)
|
|
115
115
|
})
|
|
116
116
|
).sort((r, a) => r.formName.localeCompare(a.formName));
|
|
117
|
-
}, [
|
|
118
|
-
|
|
119
|
-
}, []),
|
|
120
|
-
|
|
121
|
-
}, []),
|
|
117
|
+
}, [C, t]), v = y((e) => {
|
|
118
|
+
O(e), T(!0);
|
|
119
|
+
}, []), X = y(() => {
|
|
120
|
+
T(!1), O(null);
|
|
121
|
+
}, []), D = y(
|
|
122
122
|
(e, r) => {
|
|
123
123
|
switch (r) {
|
|
124
124
|
case "recordedOn":
|
|
125
|
-
return /* @__PURE__ */ s(me, { onClick: () =>
|
|
125
|
+
return /* @__PURE__ */ s(me, { onClick: () => v(e), children: e.recordedOn });
|
|
126
126
|
case "recordedBy":
|
|
127
127
|
return e.recordedBy;
|
|
128
128
|
default:
|
|
129
129
|
return null;
|
|
130
130
|
}
|
|
131
131
|
},
|
|
132
|
-
[
|
|
132
|
+
[v]
|
|
133
133
|
);
|
|
134
134
|
return /* @__PURE__ */ W(Z, { children: [
|
|
135
|
-
/* @__PURE__ */ s("div", { id: "forms-table", "data-testid": "forms-table", children:
|
|
135
|
+
/* @__PURE__ */ s("div", { id: "forms-table", "data-testid": "forms-table", children: L || B || _.length === 0 || I ? /* @__PURE__ */ s(
|
|
136
136
|
U,
|
|
137
137
|
{
|
|
138
|
-
headers:
|
|
138
|
+
headers: R,
|
|
139
139
|
ariaLabel: t("FORMS_HEADING"),
|
|
140
140
|
rows: [],
|
|
141
|
-
loading:
|
|
142
|
-
errorStateMessage:
|
|
141
|
+
loading: L,
|
|
142
|
+
errorStateMessage: B ? Q?.message : void 0,
|
|
143
143
|
emptyStateMessage: t("FORMS_UNAVAILABLE"),
|
|
144
|
-
renderCell:
|
|
144
|
+
renderCell: D,
|
|
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: _.map((e, r) => {
|
|
149
149
|
const { formName: a, records: i } = e;
|
|
150
150
|
return /* @__PURE__ */ s(
|
|
151
151
|
le,
|
|
@@ -157,14 +157,14 @@ const be = "_formsTableBody_ourq9_5", Ne = "_customAccordianItem_ourq9_10", A =
|
|
|
157
157
|
children: /* @__PURE__ */ s(
|
|
158
158
|
U,
|
|
159
159
|
{
|
|
160
|
-
headers:
|
|
160
|
+
headers: R,
|
|
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
|
-
renderCell:
|
|
167
|
+
renderCell: D,
|
|
168
168
|
className: A.formsTableBody,
|
|
169
169
|
dataTestId: `forms-table-${a}`
|
|
170
170
|
}
|
|
@@ -179,7 +179,7 @@ const be = "_formsTableBody_ourq9_5", Ne = "_customAccordianItem_ourq9_10", A =
|
|
|
179
179
|
id: "modalIdForActionAreaLayout",
|
|
180
180
|
portalId: "main-display-area",
|
|
181
181
|
open: l,
|
|
182
|
-
onRequestClose:
|
|
182
|
+
onRequestClose: X,
|
|
183
183
|
modalHeading: o.formName,
|
|
184
184
|
modalLabel: `${o.recordedOn} | ${o.recordedBy}`,
|
|
185
185
|
passiveModal: !0,
|
|
@@ -188,13 +188,13 @@ const be = "_formsTableBody_ourq9_5", Ne = "_customAccordianItem_ourq9_10", A =
|
|
|
188
188
|
children: /* @__PURE__ */ s(
|
|
189
189
|
fe,
|
|
190
190
|
{
|
|
191
|
-
observations:
|
|
192
|
-
isLoading: x ||
|
|
193
|
-
isError:
|
|
194
|
-
errorMessage:
|
|
191
|
+
observations: G,
|
|
192
|
+
isLoading: x || $,
|
|
193
|
+
isError: V || z,
|
|
194
|
+
errorMessage: J,
|
|
195
195
|
emptyStateMessage: t("NO_FORM_DATA_AVAILABLE"),
|
|
196
196
|
testIdPrefix: o.formName,
|
|
197
|
-
hideThumbnail:
|
|
197
|
+
hideThumbnail: H
|
|
198
198
|
}
|
|
199
199
|
)
|
|
200
200
|
}
|
|
@@ -202,5 +202,5 @@ const be = "_formsTableBody_ourq9_5", Ne = "_customAccordianItem_ourq9_10", A =
|
|
|
202
202
|
] });
|
|
203
203
|
};
|
|
204
204
|
export {
|
|
205
|
-
|
|
205
|
+
Ie as default
|
|
206
206
|
};
|
|
@@ -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-n7d56V9h.js";
|
|
2
|
+
import { U as d, V as f, W as e } from "./index-Dv1mIf-k.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-n7d56V9h.js";
|
|
2
|
+
import { U as v, V as C, W as e } from "./index-Dv1mIf-k.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|