refactor loan paid off letter for clarity and consistency

This commit is contained in:
2025-11-03 00:15:31 +05:00
parent 2df920af47
commit e9e9f7dbd5
14 changed files with 770 additions and 0 deletions

View File

@@ -0,0 +1,56 @@
<?php
namespace App\Filament\Resources\Users\Schemas;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\TextInput;
use Filament\Schemas\Schema;
use Illuminate\Support\Facades\Hash;
class UserForm
{
public static function configure(Schema $schema): Schema
{
return $schema
->columns(2)
->components([
TextInput::make('first_name')
->label(__('First name'))
->required(),
TextInput::make('last_name')
->label(__('Last name'))
->required(),
TextInput::make('username')
->label(__('Username'))
->required()
->unique(ignoreRecord: true),
TextInput::make('phone')
->label(__('Phone number'))
->required()
->unique(ignoreRecord: true),
TextInput::make('email')
->label(__('Email'))
->email()
->unique(ignoreRecord: true),
TextInput::make('password')
->label(__('Password'))
->password()
->dehydrateStateUsing(fn ($state) => Hash::make($state))
->dehydrated(fn ($state) => filled($state))
->required(fn (string $context): bool => $context === 'create'),
Select::make('roles')
->label(__('Roles'))
->relationship('roles', 'name')
->multiple()
->preload()
->native(false)
->required(),
]);
}
}