Refactor role switcher: single item with arrows on right
All checks were successful
Build Docker Image / build (push) Successful in 4m44s
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:
@@ -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'
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user