@extends('layouts.app') @php $heading = !empty($module_category_data['heading']) ? $module_category_data['heading'] : __('category.categories'); $navbar = !empty($module_category_data['navbar']) ? $module_category_data['navbar'] : null; @endphp @section('title', $heading) @section('content') @include('layouts.partials.breadcrumb',['page_title'=> __( 'category.manage_your_categories') , 'bread_crumbs'=>array( array('title'=>__('user.users'),'url'=>''),array('title'=> __('category.manage_categories'),'url'=>''))])
@php $cat_code_enabled = isset($module_category_data['enable_taxonomy_code']) && !$module_category_data['enable_taxonomy_code'] ? false : true; @endphp @php $can_add = true; if(request()->get('type') == 'product' && !userHasPermission('category.create')) { $can_add = false; } @endphp @component('components.widget', ['class' => 'box-body', 'title' => __( 'category.manage_your_categories' )]) @if($can_add) @slot('tool') @endslot @endif @php $category_name = __( 'category.category' ); if(!empty($module_category_data['taxonomy_label'])) { $category_name = $module_category_data['taxonomy_label']; } $category_code = __( 'category.code' ); if(!empty($module_category_data['taxonomy_code_label'])) { $category_code = $module_category_data['taxonomy_code_label']; } @endphp @include('layouts.partials.datatable', [ 'tableId' => 'category_table', 'columns' => [ ['data'=>'name','title' => $category_name, 'orderable' => true, 'searchable' => true], ['data'=>'short_code','title' => $category_code, 'orderable' => true, 'searchable' => true], ['data'=>'description','title' => __( 'app.description' ), 'orderable' => true, 'searchable' => true], ['data'=>'action','title' => __('messages.action'), 'orderable' => false, 'searchable' => false], ], 'ajaxUrl' => '/categories?type=product', // Replace with actual route ]) @endcomponent
@stop @section('javascript') @parent @endsection