@bahmni/appointments-app 0.0.1-dev.381 → 0.0.1-dev.383
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-D61lXj3C-CukR90nx.js → DocumentsTable-i49ZQypz-BvRFK1mq.js} +13 -13
- package/dist/{FormsTable-DSdtlBnm-D27EtXow.js → FormsTable-DFiLWXhX-4e67BAkH.js} +56 -56
- package/dist/{LNWAZHJI-Bq2CSLnY.js → LNWAZHJI-YkT4hvSY.js} +2 -2
- package/dist/{MWZ6AO7Z-Bfuv1DHQ.js → MWZ6AO7Z-BEADDiWx.js} +2 -2
- package/dist/{Observations-BiXeD58c-Cx4jjuVT.js → Observations-CNFFsAd--BASnq19X.js} +36 -36
- package/dist/{YPM2AS64-BZFOlfke.js → YPM2AS64-ytPjgKTI.js} +1 -1
- package/dist/{index-BzzcvxBx.js → index-B6SqeItn.js} +22257 -22206
- package/dist/{index-pw8iuFPK.js → index-BE7M5PU5.js} +22 -22
- package/dist/{index-CUs8rGzj.js → index-uBzo2pKW.js} +23 -23
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as i, jsxs as y } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { useState as
|
|
2
|
+
import { s as V, v as P, u as I, F as O, x as h, L as B, Q as x, C as A, D as G, I as U, J as F, S as q, U as Q, Z as k, W, X as $, _ as j } from "./index-B6SqeItn.js";
|
|
3
|
+
import { useState as C, useMemo as _ } from "react";
|
|
4
4
|
import { useQueryClient as w, useQuery as H } from "@tanstack/react-query";
|
|
5
5
|
const K = V(
|
|
6
|
-
|
|
6
|
+
P,
|
|
7
7
|
"useAppointmentsConfig",
|
|
8
8
|
"AppointmentsConfigProvider"
|
|
9
9
|
), Z = ({
|
|
@@ -12,9 +12,9 @@ const K = V(
|
|
|
12
12
|
onConfirm: t,
|
|
13
13
|
onCancel: s
|
|
14
14
|
}) => {
|
|
15
|
-
const { t: n } =
|
|
15
|
+
const { t: n } = I();
|
|
16
16
|
return /* @__PURE__ */ i(
|
|
17
|
-
|
|
17
|
+
O,
|
|
18
18
|
{
|
|
19
19
|
id: "delete-service-modal",
|
|
20
20
|
testId: "delete-service-modal-test-id",
|
|
@@ -36,8 +36,8 @@ const K = V(
|
|
|
36
36
|
"speciality",
|
|
37
37
|
"durationMins",
|
|
38
38
|
"description"
|
|
39
|
-
],
|
|
40
|
-
page:
|
|
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
41
|
noPrivilegeContainer: X,
|
|
42
42
|
table: ee
|
|
43
43
|
};
|
|
@@ -75,24 +75,24 @@ function ie(e, a) {
|
|
|
75
75
|
}));
|
|
76
76
|
}
|
|
77
77
|
const oe = () => {
|
|
78
|
-
const { t: e } =
|
|
78
|
+
const { t: e } = I(), a = w(), { addNotification: t } = B(), { userPrivileges: s } = x(), { appointmentsConfig: n } = K(), [E, c] = C(null), [b, p] = C(!1), l = n?.serviceTableFields ?? [
|
|
79
79
|
...u
|
|
80
|
-
],
|
|
80
|
+
], S = A(s, z), M = A(
|
|
81
81
|
s,
|
|
82
|
-
|
|
83
|
-
),
|
|
82
|
+
Y
|
|
83
|
+
), m = _(
|
|
84
84
|
() => te(l),
|
|
85
85
|
[l]
|
|
86
|
-
), { data:
|
|
86
|
+
), { data: L, isLoading: v, isError: D } = H({
|
|
87
87
|
queryKey: ["allAppointmentServices"],
|
|
88
|
-
queryFn:
|
|
89
|
-
enabled:
|
|
90
|
-
}),
|
|
88
|
+
queryFn: G,
|
|
89
|
+
enabled: S
|
|
90
|
+
}), R = _(
|
|
91
91
|
() => ae(l, e),
|
|
92
92
|
[l]
|
|
93
93
|
), N = _(
|
|
94
|
-
() => ie(
|
|
95
|
-
[
|
|
94
|
+
() => ie(L ?? [], m),
|
|
95
|
+
[L, m]
|
|
96
96
|
), g = async () => {
|
|
97
97
|
p(!0);
|
|
98
98
|
try {
|
|
@@ -130,8 +130,8 @@ const oe = () => {
|
|
|
130
130
|
return /* @__PURE__ */ i(
|
|
131
131
|
F,
|
|
132
132
|
{
|
|
133
|
-
header: /* @__PURE__ */ i(
|
|
134
|
-
main:
|
|
133
|
+
header: /* @__PURE__ */ i(Q, { breadcrumbItems: f, userMenu: /* @__PURE__ */ i(k, {}) }),
|
|
134
|
+
main: S ? /* @__PURE__ */ y(
|
|
135
135
|
"div",
|
|
136
136
|
{
|
|
137
137
|
id: "all-appointment-service-page",
|
|
@@ -144,11 +144,11 @@ const oe = () => {
|
|
|
144
144
|
{
|
|
145
145
|
id: "all-services",
|
|
146
146
|
title: e("ADMIN_ALL_SERVICES_TITLE"),
|
|
147
|
-
headers:
|
|
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
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as r, jsxs as p } from "react/jsx-runtime";
|
|
2
|
-
import { $ as f, a0 as O, a1 as P, a2 as V, a3 as X, a4 as ee, a5 as te, a6 as ie,
|
|
2
|
+
import { $ as f, a0 as O, a1 as P, a2 as V, a3 as X, a4 as ee, a5 as te, a6 as ie, D as ae, a7 as ne, u as Q, a8 as R, a9 as le, aa as re, ab as se, ac as U, ad as C, ae as F, af as Y, ag as k, ah as x, ai as $, Q as oe, L as de, C as q, aj as ce, I as me, ak as Ae, al as Ie, am as ue, S as _e, U as Te, Z as Le } from "./index-B6SqeItn.js";
|
|
3
3
|
import { useState as g, useMemo as N, useEffect as h, useRef as ve, useCallback as E } from "react";
|
|
4
4
|
import { useQuery as y, useQueryClient as Ne } from "@tanstack/react-query";
|
|
5
|
-
const be = "Available for appointments", w = "Get Appointment Unavailability", pe = "Add Appointment Unavailability", G = "Appointment Location",
|
|
5
|
+
const be = "Available for appointments", w = "Get Appointment Unavailability", pe = "Add Appointment Unavailability", G = "Appointment Location", De = () => {
|
|
6
6
|
try {
|
|
7
7
|
return X().uuid;
|
|
8
8
|
} catch {
|
|
@@ -11,7 +11,7 @@ const be = "Available for appointments", w = "Get Appointment Unavailability", p
|
|
|
11
11
|
}, H = (e) => ({
|
|
12
12
|
id: "",
|
|
13
13
|
text: e
|
|
14
|
-
}),
|
|
14
|
+
}), Me = (e) => ({
|
|
15
15
|
display: e,
|
|
16
16
|
uuid: ""
|
|
17
17
|
}), ye = (e, a) => {
|
|
@@ -173,7 +173,7 @@ const be = "Available for appointments", w = "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")
|
|
@@ -195,7 +195,7 @@ const be = "Available for appointments", w = "Get Appointment Unavailability", p
|
|
|
195
195
|
}
|
|
196
196
|
),
|
|
197
197
|
[_]
|
|
198
|
-
),
|
|
198
|
+
), D = N(
|
|
199
199
|
() => R(
|
|
200
200
|
!1,
|
|
201
201
|
!1,
|
|
@@ -214,11 +214,11 @@ const be = "Available for appointments", w = "Get Appointment Unavailability", p
|
|
|
214
214
|
);
|
|
215
215
|
return h(() => {
|
|
216
216
|
if (o.length === 0) return;
|
|
217
|
-
const i =
|
|
218
|
-
(
|
|
217
|
+
const i = De(), b = o.some(
|
|
218
|
+
(M) => M.uuid === i
|
|
219
219
|
);
|
|
220
|
-
s((
|
|
221
|
-
...
|
|
220
|
+
s((M) => ({
|
|
221
|
+
...M,
|
|
222
222
|
locationUuid: b ? i : ""
|
|
223
223
|
}));
|
|
224
224
|
}, [o]), h(() => {
|
|
@@ -229,9 +229,9 @@ const be = "Available for appointments", w = "Get Appointment Unavailability", p
|
|
|
229
229
|
}, [v]), h(() => {
|
|
230
230
|
I.length > 0 && s((i) => ({
|
|
231
231
|
...i,
|
|
232
|
-
selectedProviderItems:
|
|
232
|
+
selectedProviderItems: D
|
|
233
233
|
}));
|
|
234
|
-
}, [
|
|
234
|
+
}, [D]), a.current = {
|
|
235
235
|
...l,
|
|
236
236
|
filteredServicesCount: _.length,
|
|
237
237
|
availableProvidersCount: I.length
|
|
@@ -484,7 +484,7 @@ const be = "Available for appointments", w = "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: D,
|
|
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", w = "Get Appointment Unavailability", p
|
|
|
510
510
|
), I = q(n, [
|
|
511
511
|
pe,
|
|
512
512
|
w
|
|
513
|
-
]), { data: u, isLoading: v, isError:
|
|
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", w = "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 = E(
|
|
541
541
|
async (T) => {
|
|
542
542
|
L(!0);
|
|
543
543
|
try {
|
|
@@ -564,15 +564,15 @@ const be = "Available for appointments", w = "Get Appointment Unavailability", p
|
|
|
564
564
|
if (!m.current) return;
|
|
565
565
|
const T = ge(m.current, e);
|
|
566
566
|
s(T), !(Object.keys(T).length > 0) && await S(Re(m.current, e));
|
|
567
|
-
}, [e, S]),
|
|
567
|
+
}, [e, S]), W = E(
|
|
568
568
|
(T) => {
|
|
569
|
-
s((
|
|
570
|
-
const B = { ...
|
|
571
|
-
return T.forEach((
|
|
569
|
+
s((z) => {
|
|
570
|
+
const B = { ...z };
|
|
571
|
+
return T.forEach((J) => delete B[J]), B;
|
|
572
572
|
});
|
|
573
573
|
},
|
|
574
574
|
[]
|
|
575
|
-
),
|
|
575
|
+
), Z = E(() => {
|
|
576
576
|
c(!1), m.current = null, s({});
|
|
577
577
|
}, []);
|
|
578
578
|
return /* @__PURE__ */ r(
|
|
@@ -595,10 +595,10 @@ const be = "Available for appointments", w = "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
|
-
errorStateMessage:
|
|
601
|
+
errorStateMessage: D ? 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"),
|
|
@@ -619,14 +619,14 @@ const be = "Available for appointments", w = "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
|
$e,
|
|
626
626
|
{
|
|
627
627
|
errors: l,
|
|
628
628
|
formDataRef: m,
|
|
629
|
-
onClearErrors:
|
|
629
|
+
onClearErrors: W
|
|
630
630
|
}
|
|
631
631
|
)
|
|
632
632
|
}
|
package/dist/index.js
CHANGED