aq-fe-framework 0.1.75 → 0.1.76
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.
|
@@ -10097,7 +10097,8 @@ function F_authenticate_Login({
|
|
|
10097
10097
|
loginInfo,
|
|
10098
10098
|
redirectUrlAfterLogin = "/admin/dashboard",
|
|
10099
10099
|
additionalActions,
|
|
10100
|
-
backgroundImage = "/imgs/0/IMG0AuthBackground.png"
|
|
10100
|
+
backgroundImage = "/imgs/0/IMG0AuthBackground.png",
|
|
10101
|
+
onSuccess
|
|
10101
10102
|
}) {
|
|
10102
10103
|
const router = useRouter6();
|
|
10103
10104
|
const authStore = useS_authenticate();
|
|
@@ -10121,17 +10122,20 @@ function F_authenticate_Login({
|
|
|
10121
10122
|
"passWord": passWord
|
|
10122
10123
|
}, {
|
|
10123
10124
|
onSuccess: (data) => {
|
|
10125
|
+
loadingState[1](false);
|
|
10124
10126
|
if (data.isSuccess === false) {
|
|
10125
10127
|
form.setFieldError("username", "T\xE0i kho\u1EA3n kh\xF4ng t\u1ED3n t\u1EA1i!");
|
|
10126
|
-
loadingState[1](false);
|
|
10127
10128
|
return;
|
|
10128
10129
|
}
|
|
10129
10130
|
if (data.isSuccess == 0) {
|
|
10130
10131
|
form.setFieldError("password", data.message);
|
|
10131
|
-
loadingState[1](false);
|
|
10132
10132
|
return;
|
|
10133
10133
|
}
|
|
10134
10134
|
authStore.setProperty("token", data.data.token);
|
|
10135
|
+
if (onSuccess) {
|
|
10136
|
+
onSuccess(data);
|
|
10137
|
+
return;
|
|
10138
|
+
}
|
|
10135
10139
|
router.replace(redirectUrlAfterLogin);
|
|
10136
10140
|
}
|
|
10137
10141
|
});
|
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
useHeaderMegaMenuStore,
|
|
63
63
|
useS_ButtonImport,
|
|
64
64
|
utils_layout_getItemsWithoutLinks
|
|
65
|
-
} from "../chunk-
|
|
65
|
+
} from "../chunk-O5QBK74D.mjs";
|
|
66
66
|
import "../chunk-AL73DX37.mjs";
|
|
67
67
|
import "../chunk-4MLNXP25.mjs";
|
|
68
68
|
import "../chunk-FWCSY2DS.mjs";
|
|
@@ -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 };
|