@bahmni/appointments-app 0.0.1-dev.405 → 0.0.1-dev.409
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-CIJwgXmb-D1TQHecI.js → DocumentsTable-ju-Rev1y-Dk2ESvXf.js} +11 -11
- package/dist/{FormsTable-DMPfuqmY-CPlSuZtA.js → FormsTable-CTy4JTE8-Cn7OXlPy.js} +65 -65
- package/dist/{LNWAZHJI-yNLSiU7P.js → LNWAZHJI-DHAhIGpP.js} +7 -7
- package/dist/{MWZ6AO7Z-1OLYoGcm.js → MWZ6AO7Z-BoGt41p_.js} +2 -2
- package/dist/Observations-GHKQrxHf-C5n95y1v.js +246 -0
- package/dist/{YPM2AS64-BSMOwRa0.js → YPM2AS64-DO638Kn-.js} +1 -1
- package/dist/{index-C5qmSsJM.js → index-5kVVG9ro.js} +18 -18
- package/dist/{index-Cl8zGTvc.js → index-CrHWa1Oc.js} +32 -32
- package/dist/{index-CDAgqrus.js → index-DqgfD6Rf.js} +28953 -28897
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/Observations-BflI1_YX-Cp-d90I-.js +0 -213
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as i, jsxs as y } from "react/jsx-runtime";
|
|
2
|
-
import { H as V, I as O, u as C,
|
|
2
|
+
import { H as V, I as O, u as C, J as P, K as h, z as B, a as x, N as L, O as G, _ as U, R as q, T as F, U as H, W as $, Z as k, $ as K, a0 as W } from "./index-DqgfD6Rf.js";
|
|
3
3
|
import { useState as I, useMemo as c } from "react";
|
|
4
4
|
import { useQueryClient as j, useQuery as w } from "@tanstack/react-query";
|
|
5
5
|
const z = V(
|
|
6
6
|
O,
|
|
7
7
|
"useAppointmentsConfig",
|
|
8
8
|
"AppointmentsConfigProvider"
|
|
9
|
-
),
|
|
9
|
+
), Q = ({
|
|
10
10
|
serviceName: e,
|
|
11
11
|
isDeleting: a,
|
|
12
12
|
onConfirm: t,
|
|
@@ -36,9 +36,9 @@ const z = V(
|
|
|
36
36
|
"speciality",
|
|
37
37
|
"durationMins",
|
|
38
38
|
"description"
|
|
39
|
-
], Y = "app:appointments:manageServices", Z = "app:appointments:adminTab",
|
|
40
|
-
page:
|
|
41
|
-
noPrivilegeContainer:
|
|
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
|
+
noPrivilegeContainer: X,
|
|
42
42
|
table: ee
|
|
43
43
|
};
|
|
44
44
|
function te(e) {
|
|
@@ -75,9 +75,9 @@ function ie(e, a) {
|
|
|
75
75
|
}));
|
|
76
76
|
}
|
|
77
77
|
const oe = () => {
|
|
78
|
-
const { t: e } = C(), a = j(), { addNotification: t } =
|
|
78
|
+
const { t: e } = C(), a = j(), { addNotification: t } = B(), { userPrivileges: s } = x(), { appointmentsConfig: n } = z(), [E, _] = I(null), [b, p] = I(!1), l = n?.serviceTableFields ?? [
|
|
79
79
|
...u
|
|
80
|
-
],
|
|
80
|
+
], m = L(s, Z), M = L(
|
|
81
81
|
s,
|
|
82
82
|
Y
|
|
83
83
|
), S = c(
|
|
@@ -86,7 +86,7 @@ const oe = () => {
|
|
|
86
86
|
), { data: A, isLoading: v, isError: R } = w({
|
|
87
87
|
queryKey: ["allAppointmentServices"],
|
|
88
88
|
queryFn: G,
|
|
89
|
-
enabled:
|
|
89
|
+
enabled: m
|
|
90
90
|
}), D = c(
|
|
91
91
|
() => ae(l, e),
|
|
92
92
|
[l]
|
|
@@ -94,9 +94,9 @@ const oe = () => {
|
|
|
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",
|
|
@@ -109,19 +109,19 @@ const oe = () => {
|
|
|
109
109
|
type: "error"
|
|
110
110
|
});
|
|
111
111
|
} finally {
|
|
112
|
-
|
|
112
|
+
p(!1);
|
|
113
113
|
}
|
|
114
114
|
}, T = (r, o) => o === "actions" ? /* @__PURE__ */ i(
|
|
115
|
-
|
|
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: () => _(r),
|
|
124
|
-
children: /* @__PURE__ */ i(
|
|
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 },
|
|
@@ -130,8 +130,8 @@ const oe = () => {
|
|
|
130
130
|
return /* @__PURE__ */ i(
|
|
131
131
|
q,
|
|
132
132
|
{
|
|
133
|
-
header: /* @__PURE__ */ i(
|
|
134
|
-
main:
|
|
133
|
+
header: /* @__PURE__ */ i(H, { breadcrumbItems: f, userMenu: /* @__PURE__ */ i($, {}) }),
|
|
134
|
+
main: m ? /* @__PURE__ */ y(
|
|
135
135
|
"div",
|
|
136
136
|
{
|
|
137
137
|
id: "all-appointment-service-page",
|
|
@@ -155,10 +155,10 @@ const oe = () => {
|
|
|
155
155
|
}
|
|
156
156
|
),
|
|
157
157
|
E && /* @__PURE__ */ i(
|
|
158
|
-
|
|
158
|
+
Q,
|
|
159
159
|
{
|
|
160
160
|
serviceName: E.name,
|
|
161
|
-
isDeleting:
|
|
161
|
+
isDeleting: b,
|
|
162
162
|
onConfirm: g,
|
|
163
163
|
onCancel: () => _(null)
|
|
164
164
|
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { jsx as r, jsxs as p } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { a1 as f, a2 as B, a3 as P, a4 as V, a5 as J, a6 as ee, a7 as te, a8 as ie, O as ae, a9 as ne, u as Q, aa as R, ab as le, ac as re, ad as se, ae as E, af as F, ag as C, ah as Y, ai as x, aj as k, ak as $, a as oe, z as de, N as q, al as ce, _ as me, am as Ae, an as Ie, ao as ue, T as _e, U as Te, W as Le } from "./index-DqgfD6Rf.js";
|
|
3
3
|
import { useState as g, useMemo as N, useEffect as S, useRef as ve, useCallback as U } from "react";
|
|
4
|
-
import { useQuery as
|
|
5
|
-
const be = "Available for appointments", G = "Get Appointment Unavailability", pe = "Add Appointment Unavailability",
|
|
4
|
+
import { useQuery as M, useQueryClient as Ne } from "@tanstack/react-query";
|
|
5
|
+
const be = "Available for appointments", G = "Get Appointment Unavailability", pe = "Add Appointment Unavailability", w = "Appointment Location", ye = () => {
|
|
6
6
|
try {
|
|
7
|
-
return
|
|
7
|
+
return J().uuid;
|
|
8
8
|
} catch {
|
|
9
9
|
return "";
|
|
10
10
|
}
|
|
11
|
-
},
|
|
11
|
+
}, H = (e) => ({
|
|
12
12
|
id: "",
|
|
13
13
|
text: e
|
|
14
|
-
}),
|
|
14
|
+
}), De = (e) => ({
|
|
15
15
|
display: e,
|
|
16
16
|
uuid: ""
|
|
17
|
-
}),
|
|
17
|
+
}), Me = (e, a) => {
|
|
18
18
|
const n = e.map((t) => ({
|
|
19
19
|
id: t.uuid,
|
|
20
20
|
text: t.name,
|
|
@@ -91,14 +91,14 @@ const be = "Available for appointments", G = "Get Appointment Unavailability", p
|
|
|
91
91
|
data: e,
|
|
92
92
|
isLoading: a,
|
|
93
93
|
isError: n
|
|
94
|
-
} =
|
|
94
|
+
} = M({
|
|
95
95
|
queryKey: ["currentUser"],
|
|
96
96
|
queryFn: ee
|
|
97
97
|
}), {
|
|
98
98
|
data: t = [],
|
|
99
99
|
isLoading: o,
|
|
100
100
|
isError: c
|
|
101
|
-
} =
|
|
101
|
+
} = M({
|
|
102
102
|
queryKey: ["providerLoginLocations", e?.uuid],
|
|
103
103
|
queryFn: async () => {
|
|
104
104
|
const I = await te(
|
|
@@ -106,12 +106,12 @@ const be = "Available for appointments", G = "Get Appointment Unavailability", p
|
|
|
106
106
|
);
|
|
107
107
|
if (I.length === 0) {
|
|
108
108
|
const u = await ie(
|
|
109
|
-
|
|
109
|
+
w
|
|
110
110
|
);
|
|
111
111
|
return Se(u);
|
|
112
112
|
}
|
|
113
113
|
return I.filter(
|
|
114
|
-
(u) => u.tags?.some((v) => v.display ===
|
|
114
|
+
(u) => u.tags?.some((v) => v.display === w)
|
|
115
115
|
);
|
|
116
116
|
},
|
|
117
117
|
enabled: !!e?.uuid
|
|
@@ -119,14 +119,14 @@ const be = "Available for appointments", G = "Get Appointment Unavailability", p
|
|
|
119
119
|
data: A = [],
|
|
120
120
|
isLoading: L,
|
|
121
121
|
isError: m
|
|
122
|
-
} =
|
|
122
|
+
} = M({
|
|
123
123
|
queryKey: ["appointmentServices"],
|
|
124
124
|
queryFn: ae
|
|
125
125
|
}), {
|
|
126
126
|
data: l = [],
|
|
127
127
|
isLoading: s,
|
|
128
128
|
isError: _
|
|
129
|
-
} =
|
|
129
|
+
} = M({
|
|
130
130
|
queryKey: ["providers"],
|
|
131
131
|
queryFn: ne
|
|
132
132
|
});
|
|
@@ -173,7 +173,7 @@ const be = "Available for appointments", G = "Get Appointment Unavailability", p
|
|
|
173
173
|
),
|
|
174
174
|
[A]
|
|
175
175
|
), u = N(
|
|
176
|
-
() => R(!1, !1, o,
|
|
176
|
+
() => R(!1, !1, o, De, {
|
|
177
177
|
loading: "",
|
|
178
178
|
error: "",
|
|
179
179
|
empty: t("ADMIN_UNAVAILABILITY_FORM_NO_LOCATIONS")
|
|
@@ -183,11 +183,11 @@ const be = "Available for appointments", G = "Get Appointment Unavailability", p
|
|
|
183
183
|
() => R(
|
|
184
184
|
!1,
|
|
185
185
|
!1,
|
|
186
|
-
|
|
186
|
+
Me(
|
|
187
187
|
_,
|
|
188
188
|
t("ADMIN_UNAVAILABILITY_FORM_ALL_SERVICES")
|
|
189
189
|
),
|
|
190
|
-
|
|
190
|
+
H,
|
|
191
191
|
{
|
|
192
192
|
loading: "",
|
|
193
193
|
error: "",
|
|
@@ -195,7 +195,7 @@ const be = "Available for appointments", G = "Get Appointment Unavailability", p
|
|
|
195
195
|
}
|
|
196
196
|
),
|
|
197
197
|
[_]
|
|
198
|
-
),
|
|
198
|
+
), y = N(
|
|
199
199
|
() => R(
|
|
200
200
|
!1,
|
|
201
201
|
!1,
|
|
@@ -203,7 +203,7 @@ const be = "Available for appointments", G = "Get Appointment Unavailability", p
|
|
|
203
203
|
I,
|
|
204
204
|
t("ADMIN_UNAVAILABILITY_FORM_ALL_PROVIDERS")
|
|
205
205
|
),
|
|
206
|
-
|
|
206
|
+
H,
|
|
207
207
|
{
|
|
208
208
|
loading: "",
|
|
209
209
|
error: "",
|
|
@@ -214,11 +214,11 @@ const be = "Available for appointments", G = "Get Appointment Unavailability", p
|
|
|
214
214
|
);
|
|
215
215
|
return S(() => {
|
|
216
216
|
if (o.length === 0) return;
|
|
217
|
-
const i =
|
|
218
|
-
(
|
|
217
|
+
const i = ye(), b = o.some(
|
|
218
|
+
(D) => D.uuid === i
|
|
219
219
|
);
|
|
220
|
-
s((
|
|
221
|
-
...
|
|
220
|
+
s((D) => ({
|
|
221
|
+
...D,
|
|
222
222
|
locationUuid: b ? i : ""
|
|
223
223
|
}));
|
|
224
224
|
}, [o]), S(() => {
|
|
@@ -229,9 +229,9 @@ const be = "Available for appointments", G = "Get Appointment Unavailability", p
|
|
|
229
229
|
}, [v]), S(() => {
|
|
230
230
|
I.length > 0 && s((i) => ({
|
|
231
231
|
...i,
|
|
232
|
-
selectedProviderItems:
|
|
232
|
+
selectedProviderItems: y
|
|
233
233
|
}));
|
|
234
|
-
}, [
|
|
234
|
+
}, [y]), a.current = {
|
|
235
235
|
...l,
|
|
236
236
|
filteredServicesCount: _.length,
|
|
237
237
|
availableProvidersCount: I.length
|
|
@@ -484,7 +484,7 @@ const be = "Available for appointments", G = "Get Appointment Unavailability", p
|
|
|
484
484
|
"data-testid": "provider-multiselect",
|
|
485
485
|
titleText: t("ADMIN_UNAVAILABILITY_FORM_PROVIDER_LABEL"),
|
|
486
486
|
placeholder: t("ADMIN_UNAVAILABILITY_FORM_PROVIDER_LABEL"),
|
|
487
|
-
items:
|
|
487
|
+
items: y,
|
|
488
488
|
itemToString: (i) => i?.text ?? "",
|
|
489
489
|
selectedItems: l.selectedProviderItems,
|
|
490
490
|
onChange: (i) => s({
|
|
@@ -510,7 +510,7 @@ const be = "Available for appointments", G = "Get Appointment Unavailability", p
|
|
|
510
510
|
), I = q(n, [
|
|
511
511
|
pe,
|
|
512
512
|
G
|
|
513
|
-
]), { data: u, isLoading: v, isError:
|
|
513
|
+
]), { data: u, isLoading: v, isError: y } = M({
|
|
514
514
|
queryKey: ["appointmentUnavailabilities"],
|
|
515
515
|
queryFn: ce,
|
|
516
516
|
enabled: _
|
|
@@ -537,7 +537,7 @@ const be = "Available for appointments", G = "Get Appointment Unavailability", p
|
|
|
537
537
|
key: "providerName",
|
|
538
538
|
header: e("ADMIN_UNAVAILABILITY_COLUMN_PROVIDER")
|
|
539
539
|
}
|
|
540
|
-
], [e]),
|
|
540
|
+
], [e]), D = N(() => u ? u.map((T) => fe(T, e)) : [], [u, e]), h = U(
|
|
541
541
|
async (T) => {
|
|
542
542
|
L(!0);
|
|
543
543
|
try {
|
|
@@ -566,9 +566,9 @@ const be = "Available for appointments", G = "Get Appointment Unavailability", p
|
|
|
566
566
|
s(T), !(Object.keys(T).length > 0) && await h(Re(m.current, e));
|
|
567
567
|
}, [e, h]), W = U(
|
|
568
568
|
(T) => {
|
|
569
|
-
s((
|
|
570
|
-
const O = { ...
|
|
571
|
-
return T.forEach((
|
|
569
|
+
s((X) => {
|
|
570
|
+
const O = { ...X };
|
|
571
|
+
return T.forEach((Z) => delete O[Z]), O;
|
|
572
572
|
});
|
|
573
573
|
},
|
|
574
574
|
[]
|
|
@@ -595,10 +595,10 @@ const be = "Available for appointments", G = "Get Appointment Unavailability", p
|
|
|
595
595
|
"aria-label": "appointment-unavailability-actions-table-aria-label",
|
|
596
596
|
title: e("ADMIN_UNAVAILABILITY_TITLE"),
|
|
597
597
|
headers: b,
|
|
598
|
-
rows:
|
|
598
|
+
rows: D,
|
|
599
599
|
ariaLabel: "unavailability-table",
|
|
600
600
|
loading: v,
|
|
601
|
-
errorStateMessage:
|
|
601
|
+
errorStateMessage: y ? e("ADMIN_UNAVAILABILITY_ERROR_MESSAGE") : null,
|
|
602
602
|
emptyStateMessage: e("ADMIN_UNAVAILABILITY_EMPTY_MESSAGE"),
|
|
603
603
|
actionButton: !o && I ? {
|
|
604
604
|
label: e("ADMIN_UNAVAILABILITY_ADD_BUTTON"),
|