Skip to content

Commit e4ce931

Browse files
committed
feat(frontend): add navigation to user and team detail pages
1 parent 5769156 commit e4ce931

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

services/frontend/src/components/admin/teams/TeamDetailMembers.vue

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<script setup lang="ts">
22
import { ref, onMounted } from 'vue'
3+
import { useRouter } from 'vue-router'
34
import { useI18n } from 'vue-i18n'
45
import { Badge } from '@/components/ui/badge'
56
import { DsCard } from '@/components/ui/ds-card'
@@ -29,6 +30,7 @@ const props = defineProps<{
2930
}>()
3031
3132
const { t } = useI18n()
33+
const router = useRouter()
3234
const apiUrl = getEnv('VITE_DEPLOYSTACK_BACKEND_URL') || ''
3335
3436
const members = ref<TeamMember[]>([])
@@ -66,6 +68,11 @@ const formatDate = (dateString: string) => {
6668
return new Date(dateString).toLocaleDateString()
6769
}
6870
71+
// Navigate to user detail page
72+
const handleMemberClick = (userId: string) => {
73+
router.push(`/admin/users/${userId}`)
74+
}
75+
6976
onMounted(async () => {
7077
try {
7178
isLoading.value = true
@@ -107,7 +114,8 @@ onMounted(async () => {
107114
<li
108115
v-for="member in members"
109116
:key="member.id"
110-
class="flex items-center justify-between py-4 pr-5 pl-4 text-sm"
117+
@click="handleMemberClick(member.user_id)"
118+
class="flex items-center justify-between py-4 pr-5 pl-4 text-sm cursor-pointer hover:bg-gray-50 transition-colors"
111119
>
112120
<div class="flex w-0 flex-1 items-center">
113121
<Users class="size-5 shrink-0 text-gray-400" aria-hidden="true" />

services/frontend/src/components/admin/users/UserDetailTeams.vue

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<script setup lang="ts">
22
import { ref, onMounted } from 'vue'
3+
import { useRouter } from 'vue-router'
34
import { Badge } from '@/components/ui/badge'
45
import { DsCard } from '@/components/ui/ds-card'
56
import { Users, Crown, UserCheck } from 'lucide-vue-next'
@@ -26,6 +27,7 @@ const props = defineProps<{
2627
userId: string
2728
}>()
2829
30+
const router = useRouter()
2931
const apiUrl = getEnv('VITE_DEPLOYSTACK_BACKEND_URL') || ''
3032
3133
const teams = ref<Team[]>([])
@@ -50,6 +52,11 @@ async function fetchUserTeams(id: string): Promise<TeamsResponse> {
5052
return await response.json()
5153
}
5254
55+
// Navigate to team detail page
56+
const handleTeamClick = (teamId: string) => {
57+
router.push(`/admin/teams/${teamId}`)
58+
}
59+
5360
onMounted(async () => {
5461
try {
5562
isLoading.value = true
@@ -91,7 +98,8 @@ onMounted(async () => {
9198
<li
9299
v-for="team in teams"
93100
:key="team.id"
94-
class="flex items-center justify-between py-4 pr-5 pl-4 text-sm"
101+
@click="handleTeamClick(team.id)"
102+
class="flex items-center justify-between py-4 pr-5 pl-4 text-sm cursor-pointer hover:bg-gray-50 transition-colors"
95103
>
96104
<div class="flex w-0 flex-1 items-center">
97105
<Users class="size-5 shrink-0 text-gray-400" aria-hidden="true" />

0 commit comments

Comments
 (0)