diff --git a/app/Helpers/Lpj.php b/app/Helpers/Lpj.php new file mode 100644 index 0000000..2d2a379 --- /dev/null +++ b/app/Helpers/Lpj.php @@ -0,0 +1,10 @@ +address ? $alamat->address . ', ' : '') . + (isset($alamat->village) ? $alamat->village->name.', ' : '') . + (isset($alamat->city) ? $alamat->city->name.', ' : '') . + (isset($alamat->province) ? $alamat->province->name.', ' : '') . + ($alamat->postal_code ?? ''); + } diff --git a/app/Http/Controllers/SurveyorController.php b/app/Http/Controllers/SurveyorController.php index b70a9b1..5a19d19 100644 --- a/app/Http/Controllers/SurveyorController.php +++ b/app/Http/Controllers/SurveyorController.php @@ -7,6 +7,8 @@ use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; use Illuminate\Http\Response; use Modules\Lpj\Models\Permohonan; +use Modules\Lpj\Models\Branch; +use Modules\Location\Models\Province; class SurveyorController extends Controller { @@ -52,7 +54,13 @@ class SurveyorController extends Controller 'penilaian' ], )->findOrFail($id); - return view('lpj::surveyor.detail', compact('permohonan')); + + $surveyor = $id; + $branches = Branch::all(); + $provinces = Province::all(); + + + return view('lpj::surveyor.detail', compact('permohonan', 'surveyor', 'branches', 'provinces')); } /** @@ -131,10 +139,106 @@ class SurveyorController extends Controller ]); } /** - * Remove the specified resource from storage. + * Form inspeksi. */ - public function destroy($id) + + public function formInspeksi($id) { - // + $permohonan = Permohonan::with( + [ + 'user', + 'debiture.province', + 'debiture.city', + 'debiture.district', + 'debiture.village', + 'branch', + 'tujuanPenilaian', + 'penilaian' + ], + )->findOrFail($id); + $branches = Branch::all(); + $provinces = Province::all(); + + return view('lpj::surveyor.detail', compact('permohonan', 'branches', 'provinces')); } + + /** + * Denah. + */ + + public function denah($id) + { + $permohonan = Permohonan::with( + [ + 'user', + 'debiture.province', + 'debiture.city', + 'debiture.district', + 'debiture.village', + 'branch', + 'tujuanPenilaian', + 'penilaian' + ], + )->findOrFail($id); + $surveyor = $id; + $branches = Branch::all(); + $provinces = Province::all(); + + return view('lpj::surveyor.detail', compact('permohonan', 'surveyor', 'branches', 'provinces')); + } + + /** + * Foto. + */ + + public function foto($id) + { + $permohonan = Permohonan::with( + [ + 'user', + 'debiture.province', + 'debiture.city', + 'debiture.district', + 'debiture.village', + 'branch', + 'tujuanPenilaian', + 'penilaian' + ], + )->findOrFail($id); + $surveyor = $id; + $branches = Branch::all(); + $provinces = Province::all(); + + return view('lpj::surveyor.detail', compact('permohonan', 'surveyor', 'branches', 'provinces')); + } + + /** + * Data pembanding. + */ + + public function dataPembanding($id) + { + $permohonan = Permohonan::with( + [ + 'user', + 'debiture.province', + 'debiture.city', + 'debiture.district', + 'debiture.village', + 'branch', + 'tujuanPenilaian', + 'penilaian' + ], + )->findOrFail($id); + $surveyor = $id; + $branches = Branch::all(); + $provinces = Province::all(); + + return view('lpj::surveyor.detail', compact('permohonan', 'surveyor', 'branches', 'provinces')); + } + + + + + } diff --git a/module.json b/module.json index 7b033cf..0687930 100644 --- a/module.json +++ b/module.json @@ -6,7 +6,9 @@ "keywords": [], "priority": 0, "providers": ["Modules\\Lpj\\Providers\\LpjServiceProvider"], - "files": [], + "files": [ + "app/Helpers/Lpj.php" + ], "menu": { "main": [ { @@ -150,6 +152,15 @@ } ] }, + { + "title": "Surveyor", + "path": "surveyor", + "icon": "ki-filled ki-questionnaire-tablet text-lg", + "classes": "", + "attributes": [], + "permission": "", + "roles": ["surveyor"] + }, { "title": "Activity", @@ -158,7 +169,7 @@ "classes": "", "attributes": [], "permission": "", - "roles": ["administrator", "pemohon-ao", "pemohon-eo", "admin"] + "roles": ["administrator", "pemohon-ao", "pemohon-eo", "admin","surveyor"] }, { "title": "Laporan", @@ -308,6 +319,14 @@ "permission": "", "roles": ["administrator", "admin"] }, + { + "title": "Jenis Laporan", + "path": "basicdata.jenis_laporan", + "classes": "", + "attributes": [], + "permission": "", + "roles": ["Administrator", "admin"] + }, { "title": "Tujuan Penilaian KJPP", "path": "basicdata.tujuan_penilaian_kjpp", diff --git a/resources/views/assetsku/includenya.blade.php b/resources/views/assetsku/includenya.blade.php index efbdfbf..f646e05 100644 --- a/resources/views/assetsku/includenya.blade.php +++ b/resources/views/assetsku/includenya.blade.php @@ -1,4 +1,4 @@ - --}} +@endpush + + +
diff --git a/resources/views/surveyor/components/foto.blade.php b/resources/views/surveyor/components/foto.blade.php new file mode 100644 index 0000000..9d39cd3 --- /dev/null +++ b/resources/views/surveyor/components/foto.blade.php @@ -0,0 +1,89 @@ + + + +@push('script') + + + +@endpush diff --git a/resources/views/surveyor/detail.blade.php b/resources/views/surveyor/detail.blade.php index 885d5fb..ee4a892 100644 --- a/resources/views/surveyor/detail.blade.php +++ b/resources/views/surveyor/detail.blade.php @@ -148,15 +148,58 @@