@extends('layouts.menage') @section('title', "Déclarations") @push('styles') @endpush @push('scripts') @endpush @section('content')

{{ \App\Helpers\TranslationHelper::getUserTranslations()['translations']['declaration']['title'] ?? 'Déclarations' }}

@php $t = \App\Helpers\TranslationHelper::getUserTranslations(); $monthKey = isset($initialMonthKey) ? strtolower($initialMonthKey) : strtolower(date('F')); $monthText = $t['translations']['months'][$monthKey] ?? $monthKey; // Forcer les mois en minuscule en français pour cohérence if (function_exists('mb_strtolower')) { $monthText = mb_strtolower($monthText, 'UTF-8'); } else { $monthText = strtolower($monthText); } $yearText = isset($initialYear) ? (int)$initialYear : (int)date('Y'); @endphp {{ $monthText }} {{ $yearText }}
@php $hasPackages = isset($packageDeclarations) && count($packageDeclarations) > 0; $hasEvents = isset($eventDeclarations) && count($eventDeclarations) > 0; @endphp
@if($hasPackages) @foreach($packageDeclarations as $declaration) @include('menage.declaration.partials.package-card', ['declaration' => $declaration]) @endforeach @endif @if($hasEvents) @foreach($eventDeclarations as $declaration) @include('menage.declaration.partials.event-card', ['declaration' => $declaration]) @endforeach @endif {{-- Hourly cards will be loaded via AJAX to avoid flash --}}
@endsection @push('modals')
@foreach(($addresses ?? []) as $addr) @php $rate = isset($addr->hourly_rate) && is_numeric($addr->hourly_rate) ? (float)$addr->hourly_rate : null; @endphp
{{ $addr->short_address ?? 'Adresse' }}
@endforeach
@endpush