diff --git a/apps/storefront/src/pages/registered/RegisterComplete.tsx b/apps/storefront/src/pages/registered/RegisterComplete.tsx index 5f716682..5241cc4b 100644 --- a/apps/storefront/src/pages/registered/RegisterComplete.tsx +++ b/apps/storefront/src/pages/registered/RegisterComplete.tsx @@ -496,6 +496,7 @@ export default function RegisterComplete(props: RegisterCompleteProps) { color: '#000000', marginBottom: '10px', marginTop: '-12px', + wordWrap: 'break-word', }} > {`Create password for ${enterEmail}`} diff --git a/apps/storefront/src/shared/routes/routes.ts b/apps/storefront/src/shared/routes/routes.ts index 6b405518..61c03c55 100644 --- a/apps/storefront/src/shared/routes/routes.ts +++ b/apps/storefront/src/shared/routes/routes.ts @@ -98,7 +98,7 @@ const routes: RouteItem[] = [ wsKey: 'router-orders', isMenuItem: true, component: OrderList, - permissions: [0, 1, 2, 3, 4, 99, 100], + permissions: [0, 1, 3, 4, 99, 100], isTokenLogin: true, idLang: 'global.navMenu.orders', }, @@ -108,7 +108,7 @@ const routes: RouteItem[] = [ wsKey: 'router-orders', isMenuItem: true, component: CompanyOrderList, - permissions: [0, 1, 2, 3], + permissions: [0, 1, 3], isTokenLogin: true, idLang: 'global.navMenu.companyOrders', }, @@ -409,7 +409,18 @@ const gotoAllowedAppPage = async ( (!url && role !== 100 && pathname.includes('account.php')) || isAccountEnter ) - url = role === 3 ? '/dashboard' : '/orders' + switch (role) { + case 2: + url = '/accountSettings' + break + case 3: + url = '/dashboard' + break + default: + url = '/orders' + break + } + const flag = routes.some( (item: RouteItem) => (matchPath(item.path, url) || url.includes('invoice?')) && diff --git a/apps/storefront/src/utils/b3AccountItem.ts b/apps/storefront/src/utils/b3AccountItem.ts index a31c501d..a8023bee 100644 --- a/apps/storefront/src/utils/b3AccountItem.ts +++ b/apps/storefront/src/utils/b3AccountItem.ts @@ -44,8 +44,15 @@ const redirectBcMenus = ( isAgenting: boolean ): string => { // Supermarket theme - if (key === '/account.php') { - return +role !== 3 ? '/orders' : '/dashboard' + if (key.includes('/account.php') && !key.includes('?')) { + switch (role) { + case 2: + return '/accountSettings' + case 3: + return '/dashboard' + default: + return '/orders' + } } // Vault theme @@ -61,6 +68,10 @@ const redirectBcMenus = ( : '/dashboard' } + if (+role === 2 && currentItem?.newTargetUrl.includes('order_status')) { + return '/accountSettings' + } + if (currentItem?.newTargetUrl) { return currentItem.newTargetUrl }