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