@bahmni/appointments-app 0.0.1-dev.315 → 0.0.1-dev.316

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,7 +1,7 @@
1
1
  import { jsx as n, jsxs as y } from "react/jsx-runtime";
2
- import { i as V, A as O, u as C, l as P, N as h, o as x, m as B, r as L, p as G, q as U, s as q, t as F, y as H, C as $, U as k, _ as w } from "./index-CWpCbDfm.js";
2
+ import { s as V, A as O, u as C, i as P, l as h, o as x, m as B, p as L, q as G, r as U, t as q, y as H, C as F, H as $, I as k, K as w } from "./index-wWZTiEer.js";
3
3
  import { useState as I, useMemo as _ } from "react";
4
- import { useQueryClient as j, useQuery as K } from "@tanstack/react-query";
4
+ import { useQueryClient as K, useQuery as j } from "@tanstack/react-query";
5
5
  const Q = V(
6
6
  O,
7
7
  "useAppointmentsConfig",
@@ -36,9 +36,9 @@ const Q = V(
36
36
  "speciality",
37
37
  "durationMins",
38
38
  "description"
39
- ], Y = "app:appointments:manageServices", Z = "app:appointments:adminTab", J = "index-module_page__Gsfbu", z = "index-module_noPrivilegeContainer__Pu5WZ", X = "index-module_table__GAPmb", d = {
40
- page: J,
41
- noPrivilegeContainer: z,
39
+ ], Y = "app:appointments:manageServices", Z = "app:appointments:adminTab", z = "index-module_page__Gsfbu", J = "index-module_noPrivilegeContainer__Pu5WZ", X = "index-module_table__GAPmb", d = {
40
+ page: z,
41
+ noPrivilegeContainer: J,
42
42
  table: X
43
43
  };
44
44
  function ee(e) {
@@ -75,22 +75,22 @@ function ie(e, i) {
75
75
  }));
76
76
  }
77
77
  const le = () => {
78
- const { t: e } = C(), i = j(), { addNotification: t } = x(), { userPrivileges: s } = B(), { appointmentsConfig: a } = Q(), [E, c] = I(null), [b, p] = I(!1), l = a?.serviceTableFields ?? [
78
+ const { t: e } = C(), i = K(), { addNotification: t } = x(), { userPrivileges: s } = B(), { appointmentsConfig: a } = Q(), [E, c] = I(null), [M, p] = I(!1), l = a?.serviceTableFields ?? [
79
79
  ...u
80
- ], m = L(s, Z), M = L(
80
+ ], m = L(s, Z), b = L(
81
81
  s,
82
82
  Y
83
83
  ), S = _(
84
84
  () => ee(l),
85
85
  [l]
86
- ), { data: A, isLoading: v, isError: N } = K({
86
+ ), { data: A, isLoading: v, isError: D } = j({
87
87
  queryKey: ["allAppointmentServices"],
88
88
  queryFn: G,
89
89
  enabled: m
90
- }), D = _(
90
+ }), R = _(
91
91
  () => te(l, e),
92
92
  [l]
93
- ), R = _(
93
+ ), N = _(
94
94
  () => ie(A ?? [], S),
95
95
  [A, S]
96
96
  ), g = async () => {
@@ -119,7 +119,7 @@ const le = () => {
119
119
  "aria-label": `delete-service-${r.id}-btn-aria-label`,
120
120
  kind: "ghost",
121
121
  label: e("ADMIN_ALL_SERVICES_DELETE_ICON_LABEL"),
122
- disabled: !M,
122
+ disabled: !b,
123
123
  onClick: () => c(r),
124
124
  children: /* @__PURE__ */ n(k, {})
125
125
  }
@@ -130,7 +130,7 @@ const le = () => {
130
130
  return /* @__PURE__ */ n(
131
131
  q,
132
132
  {
133
- header: /* @__PURE__ */ n(H, { breadcrumbItems: f }),
133
+ header: /* @__PURE__ */ n(F, { breadcrumbItems: f }),
134
134
  main: m ? /* @__PURE__ */ y(
135
135
  "div",
136
136
  {
@@ -140,15 +140,15 @@ const le = () => {
140
140
  className: d.page,
141
141
  children: [
142
142
  /* @__PURE__ */ n(
143
- F,
143
+ H,
144
144
  {
145
145
  id: "all-services",
146
146
  title: e("ADMIN_ALL_SERVICES_TITLE"),
147
- headers: D,
148
- rows: R,
147
+ headers: R,
148
+ rows: N,
149
149
  ariaLabel: "all-services-table",
150
150
  loading: v,
151
- errorStateMessage: N ? e("ADMIN_ALL_SERVICES_ERROR_MESSAGE") : null,
151
+ errorStateMessage: D ? 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
@@ -158,7 +158,7 @@ const le = () => {
158
158
  W,
159
159
  {
160
160
  serviceName: E.name,
161
- isDeleting: b,
161
+ isDeleting: M,
162
162
  onConfirm: g,
163
163
  onCancel: () => c(null)
164
164
  }