@bahmni/appointments-app 0.0.1-dev.351 → 0.0.1-dev.352
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-Coa5XzQ2-O2hmUEdM.js → DocumentsTable-BYzzx3Yr-CXysld95.js} +21 -21
- package/dist/{FormsTable-EUYG9eiE-M9tqIOR7.js → FormsTable-BAfOpD8j-tGa6-bWt.js} +107 -107
- package/dist/{LNWAZHJI-KS9XkYcv.js → LNWAZHJI-BF3pD_CT.js} +2 -2
- package/dist/{MWZ6AO7Z-CIM8QRZU.js → MWZ6AO7Z-BQvXgbIR.js} +2 -2
- package/dist/{Observations-DbnQKYME-CM3xrM9G.js → Observations-7Kp6A2qe-CVbC59T7.js} +63 -63
- package/dist/{YPM2AS64-8Q3QhD_2.js → YPM2AS64-Bs3az1GO.js} +1 -1
- package/dist/{index-DA_fW8OW.js → index-BR-BkEAg.js} +42 -42
- package/dist/{index-CVN7C8id.js → index-CNK4mjp4.js} +30090 -30098
- package/dist/{index-CP9CYv0I.js → index-NmfSKNi6.js} +38 -38
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,20 +1,20 @@
|
|
|
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
|
|
4
|
-
import { useQuery as
|
|
2
|
+
import { Y as f, a0 as B, a1 as O, a2 as V, a3 as Z, a4 as ee, a5 as te, a6 as ie, I 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 x, ah as k, ai as H, x as oe, a as de, G as $, aj as ce, K as me, ak as Ae, al as Ie, am as ue, M as _e, Q as Te, R as Le } from "./index-CNK4mjp4.js";
|
|
3
|
+
import { useState as g, useMemo as N, useEffect as h, useRef as ve, useCallback as U } from "react";
|
|
4
|
+
import { useQuery as y, 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
7
|
return Z().uuid;
|
|
8
8
|
} catch {
|
|
9
9
|
return "";
|
|
10
10
|
}
|
|
11
|
-
},
|
|
11
|
+
}, K = (e) => ({
|
|
12
12
|
id: "",
|
|
13
13
|
text: e
|
|
14
|
-
}),
|
|
14
|
+
}), Me = (e) => ({
|
|
15
15
|
display: e,
|
|
16
16
|
uuid: ""
|
|
17
|
-
}),
|
|
17
|
+
}), ye = (e, a) => {
|
|
18
18
|
const n = e.map((t) => ({
|
|
19
19
|
id: t.uuid,
|
|
20
20
|
text: t.name,
|
|
@@ -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
|
+
}), w = (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 = w(e.selectedServiceItems), o = w(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,
|
|
@@ -82,23 +82,23 @@ 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,
|
|
93
93
|
isError: n
|
|
94
|
-
} =
|
|
94
|
+
} = y({
|
|
95
95
|
queryKey: ["currentUser"],
|
|
96
96
|
queryFn: ee
|
|
97
97
|
}), {
|
|
98
98
|
data: t = [],
|
|
99
99
|
isLoading: o,
|
|
100
100
|
isError: c
|
|
101
|
-
} =
|
|
101
|
+
} = y({
|
|
102
102
|
queryKey: ["providerLoginLocations", e?.uuid],
|
|
103
103
|
queryFn: async () => {
|
|
104
104
|
const I = await te(
|
|
@@ -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)
|
|
@@ -119,14 +119,14 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
119
119
|
data: A = [],
|
|
120
120
|
isLoading: L,
|
|
121
121
|
isError: m
|
|
122
|
-
} =
|
|
122
|
+
} = y({
|
|
123
123
|
queryKey: ["appointmentServices"],
|
|
124
124
|
queryFn: ae
|
|
125
125
|
}), {
|
|
126
126
|
data: l = [],
|
|
127
127
|
isLoading: s,
|
|
128
128
|
isError: _
|
|
129
|
-
} =
|
|
129
|
+
} = y({
|
|
130
130
|
queryKey: ["providers"],
|
|
131
131
|
queryFn: ne
|
|
132
132
|
});
|
|
@@ -137,7 +137,7 @@ 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", 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",
|
|
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", xe = "UnavailabilityForm-module_datePicker__6HgbO", ke = "UnavailabilityForm-module_timePicker__DHNpK", d = {
|
|
141
141
|
formContent: Pe,
|
|
142
142
|
formField: Be,
|
|
143
143
|
loading: Oe,
|
|
@@ -145,14 +145,14 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
145
145
|
grid: Fe,
|
|
146
146
|
column: Ce,
|
|
147
147
|
dateTimeColumn: Ye,
|
|
148
|
-
datePicker:
|
|
149
|
-
timePicker:
|
|
148
|
+
datePicker: xe,
|
|
149
|
+
timePicker: ke
|
|
150
150
|
}, He = ({
|
|
151
151
|
errors: e,
|
|
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: [],
|
|
@@ -173,7 +173,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
173
173
|
),
|
|
174
174
|
[A]
|
|
175
175
|
), u = N(
|
|
176
|
-
() => R(!1, !1, o,
|
|
176
|
+
() => R(!1, !1, o, Me, {
|
|
177
177
|
loading: "",
|
|
178
178
|
error: "",
|
|
179
179
|
empty: t("ADMIN_UNAVAILABILITY_FORM_NO_LOCATIONS")
|
|
@@ -183,11 +183,11 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
183
183
|
() => R(
|
|
184
184
|
!1,
|
|
185
185
|
!1,
|
|
186
|
-
|
|
186
|
+
ye(
|
|
187
187
|
_,
|
|
188
188
|
t("ADMIN_UNAVAILABILITY_FORM_ALL_SERVICES")
|
|
189
189
|
),
|
|
190
|
-
|
|
190
|
+
K,
|
|
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
|
+
K,
|
|
207
207
|
{
|
|
208
208
|
loading: "",
|
|
209
209
|
error: "",
|
|
@@ -212,21 +212,21 @@ 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
|
+
(M) => M.uuid === i
|
|
219
219
|
);
|
|
220
|
-
s((
|
|
221
|
-
...
|
|
220
|
+
s((M) => ({
|
|
221
|
+
...M,
|
|
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
|
|
@@ -327,7 +327,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
327
327
|
}
|
|
328
328
|
),
|
|
329
329
|
/* @__PURE__ */ r(
|
|
330
|
-
|
|
330
|
+
x,
|
|
331
331
|
{
|
|
332
332
|
id: "start-time",
|
|
333
333
|
"data-testid": "start-time-input",
|
|
@@ -342,7 +342,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
342
342
|
use24HourFormat: !1,
|
|
343
343
|
className: d.timePicker,
|
|
344
344
|
children: /* @__PURE__ */ p(
|
|
345
|
-
|
|
345
|
+
k,
|
|
346
346
|
{
|
|
347
347
|
id: "start-time-period",
|
|
348
348
|
"data-testid": "start-time-period-select",
|
|
@@ -402,7 +402,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
402
402
|
}
|
|
403
403
|
),
|
|
404
404
|
/* @__PURE__ */ r(
|
|
405
|
-
|
|
405
|
+
x,
|
|
406
406
|
{
|
|
407
407
|
id: "end-time",
|
|
408
408
|
"data-testid": "end-time-input",
|
|
@@ -417,7 +417,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
417
417
|
use24HourFormat: !1,
|
|
418
418
|
className: d.timePicker,
|
|
419
419
|
children: /* @__PURE__ */ p(
|
|
420
|
-
|
|
420
|
+
k,
|
|
421
421
|
{
|
|
422
422
|
id: "end-time-period",
|
|
423
423
|
"data-testid": "end-time-period-select",
|
|
@@ -510,7 +510,7 @@ const be = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
510
510
|
), I = $(n, [
|
|
511
511
|
pe,
|
|
512
512
|
q
|
|
513
|
-
]), { data: u, isLoading: v, isError: D } =
|
|
513
|
+
]), { data: u, isLoading: v, isError: D } = y({
|
|
514
514
|
queryKey: ["appointmentUnavailabilities"],
|
|
515
515
|
queryFn: ce,
|
|
516
516
|
enabled: _
|
|
@@ -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]),
|
|
540
|
+
], [e]), M = N(() => u ? u.map((T) => fe(T, e)) : [], [u, e]), S = U(
|
|
541
541
|
async (T) => {
|
|
542
542
|
L(!0);
|
|
543
543
|
try {
|
|
@@ -563,8 +563,8 @@ 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
569
|
s((J) => {
|
|
570
570
|
const P = { ...J };
|
|
@@ -595,7 +595,7 @@ const be = "Available for appointments", q = "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: M,
|
|
599
599
|
ariaLabel: "unavailability-table",
|
|
600
600
|
loading: v,
|
|
601
601
|
errorStateMessage: D ? e("ADMIN_UNAVAILABILITY_ERROR_MESSAGE") : null,
|
package/dist/index.js
CHANGED