feat: dashboard amélioré, exports budgets, alertes expiration et correctifs

## Dashboard
- Refonte complète du tableau de bord avec widgets budgets, commandes, contrats
- Intégration des données d'exécution budgétaire en temps réel

## Exports & Rapports
- BudgetExecutionExport : export Excel de l'exécution budgétaire
- Template PDF budgets (budgets_pdf.blade.php)
- Routes d'export PDF et Excel

## Alertes & Notifications
- Commande CheckExpirations : détection des contrats/assets arrivant à échéance
- Mail ExpiringElementsMail avec template Blade
- Planification via routes/console.php

## Correctifs
- CommandePolicy et ContratPolicy : ajustements des règles d'autorisation
- ContratController : corrections mineures
- Commande model : ajustements relations/casts
- AuthenticatedLayout : refonte navigation avec icônes budgets
- Assets/Form.vue : corrections formulaire
- Seeder rôles/permissions mis à jour
- Dépendances composer mises à jour (barryvdh/laravel-dompdf, maatwebsite/excel)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jeremy bayse
2026-04-11 20:20:49 +02:00
parent 0ad77de412
commit 04fc56cd70
18 changed files with 1403 additions and 229 deletions

View File

@@ -1,7 +1,8 @@
<script setup>
import AuthenticatedLayout from '@/Layouts/AuthenticatedLayout.vue'
import { Head, Link, useForm } from '@inertiajs/vue3'
import { ref } from 'vue'
import { ref, computed } from 'vue'
import SearchableSelect from '@/Components/SearchableSelect.vue'
const props = defineProps({
asset: Object,
@@ -27,6 +28,13 @@ const form = useForm({
notes: props.asset?.notes || '',
})
const commandesOptions = computed(() => {
return props.commandes.map(cmd => ({
value: cmd.id,
label: `${cmd.numero_commande ?? 'Sans-N'} - ${cmd.objet}`
}))
})
const isSearchingEan = ref(false)
const eanError = ref('')
const eanSuccess = ref('')
@@ -220,12 +228,11 @@ function submit() {
<h2 class="mb-5 text-sm font-semibold uppercase tracking-wide text-gray-500 font-bold">Achat & Commande</h2>
<div>
<label class="block text-sm font-medium text-gray-700">Commande associée (optionnel)</label>
<select v-model="form.commande_id" class="mt-1 block w-full rounded-lg border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm">
<option value="">Aucune commande liée</option>
<option v-for="cmd in commandes" :key="cmd.id" :value="cmd.id">
N° {{ cmd.numero_commande ?? 'Sans-N' }} - {{ cmd.objet }}
</option>
</select>
<SearchableSelect
v-model="form.commande_id"
:options="commandesOptions"
placeholder="Rechercher par numéro ou objet..."
/>
<p class="mt-1 text-xs text-gray-500">Permet de retrouver l'origine de l'achat et les justificatifs.</p>
</div>
</div>