Changed logic in courier outward resource page #1359

Merged
jothi merged 1 commits from ranjith-dev into master 2026-11-02 06:37:45 +00:00

View File

@@ -59,14 +59,30 @@ class CourierOutwardResource extends Resource
Forms\Components\TextInput::make('to_address')
->label('To Address')
->required(),
Forms\Components\TextInput::make('cover_material')
Forms\Components\Select::make('cover_material')
->label('Cover/Material')
->required(),
->reactive()
->options([
'Cover' => 'Cover',
'Material' => 'Material',
'Others' => 'Others',
])
->dehydrateStateUsing(function ($state, callable $get) {
return $state == 'Others'
? $get('other_cover_material')
: $state;
}),
Forms\Components\TextInput::make('other_cover_material')
->label('Specify Other Cover/Material')
->reactive()
->visible(fn (callable $get) => $get('cover_material') == 'Others')
->required(fn (callable $get) => $get('cover_material') == 'Others')
->dehydrated(false),
Forms\Components\TextInput::make('name_of_sender')
->label('Name Of Sender')
->required(),
Forms\Components\TextInput::make('place_pincode')
->label('Which Place and PinCode')
->label('Which Place & PinCode')
->required(),
Forms\Components\TextInput::make('pod_number')
->label('POD Number')