@bahmni/appointments-app 0.0.1-dev.388 → 0.0.1-dev.390
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-B6QJvL1z-5nvinl9D.js → DocumentsTable-B5utz65F-C5UI5jZY.js} +16 -16
- package/dist/{FormsTable-wkhnMFX5-DAko76Bm.js → FormsTable-BaBg9zUs-BQ9p-YBI.js} +43 -43
- package/dist/{LNWAZHJI-DwaeUf8E.js → LNWAZHJI-mmClw_Pl.js} +2 -2
- package/dist/{MWZ6AO7Z-M6gmzZZX.js → MWZ6AO7Z-BCrxzk0E.js} +2 -2
- package/dist/{Observations-1fPoIit0-DzuE0qjd.js → Observations-5lkNtlYi-C10hB63q.js} +34 -34
- package/dist/{YPM2AS64-B5T9uSJn.js → YPM2AS64-BOu03LZP.js} +1 -1
- package/dist/{index-Dj5FQIcI.js → index-BHaYLRCF.js} +17781 -17751
- package/dist/{index-D0E_rIyB.js → index-BacZsVm8.js} +39 -39
- package/dist/{index-D1vGVC2R.js → index-BzKw8NB0.js} +21 -21
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
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 { $ as f, a0 as P, a1 as O, a2 as V, a3 as Z, a4 as ee, a5 as te, a6 as ie, C 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 x, ah as k, ai as $, e as oe, L as de, x as q, aj as ce, G as me, ak as Ae, al as Ie, am as ue, H as _e, I as Te, S as Le } from "./index-BHaYLRCF.js";
|
|
3
|
+
import { useState as g, useMemo as N, useEffect as S, useRef as ve, useCallback as E } from "react";
|
|
4
|
+
import { useQuery as D, useQueryClient as Ne } from "@tanstack/react-query";
|
|
5
5
|
const be = "Available for appointments", w = "Get Appointment Unavailability", pe = "Add Appointment Unavailability", G = "Appointment Location", ye = () => {
|
|
6
6
|
try {
|
|
7
7
|
return Z().uuid;
|
|
@@ -11,10 +11,10 @@ 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
|
+
}), De = (e, a) => {
|
|
18
18
|
const n = e.map((t) => ({
|
|
19
19
|
id: t.uuid,
|
|
20
20
|
text: t.name,
|
|
@@ -82,23 +82,23 @@ const be = "Available for appointments", w = "Get Appointment Unavailability", p
|
|
|
82
82
|
providerUuid: s
|
|
83
83
|
}))
|
|
84
84
|
);
|
|
85
|
-
},
|
|
85
|
+
}, Se = (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
|
+
})), he = () => {
|
|
90
90
|
const {
|
|
91
91
|
data: e,
|
|
92
92
|
isLoading: a,
|
|
93
93
|
isError: n
|
|
94
|
-
} =
|
|
94
|
+
} = D({
|
|
95
95
|
queryKey: ["currentUser"],
|
|
96
96
|
queryFn: ee
|
|
97
97
|
}), {
|
|
98
98
|
data: t = [],
|
|
99
99
|
isLoading: o,
|
|
100
100
|
isError: c
|
|
101
|
-
} =
|
|
101
|
+
} = D({
|
|
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", w = "Get Appointment Unavailability", p
|
|
|
108
108
|
const u = await ie(
|
|
109
109
|
G
|
|
110
110
|
);
|
|
111
|
-
return
|
|
111
|
+
return Se(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", w = "Get Appointment Unavailability", p
|
|
|
119
119
|
data: A = [],
|
|
120
120
|
isLoading: L,
|
|
121
121
|
isError: m
|
|
122
|
-
} =
|
|
122
|
+
} = D({
|
|
123
123
|
queryKey: ["appointmentServices"],
|
|
124
124
|
queryFn: ae
|
|
125
125
|
}), {
|
|
126
126
|
data: l = [],
|
|
127
127
|
isLoading: s,
|
|
128
128
|
isError: _
|
|
129
|
-
} =
|
|
129
|
+
} = D({
|
|
130
130
|
queryKey: ["providers"],
|
|
131
131
|
queryFn: ne
|
|
132
132
|
});
|
|
@@ -137,13 +137,13 @@ const be = "Available for appointments", w = "Get Appointment Unavailability", p
|
|
|
137
137
|
isLoading: a || o || L || s,
|
|
138
138
|
isError: n || c || m || _
|
|
139
139
|
};
|
|
140
|
-
}, Be = "UnavailabilityForm-module_formContent__WmNHR", Pe = "UnavailabilityForm-module_formField__8he7o", Oe = "UnavailabilityForm-module_loading__IDEY6", Ve = "UnavailabilityForm-module_error__jDeOm",
|
|
140
|
+
}, Be = "UnavailabilityForm-module_formContent__WmNHR", Pe = "UnavailabilityForm-module_formField__8he7o", Oe = "UnavailabilityForm-module_loading__IDEY6", Ve = "UnavailabilityForm-module_error__jDeOm", Ce = "UnavailabilityForm-module_grid__t6NKR", Fe = "UnavailabilityForm-module_column__QFdnQ", Ye = "UnavailabilityForm-module_dateTimeColumn__6bi0F", xe = "UnavailabilityForm-module_datePicker__6HgbO", ke = "UnavailabilityForm-module_timePicker__DHNpK", d = {
|
|
141
141
|
formContent: Be,
|
|
142
142
|
formField: Pe,
|
|
143
143
|
loading: Oe,
|
|
144
144
|
error: Ve,
|
|
145
|
-
grid:
|
|
146
|
-
column:
|
|
145
|
+
grid: Ce,
|
|
146
|
+
column: Fe,
|
|
147
147
|
dateTimeColumn: Ye,
|
|
148
148
|
datePicker: xe,
|
|
149
149
|
timePicker: ke
|
|
@@ -152,7 +152,7 @@ const be = "Available for appointments", w = "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 } = he(), [l, s] = g({
|
|
156
156
|
locationUuid: "",
|
|
157
157
|
selectedServiceItems: [],
|
|
158
158
|
selectedProviderItems: [],
|
|
@@ -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")
|
|
@@ -183,7 +183,7 @@ const be = "Available for appointments", w = "Get Appointment Unavailability", p
|
|
|
183
183
|
() => R(
|
|
184
184
|
!1,
|
|
185
185
|
!1,
|
|
186
|
-
|
|
186
|
+
De(
|
|
187
187
|
_,
|
|
188
188
|
t("ADMIN_UNAVAILABILITY_FORM_ALL_SERVICES")
|
|
189
189
|
),
|
|
@@ -212,21 +212,21 @@ const be = "Available for appointments", w = "Get Appointment Unavailability", p
|
|
|
212
212
|
),
|
|
213
213
|
[I]
|
|
214
214
|
);
|
|
215
|
-
return
|
|
215
|
+
return S(() => {
|
|
216
216
|
if (o.length === 0) return;
|
|
217
217
|
const i = ye(), 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]), S(() => {
|
|
225
225
|
_.length > 0 && s((i) => ({
|
|
226
226
|
...i,
|
|
227
227
|
selectedServiceItems: v
|
|
228
228
|
}));
|
|
229
|
-
}, [v]),
|
|
229
|
+
}, [v]), S(() => {
|
|
230
230
|
I.length > 0 && s((i) => ({
|
|
231
231
|
...i,
|
|
232
232
|
selectedProviderItems: y
|
|
@@ -301,10 +301,10 @@ const be = "Available for appointments", w = "Get Appointment Unavailability", p
|
|
|
301
301
|
className: `${d.column} ${d.dateTimeColumn}`,
|
|
302
302
|
children: [
|
|
303
303
|
/* @__PURE__ */ r(
|
|
304
|
-
|
|
304
|
+
C,
|
|
305
305
|
{
|
|
306
306
|
datePickerType: "single",
|
|
307
|
-
minDate:
|
|
307
|
+
minDate: F(),
|
|
308
308
|
value: l.startDate ?? void 0,
|
|
309
309
|
onChange: (i) => {
|
|
310
310
|
i[0] && (n(["startDate", "dateTime"]), s({
|
|
@@ -376,10 +376,10 @@ const be = "Available for appointments", w = "Get Appointment Unavailability", p
|
|
|
376
376
|
className: `${d.column} ${d.dateTimeColumn}`,
|
|
377
377
|
children: [
|
|
378
378
|
/* @__PURE__ */ r(
|
|
379
|
-
|
|
379
|
+
C,
|
|
380
380
|
{
|
|
381
381
|
datePickerType: "single",
|
|
382
|
-
minDate: l.startDate ??
|
|
382
|
+
minDate: l.startDate ?? F(),
|
|
383
383
|
value: l.endDate ?? void 0,
|
|
384
384
|
onChange: (i) => {
|
|
385
385
|
i[0] && (n(["endDate", "dateTime"]), 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: y } =
|
|
513
|
+
]), { data: u, isLoading: v, isError: y } = D({
|
|
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]), h = E(
|
|
541
541
|
async (T) => {
|
|
542
542
|
L(!0);
|
|
543
543
|
try {
|
|
@@ -563,16 +563,16 @@ const be = "Available for appointments", w = "Get Appointment Unavailability", p
|
|
|
563
563
|
), j = E(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 h(Re(m.current, e));
|
|
567
|
+
}, [e, h]), z = E(
|
|
568
568
|
(T) => {
|
|
569
|
-
s((
|
|
570
|
-
const B = { ...
|
|
571
|
-
return T.forEach((
|
|
569
|
+
s((J) => {
|
|
570
|
+
const B = { ...J };
|
|
571
|
+
return T.forEach((X) => delete B[X]), B;
|
|
572
572
|
});
|
|
573
573
|
},
|
|
574
574
|
[]
|
|
575
|
-
),
|
|
575
|
+
), W = E(() => {
|
|
576
576
|
c(!1), m.current = null, s({});
|
|
577
577
|
}, []);
|
|
578
578
|
return /* @__PURE__ */ r(
|
|
@@ -595,7 +595,7 @@ 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
601
|
errorStateMessage: y ? e("ADMIN_UNAVAILABILITY_ERROR_MESSAGE") : null,
|
|
@@ -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: W,
|
|
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: z
|
|
630
630
|
}
|
|
631
631
|
)
|
|
632
632
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as a, jsxs as y } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { useState as C, useMemo as
|
|
2
|
+
import { Q as V, s as O, u as I, t as P, v as h, L as B, e as G, x as A, C as x, G as U, M as q, H as F, I as Q, S as k, W as H, X as W, _ as $ } from "./index-BHaYLRCF.js";
|
|
3
|
+
import { useState as C, useMemo as c } from "react";
|
|
4
4
|
import { useQueryClient as j, useQuery as w } from "@tanstack/react-query";
|
|
5
5
|
const K = V(
|
|
6
6
|
O,
|
|
@@ -36,9 +36,9 @@ const K = V(
|
|
|
36
36
|
"speciality",
|
|
37
37
|
"durationMins",
|
|
38
38
|
"description"
|
|
39
|
-
], z = "app:appointments:manageServices",
|
|
40
|
-
page:
|
|
41
|
-
noPrivilegeContainer:
|
|
39
|
+
], z = "app:appointments:manageServices", X = "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) {
|
|
@@ -75,33 +75,33 @@ function ae(e, i) {
|
|
|
75
75
|
}));
|
|
76
76
|
}
|
|
77
77
|
const oe = () => {
|
|
78
|
-
const { t: e } = I(), i = j(), { addNotification: t } = B(), { userPrivileges: s } =
|
|
78
|
+
const { t: e } = I(), i = j(), { addNotification: t } = B(), { userPrivileges: s } = G(), { appointmentsConfig: n } = K(), [E, _] = C(null), [M, p] = C(!1), l = n?.serviceTableFields ?? [
|
|
79
79
|
...u
|
|
80
|
-
],
|
|
80
|
+
], S = A(s, X), b = A(
|
|
81
81
|
s,
|
|
82
82
|
z
|
|
83
|
-
),
|
|
83
|
+
), m = c(
|
|
84
84
|
() => te(l),
|
|
85
85
|
[l]
|
|
86
86
|
), { data: L, isLoading: v, isError: D } = w({
|
|
87
87
|
queryKey: ["allAppointmentServices"],
|
|
88
|
-
queryFn:
|
|
89
|
-
enabled:
|
|
90
|
-
}), R =
|
|
88
|
+
queryFn: x,
|
|
89
|
+
enabled: S
|
|
90
|
+
}), R = c(
|
|
91
91
|
() => ie(l, e),
|
|
92
92
|
[l]
|
|
93
|
-
), N =
|
|
94
|
-
() => ae(L ?? [],
|
|
95
|
-
[L,
|
|
93
|
+
), N = c(
|
|
94
|
+
() => ae(L ?? [], m),
|
|
95
|
+
[L, m]
|
|
96
96
|
), g = async () => {
|
|
97
97
|
p(!0);
|
|
98
98
|
try {
|
|
99
|
-
await
|
|
99
|
+
await $(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",
|
|
103
103
|
timeout: 5e3
|
|
104
|
-
}),
|
|
104
|
+
}), _(null), i.invalidateQueries({ queryKey: ["allAppointmentServices"] });
|
|
105
105
|
} catch {
|
|
106
106
|
t({
|
|
107
107
|
title: e("ADMIN_ALL_SERVICES_DELETE_ERROR_TITLE"),
|
|
@@ -120,8 +120,8 @@ const oe = () => {
|
|
|
120
120
|
kind: "ghost",
|
|
121
121
|
label: e("ADMIN_ALL_SERVICES_DELETE_ICON_LABEL"),
|
|
122
122
|
disabled: !b,
|
|
123
|
-
onClick: () =>
|
|
124
|
-
children: /* @__PURE__ */ a(
|
|
123
|
+
onClick: () => _(r),
|
|
124
|
+
children: /* @__PURE__ */ a(W, {})
|
|
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__ */ a(
|
|
131
131
|
q,
|
|
132
132
|
{
|
|
133
|
-
header: /* @__PURE__ */ a(
|
|
134
|
-
main:
|
|
133
|
+
header: /* @__PURE__ */ a(Q, { breadcrumbItems: f, userMenu: /* @__PURE__ */ a(k, {}) }),
|
|
134
|
+
main: S ? /* @__PURE__ */ y(
|
|
135
135
|
"div",
|
|
136
136
|
{
|
|
137
137
|
id: "all-appointment-service-page",
|
|
@@ -160,7 +160,7 @@ const oe = () => {
|
|
|
160
160
|
serviceName: E.name,
|
|
161
161
|
isDeleting: M,
|
|
162
162
|
onConfirm: g,
|
|
163
|
-
onCancel: () =>
|
|
163
|
+
onCancel: () => _(null)
|
|
164
164
|
}
|
|
165
165
|
)
|
|
166
166
|
]
|
package/dist/index.js
CHANGED