update pekerjaan lain-lain

This commit is contained in:
Ain Izazi
2024-12-01 14:15:15 +08:00
parent 3cbc26aebe
commit 6443548081
8 changed files with 203 additions and 90 deletions
@@ -145,10 +145,10 @@
</div>
</div>
</div>
<div class="mr-5 form-group float-right">
{{-- <div class="mr-5 form-group float-right">
<button type="button" class="btn btn-primary" onclick="kemaskinifunc()" id="btnkemaskini">Kemaskini</button>
<button type="button" class="btn btn-primary" onclick="kemaskinipelanggan()" id="btnsave">Save</button>
</div>
</div> --}}
</form>
</div>
</div>
+9 -9
View File
@@ -46,7 +46,7 @@
<option value="passport" {{ $idtype == 'passport' ? 'selected' : ''}}>Passport</option>
</select>
</div>
<div class="input-group-append">
<button class="btn btn-outline-primary" type="submit" id="button-addon2">Cari</button>
</div>
@@ -56,14 +56,14 @@
</div>
</div>
@if ($message = Session::get('success'))
<div class="alert alert-success">
<p>{{ $message }}</p>
</div>
@elseif ($message = Session::get('failed'))
<div class="alert alert-danger">
<p>{{ $message }}</p>
</div>
@endif
<div class="alert alert-success">
<p>{{ $message }}</p>
</div>
@elseif ($message = Session::get('failed'))
<div class="alert alert-danger">
<p>{{ $message }}</p>
</div>
@endif
</form>
</div>
@if($search == true )
+31 -18
View File
@@ -182,23 +182,23 @@
</select>
</div>
<div class="col-md-4">Pekerjaan</div>
@php
$pekerjaan = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/pekerjaan')->json();
@endphp
<div class="col-md-8">
<select class="form-control" name="pekerjaan" data-placeholder="Pilih Pekerjaan" id="pekerjaan">
<select class="form-control" name="pekerjaan" id="pekerjaan">
<option disabled selected value> -- Pilih Pekerjaan -- </option>
@foreach($pekerjaan as $kerja)
<option value="{{ $kerja['kodkerja'] }}">{{ $kerja['keterangan'] }}</option>
<option value="{{ $kerja['kodkerja'] }}">{{ $kerja['keterangan'] }}</option>
@endforeach
</select>
<div id="pekerjaan-lain-container" style="display: none; margin-top: 10px;">
<input type="text" class="form-control" id="pekerjaan-lain" name="nota_pekerjaan" placeholder="Masukkan pekerjaan lain">
</div>
</div>
<div class="col-md-4">Nota</div>
<div class="col-md-8"><input class="form-control" type="text" name="nota" id="nota" placeholder="Nota"></div>
<div class="col-md-8"><input class="form-control" type="text" name="nota" id="nota" placeholder="Nota"></div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<input type="text" hidden name="idtype" value="nokp">
@@ -321,16 +321,17 @@
</select>
</div>
<div class="col-md-4">Pekerjaan</div>
@php
$pekerjaan = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/pekerjaan')->json();
@endphp
<div class="col-md-8">
<select class="form-control" name="pekerjaan" data-placeholder="Pilih Pekerjaan" id="pekerjaan">
<select class="form-control" name="pekerjaan" id="pekerjaan">
<option disabled selected value> -- Pilih Pekerjaan -- </option>
@foreach($pekerjaan as $kerja)
<option value="{{ $kerja['kodkerja'] }}">{{ $kerja['keterangan'] }}</option>
<option value="{{ $kerja['kodkerja'] }}">{{ $kerja['keterangan'] }}</option>
@endforeach
</select>
<div id="pekerjaan-lain-container" style="display: none; margin-top: 10px;">
<input type="text" class="form-control" id="pekerjaan-lain" name="nota_pekerjaan" placeholder="Masukkan pekerjaan lain">
</div>
</div>
<div class="col-md-4">Nota</div>
<div class="col-md-8"><input class="form-control" type="text" name="nota" id="nota" placeholder="Nota"></div>
@@ -446,16 +447,17 @@
</select>
</div>
<div class="col-md-4">Pekerjaan</div>
@php
$pekerjaan = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/pekerjaan')->json();
@endphp
<div class="col-md-8">
<select class="form-control" name="pekerjaan" data-placeholder="Pilih Pekerjaan" id="passport_pekerjaan">
<select class="form-control" name="pekerjaan" id="pekerjaan">
<option disabled selected value> -- Pilih Pekerjaan -- </option>
@foreach($pekerjaan as $kerja)
<option value="{{ $kerja['kodkerja'] }}">{{ $kerja['keterangan'] }}</option>
<option value="{{ $kerja['kodkerja'] }}">{{ $kerja['keterangan'] }}</option>
@endforeach
</select>
<div id="pekerjaan-lain-container" style="display: none; margin-top: 10px;">
<input type="text" class="form-control" id="pekerjaan-lain" name="nota_pekerjaan" placeholder="Masukkan pekerjaan lain">
</div>
</div>
<div class="col-md-4">Nota</div>
<div class="col-md-8"><input class="form-control" type="text" name="nota" id="passport_nota" placeholder="Nota"></div>
@@ -1281,6 +1283,17 @@
</script>
<script src="{{ asset('js/searchName.js') }}"></script>
<script>
$('#pekerjaan').on('change', function() {
var lainContainer = $('#pekerjaan-lain-container');
if ($(this).val() === '6') {
lainContainer.show();
} else {
$('#pekerjaan-lain').val('');
lainContainer.hide();
}
});
</script>
@push('additional_scripts')
<script>
// mycard-read endpoint initialization
@@ -1293,4 +1306,4 @@
<script src="{{ asset('js/postcode-concerns.js') }}"></script>
@endpush
@endsection
@endsection
+57 -15
View File
@@ -121,13 +121,13 @@
<!-- footer card -->
<div class="mr-4 form-group d-flex justify-content-end">
<button class="btn btn-primary button-spacing" data-toggle="modal" data-target="#customer_detail">Maklumat Pelanggan</button>
<button class="btn btn-primary button-spacing" data-toggle="modal" data-target="#customer_detail">Maklumat Pelanggan</button>
</div>
</div>
</div>
</div>
<!-- button -->
<div class="col-md-10 mt-md-2 justify-content-between form-group row">
@@ -143,14 +143,14 @@
<label class="btn btn-secondary flex-fill">
<input type="radio" name="options" id="option3" value="lelong" autocomplete="off">
Lelong
</label>
</label>
</div>
</div>
<!-- card -->
<div class="col-md-12 col-lg-12">
<div class="card">
<div class="card-body">
@@ -345,6 +345,27 @@
<span id="errorkodbank" style="color:red;"></span>
</div>
</div>
<div class='form-group row col-md-12'>
<div class='col-md-5'>
Pekerjaan
</div>
<div class='col-md-7'>
@php
$pekerjaan = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/pekerjaan')->json();
@endphp
<select class="form-control" name="kodkerja" data-placeholder="Pilih Pekerjaan" id="kodkerja" disabled="true">
<option value="-" selected disabled>-</option>
@foreach($pekerjaan as $kerja)
<option value="{{ $kerja['kodkerja'] }}" {{ $kerja['kodkerja'] == $customer_info['kodkerja'] ? 'selected' : '' }}>
{{ $kerja['keterangan'] }}
</option>
@endforeach
</select>
<div id="pekerjaan-lain-container" style="display: {{ $customer_info['kodkerja'] == '6' ? 'block' : 'none' }}; margin-top: 10px;" >
<input type="text" class="form-control" id="nota_pekerjaan" name="nota_pekerjaan" placeholder="Sila Nyatakan" value="{{ $customer_info['nota_pekerjaan'] ?? '' }}" disabled="true">
</div>
</div>
</div>
<div class='form-group row col-md-12'>
<div class='col-md-5'>
No Akaun
@@ -2500,6 +2521,8 @@
$('#telefon').attr('readonly', false);
$('#telefon2').attr('readonly', false);
$('#kodbank').attr('disabled', false);
$('#kodkerja').attr('disabled', false);
$('#nota_pekerjaan').attr('disabled', false);
$('#noakaun').attr('readonly', false);
$('#nota').attr('readonly', false);
$('#alamat').attr('readonly', false);
@@ -2521,6 +2544,8 @@
$('#telefon').attr('readonly', true);
$('#telefon2').attr('readonly', true);
$('#kodbank').attr('disabled', true);
$('#kodkerja').attr('disabled', true);
$('#nota_pekerjaan').attr('disabled', true);
$('#noakaun').attr('readonly', true);
$('#nota').attr('readonly', true);
$('#alamat').attr('readonly', true);
@@ -2534,6 +2559,8 @@
var telefon1 = $('#telefon').val();
var telefon2 = $('#telefon2').val();
var kodbank = $('#kodbank').val();
var kodkerja = $('#kodkerja').val();
var nota_pekerjaan = $('#nota_pekerjaan').val();
var noakaun = $('#noakaun').val();
var nota = $('#nota').val();
var alamat = $('#alamat').val();
@@ -2547,6 +2574,8 @@
"telefon1": telefon1,
"telefon2": telefon2,
"kodbank":kodbank,
"kodkerja":kodkerja,
"nota_pekerjaan":nota_pekerjaan,
"noakaun":noakaun,
'nota':nota,
'alamat':alamat,
@@ -2631,6 +2660,8 @@
$('#telefon2').attr('readonly', true);
$('#noakaun').attr('readonly', true);
$('#kodbank').attr('disabled', true);
$('#kodkerja').attr('disabled', true);
$('#nota_pekerjaan').attr('disabled', true);
$('#nota').attr('readonly', true);
$('#alamat').attr('readonly', true);
$('#poskod').attr('readonly', true);
@@ -2676,7 +2707,7 @@
});
async function removeansuran(event){
let ansid = $('input[name="belum"]:checked').val();
let harini = new Date();harini.setHours(0, 0, 0, 0);
@@ -2687,7 +2718,7 @@
text: 'Ansuran untuk Pembiayaan Belum Selesai Sahaja!'
});
return false;
return false;
}
if(ansid == null && $("input[name='options']:checked").val() == 'belum_tebus'){
@@ -2710,7 +2741,7 @@
let ansuranlatest = await fetch(api_url + '/admin/ansuran/getLatest?' + queryString)
.then(response => response.json())
.then(response => {return response});
if(Object.keys(ansuranlatest).length == 0){
Swal.fire({
icon: 'error',
@@ -2728,9 +2759,9 @@
}catch(error){
console.error("Error:", error);
}
}
@@ -2743,7 +2774,7 @@
}
async function getKelulusanKhazanahOperasi(textstatus = 'none',norujukan){
const swalWithBootstrapButtons = Swal.mixin({
customClass: {
confirmButton: 'btn btn-success',
@@ -2810,7 +2841,7 @@
})
.then(response => response.json())
.then(response => {return response});
return siricreated;
}else if (result.dismiss === Swal.DismissReason.cancel){
@@ -2904,7 +2935,7 @@
}).then(()=>{
location.reload();
});
}catch(error){
Swal.fire({
@@ -2915,4 +2946,15 @@
}
}
</script>
<script>
$('#kodkerja').on('change', function() {
var lainContainer = $('#pekerjaan-lain-container');
if ($(this).val() === '6') {
lainContainer.show();
} else {
$('#pekerjaan-lain').val('');
lainContainer.hide();
}
});
</script>
@endsection
+10 -1
View File
@@ -33,13 +33,22 @@
<select class="form-select" id="customerIDType" name="customerIDType" class="form-control">
<option value="nokp" {{ $idtype == 'nokp' ? 'selected' : ''}}>Kad Pengenalan</option>
<option value="passport" {{ $idtype == 'passport' ? 'selected' : ''}}>Passport</option>
<option value="name">Nama</option>
<option value="name">Nama</option>
</select>
</div>
<div class="input-group-append">
<button class="btn btn-outline-primary" type="submit" id="button-addon2">Cari</button>
</div>
</div>
@if ($message = Session::get('success'))
<div class="alert alert-success">
<p>{{ $message }}</p>
</div>
@elseif ($message = Session::get('failed'))
<div class="alert alert-danger">
<p>{{ $message }}</p>
</div>
@endif
</div>
</div>
</form>
+48 -5
View File
@@ -122,13 +122,13 @@
<!-- footer card -->
<div class="mr-4 form-group d-flex justify-content-end">
<button class="btn btn-primary button-spacing" data-toggle="modal" data-target="#customer_detail">Maklumat Pelanggan</button>
<button class="btn btn-primary button-spacing" data-toggle="modal" data-target="#customer_detail">Maklumat Pelanggan</button>
</div>
</div>
</div>
</div>
<!-- button -->
<div class="col-md-10 mt-md-2 justify-content-between form-group row">
@@ -142,7 +142,7 @@
</label>
<label class="btn btn-secondary flex-fill">
<input type="radio" name="options" id="option3" value="lelong" autocomplete="off">Lelong
</label>
</label>
</div>
</div>
</div>
@@ -332,6 +332,27 @@
<span id="errorkodbank" style="color:red;"></span>
</div>
</div>
<div class='form-group row col-md-12'>
<div class='col-md-5'>
Pekerjaan
</div>
<div class='col-md-7'>
@php
$pekerjaan = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/pekerjaan')->json();
@endphp
<select class="form-control" name="kodkerja" data-placeholder="Pilih Pekerjaan" id="kodkerja" disabled="true">
<option value="-" selected disabled>-</option>
@foreach($pekerjaan as $kerja)
<option value="{{ $kerja['kodkerja'] }}" {{ $kerja['kodkerja'] == $customer_info['kodkerja'] ? 'selected' : '' }}>
{{ $kerja['keterangan'] }}
</option>
@endforeach
</select>
<div id="pekerjaan-lain-container" style="display: {{ $customer_info['kodkerja'] == '6' ? 'block' : 'none' }}; margin-top: 10px;" >
<input type="text" class="form-control" id="nota_pekerjaan" name="nota_pekerjaan" placeholder="Sila Nyatakan" value="{{ $customer_info['nota_pekerjaan'] ?? '' }}" disabled="true">
</div>
</div>
</div>
<div class='form-group row col-md-12'>
<div class='col-md-5'>
No Akaun
@@ -869,7 +890,7 @@ $.each(data,function(index,gadai_detail){
let histid = $('input[name="sudahtebus"]:checked').val();
let checkps = await checkPS(histid);
if(histid == null){
Swal.fire({
icon: 'error',
@@ -1383,6 +1404,8 @@ $.each(data,function(index,gadai_detail){
$('#telefon').attr('readonly', false);
$('#telefon2').attr('readonly', false);
$('#kodbank').attr('disabled', false);
$('#kodkerja').attr('disabled', false);
$('#nota_pekerjaan').attr('disabled', false);
$('#noakaun').attr('readonly', false);
$('#nota').attr('readonly', false);
$('#nama').attr('readonly', false);
@@ -1404,6 +1427,8 @@ $.each(data,function(index,gadai_detail){
$('#telefon').attr('readonly', true);
$('#telefon2').attr('readonly', true);
$('#kodbank').attr('disabled', true);
$('#kodkerja').attr('disabled', true);
$('#nota_pekerjaan').attr('disabled', true);
$('#noakaun').attr('readonly', true);
$('#nota').attr('readonly', true);
$('#nama').attr('readonly', true);
@@ -1427,6 +1452,8 @@ $.each(data,function(index,gadai_detail){
var telefon1 = $('#telefon').val();
var telefon2 = $('#telefon2').val();
var kodbank = $('#kodbank').val();
var kodkerja = $('#kodkerja').val();
var nota_pekerjaan = $('#nota_pekerjaan').val();
var noakaun = $('#noakaun').val();
var nota = $('#nota').val();
var nama = $('#nama').val();
@@ -1441,6 +1468,8 @@ $.each(data,function(index,gadai_detail){
"telefon1": telefon1,
"telefon2": telefon2,
"kodbank":kodbank,
"kodkerja":kodkerja,
"nota_pekerjaan":nota_pekerjaan,
"noakaun":noakaun,
'nota':nota,
'nama':nama,
@@ -1526,6 +1555,8 @@ $.each(data,function(index,gadai_detail){
$('#telefon2').attr('readonly', true);
$('#noakaun').attr('readonly', true);
$('#kodbank').attr('disabled', true);
$('#kodkerja').attr('disabled', true);
$('#nota_pekerjaan').attr('disabled', true);
$('#nota').attr('readonly', true);
$('#nama').attr('readonly', true);
$('#alamat').attr('readonly', true);
@@ -1580,4 +1611,16 @@ $.each(data,function(index,gadai_detail){
});
});
</script>
<script>
$('#kodkerja').on('change', function() {
var lainContainer = $('#pekerjaan-lain-container');
if ($(this).val() === '6') {
lainContainer.show();
} else {
$('#pekerjaan-lain').val('');
lainContainer.hide();
}
});
</script>
@endsection