@php $panel=request()->is('panel/*');$admin=request()->is('admin*');$marketing=request()->is('marketing*'); $workspace=$panel||$admin||($marketing&&auth()->check()); $currentTenant=$panel?app(\App\Tenancy\TenantContext::class)->tenant():null; $membership=request()->attributes->get('membership'); $allowed=fn($permission)=>$membership&&($membership->role==='owner'||in_array($permission,$membership->permissions??[],true)); $base=$panel?'/panel/'.$currentTenant->id:''; $menu=[['','پیشخوان','bookings.view','grid'],['bookings','مدیریت نوبت‌ها','bookings.view','calendar'],['customers','مشتریان','customers.view','users'],['crm','CRM و وفاداری','crm.view','heart'],['staff','کارکنان','staff.view','users'],['members','دسترسی همکاران','staff.manage','shield'],['services','خدمات سالن','services.view','scissors'],['pages','محتوای سایت','cms.manage','globe'],['domains','دامنه اختصاصی','domains.manage','link'],['sms','پیامک و یادآوری','sms.manage','message'],['app','اپلیکیشن اندروید','app.manage','download'],['subscription','پلن و اشتراک','subscriptions.view','bag'],['settings','تنظیمات سالن','settings.manage','settings']]; $currentPlan=$panel?\App\Models\Subscription::where('tenant_id',$currentTenant->id)->where('status','active')->where('ends_at','>',now())->latest('id')->first():null; @endphp @yield('title','بیوتی پل') | بیوتی پل @if($workspace)
@if($panel&&$allowed('customers.view'))
↵@endif
{{ \App\Support\Persian::date(now(),'l، j F Y') }}
{{ mb_substr(auth()->user()->name,0,1) }}{{ auth()->user()->name }}{{ $panel?'مدیر سالن':($admin?'مدیریت سامانه':'بازاریاب') }}
@else
بیوتی پلپلی به زیبایی
@endif

@yield('title','بیوتی پل')

@yield('subtitle')

@yield('actions')
@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))@endif @if($errors->any())@endif @yield('content')
@if($workspace)
@endif