Files
carmine.savino d6a9978167 feat: Implement client authentication and pre-fill functionality
- Added AuthController for client login and token management.
- Introduced AuthGate for handling authentication state and login UI.
- Updated API to support fetching client data for pre-filling forms.
- Modified App.vue to pre-fill client information if logged in.
- Enhanced client model to include username and password fields.
- Created migration for adding username and password to clients table.
- Added utility for generating secure usernames and passwords.
- Updated frontend to handle client tokens for pre-filling checkout forms.
- Removed old CSS file and updated HTML references to new assets.
- Added StatsOverview widget for displaying client and quote statistics.
- Improved error handling and user feedback in the login process.
2026-08-24 17:24:46 +02:00

28 lines
801 B
PHP

<?php
namespace App\Filament\Widgets;
use App\Filament\Resources\ClienteResource;
use App\Filament\Resources\PreventivoResource;
use App\Models\Cliente;
use App\Models\Preventivo;
use Filament\Widgets\StatsOverviewWidget as BaseWidget;
use Filament\Widgets\StatsOverviewWidget\Stat;
class StatsOverview extends BaseWidget
{
protected function getStats(): array
{
return [
Stat::make('Preventivi', Preventivo::count())
->icon('heroicon-o-document-text')
->color('warning')
->url(PreventivoResource::getUrl('index')),
Stat::make('Clienti', Cliente::count())
->icon('heroicon-o-users')
->color('success')
->url(ClienteResource::getUrl('index')),
];
}
}