@bahmni/appointments-app 0.0.1-dev.386 → 0.0.1-dev.387

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