Operator Assessment Sheet List Operator Assessment Sheet
@if (is_null($workerEntries) || empty($workerEntries))

Currently No Information Available!

@else @if (session('message'))
× {{ session('message') }}.
@endif
@csrf
Floor: @php $floor = DB::table('worker_entries') ->distinct() ->pluck('floor') ->toArray(); // dd($floor); // die(); @endphp ID Card No: @php $id_card_no = DB::table('worker_entries') ->distinct() ->pluck('id_card_no'); @endphp Process Type: @php $process_type = DB::table( 'worker_sewing_process_entries', ) ->distinct() ->pluck('sewing_process_type'); @endphp Process Name: @php $process_name = DB::table( 'worker_sewing_process_entries', ) ->distinct() ->pluck('sewing_process_name'); @endphp Recommended Grade: @php $recomanded_grade = DB::table('worker_entries') ->distinct() ->pluck('recomanded_grade'); @endphp Reset
@csrf
@csrf
@if ($search_worker == !null)
@csrf
@endif
{{-- spl Table goes here --}} @php $sl=0 @endphp @foreach ($workerEntries as $spl) @php $data = DB::table('worker_sewing_process_entries') ->where('worker_entry_id', $spl->id) ->get(); $machine_type = DB::table('sewing_process_lists') ->whereIn('id', $data->pluck('sewing_process_list_id')) ->get('machine_type'); //consider grade value D=1, C=2, C+=3, C++=4, B=5, B+=6, A=7, A+=8 then if $spl->recomanded_grade < $spl->present_grade then it will show red color in the table row // Assigning numerical values to grades $grades = [ 'D' => 1, 'C' => 2, 'C+' => 3, 'C++' => 4, 'B' => 5, 'B+' => 6, 'A' => 7, 'A+' => 8, ]; // Converting grades to numerical values if any of them is not found in the array then it will be 0 if ($spl->present_grade != null && $spl->recomanded_grade != null) { $present_grade_value = $grades[$spl->present_grade]; $recommended_grade_value = $grades[$spl->recomanded_grade]; } else { $present_grade_value = 9; $recommended_grade_value = 0; } // Applying CSS class based on the condition $row_class = $recommended_grade_value < $present_grade_value ? 'bg-danger' : ''; @endphp @endforeach
Sl# ID Card No Name Machine Type Process Type Process Name Present Grade Recommended Grade Actions
{{ ++$sl }} {{ $spl->id_card_no }} {{ $spl->employee_name_english }} @foreach ($data as $item) {{ ucwords($item->sewing_process_name) }} {{-- @if ($item->sewing_process_type == 'normal') Normal Process @elseif ($item->sewing_process_type == 'critical') Critical Process @elseif ($item->sewing_process_type == 'both') Both Process @else No Process @endif --}} @endforeach @foreach ($machine_type as $type) {{ ucwords($type->machine_type) }} {{-- @if ($type->machine_type == 'LSM') LOCK STITCH MACHINE @elseif ($type->machine_type == 'FLM') FLAT LOCK MACHINE @elseif ($type->machine_type == 'OLM') OVER LOCK MACHINE @elseif ($type->machine_type == 'NM') NORMAL MACHINES @elseif ($type->machine_type == 'SM') SPECIAL MACHINES @else No Machine @endif --}} @endforeach
    @foreach ($data as $item)
  1. {{ ucwords($item->sewing_process_name) }}
  2. @endforeach
{{-- @foreach ($data as $item) {{ ucwords($item->sewing_process_name) }} @endforeach --}}
{{ $spl->present_grade }} {{ $spl->recomanded_grade }} Cycle Entry @can('Admin')
@csrf @method('delete')
@endcan
@endif