You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
870 B
PHTML
32 lines
870 B
PHTML
2 months ago
|
<?php
|
||
|
|
||
|
namespace App\Filament\Widgets;
|
||
|
|
||
|
use App\Enums\OrderStatus;
|
||
|
use App\Models\Order;
|
||
|
use Filament\Tables\Columns\TextColumn;
|
||
|
use Filament\Tables\Table;
|
||
|
use Filament\Widgets\TableWidget as BaseWidget;
|
||
|
|
||
1 month ago
|
class RushOrdersTable extends BaseWidget
|
||
2 months ago
|
{
|
||
|
public function table(Table $table): Table
|
||
|
{
|
||
|
return $table
|
||
|
->query(
|
||
|
Order::query()
|
||
|
->where('status', '!=', OrderStatus::SHIPPED)
|
||
|
->where('status', '!=', OrderStatus::INVOICED)
|
||
|
)
|
||
|
->columns([
|
||
|
TextColumn::make('customer.company_name'),
|
||
|
TextColumn::make('customer_po')
|
||
|
->color('code')
|
||
|
->weight('bold'),
|
||
|
TextColumn::make('status')
|
||
|
->badge(),
|
||
|
])
|
||
|
->defaultPaginationPageOption(5);
|
||
|
}
|
||
|
}
|