{{-- ===================================================== Etebarit - by Gisoo Web Solutions ------------------------------------------------------ Gisoo.net ------------------------------------------------------ Copyright (c) 2026 Gisoo Web Solutions ===================================================== This code is protected by copyright ===================================================== File: index.blade.php ------------------------------------------------------ Use: The merchant "My Shop" page: shop banner + wallet, the three sales counters, the sales table with the merchant-fee split, the shop identity form and the gateway credentials with rotation. ===================================================== --}} @extends('layouts.merchant') @section('title', __('front.shop.title')) @php use App\Support\Format; $percent = Format::percentFromBp($shop->fee_percent); @endphp @section('breadcrumb') @endsection @section('page') {{-- ===== Shop banner ===== --}}
@if ($shop->logo_path) {{ $shop->name }} @else @endif

{{ $shop->name }}

{{ __('front.shop.status_active') }}
{{-- Latin slug reads LTR, but the line sits right-aligned like the rest of the RTL banner. --}}
{{ $shop->slug }} • {{ __('front.shop.member_since') }} {{ Format::persianDigits(Format::jalali($shop->created_at, 'F Y')) }}
{{-- Tap the balance to open the full shop wallet (earnings + settlement). --}}
{{ __('front.shop.wallet_balance') }}
{{-- Amount first, then the unit (RTL reading order). --}}
@toman($walletBalance) {{ __('front.shop.toman') }}
{{-- ===== KPIs ===== --}}
@php $kpis = [ ['key' => 'monthly_sales', 'value' => $monthlySales, 'icon' => '', 'bg' => 'bg-secondary-50 text-secondary-500', 'money' => 'text-ink'], ['key' => 'settled', 'value' => $settledTotal, 'icon' => '', 'bg' => 'bg-[#e7f7ee] text-green-600', 'money' => 'text-green-600'], ]; @endphp @foreach ($kpis as $kpi)
{!! $kpi['icon'] !!} {{ __('front.shop.kpis.'.$kpi['key']) }}
@toman($kpi['value']) {{ __('front.shop.toman') }}
@endforeach
{{ __('front.shop.kpis.customers') }}
@fa($customers)
{{-- ===== Recent orders ===== --}}

{{ __('front.shop.recent_orders.title') }}

{{ __('front.shop.recent_orders.subtitle') }}
{{ __('front.shop.recent_orders.see_all') }}
@forelse ($orders as $order) @php $paid = $order->status === \App\Models\Order::STATUS_PAID; @endphp @empty @endforelse
{{ __('front.shop.orders.order') }} {{ __('front.shop.orders.customer') }} {{ __('front.shop.orders.total') }} {{ __('front.shop.orders.time') }} {{ __('front.shop.orders.status') }} {{ __('front.shop.orders.actions') }}
{{ $order->code }} {{ $order->user?->fullName() ?? '—' }} @toman($order->amount) {{ __('front.shop.orders.toman') }} @jalaliDateTime($order->paid_at ?? $order->created_at) $paid, 'bg-[#fff5e6] text-amber-600' => $order->status === \App\Models\Order::STATUS_PENDING, 'bg-secondary-50 text-secondary-500' => in_array($order->status, [\App\Models\Order::STATUS_FAILED, \App\Models\Order::STATUS_EXPIRED], true), ])>{{ __('front.shop.sales.statuses.'.$order->status) }}
{{ __('front.shop.recent_orders.empty') }}
{{-- The merchant sees their own fee (a regular user never does). --}}
{{ __('front.shop.fee_note', [ 'percent' => Format::persianDigits($percent), 'cap' => Format::persianDigits(Format::tomanFa($shop->fee_cap)), ]) }}
{{-- ===== Shop info + API keys ===== --}}
{{-- Shop identity form --}}

{{ __('front.shop.info.title') }}

@csrf @method('PUT') {{-- Tabs: the form is one submit; tabs only group a long form. --}}
@foreach (['identity', 'address', 'contact'] as $t) @endforeach
{{-- Identity panel --}}
{{-- Shop logo: square with slightly rounded corners; cropped to 400x400 server-side. --}}

{{ __('front.shop.info.logo_hint') }}

