@bahmni/appointments-app 0.0.1-dev.379 → 0.0.1-dev.380

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,9 +1,9 @@
1
1
  import { jsx as i, jsxs as y } from "react/jsx-runtime";
2
- import { R as V, D as P, u as C, F as O, E as h, I as B, J as G, K as L, P as x, Q as U, S as F, T as q, U as k, X as K, Y as Q, Z as $, _ as j } from "./index-BQrlKDpC.js";
2
+ import { D as V, E as O, u as C, F as P, I as h, Z as B, J as G, O as L, P as x, Q as U, R as F, S as q, T as k, U as Q, X as $, Y as j, _ as w } from "./index-Dj6Y8Rrb.js";
3
3
  import { useState as I, useMemo as _ } from "react";
4
- import { useQueryClient as w, useQuery as H } from "@tanstack/react-query";
4
+ import { useQueryClient as H, useQuery as K } from "@tanstack/react-query";
5
5
  const W = V(
6
- P,
6
+ O,
7
7
  "useAppointmentsConfig",
8
8
  "AppointmentsConfigProvider"
9
9
  ), Y = ({
@@ -14,7 +14,7 @@ const W = V(
14
14
  }) => {
15
15
  const { t: n } = C();
16
16
  return /* @__PURE__ */ i(
17
- O,
17
+ P,
18
18
  {
19
19
  id: "delete-service-modal",
20
20
  testId: "delete-service-modal-test-id",
@@ -36,8 +36,8 @@ const W = V(
36
36
  "speciality",
37
37
  "durationMins",
38
38
  "description"
39
- ], z = "app:appointments:manageServices", J = "app:appointments:adminTab", Z = "index-module_page__Gsfbu", X = "index-module_noPrivilegeContainer__Pu5WZ", ee = "index-module_table__GAPmb", d = {
40
- page: Z,
39
+ ], Z = "app:appointments:manageServices", J = "app:appointments:adminTab", z = "index-module_page__Gsfbu", X = "index-module_noPrivilegeContainer__Pu5WZ", ee = "index-module_table__GAPmb", d = {
40
+ page: z,
41
41
  noPrivilegeContainer: X,
42
42
  table: ee
43
43
  };
@@ -75,19 +75,19 @@ function ie(e, a) {
75
75
  }));
76
76
  }
77
77
  const oe = () => {
78
- const { t: e } = C(), a = w(), { addNotification: t } = B(), { userPrivileges: s } = G(), { appointmentsConfig: n } = W(), [E, c] = I(null), [b, p] = I(!1), l = n?.serviceTableFields ?? [
78
+ const { t: e } = C(), a = H(), { addNotification: t } = B(), { userPrivileges: s } = G(), { appointmentsConfig: n } = W(), [E, c] = I(null), [b, p] = I(!1), l = n?.serviceTableFields ?? [
79
79
  ...u
80
80
  ], S = L(s, J), M = L(
81
81
  s,
82
- z
82
+ Z
83
83
  ), m = _(
84
84
  () => te(l),
85
85
  [l]
86
- ), { data: A, isLoading: R, isError: v } = H({
86
+ ), { data: A, isLoading: D, isError: v } = K({
87
87
  queryKey: ["allAppointmentServices"],
88
88
  queryFn: x,
89
89
  enabled: S
90
- }), D = _(
90
+ }), R = _(
91
91
  () => ae(l, e),
92
92
  [l]
93
93
  ), N = _(
@@ -96,7 +96,7 @@ const oe = () => {
96
96
  ), g = async () => {
97
97
  p(!0);
98
98
  try {
99
- await j(E.id), t({
99
+ await w(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,7 +112,7 @@ const oe = () => {
112
112
  p(!1);
113
113
  }
114
114
  }, T = (r, o) => o === "actions" ? /* @__PURE__ */ i(
115
- Q,
115
+ $,
116
116
  {
117
117
  id: `delete-service-${r.id}-btn`,
118
118
  testId: `delete-service-${r.id}-btn-test-id`,
@@ -121,7 +121,7 @@ const oe = () => {
121
121
  label: e("ADMIN_ALL_SERVICES_DELETE_ICON_LABEL"),
122
122
  disabled: !M,
123
123
  onClick: () => c(r),
124
- children: /* @__PURE__ */ i($, {})
124
+ children: /* @__PURE__ */ i(j, {})
125
125
  }
126
126
  ) : u.includes(o) ? r[o] ?? "-" : r.attributes[o] ?? "-", f = [
127
127
  { id: "home", label: e("BREADCRUMB_HOME"), href: U },
@@ -130,7 +130,7 @@ const oe = () => {
130
130
  return /* @__PURE__ */ i(
131
131
  F,
132
132
  {
133
- header: /* @__PURE__ */ i(k, { breadcrumbItems: f, userMenu: /* @__PURE__ */ i(K, {}) }),
133
+ header: /* @__PURE__ */ i(k, { breadcrumbItems: f, userMenu: /* @__PURE__ */ i(Q, {}) }),
134
134
  main: S ? /* @__PURE__ */ y(
135
135
  "div",
136
136
  {
@@ -144,10 +144,10 @@ const oe = () => {
144
144
  {
145
145
  id: "all-services",
146
146
  title: e("ADMIN_ALL_SERVICES_TITLE"),
147
- headers: D,
147
+ headers: R,
148
148
  rows: N,
149
149
  ariaLabel: "all-services-table",
150
- loading: R,
150
+ loading: D,
151
151
  errorStateMessage: v ? e("ADMIN_ALL_SERVICES_ERROR_MESSAGE") : null,
152
152
  emptyStateMessage: e("ADMIN_ALL_SERVICES_EMPTY_MESSAGE"),
153
153
  renderCell: T,