ranjith-dev #1287

Merged
jothi merged 3 commits from ranjith-dev into master 2026-10-21 05:42:05 +00:00
Showing only changes of commit 35ed640660 - Show all commits

View File

@@ -230,6 +230,29 @@ class PlantResource extends Resource
])
->hint(fn ($get) => $get('pFeedAddressError') ? $get('pRegAddressError') : null)
->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')
->hidden()
->readOnly(),
@@ -289,6 +312,11 @@ class PlantResource extends Resource
->alignCenter()
->sortable()
->searchable(),
Tables\Columns\TextColumn::make('tollfree')
->label('Tollfree')
->alignCenter()
->sortable()
->searchable(),
Tables\Columns\TextColumn::make('company.name')
->label('Company')
->alignCenter()