@extends('layouts.admin') @section('page-title') @if (\Auth::user()->type == 'admin') {{ __('Manage Companies') }} @else {{ __('Manage Users') }} @endif @endsection @section('links') @if (\Auth::guard('client')->check()) @else @endif @if (\Auth::user()->type == 'admin') @else @endif {{-- --}} @endsection @php $logo = \App\Models\Utility::get_file('users-avatar/'); @endphp @section('action-button') @auth('web') @if (Auth::user()->type == 'admin') @elseif(isset($currentWorkspace) && $currentWorkspace->creater->id == Auth::id()) @endif @endauth @endsection @section('content') @if ($currentWorkspace || Auth::user()->type == 'admin')
{{-- @dd($users->toArray()) --}} @foreach ($users as $user) @php($workspace_id = isset($currentWorkspace) && $currentWorkspace ? $currentWorkspace->id : '')
@if (Auth::user()->type == 'admin' && isset($user->getPlan))
{{ $user->getPlan->name }}
@else @if ($user->permission == 'Owner')
{{ __('Owner') }}
@else
{{ __('Member') }}
@endif @endif
@if ( (Auth::user()->type == 'admin' && isset($user->getPlan)) || (isset($currentWorkspace) && $currentWorkspace && $currentWorkspace->permission == 'Owner' && Auth::user()->id != $user->id)) @if ($user->is_active == 1)
@else
@endif @endif
user-imageavatar) src="{{ asset($logo . $user->avatar) }}" @else avatar="{{ $user->name }}" @endif>

{{ $user->name }}

{{ $user->email }}
@if (Auth::user()->type == 'admin')
{{ $user->countWorkspace() }}

{{ __('Workspaces') }}

{{ $user->countUsers($workspace_id) }}

{{ __('Users') }}

{{ $user->countClients($workspace_id) }}

{{ __('Clients') }}

@endif
{{ $user->countProject($workspace_id) }}

{{ __('Projects') }}

@if (Auth::user()->type == 'admin') @endif @if (Auth::user()->type != 'admin')
{{ $user->countTask($workspace_id) }}

{{ __('Tasks') }}

@endif

@if (Auth::user()->type == 'admin' && isset($user->getPlan)) @endif

@endforeach
@auth('web') @if (Auth::user()->type == 'admin')
New User

Click here to add New Company

@elseif(isset($currentWorkspace) && $currentWorkspace->creater->id == Auth::id())
Invite New User

Click here to Invite New User

@endif @endauth
@else

404

{{ __('Page Not Found') }}
@endif
@endsection @push('scripts') @endpush