mario-core 3.0.8-admin → 3.0.8-es
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/Dashboard-DiUm-pc-.js +186 -0
- package/dist/Dashboard-HV1eiElu.cjs +1 -0
- package/dist/EmailTemplateDetail-D0D3bpWO.cjs +1 -0
- package/dist/EmailTemplateDetail-KvZuTCLF.js +411 -0
- package/dist/EmailTemplateList-B3YqSFaY.js +172 -0
- package/dist/EmailTemplateList-BAejgUUG.cjs +1 -0
- package/dist/FaqList-D5XugT5h.js +320 -0
- package/dist/FaqList-DpUzQ2vq.cjs +1 -0
- package/dist/GalleryList-B5QA3Rol.cjs +1 -0
- package/dist/GalleryList-CTo33BcT.js +53 -0
- package/dist/Login-CHAmP5ek.js +897 -0
- package/dist/Login-Cxbto5eM.cjs +1 -0
- package/dist/NotificationList-2Mf_NsOP.js +3631 -0
- package/dist/NotificationList-D1jMOBwH.cjs +8 -0
- package/dist/SchoolList-CClJ_UPT.cjs +1 -0
- package/dist/SchoolList-JmrmL2zE.js +5 -0
- package/dist/SkillList-BMyhRY78.js +406 -0
- package/dist/SkillList-DlMx_Evw.cjs +1 -0
- package/dist/TeacherSelector-B4zvSVhk.js +71 -0
- package/dist/TeacherSelector-DORi8RIb.cjs +1 -0
- package/dist/TheContent-BHmlooLu.cjs +1 -0
- package/dist/TheContent-V2T-Pqz8.js +38 -0
- package/dist/UserContainer-B-4oVOEp.cjs +1 -0
- package/dist/UserContainer-BaHMryYI.js +2337 -0
- package/dist/UserDetail-B-Mq_itT.cjs +1 -0
- package/dist/UserDetail-BBRiU97G.js +665 -0
- package/dist/assets/Images.d.ts +14 -14
- package/dist/components/Alerts/CommonAlert.d.ts +3 -3
- package/dist/components/Alerts/EmptyDataAlert.d.ts +8 -8
- package/dist/components/Alerts/ErrorHandler.d.ts +6 -6
- package/dist/components/Buttons/AddButton.d.ts +8 -7
- package/dist/components/Buttons/AddButtonIcon.d.ts +6 -6
- package/dist/components/Buttons/CloseButton.d.ts +8 -8
- package/dist/components/Buttons/DeleteButtonIcon.d.ts +6 -6
- package/dist/components/Buttons/DetailActionButtons.d.ts +9 -8
- package/dist/components/Buttons/EditButtonIcon.d.ts +6 -6
- package/dist/components/Buttons/LinkEditButton.d.ts +8 -7
- package/dist/components/Buttons/LoginNavButton.d.ts +8 -8
- package/dist/components/Buttons/ToggleButton.d.ts +10 -10
- package/dist/components/Buttons/UploadFileButton.d.ts +13 -13
- package/dist/components/Headers/CommonHeader.d.ts +7 -7
- package/dist/components/Image/UploadImage.d.ts +2 -3
- package/dist/components/Inputs/FileInput.d.ts +8 -8
- package/dist/components/Inputs/PasswordInput.d.ts +8 -8
- package/dist/components/Inputs/SearchBox.d.ts +10 -10
- package/dist/components/Inputs/SearchBoxContainer.d.ts +9 -10
- package/dist/components/Labels/RequiredLabel.d.ts +6 -6
- package/dist/components/Loading/Loading.d.ts +3 -3
- package/dist/components/Modals/CommonModal.d.ts +2 -3
- package/dist/components/Modals/NotificationLogoutModal.d.ts +2 -0
- package/dist/components/Modals/NotificationModal.d.ts +2 -3
- package/dist/components/Others/QuitPrompt.d.ts +5 -2
- package/dist/components/Pagination/CustomPagination.d.ts +2 -3
- package/dist/components/Scroll/ScrollToTop.d.ts +3 -3
- package/dist/components/Selectors/AcademicClassSelector.d.ts +2 -3
- package/dist/components/Selectors/CreatableSelector.d.ts +2 -3
- package/dist/components/Selectors/CustomSelector.d.ts +2 -3
- package/dist/components/Selectors/MailCategorySelectors.d.ts +2 -3
- package/dist/components/Selectors/QuestionCategorySelector.d.ts +2 -3
- package/dist/components/Selectors/QuestionTypeSelector.d.ts +2 -3
- package/dist/components/Selectors/StarRatingSelector.d.ts +2 -3
- package/dist/components/Selectors/SuggestionCategorySelector.d.ts +2 -3
- package/dist/components/Tabs/CustomTab.d.ts +2 -3
- package/dist/components/Tabs/TabsWithComponent.d.ts +10 -0
- package/dist/configs/editorConfig.d.ts +7 -7
- package/dist/containers/Commons/NotFound.d.ts +3 -3
- package/dist/containers/DistrictSchools/views/SchoolList.d.ts +3 -3
- package/dist/containers/EmailTemplate/components/AttachmentFile.d.ts +8 -7
- package/dist/containers/EmailTemplate/components/MailParam.d.ts +8 -7
- package/dist/containers/EmailTemplate/configs/emailTemplateSchema.d.ts +13 -13
- package/dist/containers/EmailTemplate/hooks/useEmailTemplateDetail.d.ts +27 -28
- package/dist/containers/EmailTemplate/hooks/useEmailTemplateList.d.ts +11 -11
- package/dist/containers/EmailTemplate/views/EmailTemplateDetail.d.ts +3 -3
- package/dist/containers/EmailTemplate/views/EmailTemplateList.d.ts +3 -3
- package/dist/containers/Faq/components/FaqDetailModal.d.ts +2 -3
- package/dist/containers/Faq/hooks/useFaqDetail.d.ts +17 -18
- package/dist/containers/Faq/hooks/useFaqList.d.ts +9 -9
- package/dist/containers/Faq/views/FaqList.d.ts +3 -3
- package/dist/containers/Gallery/components/ActionModal.d.ts +2 -3
- package/dist/containers/Gallery/components/Filter.d.ts +9 -8
- package/dist/containers/Gallery/components/Media.d.ts +9 -8
- package/dist/containers/Gallery/components/MediaDetail.d.ts +7 -7
- package/dist/containers/Gallery/components/MediaList.d.ts +7 -7
- package/dist/containers/Gallery/components/MediaNav.d.ts +19 -18
- package/dist/containers/Gallery/constants/gallery.types.d.ts +21 -21
- package/dist/containers/Gallery/extensions/helpers.d.ts +4 -4
- package/dist/containers/Gallery/hooks/useGalleryList.d.ts +30 -31
- package/dist/containers/Gallery/views/GalleryList.d.ts +6 -6
- package/dist/containers/Login/components/GoogleLoginButton.d.ts +10 -0
- package/dist/containers/Login/constant/authConfig.d.ts +38 -0
- package/dist/containers/Login/constant/types.d.ts +27 -0
- package/dist/containers/Login/hooks/useForgotPassword.d.ts +20 -21
- package/dist/containers/Login/hooks/useLogin.d.ts +26 -23
- package/dist/containers/Login/hooks/useLoginTwoFactor.d.ts +4 -4
- package/dist/containers/Login/views/Dashboard.d.ts +3 -3
- package/dist/containers/Login/views/Login.d.ts +8 -9
- package/dist/containers/Login/views/block/BlockBackground.d.ts +7 -0
- package/dist/containers/Login/views/block/BlockForgetPassword.d.ts +6 -3
- package/dist/containers/Login/views/block/BlockLogin.d.ts +9 -7
- package/dist/containers/Login/views/block/BlockResetPassword.d.ts +2 -3
- package/dist/containers/Login/views/block/BlockSelectTeacher.d.ts +11 -12
- package/dist/containers/Login/views/block/BlockTwoFactorLogin.d.ts +2 -3
- package/dist/containers/Login/views/block/CloseBlock.d.ts +6 -6
- package/dist/containers/Login/views/block/ContentHomePage.d.ts +5 -5
- package/dist/containers/Login/views/block/IconContent.d.ts +7 -7
- package/dist/containers/Login/views/block/QuoteContent.d.ts +2 -3
- package/dist/containers/Notifications/components/NotificationButton.d.ts +5 -5
- package/dist/containers/Notifications/components/NotificationStatusSelector.d.ts +6 -7
- package/dist/containers/Notifications/hooks/useNotificationList.d.ts +17 -17
- package/dist/containers/Notifications/hooks/useUnreadNotification.d.ts +4 -4
- package/dist/containers/Notifications/views/NotificationList.d.ts +2 -3
- package/dist/containers/Skill/components/SkillDetailModal.d.ts +2 -3
- package/dist/containers/Skill/components/SkillSelector.d.ts +2 -3
- package/dist/containers/Skill/hooks/useSkillDetail.d.ts +19 -20
- package/dist/containers/Skill/hooks/useSkillList.d.ts +10 -9
- package/dist/containers/Skill/views/SkillList.d.ts +3 -3
- package/dist/containers/User/components/AssignStudentModal.d.ts +19 -0
- package/dist/containers/User/components/DeleteBulkModel.d.ts +3 -0
- package/dist/containers/User/components/FilterPopover.d.ts +21 -0
- package/dist/containers/User/components/HeaderCell.d.ts +19 -0
- package/dist/containers/User/components/RemoveAssistant.d.ts +3 -0
- package/dist/containers/User/components/RemoveCounselor.d.ts +3 -0
- package/dist/containers/User/components/RemoveTeacher.d.ts +3 -0
- package/dist/containers/User/components/TableHeader.d.ts +14 -0
- package/dist/containers/User/components/TeacherSelector.d.ts +2 -0
- package/dist/containers/User/configs/changePasswordSchema.d.ts +11 -10
- package/dist/containers/User/configs/constants.d.ts +62 -0
- package/dist/containers/User/configs/type.d.ts +210 -0
- package/dist/containers/User/configs/userSchema.d.ts +15 -15
- package/dist/containers/User/hooks/useAssignStudent.d.ts +33 -0
- package/dist/containers/User/hooks/useAssignStudentList.d.ts +33 -0
- package/dist/containers/User/hooks/useAssistantList.d.ts +9 -0
- package/dist/containers/User/hooks/useClickOutside.d.ts +2 -0
- package/dist/containers/User/hooks/useCounselorList.d.ts +9 -0
- package/dist/containers/User/hooks/useFilterPopover.d.ts +36 -0
- package/dist/containers/User/hooks/useTableHeader.d.ts +19 -0
- package/dist/containers/User/hooks/useTeacherList.d.ts +9 -0
- package/dist/containers/User/hooks/useUserDetail.d.ts +31 -24
- package/dist/containers/User/hooks/useUserList.d.ts +14 -11
- package/dist/containers/User/hooks/userFilters.d.ts +7 -0
- package/dist/containers/User/views/AssignStudentList.d.ts +2 -0
- package/dist/containers/User/views/UserContainer.d.ts +2 -0
- package/dist/containers/User/views/UserDetail.d.ts +2 -3
- package/dist/containers/User/views/UserList.d.ts +2 -3
- package/dist/hooks/useClassFontSize.d.ts +4 -0
- package/dist/hooks/useFilters.d.ts +7 -8
- package/dist/i18n.d.ts +2 -2
- package/dist/index-C95SWLrn.js +18163 -0
- package/dist/index-DixwqZ17.cjs +29 -0
- package/dist/index.d.ts +111 -110
- package/dist/index.esm-BckW25l9.cjs +1 -0
- package/dist/index.esm-hqKUWCW0.js +15 -0
- package/dist/index.js +1 -10373
- package/dist/index.modern.js +159 -10213
- package/dist/layouts/TheContent.d.ts +3 -3
- package/dist/mailCategoryService-BqDtPJRc.js +10 -0
- package/dist/mailCategoryService-DBMJOyls.cjs +1 -0
- package/dist/mario-core.css +5 -0
- package/dist/redux/assessments/action.d.ts +1 -1
- package/dist/redux/assessments/reducer.d.ts +10 -5
- package/dist/redux/assignment/action.d.ts +1 -1
- package/dist/redux/assignment/reducer.d.ts +4 -2
- package/dist/redux/assistants/action.d.ts +1 -1
- package/dist/redux/assistants/reducer.d.ts +4 -2
- package/dist/redux/badges/action.d.ts +1 -1
- package/dist/redux/badges/reducer.d.ts +4 -2
- package/dist/redux/bandScores/action.d.ts +1 -1
- package/dist/redux/bandScores/reducer.d.ts +4 -2
- package/dist/redux/certificate/action.d.ts +1 -1
- package/dist/redux/certificate/reducer.d.ts +4 -2
- package/dist/redux/classes/action.d.ts +1 -1
- package/dist/redux/classes/reducer.d.ts +4 -2
- package/dist/redux/commons/action.d.ts +18 -18
- package/dist/redux/commons/reducer.d.ts +4 -2
- package/dist/redux/conferenceRubrics/action.d.ts +1 -1
- package/dist/redux/conferenceRubrics/reducer.d.ts +4 -2
- package/dist/redux/customAlert/action.d.ts +1 -1
- package/dist/redux/customAlert/reducer.d.ts +4 -2
- package/dist/redux/dashboard/action.d.ts +5 -5
- package/dist/redux/dashboard/reducer.d.ts +4 -2
- package/dist/redux/dataPlayer/action.d.ts +2 -2
- package/dist/redux/dataPlayer/reducer.d.ts +4 -2
- package/dist/redux/emailTemplates/action.d.ts +1 -1
- package/dist/redux/emailTemplates/reducer.d.ts +4 -2
- package/dist/redux/faqs/action.d.ts +1 -1
- package/dist/redux/faqs/reducer.d.ts +4 -2
- package/dist/redux/feedback/action.d.ts +1 -1
- package/dist/redux/feedback/reducer.d.ts +4 -2
- package/dist/redux/gallery/action.d.ts +2 -2
- package/dist/redux/gallery/reducer.d.ts +4 -2
- package/dist/redux/goalExamples/action.d.ts +1 -1
- package/dist/redux/goalExamples/reducer.d.ts +4 -2
- package/dist/redux/improveMyClass/action.d.ts +1 -1
- package/dist/redux/improveMyClass/reducer.d.ts +4 -2
- package/dist/redux/learningStrategies/action.d.ts +1 -1
- package/dist/redux/learningStrategies/reducer.d.ts +4 -2
- package/dist/redux/learningSupportCategories/action.d.ts +1 -1
- package/dist/redux/learningSupportCategories/reducer.d.ts +4 -2
- package/dist/redux/mailCategories/action.d.ts +1 -1
- package/dist/redux/mailCategories/reducer.d.ts +4 -2
- package/dist/redux/navMobile/action.d.ts +1 -1
- package/dist/redux/navMobile/reducer.d.ts +4 -2
- package/dist/redux/notifications/action.d.ts +3 -3
- package/dist/redux/notifications/reducer.d.ts +4 -2
- package/dist/redux/questionBanks/action.d.ts +1 -1
- package/dist/redux/questionBanks/reducer.d.ts +4 -2
- package/dist/redux/questionByCategory/action.d.ts +8 -8
- package/dist/redux/questionByCategory/reducer.d.ts +4 -2
- package/dist/redux/questionCategory/action.d.ts +1 -1
- package/dist/redux/questionCategory/reducer.d.ts +4 -2
- package/dist/redux/reflectionForms/action.d.ts +1 -1
- package/dist/redux/reflectionForms/reducer.d.ts +4 -2
- package/dist/redux/reflectionResults/action.d.ts +1 -1
- package/dist/redux/reflectionResults/reducer.d.ts +4 -2
- package/dist/redux/schoolBlankDays/action.d.ts +1 -1
- package/dist/redux/schoolBlankDays/reducer.d.ts +4 -2
- package/dist/redux/semester/action.d.ts +1 -1
- package/dist/redux/semester/reducer.d.ts +4 -2
- package/dist/redux/sessionPlayers/action.d.ts +5 -5
- package/dist/redux/sessionPlayers/reducer.d.ts +4 -2
- package/dist/redux/sessionTemplateGeneralClasses/action.d.ts +1 -1
- package/dist/redux/sessionTemplateGeneralClasses/reducer.d.ts +4 -2
- package/dist/redux/sessionTemplates/action.d.ts +1 -1
- package/dist/redux/sessionTemplates/reducer.d.ts +4 -2
- package/dist/redux/skills/action.d.ts +1 -1
- package/dist/redux/skills/reducer.d.ts +4 -2
- package/dist/redux/subjects/action.d.ts +1 -1
- package/dist/redux/subjects/reducer.d.ts +4 -2
- package/dist/redux/suggestionBanks/action.d.ts +1 -1
- package/dist/redux/suggestionBanks/reducer.d.ts +4 -2
- package/dist/redux/teacher/myStudent/action.d.ts +1 -1
- package/dist/redux/teacher/myStudent/reducer.d.ts +4 -2
- package/dist/redux/tutorialScreen/action.d.ts +1 -1
- package/dist/redux/tutorialScreen/reducer.d.ts +10 -5
- package/dist/redux/users/action.d.ts +2 -2
- package/dist/redux/users/reducer.d.ts +4 -2
- package/dist/redux/widget/action.d.ts +1 -1
- package/dist/redux/widget/reducer.d.ts +4 -2
- package/dist/rootReducer.d.ts +96 -49
- package/dist/services/accountService.d.ts +13 -12
- package/dist/services/api.d.ts +3 -3
- package/dist/services/classService.d.ts +1 -1
- package/dist/services/emailTemplateService.d.ts +6 -6
- package/dist/services/faqService.d.ts +6 -6
- package/dist/services/fileServices.d.ts +13 -13
- package/dist/services/galleryService.d.ts +2 -2
- package/dist/services/languageService.d.ts +1 -0
- package/dist/services/mailCategoryService.d.ts +1 -1
- package/dist/services/notificationService.d.ts +7 -7
- package/dist/services/questionCategoryService.d.ts +1 -1
- package/dist/services/schoolService.d.ts +1 -0
- package/dist/services/skillService.d.ts +6 -6
- package/dist/services/suggestionCategoryService.d.ts +1 -1
- package/dist/services/userService.d.ts +21 -9
- package/dist/store.d.ts +3 -3
- package/dist/types/Conversation.d.ts +8 -8
- package/dist/types/ConversationMember.d.ts +5 -5
- package/dist/types/Dashboard.d.ts +5 -5
- package/dist/types/Filter.d.ts +10 -10
- package/dist/types/Language.d.ts +8 -0
- package/dist/types/Message.d.ts +13 -13
- package/dist/types/Notification.d.ts +8 -8
- package/dist/utils/canAccessRoute.d.ts +2 -2
- package/dist/utils/constants.d.ts +77 -67
- package/dist/utils/debounce.d.ts +2 -2
- package/dist/utils/domHelpers.d.ts +2 -2
- package/dist/utils/encodeParams.d.ts +2 -2
- package/dist/utils/firstCheckToken.d.ts +2 -2
- package/dist/utils/generateRandomString.d.ts +2 -2
- package/dist/utils/getAccessToken.d.ts +2 -2
- package/dist/utils/getCookieValue.d.ts +2 -0
- package/dist/utils/getFileUrl.d.ts +2 -2
- package/dist/utils/getStaticFileUrl.d.ts +2 -0
- package/dist/utils/getTextFromHTML.d.ts +2 -2
- package/dist/utils/utcToLocalTime.d.ts +2 -2
- package/package.json +68 -77
- package/dist/components/Alerts/ReactNotification.d.ts +0 -4
- package/dist/containers/Login/constant/type.d.ts +0 -5
- package/dist/containers/Login/views/ModelSelectRole.d.ts +0 -4
- package/dist/index.css +0 -658
- package/dist/index.js.map +0 -1
- package/dist/index.modern.js.map +0 -1
- package/dist/index.test.d.ts +0 -1
- package/dist/layouts/TheFooter.d.ts +0 -3
- package/dist/layouts/TheHeader.d.ts +0 -3
- package/dist/layouts/TheHeaderDropdown.d.ts +0 -3
- package/dist/layouts/TheLanguageDropdown.d.ts +0 -3
- package/dist/layouts/TheLayout.d.ts +0 -4
- package/dist/layouts/TheSidebar.d.ts +0 -3
- package/dist/types/Payload.d.ts +0 -15
- package/dist/utils/amplitude.d.ts +0 -1
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
import { jsx as t, jsxs as g } from "react/jsx-runtime";
|
|
2
|
+
import { useState as v, useEffect as L, forwardRef as U, useMemo as O, useCallback as x, useRef as Q } from "react";
|
|
3
|
+
import { Row as M, Col as z, Input as j, Label as A, Table as H } from "reactstrap";
|
|
4
|
+
import { a as I, B as K, S as G, O as J, R as W, h as d, E as X, u as Y, s as $, T as Z, c as C, w as ee, Q as te, y as se, L as ae, z as ne, C as le, F as ie } from "./index-C95SWLrn.js";
|
|
5
|
+
import { Formik as oe } from "formik";
|
|
6
|
+
import * as B from "yup";
|
|
7
|
+
import { useTranslation as P } from "react-i18next";
|
|
8
|
+
import { useSelector as _, useDispatch as V } from "react-redux";
|
|
9
|
+
const w = `${K}/api/Skill`, q = (e) => I.get(w, { params: e }), re = (e) => I.get(`${w}/${e}`), ce = (e) => I.post(w, e), de = (e) => I.put(`${w}/${e.id}`, e), me = (e) => I.delete(`${w}/${e}`), ue = (e) => {
|
|
10
|
+
const [s, i] = v([]);
|
|
11
|
+
L(() => {
|
|
12
|
+
u();
|
|
13
|
+
}, []);
|
|
14
|
+
const u = async () => {
|
|
15
|
+
try {
|
|
16
|
+
const l = await q();
|
|
17
|
+
i(l.data.items);
|
|
18
|
+
} catch (l) {
|
|
19
|
+
console.error(l.message);
|
|
20
|
+
}
|
|
21
|
+
}, { id: f, isDisabled: n, className: k } = e, S = s.map((l) => ({
|
|
22
|
+
id: l.id,
|
|
23
|
+
value: l.id,
|
|
24
|
+
label: l.path ? `${l.path}/${l.name}` : l.name
|
|
25
|
+
}));
|
|
26
|
+
return /* @__PURE__ */ t(
|
|
27
|
+
G,
|
|
28
|
+
{
|
|
29
|
+
options: S,
|
|
30
|
+
defaultValue: f,
|
|
31
|
+
...e,
|
|
32
|
+
isDisabled: n,
|
|
33
|
+
className: k
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
}, he = B.object({
|
|
37
|
+
name: B.string().required("Name is required"),
|
|
38
|
+
description: B.string()
|
|
39
|
+
}), pe = (e, s) => {
|
|
40
|
+
const { t: i } = P(), {
|
|
41
|
+
header: u,
|
|
42
|
+
confirmText: f,
|
|
43
|
+
onConfirm: n,
|
|
44
|
+
skillDetail: k,
|
|
45
|
+
onCancel: S,
|
|
46
|
+
edited: l,
|
|
47
|
+
setEdited: o,
|
|
48
|
+
setEditedTrue: c,
|
|
49
|
+
setEditedFalse: p,
|
|
50
|
+
isDisabled: m,
|
|
51
|
+
classFontSize: h
|
|
52
|
+
} = e;
|
|
53
|
+
return /* @__PURE__ */ t(
|
|
54
|
+
oe,
|
|
55
|
+
{
|
|
56
|
+
initialValues: k,
|
|
57
|
+
enableReinitialize: !0,
|
|
58
|
+
validationSchema: he,
|
|
59
|
+
onSubmit: (r, y) => {
|
|
60
|
+
n(r), y.resetForm();
|
|
61
|
+
},
|
|
62
|
+
children: (r) => {
|
|
63
|
+
const {
|
|
64
|
+
values: y,
|
|
65
|
+
touched: N,
|
|
66
|
+
errors: D,
|
|
67
|
+
handleChange: b,
|
|
68
|
+
handleBlur: E,
|
|
69
|
+
handleSubmit: R,
|
|
70
|
+
resetForm: T
|
|
71
|
+
} = r;
|
|
72
|
+
return /* @__PURE__ */ t(
|
|
73
|
+
J,
|
|
74
|
+
{
|
|
75
|
+
header: u,
|
|
76
|
+
confirmText: f,
|
|
77
|
+
onConfirm: R,
|
|
78
|
+
ref: s,
|
|
79
|
+
onCancel: () => {
|
|
80
|
+
S(), T();
|
|
81
|
+
},
|
|
82
|
+
edited: l,
|
|
83
|
+
setEdited: o,
|
|
84
|
+
setEditedFalse: p,
|
|
85
|
+
className: h,
|
|
86
|
+
children: /* @__PURE__ */ g(M, { children: [
|
|
87
|
+
/* @__PURE__ */ g(z, { md: 12, className: "mb-2", children: [
|
|
88
|
+
/* @__PURE__ */ t(W, { className: `${d["custom-font-size"]}`, text: i("name") }),
|
|
89
|
+
/* @__PURE__ */ t(
|
|
90
|
+
j,
|
|
91
|
+
{
|
|
92
|
+
name: "name",
|
|
93
|
+
placeholder: i("name"),
|
|
94
|
+
value: y.name,
|
|
95
|
+
onChange: (a) => {
|
|
96
|
+
b(a), c();
|
|
97
|
+
},
|
|
98
|
+
onBlur: E("name"),
|
|
99
|
+
className: ` ${d["custom-font-size"]}`
|
|
100
|
+
}
|
|
101
|
+
),
|
|
102
|
+
N.name && D.name && /* @__PURE__ */ t(
|
|
103
|
+
X,
|
|
104
|
+
{
|
|
105
|
+
text: D.name
|
|
106
|
+
}
|
|
107
|
+
)
|
|
108
|
+
] }),
|
|
109
|
+
/* @__PURE__ */ g(z, { md: 12, className: "mb-2", children: [
|
|
110
|
+
/* @__PURE__ */ t(A, { className: ` ${d["custom-font-size"]}`, children: i("description") }),
|
|
111
|
+
/* @__PURE__ */ t(
|
|
112
|
+
j,
|
|
113
|
+
{
|
|
114
|
+
type: "textarea",
|
|
115
|
+
rows: 5,
|
|
116
|
+
name: "description",
|
|
117
|
+
placeholder: i("description"),
|
|
118
|
+
value: y.description,
|
|
119
|
+
onChange: (a) => {
|
|
120
|
+
b(a), c();
|
|
121
|
+
},
|
|
122
|
+
onBlur: E("description"),
|
|
123
|
+
className: ` ${d["custom-font-size"]}`
|
|
124
|
+
}
|
|
125
|
+
)
|
|
126
|
+
] }),
|
|
127
|
+
/* @__PURE__ */ g(z, { md: 12, className: "mb-2", children: [
|
|
128
|
+
/* @__PURE__ */ t(A, { className: ` ${d["custom-font-size"]}`, children: i("parent_category") }),
|
|
129
|
+
/* @__PURE__ */ t(
|
|
130
|
+
ue,
|
|
131
|
+
{
|
|
132
|
+
isDisabled: m,
|
|
133
|
+
onChange: (a) => {
|
|
134
|
+
r.setFieldValue(
|
|
135
|
+
"parentSkillId",
|
|
136
|
+
a.value
|
|
137
|
+
), c();
|
|
138
|
+
},
|
|
139
|
+
id: y.parentSkillId,
|
|
140
|
+
className: ` ${d["custom-font-size"]}`
|
|
141
|
+
}
|
|
142
|
+
)
|
|
143
|
+
] })
|
|
144
|
+
] })
|
|
145
|
+
}
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
);
|
|
150
|
+
}, fe = U(pe), ge = 12, ke = 20, Se = "Skill list", ye = () => {
|
|
151
|
+
const e = _((o) => o.skills.skillList), s = _((o) => o.skills.totalItems), i = _((o) => {
|
|
152
|
+
var c;
|
|
153
|
+
return (c = o.common) == null ? void 0 : c.defaultFontSize;
|
|
154
|
+
}), { filters: u, changeFilters: f } = Y(), n = V(), k = O(() => i == ke ? "font-large" : i == ge ? "font-small" : "", [i]), S = x(async () => {
|
|
155
|
+
var o, c;
|
|
156
|
+
n($(!0));
|
|
157
|
+
try {
|
|
158
|
+
const p = await q(u), { items: m, totalItems: h } = p.data;
|
|
159
|
+
n(Z({ skillList: m, totalItems: h }));
|
|
160
|
+
} catch (p) {
|
|
161
|
+
n(
|
|
162
|
+
C({
|
|
163
|
+
type: "danger",
|
|
164
|
+
message: ((c = (o = p.response) == null ? void 0 : o.data) == null ? void 0 : c.title) || p.message
|
|
165
|
+
})
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
n($(!1));
|
|
169
|
+
}, [n, u]), l = x(
|
|
170
|
+
(o) => {
|
|
171
|
+
var c, p;
|
|
172
|
+
n($(!0));
|
|
173
|
+
try {
|
|
174
|
+
n(
|
|
175
|
+
ee({
|
|
176
|
+
isOpen: !0,
|
|
177
|
+
type: "warning",
|
|
178
|
+
message: "Do you want to remove this skill?",
|
|
179
|
+
onConfirm: async () => {
|
|
180
|
+
var m, h;
|
|
181
|
+
try {
|
|
182
|
+
await me(o), n(
|
|
183
|
+
C({
|
|
184
|
+
type: "success",
|
|
185
|
+
message: "Remove skill successfully"
|
|
186
|
+
})
|
|
187
|
+
), f({ currentPage: 1 });
|
|
188
|
+
} catch (r) {
|
|
189
|
+
n(
|
|
190
|
+
C({
|
|
191
|
+
type: "danger",
|
|
192
|
+
message: ((h = (m = r.response) == null ? void 0 : m.data) == null ? void 0 : h.title) || r.message || "Error occured"
|
|
193
|
+
})
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
})
|
|
198
|
+
);
|
|
199
|
+
} catch (m) {
|
|
200
|
+
n(
|
|
201
|
+
C({
|
|
202
|
+
type: "danger",
|
|
203
|
+
message: ((p = (c = m.response) == null ? void 0 : c.data) == null ? void 0 : p.title) || m.message || "Error occured"
|
|
204
|
+
})
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
n($(!1));
|
|
208
|
+
},
|
|
209
|
+
[u]
|
|
210
|
+
);
|
|
211
|
+
return L(() => {
|
|
212
|
+
document.title = Se;
|
|
213
|
+
}, []), L(() => {
|
|
214
|
+
S();
|
|
215
|
+
}, [u]), {
|
|
216
|
+
skillList: e,
|
|
217
|
+
totalItems: s,
|
|
218
|
+
filters: u,
|
|
219
|
+
changeFilters: f,
|
|
220
|
+
getData: S,
|
|
221
|
+
removeData: l,
|
|
222
|
+
classFontSize: k
|
|
223
|
+
};
|
|
224
|
+
}, F = {
|
|
225
|
+
name: "",
|
|
226
|
+
description: "",
|
|
227
|
+
path: "",
|
|
228
|
+
parentSkillId: null
|
|
229
|
+
}, $e = () => {
|
|
230
|
+
const e = V(), [s, i] = v(0), [u, f] = v(F), [n, k] = v(!1), S = async () => {
|
|
231
|
+
localStorage.setItem(window.location.href, "true"), k(!0);
|
|
232
|
+
}, l = async () => {
|
|
233
|
+
localStorage.getItem(window.location.href) && localStorage.removeItem(window.location.href), k(!1);
|
|
234
|
+
};
|
|
235
|
+
L(() => {
|
|
236
|
+
s ? c() : f(F);
|
|
237
|
+
}, [s]);
|
|
238
|
+
const o = () => {
|
|
239
|
+
i(0), f(F);
|
|
240
|
+
};
|
|
241
|
+
L(() => {
|
|
242
|
+
l();
|
|
243
|
+
}, []);
|
|
244
|
+
const c = x(async () => {
|
|
245
|
+
var m, h;
|
|
246
|
+
e($(!0));
|
|
247
|
+
try {
|
|
248
|
+
const r = await re(s);
|
|
249
|
+
f(r.data);
|
|
250
|
+
} catch (r) {
|
|
251
|
+
e(
|
|
252
|
+
C({
|
|
253
|
+
type: "danger",
|
|
254
|
+
message: ((h = (m = r.response) == null ? void 0 : m.data) == null ? void 0 : h.title) || r.message
|
|
255
|
+
})
|
|
256
|
+
);
|
|
257
|
+
}
|
|
258
|
+
e($(!1));
|
|
259
|
+
}, [s]), p = x(
|
|
260
|
+
async (m, h) => {
|
|
261
|
+
var r, y;
|
|
262
|
+
e($(!0));
|
|
263
|
+
try {
|
|
264
|
+
await (s ? de : ce)(m), e(
|
|
265
|
+
C({
|
|
266
|
+
type: "success",
|
|
267
|
+
message: `${s ? "Update" : "Create"} skill successfully`
|
|
268
|
+
})
|
|
269
|
+
), h && h(), s && i(0);
|
|
270
|
+
} catch (N) {
|
|
271
|
+
e(
|
|
272
|
+
C({
|
|
273
|
+
type: "danger",
|
|
274
|
+
message: ((y = (r = N.response) == null ? void 0 : r.data) == null ? void 0 : y.title) || N.message
|
|
275
|
+
})
|
|
276
|
+
);
|
|
277
|
+
}
|
|
278
|
+
e($(!1));
|
|
279
|
+
},
|
|
280
|
+
[s, u]
|
|
281
|
+
);
|
|
282
|
+
return {
|
|
283
|
+
id: s,
|
|
284
|
+
setId: i,
|
|
285
|
+
skillDetail: u,
|
|
286
|
+
confirmData: p,
|
|
287
|
+
initValue: F,
|
|
288
|
+
reset: o,
|
|
289
|
+
edited: n,
|
|
290
|
+
setEdited: k,
|
|
291
|
+
setEditedTrue: S,
|
|
292
|
+
setEditedFalse: l
|
|
293
|
+
};
|
|
294
|
+
}, we = () => {
|
|
295
|
+
const e = Q(null), { t: s } = P(), {
|
|
296
|
+
skillList: i,
|
|
297
|
+
totalItems: u,
|
|
298
|
+
filters: f,
|
|
299
|
+
changeFilters: n,
|
|
300
|
+
getData: k,
|
|
301
|
+
removeData: S,
|
|
302
|
+
classFontSize: l
|
|
303
|
+
} = ye(), {
|
|
304
|
+
id: o,
|
|
305
|
+
setId: c,
|
|
306
|
+
skillDetail: p,
|
|
307
|
+
confirmData: m,
|
|
308
|
+
reset: h,
|
|
309
|
+
edited: r,
|
|
310
|
+
setEdited: y,
|
|
311
|
+
setEditedTrue: N,
|
|
312
|
+
setEditedFalse: D
|
|
313
|
+
} = $e(), b = (a) => {
|
|
314
|
+
c(a || 0), e && e.current && e.current.toggle();
|
|
315
|
+
}, E = (a) => {
|
|
316
|
+
m(a, () => {
|
|
317
|
+
e && e.current && e.current.toggle(), k();
|
|
318
|
+
}), D();
|
|
319
|
+
}, R = (a) => {
|
|
320
|
+
S(a);
|
|
321
|
+
}, T = () => h();
|
|
322
|
+
return /* @__PURE__ */ g("div", { className: `fadeIn animated ${d[l]}`, children: [
|
|
323
|
+
/* @__PURE__ */ t(
|
|
324
|
+
fe,
|
|
325
|
+
{
|
|
326
|
+
ref: e,
|
|
327
|
+
header: s(o ? "edit_skill" : "create_skill"),
|
|
328
|
+
confirmText: s(o ? "update" : "create"),
|
|
329
|
+
onCancel: T,
|
|
330
|
+
onConfirm: E,
|
|
331
|
+
skillDetail: p,
|
|
332
|
+
edited: r,
|
|
333
|
+
setEdited: y,
|
|
334
|
+
setEditedTrue: N,
|
|
335
|
+
setEditedFalse: D,
|
|
336
|
+
isDisabled: o,
|
|
337
|
+
classFontSize: l
|
|
338
|
+
}
|
|
339
|
+
),
|
|
340
|
+
/* @__PURE__ */ t(te, { when: r }),
|
|
341
|
+
/* @__PURE__ */ g(M, { className: "my-2", children: [
|
|
342
|
+
/* @__PURE__ */ t(z, { md: 4, children: /* @__PURE__ */ t(
|
|
343
|
+
se,
|
|
344
|
+
{
|
|
345
|
+
text: s("create_skill"),
|
|
346
|
+
onClick: () => b(),
|
|
347
|
+
className: ` ${d["custom-font-size"]}`
|
|
348
|
+
}
|
|
349
|
+
) }),
|
|
350
|
+
/* @__PURE__ */ g(
|
|
351
|
+
z,
|
|
352
|
+
{
|
|
353
|
+
md: 4,
|
|
354
|
+
className: `d-flex justify-content-end align-items-center ${d["custom-font-size"]}`,
|
|
355
|
+
children: [
|
|
356
|
+
s("total_of_skills"),
|
|
357
|
+
": ",
|
|
358
|
+
u
|
|
359
|
+
]
|
|
360
|
+
}
|
|
361
|
+
)
|
|
362
|
+
] }),
|
|
363
|
+
/* @__PURE__ */ g(M, { className: "mb-2", children: [
|
|
364
|
+
/* @__PURE__ */ t(z, { md: 8, children: i && i.length > 0 ? /* @__PURE__ */ g(H, { bordered: !0, hover: !0, striped: !0, responsive: !0, size: "sm", children: [
|
|
365
|
+
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ g("tr", { children: [
|
|
366
|
+
/* @__PURE__ */ t("th", { className: `align-top ${d["custom-font-size"]}`, children: s("name") }),
|
|
367
|
+
/* @__PURE__ */ t("th", { className: `align-top ${d["custom-font-size"]}`, children: s("description") }),
|
|
368
|
+
/* @__PURE__ */ t("th", { className: `text-center ${d["custom-font-size"]}`, children: s("action") })
|
|
369
|
+
] }) }),
|
|
370
|
+
/* @__PURE__ */ t("tbody", { children: i.map((a) => /* @__PURE__ */ g("tr", { children: [
|
|
371
|
+
/* @__PURE__ */ g("td", { className: `align-middle ${d["custom-font-size"]}`, children: [
|
|
372
|
+
/* @__PURE__ */ t(
|
|
373
|
+
ae,
|
|
374
|
+
{
|
|
375
|
+
label: a.name,
|
|
376
|
+
onClick: () => b(a.id),
|
|
377
|
+
className: `${d["custom-font-size"]}`
|
|
378
|
+
}
|
|
379
|
+
),
|
|
380
|
+
!!a.path && /* @__PURE__ */ t("p", { className: "mb-0 pl-3", children: /* @__PURE__ */ t("i", { children: a.path }) })
|
|
381
|
+
] }),
|
|
382
|
+
/* @__PURE__ */ t("td", { className: `align-middle ${d["custom-font-size"]}`, children: a.description }),
|
|
383
|
+
/* @__PURE__ */ t("td", { className: `text-center align-middle ${d["custom-font-size"]}`, children: /* @__PURE__ */ t(
|
|
384
|
+
ne,
|
|
385
|
+
{
|
|
386
|
+
onClick: () => R(a.id)
|
|
387
|
+
}
|
|
388
|
+
) })
|
|
389
|
+
] }, a.id)) })
|
|
390
|
+
] }) : /* @__PURE__ */ t(le, { label: s("skill") }) }),
|
|
391
|
+
/* @__PURE__ */ t(z, { md: 8, className: "text-right", children: /* @__PURE__ */ t(
|
|
392
|
+
ie,
|
|
393
|
+
{
|
|
394
|
+
totalRecordCount: u,
|
|
395
|
+
filters: f,
|
|
396
|
+
changePageSize: (a) => n({ pageSize: a }),
|
|
397
|
+
changePage: (a) => n({ currentPage: a }),
|
|
398
|
+
className: `${d["custom-font-size"]}`
|
|
399
|
+
}
|
|
400
|
+
) })
|
|
401
|
+
] })
|
|
402
|
+
] });
|
|
403
|
+
};
|
|
404
|
+
export {
|
|
405
|
+
we as default
|
|
406
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),f=require("react"),g=require("reactstrap"),e=require("./index-DixwqZ17.cjs"),F=require("formik"),R=require("yup"),w=require("react-i18next"),N=require("react-redux");function T(s){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const l in s)if(l!=="default"){const c=Object.getOwnPropertyDescriptor(s,l);Object.defineProperty(a,l,c.get?c:{enumerable:!0,get:()=>s[l]})}}return a.default=s,Object.freeze(a)}const I=T(R),$=`${e.BASE_URL}/api/Skill`,v=s=>e.api.get($,{params:s}),q=s=>e.api.get(`${$}/${s}`),_=s=>e.api.post($,s),A=s=>e.api.put(`${$}/${s.id}`,s),B=s=>e.api.delete(`${$}/${s}`),M=s=>{const[a,l]=f.useState([]);f.useEffect(()=>{c()},[]);const c=async()=>{try{const o=await v();l(o.data.items)}catch(o){console.error(o.message)}},{id:x,isDisabled:i,className:y}=s,j=a.map(o=>({id:o.id,value:o.id,label:o.path?`${o.path}/${o.name}`:o.name}));return t.jsx(e.CustomSelector,{options:j,defaultValue:x,...s,isDisabled:i,className:y})},O=I.object({name:I.string().required("Name is required"),description:I.string()}),P=(s,a)=>{const{t:l}=w.useTranslation(),{header:c,confirmText:x,onConfirm:i,skillDetail:y,onCancel:j,edited:o,setEdited:r,setEditedTrue:m,setEditedFalse:p,isDisabled:u,classFontSize:h}=s;return t.jsx(F.Formik,{initialValues:y,enableReinitialize:!0,validationSchema:O,onSubmit:(d,k)=>{i(d),k.resetForm()},children:d=>{const{values:k,touched:S,errors:b,handleChange:C,handleBlur:L,handleSubmit:D,resetForm:E}=d;return t.jsx(e.CommonModal,{header:c,confirmText:x,onConfirm:D,ref:a,onCancel:()=>{j(),E()},edited:o,setEdited:r,setEditedFalse:p,className:h,children:t.jsxs(g.Row,{children:[t.jsxs(g.Col,{md:12,className:"mb-2",children:[t.jsx(e.RequiredLabel,{className:`${e.styles["custom-font-size"]}`,text:l("name")}),t.jsx(g.Input,{name:"name",placeholder:l("name"),value:k.name,onChange:n=>{C(n),m()},onBlur:L("name"),className:` ${e.styles["custom-font-size"]}`}),S.name&&b.name&&t.jsx(e.ErrorHandler,{text:b.name})]}),t.jsxs(g.Col,{md:12,className:"mb-2",children:[t.jsx(g.Label,{className:` ${e.styles["custom-font-size"]}`,children:l("description")}),t.jsx(g.Input,{type:"textarea",rows:5,name:"description",placeholder:l("description"),value:k.description,onChange:n=>{C(n),m()},onBlur:L("description"),className:` ${e.styles["custom-font-size"]}`})]}),t.jsxs(g.Col,{md:12,className:"mb-2",children:[t.jsx(g.Label,{className:` ${e.styles["custom-font-size"]}`,children:l("parent_category")}),t.jsx(M,{isDisabled:u,onChange:n=>{d.setFieldValue("parentSkillId",n.value),m()},id:k.parentSkillId,className:` ${e.styles["custom-font-size"]}`})]})]})})}})},V=f.forwardRef(P),U=12,H=20,K="Skill list",Q=()=>{const s=N.useSelector(r=>r.skills.skillList),a=N.useSelector(r=>r.skills.totalItems),l=N.useSelector(r=>{var m;return(m=r.common)==null?void 0:m.defaultFontSize}),{filters:c,changeFilters:x}=e.useFilters(),i=N.useDispatch(),y=f.useMemo(()=>l==H?"font-large":l==U?"font-small":"",[l]),j=f.useCallback(async()=>{var r,m;i(e.setLoading(!0));try{const p=await v(c),{items:u,totalItems:h}=p.data;i(e.setSkillList({skillList:u,totalItems:h}))}catch(p){i(e.setAlert({type:"danger",message:((m=(r=p.response)==null?void 0:r.data)==null?void 0:m.title)||p.message}))}i(e.setLoading(!1))},[i,c]),o=f.useCallback(r=>{var m,p;i(e.setLoading(!0));try{i(e.setModal({isOpen:!0,type:"warning",message:"Do you want to remove this skill?",onConfirm:async()=>{var u,h;try{await B(r),i(e.setAlert({type:"success",message:"Remove skill successfully"})),x({currentPage:1})}catch(d){i(e.setAlert({type:"danger",message:((h=(u=d.response)==null?void 0:u.data)==null?void 0:h.title)||d.message||"Error occured"}))}}}))}catch(u){i(e.setAlert({type:"danger",message:((p=(m=u.response)==null?void 0:m.data)==null?void 0:p.title)||u.message||"Error occured"}))}i(e.setLoading(!1))},[c]);return f.useEffect(()=>{document.title=K},[]),f.useEffect(()=>{j()},[c]),{skillList:s,totalItems:a,filters:c,changeFilters:x,getData:j,removeData:o,classFontSize:y}},z={name:"",description:"",path:"",parentSkillId:null},G=()=>{const s=N.useDispatch(),[a,l]=f.useState(0),[c,x]=f.useState(z),[i,y]=f.useState(!1),j=async()=>{localStorage.setItem(window.location.href,"true"),y(!0)},o=async()=>{localStorage.getItem(window.location.href)&&localStorage.removeItem(window.location.href),y(!1)};f.useEffect(()=>{a?m():x(z)},[a]);const r=()=>{l(0),x(z)};f.useEffect(()=>{o()},[]);const m=f.useCallback(async()=>{var u,h;s(e.setLoading(!0));try{const d=await q(a);x(d.data)}catch(d){s(e.setAlert({type:"danger",message:((h=(u=d.response)==null?void 0:u.data)==null?void 0:h.title)||d.message}))}s(e.setLoading(!1))},[a]),p=f.useCallback(async(u,h)=>{var d,k;s(e.setLoading(!0));try{await(a?A:_)(u),s(e.setAlert({type:"success",message:`${a?"Update":"Create"} skill successfully`})),h&&h(),a&&l(0)}catch(S){s(e.setAlert({type:"danger",message:((k=(d=S.response)==null?void 0:d.data)==null?void 0:k.title)||S.message}))}s(e.setLoading(!1))},[a,c]);return{id:a,setId:l,skillDetail:c,confirmData:p,initValue:z,reset:r,edited:i,setEdited:y,setEditedTrue:j,setEditedFalse:o}},J=()=>{const s=f.useRef(null),{t:a}=w.useTranslation(),{skillList:l,totalItems:c,filters:x,changeFilters:i,getData:y,removeData:j,classFontSize:o}=Q(),{id:r,setId:m,skillDetail:p,confirmData:u,reset:h,edited:d,setEdited:k,setEditedTrue:S,setEditedFalse:b}=G(),C=n=>{m(n||0),s&&s.current&&s.current.toggle()},L=n=>{u(n,()=>{s&&s.current&&s.current.toggle(),y()}),b()},D=n=>{j(n)},E=()=>h();return t.jsxs("div",{className:`fadeIn animated ${e.styles[o]}`,children:[t.jsx(V,{ref:s,header:a(r?"edit_skill":"create_skill"),confirmText:a(r?"update":"create"),onCancel:E,onConfirm:L,skillDetail:p,edited:d,setEdited:k,setEditedTrue:S,setEditedFalse:b,isDisabled:r,classFontSize:o}),t.jsx(e.QuitPrompt,{when:d}),t.jsxs(g.Row,{className:"my-2",children:[t.jsx(g.Col,{md:4,children:t.jsx(e.AddButton,{text:a("create_skill"),onClick:()=>C(),className:` ${e.styles["custom-font-size"]}`})}),t.jsxs(g.Col,{md:4,className:`d-flex justify-content-end align-items-center ${e.styles["custom-font-size"]}`,children:[a("total_of_skills"),": ",c]})]}),t.jsxs(g.Row,{className:"mb-2",children:[t.jsx(g.Col,{md:8,children:l&&l.length>0?t.jsxs(g.Table,{bordered:!0,hover:!0,striped:!0,responsive:!0,size:"sm",children:[t.jsx("thead",{children:t.jsxs("tr",{children:[t.jsx("th",{className:`align-top ${e.styles["custom-font-size"]}`,children:a("name")}),t.jsx("th",{className:`align-top ${e.styles["custom-font-size"]}`,children:a("description")}),t.jsx("th",{className:`text-center ${e.styles["custom-font-size"]}`,children:a("action")})]})}),t.jsx("tbody",{children:l.map(n=>t.jsxs("tr",{children:[t.jsxs("td",{className:`align-middle ${e.styles["custom-font-size"]}`,children:[t.jsx(e.LinkEditButton,{label:n.name,onClick:()=>C(n.id),className:`${e.styles["custom-font-size"]}`}),!!n.path&&t.jsx("p",{className:"mb-0 pl-3",children:t.jsx("i",{children:n.path})})]}),t.jsx("td",{className:`align-middle ${e.styles["custom-font-size"]}`,children:n.description}),t.jsx("td",{className:`text-center align-middle ${e.styles["custom-font-size"]}`,children:t.jsx(e.DeleteButtonIcon,{onClick:()=>D(n.id)})})]},n.id))})]}):t.jsx(e.EmptyDataAlert,{label:a("skill")})}),t.jsx(g.Col,{md:8,className:"text-right",children:t.jsx(e.CustomPagination,{totalRecordCount:c,filters:x,changePageSize:n=>i({pageSize:n}),changePage:n=>i({currentPage:n}),className:`${e.styles["custom-font-size"]}`})})]})]})};exports.default=J;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { a as t, B as o, a5 as f } from "./index-C95SWLrn.js";
|
|
2
|
+
import { jsxs as h, jsx as u } from "react/jsx-runtime";
|
|
3
|
+
import { useState as S } from "react";
|
|
4
|
+
const g = Symbol.for("constructDateFrom");
|
|
5
|
+
function T(s, a) {
|
|
6
|
+
return typeof s == "function" ? s(a) : s && typeof s == "object" && g in s ? s[g](a) : s instanceof Date ? new s.constructor(a) : new Date(a);
|
|
7
|
+
}
|
|
8
|
+
const e = `${o}/api/user`, A = `${o}/api/Account/changePassword`, U = `${o}/api/account`, r = `${o}/api/User`, C = (s) => t.get(`${e}`, { params: s }), D = (s) => t.get(`${e}/${s}`), L = (s) => t.post(`${e}`, s), _ = (s) => t.put(`${e}/${s.id}`, s), y = (s) => t.delete(`${e}/${s}`), E = (s) => t.post(A, s), N = (s) => t.post(`${U}/forgotchangepassword`, s), P = (s) => t.post(`${r}/switch-user/${s}`), j = (s) => t.get(`${r}/student-assign`, {
|
|
9
|
+
params: s
|
|
10
|
+
}), x = () => t.get(`${o}/api/counselor`), B = () => t.get(`${o}/api/assistant`), k = (s) => t.get(`${e}/all/teacher`, {
|
|
11
|
+
params: s
|
|
12
|
+
}), I = (s) => t.post(`${e}/student-assign`, s), z = (s) => t.get(`${e}/filters`, { params: s }), G = (s, a) => t.post(`${r}/change-grade-for-student`, { studentUserId: s, gradeLevel: a }), M = (s) => t.post(`${r}/remove-bulk-staff`, s), Z = (s) => t.put(`${e}/update-status-all`, s), H = ({
|
|
13
|
+
options: s,
|
|
14
|
+
isDisabled: a,
|
|
15
|
+
scrollBottom: p,
|
|
16
|
+
onCreateOption: c,
|
|
17
|
+
...d
|
|
18
|
+
}) => {
|
|
19
|
+
const [l, i] = S(), m = (n) => String(n).toLowerCase().match(
|
|
20
|
+
/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
|
|
21
|
+
);
|
|
22
|
+
return /* @__PURE__ */ h("div", { className: "w-100", children: [
|
|
23
|
+
/* @__PURE__ */ u("div", { className: "w-100", children: /* @__PURE__ */ u(
|
|
24
|
+
f,
|
|
25
|
+
{
|
|
26
|
+
isDisabled: a,
|
|
27
|
+
options: s,
|
|
28
|
+
menuPlacement: p ? "top" : "auto",
|
|
29
|
+
onCreateOption: (n) => {
|
|
30
|
+
if (m(n))
|
|
31
|
+
i(void 0);
|
|
32
|
+
else {
|
|
33
|
+
i(`Invalid email format for email: ${n}`);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const $ = {
|
|
37
|
+
label: n,
|
|
38
|
+
value: -(/* @__PURE__ */ new Date()).getTime()
|
|
39
|
+
};
|
|
40
|
+
c == null || c($);
|
|
41
|
+
},
|
|
42
|
+
onFocus: () => {
|
|
43
|
+
i(void 0);
|
|
44
|
+
},
|
|
45
|
+
...d
|
|
46
|
+
}
|
|
47
|
+
) }),
|
|
48
|
+
!!l && /* @__PURE__ */ u("p", { className: "text-danger mb-0 mt-1", children: l })
|
|
49
|
+
] });
|
|
50
|
+
};
|
|
51
|
+
export {
|
|
52
|
+
H as T,
|
|
53
|
+
z as a,
|
|
54
|
+
j as b,
|
|
55
|
+
T as c,
|
|
56
|
+
x as d,
|
|
57
|
+
B as e,
|
|
58
|
+
k as f,
|
|
59
|
+
C as g,
|
|
60
|
+
M as h,
|
|
61
|
+
I as i,
|
|
62
|
+
G as j,
|
|
63
|
+
D as k,
|
|
64
|
+
_ as l,
|
|
65
|
+
L as m,
|
|
66
|
+
N as n,
|
|
67
|
+
E as o,
|
|
68
|
+
y as r,
|
|
69
|
+
P as s,
|
|
70
|
+
Z as u
|
|
71
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./index-DixwqZ17.cjs"),n=require("react/jsx-runtime"),A=require("react"),p=Symbol.for("constructDateFrom");function f(t,o){return typeof t=="function"?t(o):t&&typeof t=="object"&&p in t?t[p](o):t instanceof Date?new t.constructor(o):new Date(o)}const s=`${e.BASE_URL}/api/user`,h=`${e.BASE_URL}/api/Account/changePassword`,U=`${e.BASE_URL}/api/account`,r=`${e.BASE_URL}/api/User`,R=t=>e.api.get(`${s}`,{params:t}),w=t=>e.api.get(`${s}/${t}`),L=t=>e.api.post(`${s}`,t),_=t=>e.api.put(`${s}/${t.id}`,t),v=t=>e.api.delete(`${s}/${t}`),B=t=>e.api.post(h,t),E=t=>e.api.post(`${U}/forgotchangepassword`,t),F=t=>e.api.post(`${r}/switch-user/${t}`),T=t=>e.api.get(`${r}/student-assign`,{params:t}),b=()=>e.api.get(`${e.BASE_URL}/api/counselor`),x=()=>e.api.get(`${e.BASE_URL}/api/assistant`),C=t=>e.api.get(`${s}/all/teacher`,{params:t}),P=t=>e.api.post(`${s}/student-assign`,t),j=t=>e.api.get(`${s}/filters`,{params:t}),y=(t,o)=>e.api.post(`${r}/change-grade-for-student`,{studentUserId:t,gradeLevel:o}),D=t=>e.api.post(`${r}/remove-bulk-staff`,t),N=t=>e.api.put(`${s}/update-status-all`,t),I=({options:t,isDisabled:o,scrollBottom:g,onCreateOption:c,...d})=>{const[u,i]=A.useState(),l=a=>String(a).toLowerCase().match(/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/),m=a=>{if(l(a))i(void 0);else{i(`Invalid email format for email: ${a}`);return}const $={label:a,value:-new Date().getTime()};c==null||c($)},S=()=>{i(void 0)};return n.jsxs("div",{className:"w-100",children:[n.jsx("div",{className:"w-100",children:n.jsx(e.CreatableSelect$1,{isDisabled:o,options:t,menuPlacement:g?"top":"auto",onCreateOption:m,onFocus:S,...d})}),!!u&&n.jsx("p",{className:"text-danger mb-0 mt-1",children:u})]})};exports.TeacherSelector=I;exports.addGradeToStudent=y;exports.assignStudentsApi=P;exports.changePassword=B;exports.constructFrom=f;exports.create=L;exports.forgotChangePassword=E;exports.get=R;exports.getAssignStudentApi=T;exports.getAssistants=x;exports.getById=w;exports.getCounselors=b;exports.getFilterRosterUser=j;exports.getTeachers=C;exports.remove=v;exports.removeBulkStaff=D;exports.switchAccountUser=F;exports.update=_;exports.updateStatusAll=N;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),s=require("react-router-dom"),r=require("@coreui/react"),m=require("./index-DixwqZ17.cjs"),u=e.jsx("div",{className:"app-initial-loader",style:{position:"relative",height:"100%",minHeight:"400px",backgroundColor:"transparent",width:"100%"},children:e.jsxs("div",{className:"loader-container",children:[e.jsx("img",{src:"/images/mario-logo-split.png",alt:"Mario Education Logo",className:"loader-logo",style:{maxWidth:"220px"}}),e.jsx("div",{className:"loading-text",children:"Loading your page..."}),e.jsxs("div",{className:"loading-dots",children:[e.jsx("span",{className:"dot"}),e.jsx("span",{className:"dot"}),e.jsx("span",{className:"dot"})]})]})}),x=({routes:o})=>{const i=s.useLocation(),{pathname:a}=i,c=a.includes("/admin")?"":"box-container",l=a.includes("/admin")?"pt-3":"";return e.jsx("main",{className:`c-main ${c}`,children:e.jsx(r.CContainer,{fluid:!0,className:`h-100 ${l}`,children:e.jsx(t.Suspense,{fallback:u,children:e.jsxs(s.Routes,{children:[o.map((n,d)=>e.jsx(s.Route,{path:n.path,element:e.jsx(n.component,{})},d)),e.jsx(s.Route,{path:"*",element:e.jsx(m.NotFound,{})})]})})})})},p=t.memo(x);exports.default=p;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
import m, { Suspense as r } from "react";
|
|
3
|
+
import { useLocation as p, Routes as h, Route as t } from "react-router-dom";
|
|
4
|
+
import { CContainer as g } from "@coreui/react";
|
|
5
|
+
import { q as u } from "./index-C95SWLrn.js";
|
|
6
|
+
const N = /* @__PURE__ */ a("div", { className: "app-initial-loader", style: { position: "relative", height: "100%", minHeight: "400px", backgroundColor: "transparent", width: "100%" }, children: /* @__PURE__ */ o("div", { className: "loader-container", children: [
|
|
7
|
+
/* @__PURE__ */ a(
|
|
8
|
+
"img",
|
|
9
|
+
{
|
|
10
|
+
src: "/images/mario-logo-split.png",
|
|
11
|
+
alt: "Mario Education Logo",
|
|
12
|
+
className: "loader-logo",
|
|
13
|
+
style: { maxWidth: "220px" }
|
|
14
|
+
}
|
|
15
|
+
),
|
|
16
|
+
/* @__PURE__ */ a("div", { className: "loading-text", children: "Loading your page..." }),
|
|
17
|
+
/* @__PURE__ */ o("div", { className: "loading-dots", children: [
|
|
18
|
+
/* @__PURE__ */ a("span", { className: "dot" }),
|
|
19
|
+
/* @__PURE__ */ a("span", { className: "dot" }),
|
|
20
|
+
/* @__PURE__ */ a("span", { className: "dot" })
|
|
21
|
+
] })
|
|
22
|
+
] }) }), f = ({ routes: i }) => {
|
|
23
|
+
const s = p(), { pathname: e } = s, l = e.includes("/admin") ? "" : "box-container", d = e.includes("/admin") ? "pt-3" : "";
|
|
24
|
+
return /* @__PURE__ */ a("main", { className: `c-main ${l}`, children: /* @__PURE__ */ a(g, { fluid: !0, className: `h-100 ${d}`, children: /* @__PURE__ */ a(r, { fallback: N, children: /* @__PURE__ */ o(h, { children: [
|
|
25
|
+
i.map((n, c) => /* @__PURE__ */ a(
|
|
26
|
+
t,
|
|
27
|
+
{
|
|
28
|
+
path: n.path,
|
|
29
|
+
element: /* @__PURE__ */ a(n.component, {})
|
|
30
|
+
},
|
|
31
|
+
c
|
|
32
|
+
)),
|
|
33
|
+
/* @__PURE__ */ a(t, { path: "*", element: /* @__PURE__ */ a(u, {}) })
|
|
34
|
+
] }) }) }) });
|
|
35
|
+
}, L = m.memo(f);
|
|
36
|
+
export {
|
|
37
|
+
L as default
|
|
38
|
+
};
|