mario-education 2.0.303-staging → 2.0.304-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,1151 @@
1
+ import { jsx as s, jsxs as l } from "react/jsx-runtime";
2
+ import { Input as Ge, Label as Ve } from "reactstrap";
3
+ import { setAlert as I, useTranslation as Ie, useGradeLabel as je, setLoading as q, DATE_FORMAT as ze, getFileUrl as Ye, getStaticFileUrl as X } from "mario-core";
4
+ import { i as he, c as He } from "./constants-DIJYleep.js";
5
+ import { useState as P, useCallback as K, useEffect as te, useRef as Je, useMemo as Ke } from "react";
6
+ import { useDispatch as Fe, useSelector as Ce } from "react-redux";
7
+ import { Formik as Oe } from "formik";
8
+ import * as R from "yup";
9
+ import { Select as pe, MenuItem as Q, CircularProgress as We, TextField as Te, ToggleButtonGroup as Xe, ToggleButton as de, Radio as Ze, Checkbox as Qe, ListItemText as es } from "@mui/material";
10
+ import { LocalizationProvider as ss, DatePicker as rs } from "@mui/x-date-pickers";
11
+ import as from "moment";
12
+ import { F as Ne, O as ye, I as Re, V as be, g as ke, b as os, d as ns, e as ts, f as is, h as ls, i as Le, s as cs, j as ds } from "./OutlinedInput-GHOgUYxu.js";
13
+ import { D as Be } from "./constants-BFuKt1_p.js";
14
+ import { D as xe } from "./DoneCheckInIcon-3Yg4kjqY.js";
15
+ import { g as ms, a as us } from "./userService-C7yjwsZq.js";
16
+ import { s as ps } from "./styles.module-BJ4dhumc.js";
17
+ import { A as fs } from "./AdapterMoment-CeMS9jLD.js";
18
+ import { V as Ee } from "./Visibility-DfnRrRU-.js";
19
+ import { I as De } from "./IconButton-0EHnPPJj.js";
20
+ import { useNavigate as hs, useParams as gs } from "react-router-dom";
21
+ import { format as _s } from "date-fns";
22
+ const vs = "_name_1koi9_205", Ss = "_role_1koi9_217", ws = "_item_1koi9_230", Ts = "_gender_1koi9_323", Ns = "_gender__item_1koi9_328", a = {
23
+ "profile-value": "_profile-value_1koi9_77",
24
+ "input-error": "_input-error_1koi9_94",
25
+ "user-profile-container-admin": "_user-profile-container-admin_1koi9_122",
26
+ "user-profile-container-admin__left": "_user-profile-container-admin__left_1koi9_135",
27
+ "user-profile-container-admin__left--information": "_user-profile-container-admin__left--information_1koi9_146",
28
+ "image-user-container": "_image-user-container_1koi9_154",
29
+ "image-user-container__image": "_image-user-container__image_1koi9_169",
30
+ "image-user-container__edit-btn": "_image-user-container__edit-btn_1koi9_176",
31
+ "image-user-container__delete-btn": "_image-user-container__delete-btn_1koi9_190",
32
+ "name-role-container": "_name-role-container_1koi9_205",
33
+ name: vs,
34
+ role: Ss,
35
+ "user-profile-container-admin__left--btn-control": "_user-profile-container-admin__left--btn-control_1koi9_224",
36
+ item: ws,
37
+ "item-active": "_item-active_1koi9_246",
38
+ "user-profile-container-admin__right": "_user-profile-container-admin__right_1koi9_274",
39
+ "edit-profile-container": "_edit-profile-container_1koi9_285",
40
+ "edit-profile-container__title": "_edit-profile-container__title_1koi9_290",
41
+ "edit-profile-container__form": "_edit-profile-container__form_1koi9_297",
42
+ "edit-profile-container__form--row": "_edit-profile-container__form--row_1koi9_302",
43
+ "edit-profile-container__form--field": "_edit-profile-container__form--field_1koi9_307",
44
+ gender: Ts,
45
+ gender__item: Ns,
46
+ "edit-profile-container__form--width-50": "_edit-profile-container__form--width-50_1koi9_334",
47
+ "edit-profile-container__form--width-30": "_edit-profile-container__form--width-30_1koi9_337",
48
+ "edit-profile-container__form--width-70": "_edit-profile-container__form--width-70_1koi9_340",
49
+ "edit-profile-container__form--btn-group": "_edit-profile-container__form--btn-group_1koi9_343",
50
+ "btn-save": "_btn-save_1koi9_349",
51
+ "btn-cancel": "_btn-cancel_1koi9_371"
52
+ };
53
+ var Z = /* @__PURE__ */ ((n) => (n.Info = "info", n.ForgotPassword = "forgotPassword", n.DownloadUserData = "downloadUserData", n.ChangePassword = "changePassword", n))(Z || {});
54
+ const me = [
55
+ {
56
+ value: "info",
57
+ label: "Personal Information",
58
+ icon: "/images/user/User.svg",
59
+ isControl: !0
60
+ },
61
+ {
62
+ value: "changePassword",
63
+ label: "Change Password",
64
+ icon: "/images/user/Lock.svg",
65
+ isControl: !1
66
+ },
67
+ {
68
+ value: "forgotPassword",
69
+ label: "Send Forgot Password Link",
70
+ icon: "/images/user/Lock.svg",
71
+ isControl: !1
72
+ },
73
+ {
74
+ value: "downloadUserData",
75
+ label: "Download User Data",
76
+ icon: "/images/user/Log-out.svg",
77
+ isControl: !1
78
+ }
79
+ ], Ue = ["Admin", "Assistant", "Teacher", "Counselor", "General ED teacher", "SecondaryTeacher", "Parent", "Student"], ys = Ue, Rs = Ue, bs = Ue.filter((n) => n !== "SecondaryTeacher"), Es = (n) => n === "both" ? ["MS", "ES"] : [n.toUpperCase()], Ds = (n) => n === "both" ? "ES, MS" : n.toUpperCase(), fe = (n, t, h) => {
80
+ if (h) {
81
+ if (G.includes(h)) return "hs";
82
+ if (j.includes(h)) return "ms";
83
+ if (V.includes(h)) return "es";
84
+ }
85
+ const S = (n || "").toUpperCase();
86
+ if (S === "ES, MS") return "both";
87
+ if (S === "ES") return "es";
88
+ if (S === "HS") return "hs";
89
+ if (S === "MS") return "ms";
90
+ const g = (t || []).includes("MS"), u = (t || []).includes("ES");
91
+ return (t || []).includes("HS") && !g && !u ? "hs" : u && !g ? "es" : "ms";
92
+ }, f = {
93
+ ADMIN: "Admin",
94
+ TEACHER: "Teacher",
95
+ ASSISTANT: "Assistant",
96
+ EDUTEACHER: "General ED teacher",
97
+ STUDENT: "Student",
98
+ PARENT: "Parent"
99
+ }, Cs = [
100
+ {
101
+ value: !0,
102
+ label: "Active"
103
+ },
104
+ {
105
+ value: !1,
106
+ label: "Inactive"
107
+ }
108
+ ], ue = [
109
+ "K",
110
+ "G",
111
+ "1",
112
+ "2",
113
+ "3",
114
+ "4",
115
+ "5",
116
+ "6",
117
+ "7",
118
+ "8",
119
+ "9",
120
+ "10",
121
+ "11",
122
+ "12",
123
+ ...he ? ["12/13"] : [],
124
+ "13",
125
+ ...He ? ["PCS"] : []
126
+ ], V = ["K", "G", "1", "2", "3", "4", "5", ...he ? ["6"] : []], j = [...he ? [] : ["6"], "7", "8"], G = ["9", "10", "11", "12", ...he ? ["12/13"] : [], "13", ...He ? ["PCS"] : []], Me = ["Student"], Us = R.object({
127
+ firstName: R.string().required("First name is required"),
128
+ lastName: R.string().required("Last name is required"),
129
+ email: R.string().email("Email is invalid").required("Email is required"),
130
+ appTypes: R.array().of(R.string()).min(1, "School tier is required"),
131
+ msRoles: R.array().of(R.string()).test(
132
+ "ms-role-required",
133
+ "MS role is required",
134
+ (n, t) => {
135
+ const h = fe(t.parent.preferredAppType, t.parent.appTypes, t.parent.gradeLevel);
136
+ return h !== "ms" && h !== "both" ? !0 : !!n && n.length > 0;
137
+ }
138
+ ),
139
+ hsRoles: R.array().of(R.string()).test(
140
+ "hs-role-required",
141
+ "HS role is required",
142
+ (n, t) => fe(t.parent.preferredAppType, t.parent.appTypes, t.parent.gradeLevel) !== "hs" ? !0 : !!n && n.length > 0
143
+ ),
144
+ esRoles: R.array().of(R.string()).test(
145
+ "es-role-required",
146
+ "ES role is required",
147
+ (n, t) => {
148
+ const h = fe(t.parent.preferredAppType, t.parent.appTypes, t.parent.gradeLevel);
149
+ return h !== "es" && h !== "both" ? !0 : !!n && n.length > 0;
150
+ }
151
+ ),
152
+ gradeLevel: R.string().nullable().test(
153
+ "grade-level-required",
154
+ "Grade level is required",
155
+ (n, t) => {
156
+ const h = t.parent.msRoles || [], S = t.parent.esRoles || [], g = t.parent.hsRoles || [];
157
+ return h.includes("Student") || S.includes("Student") || g.includes("Student") ? !!n : !0;
158
+ }
159
+ )
160
+ }), Ps = {
161
+ currentPage: 1,
162
+ pageSize: 100
163
+ }, As = (n, t) => {
164
+ const [h, S] = P([]), [g, u] = P(!1), [b, w] = P(Ps), [k, N] = P(), _ = Fe(), H = K(async () => {
165
+ u(!0);
166
+ try {
167
+ const r = (await ms(b)).data?.items || [];
168
+ S(F(r));
169
+ } catch {
170
+ _(I({
171
+ type: "error",
172
+ message: "Cannot get roster users"
173
+ }));
174
+ }
175
+ u(!1);
176
+ }, [JSON.stringify(b)]), ee = K(async () => {
177
+ if (!t) return;
178
+ const i = h.find((r) => r.value === t);
179
+ if (i) {
180
+ N(i);
181
+ return;
182
+ }
183
+ u(!0);
184
+ try {
185
+ const M = (await us(t)).data;
186
+ N({
187
+ label: O(M),
188
+ value: M.sourcedId
189
+ });
190
+ } catch (r) {
191
+ console.log("err:", r);
192
+ }
193
+ u(!1);
194
+ }, [t]), F = (i) => i.map((r) => ({
195
+ label: O(r),
196
+ value: r.sourcedId
197
+ })), O = (i) => {
198
+ const r = [], { givenName: M, middleName: T, familyName: y, email: U, role: E } = i, v = [];
199
+ return M && v.push(M), T && v.push(T), y && v.push(y), v.length && r.push(v.join(" ")), U && r.push(U), `${r.join(" - ")}${E ? ` (${E})` : ""}`;
200
+ }, z = (i) => {
201
+ w((r) => ({ ...r, searchString: i }));
202
+ }, L = K((i) => {
203
+ w({
204
+ ...b,
205
+ ...i
206
+ });
207
+ }, [JSON.stringify(b)]);
208
+ return te(() => {
209
+ b.roles?.length && H();
210
+ }, [JSON.stringify(b)]), te(() => {
211
+ L({
212
+ roles: n
213
+ });
214
+ }, [JSON.stringify(n)]), te(() => {
215
+ ee();
216
+ }, [t]), {
217
+ users: h,
218
+ isLoading: g,
219
+ user: k,
220
+ handleInputChange: z
221
+ };
222
+ }, ks = ({ value: n, roles: t, onChange: h }) => {
223
+ const {
224
+ users: S,
225
+ isLoading: g,
226
+ user: u,
227
+ handleInputChange: b
228
+ } = As(t, n);
229
+ return /* @__PURE__ */ s(
230
+ pe,
231
+ {
232
+ label: "Select user",
233
+ value: u?.value || "",
234
+ onChange: (w) => {
235
+ h(w.target.value);
236
+ },
237
+ onOpen: () => b(""),
238
+ disabled: g,
239
+ className: `${ps["profile-value"]}`,
240
+ variant: "outlined",
241
+ children: g ? /* @__PURE__ */ s(Q, { disabled: !0, children: /* @__PURE__ */ s(We, { size: 20 }) }) : S.length > 0 ? S.map((w) => /* @__PURE__ */ s(Q, { value: w.value, children: `${w.label}` }, w.value)) : /* @__PURE__ */ s(Q, { disabled: !0, children: "No users found" })
242
+ }
243
+ );
244
+ }, Ls = ({
245
+ userDetail: n,
246
+ confirmData: t,
247
+ goBack: h,
248
+ teacherOptions: S,
249
+ getDataTeachers: g,
250
+ id: u,
251
+ checkHasTeacher: b,
252
+ setCheckHasTeacher: w,
253
+ userHasData: k,
254
+ currentRoles: N
255
+ }) => {
256
+ const { t: _ } = Ie(), H = Je(null), F = Ce((L) => L.common.user)?.hasEsSchool !== !1, { getLabel: O, system: z } = je();
257
+ return /* @__PURE__ */ l("div", { className: a["edit-profile-container"], children: [
258
+ /* @__PURE__ */ s("div", { className: a["edit-profile-container__title"], children: `${u ? "Edit User Profile" : "Create User"}` }),
259
+ /* @__PURE__ */ s(
260
+ Oe,
261
+ {
262
+ initialValues: n,
263
+ enableReinitialize: !0,
264
+ onSubmit: (L) => {
265
+ t(L);
266
+ },
267
+ validationSchema: Us,
268
+ children: (L) => {
269
+ const { values: i, setFieldValue: r, handleSubmit: M, errors: T, touched: y } = L, U = Object.keys(T);
270
+ U.length && document.querySelector(`input[name=${U[0]}]`)?.scrollIntoView({
271
+ behavior: "smooth",
272
+ block: "center"
273
+ });
274
+ const E = i?.appTypes || [], v = E.includes("MS"), ge = E.includes("ES"), se = E.includes("HS"), re = i?.msRoles || [], W = i?.esRoles || [], ie = i?.hsRoles || [], D = re.includes(f.STUDENT) || W.includes(f.STUDENT) || ie.includes(f.STUDENT), A = F ? D && (i?.preferredAppType === "HS" || i?.preferredAppType === "MS") ? i.preferredAppType.toLowerCase() : fe(i?.preferredAppType, E, i?.gradeLevel) : D ? i?.preferredAppType === "HS" ? "hs" : i?.preferredAppType === "MS" ? "ms" : i?.gradeLevel && G.includes(i.gradeLevel) ? "hs" : "ms" : "ms", le = A === "ms" || A === "both", _e = A === "hs" || A === "both", ce = A === "es" || A === "both", ae = D ? A === "es" ? ue.filter((o) => V.includes(o)) : A === "hs" ? ue.filter((o) => G.includes(o)) : ue.filter((o) => j.includes(o)) : ue, ve = (o) => {
275
+ const m = o.target.value;
276
+ r("gradeLevel", m), D && (G.includes(m) ? (r("preferredAppType", "HS"), r("hsRoles", [f.STUDENT]), r("msRoles", []), r("esRoles", []), u || r("appTypes", ["HS"])) : j.includes(m) ? (r("preferredAppType", "MS"), r("msRoles", [f.STUDENT]), r("hsRoles", []), r("esRoles", []), u || r("appTypes", ["MS"])) : V.includes(m) && (r("preferredAppType", "ES"), r("esRoles", [f.STUDENT]), r("msRoles", []), r("hsRoles", []), u || r("appTypes", ["ES"])));
277
+ }, Se = (o, m) => {
278
+ if (!m) return;
279
+ const B = Es(m), e = Ds(m), d = (c) => {
280
+ const p = n?.gradeLevel;
281
+ return c === "hs" ? p && G.includes(p) ? p : G[0] : c === "ms" ? p && j.includes(p) ? p : j[0] ?? "6" : c === "es" ? p && V.includes(p) ? p : V[0] : i?.gradeLevel;
282
+ };
283
+ u ? (r("preferredAppType", e), D && (m === "es" ? (r("esRoles", [f.STUDENT]), r("msRoles", []), r("hsRoles", [])) : m === "hs" ? (r("hsRoles", [f.STUDENT]), r("msRoles", []), r("esRoles", [])) : m === "ms" && (r("msRoles", [f.STUDENT]), r("hsRoles", []), r("esRoles", [])), m === "hs" && i?.gradeLevel && G.includes(i.gradeLevel) || m === "ms" && i?.gradeLevel && j.includes(i.gradeLevel) || m === "es" && i?.gradeLevel && V.includes(i.gradeLevel) || r("gradeLevel", d(m)))) : (r("appTypes", B), r("preferredAppType", e), D && (m === "es" ? (r("esRoles", [f.STUDENT]), r("msRoles", []), r("hsRoles", [])) : m === "hs" ? (r("hsRoles", [f.STUDENT]), r("msRoles", []), r("esRoles", [])) : m === "ms" && (r("msRoles", [f.STUDENT]), r("hsRoles", []), r("esRoles", [])), g(m === "es" ? "ES" : "MS"), m === "hs" && i?.gradeLevel && G.includes(i.gradeLevel) || m === "ms" && i?.gradeLevel && j.includes(i.gradeLevel) || m === "es" && i?.gradeLevel && V.includes(i.gradeLevel) || r("gradeLevel", d(m))));
284
+ }, oe = N?.MS?.includes(f.STUDENT) || N?.ES?.includes(f.STUDENT) || N?.HS?.includes(f.STUDENT), we = (o) => (m) => {
285
+ const B = m.target.value, e = o === "MS" ? "msRoles" : o === "ES" ? "esRoles" : "hsRoles", d = o === "MS" ? ["esRoles", "hsRoles"] : o === "ES" ? ["msRoles", "hsRoles"] : ["msRoles", "esRoles"], c = H.current, p = k?.[o] ?? {};
286
+ if (u && (p.isHasTeacherData && c === "Teacher" || p.isHasAssistantData && c === "Assistant" || p.isHasCounselorData && c === "Counselor" || p.isHasSecondaryTeacherData && c === "SecondaryTeacher" || c === "Student" && (p.isHasAssistantData || p.isHasCounselorData || p.isHasSecondaryTeacherData || p.isHasTeacherData))) {
287
+ alert("Please switch data before removing the role");
288
+ return;
289
+ }
290
+ if (oe && !B.includes(f.STUDENT)) {
291
+ alert("Student account cannot be changed to another role");
292
+ return;
293
+ }
294
+ const $ = i?.[e] || [], x = B.some((J) => Me.includes(J)) ? c && !$.includes(c) ? [c] : [B.find((J) => Me.includes(J))].filter(Boolean) : B, Pe = $.includes(f.STUDENT), Ae = x.includes(f.STUDENT);
295
+ if (r(e, x), H.current = null, Ae) {
296
+ const J = o;
297
+ r("preferredAppType", J), d.forEach((qe) => r(qe, [])), u || (r("appTypes", [J]), g(o === "ES" ? "ES" : "MS"));
298
+ } else Pe && !Ae && d.forEach((J) => r(J, []));
299
+ }, ne = (o) => {
300
+ const m = o === "MS" ? "msRoles" : o === "ES" ? "esRoles" : "hsRoles", B = o === "MS" ? re : o === "ES" ? W : i?.hsRoles || [], e = o === "MS" ? ys : o === "ES" ? bs : Rs, d = N?.[o] || [];
301
+ return /* @__PURE__ */ l("div", { className: `${a["edit-profile-container__form--field"]} ${le && ce ? a["edit-profile-container__form--width-50"] : ""}`, children: [
302
+ /* @__PURE__ */ l("p", { children: [
303
+ F && /* @__PURE__ */ s("span", { style: {
304
+ display: "inline-block",
305
+ fontSize: 11,
306
+ fontWeight: 700,
307
+ color: "#3b4ba8",
308
+ backgroundColor: "#e9ecfb",
309
+ borderRadius: 4,
310
+ padding: "1px 6px",
311
+ marginRight: 6,
312
+ verticalAlign: "middle"
313
+ }, children: o }),
314
+ F ? o === "HS" ? "High school roles" : o === "MS" ? "Middle school roles" : "Elementary school roles" : o === "HS" ? "High school roles" : o === "MS" ? "Middle school roles" : "Roles",
315
+ " ",
316
+ /* @__PURE__ */ s("sup", { children: "*" })
317
+ ] }),
318
+ /* @__PURE__ */ s(
319
+ pe,
320
+ {
321
+ variant: "outlined",
322
+ multiple: !0,
323
+ name: m,
324
+ value: B,
325
+ renderValue: (c) => c.map((p) => p === "SecondaryTeacher" ? "Support Teacher" : p).join(", "),
326
+ onChange: we(o),
327
+ className: `${a["profile-value"]}`,
328
+ children: e.map((c) => {
329
+ const p = u ? oe ? c !== f.STUDENT : c === f.STUDENT || ["Parent"].includes(c) || d.some(($) => ["Student", "Parent", "General ED teacher"].includes($)) : ["Parent"].includes(c) || D && c !== f.STUDENT;
330
+ return /* @__PURE__ */ l(
331
+ Q,
332
+ {
333
+ value: c,
334
+ disabled: p,
335
+ onClick: () => {
336
+ H.current = c;
337
+ },
338
+ children: [
339
+ /* @__PURE__ */ s(Qe, { checked: B.includes(c) }),
340
+ /* @__PURE__ */ s(es, { primary: c === "SecondaryTeacher" ? "Support Teacher" : c })
341
+ ]
342
+ },
343
+ c
344
+ );
345
+ })
346
+ }
347
+ ),
348
+ T[m] && y[m] ? /* @__PURE__ */ s("div", { className: `${a["input-error"]}`, children: T[m] }) : null
349
+ ] });
350
+ };
351
+ return /* @__PURE__ */ l("div", { className: a["edit-profile-container__form"], children: [
352
+ /* @__PURE__ */ l("div", { className: a["edit-profile-container__form--row"], children: [
353
+ /* @__PURE__ */ l("div", { className: `${a["edit-profile-container__form--field"]} ${a["edit-profile-container__form--width-50"]}`, children: [
354
+ /* @__PURE__ */ l("p", { children: [
355
+ _("first_name"),
356
+ " ",
357
+ /* @__PURE__ */ s("sup", { children: "*" })
358
+ ] }),
359
+ /* @__PURE__ */ s(
360
+ Te,
361
+ {
362
+ name: "firstName",
363
+ variant: "outlined",
364
+ value: i?.firstName || "",
365
+ onChange: (o) => r("firstName", o.target.value)
366
+ }
367
+ ),
368
+ T.firstName && y.firstName ? /* @__PURE__ */ s("div", { className: `${a["input-error"]}`, children: T.firstName }) : null
369
+ ] }),
370
+ /* @__PURE__ */ l("div", { className: `${a["edit-profile-container__form--field"]} ${a["edit-profile-container__form--width-50"]}`, children: [
371
+ /* @__PURE__ */ l("p", { children: [
372
+ _("last_name"),
373
+ " ",
374
+ /* @__PURE__ */ s("sup", { children: "*" })
375
+ ] }),
376
+ /* @__PURE__ */ s(
377
+ Te,
378
+ {
379
+ name: "lastName",
380
+ variant: "outlined",
381
+ className: `${a["profile-value"]}`,
382
+ value: i?.lastName || "",
383
+ onChange: (o) => r("lastName", o.target.value)
384
+ }
385
+ ),
386
+ T.lastName && y.lastName ? /* @__PURE__ */ s("div", { className: `${a["input-error"]}`, children: T.lastName }) : null
387
+ ] })
388
+ ] }),
389
+ /* @__PURE__ */ l("div", { className: a["edit-profile-container__form--row"], children: [
390
+ /* @__PURE__ */ l("div", { className: `${a["edit-profile-container__form--field"]} ${a["edit-profile-container__form--width-30"]}`, children: [
391
+ /* @__PURE__ */ l("p", { children: [
392
+ " ",
393
+ _("date_of_birth")
394
+ ] }),
395
+ /* @__PURE__ */ s(ss, { dateAdapter: fs, children: /* @__PURE__ */ s(
396
+ rs,
397
+ {
398
+ format: "Do MMM YYYY",
399
+ value: i?.dateOfBirth && !Be.includes(i?.dateOfBirth) ? as(i?.dateOfBirth) : null,
400
+ onChange: (o) => {
401
+ if (o) {
402
+ const m = o.format("YYYY-MM-DD");
403
+ r("dateOfBirth", m);
404
+ } else
405
+ r("dateOfBirth", null);
406
+ },
407
+ slotProps: {
408
+ textField: {
409
+ variant: "outlined",
410
+ id: "time-picker",
411
+ className: `${a["profile-value"]}`
412
+ },
413
+ openPickerButton: {
414
+ "aria-label": "change date"
415
+ }
416
+ }
417
+ }
418
+ ) })
419
+ ] }),
420
+ /* @__PURE__ */ l("div", { className: `${a["edit-profile-container__form--field"]} ${a["edit-profile-container__form--width-70"]}`, children: [
421
+ /* @__PURE__ */ l("p", { children: [
422
+ _("email"),
423
+ " ",
424
+ /* @__PURE__ */ s("sup", { children: "*" })
425
+ ] }),
426
+ /* @__PURE__ */ s(
427
+ Te,
428
+ {
429
+ name: "email",
430
+ variant: "outlined",
431
+ className: `${a["profile-value"]}`,
432
+ value: i?.email || "",
433
+ onChange: (o) => r("email", o.target.value)
434
+ }
435
+ ),
436
+ T.email && y.email ? /* @__PURE__ */ s("div", { className: `${a["input-error"]}`, children: T.email }) : null
437
+ ] })
438
+ ] }),
439
+ /* @__PURE__ */ l("div", { style: { border: "1px solid #e0e0e0", borderRadius: "12px", marginBottom: "24px", overflow: "hidden" }, children: [
440
+ F && /* @__PURE__ */ s("div", { style: { backgroundColor: "#f8f9fa", padding: "16px 24px", borderBottom: "1px solid #e0e0e0" }, children: /* @__PURE__ */ l("div", { className: `${a["edit-profile-container__form--field"]}`, style: { marginBottom: 0, width: "100%" }, children: [
441
+ /* @__PURE__ */ l("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
442
+ /* @__PURE__ */ l("div", { children: [
443
+ /* @__PURE__ */ l("p", { style: { marginBottom: 4, fontWeight: 600, fontSize: 16 }, children: [
444
+ "School tier ",
445
+ /* @__PURE__ */ s("sup", { children: "*" })
446
+ ] }),
447
+ /* @__PURE__ */ s("p", { style: { fontSize: 13, color: "#6c757d", marginTop: 0, marginBottom: 0 }, children: "Pick a tier. Roles are assigned per tier." })
448
+ ] }),
449
+ /* @__PURE__ */ l(
450
+ Xe,
451
+ {
452
+ exclusive: !0,
453
+ value: A,
454
+ onChange: Se,
455
+ size: "small",
456
+ sx: {
457
+ border: "1px solid #e0e0e0",
458
+ borderRadius: "30px",
459
+ padding: "4px",
460
+ backgroundColor: "#fff",
461
+ "& .MuiToggleButton-root": {
462
+ border: "none",
463
+ borderRadius: "30px !important",
464
+ textTransform: "none",
465
+ padding: "6px 20px",
466
+ margin: "0",
467
+ color: "#6c757d",
468
+ fontWeight: 500,
469
+ fontSize: 14,
470
+ "&.Mui-selected": {
471
+ backgroundColor: "#2b65d9",
472
+ color: "#fff",
473
+ "&:hover": {
474
+ backgroundColor: "#1d4ed8"
475
+ }
476
+ }
477
+ }
478
+ },
479
+ children: [
480
+ /* @__PURE__ */ s(de, { value: "ms", disabled: !!u && !v && !se && D, children: "Middle school" }),
481
+ /* @__PURE__ */ s(de, { value: "hs", disabled: !!u && !v && !se && D, children: "High school" }),
482
+ /* @__PURE__ */ s(de, { value: "es", disabled: !!u && !ge && D, children: "Elementary" }),
483
+ !D && /* @__PURE__ */ s(de, { value: "both", disabled: !1, children: "All" })
484
+ ]
485
+ }
486
+ )
487
+ ] }),
488
+ T.appTypes && y.appTypes ? /* @__PURE__ */ s("div", { className: `${a["input-error"]}`, children: T.appTypes }) : null
489
+ ] }) }),
490
+ /* @__PURE__ */ l("div", { style: { backgroundColor: "#fff", padding: "24px", display: "flex", flexDirection: "column", gap: "24px" }, children: [
491
+ /* @__PURE__ */ l("div", { className: a["edit-profile-container__form--row"], style: { margin: 0 }, children: [
492
+ ce && ne("ES"),
493
+ le && ne("MS")
494
+ ] }),
495
+ _e && /* @__PURE__ */ s("div", { className: a["edit-profile-container__form--row"], style: { margin: 0 }, children: ne("HS") })
496
+ ] })
497
+ ] }),
498
+ /* @__PURE__ */ s("div", { className: a["edit-profile-container__form--row"], children: /* @__PURE__ */ l("div", { className: `${a["edit-profile-container__form--field"]} ${a["edit-profile-container__form--width-50"]}`, children: [
499
+ /* @__PURE__ */ s("p", { children: _("status") }),
500
+ /* @__PURE__ */ s("div", { className: `${a.gender}`, children: Cs.map((o) => /* @__PURE__ */ l("div", { className: `${a.gender__item}`, children: [
501
+ /* @__PURE__ */ s(
502
+ Ze,
503
+ {
504
+ color: "primary",
505
+ value: o.value,
506
+ checked: i?.isActive === o.value,
507
+ onChange: () => r("isActive", o.value),
508
+ disabled: !!u && !!i?.isImportedFromIntegration
509
+ }
510
+ ),
511
+ o.label
512
+ ] }, o.label)) })
513
+ ] }) }),
514
+ D && !u && !!S && /* @__PURE__ */ s("div", { className: a["edit-profile-container__form--row"], children: /* @__PURE__ */ l("div", { className: `${a["edit-profile-container__form--field"]}`, children: [
515
+ /* @__PURE__ */ l("p", { children: [
516
+ "Assign Teacher ",
517
+ /* @__PURE__ */ s("sup", { children: "*" })
518
+ ] }),
519
+ /* @__PURE__ */ s(
520
+ pe,
521
+ {
522
+ multiple: !0,
523
+ variant: "outlined",
524
+ name: "teacherUserId",
525
+ value: i?.teacherUserId || [],
526
+ renderValue: (o) => S.filter((m) => o.includes(m.value)).map((m) => m.label).join(", "),
527
+ onChange: (o) => {
528
+ const m = o.target.value;
529
+ r("teacherUserId", m), w(!!m.length);
530
+ },
531
+ className: `${a["profile-value"]}`,
532
+ children: S?.map((o) => /* @__PURE__ */ s(Q, { value: o.value, children: o.label }, o.value))
533
+ }
534
+ ),
535
+ !b && /* @__PURE__ */ s("div", { className: `${a["input-error"]}`, children: "Teacher is required" })
536
+ ] }) }),
537
+ D && /* @__PURE__ */ s("div", { className: a["edit-profile-container__form--row"], children: /* @__PURE__ */ l("div", { className: `${a["edit-profile-container__form--field"]} ${a["edit-profile-container__form--width-50"]}`, children: [
538
+ /* @__PURE__ */ l("p", { children: [
539
+ " ",
540
+ z === "UK" ? "Year" : _("grade_level"),
541
+ " ",
542
+ /* @__PURE__ */ s("sup", { children: "*" })
543
+ ] }),
544
+ /* @__PURE__ */ l(
545
+ pe,
546
+ {
547
+ variant: "outlined",
548
+ value: i?.gradeLevel ?? "",
549
+ renderValue: (o) => O(o),
550
+ onChange: ve,
551
+ className: `${a["profile-value"]}`,
552
+ children: [
553
+ i?.gradeLevel && !ae.includes(i.gradeLevel) && /* @__PURE__ */ s(Q, { value: i.gradeLevel, sx: { display: "none" }, children: O(i.gradeLevel) }, "__current__"),
554
+ ae.map((o) => /* @__PURE__ */ s(Q, { value: o, children: O(o) }, o))
555
+ ]
556
+ }
557
+ ),
558
+ T.gradeLevel && y.gradeLevel ? /* @__PURE__ */ s("div", { className: `${a["input-error"]}`, children: T.gradeLevel }) : null
559
+ ] }) }),
560
+ !D && (!!re.length || !!W.length) && !!u && /* @__PURE__ */ s("div", { className: a["edit-profile-container__form--row"], children: /* @__PURE__ */ l("div", { className: `${a["edit-profile-container__form--field"]} ${a["edit-profile-container__form--width-50"]}`, children: [
561
+ /* @__PURE__ */ s("p", { children: _("Map from Roster") }),
562
+ /* @__PURE__ */ s(
563
+ ks,
564
+ {
565
+ roles: [...re, ...W],
566
+ value: i.sourcedId,
567
+ onChange: (o) => r("sourcedId", o)
568
+ }
569
+ )
570
+ ] }) }),
571
+ /* @__PURE__ */ l("div", { className: a["edit-profile-container__form--btn-group"], children: [
572
+ /* @__PURE__ */ s(
573
+ "button",
574
+ {
575
+ type: "button",
576
+ className: a["btn-cancel"],
577
+ onClick: () => h(),
578
+ children: _("cancel")
579
+ }
580
+ ),
581
+ /* @__PURE__ */ l(
582
+ "button",
583
+ {
584
+ type: "button",
585
+ className: a["btn-save"],
586
+ onClick: () => M(),
587
+ children: [
588
+ /* @__PURE__ */ s(xe, { color: "#fff" }),
589
+ _("save_changes")
590
+ ]
591
+ }
592
+ )
593
+ ] })
594
+ ] });
595
+ }
596
+ }
597
+ )
598
+ ] });
599
+ }, C = {
600
+ "input-error": "_input-error_gmvmh_1",
601
+ "change-password-container": "_change-password-container_gmvmh_6",
602
+ "change-password-container__title": "_change-password-container__title_gmvmh_11",
603
+ "change-password-container__form": "_change-password-container__form_gmvmh_19",
604
+ "change-password-container__form--field": "_change-password-container__form--field_gmvmh_24",
605
+ "change-password-container__form--description": "_change-password-container__form--description_gmvmh_38",
606
+ "change-password-container__form--btn-group": "_change-password-container__form--btn-group_gmvmh_54",
607
+ "btn-save": "_btn-save_gmvmh_60",
608
+ "btn-cancel": "_btn-cancel_gmvmh_82"
609
+ }, Ms = R.object({
610
+ oldPassword: R.string().required("Old password is required"),
611
+ newPassword: R.string().required("New password is required"),
612
+ confirmedNewPassword: R.string().oneOf([R.ref("newPassword"), void 0], "New password must match").required("Confirm your new password")
613
+ }), $s = ({ confirmChangePassword: n, goBack: t }) => {
614
+ const { t: h } = Ie();
615
+ return /* @__PURE__ */ l("div", { className: C["change-password-container"], children: [
616
+ /* @__PURE__ */ s("div", { className: C["change-password-container__title"], children: h("change_password") }),
617
+ /* @__PURE__ */ s(
618
+ Oe,
619
+ {
620
+ initialValues: {
621
+ oldPassword: "",
622
+ newPassword: "",
623
+ confirmedNewPassword: "",
624
+ showOldPassword: !1,
625
+ showNewPassword: !1,
626
+ showConfirmNewPassword: !1
627
+ },
628
+ enableReinitialize: !0,
629
+ onSubmit: (S) => {
630
+ n(S);
631
+ },
632
+ validateOnChange: !1,
633
+ validateOnBlur: !1,
634
+ validationSchema: Ms,
635
+ children: (S) => {
636
+ const { values: g, setFieldValue: u, handleSubmit: b, errors: w, touched: k } = S, N = Object.keys(w);
637
+ return N.length && document.querySelector(
638
+ `input[name=${N[0]}]`
639
+ )?.scrollIntoView({
640
+ behavior: "smooth",
641
+ block: "center"
642
+ }), /* @__PURE__ */ l("div", { className: C["change-password-container__form"], children: [
643
+ /* @__PURE__ */ l("div", { className: `${C["change-password-container__form--field"]}`, children: [
644
+ /* @__PURE__ */ s("p", { children: h("old_password") }),
645
+ /* @__PURE__ */ s(
646
+ Ne,
647
+ {
648
+ variant: "outlined",
649
+ className: `${C["input-field"]}`,
650
+ children: /* @__PURE__ */ s(
651
+ ye,
652
+ {
653
+ type: g.showOldPassword ? "text" : "password",
654
+ value: g?.oldPassword,
655
+ onChange: (_) => u(
656
+ "oldPassword",
657
+ _.target.value.trim()
658
+ ),
659
+ endAdornment: /* @__PURE__ */ s(Re, { position: "end", children: /* @__PURE__ */ s(
660
+ De,
661
+ {
662
+ "aria-label": "toggle password visibility",
663
+ onClick: () => u(
664
+ "showOldPassword",
665
+ !g.showOldPassword
666
+ ),
667
+ onMouseDown: (_) => _.preventDefault(),
668
+ children: g.showOldPassword ? /* @__PURE__ */ s(Ee, { color: "primary" }) : /* @__PURE__ */ s(be, { color: "primary" })
669
+ }
670
+ ) })
671
+ }
672
+ )
673
+ }
674
+ ),
675
+ w.oldPassword && k.oldPassword && /* @__PURE__ */ s("div", { className: `${C["input-error"]}`, children: w.oldPassword })
676
+ ] }),
677
+ /* @__PURE__ */ l("div", { className: `${C["change-password-container__form--field"]}`, children: [
678
+ /* @__PURE__ */ s("p", { children: h("new_password") }),
679
+ /* @__PURE__ */ s(
680
+ Ne,
681
+ {
682
+ variant: "outlined",
683
+ className: `${C["input-field"]}`,
684
+ children: /* @__PURE__ */ s(
685
+ ye,
686
+ {
687
+ type: g.showNewPassword ? "text" : "password",
688
+ value: g?.newPassword,
689
+ onChange: (_) => u(
690
+ "newPassword",
691
+ _.target.value.trim()
692
+ ),
693
+ endAdornment: /* @__PURE__ */ s(Re, { position: "end", children: /* @__PURE__ */ s(
694
+ De,
695
+ {
696
+ "aria-label": "toggle password visibility",
697
+ onClick: () => u(
698
+ "showNewPassword",
699
+ !g.showNewPassword
700
+ ),
701
+ onMouseDown: (_) => _.preventDefault(),
702
+ children: g.showNewPassword ? /* @__PURE__ */ s(Ee, { color: "primary" }) : /* @__PURE__ */ s(be, { color: "primary" })
703
+ }
704
+ ) })
705
+ }
706
+ )
707
+ }
708
+ ),
709
+ w.newPassword && k.newPassword && /* @__PURE__ */ s("div", { className: `${C["input-error"]}`, children: w.newPassword }),
710
+ /* @__PURE__ */ l("div", { className: `${C["change-password-container__form--description"]}`, children: [
711
+ "Password must contain at least: 1 uppercase letter, 1 lowercase letter,",
712
+ /* @__PURE__ */ s("br", {}),
713
+ " 1 number, and 1 special character"
714
+ ] })
715
+ ] }),
716
+ /* @__PURE__ */ l("div", { className: `${C["change-password-container__form--field"]}`, children: [
717
+ /* @__PURE__ */ s("p", { children: h("confirm_new_password") }),
718
+ /* @__PURE__ */ s(
719
+ Ne,
720
+ {
721
+ variant: "outlined",
722
+ className: `${C["input-field"]}`,
723
+ children: /* @__PURE__ */ s(
724
+ ye,
725
+ {
726
+ type: g.showConfirmNewPassword ? "text" : "password",
727
+ value: g?.confirmedNewPassword,
728
+ onChange: (_) => u(
729
+ "confirmedNewPassword",
730
+ _.target.value.trim()
731
+ ),
732
+ endAdornment: /* @__PURE__ */ s(Re, { position: "end", children: /* @__PURE__ */ s(
733
+ De,
734
+ {
735
+ "aria-label": "toggle password visibility",
736
+ onClick: () => u(
737
+ "showConfirmNewPassword",
738
+ !g.showConfirmNewPassword
739
+ ),
740
+ onMouseDown: (_) => _.preventDefault(),
741
+ children: g.showConfirmNewPassword ? /* @__PURE__ */ s(Ee, { color: "primary" }) : /* @__PURE__ */ s(be, { color: "primary" })
742
+ }
743
+ ) })
744
+ }
745
+ )
746
+ }
747
+ ),
748
+ w.confirmedNewPassword && k.confirmedNewPassword && /* @__PURE__ */ s("div", { className: `${C["input-error"]}`, children: w.confirmedNewPassword })
749
+ ] }),
750
+ /* @__PURE__ */ l("div", { className: C["change-password-container__form--btn-group"], children: [
751
+ /* @__PURE__ */ s(
752
+ "button",
753
+ {
754
+ type: "button",
755
+ className: C["btn-cancel"],
756
+ onClick: () => {
757
+ t();
758
+ },
759
+ children: h("cancel")
760
+ }
761
+ ),
762
+ /* @__PURE__ */ l(
763
+ "button",
764
+ {
765
+ type: "button",
766
+ className: C["btn-save"],
767
+ onClick: () => b(),
768
+ children: [
769
+ /* @__PURE__ */ s(xe, { color: "#fff" }),
770
+ h("save_new_password")
771
+ ]
772
+ }
773
+ )
774
+ ] })
775
+ ] });
776
+ }
777
+ }
778
+ )
779
+ ] });
780
+ }, Is = {
781
+ id: "",
782
+ firstName: "",
783
+ lastName: "",
784
+ email: "",
785
+ dateOfBirth: Be,
786
+ msRoles: [],
787
+ esRoles: [],
788
+ hsRoles: [],
789
+ isActive: !0,
790
+ profileImageFileName: "",
791
+ teacherUserId: [],
792
+ gradeLevel: "",
793
+ currentGradeLevel: "",
794
+ isImportedFromIntegration: !1,
795
+ // Man tao moi mac dinh MS; man edit se duoc getData ghi de bang appType tu API
796
+ appTypes: ["MS"],
797
+ preferredAppType: "MS"
798
+ }, $e = "/admin/users/user-list", Hs = "User detail", Fs = 12, Os = 20, Bs = (n) => {
799
+ const t = Fe(), h = hs(), S = Ce((e) => e.common.user), g = Ce((e) => e.common?.defaultFontSize), [u, b] = P(Is), [w, k] = P(null), [N, _] = P(!1), [H, ee] = P({ MS: [], ES: [], HS: [] }), [F, O] = P([]), [z, L] = P(!1), [i, r] = P(Z.Info), [M, T] = P(!0), [y, U] = P({}), E = async () => {
800
+ localStorage.setItem(window.location.href, "true"), _(!0);
801
+ }, v = () => {
802
+ L(!z);
803
+ }, ge = Ke(() => g == Os ? "font-large" : g == Fs ? "font-small" : "", [g]);
804
+ te(() => {
805
+ document.title = Hs, _(!1), localStorage.getItem(window.location.href) && localStorage.removeItem(window.location.href);
806
+ }, []), te(() => {
807
+ n && re(), !n && ae();
808
+ }, [n]);
809
+ const se = (e = []) => e.includes("EduTeacher") ? [...e.filter((d) => d !== "EduTeacher"), f.EDUTEACHER] : e, re = K(async () => {
810
+ t(q(!0));
811
+ try {
812
+ const e = await ke(n), d = (e.data.appTypeRaw || e.data.appType || "MS").toUpperCase(), c = d.includes("MS"), p = d.includes("ES"), $ = d.includes("HS"), Y = [];
813
+ p && Y.push("ES"), c && Y.push("MS"), $ && Y.push("HS"), Y.length === 0 && Y.push("MS");
814
+ let x = e.data.preferredAppType || d;
815
+ ((e.data.roles || []).includes("Student") || (e.data.msRoles || []).includes("Student") || (e.data.esRoles || []).includes("Student")) && e.data.gradeLevel && (G.includes(e.data.gradeLevel) ? x = "HS" : j.includes(e.data.gradeLevel) ? x = "MS" : V.includes(e.data.gradeLevel) && (x = "ES")), b({
816
+ ...e.data,
817
+ dateOfBirth: _s(new Date(e.data.dateOfBirth), ze),
818
+ msRoles: se(e.data.msRoles),
819
+ esRoles: se(e.data.esRoles),
820
+ hsRoles: se(e.data.hsRoles),
821
+ currentGradeLevel: e.data.gradeLevel,
822
+ appTypes: Y,
823
+ preferredAppType: x
824
+ }), ee({ MS: e.data.msRoles ?? [], ES: e.data.esRoles ?? [], HS: e.data.hsRoles ?? [] }), document.title = e.data?.fullName, (c || $) && W("MS"), p && W("ES");
825
+ } catch (e) {
826
+ t(
827
+ I({
828
+ type: "danger",
829
+ message: e.response?.data?.title || e.message
830
+ })
831
+ );
832
+ }
833
+ t(q(!1));
834
+ }, [n]), W = K(async (e) => {
835
+ t(q(!0));
836
+ try {
837
+ const d = await os(n, e);
838
+ U((c) => ({ ...c, [e]: d.data }));
839
+ } catch (d) {
840
+ t(
841
+ I({
842
+ type: "danger",
843
+ message: d.response?.data?.title || d.message
844
+ })
845
+ );
846
+ }
847
+ t(q(!1));
848
+ }, [n]), ie = K((e) => {
849
+ h(e && typeof e == "string" ? $e + `?query=${e}` : $e);
850
+ }, []), D = (e) => ["Student", "Parent", "EduTeacher"].includes(e), A = (e = []) => e.includes(f.EDUTEACHER) ? [...e.filter((d) => d !== f.EDUTEACHER), "EduTeacher"] : e, le = K(
851
+ async (e) => {
852
+ const d = e.msRoles?.includes(f.STUDENT) || e.esRoles?.includes(f.STUDENT) || e.hsRoles?.includes(f.STUDENT);
853
+ if (d && !n && !e.teacherUserId) {
854
+ T(!1);
855
+ return;
856
+ }
857
+ d && e.gradeLevel && (G.includes(e.gradeLevel) ? (e.preferredAppType = "HS", e.hsRoles = [f.STUDENT], e.msRoles = [], e.esRoles = []) : j.includes(e.gradeLevel) ? (e.preferredAppType = "MS", e.msRoles = [f.STUDENT], e.hsRoles = [], e.esRoles = []) : V.includes(e.gradeLevel) && (e.preferredAppType = "ES", e.esRoles = [f.STUDENT], e.msRoles = [], e.hsRoles = [])), t(q(!0));
858
+ try {
859
+ S?.hasEsSchool === !1 && (e.preferredAppType !== "HS" ? (e.appTypes = ["MS"], e.preferredAppType = "MS") : e.appTypes = ["HS"], e.esRoles = []);
860
+ const c = n ? ns : ts;
861
+ !n && delete e.id, e.teacherUserId = d ? e.teacherUserId : [], e.msRoles = A(e.msRoles), e.esRoles = A(e.esRoles), e.hsRoles = A(e.hsRoles), d && (e.preferredAppType === "HS" ? (e.hsRoles = [f.STUDENT], e.msRoles = [], e.esRoles = []) : e.preferredAppType === "ES" ? (e.esRoles = [f.STUDENT], e.msRoles = [], e.hsRoles = []) : (e.msRoles = [f.STUDENT], e.hsRoles = [], e.esRoles = [])), n || (e.profileImageFileName = w || "");
862
+ const p = await c(e);
863
+ p && ke(p.data.id).then(($) => {
864
+ ie($.data.fullName);
865
+ }), n || alert("Password of " + p.data.email + ` is "${p.data.password}"`), t(
866
+ I({
867
+ type: "success",
868
+ message: `${n ? "Update" : "Create"} user successfully`
869
+ })
870
+ );
871
+ } catch (c) {
872
+ t(
873
+ I({
874
+ type: "danger",
875
+ message: c.response?.data?.title || c.message
876
+ })
877
+ );
878
+ }
879
+ t(q(!1));
880
+ },
881
+ [n, w]
882
+ ), _e = async (e) => {
883
+ t(q(!0));
884
+ try {
885
+ await ds(e), t(
886
+ I({
887
+ type: "success",
888
+ message: "Change password successfully"
889
+ })
890
+ );
891
+ } catch (d) {
892
+ t(
893
+ I({
894
+ type: "danger",
895
+ message: d.response?.data?.title || d.message
896
+ })
897
+ );
898
+ }
899
+ t(q(!1));
900
+ }, ce = K(async (e) => {
901
+ t(q(!0));
902
+ try {
903
+ await is(e), t(
904
+ I({
905
+ type: "success",
906
+ message: "Send forgot password link successfully"
907
+ })
908
+ );
909
+ } catch (d) {
910
+ t(
911
+ I({
912
+ type: "danger",
913
+ message: d.response?.data?.title || d.message || "Error occured"
914
+ })
915
+ );
916
+ }
917
+ t(q(!1));
918
+ }, []), ae = async (e) => {
919
+ try {
920
+ const d = await ls({
921
+ sortBy: "Email"
922
+ }, e);
923
+ d.data && O(
924
+ (d.data.map?.((c) => ({
925
+ label: c.email,
926
+ value: c.id
927
+ })) || []).sort((c, p) => c.label.localeCompare(p.label))
928
+ );
929
+ } catch (d) {
930
+ t(
931
+ I({
932
+ type: "danger",
933
+ message: d.response?.data?.title || d.message
934
+ })
935
+ );
936
+ }
937
+ }, ve = 20097152, [Se, oe] = P(""), we = (e) => {
938
+ e.preventDefault();
939
+ let d = new FileReader(), c = e.target.files[0];
940
+ if (c.size > ve) {
941
+ t(
942
+ I({
943
+ type: "danger",
944
+ message: "File can't be larger than 2MB"
945
+ })
946
+ );
947
+ return;
948
+ }
949
+ d.onloadend = async () => {
950
+ if (oe(d.result), c) {
951
+ const p = new FormData(), { name: $ } = c;
952
+ p.append("file", c, $);
953
+ const x = (await cs(p))?.data?.key;
954
+ n ? await Le(u.id || "", x) : k(x);
955
+ }
956
+ }, c && d.readAsDataURL(c);
957
+ }, ne = async () => {
958
+ await Le(u.id || "", ""), oe("");
959
+ }, o = Se || Ye(u?.profileImageFileName), m = u?.profileImageFileName || "";
960
+ return {
961
+ userDetail: u,
962
+ getDataTeachers: ae,
963
+ backToList: ie,
964
+ confirmData: le,
965
+ file: w,
966
+ setFile: k,
967
+ edited: N,
968
+ currentRoles: H,
969
+ setEdited: _,
970
+ setEditedTrue: E,
971
+ confirmChangePassword: _e,
972
+ forgotPasswordRequest: ce,
973
+ handleDisableRoles: D,
974
+ classFontSize: ge,
975
+ teacherOptions: F,
976
+ handleToggleModel: v,
977
+ openModel: z,
978
+ user: S,
979
+ activeTab: i,
980
+ setActiveTab: r,
981
+ imageSrc: o,
982
+ imageUse: m,
983
+ handleImageChange: we,
984
+ handleDeleteAvatar: ne,
985
+ getFile: () => {
986
+ var e = window.location.origin + "/api/ExportDataUser/" + n;
987
+ window.open(e);
988
+ },
989
+ checkHasTeacher: M,
990
+ setCheckHasTeacher: T,
991
+ userHasData: y
992
+ };
993
+ }, xs = "/images/image-default.png", lr = () => {
994
+ const { id: n } = gs(), {
995
+ userDetail: t,
996
+ getDataTeachers: h,
997
+ backToList: S,
998
+ confirmData: g,
999
+ confirmChangePassword: u,
1000
+ forgotPasswordRequest: b,
1001
+ teacherOptions: w,
1002
+ user: k,
1003
+ activeTab: N,
1004
+ setActiveTab: _,
1005
+ imageSrc: H,
1006
+ handleImageChange: ee,
1007
+ handleDeleteAvatar: F,
1008
+ getFile: O,
1009
+ currentRoles: z,
1010
+ handleDisableRoles: L,
1011
+ checkHasTeacher: i,
1012
+ setCheckHasTeacher: r,
1013
+ userHasData: M
1014
+ } = Bs(n), T = [
1015
+ {
1016
+ value: Z.Info,
1017
+ component: /* @__PURE__ */ s(
1018
+ Ls,
1019
+ {
1020
+ id: n,
1021
+ goBack: S,
1022
+ userDetail: t,
1023
+ confirmData: g,
1024
+ teacherOptions: w,
1025
+ getDataTeachers: h,
1026
+ currentRoles: z,
1027
+ handleDisableRoles: L,
1028
+ checkHasTeacher: i,
1029
+ setCheckHasTeacher: r,
1030
+ userHasData: M
1031
+ }
1032
+ )
1033
+ },
1034
+ {
1035
+ value: Z.ChangePassword,
1036
+ component: /* @__PURE__ */ s(
1037
+ $s,
1038
+ {
1039
+ confirmChangePassword: u,
1040
+ goBack: S
1041
+ }
1042
+ )
1043
+ }
1044
+ ], y = me.find((v) => v.value === Z.ForgotPassword), U = me.find((v) => v.value === Z.DownloadUserData), E = me.find((v) => v.value === Z.ChangePassword);
1045
+ return /* @__PURE__ */ l("div", { className: a["user-profile-container-admin"], children: [
1046
+ /* @__PURE__ */ l("div", { className: a["user-profile-container-admin__left"], children: [
1047
+ /* @__PURE__ */ l("div", { className: a["user-profile-container-admin__left--information"], children: [
1048
+ /* @__PURE__ */ l("div", { className: a["image-user-container"], children: [
1049
+ /* @__PURE__ */ s(
1050
+ Ge,
1051
+ {
1052
+ className: "d-none",
1053
+ type: "file",
1054
+ id: "uploadFile",
1055
+ onChange: ee,
1056
+ accept: "image/*"
1057
+ }
1058
+ ),
1059
+ /* @__PURE__ */ s(
1060
+ "img",
1061
+ {
1062
+ src: H || X(xs),
1063
+ alt: "avatar",
1064
+ className: `${a["image-user-container__image"]}`
1065
+ }
1066
+ ),
1067
+ /* @__PURE__ */ s(
1068
+ Ve,
1069
+ {
1070
+ htmlFor: "uploadFile",
1071
+ role: "button",
1072
+ tabIndex: 0,
1073
+ children: /* @__PURE__ */ s("div", { className: a["image-user-container__edit-btn"], children: /* @__PURE__ */ s("img", { src: X("/images/user/Edit.svg"), alt: "edit-avatar" }) })
1074
+ }
1075
+ ),
1076
+ n && /* @__PURE__ */ s(
1077
+ "button",
1078
+ {
1079
+ type: "button",
1080
+ onClick: () => F(),
1081
+ className: a["image-user-container__delete-btn"],
1082
+ children: /* @__PURE__ */ s("img", { src: X("/images/user/DeleteAvatar.svg"), alt: "delete-avatar" })
1083
+ }
1084
+ )
1085
+ ] }),
1086
+ /* @__PURE__ */ l("div", { className: a["name-role-container"], children: [
1087
+ /* @__PURE__ */ s("div", { className: a.name, children: `${t?.firstName || ""} ${t?.lastName || ""}` }),
1088
+ /* @__PURE__ */ s("div", { className: a.role, children: Array.from(/* @__PURE__ */ new Set([...t?.msRoles || [], ...t?.esRoles || [], ...t?.hsRoles || []])).map((v) => v === "SecondaryTeacher" ? "Support Teacher" : v).join(", ") })
1089
+ ] })
1090
+ ] }),
1091
+ /* @__PURE__ */ l("div", { className: a["user-profile-container-admin__left--btn-control"], children: [
1092
+ me.filter((v) => v.isControl).map((v) => /* @__PURE__ */ l(
1093
+ "button",
1094
+ {
1095
+ type: "button",
1096
+ className: `${a.item} ${N === v.value ? a["item-active"] : ""}`,
1097
+ onClick: () => _(v.value),
1098
+ children: [
1099
+ /* @__PURE__ */ s("img", { src: X(v.icon), alt: v.icon }),
1100
+ v.label
1101
+ ]
1102
+ },
1103
+ v.value
1104
+ )),
1105
+ !!n && !!E && k?.id === n && /* @__PURE__ */ l(
1106
+ "button",
1107
+ {
1108
+ type: "button",
1109
+ className: `${a.item} ${N === E.value ? a["item-active"] : ""}`,
1110
+ onClick: () => _(E.value),
1111
+ children: [
1112
+ /* @__PURE__ */ s("img", { src: X(E.icon), alt: E.icon }),
1113
+ E.label
1114
+ ]
1115
+ },
1116
+ E.value
1117
+ ),
1118
+ n && y && /* @__PURE__ */ l(
1119
+ "button",
1120
+ {
1121
+ type: "button",
1122
+ className: `${a.item} ${N === y.value ? a["item-active"] : ""}`,
1123
+ onClick: () => b({ email: t?.email || "" }),
1124
+ children: [
1125
+ /* @__PURE__ */ s("img", { src: X(y.icon), alt: y.icon }),
1126
+ y.label
1127
+ ]
1128
+ },
1129
+ y.value
1130
+ ),
1131
+ n && U && /* @__PURE__ */ l(
1132
+ "button",
1133
+ {
1134
+ type: "button",
1135
+ className: `${a.item} ${N === U.value ? a["item-active"] : ""}`,
1136
+ onClick: () => O(),
1137
+ children: [
1138
+ /* @__PURE__ */ s("img", { src: X(U.icon), alt: U.icon }),
1139
+ U.label
1140
+ ]
1141
+ },
1142
+ U.value
1143
+ )
1144
+ ] })
1145
+ ] }),
1146
+ /* @__PURE__ */ s("div", { className: a["user-profile-container-admin__right"], children: T.find((v) => v.value === N)?.component })
1147
+ ] });
1148
+ };
1149
+ export {
1150
+ lr as default
1151
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),Te=require("reactstrap"),f=require("mario-core"),ee=require("./constants-CA6BDUYj.cjs"),v=require("react"),ae=require("react-redux"),je=require("formik"),Ae=require("yup"),x=require("@mui/material"),xe=require("@mui/x-date-pickers"),Ue=require("moment"),y=require("./OutlinedInput-CkBYF9FZ.cjs"),Re=require("./constants-B8KHkiDQ.cjs"),Ee=require("./DoneCheckInIcon-7Q31KvHI.cjs"),ye=require("./userService-DsbgpY7L.cjs"),ke=require("./styles.module-CHKJJ8Zm.cjs"),Pe=require("./AdapterMoment-B-q0UCj0.cjs"),ge=require("./Visibility-DoYLYxbn.cjs"),_e=require("./IconButton-DwLaeSCN.cjs"),Ce=require("react-router-dom"),Le=require("date-fns");function Me(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const p in t)if(p!=="default"){const w=Object.getOwnPropertyDescriptor(t,p);Object.defineProperty(n,p,w.get?w:{enumerable:!0,get:()=>t[p]})}}return n.default=t,Object.freeze(n)}const R=Me(Ae),Ie="_name_1koi9_205",$e="_role_1koi9_217",Fe="_item_1koi9_230",He="_gender_1koi9_323",Oe="_gender__item_1koi9_328",a={"profile-value":"_profile-value_1koi9_77","input-error":"_input-error_1koi9_94","user-profile-container-admin":"_user-profile-container-admin_1koi9_122","user-profile-container-admin__left":"_user-profile-container-admin__left_1koi9_135","user-profile-container-admin__left--information":"_user-profile-container-admin__left--information_1koi9_146","image-user-container":"_image-user-container_1koi9_154","image-user-container__image":"_image-user-container__image_1koi9_169","image-user-container__edit-btn":"_image-user-container__edit-btn_1koi9_176","image-user-container__delete-btn":"_image-user-container__delete-btn_1koi9_190","name-role-container":"_name-role-container_1koi9_205",name:Ie,role:$e,"user-profile-container-admin__left--btn-control":"_user-profile-container-admin__left--btn-control_1koi9_224",item:Fe,"item-active":"_item-active_1koi9_246","user-profile-container-admin__right":"_user-profile-container-admin__right_1koi9_274","edit-profile-container":"_edit-profile-container_1koi9_285","edit-profile-container__title":"_edit-profile-container__title_1koi9_290","edit-profile-container__form":"_edit-profile-container__form_1koi9_297","edit-profile-container__form--row":"_edit-profile-container__form--row_1koi9_302","edit-profile-container__form--field":"_edit-profile-container__form--field_1koi9_307",gender:He,gender__item:Oe,"edit-profile-container__form--width-50":"_edit-profile-container__form--width-50_1koi9_334","edit-profile-container__form--width-30":"_edit-profile-container__form--width-30_1koi9_337","edit-profile-container__form--width-70":"_edit-profile-container__form--width-70_1koi9_340","edit-profile-container__form--btn-group":"_edit-profile-container__form--btn-group_1koi9_343","btn-save":"_btn-save_1koi9_349","btn-cancel":"_btn-cancel_1koi9_371"};var W=(t=>(t.Info="info",t.ForgotPassword="forgotPassword",t.DownloadUserData="downloadUserData",t.ChangePassword="changePassword",t))(W||{});const le=[{value:"info",label:"Personal Information",icon:"/images/user/User.svg",isControl:!0},{value:"changePassword",label:"Change Password",icon:"/images/user/Lock.svg",isControl:!1},{value:"forgotPassword",label:"Send Forgot Password Link",icon:"/images/user/Lock.svg",isControl:!1},{value:"downloadUserData",label:"Download User Data",icon:"/images/user/Log-out.svg",isControl:!1}],Se=["Admin","Assistant","Teacher","Counselor","General ED teacher","SecondaryTeacher","Parent","Student"],qe=Se,Be=Se,Ve=Se.filter(t=>t!=="SecondaryTeacher"),Ge=t=>t==="both"?["MS","ES"]:[t.toUpperCase()],ze=t=>t==="both"?"ES, MS":t.toUpperCase(),de=(t,n,p)=>{if(p){if(B.includes(p))return"hs";if(G.includes(p))return"ms";if(V.includes(p))return"es"}const w=(t||"").toUpperCase();if(w==="ES, MS")return"both";if(w==="ES")return"es";if(w==="HS")return"hs";if(w==="MS")return"ms";const g=(n||[]).includes("MS"),u=(n||[]).includes("ES");return(n||[]).includes("HS")&&!g&&!u?"hs":u&&!g?"es":"ms"},h={ADMIN:"Admin",TEACHER:"Teacher",ASSISTANT:"Assistant",EDUTEACHER:"General ED teacher",STUDENT:"Student",PARENT:"Parent"},Ye=[{value:!0,label:"Active"},{value:!1,label:"Inactive"}],ce=["K","G","1","2","3","4","5","6","7","8","9","10","11","12",...ee.isMalvernCollege?["12/13"]:[],"13",...ee.isSaisSchool?["PCS"]:[]],V=["K","G","1","2","3","4","5",...ee.isMalvernCollege?["6"]:[]],G=[...ee.isMalvernCollege?[]:["6"],"7","8"],B=["9","10","11","12",...ee.isMalvernCollege?["12/13"]:[],"13",...ee.isSaisSchool?["PCS"]:[]],be=["Student"],Je=R.object({firstName:R.string().required("First name is required"),lastName:R.string().required("Last name is required"),email:R.string().email("Email is invalid").required("Email is required"),appTypes:R.array().of(R.string()).min(1,"School tier is required"),msRoles:R.array().of(R.string()).test("ms-role-required","MS role is required",(t,n)=>{const p=de(n.parent.preferredAppType,n.parent.appTypes,n.parent.gradeLevel);return p!=="ms"&&p!=="both"?!0:!!t&&t.length>0}),hsRoles:R.array().of(R.string()).test("hs-role-required","HS role is required",(t,n)=>de(n.parent.preferredAppType,n.parent.appTypes,n.parent.gradeLevel)!=="hs"?!0:!!t&&t.length>0),esRoles:R.array().of(R.string()).test("es-role-required","ES role is required",(t,n)=>{const p=de(n.parent.preferredAppType,n.parent.appTypes,n.parent.gradeLevel);return p!=="es"&&p!=="both"?!0:!!t&&t.length>0}),gradeLevel:R.string().nullable().test("grade-level-required","Grade level is required",(t,n)=>{const p=n.parent.msRoles||[],w=n.parent.esRoles||[],g=n.parent.hsRoles||[];return p.includes("Student")||w.includes("Student")||g.includes("Student")?!!t:!0})}),Ke={currentPage:1,pageSize:100},We=(t,n)=>{const[p,w]=v.useState([]),[g,u]=v.useState(!1),[E,T]=v.useState(Ke),[P,N]=v.useState(),_=ae.useDispatch(),$=v.useCallback(async()=>{u(!0);try{const r=(await ye.getRosterUsersApi(E)).data?.items||[];w(F(r))}catch{_(f.setAlert({type:"error",message:"Cannot get roster users"}))}u(!1)},[JSON.stringify(E)]),X=v.useCallback(async()=>{if(!n)return;const i=p.find(r=>r.value===n);if(i){N(i);return}u(!0);try{const M=(await ye.getRosterUserBySourcedIdApi(n)).data;N({label:H(M),value:M.sourcedId})}catch(r){console.log("err:",r)}u(!1)},[n]),F=i=>i.map(r=>({label:H(r),value:r.sourcedId})),H=i=>{const r=[],{givenName:M,middleName:b,familyName:j,email:U,role:C}=i,S=[];return M&&S.push(M),b&&S.push(b),j&&S.push(j),S.length&&r.push(S.join(" ")),U&&r.push(U),`${r.join(" - ")}${C?` (${C})`:""}`},z=i=>{T(r=>({...r,searchString:i}))},L=v.useCallback(i=>{T({...E,...i})},[JSON.stringify(E)]);return v.useEffect(()=>{E.roles?.length&&$()},[JSON.stringify(E)]),v.useEffect(()=>{L({roles:t})},[JSON.stringify(t)]),v.useEffect(()=>{X()},[n]),{users:p,isLoading:g,user:P,handleInputChange:z}},Xe=({value:t,roles:n,onChange:p})=>{const{users:w,isLoading:g,user:u,handleInputChange:E}=We(n,t);return e.jsx(x.Select,{label:"Select user",value:u?.value||"",onChange:T=>{p(T.target.value)},onOpen:()=>E(""),disabled:g,className:`${ke.styles["profile-value"]}`,variant:"outlined",children:g?e.jsx(x.MenuItem,{disabled:!0,children:e.jsx(x.CircularProgress,{size:20})}):w.length>0?w.map(T=>e.jsx(x.MenuItem,{value:T.value,children:`${T.label}`},T.value)):e.jsx(x.MenuItem,{disabled:!0,children:"No users found"})})},Ze=({userDetail:t,confirmData:n,goBack:p,teacherOptions:w,getDataTeachers:g,id:u,checkHasTeacher:E,setCheckHasTeacher:T,userHasData:P,currentRoles:N})=>{const{t:_}=f.useTranslation(),$=v.useRef(null),F=ae.useSelector(L=>L.common.user)?.hasEsSchool!==!1,{getLabel:H,system:z}=f.useGradeLabel();return e.jsxs("div",{className:a["edit-profile-container"],children:[e.jsx("div",{className:a["edit-profile-container__title"],children:`${u?"Edit User Profile":"Create User"}`}),e.jsx(je.Formik,{initialValues:t,enableReinitialize:!0,onSubmit:L=>{n(L)},validationSchema:Je,children:L=>{const{values:i,setFieldValue:r,handleSubmit:M,errors:b,touched:j}=L,U=Object.keys(b);U.length&&document.querySelector(`input[name=${U[0]}]`)?.scrollIntoView({behavior:"smooth",block:"center"});const C=i?.appTypes||[],S=C.includes("MS"),ue=C.includes("ES"),Z=C.includes("HS"),Q=i?.msRoles||[],K=i?.esRoles||[],ne=i?.hsRoles||[],D=Q.includes(h.STUDENT)||K.includes(h.STUDENT)||ne.includes(h.STUDENT),k=F?D&&(i?.preferredAppType==="HS"||i?.preferredAppType==="MS")?i.preferredAppType.toLowerCase():de(i?.preferredAppType,C,i?.gradeLevel):D?i?.preferredAppType==="HS"?"hs":i?.preferredAppType==="MS"?"ms":i?.gradeLevel&&B.includes(i.gradeLevel)?"hs":"ms":"ms",oe=k==="ms"||k==="both",pe=k==="hs"||k==="both",ie=k==="es"||k==="both",se=D?k==="es"?ce.filter(o=>V.includes(o)):k==="hs"?ce.filter(o=>B.includes(o)):ce.filter(o=>G.includes(o)):ce,me=o=>{const d=o.target.value;r("gradeLevel",d),D&&(B.includes(d)?(r("preferredAppType","HS"),r("hsRoles",[h.STUDENT]),r("msRoles",[]),r("esRoles",[]),u||r("appTypes",["HS"])):G.includes(d)?(r("preferredAppType","MS"),r("msRoles",[h.STUDENT]),r("hsRoles",[]),r("esRoles",[]),u||r("appTypes",["MS"])):V.includes(d)&&(r("preferredAppType","ES"),r("esRoles",[h.STUDENT]),r("msRoles",[]),r("hsRoles",[]),u||r("appTypes",["ES"])))},fe=(o,d)=>{if(!d)return;const O=Ge(d),s=ze(d),c=l=>{const m=t?.gradeLevel;return l==="hs"?m&&B.includes(m)?m:B[0]:l==="ms"?m&&G.includes(m)?m:G[0]??"6":l==="es"?m&&V.includes(m)?m:V[0]:i?.gradeLevel};u?(r("preferredAppType",s),D&&(d==="es"?(r("esRoles",[h.STUDENT]),r("msRoles",[]),r("hsRoles",[])):d==="hs"?(r("hsRoles",[h.STUDENT]),r("msRoles",[]),r("esRoles",[])):d==="ms"&&(r("msRoles",[h.STUDENT]),r("hsRoles",[]),r("esRoles",[])),d==="hs"&&i?.gradeLevel&&B.includes(i.gradeLevel)||d==="ms"&&i?.gradeLevel&&G.includes(i.gradeLevel)||d==="es"&&i?.gradeLevel&&V.includes(i.gradeLevel)||r("gradeLevel",c(d)))):(r("appTypes",O),r("preferredAppType",s),D&&(d==="es"?(r("esRoles",[h.STUDENT]),r("msRoles",[]),r("hsRoles",[])):d==="hs"?(r("hsRoles",[h.STUDENT]),r("msRoles",[]),r("esRoles",[])):d==="ms"&&(r("msRoles",[h.STUDENT]),r("hsRoles",[]),r("esRoles",[])),g(d==="es"?"ES":"MS"),d==="hs"&&i?.gradeLevel&&B.includes(i.gradeLevel)||d==="ms"&&i?.gradeLevel&&G.includes(i.gradeLevel)||d==="es"&&i?.gradeLevel&&V.includes(i.gradeLevel)||r("gradeLevel",c(d))))},re=N?.MS?.includes(h.STUDENT)||N?.ES?.includes(h.STUDENT)||N?.HS?.includes(h.STUDENT),he=o=>d=>{const O=d.target.value,s=o==="MS"?"msRoles":o==="ES"?"esRoles":"hsRoles",c=o==="MS"?["esRoles","hsRoles"]:o==="ES"?["msRoles","hsRoles"]:["msRoles","esRoles"],l=$.current,m=P?.[o]??{};if(u&&(m.isHasTeacherData&&l==="Teacher"||m.isHasAssistantData&&l==="Assistant"||m.isHasCounselorData&&l==="Counselor"||m.isHasSecondaryTeacherData&&l==="SecondaryTeacher"||l==="Student"&&(m.isHasAssistantData||m.isHasCounselorData||m.isHasSecondaryTeacherData||m.isHasTeacherData))){alert("Please switch data before removing the role");return}if(re&&!O.includes(h.STUDENT)){alert("Student account cannot be changed to another role");return}const I=i?.[s]||[],q=O.some(J=>be.includes(J))?l&&!I.includes(l)?[l]:[O.find(J=>be.includes(J))].filter(Boolean):O,ve=I.includes(h.STUDENT),we=q.includes(h.STUDENT);if(r(s,q),$.current=null,we){const J=o;r("preferredAppType",J),c.forEach(De=>r(De,[])),u||(r("appTypes",[J]),g(o==="ES"?"ES":"MS"))}else ve&&!we&&c.forEach(J=>r(J,[]))},te=o=>{const d=o==="MS"?"msRoles":o==="ES"?"esRoles":"hsRoles",O=o==="MS"?Q:o==="ES"?K:i?.hsRoles||[],s=o==="MS"?qe:o==="ES"?Ve:Be,c=N?.[o]||[];return e.jsxs("div",{className:`${a["edit-profile-container__form--field"]} ${oe&&ie?a["edit-profile-container__form--width-50"]:""}`,children:[e.jsxs("p",{children:[F&&e.jsx("span",{style:{display:"inline-block",fontSize:11,fontWeight:700,color:"#3b4ba8",backgroundColor:"#e9ecfb",borderRadius:4,padding:"1px 6px",marginRight:6,verticalAlign:"middle"},children:o}),F?o==="HS"?"High school roles":o==="MS"?"Middle school roles":"Elementary school roles":o==="HS"?"High school roles":o==="MS"?"Middle school roles":"Roles"," ",e.jsx("sup",{children:"*"})]}),e.jsx(x.Select,{variant:"outlined",multiple:!0,name:d,value:O,renderValue:l=>l.map(m=>m==="SecondaryTeacher"?"Support Teacher":m).join(", "),onChange:he(o),className:`${a["profile-value"]}`,children:s.map(l=>{const m=u?re?l!==h.STUDENT:l===h.STUDENT||["Parent"].includes(l)||c.some(I=>["Student","Parent","General ED teacher"].includes(I)):["Parent"].includes(l)||D&&l!==h.STUDENT;return e.jsxs(x.MenuItem,{value:l,disabled:m,onClick:()=>{$.current=l},children:[e.jsx(x.Checkbox,{checked:O.includes(l)}),e.jsx(x.ListItemText,{primary:l==="SecondaryTeacher"?"Support Teacher":l})]},l)})}),b[d]&&j[d]?e.jsx("div",{className:`${a["input-error"]}`,children:b[d]}):null]})};return e.jsxs("div",{className:a["edit-profile-container__form"],children:[e.jsxs("div",{className:a["edit-profile-container__form--row"],children:[e.jsxs("div",{className:`${a["edit-profile-container__form--field"]} ${a["edit-profile-container__form--width-50"]}`,children:[e.jsxs("p",{children:[_("first_name")," ",e.jsx("sup",{children:"*"})]}),e.jsx(x.TextField,{name:"firstName",variant:"outlined",value:i?.firstName||"",onChange:o=>r("firstName",o.target.value)}),b.firstName&&j.firstName?e.jsx("div",{className:`${a["input-error"]}`,children:b.firstName}):null]}),e.jsxs("div",{className:`${a["edit-profile-container__form--field"]} ${a["edit-profile-container__form--width-50"]}`,children:[e.jsxs("p",{children:[_("last_name")," ",e.jsx("sup",{children:"*"})]}),e.jsx(x.TextField,{name:"lastName",variant:"outlined",className:`${a["profile-value"]}`,value:i?.lastName||"",onChange:o=>r("lastName",o.target.value)}),b.lastName&&j.lastName?e.jsx("div",{className:`${a["input-error"]}`,children:b.lastName}):null]})]}),e.jsxs("div",{className:a["edit-profile-container__form--row"],children:[e.jsxs("div",{className:`${a["edit-profile-container__form--field"]} ${a["edit-profile-container__form--width-30"]}`,children:[e.jsxs("p",{children:[" ",_("date_of_birth")]}),e.jsx(xe.LocalizationProvider,{dateAdapter:Pe.AdapterMoment,children:e.jsx(xe.DatePicker,{format:"Do MMM YYYY",value:i?.dateOfBirth&&!Re.DATE_MIN_VALUE.includes(i?.dateOfBirth)?Ue(i?.dateOfBirth):null,onChange:o=>{if(o){const d=o.format("YYYY-MM-DD");r("dateOfBirth",d)}else r("dateOfBirth",null)},slotProps:{textField:{variant:"outlined",id:"time-picker",className:`${a["profile-value"]}`},openPickerButton:{"aria-label":"change date"}}})})]}),e.jsxs("div",{className:`${a["edit-profile-container__form--field"]} ${a["edit-profile-container__form--width-70"]}`,children:[e.jsxs("p",{children:[_("email")," ",e.jsx("sup",{children:"*"})]}),e.jsx(x.TextField,{name:"email",variant:"outlined",className:`${a["profile-value"]}`,value:i?.email||"",onChange:o=>r("email",o.target.value)}),b.email&&j.email?e.jsx("div",{className:`${a["input-error"]}`,children:b.email}):null]})]}),e.jsxs("div",{style:{border:"1px solid #e0e0e0",borderRadius:"12px",marginBottom:"24px",overflow:"hidden"},children:[F&&e.jsx("div",{style:{backgroundColor:"#f8f9fa",padding:"16px 24px",borderBottom:"1px solid #e0e0e0"},children:e.jsxs("div",{className:`${a["edit-profile-container__form--field"]}`,style:{marginBottom:0,width:"100%"},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsxs("div",{children:[e.jsxs("p",{style:{marginBottom:4,fontWeight:600,fontSize:16},children:["School tier ",e.jsx("sup",{children:"*"})]}),e.jsx("p",{style:{fontSize:13,color:"#6c757d",marginTop:0,marginBottom:0},children:"Pick a tier. Roles are assigned per tier."})]}),e.jsxs(x.ToggleButtonGroup,{exclusive:!0,value:k,onChange:fe,size:"small",sx:{border:"1px solid #e0e0e0",borderRadius:"30px",padding:"4px",backgroundColor:"#fff","& .MuiToggleButton-root":{border:"none",borderRadius:"30px !important",textTransform:"none",padding:"6px 20px",margin:"0",color:"#6c757d",fontWeight:500,fontSize:14,"&.Mui-selected":{backgroundColor:"#2b65d9",color:"#fff","&:hover":{backgroundColor:"#1d4ed8"}}}},children:[e.jsx(x.ToggleButton,{value:"ms",disabled:!!u&&!S&&!Z&&D,children:"Middle school"}),e.jsx(x.ToggleButton,{value:"hs",disabled:!!u&&!S&&!Z&&D,children:"High school"}),e.jsx(x.ToggleButton,{value:"es",disabled:!!u&&!ue&&D,children:"Elementary"}),!D&&e.jsx(x.ToggleButton,{value:"both",disabled:!1,children:"All"})]})]}),b.appTypes&&j.appTypes?e.jsx("div",{className:`${a["input-error"]}`,children:b.appTypes}):null]})}),e.jsxs("div",{style:{backgroundColor:"#fff",padding:"24px",display:"flex",flexDirection:"column",gap:"24px"},children:[e.jsxs("div",{className:a["edit-profile-container__form--row"],style:{margin:0},children:[ie&&te("ES"),oe&&te("MS")]}),pe&&e.jsx("div",{className:a["edit-profile-container__form--row"],style:{margin:0},children:te("HS")})]})]}),e.jsx("div",{className:a["edit-profile-container__form--row"],children:e.jsxs("div",{className:`${a["edit-profile-container__form--field"]} ${a["edit-profile-container__form--width-50"]}`,children:[e.jsx("p",{children:_("status")}),e.jsx("div",{className:`${a.gender}`,children:Ye.map(o=>e.jsxs("div",{className:`${a.gender__item}`,children:[e.jsx(x.Radio,{color:"primary",value:o.value,checked:i?.isActive===o.value,onChange:()=>r("isActive",o.value),disabled:!!u&&!!i?.isImportedFromIntegration}),o.label]},o.label))})]})}),D&&!u&&!!w&&e.jsx("div",{className:a["edit-profile-container__form--row"],children:e.jsxs("div",{className:`${a["edit-profile-container__form--field"]}`,children:[e.jsxs("p",{children:["Assign Teacher ",e.jsx("sup",{children:"*"})]}),e.jsx(x.Select,{multiple:!0,variant:"outlined",name:"teacherUserId",value:i?.teacherUserId||[],renderValue:o=>w.filter(d=>o.includes(d.value)).map(d=>d.label).join(", "),onChange:o=>{const d=o.target.value;r("teacherUserId",d),T(!!d.length)},className:`${a["profile-value"]}`,children:w?.map(o=>e.jsx(x.MenuItem,{value:o.value,children:o.label},o.value))}),!E&&e.jsx("div",{className:`${a["input-error"]}`,children:"Teacher is required"})]})}),D&&e.jsx("div",{className:a["edit-profile-container__form--row"],children:e.jsxs("div",{className:`${a["edit-profile-container__form--field"]} ${a["edit-profile-container__form--width-50"]}`,children:[e.jsxs("p",{children:[" ",z==="UK"?"Year":_("grade_level")," ",e.jsx("sup",{children:"*"})]}),e.jsxs(x.Select,{variant:"outlined",value:i?.gradeLevel??"",renderValue:o=>H(o),onChange:me,className:`${a["profile-value"]}`,children:[i?.gradeLevel&&!se.includes(i.gradeLevel)&&e.jsx(x.MenuItem,{value:i.gradeLevel,sx:{display:"none"},children:H(i.gradeLevel)},"__current__"),se.map(o=>e.jsx(x.MenuItem,{value:o,children:H(o)},o))]}),b.gradeLevel&&j.gradeLevel?e.jsx("div",{className:`${a["input-error"]}`,children:b.gradeLevel}):null]})}),!D&&(!!Q.length||!!K.length)&&!!u&&e.jsx("div",{className:a["edit-profile-container__form--row"],children:e.jsxs("div",{className:`${a["edit-profile-container__form--field"]} ${a["edit-profile-container__form--width-50"]}`,children:[e.jsx("p",{children:_("Map from Roster")}),e.jsx(Xe,{roles:[...Q,...K],value:i.sourcedId,onChange:o=>r("sourcedId",o)})]})}),e.jsxs("div",{className:a["edit-profile-container__form--btn-group"],children:[e.jsx("button",{type:"button",className:a["btn-cancel"],onClick:()=>p(),children:_("cancel")}),e.jsxs("button",{type:"button",className:a["btn-save"],onClick:()=>M(),children:[e.jsx(Ee.DoneCheckInIcon,{color:"#fff"}),_("save_changes")]})]})]})}})]})},A={"input-error":"_input-error_gmvmh_1","change-password-container":"_change-password-container_gmvmh_6","change-password-container__title":"_change-password-container__title_gmvmh_11","change-password-container__form":"_change-password-container__form_gmvmh_19","change-password-container__form--field":"_change-password-container__form--field_gmvmh_24","change-password-container__form--description":"_change-password-container__form--description_gmvmh_38","change-password-container__form--btn-group":"_change-password-container__form--btn-group_gmvmh_54","btn-save":"_btn-save_gmvmh_60","btn-cancel":"_btn-cancel_gmvmh_82"},Qe=R.object({oldPassword:R.string().required("Old password is required"),newPassword:R.string().required("New password is required"),confirmedNewPassword:R.string().oneOf([R.ref("newPassword"),void 0],"New password must match").required("Confirm your new password")}),es=({confirmChangePassword:t,goBack:n})=>{const{t:p}=f.useTranslation();return e.jsxs("div",{className:A["change-password-container"],children:[e.jsx("div",{className:A["change-password-container__title"],children:p("change_password")}),e.jsx(je.Formik,{initialValues:{oldPassword:"",newPassword:"",confirmedNewPassword:"",showOldPassword:!1,showNewPassword:!1,showConfirmNewPassword:!1},enableReinitialize:!0,onSubmit:w=>{t(w)},validateOnChange:!1,validateOnBlur:!1,validationSchema:Qe,children:w=>{const{values:g,setFieldValue:u,handleSubmit:E,errors:T,touched:P}=w,N=Object.keys(T);return N.length&&document.querySelector(`input[name=${N[0]}]`)?.scrollIntoView({behavior:"smooth",block:"center"}),e.jsxs("div",{className:A["change-password-container__form"],children:[e.jsxs("div",{className:`${A["change-password-container__form--field"]}`,children:[e.jsx("p",{children:p("old_password")}),e.jsx(y.FormControl,{variant:"outlined",className:`${A["input-field"]}`,children:e.jsx(y.OutlinedInput,{type:g.showOldPassword?"text":"password",value:g?.oldPassword,onChange:_=>u("oldPassword",_.target.value.trim()),endAdornment:e.jsx(y.InputAdornment,{position:"end",children:e.jsx(_e.IconButton,{"aria-label":"toggle password visibility",onClick:()=>u("showOldPassword",!g.showOldPassword),onMouseDown:_=>_.preventDefault(),children:g.showOldPassword?e.jsx(ge.Visibility,{color:"primary"}):e.jsx(y.VisibilityOff,{color:"primary"})})})})}),T.oldPassword&&P.oldPassword&&e.jsx("div",{className:`${A["input-error"]}`,children:T.oldPassword})]}),e.jsxs("div",{className:`${A["change-password-container__form--field"]}`,children:[e.jsx("p",{children:p("new_password")}),e.jsx(y.FormControl,{variant:"outlined",className:`${A["input-field"]}`,children:e.jsx(y.OutlinedInput,{type:g.showNewPassword?"text":"password",value:g?.newPassword,onChange:_=>u("newPassword",_.target.value.trim()),endAdornment:e.jsx(y.InputAdornment,{position:"end",children:e.jsx(_e.IconButton,{"aria-label":"toggle password visibility",onClick:()=>u("showNewPassword",!g.showNewPassword),onMouseDown:_=>_.preventDefault(),children:g.showNewPassword?e.jsx(ge.Visibility,{color:"primary"}):e.jsx(y.VisibilityOff,{color:"primary"})})})})}),T.newPassword&&P.newPassword&&e.jsx("div",{className:`${A["input-error"]}`,children:T.newPassword}),e.jsxs("div",{className:`${A["change-password-container__form--description"]}`,children:["Password must contain at least: 1 uppercase letter, 1 lowercase letter,",e.jsx("br",{})," 1 number, and 1 special character"]})]}),e.jsxs("div",{className:`${A["change-password-container__form--field"]}`,children:[e.jsx("p",{children:p("confirm_new_password")}),e.jsx(y.FormControl,{variant:"outlined",className:`${A["input-field"]}`,children:e.jsx(y.OutlinedInput,{type:g.showConfirmNewPassword?"text":"password",value:g?.confirmedNewPassword,onChange:_=>u("confirmedNewPassword",_.target.value.trim()),endAdornment:e.jsx(y.InputAdornment,{position:"end",children:e.jsx(_e.IconButton,{"aria-label":"toggle password visibility",onClick:()=>u("showConfirmNewPassword",!g.showConfirmNewPassword),onMouseDown:_=>_.preventDefault(),children:g.showConfirmNewPassword?e.jsx(ge.Visibility,{color:"primary"}):e.jsx(y.VisibilityOff,{color:"primary"})})})})}),T.confirmedNewPassword&&P.confirmedNewPassword&&e.jsx("div",{className:`${A["input-error"]}`,children:T.confirmedNewPassword})]}),e.jsxs("div",{className:A["change-password-container__form--btn-group"],children:[e.jsx("button",{type:"button",className:A["btn-cancel"],onClick:()=>{n()},children:p("cancel")}),e.jsxs("button",{type:"button",className:A["btn-save"],onClick:()=>E(),children:[e.jsx(Ee.DoneCheckInIcon,{color:"#fff"}),p("save_new_password")]})]})]})}})]})},ss={id:"",firstName:"",lastName:"",email:"",dateOfBirth:Re.DATE_MIN_VALUE,msRoles:[],esRoles:[],hsRoles:[],isActive:!0,profileImageFileName:"",teacherUserId:[],gradeLevel:"",currentGradeLevel:"",isImportedFromIntegration:!1,appTypes:["MS"],preferredAppType:"MS"},Ne="/admin/users/user-list",rs="User detail",ts=12,as=20,ns=t=>{const n=ae.useDispatch(),p=Ce.useNavigate(),w=ae.useSelector(s=>s.common.user),g=ae.useSelector(s=>s.common?.defaultFontSize),[u,E]=v.useState(ss),[T,P]=v.useState(null),[N,_]=v.useState(!1),[$,X]=v.useState({MS:[],ES:[],HS:[]}),[F,H]=v.useState([]),[z,L]=v.useState(!1),[i,r]=v.useState(W.Info),[M,b]=v.useState(!0),[j,U]=v.useState({}),C=async()=>{localStorage.setItem(window.location.href,"true"),_(!0)},S=()=>{L(!z)},ue=v.useMemo(()=>g==as?"font-large":g==ts?"font-small":"",[g]);v.useEffect(()=>{document.title=rs,_(!1),localStorage.getItem(window.location.href)&&localStorage.removeItem(window.location.href)},[]),v.useEffect(()=>{t&&Q(),!t&&se()},[t]);const Z=(s=[])=>s.includes("EduTeacher")?[...s.filter(c=>c!=="EduTeacher"),h.EDUTEACHER]:s,Q=v.useCallback(async()=>{n(f.setLoading(!0));try{const s=await y.getByIdUser(t),c=(s.data.appTypeRaw||s.data.appType||"MS").toUpperCase(),l=c.includes("MS"),m=c.includes("ES"),I=c.includes("HS"),Y=[];m&&Y.push("ES"),l&&Y.push("MS"),I&&Y.push("HS"),Y.length===0&&Y.push("MS");let q=s.data.preferredAppType||c;((s.data.roles||[]).includes("Student")||(s.data.msRoles||[]).includes("Student")||(s.data.esRoles||[]).includes("Student"))&&s.data.gradeLevel&&(B.includes(s.data.gradeLevel)?q="HS":G.includes(s.data.gradeLevel)?q="MS":V.includes(s.data.gradeLevel)&&(q="ES")),E({...s.data,dateOfBirth:Le.format(new Date(s.data.dateOfBirth),f.DATE_FORMAT),msRoles:Z(s.data.msRoles),esRoles:Z(s.data.esRoles),hsRoles:Z(s.data.hsRoles),currentGradeLevel:s.data.gradeLevel,appTypes:Y,preferredAppType:q}),X({MS:s.data.msRoles??[],ES:s.data.esRoles??[],HS:s.data.hsRoles??[]}),document.title=s.data?.fullName,(l||I)&&K("MS"),m&&K("ES")}catch(s){n(f.setAlert({type:"danger",message:s.response?.data?.title||s.message}))}n(f.setLoading(!1))},[t]),K=v.useCallback(async s=>{n(f.setLoading(!0));try{const c=await y.userRoleHasDataApi(t,s);U(l=>({...l,[s]:c.data}))}catch(c){n(f.setAlert({type:"danger",message:c.response?.data?.title||c.message}))}n(f.setLoading(!1))},[t]),ne=v.useCallback(s=>{p(s&&typeof s=="string"?Ne+`?query=${s}`:Ne)},[]),D=s=>["Student","Parent","EduTeacher"].includes(s),k=(s=[])=>s.includes(h.EDUTEACHER)?[...s.filter(c=>c!==h.EDUTEACHER),"EduTeacher"]:s,oe=v.useCallback(async s=>{const c=s.msRoles?.includes(h.STUDENT)||s.esRoles?.includes(h.STUDENT)||s.hsRoles?.includes(h.STUDENT);if(c&&!t&&!s.teacherUserId){b(!1);return}c&&s.gradeLevel&&(B.includes(s.gradeLevel)?(s.preferredAppType="HS",s.hsRoles=[h.STUDENT],s.msRoles=[],s.esRoles=[]):G.includes(s.gradeLevel)?(s.preferredAppType="MS",s.msRoles=[h.STUDENT],s.hsRoles=[],s.esRoles=[]):V.includes(s.gradeLevel)&&(s.preferredAppType="ES",s.esRoles=[h.STUDENT],s.msRoles=[],s.hsRoles=[])),n(f.setLoading(!0));try{w?.hasEsSchool===!1&&(s.preferredAppType!=="HS"?(s.appTypes=["MS"],s.preferredAppType="MS"):s.appTypes=["HS"],s.esRoles=[]);const l=t?y.update:y.create;!t&&delete s.id,s.teacherUserId=c?s.teacherUserId:[],s.msRoles=k(s.msRoles),s.esRoles=k(s.esRoles),s.hsRoles=k(s.hsRoles),c&&(s.preferredAppType==="HS"?(s.hsRoles=[h.STUDENT],s.msRoles=[],s.esRoles=[]):s.preferredAppType==="ES"?(s.esRoles=[h.STUDENT],s.msRoles=[],s.hsRoles=[]):(s.msRoles=[h.STUDENT],s.hsRoles=[],s.esRoles=[])),t||(s.profileImageFileName=T||"");const m=await l(s);m&&y.getByIdUser(m.data.id).then(I=>{ne(I.data.fullName)}),t||alert("Password of "+m.data.email+` is "${m.data.password}"`),n(f.setAlert({type:"success",message:`${t?"Update":"Create"} user successfully`}))}catch(l){n(f.setAlert({type:"danger",message:l.response?.data?.title||l.message}))}n(f.setLoading(!1))},[t,T]),pe=async s=>{n(f.setLoading(!0));try{await y.changePassword(s),n(f.setAlert({type:"success",message:"Change password successfully"}))}catch(c){n(f.setAlert({type:"danger",message:c.response?.data?.title||c.message}))}n(f.setLoading(!1))},ie=v.useCallback(async s=>{n(f.setLoading(!0));try{await y.forgotChangePassword(s),n(f.setAlert({type:"success",message:"Send forgot password link successfully"}))}catch(c){n(f.setAlert({type:"danger",message:c.response?.data?.title||c.message||"Error occured"}))}n(f.setLoading(!1))},[]),se=async s=>{try{const c=await y.getTeachers({sortBy:"Email"},s);c.data&&H((c.data.map?.(l=>({label:l.email,value:l.id}))||[]).sort((l,m)=>l.label.localeCompare(m.label)))}catch(c){n(f.setAlert({type:"danger",message:c.response?.data?.title||c.message}))}},me=20097152,[fe,re]=v.useState(""),he=s=>{s.preventDefault();let c=new FileReader,l=s.target.files[0];if(l.size>me){n(f.setAlert({type:"danger",message:"File can't be larger than 2MB"}));return}c.onloadend=async()=>{if(re(c.result),l){const m=new FormData,{name:I}=l;m.append("file",l,I);const q=(await y.systemProfileUpload(m))?.data?.key;t?await y.updateAvatarByAdminApi(u.id||"",q):P(q)}},l&&c.readAsDataURL(l)},te=async()=>{await y.updateAvatarByAdminApi(u.id||"",""),re("")},o=fe||f.getFileUrl(u?.profileImageFileName),d=u?.profileImageFileName||"";return{userDetail:u,getDataTeachers:se,backToList:ne,confirmData:oe,file:T,setFile:P,edited:N,currentRoles:$,setEdited:_,setEditedTrue:C,confirmChangePassword:pe,forgotPasswordRequest:ie,handleDisableRoles:D,classFontSize:ue,teacherOptions:F,handleToggleModel:S,openModel:z,user:w,activeTab:i,setActiveTab:r,imageSrc:o,imageUse:d,handleImageChange:he,handleDeleteAvatar:te,getFile:()=>{var s=window.location.origin+"/api/ExportDataUser/"+t;window.open(s)},checkHasTeacher:M,setCheckHasTeacher:b,userHasData:j}},os="/images/image-default.png",is=()=>{const{id:t}=Ce.useParams(),{userDetail:n,getDataTeachers:p,backToList:w,confirmData:g,confirmChangePassword:u,forgotPasswordRequest:E,teacherOptions:T,user:P,activeTab:N,setActiveTab:_,imageSrc:$,handleImageChange:X,handleDeleteAvatar:F,getFile:H,currentRoles:z,handleDisableRoles:L,checkHasTeacher:i,setCheckHasTeacher:r,userHasData:M}=ns(t),b=[{value:W.Info,component:e.jsx(Ze,{id:t,goBack:w,userDetail:n,confirmData:g,teacherOptions:T,getDataTeachers:p,currentRoles:z,handleDisableRoles:L,checkHasTeacher:i,setCheckHasTeacher:r,userHasData:M})},{value:W.ChangePassword,component:e.jsx(es,{confirmChangePassword:u,goBack:w})}],j=le.find(S=>S.value===W.ForgotPassword),U=le.find(S=>S.value===W.DownloadUserData),C=le.find(S=>S.value===W.ChangePassword);return e.jsxs("div",{className:a["user-profile-container-admin"],children:[e.jsxs("div",{className:a["user-profile-container-admin__left"],children:[e.jsxs("div",{className:a["user-profile-container-admin__left--information"],children:[e.jsxs("div",{className:a["image-user-container"],children:[e.jsx(Te.Input,{className:"d-none",type:"file",id:"uploadFile",onChange:X,accept:"image/*"}),e.jsx("img",{src:$||f.getStaticFileUrl(os),alt:"avatar",className:`${a["image-user-container__image"]}`}),e.jsx(Te.Label,{htmlFor:"uploadFile",role:"button",tabIndex:0,children:e.jsx("div",{className:a["image-user-container__edit-btn"],children:e.jsx("img",{src:f.getStaticFileUrl("/images/user/Edit.svg"),alt:"edit-avatar"})})}),t&&e.jsx("button",{type:"button",onClick:()=>F(),className:a["image-user-container__delete-btn"],children:e.jsx("img",{src:f.getStaticFileUrl("/images/user/DeleteAvatar.svg"),alt:"delete-avatar"})})]}),e.jsxs("div",{className:a["name-role-container"],children:[e.jsx("div",{className:a.name,children:`${n?.firstName||""} ${n?.lastName||""}`}),e.jsx("div",{className:a.role,children:Array.from(new Set([...n?.msRoles||[],...n?.esRoles||[],...n?.hsRoles||[]])).map(S=>S==="SecondaryTeacher"?"Support Teacher":S).join(", ")})]})]}),e.jsxs("div",{className:a["user-profile-container-admin__left--btn-control"],children:[le.filter(S=>S.isControl).map(S=>e.jsxs("button",{type:"button",className:`${a.item} ${N===S.value?a["item-active"]:""}`,onClick:()=>_(S.value),children:[e.jsx("img",{src:f.getStaticFileUrl(S.icon),alt:S.icon}),S.label]},S.value)),!!t&&!!C&&P?.id===t&&e.jsxs("button",{type:"button",className:`${a.item} ${N===C.value?a["item-active"]:""}`,onClick:()=>_(C.value),children:[e.jsx("img",{src:f.getStaticFileUrl(C.icon),alt:C.icon}),C.label]},C.value),t&&j&&e.jsxs("button",{type:"button",className:`${a.item} ${N===j.value?a["item-active"]:""}`,onClick:()=>E({email:n?.email||""}),children:[e.jsx("img",{src:f.getStaticFileUrl(j.icon),alt:j.icon}),j.label]},j.value),t&&U&&e.jsxs("button",{type:"button",className:`${a.item} ${N===U.value?a["item-active"]:""}`,onClick:()=>H(),children:[e.jsx("img",{src:f.getStaticFileUrl(U.icon),alt:U.icon}),U.label]},U.value)]})]}),e.jsx("div",{className:a["user-profile-container-admin__right"],children:b.find(S=>S.value===N)?.component})]})};exports.default=is;
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("mario-core"),n=require("@ag-grid-enterprise/core"),e=require("react"),t=e.lazy(()=>Promise.resolve().then(()=>require("./ConferenceRubricList-tof8UOjb.cjs"))),s=e.lazy(()=>Promise.resolve().then(()=>require("./ConferenceRubricDetail-BXd45xmi.cjs"))),i=e.lazy(()=>Promise.resolve().then(()=>require("./LearningStrategyList-c9ut_ZBs.cjs"))),a=e.lazy(()=>Promise.resolve().then(()=>require("./SetupContainer-Dlgw2pUp.cjs"))),l=e.lazy(()=>Promise.resolve().then(()=>require("./QuestionBankList-CrB0n_-u.cjs"))),u=e.lazy(()=>Promise.resolve().then(()=>require("./ReflectionContainer-T8k3ipxn.cjs"))),m=e.lazy(()=>Promise.resolve().then(()=>require("./QuestionDetail-Cfg4Fk-_.cjs"))),y=e.lazy(()=>Promise.resolve().then(()=>require("./SubjectList-DBvEGKQs.cjs"))),c=e.lazy(()=>Promise.resolve().then(()=>require("./LearningSupportCategoryList-BpCRx0CF.cjs"))),v=e.lazy(()=>Promise.resolve().then(()=>require("./BadgeList-DHs-Rsvu.cjs"))),h=e.lazy(()=>Promise.resolve().then(()=>require("./GoalExampleList-DdkEu4hA.cjs"))),P=e.lazy(()=>Promise.resolve().then(()=>require("./TutorialScreenContainer-Cc7pBhl5.cjs"))),q=e.lazy(()=>Promise.resolve().then(()=>require("./QuestionBankContainer-Bjh5LiB1.cjs"))),z=e.lazy(()=>Promise.resolve().then(()=>require("./SurveyQuestionContainer-DtreN7O7.cjs"))),S=e.lazy(()=>Promise.resolve().then(()=>require("./SessionTemplateDetail-B3V8_XFZ.cjs"))),g=e.lazy(()=>Promise.resolve().then(()=>require("./CustomAlertList-lBitgnfH.cjs"))),d=e.lazy(()=>Promise.resolve().then(()=>require("./AssetLog-Bexcnjvn.cjs"))),C=e.lazy(()=>Promise.resolve().then(()=>require("./Dashboard-B2Jw4uOp.cjs"))),p=e.lazy(()=>Promise.resolve().then(()=>require("./AdminTraining-CFhKwWEu.cjs"))),A=e.lazy(()=>Promise.resolve().then(()=>require("./TemplateContainer-wVMb1knJ.cjs"))),L=e.lazy(()=>Promise.resolve().then(()=>require("./OneRosterContainer-BHDMzC1V.cjs"))),D=e.lazy(()=>Promise.resolve().then(()=>require("./SandboxContainer-2xT8qr0Z.cjs"))),T=e.lazy(()=>Promise.resolve().then(()=>require("./TemplateBuilderPage-RtTtRDYv.cjs"))),b=e.lazy(()=>Promise.resolve().then(()=>require("./TemplateStartBuild-L-GJIKx5.cjs"))),Q=e.lazy(()=>Promise.resolve().then(()=>require("./SurveyDashboardContainer-BBzc-OUr.cjs"))),W=e.lazy(()=>Promise.resolve().then(()=>require("./RevertUser-DMHkaCTx.cjs"))),f=e.lazy(()=>Promise.resolve().then(()=>require("./CustomQuestionAlert-46jT_ckM.cjs"))),F=e.lazy(()=>Promise.resolve().then(()=>require("./SurveyDetailAdmin-CjnpsXs1.cjs"))),R=e.lazy(()=>Promise.resolve().then(()=>require("./SurveyStudentFlagListAdmin-S_yRUNzT.cjs"))),E=e.lazy(()=>Promise.resolve().then(()=>require("./SurveyResultAdmin-BGFQpjcO.cjs"))),k=e.lazy(()=>Promise.resolve().then(()=>require("./SurveyIndexAdmin-BvJCgIxw.cjs"))),B=e.lazy(()=>Promise.resolve().then(()=>require("./CreateSurveyAdminV2-Be508L8t.cjs"))),I=e.lazy(()=>Promise.resolve().then(()=>require("./PreviewSurveyAdmin-BRC3t7mD.cjs"))),M=e.lazy(()=>Promise.resolve().then(()=>require("./ExternalApi-C9QAZfYm.cjs"))),w=e.lazy(()=>Promise.resolve().then(()=>require("./WeeklyQuest-B_Vw_BP5.cjs"))),V=e.lazy(()=>Promise.resolve().then(()=>require("./SettingWeeklyQuest-CDi1sio0.cjs"))),x=e.lazy(()=>Promise.resolve().then(()=>require("./HomePage-DMlM9YOz.cjs"))),O=e.lazy(()=>Promise.resolve().then(()=>require("./MainLayoutAdmin-tY_XZtzG.cjs"))),G=e.lazy(()=>Promise.resolve().then(()=>require("./SyncData-CNL638kU.cjs"))),H=e.lazy(()=>Promise.resolve().then(()=>require("./SummarizeQuestion-CcuIe0LK.cjs"))),U=e.lazy(()=>Promise.resolve().then(()=>require("./SurveyQuestion-C4P3HZol.cjs"))),j=e.lazy(()=>Promise.resolve().then(()=>require("./MarioAi-B_AaakwL.cjs"))),$=e.lazy(()=>Promise.resolve().then(()=>require("./AIMario-DP2HBmgn.cjs"))),K=e.lazy(()=>Promise.resolve().then(()=>require("./ChatWithAI-Bu06P83w.cjs"))),N=e.lazy(()=>Promise.resolve().then(()=>require("./ViewHistoryPrompt-CDf55bHw.cjs"))),_=e.lazy(()=>Promise.resolve().then(()=>require("./SurveyPortal-DMVZk1Q1.cjs"))),J=e.lazy(()=>Promise.resolve().then(()=>require("./ConversationGoal-DpXDZc4j.cjs"))),X=e.lazy(()=>Promise.resolve().then(()=>require("./FrequencyAndSetup-CUIllgRW.cjs"))),Y=e.lazy(()=>Promise.resolve().then(()=>require("./FrequencyAndSetupV2-Bh8ZTZV0.cjs"))),Z=e.lazy(()=>Promise.resolve().then(()=>require("./DesignatedStaff-CDI3_ImT.cjs"))),ee=e.lazy(()=>Promise.resolve().then(()=>require("./WellBeingDashboard-BN9WBQM5.cjs"))),re=e.lazy(()=>Promise.resolve().then(()=>require("./OpenFieldWellbeingQuestion-r1BFDQSd.cjs"))),oe=e.lazy(()=>Promise.resolve().then(()=>require("./MyProfile-X1ZuOuaQ.cjs"))),ne=e.lazy(()=>Promise.resolve().then(()=>require("./UserProfileManagement-6U3aH_DN.cjs"))),te=e.lazy(()=>Promise.resolve().then(()=>require("./EditFlagCard-BE8gdA_8.cjs"))),se=e.lazy(()=>Promise.resolve().then(()=>require("./ConversationTarget-CzmPmfwk.cjs"))),ie=e.lazy(()=>Promise.resolve().then(()=>require("./TeacherConversations-O_OgOQSU.cjs")).then(r=>r.TeacherConversations$1)),ae=e.lazy(()=>Promise.resolve().then(()=>require("./index-V_Ut90VM.cjs"))),le=e.lazy(()=>Promise.resolve().then(()=>require("./index-CCC_yk3j.cjs"))),ue=e.lazy(()=>Promise.resolve().then(()=>require("./DashboardWrapper-CF20Zvdi.cjs"))),me=e.lazy(()=>Promise.resolve().then(()=>require("./FlagAlertWrapper-DPkneey8.cjs"))),ye=e.lazy(()=>Promise.resolve().then(()=>require("./FlagTriggersEscalationView-CUwP4bT0.cjs")).then(r=>r.FlagTriggersEscalationView$1)),ce=e.lazy(()=>Promise.resolve().then(()=>require("./PersonalLearningPlansWrapper-RH1MT86Y.cjs"))),ve=e.lazy(()=>Promise.resolve().then(()=>require("./SentEmailLogs-BBGOSb-p.cjs"))),he=e.lazy(()=>Promise.resolve().then(()=>require("./CheckInChangeLogs-4A0wuITI.cjs")));n.LicenseManager.setLicenseKey(o.LICENSE_AGGRID);exports.AIMario=$;exports.AdminTraining=p;exports.AssetLog=d;exports.BadgeList=v;exports.ChatWithAI=K;exports.CheckInChangeLogs=he;exports.CheckInSetup=ae;exports.ConferenceRubricDetail=s;exports.ConferenceRubricList=t;exports.ConversationGoal=J;exports.ConversationTarget=se;exports.CreateSurveyAdminV2=B;exports.CustomAlertList=g;exports.CustomQuestionAlert=f;exports.Dashboard=C;exports.DashboardWrapper=ue;exports.DesignatedStaff=Z;exports.EditFlagCard=te;exports.ExternalApi=M;exports.FlagAlertWrapper=me;exports.FlagTriggersEscalationView=ye;exports.FrequencyAndSetup=X;exports.FrequencyAndSetupV2=Y;exports.GoalExampleList=h;exports.HomePage=x;exports.LearningStrategyList=i;exports.LearningSupportCategoryList=c;exports.MainLayoutAdmin=O;exports.MarioAi=j;exports.MyProfile=oe;exports.OneRosterContainer=L;exports.OpenFieldWellbeingQuestion=re;exports.Overview=le;exports.PersonalLearningPlansWrapper=ce;exports.PreviewSurveyAdmin=I;exports.QuestionBankContainer=q;exports.QuestionBankList=l;exports.QuestionDetail=m;exports.ReflectionContainer=u;exports.RevertUser=W;exports.SandboxContainer=D;exports.SentEmailLogs=ve;exports.SessionTemplateDetail=S;exports.SettingWeeklyQuest=V;exports.SetupContainer=a;exports.SubjectList=y;exports.SummarizeQuestion=H;exports.SurveyDashboardContainer=Q;exports.SurveyDetailAdmin=F;exports.SurveyIndexAdmin=k;exports.SurveyPortal=_;exports.SurveyQuestion=U;exports.SurveyQuestionContainer=z;exports.SurveyResultAdmin=E;exports.SurveyStudentFlagListAdmin=R;exports.SyncData=G;exports.TeacherConversations=ie;exports.TemplateBuilderPage=T;exports.TemplateContainer=A;exports.TemplateStartBuild=b;exports.TutorialScreenContainer=P;exports.UserProfileManagement=ne;exports.ViewHistoryPrompt=N;exports.WeeklyQuest=w;exports.WellBeingDashboard=ee;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("mario-core"),n=require("@ag-grid-enterprise/core"),e=require("react"),t=e.lazy(()=>Promise.resolve().then(()=>require("./ConferenceRubricList-tof8UOjb.cjs"))),s=e.lazy(()=>Promise.resolve().then(()=>require("./ConferenceRubricDetail-BXd45xmi.cjs"))),i=e.lazy(()=>Promise.resolve().then(()=>require("./LearningStrategyList-c9ut_ZBs.cjs"))),a=e.lazy(()=>Promise.resolve().then(()=>require("./SetupContainer-Dlgw2pUp.cjs"))),l=e.lazy(()=>Promise.resolve().then(()=>require("./QuestionBankList-CrB0n_-u.cjs"))),u=e.lazy(()=>Promise.resolve().then(()=>require("./ReflectionContainer-T8k3ipxn.cjs"))),m=e.lazy(()=>Promise.resolve().then(()=>require("./QuestionDetail-Cfg4Fk-_.cjs"))),y=e.lazy(()=>Promise.resolve().then(()=>require("./SubjectList-DBvEGKQs.cjs"))),c=e.lazy(()=>Promise.resolve().then(()=>require("./LearningSupportCategoryList-BpCRx0CF.cjs"))),v=e.lazy(()=>Promise.resolve().then(()=>require("./BadgeList-DHs-Rsvu.cjs"))),h=e.lazy(()=>Promise.resolve().then(()=>require("./GoalExampleList-DdkEu4hA.cjs"))),P=e.lazy(()=>Promise.resolve().then(()=>require("./TutorialScreenContainer-Cc7pBhl5.cjs"))),q=e.lazy(()=>Promise.resolve().then(()=>require("./QuestionBankContainer-Bjh5LiB1.cjs"))),z=e.lazy(()=>Promise.resolve().then(()=>require("./SurveyQuestionContainer-DtreN7O7.cjs"))),S=e.lazy(()=>Promise.resolve().then(()=>require("./SessionTemplateDetail-B3V8_XFZ.cjs"))),g=e.lazy(()=>Promise.resolve().then(()=>require("./CustomAlertList-lBitgnfH.cjs"))),d=e.lazy(()=>Promise.resolve().then(()=>require("./AssetLog-Bexcnjvn.cjs"))),C=e.lazy(()=>Promise.resolve().then(()=>require("./Dashboard-B2Jw4uOp.cjs"))),p=e.lazy(()=>Promise.resolve().then(()=>require("./AdminTraining-CFhKwWEu.cjs"))),A=e.lazy(()=>Promise.resolve().then(()=>require("./TemplateContainer-wVMb1knJ.cjs"))),L=e.lazy(()=>Promise.resolve().then(()=>require("./OneRosterContainer-BHDMzC1V.cjs"))),D=e.lazy(()=>Promise.resolve().then(()=>require("./SandboxContainer-2xT8qr0Z.cjs"))),T=e.lazy(()=>Promise.resolve().then(()=>require("./TemplateBuilderPage-RtTtRDYv.cjs"))),b=e.lazy(()=>Promise.resolve().then(()=>require("./TemplateStartBuild-L-GJIKx5.cjs"))),Q=e.lazy(()=>Promise.resolve().then(()=>require("./SurveyDashboardContainer-BBzc-OUr.cjs"))),W=e.lazy(()=>Promise.resolve().then(()=>require("./RevertUser-DMHkaCTx.cjs"))),f=e.lazy(()=>Promise.resolve().then(()=>require("./CustomQuestionAlert-46jT_ckM.cjs"))),F=e.lazy(()=>Promise.resolve().then(()=>require("./SurveyDetailAdmin-CjnpsXs1.cjs"))),R=e.lazy(()=>Promise.resolve().then(()=>require("./SurveyStudentFlagListAdmin-S_yRUNzT.cjs"))),E=e.lazy(()=>Promise.resolve().then(()=>require("./SurveyResultAdmin-BGFQpjcO.cjs"))),k=e.lazy(()=>Promise.resolve().then(()=>require("./SurveyIndexAdmin-BvJCgIxw.cjs"))),B=e.lazy(()=>Promise.resolve().then(()=>require("./CreateSurveyAdminV2-Be508L8t.cjs"))),I=e.lazy(()=>Promise.resolve().then(()=>require("./PreviewSurveyAdmin-BRC3t7mD.cjs"))),M=e.lazy(()=>Promise.resolve().then(()=>require("./ExternalApi-C9QAZfYm.cjs"))),w=e.lazy(()=>Promise.resolve().then(()=>require("./WeeklyQuest-B_Vw_BP5.cjs"))),V=e.lazy(()=>Promise.resolve().then(()=>require("./SettingWeeklyQuest-CDi1sio0.cjs"))),x=e.lazy(()=>Promise.resolve().then(()=>require("./HomePage-DMlM9YOz.cjs"))),O=e.lazy(()=>Promise.resolve().then(()=>require("./MainLayoutAdmin-tY_XZtzG.cjs"))),G=e.lazy(()=>Promise.resolve().then(()=>require("./SyncData-CNL638kU.cjs"))),H=e.lazy(()=>Promise.resolve().then(()=>require("./SummarizeQuestion-CcuIe0LK.cjs"))),U=e.lazy(()=>Promise.resolve().then(()=>require("./SurveyQuestion-C4P3HZol.cjs"))),j=e.lazy(()=>Promise.resolve().then(()=>require("./MarioAi-B_AaakwL.cjs"))),$=e.lazy(()=>Promise.resolve().then(()=>require("./AIMario-DP2HBmgn.cjs"))),K=e.lazy(()=>Promise.resolve().then(()=>require("./ChatWithAI-Bu06P83w.cjs"))),N=e.lazy(()=>Promise.resolve().then(()=>require("./ViewHistoryPrompt-CDf55bHw.cjs"))),_=e.lazy(()=>Promise.resolve().then(()=>require("./SurveyPortal-DMVZk1Q1.cjs"))),J=e.lazy(()=>Promise.resolve().then(()=>require("./ConversationGoal-DpXDZc4j.cjs"))),X=e.lazy(()=>Promise.resolve().then(()=>require("./FrequencyAndSetup-CUIllgRW.cjs"))),Y=e.lazy(()=>Promise.resolve().then(()=>require("./FrequencyAndSetupV2-Bh8ZTZV0.cjs"))),Z=e.lazy(()=>Promise.resolve().then(()=>require("./DesignatedStaff-CDI3_ImT.cjs"))),ee=e.lazy(()=>Promise.resolve().then(()=>require("./WellBeingDashboard-BN9WBQM5.cjs"))),re=e.lazy(()=>Promise.resolve().then(()=>require("./OpenFieldWellbeingQuestion-r1BFDQSd.cjs"))),oe=e.lazy(()=>Promise.resolve().then(()=>require("./MyProfile-X1ZuOuaQ.cjs"))),ne=e.lazy(()=>Promise.resolve().then(()=>require("./UserProfileManagement-B3I4zjOw.cjs"))),te=e.lazy(()=>Promise.resolve().then(()=>require("./EditFlagCard-BE8gdA_8.cjs"))),se=e.lazy(()=>Promise.resolve().then(()=>require("./ConversationTarget-CzmPmfwk.cjs"))),ie=e.lazy(()=>Promise.resolve().then(()=>require("./TeacherConversations-O_OgOQSU.cjs")).then(r=>r.TeacherConversations$1)),ae=e.lazy(()=>Promise.resolve().then(()=>require("./index-V_Ut90VM.cjs"))),le=e.lazy(()=>Promise.resolve().then(()=>require("./index-CCC_yk3j.cjs"))),ue=e.lazy(()=>Promise.resolve().then(()=>require("./DashboardWrapper-CF20Zvdi.cjs"))),me=e.lazy(()=>Promise.resolve().then(()=>require("./FlagAlertWrapper-DPkneey8.cjs"))),ye=e.lazy(()=>Promise.resolve().then(()=>require("./FlagTriggersEscalationView-CUwP4bT0.cjs")).then(r=>r.FlagTriggersEscalationView$1)),ce=e.lazy(()=>Promise.resolve().then(()=>require("./PersonalLearningPlansWrapper-RH1MT86Y.cjs"))),ve=e.lazy(()=>Promise.resolve().then(()=>require("./SentEmailLogs-BBGOSb-p.cjs"))),he=e.lazy(()=>Promise.resolve().then(()=>require("./CheckInChangeLogs-4A0wuITI.cjs")));n.LicenseManager.setLicenseKey(o.LICENSE_AGGRID);exports.AIMario=$;exports.AdminTraining=p;exports.AssetLog=d;exports.BadgeList=v;exports.ChatWithAI=K;exports.CheckInChangeLogs=he;exports.CheckInSetup=ae;exports.ConferenceRubricDetail=s;exports.ConferenceRubricList=t;exports.ConversationGoal=J;exports.ConversationTarget=se;exports.CreateSurveyAdminV2=B;exports.CustomAlertList=g;exports.CustomQuestionAlert=f;exports.Dashboard=C;exports.DashboardWrapper=ue;exports.DesignatedStaff=Z;exports.EditFlagCard=te;exports.ExternalApi=M;exports.FlagAlertWrapper=me;exports.FlagTriggersEscalationView=ye;exports.FrequencyAndSetup=X;exports.FrequencyAndSetupV2=Y;exports.GoalExampleList=h;exports.HomePage=x;exports.LearningStrategyList=i;exports.LearningSupportCategoryList=c;exports.MainLayoutAdmin=O;exports.MarioAi=j;exports.MyProfile=oe;exports.OneRosterContainer=L;exports.OpenFieldWellbeingQuestion=re;exports.Overview=le;exports.PersonalLearningPlansWrapper=ce;exports.PreviewSurveyAdmin=I;exports.QuestionBankContainer=q;exports.QuestionBankList=l;exports.QuestionDetail=m;exports.ReflectionContainer=u;exports.RevertUser=W;exports.SandboxContainer=D;exports.SentEmailLogs=ve;exports.SessionTemplateDetail=S;exports.SettingWeeklyQuest=V;exports.SetupContainer=a;exports.SubjectList=y;exports.SummarizeQuestion=H;exports.SurveyDashboardContainer=Q;exports.SurveyDetailAdmin=F;exports.SurveyIndexAdmin=k;exports.SurveyPortal=_;exports.SurveyQuestion=U;exports.SurveyQuestionContainer=z;exports.SurveyResultAdmin=E;exports.SurveyStudentFlagListAdmin=R;exports.SyncData=G;exports.TeacherConversations=ie;exports.TemplateBuilderPage=T;exports.TemplateContainer=A;exports.TemplateStartBuild=b;exports.TutorialScreenContainer=P;exports.UserProfileManagement=ne;exports.ViewHistoryPrompt=N;exports.WeeklyQuest=w;exports.WellBeingDashboard=ee;
@@ -1,7 +1,7 @@
1
1
  import { LICENSE_AGGRID as n } from "mario-core";
