Implement CRUD functionality for Articles and Tiers with enhanced API documentation
- Introduced new endpoints for creating and modifying articles (`art_add`, `art_mod`) and tiers (`third_add`, `third_mod`), allowing users to manage these entities effectively. - Updated the Articles and Tiers pages to include forms for adding and modifying records, complete with parameter tables for clear guidance on required inputs. - Enhanced the API documentation to include detailed descriptions, examples, and metadata for the new endpoints, improving usability and understanding for developers. - Created a new rule for writing conventions with French accents to ensure consistency across the project. - Updated existing documentation to reflect structural changes and added a summary table for CRUD operations. - Added tests to verify the functionality of the new features and ensure robust error handling.
This commit is contained in:
@@ -107,13 +107,89 @@
|
||||
</div>
|
||||
</x-logistics.card>
|
||||
@else
|
||||
{{-- art_add --}}
|
||||
<x-logistics.card>
|
||||
<x-logistics.section-header title="art_add" description="Créer un nouvel article" />
|
||||
<div class="p-6">
|
||||
<x-logistics.empty-state
|
||||
icon="heroicon-o-arrow-up-tray"
|
||||
title="Aucun endpoint d'écriture disponible"
|
||||
description="La section Articles ne dispose pas d'endpoints d'envoi de données."
|
||||
/>
|
||||
<div class="grid grid-cols-1 gap-4 sm:grid-cols-3">
|
||||
<x-logistics.form-field
|
||||
wire:model="addArtId"
|
||||
label="Identifiant article (ARTID)"
|
||||
id="addArtId"
|
||||
placeholder="Ex: ART001"
|
||||
/>
|
||||
<x-logistics.form-field
|
||||
wire:model="addName"
|
||||
label="Nom (NAME1)"
|
||||
id="addName"
|
||||
placeholder="Ex: Clavier sans fil"
|
||||
/>
|
||||
<x-logistics.form-field
|
||||
wire:model="addSalePrice"
|
||||
label="Prix de vente (SALEPRICE)"
|
||||
id="addSalePrice"
|
||||
placeholder="Ex: 49.99"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="mt-4 flex items-center gap-3">
|
||||
<x-filament::button wire:click="addArticle" icon="heroicon-o-plus-circle" color="success">
|
||||
Créer l'article
|
||||
</x-filament::button>
|
||||
<div wire:loading wire:target="addArticle" class="flex items-center gap-2">
|
||||
<x-filament::loading-indicator class="h-4 w-4 text-primary-500" />
|
||||
<span class="text-sm text-gray-500">Création en cours...</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<x-logistics.param-table :params="$this->paramTableArtAdd()" />
|
||||
|
||||
<div wire:loading.remove wire:target="addArticle" class="mt-4">
|
||||
<x-logistics.json-block :data="$addResult" :searched="$hasAdded" />
|
||||
</div>
|
||||
</div>
|
||||
</x-logistics.card>
|
||||
|
||||
{{-- art_mod --}}
|
||||
<x-logistics.card>
|
||||
<x-logistics.section-header title="art_mod" description="Modifier un article existant" />
|
||||
<div class="p-6">
|
||||
<div class="grid grid-cols-1 gap-4 sm:grid-cols-3">
|
||||
<x-logistics.form-field
|
||||
wire:model="modArtId"
|
||||
label="Identifiant article (ARTID)"
|
||||
id="modArtId"
|
||||
placeholder="Ex: ART001"
|
||||
/>
|
||||
<x-logistics.form-field
|
||||
wire:model="modName"
|
||||
label="Nouveau nom (NAME1)"
|
||||
id="modName"
|
||||
placeholder="Ex: Clavier Bluetooth"
|
||||
/>
|
||||
<x-logistics.form-field
|
||||
wire:model="modSalePrice"
|
||||
label="Nouveau prix de vente (SALEPRICE)"
|
||||
id="modSalePrice"
|
||||
placeholder="Ex: 59.99"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="mt-4 flex items-center gap-3">
|
||||
<x-filament::button wire:click="modArticle" icon="heroicon-o-pencil-square" color="warning">
|
||||
Modifier l'article
|
||||
</x-filament::button>
|
||||
<div wire:loading wire:target="modArticle" class="flex items-center gap-2">
|
||||
<x-filament::loading-indicator class="h-4 w-4 text-primary-500" />
|
||||
<span class="text-sm text-gray-500">Modification en cours...</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<x-logistics.param-table :params="$this->paramTableArtMod()" />
|
||||
|
||||
<div wire:loading.remove wire:target="modArticle" class="mt-4">
|
||||
<x-logistics.json-block :data="$modResult" :searched="$hasModified" />
|
||||
</div>
|
||||
</div>
|
||||
</x-logistics.card>
|
||||
@endif
|
||||
|
||||
Reference in New Issue
Block a user