@extends('layouts/default') {{-- Page title --}} @section('title') {{ trans('admin/components/general.checkout') }} @parent @stop {{-- Page content --}} @section('content') @if ($snipe_component->company) {!! $snipe_component->company->present()->formattedNameLink !!} @endif @if ($snipe_component->category) {!! $snipe_component->category->present()->formattedNameLink !!} @endif @include ('partials.forms.edit.asset-select', [ 'translated_name' => trans('general.select_asset'), 'fieldname' => 'asset_id', 'company_id' => $snipe_component->company_id, 'required' => 'true', 'value' => old('asset_id'), // Present when the admin reached this screen from a // /requests row; pre-scopes the picker to the // requester's assigned assets. See // ComponentCheckoutController::create for the wiring. // Empty result is intentional when the requester has // nothing assigned - the request-context callout // above the form tells the admin why the picker is // empty (no valid install target). 'assigned_to' => $requestingUserId ?? null, ]) @if ($snipe_component->requireAcceptance() || $snipe_component->getEula() || ($snipeSettings->webhook_endpoint != ''))
{{-- Components can only be checked out to assets (see ComponentCheckoutController::store, which forces checkout_to_type=asset). CheckoutableListener then resolves the notifiable user by walking to the target asset's assignee. Use the component-scoped copy that reflects the "if the asset is assigned to a user" chain, rather than the generic user-target copy used by the accessory / consumable / license / user-scoped checkout screens. --}} @if ($snipe_component->category->require_acceptance == '1') {{ trans('admin/categories/general.required_acceptance_component') }}
@endif @if ($snipe_component->getEula()) {{ trans('admin/categories/general.required_eula_component') }}
@endif @if ($snipeSettings->webhook_endpoint != '') {{ trans('general.webhook_msg_note') }} @endif
@endif
@stop