@extends('admin.layout.master') @section('title','SR LIST') @section('custom_style') @endsection @section ('content')

SR LIST

{{-- --}}
@if(!(marketing_customer() && (marketing_customer()->level>4)))
@endif


@if(Request()) @endif
{{--
--}} {{--
--}}
{{-- --}} {{-- --}} @php $p=1; $action_id=9; @endphp @forelse (Request()->shop_id?$shops->where('id',Request()->shop_id):$shops as $i=>$shop) @php // $shop_ids=$shop->officer?$shop->officer->group_ids->toArray():[]; // $lgroups=implode(',',array_unique(array_filter($shop_ids))); $lgroup_ids=array_filter(explode(',',$shop->officer?$shop->officer->group_ids:'')); $srs=$saleRepresentatives->whereIn('group_id',$lgroup_ids); @endphp @if(count($srs)) @forelse ($srs->groupBy('group_id') as $gk=>$gsrs) @php $grOne=$groups->where('id',$gk); @endphp {{-- --}} @forelse ($gsrs as $i=>$item) {{-- --}} {{-- --}} @empty @endforelse @empty @endforelse @endif @empty @forelse ($saleRepresentatives as $i=>$item) @empty @endforelse @endforelse
#DateName Group LineGroupDealer Status Action
{{count($grOne)?$grOne->first()->name_eng:'N/A'}}
{{$shop->name}}
{{ ($p++) }}{{ date('d-M-Y h:i A',strtotime($item->created_at)) }}{{ $item->name_eng }} {{ getProductLine()[$item->group_line] }}{{ $item->groupType?$item->groupType->name_eng:'N/A' }}{{ $item->party?$item->party->name_eng:'N/A' }} {{ $item->status?'Active':'Inactive' }} @if(checkAuthPermission('marketing.sr_target_create')) Detail @endif
{{ ($p++) }} {{ date('d-M-Y h:i A',strtotime($item->created_at)) }} {{ $item->name_eng }} {{ $item->group_line }} {{ $item->groupType?$item->groupType->name_eng:'N/A' }} {{ $item->party?$item->party->name_eng:'N/A' }} {{ $item->status==1?'Active':'Inactive' }} @if(checkAuthPermission('marketing.sr_target_create')) Detail @endif

{{-- --}} @endsection @section('script') @stop