mario-core 2.0.32-release → 2.0.33-release
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-BIhv8car.js +1 -0
- package/dist/Dashboard-BY5BVLIW.mjs +206 -0
- package/dist/Dashboard-BYXh-LYm.mjs +206 -0
- package/dist/Dashboard-Bp0ko4Nx.js +1 -0
- package/dist/Dashboard-BxX4EZkL.mjs +206 -0
- package/dist/Dashboard-CLvLdCvD.mjs +206 -0
- package/dist/Dashboard-CjDPZlwI.js +1 -0
- package/dist/Dashboard-D4yeROnn.mjs +206 -0
- package/dist/Dashboard-D6igZd4M.js +1 -0
- package/dist/Dashboard-D7X8bg8t.mjs +206 -0
- package/dist/Dashboard-DRaSlZLc.js +1 -0
- package/dist/Dashboard-DbI4E9od.js +1 -0
- package/dist/EmailTemplateDetail-B-Kab5TK.mjs +443 -0
- package/dist/EmailTemplateDetail-BJGaN7uh.js +1 -0
- package/dist/EmailTemplateDetail-BOqn4rkr.mjs +417 -0
- package/dist/EmailTemplateDetail-BlhCa_EF.mjs +443 -0
- package/dist/EmailTemplateDetail-CW0ymDWF.mjs +443 -0
- package/dist/EmailTemplateDetail-CZKvX-_q.js +1 -0
- package/dist/EmailTemplateDetail-D4EupjNO.js +1 -0
- package/dist/EmailTemplateDetail-DDbJbMWn.js +1 -0
- package/dist/EmailTemplateDetail-DP04M6QH.js +1 -0
- package/dist/EmailTemplateDetail-DSeAyn-F.mjs +443 -0
- package/dist/EmailTemplateDetail-J5R0X631.mjs +443 -0
- package/dist/EmailTemplateDetail-c2RcFzG5.js +1 -0
- package/dist/EmailTemplateList-BAVOo58z.js +1 -0
- package/dist/EmailTemplateList-BMCpm7sf.js +1 -0
- package/dist/EmailTemplateList-BQCcXdif.mjs +170 -0
- package/dist/EmailTemplateList-BVB1lsW7.mjs +170 -0
- package/dist/EmailTemplateList-BVfQCPzA.js +1 -0
- package/dist/EmailTemplateList-C-aj1Pl0.mjs +170 -0
- package/dist/EmailTemplateList-C5c2T4_M.mjs +170 -0
- package/dist/EmailTemplateList-D3G-A7Jo.js +1 -0
- package/dist/EmailTemplateList-DPQTaV4-.js +1 -0
- package/dist/EmailTemplateList-JRLV6pZW.mjs +170 -0
- package/dist/EmailTemplateList-ZTs0DmjS.js +1 -0
- package/dist/EmailTemplateList-gwkheOgx.mjs +168 -0
- package/dist/GalleryList-BU1m_MP_.js +1 -0
- package/dist/GalleryList-BftIdfu8.js +1 -0
- package/dist/GalleryList-Bl4FojYJ.mjs +329 -0
- package/dist/GalleryList-ByJ1_7Qx.mjs +329 -0
- package/dist/GalleryList-CVzc1xGW.js +1 -0
- package/dist/GalleryList-D5E7p3kE.mjs +329 -0
- package/dist/GalleryList-D5ZydfSV.js +1 -0
- package/dist/GalleryList-DHblERzG.js +1 -0
- package/dist/GalleryList-DXnU-Aou.mjs +329 -0
- package/dist/GalleryList-DpM906eg.mjs +329 -0
- package/dist/GalleryList-ZJ_mdpVZ.js +1 -0
- package/dist/GalleryList-oJNXivHy.mjs +329 -0
- package/dist/Login-A2cXwovI.mjs +1380 -0
- package/dist/Login-B69XhtIm.mjs +1380 -0
- package/dist/Login-BLyikyni.mjs +1380 -0
- package/dist/Login-Bwr0h4GC.js +1 -0
- package/dist/Login-C12Whvdx.js +1 -0
- package/dist/Login-CIcbHD7-.mjs +1380 -0
- package/dist/Login-D7gUoYyV.js +1 -0
- package/dist/Login-DEMe7ra6.js +1 -0
- package/dist/Login-Dcwb-HaZ.js +1 -0
- package/dist/Login-Rwbmk--s.js +1 -0
- package/dist/Login-h3o1lUKK.mjs +1380 -0
- package/dist/Login-xn2j4Jqq.mjs +1380 -0
- package/dist/NotificationList--DZcYUS5.js +2 -0
- package/dist/NotificationList-D26jJ6Wc.mjs +3969 -0
- package/dist/NotificationList-DZ1epO3L.mjs +3969 -0
- package/dist/NotificationList-D_lGCmIS.js +2 -0
- package/dist/NotificationList-Da-pWu35.js +2 -0
- package/dist/NotificationList-Dogczlgr.mjs +3969 -0
- package/dist/NotificationList-Dv0JIP69.js +2 -0
- package/dist/NotificationList-DygQSzwE.mjs +3969 -0
- package/dist/NotificationList-Ku1m25fI.mjs +3969 -0
- package/dist/NotificationList-Ml4QiyAE.mjs +3969 -0
- package/dist/NotificationList-_AHdv4bs.js +2 -0
- package/dist/NotificationList-rKx7xooX.js +2 -0
- package/dist/SkillList-BUDiP8Ba.mjs +386 -0
- package/dist/SkillList-Btum0zIE.js +1 -0
- package/dist/SkillList-C-dw1122.js +1 -0
- package/dist/SkillList-C0ZfIxCl.js +1 -0
- package/dist/SkillList-CZTd0oz_.mjs +386 -0
- package/dist/SkillList-DPU-l8aA.js +1 -0
- package/dist/SkillList-DTxT0Hbn.js +1 -0
- package/dist/SkillList-DVXAACsz.mjs +386 -0
- package/dist/SkillList-DX530KHp.mjs +386 -0
- package/dist/SkillList-DahOq8Os.mjs +386 -0
- package/dist/SkillList-DivkFIrP.mjs +386 -0
- package/dist/SkillList-yosFFVsc.js +1 -0
- package/dist/TeacherSelector-5UVov2Wf.mjs +30 -0
- package/dist/TeacherSelector-Bi582rEx.mjs +30 -0
- package/dist/TeacherSelector-BmmfQxU8.js +1 -0
- package/dist/TeacherSelector-BngXAzRe.mjs +30 -0
- package/dist/TeacherSelector-C7-XuXfb.mjs +30 -0
- package/dist/TeacherSelector-C9Z5JX-P.js +1 -0
- package/dist/TeacherSelector-CZ1DrLUk.js +1 -0
- package/dist/TeacherSelector-CbJ1kPyV.js +1 -0
- package/dist/TeacherSelector-CkGdl96R.js +1 -0
- package/dist/TeacherSelector-CxDiVyno.mjs +30 -0
- package/dist/TeacherSelector-DomtJIQi.js +1 -0
- package/dist/TeacherSelector-mjBcHGJF.mjs +30 -0
- package/dist/TheContent-B42qwDUV.mjs +38 -0
- package/dist/TheContent-BW03X6oT.mjs +38 -0
- package/dist/TheContent-CayaQR9C.js +1 -0
- package/dist/TheContent-CiU0FBTA.mjs +38 -0
- package/dist/TheContent-D5Qx4QXe.js +1 -0
- package/dist/TheContent-DHWnB8WX.js +1 -0
- package/dist/TheContent-DPy5BFuN.js +1 -0
- package/dist/TheContent-Dl7_h11H.mjs +38 -0
- package/dist/TheContent-DxN9-GIu.mjs +38 -0
- package/dist/TheContent-H-Hg7kIq.js +1 -0
- package/dist/TheContent-aEfXKW_H.mjs +38 -0
- package/dist/TheContent-xUKaH5bl.js +1 -0
- package/dist/UserContainer-3dOz3yZF.js +5 -0
- package/dist/UserContainer-B-abn6--.js +5 -0
- package/dist/UserContainer-BIl8c0yJ.js +5 -0
- package/dist/UserContainer-BjYrV0kt.mjs +2783 -0
- package/dist/UserContainer-BoJ73Ko9.js +5 -0
- package/dist/UserContainer-CFnSfW2A.js +5 -0
- package/dist/UserContainer-CGlDCED1.mjs +2771 -0
- package/dist/UserContainer-CqTUtCe6.mjs +2770 -0
- package/dist/UserContainer-CtYpysOo.mjs +2771 -0
- package/dist/UserContainer-Cu6koTiw.mjs +2771 -0
- package/dist/UserContainer-Dz991Fto.mjs +2770 -0
- package/dist/UserContainer-d3ywqdWh.js +5 -0
- package/dist/UserDetail-BCLssfN6.mjs +902 -0
- package/dist/UserDetail-BRCOabYu.mjs +902 -0
- package/dist/UserDetail-BsWWKLof.js +1 -0
- package/dist/UserDetail-CkMU6eej.js +1 -0
- package/dist/UserDetail-Cl6y6AtA.js +1 -0
- package/dist/UserDetail-CqBaMe5l.mjs +902 -0
- package/dist/UserDetail-D36q7Em-.mjs +902 -0
- package/dist/UserDetail-DFjYZZOc.js +1 -0
- package/dist/UserDetail-DIGlXdot.mjs +914 -0
- package/dist/UserDetail-DizNdqsR.mjs +902 -0
- package/dist/UserDetail-DwNEJ0kC.js +1 -0
- package/dist/UserDetail-Wn1wTs2Z.js +1 -0
- package/dist/UserList-4XLAsuI5.mjs +1205 -0
- package/dist/UserList-B9_Ok-O-.js +5 -0
- package/dist/UserList-BAirPxDM.js +7 -0
- package/dist/UserList-BFRsUwHp.js +5 -0
- package/dist/UserList-BgtFj_YA.mjs +1171 -0
- package/dist/UserList-BjEBqEMi.mjs +1205 -0
- package/dist/UserList-C6MCzl4Q.js +7 -0
- package/dist/UserList-CLDgmfZl.mjs +1171 -0
- package/dist/UserList-CRqA2Kvb.js +7 -0
- package/dist/UserList-D-5W9tzb.mjs +1205 -0
- package/dist/UserList-D63-z7TV.mjs +1205 -0
- package/dist/UserList-DX_DRp8l.js +7 -0
- package/dist/constants-1VW88-cg.mjs +320 -0
- package/dist/constants-B09dcc2W.js +1 -0
- package/dist/constants-BSg1aI4R.js +1 -0
- package/dist/constants-BXFDJA-1.js +1 -0
- package/dist/constants-BdoFiMvT.mjs +320 -0
- package/dist/constants-BrOUFw2c.js +1 -0
- package/dist/constants-ClfPwBI0.mjs +320 -0
- package/dist/constants-D3RqPPqz.mjs +320 -0
- package/dist/constants-D5ZWXomx.js +1 -0
- package/dist/constants-DiRwIQ5M.mjs +320 -0
- package/dist/constants-bWeajrBe.js +1 -0
- package/dist/constants-dgRR32rI.mjs +320 -0
- package/dist/containers/EmailTemplate/hooks/useEmailTemplateDetail.d.ts +1 -0
- package/dist/containers/User/constants/types.d.ts +1 -0
- package/dist/containers/User/hooks/useExportUsersCsv.d.ts +1 -0
- package/dist/index-B3Kqv7dj.mjs +17787 -0
- package/dist/index-BTWI5jDz.js +15 -0
- package/dist/index-C1gw45bw.mjs +17792 -0
- package/dist/index-CFAFmJ4F.mjs +17782 -0
- package/dist/index-D6pNkzlV.mjs +17787 -0
- package/dist/index-DDw_4X4u.js +15 -0
- package/dist/index-DVZt7HdB.js +15 -0
- package/dist/index-Di2zNE1O.mjs +17792 -0
- package/dist/index-DzHydV61.js +15 -0
- package/dist/index-Ihdym4EQ.js +15 -0
- package/dist/index-UpEZLqQV.js +15 -0
- package/dist/index-cuQPyXoT.mjs +17772 -0
- package/dist/index.js +1 -1
- package/dist/index.modern.js +1 -1
- package/dist/mailCategoryService-BbqIjbpT.mjs +11 -0
- package/dist/mailCategoryService-C1sorb9h.js +1 -0
- package/dist/mailCategoryService-CZ9m51K4.js +1 -0
- package/dist/mailCategoryService-C_Lq0Uks.mjs +11 -0
- package/dist/mailCategoryService-DcwLjTWD.mjs +11 -0
- package/dist/mailCategoryService-DexSxwen.js +1 -0
- package/dist/mailCategoryService-DrZXrEp2.js +1 -0
- package/dist/mailCategoryService-DyLMoDxP.mjs +11 -0
- package/dist/mailCategoryService-LumZqQLL.mjs +11 -0
- package/dist/mailCategoryService-MyMGdKSl.mjs +11 -0
- package/dist/mailCategoryService-Pl31B1JT.js +1 -0
- package/dist/mailCategoryService-lvLdr9b4.js +1 -0
- package/dist/mario-core.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
import { jsx as t, jsxs as h } from "react/jsx-runtime";
|
|
2
|
+
import { useState as N, useEffect as I, forwardRef as V, useCallback as _, useRef as q } from "react";
|
|
3
|
+
import { Row as B, Col as y, Input as M, Label as P, Table as z } from "reactstrap";
|
|
4
|
+
import { useTranslation as R } from "react-i18next";
|
|
5
|
+
import { i as L, B as K, X as O, Y as Q, U as H, E as J, D as X, b as f, Z as Y, c as S, J as Z, T as G, K as W, L as ee, O as te, P as se, Q as ae } from "./index-B3Kqv7dj.mjs";
|
|
6
|
+
import { Formik as le } from "formik";
|
|
7
|
+
import * as T from "yup";
|
|
8
|
+
import { useSelector as j, useDispatch as A } from "react-redux";
|
|
9
|
+
const E = `${K}/api/Skill`, U = (e) => L.get(E, { params: e }), ne = (e) => L.get(`${E}/${e}`), ie = (e) => L.post(E, e), re = (e) => L.put(`${E}/${e.id}`, e), oe = (e) => L.delete(`${E}/${e}`), ce = (e) => {
|
|
10
|
+
const [s, c] = N([]);
|
|
11
|
+
I(() => {
|
|
12
|
+
o();
|
|
13
|
+
}, []);
|
|
14
|
+
const o = async () => {
|
|
15
|
+
try {
|
|
16
|
+
const i = await U();
|
|
17
|
+
c(i.data.items);
|
|
18
|
+
} catch (i) {
|
|
19
|
+
console.error(i.message);
|
|
20
|
+
}
|
|
21
|
+
}, { id: m, isDisabled: l } = e, u = s.map((i) => ({
|
|
22
|
+
id: i.id,
|
|
23
|
+
value: i.id,
|
|
24
|
+
label: i.path ? `${i.path}/${i.name}` : i.name
|
|
25
|
+
}));
|
|
26
|
+
return /* @__PURE__ */ t(
|
|
27
|
+
O,
|
|
28
|
+
{
|
|
29
|
+
options: u,
|
|
30
|
+
defaultValue: m,
|
|
31
|
+
...e,
|
|
32
|
+
isDisabled: l
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
}, de = T.object({
|
|
36
|
+
name: T.string().required("Name is required"),
|
|
37
|
+
description: T.string()
|
|
38
|
+
}), me = (e, s) => {
|
|
39
|
+
const {
|
|
40
|
+
header: c,
|
|
41
|
+
confirmText: o,
|
|
42
|
+
onConfirm: m,
|
|
43
|
+
skillDetail: l,
|
|
44
|
+
onCancel: u,
|
|
45
|
+
edited: i,
|
|
46
|
+
setEdited: n,
|
|
47
|
+
setEditedTrue: r,
|
|
48
|
+
setEditedFalse: k,
|
|
49
|
+
isDisabled: b
|
|
50
|
+
} = e, { t: d } = R();
|
|
51
|
+
return /* @__PURE__ */ t(
|
|
52
|
+
le,
|
|
53
|
+
{
|
|
54
|
+
initialValues: l,
|
|
55
|
+
enableReinitialize: !0,
|
|
56
|
+
validationSchema: de,
|
|
57
|
+
onSubmit: (g, p) => {
|
|
58
|
+
m(g), p.resetForm();
|
|
59
|
+
},
|
|
60
|
+
children: (g) => {
|
|
61
|
+
const {
|
|
62
|
+
values: p,
|
|
63
|
+
touched: x,
|
|
64
|
+
errors: C,
|
|
65
|
+
handleChange: D,
|
|
66
|
+
handleBlur: w,
|
|
67
|
+
handleSubmit: $,
|
|
68
|
+
resetForm: F
|
|
69
|
+
} = g;
|
|
70
|
+
return /* @__PURE__ */ t(
|
|
71
|
+
Q,
|
|
72
|
+
{
|
|
73
|
+
header: c,
|
|
74
|
+
confirmText: o,
|
|
75
|
+
onConfirm: $,
|
|
76
|
+
ref: s,
|
|
77
|
+
onCancel: () => {
|
|
78
|
+
u(), F();
|
|
79
|
+
},
|
|
80
|
+
edited: i,
|
|
81
|
+
setEdited: n,
|
|
82
|
+
setEditedFalse: k,
|
|
83
|
+
children: /* @__PURE__ */ h(B, { children: [
|
|
84
|
+
/* @__PURE__ */ h(y, { md: 12, className: "mb-2", children: [
|
|
85
|
+
/* @__PURE__ */ t(H, { text: d("name") }),
|
|
86
|
+
/* @__PURE__ */ t(
|
|
87
|
+
M,
|
|
88
|
+
{
|
|
89
|
+
name: "name",
|
|
90
|
+
placeholder: d("name"),
|
|
91
|
+
value: p.name,
|
|
92
|
+
onChange: (a) => {
|
|
93
|
+
D(a), r();
|
|
94
|
+
},
|
|
95
|
+
onBlur: w("name")
|
|
96
|
+
}
|
|
97
|
+
),
|
|
98
|
+
x.name && C.name && /* @__PURE__ */ t(
|
|
99
|
+
J,
|
|
100
|
+
{
|
|
101
|
+
text: C.name
|
|
102
|
+
}
|
|
103
|
+
)
|
|
104
|
+
] }),
|
|
105
|
+
/* @__PURE__ */ h(y, { md: 12, className: "mb-2", children: [
|
|
106
|
+
/* @__PURE__ */ t(P, { children: d("description") }),
|
|
107
|
+
/* @__PURE__ */ t(
|
|
108
|
+
M,
|
|
109
|
+
{
|
|
110
|
+
type: "textarea",
|
|
111
|
+
rows: 5,
|
|
112
|
+
name: "description",
|
|
113
|
+
placeholder: d("description"),
|
|
114
|
+
value: p.description,
|
|
115
|
+
onChange: (a) => {
|
|
116
|
+
D(a), r();
|
|
117
|
+
},
|
|
118
|
+
onBlur: w("description")
|
|
119
|
+
}
|
|
120
|
+
)
|
|
121
|
+
] }),
|
|
122
|
+
/* @__PURE__ */ h(y, { md: 12, className: "mb-2", children: [
|
|
123
|
+
/* @__PURE__ */ t(P, { children: d("parent_category") }),
|
|
124
|
+
/* @__PURE__ */ t(
|
|
125
|
+
ce,
|
|
126
|
+
{
|
|
127
|
+
isDisabled: b,
|
|
128
|
+
onChange: (a) => {
|
|
129
|
+
g.setFieldValue(
|
|
130
|
+
"parentSkillId",
|
|
131
|
+
a.value
|
|
132
|
+
), r();
|
|
133
|
+
},
|
|
134
|
+
id: p.parentSkillId
|
|
135
|
+
}
|
|
136
|
+
)
|
|
137
|
+
] })
|
|
138
|
+
] })
|
|
139
|
+
}
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
);
|
|
144
|
+
}, ue = V(me), he = "Skill list", pe = () => {
|
|
145
|
+
const e = j((n) => n.skills.skillList), s = j((n) => n.skills.totalItems), { t: c } = R(), { filters: o, changeFilters: m } = X(), l = A(), u = _(async () => {
|
|
146
|
+
l(f(!0));
|
|
147
|
+
try {
|
|
148
|
+
const n = await U(o), { items: r, totalItems: k } = n.data;
|
|
149
|
+
l(Y({ skillList: r, totalItems: k }));
|
|
150
|
+
} catch (n) {
|
|
151
|
+
l(
|
|
152
|
+
S({
|
|
153
|
+
type: "danger",
|
|
154
|
+
message: n.response?.data?.title || n.message
|
|
155
|
+
})
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
l(f(!1));
|
|
159
|
+
}, [l, o]), i = _(
|
|
160
|
+
(n) => {
|
|
161
|
+
l(f(!0));
|
|
162
|
+
try {
|
|
163
|
+
l(
|
|
164
|
+
Z({
|
|
165
|
+
isOpen: !0,
|
|
166
|
+
type: "warning",
|
|
167
|
+
message: c("do_you_want_to_remove_this_skill"),
|
|
168
|
+
onConfirm: async () => {
|
|
169
|
+
try {
|
|
170
|
+
await oe(n), l(
|
|
171
|
+
S({
|
|
172
|
+
type: "success",
|
|
173
|
+
message: c("remove_skill_successfully")
|
|
174
|
+
})
|
|
175
|
+
), m({ currentPage: 1 });
|
|
176
|
+
} catch (r) {
|
|
177
|
+
l(
|
|
178
|
+
S({
|
|
179
|
+
type: "danger",
|
|
180
|
+
message: r.response?.data?.title || r.message || "Error occured"
|
|
181
|
+
})
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
})
|
|
186
|
+
);
|
|
187
|
+
} catch (r) {
|
|
188
|
+
l(
|
|
189
|
+
S({
|
|
190
|
+
type: "danger",
|
|
191
|
+
message: r.response?.data?.title || r.message || "Error occured"
|
|
192
|
+
})
|
|
193
|
+
);
|
|
194
|
+
}
|
|
195
|
+
l(f(!1));
|
|
196
|
+
},
|
|
197
|
+
[o]
|
|
198
|
+
);
|
|
199
|
+
return I(() => {
|
|
200
|
+
document.title = he;
|
|
201
|
+
}, []), I(() => {
|
|
202
|
+
u();
|
|
203
|
+
}, [o]), {
|
|
204
|
+
skillList: e,
|
|
205
|
+
totalItems: s,
|
|
206
|
+
filters: o,
|
|
207
|
+
changeFilters: m,
|
|
208
|
+
getData: u,
|
|
209
|
+
removeData: i
|
|
210
|
+
};
|
|
211
|
+
}, v = {
|
|
212
|
+
name: "",
|
|
213
|
+
description: "",
|
|
214
|
+
path: "",
|
|
215
|
+
parentSkillId: null
|
|
216
|
+
}, ge = () => {
|
|
217
|
+
const e = A(), [s, c] = N(0), [o, m] = N(v), [l, u] = N(!1), i = async () => {
|
|
218
|
+
localStorage.setItem(window.location.href, "true"), u(!0);
|
|
219
|
+
}, n = async () => {
|
|
220
|
+
localStorage.getItem(window.location.href) && localStorage.removeItem(window.location.href), u(!1);
|
|
221
|
+
};
|
|
222
|
+
I(() => {
|
|
223
|
+
s ? k() : m(v);
|
|
224
|
+
}, [s]);
|
|
225
|
+
const r = () => {
|
|
226
|
+
c(0), m(v);
|
|
227
|
+
};
|
|
228
|
+
I(() => {
|
|
229
|
+
n();
|
|
230
|
+
}, []);
|
|
231
|
+
const k = _(async () => {
|
|
232
|
+
e(f(!0));
|
|
233
|
+
try {
|
|
234
|
+
const d = await ne(s);
|
|
235
|
+
m(d.data);
|
|
236
|
+
} catch (d) {
|
|
237
|
+
e(
|
|
238
|
+
S({
|
|
239
|
+
type: "danger",
|
|
240
|
+
message: d.response?.data?.title || d.message
|
|
241
|
+
})
|
|
242
|
+
);
|
|
243
|
+
}
|
|
244
|
+
e(f(!1));
|
|
245
|
+
}, [s]), b = _(
|
|
246
|
+
async (d, g) => {
|
|
247
|
+
e(f(!0));
|
|
248
|
+
try {
|
|
249
|
+
await (s ? re : ie)(d), e(
|
|
250
|
+
S({
|
|
251
|
+
type: "success",
|
|
252
|
+
message: `${s ? "Update" : "Create"} skill successfully`
|
|
253
|
+
})
|
|
254
|
+
), g && g(), s && c(0);
|
|
255
|
+
} catch (p) {
|
|
256
|
+
e(
|
|
257
|
+
S({
|
|
258
|
+
type: "danger",
|
|
259
|
+
message: p.response?.data?.title || p.message
|
|
260
|
+
})
|
|
261
|
+
);
|
|
262
|
+
}
|
|
263
|
+
e(f(!1));
|
|
264
|
+
},
|
|
265
|
+
[s, o]
|
|
266
|
+
);
|
|
267
|
+
return {
|
|
268
|
+
id: s,
|
|
269
|
+
setId: c,
|
|
270
|
+
skillDetail: o,
|
|
271
|
+
confirmData: b,
|
|
272
|
+
initValue: v,
|
|
273
|
+
reset: r,
|
|
274
|
+
edited: l,
|
|
275
|
+
setEdited: u,
|
|
276
|
+
setEditedTrue: i,
|
|
277
|
+
setEditedFalse: n
|
|
278
|
+
};
|
|
279
|
+
}, Ie = () => {
|
|
280
|
+
const e = q(null), { t: s } = R(), {
|
|
281
|
+
skillList: c,
|
|
282
|
+
totalItems: o,
|
|
283
|
+
filters: m,
|
|
284
|
+
changeFilters: l,
|
|
285
|
+
getData: u,
|
|
286
|
+
removeData: i
|
|
287
|
+
} = pe(), {
|
|
288
|
+
id: n,
|
|
289
|
+
setId: r,
|
|
290
|
+
skillDetail: k,
|
|
291
|
+
confirmData: b,
|
|
292
|
+
reset: d,
|
|
293
|
+
edited: g,
|
|
294
|
+
setEdited: p,
|
|
295
|
+
setEditedTrue: x,
|
|
296
|
+
setEditedFalse: C
|
|
297
|
+
} = ge(), D = (a) => {
|
|
298
|
+
r(a || 0), e && e.current && e.current.toggle();
|
|
299
|
+
}, w = (a) => {
|
|
300
|
+
b(a, () => {
|
|
301
|
+
e && e.current && e.current.toggle(), u();
|
|
302
|
+
}), C();
|
|
303
|
+
}, $ = (a) => {
|
|
304
|
+
i(a);
|
|
305
|
+
}, F = () => d();
|
|
306
|
+
return /* @__PURE__ */ h("div", { className: "fadeIn animated", children: [
|
|
307
|
+
/* @__PURE__ */ t(
|
|
308
|
+
ue,
|
|
309
|
+
{
|
|
310
|
+
ref: e,
|
|
311
|
+
header: s(n ? "edit_skill" : "create_skill"),
|
|
312
|
+
confirmText: s(n ? "update" : "create"),
|
|
313
|
+
onCancel: F,
|
|
314
|
+
onConfirm: w,
|
|
315
|
+
skillDetail: k,
|
|
316
|
+
edited: g,
|
|
317
|
+
setEdited: p,
|
|
318
|
+
setEditedTrue: x,
|
|
319
|
+
setEditedFalse: C,
|
|
320
|
+
isDisabled: n
|
|
321
|
+
}
|
|
322
|
+
),
|
|
323
|
+
/* @__PURE__ */ t(G, { when: g }),
|
|
324
|
+
/* @__PURE__ */ h(B, { className: "my-2", children: [
|
|
325
|
+
/* @__PURE__ */ t(y, { md: 4, children: /* @__PURE__ */ t(
|
|
326
|
+
W,
|
|
327
|
+
{
|
|
328
|
+
text: s("create_skill"),
|
|
329
|
+
onClick: () => D()
|
|
330
|
+
}
|
|
331
|
+
) }),
|
|
332
|
+
/* @__PURE__ */ h(
|
|
333
|
+
y,
|
|
334
|
+
{
|
|
335
|
+
md: 4,
|
|
336
|
+
className: "d-flex align-items-center justify-content-end",
|
|
337
|
+
children: [
|
|
338
|
+
s("total_of_skills"),
|
|
339
|
+
": ",
|
|
340
|
+
o
|
|
341
|
+
]
|
|
342
|
+
}
|
|
343
|
+
)
|
|
344
|
+
] }),
|
|
345
|
+
/* @__PURE__ */ h(B, { className: "mb-2", children: [
|
|
346
|
+
/* @__PURE__ */ t(y, { md: 8, children: c && c.length > 0 ? /* @__PURE__ */ h(z, { bordered: !0, hover: !0, striped: !0, responsive: !0, size: "sm", children: [
|
|
347
|
+
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ h("tr", { children: [
|
|
348
|
+
/* @__PURE__ */ t("th", { className: "align-top", children: s("name") }),
|
|
349
|
+
/* @__PURE__ */ t("th", { className: "align-top", children: s("description") }),
|
|
350
|
+
/* @__PURE__ */ t("th", { className: "text-center", children: s("action") })
|
|
351
|
+
] }) }),
|
|
352
|
+
/* @__PURE__ */ t("tbody", { children: c.map((a) => /* @__PURE__ */ h("tr", { children: [
|
|
353
|
+
/* @__PURE__ */ h("td", { className: "align-middle", children: [
|
|
354
|
+
/* @__PURE__ */ t(
|
|
355
|
+
ee,
|
|
356
|
+
{
|
|
357
|
+
label: a.name,
|
|
358
|
+
onClick: () => D(a.id)
|
|
359
|
+
}
|
|
360
|
+
),
|
|
361
|
+
!!a.path && /* @__PURE__ */ t("p", { className: "mb-0 pl-3", children: /* @__PURE__ */ t("i", { children: a.path }) })
|
|
362
|
+
] }),
|
|
363
|
+
/* @__PURE__ */ t("td", { className: "align-middle", children: a.description }),
|
|
364
|
+
/* @__PURE__ */ t("td", { className: "text-center align-middle", children: /* @__PURE__ */ t(
|
|
365
|
+
te,
|
|
366
|
+
{
|
|
367
|
+
onClick: () => $(a.id)
|
|
368
|
+
}
|
|
369
|
+
) })
|
|
370
|
+
] }, a.id)) })
|
|
371
|
+
] }) : /* @__PURE__ */ t(se, { label: s("skill") }) }),
|
|
372
|
+
/* @__PURE__ */ t(y, { md: 8, className: "text-right", children: /* @__PURE__ */ t(
|
|
373
|
+
ae,
|
|
374
|
+
{
|
|
375
|
+
totalRecordCount: o,
|
|
376
|
+
filters: m,
|
|
377
|
+
changePageSize: (a) => l({ pageSize: a }),
|
|
378
|
+
changePage: (a) => l({ currentPage: a })
|
|
379
|
+
}
|
|
380
|
+
) })
|
|
381
|
+
] })
|
|
382
|
+
] });
|
|
383
|
+
};
|
|
384
|
+
export {
|
|
385
|
+
Ie as default
|
|
386
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),m=require("react"),u=require("reactstrap"),v=require("react-i18next"),s=require("./index-UpEZLqQV.js"),R=require("formik"),T=require("yup"),D=require("react-redux");function q(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const o=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(a,i,o.get?o:{enumerable:!0,get:()=>t[i]})}}return a.default=t,Object.freeze(a)}const _=q(T),b=`${s.BASE_URL}/api/Skill`,N=t=>s.api.get(b,{params:t}),$=t=>s.api.get(`${b}/${t}`),A=t=>s.api.post(b,t),F=t=>s.api.put(`${b}/${t.id}`,t),B=t=>s.api.delete(`${b}/${t}`),M=t=>{const[a,i]=m.useState([]);m.useEffect(()=>{o()},[]);const o=async()=>{try{const c=await N();i(c.data.items)}catch(c){console.error(c.message)}},{id:g,isDisabled:l}=t,p=a.map(c=>({id:c.id,value:c.id,label:c.path?`${c.path}/${c.name}`:c.name}));return e.jsx(s.CustomSelector,{options:p,defaultValue:g,...t,isDisabled:l})},O=_.object({name:_.string().required("Name is required"),description:_.string()}),P=(t,a)=>{const{header:i,confirmText:o,onConfirm:g,skillDetail:l,onCancel:p,edited:c,setEdited:r,setEditedTrue:d,setEditedFalse:j,isDisabled:k}=t,{t:h}=v.useTranslation();return e.jsx(R.Formik,{initialValues:l,enableReinitialize:!0,validationSchema:O,onSubmit:(f,x)=>{g(f),x.resetForm()},children:f=>{const{values:x,touched:E,errors:y,handleChange:S,handleBlur:C,handleSubmit:I,resetForm:w}=f;return e.jsx(s.CommonModal,{header:i,confirmText:o,onConfirm:I,ref:a,onCancel:()=>{p(),w()},edited:c,setEdited:r,setEditedFalse:j,children:e.jsxs(u.Row,{children:[e.jsxs(u.Col,{md:12,className:"mb-2",children:[e.jsx(s.RequiredLabel,{text:h("name")}),e.jsx(u.Input,{name:"name",placeholder:h("name"),value:x.name,onChange:n=>{S(n),d()},onBlur:C("name")}),E.name&&y.name&&e.jsx(s.ErrorHandler,{text:y.name})]}),e.jsxs(u.Col,{md:12,className:"mb-2",children:[e.jsx(u.Label,{children:h("description")}),e.jsx(u.Input,{type:"textarea",rows:5,name:"description",placeholder:h("description"),value:x.description,onChange:n=>{S(n),d()},onBlur:C("description")})]}),e.jsxs(u.Col,{md:12,className:"mb-2",children:[e.jsx(u.Label,{children:h("parent_category")}),e.jsx(M,{isDisabled:k,onChange:n=>{f.setFieldValue("parentSkillId",n.value),d()},id:x.parentSkillId})]})]})})}})},z=m.forwardRef(P),V="Skill list",U=()=>{const t=D.useSelector(r=>r.skills.skillList),a=D.useSelector(r=>r.skills.totalItems),{t:i}=v.useTranslation(),{filters:o,changeFilters:g}=s.useFilters(),l=D.useDispatch(),p=m.useCallback(async()=>{l(s.setLoading(!0));try{const r=await N(o),{items:d,totalItems:j}=r.data;l(s.setSkillList({skillList:d,totalItems:j}))}catch(r){l(s.setAlert({type:"danger",message:r.response?.data?.title||r.message}))}l(s.setLoading(!1))},[l,o]),c=m.useCallback(r=>{l(s.setLoading(!0));try{l(s.setModal({isOpen:!0,type:"warning",message:i("do_you_want_to_remove_this_skill"),onConfirm:async()=>{try{await B(r),l(s.setAlert({type:"success",message:i("remove_skill_successfully")})),g({currentPage:1})}catch(d){l(s.setAlert({type:"danger",message:d.response?.data?.title||d.message||"Error occured"}))}}}))}catch(d){l(s.setAlert({type:"danger",message:d.response?.data?.title||d.message||"Error occured"}))}l(s.setLoading(!1))},[o]);return m.useEffect(()=>{document.title=V},[]),m.useEffect(()=>{p()},[o]),{skillList:t,totalItems:a,filters:o,changeFilters:g,getData:p,removeData:c}},L={name:"",description:"",path:"",parentSkillId:null},H=()=>{const t=D.useDispatch(),[a,i]=m.useState(0),[o,g]=m.useState(L),[l,p]=m.useState(!1),c=async()=>{localStorage.setItem(window.location.href,"true"),p(!0)},r=async()=>{localStorage.getItem(window.location.href)&&localStorage.removeItem(window.location.href),p(!1)};m.useEffect(()=>{a?j():g(L)},[a]);const d=()=>{i(0),g(L)};m.useEffect(()=>{r()},[]);const j=m.useCallback(async()=>{t(s.setLoading(!0));try{const h=await $(a);g(h.data)}catch(h){t(s.setAlert({type:"danger",message:h.response?.data?.title||h.message}))}t(s.setLoading(!1))},[a]),k=m.useCallback(async(h,f)=>{t(s.setLoading(!0));try{await(a?F:A)(h),t(s.setAlert({type:"success",message:`${a?"Update":"Create"} skill successfully`})),f&&f(),a&&i(0)}catch(x){t(s.setAlert({type:"danger",message:x.response?.data?.title||x.message}))}t(s.setLoading(!1))},[a,o]);return{id:a,setId:i,skillDetail:o,confirmData:k,initValue:L,reset:d,edited:l,setEdited:p,setEditedTrue:c,setEditedFalse:r}},K=()=>{const t=m.useRef(null),{t:a}=v.useTranslation(),{skillList:i,totalItems:o,filters:g,changeFilters:l,getData:p,removeData:c}=U(),{id:r,setId:d,skillDetail:j,confirmData:k,reset:h,edited:f,setEdited:x,setEditedTrue:E,setEditedFalse:y}=H(),S=n=>{d(n||0),t&&t.current&&t.current.toggle()},C=n=>{k(n,()=>{t&&t.current&&t.current.toggle(),p()}),y()},I=n=>{c(n)},w=()=>h();return e.jsxs("div",{className:"fadeIn animated",children:[e.jsx(z,{ref:t,header:a(r?"edit_skill":"create_skill"),confirmText:a(r?"update":"create"),onCancel:w,onConfirm:C,skillDetail:j,edited:f,setEdited:x,setEditedTrue:E,setEditedFalse:y,isDisabled:r}),e.jsx(s.QuitPrompt,{when:f}),e.jsxs(u.Row,{className:"my-2",children:[e.jsx(u.Col,{md:4,children:e.jsx(s.AddButton,{text:a("create_skill"),onClick:()=>S()})}),e.jsxs(u.Col,{md:4,className:"d-flex align-items-center justify-content-end",children:[a("total_of_skills"),": ",o]})]}),e.jsxs(u.Row,{className:"mb-2",children:[e.jsx(u.Col,{md:8,children:i&&i.length>0?e.jsxs(u.Table,{bordered:!0,hover:!0,striped:!0,responsive:!0,size:"sm",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"align-top",children:a("name")}),e.jsx("th",{className:"align-top",children:a("description")}),e.jsx("th",{className:"text-center",children:a("action")})]})}),e.jsx("tbody",{children:i.map(n=>e.jsxs("tr",{children:[e.jsxs("td",{className:"align-middle",children:[e.jsx(s.LinkEditButton,{label:n.name,onClick:()=>S(n.id)}),!!n.path&&e.jsx("p",{className:"mb-0 pl-3",children:e.jsx("i",{children:n.path})})]}),e.jsx("td",{className:"align-middle",children:n.description}),e.jsx("td",{className:"text-center align-middle",children:e.jsx(s.DeleteButtonIcon,{onClick:()=>I(n.id)})})]},n.id))})]}):e.jsx(s.EmptyDataAlert,{label:a("skill")})}),e.jsx(u.Col,{md:8,className:"text-right",children:e.jsx(s.CustomPagination,{totalRecordCount:o,filters:g,changePageSize:n=>l({pageSize:n}),changePage:n=>l({currentPage:n})})})]})]})};exports.default=K;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useState as m } from "react";
|
|
3
|
+
import { ai as l } from "./index-Di2zNE1O.mjs";
|
|
4
|
+
const x = ({
|
|
5
|
+
options: s,
|
|
6
|
+
isDisabled: o,
|
|
7
|
+
scrollBottom: t,
|
|
8
|
+
onCreateOption: i,
|
|
9
|
+
...a
|
|
10
|
+
}) => {
|
|
11
|
+
const [r, c] = m();
|
|
12
|
+
return /* @__PURE__ */ n("div", { className: "w-100", children: [
|
|
13
|
+
/* @__PURE__ */ e("div", { className: "w-100", children: /* @__PURE__ */ e(
|
|
14
|
+
l,
|
|
15
|
+
{
|
|
16
|
+
isDisabled: o,
|
|
17
|
+
options: s,
|
|
18
|
+
menuPlacement: t ? "top" : "auto",
|
|
19
|
+
onFocus: () => {
|
|
20
|
+
c(void 0);
|
|
21
|
+
},
|
|
22
|
+
...a
|
|
23
|
+
}
|
|
24
|
+
) }),
|
|
25
|
+
!!r && /* @__PURE__ */ e("p", { className: "text-danger mb-0 mt-1", children: r })
|
|
26
|
+
] });
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
x as T
|
|
30
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useState as m } from "react";
|
|
3
|
+
import { ai as l } from "./index-C1gw45bw.mjs";
|
|
4
|
+
const x = ({
|
|
5
|
+
options: s,
|
|
6
|
+
isDisabled: o,
|
|
7
|
+
scrollBottom: t,
|
|
8
|
+
onCreateOption: i,
|
|
9
|
+
...a
|
|
10
|
+
}) => {
|
|
11
|
+
const [r, c] = m();
|
|
12
|
+
return /* @__PURE__ */ n("div", { className: "w-100", children: [
|
|
13
|
+
/* @__PURE__ */ e("div", { className: "w-100", children: /* @__PURE__ */ e(
|
|
14
|
+
l,
|
|
15
|
+
{
|
|
16
|
+
isDisabled: o,
|
|
17
|
+
options: s,
|
|
18
|
+
menuPlacement: t ? "top" : "auto",
|
|
19
|
+
onFocus: () => {
|
|
20
|
+
c(void 0);
|
|
21
|
+
},
|
|
22
|
+
...a
|
|
23
|
+
}
|
|
24
|
+
) }),
|
|
25
|
+
!!r && /* @__PURE__ */ e("p", { className: "text-danger mb-0 mt-1", children: r })
|
|
26
|
+
] });
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
x as T
|
|
30
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),i=require("react"),l=require("./index-BTWI5jDz.js"),u=({options:t,isDisabled:r,scrollBottom:c,onCreateOption:d,...a})=>{const[s,n]=i.useState(),o=()=>{n(void 0)};return e.jsxs("div",{className:"w-100",children:[e.jsx("div",{className:"w-100",children:e.jsx(l.CreatableSelect$1,{isDisabled:r,options:t,menuPlacement:c?"top":"auto",onFocus:o,...a})}),!!s&&e.jsx("p",{className:"text-danger mb-0 mt-1",children:s})]})};exports.TeacherSelector=u;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useState as m } from "react";
|
|
3
|
+
import { ai as l } from "./index-CFAFmJ4F.mjs";
|
|
4
|
+
const x = ({
|
|
5
|
+
options: s,
|
|
6
|
+
isDisabled: o,
|
|
7
|
+
scrollBottom: t,
|
|
8
|
+
onCreateOption: i,
|
|
9
|
+
...a
|
|
10
|
+
}) => {
|
|
11
|
+
const [r, c] = m();
|
|
12
|
+
return /* @__PURE__ */ n("div", { className: "w-100", children: [
|
|
13
|
+
/* @__PURE__ */ e("div", { className: "w-100", children: /* @__PURE__ */ e(
|
|
14
|
+
l,
|
|
15
|
+
{
|
|
16
|
+
isDisabled: o,
|
|
17
|
+
options: s,
|
|
18
|
+
menuPlacement: t ? "top" : "auto",
|
|
19
|
+
onFocus: () => {
|
|
20
|
+
c(void 0);
|
|
21
|
+
},
|
|
22
|
+
...a
|
|
23
|
+
}
|
|
24
|
+
) }),
|
|
25
|
+
!!r && /* @__PURE__ */ e("p", { className: "text-danger mb-0 mt-1", children: r })
|
|
26
|
+
] });
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
x as T
|
|
30
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useState as m } from "react";
|
|
3
|
+
import { ai as l } from "./index-D6pNkzlV.mjs";
|
|
4
|
+
const x = ({
|
|
5
|
+
options: s,
|
|
6
|
+
isDisabled: o,
|
|
7
|
+
scrollBottom: t,
|
|
8
|
+
onCreateOption: i,
|
|
9
|
+
...a
|
|
10
|
+
}) => {
|
|
11
|
+
const [r, c] = m();
|
|
12
|
+
return /* @__PURE__ */ n("div", { className: "w-100", children: [
|
|
13
|
+
/* @__PURE__ */ e("div", { className: "w-100", children: /* @__PURE__ */ e(
|
|
14
|
+
l,
|
|
15
|
+
{
|
|
16
|
+
isDisabled: o,
|
|
17
|
+
options: s,
|
|
18
|
+
menuPlacement: t ? "top" : "auto",
|
|
19
|
+
onFocus: () => {
|
|
20
|
+
c(void 0);
|
|
21
|
+
},
|
|
22
|
+
...a
|
|
23
|
+
}
|
|
24
|
+
) }),
|
|
25
|
+
!!r && /* @__PURE__ */ e("p", { className: "text-danger mb-0 mt-1", children: r })
|
|
26
|
+
] });
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
x as T
|
|
30
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),i=require("react"),l=require("./index-DzHydV61.js"),u=({options:t,isDisabled:r,scrollBottom:c,onCreateOption:d,...a})=>{const[s,n]=i.useState(),o=()=>{n(void 0)};return e.jsxs("div",{className:"w-100",children:[e.jsx("div",{className:"w-100",children:e.jsx(l.CreatableSelect$1,{isDisabled:r,options:t,menuPlacement:c?"top":"auto",onFocus:o,...a})}),!!s&&e.jsx("p",{className:"text-danger mb-0 mt-1",children:s})]})};exports.TeacherSelector=u;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),i=require("react"),l=require("./index-DDw_4X4u.js"),u=({options:t,isDisabled:r,scrollBottom:c,onCreateOption:d,...a})=>{const[s,n]=i.useState(),o=()=>{n(void 0)};return e.jsxs("div",{className:"w-100",children:[e.jsx("div",{className:"w-100",children:e.jsx(l.CreatableSelect$1,{isDisabled:r,options:t,menuPlacement:c?"top":"auto",onFocus:o,...a})}),!!s&&e.jsx("p",{className:"text-danger mb-0 mt-1",children:s})]})};exports.TeacherSelector=u;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),i=require("react"),l=require("./index-UpEZLqQV.js"),u=({options:t,isDisabled:r,scrollBottom:c,onCreateOption:d,...a})=>{const[s,n]=i.useState(),o=()=>{n(void 0)};return e.jsxs("div",{className:"w-100",children:[e.jsx("div",{className:"w-100",children:e.jsx(l.CreatableSelect$1,{isDisabled:r,options:t,menuPlacement:c?"top":"auto",onFocus:o,...a})}),!!s&&e.jsx("p",{className:"text-danger mb-0 mt-1",children:s})]})};exports.TeacherSelector=u;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),i=require("react"),l=require("./index-DVZt7HdB.js"),u=({options:t,isDisabled:r,scrollBottom:c,onCreateOption:d,...a})=>{const[s,n]=i.useState(),o=()=>{n(void 0)};return e.jsxs("div",{className:"w-100",children:[e.jsx("div",{className:"w-100",children:e.jsx(l.CreatableSelect$1,{isDisabled:r,options:t,menuPlacement:c?"top":"auto",onFocus:o,...a})}),!!s&&e.jsx("p",{className:"text-danger mb-0 mt-1",children:s})]})};exports.TeacherSelector=u;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useState as m } from "react";
|
|
3
|
+
import { ai as l } from "./index-cuQPyXoT.mjs";
|
|
4
|
+
const x = ({
|
|
5
|
+
options: s,
|
|
6
|
+
isDisabled: o,
|
|
7
|
+
scrollBottom: t,
|
|
8
|
+
onCreateOption: i,
|
|
9
|
+
...a
|
|
10
|
+
}) => {
|
|
11
|
+
const [r, c] = m();
|
|
12
|
+
return /* @__PURE__ */ n("div", { className: "w-100", children: [
|
|
13
|
+
/* @__PURE__ */ e("div", { className: "w-100", children: /* @__PURE__ */ e(
|
|
14
|
+
l,
|
|
15
|
+
{
|
|
16
|
+
isDisabled: o,
|
|
17
|
+
options: s,
|
|
18
|
+
menuPlacement: t ? "top" : "auto",
|
|
19
|
+
onFocus: () => {
|
|
20
|
+
c(void 0);
|
|
21
|
+
},
|
|
22
|
+
...a
|
|
23
|
+
}
|
|
24
|
+
) }),
|
|
25
|
+
!!r && /* @__PURE__ */ e("p", { className: "text-danger mb-0 mt-1", children: r })
|
|
26
|
+
] });
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
x as T
|
|
30
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),i=require("react"),l=require("./index-Ihdym4EQ.js"),u=({options:t,isDisabled:r,scrollBottom:c,onCreateOption:d,...a})=>{const[s,n]=i.useState(),o=()=>{n(void 0)};return e.jsxs("div",{className:"w-100",children:[e.jsx("div",{className:"w-100",children:e.jsx(l.CreatableSelect$1,{isDisabled:r,options:t,menuPlacement:c?"top":"auto",onFocus:o,...a})}),!!s&&e.jsx("p",{className:"text-danger mb-0 mt-1",children:s})]})};exports.TeacherSelector=u;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useState as m } from "react";
|
|
3
|
+
import { ai as l } from "./index-B3Kqv7dj.mjs";
|
|
4
|
+
const x = ({
|
|
5
|
+
options: s,
|
|
6
|
+
isDisabled: o,
|
|
7
|
+
scrollBottom: t,
|
|
8
|
+
onCreateOption: i,
|
|
9
|
+
...a
|
|
10
|
+
}) => {
|
|
11
|
+
const [r, c] = m();
|
|
12
|
+
return /* @__PURE__ */ n("div", { className: "w-100", children: [
|
|
13
|
+
/* @__PURE__ */ e("div", { className: "w-100", children: /* @__PURE__ */ e(
|
|
14
|
+
l,
|
|
15
|
+
{
|
|
16
|
+
isDisabled: o,
|
|
17
|
+
options: s,
|
|
18
|
+
menuPlacement: t ? "top" : "auto",
|
|
19
|
+
onFocus: () => {
|
|
20
|
+
c(void 0);
|
|
21
|
+
},
|
|
22
|
+
...a
|
|
23
|
+
}
|
|
24
|
+
) }),
|
|
25
|
+
!!r && /* @__PURE__ */ e("p", { className: "text-danger mb-0 mt-1", children: r })
|
|
26
|
+
] });
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
x as T
|
|
30
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as a, jsxs as e } from "react/jsx-runtime";
|
|
2
|
+
import { memo as 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 { C as u } from "./index-CFAFmJ4F.mjs";
|
|
6
|
+
const N = /* @__PURE__ */ a("div", { className: "app-initial-loader", style: { position: "relative", height: "100%", minHeight: "400px", backgroundColor: "transparent", width: "100%" }, children: /* @__PURE__ */ e("div", { className: "loader-container", children: [
|
|
7
|
+
/* @__PURE__ */ a(
|
|
8
|
+
"img",
|
|
9
|
+
{
|
|
10
|
+
src: "/images/mario-logo.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__ */ e("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: o } = s, l = o.includes("/admin") ? "" : "box-container", d = o.includes("/admin") ? "p-4" : "";
|
|
24
|
+
return /* @__PURE__ */ a("main", { className: `c-main ${l}`, style: { height: "100%" }, children: /* @__PURE__ */ a(g, { fluid: !0, className: `h-100 ${d}`, style: { flex: 1 }, children: /* @__PURE__ */ a(r, { fallback: N, children: /* @__PURE__ */ e(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(f);
|
|
36
|
+
export {
|
|
37
|
+
L as default
|
|
38
|
+
};
|