diff --git a/src/components/header.vue b/src/components/header.vue index 7dd3258b9b61c23642529d78cefd3177ef720648..a5a4ff7858dbc5395a0002329e85812e56e8a41b 100644 --- a/src/components/header.vue +++ b/src/components/header.vue @@ -35,8 +35,8 @@ style="font-size: 65px" ></i> </button> - <Name :name="this.name"/> - <!-- <h2 class="text-red" style="text-align: right">Hello, {{username}}</h2> --> + <!-- <Name :name="this.name"/> --> + <h2 class="text-red" style="text-align: right">Hello, {{name}}</h2> </div> </div> </div> @@ -61,16 +61,16 @@ <script> import Modal from "../components/modal"; -import Name from "../components/name"; +//import Name from "../components/name"; import { HTTP } from '../http-common' export default { name: "Header", components: { - Modal, - Name + Modal + // Name }, - props:{ username: String }, + // props:{ username: String }, data() { return { nav_active: true, diff --git a/src/views/ProfilUser.vue b/src/views/ProfilUser.vue index 01b1fbd93ad774cc461da6c8a5a818419b609eec..660935627d2ec3e00fd817c07b03dad9b68a8fd3 100644 --- a/src/views/ProfilUser.vue +++ b/src/views/ProfilUser.vue @@ -14,31 +14,31 @@ <tbody> <tr> <td class="py-3 text-blue-bold">Nama</td> - <td class="py-3">asoygeboy</td> + <td class="py-3">{{name}}</td> <td class="py-3 text-blue-bold">Username</td> - <td class="py-3">asoygeboy</td> + <td class="py-3">{{username}}</td> </tr> <tr> <td class="py-3 text-blue-bold">NIK</td> - <td class="py-3">123456789</td> + <td class="py-3">{{nik}}</td> <td class="py-3 text-blue-bold">Email</td> - <td class="py-3">asoy@gmail.com</td> + <td class="py-3">{{email}}</td> </tr> <tr> <td class="py-3 text-blue-bold">Departemen</td> - <td class="py-3">Keagamaan dan Sosial</td> + <td class="py-3">{{departemen}}</td> <td class="py-3"></td> <td class="py-3"></td> </tr> <tr> <td class="py-3 text-blue-bold">Jabatan</td> - <td class="py-3">Associate Manager</td> + <td class="py-3">{{jabatan}}</td> <td class="py-3"></td> <td class="py-3"></td> </tr> <tr> <td class="py-3 text-blue-bold">Atasan</td> - <td class="py-3">Adrian Bayu</td> + <td class="py-3">{{atasan_name}}</td> <td class="py-3"></td> <td class="py-3"></td> </tr> @@ -66,7 +66,14 @@ export default { return{ profile:[], name:"", - user_id:null + user_id:null, + nik:"", + departemen:"", + jabatan:"", + atasan:null, + atasan_name:null, + username:"", + email:"" }; }, @@ -74,11 +81,23 @@ export default { getProfile(){ HTTP.get("users/profile").then((res)=>{ if (res.data.success == true){ - console.log(res.data.data.profile) + //console.log(res.data.data.profile) this.profile = res.data.data.profile - this.name = res.data.data.profile.name - this.user_id = res.data.data.profile.user_id + this.name = this.profile.name + //this.name = res.data.data.profile.name + this.user_id = this.profile.user_id //console.log(this.name) + this.nik = this.profile.nik + this.departemen = this.profile.department + this.jabatan = this.profile.position + this.username = res.data.data.username + this.email = res.data.data.email + + this.atasan = this.profile.manager + console.log(this.atasan) + if (this.atasan == null){ + this.atasan_name = "-" + } }}) }, },