@ordentco/addons-auth-provider 0.9.128-mfe → 0.9.129-mfe
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/src/auth.d.ts +1 -1
- package/dist/src/auth.js +4 -4
- package/package.json +1 -1
- package/src/auth.tsx +5 -5
package/dist/src/auth.d.ts
CHANGED
package/dist/src/auth.js
CHANGED
|
@@ -112,7 +112,7 @@ var AUTH_INITIAL_VALUES = {
|
|
|
112
112
|
roleIDs: null,
|
|
113
113
|
holdingID: null,
|
|
114
114
|
isLoading: false,
|
|
115
|
-
|
|
115
|
+
isIntraday: false,
|
|
116
116
|
menus: [],
|
|
117
117
|
loggedIn: false,
|
|
118
118
|
guard: function () {
|
|
@@ -207,7 +207,7 @@ var AuthProvider = function (_a) {
|
|
|
207
207
|
var _q = (0, react_1.useState)(false), _openModal = _q[0], setOpenModal = _q[1];
|
|
208
208
|
var _r = (0, react_1.useState)([]), menus = _r[0], setMenus = _r[1];
|
|
209
209
|
var _s = (0, react_1.useState)(FIFTEEN_MINUTES), isMinutes = _s[0], setIsMinutes = _s[1];
|
|
210
|
-
var _t = (0, react_1.useState)(false),
|
|
210
|
+
var _t = (0, react_1.useState)(false), isIntraday = _t[0], setIsIntraday = _t[1];
|
|
211
211
|
var _u = (0, react_1.useState)(false), isLoading = _u[0], setIsLoading = _u[1];
|
|
212
212
|
var _v = (0, react_1.useState)(initialProductAuthorities), productAuthorities = _v[0], setProductAuthorities = _v[1];
|
|
213
213
|
var _w = (0, react_1.useState)(false), isAuthoritiesReady = _w[0], setIsAuthoritiesReady = _w[1];
|
|
@@ -296,7 +296,7 @@ var AuthProvider = function (_a) {
|
|
|
296
296
|
setRegion(function () { return response_1.data.region || ""; });
|
|
297
297
|
setUserMode(function () { var _a; return ((_a = response_1.data) === null || _a === void 0 ? void 0 : _a.userMode) || ""; });
|
|
298
298
|
setCompanyLevel(function () { var _a; return ((_a = response_1 === null || response_1 === void 0 ? void 0 : response_1.data) === null || _a === void 0 ? void 0 : _a.companyLevel) || ""; });
|
|
299
|
-
|
|
299
|
+
setIsIntraday(function () { var _a; return ((_a = response_1 === null || response_1 === void 0 ? void 0 : response_1.data) === null || _a === void 0 ? void 0 : _a.isIntraday) || false; });
|
|
300
300
|
a_1 = new Map();
|
|
301
301
|
productRoles = ((_j = response_1.data) === null || _j === void 0 ? void 0 : _j.productRoles) || [];
|
|
302
302
|
productRoles.forEach(function (r) {
|
|
@@ -887,7 +887,7 @@ var AuthProvider = function (_a) {
|
|
|
887
887
|
roleID: roleID,
|
|
888
888
|
holdingID: holdingID,
|
|
889
889
|
isLoading: isLoading,
|
|
890
|
-
|
|
890
|
+
isIntraday: isIntraday,
|
|
891
891
|
userID: userID,
|
|
892
892
|
guard: guard,
|
|
893
893
|
passwordLogin: passwordLogin,
|
package/package.json
CHANGED
package/src/auth.tsx
CHANGED
|
@@ -50,7 +50,7 @@ interface AuthContextProps {
|
|
|
50
50
|
companyName: string;
|
|
51
51
|
userMode: string;
|
|
52
52
|
companyLevel: string;
|
|
53
|
-
|
|
53
|
+
isIntraday: boolean;
|
|
54
54
|
userID: string | null;
|
|
55
55
|
roleID: string | null;
|
|
56
56
|
roleIDs: string[] | null;
|
|
@@ -107,7 +107,7 @@ const AUTH_INITIAL_VALUES: AuthContextProps = {
|
|
|
107
107
|
roleIDs: null,
|
|
108
108
|
holdingID: null,
|
|
109
109
|
isLoading: false,
|
|
110
|
-
|
|
110
|
+
isIntraday: false,
|
|
111
111
|
menus: [],
|
|
112
112
|
loggedIn: false,
|
|
113
113
|
guard: function (): void {
|
|
@@ -210,7 +210,7 @@ export const AuthProvider: React.FC<AuthProviderProps> = ({ children, apiUrl })
|
|
|
210
210
|
const [_openModal, setOpenModal] = useState<boolean>(false);
|
|
211
211
|
const [menus, setMenus] = useState<string[]>([]);
|
|
212
212
|
const [isMinutes, setIsMinutes] = useState<number>(FIFTEEN_MINUTES);
|
|
213
|
-
const [
|
|
213
|
+
const [isIntraday, setIsIntraday] = useState<boolean>(false);
|
|
214
214
|
const [isLoading, setIsLoading] = useState<boolean>(false);
|
|
215
215
|
const [productAuthorities, setProductAuthorities] = useState<ProductAuthoritiesType>(initialProductAuthorities);
|
|
216
216
|
const [isAuthoritiesReady, setIsAuthoritiesReady] = useState(false);
|
|
@@ -293,7 +293,7 @@ export const AuthProvider: React.FC<AuthProviderProps> = ({ children, apiUrl })
|
|
|
293
293
|
setRegion(() => response.data.region || "");
|
|
294
294
|
setUserMode(() => response.data?.userMode || "");
|
|
295
295
|
setCompanyLevel(() => response?.data?.companyLevel || "");
|
|
296
|
-
|
|
296
|
+
setIsIntraday(() => response?.data?.isIntraday || false);
|
|
297
297
|
|
|
298
298
|
const a = new Map<string, Array<string>>();
|
|
299
299
|
const productRoles = response.data?.productRoles || [];
|
|
@@ -829,7 +829,7 @@ export const AuthProvider: React.FC<AuthProviderProps> = ({ children, apiUrl })
|
|
|
829
829
|
roleID,
|
|
830
830
|
holdingID,
|
|
831
831
|
isLoading,
|
|
832
|
-
|
|
832
|
+
isIntraday,
|
|
833
833
|
userID,
|
|
834
834
|
guard,
|
|
835
835
|
passwordLogin,
|