mario-education 2.0.219-staging → 2.0.221-staging
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.
|
@@ -0,0 +1,2258 @@
|
|
|
1
|
+
import { jsxs as l, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useState as d, useRef as en, useMemo as Se, useEffect as Ee, useCallback as tn } from "react";
|
|
3
|
+
import { useTranslation as we, setLoading as _e, utcToLocalTime as Ue, setAlert as V, initAmplitude as nn, getStaticFileUrl as an } from "mario-core";
|
|
4
|
+
import { Grid as j, Typography as ae, Button as Le, Dialog as kt, DialogTitle as Nt, IconButton as St, DialogContent as Dt, FormLabel as ot, Autocomplete as Ft, TextField as st, DialogActions as on, Box as ee, Grid2 as ln, Popover as rn } from "@mui/material";
|
|
5
|
+
import { s as m } from "./plp.module-BElMo3qj.js";
|
|
6
|
+
import { n as xt, m as sn } from "./constants-B823Sm_9.js";
|
|
7
|
+
import { a as cn, G as We, C as dn, A as mn, T as qe } from "./ArrowUp-Ce70gh-g.js";
|
|
8
|
+
import { c as he, i as lt, f as rt, O as _n, a as hn } from "./OpenFieldQuestionTable-BJdyyaBE.js";
|
|
9
|
+
import { useDispatch as ct, useSelector as Ge } from "react-redux";
|
|
10
|
+
import $e from "moment";
|
|
11
|
+
import { d as un, a as vn } from "./constants-BRDnBHbq.js";
|
|
12
|
+
import { l as pn, m as gn, n as fn, p as wn, q as bn, v as yn, s as Cn, w as kn, x as Nn, y as Sn } from "./wellbeingService-Bom7MO8x.js";
|
|
13
|
+
import { useNavigate as Dn } from "react-router-dom";
|
|
14
|
+
import { n as Fn } from "./dashboardService-DOmiidpl.js";
|
|
15
|
+
import { F as xn } from "./FilterDateRange-B5fcZDZq.js";
|
|
16
|
+
import { C as On } from "./Clear-ZsidxAE2.js";
|
|
17
|
+
import { A as Wn } from "./ArrowForward-DxhjtaZw.js";
|
|
18
|
+
import { Button as Ot, Modal as In, ModalHeader as $n, ModalBody as Tn, FormGroup as Mn, Input as An, Label as Ln, ModalFooter as zn } from "reactstrap";
|
|
19
|
+
import { s as bt } from "./dashboard.module-uRKe0wZZ.js";
|
|
20
|
+
import Bn from "jspdf";
|
|
21
|
+
import Oe from "html2canvas";
|
|
22
|
+
import { k as Ve } from "./index-DZpMn3ks.js";
|
|
23
|
+
import { C as Wt } from "./Close-Z8xNZb_y.js";
|
|
24
|
+
import { LocalizationProvider as qn, DatePicker as En } from "@mui/x-date-pickers";
|
|
25
|
+
import { A as Pn } from "./AdapterMoment-CeMS9jLD.js";
|
|
26
|
+
import { b as yt, c as Rn, a as Hn, d as Qn } from "./index-Ch2tU51H.js";
|
|
27
|
+
import { S as Yn } from "./SimpleDialog-ioNphHbB.js";
|
|
28
|
+
const o = {
|
|
29
|
+
"empty-chart": "_empty-chart_1ul8l_161",
|
|
30
|
+
"empty-chart__title": "_empty-chart__title_1ul8l_170",
|
|
31
|
+
"empty-chart__img": "_empty-chart__img_1ul8l_175",
|
|
32
|
+
"empty-chart__description": "_empty-chart__description_1ul8l_181",
|
|
33
|
+
"log-intervention-modal": "_log-intervention-modal_1ul8l_190",
|
|
34
|
+
"custom-interventions-overview-modal": "_custom-interventions-overview-modal_1ul8l_190",
|
|
35
|
+
"create-interventions-modal": "_create-interventions-modal_1ul8l_194",
|
|
36
|
+
"log-intervention-modal__header": "_log-intervention-modal__header_1ul8l_202",
|
|
37
|
+
"log-intervention-modal__header-icon": "_log-intervention-modal__header-icon_1ul8l_207",
|
|
38
|
+
"log-intervention-modal__header-title": "_log-intervention-modal__header-title_1ul8l_213",
|
|
39
|
+
"log-intervention-modal__header-subtitle": "_log-intervention-modal__header-subtitle_1ul8l_219",
|
|
40
|
+
"log-intervention-modal__dialog-title": "_log-intervention-modal__dialog-title_1ul8l_225",
|
|
41
|
+
"log-intervention-modal__close-btn": "_log-intervention-modal__close-btn_1ul8l_233",
|
|
42
|
+
"log-intervention-modal__dialog-content": "_log-intervention-modal__dialog-content_1ul8l_238",
|
|
43
|
+
"log-intervention-modal__dialog-actions": "_log-intervention-modal__dialog-actions_1ul8l_241",
|
|
44
|
+
"log-intervention-modal__content": "_log-intervention-modal__content_1ul8l_244",
|
|
45
|
+
"log-intervention-modal__fields": "_log-intervention-modal__fields_1ul8l_247",
|
|
46
|
+
"log-intervention-modal__field": "_log-intervention-modal__field_1ul8l_247",
|
|
47
|
+
"log-intervention-modal__field--narrow": "_log-intervention-modal__field--narrow_1ul8l_257",
|
|
48
|
+
"log-intervention-modal__field-label": "_log-intervention-modal__field-label_1ul8l_261",
|
|
49
|
+
"log-intervention-modal__actions": "_log-intervention-modal__actions_1ul8l_267",
|
|
50
|
+
"log-intervention-modal__btn": "_log-intervention-modal__btn_1ul8l_272",
|
|
51
|
+
"log-intervention-modal__btn-primary": "_log-intervention-modal__btn-primary_1ul8l_279",
|
|
52
|
+
"interventions-overview__list": "_interventions-overview__list_1ul8l_289",
|
|
53
|
+
"interventions-overview__item": "_interventions-overview__item_1ul8l_293",
|
|
54
|
+
"interventions-overview__item--content": "_interventions-overview__item--content_1ul8l_303",
|
|
55
|
+
"interventions-overview__item--header": "_interventions-overview__item--header_1ul8l_309",
|
|
56
|
+
"interventions-overview__item--left": "_interventions-overview__item--left_1ul8l_314",
|
|
57
|
+
"interventions-overview__item--icon-wrapper": "_interventions-overview__item--icon-wrapper_1ul8l_319",
|
|
58
|
+
"interventions-overview__item--title": "_interventions-overview__item--title_1ul8l_329",
|
|
59
|
+
"interventions-overview__item--date-wrapper": "_interventions-overview__item--date-wrapper_1ul8l_335",
|
|
60
|
+
"interventions-overview__item--description": "_interventions-overview__item--description_1ul8l_343",
|
|
61
|
+
"interventions-overview__item--footer": "_interventions-overview__item--footer_1ul8l_348",
|
|
62
|
+
"interventions-overview__item--user-wrapper": "_interventions-overview__item--user-wrapper_1ul8l_353",
|
|
63
|
+
"interventions-overview__item--action": "_interventions-overview__item--action_1ul8l_365",
|
|
64
|
+
"interventions-overview__grid": "_interventions-overview__grid_1ul8l_375",
|
|
65
|
+
"interventions-overview__card": "_interventions-overview__card_1ul8l_381",
|
|
66
|
+
"interventions-overview__card-header": "_interventions-overview__card-header_1ul8l_391",
|
|
67
|
+
"interventions-overview__card-icon": "_interventions-overview__card-icon_1ul8l_396",
|
|
68
|
+
"interventions-overview__card-count": "_interventions-overview__card-count_1ul8l_401",
|
|
69
|
+
"interventions-overview__card-title": "_interventions-overview__card-title_1ul8l_406",
|
|
70
|
+
"interventions-overview__card-action": "_interventions-overview__card-action_1ul8l_413",
|
|
71
|
+
"interventions-overview__field-label": "_interventions-overview__field-label_1ul8l_425",
|
|
72
|
+
"send-reminder-modal": "_send-reminder-modal_1ul8l_442",
|
|
73
|
+
"send-reminder-modal__modalHeader": "_send-reminder-modal__modalHeader_1ul8l_451",
|
|
74
|
+
"send-reminder-modal__headerLeft": "_send-reminder-modal__headerLeft_1ul8l_456",
|
|
75
|
+
"send-reminder-modal__iconMailWrapper": "_send-reminder-modal__iconMailWrapper_1ul8l_461",
|
|
76
|
+
"send-reminder-modal__modalTitle": "_send-reminder-modal__modalTitle_1ul8l_471",
|
|
77
|
+
"send-reminder-modal__modalSubTitle": "_send-reminder-modal__modalSubTitle_1ul8l_477",
|
|
78
|
+
"send-reminder-modal__infoBanner": "_send-reminder-modal__infoBanner_1ul8l_492",
|
|
79
|
+
"send-reminder-modal__bannerIcon": "_send-reminder-modal__bannerIcon_1ul8l_501",
|
|
80
|
+
"send-reminder-modal__bannerText": "_send-reminder-modal__bannerText_1ul8l_506",
|
|
81
|
+
"send-reminder-modal__formGroup": "_send-reminder-modal__formGroup_1ul8l_512",
|
|
82
|
+
"send-reminder-modal__inputLabel": "_send-reminder-modal__inputLabel_1ul8l_517",
|
|
83
|
+
"send-reminder-modal__subjectInput": "_send-reminder-modal__subjectInput_1ul8l_523",
|
|
84
|
+
"send-reminder-modal__messageTextarea": "_send-reminder-modal__messageTextarea_1ul8l_537",
|
|
85
|
+
"send-reminder-modal__modalFooter": "_send-reminder-modal__modalFooter_1ul8l_553",
|
|
86
|
+
"send-reminder-modal__cancelBtn": "_send-reminder-modal__cancelBtn_1ul8l_560",
|
|
87
|
+
"send-reminder-modal__sendBtn": "_send-reminder-modal__sendBtn_1ul8l_573"
|
|
88
|
+
}, Ie = ({ titleChart: r = "", isPrint: f = !1 }) => {
|
|
89
|
+
const { t: k } = we();
|
|
90
|
+
return /* @__PURE__ */ l("div", { className: o["empty-chart"], children: [
|
|
91
|
+
!f && /* @__PURE__ */ t("div", { className: o["empty-chart__title"], children: k(r) }),
|
|
92
|
+
/* @__PURE__ */ t("div", { className: o["empty-chart__img"], children: /* @__PURE__ */ t(
|
|
93
|
+
"img",
|
|
94
|
+
{
|
|
95
|
+
src: "/images/teacher-wellbeing-setup/reports-illustrations.png",
|
|
96
|
+
alt: "img"
|
|
97
|
+
}
|
|
98
|
+
) }),
|
|
99
|
+
/* @__PURE__ */ t(
|
|
100
|
+
"div",
|
|
101
|
+
{
|
|
102
|
+
className: o["empty-chart__description"],
|
|
103
|
+
dangerouslySetInnerHTML: { __html: k("charts_will_appear_once_over_20_of_educators") }
|
|
104
|
+
}
|
|
105
|
+
)
|
|
106
|
+
] });
|
|
107
|
+
}, Me = ({
|
|
108
|
+
data: r,
|
|
109
|
+
weeklyData: f,
|
|
110
|
+
months: k,
|
|
111
|
+
dayOfWeek: _,
|
|
112
|
+
avgQuestionLastMonth: s,
|
|
113
|
+
timeOfDay: h,
|
|
114
|
+
classFontSize: v,
|
|
115
|
+
handleHoverTooltip: w,
|
|
116
|
+
weeks: x,
|
|
117
|
+
activeColumn: u,
|
|
118
|
+
onActiveColumn: I,
|
|
119
|
+
titleChart: T,
|
|
120
|
+
percent: A,
|
|
121
|
+
setTimeChart: W,
|
|
122
|
+
interventionLogs: Y
|
|
123
|
+
}) => {
|
|
124
|
+
const { t: oe } = we();
|
|
125
|
+
return /* @__PURE__ */ l(j, { children: [
|
|
126
|
+
/* @__PURE__ */ l(j, { className: `${m.explain}`, children: [
|
|
127
|
+
/* @__PURE__ */ t(
|
|
128
|
+
"img",
|
|
129
|
+
{
|
|
130
|
+
src: xt,
|
|
131
|
+
alt: "",
|
|
132
|
+
className: `${m["explain-icon"]}`
|
|
133
|
+
}
|
|
134
|
+
),
|
|
135
|
+
/* @__PURE__ */ t(ae, { className: `${m["explain-text"]}`, children: oe("the_data_presented_here_comes_from_the_check_ins") })
|
|
136
|
+
] }),
|
|
137
|
+
!!A && A >= 20 && /* @__PURE__ */ t(j, { className: `${m["space-chart"]}`, children: /* @__PURE__ */ t(
|
|
138
|
+
cn,
|
|
139
|
+
{
|
|
140
|
+
loadingComplete: !0,
|
|
141
|
+
avgQuestionLastMonth: s,
|
|
142
|
+
series: r,
|
|
143
|
+
icons: [
|
|
144
|
+
"wellbeing-dashboard/GeneralHealth.png",
|
|
145
|
+
"wellbeing-dashboard/Sleep.png",
|
|
146
|
+
"wellbeing-dashboard/Exercise.png",
|
|
147
|
+
"wellbeing-dashboard/Nutrition.png",
|
|
148
|
+
"wellbeing-dashboard/Focus.png"
|
|
149
|
+
],
|
|
150
|
+
trendLabels: [],
|
|
151
|
+
noAvgText: !0
|
|
152
|
+
}
|
|
153
|
+
) }),
|
|
154
|
+
A && A >= 20 ? /* @__PURE__ */ t(
|
|
155
|
+
We,
|
|
156
|
+
{
|
|
157
|
+
colors: he,
|
|
158
|
+
name: oe(T),
|
|
159
|
+
typeChart: "area",
|
|
160
|
+
activeColumn: u,
|
|
161
|
+
onActiveColumn: I,
|
|
162
|
+
series: r,
|
|
163
|
+
weeklySeries: f,
|
|
164
|
+
months: k,
|
|
165
|
+
dayOfWeek: _,
|
|
166
|
+
avgQuestionLastMonth: s,
|
|
167
|
+
timeOfDay: h,
|
|
168
|
+
classFontSize: v,
|
|
169
|
+
handleHoverTooltip: w,
|
|
170
|
+
weeks: x,
|
|
171
|
+
noGradient: !0,
|
|
172
|
+
noAvgTotal: !0,
|
|
173
|
+
setOptionDate: W,
|
|
174
|
+
interventionLogs: Y
|
|
175
|
+
}
|
|
176
|
+
) : /* @__PURE__ */ t(Ie, { titleChart: T })
|
|
177
|
+
] });
|
|
178
|
+
}, Ct = (r, f, k) => r.map((_) => ({
|
|
179
|
+
name: _.questionName,
|
|
180
|
+
questionTranslation: _.questionTranslationName,
|
|
181
|
+
description: _.description,
|
|
182
|
+
data: f.map((s) => {
|
|
183
|
+
const h = s.resultQuestion.find(
|
|
184
|
+
(v) => v.questionText.includes(_.questionName)
|
|
185
|
+
);
|
|
186
|
+
return h ? h.avgOfStudentChoice : 0;
|
|
187
|
+
}),
|
|
188
|
+
group: _?.group || ""
|
|
189
|
+
})), jn = (r) => {
|
|
190
|
+
const f = /* @__PURE__ */ new Set();
|
|
191
|
+
return r.length === 0 ? [] : r.reduce((k, _) => (_.resultQuestion.forEach((s) => {
|
|
192
|
+
const h = s.questionText?.split("</p>")[0].replace("<p>", "").trim() || "", v = s.questionTranslation?.split("</p>")[0].replace("<p>", "").trim() || "";
|
|
193
|
+
h && !f.has(h) && (f.add(h), k.push({
|
|
194
|
+
questionName: h,
|
|
195
|
+
questionTranslationName: v,
|
|
196
|
+
description: s?.description || "",
|
|
197
|
+
group: s?.group || ""
|
|
198
|
+
}));
|
|
199
|
+
}), k), []);
|
|
200
|
+
}, Ae = (r) => r ? r.replace(/ /g, " ").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'") : "", Un = () => {
|
|
201
|
+
const r = ct(), f = Dn(), [k, _] = d([]), [s, h] = d([]), [v, w] = d([]), [x, u] = d([]), [I, T] = d([]), [A, W] = d([]), [Y, oe] = d([]), [G, J] = d([]), [te, K] = d([]), [q, le] = d([]), [se, ce] = d([]), [pe, ge] = d([]), [E, re] = d(lt), [P, de] = d([]), [M, c] = d([]), [$, ue] = d([]), [De, ve] = d([]), [X, i] = d([]), [n, b] = d(!1), [g, e] = d([]), [fe, Fe] = d([]), [ne, Te] = d([]), [L, p] = d([]), [Z, O] = d([]), [y, R] = d([]), [H, z] = d(null), [F, C] = d(!1), [S, me] = d([]), [Q, U] = d("physical"), [ze, Pe] = d([]), [Je, ke] = d({
|
|
202
|
+
totalWithoutCheckIn: 0,
|
|
203
|
+
totalConversation: 0,
|
|
204
|
+
totalEngagement: 0,
|
|
205
|
+
totalWellbeing: 0
|
|
206
|
+
}), [Ke, Re] = d(!1), [Ne, Xe] = d({
|
|
207
|
+
pageSize: 5,
|
|
208
|
+
currentPage: 1,
|
|
209
|
+
sortBy: "StartDate",
|
|
210
|
+
sortOrder: "DESC"
|
|
211
|
+
}), [Ze, et] = d(), [tt, nt] = d({
|
|
212
|
+
emotional: 0,
|
|
213
|
+
intellectual: 0,
|
|
214
|
+
physical: 0,
|
|
215
|
+
environment: 0,
|
|
216
|
+
relationships: 0,
|
|
217
|
+
selfCare: 0
|
|
218
|
+
}), [He, Qe] = d("Monthly"), be = en([]), it = Ge((a) => a.common.user), at = Ge((a) => a.common?.defaultFontSize), Ye = it?.roles || [], dt = Ge((a) => a.common.language), It = Ge((a) => a?.common?.user?.schoolName), $t = Se(() => at == un ? "font-large" : at == vn ? "font-small" : "", [at]), je = (a) => {
|
|
219
|
+
re({
|
|
220
|
+
...E,
|
|
221
|
+
...a
|
|
222
|
+
});
|
|
223
|
+
}, Tt = (a) => {
|
|
224
|
+
z(a.currentTarget);
|
|
225
|
+
}, Mt = () => {
|
|
226
|
+
z(null);
|
|
227
|
+
}, mt = !!H, At = mt ? "export_wellbeing_popover" : void 0, Lt = () => {
|
|
228
|
+
me([]), C(!F);
|
|
229
|
+
}, zt = (a) => {
|
|
230
|
+
a && je({
|
|
231
|
+
startDate: a.startOf("day").valueOf(),
|
|
232
|
+
optionDate: ""
|
|
233
|
+
});
|
|
234
|
+
}, Bt = (a) => {
|
|
235
|
+
a && je({
|
|
236
|
+
endDate: a.endOf("day").valueOf(),
|
|
237
|
+
optionDate: ""
|
|
238
|
+
});
|
|
239
|
+
}, qt = (a) => {
|
|
240
|
+
a && je({
|
|
241
|
+
startDate: a.startDate,
|
|
242
|
+
endDate: a.endDate,
|
|
243
|
+
optionDate: a.value
|
|
244
|
+
});
|
|
245
|
+
}, Et = (a) => {
|
|
246
|
+
be.current.includes(a) || (be.current = [...be.current, a].filter((D, B, ie) => ie.indexOf(D) === B), r(nn({
|
|
247
|
+
name: it.email,
|
|
248
|
+
event: `Chart interaction: ${a}`,
|
|
249
|
+
chart: a,
|
|
250
|
+
roles: it?.roles
|
|
251
|
+
})));
|
|
252
|
+
}, Pt = (a) => {
|
|
253
|
+
let D = [...S];
|
|
254
|
+
D?.find(
|
|
255
|
+
(ie) => ie == a
|
|
256
|
+
) ? D = D.filter((ie) => ie != a) : D.push(a), me(D);
|
|
257
|
+
}, Rt = () => {
|
|
258
|
+
localStorage.removeItem(rt), ht();
|
|
259
|
+
}, Ht = () => {
|
|
260
|
+
localStorage.setItem(rt, JSON.stringify(E)), r(
|
|
261
|
+
V({
|
|
262
|
+
type: "success",
|
|
263
|
+
message: "Filters saved successfully!"
|
|
264
|
+
})
|
|
265
|
+
);
|
|
266
|
+
}, Qt = () => {
|
|
267
|
+
Re(!0);
|
|
268
|
+
}, _t = () => {
|
|
269
|
+
Re(!1);
|
|
270
|
+
}, Yt = async () => {
|
|
271
|
+
r(_e(!0));
|
|
272
|
+
try {
|
|
273
|
+
const a = await pn({
|
|
274
|
+
...E,
|
|
275
|
+
roles: Ye,
|
|
276
|
+
language: dt
|
|
277
|
+
});
|
|
278
|
+
if (a && a?.data && a.data?.overViewQuestionLastMonth, a.data?.overviewQuestionChoice, a.data?.questionChoiceWeeklyResults) {
|
|
279
|
+
const ie = jn(a.data?.overviewQuestionChoice), xe = a.data?.overviewQuestionChoice?.map((N) => N?.month || "") || [], Be = a.data?.questionChoiceWeeklyResults?.map((N) => N?.month || "") || [];
|
|
280
|
+
ve(xe), i(Be);
|
|
281
|
+
const ye = Ct(ie, a.data?.overviewQuestionChoice), Ce = Ct(ie, a.data?.questionChoiceWeeklyResults), Xt = a.data.questionChoiceWeeklyResults.map((N) => `${Ue(N.startDate, "DD-MM-yyyy")} - ${Ue(N.endDate, "DD-MM-yyyy")}`), Zt = a.data.overviewQuestionChoice.map((N) => `${Ue(N.startDate, "DD-MM-yyyy")} - ${Ue(N.endDate, "DD-MM-yyyy")}`);
|
|
282
|
+
c(Xt), ue(Zt);
|
|
283
|
+
const ut = ye.filter((N) => N.group === "Physical") || [];
|
|
284
|
+
_(ut), e(ut?.map(() => !0)), h(Ce.filter((N) => N.group === "Physical"));
|
|
285
|
+
const vt = ye.filter((N) => N.group === "Emotional") || [];
|
|
286
|
+
T(vt), Te(vt?.map(() => !0)), W(Ce.filter((N) => N.group === "Emotional"));
|
|
287
|
+
const pt = ye.filter((N) => N.group === "Social Relationship") || [];
|
|
288
|
+
w(pt), Fe(pt?.map(() => !0)), u(Ce.filter((N) => N.group === "Social Relationship"));
|
|
289
|
+
const gt = ye.filter((N) => N.group === "Spiritual") || [];
|
|
290
|
+
oe(gt), p(gt?.map(() => !0)), J(Ce.filter((N) => N.group === "Spiritual"));
|
|
291
|
+
const ft = ye.filter((N) => N.group === "Environmental") || [];
|
|
292
|
+
K(ft), O(ft?.map(() => !0)), le(Ce.filter((N) => N.group === "Environmental"));
|
|
293
|
+
const wt = ye.filter((N) => N.group === "Intellectual") || [];
|
|
294
|
+
ce(wt), R(wt?.map(() => !0)), ge(Ce.filter((N) => N.group === "Intellectual")), de(a.data.overViewQuestionLastMonth);
|
|
295
|
+
}
|
|
296
|
+
const D = await gn({
|
|
297
|
+
...E,
|
|
298
|
+
roles: Ye,
|
|
299
|
+
language: dt
|
|
300
|
+
});
|
|
301
|
+
D && D?.data && (ke({
|
|
302
|
+
totalConversation: D.data?.totalConversation || 0,
|
|
303
|
+
totalEngagement: D.data?.totalEngagement || 0,
|
|
304
|
+
totalWellbeing: D.data?.totalWellbeing || 0,
|
|
305
|
+
totalWithoutCheckIn: D.data?.totalWithoutCheckIn || 0
|
|
306
|
+
}), Pe(D.data?.educatorsWithoutCheckIn || []));
|
|
307
|
+
const B = await fn({
|
|
308
|
+
...E,
|
|
309
|
+
roles: Ye
|
|
310
|
+
});
|
|
311
|
+
B && B?.data && nt(B.data);
|
|
312
|
+
} catch (a) {
|
|
313
|
+
r(
|
|
314
|
+
V({
|
|
315
|
+
type: "danger",
|
|
316
|
+
message: a.response?.data?.title || a.message
|
|
317
|
+
})
|
|
318
|
+
);
|
|
319
|
+
}
|
|
320
|
+
r(_e(!1));
|
|
321
|
+
}, jt = async () => {
|
|
322
|
+
try {
|
|
323
|
+
const a = await wn({
|
|
324
|
+
...E,
|
|
325
|
+
...Ne,
|
|
326
|
+
roles: Ye
|
|
327
|
+
});
|
|
328
|
+
a && a?.data && et(a.data);
|
|
329
|
+
} catch (a) {
|
|
330
|
+
r(
|
|
331
|
+
V({
|
|
332
|
+
type: "danger",
|
|
333
|
+
message: a.message
|
|
334
|
+
})
|
|
335
|
+
);
|
|
336
|
+
}
|
|
337
|
+
}, Ut = (a, D) => {
|
|
338
|
+
switch (D) {
|
|
339
|
+
case "Physical Well-Being":
|
|
340
|
+
const B = [...g];
|
|
341
|
+
B[a] = !B[a], e(B);
|
|
342
|
+
break;
|
|
343
|
+
case "Emotional Well-Being":
|
|
344
|
+
const ie = [...ne];
|
|
345
|
+
ie[a] = !ie[a], Te(ie);
|
|
346
|
+
break;
|
|
347
|
+
case "Relationships Well-Being":
|
|
348
|
+
const xe = [...fe];
|
|
349
|
+
xe[a] = !xe[a], Fe(xe);
|
|
350
|
+
break;
|
|
351
|
+
case "Spiritual Well-Being":
|
|
352
|
+
const Be = [...L];
|
|
353
|
+
Be[a] = !Be[a], p(Be);
|
|
354
|
+
break;
|
|
355
|
+
case "Environment Well-Being":
|
|
356
|
+
const ye = [...Z];
|
|
357
|
+
ye[a] = !ye[a], O(ye);
|
|
358
|
+
break;
|
|
359
|
+
case "Intellectual Well-Being":
|
|
360
|
+
const Ce = [...y];
|
|
361
|
+
Ce[a] = !Ce[a], R(Ce);
|
|
362
|
+
break;
|
|
363
|
+
}
|
|
364
|
+
}, Gt = async (a) => {
|
|
365
|
+
r(_e(!0));
|
|
366
|
+
try {
|
|
367
|
+
const D = await bn(a.userId);
|
|
368
|
+
D && D?.data && r(
|
|
369
|
+
V({
|
|
370
|
+
type: "success",
|
|
371
|
+
message: "Send request successfully!"
|
|
372
|
+
})
|
|
373
|
+
);
|
|
374
|
+
} catch (D) {
|
|
375
|
+
r(
|
|
376
|
+
V({
|
|
377
|
+
type: "danger",
|
|
378
|
+
message: D.response?.data?.title || D.message
|
|
379
|
+
})
|
|
380
|
+
);
|
|
381
|
+
}
|
|
382
|
+
r(_e(!1));
|
|
383
|
+
}, Vt = async (a, D) => {
|
|
384
|
+
r(_e(!0));
|
|
385
|
+
try {
|
|
386
|
+
const B = ze.map((xe) => xe.userId), ie = await yn({ userIds: B, subject: a, message: D });
|
|
387
|
+
ie && ie?.data && (_t(), r(
|
|
388
|
+
V({
|
|
389
|
+
type: "success",
|
|
390
|
+
message: "Send bulk request successfully!"
|
|
391
|
+
})
|
|
392
|
+
));
|
|
393
|
+
} catch (B) {
|
|
394
|
+
r(
|
|
395
|
+
V({
|
|
396
|
+
type: "danger",
|
|
397
|
+
message: B.response?.data?.title || B.message
|
|
398
|
+
})
|
|
399
|
+
);
|
|
400
|
+
}
|
|
401
|
+
r(_e(!1));
|
|
402
|
+
}, Jt = (a) => {
|
|
403
|
+
Xe({
|
|
404
|
+
...Ne,
|
|
405
|
+
sortOrder: Ne.sortOrder === "ASC" || Ne.sortBy != a ? "DESC" : "ASC",
|
|
406
|
+
sortBy: a
|
|
407
|
+
});
|
|
408
|
+
}, Kt = () => {
|
|
409
|
+
f(`/admin/open-field-question-wellbeing?startTime=${E.startDate}&endTime=${E.endDate}`);
|
|
410
|
+
}, ht = async () => {
|
|
411
|
+
try {
|
|
412
|
+
const D = await Fn({
|
|
413
|
+
pageSize: -1,
|
|
414
|
+
currentPage: 1
|
|
415
|
+
});
|
|
416
|
+
if (D.data.items.length > 0) {
|
|
417
|
+
const B = D.data.items.find((ie) => ie.isCurrent);
|
|
418
|
+
B && je({
|
|
419
|
+
startDate: $e(B.startTime).startOf("day").valueOf(),
|
|
420
|
+
endDate: $e(B.endTime).endOf("day").valueOf(),
|
|
421
|
+
optionDate: ""
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
} catch (a) {
|
|
425
|
+
r(
|
|
426
|
+
V({
|
|
427
|
+
type: "danger",
|
|
428
|
+
message: a.response?.data?.title || a.message
|
|
429
|
+
})
|
|
430
|
+
);
|
|
431
|
+
}
|
|
432
|
+
};
|
|
433
|
+
return Ee(() => {
|
|
434
|
+
n && Yt();
|
|
435
|
+
}, [E, n]), Ee(() => {
|
|
436
|
+
n && jt();
|
|
437
|
+
}, [E, Ne, n]), Ee(() => {
|
|
438
|
+
(async () => {
|
|
439
|
+
const D = localStorage.getItem(rt);
|
|
440
|
+
if (D) {
|
|
441
|
+
try {
|
|
442
|
+
const B = JSON.parse(D);
|
|
443
|
+
re(B);
|
|
444
|
+
} catch (B) {
|
|
445
|
+
console.warn("Error parse filter from storage", B), re(lt);
|
|
446
|
+
}
|
|
447
|
+
b(!0);
|
|
448
|
+
} else
|
|
449
|
+
re(lt), await ht(), b(!0);
|
|
450
|
+
})();
|
|
451
|
+
}, []), {
|
|
452
|
+
physical: k,
|
|
453
|
+
physicalWeekly: s,
|
|
454
|
+
relationships: v,
|
|
455
|
+
relationshipsWeekly: x,
|
|
456
|
+
emotional: I,
|
|
457
|
+
emotionalWeekly: A,
|
|
458
|
+
selfCare: Y,
|
|
459
|
+
selfCareWeekly: G,
|
|
460
|
+
environment: te,
|
|
461
|
+
environmentWeekly: q,
|
|
462
|
+
intellectual: se,
|
|
463
|
+
intellectualWeekly: pe,
|
|
464
|
+
filters: E,
|
|
465
|
+
setFilters: re,
|
|
466
|
+
onClearFilter: Rt,
|
|
467
|
+
onSaveFilter: Ht,
|
|
468
|
+
handleChangeStartDateChart: zt,
|
|
469
|
+
handleChangeEndDateChart: Bt,
|
|
470
|
+
handleChangeFilterCalendar: qt,
|
|
471
|
+
handleHoverTooltip: Et,
|
|
472
|
+
avgQuestionLastMonth: P,
|
|
473
|
+
dayOfWeek: M,
|
|
474
|
+
months: De,
|
|
475
|
+
weeks: X,
|
|
476
|
+
classFontSize: $t,
|
|
477
|
+
activeColumnPhysical: g,
|
|
478
|
+
activeColumnEmotional: ne,
|
|
479
|
+
activeColumnEnvironment: Z,
|
|
480
|
+
activeColumnIntellectual: y,
|
|
481
|
+
activeColumnRelationships: fe,
|
|
482
|
+
activeColumnSelfCare: L,
|
|
483
|
+
setActiveColumnPhysical: e,
|
|
484
|
+
handleActiveColumn: Ut,
|
|
485
|
+
id_export: At,
|
|
486
|
+
openPopoverExport: mt,
|
|
487
|
+
handleClick: Tt,
|
|
488
|
+
handleClose: Mt,
|
|
489
|
+
anchorEl: H,
|
|
490
|
+
selectedToPrint: S,
|
|
491
|
+
toggle: Lt,
|
|
492
|
+
modal: F,
|
|
493
|
+
activeTab: Q,
|
|
494
|
+
setActiveTab: U,
|
|
495
|
+
openEducatorWithoutCheckIns: Ke,
|
|
496
|
+
educatorWithoutCheckIns: ze,
|
|
497
|
+
handleCloseModalEducator: _t,
|
|
498
|
+
handleOpenModalEducator: Qt,
|
|
499
|
+
onSendBulkRequest: Vt,
|
|
500
|
+
onSendRequest: Gt,
|
|
501
|
+
totalStatic: Je,
|
|
502
|
+
handleChangeQuestionFilter: Jt,
|
|
503
|
+
handleRedirectAllAnswer: Kt,
|
|
504
|
+
openFieldQuestions: Ze,
|
|
505
|
+
questionFilters: Ne,
|
|
506
|
+
percentDoneBySection: tt,
|
|
507
|
+
schoolName: It,
|
|
508
|
+
handleSelectToPrint: Pt,
|
|
509
|
+
timeChart: He,
|
|
510
|
+
setTimeChart: Qe,
|
|
511
|
+
dayOfMonth: $
|
|
512
|
+
};
|
|
513
|
+
}, Gn = {
|
|
514
|
+
physical: "physical",
|
|
515
|
+
emotional: "emotional",
|
|
516
|
+
environmental: "environment",
|
|
517
|
+
environment: "environment",
|
|
518
|
+
intellectual: "intellectual",
|
|
519
|
+
"social relationship": "relationships",
|
|
520
|
+
"social relationships": "relationships",
|
|
521
|
+
relationship: "relationships",
|
|
522
|
+
relationships: "relationships",
|
|
523
|
+
spiritual: "spiritual",
|
|
524
|
+
"self-care": "spiritual",
|
|
525
|
+
"self care": "spiritual"
|
|
526
|
+
}, Vn = (r) => {
|
|
527
|
+
const f = (r ?? "").trim().toLowerCase().replace(/_/g, " ").replace(/\s+/g, " ");
|
|
528
|
+
return Gn[f];
|
|
529
|
+
}, Jn = (r, f, k, _) => {
|
|
530
|
+
const s = ct(), { t: h } = we(), [v, w] = d([]), [x, u] = d(null), [I, T] = d(null), [A, W] = d(""), [Y, oe] = d(""), [G, J] = d([]), [te, K] = d(!1), q = () => K(!0), le = () => K(!1), se = Se(() => !x?.value || !A || !Y.trim(), [Y, A, x?.value]), ce = Se(() => (v || []).filter((c) => Number(c?.id) !== 0 && !!c?.text).map((c) => ({
|
|
531
|
+
value: Number(c.id),
|
|
532
|
+
label: c.sectionName ? `${c.sectionName}: ${c.text}` : c.text
|
|
533
|
+
})), [v]), pe = Se(() => [
|
|
534
|
+
{ label: h("physical"), value: 1 },
|
|
535
|
+
{ label: h("relationships"), value: 4 },
|
|
536
|
+
{ label: h("emotional"), value: 2 },
|
|
537
|
+
{ label: h("intellectual"), value: 6 },
|
|
538
|
+
{ label: h("environmental"), value: 5 },
|
|
539
|
+
{ label: h("spiritual"), value: 3 }
|
|
540
|
+
], [h]), ge = () => {
|
|
541
|
+
u(null), W(""), oe("");
|
|
542
|
+
}, E = async () => {
|
|
543
|
+
try {
|
|
544
|
+
const c = await kn({
|
|
545
|
+
startTime: k ?? null,
|
|
546
|
+
endTime: _ ?? null
|
|
547
|
+
});
|
|
548
|
+
J(c.data ?? []);
|
|
549
|
+
} catch (c) {
|
|
550
|
+
s(
|
|
551
|
+
V({
|
|
552
|
+
type: "danger",
|
|
553
|
+
message: c.response?.data?.title || c.message
|
|
554
|
+
})
|
|
555
|
+
);
|
|
556
|
+
}
|
|
557
|
+
};
|
|
558
|
+
Ee(() => {
|
|
559
|
+
E();
|
|
560
|
+
}, [k, _]), Ee(() => {
|
|
561
|
+
if (!r) return;
|
|
562
|
+
(async () => {
|
|
563
|
+
s(_e(!0));
|
|
564
|
+
try {
|
|
565
|
+
const $ = await Nn();
|
|
566
|
+
w($.data ?? []);
|
|
567
|
+
} catch ($) {
|
|
568
|
+
s(
|
|
569
|
+
V({
|
|
570
|
+
type: "danger",
|
|
571
|
+
message: $.response?.data?.title || $.message
|
|
572
|
+
})
|
|
573
|
+
);
|
|
574
|
+
} finally {
|
|
575
|
+
s(_e(!1));
|
|
576
|
+
}
|
|
577
|
+
})(), ge();
|
|
578
|
+
}, [r]);
|
|
579
|
+
const re = async () => {
|
|
580
|
+
const c = Y.trim();
|
|
581
|
+
if (!x?.value) {
|
|
582
|
+
s(V({ type: "danger", message: "Select area is required" }));
|
|
583
|
+
return;
|
|
584
|
+
}
|
|
585
|
+
if (!A) {
|
|
586
|
+
s(V({ type: "danger", message: "Intervention date is required" }));
|
|
587
|
+
return;
|
|
588
|
+
}
|
|
589
|
+
if (!c) {
|
|
590
|
+
s(V({ type: "danger", message: "Action description is required" }));
|
|
591
|
+
return;
|
|
592
|
+
}
|
|
593
|
+
s(_e(!0));
|
|
594
|
+
try {
|
|
595
|
+
const $ = $e(A).startOf("day").valueOf();
|
|
596
|
+
await Sn({
|
|
597
|
+
questionId: x.value,
|
|
598
|
+
interventionDate: $,
|
|
599
|
+
actionDescription: c
|
|
600
|
+
}), s(V({ type: "success", message: "Log intervention successfully" })), f(), E();
|
|
601
|
+
} catch ($) {
|
|
602
|
+
s(
|
|
603
|
+
V({
|
|
604
|
+
type: "danger",
|
|
605
|
+
message: $.response?.data?.title || $.message
|
|
606
|
+
})
|
|
607
|
+
);
|
|
608
|
+
} finally {
|
|
609
|
+
s(_e(!1));
|
|
610
|
+
}
|
|
611
|
+
}, P = tn(async (c) => {
|
|
612
|
+
s(_e(!0));
|
|
613
|
+
try {
|
|
614
|
+
return await Cn(c), s(
|
|
615
|
+
V({
|
|
616
|
+
type: "success",
|
|
617
|
+
message: "Check-in sent successfully to all teachers!"
|
|
618
|
+
})
|
|
619
|
+
), !0;
|
|
620
|
+
} catch ($) {
|
|
621
|
+
return s(
|
|
622
|
+
V({
|
|
623
|
+
type: "danger",
|
|
624
|
+
message: $.response?.data?.title || $.message
|
|
625
|
+
})
|
|
626
|
+
), !1;
|
|
627
|
+
} finally {
|
|
628
|
+
s(_e(!1));
|
|
629
|
+
}
|
|
630
|
+
}, []), de = Se(() => {
|
|
631
|
+
const c = {
|
|
632
|
+
physical: [],
|
|
633
|
+
relationships: [],
|
|
634
|
+
emotional: [],
|
|
635
|
+
spiritual: [],
|
|
636
|
+
environment: [],
|
|
637
|
+
intellectual: []
|
|
638
|
+
};
|
|
639
|
+
for (const $ of G ?? []) {
|
|
640
|
+
const ue = Vn($?.sectionName);
|
|
641
|
+
ue && c[ue].push($);
|
|
642
|
+
}
|
|
643
|
+
return c;
|
|
644
|
+
}, [G]), M = Se(() => {
|
|
645
|
+
if (!I) return de;
|
|
646
|
+
const c = {
|
|
647
|
+
physical: [],
|
|
648
|
+
relationships: [],
|
|
649
|
+
emotional: [],
|
|
650
|
+
spiritual: [],
|
|
651
|
+
environment: [],
|
|
652
|
+
intellectual: []
|
|
653
|
+
};
|
|
654
|
+
return Object.entries(de).forEach(([$, ue]) => {
|
|
655
|
+
c[$] = ue.filter(
|
|
656
|
+
(De) => De.wellBeingSectionId === I.value
|
|
657
|
+
);
|
|
658
|
+
}), c;
|
|
659
|
+
}, [de, I]);
|
|
660
|
+
return {
|
|
661
|
+
areaOptions: ce,
|
|
662
|
+
selectedArea: x,
|
|
663
|
+
setSelectedArea: u,
|
|
664
|
+
overviewAreaOptions: pe,
|
|
665
|
+
selectedOverviewArea: I,
|
|
666
|
+
setSelectedOverviewArea: T,
|
|
667
|
+
interventionDate: A,
|
|
668
|
+
setInterventionDate: W,
|
|
669
|
+
actionDescription: Y,
|
|
670
|
+
setActionDescription: oe,
|
|
671
|
+
isSubmitDisabled: se,
|
|
672
|
+
onSubmit: re,
|
|
673
|
+
interventionLogs: G,
|
|
674
|
+
interventionLogsByTab: de,
|
|
675
|
+
filteredInterventionLogsByTab: M,
|
|
676
|
+
openOverview: te,
|
|
677
|
+
handleOpenOverview: q,
|
|
678
|
+
handleCloseOverview: le,
|
|
679
|
+
handleSendCheckInNow: P
|
|
680
|
+
};
|
|
681
|
+
}, Kn = ({
|
|
682
|
+
optionDate: r,
|
|
683
|
+
onChangeFilterCalendar: f,
|
|
684
|
+
endDate: k,
|
|
685
|
+
startDate: _,
|
|
686
|
+
onChangeEndDateChart: s,
|
|
687
|
+
onChangeStartDateChart: h,
|
|
688
|
+
fontSizeInputSelect: v,
|
|
689
|
+
onSaveFilter: w,
|
|
690
|
+
onClearFilter: x
|
|
691
|
+
}) => {
|
|
692
|
+
const { t: u } = we();
|
|
693
|
+
return /* @__PURE__ */ t(j, { className: `${m["plp-filter-desktop"]}`, children: /* @__PURE__ */ l(j, { className: `${m["filter-box"]}`, children: [
|
|
694
|
+
/* @__PURE__ */ t(j, { className: `${m["filter-item"]}`, children: /* @__PURE__ */ t(
|
|
695
|
+
dn,
|
|
696
|
+
{
|
|
697
|
+
options: sn,
|
|
698
|
+
value: r,
|
|
699
|
+
onChange: f,
|
|
700
|
+
customClassName: "calendar-select-wellbeing"
|
|
701
|
+
}
|
|
702
|
+
) }),
|
|
703
|
+
/* @__PURE__ */ t(j, { className: `${m["filter-item"]}`, children: /* @__PURE__ */ t(
|
|
704
|
+
xn,
|
|
705
|
+
{
|
|
706
|
+
endDate: k,
|
|
707
|
+
startDate: _,
|
|
708
|
+
onChangeEndDate: s,
|
|
709
|
+
onChangeStartDate: h,
|
|
710
|
+
fontSizeInputSelect: v
|
|
711
|
+
}
|
|
712
|
+
) }),
|
|
713
|
+
/* @__PURE__ */ t(
|
|
714
|
+
Le,
|
|
715
|
+
{
|
|
716
|
+
className: `${m["save-filter"]}`,
|
|
717
|
+
onClick: () => w(),
|
|
718
|
+
children: /* @__PURE__ */ t(ae, { className: `${m["save-filter-title"]}`, children: u("save_filters") })
|
|
719
|
+
}
|
|
720
|
+
),
|
|
721
|
+
/* @__PURE__ */ t(
|
|
722
|
+
Le,
|
|
723
|
+
{
|
|
724
|
+
className: `${m["clear-filter"]}`,
|
|
725
|
+
onClick: () => x(),
|
|
726
|
+
children: /* @__PURE__ */ l(j, { className: `${m["clear-filter-content"]}`, children: [
|
|
727
|
+
/* @__PURE__ */ t(On, { className: `${m["clear-filter-icon"]}` }),
|
|
728
|
+
/* @__PURE__ */ t(
|
|
729
|
+
ae,
|
|
730
|
+
{
|
|
731
|
+
className: `${m["clear-filter-text"]}`,
|
|
732
|
+
children: u("clear_all_filters")
|
|
733
|
+
}
|
|
734
|
+
)
|
|
735
|
+
] })
|
|
736
|
+
}
|
|
737
|
+
)
|
|
738
|
+
] }) });
|
|
739
|
+
}, Xn = ({
|
|
740
|
+
handleRedirectAllAnswer: r,
|
|
741
|
+
openFieldQuestions: f,
|
|
742
|
+
handleChangeQuestionFilter: k,
|
|
743
|
+
questionFilters: _
|
|
744
|
+
}) => {
|
|
745
|
+
const { t: s } = we();
|
|
746
|
+
return /* @__PURE__ */ l(j, { children: [
|
|
747
|
+
/* @__PURE__ */ l(j, { className: `${m.explain}`, children: [
|
|
748
|
+
/* @__PURE__ */ t(
|
|
749
|
+
"img",
|
|
750
|
+
{
|
|
751
|
+
src: xt,
|
|
752
|
+
alt: "",
|
|
753
|
+
className: `${m["explain-icon"]}`
|
|
754
|
+
}
|
|
755
|
+
),
|
|
756
|
+
/* @__PURE__ */ t(ae, { className: `${m["explain-text"]}`, children: s("the_data_presented_here_comes_from_the_check_ins") })
|
|
757
|
+
] }),
|
|
758
|
+
/* @__PURE__ */ l(
|
|
759
|
+
j,
|
|
760
|
+
{
|
|
761
|
+
className: `${m["plp-box-chart"]} ${m["box-chart-container"]}`,
|
|
762
|
+
children: [
|
|
763
|
+
/* @__PURE__ */ t(ae, { className: `${m["title-chart"]}`, children: s("open_field_questions") }),
|
|
764
|
+
/* @__PURE__ */ t(
|
|
765
|
+
ae,
|
|
766
|
+
{
|
|
767
|
+
className: m["description-chart-distribution-stress"],
|
|
768
|
+
children: s(
|
|
769
|
+
"these_are_the_last_5_comments_from_recent_check_ins_filtered_by_the_selected_criteria_above"
|
|
770
|
+
)
|
|
771
|
+
}
|
|
772
|
+
),
|
|
773
|
+
/* @__PURE__ */ l(j, { className: "d-flex align-items-center", children: [
|
|
774
|
+
/* @__PURE__ */ l(j, { className: "d-flex align-items-center", children: [
|
|
775
|
+
/* @__PURE__ */ l(ae, { className: `${m["total-text"]}`, children: [
|
|
776
|
+
s("total_of_questions"),
|
|
777
|
+
":"
|
|
778
|
+
] }),
|
|
779
|
+
/* @__PURE__ */ t(ae, { className: `${m["total-value"]}`, children: f?.totalItems ?? 0 })
|
|
780
|
+
] }),
|
|
781
|
+
/* @__PURE__ */ l(
|
|
782
|
+
j,
|
|
783
|
+
{
|
|
784
|
+
onClick: () => r(),
|
|
785
|
+
className: `d-flex align-items-center ${m["view-response-action"]}`,
|
|
786
|
+
children: [
|
|
787
|
+
/* @__PURE__ */ t(ae, { className: `${m["action-text"]}`, children: s("view_all_responses") }),
|
|
788
|
+
/* @__PURE__ */ t(Wn, {})
|
|
789
|
+
]
|
|
790
|
+
}
|
|
791
|
+
)
|
|
792
|
+
] }),
|
|
793
|
+
/* @__PURE__ */ t(
|
|
794
|
+
_n,
|
|
795
|
+
{
|
|
796
|
+
items: f?.items || [],
|
|
797
|
+
onOder: k,
|
|
798
|
+
filter: _
|
|
799
|
+
}
|
|
800
|
+
)
|
|
801
|
+
]
|
|
802
|
+
}
|
|
803
|
+
)
|
|
804
|
+
] });
|
|
805
|
+
}, Zn = "/images/horizontal-logo-blue.svg", ei = (r) => {
|
|
806
|
+
const {
|
|
807
|
+
startTime: f,
|
|
808
|
+
endTime: k,
|
|
809
|
+
selectedToPDF: _,
|
|
810
|
+
avgQuestionLastMonth: s,
|
|
811
|
+
dayOfWeek: h,
|
|
812
|
+
months: v,
|
|
813
|
+
weeks: w,
|
|
814
|
+
schoolName: x,
|
|
815
|
+
physical: u,
|
|
816
|
+
physicalWeekly: I,
|
|
817
|
+
relationships: T,
|
|
818
|
+
relationshipsWeekly: A,
|
|
819
|
+
emotional: W,
|
|
820
|
+
emotionalWeekly: Y,
|
|
821
|
+
selfCare: oe,
|
|
822
|
+
selfCareWeekly: G,
|
|
823
|
+
environment: J,
|
|
824
|
+
environmentWeekly: te,
|
|
825
|
+
intellectual: K,
|
|
826
|
+
intellectualWeekly: q,
|
|
827
|
+
activeColumnPhysical: le,
|
|
828
|
+
activeColumnEmotional: se,
|
|
829
|
+
activeColumnEnvironment: ce,
|
|
830
|
+
activeColumnIntellectual: pe,
|
|
831
|
+
activeColumnRelationships: ge,
|
|
832
|
+
activeColumnSelfCare: E,
|
|
833
|
+
optionDate: re,
|
|
834
|
+
percentDoneBySection: P,
|
|
835
|
+
onClose: de
|
|
836
|
+
} = r, M = re || "Monthly", { t: c } = we(), $ = ct(), ue = (ve, X, i) => {
|
|
837
|
+
var n = document.createElement("span");
|
|
838
|
+
n.style.visibility = "hidden", n.style.position = "absolute", n.style.whiteSpace = "nowrap", n.style.fontSize = X, n.style.fontWeight = i, n.innerHTML = ve, document.body.appendChild(n);
|
|
839
|
+
var b = n.offsetWidth;
|
|
840
|
+
return document.body.removeChild(n), b;
|
|
841
|
+
}, De = async () => {
|
|
842
|
+
$(_e(!0)), await new Promise((e) => setTimeout(e, 100));
|
|
843
|
+
try {
|
|
844
|
+
const e = new Bn({
|
|
845
|
+
orientation: "p",
|
|
846
|
+
unit: "px",
|
|
847
|
+
format: "a4"
|
|
848
|
+
});
|
|
849
|
+
var ve = e.internal.pageSize.width, X = e.internal.pageSize.height;
|
|
850
|
+
const fe = 200, Fe = e.splitTextToSize(
|
|
851
|
+
x,
|
|
852
|
+
120
|
|
853
|
+
);
|
|
854
|
+
let ne = 0;
|
|
855
|
+
const Te = x.length <= 18 ? ue(x, "18px", "bold") : ue(Fe.join(""), "18px", "bold"), L = async () => {
|
|
856
|
+
const p = document.getElementById("header-logo"), Z = await Oe(
|
|
857
|
+
p
|
|
858
|
+
);
|
|
859
|
+
e.addImage(
|
|
860
|
+
Z.toDataURL("image/png", 1),
|
|
861
|
+
"png",
|
|
862
|
+
10,
|
|
863
|
+
20,
|
|
864
|
+
90,
|
|
865
|
+
25
|
|
866
|
+
), e.setFontSize(18), e.setFont("Helvetica", "normal", "bold"), e.text(
|
|
867
|
+
x.length <= 18 ? x : `${Fe[0]}...`,
|
|
868
|
+
(ve - Te) / 2 + 15,
|
|
869
|
+
40
|
|
870
|
+
), e.setFontSize(10), e.setFont("Helvetica", "italic", "normal"), e.text(
|
|
871
|
+
`From: ${$e(f).format("DD/MM/YYYY")}`,
|
|
872
|
+
310,
|
|
873
|
+
40
|
|
874
|
+
), e.text(`To: ${$e(k).format("DD/MM/YYYY")}`, 380, 40), e.setDrawColor(128, 128, 128), e.line(0, 50, ve, 50), e.setLineWidth(0.1);
|
|
875
|
+
};
|
|
876
|
+
var i = 85, n = 20;
|
|
877
|
+
if (_.includes("physical_well_being")) {
|
|
878
|
+
await L(), e.setFontSize(14), e.setFont("Helvetica", "normal", "bold"), e.text(c("physical_well_being"), n, i), i += 40;
|
|
879
|
+
const p = document.getElementById("physical_well_being_id"), Z = await Oe(p);
|
|
880
|
+
let O = i;
|
|
881
|
+
e.setFontSize(8);
|
|
882
|
+
const y = M === "Monthly" ? u : I, R = M === "Monthly" ? v : w, H = y.map((C) => C.name);
|
|
883
|
+
if (y?.length && P.physical >= 20)
|
|
884
|
+
for (var b = 0; b < R.length; b++) {
|
|
885
|
+
let C = i;
|
|
886
|
+
e.setFontSize(12), e.setFont("Helvetica", "normal", "bold"), e.text(R[b], n, C), e.setFontSize(8);
|
|
887
|
+
for (var g = 0; g < y?.length; g++) {
|
|
888
|
+
const S = y[g].data[b];
|
|
889
|
+
if (S != 0) {
|
|
890
|
+
const me = H[g];
|
|
891
|
+
me != "" && (e.setDrawColor(0), e.setFillColor(he[g]), e.roundedRect(n, C + 5, 5, 5, 1, 1, "F"), e.setFont("Helvetica", "normal", "bold"), e.text(`${Ae(me)}:`, n + 8, C + 10), e.setFont("Helvetica", "normal", "normal"), e.text(`${S?.toFixed(2)}%`, n + me?.length * 2.6 + 20.5, C + 10)), C += 10, C > O && (O = C);
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
n += 100, n + 105 > ve && (n = 20, i = O + 20), i + 150 > X && (e.addPage(), await L(), i = 80, n = 20);
|
|
895
|
+
}
|
|
896
|
+
n = 20, i += H.length * 10;
|
|
897
|
+
const z = 420, F = p && p.clientWidth ? z * p.clientHeight / p.clientWidth : fe;
|
|
898
|
+
i + F + 20 > X && (e.addPage(), await L(), i = 80, n = 20, e.setFontSize(14), e.setFont("Helvetica", "normal", "bold"), e.text(c("physical_well_being"), n, i), i += 10), e.addImage(
|
|
899
|
+
Z.toDataURL("image/png"),
|
|
900
|
+
10,
|
|
901
|
+
i + 20,
|
|
902
|
+
z,
|
|
903
|
+
F
|
|
904
|
+
), ne++, ne < _.length && (e.addPage(), i = 80, n = 20);
|
|
905
|
+
}
|
|
906
|
+
if (_.includes("relationships_well_being")) {
|
|
907
|
+
await L(), e.setFontSize(14), e.setFont("Helvetica", "normal", "bold"), e.text(c("relationships_well_being"), n, i), i += 40;
|
|
908
|
+
const p = document.getElementById("relationships_well_being_id"), Z = await Oe(p);
|
|
909
|
+
let O = i;
|
|
910
|
+
e.setFontSize(8);
|
|
911
|
+
const y = M === "Monthly" ? T : A, R = y.map((F) => F.name);
|
|
912
|
+
if (y?.length && P.relationships >= 20) {
|
|
913
|
+
let F = 0;
|
|
914
|
+
for (var b = 0; b < v.length; b++) {
|
|
915
|
+
let S = i;
|
|
916
|
+
e.setFontSize(12), e.setFont("Helvetica", "normal", "bold"), e.text(v[b], n, S), e.setFontSize(8);
|
|
917
|
+
for (var g = 0; g < y?.length; g++) {
|
|
918
|
+
const Q = y[g].data[b];
|
|
919
|
+
if (Q != 0) {
|
|
920
|
+
const U = R[g];
|
|
921
|
+
U != "" && (e.setDrawColor(0), e.setFillColor(he[g]), e.roundedRect(n, S + 5, 5, 5, 1, 1, "F"), e.setFont("Helvetica", "normal", "bold"), e.text(`${Ae(U)}:`, n + 8, S + 10), e.setFont("Helvetica", "normal", "normal"), e.text(`${Q?.toFixed(2)}%`, n + U?.length * 2.6 + 20.5, S + 10)), S += 10, S > O && (O = S);
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
n += 200, F++, F === 2 && (n = 20, i = O + 20, F = 0), i + 150 > X && (e.addPage(), await L(), i = 80, n = 20);
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
n = 20, i += R.length * 10;
|
|
928
|
+
const H = 420, z = p && p.clientWidth ? H * p.clientHeight / p.clientWidth : fe;
|
|
929
|
+
i + z + 20 > X && (e.addPage(), await L(), i = 80, n = 20, e.setFontSize(14), e.setFont("Helvetica", "normal", "bold"), e.text(c("relationships_well_being"), n, i), i += 10), e.addImage(
|
|
930
|
+
Z.toDataURL("image/png"),
|
|
931
|
+
10,
|
|
932
|
+
i + 20,
|
|
933
|
+
H,
|
|
934
|
+
z
|
|
935
|
+
), ne++, ne < _.length && (e.addPage(), i = 80, n = 20);
|
|
936
|
+
}
|
|
937
|
+
if (_.includes("emotional_well_being")) {
|
|
938
|
+
await L(), e.setFontSize(14), e.setFont("Helvetica", "normal", "bold"), e.text(c("emotional_well_being"), n, i), i += 40;
|
|
939
|
+
const p = document.getElementById("emotional_well_being_id"), Z = await Oe(p);
|
|
940
|
+
let O = i;
|
|
941
|
+
e.setFontSize(8);
|
|
942
|
+
const y = M === "Monthly" ? W : Y, R = y.map((F) => F.name);
|
|
943
|
+
if (y?.length && P.emotional >= 20)
|
|
944
|
+
for (var b = 0; b < v.length; b++) {
|
|
945
|
+
let C = i;
|
|
946
|
+
e.setFontSize(12), e.setFont("Helvetica", "normal", "bold"), e.text(v[b], n, C), e.setFontSize(8);
|
|
947
|
+
for (var g = 0; g < y?.length; g++) {
|
|
948
|
+
const me = y[g].data[b];
|
|
949
|
+
if (me != 0) {
|
|
950
|
+
const Q = R[g];
|
|
951
|
+
Q != "" && (e.setDrawColor(0), e.setFillColor(he[g]), e.roundedRect(n, C + 5, 5, 5, 1, 1, "F"), e.setFont("Helvetica", "normal", "bold"), e.text(`${Ae(Q)}:`, n + 8, C + 10), e.setFont("Helvetica", "normal", "normal"), e.text(`${me?.toFixed(2)}%`, n + Q?.length * 2.6 + 20.5, C + 10)), C += 10, C > O && (O = C);
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
n += 100, n + 105 > ve && (n = 20, i = O + 20), i + 150 > X && (e.addPage(), await L(), i = 80, n = 20);
|
|
955
|
+
}
|
|
956
|
+
n = 20, i += R.length * 10;
|
|
957
|
+
const H = 420, z = p && p.clientWidth ? H * p.clientHeight / p.clientWidth : fe;
|
|
958
|
+
i + z + 20 > X && (e.addPage(), await L(), i = 80, n = 20, e.setFontSize(14), e.setFont("Helvetica", "normal", "bold"), e.text(c("emotional_well_being"), n, i), i += 10), e.addImage(
|
|
959
|
+
Z.toDataURL("image/png"),
|
|
960
|
+
10,
|
|
961
|
+
i + 20,
|
|
962
|
+
H,
|
|
963
|
+
z
|
|
964
|
+
), ne++, ne < _.length && (e.addPage(), i = 80, n = 20);
|
|
965
|
+
}
|
|
966
|
+
if (_.includes("self_care_well_being")) {
|
|
967
|
+
await L(), e.setFontSize(14), e.setFont("Helvetica", "normal", "bold"), e.text(c("self_care_well_being"), n, i), i += 40;
|
|
968
|
+
const p = document.getElementById("self_care_well_being_id"), Z = await Oe(p);
|
|
969
|
+
let O = i;
|
|
970
|
+
e.setFontSize(8);
|
|
971
|
+
const y = M === "Monthly" ? oe : G, R = y.map((F) => F.name);
|
|
972
|
+
if (y?.length && P.selfCare >= 20)
|
|
973
|
+
for (var b = 0; b < v.length; b++) {
|
|
974
|
+
let C = i;
|
|
975
|
+
e.setFontSize(12), e.setFont("Helvetica", "normal", "bold"), e.text(v[b], n, C), e.setFontSize(8);
|
|
976
|
+
for (var g = 0; g < y?.length; g++) {
|
|
977
|
+
const me = y[g].data[b];
|
|
978
|
+
if (me != 0) {
|
|
979
|
+
const Q = R[g];
|
|
980
|
+
Q != "" && (e.setDrawColor(0), e.setFillColor(he[g]), e.roundedRect(n, C + 5, 5, 5, 1, 1, "F"), e.setFont("Helvetica", "normal", "bold"), e.text(`${Ae(Q)}:`, n + 8, C + 10), e.setFont("Helvetica", "normal", "normal"), e.text(`${me?.toFixed(2)}%`, n + Q?.length * 2.6 + 20.5, C + 10)), C += 10, C > O && (O = C);
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
n += 100, n + 105 > ve && (n = 20, i = O + 20), i + 150 > X && (e.addPage(), await L(), i = 80, n = 20);
|
|
984
|
+
}
|
|
985
|
+
n = 20, i += R.length * 10;
|
|
986
|
+
const H = 420, z = p && p.clientWidth ? H * p.clientHeight / p.clientWidth : fe;
|
|
987
|
+
i + z + 20 > X && (e.addPage(), await L(), i = 80, n = 20, e.setFontSize(14), e.setFont("Helvetica", "normal", "bold"), e.text(c("self_care_well_being"), n, i), i += 10), e.addImage(
|
|
988
|
+
Z.toDataURL("image/png"),
|
|
989
|
+
10,
|
|
990
|
+
i + 20,
|
|
991
|
+
H,
|
|
992
|
+
z
|
|
993
|
+
), ne++, ne < _.length && (e.addPage(), i = 80, n = 20);
|
|
994
|
+
}
|
|
995
|
+
if (_.includes("environment_well_being")) {
|
|
996
|
+
await L(), e.setFontSize(14), e.setFont("Helvetica", "normal", "bold"), e.text(c("environment_well_being"), n, i), i += 40;
|
|
997
|
+
const p = document.getElementById("environment_well_being_id"), Z = await Oe(p);
|
|
998
|
+
let O = i;
|
|
999
|
+
e.setFontSize(8);
|
|
1000
|
+
const y = M === "Monthly" ? J : te, R = y.map((F) => F.name);
|
|
1001
|
+
if (y?.length && P.environment >= 20) {
|
|
1002
|
+
let F = 0;
|
|
1003
|
+
for (var b = 0; b < v.length; b++) {
|
|
1004
|
+
let S = i;
|
|
1005
|
+
e.setFontSize(12), e.setFont("Helvetica", "normal", "bold"), e.text(v[b], n, S), e.setFontSize(8);
|
|
1006
|
+
for (var g = 0; g < y?.length; g++) {
|
|
1007
|
+
const Q = y[g].data[b];
|
|
1008
|
+
if (Q != 0) {
|
|
1009
|
+
const U = R[g];
|
|
1010
|
+
U != "" && (e.setDrawColor(0), e.setFillColor(he[g]), e.roundedRect(n, S + 5, 5, 5, 1, 1, "F"), e.setFont("Helvetica", "normal", "bold"), e.text(`${Ae(U)}:`, n + 8, S + 10), e.setFont("Helvetica", "normal", "normal"), e.text(`${Q?.toFixed(2)}%`, n + U?.length * 2.6 + 20.5, S + 10)), S += 10, S > O && (O = S);
|
|
1011
|
+
}
|
|
1012
|
+
}
|
|
1013
|
+
n += 200, F++, F === 2 && (n = 20, i = O + 20, F = 0), i + 150 > X && (e.addPage(), await L(), i = 80, n = 20);
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
n = 20, i += R.length * 10;
|
|
1017
|
+
const H = 420, z = p && p.clientWidth ? H * p.clientHeight / p.clientWidth : fe;
|
|
1018
|
+
i + z + 20 > X && (e.addPage(), await L(), i = 80, n = 20, e.setFontSize(14), e.setFont("Helvetica", "normal", "bold"), e.text(c("environment_well_being"), n, i), i += 10), e.addImage(
|
|
1019
|
+
Z.toDataURL("image/png"),
|
|
1020
|
+
10,
|
|
1021
|
+
i + 20,
|
|
1022
|
+
H,
|
|
1023
|
+
z
|
|
1024
|
+
), ne++, ne < _.length && (e.addPage(), i = 80, n = 20);
|
|
1025
|
+
}
|
|
1026
|
+
if (_.includes("intellectual_well_being")) {
|
|
1027
|
+
await L(), e.setFontSize(14), e.setFont("Helvetica", "normal", "bold"), e.text(c("intellectual_well_being"), n, i), i += 40;
|
|
1028
|
+
const p = document.getElementById("intellectual_well_being_id"), Z = await Oe(p);
|
|
1029
|
+
let O = i;
|
|
1030
|
+
e.setFontSize(8);
|
|
1031
|
+
const y = M === "Monthly" ? K : q, R = y.map((F) => F.name);
|
|
1032
|
+
if (y?.length && P.intellectual >= 20) {
|
|
1033
|
+
let F = 0;
|
|
1034
|
+
for (var b = 0; b < v.length; b++) {
|
|
1035
|
+
let S = i;
|
|
1036
|
+
e.setFontSize(12), e.setFont("Helvetica", "normal", "bold"), e.text(v[b], n, S), e.setFontSize(8);
|
|
1037
|
+
for (var g = 0; g < y?.length; g++) {
|
|
1038
|
+
const Q = y[g].data[b];
|
|
1039
|
+
if (Q != 0) {
|
|
1040
|
+
const U = R[g];
|
|
1041
|
+
U != "" && (e.setDrawColor(0), e.setFillColor(he[g]), e.roundedRect(n, S + 5, 5, 5, 1, 1, "F"), e.setFont("Helvetica", "normal", "bold"), e.text(`${Ae(U)}:`, n + 8, S + 10), e.setFont("Helvetica", "normal", "normal"), e.text(`${Q?.toFixed(2)}%`, n + U?.length * 2.6 + 20.5, S + 10)), S += 10, S > O && (O = S);
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
n += 200, F++, F === 2 && (n = 20, i = O + 20, F = 0), i + 150 > X && (e.addPage(), await L(), i = 80, n = 20);
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
n = 20, i += R.length * 10;
|
|
1048
|
+
const H = 420, z = p && p.clientWidth ? H * p.clientHeight / p.clientWidth : fe;
|
|
1049
|
+
i + z + 20 > X && (e.addPage(), await L(), i = 80, n = 20, e.setFontSize(14), e.setFont("Helvetica", "normal", "bold"), e.text(c("intellectual_well_being"), n, i), i += 10), e.addImage(
|
|
1050
|
+
Z.toDataURL("image/png"),
|
|
1051
|
+
10,
|
|
1052
|
+
i + 20,
|
|
1053
|
+
H,
|
|
1054
|
+
z
|
|
1055
|
+
), ne++, ne < _.length && (e.addPage(), i = 80, n = 20);
|
|
1056
|
+
}
|
|
1057
|
+
e.save("DashBoard-wellbeing.pdf"), $(
|
|
1058
|
+
V({
|
|
1059
|
+
type: "success",
|
|
1060
|
+
message: "Download Completed"
|
|
1061
|
+
})
|
|
1062
|
+
), de?.();
|
|
1063
|
+
} catch (e) {
|
|
1064
|
+
$(
|
|
1065
|
+
V({
|
|
1066
|
+
type: "danger",
|
|
1067
|
+
message: e.message
|
|
1068
|
+
})
|
|
1069
|
+
);
|
|
1070
|
+
}
|
|
1071
|
+
$(_e(!1));
|
|
1072
|
+
};
|
|
1073
|
+
return /* @__PURE__ */ l("div", { children: [
|
|
1074
|
+
/* @__PURE__ */ l("div", { className: `${bt["chart-to-canvas"]}`, children: [
|
|
1075
|
+
/* @__PURE__ */ t("div", { id: "physical_well_being_id", children: P.physical >= 20 ? /* @__PURE__ */ t(
|
|
1076
|
+
We,
|
|
1077
|
+
{
|
|
1078
|
+
colors: he,
|
|
1079
|
+
typeChart: "area",
|
|
1080
|
+
activeColumn: le,
|
|
1081
|
+
series: u,
|
|
1082
|
+
weeklySeries: I,
|
|
1083
|
+
months: v,
|
|
1084
|
+
dayOfWeek: h,
|
|
1085
|
+
avgQuestionLastMonth: s,
|
|
1086
|
+
weeks: w,
|
|
1087
|
+
noGradient: !0,
|
|
1088
|
+
noAvgTotal: !0,
|
|
1089
|
+
print: !0,
|
|
1090
|
+
optionDate: M,
|
|
1091
|
+
name: c("physical_well_being")
|
|
1092
|
+
}
|
|
1093
|
+
) : /* @__PURE__ */ t(Ie, { titleChart: "physical_well_being", isPrint: !0 }) }),
|
|
1094
|
+
/* @__PURE__ */ t("div", { id: "relationships_well_being_id", children: P.relationships >= 20 ? /* @__PURE__ */ t(
|
|
1095
|
+
We,
|
|
1096
|
+
{
|
|
1097
|
+
colors: he,
|
|
1098
|
+
typeChart: "area",
|
|
1099
|
+
activeColumn: ge,
|
|
1100
|
+
series: T,
|
|
1101
|
+
weeklySeries: A,
|
|
1102
|
+
months: v,
|
|
1103
|
+
dayOfWeek: h,
|
|
1104
|
+
avgQuestionLastMonth: s,
|
|
1105
|
+
weeks: w,
|
|
1106
|
+
noGradient: !0,
|
|
1107
|
+
noAvgTotal: !0,
|
|
1108
|
+
print: !0,
|
|
1109
|
+
optionDate: M,
|
|
1110
|
+
name: c("relationships_well_being")
|
|
1111
|
+
}
|
|
1112
|
+
) : /* @__PURE__ */ t(Ie, { titleChart: "relationships_well_being", isPrint: !0 }) }),
|
|
1113
|
+
/* @__PURE__ */ t("div", { id: "emotional_well_being_id", children: P.emotional >= 20 ? /* @__PURE__ */ t(
|
|
1114
|
+
We,
|
|
1115
|
+
{
|
|
1116
|
+
colors: he,
|
|
1117
|
+
typeChart: "area",
|
|
1118
|
+
activeColumn: se,
|
|
1119
|
+
series: W,
|
|
1120
|
+
weeklySeries: Y,
|
|
1121
|
+
months: v,
|
|
1122
|
+
dayOfWeek: h,
|
|
1123
|
+
avgQuestionLastMonth: s,
|
|
1124
|
+
weeks: w,
|
|
1125
|
+
noGradient: !0,
|
|
1126
|
+
noAvgTotal: !0,
|
|
1127
|
+
print: !0,
|
|
1128
|
+
optionDate: M,
|
|
1129
|
+
name: c("emotional_well_being")
|
|
1130
|
+
}
|
|
1131
|
+
) : /* @__PURE__ */ t(Ie, { titleChart: "emotional_well_being", isPrint: !0 }) }),
|
|
1132
|
+
/* @__PURE__ */ t("div", { id: "self_care_well_being_id", children: P.selfCare >= 20 ? /* @__PURE__ */ t(
|
|
1133
|
+
We,
|
|
1134
|
+
{
|
|
1135
|
+
colors: he,
|
|
1136
|
+
typeChart: "area",
|
|
1137
|
+
activeColumn: E,
|
|
1138
|
+
series: oe,
|
|
1139
|
+
weeklySeries: G,
|
|
1140
|
+
months: v,
|
|
1141
|
+
dayOfWeek: h,
|
|
1142
|
+
avgQuestionLastMonth: s,
|
|
1143
|
+
weeks: w,
|
|
1144
|
+
noGradient: !0,
|
|
1145
|
+
noAvgTotal: !0,
|
|
1146
|
+
print: !0,
|
|
1147
|
+
optionDate: M,
|
|
1148
|
+
name: c("self_care_well_being")
|
|
1149
|
+
}
|
|
1150
|
+
) : /* @__PURE__ */ t(Ie, { titleChart: "self_care_well_being", isPrint: !0 }) }),
|
|
1151
|
+
/* @__PURE__ */ t("div", { id: "environment_well_being_id", children: P.environment >= 20 ? /* @__PURE__ */ t(
|
|
1152
|
+
We,
|
|
1153
|
+
{
|
|
1154
|
+
colors: he,
|
|
1155
|
+
typeChart: "area",
|
|
1156
|
+
activeColumn: ce,
|
|
1157
|
+
series: J,
|
|
1158
|
+
weeklySeries: te,
|
|
1159
|
+
months: v,
|
|
1160
|
+
dayOfWeek: h,
|
|
1161
|
+
avgQuestionLastMonth: s,
|
|
1162
|
+
weeks: w,
|
|
1163
|
+
noGradient: !0,
|
|
1164
|
+
noAvgTotal: !0,
|
|
1165
|
+
print: !0,
|
|
1166
|
+
optionDate: M,
|
|
1167
|
+
name: c("environment_well_being")
|
|
1168
|
+
}
|
|
1169
|
+
) : /* @__PURE__ */ t(Ie, { titleChart: "environment_well_being", isPrint: !0 }) }),
|
|
1170
|
+
/* @__PURE__ */ t("div", { id: "intellectual_well_being_id", children: P.intellectual >= 20 ? /* @__PURE__ */ t(
|
|
1171
|
+
We,
|
|
1172
|
+
{
|
|
1173
|
+
colors: he,
|
|
1174
|
+
typeChart: "area",
|
|
1175
|
+
activeColumn: pe,
|
|
1176
|
+
series: K,
|
|
1177
|
+
weeklySeries: q,
|
|
1178
|
+
months: v,
|
|
1179
|
+
dayOfWeek: h,
|
|
1180
|
+
avgQuestionLastMonth: s,
|
|
1181
|
+
weeks: w,
|
|
1182
|
+
noGradient: !0,
|
|
1183
|
+
noAvgTotal: !0,
|
|
1184
|
+
print: !0,
|
|
1185
|
+
optionDate: M,
|
|
1186
|
+
name: c("intellectual_well_being")
|
|
1187
|
+
}
|
|
1188
|
+
) : /* @__PURE__ */ t(Ie, { titleChart: "intellectual_well_being", isPrint: !0 }) })
|
|
1189
|
+
] }),
|
|
1190
|
+
/* @__PURE__ */ t("div", { className: `${bt["image-logo"]}`, id: "header-logo", children: /* @__PURE__ */ t("img", { src: an(Zn), alt: "" }) }),
|
|
1191
|
+
/* @__PURE__ */ t(
|
|
1192
|
+
Ot,
|
|
1193
|
+
{
|
|
1194
|
+
color: "success",
|
|
1195
|
+
onClick: () => {
|
|
1196
|
+
_.length > 0 && De();
|
|
1197
|
+
},
|
|
1198
|
+
children: c("export")
|
|
1199
|
+
}
|
|
1200
|
+
)
|
|
1201
|
+
] });
|
|
1202
|
+
}, ti = ({
|
|
1203
|
+
modal: r,
|
|
1204
|
+
toggle: f,
|
|
1205
|
+
selectedToPrint: k,
|
|
1206
|
+
handleSelectToPrint: _,
|
|
1207
|
+
avgQuestionLastMonth: s,
|
|
1208
|
+
filter: h,
|
|
1209
|
+
dayOfWeek: v,
|
|
1210
|
+
months: w,
|
|
1211
|
+
weeks: x,
|
|
1212
|
+
schoolName: u,
|
|
1213
|
+
physical: I,
|
|
1214
|
+
physicalWeekly: T,
|
|
1215
|
+
relationships: A,
|
|
1216
|
+
relationshipsWeekly: W,
|
|
1217
|
+
emotional: Y,
|
|
1218
|
+
emotionalWeekly: oe,
|
|
1219
|
+
selfCare: G,
|
|
1220
|
+
selfCareWeekly: J,
|
|
1221
|
+
environment: te,
|
|
1222
|
+
environmentWeekly: K,
|
|
1223
|
+
intellectual: q,
|
|
1224
|
+
intellectualWeekly: le,
|
|
1225
|
+
activeColumnPhysical: se,
|
|
1226
|
+
activeColumnEmotional: ce,
|
|
1227
|
+
activeColumnEnvironment: pe,
|
|
1228
|
+
activeColumnIntellectual: ge,
|
|
1229
|
+
activeColumnRelationships: E,
|
|
1230
|
+
activeColumnSelfCare: re,
|
|
1231
|
+
percentDoneBySection: P,
|
|
1232
|
+
timeChart: de
|
|
1233
|
+
}) => {
|
|
1234
|
+
const { t: M } = we();
|
|
1235
|
+
return /* @__PURE__ */ l(
|
|
1236
|
+
In,
|
|
1237
|
+
{
|
|
1238
|
+
isOpen: r,
|
|
1239
|
+
toggle: f,
|
|
1240
|
+
centered: !0,
|
|
1241
|
+
children: [
|
|
1242
|
+
/* @__PURE__ */ l($n, { children: [
|
|
1243
|
+
/* @__PURE__ */ t("p", { className: `${m["title-modal"]}`, children: M("export_to_pdf") }),
|
|
1244
|
+
/* @__PURE__ */ l("p", { className: `${m["header-desc-modal"]}`, children: [
|
|
1245
|
+
M("the_data_is_taken_from_the_home_screen"),
|
|
1246
|
+
"."
|
|
1247
|
+
] }),
|
|
1248
|
+
/* @__PURE__ */ t("p", { className: `${m["header-desc-modal"]}`, children: M(
|
|
1249
|
+
"make_sure_everything_is_set_correctly_before_exporting"
|
|
1250
|
+
) })
|
|
1251
|
+
] }),
|
|
1252
|
+
/* @__PURE__ */ t(Tn, { children: hn?.map((c) => /* @__PURE__ */ l(
|
|
1253
|
+
Mn,
|
|
1254
|
+
{
|
|
1255
|
+
check: !0,
|
|
1256
|
+
children: [
|
|
1257
|
+
/* @__PURE__ */ t(
|
|
1258
|
+
An,
|
|
1259
|
+
{
|
|
1260
|
+
type: "checkbox",
|
|
1261
|
+
checked: k.includes(c),
|
|
1262
|
+
onChange: () => _(c)
|
|
1263
|
+
}
|
|
1264
|
+
),
|
|
1265
|
+
/* @__PURE__ */ t(
|
|
1266
|
+
Ln,
|
|
1267
|
+
{
|
|
1268
|
+
check: !0,
|
|
1269
|
+
className: `${m["checkbox-content"]}`,
|
|
1270
|
+
children: M(`${c}`)
|
|
1271
|
+
}
|
|
1272
|
+
)
|
|
1273
|
+
]
|
|
1274
|
+
},
|
|
1275
|
+
c
|
|
1276
|
+
)) }),
|
|
1277
|
+
/* @__PURE__ */ l(zn, { children: [
|
|
1278
|
+
/* @__PURE__ */ t(Ot, { color: "light", onClick: f, children: M("cancel") }),
|
|
1279
|
+
/* @__PURE__ */ t(
|
|
1280
|
+
ei,
|
|
1281
|
+
{
|
|
1282
|
+
startTime: h?.startDate,
|
|
1283
|
+
endTime: h?.endDate,
|
|
1284
|
+
selectedToPDF: k,
|
|
1285
|
+
avgQuestionLastMonth: s,
|
|
1286
|
+
dayOfWeek: v,
|
|
1287
|
+
months: w,
|
|
1288
|
+
weeks: x,
|
|
1289
|
+
schoolName: u,
|
|
1290
|
+
physical: I,
|
|
1291
|
+
physicalWeekly: T,
|
|
1292
|
+
relationships: A,
|
|
1293
|
+
relationshipsWeekly: W,
|
|
1294
|
+
emotional: Y,
|
|
1295
|
+
emotionalWeekly: oe,
|
|
1296
|
+
selfCare: G,
|
|
1297
|
+
selfCareWeekly: J,
|
|
1298
|
+
environment: te,
|
|
1299
|
+
environmentWeekly: K,
|
|
1300
|
+
intellectual: q,
|
|
1301
|
+
intellectualWeekly: le,
|
|
1302
|
+
activeColumnPhysical: se,
|
|
1303
|
+
activeColumnEmotional: ce,
|
|
1304
|
+
activeColumnEnvironment: pe,
|
|
1305
|
+
activeColumnIntellectual: ge,
|
|
1306
|
+
activeColumnRelationships: E,
|
|
1307
|
+
activeColumnSelfCare: re,
|
|
1308
|
+
percentDoneBySection: P,
|
|
1309
|
+
optionDate: de,
|
|
1310
|
+
onClose: f
|
|
1311
|
+
}
|
|
1312
|
+
)
|
|
1313
|
+
] })
|
|
1314
|
+
]
|
|
1315
|
+
}
|
|
1316
|
+
);
|
|
1317
|
+
}, ni = ({
|
|
1318
|
+
open: r,
|
|
1319
|
+
onClose: f,
|
|
1320
|
+
areaOptions: k,
|
|
1321
|
+
selectedArea: _,
|
|
1322
|
+
setSelectedArea: s,
|
|
1323
|
+
interventionDate: h,
|
|
1324
|
+
setInterventionDate: v,
|
|
1325
|
+
actionDescription: w,
|
|
1326
|
+
setActionDescription: x,
|
|
1327
|
+
isSubmitDisabled: u,
|
|
1328
|
+
onSubmit: I
|
|
1329
|
+
}) => {
|
|
1330
|
+
const { t: T } = we(), A = h ? $e(h, "YYYY-MM-DD", !0) : null;
|
|
1331
|
+
return /* @__PURE__ */ t(
|
|
1332
|
+
kt,
|
|
1333
|
+
{
|
|
1334
|
+
open: r,
|
|
1335
|
+
onClose: f,
|
|
1336
|
+
maxWidth: "md",
|
|
1337
|
+
fullWidth: !0,
|
|
1338
|
+
PaperProps: {
|
|
1339
|
+
style: { borderRadius: "16px" }
|
|
1340
|
+
},
|
|
1341
|
+
children: /* @__PURE__ */ l(
|
|
1342
|
+
"div",
|
|
1343
|
+
{
|
|
1344
|
+
className: `${o["log-intervention-modal"]} ${o["create-interventions-modal"]}`,
|
|
1345
|
+
children: [
|
|
1346
|
+
/* @__PURE__ */ l(
|
|
1347
|
+
Nt,
|
|
1348
|
+
{
|
|
1349
|
+
className: o["log-intervention-modal__dialog-title"],
|
|
1350
|
+
children: [
|
|
1351
|
+
/* @__PURE__ */ t(
|
|
1352
|
+
"div",
|
|
1353
|
+
{
|
|
1354
|
+
className: o["log-intervention-modal__header-icon"],
|
|
1355
|
+
children: /* @__PURE__ */ t(Ve, { size: 24, color: "#316CD9" })
|
|
1356
|
+
}
|
|
1357
|
+
),
|
|
1358
|
+
/* @__PURE__ */ l("div", { className: o["log-intervention-modal__header"], children: [
|
|
1359
|
+
/* @__PURE__ */ t(
|
|
1360
|
+
"div",
|
|
1361
|
+
{
|
|
1362
|
+
className: o["log-intervention-modal__header-title"],
|
|
1363
|
+
children: "Log Intervention"
|
|
1364
|
+
}
|
|
1365
|
+
),
|
|
1366
|
+
/* @__PURE__ */ t(
|
|
1367
|
+
"div",
|
|
1368
|
+
{
|
|
1369
|
+
className: o["log-intervention-modal__header-subtitle"],
|
|
1370
|
+
children: "Record actions taken to support educator well-being. These interventions will appear as markers on the chart."
|
|
1371
|
+
}
|
|
1372
|
+
)
|
|
1373
|
+
] }),
|
|
1374
|
+
/* @__PURE__ */ t(
|
|
1375
|
+
St,
|
|
1376
|
+
{
|
|
1377
|
+
"aria-label": "Close",
|
|
1378
|
+
onClick: f,
|
|
1379
|
+
className: o["log-intervention-modal__close-btn"],
|
|
1380
|
+
children: /* @__PURE__ */ t(Wt, {})
|
|
1381
|
+
}
|
|
1382
|
+
)
|
|
1383
|
+
]
|
|
1384
|
+
}
|
|
1385
|
+
),
|
|
1386
|
+
/* @__PURE__ */ t(
|
|
1387
|
+
Dt,
|
|
1388
|
+
{
|
|
1389
|
+
className: `${o["log-intervention-modal__dialog-content"]} ${o["log-intervention-modal__content"]}`,
|
|
1390
|
+
children: /* @__PURE__ */ l("div", { className: o["log-intervention-modal__fields"], children: [
|
|
1391
|
+
/* @__PURE__ */ l(
|
|
1392
|
+
"div",
|
|
1393
|
+
{
|
|
1394
|
+
className: `${o["log-intervention-modal__field"]} ${o["log-intervention-modal__field--narrow"]}`,
|
|
1395
|
+
children: [
|
|
1396
|
+
/* @__PURE__ */ t(
|
|
1397
|
+
ot,
|
|
1398
|
+
{
|
|
1399
|
+
component: "label",
|
|
1400
|
+
htmlFor: "log-intervention-area",
|
|
1401
|
+
required: !0,
|
|
1402
|
+
className: o["log-intervention-modal__field-label"],
|
|
1403
|
+
children: "Select Area"
|
|
1404
|
+
}
|
|
1405
|
+
),
|
|
1406
|
+
/* @__PURE__ */ t(
|
|
1407
|
+
Ft,
|
|
1408
|
+
{
|
|
1409
|
+
options: k,
|
|
1410
|
+
value: _,
|
|
1411
|
+
onChange: (W, Y) => s(Y),
|
|
1412
|
+
getOptionLabel: (W) => W?.label ?? "",
|
|
1413
|
+
isOptionEqualToValue: (W, Y) => W.value === Y.value,
|
|
1414
|
+
renderInput: (W) => /* @__PURE__ */ t(
|
|
1415
|
+
st,
|
|
1416
|
+
{
|
|
1417
|
+
...W,
|
|
1418
|
+
id: "log-intervention-area",
|
|
1419
|
+
required: !0,
|
|
1420
|
+
placeholder: "Select an area"
|
|
1421
|
+
}
|
|
1422
|
+
)
|
|
1423
|
+
}
|
|
1424
|
+
)
|
|
1425
|
+
]
|
|
1426
|
+
}
|
|
1427
|
+
),
|
|
1428
|
+
/* @__PURE__ */ l(
|
|
1429
|
+
"div",
|
|
1430
|
+
{
|
|
1431
|
+
className: `${o["log-intervention-modal__field"]} ${o["log-intervention-modal__field--narrow"]}`,
|
|
1432
|
+
children: [
|
|
1433
|
+
/* @__PURE__ */ t(
|
|
1434
|
+
ot,
|
|
1435
|
+
{
|
|
1436
|
+
component: "label",
|
|
1437
|
+
htmlFor: "log-intervention-date",
|
|
1438
|
+
required: !0,
|
|
1439
|
+
className: o["log-intervention-modal__field-label"],
|
|
1440
|
+
children: "Intervention Date"
|
|
1441
|
+
}
|
|
1442
|
+
),
|
|
1443
|
+
/* @__PURE__ */ t(qn, { dateAdapter: Pn, children: /* @__PURE__ */ t(
|
|
1444
|
+
En,
|
|
1445
|
+
{
|
|
1446
|
+
format: "Do MMM YYYY",
|
|
1447
|
+
value: A?.isValid() ? A : null,
|
|
1448
|
+
onChange: (W) => {
|
|
1449
|
+
v(
|
|
1450
|
+
W ? W.startOf("day").format("YYYY-MM-DD") : ""
|
|
1451
|
+
);
|
|
1452
|
+
},
|
|
1453
|
+
slotProps: {
|
|
1454
|
+
textField: {
|
|
1455
|
+
variant: "outlined",
|
|
1456
|
+
id: "time-picker"
|
|
1457
|
+
},
|
|
1458
|
+
openPickerButton: {
|
|
1459
|
+
"aria-label": "change date"
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
) })
|
|
1464
|
+
]
|
|
1465
|
+
}
|
|
1466
|
+
),
|
|
1467
|
+
/* @__PURE__ */ l(
|
|
1468
|
+
"div",
|
|
1469
|
+
{
|
|
1470
|
+
className: o["log-intervention-modal__field"],
|
|
1471
|
+
children: [
|
|
1472
|
+
/* @__PURE__ */ t(
|
|
1473
|
+
ot,
|
|
1474
|
+
{
|
|
1475
|
+
component: "label",
|
|
1476
|
+
htmlFor: "log-intervention-action-description",
|
|
1477
|
+
required: !0,
|
|
1478
|
+
className: o["log-intervention-modal__field-label"],
|
|
1479
|
+
children: "Action Description"
|
|
1480
|
+
}
|
|
1481
|
+
),
|
|
1482
|
+
/* @__PURE__ */ t(
|
|
1483
|
+
st,
|
|
1484
|
+
{
|
|
1485
|
+
id: "log-intervention-action-description",
|
|
1486
|
+
required: !0,
|
|
1487
|
+
multiline: !0,
|
|
1488
|
+
minRows: 4,
|
|
1489
|
+
value: w,
|
|
1490
|
+
onChange: (W) => x(W.target.value),
|
|
1491
|
+
placeholder: "Describe the intervention or action taken..."
|
|
1492
|
+
}
|
|
1493
|
+
)
|
|
1494
|
+
]
|
|
1495
|
+
}
|
|
1496
|
+
)
|
|
1497
|
+
] })
|
|
1498
|
+
}
|
|
1499
|
+
),
|
|
1500
|
+
/* @__PURE__ */ l(
|
|
1501
|
+
on,
|
|
1502
|
+
{
|
|
1503
|
+
className: `${o["log-intervention-modal__dialog-actions"]} ${o["log-intervention-modal__actions"]}`,
|
|
1504
|
+
children: [
|
|
1505
|
+
/* @__PURE__ */ t(
|
|
1506
|
+
Le,
|
|
1507
|
+
{
|
|
1508
|
+
variant: "outlined",
|
|
1509
|
+
color: "inherit",
|
|
1510
|
+
onClick: f,
|
|
1511
|
+
className: o["log-intervention-modal__btn"],
|
|
1512
|
+
children: T("cancel")
|
|
1513
|
+
}
|
|
1514
|
+
),
|
|
1515
|
+
/* @__PURE__ */ t(
|
|
1516
|
+
Le,
|
|
1517
|
+
{
|
|
1518
|
+
variant: "contained",
|
|
1519
|
+
onClick: I,
|
|
1520
|
+
disabled: u,
|
|
1521
|
+
className: `${o["log-intervention-modal__btn"]} ${o["log-intervention-modal__btn-primary"]}`,
|
|
1522
|
+
children: "Log Intervention"
|
|
1523
|
+
}
|
|
1524
|
+
)
|
|
1525
|
+
]
|
|
1526
|
+
}
|
|
1527
|
+
)
|
|
1528
|
+
]
|
|
1529
|
+
}
|
|
1530
|
+
)
|
|
1531
|
+
}
|
|
1532
|
+
);
|
|
1533
|
+
}, ii = ({
|
|
1534
|
+
open: r,
|
|
1535
|
+
onClose: f,
|
|
1536
|
+
interventionLogsByTab: k,
|
|
1537
|
+
handleSendCheckInNow: _,
|
|
1538
|
+
areaOptions: s,
|
|
1539
|
+
selectedArea: h,
|
|
1540
|
+
setSelectedArea: v
|
|
1541
|
+
}) => {
|
|
1542
|
+
const { t: w } = we(), x = Object.values(k).some((u) => u.length > 0);
|
|
1543
|
+
return /* @__PURE__ */ t(
|
|
1544
|
+
kt,
|
|
1545
|
+
{
|
|
1546
|
+
open: r,
|
|
1547
|
+
onClose: f,
|
|
1548
|
+
maxWidth: "md",
|
|
1549
|
+
fullWidth: !0,
|
|
1550
|
+
PaperProps: {
|
|
1551
|
+
style: { borderRadius: "16px" }
|
|
1552
|
+
},
|
|
1553
|
+
sx: {
|
|
1554
|
+
".MuiPaper-root": {
|
|
1555
|
+
maxWidth: "1200px"
|
|
1556
|
+
}
|
|
1557
|
+
},
|
|
1558
|
+
children: /* @__PURE__ */ l("div", { className: `${o["log-intervention-modal"]} ${o["custom-interventions-overview-modal"]}`, children: [
|
|
1559
|
+
/* @__PURE__ */ l(Nt, { className: o["log-intervention-modal__dialog-title"], children: [
|
|
1560
|
+
/* @__PURE__ */ t("div", { className: o["log-intervention-modal__header-icon"], children: /* @__PURE__ */ t(Ve, { size: 24, color: "#316CD9" }) }),
|
|
1561
|
+
/* @__PURE__ */ l("div", { className: o["log-intervention-modal__header"], children: [
|
|
1562
|
+
/* @__PURE__ */ t("div", { className: o["log-intervention-modal__header-title"], children: w("interventions_overview") }),
|
|
1563
|
+
/* @__PURE__ */ t("div", { className: o["log-intervention-modal__header-subtitle"], children: w("total_interventions_logged", { count: Object.values(k).flat().length }) })
|
|
1564
|
+
] }),
|
|
1565
|
+
/* @__PURE__ */ t(
|
|
1566
|
+
St,
|
|
1567
|
+
{
|
|
1568
|
+
"aria-label": "Close",
|
|
1569
|
+
onClick: f,
|
|
1570
|
+
className: o["log-intervention-modal__close-btn"],
|
|
1571
|
+
children: /* @__PURE__ */ t(Wt, {})
|
|
1572
|
+
}
|
|
1573
|
+
)
|
|
1574
|
+
] }),
|
|
1575
|
+
/* @__PURE__ */ l(
|
|
1576
|
+
Dt,
|
|
1577
|
+
{
|
|
1578
|
+
className: `${o["log-intervention-modal__dialog-content"]} ${o["log-intervention-modal__content"]}`,
|
|
1579
|
+
sx: {
|
|
1580
|
+
position: "relative",
|
|
1581
|
+
overflowY: "auto"
|
|
1582
|
+
},
|
|
1583
|
+
children: [
|
|
1584
|
+
/* @__PURE__ */ t(ee, { className: o["interventions-overview__grid"], children: [
|
|
1585
|
+
{ label: "physical", key: "physical", src: "/images/teacher-wellbeing-setup/physical_section_icon.png", id: 1 },
|
|
1586
|
+
{ label: "relationships", key: "relationships", src: "/images/teacher-wellbeing-setup/social_section_icon.png", id: 4 },
|
|
1587
|
+
{ label: "emotional", key: "emotional", src: "/images/teacher-wellbeing-setup/emotional_section_icon.png", id: 2 },
|
|
1588
|
+
{ label: "intellectual", key: "intellectual", src: "/images/teacher-wellbeing-setup/intellectual_section_icon.png", id: 6 },
|
|
1589
|
+
{ label: "environmental", key: "environment", src: "/images/teacher-wellbeing-setup/environment_section_icon.png", id: 5 },
|
|
1590
|
+
{ label: "spiritual", key: "spiritual", src: "/images/teacher-wellbeing-setup/self_section_icon.png", id: 3 }
|
|
1591
|
+
].map((u) => /* @__PURE__ */ l(ee, { className: o["interventions-overview__card"], children: [
|
|
1592
|
+
/* @__PURE__ */ l(ee, { className: o["interventions-overview__card-header"], children: [
|
|
1593
|
+
/* @__PURE__ */ t("img", { src: u.src, alt: u.label, className: o["interventions-overview__card-icon"] }),
|
|
1594
|
+
/* @__PURE__ */ t(ae, { className: o["interventions-overview__card-count"], children: k[u.key]?.length || 0 })
|
|
1595
|
+
] }),
|
|
1596
|
+
/* @__PURE__ */ t(ae, { className: o["interventions-overview__card-title"], children: w(u.label) }),
|
|
1597
|
+
/* @__PURE__ */ l(
|
|
1598
|
+
"button",
|
|
1599
|
+
{
|
|
1600
|
+
className: o["interventions-overview__card-action"],
|
|
1601
|
+
onClick: () => {
|
|
1602
|
+
u.id && _(u.id);
|
|
1603
|
+
},
|
|
1604
|
+
children: [
|
|
1605
|
+
/* @__PURE__ */ t(yt, { size: 16 }),
|
|
1606
|
+
w("request_check_in")
|
|
1607
|
+
]
|
|
1608
|
+
}
|
|
1609
|
+
)
|
|
1610
|
+
] }, u.key)) }),
|
|
1611
|
+
/* @__PURE__ */ t(ee, { sx: { pb: 3, position: "sticky", top: 0, zIndex: 1, backgroundColor: "#fff" }, children: /* @__PURE__ */ l("label", { className: o["interventions-overview__field-label"], children: [
|
|
1612
|
+
/* @__PURE__ */ l(ee, { sx: { display: "flex", alignItems: "center", gap: 1, mb: 1, fontSize: "14px", fontFamily: '"Poppins-Regular" !important' }, children: [
|
|
1613
|
+
/* @__PURE__ */ t(Rn, { size: 20, color: "#242424" }),
|
|
1614
|
+
" ",
|
|
1615
|
+
w("filter_by_indicator")
|
|
1616
|
+
] }),
|
|
1617
|
+
/* @__PURE__ */ t(
|
|
1618
|
+
Ft,
|
|
1619
|
+
{
|
|
1620
|
+
sx: {
|
|
1621
|
+
fontFamily: '"Poppins-Regular" !important',
|
|
1622
|
+
textTransform: "capitalize"
|
|
1623
|
+
},
|
|
1624
|
+
options: s,
|
|
1625
|
+
value: h,
|
|
1626
|
+
onChange: (u, I) => v(I),
|
|
1627
|
+
getOptionLabel: (u) => u?.label ?? "",
|
|
1628
|
+
isOptionEqualToValue: (u, I) => u.value === I.value,
|
|
1629
|
+
renderInput: (u) => /* @__PURE__ */ t(
|
|
1630
|
+
st,
|
|
1631
|
+
{
|
|
1632
|
+
...u,
|
|
1633
|
+
id: "filter-intervention-section",
|
|
1634
|
+
required: !0,
|
|
1635
|
+
placeholder: w("select_section")
|
|
1636
|
+
}
|
|
1637
|
+
),
|
|
1638
|
+
ListboxProps: {
|
|
1639
|
+
sx: {
|
|
1640
|
+
"& .MuiAutocomplete-option": {
|
|
1641
|
+
textTransform: "capitalize"
|
|
1642
|
+
}
|
|
1643
|
+
}
|
|
1644
|
+
}
|
|
1645
|
+
}
|
|
1646
|
+
)
|
|
1647
|
+
] }) }),
|
|
1648
|
+
x ? /* @__PURE__ */ t(ee, { className: o["interventions-overview__list"], children: Object.entries(k).map(([u, I]) => I.length === 0 ? null : /* @__PURE__ */ t(ee, { children: /* @__PURE__ */ t(ee, { sx: { display: "flex", flexDirection: "column" }, children: I.map((T) => /* @__PURE__ */ l(
|
|
1649
|
+
ee,
|
|
1650
|
+
{
|
|
1651
|
+
className: o["interventions-overview__item"],
|
|
1652
|
+
children: [
|
|
1653
|
+
/* @__PURE__ */ t(ee, { className: o["interventions-overview__item--icon-wrapper"], children: /* @__PURE__ */ t(Ve, { size: 18 }) }),
|
|
1654
|
+
/* @__PURE__ */ l(ee, { className: o["interventions-overview__item--content"], children: [
|
|
1655
|
+
/* @__PURE__ */ l(ee, { className: o["interventions-overview__item--header"], children: [
|
|
1656
|
+
/* @__PURE__ */ t(ee, { className: o["interventions-overview__item--left"], children: /* @__PURE__ */ t(ae, { className: o["interventions-overview__item--title"], children: T.sectionName }) }),
|
|
1657
|
+
/* @__PURE__ */ l(ee, { className: o["interventions-overview__item--date-wrapper"], children: [
|
|
1658
|
+
/* @__PURE__ */ t(Hn, { size: 20 }),
|
|
1659
|
+
$e(T.interventionDate).format("MMM D, YYYY")
|
|
1660
|
+
] })
|
|
1661
|
+
] }),
|
|
1662
|
+
/* @__PURE__ */ t(ae, { className: o["interventions-overview__item--description"], children: T.actionDescription }),
|
|
1663
|
+
/* @__PURE__ */ l(ee, { className: o["interventions-overview__item--footer"], children: [
|
|
1664
|
+
/* @__PURE__ */ l(ee, { className: o["interventions-overview__item--user-wrapper"], children: [
|
|
1665
|
+
/* @__PURE__ */ t(Qn, { size: 16 }),
|
|
1666
|
+
w("logged_by"),
|
|
1667
|
+
": ",
|
|
1668
|
+
/* @__PURE__ */ t("span", { children: T.fullname || "" })
|
|
1669
|
+
] }),
|
|
1670
|
+
/* @__PURE__ */ l(
|
|
1671
|
+
"button",
|
|
1672
|
+
{
|
|
1673
|
+
className: o["interventions-overview__item--action"],
|
|
1674
|
+
onClick: () => {
|
|
1675
|
+
T.wellBeingSectionId && _(T.wellBeingSectionId);
|
|
1676
|
+
},
|
|
1677
|
+
children: [
|
|
1678
|
+
/* @__PURE__ */ t(yt, { size: 18 }),
|
|
1679
|
+
w("request_new_check_in")
|
|
1680
|
+
]
|
|
1681
|
+
}
|
|
1682
|
+
)
|
|
1683
|
+
] })
|
|
1684
|
+
] })
|
|
1685
|
+
]
|
|
1686
|
+
},
|
|
1687
|
+
T.id
|
|
1688
|
+
)) }) }, u)) }) : /* @__PURE__ */ t(ee, { py: 4, textAlign: "center", children: /* @__PURE__ */ t(ae, { color: "textSecondary", children: w("no_interventions_recorded_for_the_selected_period") }) })
|
|
1689
|
+
]
|
|
1690
|
+
}
|
|
1691
|
+
)
|
|
1692
|
+
] })
|
|
1693
|
+
}
|
|
1694
|
+
);
|
|
1695
|
+
}, ai = ({
|
|
1696
|
+
open: r,
|
|
1697
|
+
onClose: f,
|
|
1698
|
+
staffCount: k = 35,
|
|
1699
|
+
onSendRequest: _
|
|
1700
|
+
}) => {
|
|
1701
|
+
const { t: s } = we(), [h, v] = d("A gentle reminder: your well-being check-in"), [w, x] = d(
|
|
1702
|
+
`Hi,
|
|
1703
|
+
|
|
1704
|
+
We noticed your latest well-being check-in is still open. It takes about two minutes, and your responses stay confidential.
|
|
1705
|
+
|
|
1706
|
+
Thank you for taking the time.`
|
|
1707
|
+
);
|
|
1708
|
+
return /* @__PURE__ */ t(
|
|
1709
|
+
Yn,
|
|
1710
|
+
{
|
|
1711
|
+
open: r,
|
|
1712
|
+
onClose: f,
|
|
1713
|
+
scroll: "body",
|
|
1714
|
+
maxWidth: "md",
|
|
1715
|
+
isSessionModal: !0,
|
|
1716
|
+
children: /* @__PURE__ */ l("div", { className: o["send-reminder-modal"], children: [
|
|
1717
|
+
/* @__PURE__ */ t("div", { className: o["send-reminder-modal__modalHeader"], children: /* @__PURE__ */ l("div", { className: o["send-reminder-modal__headerLeft"], children: [
|
|
1718
|
+
/* @__PURE__ */ t("div", { className: o["send-reminder-modal__iconMailWrapper"], children: /* @__PURE__ */ l("svg", { xmlns: "http://www.w3.org/2000/svg", width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "#316CD9", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1719
|
+
/* @__PURE__ */ t("rect", { width: "20", height: "16", x: "2", y: "4", rx: "2" }),
|
|
1720
|
+
/* @__PURE__ */ t("path", { d: "m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7" })
|
|
1721
|
+
] }) }),
|
|
1722
|
+
/* @__PURE__ */ l("div", { children: [
|
|
1723
|
+
/* @__PURE__ */ t("h2", { className: o["send-reminder-modal__modalTitle"], children: s("send_a_check_in_reminder") }),
|
|
1724
|
+
/* @__PURE__ */ l("p", { className: o["send-reminder-modal__modalSubTitle"], children: [
|
|
1725
|
+
k,
|
|
1726
|
+
" ",
|
|
1727
|
+
s("staff_members_haven_t_completed")
|
|
1728
|
+
] })
|
|
1729
|
+
] })
|
|
1730
|
+
] }) }),
|
|
1731
|
+
/* @__PURE__ */ l("div", { className: o["send-reminder-modal__infoBanner"], children: [
|
|
1732
|
+
/* @__PURE__ */ t("div", { className: o["send-reminder-modal__bannerIcon"], children: /* @__PURE__ */ l("svg", { xmlns: "http://www.w3.org/2000/svg", width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "#4b5563", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1733
|
+
/* @__PURE__ */ t("path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" }),
|
|
1734
|
+
/* @__PURE__ */ t("path", { d: "m9 12 2 2 4-4" })
|
|
1735
|
+
] }) }),
|
|
1736
|
+
/* @__PURE__ */ t("p", { className: o["send-reminder-modal__bannerText"], children: s("confidential_notice") })
|
|
1737
|
+
] }),
|
|
1738
|
+
/* @__PURE__ */ l("div", { className: o["send-reminder-modal__formGroup"], children: [
|
|
1739
|
+
/* @__PURE__ */ t("label", { className: o["send-reminder-modal__inputLabel"], children: "SUBJECT" }),
|
|
1740
|
+
/* @__PURE__ */ t(
|
|
1741
|
+
"input",
|
|
1742
|
+
{
|
|
1743
|
+
type: "text",
|
|
1744
|
+
className: o["send-reminder-modal__subjectInput"],
|
|
1745
|
+
value: h,
|
|
1746
|
+
onChange: (u) => v(u.target.value)
|
|
1747
|
+
}
|
|
1748
|
+
)
|
|
1749
|
+
] }),
|
|
1750
|
+
/* @__PURE__ */ l("div", { className: o["send-reminder-modal__formGroup"], children: [
|
|
1751
|
+
/* @__PURE__ */ t("label", { className: o["send-reminder-modal__inputLabel"], children: "MESSAGE" }),
|
|
1752
|
+
/* @__PURE__ */ t(
|
|
1753
|
+
"textarea",
|
|
1754
|
+
{
|
|
1755
|
+
className: o["send-reminder-modal__messageTextarea"],
|
|
1756
|
+
rows: 7,
|
|
1757
|
+
value: w,
|
|
1758
|
+
onChange: (u) => x(u.target.value)
|
|
1759
|
+
}
|
|
1760
|
+
)
|
|
1761
|
+
] }),
|
|
1762
|
+
/* @__PURE__ */ l("div", { className: o["send-reminder-modal__modalFooter"], children: [
|
|
1763
|
+
/* @__PURE__ */ t("button", { type: "button", className: o["send-reminder-modal__cancelBtn"], onClick: f, children: s("cancel") || "Cancel" }),
|
|
1764
|
+
/* @__PURE__ */ l(
|
|
1765
|
+
"button",
|
|
1766
|
+
{
|
|
1767
|
+
type: "button",
|
|
1768
|
+
className: o["send-reminder-modal__sendBtn"],
|
|
1769
|
+
onClick: () => {
|
|
1770
|
+
_(h, w), f();
|
|
1771
|
+
},
|
|
1772
|
+
children: [
|
|
1773
|
+
/* @__PURE__ */ l("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1774
|
+
/* @__PURE__ */ t("line", { x1: "22", y1: "2", x2: "11", y2: "13" }),
|
|
1775
|
+
/* @__PURE__ */ t("polygon", { points: "22 2 15 22 11 13 2 9 22 2" })
|
|
1776
|
+
] }),
|
|
1777
|
+
s("send_to"),
|
|
1778
|
+
" ",
|
|
1779
|
+
k,
|
|
1780
|
+
" ",
|
|
1781
|
+
s("staff_lower")
|
|
1782
|
+
]
|
|
1783
|
+
}
|
|
1784
|
+
)
|
|
1785
|
+
] })
|
|
1786
|
+
] })
|
|
1787
|
+
}
|
|
1788
|
+
);
|
|
1789
|
+
}, $i = () => {
|
|
1790
|
+
const { t: r } = we(), [f, k] = d(!1), _ = () => k(!1), {
|
|
1791
|
+
physical: s,
|
|
1792
|
+
physicalWeekly: h,
|
|
1793
|
+
relationships: v,
|
|
1794
|
+
relationshipsWeekly: w,
|
|
1795
|
+
emotional: x,
|
|
1796
|
+
emotionalWeekly: u,
|
|
1797
|
+
selfCare: I,
|
|
1798
|
+
selfCareWeekly: T,
|
|
1799
|
+
environment: A,
|
|
1800
|
+
environmentWeekly: W,
|
|
1801
|
+
intellectual: Y,
|
|
1802
|
+
intellectualWeekly: oe,
|
|
1803
|
+
avgQuestionLastMonth: G,
|
|
1804
|
+
dayOfWeek: J,
|
|
1805
|
+
months: te,
|
|
1806
|
+
weeks: K,
|
|
1807
|
+
filters: q,
|
|
1808
|
+
classFontSize: le,
|
|
1809
|
+
handleHoverTooltip: se,
|
|
1810
|
+
handleActiveColumn: ce,
|
|
1811
|
+
activeColumnPhysical: pe,
|
|
1812
|
+
activeColumnEmotional: ge,
|
|
1813
|
+
activeColumnEnvironment: E,
|
|
1814
|
+
activeColumnIntellectual: re,
|
|
1815
|
+
activeColumnRelationships: P,
|
|
1816
|
+
activeColumnSelfCare: de,
|
|
1817
|
+
id_export: M,
|
|
1818
|
+
openPopoverExport: c,
|
|
1819
|
+
handleClick: $,
|
|
1820
|
+
handleClose: ue,
|
|
1821
|
+
anchorEl: De,
|
|
1822
|
+
toggle: ve,
|
|
1823
|
+
modal: X,
|
|
1824
|
+
selectedToPrint: i,
|
|
1825
|
+
activeTab: n,
|
|
1826
|
+
setActiveTab: b,
|
|
1827
|
+
handleChangeFilterCalendar: g,
|
|
1828
|
+
handleChangeEndDateChart: e,
|
|
1829
|
+
handleChangeStartDateChart: fe,
|
|
1830
|
+
onClearFilter: Fe,
|
|
1831
|
+
onSaveFilter: ne,
|
|
1832
|
+
openEducatorWithoutCheckIns: Te,
|
|
1833
|
+
educatorWithoutCheckIns: L,
|
|
1834
|
+
handleCloseModalEducator: p,
|
|
1835
|
+
handleOpenModalEducator: Z,
|
|
1836
|
+
onSendBulkRequest: O,
|
|
1837
|
+
totalStatic: y,
|
|
1838
|
+
handleChangeQuestionFilter: R,
|
|
1839
|
+
handleRedirectAllAnswer: H,
|
|
1840
|
+
openFieldQuestions: z,
|
|
1841
|
+
questionFilters: F,
|
|
1842
|
+
percentDoneBySection: C,
|
|
1843
|
+
schoolName: S,
|
|
1844
|
+
handleSelectToPrint: me,
|
|
1845
|
+
timeChart: Q,
|
|
1846
|
+
setTimeChart: U,
|
|
1847
|
+
dayOfMonth: ze
|
|
1848
|
+
} = Un(), Pe = Jn(
|
|
1849
|
+
f,
|
|
1850
|
+
_,
|
|
1851
|
+
q.startDate,
|
|
1852
|
+
q.endDate
|
|
1853
|
+
), {
|
|
1854
|
+
interventionLogs: Je,
|
|
1855
|
+
interventionLogsByTab: ke,
|
|
1856
|
+
filteredInterventionLogsByTab: Ke,
|
|
1857
|
+
openOverview: Re,
|
|
1858
|
+
handleOpenOverview: Ne,
|
|
1859
|
+
handleCloseOverview: Xe,
|
|
1860
|
+
handleSendCheckInNow: Ze,
|
|
1861
|
+
overviewAreaOptions: et,
|
|
1862
|
+
selectedOverviewArea: tt,
|
|
1863
|
+
setSelectedOverviewArea: nt
|
|
1864
|
+
} = Pe, He = Se(() => Q === "Monthly" ? ze : J, [Q, ze, J]), Qe = Se(() => [
|
|
1865
|
+
{
|
|
1866
|
+
label: "physical",
|
|
1867
|
+
component: /* @__PURE__ */ t(
|
|
1868
|
+
Me,
|
|
1869
|
+
{
|
|
1870
|
+
data: s,
|
|
1871
|
+
weeklyData: h,
|
|
1872
|
+
avgQuestionLastMonth: G,
|
|
1873
|
+
dayOfWeek: He,
|
|
1874
|
+
months: te,
|
|
1875
|
+
timeOfDay: q.optionDate,
|
|
1876
|
+
classFontSize: le,
|
|
1877
|
+
handleHoverTooltip: se,
|
|
1878
|
+
weeks: K,
|
|
1879
|
+
onActiveColumn: ce,
|
|
1880
|
+
activeColumn: pe,
|
|
1881
|
+
titleChart: "physical_well_being",
|
|
1882
|
+
percent: C.physical,
|
|
1883
|
+
setTimeChart: U,
|
|
1884
|
+
interventionLogs: ke.physical
|
|
1885
|
+
}
|
|
1886
|
+
)
|
|
1887
|
+
},
|
|
1888
|
+
{
|
|
1889
|
+
label: "relationships",
|
|
1890
|
+
component: /* @__PURE__ */ t(
|
|
1891
|
+
Me,
|
|
1892
|
+
{
|
|
1893
|
+
data: v,
|
|
1894
|
+
weeklyData: w,
|
|
1895
|
+
avgQuestionLastMonth: G,
|
|
1896
|
+
dayOfWeek: J,
|
|
1897
|
+
months: te,
|
|
1898
|
+
timeOfDay: q.optionDate,
|
|
1899
|
+
classFontSize: le,
|
|
1900
|
+
handleHoverTooltip: se,
|
|
1901
|
+
weeks: K,
|
|
1902
|
+
onActiveColumn: ce,
|
|
1903
|
+
activeColumn: P,
|
|
1904
|
+
titleChart: "relationships_well_being",
|
|
1905
|
+
percent: C.relationships,
|
|
1906
|
+
setTimeChart: U,
|
|
1907
|
+
interventionLogs: ke.relationships
|
|
1908
|
+
}
|
|
1909
|
+
)
|
|
1910
|
+
},
|
|
1911
|
+
{
|
|
1912
|
+
label: "emotional",
|
|
1913
|
+
component: /* @__PURE__ */ t(
|
|
1914
|
+
Me,
|
|
1915
|
+
{
|
|
1916
|
+
data: x,
|
|
1917
|
+
weeklyData: u,
|
|
1918
|
+
avgQuestionLastMonth: G,
|
|
1919
|
+
dayOfWeek: J,
|
|
1920
|
+
months: te,
|
|
1921
|
+
timeOfDay: q.optionDate,
|
|
1922
|
+
classFontSize: le,
|
|
1923
|
+
handleHoverTooltip: se,
|
|
1924
|
+
weeks: K,
|
|
1925
|
+
onActiveColumn: ce,
|
|
1926
|
+
activeColumn: ge,
|
|
1927
|
+
titleChart: "emotional_well_being",
|
|
1928
|
+
percent: C.emotional,
|
|
1929
|
+
setTimeChart: U,
|
|
1930
|
+
interventionLogs: ke.emotional
|
|
1931
|
+
}
|
|
1932
|
+
)
|
|
1933
|
+
},
|
|
1934
|
+
{
|
|
1935
|
+
label: "spiritual",
|
|
1936
|
+
component: /* @__PURE__ */ t(
|
|
1937
|
+
Me,
|
|
1938
|
+
{
|
|
1939
|
+
data: I,
|
|
1940
|
+
weeklyData: T,
|
|
1941
|
+
avgQuestionLastMonth: G,
|
|
1942
|
+
dayOfWeek: J,
|
|
1943
|
+
months: te,
|
|
1944
|
+
timeOfDay: q.optionDate,
|
|
1945
|
+
classFontSize: le,
|
|
1946
|
+
handleHoverTooltip: se,
|
|
1947
|
+
weeks: K,
|
|
1948
|
+
onActiveColumn: ce,
|
|
1949
|
+
activeColumn: de,
|
|
1950
|
+
titleChart: "spiritual_well_being",
|
|
1951
|
+
percent: C.selfCare,
|
|
1952
|
+
setTimeChart: U,
|
|
1953
|
+
interventionLogs: ke.spiritual
|
|
1954
|
+
}
|
|
1955
|
+
)
|
|
1956
|
+
},
|
|
1957
|
+
{
|
|
1958
|
+
label: "environment",
|
|
1959
|
+
component: /* @__PURE__ */ t(
|
|
1960
|
+
Me,
|
|
1961
|
+
{
|
|
1962
|
+
data: A,
|
|
1963
|
+
weeklyData: W,
|
|
1964
|
+
avgQuestionLastMonth: G,
|
|
1965
|
+
dayOfWeek: J,
|
|
1966
|
+
months: te,
|
|
1967
|
+
timeOfDay: q.optionDate,
|
|
1968
|
+
classFontSize: le,
|
|
1969
|
+
handleHoverTooltip: se,
|
|
1970
|
+
weeks: K,
|
|
1971
|
+
onActiveColumn: ce,
|
|
1972
|
+
activeColumn: E,
|
|
1973
|
+
titleChart: "environment_well_being",
|
|
1974
|
+
percent: C.environment,
|
|
1975
|
+
setTimeChart: U,
|
|
1976
|
+
interventionLogs: ke.environment
|
|
1977
|
+
}
|
|
1978
|
+
)
|
|
1979
|
+
},
|
|
1980
|
+
{
|
|
1981
|
+
label: "intellectual",
|
|
1982
|
+
component: /* @__PURE__ */ t(
|
|
1983
|
+
Me,
|
|
1984
|
+
{
|
|
1985
|
+
data: Y,
|
|
1986
|
+
weeklyData: oe,
|
|
1987
|
+
avgQuestionLastMonth: G,
|
|
1988
|
+
dayOfWeek: J,
|
|
1989
|
+
months: te,
|
|
1990
|
+
timeOfDay: q.optionDate,
|
|
1991
|
+
classFontSize: le,
|
|
1992
|
+
handleHoverTooltip: se,
|
|
1993
|
+
weeks: K,
|
|
1994
|
+
onActiveColumn: ce,
|
|
1995
|
+
activeColumn: re,
|
|
1996
|
+
titleChart: "intellectual_well_being",
|
|
1997
|
+
percent: C.intellectual,
|
|
1998
|
+
setTimeChart: U,
|
|
1999
|
+
interventionLogs: ke.intellectual
|
|
2000
|
+
}
|
|
2001
|
+
)
|
|
2002
|
+
},
|
|
2003
|
+
{
|
|
2004
|
+
label: "open_field_questions",
|
|
2005
|
+
component: /* @__PURE__ */ t(
|
|
2006
|
+
Xn,
|
|
2007
|
+
{
|
|
2008
|
+
handleChangeQuestionFilter: R,
|
|
2009
|
+
handleRedirectAllAnswer: H,
|
|
2010
|
+
questionFilters: F,
|
|
2011
|
+
openFieldQuestions: z
|
|
2012
|
+
}
|
|
2013
|
+
)
|
|
2014
|
+
}
|
|
2015
|
+
], [
|
|
2016
|
+
s,
|
|
2017
|
+
h,
|
|
2018
|
+
v,
|
|
2019
|
+
w,
|
|
2020
|
+
x,
|
|
2021
|
+
u,
|
|
2022
|
+
I,
|
|
2023
|
+
T,
|
|
2024
|
+
A,
|
|
2025
|
+
W,
|
|
2026
|
+
Y,
|
|
2027
|
+
oe,
|
|
2028
|
+
G,
|
|
2029
|
+
J,
|
|
2030
|
+
te,
|
|
2031
|
+
K,
|
|
2032
|
+
q,
|
|
2033
|
+
pe,
|
|
2034
|
+
ge,
|
|
2035
|
+
E,
|
|
2036
|
+
re,
|
|
2037
|
+
P,
|
|
2038
|
+
de,
|
|
2039
|
+
z,
|
|
2040
|
+
F,
|
|
2041
|
+
C,
|
|
2042
|
+
ke,
|
|
2043
|
+
He
|
|
2044
|
+
]);
|
|
2045
|
+
return /* @__PURE__ */ l(j, { className: `${m["plp-content"]} ${m["wellbeing-content"]} ${m[le]}`, children: [
|
|
2046
|
+
/* @__PURE__ */ l(j, { className: `${m["plp-header"]}`, children: [
|
|
2047
|
+
/* @__PURE__ */ l(j, { className: `${m["header-top"]}`, children: [
|
|
2048
|
+
/* @__PURE__ */ t(ae, { className: `${m["plp-title"]}`, children: r("teachers_well_being_dashboard") }),
|
|
2049
|
+
/* @__PURE__ */ l(ln, { className: `${m["header-top-right"]}`, children: [
|
|
2050
|
+
/* @__PURE__ */ l(
|
|
2051
|
+
Le,
|
|
2052
|
+
{
|
|
2053
|
+
className: `${m["btn-log-intervention"]}`,
|
|
2054
|
+
onClick: () => k(!0),
|
|
2055
|
+
children: [
|
|
2056
|
+
/* @__PURE__ */ t(Ve, { color: "#ffffff" }),
|
|
2057
|
+
/* @__PURE__ */ t("div", { children: r("log_intervention") })
|
|
2058
|
+
]
|
|
2059
|
+
}
|
|
2060
|
+
),
|
|
2061
|
+
/* @__PURE__ */ l(
|
|
2062
|
+
Le,
|
|
2063
|
+
{
|
|
2064
|
+
className: `${m["plp-export"]}`,
|
|
2065
|
+
onClick: $,
|
|
2066
|
+
children: [
|
|
2067
|
+
/* @__PURE__ */ t("div", { children: r("export") }),
|
|
2068
|
+
/* @__PURE__ */ t(mn, { opacity: 0.56, color: "#316CD9" })
|
|
2069
|
+
]
|
|
2070
|
+
}
|
|
2071
|
+
),
|
|
2072
|
+
/* @__PURE__ */ t(
|
|
2073
|
+
rn,
|
|
2074
|
+
{
|
|
2075
|
+
id: M,
|
|
2076
|
+
open: c,
|
|
2077
|
+
anchorEl: De,
|
|
2078
|
+
onClose: ue,
|
|
2079
|
+
anchorOrigin: {
|
|
2080
|
+
vertical: "bottom",
|
|
2081
|
+
horizontal: "right"
|
|
2082
|
+
},
|
|
2083
|
+
transformOrigin: {
|
|
2084
|
+
vertical: "top",
|
|
2085
|
+
horizontal: "right"
|
|
2086
|
+
},
|
|
2087
|
+
children: /* @__PURE__ */ t(ee, { p: 2, display: "flex", flexDirection: "column", style: { gap: 8 }, children: /* @__PURE__ */ t(
|
|
2088
|
+
"button",
|
|
2089
|
+
{
|
|
2090
|
+
className: `${m["plp-export__btn"]}`,
|
|
2091
|
+
type: "button",
|
|
2092
|
+
onClick: () => {
|
|
2093
|
+
ve(), ue();
|
|
2094
|
+
},
|
|
2095
|
+
children: r("export_to_pdf")
|
|
2096
|
+
}
|
|
2097
|
+
) })
|
|
2098
|
+
}
|
|
2099
|
+
)
|
|
2100
|
+
] })
|
|
2101
|
+
] }),
|
|
2102
|
+
/* @__PURE__ */ t(ae, { className: `${m["plp-description"]}`, children: r("understand_the_metrics_about_the_educators_wellness_and_environment") }),
|
|
2103
|
+
/* @__PURE__ */ t(
|
|
2104
|
+
Kn,
|
|
2105
|
+
{
|
|
2106
|
+
fontSizeInputSelect: 16,
|
|
2107
|
+
endDate: q.endDate || null,
|
|
2108
|
+
startDate: q.startDate || null,
|
|
2109
|
+
onChangeFilterCalendar: g,
|
|
2110
|
+
onChangeEndDateChart: e,
|
|
2111
|
+
onChangeStartDateChart: fe,
|
|
2112
|
+
optionDate: q.optionDate,
|
|
2113
|
+
onClearFilter: Fe,
|
|
2114
|
+
onSaveFilter: ne
|
|
2115
|
+
}
|
|
2116
|
+
),
|
|
2117
|
+
/* @__PURE__ */ l(j, { className: `${m["list-total"]} flex-wrap`, children: [
|
|
2118
|
+
/* @__PURE__ */ t(
|
|
2119
|
+
qe,
|
|
2120
|
+
{
|
|
2121
|
+
iconSrc: "total-checkin-icon.png",
|
|
2122
|
+
label: r("total_check_ins"),
|
|
2123
|
+
value: y.totalWellbeing,
|
|
2124
|
+
customClassName: "card-wellbeing",
|
|
2125
|
+
customClassNameBootStrap: "flex-fill w-auto",
|
|
2126
|
+
loadingComplete: !0
|
|
2127
|
+
}
|
|
2128
|
+
),
|
|
2129
|
+
/* @__PURE__ */ t(
|
|
2130
|
+
qe,
|
|
2131
|
+
{
|
|
2132
|
+
iconSrc: "teacher-wellbeing-setup/engagement.png",
|
|
2133
|
+
label: r("engagement"),
|
|
2134
|
+
value: `${Number(y.totalEngagement).toLocaleString(void 0, {
|
|
2135
|
+
minimumFractionDigits: 0,
|
|
2136
|
+
maximumFractionDigits: 2
|
|
2137
|
+
})}%`,
|
|
2138
|
+
customClassName: "card-wellbeing",
|
|
2139
|
+
customClassNameBootStrap: "flex-fill w-auto",
|
|
2140
|
+
loadingComplete: !0
|
|
2141
|
+
}
|
|
2142
|
+
),
|
|
2143
|
+
/* @__PURE__ */ t(
|
|
2144
|
+
qe,
|
|
2145
|
+
{
|
|
2146
|
+
iconSrc: "total-conversation-icon.png",
|
|
2147
|
+
label: r("total_1_1_requested"),
|
|
2148
|
+
value: y.totalConversation,
|
|
2149
|
+
customClassName: "card-wellbeing",
|
|
2150
|
+
customClassNameBootStrap: "flex-fill w-auto"
|
|
2151
|
+
}
|
|
2152
|
+
),
|
|
2153
|
+
/* @__PURE__ */ t(
|
|
2154
|
+
qe,
|
|
2155
|
+
{
|
|
2156
|
+
iconSrc: "teacher-wellbeing-setup/miss-wellbeing.png",
|
|
2157
|
+
label: r("educators_without_check_ins"),
|
|
2158
|
+
value: L.length,
|
|
2159
|
+
customClassName: "card-wellbeing",
|
|
2160
|
+
handleOpenModal: Z,
|
|
2161
|
+
customClassNameBootStrap: "flex-fill w-auto"
|
|
2162
|
+
}
|
|
2163
|
+
),
|
|
2164
|
+
/* @__PURE__ */ t(
|
|
2165
|
+
qe,
|
|
2166
|
+
{
|
|
2167
|
+
iconSrc: "",
|
|
2168
|
+
label: r("interventions"),
|
|
2169
|
+
value: Je.length,
|
|
2170
|
+
customClassName: "card-wellbeing",
|
|
2171
|
+
handleOpenModal: Ne,
|
|
2172
|
+
customClassNameBootStrap: "flex-fill w-auto"
|
|
2173
|
+
}
|
|
2174
|
+
)
|
|
2175
|
+
] })
|
|
2176
|
+
] }),
|
|
2177
|
+
/* @__PURE__ */ l(j, { className: m["content-container"], children: [
|
|
2178
|
+
/* @__PURE__ */ t(j, { className: m["content-navigation"], children: Qe.map((be) => /* @__PURE__ */ t(
|
|
2179
|
+
ae,
|
|
2180
|
+
{
|
|
2181
|
+
onClick: () => b(be.label),
|
|
2182
|
+
className: `${m["nav-item"]} ${m[n === be.label ? "nav-item-active" : "nav-label"]}`,
|
|
2183
|
+
style: { textTransform: "capitalize" },
|
|
2184
|
+
children: r(be.label)
|
|
2185
|
+
},
|
|
2186
|
+
be.label
|
|
2187
|
+
)) }),
|
|
2188
|
+
/* @__PURE__ */ t(j, { className: m["content-component"], children: Qe.find((be) => be.label === n)?.component })
|
|
2189
|
+
] }),
|
|
2190
|
+
/* @__PURE__ */ t(
|
|
2191
|
+
ai,
|
|
2192
|
+
{
|
|
2193
|
+
open: Te,
|
|
2194
|
+
onClose: p,
|
|
2195
|
+
staffCount: L.length,
|
|
2196
|
+
onSendRequest: O
|
|
2197
|
+
}
|
|
2198
|
+
),
|
|
2199
|
+
/* @__PURE__ */ t(
|
|
2200
|
+
ti,
|
|
2201
|
+
{
|
|
2202
|
+
toggle: ve,
|
|
2203
|
+
modal: X,
|
|
2204
|
+
selectedToPrint: i,
|
|
2205
|
+
handleSelectToPrint: me,
|
|
2206
|
+
filter: q,
|
|
2207
|
+
schoolName: S,
|
|
2208
|
+
avgQuestionLastMonth: G,
|
|
2209
|
+
dayOfWeek: J,
|
|
2210
|
+
months: te,
|
|
2211
|
+
weeks: K,
|
|
2212
|
+
physical: s,
|
|
2213
|
+
physicalWeekly: h,
|
|
2214
|
+
relationships: v,
|
|
2215
|
+
relationshipsWeekly: w,
|
|
2216
|
+
emotional: x,
|
|
2217
|
+
emotionalWeekly: u,
|
|
2218
|
+
selfCare: I,
|
|
2219
|
+
selfCareWeekly: T,
|
|
2220
|
+
environment: A,
|
|
2221
|
+
environmentWeekly: W,
|
|
2222
|
+
intellectual: Y,
|
|
2223
|
+
intellectualWeekly: oe,
|
|
2224
|
+
activeColumnPhysical: pe,
|
|
2225
|
+
activeColumnEmotional: ge,
|
|
2226
|
+
activeColumnEnvironment: E,
|
|
2227
|
+
activeColumnIntellectual: re,
|
|
2228
|
+
activeColumnRelationships: P,
|
|
2229
|
+
activeColumnSelfCare: de,
|
|
2230
|
+
percentDoneBySection: C,
|
|
2231
|
+
timeChart: Q
|
|
2232
|
+
}
|
|
2233
|
+
),
|
|
2234
|
+
/* @__PURE__ */ t(
|
|
2235
|
+
ni,
|
|
2236
|
+
{
|
|
2237
|
+
open: f,
|
|
2238
|
+
onClose: _,
|
|
2239
|
+
...Pe
|
|
2240
|
+
}
|
|
2241
|
+
),
|
|
2242
|
+
/* @__PURE__ */ t(
|
|
2243
|
+
ii,
|
|
2244
|
+
{
|
|
2245
|
+
open: Re,
|
|
2246
|
+
onClose: Xe,
|
|
2247
|
+
interventionLogsByTab: Ke,
|
|
2248
|
+
handleSendCheckInNow: Ze,
|
|
2249
|
+
areaOptions: et,
|
|
2250
|
+
selectedArea: tt,
|
|
2251
|
+
setSelectedArea: nt
|
|
2252
|
+
}
|
|
2253
|
+
)
|
|
2254
|
+
] });
|
|
2255
|
+
};
|
|
2256
|
+
export {
|
|
2257
|
+
$i as default
|
|
2258
|
+
};
|