@extends('layouts.app') @section('content') @php $canManage = auth()->user()->canManageLicenses(); @endphp

Produk software

Master produk dan vendor. Nama + vendor tidak boleh ganda.

Daftar lisensi @if ($canManage) + Lisensi @endif
Reset
@forelse ($products as $product)
{{ $product->name }}
{{ $product->vendor }} @if ($product->category) · {{ $product->category }} @endif · {{ $product->licenses_count }} lisensi
@if ($product->is_active) Aktif @else Nonaktif @endif
@if ($product->notes)

{{ $product->notes }}

@endif @if ($canManage)
Ubah produk
@csrf @method('PATCH')
@if ($product->licenses_count === 0)
@csrf @method('DELETE')
@else Tidak dapat dihapus: masih punya lisensi. @endif
@endif
@empty
Belum ada produk.
@endforelse
{{ $products->links() }}
@if ($canManage)

Tambah produk

@endif
@endsection