<?php namespace App\Filament\Admin\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 ActiveOrdersTable extends BaseWidget { protected static ?int $sort = 2; 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') // ->color(OrderStatus::class) ->badge(), ]) ->defaultPaginationPageOption(5); } }