{{ __('form.Employees') }}

@can('create_payrollsalary', App\Models\PayrollSalary::class)
{{ __('form.Add-Payroll') }}
@endcan
{{-- Flash Messages --}} @if(session('success') || session('error') || session('warning')) @php $type = session('success') ? 'success' : (session('error') ? 'error' : 'warning'); $message = session('success') ?? session('error') ?? session('warning'); @endphp @php $styles = [ 'success' => 'bg-green-100 border-green-500 text-green-800 dark:bg-green-900/40 dark:border-green-400 dark:text-green-200', 'error' => 'bg-red-100 border-red-500 text-red-800 dark:bg-red-900/40 dark:border-red-400 dark:text-red-200', 'warning' => 'bg-yellow-100 border-yellow-500 text-yellow-800 dark:bg-yellow-900/40 dark:border-yellow-400 dark:text-yellow-200', ]; @endphp @endif
📅
@php $currentUser = auth()->user(); $canApprovePayrollIds = []; foreach ($payrolls as $payroll) { $approval = $payroll->approval; $currentStep = $approval?->steps->firstWhere('status', 'active'); $canApprove = false; if ($currentStep) { $canApprove = ($currentStep->approver_id === $currentUser->id) || ($currentStep->approver_role && $currentUser->hasRole($currentStep->approver_role)); } if ($canApprove) { $canApprovePayrollIds[] = $payroll->id; } } @endphp @can('view_any_payrollsalary', App\Models\PayrollSalary::class) @if (count($canApprovePayrollIds) > 0) @endif @endcan @can('create_payrollsalary', App\Models\PayrollSalary::class)
@csrf
@endcan
@foreach ($payrolls as $payroll) @php $approval = $payroll->approval; $currentStep = $approval?->steps->firstWhere('status', 'active'); $currentUser = auth()->user(); $canApprove = false; if ($currentStep) { $canApprove = ($currentStep->approver_id === $currentUser->id) || ($currentStep->approver_role && $currentUser->hasRole($currentStep->approver_role)); } @endphp @endforeach
@if (count($canApprovePayrollIds) > 0 ) @endif {{ __('table.Code') }} {{ __('table.Employee-Name') }} {{ __('table.Basic-Salary') }} {{ __('table.Date') }} Status {{ __('table.Action') }}
@if ($canApprove && $payroll->status === 'P') @endif {{ $payroll->code }} @include('payroll.show') {{ number_format($payroll->gapok, 2) }} {{ $payroll->date }}
@if ($payroll->status === 'P') @if ($canApprove) @endif @can('update_payrollsalary', App\Models\PayrollSalary::class) @endcan @else @endif

{{ __('form.Confrim-Import') }}

{{ __('form.Confrim-Import-D') }}

@csrf

{{ __('form.Format-File') }}: .xlsx, .xls, .csv

@if ($errors->any()) @endif