@extends('dashboard.layout.layout') @section('content')
{!! Form::textarea('', $client->is_ban ? $client->ban_reason : null, ['class' => 'form-control', 'readonly']) !!}
{{-- order --}}
{!! $orders->links() !!}
@foreach ($orders as $order) @endforeach
# {!! trans('dashboard.order.order_number') !!} {!! trans('dashboard.client.client') !!} {!! trans('dashboard.order.order_type') !!} {!! trans('dashboard.order.order_status') !!} {!! trans('dashboard.order.total_price') !!} {!! trans('dashboard.general.added_date') !!}
{{ $loop->iteration }} {{ $order->id }} {{ optional($order->client)->fullname }} {{ trans('dashboard.order.order_types.' . $order->order_type) }} {!! trans('dashboard.order.statuses.' . $order->order_status) !!}
{{ $order->total_price }}
{{ $order->created_at->format('Y-m-d') }}
{{ trans('dashboard.user.health_status') }}

{!! trans('dashboard.user.admin_accept_health_status') !!}

@if ($client->health_certificate_type == 'image') @elseif ($client->health_certificate_type == 'file') {{ str_after($client->health_certificate, '___file_') }} @endif
{{-- wallet --}}
{{-- financial record transactions --}}
{!! $financial_record_transactions->links() !!}
{{-- --}} @foreach ($financial_record_transactions as $financial_record_transaction) {{-- --}} {{-- --}} @endforeach
# {!! trans('dashboard.financial_record_transaction.transaction_type') !!} {!! trans('dashboard.financial_record_transaction.status') !!} {!! trans('dashboard.financial_record_transaction.amount') !!} {!! trans('dashboard.financial_record_transaction.total_wallet_before') !!} {!! trans('dashboard.financial_record_transaction.total_wallet_after') !!} {!! trans('dashboard.financial_record_transaction.main_wallet_before') !!} {!! trans('dashboard.financial_record_transaction.main_wallet_after') !!} {!! trans('dashboard.financial_record_transaction.dept_wallet_before') !!} {!! trans('dashboard.financial_record_transaction.dept_wallet_after') !!} {!! trans('dashboard.financial_record_transaction.free_balance_before') !!} {!! trans('dashboard.financial_record_transaction.free_balance_after') !!} {!! trans('dashboard.financial_record_transaction.temp_wallet_before') !!} {!! trans('dashboard.financial_record_transaction.temp_wallet_after') !!} {!! trans('dashboard.financial_record_transaction.point_wallet_before') !!} {!! trans('dashboard.financial_record_transaction.point_wallet_after') !!} {!! trans('dashboard.financial_record_transaction.teps_before') !!} {!! trans('dashboard.financial_record_transaction.teps_after') !!} {!! trans('dashboard.financial_record_transaction.transaction_id') !!} {!! trans('dashboard.financial_record_transaction.iban') !!}{!! trans('dashboard.financial_record_transaction.model_type') !!}{!! trans('dashboard.financial_record_transaction.second_user_id') !!} {!! trans('dashboard.general.added_date') !!}
{{ $loop->iteration }}
{{ trans('dashboard.financial_record_transaction.transaction_types.' . $financial_record_transaction->transaction_type) }}
{{ $financial_record_transaction->status != null ? trans("dashboard.financial_record_transaction.statuses.$financial_record_transaction->status") : trans('dashboard.general.deleted_item') }} {{ $financial_record_transaction->amount }} {{ $financial_record_transaction->total_wallet_before }} {{ $financial_record_transaction->total_wallet_after }} {{ $financial_record_transaction->main_wallet_before }} {{ $financial_record_transaction->main_wallet_after }} {{ $financial_record_transaction->dept_wallet_before }} {{ $financial_record_transaction->dept_wallet_after }} {{ $financial_record_transaction->free_balance_before }} {{ $financial_record_transaction->free_balance_after }} {{ $financial_record_transaction->temp_wallet_before }} {{ $financial_record_transaction->temp_wallet_after }} {{ $financial_record_transaction->point_wallet_before }} {{ $financial_record_transaction->point_wallet_after }} {{ $financial_record_transaction->teps_before }} {{ $financial_record_transaction->teps_after }}{{ $financial_record_transaction->model_type }}{{ $financial_record_transaction->id != null ? $financial_record_transaction->id : trans('dashboard.general.deleted_item') }} {{ $financial_record_transaction->iban != null ? $financial_record_transaction->iban : trans('dashboard.general.deleted_item') }} @if ($financial_record_transaction->user && $financial_record_transaction->user_id != $client->id && !in_array(@$financial_record_transaction->user->user_type, ['admin', 'superadmin'])) {{ optional($financial_record_transaction->user)->fullname }} @else {{ optional($financial_record_transaction->user)->fullname }} @endif @if ($financial_record_transaction->second_user_id != $client->id && !in_array(@$financial_record_transaction->secondUser->user_type, ['admin', 'superadmin', null])) {{ optional($financial_record_transaction->secondUser)->fullname }} @else {{ optional($financial_record_transaction->secondUser)->fullname ?? trans('dashboard.financial_record_transaction.system') }} @endif
{{ optional($financial_record_transaction->created_at)->format('Y-m-d') }}
{!! $financial_record_transactions->links() !!}
{{-- transfer requests tab --}}
{!! $transfered_from_client->links() !!}
@foreach ($transfered_from_client as $transfer) @endforeach
# {!! trans('dashboard.transfer.amount') !!} {!! trans('dashboard.transfer.transfer_status') !!} {!! trans('dashboard.transfer.transaction_number') !!} {!! trans('dashboard.transfer.type') !!} {!! trans('dashboard.transfer.transfer_to') !!} {!! trans('dashboard.general.added_date') !!}
{{ $loop->iteration }} {{ $transfer->amount }} {{ $transfer->status ? trans("dashboard.transfer.statuses.$transfer->status") : trans('dashboard.general.deleted_item') }} {{ $transfer->id }}
{{ trans('dashboard.transfer.transaction_types.' . $transfer->transaction_type) }}
@if (!in_array(@$transfer->secondUser->user_type, ['admin', 'superadmin', null])) {{ optional($transfer->secondUser)->fullname }} @else {{ optional($transfer->secondUser)->fullname ?? trans('dashboard.financial_record_transaction.system') }} @endif
{{ $transfer->created_at->format('Y-m-d') }}
{!! $transfered_to_client->links() !!}
@foreach ($transfered_to_client as $transfer_to) @endforeach
# {!! trans('dashboard.transfer.amount') !!} {!! trans('dashboard.transfer.transfer_status') !!} {!! trans('dashboard.transfer.transaction_number') !!} {!! trans('dashboard.transfer.type') !!} {!! trans('dashboard.transfer.transfer_to') !!} {!! trans('dashboard.general.added_date') !!}
{{ $loop->iteration }} {{ $transfer_to->amount }} {{ $transfer_to->status ? trans("dashboard.transfer.statuses.$transfer_to->status") : trans('dashboard.general.deleted_item') }} {{ $transfer_to->id }}
{{ trans('dashboard.transfer.transaction_types.' . $transfer_to->transaction_type) }}
@if (!in_array(@$transfer_to->secondUser->user_type, ['admin', 'superadmin', null])) {{ optional($transfer_to->secondUser)->fullname }} @else {{ optional($transfer_to->secondUser)->fullname ?? trans('dashboard.financial_record_transaction.system') }} @endif
{{ $transfer_to->created_at->format('Y-m-d') }}
{{ trans('dashboard.user.financial_record') }}
{!! trans('dashboard.financial_record.finished_orders', ['count' => $finished_orders->count(), 'total_price' => $finished_orders->sum('total_price')]) !!} {!! trans('dashboard.financial_record.cash_finished_orders', ['count' => $finished_orders->where('pay_type', 'cash')->count(), 'total_price' => $finished_orders->where('pay_type', 'cash')->sum('total_price')]) !!} {!! trans('dashboard.financial_record.wallet_finished_orders', ['count' => $finished_orders->where('pay_type', 'wallet')->count(), 'total_price' => $finished_orders->where('pay_type', 'wallet')->sum('total_price')]) !!} {!! trans('dashboard.financial_record.balance_lucky_box', [ 'count' => $client->luckyBoxes->where('gift_type', 'balance')->count(), 'total_price' => $client->luckyBoxes()->where('gift_type', 'balance')->sum('balance'), ]) !!}
{!! trans('dashboard.financial_record.points_lucky_box', [ 'count' => $client->luckyBoxes->where('gift_type', 'points')->count(), 'total_price' => $client->luckyBoxes()->where('gift_type', 'points')->sum('points'), ]) !!} {!! trans('dashboard.financial_record.balance_withdrawal', [ 'count' => $client->userFinanialRecordTransactions()->whereNotNull('bank_account_id')->where('transaction_type', 'withdrawal')->count(), 'total_price' => $client->userFinanialRecordTransactions()->whereNotNull('bank_account_id')->where('transaction_type', 'withdrawal')->transfered()->sum('amount'), ]) !!} {!! trans('dashboard.financial_record.balance_point_package', [ 'count' => $client->userFinanialRecordTransactions()->where(['transaction_type' => 'charge', 'model_type' => 'App\Models\PointPackage'])->count(), 'total_price' => $client->userFinanialRecordTransactions()->where(['transaction_type' => 'charge', 'model_type' => 'App\Models\PointPackage'])->sum('amount'), ]) !!}
{!! $points->links() !!}
@foreach ($points as $point) @endforeach
# {!! trans('dashboard.point.creator') !!} {!! trans('dashboard.point.amount') !!} {!! trans('dashboard.point.points') !!} {!! trans('dashboard.point.point_status') !!} {!! trans('dashboard.point.used_status') !!} {!! trans('dashboard.point.used_type') !!} {!! trans('dashboard.general.added_date') !!}
{{ $loop->iteration }} {{ optional($point->creator)->fullname }} {{ $point->amount }}
{{ $point->points }}
{{ trans('dashboard.point.point_statuses.' . $point->status) }} {{ trans('dashboard.point.used_statuses.' . $point->is_used) }} {{ trans('dashboard.point.reasons.' . $point->reason) }}
{{ $point->created_at->format('Y-m-d') }}
{!! $points->links() !!}
{{-- wallet transactions --}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{-- {!! $wallet_transactions->links() !!} --}} {{--
--}} {{--
--}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- @foreach ($wallet_transactions as $wallet_transaction) --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- @endforeach --}} {{-- --}} {{--
#{!! trans('dashboard.wallet_transaction.transaction_number') !!}{!! trans('dashboard.wallet_transaction.transfer_to') !!}{!! trans('dashboard.wallet_transaction.transfer_from') !!}{!! trans('dashboard.wallet_transaction.added_by') !!}{!! trans('dashboard.wallet_transaction.transaction_type') !!}{!! trans('dashboard.wallet_transaction.amount') !!}{!! trans('dashboard.wallet_transaction.from_user_wallet_before') !!}{!! trans('dashboard.wallet_transaction.from_user_wallet_after') !!}{!! trans('dashboard.wallet_transaction.to_user_wallet_before') !!}{!! trans('dashboard.wallet_transaction.to_user_wallet_after') !!}{!! trans('dashboard.wallet_transaction.transaction_date') !!}
{{ $loop->iteration }}{{ $wallet_transaction->id }} --}} {{-- @if ($wallet_transaction->transfer_to_id != $client->id && !in_array($wallet_transaction->transferTo->user_type, ['admin', 'superadmin'])) --}} {{-- --}} {{-- {{ optional($wallet_transaction->transferTo)->fullname }} --}} {{-- --}} {{-- @else --}} {{-- {{ optional($wallet_transaction->transferTo)->fullname }} --}} {{-- @endif --}} {{-- --}} {{-- @if ($wallet_transaction->transfer_from_id != $client->id && !in_array($wallet_transaction->transferFrom->user_type, ['admin', 'superadmin'])) --}} {{-- --}} {{-- {{ optional($wallet_transaction->transferFrom)->fullname }} --}} {{-- --}} {{-- @else --}} {{-- {{ optional($wallet_transaction->transferFrom)->fullname }} --}} {{-- @endif --}} {{-- --}} {{-- {{ optional($wallet_transaction->addedBy)->fullname ?? trans('dashboard.wallet_transaction.system') }} --}} {{-- --}} {{--
--}} {{-- {{ trans('dashboard.wallet_transaction.transaction_types.'.$wallet_transaction->transaction_type) }} --}} {{--
--}} {{--
--}} {{--
{{ $wallet_transaction->amount }}
--}} {{--
--}} {{--
{{ $wallet_transaction->from_user_wallet_before }}
--}} {{--
--}} {{--
{{ $wallet_transaction->from_user_wallet_after }}
--}} {{--
--}} {{--
{{ $wallet_transaction->to_user_wallet_before }}
--}} {{--
--}} {{--
{{ $wallet_transaction->to_user_wallet_after }}
--}} {{--
--}} {{--
{{ optional($wallet_transaction->created_at)->format("Y-m-d") }}
--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}}
# {!! trans('dashboard.report.number') !!} {!! trans('dashboard.report.reason') !!} {!! trans('dashboard.report.client') !!} {!! trans('dashboard.general.added_date') !!}
{!! $notifications->links() !!}
{{-- --}} @foreach ($notifications as $notification) @php $data_title = ''; if (isset($notification->data['title'])) { if (!is_array($notification->data['title'])) { $data_title = trans($notification->data['title']); } elseif (isset($notification->data['title'][1])) { $data_title = trans($notification->data['title'][0], $notification->data['title'][1]); } elseif (!isset($notification->data['title'][1])) { $data_title = trans($notification->data['title'][0]); } else { $data_title = ''; } } $body = ''; if (isset($notification->data['body'])) { if (!is_array($notification->data['body'])) { $body = trans($notification->data['body']); } elseif (isset($notification->data['body'][1])) { $body = trans($notification->data['body'][0], $notification->data['body'][1]); } elseif (!isset($notification->data['body'][1])) { $body = trans($notification->data['body'][0]); } else { $body = ''; } } @endphp {{-- --}} @endforeach
# {{ trans('dashboard.notification.notification') }} {{ trans('dashboard.notification.sender') }} {{ trans('dashboard.general.read_at') }} {{ trans('dashboard.general.added_date') }}
{{ $loop->iteration }}
{{ str_limit($body, 100, ' ...') }}
{!! isset($notification->data['sender']) ? json_decode($notification->data['sender'])->fullname : trans('dashboard.notification.not_found') !!}
@if ($notification->read_at)
{{ $notification->read_at->isoFormat('D MMMM , Y ( h:mm a )') }}
@else
@endif
{{ $notification->created_at->format('Y-m-d') }}
{!! $notifications->links() !!}

