@bahmni/appointments-app 0.0.1-dev.338 → 0.0.1-dev.340
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/App.d.ts.map +1 -1
- package/dist/{DocumentsTable-Cq55el4h-E-cUWEQ_.js → DocumentsTable-DLUCAqub-ByDEFM3T.js} +7 -7
- package/dist/{FormsTable-DJJY3k8g-Bp5eTglp.js → FormsTable-DfcTBBcW-DY-qO08P.js} +58 -58
- package/dist/{LNWAZHJI-DYsryw0S.js → LNWAZHJI-CS5E9Nxi.js} +4 -4
- package/dist/{MWZ6AO7Z-Bua8tHFc.js → MWZ6AO7Z-BT5HM6gO.js} +5 -5
- package/dist/{Observations-CHGrTi3--CLZAD84c.js → Observations-d1dtuDfC-Dnn0fXmm.js} +32 -32
- package/dist/{YPM2AS64-B_IYwKmv.js → YPM2AS64-DrrVU9ug.js} +1 -1
- package/dist/{index-BETQTa2N.js → index-B92O3_On.js} +46 -46
- package/dist/{index-BijQdYmK.js → index-BDBSFoaD.js} +34290 -34153
- package/dist/{index-DAgbckWt.js → index-C49jsVFh.js} +62 -62
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/locales/locale_en.json +4 -1
- package/dist/locales/locale_es.json +4 -1
- package/dist/pages/admin/allServices/index.d.ts.map +1 -1
- package/dist/pages/admin/appointmentUnavailability/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as i, jsxs as y } from "react/jsx-runtime";
|
|
2
|
+
import { $ as V, p as P, u as C, F as O, q as B, B as h, r as x, s as L, W as G, P as U, t as F, y as q, J as H, z as $, D as W, U as k, I as w } from "./index-BDBSFoaD.js";
|
|
3
3
|
import { useState as I, useMemo as _ } from "react";
|
|
4
|
-
import { useQueryClient as
|
|
5
|
-
const
|
|
6
|
-
|
|
4
|
+
import { useQueryClient as Q, useQuery as j } from "@tanstack/react-query";
|
|
5
|
+
const J = V(
|
|
6
|
+
P,
|
|
7
7
|
"useAppointmentsConfig",
|
|
8
8
|
"AppointmentsConfigProvider"
|
|
9
|
-
),
|
|
9
|
+
), K = ({
|
|
10
10
|
serviceName: e,
|
|
11
11
|
isDeleting: a,
|
|
12
12
|
onConfirm: t,
|
|
13
13
|
onCancel: s
|
|
14
14
|
}) => {
|
|
15
|
-
const { t:
|
|
16
|
-
return /* @__PURE__ */
|
|
17
|
-
|
|
15
|
+
const { t: n } = C();
|
|
16
|
+
return /* @__PURE__ */ i(
|
|
17
|
+
O,
|
|
18
18
|
{
|
|
19
19
|
id: "delete-service-modal",
|
|
20
20
|
testId: "delete-service-modal-test-id",
|
|
@@ -23,11 +23,11 @@ const Q = V(
|
|
|
23
23
|
danger: !0,
|
|
24
24
|
onRequestClose: s,
|
|
25
25
|
onRequestSubmit: t,
|
|
26
|
-
primaryButtonText:
|
|
27
|
-
secondaryButtonText:
|
|
26
|
+
primaryButtonText: n("ADMIN_ALL_SERVICES_DELETE_BUTTON_LABEL"),
|
|
27
|
+
secondaryButtonText: n("ADMIN_ALL_SERVICES_DELETE_CANCEL"),
|
|
28
28
|
primaryButtonDisabled: a,
|
|
29
|
-
modalHeading:
|
|
30
|
-
children:
|
|
29
|
+
modalHeading: n("ADMIN_ALL_SERVICES_DELETE_MODAL_TITLE"),
|
|
30
|
+
children: n("ADMIN_ALL_SERVICES_DELETE_CONFIRM_BODY", { serviceName: e })
|
|
31
31
|
}
|
|
32
32
|
);
|
|
33
33
|
}, u = [
|
|
@@ -36,15 +36,15 @@ const Q = V(
|
|
|
36
36
|
"speciality",
|
|
37
37
|
"durationMins",
|
|
38
38
|
"description"
|
|
39
|
-
],
|
|
40
|
-
page:
|
|
41
|
-
noPrivilegeContainer:
|
|
42
|
-
table:
|
|
39
|
+
], Y = "app:appointments:manageServices", Z = "app:appointments:adminTab", z = "index-module_page__Gsfbu", X = "index-module_noPrivilegeContainer__Pu5WZ", ee = "index-module_table__GAPmb", d = {
|
|
40
|
+
page: z,
|
|
41
|
+
noPrivilegeContainer: X,
|
|
42
|
+
table: ee
|
|
43
43
|
};
|
|
44
|
-
function
|
|
44
|
+
function te(e) {
|
|
45
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,
|
|
@@ -58,7 +58,7 @@ function te(e, a) {
|
|
|
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,
|
|
@@ -69,34 +69,34 @@ function ae(e, a) {
|
|
|
69
69
|
attributes: Object.fromEntries(
|
|
70
70
|
a.map((s) => [
|
|
71
71
|
s,
|
|
72
|
-
t.attributes?.find((
|
|
72
|
+
t.attributes?.find((n) => n.attributeType === s)?.value ?? null
|
|
73
73
|
])
|
|
74
74
|
)
|
|
75
75
|
}));
|
|
76
76
|
}
|
|
77
|
-
const
|
|
78
|
-
const { t: e } = C(), a =
|
|
77
|
+
const oe = () => {
|
|
78
|
+
const { t: e } = C(), a = Q(), { addNotification: t } = h(), { userPrivileges: s } = x(), { appointmentsConfig: n } = J(), [E, c] = I(null), [M, p] = I(!1), l = n?.serviceTableFields ?? [
|
|
79
79
|
...u
|
|
80
|
-
], m = L(s,
|
|
80
|
+
], m = L(s, Z), b = L(
|
|
81
81
|
s,
|
|
82
|
-
|
|
82
|
+
Y
|
|
83
83
|
), S = _(
|
|
84
|
-
() =>
|
|
84
|
+
() => te(l),
|
|
85
85
|
[l]
|
|
86
|
-
), { data: A, isLoading:
|
|
86
|
+
), { data: A, isLoading: v, isError: D } = j({
|
|
87
87
|
queryKey: ["allAppointmentServices"],
|
|
88
|
-
queryFn:
|
|
88
|
+
queryFn: G,
|
|
89
89
|
enabled: m
|
|
90
90
|
}), R = _(
|
|
91
|
-
() =>
|
|
91
|
+
() => ae(l, e),
|
|
92
92
|
[l]
|
|
93
93
|
), N = _(
|
|
94
|
-
() =>
|
|
94
|
+
() => ie(A ?? [], S),
|
|
95
95
|
[A, S]
|
|
96
96
|
), g = async () => {
|
|
97
97
|
p(!0);
|
|
98
98
|
try {
|
|
99
|
-
await
|
|
99
|
+
await w(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",
|
|
@@ -111,26 +111,26 @@ const le = () => {
|
|
|
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
|
+
W,
|
|
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: !b,
|
|
123
123
|
onClick: () => c(r),
|
|
124
|
-
children: /* @__PURE__ */
|
|
124
|
+
children: /* @__PURE__ */ i(k, {})
|
|
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__ */
|
|
131
|
-
|
|
130
|
+
return /* @__PURE__ */ i(
|
|
131
|
+
F,
|
|
132
132
|
{
|
|
133
|
-
header: /* @__PURE__ */
|
|
133
|
+
header: /* @__PURE__ */ i(H, { breadcrumbItems: f, userMenu: /* @__PURE__ */ i($, {}) }),
|
|
134
134
|
main: m ? /* @__PURE__ */ y(
|
|
135
135
|
"div",
|
|
136
136
|
{
|
|
@@ -139,7 +139,7 @@ const le = () => {
|
|
|
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",
|
|
@@ -147,25 +147,25 @@ const le = () => {
|
|
|
147
147
|
headers: R,
|
|
148
148
|
rows: N,
|
|
149
149
|
ariaLabel: "all-services-table",
|
|
150
|
-
loading:
|
|
151
|
-
errorStateMessage:
|
|
150
|
+
loading: v,
|
|
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__ */
|
|
158
|
-
|
|
157
|
+
E && /* @__PURE__ */ i(
|
|
158
|
+
K,
|
|
159
159
|
{
|
|
160
160
|
serviceName: E.name,
|
|
161
|
-
isDeleting:
|
|
161
|
+
isDeleting: M,
|
|
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",
|
|
@@ -179,5 +179,5 @@ const le = () => {
|
|
|
179
179
|
);
|
|
180
180
|
};
|
|
181
181
|
export {
|
|
182
|
-
|
|
182
|
+
oe as default
|
|
183
183
|
};
|