From 53036342ff8bb4aba78253ae67af1a3e22c06789 Mon Sep 17 00:00:00 2001 From: Diki Ardian Wirasandi <ardiandiki369@gmail.com> Date: Wed, 25 Apr 2018 17:07:07 +0700 Subject: [PATCH] add download button for hasil kompetensi --- .../assets/js/components/ProfilPegawai.vue | 14 +++++++---- .../js/components/ProfilPegawaiSpecific.vue | 24 +++++++++++++------ 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/resources/assets/js/components/ProfilPegawai.vue b/resources/assets/js/components/ProfilPegawai.vue index a8c3153..06778a4 100644 --- a/resources/assets/js/components/ProfilPegawai.vue +++ b/resources/assets/js/components/ProfilPegawai.vue @@ -693,13 +693,15 @@ Hasil Kompetensi <!-- <button class="btn btn-primary float-sm-right" v-on:click="editDataKompetensi" v-bind:disabled="disableEdit"> Edit <i class="fas fa-edit"></i> - --> </button> + </button> --> </div> <div class="card-body"> <div class="container"> - Belum ditambahkan. + <button class="btn btn-primary float-sm-left" v-on:click="downloadKompetensi" v-bind:disabled="disableEdit"> + Download <i class="fas fa-download"></i> + </button> </div> </div> @@ -710,9 +712,9 @@ <div class="card" id="rekomendasi"> <div class="card-header"> Rekomendasi - <!-- <button class="btn btn-primary float-sm-right" v-on:click="editRekomendasi" v-bind:disabled="disableEdit"> + <!-- <button class="btn btn-primary float-sm-right" v-on:click="editRekomendasi" v-bind:disabled="disableEdit"> Edit <i class="fas fa-edit"></i> - --> </button> + </button> --> </div> <div class="card-body"> @@ -986,6 +988,10 @@ }, methods: { + downloadKompetensi() { + window.open('/api/kompetensi/report/' + this.id); + }, + showAllDataKinerja() { this.isShowAllDataKinerja = true; this.dataKinerjaShow = this.dataKinerja; diff --git a/resources/assets/js/components/ProfilPegawaiSpecific.vue b/resources/assets/js/components/ProfilPegawaiSpecific.vue index 08dc74a..2369fb4 100644 --- a/resources/assets/js/components/ProfilPegawaiSpecific.vue +++ b/resources/assets/js/components/ProfilPegawaiSpecific.vue @@ -690,7 +690,7 @@ <div class="card" id="data-kompetensi"> <div class="card-header"> - Hasil Kompetensi<button class="btn btn-primary float-sm-right" v-on:click="editDataKompetensi" v-bind:disabled="disableEdit"> + Hasil Kompetensi<button class="btn btn-primary float-sm-right" v-on:click="editKommpetensi" v-bind:disabled="disableEdit"> Edit <i class="fas fa-edit"></i> </button> </div> @@ -698,7 +698,9 @@ <div class="card-body"> <div class="container"> - Belum ditambahkan. + <button class="btn btn-primary float-sm-left" v-on:click="downloadKompetensi" v-bind:disabled="disableEdit"> + Download <i class="fas fa-download"></i> + </button> </div> </div> @@ -847,7 +849,7 @@ <script> export default { - props: ['id', 'unit-kerja', 'posisi', 'kelompok-kompetensi', 'data-kinerja-temp', 'rekomendasi-training-temp', 'training-list', 'rekomendasi-posisi-temp'], + props: ['id-pmo','id', 'unit-kerja', 'posisi', 'kelompok-kompetensi', 'data-kinerja-temp', 'rekomendasi-training-temp', 'training-list', 'rekomendasi-posisi-temp'], data() { return { @@ -984,6 +986,14 @@ }, methods: { + downloadKompetensi() { + window.open('/api/kompetensi/report/' + this.id); + }, + + editKommpetensi() { + window.open('/pages/pmo?nip=' + this.pegawai.nopeg + '&tab=dataKompetensi'); + }, + showAllDataKinerja() { this.isShowAllDataKinerja = true; this.dataKinerjaShow = this.dataKinerja; @@ -1257,7 +1267,7 @@ }) .then(function (response) { console.log(response); - window.location.href = '/pages/profile'; + window.location.href = '/pages/profile/' + this.id; }) .catch(function (error) { alert(error); @@ -1282,7 +1292,7 @@ }) .then(function (response) { console.log(response); - window.location.href = "/pages/profile"; + window.location.href = "/pages/profile/" + this.id; }) .catch(function (error) { alert(error); @@ -1325,7 +1335,7 @@ }) .then(function (response) { console.log(response); - window.location.href = "/pages/profile"; + window.location.href = "/pages/profile/" + this.id; }) .catch(function (error) { alert(error); @@ -1344,7 +1354,7 @@ }) .then(function (response) { console.log(response); - window.location.href = "/pages/profile"; + window.location.href = "/pages/profile/" + this.id; }) .catch(function (error) { alert(error); -- GitLab