netgescon-day0/resources/views/filament/pages/strumenti/import-inbox.blade.php

55 lines
2.7 KiB
PHP

<x-filament-panels::page>
<div class="space-y-4">
<div class="rounded-xl border border-gray-200 bg-white p-4 dark:border-gray-800 dark:bg-gray-900">
<div class="text-sm font-medium">Carica file</div>
<div class="mt-3">
<form wire:submit.prevent="submit">
{{ $this->form }}
<div class="mt-3">
<x-filament::button type="submit">Carica</x-filament::button>
</div>
</form>
</div>
</div>
<div class="rounded-xl border border-gray-200 bg-white p-4 dark:border-gray-800 dark:bg-gray-900">
<div class="flex items-center justify-between gap-3">
<div>
<div class="text-sm font-medium">File presenti</div>
<div class="text-xs text-gray-500 dark:text-gray-400">Cartella: import/inbox</div>
</div>
<x-filament::button color="gray" size="sm" wire:click="refreshFiles">Aggiorna</x-filament::button>
</div>
<div class="mt-3 overflow-auto">
<table class="min-w-full text-left text-sm">
<thead class="text-xs text-gray-500 dark:text-gray-400">
<tr>
<th class="py-2 pr-4">Nome</th>
<th class="py-2 pr-4">Dimensione</th>
<th class="py-2 pr-4">Modificato</th>
<th class="py-2">Azioni</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-100 dark:divide-gray-800">
@forelse($this->files as $f)
<tr>
<td class="py-2 pr-4 font-medium">{{ $f['name'] }}</td>
<td class="py-2 pr-4">{{ number_format(((int) $f['size']) / 1024, 1, ',', '.') }} KB</td>
<td class="py-2 pr-4">{{ date('d/m/Y H:i', (int) $f['modified']) }}</td>
<td class="py-2">
<a class="underline" href="{{ route('filament.import-inbox.download', ['path' => $f['path']]) }}" target="_blank" rel="noopener">Scarica</a>
</td>
</tr>
@empty
<tr>
<td class="py-3 text-gray-500" colspan="4">Nessun file presente.</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>
</div>
</x-filament-panels::page>