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

Edit {{ $title_menu }}


{{-- retrieve table header --}} @foreach ($table_header as $header) @php $primary = false; $generateid = false; foreach ($table_primary as $p) { $primary == false ? ($p->field == $header->field ? ($primary = true) : ($primary = false)) : ''; $generateid == false ? ($p->generateid == $header->field ? ($generateid = true) : ($generateid = false)) : ''; } $header->class == 'readonly' ? ($primary = true) : ''; @endphp
{{-- display label alias on type field not hidden --}} @if ($header->type != 'hidden') @endif {{-- field type char and string --}} @if ($header->type == 'char' || $header->type == 'string') @if ($primary)
{{ $list->{$header->field} }} @endif @if ($header->field == 'kode_baru_fg')
{{ $list->{$header->field} }}
@else @if ($header->field == 'width')
@else field == 'customer') oninput="validateCustomerEdit(this)" @endif> @endif @if ($header->field == 'customer') @endif @endif @if ($header->field == 'width')

*) Masukkan nilai dalam satuan Meter. Gunakan titik untuk desimal, contoh: 0.272

@endif @if ($header->note != '' && $header->field != 'width')

{{ '*) ' . $header->note }}

@endif {{-- field type email --}} @elseif ($header->type == 'email') @if ($primary)
{{ $list->{$header->field} }} @endif @if ($header->note != '')

{{ '*) ' . $header->note }}

@endif {{-- field type text --}} @elseif ($header->type == 'text') @if ($header->note != '')

{{ '*) ' . $header->note }}

@endif {{-- field type number --}} @elseif ($header->type == 'number') @if ($primary)
{{ $list->{$header->field} }} @endif @if ($header->field == 'width')

*) Format penulisan gunakan titik sebagai pemisah ribuan, contoh: 1.000

@if ($header->note != '')

{{ '*) ' . $header->note }}

@endif @else field == 'length' ? 'type=text inputmode=decimal' : 'type=number') }} value="{{ $list ? $list->{$header->field} : old($header->field) }}" name="{{ $header->field }}" max="{{ $header->length }}" @if ($header->field == 'length') min="0.01" step="0.01" @endif @if ($header->field == 'length') oninput="handleNumberChange(this, this.value)" @endif> @if ($header->note != '')

{{ '*) ' . $header->note }}

@endif @endif {{-- field type currency --}} @elseif ($header->type == 'currency') @if ($primary)
{{ $list->{$header->field} }} @endif @if ($header->note != '')

{{ '*) ' . $header->note }}

@endif {{-- field type password --}} @elseif ($header->type == 'password')
filter == '1' ? ' type=password' : ' type=hidden') }} value="{{ $list ? '' : $header->default }}" name="{{ $header->field }}" max="{{ $header->length }}">

Default Password : {{ $header->default }}

{{-- field type file --}} @elseif ($header->type == 'file')

{{ $list ? $list->{$header->field} : old($header->field) }}

Maksimal Size : {{ $header->length }} KB

@if ($header->note != '')

{{ $header->note }}

@else

Format File : pdf,xls,xlsx

@endif {{-- field type date --}} @elseif ($header->type == 'date') @if ($primary)
{{ $list->{$header->field} }} @endif @if ($header->note != '')

{{ '*) ' . $header->note }}

@endif {{-- field type hidden --}} @elseif ($header->type == 'hidden') {{-- field type search --}} @elseif ($header->type == 'search')
@if ($header->note != '')

{{ '*) ' . $header->note }}

@endif {{-- field type image --}} @elseif ($header->type == 'image')
image

Maksimal Size : {{ $header->length }} KB

@if ($header->note != '')

{{ $header->note }}

@else

Format Image : PNG,JPG,JPEG

@endif {{-- field type enum --}} @elseif ($header->type == 'enum') @if ($primary) @if ($header->query == '')
{{ $list->{$header->field} == '0' ? 'Belum Upload' : ($list->{$header->field} == '1' ? 'Sudah Upload' : ($list->{$header->field} == '2' ? 'Sudah Inspect' : $list->{$header->field})) }} @else
{{ $list->{$header->field} }} @endif @elseif ($generateid) @if ($header->query == '')
{{ $list->{$header->field} == '0' ? 'Belum Upload' : ($list->{$header->field} == '1' ? 'Sudah Upload' : ($list->{$header->field} == '2' ? 'Sudah Inspect' : $list->{$header->field})) }} @else
{{ $list->{$header->field} }} @endif @endif {{-- ADDED: Check if field is alt_uom, make it disabled with hidden input backup --}} @if ($header->field == 'alt_uom') {{-- Hidden input untuk mengirim value alt_uom saat submit --}} @else {{-- Field enum lainnya tetap editable --}} @endif @if ($header->note != '')

{{ '*) ' . $header->note }}

@endif @endif @error($header->field)

{{ $message }}

@enderror
@endforeach

Attention

@if ($attention_list->isEmpty())

Belum ada data. Tambah di Master Attention.

@else @php $matGroupNames = \Illuminate\Support\Facades\DB::table('sys_enum') ->where('idenum', 'mat_group') ->pluck('name', 'value'); $divisionNames = \Illuminate\Support\Facades\DB::table('sys_enum') ->where('idenum', 'division') ->pluck('name', 'value'); @endphp
@foreach ($attention_list as $attn) @endforeach
Kode Mat Group Product Name Division
{{ $attn->attention_code }} {{ $attn->id_mat_group }} - {{ $matGroupNames[$attn->id_mat_group] ?? $attn->id_mat_group }} {{ $attn->product_name }} {{ $attn->division }} - {{ $divisionNames[$attn->division] ?? $attn->division }}
@endif

Note: Mohon menghubungi PIC apabila terdapat ketidaksesuaian data atau diperlukan penambahan data. {{-- Tambah di Master Attention. --}}

{{-- check flag js on dmenu --}} @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') @endpush