@bahmni/appointments-app 0.0.1-dev.367 → 0.0.1-dev.369
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-7Vlcy4Vm-DZwayhCt.js → DocumentsTable-B-G7w_Ik-ClKwl8Uu.js} +33 -33
- package/dist/{FormsTable-CJVrUcXB-DR4AQs-i.js → FormsTable-C8tKxM7t-B7OV-Yb9.js} +50 -50
- package/dist/{LNWAZHJI-CBrOxebh.js → LNWAZHJI-Cl7G9BAT.js} +2 -2
- package/dist/{MWZ6AO7Z-C_vM_bx4.js → MWZ6AO7Z-CMHQjxP1.js} +2 -2
- package/dist/{Observations-Be_tZGhM-DeKwp5M-.js → Observations-BZqdA0Xj-t5PNvrMD.js} +55 -55
- package/dist/{YPM2AS64-Cny94FDr.js → YPM2AS64-CZ_wiDBe.js} +1 -1
- package/dist/{index-NuZ0Q4DH.js → index-CZd7_ZdO.js} +62465 -59282
- package/dist/{index-DytszOX3.js → index-DU5Js92s.js} +20 -20
- package/dist/{index-hbNIbppV.js → index-DwyXEvtV.js} +27 -27
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as r, jsxs as p } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { _ as f, a0 as B, a1 as O, a2 as V, a3 as Z, a4 as ee, a5 as te, a6 as ie, q as ae, a7 as ne, u as Q, a8 as R, a9 as le, aa as re, ab as se, ac as E, ad as F, ae as C, af as Y, ag as k, ah as x, ai as $, X as oe, G as de, t as H, aj as ce, x as me, ak as Ae, al as Ie, am as ue, I as _e, Q as Te, J as Le } from "./index-CZd7_ZdO.js";
|
|
3
3
|
import { useState as g, useMemo as N, useEffect as h, useRef as ve, useCallback as U } from "react";
|
|
4
4
|
import { useQuery as M, useQueryClient as Ne } from "@tanstack/react-query";
|
|
5
5
|
const be = "Available for appointments", q = "Get Appointment Unavailability", pe = "Add Appointment Unavailability", G = "Appointment Location", De = () => {
|
|
6
6
|
try {
|
|
7
|
-
return
|
|
7
|
+
return Z().uuid;
|
|
8
8
|
} catch {
|
|
9
9
|
return "";
|
|
10
10
|
}
|
|
11
|
-
},
|
|
11
|
+
}, w = (e) => ({
|
|
12
12
|
id: "",
|
|
13
13
|
text: e
|
|
14
14
|
}), ye = (e) => ({
|
|
@@ -62,7 +62,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
62
62
|
locationName: e.location.name,
|
|
63
63
|
appointmentServiceName: e.service?.name ?? a("ADMIN_UNAVAILABILITY_ALL"),
|
|
64
64
|
providerName: e.provider?.name ?? a("ADMIN_UNAVAILABILITY_ALL")
|
|
65
|
-
}),
|
|
65
|
+
}), K = (e) => e.filter((a) => !a.isSelectAll).map((a) => a.id), Re = (e, a) => {
|
|
66
66
|
const n = Ue(
|
|
67
67
|
{
|
|
68
68
|
locationUuid: e.locationUuid,
|
|
@@ -74,7 +74,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
74
74
|
endTimePeriod: e.endTimePeriod
|
|
75
75
|
},
|
|
76
76
|
a
|
|
77
|
-
), t =
|
|
77
|
+
), t = K(e.selectedServiceItems), o = K(e.selectedProviderItems), A = t.length === e.filteredServicesCount || t.length === 0 ? [void 0] : t, m = o.length === e.availableProvidersCount || o.length === 0 ? [void 0] : o;
|
|
78
78
|
return A.flatMap(
|
|
79
79
|
(l) => m.map((s) => ({
|
|
80
80
|
...n,
|
|
@@ -147,7 +147,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
147
147
|
dateTimeColumn: Ye,
|
|
148
148
|
datePicker: ke,
|
|
149
149
|
timePicker: xe
|
|
150
|
-
},
|
|
150
|
+
}, $e = ({
|
|
151
151
|
errors: e,
|
|
152
152
|
formDataRef: a,
|
|
153
153
|
onClearErrors: n
|
|
@@ -187,7 +187,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
187
187
|
_,
|
|
188
188
|
t("ADMIN_UNAVAILABILITY_FORM_ALL_SERVICES")
|
|
189
189
|
),
|
|
190
|
-
|
|
190
|
+
w,
|
|
191
191
|
{
|
|
192
192
|
loading: "",
|
|
193
193
|
error: "",
|
|
@@ -203,7 +203,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
203
203
|
I,
|
|
204
204
|
t("ADMIN_UNAVAILABILITY_FORM_ALL_PROVIDERS")
|
|
205
205
|
),
|
|
206
|
-
|
|
206
|
+
w,
|
|
207
207
|
{
|
|
208
208
|
loading: "",
|
|
209
209
|
error: "",
|
|
@@ -450,7 +450,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
450
450
|
lg: 8,
|
|
451
451
|
className: d.column,
|
|
452
452
|
children: /* @__PURE__ */ r(
|
|
453
|
-
|
|
453
|
+
$,
|
|
454
454
|
{
|
|
455
455
|
id: "service-multiselect",
|
|
456
456
|
"data-testid": "service-multiselect",
|
|
@@ -478,7 +478,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
478
478
|
lg: 8,
|
|
479
479
|
className: d.column,
|
|
480
480
|
children: /* @__PURE__ */ r(
|
|
481
|
-
|
|
481
|
+
$,
|
|
482
482
|
{
|
|
483
483
|
id: "provider-multiselect",
|
|
484
484
|
"data-testid": "provider-multiselect",
|
|
@@ -501,13 +501,13 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
501
501
|
]
|
|
502
502
|
}
|
|
503
503
|
);
|
|
504
|
-
},
|
|
505
|
-
page:
|
|
504
|
+
}, He = "index-module_page__s2h2y", qe = {
|
|
505
|
+
page: He
|
|
506
506
|
}, je = () => {
|
|
507
|
-
const { t: e } = Q(), a = Ne(), { userPrivileges: n } = oe(), { addNotification: t } = de(), [o, c] = g(!1), [A, L] = g(!1), m = ve(null), [l, s] = g({}), _ =
|
|
507
|
+
const { t: e } = Q(), a = Ne(), { userPrivileges: n } = oe(), { addNotification: t } = de(), [o, c] = g(!1), [A, L] = g(!1), m = ve(null), [l, s] = g({}), _ = H(
|
|
508
508
|
n,
|
|
509
509
|
q
|
|
510
|
-
), I =
|
|
510
|
+
), I = H(n, [
|
|
511
511
|
pe,
|
|
512
512
|
q
|
|
513
513
|
]), { data: u, isLoading: v, isError: D } = M({
|
|
@@ -566,13 +566,13 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
566
566
|
s(T), !(Object.keys(T).length > 0) && await S(Re(m.current, e));
|
|
567
567
|
}, [e, S]), W = U(
|
|
568
568
|
(T) => {
|
|
569
|
-
s((
|
|
570
|
-
const P = { ...
|
|
571
|
-
return T.forEach((
|
|
569
|
+
s((z) => {
|
|
570
|
+
const P = { ...z };
|
|
571
|
+
return T.forEach((J) => delete P[J]), P;
|
|
572
572
|
});
|
|
573
573
|
},
|
|
574
574
|
[]
|
|
575
|
-
),
|
|
575
|
+
), X = U(() => {
|
|
576
576
|
c(!1), m.current = null, s({});
|
|
577
577
|
}, []);
|
|
578
578
|
return /* @__PURE__ */ r(
|
|
@@ -619,10 +619,10 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
619
619
|
onPrimaryButtonClick: j,
|
|
620
620
|
isPrimaryButtonDisabled: A,
|
|
621
621
|
secondaryButtonText: e("ADMIN_UNAVAILABILITY_FORM_CANCEL"),
|
|
622
|
-
onSecondaryButtonClick:
|
|
622
|
+
onSecondaryButtonClick: X,
|
|
623
623
|
isSecondaryButtonDisabled: A,
|
|
624
624
|
content: /* @__PURE__ */ r(
|
|
625
|
-
|
|
625
|
+
$e,
|
|
626
626
|
{
|
|
627
627
|
errors: l,
|
|
628
628
|
formDataRef: m,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as a, jsxs as y } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { useState as
|
|
4
|
-
import { useQueryClient as
|
|
5
|
-
const
|
|
6
|
-
|
|
2
|
+
import { P as V, A as P, u as C, F as O, o as G, G as h, X as B, t as L, q as x, x as U, B as q, I as F, Q as H, J as Q, K as $, U as j, N as k } from "./index-CZd7_ZdO.js";
|
|
3
|
+
import { useState as I, useMemo as _ } from "react";
|
|
4
|
+
import { useQueryClient as K, useQuery as w } from "@tanstack/react-query";
|
|
5
|
+
const W = V(
|
|
6
|
+
P,
|
|
7
7
|
"useAppointmentsConfig",
|
|
8
8
|
"AppointmentsConfigProvider"
|
|
9
9
|
), Y = ({
|
|
@@ -12,9 +12,9 @@ const z = V(
|
|
|
12
12
|
onConfirm: t,
|
|
13
13
|
onCancel: s
|
|
14
14
|
}) => {
|
|
15
|
-
const { t: n } =
|
|
15
|
+
const { t: n } = C();
|
|
16
16
|
return /* @__PURE__ */ a(
|
|
17
|
-
|
|
17
|
+
O,
|
|
18
18
|
{
|
|
19
19
|
id: "delete-service-modal",
|
|
20
20
|
testId: "delete-service-modal-test-id",
|
|
@@ -36,9 +36,9 @@ const z = V(
|
|
|
36
36
|
"speciality",
|
|
37
37
|
"durationMins",
|
|
38
38
|
"description"
|
|
39
|
-
],
|
|
40
|
-
page:
|
|
41
|
-
noPrivilegeContainer:
|
|
39
|
+
], X = "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) {
|
|
@@ -49,7 +49,7 @@ function ie(e, i) {
|
|
|
49
49
|
...e.map((t) => ({
|
|
50
50
|
key: t,
|
|
51
51
|
header: i(
|
|
52
|
-
`ADMIN_ALL_SERVICES_COLUMN_${
|
|
52
|
+
`ADMIN_ALL_SERVICES_COLUMN_${G(t)}`
|
|
53
53
|
)
|
|
54
54
|
})),
|
|
55
55
|
{
|
|
@@ -75,22 +75,22 @@ function ae(e, i) {
|
|
|
75
75
|
}));
|
|
76
76
|
}
|
|
77
77
|
const oe = () => {
|
|
78
|
-
const { t: e } =
|
|
78
|
+
const { t: e } = C(), i = K(), { addNotification: t } = h(), { userPrivileges: s } = B(), { appointmentsConfig: n } = W(), [E, c] = I(null), [b, p] = I(!1), l = n?.serviceTableFields ?? [
|
|
79
79
|
...u
|
|
80
|
-
], m = L(s,
|
|
80
|
+
], m = L(s, Z), M = L(
|
|
81
81
|
s,
|
|
82
|
-
|
|
83
|
-
), S =
|
|
82
|
+
X
|
|
83
|
+
), S = _(
|
|
84
84
|
() => te(l),
|
|
85
85
|
[l]
|
|
86
|
-
), { data: A, isLoading: v, isError: D } =
|
|
86
|
+
), { data: A, isLoading: v, isError: D } = w({
|
|
87
87
|
queryKey: ["allAppointmentServices"],
|
|
88
88
|
queryFn: x,
|
|
89
89
|
enabled: m
|
|
90
|
-
}),
|
|
90
|
+
}), N = _(
|
|
91
91
|
() => ie(l, e),
|
|
92
92
|
[l]
|
|
93
|
-
),
|
|
93
|
+
), R = _(
|
|
94
94
|
() => ae(A ?? [], S),
|
|
95
95
|
[A, S]
|
|
96
96
|
), g = async () => {
|
|
@@ -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
|
-
}),
|
|
104
|
+
}), c(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
|
+
$,
|
|
116
116
|
{
|
|
117
117
|
id: `delete-service-${r.id}-btn`,
|
|
118
118
|
testId: `delete-service-${r.id}-btn-test-id`,
|
|
@@ -120,7 +120,7 @@ const oe = () => {
|
|
|
120
120
|
kind: "ghost",
|
|
121
121
|
label: e("ADMIN_ALL_SERVICES_DELETE_ICON_LABEL"),
|
|
122
122
|
disabled: !M,
|
|
123
|
-
onClick: () =>
|
|
123
|
+
onClick: () => c(r),
|
|
124
124
|
children: /* @__PURE__ */ a(j, {})
|
|
125
125
|
}
|
|
126
126
|
) : u.includes(o) ? r[o] ?? "-" : r.attributes[o] ?? "-", f = [
|
|
@@ -128,9 +128,9 @@ const oe = () => {
|
|
|
128
128
|
{ id: "admin", label: e("BREADCRUMB_ADMIN"), isCurrentPage: !0 }
|
|
129
129
|
];
|
|
130
130
|
return /* @__PURE__ */ a(
|
|
131
|
-
|
|
131
|
+
q,
|
|
132
132
|
{
|
|
133
|
-
header: /* @__PURE__ */ a(
|
|
133
|
+
header: /* @__PURE__ */ a(H, { breadcrumbItems: f, userMenu: /* @__PURE__ */ a(Q, {}) }),
|
|
134
134
|
main: m ? /* @__PURE__ */ y(
|
|
135
135
|
"div",
|
|
136
136
|
{
|
|
@@ -140,12 +140,12 @@ const oe = () => {
|
|
|
140
140
|
className: d.page,
|
|
141
141
|
children: [
|
|
142
142
|
/* @__PURE__ */ a(
|
|
143
|
-
|
|
143
|
+
F,
|
|
144
144
|
{
|
|
145
145
|
id: "all-services",
|
|
146
146
|
title: e("ADMIN_ALL_SERVICES_TITLE"),
|
|
147
|
-
headers:
|
|
148
|
-
rows:
|
|
147
|
+
headers: N,
|
|
148
|
+
rows: R,
|
|
149
149
|
ariaLabel: "all-services-table",
|
|
150
150
|
loading: v,
|
|
151
151
|
errorStateMessage: D ? e("ADMIN_ALL_SERVICES_ERROR_MESSAGE") : null,
|
|
@@ -160,7 +160,7 @@ const oe = () => {
|
|
|
160
160
|
serviceName: E.name,
|
|
161
161
|
isDeleting: b,
|
|
162
162
|
onConfirm: g,
|
|
163
|
-
onCancel: () =>
|
|
163
|
+
onCancel: () => c(null)
|
|
164
164
|
}
|
|
165
165
|
)
|
|
166
166
|
]
|