@extends('layouts/default') {{-- Page title --}} @section('title') {{ $accessory->name }} {{ trans('general.accessory') }} @if ($accessory->model_number!='') ({{ $accessory->model_number }}) @endif @parent @stop @section('header_right') @endsection {{-- Page content --}} @section('content') @if ($accessory->deleted_at != '') {{ trans('admin/accessories/general.accessory_deleted_warning') }} @elseif ($accessory->archived) {{ trans('general.item_archived_warning', ['item_type' => trans('general.accessory')]) }} @endif @if ($accessory->deleted_at == '') @endif {{ trans('general.checked_out') }} @can('checkin', $accessory) @endcan @if ($accessory->deleted_at != '') {{-- Soft-deleted: keep every action visually present but non-interactive. x-button.edit hides itself on deleted rows, so render disabled stand-ins inline. Clone stays active since cloning a deleted accessory produces a new row without touching the deleted parent. --}} @can('update', $accessory) @endcan @can('checkout', $accessory) @endcan @can('update', $accessory) @endcan @elseif ($accessory->archived) {{-- Archived (but live): mirror the deleted-row treatment on edit, checkout, and delete. Archived rows are retired from active inventory, so interactive paths that would extend their footprint stay visually present but non-interactive. Clone and adjust-quantity keep their existing archived-aware behavior. --}} @can('update', $accessory) @endcan @can('checkout', $accessory) @endcan @can('update', $accessory) @endcan @can('update', $accessory) {{-- Pull-right matches the delete button's alignment on live rows, so unarchive sits in the same slot in the info panel without the destructive action migrating around. --}}
@csrf
@endcan @else @can('update', $accessory) @php $lastOrder = $accessory->lastOrderDefaults(); @endphp @endcan @endif
@endsection @section('moar_scripts') @if ($accessory->deleted_at == '') @can('files', $accessory) @endcan @can('update', $accessory) @endcan @endif @include ('partials.bootstrap-table') @endsection