mario-education 2.0.302-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,85 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as b, useMemo as d, useEffect as m } from "react";
|
|
3
|
+
import { useNavigate as y, useLocation as A } from "react-router-dom";
|
|
4
|
+
import { useSelector as R } from "react-redux";
|
|
5
|
+
import { W as w } from "./WrapperWorkspace-DwmBBmJ5.js";
|
|
6
|
+
import { g as v } from "./constants-CFtuTn5q.js";
|
|
7
|
+
const E = () => {
|
|
8
|
+
const o = y(), p = A(), s = R((e) => e.common.user), t = new URLSearchParams(p.search).get("type") === "elementary", n = b(null), { msRoles: u, esRoles: h, hsRoles: f } = d(() => v(s?.appType, s?.msRoles, s?.esRoles, s?.hsRoles), [s?.appType, s?.msRoles, s?.esRoles, s?.hsRoles]), a = h.includes("Admin"), l = u.includes("Admin"), c = f.includes("Admin");
|
|
9
|
+
m(() => {
|
|
10
|
+
if (t && n.current) {
|
|
11
|
+
const e = n.current.closest('div[class*="container-fluid"]') || n.current.parentElement;
|
|
12
|
+
if (e) {
|
|
13
|
+
const g = e.style.padding;
|
|
14
|
+
return e.style.setProperty("padding", "0", "important"), () => {
|
|
15
|
+
e.style.padding = g;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return () => {
|
|
20
|
+
};
|
|
21
|
+
}, [t]);
|
|
22
|
+
const r = d(() => {
|
|
23
|
+
const e = [];
|
|
24
|
+
return a && e.push({
|
|
25
|
+
title: "Elementary / Primary",
|
|
26
|
+
description: "Ages 7-11 ยท Grades 2-5 / Years 3-6",
|
|
27
|
+
icon: "๐",
|
|
28
|
+
items: [
|
|
29
|
+
"Student well-being metrics",
|
|
30
|
+
"Response trends & patterns",
|
|
31
|
+
"Individual student insights"
|
|
32
|
+
],
|
|
33
|
+
buttonLabel: "Go to Dashboard โ",
|
|
34
|
+
buttonColor: "#316CD9",
|
|
35
|
+
onAction: () => o("?type=elementary")
|
|
36
|
+
}), l && e.push({
|
|
37
|
+
title: "Middle School",
|
|
38
|
+
description: "Ages 11-14 ยท Grades 6-8 / Years 7-9",
|
|
39
|
+
icon: "๐ฎ",
|
|
40
|
+
items: [
|
|
41
|
+
"Comprehensive stress tracking",
|
|
42
|
+
"Student cognitive mindsets",
|
|
43
|
+
"Well-being index scales"
|
|
44
|
+
],
|
|
45
|
+
buttonLabel: "Go to Dashboard โ",
|
|
46
|
+
buttonColor: "#9333ea",
|
|
47
|
+
onAction: () => o("/admin/dashboard?tier=ms")
|
|
48
|
+
}), c && e.push({
|
|
49
|
+
title: "High School",
|
|
50
|
+
description: "Ages 14-18 ยท Grades 9-12 / Years 10-13",
|
|
51
|
+
icon: "๐",
|
|
52
|
+
items: [
|
|
53
|
+
"Advanced stress tracking",
|
|
54
|
+
"Cognitive performance",
|
|
55
|
+
"Mature well-being index scales"
|
|
56
|
+
],
|
|
57
|
+
buttonLabel: "Go to Dashboard โ",
|
|
58
|
+
buttonColor: "#059669",
|
|
59
|
+
onAction: () => o("/admin/dashboard?tier=hs")
|
|
60
|
+
}), e;
|
|
61
|
+
}, [a, l, c, o]);
|
|
62
|
+
return m(() => {
|
|
63
|
+
t || r.length === 1 && r[0].onAction();
|
|
64
|
+
}, [t, r]), t ? /* @__PURE__ */ i(
|
|
65
|
+
"iframe",
|
|
66
|
+
{
|
|
67
|
+
ref: n,
|
|
68
|
+
src: `${window.location.origin}/es/admin/dashboard?fullsize=true`,
|
|
69
|
+
style: { width: "100%", height: "100%", border: "none", display: "block" },
|
|
70
|
+
title: "Elementary Dashboard"
|
|
71
|
+
}
|
|
72
|
+
) : /* @__PURE__ */ i(
|
|
73
|
+
w,
|
|
74
|
+
{
|
|
75
|
+
title: "Select Data Dashboard",
|
|
76
|
+
description: "Choose the educational level you wish to monitor.",
|
|
77
|
+
workspaces: r,
|
|
78
|
+
warningIcon: /* @__PURE__ */ i("span", { style: { fontSize: "16px" }, children: "๐" }),
|
|
79
|
+
warning: /* @__PURE__ */ i("span", { children: "All data is anonymized, securely stored, and fully compliant." })
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
};
|
|
83
|
+
export {
|
|
84
|
+
E as default
|
|
85
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),n=require("react"),u=require("react-router-dom"),f=require("react-redux"),y=require("./WrapperWorkspace-By45k19Q.cjs"),R=require("./constants-Y_C_gYKV.cjs"),A=()=>{const o=u.useNavigate(),m=u.useLocation(),s=f.useSelector(e=>e.common.user),t=new URLSearchParams(m.search).get("type")==="elementary",r=n.useRef(null),{msRoles:p,esRoles:h,hsRoles:g}=n.useMemo(()=>R.getAccessibleRoles(s?.appType,s?.msRoles,s?.esRoles,s?.hsRoles),[s?.appType,s?.msRoles,s?.esRoles,s?.hsRoles]),c=h.includes("Admin"),l=p.includes("Admin"),d=g.includes("Admin");n.useEffect(()=>{if(t&&r.current){const e=r.current.closest('div[class*="container-fluid"]')||r.current.parentElement;if(e){const b=e.style.padding;return e.style.setProperty("padding","0","important"),()=>{e.style.padding=b}}}return()=>{}},[t]);const i=n.useMemo(()=>{const e=[];return c&&e.push({title:"Elementary / Primary",description:"Ages 7-11 ยท Grades 2-5 / Years 3-6",icon:"๐",items:["Student well-being metrics","Response trends & patterns","Individual student insights"],buttonLabel:"Go to Dashboard โ",buttonColor:"#316CD9",onAction:()=>o("?type=elementary")}),l&&e.push({title:"Middle School",description:"Ages 11-14 ยท Grades 6-8 / Years 7-9",icon:"๐ฎ",items:["Comprehensive stress tracking","Student cognitive mindsets","Well-being index scales"],buttonLabel:"Go to Dashboard โ",buttonColor:"#9333ea",onAction:()=>o("/admin/dashboard?tier=ms")}),d&&e.push({title:"High School",description:"Ages 14-18 ยท Grades 9-12 / Years 10-13",icon:"๐",items:["Advanced stress tracking","Cognitive performance","Mature well-being index scales"],buttonLabel:"Go to Dashboard โ",buttonColor:"#059669",onAction:()=>o("/admin/dashboard?tier=hs")}),e},[c,l,d,o]);return n.useEffect(()=>{t||i.length===1&&i[0].onAction()},[t,i]),t?a.jsx("iframe",{ref:r,src:`${window.location.origin}/es/admin/dashboard?fullsize=true`,style:{width:"100%",height:"100%",border:"none",display:"block"},title:"Elementary Dashboard"}):a.jsx(y.WrapperWorkspace,{title:"Select Data Dashboard",description:"Choose the educational level you wish to monitor.",workspaces:i,warningIcon:a.jsx("span",{style:{fontSize:"16px"},children:"๐"}),warning:a.jsx("span",{children:"All data is anonymized, securely stored, and fully compliant."})})};exports.default=A;
|