Mengubah Opsi Jenis Kantor pada Menu Master KJPP menjadi selected ketika jenis kantor itu sama
This commit is contained in:
@@ -35,7 +35,6 @@ class KJPPController extends Controller
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
$branch = Branch::all();
|
||||
$ijin_usaha = IjinUsaha::all();
|
||||
$jenis_aset = JenisJaminan::all();
|
||||
$provinces = Province::all();
|
||||
@@ -48,7 +47,7 @@ class KJPPController extends Controller
|
||||
// Combine KJPP number with branch code
|
||||
$fullKjppNumber = $kjppNumber;
|
||||
|
||||
return view('lpj::kjpp.create', compact('branch', 'ijin_usaha', 'jenis_aset', 'provinces', 'fullKjppNumber'));
|
||||
return view('lpj::kjpp.create', compact('ijin_usaha', 'jenis_aset', 'provinces', 'fullKjppNumber'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -98,13 +97,12 @@ class KJPPController extends Controller
|
||||
$ijin_usaha = IjinUsaha::where('code', $kjpp->nomor_ijin_usaha)->get();
|
||||
$ijin_usahas = IjinUsaha::all();
|
||||
$jenis_jaminan = JenisJaminan::all();
|
||||
$branches = Branch::where('name', $kjpp->jenis_kantor)->get();
|
||||
$provinces = Province::where('code', $kjpp->province_code)->get();
|
||||
$cities = City::where('code', $kjpp->city_code)->get();
|
||||
$districts = District::where('code', $kjpp->district_code)->get();
|
||||
$villages = Village::where('code', $kjpp->village_code)->get();
|
||||
// dd($branches);
|
||||
return view('lpj::kjpp.show', compact('jenis_jaminan', 'ijin_usahas', 'ijin_usaha', 'branches', 'kjpp', 'provinces', 'cities', 'districts', 'villages'));
|
||||
return view('lpj::kjpp.show', compact('jenis_jaminan', 'ijin_usahas', 'ijin_usaha', 'kjpp', 'provinces', 'cities', 'districts', 'villages'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -113,7 +111,6 @@ class KJPPController extends Controller
|
||||
public function edit($id)
|
||||
{
|
||||
$kjpp = KJPP::find($id);
|
||||
$branch = Branch::all();
|
||||
$ijin_usaha = IjinUsaha::all();
|
||||
$jenis_aset = JenisJaminan::all();
|
||||
$provinces = Province::all();
|
||||
@@ -121,7 +118,7 @@ class KJPPController extends Controller
|
||||
$districts = District::where('city_code', $kjpp->city_code)->get();
|
||||
$villages = Village::where('district_code', $kjpp->district_code)->get();
|
||||
|
||||
return view('lpj::kjpp.create', compact('kjpp', 'branch', 'ijin_usaha', 'jenis_aset', 'provinces', 'cities', 'districts', 'villages'));
|
||||
return view('lpj::kjpp.create', compact('kjpp', 'ijin_usaha', 'jenis_aset', 'provinces', 'cities', 'districts', 'villages'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user