aq-fe-framework 0.1.195 → 0.1.197
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.
@@ -66,11 +66,11 @@ import {
|
|
66
66
|
useS_BasicAppShell,
|
67
67
|
useS_ButtonImport,
|
68
68
|
utils_layout_getItemsWithoutLinks
|
69
|
-
} from "../chunk-
|
69
|
+
} from "../chunk-GQCLEMLW.mjs";
|
70
70
|
import "../chunk-J76K4YUA.mjs";
|
71
|
-
import "../chunk-Y3YGC5IH.mjs";
|
72
71
|
import "../chunk-5U2JSHSJ.mjs";
|
73
72
|
import "../chunk-7ZCOFATU.mjs";
|
73
|
+
import "../chunk-Y3YGC5IH.mjs";
|
74
74
|
import "../chunk-FWCSY2DS.mjs";
|
75
75
|
export {
|
76
76
|
AQButtonCreateByImportFile,
|
@@ -417,6 +417,7 @@ interface I$5 {
|
|
417
417
|
email?: string;
|
418
418
|
phoneNumber?: string;
|
419
419
|
userSkillCenters?: IUserSkillCenters[];
|
420
|
+
userSkillCentersIds?: number[];
|
420
421
|
}
|
421
422
|
declare function F_core71678_Update({ user }: {
|
422
423
|
user: I$5;
|
@@ -508,10 +509,6 @@ declare function useS_core83092(): {
|
|
508
509
|
};
|
509
510
|
declare function utils_core83092_mergePage(arr1: I_core83092_RolePermission[], arr2: I_core83092_RolePermission[]): I_core83092_RolePermission[];
|
510
511
|
|
511
|
-
declare function PieChart_DiscountUsedPercentage(): react_jsx_runtime.JSX.Element;
|
512
|
-
|
513
|
-
declare function PieChart_VoucherUsedPercentage(): react_jsx_runtime.JSX.Element;
|
514
|
-
|
515
512
|
interface I$2 {
|
516
513
|
redirectURL?: string;
|
517
514
|
}
|
@@ -545,4 +542,4 @@ interface I {
|
|
545
542
|
}
|
546
543
|
declare function F_authenticate_Login({ loginInfo, redirectUrlAfterLogin, additionalActions, backgroundImage, onSuccess }: I): react_jsx_runtime.JSX.Element;
|
547
544
|
|
548
|
-
export { F_authenticate_Login, F_authenticate_Logout, F_authenticate_SplashPage, F_core12196, F_core12196_Create, F_core12196_Delete, F_core12196_Read, F_core12196_Update, F_core16209, F_core16209_Create, F_core16209_Delete, F_core16209_Update, F_core18256, F_core18256_Create, F_core18256_Delete, F_core18256_Read, F_core18256_Select, F_core18256_Update, F_core26965, F_core26965_Create, F_core26965_Delete, F_core26965_Update, F_core27311, F_core27311_Create, F_core27311_Delete, F_core27311_Read, F_core27311_Update, F_core35923, F_core38677, F_core38677_ReadUser, F_core38677_Save, F_core38677_ViewMenuPermissions, F_core40207, F_core40207_Create, F_core40207_Delete, F_core40207_Read, F_core40207_Update, F_core47643, F_core47643_Delete, F_core47643_Form, F_core47643_Read, F_core60524, F_core64229, F_core64229_Delete, F_core64229_Form, F_core64229_Read, F_core71678, F_core71678_ChangePermission, F_core71678_Create, F_core71678_Delete, F_core71678_Read, F_core71678_Update, F_core76318, F_core76318_Create, F_core76318_Delete, F_core76318_Update, F_core83092, F_core83092_ReadUser, F_core83092_Save, F_core83092_ViewMenuPermissions, type I_core38677_User, type I_core60524_AQModule, type I_core71678_Read, type I_core83092_RolePermission,
|
545
|
+
export { F_authenticate_Login, F_authenticate_Logout, F_authenticate_SplashPage, F_core12196, F_core12196_Create, F_core12196_Delete, F_core12196_Read, F_core12196_Update, F_core16209, F_core16209_Create, F_core16209_Delete, F_core16209_Update, F_core18256, F_core18256_Create, F_core18256_Delete, F_core18256_Read, F_core18256_Select, F_core18256_Update, F_core26965, F_core26965_Create, F_core26965_Delete, F_core26965_Update, F_core27311, F_core27311_Create, F_core27311_Delete, F_core27311_Read, F_core27311_Update, F_core35923, F_core38677, F_core38677_ReadUser, F_core38677_Save, F_core38677_ViewMenuPermissions, F_core40207, F_core40207_Create, F_core40207_Delete, F_core40207_Read, F_core40207_Update, F_core47643, F_core47643_Delete, F_core47643_Form, F_core47643_Read, F_core60524, F_core64229, F_core64229_Delete, F_core64229_Form, F_core64229_Read, F_core71678, F_core71678_ChangePermission, F_core71678_Create, F_core71678_Delete, F_core71678_Read, F_core71678_Update, F_core76318, F_core76318_Create, F_core76318_Delete, F_core76318_Update, F_core83092, F_core83092_ReadUser, F_core83092_Save, F_core83092_ViewMenuPermissions, type I_core38677_User, type I_core60524_AQModule, type I_core71678_Read, type I_core83092_RolePermission, useS_authenticate, useS_core60524, useS_core83092, utils_core83092_mergePage };
|
@@ -25,15 +25,12 @@ import {
|
|
25
25
|
useS_BasicAppShell,
|
26
26
|
useS_authenticate,
|
27
27
|
utils_layout_getItemsWithoutLinks
|
28
|
-
} from "../chunk-
|
28
|
+
} from "../chunk-GQCLEMLW.mjs";
|
29
29
|
import {
|
30
30
|
baseAxios_default,
|
31
31
|
useQ_AQ_GetAQModule,
|
32
32
|
useQ_SkillCenter_GetAll
|
33
33
|
} from "../chunk-J76K4YUA.mjs";
|
34
|
-
import {
|
35
|
-
createGenericStore
|
36
|
-
} from "../chunk-Y3YGC5IH.mjs";
|
37
34
|
import {
|
38
35
|
U0DateToDDMMYYYString,
|
39
36
|
U0MyValidateEmail,
|
@@ -44,6 +41,9 @@ import "../chunk-5U2JSHSJ.mjs";
|
|
44
41
|
import {
|
45
42
|
utils_notification_show
|
46
43
|
} from "../chunk-7ZCOFATU.mjs";
|
44
|
+
import {
|
45
|
+
createGenericStore
|
46
|
+
} from "../chunk-Y3YGC5IH.mjs";
|
47
47
|
import {
|
48
48
|
__objRest,
|
49
49
|
__spreadProps,
|
@@ -2461,7 +2461,7 @@ import { Button as Button2, Group as Group3 } from "@mantine/core";
|
|
2461
2461
|
import { IconShield } from "@tabler/icons-react";
|
2462
2462
|
import { useQuery as useQuery13 } from "@tanstack/react-query";
|
2463
2463
|
import { useRouter } from "next/navigation";
|
2464
|
-
import { useMemo as useMemo11
|
2464
|
+
import { useMemo as useMemo11 } from "react";
|
2465
2465
|
|
2466
2466
|
// src/modules-features/admin/core/core71678/F_core71678_ChangePermission.tsx
|
2467
2467
|
import { Button, Fieldset, Group as Group2, Table as Table2 } from "@mantine/core";
|
@@ -2574,7 +2574,7 @@ import { useForm as useForm16 } from "@mantine/form";
|
|
2574
2574
|
import { jsx as jsx48, jsxs as jsxs32 } from "react/jsx-runtime";
|
2575
2575
|
var ENDPOINT2 = "/Account/create";
|
2576
2576
|
function F_core71678_Create() {
|
2577
|
-
var _a;
|
2577
|
+
var _a, _b;
|
2578
2578
|
const skillCenter_getAll_query = useQ_SkillCenter_GetAll();
|
2579
2579
|
const form = useForm16({
|
2580
2580
|
initialValues: {
|
@@ -2590,7 +2590,6 @@ function F_core71678_Create() {
|
|
2590
2590
|
}
|
2591
2591
|
});
|
2592
2592
|
async function handleSubmit() {
|
2593
|
-
var _a2;
|
2594
2593
|
const formValues = form.getValues();
|
2595
2594
|
return await baseAxios_default.post(ENDPOINT2, __spreadProps(__spreadValues({}, form.getValues()), {
|
2596
2595
|
passwordHash: "",
|
@@ -2605,15 +2604,7 @@ function F_core71678_Create() {
|
|
2605
2604
|
fileName: "",
|
2606
2605
|
fileExtension: "",
|
2607
2606
|
fileBase64String: ""
|
2608
|
-
}
|
2609
|
-
userSkillCenters: (_a2 = formValues.userSkillCenters) == null ? void 0 : _a2.map((item) => ({
|
2610
|
-
id: 0,
|
2611
|
-
code: "string",
|
2612
|
-
name: "string",
|
2613
|
-
concurrencyStamp: "string",
|
2614
|
-
isEnabled: true,
|
2615
|
-
skillCenterId: parseInt(item.toString())
|
2616
|
-
}))
|
2607
|
+
}
|
2617
2608
|
}));
|
2618
2609
|
}
|
2619
2610
|
return /* @__PURE__ */ jsxs32(MyButtonCreate, { form, onSubmit: handleSubmit, objectName: "ng\u01B0\u1EDDi d\xF9ng", children: [
|
@@ -2625,7 +2616,7 @@ function F_core71678_Create() {
|
|
2625
2616
|
/* @__PURE__ */ jsx48(MyTextInput, __spreadValues({ label: "S\u1ED1 \u0111i\u1EC7n tho\u1EA1i" }, form.getInputProps("phoneNumber"))),
|
2626
2617
|
skillCenter_getAll_query.data && /* @__PURE__ */ jsx48(
|
2627
2618
|
MultiSelect,
|
2628
|
-
|
2619
|
+
{
|
2629
2620
|
label: "Trung t\xE2m k\u1EF9 n\u0103ng",
|
2630
2621
|
placeholder: "Ch\u1ECDn trung t\xE2m k\u1EF9 n\u0103ng",
|
2631
2622
|
data: (_a = skillCenter_getAll_query.data) == null ? void 0 : _a.map((item) => {
|
@@ -2634,8 +2625,22 @@ function F_core71678_Create() {
|
|
2634
2625
|
label: item.name,
|
2635
2626
|
value: (_a2 = item.id) == null ? void 0 : _a2.toString()
|
2636
2627
|
};
|
2628
|
+
}),
|
2629
|
+
onChange: (e) => {
|
2630
|
+
form.setFieldValue("userSkillCenters", e.map((item) => ({
|
2631
|
+
id: 0,
|
2632
|
+
code: "string",
|
2633
|
+
name: "string",
|
2634
|
+
concurrencyStamp: "string",
|
2635
|
+
isEnabled: true,
|
2636
|
+
skillCenterId: parseInt(item.toString())
|
2637
|
+
})));
|
2638
|
+
},
|
2639
|
+
value: (_b = form.getValues().userSkillCenters) == null ? void 0 : _b.map((item) => {
|
2640
|
+
var _a2;
|
2641
|
+
return (_a2 = item.id) == null ? void 0 : _a2.toString();
|
2637
2642
|
})
|
2638
|
-
}
|
2643
|
+
}
|
2639
2644
|
)
|
2640
2645
|
] });
|
2641
2646
|
}
|
@@ -2656,7 +2661,6 @@ function F_core71678_Delete({ id, code }) {
|
|
2656
2661
|
// src/modules-features/admin/core/core71678/F_core71678_Update.tsx
|
2657
2662
|
import { MultiSelect as MultiSelect2 } from "@mantine/core";
|
2658
2663
|
import { useForm as useForm17 } from "@mantine/form";
|
2659
|
-
import { useEffect as useEffect7 } from "react";
|
2660
2664
|
import { jsx as jsx50, jsxs as jsxs33 } from "react/jsx-runtime";
|
2661
2665
|
function F_core71678_Update({ user }) {
|
2662
2666
|
var _a;
|
@@ -2664,9 +2668,6 @@ function F_core71678_Update({ user }) {
|
|
2664
2668
|
const form = useForm17({
|
2665
2669
|
initialValues: user
|
2666
2670
|
});
|
2667
|
-
useEffect7(() => {
|
2668
|
-
console.log(form.values);
|
2669
|
-
}, [form.values]);
|
2670
2671
|
return /* @__PURE__ */ jsx50(MyActionIconUpdate, { form, onSubmit: async (values) => {
|
2671
2672
|
var _a2;
|
2672
2673
|
const formValues = form.getValues();
|
@@ -2679,8 +2680,8 @@ function F_core71678_Update({ user }) {
|
|
2679
2680
|
isBlocked: false,
|
2680
2681
|
isEnabled: true,
|
2681
2682
|
workingUnitId: null,
|
2682
|
-
userSkillCenters: (_a2 = formValues.
|
2683
|
-
id:
|
2683
|
+
userSkillCenters: (_a2 = formValues.userSkillCentersIds) == null ? void 0 : _a2.map((item, idx) => ({
|
2684
|
+
id: formValues.userSkillCenters[idx].id,
|
2684
2685
|
code: "string",
|
2685
2686
|
name: "string",
|
2686
2687
|
concurrencyStamp: "string",
|
@@ -2697,7 +2698,7 @@ function F_core71678_Update({ user }) {
|
|
2697
2698
|
/* @__PURE__ */ jsx50(MyTextInput, __spreadValues({ label: "S\u1ED1 \u0111i\u1EC7n tho\u1EA1i" }, form.getInputProps("phoneNumber"))),
|
2698
2699
|
skillCenter_getAll_query.data && /* @__PURE__ */ jsx50(
|
2699
2700
|
MultiSelect2,
|
2700
|
-
{
|
2701
|
+
__spreadValues({
|
2701
2702
|
label: "Trung t\xE2m k\u1EF9 n\u0103ng",
|
2702
2703
|
placeholder: "Ch\u1ECDn trung t\xE2m k\u1EF9 n\u0103ng",
|
2703
2704
|
data: (_a = skillCenter_getAll_query.data) == null ? void 0 : _a.map((item) => {
|
@@ -2707,7 +2708,7 @@ function F_core71678_Update({ user }) {
|
|
2707
2708
|
value: (_a2 = item.id) == null ? void 0 : _a2.toString()
|
2708
2709
|
};
|
2709
2710
|
})
|
2710
|
-
}
|
2711
|
+
}, form.getInputProps("userSkillCentersIds"))
|
2711
2712
|
)
|
2712
2713
|
] }) });
|
2713
2714
|
}
|
@@ -2717,7 +2718,6 @@ import { jsx as jsx51, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
2717
2718
|
var ENDPOINT4 = "/Account/GetAdminAccount";
|
2718
2719
|
function F_core71678_Read() {
|
2719
2720
|
const router = useRouter();
|
2720
|
-
const [rowSelection, setRowSelection] = useState5({});
|
2721
2721
|
const AllUserQuery = useQuery13({
|
2722
2722
|
queryKey: ["F_core71678_Read"],
|
2723
2723
|
queryFn: async () => {
|
@@ -3006,12 +3006,12 @@ import { Grid as Grid4, Paper as Paper7, ScrollArea as ScrollArea4 } from "@mant
|
|
3006
3006
|
// src/modules-features/admin/core/core83092/F_core83092_ReadUser.tsx
|
3007
3007
|
import { Container as Container2 } from "@mantine/core";
|
3008
3008
|
import { useQuery as useQuery15 } from "@tanstack/react-query";
|
3009
|
-
import { useEffect as
|
3009
|
+
import { useEffect as useEffect7, useMemo as useMemo13, useState as useState5 } from "react";
|
3010
3010
|
import { jsx as jsx58 } from "react/jsx-runtime";
|
3011
3011
|
function F_core83092_ReadUser() {
|
3012
3012
|
const store = useS_core83092();
|
3013
3013
|
const query = useQ_core83092_Account_GetAdminAccount();
|
3014
|
-
const [rowSelection, setRowSelection] =
|
3014
|
+
const [rowSelection, setRowSelection] = useState5({});
|
3015
3015
|
const columns = useMemo13(
|
3016
3016
|
() => [
|
3017
3017
|
{
|
@@ -3030,11 +3030,11 @@ function F_core83092_ReadUser() {
|
|
3030
3030
|
setRowSelection({ [rowId]: true });
|
3031
3031
|
store.setProperty("roleId", parseInt(rowId));
|
3032
3032
|
};
|
3033
|
-
|
3033
|
+
useEffect7(() => {
|
3034
3034
|
if (store.state.roleId == 0) return;
|
3035
3035
|
setRowSelection({ [store.state.roleId]: true });
|
3036
3036
|
}, [store.state.roleId]);
|
3037
|
-
|
3037
|
+
useEffect7(() => {
|
3038
3038
|
if (!query.data) return;
|
3039
3039
|
store.setProperty("roleId", query.data[0].id);
|
3040
3040
|
}, [query.data]);
|
@@ -3075,11 +3075,11 @@ function useQ_core83092_Account_GetAdminAccount() {
|
|
3075
3075
|
|
3076
3076
|
// src/modules-features/admin/core/core83092/F_core83092_Save.tsx
|
3077
3077
|
import { useMutation as useMutation4 } from "@tanstack/react-query";
|
3078
|
-
import { useEffect as
|
3078
|
+
import { useEffect as useEffect8, useState as useState6 } from "react";
|
3079
3079
|
import { jsx as jsx59 } from "react/jsx-runtime";
|
3080
3080
|
function F_core83092_Save() {
|
3081
3081
|
const store = useS_core83092();
|
3082
|
-
const disable =
|
3082
|
+
const disable = useState6(false);
|
3083
3083
|
const mutation = useMutation4({
|
3084
3084
|
mutationFn: async (body) => {
|
3085
3085
|
const res = await baseAxios_default.put("/Role/UpdateUserPermission", body);
|
@@ -3098,7 +3098,7 @@ function F_core83092_Save() {
|
|
3098
3098
|
}
|
3099
3099
|
});
|
3100
3100
|
}
|
3101
|
-
|
3101
|
+
useEffect8(() => {
|
3102
3102
|
if (!store.state.rolePermissions || store.state.rolePermissions.length == 0) {
|
3103
3103
|
disable[1](true);
|
3104
3104
|
return;
|
@@ -3112,18 +3112,18 @@ function F_core83092_Save() {
|
|
3112
3112
|
import { Checkbox as Checkbox2, Flex as Flex2, ScrollArea as ScrollArea3, Table as Table3, Text as Text2 } from "@mantine/core";
|
3113
3113
|
import { IconEdit as IconEdit2, IconEyeUp as IconEyeUp2, IconFileExport as IconFileExport2, IconPlus as IconPlus2, IconPrinter as IconPrinter2, IconTrash as IconTrash2 } from "@tabler/icons-react";
|
3114
3114
|
import { useQuery as useQuery16 } from "@tanstack/react-query";
|
3115
|
-
import React3, { useEffect as
|
3115
|
+
import React3, { useEffect as useEffect9, useState as useState7 } from "react";
|
3116
3116
|
import { jsx as jsx60, jsxs as jsxs38 } from "react/jsx-runtime";
|
3117
3117
|
var title2 = "Danh s\xE1ch ch\u1EE9c n\u0103ng";
|
3118
3118
|
function F_core83092_ViewMenuPermissions({ menuData: menuData2 }) {
|
3119
3119
|
var _a, _b;
|
3120
3120
|
const store = useS_core83092();
|
3121
3121
|
const query = useGetUserPermission2({ menuData: menuData2 });
|
3122
|
-
const list =
|
3123
|
-
|
3122
|
+
const list = useState7([]);
|
3123
|
+
useEffect9(() => {
|
3124
3124
|
list[1](groupToTwoLevels(menuData2));
|
3125
3125
|
}, []);
|
3126
|
-
|
3126
|
+
useEffect9(() => {
|
3127
3127
|
if (!query.data) return;
|
3128
3128
|
store.setProperty("rolePermissions", query.data);
|
3129
3129
|
}, [query.data]);
|
@@ -3345,597 +3345,21 @@ function F_core83092({ menuData: menuData2 }) {
|
|
3345
3345
|
] });
|
3346
3346
|
}
|
3347
3347
|
|
3348
|
-
// src/modules-features/admin/core/MainDashboard/BarChart_CourseStatus.tsx
|
3349
|
-
import { BarChart } from "@mantine/charts";
|
3350
|
-
import { Group as Group4, Paper as Paper8, Text as Text3, useMantineColorScheme } from "@mantine/core";
|
3351
|
-
import { Fragment, jsx as jsx62, jsxs as jsxs40 } from "react/jsx-runtime";
|
3352
|
-
|
3353
|
-
// src/modules-features/admin/core/MainDashboard/BarChart_ExamStatus.tsx
|
3354
|
-
import { BarChart as BarChart2 } from "@mantine/charts";
|
3355
|
-
import { Group as Group5, Paper as Paper9, Text as Text4, useMantineColorScheme as useMantineColorScheme2 } from "@mantine/core";
|
3356
|
-
import { Fragment as Fragment2, jsx as jsx63, jsxs as jsxs41 } from "react/jsx-runtime";
|
3357
|
-
|
3358
|
-
// src/modules-features/admin/core/MainDashboard/BarChart_RevenueByAcademicYear.tsx
|
3359
|
-
import { BarChart as BarChart3 } from "@mantine/charts";
|
3360
|
-
import { Group as Group6, Paper as Paper10, Text as Text5, useMantineColorScheme as useMantineColorScheme3 } from "@mantine/core";
|
3361
|
-
import { Fragment as Fragment3, jsx as jsx64, jsxs as jsxs42 } from "react/jsx-runtime";
|
3362
|
-
|
3363
|
-
// src/modules-features/admin/core/MainDashboard/BarChart_StudentStatusIn30Days.tsx
|
3364
|
-
import { BarChart as BarChart4 } from "@mantine/charts";
|
3365
|
-
import { Group as Group7, Paper as Paper11, Text as Text6, useMantineColorScheme as useMantineColorScheme4 } from "@mantine/core";
|
3366
|
-
import { Fragment as Fragment4, jsx as jsx65, jsxs as jsxs43 } from "react/jsx-runtime";
|
3367
|
-
|
3368
|
-
// src/modules-features/admin/core/MainDashboard/HBarChart_CourseDropOutPercentage.tsx
|
3369
|
-
import { BarChart as BarChart5 } from "@mantine/charts";
|
3370
|
-
import { Group as Group8, Paper as Paper12, Text as Text7, useMantineColorScheme as useMantineColorScheme5 } from "@mantine/core";
|
3371
|
-
import { jsx as jsx66, jsxs as jsxs44 } from "react/jsx-runtime";
|
3372
|
-
|
3373
|
-
// src/modules-features/admin/core/MainDashboard/HBarChart_CourseProgressPercentage.tsx
|
3374
|
-
import { BarChart as BarChart6 } from "@mantine/charts";
|
3375
|
-
import { Group as Group9, Paper as Paper13, Text as Text8, useMantineColorScheme as useMantineColorScheme6 } from "@mantine/core";
|
3376
|
-
import { jsx as jsx67, jsxs as jsxs45 } from "react/jsx-runtime";
|
3377
|
-
|
3378
|
-
// src/modules-features/admin/core/MainDashboard/LineChart_RevenueIn12Months.tsx
|
3379
|
-
import { LineChart } from "@mantine/charts";
|
3380
|
-
import { Group as Group10, Paper as Paper14, Text as Text9 } from "@mantine/core";
|
3381
|
-
import { Fragment as Fragment5, jsx as jsx68, jsxs as jsxs46 } from "react/jsx-runtime";
|
3382
|
-
|
3383
|
-
// src/modules-features/admin/core/MainDashboard/LineChart_TotalRevenueByDiscountIn3Months.tsx
|
3384
|
-
import { LineChart as LineChart2 } from "@mantine/charts";
|
3385
|
-
import { Group as Group11, Paper as Paper15, Text as Text10 } from "@mantine/core";
|
3386
|
-
import { Fragment as Fragment6, jsx as jsx69, jsxs as jsxs47 } from "react/jsx-runtime";
|
3387
|
-
|
3388
|
-
// src/modules-features/admin/core/MainDashboard/LineChart_TotalRevenueByVoucherIn3Months.tsx
|
3389
|
-
import { LineChart as LineChart3 } from "@mantine/charts";
|
3390
|
-
import { Group as Group12, Paper as Paper16, Text as Text11 } from "@mantine/core";
|
3391
|
-
import { Fragment as Fragment7, jsx as jsx70, jsxs as jsxs48 } from "react/jsx-runtime";
|
3392
|
-
|
3393
|
-
// src/modules-features/admin/core/MainDashboard/LineChart_TotalStudentIn12Months.tsx
|
3394
|
-
import { LineChart as LineChart4 } from "@mantine/charts";
|
3395
|
-
import { Group as Group13, Paper as Paper17, Text as Text12 } from "@mantine/core";
|
3396
|
-
import { Fragment as Fragment8, jsx as jsx71, jsxs as jsxs49 } from "react/jsx-runtime";
|
3397
|
-
|
3398
|
-
// src/modules-features/admin/core/MainDashboard/ViewDiscountStat.tsx
|
3399
|
-
import { Center as Center2, Progress, Space as Space5, Text as Text13 } from "@mantine/core";
|
3400
|
-
import { PieChart } from "@mantine/charts";
|
3401
|
-
import { useMemo as useMemo14 } from "react";
|
3402
|
-
import { Fragment as Fragment9, jsx as jsx72, jsxs as jsxs50 } from "react/jsx-runtime";
|
3403
|
-
function getRandomColor(seed) {
|
3404
|
-
const random = Math.sin(seed) * 1e4;
|
3405
|
-
const color = `#${Math.floor((random - Math.floor(random)) * 16777215).toString(16).padStart(6, "0")}`;
|
3406
|
-
return color;
|
3407
|
-
}
|
3408
|
-
var data_used_discountCode = [
|
3409
|
-
{ name: "DSC01", value: 54, color: getRandomColor(1) },
|
3410
|
-
{ name: "DSC02", value: 32, color: getRandomColor(2) },
|
3411
|
-
{ name: "DSC03", value: 5, color: getRandomColor(3) },
|
3412
|
-
{ name: "DSC04", value: 20, color: getRandomColor(4) },
|
3413
|
-
{ name: "DSC05", value: 12, color: getRandomColor(5) },
|
3414
|
-
{ name: "DSC06", value: 45, color: getRandomColor(6) },
|
3415
|
-
{ name: "DSC07", value: 23, color: getRandomColor(7) },
|
3416
|
-
{ name: "DSC08", value: 34, color: getRandomColor(8) },
|
3417
|
-
{ name: "DSC09", value: 29, color: getRandomColor(9) },
|
3418
|
-
{ name: "DSC10", value: 18, color: getRandomColor(10) },
|
3419
|
-
{ name: "DSC11", value: 37, color: getRandomColor(11) },
|
3420
|
-
{ name: "DSC12", value: 22, color: getRandomColor(12) },
|
3421
|
-
{ name: "DSC13", value: 41, color: getRandomColor(13) },
|
3422
|
-
{ name: "DSC14", value: 27, color: getRandomColor(14) },
|
3423
|
-
{ name: "DSC15", value: 33, color: getRandomColor(15) },
|
3424
|
-
{ name: "DSC16", value: 19, color: getRandomColor(16) },
|
3425
|
-
{ name: "DSC17", value: 25, color: getRandomColor(17) },
|
3426
|
-
{ name: "DSC18", value: 30, color: getRandomColor(18) },
|
3427
|
-
{ name: "DSC19", value: 21, color: getRandomColor(19) },
|
3428
|
-
{ name: "DSC20", value: 26, color: getRandomColor(20) }
|
3429
|
-
];
|
3430
|
-
var mockData = [
|
3431
|
-
{
|
3432
|
-
code: "DSC01",
|
3433
|
-
name: "Discount Code 1",
|
3434
|
-
total: 100,
|
3435
|
-
used: 54,
|
3436
|
-
color: getRandomColor(1)
|
3437
|
-
},
|
3438
|
-
{
|
3439
|
-
code: "DSC02",
|
3440
|
-
name: "Discount Code 2",
|
3441
|
-
total: 150,
|
3442
|
-
used: 32,
|
3443
|
-
color: getRandomColor(2)
|
3444
|
-
},
|
3445
|
-
{
|
3446
|
-
code: "DSC03",
|
3447
|
-
name: "Discount Code 3",
|
3448
|
-
total: 10,
|
3449
|
-
used: 5,
|
3450
|
-
color: getRandomColor(3)
|
3451
|
-
},
|
3452
|
-
{
|
3453
|
-
code: "DSC04",
|
3454
|
-
name: "Discount Code 4",
|
3455
|
-
total: 100,
|
3456
|
-
used: 20,
|
3457
|
-
color: getRandomColor(4)
|
3458
|
-
},
|
3459
|
-
{
|
3460
|
-
code: "DSC05",
|
3461
|
-
name: "Discount Code 5",
|
3462
|
-
total: 100,
|
3463
|
-
used: 12,
|
3464
|
-
color: getRandomColor(5)
|
3465
|
-
},
|
3466
|
-
{
|
3467
|
-
code: "DSC06",
|
3468
|
-
name: "Discount Code 6",
|
3469
|
-
total: 100,
|
3470
|
-
used: 45,
|
3471
|
-
color: getRandomColor(6)
|
3472
|
-
},
|
3473
|
-
{
|
3474
|
-
code: "DSC07",
|
3475
|
-
name: "Discount Code 7",
|
3476
|
-
total: 100,
|
3477
|
-
used: 23,
|
3478
|
-
color: getRandomColor(7)
|
3479
|
-
},
|
3480
|
-
{
|
3481
|
-
code: "DSC08",
|
3482
|
-
name: "Discount Code 8",
|
3483
|
-
total: 100,
|
3484
|
-
used: 34,
|
3485
|
-
color: getRandomColor(8)
|
3486
|
-
},
|
3487
|
-
{
|
3488
|
-
code: "DSC09",
|
3489
|
-
name: "Discount Code 9",
|
3490
|
-
total: 100,
|
3491
|
-
used: 29,
|
3492
|
-
color: getRandomColor(9)
|
3493
|
-
},
|
3494
|
-
{
|
3495
|
-
code: "DSC10",
|
3496
|
-
name: "Discount Code 10",
|
3497
|
-
total: 100,
|
3498
|
-
used: 18,
|
3499
|
-
color: getRandomColor(10)
|
3500
|
-
},
|
3501
|
-
{
|
3502
|
-
code: "DSC11",
|
3503
|
-
name: "Discount Code 11",
|
3504
|
-
total: 100,
|
3505
|
-
used: 37,
|
3506
|
-
color: getRandomColor(11)
|
3507
|
-
},
|
3508
|
-
{
|
3509
|
-
code: "DSC12",
|
3510
|
-
name: "Discount Code 12",
|
3511
|
-
total: 100,
|
3512
|
-
used: 22,
|
3513
|
-
color: getRandomColor(12)
|
3514
|
-
},
|
3515
|
-
{
|
3516
|
-
code: "DSC13",
|
3517
|
-
name: "Discount Code 13",
|
3518
|
-
total: 100,
|
3519
|
-
used: 41,
|
3520
|
-
color: getRandomColor(13)
|
3521
|
-
},
|
3522
|
-
{
|
3523
|
-
code: "DSC14",
|
3524
|
-
name: "Discount Code 14",
|
3525
|
-
total: 100,
|
3526
|
-
used: 27,
|
3527
|
-
color: getRandomColor(14)
|
3528
|
-
},
|
3529
|
-
{
|
3530
|
-
code: "DSC15",
|
3531
|
-
name: "Discount Code 15",
|
3532
|
-
total: 100,
|
3533
|
-
used: 33,
|
3534
|
-
color: getRandomColor(15)
|
3535
|
-
},
|
3536
|
-
{
|
3537
|
-
code: "DSC16",
|
3538
|
-
name: "Discount Code 16",
|
3539
|
-
total: 100,
|
3540
|
-
used: 19,
|
3541
|
-
color: getRandomColor(16)
|
3542
|
-
},
|
3543
|
-
{
|
3544
|
-
code: "DSC17",
|
3545
|
-
name: "Discount Code 17",
|
3546
|
-
total: 100,
|
3547
|
-
used: 25,
|
3548
|
-
color: getRandomColor(17)
|
3549
|
-
},
|
3550
|
-
{
|
3551
|
-
code: "DSC18",
|
3552
|
-
name: "Discount Code 18",
|
3553
|
-
total: 100,
|
3554
|
-
used: 30,
|
3555
|
-
color: getRandomColor(18)
|
3556
|
-
},
|
3557
|
-
{
|
3558
|
-
code: "DSC19",
|
3559
|
-
name: "Discount Code 19",
|
3560
|
-
total: 100,
|
3561
|
-
used: 21,
|
3562
|
-
color: getRandomColor(19)
|
3563
|
-
},
|
3564
|
-
{
|
3565
|
-
code: "DSC20",
|
3566
|
-
name: "Discount Code 20",
|
3567
|
-
total: 100,
|
3568
|
-
used: 26,
|
3569
|
-
color: getRandomColor(20)
|
3570
|
-
}
|
3571
|
-
];
|
3572
|
-
function PieChart_DiscountUsedPercentage() {
|
3573
|
-
const totalDisountCode = mockData.reduce((acc, cur) => acc + cur.used, 0);
|
3574
|
-
const columns = useMemo14(
|
3575
|
-
() => [
|
3576
|
-
{
|
3577
|
-
header: "M\xE0u",
|
3578
|
-
accessorKey: "color",
|
3579
|
-
accessorFn(originalRow) {
|
3580
|
-
return /* @__PURE__ */ jsx72("div", { style: { width: 20, height: 20, backgroundColor: originalRow.color } });
|
3581
|
-
},
|
3582
|
-
minSize: 30,
|
3583
|
-
maxSize: 30
|
3584
|
-
},
|
3585
|
-
{
|
3586
|
-
header: "M\xE3",
|
3587
|
-
accessorKey: "code",
|
3588
|
-
minSize: 20,
|
3589
|
-
maxSize: 20
|
3590
|
-
},
|
3591
|
-
{
|
3592
|
-
header: "%",
|
3593
|
-
accessorKey: "used",
|
3594
|
-
accessorFn(originalRow) {
|
3595
|
-
return /* @__PURE__ */ jsx72(Fragment9, { children: /* @__PURE__ */ jsx72(Center2, { children: /* @__PURE__ */ jsxs50(Text13, { children: [
|
3596
|
-
(originalRow.used / totalDisountCode * 100).toFixed(0),
|
3597
|
-
"%"
|
3598
|
-
] }) }) });
|
3599
|
-
},
|
3600
|
-
minSize: 64,
|
3601
|
-
maxSize: 64
|
3602
|
-
},
|
3603
|
-
{
|
3604
|
-
header: "S\u1ED1 l\u01B0\u1EE3ng s\u1EED d\u1EE5ng",
|
3605
|
-
accessorKey: "value",
|
3606
|
-
accessorFn(originalRow) {
|
3607
|
-
return originalRow.used;
|
3608
|
-
},
|
3609
|
-
Cell: ({ row }) => {
|
3610
|
-
return /* @__PURE__ */ jsxs50(Fragment9, { children: [
|
3611
|
-
/* @__PURE__ */ jsx72(Center2, { children: /* @__PURE__ */ jsxs50(Text13, { children: [
|
3612
|
-
"\u0110\xE3 s\u1EED d\u1EE5ng: ",
|
3613
|
-
/* @__PURE__ */ jsxs50("strong", { children: [
|
3614
|
-
row.original.used,
|
3615
|
-
" / ",
|
3616
|
-
row.original.total
|
3617
|
-
] }),
|
3618
|
-
" - (",
|
3619
|
-
(row.original.used / row.original.total * 100).toFixed(2),
|
3620
|
-
"%)"
|
3621
|
-
] }) }),
|
3622
|
-
/* @__PURE__ */ jsx72(Progress, { color: "yellow", radius: "xs", size: "lg", value: row.original.used / row.original.total * 100 })
|
3623
|
-
] });
|
3624
|
-
},
|
3625
|
-
minSize: 50,
|
3626
|
-
maxSize: 50
|
3627
|
-
}
|
3628
|
-
],
|
3629
|
-
[]
|
3630
|
-
);
|
3631
|
-
return /* @__PURE__ */ jsx72(Fragment9, { children: /* @__PURE__ */ jsxs50(MyFlexColumn, { children: [
|
3632
|
-
/* @__PURE__ */ jsx72(Text13, { mb: "20", children: "Bi\u1EC3u \u0111\u1ED3 ph\u1EA7n tr\u0103m s\u1EED d\u1EE5ng chi\u1EBFt kh\u1EA5u h\u1ECDc vi\xEAn trong 60 ng\xE0y qua" }),
|
3633
|
-
/* @__PURE__ */ jsx72(Center2, { children: /* @__PURE__ */ jsx72(
|
3634
|
-
PieChart,
|
3635
|
-
{
|
3636
|
-
startAngle: 90,
|
3637
|
-
endAngle: -270,
|
3638
|
-
strokeWidth: 0,
|
3639
|
-
withLabelsLine: true,
|
3640
|
-
labelsPosition: "outside",
|
3641
|
-
withLabels: true,
|
3642
|
-
labelsType: "percent",
|
3643
|
-
data: data_used_discountCode
|
3644
|
-
}
|
3645
|
-
) }),
|
3646
|
-
/* @__PURE__ */ jsx72(Space5, { mt: 5 }),
|
3647
|
-
/* @__PURE__ */ jsx72(
|
3648
|
-
MyDataTable,
|
3649
|
-
{
|
3650
|
-
data: mockData,
|
3651
|
-
columns,
|
3652
|
-
initialState: {
|
3653
|
-
density: "xs",
|
3654
|
-
pagination: { pageIndex: 0, pageSize: 5 }
|
3655
|
-
}
|
3656
|
-
}
|
3657
|
-
)
|
3658
|
-
] }) });
|
3659
|
-
}
|
3660
|
-
|
3661
|
-
// src/modules-features/admin/core/MainDashboard/ViewVoucherStat.tsx
|
3662
|
-
import { Center as Center3, Progress as Progress2, Space as Space6, Text as Text14 } from "@mantine/core";
|
3663
|
-
import { PieChart as PieChart2 } from "@mantine/charts";
|
3664
|
-
import { useMemo as useMemo15 } from "react";
|
3665
|
-
import { Fragment as Fragment10, jsx as jsx73, jsxs as jsxs51 } from "react/jsx-runtime";
|
3666
|
-
function getRandomColor2(seed) {
|
3667
|
-
const random = Math.sin(seed) * 1e4;
|
3668
|
-
const color = `#${Math.floor((random - Math.floor(random)) * 16777215).toString(16).padStart(6, "0")}`;
|
3669
|
-
return color;
|
3670
|
-
}
|
3671
|
-
var data_used_discountCode2 = [
|
3672
|
-
{ name: "VOU01", value: 124, color: getRandomColor2(1) },
|
3673
|
-
{ name: "VOU02", value: 34, color: getRandomColor2(2) },
|
3674
|
-
{ name: "VOU03", value: 23, color: getRandomColor2(3) },
|
3675
|
-
{ name: "VOU04", value: 34, color: getRandomColor2(4) },
|
3676
|
-
{ name: "VOU05", value: 46, color: getRandomColor2(5) },
|
3677
|
-
{ name: "VOU06", value: 123, color: getRandomColor2(6) },
|
3678
|
-
{ name: "VOU07", value: 87, color: getRandomColor2(7) },
|
3679
|
-
{ name: "VOU08", value: 25, color: getRandomColor2(8) },
|
3680
|
-
{ name: "VOU09", value: 34, color: getRandomColor2(9) },
|
3681
|
-
{ name: "VOU10", value: 67, color: getRandomColor2(10) },
|
3682
|
-
{ name: "VOU11", value: 23, color: getRandomColor2(11) },
|
3683
|
-
{ name: "VOU12", value: 98, color: getRandomColor2(12) },
|
3684
|
-
{ name: "VOU13", value: 54, color: getRandomColor2(13) },
|
3685
|
-
{ name: "VOU14", value: 27, color: getRandomColor2(14) },
|
3686
|
-
{ name: "VOU15", value: 3, color: getRandomColor2(15) },
|
3687
|
-
{ name: "VOU16", value: 56, color: getRandomColor2(16) },
|
3688
|
-
{ name: "VOU17", value: 85, color: getRandomColor2(17) },
|
3689
|
-
{ name: "VOU18", value: 45, color: getRandomColor2(18) },
|
3690
|
-
{ name: "VOU19", value: 64, color: getRandomColor2(19) },
|
3691
|
-
{ name: "VOU20", value: 12, color: getRandomColor2(20) }
|
3692
|
-
];
|
3693
|
-
var mockData2 = [
|
3694
|
-
{
|
3695
|
-
code: "VOU01",
|
3696
|
-
name: "Voucher Code 1",
|
3697
|
-
total: 150,
|
3698
|
-
used: 124,
|
3699
|
-
color: getRandomColor2(1)
|
3700
|
-
},
|
3701
|
-
{
|
3702
|
-
code: "VOU02",
|
3703
|
-
name: "Voucher Code 2",
|
3704
|
-
total: 150,
|
3705
|
-
used: 34,
|
3706
|
-
color: getRandomColor2(2)
|
3707
|
-
},
|
3708
|
-
{
|
3709
|
-
code: "VOU03",
|
3710
|
-
name: "Voucher Code 3",
|
3711
|
-
total: 50,
|
3712
|
-
used: 23,
|
3713
|
-
color: getRandomColor2(3)
|
3714
|
-
},
|
3715
|
-
{
|
3716
|
-
code: "VOU04",
|
3717
|
-
name: "Voucher Code 4",
|
3718
|
-
total: 100,
|
3719
|
-
used: 34,
|
3720
|
-
color: getRandomColor2(4)
|
3721
|
-
},
|
3722
|
-
{
|
3723
|
-
code: "VOU05",
|
3724
|
-
name: "Voucher Code 5",
|
3725
|
-
total: 100,
|
3726
|
-
used: 46,
|
3727
|
-
color: getRandomColor2(5)
|
3728
|
-
},
|
3729
|
-
{
|
3730
|
-
code: "VOU06",
|
3731
|
-
name: "Voucher Code 6",
|
3732
|
-
total: 130,
|
3733
|
-
used: 123,
|
3734
|
-
color: getRandomColor2(6)
|
3735
|
-
},
|
3736
|
-
{
|
3737
|
-
code: "VOU07",
|
3738
|
-
name: "Voucher Code 7",
|
3739
|
-
total: 100,
|
3740
|
-
used: 87,
|
3741
|
-
color: getRandomColor2(7)
|
3742
|
-
},
|
3743
|
-
{
|
3744
|
-
code: "VOU08",
|
3745
|
-
name: "Voucher Code 8",
|
3746
|
-
total: 100,
|
3747
|
-
used: 25,
|
3748
|
-
color: getRandomColor2(8)
|
3749
|
-
},
|
3750
|
-
{
|
3751
|
-
code: "VOU09",
|
3752
|
-
name: "Voucher Code 9",
|
3753
|
-
total: 100,
|
3754
|
-
used: 34,
|
3755
|
-
color: getRandomColor2(9)
|
3756
|
-
},
|
3757
|
-
{
|
3758
|
-
code: "VOU10",
|
3759
|
-
name: "Voucher Code 10",
|
3760
|
-
total: 100,
|
3761
|
-
used: 67,
|
3762
|
-
color: getRandomColor2(10)
|
3763
|
-
},
|
3764
|
-
{
|
3765
|
-
code: "VOU11",
|
3766
|
-
name: "Voucher Code 11",
|
3767
|
-
total: 100,
|
3768
|
-
used: 23,
|
3769
|
-
color: getRandomColor2(11)
|
3770
|
-
},
|
3771
|
-
{
|
3772
|
-
code: "VOU12",
|
3773
|
-
name: "Voucher Code 12",
|
3774
|
-
total: 100,
|
3775
|
-
used: 98,
|
3776
|
-
color: getRandomColor2(12)
|
3777
|
-
},
|
3778
|
-
{
|
3779
|
-
code: "VOU13",
|
3780
|
-
name: "Voucher Code 13",
|
3781
|
-
total: 100,
|
3782
|
-
used: 54,
|
3783
|
-
color: getRandomColor2(13)
|
3784
|
-
},
|
3785
|
-
{
|
3786
|
-
code: "VOU14",
|
3787
|
-
name: "Voucher Code 14",
|
3788
|
-
total: 100,
|
3789
|
-
used: 27,
|
3790
|
-
color: getRandomColor2(14)
|
3791
|
-
},
|
3792
|
-
{
|
3793
|
-
code: "VOU15",
|
3794
|
-
name: "Voucher Code 15",
|
3795
|
-
total: 100,
|
3796
|
-
used: 3,
|
3797
|
-
color: getRandomColor2(15)
|
3798
|
-
},
|
3799
|
-
{
|
3800
|
-
code: "VOU16",
|
3801
|
-
name: "Voucher Code 16",
|
3802
|
-
total: 100,
|
3803
|
-
used: 56,
|
3804
|
-
color: getRandomColor2(16)
|
3805
|
-
},
|
3806
|
-
{
|
3807
|
-
code: "VOU17",
|
3808
|
-
name: "Voucher Code 17",
|
3809
|
-
total: 100,
|
3810
|
-
used: 85,
|
3811
|
-
color: getRandomColor2(17)
|
3812
|
-
},
|
3813
|
-
{
|
3814
|
-
code: "VOU18",
|
3815
|
-
name: "Voucher Code 18",
|
3816
|
-
total: 100,
|
3817
|
-
used: 45,
|
3818
|
-
color: getRandomColor2(18)
|
3819
|
-
},
|
3820
|
-
{
|
3821
|
-
code: "VOU19",
|
3822
|
-
name: "Voucher Code 19",
|
3823
|
-
total: 100,
|
3824
|
-
used: 64,
|
3825
|
-
color: getRandomColor2(19)
|
3826
|
-
},
|
3827
|
-
{
|
3828
|
-
code: "VOU20",
|
3829
|
-
name: "Voucher Code 20",
|
3830
|
-
total: 100,
|
3831
|
-
used: 12,
|
3832
|
-
color: getRandomColor2(20)
|
3833
|
-
}
|
3834
|
-
];
|
3835
|
-
function PieChart_VoucherUsedPercentage() {
|
3836
|
-
const totalVoucherCode = mockData2.reduce((acc, cur) => acc + cur.used, 0);
|
3837
|
-
const columns = useMemo15(
|
3838
|
-
() => [
|
3839
|
-
{
|
3840
|
-
header: "M\xE0u",
|
3841
|
-
accessorKey: "color",
|
3842
|
-
accessorFn(originalRow) {
|
3843
|
-
return /* @__PURE__ */ jsx73("div", { style: { width: 20, height: 20, backgroundColor: originalRow.color } });
|
3844
|
-
},
|
3845
|
-
minSize: 30,
|
3846
|
-
maxSize: 30
|
3847
|
-
},
|
3848
|
-
{
|
3849
|
-
header: "M\xE3",
|
3850
|
-
accessorKey: "code",
|
3851
|
-
minSize: 20,
|
3852
|
-
maxSize: 20
|
3853
|
-
},
|
3854
|
-
{
|
3855
|
-
header: "%",
|
3856
|
-
accessorKey: "used",
|
3857
|
-
accessorFn(originalRow) {
|
3858
|
-
return /* @__PURE__ */ jsx73(Fragment10, { children: /* @__PURE__ */ jsx73(Center3, { children: /* @__PURE__ */ jsxs51(Text14, { children: [
|
3859
|
-
(originalRow.used / totalVoucherCode * 100).toFixed(0),
|
3860
|
-
"%"
|
3861
|
-
] }) }) });
|
3862
|
-
},
|
3863
|
-
minSize: 64,
|
3864
|
-
maxSize: 64
|
3865
|
-
},
|
3866
|
-
{
|
3867
|
-
header: "S\u1ED1 l\u01B0\u1EE3ng s\u1EED d\u1EE5ng",
|
3868
|
-
accessorKey: "value",
|
3869
|
-
accessorFn(originalRow) {
|
3870
|
-
return originalRow.used;
|
3871
|
-
},
|
3872
|
-
Cell: ({ row }) => {
|
3873
|
-
return /* @__PURE__ */ jsxs51(Fragment10, { children: [
|
3874
|
-
/* @__PURE__ */ jsx73(Center3, { children: /* @__PURE__ */ jsxs51(Text14, { children: [
|
3875
|
-
"\u0110\xE3 s\u1EED d\u1EE5ng: ",
|
3876
|
-
/* @__PURE__ */ jsxs51("strong", { children: [
|
3877
|
-
row.original.used,
|
3878
|
-
" / ",
|
3879
|
-
row.original.total
|
3880
|
-
] }),
|
3881
|
-
" - (",
|
3882
|
-
(row.original.used / row.original.total * 100).toFixed(2),
|
3883
|
-
"%)"
|
3884
|
-
] }) }),
|
3885
|
-
/* @__PURE__ */ jsx73(Progress2, { color: "yellow", radius: "xs", size: "lg", value: row.original.used / row.original.total * 100 })
|
3886
|
-
] });
|
3887
|
-
},
|
3888
|
-
minSize: 50,
|
3889
|
-
maxSize: 50
|
3890
|
-
}
|
3891
|
-
],
|
3892
|
-
[]
|
3893
|
-
);
|
3894
|
-
return /* @__PURE__ */ jsx73(Fragment10, { children: /* @__PURE__ */ jsxs51(MyFlexColumn, { children: [
|
3895
|
-
/* @__PURE__ */ jsx73(Text14, { mb: "20", children: "Bi\u1EC3u \u0111\u1ED3 ph\u1EA7n tr\u0103m s\u1EED d\u1EE5ng m\xE3 gi\u1EA3m gi\xE1 h\u1ECDc vi\xEAn trong 60 ng\xE0y qua" }),
|
3896
|
-
/* @__PURE__ */ jsx73(Center3, { children: /* @__PURE__ */ jsx73(
|
3897
|
-
PieChart2,
|
3898
|
-
{
|
3899
|
-
startAngle: 90,
|
3900
|
-
endAngle: -270,
|
3901
|
-
strokeWidth: 0,
|
3902
|
-
withLabelsLine: true,
|
3903
|
-
labelsPosition: "outside",
|
3904
|
-
withLabels: true,
|
3905
|
-
labelsType: "percent",
|
3906
|
-
data: data_used_discountCode2
|
3907
|
-
}
|
3908
|
-
) }),
|
3909
|
-
/* @__PURE__ */ jsx73(Space6, { mt: 5 }),
|
3910
|
-
/* @__PURE__ */ jsx73(
|
3911
|
-
MyDataTable,
|
3912
|
-
{
|
3913
|
-
data: mockData2,
|
3914
|
-
columns,
|
3915
|
-
initialState: {
|
3916
|
-
density: "xs",
|
3917
|
-
pagination: { pageIndex: 0, pageSize: 5 }
|
3918
|
-
}
|
3919
|
-
}
|
3920
|
-
)
|
3921
|
-
] }) });
|
3922
|
-
}
|
3923
|
-
|
3924
3348
|
// src/modules-features/authenticate/F_authenticate_SplashPage.tsx
|
3925
3349
|
import { useRouter as useRouter2 } from "next/navigation";
|
3926
|
-
import { useEffect as
|
3927
|
-
import { jsx as
|
3350
|
+
import { useEffect as useEffect10 } from "react";
|
3351
|
+
import { jsx as jsx62 } from "react/jsx-runtime";
|
3928
3352
|
function F_authenticate_SplashPage() {
|
3929
3353
|
const router = useRouter2();
|
3930
3354
|
const S_Authenticate = useS_authenticate();
|
3931
|
-
|
3355
|
+
useEffect10(() => {
|
3932
3356
|
if (S_Authenticate.state.token == "") {
|
3933
3357
|
router.push("/authenticate/login");
|
3934
3358
|
return;
|
3935
3359
|
}
|
3936
3360
|
router.push("/admin/core71678");
|
3937
3361
|
}, [S_Authenticate.state.token]);
|
3938
|
-
return /* @__PURE__ */
|
3362
|
+
return /* @__PURE__ */ jsx62(MyBoxesBackground, { title: "H\u1EC7 th\u1ED1ng th\xF4ng tin qu\u1EA3n l\xED \u0111\xE0o t\u1EA1o ng\u1EAFn h\u1EA1n" });
|
3939
3363
|
}
|
3940
3364
|
|
3941
3365
|
// src/modules-features/authenticate/F_Authenticate_Login/F_authenticate_Login.tsx
|
@@ -3943,13 +3367,13 @@ import {
|
|
3943
3367
|
Anchor,
|
3944
3368
|
BackgroundImage,
|
3945
3369
|
Button as Button3,
|
3946
|
-
Center as
|
3370
|
+
Center as Center2,
|
3947
3371
|
Checkbox as Checkbox3,
|
3948
3372
|
Flex as Flex3,
|
3949
|
-
Group as
|
3950
|
-
Paper as
|
3373
|
+
Group as Group4,
|
3374
|
+
Paper as Paper8,
|
3951
3375
|
PasswordInput as PasswordInput2,
|
3952
|
-
Text as
|
3376
|
+
Text as Text3,
|
3953
3377
|
TextInput as TextInput3,
|
3954
3378
|
Title
|
3955
3379
|
} from "@mantine/core";
|
@@ -3958,13 +3382,13 @@ import { useMutation as useMutation5 } from "@tanstack/react-query";
|
|
3958
3382
|
import axios from "axios";
|
3959
3383
|
import Link from "next/link";
|
3960
3384
|
import { useRouter as useRouter3 } from "next/navigation";
|
3961
|
-
import { useState as
|
3385
|
+
import { useState as useState8 } from "react";
|
3962
3386
|
|
3963
3387
|
// src/modules-features/authenticate/F_Authenticate_Login/css.module.css
|
3964
3388
|
var css_default = {};
|
3965
3389
|
|
3966
3390
|
// src/modules-features/authenticate/F_Authenticate_Login/F_authenticate_Login.tsx
|
3967
|
-
import { jsx as
|
3391
|
+
import { jsx as jsx63, jsxs as jsxs40 } from "react/jsx-runtime";
|
3968
3392
|
function F_authenticate_Login({
|
3969
3393
|
loginInfo,
|
3970
3394
|
redirectUrlAfterLogin = "/admin/dashboard",
|
@@ -3974,7 +3398,7 @@ function F_authenticate_Login({
|
|
3974
3398
|
}) {
|
3975
3399
|
const router = useRouter3();
|
3976
3400
|
const authenticate_store = useS_authenticate();
|
3977
|
-
const loadingState =
|
3401
|
+
const loadingState = useState8(false);
|
3978
3402
|
const mutation = useM_Account_Sigin();
|
3979
3403
|
const form = useForm20({
|
3980
3404
|
mode: "uncontrolled",
|
@@ -4017,21 +3441,21 @@ function F_authenticate_Login({
|
|
4017
3441
|
}
|
4018
3442
|
});
|
4019
3443
|
}
|
4020
|
-
return /* @__PURE__ */
|
3444
|
+
return /* @__PURE__ */ jsx63(
|
4021
3445
|
BackgroundImage,
|
4022
3446
|
{
|
4023
3447
|
src: backgroundImage,
|
4024
3448
|
h: "100vh",
|
4025
|
-
children: /* @__PURE__ */
|
4026
|
-
/* @__PURE__ */
|
4027
|
-
/* @__PURE__ */
|
4028
|
-
/* @__PURE__ */
|
3449
|
+
children: /* @__PURE__ */ jsx63(Center2, { h: "100vh", children: /* @__PURE__ */ jsxs40(Paper8, { withBorder: true, w: 400, m: "md", shadow: "md", p: 30, mt: 30, radius: "md", children: [
|
3450
|
+
/* @__PURE__ */ jsxs40(Flex3, { direction: "column", mb: "md", children: [
|
3451
|
+
/* @__PURE__ */ jsx63(Title, { ta: "center", className: css_default.title, children: "\u0110\u0103ng nh\u1EADp!" }),
|
3452
|
+
/* @__PURE__ */ jsxs40(Text3, { c: "dimmed", size: "sm", ta: "center", mt: 5, children: [
|
4029
3453
|
"B\u1EA1n g\u1EB7p v\u1EA5n \u0111\u1EC1 k\u1EF9 thu\u1EADt?\xA0",
|
4030
|
-
/* @__PURE__ */
|
3454
|
+
/* @__PURE__ */ jsx63(Anchor, { size: "sm", component: "button", children: "V\xE0o link n\xE0y" })
|
4031
3455
|
] })
|
4032
3456
|
] }),
|
4033
|
-
/* @__PURE__ */
|
4034
|
-
/* @__PURE__ */
|
3457
|
+
/* @__PURE__ */ jsx63("form", { onSubmit: form.onSubmit(async (values) => handleSubmit(values.username, values.password)), children: /* @__PURE__ */ jsxs40(MyFlexColumn, { children: [
|
3458
|
+
/* @__PURE__ */ jsx63(
|
4035
3459
|
TextInput3,
|
4036
3460
|
__spreadProps(__spreadValues({}, form.getInputProps("username")), {
|
4037
3461
|
label: "T\xE0i kho\u1EA3n",
|
@@ -4039,7 +3463,7 @@ function F_authenticate_Login({
|
|
4039
3463
|
withAsterisk: true
|
4040
3464
|
})
|
4041
3465
|
),
|
4042
|
-
/* @__PURE__ */
|
3466
|
+
/* @__PURE__ */ jsx63(
|
4043
3467
|
PasswordInput2,
|
4044
3468
|
__spreadProps(__spreadValues({}, form.getInputProps("password")), {
|
4045
3469
|
label: "M\u1EADt kh\u1EA9u",
|
@@ -4047,11 +3471,11 @@ function F_authenticate_Login({
|
|
4047
3471
|
withAsterisk: true
|
4048
3472
|
})
|
4049
3473
|
),
|
4050
|
-
/* @__PURE__ */
|
4051
|
-
/* @__PURE__ */
|
4052
|
-
/* @__PURE__ */
|
3474
|
+
/* @__PURE__ */ jsxs40(Group4, { justify: "space-between", children: [
|
3475
|
+
/* @__PURE__ */ jsx63(Checkbox3, { label: "L\u01B0u \u0111\u0103ng nh\u1EADp" }),
|
3476
|
+
/* @__PURE__ */ jsx63(Anchor, { component: Link, href: "quen-mat-khau", size: "sm", children: "Qu\xEAn m\u1EADt kh\u1EA9u?" })
|
4053
3477
|
] }),
|
4054
|
-
/* @__PURE__ */
|
3478
|
+
/* @__PURE__ */ jsx63(
|
4055
3479
|
Button3,
|
4056
3480
|
{
|
4057
3481
|
loading: loadingState[0],
|
@@ -4137,8 +3561,6 @@ export {
|
|
4137
3561
|
F_core83092_ReadUser,
|
4138
3562
|
F_core83092_Save,
|
4139
3563
|
F_core83092_ViewMenuPermissions,
|
4140
|
-
PieChart_DiscountUsedPercentage,
|
4141
|
-
PieChart_VoucherUsedPercentage,
|
4142
3564
|
useS_authenticate,
|
4143
3565
|
useS_core60524,
|
4144
3566
|
useS_core83092,
|
package/package.json
CHANGED
@@ -2,15 +2,15 @@ import {
|
|
2
2
|
baseAxios_default,
|
3
3
|
useQ_AQ_GetAQModule
|
4
4
|
} from "./chunk-J76K4YUA.mjs";
|
5
|
-
import {
|
6
|
-
createGenericStore
|
7
|
-
} from "./chunk-Y3YGC5IH.mjs";
|
8
5
|
import {
|
9
6
|
utils_pdf_download
|
10
7
|
} from "./chunk-5U2JSHSJ.mjs";
|
11
8
|
import {
|
12
9
|
utils_notification_show
|
13
10
|
} from "./chunk-7ZCOFATU.mjs";
|
11
|
+
import {
|
12
|
+
createGenericStore
|
13
|
+
} from "./chunk-Y3YGC5IH.mjs";
|
14
14
|
import {
|
15
15
|
__objRest,
|
16
16
|
__spreadProps,
|