$slugLocked, 'border-[#e3e1ec] bg-[#fbfbfd] focus:border-secondary-500 focus:bg-white' => ! $slugLocked, ])>

{{ $slugLocked ? __('front.shop.info.slug_locked') : __('front.shop.info.slug_editable_hint') }}

{{-- Website address: a gateway is only granted for a reviewed site with a valid e-namad seal, so a new/changed address goes to review. The https:// prefix is fixed; the input takes only the domain, forced to lowercase ASCII (no Persian, no uppercase). --}} @php $wsState = $shop->website_status ?: 'none'; @endphp
https:// websitePending()) placeholder="{{ __('front.shop.info.website_placeholder') }}" class="min-w-0 flex-1 bg-transparent px-3.5 py-3 text-left text-[13.5px] outline-none disabled:cursor-not-allowed disabled:opacity-60">
{{-- The full https:// URL actually submitted (empty when blank). --}} {{-- Live format note as the merchant types. --}}

{{ __('front.shop.info.website_invalid') }}

{{ __('front.shop.info.website_valid') }}

{{-- Review status the operator left the site in; the icon draws the eye and actionable states (not entered / rejected) pulse. --}} @php $wsMeta = [ 'none' => ['wrap' => 'border-[#e3e1ec] bg-[#faf9fd]', 'chip' => 'bg-[#eceaf3] text-ink-muted', 'title' => 'text-ink-soft', 'pulse' => true, 'icon' => ''], 'pending' => ['wrap' => 'border-[#ffe1ad] bg-[#fff8ee]', 'chip' => 'bg-amber-100 text-amber-600', 'title' => 'text-amber-700', 'pulse' => false, 'icon' => ''], 'approved' => ['wrap' => 'border-[#bfe8cf] bg-[#f0fbf4]', 'chip' => 'bg-green-100 text-green-600', 'title' => 'text-green-700', 'pulse' => false, 'icon' => ''], 'rejected' => ['wrap' => 'border-[#f6ccd1] bg-secondary-50', 'chip' => 'bg-secondary-100 text-secondary-500', 'title' => 'text-secondary-600', 'pulse' => true, 'icon' => ''], ][$wsState]; @endphp
$wsMeta['pulse']])> {!! $wsMeta['icon'] !!}
{{ __('front.shop.info.website_statuses.'.$wsState) }}
@switch($wsState) @case('pending') {{ __('front.shop.info.website_pending_hint') }} @break @case('approved') {{ __('front.shop.info.website_approved_hint') }} @break @case('rejected') {{ __('front.shop.info.website_rejected_hint', ['reason' => $shop->website_reject_reason ?: '—']) }} @break @default {{ __('front.shop.info.website_hint') }} @endswitch
{{-- Address panel --}}

{{ __('front.shop.info.address_hint') }}

{{-- Contact panel --}}

{{ __('front.shop.info.support_phone_hint') }}

{{ __('front.shop.info.support_phone_valid') }}

{{ __('front.shop.info.support_phone_invalid') }}

{{-- Social links, shown on the shop's public payment page. --}}
@foreach (\App\Models\Shop::SOCIAL_PLATFORMS as $platform)
{{ __("front.shop.info.social.$platform.label") }} socials, $platform)) }}" dir="ltr" inputmode="url" placeholder="{{ __("front.shop.info.social.$platform.placeholder") }}" class="w-full rounded-xl border-[1.5px] border-[#e3e1ec] bg-[#fbfbfd] px-3.5 py-2.5 text-left text-[13px] outline-none transition focus:border-secondary-500 focus:bg-white placeholder:text-ink-faint">
@endforeach

{{ __('front.shop.info.socials_hint') }}

{{-- Save applies to the whole form regardless of the open tab. --}}
{{-- Gateway credentials --}}

{{ __('front.shop.keys.title') }}

{{ __('front.shop.keys.docs_link') }}

{{ __('front.shop.keys.hint') }}

{{-- How the shop plugs into the network, animated. --}}
{{-- API key --}}
{{ $shop->api_key }}
{{-- Secret key --}}

{{ __('front.shop.keys.regen_warning') }}

@csrf
@endsection