@extends('layouts.mz') @use('App\Support\Display') @use('App\Support\Jalali') @use('App\Subscriptions\Subscription') @section('title', $seller->name) @section('credit', '1') @section('content') {{-- slice 12 (flow ک۱ step 5 and flow ک۲): one seller, everything about him. the subscription and its payments, «ثبت پرداخت و تمدید», «تعلیق» with its reason, the SMS quota (debt 48), «رمز اولیهٔ تازه», and — only once the keeping window has passed — the way to «پاک کردن دادهٔ فروشنده» (پ۱۲-۴). --}}

{{ $seller->name }}

@if (session('mz.saved'))

{{ session('mz.saved') }}

@endif @if (session('mz.warning')) @endif @if (session('mz.notice')) @endif @if (session('mz.history')) @endif

وضعیت

@if ($seller->isPurged()) دادهٔ پاک‌شده @elseif (!$seller->isActive()) معلق @else فعال @endif @php $state = $subscription->state(); @endphp اشتراک: {{ $subscription->stateWord() }}

{{ $subscription->sentence() }}

@if ($seller->isPurged())

دادهٔ این فروشنده در {{ Display::date($seller->purged_at) }} پاک شد. این ردیف برای حساب‌وکتاب ما مانده است: نام، تاریخ‌ها و پرداخت‌ها.

@elseif (!$seller->isActive())

معلق از {{ $seller->suspended_at ? Display::date($seller->suspended_at) : '—' }}@if ($seller->suspend_reason) — دلیل: {{ $seller->suspend_reason }}@endif. مدیرش وارد نمی‌شود و همکارانش «در دسترس نیست» می‌بینند.

@endif
آغاز اشتراک
{{ $seller->subscription_starts_at ? Display::date($seller->subscription_starts_at) : '—' }}
آخرین روز اشتراک
{{ $subscription->lastDay() ? Display::date($subscription->lastDay()) : 'ثبت نشده' }}
آخرین روز مهلت {{ Display::number(Subscription::GRACE_DAYS) }} روزه
@if ($subscription->graceEndsAt()) {{-- graceEndsAt is the first CLOSED moment; a person reads the last open day --}} {{ Display::date($subscription->graceEndsAt()->subSecond()) }} @if (!$subscription->closed()) ({{ Display::number(max(0, (int) $subscription->graceDaysLeft())) }} روز مانده) @endif @else — @endif
پاک‌کردنی از ({{ Display::number(Subscription::KEEP_DAYS) }} روز پس از پایان)
@if ($subscription->purgeableAt()) {{ Display::date($subscription->purgeableAt()) }} @if (!$subscription->purgeable()) ({{ Display::number(max(0, (int) $subscription->daysUntilPurge())) }} روز مانده) @endif @else — @endif
شمارهٔ تماس فروشنده
@if ($seller->contact_phone) @else ثبت نشده؛ همکار هنگام بسته بودن شماره‌ای برای تماس نمی‌بیند @endif
نسخهٔ پایگاه
@if ($seller->isPurged()) — @elseif ($seller->code_version === $codeVersion) {{ $seller->code_version }} @elseif ($seller->update_error) {{-- «پویش تجربه» 0.35.3: the stored reason itself (this is OUR console) and what happens next — «متن خطا در لاگ است» sent us to a file on a host with no SSH while the reason sat in this very row --}} به‌روزرسانی پایگاه این فروشنده به نسخهٔ {{ $codeVersion }} شکست خورد؛ پنل و اپ همکارانش تا آن زمان بسته‌اند. زمان‌بند هر دقیقه دوباره امتحان می‌کند و با رفع علت خودش درست می‌شود. علت: {{ $seller->update_error }} @else در صف به‌روزرسانی @endif
@unless ($seller->isPurged())

ثبت پرداخت و تمدید

پرداخت را ثبت کنید و اشتراک همان لحظه تمدید می‌شود: معامله و ورود همکاران بی‌درنگ باز می‌شوند. هر پرداخت یک ردیف تازه است و هیچ ردیفی ویرایش نمی‌شود.

