diff --git a/resources/js/Logout.vue b/resources/js/Logout.vue index feccd10..27fd819 100644 --- a/resources/js/Logout.vue +++ b/resources/js/Logout.vue @@ -2,7 +2,7 @@
- +
@@ -521,7 +526,7 @@ export default { refer2.$swal({ icon: 'success', title: 'Berjaya', - text: 'Berjaya mengemaskini maklumat pelanggan', + text: 'Berjaya mengemaskini', allowOutsideClick: false }).then(function () { refer.getSenaraiMohon(refer.currentPage); @@ -530,7 +535,7 @@ export default { refer2.$swal({ icon: 'warning', title: 'Tidak Berjaya', - text: 'Data pelanggan tidak berjaya dikemaskini', + text: 'tidak berjaya dikemaskini', allowOutsideClick: false }).then(function () { refer.getSenaraiMohon(refer.currentPage); @@ -548,7 +553,7 @@ export default { refer2.$swal({ icon: 'success', title: 'Berjaya', - text: 'Berjaya mengemaskini maklumat pelanggan', + text: 'Berjaya mengemaskini', allowOutsideClick: false }).then(function () { refer.getSenaraiMohon(refer.currentPage); @@ -557,7 +562,7 @@ export default { refer2.$swal({ icon: 'warning', title: 'Tidak Berjaya', - text: 'Data pelanggan tidak berjaya dikemaskini', + text: 'tidak berjaya dikemaskini', allowOutsideClick: false }).then(function () { refer.getSenaraiMohon(refer.currentPage); @@ -618,7 +623,7 @@ export default { this.$swal({ icon: 'success', title: 'Berjaya', - text: 'Berjaya mengemaskini maklumat pelanggan', + text: 'Berjaya mengemaskini', allowOutsideClick: false }).then(function () { refer.getSenaraiMohon(refer.currentPage); @@ -628,7 +633,7 @@ export default { this.$swal({ icon: 'warning', title: 'Tidak Berjaya', - text: 'Data pelanggan tidak berjaya dikemaskini', + text: 'tidak berjaya dikemaskini', allowOutsideClick: false }).then(function () { refer.getSenaraiMohon(refer.currentPage); @@ -646,7 +651,7 @@ export default { this.$swal({ icon: 'success', title: 'Berjaya', - text: 'Berjaya mengemaskini maklumat pelanggan', + text: 'Berjaya mengemaskini', allowOutsideClick: false }).then(function () { refer.getSenaraiMohon(refer.currentPage); @@ -656,7 +661,7 @@ export default { this.$swal({ icon: 'warning', title: 'Tidak Berjaya', - text: 'Data pelanggan tidak berjaya dikemaskini', + text: 'tidak berjaya dikemaskini', allowOutsideClick: false }).then(function () { refer.getSenaraiMohon(refer.currentPage); @@ -682,33 +687,38 @@ export default { }, CetakanPB: function (caw, mid) { let refer = this; - this.axios.put(this.$hostname + '/admin/permohonan/updatecetak', { - mohonid: mid, - namaprint: this.username - }).then(response => { - if (response.data === 1) { - this.$swal({ - icon: 'success', - title: 'Berjaya', - text: 'Cetakan Berjaya Dijana!', - allowOutsideClick: false - }).then(function () { - refer.getSenaraiMohon(refer.currentPage); - }); - } else { - this.$swal({ - icon: 'warning', - title: 'Tidak Berjaya', - text: 'Cetakan Tidak Berjaya!', - allowOutsideClick: false - }).then(function () { - refer.getSenaraiMohon(refer.currentPage); - }); + this.axios.get(this.$hostname + '/admin/permohonan/get/' + caw + '/' + mid).then(response => { + console.log(response.data.tagprint); + if (response.data.tagprint !== 1) { + this.axios.put(this.$hostname + '/admin/permohonan/updatecetak', { + mohonid: mid, + namaprint: this.username + }).then(response => { + if (response.data === 1) { + this.$swal({ + icon: 'success', + title: 'Berjaya', + text: 'Cetakan Berjaya Dijana!', + allowOutsideClick: false + }).then(function () { + refer.getSenaraiMohon(refer.currentPage); + }); + } else { + this.$swal({ + icon: 'warning', + title: 'Tidak Berjaya', + text: 'Cetakan Tidak Berjaya!', + allowOutsideClick: false + }).then(function () { + refer.getSenaraiMohon(refer.currentPage); + }); + + } + }); } - }); - + }) let route = window.route('permohonan.cetakanpenuh', { _query: { cawangan: caw, @@ -716,6 +726,8 @@ export default { }, }); window.open(route, '_blank') + return; + }, KelulusanPB: function (mid, mohon) { this.$refs.modal.mohonid = mid; diff --git a/resources/js/Permohonan/StatusMohon.vue b/resources/js/Permohonan/StatusMohon.vue index 95fbf24..7e41e6f 100644 --- a/resources/js/Permohonan/StatusMohon.vue +++ b/resources/js/Permohonan/StatusMohon.vue @@ -1,9 +1,7 @@