Enhance API parameter documentation and introduce reusable component

- Added a new Blade component `<x-logistics.param-table>` for displaying API parameter tables across all Filament pages, ensuring consistent styling and reducing HTML duplication.
- Integrated parameter tables for each endpoint in the Articles, Documents, Divers, Journaux, Tiers, and other pages, providing users with clear reference information.
- Updated the documentation to reflect the new structure and details of API parameters, including required fields and descriptions.
- Improved user experience by ensuring that endpoints without parameters do not display empty tables.
- Overall, enhanced the clarity and usability of API interactions within the application.
This commit is contained in:
2026-02-23 13:55:00 +01:00
parent c84e0c680a
commit bc82299aa6
20 changed files with 989 additions and 178 deletions

View File

@@ -53,6 +53,8 @@
<span class="text-sm text-gray-500">Recherche en cours...</span>
</div>
</div>
<x-logistics.param-table :params="$this->paramTableDocumentList()" />
</div>
</x-logistics.card>
@@ -110,6 +112,8 @@
<span class="text-sm text-gray-500">Chargement...</span>
</div>
<x-logistics.param-table :params="$this->paramTableDocumentDetail()" />
<div wire:loading.remove wire:target="getDocumentDetail" class="mt-4">
<x-logistics.json-block :data="$detailData" :searched="$hasDetail" />
</div>
@@ -139,6 +143,8 @@
<span class="text-sm text-gray-500">Chargement...</span>
</div>
<x-logistics.param-table :params="$this->paramTableStatusList()" />
<div wire:loading.remove wire:target="getStatusList" class="mt-4">
<x-logistics.json-block :data="$statusData" :searched="$hasStatus" />
</div>
@@ -192,6 +198,8 @@
<span class="text-sm text-gray-500">Chargement...</span>
</div>
<x-logistics.param-table :params="$this->paramTableUnitPriceAndVat()" />
<div wire:loading.remove wire:target="getUnitPriceAndVat" class="mt-4">
<x-logistics.json-block :data="$priceData" :searched="$hasPrice" />
</div>
@@ -227,6 +235,8 @@
<span class="text-sm text-gray-500">Chargement...</span>
</div>
<x-logistics.param-table :params="$this->paramTableDueDate()" />
<div wire:loading.remove wire:target="getDueDate" class="mt-4">
<x-logistics.json-block :data="$dueDateData" :searched="$hasDueDate" />
</div>
@@ -262,6 +272,8 @@
<span class="text-sm text-gray-500">Chargement...</span>
</div>
<x-logistics.param-table :params="$this->paramTableAttachListThumbnail()" />
<div wire:loading.remove wire:target="getAttachListThumbnail" class="mt-4">
<x-logistics.json-block :data="$attachData" :searched="$hasAttach" />
</div>
@@ -303,6 +315,8 @@
<span class="text-sm text-gray-500">Chargement...</span>
</div>
<x-logistics.param-table :params="$this->paramTableGetPdf()" />
<div wire:loading.remove wire:target="getPdf" class="mt-4">
<x-logistics.json-block :data="$pdfData" :searched="$hasPdf" />
</div>
@@ -384,6 +398,8 @@
</div>
</div>
<x-logistics.param-table :params="$this->paramTableDocumentAdd()" />
<div wire:loading.remove wire:target="addDocument" class="mt-4">
<x-logistics.json-block :data="$addResult" :searched="$hasAdded" />
</div>
@@ -443,6 +459,8 @@
</div>
</div>
<x-logistics.param-table :params="$this->paramTableDocumentMod()" />
<div wire:loading.remove wire:target="modDocument" class="mt-4">
<x-logistics.json-block :data="$modResult" :searched="$hasModified" />
</div>