@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')}}
--}}
{{ session('messagesave') }}
@endif
{{-- alert delete item --}}
@if (session('messagedelete'))
{{ session('messagedelete') }}
{{--
{{ session('messagedelete')}}
--}}
@endif
{{-- alert update item --}}
@if (session('messageupdate'))
{{ session('messageupdate') }}
@endif
#Id |
Code |
Parent Category Name |
Status |
Registered On |
Use Status |
Created By |
Action |
@foreach ($parent_product_categories as $key => $parent_product_category)
{{ $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' }} |
@php
$checkParentCategoryInUse =
$parent_product_category->product_categories()->exists() ||
$parent_product_category->products()->exists();
@endphp
@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)
@endif
@endif
|
@endforeach
@endsection