diff --git a/resources/js/WTD/Rekod.vue b/resources/js/WTD/Rekod.vue
index 91ddb7c..f1d6bdd 100644
--- a/resources/js/WTD/Rekod.vue
+++ b/resources/js/WTD/Rekod.vue
@@ -21,7 +21,7 @@
-
+
@@ -13,7 +13,8 @@
JUMLAH = RM {{ formattext(this.totalbaki) }}
-
+
+
Batchno: {{ this.batchno }}
@@ -101,10 +102,100 @@ export default {
})
},
methods: {
- proseswtd: function () {
+ async promptdeletewtd() {
+ await this.$swal({
+ title: 'Padam daripada block WTD?',
+ text: "anda tidak boleh ulang kembali setelah di padam!",
+ icon: 'warning',
+ showCancelButton: true,
+ confirmButtonColor: '#3085d6',
+ cancelButtonColor: '#d33',
+ confirmButtonText: 'Ya',
+ allowOutsideClick: false,
+ }).then((result) => {
+
+ if (result.isConfirmed) {
+ this.deletewtd();
+ }
+ });
+ },
+ async promptwtd() {
+ let boolkatalaluan = 0;
+ const {
+ value: katalaluan
+ } = await this.$swal({
+ title: 'Masukkan Katalaluan Semula',
+ input: 'password',
+ inputPlaceholder: 'Katalaluan',
+ confirmButtonText: 'Hantar',
+ showCancelButton: true,
+ cancelButtonText: 'Batal',
+ allowOutsideClick: false
+ })
+
+ await this.axios.get('/mintasemulakelulusan', {
+ params: {
+ passsemula: katalaluan
+ }
+ }).then(response => {
+ if (response.data === 0) {
+ boolkatalaluan = 0;
+ } else {
+ boolkatalaluan = 1;
+ }
+ });
+
+ if (boolkatalaluan == 1) {
+ await this.$swal({
+ title: 'Proses WTD?',
+ text: "anda tidak boleh ulang kembali setelah di proses!",
+ icon: 'warning',
+ showCancelButton: true,
+ confirmButtonColor: '#3085d6',
+ cancelButtonColor: '#d33',
+ confirmButtonText: 'Ya',
+ allowOutsideClick: false,
+ }).then((result) => {
+
+ if (result.isConfirmed) {
+
+ this.$swal({
+ title: "Masukkan No Cek:",
+ // text: "Write something interesting:",
+ input: 'text',
+ showCancelButton: true
+ }).then((result) => {
+ if (result.value) {
+ this.proseswtd(result.value);
+ }
+ });
+ }
+ });
+ } else {
+ this.$swal('Kata laluan salah', '', 'error')
+ }
+
+ },
+ deletewtd: function () {
+ this.axios.post(this.$hostname + '/admin/wtd/delete', {
+ kodcaw: this.$kodcaw,
+ batchno: this.batchno
+ }).then(response => {
+
+ if (response.data == 1) {
+ this.$swal(
+ 'Berjaya!',
+ 'Berjaya Padam WTD!',
+ 'success'
+ )
+ }
+ });
+ },
+ proseswtd: function (nocek) {
this.axios.post(this.$hostname + '/admin/wtd/process', {
kodcaw: this.$kodcaw,
- batch: this.batchno
+ batch: this.batchno,
+ nocek: nocek
}).then(response => {
if (response.data == 'success') {
diff --git a/resources/js/WTD/SenaraiBakiLelong.vue b/resources/js/WTD/SenaraiBakiLelong.vue
index 3c5a36e..84db319 100644
--- a/resources/js/WTD/SenaraiBakiLelong.vue
+++ b/resources/js/WTD/SenaraiBakiLelong.vue
@@ -7,7 +7,7 @@
JUMLAH = RM {{ this.totalbaki }}
-
+
Batchno: {{ this.batchno }}
@@ -98,7 +98,7 @@ export default {
},
props: ['bakilelong', 'bulanmula', 'bulanhingga'],
methods: {
- formattext: function (value) {
+ formattext: function (value) {
return formatter.format(value);
},
async associate() {
@@ -146,9 +146,8 @@ export default {
},
async blockwtd() {
- if(this.blockseterusnya === true)
- {
- this.$swal({
+ if (this.blockseterusnya === true) {
+ this.$swal({
icon: 'warning',
title: 'Amaran',
text: 'Surat sudah Di Block!',
@@ -199,7 +198,7 @@ export default {
if (this.selectedNorujukan.length > 0) {
await this.$swal({
icon: 'info',
- title: 'Cetak WTD',
+ title: 'Block WTD',
html: "Sila tekan Ya untuk block SAG, Sila tekan Tidak untuk membatal urusan!",
// html:"",
showCloseButton: true,
@@ -215,7 +214,7 @@ export default {
if (result.isConfirmed) {
this.blockwtd();
this.blockseterusnya = true;
- }
+ }
})
} else {
@@ -226,6 +225,63 @@ export default {
)
}
+ },
+ async promptwtd() {
+ let boolkatalaluan = 0;
+ const {
+ value: katalaluan
+ } = await this.$swal({
+ title: 'Masukkan Katalaluan Semula',
+ input: 'password',
+ inputPlaceholder: 'Katalaluan',
+ confirmButtonText: 'Hantar',
+ showCancelButton: true,
+ cancelButtonText: 'Batal',
+ allowOutsideClick: false
+ })
+
+ await this.axios.get('/mintasemulakelulusan', {
+ params: {
+ passsemula: katalaluan
+ }
+ }).then(response => {
+ if (response.data === 0) {
+ boolkatalaluan = 0;
+ } else {
+ boolkatalaluan = 1;
+ }
+ });
+
+ if (boolkatalaluan == 1) {
+ await this.$swal({
+ title: 'Proses WTD?',
+ text: "anda tidak boleh ulang kembali setelah di proses!",
+ icon: 'warning',
+ showCancelButton: true,
+ confirmButtonColor: '#3085d6',
+ cancelButtonColor: '#d33',
+ confirmButtonText: 'Ya',
+ allowOutsideClick: false,
+ }).then((result) => {
+
+ if (result.isConfirmed) {
+
+ this.$swal({
+ title: "Masukkan No Cek:",
+ // text: "Write something interesting:",
+ input: 'text',
+ showCancelButton: true
+ }).then((result) => {
+ if (result.value) {
+ this.proseswtd(result.value);
+ }
+ });
+ }
+ });
+ } else {
+ this.$swal('Kata laluan salah', '', 'error')
+ }
+
},
proseswtd: function () {
let cawangan = this.$kodcaw;
@@ -277,7 +333,7 @@ export default {
},
extensionbulan: function (bulan) {
var stringexplode = bulan.split("-");
-
+
switch (stringexplode[0]) {
case '01':
bulan = "Januari";
diff --git a/resources/js/app.js b/resources/js/app.js
index c58a9a2..b89c723 100644
--- a/resources/js/app.js
+++ b/resources/js/app.js
@@ -126,18 +126,18 @@ Vue.use(require('vue-pusher'), {
}
});
-Vue.prototype.$api1 = 'http://api.arrahn'
+Vue.prototype.$api1 = 'http://localhost:8000/'
Vue.prototype.$username = document.querySelector("meta[name='user_name']").getAttribute('content');
Vue.prototype.$userroles = document.querySelector("meta[name='user_roles']").getAttribute('content');
let initial = 'KB2';
-let initialhostname = 'http://api.arrahn';
+let initialhostname = 'http://localhost:8000/';
const store = new Vuex.Store({
state: {
$kodcaw: 'KB2',
- $hostname: 'http://api.arrahn'
+ $hostname: 'http://localhost:8000/'
},
plugins: [createPersistedState()],
mutations: {
diff --git a/resources/js/components/Analisa/Tahunan.vue b/resources/js/components/Analisa/Tahunan.vue
index b3ed4c0..aab3538 100644
--- a/resources/js/components/Analisa/Tahunan.vue
+++ b/resources/js/components/Analisa/Tahunan.vue
@@ -82,6 +82,7 @@ export default {
this.getDataPembiayaan()
this.getDataPenebusan()
this.getDataKeuntungan()
+ console.log('tahunan' + this.$hostname);
},
methods: {
getDataPembiayaan() {
diff --git a/resources/js/components/Cawangan.vue b/resources/js/components/Cawangan.vue
index bd55359..5511518 100644
--- a/resources/js/components/Cawangan.vue
+++ b/resources/js/components/Cawangan.vue
@@ -84,7 +84,7 @@
case 'JLI':
case 'ARP':
case '020303':{
- this.sethostname('http://api.arrahn')
+ this.sethostname('http://localhost:8000')
break;
}
case '010621':
@@ -114,7 +114,7 @@
this.sethostname('http://api3.arrahn')
break;
}
- default: this.sethostname('http://api.arrahn')
+ default: this.sethostname('http://localhost:8000')
break;
}
}