🎉 First commit
This commit is contained in:
91
resources/views/filament/pages/articles.blade.php
Normal file
91
resources/views/filament/pages/articles.blade.php
Normal file
@@ -0,0 +1,91 @@
|
||||
<x-filament-panels::page>
|
||||
@if ($errorMessage)
|
||||
<div class="rounded-lg bg-danger-50 p-4 text-sm text-danger-600 dark:bg-danger-400/10 dark:text-danger-400">
|
||||
{{ $errorMessage }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{-- Formulaire de recherche --}}
|
||||
<div class="rounded-xl bg-white p-6 shadow-sm ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10">
|
||||
<h3 class="text-base font-semibold text-gray-950 dark:text-white">Rechercher des articles</h3>
|
||||
|
||||
<div class="mt-4 grid grid-cols-1 gap-4 sm:grid-cols-3">
|
||||
<div>
|
||||
<label for="search" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Recherche</label>
|
||||
<input wire:model="search" type="text" id="search" placeholder="Filtre de recherche..."
|
||||
class="mt-1 block w-full rounded-lg border-gray-300 shadow-sm focus:border-primary-500 focus:ring-primary-500 dark:border-white/10 dark:bg-white/5 dark:text-white sm:text-sm" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="select" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Colonnes (select)</label>
|
||||
<input wire:model="select" type="text" id="select" placeholder="artid,artname"
|
||||
class="mt-1 block w-full rounded-lg border-gray-300 shadow-sm focus:border-primary-500 focus:ring-primary-500 dark:border-white/10 dark:bg-white/5 dark:text-white sm:text-sm" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="results" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Nombre de resultats</label>
|
||||
<input wire:model="results" type="number" id="results" min="1" max="100"
|
||||
class="mt-1 block w-full rounded-lg border-gray-300 shadow-sm focus:border-primary-500 focus:ring-primary-500 dark:border-white/10 dark:bg-white/5 dark:text-white sm:text-sm" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-4">
|
||||
<x-filament::button wire:click="searchArticles" icon="heroicon-o-magnifying-glass">
|
||||
Rechercher
|
||||
</x-filament::button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Resultats --}}
|
||||
@if (count($data) > 0)
|
||||
<div class="rounded-xl bg-white p-6 shadow-sm ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10">
|
||||
<div class="flex items-center justify-between">
|
||||
<h3 class="text-base font-semibold text-gray-950 dark:text-white">Resultats</h3>
|
||||
@if ($metadata)
|
||||
<span class="text-sm text-gray-500">{{ $metadata['rowcount'] ?? 0 }} resultat(s)</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="mt-4 overflow-x-auto">
|
||||
<table class="w-full text-left text-sm">
|
||||
<thead class="border-b border-gray-200 dark:border-white/10">
|
||||
<tr>
|
||||
@foreach (array_keys(is_array(reset($data)) ? reset($data) : $data) as $key)
|
||||
<th class="px-3 py-2 font-medium text-gray-500 dark:text-gray-400">{{ $key }}</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-100 dark:divide-white/5">
|
||||
@foreach ($data as $row)
|
||||
<tr>
|
||||
@foreach ((is_array($row) ? $row : [$row]) as $value)
|
||||
<td class="px-3 py-2 text-gray-700 dark:text-gray-300">{{ is_array($value) ? json_encode($value) : $value }}</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{-- Stock d'un article --}}
|
||||
<div class="rounded-xl bg-white p-6 shadow-sm ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10">
|
||||
<h3 class="text-base font-semibold text-gray-950 dark:text-white">Verifier le stock d'un article</h3>
|
||||
|
||||
<div class="mt-4 flex items-end gap-4">
|
||||
<div class="flex-1">
|
||||
<label for="stockArticleId" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Identifiant article (ARTID)</label>
|
||||
<input wire:model="stockArticleId" type="text" id="stockArticleId" placeholder="Ex: ART001"
|
||||
class="mt-1 block w-full rounded-lg border-gray-300 shadow-sm focus:border-primary-500 focus:ring-primary-500 dark:border-white/10 dark:bg-white/5 dark:text-white sm:text-sm" />
|
||||
</div>
|
||||
<x-filament::button wire:click="getStock" icon="heroicon-o-cube">
|
||||
Verifier le stock
|
||||
</x-filament::button>
|
||||
</div>
|
||||
|
||||
@if (count($stockData) > 0)
|
||||
<div class="mt-4 overflow-x-auto">
|
||||
<pre class="rounded-lg bg-gray-50 p-4 text-sm text-gray-700 dark:bg-gray-800 dark:text-gray-300">{{ json_encode($stockData, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE) }}</pre>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</x-filament-panels::page>
|
||||
93
resources/views/filament/pages/documents.blade.php
Normal file
93
resources/views/filament/pages/documents.blade.php
Normal file
@@ -0,0 +1,93 @@
|
||||
<x-filament-panels::page>
|
||||
@if ($errorMessage)
|
||||
<div class="rounded-lg bg-danger-50 p-4 text-sm text-danger-600 dark:bg-danger-400/10 dark:text-danger-400">
|
||||
{{ $errorMessage }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{-- Formulaire de recherche --}}
|
||||
<div class="rounded-xl bg-white p-6 shadow-sm ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10">
|
||||
<h3 class="text-base font-semibold text-gray-950 dark:text-white">Rechercher des documents</h3>
|
||||
|
||||
<div class="mt-4 grid grid-cols-1 gap-4 sm:grid-cols-2">
|
||||
<div>
|
||||
<label for="select" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Colonnes (select)</label>
|
||||
<input wire:model="select" type="text" id="select" placeholder="jnl,number,thirdid,date"
|
||||
class="mt-1 block w-full rounded-lg border-gray-300 shadow-sm focus:border-primary-500 focus:ring-primary-500 dark:border-white/10 dark:bg-white/5 dark:text-white sm:text-sm" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="thirdId" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Identifiant tiers (thirdid)</label>
|
||||
<input wire:model="thirdId" type="text" id="thirdId" placeholder="Ex: CUST001"
|
||||
class="mt-1 block w-full rounded-lg border-gray-300 shadow-sm focus:border-primary-500 focus:ring-primary-500 dark:border-white/10 dark:bg-white/5 dark:text-white sm:text-sm" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-4">
|
||||
<x-filament::button wire:click="searchDocuments" icon="heroicon-o-magnifying-glass">
|
||||
Rechercher
|
||||
</x-filament::button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Resultats --}}
|
||||
@if (count($data) > 0)
|
||||
<div class="rounded-xl bg-white p-6 shadow-sm ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10">
|
||||
<div class="flex items-center justify-between">
|
||||
<h3 class="text-base font-semibold text-gray-950 dark:text-white">Resultats</h3>
|
||||
@if ($metadata)
|
||||
<span class="text-sm text-gray-500">{{ $metadata['rowcount'] ?? 0 }} resultat(s)</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="mt-4 overflow-x-auto">
|
||||
<table class="w-full text-left text-sm">
|
||||
<thead class="border-b border-gray-200 dark:border-white/10">
|
||||
<tr>
|
||||
@foreach (array_keys(is_array(reset($data)) ? reset($data) : $data) as $key)
|
||||
<th class="px-3 py-2 font-medium text-gray-500 dark:text-gray-400">{{ $key }}</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-100 dark:divide-white/5">
|
||||
@foreach ($data as $row)
|
||||
<tr>
|
||||
@foreach ((is_array($row) ? $row : [$row]) as $value)
|
||||
<td class="px-3 py-2 text-gray-700 dark:text-gray-300">{{ is_array($value) ? json_encode($value) : $value }}</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{-- Detail d'un document --}}
|
||||
<div class="rounded-xl bg-white p-6 shadow-sm ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10">
|
||||
<h3 class="text-base font-semibold text-gray-950 dark:text-white">Detail d'un document</h3>
|
||||
|
||||
<div class="mt-4 grid grid-cols-1 gap-4 sm:grid-cols-3">
|
||||
<div>
|
||||
<label for="detailJnl" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Code journal (jnl)</label>
|
||||
<input wire:model="detailJnl" type="text" id="detailJnl" placeholder="Ex: VEN"
|
||||
class="mt-1 block w-full rounded-lg border-gray-300 shadow-sm focus:border-primary-500 focus:ring-primary-500 dark:border-white/10 dark:bg-white/5 dark:text-white sm:text-sm" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="detailNumber" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Numero de document</label>
|
||||
<input wire:model="detailNumber" type="text" id="detailNumber" placeholder="Ex: 1"
|
||||
class="mt-1 block w-full rounded-lg border-gray-300 shadow-sm focus:border-primary-500 focus:ring-primary-500 dark:border-white/10 dark:bg-white/5 dark:text-white sm:text-sm" />
|
||||
</div>
|
||||
<div class="flex items-end">
|
||||
<x-filament::button wire:click="getDocumentDetail" icon="heroicon-o-eye">
|
||||
Voir le detail
|
||||
</x-filament::button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (count($detailData) > 0)
|
||||
<div class="mt-4 overflow-x-auto">
|
||||
<pre class="rounded-lg bg-gray-50 p-4 text-sm text-gray-700 dark:bg-gray-800 dark:text-gray-300">{{ json_encode($detailData, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE) }}</pre>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</x-filament-panels::page>
|
||||
69
resources/views/filament/pages/journaux.blade.php
Normal file
69
resources/views/filament/pages/journaux.blade.php
Normal file
@@ -0,0 +1,69 @@
|
||||
<x-filament-panels::page>
|
||||
@if ($errorMessage)
|
||||
<div class="rounded-lg bg-danger-50 p-4 text-sm text-danger-600 dark:bg-danger-400/10 dark:text-danger-400">
|
||||
{{ $errorMessage }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{-- Formulaire de recherche --}}
|
||||
<div class="rounded-xl bg-white p-6 shadow-sm ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10">
|
||||
<h3 class="text-base font-semibold text-gray-950 dark:text-white">Rechercher des journaux</h3>
|
||||
|
||||
<div class="mt-4 grid grid-cols-1 gap-4 sm:grid-cols-3">
|
||||
<div>
|
||||
<label for="type" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Type de journal (TYPE)</label>
|
||||
<input wire:model="type" type="text" id="type" placeholder="Ex: VEN"
|
||||
class="mt-1 block w-full rounded-lg border-gray-300 shadow-sm focus:border-primary-500 focus:ring-primary-500 dark:border-white/10 dark:bg-white/5 dark:text-white sm:text-sm" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="select" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Colonnes (select)</label>
|
||||
<input wire:model="select" type="text" id="select" placeholder="Ex: jnlid,jnlname"
|
||||
class="mt-1 block w-full rounded-lg border-gray-300 shadow-sm focus:border-primary-500 focus:ring-primary-500 dark:border-white/10 dark:bg-white/5 dark:text-white sm:text-sm" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="results" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Nombre de resultats</label>
|
||||
<input wire:model="results" type="number" id="results" min="1" max="100"
|
||||
class="mt-1 block w-full rounded-lg border-gray-300 shadow-sm focus:border-primary-500 focus:ring-primary-500 dark:border-white/10 dark:bg-white/5 dark:text-white sm:text-sm" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-4">
|
||||
<x-filament::button wire:click="searchJournaux" icon="heroicon-o-magnifying-glass">
|
||||
Rechercher
|
||||
</x-filament::button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Resultats --}}
|
||||
@if (count($data) > 0)
|
||||
<div class="rounded-xl bg-white p-6 shadow-sm ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10">
|
||||
<div class="flex items-center justify-between">
|
||||
<h3 class="text-base font-semibold text-gray-950 dark:text-white">Resultats</h3>
|
||||
@if ($metadata)
|
||||
<span class="text-sm text-gray-500">{{ $metadata['rowcount'] ?? 0 }} resultat(s)</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="mt-4 overflow-x-auto">
|
||||
<table class="w-full text-left text-sm">
|
||||
<thead class="border-b border-gray-200 dark:border-white/10">
|
||||
<tr>
|
||||
@foreach (array_keys(is_array(reset($data)) ? reset($data) : $data) as $key)
|
||||
<th class="px-3 py-2 font-medium text-gray-500 dark:text-gray-400">{{ $key }}</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-100 dark:divide-white/5">
|
||||
@foreach ($data as $row)
|
||||
<tr>
|
||||
@foreach ((is_array($row) ? $row : [$row]) as $value)
|
||||
<td class="px-3 py-2 text-gray-700 dark:text-gray-300">{{ is_array($value) ? json_encode($value) : $value }}</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</x-filament-panels::page>
|
||||
85
resources/views/filament/pages/tables-explorer.blade.php
Normal file
85
resources/views/filament/pages/tables-explorer.blade.php
Normal file
@@ -0,0 +1,85 @@
|
||||
<x-filament-panels::page>
|
||||
@if ($errorMessage)
|
||||
<div class="rounded-lg bg-danger-50 p-4 text-sm text-danger-600 dark:bg-danger-400/10 dark:text-danger-400">
|
||||
{{ $errorMessage }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="grid grid-cols-1 gap-6 lg:grid-cols-2">
|
||||
{{-- Liste des tables --}}
|
||||
<div class="rounded-xl bg-white p-6 shadow-sm ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10">
|
||||
<h3 class="text-base font-semibold text-gray-950 dark:text-white">Tables disponibles</h3>
|
||||
<p class="mt-1 text-sm text-gray-500 dark:text-gray-400">Cliquez sur une table pour voir ses colonnes.</p>
|
||||
|
||||
<div class="mt-4 space-y-1">
|
||||
@forelse ($tables as $table)
|
||||
<button
|
||||
wire:click="$set('selectedTable', '{{ is_array($table) ? ($table['name'] ?? $table['tablename'] ?? '') : $table }}')"
|
||||
wire:then="loadColumns"
|
||||
class="flex w-full items-center rounded-lg px-3 py-2 text-left text-sm transition hover:bg-gray-50 dark:hover:bg-white/5 {{ $selectedTable === (is_array($table) ? ($table['name'] ?? $table['tablename'] ?? '') : $table) ? 'bg-primary-50 text-primary-600 dark:bg-primary-400/10 dark:text-primary-400' : 'text-gray-700 dark:text-gray-300' }}"
|
||||
>
|
||||
<x-filament::icon icon="heroicon-o-table-cells" class="mr-2 h-4 w-4" />
|
||||
{{ is_array($table) ? ($table['name'] ?? $table['tablename'] ?? json_encode($table)) : $table }}
|
||||
</button>
|
||||
@empty
|
||||
<p class="py-4 text-center text-sm text-gray-500">Aucune table trouvee. Verifiez votre cle API.</p>
|
||||
@endforelse
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Colonnes de la table selectionnee --}}
|
||||
<div class="rounded-xl bg-white p-6 shadow-sm ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10">
|
||||
<h3 class="text-base font-semibold text-gray-950 dark:text-white">
|
||||
Colonnes
|
||||
@if ($selectedTable)
|
||||
<span class="text-primary-600 dark:text-primary-400">: {{ $selectedTable }}</span>
|
||||
@endif
|
||||
</h3>
|
||||
|
||||
@if ($selectedTable)
|
||||
<div class="mt-4">
|
||||
<div wire:loading wire:target="loadColumns" class="py-8 text-center text-sm text-gray-500">
|
||||
Chargement...
|
||||
</div>
|
||||
|
||||
<div wire:loading.remove wire:target="loadColumns">
|
||||
@if (count($columns) > 0)
|
||||
<div class="overflow-x-auto">
|
||||
<table class="w-full text-left text-sm">
|
||||
<thead class="border-b border-gray-200 dark:border-white/10">
|
||||
<tr>
|
||||
@if (is_array(reset($columns)))
|
||||
@foreach (array_keys(reset($columns)) as $key)
|
||||
<th class="px-3 py-2 font-medium text-gray-500 dark:text-gray-400">{{ $key }}</th>
|
||||
@endforeach
|
||||
@else
|
||||
<th class="px-3 py-2 font-medium text-gray-500 dark:text-gray-400">Colonne</th>
|
||||
@endif
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-100 dark:divide-white/5">
|
||||
@foreach ($columns as $column)
|
||||
<tr>
|
||||
@if (is_array($column))
|
||||
@foreach ($column as $value)
|
||||
<td class="px-3 py-2 text-gray-700 dark:text-gray-300">{{ is_array($value) ? json_encode($value) : $value }}</td>
|
||||
@endforeach
|
||||
@else
|
||||
<td class="px-3 py-2 text-gray-700 dark:text-gray-300">{{ $column }}</td>
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@else
|
||||
<p class="py-4 text-center text-sm text-gray-500">Aucune colonne trouvee.</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<p class="mt-4 text-sm text-gray-500 dark:text-gray-400">Selectionnez une table pour afficher ses colonnes.</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</x-filament-panels::page>
|
||||
91
resources/views/filament/pages/tiers.blade.php
Normal file
91
resources/views/filament/pages/tiers.blade.php
Normal file
@@ -0,0 +1,91 @@
|
||||
<x-filament-panels::page>
|
||||
@if ($errorMessage)
|
||||
<div class="rounded-lg bg-danger-50 p-4 text-sm text-danger-600 dark:bg-danger-400/10 dark:text-danger-400">
|
||||
{{ $errorMessage }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{-- Formulaire de recherche --}}
|
||||
<div class="rounded-xl bg-white p-6 shadow-sm ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10">
|
||||
<h3 class="text-base font-semibold text-gray-950 dark:text-white">Rechercher des tiers</h3>
|
||||
|
||||
<div class="mt-4 grid grid-cols-1 gap-4 sm:grid-cols-3">
|
||||
<div>
|
||||
<label for="search" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Recherche (obligatoire)</label>
|
||||
<input wire:model="search" type="text" id="search" placeholder="Filtre de recherche..."
|
||||
class="mt-1 block w-full rounded-lg border-gray-300 shadow-sm focus:border-primary-500 focus:ring-primary-500 dark:border-white/10 dark:bg-white/5 dark:text-white sm:text-sm" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="select" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Colonnes (select)</label>
|
||||
<input wire:model="select" type="text" id="select" placeholder="custid,custname"
|
||||
class="mt-1 block w-full rounded-lg border-gray-300 shadow-sm focus:border-primary-500 focus:ring-primary-500 dark:border-white/10 dark:bg-white/5 dark:text-white sm:text-sm" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="results" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Nombre de resultats</label>
|
||||
<input wire:model="results" type="number" id="results" min="1" max="100"
|
||||
class="mt-1 block w-full rounded-lg border-gray-300 shadow-sm focus:border-primary-500 focus:ring-primary-500 dark:border-white/10 dark:bg-white/5 dark:text-white sm:text-sm" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-4">
|
||||
<x-filament::button wire:click="searchTiers" icon="heroicon-o-magnifying-glass">
|
||||
Rechercher
|
||||
</x-filament::button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Resultats --}}
|
||||
@if (count($data) > 0)
|
||||
<div class="rounded-xl bg-white p-6 shadow-sm ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10">
|
||||
<div class="flex items-center justify-between">
|
||||
<h3 class="text-base font-semibold text-gray-950 dark:text-white">Resultats</h3>
|
||||
@if ($metadata)
|
||||
<span class="text-sm text-gray-500">{{ $metadata['rowcount'] ?? 0 }} resultat(s)</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="mt-4 overflow-x-auto">
|
||||
<table class="w-full text-left text-sm">
|
||||
<thead class="border-b border-gray-200 dark:border-white/10">
|
||||
<tr>
|
||||
@foreach (array_keys(is_array(reset($data)) ? reset($data) : $data) as $key)
|
||||
<th class="px-3 py-2 font-medium text-gray-500 dark:text-gray-400">{{ $key }}</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-100 dark:divide-white/5">
|
||||
@foreach ($data as $row)
|
||||
<tr>
|
||||
@foreach ((is_array($row) ? $row : [$row]) as $value)
|
||||
<td class="px-3 py-2 text-gray-700 dark:text-gray-300">{{ is_array($value) ? json_encode($value) : $value }}</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{-- Historique des articles d'un tiers --}}
|
||||
<div class="rounded-xl bg-white p-6 shadow-sm ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10">
|
||||
<h3 class="text-base font-semibold text-gray-950 dark:text-white">Historique des articles d'un tiers</h3>
|
||||
|
||||
<div class="mt-4 flex items-end gap-4">
|
||||
<div class="flex-1">
|
||||
<label for="historyThirdId" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Identifiant tiers (thirdid)</label>
|
||||
<input wire:model="historyThirdId" type="text" id="historyThirdId" placeholder="Ex: CUST001"
|
||||
class="mt-1 block w-full rounded-lg border-gray-300 shadow-sm focus:border-primary-500 focus:ring-primary-500 dark:border-white/10 dark:bg-white/5 dark:text-white sm:text-sm" />
|
||||
</div>
|
||||
<x-filament::button wire:click="getArtHistory" icon="heroicon-o-clock">
|
||||
Voir l'historique
|
||||
</x-filament::button>
|
||||
</div>
|
||||
|
||||
@if (count($historyData) > 0)
|
||||
<div class="mt-4 overflow-x-auto">
|
||||
<pre class="rounded-lg bg-gray-50 p-4 text-sm text-gray-700 dark:bg-gray-800 dark:text-gray-300">{{ json_encode($historyData, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE) }}</pre>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</x-filament-panels::page>
|
||||
Reference in New Issue
Block a user