update pekerjaan lain-lain
This commit is contained in:
@@ -40,9 +40,10 @@ class CustomersController extends Controller
|
||||
$idtype = 'nokp';
|
||||
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
||||
$bank = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/bank')->json();
|
||||
$pekerjaan = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/pekerjaan')->json();
|
||||
$blacklist_search = false;
|
||||
|
||||
return view('customers.' . $cawangan_info['version'] . '.index',compact('search','blacklist_search','cawangan_info','bank','api_url','idtype'));
|
||||
return view('customers.' . $cawangan_info['version'] . '.index',compact('search','blacklist_search','cawangan_info','bank','api_url','idtype','pekerjaan'));
|
||||
}
|
||||
|
||||
public function info(Request $request){
|
||||
@@ -51,7 +52,8 @@ class CustomersController extends Controller
|
||||
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
||||
|
||||
$customer_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/customers/'. Session::get('noic'))->json();
|
||||
|
||||
// dd($customer_info);
|
||||
$pekerjaan = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/pekerjaan')->json();
|
||||
$komoditi = Komoditi::first();
|
||||
$min_komoditi = $komoditi['min_komoditi'];
|
||||
|
||||
@@ -68,7 +70,7 @@ class CustomersController extends Controller
|
||||
$request->session()->flash('activate_tab', 'SAG_baru');
|
||||
}
|
||||
|
||||
return view($customer_page,compact('cawangan_info','api_url','customer_info','bakilelong','rugilelong','min_komoditi'));
|
||||
return view($customer_page,compact('cawangan_info','api_url','customer_info','bakilelong','rugilelong','min_komoditi','pekerjaan'));
|
||||
}
|
||||
|
||||
public function search(Request $request){
|
||||
@@ -81,6 +83,7 @@ class CustomersController extends Controller
|
||||
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
||||
$bank = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/bank')->json();
|
||||
$customer_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/customers/'. $noic)->json();
|
||||
$pekerjaan = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/pekerjaan')->json();
|
||||
|
||||
$blacklist = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/customer/blacklist',[
|
||||
'nokp' => $noic
|
||||
@@ -105,9 +108,9 @@ class CustomersController extends Controller
|
||||
}else{
|
||||
if($blacklist){
|
||||
$blacklist_search = true;
|
||||
return view('customers.' . $cawangan_info['version'] . '.index',compact('blacklist_search','customer_info','search','noic','cawangan_info','bank','api_url','idtype'));
|
||||
return view('customers.' . $cawangan_info['version'] . '.index',compact('blacklist_search','customer_info','search','noic','cawangan_info','bank','api_url','idtype','pekerjaan'));
|
||||
}else{
|
||||
return view('customers.' . $cawangan_info['version'] . '.index',compact('blacklist_search','customer_info','search','noic','cawangan_info','bank','api_url','idtype'));
|
||||
return view('customers.' . $cawangan_info['version'] . '.index',compact('blacklist_search','customer_info','search','noic','cawangan_info','bank','api_url','idtype','pekerjaan'));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -219,6 +222,7 @@ class CustomersController extends Controller
|
||||
'nosiri' => $nosiri_latest,
|
||||
'nota'=>$request->nota,
|
||||
'kodkerja'=>$request->pekerjaan,
|
||||
'nota_pekerjaan'=>$request->nota_pekerjaan,
|
||||
'tujuangadai'=>$request->tujuan_gadai,
|
||||
]);
|
||||
|
||||
|
||||
@@ -79,15 +79,17 @@ class KhazanahController extends Controller
|
||||
Session::put('customer_info_khazanah',$customer_info);
|
||||
if($auth_user->roles == 'admin'){
|
||||
return redirect()->route('admin.customer_info')->with( ['customer_info' => $customer_info,'cawangan_info'=>$cawangan_info,'api_url'=>$api_url]);
|
||||
}else{
|
||||
return redirect()->route('khazanah.customer_info')->with( ['customer_info' => $customer_info,'cawangan_info'=>$cawangan_info,'api_url'=>$api_url]);
|
||||
}
|
||||
return redirect()->route('khazanah.customer_info')->with( ['customer_info' => $customer_info,'cawangan_info'=>$cawangan_info,'api_url'=>$api_url]);
|
||||
|
||||
// return redirect()->back()->with('failed','Maaf,Tiada Data Pelanggan...');
|
||||
|
||||
}else{
|
||||
if($auth_user->roles == 'admin'){
|
||||
return view('admin.customer_index',compact('search','noic','cawangan_info','bank','api_url','idtype'));
|
||||
}else{
|
||||
return view('khazanah.index',compact('search','noic','cawangan_info','bank','api_url','idtype'));
|
||||
}
|
||||
// return view('khazanah.index',compact('search','noic','cawangan_info','bank','api_url','idtype'));
|
||||
return redirect()->back()->with('failed','Maaf,Tiada Data Pelanggan...');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -334,6 +334,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
|
||||
@@ -2506,6 +2527,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);
|
||||
@@ -2527,6 +2550,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);
|
||||
@@ -2540,6 +2565,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();
|
||||
@@ -2553,6 +2580,8 @@
|
||||
"telefon1": telefon1,
|
||||
"telefon2": telefon2,
|
||||
"kodbank":kodbank,
|
||||
"kodkerja":kodkerja,
|
||||
"nota_pekerjaan":nota_pekerjaan,
|
||||
"noakaun":noakaun,
|
||||
'nota':nota,
|
||||
'alamat':alamat,
|
||||
@@ -2637,6 +2666,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);
|
||||
@@ -2921,4 +2952,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
|
||||
|
||||
@@ -40,6 +40,15 @@
|
||||
<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>
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user