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

10 lines
1.9 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@extends('layouts.app')
@section('title', 'Exit handovers · UniformFlow')
@section('page-heading', 'Exit handovers')
@section('content')
<section class="page-intro"><div><span class="eyebrow">Employee clearance</span><h1>Uniform <em>handover.</em></h1><p>Account for issued uniforms and close an employees record safely.</p></div></section>
<section class="panel handover-start"><div><span class="eyebrow">Start clearance</span><h2>Select a departing employee</h2><p>Only active employees with outstanding uniform issues are shown.</p></div><form onsubmit="if(this.employee.value){window.location=this.employee.value} return false"><select name="employee" required><option value="">Choose an employee</option>@foreach($employees as $employee)<option value="{{ route('handovers.create',$employee) }}">{{ $employee->name }} · {{ $employee->employee_no }}</option>@endforeach</select><button class="button primary">Begin handover</button></form></section>
<section class="panel table-panel"><div class="panel-head"><div><span class="eyebrow">Clearance log</span><h2>Completed handovers</h2></div></div><div class="table-wrap"><table><thead><tr><th>Date</th><th>Employee</th><th>Items accounted</th><th>Outcome</th><th>Status</th></tr></thead><tbody>
@forelse($handovers as $handover)<tr><td>{{ $handover->handover_date->format('d M Y') }}</td><td><a class="text-link" href="{{ route('employees.show',$handover->employee) }}">{{ $handover->employee->name }}</a><small class="block">{{ $handover->employee->employee_no }}</small></td><td>{{ $handover->items->sum('quantity') }} units</td><td>@foreach($handover->items->groupBy('condition') as $condition => $items)<span class="pill">{{ $items->sum('quantity') }} {{ str_replace('_',' ',$condition) }}</span> @endforeach</td><td><span class="pill good">Completed</span></td></tr>@empty<tr><td colspan="5" class="empty">Completed employee handovers will appear here.</td></tr>@endforelse</tbody></table></div></section>
@endsection