schema([ Forms\Components\Select::make('plant_id') ->relationship('plant', 'name') ->required(), Forms\Components\Select::make('item_id') ->relationship('item', 'code') ->label('Item Code') ->searchable() ->required(), Forms\Components\TextInput::make('obd_number') ->label('OBD Number') ->required(), Forms\Components\TextInput::make('line_number') ->label('Line Number') ->required(), Forms\Components\TextInput::make('batch_number') ->label('Batch Number') ->required(), Forms\Components\TextInput::make('heat_number') ->label('Heat Number') ->required(), Forms\Components\TextInput::make('obd_weight') ->label('OBD Weight') ->required(), Forms\Components\TextInput::make('vehicle_number') ->label('Vehicle Number'), Forms\Components\TextInput::make('bundle_number') ->label('Bundle Number'), Forms\Components\TextInput::make('picked_weight') ->label('Picked Weight'), Forms\Components\TextInput::make('scanned_by') ->label('Scanned By') ]); } public static function table(Table $table): Table { return $table ->columns([ Tables\Columns\TextColumn::make('id') ->label('ID') ->numeric() ->sortable(), Tables\Columns\TextColumn::make('item.id') ->numeric() ->sortable(), Tables\Columns\TextColumn::make('plant.name') ->numeric() ->sortable(), Tables\Columns\TextColumn::make('created_at') ->dateTime() ->sortable() ->toggleable(isToggledHiddenByDefault: true), Tables\Columns\TextColumn::make('updated_at') ->dateTime() ->sortable() ->toggleable(isToggledHiddenByDefault: true), Tables\Columns\TextColumn::make('deleted_at') ->dateTime() ->sortable() ->toggleable(isToggledHiddenByDefault: true), ]) ->filters([ Tables\Filters\TrashedFilter::make(), ]) ->actions([ Tables\Actions\ViewAction::make(), Tables\Actions\EditAction::make(), ]) ->bulkActions([ Tables\Actions\BulkActionGroup::make([ Tables\Actions\DeleteBulkAction::make(), Tables\Actions\ForceDeleteBulkAction::make(), Tables\Actions\RestoreBulkAction::make(), ]), ]); } public static function getRelations(): array { return [ // ]; } public static function getPages(): array { return [ 'index' => Pages\ListWeightValidations::route('/'), 'create' => Pages\CreateWeightValidation::route('/create'), 'view' => Pages\ViewWeightValidation::route('/{record}'), 'edit' => Pages\EditWeightValidation::route('/{record}/edit'), ]; } public static function getEloquentQuery(): Builder { return parent::getEloquentQuery() ->withoutGlobalScopes([ SoftDeletingScope::class, ]); } }