@extends('layouts.app', ['class' => 'g-sidenav-show bg-gray-100']) {{-- section content --}} @section('content') @include('layouts.navbars.auth.topnav', ['title' => ''])
@csrf @method('PUT')

EDIT SAP SAMPLE


{{-- retrieve table header --}} @foreach ($table_header_l->merge($table_header_r) as $header) {{-- SKIP fields that should not be visible in EDIT mode --}} @if (in_array($header->field, ['receiver', 'receive_date', 'shipment_by'])) @continue @endif
@if ($header->type != 'hidden') @endif {{-- READ ONLY FIELDS (filter = 0) - Display as disabled input --}} @if ($header->field == 'salesman') {{-- EDITABLE FIELDS (filter = 1) --}} @elseif($header->filter == '0' || $header->field == 'id_ps') @else @if ($header->field == 'id_expedition') @php $currentExpeditionIds = old( 'id_expedition', array_values(array_filter(array_map('trim', explode(',', (string) ($list->id_expedition ?? ''))))) ); $currentExpeditionIds = is_array($currentExpeditionIds) ? $currentExpeditionIds : [$currentExpeditionIds]; @endphp @elseif ($header->type == 'multi-text') {{-- MSJ Framework: free-text tags, same pattern as inpsmp approvals --}} @php $fieldVal = $list->{$header->field} ?? ''; $existingVals = ($fieldVal !== null && $fieldVal !== '') ? array_values(array_filter(array_map('trim', explode(',', (string)$fieldVal)))) : []; @endphp @elseif ($header->type == 'multi-enum') @php $options = DB::select($header->query); $currentVals = ($list->{$header->field} !== null && $list->{$header->field} !== '') ? array_map('trim', explode(',', (string)$list->{$header->field})) : []; @endphp @elseif ($header->type == 'search') {{-- Search Modal Find --}}
{{-- Modal --}} @elseif ($header->type == 'select') @elseif ($header->type == 'integer' || $header->type == 'number') @elseif ($header->type == 'date') @elseif ($header->type == 'text') @else @endif @endif @error($header->field)

{{ $message }}

@enderror
@endforeach

{{-- check flag js on dmenu --}} @if ($jsmenu == '1') @if (view()->exists("js.{$dmenu}")) @push('addjs') @include('js.' . $dmenu) @endpush @endif @endif @endsection @push('js') @endpush