translate base

This commit is contained in:
Mekan1206
2026-07-31 18:08:08 +05:00
parent a794dacd39
commit 581cb8241c
413 changed files with 9087 additions and 428 deletions

View File

@@ -14,7 +14,10 @@ use Filament\Widgets\StatsOverviewWidget\Stat;
class HrStatsOverviewWidget extends StatsOverviewWidget
{
protected ?string $heading = 'HR Overview';
public function getHeading(): ?string
{
return __('hr.widgets.hr_overview');
}
protected function getStats(): array
{
@@ -36,28 +39,28 @@ class HrStatsOverviewWidget extends StatsOverviewWidget
->count();
return [
Stat::make('Total Employees', Employee::query()->count())
->description('All employees in the system')
Stat::make(__('hr.stats.total_employees'), Employee::query()->count())
->description(__('hr.stats.total_employees_desc'))
->descriptionIcon('heroicon-o-users')
->color('primary'),
Stat::make('Active', Employee::query()->where('employment_status', EmploymentStatus::Active)->count())
->description('Currently active employees')
Stat::make(__('hr.stats.active'), Employee::query()->where('employment_status', EmploymentStatus::Active)->count())
->description(__('hr.stats.active_desc'))
->descriptionIcon('heroicon-o-check-circle')
->color('success'),
Stat::make('Inactive', Employee::query()->where('employment_status', EmploymentStatus::Inactive)->count())
->description('Inactive employees')
Stat::make(__('hr.stats.inactive'), Employee::query()->where('employment_status', EmploymentStatus::Inactive)->count())
->description(__('hr.stats.inactive_desc'))
->descriptionIcon('heroicon-o-pause-circle')
->color('gray'),
Stat::make('On Vacation Today', $onVacationToday)
->description('Approved vacations in progress')
Stat::make(__('hr.stats.on_vacation_today'), $onVacationToday)
->description(__('hr.stats.on_vacation_today_desc'))
->descriptionIcon('heroicon-o-sun')
->color('warning'),
Stat::make('On Sick Leave Today', $onSickLeaveToday)
->description('Employees on sick leave')
Stat::make(__('hr.stats.on_sick_leave_today'), $onSickLeaveToday)
->description(__('hr.stats.on_sick_leave_today_desc'))
->descriptionIcon('heroicon-o-heart')
->color('danger'),
Stat::make('Pending Requests', $pendingRequests)
->description('Vacation requests awaiting approval')
Stat::make(__('hr.stats.pending_requests'), $pendingRequests)
->description(__('hr.stats.pending_requests_desc'))
->descriptionIcon('heroicon-o-clock')
->color('info'),
];