@extends('frontend.layout.dashboard-master') @section('site_title', __('My Profile')) @section('style') @endsection @section('content') @php $isOwnProfile = Auth::guard('web')->check() && Auth::guard('web')->user()->user_type == 2 && Auth::guard('web')->user()->username == $username; $avgRating = freelancer_rating_for_profile_details_page($user->id, true); $levelLabel = moduleExists('FreelancerLevel') ? freelancer_level($user->id) : null; $shouldShowEarnings = get_static_option('user_earning_toggle') != 'enable' || $isOwnProfile || optional($user->user_earning)->show_earning == 1; $array_skill = array_filter(array_map('trim', explode(',', $skills ?? ''))); @endphp {{-- ─────────────── PROFILE HERO ─────────────── --}}
{{-- Avatar + Info --}}
@if($user->image) @if(cloudStorageExist() && in_array(Storage::getDefaultDriver(), ['s3', 'cloudFlareR2', 'wasabi'])) {{ $user->first_name }} @else {{ $user->first_name }} @endif @else {{ __('Author') }} @endif @if(Cache::has('user_is_online_' . $user->id)) @endif

{{ optional($user->user_introduction)->title ?? '' }} @if(Cache::has('user_is_online_' . $user->id)) @endif

{{ $user->first_name }} {{ $user->last_name }}

@if($user->user_verified_status == 1) @endif
{{ $avgRating }} ({{ $complete_orders_in_total ?? 0 }} {{ __('Reviews') }}) @if($levelLabel) {{ __('Level') }} — {{ $levelLabel }} @endif
{{-- Work Availability Toggle --}} @if($isOwnProfile)
{{ __('Available for Work') }}
@endif
{{-- Hourly Rate / Location --}}
@if($user->hourly_rate) {{ float_amount_with_currency_symbol($user->hourly_rate) }} {{ __('Per hour') }} @endif @if($user->user_country?->country) {{ $user->user_country->country }} @if($user->user_state?->state), {{ $user->user_state->state }}@endif @endif
{{-- About Me --}}

{{ __('About Me') }}

{{ optional($user->user_introduction)->description ?? __('No description provided.') }}

{{-- Action Buttons --}} @if($isOwnProfile)
{{ __('Edit Info') }}
@if(moduleExists('PromoteFreelancer')) @php $current_date = \Carbon\Carbon::now()->toDateTimeString(); $is_promoted = \Modules\PromoteFreelancer\Entities\PromotionProjectList::where('identity', auth()->user()->id) ->where('type', 'profile') ->where('expire_date', '>', $current_date) ->where('payment_status', 'complete') ->first(); @endphp @if(!empty($is_promoted)) @else {{ __('Promote Profile') }} @endif @endif
@endif
{{-- ─────────────── STATS ─────────────── --}}

{{ __('Total Earned') }}

@if($shouldShowEarnings) {{ float_amount_with_currency_symbol($total_earning->total_earning ?? 0) }} @else {{ __('Hidden') }} @endif

{{ __('Complete Orders') }}

{{ $complete_orders_in_total ?? 0 }}

{{ __('Active Orders') }}

{{ $active_orders_count ?? 0 }}

{{-- ─────────────── PROJECT CATALOGS ─────────────── --}} @if(get_static_option('project_enable_disable') != 'disable')

{{ __('Project Catalogs') }}

{{-- Add row --}} @if($isOwnProfile)
{{ __('Add new projects') }} +
@endif
@forelse($projects as $project) @php $projectMedia = $project->media ?? []; $firstMedia = $projectMedia[0] ?? null; $isImage = $firstMedia && in_array(strtolower(pathinfo($firstMedia, PATHINFO_EXTENSION)), ['jpg','jpeg','png','webp','gif','svg','bmp','avif']); $mediaUrl = null; if ($firstMedia) { $mediaUrl = (cloudStorageExist() && in_array(Storage::getDefaultDriver(), ['s3','cloudFlareR2','wasabi'])) ? render_frontend_cloud_image_if_module_exists('project/'.$firstMedia, load_from: $project->load_from) : asset('assets/uploads/project/'.$firstMedia); } $price = $project->basic_discount_charge > 0 ? $project->basic_discount_charge : $project->basic_regular_charge; $statusLabel = null; $statusClass = null; if ($project->project_approve_request == 0) { $statusLabel = __('Pending'); $statusClass = 'bg-[#EEF0F3] text-[#3B4759]'; } elseif ($project->status == 2) { $statusLabel = __('Inactive'); $statusClass = 'bg-red-50 text-red-600'; } $isPromoted = false; if(moduleExists('PromoteFreelancer')) { $current_date_p = \Carbon\Carbon::now()->toDateTimeString(); $isPromoted = \Modules\PromoteFreelancer\Entities\PromotionProjectList::where('identity', $project->id) ->where('type','project')->where('expire_date','>',$current_date_p) ->where('payment_status','complete')->exists(); } @endphp
{{-- Thumbnail --}} @if($mediaUrl && $isImage) {{ $project->title }} @else
@endif
{{-- Info --}}

{{ $project->project_category->category ?? __('Uncategorized') }}

@if($isPromoted) {{ __('Promoted') }} @endif

{{ $project->title }}

{{ $avgRating }} ({{ $project->ratings_count ?? 0 }} {{ __('Reviews') }})

