352 lines
No EOL
19 KiB
PHP
352 lines
No EOL
19 KiB
PHP
<div class="card">
|
|
<!-- Info -->
|
|
<div class="card-body pb-1">
|
|
@if($isAdmin)
|
|
<div class="row">
|
|
<div class="col-md-3 mb-3">
|
|
<div class="text-muted small">{{ __('E-Mail') }}</div>
|
|
@if($shopping_user->faker_mail)
|
|
-
|
|
@else
|
|
{{ $shopping_user->billing_email }}
|
|
@endif
|
|
</div>
|
|
<div class="col-md-3 mb-3">
|
|
<div class="text-muted small">{{ __('customer.customer_data') }}</div>
|
|
{{$shopping_user->number}}
|
|
</div>
|
|
<div class="col-md-3 mb-3">
|
|
<div class="text-muted small">{{ __('customer.date') }}</div>
|
|
{{$shopping_user->created_at->format("d.m.Y H:i")}}
|
|
</div>
|
|
<div class="col-md-3 mb-3">
|
|
<a class="btn btn-sm btn-secondary mt-2" href="{{route('admin_customer_edit', [$shopping_user->id])}}">{{ __('customer.edit_customer_data') }}</a>
|
|
<a class="btn btn-sm btn-danger mt-2" href="{{route('admin_customer_delete', [$shopping_user->id])}}" onclick="return confirm('{{ __('customer.delete_customer_confirm') }}')">{{ __('customer.delete_customer') }}</a>
|
|
</div>
|
|
</div>
|
|
@else
|
|
<div class="row">
|
|
<div class="col-md-3 mb-3">
|
|
<div class="text-muted small">{{ __('E-Mail') }}</div>
|
|
@if($shopping_user->faker_mail)
|
|
-
|
|
@else
|
|
{{ $shopping_user->billing_email }}
|
|
@endif
|
|
</div>
|
|
<div class="col-md-3 mb-3">
|
|
<div class="text-muted small">{{ __('customer.customer_data') }}</div>
|
|
{{$shopping_user->number}}
|
|
</div>
|
|
<div class="col-md-3 mb-3">
|
|
<div class="text-muted small">{{ __('customer.created') }}</div>
|
|
{{$shopping_user->firstEntryByNumber()->created_at->format("d.m.Y H:i")}}
|
|
</div>
|
|
<div class="col-md-3 mb-3">
|
|
|
|
@if(!$shopping_user->is_like)
|
|
<a class="btn btn-sm btn-secondary mt-2" href="{{route('user_customer_edit', [$shopping_user->id])}}">{{ __('customer.edit_customer_data') }}</a>
|
|
@endif
|
|
</div>
|
|
|
|
</div>
|
|
@endif
|
|
</div>
|
|
<hr class="m-0">
|
|
<!-- / Info -->
|
|
<!-- Member -->
|
|
<div class="card-body pb-1">
|
|
<div class="row">
|
|
@if($isAdmin)
|
|
<div class="col-md-6 mb-3">
|
|
@if(isset($change_member_error) && $change_member_error)
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<div class="alert alert-danger p-2">
|
|
<ul>
|
|
<li>{{ $change_member_error }}</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endif
|
|
<div class="text-muted small">{{ __('customer.assigned_counsellor') }} </div>
|
|
@if($shopping_user->is_like)
|
|
<button type="button" class="btn btn-xs btn-outline-info" data-toggle="modal" data-target="#modals-load-content"
|
|
data-id="{{$shopping_user->id}}"
|
|
data-action="shopping-user-is-like-member"
|
|
data-back="{{route('admin_customer_detail', [$shopping_user->id])}}"
|
|
data-modal="modal-xl"
|
|
data-route="{{route('modal_load')}}"><span class="fa fa-edit"></span> {{ __('customer.counsellor_allocate') }} </button>
|
|
@else
|
|
@if($shopping_user->member)
|
|
<a class="btn btn-xs btn-outline-primary" href="{{route('admin_lead_edit', [$shopping_user->member->id])}}"><i class="ion ion-ios-contacts"></i></a>
|
|
{{$shopping_user->member->getFullName()}} <span class="text-muted">#{{$shopping_user->member->number}}</span>
|
|
@endif
|
|
<button type="button" class="btn btn-xs btn-outline-secondary" data-toggle="modal" data-target="#modals-load-content"
|
|
data-id="{{ $shopping_user->id }}"
|
|
data-action="shopping-user-change-member"
|
|
data-view="customer"
|
|
data-route="{{ route('modal_load') }}"><span class="fa fa-edit"></span></button>
|
|
@endif
|
|
</div>
|
|
<div class="col-md-3 mb-3">
|
|
<div class="text-muted small">{{ __('customer.about_shop') }} </div>
|
|
@if($shopping_user->shopping_order && $shopping_user->shopping_order->user_shop)
|
|
@if($shopping_user->shopping_order->user_shop->user && $shopping_user->shopping_order->user_shop->user->isActive() && $shopping_user->shopping_order->user_shop->user->isActiveShop())
|
|
<a href="{{$shopping_user->shopping_order->user_shop->getSubdomain(false)}}" class="badge badge-success" target="_blank">{{$shopping_user->shopping_order->user_shop->getSubdomain(false)}}</a>
|
|
@else
|
|
<span class="badge badge-danger" target="_blank">{{$shopping_user->shopping_order->user_shop->getSubdomain(false)}}</span>
|
|
@endif
|
|
@endif
|
|
</div>
|
|
<div class="col-md-3 mb-3">
|
|
<div class="text-muted small">{{ __('customer.is_counsellor') }} </div>
|
|
@if($shopping_user->auth_user)
|
|
<span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>
|
|
<a class="btn btn-xs btn-outline-primary" href="{{route('admin_lead_edit', [$shopping_user->auth_user->id])}}"><i class="ion ion-ios-contacts"></i></a>
|
|
{{$shopping_user->auth_user->getFullName()}} <span class="text-muted">#{{$shopping_user->auth_user->number}}</span>
|
|
@else
|
|
<span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>
|
|
@endif
|
|
</div>
|
|
@else
|
|
<div class="col-md-6 mb-3">
|
|
{{--
|
|
@if(!$shopping_user->is_like)
|
|
<a href="{{ route('user_order_my_delivery', ['ot', $shopping_user->id]) }}" class="btn btn-sm btn-secondary mt-2">
|
|
<span class="fa fa-shopping-cart"></span> Bestellung für diesen Kunden aufgeben
|
|
</a>
|
|
@endif
|
|
--}}
|
|
</div>
|
|
<div class="col-md-6 mb-3">
|
|
<div class="text-muted small">{{ __('customer.client_sovereignty') }}</div>
|
|
@if($shopping_user->is_like)
|
|
<span class="badge badge-pill badge-warning"><i class="fa fa-clock"></i> {{ __('customer.under_review') }}</span>
|
|
@else
|
|
<span class="badge badge-pill badge-success"><i class="fa fa-check-circle"></i> {{ __('customer.assigned') }}</span>
|
|
@endif
|
|
|
|
</div>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
<hr class="m-0">
|
|
<!-- / Member -->
|
|
|
|
<!-- Billing -->
|
|
@include('admin.customer._customer_detail')
|
|
|
|
<hr class="m-0">
|
|
<div class="card-body">
|
|
<h6 class="small font-weight-semibold">
|
|
Kunde
|
|
</h6>
|
|
<div class="row">
|
|
<div class="col-md-12 mb-3">
|
|
@if($shopping_user->has_buyed)
|
|
<span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span> {{ __('customer.customer_has_already_purchased') }}
|
|
@else
|
|
<span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span> {{ __('customer.customer_has_not_yet_purchased') }}
|
|
@endif
|
|
</div>
|
|
<div class="col-md-12 mb-3">
|
|
@if($shopping_user->subscribed)
|
|
<span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span> {{ __('customer.customer_is_subscribed_to_newsletter') }}
|
|
@else
|
|
<span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span> {{ __('customer.customer_is_not_subscribed_to_newsletter') }}
|
|
@endif
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<hr class="m-0">
|
|
<div class="card-body">
|
|
<h6 class="small font-weight-semibold">
|
|
{{ __('Comments') }}
|
|
</h6>
|
|
<div class="row">
|
|
<div class="col-md-12 mb-3">
|
|
{!! nl2br($shopping_user->remarks) !!}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<hr class="m-0">
|
|
<!-- / Shipping -->
|
|
@if($isAdmin)
|
|
<!-- Order -->
|
|
<div class="card-body">
|
|
<h6 class="small font-weight-semibold">
|
|
{{ __('tables.order') }}
|
|
</h6>
|
|
<div class="table-responsive">
|
|
<table class="table table-bordered m-0" style="min-width:550px;">
|
|
<tbody>
|
|
<tr>
|
|
<th>{{ __('tables.product') }}</th>
|
|
<th>{{ __('tables.quantity') }}</th>
|
|
<th>{{ __('tables.price') }}</th>
|
|
</tr>
|
|
@if($shopping_user->shopping_order)
|
|
@foreach($shopping_user->shopping_order->shopping_order_items as $shopping_order_item)
|
|
<tr>
|
|
<td class="px-3 py-2">
|
|
<div class="media align-items-center">
|
|
@if($shopping_order_item->product->images)
|
|
@if($image = $shopping_order_item->product->images->first())
|
|
<img src="{{ route('product_image', [$image->slug]) }}" class="d-block ui-w-80 mr-4" alt>
|
|
@endif
|
|
@endif
|
|
<div class="media-body">
|
|
<a href="{{route('admin_product_edit', [$shopping_order_item->product->id])}}" class="d-block">{{ $shopping_order_item->product->getLang('name') }}
|
|
<span class="text-muted">#{{ $shopping_order_item->product->number }}</span></a>
|
|
<small>
|
|
<span class="text-muted">{{ __('order.content') }}: </span> {{ $shopping_order_item->product->contents }}<br>
|
|
<span class="text-muted">{{ __('order.weight') }}: </span> {{ $shopping_order_item->product->weight }} g<br>
|
|
<span class="text-muted">{{ __('order.points') }}: </span> {{ $shopping_order_item->product->getFormattedPoints() }}
|
|
</small>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<!-- Set column width -->
|
|
<td class="align-middle px-3 py-2" style="width: 66px;">
|
|
{{ $shopping_order_item->qty }}
|
|
</td>
|
|
<!-- Set column width -->
|
|
<td class="text-right font-weight-semibold align-middle px-3 py-2" style="width: 100px;">
|
|
{{ $shopping_order_item->getFormattedPrice() }} €
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
@endif
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<hr class="m-0">
|
|
|
|
<!-- / Payment -->
|
|
<div class="card-body">
|
|
<h6 class="small font-weight-semibold">
|
|
Zahlung
|
|
</h6>
|
|
<div class="table-responsive">
|
|
|
|
<table class="table table-bordered table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th style="min-width: 60px">#</th>
|
|
<th>{{ __('tables.payment_type') }}</th>
|
|
@if($isAdmin)<th>{{ __('tables.reference_number') }}</th>@endif
|
|
<th>{{ __('tables.total') }}</th>
|
|
<th>{{ __('tables.status') }}</th>
|
|
<th>{{ __('tables.date') }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@php($count=0)
|
|
@if(isset($shopping_user->shopping_order) && $shopping_user->shopping_order)
|
|
@foreach($shopping_user->shopping_order->shopping_payments as $shopping_payment)
|
|
@if(isset($shopping_payment) && $shopping_payment)
|
|
<tr>
|
|
<th scope="row">{{++$count}}</th>
|
|
<td>{{$shopping_payment->getPaymentType()}}</td>
|
|
@if($isAdmin)<td>{{$shopping_payment->reference}}</td>@endif
|
|
<td>{{$shopping_payment->getPaymentAmount()}}</td>
|
|
<td>{!! \App\Services\Payment::getShoppingPaymentBadge($shopping_payment) !!}</td>
|
|
<td>{{$shopping_payment->created_at->format("d.m.Y H:i")}}</td>
|
|
</tr>
|
|
@if($isAdmin && $shopping_payment->payment_transactions)
|
|
@php($ccount=0)
|
|
<tr>
|
|
<th scope="row" class="m-0">{{$count}}.{{++$ccount}}</th>
|
|
<td colspan="5" class="m-0 p-0">
|
|
<table class="table table-info table-borderless mb-0 small">
|
|
<thead>
|
|
<tr>
|
|
<th style="min-width: 80px">Request</th>
|
|
<th style="min-width: 80px">{{ __('tables.status') }}</th>
|
|
<th style="min-width: 200px">TX-Action</th>
|
|
<th style="min-width: 120px">{{ __('tables.date') }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($shopping_payment->payment_transactions as $payment_transaction)
|
|
<tr>
|
|
<td>{{$payment_transaction->request}}</td>
|
|
<td>{{$payment_transaction->status}}</td>
|
|
<td>{{$payment_transaction->txaction}} {{$payment_transaction->errormessage}}</td>
|
|
<td>{{$payment_transaction->created_at->format("d.m.Y H:i")}}</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
@endif
|
|
@endif
|
|
@endforeach
|
|
@endif
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
@endif
|
|
|
|
<div class="card-body">
|
|
<h6 class="small font-weight-semibold">
|
|
{{ __('tables.previous_orders') }}
|
|
</h6>
|
|
<div class="table-responsive">
|
|
<table class="table table-striped table-bordered m-0" style="min-width:550px;">
|
|
<tbody>
|
|
<tr>
|
|
<th>#</th>
|
|
<th>{{__('tables.date')}}</th>
|
|
<th>{{__('tables.amount')}}</th>
|
|
<th>{{__('tables.status')}}</th>
|
|
<th>{{__('tables.shipping')}}</th>
|
|
<th>{{__('tables.art')}}</th>
|
|
</tr>
|
|
@if($shopping_user->shopping_order)
|
|
@forelse($shopping_user->getAllOrdersByMember() as $shopping_order)
|
|
<tr>
|
|
<td>
|
|
@if($isAdmin)
|
|
<a href="{{ route('admin_sales_customers_detail', $shopping_order->id) }}"
|
|
class="btn icon-btn btn-sm btn-primary">
|
|
<span class="fa fa-edit"></span>
|
|
</a>
|
|
@else
|
|
<a href="{{ route('user_shop_order_detail', $shopping_order->id) }}"
|
|
class="btn icon-btn btn-sm btn-primary">
|
|
<span class="fa fa-edit"></span>
|
|
</a>
|
|
@endif
|
|
</td>
|
|
<td>{{ $shopping_order->created_at->format('d.m.Y') }}</td>
|
|
<td>
|
|
<span class="no-line-break">
|
|
{{ $shopping_order->getFormattedTotalShipping() }} €
|
|
</span>
|
|
</td>
|
|
<td>{!! \App\Services\Payment::getShoppingOrderBadge($shopping_order) !!}</td>
|
|
<td>
|
|
<span class="badge badge-pill badge-{{ $shopping_order->getShippedColor() }}">
|
|
{{ $shopping_order->getShippedType() }}
|
|
</span>
|
|
</td>
|
|
<td>{!! \App\Services\Payment::getPaymentForBadge($shopping_order) !!}</td>
|
|
</tr>
|
|
@empty
|
|
<tr>
|
|
<td colspan="6" class="text-center">{{ __('order.no_orders_found') }}</td>
|
|
</tr>
|
|
@endforelse
|
|
@endif
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<hr class="m-0">
|
|
</div> |