Changed logic in courier inward resource page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 19s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 17s
Laravel Pint / pint (pull_request) Successful in 3m49s
Laravel Larastan / larastan (pull_request) Failing after 5m59s
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 19s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 17s
Laravel Pint / pint (pull_request) Successful in 3m49s
Laravel Larastan / larastan (pull_request) Failing after 5m59s
This commit is contained in:
@@ -59,9 +59,25 @@ class CourierInwardResource extends Resource
|
|||||||
Forms\Components\TextInput::make('from_address_name')
|
Forms\Components\TextInput::make('from_address_name')
|
||||||
->label('From Address Name')
|
->label('From Address Name')
|
||||||
->required(),
|
->required(),
|
||||||
Forms\Components\TextInput::make('cover_material')
|
Forms\Components\Select::make('cover_material')
|
||||||
->label('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')
|
Forms\Components\TextInput::make('pod_number')
|
||||||
->label('POD Number')
|
->label('POD Number')
|
||||||
->required(),
|
->required(),
|
||||||
|
|||||||
Reference in New Issue
Block a user