Memperbaiki create, edit, dan show pada kjpp basic data ketika data nya itu ada yang salah masukin maka mempertahankan isi nya ketika di validasi
This commit is contained in:
@@ -44,8 +44,13 @@ class KJPPController extends Controller
|
|||||||
|
|
||||||
// Combine KJPP number with branch code
|
// Combine KJPP number with branch code
|
||||||
$fullKjppNumber = $kjppNumber;
|
$fullKjppNumber = $kjppNumber;
|
||||||
|
$detailJoinEmailKantor = json_encode([]);
|
||||||
|
$detailJoinPimpinan = json_encode([]);
|
||||||
|
$detailJoinPicReviewer = json_encode([]);
|
||||||
|
$detailJoinPicAdmin = json_encode([]);
|
||||||
|
$detailJoinPicMarketing = json_encode([]);
|
||||||
|
|
||||||
return view('lpj::kjpp.create', compact('ijin_usaha', 'jenis_aset', 'provinces', 'fullKjppNumber'));
|
return view('lpj::kjpp.create', compact('ijin_usaha', 'jenis_aset', 'provinces', 'fullKjppNumber', 'detailJoinEmailKantor', 'detailJoinPimpinan', 'detailJoinPicReviewer', 'detailJoinPicAdmin', 'detailJoinPicMarketing'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -78,74 +83,56 @@ class KJPPController extends Controller
|
|||||||
$nomorHpPicMarketing = $request->input('detail_nomor_hp_pic_marketing.nomor_hp_pic_marketing', []);
|
$nomorHpPicMarketing = $request->input('detail_nomor_hp_pic_marketing.nomor_hp_pic_marketing', []);
|
||||||
|
|
||||||
foreach ($emailKantor as $value) {
|
foreach ($emailKantor as $value) {
|
||||||
$detailEmailKantor[] = [
|
$detailEmailKantor[] = $value;
|
||||||
'email_kantor' => $value
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
// Encode to JSON and store
|
// Encode to JSON and store
|
||||||
$detailEmailKantorJson = json_encode($detailEmailKantor);
|
$detailEmailKantorJson = json_encode($detailEmailKantor);
|
||||||
|
|
||||||
// Process detail_nama_pimpinan
|
// Process detail_nama_pimpinan
|
||||||
foreach ($namaPimpinan as $value) {
|
foreach ($namaPimpinan as $value) {
|
||||||
$detailNamaPimpinan[] = [
|
$detailNamaPimpinan[] = $value;
|
||||||
'nama_pimpinan' => $value
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
$detailNamaPimpinanJson = json_encode($detailNamaPimpinan);
|
$detailNamaPimpinanJson = json_encode($detailNamaPimpinan);
|
||||||
|
|
||||||
// Process detail_nomor_pic_pimpinan
|
// Process detail_nomor_pic_pimpinan
|
||||||
foreach ($nomorHpPimpinan as $value) {
|
foreach ($nomorHpPimpinan as $value) {
|
||||||
$detailNomorPicPimpinan[] = [
|
$detailNomorPicPimpinan[] = $value;
|
||||||
'nomor_hp_pimpinan' => $value
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
$detailNomorPicPimpinanJson = json_encode($detailNomorPicPimpinan);
|
$detailNomorPicPimpinanJson = json_encode($detailNomorPicPimpinan);
|
||||||
|
|
||||||
// Process detail_nama_pic_reviewer
|
// Process detail_nama_pic_reviewer
|
||||||
foreach ($namaPicReviewer as $value) {
|
foreach ($namaPicReviewer as $value) {
|
||||||
$detailNamaPicReviewer[] = [
|
$detailNamaPicReviewer[] = $value;
|
||||||
'nama_pic_reviewer' => $value
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
$detailNamaPicReviewerJson = json_encode($detailNamaPicReviewer);
|
$detailNamaPicReviewerJson = json_encode($detailNamaPicReviewer);
|
||||||
|
|
||||||
// Process detail_nomor_hp_pic_reviewer
|
// Process detail_nomor_hp_pic_reviewer
|
||||||
foreach ($nomorHpPicReviewer as $value) {
|
foreach ($nomorHpPicReviewer as $value) {
|
||||||
$detailNomorHpPicReviewer[] = [
|
$detailNomorHpPicReviewer[] = $value;
|
||||||
'nomor_hp_pic_reviewer' => $value
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
$detailNomorHpPicReviewerJson = json_encode($detailNomorHpPicReviewer);
|
$detailNomorHpPicReviewerJson = json_encode($detailNomorHpPicReviewer);
|
||||||
|
|
||||||
// Process detail_nama_pic_admin
|
// Process detail_nama_pic_admin
|
||||||
foreach ($namaPicAdmin as $value) {
|
foreach ($namaPicAdmin as $value) {
|
||||||
$detailNamaPicAdmin[] = [
|
$detailNamaPicAdmin[] = $value;
|
||||||
'nama_pic_admin' => $value
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
$detailNamaPicAdminJson = json_encode($detailNamaPicAdmin);
|
$detailNamaPicAdminJson = json_encode($detailNamaPicAdmin);
|
||||||
|
|
||||||
// Process detail_nomor_hp_pic_admin
|
// Process detail_nomor_hp_pic_admin
|
||||||
foreach ($nomorHpPicAdmin as $value) {
|
foreach ($nomorHpPicAdmin as $value) {
|
||||||
$detailNomorHpPicAdmin[] = [
|
$detailNomorHpPicAdmin[] = $value;
|
||||||
'nomor_hp_pic_admin' => $value
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
$detailNomorHpPicAdminJson = json_encode($detailNomorHpPicAdmin);
|
$detailNomorHpPicAdminJson = json_encode($detailNomorHpPicAdmin);
|
||||||
|
|
||||||
// Process detail_nama_pic_marketing
|
// Process detail_nama_pic_marketing
|
||||||
foreach ($namaPicMarketing as $value) {
|
foreach ($namaPicMarketing as $value) {
|
||||||
$detailNamaPicMarketing[] = [
|
$detailNamaPicMarketing[] = $value;
|
||||||
'nama_pic_marketing' => $value
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
$detailNamaPicMarketingJson = json_encode($detailNamaPicMarketing);
|
$detailNamaPicMarketingJson = json_encode($detailNamaPicMarketing);
|
||||||
|
|
||||||
// Process detail_nomor_hp_pic_marketing
|
// Process detail_nomor_hp_pic_marketing
|
||||||
foreach ($nomorHpPicMarketing as $value) {
|
foreach ($nomorHpPicMarketing as $value) {
|
||||||
$detailNomorHpPicMarketing[] = [
|
$detailNomorHpPicMarketing[] = $value;
|
||||||
'nomor_hp_pic_marketing' => $value
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
$detailNomorHpPicMarketingJson = json_encode($detailNomorHpPicMarketing);
|
$detailNomorHpPicMarketingJson = json_encode($detailNomorHpPicMarketing);
|
||||||
|
|
||||||
@@ -217,15 +204,18 @@ class KJPPController extends Controller
|
|||||||
$detailNamaPicMarketing = json_decode($kjpp->detail_nama_pic_marketing);
|
$detailNamaPicMarketing = json_decode($kjpp->detail_nama_pic_marketing);
|
||||||
$detailNomorHpPicMarketing = json_decode($kjpp->detail_nomor_hp_pic_marketing);
|
$detailNomorHpPicMarketing = json_decode($kjpp->detail_nomor_hp_pic_marketing);
|
||||||
|
|
||||||
$detailJoinPimpinan = [];
|
$detailJoinEmailKantor = json_encode(array_map(function ($email) {
|
||||||
if ($detailNamaPimpinan) {
|
return [
|
||||||
|
'email_kantor' => $email
|
||||||
|
];
|
||||||
|
}, $detailEmailKantor));
|
||||||
|
|
||||||
$detailJoinPimpinan = json_encode(array_map(function ($nama, $nomor) {
|
$detailJoinPimpinan = json_encode(array_map(function ($nama, $nomor) {
|
||||||
return [
|
return [
|
||||||
'nama_pimpinan' => $nama,
|
'nama_pimpinan' => $nama,
|
||||||
'nomor_hp_pimpinan' => $nomor
|
'nomor_hp_pimpinan' => $nomor
|
||||||
];
|
];
|
||||||
}, $detailNamaPimpinan, $detailNomorHpPimpinan));
|
}, $detailNamaPimpinan, $detailNomorHpPimpinan));
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$detailJoinPicReviewer = json_encode(array_map(function ($nama, $nomor) {
|
$detailJoinPicReviewer = json_encode(array_map(function ($nama, $nomor) {
|
||||||
@@ -249,7 +239,7 @@ class KJPPController extends Controller
|
|||||||
];
|
];
|
||||||
}, $detailNamaPicMarketing, $detailNomorHpPicMarketing));
|
}, $detailNamaPicMarketing, $detailNomorHpPicMarketing));
|
||||||
|
|
||||||
return view('lpj::kjpp.show', compact('jenis_jaminan', 'ijin_usahas', 'ijin_usaha', 'kjpp', 'provinces', 'cities', 'districts', 'villages', 'detailEmailKantor', 'detailJoinPicReviewer', 'detailJoinPicAdmin', 'detailJoinPicMarketing', 'detailJoinPimpinan'));
|
return view('lpj::kjpp.show', compact('jenis_jaminan', 'ijin_usahas', 'ijin_usaha', 'kjpp', 'provinces', 'cities', 'districts', 'villages', 'detailJoinEmailKantor', 'detailJoinPicReviewer', 'detailJoinPicAdmin', 'detailJoinPicMarketing', 'detailJoinPimpinan'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -274,19 +264,19 @@ class KJPPController extends Controller
|
|||||||
$detailNamaPicMarketing = json_decode($kjpp->detail_nama_pic_marketing);
|
$detailNamaPicMarketing = json_decode($kjpp->detail_nama_pic_marketing);
|
||||||
$detailNomorHpPicMarketing = json_decode($kjpp->detail_nomor_hp_pic_marketing);
|
$detailNomorHpPicMarketing = json_decode($kjpp->detail_nomor_hp_pic_marketing);
|
||||||
|
|
||||||
//dd($detailNamaPimpinan);
|
$detailJoinEmailKantor = json_encode(array_map(function ($email) {
|
||||||
|
return [
|
||||||
|
'email_kantor' => $email
|
||||||
|
];
|
||||||
|
}, $detailEmailKantor));
|
||||||
|
|
||||||
$detailJoinPimpinan = [];
|
|
||||||
if ($detailNamaPimpinan) {
|
|
||||||
$detailJoinPimpinan = json_encode(array_map(function ($nama, $nomor) {
|
$detailJoinPimpinan = json_encode(array_map(function ($nama, $nomor) {
|
||||||
return [
|
return [
|
||||||
'nama_pimpinan' => $nama,
|
'nama_pimpinan' => $nama,
|
||||||
'nomor_hp_pimpinan' => $nomor
|
'nomor_hp_pimpinan' => $nomor
|
||||||
];
|
];
|
||||||
}, $detailNamaPimpinan, $detailNomorHpPimpinan));
|
}, $detailNamaPimpinan, $detailNomorHpPimpinan));
|
||||||
}
|
|
||||||
|
|
||||||
//dd($detailNamaPicReviewer );
|
|
||||||
|
|
||||||
$detailJoinPicReviewer = json_encode(array_map(function ($nama, $nomor) {
|
$detailJoinPicReviewer = json_encode(array_map(function ($nama, $nomor) {
|
||||||
return [
|
return [
|
||||||
@@ -309,7 +299,7 @@ class KJPPController extends Controller
|
|||||||
];
|
];
|
||||||
}, $detailNamaPicMarketing, $detailNomorHpPicMarketing));
|
}, $detailNamaPicMarketing, $detailNomorHpPicMarketing));
|
||||||
|
|
||||||
return view('lpj::kjpp.create', compact('kjpp', 'ijin_usaha', 'jenis_aset', 'provinces', 'cities', 'districts', 'villages', 'detailJoinPicReviewer', 'detailJoinPicAdmin', 'detailJoinPicMarketing', 'detailEmailKantor', 'detailJoinPimpinan'));
|
return view('lpj::kjpp.create', compact('kjpp', 'ijin_usaha', 'jenis_aset', 'provinces', 'cities', 'districts', 'villages', 'detailJoinPicReviewer', 'detailJoinPicAdmin', 'detailJoinPicMarketing', 'detailJoinEmailKantor', 'detailJoinPimpinan'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -343,74 +333,56 @@ class KJPPController extends Controller
|
|||||||
$nomorHpPicMarketing = $request->input('detail_nomor_hp_pic_marketing.nomor_hp_pic_marketing', []);
|
$nomorHpPicMarketing = $request->input('detail_nomor_hp_pic_marketing.nomor_hp_pic_marketing', []);
|
||||||
|
|
||||||
foreach ($emailKantor as $value) {
|
foreach ($emailKantor as $value) {
|
||||||
$detailEmailKantor[] = [
|
$detailEmailKantor[] = $value;
|
||||||
'email_kantor' => $value
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
// Encode to JSON and store
|
// Encode to JSON and store
|
||||||
$detailEmailKantorJson = json_encode($detailEmailKantor);
|
$detailEmailKantorJson = json_encode($detailEmailKantor);
|
||||||
|
|
||||||
// Process detail_nama_pimpinan
|
// Process detail_nama_pimpinan
|
||||||
foreach ($namaPimpinan as $value) {
|
foreach ($namaPimpinan as $value) {
|
||||||
$detailNamaPimpinan[] = [
|
$detailNamaPimpinan[] = $value;
|
||||||
'nama_pimpinan' => $value
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
$detailNamaPimpinanJson = json_encode($detailNamaPimpinan);
|
$detailNamaPimpinanJson = json_encode($detailNamaPimpinan);
|
||||||
|
|
||||||
// Process detail_nomor_hp_pimpinan
|
// Process detail_nomor_hp_pimpinan
|
||||||
foreach ($nomorHpPimpinan as $value) {
|
foreach ($nomorHpPimpinan as $value) {
|
||||||
$detailNomorHpPimpinan[] = [
|
$detailNomorHpPimpinan[] = $value;
|
||||||
'nomor_hp_pimpinan' => $value
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
$detailNomorHpPimpinanJson = json_encode($detailNomorHpPimpinan);
|
$detailNomorHpPimpinanJson = json_encode($detailNomorHpPimpinan);
|
||||||
|
|
||||||
// Process detail_nama_pic_reviewer
|
// Process detail_nama_pic_reviewer
|
||||||
foreach ($namaPicReviewer as $value) {
|
foreach ($namaPicReviewer as $value) {
|
||||||
$detailNamaPicReviewer[] = [
|
$detailNamaPicReviewer[] = $value;
|
||||||
'nama_pic_reviewer' => $value
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
$detailNamaPicReviewerJson = json_encode($detailNamaPicReviewer);
|
$detailNamaPicReviewerJson = json_encode($detailNamaPicReviewer);
|
||||||
|
|
||||||
// Process detail_nomor_hp_pic_reviewer
|
// Process detail_nomor_hp_pic_reviewer
|
||||||
foreach ($nomorHpPicReviewer as $value) {
|
foreach ($nomorHpPicReviewer as $value) {
|
||||||
$detailNomorHpPicReviewer[] = [
|
$detailNomorHpPicReviewer[] = $value;
|
||||||
'nomor_hp_pic_reviewer' => $value
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
$detailNomorHpPicReviewerJson = json_encode($detailNomorHpPicReviewer);
|
$detailNomorHpPicReviewerJson = json_encode($detailNomorHpPicReviewer);
|
||||||
|
|
||||||
// Process detail_nama_pic_admin
|
// Process detail_nama_pic_admin
|
||||||
foreach ($namaPicAdmin as $value) {
|
foreach ($namaPicAdmin as $value) {
|
||||||
$detailNamaPicAdmin[] = [
|
$detailNamaPicAdmin[] = $value;
|
||||||
'nama_pic_admin' => $value
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
$detailNamaPicAdminJson = json_encode($detailNamaPicAdmin);
|
$detailNamaPicAdminJson = json_encode($detailNamaPicAdmin);
|
||||||
|
|
||||||
// Process detail_nomor_hp_pic_admin
|
// Process detail_nomor_hp_pic_admin
|
||||||
foreach ($nomorHpPicAdmin as $value) {
|
foreach ($nomorHpPicAdmin as $value) {
|
||||||
$detailNomorHpPicAdmin[] = [
|
$detailNomorHpPicAdmin[] = $value;
|
||||||
'nomor_hp_pic_admin' => $value
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
$detailNomorHpPicAdminJson = json_encode($detailNomorHpPicAdmin);
|
$detailNomorHpPicAdminJson = json_encode($detailNomorHpPicAdmin);
|
||||||
|
|
||||||
// Process detail_nama_pic_marketing
|
// Process detail_nama_pic_marketing
|
||||||
foreach ($namaPicMarketing as $value) {
|
foreach ($namaPicMarketing as $value) {
|
||||||
$detailNamaPicMarketing[] = [
|
$detailNamaPicMarketing[] = $value;
|
||||||
'nama_pic_marketing' => $value
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
$detailNamaPicMarketingJson = json_encode($detailNamaPicMarketing);
|
$detailNamaPicMarketingJson = json_encode($detailNamaPicMarketing);
|
||||||
|
|
||||||
// Process detail_nomor_hp_pic_marketing
|
// Process detail_nomor_hp_pic_marketing
|
||||||
foreach ($nomorHpPicMarketing as $value) {
|
foreach ($nomorHpPicMarketing as $value) {
|
||||||
$detailNomorHpPicMarketing[] = [
|
$detailNomorHpPicMarketing[] = $value;
|
||||||
'nomor_hp_pic_marketing' => $value
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
$detailNomorHpPicMarketingJson = json_encode($detailNomorHpPicMarketing);
|
$detailNomorHpPicMarketingJson = json_encode($detailNomorHpPicMarketing);
|
||||||
|
|
||||||
@@ -449,7 +421,6 @@ class KJPPController extends Controller
|
|||||||
} else {
|
} else {
|
||||||
$validated['jenis_aset_id'] = json_encode($validated['jenis_aset_id']);
|
$validated['jenis_aset_id'] = json_encode($validated['jenis_aset_id']);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Perbarui data di database
|
// Perbarui data di database
|
||||||
KJPP::where('id', $id)->update($validated);
|
KJPP::where('id', $id)->update($validated);
|
||||||
|
|
||||||
|
|||||||
@@ -24,22 +24,31 @@ class KJPPRequest extends FormRequest
|
|||||||
'nomor_telepon_kantor' => 'nullable|numeric|digits_between:8,15',
|
'nomor_telepon_kantor' => 'nullable|numeric|digits_between:8,15',
|
||||||
'email_kantor' => 'required|email',
|
'email_kantor' => 'required|email',
|
||||||
'detail_email_kantor' => 'nullable',
|
'detail_email_kantor' => 'nullable',
|
||||||
|
'detail_email_kantor.email_kantor.*' => 'email',
|
||||||
'nama_pimpinan' => 'required|string|not_regex:/^\d+$/|max:255',
|
'nama_pimpinan' => 'required|string|not_regex:/^\d+$/|max:255',
|
||||||
'detail_nama_pimpinan' => 'nullable',
|
'detail_nama_pimpinan' => 'nullable',
|
||||||
|
'detail_nama_pimpinan.nama_pimpinan.*' => 'string|not_regex:/^\d+$/|max:255',
|
||||||
'nomor_hp_pimpinan' => 'required|numeric|digits_between:10,15',
|
'nomor_hp_pimpinan' => 'required|numeric|digits_between:10,15',
|
||||||
'detail_nomor_pic_pimpinan' => 'nullable',
|
'detail_nomor_hp_pimpinan' => 'nullable',
|
||||||
|
'detail_nomor_hp_pimpinan.nomor_hp_pimpinan.*' => 'numeric|digits_between:10,15',
|
||||||
'nama_pic_reviewer' => 'nullable|string|not_regex:/^\d+$/|max:255',
|
'nama_pic_reviewer' => 'nullable|string|not_regex:/^\d+$/|max:255',
|
||||||
'detail_nama_pic_reviewer' => 'nullable',
|
'detail_nama_pic_reviewer' => 'nullable',
|
||||||
|
'detail_nama_pic_reviewer.nama_pic_reviewer.*' => 'string|not_regex:/^\d+$/|max:255',
|
||||||
'nomor_hp_pic_reviewer' => 'nullable|numeric|digits_between:10,15',
|
'nomor_hp_pic_reviewer' => 'nullable|numeric|digits_between:10,15',
|
||||||
'detail_nomor_hp_pic_reviewer' => 'nullable',
|
'detail_nomor_hp_pic_reviewer' => 'nullable',
|
||||||
|
'detail_nomor_hp_pic_reviewer.nomor_hp_pic_reviewer.*' => 'numeric|digits_between:10,15',
|
||||||
'nama_pic_admin' => 'nullable|string|not_regex:/^\d+$/|max:255',
|
'nama_pic_admin' => 'nullable|string|not_regex:/^\d+$/|max:255',
|
||||||
'detail_nama_pic_admin' => 'nullable',
|
'detail_nama_pic_admin' => 'nullable',
|
||||||
|
'detail_nama_pic_admin.nama_pic_admin.*' => 'string|not_regex:/^\d+$/|max:255',
|
||||||
'nomor_hp_pic_admin' => 'nullable|numeric|digits_between:10,15',
|
'nomor_hp_pic_admin' => 'nullable|numeric|digits_between:10,15',
|
||||||
'detail_nomor_hp_pic_admin' => 'nullable',
|
'detail_nomor_hp_pic_admin' => 'nullable',
|
||||||
|
'detail_nomor_hp_pic_admin.nomor_hp_pic_admin.*' => 'numeric|digits_between:10,15',
|
||||||
'nama_pic_marketing' => 'nullable|string|not_regex:/^\d+$/|max:255',
|
'nama_pic_marketing' => 'nullable|string|not_regex:/^\d+$/|max:255',
|
||||||
'detail_nama_pic_marketing' => 'nullable',
|
'detail_nama_pic_marketing' => 'nullable',
|
||||||
|
'detail_nama_pic_marketing.nama_pic_marketing.*' => 'string|not_regex:/^\d+$/|max:255',
|
||||||
'nomor_hp_pic_marketing' => 'nullable|numeric|digits_between:10,15',
|
'nomor_hp_pic_marketing' => 'nullable|numeric|digits_between:10,15',
|
||||||
'detail_nomor_hp_pic_marketing' => 'nullable',
|
'detail_nomor_hp_pic_marketing' => 'nullable',
|
||||||
|
'detail_nomor_hp_pic_marketing.nomor_hp_pic_marketing.*' => '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',
|
||||||
@@ -83,20 +92,33 @@ class KJPPRequest extends FormRequest
|
|||||||
'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.required' => 'Email Kantor Wajib diisi!',
|
||||||
'email_kantor.email' => 'Email Kantor tidak valid!',
|
'email_kantor.email' => 'Email Kantor tidak valid!',
|
||||||
|
'detail_email_kantor.email_kantor.*.email' => 'Email Kantor tidak valid!',
|
||||||
'nama_pimpinan.required' => 'Nama Pimpinan Wajib diisi!',
|
'nama_pimpinan.required' => 'Nama Pimpinan Wajib diisi!',
|
||||||
'nama_pimpinan.not_regex' => 'Nama Pimpinan harus berupa huruf!',
|
'nama_pimpinan.not_regex' => 'Nama Pimpinan harus berupa huruf!',
|
||||||
|
'detail_nama_pimpinan.nama_pimpinan.*.not_regex' => 'Nama Pimpinan harus berupa huruf!',
|
||||||
'nomor_hp_pimpinan.required' => 'Nomor HP Pimpinan Wajib diisi!',
|
'nomor_hp_pimpinan.required' => 'Nomor HP Pimpinan Wajib diisi!',
|
||||||
'nomor_hp_pimpinan.numeric' => 'Nomor HP Pimpinan harus berupa angka!',
|
'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!',
|
'nomor_hp_pimpinan.digits_between' => 'Nomor HP Pimpinan minimum 10 digit dan maksimum 15 digit!',
|
||||||
|
'detail_nomor_hp_pimpinan.nomor_hp_pimpinan.*.numeric' => 'Nomor HP Pimpinan harus berupa angka!',
|
||||||
|
'detail_nomor_hp_pimpinan.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!',
|
'nama_pic_reviewer.not_regex' => 'Nama PIC Reviewer harus berupa huruf!',
|
||||||
|
'detail_nama_pic_reviewer.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.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!',
|
'nomor_hp_pic_reviewer.digits_between' => 'Nomor HP PIC Reviewer minimum 10 digit dan maksimum 15 digit!',
|
||||||
|
'detail_nomor_hp_pic_reviewer.nomor_hp_pic_reviewer.*.numeric' => 'Nomor HP PIC Reviewer harus berupa angka!',
|
||||||
|
'detail_nomor_hp_pic_reviewer.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!',
|
'nama_pic_admin.not_regex' => 'Nama PIC Admin harus berupa huruf!',
|
||||||
|
'detail_nama_pic_admin.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.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!',
|
'nomor_hp_pic_admin.digits_between' => 'Nomor HP PIC Admin minimum 10 digit dan maksimum 15 digit!',
|
||||||
|
'detail_nomor_hp_pic_admin.nomor_hp_pic_admin.*.numeric' => 'Nomor HP PIC Admin harus berupa angka!',
|
||||||
|
'detail_nomor_hp_pic_admin.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!',
|
'nama_pic_marketing.not_regex' => 'Nama PIC Marketing harus berupa huruf!',
|
||||||
|
'detail_nama_pic_marketing.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.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!',
|
'nomor_hp_pic_marketing.digits_between' => 'Nomor HP PIC Marketing minimum 10 digit dan maksimum 15 digit!',
|
||||||
|
'detail_nomor_hp_pic_marketing.nomor_hp_pic_marketing.*.numeric' => 'Nomor HP PIC Marketing harus berupa angka!',
|
||||||
|
'detail_nomor_hp_pic_marketing.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!',
|
||||||
|
|||||||
@@ -229,20 +229,32 @@
|
|||||||
<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))
|
@php
|
||||||
@foreach ($detailEmailKantor as $detail_email_kantor)
|
$emails = old(
|
||||||
<div class="flex flex-col lg:flex-row gap-2 items-baseline lg:items-center w-full">
|
'detail_email_kantor.email_kantor',
|
||||||
|
json_decode($detailJoinEmailKantor, true),
|
||||||
|
); // Decode as associative array
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@if (is_array($emails) && count($emails) > 0)
|
||||||
|
@foreach ($emails as $index => $email)
|
||||||
|
@if (!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
|
||||||
|
class="input @error('detail_email_kantor.email_kantor.' . $index) border-danger @enderror"
|
||||||
type="text" name="detail_email_kantor[email_kantor][]"
|
type="text" name="detail_email_kantor[email_kantor][]"
|
||||||
value="{{ $detail_email_kantor->email_kantor ?? old('detail_email_kantor.email_kantor') }}">
|
value="{{ old('detail_email_kantor.email_kantor.' . $index, is_array($email) ? $email['email_kantor'] : $email->email_kantor ?? '') }}">
|
||||||
@error('email_kantor')
|
@error('detail_email_kantor.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">
|
||||||
class="btn btn-danger btn-xs delete-button-edit">Hapus</button>
|
Hapus
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
@@ -275,35 +287,50 @@
|
|||||||
</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))
|
@php
|
||||||
@foreach (json_decode($detailJoinPimpinan) as $detail_pimpinan)
|
$detailNamaPimpinan = old(
|
||||||
|
'detail_nama_pimpinan.nama_pimpinan',
|
||||||
|
json_decode($detailJoinPimpinan, true),
|
||||||
|
);
|
||||||
|
$detailNomorHpPimpinan = old(
|
||||||
|
'detail_nomor_hp_pimpinan.nomor_hp_pimpinan',
|
||||||
|
json_decode($detailJoinPimpinan, true),
|
||||||
|
);
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@if (is_array($detailNamaPimpinan) &&
|
||||||
|
count($detailNamaPimpinan) > 0 &&
|
||||||
|
(is_array($detailNomorHpPimpinan) && count($detailNomorHpPimpinan) > 0))
|
||||||
|
@foreach ($detailNamaPimpinan as $index => $detail_nama)
|
||||||
|
@if (!empty($detail_nama))
|
||||||
<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
|
||||||
|
class="input @error('detail_nama_pimpinan.nama_pimpinan.' . $index) border-danger @enderror"
|
||||||
type="text" name="detail_nama_pimpinan[nama_pimpinan][]"
|
type="text" name="detail_nama_pimpinan[nama_pimpinan][]"
|
||||||
value="{{ $detail_pimpinan->nama_pimpinan ?? old('detail_nama_pimpinan.nama_pimpinan') }}">
|
value="{{ old('detail_nama_pimpinan.nama_pimpinan.' . $index, $detail_nama['nama_pimpinan'] ?? '') }}">
|
||||||
@error('nama_pimpinan')
|
@error('detail_nama_pimpinan.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">
|
|
||||||
Nomor HP Pimpinan
|
<label class="form-label max-w-56">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"
|
<input
|
||||||
|
class="input @error('detail_nomor_hp_pimpinan.nomor_hp_pimpinan.' . $index) border-danger @enderror"
|
||||||
type="text" name="detail_nomor_hp_pimpinan[nomor_hp_pimpinan][]"
|
type="text" name="detail_nomor_hp_pimpinan[nomor_hp_pimpinan][]"
|
||||||
value="{{ $detail_pimpinan->nomor_hp_pimpinan ?? old('detail_nomor_hp_pimpinan.nomor_hp_pimpinan') }}">
|
value="{{ old('detail_nomor_hp_pimpinan.nomor_hp_pimpinan.' . $index, $detailNomorHpPimpinan[$index]['nomor_hp_pimpinan'] ?? '') }}">
|
||||||
@error('nomor_hp_pimpinan')
|
@error('detail_nomor_hp_pimpinan.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" class="btn btn-danger btn-xs delete-button-edit">
|
||||||
Hapus
|
Hapus
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
@@ -343,36 +370,52 @@
|
|||||||
</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))
|
@php
|
||||||
@foreach (json_decode($detailJoinPicReviewer) as $detail_pic_reviewer)
|
$detailNamaPicReviewer = old(
|
||||||
|
'detail_nama_pic_reviewer.nama_pic_reviewer',
|
||||||
|
json_decode($detailJoinPicReviewer, true),
|
||||||
|
);
|
||||||
|
$detailNomorHpPicReviewer = old(
|
||||||
|
'detail_nomor_hp_pic_reviewer.nomor_hp_pic_reviewer',
|
||||||
|
json_decode($detailJoinPicReviewer, true),
|
||||||
|
);
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@if (is_array($detailNamaPicReviewer) &&
|
||||||
|
count($detailNamaPicReviewer) > 0 &&
|
||||||
|
is_array($detailNomorHpPicReviewer) &&
|
||||||
|
count($detailNomorHpPicReviewer) > 0)
|
||||||
|
@foreach ($detailNamaPicReviewer as $index => $detail_pic_reviewer)
|
||||||
|
@if (!empty($detail_pic_reviewer))
|
||||||
<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 PIC Reviewer</label>
|
||||||
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
|
||||||
|
class="input @error('detail_nama_pic_reviewer.nama_pic_reviewer.' . $index) border-danger @enderror"
|
||||||
type="text" name="detail_nama_pic_reviewer[nama_pic_reviewer][]"
|
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') }}">
|
value="{{ old('detail_nama_pic_reviewer.nama_pic_reviewer.' . $index, $detail_pic_reviewer['nama_pic_reviewer'] ?? '') }}">
|
||||||
@error('nama_pic_reviewer')
|
@error('detail_nama_pic_reviewer.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">
|
|
||||||
Nomor HP PIC Reviewer
|
<label class="form-label max-w-56">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"
|
<input
|
||||||
|
class="input @error('detail_nomor_hp_pic_reviewer.nomor_hp_pic_reviewer.' . $index) border-danger @enderror"
|
||||||
type="text"
|
type="text"
|
||||||
name="detail_nomor_hp_pic_reviewer[nomor_hp_pic_reviewer][]"
|
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') }}">
|
value="{{ old('detail_nomor_hp_pic_reviewer.nomor_hp_pic_reviewer.' . $index, $detailNomorHpPicReviewer[$index]['nomor_hp_pic_reviewer'] ?? '') }}">
|
||||||
@error('nomor_hp_pic_reviewer')
|
@error('detail_nomor_hp_pic_reviewer.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">
|
<button type="button" class="btn btn-danger btn-xs delete-button-edit">
|
||||||
Hapus
|
Hapus
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
@@ -411,35 +454,51 @@
|
|||||||
</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))
|
@php
|
||||||
@foreach (json_decode($detailJoinPicAdmin) as $detail_pic_admin)
|
$detailNamaPicAdmin = old(
|
||||||
|
'detail_nama_pic_admin.nama_pic_admin',
|
||||||
|
json_decode($detailJoinPicAdmin, true),
|
||||||
|
);
|
||||||
|
$detailNomorHpPicAdmin = old(
|
||||||
|
'detail_nomor_hp_pic_admin.nomor_hp_pic_admin',
|
||||||
|
json_decode($detailJoinPicAdmin, true),
|
||||||
|
);
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@if (is_array($detailNamaPicAdmin) &&
|
||||||
|
count($detailNamaPicAdmin) > 0 &&
|
||||||
|
is_array($detailNomorHpPicAdmin) &&
|
||||||
|
count($detailNomorHpPicAdmin) > 0)
|
||||||
|
@foreach ($detailNamaPicAdmin as $index => $detail_pic_admin)
|
||||||
|
@if (!empty($detail_pic_admin))
|
||||||
<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 PIC Admin</label>
|
||||||
Nama 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('nama_pic_admin') border-danger @enderror"
|
<input
|
||||||
|
class="input @error('detail_nama_pic_admin.nama_pic_admin.' . $index) border-danger @enderror"
|
||||||
type="text" name="detail_nama_pic_admin[nama_pic_admin][]"
|
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') }}">
|
value="{{ old('detail_nama_pic_admin.nama_pic_admin.' . $index, $detail_pic_admin['nama_pic_admin'] ?? '') }}">
|
||||||
@error('nama_pic_admin')
|
@error('detail_nama_pic_admin.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
|
<label class="form-label max-w-56">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"
|
<input
|
||||||
|
class="input @error('detail_nomor_hp_pic_admin.nomor_hp_pic_admin.' . $index) border-danger @enderror"
|
||||||
type="text" name="detail_nomor_hp_pic_admin[nomor_hp_pic_admin][]"
|
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') }}">
|
value="{{ old('detail_nomor_hp_pic_admin.nomor_hp_pic_admin.' . $index, $detailNomorHpPicAdmin[$index]['nomor_hp_pic_admin'] ?? '') }}">
|
||||||
@error('nomor_hp_pic_admin')
|
@error('detail_nomor_hp_pic_admin.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">
|
<button type="button" class="btn btn-danger btn-xs delete-button-edit">
|
||||||
Hapus
|
Hapus
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
@@ -479,37 +538,52 @@
|
|||||||
</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))
|
@php
|
||||||
@foreach (json_decode($detailJoinPicMarketing) as $detail_pic_marketing)
|
$detailNamaPicMarketing = old(
|
||||||
|
'detail_nama_pic_marketing.nama_pic_marketing',
|
||||||
|
json_decode($detailJoinPicMarketing, true),
|
||||||
|
);
|
||||||
|
$detailNomorHpPicMarketing = old(
|
||||||
|
'detail_nomor_hp_pic_marketing.nomor_hp_pic_marketing',
|
||||||
|
json_decode($detailJoinPicMarketing, true),
|
||||||
|
);
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@if (is_array($detailNamaPicMarketing) &&
|
||||||
|
count($detailNamaPicMarketing) > 0 &&
|
||||||
|
is_array($detailNomorHpPicMarketing) &&
|
||||||
|
count($detailNomorHpPicMarketing) > 0)
|
||||||
|
@foreach ($detailNamaPicMarketing as $index => $detail_pic_marketing)
|
||||||
|
@if (!empty($detail_pic_marketing))
|
||||||
<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 PIC Marketing</label>
|
||||||
Nama PIC Marketing
|
|
||||||
</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('detail_nama_pic_marketing.nama_pic_marketing.' . $index) border-danger @enderror"
|
||||||
type="text"
|
type="text" name="detail_nama_pic_marketing[nama_pic_marketing][]"
|
||||||
name="detail_nomor_hp_pic_marketing[nomor_hp_pic_marketing][]"
|
value="{{ old('detail_nama_pic_marketing.nama_pic_marketing.' . $index, $detail_pic_marketing['nama_pic_marketing'] ?? '') }}">
|
||||||
value="{{ $detail_pic_marketing->nomor_hp_pic_marketing ?? old('detail_nomor_hp_pic_marketing.nomor_hp_pic_marketing') }}">
|
@error('detail_nama_pic_marketing.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>
|
||||||
|
|
||||||
|
<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('detail_nomor_hp_pic_marketing.nomor_hp_pic_marketing.' . $index) border-danger @enderror"
|
||||||
|
type="text"
|
||||||
|
name="detail_nomor_hp_pic_marketing[nomor_hp_pic_marketing][]"
|
||||||
|
value="{{ old('detail_nomor_hp_pic_marketing.nomor_hp_pic_marketing.' . $index, $detailNomorHpPicMarketing[$index]['nomor_hp_pic_marketing'] ?? '') }}">
|
||||||
|
@error('detail_nomor_hp_pic_marketing.nomor_hp_pic_marketing.' . $index)
|
||||||
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
|
||||||
<button type="button" class="btn btn-danger btn-xs delete-button-edit">
|
<button type="button" class="btn btn-danger btn-xs delete-button-edit">
|
||||||
Hapus
|
Hapus
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -96,10 +96,10 @@
|
|||||||
</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>
|
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $kjpp->email_kantor }}</p>
|
||||||
@if (isset($kjpp->detail_email_kantor))
|
@if (!empty($detailJoinEmailKantor))
|
||||||
@foreach (json_decode($kjpp->detail_email_kantor) as $detail_email_kantor)
|
@foreach (json_decode($detailJoinEmailKantor) 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 }}
|
{{ $detail_email_kantor->email_kantor }}
|
||||||
</p>
|
</p>
|
||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
@@ -239,9 +239,9 @@
|
|||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</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 font-medium text-sm dark-mode:text-gray-600">
|
||||||
business license
|
-
|
||||||
selected.</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user