@extends('layouts.portal.app') @section('content')
@if(Session::has('errorResponse'))
@endif
@if(Auth::user()->hasRole('Administrator') || Auth::user()->can('Administer Company') || Auth::user()->can('Clients.edit')) Add Client @endif
@if(Auth::user()->hasRole('Administrator') || (Auth::user()->hasRole('Client') && Auth::user()->can('Administer Company'))) @endif @foreach($companyCustomers as $companyCustomer) @if(Auth::user()->hasRole('Administrator') || (Auth::user()->hasRole('Client') && Auth::user()->can('Administer Company'))) @endif @include('portal.companies.customers.summary') @endforeach
# Names Phone Current Plan Status Actions
{{ $companyCustomer->ref_no }} {{ $companyCustomer->names }} {{ $companyCustomer->phone }} @if(count($companyCustomer->companyCustomerServicePlans) > 0) {{ $companyCustomer->companyCustomerServicePlans[0]? $companyCustomer->companyCustomerServicePlans[0]->companyServicePlan? $companyCustomer->companyCustomerServicePlans[0]->companyServicePlan->name: '': '' }} @else - @endif @if($companyCustomer->status == 1) active @else inactive @endif @if(Auth::user()->hasRole('Administrator') || Auth::user()->can('Administer Company') || Auth::user()->can('Clients.edit')) @endif @if(($companyCustomer->status == 0 || $companyCustomer->status == 2) && (Auth::user()->hasRole('Administrator') || Auth::user()->can('Administer Company') || Auth::user()->can('Clients.activate'))) @elseif($companyCustomer->status == 1 && (Auth::user()->hasRole('Administrator') || Auth::user()->can('Administer Company') || Auth::user()->can('Clients.deactivate'))) @endif @if(Auth::user()->hasRole('Administrator')) @endif
{{ $companyCustomers->render() }}
@include('portal.companies.customers.create') @include('portal.companies.customers.edit') @include('portal.companies.customers.activate') @include('portal.companies.customers.deactivate') @include('portal.companies.customers.delete') @include('portal.companies.customers.service-plans.create') @include('portal.companies.customers.service-plans.edit') @include('portal.companies.customers.service-plans.activate') @include('portal.companies.customers.service-plans.deactivate') @include('portal.companies.customers.service-plans.invoices.create') @endsection