Enhance Documents page functionality and update API documentation
- Added a new `$results` property to the Documents page to allow users to specify the maximum number of results returned by the `document_list` endpoint, defaulting to ~108. - Updated the `searchDocuments` method to include the `results` parameter in API requests, ensuring it is sent as a string. - Modified the documents.blade.php view to include an input field for the `results` parameter, with appropriate placeholder text and guidance. - Improved the documentation for the `document_list` endpoint to clarify the behavior of the `results` parameter and its interaction with `thirdid`. - Updated the `Document_GetPDF` section to reflect its functionality and correct usage of the `LAYOUT` parameter. - Added a new test to verify that the `results` parameter is correctly sent to the API. - Overall, enhanced the user experience and API interaction for document management.
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
<x-logistics.card>
|
||||
<x-logistics.section-header title="document_list" description="Rechercher des documents" />
|
||||
<div class="p-6">
|
||||
<div class="grid grid-cols-1 gap-4 sm:grid-cols-2">
|
||||
<div class="grid grid-cols-1 gap-4 sm:grid-cols-3">
|
||||
<x-logistics.form-field
|
||||
wire:model="select"
|
||||
label="Colonnes (select)"
|
||||
@@ -33,6 +33,15 @@
|
||||
id="thirdId"
|
||||
placeholder="Ex: CUST001"
|
||||
/>
|
||||
<div>
|
||||
<x-logistics.form-field
|
||||
wire:model="results"
|
||||
label="Nombre de résultats (results)"
|
||||
id="results"
|
||||
placeholder="Par défaut : ~108"
|
||||
/>
|
||||
<p class="mt-1 text-xs text-gray-500 dark:text-gray-400">Effectif uniquement avec un thirdid</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-4 flex items-center gap-3">
|
||||
@@ -261,29 +270,26 @@
|
||||
|
||||
{{-- Document_GetPDF --}}
|
||||
<x-logistics.card>
|
||||
<x-logistics.section-header title="Document_GetPDF" description="Génération de PDF d'un document" />
|
||||
<x-logistics.section-header title="Document_GetPDF" description="Génération de PDF d'un document (retourne le PDF en base64)" />
|
||||
<div class="p-6">
|
||||
<div class="mb-4 rounded-lg bg-amber-50 p-3 text-sm text-amber-700 dark:bg-amber-400/10 dark:text-amber-400">
|
||||
Endpoint non fonctionnel -- la valeur attendue du paramètre LAYOUT est inconnue.
|
||||
</div>
|
||||
<div class="grid grid-cols-1 gap-4 sm:grid-cols-4">
|
||||
<x-logistics.form-field
|
||||
wire:model="pdfJnl"
|
||||
label="Code journal (JNL)"
|
||||
id="pdfJnl"
|
||||
placeholder="Ex: VEN"
|
||||
placeholder="Ex: 03VEN"
|
||||
/>
|
||||
<x-logistics.form-field
|
||||
wire:model="pdfNumber"
|
||||
label="Numéro de document (NUMBER)"
|
||||
id="pdfNumber"
|
||||
placeholder="Ex: 2026/0001"
|
||||
placeholder="Ex: 25105397"
|
||||
/>
|
||||
<x-logistics.form-field
|
||||
wire:model="pdfLayout"
|
||||
label="Mise en page (LAYOUT)"
|
||||
label="Mise en page (LAYOUT, numérique)"
|
||||
id="pdfLayout"
|
||||
placeholder="Valeur inconnue"
|
||||
placeholder="Ex: 1"
|
||||
/>
|
||||
<div class="flex items-end">
|
||||
<x-filament::button wire:click="getPdf" icon="heroicon-o-document-arrow-down">
|
||||
|
||||
Reference in New Issue
Block a user