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.
Files changed (187) hide show
  1. package/dist/Dashboard-BIhv8car.js +1 -0
  2. package/dist/Dashboard-BY5BVLIW.mjs +206 -0
  3. package/dist/Dashboard-BYXh-LYm.mjs +206 -0
  4. package/dist/Dashboard-Bp0ko4Nx.js +1 -0
  5. package/dist/Dashboard-BxX4EZkL.mjs +206 -0
  6. package/dist/Dashboard-CLvLdCvD.mjs +206 -0
  7. package/dist/Dashboard-CjDPZlwI.js +1 -0
  8. package/dist/Dashboard-D4yeROnn.mjs +206 -0
  9. package/dist/Dashboard-D6igZd4M.js +1 -0
  10. package/dist/Dashboard-D7X8bg8t.mjs +206 -0
  11. package/dist/Dashboard-DRaSlZLc.js +1 -0
  12. package/dist/Dashboard-DbI4E9od.js +1 -0
  13. package/dist/EmailTemplateDetail-B-Kab5TK.mjs +443 -0
  14. package/dist/EmailTemplateDetail-BJGaN7uh.js +1 -0
  15. package/dist/EmailTemplateDetail-BOqn4rkr.mjs +417 -0
  16. package/dist/EmailTemplateDetail-BlhCa_EF.mjs +443 -0
  17. package/dist/EmailTemplateDetail-CW0ymDWF.mjs +443 -0
  18. package/dist/EmailTemplateDetail-CZKvX-_q.js +1 -0
  19. package/dist/EmailTemplateDetail-D4EupjNO.js +1 -0
  20. package/dist/EmailTemplateDetail-DDbJbMWn.js +1 -0
  21. package/dist/EmailTemplateDetail-DP04M6QH.js +1 -0
  22. package/dist/EmailTemplateDetail-DSeAyn-F.mjs +443 -0
  23. package/dist/EmailTemplateDetail-J5R0X631.mjs +443 -0
  24. package/dist/EmailTemplateDetail-c2RcFzG5.js +1 -0
  25. package/dist/EmailTemplateList-BAVOo58z.js +1 -0
  26. package/dist/EmailTemplateList-BMCpm7sf.js +1 -0
  27. package/dist/EmailTemplateList-BQCcXdif.mjs +170 -0
  28. package/dist/EmailTemplateList-BVB1lsW7.mjs +170 -0
  29. package/dist/EmailTemplateList-BVfQCPzA.js +1 -0
  30. package/dist/EmailTemplateList-C-aj1Pl0.mjs +170 -0
  31. package/dist/EmailTemplateList-C5c2T4_M.mjs +170 -0
  32. package/dist/EmailTemplateList-D3G-A7Jo.js +1 -0
  33. package/dist/EmailTemplateList-DPQTaV4-.js +1 -0
  34. package/dist/EmailTemplateList-JRLV6pZW.mjs +170 -0
  35. package/dist/EmailTemplateList-ZTs0DmjS.js +1 -0
  36. package/dist/EmailTemplateList-gwkheOgx.mjs +168 -0
  37. package/dist/GalleryList-BU1m_MP_.js +1 -0
  38. package/dist/GalleryList-BftIdfu8.js +1 -0
  39. package/dist/GalleryList-Bl4FojYJ.mjs +329 -0
  40. package/dist/GalleryList-ByJ1_7Qx.mjs +329 -0
  41. package/dist/GalleryList-CVzc1xGW.js +1 -0
  42. package/dist/GalleryList-D5E7p3kE.mjs +329 -0
  43. package/dist/GalleryList-D5ZydfSV.js +1 -0
  44. package/dist/GalleryList-DHblERzG.js +1 -0
  45. package/dist/GalleryList-DXnU-Aou.mjs +329 -0
  46. package/dist/GalleryList-DpM906eg.mjs +329 -0
  47. package/dist/GalleryList-ZJ_mdpVZ.js +1 -0
  48. package/dist/GalleryList-oJNXivHy.mjs +329 -0
  49. package/dist/Login-A2cXwovI.mjs +1380 -0
  50. package/dist/Login-B69XhtIm.mjs +1380 -0
  51. package/dist/Login-BLyikyni.mjs +1380 -0
  52. package/dist/Login-Bwr0h4GC.js +1 -0
  53. package/dist/Login-C12Whvdx.js +1 -0
  54. package/dist/Login-CIcbHD7-.mjs +1380 -0
  55. package/dist/Login-D7gUoYyV.js +1 -0
  56. package/dist/Login-DEMe7ra6.js +1 -0
  57. package/dist/Login-Dcwb-HaZ.js +1 -0
  58. package/dist/Login-Rwbmk--s.js +1 -0
  59. package/dist/Login-h3o1lUKK.mjs +1380 -0
  60. package/dist/Login-xn2j4Jqq.mjs +1380 -0
  61. package/dist/NotificationList--DZcYUS5.js +2 -0
  62. package/dist/NotificationList-D26jJ6Wc.mjs +3969 -0
  63. package/dist/NotificationList-DZ1epO3L.mjs +3969 -0
  64. package/dist/NotificationList-D_lGCmIS.js +2 -0
  65. package/dist/NotificationList-Da-pWu35.js +2 -0
  66. package/dist/NotificationList-Dogczlgr.mjs +3969 -0
  67. package/dist/NotificationList-Dv0JIP69.js +2 -0
  68. package/dist/NotificationList-DygQSzwE.mjs +3969 -0
  69. package/dist/NotificationList-Ku1m25fI.mjs +3969 -0
  70. package/dist/NotificationList-Ml4QiyAE.mjs +3969 -0
  71. package/dist/NotificationList-_AHdv4bs.js +2 -0
  72. package/dist/NotificationList-rKx7xooX.js +2 -0
  73. package/dist/SkillList-BUDiP8Ba.mjs +386 -0
  74. package/dist/SkillList-Btum0zIE.js +1 -0
  75. package/dist/SkillList-C-dw1122.js +1 -0
  76. package/dist/SkillList-C0ZfIxCl.js +1 -0
  77. package/dist/SkillList-CZTd0oz_.mjs +386 -0
  78. package/dist/SkillList-DPU-l8aA.js +1 -0
  79. package/dist/SkillList-DTxT0Hbn.js +1 -0
  80. package/dist/SkillList-DVXAACsz.mjs +386 -0
  81. package/dist/SkillList-DX530KHp.mjs +386 -0
  82. package/dist/SkillList-DahOq8Os.mjs +386 -0
  83. package/dist/SkillList-DivkFIrP.mjs +386 -0
  84. package/dist/SkillList-yosFFVsc.js +1 -0
  85. package/dist/TeacherSelector-5UVov2Wf.mjs +30 -0
  86. package/dist/TeacherSelector-Bi582rEx.mjs +30 -0
  87. package/dist/TeacherSelector-BmmfQxU8.js +1 -0
  88. package/dist/TeacherSelector-BngXAzRe.mjs +30 -0
  89. package/dist/TeacherSelector-C7-XuXfb.mjs +30 -0
  90. package/dist/TeacherSelector-C9Z5JX-P.js +1 -0
  91. package/dist/TeacherSelector-CZ1DrLUk.js +1 -0
  92. package/dist/TeacherSelector-CbJ1kPyV.js +1 -0
  93. package/dist/TeacherSelector-CkGdl96R.js +1 -0
  94. package/dist/TeacherSelector-CxDiVyno.mjs +30 -0
  95. package/dist/TeacherSelector-DomtJIQi.js +1 -0
  96. package/dist/TeacherSelector-mjBcHGJF.mjs +30 -0
  97. package/dist/TheContent-B42qwDUV.mjs +38 -0
  98. package/dist/TheContent-BW03X6oT.mjs +38 -0
  99. package/dist/TheContent-CayaQR9C.js +1 -0
  100. package/dist/TheContent-CiU0FBTA.mjs +38 -0
  101. package/dist/TheContent-D5Qx4QXe.js +1 -0
  102. package/dist/TheContent-DHWnB8WX.js +1 -0
  103. package/dist/TheContent-DPy5BFuN.js +1 -0
  104. package/dist/TheContent-Dl7_h11H.mjs +38 -0
  105. package/dist/TheContent-DxN9-GIu.mjs +38 -0
  106. package/dist/TheContent-H-Hg7kIq.js +1 -0
  107. package/dist/TheContent-aEfXKW_H.mjs +38 -0
  108. package/dist/TheContent-xUKaH5bl.js +1 -0
  109. package/dist/UserContainer-3dOz3yZF.js +5 -0
  110. package/dist/UserContainer-B-abn6--.js +5 -0
  111. package/dist/UserContainer-BIl8c0yJ.js +5 -0
  112. package/dist/UserContainer-BjYrV0kt.mjs +2783 -0
  113. package/dist/UserContainer-BoJ73Ko9.js +5 -0
  114. package/dist/UserContainer-CFnSfW2A.js +5 -0
  115. package/dist/UserContainer-CGlDCED1.mjs +2771 -0
  116. package/dist/UserContainer-CqTUtCe6.mjs +2770 -0
  117. package/dist/UserContainer-CtYpysOo.mjs +2771 -0
  118. package/dist/UserContainer-Cu6koTiw.mjs +2771 -0
  119. package/dist/UserContainer-Dz991Fto.mjs +2770 -0
  120. package/dist/UserContainer-d3ywqdWh.js +5 -0
  121. package/dist/UserDetail-BCLssfN6.mjs +902 -0
  122. package/dist/UserDetail-BRCOabYu.mjs +902 -0
  123. package/dist/UserDetail-BsWWKLof.js +1 -0
  124. package/dist/UserDetail-CkMU6eej.js +1 -0
  125. package/dist/UserDetail-Cl6y6AtA.js +1 -0
  126. package/dist/UserDetail-CqBaMe5l.mjs +902 -0
  127. package/dist/UserDetail-D36q7Em-.mjs +902 -0
  128. package/dist/UserDetail-DFjYZZOc.js +1 -0
  129. package/dist/UserDetail-DIGlXdot.mjs +914 -0
  130. package/dist/UserDetail-DizNdqsR.mjs +902 -0
  131. package/dist/UserDetail-DwNEJ0kC.js +1 -0
  132. package/dist/UserDetail-Wn1wTs2Z.js +1 -0
  133. package/dist/UserList-4XLAsuI5.mjs +1205 -0
  134. package/dist/UserList-B9_Ok-O-.js +5 -0
  135. package/dist/UserList-BAirPxDM.js +7 -0
  136. package/dist/UserList-BFRsUwHp.js +5 -0
  137. package/dist/UserList-BgtFj_YA.mjs +1171 -0
  138. package/dist/UserList-BjEBqEMi.mjs +1205 -0
  139. package/dist/UserList-C6MCzl4Q.js +7 -0
  140. package/dist/UserList-CLDgmfZl.mjs +1171 -0
  141. package/dist/UserList-CRqA2Kvb.js +7 -0
  142. package/dist/UserList-D-5W9tzb.mjs +1205 -0
  143. package/dist/UserList-D63-z7TV.mjs +1205 -0
  144. package/dist/UserList-DX_DRp8l.js +7 -0
  145. package/dist/constants-1VW88-cg.mjs +320 -0
  146. package/dist/constants-B09dcc2W.js +1 -0
  147. package/dist/constants-BSg1aI4R.js +1 -0
  148. package/dist/constants-BXFDJA-1.js +1 -0
  149. package/dist/constants-BdoFiMvT.mjs +320 -0
  150. package/dist/constants-BrOUFw2c.js +1 -0
  151. package/dist/constants-ClfPwBI0.mjs +320 -0
  152. package/dist/constants-D3RqPPqz.mjs +320 -0
  153. package/dist/constants-D5ZWXomx.js +1 -0
  154. package/dist/constants-DiRwIQ5M.mjs +320 -0
  155. package/dist/constants-bWeajrBe.js +1 -0
  156. package/dist/constants-dgRR32rI.mjs +320 -0
  157. package/dist/containers/EmailTemplate/hooks/useEmailTemplateDetail.d.ts +1 -0
  158. package/dist/containers/User/constants/types.d.ts +1 -0
  159. package/dist/containers/User/hooks/useExportUsersCsv.d.ts +1 -0
  160. package/dist/index-B3Kqv7dj.mjs +17787 -0
  161. package/dist/index-BTWI5jDz.js +15 -0
  162. package/dist/index-C1gw45bw.mjs +17792 -0
  163. package/dist/index-CFAFmJ4F.mjs +17782 -0
  164. package/dist/index-D6pNkzlV.mjs +17787 -0
  165. package/dist/index-DDw_4X4u.js +15 -0
  166. package/dist/index-DVZt7HdB.js +15 -0
  167. package/dist/index-Di2zNE1O.mjs +17792 -0
  168. package/dist/index-DzHydV61.js +15 -0
  169. package/dist/index-Ihdym4EQ.js +15 -0
  170. package/dist/index-UpEZLqQV.js +15 -0
  171. package/dist/index-cuQPyXoT.mjs +17772 -0
  172. package/dist/index.js +1 -1
  173. package/dist/index.modern.js +1 -1
  174. package/dist/mailCategoryService-BbqIjbpT.mjs +11 -0
  175. package/dist/mailCategoryService-C1sorb9h.js +1 -0
  176. package/dist/mailCategoryService-CZ9m51K4.js +1 -0
  177. package/dist/mailCategoryService-C_Lq0Uks.mjs +11 -0
  178. package/dist/mailCategoryService-DcwLjTWD.mjs +11 -0
  179. package/dist/mailCategoryService-DexSxwen.js +1 -0
  180. package/dist/mailCategoryService-DrZXrEp2.js +1 -0
  181. package/dist/mailCategoryService-DyLMoDxP.mjs +11 -0
  182. package/dist/mailCategoryService-LumZqQLL.mjs +11 -0
  183. package/dist/mailCategoryService-MyMGdKSl.mjs +11 -0
  184. package/dist/mailCategoryService-Pl31B1JT.js +1 -0
  185. package/dist/mailCategoryService-lvLdr9b4.js +1 -0
  186. package/dist/mario-core.css +1 -1
  187. package/package.json +1 -1
