@bahmni/appointments-app 0.0.1-dev.301 → 0.0.1-dev.302
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-CmBBrfXG-BxHLREVt.js → DocumentsTable-BRN1ibfx-D8mfBXSe.js} +15 -15
- package/dist/FormsTable-u8hD7pNk-qzWGlOCB.js +234 -0
- package/dist/{LNWAZHJI-Ce6bRDHG.js → LNWAZHJI-Dg48uTT1.js} +2 -2
- package/dist/{MWZ6AO7Z-BBOql2ta.js → MWZ6AO7Z-CD1aKjwW.js} +2 -2
- package/dist/{Observations-UAdeihZ5-BM4Ca8Zt.js → Observations-DUdH2i49-CoCPm7fD.js} +30 -30
- package/dist/{YPM2AS64-Bi8EVO-G.js → YPM2AS64-DI4sX8te.js} +1 -1
- package/dist/{index-BVjSc9Oq.js → index-85wcKDtk.js} +18 -18
- package/dist/{index-Cfca9h9P.js → index-B2M5V2AS.js} +24 -24
- package/dist/{index-DXWAUyAO.js → index-CdyKXvT4.js} +30734 -30667
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/FormsTable-BylQMvsY-CdGde0oo.js +0 -206
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as n, jsxs as y } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { k as V, l as O, u as C, I as P, $ as h, Y as B, p as x, s as L, E as G, v as U, w as q, B as w, x as $, z as k, C as F, D as Y } from "./index-CdyKXvT4.js";
|
|
3
3
|
import { useState as I, useMemo as _ } from "react";
|
|
4
4
|
import { useQueryClient as j, useQuery as H } from "@tanstack/react-query";
|
|
5
5
|
const K = V(
|
|
@@ -8,11 +8,11 @@ const K = V(
|
|
|
8
8
|
"AppointmentsConfigProvider"
|
|
9
9
|
), Q = ({
|
|
10
10
|
serviceName: e,
|
|
11
|
-
isDeleting:
|
|
11
|
+
isDeleting: a,
|
|
12
12
|
onConfirm: t,
|
|
13
13
|
onCancel: s
|
|
14
14
|
}) => {
|
|
15
|
-
const { t:
|
|
15
|
+
const { t: i } = C();
|
|
16
16
|
return /* @__PURE__ */ n(
|
|
17
17
|
P,
|
|
18
18
|
{
|
|
@@ -23,11 +23,11 @@ const K = V(
|
|
|
23
23
|
danger: !0,
|
|
24
24
|
onRequestClose: s,
|
|
25
25
|
onRequestSubmit: t,
|
|
26
|
-
primaryButtonText:
|
|
27
|
-
secondaryButtonText:
|
|
28
|
-
primaryButtonDisabled:
|
|
29
|
-
modalHeading:
|
|
30
|
-
children:
|
|
26
|
+
primaryButtonText: i("ADMIN_ALL_SERVICES_DELETE_BUTTON_LABEL"),
|
|
27
|
+
secondaryButtonText: i("ADMIN_ALL_SERVICES_DELETE_CANCEL"),
|
|
28
|
+
primaryButtonDisabled: a,
|
|
29
|
+
modalHeading: i("ADMIN_ALL_SERVICES_DELETE_MODAL_TITLE"),
|
|
30
|
+
children: i("ADMIN_ALL_SERVICES_DELETE_CONFIRM_BODY", { serviceName: e })
|
|
31
31
|
}
|
|
32
32
|
);
|
|
33
33
|
}, p = [
|
|
@@ -36,29 +36,29 @@ const K = V(
|
|
|
36
36
|
"speciality",
|
|
37
37
|
"durationMins",
|
|
38
38
|
"description"
|
|
39
|
-
], W = "app:appointments:manageServices",
|
|
40
|
-
page:
|
|
39
|
+
], W = "app:appointments:manageServices", z = "app:appointments:adminTab", Z = "index-module_page__Gsfbu", J = "index-module_noPrivilegeContainer__Pu5WZ", X = "index-module_table__GAPmb", d = {
|
|
40
|
+
page: Z,
|
|
41
41
|
noPrivilegeContainer: J,
|
|
42
42
|
table: X
|
|
43
43
|
};
|
|
44
44
|
function ee(e) {
|
|
45
|
-
return e.filter((
|
|
45
|
+
return e.filter((a) => !p.includes(a));
|
|
46
46
|
}
|
|
47
|
-
function te(e,
|
|
47
|
+
function te(e, a) {
|
|
48
48
|
return [
|
|
49
49
|
...e.map((t) => ({
|
|
50
50
|
key: t,
|
|
51
|
-
header:
|
|
51
|
+
header: a(
|
|
52
52
|
`ADMIN_ALL_SERVICES_COLUMN_${h(t)}`
|
|
53
53
|
)
|
|
54
54
|
})),
|
|
55
55
|
{
|
|
56
56
|
key: "actions",
|
|
57
|
-
header:
|
|
57
|
+
header: a("ADMIN_ALL_SERVICES_COLUMN_ACTIONS")
|
|
58
58
|
}
|
|
59
59
|
];
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function ae(e, a) {
|
|
62
62
|
return e.map((t) => ({
|
|
63
63
|
id: t.uuid,
|
|
64
64
|
name: t.name,
|
|
@@ -67,17 +67,17 @@ function ie(e, i) {
|
|
|
67
67
|
durationMins: t.durationMins,
|
|
68
68
|
description: t.description,
|
|
69
69
|
attributes: Object.fromEntries(
|
|
70
|
-
|
|
70
|
+
a.map((s) => [
|
|
71
71
|
s,
|
|
72
|
-
t.attributes?.find((
|
|
72
|
+
t.attributes?.find((i) => i.attributeType === s)?.value ?? null
|
|
73
73
|
])
|
|
74
74
|
)
|
|
75
75
|
}));
|
|
76
76
|
}
|
|
77
77
|
const le = () => {
|
|
78
|
-
const { t: e } = C(),
|
|
78
|
+
const { t: e } = C(), a = j(), { addNotification: t } = B(), { userPrivileges: s } = x(), { appointmentsConfig: i } = K(), [E, c] = I(null), [M, u] = I(!1), l = i?.serviceTableFields ?? [
|
|
79
79
|
...p
|
|
80
|
-
], m = L(s,
|
|
80
|
+
], m = L(s, z), b = L(
|
|
81
81
|
s,
|
|
82
82
|
W
|
|
83
83
|
), S = _(
|
|
@@ -85,13 +85,13 @@ const le = () => {
|
|
|
85
85
|
[l]
|
|
86
86
|
), { data: A, isLoading: v, isError: D } = H({
|
|
87
87
|
queryKey: ["allAppointmentServices"],
|
|
88
|
-
queryFn:
|
|
88
|
+
queryFn: G,
|
|
89
89
|
enabled: m
|
|
90
90
|
}), R = _(
|
|
91
91
|
() => te(l, e),
|
|
92
92
|
[l]
|
|
93
93
|
), N = _(
|
|
94
|
-
() =>
|
|
94
|
+
() => ae(A ?? [], S),
|
|
95
95
|
[A, S]
|
|
96
96
|
), g = async () => {
|
|
97
97
|
u(!0);
|
|
@@ -101,7 +101,7 @@ const le = () => {
|
|
|
101
101
|
message: e("ADMIN_ALL_SERVICES_DELETE_SUCCESS_MESSAGE"),
|
|
102
102
|
type: "success",
|
|
103
103
|
timeout: 5e3
|
|
104
|
-
}), c(null),
|
|
104
|
+
}), c(null), a.invalidateQueries({ queryKey: ["allAppointmentServices"] });
|
|
105
105
|
} catch {
|
|
106
106
|
t({
|
|
107
107
|
title: e("ADMIN_ALL_SERVICES_DELETE_ERROR_TITLE"),
|
|
@@ -112,7 +112,7 @@ const le = () => {
|
|
|
112
112
|
u(!1);
|
|
113
113
|
}
|
|
114
114
|
}, T = (r, o) => o === "actions" ? /* @__PURE__ */ n(
|
|
115
|
-
|
|
115
|
+
k,
|
|
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 le = () => {
|
|
|
121
121
|
label: e("ADMIN_ALL_SERVICES_DELETE_ICON_LABEL"),
|
|
122
122
|
disabled: !b,
|
|
123
123
|
onClick: () => c(r),
|
|
124
|
-
children: /* @__PURE__ */ n(
|
|
124
|
+
children: /* @__PURE__ */ n(F, {})
|
|
125
125
|
}
|
|
126
126
|
) : p.includes(o) ? r[o] ?? "-" : r.attributes[o] ?? "-", f = [
|
|
127
127
|
{ id: "home", label: e("BREADCRUMB_HOME"), href: U },
|