resources and relation mgrs
This commit is contained in:
parent
e484c0df98
commit
1629e22b63
@ -30,7 +30,16 @@ class CheckoutRelationManager extends RelationManager
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
Tables\Columns\TextColumn::make('bidder_num'),
|
||||
Tables\Columns\TextColumn::make('bidders.bidder_assigned_number')
|
||||
->label('Bidder Number')
|
||||
->sortable(),
|
||||
Tables\Columns\TextColumn::make('winnertotal')
|
||||
->label('Total Amount')
|
||||
->money('usd', 'true')
|
||||
->sortable(),
|
||||
Tables\Columns\TextColumn::make('paymentMethod.pm_name')
|
||||
->label('Payment Method')
|
||||
->sortable(),
|
||||
])
|
||||
->filters([
|
||||
//
|
||||
|
@ -30,7 +30,28 @@ class VehiclesRelationManager extends RelationManager
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
Tables\Columns\TextColumn::make('owner'),
|
||||
Tables\Columns\TextColumn::make('vehicleOwner.bidder_assigned_number')
|
||||
->label('Number')
|
||||
->sortable(),
|
||||
Tables\Columns\TextColumn::make('year')
|
||||
->label('Year')
|
||||
->sortable(),
|
||||
Tables\Columns\TextColumn::make('make')
|
||||
->label('Make')
|
||||
->sortable(),
|
||||
Tables\Columns\TextColumn::make('model')
|
||||
->label('Model')
|
||||
->sortable(),
|
||||
Tables\Columns\TextColumn::make('vehicleType.category_name')
|
||||
->label('Type')
|
||||
->sortable(),
|
||||
Tables\Columns\BooleanColumn::make('doNotJudge')
|
||||
->label('Judged?')
|
||||
->sortable()
|
||||
->falseIcon('heroicon-o-badge-check')
|
||||
->trueIcon('heroicon-o-x-circle')
|
||||
->trueColor('danger')
|
||||
->falseColor('success'),
|
||||
])
|
||||
->filters([
|
||||
//
|
||||
|
@ -30,7 +30,17 @@ class WinningBidsRelationManager extends RelationManager
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
Tables\Columns\TextColumn::make('winning_bidder_num'),
|
||||
Tables\Columns\TextColumn::make('items.item_assigned_num')
|
||||
->label('Item Number')
|
||||
->sortable(),
|
||||
Tables\Columns\TextColumn::make('bidders.bidder_assigned_number')
|
||||
->label('Bidder Number')
|
||||
->sortable(),
|
||||
Tables\Columns\TextColumn::make('winning_cost')
|
||||
->label('Winning Bid Amt')
|
||||
->money('usd', 'true')
|
||||
->sortable(),
|
||||
|
||||
])
|
||||
->filters([
|
||||
//
|
||||
|
@ -27,7 +27,8 @@ class PaymentMethodsResource extends Resource
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
//
|
||||
TextInput::make('pm_name')
|
||||
->label('Method Name'),
|
||||
]);
|
||||
}
|
||||
|
||||
@ -35,7 +36,9 @@ class PaymentMethodsResource extends Resource
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
//
|
||||
TextColumn::make('pm_name')
|
||||
->label('Method Name')
|
||||
->sortable(),
|
||||
])
|
||||
->filters([
|
||||
//
|
||||
|
@ -34,7 +34,7 @@ class VehiclesResource extends Resource
|
||||
->schema([
|
||||
Select::make('owner')
|
||||
->label('Owner')
|
||||
->options(Bidders::all()->pluck('bidder_assigned_number', 'id'))
|
||||
->options(Bidders::all()->pluck('bidder_assigned_number', 'idbidders'))
|
||||
->searchable(),
|
||||
TextInput::make('year')
|
||||
->label('Year'),
|
||||
@ -44,7 +44,7 @@ class VehiclesResource extends Resource
|
||||
->label('Model'),
|
||||
Select::make('type')
|
||||
->label('Type')
|
||||
->options(CarShowCategory::vehtype()->pluck('category_name', 'id'))
|
||||
->options(CarShowCategory::orderBy('category_name')->vehtype()->pluck('category_name', 'id'))
|
||||
->searchable(),
|
||||
]);
|
||||
}
|
||||
|
@ -16,6 +16,11 @@ use Filament\Tables\Columns\BooleanColumn;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Forms\Components\Toggle;
|
||||
use App\Models\Bidders;
|
||||
use App\Models\Items;
|
||||
use Filament\Forms\Components\Select;
|
||||
|
||||
use function Ramsey\Uuid\v1;
|
||||
|
||||
class WinningBidsResource extends Resource
|
||||
{
|
||||
@ -29,7 +34,16 @@ class WinningBidsResource extends Resource
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
//
|
||||
Select::make('winning_item_num')
|
||||
->label('Item')
|
||||
->options(Items::orderBy('item_assigned_num')->pluck('item_assigned_num', 'iditems'))
|
||||
->searchable(),
|
||||
Select::make('winning_bidder_num')
|
||||
->label('Bidder')
|
||||
->options(Bidders::all()->pluck('bidder_assigned_number', 'idbidders'))
|
||||
->searchable(),
|
||||
TextInput::make('winning_cost')
|
||||
->label('Winning Bid'),
|
||||
]);
|
||||
}
|
||||
|
||||
@ -37,7 +51,16 @@ class WinningBidsResource extends Resource
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
//
|
||||
TextColumn::make('items.item_assigned_num')
|
||||
->label('Item Number')
|
||||
->sortable(),
|
||||
TextColumn::make('bidders.bidder_assigned_number')
|
||||
->label('Bidder Number')
|
||||
->sortable(),
|
||||
TextColumn::make('winning_cost')
|
||||
->label('Winning Bid Amt')
|
||||
->money('usd', 'true')
|
||||
->sortable(),
|
||||
])
|
||||
->filters([
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user