Merge pull request 'Changed logic in courier inward resource page' (#1358) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled

Reviewed-on: #1358
This commit was merged in pull request #1358.
This commit is contained in:
2026-11-02 06:33:27 +00:00

View File

@@ -59,9 +59,25 @@ class CourierInwardResource extends Resource
Forms\Components\TextInput::make('from_address_name')
->label('From Address Name')
->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('pod_number')
->label('POD Number')
->required(),