implemented routing from users table to profile page
This commit is contained in:
@@ -12,6 +12,11 @@ export default {
|
||||
setup(props) {
|
||||
console.log(props.link);
|
||||
},
|
||||
computed: {
|
||||
currentRouteName() {
|
||||
return this.$route.name;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -10,22 +10,22 @@ export default createRouter({
|
||||
component: () => import('./views/home.vue'),
|
||||
},
|
||||
{
|
||||
path: '/profile',
|
||||
path: '/profile/:name',
|
||||
name: 'profile',
|
||||
component: () => import('./components/ProfilePage/profile.vue'),
|
||||
children: [
|
||||
{
|
||||
path: '/home',
|
||||
path: 'home',
|
||||
name: 'personnel',
|
||||
component: () => import('./components/ProfilePage/personnel.vue')
|
||||
},
|
||||
{
|
||||
path: '/activityHistory',
|
||||
path: 'activityHistory',
|
||||
name: 'activityHistory',
|
||||
component: () => import('./components/ProfilePage/activityHistory.vue')
|
||||
},
|
||||
{
|
||||
path: '/shadowbox',
|
||||
path: 'shadowbox',
|
||||
name: 'shadowbox',
|
||||
component: () => import('./components/ProfilePage/shadowbox.vue')
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ export default {
|
||||
newTable = newTable.filter(this.filterByUnit);
|
||||
newTable = newTable.filter(this.filterByName);
|
||||
return newTable;
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,7 +154,8 @@ export default {
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tableBody">
|
||||
<tr v-for="(item, index) in filteredTable">
|
||||
<tr v-for="(item, index) in filteredTable"
|
||||
v-on:click="$router.push({ path: `/profile/${item.member_name}/home` })">
|
||||
<td>{{ item.member_name }}</td>
|
||||
<td>{{ item.status }}</td>
|
||||
<td>{{ item.rank }}</td>
|
||||
|
||||
Reference in New Issue
Block a user