Tambah nomor dokumen untuk dokumen jaminan
Menambahkan kolom 'dokumen_nomor' pada model DetailDokumenJaminan serta melakukan update terkait di controller dan view. Perubahan ini memungkinkan pengguna untuk memasukkan nomor dokumen selain file dokumen jaminan. Rutin yang terkait dengan penyimpanan dan pengambilan dokumen diperbarui untuk menangani data nomor dokumen. Perbaikan minor pada penataan kode juga dilakukan untuk konsistensi.
This commit is contained in:
@@ -146,10 +146,10 @@
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Nama Dokumen
|
||||
Nomor
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input " type="text" id="name" name="name[]" value="{{ $detail->name ?? "" }}" placeholder="Nama Dokumen">
|
||||
<input class="input " type="text" id="name" name="name[]" value="{{ $detail->name ?? "" }}" placeholder="Nomor">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -158,10 +158,11 @@
|
||||
Dokumen Jaminan
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<div class="flex flex-col w-full gap-2" id="file-container-{{$n}}">
|
||||
<div class="flex flex-col w-full gap-2" id="file-container-{{$n}}">
|
||||
<div class="flex items-center gap-2">
|
||||
<input class="file-input" type="file" name="dokumen_jaminan[{{ $n }}][]" multiple>
|
||||
<button type="button" class="btn btn-primary w-[100px] text-center" onclick="addFileInput({{ $n }})">Add More</button>
|
||||
<input class="flex-1 input" type="text" name="dokumen_nomor[{{ $n }}][]" placeholder="Nomor Dokumen">
|
||||
<input class="flex-1 file-input" type="file" name="dokumen_jaminan[{{ $n }}][]">
|
||||
<button type="button" class="flex-none btn btn-primary w-[100px] text-center" onclick="addFileInput({{ $n }})">Add More</button>
|
||||
</div>
|
||||
<div id="additional-files-{{ $n }}"></div>
|
||||
</div>
|
||||
@@ -234,10 +235,10 @@
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Nama Dokumen
|
||||
Nomor
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input " type="text" id="name" name="name[]" value="" placeholder="Nama Dokumen">
|
||||
<input class="input " type="text" id="name" name="name[]" value="" placeholder="Nomor">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -246,10 +247,11 @@
|
||||
Dokumen Jaminan
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<div class="flex flex-col w-full gap-2" id="file-container-{{$n}}">
|
||||
<div class="flex flex-col w-full gap-2" id="file-container-{{$n}}">
|
||||
<div class="flex items-center gap-2">
|
||||
<input class="file-input" type="file" name="dokumen_jaminan[{{ $n }}][]" multiple>
|
||||
<button type="button" class="btn btn-primary w-[100px] text-center" onclick="addFileInput({{ $n }})">Add More</button>
|
||||
<input class="flex-1 input" type="text" name="dokumen_nomor[{{ $n }}][]" placeholder="Nomor Dokumen">
|
||||
<input class="flex-1 file-input" type="file" name="dokumen_jaminan[{{ $n }}][]" multiple>
|
||||
<button type="button" class="flex-none btn btn-primary w-[100px] text-center" onclick="addFileInput({{ $n }})">Add More</button>
|
||||
</div>
|
||||
<div id="additional-files-{{ $n }}"></div>
|
||||
</div>
|
||||
@@ -287,8 +289,8 @@
|
||||
</div>
|
||||
@php $n++; @endphp
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
@@ -496,10 +498,10 @@
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Nama Dokumen
|
||||
Nomor
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input" type="text" name="name[]" value="${item.name || ''}" placeholder="Nama Dokumen">
|
||||
<input class="input" type="text" name="name[]" value="${item.name || ''}" placeholder="Nomor">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -510,8 +512,9 @@
|
||||
<div class="flex flex-wrap items-baseline w-full" id="file-container-${index}">
|
||||
${item.dokumen_jaminan ? renderExistingFiles(item.dokumen_jaminan, debiturId, item.id) : ''}
|
||||
<div class="flex items-center gap-2 my-2 w-full">
|
||||
<input class="file-input" type="file" name="dokumen_jaminan[${index}][]" multiple>
|
||||
<button type="button" class="btn btn-primary w-[100px] text-center" onclick="addFileInput(${index})">Add File</button>
|
||||
<input class="flex-1 input" type="text" name="dokumen_nomor[${index}][]" placeholder="Nomor Dokumen">
|
||||
<input class="flex-1 file-input" type="file" name="dokumen_jaminan[${index}][]" multiple>
|
||||
<button type="button" class="flex-none btn btn-primary w-[100px] text-center" onclick="addFileInput(${index})">Add File</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -565,8 +568,9 @@
|
||||
const newInput = document.createElement('div');
|
||||
newInput.className = 'flex items-center gap-2 mb-2 w-full';
|
||||
newInput.innerHTML = `
|
||||
<input class="file-input" type="file" name="dokumen_jaminan[${index}][]" multiple>
|
||||
<button type="button" class="btn btn-danger w-[100px] text-center" onclick="removeFileInput(this)">Remove</button>
|
||||
<input class="flex-1 input" type="text" name="dokumen_nomor[${index}][]" placeholder="Nomor Dokumen">
|
||||
<input class="flex-1 file-input" type="file" name="dokumen_jaminan[${index}][]" multiple>
|
||||
<button type="button" class="flex-none btn btn-danger w-[100px] text-center" onclick="removeFileInput(this)">Remove</button>
|
||||
`;
|
||||
container.appendChild(newInput);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user