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/Resources/ShippingEntryResource.php

81 lines
2.4 KiB
PHP

<?php
namespace App\Filament\Resources;
use App\Filament\Resources\ShippingEntryResource\Pages;
use App\Models\ShippingEntry;
use Filament\Forms\Form;
use Filament\Resources\Resource;
use Filament\Tables;
use Filament\Tables\Table;
class ShippingEntryResource extends Resource
{
protected static ?string $model = ShippingEntry::class;
protected static ?string $navigationIcon = 'lucide-truck';
protected static ?string $navigationGroup = 'Management';
protected static ?int $navigationSort = 3;
public static function form(Form $form): Form
{
return $form
->schema([
//
]);
}
public static function table(Table $table): Table
{
return $table
->columns([
Tables\Columns\TextColumn::make('customer.company_name')
->searchable(),
Tables\Columns\TextColumn::make('shipping_type')
->label('Type')
->sortable(),
Tables\Columns\TextColumn::make('courier'),
// Tables\Columns\TextColumn::make('contact'),
Tables\Columns\TextColumn::make('account_title'),
// Tables\Columns\TextColumn::make('account_username'),
// Tables\Columns\TextColumn::make('account_password'),
Tables\Columns\TextColumn::make('info_needed'),
Tables\Columns\TextColumn::make('notify'),
])
->filters([
//
])
->actions([
Tables\Actions\EditAction::make(),
])
->bulkActions([
// Tables\Actions\BulkActionGroup::make([
// Tables\Actions\DeleteBulkAction::make(),
// ]),
]);
// ->defaultGroup(
// Group::make('customer.company_name')
// ->titlePrefixedWithLabel(false)
// );
}
public static function getRelations(): array
{
return [
//
];
}
public static function getPages(): array
{
return [
'index' => Pages\ListShippingEntries::route('/'),
'create' => Pages\CreateShippingEntry::route('/create'),
'edit' => Pages\EditShippingEntry::route('/{record}/edit'),
];
}
}