@extends('backend.layouts.app') @section('page-title', trans('app.shops')) @section('page-heading', trans('app.shops')) @section('content')
@include('backend.partials.messages')

{{ $stats['shops'] }}

@lang('app.total_shops')

@if(auth()->user()->hasRole('admin'))

{{ ($stats['agents']) }}

@lang('app.total_agents')

@endif @if(auth()->user()->hasRole(['admin','agent']))

{{ ($stats['distributors']) }}

@lang('app.total_distributors')

@endif @if(auth()->user()->hasRole(['agent','distributor']))

{{ ($stats['managers']) }}

@lang('app.total_managers')

@endif @if(auth()->user()->hasRole(['distributor','manager']))

{{ ($stats['cashiers']) }}

@lang('app.total_cashiers')

@endif @if(auth()->user()->hasRole(['manager','cashier']))

{{ ($stats['users']) }}

@lang('app.total_users')

@endif

{{ number_format( $stats['credit'], 2 ) }}

@lang('app.total_credit')

@lang('app.filter')

{!! Form::select('frontend', ['' => '---'] + $directories, Request::get('frontend'), ['class' => 'form-control']) !!}
{!! Form::select('percent_from', ['' => '---'] + \VanguardLTE\Shop::$values['percent_labels'], Request::get('percent_from'), ['class' => 'form-control']) !!}
{!! Form::select('percent_to', ['' => '---'] + \VanguardLTE\Shop::$values['percent_labels'], Request::get('percent_to'), ['class' => 'form-control']) !!}
@php $orders = array_combine(array_merge([''], \VanguardLTE\Shop::$values['orderby']), array_merge([''], \VanguardLTE\Shop::$values['orderby'])); @endphp {!! Form::select('order', $orders, Request::get('status'), ['id' => 'order', 'class' => 'form-control']) !!}
@php $currencies = array_combine(\VanguardLTE\Shop::$values['currency'], \VanguardLTE\Shop::$values['currency']); @endphp {!! Form::select('currency', ['' => __('app.all')] + $currencies, Request::get('currency'), ['id' => 'currency', 'class' => 'form-control']) !!}
{!! Form::select('categories[]', $categories->pluck('title','id'), Request::get('categories'), ['id' => 'type', 'class' => 'form-control select2', 'multiple' => true, 'style' => 'width: 100%;']) !!}
{!! Form::select('status', ['' => __('app.all'), '1' => __('app.active'), '0' => __('app.disabled')], Request::get('status'), ['id' => 'type', 'class' => 'form-control']) !!}

@lang('app.shops')

@permission('shops.add') @if(auth()->user()->hasRole('admin')) @lang('app.add') @elseif(auth()->user()->hasRole('distributor')) @else @lang('app.add') @endif @endpermission @permission('shops.free_demo') @if(!auth()->user()->free_demo) @lang('app.free_demo') @endif @endpermission @if(auth()->user()->hasRole('admin')) @lang('app.fast_shop') @endif
@if(auth()->user()->hasRole('agent')) @else @endif @if (count($shops)) @foreach ($shops as $shop) @include('backend.shops.partials.row') @endforeach @else @endif @if(auth()->user()->hasRole('agent')) @else @endif
@lang('app.name') @lang('app.go_to_shop') @lang('app.distributor') @lang('app.id') @lang('app.credit') @lang('app.percent') @lang('app.max_win') @lang('app.frontend') @lang('app.currency') @lang('app.order') @lang('app.status')@lang('app.pay_in') @lang('app.pay_out')
@lang('app.no_data')
@lang('app.name') @lang('app.go_to_shop') @lang('app.distributor') @lang('app.id') @lang('app.credit') @lang('app.percent') @lang('app.max_win') @lang('app.frontend') @lang('app.currency') @lang('app.order') @lang('app.status')@lang('app.pay_in') @lang('app.pay_out')
{{ $shops->links() }}
@stop @section('scripts') @stop