@bahmni/appointments-app 0.0.1-dev.380 → 0.0.1-dev.382

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 x } from "react/jsx-runtime";
2
- import { g as G, u as W, Z as Y, w as Z, m as J, a as X, K as ee, p as te } from "./index-Dj6Y8Rrb.js";
2
+ import { g as G, u as W, Z as Y, E as Z, m as J, a as X, K as ee, p as te } from "./index-Djz7NxTJ.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 = {
@@ -1,25 +1,25 @@
1
- import { jsx as i, jsxs as z, Fragment as ye } from "react/jsx-runtime";
2
- import { u as ge, g as be, b as Oe, J as Ne, c as Te, d as Ie, W as Ee, f as Ae, L as _e, e as ve, G as Fe, H as Le, s as $, a as Be, x as G, i as P, m as Se, K as Q, k as Me, B as Re, p as Ce, h as Ue, j as ke } from "./index-Dj6Y8Rrb.js";
1
+ import { jsx as i, jsxs as z, Fragment as ge } from "react/jsx-runtime";
2
+ import { u as ye, g as be, b as Oe, J as Ne, c as Te, v as Ie, G as Ee, d as ve, L as Ae, f as _e, e as Fe, x as Se, s as G, a as Be, h as $, i as P, m as Le, K as Q, k as Me, B as Re, p as Ce, j as Ue, S as ke } from "./index-Djz7NxTJ.js";
3
3
  import { useQueryClient as De, useQuery as N } from "@tanstack/react-query";
4
4
  import { useState as J, useMemo as d, useCallback as c } from "react";
