UniformFlow/resources/views/employees/index.blade.php

15 lines
2.2 KiB
PHP

@extends('layouts.app')
@section('title', 'Employees · UniformFlow')
@section('page-heading', 'Employees')
@section('content')
<section class="page-intro"><div><span class="eyebrow">People directory</span><h1>Employee <em>uniform records.</em></h1><p>Keep each employee and their issued items in one place.</p></div></section>
<div class="layout-aside">
<section class="panel"><div class="panel-head"><div><span class="eyebrow">Directory</span><h2>Employees</h2></div><form class="search"><input name="search" value="{{ request('search') }}" placeholder="Search name or ID"><button>Search</button></form></div>
<div class="table-wrap"><table><thead><tr><th>Employee</th><th>Department</th><th>Status</th><th>Open issues</th><th></th></tr></thead><tbody>
@forelse($employees as $employee)<tr><td><strong>{{ $employee->name }}</strong><small class="block">{{ $employee->employee_no }}</small></td><td>{{ $employee->department }}<small class="block">{{ $employee->designation }}</small></td><td><span class="pill {{ $employee->status === 'active' ? 'good' : '' }}">{{ ucfirst($employee->status) }}</span></td><td>{{ $employee->outstanding_items_count }}</td><td><a class="text-link" href="{{ route('employees.show', $employee) }}">View record </a></td></tr>@empty<tr><td colspan="5" class="empty">No employees found.</td></tr>@endforelse
</tbody></table></div><div class="pagination">{{ $employees->links() }}</div></section>
<aside class="panel sticky"><div class="panel-head"><div><span class="eyebrow">New starter</span><h2>Add employee</h2></div></div><form method="POST" action="{{ route('employees.store') }}" class="form-stack">@csrf
<label>Employee ID<input name="employee_no" required value="{{ old('employee_no') }}" placeholder="EMP-001"></label><label>Full name<input name="name" required value="{{ old('name') }}" placeholder="Employee name"></label><label>Department<input name="department" required value="{{ old('department') }}" placeholder="Operations"></label><label>Designation<input name="designation" value="{{ old('designation') }}" placeholder="Role or title"></label><label>Joined date<input type="date" name="joined_at" value="{{ old('joined_at') }}"></label><button class="button primary" type="submit">Add employee</button></form></aside>
</div>
@endsection