@bahmni/appointments-app 0.0.1-dev.401 → 0.0.1-dev.405

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,18 +1,18 @@
1
1
  import { jsx as i, jsxs as y } from "react/jsx-runtime";
2
- import { z as V, A as O, u as I, D as P, H as h, C as B, a as x, L, M as G, O as U, Q as q, R as F, S as k, T as H, U as Q, W, X as $ } from "./index-BtK4jcwc.js";
3
- import { useState as C, useMemo as c } from "react";
2
+ import { H as V, I as O, u as C, L as P, M as h, z as x, a as B, N as L, O as G, Q as U, R as q, S as F, T as k, U as H, W as Q, X as W, Z as $ } from "./index-CDAgqrus.js";
3
+ import { useState as I, useMemo as c } from "react";
4
4
  import { useQueryClient as j, useQuery as w } from "@tanstack/react-query";
5
- const K = V(
5
+ const z = V(
6
6
  O,
7
7
  "useAppointmentsConfig",
8
8
  "AppointmentsConfigProvider"
9
- ), z = ({
9
+ ), K = ({
10
10
  serviceName: e,
11
11
  isDeleting: a,
12
12
  onConfirm: t,
13
13
  onCancel: s
14
14
  }) => {
15
- const { t: n } = I();
15
+ const { t: n } = C();
16
16
  return /* @__PURE__ */ i(
17
17
  P,
18
18
  {
@@ -36,8 +36,8 @@ const K = V(
36
36
  "speciality",
37
37
  "durationMins",
38
38
  "description"
39
- ], Y = "app:appointments:manageServices", X = "app:appointments:adminTab", Z = "index-module_page__Gsfbu", J = "index-module_noPrivilegeContainer__Pu5WZ", ee = "index-module_table__GAPmb", d = {
40
- page: Z,
39
+ ], Y = "app:appointments:manageServices", Z = "app:appointments:adminTab", X = "index-module_page__Gsfbu", J = "index-module_noPrivilegeContainer__Pu5WZ", ee = "index-module_table__GAPmb", d = {
40
+ page: X,
41
41
  noPrivilegeContainer: J,
42
42
  table: ee
43
43
  };
@@ -75,26 +75,26 @@ function ie(e, a) {
75
75
  }));
76
76
  }
77
77
  const oe = () => {
78
- const { t: e } = I(), a = j(), { addNotification: t } = B(), { userPrivileges: s } = x(), { appointmentsConfig: n } = K(), [E, _] = C(null), [M, p] = C(!1), l = n?.serviceTableFields ?? [
78
+ const { t: e } = C(), a = j(), { addNotification: t } = x(), { userPrivileges: s } = B(), { appointmentsConfig: n } = z(), [E, _] = I(null), [M, m] = I(!1), l = n?.serviceTableFields ?? [
79
79
  ...u
80
- ], m = L(s, X), b = L(
80
+ ], p = L(s, Z), b = L(
81
81
  s,
82
82
  Y
83
83
  ), S = c(
84
84
  () => te(l),
85
85
  [l]
86
- ), { data: A, isLoading: v, isError: D } = w({
86
+ ), { data: A, isLoading: v, isError: R } = w({
87
87
  queryKey: ["allAppointmentServices"],
88
88
  queryFn: G,
89
- enabled: m
90
- }), R = c(
89
+ enabled: p
90
+ }), D = c(
91
91
  () => ae(l, e),
92
92
  [l]
93
93
  ), N = c(
94
94
  () => ie(A ?? [], S),
95
95
  [A, S]
96
96
  ), g = async () => {
97
- p(!0);
97
+ m(!0);
98
98
  try {
99
99
  await $(E.id), t({
100
100
  title: e("ADMIN_ALL_SERVICES_DELETE_SUCCESS_TITLE"),
@@ -109,7 +109,7 @@ const oe = () => {
109
109
  type: "error"
110
110
  });
111
111
  } finally {
112
- p(!1);
112
+ m(!1);
113
113
  }
114
114
  }, T = (r, o) => o === "actions" ? /* @__PURE__ */ i(
115
115
  Q,
@@ -131,7 +131,7 @@ const oe = () => {
131
131
  q,
132
132
  {
133
133
  header: /* @__PURE__ */ i(k, { breadcrumbItems: f, userMenu: /* @__PURE__ */ i(H, {}) }),
134
- main: m ? /* @__PURE__ */ y(
134
+ main: p ? /* @__PURE__ */ y(
135
135
  "div",
136
136
  {
137
137
  id: "all-appointment-service-page",
@@ -144,18 +144,18 @@ const oe = () => {
144
144
  {
145
145
  id: "all-services",
146
146
  title: e("ADMIN_ALL_SERVICES_TITLE"),
147
- headers: R,
147
+ headers: D,
148
148
  rows: N,
149
149
  ariaLabel: "all-services-table",
150
150
  loading: v,
151
- errorStateMessage: D ? e("ADMIN_ALL_SERVICES_ERROR_MESSAGE") : null,
151
+ errorStateMessage: R ? e("ADMIN_ALL_SERVICES_ERROR_MESSAGE") : null,
152
152
  emptyStateMessage: e("ADMIN_ALL_SERVICES_EMPTY_MESSAGE"),
153
153
  renderCell: T,
154
154
  className: d.table
155
155
  }
156
156
  ),
157
157
  E && /* @__PURE__ */ i(
158
- z,
158
+ K,
159
159
  {
160
160
  serviceName: E.name,
161
161
  isDeleting: M,