diff --git a/app/Filament/Resources/InvoiceReportResource.php b/app/Filament/Resources/InvoiceReportResource.php index 6867ae9..9cd8b84 100644 --- a/app/Filament/Resources/InvoiceReportResource.php +++ b/app/Filament/Resources/InvoiceReportResource.php @@ -121,6 +121,11 @@ class InvoiceReportResource extends Resource }), ], layout: Tables\Enums\FiltersLayout::AboveContent) + ->hiddenFilterIndicators() + ->actions([// Action::make('generateReport') + // ->label('Make Report') + // ->icon('lucide-sticky-note'), + ]); ->hiddenFilterIndicators() diff --git a/app/Filament/Resources/OrderResource.php b/app/Filament/Resources/OrderResource.php index bd9fac7..1a0c04d 100644 --- a/app/Filament/Resources/OrderResource.php +++ b/app/Filament/Resources/OrderResource.php @@ -232,8 +232,7 @@ class OrderResource extends Resource ? 'lucide-calendar-clock' : ($record->rush ? OrderAttributes::rush->getIcon() : null); }) - - ->size(Tables\Columns\IconColumn\IconColumnSize::Small), + ->size(Tables\Columns\IconColumn\IconColumnSize::Medium), TextColumn::make('internal_po') ->label('Internal PO') diff --git a/app/Filament/Resources/OrderResource/Pages/ListOrders.php b/app/Filament/Resources/OrderResource/Pages/ListOrders.php index 0765829..a22cb38 100644 --- a/app/Filament/Resources/OrderResource/Pages/ListOrders.php +++ b/app/Filament/Resources/OrderResource/Pages/ListOrders.php @@ -24,9 +24,18 @@ class ListOrders extends ListRecords public function getTabs(): array { return [ - null => Tab::make('All') - ->icon('lucide-layout-grid'), - + 'active' => Tab::make() + ->query(function ($query) { + return $query + ->whereNot('status', OrderStatus::INVOICED) + ->whereNot('status', ORderStatus::SHIPPED); + }) + ->icon(OrderStatus::PRODUCTION->getIcon()) + ->badge(function () { + return Order::whereNot('status', OrderStatus::SHIPPED) + ->whereNot('status', OrderStatus::INVOICED) + ->count(); + }), 'overdue' => Tab::make() ->query(function ($query) { return $query->whereDate('due_date', '<=', today()) @@ -61,25 +70,28 @@ class ListOrders extends ListRecords }) ->badgeColor('warning'), - 'draft' => Tab::make() - ->query(fn ($query) => $query->where('status', OrderStatus::DRAFT->value)) - ->icon(OrderStatus::DRAFT->getIcon()), - - 'approved' => Tab::make() - ->query(fn ($query) => $query->where('status', OrderStatus::APPROVED->value)) - ->icon(OrderStatus::APPROVED->getIcon()), - - 'production' => Tab::make() - ->query(fn ($query) => $query->where('status', OrderStatus::PRODUCTION->value)) - ->icon(OrderStatus::PRODUCTION->getIcon()), - - 'shipped' => Tab::make() - ->query(fn ($query) => $query->where('status', OrderStatus::SHIPPED->value)) - ->icon(OrderStatus::SHIPPED->getIcon()), + null => Tab::make('All') + ->icon('lucide-layout-grid'), - 'invoiced' => Tab::make() - ->query(fn ($query) => $query->where('status', OrderStatus::INVOICED->value)) - ->icon(OrderStatus::INVOICED->getIcon()), + // 'draft' => Tab::make() + // ->query(fn ($query) => $query->where('status', OrderStatus::DRAFT->value)) + // ->icon(OrderStatus::DRAFT->getIcon()), + // + // 'approved' => Tab::make() + // ->query(fn ($query) => $query->where('status', OrderStatus::APPROVED->value)) + // ->icon(OrderStatus::APPROVED->getIcon()), + // + // 'production' => Tab::make() + // ->query(fn ($query) => $query->where('status', OrderStatus::PRODUCTION->value)) + // ->icon(OrderStatus::PRODUCTION->getIcon()), + // + // 'shipped' => Tab::make() + // ->query(fn ($query) => $query->where('status', OrderStatus::SHIPPED->value)) + // ->icon(OrderStatus::SHIPPED->getIcon()), + // + // 'invoiced' => Tab::make() + // ->query(fn ($query) => $query->where('status', OrderStatus::INVOICED->value)) + // ->icon(OrderStatus::INVOICED->getIcon()), ]; } } diff --git a/todos b/todos index 3158327..614a31a 100644 --- a/todos +++ b/todos @@ -38,6 +38,3 @@ renamings: - order->total_service_price => subtotal - amount > quantity - amount_price > amount - - -orders: tabs for status or rush!! :D \ No newline at end of file