@bahmni/appointments-app 0.0.1-dev.362 → 0.0.1-dev.364
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-DWtzocck-v8kg_Ap8.js → DocumentsTable-BWbfHojx-xHk1Tsj6.js} +21 -21
- package/dist/{FormsTable-cMrb-0Md-CCmM0LOX.js → FormsTable-BkPPf52G-CBzUIIi0.js} +71 -71
- package/dist/{LNWAZHJI-yJaaIfgA.js → LNWAZHJI-FnMwKVXx.js} +2 -2
- package/dist/{MWZ6AO7Z-FlVGWZol.js → MWZ6AO7Z-BvIrcz3V.js} +2 -2
- package/dist/{Observations-DNOcuCWE-DLzi9Km0.js → Observations-CGkWnlr8-CkLj9kXo.js} +46 -46
- package/dist/{YPM2AS64-BDBtskda.js → YPM2AS64-C_TxiACU.js} +1 -1
- package/dist/{index-DscasiBU.js → index-BJ4PhL89.js} +189 -189
- package/dist/{index-Ddn3oxVl.js → index-Bhki2_js.js} +15 -15
- package/dist/{index-D_hary7l.js → index-Cor7pc6h.js} +25 -25
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as a, jsxs as y } from "react/jsx-runtime";
|
|
2
|
-
import { B as V, C as O, u as I,
|
|
2
|
+
import { B as V, C as O, u as I, F as P, D as h, K as B, J as G, E as L, L as x, N as U, P as F, Q as H, T as q, V as K, W as Q, X as j, Y as k } from "./index-BJ4PhL89.js";
|
|
3
3
|
import { useState as C, useMemo as c } from "react";
|
|
4
4
|
import { useQueryClient as W, useQuery as Y } from "@tanstack/react-query";
|
|
5
5
|
const $ = V(
|
|
6
6
|
O,
|
|
7
7
|
"useAppointmentsConfig",
|
|
8
8
|
"AppointmentsConfigProvider"
|
|
9
|
-
),
|
|
9
|
+
), w = ({
|
|
10
10
|
serviceName: e,
|
|
11
11
|
isDeleting: i,
|
|
12
12
|
onConfirm: t,
|
|
@@ -36,8 +36,8 @@ const $ = V(
|
|
|
36
36
|
"speciality",
|
|
37
37
|
"durationMins",
|
|
38
38
|
"description"
|
|
39
|
-
],
|
|
40
|
-
page:
|
|
39
|
+
], z = "app:appointments:manageServices", J = "app:appointments:adminTab", Z = "index-module_page__Gsfbu", X = "index-module_noPrivilegeContainer__Pu5WZ", ee = "index-module_table__GAPmb", d = {
|
|
40
|
+
page: Z,
|
|
41
41
|
noPrivilegeContainer: X,
|
|
42
42
|
table: ee
|
|
43
43
|
};
|
|
@@ -77,22 +77,22 @@ function ae(e, i) {
|
|
|
77
77
|
const oe = () => {
|
|
78
78
|
const { t: e } = I(), i = W(), { addNotification: t } = B(), { userPrivileges: s } = G(), { appointmentsConfig: n } = $(), [E, _] = C(null), [b, p] = C(!1), l = n?.serviceTableFields ?? [
|
|
79
79
|
...u
|
|
80
|
-
],
|
|
80
|
+
], m = L(s, J), M = L(
|
|
81
81
|
s,
|
|
82
|
-
|
|
83
|
-
),
|
|
82
|
+
z
|
|
83
|
+
), S = c(
|
|
84
84
|
() => te(l),
|
|
85
85
|
[l]
|
|
86
86
|
), { data: A, isLoading: v, isError: D } = Y({
|
|
87
87
|
queryKey: ["allAppointmentServices"],
|
|
88
88
|
queryFn: x,
|
|
89
|
-
enabled:
|
|
89
|
+
enabled: m
|
|
90
90
|
}), R = c(
|
|
91
91
|
() => ie(l, e),
|
|
92
92
|
[l]
|
|
93
93
|
), N = c(
|
|
94
|
-
() => ae(A ?? [],
|
|
95
|
-
[A,
|
|
94
|
+
() => ae(A ?? [], S),
|
|
95
|
+
[A, S]
|
|
96
96
|
), g = async () => {
|
|
97
97
|
p(!0);
|
|
98
98
|
try {
|
|
@@ -128,10 +128,10 @@ const oe = () => {
|
|
|
128
128
|
{ id: "admin", label: e("BREADCRUMB_ADMIN"), isCurrentPage: !0 }
|
|
129
129
|
];
|
|
130
130
|
return /* @__PURE__ */ a(
|
|
131
|
-
|
|
131
|
+
F,
|
|
132
132
|
{
|
|
133
|
-
header: /* @__PURE__ */ a(
|
|
134
|
-
main:
|
|
133
|
+
header: /* @__PURE__ */ a(q, { breadcrumbItems: f, userMenu: /* @__PURE__ */ a(K, {}) }),
|
|
134
|
+
main: m ? /* @__PURE__ */ y(
|
|
135
135
|
"div",
|
|
136
136
|
{
|
|
137
137
|
id: "all-appointment-service-page",
|
|
@@ -140,7 +140,7 @@ const oe = () => {
|
|
|
140
140
|
className: d.page,
|
|
141
141
|
children: [
|
|
142
142
|
/* @__PURE__ */ a(
|
|
143
|
-
|
|
143
|
+
H,
|
|
144
144
|
{
|
|
145
145
|
id: "all-services",
|
|
146
146
|
title: e("ADMIN_ALL_SERVICES_TITLE"),
|
|
@@ -155,7 +155,7 @@ const oe = () => {
|
|
|
155
155
|
}
|
|
156
156
|
),
|
|
157
157
|
E && /* @__PURE__ */ a(
|
|
158
|
-
|
|
158
|
+
w,
|
|
159
159
|
{
|
|
160
160
|
serviceName: E.name,
|
|
161
161
|
isDeleting: b,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as r, jsxs as p } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { useState as g, useMemo as N, useEffect as
|
|
2
|
+
import { Z as f, a0 as B, a1 as O, a2 as V, a3 as X, a4 as ee, a5 as te, a6 as ie, L 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 H, J as oe, K as de, E as $, aj as ce, N as me, ak as Ae, al as Ie, am as ue, Q as _e, T as Te, V as Le } from "./index-BJ4PhL89.js";
|
|
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 X().uuid;
|
|
8
8
|
} catch {
|
|
9
9
|
return "";
|
|
10
10
|
}
|
|
@@ -39,17 +39,17 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
39
39
|
}, Ue = (e, a) => ({
|
|
40
40
|
locationUuid: e.locationUuid,
|
|
41
41
|
startDate: f(e.startDate, a, !1, V).formattedResult,
|
|
42
|
-
startTime:
|
|
42
|
+
startTime: O(
|
|
43
43
|
`${e.startTime} ${e.startTimePeriod}`
|
|
44
44
|
),
|
|
45
45
|
endDate: f(e.endDate, a, !1, V).formattedResult,
|
|
46
|
-
endTime:
|
|
46
|
+
endTime: O(`${e.endTime} ${e.endTimePeriod}`)
|
|
47
47
|
}), ge = (e, a) => {
|
|
48
48
|
const n = {}, t = a("ADMIN_UNAVAILABILITY_FORM_REQUIRED");
|
|
49
49
|
if (e.locationUuid || (n.location = t), e.startDate || (n.startDate = t), e.startTime || (n.startTime = t), e.endDate || (n.endDate = t), e.endTime || (n.endTime = t), e.startDate && e.startTime && e.endDate && e.endTime && e.startDate.toDateString() === e.endDate.toDateString()) {
|
|
50
|
-
const o =
|
|
50
|
+
const o = B(
|
|
51
51
|
`${e.startTime} ${e.startTimePeriod}`
|
|
52
|
-
), c =
|
|
52
|
+
), c = B(
|
|
53
53
|
`${e.endTime} ${e.endTimePeriod}`
|
|
54
54
|
);
|
|
55
55
|
o !== null && c !== null && c <= o && (n.dateTime = a("ADMIN_UNAVAILABILITY_DATETIME_ERROR_MESSAGE"));
|
|
@@ -82,11 +82,11 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
82
82
|
providerUuid: s
|
|
83
83
|
}))
|
|
84
84
|
);
|
|
85
|
-
},
|
|
85
|
+
}, he = (e) => !e.entry || e.entry.length === 0 ? [] : e.entry.map((a) => ({
|
|
86
86
|
uuid: a.resource?.id ?? "",
|
|
87
87
|
display: a.resource?.name ?? "",
|
|
88
88
|
childLocations: []
|
|
89
|
-
})),
|
|
89
|
+
})), Se = () => {
|
|
90
90
|
const {
|
|
91
91
|
data: e,
|
|
92
92
|
isLoading: a,
|
|
@@ -108,7 +108,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
108
108
|
const u = await ie(
|
|
109
109
|
G
|
|
110
110
|
);
|
|
111
|
-
return
|
|
111
|
+
return he(u);
|
|
112
112
|
}
|
|
113
113
|
return I.filter(
|
|
114
114
|
(u) => u.tags?.some((v) => v.display === G)
|
|
@@ -137,10 +137,10 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
137
137
|
isLoading: a || o || L || s,
|
|
138
138
|
isError: n || c || m || _
|
|
139
139
|
};
|
|
140
|
-
}, Pe = "UnavailabilityForm-module_formContent__WmNHR",
|
|
140
|
+
}, Pe = "UnavailabilityForm-module_formContent__WmNHR", Be = "UnavailabilityForm-module_formField__8he7o", Oe = "UnavailabilityForm-module_loading__IDEY6", Ve = "UnavailabilityForm-module_error__jDeOm", Fe = "UnavailabilityForm-module_grid__t6NKR", Ce = "UnavailabilityForm-module_column__QFdnQ", Ye = "UnavailabilityForm-module_dateTimeColumn__6bi0F", ke = "UnavailabilityForm-module_datePicker__6HgbO", xe = "UnavailabilityForm-module_timePicker__DHNpK", d = {
|
|
141
141
|
formContent: Pe,
|
|
142
|
-
formField:
|
|
143
|
-
loading:
|
|
142
|
+
formField: Be,
|
|
143
|
+
loading: Oe,
|
|
144
144
|
error: Ve,
|
|
145
145
|
grid: Fe,
|
|
146
146
|
column: Ce,
|
|
@@ -152,7 +152,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
152
152
|
formDataRef: a,
|
|
153
153
|
onClearErrors: n
|
|
154
154
|
}) => {
|
|
155
|
-
const { t } = Q(), { loginLocations: o, services: c, providers: A, isLoading: L, isError: m } =
|
|
155
|
+
const { t } = Q(), { loginLocations: o, services: c, providers: A, isLoading: L, isError: m } = Se(), [l, s] = g({
|
|
156
156
|
locationUuid: "",
|
|
157
157
|
selectedServiceItems: [],
|
|
158
158
|
selectedProviderItems: [],
|
|
@@ -212,7 +212,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
212
212
|
),
|
|
213
213
|
[I]
|
|
214
214
|
);
|
|
215
|
-
return
|
|
215
|
+
return h(() => {
|
|
216
216
|
if (o.length === 0) return;
|
|
217
217
|
const i = De(), b = o.some(
|
|
218
218
|
(y) => y.uuid === i
|
|
@@ -221,12 +221,12 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
221
221
|
...y,
|
|
222
222
|
locationUuid: b ? i : ""
|
|
223
223
|
}));
|
|
224
|
-
}, [o]),
|
|
224
|
+
}, [o]), h(() => {
|
|
225
225
|
_.length > 0 && s((i) => ({
|
|
226
226
|
...i,
|
|
227
227
|
selectedServiceItems: v
|
|
228
228
|
}));
|
|
229
|
-
}, [v]),
|
|
229
|
+
}, [v]), h(() => {
|
|
230
230
|
I.length > 0 && s((i) => ({
|
|
231
231
|
...i,
|
|
232
232
|
selectedProviderItems: D
|
|
@@ -537,7 +537,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
537
537
|
key: "providerName",
|
|
538
538
|
header: e("ADMIN_UNAVAILABILITY_COLUMN_PROVIDER")
|
|
539
539
|
}
|
|
540
|
-
], [e]), y = N(() => u ? u.map((T) => fe(T, e)) : [], [u, e]),
|
|
540
|
+
], [e]), y = N(() => u ? u.map((T) => fe(T, e)) : [], [u, e]), S = U(
|
|
541
541
|
async (T) => {
|
|
542
542
|
L(!0);
|
|
543
543
|
try {
|
|
@@ -563,16 +563,16 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
563
563
|
), j = U(async () => {
|
|
564
564
|
if (!m.current) return;
|
|
565
565
|
const T = ge(m.current, e);
|
|
566
|
-
s(T), !(Object.keys(T).length > 0) && await
|
|
567
|
-
}, [e,
|
|
566
|
+
s(T), !(Object.keys(T).length > 0) && await S(Re(m.current, e));
|
|
567
|
+
}, [e, S]), W = U(
|
|
568
568
|
(T) => {
|
|
569
|
-
s((
|
|
570
|
-
const P = { ...
|
|
571
|
-
return T.forEach((
|
|
569
|
+
s((J) => {
|
|
570
|
+
const P = { ...J };
|
|
571
|
+
return T.forEach((Z) => delete P[Z]), P;
|
|
572
572
|
});
|
|
573
573
|
},
|
|
574
574
|
[]
|
|
575
|
-
),
|
|
575
|
+
), z = U(() => {
|
|
576
576
|
c(!1), m.current = null, s({});
|
|
577
577
|
}, []);
|
|
578
578
|
return /* @__PURE__ */ r(
|
|
@@ -619,7 +619,7 @@ 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: z,
|
|
623
623
|
isSecondaryButtonDisabled: A,
|
|
624
624
|
content: /* @__PURE__ */ r(
|
|
625
625
|
He,
|