@extends('partial.layout') @section('content')
سلام, {{$customer->full_name}}

به گالری طلای مهر خوش آمدید، در این قسمت میتواند سفارشات خود را پیگیری نمایید

محصولات مورد علاقه من
@if($favProducts->count() > 0) @foreach($favProducts as $favItem) @if(isset($favItem))
@endif @endforeach @else

محصول مورد علاقه ای ندارید!

@endif

درخواست مرجوعی

درخواست‌های مرجوعی قبلی
برای مرجوع کردن کالایی از سفارش خود، شماره سفارش را در زیر وارد نمایید.

سفارشات من

{{-- قبلی: id="pills-home" --}}
@if($completeOrder->count() > 0) @foreach($completeOrder as $order)
وضعیت سفارش: {{ optional($order->orderStatus)->title ?? '-' }} @if((optional($order->orderStatus)->title ?? '') !== 'لغو سفارش' && (optional($order->orderStatus)->title ?? '') !== 'لغو خودکار') وضعیت پرداخت: {{ $order->payment_status ?? '-' }} @endif @php $paymentMethod = optional($order->paymentMethod); $hours = (int) ($paymentMethod->payment_time ?? 0); $expireAt = $order->created_at?->copy()?->addHours($hours); $now = now(); $isExpired = $expireAt ? $now->greaterThan($expireAt) : true; @endphp @if( ($order->payment_status === 'در انتظار پرداخت') && !$isExpired && ($paymentMethod->type ?? null) === 'transfer_to_card' && (optional($order->orderStatus)->title ?? '') !== 'لغو سفارش' && (optional($order->orderStatus)->title ?? '') !== 'لغو خودکار' )
00:00:00
@endif @if(!empty($order->post_tracking_code))
شماره پیگیری پست: {{ $order->post_tracking_code }}
@endif
سفارش #{{ $order->order_number }}

{{ jdate($order->created_at)->format('Y/m/d H:i') }}

@foreach($order->items as $item)
{{ $item->product->title ?? '' }} - {{ $item->product->vendor_code ?? '' }}

وزن: {{ $item->count }} @if($item->productItem) {{ $item->productItem->weight ?? '-' }} گرم @else {{ $item->product->default_weight ?? '-' }} گرم @endif

{{ number_format($item->final_price) }} ریال @if(($item->discount_price ?? 0) > 0) {{ number_format($item->price) }} ریال @endif
@if(!$loop->last)
@endif @endforeach
@endforeach @else

سفارشی برای نمایش در این بخش وجود ندارد.

@endif
@if($activeOrders->count() > 0) @foreach($activeOrders as $order)
وضعیت سفارش: {{ optional($order->orderStatus)->title ?? '-' }} @if((optional($order->orderStatus)->title ?? '') !== 'لغو سفارش' && (optional($order->orderStatus)->title ?? '') !== 'لغو خودکار') وضعیت پرداخت: {{ $order->payment_status ?? '-' }} @endif @php $paymentMethod = optional($order->paymentMethod); $hours = (int) ($paymentMethod->payment_time ?? 0); $expireAt = $order->created_at?->copy()?->addHours($hours); $now = now(); $isExpired = $expireAt ? $now->greaterThan($expireAt) : true; @endphp @if( ($order->payment_status === 'در انتظار پرداخت') && !$isExpired && ($paymentMethod->type ?? null) === 'transfer_to_card' && (optional($order->orderStatus)->title ?? '') !== 'لغو سفارش' && (optional($order->orderStatus)->title ?? '') !== 'لغو خودکار' )
00:00:00
@endif @if(!empty($order->post_tracking_code))
شماره پیگیری پست: {{ $order->post_tracking_code }}
@endif
سفارش #{{ $order->order_number }}

{{ jdate($order->created_at)->format('Y/m/d H:i') }}

@foreach($order->items as $item)
{{ $item->product->title ?? '' }} - {{ $item->product->vendor_code ?? '' }}

وزن: {{ $item->count }} @if($item->productItem) {{ $item->productItem->weight ?? '-' }} گرم @else {{ $item->product->default_weight ?? '-' }} گرم @endif

{{ number_format($item->final_price) }} ریال @if(($item->discount_price ?? 0) > 0) {{ number_format($item->price) }} ریال @endif
@if(!$loop->last)
@endif @endforeach
@endforeach @else

سفارشی برای نمایش در این بخش وجود ندارد.

@endif
@if($canceledOrders->count() > 0) @foreach($canceledOrders as $order)
وضعیت سفارش: {{ optional($order->orderStatus)->title ?? 'لغو' }} @if(!empty($order->post_tracking_code))
شماره پیگیری پست: {{ $order->post_tracking_code }}
@endif
سفارش #{{ $order->order_number }}

{{ jdate($order->created_at)->format('Y/m/d H:i') }}

