Files
spota-dev/rebuild/resources/views/dosen/pages/penawaran.blade.php
Power BI Dev dab8ea396b Deploy Laravel rebuild via Coolify
Point Docker and Coolify compose to the Laravel rebuild app so mahasiswa, dosen, and admin flows are served from the new Laravel public entrypoint.
2026-05-03 18:50:29 +07:00

95 lines
6.0 KiB
PHP

<x-dosen.partials.page-shell :title="$title" :sidebar="$sidebar" :page-title="$pageTitle" :page-description="$pageDescription" :page-date="$pageDate" :user="$user" :page-actions="$pageActions ?? []">
<section class="rounded-xl border border-[#E5E7EB] bg-white p-6 shadow-[0_8px_12px_rgba(13,10,44,0.04)]">
<form method="GET" class="grid gap-4 border-b border-[#E5E7EB] pb-6 lg:grid-cols-4">
<label class="block text-sm text-[#374151]">
<span class="mb-2 block font-medium text-[#15171A]">Tampilkan :</span>
<select name="sumber" class="template-input">
<option value="0" @selected($source === '0')>Judul Saya</option>
<option value="1" @selected($source === '1')>Semua Dosen</option>
</select>
</label>
<label class="block text-sm text-[#374151]">
<span class="mb-2 block font-medium text-[#15171A]">Status :</span>
<select name="status" class="template-input">
<option value="Semua" @selected($statusFilter === 'Semua')>Semua</option>
<option value="Belum Diambil" @selected($statusFilter === 'Belum Diambil')>Belum Diambil</option>
<option value="Belum Diproses" @selected($statusFilter === 'Belum Diproses')>Belum Diproses</option>
<option value="Diterima" @selected($statusFilter === 'Diterima')>Diterima</option>
</select>
</label>
<label class="block text-sm text-[#374151]">
<span class="mb-2 block font-medium text-[#15171A]">Status :</span>
<select name="kk" class="template-input">
<option value="all" @selected($kkFilter === 'all')>Semua KK</option>
@foreach ($kkOptions as $option)
<option value="{{ $option['value'] }}" @selected($kkFilter === $option['value'])>{{ $option['label'] }}</option>
@endforeach
</select>
</label>
<div class="flex items-end gap-3">
<button type="submit" class="template-button-dark w-full lg:w-auto">Filter</button>
</div>
</form>
<div class="mt-6 overflow-x-auto">
<table class="min-w-full divide-y divide-[#E5E7EB] text-sm">
<thead>
<tr class="text-left text-[#6B7280]">
<th class="px-4 py-3 font-semibold">No.</th>
<th class="px-4 py-3 font-semibold">Judul</th>
<th class="px-4 py-3 font-semibold">Deskripsi</th>
<th class="px-4 py-3 font-semibold">Ditawarkan Oleh</th>
<th class="px-4 py-3 font-semibold">Status</th>
<th class="px-4 py-3 font-semibold">Diambil Oleh</th>
<th class="px-4 py-3 font-semibold">Aksi</th>
</tr>
</thead>
<tbody class="divide-y divide-[#F1F5F9]">
@forelse ($penawaran as $index => $item)
<tr>
<td class="px-4 py-4 text-[#374151]">{{ $index + 1 }}</td>
<td class="px-4 py-4 align-top">
<p class="font-semibold text-[#15171A]">{{ $item['judul'] }}</p>
<p class="mt-1 text-xs text-[#6B7280]">{{ $item['waktu'] }}</p>
</td>
<td class="px-4 py-4 text-[#374151]">{{ $item['deskripsi'] }}</td>
<td class="px-4 py-4 text-[#374151]">{{ $item['ditawarkanOleh'] }}</td>
<td class="px-4 py-4 text-[#374151]">{{ $item['status'] }}</td>
<td class="px-4 py-4 text-[#374151]">{{ $item['mahasiswa'] }}</td>
<td class="px-4 py-4">
<div class="flex flex-wrap gap-2">
@if ($item['canApprove'])
<form method="POST" action="{{ $item['approveHref'] }}">
@csrf
<button type="submit" class="rounded-md border border-emerald-200 bg-emerald-50 px-3 py-1.5 text-xs font-medium text-emerald-700 hover:bg-emerald-100">Setujui</button>
</form>
<form method="POST" action="{{ $item['rejectHref'] }}">
@csrf
<button type="submit" class="rounded-md border border-amber-200 bg-amber-50 px-3 py-1.5 text-xs font-medium text-amber-700 hover:bg-amber-100">Tolak</button>
</form>
@endif
@if ($item['isMine'])
<a href="{{ $item['editHref'] }}" class="rounded-md bg-[#15171A] px-3 py-1.5 text-xs font-medium text-white hover:opacity-90">Edit</a>
<form method="POST" action="{{ $item['destroyHref'] }}" onsubmit="return confirm('Hapus data penawaran judul ini?');">
@csrf
@method('DELETE')
<button type="submit" class="rounded-md border border-rose-200 bg-rose-50 px-3 py-1.5 text-xs font-medium text-rose-700 hover:bg-rose-100">Hapus</button>
</form>
@endif
</div>
</td>
</tr>
@empty
<tr>
<td colspan="7" class="px-4 py-8 text-center text-[#6B7280]">Mengambil Data . . .</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</section>
</x-dosen.partials.page-shell>