@extends('layouts.master') @section('content')

Labor Staff Monthly Ratings

@include('flash::message')

Staff Ratings - {{ \Carbon\Carbon::createFromDate($year, $month, 1)->format('F Y') }}

@foreach($staffList as $index => $staff) @endforeach
S.L No. Labor Name Rating / Status
{{ $index + 1 }} {{ $staff->name }} @if($userRatings->has($staff->id)) @php $rating = $userRatings[$staff->id]; @endphp
Your Ratings: Safety: {{ $rating->safety_compliance }} | Communication: {{ $rating->communication }} | Attendance: {{ $rating->attendance }} | Time: {{ $rating->time_management }} | Responsibility: {{ $rating->job_responsibility }} | Material Handling: {{ $rating->material_handling }} | Document Handling: {{ $rating->document_handling }} | Competency: {{ $rating->competency }}
@else
@csrf @php $fields = [ 'safety_compliance' => 'Safety', 'communication' => 'Comm.', 'attendance' => 'Attend.', 'time_management' => 'Time', 'job_responsibility' => 'Resp.', 'material_handling' => 'Mat.', 'document_handling' => 'Doc.', 'competency' => 'Comp.' ]; @endphp @foreach($fields as $name => $placeholder)
@endforeach
@endif @if($monthlyReports->has($staff->id))
Final Score: {{ $monthlyReports[$staff->id]->final_score }}
Based on {{ $monthlyReports[$staff->id]->total_ratings }} rating(s)
@endif
@endsection