@bahmni/appointments-app 0.0.1-dev.270 → 0.0.1-dev.271
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.
- package/dist/{DocumentsTable-DEvlbfDU-DBvYfKLo.js → DocumentsTable-BTIXt5P5-D0ONlAN9.js} +74 -73
- package/dist/{FormsTable-DBD0f2fD-Dy5P9UHL.js → FormsTable-Cg_0tmR0-Dhn2FyUw.js} +66 -65
- package/dist/{LNWAZHJI-BpC73qZO.js → LNWAZHJI-CTgs_-ID.js} +7 -7
- package/dist/{MWZ6AO7Z-DOSG3gOY.js → MWZ6AO7Z-BGn6u1yW.js} +7 -7
- package/dist/{Observations-D6WZol9t-eMKYB_YW.js → Observations-M8evq10v-C9QQK0pq.js} +64 -63
- package/dist/{YPM2AS64-DxYKUPn5.js → YPM2AS64-Cnv4Z8zX.js} +1 -1
- package/dist/{index-DnqR3ObO.js → index-BgUmjJ-c.js} +145 -144
- package/dist/{index-U58J_2Iy.js → index-DIOplafV.js} +37906 -39807
- package/dist/{index-DVLxloPw.js → index-gM9k4uhy.js} +32 -31
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as n, jsxs as y } from "react/jsx-runtime";
|
|
2
|
+
import { p as V, q as h, a as C, r as O, v as P, h as B, x, B as L, D as G, E as q, F as U, H as F, I as $, L as k, N as w, O as H } from "./index-DIOplafV.js";
|
|
3
3
|
import { useState as I, useMemo as _ } from "react";
|
|
4
|
+
import { useQueryClient as j, useQuery as K } from "@tanstack/react-query";
|
|
4
5
|
const Q = V(
|
|
5
6
|
h,
|
|
6
7
|
"useAppointmentsConfig",
|
|
@@ -35,10 +36,10 @@ const Q = V(
|
|
|
35
36
|
"speciality",
|
|
36
37
|
"durationMins",
|
|
37
38
|
"description"
|
|
38
|
-
], Y = "app:appointments:manageServices", z = "app:appointments:adminTab", J = "
|
|
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 = {
|
|
39
40
|
page: J,
|
|
40
|
-
noPrivilegeContainer:
|
|
41
|
-
table:
|
|
41
|
+
noPrivilegeContainer: Z,
|
|
42
|
+
table: X
|
|
42
43
|
};
|
|
43
44
|
function ee(e) {
|
|
44
45
|
return e.filter((a) => !p.includes(a));
|
|
@@ -73,29 +74,29 @@ function ae(e, a) {
|
|
|
73
74
|
)
|
|
74
75
|
}));
|
|
75
76
|
}
|
|
76
|
-
const
|
|
77
|
-
const { t: e } = C(), a =
|
|
77
|
+
const le = () => {
|
|
78
|
+
const { t: e } = C(), a = j(), { addNotification: t } = B(), { userPrivileges: s } = x(), { appointmentsConfig: i } = Q(), [E, c] = I(null), [b, u] = I(!1), l = i?.serviceTableFields ?? [
|
|
78
79
|
...p
|
|
79
|
-
],
|
|
80
|
+
], m = L(s, z), v = L(
|
|
80
81
|
s,
|
|
81
82
|
Y
|
|
82
|
-
),
|
|
83
|
+
), S = _(
|
|
83
84
|
() => ee(l),
|
|
84
85
|
[l]
|
|
85
|
-
), { data:
|
|
86
|
+
), { data: A, isLoading: M, isError: D } = K({
|
|
86
87
|
queryKey: ["allAppointmentServices"],
|
|
87
|
-
queryFn:
|
|
88
|
-
enabled:
|
|
89
|
-
}),
|
|
88
|
+
queryFn: G,
|
|
89
|
+
enabled: m
|
|
90
|
+
}), R = _(
|
|
90
91
|
() => te(l, e),
|
|
91
92
|
[l]
|
|
92
|
-
),
|
|
93
|
-
() => ae(
|
|
94
|
-
[
|
|
93
|
+
), N = _(
|
|
94
|
+
() => ae(A ?? [], S),
|
|
95
|
+
[A, S]
|
|
95
96
|
), g = async () => {
|
|
96
|
-
|
|
97
|
+
u(!0);
|
|
97
98
|
try {
|
|
98
|
-
await
|
|
99
|
+
await H(E.id), t({
|
|
99
100
|
title: e("ADMIN_ALL_SERVICES_DELETE_SUCCESS_TITLE"),
|
|
100
101
|
message: e("ADMIN_ALL_SERVICES_DELETE_SUCCESS_MESSAGE"),
|
|
101
102
|
type: "success",
|
|
@@ -108,7 +109,7 @@ const re = () => {
|
|
|
108
109
|
type: "error"
|
|
109
110
|
});
|
|
110
111
|
} finally {
|
|
111
|
-
|
|
112
|
+
u(!1);
|
|
112
113
|
}
|
|
113
114
|
}, T = (r, o) => o === "actions" ? /* @__PURE__ */ n(
|
|
114
115
|
k,
|
|
@@ -118,19 +119,19 @@ const re = () => {
|
|
|
118
119
|
"aria-label": `delete-service-${r.id}-btn-aria-label`,
|
|
119
120
|
kind: "ghost",
|
|
120
121
|
label: e("ADMIN_ALL_SERVICES_DELETE_ICON_LABEL"),
|
|
121
|
-
disabled: !
|
|
122
|
+
disabled: !v,
|
|
122
123
|
onClick: () => c(r),
|
|
123
|
-
children: /* @__PURE__ */ n(
|
|
124
|
+
children: /* @__PURE__ */ n(w, {})
|
|
124
125
|
}
|
|
125
|
-
) : p.includes(o) ? r[o] ?? "-" : r.attributes[o] ?? "-",
|
|
126
|
+
) : p.includes(o) ? r[o] ?? "-" : r.attributes[o] ?? "-", f = [
|
|
126
127
|
{ id: "home", label: e("BREADCRUMB_HOME"), href: q },
|
|
127
128
|
{ id: "admin", label: e("BREADCRUMB_ADMIN"), isCurrentPage: !0 }
|
|
128
129
|
];
|
|
129
130
|
return /* @__PURE__ */ n(
|
|
130
|
-
|
|
131
|
+
U,
|
|
131
132
|
{
|
|
132
|
-
header: /* @__PURE__ */ n($, { breadcrumbItems:
|
|
133
|
-
main:
|
|
133
|
+
header: /* @__PURE__ */ n($, { breadcrumbItems: f }),
|
|
134
|
+
main: m ? /* @__PURE__ */ y(
|
|
134
135
|
"div",
|
|
135
136
|
{
|
|
136
137
|
id: "all-appointment-service-page",
|
|
@@ -139,14 +140,14 @@ const re = () => {
|
|
|
139
140
|
className: d.page,
|
|
140
141
|
children: [
|
|
141
142
|
/* @__PURE__ */ n(
|
|
142
|
-
|
|
143
|
+
F,
|
|
143
144
|
{
|
|
144
145
|
id: "all-services",
|
|
145
146
|
title: e("ADMIN_ALL_SERVICES_TITLE"),
|
|
146
|
-
headers:
|
|
147
|
-
rows:
|
|
147
|
+
headers: R,
|
|
148
|
+
rows: N,
|
|
148
149
|
ariaLabel: "all-services-table",
|
|
149
|
-
loading:
|
|
150
|
+
loading: M,
|
|
150
151
|
errorStateMessage: D ? e("ADMIN_ALL_SERVICES_ERROR_MESSAGE") : null,
|
|
151
152
|
emptyStateMessage: e("ADMIN_ALL_SERVICES_EMPTY_MESSAGE"),
|
|
152
153
|
renderCell: T,
|
|
@@ -157,7 +158,7 @@ const re = () => {
|
|
|
157
158
|
W,
|
|
158
159
|
{
|
|
159
160
|
serviceName: E.name,
|
|
160
|
-
isDeleting:
|
|
161
|
+
isDeleting: b,
|
|
161
162
|
onConfirm: g,
|
|
162
163
|
onCancel: () => c(null)
|
|
163
164
|
}
|
|
@@ -178,5 +179,5 @@ const re = () => {
|
|
|
178
179
|
);
|
|
179
180
|
};
|
|
180
181
|
export {
|
|
181
|
-
|
|
182
|
+
le as default
|
|
182
183
|
};
|