446 lines
30 KiB
PHP
446 lines
30 KiB
PHP
@extends('layouts.app')
|
|
@section('title', 'Dashboard Admin')
|
|
@section('hide_navbar', true)
|
|
@section('content')
|
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 space-y-8">
|
|
@if(session('error'))
|
|
<div class="rounded-xl border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-700">
|
|
{{ session('error') }}
|
|
</div>
|
|
@endif
|
|
|
|
@if(session('status'))
|
|
<div class="rounded-xl border border-green-200 bg-green-50 px-4 py-3 text-sm text-green-700">
|
|
{{ session('status') }}
|
|
</div>
|
|
@endif
|
|
|
|
<section class="surface-card rounded-4xl p-5 md:p-8">
|
|
<div class="flex flex-col md:flex-row md:items-center md:justify-between gap-4">
|
|
<div>
|
|
<div class="inline-flex items-center gap-2 rounded-full soft-gradient-bg px-4 py-2 text-xs font-semibold uppercase tracking-[0.18em] text-[#edc039]">
|
|
<i class="bi bi-grid"></i>
|
|
Admin Dashboard
|
|
</div>
|
|
<h2 class="text-2xl md:text-3xl font-bold mt-3 text-gray-900">Kelola Data Kamera & Alur TOPSIS</h2>
|
|
<p class="text-gray-600 mt-2 max-w-2xl">
|
|
Pantau katalog perangkat dan proses rekomendasi dalam satu halaman yang lebih ringkas dan mudah dipahami.
|
|
</p>
|
|
</div>
|
|
<div class="space-y-3 md:min-w-[18rem]">
|
|
<div class="flex justify-start md:justify-end">
|
|
<form method="POST" action="{{ route('logout') }}">
|
|
@csrf
|
|
<button type="submit" class="btn-dark w-full px-4 py-2 text-sm font-medium md:w-auto">
|
|
Logout ({{ auth()->user()->username }})
|
|
</button>
|
|
</form>
|
|
</div>
|
|
<div class="grid grid-cols-1 gap-3 text-center sm:grid-cols-3">
|
|
<div class="rounded-[1.2rem] border border-[#dceceb] bg-[#f7fbfa] px-4 py-3">
|
|
<p class="text-xs text-gray-500">Total Kamera</p>
|
|
<p class="text-2xl font-semibold text-gray-900">{{ count($kameras) }}</p>
|
|
</div>
|
|
<div class="rounded-[1.2rem] border border-[#dceceb] bg-[#f7fbfa] px-4 py-3">
|
|
<p class="text-xs text-gray-500">Total Lensa</p>
|
|
<p class="text-2xl font-semibold text-gray-900">{{ count($lensas) }}</p>
|
|
</div>
|
|
<div class="rounded-[1.2rem] border border-[#dceceb] bg-[#f7fbfa] px-4 py-3">
|
|
<p class="text-xs text-gray-500">Total User</p>
|
|
<p class="text-2xl font-semibold text-gray-900">{{ count($users ?? []) }}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="grid gap-6 lg:grid-cols-2">
|
|
<div class="surface-card rounded-[1.8rem]">
|
|
<div class="flex flex-col gap-3 border-b border-gray-100 px-5 py-4 sm:flex-row sm:items-center sm:justify-between">
|
|
<h3 class="font-semibold text-gray-800 flex items-center gap-2"><i class="bi bi-camera2 text-[#edc039]"></i>Data Kamera</h3>
|
|
<div class="flex flex-wrap items-center gap-2">
|
|
<span class="text-xs bg-[#e6f5ee] text-[#edc039] px-2 py-1 rounded-full">{{ count($kameras) }} item</span>
|
|
<a href="{{ route('dashboard.kameras.create') }}" class="rounded-lg bg-[#edc039] px-3 py-2 text-xs font-semibold text-white hover:opacity-95">
|
|
Tambah Kamera
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<div class="responsive-table">
|
|
<table class="min-w-full text-sm">
|
|
<thead class="bg-gray-50 text-gray-600">
|
|
<tr>
|
|
<th class="px-4 py-3 text-left font-medium">Kode</th>
|
|
<th class="px-4 py-3 text-left font-medium">Nama</th>
|
|
<th class="px-4 py-3 text-left font-medium">Merek</th>
|
|
<th class="px-4 py-3 text-left font-medium">Stok</th>
|
|
<th class="px-4 py-3 text-left font-medium">Harga Sewa</th>
|
|
<th class="px-4 py-3 text-left font-medium">TOPSIS</th>
|
|
<th class="px-4 py-3 text-left font-medium">Aksi</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-gray-100">
|
|
@forelse($kameras as $k)
|
|
<tr class="hover:bg-gray-50 transition-colors">
|
|
<td class="px-4 py-3 text-xs font-semibold text-gray-500">{{ $k->kode_kamera ?? '-' }}</td>
|
|
<td class="px-4 py-3 font-medium text-gray-800">{{ $k->nama }}</td>
|
|
<td class="px-4 py-3 text-gray-600">{{ $k->merek }}</td>
|
|
<td class="px-4 py-3 text-gray-700">{{ $k->stok }}/{{ \App\Models\Kamera::DEFAULT_STOCK }}</td>
|
|
<td class="px-4 py-3 text-gray-700">Rp {{ number_format($k->harga_sewa, 0, ',', '.') }}</td>
|
|
<td class="px-4 py-3 text-xs text-gray-600">
|
|
<p>Price: {{ number_format($k->price ?? 0, 0, ',', '.') }}</p>
|
|
<p>ISO: {{ number_format($k->iso ?? 0, 0, ',', '.') }}</p>
|
|
<p>AF Point: {{ number_format($k->af_point ?? 0, 0, ',', '.') }}</p>
|
|
<p>Sensor: {{ $k->sensor ?? '-' }} ({{ $k->sensor_score ?? '-' }})</p>
|
|
</td>
|
|
<td class="px-4 py-3">
|
|
<div class="flex flex-col gap-2">
|
|
<a href="{{ route('dashboard.kameras.edit', $k) }}" class="inline-flex items-center justify-center rounded-lg border border-[#edc039] px-3 py-2 text-xs font-semibold text-[#edc039] hover:bg-[#f4fbf8]">
|
|
Edit
|
|
</a>
|
|
<form method="POST" action="{{ route('dashboard.kameras.destroy', $k) }}" onsubmit="return confirm('Yakin ingin menghapus data kamera ini?')">
|
|
@csrf
|
|
@method('DELETE')
|
|
<button type="submit" class="w-full rounded-lg border border-red-200 bg-red-50 px-3 py-2 text-xs font-semibold text-red-700 hover:bg-red-100">
|
|
Hapus
|
|
</button>
|
|
</form>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
@empty
|
|
<tr>
|
|
<td colspan="7" class="px-4 py-6 text-center text-gray-500">Belum ada data kamera.</td>
|
|
</tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="surface-card rounded-[1.8rem]">
|
|
<div class="flex flex-col gap-3 border-b border-gray-100 px-5 py-4 sm:flex-row sm:items-center sm:justify-between">
|
|
<h3 class="font-semibold text-gray-800 flex items-center gap-2"><i class="bi bi-badge-4k text-[#edc039]"></i>Data Lensa</h3>
|
|
<div class="flex flex-wrap items-center gap-2">
|
|
<span class="text-xs bg-[#e6f7fd] text-[#007fa8] px-2 py-1 rounded-full">{{ count($lensas) }} item</span>
|
|
<a href="{{ route('dashboard.lensas.create') }}" class="rounded-lg bg-[#edc039] px-3 py-2 text-xs font-semibold text-white hover:opacity-95">
|
|
Tambah Lensa
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<div class="responsive-table">
|
|
<table class="min-w-full text-sm">
|
|
<thead class="bg-gray-50 text-gray-600">
|
|
<tr>
|
|
<th class="px-4 py-3 text-left font-medium">Kode</th>
|
|
<th class="px-4 py-3 text-left font-medium">Nama</th>
|
|
<th class="px-4 py-3 text-left font-medium">Merek</th>
|
|
<th class="px-4 py-3 text-left font-medium">Stok</th>
|
|
<th class="px-4 py-3 text-left font-medium">Harga Sewa</th>
|
|
<th class="px-4 py-3 text-left font-medium">Skor Lensa</th>
|
|
<th class="px-4 py-3 text-left font-medium">Aksi</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-gray-100">
|
|
@forelse($lensas as $l)
|
|
<tr class="hover:bg-gray-50 transition-colors">
|
|
<td class="px-4 py-3 text-xs font-semibold text-gray-500">{{ $l->kode_lensa ?? '-' }}</td>
|
|
<td class="px-4 py-3 font-medium text-gray-800">{{ $l->nama }}</td>
|
|
<td class="px-4 py-3 text-gray-600">{{ $l->merek }}</td>
|
|
<td class="px-4 py-3 text-gray-700">{{ $l->stok }}/{{ \App\Models\Lensa::DEFAULT_STOCK }}</td>
|
|
<td class="px-4 py-3 text-gray-700">Rp {{ number_format($l->harga_sewa, 0, ',', '.') }}</td>
|
|
<td class="px-4 py-3 text-xs text-gray-600">
|
|
<p>Aperture: {{ number_format($l->aperture_score ?? 0, 1) }}</p>
|
|
<p>Stabilisasi: {{ number_format($l->stabilisasi ?? 0, 1) }}</p>
|
|
<p>Fleksibilitas: {{ number_format($l->fleksibilitas ?? 0, 1) }}</p>
|
|
</td>
|
|
<td class="px-4 py-3">
|
|
<div class="flex flex-col gap-2">
|
|
<a href="{{ route('dashboard.lensas.edit', $l) }}" class="inline-flex items-center justify-center rounded-lg border border-[#edc039] px-3 py-2 text-xs font-semibold text-[#edc039] hover:bg-[#f4fbf8]">
|
|
Edit
|
|
</a>
|
|
<form method="POST" action="{{ route('dashboard.lensas.destroy', $l) }}" onsubmit="return confirm('Yakin ingin menghapus data lensa ini?')">
|
|
@csrf
|
|
@method('DELETE')
|
|
<button type="submit" class="w-full rounded-lg border border-red-200 bg-red-50 px-3 py-2 text-xs font-semibold text-red-700 hover:bg-red-100">
|
|
Hapus
|
|
</button>
|
|
</form>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
@empty
|
|
<tr>
|
|
<td colspan="7" class="px-4 py-6 text-center text-gray-500">Belum ada data lensa.</td>
|
|
</tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="surface-card rounded-[1.8rem] p-5 md:p-6">
|
|
@php
|
|
$memberLabels = [
|
|
'tanpa_member' => 'Tanpa Member',
|
|
'bronze' => 'Bronze',
|
|
'silver' => 'Silver',
|
|
'gold' => 'Gold',
|
|
];
|
|
$statusStyles = [
|
|
'menunggu' => 'bg-amber-50 text-amber-700',
|
|
'disetujui' => 'bg-[#e6f5ee] text-[#edc039]',
|
|
'ditolak' => 'bg-red-50 text-red-700',
|
|
'dikembalikan' => 'bg-slate-100 text-slate-700',
|
|
];
|
|
@endphp
|
|
<div class="flex items-center justify-between flex-wrap gap-2">
|
|
<h3 class="font-semibold text-gray-800 flex items-center gap-2"><i class="bi bi-inbox text-[#edc039]"></i>Pengajuan Sewa Terbaru</h3>
|
|
<span class="text-xs bg-[#e6f7fd] text-[#007fa8] px-2 py-1 rounded-full">{{ count($penyewaans ?? []) }} pengajuan</span>
|
|
</div>
|
|
<div class="responsive-table mt-4">
|
|
<table class="min-w-full text-sm">
|
|
<thead class="bg-gray-50 text-gray-600">
|
|
<tr>
|
|
<th class="px-4 py-3 text-left font-medium">Penyewa</th>
|
|
<th class="px-4 py-3 text-left font-medium">Jenis</th>
|
|
<th class="px-4 py-3 text-left font-medium">Member</th>
|
|
<th class="px-4 py-3 text-left font-medium">Jadwal</th>
|
|
<th class="px-4 py-3 text-left font-medium">Total</th>
|
|
<th class="px-4 py-3 text-left font-medium">Pembayaran</th>
|
|
<th class="px-4 py-3 text-left font-medium">Status</th>
|
|
<th class="px-4 py-3 text-left font-medium">Aksi Admin</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-gray-100">
|
|
@forelse($penyewaans as $p)
|
|
<tr class="hover:bg-gray-50 transition-colors">
|
|
<td class="px-4 py-3 text-gray-800">
|
|
<p class="font-medium">{{ $p->nama_penyewa }}</p>
|
|
<p class="text-xs text-gray-500">{{ $p->telepon }}</p>
|
|
<p class="text-xs text-gray-500">WA: {{ $p->no_wa ?? '-' }}</p>
|
|
<p class="text-xs text-gray-500">IG: {{ $p->instagram ?? '-' }}</p>
|
|
<p class="text-xs text-gray-500 wrap-break-word">Jaminan: {{ $p->jaminan ?? '-' }}</p>
|
|
@if($p->foto_jaminan_path)
|
|
<a href="{{ \Illuminate\Support\Facades\Storage::url($p->foto_jaminan_path) }}" target="_blank" class="text-xs text-[#edc039] hover:underline">
|
|
Lihat Foto Jaminan
|
|
</a>
|
|
@else
|
|
<p class="text-xs text-gray-400">Foto jaminan belum ada</p>
|
|
@endif
|
|
@if($p->foto_diri_path)
|
|
<a href="{{ \Illuminate\Support\Facades\Storage::url($p->foto_diri_path) }}" target="_blank" class="mt-1 block text-xs text-[#edc039] hover:underline">
|
|
Lihat Foto Diri
|
|
</a>
|
|
@else
|
|
<p class="text-xs text-gray-400">Foto diri belum ada</p>
|
|
@endif
|
|
</td>
|
|
<td class="px-4 py-3 text-gray-600">
|
|
<p>
|
|
{{ $p->jenis_sewa === 'paket' ? 'Paket Kamera + Lensa' : ($p->jenis_sewa === 'lensa' ? 'Lensa' : 'Kamera') }}
|
|
</p>
|
|
<p class="text-xs text-gray-500">
|
|
{{ $p->kamera->kode_kamera ?? $p->kamera->nama ?? '' }}{{ ($p->kamera && $p->lensa) ? ' + ' : '' }}{{ $p->lensa->kode_lensa ?? $p->lensa->nama ?? '' }}
|
|
@if(!$p->kamera && !$p->lensa)
|
|
-
|
|
@endif
|
|
</p>
|
|
<p class="text-xs text-gray-500">Qty: {{ $p->qty }}</p>
|
|
<p class="text-xs text-gray-500 wrap-break-word">KTP: {{ $p->alamat_ktp ?? '-' }}</p>
|
|
<p class="text-xs text-gray-500 wrap-break-word">Tinggal: {{ $p->alamat_tinggal ?? '-' }}</p>
|
|
</td>
|
|
<td class="px-4 py-3 text-gray-700">{{ \Illuminate\Support\Str::of($p->member_level)->replace('_', ' ')->title() }}</td>
|
|
<td class="px-4 py-3 text-gray-600">
|
|
<p>{{ $p->tanggal_mulai }} {{ substr($p->jam_sewa, 0, 5) }}</p>
|
|
<p class="text-xs text-gray-500">s/d {{ $p->tanggal_selesai }} {{ substr($p->jam_kembali, 0, 5) }}</p>
|
|
</td>
|
|
<td class="px-4 py-3 text-gray-800 font-medium">Rp {{ number_format($p->total_harga, 0, ',', '.') }}</td>
|
|
<td class="px-4 py-3 text-gray-600">
|
|
<p class="capitalize">{{ str_replace('_', ' ', $p->metode_pembayaran ?? '-') }}</p>
|
|
@if($p->bukti_pembayaran_path)
|
|
<a href="{{ \Illuminate\Support\Facades\Storage::url($p->bukti_pembayaran_path) }}" target="_blank" class="text-xs text-[#edc039] hover:underline">
|
|
Lihat Bukti
|
|
</a>
|
|
@else
|
|
<p class="text-xs text-gray-400">Belum upload</p>
|
|
@endif
|
|
@if($p->admin_catatan)
|
|
<div class="mt-2 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-800">
|
|
<p class="font-semibold">Catatan admin</p>
|
|
<p class="mt-1 whitespace-pre-line">{{ $p->admin_catatan }}</p>
|
|
</div>
|
|
@endif
|
|
</td>
|
|
<td class="px-4 py-3">
|
|
<span class="text-xs px-2 py-1 rounded-full {{ $statusStyles[$p->status] ?? 'bg-gray-100 text-gray-700' }}">
|
|
{{ \Illuminate\Support\Str::of($p->status)->replace('_', ' ')->title() }}
|
|
</span>
|
|
</td>
|
|
<td class="px-4 py-3">
|
|
<div class="flex flex-col gap-2">
|
|
<form method="POST" action="{{ route('dashboard.penyewaans.update-admin-note', $p) }}" class="rounded-lg border border-gray-200 bg-gray-50 p-3">
|
|
@csrf
|
|
@method('PATCH')
|
|
<label class="text-xs font-semibold text-gray-700">Catatan Admin untuk User</label>
|
|
<textarea
|
|
name="admin_catatan"
|
|
rows="4"
|
|
placeholder="Contoh: Foto jaminan tidak sesuai, foto diri kurang jelas, atau pembayaran BCA belum masuk."
|
|
class="mt-2 w-full rounded-lg border border-gray-300 bg-white px-3 py-2 text-xs text-gray-700 focus:border-[#edc039] focus:ring-[#edc039]"
|
|
>{{ old('admin_catatan', $p->admin_catatan) }}</textarea>
|
|
<button type="submit" class="mt-2 w-full rounded-lg border border-[#edc039] px-3 py-2 text-xs font-semibold text-[#edc039] hover:bg-[#fff8df]">
|
|
Simpan Catatan
|
|
</button>
|
|
</form>
|
|
<a href="{{ route('dashboard.penyewaans.edit', $p) }}" class="inline-flex items-center justify-center rounded-lg border border-[#edc039] px-3 py-2 text-xs font-semibold text-[#edc039] hover:bg-[#f4fbf8]">
|
|
Edit
|
|
</a>
|
|
<form method="POST" action="{{ route('dashboard.penyewaans.destroy', $p) }}" onsubmit="return confirm('Yakin ingin menghapus pengajuan sewa ini?')">
|
|
@csrf
|
|
@method('DELETE')
|
|
<button type="submit" class="w-full rounded-lg border border-red-200 bg-red-50 px-3 py-2 text-xs font-semibold text-red-700 hover:bg-red-100">
|
|
Hapus
|
|
</button>
|
|
</form>
|
|
</div>
|
|
@if($p->status === 'menunggu')
|
|
<div class="mt-2 flex flex-col gap-2 md:flex-row">
|
|
<form method="POST" action="{{ route('dashboard.penyewaans.update-status', $p) }}">
|
|
@csrf
|
|
@method('PATCH')
|
|
<input type="hidden" name="status" value="disetujui">
|
|
<button type="submit" class="rounded-lg bg-[#edc039] px-3 py-2 text-xs font-semibold text-white hover:opacity-95">
|
|
Setujui
|
|
</button>
|
|
</form>
|
|
<form method="POST" action="{{ route('dashboard.penyewaans.update-status', $p) }}">
|
|
@csrf
|
|
@method('PATCH')
|
|
<input type="hidden" name="status" value="ditolak">
|
|
<button type="submit" class="rounded-lg bg-red-600 px-3 py-2 text-xs font-semibold text-white hover:opacity-95">
|
|
Tolak
|
|
</button>
|
|
</form>
|
|
</div>
|
|
<p class="mt-2 text-xs text-gray-500">Gunakan setelah pengecekan di lokasi sewa selesai.</p>
|
|
@elseif($p->status === 'disetujui')
|
|
<div class="mt-2">
|
|
<form method="POST" action="{{ route('dashboard.penyewaans.update-status', $p) }}">
|
|
@csrf
|
|
@method('PATCH')
|
|
<input type="hidden" name="status" value="dikembalikan">
|
|
<button type="submit" class="w-full rounded-lg bg-slate-700 px-3 py-2 text-xs font-semibold text-white hover:bg-slate-800">
|
|
Sudah Dikembalikan
|
|
</button>
|
|
</form>
|
|
</div>
|
|
<p class="mt-2 text-xs text-gray-500">Klik setelah barang benar-benar kembali ke toko agar stok otomatis tersedia lagi.</p>
|
|
@else
|
|
<p class="mt-2 text-xs text-gray-500">
|
|
Pengajuan sudah
|
|
{{
|
|
match ($p->status) {
|
|
'dikembalikan' => 'ditandai sudah dikembalikan.',
|
|
'disetujui' => 'disetujui admin.',
|
|
default => 'ditolak admin.',
|
|
}
|
|
}}
|
|
</p>
|
|
@endif
|
|
</td>
|
|
</tr>
|
|
@empty
|
|
<tr>
|
|
<td colspan="8" class="px-4 py-6 text-center text-gray-500">Belum ada pengajuan sewa masuk.</td>
|
|
</tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="surface-card rounded-[1.8rem] p-5 md:p-6">
|
|
<div class="flex items-center justify-between flex-wrap gap-2">
|
|
<div>
|
|
<h3 class="font-semibold text-gray-800 flex items-center gap-2"><i class="bi bi-people text-[#edc039]"></i>User Terdaftar</h3>
|
|
<p class="text-sm text-gray-500 mt-1">Admin dapat melihat seluruh user yang sudah register dan mengatur level member untuk verifikasi.</p>
|
|
</div>
|
|
<span class="text-xs bg-[#e6f5ee] text-[#edc039] px-2 py-1 rounded-full">{{ count($users ?? []) }} user</span>
|
|
</div>
|
|
<div class="responsive-table mt-4">
|
|
<table class="min-w-full text-sm">
|
|
<thead class="bg-gray-50 text-gray-600">
|
|
<tr>
|
|
<th class="px-4 py-3 text-left font-medium">User</th>
|
|
<th class="px-4 py-3 text-left font-medium">Kontak</th>
|
|
<th class="px-4 py-3 text-left font-medium">Riwayat</th>
|
|
<th class="px-4 py-3 text-left font-medium">Member Saat Ini</th>
|
|
<th class="px-4 py-3 text-left font-medium">Verifikasi Admin</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-gray-100">
|
|
@forelse($users as $user)
|
|
<tr class="hover:bg-gray-50 transition-colors">
|
|
<td class="px-4 py-3 text-gray-800">
|
|
<p class="font-medium">{{ $user->name }}</p>
|
|
<p class="text-xs text-gray-500">Username: {{ $user->username }}</p>
|
|
<p class="text-xs text-gray-500">Role: {{ ucfirst($user->role) }}</p>
|
|
</td>
|
|
<td class="px-4 py-3 text-gray-600">
|
|
<p>{{ $user->email }}</p>
|
|
<p class="text-xs text-gray-500">Terdaftar {{ optional($user->created_at)->format('d M Y H:i') ?? '-' }}</p>
|
|
</td>
|
|
<td class="px-4 py-3 text-gray-600">
|
|
<p>{{ $user->penyewaans_count }} penyewaan</p>
|
|
</td>
|
|
<td class="px-4 py-3">
|
|
<span class="inline-flex rounded-full border border-[#bfe6d1] bg-[#e6f5ee] px-3 py-1 text-xs font-semibold text-[#edc039]">
|
|
{{ $memberLabels[$user->member_level] ?? \Illuminate\Support\Str::of($user->member_level)->replace('_', ' ')->title() }}
|
|
</span>
|
|
</td>
|
|
<td class="px-4 py-3">
|
|
<form method="POST" action="{{ route('dashboard.users.verify-member', $user) }}" class="flex flex-col gap-2 md:flex-row md:items-center">
|
|
@csrf
|
|
@method('PATCH')
|
|
<select name="member_level" class="w-full rounded-lg border border-gray-300 bg-white px-3 py-2 text-sm focus:border-[#edc039] focus:ring-[#edc039] md:w-48">
|
|
@foreach($memberLabels as $value => $label)
|
|
<option value="{{ $value }}" {{ $user->member_level === $value ? 'selected' : '' }}>{{ $label }}</option>
|
|
@endforeach
|
|
</select>
|
|
<button type="submit" class="btn-dark px-4 py-2 text-sm font-medium whitespace-nowrap">
|
|
Simpan Verifikasi
|
|
</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
@empty
|
|
<tr>
|
|
<td colspan="5" class="px-4 py-6 text-center text-gray-500">Belum ada user yang terdaftar.</td>
|
|
</tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="surface-card rounded-[1.8rem] p-5 md:p-6">
|
|
<div class="flex items-center justify-between flex-wrap gap-2">
|
|
<h3 class="font-semibold text-gray-800 flex items-center gap-2"><i class="bi bi-gear text-[#edc039]"></i>Alur TOPSIS yang Diterapkan</h3>
|
|
<span class="text-xs text-gray-500">9 langkah proses</span>
|
|
</div>
|
|
<div class="mt-4 grid sm:grid-cols-2 lg:grid-cols-3 gap-3 text-sm">
|
|
<div class="rounded-[1.2rem] bg-[#f7fbfa] p-4 border border-[#dceceb]"><span class="font-semibold text-[#edc039]">1.</span> Input kriteria pengguna (penggunaan, merek, prioritas kualitas)</div>
|
|
<div class="rounded-[1.2rem] bg-[#f7fbfa] p-4 border border-[#dceceb]"><span class="font-semibold text-[#edc039]">2.</span> Ambil data kamera dari database</div>
|
|
<div class="rounded-[1.2rem] bg-[#f7fbfa] p-4 border border-[#dceceb]"><span class="font-semibold text-[#edc039]">3.</span> Normalisasi matriks (Euclidean)</div>
|
|
<div class="rounded-[1.2rem] bg-[#f7fbfa] p-4 border border-[#dceceb]"><span class="font-semibold text-[#edc039]">4.</span> Hitung bobot (disesuaikan prioritas)</div>
|
|
<div class="rounded-[1.2rem] bg-[#f7fbfa] p-4 border border-[#dceceb]"><span class="font-semibold text-[#edc039]">5.</span> Tentukan solusi ideal positif & negatif</div>
|
|
<div class="rounded-[1.2rem] bg-[#f7fbfa] p-4 border border-[#dceceb]"><span class="font-semibold text-[#edc039]">6.</span> Hitung jarak ke solusi ideal</div>
|
|
<div class="rounded-[1.2rem] bg-[#f7fbfa] p-4 border border-[#dceceb]"><span class="font-semibold text-[#edc039]">7.</span> Hitung nilai preferensi (kedekatan relatif)</div>
|
|
<div class="rounded-[1.2rem] bg-[#f7fbfa] p-4 border border-[#dceceb]"><span class="font-semibold text-[#edc039]">8.</span> Urutkan peringkat kamera</div>
|
|
<div class="rounded-[1.2rem] bg-[#f7fbfa] p-4 border border-[#dceceb]"><span class="font-semibold text-[#edc039]">9.</span> Tampilkan top 3 beserta lensa rekomendasi (brand match)</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
@endsection
|