mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-19 04:14:04 +00:00
fixed bank details not showing bug
This commit is contained in:
@@ -264,46 +264,47 @@
|
||||
name: 'home'
|
||||
})
|
||||
}
|
||||
}).catch((error) => {
|
||||
}).then(() => {
|
||||
axios.get('/api/active-bank')
|
||||
.then((response) => {
|
||||
this.active_bank_setting = response.data;
|
||||
var url = '';
|
||||
if (this.booking.term === 'x1_cash' || this.booking.term === 'x1_cheque' || this.booking.term === 'x1_ba') {
|
||||
url = '/api/malaysia-bank/' + this.active_bank_setting.x1_bank_id;
|
||||
} else if (this.booking.term === 'x2_cash' || this.booking.term === 'x2_cheque' || this.booking.term === 'x2_ba') {
|
||||
url = '/api/malaysia-bank/' + this.active_bank_setting.x2_bank_id;
|
||||
}
|
||||
|
||||
axios.get(url)
|
||||
.then((response) => {
|
||||
this.bankDetail = response.data;
|
||||
loading.close()
|
||||
})
|
||||
.catch((error) => {
|
||||
loading.close()
|
||||
console.log(error);
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: 'Fetch data fail',
|
||||
type: 'error',
|
||||
duration: 10000
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error);
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: 'Fetch bank details fail',
|
||||
type: 'error',
|
||||
duration: 10000
|
||||
});
|
||||
});
|
||||
}).catch((error) => {
|
||||
this.$router.push({
|
||||
name: 'notfound'
|
||||
})
|
||||
console.log(error)
|
||||
})
|
||||
axios.get('/api/active-bank')
|
||||
.then((response) => {
|
||||
this.active_bank_setting = response.data;
|
||||
var url = '';
|
||||
if (this.booking.term === 'x1_cash' || this.booking.term === 'x1_cheque' || this.booking.term === 'x1_ba') {
|
||||
url = '/api/malaysia-bank/' + this.active_bank_setting.x1_bank_id;
|
||||
} else if (this.booking.term === 'x2_cash' || this.booking.term === 'x2_cheque' || this.booking.term === 'x2_ba') {
|
||||
url = '/api/malaysia-bank/' + this.active_bank_setting.x2_bank_id;
|
||||
}
|
||||
|
||||
axios.get(url)
|
||||
.then((response) => {
|
||||
this.bankDetail = response.data;
|
||||
loading.close()
|
||||
})
|
||||
.catch((error) => {
|
||||
loading.close()
|
||||
console.log(error);
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: 'Fetch data fail',
|
||||
type: 'error',
|
||||
duration: 10000
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error);
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: 'Fetch bank details fail',
|
||||
type: 'error',
|
||||
duration: 10000
|
||||
});
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
|
||||
Reference in New Issue
Block a user