Skip to content

Commit 45561f0

Browse files
author
Lasim
committed
refactor: remove old team management views and implement new team management structure
- Deleted obsolete Test.vue and TeamManage.vue files. - Introduced new index.vue for team management with enhanced table functionality. - Added new manage/[id].vue for detailed team management. - Implemented TeamsManageRedirect.vue for redirecting to the user's default team. - Updated routing and state management for team selection and permissions.
1 parent 03f92c9 commit 45561f0

File tree

6 files changed

+4
-15
lines changed

6 files changed

+4
-15
lines changed

services/frontend/src/components/AppSidebar.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ const handleTeamSelectedFromOtherComponents = (data: { teamId: string; teamName:
163163
const team = teams.value.find(t => t.id === data.teamId)
164164
if (team) {
165165
selectedTeam.value = team
166-
console.log('Team selected from other component:', data.teamName)
167166
}
168167
}
169168
@@ -173,7 +172,6 @@ onMounted(() => {
173172
174173
// Listen for team updates from other components
175174
eventBus.on('teams-updated', () => {
176-
console.log('Teams updated event received, refreshing teams...')
177175
fetchTeams(true) // Force refresh to get latest data
178176
})
179177

services/frontend/src/router/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,19 +92,19 @@ const routes = [
9292
{
9393
path: '/teams',
9494
name: 'Teams',
95-
component: () => import('../views/Teams.vue'),
95+
component: () => import('../views/teams/index.vue'),
9696
meta: { requiresSetup: true },
9797
},
9898
{
9999
path: '/teams/manage',
100100
name: 'TeamsManageDefault',
101-
component: () => import('../views/teams/TeamsManageRedirect.vue'),
101+
component: () => import('../views/teams/manage/index.vue'),
102102
meta: { requiresSetup: true },
103103
},
104104
{
105105
path: '/teams/manage/:id',
106106
name: 'TeamManage',
107-
component: () => import('../views/teams/TeamManage.vue'),
107+
component: () => import('../views/teams/manage/[id].vue'),
108108
meta: { requiresSetup: true },
109109
},
110110
{

services/frontend/src/views/Test.vue

Lines changed: 0 additions & 5 deletions
This file was deleted.

services/frontend/src/views/Teams.vue renamed to services/frontend/src/views/teams/index.vue

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import AddTeamModal from '@/components/teams/AddTeamModal.vue'
2828
import { TeamService, type TeamWithRole, type Team } from '@/services/teamService'
2929
import { UserService } from '@/services/userService'
3030
import { useEventBus } from '@/composables/useEventBus'
31-
import { createColumns } from './teams/columns'
31+
import { createColumns } from './columns'
3232
import { useRouter, useRoute } from 'vue-router'
3333
import { Alert, AlertDescription } from '@/components/ui/alert'
3434
import { CheckCircle } from 'lucide-vue-next'
@@ -66,7 +66,6 @@ const handleSwitchTeam = (teamId: string) => {
6666
selectedTeam.value = team
6767
// Emit global event for team selection to update sidebar
6868
eventBus.emit('team-selected', { teamId: team.id, teamName: team.name })
69-
console.log('Switched to team:', team.name)
7069
}
7170
}
7271
@@ -76,11 +75,9 @@ const handleTeamSelectedFromSidebar = (data: { teamId: string; teamName: string
7675
const team = teams.value.find(t => t.id === data.teamId)
7776
if (team) {
7877
selectedTeam.value = team
79-
console.log('Team selected from sidebar:', data.teamName)
8078
} else {
8179
// If team not found in current list, create a basic team object
8280
selectedTeam.value = { id: data.teamId, name: data.teamName } as Team
83-
console.log('Team selected from sidebar (not in current list):', data.teamName)
8481
}
8582
}
8683
@@ -172,7 +169,6 @@ onMounted(async () => {
172169
173170
// Listen for team updates from other components
174171
eventBus.on('teams-updated', () => {
175-
console.log('Teams updated event received, refreshing teams...')
176172
fetchTeams(true) // Force refresh to get latest data
177173
})
178174
})
File renamed without changes.

services/frontend/src/views/teams/TeamsManageRedirect.vue renamed to services/frontend/src/views/teams/manage/index.vue

File renamed without changes.

0 commit comments

Comments
 (0)