@extends('backend.layouts_backend.master2') @section('title') All Parent Product Categories @endsection @section('content') {{-- header --}}

All Parent Product Categories

@if (Auth::user()->can('parent-product-category-create')) @endif @if (Auth::user()->can('view-inactive-parent-product-categories')) @endif
{{-- end header --}}
{{-- alert add item --}} @if (session('messagesave')) {{--
{{ session('message')}}
--}} @endif {{-- alert delete item --}} @if (session('messagedelete')) {{--
{{ session('messagedelete')}}
--}} @endif {{-- alert update item --}} @if (session('messageupdate')) @endif
@foreach ($parent_product_categories as $key => $parent_product_category) @php $checkParentCategoryInUse = $parent_product_category->product_categories()->exists() || $parent_product_category->products()->exists(); @endphp @endforeach
#Id Code Parent Category Name Status Registered On Use Status Created By Action
{{ $key + 1 ?? 'N/A' }} {{ $parent_product_category->parent_product_category_code ?? 'N/A' }} {{ $parent_product_category->parent_product_category_name ?? 'N/A' }} @if ($parent_product_category->parent_product_category_status == 1) {{ get_status_message($parent_product_category->parent_product_category_status) ?? '' }} @elseif($parent_product_category->parent_product_category_status == 2) {{ get_status_message($parent_product_category->parent_product_category_status) ?? '' }} @else No Status @endif {{ short_date($parent_product_category->created_at) ?? 'N/A' }} @if ($checkParentCategoryInUse) In Use @else Not In Use @endif {{ get_user_fullname_temporary($parent_product_category->created_by) ?? 'N/A' }}
@if (Auth::user()->can('parent-product-category-edit')) @endif @if (Auth::user()->can('parent-product-category-delete')) @if (!$checkParentCategoryInUse)
@csrf @method('DELETE')
@endif @endif

@endsection