aq-fe-framework 0.1.599 → 0.1.600
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/core/index.mjs
CHANGED
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
MyTextInput,
|
|
24
24
|
MyWeeklySessionSchedulerPicker
|
|
25
25
|
} from "../chunk-S4K4K3X3.mjs";
|
|
26
|
+
import "../chunk-GFEMKKFH.mjs";
|
|
26
27
|
import {
|
|
27
28
|
MyModalDelete
|
|
28
29
|
} from "../chunk-GFW64WZ2.mjs";
|
|
@@ -30,7 +31,6 @@ import "../chunk-BCTZIPA2.mjs";
|
|
|
30
31
|
import "../chunk-PW6WTEVB.mjs";
|
|
31
32
|
import "../chunk-5COIJ2CE.mjs";
|
|
32
33
|
import "../chunk-EWDS5IOF.mjs";
|
|
33
|
-
import "../chunk-GFEMKKFH.mjs";
|
|
34
34
|
import "../chunk-OMJJAHOC.mjs";
|
|
35
35
|
import "../chunk-K6S7R6LU.mjs";
|
|
36
36
|
import "../chunk-AR64BQSX.mjs";
|
|
@@ -912,10 +912,11 @@ interface F_authenticate_Login_Props {
|
|
|
912
912
|
showSaveLogin?: boolean;
|
|
913
913
|
showForgotPassword?: boolean;
|
|
914
914
|
onSuccess?: (data?: IResponseData) => void;
|
|
915
|
+
onError?: (data: Error) => void;
|
|
915
916
|
customSubmit?: (username?: string, password?: string) => void;
|
|
916
917
|
loginButtonProps?: ButtonProps;
|
|
917
918
|
}
|
|
918
|
-
declare function F_authenticate_Login({ header, redirectUrlAfterLogin, additionalActions, backgroundImage, onSuccess, showLoginButton, showSaveLogin, showForgotPassword, customSubmit, loginButtonProps }: F_authenticate_Login_Props): react_jsx_runtime.JSX.Element;
|
|
919
|
+
declare function F_authenticate_Login({ header, redirectUrlAfterLogin, additionalActions, backgroundImage, onSuccess, showLoginButton, showSaveLogin, showForgotPassword, customSubmit, onError, loginButtonProps }: F_authenticate_Login_Props): react_jsx_runtime.JSX.Element;
|
|
919
920
|
|
|
920
921
|
interface Feat_TokenExpiredProps {
|
|
921
922
|
loginRedirect?: string;
|
|
@@ -8,6 +8,9 @@ import {
|
|
|
8
8
|
MySelect as MySelect2,
|
|
9
9
|
MyTextInput as MyTextInput2
|
|
10
10
|
} from "../chunk-S4K4K3X3.mjs";
|
|
11
|
+
import {
|
|
12
|
+
const_object_documentTypes
|
|
13
|
+
} from "../chunk-GFEMKKFH.mjs";
|
|
11
14
|
import "../chunk-GFW64WZ2.mjs";
|
|
12
15
|
import {
|
|
13
16
|
F_authenticate_Logout,
|
|
@@ -48,9 +51,6 @@ import {
|
|
|
48
51
|
import {
|
|
49
52
|
U0DateToDDMMYYYString
|
|
50
53
|
} from "../chunk-EWDS5IOF.mjs";
|
|
51
|
-
import {
|
|
52
|
-
const_object_documentTypes
|
|
53
|
-
} from "../chunk-GFEMKKFH.mjs";
|
|
54
54
|
import {
|
|
55
55
|
const_object_colors
|
|
56
56
|
} from "../chunk-OMJJAHOC.mjs";
|
|
@@ -5919,10 +5919,11 @@ import {
|
|
|
5919
5919
|
Title
|
|
5920
5920
|
} from "@mantine/core";
|
|
5921
5921
|
import { useForm as useForm38 } from "@mantine/form";
|
|
5922
|
+
import { notifications } from "@mantine/notifications";
|
|
5922
5923
|
import { useMutation as useMutation3 } from "@tanstack/react-query";
|
|
5923
5924
|
import Link from "next/link";
|
|
5924
5925
|
import { useRouter as useRouter2 } from "next/navigation";
|
|
5925
|
-
import { useEffect as useEffect10
|
|
5926
|
+
import { useEffect as useEffect10 } from "react";
|
|
5926
5927
|
|
|
5927
5928
|
// src/modules-features/authenticate/F_authenticate_Login/css.module.css
|
|
5928
5929
|
var css_default = {};
|
|
@@ -5939,12 +5940,12 @@ function F_authenticate_Login({
|
|
|
5939
5940
|
showSaveLogin = true,
|
|
5940
5941
|
showForgotPassword = true,
|
|
5941
5942
|
customSubmit,
|
|
5943
|
+
onError,
|
|
5942
5944
|
loginButtonProps
|
|
5943
5945
|
}) {
|
|
5944
5946
|
const router = useRouter2();
|
|
5945
5947
|
const authenticate_store = useS_authenticate();
|
|
5946
5948
|
const permissionStore = useStore_Permission();
|
|
5947
|
-
const loadingState = useState8(false);
|
|
5948
5949
|
const mutation = useM_Account_Sigin();
|
|
5949
5950
|
const form = useForm38({
|
|
5950
5951
|
initialValues: {
|
|
@@ -5972,7 +5973,6 @@ function F_authenticate_Login({
|
|
|
5972
5973
|
if (customSubmit) {
|
|
5973
5974
|
return customSubmit(userName, passWord);
|
|
5974
5975
|
}
|
|
5975
|
-
loadingState[1](true);
|
|
5976
5976
|
mutation.mutate({
|
|
5977
5977
|
"userName": userName,
|
|
5978
5978
|
"passWord": passWord
|
|
@@ -5981,12 +5981,10 @@ function F_authenticate_Login({
|
|
|
5981
5981
|
var _a, _b, _c, _d, _e;
|
|
5982
5982
|
if (data2.isSuccess === false) {
|
|
5983
5983
|
form.setFieldError("username", "T\xE0i kho\u1EA3n kh\xF4ng t\u1ED3n t\u1EA1i");
|
|
5984
|
-
loadingState[1](false);
|
|
5985
5984
|
return;
|
|
5986
5985
|
}
|
|
5987
5986
|
if (data2.isSuccess == 0) {
|
|
5988
5987
|
form.setFieldError("password", data2.message);
|
|
5989
|
-
loadingState[1](false);
|
|
5990
5988
|
return;
|
|
5991
5989
|
}
|
|
5992
5990
|
authenticate_store.setProperty("code", (_a = data2.data) == null ? void 0 : _a.userName);
|
|
@@ -6001,10 +5999,16 @@ function F_authenticate_Login({
|
|
|
6001
5999
|
permissionStore.setProperty("permission", (_e = data2.data) == null ? void 0 : _e.permissions);
|
|
6002
6000
|
if (onSuccess) {
|
|
6003
6001
|
onSuccess(data2);
|
|
6004
|
-
loadingState[1](false);
|
|
6005
6002
|
return;
|
|
6006
6003
|
}
|
|
6007
6004
|
router.replace(redirectUrlAfterLogin);
|
|
6005
|
+
},
|
|
6006
|
+
onError: (error) => {
|
|
6007
|
+
notifications.show({
|
|
6008
|
+
message: "C\xF3 l\u1ED7i x\u1EA3y ra vui l\xF2ng th\u1EED l\u1EA1i",
|
|
6009
|
+
color: "red"
|
|
6010
|
+
});
|
|
6011
|
+
onError == null ? void 0 : onError(error);
|
|
6008
6012
|
}
|
|
6009
6013
|
});
|
|
6010
6014
|
}
|
|
@@ -6052,7 +6056,7 @@ function F_authenticate_Login({
|
|
|
6052
6056
|
showLoginButton && /* @__PURE__ */ jsx129(
|
|
6053
6057
|
Button4,
|
|
6054
6058
|
__spreadProps(__spreadValues({
|
|
6055
|
-
loading:
|
|
6059
|
+
loading: mutation.isPending,
|
|
6056
6060
|
type: "submit",
|
|
6057
6061
|
fullWidth: true
|
|
6058
6062
|
}, loginButtonProps), {
|
package/package.json
CHANGED
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"types": "./dist/types/index.d.mts"
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
|
-
"version": "0.1.
|
|
53
|
+
"version": "0.1.600",
|
|
54
54
|
"private": false,
|
|
55
55
|
"files": [
|
|
56
56
|
"dist"
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"scripts": {
|
|
59
59
|
"deploy": "node deploy.js",
|
|
60
60
|
"update-mantine": "npx npm-check-updates @mantine/* @mantinex/* postcss-preset-mantine -u",
|
|
61
|
-
"dev": "next dev --turbopack -p
|
|
61
|
+
"dev": "next dev --turbopack -p 3010",
|
|
62
62
|
"build-next": "next build",
|
|
63
63
|
"gen": "barrelsby --config barrelsby.json",
|
|
64
64
|
"build": "tsup --tsconfig tsconfig.lib.json && cpx \"src/**/*.module.css\" dist",
|