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

Currently No Information Available!

@else @if (session('message'))
× {{ session('message') }}.
@endif @if (session('error'))
× {{ session('error') }}.
@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
{{-- all_data_download download button --}} All Data Download Archive @can('Admin') Archive Data @endcan
@if (session('search_worker') || $search_worker)
@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# Examination Date Floor Line ID Card No Name Process Type Machine Type Process Name Present Grade Recommended Grade Actions
{{ $spl->id }} @if ($spl->examination_date != null) {{ date('d-M-y', strtotime($spl->examination_date)) }} @else Not Found @endif {{ $spl->floor }} @if ($spl->line == null) Line Entry @else {{ $spl->line }} @endif {{ $spl->id_card_no }} {{ $spl->employee_name_english }} @foreach ($data as $item) @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) @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 }} @can('General') @endcan @can('General') Cycle Entry @endcan @can('Admin') Cycle Entry
@csrf @method('delete')
@endcan
@endif