@bahmni/appointments-app 0.0.1-dev.256 → 0.0.1-dev.260

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 { B as V, C as O, u as C, D as h, K as P, f as B, d as G, U, F as A, a as x, G as q, I as F, J as K, O as $, P as k, Q, S as j, T as w } from "./index-DK9l8QyN.js";
2
+ import { q as V, s as O, u as C, t as h, w as P, e as B, a as G, B as q, E as L, b as x, F as U, G as F, I as k, J as $, K as w, Q as H, R as K, W as Q } from "./index-BGsOPq88.js";
3
3
  import { useState as I, useMemo as _ } from "react";
4
- const H = V(
4
+ const W = V(
5
5
  O,
6
6
  "useAppointmentsConfig",
7
7
  "AppointmentsConfigProvider"
8
- ), W = ({
8
+ ), j = ({
9
9
  serviceName: e,
10
10
  isDeleting: a,
11
11
  onConfirm: t,
@@ -35,7 +35,7 @@ const H = V(
35
35
  "speciality",
36
36
  "durationMins",
37
37
  "description"
38
- ], Y = "app:appointments:manageServices", J = "app:appointments:adminTab", z = "_page_10v94_1", X = "_noPrivilegeContainer_10v94_1", Z = "_table_10v94_18", d = {
38
+ ], J = "app:appointments:manageServices", Y = "app:appointments:adminTab", z = "_page_10v94_1", X = "_noPrivilegeContainer_10v94_1", Z = "_table_10v94_18", d = {
39
39
  page: z,
40
40
  noPrivilegeContainer: X,
41
41
  table: Z
@@ -74,28 +74,28 @@ function ae(e, a) {
74
74
  }));
75
75
  }
76
76
  const re = () => {
77
- const { t: e } = C(), a = B(), { addNotification: t } = G(), { userPrivileges: s } = U(), { appointmentsConfig: i } = H(), [E, c] = I(null), [v, S] = I(!1), l = i?.serviceTableFields ?? [
77
+ const { t: e } = C(), a = B(), { addNotification: t } = G(), { userPrivileges: s } = q(), { appointmentsConfig: i } = W(), [E, c] = I(null), [v, u] = I(!1), l = i?.serviceTableFields ?? [
78
78
  ...p
79
- ], u = A(s, J), M = A(
79
+ ], S = L(s, Y), M = L(
80
80
  s,
81
- Y
81
+ J
82
82
  ), m = _(
83
83
  () => ee(l),
84
84
  [l]
85
- ), { data: L, isLoading: D, isError: b } = x({
85
+ ), { data: A, isLoading: b, isError: R } = x({
86
86
  queryKey: ["allAppointmentServices"],
87
- queryFn: w,
88
- enabled: u
89
- }), N = _(
87
+ queryFn: Q,
88
+ enabled: S
89
+ }), D = _(
90
90
  () => te(l, e),
91
91
  [l]
92
- ), R = _(
93
- () => ae(L ?? [], m),
94
- [L, m]
92
+ ), N = _(
93
+ () => ae(A ?? [], m),
94
+ [A, m]
95
95
  ), g = async () => {
96
- S(!0);
96
+ u(!0);
97
97
  try {
98
- await j(E.id), t({
98
+ await K(E.id), t({
99
99
  title: e("ADMIN_ALL_SERVICES_DELETE_SUCCESS_TITLE"),
100
100
  message: e("ADMIN_ALL_SERVICES_DELETE_SUCCESS_MESSAGE"),
101
101
  type: "success",
@@ -108,10 +108,10 @@ const re = () => {
108
108
  type: "error"
109
109
  });
110
110
  } finally {
111
- S(!1);
111
+ u(!1);
112
112
  }
113
113
  }, T = (r, o) => o === "actions" ? /* @__PURE__ */ n(
114
- k,
114
+ w,
115
115
  {
116
116
  id: `delete-service-${r.id}-btn`,
117
117
  testId: `delete-service-${r.id}-btn-test-id`,
@@ -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: q },
126
+ { id: "home", label: e("BREADCRUMB_HOME"), href: U },
127
127
  { id: "admin", label: e("BREADCRUMB_ADMIN"), isCurrentPage: !0 }
128
128
  ];
129
129
  return /* @__PURE__ */ n(
130
130
  F,
131
131
  {
132
132
  header: /* @__PURE__ */ n($, { breadcrumbItems: y }),
133
- main: u ? /* @__PURE__ */ f(
133
+ main: S ? /* @__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
- K,
142
+ k,
143
143
  {
144
144
  id: "all-services",
145
145
  title: e("ADMIN_ALL_SERVICES_TITLE"),
146
- headers: N,
147
- rows: R,
146
+ headers: D,
147
+ rows: N,
148
148
  ariaLabel: "all-services-table",
149
- loading: D,
150
- errorStateMessage: b ? e("ADMIN_ALL_SERVICES_ERROR_MESSAGE") : null,
149
+ loading: b,
150
+ errorStateMessage: R ? 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
- W,
157
+ j,
158
158
  {
159
159
  serviceName: E.name,
160
160
  isDeleting: v,
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { aK as t } from "./index-DK9l8QyN.js";
1
+ import { aK as t } from "./index-BGsOPq88.js";
2
2
  export {
3
3
  t as AppointmentsApp
4
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bahmni/appointments-app",
3
- "version": "0.0.1-dev.256",
3
+ "version": "0.0.1-dev.260",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",