aq-fe-framework 0.1.75 → 0.1.77
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.
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createGenericStore,
|
|
3
|
-
useS_Sidebar
|
|
4
|
-
} from "./chunk-AL73DX37.mjs";
|
|
5
1
|
import {
|
|
6
2
|
U0DateToDDMMYYYString,
|
|
7
3
|
U0MyValidateEmail,
|
|
@@ -10,6 +6,10 @@ import {
|
|
|
10
6
|
utils_notification_show,
|
|
11
7
|
utils_pdf_download
|
|
12
8
|
} from "./chunk-4MLNXP25.mjs";
|
|
9
|
+
import {
|
|
10
|
+
createGenericStore,
|
|
11
|
+
useS_Sidebar
|
|
12
|
+
} from "./chunk-AL73DX37.mjs";
|
|
13
13
|
import {
|
|
14
14
|
__objRest,
|
|
15
15
|
__spreadProps,
|
|
@@ -1807,11 +1807,14 @@ function MyHtmlWrapper(_a) {
|
|
|
1807
1807
|
// src/components/Buttons/ButtonPrintPDFTable/MyButtonPrintTablePDF.tsx
|
|
1808
1808
|
import { Box, Table as Table2 } from "@mantine/core";
|
|
1809
1809
|
import { jsx as jsx35, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1810
|
-
function MyButtonPrintTablePDF({
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1810
|
+
function MyButtonPrintTablePDF(_a) {
|
|
1811
|
+
var _b = _a, {
|
|
1812
|
+
printConfig,
|
|
1813
|
+
data
|
|
1814
|
+
} = _b, rest = __objRest(_b, [
|
|
1815
|
+
"printConfig",
|
|
1816
|
+
"data"
|
|
1817
|
+
]);
|
|
1815
1818
|
const formatDate = (date) => {
|
|
1816
1819
|
const day = String(date.getDate()).padStart(2, "0");
|
|
1817
1820
|
const month = String(date.getMonth() + 1).padStart(2, "0");
|
|
@@ -1851,14 +1854,14 @@ function MyButtonPrintTablePDF({
|
|
|
1851
1854
|
field.fieldName
|
|
1852
1855
|
);
|
|
1853
1856
|
}
|
|
1854
|
-
if (value === "true") {
|
|
1857
|
+
if (value === "true" || value === "false") {
|
|
1855
1858
|
return /* @__PURE__ */ jsx35(
|
|
1856
1859
|
Table2.Td,
|
|
1857
1860
|
{
|
|
1858
1861
|
ta: alignment,
|
|
1859
1862
|
px: "xs",
|
|
1860
1863
|
style: { border: "1px solid lightgray" },
|
|
1861
|
-
children: /* @__PURE__ */ jsx35("input", { type: "checkbox", checked: true, readOnly: true })
|
|
1864
|
+
children: /* @__PURE__ */ jsx35("input", { type: "checkbox", checked: value === "true", readOnly: true })
|
|
1862
1865
|
},
|
|
1863
1866
|
field.fieldName
|
|
1864
1867
|
);
|
|
@@ -1916,9 +1919,9 @@ function MyButtonPrintTablePDF({
|
|
|
1916
1919
|
};
|
|
1917
1920
|
return /* @__PURE__ */ jsx35(
|
|
1918
1921
|
MyButtonPrintPDF,
|
|
1919
|
-
{
|
|
1922
|
+
__spreadValues({
|
|
1920
1923
|
contentToPrint: renderContent()
|
|
1921
|
-
}
|
|
1924
|
+
}, rest)
|
|
1922
1925
|
);
|
|
1923
1926
|
}
|
|
1924
1927
|
|
|
@@ -10097,7 +10100,8 @@ function F_authenticate_Login({
|
|
|
10097
10100
|
loginInfo,
|
|
10098
10101
|
redirectUrlAfterLogin = "/admin/dashboard",
|
|
10099
10102
|
additionalActions,
|
|
10100
|
-
backgroundImage = "/imgs/0/IMG0AuthBackground.png"
|
|
10103
|
+
backgroundImage = "/imgs/0/IMG0AuthBackground.png",
|
|
10104
|
+
onSuccess
|
|
10101
10105
|
}) {
|
|
10102
10106
|
const router = useRouter6();
|
|
10103
10107
|
const authStore = useS_authenticate();
|
|
@@ -10131,7 +10135,13 @@ function F_authenticate_Login({
|
|
|
10131
10135
|
loadingState[1](false);
|
|
10132
10136
|
return;
|
|
10133
10137
|
}
|
|
10138
|
+
authStore.setProperty("userId", data.userId);
|
|
10134
10139
|
authStore.setProperty("token", data.data.token);
|
|
10140
|
+
if (onSuccess) {
|
|
10141
|
+
onSuccess(data);
|
|
10142
|
+
loadingState[1](false);
|
|
10143
|
+
return;
|
|
10144
|
+
}
|
|
10135
10145
|
router.replace(redirectUrlAfterLogin);
|
|
10136
10146
|
}
|
|
10137
10147
|
});
|
|
@@ -235,12 +235,12 @@ interface PrintConfig {
|
|
|
235
235
|
title?: string;
|
|
236
236
|
showRowNumbers?: boolean;
|
|
237
237
|
}
|
|
238
|
-
interface AQButtonPrintTableProps<TData extends MRT_RowData = any> {
|
|
238
|
+
interface AQButtonPrintTableProps<TData extends MRT_RowData = any> extends React.ComponentPropsWithoutRef<typeof MyButtonPrintPDF> {
|
|
239
239
|
printConfig?: PrintConfig;
|
|
240
240
|
objectName?: string;
|
|
241
241
|
data?: TData[];
|
|
242
242
|
}
|
|
243
|
-
declare function MyButtonPrintTablePDF<TData extends MRT_RowData = any>({ printConfig, data, }: AQButtonPrintTableProps<TData>): react_jsx_runtime.JSX.Element;
|
|
243
|
+
declare function MyButtonPrintTablePDF<TData extends MRT_RowData = any>({ printConfig, data, ...rest }: AQButtonPrintTableProps<TData>): react_jsx_runtime.JSX.Element;
|
|
244
244
|
|
|
245
245
|
interface IMyButtonRouterBack extends ButtonProps {
|
|
246
246
|
url?: string;
|
|
@@ -62,9 +62,9 @@ import {
|
|
|
62
62
|
useHeaderMegaMenuStore,
|
|
63
63
|
useS_ButtonImport,
|
|
64
64
|
utils_layout_getItemsWithoutLinks
|
|
65
|
-
} from "../chunk-
|
|
66
|
-
import "../chunk-AL73DX37.mjs";
|
|
65
|
+
} from "../chunk-SV7OB4WA.mjs";
|
|
67
66
|
import "../chunk-4MLNXP25.mjs";
|
|
67
|
+
import "../chunk-AL73DX37.mjs";
|
|
68
68
|
import "../chunk-FWCSY2DS.mjs";
|
|
69
69
|
export {
|
|
70
70
|
AQButtonCreateByImportFile,
|
|
@@ -434,11 +434,12 @@ declare function F_authenticate_SplashPage(): react_jsx_runtime.JSX.Element;
|
|
|
434
434
|
|
|
435
435
|
interface I$1 {
|
|
436
436
|
token?: string;
|
|
437
|
+
userId?: number;
|
|
437
438
|
}
|
|
438
439
|
declare function useS_authenticate(): {
|
|
439
440
|
state: I$1;
|
|
440
441
|
setState: (newState: I$1) => void;
|
|
441
|
-
setProperty: <K extends
|
|
442
|
+
setProperty: <K extends keyof I$1>(key: K, value: I$1[K]) => void;
|
|
442
443
|
resetState: () => void;
|
|
443
444
|
};
|
|
444
445
|
|
|
@@ -451,7 +452,8 @@ interface I {
|
|
|
451
452
|
redirectUrlAfterLogin?: string;
|
|
452
453
|
additionalActions?: ReactNode;
|
|
453
454
|
backgroundImage?: string;
|
|
455
|
+
onSuccess?: (data?: any) => void;
|
|
454
456
|
}
|
|
455
|
-
declare function F_authenticate_Login({ loginInfo, redirectUrlAfterLogin, additionalActions, backgroundImage, }: I): react_jsx_runtime.JSX.Element;
|
|
457
|
+
declare function F_authenticate_Login({ loginInfo, redirectUrlAfterLogin, additionalActions, backgroundImage, onSuccess }: I): react_jsx_runtime.JSX.Element;
|
|
456
458
|
|
|
457
459
|
export { F_authenticate_Login, F_authenticate_Logout, F_authenticate_SplashPage, F_core12196, F_core12196_Create, F_core12196_Delete, F_core12196_Update, F_core16209, F_core16209_Create, F_core16209_Delete, F_core16209_Update, F_core18256, F_core18256_Create, F_core18256_Delete, F_core18256_Read, F_core18256_Select, F_core18256_Update, F_core26965, F_core26965_Create, F_core26965_Delete, F_core26965_Update, F_core27311, F_core27311_Create, F_core27311_Delete, F_core27311_Read, F_core27311_Update, F_core38677_ReadUser, F_core38677_Save, F_core38677_ViewMenuPermissions, F_core40207, F_core40207_Create, F_core40207_Delete, F_core40207_Read, F_core40207_Update, F_core47643, F_core47643_Delete, F_core47643_Form, F_core47643_Read, F_core64229_Delete, F_core64229_Form, F_core64229_Read, F_core71678_ChangePermission, F_core71678_Create, F_core71678_Delete, F_core71678_Read, F_core71678_Update, F_core76318_Create, F_core76318_Delete, F_core76318_Update, F_core83092, F_core83092_ReadUser, F_core83092_Save, F_core83092_ViewMenuPermissions, type I_core38677_User, type I_core71678_Read, type I_core83092_RolePermission, PieChart_DiscountUsedPercentage, PieChart_VoucherUsedPercentage, useS_authenticate, useS_core83092, utils_core83092_mergePage };
|
|
@@ -57,9 +57,9 @@ import {
|
|
|
57
57
|
useS_authenticate,
|
|
58
58
|
useS_core83092,
|
|
59
59
|
utils_core83092_mergePage
|
|
60
|
-
} from "../chunk-
|
|
61
|
-
import "../chunk-AL73DX37.mjs";
|
|
60
|
+
} from "../chunk-SV7OB4WA.mjs";
|
|
62
61
|
import "../chunk-4MLNXP25.mjs";
|
|
62
|
+
import "../chunk-AL73DX37.mjs";
|
|
63
63
|
import "../chunk-FWCSY2DS.mjs";
|
|
64
64
|
export {
|
|
65
65
|
F_authenticate_Login,
|