first commit

This commit is contained in:
Kevin Adametz 2021-01-08 17:48:20 +01:00
commit 0baac018a2
1011 changed files with 145854 additions and 0 deletions

View file

@ -0,0 +1,242 @@
{!! Form::open(['url' => route('admin_sales_customers_detail', [$current->id]), 'class' => 'modal-content', 'enctype' => 'multipart/form-data']) !!}
<input type="hidden" name="action" value="{{$data['action']}}">
<input type="hidden" name="id" value="{{$data['id']}}">
<input type="hidden" name="back" value="{{$data['back']}}">
<div class="modal-header">
<h5 class="modal-title">
Der Kunde hat ggf. unter einer anderen Email-Adresse bestellt als sonst.
<span class="font-weight-light"> Bitte vor der Bearbeitung prüfen und dem richtigen Berater zuordnen.</span>
</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="row">
<div class="col-sm-6">
<p class="font-weight-bold">Die aktuelle Bestellung wurde getätigt von:</p>
<div class="bg-light p-3" style="border-radius: 6px">
<div class="row">
<div class="col-sm-6">
<p class="font-weight-bold">Rechnungsadresse:</p>
<p>
@if($current->billing_company)
Firma: {{ $current->billing_company }}<br>
@endif
{{ \App\Services\HTMLHelper::getSalutationLang($current->billing_salutation) }}
{{ $current->billing_firstname }}
<strong class="text-match">{{ $current->billing_lastname }}</strong><br>
{{ $current->billing_address }}
@if($current->billing_address_2)
/ {{ $current->billing_address_2 }}<br>
@else
<br>
@endif
<strong class="text-match">{{ $current->billing_zipcode }}</strong>
{{ $current->billing_city }}<br>
{{ $current->billing_email }}<br>
{{ $current->billing_phone }}<br>
{{ $current->billing_country->getLocated() }}
</p>
</div>
<div class="col-sm-6">
<p class="font-weight-bold">Lieferadresse:</p>
<p>
@if($current->same_as_billing)
{{__('email.checkout_mail_same_address')}}
@else
@if($current->shipping_company)
Firma: {{ $current->shipping_company }}<br>
@endif
{{ \App\Services\HTMLHelper::getSalutationLang($current->shipping_salutation) }}
{{ $current->shipping_firstname }}
{{ $current->shipping_lastname }}<br>
{{ $current->shipping_address }}
@if($current->shipping_address_2)
/ {{ $current->shipping_address_2 }}<br>
@else
<br>
@endif
{{ $current->shipping_zipcode }}
{{ $current->shipping_city }}<br>
{{ $current->shipping_email }}<br>
{{ $current->shipping_phone }}<br>
{{ $current->shipping_country->getLocated() }}
@endif
</p>
</div>
<div class="col-sm-12">
@if($current->member_id)
<input type="hidden" name="change_shopping_user" value="true">
<hr>
<p class="font-weight-bold">Zugeordneter Berater:</p>
<p>
<span class="text-muted">#{{$current->member->number}}</span><br>
{{$current->member->getFullName()}}<br>
{{$current->member->account->zipcode}} {{$current->member->account->city}}<br>
@if($current->member->shop)
@if($current->member->isActive() && $current->member->isActiveShop())
<a href="{{$current->member->shop->getSubdomain(false)}}" class="badge badge-success" target="_blank">{{$current->member->shop->getSubdomain(false)}}</a>
@else
<span class="badge badge-danger" target="_blank">{{$current->member->shop->getSubdomain(false)}}</span>
@endif
@else
Keinen Shop eingerichtet
@endif
<label class="custom-control custom-radio mt-3">
<input type="radio" class="custom-control-input" name="is_like_shopping_user_id" value="{{$current->id}}">
<span class="custom-control-label">Nein, das ist ein neuer Kunde, Berater <span class="text-muted">#{{$current->member->number}}</span> zuordnen</span>
</label>
</p>
@endif
<hr>
<p class="font-weight-bold">Bestellt im Shop:</p>
<p>
@if($current->shopping_order && $current->shopping_order->user_shop)
<span class="text-muted">#{{$current->shopping_order->user_shop->user->number}}</span><br>
{{$current->shopping_order->user_shop->user->getFullName()}}<br>
{{$current->shopping_order->user_shop->user->account->zipcode}} {{$current->shopping_order->user_shop->user->account->city}}<br>
@if($current->shopping_order->user_shop)
@if($current->shopping_order->user_shop->user->isActive() && $current->shopping_order->user_shop->user->isActiveShop())
<a href="{{$current->shopping_order->user_shop->getSubdomain(false)}}" class="badge badge-success" target="_blank">{{$current->shopping_order->user_shop->getSubdomain(false)}}</a>
@else
<span class="badge badge-danger" target="_blank">{{$current->shopping_order->user_shop->getSubdomain(false)}}</span>
@endif
@endif
@if(!$current->member_id)
<label class="custom-control custom-radio mt-3">
<input type="radio" class="custom-control-input" name="is_like_shopping_user_id" value="{{$current->id}}">
<span class="custom-control-label">Nein, das ist ein neuer Kunde, Berater <span class="text-muted">#{{$current->shopping_order->user_shop->user->number}}</span> zuordnen</span>
</label>
@endif
@else
Keiner Bestellung / Shop zugeordnet
@endif
</p>
</div>
</div>
</div>
</div>
<div class="col-sm-6">
<p class="font-weight-bold">Ist das vielleicht dieser Kunde?</p>
@foreach($possibles as $possible)
@if(isset($possible[0]))
@php($possible = $possible[0])
@endif
<div class="bg-light p-3 mb-3" style="border-radius: 6px">
<div class="row">
<div class="col-sm-6">
<p class="font-weight-bold">Rechnungsadresse:</p>
<p>
@if($possible->billing_company)
Firma: {{ $possible->billing_company }}<br>
@endif
{{ \App\Services\HTMLHelper::getSalutationLang($possible->billing_salutation) }}
{{ $possible->billing_firstname }}
<strong class="text-match">{{ $possible->billing_lastname }}</strong> <span class="text-muted">#{{$possible->number}}</span> <br>
{{ $possible->billing_address }}
@if($possible->billing_address_2)
/ {{ $possible->billing_address_2 }}<br>
@else
<br>
@endif
<strong class="text-match">{{ $possible->billing_zipcode }}</strong>
{{ $possible->billing_city }}<br>
<strong class="text-danger">{{ $possible->billing_email }}</strong><br>
{{ $possible->billing_phone }}<br>
{{ $possible->billing_country->getLocated() }}
</p>
</div>
<div class="col-sm-6">
<p class="font-weight-bold">Lieferadresse:</p>
<p>
@if($possible->same_as_billing)
{{__('email.checkout_mail_same_address')}}
@else
@if($possible->shipping_company)
Firma: {{ $possible->shipping_company }}<br>
@endif
{{ \App\Services\HTMLHelper::getSalutationLang($possible->shipping_salutation) }}
{{ $possible->shipping_firstname }}
{{ $possible->shipping_lastname }}<br>
{{ $possible->shipping_address }}
@if($possible->shipping_address_2)
/ {{ $possible->shipping_address_2 }}<br>
@else
<br>
@endif
{{ $possible->shipping_zipcode }}
{{ $possible->shipping_city }}<br>
{{ $possible->shipping_email }}<br>
{{ $possible->shipping_phone }}<br>
{{ $possible->shipping_country->getLocated() }}
@endif
</p>
</div>
<div class="col-sm-12">
<hr>
<p class="font-weight-bold">Zugeordneter Berater:</p>
<p>
@if($possible->member_id)
<span class="text-muted">#{{$possible->member->number}}</span><br>
{{$possible->member->getFullName()}}<br>
{{$possible->member->account->zipcode}} {{$possible->member->account->city}}<br>
@if($possible->member->shop)
@if($possible->member->isActive() && $possible->member->isActiveShop())
<a href="{{$possible->member->shop->getSubdomain(false)}}" class="badge badge-success" target="_blank">{{$possible->member->shop->getSubdomain(false)}}</a>
@else
<span class="badge badge-danger" target="_blank">{{$possible->member->shop->getSubdomain(false)}}</span>
@endif
@else
Keinen Shop eingerichtet
@endif
<label class="custom-control custom-radio mt-3">
<input type="radio" class="custom-control-input" name="is_like_shopping_user_id" value="{{$possible->id}}">
<span class="custom-control-label">Stimmt, das ist der gleiche Kunde, Berater <span class="text-muted">#{{$possible->member->number}}</span> zuordnen</span>
</label>
@else
Keinem Berater zugeordnet
@endif
</p>
</div>
</div>
</div>
@endforeach
</div>
</div>
<hr>
<div class="form-row">
<div class="form-group col">
<label for="change_member_key" class="form-label">{{__('Passwort eingeben')}}*</label>
<input type="text" class="form-control" name="change_member_key" id="change_member_key" placeholder="mivita" required>
</div>
</div>
<div class="form-row">
<div class="form-group col">
<label class="custom-control custom-checkbox mt-3">
<input type="checkbox" class="custom-control-input" name="send_member_mail" value="send" checked>
<span class="custom-control-label">zugeordneten Berater die Bestellung als E-Mail zusenden</span>
</label>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">schließen</button>
<button type="submit" class="btn btn-primary">{{__('übernehmen')}}</button>
</div>
{!! Form::close() !!}
<script type="text/javascript">
$( document ).ready(function() {
});
</script>

