@bahmni/appointments-app 0.0.1-dev.273 → 0.0.1-dev.275

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
- import { jsx as n, jsxs as y } from "react/jsx-runtime";
2
- import { p as V, q as h, a as C, r as O, v as P, h as B, x, B as L, D as G, E as q, F as U, H as F, I as $, L as k, N as w, O as H } from "./index-Btq8SR5P.js";
1
+ import { jsx as n, jsxs as f } from "react/jsx-runtime";
2
+ import { N as V, w as h, a as C, z as O, D as P, h as B, F as G, Y as L, G as x, H as U, I as q, J as F, K as w, M as Y, O as $, P as k } from "./index-DsIJbVEt.js";
3
3
  import { useState as I, useMemo as _ } from "react";
4
- import { useQueryClient as j, useQuery as K } from "@tanstack/react-query";
5
- const Q = V(
4
+ import { useQueryClient as H, useQuery as K } from "@tanstack/react-query";
5
+ const j = V(
6
6
  h,
7
7
  "useAppointmentsConfig",
8
8
  "AppointmentsConfigProvider"
9
- ), W = ({
9
+ ), Q = ({
10
10
  serviceName: e,
11
11
  isDeleting: a,
12
12
  onConfirm: t,
@@ -36,7 +36,7 @@ const Q = V(
36
36
  "speciality",
37
37
  "durationMins",
38
38
  "description"
39
- ], Y = "app:appointments:manageServices", z = "app:appointments:adminTab", J = "index-module_page__Gsfbu", Z = "index-module_noPrivilegeContainer__Pu5WZ", X = "index-module_table__GAPmb", d = {
39
+ ], W = "app:appointments:manageServices", z = "app:appointments:adminTab", J = "index-module_page__Gsfbu", Z = "index-module_noPrivilegeContainer__Pu5WZ", X = "index-module_table__GAPmb", d = {
40
40
  page: J,
41
41
  noPrivilegeContainer: Z,
42
42
  table: X
@@ -75,28 +75,28 @@ function ae(e, a) {
75
75
  }));
76
76
  }
77
77
  const le = () => {
78
- const { t: e } = C(), a = j(), { addNotification: t } = B(), { userPrivileges: s } = x(), { appointmentsConfig: i } = Q(), [E, c] = I(null), [b, u] = I(!1), l = i?.serviceTableFields ?? [
78
+ const { t: e } = C(), a = H(), { addNotification: t } = B(), { userPrivileges: s } = G(), { appointmentsConfig: i } = j(), [E, c] = I(null), [M, u] = I(!1), l = i?.serviceTableFields ?? [
79
79
  ...p
80
- ], m = L(s, z), v = L(
80
+ ], m = L(s, z), b = L(
81
81
  s,
82
- Y
82
+ W
83
83
  ), S = _(
84
84
  () => ee(l),
85
85
  [l]
86
- ), { data: A, isLoading: M, isError: D } = K({
86
+ ), { data: A, isLoading: v, isError: D } = K({
87
87
  queryKey: ["allAppointmentServices"],
88
- queryFn: G,
88
+ queryFn: x,
89
89
  enabled: m
90
- }), R = _(
90
+ }), N = _(
91
91
  () => te(l, e),
92
92
  [l]
93
- ), N = _(
93
+ ), R = _(
94
94
  () => ae(A ?? [], S),
95
95
  [A, S]
96
96
  ), g = async () => {
97
97
  u(!0);
98
98
  try {
99
- await H(E.id), t({
99
+ await k(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 le = () => {
112
112
  u(!1);
113
113
  }
114
114
  }, T = (r, o) => o === "actions" ? /* @__PURE__ */ n(
115
- k,
115
+ Y,
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: !v,
122
+ disabled: !b,
123
123
  onClick: () => c(r),
124
- children: /* @__PURE__ */ n(w, {})
124
+ children: /* @__PURE__ */ n($, {})
125
125
  }
126
- ) : p.includes(o) ? r[o] ?? "-" : r.attributes[o] ?? "-", f = [
127
- { id: "home", label: e("BREADCRUMB_HOME"), href: q },
126
+ ) : p.includes(o) ? r[o] ?? "-" : r.attributes[o] ?? "-", y = [
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__ */ n(
131
- U,
131
+ q,
132
132
  {
133
- header: /* @__PURE__ */ n($, { breadcrumbItems: f }),
134
- main: m ? /* @__PURE__ */ y(
133
+ header: /* @__PURE__ */ n(w, { breadcrumbItems: y }),
134
+ main: m ? /* @__PURE__ */ f(
135
135
  "div",
136
136
  {
137
137
  id: "all-appointment-service-page",
@@ -144,10 +144,10 @@ const le = () => {
144
144
  {
145
145
  id: "all-services",
146
146
  title: e("ADMIN_ALL_SERVICES_TITLE"),
147
- headers: R,
148
- rows: N,
147
+ headers: N,
148
+ rows: R,
149
149
  ariaLabel: "all-services-table",
150
- loading: M,
150
+ loading: v,
151
151
  errorStateMessage: D ? e("ADMIN_ALL_SERVICES_ERROR_MESSAGE") : null,
152
152
  emptyStateMessage: e("ADMIN_ALL_SERVICES_EMPTY_MESSAGE"),
153
153
  renderCell: T,
@@ -155,10 +155,10 @@ const le = () => {
155
155
  }
156
156
  ),
157
157
  E && /* @__PURE__ */ n(
158
- W,
158
+ Q,
159
159
  {
160
160
  serviceName: E.name,
161
- isDeleting: b,
161
+ isDeleting: M,
162
162
  onConfirm: g,
163
163
  onCancel: () => c(null)
164
164
  }
@@ -1,20 +1,20 @@
1
- import { jsx as r, jsxs as p } from "react/jsx-runtime";
2
- import { P as g, U as S, V as B, W as P, Z as X, $ as ee, _ as te, a0 as ie, D as ae, a1 as ne, a as K, a2 as f, a3 as le, a4 as re, a5 as se, a6 as M, a7 as O, a8 as V, a9 as F, aa as C, ab as Y, ac as x, x as oe, h as de, B as k, ad as ce, E as me, ae as Ae, af as Ie, ag as ue, H as _e, I as Te } from "./index-Btq8SR5P.js";
3
- import { useState as U, useMemo as N, useEffect as $, useRef as Le, useCallback as E } from "react";
4
- import { useQuery as D, 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 = () => {
1
+ import { jsx as r, jsxs as b } from "react/jsx-runtime";
2
+ import { Q as f, S as B, U as O, W as V, X as z, $ as ee, Z as te, a0 as ie, G as ae, a1 as ne, a 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 $, F as oe, h as de, Y as q, ad as ce, H as me, ae as Ae, af as Ie, ag as ue, J as _e, K as Te } from "./index-DsIJbVEt.js";
3
+ import { useState as g, useMemo as N, useEffect as h, useRef as Le, useCallback as U } from "react";
4
+ import { useQuery as M, useQueryClient as ve } from "@tanstack/react-query";
5
+ const Ne = "Available for appointments", w = "Get Appointment Unavailability", pe = "Add Appointment Unavailability", G = "Appointment Location", be = () => {
6
6
  try {
7
- return X().uuid;
7
+ return z().uuid;
8
8
  } catch {
9
9
  return "";
10
10
  }
11
- }, G = (e) => ({
11
+ }, H = (e) => ({
12
12
  id: "",
13
13
  text: e
14
- }), De = (e) => ({
14
+ }), ye = (e) => ({
15
15
  display: e,
16
16
  uuid: ""
17
- }), ye = (e, a) => {
17
+ }), De = (e, a) => {
18
18
  const n = e.map((t) => ({
19
19
  id: t.uuid,
20
20
  text: t.name,
@@ -38,18 +38,18 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
38
38
  }), n;
39
39
  }, Ee = (e, a) => ({
40
40
  locationUuid: e.locationUuid,
41
- startDate: g(e.startDate, a, !1, P).formattedResult,
42
- startTime: B(
41
+ startDate: f(e.startDate, a, !1, V).formattedResult,
42
+ startTime: O(
43
43
  `${e.startTime} ${e.startTimePeriod}`
44
44
  ),
45
- endDate: g(e.endDate, a, !1, P).formattedResult,
46
- endTime: B(`${e.endTime} ${e.endTimePeriod}`)
45
+ endDate: f(e.endDate, a, !1, V).formattedResult,
46
+ endTime: O(`${e.endTime} ${e.endTimePeriod}`)
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 = S(
50
+ const o = B(
51
51
  `${e.startTime} ${e.startTimePeriod}`
52
- ), c = S(
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"));
@@ -57,12 +57,12 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
57
57
  return n;
58
58
  }, ge = (e, a) => ({
59
59
  id: e.uuid,
60
- startDateTime: g(`${e.startDate}T${e.startTime}`, a, !0).formattedResult,
61
- endDateTime: g(`${e.endDate}T${e.endTime}`, a, !0).formattedResult,
60
+ startDateTime: f(`${e.startDate}T${e.startTime}`, a, !0).formattedResult,
61
+ endDateTime: f(`${e.endDate}T${e.endTime}`, a, !0).formattedResult,
62
62
  locationName: e.location.name,
63
63
  appointmentServiceName: e.service?.name ?? a("ADMIN_UNAVAILABILITY_ALL"),
64
64
  providerName: e.provider?.name ?? a("ADMIN_UNAVAILABILITY_ALL")
65
- }), H = (e) => e.filter((a) => !a.isSelectAll).map((a) => a.id), fe = (e, a) => {
65
+ }), K = (e) => e.filter((a) => !a.isSelectAll).map((a) => a.id), fe = (e, a) => {
66
66
  const n = Ee(
67
67
  {
68
68
  locationUuid: e.locationUuid,
@@ -74,7 +74,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
74
74
  endTimePeriod: e.endTimePeriod
75
75
  },
76
76
  a
77
- ), t = H(e.selectedServiceItems), o = H(e.selectedProviderItems), A = t.length === e.filteredServicesCount || t.length === 0 ? [void 0] : t, m = o.length === e.availableProvidersCount || o.length === 0 ? [void 0] : o;
77
+ ), t = K(e.selectedServiceItems), o = K(e.selectedProviderItems), A = t.length === e.filteredServicesCount || t.length === 0 ? [void 0] : t, m = o.length === e.availableProvidersCount || o.length === 0 ? [void 0] : o;
78
78
  return A.flatMap(
79
79
  (l) => m.map((s) => ({
80
80
  ...n,
@@ -91,14 +91,14 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
91
91
  data: e,
92
92
  isLoading: a,
93
93
  isError: n
94
- } = D({
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
- } = D({
101
+ } = M({
102
102
  queryKey: ["providerLoginLocations", e?.uuid],
103
103
  queryFn: async () => {
104
104
  const I = await te(
@@ -106,12 +106,12 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
106
106
  );
107
107
  if (I.length === 0) {
108
108
  const u = await ie(
109
- w
109
+ G
110
110
  );
111
111
  return Re(u);
112
112
  }
113
113
  return I.filter(
114
- (u) => u.tags?.some((v) => v.display === w)
114
+ (u) => u.tags?.some((v) => v.display === G)
115
115
  );
116
116
  },
117
117
  enabled: !!e?.uuid
@@ -119,14 +119,14 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
119
119
  data: A = [],
120
120
  isLoading: L,
121
121
  isError: m
122
- } = D({
122
+ } = M({
123
123
  queryKey: ["appointmentServices"],
124
124
  queryFn: ae
125
125
  }), {
126
126
  data: l = [],
127
127
  isLoading: s,
128
128
  isError: _
129
- } = D({
129
+ } = M({
130
130
  queryKey: ["providers"],
131
131
  queryFn: ne
132
132
  });
@@ -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
- }, Se = "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
+ }, Se = "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: Se,
142
- formField: Be,
143
- loading: Pe,
142
+ formField: Pe,
143
+ loading: Be,
144
144
  error: Oe,
145
145
  grid: Ve,
146
146
  column: Fe,
@@ -152,8 +152,8 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
152
152
  formDataRef: a,
153
153
  onClearErrors: n
154
154
  }) => {
155
- const { t } = K(), { loginLocations: o, services: c, providers: A, isLoading: L, isError: m } = he(), [l, s] = U({
156
- locationUuid: be(),
155
+ const { t } = Q(), { loginLocations: o, services: c, providers: A, isLoading: L, isError: m } = he(), [l, s] = g({
156
+ locationUuid: "",
157
157
  selectedServiceItems: [],
158
158
  selectedProviderItems: [],
159
159
  startDate: null,
@@ -168,26 +168,26 @@ 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
- (y) => y.attributeType?.display === Ne && y.value
171
+ (p) => p.attributeType?.display === Ne && p.value
172
172
  )
173
173
  ),
174
174
  [A]
175
175
  ), u = N(
176
- () => f(!1, !1, o, De, {
176
+ () => R(!1, !1, o, ye, {
177
177
  loading: "",
178
178
  error: "",
179
179
  empty: t("ADMIN_UNAVAILABILITY_FORM_NO_LOCATIONS")
180
180
  }),
181
181
  [o]
182
182
  ), v = N(
183
- () => f(
183
+ () => R(
184
184
  !1,
185
185
  !1,
186
- ye(
186
+ De(
187
187
  _,
188
188
  t("ADMIN_UNAVAILABILITY_FORM_ALL_SERVICES")
189
189
  ),
190
- G,
190
+ H,
191
191
  {
192
192
  loading: "",
193
193
  error: "",
@@ -195,15 +195,15 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
195
195
  }
196
196
  ),
197
197
  [_]
198
- ), b = N(
199
- () => f(
198
+ ), y = N(
199
+ () => R(
200
200
  !1,
201
201
  !1,
202
202
  Me(
203
203
  I,
204
204
  t("ADMIN_UNAVAILABILITY_FORM_ALL_PROVIDERS")
205
205
  ),
206
- G,
206
+ H,
207
207
  {
208
208
  loading: "",
209
209
  error: "",
@@ -212,17 +212,26 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
212
212
  ),
213
213
  [I]
214
214
  );
215
- return $(() => {
215
+ return h(() => {
216
+ if (o.length === 0) return;
217
+ const i = be(), p = o.some(
218
+ (D) => D.uuid === i
219
+ );
220
+ s((D) => ({
221
+ ...D,
222
+ locationUuid: p ? i : ""
223
+ }));
224
+ }, [o]), h(() => {
216
225
  _.length > 0 && s((i) => ({
217
226
  ...i,
218
227
  selectedServiceItems: v
219
228
  }));
220
- }, [v]), $(() => {
229
+ }, [v]), h(() => {
221
230
  I.length > 0 && s((i) => ({
222
231
  ...i,
223
- selectedProviderItems: b
232
+ selectedProviderItems: y
224
233
  }));
225
- }, [b]), a.current = {
234
+ }, [y]), a.current = {
226
235
  ...l,
227
236
  filteredServicesCount: _.length,
228
237
  availableProvidersCount: I.length
@@ -241,7 +250,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
241
250
  className: d.error,
242
251
  children: t("ADMIN_UNAVAILABILITY_FORM_LOAD_ERROR_MESSAGE")
243
252
  }
244
- ) : /* @__PURE__ */ p(
253
+ ) : /* @__PURE__ */ b(
245
254
  "div",
246
255
  {
247
256
  id: "unavailability-form-content",
@@ -255,7 +264,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
255
264
  id: "location-dropdown",
256
265
  "data-testid": "location-dropdown",
257
266
  label: t("ADMIN_UNAVAILABILITY_FORM_LOCATION_LABEL"),
258
- titleText: t("ADMIN_UNAVAILABILITY_FORM_LOCATION_LABEL"),
267
+ titleText: t("ADMIN_UNAVAILABILITY_FORM_LOCATION_TITLE"),
259
268
  items: u,
260
269
  itemToString: (i) => i?.display ?? "",
261
270
  selectedItem: l.locationUuid ? o.find(
@@ -272,7 +281,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
272
281
  invalidText: e.location
273
282
  }
274
283
  ) }),
275
- /* @__PURE__ */ p(
284
+ /* @__PURE__ */ b(
276
285
  se,
277
286
  {
278
287
  id: "unavailability-form-grid",
@@ -280,8 +289,8 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
280
289
  "aria-label": "unavailability-form-grid-aria-label",
281
290
  className: d.grid,
282
291
  children: [
283
- /* @__PURE__ */ p(
284
- M,
292
+ /* @__PURE__ */ b(
293
+ E,
285
294
  {
286
295
  id: "unavailability-form-start-date-time",
287
296
  "data-testid": "unavailability-form-start-date-time-test-id",
@@ -292,10 +301,10 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
292
301
  className: `${d.column} ${d.dateTimeColumn}`,
293
302
  children: [
294
303
  /* @__PURE__ */ r(
295
- O,
304
+ F,
296
305
  {
297
306
  datePickerType: "single",
298
- minDate: V(),
307
+ minDate: C(),
299
308
  value: l.startDate ?? void 0,
300
309
  onChange: (i) => {
301
310
  i[0] && (n(["startDate", "dateTime"]), s({
@@ -305,7 +314,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
305
314
  },
306
315
  className: d.datePicker,
307
316
  children: /* @__PURE__ */ r(
308
- F,
317
+ Y,
309
318
  {
310
319
  id: "start-date",
311
320
  "data-testid": "start-date-input",
@@ -318,7 +327,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
318
327
  }
319
328
  ),
320
329
  /* @__PURE__ */ r(
321
- C,
330
+ x,
322
331
  {
323
332
  id: "start-time",
324
333
  "data-testid": "start-time-input",
@@ -332,8 +341,8 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
332
341
  pattern: "(1[012]|[0-9]):[0-5][0-9]",
333
342
  use24HourFormat: !1,
334
343
  className: d.timePicker,
335
- children: /* @__PURE__ */ p(
336
- Y,
344
+ children: /* @__PURE__ */ b(
345
+ k,
337
346
  {
338
347
  id: "start-time-period",
339
348
  "data-testid": "start-time-period-select",
@@ -355,8 +364,8 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
355
364
  ]
356
365
  }
357
366
  ),
358
- /* @__PURE__ */ p(
359
- M,
367
+ /* @__PURE__ */ b(
368
+ E,
360
369
  {
361
370
  id: "unavailability-form-end-date-time",
362
371
  "data-testid": "unavailability-form-end-date-time-test-id",
@@ -367,10 +376,10 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
367
376
  className: `${d.column} ${d.dateTimeColumn}`,
368
377
  children: [
369
378
  /* @__PURE__ */ r(
370
- O,
379
+ F,
371
380
  {
372
381
  datePickerType: "single",
373
- minDate: l.startDate ?? V(),
382
+ minDate: l.startDate ?? C(),
374
383
  value: l.endDate ?? void 0,
375
384
  onChange: (i) => {
376
385
  i[0] && (n(["endDate", "dateTime"]), s({
@@ -380,7 +389,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
380
389
  },
381
390
  className: d.datePicker,
382
391
  children: /* @__PURE__ */ r(
383
- F,
392
+ Y,
384
393
  {
385
394
  id: "end-date",
386
395
  "data-testid": "end-date-input",
@@ -393,7 +402,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
393
402
  }
394
403
  ),
395
404
  /* @__PURE__ */ r(
396
- C,
405
+ x,
397
406
  {
398
407
  id: "end-time",
399
408
  "data-testid": "end-time-input",
@@ -407,8 +416,8 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
407
416
  pattern: "(1[012]|[0-9]):[0-5][0-9]",
408
417
  use24HourFormat: !1,
409
418
  className: d.timePicker,
410
- children: /* @__PURE__ */ p(
411
- Y,
419
+ children: /* @__PURE__ */ b(
420
+ k,
412
421
  {
413
422
  id: "end-time-period",
414
423
  "data-testid": "end-time-period-select",
@@ -431,7 +440,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
431
440
  }
432
441
  ),
433
442
  /* @__PURE__ */ r(
434
- M,
443
+ E,
435
444
  {
436
445
  id: "unavailability-form-service",
437
446
  "data-testid": "unavailability-form-service-test-id",
@@ -441,7 +450,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
441
450
  lg: 8,
442
451
  className: d.column,
443
452
  children: /* @__PURE__ */ r(
444
- x,
453
+ $,
445
454
  {
446
455
  id: "service-multiselect",
447
456
  "data-testid": "service-multiselect",
@@ -459,7 +468,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
459
468
  }
460
469
  ),
461
470
  /* @__PURE__ */ r(
462
- M,
471
+ E,
463
472
  {
464
473
  id: "unavailability-form-provider",
465
474
  "data-testid": "unavailability-form-provider-test-id",
@@ -469,13 +478,13 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
469
478
  lg: 8,
470
479
  className: d.column,
471
480
  children: /* @__PURE__ */ r(
472
- x,
481
+ $,
473
482
  {
474
483
  id: "provider-multiselect",
475
484
  "data-testid": "provider-multiselect",
476
485
  titleText: t("ADMIN_UNAVAILABILITY_FORM_PROVIDER_LABEL"),
477
486
  placeholder: t("ADMIN_UNAVAILABILITY_FORM_PROVIDER_LABEL"),
478
- items: b,
487
+ items: y,
479
488
  itemToString: (i) => i?.text ?? "",
480
489
  selectedItems: l.selectedProviderItems,
481
490
  onChange: (i) => s({
@@ -495,13 +504,13 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
495
504
  }, $e = "index-module_page__s2h2y", qe = {
496
505
  page: $e
497
506
  }, Qe = () => {
498
- const { t: e } = K(), a = ve(), { userPrivileges: n } = oe(), { addNotification: t } = de(), [o, c] = U(!1), [A, L] = U(!1), m = Le(null), [l, s] = U({}), _ = k(
507
+ const { t: e } = Q(), a = ve(), { userPrivileges: n } = oe(), { addNotification: t } = de(), [o, c] = g(!1), [A, L] = g(!1), m = Le(null), [l, s] = g({}), _ = q(
499
508
  n,
500
- q
501
- ), I = k(n, [
509
+ w
510
+ ), I = q(n, [
502
511
  pe,
503
- q
504
- ]), { data: u, isLoading: v, isError: b } = D({
512
+ w
513
+ ]), { data: u, isLoading: v, isError: y } = M({
505
514
  queryKey: ["appointmentUnavailabilities"],
506
515
  queryFn: ce,
507
516
  enabled: _
@@ -513,7 +522,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
513
522
  href: "/appointments"
514
523
  },
515
524
  { id: "admin", label: e("BREADCRUMB_ADMIN"), isCurrentPage: !0 }
516
- ], y = N(() => [
525
+ ], p = N(() => [
517
526
  { key: "startDateTime", header: e("ADMIN_UNAVAILABILITY_COLUMN_START") },
518
527
  { key: "endDateTime", header: e("ADMIN_UNAVAILABILITY_COLUMN_END") },
519
528
  {
@@ -528,7 +537,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
528
537
  key: "providerName",
529
538
  header: e("ADMIN_UNAVAILABILITY_COLUMN_PROVIDER")
530
539
  }
531
- ], [e]), Q = N(() => u ? u.map((T) => ge(T, e)) : [], [u, e]), R = E(
540
+ ], [e]), D = N(() => u ? u.map((T) => ge(T, e)) : [], [u, e]), S = U(
532
541
  async (T) => {
533
542
  L(!0);
534
543
  try {
@@ -551,19 +560,19 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
551
560
  }
552
561
  },
553
562
  [t, a, e]
554
- ), j = E(async () => {
563
+ ), j = U(async () => {
555
564
  if (!m.current) return;
556
565
  const T = Ue(m.current, e);
557
- s(T), !(Object.keys(T).length > 0) && await R(fe(m.current, e));
558
- }, [e, R]), W = E(
566
+ s(T), !(Object.keys(T).length > 0) && await S(fe(m.current, e));
567
+ }, [e, S]), W = U(
559
568
  (T) => {
560
- s((J) => {
561
- const h = { ...J };
562
- return T.forEach((Z) => delete h[Z]), h;
569
+ s((X) => {
570
+ const P = { ...X };
571
+ return T.forEach((Z) => delete P[Z]), P;
563
572
  });
564
573
  },
565
574
  []
566
- ), z = E(() => {
575
+ ), J = U(() => {
567
576
  c(!1), m.current = null, s({});
568
577
  }, []);
569
578
  return /* @__PURE__ */ r(
@@ -585,11 +594,11 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
585
594
  "data-testid": "appointment-unavailability-actions-table-test-id",
586
595
  "aria-label": "appointment-unavailability-actions-table-aria-label",
587
596
  title: e("ADMIN_UNAVAILABILITY_TITLE"),
588
- headers: y,
589
- rows: Q,
597
+ headers: p,
598
+ rows: D,
590
599
  ariaLabel: "unavailability-table",
591
600
  loading: v,
592
- errorStateMessage: b ? e("ADMIN_UNAVAILABILITY_ERROR_MESSAGE") : null,
601
+ errorStateMessage: y ? e("ADMIN_UNAVAILABILITY_ERROR_MESSAGE") : null,
593
602
  emptyStateMessage: e("ADMIN_UNAVAILABILITY_EMPTY_MESSAGE"),
594
603
  actionButton: !o && I ? {
595
604
  label: e("ADMIN_UNAVAILABILITY_ADD_BUTTON"),
@@ -610,7 +619,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
610
619
  onPrimaryButtonClick: j,
611
620
  isPrimaryButtonDisabled: A,
612
621
  secondaryButtonText: e("ADMIN_UNAVAILABILITY_FORM_CANCEL"),
613
- onSecondaryButtonClick: z,
622
+ onSecondaryButtonClick: J,
614
623
  isSecondaryButtonDisabled: A,
615
624
  content: /* @__PURE__ */ r(
616
625
  ke,