refactor: update labels in EmailVerification, Profile, and Registration pages for improved clarity and localization

This commit is contained in:
Yoga Pangestu 2026-04-08 11:51:41 +07:00
parent ae46b93b32
commit 2c4761d643
4 changed files with 7 additions and 13 deletions

View File

@ -20,7 +20,7 @@ public function resendNotificationAction(): Action
{ {
return Action::make('resendNotification') return Action::make('resendNotification')
->link() ->link()
->label(__('filament-panels::auth/pages/email-verification/email-verification-prompt.actions.resend_notification.label').'.') ->label('Kirim ulang')
->size('sm') ->size('sm')
->action(function (): void { ->action(function (): void {
try { try {

View File

@ -15,8 +15,6 @@
use Illuminate\Auth\SessionGuard; use Illuminate\Auth\SessionGuard;
use Illuminate\Contracts\Auth\Authenticatable; use Illuminate\Contracts\Auth\Authenticatable;
use Illuminate\Contracts\Support\Htmlable; use Illuminate\Contracts\Support\Htmlable;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\HtmlString;
use Illuminate\Validation\ValidationException; use Illuminate\Validation\ValidationException;
use SensitiveParameter; use SensitiveParameter;
@ -53,13 +51,7 @@ public function form(Schema $schema): Schema
->revealable(filament()->arePasswordsRevealable()) ->revealable(filament()->arePasswordsRevealable())
->required() ->required()
->autocomplete(false) ->autocomplete(false)
->extraInputAttributes(['tabindex' => 2]) ->extraInputAttributes(['tabindex' => 2]),
->prefixIcon('heroicon-o-lock-closed')
->hint(
filament()->hasPasswordReset()
? new HtmlString(Blade::render('<x-filament::link :href="filament()->getRequestPasswordResetUrl()" tabindex="3">{{ __(\'filament-panels::auth/pages/login.actions.request_password_reset.label\') }}</x-filament::link>'))
: null
),
]); ]);
} }

View File

@ -204,7 +204,7 @@ public function form(Schema $schema): Schema
Grid::make(2) Grid::make(2)
->schema([ ->schema([
TextInput::make('password') TextInput::make('password')
->label(__('filament-panels::auth/pages/register.form.password.label')) ->label('Kata Sandi Baru')
->placeholder('********') ->placeholder('********')
->password() ->password()
->revealable(filament()->arePasswordsRevealable()) ->revealable(filament()->arePasswordsRevealable())
@ -217,7 +217,7 @@ public function form(Schema $schema): Schema
->prefixIcon('heroicon-o-lock-closed'), ->prefixIcon('heroicon-o-lock-closed'),
TextInput::make('passwordConfirmation') TextInput::make('passwordConfirmation')
->label(__('filament-panels::auth/pages/register.form.password_confirmation.label')) ->label('Konfirmasi Kata Sandi')
->placeholder('********') ->placeholder('********')
->password() ->password()
->revealable(filament()->arePasswordsRevealable()) ->revealable(filament()->arePasswordsRevealable())

View File

@ -2,6 +2,7 @@
namespace App\Filament\Pages\Auth; namespace App\Filament\Pages\Auth;
use App\Enums\RoleEnum;
use App\Filament\Resources\Manage\Partners\PartnerResource; use App\Filament\Resources\Manage\Partners\PartnerResource;
use App\Filament\Support\CheerfulNotification; use App\Filament\Support\CheerfulNotification;
use App\Notifications\BroadcastNotification; use App\Notifications\BroadcastNotification;
@ -78,7 +79,8 @@ public function form(Schema $schema): Schema
protected function handleRegistration(array $data): Model protected function handleRegistration(array $data): Model
{ {
$user = $this->getUserModel()::create($data); $user = $this->getUserModel()::create($data);
$user->assignRole('Perusahaan');
$user->assignRole(RoleEnum::PERUSAHAAN->value);
CheerfulNotification::success( CheerfulNotification::success(
CheerfulNotification::getByKey('auth.registration.success.title'), CheerfulNotification::getByKey('auth.registration.success.title'),