after production line stop reason column remove

This commit is contained in:
dhanabalan
2025-03-25 21:05:43 +05:30
parent 1ba8934784
commit df69d1083b
20 changed files with 644 additions and 34 deletions

View File

@@ -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(),