Update RoleSwitcher.vue to reflect role terminology changes
- Changed user role type from 'individual' to 'private' to align with project terminology.
This commit is contained in:
@@ -12,7 +12,7 @@ import {
|
|||||||
import { Button } from '@/components/ui/button'
|
import { Button } from '@/components/ui/button'
|
||||||
|
|
||||||
// User role types matching our database schema
|
// User role types matching our database schema
|
||||||
type UserRole = 'individual' | 'educator' | 'company'
|
type UserRole = 'private' | 'educator' | 'company'
|
||||||
|
|
||||||
interface RoleOption {
|
interface RoleOption {
|
||||||
value: UserRole
|
value: UserRole
|
||||||
@@ -26,7 +26,7 @@ interface RoleOption {
|
|||||||
|
|
||||||
const roles: RoleOption[] = [
|
const roles: RoleOption[] = [
|
||||||
{
|
{
|
||||||
value: 'individual',
|
value: 'private',
|
||||||
label: 'Privatperson',
|
label: 'Privatperson',
|
||||||
description: 'Private Nutzung',
|
description: 'Private Nutzung',
|
||||||
icon: User,
|
icon: User,
|
||||||
@@ -54,7 +54,7 @@ const roles: RoleOption[] = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
// Current role - will come from user session later
|
// Current role - will come from user session later
|
||||||
const currentRole = ref<UserRole>('individual')
|
const currentRole = ref<UserRole>('private')
|
||||||
|
|
||||||
const currentRoleData = computed(() => {
|
const currentRoleData = computed(() => {
|
||||||
return roles.find((r) => r.value === currentRole.value) || roles[0]
|
return roles.find((r) => r.value === currentRole.value) || roles[0]
|
||||||
@@ -100,7 +100,8 @@ function switchRole(role: UserRole) {
|
|||||||
|
|
||||||
<div class="flex-1 flex flex-col gap-1">
|
<div class="flex-1 flex flex-col gap-1">
|
||||||
<span class="text-sm font-semibold">{{ role.label }}</span>
|
<span class="text-sm font-semibold">{{ role.label }}</span>
|
||||||
<span class="text-sm text-muted-foreground group-hover:text-foreground group-data-[highlighted]:text-accent-foreground transition-colors">{{
|
<span
|
||||||
|
class="text-sm text-muted-foreground group-hover:text-foreground group-data-[highlighted]:text-accent-foreground transition-colors">{{
|
||||||
role.description }}</span>
|
role.description }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user