Revert "Memperbaiki KJPP Basic data dari create, edit, dan show yang bug"
This reverts commit 967be7019d.
This commit is contained in:
@@ -45,17 +45,7 @@ class KJPPController extends Controller
|
||||
// Combine KJPP number with branch code
|
||||
$fullKjppNumber = $kjppNumber;
|
||||
|
||||
$emailKantor = [];
|
||||
$namaPimpinan = [];
|
||||
$nomorHpPimpinan = [];
|
||||
$namaPicReviewer = [];
|
||||
$nomorHpPicReviewer = [];
|
||||
$namaPicAdmin = [];
|
||||
$nomorHpPicAdmin = [];
|
||||
$namaPicMarketing = [];
|
||||
$nomorHpPicMarketing = [];
|
||||
|
||||
return view('lpj::kjpp.create', compact('ijin_usaha', 'jenis_aset', 'provinces', 'fullKjppNumber', 'emailKantor', 'namaPimpinan', 'nomorHpPimpinan', 'namaPicReviewer', 'nomorHpPicReviewer', 'namaPicAdmin', 'nomorHpPicAdmin', 'namaPicMarketing', 'nomorHpPicMarketing'));
|
||||
return view('lpj::kjpp.create', compact('ijin_usaha', 'jenis_aset', 'provinces', 'fullKjppNumber'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -65,54 +55,142 @@ class KJPPController extends Controller
|
||||
{
|
||||
$validated = $request->validated();
|
||||
|
||||
$validated['email_kantor'] = json_encode($validated['email_kantor']);
|
||||
$validated['nama_pimpinan'] = json_encode($validated['nama_pimpinan']);
|
||||
$validated['nomor_hp_pimpinan'] = json_encode($validated['nomor_hp_pimpinan']);
|
||||
$validated['nama_pic_reviewer'] = json_encode($validated['nama_pic_reviewer']);
|
||||
$validated['nomor_hp_pic_reviewer'] = json_encode($validated['nomor_hp_pic_reviewer']);
|
||||
$validated['nama_pic_admin'] = json_encode($validated['nama_pic_admin']);
|
||||
$validated['nomor_hp_pic_admin'] = json_encode($validated['nomor_hp_pic_admin']);
|
||||
$validated['nama_pic_marketing'] = json_encode($validated['nama_pic_marketing']);
|
||||
$validated['nomor_hp_pic_marketing'] = json_encode($validated['nomor_hp_pic_marketing']);
|
||||
// Konversi array ke JSON untuk ijin_usaha_id
|
||||
$validated['ijin_usaha_id'] = json_encode($validated['ijin_usaha_id']);
|
||||
|
||||
// Konversi jenis_aset_id ke JSON, dengan penanganan array kosong
|
||||
$validated['jenis_aset_id'] = $validated['jenis_aset_id']
|
||||
? json_encode($validated['jenis_aset_id'])
|
||||
: json_encode([]);
|
||||
if ($validated) {
|
||||
$detailEmailKantor = [];
|
||||
$detailNamaPimpinan = [];
|
||||
$detailNomorPicPimpinan = [];
|
||||
$detailNamaPicReviewer = [];
|
||||
$detailNomorHpPicReviewer = [];
|
||||
$detailNamaPicAdmin = [];
|
||||
$detailNomorHpPicAdmin = [];
|
||||
$detailNamaPicMarketing = [];
|
||||
$detailNomorHpPicMarketing = [];
|
||||
|
||||
$emailKantor = $request->input('detail_email_kantor.email_kantor', []);
|
||||
$namaPimpinan = $request->input('detail_nama_pimpinan.nama_pimpinan', []);
|
||||
$nomorHpPimpinan = $request->input('detail_nomor_hp_pimpinan.nomor_hp_pimpinan', []);
|
||||
$namaPicReviewer = $request->input('detail_nama_pic_reviewer.nama_pic_reviewer', []);
|
||||
$nomorHpPicReviewer = $request->input('detail_nomor_hp_pic_reviewer.nomor_hp_pic_reviewer', []);
|
||||
$namaPicAdmin = $request->input('detail_nama_pic_admin.nama_pic_admin', []);
|
||||
$nomorHpPicAdmin = $request->input('detail_nomor_hp_pic_admin.nomor_hp_pic_admin', []);
|
||||
$namaPicMarketing = $request->input('detail_nama_pic_marketing.nama_pic_marketing', []);
|
||||
$nomorHpPicMarketing = $request->input('detail_nomor_hp_pic_marketing.nomor_hp_pic_marketing', []);
|
||||
|
||||
foreach ($emailKantor as $value) {
|
||||
$detailEmailKantor[] = [
|
||||
'email_kantor' => $value
|
||||
];
|
||||
}
|
||||
// Encode to JSON and store
|
||||
$detailEmailKantorJson = json_encode($detailEmailKantor);
|
||||
|
||||
// Process detail_nama_pimpinan
|
||||
foreach ($namaPimpinan as $value) {
|
||||
$detailNamaPimpinan[] = [
|
||||
'nama_pimpinan' => $value
|
||||
];
|
||||
}
|
||||
$detailNamaPimpinanJson = json_encode($detailNamaPimpinan);
|
||||
|
||||
// Process detail_nomor_pic_pimpinan
|
||||
foreach ($nomorHpPimpinan as $value) {
|
||||
$detailNomorPicPimpinan[] = [
|
||||
'nomor_hp_pimpinan' => $value
|
||||
];
|
||||
}
|
||||
$detailNomorPicPimpinanJson = json_encode($detailNomorPicPimpinan);
|
||||
|
||||
// Process detail_nama_pic_reviewer
|
||||
foreach ($namaPicReviewer as $value) {
|
||||
$detailNamaPicReviewer[] = [
|
||||
'nama_pic_reviewer' => $value
|
||||
];
|
||||
}
|
||||
$detailNamaPicReviewerJson = json_encode($detailNamaPicReviewer);
|
||||
|
||||
// Process detail_nomor_hp_pic_reviewer
|
||||
foreach ($nomorHpPicReviewer as $value) {
|
||||
$detailNomorHpPicReviewer[] = [
|
||||
'nomor_hp_pic_reviewer' => $value
|
||||
];
|
||||
}
|
||||
$detailNomorHpPicReviewerJson = json_encode($detailNomorHpPicReviewer);
|
||||
|
||||
// Process detail_nama_pic_admin
|
||||
foreach ($namaPicAdmin as $value) {
|
||||
$detailNamaPicAdmin[] = [
|
||||
'nama_pic_admin' => $value
|
||||
];
|
||||
}
|
||||
$detailNamaPicAdminJson = json_encode($detailNamaPicAdmin);
|
||||
|
||||
// Process detail_nomor_hp_pic_admin
|
||||
foreach ($nomorHpPicAdmin as $value) {
|
||||
$detailNomorHpPicAdmin[] = [
|
||||
'nomor_hp_pic_admin' => $value
|
||||
];
|
||||
}
|
||||
$detailNomorHpPicAdminJson = json_encode($detailNomorHpPicAdmin);
|
||||
|
||||
// Process detail_nama_pic_marketing
|
||||
foreach ($namaPicMarketing as $value) {
|
||||
$detailNamaPicMarketing[] = [
|
||||
'nama_pic_marketing' => $value
|
||||
];
|
||||
}
|
||||
$detailNamaPicMarketingJson = json_encode($detailNamaPicMarketing);
|
||||
|
||||
// Process detail_nomor_hp_pic_marketing
|
||||
foreach ($nomorHpPicMarketing as $value) {
|
||||
$detailNomorHpPicMarketing[] = [
|
||||
'nomor_hp_pic_marketing' => $value
|
||||
];
|
||||
}
|
||||
$detailNomorHpPicMarketingJson = json_encode($detailNomorHpPicMarketing);
|
||||
|
||||
|
||||
// Handle file attachment
|
||||
if ($request->hasFile('attachment')) {
|
||||
$file = $request->file('attachment');
|
||||
$filename = time() . '.' . $file->getClientOriginalExtension();
|
||||
$filename = $file ? time() . '.' . $file->getClientOriginalExtension() : 'default.pdf';
|
||||
|
||||
// Simpan file
|
||||
if ($file) {
|
||||
// Simpan file yang diunggah
|
||||
$file->storeAs('public/uploads_pdf', $filename);
|
||||
$validated['attachment'] = $filename;
|
||||
} else {
|
||||
// Gunakan file default jika tidak ada file yang diunggah
|
||||
$defaultFilename = 'default.pdf';
|
||||
Storage::copy('public/test/default.pdf', 'public/uploads_pdf/' . $defaultFilename);
|
||||
$validated['attachment'] = $defaultFilename;
|
||||
// Salin file default ke lokasi yang diinginkan
|
||||
Storage::copy('public/test/default.pdf', 'public/uploads_pdf/' . $filename);
|
||||
}
|
||||
|
||||
// Hapus baris dd() sebelum membuat record
|
||||
$validated['detail_email_kantor'] = $detailEmailKantorJson;
|
||||
$validated['detail_nama_pimpinan'] = $detailNamaPimpinanJson;
|
||||
$validated['detail_nomor_hp_pimpinan'] = $detailNomorPicPimpinanJson;
|
||||
$validated['detail_nama_pic_reviewer'] = $detailNamaPicReviewerJson;
|
||||
$validated['detail_nomor_hp_pic_reviewer'] = $detailNomorHpPicReviewerJson;
|
||||
$validated['detail_nama_pic_admin'] = $detailNamaPicAdminJson;
|
||||
$validated['detail_nomor_hp_pic_admin'] = $detailNomorHpPicAdminJson;
|
||||
$validated['detail_nama_pic_marketing'] = $detailNamaPicMarketingJson;
|
||||
$validated['detail_nomor_hp_pic_marketing'] = $detailNomorHpPicMarketingJson;
|
||||
$validated['ijin_usaha_id'] = json_encode($validated['ijin_usaha_id']);
|
||||
if (empty($validated['jenis_aset_id'])) {
|
||||
$validated['jenis_aset_id'] = json_encode([]);
|
||||
} else {
|
||||
$validated['jenis_aset_id'] = json_encode($validated['jenis_aset_id']);
|
||||
}
|
||||
// Tambahkan nama file ke data yang divalidasi
|
||||
$validated['attachment'] = $filename;
|
||||
|
||||
// dd($validated);
|
||||
|
||||
|
||||
try {
|
||||
// Buat record KJPP
|
||||
$kjpp = KJPP::create($validated);
|
||||
// Simpan data ke database
|
||||
KJPP::create($validated);
|
||||
|
||||
return redirect()
|
||||
->route('basicdata.kjpp.index')
|
||||
->with('success', 'KJPP created successfully');
|
||||
} catch (\Exception $e) {
|
||||
// Tangani kesalahan jika ada
|
||||
} else {
|
||||
return redirect()
|
||||
->route('basicdata.kjpp.create')
|
||||
->with('error', 'Failed to create KJPP: ' . $e->getMessage());
|
||||
->with('error', 'Validation failed');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,18 +207,46 @@ class KJPPController extends Controller
|
||||
$cities = City::where('code', $kjpp->city_code)->get();
|
||||
$districts = District::where('code', $kjpp->district_code)->get();
|
||||
$villages = Village::where('code', $kjpp->village_code)->get();
|
||||
$detailEmailKantor = json_decode($kjpp->detail_email_kantor);
|
||||
$detailNamaPimpinan = json_decode($kjpp->detail_nama_pimpinan);
|
||||
$detailNomorHpPimpinan = json_decode($kjpp->detail_nomor_hp_pimpinan);
|
||||
$detailNamaPicReviewer = json_decode($kjpp->detail_nama_pic_reviewer);
|
||||
$detailNomorHpPicReviewer = json_decode($kjpp->detail_nomor_hp_pic_reviewer);
|
||||
$detailNamaPicAdmin = json_decode($kjpp->detail_nama_pic_admin);
|
||||
$detailNomorHpPicAdmin = json_decode($kjpp->detail_nomor_hp_pic_admin);
|
||||
$detailNamaPicMarketing = json_decode($kjpp->detail_nama_pic_marketing);
|
||||
$detailNomorHpPicMarketing = json_decode($kjpp->detail_nomor_hp_pic_marketing);
|
||||
|
||||
$emailKantor = json_decode($kjpp->email_kantor);
|
||||
$namaPimpinan = json_decode($kjpp->nama_pimpinan);
|
||||
$nomorHpPimpinan = json_decode($kjpp->nomor_hp_pimpinan);
|
||||
$namaPicReviewer = json_decode($kjpp->nama_pic_reviewer);
|
||||
$nomorHpPicReviewer = json_decode($kjpp->nomor_hp_pic_reviewer);
|
||||
$namaPicAdmin = json_decode($kjpp->nama_pic_admin);
|
||||
$nomorHpPicAdmin = json_decode($kjpp->nomor_hp_pic_admin);
|
||||
$namaPicMarketing = json_decode($kjpp->nama_pic_marketing);
|
||||
$nomorHpPicMarketing = json_decode($kjpp->nomor_hp_pic_marketing);
|
||||
$detailJoinPimpinan = json_encode(array_map(function ($nama, $nomor) {
|
||||
return [
|
||||
'nama_pimpinan' => $nama->nama_pimpinan,
|
||||
'nomor_hp_pimpinan' => $nomor->nomor_hp_pimpinan
|
||||
];
|
||||
}, $detailNamaPimpinan, $detailNomorHpPimpinan));
|
||||
|
||||
return view('lpj::kjpp.show', compact('jenis_jaminan', 'ijin_usahas', 'ijin_usaha', 'kjpp', 'provinces', 'cities', 'districts', 'villages', 'emailKantor', 'namaPimpinan', 'nomorHpPimpinan', 'namaPicReviewer', 'nomorHpPicReviewer', 'namaPicAdmin', 'nomorHpPicAdmin', 'namaPicMarketing', 'nomorHpPicMarketing'));
|
||||
|
||||
$detailJoinPicReviewer = json_encode(array_map(function ($nama, $nomor) {
|
||||
return [
|
||||
'nama_pic_reviewer' => $nama->nama_pic_reviewer,
|
||||
'nomor_hp_pic_reviewer' => $nomor->nomor_hp_pic_reviewer
|
||||
];
|
||||
}, $detailNamaPicReviewer, $detailNomorHpPicReviewer));
|
||||
|
||||
$detailJoinPicAdmin = json_encode(array_map(function ($nama, $nomor) {
|
||||
return [
|
||||
'nama_pic_admin' => $nama->nama_pic_admin,
|
||||
'nomor_hp_pic_admin' => $nomor->nomor_hp_pic_admin
|
||||
];
|
||||
}, $detailNamaPicAdmin, $detailNomorHpPicAdmin));
|
||||
|
||||
$detailJoinPicMarketing = json_encode(array_map(function ($nama, $nomor) {
|
||||
return [
|
||||
'nama_pic_marketing' => $nama->nama_pic_marketing,
|
||||
'nomor_hp_pic_marketing' => $nomor->nomor_hp_pic_marketing
|
||||
];
|
||||
}, $detailNamaPicMarketing, $detailNomorHpPicMarketing));
|
||||
|
||||
return view('lpj::kjpp.show', compact('jenis_jaminan', 'ijin_usahas', 'ijin_usaha', 'kjpp', 'provinces', 'cities', 'districts', 'villages', 'detailEmailKantor', 'detailJoinPicReviewer', 'detailJoinPicAdmin', 'detailJoinPicMarketing', 'detailJoinPimpinan'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -155,19 +261,49 @@ class KJPPController extends Controller
|
||||
$cities = City::where('province_code', $kjpp->province_code)->get();
|
||||
$districts = District::where('city_code', $kjpp->city_code)->get();
|
||||
$villages = Village::where('district_code', $kjpp->district_code)->get();
|
||||
$detailEmailKantor = json_decode($kjpp->detail_email_kantor);
|
||||
$detailNamaPimpinan = json_decode($kjpp->detail_nama_pimpinan);
|
||||
$detailNomorHpPimpinan = json_decode($kjpp->detail_nomor_hp_pimpinan);
|
||||
$detailNamaPicReviewer = json_decode($kjpp->detail_nama_pic_reviewer);
|
||||
$detailNomorHpPicReviewer = json_decode($kjpp->detail_nomor_hp_pic_reviewer);
|
||||
$detailNamaPicAdmin = json_decode($kjpp->detail_nama_pic_admin);
|
||||
$detailNomorHpPicAdmin = json_decode($kjpp->detail_nomor_hp_pic_admin);
|
||||
$detailNamaPicMarketing = json_decode($kjpp->detail_nama_pic_marketing);
|
||||
$detailNomorHpPicMarketing = json_decode($kjpp->detail_nomor_hp_pic_marketing);
|
||||
|
||||
$emailKantor = json_decode($kjpp->email_kantor);
|
||||
$namaPimpinan = json_decode($kjpp->nama_pimpinan);
|
||||
$nomorHpPimpinan = json_decode($kjpp->nomor_hp_pimpinan);
|
||||
$namaPicReviewer = json_decode($kjpp->nama_pic_reviewer);
|
||||
$nomorHpPicReviewer = json_decode($kjpp->nomor_hp_pic_reviewer);
|
||||
$namaPicAdmin = json_decode($kjpp->nama_pic_admin);
|
||||
$nomorHpPicAdmin = json_decode($kjpp->nomor_hp_pic_admin);
|
||||
$namaPicMarketing = json_decode($kjpp->nama_pic_marketing);
|
||||
$nomorHpPicMarketing = json_decode($kjpp->nomor_hp_pic_marketing);
|
||||
// dd($detailNamaPimpinan);
|
||||
|
||||
$detailJoinPimpinan = json_encode(array_map(function ($nama, $nomor) {
|
||||
return [
|
||||
'nama_pimpinan' => $nama->nama_pimpinan,
|
||||
'nomor_hp_pimpinan' => $nomor->nomor_hp_pimpinan
|
||||
];
|
||||
}, $detailNamaPimpinan, $detailNomorHpPimpinan));
|
||||
|
||||
return view('lpj::kjpp.create', compact('kjpp', 'ijin_usaha', 'jenis_aset', 'provinces', 'cities', 'districts', 'villages', 'emailKantor', 'namaPimpinan', 'nomorHpPimpinan', 'namaPicReviewer', 'nomorHpPicReviewer', 'namaPicAdmin', 'nomorHpPicAdmin', 'namaPicMarketing', 'nomorHpPicMarketing'));
|
||||
// dd($detailJoinPimpinan);
|
||||
|
||||
$detailJoinPicReviewer = json_encode(array_map(function ($nama, $nomor) {
|
||||
return [
|
||||
'nama_pic_reviewer' => $nama->nama_pic_reviewer,
|
||||
'nomor_hp_pic_reviewer' => $nomor->nomor_hp_pic_reviewer
|
||||
];
|
||||
}, $detailNamaPicReviewer, $detailNomorHpPicReviewer));
|
||||
|
||||
$detailJoinPicAdmin = json_encode(array_map(function ($nama, $nomor) {
|
||||
return [
|
||||
'nama_pic_admin' => $nama->nama_pic_admin,
|
||||
'nomor_hp_pic_admin' => $nomor->nomor_hp_pic_admin
|
||||
];
|
||||
}, $detailNamaPicAdmin, $detailNomorHpPicAdmin));
|
||||
|
||||
$detailJoinPicMarketing = json_encode(array_map(function ($nama, $nomor) {
|
||||
return [
|
||||
'nama_pic_marketing' => $nama->nama_pic_marketing,
|
||||
'nomor_hp_pic_marketing' => $nomor->nomor_hp_pic_marketing
|
||||
];
|
||||
}, $detailNamaPicMarketing, $detailNomorHpPicMarketing));
|
||||
|
||||
return view('lpj::kjpp.create', compact('kjpp', 'ijin_usaha', 'jenis_aset', 'provinces', 'cities', 'districts', 'villages', 'detailJoinPicReviewer', 'detailJoinPicAdmin', 'detailJoinPicMarketing', 'detailEmailKantor', 'detailJoinPimpinan'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -177,7 +313,102 @@ class KJPPController extends Controller
|
||||
{
|
||||
$validated = $request->validated();
|
||||
|
||||
// dd($validated);
|
||||
|
||||
if ($validated) {
|
||||
$detailEmailKantor = [];
|
||||
$detailNamaPimpinan = [];
|
||||
$detailNomorHpPimpinan = [];
|
||||
$detailNamaPicReviewer = [];
|
||||
$detailNomorHpPicReviewer = [];
|
||||
$detailNamaPicAdmin = [];
|
||||
$detailNomorHpPicAdmin = [];
|
||||
$detailNamaPicMarketing = [];
|
||||
$detailNomorHpPicMarketing = [];
|
||||
|
||||
$emailKantor = $request->input('detail_email_kantor.email_kantor', []);
|
||||
$namaPimpinan = $request->input('detail_nama_pimpinan.nama_pimpinan', []);
|
||||
$nomorHpPimpinan = $request->input('detail_nomor_hp_pimpinan.nomor_hp_pimpinan', []);
|
||||
$namaPicReviewer = $request->input('detail_nama_pic_reviewer.nama_pic_reviewer', []);
|
||||
$nomorHpPicReviewer = $request->input('detail_nomor_hp_pic_reviewer.nomor_hp_pic_reviewer', []);
|
||||
$namaPicAdmin = $request->input('detail_nama_pic_admin.nama_pic_admin', []);
|
||||
$nomorHpPicAdmin = $request->input('detail_nomor_hp_pic_admin.nomor_hp_pic_admin', []);
|
||||
$namaPicMarketing = $request->input('detail_nama_pic_marketing.nama_pic_marketing', []);
|
||||
$nomorHpPicMarketing = $request->input('detail_nomor_hp_pic_marketing.nomor_hp_pic_marketing', []);
|
||||
|
||||
foreach ($emailKantor as $value) {
|
||||
$detailEmailKantor[] = [
|
||||
'email_kantor' => $value
|
||||
];
|
||||
}
|
||||
// Encode to JSON and store
|
||||
$detailEmailKantorJson = json_encode($detailEmailKantor);
|
||||
|
||||
// Process detail_nama_pimpinan
|
||||
foreach ($namaPimpinan as $value) {
|
||||
$detailNamaPimpinan[] = [
|
||||
'nama_pimpinan' => $value
|
||||
];
|
||||
}
|
||||
$detailNamaPimpinanJson = json_encode($detailNamaPimpinan);
|
||||
|
||||
// Process detail_nomor_hp_pimpinan
|
||||
foreach ($nomorHpPimpinan as $value) {
|
||||
$detailNomorHpPimpinan[] = [
|
||||
'nomor_hp_pimpinan' => $value
|
||||
];
|
||||
}
|
||||
$detailNomorHpPimpinanJson = json_encode($detailNomorHpPimpinan);
|
||||
|
||||
// Process detail_nama_pic_reviewer
|
||||
foreach ($namaPicReviewer as $value) {
|
||||
$detailNamaPicReviewer[] = [
|
||||
'nama_pic_reviewer' => $value
|
||||
];
|
||||
}
|
||||
$detailNamaPicReviewerJson = json_encode($detailNamaPicReviewer);
|
||||
|
||||
// Process detail_nomor_hp_pic_reviewer
|
||||
foreach ($nomorHpPicReviewer as $value) {
|
||||
$detailNomorHpPicReviewer[] = [
|
||||
'nomor_hp_pic_reviewer' => $value
|
||||
];
|
||||
}
|
||||
$detailNomorHpPicReviewerJson = json_encode($detailNomorHpPicReviewer);
|
||||
|
||||
// Process detail_nama_pic_admin
|
||||
foreach ($namaPicAdmin as $value) {
|
||||
$detailNamaPicAdmin[] = [
|
||||
'nama_pic_admin' => $value
|
||||
];
|
||||
}
|
||||
$detailNamaPicAdminJson = json_encode($detailNamaPicAdmin);
|
||||
|
||||
// Process detail_nomor_hp_pic_admin
|
||||
foreach ($nomorHpPicAdmin as $value) {
|
||||
$detailNomorHpPicAdmin[] = [
|
||||
'nomor_hp_pic_admin' => $value
|
||||
];
|
||||
}
|
||||
$detailNomorHpPicAdminJson = json_encode($detailNomorHpPicAdmin);
|
||||
|
||||
// Process detail_nama_pic_marketing
|
||||
foreach ($namaPicMarketing as $value) {
|
||||
$detailNamaPicMarketing[] = [
|
||||
'nama_pic_marketing' => $value
|
||||
];
|
||||
}
|
||||
$detailNamaPicMarketingJson = json_encode($detailNamaPicMarketing);
|
||||
|
||||
// Process detail_nomor_hp_pic_marketing
|
||||
foreach ($nomorHpPicMarketing as $value) {
|
||||
$detailNomorHpPicMarketing[] = [
|
||||
'nomor_hp_pic_marketing' => $value
|
||||
];
|
||||
}
|
||||
$detailNomorHpPicMarketingJson = json_encode($detailNomorHpPicMarketing);
|
||||
|
||||
|
||||
$file = $request->file('attachment');
|
||||
$filename = $file ? time() . '.' . $file->getClientOriginalExtension() : null;
|
||||
|
||||
@@ -197,16 +428,15 @@ class KJPPController extends Controller
|
||||
$validated['attachment'] = $kjpp->attachment ?? 'default.pdf';
|
||||
}
|
||||
|
||||
$validated['email_kantor'] = json_encode($validated['email_kantor']);
|
||||
$validated['nama_pimpinan'] = json_encode($validated['nama_pimpinan']);
|
||||
$validated['nomor_hp_pimpinan'] = json_encode($validated['nomor_hp_pimpinan']);
|
||||
$validated['nama_pic_reviewer'] = json_encode($validated['nama_pic_reviewer']);
|
||||
$validated['nomor_hp_pic_reviewer'] = json_encode($validated['nomor_hp_pic_reviewer']);
|
||||
$validated['nama_pic_admin'] = json_encode($validated['nama_pic_admin']);
|
||||
$validated['nomor_hp_pic_admin'] = json_encode($validated['nomor_hp_pic_admin']);
|
||||
$validated['nama_pic_marketing'] = json_encode($validated['nama_pic_marketing']);
|
||||
$validated['nomor_hp_pic_marketing'] = json_encode($validated['nomor_hp_pic_marketing']);
|
||||
|
||||
$validated['detail_email_kantor'] = $detailEmailKantorJson;
|
||||
$validated['detail_nama_pimpinan'] = $detailNamaPimpinanJson;
|
||||
$validated['detail_nomor_hp_pimpinan'] = $detailNomorHpPimpinanJson;
|
||||
$validated['detail_nama_pic_reviewer'] = $detailNamaPicReviewerJson;
|
||||
$validated['detail_nomor_hp_pic_reviewer'] = $detailNomorHpPicReviewerJson;
|
||||
$validated['detail_nama_pic_admin'] = $detailNamaPicAdminJson;
|
||||
$validated['detail_nomor_hp_pic_admin'] = $detailNomorHpPicAdminJson;
|
||||
$validated['detail_nama_pic_marketing'] = $detailNamaPicMarketingJson;
|
||||
$validated['detail_nomor_hp_pic_marketing'] = $detailNomorHpPicMarketingJson;
|
||||
$validated['ijin_usaha_id'] = json_encode($validated['ijin_usaha_id']);
|
||||
if (empty($validated['jenis_aset_id'])) {
|
||||
$validated['jenis_aset_id'] = json_encode([]);
|
||||
@@ -214,8 +444,6 @@ class KJPPController extends Controller
|
||||
$validated['jenis_aset_id'] = json_encode($validated['jenis_aset_id']);
|
||||
}
|
||||
|
||||
// dd($validated);
|
||||
|
||||
// Perbarui data di database
|
||||
KJPP::where('id', $id)->update($validated);
|
||||
|
||||
|
||||
@@ -22,43 +22,24 @@ class KJPPRequest extends FormRequest
|
||||
'address' => 'required',
|
||||
'postal_code' => 'nullable|numeric',
|
||||
'nomor_telepon_kantor' => 'nullable|numeric|digits_between:8,15',
|
||||
|
||||
// Validasi email kantor
|
||||
'email_kantor' => 'array',
|
||||
'email_kantor.*' => 'required|email',
|
||||
|
||||
// Validasi nama pimpinan
|
||||
'nama_pimpinan' => 'array',
|
||||
'nama_pimpinan.*' => 'required|not_regex:/^\d+$/|max:255',
|
||||
|
||||
// Validasi nomor HP pimpinan
|
||||
'nomor_hp_pimpinan' => 'array',
|
||||
'nomor_hp_pimpinan.*' => 'required|numeric|digits_between:10,15',
|
||||
|
||||
// Validasi nama PIC Reviewer
|
||||
'nama_pic_reviewer' => 'nullable|array',
|
||||
'nama_pic_reviewer.*' => 'nullable|not_regex:/^\d+$/|max:255',
|
||||
|
||||
// Validasi nomor HP PIC Reviewer
|
||||
'nomor_hp_pic_reviewer' => 'array',
|
||||
'nomor_hp_pic_reviewer.*' => 'nullable|numeric|digits_between:10,15',
|
||||
|
||||
// Validasi nama PIC Admin
|
||||
'nama_pic_admin' => 'array',
|
||||
'nama_pic_admin.*' => 'nullable|not_regex:/^\d+$/|max:255',
|
||||
|
||||
// Validasi nomor HP PIC Admin
|
||||
'nomor_hp_pic_admin' => 'array',
|
||||
'nomor_hp_pic_admin.*' => 'nullable|numeric|digits_between:10,15',
|
||||
|
||||
// Validasi nama PIC Marketing
|
||||
'nama_pic_marketing' => 'array',
|
||||
'nama_pic_marketing.*' => 'nullable|not_regex:/^\d+$/|max:255',
|
||||
|
||||
// Validasi nomor HP PIC Marketing
|
||||
'nomor_hp_pic_marketing' => 'array',
|
||||
'nomor_hp_pic_marketing.*' => 'nullable|numeric|digits_between:10,15',
|
||||
|
||||
'email_kantor' => 'required|email',
|
||||
'detail_email_kantor' => 'nullable',
|
||||
'nama_pimpinan' => 'required|string|not_regex:/^\d+$/|max:255',
|
||||
'detail_nama_pimpinan' => 'nullable',
|
||||
'nomor_hp_pimpinan' => 'required|numeric|digits_between:10,15',
|
||||
'detail_nomor_pic_pimpinan' => 'nullable',
|
||||
'nama_pic_reviewer' => 'nullable|string|not_regex:/^\d+$/|max:255',
|
||||
'detail_nama_pic_reviewer' => 'nullable',
|
||||
'nomor_hp_pic_reviewer' => 'nullable|numeric|digits_between:10,15',
|
||||
'detail_nomor_hp_pic_reviewer' => 'nullable',
|
||||
'nama_pic_admin' => 'nullable|string|not_regex:/^\d+$/|max:255',
|
||||
'detail_nama_pic_admin' => 'nullable',
|
||||
'nomor_hp_pic_admin' => 'nullable|numeric|digits_between:10,15',
|
||||
'detail_nomor_hp_pic_admin' => 'nullable',
|
||||
'nama_pic_marketing' => 'nullable|string|not_regex:/^\d+$/|max:255',
|
||||
'detail_nama_pic_marketing' => 'nullable',
|
||||
'nomor_hp_pic_marketing' => 'nullable|numeric|digits_between:10,15',
|
||||
'detail_nomor_hp_pic_marketing' => 'nullable',
|
||||
'ijin_usaha_id' => 'required|array',
|
||||
'ijin_usaha_id.*' => 'exists:ijin_usaha,code',
|
||||
'jenis_aset_id' => 'nullable|array',
|
||||
@@ -86,45 +67,6 @@ class KJPPRequest extends FormRequest
|
||||
public function messages(): array
|
||||
{
|
||||
return [
|
||||
// Pesan untuk email kantor
|
||||
'email_kantor.*.required' => 'Email Kantor Wajib diisi!',
|
||||
'email_kantor.*.email' => 'Email Kantor tidak valid!',
|
||||
|
||||
// Pesan untuk nama pimpinan
|
||||
'nama_pimpinan.*.required' => 'Nama Pimpinan Wajib diisi!',
|
||||
'nama_pimpinan.*.not_regex' => 'Nama Pimpinan harus berupa huruf!',
|
||||
'nama_pimpinan.*.max' => 'Nama Pimpinan maksimal 255 huruf!',
|
||||
|
||||
// Pesan untuk nomor HP pimpinan
|
||||
'nomor_hp_pimpinan.*.required' => 'Nomor HP Pimpinan Wajib diisi!',
|
||||
'nomor_hp_pimpinan.*.numeric' => 'Nomor HP Pimpinan harus berupa angka!',
|
||||
'nomor_hp_pimpinan.*.digits_between' => 'Nomor HP Pimpinan minimum 10 digit dan maksimum 15 digit!',
|
||||
|
||||
// Pesan untuk nama PIC Reviewer
|
||||
'nama_pic_reviewer.*.not_regex' => 'Nama PIC Reviewer harus berupa huruf!',
|
||||
'nama_pic_reviewer.*.max' => 'Nama PIC Reviewer maksimal 255 huruf!',
|
||||
|
||||
// Pesan untuk nomor HP PIC Reviewer
|
||||
'nomor_hp_pic_reviewer.*.numeric' => 'Nomor HP PIC Reviewer harus berupa angka!',
|
||||
'nomor_hp_pic_reviewer.*.digits_between' => 'Nomor HP PIC Reviewer minimum 10 digit dan maksimum 15 digit!',
|
||||
|
||||
// Pesan untuk nama PIC Admin
|
||||
'nama_pic_admin.*.not_regex' => 'Nama PIC Admin harus berupa huruf!',
|
||||
'nama_pic_admin.*.max' => 'Nama PIC Admin maksimal 255 huruf!',
|
||||
|
||||
// Pesan untuk nomor HP PIC Admin
|
||||
'nomor_hp_pic_admin.*.numeric' => 'Nomor HP PIC Admin harus berupa angka!',
|
||||
'nomor_hp_pic_admin.*.digits_between' => 'Nomor HP PIC Admin minimum 10 digit dan maksimum 15 digit!',
|
||||
|
||||
// Pesan untuk nama PIC Marketing
|
||||
'nama_pic_marketing.*.not_regex' => 'Nama PIC Marketing harus berupa huruf!',
|
||||
'nama_pic_marketing.*.max' => 'Nama PIC Marketing maksimal 255 huruf!',
|
||||
|
||||
// Pesan untuk nomor HP PIC Marketing
|
||||
'nomor_hp_pic_marketing.*.numeric' => 'Nomor HP PIC Marketing harus berupa angka!',
|
||||
'nomor_hp_pic_marketing.*.digits_between' => 'Nomor HP PIC Marketing minimum 10 digit dan maksimum 15 digit!',
|
||||
|
||||
// Pesan lainnya tetap sama
|
||||
'code.required' => 'Kode KJPP Wajib diisi!',
|
||||
'code.max' => 'Kode KJPP maksimal 255 huruf!',
|
||||
'code.unique' => 'Kode KJPP tidak boleh sama!',
|
||||
@@ -139,6 +81,22 @@ class KJPPRequest extends FormRequest
|
||||
'address.required' => 'Alamat Kantor Wajib diisi!',
|
||||
'nomor_telepon_kantor.numeric' => 'Nomor Telepon Kantor harus berupa angka!',
|
||||
'nomor_telepon_kantor.digits_between' => 'Nomor Telepon Kantor minimum 8 digit dan maksimum 15 digit!',
|
||||
'email_kantor.required' => 'Email Kantor Wajib diisi!',
|
||||
'email_kantor.email' => 'Email Kantor tidak valid!',
|
||||
'nama_pimpinan.required' => 'Nama Pimpinan Wajib diisi!',
|
||||
'nama_pimpinan.not_regex' => 'Nama Pimpinan harus berupa huruf!',
|
||||
'nomor_hp_pimpinan.required' => 'Nomor HP Pimpinan Wajib diisi!',
|
||||
'nomor_hp_pimpinan.numeric' => 'Nomor HP Pimpinan harus berupa angka!',
|
||||
'nomor_hp_pimpinan.digits_between' => 'Nomor HP Pimpinan minimum 10 digit dan maksimum 15 digit!',
|
||||
'nama_pic_reviewer.not_regex' => 'Nama PIC Reviewer harus berupa huruf!',
|
||||
'nomor_hp_pic_reviewer.numeric' => 'Nomor HP PIC Reviewer harus berupa angka!',
|
||||
'nomor_hp_pic_reviewer.digits_between' => 'Nomor HP PIC Reviewer minimum 10 digit dan maksimum 15 digit!',
|
||||
'nama_pic_admin.not_regex' => 'Nama PIC Admin harus berupa huruf!',
|
||||
'nomor_hp_pic_admin.numeric' => 'Nomor HP PIC Admin harus berupa angka!',
|
||||
'nomor_hp_pic_admin.digits_between' => 'Nomor HP PIC Admin minimum 10 digit dan maksimum 15 digit!',
|
||||
'nama_pic_marketing.not_regex' => 'Nama PIC Marketing harus berupa huruf!',
|
||||
'nomor_hp_pic_marketing.numeric' => 'Nomor HP PIC Marketing harus berupa angka!',
|
||||
'nomor_hp_pic_marketing.digits_between' => 'Nomor HP PIC Marketing minimum 10 digit dan maksimum 15 digit!',
|
||||
'ijin_usaha_id.required' => 'Ijin Usaha Wajib diisi!',
|
||||
'attachment.mimes' => 'Attachment harus berformat pdf!',
|
||||
'attachment.max' => 'Attachment berukuran maksimum 1 MB!',
|
||||
|
||||
@@ -31,13 +31,13 @@ class LpjDatabaseSeeder extends Seeder
|
||||
JenisPenilaianSeeder::class,
|
||||
IjinUsahaSeeder::class,
|
||||
TujuanPenilaianKJPPSeeder::class,
|
||||
KJPPSeeder::class,
|
||||
JenisLaporanSeeder::class,
|
||||
// KJPPSeeder::class,
|
||||
// DebitureSeeder::class,
|
||||
// PemilikJaminanSeeder::class,
|
||||
// DokumenJaminanSeeder::class,
|
||||
// DetailDokumenJaminanSeeder::class,
|
||||
// PermohonanSeeder::class,
|
||||
DebitureSeeder::class,
|
||||
PemilikJaminanSeeder::class,
|
||||
DokumenJaminanSeeder::class,
|
||||
DetailDokumenJaminanSeeder::class,
|
||||
PermohonanSeeder::class,
|
||||
// PenawaranSeeder::class,
|
||||
// DetailPenawaranSeeder::class,
|
||||
// PenilaianSeeder::class,
|
||||
|
||||
@@ -223,36 +223,31 @@
|
||||
Email Kantor
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full gap-1.5">
|
||||
<input class="input @error('email_kantor.0') border-danger @enderror" type="text"
|
||||
name="email_kantor[]" value="{{ $emailKantor[0] ?? old('email_kantor.0') }}">
|
||||
@error('email_kantor.0')
|
||||
<input class="input @error('email_kantor') border-danger @enderror" type="text"
|
||||
name="email_kantor" value="{{ $kjpp->email_kantor ?? old('email_kantor') }}">
|
||||
@error('email_kantor')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
<div id="detail_email_kantor" class="flex flex-wrap items-center w-full gap-2">
|
||||
@if (is_array(old('email_kantor', $emailKantor)) && count(old('email_kantor', $emailKantor)) > 1)
|
||||
@foreach (old('email_kantor', $emailKantor) as $index => $email)
|
||||
@if ($index > 0 && !empty($email))
|
||||
<div
|
||||
class="flex flex-col lg:flex-row gap-2 items-baseline lg:items-center w-full">
|
||||
@if (isset($kjpp->detail_email_kantor))
|
||||
@foreach ($detailEmailKantor as $detail_email_kantor)
|
||||
<div class="flex flex-col lg:flex-row gap-2 items-baseline lg:items-center w-full">
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input
|
||||
class="input @error('email_kantor.' . $index) border-danger @enderror"
|
||||
type="text" name="email_kantor[]"
|
||||
value="{{ old('email_kantor.' . $index, $email) }}">
|
||||
@error('email_kantor.' . $index)
|
||||
<input class="input @error('email_kantor') border-danger @enderror"
|
||||
type="text" name="detail_email_kantor[email_kantor][]"
|
||||
value="{{ $detail_email_kantor->email_kantor ?? old('detail_email_kantor.email_kantor') }}">
|
||||
@error('email_kantor')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
<button type="button"
|
||||
class="btn btn-danger btn-xs delete-button-edit">Hapus</button>
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
</div>
|
||||
<button type="button" id="tambah_email_kantor" class="btn btn-primary btn-xs">Tambah Email
|
||||
Kantor</button>
|
||||
<button type="button" id="tambah_email_kantor" class="btn btn-primary btn-xs">Tambah
|
||||
Email Kantor</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
@@ -260,9 +255,9 @@
|
||||
Nama Pimpinan
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('nama_pimpinan.0') border-danger @enderror" type="text"
|
||||
name="nama_pimpinan[]" value="{{ $namaPimpinan[0] ?? old('nama_pimpinan.0') }}">
|
||||
@error('nama_pimpinan.0')
|
||||
<input class="input @error('nama_pimpinan') border-danger @enderror" type="text"
|
||||
name="nama_pimpinan" value="{{ $kjpp->nama_pimpinan ?? old('nama_pimpinan') }}">
|
||||
@error('nama_pimpinan')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
@@ -270,50 +265,47 @@
|
||||
Nomor HP Pimpinan
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('nomor_hp_pimpinan.0') border-danger @enderror" type="text"
|
||||
name="nomor_hp_pimpinan[]"
|
||||
value="{{ $nomorHpPimpinan[0] ?? old('nomor_hp_pimpinan.0') }}">
|
||||
@error('nomor_hp_pimpinan.0')
|
||||
<input class="input @error('nomor_hp_pimpinan') border-danger @enderror" type="text"
|
||||
name="nomor_hp_pimpinan"
|
||||
value="{{ $kjpp->nomor_hp_pimpinan ?? old('nomor_hp_pimpinan') }}">
|
||||
@error('nomor_hp_pimpinan')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap">
|
||||
<div id="detail_nama_pimpinan" class="flex flex-wrap items-baseline w-full gap-2.5">
|
||||
@if (is_array($namaPimpinan) && is_array(old('nama_pimpinan', $namaPimpinan)))
|
||||
@foreach (old('nama_pimpinan', $namaPimpinan) as $index => $pimpinan)
|
||||
@php
|
||||
$nomorHp = old('nomor_hp_pimpinan.' . $index, $nomorHpPimpinan[$index] ?? '');
|
||||
@endphp
|
||||
@if ($index > 0 && (!empty($pimpinan) || !empty($nomorHp)))
|
||||
@if (isset($kjpp->detail_nama_pimpinan) && isset($kjpp->detail_nomor_hp_pimpinan))
|
||||
@foreach (json_decode($detailJoinPimpinan) as $detail_pimpinan)
|
||||
<div class="flex flex-col lg:flex-row gap-2 items-baseline lg:items-center w-full">
|
||||
<label class="form-label max-w-56">Nama Pimpinan</label>
|
||||
<label class="form-label max-w-56">
|
||||
Nama Pimpinan
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input
|
||||
class="input @error('nama_pimpinan.' . $index) border-danger @enderror"
|
||||
type="text" name="nama_pimpinan[]"
|
||||
value="{{ old('nama_pimpinan.' . $index, $pimpinan) }}">
|
||||
@error('nama_pimpinan.' . $index)
|
||||
<input class="input @error('nama_pimpinan') border-danger @enderror"
|
||||
type="text" name="detail_nama_pimpinan[nama_pimpinan][]"
|
||||
value="{{ $detail_pimpinan->nama_pimpinan ?? old('detail_nama_pimpinan.nama_pimpinan') }}">
|
||||
@error('nama_pimpinan')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
<label class="form-label max-w-56">Nomor HP Pimpinan</label>
|
||||
<label class="form-label max-w-56">
|
||||
Nomor HP Pimpinan
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input
|
||||
class="input @error('nomor_hp_pimpinan.' . $index) border-danger @enderror"
|
||||
type="text" name="nomor_hp_pimpinan[]"
|
||||
value="{{ $nomorHp }}">
|
||||
@error('nomor_hp_pimpinan.' . $index)
|
||||
<input class="input @error('nomor_hp_pimpinan') border-danger @enderror"
|
||||
type="text" name="detail_nomor_hp_pimpinan[nomor_hp_pimpinan][]"
|
||||
value="{{ $detail_pimpinan->nomor_hp_pimpinan ?? old('detail_nomor_hp_pimpinan.nomor_hp_pimpinan') }}">
|
||||
@error('nomor_hp_pimpinan')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
<button type="button"
|
||||
class="btn btn-danger btn-xs delete-button-edit">Hapus</button>
|
||||
<button type="button" class="btn btn-danger btn-xs delete-button-edit">
|
||||
Hapus
|
||||
</button>
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
@@ -330,10 +322,10 @@
|
||||
Nama PIC Reviewer
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('nama_pic_reviewer.0') border-danger @enderror" type="text"
|
||||
name="nama_pic_reviewer[]"
|
||||
value="{{ $namaPicReviewer[0] ?? old('nama_pic_reviewer.0') }}">
|
||||
@error('nama_pic_reviewer.0')
|
||||
<input class="input @error('nama_pic_reviewer') border-danger @enderror" type="text"
|
||||
name="nama_pic_reviewer"
|
||||
value="{{ $kjpp->nama_pic_reviewer ?? old('nama_pic_reviewer') }}">
|
||||
@error('nama_pic_reviewer')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
@@ -341,61 +333,46 @@
|
||||
Nomor HP PIC Reviewer
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('nomor_hp_pic_reviewer.0') border-danger @enderror"
|
||||
type="text" name="nomor_hp_pic_reviewer[]"
|
||||
value="{{ $nomorHpPicReviewer[0] ?? old('nomor_hp_pic_reviewer.0') }}">
|
||||
@error('nomor_hp_pic_reviewer.0')
|
||||
<input class="input @error('nomor_hp_pic_reviewer') border-danger @enderror" type="text"
|
||||
name="nomor_hp_pic_reviewer"
|
||||
value="{{ $kjpp->nomor_hp_pic_reviewer ?? old('nomor_hp_pic_reviewer') }}">
|
||||
@error('nomor_hp_pic_reviewer')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap">
|
||||
<div id="detail_nama_pic_reviewer" class="flex flex-wrap items-baseline w-full gap-2.5">
|
||||
@if (is_array(old('nama_pic_reviewer', $namaPicReviewer)) && is_array(old('nomor_hp_pic_reviewer', $nomorHpPicReviewer)))
|
||||
@foreach (old('nama_pic_reviewer', $namaPicReviewer) as $index => $picReviewer)
|
||||
@php
|
||||
$nomorHpReviewer = old(
|
||||
'nomor_hp_pic_reviewer.' . $index,
|
||||
$nomorHpPicReviewer[$index] ?? '',
|
||||
);
|
||||
@endphp
|
||||
@if ($index > 0 && (!empty($picReviewer) || !empty($nomorHpReviewer)))
|
||||
@if (isset($kjpp->detail_nama_pic_reviewer) && isset($kjpp->detail_nomor_hp_pic_reviewer))
|
||||
@foreach (json_decode($detailJoinPicReviewer) as $detail_pic_reviewer)
|
||||
<div class="flex flex-col lg:flex-row gap-2 items-baseline lg:items-center w-full">
|
||||
<!-- Nama PIC Reviewer -->
|
||||
<div
|
||||
class="flex flex-col lg:flex-row gap-2 items-baseline lg:items-center w-full">
|
||||
<label class="form-label max-w-56">Nama PIC Reviewer</label>
|
||||
<label class="form-label max-w-56">
|
||||
Nama PIC Reviewer
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input
|
||||
class="input @error('nama_pic_reviewer.' . $index) border-danger @enderror"
|
||||
type="text" name="nama_pic_reviewer[]"
|
||||
value="{{ old('nama_pic_reviewer.' . $index, $picReviewer) }}">
|
||||
@error('nama_pic_reviewer.' . $index)
|
||||
<input class="input @error('nama_pic_reviewer') border-danger @enderror"
|
||||
type="text" name="detail_nama_pic_reviewer[nama_pic_reviewer][]"
|
||||
value="{{ $detail_pic_reviewer->nama_pic_reviewer ?? old('detail_nama_pic_reviewer.nama_pic_reviewer') }}">
|
||||
@error('nama_pic_reviewer')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Nomor HP PIC Reviewer -->
|
||||
<div
|
||||
class="flex flex-col lg:flex-row gap-2 items-baseline lg:items-center w-full">
|
||||
<label class="form-label max-w-56">Nomor HP PIC Reviewer</label>
|
||||
<label class="form-label max-w-56">
|
||||
Nomor HP PIC Reviewer
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input
|
||||
class="input @error('nomor_hp_pic_reviewer.' . $index) border-danger @enderror"
|
||||
type="text" name="nomor_hp_pic_reviewer[]"
|
||||
value="{{ $nomorHpReviewer }}">
|
||||
@error('nomor_hp_pic_reviewer.' . $index)
|
||||
<input class="input @error('nomor_hp_pic_reviewer') border-danger @enderror"
|
||||
type="text"
|
||||
name="detail_nomor_hp_pic_reviewer[nomor_hp_pic_reviewer][]"
|
||||
value="{{ $detail_pic_reviewer->nomor_hp_pic_reviewer ?? old('detail_nomor_hp_pic_reviewer.nomor_hp_pic_reviewer') }}">
|
||||
@error('nomor_hp_pic_reviewer')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
<button type="button" class="btn btn-danger btn-xs delete-button-edit">
|
||||
Hapus
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Tombol Hapus -->
|
||||
<button type="button"
|
||||
class="btn btn-danger btn-xs delete-button-edit">Hapus</button>
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
@@ -414,9 +391,9 @@
|
||||
Nama PIC Admin
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('nama_pic_admin.0') border-danger @enderror" type="text"
|
||||
name="nama_pic_admin[]" value="{{ $namaPicAdmin[0] ?? old('nama_pic_admin.0') }}">
|
||||
@error('nama_pic_admin.0')
|
||||
<input class="input @error('nama_pic_admin') border-danger @enderror" type="text"
|
||||
name="nama_pic_admin" value="{{ $kjpp->nama_pic_admin ?? old('nama_pic_admin') }}">
|
||||
@error('nama_pic_admin')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
@@ -424,55 +401,45 @@
|
||||
Nomor HP PIC Admin
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('nomor_hp_pic_admin.0') border-danger @enderror" type="text"
|
||||
name="nomor_hp_pic_admin[]"
|
||||
value="{{ $nomorHpPicAdmin[0] ?? old('nomor_hp_pic_admin.0') }}">
|
||||
@error('nomor_hp_pic_admin.0')
|
||||
<input class="input @error('nomor_hp_pic_admin') border-danger @enderror" type="text"
|
||||
name="nomor_hp_pic_admin"
|
||||
value="{{ $kjpp->nomor_hp_pic_admin ?? old('nomor_hp_pic_admin') }}">
|
||||
@error('nomor_hp_pic_admin')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap">
|
||||
<div id="detail_nama_pic_admin" class="flex flex-wrap items-baseline w-full gap-2.5">
|
||||
@if (is_array(old('nama_pic_admin', $namaPicAdmin)) && is_array(old('nomor_hp_pic_admin', $nomorHpPicAdmin)))
|
||||
@foreach (old('nama_pic_admin', $namaPicAdmin) as $index => $picAdmin)
|
||||
@php
|
||||
$nomorHpAdmin = old(
|
||||
'nomor_hp_pic_admin.' . $index,
|
||||
$nomorHpPicAdmin[$index] ?? '',
|
||||
);
|
||||
@endphp
|
||||
@if ($index > 0 && (!empty($picAdmin) || !empty($nomorHpAdmin)))
|
||||
@if (isset($kjpp->detail_nama_pic_admin) && isset($kjpp->detail_nomor_hp_pic_admin))
|
||||
@foreach (json_decode($detailJoinPicAdmin) as $detail_pic_admin)
|
||||
<div class="flex flex-col lg:flex-row gap-2 items-baseline lg:items-center w-full">
|
||||
<!-- Nama PIC Admin -->
|
||||
<label class="form-label max-w-56">Nama PIC Admin</label>
|
||||
<label class="form-label max-w-56">
|
||||
Nama PIC Admin
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input
|
||||
class="input @error('nama_pic_admin.' . $index) border-danger @enderror"
|
||||
type="text" name="nama_pic_admin[]"
|
||||
value="{{ old('nama_pic_admin.' . $index, $picAdmin) }}">
|
||||
@error('nama_pic_admin.' . $index)
|
||||
<input class="input @error('nama_pic_admin') border-danger @enderror"
|
||||
type="text" name="detail_nama_pic_admin[nama_pic_admin][]"
|
||||
value="{{ $detail_pic_admin->nama_pic_admin ?? old('detail_nama_pic_admin.nama_pic_admin') }}">
|
||||
@error('nama_pic_admin')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<!-- Nomor HP PIC Admin -->
|
||||
<label class="form-label max-w-56">Nomor HP PIC Admin</label>
|
||||
<label class="form-label max-w-56">
|
||||
Nomor HP PIC Admin
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input
|
||||
class="input @error('nomor_hp_pic_admin.' . $index) border-danger @enderror"
|
||||
type="text" name="nomor_hp_pic_admin[]"
|
||||
value="{{ $nomorHpAdmin }}">
|
||||
@error('nomor_hp_pic_admin.' . $index)
|
||||
<input class="input @error('nomor_hp_pic_admin') border-danger @enderror"
|
||||
type="text" name="detail_nomor_hp_pic_admin[nomor_hp_pic_admin][]"
|
||||
value="{{ $detail_pic_admin->nomor_hp_pic_admin ?? old('detail_nomor_hp_pic_admin.nomor_hp_pic_admin') }}">
|
||||
@error('nomor_hp_pic_admin')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<!-- Tombol Hapus -->
|
||||
<button type="button"
|
||||
class="btn btn-danger btn-xs delete-button-edit">Hapus</button>
|
||||
<button type="button" class="btn btn-danger btn-xs delete-button-edit">
|
||||
Hapus
|
||||
</button>
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
@@ -491,10 +458,10 @@
|
||||
Nama PIC Marketing
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('nama_pic_marketing.0') border-danger @enderror" type="text"
|
||||
name="nama_pic_marketing[]"
|
||||
value="{{ $namaPicMarketing[0] ?? old('nama_pic_marketing.0') }}">
|
||||
@error('nama_pic_marketing.0')
|
||||
<input class="input @error('nama_pic_marketing') border-danger @enderror" type="text"
|
||||
name="nama_pic_marketing"
|
||||
value="{{ $kjpp->nama_pic_marketing ?? old('nama_pic_marketing') }}">
|
||||
@error('nama_pic_marketing')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
@@ -502,59 +469,49 @@
|
||||
Nomor HP PIC Marketing
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('nomor_hp_pic_marketing.0') border-danger @enderror"
|
||||
type="text" name="nomor_hp_pic_marketing[]"
|
||||
value="{{ $nomorHpPicMarketing[0] ?? old('nomor_hp_pic_marketing.0') }}">
|
||||
@error('nomor_hp_pic_marketing.0')
|
||||
<input class="input @error('nomor_hp_pic_marketing') border-danger @enderror"
|
||||
type="text" name="nomor_hp_pic_marketing"
|
||||
value="{{ $kjpp->nomor_hp_pic_marketing ?? old('nomor_hp_pic_marketing') }}">
|
||||
@error('nomor_hp_pic_marketing')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap">
|
||||
<div id="detail_nama_pic_marketing" class="flex flex-wrap items-baseline w-full gap-2.5">
|
||||
@if (is_array(old('nama_pic_marketing', $namaPicMarketing)) &&
|
||||
is_array(old('nomor_hp_pic_marketing', $nomorHpPicMarketing)))
|
||||
@foreach (old('nama_pic_marketing', $namaPicMarketing) as $index => $picMarketing)
|
||||
@php
|
||||
$nomorHpMarketing = old(
|
||||
'nomor_hp_pic_marketing.' . $index,
|
||||
$nomorHpPicMarketing[$index] ?? '',
|
||||
);
|
||||
@endphp
|
||||
@if ($index > 0 && (!empty($picMarketing) || !empty($nomorHpMarketing)))
|
||||
@if (isset($kjpp->detail_nama_pic_marketing) && isset($kjpp->detail_nomor_hp_pic_marketing))
|
||||
@foreach (json_decode($detailJoinPicMarketing) as $detail_pic_marketing)
|
||||
<div class="flex flex-col lg:flex-row gap-2 items-baseline lg:items-center w-full">
|
||||
<!-- Nama PIC Marketing -->
|
||||
<label class="form-label max-w-56">Nama PIC Marketing</label>
|
||||
<label class="form-label max-w-56">
|
||||
Nama PIC Marketing
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input
|
||||
class="input @error('nama_pic_marketing.' . $index) border-danger @enderror"
|
||||
type="text" name="nama_pic_marketing[]"
|
||||
value="{{ old('nama_pic_marketing.' . $index, $picMarketing) }}">
|
||||
@error('nama_pic_marketing.' . $index)
|
||||
<input class="input @error('nama_pic_marketing') border-danger @enderror"
|
||||
type="text" name="detail_nama_pic_marketing[nama_pic_marketing][]"
|
||||
value="{{ $detail_pic_marketing->nama_pic_marketing ?? old('detail_nama_pic_marketing.nama_pic_marketing') }}">
|
||||
@error('nama_pic_marketing')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<!-- Nomor HP PIC Marketing -->
|
||||
<label class="form-label max-w-56">Nomor HP PIC Marketing</label>
|
||||
<label class="form-label max-w-56">
|
||||
Nomor HP PIC Marketing
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input
|
||||
class="input @error('nomor_hp_pic_marketing.' . $index) border-danger @enderror"
|
||||
type="text" name="nomor_hp_pic_marketing[]"
|
||||
value="{{ $nomorHpMarketing }}">
|
||||
@error('nomor_hp_pic_marketing.' . $index)
|
||||
class="input @error('nomor_hp_pic_marketing') border-danger @enderror"
|
||||
type="text"
|
||||
name="detail_nomor_hp_pic_marketing[nomor_hp_pic_marketing][]"
|
||||
value="{{ $detail_pic_marketing->nomor_hp_pic_marketing ?? old('detail_nomor_hp_pic_marketing.nomor_hp_pic_marketing') }}">
|
||||
@error('nomor_hp_pic_marketing')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<!-- Tombol Hapus -->
|
||||
<button type="button"
|
||||
class="btn btn-danger btn-xs delete-button-edit">Hapus</button>
|
||||
<button type="button" class="btn btn-danger btn-xs delete-button-edit">
|
||||
Hapus
|
||||
</button>
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
newDiv.className = "flex flex-col lg:flex-row gap-2 items-baseline lg:items-center w-full";
|
||||
newDiv.innerHTML = `
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input" type="text" name="email_kantor[]" value="">
|
||||
<input class="input" type="text" name="detail_email_kantor[email_kantor][]" value="">
|
||||
</div>
|
||||
<button type="button" class="btn btn-danger btn-xs delete-button">Hapus</button>
|
||||
`;
|
||||
@@ -51,13 +51,13 @@
|
||||
Nama Pimpinan
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input" type="text" name="nama_pimpinan[]" value="">
|
||||
<input class="input" type="text" name="detail_nama_pimpinan[nama_pimpinan][]" value="">
|
||||
</div>
|
||||
<label class="form-label max-w-56">
|
||||
Nomor HP Pimpinan
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input" type="text" name="nomor_hp_pimpinan[]" value="">
|
||||
<input class="input" type="text" name="detail_nomor_hp_pimpinan[nomor_hp_pimpinan][]" value="">
|
||||
</div>
|
||||
<button type="button" class="btn btn-danger btn-xs delete-button">Hapus</button>
|
||||
`;
|
||||
@@ -76,13 +76,13 @@
|
||||
Nama PIC Reviewer
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input" type="text" name="nama_pic_reviewer[]" value="">
|
||||
<input class="input" type="text" name="detail_nama_pic_reviewer[nama_pic_reviewer][]" value="">
|
||||
</div>
|
||||
<label class="form-label max-w-56">
|
||||
Nomor HP PIC Reviewer
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input" type="text" name="nomor_hp_pic_reviewer[]" value="">
|
||||
<input class="input" type="text" name="detail_nomor_hp_pic_reviewer[nomor_hp_pic_reviewer][]" value="">
|
||||
</div>
|
||||
<button type="button" class="btn btn-danger btn-xs delete-button">Hapus</button>
|
||||
`;
|
||||
@@ -101,13 +101,13 @@
|
||||
Nama PIC Admin
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input" type="text" name="nama_pic_admin[]" value="">
|
||||
<input class="input" type="text" name="detail_nama_pic_admin[nama_pic_admin][]" value="">
|
||||
</div>
|
||||
<label class="form-label max-w-56">
|
||||
Nomor HP PIC Admin
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input" type="text" name="nomor_hp_pic_admin[]" value="">
|
||||
<input class="input" type="text" name="detail_nomor_hp_pic_admin[nomor_hp_pic_admin][]" value="">
|
||||
</div>
|
||||
<button type="button" class="btn btn-danger btn-xs delete-button">Hapus</button>
|
||||
`;
|
||||
@@ -126,13 +126,13 @@
|
||||
Nama PIC Marketing
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input" type="text" name="nama_pic_marketing[]" value="">
|
||||
<input class="input" type="text" name="detail_nama_pic_marketing[nama_pic_marketing][]" value="">
|
||||
</div>
|
||||
<label class="form-label max-w-56">
|
||||
Nomor HP PIC Marketing
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input" type="text" name="nomor_hp_pic_marketing[]" value="">
|
||||
<input class="input" type="text" name="detail_nomor_hp_pic_marketing[nomor_hp_pic_marketing][]" value="">
|
||||
</div>
|
||||
<button type="button" class="btn btn-danger btn-xs delete-button">Hapus</button>
|
||||
`;
|
||||
|
||||
@@ -95,16 +95,13 @@
|
||||
Email Kantor
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
@if (isset($emailKantor) && count($emailKantor) > 0)
|
||||
@foreach ($emailKantor as $email)
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $kjpp->email_kantor }}</p>
|
||||
@if (isset($kjpp->detail_email_kantor))
|
||||
@foreach (json_decode($kjpp->detail_email_kantor) as $detail_email_kantor)
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">
|
||||
{{ $email }}
|
||||
{{ $detail_email_kantor->email_kantor }}
|
||||
</p>
|
||||
@endforeach
|
||||
@else
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">
|
||||
-
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@@ -113,32 +110,26 @@
|
||||
Nama Pimpinan
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
@if (isset($namaPimpinan) && count($namaPimpinan) > 0)
|
||||
@foreach ($namaPimpinan as $pimpinan)
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $kjpp->nama_pimpinan }}</p>
|
||||
@if (isset($kjpp->detail_nama_pimpinan))
|
||||
@foreach (json_decode($detailJoinPimpinan) as $detail_nama_pimpinan)
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">
|
||||
{{ $pimpinan }}
|
||||
{{ $detail_nama_pimpinan->nama_pimpinan }}
|
||||
</p>
|
||||
@endforeach
|
||||
@else
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">
|
||||
-
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
<label class="form-label max-w-56">
|
||||
Nomor HP Pimpinan
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
@if (isset($nomorHpPimpinan) && count($nomorHpPimpinan) > 0)
|
||||
@foreach ($nomorHpPimpinan as $hp_pimpinan)
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $kjpp->nomor_hp_pimpinan }}</p>
|
||||
@if (isset($kjpp->detail_nomor_hp_pimpinan))
|
||||
@foreach (json_decode($detailJoinPimpinan) as $detail_nomor_hp_pimpinan)
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">
|
||||
{{ $hp_pimpinan }}
|
||||
{{ $detail_nomor_hp_pimpinan->nomor_hp_pimpinan }}
|
||||
</p>
|
||||
@endforeach
|
||||
@else
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">
|
||||
-
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@@ -147,32 +138,27 @@
|
||||
Nama PIC Reviewer
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
@if (isset($namaPicReviewer) && count($namaPicReviewer) > 0)
|
||||
@foreach ($namaPicReviewer as $pic_reviewer)
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $kjpp->nama_pic_reviewer ?? '-' }}</p>
|
||||
@if (isset($kjpp->detail_nama_pic_reviewer))
|
||||
@foreach (json_decode($detailJoinPicReviewer) as $detail_nama_pic_reviewer)
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">
|
||||
{{ $pic_reviewer }}
|
||||
{{ $detail_nama_pic_reviewer->nama_pic_reviewer }}
|
||||
</p>
|
||||
@endforeach
|
||||
@else
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">
|
||||
-
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
<label class="form-label max-w-56">
|
||||
Nomor HP PIC Reviewer
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
@if (isset($nomorHpPicReviewer) && count($nomorHpPicReviewer) > 0)
|
||||
@foreach ($nomorHpPicReviewer as $hp_pic_reviewer)
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $kjpp->nomor_hp_pic_reviewer ?? '-' }}
|
||||
</p>
|
||||
@if (isset($kjpp->detail_nomor_hp_pic_reviewer))
|
||||
@foreach (json_decode($detailJoinPicReviewer) as $detail_nomor_hp_pic_reviewer)
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">
|
||||
{{ $hp_pic_reviewer }}
|
||||
{{ $detail_nomor_hp_pic_reviewer->nomor_hp_pic_reviewer }}
|
||||
</p>
|
||||
@endforeach
|
||||
@else
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">
|
||||
-
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@@ -181,32 +167,26 @@
|
||||
Nama PIC Admin
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
@if (isset($namaPicAdmin) && count($namaPicAdmin) > 0)
|
||||
@foreach ($namaPicAdmin as $pic_admin)
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $kjpp->nama_pic_admin ?? '-' }}</p>
|
||||
@if (isset($kjpp->detail_nama_pic_admin))
|
||||
@foreach (json_decode($detailJoinPicAdmin) as $detail_nama_pic_admin)
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">
|
||||
{{ $pic_admin }}
|
||||
{{ $detail_nama_pic_admin->nama_pic_admin }}
|
||||
</p>
|
||||
@endforeach
|
||||
@else
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">
|
||||
-
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
<label class="form-label max-w-56">
|
||||
Nomor HP PIC Admin
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
@if (isset($nomorHpPicAdmin) && count($nomorHpPicAdmin) > 0)
|
||||
@foreach ($nomorHpPicAdmin as $hp_pic_admin)
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $kjpp->nomor_hp_pic_admin ?? '-' }}</p>
|
||||
@if (isset($kjpp->detail_nomor_hp_pic_admin))
|
||||
@foreach (json_decode($detailJoinPicAdmin) as $detail_nomor_hp_pic_admin)
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">
|
||||
{{ $hp_pic_admin }}
|
||||
{{ $detail_nomor_hp_pic_admin->nomor_hp_pic_admin }}
|
||||
</p>
|
||||
@endforeach
|
||||
@else
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">
|
||||
-
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@@ -215,32 +195,27 @@
|
||||
Nama PIC Marketing
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
@if (isset($namaPicMarketing) && count($namaPicMarketing) > 0)
|
||||
@foreach ($namaPicMarketing as $pic_marketing)
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $kjpp->nama_pic_marketing ?? '-' }}</p>
|
||||
@if (isset($kjpp->detail_nama_pic_marketing))
|
||||
@foreach (json_decode($detailJoinPicMarketing) as $detail_nama_pic_marketing)
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">
|
||||
{{ $pic_marketing }}
|
||||
{{ $detail_nama_pic_marketing->nama_pic_marketing }}
|
||||
</p>
|
||||
@endforeach
|
||||
@else
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">
|
||||
-
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
<label class="form-label max-w-56">
|
||||
Nomor HP PIC Marketing
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
@if (isset($nomorHpPicMarketing) && count($nomorHpPicMarketing) > 0)
|
||||
@foreach ($nomorHpPicMarketing as $hp_pic_marketing)
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $kjpp->nomor_hp_pic_marketing ?? '-' }}
|
||||
</p>
|
||||
@if (isset($kjpp->detail_nomor_hp_pic_marketing))
|
||||
@foreach (json_decode($detailJoinPicMarketing) as $detail_nomor_hp_pic_marketing)
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">
|
||||
{{ $hp_pic_marketing }}
|
||||
{{ $detail_nomor_hp_pic_marketing->nomor_hp_pic_marketing }}
|
||||
</p>
|
||||
@endforeach
|
||||
@else
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">
|
||||
-
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@@ -248,23 +223,25 @@
|
||||
<label class="form-label max-w-56">
|
||||
Ijin Usaha
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full gap-1">
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
@if (isset($kjpp->ijin_usaha_id))
|
||||
<div class="flex flex-row space-x-4 text-gray-600 font-medium text-sm gap-1">
|
||||
@foreach (json_decode($kjpp->ijin_usaha_id, true) as $ijin_code)
|
||||
@php
|
||||
$ijin_usaha = $ijin_usahas->firstWhere('code', $ijin_code);
|
||||
@endphp
|
||||
@if ($ijin_usaha)
|
||||
<div
|
||||
class="flex flex-row space-x-4 text-white text-sm badge badge-dark dark-mode:badge dark-mode:text-gray-600">
|
||||
class="flex flex-row space-x-4 text-white font-medium text-sm badge badge-dark dark-mode:badge dark-mode:text-gray-600">
|
||||
{{ $ijin_usaha->name }}
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
@else
|
||||
<div class="flex flex-row space-x-4 text-white text-sm dark-mode:text-gray-600">
|
||||
-
|
||||
</div>
|
||||
@else
|
||||
<div class="flex flex-row space-x-4 text-white font-medium text-sm dark-mode:text-gray-600">No
|
||||
business license
|
||||
selected.</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@@ -280,13 +257,13 @@
|
||||
@endphp
|
||||
@if ($jenis_aset)
|
||||
<span
|
||||
class="flex flex-row space-x-4 text-white text-sm badge badge-dark dark-mode:badge dark-mode:text-gray-600">
|
||||
class="flex flex-row space-x-4 text-white font-medium text-sm badge badge-dark dark-mode:badge dark-mode:text-gray-600">
|
||||
{{ $jenis_aset->name }}
|
||||
</span>
|
||||
@endif
|
||||
@endforeach
|
||||
@else
|
||||
<span class="flex flex-row space-x-4 text-gray-600 text-sm dark-mode:text-gray-600">
|
||||
<span class="flex flex-row space-x-4 text-gray-600 font-medium text-sm dark-mode:text-gray-600">
|
||||
-
|
||||
</span>
|
||||
@endif
|
||||
|
||||
Reference in New Issue
Block a user