5
- const qe = "FormsTable-module_formsTableBody__SvGha", He = "FormsTable-module_modalHeading__wnTmA", we = "FormsTable-module_customAccordianItem__isszs", T = {
5
+ const qe = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_modalHeading__wnTmA", He = "FormsTable-module_customAccordianItem__isszs", T = {
6
6
  formsTableBody: qe,
7
- modalHeading: He,
8
- customAccordianItem: we
9
- }, Ve = "startConsultation", $e = ({
7
+ modalHeading: we,
8
+ customAccordianItem: He
9
+ }, Ve = "startConsultation", Ge = ({
10
10
  episodeOfCareUuids: B,
11
11
  encounterUuids: m,
12
- config: W,
13
- disableActions: Y = !1,
12
+ config: Y,
13
+ disableActions: Z = !1,
14
14
  activeEncounterUuid: p = null
15
15
  }) => {
16
- const { t: n } = ge(), u = be(), [y, S] = J(!1), [s, M] = J(null), {
17
- numberOfVisits: Z,
16
+ const { t: n } = ye(), u = be(), [g, L] = J(!1), [s, M] = J(null), {
17
+ numberOfVisits: W,
18
18
  hideThumbnail: X = !1,
19
- forms: g
20
- } = W ?? {}, ee = Oe(
19
+ forms: y
20
+ } = Y ?? {}, ee = Oe(
21
21
  ke.EDIT_OBSERVATIONS
22
- ), { userPrivileges: b } = Ne(), I = ee && !Y && !!p, R = Te(
22
+ ), { userPrivileges: b } = Ne(), I = ee && !Z && !!p, R = Te(
23
23
  B,
24
24
  m
25
25
  ), re = De(), {
@@ -30,16 +30,16 @@ const qe = "FormsTable-module_formsTableBody__SvGha", He = "FormsTable-module_mo
30
30
  refetch: ae
31
31
  } = N({
32
32
  queryKey: ["forms", u, B],
33
- queryFn: () => Ie(u, void 0, Z),
33
+ queryFn: () => Ie(u, void 0, W),
34
34
  enabled: !!u && !R
35
35
  }), D = d(() => {
36
36
  let e = C;
37
37
  return m && m.length > 0 && (e = e.filter(
38
38
  (r) => m.includes(r.encounterUuid)
39
- )), Array.isArray(g) && g.length > 0 && (e = e.filter(
40
- (r) => g.some((o) => o.toLowerCase() === r.formName.toLowerCase())
39
+ )), Array.isArray(y) && y.length > 0 && (e = e.filter(
40
+ (r) => y.some((o) => o.toLowerCase() === r.formName.toLowerCase())
41
41
  )), e;
42
- }, [C, m, g]), { data: O = [] } = N({
42
+ }, [C, m, y]), { data: O = [] } = N({
43
43
  queryKey: ["observationForms"],
44
44
  queryFn: () => Ee()
45
45
  }), q = c(
@@ -56,38 +56,38 @@ const qe = "FormsTable-module_formsTableBody__SvGha", He = "FormsTable-module_mo
56
56
  ), f = c(
57
57
  (e) => !p || e.encounterUuid !== p ? !1 : q(e.formName),
58
58
  [p, q]
59
- ), H = c(
59
+ ), w = c(
60
60
  (e) => O.find((r) => r.name === e)?.uuid,
61
61
  [O]
62
62
  ), E = d(() => {
63
63
  if (s)
64
- return H(s.formName);
65
- }, [s, H]), {
64
+ return w(s.formName);
65
+ }, [s, w]), {
66
66
  data: l,
67
67
  isLoading: te,
68
68
  isError: se,
69
- error: A
69
+ error: v
70
70
  } = N({
71
71
  queryKey: ["formMetadata", E],
72
- queryFn: () => Ae(E),
73
- enabled: !!E && y
72
+ queryFn: () => ve(E),
73
+ enabled: !!E && g
74
74
  }), {
75
- data: _,
75
+ data: A,
76
76
  isLoading: ne,
77
77
  isError: ie,
78
- error: v
78
+ error: _
79
79
  } = N({
80
80
  queryKey: ["formsEncounterFHIR", s?.encounterUuid],
81
- queryFn: () => _e(s.encounterUuid),
82
- enabled: !!s?.encounterUuid && y
81
+ queryFn: () => Ae(s.encounterUuid),
82
+ enabled: !!s?.encounterUuid && g
83
83
  });
84
- ve(
84
+ _e(
85
85
  (e) => {
86
86
  e.patientUUID === u && (ae(), re.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
87
87
  },
88
88
  [u]
89
89
  );
90
- const de = d(() => !_?.entry || !s?.formName ? [] : _.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => Fe(e) ? Le(e)?.toLowerCase() === s.formName.toLowerCase() : !0), [_, s?.formName]), le = d(() => {
90
+ const de = d(() => !A?.entry || !s?.formName ? [] : A.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => Fe(e) ? Se(e)?.toLowerCase() === s.formName.toLowerCase() : !0), [A, s?.formName]), le = d(() => {
91
91
  if (!l?.schema) return;
92
92
  const e = [], r = (o) => {
93
93
  (o ?? []).forEach((t) => {
@@ -103,8 +103,8 @@ const qe = "FormsTable-module_formsTableBody__SvGha", He = "FormsTable-module_mo
103
103
  const e = {}, r = (o, t) => {
104
104
  for (const a of o)
105
105
  if (a.type === "section") {
106
- const L = a.label?.value ?? "Section";
107
- r(a.controls ?? [], L);
106
+ const S = a.label?.value ?? "Section";
107
+ r(a.controls ?? [], S);
108
108
  } else
109
109
  a.id != null && t && (e[String(a.id)] = t), a.controls && r(a.controls, t);
110
110
  };
@@ -124,22 +124,22 @@ const qe = "FormsTable-module_formsTableBody__SvGha", He = "FormsTable-module_mo
124
124
  l.schema.controls ?? []
125
125
  ), Object.keys(e).length > 0 ? e : void 0;
126
126
  }, [l]), ue = d(() => {
127
- if (A)
128
- return $(A).message;
129
127
  if (v)
130
- return $(v).message;
131
- }, [A, v]), h = d(
128
+ return G(v).message;
129
+ if (_)
130
+ return G(_).message;
131
+ }, [v, _]), h = d(
132
132
  () => [
133
133
  { key: "recordedOn", header: n("RECORDED_ON") },
134
134
  { key: "recordedBy", header: n("RECORDED_BY") }
135
135
  ],
136
136
  [n]
137
- ), w = d(
137
+ ), H = d(
138
138
  () => [...h, { key: "actions", header: n("ACTIONS") }],
139
139
  [h, n]
140
140
  ), fe = c(
141
- (e) => I && e.some((r) => f(r)) ? w : h,
142
- [I, f, w, h]
141
+ (e) => I && e.some((r) => f(r)) ? H : h,
142
+ [I, f, H, h]
143
143
  ), he = h, pe = d(
144
144
  () => [
145
145
  { key: "recordedOn", sortable: !0 },
@@ -151,7 +151,7 @@ const qe = "FormsTable-module_formsTableBody__SvGha", He = "FormsTable-module_mo
151
151
  (r, o) => {
152
152
  const t = o.formName;
153
153
  r[t] ??= [];
154
- const a = o.providers.map((L) => L.providerName).filter(Boolean).join(", ");
154
+ const a = o.providers.map((S) => S.providerName).filter(Boolean).join(", ");
155
155
  return r[t].push({
156
156
  id: o.encounterUuid,
157
157
  formName: o.formName,
@@ -172,9 +172,9 @@ const qe = "FormsTable-module_formsTableBody__SvGha", He = "FormsTable-module_mo
172
172
  })
173
173
  ).sort((r, o) => r.formName.localeCompare(o.formName));
174
174
  }, [D, n]), j = c((e) => {
175
- M(e), S(!0);
175
+ M(e), L(!0);
176
176
  }, []), x = c(() => {
177
- S(!1), M(null);
177
+ L(!1), M(null);
178
178
  }, []), F = c((e) => {
179
179
  globalThis.dispatchEvent(
180
180
  new CustomEvent(Ve, {
@@ -191,12 +191,12 @@ const qe = "FormsTable-module_formsTableBody__SvGha", He = "FormsTable-module_mo
191
191
  (e, r) => {
192
192
  switch (r) {
193
193
  case "recordedOn":
194
- return /* @__PURE__ */ i(Se, { onClick: () => j(e), children: e.recordedOn });
194
+ return /* @__PURE__ */ i(Le, { onClick: () => j(e), children: e.recordedOn });
195
195
  case "recordedBy":
196
196
  return e.recordedBy;
197
197
  case "actions":
198
198
  return f(e) ? /* @__PURE__ */ i(
199
- G,
199
+ $,
200
200
  {
201
201
  label: n("EDIT_OBSERVATION_FORM"),
202
202
  kind: "ghost",
@@ -212,7 +212,7 @@ const qe = "FormsTable-module_formsTableBody__SvGha", He = "FormsTable-module_mo
212
212
  },
213
213
  [j, F, f, n]
214
214
  );
215
- return /* @__PURE__ */ z(ye, { children: [
215
+ return /* @__PURE__ */ z(ge, { children: [
216
216
  /* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: U || k || V.length === 0 || R ? /* @__PURE__ */ i(
217
217
  Q,
218
218
  {
@@ -254,17 +254,17 @@ const qe = "FormsTable-module_formsTableBody__SvGha", He = "FormsTable-module_mo
254
254
  o
255
255
  );
256
256
  }) }) }),
257
- y && s && /* @__PURE__ */ i(
257
+ g && s && /* @__PURE__ */ i(
258
258
  Ce,
259
259
  {
260
260
  id: "modalIdForActionAreaLayout",
261
261
  portalId: "main-display-area",
262
- open: y,
262
+ open: g,
263
263
  onRequestClose: x,
264
264
  modalHeading: /* @__PURE__ */ z("div", { className: T.modalHeading, children: [
265
265
  /* @__PURE__ */ i("span", { children: s.formName }),
266
266
  I && f(s) && /* @__PURE__ */ i(
267
- G,
267
+ $,
268
268
  {
269
269
  label: n("EDIT_OBSERVATION_FORM"),
270
270
  kind: "ghost",
@@ -301,5 +301,5 @@ const qe = "FormsTable-module_formsTableBody__SvGha", He = "FormsTable-module_mo
301
301
  ] });
302
302
  };
303
303
  export {
304
- $e as default
304
+ Ge as default
305
305
  };
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-BHRptUkI.js";
2
- import { an as p, ao as d, ap as e } from "./index-Dj6Y8Rrb.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-DfQ5OM73.js";
2
+ import { an as p, ao as d, ap as e } from "./index-Djz7NxTJ.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-BHRptUkI.js";
2
- import { an as v, ao as C, ap as e } from "./index-Dj6Y8Rrb.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-DfQ5OM73.js";
2
+ import { an as v, ao as C, ap as e } from "./index-Djz7NxTJ.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 N, jsx as u } from "react/jsx-runtime";
2
- import { g as B, Z as M, u as S, l as k, n as w, e as x, o as H, N as Q, A as z, q as G, K as j, M as P, r as A, t as Z, C as J, v as Y, y as W, z as X, V as ee } from "./index-Dj6Y8Rrb.js";
2
+ import { g as q, Z as w, u as S, l as H, w as k, f as z, _ as Q, C as x, z as G, n as M, K as Y, N as j, Y as A, A as P, o as Z, q as J, y as W, H as X, V as ee } from "./index-Djz7NxTJ.js";
3
3
  import { useQueries as ae, useQuery as te } from "@tanstack/react-query";
4
- import { useRef as se, useEffect as _, useMemo as g } from "react";
4
+ import { useRef as se, useEffect as I, useMemo as g } from "react";
5
5
  const C = (a, n, d, l, b, r) => {
6
- const t = Z(a, n, b), s = t.value, o = J(s);
6
+ const t = P(a, n, b), s = t.value, o = Z(s);
7
7
  let i = s;
8
8
  o === "Image" && (i = /* @__PURE__ */ u(
9
9
  W,
@@ -23,9 +23,9 @@ const C = (a, n, d, l, b, r) => {
23
23
  )), o === "PDF" && (i = /* @__PURE__ */ u(ee, { id: `${s}-pdf`, src: s }));
24
24
  const m = b("OBSERVATIONS_RECORDED_BY", {
25
25
  provider: t.provider
26
- }), p = a.display, y = a.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = l ? `${l}-${y}-${p}-${d}-${n}` : `${y}-${p}-${d}-${n}`;
26
+ }), p = a.display, h = a.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = l ? `${l}-${h}-${p}-${d}-${n}` : `${h}-${p}-${d}-${n}`;
27
27
  return /* @__PURE__ */ u(
28
- Y,
28
+ J,
29
29
  {
30
30
  header: t.header,
31
31
  value: i,
@@ -60,7 +60,7 @@ const C = (a, n, d, l, b, r) => {
60
60
  hideThumbnail: d
61
61
  }) => {
62
62
  const { t: l } = S(), b = (r, t, s) => {
63
- const o = P(r.encounterDetails, l);
63
+ const o = j(r.encounterDetails, l);
64
64
  return /* @__PURE__ */ N(
65
65
  A,
66
66
  {
@@ -113,43 +113,43 @@ const C = (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 = B(), { addNotification: s } = M(), { t: o } = S(), i = ae({
116
+ } = n, r = se(/* @__PURE__ */ new Set()), t = q(), { addNotification: s } = w(), { t: o } = S(), i = ae({
117
117
  queries: d.map((e) => ({
118
118
  queryKey: de(e),
119
- queryFn: () => k(e),
119
+ queryFn: () => H(e),
120
120
  enabled: !!e
121
121
  }))
122
122
  });
123
- _(() => {
124
- i.forEach((e, h) => {
125
- if (e.isError && !r.current.has(h)) {
126
- const q = d[h];
123
+ I(() => {
124
+ i.forEach((e, y) => {
125
+ if (e.isError && !r.current.has(y)) {
126
+ const B = d[y];
127
127
  s({
128
128
  title: o("ERROR_DEFAULT_TITLE"),
129
- message: o("ERROR_FETCHING_CONCEPT", { conceptName: q }),
129
+ message: o("ERROR_FETCHING_CONCEPT", { conceptName: B }),
130
130
  type: "error"
131
- }), r.current.add(h);
132
- } else e.isError || r.current.delete(h);
131
+ }), r.current.add(y);
132
+ } else e.isError || r.current.delete(y);
133
133
  });
134
134
  }, [i, d]);
135
- const m = g(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), p = g(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), y = g(() => d.length === 0 ? !0 : i.every((e) => !e.isLoading), [i, d.length]), {
135
+ const m = g(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), p = g(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), h = g(() => d.length === 0 ? !0 : i.every((e) => !e.isLoading), [i, d.length]), {
136
136
  data: c,
137
137
  isLoading: D,
138
138
  isError: R,
139
139
  refetch: T
140
140
  } = te({
141
141
  queryKey: le(t, p),
142
- queryFn: () => w(t, p),
143
- enabled: !!t && p.length > 0 && y
142
+ queryFn: () => k(t, p),
143
+ enabled: !!t && p.length > 0 && h
144
144
  });
145
- x(
145
+ z(
146
146
  (e) => {
147
147
  e.patientUUID === t && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
148
- (h) => p.includes(h)
148
+ (y) => p.includes(y)
149
149
  ) && T();
150
150
  },
151
151
  [t, T]
152
- ), _(() => {
152
+ ), I(() => {
153
153
  R && s({
154
154
  title: o("ERROR_DEFAULT_TITLE"),
155
155
  message: o("ERROR_FETCHING_OBSERVATIONS"),
@@ -158,13 +158,13 @@ const C = (a, n, d, l, b, r) => {
158
158
  }, [R]);
159
159
  const f = g(() => {
160
160
  if (!c) return [];
161
- const e = H(c), h = Q(e);
162
- return z(h);
161
+ const e = Q(c), y = x(e);
162
+ return G(y);
163
163
  }, [c]), F = [
164
164
  { key: "name", header: "name" },
165
165
  { key: "value", header: "value" },
166
166
  { key: "form", header: "form" }
167
- ], O = D || !y, I = R && y, L = (!c || c.entry?.length === 0 || p.length === 0) && y, K = I ? o("ERROR_FETCHING_OBSERVATIONS") : null, V = L ? o("NO_OBSERVATIONS_FOUND") : void 0, U = f.length > 0 && !O && !I, E = n.titleTranslationKey, v = E ? o(E) : "";
167
+ ], O = D || !h, _ = R && h, L = (!c || c.entry?.length === 0 || p.length === 0) && h, K = _ ? o("ERROR_FETCHING_OBSERVATIONS") : null, V = L ? o("NO_OBSERVATIONS_FOUND") : void 0, U = f.length > 0 && !O && !_, E = n.titleTranslationKey, v = E ? o(E) : "";
168
168
  return /* @__PURE__ */ N(
169
169
  "div",
170
170
  {
@@ -174,7 +174,7 @@ const C = (a, n, d, l, b, r) => {
174
174
  className: $.observations,
175
175
  children: [
176
176
  /* @__PURE__ */ u(
177
- G,
177
+ M,
178
178
  {
179
179
  id: "observations-title",
180
180
  testId: E ? `observations-title-${v}` : "observations-title",
@@ -191,7 +191,7 @@ const C = (a, n, d, l, b, r) => {
191
191
  hideThumbnail: b
192
192
  }
193
193
  ) : /* @__PURE__ */ u(
194
- j,
194
+ Y,
195
195
  {
196
196
  headers: F,
197
197
  rows: [],
@@ -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-Dj6Y8Rrb.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-Djz7NxTJ.js";
2
2
  var Os = (e) => e != null, qs = (e) => e.filter(Os);
3
3
  function _s(e) {
4
4
  return (...t) => {
@@ -1,12 +1,12 @@
1
1
  import { jsx as i, jsxs as y } from "react/jsx-runtime";
2
- import { D as V, E as O, u as C, F as P, I as h, Z as B, J as G, O as L, P as x, Q as U, R as F, S as q, T as k, U as Q, X as $, Y as j, _ as w } from "./index-Dj6Y8Rrb.js";
2
+ import { I as V, r as O, u as C, F as P, t as h, Z as B, J as G, D as L, M as x, O as U, P as F, Q as q, R as k, T as Q, U as W, W as $, X as j } from "./index-Djz7NxTJ.js";
3
3
  import { useState as I, useMemo as _ } from "react";
4
- import { useQueryClient as H, useQuery as K } from "@tanstack/react-query";
5
- const W = V(
4
+ import { useQueryClient as w, useQuery as H } from "@tanstack/react-query";
5
+ const K = V(
6
6
  O,
7
7
  "useAppointmentsConfig",
8
8
  "AppointmentsConfigProvider"
9
- ), Y = ({
9
+ ), Z = ({
10
10
  serviceName: e,
11
11
  isDeleting: a,
12
12
  onConfirm: t,
@@ -36,7 +36,7 @@ const W = V(
36
36
  "speciality",
37
37
  "durationMins",
38
38
  "description"
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 = {
39
+ ], J = "app:appointments:manageServices", Y = "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 ie(e, a) {
75
75
  }));
76
76
  }
77
77
  const oe = () => {
78
- const { t: e } = C(), a = H(), { addNotification: t } = B(), { userPrivileges: s } = G(), { appointmentsConfig: n } = W(), [E, c] = I(null), [b, p] = I(!1), l = n?.serviceTableFields ?? [
78
+ const { t: e } = C(), a = w(), { addNotification: t } = B(), { userPrivileges: s } = G(), { appointmentsConfig: n } = K(), [E, c] = I(null), [b, p] = I(!1), l = n?.serviceTableFields ?? [
79
79
  ...u
80
- ], S = L(s, J), M = L(
80
+ ], m = L(s, Y), M = L(
81
81
  s,
82
- Z
83
- ), m = _(
82
+ J
83
+ ), S = _(
84
84
  () => te(l),
85
85
  [l]
86
- ), { data: A, isLoading: D, isError: v } = K({
86
+ ), { data: A, isLoading: R, isError: v } = H({
87
87
  queryKey: ["allAppointmentServices"],
88
88
  queryFn: x,
89
- enabled: S
90
- }), R = _(
89
+ enabled: m
90
+ }), D = _(
91
91
  () => ae(l, e),
92
92
  [l]
93
93
  ), N = _(
94
- () => ie(A ?? [], m),
95
- [A, m]
94
+ () => ie(A ?? [], S),
95
+ [A, S]
96
96
  ), g = async () => {
97
97
  p(!0);
98
98
  try {
99
- await w(E.id), t({
99
+ await j(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__ */ i(
115
- $,
115
+ W,
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: () => c(r),
124
- children: /* @__PURE__ */ i(j, {})
124
+ children: /* @__PURE__ */ i($, {})
125
125
  }
126
126
  ) : u.includes(o) ? r[o] ?? "-" : r.attributes[o] ?? "-", f = [
127
127
  { id: "home", label: e("BREADCRUMB_HOME"), href: U },
@@ -131,7 +131,7 @@ const oe = () => {
131
131
  F,
132
132
  {
133
133
  header: /* @__PURE__ */ i(k, { breadcrumbItems: f, userMenu: /* @__PURE__ */ i(Q, {}) }),
134
- main: S ? /* @__PURE__ */ y(
134
+ main: m ? /* @__PURE__ */ y(
135
135
  "div",
136
136
  {
137
137
  id: "all-appointment-service-page",
@@ -144,10 +144,10 @@ const oe = () => {
144
144
  {
145
145
  id: "all-services",
146
146
  title: e("ADMIN_ALL_SERVICES_TITLE"),
147
- headers: R,
147
+ headers: D,
148
148
  rows: N,
149
149
  ariaLabel: "all-services-table",
150
- loading: D,
150
+ loading: R,
151
151
  errorStateMessage: v ? e("ADMIN_ALL_SERVICES_ERROR_MESSAGE") : null,
152
152
  emptyStateMessage: e("ADMIN_ALL_SERVICES_EMPTY_MESSAGE"),
153
153
  renderCell: T,
@@ -155,7 +155,7 @@ const oe = () => {
155
155
  }
156
156
  ),
157
157
  E && /* @__PURE__ */ i(
158
- Y,
158
+ Z,
159
159
  {
160
160
  serviceName: E.name,
161
161
  isDeleting: b,
@@ -1,7 +1,7 @@
1
1
  import { jsx as r, jsxs as p } from "react/jsx-runtime";
2
- import { $ as f, a0 as O, a1 as P, a2 as V, a3 as X, a4 as ee, a5 as te, a6 as ie, P as ae, a7 as ne, u as Q, a8 as R, a9 as le, aa as re, ab as se, ac as U, ad as C, ae as F, af as Y, ag as k, ah as x, ai as $, J as oe, Z as de, O as q, aj as ce, Q as me, ak as Ae, al as Ie, am as ue, S as _e, T as Te, U as Le } from "./index-Dj6Y8Rrb.js";
2
+ import { $ as f, a0 as O, a1 as P, a2 as V, a3 as X, a4 as ee, a5 as te, a6 as ie, M as ae, a7 as ne, u as Q, a8 as R, a9 as le, aa as re, ab as se, ac as U, ad as C, ae as F, af as Y, ag as k, ah as x, ai as $, J as oe, Z as de, D as q, aj as ce, O as me, ak as Ae, al as Ie, am as ue, Q as _e, R as Te, T as Le } from "./index-Djz7NxTJ.js";
3
3
  import { useState as g, useMemo as N, useEffect as h, useRef as ve, useCallback as E } from "react";
4
- import { useQuery as D, useQueryClient as Ne } from "@tanstack/react-query";
4
+ import { useQuery as y, useQueryClient as Ne } from "@tanstack/react-query";
5
5
  const be = "Available for appointments", w = "Get Appointment Unavailability", pe = "Add Appointment Unavailability", G = "Appointment Location", Me = () => {
6
6
  try {
7
7
  return X().uuid;
@@ -11,10 +11,10 @@ const be = "Available for appointments", w = "Get Appointment Unavailability", p
11
11
  }, H = (e) => ({
12
12
  id: "",
13
13
  text: e
14
- }), ye = (e) => ({
14
+ }), De = (e) => ({
15
15
  display: e,
16
16
  uuid: ""
17
- }), De = (e, a) => {
17
+ }), ye = (e, a) => {
18
18
  const n = e.map((t) => ({
19
19
  id: t.uuid,
20
20
  text: t.name,
@@ -91,14 +91,14 @@ const be = "Available for appointments", w = "Get Appointment Unavailability", p
91
91
  data: e,
92
92
  isLoading: a,
93
93
  isError: n
94
- } = D({
94
+ } = y({
95
95
  queryKey: ["currentUser"],
96
96
  queryFn: ee
97
97
  }), {
98
98
  data: t = [],
99
99
  isLoading: o,
100
100
  isError: c
101
- } = D({
101
+ } = y({
102
102
  queryKey: ["providerLoginLocations", e?.uuid],
103
103
  queryFn: async () => {
104
104
  const I = await te(
@@ -119,14 +119,14 @@ const be = "Available for appointments", w = "Get Appointment Unavailability", p
119
119
  data: A = [],
120
120
  isLoading: L,
121
121
  isError: m
122
- } = D({
122
+ } = y({
123
123
  queryKey: ["appointmentServices"],
124
124
  queryFn: ae
125
125
  }), {
126
126
  data: l = [],
127
127
  isLoading: s,
128
128
  isError: _
129
- } = D({
129
+ } = y({
130
130
  queryKey: ["providers"],
131
131
  queryFn: ne
132
132
  });
@@ -173,7 +173,7 @@ const be = "Available for appointments", w = "Get Appointment Unavailability", p
173
173
  ),
174
174
  [A]
175
175
  ), u = N(
176
- () => R(!1, !1, o, ye, {
176
+ () => R(!1, !1, o, De, {
177
177
  loading: "",
178
178
  error: "",
179
179
  empty: t("ADMIN_UNAVAILABILITY_FORM_NO_LOCATIONS")
@@ -183,7 +183,7 @@ const be = "Available for appointments", w = "Get Appointment Unavailability", p
183
183
  () => R(
184
184
  !1,
185
185
  !1,
186
- De(
186
+ ye(
187
187
  _,
188
188
  t("ADMIN_UNAVAILABILITY_FORM_ALL_SERVICES")
189
189
  ),
@@ -215,10 +215,10 @@ const be = "Available for appointments", w = "Get Appointment Unavailability", p
215
215
  return h(() => {
216
216
  if (o.length === 0) return;
217
217
  const i = Me(), b = o.some(
218
- (y) => y.uuid === i
218
+ (D) => D.uuid === i
219
219
  );
220
- s((y) => ({
221
- ...y,
220
+ s((D) => ({
221
+ ...D,
222
222
  locationUuid: b ? i : ""
223
223
  }));
224
224
  }, [o]), h(() => {
@@ -510,7 +510,7 @@ const be = "Available for appointments", w = "Get Appointment Unavailability", p
510
510
  ), I = q(n, [
511
511
  pe,
512
512
  w
513
- ]), { data: u, isLoading: v, isError: M } = D({
513
+ ]), { data: u, isLoading: v, isError: M } = y({
514
514
  queryKey: ["appointmentUnavailabilities"],
515
515
  queryFn: ce,
516
516
  enabled: _
@@ -537,7 +537,7 @@ const be = "Available for appointments", w = "Get Appointment Unavailability", p
537
537
  key: "providerName",
538
538
  header: e("ADMIN_UNAVAILABILITY_COLUMN_PROVIDER")
539
539
  }
540
- ], [e]), y = N(() => u ? u.map((T) => fe(T, e)) : [], [u, e]), S = E(
540
+ ], [e]), D = N(() => u ? u.map((T) => fe(T, e)) : [], [u, e]), S = E(
541
541
  async (T) => {
542
542
  L(!0);
543
543
  try {
@@ -595,7 +595,7 @@ const be = "Available for appointments", w = "Get Appointment Unavailability", p
595
595
  "aria-label": "appointment-unavailability-actions-table-aria-label",
596
596
  title: e("ADMIN_UNAVAILABILITY_TITLE"),
597
597
  headers: b,
598
- rows: y,
598
+ rows: D,
599
599
  ariaLabel: "unavailability-table",
600
600
  loading: v,
601
601
  errorStateMessage: M ? e("ADMIN_UNAVAILABILITY_ERROR_MESSAGE") : null,