@php use App\Constants\Status; use App\Models\Booking; use Modules\Listing\Entities\Listing; $auth_user = Auth::guard('web')->user(); $roleLabel = $auth_user?->getRoleLabel(); $designationLabel = trim(strip_tags((string) ($auth_user?->designation ?? ''))); $profileMeta = collect([$roleLabel, $designationLabel]) ->filter(fn ($value) => is_string($value) && trim($value) !== '') ->implode(' - '); $canListJobPost = $auth_user?->canListInCategory(Status::JOB_POST) ?? false; $canListAny = count($auth_user?->getAllowedCategoryIds() ?? []) > 0; $hasRealEstateListings = $auth_user ? Listing::where('agent_id', $auth_user->id)->where('category_id', Status::REAL_ESTATE)->exists() : false; $pendingIncomingBookings = $hasRealEstateListings ? Booking::forAgent($auth_user->id)->where('status', Booking::STATUS_PENDING)->count() : 0; $unreadSupportTicketReplies = Module::isEnabled('SupportTicket') && $auth_user ? user_unread_support_ticket_messages_count($auth_user->id) : 0; $unreadDirectMessages = Module::isEnabled('UserMessaging') && $auth_user ? user_unread_direct_messages_count($auth_user->id) : 0; $activeSubscriptionPlanName = null; $subscriptionPricingUrl = null; if ($auth_user && Module::isEnabled('Subscription')) { $subscriptionPricingUrl = route('pricing-plan'); $activeSubscription = \Modules\Subscription\Entities\SubscriptionHistory::activeForUser($auth_user->id); if ($activeSubscription && filled($activeSubscription->plan_name) && \Modules\Subscription\Entities\SubscriptionHistory::isHistoryCurrentlyValid($activeSubscription)) { $activeSubscriptionPlanName = $activeSubscription->plan_name; } else { $defaultPlan = \Modules\Subscription\Entities\SubscriptionPlan::getDefault(); $activeSubscriptionPlanName = $defaultPlan?->plan_name ?? __('translate.No Subscription Plan'); } } @endphp
@if ($profileMeta !== '')

{{ html_decode($profileMeta) }}

@endif

{{ html_decode($auth_user->name) }} @php $kyc = Modules\Kyc\Entities\KycInformation::where('user_id',$auth_user->id)->where('status',1)->first(); @endphp @if($kyc) @endif

@if ($subscriptionPricingUrl && $activeSubscriptionPlanName)

{{ __('translate.Plan') }}: {{ html_decode($activeSubscriptionPlanName) }} {{ __('translate.dashboard_plan_upgrade_tooltip') }}

@endif