Skip to content

Commit

Permalink
Revert "fix: 1.hide “My orders” and “company orders” in for junior bu…
Browse files Browse the repository at this point in the history
…yers in the buyer portal 2.email Field on Last Step of Registration allows the email address to break out of the box 1.https://bigc-b2b.atlassian.net/jira/software/c/projects/BUN/issues/BUN-1689 2.https://bigc-b2b.atlassian.net/browse/SUP-1345"

This reverts commit a6d3f05.
  • Loading branch information
BrianJiang2021 authored and libruce committed Dec 26, 2023
1 parent 068cfe9 commit 027616f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 28 deletions.
1 change: 0 additions & 1 deletion apps/storefront/src/pages/registered/RegisterComplete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,6 @@ export default function RegisterComplete(props: RegisterCompleteProps) {
color: '#000000',
marginBottom: '10px',
marginTop: '-12px',
wordWrap: 'break-word',
}}
>
{`Create password for ${enterEmail}`}
Expand Down
17 changes: 3 additions & 14 deletions apps/storefront/src/shared/routes/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const routes: RouteItem[] = [
wsKey: 'router-orders',
isMenuItem: true,
component: OrderList,
permissions: [0, 1, 3, 4, 99, 100],
permissions: [0, 1, 2, 3, 4, 99, 100],
isTokenLogin: true,
idLang: 'global.navMenu.orders',
},
Expand All @@ -108,7 +108,7 @@ const routes: RouteItem[] = [
wsKey: 'router-orders',
isMenuItem: true,
component: CompanyOrderList,
permissions: [0, 1, 3],
permissions: [0, 1, 2, 3],
isTokenLogin: true,
idLang: 'global.navMenu.companyOrders',
},
Expand Down Expand Up @@ -409,18 +409,7 @@ const gotoAllowedAppPage = async (
(!url && role !== 100 && pathname.includes('account.php')) ||
isAccountEnter
)
switch (role) {
case 2:
url = '/accountSettings'
break
case 3:
url = '/dashboard'
break
default:
url = '/orders'
break
}

url = role === 3 ? '/dashboard' : '/orders'
const flag = routes.some(
(item: RouteItem) =>
(matchPath(item.path, url) || url.includes('invoice?')) &&
Expand Down
15 changes: 2 additions & 13 deletions apps/storefront/src/utils/b3AccountItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,8 @@ const redirectBcMenus = (
isAgenting: boolean
): string => {
// Supermarket theme
if (key.includes('/account.php') && !key.includes('?')) {
switch (role) {
case 2:
return '/accountSettings'
case 3:
return '/dashboard'
default:
return '/orders'
}
if (key === '/account.php') {
return +role !== 3 ? '/orders' : '/dashboard'
}

// Vault theme
Expand All @@ -68,10 +61,6 @@ const redirectBcMenus = (
: '/dashboard'
}

if (+role === 2 && currentItem?.newTargetUrl.includes('order_status')) {
return '/accountSettings'
}

if (currentItem?.newTargetUrl) {
return currentItem.newTargetUrl
}
Expand Down

0 comments on commit 027616f

Please sign in to comment.