@extends('layouts.superadmin') @section('title', 'Slot Produk') @section('header-title', 'Slot Produk') @section('header-badge', 'Kelola') @section('header-subtitle', 'Atur kuota slot produk per toko, kelola paket slot, dan proses permintaan tambah slot dari pemilik toko.') @push('styles') @endpush @section('content') @include('partials.flash-toast')
calendar_today {{ \Carbon\Carbon::now()->locale('id')->translatedFormat('l, d F Y') }} Kuota slot diperbarui real-time
{{ $summary['totals']['toko'] }} Toko {{ number_format($summary['totals']['kuota']) }} Slot {{ number_format($summary['totals']['used']) }} Terpakai {{ $pendingCount }} Permintaan

Setiap toko memiliki kuota slot untuk produk yang dapat tampil. Kelola kuota gratis, paket berbayar, dan proses pembelian slot.

@php $tabs = [ 'kuota' => ['label' => 'Kuota Toko', 'icon' => 'storefront'], 'paket' => ['label' => 'Paket Slot', 'icon' => 'sell'], 'permintaan' => ['label' => 'Permintaan', 'icon' => 'request_quote', 'badge' => $pendingCount], ]; @endphp @foreach ($tabs as $key => $tab) {{ $tab['icon'] }} {{ $tab['label'] }} @if (!empty($tab['badge']) && $tab['badge'] > 0) {{ $tab['badge'] }} @endif @endforeach
@if ($section === 'kuota')

Kuota Per Toko

Terpakai dihitung dari produk berstatus aktif. Kuota = gratis + pembelian + tambahan manual.

workspace_premium

Slot Awal Toko Baru

Kuota gratis otomatis untuk toko yang baru disetujui. Saat ini {{ number_format($slotAwalDefault) }} slot. Kuota toko yang sudah ada tidak terpengaruh.

@csrf @method('PUT')
payments

Harga Per Slot Fleksibel

Harga satuan untuk pembelian slot fleksibel oleh Owner. Saat ini Rp {{ number_format($hargaPerSlot) }} per slot. Total = jumlah slot × harga satuan.

@csrf @method('PUT')
search
@if (request('q')) Reset @endif
@forelse ($stores as $store) @php $s = $summary['by_store'][$store->store_id]; @endphp
storefront

{{ $store->nama_toko }}

Kuota Gratis: {{ number_format($s['free_quota']) }}

Sisa {{ number_format($s['available']) }}
{{ number_format($s['used']) }} / {{ number_format($s['total']) }} terpakai {{ $s['progress'] }}%
@empty

Tidak ada toko yang cocok.

@endforelse
@if ($stores->hasPages())
{{ $stores->links() }}
@endif
@endif @if ($section === 'paket')

Paket Slot Berbayar

Paket berbayar yang dapat dibeli pemilik toko saat kuota habis.

search
@if (request('q')) Reset @endif
@forelse ($packages as $paket)

{{ $paket->nama_paket }}

{{ number_format($paket->durasi_hari) }} hari berlaku • {{ $paket->subscriptions_count }} pelanggan

{{ $paket->status }}
Rp {{ number_format($paket->harga, 0, ',', '.') }}
  • check_circle{{ number_format($paket->jumlah_slot) }} slot produk
  • check_circle{{ number_format($paket->durasi_hari) }} hari masa berlaku
@csrf
@empty

Belum ada paket slot. Tambahkan paket berbayar untuk pemilik toko.

@endforelse
@if ($packages->hasPages())
{{ $packages->links() }}
@endif
@endif @if ($section === 'permintaan')

Permintaan Tambah Slot

Pemilik toko mengajukan pembelian slot saat kuota habis. Pastikan bukti pembayaran sebelum menyetujui.

search
@if (request('q')) Reset @endif
@forelse ($purchaseRequests as $rmt) @php $isPending = $rmt->status === \App\Models\SlotPurchaseRequest::STATUS_PENDING; $badge = match ($rmt->status) { \App\Models\SlotPurchaseRequest::STATUS_DISETUJUI => 'bg-success/10 text-success border-success/20', \App\Models\SlotPurchaseRequest::STATUS_DITOLAK => 'bg-error/10 text-error border-error/30', default => 'bg-gold-accent/10 text-gold-accent border-gold-accent/20', }; $payVerified = $rmt->payment_status === \App\Models\SlotPurchaseRequest::PEMBAYARAN_TERVERIFIKASI; $payBadge = match ($rmt->payment_status) { \App\Models\SlotPurchaseRequest::PEMBAYARAN_TERVERIFIKASI => 'bg-success/10 text-success border-success/20', \App\Models\SlotPurchaseRequest::PEMBAYARAN_DITOLAK => 'bg-error/10 text-error border-error/30', default => 'bg-gold-accent/10 text-gold-accent border-gold-accent/30', }; @endphp
request_quote

{{ $rmt->store->nama_toko ?? '-' }}

{{ $rmt->status }} Bayar: {{ str_replace('_', ' ', $rmt->payment_status ?? '-') }}

{{ number_format($rmt->jumlah_slot) }} slot • total Rp {{ number_format((float) $rmt->total_harga, 0, ',', '.') }} (satuan Rp {{ number_format((float) $rmt->harga_per_slot, 0, ',', '.') }}) @if ($rmt->metode_pembayaran) • {{ $rmt->metode_pembayaran }} @endif

diajukan {{ $rmt->diajukan_pada?->translatedFormat('d M Y, H:i') ?? '-' }}

@if ($rmt->alasan)

Alasan: {{ $rmt->alasan }}

@endif @if ($rmt->alasan_penolakan)

Ditolak: {{ $rmt->alasan_penolakan }}

@endif
@if ($rmt->file_bukti) receipt_longLihat Bukti Bayar @else Tanpa bukti bayar @endif @if ($rmt->handler) • ditangani {{ $rmt->handler->nama_lengkap }} @endif
@if ($isPending)
@csrf
@endif
@empty

Belum ada permintaan tambah slot.

@endforelse
@if ($purchaseRequests->hasPages())
{{ $purchaseRequests->links() }}
@endif
@endif
@component('SuperAdmin.partials.premium-modal', [ 'id' => 'modal-tambah', 'dataModal' => true, 'icon' => 'add_box', 'title' => 'Tambah Slot Manual', 'subtitle' => '-', 'subtitleRaw' => true, ])
@csrf
@slot('footer')
@endslot
@endcomponent @component('SuperAdmin.partials.premium-modal', [ 'id' => 'modal-tambah-paket', 'dataModal' => true, 'icon' => 'inventory_2', 'title' => 'Tambah Paket Baru', 'subtitle' => 'Paket Slot', ])
@csrf
@slot('footer')
@endslot
@endcomponent @component('SuperAdmin.partials.premium-modal', [ 'id' => 'modal-tolak', 'dataModal' => true, 'icon' => 'block', 'title' => 'Tolak Permintaan', 'subtitle' => '-', 'subtitleRaw' => true, ])
@csrf
@slot('footer')
@endslot
@endcomponent @component('SuperAdmin.partials.premium-confirm', [ 'id' => 'confirmSlotModal', 'icon' => 'help', 'iconBox' => 'bg-gold-accent/20 border-gold-accent/30', 'iconColor' => 'text-gold-accent', 'zIndex' => 75, 'close' => 'closeConfirmSlot', 'dataModal' => true, ])

Konfirmasi

Lanjutkan aksi ini?

@slot('footer')
@endslot @endcomponent @endsection @push('scripts') @endpush