@bahmni/appointments-app 0.0.1-dev.395 → 0.0.1-dev.397
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-C1A0EhCk-7nohhGd6.js → DocumentsTable-CyCmTrjB-DB3bllk4.js} +10 -10
- package/dist/{FormsTable-C2Gb9B6j-DxbNwHv2.js → FormsTable-CMtT3i5o-CMUc-_U8.js} +85 -85
- package/dist/{LNWAZHJI-NkAZbvuR.js → LNWAZHJI-Dj2t68TS.js} +2 -2
- package/dist/{MWZ6AO7Z-DxGzwtcu.js → MWZ6AO7Z-CVK0RtJg.js} +2 -2
- package/dist/{Observations-Clr4S77q-2GUh9NW7.js → Observations-Cco2HyR_-BnfST746.js} +26 -26
- package/dist/{YPM2AS64-DqGSUw2Q.js → YPM2AS64-B_E24tMN.js} +1 -1
- package/dist/{index-D7HdHx-h.js → index-BOlu0-kU.js} +27 -27
- package/dist/{index-CMuNDXdK.js → index-Cjx4xv_3.js} +25977 -25941
- package/dist/{index-C1yXPNzY.js → index-D_O_BwJy.js} +33 -33
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as i, jsxs as y } from "react/jsx-runtime";
|
|
2
|
+
import { t as V, A as O, u as I, x as P, z as h, L as x, e as B, D as L, M as G, H as U, O as q, Q as F, R as k, S as H, T as Q, U as W, W as $ } from "./index-Cjx4xv_3.js";
|
|
3
3
|
import { useState as C, useMemo as c } from "react";
|
|
4
|
-
import { useQueryClient as
|
|
5
|
-
const
|
|
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"
|
|
9
9
|
), z = ({
|
|
10
10
|
serviceName: e,
|
|
11
|
-
isDeleting:
|
|
11
|
+
isDeleting: a,
|
|
12
12
|
onConfirm: t,
|
|
13
13
|
onCancel: s
|
|
14
14
|
}) => {
|
|
15
15
|
const { t: n } = I();
|
|
16
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ i(
|
|
17
17
|
P,
|
|
18
18
|
{
|
|
19
19
|
id: "delete-service-modal",
|
|
@@ -25,7 +25,7 @@ const W = V(
|
|
|
25
25
|
onRequestSubmit: t,
|
|
26
26
|
primaryButtonText: n("ADMIN_ALL_SERVICES_DELETE_BUTTON_LABEL"),
|
|
27
27
|
secondaryButtonText: n("ADMIN_ALL_SERVICES_DELETE_CANCEL"),
|
|
28
|
-
primaryButtonDisabled:
|
|
28
|
+
primaryButtonDisabled: a,
|
|
29
29
|
modalHeading: n("ADMIN_ALL_SERVICES_DELETE_MODAL_TITLE"),
|
|
30
30
|
children: n("ADMIN_ALL_SERVICES_DELETE_CONFIRM_BODY", { serviceName: e })
|
|
31
31
|
}
|
|
@@ -36,29 +36,29 @@ const W = V(
|
|
|
36
36
|
"speciality",
|
|
37
37
|
"durationMins",
|
|
38
38
|
"description"
|
|
39
|
-
], Y = "app:appointments:manageServices",
|
|
40
|
-
page:
|
|
39
|
+
], Y = "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
41
|
noPrivilegeContainer: X,
|
|
42
42
|
table: ee
|
|
43
43
|
};
|
|
44
44
|
function te(e) {
|
|
45
|
-
return e.filter((
|
|
45
|
+
return e.filter((a) => !u.includes(a));
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function ae(e, a) {
|
|
48
48
|
return [
|
|
49
49
|
...e.map((t) => ({
|
|
50
50
|
key: t,
|
|
51
|
-
header:
|
|
51
|
+
header: a(
|
|
52
52
|
`ADMIN_ALL_SERVICES_COLUMN_${h(t)}`
|
|
53
53
|
)
|
|
54
54
|
})),
|
|
55
55
|
{
|
|
56
56
|
key: "actions",
|
|
57
|
-
header:
|
|
57
|
+
header: a("ADMIN_ALL_SERVICES_COLUMN_ACTIONS")
|
|
58
58
|
}
|
|
59
59
|
];
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function ie(e, a) {
|
|
62
62
|
return e.map((t) => ({
|
|
63
63
|
id: t.uuid,
|
|
64
64
|
name: t.name,
|
|
@@ -67,7 +67,7 @@ function ae(e, i) {
|
|
|
67
67
|
durationMins: t.durationMins,
|
|
68
68
|
description: t.description,
|
|
69
69
|
attributes: Object.fromEntries(
|
|
70
|
-
|
|
70
|
+
a.map((s) => [
|
|
71
71
|
s,
|
|
72
72
|
t.attributes?.find((n) => n.attributeType === s)?.value ?? null
|
|
73
73
|
])
|
|
@@ -75,33 +75,33 @@ function ae(e, i) {
|
|
|
75
75
|
}));
|
|
76
76
|
}
|
|
77
77
|
const oe = () => {
|
|
78
|
-
const { t: e } = I(),
|
|
78
|
+
const { t: e } = I(), a = j(), { addNotification: t } = x(), { userPrivileges: s } = B(), { appointmentsConfig: n } = K(), [E, _] = C(null), [M, p] = C(!1), l = n?.serviceTableFields ?? [
|
|
79
79
|
...u
|
|
80
|
-
], m =
|
|
80
|
+
], m = L(s, Z), b = L(
|
|
81
81
|
s,
|
|
82
82
|
Y
|
|
83
83
|
), S = c(
|
|
84
84
|
() => te(l),
|
|
85
85
|
[l]
|
|
86
|
-
), { data:
|
|
86
|
+
), { data: A, isLoading: v, isError: D } = w({
|
|
87
87
|
queryKey: ["allAppointmentServices"],
|
|
88
88
|
queryFn: G,
|
|
89
89
|
enabled: m
|
|
90
|
-
}),
|
|
91
|
-
() =>
|
|
90
|
+
}), R = c(
|
|
91
|
+
() => ae(l, e),
|
|
92
92
|
[l]
|
|
93
93
|
), N = c(
|
|
94
|
-
() =>
|
|
95
|
-
[
|
|
94
|
+
() => ie(A ?? [], S),
|
|
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
|
-
}), _(null),
|
|
104
|
+
}), _(null), a.invalidateQueries({ queryKey: ["allAppointmentServices"] });
|
|
105
105
|
} catch {
|
|
106
106
|
t({
|
|
107
107
|
title: e("ADMIN_ALL_SERVICES_DELETE_ERROR_TITLE"),
|
|
@@ -111,7 +111,7 @@ const oe = () => {
|
|
|
111
111
|
} finally {
|
|
112
112
|
p(!1);
|
|
113
113
|
}
|
|
114
|
-
}, T = (r, o) => o === "actions" ? /* @__PURE__ */
|
|
114
|
+
}, T = (r, o) => o === "actions" ? /* @__PURE__ */ i(
|
|
115
115
|
Q,
|
|
116
116
|
{
|
|
117
117
|
id: `delete-service-${r.id}-btn`,
|
|
@@ -121,16 +121,16 @@ const oe = () => {
|
|
|
121
121
|
label: e("ADMIN_ALL_SERVICES_DELETE_ICON_LABEL"),
|
|
122
122
|
disabled: !b,
|
|
123
123
|
onClick: () => _(r),
|
|
124
|
-
children: /* @__PURE__ */
|
|
124
|
+
children: /* @__PURE__ */ i(W, {})
|
|
125
125
|
}
|
|
126
126
|
) : u.includes(o) ? r[o] ?? "-" : r.attributes[o] ?? "-", f = [
|
|
127
127
|
{ id: "home", label: e("BREADCRUMB_HOME"), href: U },
|
|
128
128
|
{ id: "admin", label: e("BREADCRUMB_ADMIN"), isCurrentPage: !0 }
|
|
129
129
|
];
|
|
130
|
-
return /* @__PURE__ */
|
|
130
|
+
return /* @__PURE__ */ i(
|
|
131
131
|
q,
|
|
132
132
|
{
|
|
133
|
-
header: /* @__PURE__ */
|
|
133
|
+
header: /* @__PURE__ */ i(k, { breadcrumbItems: f, userMenu: /* @__PURE__ */ i(H, {}) }),
|
|
134
134
|
main: m ? /* @__PURE__ */ y(
|
|
135
135
|
"div",
|
|
136
136
|
{
|
|
@@ -139,22 +139,22 @@ const oe = () => {
|
|
|
139
139
|
"aria-label": "all-appointment-service-page-aria-label",
|
|
140
140
|
className: d.page,
|
|
141
141
|
children: [
|
|
142
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ i(
|
|
143
143
|
F,
|
|
144
144
|
{
|
|
145
145
|
id: "all-services",
|
|
146
146
|
title: e("ADMIN_ALL_SERVICES_TITLE"),
|
|
147
|
-
headers:
|
|
147
|
+
headers: R,
|
|
148
148
|
rows: N,
|
|
149
149
|
ariaLabel: "all-services-table",
|
|
150
150
|
loading: v,
|
|
151
|
-
errorStateMessage:
|
|
151
|
+
errorStateMessage: D ? 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
|
-
E && /* @__PURE__ */
|
|
157
|
+
E && /* @__PURE__ */ i(
|
|
158
158
|
z,
|
|
159
159
|
{
|
|
160
160
|
serviceName: E.name,
|
|
@@ -165,7 +165,7 @@ const oe = () => {
|
|
|
165
165
|
)
|
|
166
166
|
]
|
|
167
167
|
}
|
|
168
|
-
) : /* @__PURE__ */
|
|
168
|
+
) : /* @__PURE__ */ i(
|
|
169
169
|
"div",
|
|
170
170
|
{
|
|
171
171
|
id: "all-appointment-service-no-view-privilege",
|
package/dist/index.js
CHANGED