diff --git a/resources/assets/js/pages/booking/uploadUserBankSlip.vue b/resources/assets/js/pages/booking/uploadUserBankSlip.vue index 9323e09a..517dbd7a 100644 --- a/resources/assets/js/pages/booking/uploadUserBankSlip.vue +++ b/resources/assets/js/pages/booking/uploadUserBankSlip.vue @@ -64,7 +64,7 @@
- Submit + Submit Upload Later @@ -103,6 +103,7 @@ return { status: 2, start: false, + loading: false, dialogImageUrl: '', dialogVisible: false, booking_id: this.$route.params.id, @@ -157,6 +158,7 @@ this.dialogVisible = true }, submitUserSlip(formName) { + this.loading = true this.$refs[formName].validate((valid) => { if (valid) { let newConfirmation = { @@ -165,6 +167,7 @@ } } else{ + this.loading = false return } }); @@ -173,12 +176,14 @@ } axios.patch('/api/booking/'+ this.booking_id +'/bankslip-amount', newUserSlip) .then((response) => { + this.$message({ showClose: true, message: 'Your bankinslip has been submitted, please wait admin to approve.', type: 'success', duration: 5000, }); + console.log(response) this.$router.push({ name: 'home' @@ -186,6 +191,7 @@ }) .catch((error) => { + this.loading = false this.$message({ showClose: true, message: 'Please upload your bankin slip first.',