@extends('admin.layout') @section('content') @php $rtl = App\Language::where('code', App::getLocale())->first()->rtl == true ? 'rtl' : 'ltr'; @endphp

{{ translate('Customers') }}

{{ $customer->name }}

{{ translate('User ID') }}: # {{ $customer->id }}
{{ translate('Phone') }}: # {{ $customer->phone }}

{{ translate('Last login') }}: {{ $customer->last_login }}

{{--
--}}
{{ translate('Balance') }} : {{ $customer->balance }} {{ currency_sympol()['name'] }}

{{ translate('Customer data') }}

{!! Form::open(['method' => 'Patch', 'action' => ['Admin\CustomerController@update', $customer->id], 'files' => true, 'class' => 'form_to_submit']) !!}
{!! Form::text('f_name', $customer->f_name, ['class' => 'form-control', 'placeholder' => translate('First name')]) !!}
@error('f_name')
{{ $message }}
@enderror
{!! Form::text('l_name', $customer->l_name, ['class' => 'form-control', 'placeholder' => translate('Last name')]) !!}
@error('l_name')
{{ $message }}
@enderror
{!! Form::email('email', $customer->email, ['class' => 'form-control', 'placeholder' => translate('Email')]) !!}
@error('email')
{{ $message }}
@enderror
{!! Form::text('phone', $customer->phone, ['class' => 'form-control', 'placeholder' => translate('Phone')]) !!}
@error('phone')
{{ $message }}
@enderror
@error('password')
{{ $message }}
@enderror
{{ translate('Gender') }}
gender == 'male' ? 'checked' : '' }} />
gender == 'female' ? 'checked' : '' }} />
{!! Form::text('fax', $customer->fax, ['class' => 'form-control', 'placeholder' => translate('Fax')]) !!}
@error('fax')
{{ $message }}
@enderror
{!! Form::date('birth_date', $customer->birth_date, ['class' => 'form-control', 'placeholder' => translate('birth_date')]) !!}
@error('birth_date')
{{ $message }}
@enderror

{!! Form::checkbox('active', null, $customer->active, ['id' => 'Checkbox_1']) !!}
{!! Form::checkbox('subscribtion_list', null, $customer->subscribtion_list, ['id' => 'Checkbox_2']) !!}



{!! Form::Close() !!}

{{ translate('Addresses') }}

@forelse ($customer->orders as $key => $order) @empty

{{ translate('Our records indicate that this user does not have any previous requests') }}

{{ translate('Do you have any request or inquiries about e-marketing') }}

{{ translate('Marketing expert advice') }}

@endforelse
{{ translate('view') }} # {{ translate('Order Code') }} {{ translate('Delivery Status') }} {{ translate('Payment Method') }} {{ translate('Payment Status') }} {{ translate('Total amount') }}
{{ $order->id }} {{ $order->code }} @if ($order->delivery_status == 'pending')
{{ translate($order->delivery_status) }}
@elseif($order->delivery_status == 'on_review')
{{ translate($order->delivery_status) }}
@elseif($order->delivery_status == 'ready_to_delever')
{{ translate($order->delivery_status) }}
@elseif($order->delivery_status == 'on_delivery')
{{ translate($order->delivery_status) }}
@elseif($order->delivery_status == 'delivered')
{{ translate($order->delivery_status) }}
@endif
{{ translate($order->payment_type) }} @if ($order->payment_status == 1) {{ translate('Paid') }} @else {{ translate('UnPaid') }} @endif {{ single_price($order->total_price) }} {{ currency_sympol()['symbol'] }}
{!! Form::open(['method' => 'post', 'action' => 'Admin\WalletController@store', 'files' => true, 'id' => 'wallet_form']) !!}
{!! Form::hidden('customer_id', $customer->id) !!} {!! Form::text('payment_details', null, ['id' => 'payment_details', 'required' => 'required', 'class' => 'form-control', 'placeholder' => translate('Description')]) !!}
{!! Form::number('amount', null, ['id' => 'amount', 'required' => 'required', 'class' => 'form-control', 'placeholder' => translate('Amount')]) !!}
{!! Form::Close() !!}

{{ translate('Internal notes') }}

{{ translate('Internal notes is only available to store managers and is never shown to customers') }}

{!! Form::textarea('note', null, ['id' => 'note_id', 'class' => 'form-control', 'placeholder' => translate('Write your comments here')]) !!}



@foreach ($customer->notes as $oneNote)
{{ date('Y-m-d H:i', strtotime($oneNote->created_at)) }}

{{ $oneNote->note }}




@endforeach
@endsection @section('modal') @endsection @section('script') @endsection