View file

@ -0,0 +1,73 @@
{!! Form::open(['url' => $route, 'class' => 'modal-content', 'enctype' => 'multipart/form-data']) !!}
<div class="modal-header">
<h5 class="modal-title">
{{ __('Berater') }}
<span class="font-weight-light">zuweisen/ändern</span>
</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<input type="hidden" name="action" value="{{$data['action']}}">
<input type="hidden" name="id" value="{{$data['id']}}">
<input type="hidden" name="view" value="{{$data['view']}}">
<div class="form-row">
<div class="form-group col">
<label for="change_member_key" class="form-label">{{__('Passwort eingeben')}}*</label>
<input type="text" class="form-control" name="change_member_key" id="change_member_key" placeholder="mivita" required>
</div>
</div>
<div class="form-row">
<div class="form-group col">
<label for="change_member_id" class="form-label">{{ __('Berater zuweisen') }}*</label>
<select class="selectpicker" name="change_member_id" id="change_member_id" data-style="btn-light" data-live-search="true" required>
{!! HTMLHelper::getMembersOptions($value->member_id, true) !!}
</select>
<p class="text-muted">Es werden nur aktive Berater mit aktiven Accounts angezeigt.</p>
</div>
</div>
<input type="hidden" name="customer_set_member_for" value="0">
@if($data['view'] === 'sales_customer')
@if($value->member_id && $value->shopping_user && $value->shopping_user->number)
<div class="custom-controls-stacked">
<label class="custom-control custom-radio">
<input name="customer_set_member_for" value="0" type="radio" class="custom-control-input" checked="">
<span class="custom-control-label">Nur dieser Bestellung einen neuen Berater zuweisen</span>
</label>
<label class="custom-control custom-radio">
<input name="customer_set_member_for" value="1" type="radio" class="custom-control-input">
<span class="custom-control-label">Jeder Bestellung vom Kunden #{{$value->shopping_user->number}} einen neuen Berater zuweisen</span>
</label>
</div>
@endif
@endif
@if($data['view'] === 'customer')
@if($value->member_id && $value->number)
<div class="custom-controls-stacked">
<label class="custom-control custom-radio">
<input name="customer_set_member_for" value="0" type="radio" class="custom-control-input" checked="">
<span class="custom-control-label">Nur diesen Kunden Bestellung einen neuen Berater zuweisen</span>
</label>
<label class="custom-control custom-radio">
<input name="customer_set_member_for" value="1" type="radio" class="custom-control-input">
<span class="custom-control-label">Jeder Bestellung diesen Kunden #{{$value->number}} einen neuen Berater zuweisen</span>
</label>
</div>
@endif
@endif
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">schließen</button>
<button type="submit" class="btn btn-primary">{{__('übernehmen')}}</button>
</div>
{!! Form::close() !!}
<script type="text/javascript">
$( document ).ready(function() {
});
</script>

