fix passport

This commit is contained in:
hafifierahman
2022-09-21 12:18:20 +08:00
parent c8e4ff4af6
commit c3a9762532
4 changed files with 102 additions and 106 deletions
@@ -115,7 +115,7 @@
</span> --}}
<div class="input-group input-group-outline mt-3 {{ $errors->has('icno') ? ' has-danger' : '' }}">
<input type="text" placeholder="Nombor Kad Pengenalan" class="form-control{{ $errors->has('icno') ? ' is-invalid' : '' }}" id="login-icno" name="icno" required aria-required="true">
<input type="text" placeholder="Nombor Kad Pengenalan / Passport" class="form-control{{ $errors->has('icno') ? ' is-invalid' : '' }}" id="login-icno" name="icno" required aria-required="true">
</div>
<span id="spanic" class="text-danger invisible" role="alert">
@@ -374,111 +374,107 @@
}else{
if(isNaN(icno))
{
$.notify({
icon: 'fas fa-exclamation-triangle fa-2x',
newest_on_top: true,
message: "<strong style='font-size:15px;text-align:center;margin-left:100px; color: #ffff'>Masukkan Nombor dalam petak disediakan!</strong>"
}, {
type: 'danger',
allow_dismiss: false,
placement: {
align: 'center',
from: 'bottom'
},
animate: {
enter: 'animate__animated animate__bounce',
exit: 'animate__animated animate__bounceOutDown'
var csrf_token = $('meta[name="csrf-token"]').attr('content');
$.ajax({
url: '{{ route("requestic") }}',
method: 'get',
data:{
"_token": "{{ csrf_token() }}",
"icno" : icno
},
success: function(data) {
if(data.notexpired){
$.notify({
icon: 'fas fa-exclamation-triangle fa-2x',
newest_on_top: true,
message: "<strong style='font-size:15px;text-align:center;margin-left:100px; color: #ffff'>anda telah meminta tac kurang daripada 5 minit!</strong>"
}, {
type: 'warning',
allow_dismiss: false,
placement: {
align: 'center',
from: 'bottom'
},
animate: {
enter: 'animate__animated animate__bounce',
exit: 'animate__animated animate__bounceOutDown'
}
});
return;
}
});
}else{
var csrf_token = $('meta[name="csrf-token"]').attr('content');
$.ajax({
url: '{{ route("requestic") }}',
method: 'get',
data:{
"_token": "{{ csrf_token() }}",
"icno" : icno
},
success: function(data) {
if(data.notexpired){
$.notify({
icon: 'fas fa-exclamation-triangle fa-2x',
newest_on_top: true,
message: "<strong style='font-size:15px;text-align:center;margin-left:100px; color: #ffff'>anda telah meminta tac kurang daripada 5 minit!</strong>"
}, {
type: 'warning',
allow_dismiss: false,
placement: {
align: 'center',
from: 'bottom'
},
animate: {
enter: 'animate__animated animate__bounce',
exit: 'animate__animated animate__bounceOutDown'
}
});
return;
}
if(data.message){
$.notify({
icon: 'fas fa-exclamation-triangle fa-2x',
newest_on_top: true,
message: "<strong style='font-size:15px;text-align:center;margin-left:100px; color: #ffff'>anda telah menjadi ahli dalam ini!</strong>"
}, {
type: 'warning',
allow_dismiss: false,
placement: {
align: 'center',
from: 'bottom'
},
animate: {
enter: 'animate__animated animate__bounce',
exit: 'animate__animated animate__bounceOutDown'
}
});
return;
}
if(data.message){
if(data['status'] == 1)
{
$("#tac").prop('disabled', false);
$("#spanhantarnombor").removeClass('d-none');
$("#divsahkan").removeClass('d-none');
$('#backphone').text(data['notelefon']);
$.notify({
icon: 'fas fa-exclamation-triangle fa-2x',
newest_on_top: true,
message: "<strong style='font-size:15px;text-align:center;margin-left:100px; color: #ffff'>anda telah menjadi ahli dalam ini!</strong>"
}, {
type: 'warning',
allow_dismiss: false,
placement: {
align: 'center',
from: 'bottom'
},
animate: {
enter: 'animate__animated animate__bounce',
exit: 'animate__animated animate__bounceOutDown'
}
});
$.notify({
icon: 'fas fa-2x fa-exclamation-triangle',
newest_on_top: true,
message: "<strong style='font-size:15px;text-align:center;margin-left:100px; color: #ffff'>Permohonan TAC telah dihantar melalui SMS!</strong>"
}, {
type: 'success',
allow_dismiss: false,
placement: {
align: 'center',
from: 'bottom'
},
animate: {
enter: 'animate__animated animate__bounce',
exit: 'animate__animated animate__bounceOutDown'
}
});
}else{
// console.log(data);
}
return;
}
});
if(data['status'] == 1)
{
$("#tac").prop('disabled', false);
$("#spanhantarnombor").removeClass('d-none');
$("#divsahkan").removeClass('d-none');
$('#backphone').text(data['notelefon']);
$.notify({
icon: 'fas fa-2x fa-exclamation-triangle',
newest_on_top: true,
message: "<strong style='font-size:15px;text-align:center;margin-left:100px; color: #ffff'>Permohonan TAC telah dihantar melalui SMS!</strong>"
}, {
type: 'success',
allow_dismiss: false,
placement: {
align: 'center',
from: 'bottom'
},
animate: {
enter: 'animate__animated animate__bounce',
exit: 'animate__animated animate__bounceOutDown'
}
});
}else{
$.notify({
icon: 'fas fa-2x fa-exclamation-triangle',
newest_on_top: true,
message: "<strong style='font-size:15px;text-align:center;margin-left:100px; color: #ffff'>No Kad Pengenalan / Passport tiada dalam simpanan!</strong>"
}, {
type: 'danger',
allow_dismiss: false,
placement: {
align: 'center',
from: 'bottom'
},
animate: {
enter: 'animate__animated animate__bounce',
exit: 'animate__animated animate__bounceOutDown'
}
});
}
}
});
}
}
@@ -410,7 +410,7 @@
$("#bayarsbmt").prop('disabled', false);
Swal.fire(
'Amaran!',
'Bayaran tidak boleh melebihi 10% nilai marhun!',
'Baki Pembiayaan tidak boleh kurang 10% daripada Nilai Marhun',
'error'
)
$(this).val(upah);
@@ -441,7 +441,7 @@
$("#bayarsbmt").prop('disabled', false);
Swal.fire(
'Amaran!',
'Bayaran tidak boleh melebihi 10% nilai marhun!',
'Baki Pembiayaan tidak boleh kurang 10% daripada Nilai Marhun',
'error'
)
$(this).val(upah);
@@ -292,7 +292,7 @@
$("#bayarsbmt").prop('disabled', false);
Swal.fire(
'Amaran!',
'Bayaran tidak boleh melebihi 10% nilai marhun!',
'Baki Pembiayaan tidak boleh kurang 10% daripada Nilai Marhun',
'error'
)
$(this).val(upah);
@@ -323,7 +323,7 @@
$("#bayarsbmt").prop('disabled', false);
Swal.fire(
'Amaran!',
'Bayaran tidak boleh melebihi 10% nilai marhun!',
'Baki Pembiayaan tidak boleh kurang 10% daripada Nilai Marhun',
'error'
)
$(this).val(upah);
@@ -340,7 +340,7 @@
$("#bayarsbmt").prop('disabled', false);
Swal.fire(
'Amaran!',
'Bayaran tidak boleh melebihi 10% nilai marhun!',
'Baki Pembiayaan tidak boleh kurang 10% daripada Nilai Marhun',
'error'
)
$(this).val(upah);
@@ -371,7 +371,7 @@
$("#bayarsbmt").prop('disabled', false);
Swal.fire(
'Amaran!',
'Bayaran tidak boleh melebihi 10% nilai marhun!',
'Baki Pembiayaan tidak boleh kurang 10% daripada Nilai Marhun',
'error'
)
$(this).val(upah);