From a1b9b7af8631a660f67ba43a5dfb3a244a589f55 Mon Sep 17 00:00:00 2001 From: Daeng Deni Mardaeni Date: Fri, 26 Sep 2025 10:55:27 +0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20refactor(ui):=20perbaikan=20styl?= =?UTF-8?q?ing=20form=20penilai=20&=20optimasi=20dashboard=20role-based?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Form Penilai: hapus spasi ganda di class CSS input currency/currency-format - Konsistensi class Tailwind: gunakan "w-full currency" & "w-full currency-format" - Hapus console.log tidak perlu, tambah debug log untuk parsing luas - Optimasi parsing input luas dengan parseFloat + regex sanitasi numerik - Dashboard: tambahkan pembatasan akses berdasarkan role (!penilai, !surveyor, !pemohon-ao, !pemohon-eo) - Perbaiki struktur HTML & urutan class Tailwind (grid, flex, spacing, alignment) - Optimalkan layout header, stats cards, & tabel dengan class yang konsisten - Hapus class CSS redundan & perbaiki konsistensi penamaan - Tingkatkan keamanan & UX dengan role-based access + struktur HTML lebih maintainable --- .../views/component/form-penilai.blade.php | 19 +- resources/views/dashboard/index.blade.php | 490 +++++++++--------- resources/views/debitur/index.blade.php | 112 ++-- .../views/laporan_permohonan/index.blade.php | 26 +- resources/views/permohonan/index.blade.php | 125 ++--- .../views/surveyor/components/tanah.blade.php | 117 +++-- 6 files changed, 452 insertions(+), 437 deletions(-) diff --git a/resources/views/component/form-penilai.blade.php b/resources/views/component/form-penilai.blade.php index f0f7029..6e6c8f3 100644 --- a/resources/views/component/form-penilai.blade.php +++ b/resources/views/component/form-penilai.blade.php @@ -142,7 +142,7 @@ @@ -167,7 +167,7 @@
@@ -278,7 +278,7 @@ @@ -358,7 +358,7 @@ { - console.log(item); - const kategori = item.id.replace('luas_', ''); const luasInput = document.getElementById(`luas_${kategori}`); const nilaiInput = document.querySelector(`input[name="nilai_${kategori}_1"]`); const outputElement = document.querySelector(`input[name="nilai_${kategori}_2"]`); if (luasInput && nilaiInput && outputElement) { - const luas = parseInput(luasInput.value); + const luas = parseFloat(luasInput.value.replace(/[^0-9.]/g, '')) || 0; + console.log("a", luas); const nilai = parseInput(nilaiInput.value); const hasil = luas * nilai; diff --git a/resources/views/dashboard/index.blade.php b/resources/views/dashboard/index.blade.php index 5b71ae7..d0e6e7e 100644 --- a/resources/views/dashboard/index.blade.php +++ b/resources/views/dashboard/index.blade.php @@ -1,139 +1,142 @@ @extends('layouts.main') @section('content') -
- -
-
-

- Dashboard -

-
- - Selamat datang, {{ auth()->user()->name }} -
-
-
-
- - -
- -
-
- - -
- - @foreach ($dashboard['count_resume'] as $status => $count) - @php - - $gradientFrom = $status === 'batal' ? 'from-red-50' : 'from-amber-50'; - $gradientTo = $status === 'batal' ? 'to-red-100' : 'to-amber-100'; - $borderColor = $status === 'batal' ? 'border-red-200' : 'border-amber-200'; - $iconBg = $status === 'batal' ? 'bg-red-500' : 'bg-amber-500'; - $iconColor = $status === 'batal' ? 'text-red-500' : 'text-amber-500'; - $textColor = $status === 'batal' ? 'text-red-800' : 'text-amber-800'; - $cardTitle = $status === 'batal' ? 'Batal dari Cabang' : 'Menunggu Keputusan Cabang'; - @endphp - -
-
-
-
- -
-

{{ $cardTitle }}

-
+ @if (!Auth::user()->hasRole(['penilai', 'surveyor', 'pemohon-ao', 'pemohon-eo'])) +
+ +
+
+

+ Dashboard +

+
+ + Selamat datang, {{ auth()->user()->name }}
-
-
-
-
-
-

Jabodetabek

- - {{ $count['jabodetabek']['count_report'] ?? 0 }} - -
-
- +
+
+
+ + +
+ +
+
+ + +
+ + @foreach ($dashboard['count_resume'] as $status => $count) + @php + + $gradientFrom = $status === 'batal' ? 'from-red-50' : 'from-amber-50'; + $gradientTo = $status === 'batal' ? 'to-red-100' : 'to-amber-100'; + $borderColor = $status === 'batal' ? 'border-red-200' : 'border-amber-200'; + $iconBg = $status === 'batal' ? 'bg-red-500' : 'bg-amber-500'; + $iconColor = $status === 'batal' ? 'text-red-500' : 'text-amber-500'; + $textColor = $status === 'batal' ? 'text-red-800' : 'text-amber-800'; + $cardTitle = $status === 'batal' ? 'Batal dari Cabang' : 'Menunggu Keputusan Cabang'; + @endphp + +
+
+
+
+ +
+

{{ $cardTitle }}

+
+
+
+
+
+
+
+

Jabodetabek

+ + {{ $count['jabodetabek']['count_report'] ?? 0 }} + +
+
+ +
-
-
-
-
-

Luar Jabodetabek

- - {{ $count['non-jabodetabek']['count_report'] ?? 0 }} - -
-
- +
+
+
+

Luar Jabodetabek

+ + {{ $count['non-jabodetabek']['count_report'] ?? 0 }} + +
+
+ +
-
- @endforeach + @endforeach -
- -
-
-
-
-
- -
-

Pendapatan Appraisal

-
- -
-
-
- + +
+
+
+
+
+ +
+

Pendapatan Appraisal

+
+ +
+
+
+
+
@foreach ($dashboard['count_pendapatan'] as $month => $data) - + - - @@ -141,153 +144,156 @@
+ class="px-4 py-3 text-xs font-semibold tracking-wider text-left text-gray-700 uppercase border-r border-gray-200"> Bulan + class="px-4 py-3 text-xs font-semibold tracking-wider text-center text-gray-700 uppercase border-r border-gray-200"> Jumlah + class="px-4 py-3 text-xs font-semibold tracking-wider text-center text-gray-700 uppercase"> Akumulasi
{{ ucfirst($month) }} + {{ $data['total_jumlah'] ?? '-' }} + {{ $data['total_akumulasi'] ?? '-' }}
+
+
+
+ + +
+ +
+
+
+
+ +
+

Laporan Internal

+
+
+
+
+ + + + + + + + + + + + + + + + @foreach ($dashboard['count_lpj_internal'] as $month => $regions) + + + + + + + + @endforeach + + +
+ Bulan + + Jabodetabek + + Luar Jabodetabek +
+ Laporan + + Debitur + + Laporan + + Debitur +
+ {{ ucfirst($month) }} + + {{ $regions['jabodetabek']['total_laporan'] ?? '-' }} + + {{ $regions['jabodetabek']['total_debiture'] ?? '-' }} + + {{ $regions['non-jabodetabek']['total_laporan'] ?? '-' }} + + {{ $regions['non-jabodetabek']['total_debiture'] ?? '-' }} +
+
+
+
+ + +
+
+
+
+ +
+

Laporan Eksternal

+
+
+
+
+ + + + + + + + + + @foreach ($dashboard['count_lpj_eksternal'] as $month => $data) + + + + + + + + + + + @endforeach + + +
+ Bulan + + Laporan + + Debitur +
+ {{ ucfirst($month) }} + + {{ $data['total_laporan'] ?? '-' }} + + {{ $data['total_debiture'] ?? '-' }} +
+
+
- -
- -
-
-
-
- -
-

Laporan Internal

-
-
-
-
- - - - - - - - - - - - - - - - @foreach ($dashboard['count_lpj_internal'] as $month => $regions) - - - - - - - - @endforeach - - -
- Bulan - - Jabodetabek - - Luar Jabodetabek -
- Laporan - - Debitur - - Laporan - - Debitur -
- {{ ucfirst($month) }} - - {{ $regions['jabodetabek']['total_laporan'] ?? '-' }} - - {{ $regions['jabodetabek']['total_debiture'] ?? '-' }} - - {{ $regions['non-jabodetabek']['total_laporan'] ?? '-' }} - - {{ $regions['non-jabodetabek']['total_debiture'] ?? '-' }} -
-
-
-
- - -
-
-
-
- -
-

Laporan Eksternal

-
-
-
-
- - - - - - - - - - @foreach ($dashboard['count_lpj_eksternal'] as $month => $data) - - - - - - - - - - - @endforeach - - -
- Bulan - - Laporan - - Debitur -
- {{ ucfirst($month) }} - - {{ $data['total_laporan'] ?? '-' }} - - {{ $data['total_debiture'] ?? '-' }} -
-
-
-
-
-
- - - - - - + + + + + @endif @endsection diff --git a/resources/views/debitur/index.blade.php b/resources/views/debitur/index.blade.php index aac8381..28a44fa 100644 --- a/resources/views/debitur/index.blade.php +++ b/resources/views/debitur/index.blade.php @@ -6,8 +6,9 @@ @section('content')
-
-
+
+

Daftar Debitur

@@ -20,7 +21,7 @@
Export to Excel - @if(auth()->user()->hasAnyRole(['administrator', 'pemohon-ao'])) + @if (auth()->user()->hasAnyRole(['administrator', 'pemohon-ao'])) Tambah Debitur @endif
@@ -28,59 +29,57 @@
- +
- - - - - - - - - - - - - + + + + + + + + + + + +
- - - Cif - - - Nomor Rekening - - - Debitur - - - Cabang - - - Nomor ID - - - NPWP - - - Email - - - Phone - - - Alamat - - Action
+ + + Cif + + + Nomor Rekening + + + Debitur + + + Cabang + + + Nomor ID + + + NPWP + + + Phone + + + Alamat KTP + + Action
-