Update project dependencies and enhance documentation
- Added `barryvdh/laravel-dompdf` to `composer.json` for PDF generation capabilities. - Updated `boost.json` to include `tailwindcss-development` in skills. - Modified `package.json` and `package-lock.json` to upgrade Tailwind CSS and related packages. - Improved README.md for clarity and corrected French language errors. - Created design system documentation for Filament components. - Added new Filament pages for Dashboard and Documentation with dynamic content loading. - Enhanced TablesExplorer functionality with improved table and column management.
This commit is contained in:
110
.cursor/rules/design-system.mdc
Normal file
110
.cursor/rules/design-system.mdc
Normal file
@@ -0,0 +1,110 @@
|
||||
---
|
||||
description: Design system conventions for all Filament page views in this application
|
||||
globs:
|
||||
- resources/views/filament/pages/**/*.blade.php
|
||||
- resources/views/components/logistics/**/*.blade.php
|
||||
---
|
||||
|
||||
# Design System -- API Logistics
|
||||
|
||||
## Composants Blade reutilisables
|
||||
|
||||
Tous les elements visuels recurrents sont centralises dans `resources/views/components/logistics/`.
|
||||
Utiliser ces composants au lieu de dupliquer du HTML/CSS.
|
||||
|
||||
| Composant | Usage | Fichier |
|
||||
|---|---|---|
|
||||
| `<x-logistics.card>` | Conteneur principal (panneau blanc arrondi) | `logistics/card.blade.php` |
|
||||
| `<x-logistics.section-header>` | En-tete de section (titre + description + slot actions) | `logistics/section-header.blade.php` |
|
||||
| `<x-logistics.error-banner>` | Bandeau d'erreur API | `logistics/error-banner.blade.php` |
|
||||
| `<x-logistics.stat-bar>` | Barre de metadata/statistiques | `logistics/stat-bar.blade.php` |
|
||||
| `<x-logistics.stat-item>` | Element individuel dans stat-bar | `logistics/stat-item.blade.php` |
|
||||
| `<x-logistics.data-table>` | Tableau de donnees dynamique | `logistics/data-table.blade.php` |
|
||||
| `<x-logistics.empty-state>` | Etat vide (icone + texte) | `logistics/empty-state.blade.php` |
|
||||
| `<x-logistics.search-input>` | Champ de recherche avec icone loupe | `logistics/search-input.blade.php` |
|
||||
| `<x-logistics.form-field>` | Champ de formulaire (label + input) | `logistics/form-field.blade.php` |
|
||||
| `<x-logistics.json-block>` | Bloc JSON formate | `logistics/json-block.blade.php` |
|
||||
|
||||
## Conventions CSS
|
||||
|
||||
### Carte (card)
|
||||
- `rounded-xl bg-white shadow-sm ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10`
|
||||
|
||||
### En-tete de section dans une carte
|
||||
- Wrapper: `border-b border-gray-200 px-6 py-4 dark:border-white/10`
|
||||
- Titre: `text-base font-semibold text-gray-950 dark:text-white`
|
||||
- Description: `mt-1 text-xs text-gray-500 dark:text-gray-400`
|
||||
|
||||
### Contenu de carte
|
||||
- Padding: `p-6`
|
||||
|
||||
### Tableau de donnees
|
||||
- Conteneur: `overflow-x-auto`
|
||||
- Table: `w-full text-left text-sm`
|
||||
- Thead tr: `border-b border-gray-200 dark:border-white/10`
|
||||
- Th: `px-3 py-2.5 text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400`
|
||||
- Tbody: `divide-y divide-gray-100 dark:divide-white/5`
|
||||
- Tr: `transition-colors hover:bg-gray-50 dark:hover:bg-white/5`
|
||||
- Td: `px-3 py-2.5 text-sm text-gray-700 dark:text-gray-300`
|
||||
- Td valeur technique (ID, code): ajouter `font-mono`
|
||||
|
||||
### Badge compteur
|
||||
- `rounded-full px-2 py-0.5 text-xs font-medium tabular-nums bg-gray-100 text-gray-600 dark:bg-white/10 dark:text-gray-300`
|
||||
|
||||
### Champ de formulaire (input)
|
||||
- `w-full rounded-lg border-gray-300 py-2 text-sm shadow-sm focus:border-primary-500 focus:ring-primary-500 dark:border-white/10 dark:bg-white/5 dark:text-white`
|
||||
- Label: `block text-sm font-medium text-gray-700 dark:text-gray-300`
|
||||
- Espacement label/input: `mt-1.5`
|
||||
|
||||
### Bloc JSON (pre)
|
||||
- `rounded-lg border border-gray-200 bg-gray-50 p-4 text-xs font-mono leading-relaxed text-gray-700 dark:border-white/10 dark:bg-gray-800 dark:text-gray-300`
|
||||
|
||||
### Etat vide
|
||||
- Conteneur: `flex flex-col items-center justify-center py-12 text-center`
|
||||
- Icone: `h-10 w-10 text-gray-300 dark:text-gray-600`
|
||||
- Titre: `mt-3 text-sm font-medium text-gray-900 dark:text-white`
|
||||
- Description: `mt-1 text-sm text-gray-500 dark:text-gray-400`
|
||||
|
||||
### Erreur API
|
||||
- `rounded-lg bg-danger-50 p-4 text-sm text-danger-600 dark:bg-danger-400/10 dark:text-danger-400`
|
||||
|
||||
### Stat bar
|
||||
- `flex flex-wrap items-center gap-x-6 gap-y-2`
|
||||
- Chaque item: icone h-4 w-4 + texte text-sm text-gray-500
|
||||
|
||||
### Loading
|
||||
- Utiliser `<x-filament::loading-indicator>` + `wire:loading` / `wire:loading.remove`
|
||||
|
||||
## Structure d'une page type
|
||||
|
||||
```blade
|
||||
<x-filament-panels::page>
|
||||
<x-logistics.error-banner :message="$errorMessage" />
|
||||
|
||||
{{-- Stat bar optionnelle --}}
|
||||
|
||||
{{-- Section formulaire --}}
|
||||
<x-logistics.card>
|
||||
<x-logistics.section-header title="..." description="..." />
|
||||
<div class="p-6">
|
||||
{{-- Formulaire avec grille --}}
|
||||
</div>
|
||||
</x-logistics.card>
|
||||
|
||||
{{-- Section resultats --}}
|
||||
<x-logistics.card>
|
||||
<x-logistics.section-header title="..." />
|
||||
<div class="p-6">
|
||||
<x-logistics.data-table :data="$data" :metadata="$metadata" />
|
||||
</div>
|
||||
</x-logistics.card>
|
||||
</x-filament-panels::page>
|
||||
```
|
||||
|
||||
## Regles
|
||||
|
||||
- Toujours utiliser les composants `x-logistics.*` au lieu de dupliquer les classes CSS.
|
||||
- Un composant `<x-logistics.card>` n'a PAS de padding interne. Le padding est gere par les enfants.
|
||||
- Les formulaires dans une carte utilisent `<div class="p-6">` pour le contenu.
|
||||
- Toujours afficher un etat de chargement (`wire:loading`) sur les actions reseau.
|
||||
- Les blocs JSON utilisent `<x-logistics.json-block>` et non `<pre>` brut.
|
||||
@@ -13,6 +13,7 @@ The Laravel Boost guidelines are specifically curated by Laravel maintainers for
|
||||
This application is a Laravel application and its main Laravel ecosystems package & versions are below. You are an expert with them all. Ensure you abide by these specific packages & versions.
|
||||
|
||||
- php - 8.4.16
|
||||
- filament/filament (FILAMENT) - v5
|
||||
- laravel/fortify (FORTIFY) - v1
|
||||
- laravel/framework (LARAVEL) - v12
|
||||
- laravel/prompts (PROMPTS) - v0
|
||||
@@ -23,6 +24,7 @@ This application is a Laravel application and its main Laravel ecosystems packag
|
||||
- laravel/sail (SAIL) - v1
|
||||
- pestphp/pest (PEST) - v4
|
||||
- phpunit/phpunit (PHPUNIT) - v12
|
||||
- tailwindcss (TAILWINDCSS) - v4
|
||||
|
||||
## Skills Activation
|
||||
|
||||
@@ -31,6 +33,7 @@ This project has domain-specific skills available. You MUST activate the relevan
|
||||
- `fluxui-development` — Develops UIs with Flux UI Free components. Activates when creating buttons, forms, modals, inputs, dropdowns, checkboxes, or UI components; replacing HTML form elements with Flux; working with flux: components; or when the user mentions Flux, component library, UI components, form fields, or asks about available Flux components.
|
||||
- `livewire-development` — Develops reactive Livewire 4 components. Activates when creating, updating, or modifying Livewire components; working with wire:model, wire:click, wire:loading, or any wire: directives; adding real-time updates, loading states, or reactivity; debugging component behavior; writing Livewire tests; or when the user mentions Livewire, component, counter, or reactive UI.
|
||||
- `pest-testing` — Tests applications using the Pest 4 PHP framework. Activates when writing tests, creating unit or feature tests, adding assertions, testing Livewire components, browser testing, debugging test failures, working with datasets or mocking; or when the user mentions test, spec, TDD, expects, assertion, coverage, or needs to verify functionality works.
|
||||
- `tailwindcss-development` — Styles applications using Tailwind CSS v4 utilities. Activates when adding styles, restyling components, working with gradients, spacing, layout, flex, grid, responsive design, dark mode, colors, typography, or borders; or when the user mentions CSS, styling, classes, Tailwind, restyle, hero section, cards, buttons, or any visual/UI changes.
|
||||
|
||||
## Conventions
|
||||
|
||||
@@ -261,4 +264,12 @@ protected function isAccessible(User $user, ?string $path = null): bool
|
||||
- Do NOT delete tests without approval.
|
||||
- CRITICAL: ALWAYS use `search-docs` tool for version-specific Pest documentation and updated code examples.
|
||||
- IMPORTANT: Activate `pest-testing` every time you're working with a Pest or testing-related task.
|
||||
|
||||
=== tailwindcss/core rules ===
|
||||
|
||||
# Tailwind CSS
|
||||
|
||||
- Always use existing Tailwind conventions; check project patterns before adding new ones.
|
||||
- IMPORTANT: Always use `search-docs` tool for version-specific Tailwind CSS documentation and updated code examples. Never rely on training data.
|
||||
- IMPORTANT: Activate `tailwindcss-development` every time you're working with a Tailwind CSS or styling-related task.
|
||||
</laravel-boost-guidelines>
|
||||
|
||||
69
.cursor/rules/update-documentation.mdc
Normal file
69
.cursor/rules/update-documentation.mdc
Normal file
@@ -0,0 +1,69 @@
|
||||
# Update Documentation
|
||||
|
||||
Quand l'utilisateur dit **"update documentation"**, tu DOIS mettre a jour le fichier `documentation/documentation_api_logistics.md` en suivant cette procedure.
|
||||
|
||||
## Procedure de mise a jour
|
||||
|
||||
1. **Lire les sources suivantes** (dans cet ordre) :
|
||||
- `app/Services/LogisticsService.php` : toutes les methodes publiques = endpoints disponibles. Les PHPDoc `@param` contiennent les parametres attendus.
|
||||
- `config/logistics.php` : configuration de connexion (variables d'environnement, valeurs par defaut).
|
||||
- `.env` : valeurs actuelles des variables de configuration.
|
||||
- `documentation/documentation_api_logistics.md` : documentation existante a mettre a jour.
|
||||
- `memory-bank/techContext.md` : contexte technique (tables, types de colonnes, endpoints connus).
|
||||
|
||||
2. **Identifier les changements** :
|
||||
- Nouvelles methodes dans `LogisticsService` = nouveaux endpoints a documenter.
|
||||
- Methodes supprimees = endpoints a retirer.
|
||||
- Parametres modifies (PHPDoc `@param`) = mise a jour des tableaux de parametres.
|
||||
- Nouvelles variables d'environnement dans `config/logistics.php` = mise a jour de la section pre-requis.
|
||||
|
||||
3. **Mettre a jour le fichier** en preservant strictement cette structure :
|
||||
|
||||
```
|
||||
# Documentation API Logistics (Flex/ESI Gescom)
|
||||
Derniere mise a jour : <date du jour>
|
||||
|
||||
## Table des matieres
|
||||
## 1. Pre-requis
|
||||
## 2. Comment effectuer des requetes
|
||||
## 3. Structure de reponse
|
||||
## 4. Tables et colonnes disponibles
|
||||
## 5. Recuperation de donnees
|
||||
### 5.1 Structure de la base de donnees (tables_list, column_list)
|
||||
### 5.2 Articles (art_list, art_getstk)
|
||||
### 5.3 Journaux (jnl_list)
|
||||
### 5.4 Documents (document_list, document_detail, Document_GetStatusList, Document_GetUnitPriceAndVat, Document_GetDueDate, Document_GetAttachListThumbnail)
|
||||
### 5.5 Tiers (third_list, third_GetArtHistory)
|
||||
### 5.6 Divers (getserialnumber, codes_list)
|
||||
## 6. Envoi de donnees
|
||||
### 6.1 Ajout d'un document (document_add)
|
||||
### 6.2 Modification d'un document (document_mod)
|
||||
## 7. Endpoints non fonctionnels
|
||||
## 8. Relations entre entites
|
||||
## 9. Remarques et points d'attention
|
||||
## 10. Ressources externes
|
||||
```
|
||||
|
||||
4. **Pour chaque endpoint, documenter** :
|
||||
- Description fonctionnelle (a quoi il sert).
|
||||
- URL au format `POST /{dossier}/{endpoint}`.
|
||||
- Methode service correspondante (`LogisticsService::methode()`).
|
||||
- Tableau des parametres : nom, type, obligatoire (Oui/Non), description detaillee.
|
||||
- Exemple de requete (body JSON).
|
||||
- Exemple de reponse si disponible.
|
||||
|
||||
5. **Classer les endpoints** :
|
||||
- Section 5 (Recuperation) : endpoints qui lisent des donnees (toutes les methodes sauf `documentAdd` et `documentMod`).
|
||||
- Section 6 (Envoi) : endpoints qui creent ou modifient des donnees (`documentAdd`, `documentMod`).
|
||||
- Section 7 : endpoints identifies mais non fonctionnels.
|
||||
|
||||
6. **Mettre a jour la date** en haut du fichier (`Derniere mise a jour : <date du jour>`).
|
||||
|
||||
## Regles
|
||||
|
||||
- Ne jamais supprimer d'information existante sans raison (endpoint supprime du service).
|
||||
- Ton factuel et concis, sans emojis.
|
||||
- Toujours inclure les chemins de fichiers exacts dans les references.
|
||||
- Les exemples de requete doivent utiliser des valeurs realistes.
|
||||
- La table des matieres doit refleter les sections du document.
|
||||
- Les endpoints non fonctionnels restent documentes avec le statut "Non fonctionnel" et la description du probleme.
|
||||
Reference in New Issue
Block a user