@php $isEdit = isset($client) && $client->exists; $pageTitle = $isEdit ? __('clients.edit_title') : __('clients.create_title'); $formAction = $isEdit ? route('clients.update', $client->id) : route('clients.store'); $formMethod = $isEdit ? 'PUT' : 'POST'; $submitText = $isEdit ? __('clients.form.update_button') : __('clients.form.create_button'); $clientName = $isEdit ? $client->name : __('clients.create_title'); // Ottieni le azioni predefinite del cliente $predefinedActions = $isEdit ? $client->getPredefinedActions() : ($defaultPredefinedActions ?? []); // Assicurati che actionsMetadata e actionsByCategory siano sempre definiti $actionsMetadata = $actionsMetadata ?? []; $actionsByCategory = $actionsByCategory ?? []; @endphp @extends('layouts.app') @section('title', $pageTitle) @section('breadcrumbs') @if($isEdit) @include('components.breadcrumbs', ['items' => [ ['title' => $client->name, 'url' => route('clients.show', $client->id)], ['title' => __('clients.edit_title'), 'active' => true] ]]) @else @include('components.breadcrumbs', ['items' => [ ['title' => __('clients.create_title'), 'active' => true] ]]) @endif @endsection @section('content')
@if($isEdit) Gestisci le configurazioni e le impostazioni avanzate @else Configura un nuovo cliente per il monitoraggio dell'accessibilità @endif
{{ json_encode($errors->toArray(), JSON_PRETTY_PRINT) }}