mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-21 21:34:16 +00:00
Error handling done for the whole process
This commit is contained in:
@@ -353,16 +353,16 @@
|
||||
console.log(error)
|
||||
|
||||
// TODO : Show error message
|
||||
this.$message({
|
||||
})
|
||||
|
||||
} else {
|
||||
this.loading_btn = false
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: 'Please fill the supplier form',
|
||||
type: 'error',
|
||||
duration: 10000
|
||||
})
|
||||
})
|
||||
|
||||
} else {
|
||||
this.loading_btn = false
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -358,23 +358,20 @@
|
||||
})
|
||||
})
|
||||
.catch((error) => {
|
||||
this.loading = false
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: 'Please upload your bankin slip first.',
|
||||
type: 'warning',
|
||||
duration: 10000
|
||||
})
|
||||
console.log(error)
|
||||
this.loading_btn = false
|
||||
})
|
||||
|
||||
} else {
|
||||
this.loading_btn = false
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: 'Please upload your bankin slip first.',
|
||||
type: 'warning',
|
||||
duration: 10000
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
handleRemove(file, fileList) {
|
||||
console.log(file, fileList);
|
||||
|
||||
@@ -453,52 +453,57 @@ export default {
|
||||
console.log(error)
|
||||
})
|
||||
} else {
|
||||
|
||||
this.loading = false
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: 'Please fill the booking form in full.',
|
||||
type: 'error',
|
||||
duration: 10000
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
createBooking: function () {
|
||||
this.loading = true,
|
||||
this.dialogFormVisible1 = true
|
||||
/*this.$refs[formName].validate((valid) => {
|
||||
if (valid) {*/
|
||||
let newBooking = {
|
||||
account_name: this.bookingForm.account_name,
|
||||
account_num: this.bookingForm.account_num,
|
||||
bank_name: this.bookingForm.bank_name,
|
||||
bank_branch: this.bookingForm.bank_branch,
|
||||
amount: this.booking.amount,
|
||||
term: this.term
|
||||
}
|
||||
|
||||
let newBooking = {
|
||||
account_name: this.bookingForm.account_name,
|
||||
account_num: this.bookingForm.account_num,
|
||||
bank_name: this.bookingForm.bank_name,
|
||||
bank_branch: this.bookingForm.bank_branch,
|
||||
amount: this.booking.amount,
|
||||
term: this.term
|
||||
}
|
||||
console.log(newBooking)
|
||||
axios.post('api/booking', newBooking)
|
||||
.then((response) => {
|
||||
this.loading = false
|
||||
// push with return id
|
||||
this.$router.push({
|
||||
name: 'booking.user.upload',
|
||||
params: {id: response.data.id }
|
||||
})
|
||||
|
||||
console.log(newBooking)
|
||||
axios.post('api/booking', newBooking)
|
||||
.then((response) => {
|
||||
this.loading = false
|
||||
// push with return id
|
||||
this.$router.push({
|
||||
name: 'booking.user.upload',
|
||||
params: {id: response.data.id }
|
||||
})
|
||||
|
||||
// pass variable to another router
|
||||
})
|
||||
.catch((error) => {
|
||||
this.loading = false
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: 'Internal server issues. Please contact support',
|
||||
type: 'error',
|
||||
duration: 10000
|
||||
})
|
||||
console.log(error)
|
||||
this.loading = false
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: 'Please fill the booking form in full.',
|
||||
type: 'warning',
|
||||
duration: 10000
|
||||
})
|
||||
})
|
||||
// pass variable to another router
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error)
|
||||
this.loading = false
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: 'Internal server issues. Please contact support',
|
||||
type: 'error',
|
||||
duration: 10000
|
||||
})
|
||||
|
||||
})
|
||||
/*} else {
|
||||
this.loading = false
|
||||
}
|
||||
})*/
|
||||
},
|
||||
BookingStatus (status, booking_id) {
|
||||
console.log(status)
|
||||
|
||||
Vendored
-15
@@ -4,11 +4,7 @@
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
<<<<<<< HEAD
|
||||
class ComposerStaticInite450fcd5b0627496bb38e1386c9a81ad
|
||||
=======
|
||||
class ComposerStaticInit50cdbea3724e5f1d6267359fe107641a
|
||||
>>>>>>> 0afeb0d1ea15af7104fb7bc36d66737aefb8c84e
|
||||
{
|
||||
public static $files = array (
|
||||
'6124b4c8570aa390c21fafd04a26c69f' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
|
||||
@@ -16,10 +12,6 @@ class ComposerStaticInit50cdbea3724e5f1d6267359fe107641a
|
||||
'25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
|
||||
'667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php',
|
||||
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
|
||||
>>>>>>> 0afeb0d1ea15af7104fb7bc36d66737aefb8c84e
|
||||
'2c102faa651ef8ea5874edb585946bce' => __DIR__ . '/..' . '/swiftmailer/swiftmailer/lib/swift_required.php',
|
||||
'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
|
||||
'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
|
||||
@@ -4775,17 +4767,10 @@ class ComposerStaticInit50cdbea3724e5f1d6267359fe107641a
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
<<<<<<< HEAD
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInite450fcd5b0627496bb38e1386c9a81ad::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInite450fcd5b0627496bb38e1386c9a81ad::$prefixDirsPsr4;
|
||||
$loader->prefixesPsr0 = ComposerStaticInite450fcd5b0627496bb38e1386c9a81ad::$prefixesPsr0;
|
||||
$loader->classMap = ComposerStaticInite450fcd5b0627496bb38e1386c9a81ad::$classMap;
|
||||
=======
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit50cdbea3724e5f1d6267359fe107641a::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit50cdbea3724e5f1d6267359fe107641a::$prefixDirsPsr4;
|
||||
$loader->prefixesPsr0 = ComposerStaticInit50cdbea3724e5f1d6267359fe107641a::$prefixesPsr0;
|
||||
$loader->classMap = ComposerStaticInit50cdbea3724e5f1d6267359fe107641a::$classMap;
|
||||
>>>>>>> 0afeb0d1ea15af7104fb7bc36d66737aefb8c84e
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user