@bahmni/appointments-app 0.0.1-dev.394 → 0.0.1-dev.395
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-Cz-E1n_9-ev_6HncJ.js → DocumentsTable-C1A0EhCk-7nohhGd6.js} +19 -19
- package/dist/{FormsTable-D2iNj6MO-Cooe1uL_.js → FormsTable-C2Gb9B6j-DxbNwHv2.js} +76 -76
- package/dist/{LNWAZHJI-CMWV8frw.js → LNWAZHJI-NkAZbvuR.js} +2 -2
- package/dist/{MWZ6AO7Z-BPCEO6bV.js → MWZ6AO7Z-DxGzwtcu.js} +2 -2
- package/dist/{Observations-mnzr0Nxn-C8ffI22P.js → Observations-Clr4S77q-2GUh9NW7.js} +40 -40
- package/dist/{YPM2AS64-IiNGFbba.js → YPM2AS64-DqGSUw2Q.js} +1 -1
- package/dist/{index-B0zxSHSO.js → index-C1yXPNzY.js} +29 -29
- package/dist/{index-BnMAhwqo.js → index-CMuNDXdK.js} +10748 -10742
- package/dist/{index-CXUQOc97.js → index-D7HdHx-h.js} +54 -54
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as a, jsxs as y } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { useState as C, useMemo as
|
|
4
|
-
import { useQueryClient as
|
|
5
|
-
const
|
|
2
|
+
import { n as V, r as O, u as I, s as P, x as h, L as x, e as B, v as A, M as G, z as U, C as q, H as F, J as k, O as H, Q, R as $, T as j } from "./index-CMuNDXdK.js";
|
|
3
|
+
import { useState as C, useMemo as c } from "react";
|
|
4
|
+
import { useQueryClient as w, useQuery as K } from "@tanstack/react-query";
|
|
5
|
+
const W = V(
|
|
6
6
|
O,
|
|
7
7
|
"useAppointmentsConfig",
|
|
8
8
|
"AppointmentsConfigProvider"
|
|
9
|
-
),
|
|
9
|
+
), z = ({
|
|
10
10
|
serviceName: e,
|
|
11
11
|
isDeleting: i,
|
|
12
12
|
onConfirm: t,
|
|
@@ -36,9 +36,9 @@ const K = V(
|
|
|
36
36
|
"speciality",
|
|
37
37
|
"durationMins",
|
|
38
38
|
"description"
|
|
39
|
-
],
|
|
39
|
+
], Y = "app:appointments:manageServices", J = "app:appointments:adminTab", Z = "index-module_page__Gsfbu", X = "index-module_noPrivilegeContainer__Pu5WZ", ee = "index-module_table__GAPmb", d = {
|
|
40
40
|
page: Z,
|
|
41
|
-
noPrivilegeContainer:
|
|
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 } = I(), i =
|
|
78
|
+
const { t: e } = I(), i = w(), { addNotification: t } = x(), { userPrivileges: s } = B(), { appointmentsConfig: n } = W(), [E, _] = C(null), [M, p] = C(!1), l = n?.serviceTableFields ?? [
|
|
79
79
|
...u
|
|
80
|
-
],
|
|
80
|
+
], m = A(s, J), b = A(
|
|
81
81
|
s,
|
|
82
|
-
|
|
83
|
-
),
|
|
82
|
+
Y
|
|
83
|
+
), S = c(
|
|
84
84
|
() => te(l),
|
|
85
85
|
[l]
|
|
86
|
-
), { data: L, isLoading: v, isError:
|
|
86
|
+
), { data: L, isLoading: v, isError: R } = K({
|
|
87
87
|
queryKey: ["allAppointmentServices"],
|
|
88
|
-
queryFn:
|
|
89
|
-
enabled:
|
|
90
|
-
}),
|
|
88
|
+
queryFn: G,
|
|
89
|
+
enabled: m
|
|
90
|
+
}), D = c(
|
|
91
91
|
() => ie(l, e),
|
|
92
92
|
[l]
|
|
93
|
-
), N =
|
|
94
|
-
() => ae(L ?? [],
|
|
95
|
-
[L,
|
|
93
|
+
), N = c(
|
|
94
|
+
() => ae(L ?? [], S),
|
|
95
|
+
[L, S]
|
|
96
96
|
), g = async () => {
|
|
97
97
|
p(!0);
|
|
98
98
|
try {
|
|
99
|
-
await
|
|
99
|
+
await j(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), i.invalidateQueries({ queryKey: ["allAppointmentServices"] });
|
|
105
105
|
} catch {
|
|
106
106
|
t({
|
|
107
107
|
title: e("ADMIN_ALL_SERVICES_DELETE_ERROR_TITLE"),
|
|
@@ -112,7 +112,7 @@ const oe = () => {
|
|
|
112
112
|
p(!1);
|
|
113
113
|
}
|
|
114
114
|
}, T = (r, o) => o === "actions" ? /* @__PURE__ */ a(
|
|
115
|
-
|
|
115
|
+
Q,
|
|
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 oe = () => {
|
|
|
120
120
|
kind: "ghost",
|
|
121
121
|
label: e("ADMIN_ALL_SERVICES_DELETE_ICON_LABEL"),
|
|
122
122
|
disabled: !b,
|
|
123
|
-
onClick: () =>
|
|
124
|
-
children: /* @__PURE__ */ a(
|
|
123
|
+
onClick: () => _(r),
|
|
124
|
+
children: /* @__PURE__ */ a($, {})
|
|
125
125
|
}
|
|
126
126
|
) : u.includes(o) ? r[o] ?? "-" : r.attributes[o] ?? "-", f = [
|
|
127
127
|
{ id: "home", label: e("BREADCRUMB_HOME"), href: U },
|
|
@@ -130,8 +130,8 @@ const oe = () => {
|
|
|
130
130
|
return /* @__PURE__ */ a(
|
|
131
131
|
q,
|
|
132
132
|
{
|
|
133
|
-
header: /* @__PURE__ */ a(
|
|
134
|
-
main:
|
|
133
|
+
header: /* @__PURE__ */ a(k, { breadcrumbItems: f, userMenu: /* @__PURE__ */ a(H, {}) }),
|
|
134
|
+
main: m ? /* @__PURE__ */ y(
|
|
135
135
|
"div",
|
|
136
136
|
{
|
|
137
137
|
id: "all-appointment-service-page",
|
|
@@ -144,23 +144,23 @@ const oe = () => {
|
|
|
144
144
|
{
|
|
145
145
|
id: "all-services",
|
|
146
146
|
title: e("ADMIN_ALL_SERVICES_TITLE"),
|
|
147
|
-
headers:
|
|
147
|
+
headers: D,
|
|
148
148
|
rows: N,
|
|
149
149
|
ariaLabel: "all-services-table",
|
|
150
150
|
loading: v,
|
|
151
|
-
errorStateMessage:
|
|
151
|
+
errorStateMessage: R ? 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
|
|
155
155
|
}
|
|
156
156
|
),
|
|
157
157
|
E && /* @__PURE__ */ a(
|
|
158
|
-
|
|
158
|
+
z,
|
|
159
159
|
{
|
|
160
160
|
serviceName: E.name,
|
|
161
161
|
isDeleting: M,
|
|
162
162
|
onConfirm: g,
|
|
163
|
-
onCancel: () =>
|
|
163
|
+
onCancel: () => _(null)
|
|
164
164
|
}
|
|
165
165
|
)
|
|
166
166
|
]
|