diff --git a/src/components/VNavigation.vue b/src/components/VNavigation.vue
index dab46ef..463ff5f 100644
--- a/src/components/VNavigation.vue
+++ b/src/components/VNavigation.vue
@@ -21,7 +21,7 @@ async function onLogout() {
Profile
diff --git a/src/router/index.ts b/src/router/index.ts
index 03ccce0..8144a3b 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -22,9 +22,9 @@ const routes: Array = [
}
},
{
- path: '/employees/me',
- name: 'Profile',
- component: () => import('@/views/Profile.vue'),
+ path: '/employees/:id',
+ name: 'EmployeesDetails',
+ component: () => import('@/views/EmployeesDetails.vue'),
meta: {
requiresAuth: true,
requiresAdmin: false
diff --git a/src/views/Profile.vue b/src/views/EmployeesDetails.vue
similarity index 97%
rename from src/views/Profile.vue
rename to src/views/EmployeesDetails.vue
index 211d04c..22c365e 100644
--- a/src/views/Profile.vue
+++ b/src/views/EmployeesDetails.vue
@@ -23,6 +23,7 @@ import { reactive, onMounted } from 'vue'
import { useUser } from '@/stores/user';
import axios from 'axios'
import { useNotifications } from '@/stores/notifications';
+import { useRoute } from 'vue-router';
const userStore = useUser()
const useNotification = useNotifications()
@@ -61,7 +62,9 @@ onMounted(async () => {
})
try {
- const data : ResultData = await (await ai.get('employees/me')).data
+ const id = useRoute().params.id
+
+ const data : ResultData = await (await ai.get('employees/'+id)).data
Object.assign(employee, data.employee)
Object.assign(user, data.user)