@extends('layouts.app') @section('content') @php $canManage = auth()->user()->canManageLicenses(); $isAdmin = auth()->user()->isSlamSuperAdmin(); $state = $license->expiryState($soonDays); $usagePercent = $license->usagePercent(); $isPerpetual = $license->is_perpetual || $license->license_type === \App\Models\License::TYPE_PERPETUAL; $statusLabels = [ 'create' => 'Tambah', 'update' => 'Ubah', 'delete' => 'Hapus (Trash)', 'restore' => 'Pulihkan', 'purge' => 'Hapus permanen', 'reveal' => 'Tampilkan kunci', 'renew' => 'Perpanjang', 'import' => 'Impor', 'export' => 'Ekspor', ]; $fieldLabels = [ 'qty_total' => 'Qty', 'expired_at' => 'Tanggal berakhir', 'cost' => 'Biaya', 'start_date' => 'Tanggal mulai', 'verified_at' => 'Verifikasi', ]; @endphp
{{ $license->notes ?: '—' }}
Setiap tampil/salin meminta password login, tercatat di audit log, dan disembunyikan otomatis setelah 30 detik.
Terpakai {{ $license->assignedSeatsCount() }} · tersedia {{ $license->availableSeats() }} @if ($license->isNonCompliant()) · melebihi qty@endif
| Akun / perangkat | Pemakai | Status | Tanggal | Aksi |
|---|---|---|---|---|
|
{{ $seat->assignee_name }}
{{ $seat->assigneeTypeLabel() }}
@if ($seat->credential_ref)
· kredensial
@elseif ($seat->hasAccountPassword())
· 🔒 password tersimpan
@endif
@if ($seat->remark)
{{ $seat->remark }}
@endif
|
{{ $seat->employee_name ?: '—' }}
@if ($seat->department)
{{ $seat->department }}
@endif
|
@php $seatBadge = match ($seat->seat_status) { \App\Models\LicenseSeat::STATUS_ASSIGNED => 'badge-selesai', \App\Models\LicenseSeat::STATUS_UNUSED => 'badge-terlambat', \App\Models\LicenseSeat::STATUS_UNLICENSED => 'badge-open', default => 'badge-berjalan', }; @endphp {{ $seat->statusLabel() }} @if ($canManage) @endif |
Assign {{ $seat->assigned_at?->format('d-m-Y') ?? '—' }}
@if ($seat->released_at)
Lepas {{ $seat->released_at->format('d-m-Y') }}
@endif
@if ($seat->last_used_at)
Dipakai {{ $seat->last_used_at->format('d-m-Y') }}
@endif
@if ($seat->expired_at)
Expired {{ $seat->expired_at->format('d-m-Y') }}
@endif
|
@if ($canManage)
Ubah
@endif
@if ($canManage && $seat->isActive())
@else
—
@endif
|
| Belum ada seat tercatat. | ||||
| Waktu | Jenis | Field | Lama → baru | Catatan | Oleh |
|---|---|---|---|---|---|
| {{ $history->created_at?->format('d-m-Y H:i') }} | {{ $history->change_type === 'renewal' ? 'Perpanjangan' : 'Ubah' }} | {{ $fieldLabels[$history->field] ?? $history->field }} | {{ $history->old_value ?: '—' }} → {{ $history->new_value ?: '—' }} | {{ $history->note ?: '—' }} | {{ $history->changer?->name ?? 'sistem' }} |
| Belum ada riwayat qty/tanggal. | |||||
Belum ada aktivitas.
@endforelse @if ($isAdmin) Lihat audit log → @endif