@extends('website.layout') @section('title') {{__("Customer profile")}} - @endsection @section('content')
@if(Auth::guard('customer')->user()->name == null || Auth::guard('customer')->user()->name == '')
{{__("Dear customer, Please complete your information")}}
@else {{--
--}} {{-- {{__("Hello")}}, {{Auth::guard('customer')->user()->name}}--}} {{--
--}} @endif @include('starter-kit::component.err')
profile
{{Auth::guard('customer')->user()->name}}
  • {{__("Dashboard")}}
  • {{__("Profile")}}
  • {{__("Your invoices")}}
  • {{__("Addresses")}}
  • {{__("Tickets")}}
  • {{__("Send new ticket")}}
  • مدیریت کیف پول
  • {{__("Favorites")}}
  • @if(!(auth('customer')->user()->colleague??null))
  • {{__("Application request")}}
  • @endif
  • {{__("Logout")}}

{{auth('customer')->user()->tickets()->count()}}

پشتیبانی

{{auth('customer')->user()->invoices()->count()}}

سفارش‌ها

{{number_format(auth('customer')->user()->credit)}} {{config('app.currency_type')}}

موجودی کیف پول
@if (\App\Helpers\cardCount() > 0)
{{__("You have got :count products in your basket, Could you complete your purchase?",['count'=>\App\Helpers\cardCount()])}}
{{__("Complete your purchase")}}
@endif
آخرین سفارش ها
@if(auth('customer')->user()->invoices()->count() > 0) @foreach(auth('customer')->user()->invoices()->limit(5)->get() as $in ) @endforeach
شماره مبلغ وضعیت زمان
{{$in->id}} {{number_format($in->total_price)}} {{config('app.currency_type')}} {{__($in->status)}} {{$in->created_at->diffForHumans()}}
@else
سفارشی ثبت نشده است رفتن به فروشگاه
@endif
@csrf
@foreach(\App\Models\Invoice::whereCustomerId(auth('customer')->id())->orderBy('id','desc')->with('successPayments')->get() as $invoice) @endforeach
# {{__("Products")}} {{__("Total Price")}} {{__("Status")}} {{__("Ref ID")}} {{__("Created At")}}
{{$loop->index+1}} {{$invoice->products->implode('name','، ')}} @if($invoice->invoice != null) [ {{__("Belong to")}} ] @endif {{number_format($invoice->total_price)}} {{config('app.currency_type')}} {{__($invoice->status)}} - {{$invoice->successPayments->implode('type')}} {{($invoice->successPayments->first()->reference_id??'-')}} {{$invoice->created_at->diffForHumans()}} @if($invoice->status===\App\Models\Invoice::PENDING || $invoice->status===\App\Models\Invoice::FAILED) @else @endif

{{__("Credit")}}


{{__("Your credit")}}: {{number_format(auth('customer')->user()->credit)}} {{config('app.currency_type')}}


تاریخچه استفاده اعتبار
    @foreach(auth('customer')->user()->credits as $c)
  • مبلغ {{number_format($c->amount)}} {{config('app.currency_type')}}
    {{__("Pay by credit")}}: {{number_format($c->invoice->credit_price)}} {{config('app.currency_type')}}
    {{__("Price")}} {{number_format($c->invoice->total_price)}} {{config('app.currency_type')}}
  • @endforeach
@foreach(auth('customer')->user()->main_tickets as $ticket) @endforeach
{{__("Title")}} {{__("Status")}} {{__("Last update")}} -
{{$ticket->title}} {{__($ticket->status)}} {{$ticket->updated_at->diffForHumans()}} {{__("Show")}}
@csrf
@csrf
@if(auth('customer')->user()->products()->count() == 0)
محصولی به علاقه‌مندی هایتان اضافه نشده است. رفتن به فروشگاه
@else @foreach(auth('customer')->user()->products as $p)
@include('website.component.pro',['p' => $p])
@endforeach @endif
  • {{__("Main address")}}: {{auth('customer')->user()->address}}
  • @foreach(auth('customer')->user()->addresses as $ad)
  • {{$ad->address}}
  • @endforeach

{{__("Add address")}}
@csrf


@endsection