@bahmni/appointments-app 0.0.1-dev.293 → 0.0.1-dev.294

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,14 +1,14 @@
1
1
  import { jsx as r, jsxs as b } from "react/jsx-runtime";
2
- import { T as f, M as P, P as O, Q as V, V as Z, X as ee, Y as te, a0 as ie, y 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 C, a8 as F, a9 as Y, aa as x, ab as k, ac as w, s as oe, h as de, t as $, ad as ce, x as me, ae as Ae, af as Ie, ag as ue, C as _e, E as Te } from "./index-Dy7BWvsq.js";
2
+ import { M as f, P as B, Q as O, T as V, V as J, X as ee, Y as te, a0 as ie, x 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 w, s as oe, h as de, t as $, ad as ce, y as me, ae as Ae, af as Ie, ag as ue, C as _e, E as Te } from "./index-C9KJKvY5.js";
3
3
  import { useState as g, useMemo as N, useEffect as h, useRef as Le, useCallback as U } from "react";
4
4
  import { useQuery as M, useQueryClient as ve } from "@tanstack/react-query";
5
5
  const Ne = "Available for appointments", q = "Get Appointment Unavailability", pe = "Add Appointment Unavailability", G = "Appointment Location", be = () => {
6
6
  try {
7
- return Z().uuid;
7
+ return J().uuid;
8
8
  } catch {
9
9
  return "";
10
10
  }
11
- }, K = (e) => ({
11
+ }, H = (e) => ({
12
12
  id: "",
13
13
  text: e
14
14
  }), ye = (e) => ({
@@ -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"));
@@ -62,7 +62,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
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,
@@ -137,14 +137,14 @@ 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", Ce = "UnavailabilityForm-module_column__QFdnQ", Fe = "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
- column: Ce,
147
- dateTimeColumn: Fe,
146
+ column: Fe,
147
+ dateTimeColumn: Ce,
148
148
  datePicker: Ye,
149
149
  timePicker: xe
150
150
  }, ke = ({
@@ -187,7 +187,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
187
187
  _,
188
188
  t("ADMIN_UNAVAILABILITY_FORM_ALL_SERVICES")
189
189
  ),
190
- K,
190
+ H,
191
191
  {
192
192
  loading: "",
193
193
  error: "",
@@ -203,7 +203,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
203
203
  I,
204
204
  t("ADMIN_UNAVAILABILITY_FORM_ALL_PROVIDERS")
205
205
  ),
206
- K,
206
+ H,
207
207
  {
208
208
  loading: "",
209
209
  error: "",
@@ -301,10 +301,10 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
301
301
  className: `${d.column} ${d.dateTimeColumn}`,
302
302
  children: [
303
303
  /* @__PURE__ */ r(
304
- C,
304
+ F,
305
305
  {
306
306
  datePickerType: "single",
307
- minDate: F(),
307
+ minDate: C(),
308
308
  value: l.startDate ?? void 0,
309
309
  onChange: (i) => {
310
310
  i[0] && (n(["startDate", "dateTime"]), s({
@@ -376,10 +376,10 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
376
376
  className: `${d.column} ${d.dateTimeColumn}`,
377
377
  children: [
378
378
  /* @__PURE__ */ r(
379
- C,
379
+ F,
380
380
  {
381
381
  datePickerType: "single",
382
- minDate: l.startDate ?? F(),
382
+ minDate: l.startDate ?? C(),
383
383
  value: l.endDate ?? void 0,
384
384
  onChange: (i) => {
385
385
  i[0] && (n(["endDate", "dateTime"]), s({
@@ -566,9 +566,9 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
566
566
  s(T), !(Object.keys(T).length > 0) && await S(fe(m.current, e));
567
567
  }, [e, S]), W = U(
568
568
  (T) => {
569
- s((z) => {
570
- const B = { ...z };
571
- return T.forEach((J) => delete B[J]), B;
569
+ s((Z) => {
570
+ const P = { ...Z };
571
+ return T.forEach((z) => delete P[z]), P;
572
572
  });
573
573
  },
574
574
  []
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { b3 as t } from "./index-Dy7BWvsq.js";
1
+ import { b3 as t } from "./index-C9KJKvY5.js";
2
2
  export {
3
3
  t as AppointmentsApp
4
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bahmni/appointments-app",
3
- "version": "0.0.1-dev.293",
3
+ "version": "0.0.1-dev.294",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",