QUEUE_CONNECTION=database
QUEUE_CONNECTION=sync
->
final class JobStatusEnum extends Enum{ /** @var string */ const New = 'new'; /** @var string */ const Realization = 'realization'; /** @var string */ const Finished = 'finished'; /** @var string */ const Payment = 'payment'; /** @var string */ const Rejected = 'rejected'; /** @var string */ const Cancelled = 'cancelled';}
->whereDepotId()
->reactive()
Tabs\Tab::make('Depot') ->schema([ Forms\Components\Select::make('depot_id') ->options(Depot::query()->pluck('name', 'id')) ->required() ->live() ->reactive(), ]),
->options(function (Forms\Get $get) { return Product::query() ->where('depot_id', $get('depot_id')) ->pluck('name', 'id'); })
Forms\Components\Repeater::make('Select products') ->relationship('items') ->required() ->live() ->schema([ Forms\Components\Select::make('product_id') ->label(__('depot_deliveries.create.product_id')) ->options(function (Forms\Get $get) { return Product::query() ->where('depot_id', $get('depot_id')) ->pluck('name', 'id'); }) ->distinct() ->disableOptionsWhenSelectedInSiblingRepeaterItems() ->reactive() ->live() ->afterStateUpdated(function ($state, Forms\Set $set) { $set('system_quantity', Product::query()->find($state)?->quantity ?? 0); $set('price', Product::query()->find($state)?->price ?? 0); }) ->searchable() ->columnSpanFull() ->required(), ]) ->columns(2),