after production line stop reason column remove
This commit is contained in:
@@ -40,12 +40,33 @@ class ItemResource extends Resource
|
||||
Forms\Components\Textarea::make('description')
|
||||
->required()
|
||||
->columnSpanFull(),
|
||||
Forms\Components\Select::make('plant_id')
|
||||
Forms\Components\Select::make('plant_id')
|
||||
->relationship('plant', 'name')
|
||||
->required(),
|
||||
->required()
|
||||
->reactive()
|
||||
->afterStateUpdated(fn ($set) => $set('block_id', null)), // Reset block_id when plant changes
|
||||
|
||||
Forms\Components\Select::make('block_id')
|
||||
->relationship('block', 'name')
|
||||
->required(),
|
||||
->required()
|
||||
->options(fn (callable $get) =>
|
||||
\App\Models\Block::where('plant_id', $get('plant_id'))
|
||||
->pluck('name', 'id')
|
||||
->toArray() // Convert collection to array
|
||||
)
|
||||
->reactive(), // Ensures the dropdown updates when plant_id changes
|
||||
// Forms\Components\Select::make('plant_id')
|
||||
// ->relationship('plant', 'name')
|
||||
// ->required()
|
||||
// ->reactive(),
|
||||
// Forms\Components\Select::make('block_id')
|
||||
// ->relationship('block', 'name')
|
||||
// ->required()
|
||||
// ->options(fn (callable $get) =>
|
||||
// \App\Models\Block::where('plant_id', $get('plant_id'))->pluck('name', 'id')
|
||||
// )
|
||||
// ->reactive() // Updates dynamically when plant_id changes
|
||||
// ->afterStateUpdated(fn ($set) => $set('block_id', null)), // Reset block_id when plant_id changes
|
||||
Forms\Components\Select::make('line_id')
|
||||
->relationship('line', 'name')
|
||||
->required(),
|
||||
|
||||
Reference in New Issue
Block a user