aq-fe-framework 0.1.627 → 0.1.629
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.
|
@@ -13959,7 +13959,7 @@ import { useEffect as useEffect20 } from "react";
|
|
|
13959
13959
|
|
|
13960
13960
|
// src/modules-features/authenticate/useS_authenticate.ts
|
|
13961
13961
|
var useStore5 = createGenericStore({
|
|
13962
|
-
initialState: { token: "", saveLogin: false, username: "", password: "" },
|
|
13962
|
+
initialState: { token: "", saveLogin: false, username: "", password: "", workingUnitId: 0 },
|
|
13963
13963
|
storageKey: "useS_authenticate"
|
|
13964
13964
|
});
|
|
13965
13965
|
function useS_authenticate() {
|
|
@@ -14017,7 +14017,7 @@ function Feat_Authenticate_Login({
|
|
|
14017
14017
|
"passWord": passWord
|
|
14018
14018
|
}, {
|
|
14019
14019
|
onSuccess: (data2) => {
|
|
14020
|
-
var _a, _b, _c, _d, _e;
|
|
14020
|
+
var _a, _b, _c, _d, _e, _f;
|
|
14021
14021
|
if (data2.isSuccess === false) {
|
|
14022
14022
|
form.setFieldError("username", "T\xE0i kho\u1EA3n kh\xF4ng t\u1ED3n t\u1EA1i");
|
|
14023
14023
|
return;
|
|
@@ -14030,12 +14030,13 @@ function Feat_Authenticate_Login({
|
|
|
14030
14030
|
authenticate_store.setProperty("fullName", (_b = data2.data) == null ? void 0 : _b.userFullName);
|
|
14031
14031
|
authenticate_store.setProperty("userId", (_c = data2.data) == null ? void 0 : _c.userId);
|
|
14032
14032
|
authenticate_store.setProperty("token", (_d = data2.data) == null ? void 0 : _d.token);
|
|
14033
|
+
authenticate_store.setProperty("workingUnitId", (_e = data2.data) == null ? void 0 : _e.workingUnitId);
|
|
14033
14034
|
if (authenticate_store.state.saveLogin == true) {
|
|
14034
14035
|
authenticate_store.setProperty("username", userName);
|
|
14035
14036
|
} else {
|
|
14036
14037
|
authenticate_store.setProperty("username", "");
|
|
14037
14038
|
}
|
|
14038
|
-
permissionStore.setProperty("permission", (
|
|
14039
|
+
permissionStore.setProperty("permission", (_f = data2.data) == null ? void 0 : _f.permissions);
|
|
14039
14040
|
if (onSuccess) {
|
|
14040
14041
|
onSuccess(data2);
|
|
14041
14042
|
return;
|
|
@@ -14126,8 +14127,10 @@ import { jsx as jsx194 } from "react/jsx-runtime";
|
|
|
14126
14127
|
function Feat_Authenticate_Logout({ redirectURL = "/auth/login" }) {
|
|
14127
14128
|
const router = useRouter4();
|
|
14128
14129
|
const authenticateStore = useS_authenticate();
|
|
14130
|
+
const permissionStore = useStore_Permission();
|
|
14129
14131
|
return /* @__PURE__ */ jsx194(Button23, { onClick: () => {
|
|
14130
|
-
authenticateStore.
|
|
14132
|
+
authenticateStore.setState({});
|
|
14133
|
+
permissionStore.setState({});
|
|
14131
14134
|
router.replace(redirectURL);
|
|
14132
14135
|
}, leftSection: /* @__PURE__ */ jsx194(IconLogout, {}), fullWidth: true, justify: "start", variant: "subtle", children: "\u0110\u0103ng xu\u1EA5t" });
|
|
14133
14136
|
}
|
package/dist/core/index.mjs
CHANGED
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
MyStatsCard,
|
|
24
24
|
MyTextInput2 as MyTextInput,
|
|
25
25
|
MyWeeklySessionSchedulerPicker
|
|
26
|
-
} from "../chunk-
|
|
26
|
+
} from "../chunk-3K3BNQWC.mjs";
|
|
27
27
|
import "../chunk-PW6WTEVB.mjs";
|
|
28
28
|
import "../chunk-IKFZBEKW.mjs";
|
|
29
29
|
import "../chunk-7PUDC2WF.mjs";
|
|
@@ -872,6 +872,7 @@ declare function F_workflowProcessDocs_Update({ values, WorkflowTypeId, }: {
|
|
|
872
872
|
}): react_jsx_runtime.JSX.Element;
|
|
873
873
|
|
|
874
874
|
interface IData {
|
|
875
|
+
workingUnitId?: number;
|
|
875
876
|
userName?: string;
|
|
876
877
|
userId?: number;
|
|
877
878
|
userFullName?: string;
|
|
@@ -914,6 +915,7 @@ interface I {
|
|
|
914
915
|
username?: string;
|
|
915
916
|
password?: string;
|
|
916
917
|
saveLogin?: boolean;
|
|
918
|
+
workingUnitId?: number;
|
|
917
919
|
}
|
|
918
920
|
declare function useS_authenticate(): {
|
|
919
921
|
state: I;
|
|
@@ -102,7 +102,7 @@ import {
|
|
|
102
102
|
Feat_accessControlLevel,
|
|
103
103
|
useS_authenticate,
|
|
104
104
|
useS_moduleConfig
|
|
105
|
-
} from "../chunk-
|
|
105
|
+
} from "../chunk-3K3BNQWC.mjs";
|
|
106
106
|
import "../chunk-PW6WTEVB.mjs";
|
|
107
107
|
import "../chunk-IKFZBEKW.mjs";
|
|
108
108
|
import "../chunk-7PUDC2WF.mjs";
|