🎨 refactor(ui): perbaikan styling form penilai & optimasi dashboard role-based
- 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
This commit is contained in:
@@ -142,7 +142,7 @@
|
||||
<label for="province" class="input">
|
||||
<i class="">Rp
|
||||
</i>
|
||||
<input type="text" class="w-full currency-format" id="total_nilai_pasar_wajar"
|
||||
<input type="text" class="w-full currency-format" id="total_nilai_pasar_wajar"
|
||||
name="total_nilai_pasar_wajar"
|
||||
value="{{ old('total_nilai_pasar_wajar', $lpjData['total_nilai_pasar_wajar'] ?? null) }}">
|
||||
</label>
|
||||
@@ -167,7 +167,7 @@
|
||||
<div class="w-full">
|
||||
<label class="input">
|
||||
|
||||
<input type="text" id="likuidasi" name="likuidasi" class="w-full currency"
|
||||
<input type="text" id="likuidasi" name="likuidasi" class="w-full currency"
|
||||
value="{{ old('likuidasi', $lpjData['likuidasi'] ?? null) }}"
|
||||
oninput="calculateTotal()">
|
||||
<i class="">%
|
||||
@@ -182,7 +182,7 @@
|
||||
<label class="input">
|
||||
<i class="">Rp
|
||||
</i>
|
||||
<input type="text" class="w-full currency-format" id="likuidasi_nilai_1"
|
||||
<input type="text" class="w-full currency-format" id="likuidasi_nilai_1"
|
||||
name="likuidasi_nilai_1"
|
||||
value="{{ old('likuidasi_nilai_1', $lpjData['likuidasi_nilai_1'] ?? null) }}"
|
||||
oninput="calculateTotal()">
|
||||
@@ -194,7 +194,7 @@
|
||||
<label class="input">
|
||||
<i class="">Rp
|
||||
</i>
|
||||
<input type="text" class="w-full currency-format" name="likuidasi_nilai_2"
|
||||
<input type="text" class="w-full currency-format" name="likuidasi_nilai_2"
|
||||
value="{{ old('likuidasi_nilai_2', $lpjData['likuidasi_nilai_2'] ?? null) }}">
|
||||
</div>
|
||||
|
||||
@@ -278,7 +278,7 @@
|
||||
</i>
|
||||
<input type="text"
|
||||
id="nilai_npw_${npwCounter}_1"
|
||||
class="w-full currency"
|
||||
class="w-full currency"
|
||||
name="nilai_npw_${npwCounter}_1"
|
||||
placeholder="Harga per meter"
|
||||
oninput="calculateTotal()">
|
||||
@@ -358,7 +358,7 @@
|
||||
</i>
|
||||
<input type="text"
|
||||
id="nilai_npw_${npwCounter}_1"
|
||||
class="w-full currency"
|
||||
class="w-full currency"
|
||||
name="nilai_npw_${npwCounter}_1"
|
||||
placeholder="Harga per meter"
|
||||
value="${npw.nilai_1 || ''}"
|
||||
@@ -371,7 +371,7 @@
|
||||
</i>
|
||||
<input type="text"
|
||||
id="nilai_npw_${npwCounter}_2"
|
||||
class="w-full currency-format"
|
||||
class="w-full currency-format"
|
||||
name="nilai_npw_${npwCounter}_2"
|
||||
placeholder="Total Nilai"
|
||||
value="${npw.nilai_2 || ''}"
|
||||
@@ -470,15 +470,14 @@
|
||||
|
||||
|
||||
kategoriItems.forEach(item => {
|
||||
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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user