@bahmni/appointments-app 0.0.1-dev.295 → 0.0.1-dev.297
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-R1K7B1Ur-lKxvgfB8.js → DocumentsTable-BJtJiMs--C0dYbL5J.js} +1 -1
- package/dist/{FormsTable-BFXGLv2_-Cc5C4-6V.js → FormsTable-BsQ0bAGt-DVA_iXWB.js} +20 -20
- package/dist/{LNWAZHJI-poSj31GE.js → LNWAZHJI-MsEZ5-zf.js} +2 -2
- package/dist/{MWZ6AO7Z-CTI0kL-Q.js → MWZ6AO7Z-B82IkkEg.js} +2 -2
- package/dist/{Observations-DSZvTXSj-BmNayaUY.js → Observations-LoD_iXCM-Cgi5zlG7.js} +18 -18
- package/dist/{YPM2AS64-DBBakS_A.js → YPM2AS64-DpRo71PT.js} +1 -1
- package/dist/{index-B4xTZ4ES.js → index-BEuIBuTL.js} +5 -5
- package/dist/{index-B_wLQqCf.js → index-PgozCsqh.js} +13659 -13654
- package/dist/{index-Dw7CEfWH.js → index-esUL2NZW.js} +17 -17
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as n, jsxs as y } from "react/jsx-runtime";
|
|
2
|
-
import { t as V,
|
|
3
|
-
import { useState as I, useMemo as
|
|
2
|
+
import { t as V, j as h, a as C, l as O, o as P, h as B, p as x, r as L, E as G, s as U, x as q, y as F, C as w, F as $, H as j, J as k } from "./index-PgozCsqh.js";
|
|
3
|
+
import { useState as I, useMemo as c } from "react";
|
|
4
4
|
import { useQueryClient as H, useQuery as K } from "@tanstack/react-query";
|
|
5
5
|
const Q = V(
|
|
6
6
|
h,
|
|
@@ -36,8 +36,8 @@ const Q = V(
|
|
|
36
36
|
"speciality",
|
|
37
37
|
"durationMins",
|
|
38
38
|
"description"
|
|
39
|
-
], Y = "app:appointments:manageServices",
|
|
40
|
-
page:
|
|
39
|
+
], Y = "app:appointments:manageServices", J = "app:appointments:adminTab", Z = "index-module_page__Gsfbu", z = "index-module_noPrivilegeContainer__Pu5WZ", X = "index-module_table__GAPmb", d = {
|
|
40
|
+
page: Z,
|
|
41
41
|
noPrivilegeContainer: z,
|
|
42
42
|
table: X
|
|
43
43
|
};
|
|
@@ -75,33 +75,33 @@ function ae(e, a) {
|
|
|
75
75
|
}));
|
|
76
76
|
}
|
|
77
77
|
const le = () => {
|
|
78
|
-
const { t: e } = C(), a = H(), { addNotification: t } = B(), { userPrivileges: s } = x(), { appointmentsConfig: i } = Q(), [E,
|
|
78
|
+
const { t: e } = C(), a = H(), { addNotification: t } = B(), { userPrivileges: s } = x(), { appointmentsConfig: i } = Q(), [E, _] = I(null), [M, u] = I(!1), l = i?.serviceTableFields ?? [
|
|
79
79
|
...p
|
|
80
|
-
], m = L(s,
|
|
80
|
+
], m = L(s, J), b = L(
|
|
81
81
|
s,
|
|
82
82
|
Y
|
|
83
|
-
), S =
|
|
83
|
+
), S = c(
|
|
84
84
|
() => ee(l),
|
|
85
85
|
[l]
|
|
86
86
|
), { data: A, isLoading: v, isError: D } = K({
|
|
87
87
|
queryKey: ["allAppointmentServices"],
|
|
88
88
|
queryFn: G,
|
|
89
89
|
enabled: m
|
|
90
|
-
}), R =
|
|
90
|
+
}), R = c(
|
|
91
91
|
() => te(l, e),
|
|
92
92
|
[l]
|
|
93
|
-
), N =
|
|
93
|
+
), N = c(
|
|
94
94
|
() => ae(A ?? [], S),
|
|
95
95
|
[A, S]
|
|
96
96
|
), g = async () => {
|
|
97
97
|
u(!0);
|
|
98
98
|
try {
|
|
99
|
-
await
|
|
99
|
+
await k(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",
|
|
103
103
|
timeout: 5e3
|
|
104
|
-
}),
|
|
104
|
+
}), _(null), a.invalidateQueries({ queryKey: ["allAppointmentServices"] });
|
|
105
105
|
} catch {
|
|
106
106
|
t({
|
|
107
107
|
title: e("ADMIN_ALL_SERVICES_DELETE_ERROR_TITLE"),
|
|
@@ -112,7 +112,7 @@ const le = () => {
|
|
|
112
112
|
u(!1);
|
|
113
113
|
}
|
|
114
114
|
}, T = (r, o) => o === "actions" ? /* @__PURE__ */ n(
|
|
115
|
-
|
|
115
|
+
$,
|
|
116
116
|
{
|
|
117
117
|
id: `delete-service-${r.id}-btn`,
|
|
118
118
|
testId: `delete-service-${r.id}-btn-test-id`,
|
|
@@ -120,8 +120,8 @@ const le = () => {
|
|
|
120
120
|
kind: "ghost",
|
|
121
121
|
label: e("ADMIN_ALL_SERVICES_DELETE_ICON_LABEL"),
|
|
122
122
|
disabled: !b,
|
|
123
|
-
onClick: () =>
|
|
124
|
-
children: /* @__PURE__ */ n(
|
|
123
|
+
onClick: () => _(r),
|
|
124
|
+
children: /* @__PURE__ */ n(j, {})
|
|
125
125
|
}
|
|
126
126
|
) : p.includes(o) ? r[o] ?? "-" : r.attributes[o] ?? "-", f = [
|
|
127
127
|
{ id: "home", label: e("BREADCRUMB_HOME"), href: U },
|
|
@@ -130,7 +130,7 @@ const le = () => {
|
|
|
130
130
|
return /* @__PURE__ */ n(
|
|
131
131
|
q,
|
|
132
132
|
{
|
|
133
|
-
header: /* @__PURE__ */ n(
|
|
133
|
+
header: /* @__PURE__ */ n(w, { breadcrumbItems: f }),
|
|
134
134
|
main: m ? /* @__PURE__ */ y(
|
|
135
135
|
"div",
|
|
136
136
|
{
|
|
@@ -140,7 +140,7 @@ const le = () => {
|
|
|
140
140
|
className: d.page,
|
|
141
141
|
children: [
|
|
142
142
|
/* @__PURE__ */ n(
|
|
143
|
-
|
|
143
|
+
F,
|
|
144
144
|
{
|
|
145
145
|
id: "all-services",
|
|
146
146
|
title: e("ADMIN_ALL_SERVICES_TITLE"),
|
|
@@ -160,7 +160,7 @@ const le = () => {
|
|
|
160
160
|
serviceName: E.name,
|
|
161
161
|
isDeleting: M,
|
|
162
162
|
onConfirm: g,
|
|
163
|
-
onCancel: () =>
|
|
163
|
+
onCancel: () => _(null)
|
|
164
164
|
}
|
|
165
165
|
)
|
|
166
166
|
]
|
package/dist/index.js
CHANGED