@bahmni/appointments-app 0.0.1-dev.372 → 0.0.1-dev.374

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,34 +1,34 @@
1
- import { jsxs as S, jsx as u } from "react/jsx-runtime";
2
- import { g as V, G, u as N, v as Q, E as k, f as q, T as z, O as M, L as j, i as w, W as x, C as H, Q as L, z as P, j as W, l as J, m as X, n as Z, o as ee } from "./index-BdfArRxg.js";
1
+ import { jsxs as I, jsx as u } from "react/jsx-runtime";
2
+ import { g as q, G as K, u as N, V as G, h as k, m as w, R as H, D as M, i as Q, j, W as x, O as z, r as D, L as P, E as W, Z, l as J, o as X, q as ee } from "./index-hZSxk8Qj.js";
3
3
  import { useQueries as ae, useQuery as te } from "@tanstack/react-query";
4
- import { useRef as se, useEffect as $, useMemo as R } from "react";
5
- const C = (a, n, d, l, b, r) => {
6
- const t = P(a, n, b), s = t.value, o = W(s);
7
- let i = s;
8
- o === "Image" && (i = /* @__PURE__ */ u(
9
- X,
4
+ import { useRef as se, useEffect as $, useMemo as E } from "react";
5
+ const L = (a, n, d, l, b, r) => {
6
+ const t = P(a, n, b), s = t.value, i = W(s);
7
+ let o = s;
8
+ i === "Image" && (o = /* @__PURE__ */ u(
9
+ J,
10
10
  {
11
11
  imageSrc: s,
12
12
  alt: s,
13
13
  id: `${s}-img`,
14
14
  hideThumbnail: r
15
15
  }
16
- )), o === "Video" && (i = /* @__PURE__ */ u(
17
- Z,
16
+ )), i === "Video" && (o = /* @__PURE__ */ u(
17
+ X,
18
18
  {
19
19
  id: `${s}-video`,
20
20
  videoSrc: s,
21
21
  hideThumbnail: r
22
22
  }
23
- )), o === "PDF" && (i = /* @__PURE__ */ u(ee, { id: `${s}-pdf`, src: s }));
23
+ )), i === "PDF" && (o = /* @__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, v = a.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = l ? `${l}-${v}-${p}-${d}-${n}` : `${v}-${p}-${d}-${n}`;
26
+ }), p = a.display, y = a.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = l ? `${l}-${y}-${p}-${d}-${n}` : `${y}-${p}-${d}-${n}`;
27
27
  return /* @__PURE__ */ u(
28
- J,
28
+ Z,
29
29
  {
30
30
  header: t.header,
31
- value: i,
31
+ value: o,
32
32
  info: m,
33
33
  id: c,
34
34
  testId: c,
@@ -37,15 +37,15 @@ const C = (a, n, d, l, b, r) => {
37
37
  `obs-${a.id}`
38
38
  );
39
39
  }, re = (a, n, d, l, b, r, t) => /* @__PURE__ */ u(
40
- L,
40
+ D,
41
41
  {
42
42
  title: a.display,
43
43
  id: `grouped-obs-${a.display}-${l}`,
44
44
  open: d,
45
45
  children: a.members?.map(
46
- (s, o) => C(
46
+ (s, i) => L(
47
47
  s,
48
- o,
48
+ i,
49
49
  b,
50
50
  r,
51
51
  n,
@@ -54,23 +54,23 @@ const C = (a, n, d, l, b, r) => {
54
54
  )
55
55
  },
56
56
  `grouped-obs-${a.id}`
57
- ), oe = ({
57
+ ), ie = ({
58
58
  groupedData: a,
59
59
  title: n = "",
60
60
  hideThumbnail: d
61
61
  }) => {
62
62
  const { t: l } = N(), b = (r, t, s) => {
63
- const o = H(r.encounterDetails, l);
64
- return /* @__PURE__ */ S(
65
- L,
63
+ const i = z(r.encounterDetails, l);
64
+ return /* @__PURE__ */ I(
65
+ D,
66
66
  {
67
- title: o,
67
+ title: i,
68
68
  id: `encounter-${r.encounterId}`,
69
69
  open: t,
70
70
  children: [
71
71
  r.observations.map(
72
- (i, m) => C(
73
- i,
72
+ (o, m) => L(
73
+ o,
74
74
  m,
75
75
  s,
76
76
  n,
@@ -79,8 +79,8 @@ const C = (a, n, d, l, b, r) => {
79
79
  )
80
80
  ),
81
81
  r.groupedObservations.map(
82
- (i, m) => re(
83
- i,
82
+ (o, m) => re(
83
+ o,
84
84
  l,
85
85
  t,
86
86
  m,
@@ -105,100 +105,100 @@ const C = (a, n, d, l, b, r) => {
105
105
  )
106
106
  }
107
107
  );
108
- }, ie = "Observations-module_observations__RKSyo", ne = "Observations-module_title__TJL3z", I = {
109
- observations: ie,
108
+ }, oe = "Observations-module_observations__RKSyo", ne = "Observations-module_title__TJL3z", S = {
109
+ observations: oe,
110
110
  title: ne
111
111
  }, de = (a) => ["conceptUuid", a], le = (a, n) => ["observations", a, ...n], pe = ({ config: a }) => {
112
112
  const n = a, {
113
113
  conceptNames: d = [],
114
114
  conceptUuid: l = [],
115
115
  hideThumbnail: b = !1
116
- } = n, r = se(/* @__PURE__ */ new Set()), t = V(), { addNotification: s } = G(), { t: o } = N(), i = ae({
116
+ } = n, r = se(/* @__PURE__ */ new Set()), t = q(), { addNotification: s } = K(), { t: i } = N(), o = ae({
117
117
  queries: d.map((e) => ({
118
118
  queryKey: de(e),
119
- queryFn: () => Q(e),
119
+ queryFn: () => G(e),
120
120
  enabled: !!e
121
121
  }))
122
122
  });
123
123
  $(() => {
124
- i.forEach((e, h) => {
124
+ o.forEach((e, h) => {
125
125
  if (e.isError && !r.current.has(h)) {
126
- const K = d[h];
126
+ const B = d[h];
127
127
  s({
128
- title: o("ERROR_DEFAULT_TITLE"),
129
- message: o("ERROR_FETCHING_CONCEPT", { conceptName: K }),
128
+ title: i("ERROR_DEFAULT_TITLE"),
129
+ message: i("ERROR_FETCHING_CONCEPT", { conceptName: B }),
130
130
  type: "error"
131
131
  }), r.current.add(h);
132
132
  } else e.isError || r.current.delete(h);
133
133
  });
134
- }, [i, d]);
135
- const m = R(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), p = R(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), v = R(() => d.length === 0 ? !0 : i.every((e) => !e.isLoading), [i, d.length]), {
134
+ }, [o, d]);
135
+ const m = E(() => o.map((e) => e.data?.uuid).filter((e) => !!e), [o]), p = E(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), y = E(() => d.length === 0 ? !0 : o.every((e) => !e.isLoading), [o, d.length]), {
136
136
  data: c,
137
- isLoading: D,
138
- isError: T,
139
- refetch: O
137
+ isLoading: F,
138
+ isError: O,
139
+ refetch: T
140
140
  } = te({
141
141
  queryKey: le(t, p),
142
142
  queryFn: () => k(t, p),
143
- enabled: !!t && p.length > 0 && v
143
+ enabled: !!t && p.length > 0 && y
144
144
  });
145
- q(
145
+ w(
146
146
  (e) => {
147
147
  e.patientUUID === t && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
148
148
  (h) => p.includes(h)
149
- ) && O();
149
+ ) && T();
150
150
  },
151
- [t, O]
151
+ [t, T]
152
152
  ), $(() => {
153
- T && s({
154
- title: o("ERROR_DEFAULT_TITLE"),
155
- message: o("ERROR_FETCHING_OBSERVATIONS"),
153
+ O && s({
154
+ title: i("ERROR_DEFAULT_TITLE"),
155
+ message: i("ERROR_FETCHING_OBSERVATIONS"),
156
156
  type: "error"
157
157
  });
158
- }, [T]);
159
- const g = R(() => {
158
+ }, [O]);
159
+ const g = E(() => {
160
160
  if (!c) return [];
161
- const e = z(c), h = M(e);
162
- return j(h);
163
- }, [c]), F = [
161
+ const e = H(c), h = M(e);
162
+ return Q(h);
163
+ }, [c]), A = [
164
164
  { key: "name", header: "name" },
165
165
  { key: "value", header: "value" },
166
166
  { key: "form", header: "form" }
167
- ], f = D || !v, _ = T && v, A = (!c || c.entry?.length === 0 || p.length === 0) && v, U = _ ? o("ERROR_FETCHING_OBSERVATIONS") : null, Y = A ? o("NO_OBSERVATIONS_FOUND") : void 0, B = g.length > 0 && !f && !_, E = n.titleTranslationKey, y = E ? o(E) : "";
168
- return /* @__PURE__ */ S(
167
+ ], f = F || !y, _ = O && y, V = (!c || c.entry?.length === 0 || p.length === 0) && y, Y = _ ? i("ERROR_FETCHING_OBSERVATIONS") : null, C = V ? i("NO_OBSERVATIONS_FOUND") : void 0, U = g.length > 0 && !f && !_, v = n.titleTranslationKey, R = v ? i(v) : "";
168
+ return /* @__PURE__ */ I(
169
169
  "div",
170
170
  {
171
171
  id: "observations",
172
- "data-testid": E ? `observations-${y}` : "observations",
172
+ "data-testid": v ? `observations-${R}` : "observations",
173
173
  "aria-label": "observations-aria-label",
174
- className: I.observations,
174
+ className: S.observations,
175
175
  children: [
176
176
  /* @__PURE__ */ u(
177
- w,
177
+ j,
178
178
  {
179
179
  id: "observations-title",
180
- testId: E ? `observations-title-${y}` : "observations-title",
181
- title: y,
182
- className: I.title,
183
- children: /* @__PURE__ */ u("p", { children: y })
180
+ testId: v ? `observations-title-${R}` : "observations-title",
181
+ title: R,
182
+ className: S.title,
183
+ children: /* @__PURE__ */ u("p", { children: R })
184
184
  }
185
185
  ),
186
- B ? /* @__PURE__ */ u(
187
- oe,
186
+ U ? /* @__PURE__ */ u(
187
+ ie,
188
188
  {
189
189
  groupedData: g,
190
- title: y,
190
+ title: R,
191
191
  hideThumbnail: b
192
192
  }
193
193
  ) : /* @__PURE__ */ u(
194
194
  x,
195
195
  {
196
- headers: F,
196
+ headers: A,
197
197
  rows: [],
198
- ariaLabel: o("OBSERVATIONS"),
198
+ ariaLabel: i("OBSERVATIONS"),
199
199
  loading: f,
200
- errorStateMessage: U,
201
- emptyStateMessage: Y,
200
+ errorStateMessage: Y,
201
+ emptyStateMessage: C,
202
202
  dataTestId: "observations-table"
203
203
  }
204
204
  )
@@ -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-BdfArRxg.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-hZSxk8Qj.js";
2
2
  var Os = (e) => e != null, qs = (e) => e.filter(Os);
3
3
  function _s(e) {
4
4
  return (...t) => {
@@ -1,20 +1,20 @@
1
1
  import { jsx as r, jsxs as p } from "react/jsx-runtime";
2
- import { Z as f, a0 as O, a1 as P, a2 as V, a3 as z, a4 as ee, a5 as te, a6 as ie, x 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 k, ah as x, ai as H, X as oe, G as de, t as $, aj as ce, J as me, ak as Ae, al as Ie, am as ue, _ as _e, K as Te, S as Le } from "./index-BdfArRxg.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, z 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 k, ah as x, ai as H, Q as oe, G as de, y as $, aj as ce, B as me, ak as Ae, al as Ie, am as ue, _ as _e, C as Te, K as Le } from "./index-hZSxk8Qj.js";
3
3
  import { useState as g, useMemo as N, useEffect as S, useRef as ve, useCallback as U } from "react";
4
- import { useQuery as y, useQueryClient as Ne } from "@tanstack/react-query";
5
- const be = "Available for appointments", q = "Get Appointment Unavailability", pe = "Add Appointment Unavailability", G = "Appointment Location", De = () => {
4
+ import { useQuery as M, useQueryClient as Ne } from "@tanstack/react-query";
5
+ const be = "Available for appointments", q = "Get Appointment Unavailability", pe = "Add Appointment Unavailability", G = "Appointment Location", ye = () => {
6
6
  try {
7
- return z().uuid;
7
+ return X().uuid;
8
8
  } catch {
9
9
  return "";
10
10
  }
11
11
  }, w = (e) => ({
12
12
  id: "",
13
13
  text: e
14
- }), Me = (e) => ({
14
+ }), De = (e) => ({
15
15
  display: e,
16
16
  uuid: ""
17
- }), ye = (e, a) => {
17
+ }), Me = (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", q = "Get Appointment Unavailability", p
91
91
  data: e,
92
92
  isLoading: a,
93
93
  isError: n
94
- } = y({
94
+ } = M({
95
95
  queryKey: ["currentUser"],
96
96
  queryFn: ee
97
97
  }), {
98
98
  data: t = [],
99
99
  isLoading: o,
100
100
  isError: c
101
- } = y({
101
+ } = M({
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", q = "Get Appointment Unavailability", p
119
119
  data: A = [],
120
120
  isLoading: L,
121
121
  isError: m
122
- } = y({
122
+ } = M({
123
123
  queryKey: ["appointmentServices"],
124
124
  queryFn: ae
125
125
  }), {
126
126
  data: l = [],
127
127
  isLoading: s,
128
128
  isError: _
129
- } = y({
129
+ } = M({
130
130
  queryKey: ["providers"],
131
131
  queryFn: ne
132
132
  });
@@ -173,7 +173,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
173
173
  ),
174
174
  [A]
175
175
  ), u = N(
176
- () => R(!1, !1, o, Me, {
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", q = "Get Appointment Unavailability", p
183
183
  () => R(
184
184
  !1,
185
185
  !1,
186
- ye(
186
+ Me(
187
187
  _,
188
188
  t("ADMIN_UNAVAILABILITY_FORM_ALL_SERVICES")
189
189
  ),
@@ -195,7 +195,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
195
195
  }
196
196
  ),
197
197
  [_]
198
- ), D = N(
198
+ ), y = N(
199
199
  () => R(
200
200
  !1,
201
201
  !1,
@@ -214,11 +214,11 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
214
214
  );
215
215
  return S(() => {
216
216
  if (o.length === 0) return;
217
- const i = De(), b = o.some(
218
- (M) => M.uuid === i
217
+ const i = ye(), b = o.some(
218
+ (D) => D.uuid === i
219
219
  );
220
- s((M) => ({
221
- ...M,
220
+ s((D) => ({
221
+ ...D,
222
222
  locationUuid: b ? i : ""
223
223
  }));
224
224
  }, [o]), S(() => {
@@ -229,9 +229,9 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
229
229
  }, [v]), S(() => {
230
230
  I.length > 0 && s((i) => ({
231
231
  ...i,
232
- selectedProviderItems: D
232
+ selectedProviderItems: y
233
233
  }));
234
- }, [D]), a.current = {
234
+ }, [y]), a.current = {
235
235
  ...l,
236
236
  filteredServicesCount: _.length,
237
237
  availableProvidersCount: I.length
@@ -484,7 +484,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
484
484
  "data-testid": "provider-multiselect",
485
485
  titleText: t("ADMIN_UNAVAILABILITY_FORM_PROVIDER_LABEL"),
486
486
  placeholder: t("ADMIN_UNAVAILABILITY_FORM_PROVIDER_LABEL"),
487
- items: D,
487
+ items: y,
488
488
  itemToString: (i) => i?.text ?? "",
489
489
  selectedItems: l.selectedProviderItems,
490
490
  onChange: (i) => s({
@@ -510,7 +510,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
510
510
  ), I = $(n, [
511
511
  pe,
512
512
  q
513
- ]), { data: u, isLoading: v, isError: D } = y({
513
+ ]), { data: u, isLoading: v, isError: y } = M({
514
514
  queryKey: ["appointmentUnavailabilities"],
515
515
  queryFn: ce,
516
516
  enabled: _
@@ -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]), h = U(
540
+ ], [e]), D = N(() => u ? u.map((T) => fe(T, e)) : [], [u, e]), h = U(
541
541
  async (T) => {
542
542
  L(!0);
543
543
  try {
@@ -572,7 +572,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
572
572
  });
573
573
  },
574
574
  []
575
- ), X = U(() => {
575
+ ), z = U(() => {
576
576
  c(!1), m.current = null, s({});
577
577
  }, []);
578
578
  return /* @__PURE__ */ r(
@@ -595,10 +595,10 @@ const be = "Available for appointments", q = "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: M,
598
+ rows: D,
599
599
  ariaLabel: "unavailability-table",
600
600
  loading: v,
601
- errorStateMessage: D ? e("ADMIN_UNAVAILABILITY_ERROR_MESSAGE") : null,
601
+ errorStateMessage: y ? e("ADMIN_UNAVAILABILITY_ERROR_MESSAGE") : null,
602
602
  emptyStateMessage: e("ADMIN_UNAVAILABILITY_EMPTY_MESSAGE"),
603
603
  actionButton: !o && I ? {
604
604
  label: e("ADMIN_UNAVAILABILITY_ADD_BUTTON"),
@@ -619,7 +619,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
619
619
  onPrimaryButtonClick: j,
620
620
  isPrimaryButtonDisabled: A,
621
621
  secondaryButtonText: e("ADMIN_UNAVAILABILITY_FORM_CANCEL"),
622
- onSecondaryButtonClick: X,
622
+ onSecondaryButtonClick: z,
623
623
  isSecondaryButtonDisabled: A,
624
624
  content: /* @__PURE__ */ r(
625
625
  He,
@@ -1,12 +1,12 @@
1
1
  import { jsx as a, jsxs as y } from "react/jsx-runtime";
2
- import { B as V, A as O, u as C, F as P, q as B, G, X as h, t as L, x, J as U, U as q, _ as F, K as H, S as k, M as K, P as Q, R as $ } from "./index-BdfArRxg.js";
2
+ import { v as V, A as O, u as C, F as P, w as G, G as h, Q as B, y as L, z as x, B as U, U as F, _ as q, C as H, K as Q, N as k, X as j, Y as w } from "./index-hZSxk8Qj.js";
3
3
  import { useState as I, useMemo as c } from "react";
4
- import { useQueryClient as j, useQuery as w } from "@tanstack/react-query";
5
- const W = V(
4
+ import { useQueryClient as K, useQuery as Y } from "@tanstack/react-query";
5
+ const $ = V(
6
6
  O,
7
7
  "useAppointmentsConfig",
8
8
  "AppointmentsConfigProvider"
9
- ), Y = ({
9
+ ), W = ({
10
10
  serviceName: e,
11
11
  isDeleting: i,
12
12
  onConfirm: t,
@@ -36,9 +36,9 @@ const W = V(
36
36
  "speciality",
37
37
  "durationMins",
38
38
  "description"
39
- ], X = "app:appointments:manageServices", Z = "app:appointments:adminTab", J = "index-module_page__Gsfbu", z = "index-module_noPrivilegeContainer__Pu5WZ", ee = "index-module_table__GAPmb", d = {
40
- page: J,
41
- noPrivilegeContainer: z,
39
+ ], Z = "app:appointments:manageServices", z = "app:appointments:adminTab", X = "index-module_page__Gsfbu", J = "index-module_noPrivilegeContainer__Pu5WZ", ee = "index-module_table__GAPmb", d = {
40
+ page: X,
41
+ noPrivilegeContainer: J,
42
42
  table: ee
43
43
  };
44
44
  function te(e) {
@@ -49,7 +49,7 @@ function ie(e, i) {
49
49
  ...e.map((t) => ({
50
50
  key: t,
51
51
  header: i(
52
- `ADMIN_ALL_SERVICES_COLUMN_${B(t)}`
52
+ `ADMIN_ALL_SERVICES_COLUMN_${G(t)}`
53
53
  )
54
54
  })),
55
55
  {
@@ -75,28 +75,28 @@ function ae(e, i) {
75
75
  }));
76
76
  }
77
77
  const oe = () => {
78
- const { t: e } = C(), i = j(), { addNotification: t } = G(), { userPrivileges: s } = h(), { appointmentsConfig: n } = W(), [E, _] = I(null), [M, p] = I(!1), l = n?.serviceTableFields ?? [
78
+ const { t: e } = C(), i = K(), { addNotification: t } = h(), { userPrivileges: s } = B(), { appointmentsConfig: n } = $(), [E, _] = I(null), [b, p] = I(!1), l = n?.serviceTableFields ?? [
79
79
  ...u
80
- ], S = L(s, Z), b = L(
80
+ ], m = L(s, z), M = L(
81
81
  s,
82
- X
83
- ), m = c(
82
+ Z
83
+ ), S = c(
84
84
  () => te(l),
85
85
  [l]
86
- ), { data: A, isLoading: v, isError: R } = w({
86
+ ), { data: A, isLoading: v, isError: D } = Y({
87
87
  queryKey: ["allAppointmentServices"],
88
88
  queryFn: x,
89
- enabled: S
90
- }), D = c(
89
+ enabled: m
90
+ }), N = c(
91
91
  () => ie(l, e),
92
92
  [l]
93
- ), N = c(
94
- () => ae(A ?? [], m),
95
- [A, m]
93
+ ), R = c(
94
+ () => ae(A ?? [], S),
95
+ [A, S]
96
96
  ), g = async () => {
97
97
  p(!0);
98
98
  try {
99
- await $(E.id), t({
99
+ await w(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,26 +112,26 @@ const oe = () => {
112
112
  p(!1);
113
113
  }
114
114
  }, T = (r, o) => o === "actions" ? /* @__PURE__ */ a(
115
- K,
115
+ k,
116
116
  {
117
117
  id: `delete-service-${r.id}-btn`,
118
118
  testId: `delete-service-${r.id}-btn-test-id`,
119
119
  "aria-label": `delete-service-${r.id}-btn-aria-label`,
120
120
  kind: "ghost",
121
121
  label: e("ADMIN_ALL_SERVICES_DELETE_ICON_LABEL"),
122
- disabled: !b,
122
+ disabled: !M,
123
123
  onClick: () => _(r),
124
- children: /* @__PURE__ */ a(Q, {})
124
+ children: /* @__PURE__ */ a(j, {})
125
125
  }
126
126
  ) : u.includes(o) ? r[o] ?? "-" : r.attributes[o] ?? "-", f = [
127
127
  { id: "home", label: e("BREADCRUMB_HOME"), href: U },
128
128
  { id: "admin", label: e("BREADCRUMB_ADMIN"), isCurrentPage: !0 }
129
129
  ];
130
130
  return /* @__PURE__ */ a(
131
- q,
131
+ F,
132
132
  {
133
- header: /* @__PURE__ */ a(H, { breadcrumbItems: f, userMenu: /* @__PURE__ */ a(k, {}) }),
134
- main: S ? /* @__PURE__ */ y(
133
+ header: /* @__PURE__ */ a(H, { breadcrumbItems: f, userMenu: /* @__PURE__ */ a(Q, {}) }),
134
+ main: m ? /* @__PURE__ */ y(
135
135
  "div",
136
136
  {
137
137
  id: "all-appointment-service-page",
@@ -140,25 +140,25 @@ const oe = () => {
140
140
  className: d.page,
141
141
  children: [
142
142
  /* @__PURE__ */ a(
143
- F,
143
+ q,
144
144
  {
145
145
  id: "all-services",
146
146
  title: e("ADMIN_ALL_SERVICES_TITLE"),
147
- headers: D,
148
- rows: N,
147
+ headers: N,
148
+ rows: R,
149
149
  ariaLabel: "all-services-table",
150
150
  loading: v,
151
- errorStateMessage: R ? e("ADMIN_ALL_SERVICES_ERROR_MESSAGE") : null,
151
+ errorStateMessage: D ? e("ADMIN_ALL_SERVICES_ERROR_MESSAGE") : null,
152
152
  emptyStateMessage: e("ADMIN_ALL_SERVICES_EMPTY_MESSAGE"),
153
153
  renderCell: T,
154
154
  className: d.table
155
155
  }
156
156
  ),
157
157
  E && /* @__PURE__ */ a(
158
- Y,
158
+ W,
159
159
  {
160
160
  serviceName: E.name,
161
- isDeleting: M,
161
+ isDeleting: b,
162
162
  onConfirm: g,
163
163
  onCancel: () => _(null)
164
164
  }