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