Refactor role switcher: single item with arrows on right
All checks were successful
Build Docker Image / build (push) Successful in 4m44s

- Remove separate "Кабинет" link and two role buttons
- Add single role switcher: "Я клиент <>" format
- Arrows <> shown only when user has both roles
- Click text → navigate to cabinet, click arrows → switch role
This commit is contained in:
Ruslan Bakiev
2026-01-29 15:44:52 +07:00
parent 3d5215d967
commit 72f2e1c39d
2 changed files with 31 additions and 36 deletions

View File

@@ -17,8 +17,7 @@
:theme="theme"
:user-data="userData"
:is-seller="isSeller"
:has-buyer-team="hasBuyerTeam"
:has-seller-team="hasSellerTeam"
:has-multiple-roles="hasMultipleRoles"
:current-role="currentRole"
:active-tokens="activeTokens"
:available-chips="availableChips"
@@ -153,6 +152,7 @@ const sellerTeam = computed(() =>
)
const hasBuyerTeam = computed(() => !!buyerTeam.value)
const hasSellerTeam = computed(() => !!sellerTeam.value)
const hasMultipleRoles = computed(() => hasBuyerTeam.value && hasSellerTeam.value)
const currentRole = computed(() =>
userData.value?.activeTeam?.teamType || 'BUYER'
)