@extends("front/layout.master") @php $sellerac = App\Store::where('user_id','=', $user->id)->first(); @endphp @section('title', __('staticwords.ManageAccount') . ' | ') @section('body')
{{-- Profile picture & basic info --}}

{{ __('staticwords.MyAccount') }}

@csrf {{-- Profile picture --}}
@if($user->image && file_exists(public_path() . '/images/user/' . $user->image)) @else @endif

{{-- Personal Information --}}

{{ __('staticwords.PersonalInformation') }}

@error('name')

{{ $message }}

@enderror
@error('email')

{{ $message }}

@enderror
{{-- Mobile/Phone --}}

{{ __('staticwords.MobilePhone') }}

@error('mobile')

{{ $message }}

@enderror
{{-- Address --}}

{{ __('Address') }}

{{-- ============= DANGER ZONE — DELETE ACCOUNT ============= --}}

{{ __('Delete my account') }}

@if($user->role_id === 'a') {{-- Admin cannot self-delete — show the section so they see what customers see, but disable the action. --}}

{{ __('Administrators cannot delete their own account from this panel. Ask another administrator to remove your account from the Users section.') }}

@elseif($user->deletion_requested)

{{ __('Your account-deletion request was sent on') }} {{ \Illuminate\Support\Carbon::parse($user->deletion_requested_at)->format('d M Y, h:i A') }}. {{ __('An administrator will review and process it. You can cancel any time before approval.') }}

@if($user->deletion_reason)

{{ __('Reason given:') }} {{ $user->deletion_reason }}

@endif
@csrf
@else

{{ __('Once your request is approved by an administrator your account will be permanently deleted. Past orders will be retained for legal and accounting reasons but personal information will be removed. This action cannot be undone.') }}

@endif
{{-- Delete confirmation modal — only rendered for non-admin users --}} @if($user->role_id !== 'a') @endif {{-- Change Password Modal. The canonical modal lives in the partial below (posts to pass.update / CheckoutController@changepass). A broken inline duplicate used to sit here posting to the non-existent /change_password route with a `current_password` field — it shared id="myModal" with the partial and, being first in the DOM, shadowed it, so submitting 404'd. Removed; the working partial is the single source of truth. --}} @include('front.partials.change-password-modal') @endsection @section('script')