Fix issue when user cancels the cancellation. #449
This commit is contained in:
parent
2e9a5585d4
commit
a526b7bee5
2 changed files with 17 additions and 16 deletions
|
|
@ -1181,7 +1181,6 @@ class JobOrderController extends Controller
|
||||||
// ajax call
|
// ajax call
|
||||||
public function cancelReasons()
|
public function cancelReasons()
|
||||||
{
|
{
|
||||||
error_log('start cancel_reasons');
|
|
||||||
return $this->json([
|
return $this->json([
|
||||||
'cancel_reasons' => JOCancelReasons::getCollection(),
|
'cancel_reasons' => JOCancelReasons::getCollection(),
|
||||||
]);
|
]);
|
||||||
|
|
|
||||||
|
|
@ -1764,14 +1764,15 @@ $(function() {
|
||||||
inputOptions: inputOptionsPromise,
|
inputOptions: inputOptionsPromise,
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
showCancelButton: true,
|
showCancelButton: true,
|
||||||
|
closeOnCancel: true,
|
||||||
width: '40rem',
|
width: '40rem',
|
||||||
inputValidator: (value) => {
|
inputValidator: (value) => {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
console.log(value)
|
|
||||||
resolve()
|
resolve()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}).then((result) => {
|
}).then((result) => {
|
||||||
|
if (result.value) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
url: url,
|
url: url,
|
||||||
|
|
@ -1788,6 +1789,7 @@ $(function() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue