fix(templates): la página de plantillas no embebía el componente
resources/views/projects/templates.blade.php usaba `<livewire/template-manager>` (sintaxis inválida; tras la reorganización el alias es `inspections.template-manager`) y un botón suelto con `$emit` (Livewire 2, fuera de componente) que no hacía nada. Ahora embebe correctamente <livewire:inspections.template-manager> (que ya trae su botón "Nuevo" + formulario funcional) y se elimina el botón roto. Tests: TemplateCreationTest (la página embebe el componente; crear plantilla funciona). Suite 79 passing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,12 +1,23 @@
|
||||
<x-app-layout>
|
||||
<div class="mb-6">
|
||||
<button wire:click="$emit('showTemplateForm')"
|
||||
class="btn btn-primary btn-lg">
|
||||
+ {{ __('New template') }}
|
||||
</button>
|
||||
<p class="text-sm text-muted mb-4">
|
||||
{{ __('Create generic templates that can be used in any phase of the project') }}
|
||||
</p>
|
||||
<x-slot name="header">
|
||||
<div class="flex items-center gap-3">
|
||||
<a href="{{ route('projects.dashboard', $project) }}" wire:navigate class="btn btn-ghost btn-sm px-2">
|
||||
<x-heroicon-o-arrow-left class="w-4 h-4" />
|
||||
</a>
|
||||
<div>
|
||||
<h2 class="font-semibold text-xl text-gray-800 leading-tight">{{ __('Inspection templates') }}</h2>
|
||||
<p class="text-sm text-gray-500 leading-tight">{{ $project->name }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</x-slot>
|
||||
|
||||
<div class="py-8">
|
||||
<div class="max-w-5xl mx-auto sm:px-6 lg:px-8">
|
||||
<p class="text-sm text-base-content/60 mb-4">
|
||||
{{ __('Create generic templates that can be used in any phase of the project') }}
|
||||
</p>
|
||||
|
||||
<livewire:inspections.template-manager :project="$project" />
|
||||
</div>
|
||||
</div>
|
||||
<livewire/template-manager :project="$project" />
|
||||
</x-app-layout>
|
||||
|
||||
Reference in New Issue
Block a user