@extends('layouts.app') @section('title','Payroll') @section('content')<div class="flex flex-col gap-4 sm:flex-row sm:justify-between"><div><p class="text-sm font-semibold text-blue-600">FINANCE</p><h1 class="text-3xl font-black">Employee Payroll</h1><p class="mt-1 text-slate-500">Intern stipends are deliberately stored in separate stipend tables.</p></div><form method="POST" action="{{ route('payroll.calculate') }}" class="flex gap-2">@csrf<input type="month" name="period" value="{{ now()->format('Y-m') }}" class="rounded-xl border-slate-200"><button class="btn btn-primary">Calculate</button></form></div><div class="mt-6 card overflow-x-auto"><table class="w-full text-sm"><thead class="bg-slate-50 text-left"><tr><th class="p-4">Period</th><th class="p-4">Status</th><th class="p-4">Employees</th><th class="p-4">Calculated</th></tr></thead><tbody>@foreach($batches as $b)<tr class="border-t"><td class="p-4 font-semibold">{{ $b->period }}</td><td class="p-4"><span class="badge">{{ $b->status }}</span></td><td class="p-4">{{ $b->items_count }}</td><td class="p-4">{{ optional($b->calculated_at)->format('d M Y H:i') }}</td></tr>@endforeach</tbody></table></div>@endsection