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.
topnotch_website/app/Filament/Widgets/RushOrdersTable.php

34 lines
958 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;
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)
1 month ago
->where('rush', true)
->orderByDesc('due_date')
2 months ago
)
->columns([
TextColumn::make('customer.company_name'),
TextColumn::make('customer_po')
->color('code')
->weight('bold'),
TextColumn::make('status')
->badge(),
])
->defaultPaginationPageOption(5);
}
}