@bahmni/appointments-app 0.0.1-dev.267 → 0.0.1-dev.268

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,11 +1,11 @@
1
1
  import { jsx as n, jsxs as f } from "react/jsx-runtime";
2
- import { n as V, o as O, u as C, y as h, p as P, g as B, a as G, q as x, z as A, b as q, s as U, w, t as F, C as $, L as k, M as Q, O as j, Q as H } from "./index-Dd5zlHOS.js";
2
+ import { r as V, t as h, a as C, v as O, x as P, f as B, h as G, B as x, D as A, b as U, E as q, F, H as w, I as $, N as k, L as H, O as j, P as K } from "./index-C5F6zTvl.js";
3
3
  import { useState as I, useMemo as _ } from "react";
4
- const K = V(
5
- O,
4
+ const Q = V(
5
+ h,
6
6
  "useAppointmentsConfig",
7
7
  "AppointmentsConfigProvider"
8
- ), z = ({
8
+ ), W = ({
9
9
  serviceName: e,
10
10
  isDeleting: a,
11
11
  onConfirm: t,
@@ -13,7 +13,7 @@ const K = V(
13
13
  }) => {
14
14
  const { t: i } = C();
15
15
  return /* @__PURE__ */ n(
16
- h,
16
+ O,
17
17
  {
18
18
  id: "delete-service-modal",
19
19
  testId: "delete-service-modal-test-id",
@@ -35,7 +35,7 @@ const K = V(
35
35
  "speciality",
36
36
  "durationMins",
37
37
  "description"
38
- ], W = "app:appointments:manageServices", Y = "app:appointments:adminTab", J = "_page_10v94_1", X = "_noPrivilegeContainer_10v94_1", Z = "_table_10v94_18", d = {
38
+ ], Y = "app:appointments:manageServices", z = "app:appointments:adminTab", J = "_page_10v94_1", X = "_noPrivilegeContainer_10v94_1", Z = "_table_10v94_18", d = {
39
39
  page: J,
40
40
  noPrivilegeContainer: X,
41
41
  table: Z
@@ -74,26 +74,26 @@ function ae(e, a) {
74
74
  }));
75
75
  }
76
76
  const re = () => {
77
- const { t: e } = C(), a = B(), { addNotification: t } = G(), { userPrivileges: s } = x(), { appointmentsConfig: i } = K(), [E, c] = I(null), [v, u] = I(!1), l = i?.serviceTableFields ?? [
77
+ const { t: e } = C(), a = B(), { addNotification: t } = G(), { userPrivileges: s } = x(), { appointmentsConfig: i } = Q(), [E, c] = I(null), [v, S] = I(!1), l = i?.serviceTableFields ?? [
78
78
  ...p
79
- ], S = A(s, Y), M = A(
79
+ ], u = A(s, z), M = A(
80
80
  s,
81
- W
81
+ Y
82
82
  ), m = _(
83
83
  () => ee(l),
84
84
  [l]
85
- ), { data: L, isLoading: b, isError: R } = q({
85
+ ), { data: L, isLoading: b, isError: D } = U({
86
86
  queryKey: ["allAppointmentServices"],
87
- queryFn: H,
88
- enabled: S
89
- }), D = _(
87
+ queryFn: K,
88
+ enabled: u
89
+ }), N = _(
90
90
  () => te(l, e),
91
91
  [l]
92
- ), N = _(
92
+ ), R = _(
93
93
  () => ae(L ?? [], m),
94
94
  [L, m]
95
95
  ), g = async () => {
96
- u(!0);
96
+ S(!0);
97
97
  try {
98
98
  await j(E.id), t({
99
99
  title: e("ADMIN_ALL_SERVICES_DELETE_SUCCESS_TITLE"),
@@ -108,7 +108,7 @@ const re = () => {
108
108
  type: "error"
109
109
  });
110
110
  } finally {
111
- u(!1);
111
+ S(!1);
112
112
  }
113
113
  }, T = (r, o) => o === "actions" ? /* @__PURE__ */ n(
114
114
  k,
@@ -120,17 +120,17 @@ const re = () => {
120
120
  label: e("ADMIN_ALL_SERVICES_DELETE_ICON_LABEL"),
121
121
  disabled: !M,
122
122
  onClick: () => c(r),
123
- children: /* @__PURE__ */ n(Q, {})
123
+ children: /* @__PURE__ */ n(H, {})
124
124
  }
125
125
  ) : p.includes(o) ? r[o] ?? "-" : r.attributes[o] ?? "-", y = [
126
- { id: "home", label: e("BREADCRUMB_HOME"), href: U },
126
+ { id: "home", label: e("BREADCRUMB_HOME"), href: q },
127
127
  { id: "admin", label: e("BREADCRUMB_ADMIN"), isCurrentPage: !0 }
128
128
  ];
129
129
  return /* @__PURE__ */ n(
130
- w,
130
+ F,
131
131
  {
132
132
  header: /* @__PURE__ */ n($, { breadcrumbItems: y }),
133
- main: S ? /* @__PURE__ */ f(
133
+ main: u ? /* @__PURE__ */ f(
134
134
  "div",
135
135
  {
136
136
  id: "all-appointment-service-page",
@@ -139,22 +139,22 @@ const re = () => {
139
139
  className: d.page,
140
140
  children: [
141
141
  /* @__PURE__ */ n(
142
- F,
142
+ w,
143
143
  {
144
144
  id: "all-services",
145
145
  title: e("ADMIN_ALL_SERVICES_TITLE"),
146
- headers: D,
147
- rows: N,
146
+ headers: N,
147
+ rows: R,
148
148
  ariaLabel: "all-services-table",
149
149
  loading: b,
150
- errorStateMessage: R ? e("ADMIN_ALL_SERVICES_ERROR_MESSAGE") : null,
150
+ errorStateMessage: D ? e("ADMIN_ALL_SERVICES_ERROR_MESSAGE") : null,
151
151
  emptyStateMessage: e("ADMIN_ALL_SERVICES_EMPTY_MESSAGE"),
152
152
  renderCell: T,
153
153
  className: d.table
154
154
  }
155
155
  ),
156
156
  E && /* @__PURE__ */ n(
157
- z,
157
+ W,
158
158
  {
159
159
  serviceName: E.name,
160
160
  isDeleting: v,