base commit
This commit is contained in:
54
resources/views/exports/leave-summary.blade.php
Normal file
54
resources/views/exports/leave-summary.blade.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Leave Summary — {{ $employee->full_name }}</title>
|
||||
<style>
|
||||
body { font-family: DejaVu Sans, sans-serif; font-size: 12px; color: #1e293b; }
|
||||
h1, h2 { color: #1d4ed8; }
|
||||
table { width: 100%; border-collapse: collapse; margin: 12px 0 24px; }
|
||||
th, td { border: 1px solid #e2e8f0; padding: 6px 8px; text-align: left; }
|
||||
th { background: #f1f5f9; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Leave Summary</h1>
|
||||
<p>{{ $employee->full_name }} (#{{ $employee->employee_number }})</p>
|
||||
<p>Annual taken: {{ $summary->vacationTaken }} · Remaining: {{ $summary->vacationRemaining }} · Sick leaves: {{ $summary->sickLeaveCount }}</p>
|
||||
|
||||
<h2>Vacations</h2>
|
||||
<table>
|
||||
<thead><tr><th>Start</th><th>End</th><th>Days</th><th>Type</th><th>Status</th></tr></thead>
|
||||
<tbody>
|
||||
@forelse ($employee->vacations as $vacation)
|
||||
<tr>
|
||||
<td>{{ $vacation->start_date->format('Y-m-d') }}</td>
|
||||
<td>{{ $vacation->end_date->format('Y-m-d') }}</td>
|
||||
<td>{{ $vacation->days }}</td>
|
||||
<td>{{ $vacation->type->label() }}</td>
|
||||
<td>{{ $vacation->status->label() }}</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr><td colspan="5">No vacation records.</td></tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h2>Sick Leaves</h2>
|
||||
<table>
|
||||
<thead><tr><th>Start</th><th>End</th><th>Days</th><th>Institution</th></tr></thead>
|
||||
<tbody>
|
||||
@forelse ($employee->sickLeaves as $leave)
|
||||
<tr>
|
||||
<td>{{ $leave->start_date->format('Y-m-d') }}</td>
|
||||
<td>{{ $leave->end_date->format('Y-m-d') }}</td>
|
||||
<td>{{ $leave->days }}</td>
|
||||
<td>{{ $leave->medical_institution }}</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr><td colspan="4">No sick leave records.</td></tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user