View file

@ -0,0 +1,122 @@
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">
Produktdetails
</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="card mb-3">
<div class="media flex-wrap flex-md-nowrap">
<div class="d-block col-12 col-md-4 col-lg-4 text-center p-0 m-0">
@if(count($product->images))
<img src="{{route('product_image', [$product->images->first()->slug])}}" alt class="img-fluid" style="max-height: 300px">
@endif
</div>
<div class="media-body p-4 p-md-5 ">
<h4 class="mb-2">
<a href="#" class="text-body">{{ $product->name }}</a>
</h4>
{!! $product->copy !!}
<table class="table my-4">
<tbody>
<tr>
<td class="border-0 text-muted align-middle" style="width: 110px">Points:</td>
<td class="border-0">{{ $product->points }}</td>
</tr>
<tr>
<td class="border-0 text-muted align-middle" style="width: 110px">Inhalt:</td>
<td class="border-0">{{ $product->contents }}</td>
</tr>
<tr>
<td class="border-0 text-muted align-middle" style="width: 110px">Gewicht:</td>
<td class="border-0">{{ $product->weight }} g</td>
</tr>
<tr>
<td class="border-0 text-muted align-middle" style="width: 110px">Art.-Nr.:</td>
<td class="border-0">{{ $product->number }}</td>
</tr>
<tr>
<td class="border-0 text-muted align-middle" style="width: 110px">Netto-Preis:</td>
<td class="border-0">{{ $product->getFormattedPriceWith() }} &euro;</td>
</tr>
</tbody>
</table>
{{--
<hr class="mt-0 mb-4">
<div class="input-group d-inline-flex w-auto">
<span class="input-group-prepend">
<button class="btn btn-secondary icon-btn md-btn-flat" type="button">-</button>
</span>
<input type="text" class="form-control text-center" value="1" style="width: 46px;">
<span class="input-group-append">
<button class="btn btn-secondary icon-btn md-btn-flat" type="button">+</button>
</span>
</div>
<button class="btn btn-secondary ml-3 mb-1">
<strong>&euro; {{$product->getFormattedPriceWith()}}</strong>&nbsp; +<span class="ion ion-md-cart"></span>
</button>
--}}
</div>
</div>
<div class="">
<ul class="nav nav-tabs tabs-alt justify-content-center border-0 px-4 px-lg-5">
<li class="nav-item">
<a class="nav-link small font-weight-normal text-expanded py-4 active" data-toggle="tab" href="#shop-product-description">Bechreibung</a>
</li>
<li class="nav-item">
<a class="nav-link small font-weight-normal text-expanded py-4" data-toggle="tab" href="#shop-product-usage">Anwendung</a>
</li>
<li class="nav-item">
<a class="nav-link small font-weight-normal text-expanded py-4" data-toggle="tab" href="#shop-product-ingredients">Inhaltsstoffe</a>
</li>
</ul>
<hr class="m-0">
<div class="tab-content">
<div class="tab-pane fade show active" id="shop-product-description">
<div class="card borderless">
<div class="card-body">
{!! $product->description !!}
</div>
</div>
</div>
<div class="tab-pane fade" id="shop-product-usage">
<div class="card borderless">
<div class="card-body">
{!! $product->usage !!}
</div>
</div>
</div>
<div class="tab-pane fade" id="shop-product-ingredients">
<div class="card borderless">
<div class="card-body">
{!! $product->ingredients !!}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">schließen</button>
</div>
</div>
<script type="text/javascript">
$( document ).ready(function() {
});
</script>

