@bahmni/appointments-app 0.0.1-dev.237 → 0.0.1-dev.238

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.
@@ -1,5 +1,5 @@
1
1
  import { jsx as r, jsxs as p, Fragment as Y } from "react/jsx-runtime";
2
- import { t as K, u as Q, r as W, a as J, N as X, d as Z, o as ee, l as te, V as ae } from "./index-Cx6uHzit.js";
2
+ import { t as K, u as Q, r as W, a as J, N as X, d as Z, o as ee, l as te, V as ae } from "./index-BXQ5u6yw.js";
3
3
  import { useState as l, useCallback as h, useEffect as f, useMemo as T } from "react";
4
4
  const ne = "_documentsTableBody_1voj8_1", oe = "_viewAttachmentsLink_1voj8_11", re = "_documentViewerContainer_1voj8_15", de = "_attachmentItem_1voj8_23", se = "_attachmentCounter_1voj8_27", ce = "_attachmentError_1voj8_36", ie = "_documentIframe_1voj8_44", le = "_documentImage_1voj8_50", d = {
5
5
  documentsTableBody: ne,
@@ -20,10 +20,10 @@ const ne = "_documentsTableBody_1voj8_1", oe = "_viewAttachmentsLink_1voj8_11",
20
20
  function j(a) {
21
21
  return !a || a.includes(":") ? "#" : `/openmrs/auth?requested_document=/document_images/${a}`;
22
22
  }
23
- function ue(a, E) {
23
+ function ue(a, g) {
24
24
  return a.map((s) => ({
25
25
  key: s,
26
- header: E(me[s])
26
+ header: g(me[s])
27
27
  }));
28
28
  }
29
29
  const _e = [
@@ -32,12 +32,12 @@ const _e = [
32
32
  "uploadedOn",
33
33
  "uploadedBy",
34
34
  "action"
35
- ], 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 }] : [], ge = ({ config: a, encounterUuids: E }) => {
35
+ ], 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 }] : [], Ee = ({ config: a, encounterUuids: g }) => {
36
36
  const [s, w] = l(!1), [o, L] = l(
37
37
  null
38
38
  ), [R, I] = l(
39
39
  /* @__PURE__ */ new Set()
40
- ), g = K(), { t: n } = Q(), { addNotification: U } = W(), $ = Number(a?.pageSize) || 5, [C, A] = l(1), [m, V] = l($), [k, y] = l(void 0), M = h((e) => {
40
+ ), E = K(), { t: n } = Q(), { addNotification: U } = W(), $ = Number(a?.pageSize) || 5, [C, A] = l(1), [m, V] = l($), [k, y] = l(void 0), M = h((e) => {
41
41
  L(e), w(!0);
42
42
  }, []), F = h(() => {
43
43
  w(!1), L(null), I(/* @__PURE__ */ new Set());
@@ -46,15 +46,15 @@ const _e = [
46
46
  }, []), { data: u, isLoading: H, isError: D, error: v } = J({
47
47
  queryKey: [
48
48
  "documents",
49
- g,
50
49
  E,
50
+ g,
51
51
  C,
52
52
  m
53
53
  ],
54
- enabled: !!g,
54
+ enabled: !!E,
55
55
  queryFn: () => ae(
56
- g,
57
56
  E,
57
+ g,
58
58
  m,
59
59
  C
60
60
  )
@@ -63,7 +63,7 @@ const _e = [
63
63
  u && y(u.total);
64
64
  }, [u]), f(() => {
65
65
  A(1), y(void 0);
66
- }, [g]), f(() => {
66
+ }, [E]), f(() => {
67
67
  D && U({
68
68
  title: n("ERROR_DEFAULT_TITLE"),
69
69
  message: v?.message ?? "",
@@ -222,5 +222,5 @@ const _e = [
222
222
  ] });
223
223
  };
224
224
  export {
225
- ge as default
225
+ Ee as default
226
226
  };
@@ -1,18 +1,18 @@
1
1
  import { jsx as s, jsxs as J, Fragment as W } from "react/jsx-runtime";
2
- import { u as Z, t as ee, g as re, b as ae, a as c, B as te, c as U, d as oe, N as se, o as S, Q as ne, X as de, l as ie, e as ue, m as me, y as le, v as ce, E as fe, f as ye } from "./index-Cx6uHzit.js";
3
- import { useState as C, useMemo as d, useCallback as f } from "react";
4
- const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", O = {
2
+ import { u as Z, t as ee, g as re, b as ae, a as c, B as te, c as U, d as oe, N as se, o as S, Q as ne, X as de, l as ie, e as me, m as ue, y as le, v as ce, E as fe, f as ye } from "./index-BXQ5u6yw.js";
3
+ import { useState as q, useMemo as d, useCallback as f } from "react";
4
+ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
5
5
  formsTableBody: be,
6
6
  customAccordianItem: ge
7
- }, Ne = (u) => u ? u.extension?.find(
8
- (n) => n.url === me
9
- )?.valueString : void 0, Ae = ({
10
- episodeOfCareUuids: u,
7
+ }, Ne = (m) => m ? m.extension?.find(
8
+ (n) => n.url === ue
9
+ )?.valueString : void 0, Oe = ({
10
+ episodeOfCareUuids: m,
11
11
  encounterUuids: n,
12
- config: q
12
+ config: C
13
13
  }) => {
14
- const { t: o } = Z(), m = ee(), [l, A] = C(!1), [t, B] = C(null), { numberOfVisits: k, hideThumbnail: H = !1 } = q ?? {}, I = re(
15
- u,
14
+ const { t: o } = Z(), u = ee(), [l, O] = q(!1), [t, A] = q(null), { numberOfVisits: k, hideThumbnail: H = !1 } = C ?? {}, B = re(
15
+ m,
16
16
  n
17
17
  ), K = ae(), {
18
18
  data: y = [],
@@ -21,21 +21,21 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", O = {
21
21
  error: Q,
22
22
  refetch: V
23
23
  } = c({
24
- queryKey: ["forms", m, u],
25
- queryFn: () => le(m, void 0, k),
26
- enabled: !!m && !I
27
- }), _ = d(() => !n || n.length === 0 ? y : y.filter(
24
+ queryKey: ["forms", u, m],
25
+ queryFn: () => le(u, void 0, k),
26
+ enabled: !!u && !B
27
+ }), F = d(() => !n || n.length === 0 ? y : y.filter(
28
28
  (e) => n.includes(e.encounterUuid)
29
- ), [y, n]), { data: v = [] } = c({
29
+ ), [y, n]), { data: _ = [] } = c({
30
30
  queryKey: ["observationForms"],
31
31
  queryFn: () => ce()
32
- }), D = f(
33
- (e) => v.find((r) => r.name === e)?.uuid,
34
- [v]
32
+ }), v = f(
33
+ (e) => _.find((r) => r.name === e)?.uuid,
34
+ [_]
35
35
  ), b = d(() => {
36
36
  if (t)
37
- return D(t.formName);
38
- }, [t, D]), {
37
+ return v(t.formName);
38
+ }, [t, v]), {
39
39
  isLoading: j,
40
40
  isError: x,
41
41
  error: g
@@ -55,9 +55,9 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", O = {
55
55
  });
56
56
  te(
57
57
  (e) => {
58
- e.patientUUID === m && e.updatedConcepts.size > 0 && (V(), K.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
58
+ e.patientUUID === u && e.updatedConcepts.size > 0 && (V(), K.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
59
59
  },
60
- [m]
60
+ [u]
61
61
  );
62
62
  const z = d(() => !N?.entry || !t?.formName ? [] : N.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => {
63
63
  const r = Ne(e);
@@ -67,7 +67,7 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", O = {
67
67
  return U(g).message;
68
68
  if (p)
69
69
  return U(p).message;
70
- }, [g, p]), F = d(
70
+ }, [g, p]), L = d(
71
71
  () => [
72
72
  { key: "recordedOn", header: o("RECORDED_ON") },
73
73
  { key: "recordedBy", header: o("RECORDED_BY") }
@@ -79,8 +79,8 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", O = {
79
79
  { key: "recordedBy", sortable: !0 }
80
80
  ],
81
81
  []
82
- ), L = d(() => {
83
- const e = _.reduce(
82
+ ), M = d(() => {
83
+ const e = F.reduce(
84
84
  (r, a) => {
85
85
  const i = a.formName;
86
86
  r[i] ??= [];
@@ -104,50 +104,50 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", O = {
104
104
  )
105
105
  })
106
106
  ).sort((r, a) => r.formName.localeCompare(a.formName));
107
- }, [_, o]), M = f((e) => {
108
- B(e), A(!0);
107
+ }, [F, o]), D = f((e) => {
108
+ A(e), O(!0);
109
109
  }, []), X = f(() => {
110
- A(!1), B(null);
110
+ O(!1), A(null);
111
111
  }, []), R = f(
112
112
  (e, r) => {
113
113
  switch (r) {
114
114
  case "recordedOn":
115
- return /* @__PURE__ */ s(se, { onClick: () => M(e), children: e.recordedOn });
115
+ return /* @__PURE__ */ s(se, { onClick: () => D(e), children: e.recordedOn });
116
116
  case "recordedBy":
117
117
  return e.recordedBy;
118
118
  default:
119
119
  return null;
120
120
  }
121
121
  },
122
- [M]
122
+ [D]
123
123
  );
124
124
  return /* @__PURE__ */ J(W, { children: [
125
- /* @__PURE__ */ s("div", { "data-testid": "forms-table", children: E || T || L.length === 0 || I ? /* @__PURE__ */ s(
125
+ /* @__PURE__ */ s("div", { "data-testid": "forms-table", children: E || T || M.length === 0 || B ? /* @__PURE__ */ s(
126
126
  S,
127
127
  {
128
- headers: F,
128
+ headers: L,
129
129
  ariaLabel: o("FORMS_HEADING"),
130
130
  rows: [],
131
131
  loading: E,
132
132
  errorStateMessage: T ? Q?.message : void 0,
133
133
  emptyStateMessage: o("FORMS_UNAVAILABLE"),
134
134
  renderCell: R,
135
- className: O.formsTableBody,
135
+ className: I.formsTableBody,
136
136
  dataTestId: "forms-table"
137
137
  }
138
- ) : /* @__PURE__ */ s(ne, { align: "start", children: L.map((e, r) => {
138
+ ) : /* @__PURE__ */ s(ne, { align: "start", children: M.map((e, r) => {
139
139
  const { formName: a, records: i } = e;
140
140
  return /* @__PURE__ */ s(
141
141
  de,
142
142
  {
143
143
  title: a,
144
- className: O.customAccordianItem,
144
+ className: I.customAccordianItem,
145
145
  testId: `accordian-title-${a}`,
146
146
  open: r === 0,
147
147
  children: /* @__PURE__ */ s(
148
148
  S,
149
149
  {
150
- headers: F,
150
+ headers: L,
151
151
  ariaLabel: o("FORMS_HEADING"),
152
152
  rows: i,
153
153
  loading: !1,
@@ -155,7 +155,7 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", O = {
155
155
  sortable: P,
156
156
  emptyStateMessage: o("FORMS_UNAVAILABLE"),
157
157
  renderCell: R,
158
- className: O.formsTableBody,
158
+ className: I.formsTableBody,
159
159
  dataTestId: `forms-table-${a}`
160
160
  }
161
161
  )
@@ -176,7 +176,7 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", O = {
176
176
  size: "md",
177
177
  testId: "form-details-modal",
178
178
  children: /* @__PURE__ */ s(
179
- ue,
179
+ me,
180
180
  {
181
181
  observations: z,
182
182
  isLoading: j || $,
@@ -192,5 +192,5 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", O = {
192
192
  ] });
193
193
  };
194
194
  export {
195
- Ae as default
195
+ Oe as default
196
196
  };
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-B8I9n-lB.js";
2
- import { S as d, W as f, Z as e } from "./index-Cx6uHzit.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-B2URhxvI.js";
2
+ import { W as d, Z as f, _ as e } from "./index-BXQ5u6yw.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-B8I9n-lB.js";
2
- import { S as v, W as C, Z as e } from "./index-Cx6uHzit.js";
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-B2URhxvI.js";
2
+ import { W as v, Z as C, _ as e } from "./index-BXQ5u6yw.js";
3
3
  var h = (t) => {
4
4
  const [r, o] = s({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,5 +1,5 @@
1
1
  import { jsxs as N, jsx as u } from "react/jsx-runtime";
2
- import { t as k, r as w, u as S, h as x, i as G, a as K, B as M, j as Q, z as Y, A as j, Y as z, o as H, M as P, G as F, x as J, k as W, F as X, n as Z, T as ee, p as ae, w as te } from "./index-Cx6uHzit.js";
2
+ import { t as V, r as w, u as S, h as x, i as G, a as K, B as M, j as Q, z as Y, A as j, Y as z, o as H, M as P, G as F, x as J, k as W, F as X, n as Z, T as ee, p as ae, w as te } from "./index-BXQ5u6yw.js";
3
3
  import { useRef as se, useEffect as $, useMemo as T } from "react";
4
4
  const A = (a, n, d, l, b, r) => {
5
5
  const t = J(a, n, b), s = t.value, i = W(s);
@@ -112,7 +112,7 @@ const A = (a, n, d, l, b, r) => {
112
112
  conceptNames: d = [],
113
113
  conceptUuid: l = [],
114
114
  hideThumbnail: b = !1
115
- } = n, r = se(/* @__PURE__ */ new Set()), t = k(), { addNotification: s } = w(), { t: i } = S(), o = x({
115
+ } = n, r = se(/* @__PURE__ */ new Set()), t = V(), { addNotification: s } = w(), { t: i } = S(), o = x({
116
116
  queries: d.map((e) => ({
117
117
  queryKey: de(e),
118
118
  queryFn: () => G(e),
@@ -122,10 +122,10 @@ const A = (a, n, d, l, b, r) => {
122
122
  $(() => {
123
123
  o.forEach((e, h) => {
124
124
  if (e.isError && !r.current.has(h)) {
125
- const V = d[h];
125
+ const C = d[h];
126
126
  s({
127
127
  title: i("ERROR_DEFAULT_TITLE"),
128
- message: i("ERROR_FETCHING_CONCEPT", { conceptName: V }),
128
+ message: i("ERROR_FETCHING_CONCEPT", { conceptName: C }),
129
129
  type: "error"
130
130
  }), r.current.add(h);
131
131
  } else e.isError || r.current.delete(h);
@@ -133,7 +133,7 @@ const A = (a, n, d, l, b, r) => {
133
133
  }, [o, d]);
134
134
  const p = T(() => o.map((e) => e.data?.uuid).filter((e) => !!e), [o]), m = T(() => [.../* @__PURE__ */ new Set([...p, ...l])], [p, l]), y = T(() => d.length === 0 ? !0 : o.every((e) => !e.isLoading), [o, d.length]), {
135
135
  data: c,
136
- isLoading: q,
136
+ isLoading: U,
137
137
  isError: R,
138
138
  refetch: f
139
139
  } = K({
@@ -163,7 +163,7 @@ const A = (a, n, d, l, b, r) => {
163
163
  { key: "name", header: "name" },
164
164
  { key: "value", header: "value" },
165
165
  { key: "form", header: "form" }
166
- ], O = q || !y, _ = R && y, B = (!c || c.entry?.length === 0 || m.length === 0) && y, L = _ ? i("ERROR_FETCHING_OBSERVATIONS") : null, U = B ? i("NO_OBSERVATIONS_FOUND") : void 0, C = g.length > 0 && !O && !_, E = n.titleTranslationKey, v = E ? i(E) : "";
166
+ ], O = U || !y, _ = R && y, B = (!c || c.entry?.length === 0 || m.length === 0) && y, L = _ ? i("ERROR_FETCHING_OBSERVATIONS") : null, k = B ? i("NO_OBSERVATIONS_FOUND") : void 0, q = g.length > 0 && !O && !_, E = n.titleTranslationKey, v = E ? i(E) : "";
167
167
  return /* @__PURE__ */ N(
168
168
  "div",
169
169
  {
@@ -182,7 +182,7 @@ const A = (a, n, d, l, b, r) => {
182
182
  children: /* @__PURE__ */ u("p", { children: v })
183
183
  }
184
184
  ),
185
- C ? /* @__PURE__ */ u(
185
+ q ? /* @__PURE__ */ u(
186
186
  ie,
187
187
  {
188
188
  groupedData: g,
@@ -197,7 +197,7 @@ const A = (a, n, d, l, b, r) => {
197
197
  ariaLabel: i("OBSERVATIONS"),
198
198
  loading: O,
199
199
  errorStateMessage: L,
200
- emptyStateMessage: U,
200
+ emptyStateMessage: k,
201
201
  dataTestId: "observations-table"
202
202
  }
203
203
  )
@@ -1,4 +1,4 @@
1
- import { $ as we, a0 as z, a1 as xt, a2 as B, W as q, Z as y, a3 as Ro, a4 as ye, a5 as R, a6 as _, a7 as k, a8 as N, a9 as A, aa as bs, ab as ir, ac as $e, ad as G, ae as Hn, af as Vn, ag as dt, ah as D, ai as xs, aj as cn, ak as Be, al as ws, am as qt, an as zt, ao as $s, ap as Cs, aq as $n, ar as Ss, as as Nr, at as Bt, au as zo, av as ks, aw as Es, ax as j, ay as Gr, az as Ms, aA as Ds, aB as sr, aC as As, aD as Ts, aE as zn, aF as Fs, aG as Is, aH as Z, aI as Ps, aJ as Ls } from "./index-Cx6uHzit.js";
1
+ import { $ as we, a0 as z, a1 as xt, a2 as B, Z as q, _ as y, a3 as Ro, a4 as ye, a5 as R, a6 as _, a7 as k, a8 as N, a9 as A, aa as bs, ab as ir, ac as $e, ad as G, ae as Hn, af as Vn, ag as dt, ah as D, ai as xs, aj as cn, ak as Be, al as ws, am as qt, an as zt, ao as $s, ap as Cs, aq as $n, ar as Ss, as as Nr, at as Bt, au as zo, av as ks, aw as Es, ax as j, ay as Gr, az as Ms, aA as Ds, aB as sr, aC as As, aD as Ts, aE as zn, aF as Fs, aG as Is, aH as Z, aI as Ps, aJ as Ls } from "./index-BXQ5u6yw.js";
2
2
  var Os = (e) => e != null, qs = (e) => e.filter(Os);
3
3
  function _s(e) {
4
4
  return (...t) => {
@@ -69074,7 +69074,7 @@ const p$2 = "_layout_ma379_85", f$2 = "_main_ma379_93", vh1 = {
69074
69074
  )
69075
69075
  ]
69076
69076
  }
69077
- ), m$2 = "_breadcrumb_7z10y_70", w$2 = "_sideNavItems_7z10y_82", gh1 = {
69077
+ ), m$2 = "_breadcrumb_fbh29_74", w$2 = "_sideNavItems_fbh29_86", gh1 = {
69078
69078
  breadcrumb: m$2,
69079
69079
  sideNavItems: w$2
69080
69080
  }, v$2 = (t, e = !0) => {
@@ -142222,7 +142222,7 @@ const Od0 = "_bahmniIcon_1cg5e_1", Dd0 = "_paddingNone_1cg5e_1", Rd0 = "_padding
142222
142222
  ...o
142223
142223
  }) => /* @__PURE__ */ i1(el, { ...o, "data-testid": t ?? e, children: r });
142224
142224
  I2(null);
142225
- const lu0 = "_breadcrumb_7z10y_70", iu0 = "_sideNavItems_7z10y_82", W5e = {
142225
+ const lu0 = "_breadcrumb_fbh29_74", iu0 = "_sideNavItems_fbh29_86", W5e = {
142226
142226
  breadcrumb: lu0,
142227
142227
  sideNavItems: iu0
142228
142228
  }, su0 = (t, e = !0) => {
@@ -159620,7 +159620,7 @@ function lN0(t, e, r) {
159620
159620
  return o;
159621
159621
  };
159622
159622
  }
159623
- z0(() => Promise.resolve().then(() => pE0)), z0(() => Promise.resolve().then(() => IE0)), z0(() => Promise.resolve().then(() => wM0)), z0(() => Promise.resolve().then(() => VM0)), z0(() => import("./DocumentsTable-DZLV91xy-f5LDs6an.js")), z0(() => Promise.resolve().then(() => cV0)), z0(() => import("./FormsTable-Yt3aI_e6-Bnb-Zklz.js")), z0(() => Promise.resolve().then(() => Pz0)), z0(() => import("./Observations-DoBEcLrI-pq7YYK0e.js")), z0(
159623
+ z0(() => Promise.resolve().then(() => pE0)), z0(() => Promise.resolve().then(() => IE0)), z0(() => Promise.resolve().then(() => wM0)), z0(() => Promise.resolve().then(() => VM0)), z0(() => import("./DocumentsTable-1XgzVmNY-m8gJhwm3.js")), z0(() => Promise.resolve().then(() => cV0)), z0(() => import("./FormsTable-B0J51cB5-Dmmq1xJr.js")), z0(() => Promise.resolve().then(() => Pz0)), z0(() => import("./Observations-Cqov9775-N4ieiWsF.js")), z0(
159624
159624
  () => Promise.resolve().then(() => wV0)
159625
159625
  ), z0(
159626
159626
  () => Promise.resolve().then(() => dz0)
@@ -161459,7 +161459,7 @@ var _N0 = (t, e = !1) => {
161459
161459
  const e = mAe(() => {
161460
161460
  const r = this, [o] = this.#a, [a] = this.#h, [c] = this.#d, [l] = this.#u, [i] = this.#p, [s] = this.#t;
161461
161461
  let d;
161462
- return this.#i ? d = this.#i : (d = pAe(() => import("./LNWAZHJI-D-mYq8Ud.js")), this.#i = d), OAe(this.#l, this.#c), uAe(d, hAe({
161462
+ return this.#i ? d = this.#i : (d = pAe(() => import("./LNWAZHJI-COLIfjgg.js")), this.#i = d), OAe(this.#l, this.#c), uAe(d, hAe({
161463
161463
  get queryFlavor() {
161464
161464
  return r.#r;
161465
161465
  },
@@ -161557,7 +161557,7 @@ var _N0 = (t, e = !1) => {
161557
161557
  const e = mAe(() => {
161558
161558
  const r = this, [o] = this.#a, [a] = this.#h, [c] = this.#d, [l] = this.#u, [i] = this.#p, [s] = this.#t, [d] = this.#i;
161559
161559
  let u;
161560
- return this.#s ? u = this.#s : (u = pAe(() => import("./MWZ6AO7Z-DNr0igQc.js")), this.#s = u), OAe(this.#l, this.#c), uAe(u, hAe({
161560
+ return this.#s ? u = this.#s : (u = pAe(() => import("./MWZ6AO7Z-h5adSN6d.js")), this.#s = u), OAe(this.#l, this.#c), uAe(u, hAe({
161561
161561
  get queryFlavor() {
161562
161562
  return r.#r;
161563
161563
  },
@@ -161692,7 +161692,7 @@ const Vb0 = {
161692
161692
  refetchIntervalInBackground: !1
161693
161693
  }
161694
161694
  }
161695
- }, Hb0 = "appointments", bb0 = "/bahmni_config/openmrs/apps/appointments/v2", xb0 = bb0 + "/app.json", Nb0 = I2(void 0), Lb0 = "http://json-schema.org/draft-07/schema#", Cb0 = "Appointments App Configuration Schema", Ab0 = "Schema for global appointments app configuration", _b0 = "object", $b0 = !0, Tb0 = { serviceTableFields: { type: "array", description: "List of fields to display in the service table", items: { type: "string" } } }, Ob0 = {
161695
+ }, Hb0 = "appointments", bb0 = "/bahmni_config/openmrs/apps/appointments/v2", xb0 = bb0 + "/app.json", Nb0 = I2(void 0), Lb0 = "http://json-schema.org/draft-07/schema#", Cb0 = "Appointments App Configuration Schema", Ab0 = "Schema for global appointments app configuration", _b0 = "object", $b0 = !1, Tb0 = { serviceTableFields: { type: "array", description: "List of fields to display in the service table", items: { type: "string" } } }, Ob0 = {
161696
161696
  $schema: Lb0,
161697
161697
  title: Cb0,
161698
161698
  description: Ab0,
@@ -161717,7 +161717,7 @@ const Vb0 = {
161717
161717
  }), Rb0 = z0(
161718
161718
  () => import("./index-CFigb5vF.js").then((t) => ({ default: t.IndexPage }))
161719
161719
  ), Sb0 = z0(
161720
- () => import("./index-nVY_AosV.js").then((t) => ({
161720
+ () => import("./index-BoEx0_Jv.js").then((t) => ({
161721
161721
  default: t.default
161722
161722
  }))
161723
161723
  ), kb0 = [
@@ -161773,15 +161773,15 @@ export {
161773
161773
  s12 as P,
161774
161774
  dl as Q,
161775
161775
  Nx0 as R,
161776
- DN0 as S,
161776
+ xx0 as S,
161777
161777
  Ou0 as T,
161778
161778
  Kb0 as U,
161779
161779
  tN0 as V,
161780
- i0 as W,
161780
+ DN0 as W,
161781
161781
  ul as X,
161782
161782
  w9 as Y,
161783
- uAe as Z,
161784
- xx0 as _,
161783
+ i0 as Z,
161784
+ uAe as _,
161785
161785
  c0 as a,
161786
161786
  P2 as a0,
161787
161787
  tH0 as a1,
@@ -1,6 +1,6 @@
1
1
  import { jsx as n, jsxs as f } from "react/jsx-runtime";
2
- import { L as V, q as O, u as C, s as h, C as P, b as B, r as G, J as U, D as A, a as q, H as x, I as k, U as F, K as $, O as H, P as K, R as j, _ as w } from "./index-Cx6uHzit.js";
3
- import { useState as I, useMemo as c } from "react";
2
+ import { L as V, q as O, u as C, s as h, C as P, b as B, r as G, J as U, D as A, a as q, H as x, I as F, U as $, K as k, O as H, P as K, R as j, S as w } from "./index-BXQ5u6yw.js";
3
+ import { useState as I, useMemo as _ } from "react";
4
4
  const Q = V(
5
5
  O,
6
6
  "useAppointmentsConfig",
@@ -74,24 +74,24 @@ function ae(e, a) {
74
74
  }));
75
75
  }
76
76
  const re = () => {
77
- const { t: e } = C(), a = B(), { addNotification: t } = G(), { userPrivileges: s } = U(), { appointmentsConfig: i } = Q(), [E, _] = I(null), [v, S] = I(!1), l = i?.serviceTableFields ?? [
77
+ const { t: e } = C(), a = B(), { addNotification: t } = G(), { userPrivileges: s } = U(), { appointmentsConfig: i } = Q(), [E, c] = I(null), [v, S] = I(!1), l = i?.serviceTableFields ?? [
78
78
  ...p
79
79
  ], u = A(s, Y), M = A(
80
80
  s,
81
81
  W
82
- ), L = c(
82
+ ), m = _(
83
83
  () => ee(l),
84
84
  [l]
85
- ), { data: m, isLoading: b, isError: D } = q({
85
+ ), { data: L, isLoading: D, isError: b } = q({
86
86
  queryKey: ["allAppointmentServices"],
87
87
  queryFn: w,
88
88
  enabled: u
89
- }), R = c(
89
+ }), R = _(
90
90
  () => te(l, e),
91
91
  [l]
92
- ), g = c(
93
- () => ae(m ?? [], L),
94
- [m, L]
92
+ ), g = _(
93
+ () => ae(L ?? [], m),
94
+ [L, m]
95
95
  ), N = async () => {
96
96
  S(!0);
97
97
  try {
@@ -100,7 +100,7 @@ const re = () => {
100
100
  message: e("ADMIN_ALL_SERVICES_DELETE_SUCCESS_MESSAGE"),
101
101
  type: "success",
102
102
  timeout: 5e3
103
- }), _(null), a.invalidateQueries({ queryKey: ["allAppointmentServices"] });
103
+ }), c(null), a.invalidateQueries({ queryKey: ["allAppointmentServices"] });
104
104
  } catch {
105
105
  t({
106
106
  title: e("ADMIN_ALL_SERVICES_DELETE_ERROR_TITLE"),
@@ -119,7 +119,7 @@ const re = () => {
119
119
  kind: "ghost",
120
120
  label: e("ADMIN_ALL_SERVICES_DELETE_ICON_LABEL"),
121
121
  disabled: !M,
122
- onClick: () => _(r),
122
+ onClick: () => c(r),
123
123
  children: /* @__PURE__ */ n(K, {})
124
124
  }
125
125
  ) : p.includes(o) ? r[o] ?? "-" : r.attributes[o] ?? "-", y = [
@@ -127,9 +127,9 @@ const re = () => {
127
127
  { id: "admin", label: e("BREADCRUMB_ADMIN"), isCurrentPage: !0 }
128
128
  ];
129
129
  return /* @__PURE__ */ n(
130
- k,
130
+ F,
131
131
  {
132
- header: /* @__PURE__ */ n($, { breadcrumbItems: y }),
132
+ header: /* @__PURE__ */ n(k, { breadcrumbItems: y }),
133
133
  main: u ? /* @__PURE__ */ f(
134
134
  "div",
135
135
  {
@@ -139,15 +139,15 @@ const re = () => {
139
139
  className: d.page,
140
140
  children: [
141
141
  /* @__PURE__ */ n(
142
- F,
142
+ $,
143
143
  {
144
144
  id: "all-services",
145
145
  title: e("ADMIN_ALL_SERVICES_TITLE"),
146
146
  headers: R,
147
147
  rows: g,
148
148
  ariaLabel: "all-services-table",
149
- loading: b,
150
- errorStateMessage: D ? e("ADMIN_ALL_SERVICES_ERROR_MESSAGE") : null,
149
+ loading: D,
150
+ errorStateMessage: b ? e("ADMIN_ALL_SERVICES_ERROR_MESSAGE") : null,
151
151
  emptyStateMessage: e("ADMIN_ALL_SERVICES_EMPTY_MESSAGE"),
152
152
  renderCell: T,
153
153
  className: d.table
@@ -159,7 +159,7 @@ const re = () => {
159
159
  serviceName: E.name,
160
160
  isDeleting: v,
161
161
  onConfirm: N,
162
- onCancel: () => _(null)
162
+ onCancel: () => c(null)
163
163
  }
164
164
  )
165
165
  ]