From 2ae29fae23d5d790e26ca67bd08978b4bd461a74 Mon Sep 17 00:00:00 2001 From: majid Date: Tue, 5 Nov 2024 16:54:04 +0700 Subject: [PATCH] update form surveyor alat berat, kapal, kendaraan, mesin --- app/Http/Controllers/ActivityController.php | 86 +-- app/Http/Controllers/PenilaianController.php | 4 +- app/Http/Controllers/SurveyorController.php | 14 +- app/Http/Requests/SurveyorRequest.php | 3 +- app/Models/KondisiBangunan.php | 2 +- app/Models/Penilaian.php | 4 +- app/Models/PenilaianTeam.php | 2 +- module.json | 1 - resources/views/penilaian/form.blade.php | 2 +- .../surveyor/components/bagunan.blade.php | 232 +++++++++ .../surveyor/components/inspeksi.blade.php | 29 +- .../views/surveyor/components/kapal.blade.php | 488 ++++++++++++++++++ .../surveyor/components/kendaraan.blade.php | 160 ++++++ .../views/surveyor/components/mesin.blade.php | 133 +++++ ...nah-bangunan.blade.php => tanah.blade.php} | 232 --------- routes/web.php | 1 + 16 files changed, 1110 insertions(+), 283 deletions(-) create mode 100644 resources/views/surveyor/components/bagunan.blade.php create mode 100644 resources/views/surveyor/components/kapal.blade.php create mode 100644 resources/views/surveyor/components/kendaraan.blade.php create mode 100644 resources/views/surveyor/components/mesin.blade.php rename resources/views/surveyor/components/{tanah-bangunan.blade.php => tanah.blade.php} (52%) diff --git a/app/Http/Controllers/ActivityController.php b/app/Http/Controllers/ActivityController.php index 816e1e8..1008d7d 100644 --- a/app/Http/Controllers/ActivityController.php +++ b/app/Http/Controllers/ActivityController.php @@ -30,43 +30,43 @@ class ActivityController extends Controller */ - public function progres_activity() - { - // Ambil user yang sedang login - $user = auth()->user(); - $roles = $user->load('roles'); + public function progres_activity() + { + // Ambil user yang sedang login + $user = auth()->user(); + $roles = $user->load('roles'); - // Inisialisasi regionId dan teamId sebagai null agar bisa dinamis - $regionId = null; - $teamId = null; + // Inisialisasi regionId dan teamId sebagai null agar bisa dinamis + $regionId = null; + $teamId = null; - if ($roles->roles->pluck('name')->contains('senior-officer')) { - $userTeam = TeamsUsers::with('team') - ->where('user_id', $user->id) - ->first(); - $regionId = $userTeam?->team->regions_id; - $teamId = $userTeam?->teams_id; + if ($roles->roles->pluck('name')->contains('senior-officer')) { + $userTeam = TeamsUsers::with('team') + ->where('user_id', $user->id) + ->first(); + $regionId = $userTeam?->team->regions_id; + $teamId = $userTeam?->teams_id; - } + } - $teamsActivity = TeamsUsers::with(['user', 'team', 'team.regions', 'user.roles']) - ->whereHas('team', function ($q) use ($regionId, $teamId) { - if ($regionId) { - $q->where('regions_id', $regionId); - } - if ($teamId) { - $q->where('id', $teamId); // Hanya tim yang sama - } - }) - ->where('user_id', '!=', $user->id) - ->whereHas('user.roles', function ($query) { - // Filter hanya peran 'surveyor' atau 'surveyor-penilai' - $query->whereIn('name', ['surveyor', 'surveyor-penilai']); - }) - ->get(); + $teamsActivity = TeamsUsers::with(['user', 'team', 'team.regions', 'user.roles']) + ->whereHas('team', function ($q) use ($regionId, $teamId) { + if ($regionId) { + $q->where('regions_id', $regionId); + } + if ($teamId) { + $q->where('id', $teamId); // Hanya tim yang sama + } + }) + ->where('user_id', '!=', $user->id) + ->whereHas('user.roles', function ($query) { + // Filter hanya peran 'surveyor' atau 'surveyor-penilai' + $query->whereIn('name', ['surveyor', 'surveyor-penilai']); + }) + ->get(); - return view('lpj::activity.progres_activity.index', compact('teamsActivity')); - } + return view('lpj::activity.progres_activity.index', compact('teamsActivity')); + } @@ -119,6 +119,10 @@ class ActivityController extends Controller * Update the specified resource in storage. */public function dataForDatatables(Request $request) { + + $user = auth()->user(); + + // Check permissions if (is_null($this->user) || !$this->user->can('debitur.view')) { // abort(403, 'Sorry! You are not allowed to view users.'); @@ -170,7 +174,23 @@ class ActivityController extends Controller $filteredRecords = $query->count(); // Get data - $data = $query->with(['user', 'debiture', 'branch', 'tujuanPenilaian'])->get(); + + $data = null; + $userRole = $user->roles[0]->name ?? null; + + if (in_array($userRole, ['surveyor', 'surveyor-penilai'])) { + $data = $query->with(['user', 'debiture', 'branch', 'tujuanPenilaian', 'penilaian',]) + ->whereHas('penilaian.userPenilai', function ($q) use ($user) { + $q->where('user_id', $user->id); + }) + ->get(); + } else { + $data = $query->with(['user', 'debiture', 'branch', 'tujuanPenilaian']) + ->get(); + } + + + // Calculate total pages $pageCount = ceil($totalRecords / $request->get('size', 10)); diff --git a/app/Http/Controllers/PenilaianController.php b/app/Http/Controllers/PenilaianController.php index c0730a6..fb6ba89 100644 --- a/app/Http/Controllers/PenilaianController.php +++ b/app/Http/Controllers/PenilaianController.php @@ -118,7 +118,7 @@ class PenilaianController extends Controller return redirect()->route('penilaian.index')->with('success', 'Penilaian berhasil disimpan'); } catch (Exception $e) { DB::rollBack(); - return response()->json(array('error' => $e->getMessage())); + return redirect()->route('penilaian.index')->with('error', $e->getMessage()); } } } @@ -170,7 +170,7 @@ class PenilaianController extends Controller return redirect()->route('penilaian.index')->with('success', 'Penilaian berhasil disimpan'); } catch (Exception $e) { DB::rollBack(); - return response()->json(array('error' => $e->getMessage())); + return redirect()->route('penilaian.index')->with('error', $e->getMessage()); } } diff --git a/app/Http/Controllers/SurveyorController.php b/app/Http/Controllers/SurveyorController.php index c9ff799..f19d4c9 100644 --- a/app/Http/Controllers/SurveyorController.php +++ b/app/Http/Controllers/SurveyorController.php @@ -711,7 +711,8 @@ class SurveyorController extends Controller $validate = $request->validated(); if ($validate) { - $type = $request->route('type'); + try { + $type = $request->route('type'); $modelClass = $this->getModelClass($type); @@ -733,6 +734,14 @@ class SurveyorController extends Controller return redirect() ->route('basicdata.' . $type .'.index') ->with('success', 'created successfully'); + + } catch (Exeception $e) { + + return response()->json(array('error' => $e->getMessage()), 400); + // return redirect() + // ->route('basicdata.' . $type .'.index') + // ->with('error', $th->getMessage()); + } } } @@ -940,7 +949,7 @@ class SurveyorController extends Controller public function submitSurveyor(Request $request, $id) { - + $permohonan = Permohonan::find($id); $permohonan->update([ 'status' => 'done', @@ -978,6 +987,7 @@ class SurveyorController extends Controller 'tingkat-keramaian' => TingkatKeramaian::class, 'gol-mas-sekitar' => GolonganMasySekitar::class, 'spek-kategori-bangunan' => SpekKategoritBangunan::class, + 'spek-bangunan' => SpekBangunan::class, 'lantai-unit' => Lantai::class, 'view-unit' => ViewUnit::class, ]; diff --git a/app/Http/Requests/SurveyorRequest.php b/app/Http/Requests/SurveyorRequest.php index 7fbb8b7..0762ad9 100644 --- a/app/Http/Requests/SurveyorRequest.php +++ b/app/Http/Requests/SurveyorRequest.php @@ -70,7 +70,8 @@ class SurveyorRequest extends FormRequest return match ($action) { 'spek-bangunan' => [ 'spek_kategori_bangunan_id' => [ - 'required' + 'required', + ], ], // Add more action specific rules here diff --git a/app/Models/KondisiBangunan.php b/app/Models/KondisiBangunan.php index 131c0fa..c480283 100644 --- a/app/Models/KondisiBangunan.php +++ b/app/Models/KondisiBangunan.php @@ -14,7 +14,7 @@ class KondisiBangunan extends Model /** * The attributes that are mass assignable. */ - protected $fillable = []; + protected $fillable = ['code', 'name']; protected static function newFactory(): KondisiBangunanFactory { diff --git a/app/Models/Penilaian.php b/app/Models/Penilaian.php index b77937a..1de2dc5 100644 --- a/app/Models/Penilaian.php +++ b/app/Models/Penilaian.php @@ -17,7 +17,7 @@ class Penilaian extends Model */ protected $table = 'penilaian'; protected $fillable = [ - 'jenis_penilaian_id', 'tanggal_kunjungan', 'keterangan','nomor_registrasi', + 'jenis_penilaian_id', 'penilaian_id', 'tanggal_kunjungan', 'keterangan','nomor_registrasi', 'status', 'authorized_status', 'authorized_at', 'authorized_by', 'created_at', 'created_by', 'updated_at', 'updated_by', 'deleted_at', 'deleted_by' ]; @@ -47,6 +47,4 @@ class Penilaian extends Model { return $this->belongsTo(Permohonan::class, 'nomor_registrasi', 'nomor_registrasi'); } - - } diff --git a/app/Models/PenilaianTeam.php b/app/Models/PenilaianTeam.php index 8df88ef..808d0de 100644 --- a/app/Models/PenilaianTeam.php +++ b/app/Models/PenilaianTeam.php @@ -29,7 +29,7 @@ class PenilaianTeam extends Model public function penilaian(){ - return $this->belongsTo(Penilaian::class, 'penilaian_id', 'id'); + return $this->hasMany(Penilaian::class, 'penilaian_id', 'id'); } protected static function newFactory(): PenilaianTeamFactory diff --git a/module.json b/module.json index 54950ca..fd40dc1 100644 --- a/module.json +++ b/module.json @@ -183,7 +183,6 @@ "attributes": [], "permission": "", "roles": ["senior-officer"] - "roles": ["senior-officer"] } ] }, diff --git a/resources/views/penilaian/form.blade.php b/resources/views/penilaian/form.blade.php index 5119766..9782132 100644 --- a/resources/views/penilaian/form.blade.php +++ b/resources/views/penilaian/form.blade.php @@ -553,7 +553,7 @@ } }); - document.getElementById('penilaian_id').addEventListener('change', function() { + document.getElementById('penilai_id').addEventListener('change', function() { const selectedValue = this.value; const penilaiRegion = document.getElementById('penilaiRegion'); diff --git a/resources/views/surveyor/components/bagunan.blade.php b/resources/views/surveyor/components/bagunan.blade.php new file mode 100644 index 0000000..524aace --- /dev/null +++ b/resources/views/surveyor/components/bagunan.blade.php @@ -0,0 +1,232 @@ + +{{-- @if ($analisaType == 'tanah_bangunan') --}} +
+
+

Analisa Bangunan

+
+
+
+ +
+
+ + +
+ + @error('luas_tanah_bagunan') + {{ $message }} + @enderror +
+
+ + + +
+ +
+ + + @error('jenis_bangunan') + {{ $message }} + @enderror +
+
+ + +
+ +
+ + + @error('kondisi_bangunan') + {{ $message }} + @enderror +
+
+ + +
+ +
+ + + @error('sifat_bangunan') + {{ $message }} + @enderror +
+
+ + +
+
+ + +
+
+ +
+ @if (@isset($spekKategoriBagunan)) + @foreach ($spekKategoriBagunan as $item) +
+ +
+ + + @error('name') + {{ $message }} + @enderror +
+
+ @endforeach + @endif +
+ +
+
+
+ +
+ +
+
+ + + + +
+ +
+ + + @error('sarana_pelengkap') + {{ $message }} + @enderror +
+
+
+
+{{-- @endif --}} + +@push('scripts') + +@endpush diff --git a/resources/views/surveyor/components/inspeksi.blade.php b/resources/views/surveyor/components/inspeksi.blade.php index dfecca4..90a53ad 100644 --- a/resources/views/surveyor/components/inspeksi.blade.php +++ b/resources/views/surveyor/components/inspeksi.blade.php @@ -168,21 +168,32 @@ if ($analisaType === 'unit_rumah' || $analisaType === 'unit_gedung') { $analisaType = 'unit'; } + @endphp @if ($analisaType == 'tanah_bangunan') - @include('lpj::surveyor.components.tanah-bangunan') + @include('lpj::surveyor.components.tanah') @elseif($analisaType == 'unit') @include('lpj::surveyor.components.apartemen-kantor') - @elseif($analisaType == 'kendaraan') + @elseif($analisaType == 'alat-berat') @include('lpj::surveyor.components.alat-berat') + @elseif($analisaType == 'mesin') + @include('lpj::surveyor.components.mesin') + @elseif($analisaType == 'kapal') + @include('lpj::surveyor.components.kapal') + @elseif($analisaType == 'kendaraan') + @include('lpj::surveyor.components.kendaraan') @endif + @if($analisaType == 'tanah_bangunan') + @include('lpj::surveyor.components.bangunan') + @endif -
+ @if ($analisaType != 'mesin' && $analisaType != 'kapal') +

Analisis Lingkungan

@@ -450,8 +461,9 @@
+ @endif -
+

Analisis Fakta

@@ -476,6 +488,7 @@
+ @if ($analisaType != 'mesin' && $analisaType != 'kapal')
@@ -543,11 +556,14 @@ @enderror
- + @endif + + @if ($analisaType != 'mesin' && $analisaType != 'kapal') +
@@ -700,7 +716,7 @@ value="{{ old('lat', isset($analisa->analisaFakta) ? $analisa->analisaFakta->lat : '') }}"> -
@@ -742,6 +758,7 @@
+ @endif
+
+ + +
+
+

Struktur Kapal

+
+
+ @php + $inputDataLoaksi = []; + + $inputDataLoaksi = [ + ['label' => 'Lambung Kapal', 'index' => 0], + ['label' => 'Dek', 'index' => 1], + ['label' => 'Struktur Rangka', 'index' => 2], + ['label' => 'Palka', 'index' => 3], + ['label' => 'Pondasi Mesin', 'index' => 4], + ['label' => 'Area Mesin', 'index' => 5], + ['label' => 'Cat dan Korosi', 'index' => 6], + ['label' => 'Sistem Pengelasan', 'index' => 7] + ]; + + @endphp + + @if (count($inputDataLoaksi) > 0) + @foreach ($inputDataLoaksi as $item) + +
+ +
+ + + @error('bentuk_tanah') + {{ $message }} + @enderror +
+
+ @endforeach + @endif +
+ +
+ + @error('deskripsi') + {{ $message }} + @enderror +
+
+
+
+ +{{-- Peralatan Keselamatan --}} +
+
+

Peralatan Keselamatan

+
+
+ @php + $inputDataLoaksi = []; + + $inputDataLoaksi = [ + ['label' => 'Sekoci/Lifeboat', 'index' => 0], + ['label' => 'Jaket Pelampung', 'index' => 1], + ['label' => 'Alat Pemadam', 'index' => 2], + ['label' => 'Rambu Darurat', 'index' => 3], + ['label' => 'Sistem Alarm', 'index' => 4], + ['label' => 'Sistem Pencegah', 'index' => 5], + ['label' => 'Kebaran', 'index' => 6], + ['label' => 'Lampu Darurat', 'index' => 7] + ]; + + @endphp + + @if (count($inputDataLoaksi) > 0) + @foreach ($inputDataLoaksi as $item) + +
+ +
+ + + @error('bentuk_tanah') + {{ $message }} + @enderror +
+
+ @endforeach + @endif +
+ +
+ + @error('deskripsi') + {{ $message }} + @enderror +
+
+
+
+ +{{-- Sistwm Navigasi dan Komunikasi --}} +
+
+

Sistem Navigasi dan Komunikasi

+
+
+ @php + $inputDataLoaksi = []; + + $inputDataLoaksi = [ + ['label' => 'Gps', 'index' => 0], + ['label' => 'Radat', 'index' => 1], + ['label' => 'Radio Komunikasi', 'index' => 2], + ['label' => 'Lampu Navigasi', 'index' => 3], + ['label' => 'Sistem Kendali otomatis', 'index' => 4], + ['label' => 'Kompas', 'index' => 5], + ]; + + @endphp + + @if (count($inputDataLoaksi) > 0) + @foreach ($inputDataLoaksi as $item) + +
+ +
+ + + @error('bentuk_tanah') + {{ $message }} + @enderror +
+
+ @endforeach + @endif +
+ +
+ + @error('deskripsi') + {{ $message }} + @enderror +
+
+
+
+ + +{{-- Sistwm Mesin dan Penggerak Kapal --}} +
+
+

Sistem Mesin dan Penggerak Kapal

+
+
+ @php + $inputDataLoaksi = []; + + $inputDataLoaksi = [ + ['label' => 'Mesin Utama', 'index' => 0], + ['label' => 'Mesin Bantu', 'index' => 1], + ['label' => 'Pompa Pendingin', 'index' => 2], + ['label' => 'Sistem Pelumasan', 'index' => 3], + ['label' => 'Propeller', 'index' => 4], + ['label' => 'Sistem Kelistrikan', 'index' => 5], + ]; + + @endphp + + @if (count($inputDataLoaksi) > 0) + @foreach ($inputDataLoaksi as $item) + +
+ +
+ + + @error('bentuk_tanah') + {{ $message }} + @enderror +
+
+ @endforeach + @endif +
+ +
+ + @error('deskripsi') + {{ $message }} + @enderror +
+
+
+
+ + +{{-- Sistwm kelistrikan dan Elektronik --}} +
+
+

Sistem Kelistrikan dan Elektronik

+
+
+ @php + $inputDataLoaksi = []; + + $inputDataLoaksi = [ + ['label' => 'Lampu Navigasi', 'index' => 0], + ['label' => 'Sistem Penerangan', 'index' => 1], + ['label' => 'Sistem Panel Distribusi', 'index' => 2], + ['label' => 'Kabel dan Perangkat Pendukung', 'index' => 3], + ]; + + @endphp + + @if (count($inputDataLoaksi) > 0) + @foreach ($inputDataLoaksi as $item) + +
+ +
+ + + @error('bentuk_tanah') + {{ $message }} + @enderror +
+
+ @endforeach + @endif +
+ +
+ + @error('deskripsi') + {{ $message }} + @enderror +
+
+
+
+ +{{-- Linkungan dan Kebersihan Kapal --}} +
+
+

Linkungan dan Kebersihan Kapal

+
+
+ @php + $inputDataLoaksi = []; + + $inputDataLoaksi = [ + ['label' => 'Kebersihan Dek Luar', 'index' => 0], + ['label' => 'Tangki Limbah', 'index' => 1], + ['label' => 'Sistem Pengelolaan Limbah', 'index' => 2], + ['label' => 'Pengelolaan Air Ballast', 'index' => 3], + ]; + + @endphp + + @if (count($inputDataLoaksi) > 0) + @foreach ($inputDataLoaksi as $item) + +
+ +
+ + + @error('bentuk_tanah') + {{ $message }} + @enderror +
+
+ @endforeach + @endif +
+ +
+ + @error('deskripsi') + {{ $message }} + @enderror +
+
+
+
diff --git a/resources/views/surveyor/components/kendaraan.blade.php b/resources/views/surveyor/components/kendaraan.blade.php new file mode 100644 index 0000000..a96d64b --- /dev/null +++ b/resources/views/surveyor/components/kendaraan.blade.php @@ -0,0 +1,160 @@ +
+
+

Order Penilaian

+
+
+ +
+ + + @error('bentuk_tanah') + {{ $message }} + @enderror +
+
+
+ + + +
+
+

Identitas Debitur

+
+
+ +
+ +
+ + + @error('bentuk_tanah') + {{ $message }} + @enderror +
+
+
+ +
+ + + @error('bentuk_tanah') + {{ $message }} + @enderror +
+
+
+ +
+

Lokasi Jaminan

+
+
+ @php + $inputDataLoaksi = []; + + $inputDataLoaksi = [ + ['label' => 'Nama Jalan', 'index' => 0], + ['label' => 'Perumahan/Gang', 'index' => 1], + ['label' => 'Blok/Nomor', 'index' => 2], + ['label' => 'Desa/Kelurahan', 'index' => 3], + ['label' => 'Kecamatan', 'index' => 4], + ['label' => 'Kota/Kotamadya', 'index' => 5], + ['label' => 'Provinsi', 'index' => 6], + ]; + + @endphp + + @if (count($inputDataLoaksi) > 0) + @foreach ($inputDataLoaksi as $item) + +
+ +
+ + + @error('bentuk_tanah') + {{ $message }} + @enderror +
+
+ @endforeach + @endif +
+
+ + +
+
+

Data Data Jaminan

+
+
+ +
+ +
+ + @error('hadapMataAngin') + {{ $message }} + @enderror +
+
+ +
+ +
+ + @error('hadapMataAngin') + {{ $message }} + @enderror +
+
+
+ +
+ + + @error('hadapMataAngin') + {{ $message }} + @enderror +
+
+ + @php + $inputDataJaminan = []; + $inputDataJaminan = [ + ['label' => 'Tipe/Model', 'index' => 0], + ['label' => 'Merek', 'index' => 1], + ['label' => 'Tahun Pembuatan', 'index' => 2], + ['label' => 'Negara Pembuat', 'index' => 3], + ['label' => 'Kondisi Mesin', 'index' => 4], + ]; + @endphp + + @if (count($inputDataJaminan) > 0) + @foreach ($inputDataJaminan as $item) + +
+ +
+ + + @error('bentuk_tanah') + {{ $message }} + @enderror +
+
+ @endforeach + @endif + +
+ +
+ + @error('deskripsi') + {{ $message }} + @enderror +
+
+
+
diff --git a/resources/views/surveyor/components/mesin.blade.php b/resources/views/surveyor/components/mesin.blade.php new file mode 100644 index 0000000..81d71c0 --- /dev/null +++ b/resources/views/surveyor/components/mesin.blade.php @@ -0,0 +1,133 @@ + + +
+
+

Identitas Debitur

+
+
+ +
+ + + @error('bentuk_tanah') + {{ $message }} + @enderror +
+
+ +
+

Lokasi Jaminan

+
+
+ @php + $inputDataLoaksi = []; + + $inputDataLoaksi = [ + ['label' => 'Nama Jalan', 'index' => 0], + ['label' => 'Perumahan/Gang', 'index' => 1], + ['label' => 'Blok/Nomor', 'index' => 2], + ['label' => 'Desa/Kelurahan', 'index' => 3], + ['label' => 'Kecamatan', 'index' => 4], + ['label' => 'Kota/Kotamadya', 'index' => 5], + ['label' => 'Provinsi', 'index' => 6] + ]; + + @endphp + + @if (count($inputDataLoaksi) > 0) + @foreach ($inputDataLoaksi as $item) + +
+ +
+ + + @error('bentuk_tanah') + {{ $message }} + @enderror +
+
+ @endforeach + @endif +
+
+ + +
+
+

Data Data Jaminan

+
+
+
+ +
+ + + @error('hadapMataAngin') + {{ $message }} + @enderror +
+
+ + @php + $inputDataJaminan = []; + + $inputDataJaminan = [ + ['label' => 'Tipe/Model', 'index' => 0], + ['label' => 'Merek', 'index' => 1], + ['label' => 'Tahun Pembuatan', 'index' => 2], + ['label' => 'Negara Pembuat', 'index' => 3], + ['label' => 'Kondisi Mesin', 'index' => 4], + ]; + @endphp + + @if (count($inputDataJaminan) > 0) + @foreach ($inputDataJaminan as $item) + +
+ +
+ + + @error('bentuk_tanah') + {{ $message }} + @enderror +
+
+ @endforeach + @endif + +
+ +
+ + @error('deskripsi') + {{ $message }} + @enderror +
+
+
+ +
+ +
+
+ + + diff --git a/resources/views/surveyor/components/tanah-bangunan.blade.php b/resources/views/surveyor/components/tanah.blade.php similarity index 52% rename from resources/views/surveyor/components/tanah-bangunan.blade.php rename to resources/views/surveyor/components/tanah.blade.php index bba59a2..c71af11 100644 --- a/resources/views/surveyor/components/tanah-bangunan.blade.php +++ b/resources/views/surveyor/components/tanah.blade.php @@ -246,235 +246,3 @@ - -@if ($analisaType == 'tanah_bangunan') -
-
-

Analisa Bangunan

-
-
-
- -
-
- - -
- - @error('luas_tanah_bagunan') - {{ $message }} - @enderror -
-
- - - -
- -
- - - @error('jenis_bangunan') - {{ $message }} - @enderror -
-
- - -
- -
- - - @error('kondisi_bangunan') - {{ $message }} - @enderror -
-
- - -
- -
- - - @error('sifat_bangunan') - {{ $message }} - @enderror -
-
- - -
-
- - -
-
- -
- @if (@isset($spekKategoriBagunan)) - @foreach ($spekKategoriBagunan as $item) -
- -
- - - @error('name') - {{ $message }} - @enderror -
-
- @endforeach - @endif -
- -
-
-
- -
- -
-
- - - - -
- -
- - - @error('sarana_pelengkap') - {{ $message }} - @enderror -
-
-
-
-@endif - -@push('scripts') - -@endpush diff --git a/routes/web.php b/routes/web.php index e40bd3c..0ec7f55 100644 --- a/routes/web.php +++ b/routes/web.php @@ -437,6 +437,7 @@ Route::middleware(['auth'])->group(function () { Route::get('restore/{id}', [ActivityController::class, 'restore'])->name('restore'); Route::get('datatables', [ActivityController::class, 'dataForDatatables'])->name('datatables'); Route::get('export', [ActivityController::class, 'export'])->name('export'); + Route::get('/', [ActivityController::class, 'index'])->name('index'); Route::get('/{id}/show', [ActivityController::class, 'show'])->name('show');