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,170 @@
1
+ import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
+ import { Row as f, Col as c, Table as _ } from "reactstrap";
3
+ import { D, b as g, F as I, H as A, c as y, J as R, K as w, L as x, M as P, O as M, P as k, Q as j } from "./index-B3Kqv7dj.mjs";
4
+ import { format as F } from "date-fns";
5
+ import { useCallback as T, useEffect as N } from "react";
6
+ import { useSelector as L, useDispatch as z } from "react-redux";
7
+ import { useNavigate as B } from "react-router-dom";
8
+ import { g as S, a as U, r as $ } from "./mailCategoryService-C_Lq0Uks.mjs";
9
+ import { useTranslation as E } from "react-i18next";
10
+ const O = "/admin/email-template", H = "/admin/create-email-template", J = "Email template list", K = () => {
11
+ const n = B(), { t: o } = E(), u = L(
12
+ (s) => s.emailTemplate.emailTemplateList
13
+ ), d = L(
14
+ (s) => s.emailTemplate.totalItems
15
+ ), r = L(
16
+ (s) => s.mailCategory.mailCategoryList
17
+ ), { filters: i, changeFilters: h } = D(), t = z(), p = T(async () => {
18
+ t(g(!0));
19
+ try {
20
+ const s = await S(i), { items: m, totalItems: C } = s.data;
21
+ if (t(
22
+ I({ emailTemplateList: m, totalItems: C })
23
+ ), r && r.length == 0) {
24
+ const v = await U();
25
+ t(A(v.data.items));
26
+ }
27
+ } catch (s) {
28
+ t(
29
+ y({
30
+ type: "danger",
31
+ message: s.response?.data?.title || s.message
32
+ })
33
+ );
34
+ }
35
+ t(g(!1));
36
+ }, [t, i]), a = T(
37
+ (s) => {
38
+ t(g(!0));
39
+ try {
40
+ t(
41
+ R({
42
+ isOpen: !0,
43
+ type: "warning",
44
+ message: o("do_you_want_to_remove_this_email_template"),
45
+ onConfirm: async () => {
46
+ await $(s), t(
47
+ y({
48
+ type: "success",
49
+ message: "Remove template successfully"
50
+ })
51
+ ), h({ currentPage: 1 });
52
+ }
53
+ })
54
+ );
55
+ } catch (m) {
56
+ t(
57
+ y({
58
+ type: "danger",
59
+ message: m.response?.data?.title || m.message
60
+ })
61
+ );
62
+ }
63
+ t(g(!1));
64
+ },
65
+ [i]
66
+ ), b = T((s) => {
67
+ const m = s ? `${O}/${s}` : H;
68
+ n(m);
69
+ }, []);
70
+ return N(() => {
71
+ document.title = J;
72
+ }, []), N(() => {
73
+ p();
74
+ }, [i]), {
75
+ emailTemplateList: u,
76
+ totalItems: d,
77
+ filters: i,
78
+ changeFilters: h,
79
+ getData: p,
80
+ removeData: a,
81
+ goToDetail: b,
82
+ mailCategoryList: r
83
+ };
84
+ }, Q = "email_template", ae = () => {
85
+ const {
86
+ emailTemplateList: n,
87
+ totalItems: o,
88
+ filters: u,
89
+ changeFilters: d,
90
+ removeData: r,
91
+ goToDetail: i,
92
+ mailCategoryList: h
93
+ } = K(), { t } = E(), p = (a) => {
94
+ r(a);
95
+ };
96
+ return /* @__PURE__ */ l("div", { className: "fadeIn animated", children: [
97
+ /* @__PURE__ */ e("h5", { className: "mb-2", children: t(Q) }),
98
+ /* @__PURE__ */ l(f, { className: "my-2", children: [
99
+ /* @__PURE__ */ e(c, { md: 4, children: /* @__PURE__ */ e(
100
+ w,
101
+ {
102
+ text: t("create_template"),
103
+ onClick: () => i()
104
+ }
105
+ ) }),
106
+ /* @__PURE__ */ l(
107
+ c,
108
+ {
109
+ md: 4,
110
+ className: "d-flex align-items-center justify-content-end",
111
+ children: [
112
+ t("total_of_templates"),
113
+ ": ",
114
+ o
115
+ ]
116
+ }
117
+ )
118
+ ] }),
119
+ /* @__PURE__ */ l(f, { className: "mb-2", children: [
120
+ /* @__PURE__ */ l(c, { md: 8, children: [
121
+ n && n.length > 0 ? /* @__PURE__ */ l(_, { bordered: !0, hover: !0, striped: !0, responsive: !0, size: "sm", children: [
122
+ /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ l("tr", { children: [
123
+ /* @__PURE__ */ e("th", { className: "align-top", children: t("template_name") }),
124
+ /* @__PURE__ */ e("th", { className: "align-top", children: t("category_name") }),
125
+ /* @__PURE__ */ e("th", { className: "align-top", children: t("created_date") }),
126
+ /* @__PURE__ */ e("th", { className: "align-top", children: t("status") }),
127
+ /* @__PURE__ */ e("th", { className: "text-center", children: t("action") })
128
+ ] }) }),
129
+ /* @__PURE__ */ e("tbody", { children: n.map((a) => /* @__PURE__ */ l("tr", { children: [
130
+ /* @__PURE__ */ e("td", { className: "align-middle", children: /* @__PURE__ */ e(
131
+ x,
132
+ {
133
+ label: a.subject,
134
+ onClick: () => i(a.id)
135
+ }
136
+ ) }),
137
+ /* @__PURE__ */ e("td", { className: "align-middle", children: a.category.name }),
138
+ /* @__PURE__ */ e("td", { className: "align-middle", children: F(
139
+ new Date(a.createdAt),
140
+ P
141
+ ) }),
142
+ /* @__PURE__ */ e("td", { className: "align-middle", children: a.isDisabled ? t("disabled") : t("enabled") }),
143
+ /* @__PURE__ */ e("td", { className: "text-center align-middle", children: /* @__PURE__ */ e(
144
+ M,
145
+ {
146
+ onClick: () => p(a.id)
147
+ }
148
+ ) })
149
+ ] }, a.id)) })
150
+ ] }) : /* @__PURE__ */ e(k, { label: t("template") }),
151
+ /* @__PURE__ */ e(f, { className: "mt-2", children: /* @__PURE__ */ e(c, { md: 12, children: /* @__PURE__ */ e(
152
+ j,
153
+ {
154
+ filters: u,
155
+ totalRecordCount: o,
156
+ changePageSize: (a) => d({ pageSize: a }),
157
+ changePage: (a) => d({ currentPage: a })
158
+ }
159
+ ) }) })
160
+ ] }),
161
+ /* @__PURE__ */ e(c, { md: 4, children: /* @__PURE__ */ l(_, { bordered: !0, hover: !0, striped: !0, responsive: !0, size: "sm", children: [
162
+ /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("th", { className: "align-top", children: t("category_name") }) }) }),
163
+ /* @__PURE__ */ e("tbody", { children: h.map((a) => /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { className: "align-middle", children: a.name }) }, a.id)) })
164
+ ] }) })
165
+ ] })
166
+ ] });
167
+ };
168
+ export {
169
+ ae as default
170
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("reactstrap"),a=require("./index-DDw_4X4u.js"),_=require("date-fns"),m=require("react"),x=require("react-redux"),b=require("react-router-dom"),j=require("./mailCategoryService-DexSxwen.js"),y=require("react-i18next"),N="/admin/email-template",f="/admin/create-email-template",E="Email template list",v=()=>{const c=b.useNavigate(),{t:d}=y.useTranslation(),p=x.useSelector(l=>l.emailTemplate.emailTemplateList),u=x.useSelector(l=>l.emailTemplate.totalItems),o=x.useSelector(l=>l.mailCategory.mailCategoryList),{filters:n,changeFilters:h}=a.useFilters(),t=x.useDispatch(),g=m.useCallback(async()=>{t(a.setLoading(!0));try{const l=await j.get(n),{items:r,totalItems:L}=l.data;if(t(a.setEmailTemplateList({emailTemplateList:r,totalItems:L})),o&&o.length==0){const C=await j.get$1();t(a.setMailCategory(C.data.items))}}catch(l){t(a.setAlert({type:"danger",message:l.response?.data?.title||l.message}))}t(a.setLoading(!1))},[t,n]),s=m.useCallback(l=>{t(a.setLoading(!0));try{t(a.setModal({isOpen:!0,type:"warning",message:d("do_you_want_to_remove_this_email_template"),onConfirm:async()=>{await j.remove(l),t(a.setAlert({type:"success",message:"Remove template successfully"})),h({currentPage:1})}}))}catch(r){t(a.setAlert({type:"danger",message:r.response?.data?.title||r.message}))}t(a.setLoading(!1))},[n]),T=m.useCallback(l=>{const r=l?`${N}/${l}`:f;c(r)},[]);return m.useEffect(()=>{document.title=E},[]),m.useEffect(()=>{g()},[n]),{emailTemplateList:p,totalItems:u,filters:n,changeFilters:h,getData:g,removeData:s,goToDetail:T,mailCategoryList:o}},R="email_template",D=()=>{const{emailTemplateList:c,totalItems:d,filters:p,changeFilters:u,removeData:o,goToDetail:n,mailCategoryList:h}=v(),{t}=y.useTranslation(),g=s=>{o(s)};return e.jsxs("div",{className:"fadeIn animated",children:[e.jsx("h5",{className:"mb-2",children:t(R)}),e.jsxs(i.Row,{className:"my-2",children:[e.jsx(i.Col,{md:4,children:e.jsx(a.AddButton,{text:t("create_template"),onClick:()=>n()})}),e.jsxs(i.Col,{md:4,className:"d-flex align-items-center justify-content-end",children:[t("total_of_templates"),": ",d]})]}),e.jsxs(i.Row,{className:"mb-2",children:[e.jsxs(i.Col,{md:8,children:[c&&c.length>0?e.jsxs(i.Table,{bordered:!0,hover:!0,striped:!0,responsive:!0,size:"sm",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"align-top",children:t("template_name")}),e.jsx("th",{className:"align-top",children:t("category_name")}),e.jsx("th",{className:"align-top",children:t("created_date")}),e.jsx("th",{className:"align-top",children:t("status")}),e.jsx("th",{className:"text-center",children:t("action")})]})}),e.jsx("tbody",{children:c.map(s=>e.jsxs("tr",{children:[e.jsx("td",{className:"align-middle",children:e.jsx(a.LinkEditButton,{label:s.subject,onClick:()=>n(s.id)})}),e.jsx("td",{className:"align-middle",children:s.category.name}),e.jsx("td",{className:"align-middle",children:_.format(new Date(s.createdAt),a.DATE_RESULT)}),e.jsx("td",{className:"align-middle",children:s.isDisabled?t("disabled"):t("enabled")}),e.jsx("td",{className:"text-center align-middle",children:e.jsx(a.DeleteButtonIcon,{onClick:()=>g(s.id)})})]},s.id))})]}):e.jsx(a.EmptyDataAlert,{label:t("template")}),e.jsx(i.Row,{className:"mt-2",children:e.jsx(i.Col,{md:12,children:e.jsx(a.CustomPagination,{filters:p,totalRecordCount:d,changePageSize:s=>u({pageSize:s}),changePage:s=>u({currentPage:s})})})})]}),e.jsx(i.Col,{md:4,children:e.jsxs(i.Table,{bordered:!0,hover:!0,striped:!0,responsive:!0,size:"sm",children:[e.jsx("thead",{children:e.jsx("tr",{children:e.jsx("th",{className:"align-top",children:t("category_name")})})}),e.jsx("tbody",{children:h.map(s=>e.jsx("tr",{children:e.jsx("td",{className:"align-middle",children:s.name})},s.id))})]})})]})]})};exports.default=D;
@@ -0,0 +1,170 @@
1
+ import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
+ import { Row as f, Col as c, Table as _ } from "reactstrap";
3
+ import { D, b as g, F as I, H as A, c as y, J as R, K as w, L as x, M as P, O as M, P as k, Q as j } from "./index-CFAFmJ4F.mjs";
4
+ import { format as F } from "date-fns";
5
+ import { useCallback as T, useEffect as N } from "react";
6
+ import { useSelector as L, useDispatch as z } from "react-redux";
7
+ import { useNavigate as B } from "react-router-dom";
8
+ import { g as S, a as U, r as $ } from "./mailCategoryService-DcwLjTWD.mjs";
9
+ import { useTranslation as E } from "react-i18next";
10
+ const O = "/admin/email-template", H = "/admin/create-email-template", J = "Email template list", K = () => {
11
+ const n = B(), { t: o } = E(), u = L(
12
+ (s) => s.emailTemplate.emailTemplateList
13
+ ), d = L(
14
+ (s) => s.emailTemplate.totalItems
15
+ ), r = L(
16
+ (s) => s.mailCategory.mailCategoryList
17
+ ), { filters: i, changeFilters: h } = D(), t = z(), p = T(async () => {
18
+ t(g(!0));
19
+ try {
20
+ const s = await S(i), { items: m, totalItems: C } = s.data;
21
+ if (t(
22
+ I({ emailTemplateList: m, totalItems: C })
23
+ ), r && r.length == 0) {
24
+ const v = await U();
25
+ t(A(v.data.items));
26
+ }
27
+ } catch (s) {
28
+ t(
29
+ y({
30
+ type: "danger",
31
+ message: s.response?.data?.title || s.message
32
+ })
33
+ );
34
+ }
35
+ t(g(!1));
36
+ }, [t, i]), a = T(
37
+ (s) => {
38
+ t(g(!0));
39
+ try {
40
+ t(
41
+ R({
42
+ isOpen: !0,
43
+ type: "warning",
44
+ message: o("do_you_want_to_remove_this_email_template"),
45
+ onConfirm: async () => {
46
+ await $(s), t(
47
+ y({
48
+ type: "success",
49
+ message: "Remove template successfully"
50
+ })
51
+ ), h({ currentPage: 1 });
52
+ }
53
+ })
54
+ );
55
+ } catch (m) {
56
+ t(
57
+ y({
58
+ type: "danger",
59
+ message: m.response?.data?.title || m.message
60
+ })
61
+ );
62
+ }
63
+ t(g(!1));
64
+ },
65
+ [i]
66
+ ), b = T((s) => {
67
+ const m = s ? `${O}/${s}` : H;
68
+ n(m);
69
+ }, []);
70
+ return N(() => {
71
+ document.title = J;
72
+ }, []), N(() => {
73
+ p();
74
+ }, [i]), {
75
+ emailTemplateList: u,
76
+ totalItems: d,
77
+ filters: i,
78
+ changeFilters: h,
79
+ getData: p,
80
+ removeData: a,
81
+ goToDetail: b,
82
+ mailCategoryList: r
83
+ };
84
+ }, Q = "email_template", ae = () => {
85
+ const {
86
+ emailTemplateList: n,
87
+ totalItems: o,
88
+ filters: u,
89
+ changeFilters: d,
90
+ removeData: r,
91
+ goToDetail: i,
92
+ mailCategoryList: h
93
+ } = K(), { t } = E(), p = (a) => {
94
+ r(a);
95
+ };
96
+ return /* @__PURE__ */ l("div", { className: "fadeIn animated", children: [
97
+ /* @__PURE__ */ e("h5", { className: "mb-2", children: t(Q) }),
98
+ /* @__PURE__ */ l(f, { className: "my-2", children: [
99
+ /* @__PURE__ */ e(c, { md: 4, children: /* @__PURE__ */ e(
100
+ w,
101
+ {
102
+ text: t("create_template"),
103
+ onClick: () => i()
104
+ }
105
+ ) }),
106
+ /* @__PURE__ */ l(
107
+ c,
108
+ {
109
+ md: 4,
110
+ className: "d-flex align-items-center justify-content-end",
111
+ children: [
112
+ t("total_of_templates"),
113
+ ": ",
114
+ o
115
+ ]
116
+ }
117
+ )
118
+ ] }),
119
+ /* @__PURE__ */ l(f, { className: "mb-2", children: [
120
+ /* @__PURE__ */ l(c, { md: 8, children: [
121
+ n && n.length > 0 ? /* @__PURE__ */ l(_, { bordered: !0, hover: !0, striped: !0, responsive: !0, size: "sm", children: [
122
+ /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ l("tr", { children: [
123
+ /* @__PURE__ */ e("th", { className: "align-top", children: t("template_name") }),
124
+ /* @__PURE__ */ e("th", { className: "align-top", children: t("category_name") }),
125
+ /* @__PURE__ */ e("th", { className: "align-top", children: t("created_date") }),
126
+ /* @__PURE__ */ e("th", { className: "align-top", children: t("status") }),
127
+ /* @__PURE__ */ e("th", { className: "text-center", children: t("action") })
128
+ ] }) }),
129
+ /* @__PURE__ */ e("tbody", { children: n.map((a) => /* @__PURE__ */ l("tr", { children: [
130
+ /* @__PURE__ */ e("td", { className: "align-middle", children: /* @__PURE__ */ e(
131
+ x,
132
+ {
133
+ label: a.subject,
134
+ onClick: () => i(a.id)
135
+ }
136
+ ) }),
137
+ /* @__PURE__ */ e("td", { className: "align-middle", children: a.category.name }),
138
+ /* @__PURE__ */ e("td", { className: "align-middle", children: F(
139
+ new Date(a.createdAt),
140
+ P
141
+ ) }),
142
+ /* @__PURE__ */ e("td", { className: "align-middle", children: a.isDisabled ? t("disabled") : t("enabled") }),
143
+ /* @__PURE__ */ e("td", { className: "text-center align-middle", children: /* @__PURE__ */ e(
144
+ M,
145
+ {
146
+ onClick: () => p(a.id)
147
+ }
148
+ ) })
149
+ ] }, a.id)) })
150
+ ] }) : /* @__PURE__ */ e(k, { label: t("template") }),
151
+ /* @__PURE__ */ e(f, { className: "mt-2", children: /* @__PURE__ */ e(c, { md: 12, children: /* @__PURE__ */ e(
152
+ j,
153
+ {
154
+ filters: u,
155
+ totalRecordCount: o,
156
+ changePageSize: (a) => d({ pageSize: a }),
157
+ changePage: (a) => d({ currentPage: a })
158
+ }
159
+ ) }) })
160
+ ] }),
161
+ /* @__PURE__ */ e(c, { md: 4, children: /* @__PURE__ */ l(_, { bordered: !0, hover: !0, striped: !0, responsive: !0, size: "sm", children: [
162
+ /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("th", { className: "align-top", children: t("category_name") }) }) }),
163
+ /* @__PURE__ */ e("tbody", { children: h.map((a) => /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { className: "align-middle", children: a.name }) }, a.id)) })
164
+ ] }) })
165
+ ] })
166
+ ] });
167
+ };
168
+ export {
169
+ ae as default
170
+ };
@@ -0,0 +1,170 @@
1
+ import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
+ import { Row as f, Col as c, Table as _ } from "reactstrap";
3
+ import { D, b as g, F as I, H as A, c as y, J as R, K as w, L as x, M as P, O as M, P as k, Q as j } from "./index-Di2zNE1O.mjs";
4
+ import { format as F } from "date-fns";
5
+ import { useCallback as T, useEffect as N } from "react";
6
+ import { useSelector as L, useDispatch as z } from "react-redux";
7
+ import { useNavigate as B } from "react-router-dom";
8
+ import { g as S, a as U, r as $ } from "./mailCategoryService-LumZqQLL.mjs";
9
+ import { useTranslation as E } from "react-i18next";
10
+ const O = "/admin/email-template", H = "/admin/create-email-template", J = "Email template list", K = () => {
11
+ const n = B(), { t: o } = E(), u = L(
12
+ (s) => s.emailTemplate.emailTemplateList
13
+ ), d = L(
14
+ (s) => s.emailTemplate.totalItems
15
+ ), r = L(
16
+ (s) => s.mailCategory.mailCategoryList
17
+ ), { filters: i, changeFilters: h } = D(), t = z(), p = T(async () => {
18
+ t(g(!0));
19
+ try {
20
+ const s = await S(i), { items: m, totalItems: C } = s.data;
21
+ if (t(
22
+ I({ emailTemplateList: m, totalItems: C })
23
+ ), r && r.length == 0) {
24
+ const v = await U();
25
+ t(A(v.data.items));
26
+ }
27
+ } catch (s) {
28
+ t(
29
+ y({
30
+ type: "danger",
31
+ message: s.response?.data?.title || s.message
32
+ })
33
+ );
34
+ }
35
+ t(g(!1));
36
+ }, [t, i]), a = T(
37
+ (s) => {
38
+ t(g(!0));
39
+ try {
40
+ t(
41
+ R({
42
+ isOpen: !0,
43
+ type: "warning",
44
+ message: o("do_you_want_to_remove_this_email_template"),
45
+ onConfirm: async () => {
46
+ await $(s), t(
47
+ y({
48
+ type: "success",
49
+ message: "Remove template successfully"
50
+ })
51
+ ), h({ currentPage: 1 });
52
+ }
53
+ })
54
+ );
55
+ } catch (m) {
56
+ t(
57
+ y({
58
+ type: "danger",
59
+ message: m.response?.data?.title || m.message
60
+ })
61
+ );
62
+ }
63
+ t(g(!1));
64
+ },
65
+ [i]
66
+ ), b = T((s) => {
67
+ const m = s ? `${O}/${s}` : H;
68
+ n(m);
69
+ }, []);
70
+ return N(() => {
71
+ document.title = J;
72
+ }, []), N(() => {
73
+ p();
74
+ }, [i]), {
75
+ emailTemplateList: u,
76
+ totalItems: d,
77
+ filters: i,
78
+ changeFilters: h,
79
+ getData: p,
80
+ removeData: a,
81
+ goToDetail: b,
82
+ mailCategoryList: r
83
+ };
84
+ }, Q = "email_template", ae = () => {
85
+ const {
86
+ emailTemplateList: n,
87
+ totalItems: o,
88
+ filters: u,
89
+ changeFilters: d,
90
+ removeData: r,
91
+ goToDetail: i,
92
+ mailCategoryList: h
93
+ } = K(), { t } = E(), p = (a) => {
94
+ r(a);
95
+ };
96
+ return /* @__PURE__ */ l("div", { className: "fadeIn animated", children: [
97
+ /* @__PURE__ */ e("h5", { className: "mb-2", children: t(Q) }),
98
+ /* @__PURE__ */ l(f, { className: "my-2", children: [
99
+ /* @__PURE__ */ e(c, { md: 4, children: /* @__PURE__ */ e(
100
+ w,
101
+ {
102
+ text: t("create_template"),
103
+ onClick: () => i()
104
+ }
105
+ ) }),
106
+ /* @__PURE__ */ l(
107
+ c,
108
+ {
109
+ md: 4,
110
+ className: "d-flex align-items-center justify-content-end",
111
+ children: [
112
+ t("total_of_templates"),
113
+ ": ",
114
+ o
115
+ ]
116
+ }
117
+ )
118
+ ] }),
119
+ /* @__PURE__ */ l(f, { className: "mb-2", children: [
120
+ /* @__PURE__ */ l(c, { md: 8, children: [
121
+ n && n.length > 0 ? /* @__PURE__ */ l(_, { bordered: !0, hover: !0, striped: !0, responsive: !0, size: "sm", children: [
122
+ /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ l("tr", { children: [
123
+ /* @__PURE__ */ e("th", { className: "align-top", children: t("template_name") }),
124
+ /* @__PURE__ */ e("th", { className: "align-top", children: t("category_name") }),
125
+ /* @__PURE__ */ e("th", { className: "align-top", children: t("created_date") }),
126
+ /* @__PURE__ */ e("th", { className: "align-top", children: t("status") }),
127
+ /* @__PURE__ */ e("th", { className: "text-center", children: t("action") })
128
+ ] }) }),
129
+ /* @__PURE__ */ e("tbody", { children: n.map((a) => /* @__PURE__ */ l("tr", { children: [
130
+ /* @__PURE__ */ e("td", { className: "align-middle", children: /* @__PURE__ */ e(
131
+ x,
132
+ {
133
+ label: a.subject,
134
+ onClick: () => i(a.id)
135
+ }
136
+ ) }),
137
+ /* @__PURE__ */ e("td", { className: "align-middle", children: a.category.name }),
138
+ /* @__PURE__ */ e("td", { className: "align-middle", children: F(
139
+ new Date(a.createdAt),
140
+ P
141
+ ) }),
142
+ /* @__PURE__ */ e("td", { className: "align-middle", children: a.isDisabled ? t("disabled") : t("enabled") }),
143
+ /* @__PURE__ */ e("td", { className: "text-center align-middle", children: /* @__PURE__ */ e(
144
+ M,
145
+ {
146
+ onClick: () => p(a.id)
147
+ }
148
+ ) })
149
+ ] }, a.id)) })
150
+ ] }) : /* @__PURE__ */ e(k, { label: t("template") }),
151
+ /* @__PURE__ */ e(f, { className: "mt-2", children: /* @__PURE__ */ e(c, { md: 12, children: /* @__PURE__ */ e(
152
+ j,
153
+ {
154
+ filters: u,
155
+ totalRecordCount: o,
156
+ changePageSize: (a) => d({ pageSize: a }),
157
+ changePage: (a) => d({ currentPage: a })
158
+ }
159
+ ) }) })
160
+ ] }),
161
+ /* @__PURE__ */ e(c, { md: 4, children: /* @__PURE__ */ l(_, { bordered: !0, hover: !0, striped: !0, responsive: !0, size: "sm", children: [
162
+ /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("th", { className: "align-top", children: t("category_name") }) }) }),
163
+ /* @__PURE__ */ e("tbody", { children: h.map((a) => /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { className: "align-middle", children: a.name }) }, a.id)) })
164
+ ] }) })
165
+ ] })
166
+ ] });
167
+ };
168
+ export {
169
+ ae as default
170
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("reactstrap"),a=require("./index-DVZt7HdB.js"),_=require("date-fns"),m=require("react"),x=require("react-redux"),b=require("react-router-dom"),j=require("./mailCategoryService-CZ9m51K4.js"),y=require("react-i18next"),N="/admin/email-template",f="/admin/create-email-template",E="Email template list",v=()=>{const c=b.useNavigate(),{t:d}=y.useTranslation(),p=x.useSelector(l=>l.emailTemplate.emailTemplateList),u=x.useSelector(l=>l.emailTemplate.totalItems),o=x.useSelector(l=>l.mailCategory.mailCategoryList),{filters:n,changeFilters:h}=a.useFilters(),t=x.useDispatch(),g=m.useCallback(async()=>{t(a.setLoading(!0));try{const l=await j.get(n),{items:r,totalItems:L}=l.data;if(t(a.setEmailTemplateList({emailTemplateList:r,totalItems:L})),o&&o.length==0){const C=await j.get$1();t(a.setMailCategory(C.data.items))}}catch(l){t(a.setAlert({type:"danger",message:l.response?.data?.title||l.message}))}t(a.setLoading(!1))},[t,n]),s=m.useCallback(l=>{t(a.setLoading(!0));try{t(a.setModal({isOpen:!0,type:"warning",message:d("do_you_want_to_remove_this_email_template"),onConfirm:async()=>{await j.remove(l),t(a.setAlert({type:"success",message:"Remove template successfully"})),h({currentPage:1})}}))}catch(r){t(a.setAlert({type:"danger",message:r.response?.data?.title||r.message}))}t(a.setLoading(!1))},[n]),T=m.useCallback(l=>{const r=l?`${N}/${l}`:f;c(r)},[]);return m.useEffect(()=>{document.title=E},[]),m.useEffect(()=>{g()},[n]),{emailTemplateList:p,totalItems:u,filters:n,changeFilters:h,getData:g,removeData:s,goToDetail:T,mailCategoryList:o}},R="email_template",D=()=>{const{emailTemplateList:c,totalItems:d,filters:p,changeFilters:u,removeData:o,goToDetail:n,mailCategoryList:h}=v(),{t}=y.useTranslation(),g=s=>{o(s)};return e.jsxs("div",{className:"fadeIn animated",children:[e.jsx("h5",{className:"mb-2",children:t(R)}),e.jsxs(i.Row,{className:"my-2",children:[e.jsx(i.Col,{md:4,children:e.jsx(a.AddButton,{text:t("create_template"),onClick:()=>n()})}),e.jsxs(i.Col,{md:4,className:"d-flex align-items-center justify-content-end",children:[t("total_of_templates"),": ",d]})]}),e.jsxs(i.Row,{className:"mb-2",children:[e.jsxs(i.Col,{md:8,children:[c&&c.length>0?e.jsxs(i.Table,{bordered:!0,hover:!0,striped:!0,responsive:!0,size:"sm",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"align-top",children:t("template_name")}),e.jsx("th",{className:"align-top",children:t("category_name")}),e.jsx("th",{className:"align-top",children:t("created_date")}),e.jsx("th",{className:"align-top",children:t("status")}),e.jsx("th",{className:"text-center",children:t("action")})]})}),e.jsx("tbody",{children:c.map(s=>e.jsxs("tr",{children:[e.jsx("td",{className:"align-middle",children:e.jsx(a.LinkEditButton,{label:s.subject,onClick:()=>n(s.id)})}),e.jsx("td",{className:"align-middle",children:s.category.name}),e.jsx("td",{className:"align-middle",children:_.format(new Date(s.createdAt),a.DATE_RESULT)}),e.jsx("td",{className:"align-middle",children:s.isDisabled?t("disabled"):t("enabled")}),e.jsx("td",{className:"text-center align-middle",children:e.jsx(a.DeleteButtonIcon,{onClick:()=>g(s.id)})})]},s.id))})]}):e.jsx(a.EmptyDataAlert,{label:t("template")}),e.jsx(i.Row,{className:"mt-2",children:e.jsx(i.Col,{md:12,children:e.jsx(a.CustomPagination,{filters:p,totalRecordCount:d,changePageSize:s=>u({pageSize:s}),changePage:s=>u({currentPage:s})})})})]}),e.jsx(i.Col,{md:4,children:e.jsxs(i.Table,{bordered:!0,hover:!0,striped:!0,responsive:!0,size:"sm",children:[e.jsx("thead",{children:e.jsx("tr",{children:e.jsx("th",{className:"align-top",children:t("category_name")})})}),e.jsx("tbody",{children:h.map(s=>e.jsx("tr",{children:e.jsx("td",{className:"align-middle",children:s.name})},s.id))})]})})]})]})};exports.default=D;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("reactstrap"),a=require("./index-UpEZLqQV.js"),_=require("date-fns"),m=require("react"),x=require("react-redux"),f=require("react-router-dom"),j=require("./mailCategoryService-lvLdr9b4.js"),y=require("react-i18next"),E="/admin/email-template",N="/admin/create-email-template",b="Email template list",v=()=>{const c=f.useNavigate(),{t:d}=y.useTranslation(),p=x.useSelector(l=>l.emailTemplate.emailTemplateList),u=x.useSelector(l=>l.emailTemplate.totalItems),o=x.useSelector(l=>l.mailCategory.mailCategoryList),{filters:n,changeFilters:h}=a.useFilters(),t=x.useDispatch(),g=m.useCallback(async()=>{t(a.setLoading(!0));try{const l=await j.get(n),{items:r,totalItems:L}=l.data;if(t(a.setEmailTemplateList({emailTemplateList:r,totalItems:L})),o&&o.length==0){const C=await j.get$1();t(a.setMailCategory(C.data.items))}}catch(l){t(a.setAlert({type:"danger",message:l.response?.data?.title||l.message}))}t(a.setLoading(!1))},[t,n]),s=m.useCallback(l=>{t(a.setLoading(!0));try{t(a.setModal({isOpen:!0,type:"warning",message:d("do_you_want_to_remove_this_email_template"),onConfirm:async()=>{await j.remove(l),t(a.setAlert({type:"success",message:"Remove template successfully"})),h({currentPage:1})}}))}catch(r){t(a.setAlert({type:"danger",message:r.response?.data?.title||r.message}))}t(a.setLoading(!1))},[n]),T=m.useCallback(l=>{const r=l?`${E}/${l}`:N;c(r)},[]);return m.useEffect(()=>{document.title=b},[]),m.useEffect(()=>{g()},[n]),{emailTemplateList:p,totalItems:u,filters:n,changeFilters:h,getData:g,removeData:s,goToDetail:T,mailCategoryList:o}},R="email_template",A=()=>{const{emailTemplateList:c,totalItems:d,filters:p,changeFilters:u,removeData:o,goToDetail:n,mailCategoryList:h}=v(),{t}=y.useTranslation(),g=s=>{o(s)};return e.jsxs("div",{className:"fadeIn animated",children:[e.jsx("h5",{className:"mb-2",children:t(R)}),e.jsxs(i.Row,{className:"my-2",children:[e.jsx(i.Col,{md:4,children:e.jsx(a.AddButton,{text:t("create_template"),onClick:()=>n()})}),e.jsxs(i.Col,{md:4,className:"d-flex align-items-center justify-content-end",children:[t("total_of_templates"),": ",d]})]}),e.jsxs(i.Row,{className:"mb-2",children:[e.jsxs(i.Col,{md:8,children:[c&&c.length>0?e.jsxs(i.Table,{bordered:!0,hover:!0,striped:!0,responsive:!0,size:"sm",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"align-top",children:t("template_name")}),e.jsx("th",{className:"align-top",children:t("category_name")}),e.jsx("th",{className:"align-top",children:t("created_date")}),e.jsx("th",{className:"text-center",children:t("action")})]})}),e.jsx("tbody",{children:c.map(s=>e.jsxs("tr",{children:[e.jsx("td",{className:"align-middle",children:e.jsx(a.LinkEditButton,{label:s.subject,onClick:()=>n(s.id)})}),e.jsx("td",{className:"align-middle",children:s.category.name}),e.jsx("td",{className:"align-middle",children:_.format(new Date(s.createdAt),a.DATE_RESULT)}),e.jsx("td",{className:"text-center align-middle",children:e.jsx(a.DeleteButtonIcon,{onClick:()=>g(s.id)})})]},s.id))})]}):e.jsx(a.EmptyDataAlert,{label:t("template")}),e.jsx(i.Row,{className:"mt-2",children:e.jsx(i.Col,{md:12,children:e.jsx(a.CustomPagination,{filters:p,totalRecordCount:d,changePageSize:s=>u({pageSize:s}),changePage:s=>u({currentPage:s})})})})]}),e.jsx(i.Col,{md:4,children:e.jsxs(i.Table,{bordered:!0,hover:!0,striped:!0,responsive:!0,size:"sm",children:[e.jsx("thead",{children:e.jsx("tr",{children:e.jsx("th",{className:"align-top",children:t("category_name")})})}),e.jsx("tbody",{children:h.map(s=>e.jsx("tr",{children:e.jsx("td",{className:"align-middle",children:s.name})},s.id))})]})})]})]})};exports.default=A;