@bahmni/appointments-app 0.0.1-dev.352 → 0.0.1-dev.353

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 h, Fragment as Q } from "react/jsx-runtime";
2
- import { m as x, u as W, a as Y, V as J, r as X, g as Z, e as ee, d as te } from "./index-CNK4mjp4.js";
2
+ import { m as x, u as W, a as Y, H as J, r as X, g as Z, e as ee, d as te } from "./index-Cs_HlPMV.js";
3
3
  import { useQuery as ae } from "@tanstack/react-query";
4
4
  import { useState as l, useCallback as _, useEffect as I, useMemo as p } from "react";
5
5
  const ne = "DocumentsTable-module_documentsTableBody__6iR3w", oe = "DocumentsTable-module_viewAttachmentsLink__aQ1on", re = "DocumentsTable-module_documentViewerContainer__F5m8D", de = "DocumentsTable-module_attachmentItem__17KA7", se = "DocumentsTable-module_attachmentCounter__WFiI3", me = "DocumentsTable-module_attachmentError__RI4U2", ce = "DocumentsTable-module_documentIframe__ptq5I", le = "DocumentsTable-module_documentImage__KQVgS", d = {
@@ -36,11 +36,11 @@ const Te = [
36
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
- ), [V, O] = l(
39
+ ), [$, O] = l(
40
40
  /* @__PURE__ */ new Set()
41
- ), E = x(), { t: n } = W(), { addNotification: L } = Y(), $ = Number(a?.pageSize) || 5, [f, C] = l(1), [u, k] = l($), [F, A] = l(void 0), M = _((e) => {
41
+ ), E = x(), { t: n } = W(), { addNotification: L } = Y(), k = Number(a?.pageSize) || 5, [f, C] = l(1), [u, H] = l(k), [V, A] = l(void 0), M = _((e) => {
42
42
  U(e), w(!0);
43
- }, []), H = _(() => {
43
+ }, []), F = _(() => {
44
44
  w(!1), U(null), O(/* @__PURE__ */ new Set());
45
45
  }, []), v = _((e) => {
46
46
  O((t) => new Set(t).add(e));
@@ -91,7 +91,7 @@ const Te = [
91
91
  }, [s, o]);
92
92
  const j = _(
93
93
  (e, t) => {
94
- t !== u ? (k(t), C(1), A(void 0)) : C(e);
94
+ t !== u ? (H(t), C(1), A(void 0)) : C(e);
95
95
  },
96
96
  [u]
97
97
  ), N = p(
@@ -152,7 +152,7 @@ const Te = [
152
152
  className: d.documentsTableBody,
153
153
  dataTestId: "documents-table",
154
154
  pageSize: u,
155
- totalItems: F,
155
+ totalItems: V,
156
156
  page: f,
157
157
  onPageChange: j
158
158
  }
@@ -163,13 +163,13 @@ const Te = [
163
163
  id: "modalIdForActionAreaLayout",
164
164
  portalId: "main-display-area",
165
165
  open: s,
166
- onRequestClose: H,
166
+ onRequestClose: F,
167
167
  modalHeading: o.documentIdentifier,
168
168
  passiveModal: !0,
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 ?? ""), D = V.has(t);
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
173
  return m === "#" || D ? /* @__PURE__ */ h(
174
174
  "div",
175
175
  {
@@ -1,38 +1,38 @@
1
1
  import { jsx as i, jsxs as x, Fragment as he } from "react/jsx-runtime";
2
- import { u as ge, m as pe, w as Ne, x as Oe, h as be, y as Te, J as Ee, E as Ie, Z as Ae, b as _e, A as ve, _ as Fe, o as z, g as Se, H as K, c as P, r as Me, e as J, f as Ce, i as Re, d as Be, W as Le, $ as Ue } from "./index-CNK4mjp4.js";
3
- import { useQueryClient as De, useQuery as b } from "@tanstack/react-query";
4
- import { useState as Q, 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
- formsTableBody: ke,
2
+ import { u as ge, m as pe, w as Ne, x as Oe, h as be, V as Ie, X as Te, y as Ae, k as Ee, J as _e, A as ve, N as Fe, o as z, g as Se, b as K, c as P, r as Me, e as Q, f as Ce, i as Re, d as Be, W as Le, I as Ue } from "./index-Cs_HlPMV.js";
3
+ import { useQueryClient as ke, useQuery as b } from "@tanstack/react-query";
4
+ import { useState as X, useMemo as d, useCallback as l } from "react";
5
+ const De = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_modalHeading__wnTmA", qe = "FormsTable-module_customAccordianItem__isszs", I = {
6
+ formsTableBody: De,
7
7
  modalHeading: we,
8
8
  customAccordianItem: qe
9
9
  }, He = "startConsultation", xe = ({
10
10
  episodeOfCareUuids: M,
11
11
  encounterUuids: c,
12
- config: Z,
12
+ config: J,
13
13
  disableActions: W = !1,
14
14
  activeEncounterUuid: h = null
15
15
  }) => {
16
- const { t: n } = ge(), u = pe(), [g, C] = Q(!1), [s, R] = Q(null), {
17
- numberOfVisits: X,
18
- hideThumbnail: Y = !1,
16
+ const { t: n } = ge(), u = pe(), [g, C] = X(!1), [s, R] = X(null), {
17
+ numberOfVisits: Y,
18
+ hideThumbnail: Z = !1,
19
19
  forms: p
20
- } = Z ?? {}, ee = Ne(
20
+ } = J ?? {}, ee = Ne(
21
21
  Ue.EDIT_OBSERVATIONS
22
- ), { userPrivileges: N } = Oe(), E = ee && !W && !!h, B = be(
22
+ ), { userPrivileges: N } = Oe(), T = ee && !W && !!h, B = be(
23
23
  M,
24
24
  c
25
- ), re = De(), {
25
+ ), re = ke(), {
26
26
  data: L = [],
27
27
  isLoading: U,
28
- isError: D,
28
+ isError: k,
29
29
  error: oe,
30
30
  refetch: ae
31
31
  } = b({
32
32
  queryKey: ["forms", u, M],
33
- queryFn: () => Te(u, void 0, X),
33
+ queryFn: () => Ie(u, void 0, Y),
34
34
  enabled: !!u && !B
35
- }), k = d(() => {
35
+ }), D = d(() => {
36
36
  let e = L;
37
37
  return c && c.length > 0 && (e = e.filter(
38
38
  (r) => c.includes(r.encounterUuid)
@@ -41,7 +41,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
41
41
  )), e;
42
42
  }, [L, c, p]), { data: O = [] } = b({
43
43
  queryKey: ["observationForms"],
44
- queryFn: () => Ee()
44
+ queryFn: () => Te()
45
45
  }), w = l(
46
46
  (e) => {
47
47
  const r = O.find((a) => a.name === e);
@@ -59,18 +59,18 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
59
59
  ), q = l(
60
60
  (e) => O.find((r) => r.name === e)?.uuid,
61
61
  [O]
62
- ), I = d(() => {
62
+ ), A = d(() => {
63
63
  if (s)
64
64
  return q(s.formName);
65
65
  }, [s, q]), {
66
66
  data: m,
67
67
  isLoading: te,
68
68
  isError: se,
69
- error: A
69
+ error: E
70
70
  } = b({
71
- queryKey: ["formMetadata", I],
72
- queryFn: () => Ie(I),
73
- enabled: !!I && g
71
+ queryKey: ["formMetadata", A],
72
+ queryFn: () => Ae(A),
73
+ enabled: !!A && g
74
74
  }), {
75
75
  data: _,
76
76
  isLoading: ne,
@@ -78,7 +78,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
78
78
  error: v
79
79
  } = b({
80
80
  queryKey: ["formsEncounterFHIR", s?.encounterUuid],
81
- queryFn: () => Ae(s.encounterUuid),
81
+ queryFn: () => Ee(s.encounterUuid),
82
82
  enabled: !!s?.encounterUuid && g
83
83
  });
84
84
  _e(
@@ -113,11 +113,11 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
113
113
  null
114
114
  ), Object.keys(e).length > 0 ? e : void 0;
115
115
  }, [m]), ce = d(() => {
116
- if (A)
117
- return z(A).message;
116
+ if (E)
117
+ return z(E).message;
118
118
  if (v)
119
119
  return z(v).message;
120
- }, [A, v]), y = d(
120
+ }, [E, v]), y = d(
121
121
  () => [
122
122
  { key: "recordedOn", header: n("RECORDED_ON") },
123
123
  { key: "recordedBy", header: n("RECORDED_BY") }
@@ -127,8 +127,8 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
127
127
  () => [...y, { key: "actions", header: n("ACTIONS") }],
128
128
  [y, n]
129
129
  ), ue = l(
130
- (e) => E && e.some((r) => f(r)) ? H : y,
131
- [E, f, H, y]
130
+ (e) => T && e.some((r) => f(r)) ? H : y,
131
+ [T, f, H, y]
132
132
  ), fe = y, ye = d(
133
133
  () => [
134
134
  { key: "recordedOn", sortable: !0 },
@@ -136,7 +136,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
136
136
  ],
137
137
  []
138
138
  ), V = d(() => {
139
- const e = k.reduce(
139
+ const e = D.reduce(
140
140
  (r, o) => {
141
141
  const a = o.formName;
142
142
  r[a] ??= [];
@@ -160,9 +160,9 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
160
160
  )
161
161
  })
162
162
  ).sort((r, o) => r.formName.localeCompare(o.formName));
163
- }, [k, n]), $ = l((e) => {
163
+ }, [D, n]), G = l((e) => {
164
164
  R(e), C(!0);
165
- }, []), G = l(() => {
165
+ }, []), $ = l(() => {
166
166
  C(!1), R(null);
167
167
  }, []), F = l((e) => {
168
168
  globalThis.dispatchEvent(
@@ -180,7 +180,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
180
180
  (e, r) => {
181
181
  switch (r) {
182
182
  case "recordedOn":
183
- return /* @__PURE__ */ i(Me, { onClick: () => $(e), children: e.recordedOn });
183
+ return /* @__PURE__ */ i(Me, { onClick: () => G(e), children: e.recordedOn });
184
184
  case "recordedBy":
185
185
  return e.recordedBy;
186
186
  case "actions":
@@ -199,20 +199,20 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
199
199
  return null;
200
200
  }
201
201
  },
202
- [$, F, f, n]
202
+ [G, F, f, n]
203
203
  );
204
204
  return /* @__PURE__ */ x(he, { children: [
205
- /* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: U || D || V.length === 0 || B ? /* @__PURE__ */ i(
206
- J,
205
+ /* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: U || k || V.length === 0 || B ? /* @__PURE__ */ i(
206
+ Q,
207
207
  {
208
208
  headers: fe,
209
209
  ariaLabel: n("FORMS_HEADING"),
210
210
  rows: [],
211
211
  loading: U,
212
- errorStateMessage: D ? oe?.message : void 0,
212
+ errorStateMessage: k ? oe?.message : void 0,
213
213
  emptyStateMessage: n("FORMS_UNAVAILABLE"),
214
214
  renderCell: j,
215
- className: T.formsTableBody,
215
+ className: I.formsTableBody,
216
216
  dataTestId: "forms-table"
217
217
  }
218
218
  ) : /* @__PURE__ */ i(Ce, { align: "start", children: V.map((e, r) => {
@@ -221,11 +221,11 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
221
221
  Re,
222
222
  {
223
223
  title: o,
224
- className: T.customAccordianItem,
224
+ className: I.customAccordianItem,
225
225
  testId: `accordian-title-${o}`,
226
226
  open: r === 0,
227
227
  children: /* @__PURE__ */ i(
228
- J,
228
+ Q,
229
229
  {
230
230
  headers: t,
231
231
  ariaLabel: n("FORMS_HEADING"),
@@ -235,7 +235,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
235
235
  sortable: ye,
236
236
  emptyStateMessage: n("FORMS_UNAVAILABLE"),
237
237
  renderCell: j,
238
- className: T.formsTableBody,
238
+ className: I.formsTableBody,
239
239
  dataTestId: `forms-table-${o}`
240
240
  }
241
241
  )
@@ -249,10 +249,10 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
249
249
  id: "modalIdForActionAreaLayout",
250
250
  portalId: "main-display-area",
251
251
  open: g,
252
- onRequestClose: G,
253
- modalHeading: /* @__PURE__ */ x("div", { className: T.modalHeading, children: [
252
+ onRequestClose: $,
253
+ modalHeading: /* @__PURE__ */ x("div", { className: I.modalHeading, children: [
254
254
  /* @__PURE__ */ i("span", { children: s.formName }),
255
- E && f(s) && /* @__PURE__ */ i(
255
+ T && f(s) && /* @__PURE__ */ i(
256
256
  K,
257
257
  {
258
258
  label: n("EDIT_OBSERVATION_FORM"),
@@ -260,7 +260,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
260
260
  size: "sm",
261
261
  testId: `edit-form-modal-${s.encounterUuid}`,
262
262
  onClick: () => {
263
- G(), F(s);
263
+ $(), F(s);
264
264
  },
265
265
  children: /* @__PURE__ */ i(P, {})
266
266
  }
@@ -279,7 +279,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
279
279
  errorMessage: ce,
280
280
  emptyStateMessage: n("NO_FORM_DATA_AVAILABLE"),
281
281
  testIdPrefix: s.formName,
282
- hideThumbnail: Y,
282
+ hideThumbnail: Z,
283
283
  controlOrder: le,
284
284
  sectionMap: me
285
285
  }
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-Bs3az1GO.js";
2
- import { an as p, ao as d, ap as e } from "./index-CNK4mjp4.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-CbBUq3Jp.js";
2
+ import { an as p, ao as d, ap as e } from "./index-Cs_HlPMV.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-Bs3az1GO.js";
2
- import { an as v, ao as C, ap as e } from "./index-CNK4mjp4.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-CbBUq3Jp.js";
2
+ import { an as v, ao as C, ap as e } from "./index-Cs_HlPMV.js";
3
3
  var h = (t) => {
4
4
  const [r, o] = s({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,12 +1,12 @@
1
- import { jsxs as N, jsx as u } from "react/jsx-runtime";
2
- import { m as V, a as q, u as S, j as k, v as z, b as M, z as Q, T as j, O as w, F as x, e as H, N as J, X as D, C as P, p as X, k as Y, n as W, l as Z, q as ee } from "./index-CNK4mjp4.js";
1
+ import { jsxs as S, jsx as u } from "react/jsx-runtime";
2
+ import { m as V, a as q, u as N, v as Q, E as k, J as z, T as M, O as j, L as w, F as x, e as H, C as J, Q as D, z as P, p as Y, j as W, n as X, l as Z, q as ee } from "./index-Cs_HlPMV.js";
3
3
  import { useQueries as ae, useQuery as te } from "@tanstack/react-query";
4
- import { useRef as se, useEffect as $, useMemo as E } from "react";
4
+ import { useRef as se, useEffect as $, useMemo as T } from "react";
5
5
  const F = (a, n, d, l, b, r) => {
6
- const t = P(a, n, b), s = t.value, o = X(s);
6
+ const t = P(a, n, b), s = t.value, o = Y(s);
7
7
  let i = s;
8
8
  o === "Image" && (i = /* @__PURE__ */ u(
9
- W,
9
+ X,
10
10
  {
11
11
  imageSrc: s,
12
12
  alt: s,
@@ -25,7 +25,7 @@ const F = (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
- Y,
28
+ W,
29
29
  {
30
30
  header: t.header,
31
31
  value: i,
@@ -59,9 +59,9 @@ const F = (a, n, d, l, b, r) => {
59
59
  title: n = "",
60
60
  hideThumbnail: d
61
61
  }) => {
62
- const { t: l } = S(), b = (r, t, s) => {
62
+ const { t: l } = N(), b = (r, t, s) => {
63
63
  const o = J(r.encounterDetails, l);
64
- return /* @__PURE__ */ N(
64
+ return /* @__PURE__ */ S(
65
65
  D,
66
66
  {
67
67
  title: o,
@@ -113,10 +113,10 @@ const F = (a, n, d, l, b, r) => {
113
113
  conceptNames: d = [],
114
114
  conceptUuid: l = [],
115
115
  hideThumbnail: b = !1
116
- } = n, r = se(/* @__PURE__ */ new Set()), t = V(), { addNotification: s } = q(), { t: o } = S(), i = ae({
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
- queryFn: () => k(e),
119
+ queryFn: () => Q(e),
120
120
  enabled: !!e
121
121
  }))
122
122
  });
@@ -132,17 +132,17 @@ const F = (a, n, d, l, b, r) => {
132
132
  } else e.isError || r.current.delete(h);
133
133
  });
134
134
  }, [i, d]);
135
- const m = E(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), p = E(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), v = E(() => d.length === 0 ? !0 : i.every((e) => !e.isLoading), [i, d.length]), {
135
+ const m = T(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), p = T(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), v = T(() => d.length === 0 ? !0 : i.every((e) => !e.isLoading), [i, d.length]), {
136
136
  data: c,
137
- isLoading: C,
137
+ isLoading: L,
138
138
  isError: O,
139
139
  refetch: R
140
140
  } = te({
141
141
  queryKey: le(t, p),
142
- queryFn: () => z(t, p),
142
+ queryFn: () => k(t, p),
143
143
  enabled: !!t && p.length > 0 && v
144
144
  });
145
- M(
145
+ z(
146
146
  (e) => {
147
147
  e.patientUUID === t && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
148
148
  (h) => p.includes(h)
@@ -156,20 +156,20 @@ const F = (a, n, d, l, b, r) => {
156
156
  type: "error"
157
157
  });
158
158
  }, [O]);
159
- const g = E(() => {
159
+ const f = T(() => {
160
160
  if (!c) return [];
161
- const e = Q(c), h = j(e);
161
+ const e = M(c), h = j(e);
162
162
  return w(h);
163
- }, [c]), G = [
163
+ }, [c]), C = [
164
164
  { key: "name", header: "name" },
165
165
  { key: "value", header: "value" },
166
166
  { key: "form", header: "form" }
167
- ], f = C || !v, _ = O && v, L = (!c || c.entry?.length === 0 || p.length === 0) && v, A = _ ? o("ERROR_FETCHING_OBSERVATIONS") : null, K = L ? o("NO_OBSERVATIONS_FOUND") : void 0, U = g.length > 0 && !f && !_, T = n.titleTranslationKey, y = T ? o(T) : "";
168
- return /* @__PURE__ */ N(
167
+ ], g = L || !v, _ = O && v, G = (!c || c.entry?.length === 0 || p.length === 0) && v, A = _ ? o("ERROR_FETCHING_OBSERVATIONS") : null, K = G ? o("NO_OBSERVATIONS_FOUND") : void 0, U = f.length > 0 && !g && !_, E = n.titleTranslationKey, y = E ? o(E) : "";
168
+ return /* @__PURE__ */ S(
169
169
  "div",
170
170
  {
171
171
  id: "observations",
172
- "data-testid": T ? `observations-${y}` : "observations",
172
+ "data-testid": E ? `observations-${y}` : "observations",
173
173
  "aria-label": "observations-aria-label",
174
174
  className: I.observations,
175
175
  children: [
@@ -177,7 +177,7 @@ const F = (a, n, d, l, b, r) => {
177
177
  x,
178
178
  {
179
179
  id: "observations-title",
180
- testId: T ? `observations-title-${y}` : "observations-title",
180
+ testId: E ? `observations-title-${y}` : "observations-title",
181
181
  title: y,
182
182
  className: I.title,
183
183
  children: /* @__PURE__ */ u("p", { children: y })
@@ -186,17 +186,17 @@ const F = (a, n, d, l, b, r) => {
186
186
  U ? /* @__PURE__ */ u(
187
187
  oe,
188
188
  {
189
- groupedData: g,
189
+ groupedData: f,
190
190
  title: y,
191
191
  hideThumbnail: b
192
192
  }
193
193
  ) : /* @__PURE__ */ u(
194
194
  H,
195
195
  {
196
- headers: G,
196
+ headers: C,
197
197
  rows: [],
198
198
  ariaLabel: o("OBSERVATIONS"),
199
- loading: f,
199
+ loading: g,
200
200
  errorStateMessage: A,
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-CNK4mjp4.js";
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-Cs_HlPMV.js";
2
2
  var Os = (e) => e != null, qs = (e) => e.filter(Os);
3
3
  function _s(e) {
4
4
  return (...t) => {
@@ -1,6 +1,6 @@
1
1
  import { jsx as r, jsxs as p } from "react/jsx-runtime";
2
- import { Y as f, a0 as B, a1 as O, a2 as V, a3 as Z, a4 as ee, a5 as te, a6 as ie, I as ae, a7 as ne, u as Q, a8 as R, a9 as le, aa as re, ab as se, ac as E, ad as F, ae as C, af as Y, ag as x, ah as k, ai as H, x as oe, a as de, G as $, aj as ce, K as me, ak as Ae, al as Ie, am as ue, M as _e, Q as Te, R as Le } from "./index-CNK4mjp4.js";
3
- import { useState as g, useMemo as N, useEffect as h, useRef as ve, useCallback as U } from "react";
2
+ import { $ as f, a0 as B, a1 as O, a2 as V, a3 as Z, a4 as ee, a5 as te, a6 as ie, K as ae, a7 as ne, u as Q, a8 as R, a9 as le, aa as re, ab as se, ac as E, ad as F, ae as C, af as Y, ag as x, ah as k, ai as $, x as oe, a as de, G as H, aj as ce, M as me, ak as Ae, al as Ie, am as ue, R as _e, S as Te, U as Le } from "./index-Cs_HlPMV.js";
3
+ import { useState as g, useMemo as N, useEffect as S, useRef as ve, useCallback as U } from "react";
4
4
  import { useQuery as y, 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 = () => {
6
6
  try {
@@ -82,11 +82,11 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
82
82
  providerUuid: s
83
83
  }))
84
84
  );
85
- }, he = (e) => !e.entry || e.entry.length === 0 ? [] : e.entry.map((a) => ({
85
+ }, Se = (e) => !e.entry || e.entry.length === 0 ? [] : e.entry.map((a) => ({
86
86
  uuid: a.resource?.id ?? "",
87
87
  display: a.resource?.name ?? "",
88
88
  childLocations: []
89
- })), Se = () => {
89
+ })), he = () => {
90
90
  const {
91
91
  data: e,
92
92
  isLoading: a,
@@ -108,7 +108,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
108
108
  const u = await ie(
109
109
  G
110
110
  );
111
- return he(u);
111
+ return Se(u);
112
112
  }
113
113
  return I.filter(
114
114
  (u) => u.tags?.some((v) => v.display === G)
@@ -147,12 +147,12 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
147
147
  dateTimeColumn: Ye,
148
148
  datePicker: xe,
149
149
  timePicker: ke
150
- }, He = ({
150
+ }, $e = ({
151
151
  errors: e,
152
152
  formDataRef: a,
153
153
  onClearErrors: n
154
154
  }) => {
155
- const { t } = Q(), { loginLocations: o, services: c, providers: A, isLoading: L, isError: m } = Se(), [l, s] = g({
155
+ const { t } = Q(), { loginLocations: o, services: c, providers: A, isLoading: L, isError: m } = he(), [l, s] = g({
156
156
  locationUuid: "",
157
157
  selectedServiceItems: [],
158
158
  selectedProviderItems: [],
@@ -212,7 +212,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
212
212
  ),
213
213
  [I]
214
214
  );
215
- return h(() => {
215
+ return S(() => {
216
216
  if (o.length === 0) return;
217
217
  const i = De(), b = o.some(
218
218
  (M) => M.uuid === i
@@ -221,12 +221,12 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
221
221
  ...M,
222
222
  locationUuid: b ? i : ""
223
223
  }));
224
- }, [o]), h(() => {
224
+ }, [o]), S(() => {
225
225
  _.length > 0 && s((i) => ({
226
226
  ...i,
227
227
  selectedServiceItems: v
228
228
  }));
229
- }, [v]), h(() => {
229
+ }, [v]), S(() => {
230
230
  I.length > 0 && s((i) => ({
231
231
  ...i,
232
232
  selectedProviderItems: D
@@ -450,7 +450,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
450
450
  lg: 8,
451
451
  className: d.column,
452
452
  children: /* @__PURE__ */ r(
453
- H,
453
+ $,
454
454
  {
455
455
  id: "service-multiselect",
456
456
  "data-testid": "service-multiselect",
@@ -478,7 +478,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
478
478
  lg: 8,
479
479
  className: d.column,
480
480
  children: /* @__PURE__ */ r(
481
- H,
481
+ $,
482
482
  {
483
483
  id: "provider-multiselect",
484
484
  "data-testid": "provider-multiselect",
@@ -501,13 +501,13 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
501
501
  ]
502
502
  }
503
503
  );
504
- }, $e = "index-module_page__s2h2y", qe = {
505
- page: $e
504
+ }, He = "index-module_page__s2h2y", qe = {
505
+ page: He
506
506
  }, je = () => {
507
- const { t: e } = Q(), a = Ne(), { userPrivileges: n } = oe(), { addNotification: t } = de(), [o, c] = g(!1), [A, L] = g(!1), m = ve(null), [l, s] = g({}), _ = $(
507
+ const { t: e } = Q(), a = Ne(), { userPrivileges: n } = oe(), { addNotification: t } = de(), [o, c] = g(!1), [A, L] = g(!1), m = ve(null), [l, s] = g({}), _ = H(
508
508
  n,
509
509
  q
510
- ), I = $(n, [
510
+ ), I = H(n, [
511
511
  pe,
512
512
  q
513
513
  ]), { data: u, isLoading: v, isError: D } = y({
@@ -537,7 +537,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
537
537
  key: "providerName",
538
538
  header: e("ADMIN_UNAVAILABILITY_COLUMN_PROVIDER")
539
539
  }
540
- ], [e]), M = N(() => u ? u.map((T) => fe(T, e)) : [], [u, e]), S = U(
540
+ ], [e]), M = N(() => u ? u.map((T) => fe(T, e)) : [], [u, e]), h = U(
541
541
  async (T) => {
542
542
  L(!0);
543
543
  try {
@@ -563,8 +563,8 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
563
563
  ), j = U(async () => {
564
564
  if (!m.current) return;
565
565
  const T = ge(m.current, e);
566
- s(T), !(Object.keys(T).length > 0) && await S(Re(m.current, e));
567
- }, [e, S]), W = U(
566
+ s(T), !(Object.keys(T).length > 0) && await h(Re(m.current, e));
567
+ }, [e, h]), W = U(
568
568
  (T) => {
569
569
  s((J) => {
570
570
  const P = { ...J };
@@ -622,7 +622,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
622
622
  onSecondaryButtonClick: z,
623
623
  isSecondaryButtonDisabled: A,
624
624
  content: /* @__PURE__ */ r(
625
- He,
625
+ $e,
626
626
  {
627
627
  errors: l,
628
628
  formDataRef: m,