View file

@ -0,0 +1,84 @@
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">
Meine Kunden / Lieferadressen
</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="card mb-3">
<div class="card-datatable table-responsive">
<table class="datatables-customers table table-striped table-bordered" id="datatables-customers">
<thead>
<tr>
<th>#</th>
<th>{{__('E-Mail')}}</th>
<th>{{__('Anrede')}}</th>
<th>{{__('Firma')}}</th>
<th>{{__('Vorname')}}</th>
<th>{{__('Nachname')}}</th>
<th>{{__('PLZ')}}</th>
<th>{{__('Stadt')}}</th>
<th>{{__('Land')}}</th>
<th>{{__('Käufe')}}</th>
<th>{{__('Newsletter')}}</th>
<th>{{__('erstellt')}}</th>
<th>{{__('Status')}}</th>
<th>{{__('ID Kunden')}}</th>
<th>WP</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<script>
$( document ).ready(function() {
var oTable = $('#datatables-customers').DataTable({
"processing": true,
"serverSide": true,
ajax: {
url: '{!! route( 'user_customer_datatable') !!}',
data: function(d) {
// d.filter_member_id = $('select[name=filter_member_id]').val();
// d.filter_customer_member = $('select[name=filter_customer_member]').val();
}
},
"order": [[0, "desc" ]],
"columns": [
{ data: 'send_to', searchable: false},
{ data: 'billing_email', name: 'billing_email' },
{ data: 'billing_salutation', name: 'billing_salutation' },
{ data: 'billing_company', name: 'billing_company' },
{ data: 'billing_firstname', name: 'billing_firstname' },
{ data: 'billing_lastname', name: 'billing_lastname' },
{ data: 'billing_zipcode', name: 'billing_zipcode' },
{ data: 'billing_city', name: 'billing_city' },
{ data: 'billing_country_id', name: 'billing_country_id' },
{ data: 'orders', name: 'orders' },
{ data: 'subscribed', name: 'subscribed' },
{ data: 'first_created_at', name: 'first_created_at' },
{data: 'status', name: 'status', searchable: false, orderable: false },
{ data: 'number', name: 'number'},
{ data: 'extras', name: 'extras', searchable: false, orderable: false},
],
"bLengthChange": false,
"iDisplayLength": 50,
"language": {
"url": "/js/German.json"
}
});
});
</script>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">schließen</button>
</div>
</div>