@extends('layouts.app') @section('content')

{{ $company->name }}

Company Overview

{{--

Created {{ $company->created_at->format('F d, Y') }}

--}}
@if(auth()->user()->isManager() && $managerData) @else @if(auth()->user()->isSuperAdmin() || auth()->user()->canManageCompany($company)) @endif @endif
@if(auth()->user()->isManager() && $managerData)

{{ $managerData['pendingExpenses'] }}

Pending Expenses

{{ $managerData['pendingLeaves'] }}

Pending Leaves

{{ $managerData['totalEmployees'] }}

Total Employees

{{ $managerData['presentToday'] }}

Present Today

@else

{{ $users->total() }}

Total Users

{{ $websites->total() }}

Active Websites

{{ ucfirst($company->status) }}

Company Status

{{ $company->created_at->diffInDays() }}

Days Active

@endif
Company Information
{{ $company->email ?: 'Not provided' }}
{{ $company->phone ?: 'Not provided' }}
@if($company->website) {{ $company->website }} @else Not provided @endif
{{ $company->address ?: 'Not provided' }}
@if(auth()->user()->hasHRAccess($company))
Human Resources

Manage your company's workforce and administration.


Employees
Attendance
Performance
@else
Human Resources
Admin Access Required

Contact your administrator to enable admin access.

@endif
@if(auth()->user()->isManager() && $managerData)
Pending Approvals
@if($managerData['recentExpenses']->count() > 0)
Recent Expense Claims
@foreach($managerData['recentExpenses'] as $expense)
{{ $expense->employee->name }} RM {{ number_format($expense->amount, 2) }} - {{ $expense->category }}
@endforeach
@else

No pending expense claims

@endif @if($managerData['recentLeaves']->count() > 0)
Recent Leave Requests
@foreach($managerData['recentLeaves'] as $leave)
{{ $leave->employee->name }} {{ $leave->type }} - {{ $leave->start_date->format('M d') }} to {{ $leave->end_date->format('M d') }}
@endforeach
@else

No pending leave requests

@endif
@endif @if(!auth()->user()->isManager()) @if((auth()->user()->isSuperAdmin() || auth()->user()->isPlatformAdmin()) && isset($assignedAdmins) && $assignedAdmins->count() > 0)
Assigned Platform Admins
{{ $assignedAdmins->count() }} Admin(s)
@foreach($assignedAdmins as $admin)
{{ substr($admin->name, 0, 1) }}
{{ $admin->name }}
{{ $admin->email }}
Platform Admin @if($admin->managedCompanies) Managing {{ $admin->managedCompanies->count() }} companies @endif
@if(auth()->user()->isSuperAdmin())
@csrf @method('DELETE')
@endif
@endforeach
@endif
Company Users
@if(auth()->user()->isSuperAdmin() || auth()->user()->canManageCompany($company)) Add User @endif
@if($users->count() > 0)
@foreach($users as $user) @endforeach
User Role Actions
{{ substr($user->name, 0, 1) }}
{{ $user->name }}
{{ $user->email }}
@if($user->role === 'hr') Company Admin @elseif($user->role === 'manager') Manager @elseif($user->role === 'staff') Staff @else {{ ucfirst(str_replace('_', ' ', $user->role)) }} @endif
@csrf @method('DELETE')
@else
No users found

This company doesn't have any users yet.

@if(auth()->user()->isSuperAdmin() || auth()->user()->canManageCompany($company)) Add First User @endif
@endif
@endif
@if(!auth()->user()->isManager())
Company Websites
@if(auth()->user()->isSuperAdmin() || auth()->user()->canManageCompany($company)) Add Website @endif
@if($websites->count() > 0)
@foreach($websites as $website)
{{ $website->is_published ? 'Published' : 'Draft' }}
{{ $website->name }}

Created by: {{ optional($website->creator)->name ?? 'Unknown' }}

{{ $website->created_at->format('M d, Y') }}

@if($website->subdomain)

{{ $website->subdomain }}.{{ config('app.domain', 'neosolvix.test') }}

@endif
@endforeach
@else
No websites found

This company doesn't have any websites yet.

@if(auth()->user()->isSuperAdmin() || auth()->user()->canManageCompany($company)) Create First Website @endif
@endif
@endif
@endsection