Menambahkan feature -Tombol Penawaran Ulang- (berguna untuk antisipasi perpanjang waktu penawaran dan lainnya). Dan menerapkannya di flow Otorisasi Tender, Proses Penawaran, dan Proses Penawaran Ulang
This commit is contained in:
@@ -75,7 +75,7 @@ function otorisasiKJPP(penawaran_id, id, kjpp_id, kjppName, biaya_penawaran) {
|
||||
}
|
||||
else
|
||||
{
|
||||
Swal.fire('Error!', response.message.message_error_try_catch[0], 'error');
|
||||
Swal.fire('Error!', response.message.message_error[0], 'error');
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -146,51 +146,65 @@
|
||||
i++;
|
||||
});
|
||||
}
|
||||
/*
|
||||
// update proses penawaran ulang & permohonan status
|
||||
$("#{{$route[1]}}_toEdit").click(function(e) {
|
||||
|
||||
// update status
|
||||
$("#{{$route[1]}}_toPenawaranUlang").click(function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
//define variable
|
||||
let token = "{{ csrf_token() }}";
|
||||
let useURL = "";
|
||||
|
||||
var input_data = new Object();
|
||||
input_data._token = token;
|
||||
input_data.id = "{{ $id }}";
|
||||
$.ajax({
|
||||
url: useURL,
|
||||
type: "PUT",
|
||||
cache: false,
|
||||
data: input_data,
|
||||
dataType: "json",
|
||||
success: function(response) {
|
||||
console.log(response);
|
||||
if('success' == response.status)
|
||||
{
|
||||
// toastr.success(response.message);
|
||||
toastrSuccess(response.message);
|
||||
setTimeout(function () {
|
||||
var url = "{{ route('tender.prosespenawaran.index') }}";
|
||||
$(location).attr('href',url);
|
||||
// window.location.href = "https://www.newurl.com";
|
||||
}, 2000);
|
||||
}
|
||||
else
|
||||
{
|
||||
// toastr.error(response.message);
|
||||
toastrError(response.message);
|
||||
}
|
||||
},
|
||||
error: function(response, textStatus, errorThrown) {
|
||||
// var errors = response.responseJSON.errors;
|
||||
// console.log(errors);
|
||||
console.log(response);
|
||||
Swal.fire({
|
||||
title: ' ',
|
||||
text: "Yakin akan Penawaran ulang?",
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes'
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed)
|
||||
{
|
||||
//define variable
|
||||
// $id ==> penawaran.id
|
||||
let token = "{{ csrf_token() }}";
|
||||
let noReg = $("#textReg").text();
|
||||
let useURL = "{{ route($route[0].'.'.$route[1].'.penawaranulang',$id) }}";
|
||||
|
||||
var input_data = new Object();
|
||||
input_data._token = token;
|
||||
input_data.id = "{{ $id }}";
|
||||
input_data.noReg =noReg;
|
||||
// alert('url = ' + useURL);
|
||||
$.ajax({
|
||||
url: useURL,
|
||||
type: "PUT",
|
||||
cache: false,
|
||||
data: input_data,
|
||||
dataType: "json",
|
||||
success: function(response) {
|
||||
console.log(response);
|
||||
if('success' == response.status)
|
||||
{
|
||||
swal.fire('Sukses Penawaran ulang!', response.message.message_success[0], 'success').then(() => {
|
||||
var url = "{{ route('otorisasitender.penawaran.index') }}";
|
||||
$(location).attr('href',url);
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
Swal.fire('Error!', response.message.message_error[0], 'error');
|
||||
}
|
||||
|
||||
},
|
||||
error: function(response, textStatus, errorThrown) {
|
||||
// var errors = response.responseJSON.errors;
|
||||
// console.log(errors);
|
||||
console.log(response);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
});
|
||||
*/
|
||||
|
||||
|
||||
</script>
|
||||
@endpush
|
||||
Reference in New Issue
Block a user