@extends('layouts.app', ['class' => 'g-sidenav-show bg-gray-100']) {{-- section content --}} @section('content') @include('layouts.navbars.auth.topnav', ['title' => '']) {{-- Card for Navigation Buttons - Framework Style --}}
{{-- Card 1: List Upload BOM --}}
List Upload BOM

{{-- alert --}} @include('components.alert')
@forelse($upload_bom_data as $index => $row) @php // ✅ BARU: Check Material FG/SFG status dari database $materialStatus = $row->status_mat_fg_sfg ?? null; $isMaterialInvalid = in_array($materialStatus, ['Tidak Ditemukan', 'Dihapus']); // Blade-level validation: Check if row can be selected based on comp_desc // This provides immediate server-side disable logic (same criteria as controller) $isCompInvalid = empty($row->limited_comp_desc) || $row->limited_comp_desc === '-' || $row->limited_comp_desc === null; $isProcessing = ($row->upload_status ?? 'Ready Upload') === 'Sedang Diproses'; $canSelect = !$isCompInvalid && !$isMaterialInvalid && !$isProcessing; // ✅ BARU: Disable jika material invalid atau sedang diproses // Determine row CSS class based on comp_desc status // All disabled rows (regardless of reason) get red background $rowClass = ''; if (!$canSelect && !$isProcessing) { $rowClass = 'row-disabled'; // Red background for error } elseif ($isProcessing) { $rowClass = 'row-unchecked'; // Let's keep it unchecked/normal color for processing } else { $rowClass = 'row-checked'; // Yellow background for valid but unchecked (will be changed by JS) } @endphp @empty @endforelse
Keterangan Material FG/SFG Header Desc (40) Plant Usage Alt.Bom.No Valid From Alternative BOM Product Qty Base UoM Header Item Number Type Comp Material Code (18) Comp Desc (40) Comp Qty UOM
@if(!$isCompInvalid && !$isMaterialInvalid) @if($isProcessing) Sedang Diproses @else Ready Upload @endif @endif @if($isMaterialInvalid) Material FG/SFG Tidak ditemukan di SAP @endif @if($isCompInvalid) Comp Material Code tidak ditemukan di SAP @endif
{{ $row->material_fg_sfg }} {{ $row->limited_header_desc }} {{ $row->plant }} {{ $row->usage }} {{ $row->alt_bom_no }} {{ $row->formatted_valid_from }} {{ $row->alternative_bom_text }} {{ $row->product_qty }} {{ $row->base_uom_header }} {{ $row->formatted_item_number }} {{ $row->type }} {{ $row->limited_comp_material_code }} {{ $row->limited_comp_desc }} {{ $row->comp_qty }} {{ $row->uom }}
No data available
{{-- Card 2: List Recipe --}}
List Recipe
Pemilihan data dikontrol oleh tabel Upload BOM di atas

