@extends('layouts.app') @section('title','Intern Stipends') @section('content')<div class="space-y-6"><h1 class="text-2xl font-black">Intern Stipends</h1><form method="POST" action="{{ route('stipends.calculate') }}" class="card flex gap-3 p-4">@csrf<input class="input" type="month" name="period" required><button class="btn btn-primary">Calculate stipend batch</button></form><div class="card overflow-x-auto"><table class="w-full text-sm"><thead><tr><th class="p-3 text-left">Period</th><th>Status</th><th>Items</th><th>Actions</th></tr></thead><tbody>@foreach($batches as $b)<tr class="border-t"><td class="p-3">{{ $b->period }}</td><td>{{ $b->status }}</td><td>{{ $b->items_count }}</td><td class="flex gap-2 p-3">@if(!$b->locked_at)<form method="POST" action="{{ route('stipends.approve',$b) }}">@csrf<button class="btn btn-soft">Approve & lock</button></form>@endif @if($b->status==='approved')<form method="POST" action="{{ route('stipends.paid',$b) }}">@csrf<button class="btn btn-primary">Mark paid</button></form>@endif</td></tr>@endforeach</tbody></table></div>{{ $batches->links() }}</div>@endsection