@extends('layouts.admin') @section('page-title') @if (\Auth::user()->type == 'admin') {{ __('Manage Companies') }} @else {{ __('Users') }} @endif @endsection @php $logo = \App\Models\Utility::get_file('avatars/'); @endphp @section('links') @if (\Auth::guard('client')->check()) @else @endif @if (\Auth::user()->type == 'admin') @else @endif @endsection @section('action-button') @auth('web') @if (Auth::user()->type == 'admin') @elseif(isset($currentWorkspace) && $currentWorkspace->creater->id == Auth::id()) @endif @endauth @endsection @section('content') @if ((isset($currentWorkspace) && $currentWorkspace) || Auth::user()->type == 'admin')
@foreach ($users as $user) @php($workspace_id = isset($currentWorkspace) && $currentWorkspace ? $currentWorkspace->id : '')
@if (Auth::user()->type != 'admin') @if ($user->permission == 'Owner')
{{ __('Owner') }}
@else
{{ __('Member') }}
@endif @endif
@if (Auth::user()->type == 'admin' && Auth::user()->id != $user->id)
@endif @if (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') }}

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

{{ __('Projects') }}

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

{{ __('Projects') }}

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

{{ __('Tasks') }}

@endif
@endforeach @auth('web')
@if (Auth::user()->type == 'admin')
{{ __('New Company') }}

{{ __('Click here to add New Company') }}

@elseif(isset($currentWorkspace) && $currentWorkspace->creater->id == Auth::id())
{{ __('Invite User') }}

{{ __('Click here to Invite User') }}

@endif
@endauth
@else

404

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