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

@@ -42,6 +42,28 @@ class Tiers extends Page
public bool $hasHistory = false;
/**
* @return array<int, array{name: string, type: string, required: string, description: string}>
*/
public function paramTableThirdList(): array
{
return [
['name' => 'search', 'type' => 'string', 'required' => 'Oui', 'description' => 'Filtre de recherche textuel. Recherche dans name, groupid et vat (pas dans custid). Obligatoire.'],
['name' => 'select', 'type' => 'string', 'required' => 'Non', 'description' => 'Colonnes a retourner, separees par des virgules. Par defaut : custid, name.'],
['name' => 'results', 'type' => 'int', 'required' => 'Non', 'description' => "Sans effet. L'API retourne toujours un maximum de 10 resultats."],
];
}
/**
* @return array<int, array{name: string, type: string, required: string, description: string}>
*/
public function paramTableArtHistory(): array
{
return [
['name' => 'thirdid', 'type' => 'string', 'required' => 'Oui', 'description' => 'Identifiant du tiers (custid de la table cust). Sensible a la casse : doit etre en minuscules (thirdid, pas THIRDID).'],
];
}
public function searchTiers(): void
{
$this->errorMessage = null;