@forelse($recipe_data as $index => $recipe) @php // ✅ BARU: Check Material FG/SFG status dari database $materialStatus = $recipe->status_mat_fg_sfg ?? null; $isMaterialInvalid = in_array($materialStatus, ['Tidak Ditemukan', 'Dihapus']); $isProcessing = ($recipe->upload_status ?? 'Ready Upload') === 'Sedang Diproses'; // Disable jika material invalid atau sedang diproses $canSelect = !$isMaterialInvalid && !$isProcessing; // Row class berdasarkan status $rowClass = ''; if (!$canSelect && !$isProcessing) { $rowClass = 'row-disabled'; } elseif ($isProcessing) { $rowClass = 'row-unchecked'; } else { $rowClass = 'row-checked'; } // ✅ Badge text untuk error status $statusBadgeText = ''; if ($isMaterialInvalid) { $statusBadgeText = 'MATERIAL FG/SFG BELUM ADA DI SAP'; } @endphp @empty @endforelse
Keterangan Kode Group Plant (4) Recipe Group (8) Material Description Recipe Description (40) Recipe Counter (2) Operation No. (4) Phase Rel MOPER Resource (8) Control Key Description Base QTY UoM Charge UOM charge Operation Setup UoM Setup DLBC UoM DLBC DEPA UoM DEPA REPM UoM REPM OVHD UoM OVHD
@if(!$isMaterialInvalid) @if($isProcessing) Sedang Diproses @else Ready Upload @endif @endif @if($statusBadgeText) Material Tidak ditemukan di SAP @endif
{{ $recipe->kode_group }} {{ $recipe->plant }} {{ $recipe->recipe_group }} {{ $recipe->material }} {{ $recipe->description }} {{ $recipe->recipe_description }} {{ $recipe->recipe_counter }} {{ $recipe->operation_no }} {{ $recipe->phase }} {{ $recipe->rel }} {{ $recipe->moper }} {{ $recipe->resource_display }} {{ $recipe->control_key }} {{ $recipe->description_process }} {{ $recipe->base_qty }} {{ $recipe->uom }} {{ $recipe->charge }} {{ $recipe->uom_charge }} {{ $recipe->operation }} {{ $recipe->setup }} {{ $recipe->uom_setup }} {{ $recipe->dlbc }} {{ $recipe->uom_dlbc }} {{ $recipe->depa ?? '1' }} {{ $recipe->uom_depa ?? 'H' }} {{ $recipe->repm }} {{ $recipe->uom_repm }} {{ $recipe->ovhd }} {{ $recipe->uom_ovhd }}
No recipe data available
{{-- Card 3: List Production Version --}}
List Production Version
Pemilihan data dikontrol oleh tabel Upload BOM di atas

@forelse($product_version_data as $index => $pv) @php // ✅ BARU: Check Material FG/SFG status dari database $materialStatus = $pv->status_mat_fg_sfg ?? null; $isMaterialInvalid = in_array($materialStatus, ['Tidak Ditemukan', 'Dihapus']); $isProcessing = ($pv->upload_status ?? 'Ready Upload') === 'Sedang Diproses'; // Disable jika material invalid atau sedang diproses $canSelect = !$isMaterialInvalid && !$isProcessing; // Row class berdasarkan status $rowClass = ''; if (!$canSelect && !$isProcessing) { $rowClass = 'row-disabled'; } elseif ($isProcessing) { $rowClass = 'row-unchecked'; } else { $rowClass = 'row-checked'; } // ✅ Badge text untuk error status $statusBadgeText = ''; if ($isMaterialInvalid) { $statusBadgeText = 'MATERIAL FG/SFG BELUM ADA DI SAP'; } @endphp @empty @endforelse
Keterangan MATERIAL FG/SFG WERKS/PLANT VERID/PRODUCTION VERSION TEXT1/DESCRIPTION ADATU/VALID FROM BDATU/VALID TO PLNNR/KEY FOR TASK LIST GROUP PLNAL/GROUP COUNTER STLAN/BOM USAGE STLAL/ALTERNATIVE BOM ELPRO/PROPOSED ISSUE SLOC ALORT/RECEIVING SLOC Resource Column 3
@if(!$isMaterialInvalid) @if($isProcessing) Sedang Diproses @else Ready Upload @endif @endif @if($statusBadgeText) Material FG/SFG Tidak ditemukan di SAP @endif
{{ $pv->material_display ?? '' }} {{ $pv->werks_plant ?? '' }} {{ $pv->verid_production_version ?? '' }} {{ $pv->text1_description ?? '' }} {{ $pv->adatu_valid_from ?? '' }} {{ $pv->bdatu_valid_to ?? '' }} {{ $pv->plnnr_key_task_list ?? '' }} {{ $pv->plnal_group_counter ?? '' }} {{ $pv->stlan_bom_usage ?? '' }} {{ $pv->stlal_alternative_bom ?? '' }} {{ $pv->elpro_proposed_issue_sloc ?? '' }} {{ $pv->alort_receiving_sloc ?? '' }} {{ $pv->resource_display ?? '' }} {{ $pv->column_3 ?? '' }}
No product version data available
{{-- Static UI - No JS menu check needed for static display --}} {{-- @if ($jsmenu == '1') @if (view()->exists("js.{$dmenu}")) @push('addjs') {{-- file js in folder (resources/views/js) --}} {{-- @include('js.' . $dmenu); @endpush @else @push('addjs') @endpush @endif @endif --}} @endsection @push('js') @include('components.export-excel') @endpush