Changed logic in courier outward resource page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 25s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 27s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 24s
Laravel Larastan / larastan (pull_request) Failing after 11m1s
Laravel Pint / pint (pull_request) Successful in 16m17s

This commit is contained in:
dhanabalan
2026-11-02 12:07:21 +05:30
parent 951c6ee085
commit 81cc92eae3

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')