aq-fe-framework 0.1.99 → 0.1.100
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/IAQModule-XZYlbivW.d.mts +31 -0
- package/dist/chunk-7ZCOFATU.mjs +42 -0
- package/dist/{chunk-EEQENBXZ.mjs → chunk-CJDXLINF.mjs} +0 -40
- package/dist/{chunk-CUZQ62NZ.mjs → chunk-ETYO7RDW.mjs} +46 -77
- package/dist/chunk-QAWKASVG.mjs +41 -0
- package/dist/components/index.mjs +4 -2
- package/dist/hooks/index.d.mts +6 -0
- package/dist/hooks/index.mjs +11 -0
- package/dist/modules-features/index.d.mts +1 -30
- package/dist/modules-features/index.mjs +4 -2
- package/dist/utils/index.mjs +4 -2
- package/package.json +5 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
interface IBaseEntity {
|
|
2
|
+
id?: number;
|
|
3
|
+
code?: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
concurrencyStamp?: string;
|
|
6
|
+
isEnabled?: boolean;
|
|
7
|
+
modifiedWhen?: Date;
|
|
8
|
+
modifiedBy?: number;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface IAQModule extends IBaseEntity {
|
|
12
|
+
officelName?: string;
|
|
13
|
+
phoneNumber?: string;
|
|
14
|
+
email?: string;
|
|
15
|
+
faviconPath?: string;
|
|
16
|
+
logoPath?: string;
|
|
17
|
+
registrationDate?: Date;
|
|
18
|
+
limiteDate?: Date;
|
|
19
|
+
faviconFileDetail?: {
|
|
20
|
+
fileName?: string;
|
|
21
|
+
fileExtension?: string;
|
|
22
|
+
fileBase64String?: string;
|
|
23
|
+
};
|
|
24
|
+
logoFileDetail?: {
|
|
25
|
+
fileName?: string;
|
|
26
|
+
fileExtension?: string;
|
|
27
|
+
fileBase64String?: string;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export type { IAQModule as I, IBaseEntity as a };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// src/utils/utils_notification.ts
|
|
2
|
+
import { notifications } from "@mantine/notifications";
|
|
3
|
+
function utils_notification_show({ crudType = "create", message, color }) {
|
|
4
|
+
if (crudType == "create") {
|
|
5
|
+
notifications.show({
|
|
6
|
+
message: message ? message : "Th\xEAm th\xE0nh c\xF4ng!",
|
|
7
|
+
color: color ? color : "green"
|
|
8
|
+
});
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
if (crudType == "update") {
|
|
12
|
+
notifications.show({
|
|
13
|
+
message: message ? message : "C\u1EADp nh\u1EADt th\xE0nh c\xF4ng!",
|
|
14
|
+
color: color ? color : "green"
|
|
15
|
+
});
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
if (crudType == "delete") {
|
|
19
|
+
notifications.show({
|
|
20
|
+
message: message ? message : "X\xF3a th\xE0nh c\xF4ng!",
|
|
21
|
+
color: color ? color : "green"
|
|
22
|
+
});
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
if (crudType == "error") {
|
|
26
|
+
notifications.show({
|
|
27
|
+
message: message ? message : "L\u1ED7i!",
|
|
28
|
+
color: color ? color : "red"
|
|
29
|
+
});
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
if (crudType == "importSucess") {
|
|
33
|
+
notifications.show({
|
|
34
|
+
message: message ? message : "Import th\xE0nh c\xF4ng!"
|
|
35
|
+
});
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export {
|
|
41
|
+
utils_notification_show
|
|
42
|
+
};
|
|
@@ -177,45 +177,6 @@ async function utils_file_docxtemplaterDownload({
|
|
|
177
177
|
saveAs2(buffer, fileName || "output.docx");
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
// src/utils/utils_notification.ts
|
|
181
|
-
import { notifications } from "@mantine/notifications";
|
|
182
|
-
function utils_notification_show({ crudType = "create", message, color }) {
|
|
183
|
-
if (crudType == "create") {
|
|
184
|
-
notifications.show({
|
|
185
|
-
message: message ? message : "Th\xEAm th\xE0nh c\xF4ng!",
|
|
186
|
-
color: color ? color : "green"
|
|
187
|
-
});
|
|
188
|
-
return;
|
|
189
|
-
}
|
|
190
|
-
if (crudType == "update") {
|
|
191
|
-
notifications.show({
|
|
192
|
-
message: message ? message : "C\u1EADp nh\u1EADt th\xE0nh c\xF4ng!",
|
|
193
|
-
color: color ? color : "green"
|
|
194
|
-
});
|
|
195
|
-
return;
|
|
196
|
-
}
|
|
197
|
-
if (crudType == "delete") {
|
|
198
|
-
notifications.show({
|
|
199
|
-
message: message ? message : "X\xF3a th\xE0nh c\xF4ng!",
|
|
200
|
-
color: color ? color : "green"
|
|
201
|
-
});
|
|
202
|
-
return;
|
|
203
|
-
}
|
|
204
|
-
if (crudType == "error") {
|
|
205
|
-
notifications.show({
|
|
206
|
-
message: message ? message : "L\u1ED7i!",
|
|
207
|
-
color: color ? color : "red"
|
|
208
|
-
});
|
|
209
|
-
return;
|
|
210
|
-
}
|
|
211
|
-
if (crudType == "importSucess") {
|
|
212
|
-
notifications.show({
|
|
213
|
-
message: message ? message : "Import th\xE0nh c\xF4ng!"
|
|
214
|
-
});
|
|
215
|
-
return;
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
|
|
219
180
|
// src/utils/utils_pdf.ts
|
|
220
181
|
import axios from "axios";
|
|
221
182
|
async function utils_pdf_download(url) {
|
|
@@ -261,7 +222,6 @@ function U0MyValidateEmail(value) {
|
|
|
261
222
|
}
|
|
262
223
|
|
|
263
224
|
export {
|
|
264
|
-
utils_notification_show,
|
|
265
225
|
utils_pdf_download,
|
|
266
226
|
U0DateToDDMMYYYString,
|
|
267
227
|
utils_date_dateToDDMMYYYString,
|
|
@@ -1,14 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
baseAxios_default,
|
|
3
|
+
useQ_AQ_GetAQModule
|
|
4
|
+
} from "./chunk-QAWKASVG.mjs";
|
|
5
|
+
import {
|
|
6
|
+
createGenericStore
|
|
7
|
+
} from "./chunk-Y3YGC5IH.mjs";
|
|
1
8
|
import {
|
|
2
9
|
U0DateToDDMMYYYString,
|
|
3
10
|
U0MyValidateEmail,
|
|
4
11
|
utils_converter_enumToSelectOptions,
|
|
5
12
|
utils_file_fileToAQDocumentType,
|
|
6
|
-
utils_notification_show,
|
|
7
13
|
utils_pdf_download
|
|
8
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-CJDXLINF.mjs";
|
|
9
15
|
import {
|
|
10
|
-
|
|
11
|
-
} from "./chunk-
|
|
16
|
+
utils_notification_show
|
|
17
|
+
} from "./chunk-7ZCOFATU.mjs";
|
|
12
18
|
import {
|
|
13
19
|
__objRest,
|
|
14
20
|
__spreadProps,
|
|
@@ -27,30 +33,6 @@ function MyFlexColumn(_a) {
|
|
|
27
33
|
import { Accordion, Blockquote } from "@mantine/core";
|
|
28
34
|
import { useQuery as useQuery3 } from "@tanstack/react-query";
|
|
29
35
|
|
|
30
|
-
// src/api/baseAxios.ts
|
|
31
|
-
import axios from "axios";
|
|
32
|
-
var baseAxios = axios.create({
|
|
33
|
-
baseURL: process.env.NEXT_PUBLIC_API
|
|
34
|
-
// server
|
|
35
|
-
// baseURL: process.env.NEXT_PUBLIC_API_LOCAL, // local debug
|
|
36
|
-
});
|
|
37
|
-
baseAxios.interceptors.request.use(
|
|
38
|
-
(config2) => {
|
|
39
|
-
var _a, _b;
|
|
40
|
-
const tokenData = localStorage.getItem("useS_authenticate");
|
|
41
|
-
const state = JSON.parse(tokenData);
|
|
42
|
-
const token = (_b = (_a = state == null ? void 0 : state.state) == null ? void 0 : _a.state) == null ? void 0 : _b.token;
|
|
43
|
-
if (token) {
|
|
44
|
-
config2.headers.Authorization = `Bearer ${token}`;
|
|
45
|
-
}
|
|
46
|
-
return config2;
|
|
47
|
-
},
|
|
48
|
-
(error) => {
|
|
49
|
-
return Promise.reject(error);
|
|
50
|
-
}
|
|
51
|
-
);
|
|
52
|
-
var baseAxios_default = baseAxios;
|
|
53
|
-
|
|
54
36
|
// src/components/Buttons/ButtonViewPDF/MyButtonViewPDF.tsx
|
|
55
37
|
import {
|
|
56
38
|
ActionIcon,
|
|
@@ -1135,26 +1117,13 @@ import { IconSearch } from "@tabler/icons-react";
|
|
|
1135
1117
|
import { usePathname, useRouter } from "next/navigation";
|
|
1136
1118
|
import { useMemo as useMemo2, useState as useState5 } from "react";
|
|
1137
1119
|
|
|
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
|
-
|
|
1151
1120
|
// src/components/Layouts/BasicAppShell/useS_BasicAppShell.ts
|
|
1152
1121
|
import { useEffect as useEffect3 } from "react";
|
|
1153
1122
|
var useStore = createGenericStore({
|
|
1154
1123
|
initialState: {
|
|
1155
1124
|
menuCode: "",
|
|
1156
|
-
moduleCode: "",
|
|
1157
|
-
moduleName: "",
|
|
1125
|
+
moduleCode: "Module code",
|
|
1126
|
+
moduleName: "Module name",
|
|
1158
1127
|
title: "",
|
|
1159
1128
|
opened: true,
|
|
1160
1129
|
groupMenuOpenId: []
|
|
@@ -7589,12 +7558,12 @@ function MyDataTableSelect(_a) {
|
|
|
7589
7558
|
|
|
7590
7559
|
// src/components/RESTAPIComponents/SelectAPIGet/MySelectAPIGet.tsx
|
|
7591
7560
|
import { Select as Select5 } from "@mantine/core";
|
|
7592
|
-
import { useQuery as
|
|
7561
|
+
import { useQuery as useQuery4 } from "@tanstack/react-query";
|
|
7593
7562
|
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
7594
7563
|
function MySelectAPIGet(_a) {
|
|
7595
7564
|
var _b = _a, { apiGet, label = "", dataMapper } = _b, rest = __objRest(_b, ["apiGet", "label", "dataMapper"]);
|
|
7596
7565
|
var _a2;
|
|
7597
|
-
const query =
|
|
7566
|
+
const query = useQuery4({
|
|
7598
7567
|
queryKey: [apiGet],
|
|
7599
7568
|
queryFn: async () => {
|
|
7600
7569
|
return (await baseAxios_default.get(apiGet)).data;
|
|
@@ -7765,7 +7734,7 @@ function F_core12196({
|
|
|
7765
7734
|
}
|
|
7766
7735
|
|
|
7767
7736
|
// src/modules-features/admin/core/core16209/F_core16209.tsx
|
|
7768
|
-
import { useQuery as
|
|
7737
|
+
import { useQuery as useQuery5 } from "@tanstack/react-query";
|
|
7769
7738
|
import { useMemo as useMemo4 } from "react";
|
|
7770
7739
|
|
|
7771
7740
|
// src/modules-features/admin/core/core16209/F_core16209_Create.tsx
|
|
@@ -7953,7 +7922,7 @@ function F_core16209_Update({ values }) {
|
|
|
7953
7922
|
// src/modules-features/admin/core/core16209/F_core16209.tsx
|
|
7954
7923
|
import { jsx as jsx66, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
7955
7924
|
function F_core16209({ RefinementTypeId }) {
|
|
7956
|
-
const query =
|
|
7925
|
+
const query = useQuery5({
|
|
7957
7926
|
queryKey: ["F_core16209_Read"],
|
|
7958
7927
|
queryFn: async () => {
|
|
7959
7928
|
var _a;
|
|
@@ -8018,7 +7987,7 @@ function F_core16209({ RefinementTypeId }) {
|
|
|
8018
7987
|
import { Tabs as Tabs2 } from "@mantine/core";
|
|
8019
7988
|
|
|
8020
7989
|
// src/modules-features/admin/core/core18256/F_core18256_Read.tsx
|
|
8021
|
-
import { useQuery as
|
|
7990
|
+
import { useQuery as useQuery6 } from "@tanstack/react-query";
|
|
8022
7991
|
import { useMemo as useMemo5 } from "react";
|
|
8023
7992
|
|
|
8024
7993
|
// src/modules-features/admin/core/core18256/F_core18256_Create.tsx
|
|
@@ -8069,7 +8038,7 @@ function F_core18256_Update({ values }) {
|
|
|
8069
8038
|
// src/modules-features/admin/core/core18256/F_core18256_Read.tsx
|
|
8070
8039
|
import { jsx as jsx70, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
8071
8040
|
function F_core18256_Read({ documentType }) {
|
|
8072
|
-
const documentAttributeQuery =
|
|
8041
|
+
const documentAttributeQuery = useQuery6({
|
|
8073
8042
|
queryKey: ["F_core18256_Read", documentType],
|
|
8074
8043
|
queryFn: async () => {
|
|
8075
8044
|
var _a;
|
|
@@ -8201,7 +8170,7 @@ function F_core26965_Create({
|
|
|
8201
8170
|
|
|
8202
8171
|
// src/modules-features/admin/core/core26965/F_core26965_Read.tsx
|
|
8203
8172
|
import { Accordion as Accordion2, Blockquote as Blockquote2 } from "@mantine/core";
|
|
8204
|
-
import { useQuery as
|
|
8173
|
+
import { useQuery as useQuery7 } from "@tanstack/react-query";
|
|
8205
8174
|
import { useMemo as useMemo6 } from "react";
|
|
8206
8175
|
|
|
8207
8176
|
// src/modules-features/admin/core/core26965/F_core26965_Delete.tsx
|
|
@@ -8306,7 +8275,7 @@ function F_core26965_Read({
|
|
|
8306
8275
|
RegulationsTypeId
|
|
8307
8276
|
}) {
|
|
8308
8277
|
var _a, _b, _c;
|
|
8309
|
-
const documentAttributeQuery =
|
|
8278
|
+
const documentAttributeQuery = useQuery7({
|
|
8310
8279
|
queryKey: ["F_core26965_Read", RegulationsTypeId],
|
|
8311
8280
|
queryFn: async () => {
|
|
8312
8281
|
var _a2;
|
|
@@ -8348,7 +8317,7 @@ function SubRead2({
|
|
|
8348
8317
|
documentType,
|
|
8349
8318
|
RegulationsTypeId
|
|
8350
8319
|
}) {
|
|
8351
|
-
const documentQuery =
|
|
8320
|
+
const documentQuery = useQuery7({
|
|
8352
8321
|
queryKey: ["SubRead" + documentType],
|
|
8353
8322
|
queryFn: async () => {
|
|
8354
8323
|
const result = await baseAxios_default.get(
|
|
@@ -8498,7 +8467,7 @@ function F_core27311_Create({
|
|
|
8498
8467
|
|
|
8499
8468
|
// src/modules-features/admin/core/core27311/F_core27311_Read.tsx
|
|
8500
8469
|
import { Accordion as Accordion3, Blockquote as Blockquote3 } from "@mantine/core";
|
|
8501
|
-
import { useQuery as
|
|
8470
|
+
import { useQuery as useQuery8 } from "@tanstack/react-query";
|
|
8502
8471
|
import { useMemo as useMemo7 } from "react";
|
|
8503
8472
|
|
|
8504
8473
|
// src/modules-features/admin/core/core27311/F_core27311_Delete.tsx
|
|
@@ -8603,7 +8572,7 @@ function F_core27311_Read({
|
|
|
8603
8572
|
WorkflowTypeId
|
|
8604
8573
|
}) {
|
|
8605
8574
|
var _a, _b, _c;
|
|
8606
|
-
const documentAttributeQuery =
|
|
8575
|
+
const documentAttributeQuery = useQuery8({
|
|
8607
8576
|
queryKey: ["F_core27311_Read", WorkflowTypeId],
|
|
8608
8577
|
queryFn: async () => {
|
|
8609
8578
|
var _a2;
|
|
@@ -8645,7 +8614,7 @@ function SubRead3({
|
|
|
8645
8614
|
documentType,
|
|
8646
8615
|
WorkflowTypeId
|
|
8647
8616
|
}) {
|
|
8648
|
-
const documentQuery =
|
|
8617
|
+
const documentQuery = useQuery8({
|
|
8649
8618
|
queryKey: ["SubRead" + documentType],
|
|
8650
8619
|
queryFn: async () => {
|
|
8651
8620
|
const result = await baseAxios_default.get(
|
|
@@ -8745,7 +8714,7 @@ import { Grid as Grid2, Paper as Paper10, ScrollArea as ScrollArea6 } from "@man
|
|
|
8745
8714
|
|
|
8746
8715
|
// src/modules-features/admin/core/core38677/F_core38677_ReadUser.tsx
|
|
8747
8716
|
import { Container as Container4 } from "@mantine/core";
|
|
8748
|
-
import { useQuery as
|
|
8717
|
+
import { useQuery as useQuery9 } from "@tanstack/react-query";
|
|
8749
8718
|
import { useEffect as useEffect8, useMemo as useMemo8, useState as useState9 } from "react";
|
|
8750
8719
|
|
|
8751
8720
|
// src/modules-features/admin/core/core83092/useS_core83092.tsx
|
|
@@ -8851,7 +8820,7 @@ function F_core38677_ReadUser() {
|
|
|
8851
8820
|
) });
|
|
8852
8821
|
}
|
|
8853
8822
|
function useQ_Account_GetAdminAccount() {
|
|
8854
|
-
const query =
|
|
8823
|
+
const query = useQuery9({
|
|
8855
8824
|
queryKey: ["useQ_Role_GetAdminRole"],
|
|
8856
8825
|
queryFn: async () => {
|
|
8857
8826
|
var _a;
|
|
@@ -8932,7 +8901,7 @@ var menuData = [
|
|
|
8932
8901
|
// src/modules-features/admin/core/core38677/F_core38677_ViewMenuPermissions.tsx
|
|
8933
8902
|
import { Checkbox as Checkbox3, Flex as Flex5, ScrollArea as ScrollArea5, Table as Table3, Text as Text13 } from "@mantine/core";
|
|
8934
8903
|
import { IconEdit as IconEdit5, IconEyeUp, IconFileExport as IconFileExport2, IconPlus as IconPlus5, IconPrinter as IconPrinter3, IconTrash as IconTrash5 } from "@tabler/icons-react";
|
|
8935
|
-
import { useQuery as
|
|
8904
|
+
import { useQuery as useQuery10 } from "@tanstack/react-query";
|
|
8936
8905
|
import React2, { useEffect as useEffect10, useState as useState11 } from "react";
|
|
8937
8906
|
import { jsx as jsx85, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
8938
8907
|
var title = "Danh s\xE1ch ch\u1EE9c n\u0103ng";
|
|
@@ -9119,7 +9088,7 @@ function F_core38677_ViewMenuPermissions({ menuData: menuData2 }) {
|
|
|
9119
9088
|
}
|
|
9120
9089
|
function useGetUserPermission() {
|
|
9121
9090
|
const store = useS_core83092();
|
|
9122
|
-
const query =
|
|
9091
|
+
const query = useQuery10({
|
|
9123
9092
|
queryKey: ["F_7p4mh9d75x_AuthorizationTable", store.state.roleId],
|
|
9124
9093
|
queryFn: async () => {
|
|
9125
9094
|
const result = await baseAxios_default.get("/Role/GetRolePermission?roleId=" + store.state.roleId);
|
|
@@ -9167,7 +9136,7 @@ function F_core38677({ menuData: menuData2 }) {
|
|
|
9167
9136
|
}
|
|
9168
9137
|
|
|
9169
9138
|
// src/modules-features/admin/core/core40207/F_core40207_Read.tsx
|
|
9170
|
-
import { useQuery as
|
|
9139
|
+
import { useQuery as useQuery11 } from "@tanstack/react-query";
|
|
9171
9140
|
import { useMemo as useMemo9 } from "react";
|
|
9172
9141
|
|
|
9173
9142
|
// src/modules-features/admin/core/core40207/F_core40207_Create.tsx
|
|
@@ -9298,7 +9267,7 @@ function F_core40207_Update({ values }) {
|
|
|
9298
9267
|
// src/modules-features/admin/core/core40207/F_core40207_Read.tsx
|
|
9299
9268
|
import { jsx as jsx90, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
9300
9269
|
function F_core40207_Read({ GuidelineTypeId }) {
|
|
9301
|
-
const query =
|
|
9270
|
+
const query = useQuery11({
|
|
9302
9271
|
queryKey: ["F_core40207_Read"],
|
|
9303
9272
|
queryFn: async () => {
|
|
9304
9273
|
var _a;
|
|
@@ -9359,7 +9328,7 @@ function F_core40207({ GuidelineTypeId }) {
|
|
|
9359
9328
|
|
|
9360
9329
|
// src/modules-features/admin/core/core47643/F_core47643_Read.tsx
|
|
9361
9330
|
import { Group as Group15 } from "@mantine/core";
|
|
9362
|
-
import { useQuery as
|
|
9331
|
+
import { useQuery as useQuery12 } from "@tanstack/react-query";
|
|
9363
9332
|
import { useMemo as useMemo10 } from "react";
|
|
9364
9333
|
|
|
9365
9334
|
// src/modules-features/admin/core/core47643/F_core47643_Delete.tsx
|
|
@@ -9427,7 +9396,7 @@ function F_core47643_Read() {
|
|
|
9427
9396
|
);
|
|
9428
9397
|
}
|
|
9429
9398
|
function useQ_core47643_GetAdminRole() {
|
|
9430
|
-
const query =
|
|
9399
|
+
const query = useQuery12({
|
|
9431
9400
|
queryKey: ["useQ_core47643_GetAdminRole"],
|
|
9432
9401
|
queryFn: async () => {
|
|
9433
9402
|
const res = await baseAxios_default.get("/Role/GetAdminRole");
|
|
@@ -9610,7 +9579,7 @@ var ENUM_EMAILCONFIG_MODULE = /* @__PURE__ */ ((ENUM_EMAILCONFIG_MODULE2) => {
|
|
|
9610
9579
|
})(ENUM_EMAILCONFIG_MODULE || {});
|
|
9611
9580
|
|
|
9612
9581
|
// src/modules-features/admin/core/core64229/F_core64229_Read.tsx
|
|
9613
|
-
import { useQuery as
|
|
9582
|
+
import { useQuery as useQuery13 } from "@tanstack/react-query";
|
|
9614
9583
|
import { useMemo as useMemo11 } from "react";
|
|
9615
9584
|
|
|
9616
9585
|
// src/modules-features/admin/core/core64229/F_core64229_Form.tsx
|
|
@@ -9733,7 +9702,7 @@ function F_core64229_Delete({ values }) {
|
|
|
9733
9702
|
// src/modules-features/admin/core/core64229/F_core64229_Read.tsx
|
|
9734
9703
|
import { jsx as jsx101, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
9735
9704
|
function F_core64229_Read() {
|
|
9736
|
-
const query =
|
|
9705
|
+
const query = useQuery13({
|
|
9737
9706
|
queryKey: ["F_core64229_Read"],
|
|
9738
9707
|
queryFn: async () => {
|
|
9739
9708
|
const res = await baseAxios_default.get("/EmailConfig/GetAll");
|
|
@@ -9799,14 +9768,14 @@ function F_core64229() {
|
|
|
9799
9768
|
// src/modules-features/admin/core/core71678/F_core71678_Read.tsx
|
|
9800
9769
|
import { Button as Button17, Group as Group17 } from "@mantine/core";
|
|
9801
9770
|
import { IconShield } from "@tabler/icons-react";
|
|
9802
|
-
import { useQuery as
|
|
9771
|
+
import { useQuery as useQuery15 } from "@tanstack/react-query";
|
|
9803
9772
|
import { useRouter as useRouter3 } from "next/navigation";
|
|
9804
9773
|
import { useMemo as useMemo13, useState as useState13 } from "react";
|
|
9805
9774
|
|
|
9806
9775
|
// src/modules-features/admin/core/core71678/F_core71678_ChangePermission.tsx
|
|
9807
9776
|
import { Button as Button16, Fieldset as Fieldset6, Group as Group16, Table as Table4 } from "@mantine/core";
|
|
9808
9777
|
import { useDisclosure as useDisclosure12 } from "@mantine/hooks";
|
|
9809
|
-
import { useMutation as useMutation7, useQuery as
|
|
9778
|
+
import { useMutation as useMutation7, useQuery as useQuery14, useQueryClient as useQueryClient5 } from "@tanstack/react-query";
|
|
9810
9779
|
import { useEffect as useEffect13, useMemo as useMemo12, useState as useState12 } from "react";
|
|
9811
9780
|
import { jsx as jsx103, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
9812
9781
|
function F_core71678_ChangePermission({ user }) {
|
|
@@ -9814,7 +9783,7 @@ function F_core71678_ChangePermission({ user }) {
|
|
|
9814
9783
|
const queryClient = useQueryClient5();
|
|
9815
9784
|
const [rowSelection, setRowSelection] = useState12({});
|
|
9816
9785
|
const rowSelect = useState12();
|
|
9817
|
-
const query =
|
|
9786
|
+
const query = useQuery14({
|
|
9818
9787
|
queryKey: [`F1_1ChangePermission`],
|
|
9819
9788
|
queryFn: async () => {
|
|
9820
9789
|
const response = await baseAxios_default.get("/Role/GetAdminRole");
|
|
@@ -9999,7 +9968,7 @@ var ENDPOINT4 = "/Account/GetAdminAccount";
|
|
|
9999
9968
|
function F_core71678_Read() {
|
|
10000
9969
|
const router = useRouter3();
|
|
10001
9970
|
const [rowSelection, setRowSelection] = useState13({});
|
|
10002
|
-
const AllUserQuery =
|
|
9971
|
+
const AllUserQuery = useQuery15({
|
|
10003
9972
|
queryKey: ["F_core71678_Read"],
|
|
10004
9973
|
queryFn: async () => {
|
|
10005
9974
|
var _a;
|
|
@@ -10070,7 +10039,7 @@ function F_core71678() {
|
|
|
10070
10039
|
}
|
|
10071
10040
|
|
|
10072
10041
|
// src/modules-features/admin/core/core76318/F_core76318_Read.tsx
|
|
10073
|
-
import { useQuery as
|
|
10042
|
+
import { useQuery as useQuery16 } from "@tanstack/react-query";
|
|
10074
10043
|
import { useMemo as useMemo14 } from "react";
|
|
10075
10044
|
|
|
10076
10045
|
// src/modules-features/admin/core/core76318/F_core76318_Create.tsx
|
|
@@ -10217,7 +10186,7 @@ function F_core76318_Update({ values }) {
|
|
|
10217
10186
|
// src/modules-features/admin/core/core76318/F_core76318_Read.tsx
|
|
10218
10187
|
import { jsx as jsx112, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
10219
10188
|
function F_core76318_Read({ SecurityTypeId }) {
|
|
10220
|
-
const query =
|
|
10189
|
+
const query = useQuery16({
|
|
10221
10190
|
queryKey: ["F_core76318_Read"],
|
|
10222
10191
|
queryFn: async () => {
|
|
10223
10192
|
var _a;
|
|
@@ -10286,7 +10255,7 @@ import { Grid as Grid4, Paper as Paper12, ScrollArea as ScrollArea8 } from "@man
|
|
|
10286
10255
|
|
|
10287
10256
|
// src/modules-features/admin/core/core83092/F_core83092_ReadUser.tsx
|
|
10288
10257
|
import { Container as Container5 } from "@mantine/core";
|
|
10289
|
-
import { useQuery as
|
|
10258
|
+
import { useQuery as useQuery17 } from "@tanstack/react-query";
|
|
10290
10259
|
import { useEffect as useEffect15, useMemo as useMemo15, useState as useState14 } from "react";
|
|
10291
10260
|
import { jsx as jsx114 } from "react/jsx-runtime";
|
|
10292
10261
|
function F_core83092_ReadUser() {
|
|
@@ -10342,7 +10311,7 @@ function F_core83092_ReadUser() {
|
|
|
10342
10311
|
) });
|
|
10343
10312
|
}
|
|
10344
10313
|
function useQ_core83092_Account_GetAdminAccount() {
|
|
10345
|
-
const query =
|
|
10314
|
+
const query = useQuery17({
|
|
10346
10315
|
queryKey: ["useQ_core83092_Account_GetAdminAccount"],
|
|
10347
10316
|
queryFn: async () => {
|
|
10348
10317
|
var _a;
|
|
@@ -10392,7 +10361,7 @@ function F_core83092_Save() {
|
|
|
10392
10361
|
// src/modules-features/admin/core/core83092/F_core83092_ViewMenuPermissions.tsx
|
|
10393
10362
|
import { Checkbox as Checkbox4, Flex as Flex6, ScrollArea as ScrollArea7, Table as Table5, Text as Text14 } from "@mantine/core";
|
|
10394
10363
|
import { IconEdit as IconEdit6, IconEyeUp as IconEyeUp2, IconFileExport as IconFileExport3, IconPlus as IconPlus6, IconPrinter as IconPrinter4, IconTrash as IconTrash6 } from "@tabler/icons-react";
|
|
10395
|
-
import { useQuery as
|
|
10364
|
+
import { useQuery as useQuery18 } from "@tanstack/react-query";
|
|
10396
10365
|
import React4, { useEffect as useEffect17, useState as useState16 } from "react";
|
|
10397
10366
|
import { jsx as jsx116, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
10398
10367
|
var title2 = "Danh s\xE1ch ch\u1EE9c n\u0103ng";
|
|
@@ -10579,7 +10548,7 @@ function F_core83092_ViewMenuPermissions({ menuData: menuData2 }) {
|
|
|
10579
10548
|
}
|
|
10580
10549
|
function useGetUserPermission2({ menuData: menuData2 }) {
|
|
10581
10550
|
const store = useS_core83092();
|
|
10582
|
-
const query =
|
|
10551
|
+
const query = useQuery18({
|
|
10583
10552
|
queryKey: ["F_7p4mh9d75x_AuthorizationTable", store.state.roleId],
|
|
10584
10553
|
queryFn: async () => {
|
|
10585
10554
|
const result = await baseAxios_default.get("/Role/GetUserPermission?userId=" + store.state.roleId);
|
|
@@ -11264,7 +11233,7 @@ import {
|
|
|
11264
11233
|
} from "@mantine/core";
|
|
11265
11234
|
import { useForm as useForm20 } from "@mantine/form";
|
|
11266
11235
|
import { useMutation as useMutation9 } from "@tanstack/react-query";
|
|
11267
|
-
import
|
|
11236
|
+
import axios from "axios";
|
|
11268
11237
|
import Link5 from "next/link";
|
|
11269
11238
|
import { useRouter as useRouter6 } from "next/navigation";
|
|
11270
11239
|
import { useState as useState17 } from "react";
|
|
@@ -11379,7 +11348,7 @@ function useM_Account_Sigin() {
|
|
|
11379
11348
|
const ENDPOINT5 = process.env.NEXT_PUBLIC_API + "/Account/SignIn";
|
|
11380
11349
|
const mutation = useMutation9({
|
|
11381
11350
|
mutationFn: async (values) => {
|
|
11382
|
-
const result = await
|
|
11351
|
+
const result = await axios.post(ENDPOINT5, values);
|
|
11383
11352
|
return result.data;
|
|
11384
11353
|
}
|
|
11385
11354
|
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// src/api/baseAxios.ts
|
|
2
|
+
import axios from "axios";
|
|
3
|
+
var baseAxios = axios.create({
|
|
4
|
+
baseURL: process.env.NEXT_PUBLIC_API
|
|
5
|
+
// server
|
|
6
|
+
// baseURL: process.env.NEXT_PUBLIC_API_LOCAL, // local debug
|
|
7
|
+
});
|
|
8
|
+
baseAxios.interceptors.request.use(
|
|
9
|
+
(config) => {
|
|
10
|
+
var _a, _b;
|
|
11
|
+
const tokenData = localStorage.getItem("useS_authenticate");
|
|
12
|
+
const state = JSON.parse(tokenData);
|
|
13
|
+
const token = (_b = (_a = state == null ? void 0 : state.state) == null ? void 0 : _a.state) == null ? void 0 : _b.token;
|
|
14
|
+
if (token) {
|
|
15
|
+
config.headers.Authorization = `Bearer ${token}`;
|
|
16
|
+
}
|
|
17
|
+
return config;
|
|
18
|
+
},
|
|
19
|
+
(error) => {
|
|
20
|
+
return Promise.reject(error);
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
var baseAxios_default = baseAxios;
|
|
24
|
+
|
|
25
|
+
// src/hooks/query/AQ/useQ_AQ_GetAQModule.ts
|
|
26
|
+
import { useQuery } from "@tanstack/react-query";
|
|
27
|
+
function useQ_AQ_GetAQModule() {
|
|
28
|
+
const query = useQuery({
|
|
29
|
+
queryKey: ["/AQ/GetAQModule"],
|
|
30
|
+
queryFn: async () => {
|
|
31
|
+
const res = await baseAxios_default.get("/AQ/GetAQModule");
|
|
32
|
+
return res.data.data;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
return query;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export {
|
|
39
|
+
baseAxios_default,
|
|
40
|
+
useQ_AQ_GetAQModule
|
|
41
|
+
};
|
|
@@ -64,9 +64,11 @@ import {
|
|
|
64
64
|
useS_BasicAppShell,
|
|
65
65
|
useS_ButtonImport,
|
|
66
66
|
utils_layout_getItemsWithoutLinks
|
|
67
|
-
} from "../chunk-
|
|
68
|
-
import "../chunk-
|
|
67
|
+
} from "../chunk-ETYO7RDW.mjs";
|
|
68
|
+
import "../chunk-QAWKASVG.mjs";
|
|
69
69
|
import "../chunk-Y3YGC5IH.mjs";
|
|
70
|
+
import "../chunk-CJDXLINF.mjs";
|
|
71
|
+
import "../chunk-7ZCOFATU.mjs";
|
|
70
72
|
import "../chunk-FWCSY2DS.mjs";
|
|
71
73
|
export {
|
|
72
74
|
AQButtonCreateByImportFile,
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useQ_AQ_GetAQModule
|
|
3
|
+
} from "../chunk-QAWKASVG.mjs";
|
|
4
|
+
import "../chunk-7ZCOFATU.mjs";
|
|
5
|
+
import "../chunk-FWCSY2DS.mjs";
|
|
6
|
+
|
|
7
|
+
// src/hooks/custom-hooks/useC_MutationAction.tsx
|
|
8
|
+
import { useQueryClient } from "@tanstack/react-query";
|
|
9
|
+
export {
|
|
10
|
+
useQ_AQ_GetAQModule
|
|
11
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { SelectProps } from '@mantine/core';
|
|
3
3
|
import { I as I_BasicAppShell_LinkItem } from '../BasicAppShell-CGIz9MsN.mjs';
|
|
4
|
+
import { a as IBaseEntity, I as IAQModule } from '../IAQModule-XZYlbivW.mjs';
|
|
4
5
|
import { ReactNode } from 'react';
|
|
5
6
|
|
|
6
7
|
declare function F_core12196({ FormTypeId }: {
|
|
@@ -249,16 +250,6 @@ declare function F_core38677({ menuData }: {
|
|
|
249
250
|
menuData: I_BasicAppShell_LinkItem[];
|
|
250
251
|
}): react_jsx_runtime.JSX.Element;
|
|
251
252
|
|
|
252
|
-
interface IBaseEntity {
|
|
253
|
-
id?: number;
|
|
254
|
-
code?: string;
|
|
255
|
-
name?: string;
|
|
256
|
-
concurrencyStamp?: string;
|
|
257
|
-
isEnabled?: boolean;
|
|
258
|
-
modifiedWhen?: Date;
|
|
259
|
-
modifiedBy?: number;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
253
|
interface I_core38677_User extends IBaseEntity {
|
|
263
254
|
}
|
|
264
255
|
declare function F_core38677_ReadUser(): react_jsx_runtime.JSX.Element | "Loading..." | "Có lỗi xảy ra!";
|
|
@@ -343,26 +334,6 @@ declare function F_core60524({ AQModuleId }: {
|
|
|
343
334
|
AQModuleId: number;
|
|
344
335
|
}): react_jsx_runtime.JSX.Element;
|
|
345
336
|
|
|
346
|
-
interface IAQModule extends IBaseEntity {
|
|
347
|
-
officelName?: string;
|
|
348
|
-
phoneNumber?: string;
|
|
349
|
-
email?: string;
|
|
350
|
-
faviconPath?: string;
|
|
351
|
-
logoPath?: string;
|
|
352
|
-
registrationDate?: Date;
|
|
353
|
-
limiteDate?: Date;
|
|
354
|
-
faviconFileDetail?: {
|
|
355
|
-
fileName?: string;
|
|
356
|
-
fileExtension?: string;
|
|
357
|
-
fileBase64String?: string;
|
|
358
|
-
};
|
|
359
|
-
logoFileDetail?: {
|
|
360
|
-
fileName?: string;
|
|
361
|
-
fileExtension?: string;
|
|
362
|
-
fileBase64String?: string;
|
|
363
|
-
};
|
|
364
|
-
}
|
|
365
|
-
|
|
366
337
|
interface I_core60524_AQModule extends IAQModule {
|
|
367
338
|
faviconFile?: File;
|
|
368
339
|
logoFile?: File;
|
|
@@ -65,9 +65,11 @@ import {
|
|
|
65
65
|
useS_core60524,
|
|
66
66
|
useS_core83092,
|
|
67
67
|
utils_core83092_mergePage
|
|
68
|
-
} from "../chunk-
|
|
69
|
-
import "../chunk-
|
|
68
|
+
} from "../chunk-ETYO7RDW.mjs";
|
|
69
|
+
import "../chunk-QAWKASVG.mjs";
|
|
70
70
|
import "../chunk-Y3YGC5IH.mjs";
|
|
71
|
+
import "../chunk-CJDXLINF.mjs";
|
|
72
|
+
import "../chunk-7ZCOFATU.mjs";
|
|
71
73
|
import "../chunk-FWCSY2DS.mjs";
|
|
72
74
|
export {
|
|
73
75
|
F_authenticate_Login,
|
package/dist/utils/index.mjs
CHANGED
|
@@ -11,11 +11,13 @@ import {
|
|
|
11
11
|
utils_excel_exportExcel,
|
|
12
12
|
utils_file_docxtemplaterDownload,
|
|
13
13
|
utils_file_fileToAQDocumentType,
|
|
14
|
-
utils_notification_show,
|
|
15
14
|
utils_pdf_download,
|
|
16
15
|
utils_time_convertTimeStringToSeconds,
|
|
17
16
|
utils_time_getCurrentTimeString
|
|
18
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-CJDXLINF.mjs";
|
|
18
|
+
import {
|
|
19
|
+
utils_notification_show
|
|
20
|
+
} from "../chunk-7ZCOFATU.mjs";
|
|
19
21
|
import "../chunk-FWCSY2DS.mjs";
|
|
20
22
|
export {
|
|
21
23
|
U0DateToDDMMYYYString,
|
package/package.json
CHANGED
|
@@ -16,9 +16,13 @@
|
|
|
16
16
|
"./modules-features": {
|
|
17
17
|
"import": "./dist/modules-features/index.mjs",
|
|
18
18
|
"types": "./dist/modules-features/index.d.mts"
|
|
19
|
+
},
|
|
20
|
+
"./hooks": {
|
|
21
|
+
"import": "./dist/hooks/index.mjs",
|
|
22
|
+
"types": "./dist/hooks/index.d.mts"
|
|
19
23
|
}
|
|
20
24
|
},
|
|
21
|
-
"version": "0.1.
|
|
25
|
+
"version": "0.1.100",
|
|
22
26
|
"private": false,
|
|
23
27
|
"files": [
|
|
24
28
|
"dist"
|