@extends('layouts.user') @section('title', trans('app.Dashboard')) @section('page-title', trans('app.Welcome Back')) @section('page-subtitle', trans('app.Manage your licenses and products')) @section('seo_title', $seoTitle ?? $siteSeoTitle ?? trans('app.Dashboard')) @section('meta_description', $seoDescription ?? $siteSeoDescription ?? trans('app.Manage your licenses, track downloads, and access support from your personal dashboard')) @section('content')
{{ trans('app.Welcome Back') }}, {{ auth()->user()->name }}!

{{ trans('app.Manage your licenses, track downloads, and access support from your personal dashboard') }}

{{ trans('app.Active Licenses') }}
{{ $activeCount ?? auth()->user()->licenses()->where('status','active')->count() }}

{{ trans('app.Currently active') }}

{{ trans('app.Total Products') }}
{{ \App\Models\Product::count() }}

{{ trans('app.Available products') }}

{{ trans('app.Open Tickets') }}
{{ auth()->user()->tickets()->where('status','open')->count() }}

{{ trans('app.Awaiting response') }}

{{ trans('app.Total Downloads') }}
{{ auth()->user()->licenseLogs()->count() }}

{{ trans('app.License downloads') }}

{{ trans('app.Total Invoices') }}
{{ $invoiceTotal ?? auth()->user()->invoices()->count() }}

{{ trans('app.All invoices') }}

{{ trans('app.Paid Invoices') }}
{{ $invoicePaid ?? auth()->user()->invoices()->where('status','paid')->count() }}

{{ trans('app.Completed payments') }}

{{ trans('app.Pending Invoices') }}
{{ $invoicePending ?? auth()->user()->invoices()->where('status', 'pending')->count() }}

{{ trans('app.Awaiting payment') }}

{{ trans('app.Cancelled Invoices') }}
{{ $invoiceCancelled ?? auth()->user()->invoices()->where('status','cancelled')->count() }}

{{ trans('app.Cancellations') }}

{{ trans('app.My Licenses') }}

{{ trans('app.Manage your purchased licenses') }}

@if($licenses->isEmpty())

{{ trans('app.No licenses found') }}

{{ trans('app.You haven\'t purchased any licenses yet') }}

@else
@foreach($licenses as $license) @endforeach
{{ trans('app.Product') }} {{ trans('app.License Type') }} {{ trans('app.Status') }} {{ trans('app.Support') }} {{ trans('app.Actions') }}
{{ $license->product?->name ?? 'N/A' }}
v{{ $license->product?->version ?? '-' }}
{{ ucfirst($license->license_type ?? '-') }} {{ ucfirst($license->status) }} {{ optional($license->support_expires_at)->format('M d, Y') ?? '-' }} @if($license->product) {{ trans('app.View Details') }} @else {{ trans('app.N/A') }} @endif
{{ $licenses->links() }}
@endif
{{ trans('app.My Invoices') }}

{{ trans('app.Manage your invoices and payments') }}

@php $invoices = auth()->user()->invoices()->with('license.product')->latest()->take(5)->get(); @endphp @if($invoices->isEmpty())

{{ trans('app.No invoices found') }}

{{ trans('app.You don\'t have any invoices yet') }}

@else
@foreach($invoices as $invoice) @endforeach
{{ trans('app.Invoice') }} {{ trans('app.Product') }} {{ trans('app.Amount') }} {{ trans('app.Status') }} {{ trans('app.Due Date') }} {{ trans('app.Actions') }}
{{ $invoice->invoice_number }}
{{ $invoice->created_at->format('M d, Y') }}
{{ $invoice->license->product->name ?? 'N/A' }}
{{ $invoice->license->license_type ?? 'N/A' }}
${{ number_format($invoice->amount, 2) }} {{ ucfirst($invoice->status) }} {{ $invoice->due_date ? $invoice->due_date->format('M d, Y') : 'N/A' }} {{ trans('app.View') }}
@endif
{{ trans('app.Available Products') }}
{{ trans('app.View All Products') }}
@if($products->isEmpty())

{{ trans('app.No products available') }}

{{ trans('app.Check back later for new products') }}

@else @foreach($products as $product)

{{ $product->name }}

@if($product->is_featured || $product->is_popular) {{ trans('app.Premium') }} @endif

v{{ $product->version ?? '-' }}

{{ $product->formatted_price }}
{{ $product->renewalPeriodLabel() }}
@if($product->description)

{{ Str::limit($product->description, 100) }}

@endif {{ trans('app.View Details') }}
@endforeach @endif
@endsection