@extends('themes.admin.'.setting('active_admin_theme').'.layouts.default') @section('content') @push('custom-css') @endpush

{{__('platform_settings')}}

{{$title}}

@php $t = 'type-hub'; @endphp
{{__('logo')}} {{__('name')}} {{__('co_rep')}} {{__('city')}} {{__('email')}} {{__('type')}} {{__('created_at')}} {{__('actions')}}

@php $c = new Company(); $chapters = $c->where('type','hub')->get(); $total_members = 0; $total_votes = 0; @endphp @php $grand_total = 1; @endphp @foreach($chapters as $chapter) @php $affiliate_vote = 0; $members = []; $groups = $chapter->get_basic_usergroups($string = TRUE); $u = new User(); foreach($u->get() as $user){ if($user->isMemberOfAny($groups) && !in_array($user->id,$members)) $members[] = $user->id; } $s = new Company($chapter->id); $votes = 0; if(count($members) >= 15 && count($members) <= 19) $votes += 1; if(count($members) >= 20 && count($members) <= 24) $votes += 2; if(count($members) >= 25 && count($members) <= 29) $votes += 3; if(count($members) >= 30 && count($members) <= 34) $votes += 4; if(count($members) >= 35 && count($members) <= 39) $votes += 5; if(count($members) >= 40 && count($members) <= 45) $votes += 6; if(count($members) >= 46 && count($members) <= 54) $votes += 7; if(count($members) >= 55) $votes += 8; if($s->setting('affiliate')) $affiliate_vote += 1; $total_members += count($members); $sub_total = $s->setting('affiliate') ? ($votes + $affiliate_vote) : 0; $total_votes += $votes; $grand_total += $sub_total; @endphp @endforeach
Logo Chapter Name No. Members Votes Financial Vote Total Votes
{{ucwords($chapter->name)}} {{count($members)}} {{$votes}}
{{$affiliate_vote}}
{{$sub_total}}
JCI Ireland 0 0
1
1
Summary: {{$total_members}} {{$total_votes}} {{$grand_total}}
@push('custom-js') @endpush @endsection