diff --git a/owner-vue/src/views/Layout/DashboardLayout.vue b/owner-vue/src/views/Layout/DashboardLayout.vue
index d862227..b9c81f8 100644
--- a/owner-vue/src/views/Layout/DashboardLayout.vue
+++ b/owner-vue/src/views/Layout/DashboardLayout.vue
@@ -1,13 +1,16 @@
-
+
+ :notificationCounts="notificationCounts"
+ :userInfo="userInfo"
+ />
@@ -18,6 +21,7 @@
import Sidebar from './Sidebar.vue'
import Topbar from "./Topbar.vue";
import notificationApi from "@/api/notification";
+import userApi from "@/api/user";
export default {
name: "DashboardLayout",
@@ -25,20 +29,27 @@ export default {
'side-bar': Sidebar,
'top-bar': Topbar
},
- mounted() {
- this.searchNotificationCounts();
+ async mounted() {
+ await this.searchNotificationCounts();
+ // 사용자 정보 가져오기
+ this.userInfo = await this.getUserInfo();
},
data: function() {
return {
drawer: true,
- notificationCounts: 0
+ notificationCounts: 0,
+ userInfo: {},
}
},
methods: {
searchNotificationCounts: async function() {
const response = await notificationApi.countsNotification();
this.notificationCounts = response.data.data;
- }
+ },
+ getUserInfo: async function() {
+ const response = await userApi.requestUserInfo();
+ return response.data.data;
+ },
}
}
diff --git a/owner-vue/src/views/Layout/Topbar.vue b/owner-vue/src/views/Layout/Topbar.vue
index e258372..795df99 100644
--- a/owner-vue/src/views/Layout/Topbar.vue
+++ b/owner-vue/src/views/Layout/Topbar.vue
@@ -33,7 +33,7 @@
mdi-account-circle
- {{ userName }}
+ {{ userInfo.name }}
@@ -44,7 +44,7 @@
- {{ userName }}
+ {{ userInfo.name }}
Logged In
@@ -63,27 +63,13 @@