aq-fe-framework 0.1.98 → 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.
@@ -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,3 +1,7 @@
1
+ import {
2
+ baseAxios_default,
3
+ useQ_AQ_GetAQModule
4
+ } from "./chunk-QAWKASVG.mjs";
1
5
  import {
2
6
  createGenericStore
3
7
  } from "./chunk-Y3YGC5IH.mjs";
@@ -6,9 +10,11 @@ import {
6
10
  U0MyValidateEmail,
7
11
  utils_converter_enumToSelectOptions,
8
12
  utils_file_fileToAQDocumentType,
9
- utils_notification_show,
10
13
  utils_pdf_download
11
- } from "./chunk-EEQENBXZ.mjs";
14
+ } from "./chunk-CJDXLINF.mjs";
15
+ import {
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,25 +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
- moduleName: "",
1125
+ moduleCode: "Module code",
1126
+ moduleName: "Module name",
1157
1127
  title: "",
1158
1128
  opened: true,
1159
1129
  groupMenuOpenId: []
@@ -7588,12 +7558,12 @@ function MyDataTableSelect(_a) {
7588
7558
 
7589
7559
  // src/components/RESTAPIComponents/SelectAPIGet/MySelectAPIGet.tsx
7590
7560
  import { Select as Select5 } from "@mantine/core";
7591
- import { useQuery as useQuery5 } from "@tanstack/react-query";
7561
+ import { useQuery as useQuery4 } from "@tanstack/react-query";
7592
7562
  import { jsx as jsx58 } from "react/jsx-runtime";
7593
7563
  function MySelectAPIGet(_a) {
7594
7564
  var _b = _a, { apiGet, label = "", dataMapper } = _b, rest = __objRest(_b, ["apiGet", "label", "dataMapper"]);
7595
7565
  var _a2;
7596
- const query = useQuery5({
7566
+ const query = useQuery4({
7597
7567
  queryKey: [apiGet],
7598
7568
  queryFn: async () => {
7599
7569
  return (await baseAxios_default.get(apiGet)).data;
@@ -7764,7 +7734,7 @@ function F_core12196({
7764
7734
  }
7765
7735
 
7766
7736
  // src/modules-features/admin/core/core16209/F_core16209.tsx
7767
- import { useQuery as useQuery6 } from "@tanstack/react-query";
7737
+ import { useQuery as useQuery5 } from "@tanstack/react-query";
7768
7738
  import { useMemo as useMemo4 } from "react";
7769
7739
 
7770
7740
  // src/modules-features/admin/core/core16209/F_core16209_Create.tsx
@@ -7952,7 +7922,7 @@ function F_core16209_Update({ values }) {
7952
7922
  // src/modules-features/admin/core/core16209/F_core16209.tsx
7953
7923
  import { jsx as jsx66, jsxs as jsxs37 } from "react/jsx-runtime";
7954
7924
  function F_core16209({ RefinementTypeId }) {
7955
- const query = useQuery6({
7925
+ const query = useQuery5({
7956
7926
  queryKey: ["F_core16209_Read"],
7957
7927
  queryFn: async () => {
7958
7928
  var _a;
@@ -8017,7 +7987,7 @@ function F_core16209({ RefinementTypeId }) {
8017
7987
  import { Tabs as Tabs2 } from "@mantine/core";
8018
7988
 
8019
7989
  // src/modules-features/admin/core/core18256/F_core18256_Read.tsx
8020
- import { useQuery as useQuery7 } from "@tanstack/react-query";
7990
+ import { useQuery as useQuery6 } from "@tanstack/react-query";
8021
7991
  import { useMemo as useMemo5 } from "react";
8022
7992
 
8023
7993
  // src/modules-features/admin/core/core18256/F_core18256_Create.tsx
@@ -8068,7 +8038,7 @@ function F_core18256_Update({ values }) {
8068
8038
  // src/modules-features/admin/core/core18256/F_core18256_Read.tsx
8069
8039
  import { jsx as jsx70, jsxs as jsxs40 } from "react/jsx-runtime";
8070
8040
  function F_core18256_Read({ documentType }) {
8071
- const documentAttributeQuery = useQuery7({
8041
+ const documentAttributeQuery = useQuery6({
8072
8042
  queryKey: ["F_core18256_Read", documentType],
8073
8043
  queryFn: async () => {
8074
8044
  var _a;
@@ -8200,7 +8170,7 @@ function F_core26965_Create({
8200
8170
 
8201
8171
  // src/modules-features/admin/core/core26965/F_core26965_Read.tsx
8202
8172
  import { Accordion as Accordion2, Blockquote as Blockquote2 } from "@mantine/core";
8203
- import { useQuery as useQuery8 } from "@tanstack/react-query";
8173
+ import { useQuery as useQuery7 } from "@tanstack/react-query";
8204
8174
  import { useMemo as useMemo6 } from "react";
8205
8175
 
8206
8176
  // src/modules-features/admin/core/core26965/F_core26965_Delete.tsx
@@ -8305,7 +8275,7 @@ function F_core26965_Read({
8305
8275
  RegulationsTypeId
8306
8276
  }) {
8307
8277
  var _a, _b, _c;
8308
- const documentAttributeQuery = useQuery8({
8278
+ const documentAttributeQuery = useQuery7({
8309
8279
  queryKey: ["F_core26965_Read", RegulationsTypeId],
8310
8280
  queryFn: async () => {
8311
8281
  var _a2;
@@ -8347,7 +8317,7 @@ function SubRead2({
8347
8317
  documentType,
8348
8318
  RegulationsTypeId
8349
8319
  }) {
8350
- const documentQuery = useQuery8({
8320
+ const documentQuery = useQuery7({
8351
8321
  queryKey: ["SubRead" + documentType],
8352
8322
  queryFn: async () => {
8353
8323
  const result = await baseAxios_default.get(
@@ -8497,7 +8467,7 @@ function F_core27311_Create({
8497
8467
 
8498
8468
  // src/modules-features/admin/core/core27311/F_core27311_Read.tsx
8499
8469
  import { Accordion as Accordion3, Blockquote as Blockquote3 } from "@mantine/core";
8500
- import { useQuery as useQuery9 } from "@tanstack/react-query";
8470
+ import { useQuery as useQuery8 } from "@tanstack/react-query";
8501
8471
  import { useMemo as useMemo7 } from "react";
8502
8472
 
8503
8473
  // src/modules-features/admin/core/core27311/F_core27311_Delete.tsx
@@ -8602,7 +8572,7 @@ function F_core27311_Read({
8602
8572
  WorkflowTypeId
8603
8573
  }) {
8604
8574
  var _a, _b, _c;
8605
- const documentAttributeQuery = useQuery9({
8575
+ const documentAttributeQuery = useQuery8({
8606
8576
  queryKey: ["F_core27311_Read", WorkflowTypeId],
8607
8577
  queryFn: async () => {
8608
8578
  var _a2;
@@ -8644,7 +8614,7 @@ function SubRead3({
8644
8614
  documentType,
8645
8615
  WorkflowTypeId
8646
8616
  }) {
8647
- const documentQuery = useQuery9({
8617
+ const documentQuery = useQuery8({
8648
8618
  queryKey: ["SubRead" + documentType],
8649
8619
  queryFn: async () => {
8650
8620
  const result = await baseAxios_default.get(
@@ -8744,7 +8714,7 @@ import { Grid as Grid2, Paper as Paper10, ScrollArea as ScrollArea6 } from "@man
8744
8714
 
8745
8715
  // src/modules-features/admin/core/core38677/F_core38677_ReadUser.tsx
8746
8716
  import { Container as Container4 } from "@mantine/core";
8747
- import { useQuery as useQuery10 } from "@tanstack/react-query";
8717
+ import { useQuery as useQuery9 } from "@tanstack/react-query";
8748
8718
  import { useEffect as useEffect8, useMemo as useMemo8, useState as useState9 } from "react";
8749
8719
 
8750
8720
  // src/modules-features/admin/core/core83092/useS_core83092.tsx
@@ -8850,7 +8820,7 @@ function F_core38677_ReadUser() {
8850
8820
  ) });
8851
8821
  }
8852
8822
  function useQ_Account_GetAdminAccount() {
8853
- const query = useQuery10({
8823
+ const query = useQuery9({
8854
8824
  queryKey: ["useQ_Role_GetAdminRole"],
8855
8825
  queryFn: async () => {
8856
8826
  var _a;
@@ -8931,7 +8901,7 @@ var menuData = [
8931
8901
  // src/modules-features/admin/core/core38677/F_core38677_ViewMenuPermissions.tsx
8932
8902
  import { Checkbox as Checkbox3, Flex as Flex5, ScrollArea as ScrollArea5, Table as Table3, Text as Text13 } from "@mantine/core";
8933
8903
  import { IconEdit as IconEdit5, IconEyeUp, IconFileExport as IconFileExport2, IconPlus as IconPlus5, IconPrinter as IconPrinter3, IconTrash as IconTrash5 } from "@tabler/icons-react";
8934
- import { useQuery as useQuery11 } from "@tanstack/react-query";
8904
+ import { useQuery as useQuery10 } from "@tanstack/react-query";
8935
8905
  import React2, { useEffect as useEffect10, useState as useState11 } from "react";
8936
8906
  import { jsx as jsx85, jsxs as jsxs51 } from "react/jsx-runtime";
8937
8907
  var title = "Danh s\xE1ch ch\u1EE9c n\u0103ng";
@@ -9118,7 +9088,7 @@ function F_core38677_ViewMenuPermissions({ menuData: menuData2 }) {
9118
9088
  }
9119
9089
  function useGetUserPermission() {
9120
9090
  const store = useS_core83092();
9121
- const query = useQuery11({
9091
+ const query = useQuery10({
9122
9092
  queryKey: ["F_7p4mh9d75x_AuthorizationTable", store.state.roleId],
9123
9093
  queryFn: async () => {
9124
9094
  const result = await baseAxios_default.get("/Role/GetRolePermission?roleId=" + store.state.roleId);
@@ -9166,7 +9136,7 @@ function F_core38677({ menuData: menuData2 }) {
9166
9136
  }
9167
9137
 
9168
9138
  // src/modules-features/admin/core/core40207/F_core40207_Read.tsx
9169
- import { useQuery as useQuery12 } from "@tanstack/react-query";
9139
+ import { useQuery as useQuery11 } from "@tanstack/react-query";
9170
9140
  import { useMemo as useMemo9 } from "react";
9171
9141
 
9172
9142
  // src/modules-features/admin/core/core40207/F_core40207_Create.tsx
@@ -9297,7 +9267,7 @@ function F_core40207_Update({ values }) {
9297
9267
  // src/modules-features/admin/core/core40207/F_core40207_Read.tsx
9298
9268
  import { jsx as jsx90, jsxs as jsxs55 } from "react/jsx-runtime";
9299
9269
  function F_core40207_Read({ GuidelineTypeId }) {
9300
- const query = useQuery12({
9270
+ const query = useQuery11({
9301
9271
  queryKey: ["F_core40207_Read"],
9302
9272
  queryFn: async () => {
9303
9273
  var _a;
@@ -9358,7 +9328,7 @@ function F_core40207({ GuidelineTypeId }) {
9358
9328
 
9359
9329
  // src/modules-features/admin/core/core47643/F_core47643_Read.tsx
9360
9330
  import { Group as Group15 } from "@mantine/core";
9361
- import { useQuery as useQuery13 } from "@tanstack/react-query";
9331
+ import { useQuery as useQuery12 } from "@tanstack/react-query";
9362
9332
  import { useMemo as useMemo10 } from "react";
9363
9333
 
9364
9334
  // src/modules-features/admin/core/core47643/F_core47643_Delete.tsx
@@ -9426,7 +9396,7 @@ function F_core47643_Read() {
9426
9396
  );
9427
9397
  }
9428
9398
  function useQ_core47643_GetAdminRole() {
9429
- const query = useQuery13({
9399
+ const query = useQuery12({
9430
9400
  queryKey: ["useQ_core47643_GetAdminRole"],
9431
9401
  queryFn: async () => {
9432
9402
  const res = await baseAxios_default.get("/Role/GetAdminRole");
@@ -9609,7 +9579,7 @@ var ENUM_EMAILCONFIG_MODULE = /* @__PURE__ */ ((ENUM_EMAILCONFIG_MODULE2) => {
9609
9579
  })(ENUM_EMAILCONFIG_MODULE || {});
9610
9580
 
9611
9581
  // src/modules-features/admin/core/core64229/F_core64229_Read.tsx
9612
- import { useQuery as useQuery14 } from "@tanstack/react-query";
9582
+ import { useQuery as useQuery13 } from "@tanstack/react-query";
9613
9583
  import { useMemo as useMemo11 } from "react";
9614
9584
 
9615
9585
  // src/modules-features/admin/core/core64229/F_core64229_Form.tsx
@@ -9732,7 +9702,7 @@ function F_core64229_Delete({ values }) {
9732
9702
  // src/modules-features/admin/core/core64229/F_core64229_Read.tsx
9733
9703
  import { jsx as jsx101, jsxs as jsxs60 } from "react/jsx-runtime";
9734
9704
  function F_core64229_Read() {
9735
- const query = useQuery14({
9705
+ const query = useQuery13({
9736
9706
  queryKey: ["F_core64229_Read"],
9737
9707
  queryFn: async () => {
9738
9708
  const res = await baseAxios_default.get("/EmailConfig/GetAll");
@@ -9798,14 +9768,14 @@ function F_core64229() {
9798
9768
  // src/modules-features/admin/core/core71678/F_core71678_Read.tsx
9799
9769
  import { Button as Button17, Group as Group17 } from "@mantine/core";
9800
9770
  import { IconShield } from "@tabler/icons-react";
9801
- import { useQuery as useQuery16 } from "@tanstack/react-query";
9771
+ import { useQuery as useQuery15 } from "@tanstack/react-query";
9802
9772
  import { useRouter as useRouter3 } from "next/navigation";
9803
9773
  import { useMemo as useMemo13, useState as useState13 } from "react";
9804
9774
 
9805
9775
  // src/modules-features/admin/core/core71678/F_core71678_ChangePermission.tsx
9806
9776
  import { Button as Button16, Fieldset as Fieldset6, Group as Group16, Table as Table4 } from "@mantine/core";
9807
9777
  import { useDisclosure as useDisclosure12 } from "@mantine/hooks";
9808
- import { useMutation as useMutation7, useQuery as useQuery15, useQueryClient as useQueryClient5 } from "@tanstack/react-query";
9778
+ import { useMutation as useMutation7, useQuery as useQuery14, useQueryClient as useQueryClient5 } from "@tanstack/react-query";
9809
9779
  import { useEffect as useEffect13, useMemo as useMemo12, useState as useState12 } from "react";
9810
9780
  import { jsx as jsx103, jsxs as jsxs61 } from "react/jsx-runtime";
9811
9781
  function F_core71678_ChangePermission({ user }) {
@@ -9813,7 +9783,7 @@ function F_core71678_ChangePermission({ user }) {
9813
9783
  const queryClient = useQueryClient5();
9814
9784
  const [rowSelection, setRowSelection] = useState12({});
9815
9785
  const rowSelect = useState12();
9816
- const query = useQuery15({
9786
+ const query = useQuery14({
9817
9787
  queryKey: [`F1_1ChangePermission`],
9818
9788
  queryFn: async () => {
9819
9789
  const response = await baseAxios_default.get("/Role/GetAdminRole");
@@ -9998,7 +9968,7 @@ var ENDPOINT4 = "/Account/GetAdminAccount";
9998
9968
  function F_core71678_Read() {
9999
9969
  const router = useRouter3();
10000
9970
  const [rowSelection, setRowSelection] = useState13({});
10001
- const AllUserQuery = useQuery16({
9971
+ const AllUserQuery = useQuery15({
10002
9972
  queryKey: ["F_core71678_Read"],
10003
9973
  queryFn: async () => {
10004
9974
  var _a;
@@ -10069,7 +10039,7 @@ function F_core71678() {
10069
10039
  }
10070
10040
 
10071
10041
  // src/modules-features/admin/core/core76318/F_core76318_Read.tsx
10072
- import { useQuery as useQuery17 } from "@tanstack/react-query";
10042
+ import { useQuery as useQuery16 } from "@tanstack/react-query";
10073
10043
  import { useMemo as useMemo14 } from "react";
10074
10044
 
10075
10045
  // src/modules-features/admin/core/core76318/F_core76318_Create.tsx
@@ -10216,7 +10186,7 @@ function F_core76318_Update({ values }) {
10216
10186
  // src/modules-features/admin/core/core76318/F_core76318_Read.tsx
10217
10187
  import { jsx as jsx112, jsxs as jsxs67 } from "react/jsx-runtime";
10218
10188
  function F_core76318_Read({ SecurityTypeId }) {
10219
- const query = useQuery17({
10189
+ const query = useQuery16({
10220
10190
  queryKey: ["F_core76318_Read"],
10221
10191
  queryFn: async () => {
10222
10192
  var _a;
@@ -10285,7 +10255,7 @@ import { Grid as Grid4, Paper as Paper12, ScrollArea as ScrollArea8 } from "@man
10285
10255
 
10286
10256
  // src/modules-features/admin/core/core83092/F_core83092_ReadUser.tsx
10287
10257
  import { Container as Container5 } from "@mantine/core";
10288
- import { useQuery as useQuery18 } from "@tanstack/react-query";
10258
+ import { useQuery as useQuery17 } from "@tanstack/react-query";
10289
10259
  import { useEffect as useEffect15, useMemo as useMemo15, useState as useState14 } from "react";
10290
10260
  import { jsx as jsx114 } from "react/jsx-runtime";
10291
10261
  function F_core83092_ReadUser() {
@@ -10341,7 +10311,7 @@ function F_core83092_ReadUser() {
10341
10311
  ) });
10342
10312
  }
10343
10313
  function useQ_core83092_Account_GetAdminAccount() {
10344
- const query = useQuery18({
10314
+ const query = useQuery17({
10345
10315
  queryKey: ["useQ_core83092_Account_GetAdminAccount"],
10346
10316
  queryFn: async () => {
10347
10317
  var _a;
@@ -10391,7 +10361,7 @@ function F_core83092_Save() {
10391
10361
  // src/modules-features/admin/core/core83092/F_core83092_ViewMenuPermissions.tsx
10392
10362
  import { Checkbox as Checkbox4, Flex as Flex6, ScrollArea as ScrollArea7, Table as Table5, Text as Text14 } from "@mantine/core";
10393
10363
  import { IconEdit as IconEdit6, IconEyeUp as IconEyeUp2, IconFileExport as IconFileExport3, IconPlus as IconPlus6, IconPrinter as IconPrinter4, IconTrash as IconTrash6 } from "@tabler/icons-react";
10394
- import { useQuery as useQuery19 } from "@tanstack/react-query";
10364
+ import { useQuery as useQuery18 } from "@tanstack/react-query";
10395
10365
  import React4, { useEffect as useEffect17, useState as useState16 } from "react";
10396
10366
  import { jsx as jsx116, jsxs as jsxs68 } from "react/jsx-runtime";
10397
10367
  var title2 = "Danh s\xE1ch ch\u1EE9c n\u0103ng";
@@ -10578,7 +10548,7 @@ function F_core83092_ViewMenuPermissions({ menuData: menuData2 }) {
10578
10548
  }
10579
10549
  function useGetUserPermission2({ menuData: menuData2 }) {
10580
10550
  const store = useS_core83092();
10581
- const query = useQuery19({
10551
+ const query = useQuery18({
10582
10552
  queryKey: ["F_7p4mh9d75x_AuthorizationTable", store.state.roleId],
10583
10553
  queryFn: async () => {
10584
10554
  const result = await baseAxios_default.get("/Role/GetUserPermission?userId=" + store.state.roleId);
@@ -11263,7 +11233,7 @@ import {
11263
11233
  } from "@mantine/core";
11264
11234
  import { useForm as useForm20 } from "@mantine/form";
11265
11235
  import { useMutation as useMutation9 } from "@tanstack/react-query";
11266
- import axios2 from "axios";
11236
+ import axios from "axios";
11267
11237
  import Link5 from "next/link";
11268
11238
  import { useRouter as useRouter6 } from "next/navigation";
11269
11239
  import { useState as useState17 } from "react";
@@ -11378,7 +11348,7 @@ function useM_Account_Sigin() {
11378
11348
  const ENDPOINT5 = process.env.NEXT_PUBLIC_API + "/Account/SignIn";
11379
11349
  const mutation = useMutation9({
11380
11350
  mutationFn: async (values) => {
11381
- const result = await axios2.post(ENDPOINT5, values);
11351
+ const result = await axios.post(ENDPOINT5, values);
11382
11352
  return result.data;
11383
11353
  }
11384
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-ZO35CUIW.mjs";
67
+ } from "../chunk-ETYO7RDW.mjs";
68
+ import "../chunk-QAWKASVG.mjs";
68
69
  import "../chunk-Y3YGC5IH.mjs";
69
- import "../chunk-EEQENBXZ.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,6 @@
1
+ import * as _tanstack_react_query from '@tanstack/react-query';
2
+ import { I as IAQModule } from '../IAQModule-XZYlbivW.mjs';
3
+
4
+ declare function useQ_AQ_GetAQModule(): _tanstack_react_query.UseQueryResult<IAQModule, Error>;
5
+
6
+ export { useQ_AQ_GetAQModule };
@@ -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-ZO35CUIW.mjs";
68
+ } from "../chunk-ETYO7RDW.mjs";
69
+ import "../chunk-QAWKASVG.mjs";
69
70
  import "../chunk-Y3YGC5IH.mjs";
70
- import "../chunk-EEQENBXZ.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,
@@ -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-EEQENBXZ.mjs";
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.98",
25
+ "version": "0.1.100",
22
26
  "private": false,
23
27
  "files": [
24
28
  "dist"