@extends('layout.app') @section('title', 'Profile') @push('header_script') @endpush @section('content')
@php $activeTenant = session('tenant_id') ? \App\Models\Master\Tenant::on('master')->with('plan')->find(session('tenant_id')) : app(\App\Tenancy\TenantManager::class)->getTenant(); @endphp @if(is_desktop_mode()) @php $tenantMgr = app(\App\Tenancy\TenantManager::class); $desktopLic = $tenantMgr->getDesktopLicense(); $vehCount = \App\Models\Vehicle::count(); $vLimit = (isset($desktopLic['vehicleLimit']) && is_numeric($desktopLic['vehicleLimit'])) ? (int)$desktopLic['vehicleLimit'] : 0; @endphp
Fleet SRP Desktop Edition Active License
Vehicle Limit: {{ $vehCount }} / {{ $vLimit }} Vehicles Used | License Model: {{ $desktopLic['businessModel'] ?? 'ENTERPRISE' }} | Validity: {{ !empty($desktopLic['expiryDate']) ? \Carbon\Carbon::parse($desktopLic['expiryDate'])->format('d M, Y') : 'Lifetime' }}
View Registered Vehicles
@elseif($activeTenant)
{{ $activeTenant->company_name }} {{ $activeTenant->company_code }}
Plan: {{ $activeTenant->plan ? $activeTenant->plan->name : ($activeTenant->subscription_plan ?: 'Standard') }} | Plan Expiry: {{ $activeTenant->plan_expires_at ? \Carbon\Carbon::parse($activeTenant->plan_expires_at)->format('d M, Y') : 'Lifetime' }} | Storage Quota: {{ $activeTenant->document_storage ?: ($activeTenant->plan ? $activeTenant->plan->document_storage : '5') }} GB
@endif
Personal Details
{!! Form::open([ 'route' => ['profileUpdate', $user->id], 'onsubmit' => 'BtnSubmit.disabled = true', 'class' => 'row g-3 needs-validation', 'method' => 'put', 'autocomplete' => 'off' ]) !!}
{{$errors->first('name')}}
{{$errors->first('email')}}
{!! Form::close() !!}
Password Update
{!! Form::open([ 'route' => ['profileUpdate', $user->id], 'onsubmit' => 'BtnSubmit.disabled = true', 'class' => 'row g-3 needs-validation', 'method' => 'put', 'autocomplete' => 'off' ]) !!}
{{$errors->first('old_password')}}
{{$errors->first('new_password')}}
{{$errors->first('confirm_password')}}
{!! Form::close() !!}
@endsection @push('footer_script') @endpush