wip
This commit is contained in:
@@ -2,14 +2,19 @@
|
|||||||
|
|
||||||
namespace App\Filament\Clusters\VisaMasterPayments\Resources\VisaMasterPaymentOrders\Tables;
|
namespace App\Filament\Clusters\VisaMasterPayments\Resources\VisaMasterPaymentOrders\Tables;
|
||||||
|
|
||||||
|
use App\Modules\OrderStatus\Repositories\OrderStatusRepository;
|
||||||
|
use App\Modules\Region\Repositories\RegionRepository;
|
||||||
use Filament\Actions\BulkActionGroup;
|
use Filament\Actions\BulkActionGroup;
|
||||||
use Filament\Actions\DeleteBulkAction;
|
use Filament\Actions\DeleteBulkAction;
|
||||||
use Filament\Actions\EditAction;
|
use Filament\Actions\EditAction;
|
||||||
use Filament\Actions\ForceDeleteBulkAction;
|
use Filament\Actions\ForceDeleteBulkAction;
|
||||||
use Filament\Actions\RestoreBulkAction;
|
use Filament\Actions\RestoreBulkAction;
|
||||||
use Filament\Actions\ViewAction;
|
use Filament\Actions\ViewAction;
|
||||||
|
use Filament\Tables\Columns\IconColumn;
|
||||||
|
use Filament\Tables\Columns\TextColumn;
|
||||||
use Filament\Tables\Filters\TrashedFilter;
|
use Filament\Tables\Filters\TrashedFilter;
|
||||||
use Filament\Tables\Table;
|
use Filament\Tables\Table;
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
class VisaMasterPaymentOrdersTable
|
class VisaMasterPaymentOrdersTable
|
||||||
{
|
{
|
||||||
@@ -17,7 +22,46 @@ class VisaMasterPaymentOrdersTable
|
|||||||
{
|
{
|
||||||
return $table
|
return $table
|
||||||
->columns([
|
->columns([
|
||||||
//
|
TextColumn::make('id')
|
||||||
|
->label(__('ID'))
|
||||||
|
->sortable(),
|
||||||
|
|
||||||
|
TextColumn::make('type')
|
||||||
|
->label(__('Type'))
|
||||||
|
->formatStateUsing(fn (string $state) => Str::upper($state)),
|
||||||
|
|
||||||
|
TextColumn::make('status')
|
||||||
|
->label(__('Status'))
|
||||||
|
->color(OrderStatusRepository::statusColorMatching())
|
||||||
|
->formatStateUsing(fn (string $state) => OrderStatusRepository::statusFormatted($state))
|
||||||
|
->badge(),
|
||||||
|
|
||||||
|
TextColumn::make('created_at')
|
||||||
|
->label(__('Created At'))
|
||||||
|
->dateTime()
|
||||||
|
->sortable(),
|
||||||
|
|
||||||
|
TextColumn::make('region')
|
||||||
|
->label(__('Region'))
|
||||||
|
->formatStateUsing(fn (string $state): string => RegionRepository::label($state))
|
||||||
|
->searchable(),
|
||||||
|
|
||||||
|
TextColumn::make('branch.name')
|
||||||
|
->label(__('Branch'))
|
||||||
|
->searchable(),
|
||||||
|
|
||||||
|
TextColumn::make('sender_full_name')
|
||||||
|
->label(__('Full Name'))
|
||||||
|
->searchable(),
|
||||||
|
|
||||||
|
TextColumn::make('phone')
|
||||||
|
->label(__('Phone'))
|
||||||
|
->searchable(),
|
||||||
|
|
||||||
|
IconColumn::make('paid')
|
||||||
|
->label(sprintf('%s (%s)', __('Paid'), __('This month')))
|
||||||
|
->boolean(),
|
||||||
|
|
||||||
])
|
])
|
||||||
->filters([
|
->filters([
|
||||||
TrashedFilter::make(),
|
TrashedFilter::make(),
|
||||||
|
|||||||
Reference in New Issue
Block a user