final upload form

This commit is contained in:
Fiqh Pratama
2025-10-13 17:28:34 +07:00
parent e8acdd3303
commit 8321df6d2b
13 changed files with 1966 additions and 244 deletions
@@ -42,10 +42,6 @@
<label class="form-label">Allowance</label>
<input type="text" class="form-control" name="allowance" id="allowance" value="{{ $form->allowance }}" readonly>
</div>
<div class="mb-3">
<label class="form-label">Bukti Allowance</label><br>
<a href="{{ $form->bukti_allowance }}" target="_blank">Lihat Bukti</a>
</div>
<div class="mb-3">
<label class="form-label">Transport Antar Kota</label>
<input type="text" class="form-control" name="transport_ankot" id="transport_ankot" value="{{ $form->transport_ankot }}" readonly>
@@ -53,17 +49,9 @@
</div>
<div class="col-lg-6">
<div class="mb-3">
<label class="form-label">Bukti Transport Antar Kota</label><br>
<a href="{{ $form->bukti_transport_ankot }}" target="_blank">Lihat Bukti</a>
</div>
<div class="mb-3">
<label class="form-label">Hotel</label>
<input type="text" class="form-control" name="hotel" id="hotel" value="{{ $form->hotel }}" readonly>
</div>
<div class="mb-3">
<label class="form-label">Bukti Hotel</label><br>
<a href="{{ $form->bukti_hotel }}" target="_blank">Lihat Bukti</a>
</div>
<div class="mb-3">
<label class="form-label">Total</label>
@@ -71,6 +59,52 @@
</div>
</div>
<div class="col-lg-12">
<hr class="my-4">
<h5 class="mb-3">Lampiran</h5>
<div class="table-responsive">
<table class="table table-bordered table-striped mb-0" id="meeting-existing-attachments-table">
<thead class="bg-light">
<tr>
<th style="width: 30%;">Kategori</th>
<th>Nama File</th>
<th style="width: 120px;" class="text-center">Preview</th>
<th style="width: 120px;" class="text-center">Download</th>
</tr>
</thead>
<tbody>
@forelse ($attachments as $attachment)
<tr class="meeting-attachment-row">
<td>{{ $attachment['category_label'] ?? '-' }}</td>
<td>{{ $attachment['filename'] }}</td>
<td class="text-center">
<button type="button"
class="btn btn-sm btn-outline-secondary meeting-preview-trigger"
data-preview-type="{{ $attachment['preview_type'] }}"
data-preview-source="{{ $attachment['preview_url'] ?? '' }}"
data-download-url="{{ $attachment['download_url'] ?? '' }}"
data-filename="{{ $attachment['filename'] }}">
Preview
</button>
</td>
<td class="text-center">
@if (!empty($attachment['download_url']))
<a href="{{ $attachment['download_url'] }}" class="btn btn-sm btn-outline-success" target="_blank" rel="noopener">Download</a>
@else
<span class="text-muted">Tidak tersedia</span>
@endif
</td>
</tr>
@empty
<tr class="meeting-empty-row">
<td colspan="4" class="text-center text-muted">Belum ada attachment.</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>
<div class="col-lg-12">
<div class="mb-3">
<label class="form-label">Status</label>
@@ -475,4 +509,7 @@
$('#total2').val('0'); // Reset total to 0
});
</script>
@include('backend.pages.forms.meeting.partials.attachment-modal')
@include('backend.pages.forms.meeting.partials.attachment-scripts')
@endsection