From 0c891b222887458af17668ce2a019c138c797a36 Mon Sep 17 00:00:00 2001 From: Daeng Deni Mardaeni Date: Tue, 5 Nov 2024 15:07:57 +0700 Subject: [PATCH] Add conditional custom field input types Enhanced the handling of custom fields by conditionally adding input types like text, number, date, and textarea based on the field's type. Also, added missing placeholders to input elements to improve usability. --- .../debitur/components/dokumen.blade.php | 39 ++++++++++++++----- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/resources/views/debitur/components/dokumen.blade.php b/resources/views/debitur/components/dokumen.blade.php index 3de2e04..40c55fd 100644 --- a/resources/views/debitur/components/dokumen.blade.php +++ b/resources/views/debitur/components/dokumen.blade.php @@ -176,6 +176,27 @@ + @else + @if($detail->jenisLegalitasJaminan->custom_field) +
+ +
+ @if($detail->jenisLegalitasJaminan->custom_field_type === "text") + + @elseif($detail->jenisLegalitasJaminan->custom_field_type === "number") + + @elseif($detail->jenisLegalitasJaminan->custom_field_type === "date") + + @elseif($detail->jenisLegalitasJaminan->custom_field_type === "textarea") + + @else + + @endif +
+
+ @endif @endif
@@ -221,15 +242,15 @@
@if($item->custom_field_type === "text") - + @elseif($item->custom_field_type === "number") - + @elseif($item->custom_field_type === "date") - + @elseif($item->custom_field_type === "textarea") - + @else - + @endif
@@ -246,9 +267,7 @@ @php $n++; @endphp @endforeach @else -
-
@endif
@@ -370,13 +389,13 @@ @push('scripts') {{--Pemilik Jaminan--}}