13 lines
2.3 KiB
PHP
13 lines
2.3 KiB
PHP
@extends('layouts.app')
|
|
@section('title', 'Handover '.$employee->name.' · UniformFlow')
|
|
@section('page-heading', 'Complete handover')
|
|
@section('content')
|
|
<section class="page-intro"><div><a class="back" href="{{ route('handovers.index') }}">← Exit handovers</a><span class="eyebrow">{{ $employee->employee_no }} · {{ $employee->department }}</span><h1>Clear {{ $employee->name }}.</h1><p>Choose the final outcome for every outstanding issue.</p></div></section>
|
|
<form method="POST" action="{{ route('handovers.store',$employee) }}">@csrf
|
|
<section class="panel"><div class="panel-head"><div><span class="eyebrow">Outstanding property</span><h2>{{ $employee->issues->sum(fn($i) => $i->outstanding_quantity) }} units to account for</h2></div></div>
|
|
@forelse($employee->issues as $index => $issue)<div class="handover-item"><div class="item-symbol">{{ strtoupper(substr($issue->variant->item->name,0,2)) }}</div><div class="grow"><strong>{{ $issue->variant->item->name }}</strong><small>Size {{ $issue->variant->size }} · {{ $issue->outstanding_quantity }} unit(s) · Issued {{ $issue->issued_at->format('d M Y') }}</small></div><input type="hidden" name="items[{{ $index }}][issue_id]" value="{{ $issue->id }}"><label>Outcome<select name="items[{{ $index }}][condition]" required><option value="reusable">Returned · reusable (add to stock)</option><option value="damaged">Returned · damaged (do not add)</option><option value="not_returned">Not returned (do not add)</option></select></label></div>@empty<div class="empty">There are no outstanding uniforms for this employee.</div>@endforelse
|
|
</section>
|
|
@if($employee->issues->count())<section class="panel handover-confirm"><div class="form-grid"><label>Last working / handover date<input type="date" name="handover_date" value="{{ old('handover_date',now()->toDateString()) }}" required></label><label>Clearance note<input name="notes" value="{{ old('notes') }}" placeholder="Optional notes"></label></div><div class="warning-box"><strong>This completes employee clearance.</strong><span>The employee will be marked as left. Reusable items will return to stock.</span></div><button class="button danger-button" type="submit" onclick="return confirm('Complete this handover and mark the employee as left?')">Complete handover</button></section>@endif
|
|
</form>
|
|
@endsection
|