@bahmni/appointments-app 0.0.1-dev.374 → 0.0.1-dev.375
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-Cx3H-xNc-DBQpfty0.js → DocumentsTable-Dcy-W7Gb-CqfXnHok.js} +10 -10
- package/dist/{FormsTable-BRgVe8lS-BwEn3xHh.js → FormsTable-BncKn8RO-CRUU-wIL.js} +50 -50
- package/dist/{LNWAZHJI-DONWiCcE.js → LNWAZHJI-Q8vd3r0i.js} +2 -2
- package/dist/{MWZ6AO7Z-DUEio9jI.js → MWZ6AO7Z-BtRCbHUQ.js} +2 -2
- package/dist/{Observations-BZ0HyAoB-BaYywK1u.js → Observations-BNztTkr8-4l7UpWbS.js} +37 -37
- package/dist/{YPM2AS64-BRt08MSG.js → YPM2AS64-nIz2f1HE.js} +1 -1
- package/dist/{index-DblS1eQP.js → index-CQneCT4a.js} +35 -35
- package/dist/{index-hZSxk8Qj.js → index-DAsY1pGM.js} +17168 -17119
- package/dist/{index-_cpREWKn.js → index-DQ5fGOFT.js} +25 -25
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as a, jsxs as y } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { useState as I, useMemo as
|
|
4
|
-
import { useQueryClient as
|
|
5
|
-
const
|
|
2
|
+
import { Y as V, A as O, u as C, F as P, L as G, G as h, Q as B, r as L, O as U, t as x, U as F, v as q, y as H, D as Q, M as Y, R as k, V as $ } from "./index-DAsY1pGM.js";
|
|
3
|
+
import { useState as I, useMemo as _ } from "react";
|
|
4
|
+
import { useQueryClient as j, useQuery as w } from "@tanstack/react-query";
|
|
5
|
+
const K = V(
|
|
6
6
|
O,
|
|
7
7
|
"useAppointmentsConfig",
|
|
8
8
|
"AppointmentsConfigProvider"
|
|
@@ -36,9 +36,9 @@ const $ = V(
|
|
|
36
36
|
"speciality",
|
|
37
37
|
"durationMins",
|
|
38
38
|
"description"
|
|
39
|
-
], Z = "app:appointments:manageServices", z = "app:appointments:adminTab",
|
|
40
|
-
page:
|
|
41
|
-
noPrivilegeContainer:
|
|
39
|
+
], Z = "app:appointments:manageServices", z = "app:appointments:adminTab", J = "index-module_page__Gsfbu", X = "index-module_noPrivilegeContainer__Pu5WZ", ee = "index-module_table__GAPmb", d = {
|
|
40
|
+
page: J,
|
|
41
|
+
noPrivilegeContainer: X,
|
|
42
42
|
table: ee
|
|
43
43
|
};
|
|
44
44
|
function te(e) {
|
|
@@ -75,33 +75,33 @@ function ae(e, i) {
|
|
|
75
75
|
}));
|
|
76
76
|
}
|
|
77
77
|
const oe = () => {
|
|
78
|
-
const { t: e } = C(), i =
|
|
78
|
+
const { t: e } = C(), i = j(), { addNotification: t } = h(), { userPrivileges: s } = B(), { appointmentsConfig: n } = K(), [E, c] = I(null), [M, p] = I(!1), l = n?.serviceTableFields ?? [
|
|
79
79
|
...u
|
|
80
|
-
], m = L(s, z),
|
|
80
|
+
], m = L(s, z), b = L(
|
|
81
81
|
s,
|
|
82
82
|
Z
|
|
83
|
-
), S =
|
|
83
|
+
), S = _(
|
|
84
84
|
() => te(l),
|
|
85
85
|
[l]
|
|
86
|
-
), { data: A, isLoading: v, isError: D } =
|
|
86
|
+
), { data: A, isLoading: v, isError: D } = w({
|
|
87
87
|
queryKey: ["allAppointmentServices"],
|
|
88
|
-
queryFn:
|
|
88
|
+
queryFn: U,
|
|
89
89
|
enabled: m
|
|
90
|
-
}),
|
|
90
|
+
}), R = _(
|
|
91
91
|
() => ie(l, e),
|
|
92
92
|
[l]
|
|
93
|
-
),
|
|
93
|
+
), N = _(
|
|
94
94
|
() => ae(A ?? [], S),
|
|
95
95
|
[A, S]
|
|
96
96
|
), g = async () => {
|
|
97
97
|
p(!0);
|
|
98
98
|
try {
|
|
99
|
-
await
|
|
99
|
+
await $(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
|
+
}), c(null), i.invalidateQueries({ queryKey: ["allAppointmentServices"] });
|
|
105
105
|
} catch {
|
|
106
106
|
t({
|
|
107
107
|
title: e("ADMIN_ALL_SERVICES_DELETE_ERROR_TITLE"),
|
|
@@ -112,19 +112,19 @@ const oe = () => {
|
|
|
112
112
|
p(!1);
|
|
113
113
|
}
|
|
114
114
|
}, T = (r, o) => o === "actions" ? /* @__PURE__ */ a(
|
|
115
|
-
|
|
115
|
+
Y,
|
|
116
116
|
{
|
|
117
117
|
id: `delete-service-${r.id}-btn`,
|
|
118
118
|
testId: `delete-service-${r.id}-btn-test-id`,
|
|
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: !
|
|
123
|
-
onClick: () =>
|
|
124
|
-
children: /* @__PURE__ */ a(
|
|
122
|
+
disabled: !b,
|
|
123
|
+
onClick: () => c(r),
|
|
124
|
+
children: /* @__PURE__ */ a(k, {})
|
|
125
125
|
}
|
|
126
126
|
) : u.includes(o) ? r[o] ?? "-" : r.attributes[o] ?? "-", f = [
|
|
127
|
-
{ id: "home", label: e("BREADCRUMB_HOME"), href:
|
|
127
|
+
{ id: "home", label: e("BREADCRUMB_HOME"), href: x },
|
|
128
128
|
{ id: "admin", label: e("BREADCRUMB_ADMIN"), isCurrentPage: !0 }
|
|
129
129
|
];
|
|
130
130
|
return /* @__PURE__ */ a(
|
|
@@ -144,8 +144,8 @@ const oe = () => {
|
|
|
144
144
|
{
|
|
145
145
|
id: "all-services",
|
|
146
146
|
title: e("ADMIN_ALL_SERVICES_TITLE"),
|
|
147
|
-
headers:
|
|
148
|
-
rows:
|
|
147
|
+
headers: R,
|
|
148
|
+
rows: N,
|
|
149
149
|
ariaLabel: "all-services-table",
|
|
150
150
|
loading: v,
|
|
151
151
|
errorStateMessage: D ? e("ADMIN_ALL_SERVICES_ERROR_MESSAGE") : null,
|
|
@@ -158,9 +158,9 @@ const oe = () => {
|
|
|
158
158
|
W,
|
|
159
159
|
{
|
|
160
160
|
serviceName: E.name,
|
|
161
|
-
isDeleting:
|
|
161
|
+
isDeleting: M,
|
|
162
162
|
onConfirm: g,
|
|
163
|
-
onCancel: () =>
|
|
163
|
+
onCancel: () => c(null)
|
|
164
164
|
}
|
|
165
165
|
)
|
|
166
166
|
]
|
package/dist/index.js
CHANGED