aq-fe-framework 0.1.95 → 0.1.96
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-AJYXBDE5.mjs → chunk-TPYIOT65.mjs} +533 -307
- package/dist/components/index.d.mts +9 -3
- package/dist/components/index.mjs +2 -2
- package/dist/modules-features/index.d.mts +54 -15
- package/dist/modules-features/index.mjs +6 -2
- package/dist/utils/index.d.mts +2 -9
- package/dist/utils_file-DAglO3jY.d.mts +31 -0
- package/package.json +1 -1
- package/dist/utils_excel-CLb5lfmI.d.mts +0 -19
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createGenericStore
|
|
3
|
+
} from "./chunk-Y3YGC5IH.mjs";
|
|
1
4
|
import {
|
|
2
5
|
U0DateToDDMMYYYString,
|
|
3
6
|
U0MyValidateEmail,
|
|
@@ -6,9 +9,6 @@ import {
|
|
|
6
9
|
utils_notification_show,
|
|
7
10
|
utils_pdf_download
|
|
8
11
|
} from "./chunk-EEQENBXZ.mjs";
|
|
9
|
-
import {
|
|
10
|
-
createGenericStore
|
|
11
|
-
} from "./chunk-Y3YGC5IH.mjs";
|
|
12
12
|
import {
|
|
13
13
|
__objRest,
|
|
14
14
|
__spreadProps,
|
|
@@ -599,8 +599,34 @@ function MyNumberInput(_a) {
|
|
|
599
599
|
import { TextInput } from "@mantine/core";
|
|
600
600
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
601
601
|
function MyTextInput(_a) {
|
|
602
|
-
var _b = _a, { label, defaultValue } = _b, rest = __objRest(_b, ["label", "defaultValue"]);
|
|
603
|
-
return /* @__PURE__ */ jsx13(
|
|
602
|
+
var _b = _a, { label, defaultValue, isPhoneNumber } = _b, rest = __objRest(_b, ["label", "defaultValue", "isPhoneNumber"]);
|
|
603
|
+
return /* @__PURE__ */ jsx13(
|
|
604
|
+
TextInput,
|
|
605
|
+
__spreadValues({
|
|
606
|
+
onKeyDown: (e4) => {
|
|
607
|
+
if (!isPhoneNumber) return;
|
|
608
|
+
const allowedKeys = [
|
|
609
|
+
"Backspace",
|
|
610
|
+
"Tab",
|
|
611
|
+
"ArrowLeft",
|
|
612
|
+
"ArrowRight",
|
|
613
|
+
"Delete",
|
|
614
|
+
"+",
|
|
615
|
+
"-",
|
|
616
|
+
"(",
|
|
617
|
+
")",
|
|
618
|
+
" "
|
|
619
|
+
// các ký tự đặc biệt cho số điện thoại
|
|
620
|
+
];
|
|
621
|
+
if (!/[0-9]/.test(e4.key) && !allowedKeys.includes(e4.key)) {
|
|
622
|
+
e4.preventDefault();
|
|
623
|
+
}
|
|
624
|
+
},
|
|
625
|
+
label,
|
|
626
|
+
defaultValue,
|
|
627
|
+
placeholder: label ? `Nh\u1EADp ${label == null ? void 0 : label.toLowerCase()}` : ""
|
|
628
|
+
}, rest)
|
|
629
|
+
);
|
|
604
630
|
}
|
|
605
631
|
|
|
606
632
|
// src/modules-features/admin/core/core18256/F_core18256_Select.tsx
|
|
@@ -1109,13 +1135,34 @@ import { IconSearch } from "@tabler/icons-react";
|
|
|
1109
1135
|
import { usePathname, useRouter } from "next/navigation";
|
|
1110
1136
|
import { useMemo as useMemo2, useState as useState5 } from "react";
|
|
1111
1137
|
|
|
1138
|
+
// src/hooks/query/AQ/useQ_AQ_GetAQModule.ts
|
|
1139
|
+
import { useQuery as useQuery4 } from "@tanstack/react-query";
|
|
1140
|
+
function useQ_AQ_GetAQModule() {
|
|
1141
|
+
const query = useQuery4({
|
|
1142
|
+
queryKey: ["/AQ/GetAQModule"],
|
|
1143
|
+
queryFn: async () => {
|
|
1144
|
+
const res = await baseAxios_default.get("/AQ/GetAQModule");
|
|
1145
|
+
return res.data.data;
|
|
1146
|
+
}
|
|
1147
|
+
});
|
|
1148
|
+
return query;
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1112
1151
|
// src/components/Layouts/BasicAppShell/useS_BasicAppShell.ts
|
|
1152
|
+
import { useEffect as useEffect3 } from "react";
|
|
1113
1153
|
var useStore = createGenericStore({
|
|
1114
|
-
initialState: {
|
|
1154
|
+
initialState: {
|
|
1155
|
+
menuCode: "",
|
|
1156
|
+
moduleName: "",
|
|
1157
|
+
title: "",
|
|
1158
|
+
opened: true,
|
|
1159
|
+
groupMenuOpenId: []
|
|
1160
|
+
},
|
|
1115
1161
|
storageKey: "useS_BasicAppShell"
|
|
1116
1162
|
});
|
|
1117
1163
|
function useS_BasicAppShell() {
|
|
1118
1164
|
const store = useStore();
|
|
1165
|
+
const GetAQModule_query = useQ_AQ_GetAQModule();
|
|
1119
1166
|
function toggle() {
|
|
1120
1167
|
store.setProperty("opened", !store.state.opened);
|
|
1121
1168
|
}
|
|
@@ -1133,6 +1180,12 @@ function useS_BasicAppShell() {
|
|
|
1133
1180
|
function clearGroupMenuOpenId() {
|
|
1134
1181
|
store.setProperty("groupMenuOpenId", []);
|
|
1135
1182
|
}
|
|
1183
|
+
useEffect3(() => {
|
|
1184
|
+
var _a, _b;
|
|
1185
|
+
if (!GetAQModule_query.data) return;
|
|
1186
|
+
store.setProperty("faviconFileDetail", (_a = GetAQModule_query.data) == null ? void 0 : _a.faviconFileDetail);
|
|
1187
|
+
store.setProperty("logoFileDetail", (_b = GetAQModule_query.data) == null ? void 0 : _b.logoFileDetail);
|
|
1188
|
+
}, [GetAQModule_query.data]);
|
|
1136
1189
|
return __spreadProps(__spreadValues({}, store), {
|
|
1137
1190
|
toggle,
|
|
1138
1191
|
toggleGroupMenuOpenId,
|
|
@@ -1578,7 +1631,7 @@ import { Button as Button7, Divider, Fieldset, Group as Group8, Modal as Modal7,
|
|
|
1578
1631
|
import { IconArrowBackUp, IconArrowBigLeft, IconArrowBigRight, IconSquareRoundedX } from "@tabler/icons-react";
|
|
1579
1632
|
|
|
1580
1633
|
// src/components/Buttons/ButtonImport/useS_ButtonImport.ts
|
|
1581
|
-
import { useEffect as
|
|
1634
|
+
import { useEffect as useEffect4, useMemo as useMemo3 } from "react";
|
|
1582
1635
|
import * as XLSX3 from "xlsx";
|
|
1583
1636
|
var useStore2 = createGenericStore({
|
|
1584
1637
|
initialState: {
|
|
@@ -1691,7 +1744,7 @@ function useS_ButtonImport() {
|
|
|
1691
1744
|
}))) || []
|
|
1692
1745
|
];
|
|
1693
1746
|
}, [store.state.title]);
|
|
1694
|
-
|
|
1747
|
+
useEffect4(() => {
|
|
1695
1748
|
if (store.state.file == null) {
|
|
1696
1749
|
store.resetState();
|
|
1697
1750
|
}
|
|
@@ -1712,7 +1765,7 @@ function useS_ButtonImport() {
|
|
|
1712
1765
|
};
|
|
1713
1766
|
reader.readAsArrayBuffer(store.state.file);
|
|
1714
1767
|
}, [store.state.file]);
|
|
1715
|
-
|
|
1768
|
+
useEffect4(() => {
|
|
1716
1769
|
var _a;
|
|
1717
1770
|
if (((_a = store.state.data) == null ? void 0 : _a.length) == 0) return;
|
|
1718
1771
|
autoMap();
|
|
@@ -6504,7 +6557,7 @@ import { createEventsServicePlugin } from "@schedule-x/events-service";
|
|
|
6504
6557
|
import { ScheduleXCalendar, useNextCalendarApp } from "@schedule-x/react";
|
|
6505
6558
|
import { Paper as Paper5, Text as Text6 } from "@mantine/core";
|
|
6506
6559
|
import "@schedule-x/theme-default/dist/index.css";
|
|
6507
|
-
import { useEffect as
|
|
6560
|
+
import { useEffect as useEffect5 } from "react";
|
|
6508
6561
|
import { jsx as jsx42, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
6509
6562
|
function MyCalendar() {
|
|
6510
6563
|
const plugins = [createEventsServicePlugin(), createEventModalPlugin()];
|
|
@@ -6576,7 +6629,7 @@ function MyCalendar() {
|
|
|
6576
6629
|
}
|
|
6577
6630
|
]
|
|
6578
6631
|
}, plugins);
|
|
6579
|
-
|
|
6632
|
+
useEffect5(() => {
|
|
6580
6633
|
calendar == null ? void 0 : calendar.events.getAll();
|
|
6581
6634
|
}, []);
|
|
6582
6635
|
return /* @__PURE__ */ jsx42("div", { children: /* @__PURE__ */ jsx42(ScheduleXCalendar, { calendarApp: calendar, customComponents: {
|
|
@@ -6755,6 +6808,9 @@ function AQStatCard1({ title: title3, value, unit = "", description, icons, diff
|
|
|
6755
6808
|
) });
|
|
6756
6809
|
}
|
|
6757
6810
|
|
|
6811
|
+
// src/components/FaviconSetter/FaviconSetter.tsx
|
|
6812
|
+
import { useEffect as useEffect6 } from "react";
|
|
6813
|
+
|
|
6758
6814
|
// src/components/Inputs/Fieldset/MyFieldset.tsx
|
|
6759
6815
|
import { Box as Box3, Fieldset as Fieldset4, Text as Text10 } from "@mantine/core";
|
|
6760
6816
|
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
@@ -6804,7 +6860,7 @@ import TextAlign from "@tiptap/extension-text-align";
|
|
|
6804
6860
|
import Underline from "@tiptap/extension-underline";
|
|
6805
6861
|
import { useEditor } from "@tiptap/react";
|
|
6806
6862
|
import StarterKit from "@tiptap/starter-kit";
|
|
6807
|
-
import { useEffect as
|
|
6863
|
+
import { useEffect as useEffect7, useState as useState7 } from "react";
|
|
6808
6864
|
import { jsx as jsx51, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
6809
6865
|
function MyTextEditor(_a) {
|
|
6810
6866
|
var _b = _a, {
|
|
@@ -6902,7 +6958,7 @@ function MyTextEditor(_a) {
|
|
|
6902
6958
|
}
|
|
6903
6959
|
}
|
|
6904
6960
|
}, rest));
|
|
6905
|
-
|
|
6961
|
+
useEffect7(() => {
|
|
6906
6962
|
if (editor && value !== editor.getHTML()) {
|
|
6907
6963
|
editor.commands.setContent(value);
|
|
6908
6964
|
}
|
|
@@ -7075,6 +7131,7 @@ function BasicAppShell_transformMenuToEnum(prefixProjectName, menu) {
|
|
|
7075
7131
|
}, {});
|
|
7076
7132
|
}
|
|
7077
7133
|
function BasicAppShell({ children, menu }) {
|
|
7134
|
+
var _a, _b;
|
|
7078
7135
|
const basicAppShellStore = useS_BasicAppShell();
|
|
7079
7136
|
const media = useMediaQuery("(min-width: 72em)");
|
|
7080
7137
|
const selectMedia = useMediaQuery("(min-width: 80em)");
|
|
@@ -7131,7 +7188,7 @@ function BasicAppShell({ children, menu }) {
|
|
|
7131
7188
|
left: "50%",
|
|
7132
7189
|
transform: "translateX(-50%)"
|
|
7133
7190
|
},
|
|
7134
|
-
children: /* @__PURE__ */ jsx52(Text11, { c: "green", fw: "bold", children:
|
|
7191
|
+
children: /* @__PURE__ */ jsx52(Text11, { c: "green", fw: "bold", children: `${basicAppShellStore.state.moduleCode} - ${basicAppShellStore.state.moduleName}` })
|
|
7135
7192
|
}
|
|
7136
7193
|
),
|
|
7137
7194
|
/* @__PURE__ */ jsxs28(Group11, { children: [
|
|
@@ -7163,7 +7220,7 @@ function BasicAppShell({ children, menu }) {
|
|
|
7163
7220
|
children: basicAppShellStore.state.opened ? /* @__PURE__ */ jsx52(IconLayoutSidebarLeftExpand, {}) : /* @__PURE__ */ jsx52(IconLayoutSidebarLeftCollapse, {})
|
|
7164
7221
|
}
|
|
7165
7222
|
),
|
|
7166
|
-
/* @__PURE__ */ jsx52(Text11, { c: "green", fw: "bold", size: "sm", children: basicAppShellStore.state.moduleName }),
|
|
7223
|
+
/* @__PURE__ */ jsx52(Text11, { c: "green", fw: "bold", size: "sm", children: `${basicAppShellStore.state.moduleCode} - ${basicAppShellStore.state.moduleName}` }),
|
|
7167
7224
|
/* @__PURE__ */ jsxs28(Group11, { children: [
|
|
7168
7225
|
/* @__PURE__ */ jsx52(
|
|
7169
7226
|
Select4,
|
|
@@ -7203,7 +7260,16 @@ function BasicAppShell({ children, menu }) {
|
|
|
7203
7260
|
] }),
|
|
7204
7261
|
/* @__PURE__ */ jsxs28(AppShell.Section, { p: "md", children: [
|
|
7205
7262
|
/* @__PURE__ */ jsx52(Divider2, {}),
|
|
7206
|
-
/* @__PURE__ */ jsx52(
|
|
7263
|
+
/* @__PURE__ */ jsx52(
|
|
7264
|
+
Image3,
|
|
7265
|
+
{
|
|
7266
|
+
src: `data:image/${(_a = basicAppShellStore.state.logoFileDetail) == null ? void 0 : _a.fileExtension};base64,
|
|
7267
|
+
${(_b = basicAppShellStore.state.logoFileDetail) == null ? void 0 : _b.fileBase64String}`,
|
|
7268
|
+
h: "115px",
|
|
7269
|
+
alt: "",
|
|
7270
|
+
w: "330px"
|
|
7271
|
+
}
|
|
7272
|
+
)
|
|
7207
7273
|
] })
|
|
7208
7274
|
] }),
|
|
7209
7275
|
/* @__PURE__ */ jsx52(
|
|
@@ -7499,12 +7565,12 @@ function MyDataTableSelect(_a) {
|
|
|
7499
7565
|
|
|
7500
7566
|
// src/components/RESTAPIComponents/SelectAPIGet/MySelectAPIGet.tsx
|
|
7501
7567
|
import { Select as Select5 } from "@mantine/core";
|
|
7502
|
-
import { useQuery as
|
|
7568
|
+
import { useQuery as useQuery5 } from "@tanstack/react-query";
|
|
7503
7569
|
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
7504
7570
|
function MySelectAPIGet(_a) {
|
|
7505
7571
|
var _b = _a, { apiGet, label = "", dataMapper } = _b, rest = __objRest(_b, ["apiGet", "label", "dataMapper"]);
|
|
7506
7572
|
var _a2;
|
|
7507
|
-
const query =
|
|
7573
|
+
const query = useQuery5({
|
|
7508
7574
|
queryKey: [apiGet],
|
|
7509
7575
|
queryFn: async () => {
|
|
7510
7576
|
return (await baseAxios_default.get(apiGet)).data;
|
|
@@ -7675,7 +7741,7 @@ function F_core12196({
|
|
|
7675
7741
|
}
|
|
7676
7742
|
|
|
7677
7743
|
// src/modules-features/admin/core/core16209/F_core16209.tsx
|
|
7678
|
-
import { useQuery as
|
|
7744
|
+
import { useQuery as useQuery6 } from "@tanstack/react-query";
|
|
7679
7745
|
import { useMemo as useMemo4 } from "react";
|
|
7680
7746
|
|
|
7681
7747
|
// src/modules-features/admin/core/core16209/F_core16209_Create.tsx
|
|
@@ -7863,7 +7929,7 @@ function F_core16209_Update({ values }) {
|
|
|
7863
7929
|
// src/modules-features/admin/core/core16209/F_core16209.tsx
|
|
7864
7930
|
import { jsx as jsx66, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
7865
7931
|
function F_core16209({ RefinementTypeId }) {
|
|
7866
|
-
const query =
|
|
7932
|
+
const query = useQuery6({
|
|
7867
7933
|
queryKey: ["F_core16209_Read"],
|
|
7868
7934
|
queryFn: async () => {
|
|
7869
7935
|
var _a;
|
|
@@ -7928,7 +7994,7 @@ function F_core16209({ RefinementTypeId }) {
|
|
|
7928
7994
|
import { Tabs as Tabs2 } from "@mantine/core";
|
|
7929
7995
|
|
|
7930
7996
|
// src/modules-features/admin/core/core18256/F_core18256_Read.tsx
|
|
7931
|
-
import { useQuery as
|
|
7997
|
+
import { useQuery as useQuery7 } from "@tanstack/react-query";
|
|
7932
7998
|
import { useMemo as useMemo5 } from "react";
|
|
7933
7999
|
|
|
7934
8000
|
// src/modules-features/admin/core/core18256/F_core18256_Create.tsx
|
|
@@ -7979,7 +8045,7 @@ function F_core18256_Update({ values }) {
|
|
|
7979
8045
|
// src/modules-features/admin/core/core18256/F_core18256_Read.tsx
|
|
7980
8046
|
import { jsx as jsx70, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
7981
8047
|
function F_core18256_Read({ documentType }) {
|
|
7982
|
-
const documentAttributeQuery =
|
|
8048
|
+
const documentAttributeQuery = useQuery7({
|
|
7983
8049
|
queryKey: ["F_core18256_Read", documentType],
|
|
7984
8050
|
queryFn: async () => {
|
|
7985
8051
|
var _a;
|
|
@@ -8027,11 +8093,11 @@ var tabData = [
|
|
|
8027
8093
|
{ label: "3. Danh m\u1EE5c bi\u1EC3u m\u1EABu" }
|
|
8028
8094
|
];
|
|
8029
8095
|
function F_core18256() {
|
|
8030
|
-
return /* @__PURE__ */
|
|
8096
|
+
return /* @__PURE__ */ jsxs41(MyTab, { tabList: tabData, children: [
|
|
8031
8097
|
/* @__PURE__ */ jsx71(Tabs2.Panel, { value: "1. V\u0103n b\u1EA3n quy \u0111\u1ECBnh", children: /* @__PURE__ */ jsx71(F_core18256_Read, { documentType: OBJECT_DOCUMENT_TYPES.Regulations }) }),
|
|
8032
8098
|
/* @__PURE__ */ jsx71(Tabs2.Panel, { value: "2. Quy tr\xECnh x\u1EED l\xFD c\xF4ng vi\u1EC7c", children: /* @__PURE__ */ jsx71(F_core18256_Read, { documentType: OBJECT_DOCUMENT_TYPES.Workflow }) }),
|
|
8033
8099
|
/* @__PURE__ */ jsx71(Tabs2.Panel, { value: "3. Danh m\u1EE5c bi\u1EC3u m\u1EABu", children: /* @__PURE__ */ jsx71(F_core18256_Read, { documentType: OBJECT_DOCUMENT_TYPES.Form }) })
|
|
8034
|
-
] })
|
|
8100
|
+
] });
|
|
8035
8101
|
}
|
|
8036
8102
|
|
|
8037
8103
|
// src/modules-features/admin/core/core26965/F_core26965_Create.tsx
|
|
@@ -8111,7 +8177,7 @@ function F_core26965_Create({
|
|
|
8111
8177
|
|
|
8112
8178
|
// src/modules-features/admin/core/core26965/F_core26965_Read.tsx
|
|
8113
8179
|
import { Accordion as Accordion2, Blockquote as Blockquote2 } from "@mantine/core";
|
|
8114
|
-
import { useQuery as
|
|
8180
|
+
import { useQuery as useQuery8 } from "@tanstack/react-query";
|
|
8115
8181
|
import { useMemo as useMemo6 } from "react";
|
|
8116
8182
|
|
|
8117
8183
|
// src/modules-features/admin/core/core26965/F_core26965_Delete.tsx
|
|
@@ -8216,7 +8282,7 @@ function F_core26965_Read({
|
|
|
8216
8282
|
RegulationsTypeId
|
|
8217
8283
|
}) {
|
|
8218
8284
|
var _a, _b, _c;
|
|
8219
|
-
const documentAttributeQuery =
|
|
8285
|
+
const documentAttributeQuery = useQuery8({
|
|
8220
8286
|
queryKey: ["F_core26965_Read", RegulationsTypeId],
|
|
8221
8287
|
queryFn: async () => {
|
|
8222
8288
|
var _a2;
|
|
@@ -8258,7 +8324,7 @@ function SubRead2({
|
|
|
8258
8324
|
documentType,
|
|
8259
8325
|
RegulationsTypeId
|
|
8260
8326
|
}) {
|
|
8261
|
-
const documentQuery =
|
|
8327
|
+
const documentQuery = useQuery8({
|
|
8262
8328
|
queryKey: ["SubRead" + documentType],
|
|
8263
8329
|
queryFn: async () => {
|
|
8264
8330
|
const result = await baseAxios_default.get(
|
|
@@ -8408,7 +8474,7 @@ function F_core27311_Create({
|
|
|
8408
8474
|
|
|
8409
8475
|
// src/modules-features/admin/core/core27311/F_core27311_Read.tsx
|
|
8410
8476
|
import { Accordion as Accordion3, Blockquote as Blockquote3 } from "@mantine/core";
|
|
8411
|
-
import { useQuery as
|
|
8477
|
+
import { useQuery as useQuery9 } from "@tanstack/react-query";
|
|
8412
8478
|
import { useMemo as useMemo7 } from "react";
|
|
8413
8479
|
|
|
8414
8480
|
// src/modules-features/admin/core/core27311/F_core27311_Delete.tsx
|
|
@@ -8513,7 +8579,7 @@ function F_core27311_Read({
|
|
|
8513
8579
|
WorkflowTypeId
|
|
8514
8580
|
}) {
|
|
8515
8581
|
var _a, _b, _c;
|
|
8516
|
-
const documentAttributeQuery =
|
|
8582
|
+
const documentAttributeQuery = useQuery9({
|
|
8517
8583
|
queryKey: ["F_core27311_Read", WorkflowTypeId],
|
|
8518
8584
|
queryFn: async () => {
|
|
8519
8585
|
var _a2;
|
|
@@ -8555,7 +8621,7 @@ function SubRead3({
|
|
|
8555
8621
|
documentType,
|
|
8556
8622
|
WorkflowTypeId
|
|
8557
8623
|
}) {
|
|
8558
|
-
const documentQuery =
|
|
8624
|
+
const documentQuery = useQuery9({
|
|
8559
8625
|
queryKey: ["SubRead" + documentType],
|
|
8560
8626
|
queryFn: async () => {
|
|
8561
8627
|
const result = await baseAxios_default.get(
|
|
@@ -8655,8 +8721,8 @@ import { Grid as Grid2, Paper as Paper10, ScrollArea as ScrollArea6 } from "@man
|
|
|
8655
8721
|
|
|
8656
8722
|
// src/modules-features/admin/core/core38677/F_core38677_ReadUser.tsx
|
|
8657
8723
|
import { Container as Container4 } from "@mantine/core";
|
|
8658
|
-
import { useQuery as
|
|
8659
|
-
import { useEffect as
|
|
8724
|
+
import { useQuery as useQuery10 } from "@tanstack/react-query";
|
|
8725
|
+
import { useEffect as useEffect8, useMemo as useMemo8, useState as useState9 } from "react";
|
|
8660
8726
|
|
|
8661
8727
|
// src/modules-features/admin/core/core83092/useS_core83092.tsx
|
|
8662
8728
|
var useStore4 = createGenericStore({
|
|
@@ -8730,11 +8796,11 @@ function F_core38677_ReadUser() {
|
|
|
8730
8796
|
setRowSelection({ [rowId]: true });
|
|
8731
8797
|
store.setProperty("roleId", parseInt(rowId));
|
|
8732
8798
|
};
|
|
8733
|
-
|
|
8799
|
+
useEffect8(() => {
|
|
8734
8800
|
if (store.state.roleId == 0) return;
|
|
8735
8801
|
setRowSelection({ [store.state.roleId]: true });
|
|
8736
8802
|
}, [store.state.roleId]);
|
|
8737
|
-
|
|
8803
|
+
useEffect8(() => {
|
|
8738
8804
|
if (!query.data) return;
|
|
8739
8805
|
store.setProperty("roleId", query.data[0].id);
|
|
8740
8806
|
}, [query.data]);
|
|
@@ -8761,7 +8827,7 @@ function F_core38677_ReadUser() {
|
|
|
8761
8827
|
) });
|
|
8762
8828
|
}
|
|
8763
8829
|
function useQ_Account_GetAdminAccount() {
|
|
8764
|
-
const query =
|
|
8830
|
+
const query = useQuery10({
|
|
8765
8831
|
queryKey: ["useQ_Role_GetAdminRole"],
|
|
8766
8832
|
queryFn: async () => {
|
|
8767
8833
|
var _a;
|
|
@@ -8775,7 +8841,7 @@ function useQ_Account_GetAdminAccount() {
|
|
|
8775
8841
|
|
|
8776
8842
|
// src/modules-features/admin/core/core38677/F_core38677_Save.tsx
|
|
8777
8843
|
import { useMutation as useMutation5 } from "@tanstack/react-query";
|
|
8778
|
-
import { useEffect as
|
|
8844
|
+
import { useEffect as useEffect9, useState as useState10 } from "react";
|
|
8779
8845
|
import { jsx as jsx84 } from "react/jsx-runtime";
|
|
8780
8846
|
function F_core38677_Save() {
|
|
8781
8847
|
const store = useS_core83092();
|
|
@@ -8798,7 +8864,7 @@ function F_core38677_Save() {
|
|
|
8798
8864
|
}
|
|
8799
8865
|
});
|
|
8800
8866
|
}
|
|
8801
|
-
|
|
8867
|
+
useEffect9(() => {
|
|
8802
8868
|
if (!store.state.rolePermissions || store.state.rolePermissions.length == 0) {
|
|
8803
8869
|
disable[1](true);
|
|
8804
8870
|
return;
|
|
@@ -8833,7 +8899,8 @@ var menuData = [
|
|
|
8833
8899
|
label: "Danh m\u1EE5c h\u1EC7 th\u1ED1ng ",
|
|
8834
8900
|
links: [
|
|
8835
8901
|
{ name: "Document categories", label: "Danh m\u1EE5c lo\u1EA1i v\u0103n b\u1EA3n", link: "core18256" },
|
|
8836
|
-
{ pageId: 0, name: "
|
|
8902
|
+
{ pageId: 0, name: "", label: "Danh m\u1EE5c c\u1EA5u h\xECnh mail", link: "core64229", status: "Default" },
|
|
8903
|
+
{ pageId: 0, name: "", label: "C\u1EA5u h\xECnh th\xF4ng tin ch\u1EE7 qu\u1EA3n", link: "core60524", status: "Default" }
|
|
8837
8904
|
]
|
|
8838
8905
|
}
|
|
8839
8906
|
];
|
|
@@ -8841,8 +8908,8 @@ var menuData = [
|
|
|
8841
8908
|
// src/modules-features/admin/core/core38677/F_core38677_ViewMenuPermissions.tsx
|
|
8842
8909
|
import { Checkbox as Checkbox3, Flex as Flex5, ScrollArea as ScrollArea5, Table as Table3, Text as Text13 } from "@mantine/core";
|
|
8843
8910
|
import { IconEdit as IconEdit5, IconEyeUp, IconFileExport as IconFileExport2, IconPlus as IconPlus5, IconPrinter as IconPrinter3, IconTrash as IconTrash5 } from "@tabler/icons-react";
|
|
8844
|
-
import { useQuery as
|
|
8845
|
-
import React2, { useEffect as
|
|
8911
|
+
import { useQuery as useQuery11 } from "@tanstack/react-query";
|
|
8912
|
+
import React2, { useEffect as useEffect10, useState as useState11 } from "react";
|
|
8846
8913
|
import { jsx as jsx85, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
8847
8914
|
var title = "Danh s\xE1ch ch\u1EE9c n\u0103ng";
|
|
8848
8915
|
function F_core38677_ViewMenuPermissions({ menuData: menuData2 }) {
|
|
@@ -8850,10 +8917,10 @@ function F_core38677_ViewMenuPermissions({ menuData: menuData2 }) {
|
|
|
8850
8917
|
const store = useS_core83092();
|
|
8851
8918
|
const query = useGetUserPermission();
|
|
8852
8919
|
const list = useState11([]);
|
|
8853
|
-
|
|
8920
|
+
useEffect10(() => {
|
|
8854
8921
|
list[1](groupToTwoLevels(menuData2));
|
|
8855
8922
|
}, []);
|
|
8856
|
-
|
|
8923
|
+
useEffect10(() => {
|
|
8857
8924
|
if (!query.data) return;
|
|
8858
8925
|
store.setProperty("rolePermissions", query.data);
|
|
8859
8926
|
}, [query.data]);
|
|
@@ -9028,7 +9095,7 @@ function F_core38677_ViewMenuPermissions({ menuData: menuData2 }) {
|
|
|
9028
9095
|
}
|
|
9029
9096
|
function useGetUserPermission() {
|
|
9030
9097
|
const store = useS_core83092();
|
|
9031
|
-
const query =
|
|
9098
|
+
const query = useQuery11({
|
|
9032
9099
|
queryKey: ["F_7p4mh9d75x_AuthorizationTable", store.state.roleId],
|
|
9033
9100
|
queryFn: async () => {
|
|
9034
9101
|
const result = await baseAxios_default.get("/Role/GetRolePermission?roleId=" + store.state.roleId);
|
|
@@ -9076,7 +9143,7 @@ function F_core38677({ menuData: menuData2 }) {
|
|
|
9076
9143
|
}
|
|
9077
9144
|
|
|
9078
9145
|
// src/modules-features/admin/core/core40207/F_core40207_Read.tsx
|
|
9079
|
-
import { useQuery as
|
|
9146
|
+
import { useQuery as useQuery12 } from "@tanstack/react-query";
|
|
9080
9147
|
import { useMemo as useMemo9 } from "react";
|
|
9081
9148
|
|
|
9082
9149
|
// src/modules-features/admin/core/core40207/F_core40207_Create.tsx
|
|
@@ -9207,7 +9274,7 @@ function F_core40207_Update({ values }) {
|
|
|
9207
9274
|
// src/modules-features/admin/core/core40207/F_core40207_Read.tsx
|
|
9208
9275
|
import { jsx as jsx90, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
9209
9276
|
function F_core40207_Read({ GuidelineTypeId }) {
|
|
9210
|
-
const query =
|
|
9277
|
+
const query = useQuery12({
|
|
9211
9278
|
queryKey: ["F_core40207_Read"],
|
|
9212
9279
|
queryFn: async () => {
|
|
9213
9280
|
var _a;
|
|
@@ -9268,7 +9335,7 @@ function F_core40207({ GuidelineTypeId }) {
|
|
|
9268
9335
|
|
|
9269
9336
|
// src/modules-features/admin/core/core47643/F_core47643_Read.tsx
|
|
9270
9337
|
import { Group as Group15 } from "@mantine/core";
|
|
9271
|
-
import { useQuery as
|
|
9338
|
+
import { useQuery as useQuery13 } from "@tanstack/react-query";
|
|
9272
9339
|
import { useMemo as useMemo10 } from "react";
|
|
9273
9340
|
|
|
9274
9341
|
// src/modules-features/admin/core/core47643/F_core47643_Delete.tsx
|
|
@@ -9336,7 +9403,7 @@ function F_core47643_Read() {
|
|
|
9336
9403
|
);
|
|
9337
9404
|
}
|
|
9338
9405
|
function useQ_core47643_GetAdminRole() {
|
|
9339
|
-
const query =
|
|
9406
|
+
const query = useQuery13({
|
|
9340
9407
|
queryKey: ["useQ_core47643_GetAdminRole"],
|
|
9341
9408
|
queryFn: async () => {
|
|
9342
9409
|
const res = await baseAxios_default.get("/Role/GetAdminRole");
|
|
@@ -9352,6 +9419,163 @@ function F_core47643() {
|
|
|
9352
9419
|
return /* @__PURE__ */ jsx95(MyPageContent, { title: "Danh m\u1EE5c quy\u1EC1n", canBack: true, children: /* @__PURE__ */ jsx95(F_core47643_Read, {}) });
|
|
9353
9420
|
}
|
|
9354
9421
|
|
|
9422
|
+
// src/modules-features/admin/core/core60524/F_core60524.tsx
|
|
9423
|
+
import { useEffect as useEffect12 } from "react";
|
|
9424
|
+
|
|
9425
|
+
// src/modules-features/admin/core/core60524/F_core60524_Form.tsx
|
|
9426
|
+
import { Grid as Grid3, Paper as Paper11 } from "@mantine/core";
|
|
9427
|
+
import { useForm as useForm14 } from "@mantine/form";
|
|
9428
|
+
import { useEffect as useEffect11 } from "react";
|
|
9429
|
+
|
|
9430
|
+
// src/modules-features/admin/core/core60524/F_core60524_Save.tsx
|
|
9431
|
+
import { useMutation as useMutation6 } from "@tanstack/react-query";
|
|
9432
|
+
|
|
9433
|
+
// src/modules-features/admin/core/core60524/useS_core60524.ts
|
|
9434
|
+
var useStore5 = createGenericStore({
|
|
9435
|
+
initialState: {}
|
|
9436
|
+
});
|
|
9437
|
+
function useS_core60524() {
|
|
9438
|
+
const store = useStore5();
|
|
9439
|
+
return __spreadValues({}, store);
|
|
9440
|
+
}
|
|
9441
|
+
|
|
9442
|
+
// src/modules-features/admin/core/core60524/F_core60524_Save.tsx
|
|
9443
|
+
import { jsx as jsx96 } from "react/jsx-runtime";
|
|
9444
|
+
function F_core60524_Save({
|
|
9445
|
+
form
|
|
9446
|
+
}) {
|
|
9447
|
+
const store = useS_core60524();
|
|
9448
|
+
const mutation = useMutation6({
|
|
9449
|
+
mutationFn: async (body) => {
|
|
9450
|
+
const res = await baseAxios_default.post("/AQ/UpdateAQSetting", body);
|
|
9451
|
+
return res;
|
|
9452
|
+
}
|
|
9453
|
+
});
|
|
9454
|
+
async function handleSave() {
|
|
9455
|
+
var _b, _c, _d, _e;
|
|
9456
|
+
const _a = form.getValues(), { faviconFile, logoFile } = _a, formValues = __objRest(_a, ["faviconFile", "logoFile"]);
|
|
9457
|
+
mutation.mutate(__spreadProps(__spreadValues({}, formValues), {
|
|
9458
|
+
logoFileDetail: form.isDirty("logoFileDetail") == false ? {
|
|
9459
|
+
fileName: (_b = formValues.logoFileDetail) == null ? void 0 : _b.fileName,
|
|
9460
|
+
fileExtension: (_c = formValues.logoFileDetail) == null ? void 0 : _c.fileExtension,
|
|
9461
|
+
fileBase64String: ""
|
|
9462
|
+
} : formValues.logoFileDetail,
|
|
9463
|
+
faviconFileDetail: form.isDirty("faviconFileDetail") == false ? {
|
|
9464
|
+
fileName: (_d = formValues.faviconFileDetail) == null ? void 0 : _d.fileName,
|
|
9465
|
+
fileExtension: (_e = formValues.faviconFileDetail) == null ? void 0 : _e.fileExtension,
|
|
9466
|
+
fileBase64String: ""
|
|
9467
|
+
} : formValues.faviconFileDetail,
|
|
9468
|
+
id: store.state.AQModuleId
|
|
9469
|
+
}), {
|
|
9470
|
+
onSuccess: () => {
|
|
9471
|
+
utils_notification_show({
|
|
9472
|
+
crudType: "update"
|
|
9473
|
+
});
|
|
9474
|
+
}
|
|
9475
|
+
});
|
|
9476
|
+
}
|
|
9477
|
+
return /* @__PURE__ */ jsx96(
|
|
9478
|
+
MyButton,
|
|
9479
|
+
{
|
|
9480
|
+
disabled: !form.isDirty(),
|
|
9481
|
+
crudType: "save",
|
|
9482
|
+
onClick: handleSave
|
|
9483
|
+
}
|
|
9484
|
+
);
|
|
9485
|
+
}
|
|
9486
|
+
|
|
9487
|
+
// src/modules-features/admin/core/core60524/F_core60524_Form.tsx
|
|
9488
|
+
import { jsx as jsx97, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
9489
|
+
function F_core60524_Form() {
|
|
9490
|
+
const query = useQ_AQ_GetAQModule();
|
|
9491
|
+
const form = useForm14({
|
|
9492
|
+
mode: "uncontrolled",
|
|
9493
|
+
validate: {
|
|
9494
|
+
faviconFileDetail: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
9495
|
+
logoFileDetail: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng"
|
|
9496
|
+
}
|
|
9497
|
+
});
|
|
9498
|
+
useEffect11(() => {
|
|
9499
|
+
var _a, _b;
|
|
9500
|
+
if (!query.data) return;
|
|
9501
|
+
const values = {
|
|
9502
|
+
code: query.data.code || "",
|
|
9503
|
+
name: query.data.name || "",
|
|
9504
|
+
officelName: query.data.officelName || "",
|
|
9505
|
+
email: query.data.email || "",
|
|
9506
|
+
phoneNumber: query.data.phoneNumber || "",
|
|
9507
|
+
registrationDate: new Date(query.data.registrationDate) || /* @__PURE__ */ new Date(),
|
|
9508
|
+
limiteDate: new Date(query.data.limiteDate) || /* @__PURE__ */ new Date(),
|
|
9509
|
+
faviconPath: query.data.faviconPath || "",
|
|
9510
|
+
logoPath: query.data.logoPath || "",
|
|
9511
|
+
faviconFile: new File([], (_a = query.data.faviconFileDetail) == null ? void 0 : _a.fileName),
|
|
9512
|
+
logoFile: new File([], (_b = query.data.logoFileDetail) == null ? void 0 : _b.fileName),
|
|
9513
|
+
faviconFileDetail: query.data.faviconFileDetail,
|
|
9514
|
+
logoFileDetail: query.data.logoFileDetail
|
|
9515
|
+
};
|
|
9516
|
+
form.setInitialValues(values);
|
|
9517
|
+
form.setValues(values);
|
|
9518
|
+
}, [query.data]);
|
|
9519
|
+
return /* @__PURE__ */ jsxs58(Paper11, { p: "md", children: [
|
|
9520
|
+
/* @__PURE__ */ jsxs58(Grid3, { children: [
|
|
9521
|
+
/* @__PURE__ */ jsx97(Grid3.Col, { span: 5, children: /* @__PURE__ */ jsx97(MyTextInput, __spreadProps(__spreadValues({}, form.getInputProps("code")), { label: "M\xE3 module", disabled: true })) }),
|
|
9522
|
+
/* @__PURE__ */ jsx97(Grid3.Col, { span: { base: 12, md: 7 }, children: /* @__PURE__ */ jsx97(MyTextInput, __spreadProps(__spreadValues({}, form.getInputProps("name")), { label: "T\xEAn module" })) }),
|
|
9523
|
+
/* @__PURE__ */ jsx97(Grid3.Col, { span: 12, children: /* @__PURE__ */ jsx97(MyTextInput, __spreadProps(__spreadValues({}, form.getInputProps("officelName")), { label: "T\xEAn \u0111\u01A1n v\u1ECB ch\u1EE7 qu\u1EA3n" })) }),
|
|
9524
|
+
/* @__PURE__ */ jsx97(Grid3.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ jsx97(MyTextInput, __spreadProps(__spreadValues({}, form.getInputProps("email")), { label: "Email" })) }),
|
|
9525
|
+
/* @__PURE__ */ jsx97(Grid3.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ jsx97(MyTextInput, __spreadProps(__spreadValues({ isPhoneNumber: true }, form.getInputProps("phoneNumber")), { label: "S\u1ED1 \u0111i\u1EC7n tho\u1EA1i" })) }),
|
|
9526
|
+
/* @__PURE__ */ jsx97(Grid3.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ jsx97(
|
|
9527
|
+
MyDateInput,
|
|
9528
|
+
{
|
|
9529
|
+
value: form.getValues().registrationDate,
|
|
9530
|
+
onChange: (date) => form.setFieldValue("registrationDate", date),
|
|
9531
|
+
label: "Ng\xE0y \u0111\u0103ng k\xFD"
|
|
9532
|
+
}
|
|
9533
|
+
) }),
|
|
9534
|
+
/* @__PURE__ */ jsx97(Grid3.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ jsx97(
|
|
9535
|
+
MyDateInput,
|
|
9536
|
+
{
|
|
9537
|
+
value: form.getValues().limiteDate,
|
|
9538
|
+
onChange: (date) => form.setFieldValue("limiteDate", date),
|
|
9539
|
+
label: "Ng\xE0y h\u1EBFt h\u1EA1n"
|
|
9540
|
+
}
|
|
9541
|
+
) }),
|
|
9542
|
+
/* @__PURE__ */ jsx97(Grid3.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ jsx97(
|
|
9543
|
+
MyFileInput,
|
|
9544
|
+
{
|
|
9545
|
+
label: "Favicon (16px x 16px)",
|
|
9546
|
+
value: form.getValues().faviconFile,
|
|
9547
|
+
onChange: async (e4) => {
|
|
9548
|
+
form.setFieldValue("faviconFile", e4);
|
|
9549
|
+
form.setFieldValue("faviconFileDetail", await utils_file_fileToAQDocumentType(e4));
|
|
9550
|
+
}
|
|
9551
|
+
}
|
|
9552
|
+
) }),
|
|
9553
|
+
/* @__PURE__ */ jsx97(Grid3.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ jsx97(
|
|
9554
|
+
MyFileInput,
|
|
9555
|
+
{
|
|
9556
|
+
label: "Logo (330px x 115px)",
|
|
9557
|
+
value: form.getValues().logoFile,
|
|
9558
|
+
onChange: async (e4) => {
|
|
9559
|
+
form.setFieldValue("logoFile", e4);
|
|
9560
|
+
form.setFieldValue("logoFileDetail", await utils_file_fileToAQDocumentType(e4));
|
|
9561
|
+
}
|
|
9562
|
+
}
|
|
9563
|
+
) })
|
|
9564
|
+
] }),
|
|
9565
|
+
/* @__PURE__ */ jsx97(MyFlexEnd, { children: /* @__PURE__ */ jsx97(F_core60524_Save, { form }) })
|
|
9566
|
+
] });
|
|
9567
|
+
}
|
|
9568
|
+
|
|
9569
|
+
// src/modules-features/admin/core/core60524/F_core60524.tsx
|
|
9570
|
+
import { jsx as jsx98 } from "react/jsx-runtime";
|
|
9571
|
+
function F_core60524({ AQModuleId }) {
|
|
9572
|
+
const store = useS_core60524();
|
|
9573
|
+
useEffect12(() => {
|
|
9574
|
+
store.setProperty("AQModuleId", AQModuleId);
|
|
9575
|
+
}, []);
|
|
9576
|
+
return /* @__PURE__ */ jsx98(F_core60524_Form, {});
|
|
9577
|
+
}
|
|
9578
|
+
|
|
9355
9579
|
// src/constants/enum/ENUM_EMAILCONFIG.ts
|
|
9356
9580
|
var ENUM_EMAILCONFIG_MODULE = /* @__PURE__ */ ((ENUM_EMAILCONFIG_MODULE2) => {
|
|
9357
9581
|
ENUM_EMAILCONFIG_MODULE2[ENUM_EMAILCONFIG_MODULE2["\u0110\xE0o t\u1EA1o"] = 1] = "\u0110\xE0o t\u1EA1o";
|
|
@@ -9362,15 +9586,15 @@ var ENUM_EMAILCONFIG_MODULE = /* @__PURE__ */ ((ENUM_EMAILCONFIG_MODULE2) => {
|
|
|
9362
9586
|
})(ENUM_EMAILCONFIG_MODULE || {});
|
|
9363
9587
|
|
|
9364
9588
|
// src/modules-features/admin/core/core64229/F_core64229_Read.tsx
|
|
9365
|
-
import { useQuery as
|
|
9589
|
+
import { useQuery as useQuery14 } from "@tanstack/react-query";
|
|
9366
9590
|
import { useMemo as useMemo11 } from "react";
|
|
9367
9591
|
|
|
9368
9592
|
// src/modules-features/admin/core/core64229/F_core64229_Form.tsx
|
|
9369
9593
|
import { PasswordInput } from "@mantine/core";
|
|
9370
|
-
import { useForm as
|
|
9371
|
-
import { jsx as
|
|
9594
|
+
import { useForm as useForm15 } from "@mantine/form";
|
|
9595
|
+
import { jsx as jsx99, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
9372
9596
|
function F_core64229_Form({ values }) {
|
|
9373
|
-
const form =
|
|
9597
|
+
const form = useForm15({
|
|
9374
9598
|
mode: "uncontrolled",
|
|
9375
9599
|
initialValues: values ? values : {
|
|
9376
9600
|
emailModule: 1 /* Đào tạo */
|
|
@@ -9394,27 +9618,27 @@ function F_core64229_Form({ values }) {
|
|
|
9394
9618
|
"password": formValues.password
|
|
9395
9619
|
});
|
|
9396
9620
|
}
|
|
9397
|
-
if (values) return /* @__PURE__ */
|
|
9621
|
+
if (values) return /* @__PURE__ */ jsx99(
|
|
9398
9622
|
MyActionIconUpdate,
|
|
9399
9623
|
{
|
|
9400
9624
|
form,
|
|
9401
9625
|
onSubmit: handleSubmit,
|
|
9402
|
-
children: /* @__PURE__ */
|
|
9626
|
+
children: /* @__PURE__ */ jsx99(FormInput, { form })
|
|
9403
9627
|
}
|
|
9404
9628
|
);
|
|
9405
|
-
return /* @__PURE__ */
|
|
9629
|
+
return /* @__PURE__ */ jsx99(
|
|
9406
9630
|
MyButtonCreate,
|
|
9407
9631
|
{
|
|
9408
9632
|
form,
|
|
9409
9633
|
onSubmit: handleSubmit,
|
|
9410
|
-
children: /* @__PURE__ */
|
|
9634
|
+
children: /* @__PURE__ */ jsx99(FormInput, { form })
|
|
9411
9635
|
}
|
|
9412
9636
|
);
|
|
9413
9637
|
}
|
|
9414
9638
|
function FormInput({ form }) {
|
|
9415
9639
|
var _a, _b;
|
|
9416
|
-
return /* @__PURE__ */
|
|
9417
|
-
/* @__PURE__ */
|
|
9640
|
+
return /* @__PURE__ */ jsxs59(MyFlexColumn, { children: [
|
|
9641
|
+
/* @__PURE__ */ jsx99(
|
|
9418
9642
|
MySelect,
|
|
9419
9643
|
__spreadProps(__spreadValues({
|
|
9420
9644
|
label: "Ph\xE2n h\u1EC7",
|
|
@@ -9423,25 +9647,25 @@ function FormInput({ form }) {
|
|
|
9423
9647
|
value: (_a = form.getValues().emailModule) == null ? void 0 : _a.toString()
|
|
9424
9648
|
})
|
|
9425
9649
|
),
|
|
9426
|
-
/* @__PURE__ */
|
|
9650
|
+
/* @__PURE__ */ jsx99(
|
|
9427
9651
|
MyTextInput,
|
|
9428
9652
|
__spreadValues({
|
|
9429
9653
|
label: "Host mail server"
|
|
9430
9654
|
}, form.getInputProps("hostMailServer"))
|
|
9431
9655
|
),
|
|
9432
|
-
/* @__PURE__ */
|
|
9656
|
+
/* @__PURE__ */ jsx99(
|
|
9433
9657
|
MyNumberInput,
|
|
9434
9658
|
__spreadValues({
|
|
9435
9659
|
label: "Outgoing port"
|
|
9436
9660
|
}, form.getInputProps("outgoingPort"))
|
|
9437
9661
|
),
|
|
9438
|
-
/* @__PURE__ */
|
|
9662
|
+
/* @__PURE__ */ jsx99(
|
|
9439
9663
|
MyNumberInput,
|
|
9440
9664
|
__spreadValues({
|
|
9441
9665
|
label: "Incoming port"
|
|
9442
9666
|
}, form.getInputProps("incomingPort"))
|
|
9443
9667
|
),
|
|
9444
|
-
/* @__PURE__ */
|
|
9668
|
+
/* @__PURE__ */ jsx99(
|
|
9445
9669
|
MySelect,
|
|
9446
9670
|
{
|
|
9447
9671
|
label: "SSL",
|
|
@@ -9450,13 +9674,13 @@ function FormInput({ form }) {
|
|
|
9450
9674
|
onChange: (e4) => form.setFieldValue("sll", e4 == "true" ? true : false)
|
|
9451
9675
|
}
|
|
9452
9676
|
),
|
|
9453
|
-
/* @__PURE__ */
|
|
9677
|
+
/* @__PURE__ */ jsx99(
|
|
9454
9678
|
MyTextInput,
|
|
9455
9679
|
__spreadValues({
|
|
9456
9680
|
label: "Username"
|
|
9457
9681
|
}, form.getInputProps("userName"))
|
|
9458
9682
|
),
|
|
9459
|
-
/* @__PURE__ */
|
|
9683
|
+
/* @__PURE__ */ jsx99(
|
|
9460
9684
|
PasswordInput,
|
|
9461
9685
|
__spreadValues({
|
|
9462
9686
|
label: "Password",
|
|
@@ -9467,9 +9691,9 @@ function FormInput({ form }) {
|
|
|
9467
9691
|
}
|
|
9468
9692
|
|
|
9469
9693
|
// src/modules-features/admin/core/core64229/F_core64229_Delete.tsx
|
|
9470
|
-
import { jsx as
|
|
9694
|
+
import { jsx as jsx100 } from "react/jsx-runtime";
|
|
9471
9695
|
function F_core64229_Delete({ values }) {
|
|
9472
|
-
return /* @__PURE__ */
|
|
9696
|
+
return /* @__PURE__ */ jsx100(
|
|
9473
9697
|
MyActionIconDelete,
|
|
9474
9698
|
{
|
|
9475
9699
|
contextData: values == null ? void 0 : values.code,
|
|
@@ -9483,9 +9707,9 @@ function F_core64229_Delete({ values }) {
|
|
|
9483
9707
|
}
|
|
9484
9708
|
|
|
9485
9709
|
// src/modules-features/admin/core/core64229/F_core64229_Read.tsx
|
|
9486
|
-
import { jsx as
|
|
9710
|
+
import { jsx as jsx101, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
9487
9711
|
function F_core64229_Read() {
|
|
9488
|
-
const query =
|
|
9712
|
+
const query = useQuery14({
|
|
9489
9713
|
queryKey: ["F_core64229_Read"],
|
|
9490
9714
|
queryFn: async () => {
|
|
9491
9715
|
const res = await baseAxios_default.get("/EmailConfig/GetAll");
|
|
@@ -9528,52 +9752,52 @@ function F_core64229_Read() {
|
|
|
9528
9752
|
}
|
|
9529
9753
|
], []);
|
|
9530
9754
|
if (query.isLoading) return "\u0110ang t\u1EA3i";
|
|
9531
|
-
return /* @__PURE__ */
|
|
9755
|
+
return /* @__PURE__ */ jsx101(
|
|
9532
9756
|
MyDataTable,
|
|
9533
9757
|
{
|
|
9534
9758
|
columns,
|
|
9535
9759
|
data: query.data,
|
|
9536
|
-
renderTopToolbarCustomActions: () => /* @__PURE__ */
|
|
9537
|
-
renderRowActions: ({ row }) => /* @__PURE__ */
|
|
9538
|
-
/* @__PURE__ */
|
|
9539
|
-
/* @__PURE__ */
|
|
9760
|
+
renderTopToolbarCustomActions: () => /* @__PURE__ */ jsx101(F_core64229_Form, {}),
|
|
9761
|
+
renderRowActions: ({ row }) => /* @__PURE__ */ jsxs60(MyCenterFull, { children: [
|
|
9762
|
+
/* @__PURE__ */ jsx101(F_core64229_Form, { values: row.original }),
|
|
9763
|
+
/* @__PURE__ */ jsx101(F_core64229_Delete, { values: row.original })
|
|
9540
9764
|
] })
|
|
9541
9765
|
}
|
|
9542
9766
|
);
|
|
9543
9767
|
}
|
|
9544
9768
|
|
|
9545
9769
|
// src/modules-features/admin/core/core64229/F_core64229.tsx
|
|
9546
|
-
import { jsx as
|
|
9770
|
+
import { jsx as jsx102 } from "react/jsx-runtime";
|
|
9547
9771
|
function F_core64229() {
|
|
9548
|
-
return /* @__PURE__ */
|
|
9772
|
+
return /* @__PURE__ */ jsx102(F_core64229_Read, {});
|
|
9549
9773
|
}
|
|
9550
9774
|
|
|
9551
9775
|
// src/modules-features/admin/core/core71678/F_core71678_Read.tsx
|
|
9552
9776
|
import { Button as Button17, Group as Group17 } from "@mantine/core";
|
|
9553
9777
|
import { IconShield } from "@tabler/icons-react";
|
|
9554
|
-
import { useQuery as
|
|
9778
|
+
import { useQuery as useQuery16 } from "@tanstack/react-query";
|
|
9555
9779
|
import { useRouter as useRouter3 } from "next/navigation";
|
|
9556
9780
|
import { useMemo as useMemo13, useState as useState13 } from "react";
|
|
9557
9781
|
|
|
9558
9782
|
// src/modules-features/admin/core/core71678/F_core71678_ChangePermission.tsx
|
|
9559
9783
|
import { Button as Button16, Fieldset as Fieldset6, Group as Group16, Table as Table4 } from "@mantine/core";
|
|
9560
9784
|
import { useDisclosure as useDisclosure12 } from "@mantine/hooks";
|
|
9561
|
-
import { useMutation as
|
|
9562
|
-
import { useEffect as
|
|
9563
|
-
import { jsx as
|
|
9785
|
+
import { useMutation as useMutation7, useQuery as useQuery15, useQueryClient as useQueryClient5 } from "@tanstack/react-query";
|
|
9786
|
+
import { useEffect as useEffect13, useMemo as useMemo12, useState as useState12 } from "react";
|
|
9787
|
+
import { jsx as jsx103, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
9564
9788
|
function F_core71678_ChangePermission({ user }) {
|
|
9565
9789
|
const disc = useDisclosure12();
|
|
9566
9790
|
const queryClient = useQueryClient5();
|
|
9567
9791
|
const [rowSelection, setRowSelection] = useState12({});
|
|
9568
9792
|
const rowSelect = useState12();
|
|
9569
|
-
const query =
|
|
9793
|
+
const query = useQuery15({
|
|
9570
9794
|
queryKey: [`F1_1ChangePermission`],
|
|
9571
9795
|
queryFn: async () => {
|
|
9572
9796
|
const response = await baseAxios_default.get("/Role/GetAdminRole");
|
|
9573
9797
|
return response.data.data;
|
|
9574
9798
|
}
|
|
9575
9799
|
});
|
|
9576
|
-
const mutation =
|
|
9800
|
+
const mutation = useMutation7({
|
|
9577
9801
|
mutationFn: async (roleIds) => {
|
|
9578
9802
|
const res = await baseAxios_default.post("/Role/AddUser?userId=" + user.id, roleIds);
|
|
9579
9803
|
return res;
|
|
@@ -9597,7 +9821,7 @@ function F_core71678_ChangePermission({ user }) {
|
|
|
9597
9821
|
}
|
|
9598
9822
|
});
|
|
9599
9823
|
}
|
|
9600
|
-
|
|
9824
|
+
useEffect13(() => {
|
|
9601
9825
|
var _a;
|
|
9602
9826
|
const result = (_a = user.roles) == null ? void 0 : _a.reduce((acc, item) => {
|
|
9603
9827
|
if (item.id !== void 0) {
|
|
@@ -9607,32 +9831,32 @@ function F_core71678_ChangePermission({ user }) {
|
|
|
9607
9831
|
}, {});
|
|
9608
9832
|
setRowSelection(result);
|
|
9609
9833
|
}, []);
|
|
9610
|
-
return /* @__PURE__ */
|
|
9611
|
-
/* @__PURE__ */
|
|
9834
|
+
return /* @__PURE__ */ jsxs61(MyButtonModal, { modalSize: "xl", disclosure: disc, title: "Ch\u1ECDn quy\u1EC1n cho ng\u01B0\u1EDDi d\xF9ng", label: "S\u1EEDa quy\u1EC1n", children: [
|
|
9835
|
+
/* @__PURE__ */ jsx103(
|
|
9612
9836
|
Table4,
|
|
9613
9837
|
{
|
|
9614
9838
|
w: "100%",
|
|
9615
9839
|
variant: "vertical",
|
|
9616
9840
|
layout: "fixed",
|
|
9617
|
-
children: /* @__PURE__ */
|
|
9618
|
-
/* @__PURE__ */
|
|
9619
|
-
/* @__PURE__ */
|
|
9620
|
-
/* @__PURE__ */
|
|
9841
|
+
children: /* @__PURE__ */ jsxs61(Table4.Tbody, { children: [
|
|
9842
|
+
/* @__PURE__ */ jsxs61(Table4.Tr, { children: [
|
|
9843
|
+
/* @__PURE__ */ jsx103(Table4.Th, { w: 160, children: "H\u1ECD v\xE0 t\xEAn:" }),
|
|
9844
|
+
/* @__PURE__ */ jsx103(Table4.Td, { children: user.fullName })
|
|
9621
9845
|
] }),
|
|
9622
|
-
/* @__PURE__ */
|
|
9623
|
-
/* @__PURE__ */
|
|
9624
|
-
/* @__PURE__ */
|
|
9846
|
+
/* @__PURE__ */ jsxs61(Table4.Tr, { children: [
|
|
9847
|
+
/* @__PURE__ */ jsx103(Table4.Th, { children: "T\xEAn \u0111\u0103ng nh\u1EADp:" }),
|
|
9848
|
+
/* @__PURE__ */ jsx103(Table4.Td, { children: user.userName })
|
|
9625
9849
|
] }),
|
|
9626
|
-
/* @__PURE__ */
|
|
9627
|
-
/* @__PURE__ */
|
|
9628
|
-
/* @__PURE__ */
|
|
9850
|
+
/* @__PURE__ */ jsxs61(Table4.Tr, { children: [
|
|
9851
|
+
/* @__PURE__ */ jsx103(Table4.Th, { children: "Email:" }),
|
|
9852
|
+
/* @__PURE__ */ jsx103(Table4.Td, { children: user.email })
|
|
9629
9853
|
] })
|
|
9630
9854
|
] })
|
|
9631
9855
|
}
|
|
9632
9856
|
),
|
|
9633
9857
|
query.isLoading && "\u0110ang t\u1EA3i d\u1EEF li\u1EC7u...",
|
|
9634
9858
|
query.isError && "L\u1ED7i khi t\u1EA3i d\u1EEF li\u1EC7u...",
|
|
9635
|
-
/* @__PURE__ */
|
|
9859
|
+
/* @__PURE__ */ jsx103(Fieldset6, { legend: "Ch\u1ECDn quy\u1EC1n", children: /* @__PURE__ */ jsx103(
|
|
9636
9860
|
MyDataTable,
|
|
9637
9861
|
{
|
|
9638
9862
|
enableRowSelection: true,
|
|
@@ -9656,16 +9880,16 @@ function F_core71678_ChangePermission({ user }) {
|
|
|
9656
9880
|
data: query.data
|
|
9657
9881
|
}
|
|
9658
9882
|
) }),
|
|
9659
|
-
/* @__PURE__ */
|
|
9883
|
+
/* @__PURE__ */ jsx103(Group16, { justify: "flex-end", mt: 24, children: /* @__PURE__ */ jsx103(Button16, { onClick: handleSave, children: "L\u01B0u" }) })
|
|
9660
9884
|
] });
|
|
9661
9885
|
}
|
|
9662
9886
|
|
|
9663
9887
|
// src/modules-features/admin/core/core71678/F_core71678_Create.tsx
|
|
9664
|
-
import { useForm as
|
|
9665
|
-
import { jsx as
|
|
9888
|
+
import { useForm as useForm16 } from "@mantine/form";
|
|
9889
|
+
import { jsx as jsx104, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
9666
9890
|
var ENDPOINT2 = "/Account/create";
|
|
9667
9891
|
function F_core71678_Create() {
|
|
9668
|
-
const form =
|
|
9892
|
+
const form = useForm16({
|
|
9669
9893
|
initialValues: {
|
|
9670
9894
|
fullName: "",
|
|
9671
9895
|
code: "",
|
|
@@ -9690,21 +9914,21 @@ function F_core71678_Create() {
|
|
|
9690
9914
|
AQModuleId: 1002
|
|
9691
9915
|
}));
|
|
9692
9916
|
}
|
|
9693
|
-
return /* @__PURE__ */
|
|
9694
|
-
/* @__PURE__ */
|
|
9695
|
-
/* @__PURE__ */
|
|
9696
|
-
/* @__PURE__ */
|
|
9697
|
-
/* @__PURE__ */
|
|
9698
|
-
/* @__PURE__ */
|
|
9699
|
-
/* @__PURE__ */
|
|
9917
|
+
return /* @__PURE__ */ jsxs62(MyButtonCreate, { form, onSubmit: handleSubmit, objectName: "ng\u01B0\u1EDDi d\xF9ng", children: [
|
|
9918
|
+
/* @__PURE__ */ jsx104(MyTextInput, __spreadValues({ label: "M\xE3 t\xE0i kho\u1EA3n" }, form.getInputProps("code"))),
|
|
9919
|
+
/* @__PURE__ */ jsx104(MyTextInput, __spreadValues({ label: "T\xEAn t\xE0i kho\u1EA3n" }, form.getInputProps("userName"))),
|
|
9920
|
+
/* @__PURE__ */ jsx104(MyTextInput, __spreadValues({ label: "M\u1EADt kh\u1EA9u" }, form.getInputProps("password"))),
|
|
9921
|
+
/* @__PURE__ */ jsx104(MyTextInput, __spreadValues({ label: "H\u1ECD v\xE0 t\xEAn" }, form.getInputProps("fullName"))),
|
|
9922
|
+
/* @__PURE__ */ jsx104(MyTextInput, __spreadValues({ label: "Email" }, form.getInputProps("email"))),
|
|
9923
|
+
/* @__PURE__ */ jsx104(MyTextInput, __spreadValues({ label: "S\u1ED1 \u0111i\u1EC7n tho\u1EA1i" }, form.getInputProps("phoneNumber")))
|
|
9700
9924
|
] });
|
|
9701
9925
|
}
|
|
9702
9926
|
|
|
9703
9927
|
// src/modules-features/admin/core/core71678/F_core71678_Delete.tsx
|
|
9704
|
-
import { jsx as
|
|
9928
|
+
import { jsx as jsx105 } from "react/jsx-runtime";
|
|
9705
9929
|
var ENDPOINT3 = "/Account/delete";
|
|
9706
9930
|
function F_core71678_Delete({ id, code }) {
|
|
9707
|
-
return /* @__PURE__ */
|
|
9931
|
+
return /* @__PURE__ */ jsx105(
|
|
9708
9932
|
MyActionIconDelete,
|
|
9709
9933
|
{
|
|
9710
9934
|
contextData: code,
|
|
@@ -9714,17 +9938,17 @@ function F_core71678_Delete({ id, code }) {
|
|
|
9714
9938
|
}
|
|
9715
9939
|
|
|
9716
9940
|
// src/modules-features/admin/core/core71678/F_core71678_Update.tsx
|
|
9717
|
-
import { useForm as
|
|
9718
|
-
import { useEffect as
|
|
9719
|
-
import { jsx as
|
|
9941
|
+
import { useForm as useForm17 } from "@mantine/form";
|
|
9942
|
+
import { useEffect as useEffect14 } from "react";
|
|
9943
|
+
import { jsx as jsx106, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
9720
9944
|
function F_core71678_Update({ user }) {
|
|
9721
|
-
const form =
|
|
9945
|
+
const form = useForm17({
|
|
9722
9946
|
initialValues: user
|
|
9723
9947
|
});
|
|
9724
|
-
|
|
9948
|
+
useEffect14(() => {
|
|
9725
9949
|
console.log(form.values);
|
|
9726
9950
|
}, [form.values]);
|
|
9727
|
-
return /* @__PURE__ */
|
|
9951
|
+
return /* @__PURE__ */ jsx106(MyActionIconUpdate, { form, onSubmit: async (values) => {
|
|
9728
9952
|
return await baseAxios_default.post(
|
|
9729
9953
|
"/Account/update",
|
|
9730
9954
|
__spreadProps(__spreadValues({}, values), {
|
|
@@ -9736,22 +9960,22 @@ function F_core71678_Update({ user }) {
|
|
|
9736
9960
|
workingUnitId: null
|
|
9737
9961
|
})
|
|
9738
9962
|
);
|
|
9739
|
-
}, children: /* @__PURE__ */
|
|
9740
|
-
/* @__PURE__ */
|
|
9741
|
-
/* @__PURE__ */
|
|
9742
|
-
/* @__PURE__ */
|
|
9743
|
-
/* @__PURE__ */
|
|
9744
|
-
/* @__PURE__ */
|
|
9963
|
+
}, children: /* @__PURE__ */ jsxs63(MyFlexColumn, { children: [
|
|
9964
|
+
/* @__PURE__ */ jsx106(MyTextInput, __spreadValues({ disabled: true, label: "M\xE3 t\xE0i kho\u1EA3n" }, form.getInputProps("code"))),
|
|
9965
|
+
/* @__PURE__ */ jsx106(MyTextInput, __spreadValues({ disabled: true, label: "T\xEAn t\xE0i kho\u1EA3n" }, form.getInputProps("userName"))),
|
|
9966
|
+
/* @__PURE__ */ jsx106(MyTextInput, __spreadValues({ label: "H\u1ECD v\xE0 t\xEAn" }, form.getInputProps("fullName"))),
|
|
9967
|
+
/* @__PURE__ */ jsx106(MyTextInput, __spreadValues({ label: "Email" }, form.getInputProps("email"))),
|
|
9968
|
+
/* @__PURE__ */ jsx106(MyTextInput, __spreadValues({ label: "S\u1ED1 \u0111i\u1EC7n tho\u1EA1i" }, form.getInputProps("phoneNumber")))
|
|
9745
9969
|
] }) });
|
|
9746
9970
|
}
|
|
9747
9971
|
|
|
9748
9972
|
// src/modules-features/admin/core/core71678/F_core71678_Read.tsx
|
|
9749
|
-
import { jsx as
|
|
9973
|
+
import { jsx as jsx107, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
9750
9974
|
var ENDPOINT4 = "/Account/GetAdminAccount";
|
|
9751
9975
|
function F_core71678_Read() {
|
|
9752
9976
|
const router = useRouter3();
|
|
9753
9977
|
const [rowSelection, setRowSelection] = useState13({});
|
|
9754
|
-
const AllUserQuery =
|
|
9978
|
+
const AllUserQuery = useQuery16({
|
|
9755
9979
|
queryKey: ["F_core71678_Read"],
|
|
9756
9980
|
queryFn: async () => {
|
|
9757
9981
|
var _a;
|
|
@@ -9778,25 +10002,25 @@ function F_core71678_Read() {
|
|
|
9778
10002
|
},
|
|
9779
10003
|
{
|
|
9780
10004
|
header: "Quy\u1EC1n",
|
|
9781
|
-
accessorFn: (row) => /* @__PURE__ */
|
|
10005
|
+
accessorFn: (row) => /* @__PURE__ */ jsx107(F_core71678_ChangePermission, { user: row })
|
|
9782
10006
|
}
|
|
9783
10007
|
],
|
|
9784
10008
|
[]
|
|
9785
10009
|
);
|
|
9786
10010
|
if (AllUserQuery.isLoading) return "Loading...";
|
|
9787
|
-
return /* @__PURE__ */
|
|
10011
|
+
return /* @__PURE__ */ jsx107(
|
|
9788
10012
|
MyDataTable,
|
|
9789
10013
|
{
|
|
9790
10014
|
columns,
|
|
9791
10015
|
data: AllUserQuery.data,
|
|
9792
10016
|
renderTopToolbarCustomActions: () => {
|
|
9793
|
-
return /* @__PURE__ */
|
|
9794
|
-
/* @__PURE__ */
|
|
9795
|
-
/* @__PURE__ */
|
|
10017
|
+
return /* @__PURE__ */ jsxs64(Group17, { children: [
|
|
10018
|
+
/* @__PURE__ */ jsx107(F_core71678_Create, {}),
|
|
10019
|
+
/* @__PURE__ */ jsx107(
|
|
9796
10020
|
Button17,
|
|
9797
10021
|
{
|
|
9798
10022
|
color: "violet",
|
|
9799
|
-
leftSection: /* @__PURE__ */
|
|
10023
|
+
leftSection: /* @__PURE__ */ jsx107(IconShield, {}),
|
|
9800
10024
|
onClick: () => {
|
|
9801
10025
|
router.push("core47643");
|
|
9802
10026
|
},
|
|
@@ -9806,9 +10030,9 @@ function F_core71678_Read() {
|
|
|
9806
10030
|
] });
|
|
9807
10031
|
},
|
|
9808
10032
|
renderRowActions: ({ row }) => {
|
|
9809
|
-
return /* @__PURE__ */
|
|
9810
|
-
/* @__PURE__ */
|
|
9811
|
-
/* @__PURE__ */
|
|
10033
|
+
return /* @__PURE__ */ jsxs64(MyCenterFull, { children: [
|
|
10034
|
+
/* @__PURE__ */ jsx107(F_core71678_Update, { user: row.original }),
|
|
10035
|
+
/* @__PURE__ */ jsx107(F_core71678_Delete, { id: row.original.id, code: row.original.code })
|
|
9812
10036
|
] });
|
|
9813
10037
|
}
|
|
9814
10038
|
}
|
|
@@ -9816,21 +10040,21 @@ function F_core71678_Read() {
|
|
|
9816
10040
|
}
|
|
9817
10041
|
|
|
9818
10042
|
// src/modules-features/admin/core/core71678/F_core71678.tsx
|
|
9819
|
-
import { jsx as
|
|
10043
|
+
import { jsx as jsx108 } from "react/jsx-runtime";
|
|
9820
10044
|
function F_core71678() {
|
|
9821
|
-
return /* @__PURE__ */
|
|
10045
|
+
return /* @__PURE__ */ jsx108(F_core71678_Read, {});
|
|
9822
10046
|
}
|
|
9823
10047
|
|
|
9824
10048
|
// src/modules-features/admin/core/core76318/F_core76318_Read.tsx
|
|
9825
|
-
import { useQuery as
|
|
10049
|
+
import { useQuery as useQuery17 } from "@tanstack/react-query";
|
|
9826
10050
|
import { useMemo as useMemo14 } from "react";
|
|
9827
10051
|
|
|
9828
10052
|
// src/modules-features/admin/core/core76318/F_core76318_Create.tsx
|
|
9829
10053
|
import { FileInput as FileInput8 } from "@mantine/core";
|
|
9830
|
-
import { useForm as
|
|
9831
|
-
import { jsx as
|
|
10054
|
+
import { useForm as useForm18 } from "@mantine/form";
|
|
10055
|
+
import { jsx as jsx109, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
9832
10056
|
function F_core76318_Create({ SecurityTypeId }) {
|
|
9833
|
-
const form =
|
|
10057
|
+
const form = useForm18({
|
|
9834
10058
|
mode: "uncontrolled",
|
|
9835
10059
|
validate: {
|
|
9836
10060
|
decisionCode: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
@@ -9839,7 +10063,7 @@ function F_core76318_Create({ SecurityTypeId }) {
|
|
|
9839
10063
|
file: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng"
|
|
9840
10064
|
}
|
|
9841
10065
|
});
|
|
9842
|
-
return /* @__PURE__ */
|
|
10066
|
+
return /* @__PURE__ */ jsxs65(
|
|
9843
10067
|
MyButtonCreate,
|
|
9844
10068
|
{
|
|
9845
10069
|
objectName: "v\u0103n b\u1EA3n",
|
|
@@ -9852,28 +10076,28 @@ function F_core76318_Create({ SecurityTypeId }) {
|
|
|
9852
10076
|
}));
|
|
9853
10077
|
},
|
|
9854
10078
|
children: [
|
|
9855
|
-
/* @__PURE__ */
|
|
10079
|
+
/* @__PURE__ */ jsx109(
|
|
9856
10080
|
MyTextInput,
|
|
9857
10081
|
__spreadValues({
|
|
9858
10082
|
withAsterisk: true,
|
|
9859
10083
|
label: "S\u1ED1 quy \u0111\u1ECBnh"
|
|
9860
10084
|
}, form.getInputProps("decisionCode"))
|
|
9861
10085
|
),
|
|
9862
|
-
/* @__PURE__ */
|
|
10086
|
+
/* @__PURE__ */ jsx109(
|
|
9863
10087
|
MyDateInput,
|
|
9864
10088
|
__spreadValues({
|
|
9865
10089
|
withAsterisk: true,
|
|
9866
10090
|
label: "Ng\xE0y ban h\xE0nh"
|
|
9867
10091
|
}, form.getInputProps("promulgateDate"))
|
|
9868
10092
|
),
|
|
9869
|
-
/* @__PURE__ */
|
|
10093
|
+
/* @__PURE__ */ jsx109(
|
|
9870
10094
|
MyTextInput,
|
|
9871
10095
|
__spreadValues({
|
|
9872
10096
|
withAsterisk: true,
|
|
9873
10097
|
label: "T\xEAn t\xE0i li\u1EC7u"
|
|
9874
10098
|
}, form.getInputProps("name"))
|
|
9875
10099
|
),
|
|
9876
|
-
/* @__PURE__ */
|
|
10100
|
+
/* @__PURE__ */ jsx109(
|
|
9877
10101
|
FileInput8,
|
|
9878
10102
|
__spreadValues({
|
|
9879
10103
|
withAsterisk: true,
|
|
@@ -9887,12 +10111,12 @@ function F_core76318_Create({ SecurityTypeId }) {
|
|
|
9887
10111
|
}
|
|
9888
10112
|
|
|
9889
10113
|
// src/modules-features/admin/core/core76318/F_core76318_Delete.tsx
|
|
9890
|
-
import { jsx as
|
|
10114
|
+
import { jsx as jsx110 } from "react/jsx-runtime";
|
|
9891
10115
|
function F_core76318_Delete({
|
|
9892
10116
|
id,
|
|
9893
10117
|
contextData
|
|
9894
10118
|
}) {
|
|
9895
|
-
return /* @__PURE__ */
|
|
10119
|
+
return /* @__PURE__ */ jsx110(
|
|
9896
10120
|
MyActionIconDelete,
|
|
9897
10121
|
{
|
|
9898
10122
|
contextData,
|
|
@@ -9903,11 +10127,11 @@ function F_core76318_Delete({
|
|
|
9903
10127
|
|
|
9904
10128
|
// src/modules-features/admin/core/core76318/F_core76318_Update.tsx
|
|
9905
10129
|
import { FileInput as FileInput9, TextInput as TextInput5 } from "@mantine/core";
|
|
9906
|
-
import { useForm as
|
|
9907
|
-
import { jsx as
|
|
10130
|
+
import { useForm as useForm19 } from "@mantine/form";
|
|
10131
|
+
import { jsx as jsx111, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
9908
10132
|
function F_core76318_Update({ values }) {
|
|
9909
10133
|
var _a;
|
|
9910
|
-
const form =
|
|
10134
|
+
const form = useForm19({
|
|
9911
10135
|
mode: "uncontrolled",
|
|
9912
10136
|
initialValues: __spreadProps(__spreadValues({}, values), {
|
|
9913
10137
|
file: new File(
|
|
@@ -9923,7 +10147,7 @@ function F_core76318_Update({ values }) {
|
|
|
9923
10147
|
file: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng"
|
|
9924
10148
|
}
|
|
9925
10149
|
});
|
|
9926
|
-
return /* @__PURE__ */
|
|
10150
|
+
return /* @__PURE__ */ jsxs66(
|
|
9927
10151
|
MyActionIconUpdate,
|
|
9928
10152
|
{
|
|
9929
10153
|
form,
|
|
@@ -9933,28 +10157,28 @@ function F_core76318_Update({ values }) {
|
|
|
9933
10157
|
}));
|
|
9934
10158
|
},
|
|
9935
10159
|
children: [
|
|
9936
|
-
/* @__PURE__ */
|
|
10160
|
+
/* @__PURE__ */ jsx111(
|
|
9937
10161
|
TextInput5,
|
|
9938
10162
|
__spreadValues({
|
|
9939
10163
|
withAsterisk: true,
|
|
9940
10164
|
label: "S\u1ED1 quy \u0111\u1ECBnh"
|
|
9941
10165
|
}, form.getInputProps("decisionCode"))
|
|
9942
10166
|
),
|
|
9943
|
-
/* @__PURE__ */
|
|
10167
|
+
/* @__PURE__ */ jsx111(
|
|
9944
10168
|
MyDateInput,
|
|
9945
10169
|
__spreadValues({
|
|
9946
10170
|
withAsterisk: true,
|
|
9947
10171
|
label: "Ng\xE0y ban h\xE0nh"
|
|
9948
10172
|
}, form.getInputProps("promulgateDate"))
|
|
9949
10173
|
),
|
|
9950
|
-
/* @__PURE__ */
|
|
10174
|
+
/* @__PURE__ */ jsx111(
|
|
9951
10175
|
TextInput5,
|
|
9952
10176
|
__spreadValues({
|
|
9953
10177
|
withAsterisk: true,
|
|
9954
10178
|
label: "T\xEAn t\xE0i li\u1EC7u"
|
|
9955
10179
|
}, form.getInputProps("name"))
|
|
9956
10180
|
),
|
|
9957
|
-
/* @__PURE__ */
|
|
10181
|
+
/* @__PURE__ */ jsx111(
|
|
9958
10182
|
FileInput9,
|
|
9959
10183
|
__spreadValues({
|
|
9960
10184
|
withAsterisk: true,
|
|
@@ -9967,9 +10191,9 @@ function F_core76318_Update({ values }) {
|
|
|
9967
10191
|
}
|
|
9968
10192
|
|
|
9969
10193
|
// src/modules-features/admin/core/core76318/F_core76318_Read.tsx
|
|
9970
|
-
import { jsx as
|
|
10194
|
+
import { jsx as jsx112, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
9971
10195
|
function F_core76318_Read({ SecurityTypeId }) {
|
|
9972
|
-
const query =
|
|
10196
|
+
const query = useQuery17({
|
|
9973
10197
|
queryKey: ["F_core76318_Read"],
|
|
9974
10198
|
queryFn: async () => {
|
|
9975
10199
|
var _a;
|
|
@@ -9996,7 +10220,7 @@ function F_core76318_Read({ SecurityTypeId }) {
|
|
|
9996
10220
|
{
|
|
9997
10221
|
header: "File",
|
|
9998
10222
|
accessorFn: (row) => {
|
|
9999
|
-
return /* @__PURE__ */
|
|
10223
|
+
return /* @__PURE__ */ jsx112(MyCenterFull, { children: /* @__PURE__ */ jsx112(MyButtonViewPDF, { id: row.id }) });
|
|
10000
10224
|
}
|
|
10001
10225
|
}
|
|
10002
10226
|
],
|
|
@@ -10004,17 +10228,17 @@ function F_core76318_Read({ SecurityTypeId }) {
|
|
|
10004
10228
|
);
|
|
10005
10229
|
if (query.isLoading) return "Loading...";
|
|
10006
10230
|
if (query.isError) return "c\xF3 l\u1ED7i x\u1EA3y ra!";
|
|
10007
|
-
return /* @__PURE__ */
|
|
10231
|
+
return /* @__PURE__ */ jsx112(
|
|
10008
10232
|
MyDataTable,
|
|
10009
10233
|
{
|
|
10010
10234
|
columns,
|
|
10011
10235
|
data: query.data,
|
|
10012
|
-
renderTopToolbarCustomActions: () => /* @__PURE__ */
|
|
10236
|
+
renderTopToolbarCustomActions: () => /* @__PURE__ */ jsx112(F_core76318_Create, { SecurityTypeId }),
|
|
10013
10237
|
renderRowActions: ({ row }) => {
|
|
10014
10238
|
var _a;
|
|
10015
|
-
return /* @__PURE__ */
|
|
10016
|
-
/* @__PURE__ */
|
|
10017
|
-
/* @__PURE__ */
|
|
10239
|
+
return /* @__PURE__ */ jsxs67(MyCenterFull, { children: [
|
|
10240
|
+
/* @__PURE__ */ jsx112(F_core76318_Update, { values: row.original }),
|
|
10241
|
+
/* @__PURE__ */ jsx112(
|
|
10018
10242
|
F_core76318_Delete,
|
|
10019
10243
|
{
|
|
10020
10244
|
id: row.original.id,
|
|
@@ -10028,19 +10252,19 @@ function F_core76318_Read({ SecurityTypeId }) {
|
|
|
10028
10252
|
}
|
|
10029
10253
|
|
|
10030
10254
|
// src/modules-features/admin/core/core76318/F_core76318.tsx
|
|
10031
|
-
import { jsx as
|
|
10255
|
+
import { jsx as jsx113 } from "react/jsx-runtime";
|
|
10032
10256
|
function F_core76318({ SecurityTypeId }) {
|
|
10033
|
-
return /* @__PURE__ */
|
|
10257
|
+
return /* @__PURE__ */ jsx113(F_core76318_Read, { SecurityTypeId });
|
|
10034
10258
|
}
|
|
10035
10259
|
|
|
10036
10260
|
// src/modules-features/admin/core/core83092/F_core83092.tsx
|
|
10037
|
-
import { Grid as
|
|
10261
|
+
import { Grid as Grid4, Paper as Paper12, ScrollArea as ScrollArea8 } from "@mantine/core";
|
|
10038
10262
|
|
|
10039
10263
|
// src/modules-features/admin/core/core83092/F_core83092_ReadUser.tsx
|
|
10040
10264
|
import { Container as Container5 } from "@mantine/core";
|
|
10041
|
-
import { useQuery as
|
|
10042
|
-
import { useEffect as
|
|
10043
|
-
import { jsx as
|
|
10265
|
+
import { useQuery as useQuery18 } from "@tanstack/react-query";
|
|
10266
|
+
import { useEffect as useEffect15, useMemo as useMemo15, useState as useState14 } from "react";
|
|
10267
|
+
import { jsx as jsx114 } from "react/jsx-runtime";
|
|
10044
10268
|
function F_core83092_ReadUser() {
|
|
10045
10269
|
const store = useS_core83092();
|
|
10046
10270
|
const query = useQ_core83092_Account_GetAdminAccount();
|
|
@@ -10063,17 +10287,17 @@ function F_core83092_ReadUser() {
|
|
|
10063
10287
|
setRowSelection({ [rowId]: true });
|
|
10064
10288
|
store.setProperty("roleId", parseInt(rowId));
|
|
10065
10289
|
};
|
|
10066
|
-
|
|
10290
|
+
useEffect15(() => {
|
|
10067
10291
|
if (store.state.roleId == 0) return;
|
|
10068
10292
|
setRowSelection({ [store.state.roleId]: true });
|
|
10069
10293
|
}, [store.state.roleId]);
|
|
10070
|
-
|
|
10294
|
+
useEffect15(() => {
|
|
10071
10295
|
if (!query.data) return;
|
|
10072
10296
|
store.setProperty("roleId", query.data[0].id);
|
|
10073
10297
|
}, [query.data]);
|
|
10074
10298
|
if (query.isLoading) return "Loading...";
|
|
10075
10299
|
if (query.isError) return "C\xF3 l\u1ED7i x\u1EA3y ra!";
|
|
10076
|
-
return /* @__PURE__ */
|
|
10300
|
+
return /* @__PURE__ */ jsx114(Container5, { fluid: true, w: "100%", children: /* @__PURE__ */ jsx114(
|
|
10077
10301
|
MyDataTable,
|
|
10078
10302
|
{
|
|
10079
10303
|
columns,
|
|
@@ -10094,7 +10318,7 @@ function F_core83092_ReadUser() {
|
|
|
10094
10318
|
) });
|
|
10095
10319
|
}
|
|
10096
10320
|
function useQ_core83092_Account_GetAdminAccount() {
|
|
10097
|
-
const query =
|
|
10321
|
+
const query = useQuery18({
|
|
10098
10322
|
queryKey: ["useQ_core83092_Account_GetAdminAccount"],
|
|
10099
10323
|
queryFn: async () => {
|
|
10100
10324
|
var _a;
|
|
@@ -10107,13 +10331,13 @@ function useQ_core83092_Account_GetAdminAccount() {
|
|
|
10107
10331
|
}
|
|
10108
10332
|
|
|
10109
10333
|
// src/modules-features/admin/core/core83092/F_core83092_Save.tsx
|
|
10110
|
-
import { useMutation as
|
|
10111
|
-
import { useEffect as
|
|
10112
|
-
import { jsx as
|
|
10334
|
+
import { useMutation as useMutation8 } from "@tanstack/react-query";
|
|
10335
|
+
import { useEffect as useEffect16, useState as useState15 } from "react";
|
|
10336
|
+
import { jsx as jsx115 } from "react/jsx-runtime";
|
|
10113
10337
|
function F_core83092_Save() {
|
|
10114
10338
|
const store = useS_core83092();
|
|
10115
10339
|
const disable = useState15(false);
|
|
10116
|
-
const mutation =
|
|
10340
|
+
const mutation = useMutation8({
|
|
10117
10341
|
mutationFn: async (body) => {
|
|
10118
10342
|
const res = await baseAxios_default.put("/Role/UpdateUserPermission", body);
|
|
10119
10343
|
return res;
|
|
@@ -10131,38 +10355,38 @@ function F_core83092_Save() {
|
|
|
10131
10355
|
}
|
|
10132
10356
|
});
|
|
10133
10357
|
}
|
|
10134
|
-
|
|
10358
|
+
useEffect16(() => {
|
|
10135
10359
|
if (!store.state.rolePermissions || store.state.rolePermissions.length == 0) {
|
|
10136
10360
|
disable[1](true);
|
|
10137
10361
|
return;
|
|
10138
10362
|
}
|
|
10139
10363
|
disable[1](false);
|
|
10140
10364
|
}, [store.state.rolePermissions]);
|
|
10141
|
-
return /* @__PURE__ */
|
|
10365
|
+
return /* @__PURE__ */ jsx115(MyButton, { disabled: disable[0], crudType: "save", onClick: handleSave });
|
|
10142
10366
|
}
|
|
10143
10367
|
|
|
10144
10368
|
// src/modules-features/admin/core/core83092/F_core83092_ViewMenuPermissions.tsx
|
|
10145
10369
|
import { Checkbox as Checkbox4, Flex as Flex6, ScrollArea as ScrollArea7, Table as Table5, Text as Text14 } from "@mantine/core";
|
|
10146
10370
|
import { IconEdit as IconEdit6, IconEyeUp as IconEyeUp2, IconFileExport as IconFileExport3, IconPlus as IconPlus6, IconPrinter as IconPrinter4, IconTrash as IconTrash6 } from "@tabler/icons-react";
|
|
10147
|
-
import { useQuery as
|
|
10148
|
-
import React4, { useEffect as
|
|
10149
|
-
import { jsx as
|
|
10371
|
+
import { useQuery as useQuery19 } from "@tanstack/react-query";
|
|
10372
|
+
import React4, { useEffect as useEffect17, useState as useState16 } from "react";
|
|
10373
|
+
import { jsx as jsx116, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
10150
10374
|
var title2 = "Danh s\xE1ch ch\u1EE9c n\u0103ng";
|
|
10151
10375
|
function F_core83092_ViewMenuPermissions({ menuData: menuData2 }) {
|
|
10152
10376
|
var _a, _b;
|
|
10153
10377
|
const store = useS_core83092();
|
|
10154
10378
|
const query = useGetUserPermission2({ menuData: menuData2 });
|
|
10155
10379
|
const list = useState16([]);
|
|
10156
|
-
|
|
10380
|
+
useEffect17(() => {
|
|
10157
10381
|
list[1](groupToTwoLevels(menuData2));
|
|
10158
10382
|
}, []);
|
|
10159
|
-
|
|
10383
|
+
useEffect17(() => {
|
|
10160
10384
|
if (!query.data) return;
|
|
10161
10385
|
store.setProperty("rolePermissions", query.data);
|
|
10162
10386
|
}, [query.data]);
|
|
10163
10387
|
if (((_a = list[0]) == null ? void 0 : _a.length) == 0) return "\u0110ang t\u1EA3i...";
|
|
10164
|
-
return /* @__PURE__ */
|
|
10165
|
-
/* @__PURE__ */
|
|
10388
|
+
return /* @__PURE__ */ jsx116(ScrollArea7.Autosize, { h: "70vh", children: /* @__PURE__ */ jsxs68(Table5, { children: [
|
|
10389
|
+
/* @__PURE__ */ jsx116(
|
|
10166
10390
|
Table5.Thead,
|
|
10167
10391
|
{
|
|
10168
10392
|
bg: "light-dark(var(--mantine-color-white), var(--mantine-color-dark-8))",
|
|
@@ -10173,90 +10397,90 @@ function F_core83092_ViewMenuPermissions({ menuData: menuData2 }) {
|
|
|
10173
10397
|
boxShadow: "0px 4px 6px rgba(0, 0, 0, 0.1)",
|
|
10174
10398
|
border: "1px solid var(--mantine-color-gray-4)"
|
|
10175
10399
|
},
|
|
10176
|
-
children: /* @__PURE__ */
|
|
10177
|
-
/* @__PURE__ */
|
|
10178
|
-
/* @__PURE__ */
|
|
10179
|
-
/* @__PURE__ */
|
|
10400
|
+
children: /* @__PURE__ */ jsxs68(Table5.Tr, { children: [
|
|
10401
|
+
/* @__PURE__ */ jsx116(Table5.Th, { children: title2 }),
|
|
10402
|
+
/* @__PURE__ */ jsx116(Table5.Th, { children: /* @__PURE__ */ jsxs68(Flex6, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
|
10403
|
+
/* @__PURE__ */ jsx116(Checkbox4, { checked: store.isAllPermission("isRead"), onChange: (e4) => {
|
|
10180
10404
|
store.toogleAllPermissionWithType("isRead", e4.target.checked);
|
|
10181
10405
|
} }),
|
|
10182
|
-
/* @__PURE__ */
|
|
10406
|
+
/* @__PURE__ */ jsxs68(MyFlexRow, { gap: 3, children: [
|
|
10183
10407
|
"Xem",
|
|
10184
|
-
/* @__PURE__ */
|
|
10408
|
+
/* @__PURE__ */ jsx116(IconEyeUp2, { color: "gray" })
|
|
10185
10409
|
] })
|
|
10186
10410
|
] }) }),
|
|
10187
|
-
/* @__PURE__ */
|
|
10188
|
-
/* @__PURE__ */
|
|
10411
|
+
/* @__PURE__ */ jsx116(Table5.Th, { children: /* @__PURE__ */ jsxs68(Flex6, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
|
10412
|
+
/* @__PURE__ */ jsx116(Checkbox4, { checked: store.isAllPermission("isCreate"), onChange: (e4) => {
|
|
10189
10413
|
store.toogleAllPermissionWithType("isCreate", e4.target.checked);
|
|
10190
10414
|
} }),
|
|
10191
|
-
/* @__PURE__ */
|
|
10415
|
+
/* @__PURE__ */ jsxs68(MyFlexRow, { gap: 3, children: [
|
|
10192
10416
|
"Th\xEAm",
|
|
10193
|
-
/* @__PURE__ */
|
|
10417
|
+
/* @__PURE__ */ jsx116(IconPlus6, { color: "blue" })
|
|
10194
10418
|
] })
|
|
10195
10419
|
] }) }),
|
|
10196
|
-
/* @__PURE__ */
|
|
10197
|
-
/* @__PURE__ */
|
|
10420
|
+
/* @__PURE__ */ jsx116(Table5.Th, { children: /* @__PURE__ */ jsxs68(Flex6, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
|
10421
|
+
/* @__PURE__ */ jsx116(Checkbox4, { checked: store.isAllPermission("isUpdate"), onChange: (e4) => {
|
|
10198
10422
|
store.toogleAllPermissionWithType("isUpdate", e4.target.checked);
|
|
10199
10423
|
} }),
|
|
10200
|
-
/* @__PURE__ */
|
|
10424
|
+
/* @__PURE__ */ jsxs68(MyFlexRow, { gap: 3, children: [
|
|
10201
10425
|
"S\u1EEDa",
|
|
10202
|
-
/* @__PURE__ */
|
|
10426
|
+
/* @__PURE__ */ jsx116(IconEdit6, { color: "var(--mantine-color-yellow-8)" })
|
|
10203
10427
|
] })
|
|
10204
10428
|
] }) }),
|
|
10205
|
-
/* @__PURE__ */
|
|
10206
|
-
/* @__PURE__ */
|
|
10429
|
+
/* @__PURE__ */ jsx116(Table5.Th, { children: /* @__PURE__ */ jsxs68(Flex6, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
|
10430
|
+
/* @__PURE__ */ jsx116(Checkbox4, { checked: store.isAllPermission("isDelete"), onChange: (e4) => {
|
|
10207
10431
|
store.toogleAllPermissionWithType("isDelete", e4.target.checked);
|
|
10208
10432
|
} }),
|
|
10209
|
-
/* @__PURE__ */
|
|
10433
|
+
/* @__PURE__ */ jsxs68(MyFlexRow, { gap: 3, children: [
|
|
10210
10434
|
"X\xF3a",
|
|
10211
|
-
/* @__PURE__ */
|
|
10435
|
+
/* @__PURE__ */ jsx116(IconTrash6, { color: "var(--mantine-color-red-8)" })
|
|
10212
10436
|
] })
|
|
10213
10437
|
] }) }),
|
|
10214
|
-
/* @__PURE__ */
|
|
10215
|
-
/* @__PURE__ */
|
|
10438
|
+
/* @__PURE__ */ jsx116(Table5.Th, { children: /* @__PURE__ */ jsxs68(Flex6, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
|
10439
|
+
/* @__PURE__ */ jsx116(Checkbox4, { checked: store.isAllPermission("isPrint"), onChange: (e4) => {
|
|
10216
10440
|
store.toogleAllPermissionWithType("isPrint", e4.target.checked);
|
|
10217
10441
|
} }),
|
|
10218
|
-
/* @__PURE__ */
|
|
10442
|
+
/* @__PURE__ */ jsxs68(MyFlexRow, { gap: 3, children: [
|
|
10219
10443
|
"In",
|
|
10220
|
-
/* @__PURE__ */
|
|
10444
|
+
/* @__PURE__ */ jsx116(IconPrinter4, { color: "var(--mantine-color-cyan-8)" })
|
|
10221
10445
|
] })
|
|
10222
10446
|
] }) }),
|
|
10223
|
-
/* @__PURE__ */
|
|
10224
|
-
/* @__PURE__ */
|
|
10447
|
+
/* @__PURE__ */ jsx116(Table5.Th, { children: /* @__PURE__ */ jsxs68(Flex6, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
|
10448
|
+
/* @__PURE__ */ jsx116(Checkbox4, { checked: store.isAllPermission("isExport"), onChange: (e4) => {
|
|
10225
10449
|
store.toogleAllPermissionWithType("isExport", e4.target.checked);
|
|
10226
10450
|
} }),
|
|
10227
|
-
/* @__PURE__ */
|
|
10451
|
+
/* @__PURE__ */ jsxs68(MyFlexRow, { gap: 3, children: [
|
|
10228
10452
|
"Xu\u1EA5t",
|
|
10229
|
-
/* @__PURE__ */
|
|
10453
|
+
/* @__PURE__ */ jsx116(IconFileExport3, { color: "var(--mantine-color-green-8)" })
|
|
10230
10454
|
] })
|
|
10231
10455
|
] }) })
|
|
10232
10456
|
] })
|
|
10233
10457
|
}
|
|
10234
10458
|
),
|
|
10235
|
-
/* @__PURE__ */
|
|
10236
|
-
if (item.links == void 0) return /* @__PURE__ */
|
|
10237
|
-
/* @__PURE__ */
|
|
10238
|
-
/* @__PURE__ */
|
|
10239
|
-
/* @__PURE__ */
|
|
10240
|
-
/* @__PURE__ */
|
|
10241
|
-
/* @__PURE__ */
|
|
10242
|
-
/* @__PURE__ */
|
|
10243
|
-
/* @__PURE__ */
|
|
10459
|
+
/* @__PURE__ */ jsx116(Table5.Tbody, { bg: "light-dark(var(--mantine-color-white), var(--mantine-color-dark-8))", children: (_b = list[0]) == null ? void 0 : _b.map((item, idx) => {
|
|
10460
|
+
if (item.links == void 0) return /* @__PURE__ */ jsxs68(Table5.Tr, { children: [
|
|
10461
|
+
/* @__PURE__ */ jsx116(Table5.Td, { children: item.label }),
|
|
10462
|
+
/* @__PURE__ */ jsx116(Table5.Td, { children: /* @__PURE__ */ jsx116(MyCenterFull, { children: /* @__PURE__ */ jsx116(Checkbox4, {}) }) }),
|
|
10463
|
+
/* @__PURE__ */ jsx116(Table5.Td, { children: /* @__PURE__ */ jsx116(MyCenterFull, { children: /* @__PURE__ */ jsx116(Checkbox4, {}) }) }),
|
|
10464
|
+
/* @__PURE__ */ jsx116(Table5.Td, { children: /* @__PURE__ */ jsx116(MyCenterFull, { children: /* @__PURE__ */ jsx116(Checkbox4, {}) }) }),
|
|
10465
|
+
/* @__PURE__ */ jsx116(Table5.Td, { children: /* @__PURE__ */ jsx116(MyCenterFull, { children: /* @__PURE__ */ jsx116(Checkbox4, {}) }) }),
|
|
10466
|
+
/* @__PURE__ */ jsx116(Table5.Td, { children: /* @__PURE__ */ jsx116(MyCenterFull, { children: /* @__PURE__ */ jsx116(Checkbox4, {}) }) }),
|
|
10467
|
+
/* @__PURE__ */ jsx116(Table5.Td, { children: /* @__PURE__ */ jsx116(MyCenterFull, { children: /* @__PURE__ */ jsx116(Checkbox4, {}) }) })
|
|
10244
10468
|
] }, idx);
|
|
10245
|
-
return /* @__PURE__ */
|
|
10246
|
-
/* @__PURE__ */
|
|
10469
|
+
return /* @__PURE__ */ jsxs68(React4.Fragment, { children: [
|
|
10470
|
+
/* @__PURE__ */ jsx116(Table5.Tr, { children: /* @__PURE__ */ jsx116(
|
|
10247
10471
|
Table5.Td,
|
|
10248
10472
|
{
|
|
10249
10473
|
colSpan: 7,
|
|
10250
10474
|
bg: OBJECT_COlORS.mantineBackgroundBlueLight,
|
|
10251
|
-
children: /* @__PURE__ */
|
|
10475
|
+
children: /* @__PURE__ */ jsx116(Text14, { fs: "oblique", size: "sm", fw: "bold", children: item.label })
|
|
10252
10476
|
}
|
|
10253
10477
|
) }, item.label),
|
|
10254
10478
|
item.links.map(
|
|
10255
10479
|
(item2, idx2) => {
|
|
10256
10480
|
var _a2, _b2, _c, _d, _e, _f;
|
|
10257
|
-
return /* @__PURE__ */
|
|
10258
|
-
/* @__PURE__ */
|
|
10259
|
-
/* @__PURE__ */
|
|
10481
|
+
return /* @__PURE__ */ jsxs68(Table5.Tr, { children: [
|
|
10482
|
+
/* @__PURE__ */ jsx116(Table5.Td, { children: item2.label }),
|
|
10483
|
+
/* @__PURE__ */ jsx116(Table5.Td, { children: /* @__PURE__ */ jsx116(MyCenterFull, { children: /* @__PURE__ */ jsx116(
|
|
10260
10484
|
Checkbox4,
|
|
10261
10485
|
{
|
|
10262
10486
|
checked: ((_a2 = store.findByPageId(item2.pageId)) == null ? void 0 : _a2.isRead) || false,
|
|
@@ -10267,7 +10491,7 @@ function F_core83092_ViewMenuPermissions({ menuData: menuData2 }) {
|
|
|
10267
10491
|
}
|
|
10268
10492
|
}
|
|
10269
10493
|
) }) }),
|
|
10270
|
-
/* @__PURE__ */
|
|
10494
|
+
/* @__PURE__ */ jsx116(Table5.Td, { children: /* @__PURE__ */ jsx116(MyCenterFull, { children: /* @__PURE__ */ jsx116(
|
|
10271
10495
|
Checkbox4,
|
|
10272
10496
|
{
|
|
10273
10497
|
checked: ((_b2 = store.findByPageId(item2.pageId)) == null ? void 0 : _b2.isCreate) || false,
|
|
@@ -10278,7 +10502,7 @@ function F_core83092_ViewMenuPermissions({ menuData: menuData2 }) {
|
|
|
10278
10502
|
}
|
|
10279
10503
|
}
|
|
10280
10504
|
) }) }),
|
|
10281
|
-
/* @__PURE__ */
|
|
10505
|
+
/* @__PURE__ */ jsx116(Table5.Td, { children: /* @__PURE__ */ jsx116(MyCenterFull, { children: /* @__PURE__ */ jsx116(
|
|
10282
10506
|
Checkbox4,
|
|
10283
10507
|
{
|
|
10284
10508
|
checked: ((_c = store.findByPageId(item2.pageId)) == null ? void 0 : _c.isUpdate) || false,
|
|
@@ -10289,7 +10513,7 @@ function F_core83092_ViewMenuPermissions({ menuData: menuData2 }) {
|
|
|
10289
10513
|
}
|
|
10290
10514
|
}
|
|
10291
10515
|
) }) }),
|
|
10292
|
-
/* @__PURE__ */
|
|
10516
|
+
/* @__PURE__ */ jsx116(Table5.Td, { children: /* @__PURE__ */ jsx116(MyCenterFull, { children: /* @__PURE__ */ jsx116(
|
|
10293
10517
|
Checkbox4,
|
|
10294
10518
|
{
|
|
10295
10519
|
checked: ((_d = store.findByPageId(item2.pageId)) == null ? void 0 : _d.isDelete) || false,
|
|
@@ -10300,7 +10524,7 @@ function F_core83092_ViewMenuPermissions({ menuData: menuData2 }) {
|
|
|
10300
10524
|
}
|
|
10301
10525
|
}
|
|
10302
10526
|
) }) }),
|
|
10303
|
-
/* @__PURE__ */
|
|
10527
|
+
/* @__PURE__ */ jsx116(Table5.Td, { children: /* @__PURE__ */ jsx116(MyCenterFull, { children: /* @__PURE__ */ jsx116(
|
|
10304
10528
|
Checkbox4,
|
|
10305
10529
|
{
|
|
10306
10530
|
checked: ((_e = store.findByPageId(item2.pageId)) == null ? void 0 : _e.isPrint) || false,
|
|
@@ -10311,7 +10535,7 @@ function F_core83092_ViewMenuPermissions({ menuData: menuData2 }) {
|
|
|
10311
10535
|
}
|
|
10312
10536
|
}
|
|
10313
10537
|
) }) }),
|
|
10314
|
-
/* @__PURE__ */
|
|
10538
|
+
/* @__PURE__ */ jsx116(Table5.Td, { children: /* @__PURE__ */ jsx116(MyCenterFull, { children: /* @__PURE__ */ jsx116(
|
|
10315
10539
|
Checkbox4,
|
|
10316
10540
|
{
|
|
10317
10541
|
checked: ((_f = store.findByPageId(item2.pageId)) == null ? void 0 : _f.isExport) || false,
|
|
@@ -10331,7 +10555,7 @@ function F_core83092_ViewMenuPermissions({ menuData: menuData2 }) {
|
|
|
10331
10555
|
}
|
|
10332
10556
|
function useGetUserPermission2({ menuData: menuData2 }) {
|
|
10333
10557
|
const store = useS_core83092();
|
|
10334
|
-
const query =
|
|
10558
|
+
const query = useQuery19({
|
|
10335
10559
|
queryKey: ["F_7p4mh9d75x_AuthorizationTable", store.state.roleId],
|
|
10336
10560
|
queryFn: async () => {
|
|
10337
10561
|
const result = await baseAxios_default.get("/Role/GetUserPermission?userId=" + store.state.roleId);
|
|
@@ -10367,72 +10591,72 @@ function useGetUserPermission2({ menuData: menuData2 }) {
|
|
|
10367
10591
|
}
|
|
10368
10592
|
|
|
10369
10593
|
// src/modules-features/admin/core/core83092/F_core83092.tsx
|
|
10370
|
-
import { jsx as
|
|
10594
|
+
import { jsx as jsx117, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
10371
10595
|
function F_core83092({ menuData: menuData2 }) {
|
|
10372
|
-
return /* @__PURE__ */
|
|
10373
|
-
/* @__PURE__ */
|
|
10374
|
-
/* @__PURE__ */
|
|
10375
|
-
/* @__PURE__ */
|
|
10376
|
-
/* @__PURE__ */
|
|
10596
|
+
return /* @__PURE__ */ jsxs69(Grid4, { grow: true, children: [
|
|
10597
|
+
/* @__PURE__ */ jsx117(Grid4.Col, { span: 4, children: /* @__PURE__ */ jsx117(F_core83092_ReadUser, {}) }),
|
|
10598
|
+
/* @__PURE__ */ jsx117(Grid4.Col, { span: 8, children: /* @__PURE__ */ jsxs69(MyFlexColumn, { h: "80vh", flex: 1, children: [
|
|
10599
|
+
/* @__PURE__ */ jsx117(ScrollArea8.Autosize, { h: "100%", children: /* @__PURE__ */ jsx117(Paper12, { p: "md", bg: OBJECT_COlORS.mantineBackgroundSecondary, children: /* @__PURE__ */ jsx117(F_core83092_ViewMenuPermissions, { menuData: menuData2 }) }) }),
|
|
10600
|
+
/* @__PURE__ */ jsx117(F_core83092_Save, {})
|
|
10377
10601
|
] }) })
|
|
10378
10602
|
] });
|
|
10379
10603
|
}
|
|
10380
10604
|
|
|
10381
10605
|
// src/modules-features/admin/core/MainDashboard/BarChart_CourseStatus.tsx
|
|
10382
10606
|
import { BarChart } from "@mantine/charts";
|
|
10383
|
-
import { Group as Group18, Paper as
|
|
10384
|
-
import { Fragment as Fragment13, jsx as
|
|
10607
|
+
import { Group as Group18, Paper as Paper13, Text as Text15, useMantineColorScheme as useMantineColorScheme2 } from "@mantine/core";
|
|
10608
|
+
import { Fragment as Fragment13, jsx as jsx118, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
10385
10609
|
|
|
10386
10610
|
// src/modules-features/admin/core/MainDashboard/BarChart_ExamStatus.tsx
|
|
10387
10611
|
import { BarChart as BarChart2 } from "@mantine/charts";
|
|
10388
|
-
import { Group as Group19, Paper as
|
|
10389
|
-
import { Fragment as Fragment14, jsx as
|
|
10612
|
+
import { Group as Group19, Paper as Paper14, Text as Text16, useMantineColorScheme as useMantineColorScheme3 } from "@mantine/core";
|
|
10613
|
+
import { Fragment as Fragment14, jsx as jsx119, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
10390
10614
|
|
|
10391
10615
|
// src/modules-features/admin/core/MainDashboard/BarChart_RevenueByAcademicYear.tsx
|
|
10392
10616
|
import { BarChart as BarChart3 } from "@mantine/charts";
|
|
10393
|
-
import { Group as Group20, Paper as
|
|
10394
|
-
import { Fragment as Fragment15, jsx as
|
|
10617
|
+
import { Group as Group20, Paper as Paper15, Text as Text17, useMantineColorScheme as useMantineColorScheme4 } from "@mantine/core";
|
|
10618
|
+
import { Fragment as Fragment15, jsx as jsx120, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
10395
10619
|
|
|
10396
10620
|
// src/modules-features/admin/core/MainDashboard/BarChart_StudentStatusIn30Days.tsx
|
|
10397
10621
|
import { BarChart as BarChart4 } from "@mantine/charts";
|
|
10398
|
-
import { Group as Group21, Paper as
|
|
10399
|
-
import { Fragment as Fragment16, jsx as
|
|
10622
|
+
import { Group as Group21, Paper as Paper16, Text as Text18, useMantineColorScheme as useMantineColorScheme5 } from "@mantine/core";
|
|
10623
|
+
import { Fragment as Fragment16, jsx as jsx121, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
10400
10624
|
|
|
10401
10625
|
// src/modules-features/admin/core/MainDashboard/HBarChart_CourseDropOutPercentage.tsx
|
|
10402
10626
|
import { BarChart as BarChart5 } from "@mantine/charts";
|
|
10403
|
-
import { Group as Group22, Paper as
|
|
10404
|
-
import { jsx as
|
|
10627
|
+
import { Group as Group22, Paper as Paper17, Text as Text19, useMantineColorScheme as useMantineColorScheme6 } from "@mantine/core";
|
|
10628
|
+
import { jsx as jsx122, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
10405
10629
|
|
|
10406
10630
|
// src/modules-features/admin/core/MainDashboard/HBarChart_CourseProgressPercentage.tsx
|
|
10407
10631
|
import { BarChart as BarChart6 } from "@mantine/charts";
|
|
10408
|
-
import { Group as Group23, Paper as
|
|
10409
|
-
import { jsx as
|
|
10632
|
+
import { Group as Group23, Paper as Paper18, Text as Text20, useMantineColorScheme as useMantineColorScheme7 } from "@mantine/core";
|
|
10633
|
+
import { jsx as jsx123, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
10410
10634
|
|
|
10411
10635
|
// src/modules-features/admin/core/MainDashboard/LineChart_RevenueIn12Months.tsx
|
|
10412
10636
|
import { LineChart } from "@mantine/charts";
|
|
10413
|
-
import { Group as Group24, Paper as
|
|
10414
|
-
import { Fragment as Fragment17, jsx as
|
|
10637
|
+
import { Group as Group24, Paper as Paper19, Text as Text21 } from "@mantine/core";
|
|
10638
|
+
import { Fragment as Fragment17, jsx as jsx124, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
10415
10639
|
|
|
10416
10640
|
// src/modules-features/admin/core/MainDashboard/LineChart_TotalRevenueByDiscountIn3Months.tsx
|
|
10417
10641
|
import { LineChart as LineChart2 } from "@mantine/charts";
|
|
10418
|
-
import { Group as Group25, Paper as
|
|
10419
|
-
import { Fragment as Fragment18, jsx as
|
|
10642
|
+
import { Group as Group25, Paper as Paper20, Text as Text22 } from "@mantine/core";
|
|
10643
|
+
import { Fragment as Fragment18, jsx as jsx125, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
10420
10644
|
|
|
10421
10645
|
// src/modules-features/admin/core/MainDashboard/LineChart_TotalRevenueByVoucherIn3Months.tsx
|
|
10422
10646
|
import { LineChart as LineChart3 } from "@mantine/charts";
|
|
10423
|
-
import { Group as Group26, Paper as
|
|
10424
|
-
import { Fragment as Fragment19, jsx as
|
|
10647
|
+
import { Group as Group26, Paper as Paper21, Text as Text23 } from "@mantine/core";
|
|
10648
|
+
import { Fragment as Fragment19, jsx as jsx126, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
10425
10649
|
|
|
10426
10650
|
// src/modules-features/admin/core/MainDashboard/LineChart_TotalStudentIn12Months.tsx
|
|
10427
10651
|
import { LineChart as LineChart4 } from "@mantine/charts";
|
|
10428
|
-
import { Group as Group27, Paper as
|
|
10429
|
-
import { Fragment as Fragment20, jsx as
|
|
10652
|
+
import { Group as Group27, Paper as Paper22, Text as Text24 } from "@mantine/core";
|
|
10653
|
+
import { Fragment as Fragment20, jsx as jsx127, jsxs as jsxs79 } from "react/jsx-runtime";
|
|
10430
10654
|
|
|
10431
10655
|
// src/modules-features/admin/core/MainDashboard/ViewDiscountStat.tsx
|
|
10432
10656
|
import { Center as Center4, Progress, Space as Space8, Text as Text25 } from "@mantine/core";
|
|
10433
10657
|
import { PieChart } from "@mantine/charts";
|
|
10434
10658
|
import { useMemo as useMemo16 } from "react";
|
|
10435
|
-
import { Fragment as Fragment21, jsx as
|
|
10659
|
+
import { Fragment as Fragment21, jsx as jsx128, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
10436
10660
|
function getRandomColor(seed) {
|
|
10437
10661
|
const random = Math.sin(seed) * 1e4;
|
|
10438
10662
|
const color = `#${Math.floor((random - Math.floor(random)) * 16777215).toString(16).padStart(6, "0")}`;
|
|
@@ -10610,7 +10834,7 @@ function PieChart_DiscountUsedPercentage() {
|
|
|
10610
10834
|
header: "M\xE0u",
|
|
10611
10835
|
accessorKey: "color",
|
|
10612
10836
|
accessorFn(originalRow) {
|
|
10613
|
-
return /* @__PURE__ */
|
|
10837
|
+
return /* @__PURE__ */ jsx128("div", { style: { width: 20, height: 20, backgroundColor: originalRow.color } });
|
|
10614
10838
|
},
|
|
10615
10839
|
minSize: 30,
|
|
10616
10840
|
maxSize: 30
|
|
@@ -10625,7 +10849,7 @@ function PieChart_DiscountUsedPercentage() {
|
|
|
10625
10849
|
header: "%",
|
|
10626
10850
|
accessorKey: "used",
|
|
10627
10851
|
accessorFn(originalRow) {
|
|
10628
|
-
return /* @__PURE__ */
|
|
10852
|
+
return /* @__PURE__ */ jsx128(Fragment21, { children: /* @__PURE__ */ jsx128(Center4, { children: /* @__PURE__ */ jsxs80(Text25, { children: [
|
|
10629
10853
|
(originalRow.used / totalDisountCode * 100).toFixed(0),
|
|
10630
10854
|
"%"
|
|
10631
10855
|
] }) }) });
|
|
@@ -10640,10 +10864,10 @@ function PieChart_DiscountUsedPercentage() {
|
|
|
10640
10864
|
return originalRow.used;
|
|
10641
10865
|
},
|
|
10642
10866
|
Cell: ({ row }) => {
|
|
10643
|
-
return /* @__PURE__ */
|
|
10644
|
-
/* @__PURE__ */
|
|
10867
|
+
return /* @__PURE__ */ jsxs80(Fragment21, { children: [
|
|
10868
|
+
/* @__PURE__ */ jsx128(Center4, { children: /* @__PURE__ */ jsxs80(Text25, { children: [
|
|
10645
10869
|
"\u0110\xE3 s\u1EED d\u1EE5ng: ",
|
|
10646
|
-
/* @__PURE__ */
|
|
10870
|
+
/* @__PURE__ */ jsxs80("strong", { children: [
|
|
10647
10871
|
row.original.used,
|
|
10648
10872
|
" / ",
|
|
10649
10873
|
row.original.total
|
|
@@ -10652,7 +10876,7 @@ function PieChart_DiscountUsedPercentage() {
|
|
|
10652
10876
|
(row.original.used / row.original.total * 100).toFixed(2),
|
|
10653
10877
|
"%)"
|
|
10654
10878
|
] }) }),
|
|
10655
|
-
/* @__PURE__ */
|
|
10879
|
+
/* @__PURE__ */ jsx128(Progress, { color: "yellow", radius: "xs", size: "lg", value: row.original.used / row.original.total * 100 })
|
|
10656
10880
|
] });
|
|
10657
10881
|
},
|
|
10658
10882
|
minSize: 50,
|
|
@@ -10661,9 +10885,9 @@ function PieChart_DiscountUsedPercentage() {
|
|
|
10661
10885
|
],
|
|
10662
10886
|
[]
|
|
10663
10887
|
);
|
|
10664
|
-
return /* @__PURE__ */
|
|
10665
|
-
/* @__PURE__ */
|
|
10666
|
-
/* @__PURE__ */
|
|
10888
|
+
return /* @__PURE__ */ jsx128(Fragment21, { children: /* @__PURE__ */ jsxs80(MyFlexColumn, { children: [
|
|
10889
|
+
/* @__PURE__ */ jsx128(Text25, { 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" }),
|
|
10890
|
+
/* @__PURE__ */ jsx128(Center4, { children: /* @__PURE__ */ jsx128(
|
|
10667
10891
|
PieChart,
|
|
10668
10892
|
{
|
|
10669
10893
|
startAngle: 90,
|
|
@@ -10676,8 +10900,8 @@ function PieChart_DiscountUsedPercentage() {
|
|
|
10676
10900
|
data: data_used_discountCode
|
|
10677
10901
|
}
|
|
10678
10902
|
) }),
|
|
10679
|
-
/* @__PURE__ */
|
|
10680
|
-
/* @__PURE__ */
|
|
10903
|
+
/* @__PURE__ */ jsx128(Space8, { mt: 5 }),
|
|
10904
|
+
/* @__PURE__ */ jsx128(
|
|
10681
10905
|
MyDataTable,
|
|
10682
10906
|
{
|
|
10683
10907
|
data: mockData,
|
|
@@ -10695,7 +10919,7 @@ function PieChart_DiscountUsedPercentage() {
|
|
|
10695
10919
|
import { Center as Center5, Progress as Progress2, Space as Space9, Text as Text26 } from "@mantine/core";
|
|
10696
10920
|
import { PieChart as PieChart2 } from "@mantine/charts";
|
|
10697
10921
|
import { useMemo as useMemo17 } from "react";
|
|
10698
|
-
import { Fragment as Fragment22, jsx as
|
|
10922
|
+
import { Fragment as Fragment22, jsx as jsx129, jsxs as jsxs81 } from "react/jsx-runtime";
|
|
10699
10923
|
function getRandomColor2(seed) {
|
|
10700
10924
|
const random = Math.sin(seed) * 1e4;
|
|
10701
10925
|
const color = `#${Math.floor((random - Math.floor(random)) * 16777215).toString(16).padStart(6, "0")}`;
|
|
@@ -10873,7 +11097,7 @@ function PieChart_VoucherUsedPercentage() {
|
|
|
10873
11097
|
header: "M\xE0u",
|
|
10874
11098
|
accessorKey: "color",
|
|
10875
11099
|
accessorFn(originalRow) {
|
|
10876
|
-
return /* @__PURE__ */
|
|
11100
|
+
return /* @__PURE__ */ jsx129("div", { style: { width: 20, height: 20, backgroundColor: originalRow.color } });
|
|
10877
11101
|
},
|
|
10878
11102
|
minSize: 30,
|
|
10879
11103
|
maxSize: 30
|
|
@@ -10888,7 +11112,7 @@ function PieChart_VoucherUsedPercentage() {
|
|
|
10888
11112
|
header: "%",
|
|
10889
11113
|
accessorKey: "used",
|
|
10890
11114
|
accessorFn(originalRow) {
|
|
10891
|
-
return /* @__PURE__ */
|
|
11115
|
+
return /* @__PURE__ */ jsx129(Fragment22, { children: /* @__PURE__ */ jsx129(Center5, { children: /* @__PURE__ */ jsxs81(Text26, { children: [
|
|
10892
11116
|
(originalRow.used / totalVoucherCode * 100).toFixed(0),
|
|
10893
11117
|
"%"
|
|
10894
11118
|
] }) }) });
|
|
@@ -10903,10 +11127,10 @@ function PieChart_VoucherUsedPercentage() {
|
|
|
10903
11127
|
return originalRow.used;
|
|
10904
11128
|
},
|
|
10905
11129
|
Cell: ({ row }) => {
|
|
10906
|
-
return /* @__PURE__ */
|
|
10907
|
-
/* @__PURE__ */
|
|
11130
|
+
return /* @__PURE__ */ jsxs81(Fragment22, { children: [
|
|
11131
|
+
/* @__PURE__ */ jsx129(Center5, { children: /* @__PURE__ */ jsxs81(Text26, { children: [
|
|
10908
11132
|
"\u0110\xE3 s\u1EED d\u1EE5ng: ",
|
|
10909
|
-
/* @__PURE__ */
|
|
11133
|
+
/* @__PURE__ */ jsxs81("strong", { children: [
|
|
10910
11134
|
row.original.used,
|
|
10911
11135
|
" / ",
|
|
10912
11136
|
row.original.total
|
|
@@ -10915,7 +11139,7 @@ function PieChart_VoucherUsedPercentage() {
|
|
|
10915
11139
|
(row.original.used / row.original.total * 100).toFixed(2),
|
|
10916
11140
|
"%)"
|
|
10917
11141
|
] }) }),
|
|
10918
|
-
/* @__PURE__ */
|
|
11142
|
+
/* @__PURE__ */ jsx129(Progress2, { color: "yellow", radius: "xs", size: "lg", value: row.original.used / row.original.total * 100 })
|
|
10919
11143
|
] });
|
|
10920
11144
|
},
|
|
10921
11145
|
minSize: 50,
|
|
@@ -10924,9 +11148,9 @@ function PieChart_VoucherUsedPercentage() {
|
|
|
10924
11148
|
],
|
|
10925
11149
|
[]
|
|
10926
11150
|
);
|
|
10927
|
-
return /* @__PURE__ */
|
|
10928
|
-
/* @__PURE__ */
|
|
10929
|
-
/* @__PURE__ */
|
|
11151
|
+
return /* @__PURE__ */ jsx129(Fragment22, { children: /* @__PURE__ */ jsxs81(MyFlexColumn, { children: [
|
|
11152
|
+
/* @__PURE__ */ jsx129(Text26, { 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" }),
|
|
11153
|
+
/* @__PURE__ */ jsx129(Center5, { children: /* @__PURE__ */ jsx129(
|
|
10930
11154
|
PieChart2,
|
|
10931
11155
|
{
|
|
10932
11156
|
startAngle: 90,
|
|
@@ -10939,8 +11163,8 @@ function PieChart_VoucherUsedPercentage() {
|
|
|
10939
11163
|
data: data_used_discountCode2
|
|
10940
11164
|
}
|
|
10941
11165
|
) }),
|
|
10942
|
-
/* @__PURE__ */
|
|
10943
|
-
/* @__PURE__ */
|
|
11166
|
+
/* @__PURE__ */ jsx129(Space9, { mt: 5 }),
|
|
11167
|
+
/* @__PURE__ */ jsx129(
|
|
10944
11168
|
MyDataTable,
|
|
10945
11169
|
{
|
|
10946
11170
|
data: mockData2,
|
|
@@ -10960,43 +11184,43 @@ import { IconLogout } from "@tabler/icons-react";
|
|
|
10960
11184
|
import { useRouter as useRouter4 } from "next/navigation";
|
|
10961
11185
|
|
|
10962
11186
|
// src/modules-features/authenticate/useS_authenticate.ts
|
|
10963
|
-
var
|
|
11187
|
+
var useStore6 = createGenericStore({
|
|
10964
11188
|
initialState: { token: "" },
|
|
10965
11189
|
storageKey: "useS_authenticate"
|
|
10966
11190
|
});
|
|
10967
11191
|
function useS_authenticate() {
|
|
10968
|
-
const store =
|
|
11192
|
+
const store = useStore6();
|
|
10969
11193
|
function logOut() {
|
|
10970
11194
|
}
|
|
10971
11195
|
return __spreadValues({}, store);
|
|
10972
11196
|
}
|
|
10973
11197
|
|
|
10974
11198
|
// src/modules-features/authenticate/F_authenticate_Logout.tsx
|
|
10975
|
-
import { jsx as
|
|
11199
|
+
import { jsx as jsx130 } from "react/jsx-runtime";
|
|
10976
11200
|
function F_authenticate_Logout() {
|
|
10977
11201
|
const router = useRouter4();
|
|
10978
11202
|
const S_Authenticate = useS_authenticate();
|
|
10979
|
-
return /* @__PURE__ */
|
|
11203
|
+
return /* @__PURE__ */ jsx130(Button18, { onClick: () => {
|
|
10980
11204
|
S_Authenticate.setProperty("token", "");
|
|
10981
11205
|
router.replace("/authenticate/login");
|
|
10982
|
-
}, leftSection: /* @__PURE__ */
|
|
11206
|
+
}, leftSection: /* @__PURE__ */ jsx130(IconLogout, {}), fullWidth: true, justify: "start", variant: "subtle", children: "\u0110\u0103ng xu\u1EA5t" });
|
|
10983
11207
|
}
|
|
10984
11208
|
|
|
10985
11209
|
// src/modules-features/authenticate/F_authenticate_SplashPage.tsx
|
|
10986
11210
|
import { useRouter as useRouter5 } from "next/navigation";
|
|
10987
|
-
import { useEffect as
|
|
10988
|
-
import { jsx as
|
|
11211
|
+
import { useEffect as useEffect18 } from "react";
|
|
11212
|
+
import { jsx as jsx131 } from "react/jsx-runtime";
|
|
10989
11213
|
function F_authenticate_SplashPage() {
|
|
10990
11214
|
const router = useRouter5();
|
|
10991
11215
|
const S_Authenticate = useS_authenticate();
|
|
10992
|
-
|
|
11216
|
+
useEffect18(() => {
|
|
10993
11217
|
if (S_Authenticate.state.token == "") {
|
|
10994
11218
|
router.push("/authenticate/login");
|
|
10995
11219
|
return;
|
|
10996
11220
|
}
|
|
10997
11221
|
router.push("/admin/core71678");
|
|
10998
11222
|
}, [S_Authenticate.state.token]);
|
|
10999
|
-
return /* @__PURE__ */
|
|
11223
|
+
return /* @__PURE__ */ jsx131(MyBoxesBackground, { title: "H\u1EC7 th\u1ED1ng th\xF4ng tin qu\u1EA3n l\xED \u0111\xE0o t\u1EA1o ng\u1EAFn h\u1EA1n" });
|
|
11000
11224
|
}
|
|
11001
11225
|
|
|
11002
11226
|
// src/modules-features/authenticate/F_authenticate_Login/F_authenticate_Login.tsx
|
|
@@ -11008,14 +11232,14 @@ import {
|
|
|
11008
11232
|
Checkbox as Checkbox5,
|
|
11009
11233
|
Flex as Flex7,
|
|
11010
11234
|
Group as Group28,
|
|
11011
|
-
Paper as
|
|
11235
|
+
Paper as Paper23,
|
|
11012
11236
|
PasswordInput as PasswordInput2,
|
|
11013
11237
|
Text as Text27,
|
|
11014
11238
|
TextInput as TextInput6,
|
|
11015
11239
|
Title as Title2
|
|
11016
11240
|
} from "@mantine/core";
|
|
11017
|
-
import { useForm as
|
|
11018
|
-
import { useMutation as
|
|
11241
|
+
import { useForm as useForm20 } from "@mantine/form";
|
|
11242
|
+
import { useMutation as useMutation9 } from "@tanstack/react-query";
|
|
11019
11243
|
import axios2 from "axios";
|
|
11020
11244
|
import Link5 from "next/link";
|
|
11021
11245
|
import { useRouter as useRouter6 } from "next/navigation";
|
|
@@ -11025,7 +11249,7 @@ import { useState as useState17 } from "react";
|
|
|
11025
11249
|
var css_default3 = {};
|
|
11026
11250
|
|
|
11027
11251
|
// src/modules-features/authenticate/F_authenticate_Login/F_authenticate_Login.tsx
|
|
11028
|
-
import { jsx as
|
|
11252
|
+
import { jsx as jsx132, jsxs as jsxs82 } from "react/jsx-runtime";
|
|
11029
11253
|
function F_authenticate_Login({
|
|
11030
11254
|
loginInfo,
|
|
11031
11255
|
redirectUrlAfterLogin = "/admin/dashboard",
|
|
@@ -11037,7 +11261,7 @@ function F_authenticate_Login({
|
|
|
11037
11261
|
const authStore = useS_authenticate();
|
|
11038
11262
|
const loadingState = useState17(false);
|
|
11039
11263
|
const mutation = useM_Account_Sigin();
|
|
11040
|
-
const form =
|
|
11264
|
+
const form = useForm20({
|
|
11041
11265
|
mode: "uncontrolled",
|
|
11042
11266
|
initialValues: {
|
|
11043
11267
|
username: (loginInfo == null ? void 0 : loginInfo.username) || "admincoe",
|
|
@@ -11078,21 +11302,21 @@ function F_authenticate_Login({
|
|
|
11078
11302
|
}
|
|
11079
11303
|
});
|
|
11080
11304
|
}
|
|
11081
|
-
return /* @__PURE__ */
|
|
11305
|
+
return /* @__PURE__ */ jsx132(
|
|
11082
11306
|
BackgroundImage,
|
|
11083
11307
|
{
|
|
11084
11308
|
src: backgroundImage,
|
|
11085
11309
|
h: "100vh",
|
|
11086
|
-
children: /* @__PURE__ */
|
|
11087
|
-
/* @__PURE__ */
|
|
11088
|
-
/* @__PURE__ */
|
|
11089
|
-
/* @__PURE__ */
|
|
11310
|
+
children: /* @__PURE__ */ jsx132(Center6, { h: "100vh", children: /* @__PURE__ */ jsxs82(Paper23, { withBorder: true, w: 400, m: "md", shadow: "md", p: 30, mt: 30, radius: "md", children: [
|
|
11311
|
+
/* @__PURE__ */ jsxs82(Flex7, { direction: "column", mb: "md", children: [
|
|
11312
|
+
/* @__PURE__ */ jsx132(Title2, { ta: "center", className: css_default3.title, children: "\u0110\u0103ng nh\u1EADp!" }),
|
|
11313
|
+
/* @__PURE__ */ jsxs82(Text27, { c: "dimmed", size: "sm", ta: "center", mt: 5, children: [
|
|
11090
11314
|
"B\u1EA1n g\u1EB7p v\u1EA5n \u0111\u1EC1 k\u1EF9 thu\u1EADt?\xA0",
|
|
11091
|
-
/* @__PURE__ */
|
|
11315
|
+
/* @__PURE__ */ jsx132(Anchor2, { size: "sm", component: "button", children: "V\xE0o link n\xE0y" })
|
|
11092
11316
|
] })
|
|
11093
11317
|
] }),
|
|
11094
|
-
/* @__PURE__ */
|
|
11095
|
-
/* @__PURE__ */
|
|
11318
|
+
/* @__PURE__ */ jsx132("form", { onSubmit: form.onSubmit(async (values) => handleSubmit(values.username, values.password)), children: /* @__PURE__ */ jsxs82(MyFlexColumn, { children: [
|
|
11319
|
+
/* @__PURE__ */ jsx132(
|
|
11096
11320
|
TextInput6,
|
|
11097
11321
|
__spreadProps(__spreadValues({}, form.getInputProps("username")), {
|
|
11098
11322
|
label: "T\xE0i kho\u1EA3n",
|
|
@@ -11100,7 +11324,7 @@ function F_authenticate_Login({
|
|
|
11100
11324
|
withAsterisk: true
|
|
11101
11325
|
})
|
|
11102
11326
|
),
|
|
11103
|
-
/* @__PURE__ */
|
|
11327
|
+
/* @__PURE__ */ jsx132(
|
|
11104
11328
|
PasswordInput2,
|
|
11105
11329
|
__spreadProps(__spreadValues({}, form.getInputProps("password")), {
|
|
11106
11330
|
label: "M\u1EADt kh\u1EA9u",
|
|
@@ -11108,11 +11332,11 @@ function F_authenticate_Login({
|
|
|
11108
11332
|
withAsterisk: true
|
|
11109
11333
|
})
|
|
11110
11334
|
),
|
|
11111
|
-
/* @__PURE__ */
|
|
11112
|
-
/* @__PURE__ */
|
|
11113
|
-
/* @__PURE__ */
|
|
11335
|
+
/* @__PURE__ */ jsxs82(Group28, { justify: "space-between", children: [
|
|
11336
|
+
/* @__PURE__ */ jsx132(Checkbox5, { label: "L\u01B0u \u0111\u0103ng nh\u1EADp" }),
|
|
11337
|
+
/* @__PURE__ */ jsx132(Anchor2, { component: Link5, href: "quen-mat-khau", size: "sm", children: "Qu\xEAn m\u1EADt kh\u1EA9u?" })
|
|
11114
11338
|
] }),
|
|
11115
|
-
/* @__PURE__ */
|
|
11339
|
+
/* @__PURE__ */ jsx132(
|
|
11116
11340
|
Button19,
|
|
11117
11341
|
{
|
|
11118
11342
|
loading: loadingState[0],
|
|
@@ -11129,7 +11353,7 @@ function F_authenticate_Login({
|
|
|
11129
11353
|
}
|
|
11130
11354
|
function useM_Account_Sigin() {
|
|
11131
11355
|
const ENDPOINT5 = process.env.NEXT_PUBLIC_API + "/Account/SignIn";
|
|
11132
|
-
const mutation =
|
|
11356
|
+
const mutation = useMutation9({
|
|
11133
11357
|
mutationFn: async (values) => {
|
|
11134
11358
|
const result = await axios2.post(ENDPOINT5, values);
|
|
11135
11359
|
return result.data;
|
|
@@ -11230,6 +11454,8 @@ export {
|
|
|
11230
11454
|
F_core47643_Form,
|
|
11231
11455
|
F_core47643_Read,
|
|
11232
11456
|
F_core47643,
|
|
11457
|
+
useS_core60524,
|
|
11458
|
+
F_core60524,
|
|
11233
11459
|
F_core64229_Form,
|
|
11234
11460
|
F_core64229_Delete,
|
|
11235
11461
|
F_core64229_Read,
|