{!! trans('dashboard.user.wallet') !!}

{!! Form::text('total_wallet', $client->total_wallet, ['class' => 'form-control total_wallet','disabled', 'id' => 'total_wallet', 'placeholder' => trans('dashboard.user.total_wallet')]) !!}
@if (auth()->user()->hasPermissions('client', 'wallet'))
@endif
{!! Form::text('wallet', $client->wallet, ['class' => 'form-control main_wallet' , 'aria-describedby' => 'button-addon3', 'placeholder' => trans('dashboard.user.wallet_value')]) !!} @if (auth()->user()->hasPermissions('client', 'wallet'))
@endif
{!! Form::text('free_wallet_balance', optional($client->financialRecord)->free_balance, ['class' => 'form-control user_wallet free_balance' , 'aria-describedby' => 'button-addon2', 'placeholder' => trans('dashboard.user.free_wallet_balance')]) !!} @if (auth()->user()->hasPermissions('client', 'wallet'))
@endif
{!! trans('dashboard.client.other_clients') !!}
@forelse ($other_clients as $other_client)
{{ mb_substr($other_client->fullname, 0, 2, 'UTF-8') }}
@empty
{!! trans('dashboard.client.no_clients') !!}
@endforelse
@include('dashboard.layout.notify_modal') @include('dashboard.client.refuse_health_data_modal') @endsection @section('vendor_styles') @endsection @section('page_styles') @endsection @section('vendor_scripts') @endsection @section('page_scripts') {{-- --}} @endsection