@extends('layouts.app')
@section('title', 'Detail Ajuan Restock')
@push('styles')
@vite('resources/css/admin/restock-requests.css')
@endpush
@section('content')
@php
$isDeleted = $restockRequest->activity?->deleted_at !== null;
$quantity = rtrim(rtrim(number_format($restockRequest->quantity, 2, ',', '.'), '0'), ',');
@endphp
@if (session('success'))
{{ session('success') }}
@endif
@if (session('error'))
{{ session('error') }}
@endif
{{-- HEADER DETAIL --}}
Barang
{{ $restockRequest->item?->name ?? '-' }}
Kategori
{{ $restockRequest->item?->category?->name ?? '-' }}
Satuan
{{ $restockRequest->item?->unit?->name ?? '-' }}
Jumlah Pengajuan
{{ $quantity }}
{{ $restockRequest->item?->unit?->name ?? '' }}
{{-- INFORMASI PENGAJUAN --}}
Informasi Pengajuan
Barista
{{ strtoupper(substr($restockRequest->user?->name ?? '-', 0, 1)) }}
{{ $restockRequest->user?->name ?? '-' }}
Tanggal Pengajuan
@if ($restockRequest->activity?->created_at)
{{ $restockRequest->activity->created_at->format('d-m-Y') }}
{{ $restockRequest->activity->created_at->format('H:i') }}
@else
-
@endif
Catatan Barista
@if ($restockRequest->note)
{{ $restockRequest->note }}
@else
Tidak ada catatan.
@endif
{{-- INFORMASI PROSES --}}
Informasi Proses
Diproses Oleh
@if ($restockRequest->processor)
{{ strtoupper(substr($restockRequest->processor->name, 0, 1)) }}
{{ $restockRequest->processor->name }}
@else
Belum diproses
@endif
Waktu Proses
@if ($restockRequest->processed_at)
{{ $restockRequest->processed_at->format('d-m-Y') }}
{{ $restockRequest->processed_at->format('H:i') }}
@else
Belum diproses
@endif
@if ($restockRequest->status === 'rejected')
Alasan Penolakan
{{ $restockRequest->rejection_reason ?? '-' }}
@endif
{{-- INFORMASI STATUS RESTOCK --}}
@if ($restockRequest->status === 'approved')
Informasi Restock
Pengajuan telah disetujui
Persetujuan belum menambah stok barang.
Stok akan bertambah setelah barang benar-benar diterima
dan dicatat melalui menu Barang Masuk.
@endif
{{-- ACTIVITY --}}
Riwayat Aktivitas
Pengajuan dibuat
{{ $restockRequest->activity?->creator?->name ?? ($restockRequest->user?->name ?? '-') }}
@if ($restockRequest->activity?->created_at)
{{ $restockRequest->activity->created_at->format('d-m-Y H:i') }}
@endif
@if ($restockRequest->processed_at)
@if ($restockRequest->status === 'approved')
@else
@endif
Ajuan
{{ $restockRequest->status === 'approved' ? 'disetujui' : 'ditolak' }}
{{ $restockRequest->processor?->name ?? '-' }}
{{ $restockRequest->processed_at->format('d-m-Y H:i') }}
@endif
@if ($restockRequest->activity?->deleted_at)
Ajuan dihapus
{{ $restockRequest->activity->deleter?->name ?? '-' }}
{{ $restockRequest->activity->deleted_at->format('d-m-Y H:i') }}
@endif
{{-- ACTION --}}
@if (!$isDeleted && $restockRequest->status === 'pending')
Tolak
Setujui
@endif
{{-- REJECT MODAL --}}