@extends('layouts.app', ['class' => 'g-sidenav-show bg-gray-100']) {{-- section content --}} @section('content') @include('layouts.navbars.auth.topnav', ['title' => ''])
| Action | No | {{-- Vendor Information --}}Old Code Vendor | SAP Code Vendor | Corporation | Vendor Name | Address 1 | Address 2 | Address 3 | City | {{-- Contact Persons --}}Contact Persons | {{-- Directors --}} {{-- Bank Accounts --}} {{-- Quality Environment --}} {{-- Agreement Document --}} {{-- Status & Approver --}}Status | Status Upload | @elseNo | {{-- For other menus, use default header --}} @foreach ($table_header as $header){{ $header->alias }} | @endforeach @endif||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@endif
{{-- check authorize delete and data primary key not "msjit" --}}
@if ($authorize->delete == '1' && $primary != 'msjit')
{{-- ===== TAMBAHAN: Cek status untuk disable delete button ===== --}}
@php
$canDelete = !(
in_array($detail->status, ['Proposed', 'Approved']) &&
in_array($detail->sap_status, ['Belum Upload', 'Proses', 'Update PPN', 'Update'])
);
@endphp
@if($canDelete)
@else
|
{{ $loop->iteration }} | {{-- Vendor Information --}}{{ $detail->old_code_vendor }} | {{ $detail->sap_code_vendor ?? '-' }} | {{ $detail->corp }} | {{ $detail->name }} | {{ $detail->office_address1 }} | {{ $detail->office_address2 ?? '-' }} | {{ $detail->office_address3 ?? '-' }} | {{ $detail->city_name ?? '-' }} | {{-- Contact Persons --}}
@if($contacts->count() > 0)
|
{{-- Directors --}}
{{-- Bank Accounts --}}
{{-- Quality Environment --}}
{{-- Agreement Document --}}
{{-- Status --}}
@if($detail->status == 'Pending') Pending @elseif($detail->status == 'Proposed') Proposed @elseif($detail->status == 'Approved') Approved @elseif($detail->status == 'Rejected') Rejected @elseif($detail->status == 'Finish') Finish @endif | {{-- SAP Status --}}@if($detail->sap_status == 'Belum Upload') Belum Upload @elseif($detail->sap_status == 'Proses') Proses @elseif($detail->sap_status == 'Sudah Upload') Sudah Upload @elseif($detail->sap_status == 'Update PPN') Update PPN @elseif($detail->sap_status == 'Update') Update @endif | @else{{ $loop->iteration }} | {{-- For other menus, use default foreach --}} @foreach ($table_header as $field) @php $string = $field->field; @endphp {{-- Keep existing logic for other menus --}} @if ($field->type == 'enum'){{-- Existing enum logic --}} | @elseif ($field->type == 'file'){{-- Existing file logic --}} | @else{{ $detail->$string }} | @endif @endforeach @endif