34 lines
885 B
PHP
34 lines
885 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Http\Controllers\HR;
|
||
|
|
|
||
|
|
use App\Http\Controllers\Controller;
|
||
|
|
use App\Models\HR\Attendance;
|
||
|
|
use App\Services\HR\AttendanceService;
|
||
|
|
use Illuminate\Contracts\View\View;
|
||
|
|
|
||
|
|
class AttendanceController extends Controller
|
||
|
|
{
|
||
|
|
public function __construct(
|
||
|
|
private AttendanceService $attendanceService
|
||
|
|
) {}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 근태현황 목록 페이지
|
||
|
|
*/
|
||
|
|
public function index(): View
|
||
|
|
{
|
||
|
|
$stats = $this->attendanceService->getMonthlyStats();
|
||
|
|
$departments = $this->attendanceService->getDepartments();
|
||
|
|
$employees = $this->attendanceService->getActiveEmployees();
|
||
|
|
$statusMap = Attendance::STATUS_MAP;
|
||
|
|
|
||
|
|
return view('hr.attendances.index', [
|
||
|
|
'stats' => $stats,
|
||
|
|
'departments' => $departments,
|
||
|
|
'employees' => $employees,
|
||
|
|
'statusMap' => $statusMap,
|
||
|
|
]);
|
||
|
|
}
|
||
|
|
}
|