mario-core 3.0.3-admin → 3.0.5-admin
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/containers/Login/views/block/IconContent.d.ts +2 -2
- package/dist/containers/Login/views/block/QuoteContent.d.ts +5 -2
- package/dist/index.css +127 -164
- package/dist/index.js +87 -93
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +88 -94
- package/dist/index.modern.js.map +1 -1
- package/dist/utils/constants.d.ts +1 -0
- package/package.json +100 -100
- package/dist/containers/Login/constant/type.d.ts +0 -5
- package/dist/containers/Login/views/ModelSelectRole.d.ts +0 -4
- package/dist/utils/amplitude.d.ts +0 -1
package/dist/index.modern.js
CHANGED
|
@@ -3,7 +3,7 @@ import i18n from 'i18next';
|
|
|
3
3
|
import { initReactI18next, useTranslation } from 'react-i18next';
|
|
4
4
|
export { I18nextProvider, useTranslation } from 'react-i18next';
|
|
5
5
|
import React, { useState, useCallback, useEffect, forwardRef, useRef, Suspense, useMemo, memo, Fragment, useImperativeHandle } from 'react';
|
|
6
|
-
import { Input, Modal, ModalHeader, ModalBody, ModalFooter, Button, Row, Col, Form, FormGroup, Label,
|
|
6
|
+
import { Input, Modal, ModalHeader, ModalBody, ModalFooter, Button, Row, Col, Form, FormGroup, Label, Dropdown, DropdownToggle, DropdownMenu, NavLink, DropdownItem, Alert, Pagination, PaginationItem, PaginationLink, Table, CustomInput, Nav, NavItem, TabContent, TabPane, Card, CardImg, CardBody, CardTitle, CardHeader, CardText } from 'reactstrap';
|
|
7
7
|
import { useHistory, Link, useLocation, Switch, Route, Prompt, useParams } from 'react-router-dom';
|
|
8
8
|
import { Formik } from 'formik';
|
|
9
9
|
import { object, string, boolean, number, array } from 'yup';
|
|
@@ -14,7 +14,6 @@ import amplitude from 'amplitude-js';
|
|
|
14
14
|
import { useGoogleReCaptcha, GoogleReCaptcha, GoogleReCaptchaProvider } from 'react-google-recaptcha-v3';
|
|
15
15
|
import GoogleLogin from 'react-google-login';
|
|
16
16
|
import Select from 'react-select';
|
|
17
|
-
import { GiHamburgerMenu } from 'react-icons/gi';
|
|
18
17
|
import { CSidebar, CSidebarBrand, CSidebarNav, CCreateElement, CSidebarNavDivider, CSidebarNavDropdown, CSidebarNavItem, CSidebarNavTitle, CSidebarFooter, CHeader, CHeaderBrand, CHeaderNav, CContainer } from '@coreui/react';
|
|
19
18
|
import { CgMenuRight } from 'react-icons/cg';
|
|
20
19
|
import { RiLogoutBoxRLine } from 'react-icons/ri';
|
|
@@ -508,6 +507,8 @@ var search_activity = "Search activity";
|
|
|
508
507
|
var activity = "Activity";
|
|
509
508
|
var activity_type = "Activity type";
|
|
510
509
|
var select_or_type_an_activity = "Select or type an activity";
|
|
510
|
+
var counselor_name = "Counselor Name";
|
|
511
|
+
var assign_counselor = "Assign Counselor";
|
|
511
512
|
var lang_us = {
|
|
512
513
|
dashboard: dashboard,
|
|
513
514
|
user: user,
|
|
@@ -990,7 +991,9 @@ var lang_us = {
|
|
|
990
991
|
search_activity: search_activity,
|
|
991
992
|
activity: activity,
|
|
992
993
|
activity_type: activity_type,
|
|
993
|
-
select_or_type_an_activity: select_or_type_an_activity
|
|
994
|
+
select_or_type_an_activity: select_or_type_an_activity,
|
|
995
|
+
counselor_name: counselor_name,
|
|
996
|
+
assign_counselor: assign_counselor
|
|
994
997
|
};
|
|
995
998
|
|
|
996
999
|
var dashboard$1 = "Dashboard";
|
|
@@ -1470,6 +1473,8 @@ var search_activity$1 = "Search activity";
|
|
|
1470
1473
|
var activity$1 = "Activity";
|
|
1471
1474
|
var activity_type$1 = "Activity type";
|
|
1472
1475
|
var select_or_type_an_activity$1 = "Select or type an activity";
|
|
1476
|
+
var counselor_name$1 = "Counselor Name";
|
|
1477
|
+
var assign_counselor$1 = "Assign Counselor";
|
|
1473
1478
|
var lang_uk = {
|
|
1474
1479
|
dashboard: dashboard$1,
|
|
1475
1480
|
user: user$1,
|
|
@@ -1952,7 +1957,9 @@ var lang_uk = {
|
|
|
1952
1957
|
search_activity: search_activity$1,
|
|
1953
1958
|
activity: activity$1,
|
|
1954
1959
|
activity_type: activity_type$1,
|
|
1955
|
-
select_or_type_an_activity: select_or_type_an_activity$1
|
|
1960
|
+
select_or_type_an_activity: select_or_type_an_activity$1,
|
|
1961
|
+
counselor_name: counselor_name$1,
|
|
1962
|
+
assign_counselor: assign_counselor$1
|
|
1956
1963
|
};
|
|
1957
1964
|
|
|
1958
1965
|
var DEFAULT_LANGUAGE = localStorage.getItem("language") !== null ? localStorage.getItem("language") : "uk";
|
|
@@ -1995,7 +2002,7 @@ function _catch(body, recover) {
|
|
|
1995
2002
|
return result;
|
|
1996
2003
|
}
|
|
1997
2004
|
|
|
1998
|
-
var styles = {"btn-login-google":"_2HqmH","notification-count":"_2sew7","text-introduction":"_3OgWF","btn-trans-border":"_r9cAh","contact":"_NszFe","learn-more":"_MDjzH","title-quote":"_1Swkw","descriptions-quote":"_gi8vj","box-login":"_38Lo1","block-verification":"_1OzGy","block-login":"_wWIyO","title-login":"_3nuns","title-forgot-password":"_21qb6","btn-close":"_NhW9l","btn-login":"_3IL10","
|
|
2005
|
+
var styles = {"btn-login-google":"_2HqmH","notification-count":"_2sew7","text-introduction":"_3OgWF","btn-trans-border":"_r9cAh","contact":"_NszFe","learn-more":"_MDjzH","title-quote":"_1Swkw","descriptions-quote":"_gi8vj","descriptions-icon":"_3SOdX","box-login":"_38Lo1","block-verification":"_1OzGy","block-login":"_wWIyO","title-login":"_3nuns","title-forgot-password":"_21qb6","btn-close":"_NhW9l","btn-login":"_3IL10","return-to-login":"_Ce3Kg","recover-account":"_2t6d9","link-to-login":"_3bDsd","remember":"_11FZt","term-and-conditions":"_3LXoI","descriptions-forgot-pass":"_PMcjT","content-icon":"_2rZY6","title-icon":"_y9lM2","nav-home":"_1TT1q","box-introduction":"_32V6L","icon":"_20YJX","form-user-name":"_39BJD","checkbox-remember":"_2K9b2","block-reset-password":"_23Sua","block-forgot-pass":"_3CWP6","page-not-login":"_3Wmco","content-quote":"_13Rk0","home-page":"_o6HKW","red-background":"_jOY7o","login":"_F-hjL","img-box":"_2v-L_","img-login":"_3ncTL","img-login-rectangle":"_2kOvJ","c-main":"_39l0X","container-fluid":"_1BMwK","input-file-label":"_1XNpH","delete-avatar-button":"_1z5h9","header-logo":"_Gewcf","box-sidebar":"_2vcmv","sidebar-logo":"_1hXpy","sidebar-nav-links":"_3vb3s","c-active":"_36jSM","sidebar-nav-links-hover":"_DNrus","box-sidebar-header":"_3NEZj","box-logout":"_1wUDG","sidebar-btn-minimized":"_1S7Px","sidebar-logout":"_2P85D","nav-mobile":"_1qjbW","filter-media-file":"_1I62C","div":"_3cLcM","dropdown-menu":"_1krbH","header-avatar":"_RQaHE","dropdown-menu-flag":"_XK8oS","dropdown-content":"_3ys4W","dropdown-change":"_ToOW_","item-address":"_3sQlR","item-logout":"_3bqSM","title-address":"_1jgSI","img-avatar":"_35Ttz","item-contact":"_1wc7o","logout":"_1_9tV","content-text":"_3S4f2","dropdown-content-language":"_3ajui","dropdown-item-language":"_3Y_y4","dropdown-item-language-active":"_CzNMi","hide-in-mobile":"_1INnO","hide-in-desktop":"_2LIqK","control-input":"_2Zz97","custom-control":"_3-yp5"};
|
|
1999
2006
|
|
|
2000
2007
|
var style = {
|
|
2001
2008
|
fontSize: "0.85rem"
|
|
@@ -2157,7 +2164,7 @@ var STAR_OPTIONS = [{
|
|
|
2157
2164
|
value: 5
|
|
2158
2165
|
}];
|
|
2159
2166
|
var ANSWER_EDITOR_HEIGHT = 150;
|
|
2160
|
-
var USER_ROLES = ["Admin", "Assistant", "Teacher", "General ED teacher", "Student", "Parent"];
|
|
2167
|
+
var USER_ROLES = ["Admin", "Assistant", "Teacher", "General ED teacher", "Counselor", "Student", "Parent"];
|
|
2161
2168
|
var CHAT_CHANNEL = "chat-channel";
|
|
2162
2169
|
var NOTIFICATION_CHANNEL = "NOTIFICATION_CHANNEL";
|
|
2163
2170
|
var NEW_NOTIFICATION = "NEW_NOTIFICATION";
|
|
@@ -2173,7 +2180,8 @@ var ROLES = {
|
|
|
2173
2180
|
ASSISTANT: "Assistant",
|
|
2174
2181
|
EDUTEACHER: "General ED teacher",
|
|
2175
2182
|
STUDENT: "Student",
|
|
2176
|
-
PARENT: "Parent"
|
|
2183
|
+
PARENT: "Parent",
|
|
2184
|
+
COUNSELOR: "Counselor"
|
|
2177
2185
|
};
|
|
2178
2186
|
|
|
2179
2187
|
var getAccessToken = (function () {
|
|
@@ -2415,7 +2423,7 @@ var useLogin = function useLogin() {
|
|
|
2415
2423
|
history.push(HOMEPAGE_DISTRICT);
|
|
2416
2424
|
} else if (roles.includes("Admin")) {
|
|
2417
2425
|
history.push(HOMEPAGE_ADMIN);
|
|
2418
|
-
} else if (roles.includes("Teacher") || roles.includes("Assistant")) {
|
|
2426
|
+
} else if (roles.includes("Teacher") || roles.includes("Assistant") || roles.includes("Counselor")) {
|
|
2419
2427
|
history.push(HOMEPAGE_TEACHER);
|
|
2420
2428
|
} else if (roles.includes("Student")) {
|
|
2421
2429
|
history.push(HOMEPAGE_STUDENT);
|
|
@@ -3377,45 +3385,55 @@ var Login = function Login(props) {
|
|
|
3377
3385
|
}), isForgotPassword && React.createElement(BlockForgetPassword, null)), isResetPassword && React.createElement(BlockResetPassword, null))));
|
|
3378
3386
|
};
|
|
3379
3387
|
|
|
3380
|
-
var QuoteContent = function QuoteContent() {
|
|
3388
|
+
var QuoteContent = function QuoteContent(_ref) {
|
|
3389
|
+
var descriptions = _ref.descriptions;
|
|
3381
3390
|
return React.createElement("div", {
|
|
3382
3391
|
className: "" + styles["content-quote"]
|
|
3383
|
-
}, React.createElement(
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3392
|
+
}, React.createElement(Row, null, React.createElement(Col, {
|
|
3393
|
+
md: 5,
|
|
3394
|
+
className: "" + styles["title-quote"]
|
|
3395
|
+
}, React.createElement("p", null, "Powerful"), React.createElement("p", null, "Personalized"), React.createElement("p", null, "Learning")), React.createElement(Col, {
|
|
3396
|
+
md: 7,
|
|
3397
|
+
className: styles["descriptions-quote"] + " d-flex align-items-center"
|
|
3398
|
+
}, React.createElement("p", null, descriptions))));
|
|
3388
3399
|
};
|
|
3389
3400
|
|
|
3390
3401
|
var IconContent = function IconContent(_ref) {
|
|
3391
3402
|
var srcIcon = _ref.srcIcon,
|
|
3392
3403
|
content = _ref.content;
|
|
3393
|
-
return React.createElement(
|
|
3394
|
-
key: content,
|
|
3404
|
+
return React.createElement(Row, {
|
|
3395
3405
|
className: "" + styles["content-icon"]
|
|
3396
|
-
}, React.createElement(
|
|
3406
|
+
}, React.createElement(Col, {
|
|
3407
|
+
md: 4,
|
|
3397
3408
|
className: "" + styles["title-icon"]
|
|
3398
3409
|
}, React.createElement("img", {
|
|
3399
3410
|
src: srcIcon,
|
|
3400
3411
|
alt: "icon"
|
|
3401
|
-
})), React.createElement(
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
}
|
|
3406
|
-
}));
|
|
3412
|
+
})), React.createElement(Col, {
|
|
3413
|
+
md: 8,
|
|
3414
|
+
className: styles["descriptions-icon"] + " d-flex align-items-center"
|
|
3415
|
+
}, React.createElement("p", null, content)));
|
|
3407
3416
|
};
|
|
3408
3417
|
|
|
3409
|
-
var
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3418
|
+
var data = {
|
|
3419
|
+
quote: {
|
|
3420
|
+
title: "Powerful Personalized Learning",
|
|
3421
|
+
description: "Focus on what matters most to you and make learning meaningful."
|
|
3422
|
+
},
|
|
3423
|
+
contents: [{
|
|
3424
|
+
scrIcon: "/images/177_2_Finance.svg",
|
|
3425
|
+
content: "Understand yourself better through helpful feedback."
|
|
3426
|
+
}, {
|
|
3427
|
+
scrIcon: "/images/177_9_Brain.svg",
|
|
3428
|
+
content: "Create, explore, and share exciting personalized learning journeys."
|
|
3429
|
+
}, {
|
|
3430
|
+
scrIcon: "/images/177_6_Goal.svg",
|
|
3431
|
+
content: "Set, monitor, and achieve your goals."
|
|
3432
|
+
}, {
|
|
3433
|
+
scrIcon: "/images/177_8_Space.svg",
|
|
3434
|
+
content: "Empower parents to become part of the learning process."
|
|
3435
|
+
}]
|
|
3436
|
+
};
|
|
3419
3437
|
|
|
3420
3438
|
var ContentHomePage = function ContentHomePage(_ref) {
|
|
3421
3439
|
_objectDestructuringEmpty(_ref);
|
|
@@ -3424,15 +3442,26 @@ var ContentHomePage = function ContentHomePage(_ref) {
|
|
|
3424
3442
|
className: "" + styles["page-not-login"]
|
|
3425
3443
|
}, React.createElement(Col, {
|
|
3426
3444
|
md: 12
|
|
3427
|
-
}, React.createElement(QuoteContent,
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3445
|
+
}, React.createElement(QuoteContent, {
|
|
3446
|
+
descriptions: data.quote.description
|
|
3447
|
+
})), data.contents.map(function (content, index) {
|
|
3448
|
+
return React.createElement(Col, {
|
|
3449
|
+
md: 6,
|
|
3450
|
+
key: index
|
|
3451
|
+
}, React.createElement(IconContent, {
|
|
3432
3452
|
srcIcon: content.scrIcon,
|
|
3433
3453
|
content: content.content
|
|
3434
|
-
});
|
|
3435
|
-
})
|
|
3454
|
+
}));
|
|
3455
|
+
}), React.createElement(Col, {
|
|
3456
|
+
md: 12,
|
|
3457
|
+
className: styles["student-image"] + " d-flex justify-content-end mt-5"
|
|
3458
|
+
}, React.createElement("a", {
|
|
3459
|
+
href: "https://cert.privo.com/#/companies/marioFrameworkLlc",
|
|
3460
|
+
target: "blank"
|
|
3461
|
+
}, React.createElement(IconContent, {
|
|
3462
|
+
srcIcon: "/images/STUDENT.png",
|
|
3463
|
+
content: ""
|
|
3464
|
+
}))));
|
|
3436
3465
|
};
|
|
3437
3466
|
|
|
3438
3467
|
var HOME_ADMIN = "/admin/user";
|
|
@@ -3442,74 +3471,39 @@ var DASHBOARD_TITLE = "Dashboard";
|
|
|
3442
3471
|
var ROOT_TITLE = "Mario Framework";
|
|
3443
3472
|
|
|
3444
3473
|
var Dashboard = function Dashboard() {
|
|
3445
|
-
var _useState = useState(false),
|
|
3446
|
-
isOpen = _useState[0],
|
|
3447
|
-
setIsOpen = _useState[1];
|
|
3448
|
-
|
|
3449
3474
|
var user = useSelector(function (state) {
|
|
3450
3475
|
return state.common.user;
|
|
3451
3476
|
});
|
|
3452
|
-
|
|
3453
|
-
var toggle = function toggle() {
|
|
3454
|
-
return setIsOpen(!isOpen);
|
|
3455
|
-
};
|
|
3456
|
-
|
|
3457
3477
|
useEffect(function () {
|
|
3458
3478
|
!!user ? document.title = DASHBOARD_TITLE : document.title = ROOT_TITLE;
|
|
3459
3479
|
}, [user]);
|
|
3460
3480
|
return React.createElement("div", {
|
|
3461
3481
|
className: styles["login"] + " " + styles["red-background"]
|
|
3462
|
-
}, React.createElement(
|
|
3463
|
-
className: "" +
|
|
3464
|
-
}, React.createElement(
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
}, React.createElement(NavbarBrand, {
|
|
3468
|
-
href: "/",
|
|
3469
|
-
className: "" + styles["logo-home"]
|
|
3470
|
-
}, React.createElement("img", {
|
|
3471
|
-
src: "/images/logo-v2.svg",
|
|
3472
|
-
alt: "mario"
|
|
3473
|
-
})), React.createElement(GiHamburgerMenu, {
|
|
3474
|
-
onClick: toggle,
|
|
3475
|
-
className: styles["hide-in-desktop"] + " " + styles["hamburger-menu"]
|
|
3476
|
-
}), React.createElement(Collapse, {
|
|
3477
|
-
isOpen: isOpen,
|
|
3478
|
-
navbar: true,
|
|
3479
|
-
className: "" + styles["collapse-box"]
|
|
3480
|
-
}, React.createElement(Nav, {
|
|
3481
|
-
className: styles["nav-home"] + " d-md-flex w-100 justify-content-center mr-auto",
|
|
3482
|
-
navbar: true
|
|
3483
|
-
}, React.createElement(NavItem, null, React.createElement(NavLink, {
|
|
3484
|
-
className: styles["learn-more"] + " align-self-md-center",
|
|
3485
|
-
href: "https://marioframework.com/software",
|
|
3482
|
+
}, React.createElement(Row, null, React.createElement(Col, {
|
|
3483
|
+
className: styles["nav-home"] + " d-flex w-100"
|
|
3484
|
+
}, React.createElement("a", {
|
|
3485
|
+
className: styles["learn-more"] + " align-self-lg-center",
|
|
3486
|
+
href: "/privacy-policy",
|
|
3486
3487
|
target: "blank"
|
|
3487
|
-
}, "
|
|
3488
|
-
className: styles["contact"] + " align-self-
|
|
3488
|
+
}, "Privacy Policy"), React.createElement(Link, {
|
|
3489
|
+
className: styles["contact"] + " align-self-lg-center",
|
|
3489
3490
|
to: "/contact"
|
|
3490
|
-
}, "Contact")
|
|
3491
|
-
className: styles["learn-more"] + " align-self-
|
|
3492
|
-
href: "/
|
|
3491
|
+
}, "Contact"), React.createElement("a", {
|
|
3492
|
+
className: styles["learn-more"] + " align-self-lg-center",
|
|
3493
|
+
href: "https://marioframework.com/software",
|
|
3493
3494
|
target: "blank"
|
|
3494
|
-
}, "
|
|
3495
|
-
className: styles["hide-in-mobile"] + " d-flex justify-content-end"
|
|
3496
|
-
}, user ? React.createElement(Link, {
|
|
3495
|
+
}, "Learn More"), user ? React.createElement(Link, {
|
|
3497
3496
|
to: user.roles.includes("Admin") ? HOME_ADMIN : user.roles.includes("Teacher") ? HOME_TEACHER : HOME_STUDENT,
|
|
3498
3497
|
className: "" + styles["btn-trans-border"]
|
|
3499
3498
|
}, "Dashboard") : React.createElement(Link, {
|
|
3500
3499
|
to: "/login",
|
|
3501
3500
|
className: "" + styles["btn-trans-border"]
|
|
3502
|
-
}, "Login")))
|
|
3503
|
-
className: ""
|
|
3504
|
-
}, React.createElement(
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
target: "blank"
|
|
3509
|
-
}, React.createElement("img", {
|
|
3510
|
-
src: "/images/STUDENT.png",
|
|
3511
|
-
alt: "icon"
|
|
3512
|
-
})))));
|
|
3501
|
+
}, "Login"))), React.createElement(Row, {
|
|
3502
|
+
className: styles["hide-in-mobile"] + " " + styles["hide-in-tablet"]
|
|
3503
|
+
}, React.createElement(Col, {
|
|
3504
|
+
md: 6,
|
|
3505
|
+
className: "offset-6 d-flex justify-content-center"
|
|
3506
|
+
}, React.createElement(ContentHomePage, null))));
|
|
3513
3507
|
};
|
|
3514
3508
|
|
|
3515
3509
|
var Images = {
|
|
@@ -7090,13 +7084,13 @@ var UserDetail = function UserDetail() {
|
|
|
7090
7084
|
return;
|
|
7091
7085
|
}
|
|
7092
7086
|
|
|
7093
|
-
if ([ROLES.ADMIN, ROLES.STUDENT, ROLES.PARENT, ROLES.EDUTEACHER].includes(role)) {
|
|
7087
|
+
if ([ROLES.ADMIN, ROLES.STUDENT, ROLES.PARENT, ROLES.EDUTEACHER, ROLES.COUNSELOR].includes(role)) {
|
|
7094
7088
|
setFieldValue("roles", [role]);
|
|
7095
7089
|
return;
|
|
7096
7090
|
}
|
|
7097
7091
|
|
|
7098
7092
|
var teacherAssistantRoles = values.roles.filter(function (item) {
|
|
7099
|
-
return ![ROLES.STUDENT, ROLES.ADMIN, ROLES.PARENT, ROLES.EDUTEACHER].includes(item);
|
|
7093
|
+
return ![ROLES.STUDENT, ROLES.ADMIN, ROLES.PARENT, ROLES.EDUTEACHER, ROLES.COUNSELOR].includes(item);
|
|
7100
7094
|
});
|
|
7101
7095
|
setFieldValue("roles", [].concat(teacherAssistantRoles, [role]));
|
|
7102
7096
|
}, [values.roles]);
|