mario-education 2.1.16-staging → 2.1.18-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.
Files changed (33) hide show
  1. package/dist/CustomQuestionAlert-CAhqPmSr.cjs +1 -0
  2. package/dist/CustomQuestionAlert-emA5m_sx.js +436 -0
  3. package/dist/Dashboard-B8g3HQ33.js +23689 -0
  4. package/dist/Dashboard-BshsPg6t.cjs +55 -0
  5. package/dist/DashboardWrapper-CbiPfwwT.cjs +1 -0
  6. package/dist/DashboardWrapper-DMe1gtuc.js +85 -0
  7. package/dist/FlagAlertWrapper-CbDrgI47.cjs +1 -0
  8. package/dist/FlagAlertWrapper-O7c4Jjj-.js +90 -0
  9. package/dist/FlagTriggersEscalationView-BAmAXn07.cjs +1 -0
  10. package/dist/FlagTriggersEscalationView-izuogGYj.js +1738 -0
  11. package/dist/MainLayoutAdmin-COl0o2A7.cjs +6 -0
  12. package/dist/MainLayoutAdmin-D9XzdnOa.js +1784 -0
  13. package/dist/PersonalLearningPlansWrapper-CT9pnddy.js +99 -0
  14. package/dist/PersonalLearningPlansWrapper-Cz15zDaI.cjs +1 -0
  15. package/dist/UserProfileManagement-CnRkMqPe.js +1166 -0
  16. package/dist/UserProfileManagement-DVWgVKCH.js +1165 -0
  17. package/dist/UserProfileManagement-Drhy4CT4.cjs +1 -0
  18. package/dist/UserProfileManagement-DsJTnW9h.cjs +1 -0
  19. package/dist/constants-CY6enpj9.cjs +1 -0
  20. package/dist/constants-D8Bp8XKt.js +44 -0
  21. package/dist/containers/Overview/components/modals/UnhealthyStudentsModal.d.ts +1 -0
  22. package/dist/containers/Overview/config/type.d.ts +2 -0
  23. package/dist/index-Bjxm8rmE.js +7778 -0
  24. package/dist/index-Bq2-4-fl.js +1774 -0
  25. package/dist/index-D-L5NoW5.cjs +4 -0
  26. package/dist/index-DUo-deQs.js +1774 -0
  27. package/dist/index-Dl8JA5oZ.cjs +1 -0
  28. package/dist/index-kCMtFG4V.cjs +1 -0
  29. package/dist/index.js +1 -1
  30. package/dist/index.modern.js +1 -1
  31. package/dist/useOverview-CzEJbEEa.js +775 -0
  32. package/dist/useOverview-DcTh2PFY.cjs +1 -0
  33. package/package.json +2 -2
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),f=require("./FlagTriggersEscalationView-BAmAXn07.cjs"),n=require("reactstrap"),o=require("mario-core"),q=require("formik"),N=require("./useStateManager-7e1e8489.esm-CT_lBj6S.cjs"),C=require("./extends-GhUDsoav.cjs"),T=require("react");require("@emotion/react");require("react-dom");const s=require("./styles.module-ClTu2C4O.cjs"),S=require("yup"),R=require("./index-C2Pc6kJF.cjs"),I=require("react-router-dom"),A=require("./index-Ct5zFKu6.cjs");function w(i){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const a in i)if(a!=="default"){const r=Object.getOwnPropertyDescriptor(i,a);Object.defineProperty(t,a,r.get?r:{enumerable:!0,get:()=>i[a]})}}return t.default=i,Object.freeze(t)}const E=w(T),g=w(S);var M=T.forwardRef(function(i,t){var a=N.useStateManager(i);return E.createElement(N.Select,C._extends({ref:t},a))}),$=M;const L=g.object({questionText:g.string().required("Question is required"),text:g.string().required("Text is required"),flag:g.string().required("Flag is required")}),_=({header:i,onConfirm:t,questionAlertDetail:a,onCancel:r})=>{const{t:d}=o.useTranslation();return e.jsx(q.Formik,{initialValues:a??s.initQuestionAlert,enableReinitialize:!0,validationSchema:L,onSubmit:async(h,c)=>{await t(h),c.resetForm(),r()},children:h=>{const{values:c,touched:u,errors:l,handleSubmit:x,setFieldValue:y}=h;return e.jsxs(n.Modal,{isOpen:!!a,toggle:()=>r(null),zIndex:1201,style:{marginTop:"8rem"},children:[e.jsx(n.ModalHeader,{children:i}),e.jsx(n.ModalBody,{children:e.jsxs(n.Row,{className:"mb-2",children:[e.jsxs(n.Col,{md:12,className:"mb-2",children:[e.jsx(o.RequiredLabel,{text:d("description")}),e.jsx(n.Input,{defaultValue:c.text,onChange:m=>{y("text",m.target?.value??"")}}),u.text&&l.text&&e.jsx(o.ErrorHandler,{text:l.text})]}),e.jsxs(n.Col,{md:12,className:"mb-2",children:[e.jsx(o.RequiredLabel,{text:d("question")}),e.jsx(n.Input,{defaultValue:c.questionText,onChange:m=>{y("questionText",m.target?.value??"")}}),u.questionText&&l.questionText&&e.jsx(o.ErrorHandler,{text:l.questionText})]}),e.jsx(n.Col,{md:12,className:"mb-2",children:e.jsxs(n.Row,{children:[e.jsxs(n.Col,{md:6,className:"mb-2",children:[e.jsx(o.RequiredLabel,{text:d("from")}),e.jsx(n.Input,{type:"number",defaultValue:c.from,min:0,max:100,onChange:m=>{const j=parseInt(m.target.value,10);!isNaN(j)&&j>=0&&j<=100&&y("from",j)}}),u.from&&l.from&&e.jsx(o.ErrorHandler,{text:l.from})]}),e.jsxs(n.Col,{md:6,className:"mb-2",children:[e.jsx(o.RequiredLabel,{text:d("to")}),e.jsx(n.Input,{type:"number",min:0,max:100,defaultValue:c.to,onChange:m=>{const j=parseInt(m.target.value,10);!isNaN(j)&&j>=0&&j<=100&&y("to",j)}}),u.to&&l.to&&e.jsx(o.ErrorHandler,{text:l.to})]})]})}),e.jsx(n.Col,{md:12,className:"mb-2",children:e.jsxs(n.Row,{children:[e.jsxs(n.Col,{md:6,className:"mb-2",children:[e.jsx(o.RequiredLabel,{text:d("flag")}),e.jsx(n.Input,{defaultValue:c.flag,onChange:m=>{y("flag",m.target?.value)}}),u.flag&&l.flag&&e.jsx(o.ErrorHandler,{text:l.flag})]}),e.jsxs(n.Col,{md:6,className:"mb-2",children:[e.jsx(o.RequiredLabel,{text:d("type")}),e.jsx($,{options:s.alertTypeOptions,value:c.type=="Conference"||c.type==s.AlertType.Conference?s.alertTypeOptions[1]:s.alertTypeOptions[0],onChange:m=>y("type",m?.value??s.alertTypeOptions[0].value),placeholder:"Select type"}),u.to&&l.to&&e.jsx(o.ErrorHandler,{text:l.to})]})]})})]})}),e.jsxs(n.ModalFooter,{className:"text-right",children:[t&&e.jsx(n.Button,{color:"primary",onClick:()=>x(),children:d("confirm")}),e.jsx(n.Button,{onClick:()=>r(null),children:d("cancel")})]})]})}})},b={danger:s.styles.badgeDanger,warning:s.styles.badgeWarning,concern:s.styles.badgeConcern,safe:s.styles.badgeSafe,great:s.styles.badgeGreat},F=["danger","warning","concern","safe","great"],k=["great","safe","concern","warning","danger"],p=(i,t,a)=>Math.min(Math.max(i,t),a),O=i=>{if(i==null)return-1;const t=p(i,0,100);return Math.min(Math.floor(t/20),4)},V=i=>{if(i==null)return-1;const t=p(i,-100,100),a=(t+100)/40,r=t>=20?Math.floor(a):Math.ceil(a)-1;return p(r,0,4)},v=(i,t,a)=>a<0||!i?.length?null:{label:i[a]??"",variant:t[a]??"concern"},B=({notifications:i,flag:t})=>{const{t:a}=o.useTranslation(),r=t?.flag?.toLowerCase()?.includes("red"),d=I.useNavigate(),h=v(t.safetyAnswers,F,O(t.safetyThreshold)),c=v(t.stressAnswers,k,V(t.stressThreshold)),u=x=>{d(`/admin/custom-alert/edit/${x}`)},l=Array.isArray(t.activeKpis)?t.activeKpis.map(x=>String(x).trim()).filter(Boolean):typeof t.activeKpis=="string"?t.activeKpis.split(",").map(x=>x.trim()).filter(Boolean):[];return e.jsxs("div",{className:`${s.styles.card} ${r?s.styles.cardRed:s.styles.cardYellow}`,children:[e.jsxs("div",{className:"d-flex justify-content-between align-items-start mb-3",children:[e.jsxs("div",{className:"d-flex",children:[e.jsx("img",{src:"/images/flag-icon.svg",alt:"flag",className:`${s.styles.icon} ${r?s.styles.iconRed:s.styles.iconYellow}`}),e.jsxs("div",{children:[e.jsx("div",{className:`${s.styles.cardTitle} ${r?s.styles.cardTitleRed:s.styles.cardTitleYellow}`,children:t.flag}),e.jsx("div",{className:s.styles.cardSubtitle,children:t.text})]})]}),e.jsxs(n.Button,{size:"sm",outline:!0,color:"secondary",onClick:()=>t.id&&u(t.id),className:s.styles.editBtn,children:[e.jsx(R.BiEdit,{className:s.styles.editBtnIcon}),a("edit")]})]}),e.jsxs("div",{className:"mb-5",children:[e.jsx("div",{className:s.styles.sectionLabel,children:a("metrics")}),e.jsxs("div",{className:s.styles.metricList,children:[e.jsxs("div",{className:`d-flex justify-content-between align-items-start ${s.styles.metricRow}`,children:[e.jsxs("div",{className:s.styles.metricLeft,children:[e.jsx("span",{className:s.styles.metricName,children:"Safety Threshold"}),h&&e.jsx("span",{className:`${s.styles.badge} ${b[h.variant]}`,children:h.label})]}),e.jsx("span",{className:s.styles.threshold,children:`< ${t.safetyThreshold}`})]}),e.jsxs("div",{className:`d-flex justify-content-between align-items-start ${s.styles.metricRow}`,children:[e.jsxs("div",{className:s.styles.metricLeft,children:[e.jsx("span",{className:s.styles.metricName,children:"Stress Threshold"}),c&&e.jsx("span",{className:`${s.styles.badge} ${b[c.variant]}`,children:c.label})]}),e.jsx("span",{className:s.styles.threshold,children:`> ${t.stressThreshold}`})]}),e.jsxs("div",{className:`d-flex justify-content-between align-items-start ${s.styles.metricRow}`,children:[e.jsx("div",{className:s.styles.metricLeft,children:e.jsx("span",{className:s.styles.metricName,children:"Percentage Decrease of any metric"})}),e.jsx("span",{className:s.styles.threshold,children:t.decreaseInAnyMetric})]})]})]}),l.length>0&&e.jsxs("div",{className:"mb-3",children:[e.jsx("div",{className:`${s.styles.sectionLabel} ${s.styles.sectionLabelKpi}`,children:"Monitored KPIs"}),e.jsx("div",{className:"d-flex flex-wrap",children:l.map(x=>e.jsx("span",{className:s.styles.kpiPill,children:x},x))})]}),i&&e.jsxs("div",{className:s.styles.sectionNotification,children:[e.jsx("div",{className:`${s.styles.sectionLabel} mb-1`,children:"Notifications"}),e.jsxs("div",{className:s.styles.notificationRow,children:[e.jsx("span",{children:"Recipients:"})," ",t.recipientRoles]}),e.jsxs("div",{className:s.styles.notificationRow,children:[e.jsx("span",{children:"Methods:"})," ",t.isInAppNotification?"In-App":"",t.isInAppNotification&&t.isEmailNotification?", ":"",t.isEmailNotification?"Email":""]})]})]})},P={recipients:["Educator","Counselor","Admin"],methods:["In-App","Email"]},D=()=>{if(!(new URLSearchParams(window.location.search).get("legacy")==="true"))return e.jsx(f.FlagTriggersEscalationView,{});const{t:a}=o.useTranslation(),{model:r,setModel:d,createAlert:h,updateAlert:c,flags:u}=f.useQuestionAlert();return e.jsxs("div",{className:"fadeIn animated",children:[e.jsx(_,{header:r?.id?a("edit_custom_alert"):a("create_custom_alert"),confirmText:r?.id?a("update"):a("create"),onConfirm:r?.id?c:h,onCancel:()=>d(null),questionAlertDetail:r,edited:!0,setEdited:()=>{}}),e.jsx("h5",{className:s.styles.title,children:"Flag System Configuration"}),e.jsx("p",{className:s.styles.pageSubtitle,children:"Manage your red and yellow flag settings, including trigger conditions, metrics, and notification preferences."}),e.jsxs("div",{className:s.styles.howItWorks,children:[e.jsxs("div",{className:s.styles.howItWorksTitle,children:[e.jsx(A.CiCircleInfo,{className:s.styles.howItWorksInfoIcon})," How It Works"]}),e.jsxs("ul",{className:s.styles.howItWorksList,children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Red Flags"})," indicate critical issues requiring immediate attention"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Yellow Flags"})," serve as an early warning signs for potential concerns"]}),e.jsx("li",{children:"Click the Edit button on any flag to configure its settings"}),e.jsx("li",{children:"Notifications will be sent based on your selected recipients and methods"})]})]}),e.jsx(n.Row,{children:u.map(l=>e.jsx(n.Col,{md:6,className:"mb-3",children:e.jsx(B,{flag:l,notifications:P})}))})]})};exports.default=D;
@@ -0,0 +1,436 @@
1
+ import { jsx as e, jsxs as i } from "react/jsx-runtime";
2
+ import { F as R, u as M } from "./FlagTriggersEscalationView-izuogGYj.js";
3
+ import { Modal as $, ModalHeader as E, ModalBody as q, Row as w, Col as p, Input as b, ModalFooter as L, Button as T } from "reactstrap";
4
+ import { useTranslation as I, RequiredLabel as N, ErrorHandler as v } from "mario-core";
5
+ import { Formik as F } from "formik";
6
+ import { u as V, S as k } from "./useStateManager-7e1e8489.esm-Cr7tnkuE.js";
7
+ import { _ } from "./extends-hS2Bh-Yp.js";
8
+ import * as B from "react";
9
+ import { forwardRef as j } from "react";
10
+ import "@emotion/react";
11
+ import "react-dom";
12
+ import { i as K, a as x, A as P, s as t } from "./styles.module-DnvH4rBk.js";
13
+ import * as y from "yup";
14
+ import { B as W } from "./index-BaqPgnKF.js";
15
+ import { useNavigate as D } from "react-router-dom";
16
+ import { C as Q } from "./index-Ch2tU51H.js";
17
+ var Y = /* @__PURE__ */ j(function(n, a) {
18
+ var s = V(n);
19
+ return /* @__PURE__ */ B.createElement(k, _({
20
+ ref: a
21
+ }, s));
22
+ }), z = Y;
23
+ const O = y.object({
24
+ questionText: y.string().required("Question is required"),
25
+ text: y.string().required("Text is required"),
26
+ flag: y.string().required("Flag is required")
27
+ }), H = ({
28
+ header: n,
29
+ onConfirm: a,
30
+ questionAlertDetail: s,
31
+ onCancel: c
32
+ }) => {
33
+ const { t: o } = I();
34
+ return /* @__PURE__ */ e(
35
+ F,
36
+ {
37
+ initialValues: s ?? K,
38
+ enableReinitialize: !0,
39
+ validationSchema: O,
40
+ onSubmit: async (u, l) => {
41
+ await a(u), l.resetForm(), c();
42
+ },
43
+ children: (u) => {
44
+ const {
45
+ values: l,
46
+ touched: m,
47
+ errors: r,
48
+ handleSubmit: h,
49
+ setFieldValue: g
50
+ // handleChange
51
+ } = u;
52
+ return /* @__PURE__ */ i(
53
+ $,
54
+ {
55
+ isOpen: !!s,
56
+ toggle: () => c(null),
57
+ zIndex: 1201,
58
+ style: { marginTop: "8rem" },
59
+ children: [
60
+ /* @__PURE__ */ e(E, { children: n }),
61
+ /* @__PURE__ */ e(q, { children: /* @__PURE__ */ i(w, { className: "mb-2", children: [
62
+ /* @__PURE__ */ i(p, { md: 12, className: "mb-2", children: [
63
+ /* @__PURE__ */ e(N, { text: o("description") }),
64
+ /* @__PURE__ */ e(
65
+ b,
66
+ {
67
+ defaultValue: l.text,
68
+ onChange: (d) => {
69
+ g(
70
+ "text",
71
+ d.target?.value ?? ""
72
+ );
73
+ }
74
+ }
75
+ ),
76
+ m.text && r.text && /* @__PURE__ */ e(
77
+ v,
78
+ {
79
+ text: r.text
80
+ }
81
+ )
82
+ ] }),
83
+ /* @__PURE__ */ i(p, { md: 12, className: "mb-2", children: [
84
+ /* @__PURE__ */ e(N, { text: o("question") }),
85
+ /* @__PURE__ */ e(
86
+ b,
87
+ {
88
+ defaultValue: l.questionText,
89
+ onChange: (d) => {
90
+ g(
91
+ "questionText",
92
+ d.target?.value ?? ""
93
+ );
94
+ }
95
+ }
96
+ ),
97
+ m.questionText && r.questionText && /* @__PURE__ */ e(
98
+ v,
99
+ {
100
+ text: r.questionText
101
+ }
102
+ )
103
+ ] }),
104
+ /* @__PURE__ */ e(p, { md: 12, className: "mb-2", children: /* @__PURE__ */ i(w, { children: [
105
+ /* @__PURE__ */ i(p, { md: 6, className: "mb-2", children: [
106
+ /* @__PURE__ */ e(N, { text: o("from") }),
107
+ /* @__PURE__ */ e(
108
+ b,
109
+ {
110
+ type: "number",
111
+ defaultValue: l.from,
112
+ min: 0,
113
+ max: 100,
114
+ onChange: (d) => {
115
+ const f = parseInt(d.target.value, 10);
116
+ !isNaN(f) && f >= 0 && f <= 100 && g("from", f);
117
+ }
118
+ }
119
+ ),
120
+ m.from && r.from && /* @__PURE__ */ e(
121
+ v,
122
+ {
123
+ text: r.from
124
+ }
125
+ )
126
+ ] }),
127
+ /* @__PURE__ */ i(p, { md: 6, className: "mb-2", children: [
128
+ /* @__PURE__ */ e(N, { text: o("to") }),
129
+ /* @__PURE__ */ e(
130
+ b,
131
+ {
132
+ type: "number",
133
+ min: 0,
134
+ max: 100,
135
+ defaultValue: l.to,
136
+ onChange: (d) => {
137
+ const f = parseInt(d.target.value, 10);
138
+ !isNaN(f) && f >= 0 && f <= 100 && g("to", f);
139
+ }
140
+ }
141
+ ),
142
+ m.to && r.to && /* @__PURE__ */ e(
143
+ v,
144
+ {
145
+ text: r.to
146
+ }
147
+ )
148
+ ] })
149
+ ] }) }),
150
+ /* @__PURE__ */ e(p, { md: 12, className: "mb-2", children: /* @__PURE__ */ i(w, { children: [
151
+ /* @__PURE__ */ i(p, { md: 6, className: "mb-2", children: [
152
+ /* @__PURE__ */ e(N, { text: o("flag") }),
153
+ /* @__PURE__ */ e(
154
+ b,
155
+ {
156
+ defaultValue: l.flag,
157
+ onChange: (d) => {
158
+ g(
159
+ "flag",
160
+ d.target?.value
161
+ );
162
+ }
163
+ }
164
+ ),
165
+ m.flag && r.flag && /* @__PURE__ */ e(
166
+ v,
167
+ {
168
+ text: r.flag
169
+ }
170
+ )
171
+ ] }),
172
+ /* @__PURE__ */ i(p, { md: 6, className: "mb-2", children: [
173
+ /* @__PURE__ */ e(N, { text: o("type") }),
174
+ /* @__PURE__ */ e(
175
+ z,
176
+ {
177
+ options: x,
178
+ value: l.type == "Conference" || l.type == P.Conference ? x[1] : x[0],
179
+ onChange: (d) => g(
180
+ "type",
181
+ d?.value ?? x[0].value
182
+ ),
183
+ placeholder: "Select type"
184
+ }
185
+ ),
186
+ m.to && r.to && /* @__PURE__ */ e(
187
+ v,
188
+ {
189
+ text: r.to
190
+ }
191
+ )
192
+ ] })
193
+ ] }) })
194
+ ] }) }),
195
+ /* @__PURE__ */ i(L, { className: "text-right", children: [
196
+ a && /* @__PURE__ */ e(
197
+ T,
198
+ {
199
+ color: "primary",
200
+ onClick: () => h(),
201
+ children: o("confirm")
202
+ }
203
+ ),
204
+ /* @__PURE__ */ e(T, { onClick: () => c(null), children: o("cancel") })
205
+ ] })
206
+ ]
207
+ }
208
+ );
209
+ }
210
+ }
211
+ );
212
+ }, A = {
213
+ danger: t.badgeDanger,
214
+ warning: t.badgeWarning,
215
+ concern: t.badgeConcern,
216
+ safe: t.badgeSafe,
217
+ great: t.badgeGreat
218
+ }, G = [
219
+ "danger",
220
+ "warning",
221
+ "concern",
222
+ "safe",
223
+ "great"
224
+ ], U = [
225
+ "great",
226
+ "safe",
227
+ "concern",
228
+ "warning",
229
+ "danger"
230
+ ], S = (n, a, s) => Math.min(Math.max(n, a), s), J = (n) => {
231
+ if (n == null) return -1;
232
+ const a = S(n, 0, 100);
233
+ return Math.min(Math.floor(a / 20), 4);
234
+ }, X = (n) => {
235
+ if (n == null) return -1;
236
+ const a = S(n, -100, 100), s = (a + 100) / 40, c = a >= 20 ? Math.floor(s) : Math.ceil(s) - 1;
237
+ return S(c, 0, 4);
238
+ }, C = (n, a, s) => s < 0 || !n?.length ? null : {
239
+ label: n[s] ?? "",
240
+ variant: a[s] ?? "concern"
241
+ }, Z = ({
242
+ notifications: n,
243
+ flag: a
244
+ }) => {
245
+ const { t: s } = I(), c = a?.flag?.toLowerCase()?.includes("red"), o = D(), u = C(
246
+ a.safetyAnswers,
247
+ G,
248
+ J(a.safetyThreshold)
249
+ ), l = C(
250
+ a.stressAnswers,
251
+ U,
252
+ X(a.stressThreshold)
253
+ ), m = (h) => {
254
+ o(`/admin/custom-alert/edit/${h}`);
255
+ }, r = Array.isArray(a.activeKpis) ? a.activeKpis.map((h) => String(h).trim()).filter(Boolean) : typeof a.activeKpis == "string" ? a.activeKpis.split(",").map((h) => h.trim()).filter(Boolean) : [];
256
+ return /* @__PURE__ */ i(
257
+ "div",
258
+ {
259
+ className: `${t.card} ${c ? t.cardRed : t.cardYellow}`,
260
+ children: [
261
+ /* @__PURE__ */ i("div", { className: "d-flex justify-content-between align-items-start mb-3", children: [
262
+ /* @__PURE__ */ i("div", { className: "d-flex", children: [
263
+ /* @__PURE__ */ e(
264
+ "img",
265
+ {
266
+ src: "/images/flag-icon.svg",
267
+ alt: "flag",
268
+ className: `${t.icon} ${c ? t.iconRed : t.iconYellow}`
269
+ }
270
+ ),
271
+ /* @__PURE__ */ i("div", { children: [
272
+ /* @__PURE__ */ e(
273
+ "div",
274
+ {
275
+ className: `${t.cardTitle} ${c ? t.cardTitleRed : t.cardTitleYellow}`,
276
+ children: a.flag
277
+ }
278
+ ),
279
+ /* @__PURE__ */ e("div", { className: t.cardSubtitle, children: a.text })
280
+ ] })
281
+ ] }),
282
+ /* @__PURE__ */ i(
283
+ T,
284
+ {
285
+ size: "sm",
286
+ outline: !0,
287
+ color: "secondary",
288
+ onClick: () => a.id && m(a.id),
289
+ className: t.editBtn,
290
+ children: [
291
+ /* @__PURE__ */ e(W, { className: t.editBtnIcon }),
292
+ s("edit")
293
+ ]
294
+ }
295
+ )
296
+ ] }),
297
+ /* @__PURE__ */ i("div", { className: "mb-5", children: [
298
+ /* @__PURE__ */ e("div", { className: t.sectionLabel, children: s("metrics") }),
299
+ /* @__PURE__ */ i("div", { className: t.metricList, children: [
300
+ /* @__PURE__ */ i(
301
+ "div",
302
+ {
303
+ className: `d-flex justify-content-between align-items-start ${t.metricRow}`,
304
+ children: [
305
+ /* @__PURE__ */ i("div", { className: t.metricLeft, children: [
306
+ /* @__PURE__ */ e("span", { className: t.metricName, children: "Safety Threshold" }),
307
+ u && /* @__PURE__ */ e(
308
+ "span",
309
+ {
310
+ className: `${t.badge} ${A[u.variant]}`,
311
+ children: u.label
312
+ }
313
+ )
314
+ ] }),
315
+ /* @__PURE__ */ e("span", { className: t.threshold, children: `< ${a.safetyThreshold}` })
316
+ ]
317
+ }
318
+ ),
319
+ /* @__PURE__ */ i(
320
+ "div",
321
+ {
322
+ className: `d-flex justify-content-between align-items-start ${t.metricRow}`,
323
+ children: [
324
+ /* @__PURE__ */ i("div", { className: t.metricLeft, children: [
325
+ /* @__PURE__ */ e("span", { className: t.metricName, children: "Stress Threshold" }),
326
+ l && /* @__PURE__ */ e(
327
+ "span",
328
+ {
329
+ className: `${t.badge} ${A[l.variant]}`,
330
+ children: l.label
331
+ }
332
+ )
333
+ ] }),
334
+ /* @__PURE__ */ e("span", { className: t.threshold, children: `> ${a.stressThreshold}` })
335
+ ]
336
+ }
337
+ ),
338
+ /* @__PURE__ */ i(
339
+ "div",
340
+ {
341
+ className: `d-flex justify-content-between align-items-start ${t.metricRow}`,
342
+ children: [
343
+ /* @__PURE__ */ e("div", { className: t.metricLeft, children: /* @__PURE__ */ e("span", { className: t.metricName, children: "Percentage Decrease of any metric" }) }),
344
+ /* @__PURE__ */ e("span", { className: t.threshold, children: a.decreaseInAnyMetric })
345
+ ]
346
+ }
347
+ )
348
+ ] })
349
+ ] }),
350
+ r.length > 0 && /* @__PURE__ */ i("div", { className: "mb-3", children: [
351
+ /* @__PURE__ */ e(
352
+ "div",
353
+ {
354
+ className: `${t.sectionLabel} ${t.sectionLabelKpi}`,
355
+ children: "Monitored KPIs"
356
+ }
357
+ ),
358
+ /* @__PURE__ */ e("div", { className: "d-flex flex-wrap", children: r.map((h) => /* @__PURE__ */ e("span", { className: t.kpiPill, children: h }, h)) })
359
+ ] }),
360
+ n && /* @__PURE__ */ i("div", { className: t.sectionNotification, children: [
361
+ /* @__PURE__ */ e("div", { className: `${t.sectionLabel} mb-1`, children: "Notifications" }),
362
+ /* @__PURE__ */ i("div", { className: t.notificationRow, children: [
363
+ /* @__PURE__ */ e("span", { children: "Recipients:" }),
364
+ " ",
365
+ a.recipientRoles
366
+ ] }),
367
+ /* @__PURE__ */ i("div", { className: t.notificationRow, children: [
368
+ /* @__PURE__ */ e("span", { children: "Methods:" }),
369
+ " ",
370
+ a.isInAppNotification ? "In-App" : "",
371
+ a.isInAppNotification && a.isEmailNotification ? ", " : "",
372
+ a.isEmailNotification ? "Email" : ""
373
+ ] })
374
+ ] })
375
+ ]
376
+ }
377
+ );
378
+ }, ee = {
379
+ recipients: ["Educator", "Counselor", "Admin"],
380
+ methods: ["In-App", "Email"]
381
+ }, pe = () => {
382
+ if (!(new URLSearchParams(window.location.search).get("legacy") === "true"))
383
+ return /* @__PURE__ */ e(R, {});
384
+ const { t: s } = I(), {
385
+ model: c,
386
+ setModel: o,
387
+ createAlert: u,
388
+ updateAlert: l,
389
+ flags: m
390
+ } = M();
391
+ return /* @__PURE__ */ i("div", { className: "fadeIn animated", children: [
392
+ /* @__PURE__ */ e(
393
+ H,
394
+ {
395
+ header: c?.id ? s("edit_custom_alert") : s("create_custom_alert"),
396
+ confirmText: c?.id ? s("update") : s("create"),
397
+ onConfirm: c?.id ? l : u,
398
+ onCancel: () => o(null),
399
+ questionAlertDetail: c,
400
+ edited: !0,
401
+ setEdited: () => {
402
+ }
403
+ }
404
+ ),
405
+ /* @__PURE__ */ e("h5", { className: t.title, children: "Flag System Configuration" }),
406
+ /* @__PURE__ */ e("p", { className: t.pageSubtitle, children: "Manage your red and yellow flag settings, including trigger conditions, metrics, and notification preferences." }),
407
+ /* @__PURE__ */ i("div", { className: t.howItWorks, children: [
408
+ /* @__PURE__ */ i("div", { className: t.howItWorksTitle, children: [
409
+ /* @__PURE__ */ e(Q, { className: t.howItWorksInfoIcon }),
410
+ " How It Works"
411
+ ] }),
412
+ /* @__PURE__ */ i("ul", { className: t.howItWorksList, children: [
413
+ /* @__PURE__ */ i("li", { children: [
414
+ /* @__PURE__ */ e("strong", { children: "Red Flags" }),
415
+ " indicate critical issues requiring immediate attention"
416
+ ] }),
417
+ /* @__PURE__ */ i("li", { children: [
418
+ /* @__PURE__ */ e("strong", { children: "Yellow Flags" }),
419
+ " serve as an early warning signs for potential concerns"
420
+ ] }),
421
+ /* @__PURE__ */ e("li", { children: "Click the Edit button on any flag to configure its settings" }),
422
+ /* @__PURE__ */ e("li", { children: "Notifications will be sent based on your selected recipients and methods" })
423
+ ] })
424
+ ] }),
425
+ /* @__PURE__ */ e(w, { children: m.map((r) => /* @__PURE__ */ e(p, { md: 6, className: "mb-3", children: /* @__PURE__ */ e(
426
+ Z,
427
+ {
428
+ flag: r,
429
+ notifications: ee
430
+ }
431
+ ) })) })
432
+ ] });
433
+ };
434
+ export {
435
+ pe as default
436
+ };