Add labels for various fields across HR resources to improve localization and user experience.
This commit is contained in:
1 parent
8147f23750
commit
e3ec83686c
52 files changed
+363
-26
No files matched your search
@@ -37,19 +37,23 @@ public function form(Schema $schema): Schema
|
||||
return $schema
|
||||
->components([
|
||||
DatePicker::make('bonus_date')
|
||||
->label(__('hr.fields.bonus_date'))
|
||||
->required()
|
||||
->default(now()),
|
||||
Select::make('bonus_type')
|
||||
->label(__('hr.fields.bonus_type'))
|
||||
->options(BonusType::class)
|
||||
->required()
|
||||
->native(false),
|
||||
TextInput::make('amount')
|
||||
->label(__('hr.fields.amount'))
|
||||
->required()
|
||||
->numeric()
|
||||
->prefix('TMT')
|
||||
->minValue(0)
|
||||
->step(0.01),
|
||||
Textarea::make('reason')
|
||||
->label(__('hr.fields.reason'))
|
||||
->rows(3)
|
||||
->columnSpanFull(),
|
||||
]);
|
||||
@@ -61,6 +65,7 @@ public function table(Table $table): Table
|
||||
->recordTitleAttribute('bonus_date')
|
||||
->columns([
|
||||
TextColumn::make('bonus_date')
|
||||
->label(__('hr.fields.bonus_date'))
|
||||
->date()
|
||||
->sortable(),
|
||||
TextColumn::make('bonus_type')
|
||||
@@ -70,9 +75,11 @@ public function table(Table $table): Table
|
||||
->formatStateUsing(fn (BonusType $state): string => $state->label())
|
||||
->sortable(),
|
||||
TextColumn::make('amount')
|
||||
->label(__('hr.fields.amount'))
|
||||
->money('TMT')
|
||||
->sortable(),
|
||||
TextColumn::make('reason')
|
||||
->label(__('hr.fields.reason'))
|
||||
->limit(40)
|
||||
->toggleable(),
|
||||
])
|
||||
|
||||
Reference in new issue
Block a user