@csrf @include('console._subscription-fields', ['defaults' => $subscriptionDefaults])
@endunless

پرداخت‌ها

@if ($payments->isEmpty())

هنوز پرداختی ثبت نشده است، پس این اشتراک تاریخ پایان ندارد و هیچ‌وقت بسته نمی‌شود.

@else
@foreach ($payments as $payment) @if ($payment->memo) @endif @endforeach
دوره مبلغ شیوه شمارهٔ مرجع ثبت
{{ Display::date($payment->from_at) }} تا {{ Display::date($payment->to_at->subSecond()) }} @if ($payment->amount_rial !== null) {{ Display::money((int) $payment->amount_rial, Display::MONEY_TOMAN) }} @else ثبت نشده @endif {{ $payment->methodWord() }} @if ($payment->reference) {{ $payment->reference }} @else — @endif {{ Display::date($payment->created_at) }} ساعت {{ Display::clock($payment->created_at) }}
{{ $payment->memo }}
@endif

هشدارهای اشتراک

هر مرحله یک بار به موبایل مدیر پیامک می‌شود؛ تمدید دورهٔ تازه‌ای می‌سازد و هر چهار مرحله دوباره می‌روند.

@if ($notices->isEmpty())

هنوز هشداری فرستاده نشده است.

@else @endif

سهمیهٔ پیامک

در {{ $quota['month'] }}: {{ Display::number($quota['used']) }} پیامک به مشتریان این فروشنده رفته است @if ($quota['quota'] !== null) از سهمیهٔ {{ Display::number($quota['quota']) }} پیامک در ماه. @if ($quota['over']) بیرون از سهمیه @else ({{ Display::number((int) $quota['left']) }} پیامک مانده) @endif @else بی‌سهمیه @endif

کد ورود، فراموشی رمز و رمز اولیه هیچ‌وقت از سهمیه کم نمی‌شوند و هرگز به خاطر سهمیه نمی‌ایستند. بیرون از سهمیه فقط هشدار است؛ هیچ پیامکی بسته نمی‌شود.

@csrf
برای «بی‌سهمیه» خالی بگذارید. @error('sms_quota')

{{ $message }}

@enderror

حساب مدیر

@if ($admin)
نام کاربری
{{ $admin->username }}
موبایل
@csrf
@else

این فروشنده حساب مدیر ندارد.

@endif
@unless ($seller->isPurged())

تعلیق

@if ($seller->isActive())

تعلیق کلید سخت ماست: مدیر دیگر وارد نمی‌شود و کد ورود هم نمی‌گیرد، و همکاران «در دسترس نیست» می‌بینند. برای پایان اشتراک به آن نیازی نیست — آن خودش سر وقت بسته می‌شود.

@csrf
@error('suspend_reason')

{{ $message }}

@enderror
@else
@csrf
@endif

پاک کردن دادهٔ فروشنده

@if ($subscription->purgeable()) @if ($damage !== null)

پاک می‌شود: @foreach ($damage['rows'] as $table => $n) {{ \App\Subscriptions\SellerPurge::word($table) }} {{ $n === null ? '؟' : Display::number($n) }}@if (!$loop->last)، @endif @endforeach

@unless ($damage['reachable'])

پایگاه این فروشنده خوانده نشد، پس شمار ردیف‌ها معلوم نیست. صفحهٔ پاک کردن دوباره می‌سنجد.

@endunless @endif
دیدن دقیق و پاک کردن
@else

@if ($subscription->endsAt() === null) این اشتراک تاریخ پایان ندارد، پس پنجرهٔ نگه‌داری شروع نشده و دادهٔ آن پاک نمی‌شود. @else تا {{ Display::date($subscription->purgeableAt()) }} ({{ Display::number(max(0, (int) $subscription->daysUntilPurge())) }} روز دیگر) دادهٔ این فروشنده پاک نمی‌شود. دکمه‌ای هم نیست و درخواست مستقیم هم در سرور رد می‌شود. @endif

@endif
@endunless
برگشت به کنسول
@endsection