Updated field lable, length and default value in report
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled

This commit is contained in:
dhanabalan
2026-05-01 14:14:49 +05:30
parent 252dcc7afd
commit fba8101da3

View File

@@ -33,8 +33,10 @@ class UserResource extends Resource
return $form
->schema([
Forms\Components\Select::make('plant_id')
->label('Plant Name')
->relationship('plant', 'name')
->nullable()
->searchable()
->reactive()
->options(function (callable $get) {
$userHas = Filament::auth()->user()->plant_id;
@@ -45,8 +47,10 @@ class UserResource extends Resource
return optional(User::latest()->first())->plant_id;
}),
Forms\Components\TextInput::make('name')
->label('Name')
->required()
->autofocus()
->minLength(3)
// ->reactive()
->live(debounce: 600)
->afterStateUpdated(function ($state, callable $set, callable $get) {
@@ -54,6 +58,7 @@ class UserResource extends Resource
})
->maxLength(255),
Forms\Components\TextInput::make('email')
->label('Email')
// ->email()
->unique(ignoreRecord: true)
->required()
@@ -66,9 +71,12 @@ class UserResource extends Resource
// ->prefix(fn ($get) => $get('name') ?? null)
// ->suffix('@cripumps.com')
->maxLength(255),
Forms\Components\DateTimePicker::make('email_verified_at'),
Forms\Components\DateTimePicker::make('email_verified_at')
->label('Email Verified At'),
Forms\Components\TextInput::make('password')
->label('Password')
->password()
->minLength(3)
->revealable()
->required()
// ->dehydrateStateUsing(fn (string $state): string => Hash::make($state))
@@ -77,6 +85,7 @@ class UserResource extends Resource
// ->multiple()
// ->relationship('roles', 'name'),
Forms\Components\Select::make('roles')
->label('Roles')
->relationship('roles', 'name')
// ->relationship(name: 'roles', titleAttribute: 'name')
// ->saveRelationshipsUsing(function (Model $record, $state) {
@@ -110,7 +119,8 @@ class UserResource extends Resource
return ($currentPage - 1) * $perPage + $rowLoop->iteration;
}),
Tables\Columns\TextColumn::make('plant.name')
->label('Plant')
->label('Plant Name')
->default('All')
->alignCenter()
->sortable()
->searchable(),
@@ -144,8 +154,7 @@ class UserResource extends Resource
->label('Updated At')
->dateTime()
->alignCenter()
->sortable()
->toggleable(isToggledHiddenByDefault: true),
->sortable(),
Tables\Columns\TextColumn::make('deleted_at')
->label('Deleted At')
->dateTime()