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

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 { u as G, a as W, h as Y, t as J, b as X, m as Z, c as ee, n as te } from "./index-Btq8SR5P.js";
2
+ import { u as G, a as W, h as Y, t as J, b as X, m as Z, c as ee, n as te } from "./index-Dqp33OCf.js";
3
3
  import { useQuery as ae } from "@tanstack/react-query";
4
4
  import { useState as l, useCallback as h, useEffect as O, 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", ce = "DocumentsTable-module_attachmentError__RI4U2", me = "DocumentsTable-module_documentIframe__ptq5I", le = "DocumentsTable-module_documentImage__KQVgS", d = {
@@ -1,5 +1,5 @@
1
1
  import { jsx as s, jsxs as W, Fragment as Z } from "react/jsx-runtime";
2
- import { a as ee, u as re, w as ae, e as oe, Q as te, X as se, J as ne, d as de, R as S, m as ie, b as me, c as U, T as ue, C as le, n as ce, f as fe, Y as ye } from "./index-Btq8SR5P.js";
2
+ import { a as ee, u as re, w as ae, e as oe, Q as te, X as se, J as ne, d as de, R as S, m as ie, b as me, c as U, T as ue, C as le, n as ce, f as fe, Y as ye } from "./index-Dqp33OCf.js";
3
3
  import { useQueryClient as pe, useQuery as f } from "@tanstack/react-query";
4
4
  import { useState as q, useMemo as d, useCallback as y } from "react";
5
5
  const be = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_customAccordianItem__isszs", A = {
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as i, D as u, Q as v } from "./YPM2AS64-CJzl5blR.js";
2
- import { ah as d, ai as f, aj as e } from "./index-Btq8SR5P.js";
1
+ import { c, T as l, P as m, a as i, D as u, Q as v } from "./YPM2AS64-BPLxIiMH.js";
2
+ import { ah as d, ai as f, aj as e } from "./index-Dqp33OCf.js";
3
3
  var h = (a) => {
4
4
  const [r, t] = c({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,5 +1,5 @@
1
- import { c as s, T as c, P as i, a as u, b as m, C as P, Q as d } from "./YPM2AS64-CJzl5blR.js";
2
- import { ah as h, ai as v, aj as e } from "./index-Btq8SR5P.js";
1
+ import { c as s, T as c, P as i, a as u, b as m, C as P, Q as d } from "./YPM2AS64-BPLxIiMH.js";
2
+ import { ah as h, ai as v, aj as e } from "./index-Dqp33OCf.js";
3
3
  var C = (t) => {
4
4
  const [r, o] = s({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,5 +1,5 @@
1
1
  import { jsxs as I, jsx as u } from "react/jsx-runtime";
2
- import { u as M, h as k, a as N, K as q, G, d as Q, i as z, s as X, l as j, z as w, c as x, o as H, g as A, j as P, y as Y, k as J, M as W, S as Z, A as ee } from "./index-Btq8SR5P.js";
2
+ import { u as M, h as k, a as N, K as q, G, d as Q, i as z, s as X, l as j, z as w, c as x, o as H, g as A, j as P, y as Y, k as J, M as W, S as Z, A as ee } from "./index-Dqp33OCf.js";
3
3
  import { useQueries as ae, useQuery as te } from "@tanstack/react-query";
4
4
  import { useRef as se, useEffect as $, useMemo as T } from "react";
5
5
  const D = (a, n, d, l, b, r) => {
@@ -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-Btq8SR5P.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-Dqp33OCf.js";
2
2
  var Os = (e) => e != null, qs = (e) => e.filter(Os);
3
3
  function _s(e) {
4
4
  return (...t) => {
@@ -1,5 +1,5 @@
1
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";
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-Dqp33OCf.js";
3
3
  import { useState as I, useMemo as _ } from "react";
4
4
  import { useQueryClient as j, useQuery as K } from "@tanstack/react-query";
5
5
  const Q = V(
@@ -1,14 +1,14 @@
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 { P as f, U as B, V as O, W as V, Z as X, $ as ee, _ as te, a0 as ie, D 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 $, x as oe, h as de, B as q, ad as ce, E as me, ae as Ae, af as Ie, ag as ue, H as _e, I as Te } from "./index-Dqp33OCf.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
7
  return X().uuid;
8
8
  } catch {
9
9
  return "";
10
10
  }
11
- }, G = (e) => ({
11
+ }, H = (e) => ({
12
12
  id: "",
13
13
  text: e
14
14
  }), De = (e) => ({
@@ -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, De, {
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
186
  ye(
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
+ ), D = 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
+ (y) => y.uuid === i
219
+ );
220
+ s((y) => ({
221
+ ...y,
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: D
224
233
  }));
225
- }, [b]), a.current = {
234
+ }, [D]), 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: D,
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: D } = 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]), y = 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
569
  s((J) => {
561
- const h = { ...J };
562
- return T.forEach((Z) => delete h[Z]), h;
570
+ const P = { ...J };
571
+ return T.forEach((Z) => delete P[Z]), P;
563
572
  });
564
573
  },
565
574
  []
566
- ), z = E(() => {
575
+ ), z = 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: y,
590
599
  ariaLabel: "unavailability-table",
591
600
  loading: v,
592
- errorStateMessage: b ? e("ADMIN_UNAVAILABILITY_ERROR_MESSAGE") : null,
601
+ errorStateMessage: D ? 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"),
@@ -170143,7 +170143,7 @@ function QF0(t, e, r) {
170143
170143
  return n;
170144
170144
  };
170145
170145
  }
170146
- x0(() => Promise.resolve().then(() => XD0)), x0(() => Promise.resolve().then(() => xR0)), x0(() => Promise.resolve().then(() => nS0)), x0(() => Promise.resolve().then(() => dS0)), x0(() => import("./DocumentsTable-CBd3EBSh-C3cdWHf5.js")), x0(() => Promise.resolve().then(() => nI0)), x0(() => import("./FormsTable-DMJEteY7-DW_3wjLN.js")), x0(() => Promise.resolve().then(() => kZ0)), x0(() => import("./Observations-CKw5OQxh-9qkJdVBD.js")), x0(
170146
+ x0(() => Promise.resolve().then(() => XD0)), x0(() => Promise.resolve().then(() => xR0)), x0(() => Promise.resolve().then(() => nS0)), x0(() => Promise.resolve().then(() => dS0)), x0(() => import("./DocumentsTable-CBd3EBSh-DUWqTbI3.js")), x0(() => Promise.resolve().then(() => nI0)), x0(() => import("./FormsTable-DMJEteY7-D21MAJ_e.js")), x0(() => Promise.resolve().then(() => kZ0)), x0(() => import("./Observations-CKw5OQxh-CuVmY9t8.js")), x0(
170147
170147
  () => Promise.resolve().then(() => pI0)
170148
170148
  ), x0(
170149
170149
  () => Promise.resolve().then(() => cZ0)
@@ -171983,7 +171983,7 @@ var zq0 = (t, e = !1) => {
171983
171983
  const e = Xk1(() => {
171984
171984
  const r = this, [n] = this.#n, [a] = this.#o, [c] = this.#a, [l] = this.#c, [i] = this.#p, [s] = this.#e;
171985
171985
  let d;
171986
- return this.#l ? d = this.#l : (d = Jk1(() => import("./LNWAZHJI-DRzT_bsO.js")), this.#l = d), vZ1(this.#h, this.#r), Yk1(d, Gk1({
171986
+ return this.#l ? d = this.#l : (d = Jk1(() => import("./LNWAZHJI-wpHuZ_w1.js")), this.#l = d), vZ1(this.#h, this.#r), Yk1(d, Gk1({
171987
171987
  get queryFlavor() {
171988
171988
  return r.#d;
171989
171989
  },
@@ -172081,7 +172081,7 @@ var zq0 = (t, e = !1) => {
172081
172081
  const e = Xk1(() => {
172082
172082
  const r = this, [n] = this.#n, [a] = this.#o, [c] = this.#a, [l] = this.#c, [i] = this.#p, [s] = this.#e, [d] = this.#l;
172083
172083
  let u;
172084
- return this.#i ? u = this.#i : (u = Jk1(() => import("./MWZ6AO7Z-DBHLDqXq.js")), this.#i = u), vZ1(this.#h, this.#r), Yk1(u, Gk1({
172084
+ return this.#i ? u = this.#i : (u = Jk1(() => import("./MWZ6AO7Z-CmpqONZL.js")), this.#i = u), vZ1(this.#h, this.#r), Yk1(u, Gk1({
172085
172085
  get queryFlavor() {
172086
172086
  return r.#d;
172087
172087
  },
@@ -172241,11 +172241,11 @@ const vP0 = {
172241
172241
  }), _P0 = x0(
172242
172242
  () => import("./index-CFigb5vF.js").then((t) => ({ default: t.IndexPage }))
172243
172243
  ), $P0 = x0(
172244
- () => import("./index-B2wrexoQ.js").then((t) => ({
172244
+ () => import("./index-BuzmDjCb.js").then((t) => ({
172245
172245
  default: t.default
172246
172246
  }))
172247
172247
  ), TP0 = x0(
172248
- () => import("./index-3Loy8tQq.js").then((t) => ({
172248
+ () => import("./index-CH4DtBLL.js").then((t) => ({
172249
172249
  default: t.default
172250
172250
  }))
172251
172251
  ), OP0 = [
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { b3 as t } from "./index-Btq8SR5P.js";
1
+ import { b3 as t } from "./index-Dqp33OCf.js";
2
2
  export {
3
3
  t as AppointmentsApp
4
4
  };
@@ -40,7 +40,8 @@
40
40
  "ADMIN_UNAVAILABILITY_FORM_ERROR_MESSAGE": "Failed to add Unavailability. Please try again.",
41
41
  "ADMIN_UNAVAILABILITY_FORM_ERROR_TITLE": "Add Failed",
42
42
  "ADMIN_UNAVAILABILITY_FORM_LOAD_ERROR_MESSAGE": "Failed to load form data. Please try again.",
43
- "ADMIN_UNAVAILABILITY_FORM_LOCATION_LABEL": "Select Location*",
43
+ "ADMIN_UNAVAILABILITY_FORM_LOCATION_LABEL": "Select Location",
44
+ "ADMIN_UNAVAILABILITY_FORM_LOCATION_TITLE": "Select Location*",
44
45
  "ADMIN_UNAVAILABILITY_FORM_NO_LOCATIONS": "No locations available",
45
46
  "ADMIN_UNAVAILABILITY_FORM_NO_PROVIDERS": "No providers available",
46
47
  "ADMIN_UNAVAILABILITY_FORM_NO_SERVICES": "No services available for the selected location",
@@ -40,7 +40,8 @@
40
40
  "ADMIN_UNAVAILABILITY_FORM_ERROR_MESSAGE": "Error al agregar indisponibilidad. Por favor, inténtelo de nuevo.",
41
41
  "ADMIN_UNAVAILABILITY_FORM_ERROR_TITLE": "Error al agregar",
42
42
  "ADMIN_UNAVAILABILITY_FORM_LOAD_ERROR_MESSAGE": "Error al cargar los datos del formulario. Por favor, inténtelo de nuevo.",
43
- "ADMIN_UNAVAILABILITY_FORM_LOCATION_LABEL": "Seleccionar ubicación*",
43
+ "ADMIN_UNAVAILABILITY_FORM_LOCATION_LABEL": "Seleccionar ubicación",
44
+ "ADMIN_UNAVAILABILITY_FORM_LOCATION_TITLE": "Seleccionar ubicación*",
44
45
  "ADMIN_UNAVAILABILITY_FORM_NO_LOCATIONS": "No hay ubicaciones disponibles",
45
46
  "ADMIN_UNAVAILABILITY_FORM_NO_PROVIDERS": "No hay proveedores disponibles",
46
47
  "ADMIN_UNAVAILABILITY_FORM_NO_SERVICES": "No hay servicios disponibles para la ubicación seleccionada",
@@ -1 +1 @@
1
- {"version":3,"file":"UnavailabilityForm.d.ts","sourceRoot":"","sources":["../../../../../src/pages/admin/appointmentUnavailability/components/UnavailabilityForm.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAG5D,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC9B,MAAM,WAAW,CAAC;AAUnB,UAAU,uBAAuB;IAC/B,MAAM,EAAE,wBAAwB,CAAC;IACjC,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC,sBAAsB,GAAG,IAAI,CAAC,CAAC;IAC5D,aAAa,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,MAAM,wBAAwB,CAAC,KAAK,IAAI,CAAC;CACtE;AAED,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAoWzD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"UnavailabilityForm.d.ts","sourceRoot":"","sources":["../../../../../src/pages/admin/appointmentUnavailability/components/UnavailabilityForm.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAG5D,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC9B,MAAM,WAAW,CAAC;AAUnB,UAAU,uBAAuB;IAC/B,MAAM,EAAE,wBAAwB,CAAC;IACjC,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC,sBAAsB,GAAG,IAAI,CAAC,CAAC;IAC5D,aAAa,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,MAAM,wBAAwB,CAAC,KAAK,IAAI,CAAC;CACtE;AAED,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAgXzD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bahmni/appointments-app",
3
- "version": "0.0.1-dev.273",
3
+ "version": "0.0.1-dev.274",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",