@bahmni/appointments-app 0.0.1-dev.375 → 0.0.1-dev.377
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-Dcy-W7Gb-CqfXnHok.js → DocumentsTable-DltqOolY-D_7o42_B.js} +17 -17
- package/dist/{FormsTable-BncKn8RO-CRUU-wIL.js → FormsTable-0kw7u2Y0-BmMpsOq4.js} +85 -85
- package/dist/{LNWAZHJI-Q8vd3r0i.js → LNWAZHJI-z-XZbovb.js} +2 -2
- package/dist/{MWZ6AO7Z-BtRCbHUQ.js → MWZ6AO7Z-DWlUkEHd.js} +2 -2
- package/dist/{Observations-BNztTkr8-4l7UpWbS.js → Observations-BoGO_vsc-D1T0iF03.js} +42 -42
- package/dist/{YPM2AS64-nIz2f1HE.js → YPM2AS64-Dw55EsK8.js} +1 -1
- package/dist/{index-CQneCT4a.js → index-BY_f8YCQ.js} +56 -56
- package/dist/{index-DQ5fGOFT.js → index-B_aaBzFi.js} +40 -40
- package/dist/{index-DAsY1pGM.js → index-BwEjPsd2.js} +87071 -81808
- package/dist/index.css +1 -1
- 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 { C as V, D as O, u as C, F as P, L as h, K as B, X as G, E as L, G as x, M as U, O as F, P as q, R as H, S as K, T as k, U as Q, _ as $ } from "./index-BwEjPsd2.js";
|
|
3
3
|
import { useState as I, useMemo as _ } from "react";
|
|
4
4
|
import { useQueryClient as j, useQuery as w } from "@tanstack/react-query";
|
|
5
|
-
const
|
|
5
|
+
const W = V(
|
|
6
6
|
O,
|
|
7
7
|
"useAppointmentsConfig",
|
|
8
8
|
"AppointmentsConfigProvider"
|
|
9
|
-
),
|
|
9
|
+
), X = ({
|
|
10
10
|
serviceName: e,
|
|
11
|
-
isDeleting:
|
|
11
|
+
isDeleting: a,
|
|
12
12
|
onConfirm: t,
|
|
13
13
|
onCancel: s
|
|
14
14
|
}) => {
|
|
15
15
|
const { t: n } = C();
|
|
16
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ i(
|
|
17
17
|
P,
|
|
18
18
|
{
|
|
19
19
|
id: "delete-service-modal",
|
|
@@ -25,7 +25,7 @@ const K = 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 K = V(
|
|
|
36
36
|
"speciality",
|
|
37
37
|
"durationMins",
|
|
38
38
|
"description"
|
|
39
|
-
],
|
|
40
|
-
page:
|
|
41
|
-
noPrivilegeContainer:
|
|
39
|
+
], Y = "app:appointments:manageServices", z = "app:appointments:adminTab", Z = "index-module_page__Gsfbu", J = "index-module_noPrivilegeContainer__Pu5WZ", ee = "index-module_table__GAPmb", d = {
|
|
40
|
+
page: Z,
|
|
41
|
+
noPrivilegeContainer: J,
|
|
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:
|
|
52
|
-
`ADMIN_ALL_SERVICES_COLUMN_${
|
|
51
|
+
header: a(
|
|
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,24 +75,24 @@ function ae(e, i) {
|
|
|
75
75
|
}));
|
|
76
76
|
}
|
|
77
77
|
const oe = () => {
|
|
78
|
-
const { t: e } = C(),
|
|
78
|
+
const { t: e } = C(), a = j(), { addNotification: t } = B(), { userPrivileges: s } = G(), { appointmentsConfig: n } = W(), [E, c] = I(null), [b, p] = I(!1), l = n?.serviceTableFields ?? [
|
|
79
79
|
...u
|
|
80
|
-
],
|
|
80
|
+
], S = L(s, z), M = L(
|
|
81
81
|
s,
|
|
82
|
-
|
|
83
|
-
),
|
|
82
|
+
Y
|
|
83
|
+
), m = _(
|
|
84
84
|
() => te(l),
|
|
85
85
|
[l]
|
|
86
86
|
), { data: A, isLoading: v, isError: D } = w({
|
|
87
87
|
queryKey: ["allAppointmentServices"],
|
|
88
|
-
queryFn:
|
|
89
|
-
enabled:
|
|
88
|
+
queryFn: x,
|
|
89
|
+
enabled: S
|
|
90
90
|
}), R = _(
|
|
91
|
-
() =>
|
|
91
|
+
() => ae(l, e),
|
|
92
92
|
[l]
|
|
93
93
|
), N = _(
|
|
94
|
-
() =>
|
|
95
|
-
[A,
|
|
94
|
+
() => ie(A ?? [], m),
|
|
95
|
+
[A, m]
|
|
96
96
|
), g = async () => {
|
|
97
97
|
p(!0);
|
|
98
98
|
try {
|
|
@@ -101,7 +101,7 @@ const oe = () => {
|
|
|
101
101
|
message: e("ADMIN_ALL_SERVICES_DELETE_SUCCESS_MESSAGE"),
|
|
102
102
|
type: "success",
|
|
103
103
|
timeout: 5e3
|
|
104
|
-
}), c(null),
|
|
104
|
+
}), c(null), a.invalidateQueries({ queryKey: ["allAppointmentServices"] });
|
|
105
105
|
} catch {
|
|
106
106
|
t({
|
|
107
107
|
title: e("ADMIN_ALL_SERVICES_DELETE_ERROR_TITLE"),
|
|
@@ -111,27 +111,27 @@ const oe = () => {
|
|
|
111
111
|
} finally {
|
|
112
112
|
p(!1);
|
|
113
113
|
}
|
|
114
|
-
}, T = (r, o) => o === "actions" ? /* @__PURE__ */
|
|
115
|
-
|
|
114
|
+
}, T = (r, o) => o === "actions" ? /* @__PURE__ */ i(
|
|
115
|
+
k,
|
|
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: !
|
|
122
|
+
disabled: !M,
|
|
123
123
|
onClick: () => c(r),
|
|
124
|
-
children: /* @__PURE__ */
|
|
124
|
+
children: /* @__PURE__ */ i(Q, {})
|
|
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: U },
|
|
128
128
|
{ id: "admin", label: e("BREADCRUMB_ADMIN"), isCurrentPage: !0 }
|
|
129
129
|
];
|
|
130
|
-
return /* @__PURE__ */
|
|
130
|
+
return /* @__PURE__ */ i(
|
|
131
131
|
F,
|
|
132
132
|
{
|
|
133
|
-
header: /* @__PURE__ */
|
|
134
|
-
main:
|
|
133
|
+
header: /* @__PURE__ */ i(H, { breadcrumbItems: f, userMenu: /* @__PURE__ */ i(K, {}) }),
|
|
134
|
+
main: S ? /* @__PURE__ */ y(
|
|
135
135
|
"div",
|
|
136
136
|
{
|
|
137
137
|
id: "all-appointment-service-page",
|
|
@@ -139,7 +139,7 @@ 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
|
q,
|
|
144
144
|
{
|
|
145
145
|
id: "all-services",
|
|
@@ -154,18 +154,18 @@ const oe = () => {
|
|
|
154
154
|
className: d.table
|
|
155
155
|
}
|
|
156
156
|
),
|
|
157
|
-
E && /* @__PURE__ */
|
|
158
|
-
|
|
157
|
+
E && /* @__PURE__ */ i(
|
|
158
|
+
X,
|
|
159
159
|
{
|
|
160
160
|
serviceName: E.name,
|
|
161
|
-
isDeleting:
|
|
161
|
+
isDeleting: b,
|
|
162
162
|
onConfirm: g,
|
|
163
163
|
onCancel: () => c(null)
|
|
164
164
|
}
|
|
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",
|