@@ -0,0 +1,2771 @@
1
+ import { jsxs as u, jsx as e, Fragment as tt } from "react/jsx-runtime";
2
+ import { b as F, c as I, J as nt, G as St, s as x, X as Q, _ as pt, Q as gt, $ as bt, D as Nt, a0 as wt, a1 as ct, Y as Ut, L as $t, P as Et, i as ft, B as vt, a2 as rt, a3 as ot, U as Le, E as at, a4 as kt } from "./index-Di2zNE1O.mjs";
3
+ import { T as Dt, v as Mt, A as it, U as xt } from "./UserList-D63-z7TV.mjs";
4
+ import { useState as _, useMemo as Be, useCallback as G, useEffect as te, forwardRef as yt, Fragment as Je, useRef as Ot } from "react";
5
+ import { Modal as Ce, ModalHeader as Se, ModalBody as be, ModalFooter as Ne, Button as J, Collapse as At, Card as Rt, CardBody as Lt, Row as ae, Col as j, Nav as Bt, NavItem as Ft, NavLink as Pt, TabContent as Jt, TabPane as jt, CardText as zt, Table as Tt, Tooltip as Ee, Alert as ke, Label as Vt, Input as De } from "reactstrap";
6
+ import { useTranslation as Y } from "react-i18next";
7
+ import { D as qt, i as Wt, g as Gt, a as Ht, b as Kt, c as Qt, d as Xt, T as B, e as Fe, f as dt, r as Yt, h as Me, j as Zt, u as ea, k as ta, l as aa, m as sa, n as na, G as ht, S as _e, U as Ie, o as _t } from "./constants-DiRwIQ5M.mjs";
8
+ import { T as Oe } from "./TeacherSelector-5UVov2Wf.mjs";
9
+ import { useDispatch as re, useSelector as ra } from "react-redux";
10
+ import la from "react-select";
11
+ import { Formik as ca } from "formik";
12
+ import * as xe from "yup";
13
+ import oa from "papaparse";
14
+ const ia = () => {
15
+ const s = re(), [l, c] = _([]), [r, a] = _(qt), [d, S] = _(0), [g, n] = _(!1), [i, T] = _([]), [o, U] = _([]), [E, A] = _(Wt), C = "", h = (D) => {
16
+ const $ = {
17
+ ...r,
18
+ ...D
19
+ };
20
+ $.searchString && D.searchString && D.searchString != r.searchString && ($.currentPage = 1), a($);
21
+ }, b = Be(() => {
22
+ const D = l.filter((y) => i.includes(y.id)).flatMap((y) => y.teachers), $ = /* @__PURE__ */ new Map();
23
+ return D.forEach((y) => {
24
+ $.has(y.teacherUserId) || $.set(y.teacherUserId, y);
25
+ }), Array.from($.values()).map((y) => ({
26
+ value: y.teacherUserId,
27
+ label: y.mainTeacherEmail
28
+ }));
29
+ }, [o, i]), R = Be(() => {
30
+ const D = l.filter((y) => i.includes(y.id)).flatMap((y) => y.counselors), $ = /* @__PURE__ */ new Map();
31
+ return D.forEach((y) => {
32
+ $.has(y.counselorUserId) || $.set(y.counselorUserId, y);
33
+ }), Array.from($.values()).map((y) => ({
34
+ value: y.counselorUserId,
35
+ label: y.counselorEmail
36
+ }));
37
+ }, [o, i]), z = Be(() => {
38
+ const D = l.filter((y) => i.includes(y.id) && y.assistantUserId).map((y) => ({
39
+ value: y.assistantUserId,
40
+ label: y.assistantEmail
41
+ })), $ = /* @__PURE__ */ new Map();
42
+ return D.forEach((y) => {
43
+ $.has(y.value) || $.set(y.value, y);
44
+ }), Array.from($.values());
45
+ }, [l, i]), W = Be(() => {
46
+ const D = l.filter((y) => i.includes(y.id) && y.secondaryTeacherUserId).map((y) => ({
47
+ value: y.secondaryTeacherUserId,
48
+ label: y.secondaryTeacherEmail
49
+ })), $ = /* @__PURE__ */ new Map();
50
+ return D.forEach((y) => {
51
+ $.has(y.value) || $.set(y.value, y);
52
+ }), Array.from($.values());
53
+ }, [l, i]), de = G((D) => {
54
+ D !== r.sortBy ? h({
55
+ sortBy: D,
56
+ orderBy: "ASC",
57
+ currentPage: 1
58
+ }) : h({
59
+ sortBy: D,
60
+ orderBy: r.orderBy !== "DESC" ? "DESC" : "ASC",
61
+ currentPage: 1
62
+ });
63
+ }, [JSON.stringify(r)]), se = async () => {
64
+ s(F(!0));
65
+ try {
66
+ const D = Object.entries(r).filter(([N, M]) => M !== void 0).reduce((N, [M, L]) => (N[M] = L, N), {}), $ = {};
67
+ for (const N in D) {
68
+ const M = N.charAt(0).toLowerCase() + N.slice(1);
69
+ $[M] = D[N];
70
+ }
71
+ const y = await Gt($);
72
+ c(y?.data?.items), S(y?.data?.totalItems);
73
+ } catch (D) {
74
+ s(
75
+ I({
76
+ type: "danger",
77
+ message: D.response?.data?.title || D.message
78
+ })
79
+ );
80
+ }
81
+ s(F(!1));
82
+ }, X = () => {
83
+ n(!g), T(l.map((D) => D.id)), U(l), g && (T([]), U([]));
84
+ }, he = (D) => {
85
+ const { id: $, checked: y } = D.target;
86
+ if (y) {
87
+ T((M) => [...M, $]);
88
+ const N = l.find((M) => M.id === $);
89
+ N && U((M) => [...M, N]);
90
+ } else
91
+ T((N) => N.filter((M) => M !== $)), U((N) => N.filter((M) => M.id !== $));
92
+ }, ue = G(() => {
93
+ r.currentPage == 1 ? se() : h({ currentPage: 1 }), T([]), U([]), n(!1);
94
+ }, [JSON.stringify(r)]);
95
+ return te(() => {
96
+ se();
97
+ }, [JSON.stringify(r)]), te(() => {
98
+ document.title = "User | Assign student";
99
+ }, []), te(() => {
100
+ h({
101
+ ...r,
102
+ searchString: C
103
+ });
104
+ }, [C]), {
105
+ handelSort: de,
106
+ handleRetrievedData: ue,
107
+ totalItem: d,
108
+ userList: l,
109
+ filters: r,
110
+ changeFilters: h,
111
+ handleSelectAll: X,
112
+ handleClickCheck: he,
113
+ isCheckAll: g,
114
+ isCheck: i,
115
+ fullName: C,
116
+ selectedUser: E,
117
+ setSelectedUser: A,
118
+ userSelected: o,
119
+ getDataUserList: se,
120
+ studentTeacherSelected: b,
121
+ studentCounselorSelected: R,
122
+ studentAssistantSelected: z,
123
+ studentSecondaryTeacherSelected: W
124
+ };
125
+ }, da = () => {
126
+ const s = re(), [l, c] = _([]), [r, a] = _(), d = async () => {
127
+ try {
128
+ const n = await Ht();
129
+ n.data.items && c(n.data.items.map?.((i) => ({
130
+ label: i.email,
131
+ value: i.id
132
+ })) || []);
133
+ } catch (n) {
134
+ s(
135
+ I({
136
+ type: "danger",
137
+ message: n.response?.data?.title || n.message
138
+ })
139
+ );
140
+ }
141
+ }, S = G((n, i) => {
142
+ let T = l.find((o) => o.value === n);
143
+ a({
144
+ ...r,
145
+ [i]: T
146
+ });
147
+ }, [JSON.stringify(r), JSON.stringify(l)]), g = G((n, i, T) => {
148
+ c([
149
+ ...l,
150
+ n
151
+ ]), T && a({
152
+ ...r,
153
+ [i]: n
154
+ });
155
+ }, [JSON.stringify(l), JSON.stringify(r)]);
156
+ return te(() => {
157
+ d();
158
+ }, []), {
159
+ selectedCounselors: r,
160
+ counselorOptions: l,
161
+ handleSelectCounselor: S,
162
+ handleCreateCounselorOption: g,
163
+ setSelectedCounselors: a
164
+ };
165
+ }, ha = () => {
166
+ const s = re(), [l, c] = _([]), [r, a] = _(), d = async () => {
167
+ try {
168
+ const n = await Kt();
169
+ n.data.items && c(n.data.items.map?.((i) => ({
170
+ label: i.email,
171
+ value: i.id
172
+ })) || []);
173
+ } catch (n) {
174
+ s(
175
+ I({
176
+ type: "danger",
177
+ message: n.response?.data?.title || n.message
178
+ })
179
+ );
180
+ }
181
+ }, S = G((n, i) => {
182
+ let T = l.find((o) => o.value === n);
183
+ a({
184
+ ...r,
185
+ [i]: T
186
+ });
187
+ }, [JSON.stringify(r), JSON.stringify(l)]), g = G((n, i, T) => {
188
+ c([
189
+ ...l,
190
+ n
191
+ ]), T && a({
192
+ ...r,
193
+ [i]: n
194
+ });
195
+ }, [JSON.stringify(l), JSON.stringify(r)]);
196
+ return te(() => {
197
+ d();
198
+ }, []), {
199
+ selectedAssistants: r,
200
+ assistantOptions: l,
201
+ handleSelectAssistant: S,
202
+ handleCreateAssistantOption: g,
203
+ setSelectedAssistants: a
204
+ };
205
+ }, ua = () => {
206
+ const s = re(), [l, c] = _([]), [r, a] = _(), d = async () => {
207
+ try {
208
+ const n = await Qt();
209
+ n.data.items && c(n.data.items.map?.((i) => ({
210
+ label: i.email,
211
+ value: i.id,
212
+ id: i.secondaryTeacherId
213
+ })) || []);
214
+ } catch (n) {
215
+ s(
216
+ I({
217
+ type: "danger",
218
+ message: n.response?.data?.title || n.message
219
+ })
220
+ );
221
+ }
222
+ }, S = G((n, i) => {
223
+ let T = l.find((o) => o.value === n);
224
+ a({
225
+ ...r,
226
+ [i]: T
227
+ });
228
+ }, [JSON.stringify(r), JSON.stringify(l)]), g = G((n, i, T) => {
229
+ c([
230
+ ...l,
231
+ n
232
+ ]), T && a({
233
+ ...r,
234
+ [i]: n
235
+ });
236
+ }, [JSON.stringify(l), JSON.stringify(r)]);
237
+ return te(() => {
238
+ d();
239
+ }, []), {
240
+ selectedSecondaryTeachers: r,
241
+ secondaryTeacherOptions: l,
242
+ handleSelectSecondaryTeacher: S,
243
+ handleCreateSecondaryTeacherOption: g,
244
+ setSelectedSecondaryTeachers: a
245
+ };
246
+ }, ma = () => {
247
+ const s = re(), [l, c] = _([]), [r, a] = _(), d = async () => {
248
+ try {
249
+ const n = await Xt({
250
+ sortBy: "Email"
251
+ });
252
+ n.data && c(n.data.map?.((i) => ({
253
+ label: i.email,
254
+ value: i.id
255
+ })) || []);
256
+ } catch (n) {
257
+ s(
258
+ I({
259
+ type: "danger",
260
+ message: n.response?.data?.title || n.message
261
+ })
262
+ );
263
+ }
264
+ }, S = G((n, i) => {
265
+ let T = l.filter((o) => n.includes(o.value));
266
+ a({
267
+ ...r,
268
+ [i]: T
269
+ });
270
+ }, [JSON.stringify(r), JSON.stringify(l)]), g = G((n, i, T) => {
271
+ c([
272
+ ...l,
273
+ n
274
+ ]), T && a({
275
+ ...r,
276
+ [i]: n
277
+ });
278
+ }, [JSON.stringify(l), JSON.stringify(r)]);
279
+ return te(() => {
280
+ d();
281
+ }, []), {
282
+ selectedTeachers: r,
283
+ teacherOptions: l,
284
+ handleSelectTeacher: S,
285
+ handleCreateTeacherOption: g,
286
+ setSelectedTeachers: a
287
+ };
288
+ }, pa = (s, l) => {
289
+ const c = [];
290
+ if (l === B.Teacher)
291
+ for (const a of s)
292
+ for (const d of a.teachers || [])
293
+ c.push({
294
+ label: d.mainTeacherEmail,
295
+ value: d.teacherUserId,
296
+ name: d.mainTeacherName
297
+ });
298
+ else if (l === B.Assistant)
299
+ for (const a of s)
300
+ a.assistantEmail && a.assistantUserId && c.push({
301
+ label: a.assistantEmail,
302
+ value: a.assistantUserId,
303
+ name: a.assistantName || ""
304
+ });
305
+ else if (l === B.Counselor)
306
+ for (const a of s)
307
+ for (const d of a.counselors || [])
308
+ c.push({
309
+ label: d.counselorEmail,
310
+ value: d.counselorUserId,
311
+ name: d.counselorName
312
+ });
313
+ const r = /* @__PURE__ */ new Map();
314
+ for (const a of c)
315
+ r.has(a.value) || r.set(a.value, a);
316
+ return Array.from(r.values()).sort(
317
+ (a, d) => a.label.localeCompare(d.label)
318
+ );
319
+ }, ga = (s, l, c, r, a, d, S, g) => {
320
+ const n = re(), [i, T] = _(!1), [o, U] = _(Fe), [E, A] = _(!1), [C, h] = _(!1), [b, R] = _(B.Teacher), [z, W] = _([]), [de, se] = _([]), [X, he] = _([]), [ue, D] = _({
321
+ header: "",
322
+ titleSelect: "",
323
+ selectPlaceholder: "",
324
+ changeTitle: "",
325
+ changePlaceholder: ""
326
+ }), [$, y] = _(""), [N, M] = _(""), [L, Z] = _(!1), [H, ee] = _(0), [K, me] = _([]), [ne, pe] = _(""), [ge, le] = _(!1), [ce, oe] = _(!1), [V, ie] = _(dt), q = (m) => {
327
+ ie({
328
+ ...V,
329
+ ...m
330
+ });
331
+ }, fe = (m) => {
332
+ if (m && m.length === 0) {
333
+ n(
334
+ I({
335
+ type: "danger",
336
+ message: "Please select students!"
337
+ })
338
+ );
339
+ return;
340
+ }
341
+ oe(!ce), U({ ...Fe }), ie({ ...dt });
342
+ }, ye = () => {
343
+ le(!ge), pe("");
344
+ }, we = (m) => {
345
+ K.includes(m) ? me(K.filter((p) => p !== m)) : me([...K, m]);
346
+ }, Ue = (m) => {
347
+ ee((p) => p === m ? -1 : m);
348
+ }, Ae = (m) => {
349
+ if (m && m.length === 0) {
350
+ n(
351
+ I({
352
+ type: "danger",
353
+ message: "Please select students!"
354
+ })
355
+ );
356
+ return;
357
+ }
358
+ T(!i), U({ ...Fe });
359
+ }, je = (m, p, f) => {
360
+ if (m && m.length === 0) {
361
+ n(
362
+ I({
363
+ type: "danger",
364
+ message: "Please select students!"
365
+ })
366
+ );
367
+ return;
368
+ }
369
+ switch (he(m), se(pa(m, p)), R(p), p) {
370
+ case B.Teacher:
371
+ D({
372
+ header: "switch_teacher",
373
+ titleSelect: "current_teacher_name",
374
+ selectPlaceholder: "select_teacher",
375
+ changeTitle: "select_teacher_change",
376
+ changePlaceholder: "select_teacher_change"
377
+ });
378
+ break;
379
+ case B.Assistant:
380
+ D({
381
+ header: "switch_assistant",
382
+ titleSelect: "current_assistant_name",
383
+ selectPlaceholder: "",
384
+ changeTitle: "",
385
+ changePlaceholder: "select_assistant_change"
386
+ });
387
+ break;
388
+ case B.Counselor:
389
+ D({
390
+ header: "switch_counselor",
391
+ titleSelect: "current_counselor_name",
392
+ selectPlaceholder: "select_counselor",
393
+ changeTitle: "select_counselor_change",
394
+ changePlaceholder: "select_counselor_change"
395
+ });
396
+ break;
397
+ case B.SecondaryTeacher:
398
+ D({
399
+ header: "switch_support_teacher",
400
+ titleSelect: "current_assistant_name",
401
+ selectPlaceholder: "",
402
+ changeTitle: "",
403
+ changePlaceholder: "select_support_teacher_change"
404
+ });
405
+ break;
406
+ }
407
+ h(!C), W(f);
408
+ }, Te = () => {
409
+ W([]), h(!1), Z(!1), R(B.Teacher), se([]), y(""), M(""), D({
410
+ header: "",
411
+ titleSelect: "",
412
+ selectPlaceholder: "",
413
+ changeTitle: "",
414
+ changePlaceholder: ""
415
+ }), me([]);
416
+ }, ze = () => {
417
+ Z(!1), ee(0), me([]);
418
+ }, Ve = async (m, p) => {
419
+ n(
420
+ nt({
421
+ isOpen: !0,
422
+ type: "warning",
423
+ message: `Do you want to change ${p === B.Teacher ? "teacher" : p === B.Assistant ? "assistant" : p === B.SecondaryTeacher ? "support teacher" : "counselor"} for ${m.length} student(s)?`,
424
+ onConfirm: async () => {
425
+ n(F(!0));
426
+ try {
427
+ const f = p === B.Teacher ? await ta(m) : p === B.Assistant ? await aa(m) : p === B.Counselor ? await sa(m) : await na(m);
428
+ f && f?.data && (Te(), a?.(), await S(), n(
429
+ I({
430
+ type: "success",
431
+ message: `Change ${p === B.Teacher ? "teacher" : p === B.Assistant ? "assistant" : p === B.SecondaryTeacher ? "support teacher" : "counselor"} successfully`
432
+ })
433
+ ));
434
+ } catch (f) {
435
+ n(
436
+ I({
437
+ type: "danger",
438
+ message: f.response?.data?.title || f.message
439
+ })
440
+ );
441
+ }
442
+ n(F(!1));
443
+ }
444
+ })
445
+ );
446
+ }, qe = () => {
447
+ let m = [];
448
+ switch (b) {
449
+ case B.Teacher:
450
+ m = X.filter((p) => {
451
+ const f = p.teachers.map((O) => O.teacherUserId);
452
+ return f.includes(N) && !f.includes($);
453
+ }).map((p) => ({
454
+ studentId: p.studentId,
455
+ teacher: N,
456
+ teacherChange: $
457
+ }));
458
+ break;
459
+ case B.Counselor:
460
+ m = X.filter((p) => {
461
+ const f = p.counselors.map((O) => O.counselorUserId);
462
+ return f.includes(N) && !f.includes($);
463
+ }).map((p) => ({
464
+ studentId: p.studentId,
465
+ counselor: N,
466
+ counselorChange: $
467
+ }));
468
+ break;
469
+ case B.Assistant:
470
+ m = X.filter((p) => p?.assistantUserId && p?.teachers?.length > 0).map((p) => ({
471
+ studentId: p.studentId,
472
+ assistantUserId: $
473
+ }));
474
+ break;
475
+ case B.SecondaryTeacher:
476
+ m = X.filter((p) => p?.secondaryTeacherUserId && p?.teachers?.length > 0).map((p) => ({
477
+ studentId: p.studentId,
478
+ secondaryTeacherId: $
479
+ }));
480
+ break;
481
+ }
482
+ if (m.length === 0) {
483
+ n(
484
+ I({
485
+ type: "danger",
486
+ message: "No change to update!"
487
+ })
488
+ );
489
+ return;
490
+ }
491
+ Ve(m || [], b);
492
+ }, We = (m) => {
493
+ if (m && m.length === 0) {
494
+ n(
495
+ I({
496
+ type: "danger",
497
+ message: "Please select student(s)!"
498
+ })
499
+ );
500
+ return;
501
+ }
502
+ A(!E);
503
+ }, Ge = (m, p) => {
504
+ switch (m) {
505
+ case "assistant":
506
+ U({
507
+ ...o,
508
+ assistantId: p.value,
509
+ assistantEmail: p.label
510
+ });
511
+ break;
512
+ case "secondary":
513
+ U({
514
+ ...o,
515
+ secondaryTeacherId: p.value,
516
+ secondaryTeacherEmail: p.label
517
+ });
518
+ break;
519
+ case "grade":
520
+ U({
521
+ ...o,
522
+ gradeLevel: p.value
523
+ });
524
+ break;
525
+ }
526
+ }, He = (m) => {
527
+ U({
528
+ ...o,
529
+ teacher: m
530
+ });
531
+ }, Ke = (m) => {
532
+ U({
533
+ ...o,
534
+ counselors: m
535
+ });
536
+ }, $e = async (m) => {
537
+ n(F(!0));
538
+ try {
539
+ await Me(m), n(
540
+ I({
541
+ type: "success",
542
+ message: "Student assigned successfully"
543
+ })
544
+ ), a?.(), Te();
545
+ } catch (p) {
546
+ n(
547
+ I({
548
+ type: "danger",
549
+ message: p.response?.data?.title || p.message
550
+ })
551
+ );
552
+ }
553
+ n(F(!1));
554
+ }, Qe = G((m) => {
555
+ if (m.length === 0) {
556
+ n(
557
+ I({
558
+ type: "danger",
559
+ message: "Not found selected student."
560
+ })
561
+ );
562
+ return;
563
+ }
564
+ if (m.some((O) => {
565
+ const w = s?.[O], t = l?.[O], v = c?.[O], k = r?.[O];
566
+ return !w && !t && !v && !k;
567
+ })) {
568
+ n(
569
+ I({
570
+ type: "danger",
571
+ message: "Please select/add teacher for all selected student first."
572
+ })
573
+ );
574
+ return;
575
+ }
576
+ const f = m.map((O) => {
577
+ const w = s?.[O], t = l?.[O], v = c?.[O], k = r?.[O], P = {
578
+ id: O
579
+ };
580
+ return w && (P.mainTeacherUserId = w ? w.map((ve) => ve.value) : void 0, P.mainTeacherEmail = w ? w.map((ve) => ve.label) : void 0), t && (P.assistantUserId = t?.value && typeof t?.value == "string" ? t?.value : void 0, P.assistantEmail = t?.value && typeof t?.value == "number" ? t?.label : void 0), v && (P.counselorUserIds = v ? v.map((ve) => ve.value) : void 0, P.counselorEmails = v ? v.map((ve) => ve.label) : void 0), k && (P.secondaryTeacherUserId = k?.value && typeof k?.value == "string" ? k?.value : void 0, P.secondaryTeacherEmail = k?.value && typeof k?.value == "number" ? k?.label : void 0), P;
581
+ });
582
+ $e([...f]);
583
+ }, [JSON.stringify(s), JSON.stringify(l), JSON.stringify(c), JSON.stringify(r)]), Xe = G((m) => {
584
+ const p = s?.[m], f = l?.[m], O = c?.[m], w = r?.[m];
585
+ if (!p && !f && !O && !w) {
586
+ n(
587
+ I({
588
+ type: "danger",
589
+ message: "Please select/add teacher for selected student first."
590
+ })
591
+ );
592
+ return;
593
+ }
594
+ const t = {
595
+ id: m
596
+ };
597
+ p && (t.mainTeacherUserId = p ? p.map((v) => v.value) : void 0, t.mainTeacherEmail = p ? p.map((v) => v.label) : void 0), f && (t.assistantUserId = f?.value && typeof f?.value == "string" ? f?.value : void 0, t.assistantEmail = f?.value && typeof f?.value == "number" ? f?.label : void 0), O && (t.counselorUserIds = O ? O.map((v) => v.value) : void 0, t.counselorEmails = O ? O.map((v) => v.label) : void 0), w && (t.secondaryTeacherUserId = w?.value && typeof w?.value == "string" ? w?.value : void 0, t.secondaryTeacherEmail = w?.value && typeof w?.value == "number" ? w?.label : void 0), $e([t]);
598
+ }, [JSON.stringify(s), JSON.stringify(l), JSON.stringify(c), JSON.stringify(r)]), Re = async (m) => {
599
+ if (m.length === 0) {
600
+ n(
601
+ I({
602
+ type: "danger",
603
+ message: "Not found selected student."
604
+ })
605
+ );
606
+ return;
607
+ }
608
+ if (o.teacher.length === 0 && o.counselors.length === 0 && !o.assistantId && !o.secondaryTeacherId) {
609
+ n(
610
+ I({
611
+ type: "danger",
612
+ message: "No change to assign!"
613
+ })
614
+ );
615
+ return;
616
+ }
617
+ const p = g?.filter((f) => m?.includes(f.id))?.every((f) => Array.isArray(f.teachers) && f.teachers.length > 0) ?? !1;
618
+ if (o.teacher.length === 0 && !p) {
619
+ n(
620
+ I({
621
+ type: "danger",
622
+ message: "Please assign a teacher to each student before giving other educators access to them"
623
+ })
624
+ );
625
+ return;
626
+ }
627
+ n(F(!0));
628
+ try {
629
+ if (o.teacher.length > 0 && g && g.length > 0) {
630
+ const w = g.filter((t) => m.includes(t.id)).map((t) => {
631
+ const v = t.teachers?.map((P) => P.teacherUserId) || [], k = o.teacher.filter(
632
+ (P) => !v.includes(P.id)
633
+ );
634
+ return {
635
+ id: t.id,
636
+ mainTeacherUserId: k.map((P) => P.id),
637
+ mainTeacherEmail: k.map((P) => P.email)
638
+ };
639
+ }).filter((t) => t.mainTeacherUserId.length > 0 || t.mainTeacherEmail.length > 0);
640
+ w.length > 0 && await Me(w);
641
+ }
642
+ if (o.counselors.length > 0 && g && g.length > 0) {
643
+ const w = g.filter((t) => m.includes(t.id)).map((t) => {
644
+ const v = t.counselors?.map((P) => P.counselorUserId) || [], k = o.counselors.filter(
645
+ (P) => !v.includes(P.id)
646
+ );
647
+ return {
648
+ id: t.id,
649
+ counselorUserIds: k.map((P) => P.id),
650
+ counselorEmails: k.map((P) => P.email)
651
+ };
652
+ }).filter((t) => t.counselorUserIds.length > 0 || t.counselorEmails.length > 0);
653
+ w.length > 0 && await Me(w);
654
+ }
655
+ const f = g?.filter((w) => !w.assistantUserId);
656
+ if (f && f?.length > 0 && o.assistantId) {
657
+ const w = f.map((t) => ({
658
+ id: t.id,
659
+ assistantUserId: o.assistantId,
660
+ assistantEmail: o.assistantEmail
661
+ }));
662
+ await Me(w.filter((t) => t !== void 0));
663
+ }
664
+ const O = g?.filter((w) => !w.secondaryTeacherUserId);
665
+ if (O && O?.length > 0 && o.secondaryTeacherId) {
666
+ const w = O.map((t) => ({
667
+ id: t.id,
668
+ secondaryTeacherUserId: o.secondaryTeacherId,
669
+ secondaryTeacherEmail: o.secondaryTeacherEmail
670
+ }));
671
+ await Me(w.filter((t) => t !== void 0));
672
+ }
673
+ n(
674
+ I({
675
+ type: "success",
676
+ message: "Student assigned successfully"
677
+ })
678
+ ), a?.(), Te(), Ae();
679
+ } catch (f) {
680
+ n(
681
+ I({
682
+ type: "danger",
683
+ message: f.response?.data?.title || f.message
684
+ })
685
+ );
686
+ }
687
+ n(F(!1));
688
+ }, Ye = async (m) => {
689
+ if (o.teacher.length === 0) {
690
+ n(
691
+ I({
692
+ type: "danger",
693
+ message: "Please select teacher before assign!"
694
+ })
695
+ );
696
+ return;
697
+ }
698
+ if (K.length > 0 && !m) {
699
+ le(!0);
700
+ return;
701
+ }
702
+ const p = {
703
+ id: d?.id || "",
704
+ mainTeacherUserId: o.teacher.filter((f) => !d?.teachers?.some((O) => O.teacherUserId === f.id)).map((f) => f.id) || [],
705
+ mainTeacherEmail: o.teacher.filter((f) => !d?.teachers?.some((O) => O.teacherUserId === f.id)).map((f) => f.email) || [],
706
+ assistantUserId: o?.assistantId ? o?.assistantId : void 0,
707
+ assistantEmail: o?.assistantEmail ? o?.assistantEmail : void 0,
708
+ counselorUserIds: o.counselors.map((f) => f.id) || [],
709
+ counselorEmails: o.counselors.map((f) => f.email) || [],
710
+ secondaryTeacherUserId: o?.secondaryTeacherId ? o?.secondaryTeacherId : void 0,
711
+ secondaryTeacherEmail: o?.secondaryTeacherEmail ? o?.secondaryTeacherEmail : void 0,
712
+ removeTeacherUserIds: K,
713
+ teacherSwitchUserId: m || ""
714
+ };
715
+ o?.gradeLevel && o.gradeLevel !== d?.gradeLevel && await Zt(d?.id || "", o?.gradeLevel), $e([p]);
716
+ }, Ze = async (m, p) => {
717
+ n(F(!0));
718
+ try {
719
+ (await ea(m)).status == 200 && (n(
720
+ I({
721
+ type: "success",
722
+ message: `Inactive ${m.length} Students successfully`
723
+ })
724
+ ), p());
725
+ } catch (f) {
726
+ n(
727
+ I({
728
+ type: "danger",
729
+ message: f.response?.data?.title || f.message
730
+ })
731
+ );
732
+ }
733
+ A(!E), n(F(!1));
734
+ }, et = G(async (m) => {
735
+ if (V.assistantRemoveUserId.length && !V.assistantSwitchDataUserId) {
736
+ n(
737
+ I({
738
+ type: "danger",
739
+ message: "Please select an assistant to transfer data!"
740
+ })
741
+ );
742
+ return;
743
+ }
744
+ if (V.teacherRemoveUserIds.length && !V.teacherSwitchDataUserId) {
745
+ n(
746
+ I({
747
+ type: "danger",
748
+ message: "Please select a teacher to transfer data!"
749
+ })
750
+ );
751
+ return;
752
+ }
753
+ if (V.counselorRemoveUserIds.length && !V.counselorSwitchDataUserId) {
754
+ n(
755
+ I({
756
+ type: "danger",
757
+ message: "Please select a counselor to transfer data!"
758
+ })
759
+ );
760
+ return;
761
+ }
762
+ if (V.supportTeacherRemoveUserIds.length && !V.supportTeacherSwitchDataUserId) {
763
+ n(
764
+ I({
765
+ type: "danger",
766
+ message: "Please select a support teacher to transfer data!"
767
+ })
768
+ );
769
+ return;
770
+ }
771
+ n(F(!0));
772
+ try {
773
+ await Yt({ ...V, studentUserIds: m || [] }), a?.(), await S();
774
+ } catch (p) {
775
+ n(
776
+ I({
777
+ type: "danger",
778
+ message: p.response?.data?.title || p.message
779
+ })
780
+ );
781
+ }
782
+ fe(), n(F(!1));
783
+ }, [V]);
784
+ return te(() => (d?.id && U({
785
+ teacher: d?.teachers?.map((m) => ({
786
+ id: m.teacherUserId,
787
+ email: m.mainTeacherEmail
788
+ })),
789
+ assistantId: d?.assistantUserId,
790
+ assistantEmail: d?.assistantEmail,
791
+ counselors: d?.counselors?.map((m) => ({
792
+ id: m.counselorUserId,
793
+ email: m.counselorEmail
794
+ })),
795
+ secondaryTeacherEmail: d?.secondaryTeacherEmail,
796
+ secondaryTeacherId: d?.secondaryTeacherUserId,
797
+ gradeLevel: d?.gradeLevel
798
+ }), () => {
799
+ U(Fe);
800
+ }), [d]), {
801
+ handleAssignSingleStudent: Xe,
802
+ handleAssignMultiStudent: Qe,
803
+ openModelBulk: i,
804
+ handleToggleModel: Ae,
805
+ handleChangeStaffBulk: Ge,
806
+ staffBulkAssign: o,
807
+ onAssignStaffToStudents: Re,
808
+ handleToggleInactiveModal: We,
809
+ openInactiveModal: E,
810
+ handleInactiveStudents: Ze,
811
+ handleChangeTeacherBulk: He,
812
+ handleEditAssignForStudents: Ye,
813
+ handleToggleSwitchModel: je,
814
+ openSwitchModal: C,
815
+ optionsSwitch: z,
816
+ modalType: b,
817
+ textModal: ue,
818
+ teacherSwitchList: de,
819
+ onCloseSwitchModal: Te,
820
+ handleUpdateSwitch: qe,
821
+ setTeacherChangeUserId: y,
822
+ setTeacherSelectForChangeUserId: M,
823
+ teacherSelectForChangeUserId: N,
824
+ openDetailModal: L,
825
+ setOpenDetailModal: Z,
826
+ toggleCollapse: Ue,
827
+ activeIndex: H,
828
+ handleChangeCounselorBulk: Ke,
829
+ onClose: ze,
830
+ removeTeacherUserIds: K,
831
+ onSelectRemoveTeacher: we,
832
+ openModelSwitchDataTeacher: ge,
833
+ onToggleModelSwitchDataTeacher: ye,
834
+ teacherSwitchUserId: ne,
835
+ setTeacherSwitchUserId: pe,
836
+ onToggleModelDeleteBulk: fe,
837
+ openModelDeleteBulk: ce,
838
+ handelChangeStaffRemove: q,
839
+ switchStaffUsers: V,
840
+ handleRemoveBulkStaff: et
841
+ };
842
+ };
843
+ function fa(s) {
844
+ return St({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M228.9 79.9L51.8 403.1C40.6 423.3 55.5 448 78.9 448h354.3c23.3 0 38.2-24.7 27.1-44.9L283.1 79.9c-11.7-21.2-42.5-21.2-54.2 0zM273.6 214L270 336h-28l-3.6-122h35.2zM256 402.4c-10.7 0-19.1-8.1-19.1-18.4s8.4-18.4 19.1-18.4 19.1 8.1 19.1 18.4-8.4 18.4-19.1 18.4z" } }] })(s);
845
+ }
846
+ const va = (s) => {
847
+ const {
848
+ textModal: l,
849
+ isOpen: c,
850
+ teachers: r,
851
+ options: a,
852
+ onClose: d,
853
+ onSave: S,
854
+ modalType: g,
855
+ setTeacherChangeUserId: n,
856
+ setTeacherSelectForChangeUserId: i,
857
+ teacherSelectForChangeUserId: T
858
+ } = s, { t: o } = Y();
859
+ return /* @__PURE__ */ u(
860
+ Ce,
861
+ {
862
+ centered: !0,
863
+ isOpen: c,
864
+ toggle: d,
865
+ zIndex: 1201,
866
+ children: [
867
+ /* @__PURE__ */ e(Se, { className: x["header-assign-for-student"], children: o(l.header) }),
868
+ /* @__PURE__ */ u(be, { children: [
869
+ g !== B.Assistant || g !== B.SecondaryTeacher && /* @__PURE__ */ u(Je, { children: [
870
+ /* @__PURE__ */ e("div", { children: o(l.titleSelect) }),
871
+ /* @__PURE__ */ e("ul", { style: { maxHeight: 200, overflow: "auto" }, children: r.map((U) => /* @__PURE__ */ u("li", { children: [
872
+ U.name,
873
+ "-",
874
+ U.label
875
+ ] }, U.label)) })
876
+ ] }),
877
+ (g === B.Teacher || g === B.Counselor) && /* @__PURE__ */ u(Je, { children: [
878
+ /* @__PURE__ */ e("div", { children: o(l.selectPlaceholder) }),
879
+ /* @__PURE__ */ e(
880
+ Q,
881
+ {
882
+ options: r,
883
+ value: r.filter((U) => U.value === T),
884
+ placeholder: o(l.selectPlaceholder),
885
+ className: `flex-grow-1 mb-3 ${x["custom-chip-teacher-select"]}`,
886
+ onChange: (U) => {
887
+ i(U.value);
888
+ },
889
+ isClearable: !0,
890
+ style: { maxWidth: 120 }
891
+ }
892
+ )
893
+ ] }),
894
+ /* @__PURE__ */ e("div", { children: o(l.changeTitle) }),
895
+ /* @__PURE__ */ e(
896
+ Oe,
897
+ {
898
+ options: a,
899
+ onChange: (U) => {
900
+ g !== B.SecondaryTeacher ? n(U.value) : n(U.id);
901
+ },
902
+ placeholder: o(l.changePlaceholder),
903
+ className: "flex-grow-1 mb-3"
904
+ }
905
+ )
906
+ ] }),
907
+ /* @__PURE__ */ u(Ne, { className: "textModal-right", children: [
908
+ /* @__PURE__ */ e(J, { onClick: () => d(!1), children: o("cancel") }),
909
+ /* @__PURE__ */ e(J, { color: "primary", onClick: () => {
910
+ S();
911
+ }, children: o("save") })
912
+ ] })
913
+ ]
914
+ }
915
+ );
916
+ }, ya = yt(va), Ta = ({
917
+ openDetailModal: s,
918
+ onClose: l,
919
+ selectedUser: c,
920
+ staffBulkAssign: r,
921
+ teacherOptions: a,
922
+ handleChangeTeacherBulk: d,
923
+ handleChangeCounselorBulk: S,
924
+ assistantOptions: g,
925
+ counselorOptions: n,
926
+ secondaryTeacherOptions: i,
927
+ handleChangeStaffBulk: T,
928
+ handleEditAssignForStudents: o,
929
+ toggleCollapse: U,
930
+ activeIndex: E
931
+ }) => {
932
+ const { t: A } = Y(), C = [
933
+ c?.teachers || [],
934
+ c?.counselors || []
935
+ ];
936
+ return /* @__PURE__ */ u(
937
+ Ce,
938
+ {
939
+ centered: !0,
940
+ isOpen: s,
941
+ toggle: () => l(),
942
+ zIndex: 1201,
943
+ children: [
944
+ /* @__PURE__ */ u(Se, { className: x["header-assign-for-student"], children: [
945
+ /* @__PURE__ */ u("div", { children: [
946
+ "Assign student ",
947
+ c?.fullName
948
+ ] }),
949
+ /* @__PURE__ */ u("div", { children: [
950
+ "Grade ",
951
+ c?.gradeLevel
952
+ ] })
953
+ ] }),
954
+ /* @__PURE__ */ u(be, { children: [
955
+ C.map((h, b) => /* @__PURE__ */ u("div", { children: [
956
+ /* @__PURE__ */ u(
957
+ "button",
958
+ {
959
+ type: "button",
960
+ className: `btn ${x["btn-collapse"]} ${E === b ? "btn-link " : ""}`,
961
+ onClick: () => U(b),
962
+ children: [
963
+ A(b === 0 ? "current_teacher_name" : "current_counselor_name"),
964
+ " ",
965
+ `(${h.length})`,
966
+ " ",
967
+ /* @__PURE__ */ e("i", { className: `fa fa-angle-${E === b ? "up" : "down"}` })
968
+ ]
969
+ }
970
+ ),
971
+ /* @__PURE__ */ e(At, { isOpen: E === b, children: /* @__PURE__ */ e(Rt, { children: /* @__PURE__ */ e(Lt, { children: h.length > 0 ? h.map((R) => b === 0 ? /* @__PURE__ */ u("li", { children: [
972
+ R.mainTeacherName,
973
+ " - ",
974
+ R.mainTeacherEmail
975
+ ] }, R.mainTeacherEmail) : /* @__PURE__ */ u("li", { children: [
976
+ R.counselorName,
977
+ " - ",
978
+ R.counselorEmail
979
+ ] }, R.counselorUserId)) : /* @__PURE__ */ e("div", { children: A("no_data") }) }) }) })
980
+ ] }, b)),
981
+ /* @__PURE__ */ e("div", { children: A("teacher_email") }),
982
+ /* @__PURE__ */ e(
983
+ Q,
984
+ {
985
+ isMulti: !0,
986
+ value: r.teacher.filter((h) => !c.teachers?.some((b) => b.teacherUserId === h.id)).map((h) => ({ label: h.email, value: h.id })),
987
+ options: a.filter((h) => !c.teachers?.some((b) => b.teacherUserId === h.value)),
988
+ placeholder: A("select_teacher"),
989
+ className: `flex-grow-1 mb-3 ${x["custom-chip-teacher-select"]}`,
990
+ onChange: (h) => {
991
+ const b = h.map((R) => ({
992
+ id: R.value,
993
+ email: R.label
994
+ }));
995
+ d(b);
996
+ },
997
+ isClearable: !0,
998
+ style: { maxWidth: 120 }
999
+ }
1000
+ ),
1001
+ /* @__PURE__ */ e("div", { children: A("assistant_email") }),
1002
+ /* @__PURE__ */ e(
1003
+ Oe,
1004
+ {
1005
+ value: g.find((h) => h.value == r.assistantId || h.label == r.assistantEmail) || null,
1006
+ options: g,
1007
+ onChange: (h) => {
1008
+ T("assistant", h);
1009
+ },
1010
+ placeholder: A("select_assistant"),
1011
+ className: "flex-grow-1 mb-3"
1012
+ }
1013
+ ),
1014
+ /* @__PURE__ */ e("div", { children: A("counselor_email") }),
1015
+ /* @__PURE__ */ e(
1016
+ Q,
1017
+ {
1018
+ isMulti: !0,
1019
+ value: r.counselors.filter((h) => !c.counselors?.some((b) => b.counselorUserId === h.id)).map((h) => ({ label: h.email, value: h.id })),
1020
+ options: n.filter((h) => !c.counselors?.some((b) => b.counselorUserId === h.value)),
1021
+ placeholder: A("select_counselor"),
1022
+ className: `flex-grow-1 mb-3 ${x["custom-chip-teacher-select"]}`,
1023
+ onChange: (h) => {
1024
+ const b = h.map((R) => ({
1025
+ id: R.value,
1026
+ email: R.label
1027
+ }));
1028
+ S(b);
1029
+ },
1030
+ isClearable: !0,
1031
+ style: { maxWidth: 120 }
1032
+ }
1033
+ ),
1034
+ /* @__PURE__ */ e("div", { children: A("support_teacher_email") }),
1035
+ /* @__PURE__ */ e(
1036
+ Oe,
1037
+ {
1038
+ value: i.find((h) => h.value == r.secondaryTeacherId || h.label == r.secondaryTeacherEmail) || null,
1039
+ options: i,
1040
+ onChange: (h) => {
1041
+ T("secondary", h);
1042
+ },
1043
+ placeholder: A("select_support_teacher"),
1044
+ className: "flex-grow-1"
1045
+ }
1046
+ ),
1047
+ /* @__PURE__ */ e("div", { children: A("grade") }),
1048
+ /* @__PURE__ */ e(
1049
+ la,
1050
+ {
1051
+ value: ht.find((h) => h.value === r.gradeLevel),
1052
+ options: ht,
1053
+ placeholder: A("select_grade"),
1054
+ className: "flex-grow-1 mb-3",
1055
+ onChange: (h) => {
1056
+ T("grade", h);
1057
+ },
1058
+ styles: {
1059
+ container: (h) => ({ ...h, maxWidth: 120 })
1060
+ }
1061
+ }
1062
+ )
1063
+ ] }),
1064
+ /* @__PURE__ */ u(Ne, { className: "text-right", children: [
1065
+ /* @__PURE__ */ e(J, { onClick: () => l(), children: A("cancel") }),
1066
+ /* @__PURE__ */ e(J, { color: "primary", onClick: () => {
1067
+ o();
1068
+ }, children: A("save") })
1069
+ ] })
1070
+ ]
1071
+ }
1072
+ );
1073
+ }, _a = ({
1074
+ open: s,
1075
+ onClose: l,
1076
+ teachers: c,
1077
+ onConfirm: r,
1078
+ teacherSwitchUserId: a,
1079
+ setTeacherSwitchUserId: d
1080
+ }) => {
1081
+ const { t: S } = Y();
1082
+ return /* @__PURE__ */ u(Ce, { centered: !0, isOpen: s, toggle: () => l(), zIndex: 1201, children: [
1083
+ /* @__PURE__ */ e(Se, { className: x["header-assign-for-student"], children: /* @__PURE__ */ e("div", { children: "Select teacher switch data" }) }),
1084
+ /* @__PURE__ */ e(be, { className: "p-0", children: /* @__PURE__ */ e("div", { className: x["switch-data-teachers"], children: c.map((g) => /* @__PURE__ */ e(
1085
+ "p",
1086
+ {
1087
+ onClick: () => d(g.teacherUserId),
1088
+ className: `${x["switch-data-teacher-item"]} ${g.teacherUserId == a ? x["item-checked"] : ""}`,
1089
+ children: g.mainTeacherName
1090
+ }
1091
+ )) }) }),
1092
+ /* @__PURE__ */ u(Ne, { className: "text-right", children: [
1093
+ /* @__PURE__ */ e(J, { onClick: () => l(), children: S("cancel") }),
1094
+ /* @__PURE__ */ e(
1095
+ J,
1096
+ {
1097
+ disabled: !a,
1098
+ color: "primary",
1099
+ onClick: async () => {
1100
+ await r(a), l();
1101
+ },
1102
+ children: S("save")
1103
+ }
1104
+ )
1105
+ ] })
1106
+ ] });
1107
+ }, Ia = ({
1108
+ teachers: s,
1109
+ onChangeStaffRemove: l,
1110
+ switchStaffUsers: c
1111
+ }) => {
1112
+ const { t: r } = Y();
1113
+ return /* @__PURE__ */ u("div", { children: [
1114
+ /* @__PURE__ */ e("h6", { children: "Select teacher to remove" }),
1115
+ /* @__PURE__ */ e(
1116
+ Q,
1117
+ {
1118
+ isMulti: !0,
1119
+ value: s.filter(
1120
+ (a) => c.teacherRemoveUserIds.includes(a.value)
1121
+ ) || [],
1122
+ options: s.filter(
1123
+ (a) => !c.teacherRemoveUserIds.includes(
1124
+ a.value
1125
+ ) && a.value !== c.teacherSwitchDataUserId
1126
+ ) || [],
1127
+ placeholder: r("select_teacher"),
1128
+ className: `flex-grow-1 mb-3 ${x["custom-chip-teacher-select"]}`,
1129
+ onChange: (a) => {
1130
+ l({
1131
+ teacherRemoveUserIds: a.map((d) => d.value)
1132
+ });
1133
+ },
1134
+ isClearable: !0
1135
+ }
1136
+ ),
1137
+ /* @__PURE__ */ e("h6", { className: "mt-3", children: "Select the teacher to transfer data to" }),
1138
+ /* @__PURE__ */ e(
1139
+ Q,
1140
+ {
1141
+ value: s.find(
1142
+ (a) => c.teacherSwitchDataUserId == a.value
1143
+ ) || null,
1144
+ options: s.filter(
1145
+ (a) => !c.teacherRemoveUserIds.includes(
1146
+ a.value
1147
+ ) && a.value !== c.teacherSwitchDataUserId
1148
+ ) || [],
1149
+ placeholder: r("select_teacher"),
1150
+ className: `flex-grow-1 mb-3 ${x["custom-chip-teacher-select"]}`,
1151
+ onChange: (a) => {
1152
+ console.log("value", a), l({
1153
+ teacherSwitchDataUserId: a?.value
1154
+ });
1155
+ },
1156
+ isClearable: !0
1157
+ }
1158
+ )
1159
+ ] });
1160
+ }, Ca = ({
1161
+ counselors: s,
1162
+ onChangeStaffRemove: l,
1163
+ switchStaffUsers: c
1164
+ }) => {
1165
+ const { t: r } = Y();
1166
+ return /* @__PURE__ */ u("div", { children: [
1167
+ /* @__PURE__ */ e("h6", { children: "Select counselor to remove" }),
1168
+ /* @__PURE__ */ e(
1169
+ Q,
1170
+ {
1171
+ isMulti: !0,
1172
+ value: s.filter(
1173
+ (a) => c.counselorRemoveUserIds.includes(a.value)
1174
+ ) || [],
1175
+ options: s.filter(
1176
+ (a) => !c.counselorRemoveUserIds.includes(
1177
+ a.value
1178
+ ) && a.value !== c.counselorSwitchDataUserId
1179
+ ) || [],
1180
+ placeholder: r("select_counselor"),
1181
+ className: `flex-grow-1 mb-3 ${x["custom-chip-teacher-select"]}`,
1182
+ onChange: (a) => {
1183
+ l({
1184
+ counselorRemoveUserIds: a.map((d) => d.value)
1185
+ });
1186
+ },
1187
+ isClearable: !0
1188
+ }
1189
+ ),
1190
+ /* @__PURE__ */ e("h6", { className: "mt-3", children: "Select the counselor to transfer data to" }),
1191
+ /* @__PURE__ */ e(
1192
+ Q,
1193
+ {
1194
+ value: s.find(
1195
+ (a) => c.counselorSwitchDataUserId == a.value
1196
+ ) || null,
1197
+ options: s.filter(
1198
+ (a) => !c.counselorRemoveUserIds.includes(
1199
+ a.value
1200
+ ) && a.value !== c.counselorSwitchDataUserId
1201
+ ) || [],
1202
+ placeholder: r("select_counselor"),
1203
+ className: `flex-grow-1 mb-3 ${x["custom-chip-counselor-select"]}`,
1204
+ onChange: (a) => {
1205
+ l({
1206
+ counselorSwitchDataUserId: a?.value
1207
+ });
1208
+ },
1209
+ isClearable: !0
1210
+ }
1211
+ )
1212
+ ] });
1213
+ }, Sa = ({ tabs: s }) => {
1214
+ const { t: l } = Y(), [c, r] = _(0), a = (S) => {
1215
+ r(S);
1216
+ };
1217
+ return /* @__PURE__ */ e("div", { className: "animated fadeIn", children: /* @__PURE__ */ e(ae, { children: /* @__PURE__ */ u(j, { xl: 12, children: [
1218
+ /* @__PURE__ */ e(Bt, { tabs: !0, children: s.map((S, g) => {
1219
+ const n = g === c;
1220
+ return /* @__PURE__ */ e(Ft, { children: /* @__PURE__ */ e(
1221
+ Pt,
1222
+ {
1223
+ className: `${n ? "active" : ""} cursor-pointer`,
1224
+ onClick: () => a(g),
1225
+ style: {
1226
+ color: n ? "#316CD9" : "#242424"
1227
+ },
1228
+ children: l(S.title)
1229
+ }
1230
+ ) }, g);
1231
+ }) }),
1232
+ /* @__PURE__ */ e(
1233
+ Jt,
1234
+ {
1235
+ activeTab: c,
1236
+ className: "border-bottom-0 border-left-0 border-right-0 p-3",
1237
+ children: s.map((S, g) => /* @__PURE__ */ e(jt, { tabId: g, children: /* @__PURE__ */ e(S.component, {}) }, g))
1238
+ }
1239
+ )
1240
+ ] }) }) });
1241
+ }, ba = ({
1242
+ assistants: s,
1243
+ onChangeStaffRemove: l,
1244
+ switchStaffUsers: c
1245
+ }) => {
1246
+ const { t: r } = Y();
1247
+ return /* @__PURE__ */ u("div", { children: [
1248
+ /* @__PURE__ */ e("h6", { children: "Select assistant to remove" }),
1249
+ /* @__PURE__ */ e(
1250
+ Q,
1251
+ {
1252
+ isMulti: !0,
1253
+ value: s.filter(
1254
+ (a) => c.assistantRemoveUserId.includes(a.value)
1255
+ ) || [],
1256
+ options: s.filter(
1257
+ (a) => !c.assistantRemoveUserId.includes(
1258
+ a.value
1259
+ ) && a.value !== c.assistantSwitchDataUserId
1260
+ ) || [],
1261
+ placeholder: r("select_assistant"),
1262
+ className: `flex-grow-1 mb-3 ${x["custom-chip-teacher-select"]}`,
1263
+ onChange: (a) => {
1264
+ l({
1265
+ assistantRemoveUserId: a.map((d) => d.value)
1266
+ });
1267
+ },
1268
+ isClearable: !0
1269
+ }
1270
+ ),
1271
+ /* @__PURE__ */ e("h6", { className: "mt-3", children: "Select the assistant to transfer data to" }),
1272
+ /* @__PURE__ */ e(
1273
+ Q,
1274
+ {
1275
+ value: s.find(
1276
+ (a) => c.assistantSwitchDataUserId == a.value
1277
+ ) || null,
1278
+ options: s.filter(
1279
+ (a) => !c.assistantRemoveUserId.includes(
1280
+ a.value
1281
+ ) && a.value !== c.assistantSwitchDataUserId
1282
+ ) || [],
1283
+ placeholder: r("select_assistant"),
1284
+ className: `flex-grow-1 mb-3 ${x["custom-chip-assistant-select"]}`,
1285
+ onChange: (a) => {
1286
+ console.log("value", a), l({
1287
+ assistantSwitchDataUserId: a?.value
1288
+ });
1289
+ },
1290
+ isClearable: !0
1291
+ }
1292
+ )
1293
+ ] });
1294
+ }, Na = ({
1295
+ secondaryTeachers: s,
1296
+ onChangeStaffRemove: l,
1297
+ switchStaffUsers: c
1298
+ }) => {
1299
+ const { t: r } = Y();
1300
+ return /* @__PURE__ */ u("div", { children: [
1301
+ /* @__PURE__ */ e("h6", { children: "Select support teacher to remove" }),
1302
+ /* @__PURE__ */ e(
1303
+ Q,
1304
+ {
1305
+ isMulti: !0,
1306
+ value: s.filter(
1307
+ (a) => c.supportTeacherRemoveUserIds.includes(a.value)
1308
+ ) || [],
1309
+ options: s.filter(
1310
+ (a) => !c.supportTeacherRemoveUserIds.includes(
1311
+ a.value
1312
+ ) && a.value !== c.supportTeacherSwitchDataUserId
1313
+ ) || [],
1314
+ placeholder: r("select_support_teacher"),
1315
+ className: `flex-grow-1 mb-3 ${x["custom-chip-teacher-select"]}`,
1316
+ onChange: (a) => {
1317
+ l({
1318
+ supportTeacherRemoveUserIds: a.map((d) => d.value)
1319
+ });
1320
+ },
1321
+ isClearable: !0
1322
+ }
1323
+ ),
1324
+ /* @__PURE__ */ e("h6", { className: "mt-3", children: "Select the support teacher to transfer data to" }),
1325
+ /* @__PURE__ */ e(
1326
+ Q,
1327
+ {
1328
+ value: s.find(
1329
+ (a) => c.supportTeacherSwitchDataUserId == a.value
1330
+ ) || null,
1331
+ options: s.filter(
1332
+ (a) => !c.supportTeacherRemoveUserIds.includes(
1333
+ a.value
1334
+ ) && a.value !== c.supportTeacherSwitchDataUserId
1335
+ ) || [],
1336
+ placeholder: r("select_support_teacher"),
1337
+ className: `flex-grow-1 mb-3 ${x["custom-chip-teacher-select"]}`,
1338
+ onChange: (a) => {
1339
+ l({
1340
+ supportTeacherSwitchDataUserId: a?.value
1341
+ });
1342
+ },
1343
+ isClearable: !0
1344
+ }
1345
+ )
1346
+ ] });
1347
+ }, wa = ({
1348
+ open: s,
1349
+ onClose: l,
1350
+ teachers: c,
1351
+ onChangeStaffRemove: r,
1352
+ switchStaffUsers: a,
1353
+ assistants: d,
1354
+ onRemoveBulkStaff: S,
1355
+ counselors: g,
1356
+ studentUserIds: n,
1357
+ secondaryTeachers: i
1358
+ }) => {
1359
+ const { t: T } = Y(), o = [
1360
+ {
1361
+ title: "Remove Teacher",
1362
+ component: () => /* @__PURE__ */ e(
1363
+ Ia,
1364
+ {
1365
+ teachers: c,
1366
+ onChangeStaffRemove: r,
1367
+ switchStaffUsers: a
1368
+ }
1369
+ )
1370
+ },
1371
+ {
1372
+ title: "Remove Assistant",
1373
+ component: () => /* @__PURE__ */ e(
1374
+ ba,
1375
+ {
1376
+ assistants: d,
1377
+ onChangeStaffRemove: r,
1378
+ switchStaffUsers: a
1379
+ }
1380
+ )
1381
+ },
1382
+ {
1383
+ title: "Remove Counselor",
1384
+ component: () => /* @__PURE__ */ e(
1385
+ Ca,
1386
+ {
1387
+ counselors: g,
1388
+ onChangeStaffRemove: r,
1389
+ switchStaffUsers: a
1390
+ }
1391
+ )
1392
+ },
1393
+ {
1394
+ title: "Remove Support Teacher",
1395
+ component: () => /* @__PURE__ */ e(
1396
+ Na,
1397
+ {
1398
+ secondaryTeachers: i,
1399
+ onChangeStaffRemove: r,
1400
+ switchStaffUsers: a
1401
+ }
1402
+ )
1403
+ }
1404
+ ];
1405
+ return /* @__PURE__ */ u(Ce, { size: "lg", centered: !0, isOpen: s, toggle: () => l(), zIndex: 1201, children: [
1406
+ /* @__PURE__ */ e(
1407
+ Se,
1408
+ {
1409
+ className: `${x["header-assign-for-student"]} border-0`,
1410
+ children: /* @__PURE__ */ e("div", { children: "Remove Bulk" })
1411
+ }
1412
+ ),
1413
+ /* @__PURE__ */ e(be, { className: "p-0", children: /* @__PURE__ */ e(Sa, { tabs: o }) }),
1414
+ /* @__PURE__ */ u(Ne, { className: "text-right", children: [
1415
+ /* @__PURE__ */ e(J, { onClick: () => l(), children: T("cancel") }),
1416
+ /* @__PURE__ */ e(
1417
+ J,
1418
+ {
1419
+ disabled: !a.teacherRemoveUserIds.length && !a.assistantRemoveUserId && !a.counselorRemoveUserIds.length,
1420
+ color: "primary",
1421
+ onClick: async () => {
1422
+ await S(n);
1423
+ },
1424
+ children: "Remove"
1425
+ }
1426
+ )
1427
+ ] })
1428
+ ] });
1429
+ }, Ua = () => {
1430
+ const { t: s } = Y(), {
1431
+ selectedTeachers: l,
1432
+ teacherOptions: c,
1433
+ setSelectedTeachers: r
1434
+ } = ma(), {
1435
+ selectedAssistants: a,
1436
+ assistantOptions: d,
1437
+ setSelectedAssistants: S
1438
+ } = ha(), {
1439
+ selectedCounselors: g,
1440
+ counselorOptions: n,
1441
+ setSelectedCounselors: i
1442
+ } = da(), {
1443
+ selectedSecondaryTeachers: T,
1444
+ secondaryTeacherOptions: o,
1445
+ setSelectedSecondaryTeachers: U
1446
+ } = ua(), {
1447
+ isCheck: E,
1448
+ isCheckAll: A,
1449
+ userList: C,
1450
+ filters: h,
1451
+ totalItem: b,
1452
+ handleClickCheck: R,
1453
+ handleSelectAll: z,
1454
+ changeFilters: W,
1455
+ fullName: de,
1456
+ handleRetrievedData: se,
1457
+ selectedUser: X,
1458
+ setSelectedUser: he,
1459
+ getDataUserList: ue,
1460
+ userSelected: D,
1461
+ studentTeacherSelected: $,
1462
+ studentCounselorSelected: y,
1463
+ studentAssistantSelected: N,
1464
+ studentSecondaryTeacherSelected: M
1465
+ } = ia(), L = () => {
1466
+ se(), r(void 0), S(void 0), i(void 0), U(void 0);
1467
+ }, {
1468
+ openModelBulk: Z,
1469
+ handleToggleModel: H,
1470
+ staffBulkAssign: ee,
1471
+ handleChangeStaffBulk: K,
1472
+ onAssignStaffToStudents: me,
1473
+ handleToggleInactiveModal: ne,
1474
+ openInactiveModal: pe,
1475
+ handleInactiveStudents: ge,
1476
+ handleChangeTeacherBulk: le,
1477
+ handleChangeCounselorBulk: ce,
1478
+ handleEditAssignForStudents: oe,
1479
+ // handleToggleSwitchModel,
1480
+ modalType: V,
1481
+ openSwitchModal: ie,
1482
+ optionsSwitch: q,
1483
+ textModal: fe,
1484
+ teacherSwitchList: ye,
1485
+ onCloseSwitchModal: we,
1486
+ handleUpdateSwitch: Ue,
1487
+ setTeacherChangeUserId: Ae,
1488
+ setTeacherSelectForChangeUserId: je,
1489
+ teacherSelectForChangeUserId: Te,
1490
+ openDetailModal: ze,
1491
+ setOpenDetailModal: Ve,
1492
+ toggleCollapse: qe,
1493
+ activeIndex: We,
1494
+ onClose: Ge,
1495
+ removeTeacherUserIds: He,
1496
+ // onSelectRemoveTeacher,
1497
+ openModelSwitchDataTeacher: Ke,
1498
+ onToggleModelSwitchDataTeacher: $e,
1499
+ teacherSwitchUserId: Qe,
1500
+ setTeacherSwitchUserId: Xe,
1501
+ onToggleModelDeleteBulk: Re,
1502
+ openModelDeleteBulk: Ye,
1503
+ handelChangeStaffRemove: Ze,
1504
+ switchStaffUsers: et,
1505
+ handleRemoveBulkStaff: m
1506
+ } = ga(
1507
+ l,
1508
+ a,
1509
+ g,
1510
+ T,
1511
+ L,
1512
+ X,
1513
+ ue,
1514
+ D
1515
+ ), p = [
1516
+ {
1517
+ name: "",
1518
+ isCenter: !0,
1519
+ onSelectAll: z,
1520
+ isCheckAll: A,
1521
+ className: `align-top ${x["fixed-width-40"]}`
1522
+ },
1523
+ {
1524
+ name: "student_name",
1525
+ isCenter: !0,
1526
+ sortBy: Ie.Name,
1527
+ searchBy: _e.Name,
1528
+ className: `align-top ${x["fixed-width"]}`,
1529
+ getOption: (t) => ({
1530
+ label: t || "empty",
1531
+ value: t
1532
+ })
1533
+ },
1534
+ {
1535
+ name: "grade",
1536
+ isCenter: !0,
1537
+ sortBy: Ie.Grade,
1538
+ searchBy: _e.Grade,
1539
+ className: `align-center justify-center ${x["fixed-width-80"]}`,
1540
+ getOption: (t) => ({
1541
+ label: t || "empty",
1542
+ value: t
1543
+ })
1544
+ },
1545
+ {
1546
+ name: "teacher_emails",
1547
+ isCenter: !0,
1548
+ className: "align-center justify-center",
1549
+ sortBy: Ie.Teacher,
1550
+ searchBy: _e.Teacher,
1551
+ getOption: (t) => ({
1552
+ label: t || "empty",
1553
+ value: t
1554
+ })
1555
+ },
1556
+ {
1557
+ name: "assistant_email",
1558
+ isCenter: !0,
1559
+ className: "align-center justify-center",
1560
+ sortBy: Ie.Assistant,
1561
+ searchBy: _e.Assistant,
1562
+ getOption: (t) => ({
1563
+ label: t || "empty",
1564
+ value: t
1565
+ })
1566
+ },
1567
+ {
1568
+ name: "counselor_emails",
1569
+ isCenter: !0,
1570
+ className: "align-center justify-center",
1571
+ sortBy: Ie.Counselor,
1572
+ searchBy: _e.Counselor,
1573
+ getOption: (t) => ({
1574
+ label: t || "empty",
1575
+ value: t
1576
+ })
1577
+ },
1578
+ {
1579
+ name: "support_teacher_email",
1580
+ isCenter: !0,
1581
+ className: "align-center justify-center",
1582
+ sortBy: Ie.SecondaryTeacher,
1583
+ searchBy: _e.SecondaryTeacher,
1584
+ getOption: (t) => ({
1585
+ label: t || "empty",
1586
+ value: t
1587
+ })
1588
+ }
1589
+ ], [f, O] = _(null), w = (t) => {
1590
+ O((v) => v === t ? null : t);
1591
+ };
1592
+ return /* @__PURE__ */ u("div", { className: "fadeIn animated", children: [
1593
+ /* @__PURE__ */ e("h5", { className: "mt-4 mb-2", children: s("assign_student") }),
1594
+ /* @__PURE__ */ u(ae, { className: "my-2", children: [
1595
+ /* @__PURE__ */ e(j, { md: 3, children: /* @__PURE__ */ e(
1596
+ pt,
1597
+ {
1598
+ initValue: h?.searchString || "",
1599
+ onSearch: (t) => W({ searchString: t }),
1600
+ placeholder: s("type_something_to_search_students")
1601
+ }
1602
+ ) }),
1603
+ /* @__PURE__ */ e(j, { md: 8, className: "d-flex justify-content-end align-items-center", children: /* @__PURE__ */ e(ae, { className: "mb-2", children: /* @__PURE__ */ u(j, { style: { display: "flex", alignItems: "center", flexWrap: "wrap", gap: 4 }, children: [
1604
+ /* @__PURE__ */ e(J, { onClick: () => H(E), color: "primary", style: { background: "#316cd9" }, children: s("assign_bulk") }),
1605
+ /* @__PURE__ */ e(J, { onClick: () => Re(E), color: "primary", style: { background: "#316cd9" }, children: s("delete_bulk") }),
1606
+ /* @__PURE__ */ e(J, { onClick: () => ne(E), color: "primary", style: { background: "#316cd9" }, children: s("inactive_students") })
1607
+ ] }) }) }),
1608
+ /* @__PURE__ */ u(
1609
+ j,
1610
+ {
1611
+ md: 1,
1612
+ className: "d-flex justify-content-end align-items-center",
1613
+ style: { whiteSpace: "nowrap", flexWrap: "nowrap" },
1614
+ children: [
1615
+ s("total_of_users"),
1616
+ ": ",
1617
+ b
1618
+ ]
1619
+ }
1620
+ )
1621
+ ] }),
1622
+ /* @__PURE__ */ u(Ce, { centered: !0, isOpen: Z, toggle: () => H(), zIndex: 1201, children: [
1623
+ /* @__PURE__ */ e(Se, { children: s("assign_bulk_student") }),
1624
+ /* @__PURE__ */ u(be, { children: [
1625
+ /* @__PURE__ */ e(
1626
+ Q,
1627
+ {
1628
+ isMulti: !0,
1629
+ value: ee.teacher.map((t) => ({ label: t.email, value: t.id })),
1630
+ options: c,
1631
+ placeholder: s("select_teacher"),
1632
+ className: `flex-grow-1 mb-3 ${x["custom-chip-teacher-select"]}`,
1633
+ onChange: (t) => {
1634
+ const v = t.map((k) => ({
1635
+ id: k.value,
1636
+ email: k.label
1637
+ }));
1638
+ le(v);
1639
+ },
1640
+ isClearable: !0,
1641
+ style: { maxWidth: 120 }
1642
+ }
1643
+ ),
1644
+ /* @__PURE__ */ e(
1645
+ Oe,
1646
+ {
1647
+ value: d.find((t) => t.value == ee.assistantId || t.label == ee.assistantEmail) || null,
1648
+ options: d,
1649
+ onChange: (t) => K("assistant", t),
1650
+ placeholder: s("select_assistant"),
1651
+ className: "flex-grow-1 mb-3"
1652
+ }
1653
+ ),
1654
+ /* @__PURE__ */ e(
1655
+ Q,
1656
+ {
1657
+ isMulti: !0,
1658
+ value: ee.counselors.map((t) => ({ label: t.email, value: t.id })),
1659
+ options: n,
1660
+ placeholder: s("select_counselor"),
1661
+ className: `flex-grow-1 mb-3 ${x["custom-chip-teacher-select"]}`,
1662
+ onChange: (t) => {
1663
+ const v = t.map((k) => ({
1664
+ id: k.value,
1665
+ email: k.label
1666
+ }));
1667
+ ce(v);
1668
+ },
1669
+ isClearable: !0,
1670
+ style: { maxWidth: 120 }
1671
+ }
1672
+ ),
1673
+ /* @__PURE__ */ e(
1674
+ Oe,
1675
+ {
1676
+ value: o.find((t) => t.value == ee.secondaryTeacherId || t.label == ee.secondaryTeacherEmail) || null,
1677
+ options: o,
1678
+ onChange: (t) => K("secondary", t),
1679
+ placeholder: s("select_support_teacher"),
1680
+ className: "flex-grow-1"
1681
+ }
1682
+ )
1683
+ ] }),
1684
+ /* @__PURE__ */ u(Ne, { className: "text-right", children: [
1685
+ /* @__PURE__ */ e(J, { onClick: () => H(), children: s("cancel") }),
1686
+ /* @__PURE__ */ e(J, { color: "primary", onClick: () => me(E), children: s("assign") })
1687
+ ] })
1688
+ ] }),
1689
+ /* @__PURE__ */ u(Ce, { centered: !0, isOpen: pe, toggle: () => ne(), zIndex: 1201, children: [
1690
+ /* @__PURE__ */ e(Se, { children: s("inactive_students") }),
1691
+ /* @__PURE__ */ u(be, { style: { display: "flex", gap: 12 }, children: [
1692
+ /* @__PURE__ */ e(fa, { color: "red", size: 30 }),
1693
+ /* @__PURE__ */ e(zt, { style: { fontSize: 20, margin: 0, display: "flex", alignItems: "center" }, children: s("are_you_sure_you_want_to_inactive_students", { number: E.length }) })
1694
+ ] }),
1695
+ /* @__PURE__ */ u(Ne, { className: "text-right", children: [
1696
+ /* @__PURE__ */ e(J, { onClick: () => ne(), children: s("cancel") }),
1697
+ /* @__PURE__ */ e(J, { color: "primary", onClick: () => ge(E, L), children: s("confirm") })
1698
+ ] })
1699
+ ] }),
1700
+ /* @__PURE__ */ u(ae, { className: "mb-2", children: [
1701
+ /* @__PURE__ */ e(j, { md: 12, children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ u(Tt, { bordered: !0, hover: !0, striped: !0, size: "sm", className: `${x["table-fixed"]}`, children: [
1702
+ /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ e(
1703
+ Dt,
1704
+ {
1705
+ headers: p,
1706
+ filters: h,
1707
+ fullName: de,
1708
+ onChangeFilters: W,
1709
+ teacherOptions: c,
1710
+ assistantOptions: d,
1711
+ counselorOptions: n,
1712
+ secondaryTeacherOptions: o
1713
+ }
1714
+ ) }),
1715
+ C && C.length > 0 ? /* @__PURE__ */ e("tbody", { children: C.map((t, v) => /* @__PURE__ */ u("tr", { children: [
1716
+ /* @__PURE__ */ e("td", { className: `align-middle text-center ${x["fixed-width-40"]}`, children: /* @__PURE__ */ e(
1717
+ "input",
1718
+ {
1719
+ id: t.id,
1720
+ type: "checkbox",
1721
+ onChange: R,
1722
+ checked: E.includes(
1723
+ t.id
1724
+ )
1725
+ }
1726
+ ) }),
1727
+ /* @__PURE__ */ u(
1728
+ "td",
1729
+ {
1730
+ className: `align-middle ${x["fixed-width"]}`,
1731
+ id: `student_name_${t.id}_${v}`,
1732
+ onMouseEnter: () => w(`student_name_${t.id}_${v}`),
1733
+ onMouseLeave: () => w(`student_name_${t.id}_${v}`),
1734
+ children: [
1735
+ /* @__PURE__ */ e(
1736
+ "button",
1737
+ {
1738
+ type: "button",
1739
+ className: `${x["button-user-name"]} btn-link`,
1740
+ onClick: () => {
1741
+ he(t), Ve(!0);
1742
+ },
1743
+ children: t.fullName
1744
+ }
1745
+ ),
1746
+ /* @__PURE__ */ e(
1747
+ Ee,
1748
+ {
1749
+ placement: "top",
1750
+ isOpen: f === `student_name_${t.id}_${v}`,
1751
+ target: `student_name_${t.id}_${v}`,
1752
+ children: t.fullName
1753
+ }
1754
+ )
1755
+ ]
1756
+ }
1757
+ ),
1758
+ /* @__PURE__ */ e(
1759
+ "td",
1760
+ {
1761
+ className: `align-middle ${x["fixed-width"]}`,
1762
+ id: `student_email_${t.id}_${v}`,
1763
+ onMouseEnter: () => w(`student_email_${t.id}_${v}`),
1764
+ onMouseLeave: () => w(`student_email_${t.id}_${v}`),
1765
+ children: /* @__PURE__ */ e("p", { children: t.gradeLevel })
1766
+ }
1767
+ ),
1768
+ /* @__PURE__ */ u(
1769
+ "td",
1770
+ {
1771
+ className: `align-middle ${x["equal-width"]}`,
1772
+ id: `student_teacher_${t.id}_${v}`,
1773
+ onMouseEnter: () => w(`student_teacher_${t.id}_${v}`),
1774
+ onMouseLeave: () => w(`student_teacher_${t.id}_${v}`),
1775
+ children: [
1776
+ !!t.teachers && t.teachers.length > 0 && /* @__PURE__ */ e(Je, { children: t.teachers.map((k) => /* @__PURE__ */ u("p", { className: "mb-0", children: [
1777
+ k.mainTeacherName,
1778
+ " - ",
1779
+ k.mainTeacherEmail
1780
+ ] }, k.mainTeacherEmail)) }),
1781
+ !!t.teachers && t.teachers.length > 0 && /* @__PURE__ */ e(
1782
+ Ee,
1783
+ {
1784
+ placement: "top",
1785
+ isOpen: f === `student_teacher_${t.id}_${v}`,
1786
+ target: `student_teacher_${t.id}_${v}`,
1787
+ children: t.teachers.map((k) => /* @__PURE__ */ u("p", { className: "mb-0", children: [
1788
+ k.mainTeacherName,
1789
+ " - ",
1790
+ k.mainTeacherEmail
1791
+ ] }, k.mainTeacherEmail))
1792
+ }
1793
+ )
1794
+ ]
1795
+ }
1796
+ ),
1797
+ /* @__PURE__ */ u(
1798
+ "td",
1799
+ {
1800
+ className: `align-middle ${x["equal-width"]}`,
1801
+ id: `student_assistant_${t.id}_${v}`,
1802
+ onMouseEnter: () => w(`student_assistant_${t.id}_${v}`),
1803
+ onMouseLeave: () => w(`student_assistant_${t.id}_${v}`),
1804
+ children: [
1805
+ !!t.assistantEmail && /* @__PURE__ */ u("p", { className: "mb-0", children: [
1806
+ t.assistantName,
1807
+ " - ",
1808
+ t.assistantEmail
1809
+ ] }),
1810
+ !!t.assistantEmail && /* @__PURE__ */ u(
1811
+ Ee,
1812
+ {
1813
+ placement: "top",
1814
+ isOpen: f === `student_assistant_${t.id}_${v}`,
1815
+ target: `student_assistant_${t.id}_${v}`,
1816
+ children: [
1817
+ t.assistantName,
1818
+ "-",
1819
+ t.assistantEmail
1820
+ ]
1821
+ }
1822
+ )
1823
+ ]
1824
+ }
1825
+ ),
1826
+ /* @__PURE__ */ u(
1827
+ "td",
1828
+ {
1829
+ className: `align-middle ${x["equal-width"]}`,
1830
+ id: `student_counselor_${t.id}_${v}`,
1831
+ onMouseEnter: () => w(`student_counselor_${t.id}_${v}`),
1832
+ onMouseLeave: () => w(`student_counselor_${t.id}_${v}`),
1833
+ children: [
1834
+ !!t.counselors && t.counselors.length > 0 && /* @__PURE__ */ e(Je, { children: t.counselors.map((k) => /* @__PURE__ */ u("p", { className: "mb-0", children: [
1835
+ k.counselorName,
1836
+ " - ",
1837
+ k.counselorEmail
1838
+ ] }, k.counselorUserId)) }),
1839
+ !!t.counselors && t.counselors.length > 0 && /* @__PURE__ */ e(
1840
+ Ee,
1841
+ {
1842
+ placement: "top",
1843
+ isOpen: f === `student_counselor_${t.id}_${v}`,
1844
+ target: `student_counselor_${t.id}_${v}`,
1845
+ children: t.counselors.map((k) => /* @__PURE__ */ u("p", { className: "mb-0", children: [
1846
+ k.counselorName,
1847
+ " - ",
1848
+ k.counselorEmail
1849
+ ] }, k.counselorUserId))
1850
+ }
1851
+ )
1852
+ ]
1853
+ }
1854
+ ),
1855
+ /* @__PURE__ */ u(
1856
+ "td",
1857
+ {
1858
+ className: `align-middle ${x["equal-width"]}`,
1859
+ id: `student_secondary_teacher_${t.id}_${v}`,
1860
+ onMouseEnter: () => w(`student_secondary_teacher_${t.id}_${v}`),
1861
+ onMouseLeave: () => w(`student_secondary_teacher_${t.id}_${v}`),
1862
+ children: [
1863
+ !!t.secondaryTeacherEmail && /* @__PURE__ */ u("p", { className: "mb-0", children: [
1864
+ t.secondaryTeacherName,
1865
+ " - ",
1866
+ t.secondaryTeacherEmail
1867
+ ] }),
1868
+ !!t.secondaryTeacherEmail && /* @__PURE__ */ u(
1869
+ Ee,
1870
+ {
1871
+ placement: "top",
1872
+ isOpen: f === `student_secondary_teacher_${t.id}_${v}`,
1873
+ target: `student_secondary_teacher_${t.id}_${v}`,
1874
+ children: [
1875
+ t.secondaryTeacherName,
1876
+ " - ",
1877
+ t.secondaryTeacherEmail
1878
+ ]
1879
+ }
1880
+ )
1881
+ ]
1882
+ }
1883
+ )
1884
+ ] }, t.id)) }) : /* @__PURE__ */ e("div", { style: { width: "max-content", padding: 20 }, children: s("no_data") })
1885
+ ] }) }) }),
1886
+ /* @__PURE__ */ e(j, { md: 12, children: /* @__PURE__ */ e(
1887
+ gt,
1888
+ {
1889
+ filters: h,
1890
+ totalRecordCount: b,
1891
+ changePageSize: (t) => W({ pageSize: t }),
1892
+ changePage: (t) => W({ currentPage: t })
1893
+ }
1894
+ ) })
1895
+ ] }),
1896
+ /* @__PURE__ */ e(
1897
+ Ta,
1898
+ {
1899
+ openDetailModal: ze,
1900
+ onClose: Ge,
1901
+ selectedUser: X,
1902
+ staffBulkAssign: ee,
1903
+ teacherOptions: c,
1904
+ handleChangeTeacherBulk: le,
1905
+ handleChangeCounselorBulk: ce,
1906
+ assistantOptions: d,
1907
+ counselorOptions: n,
1908
+ secondaryTeacherOptions: o,
1909
+ handleChangeStaffBulk: K,
1910
+ handleEditAssignForStudents: oe,
1911
+ toggleCollapse: qe,
1912
+ activeIndex: We
1913
+ }
1914
+ ),
1915
+ /* @__PURE__ */ e(
1916
+ ya,
1917
+ {
1918
+ textModal: fe,
1919
+ isOpen: ie,
1920
+ teachers: ye,
1921
+ options: q,
1922
+ onClose: we,
1923
+ onSave: Ue,
1924
+ modalType: V,
1925
+ setTeacherChangeUserId: Ae,
1926
+ setTeacherSelectForChangeUserId: je,
1927
+ teacherSelectForChangeUserId: Te
1928
+ }
1929
+ ),
1930
+ /* @__PURE__ */ e(
1931
+ _a,
1932
+ {
1933
+ open: Ke,
1934
+ onClose: $e,
1935
+ teachers: X?.teachers?.filter((t) => !He.includes(t.teacherUserId)) || [],
1936
+ onConfirm: oe,
1937
+ teacherSwitchUserId: Qe,
1938
+ setTeacherSwitchUserId: Xe
1939
+ }
1940
+ ),
1941
+ /* @__PURE__ */ e(
1942
+ wa,
1943
+ {
1944
+ open: Ye,
1945
+ onClose: Re,
1946
+ teachers: $,
1947
+ onChangeStaffRemove: Ze,
1948
+ switchStaffUsers: et,
1949
+ counselors: y,
1950
+ assistants: N,
1951
+ onRemoveBulkStaff: m,
1952
+ studentUserIds: E,
1953
+ secondaryTeachers: M
1954
+ }
1955
+ )
1956
+ ] });
1957
+ }, $a = () => {
1958
+ const s = re(), [l, c] = _(
1959
+ _t
1960
+ ), [r, a] = _([]), [d, S] = _(""), g = async () => {
1961
+ try {
1962
+ const i = await bt();
1963
+ a(i.data);
1964
+ } catch (i) {
1965
+ s(
1966
+ I({
1967
+ type: "danger",
1968
+ message: i.response?.data?.title || i.message
1969
+ })
1970
+ );
1971
+ }
1972
+ }, n = r.map((i) => ({
1973
+ label: `${i.name} - ${i.email}`,
1974
+ value: i.id
1975
+ }));
1976
+ return te(() => {
1977
+ l.roles?.includes("Teacher") && g();
1978
+ }, [l]), {
1979
+ userChoiced: l,
1980
+ setUserChoiced: c,
1981
+ teacherList: r,
1982
+ options: n,
1983
+ setTeacherChangeId: S,
1984
+ teacherChangeId: d
1985
+ };
1986
+ }, Ea = "User deleted list", ka = () => {
1987
+ const {
1988
+ userChoiced: s,
1989
+ setUserChoiced: l,
1990
+ options: c,
1991
+ teacherChangeId: r,
1992
+ setTeacherChangeId: a
1993
+ } = $a(), [d, S] = _([]), [g, n] = _(0), { filters: i, changeFilters: T } = Nt(), o = re(), U = Ot(null), E = () => {
1994
+ U && U.current && U.current.toggle();
1995
+ }, A = () => {
1996
+ a(""), l(_t);
1997
+ }, C = G(async () => {
1998
+ o(F(!0));
1999
+ try {
2000
+ const b = await wt(i), { items: R, totalItems: z } = b.data;
2001
+ S(R), n(z);
2002
+ } catch (b) {
2003
+ o(
2004
+ I({
2005
+ type: "danger",
2006
+ message: b.response?.data?.title || b.message
2007
+ })
2008
+ );
2009
+ }
2010
+ o(F(!1));
2011
+ }, [o, i]);
2012
+ te(() => {
2013
+ document.title = Ea;
2014
+ }, []), te(() => {
2015
+ C();
2016
+ }, [i]);
2017
+ const h = G(
2018
+ (b) => {
2019
+ o(
2020
+ nt({
2021
+ isOpen: !0,
2022
+ type: "warning",
2023
+ message: "Do you want to remove this user?",
2024
+ onConfirm: async () => {
2025
+ o(F(!0));
2026
+ try {
2027
+ s.roles.includes("Teacher") ? await ct(b, r) : await ct(b), o(
2028
+ I({
2029
+ type: "success",
2030
+ message: "Remove user successfully"
2031
+ })
2032
+ ), E(), A(), T({ currentPage: 1 });
2033
+ } catch (R) {
2034
+ o(
2035
+ I({
2036
+ type: "danger",
2037
+ message: R.response?.data?.title || R.message
2038
+ })
2039
+ );
2040
+ }
2041
+ o(F(!1));
2042
+ }
2043
+ })
2044
+ );
2045
+ },
2046
+ [i, r, s]
2047
+ );
2048
+ return {
2049
+ userList: d,
2050
+ totalItems: g,
2051
+ filters: i,
2052
+ getData: C,
2053
+ removeData: h,
2054
+ changeFilters: T,
2055
+ modal: U,
2056
+ openModal: E,
2057
+ userChoiced: s,
2058
+ setUserChoiced: l,
2059
+ options: c,
2060
+ teacherChangeId: r,
2061
+ setTeacherChangeId: a,
2062
+ resetData: A
2063
+ };
2064
+ }, Da = (s, l) => {
2065
+ const {
2066
+ header: c,
2067
+ removeData: r,
2068
+ resetData: a,
2069
+ userChoiced: d,
2070
+ options: S,
2071
+ teacherChangeId: g,
2072
+ setTeacherChangeId: n
2073
+ } = s, { t: i } = Y(), T = () => {
2074
+ var o = window.location.origin + "/api/ExportDataUser/" + d.id;
2075
+ window.open(o);
2076
+ };
2077
+ return /* @__PURE__ */ e(
2078
+ Ut,
2079
+ {
2080
+ header: c,
2081
+ ref: l,
2082
+ onCancel: () => {
2083
+ a();
2084
+ },
2085
+ children: /* @__PURE__ */ e(ae, { children: /* @__PURE__ */ u(j, { md: 12, className: "mb-2", children: [
2086
+ /* @__PURE__ */ e("p", { children: i("export_user_data") }),
2087
+ /* @__PURE__ */ e("div", { className: "pb-3", children: /* @__PURE__ */ e(
2088
+ J,
2089
+ {
2090
+ color: "success",
2091
+ onClick: () => {
2092
+ T();
2093
+ },
2094
+ style: { color: "#fff" },
2095
+ children: i("download_users_data")
2096
+ }
2097
+ ) }),
2098
+ /* @__PURE__ */ e("p", { children: "Delete user" }),
2099
+ !!d && /* @__PURE__ */ u("div", { children: [
2100
+ d.roles.includes("Student") && /* @__PURE__ */ u("div", { children: [
2101
+ /* @__PURE__ */ e(ke, { color: "danger", children: i("alert_delete_user") }),
2102
+ /* @__PURE__ */ e(
2103
+ J,
2104
+ {
2105
+ color: "danger",
2106
+ onClick: () => r(d.id),
2107
+ style: { color: "#fff" },
2108
+ children: i("delete_user")
2109
+ }
2110
+ )
2111
+ ] }),
2112
+ d.roles.includes("Admin") && /* @__PURE__ */ u("div", { children: [
2113
+ /* @__PURE__ */ e(ke, { color: "danger", children: i("alert_delete_user") }),
2114
+ /* @__PURE__ */ e(
2115
+ J,
2116
+ {
2117
+ color: "danger",
2118
+ onClick: () => r(d.id),
2119
+ children: i("delete_user")
2120
+ }
2121
+ )
2122
+ ] }),
2123
+ d.roles.includes("Teacher") && /* @__PURE__ */ u("div", { children: [
2124
+ /* @__PURE__ */ e(ke, { color: "warning", children: i("alert_delete_user") }),
2125
+ /* @__PURE__ */ e(
2126
+ Q,
2127
+ {
2128
+ options: S,
2129
+ defaultValue: g,
2130
+ placeholder: "select_teacher_change",
2131
+ onChange: (o) => n(o.value)
2132
+ }
2133
+ ),
2134
+ !!g && /* @__PURE__ */ u("div", { className: "mt-2", children: [
2135
+ /* @__PURE__ */ e(ke, { color: "danger", children: i("alert_delete_user") }),
2136
+ /* @__PURE__ */ e(
2137
+ J,
2138
+ {
2139
+ color: "danger",
2140
+ onClick: () => r(d.id),
2141
+ children: i("delete_user")
2142
+ }
2143
+ )
2144
+ ] })
2145
+ ] }),
2146
+ (d.roles.includes("Parent") || d.roles.includes("Counselor") || d.roles.includes("SecondaryTeacher")) && /* @__PURE__ */ u("div", { children: [
2147
+ /* @__PURE__ */ e(ke, { color: "danger", children: i("alert_delete_user") }),
2148
+ /* @__PURE__ */ e(
2149
+ J,
2150
+ {
2151
+ color: "danger",
2152
+ onClick: () => r(d.id),
2153
+ children: i("delete_user")
2154
+ }
2155
+ )
2156
+ ] })
2157
+ ] })
2158
+ ] }) })
2159
+ }
2160
+ );
2161
+ }, Ma = yt(Da), xa = "user_deleted", Oa = () => {
2162
+ const {
2163
+ userList: s,
2164
+ totalItems: l,
2165
+ filters: c,
2166
+ changeFilters: r,
2167
+ removeData: a,
2168
+ openModal: d,
2169
+ modal: S,
2170
+ userChoiced: g,
2171
+ setUserChoiced: n,
2172
+ options: i,
2173
+ teacherChangeId: T,
2174
+ setTeacherChangeId: o,
2175
+ resetData: U
2176
+ } = ka(), { t: E } = Y(), A = (C) => {
2177
+ C && n(C), d();
2178
+ };
2179
+ return /* @__PURE__ */ u("div", { className: "fadeIn animated", children: [
2180
+ /* @__PURE__ */ e("h5", { className: "mt-4 mb-2", children: E(xa) }),
2181
+ /* @__PURE__ */ u(ae, { className: "my-2", children: [
2182
+ /* @__PURE__ */ e(j, { md: 8, children: /* @__PURE__ */ e(
2183
+ pt,
2184
+ {
2185
+ initValue: c.searchString,
2186
+ onSearch: (C) => r({ searchString: C }),
2187
+ placeholder: E("type_something_to_search_reflection_result")
2188
+ }
2189
+ ) }),
2190
+ /* @__PURE__ */ u(
2191
+ j,
2192
+ {
2193
+ md: 4,
2194
+ className: "d-flex justify-content-end align-items-center",
2195
+ children: [
2196
+ E("total_of_users"),
2197
+ ": ",
2198
+ l
2199
+ ]
2200
+ }
2201
+ )
2202
+ ] }),
2203
+ /* @__PURE__ */ u(ae, { className: "mb-2", children: [
2204
+ /* @__PURE__ */ e(j, { md: 12, children: s && s.length > 0 ? /* @__PURE__ */ e("div", { children: /* @__PURE__ */ u(Tt, { bordered: !0, hover: !0, striped: !0, responsive: !0, size: "sm", children: [
2205
+ /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ u("tr", { children: [
2206
+ /* @__PURE__ */ e("th", { className: "align-top", children: E("name") }),
2207
+ /* @__PURE__ */ e("th", { className: "align-top", children: E("email") }),
2208
+ /* @__PURE__ */ e("th", { className: "align-top", children: E("role") })
2209
+ ] }) }),
2210
+ /* @__PURE__ */ e("tbody", { children: s.map((C) => /* @__PURE__ */ u("tr", { children: [
2211
+ /* @__PURE__ */ e("td", { className: "align-middle", children: /* @__PURE__ */ e(
2212
+ $t,
2213
+ {
2214
+ label: `${C.fullName}`,
2215
+ onClick: () => A(C)
2216
+ }
2217
+ ) }),
2218
+ /* @__PURE__ */ e("td", { className: "align-middle", children: C.email }),
2219
+ /* @__PURE__ */ e("td", { className: "align-middle", children: !!C.roles && C.roles.map((h) => h === "SecondaryTeacher" ? "SupportTeacher" : h).join(", ") })
2220
+ ] }, C.id)) })
2221
+ ] }) }) : /* @__PURE__ */ e(Et, { label: E("user") }) }),
2222
+ /* @__PURE__ */ e(j, { md: 12, children: /* @__PURE__ */ e(
2223
+ gt,
2224
+ {
2225
+ filters: c,
2226
+ totalRecordCount: l,
2227
+ changePageSize: (C) => r({ pageSize: C }),
2228
+ changePage: (C) => r({ currentPage: C })
2229
+ }
2230
+ ) })
2231
+ ] }),
2232
+ /* @__PURE__ */ e(
2233
+ Ma,
2234
+ {
2235
+ ref: S,
2236
+ header: g.fullName,
2237
+ onCancel: () => {
2238
+ },
2239
+ userChoiced: g,
2240
+ removeData: a,
2241
+ options: i,
2242
+ teacherChangeId: T,
2243
+ setTeacherChangeId: o,
2244
+ resetData: U
2245
+ }
2246
+ )
2247
+ ] });
2248
+ }, Aa = {
2249
+ padding: "4px 8px",
2250
+ marginBottom: 0,
2251
+ borderRadius: "4px",
2252
+ color: "#fff",
2253
+ fontWeight: 500,
2254
+ fontSize: "14px",
2255
+ height: "56px",
2256
+ justifyContent: "center"
2257
+ }, Pe = ({
2258
+ htmlFor: s,
2259
+ isDisabled: l,
2260
+ text: c,
2261
+ backgroundColor: r,
2262
+ onClick: a,
2263
+ isClassReflection: d
2264
+ }) => /* @__PURE__ */ u(
2265
+ Vt,
2266
+ {
2267
+ htmlFor: s,
2268
+ role: "button",
2269
+ tabIndex: 0,
2270
+ className: `d-flex align-items-center justfy-content-center mr-2
2271
+ ${d ? "w-25" : ""}
2272
+ ${l ? "" : "cursor-pointer hover-opacity"}`,
2273
+ style: {
2274
+ ...Aa,
2275
+ backgroundColor: r,
2276
+ opacity: l ? 0.5 : 1,
2277
+ gap: "8px"
2278
+ },
2279
+ onClick: (S) => a(),
2280
+ children: [
2281
+ /* @__PURE__ */ e("i", { className: "fa fa-paperclip mr-1", "aria-hidden": "true" }),
2282
+ c
2283
+ ]
2284
+ }
2285
+ ), It = `${vt}/api/ImportCsv/csv`, lt = `${vt}/api/Teacher`, Ra = (s, l) => rt.post(`${It}/${l}`, s), ut = (s) => rt.post(`${It}/importClassReflection`, s), La = (s, l) => rt.post(`${lt}/adminImportStudentByTeacherId/${s}`, l), Ba = (s) => ft.post(`${lt}/adminImportChunkUser`, s), Fa = () => ft.get(`${lt}/download-template-file-user`);
2286
+ var Ct = /* @__PURE__ */ ((s) => (s.Students = "students", s.Subjects = "subjects", s.Grades = "grades", s.Attendances = "attendances", s.ClassReflection = "classReflection", s.Others = "others", s.AllUser = "allUser", s))(Ct || {});
2287
+ const Pa = [
2288
+ {
2289
+ text: "import_users",
2290
+ backgroundColor: "#0abde3",
2291
+ type: "allUser"
2292
+ /* AllUser */
2293
+ }
2294
+ ], Ja = [
2295
+ // {
2296
+ // text: "Import students",
2297
+ // backgroundColor: "#0abde3",
2298
+ // type: CSVType.Students
2299
+ // },
2300
+ // {
2301
+ // text: "Import subjects",
2302
+ // backgroundColor: "#1dd1a1",
2303
+ // type: CSVType.Subjects
2304
+ // },
2305
+ // { text: "Import grades", backgroundColor: "#54a0ff", type: CSVType.Grades },
2306
+ // {
2307
+ // text: "Import attendances",
2308
+ // backgroundColor: "#feca57",
2309
+ // type: CSVType.Attendances
2310
+ // },
2311
+ {
2312
+ text: "import_class_reflection",
2313
+ backgroundColor: "#e74c3c",
2314
+ type: "classReflection"
2315
+ /* ClassReflection */
2316
+ }
2317
+ // { text: "Import others", backgroundColor: "#8395a7", type: CSVType.Others }
2318
+ ], ja = "CSV Import", st = "csvupload", mt = {
2319
+ teacherName: "",
2320
+ teacherEmail: "",
2321
+ studentIds: [],
2322
+ file: ""
2323
+ }, za = () => {
2324
+ const s = re(), l = ra((N) => N.common.isLoading), [c, r] = _(null), [a, d] = _(), [S, g] = _([]), [n, i] = _(mt), [T, o] = _(), [U, E] = _([]), C = window.location.hostname.includes("isb"), [h, b] = _(0), [R, z] = _("");
2325
+ te(() => {
2326
+ document.title = ja;
2327
+ }, []);
2328
+ const W = C ? Pa : Ja, de = async () => {
2329
+ s(F(!0));
2330
+ try {
2331
+ const L = await Fa();
2332
+ var N = new Blob([L.data.content], { type: "text/csv" });
2333
+ const Z = window.URL.createObjectURL(N);
2334
+ var M = document.createElement("a");
2335
+ M.href = Z, M.setAttribute("download", L.data.nameFile), M.click(), s(
2336
+ I({
2337
+ type: "success",
2338
+ message: "Download successfully"
2339
+ })
2340
+ );
2341
+ } catch (L) {
2342
+ s(
2343
+ I({
2344
+ type: "danger",
2345
+ message: L.message
2346
+ })
2347
+ );
2348
+ }
2349
+ s(F(!1));
2350
+ }, se = G(
2351
+ async (N) => {
2352
+ if (!c || !N) return;
2353
+ s(F(!0));
2354
+ try {
2355
+ const H = new FormData();
2356
+ H.append("file", N, N.name);
2357
+ const ee = c === "allUser" ? ot.Admin : ot.Teacher, K = await Mt(H, ee);
2358
+ if (K.data && K.data.length > 0) {
2359
+ E(K.data), s(F(!1)), s(
2360
+ I({
2361
+ type: "danger",
2362
+ message: "Please use the file as per the template."
2363
+ })
2364
+ );
2365
+ return;
2366
+ }
2367
+ if (c == "allUser") {
2368
+ let ne = (await N.text()).trim();
2369
+ const pe = ne.split(`
2370
+ `).map((q) => q.trim()), ge = pe.findIndex((q) => q.split(",").includes("First Name"));
2371
+ if (ge === 0)
2372
+ throw new Error("Invalid CSV: Missing header row.");
2373
+ ne = pe.slice(ge).join(`
2374
+ `);
2375
+ const le = oa.parse(ne, { header: !0, skipEmptyLines: !0 }), ce = le.meta.fields, oe = le.data;
2376
+ if (!oe.length) {
2377
+ s(F(!1)), s(
2378
+ I({
2379
+ type: "danger",
2380
+ message: "The file has no data or some column names are misformed."
2381
+ })
2382
+ );
2383
+ return;
2384
+ }
2385
+ const V = 10, ie = [];
2386
+ for (let q = 0; q < oe.length; q += V) {
2387
+ const ye = oe.slice(q, q + V).map(
2388
+ (we) => Object.values(we).map((Ue) => (Ue ?? "").toString().trim())
2389
+ );
2390
+ ce && ye.unshift(ce), ie.push(ye);
2391
+ }
2392
+ for (let q = 0; q < ie.length; q++)
2393
+ await Ba({
2394
+ index: q,
2395
+ chunks: ie[q]
2396
+ }), await new Promise((fe) => setTimeout(fe, 500));
2397
+ } else
2398
+ C ? c == "classReflection" && await ut(H) : await Ra(H, c.toString());
2399
+ s(
2400
+ I({
2401
+ type: "success",
2402
+ message: "Import CSV successfully"
2403
+ })
2404
+ );
2405
+ } catch (H) {
2406
+ console.error("❌ Upload failed", H), s(
2407
+ I({
2408
+ type: "danger",
2409
+ message: H.response?.data?.title || H.message
2410
+ })
2411
+ );
2412
+ }
2413
+ s(F(!1));
2414
+ const M = document.getElementById(st), L = document.getElementById("import-student"), Z = document.getElementById("import-classReflection");
2415
+ M && (M.value = ""), L && (L.value = ""), Z && (Z.value = "");
2416
+ },
2417
+ [c]
2418
+ ), X = async (N) => {
2419
+ if (!h) {
2420
+ s(
2421
+ I({
2422
+ type: "danger",
2423
+ message: "Select teacher before import csv"
2424
+ })
2425
+ );
2426
+ return;
2427
+ }
2428
+ if (!c || !N) return;
2429
+ s(F(!0));
2430
+ try {
2431
+ const L = new FormData();
2432
+ L.append("file", N, N.name), await La(h, L), s(
2433
+ I({
2434
+ type: "success",
2435
+ message: "Import CSV successfully"
2436
+ })
2437
+ );
2438
+ } catch (L) {
2439
+ s(
2440
+ I({
2441
+ type: "danger",
2442
+ message: L.response?.data?.title || L.message
2443
+ })
2444
+ );
2445
+ }
2446
+ s(F(!1));
2447
+ const M = document.getElementById("teacherSelector");
2448
+ M && (M.value = "");
2449
+ }, he = async (N) => {
2450
+ if (!a || !a) return;
2451
+ s(F(!0));
2452
+ try {
2453
+ const L = new FormData();
2454
+ L.append("file", a, a.name), L.append("teacherName", N.teacherName), L.append("teacherEmail", N.teacherEmail), N.studentIds.forEach((Z) => {
2455
+ L.append("studentIds", Z);
2456
+ }), await ut(L), s(
2457
+ I({
2458
+ type: "success",
2459
+ message: "Import CSV successfully"
2460
+ })
2461
+ ), i(mt);
2462
+ } catch (L) {
2463
+ s(
2464
+ I({
2465
+ type: "danger",
2466
+ message: L.response?.data?.title || L.message
2467
+ })
2468
+ );
2469
+ }
2470
+ s(F(!1));
2471
+ const M = document.getElementById(st);
2472
+ M && (M.value = "");
2473
+ }, ue = (N) => {
2474
+ b(N.value);
2475
+ }, D = (N) => {
2476
+ o(N), z(N?.name || "");
2477
+ }, $ = () => {
2478
+ if (!T) {
2479
+ s(
2480
+ I({
2481
+ type: "danger",
2482
+ message: "Select CSV to import"
2483
+ })
2484
+ );
2485
+ return;
2486
+ }
2487
+ X(T);
2488
+ };
2489
+ return {
2490
+ isLoading: l,
2491
+ buttons: W,
2492
+ id: st,
2493
+ setType: r,
2494
+ upload: se,
2495
+ initImportReflection: n,
2496
+ setInitImportReflection: i,
2497
+ onConfirm: he,
2498
+ CSVType: Ct,
2499
+ dataFile: a,
2500
+ setDataFile: d,
2501
+ setArrStudent: g,
2502
+ arrStudent: S,
2503
+ isCheckDomainIBS: C,
2504
+ onChangeTeacher: ue,
2505
+ uploadByTeacherId: X,
2506
+ setDataFileImportStudent: D,
2507
+ onUpLoadStudentFile: $,
2508
+ defaultTeacher: h,
2509
+ fileName: R,
2510
+ onStudentSubmit: () => {
2511
+ s(
2512
+ nt({
2513
+ isOpen: !0,
2514
+ type: "warning",
2515
+ message: "Are you sure upload this file?",
2516
+ onConfirm: () => {
2517
+ $();
2518
+ }
2519
+ })
2520
+ );
2521
+ },
2522
+ downloadTemplateUser: de,
2523
+ errorsValidate: U,
2524
+ setErrorsValidate: E
2525
+ };
2526
+ }, Va = xe.object({
2527
+ teacherName: xe.string()?.trim().required(),
2528
+ teacherEmail: xe.string()?.trim().email("Invalid email").required(),
2529
+ studentIds: xe.array().required().test(
2530
+ "test students",
2531
+ "Please choose student",
2532
+ function() {
2533
+ return !!this.parent.studentIds && !!this.parent.studentIds.length;
2534
+ }
2535
+ ),
2536
+ file: xe.string()?.trim().required()
2537
+ }), qa = () => {
2538
+ const {
2539
+ initImportReflection: s,
2540
+ onConfirm: l,
2541
+ isLoading: c,
2542
+ setType: r,
2543
+ id: a,
2544
+ CSVType: d,
2545
+ dataFile: S,
2546
+ setDataFile: g,
2547
+ setArrStudent: n,
2548
+ buttons: i,
2549
+ upload: T,
2550
+ isCheckDomainIBS: o,
2551
+ downloadTemplateUser: U,
2552
+ errorsValidate: E,
2553
+ setErrorsValidate: A
2554
+ } = za(), { t: C } = Y();
2555
+ return /* @__PURE__ */ e("div", { className: "animated fadeIn pt-3", children: o ? /* @__PURE__ */ u(tt, { children: [
2556
+ /* @__PURE__ */ e(
2557
+ De,
2558
+ {
2559
+ className: "d-none",
2560
+ type: "file",
2561
+ id: "import-user",
2562
+ onChange: (h) => T(h.target.files[0]),
2563
+ accept: "text/csv"
2564
+ }
2565
+ ),
2566
+ /* @__PURE__ */ e(
2567
+ De,
2568
+ {
2569
+ className: "d-none",
2570
+ type: "file",
2571
+ id: "import-classReflection",
2572
+ onChange: (h) => T(h.target.files[0]),
2573
+ accept: "text/csv"
2574
+ }
2575
+ ),
2576
+ /* @__PURE__ */ e("div", { className: "class-reflection", children: /* @__PURE__ */ e(
2577
+ ca,
2578
+ {
2579
+ initialValues: s,
2580
+ enableReinitialize: !0,
2581
+ validationSchema: Va,
2582
+ onSubmit: (h, b) => {
2583
+ l(h), g(""), n([]), b.resetForm();
2584
+ },
2585
+ children: (h) => {
2586
+ const {
2587
+ // values,
2588
+ touched: b,
2589
+ errors: R
2590
+ // handleSubmit,
2591
+ // handleChange
2592
+ } = h;
2593
+ return /* @__PURE__ */ u(ae, { className: "mb-2", children: [
2594
+ /* @__PURE__ */ e(
2595
+ De,
2596
+ {
2597
+ className: "d-none",
2598
+ type: "file",
2599
+ id: a,
2600
+ onChange: (z) => {
2601
+ g(z.target.files[0]), h.setFieldValue("file", "imported");
2602
+ const W = document.getElementById(a);
2603
+ W && (W.value = "");
2604
+ },
2605
+ accept: "text/csv"
2606
+ }
2607
+ ),
2608
+ /* @__PURE__ */ e(j, { md: 6, className: "mb-2 d-flex mt-5", children: /* @__PURE__ */ u(ae, { className: "w-100 flex-column", children: [
2609
+ /* @__PURE__ */ u(j, { md: 12, className: "", children: [
2610
+ /* @__PURE__ */ e(Le, { text: C("import_class_reflection") }),
2611
+ /* @__PURE__ */ e(
2612
+ Pe,
2613
+ {
2614
+ htmlFor: "import-classReflection",
2615
+ text: C("import_class_reflection"),
2616
+ isDisabled: c,
2617
+ backgroundColor: "#e74c3c",
2618
+ onClick: () => {
2619
+ r(d.ClassReflection);
2620
+ }
2621
+ },
2622
+ "Import class reflections"
2623
+ ),
2624
+ !!S && /* @__PURE__ */ e("p", { style: { color: "#007bff", fontStyle: "italic", marginTop: "5px" }, children: S.name })
2625
+ ] }),
2626
+ !S && /* @__PURE__ */ e(j, { md: 12, className: "mb-2", children: b.file && R.file && /* @__PURE__ */ e(
2627
+ at,
2628
+ {
2629
+ text: R.file
2630
+ }
2631
+ ) })
2632
+ ] }) }),
2633
+ /* @__PURE__ */ e(j, { md: 6, className: "mb-2", children: /* @__PURE__ */ u(ae, { className: "flex-column", children: [
2634
+ /* @__PURE__ */ e(j, { md: 12, className: "mb-2 text-right", style: { textAlign: "right" }, children: /* @__PURE__ */ e(
2635
+ J,
2636
+ {
2637
+ role: "button",
2638
+ color: "primary",
2639
+ onClick: () => U(),
2640
+ children: /* @__PURE__ */ u("p", { className: "d-flex align-items-center mb-0", children: [
2641
+ C("download_template"),
2642
+ " ",
2643
+ /* @__PURE__ */ e(it, { size: 20, className: "ml-2" })
2644
+ ] })
2645
+ }
2646
+ ) }),
2647
+ /* @__PURE__ */ u(j, { md: 12, className: "mb-2", children: [
2648
+ /* @__PURE__ */ e(Le, { text: C("import_users") }),
2649
+ i.map((z) => /* @__PURE__ */ e(
2650
+ Pe,
2651
+ {
2652
+ htmlFor: "import-user",
2653
+ text: z.text,
2654
+ isDisabled: c,
2655
+ backgroundColor: z.backgroundColor,
2656
+ onClick: () => r(z.type)
2657
+ },
2658
+ z.text
2659
+ ))
2660
+ ] }),
2661
+ E?.length > 0 && E.map((z, W) => /* @__PURE__ */ e(
2662
+ at,
2663
+ {
2664
+ text: z
2665
+ },
2666
+ W
2667
+ ))
2668
+ ] }) })
2669
+ ] });
2670
+ }
2671
+ }
2672
+ ) })
2673
+ ] }) : /* @__PURE__ */ e(tt, { children: /* @__PURE__ */ u(ae, { children: [
2674
+ /* @__PURE__ */ e(j, { md: 12, className: "mt-2 mb-2 text-left", children: /* @__PURE__ */ e(
2675
+ J,
2676
+ {
2677
+ role: "button",
2678
+ color: "primary",
2679
+ onClick: () => U(),
2680
+ children: /* @__PURE__ */ u("p", { className: "d-flex align-items-center mb-0", children: [
2681
+ C("download_template"),
2682
+ " ",
2683
+ /* @__PURE__ */ e(it, { size: 20, className: "ml-2" })
2684
+ ] })
2685
+ }
2686
+ ) }),
2687
+ /* @__PURE__ */ u(j, { md: 6, className: "mb-3", children: [
2688
+ /* @__PURE__ */ e(
2689
+ De,
2690
+ {
2691
+ id: "import-user",
2692
+ className: "d-none",
2693
+ type: "file",
2694
+ onChange: (h) => T(h.target.files[0]),
2695
+ accept: "text/csv"
2696
+ }
2697
+ ),
2698
+ /* @__PURE__ */ e(Le, { text: C("import_users") }),
2699
+ /* @__PURE__ */ e(
2700
+ Pe,
2701
+ {
2702
+ htmlFor: "import-user",
2703
+ text: C("import_users"),
2704
+ isDisabled: c,
2705
+ backgroundColor: "#0abde3",
2706
+ onClick: () => {
2707
+ r(d.AllUser), E.length > 0 && A([]);
2708
+ }
2709
+ },
2710
+ "import-users"
2711
+ )
2712
+ ] }),
2713
+ E.length > 0 && E.map((h, b) => /* @__PURE__ */ e(
2714
+ at,
2715
+ {
2716
+ text: h
2717
+ },
2718
+ b
2719
+ )),
2720
+ /* @__PURE__ */ u(j, { md: 6, className: "mb-3", children: [
2721
+ /* @__PURE__ */ e(
2722
+ De,
2723
+ {
2724
+ className: "d-none",
2725
+ type: "file",
2726
+ id: a,
2727
+ onChange: (h) => T(h.target.files[0]),
2728
+ accept: "text/csv"
2729
+ }
2730
+ ),
2731
+ i.map((h) => /* @__PURE__ */ u(tt, { children: [
2732
+ /* @__PURE__ */ e(Le, { text: C(h.text) }),
2733
+ /* @__PURE__ */ e(
2734
+ Pe,
2735
+ {
2736
+ htmlFor: a,
2737
+ text: C(h.text),
2738
+ isDisabled: c,
2739
+ backgroundColor: h.backgroundColor,
2740
+ onClick: () => r(h.type)
2741
+ },
2742
+ h.text
2743
+ )
2744
+ ] }))
2745
+ ] })
2746
+ ] }) }) });
2747
+ }, Wa = [
2748
+ {
2749
+ path: "/admin/users/user-list",
2750
+ title: "user_list",
2751
+ component: xt
2752
+ },
2753
+ {
2754
+ path: "/admin/users/assign-student",
2755
+ title: "assign_student",
2756
+ component: Ua
2757
+ },
2758
+ {
2759
+ path: "/admin/users/user-deleted",
2760
+ title: "user_deleted",
2761
+ component: Oa
2762
+ },
2763
+ {
2764
+ path: "/admin/users/import-csv",
2765
+ title: "csv_import",
2766
+ component: qa
2767
+ }
2768
+ ], rs = () => /* @__PURE__ */ e(kt, { tabs: Wa });
2769
+ export {
2770
+ rs as default
2771
+ };