return $form ->schema([ Tabs::make() ->tabs([ Tabs\Tab::make('General') ->schema([ Forms\Components\Select::make('depot_id') ->label(__('depot_deliveries.create.depot')) ->required() ->columnSpanFull() ->relationship('depot', 'name', function ($query) { return $query->where('active', true); }), Forms\Components\TextInput::make('invoice_number') ->label(__('depot_deliveries.create.invoice_number')) ->required() ->columnSpanFull() ->maxLength(255), Forms\Components\DateTimePicker::make('delivery_date') ->required(), ]), Tabs\Tab::make('Products') ->schema([ Forms\Components\Repeater::make('products') ->required() ->schema([ Forms\Components\Select::make('product_id') ->label(__('depot_deliveries.create.product_id')) ->relationship('products', 'name') ->required(), Forms\Components\TextInput::make('quantity') ->label(__('depot_deliveries.create.product_quantity')) ->numeric() ->required(), Forms\Components\TextInput::make('price') ->label(__('depot_deliveries.create.product_price')) ->numeric() ->required(), ]) ->columns(3) ->collapsible(), ]), ])->columnSpanFull(), ]);
delivery_products