feat(dashboard): clickable stat cards + 2 new WO counters + parts row link
Every card on the tenant main dashboard now links to a relevant page:
Operations widget (was 5 cards, now 7):
- Clienți → /app/clients
- Mașini → /app/vehicles
- Cereri noi → /app/leads pre-filtered by status=new
- Deal-uri active → /app/deals
- Programări azi → /app/calendar-board
- NEW: Fișe în lucru (in_work + awaiting_parts) → /app/work-orders filter
- NEW: Fișe gata predare (ready) → /app/work-orders filter
Finance widget (all 4 cards clickable now):
- Încasări → /app/payments
- Cheltuieli → /app/expenses
- Profit → /app/reports (with "Vezi raportul financiar" hint)
- Datorii → /app/work-orders pre-filtered by pay_status=unpaid
LowStockTable rows now navigate to /app/parts/{id}/edit on click and
have an explicit edit action for touch users.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Filament\Tenant\Widgets;
|
||||
|
||||
use App\Models\Tenant\Part;
|
||||
use Filament\Actions\Action;
|
||||
use Filament\Tables;
|
||||
use Filament\Tables\Table;
|
||||
use Filament\Widgets\TableWidget as BaseWidget;
|
||||
@@ -38,6 +39,13 @@ class LowStockTable extends BaseWidget
|
||||
Tables\Columns\TextColumn::make('min_qty')->label(__('Min.'))->alignRight(),
|
||||
Tables\Columns\TextColumn::make('preferredSupplier.name')->label(__('Furnizor'))->placeholder('—'),
|
||||
])
|
||||
->recordUrl(fn (Part $r) => url('/app/parts/' . $r->id . '/edit'))
|
||||
->actions([
|
||||
Action::make('edit')
|
||||
->label(__('Editează'))
|
||||
->icon('heroicon-m-pencil-square')
|
||||
->url(fn (Part $r) => url('/app/parts/' . $r->id . '/edit')),
|
||||
])
|
||||
->paginated(false)
|
||||
->defaultSort('qty');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user