@extends('layouts.master')
@section('main')
    <?php Fun::lang()?>
    @php
        $br = myBranch();


        $menu = [
            'dashboard' => [
                    'icon' => 'dashboard',
                    'route' => '#',
                    'text' => __('administrator.dashboard'),
                    'gate' => '',
                    'wos' => array(
                        'route' => route('app_dashboard'),
                        'text' => __('administrator.app'),
                        'gate' => 'Warehouse System',
                    ),
                    'hr' => array(
                        'route' => route('hr-dashboard.index'),
                        'text' => __('administrator.hr'),
                        'gate' => 'HRM System',
                    ),
                    'accounting' => array(
                        'route' => route('journal.index'),
                        'text' => __('administrator.accounting'),
                        'gate' => 'Accounting System',
                    ),
                ],
                'stock_inventory' => [
                    'icon' => 'buysellads',
                    'route' => '#',
                    'text' => __('administrator.stock_inventory'),
                    'gate' => '',
                    'purchase_item' => array(
                        'route' => route('purchases-item.create'),
                        'text' => __('administrator.purchase_item'),
                        'gate' => 'Purchase Item create',
                    ),
                    'purchase_material' => array(
                        'route' => route('purchases-material.create'),
                        'text' => __('administrator.purchase_material'),
                        'gate' => 'Purchase Material create',
                    ),
                    'purchase_fabric' => array(
                        'route' => route('purchases-fabric.create'),
                        'text' => __('administrator.purchase_fabric'),
                        'gate' => 'Purchases fabric create',
                    ),
                    'stock_transfer_fabric' => array(
                        'route' => route('transfer-stock-fabric.index'),
                        'text' => __('administrator.stock_transfer_fabric'),
                        'gate' => 'Transfer Stock List',
                    ),
                    'stock_transfer_material' => array(
                        'route' => route('transfer-stock-material.index'),
                        'text' => __('administrator.stock_transfer_material'),
                        'gate' => 'Transfer Stock List',
                    ),
                    'stock_transfer_cut_piece' => array(
                        'route' => route('transfer-stock-cut-piece.index'),
                        'text' => __('administrator.stock_transfer_cut_piece'),
                        'gate' => 'Transfer Stock List',
                    ),
                    'purchase_list' => array(
                        'route' => route('purchases.index'),
                        'text' => __('administrator.purchase_list'),
                        'gate' => 'Purchase List',
                    ),
                    'adjustment' => array(
                        'route' => route('stock-adjustment.index'),
                        'text' => __('administrator.adjustment'),
                        'gate' => 'Adjustment List',
                    ),
                ],
                'transfer_stock_item' => [
                    'icon' => 'exchange',
                    'route' => route('transfer-stock.index'),
                    'text' => __('administrator.transfer_stock_item'),
                    'gate' => 'Transfer Stock List',
                    'label'=> ':tra:',
                ],
                'pos' => [
                    'icon' => 'windows',
                    'route' => '#',
                    'text' => __('administrator.pos'),
                    'gate' => '',
                    'pos_cashier' => array(
                        'route' => route('pos.create')."?postype=rldf8e7sdf",
                        'text' => __('administrator.pos_cashier'),
                        'gate' => 'Pos Cashier',
                    ),
                    'sale_invoice' => array(
                        'route' => route('sale-invoice'),
                        'text' => __('administrator.sale_invoice'),
                        'gate' => 'Sale Invoice',
                    ),
                    'sale_receipt' => array(
                        'route' => route('sale-receipt'),
                        'text' => __('administrator.sale_receipt'),
                        'gate' => 'Sale Receipt',
                    ),
                    'sale_history' => array(
                        'route' => route('sale-history.index'),
                        'text' => __('administrator.sale_history'),
                        'gate' => 'Sale History',
                    ),
                    'cash_in_out' => array(
                        'route' => route('cash-in-cash-out.index'),
                        'text' => __('administrator.cash_in_out'),
                        'gate' => 'Cash In Out',
                    ),
                     'product_return' => array(
                        'route' => route('product-return.index'),
                        'text' => __('administrator.product_return'),
                        'gate' => '',
                    ),
                ],
                'item_request_order' => [
                    'icon' => 'building-o',
                    'route' => '#',
                    'text' => __('administrator.item_request_order'),
                    'gate' => '',
                    'label' => ":tr:",
                    'sale_purchase_order' => [
                        'route' => route('sale-request.index'),
                        'text' => __('administrator.sale_purchase_order'),
                        'gate' => 'Sale Request List',
                        'label' => ":pr:",
                    ],
                    'purchase-order' => [
                        'route' => route('request-stock.create'),
                        'text' => __('administrator.purchase-order'),
                        'gate' => 'Request Stock List',
                    ],
                    'purchase_list' => [
                        'route' => route('request-stock.index')."?type=purchase_list",
                        'text' => __('administrator.purchase_list'),
                        'gate' => 'Request Stock List',
                    ],
                    'stock_in' => [
                        'route' => route('request-stock.index')."?type=stock_in",
                        'text' => __('administrator.stock_in'),
                        'gate' => '',
                    ],
                     'request_order' => array(
                        'route' => route('request-stock.index').'?type=request_order',
                        'text' => __('administrator.request_order'),
                        'gate' => '',
                        'label' => ":sr:",
                    ),
                ],
                'production_item' => [
                    'icon' => 'cubes',
                    'route' => '#',
                    'text' => __('administrator.production_item'),
                    'gate' => '',
                    'packing' => [
                        'route' => route('production-packing.index'),
                        'text' => __('administrator.packing'),
                        'gate' => 'Production Packing List',
                    ],
                    'production_process' => [
                        'route' => route('production-request.index'),
                        'text' => __('administrator.production_process'),
                        'gate' => 'Production Request List',
                    ],
                    'fabric_cutting_request' => [
                        'route' => route('production-cutting.create'),
                        'text' => __('administrator.fabric_cutting_request'),
                        'gate' => 'Fabric cutting request',
                    ],
                    'fabric_cutting_process' => [
                        'route' => route('production-cutting.index'),
                        'text' => __('administrator.fabric_cutting_process'),
                        'gate' => 'Fabric cutting process',
                    ],
                    'item_cost' => [
                        'route' => route('production-item-cost'),
                        'text' => __('administrator.item_cost'),
                        'gate' => 'Item Template',
                    ],
                    'tailor_stock' => [
                        'route' => route('tailor-stock-item'),
                        'text' => __('administrator.tailor_stock'),
                        'gate' => 'Item Template',
                    ],
                    'tailor_payable' => [
                        'route' => route('tailor-payable'),
                        'text' => __('administrator.tailor_payable'),
                        'gate' => 'Item Template',
                    ],
                    'production_payment' => [
                        'route' => route('production-payments.index'),
                        'text' => __('administrator.production_payment'),
                        'gate' => 'Item Template',
                    ],
                    'item_template' => [
                        'route' => route('production-template.index'),
                        'text' => __('administrator.item_template'),
                        'gate' => 'Item Template',
                    ],
                    ],
                'payments' => [
                    'icon' => 'money',
                    'route' => '#',
                    'text' => __('administrator.payments'),
                    'gate' => '',
                    'sale_payment' => [
                        'route' => route('sale-payment'),
                        'text' => __('administrator.sale_payment'),
                        'gate' => 'Sale Payment List',
                    ],
                    'sale_request_payment' => [
                        'route' => route('seller-request-payment'),
                        'text' => __('administrator.sale_request_payment'),
                        'gate' => 'Sale Request Payment List',
                    ],
                    'stock_in_payment' => [
                        'route' => route('stock-in-payment'),
                        'text' => __('administrator.stock_in_payment'),
                        'gate' => 'Purchase Payment List',
                    ],
                    'payment_by_agent' => [
                        'route' => route('get-payment-by-agent'),
                        'text' => __('administrator.payment_by_agent'),
                        'gate' => 'Purchase Payment List',
                    ],
                    'other_income_expense' => [
                        'route' => route('other-income-expenses.index'),
                        'text' => __('administrator.other_income_expense'),
                        'gate' => 'Other Income Expense',
                    ],
                  ],
                'setup' => [
                    'icon' => 'cog',
                    'route' => '#',
                    'text' => __('administrator.setup'),
                    'gate' => '',
                    'item_setting' => [
                        'route' => '#',
                        'text' => __('administrator.item_setting'),
                        'class'=>'bg-success',
                        'gate' => '',
                    ],
                    'member_package' => [
                        'route' => route('member-package.index'),
                        'text' => __('administrator.member_package'),
                        'gate' => 'Warehouse List',
                    ],

                    'member_type' => [
                        'route' => route('member-type.index'),
                        'text' => __('administrator.member_type'),
                        'gate' => 'Warehouse List',
                    ],
                    'products' => [
                        'route' => route('products.index'),
                        'text' => __('administrator.products'),
                        'gate' => 'Products List',
                    ],
                    'material' => [
                        'route' => route('material.index'),
                        'text' => __('administrator.material'),
                        'gate' => 'Material List',
                    ],
                    'fabric' => [
                        'route' => route('fabric.index'),
                        'text' => __('administrator.fabric'),
                        'gate' => 'Fabric List',
                    ],
                    'cut_piece' => [
                        'route' => route('cut-piece.index'),
                        'text' => __('administrator.cut_piece'),
                        'gate' => 'Cut Piece List',
                    ],
                    'category' => [
                        'route' => route('category.index'),
                        'text' => __('administrator.category'),
                        'gate' => 'Category List',
                    ],
                    'unit' => [
                        'route' => route('unit.index'),
                        'text' => __('administrator.unit'),
                        'gate' => 'Unit List',
                    ],
                    'brands' => [
                        'route' => route('product-brand.index'),
                        'text' => __('administrator.brands'),
                        'gate' => 'Brand List',
                    ],
                    'color' => [
                        'route' => route('product-color.index'),
                        'text' => __('administrator.color'),
                        'gate' => 'Color List',
                    ],
                    'size' => [
                        'route' => route('product-size.index'),
                        'text' => __('administrator.size'),
                        'gate' => 'Size List',
                    ],
                     'divider1' => [
                        'divider' => '1',
                    ],
                    'peoples' => [
                        'route' => '#',
                        'text' => __('administrator.peoples'),
                        'class'=>'bg-success',
                        'gate' => '',
                    ],
                    'seller' => [
                        'route' => route('seller.index'),
                        'text' => __('administrator.seller'),
                        'gate' => 'Seller List',
                    ],
                    'tailor' => [
                        'route' => route('tailor.index'),
                        'text' => __('administrator.tailor'),
                        'gate' => 'Tailor List',
                    ],
                    'customer' => [
                        'route' => route('customer.index'),
                        'text' => __('administrator.customer'),
                        'gate' => 'Customer List',
                    ],
                    'driver' => [
                        'route' => route('driver.index'),
                        'text' => __('administrator.driver'),
                        'gate' => 'Driver List',
                    ],
                    'suppliers' => [
                        'route' => route('suppliers.index'),
                        'text' => __('administrator.suppliers'),
                        'gate' => 'Suppliers List',
                    ],
                    'packers' => [
                        'route' => route('packers.index'),
                        'text' => __('administrator.packer'),
                        'gate' => 'Packer List',
                    ],
                    'divider2' => [
                        'divider' => '2',
                        ],
                    'setting' => [
                        'route' => '#',
                        'text' => __('administrator.setting'),
                        'class'=>'bg-success',
                        'gate' => '',
                    ],
                    'warehouse' => [
                        'route' => route('warehouse.index'),
                        'text' => __('administrator.warehouse'),
                        'gate' => 'Warehouse List',
                    ],
                    'role' => [
                        'route' => route('roles.index'),
                        'text' => __('administrator.role'),
                        'gate' => 'Warehouse List',
                    ],
                    'currency' => [
                        'route' => route('currency.index'),
                        'text' => __('administrator.currency'),
                        'gate' => 'Warehouse List',
                    ],
                    'currency_history' => [
                        'route' => route('currency-history'),
                        'text' => __('administrator.currency_history'),
                        'gate' => 'Warehouse List',
                    ],
                  ],
                'operation_report' => [
                    'icon' => 'file-o',
                    'route' => '#',
                    'text' => __('administrator.operation_report'),
                    'gate' => '',
                     'label'=>':sa:',
                    'report_stock' => [
                        'route' => route('report.stock-item'),
                        'text' => __('administrator.report_stock'),
                        'gate' => 'Report stock Item',
                        'label'=>':sa:'
                    ],
                    'report_sales' => [
                        'route' => route('report-sale'),
                        'text' => __('administrator.report_sales'),
                        'gate' => 'Report Sales List',
                    ],
                    'report_purchase' => [
                        'route' => route('reportpurchases.index'),
                        'text' => __('administrator.report_purchase'),
                        'gate' => 'Report Purchase List',
                    ],
                    'report_production' => [
                        'route' => route('report-production.index'),
                        'text' => __('administrator.report_production'),
                        'gate' => 'Report Production List',
                    ],
                    'report_payment' => [
                        'route' => route('report-sale-request-payment'),
                        'text' => __('administrator.report_payment'),
                        'gate' => 'Report Sales Request Payment List',
                    ],
                    'income' => [
                        'route' => route('report-income-by-sale'),
                        'text' => __('administrator.income'),
                        'gate' => 'Report Income',
                    ],

                ],


            ];
    @endphp
    @component('layouts.menu', ['menu' => $menu,'br'=>$br])@endcomponent
    <div class="main-content">
        <div class="top-header ">
            <ol class="breadcrumb">
                <li><a href="{{route('app_dashboard')}}">{{myBranch()->name??'App'}}</a></li>
                <li class="pull-right">
                    $ <input class="check-default-currency" value="2"
                             {{(Auth::user()->currency_id==2)?'checked':''}} type="checkbox">
                </li>
                <li class="pull-right">
                    ៛ <input class="check-default-currency" value="1"
                             {{(Auth::user()->currency_id==1)?'checked':''}} type="checkbox">
                </li>
            </ol>
        </div>
        @yield('content')
    </div>
@endsection
@section('script')
    @yield('js')
@endsection



