@bahmni/appointments-app 0.0.1-dev.237 → 0.0.1-dev.239
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-DZLV91xy-f5LDs6an.js → DocumentsTable-CD-yiYOH-CaZC2lNo.js} +16 -16
- package/dist/{FormsTable-Yt3aI_e6-Bnb-Zklz.js → FormsTable-DJ3FB7TZ-B2icb6hy.js} +43 -43
- package/dist/{LNWAZHJI-D-mYq8Ud.js → LNWAZHJI-BAiuHiUo.js} +2 -2
- package/dist/{MWZ6AO7Z-DNr0igQc.js → MWZ6AO7Z-jgVZJkt6.js} +2 -2
- package/dist/{Observations-DoBEcLrI-pq7YYK0e.js → Observations-DG-3eskL-XQsSDppm.js} +32 -32
- package/dist/{YPM2AS64-B8I9n-lB.js → YPM2AS64-cFpTk2Qz.js} +1 -1
- package/dist/{index-Cx6uHzit.js → index-CiSdLjcg.js} +373 -372
- package/dist/{index-nVY_AosV.js → index-Kv6M5X-7.js} +28 -28
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/providers/appointmentsConfig/schema.json.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as n, jsxs as f } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { useState as I, useMemo as
|
|
2
|
+
import { R as V, p as O, u as C, q as h, s as P, b as B, r as G, C as U, D as L, a as q, G as x, I as F, U as $, K as k, L as K, M as j, O as w, P as H } from "./index-CiSdLjcg.js";
|
|
3
|
+
import { useState as I, useMemo as _ } from "react";
|
|
4
4
|
const Q = V(
|
|
5
5
|
O,
|
|
6
6
|
"useAppointmentsConfig",
|
|
7
7
|
"AppointmentsConfigProvider"
|
|
8
|
-
),
|
|
8
|
+
), W = ({
|
|
9
9
|
serviceName: e,
|
|
10
10
|
isDeleting: a,
|
|
11
11
|
onConfirm: t,
|
|
@@ -35,8 +35,8 @@ const Q = V(
|
|
|
35
35
|
"speciality",
|
|
36
36
|
"durationMins",
|
|
37
37
|
"description"
|
|
38
|
-
],
|
|
39
|
-
page:
|
|
38
|
+
], Y = "app:appointments:manageServices", z = "app:appointments:adminTab", J = "_page_10v94_1", X = "_noPrivilegeContainer_10v94_1", Z = "_table_10v94_18", d = {
|
|
39
|
+
page: J,
|
|
40
40
|
noPrivilegeContainer: X,
|
|
41
41
|
table: Z
|
|
42
42
|
};
|
|
@@ -74,33 +74,33 @@ function ae(e, a) {
|
|
|
74
74
|
}));
|
|
75
75
|
}
|
|
76
76
|
const re = () => {
|
|
77
|
-
const { t: e } = C(), a = B(), { addNotification: t } = G(), { userPrivileges: s } = U(), { appointmentsConfig: i } = Q(), [E,
|
|
77
|
+
const { t: e } = C(), a = B(), { addNotification: t } = G(), { userPrivileges: s } = U(), { appointmentsConfig: i } = Q(), [E, c] = I(null), [v, S] = I(!1), l = i?.serviceTableFields ?? [
|
|
78
78
|
...p
|
|
79
|
-
], u =
|
|
79
|
+
], u = L(s, z), M = L(
|
|
80
80
|
s,
|
|
81
|
-
|
|
82
|
-
),
|
|
81
|
+
Y
|
|
82
|
+
), m = _(
|
|
83
83
|
() => ee(l),
|
|
84
84
|
[l]
|
|
85
|
-
), { data:
|
|
85
|
+
), { data: A, isLoading: D, isError: R } = q({
|
|
86
86
|
queryKey: ["allAppointmentServices"],
|
|
87
|
-
queryFn:
|
|
87
|
+
queryFn: H,
|
|
88
88
|
enabled: u
|
|
89
|
-
}),
|
|
89
|
+
}), b = _(
|
|
90
90
|
() => te(l, e),
|
|
91
91
|
[l]
|
|
92
|
-
), g =
|
|
93
|
-
() => ae(
|
|
94
|
-
[
|
|
92
|
+
), g = _(
|
|
93
|
+
() => ae(A ?? [], m),
|
|
94
|
+
[A, m]
|
|
95
95
|
), N = async () => {
|
|
96
96
|
S(!0);
|
|
97
97
|
try {
|
|
98
|
-
await
|
|
98
|
+
await w(E.id), t({
|
|
99
99
|
title: e("ADMIN_ALL_SERVICES_DELETE_SUCCESS_TITLE"),
|
|
100
100
|
message: e("ADMIN_ALL_SERVICES_DELETE_SUCCESS_MESSAGE"),
|
|
101
101
|
type: "success",
|
|
102
102
|
timeout: 5e3
|
|
103
|
-
}),
|
|
103
|
+
}), c(null), a.invalidateQueries({ queryKey: ["allAppointmentServices"] });
|
|
104
104
|
} catch {
|
|
105
105
|
t({
|
|
106
106
|
title: e("ADMIN_ALL_SERVICES_DELETE_ERROR_TITLE"),
|
|
@@ -111,7 +111,7 @@ const re = () => {
|
|
|
111
111
|
S(!1);
|
|
112
112
|
}
|
|
113
113
|
}, T = (r, o) => o === "actions" ? /* @__PURE__ */ n(
|
|
114
|
-
|
|
114
|
+
K,
|
|
115
115
|
{
|
|
116
116
|
id: `delete-service-${r.id}-btn`,
|
|
117
117
|
testId: `delete-service-${r.id}-btn-test-id`,
|
|
@@ -119,17 +119,17 @@ const re = () => {
|
|
|
119
119
|
kind: "ghost",
|
|
120
120
|
label: e("ADMIN_ALL_SERVICES_DELETE_ICON_LABEL"),
|
|
121
121
|
disabled: !M,
|
|
122
|
-
onClick: () =>
|
|
123
|
-
children: /* @__PURE__ */ n(
|
|
122
|
+
onClick: () => c(r),
|
|
123
|
+
children: /* @__PURE__ */ n(j, {})
|
|
124
124
|
}
|
|
125
125
|
) : p.includes(o) ? r[o] ?? "-" : r.attributes[o] ?? "-", y = [
|
|
126
126
|
{ id: "home", label: e("BREADCRUMB_HOME"), href: x },
|
|
127
127
|
{ id: "admin", label: e("BREADCRUMB_ADMIN"), isCurrentPage: !0 }
|
|
128
128
|
];
|
|
129
129
|
return /* @__PURE__ */ n(
|
|
130
|
-
|
|
130
|
+
F,
|
|
131
131
|
{
|
|
132
|
-
header: /* @__PURE__ */ n(
|
|
132
|
+
header: /* @__PURE__ */ n(k, { breadcrumbItems: y }),
|
|
133
133
|
main: u ? /* @__PURE__ */ f(
|
|
134
134
|
"div",
|
|
135
135
|
{
|
|
@@ -139,27 +139,27 @@ const re = () => {
|
|
|
139
139
|
className: d.page,
|
|
140
140
|
children: [
|
|
141
141
|
/* @__PURE__ */ n(
|
|
142
|
-
|
|
142
|
+
$,
|
|
143
143
|
{
|
|
144
144
|
id: "all-services",
|
|
145
145
|
title: e("ADMIN_ALL_SERVICES_TITLE"),
|
|
146
|
-
headers:
|
|
146
|
+
headers: b,
|
|
147
147
|
rows: g,
|
|
148
148
|
ariaLabel: "all-services-table",
|
|
149
|
-
loading:
|
|
150
|
-
errorStateMessage:
|
|
149
|
+
loading: D,
|
|
150
|
+
errorStateMessage: R ? e("ADMIN_ALL_SERVICES_ERROR_MESSAGE") : null,
|
|
151
151
|
emptyStateMessage: e("ADMIN_ALL_SERVICES_EMPTY_MESSAGE"),
|
|
152
152
|
renderCell: T,
|
|
153
153
|
className: d.table
|
|
154
154
|
}
|
|
155
155
|
),
|
|
156
156
|
E && /* @__PURE__ */ n(
|
|
157
|
-
|
|
157
|
+
W,
|
|
158
158
|
{
|
|
159
159
|
serviceName: E.name,
|
|
160
160
|
isDeleting: v,
|
|
161
161
|
onConfirm: N,
|
|
162
|
-
onCancel: () =>
|
|
162
|
+
onCancel: () => c(null)
|
|
163
163
|
}
|
|
164
164
|
)
|
|
165
165
|
]
|