@extends('layouts.app') @section('title','Employees') @section('content')<div class="space-y-6"><div><p class="text-sm font-semibold text-blue-600">PEOPLE OPERATIONS</p><h1 class="text-3xl font-black">Employees</h1><p class="text-slate-500">Dedicated employee lifecycle and access.</p></div><form method="POST" action="{{ route('employees.store') }}" class="card grid gap-3 p-4 md:grid-cols-3">@csrf<input class="input" name="name" placeholder="Full name" required><input class="input" type="email" name="email" placeholder="Email" required><input class="input" name="employee_code" placeholder="Employee code" required><input class="input" name="designation" placeholder="Designation"><select class="input" name="department_id"><option value="">Department</option>@foreach($departments as $x)<option value="{{ $x->id }}">{{ $x->name }}</option>@endforeach</select><select class="input" name="office_id"><option value="">Office</option>@foreach($offices as $x)<option value="{{ $x->id }}">{{ $x->name }}</option>@endforeach</select><select class="input" name="shift_id"><option value="">Shift</option>@foreach($shifts as $x)<option value="{{ $x->id }}">{{ $x->name }}</option>@endforeach</select><input class="input" type="date" name="joining_date"><input type="hidden" name="employment_type" value="full_time"><button class="btn btn-primary">Create employee</button></form><div class="card overflow-x-auto"><table class="w-full text-sm"><thead><tr><th class="p-3 text-left">Code</th><th>Name</th><th>Designation</th><th>Department</th><th>Office</th><th>Status</th><th></th></tr></thead><tbody>@foreach($employees as $e)<tr class="border-t"><td class="p-3">{{ $e->employee_code }}</td><td>{{ $e->user->name }}</td><td>{{ $e->designation }}</td><td>{{ $e->department?->name }}</td><td>{{ $e->office?->name }}</td><td>{{ $e->status }}</td><td><form method="POST" action="{{ route('employees.destroy',$e) }}">@csrf @method('DELETE')<button class="text-red-600">Remove</button></form></td></tr>@endforeach</tbody></table></div>{{ $employees->links() }}</div>@endsection