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

View {{ $title_menu }}


{{-- retrieve table header --}} @foreach ($table_header_l 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
@if ($header->type != 'hidden') {{-- display label alias on type field not hidden --}} @endif {{-- field type char and string --}} @if ($header->type == 'char' || $header->type == 'string') @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 ($header->note != '')

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

@endif @elseif ($header->type == 'json') @php $jsonData = json_decode( $list ? $list->{$header->field} : old($header->field), true, ); $jsonValue = is_array($jsonData) ? $jsonData : []; $uiConfig = [ 'D' => ['bg' => 'danger', 'text' => 'text-white'], 'I' => ['bg' => 'warning', 'text' => 'text-white'], 'S' => ['bg' => 'success', 'text' => 'text-white'], 'C' => ['bg' => 'info', 'text' => 'text-white'], ]; @endphp @if (!empty($jsonValue))
@foreach ($jsonValue as $key => $item) @if (is_array($item) && isset($item['type']) && isset($item['text'])) @php $theme = $uiConfig[$item['type']] ?? [ 'bg' => 'secondary', 'text' => 'text-white', ]; @endphp
{{ $item['type'] }} {{ $item['text'] }}
@endif @endforeach
@else - @endif @if ($header->note != '')

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

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

{{ $message }}

@enderror
@endforeach
{{-- retrieve table header --}} @foreach ($table_header_r 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
@if ($header->type != 'hidden') {{-- display label alias on type field not hidden --}} @endif {{-- field type char and string --}} @if ($header->type == 'char' || $header->type == 'string') @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 ($header->note != '')

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

@endif @elseif ($header->type == 'json') @php $jsonData = json_decode( $list ? $list->{$header->field} : old($header->field), true, ); $jsonValue = is_array($jsonData) ? $jsonData : []; $uiConfig = [ 'D' => ['bg' => 'danger', 'text' => 'text-white'], 'I' => ['bg' => 'warning', 'text' => 'text-white'], 'S' => ['bg' => 'success', 'text' => 'text-white'], 'C' => ['bg' => 'info', 'text' => 'text-white'], ]; @endphp @if (!empty($jsonValue))
@foreach ($jsonValue as $key => $item) @if (is_array($item) && isset($item['type']) && isset($item['text'])) @php $theme = $uiConfig[$item['type']] ?? [ 'bg' => 'secondary', 'text' => 'text-white', ]; @endphp
{{ $item['type'] }} {{ $item['text'] }}
@endif @endforeach
@else - @endif @if ($header->note != '')

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

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

{{ $message }}

@enderror
@endforeach

@else
@csrf @method('PUT')

View {{ $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
@if ($header->type != 'hidden') {{-- display label alias on type field not hidden --}} @endif {{-- field type char and string --}} @if ($header->type == 'char' || $header->type == 'string') @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 ($header->note != '')

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

@endif @elseif ($header->type == 'json') @php $jsonData = json_decode( $list ? $list->{$header->field} : old($header->field), true, ); $jsonValue = is_array($jsonData) ? $jsonData : []; $uiConfig = [ 'D' => ['bg' => 'danger', 'text' => 'text-white'], 'I' => ['bg' => 'warning', 'text' => 'text-white'], 'S' => ['bg' => 'success', 'text' => 'text-white'], 'C' => ['bg' => 'info', 'text' => 'text-white'], ]; @endphp @if (!empty($jsonValue))
@foreach ($jsonValue as $key => $item) @if (is_array($item) && isset($item['type']) && isset($item['text'])) @php $theme = $uiConfig[$item['type']] ?? [ 'bg' => 'secondary', 'text' => 'text-white', ]; @endphp
{{ $item['type'] }} {{ $item['text'] }}
@endif @endforeach
@else - @endif @if ($header->note != '')

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

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

{{ $message }}

@enderror
@endforeach

@endif
{{-- 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