@props([ 'type', 'template', ]) {{-- Right-column "Saved Templates" panel shared by the three custom report pages (asset / component / consumable). Report-type-specific bits (Livewire component type, the route name for the save-as-template guard) are derived from $type. --}} @php $saveAsNewRoutes = match ($type) { 'asset' => ['reports/custom'], 'component' => ['reports/custom', 'reports.custom.component'], 'consumable' => ['reports/custom', 'reports.custom.consumable'], }; $isTemplatePage = request()->routeIs('report-templates.show'); $isOwner = $template->created_by == auth()->id(); @endphp @if ($isTemplatePage && $isOwner) {{-- Owner-of-saved-template controls: name, is_shared, Save, Delete. The name + is_shared inputs sit in the sidebar but belong to the main report-config form; form="custom-report-form" wires them in even though they're DOM-detached. The Save button uses the same form attribute plus formaction so it POSTs to the template-update endpoint instead of the main form's download action. --}}
{!! trans('admin/reports/message.saving_templates_description') !!}