@foreach($order->items as $item)
{{ $item->product->title ?? '' }} - {{ $item->product->vendor_code ?? '' }}

وزن: {{ $item->count }} @if($item->productItem) {{ $item->productItem->weight ?? '-' }} گرم @else {{ $item->product->default_weight ?? '-' }} گرم @endif

{{ number_format($item->final_price) }} ریال @if(($item->discount_price ?? 0) > 0) {{ number_format($item->price) }} ریال @endif
@if(!$loop->last)
@endif @endforeach
@endforeach @else

سفارش لغوشده‌ای برای نمایش وجود ندارد.

@endif

نقد و نظرات

@forelse($comments as $review)
@for($i = 1; $i <= 5; $i++) @endfor
{{ jdate($review->created_at)->format('Y/m/d') }}

{{ $review->comment }}

@empty
شما هنوز هیچ نقد و نظری ثبت نکرده‌اید.
@endforelse

لیست علاقه مندی های من

@if($favProducts->count() > 0) @foreach($favProducts as $favItem) @if(isset($favItem))
@endif @endforeach @else

محصول مورد علاقه ای ندارید!

@endif

کارت های هدیه

کارت های هدیه

آدرس های من

@forelse(auth()->user()->addresses as $address)

آدرس {{ $loop->iteration }}

شهر: {{ $address->city->title }}

کد پستی: {{ $address->postal_code }}

آدرس: {{ $address->address }}

@empty

شما هنوز هیچ آدرسی ثبت نکرده‌اید.

@endforelse

اطلاع رسانی ها

@forelse(auth()->user()->notifications as $notification)
{{ $notification->title }}
{{ $notification->pivot->status === 'success' ? 'ارسال شده' : ($notification->pivot->status === 'failed' ? 'ناموفق' : 'در انتظار') }}

{{ $notification->content }}

نوع: {{ $notification->type === 'email' ? 'ایمیل' : ($notification->type === 'sms' ? 'پیامک' : 'اعلان') }} @if($notification->pivot->send_at) ارسال شده در: {{ jdate($notification->pivot->send_at)->ago() }} @else زمان ارسال: {{ jdate($notification->schedule_send)->ago() }} @endif
@empty
هیچ اعلانی برای شما وجود ندارد.
@endforelse

تیکت های من

ایجاد تیکت جدید
@forelse(auth()->user()->tickets as $ticket)
{{ $ticket->title }}
{{ $ticket->status === 'closed' ? 'بسته شده' : ($ticket->status === 'waiting_for_answer' ? 'در انتظار پاسخ' : 'در حال بررسی') }} {{ $ticket->priority === 'high' ? 'مهم' : ($ticket->priority === 'medium' ? 'متوسط' : 'عادی') }}
{{ $ticket->department ? $ticket->department->title : '-' }} @if($ticket->order_number) سفارش: {{ $ticket->order_number }} @endif
{{ jdate($ticket->created_at)->ago() }} {{ $ticket->comments->count() }} پاسخ
@empty
شما هنوز هیچ تیکتی ایجاد نکرده‌اید.
@endforelse

سفارشات ویژه

@forelse($specialOrders as $order)
سفارش ویژه #{{ $order->id }}

{{ jdate($order->created_at)->format('Y/m/d H:i') }}

{{ $order->status === 'pending' ? 'در انتظار بررسی' : ($order->status === 'accepted' ? 'تایید شده' : 'رد شده') }}
{{ $order->website_product_code ?? '-' }}
{{ $order->color ?? '-' }}
{{ $order->stone_type ?? '-' }}
{{ $order->matterial ?? '-' }}
{{ number_format($order->price) }} ریال
{{ Str::limit($order->description, 100) }}
@if($order->attachments->count() > 0)
تصاویر
@foreach($order->attachments as $attachment) @endforeach
@endif
@empty

شما هنوز هیچ سفارش ویژه‌ای ثبت نکرده‌اید.

ثبت سفارش ویژه جدید
@endforelse

اطلاعات شخصی

نام

{{$customerItem->first_name}}

نام خانوادگی

{{$customerItem->last_name}}

آدرس ایمیل

{{$customerItem->email}}

شماره تماس

{{$customerItem->phone}}

شماره موبایل

{{$customerItem->mobile}}

کد ملی

{{$customerItem->national_code}}

مهربن های من

@foreach($customerItem->mehrBone as $mehrBone) @endforeach
شماره سفارش تاریخ سفارش تعداد مهربن های دریافتی تعداد مهربن های مصرف شده تعداد مهربن های مانده
{{$mehrBone->order->order_number}} {{jdate($mehrBone->order->created_at)->toDateString()}} {{$mehrBone->value}} {{$mehrBone->value - $mehrBone->remaining_value}} {{$mehrBone->remaining_value}}
@push('styles') @endpush @push('scripts') @endpush @endsection