@antscorp/antsomi-ui 1.6.2 → 1.6.4
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.
|
@@ -20,8 +20,13 @@ export const usePermission = () => {
|
|
|
20
20
|
const { data: menuList } = useGetListMenu({
|
|
21
21
|
args: {
|
|
22
22
|
auth: {
|
|
23
|
-
token: '
|
|
24
|
-
|
|
23
|
+
token: ['development', 'sandbox'].includes(env)
|
|
24
|
+
? '5474r2x214r2b4b4v2d4y444u2v5q2p5o4d4c4f424e4'
|
|
25
|
+
: auth === null || auth === void 0 ? void 0 : auth.token,
|
|
26
|
+
// url: 'https://sandbox-permission.ants.vn',
|
|
27
|
+
url: ['development', 'sandbox'].includes(env)
|
|
28
|
+
? 'https://sandbox-permission.ants.vn'
|
|
29
|
+
: permissionDomain, // NOTE: Hard for sandbox, development
|
|
25
30
|
portalId: auth === null || auth === void 0 ? void 0 : auth.portalId,
|
|
26
31
|
userId: auth === null || auth === void 0 ? void 0 : auth.userId,
|
|
27
32
|
accountId: auth === null || auth === void 0 ? void 0 : auth.accountId,
|
|
@@ -31,7 +36,7 @@ export const usePermission = () => {
|
|
|
31
36
|
},
|
|
32
37
|
},
|
|
33
38
|
options: {
|
|
34
|
-
enabled: !!(auth === null || auth === void 0 ? void 0 : auth.userId) && !!auth.portalId,
|
|
39
|
+
enabled: !!(auth === null || auth === void 0 ? void 0 : auth.userId) && !!auth.portalId && !!permissionDomain,
|
|
35
40
|
},
|
|
36
41
|
});
|
|
37
42
|
const { data: dashboardData, refetch: refetchDashboard } = useGetDashboard({
|
|
@@ -130,7 +130,7 @@ export const Layout = memo(props => {
|
|
|
130
130
|
return (React.createElement(LayoutWrapper, { showLeftMenu: !!showLeftMenu },
|
|
131
131
|
React.createElement(HeaderV2, Object.assign({}, mergeHeaderProps, { showLogo: !showLeftMenu })),
|
|
132
132
|
React.createElement(Flex, { className: "layout-body" },
|
|
133
|
-
showLeftMenu && (React.createElement(LeftMenu, Object.assign({ className: `layout-body__menu ${leftMenuClassName}
|
|
133
|
+
showLeftMenu && (React.createElement(LeftMenu, Object.assign({ className: `layout-body__menu ${leftMenuClassName}` }, mergeLeftMenuProps, { appConfig: Object.assign(Object.assign({}, appConfig), { permissionDomain }), onActiveMenuCodeChange: onActiveMenuCodeChange }))),
|
|
134
134
|
React.createElement(ContentWrapper, Object.assign({ "$noPadding": noPadding, "$noSpaceTopContent": noSpaceTopContent }, mergeContentWrapperProps), activeMenuCode === HOME_MENU_ITEMS.RECOMMENDATION.menu_item_code ? (React.createElement("div", { className: "layout-body__content" },
|
|
135
135
|
React.createElement(RecommendationWorkspace, null))) : (React.createElement("div", Object.assign({ className: `layout-body__content ${(workspaceProps === null || workspaceProps === void 0 ? void 0 : workspaceProps.className) || ''}` }, mergeWorkSpaceProps),
|
|
136
136
|
React.createElement(NotificationWrapper, { ref: notificationWrapperRef },
|
package/es/config/index.d.ts
CHANGED
package/es/config/index.js
CHANGED
package/es/constants/api.d.ts
CHANGED
|
@@ -5,11 +5,13 @@ export declare const TINYMCE_API_KEY = "scyw71pj8619analvxs56ppc2w2fj2kpy5vnmflh
|
|
|
5
5
|
export declare const CDP_API: {
|
|
6
6
|
development: string;
|
|
7
7
|
sandbox: string;
|
|
8
|
+
staging: string;
|
|
8
9
|
production: string;
|
|
9
10
|
};
|
|
10
11
|
export declare const ISSUE_API: {
|
|
11
12
|
development: string;
|
|
12
13
|
sandbox: string;
|
|
14
|
+
staging: string;
|
|
13
15
|
production: string;
|
|
14
16
|
};
|
|
15
17
|
export declare const PLATFORM_API = "https://platform.ants.tech";
|
|
@@ -20,18 +22,21 @@ export declare const APP_PERMISSION_DOMAIN: {
|
|
|
20
22
|
[x: string]: {
|
|
21
23
|
development: string;
|
|
22
24
|
sandbox: string;
|
|
25
|
+
staging: string;
|
|
23
26
|
production: string;
|
|
24
27
|
};
|
|
25
28
|
};
|
|
26
29
|
export declare const PERMISSION_ENV_API: {
|
|
27
30
|
development: string;
|
|
28
31
|
sandbox: string;
|
|
32
|
+
staging: string;
|
|
29
33
|
production: string;
|
|
30
34
|
};
|
|
31
35
|
export declare const APP_IAM_DOMAIN: {
|
|
32
36
|
[x: string]: {
|
|
33
37
|
development: string;
|
|
34
38
|
sandbox: string;
|
|
39
|
+
staging: string;
|
|
35
40
|
production: string;
|
|
36
41
|
};
|
|
37
42
|
};
|
package/es/constants/api.js
CHANGED
|
@@ -9,11 +9,13 @@ export const TINYMCE_API_KEY = 'scyw71pj8619analvxs56ppc2w2fj2kpy5vnmflhhc300y35
|
|
|
9
9
|
export const CDP_API = {
|
|
10
10
|
[ENV.DEV]: 'https://sandbox-app.cdp.asia',
|
|
11
11
|
[ENV.SANDBOX]: 'https://sandbox-app.cdp.asia',
|
|
12
|
+
[ENV.STAGING]: 'https://staging-cdp.antsomi.com',
|
|
12
13
|
[ENV.PROD]: 'https://cdp.antsomi.com',
|
|
13
14
|
};
|
|
14
15
|
export const ISSUE_API = {
|
|
15
16
|
[ENV.DEV]: 'https://sandbox-issue.antsomi.com',
|
|
16
17
|
[ENV.SANDBOX]: 'https://sandbox-issue.antsomi.com',
|
|
18
|
+
[ENV.STAGING]: 'https://issue.antsomi.com',
|
|
17
19
|
[ENV.PROD]: 'https://issue.antsomi.com',
|
|
18
20
|
};
|
|
19
21
|
export const PLATFORM_API = 'https://platform.ants.tech';
|
|
@@ -23,6 +25,7 @@ export const IAM_API = 'https://iam.ants.tech';
|
|
|
23
25
|
const PERMISSION_URLS = {
|
|
24
26
|
[ENV.DEV]: 'https://sandbox-permission.ants.vn',
|
|
25
27
|
[ENV.SANDBOX]: 'https://sandbox-permission.ants.vn',
|
|
28
|
+
[ENV.STAGING]: 'https://permission.antsomi.com',
|
|
26
29
|
[ENV.PROD]: 'https://permission.antsomi.com',
|
|
27
30
|
};
|
|
28
31
|
export const APP_PERMISSION_DOMAIN = {
|
|
@@ -34,11 +37,13 @@ export const APP_IAM_DOMAIN = {
|
|
|
34
37
|
[DATAFLOWS]: {
|
|
35
38
|
[ENV.DEV]: 'https://sandbox-aacm.ants.vn',
|
|
36
39
|
[ENV.SANDBOX]: 'https://sandbox-aacm.ants.vn',
|
|
40
|
+
[ENV.STAGING]: 'https://iam.ants.tech',
|
|
37
41
|
[ENV.PROD]: 'https://iam.ants.tech',
|
|
38
42
|
},
|
|
39
43
|
[APP_ANTALYSER]: {
|
|
40
44
|
[ENV.DEV]: 'https://sandbox-aacm.ants.vn',
|
|
41
45
|
[ENV.SANDBOX]: 'https://sandbox-aacm.ants.vn',
|
|
46
|
+
[ENV.STAGING]: 'https://iam.ants.tech',
|
|
42
47
|
[ENV.PROD]: 'https://iam.ants.tech',
|
|
43
48
|
},
|
|
44
49
|
};
|