query( fn () => $this->record->items()->getQuery() ) ->columns([ Tables\Columns\TextColumn::make('product.name') ->label('Product'), Tables\Columns\TextColumn::make('printStock.name') ->label('Print Stock') ->default('N/A'), Tables\Columns\TextColumn::make('type') ->badge(), Tables\Columns\TextColumn::make('specifications') ->label('Specifications') ->getStateUsing(function ($record) { if ($record->type === 'wallpaper') { return "Length: {$record->length}m"; } elseif ($record->type === 'mural') { $area = number_format($record->width * $record->height, 2); return "{$record->width}m × {$record->height}m ({$area}m²)"; } return 'N/A'; }), Tables\Columns\TextColumn::make('price') ->money('ZAR') ->alignEnd(), ]) ->paginated(false); } }