@extends('layouts.app') @section('title', 'Template Inventory Assignments - ' . $template->name) @section('content')

Template Inventory Assignments

Manage inventory items for questionnaire template

Template Details

{{ $template->name }}

{{ $template->description ?? 'No description' }}

{{ $template->serviceType->name ?? 'Not specified' }} {{ $template->is_active ? 'Active' : 'Inactive' }}
{{ $template->questions->count() }} questions
@if($template->inventoryItems->count() > 0)

Current Inventory Assignments

{{ $template->inventoryItems->count() }} items
@foreach($template->inventoryItems as $assignment)
{{ $assignment->inventoryItem->name }}

{{ $assignment->inventoryItem->category->name }}

{{ number_format($assignment->getTotalPrice(), 2) }}
Default Quantity: {{ $assignment->default_quantity }}
Optional: {{ $assignment->is_optional ? 'Yes' : 'No' }}
@if($assignment->option_label)
Trigger Answer: {{ $assignment->option_label }}
@endif
@endforeach
@endif
@csrf @method('POST')

Assign Inventory Items to Template

@foreach($inventoryItems as $item)
@endforeach
0 items selected
Cancel

How Template Inventory Assignments Work

Template-Level Assignment

Items are assigned to the entire template rather than individual questions, making management simpler.

Trigger Answers

Specify which questionnaire answers should trigger each item (e.g., "Armed" → Body Armor).

Default Quantity

How many of each item to suggest when triggered.

Optional Items

If checked, the lead can skip these items during selection.

Pro Tip

Leave trigger answer blank to always include an item, regardless of questionnaire responses. Use the Preview button to review all assignments before saving.

@endsection @push('styles') @endpush @push('scripts') @endpush