@bahmni/appointments-app 0.0.1-dev.380 → 0.0.1-dev.381
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-HfGisLvD-CXPS99t4.js → DocumentsTable-D61lXj3C-CukR90nx.js} +1 -1
- package/dist/{FormsTable-DKPMJeXX-CcjVipYL.js → FormsTable-DSdtlBnm-D27EtXow.js} +48 -48
- package/dist/{LNWAZHJI-D-7tukpS.js → LNWAZHJI-Bq2CSLnY.js} +2 -2
- package/dist/{MWZ6AO7Z-BP1dg9wE.js → MWZ6AO7Z-Bfuv1DHQ.js} +2 -2
- package/dist/{Observations-DdMzfzAg-Ds8zMBew.js → Observations-BiXeD58c-Cx4jjuVT.js} +26 -26
- package/dist/{YPM2AS64-BHRptUkI.js → YPM2AS64-BZFOlfke.js} +1 -1
- package/dist/{index-Dj6Y8Rrb.js → index-BzzcvxBx.js} +10659 -10646
- package/dist/{index-BPw0gkuS.js → index-CUs8rGzj.js} +16 -16
- package/dist/{index-Bn17_c5L.js → index-pw8iuFPK.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 { $ 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, M 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 $, J as oe, Z as de, D as q, aj as ce, O as me, ak as Ae, al as Ie, am as ue, Q as _e, R as Te, T as Le } from "./index-BzzcvxBx.js";
|
|
3
3
|
import { useState as g, useMemo as N, useEffect as h, useRef as ve, useCallback as E } from "react";
|
|
4
|
-
import { useQuery as
|
|
4
|
+
import { useQuery as y, 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", Me = () => {
|
|
6
6
|
try {
|
|
7
7
|
return X().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
|
+
}), De = (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,
|
|
@@ -91,14 +91,14 @@ const be = "Available for appointments", w = "Get Appointment Unavailability", p
|
|
|
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(
|
|
@@ -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
|
+
} = 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
|
});
|
|
@@ -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, De, {
|
|
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
|
+
ye(
|
|
187
187
|
_,
|
|
188
188
|
t("ADMIN_UNAVAILABILITY_FORM_ALL_SERVICES")
|
|
189
189
|
),
|
|
@@ -215,10 +215,10 @@ const be = "Available for appointments", w = "Get Appointment Unavailability", p
|
|
|
215
215
|
return h(() => {
|
|
216
216
|
if (o.length === 0) return;
|
|
217
217
|
const i = Me(), b = o.some(
|
|
218
|
-
(
|
|
218
|
+
(D) => D.uuid === i
|
|
219
219
|
);
|
|
220
|
-
s((
|
|
221
|
-
...
|
|
220
|
+
s((D) => ({
|
|
221
|
+
...D,
|
|
222
222
|
locationUuid: b ? i : ""
|
|
223
223
|
}));
|
|
224
224
|
}, [o]), h(() => {
|
|
@@ -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: M } =
|
|
513
|
+
]), { data: u, isLoading: v, isError: M } = 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]), D = N(() => u ? u.map((T) => fe(T, e)) : [], [u, e]), S = E(
|
|
541
541
|
async (T) => {
|
|
542
542
|
L(!0);
|
|
543
543
|
try {
|
|
@@ -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: D,
|
|
599
599
|
ariaLabel: "unavailability-table",
|
|
600
600
|
loading: v,
|
|
601
601
|
errorStateMessage: M ? e("ADMIN_UNAVAILABILITY_ERROR_MESSAGE") : null,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as i, jsxs as y } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { I as V, r as O, u as C, F as P, t as h, Z as B, J as G, D as L, M as x, O as U, P as F, Q as q, R as k, T as Q, U as W, W as $, X as j } from "./index-BzzcvxBx.js";
|
|
3
3
|
import { useState as I, useMemo as _ } from "react";
|
|
4
|
-
import { useQueryClient as
|
|
5
|
-
const
|
|
4
|
+
import { useQueryClient as w, useQuery as H } from "@tanstack/react-query";
|
|
5
|
+
const K = V(
|
|
6
6
|
O,
|
|
7
7
|
"useAppointmentsConfig",
|
|
8
8
|
"AppointmentsConfigProvider"
|
|
9
|
-
),
|
|
9
|
+
), Z = ({
|
|
10
10
|
serviceName: e,
|
|
11
11
|
isDeleting: a,
|
|
12
12
|
onConfirm: t,
|
|
@@ -36,7 +36,7 @@ const W = V(
|
|
|
36
36
|
"speciality",
|
|
37
37
|
"durationMins",
|
|
38
38
|
"description"
|
|
39
|
-
],
|
|
39
|
+
], J = "app:appointments:manageServices", Y = "app:appointments:adminTab", z = "index-module_page__Gsfbu", X = "index-module_noPrivilegeContainer__Pu5WZ", ee = "index-module_table__GAPmb", d = {
|
|
40
40
|
page: z,
|
|
41
41
|
noPrivilegeContainer: X,
|
|
42
42
|
table: ee
|
|
@@ -75,28 +75,28 @@ function ie(e, a) {
|
|
|
75
75
|
}));
|
|
76
76
|
}
|
|
77
77
|
const oe = () => {
|
|
78
|
-
const { t: e } = C(), a =
|
|
78
|
+
const { t: e } = C(), a = w(), { addNotification: t } = B(), { userPrivileges: s } = G(), { appointmentsConfig: n } = K(), [E, c] = I(null), [b, p] = I(!1), l = n?.serviceTableFields ?? [
|
|
79
79
|
...u
|
|
80
|
-
],
|
|
80
|
+
], m = L(s, Y), M = L(
|
|
81
81
|
s,
|
|
82
|
-
|
|
83
|
-
),
|
|
82
|
+
J
|
|
83
|
+
), S = _(
|
|
84
84
|
() => te(l),
|
|
85
85
|
[l]
|
|
86
|
-
), { data: A, isLoading:
|
|
86
|
+
), { data: A, isLoading: R, isError: v } = H({
|
|
87
87
|
queryKey: ["allAppointmentServices"],
|
|
88
88
|
queryFn: x,
|
|
89
|
-
enabled:
|
|
90
|
-
}),
|
|
89
|
+
enabled: m
|
|
90
|
+
}), D = _(
|
|
91
91
|
() => ae(l, e),
|
|
92
92
|
[l]
|
|
93
93
|
), N = _(
|
|
94
|
-
() => ie(A ?? [],
|
|
95
|
-
[A,
|
|
94
|
+
() => ie(A ?? [], S),
|
|
95
|
+
[A, S]
|
|
96
96
|
), g = async () => {
|
|
97
97
|
p(!0);
|
|
98
98
|
try {
|
|
99
|
-
await
|
|
99
|
+
await j(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",
|
|
@@ -112,7 +112,7 @@ const oe = () => {
|
|
|
112
112
|
p(!1);
|
|
113
113
|
}
|
|
114
114
|
}, T = (r, o) => o === "actions" ? /* @__PURE__ */ i(
|
|
115
|
-
|
|
115
|
+
W,
|
|
116
116
|
{
|
|
117
117
|
id: `delete-service-${r.id}-btn`,
|
|
118
118
|
testId: `delete-service-${r.id}-btn-test-id`,
|
|
@@ -121,7 +121,7 @@ const oe = () => {
|
|
|
121
121
|
label: e("ADMIN_ALL_SERVICES_DELETE_ICON_LABEL"),
|
|
122
122
|
disabled: !M,
|
|
123
123
|
onClick: () => c(r),
|
|
124
|
-
children: /* @__PURE__ */ i(
|
|
124
|
+
children: /* @__PURE__ */ i($, {})
|
|
125
125
|
}
|
|
126
126
|
) : u.includes(o) ? r[o] ?? "-" : r.attributes[o] ?? "-", f = [
|
|
127
127
|
{ id: "home", label: e("BREADCRUMB_HOME"), href: U },
|
|
@@ -131,7 +131,7 @@ const oe = () => {
|
|
|
131
131
|
F,
|
|
132
132
|
{
|
|
133
133
|
header: /* @__PURE__ */ i(k, { breadcrumbItems: f, userMenu: /* @__PURE__ */ i(Q, {}) }),
|
|
134
|
-
main:
|
|
134
|
+
main: m ? /* @__PURE__ */ y(
|
|
135
135
|
"div",
|
|
136
136
|
{
|
|
137
137
|
id: "all-appointment-service-page",
|
|
@@ -144,10 +144,10 @@ const oe = () => {
|
|
|
144
144
|
{
|
|
145
145
|
id: "all-services",
|
|
146
146
|
title: e("ADMIN_ALL_SERVICES_TITLE"),
|
|
147
|
-
headers:
|
|
147
|
+
headers: D,
|
|
148
148
|
rows: N,
|
|
149
149
|
ariaLabel: "all-services-table",
|
|
150
|
-
loading:
|
|
150
|
+
loading: R,
|
|
151
151
|
errorStateMessage: v ? e("ADMIN_ALL_SERVICES_ERROR_MESSAGE") : null,
|
|
152
152
|
emptyStateMessage: e("ADMIN_ALL_SERVICES_EMPTY_MESSAGE"),
|
|
153
153
|
renderCell: T,
|
|
@@ -155,7 +155,7 @@ const oe = () => {
|
|
|
155
155
|
}
|
|
156
156
|
),
|
|
157
157
|
E && /* @__PURE__ */ i(
|
|
158
|
-
|
|
158
|
+
Z,
|
|
159
159
|
{
|
|
160
160
|
serviceName: E.name,
|
|
161
161
|
isDeleting: b,
|
package/dist/index.js
CHANGED