@@ -307,7 +308,8 @@ export default {
axios
.post('/api/booking/' + this.$route.params.id + '/confirm-po')
.then((response) => {
- console.log(response)
+ console.log(12);
+ console.log(response);
this.$message({
showClose: true,
message: 'Your PO has been uploaded. We are processing the Invoice.',
@@ -321,7 +323,7 @@ export default {
}).catch((error) => {
this.$message({
showClose: true,
- message: 'Please upload purchase order',
+ message: "Please upload your purchase order",
type: 'error',
duration: 30000
})
diff --git a/resources/assets/js/pages/booking/uploadUserBankSlip.vue b/resources/assets/js/pages/booking/uploadUserBankSlip.vue
index 593af081..5036dd1c 100644
--- a/resources/assets/js/pages/booking/uploadUserBankSlip.vue
+++ b/resources/assets/js/pages/booking/uploadUserBankSlip.vue
@@ -168,7 +168,6 @@ export default {
}
this.start = true
- loading.close()
if (this.booking.timeout < 0){
this.$message({
@@ -182,15 +181,49 @@ export default {
})
}
}).catch((error) => {
- console.log(error)
- loading.close()
- this.$router.push({
- name: 'notfound'
+ this.$router.push({
+ name: 'notfound'
+ })
+ console.log(error)
})
- })
- },
- beforeMount(){
- this.updateBankDetail();
+
+ axios.get('/api/active-bank')
+ .then((response) => {
+ this.active_bank_setting = response.data;
+ console.log(this.active_bank_setting.x1_bank_id);
+ 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 data fail',
+ type: 'error',
+ duration: 10000
+ });
+ });
},
methods: {
handleCoutdownend () {
@@ -255,46 +288,6 @@ export default {
},
startTimer () {
this.start = true;
- },
- updateBankDetail(){
- axios.get('/api/active-bank')
- .then((response) => {
- this.active_bank_setting = response.data;
- console.log(this.active_bank_setting.x1_bank_id);
- this.getBankDetailWithTerm();
- })
- .catch((error) => {
- console.log(error);
- this.$message({
- showClose: true,
- message: 'Fetch data fail',
- type: 'error',
- duration: 10000
- });
- });
- },
- getBankDetailWithTerm(){
- 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;
- })
- .catch((error) => {
- console.log(error);
- this.$message({
- showClose: true,
- message: 'Fetch data fail',
- type: 'error',
- duration: 10000
- });
- });
}
}
}