Added tollfree in plant resource page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 13s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 17s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 22s
Laravel Pint / pint (pull_request) Successful in 4m51s
Laravel Larastan / larastan (pull_request) Failing after 5m0s

This commit is contained in:
dhanabalan
2026-10-21 11:11:47 +05:30
parent 342e71bb87
commit 35ed640660

View File

@@ -230,6 +230,29 @@ class PlantResource extends Resource
]) ])
->hint(fn ($get) => $get('pFeedAddressError') ? $get('pRegAddressError') : null) ->hint(fn ($get) => $get('pFeedAddressError') ? $get('pRegAddressError') : null)
->hintColor('danger'), ->hintColor('danger'),
Forms\Components\Textarea::make('tollfree')
->label('Tollfree')
->placeholder('Scan the valid Tollfree')
->unique(ignoreRecord: true)
->columnSpanFull()
->reactive()
->minLength(5)
->afterStateUpdated(function ($state, callable $set, callable $get) {
$nameId = $get('tollfree');
// Ensure `linestop_id` is not cleared
if (! $nameId) {
$set('pTollfreeError', 'Scan the valid tollfree.');
return;
} else {
$set('pTollfreeError', null);
}
})
->extraAttributes(fn ($get) => [
'class' => $get('pTollfreeError') ? 'border-red-500' : '',
])
->hint(fn ($get) => $get('pTollfreeError') ? $get('pTollfreeError') : null)
->hintColor('danger'),
Forms\Components\TextInput::make('id') Forms\Components\TextInput::make('id')
->hidden() ->hidden()
->readOnly(), ->readOnly(),
@@ -289,6 +312,11 @@ class PlantResource extends Resource
->alignCenter() ->alignCenter()
->sortable() ->sortable()
->searchable(), ->searchable(),
Tables\Columns\TextColumn::make('tollfree')
->label('Tollfree')
->alignCenter()
->sortable()
->searchable(),
Tables\Columns\TextColumn::make('company.name') Tables\Columns\TextColumn::make('company.name')
->label('Company') ->label('Company')
->alignCenter() ->alignCenter()