@bahmni/appointments-app 0.0.1-dev.329 → 0.0.1-dev.330

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,12 +1,12 @@
1
1
  import { jsxs as S, jsx as u } from "react/jsx-runtime";
2
- import { n as B, o as M, u as N, h as K, i as k, j as H, H as Q, M as j, x as P, k as w, O as G, V as z, q as x, l as J, C as Y, r as W, _ as X, P as Z, R as ee } from "./index-Bjd0Amzt.js";
3
- import { useQueries as te, useQuery as ae } from "@tanstack/react-query";
4
- import { useRef as se, useEffect as $, useMemo as E } from "react";
5
- const C = (t, n, d, l, b, r) => {
6
- const a = J(t, n, b), s = a.value, o = Y(s);
2
+ import { a as B, q as k, u as N, l as K, j as H, U as j, V as w, y as M, H as x, k as G, R as z, m as P, n as Q, E as W, o as J, r as X, t as Y, W as Z, w as ee } from "./index-CAumuTLR.js";
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 U = (a, n, d, l, b, r) => {
6
+ const t = W(a, n, b), s = t.value, o = J(s);
7
7
  let i = s;
8
8
  o === "Image" && (i = /* @__PURE__ */ u(
9
- X,
9
+ Y,
10
10
  {
11
11
  imageSrc: s,
12
12
  alt: s,
@@ -22,54 +22,54 @@ const C = (t, n, d, l, b, r) => {
22
22
  }
23
23
  )), o === "PDF" && (i = /* @__PURE__ */ u(ee, { id: `${s}-pdf`, src: s }));
24
24
  const m = b("OBSERVATIONS_RECORDED_BY", {
25
- provider: a.provider
26
- }), p = t.display, y = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = l ? `${l}-${y}-${p}-${d}-${n}` : `${y}-${p}-${d}-${n}`;
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}`;
27
27
  return /* @__PURE__ */ u(
28
- W,
28
+ X,
29
29
  {
30
- header: a.header,
30
+ header: t.header,
31
31
  value: i,
32
32
  info: m,
33
33
  id: c,
34
34
  testId: c,
35
35
  ariaLabel: c
36
36
  },
37
- `obs-${t.id}`
37
+ `obs-${a.id}`
38
38
  );
39
- }, re = (t, n, d, l, b, r, a) => /* @__PURE__ */ u(
40
- x,
39
+ }, re = (a, n, d, l, b, r, t) => /* @__PURE__ */ u(
40
+ Q,
41
41
  {
42
- title: t.display,
43
- id: `grouped-obs-${t.display}-${l}`,
42
+ title: a.display,
43
+ id: `grouped-obs-${a.display}-${l}`,
44
44
  open: d,
45
- children: t.members?.map(
46
- (s, o) => C(
45
+ children: a.members?.map(
46
+ (s, o) => U(
47
47
  s,
48
48
  o,
49
49
  b,
50
50
  r,
51
51
  n,
52
- a
52
+ t
53
53
  )
54
54
  )
55
55
  },
56
- `grouped-obs-${t.id}`
56
+ `grouped-obs-${a.id}`
57
57
  ), oe = ({
58
- groupedData: t,
58
+ groupedData: a,
59
59
  title: n = "",
60
60
  hideThumbnail: d
61
61
  }) => {
62
- const { t: l } = N(), b = (r, a, s) => {
63
- const o = z(r.encounterDetails, l);
62
+ const { t: l } = N(), b = (r, t, s) => {
63
+ const o = P(r.encounterDetails, l);
64
64
  return /* @__PURE__ */ S(
65
- x,
65
+ Q,
66
66
  {
67
67
  title: o,
68
68
  id: `encounter-${r.encounterId}`,
69
- open: a,
69
+ open: t,
70
70
  children: [
71
71
  r.observations.map(
72
- (i, m) => C(
72
+ (i, m) => U(
73
73
  i,
74
74
  m,
75
75
  s,
@@ -82,7 +82,7 @@ const C = (t, n, d, l, b, r) => {
82
82
  (i, m) => re(
83
83
  i,
84
84
  l,
85
- a,
85
+ t,
86
86
  m,
87
87
  s,
88
88
  n,
@@ -100,27 +100,27 @@ const C = (t, n, d, l, b, r) => {
100
100
  id: "obs-by-encounter",
101
101
  "data-testid": "obs-by-encounter-test-id",
102
102
  "aria-label": "obs-by-encounter-aria-label",
103
- children: t.map(
104
- (r, a) => b(r, a === 0, a)
103
+ children: a.map(
104
+ (r, t) => b(r, t === 0, t)
105
105
  )
106
106
  }
107
107
  );
108
108
  }, ie = "Observations-module_observations__RKSyo", ne = "Observations-module_title__TJL3z", I = {
109
109
  observations: ie,
110
110
  title: ne
111
- }, de = (t) => ["conceptUuid", t], le = (t, n) => ["observations", t, ...n], pe = ({ config: t }) => {
112
- const n = t, {
111
+ }, de = (a) => ["conceptUuid", a], le = (a, n) => ["observations", a, ...n], pe = ({ config: a }) => {
112
+ const n = a, {
113
113
  conceptNames: d = [],
114
114
  conceptUuid: l = [],
115
115
  hideThumbnail: b = !1
116
- } = n, r = se(/* @__PURE__ */ new Set()), a = B(), { addNotification: s } = M(), { t: o } = N(), i = te({
116
+ } = n, r = se(/* @__PURE__ */ new Set()), t = B(), { addNotification: s } = k(), { t: o } = N(), i = ae({
117
117
  queries: d.map((e) => ({
118
118
  queryKey: de(e),
119
119
  queryFn: () => K(e),
120
120
  enabled: !!e
121
121
  }))
122
122
  });
123
- $(() => {
123
+ _(() => {
124
124
  i.forEach((e, h) => {
125
125
  if (e.isError && !r.current.has(h)) {
126
126
  const q = d[h];
@@ -132,73 +132,73 @@ const C = (t, 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]), y = E(() => d.length === 0 ? !0 : i.every((e) => !e.isLoading), [i, d.length]), {
135
+ const m = R(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), p = R(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), y = R(() => d.length === 0 ? !0 : i.every((e) => !e.isLoading), [i, d.length]), {
136
136
  data: c,
137
137
  isLoading: D,
138
- isError: O,
139
- refetch: T
140
- } = ae({
141
- queryKey: le(a, p),
142
- queryFn: () => k(a, p),
143
- enabled: !!a && p.length > 0 && y
138
+ isError: T,
139
+ refetch: $
140
+ } = te({
141
+ queryKey: le(t, p),
142
+ queryFn: () => H(t, p),
143
+ enabled: !!t && p.length > 0 && y
144
144
  });
145
- H(
145
+ j(
146
146
  (e) => {
147
- e.patientUUID === a && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
147
+ e.patientUUID === t && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
148
148
  (h) => p.includes(h)
149
- ) && T();
149
+ ) && $();
150
150
  },
151
- [a, T]
152
- ), $(() => {
153
- O && s({
151
+ [t, $]
152
+ ), _(() => {
153
+ T && s({
154
154
  title: o("ERROR_DEFAULT_TITLE"),
155
155
  message: o("ERROR_FETCHING_OBSERVATIONS"),
156
156
  type: "error"
157
157
  });
158
- }, [O]);
159
- const _ = E(() => {
158
+ }, [T]);
159
+ const g = R(() => {
160
160
  if (!c) return [];
161
- const e = Q(c), h = j(e);
162
- return P(h);
161
+ const e = w(c), h = M(e);
162
+ return x(h);
163
163
  }, [c]), F = [
164
164
  { key: "name", header: "name" },
165
165
  { key: "value", header: "value" },
166
166
  { key: "form", header: "form" }
167
- ], g = D || !y, f = O && y, L = (!c || c.entry?.length === 0 || p.length === 0) && y, A = f ? o("ERROR_FETCHING_OBSERVATIONS") : null, V = L ? o("NO_OBSERVATIONS_FOUND") : void 0, U = _.length > 0 && !g && !f, R = n.titleTranslationKey, v = R ? o(R) : "";
167
+ ], O = D || !y, f = T && y, L = (!c || c.entry?.length === 0 || p.length === 0) && y, A = f ? o("ERROR_FETCHING_OBSERVATIONS") : null, C = L ? o("NO_OBSERVATIONS_FOUND") : void 0, V = g.length > 0 && !O && !f, E = n.titleTranslationKey, v = E ? o(E) : "";
168
168
  return /* @__PURE__ */ S(
169
169
  "div",
170
170
  {
171
171
  id: "observations",
172
- "data-testid": R ? `observations-${v}` : "observations",
172
+ "data-testid": E ? `observations-${v}` : "observations",
173
173
  "aria-label": "observations-aria-label",
174
174
  className: I.observations,
175
175
  children: [
176
176
  /* @__PURE__ */ u(
177
- w,
177
+ G,
178
178
  {
179
179
  id: "observations-title",
180
- testId: R ? `observations-title-${v}` : "observations-title",
180
+ testId: E ? `observations-title-${v}` : "observations-title",
181
181
  title: v,
182
182
  className: I.title,
183
183
  children: /* @__PURE__ */ u("p", { children: v })
184
184
  }
185
185
  ),
186
- U ? /* @__PURE__ */ u(
186
+ V ? /* @__PURE__ */ u(
187
187
  oe,
188
188
  {
189
- groupedData: _,
189
+ groupedData: g,
190
190
  title: v,
191
191
  hideThumbnail: b
192
192
  }
193
193
  ) : /* @__PURE__ */ u(
194
- G,
194
+ z,
195
195
  {
196
196
  headers: F,
197
197
  rows: [],
198
198
  ariaLabel: o("OBSERVATIONS"),
199
- loading: g,
199
+ loading: O,
200
200
  errorStateMessage: A,
201
- emptyStateMessage: V,
201
+ emptyStateMessage: C,
202
202
  dataTestId: "observations-table"
203
203
  }
204
204
  )
@@ -1,4 +1,4 @@
1
- import { ak as we, al as z, am as xt, an as B, ai as q, aj as y, ao as Ro, ap as ye, aq as R, ar as _, as as k, at as N, au as A, av as bs, aw as ir, ax as $e, ay as U, az as Hn, aA as Vn, aB as dt, aC as D, aD as xs, aE as cn, aF as Be, aG as ws, aH as qt, aI as zt, aJ as $s, aK as Cs, aL as $n, aM as Ss, aN as Nr, aO as Bt, aP as zo, aQ as ks, aR as Es, aS as j, aT as Ur, aU as Ms, aV as Ds, aW as sr, aX as As, aY as Ts, aZ as zn, a_ as Fs, a$ as Is, b0 as Z, b1 as Ps, b2 as Ls } from "./index-Bjd0Amzt.js";
1
+ import { ak as we, al as z, am as xt, an as B, ai as q, aj as y, ao as Ro, ap as ye, aq as R, ar as _, as as k, at as N, au as A, av as bs, aw as ir, ax as $e, ay as U, az as Hn, aA as Vn, aB as dt, aC as D, aD as xs, aE as cn, aF as Be, aG as ws, aH as qt, aI as zt, aJ as $s, aK as Cs, aL as $n, aM as Ss, aN as Nr, aO as Bt, aP as zo, aQ as ks, aR as Es, aS as j, aT as Ur, aU as Ms, aV as Ds, aW as sr, aX as As, aY as Ts, aZ as zn, a_ as Fs, a$ as Is, b0 as Z, b1 as Ps, b2 as Ls } from "./index-CAumuTLR.js";
2
2
  var Os = (e) => e != null, qs = (e) => e.filter(Os);
3
3
  function _s(e) {
4
4
  return (...t) => {
@@ -1,8 +1,8 @@
1
- import { jsx as r, jsxs as b } from "react/jsx-runtime";
2
- import { W as f, S as P, T as O, Y as V, X as Z, Z as ee, $ as te, a0 as ie, F as ae, a1 as ne, u as Q, a2 as R, a3 as le, a4 as re, a5 as se, a6 as E, a7 as F, a8 as C, a9 as Y, aa as x, ab as k, ac as H, y as oe, o as de, z as $, ad as ce, B as me, ae as Ae, af as Ie, ag as ue, J as _e, K as Te } from "./index-Bjd0Amzt.js";
1
+ import { jsx as r, jsxs as p } from "react/jsx-runtime";
2
+ import { M as f, N as B, O, Q as V, S as Z, T as ee, Y as te, a0 as ie, X as ae, a1 as ne, u as Q, a2 as R, a3 as le, a4 as re, a5 as se, a6 as E, a7 as F, a8 as C, a9 as Y, aa as x, ab as k, ac as H, C as oe, q as de, D as $, ad as ce, F as me, ae as Ae, af as Ie, ag as ue, I as _e, J as Te } from "./index-CAumuTLR.js";
3
3
  import { useState as g, useMemo as N, useEffect as S, useRef as Le, useCallback as U } from "react";
4
4
  import { useQuery as M, useQueryClient as ve } from "@tanstack/react-query";
5
- const Ne = "Available for appointments", q = "Get Appointment Unavailability", pe = "Add Appointment Unavailability", w = "Appointment Location", be = () => {
5
+ const Ne = "Available for appointments", q = "Get Appointment Unavailability", be = "Add Appointment Unavailability", w = "Appointment Location", pe = () => {
6
6
  try {
7
7
  return Z().uuid;
8
8
  } catch {
@@ -11,10 +11,10 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
11
11
  }, G = (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,
@@ -47,9 +47,9 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
47
47
  }), Ue = (e, a) => {
48
48
  const n = {}, t = a("ADMIN_UNAVAILABILITY_FORM_REQUIRED");
49
49
  if (e.locationUuid || (n.location = t), e.startDate || (n.startDate = t), e.startTime || (n.startTime = t), e.endDate || (n.endDate = t), e.endTime || (n.endTime = t), e.startDate && e.startTime && e.endDate && e.endTime && e.startDate.toDateString() === e.endDate.toDateString()) {
50
- const o = P(
50
+ const o = B(
51
51
  `${e.startTime} ${e.startTimePeriod}`
52
- ), c = P(
52
+ ), c = B(
53
53
  `${e.endTime} ${e.endTimePeriod}`
54
54
  );
55
55
  o !== null && c !== null && c <= o && (n.dateTime = a("ADMIN_UNAVAILABILITY_DATETIME_ERROR_MESSAGE"));
@@ -137,10 +137,10 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
137
137
  isLoading: a || o || L || s,
138
138
  isError: n || c || m || _
139
139
  };
140
- }, he = "UnavailabilityForm-module_formContent__WmNHR", Be = "UnavailabilityForm-module_formField__8he7o", Pe = "UnavailabilityForm-module_loading__IDEY6", Oe = "UnavailabilityForm-module_error__jDeOm", Ve = "UnavailabilityForm-module_grid__t6NKR", Fe = "UnavailabilityForm-module_column__QFdnQ", Ce = "UnavailabilityForm-module_dateTimeColumn__6bi0F", Ye = "UnavailabilityForm-module_datePicker__6HgbO", xe = "UnavailabilityForm-module_timePicker__DHNpK", d = {
140
+ }, he = "UnavailabilityForm-module_formContent__WmNHR", Pe = "UnavailabilityForm-module_formField__8he7o", Be = "UnavailabilityForm-module_loading__IDEY6", Oe = "UnavailabilityForm-module_error__jDeOm", Ve = "UnavailabilityForm-module_grid__t6NKR", Fe = "UnavailabilityForm-module_column__QFdnQ", Ce = "UnavailabilityForm-module_dateTimeColumn__6bi0F", Ye = "UnavailabilityForm-module_datePicker__6HgbO", xe = "UnavailabilityForm-module_timePicker__DHNpK", d = {
141
141
  formContent: he,
142
- formField: Be,
143
- loading: Pe,
142
+ formField: Pe,
143
+ loading: Be,
144
144
  error: Oe,
145
145
  grid: Ve,
146
146
  column: Fe,
@@ -168,12 +168,12 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
168
168
  ), I = N(
169
169
  () => A.filter(
170
170
  (i) => i.attributes?.some(
171
- (p) => p.attributeType?.display === Ne && p.value
171
+ (b) => b.attributeType?.display === Ne && b.value
172
172
  )
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 Ne = "Available for appointments", q = "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
  ),
@@ -195,7 +195,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
195
195
  }
196
196
  ),
197
197
  [_]
198
- ), y = N(
198
+ ), D = N(
199
199
  () => R(
200
200
  !1,
201
201
  !1,
@@ -214,12 +214,12 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
214
214
  );
215
215
  return S(() => {
216
216
  if (o.length === 0) return;
217
- const i = be(), p = o.some(
218
- (D) => D.uuid === i
217
+ const i = pe(), b = o.some(
218
+ (y) => y.uuid === i
219
219
  );
220
- s((D) => ({
221
- ...D,
222
- locationUuid: p ? i : ""
220
+ s((y) => ({
221
+ ...y,
222
+ locationUuid: b ? i : ""
223
223
  }));
224
224
  }, [o]), S(() => {
225
225
  _.length > 0 && s((i) => ({
@@ -229,9 +229,9 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
229
229
  }, [v]), S(() => {
230
230
  I.length > 0 && s((i) => ({
231
231
  ...i,
232
- selectedProviderItems: y
232
+ selectedProviderItems: D
233
233
  }));
234
- }, [y]), a.current = {
234
+ }, [D]), a.current = {
235
235
  ...l,
236
236
  filteredServicesCount: _.length,
237
237
  availableProvidersCount: I.length
@@ -250,7 +250,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
250
250
  className: d.error,
251
251
  children: t("ADMIN_UNAVAILABILITY_FORM_LOAD_ERROR_MESSAGE")
252
252
  }
253
- ) : /* @__PURE__ */ b(
253
+ ) : /* @__PURE__ */ p(
254
254
  "div",
255
255
  {
256
256
  id: "unavailability-form-content",
@@ -281,7 +281,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
281
281
  invalidText: e.location
282
282
  }
283
283
  ) }),
284
- /* @__PURE__ */ b(
284
+ /* @__PURE__ */ p(
285
285
  se,
286
286
  {
287
287
  id: "unavailability-form-grid",
@@ -289,7 +289,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
289
289
  "aria-label": "unavailability-form-grid-aria-label",
290
290
  className: d.grid,
291
291
  children: [
292
- /* @__PURE__ */ b(
292
+ /* @__PURE__ */ p(
293
293
  E,
294
294
  {
295
295
  id: "unavailability-form-start-date-time",
@@ -341,7 +341,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
341
341
  pattern: "(1[012]|[0-9]):[0-5][0-9]",
342
342
  use24HourFormat: !1,
343
343
  className: d.timePicker,
344
- children: /* @__PURE__ */ b(
344
+ children: /* @__PURE__ */ p(
345
345
  k,
346
346
  {
347
347
  id: "start-time-period",
@@ -364,7 +364,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
364
364
  ]
365
365
  }
366
366
  ),
367
- /* @__PURE__ */ b(
367
+ /* @__PURE__ */ p(
368
368
  E,
369
369
  {
370
370
  id: "unavailability-form-end-date-time",
@@ -416,7 +416,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
416
416
  pattern: "(1[012]|[0-9]):[0-5][0-9]",
417
417
  use24HourFormat: !1,
418
418
  className: d.timePicker,
419
- children: /* @__PURE__ */ b(
419
+ children: /* @__PURE__ */ p(
420
420
  k,
421
421
  {
422
422
  id: "end-time-period",
@@ -484,7 +484,7 @@ const Ne = "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: y,
487
+ items: D,
488
488
  itemToString: (i) => i?.text ?? "",
489
489
  selectedItems: l.selectedProviderItems,
490
490
  onChange: (i) => s({
@@ -508,9 +508,9 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
508
508
  n,
509
509
  q
510
510
  ), I = $(n, [
511
- pe,
511
+ be,
512
512
  q
513
- ]), { data: u, isLoading: v, isError: y } = M({
513
+ ]), { data: u, isLoading: v, isError: D } = M({
514
514
  queryKey: ["appointmentUnavailabilities"],
515
515
  queryFn: ce,
516
516
  enabled: _
@@ -522,7 +522,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
522
522
  href: "/appointments"
523
523
  },
524
524
  { id: "admin", label: e("BREADCRUMB_ADMIN"), isCurrentPage: !0 }
525
- ], p = N(() => [
525
+ ], b = N(() => [
526
526
  { key: "startDateTime", header: e("ADMIN_UNAVAILABILITY_COLUMN_START") },
527
527
  { key: "endDateTime", header: e("ADMIN_UNAVAILABILITY_COLUMN_END") },
528
528
  {
@@ -537,7 +537,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
537
537
  key: "providerName",
538
538
  header: e("ADMIN_UNAVAILABILITY_COLUMN_PROVIDER")
539
539
  }
540
- ], [e]), D = N(() => u ? u.map((T) => ge(T, e)) : [], [u, e]), h = U(
540
+ ], [e]), y = N(() => u ? u.map((T) => ge(T, e)) : [], [u, e]), h = U(
541
541
  async (T) => {
542
542
  L(!0);
543
543
  try {
@@ -564,15 +564,15 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
564
564
  if (!m.current) return;
565
565
  const T = Ue(m.current, e);
566
566
  s(T), !(Object.keys(T).length > 0) && await h(fe(m.current, e));
567
- }, [e, h]), W = U(
567
+ }, [e, h]), J = U(
568
568
  (T) => {
569
- s((z) => {
570
- const B = { ...z };
571
- return T.forEach((X) => delete B[X]), B;
569
+ s((X) => {
570
+ const P = { ...X };
571
+ return T.forEach((z) => delete P[z]), P;
572
572
  });
573
573
  },
574
574
  []
575
- ), J = U(() => {
575
+ ), W = U(() => {
576
576
  c(!1), m.current = null, s({});
577
577
  }, []);
578
578
  return /* @__PURE__ */ r(
@@ -594,11 +594,11 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
594
594
  "data-testid": "appointment-unavailability-actions-table-test-id",
595
595
  "aria-label": "appointment-unavailability-actions-table-aria-label",
596
596
  title: e("ADMIN_UNAVAILABILITY_TITLE"),
597
- headers: p,
598
- rows: D,
597
+ headers: b,
598
+ rows: y,
599
599
  ariaLabel: "unavailability-table",
600
600
  loading: v,
601
- errorStateMessage: y ? e("ADMIN_UNAVAILABILITY_ERROR_MESSAGE") : null,
601
+ errorStateMessage: D ? 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,14 +619,14 @@ const Ne = "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: J,
622
+ onSecondaryButtonClick: W,
623
623
  isSecondaryButtonDisabled: A,
624
624
  content: /* @__PURE__ */ r(
625
625
  ke,
626
626
  {
627
627
  errors: l,
628
628
  formDataRef: m,
629
- onClearErrors: W
629
+ onClearErrors: J
630
630
  }
631
631
  )
632
632
  }