2
2
  import { LicenseManager as r } from "@ag-grid-enterprise/core";
3
3
  import { lazy as t } from "react";
4
- const m = t(() => import("./ConferenceRubricList-bXimmEtb.js")), p = t(() => import("./ConferenceRubricDetail-Cev0y5Vc.js")), c = t(() => import("./LearningStrategyList-CXDUExaq.js")), a = t(() => import("./SetupContainer-CyG0WZ46.js")), l = t(() => import("./QuestionBankList-DJifni6K.js")), u = t(() => import("./ReflectionContainer-DYumB3DG.js")), S = t(() => import("./QuestionDetail-C7T9Ma4E.js")), g = t(() => import("./SubjectList-ewa6hXBk.js")), d = t(() => import("./LearningSupportCategoryList-BmFj6dul.js")), C = t(() => import("./BadgeList-DUEUMpRP.js")), y = t(() => import("./GoalExampleList-DwoJ0Zn_.js")), A = t(() => import("./TutorialScreenContainer-BIhGp5Xb.js")), L = t(() => import("./QuestionBankContainer-CKs40aJ0.js")), v = t(() => import("./SurveyQuestionContainer-BrPECEdW.js")), h = t(() => import("./SessionTemplateDetail-CoYRzZzO.js")), D = t(() => import("./CustomAlertList-BjXcn6bi.js")), b = t(() => import("./AssetLog-9i4_srMc.js")), f = t(() => import("./Dashboard-BU99jz6C.js")), Q = t(() => import("./AdminTraining-BS64lsyg.js")), P = t(() => import("./TemplateContainer-CPK7IVP1.js")), T = t(() => import("./OneRosterContainer-DeHIE93G.js")), W = t(() => import("./SandboxContainer-DmPlQa8l.js")), E = t(() => import("./TemplateBuilderPage-DzJLw-Su.js")), F = t(() => import("./TemplateStartBuild-naD1Xn49.js")), I = t(() => import("./SurveyDashboardContainer-CwebLa0U.js")), R = t(() => import("./RevertUser-CUs264FF.js")), k = t(() => import("./CustomQuestionAlert-Dc5Eg_44.js")), B = t(() => import("./SurveyDetailAdmin-DvZ21_wj.js")), M = t(() => import("./SurveyStudentFlagListAdmin-DKepFw3V.js")), x = t(() => import("./SurveyResultAdmin-BppBdxrv.js")), w = t(() => import("./SurveyIndexAdmin-DfPdWMxm.js")), G = t(() => import("./CreateSurveyAdminV2-w9WVrSVS.js")), V = t(() => import("./PreviewSurveyAdmin-blZUaVbX.js")), O = t(() => import("./ExternalApi-CFsQM9Kw.js")), q = t(() => import("./WeeklyQuest-D8B5Fw-0.js")), z = t(() => import("./SettingWeeklyQuest-D61948jR.js")), H = t(() => import("./HomePage-DA5R5L2v.js")), U = t(() => import("./MainLayoutAdmin-DmvYHfzt.js")), j = t(() => import("./SyncData-CUc8ZxBT.js")), K = t(() => import("./SummarizeQuestion-CAJ-JPjY.js")), N = t(() => import("./SurveyQuestion-CeCF5uB3.js")), _ = t(() => import("./MarioAi-DxQbqq2l.js")), J = t(() => import("./AIMario-Bk_MPYou.js")), X = t(() => import("./ChatWithAI-CF7I876V.js")), Y = t(() => import("./ViewHistoryPrompt-896MxK_D.js")), Z = t(() => import("./SurveyPortal-BF3BDE4u.js")), $ = t(() => import("./ConversationGoal-CPtGyH13.js")), tt = t(() => import("./FrequencyAndSetup-Codhil9J.js")), ot = t(() => import("./FrequencyAndSetupV2-vgfDY55i.js")), nt = t(() => import("./DesignatedStaff-tuZkULQ_.js")), rt = t(() => import("./WellBeingDashboard-B_5hhVYa.js")), it = t(() => import("./OpenFieldWellbeingQuestion-gqpggJ5q.js")), et = t(() => import("./MyProfile-Bs4FKrYH.js")), st = t(() => import("./UserProfileManagement-DNFjhwuG.js")), mt = t(() => import("./EditFlagCard-Bx_3261r.js")), pt = t(() => import("./ConversationTarget-LDGvqUXy.js")), ct = t(() => import("./TeacherConversations-C0naWuM_.js").then((o) => o.b)), at = t(() => import("./index-DxMZ_Ng1.js")), lt = t(() => import("./index-C9Jp5mLH.js")), ut = t(() => import("./DashboardWrapper-C80LJmFX.js")), St = t(() => import("./FlagAlertWrapper-hxhD_OZO.js")), gt = t(() => import("./FlagTriggersEscalationView-BGBo5CLk.js").then((o) => o.a)), dt = t(() => import("./PersonalLearningPlansWrapper-BfHpVtcf.js")), Ct = t(() => import("./SentEmailLogs-nlpEbxgt.js")), yt = t(() => import("./CheckInChangeLogs-BjAVIu0t.js"));
4
+ const m = t(() => import("./ConferenceRubricList-bXimmEtb.js")), p = t(() => import("./ConferenceRubricDetail-Cev0y5Vc.js")), c = t(() => import("./LearningStrategyList-CXDUExaq.js")), a = t(() => import("./SetupContainer-CyG0WZ46.js")), l = t(() => import("./QuestionBankList-DJifni6K.js")), u = t(() => import("./ReflectionContainer-DYumB3DG.js")), S = t(() => import("./QuestionDetail-C7T9Ma4E.js")), g = t(() => import("./SubjectList-ewa6hXBk.js")), d = t(() => import("./LearningSupportCategoryList-BmFj6dul.js")), C = t(() => import("./BadgeList-DUEUMpRP.js")), y = t(() => import("./GoalExampleList-DwoJ0Zn_.js")), A = t(() => import("./TutorialScreenContainer-BIhGp5Xb.js")), L = t(() => import("./QuestionBankContainer-CKs40aJ0.js")), v = t(() => import("./SurveyQuestionContainer-BrPECEdW.js")), h = t(() => import("./SessionTemplateDetail-CoYRzZzO.js")), D = t(() => import("./CustomAlertList-BjXcn6bi.js")), b = t(() => import("./AssetLog-9i4_srMc.js")), f = t(() => import("./Dashboard-BU99jz6C.js")), Q = t(() => import("./AdminTraining-BS64lsyg.js")), P = t(() => import("./TemplateContainer-CPK7IVP1.js")), T = t(() => import("./OneRosterContainer-DeHIE93G.js")), W = t(() => import("./SandboxContainer-DmPlQa8l.js")), E = t(() => import("./TemplateBuilderPage-DzJLw-Su.js")), F = t(() => import("./TemplateStartBuild-naD1Xn49.js")), I = t(() => import("./SurveyDashboardContainer-CwebLa0U.js")), R = t(() => import("./RevertUser-CUs264FF.js")), k = t(() => import("./CustomQuestionAlert-Dc5Eg_44.js")), B = t(() => import("./SurveyDetailAdmin-DvZ21_wj.js")), M = t(() => import("./SurveyStudentFlagListAdmin-DKepFw3V.js")), x = t(() => import("./SurveyResultAdmin-BppBdxrv.js")), w = t(() => import("./SurveyIndexAdmin-DfPdWMxm.js")), G = t(() => import("./CreateSurveyAdminV2-w9WVrSVS.js")), V = t(() => import("./PreviewSurveyAdmin-blZUaVbX.js")), O = t(() => import("./ExternalApi-CFsQM9Kw.js")), q = t(() => import("./WeeklyQuest-D8B5Fw-0.js")), z = t(() => import("./SettingWeeklyQuest-D61948jR.js")), H = t(() => import("./HomePage-DA5R5L2v.js")), U = t(() => import("./MainLayoutAdmin-DmvYHfzt.js")), j = t(() => import("./SyncData-CUc8ZxBT.js")), K = t(() => import("./SummarizeQuestion-CAJ-JPjY.js")), N = t(() => import("./SurveyQuestion-CeCF5uB3.js")), _ = t(() => import("./MarioAi-DxQbqq2l.js")), J = t(() => import("./AIMario-Bk_MPYou.js")), X = t(() => import("./ChatWithAI-CF7I876V.js")), Y = t(() => import("./ViewHistoryPrompt-896MxK_D.js")), Z = t(() => import("./SurveyPortal-BF3BDE4u.js")), $ = t(() => import("./ConversationGoal-CPtGyH13.js")), tt = t(() => import("./FrequencyAndSetup-Codhil9J.js")), ot = t(() => import("./FrequencyAndSetupV2-vgfDY55i.js")), nt = t(() => import("./DesignatedStaff-tuZkULQ_.js")), rt = t(() => import("./WellBeingDashboard-B_5hhVYa.js")), it = t(() => import("./OpenFieldWellbeingQuestion-gqpggJ5q.js")), et = t(() => import("./MyProfile-Bs4FKrYH.js")), st = t(() => import("./UserProfileManagement-7t2u_-Cj.js")), mt = t(() => import("./EditFlagCard-Bx_3261r.js")), pt = t(() => import("./ConversationTarget-LDGvqUXy.js")), ct = t(() => import("./TeacherConversations-C0naWuM_.js").then((o) => o.b)), at = t(() => import("./index-DxMZ_Ng1.js")), lt = t(() => import("./index-C9Jp5mLH.js")), ut = t(() => import("./DashboardWrapper-C80LJmFX.js")), St = t(() => import("./FlagAlertWrapper-hxhD_OZO.js")), gt = t(() => import("./FlagTriggersEscalationView-BGBo5CLk.js").then((o) => o.a)), dt = t(() => import("./PersonalLearningPlansWrapper-BfHpVtcf.js")), Ct = t(() => import("./SentEmailLogs-nlpEbxgt.js")), yt = t(() => import("./CheckInChangeLogs-BjAVIu0t.js"));
5
5
  r.setLicenseKey(n);
6
6
  export {
7
7
  J as AIMario,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mario-education",
3
- "version": "2.0.303-staging",
3
+ "version": "2.0.304-staging",
4
4
  "description": "Contains education components && functions for BRSS Mario project",
5
5
  "author": "brss",
6
6
  "license": "MIT",