{{ __('Starting at:') }} {{ float_amount_with_currency_symbol($price) }}

{{-- Project Footer --}} @if($isOwnProfile)
{{-- Status / Toggle --}} @if($statusLabel) ● {{ $statusLabel }} @else
{{ __('Available for Work') }}
@endif {{-- Action Buttons --}}
@if($project->orders_count == 0 && $project->project_approve_request == 0) @endif {{ __('Edit Project') }} @if(moduleExists('PromoteFreelancer') && !$isPromoted) {{ __('Promote Project') }} @endif
@endif
@empty

{{ __('No projects yet.') }}

@endforelse
@endif {{-- ─────────────── PORTFOLIO ─────────────── --}}

{{ __('Portfolio') }}

@if($isOwnProfile)
{{ __('Add new portfolio') }}
@endif
@forelse($portfolios as $portfolio) @php $portfolioImages = is_array($portfolio->image) ? $portfolio->image : (json_decode($portfolio->image, true) ?? [$portfolio->image]); $portfolioImages = array_filter((array)$portfolioImages); $firstPortfolioImg = $portfolioImages[0] ?? null; $portfolioImgUrl = null; if ($firstPortfolioImg) { $portfolioImgUrl = (cloudStorageExist() && in_array(Storage::getDefaultDriver(), ['s3','cloudFlareR2','wasabi'])) ? render_frontend_cloud_image_if_module_exists('portfolio/'.$firstPortfolioImg, load_from: $portfolio->load_from) : asset('assets/uploads/portfolio/'.$firstPortfolioImg); } @endphp
{{-- Image --}}
@if($portfolioImgUrl) {{ $portfolio->title }} @else
@endif @if($isOwnProfile)
@endif
@if(count($portfolioImages) > 1)
@foreach(array_slice($portfolioImages, 1, 2) as $extraImg) @php $extraUrl = (cloudStorageExist() && in_array(Storage::getDefaultDriver(), ['s3','cloudFlareR2','wasabi'])) ? render_frontend_cloud_image_if_module_exists('portfolio/'.$extraImg, load_from: $portfolio->load_from) : asset('assets/uploads/portfolio/'.$extraImg); @endphp @endforeach @if(count($portfolioImages) > 3)
{{ count($portfolioImages) - 3 }}+
{{ __('More') }}
@endif
@endif
{{-- Info --}}
@if($portfolio->published_date)

{{ __('From:') }} {{ \Carbon\Carbon::parse($portfolio->published_date)->format('F Y') }}

@endif

{{ $portfolio->title }}

@if($portfolio->description)

{{ $portfolio->description }}

@endif
@empty

{{ __('No portfolio items yet.') }}

@endforelse
{{-- ─────────────── WORK EXPERIENCE ─────────────── --}}

{{ __('Work Experience') }}

@if($isOwnProfile)
{{ __('Add new work experience') }}
@endif
@forelse($experiences as $experience)

{{ $experience->title }}

{{ $experience->organization }}

@if($isOwnProfile)
@endif

{{ __('Duration') }}

@if($experience->address)

{{ __('Location') }}

@endif

{{ \Carbon\Carbon::parse($experience->start_date)->format('M j, Y') }} — @if($experience->end_date) {{ \Carbon\Carbon::parse($experience->end_date)->format('M j, Y') }} @else {{ __('Present') }} @endif

@if($experience->address)

{{ $experience->address }}

@endif
@empty

{{ __('No work experience added yet.') }}

@endforelse
{{-- ─────────────── EDUCATION ─────────────── --}}

{{ __('Educational Background') }}

@if($isOwnProfile)
{{ __('Add new Educational Background') }}
@endif
@forelse($educations as $education)

{{ $education->subject }}

{{ $education->institution }}

@if($isOwnProfile)
@endif

{{ __('Degree') }}

{{ __('From - To') }}

{{ $education->degree }}

{{ \Carbon\Carbon::parse($education->start_date)->format('M j, Y') }} — @if($education->end_date) {{ \Carbon\Carbon::parse($education->end_date)->format('M j, Y') }} @else {{ __('Expected') }} @endif

@empty

{{ __('No education added yet.') }}

@endforelse
{{-- ─────────────── SKILLS & EXPERTISE ─────────────── --}}

{{ __('Skill & Expertise') }}

{{-- Add form --}} @if($isOwnProfile)
@if($skills_according_to_category && count($skills_according_to_category) > 0)

{{ __('Suggested skills:') }}

@foreach($skills_according_to_category as $skill) @if(!in_array($skill->skill, $array_skill)) {{ $skill->skill }} @endif @endforeach
@endif
@endif {{-- Current Skills List --}} @if(count($array_skill) > 0)
@foreach($array_skill as $sk)

{{ trim($sk) }}

@if($isOwnProfile)
@endif
@endforeach
@else

{{ __('No skills added yet.') }}

@endif @if($isOwnProfile)
@endif
{{-- ─────────────── POPUP FORMS (hidden fixed overlays) ─────────────── --}} @if($isOwnProfile) {{-- Education & Experience popup forms only (no list content) --}} {{-- Portfolio popup forms --}} @include('frontend.profile-details.add-portfolio') @include('frontend.profile-details.edit-portfolio') @endif {{-- popup overlay backdrop --}} @endsection @section('script') @include('frontend.profile-details.profile-details-js') @endsection