@extends('layouts.dashboard') @section('title', $user->name . ' - User Profile') @section('content')

πŸ‘€ {{ $user->name }} - Profile

{{-- Profile + User Notes + Placeholder Side by Side --}}
{{-- Profile Card --}}
User Image

{{ $user->name }}

{{ $role }}

Email: {{ $user->email }}

Phone: {{ $user->phone_number }}

Department: {{ $user->department->name ?? '-' }}

Reporting Person: {{ $user->reportingPerson->name ?? '-' }}

Monthly Target: {{ $user->monthly_target }}

Upsell Incentive: {{ $user->upsell_incentive }}%

Disable Login: {{ $user->disable_login ? 'Yes' : 'No' }}

Employee Code: {{ $user->employee_code }}

Experience: {{ $user->experience ?? '-' }}

Qualification: {{ $user->qualification ?? '-' }}

Specialization: {{ $user->specialization ?? '-' }}

Date of Joining: {{ $user->date_of_joining ? \Carbon\Carbon::parse($user->date_of_joining)->format('d M, Y') : '-' }}

{{-- User Notes --}}

πŸ“ User Notes

@forelse($user->userNotes as $note)

Added by: {{ $note->addedBy->name ?? '-' }} | Date: {{ $note->created_at->format('Y-m-d H:i:s') }}

Title: {{ $note->title }}

Rating: @if($note->rating) @for($i = 1; $i <= 5; $i++) @endfor @else - @endif

Note Type: {{ $note->note_type }}

Description: {{ $note->description }}

@empty

No notes added yet.

@endforelse

πŸ“ HR Notes

@forelse($user->hrNotes as $note)

Added by: {{ $note->addedBy->name ?? '-' }} | Date: {{ $note->created_at->format('Y-m-d H:i:s') }}

Title: {{ $note->title }}

Note Type: {{ $note->note_type }}

Rating: @if($note->rating) @for($i = 1; $i <= 5; $i++) @endfor @else - @endif

Description: {{ $note->description }}

@empty

No HR notes added yet.

@endforelse
{{-- HR Note Modal --}}
@if ($role === 'Employee')

πŸ“Š Project Stats

@php $cards = [ ['title' => 'All Projects', 'count' => $stats['all'], 'gradient' => 'bg-gradient-to-r from-blue-500 to-indigo-600', 'icon' => 'πŸ“'], ['title' => 'Working', 'count' => $stats['working'], 'gradient' => 'bg-gradient-to-r from-yellow-400 to-yellow-600', 'icon' => 'πŸ› οΈ'], ['title' => 'Completed', 'count' => $stats['complete'], 'gradient' => 'bg-gradient-to-r from-green-400 to-emerald-600', 'icon' => 'βœ…'], ['title' => 'Paused', 'count' => $stats['pause'], 'gradient' => 'bg-gradient-to-r from-purple-400 to-purple-700', 'icon' => '⏸️'], ['title' => 'Issues', 'count' => $stats['issue'], 'gradient' => 'bg-gradient-to-r from-red-500 to-pink-600', 'icon' => '🚫'], ['title' => 'Temp Hold', 'count' => $stats['temp_hold'], 'gradient' => 'bg-gradient-to-r from-gray-500 to-gray-700', 'icon' => 'πŸ•’'], ]; @endphp @foreach ($cards as $card)
{{ $card['icon'] }}
{{ $card['title'] }}
{{ $card['count'] }}
@endforeach
@endif
{{-- 🎯 User Performance Summary --}}

🎯 User Performance Summary

{{-- Average User Rating --}}
⭐
Average User Rating
{{ number_format($avgUserRating, 1) }}
{{-- Average HR Rating --}}
πŸ‘¨β€πŸ’Ό
Average HR Rating
{{ number_format($avgHrRating, 1) }}
{{-- Fine Count --}}
⚠️
Fine Count
{{ $fineCount }}
{{-- Appreciation Count --}}
πŸ‘
Appreciation Count
{{ $appreciationCount }}
{{-- DSR Reports Section --}}

πŸ“ User DSR Reports

@if($dsrs->isEmpty())

No DSR reports found for this user.

@else
@foreach ($dsrs as $dsr) @endforeach
Project Name Work Details Date Hours Someone Helped?
{{ $dsr->project->name_or_url ?? 'N/A' }} {{ Str::limit($dsr->work_description, 60) }} {{ \Carbon\Carbon::parse($dsr->created_at)->format('d M Y') }} {{ $dsr->hours }} {{ $dsr->helper ? $dsr->helper->name : 'No' }}
@endif
← Back to Users
@endsection