@extends('layouts/default')
{{-- Page title --}}
@section('title')
{{ $component->name }}
{{ trans('general.component') }}
@parent
@stop
@section('header_right')
@endsection
@section('content')
@if ($snipe_component->deleted_at != '')
{{ trans('general.component_deleted_warning') }}
@endif
@if ($snipe_component->deleted_at == '')
@endif
{{ trans('general.assigned') }}
@can('checkin', $snipe_component)
@endcan
@if ($snipe_component->deleted_at != '')
{{-- Soft-deleted: keep every action visually
present but non-interactive so admins see
what's unavailable while viewing the
restorable record. x-button.edit hides
itself on deleted rows, so render disabled
stand-ins inline. --}}
@can('update', $snipe_component)
@endcan
{{-- Clone works on deleted items so admins
can spin up a replacement row without
restoring the original. Component gets
the normal active clone affordance. --}}
@can('checkout', $snipe_component)
@endcan
@can('update', $snipe_component)
@endcan
@else
@can('update', $snipe_component)
@php
$lastOrder = $snipe_component->lastOrderDefaults();
$adjustDisabledReason = $snipe_component->archived
? trans('general.archived_item_label', ['item_type' => trans('general.component')])
: null;
@endphp
@endcan
@endif
@endsection
@section('moar_scripts')
@if ($snipe_component->deleted_at == '')
@can('files', $snipe_component)
@endcan
@can('update', $snipe_component)
@endcan
@endif
@include ('partials.bootstrap-table', ['exportFile' => 'component' . $snipe_component->name . '-export', 'search' => false])
@endsection