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,148 @@
@extends('layouts.layout-2')
@section('content')
<div class="card">
<h6 class="card-header">
{{__('Attribute')}}
</h6>
<div class="card-datatable table-responsive">
<table class="datatables-style table table-striped table-bordered">
<thead>
<tr>
<th style="max-width: 60px;">&nbsp;</th>
<th>{{__('Pos')}}</th>
<th>{{__('Description')}}</th>
<th>{{__('Translate') }}</th>
<th>{{__('Status')}}</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach($values as $value)
<tr>
<td>
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-default"
data-id="{{ $value->id }}"
data-pos="{{ $value->pos }}"
data-name="{{ $value->name }}"
data-trans_name="{{ json_encode($value->trans_name) }}"
data-active="{{ $value->active }}">
<span class="far fa-edit"></span>
</button>
</td>
<td>{{ $value->pos }}</td>
<td>{{ $value->name }}</td>
<td>{{ $value->getTranNames() }}</td>
<td data-sort="{{ $value->active }}">@if($value->active) <span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>@else<span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>@endif</td>
<td><a class="text-danger" href="{{ route('admin_product_attribute_delete', [$value->id]) }}" onclick="return confirm('{{__('Really delete entry?')}}');"><i class="far fa-trash-alt"></i></a></td>
</tr>
@endforeach
</tbody>
</table>
<div class="mt-4 ml-4">
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-default"
data-id="new"
data-pos=""
data-name=""
data-parent_id=""
data-active="1"
>{{__('Neues Attribute erstellen')}}</button>
</div>
</div>
</div>
<!-- Modal template -->
<div class="modal fade" id="modals-default">
<div class="modal-dialog">
<form class="modal-content" action="{{ route('admin_product_attribute_store') }}" method="post">
@csrf
<input type="hidden" class="form-control" name="id">
<div class="modal-header">
<h5 class="modal-title"> {{__('Attribute')}} <span class="font-weight-light">{{__('create/edit')}}</span></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="form-row">
<div class="form-group col">
<label for="name" class="form-label">{{__('Name')}}</label>
<input type="text" class="form-control" name="name" placeholder="{{__('Bezeichnung')}}">
</div>
</div>
<div class="form-row">
<div class="form-group col-6">
<label class="custom-control custom-checkbox m-2">
<input type="checkbox" class="custom-control-input" name="active" checked>
<span class="custom-control-label">{{__('active')}}</span>
</label>
</div>
<div class="form-group col-6">
<input type="text" class="form-control" name="pos" placeholder="{{__('Number to move the position if necessary')}}">
</div>
</div>
<hr>
@foreach($trans as $tran)
@if($tran != 'de')
<div class="form-row">
<div class="form-group col">
<label for="name" class="form-label">{{__('Translate')}} <strong style="text-transform: uppercase">{{$tran}}</strong></label>
<input type="text" class="form-control" name="trans[{{$tran}}]" id="trans_{{$tran}}" placeholder="">
</div>
</div>
@endif
@endforeach
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
<button type="submit" class="btn btn-primary">{{__('save')}}</button>
</div>
</form>
</div>
</div>
<script>
$( document ).ready(function() {
$('#modals-default').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
$(this).find(".modal-content input[name='id']").val(button.data('id'));
$(this).find(".modal-body input[name='name']").val(button.data('name'));
$(this).find(".modal-body input[name='pos']").val(button.data('pos'));
$(this).find(".modal-body select[name='parent_id']").val(button.data('parent_id'));
$('.selectpicker').selectpicker('refresh');
$(this).find(".modal-body input[name='active']").prop( "checked", button.data('active'));
$.each(button.data('trans_name'), function (i, item) {
var name = '#trans_'+i;
$(name).val(item);
});
});
$('.datatables-style').dataTable({
"bLengthChange": false,
"iDisplayLength": 50,
"aoColumns": [
{ "sWidth": "8%" },
{ "sWidth": "8%" },
{ "sWidth": "19%" },
{ "sWidth": "19%" },
{ "sWidth": "30%" },
{ "sWidth": "10%" },
{ "sWidth": "8%" },
],
"language": {
"url": "/js/German.json"
}
});
});
</script>
@endsection

View file

@ -0,0 +1,45 @@
@extends('layouts.layout-2')
@section('content')
@if ($errors->any())
<div class="row">
<div class="col-sm-12">
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
</div>
</div>
@endif
<h4 class="font-weight-bold py-2 mb-2">
{{ __('Create/Edit Kategorien') }}
</h4>
{!! Form::open(['url' => route('admin_product_category_store'), 'class' => 'form-horizontal', 'id'=>'']) !!}
<input type="hidden" name="id" id="id" value="@if($category->id>0){{$category->id}}@else new @endif">
<div class="text-left mt-0 mb-2">
<button type="submit" class="btn btn-submit">{{ __('save') }}</button>&nbsp;
<a href="{{ route('admin_product_categories') }}" class="btn btn-default">{{ __('back') }}</a>
</div>
@include('admin.category.form')
<div class="text-left mt-0 mb-2">
<button type="submit" class="btn btn-submit">{{ __('save') }}</button>&nbsp;
<a href="{{ route('admin_product_categories') }}" class="btn btn-default">{{ __('back') }}</a>
</div>
{!! Form::close() !!}
@include('admin.category.images')
@endsection

View file

@ -0,0 +1,67 @@
<div class="card mb-2">
<h5 class="card-header">
{{ __('Kategorie') }}
</h5>
<div class="card-body">
<div class="form-row">
<div class="form-group col">
<label class="custom-control custom-checkbox float-right">
{!! Form::checkbox('active', 1, $category->active, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">{{__('aktiv')}}</span>
</label>
<label class="form-label" for="name">{{ __('Name') }}*</label>
{{ Form::text('name', $category->name, array('placeholder'=>__('Name'), 'class'=>'form-control', 'id'=>'name', 'required')) }}
</div>
</div>
<div class="form-row">
<div class="form-group col">
<label class="form-label" for="headline">{{ __('Headline') }}*</label>
{{ Form::text('headline', $category->headline, array('placeholder'=>__('Produktwelt'), 'class'=>'form-control', 'id'=>'name', 'required')) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-8">
<label for="parent_id" class="form-label">{{__('Hauptkategorie')}}</label>
<select class="selectpicker" data-style="btn-default" name="">
{!! HTMLHelper::getCategoriesWithoutParents($category->parent_id) !!}
</select>
</div>
<div class="form-group col-sm-4">
<label class="form-label" for="pos">{{ __('pos') }}</label>
{{ Form::text('pos', $category->pos, array('placeholder'=>__('pos'), 'class'=>'form-control', 'id'=>'pos')) }}
</div>
</div>
</div>
</div>
<div class="card mb-2">
<h5 class="card-header">
{{ __('Übersetzungen') }}
</h5>
<div class="card-body">
@foreach($trans as $lang)
@if($lang != 'de')
<div class="form-row">
<div class="form-group col-6">
<label for="trans_name_{{$lang}}" class="form-label">{{__('Name')}} <strong style="text-transform: uppercase">{{$lang}}</strong></label>
{{ Form::text('trans_name['.$lang.']', $category->getTrans('name', $lang), array('class'=>'form-control', 'id'=>'trans_name_'.$lang)) }}
</div>
<div class="form-group col-6">
<label for="trans_headline_{{$lang}}" class="form-label">{{__('Headline')}} <strong style="text-transform: uppercase">{{$lang}}</strong></label>
{{ Form::text('trans_headline['.$lang.']', $category->getTrans('headline', $lang), array('class'=>'form-control', 'id'=>'trans_headline_'.$lang)) }}
</div>
</div>
@endif
@endforeach
</div>
</div>

View file

@ -0,0 +1,93 @@
<div class="card mb-2">
<h5 class="card-header">
{{ __('Headline Bild') }}
</h5>
<div class="card-body">
@if($category->id>0)
<style>
.dz-message {
margin: 2rem 0;
}
.default-style .dz-message {
font-size: 1.1em;
}
</style>
<div class="row">
<div class="col-12">
<p>Bild wird hinter oder unter die Headline gesetzt und einer Breite von 100% ausgegeben.</p>
</div>
<div class="col-md-8 col-sm-6">
<div class="row">
@if($category->headline_image_id)
<div class="col-6 col-md-4 text-center" style="border: 1px solid #eee;">
<img class="" height="60" alt="" src="{{ route('iq_image', [$category->iq_image->slug]) }}">
<br>
<a href="{{ route('admin_product_category_image_delete', [$category->iq_image->id, $category->id]) }}" class="btn btn-sm btn-primary mt-2 mb-2" onclick="return confirm('Bild wirklich löschen?');">Bild löschen</a>
@if($category->iq_image->active)
<a href="{{ route('admin_product_category_image_attribute', [$category->iq_image->id, 'active', 0]) }}" class="btn btn-sm btn-default mt-2 mb-2"><span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span> <i class="far fa-sync"></i></a>
@else
<a href="{{ route('admin_product_category_image_attribute', [$category->iq_image->id, 'active', 1]) }}" class="btn btn-sm btn-default mt-2 mb-2"><span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span> <i class="far fa-sync"></i></a>
@endif
</div>
@endif
</div>
</div>
<div class="col-md-4 col-sm-6">
@if(!$category->headline_image_id)
<div class="card">
<div class="card-body">
<form method="POST" action="{{ route('admin_product_category_image_upload') }}" accept-charset="UTF-8" class="avatar" enctype="multipart/form-data">
@csrf
<input type="hidden" name="category_id" value="{{$category->id}}">
<div class="slim_holder text-center">
<div class="slim" style="margin:20px auto;"
data-label='<span class="text-green">Foto-Upload</span><br>(Datei suchen oder Drag & Drop)'
data-fetcher="fetch.php"
data-size="1680,640"
data-min-size="100,100"
data-max-file-size="10"
data-status-image-too-small="Bild zu klein<br>min. $0 Pixel"
data-status-file-type="Ungültige Datei<br>bitte nur: $0"
data-status-file-size="Die Datei ist zu groß<br>max. $0 MB"
data-button-confirm-label="bestätigen"
data-button-cancel-label="abbrechen"
data-button-confirm-title="bestätigen"
data-button-cancel-title="abbrechen"
data-button-rotate-title="drehen"
data-ratio="">
<input type="file" name="images[]" required />
</div>
<br>
<button class="btn btn-primary" type="submit">Bild speichern</button>
</div>
</form>
</div>
</div>
@else
<p> Nur ein Bild möglich, vor neuem Upload Bild löschen </p>
@endif
</div>
</div>
@else
<p>Kategorie erst anlegen</p>
@endif
</div>
</div>

View file

@ -0,0 +1,73 @@
@extends('layouts.layout-2')
@section('content')
<div class="card">
<h6 class="card-header">
{{__('Kategorien')}}
</h6>
<div class="card-datatable table-responsive">
<table class="datatables-style table table-striped table-bordered">
<thead>
<tr>
<th style="max-width: 60px;">&nbsp;</th>
<th>{{__('Pos')}}</th>
<th>{{__('Hauptkategorie')}}</th>
<th>{{__('Headline')}}</th>
<th>{{__('Translate') }}</th>
<th>{{__('Status')}}</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach($values as $value)
<tr>
<td>
<a href="{{route('admin_product_category_edit', [$value->id])}}" class="btn icon-btn btn-sm btn-primary">
<span class="far fa-edit"></span>
</a>
</td>
<td>{{ $value->pos }}</td>
<td>@if($value->parent) {{ $value->parent->name }} @else {{ $value->name }} @endif</td>
<td>@if($value->parent) {{ $value->name }} @else - @endif</td>
<td>{{ $value->headline }}</td>
<!-- <td>{{ $value->getTranNames() }}</td> -->
<td data-sort="{{ $value->active }}">@if($value->active) <span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>@else<span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>@endif</td>
<td><a class="text-danger" href="{{ route('admin_product_category_delete', [$value->id]) }}" onclick="return confirm('{{__('Really delete entry?')}}');"><i class="far fa-trash-alt"></i></a></td>
</tr>
@endforeach
</tbody>
</table>
<div class="mt-4 ml-4">
<a href="{{route('admin_product_category_edit', ['new'])}}" class="btn btn-sm btn-primary">
{{__('Neue Kategorie erstellen')}}
</a>
</div>
</div>
</div>
<script>
$( document ).ready(function() {
$('.datatables-style').dataTable({
"bLengthChange": false,
"iDisplayLength": 50,
"order": [[ 1, "asc" ]],
"aoColumns": [
{ "sWidth": "8%" },
{ "sWidth": "8%" },
{ "sWidth": "19%" },
{ "sWidth": "19%" },
{ "sWidth": "30%" },
{ "sWidth": "10%" },
{ "sWidth": "8%" },
],
"language": {
"url": "/js/German.json"
}
});
});
</script>
@endsection

View file

@ -0,0 +1,53 @@
@extends('layouts.layout-2')
@section('content')
<div class="card mb-4">
<h6 class="card-header">
{{$user->email}} | {{__('Change E-Mail')}}
</h6>
<div class="card-body">
<div class="row">
<div class="col-sm-2"></div>
<div class="col-sm-10">
<p>{{__('Change the e-mail address of the contact here. We will send the contact a new activation link to the new e-mail address to verify it.')}}</p>
</div>
</div>
{!! Form::open(['url' => route('admin_lead_change_mail', [$user->id]) ]) !!}
<div class="form-group row">
<label class="col-form-label col-sm-2 text-sm-right">{{__('New E-Mail Address')}}*</label>
<div class="col-sm-10">
<input class="form-control {{ $errors->has('email') ? 'is-invalid' : '' }}" type="email" name="email" placeholder="{{__('New E-Mail Address')}}*" required>
@if ($errors->has('email'))
<span class="invalid-feedback" role="alert">
<strong>{{ $errors->first('email') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group row">
<label class="col-form-label col-sm-2 text-sm-right">{{__('Confirm new E-Mail')}}*</label>
<div class="col-sm-10">
<input class="form-control" {{ $errors->has('email_confirmation') ? 'is-invalid' : '' }} type="email" name="email_confirmation" placeholder="{{__('Confirm new E-Mail Address')}}*" required>
@if ($errors->has('email_confirmation'))
<span class="invalid-feedback" role="alert">
<strong>{{ $errors->first('email_confirmation') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group row">
<div class="col-sm-10 ml-sm-auto">
<button type="submit" class="btn btn-primary">{{__('save')}}</button>
<a href="{{ route('admin_lead_edit', [$user->id]) }}" class="btn btn-default">{{ __('back') }}</a>
</div>
</div>
{!! Form::close() !!}
</div>
</div>
@endsection

View file

@ -0,0 +1,43 @@
@extends('layouts.layout-2')
@section('content')
@if ($errors->any())
<div class="row">
<div class="col-sm-12">
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
</div>
</div>
@endif
<h4 class="font-weight-bold py-2 mb-2">
{{ __('Create/Edit Land') }}
</h4>
{!! Form::open(['url' => route('admin_country_store'), 'class' => 'form-horizontal', 'id'=>'']) !!}
<input type="hidden" name="id" id="id" value="@if($country->id>0){{$country->id}}@else new @endif">
<div class="text-left mt-0 mb-2">
<button type="submit" class="btn btn-submit">{{ __('save') }}</button>&nbsp;
<a href="{{ route('admin_countries') }}" class="btn btn-default">{{ __('back') }}</a>
</div>
@include('admin.country.form')
<div class="text-left mt-0 mb-2">
<button type="submit" class="btn btn-submit">{{ __('save') }}</button>&nbsp;
<a href="{{ route('admin_countries') }}" class="btn btn-default">{{ __('back') }}</a>
</div>
{!! Form::close() !!}
@endsection

View file

@ -0,0 +1,179 @@
<div class="card mb-2">
<h5 class="card-header">
{{ __('Land') }}
<label class="custom-control custom-checkbox float-right">
{!! Form::checkbox('active', 1, $country->active, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">{{__('aktiv')}}</span>
</label>
</h5>
<div class="card-body">
<div class="form-row">
<div class="form-group col-sm-6">
<label class="form-label" for="de">{{ __('Name DE') }}*</label>
{{ Form::text('name', $country->de, array('placeholder'=>__('Land DE'), 'class'=>'form-control', 'id'=>'de', 'required')) }}
</div>
<div class="form-group col-sm-6">
<label class="form-label" for="en">{{ __('Name EN') }}</label>
{{ Form::text('en', $country->en, array('placeholder'=>__('Land EN'), 'class'=>'form-control', 'id'=>'en')) }}
</div>
<div class="form-group col-sm-6">
<label class="form-label" for="es">{{ __('Name ES') }}*</label>
{{ Form::text('es', $country->es, array('placeholder'=>__('Land ES'), 'class'=>'form-control', 'id'=>'es')) }}
</div>
<div class="form-group col-sm-6">
<label class="form-label" for="fr">{{ __('Name FR') }}</label>
{{ Form::text('fr', $country->fr, array('placeholder'=>__('Land FR'), 'class'=>'form-control', 'id'=>'fr')) }}
</div>
<div class="form-group col-sm-6">
<label class="form-label" for="it">{{ __('Name IT') }}</label>
{{ Form::text('it', $country->it, array('placeholder'=>__('Land IT'), 'class'=>'form-control', 'id'=>'it')) }}
</div>
<div class="form-group col-sm-6">
<label class="form-label" for="ru">{{ __('Name RU') }}</label>
{{ Form::text('ru', $country->ru, array('placeholder'=>__('Land RU'), 'class'=>'form-control', 'id'=>'ru')) }}
</div>
</div>
<hr>
<div class="form-row">
<div class="form-group col-sm-6">
<label class="form-label" for="code">Ländercode</label>
{{ Form::text('code', $country->code, array('placeholder'=>__('code'), 'class'=>'form-control', 'id'=>'code')) }}
</div>
<div class="form-group col-sm-6">
<label class="form-label" for="phone">Telefonvorwahl</label>
{{ Form::text('phone', $country->phone, array('placeholder'=>__('phone'), 'class'=>'form-control', 'id'=>'phone')) }}
</div>
</div>
</div>
</div>
<div class="card mb-2">
<h5 class="card-header">
Anzeige und Währung
</h5>
<div class="card-body">
<div class="form-row">
<div class="form-group col-sm-12">
<label class="custom-control custom-checkbox">
{!! Form::checkbox('switch', 1, $country->switch, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">Land aus Auswahl auf der Webseite anzeigen (Länderwechsel)</span>
</label>
</div>
<div class="form-group col-sm-12">
<label class="custom-control custom-checkbox">
{!! Form::checkbox('own_eur', 1, $country->own_eur, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">Land hat eigenen EURO Preis</span>
</label>
</div>
<div class="col-12">
<hr class="mt-0">
</div>
<div class="form-group col-sm-6">
<label class="form-label">Eigene Währung</label>
<label class="custom-control custom-checkbox">
{!! Form::checkbox('currency', 1, $country->currency, ['class'=>'custom-control-input', 'id'=>'currency']) !!}
<span class="custom-control-label">Land hat eigene Währung<br>(Währung wird nur zuzsätzlich zum EUR angezeigt, bezahlt wird in EUR)</span>
</label>
</div>
<div class="form-group col-sm-6">
<label class="form-label" for="currency_unit">Abkürzung der Währung</label>
{{ Form::text('currency_unit', $country->currency_unit, array('placeholder'=>__('CHF'), 'class'=>'form-control', 'id'=>'currency_unit')) }}
</div>
</div>
<div id="show_currency_calc" style="display: @if($country->currency) block @else none @endif">
<div class="form-row">
<div class="col-12">
<hr class="mt-0" >
</div>
<div class="form-group col-sm-6">
<label class="form-label">Umrechnungsfaktor zum EUR {{$country->currency_calc}}</label>
<div class="custom-controls-stacked">
<label class="custom-control custom-radio">
{!! Form::radio('currency_calc', 0, !$country->currency_calc, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">dient nur als Anzeigungshilfe, jeder Preis wird manuell angegeben</span>
</label>
<label class="custom-control custom-radio">
{!! Form::radio('currency_calc', 1, $country->currency_calc, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">berechnet den Preis automatisch</span>
</label>
</div>
</div>
<div class="form-group col-sm-6">
<label class="form-label" for="currency_faktor">Faktor Währungen zum Euro (z.B. 1 Euro zu 1,07 CHF)</label>
{{ Form::text('currency_faktor', formatNumber($country->currency_faktor, 4), array('placeholder'=>__('1,07'), 'class'=>'form-control', 'id'=>'currency_faktor')) }}
</div>
</div>
</div>
</div>
</div>
<div class="card mb-2">
<h5 class="card-header">
{{trans('register.required_fields')}}
</h5>
<div class="card-body">
<div class="form-row">
<div class="form-group col-sm-3">
<label class="custom-control custom-checkbox">
{!! Form::checkbox('attr[tax_number]', 1, $country->getAttrByKey('tax_number'), ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">{{__('SteuerNr.')}}</span>
</label>
</div>
<div class="form-group col-sm-3">
<label class="custom-control custom-checkbox">
{!! Form::checkbox('attr[tax_id_number]', 1, $country->getAttrByKey('tax_id_number'), ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">{{__('UST-ID')}}</span>
</label>
</div>
<div class="form-group col-sm-3">
<label class="custom-control custom-checkbox">
{!! Form::checkbox('attr[taxable_sales]', 1, $country->getAttrByKey('taxable_sales'), ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">{{__('Umsatzsteuerpflichtig')}}</span>
</label>
</div>
</div>
</div>
</div>
<div class="card mb-2">
<h5 class="card-header">
{{ __('Übersetzungen') }}
</h5>
<div class="card-body">
@foreach($trans as $lang)
@if(!in_array($lang, ['en', 'de', 'es', 'fr', 'it', 'ru']))
<div class="form-row">
<div class="form-group col-12">
<label for="trans_name_{{$lang}}" class="form-label">{{__('Name')}} <strong style="text-transform: uppercase">{{$lang}}</strong></label>
{{ Form::text('trans_name['.$lang.']', $country->getLocated($lang), array('class'=>'form-control', 'id'=>'trans_name_'.$lang)) }}
</div>
</div>
@endif
@endforeach
</div>
</div>
<script type="application/javascript">
$( document ).ready(function() {
$('input#currency').on('change', function () {
if($(this).prop('checked')){
$('input#show_currency_calc').prop('checked', true);
$('#show_currency_calc').show('slow');
}else{
$('input#show_currency_calc').prop('checked', false);
$('#show_currency_calc').hide('slow');
}
});
});
</script>

View file

@ -0,0 +1,77 @@
@extends('layouts.layout-2')
@section('content')
<div class="card">
<h6 class="card-header">
{{__('Länder')}}
</h6>
<div class="card-datatable table-responsive">
<table class="datatables-style table table-striped table-bordered">
<thead>
<tr>
<th style="max-width: 60px;">&nbsp;</th>
<th>{{__('DE')}}</th>
<th>{{__('Code')}}</th>
<th>{{__('Phone')}}</th>
<th>{{__('Status')}}</th>
<th>{{__('Länderwechsel')}}</th>
<th>{{__('e. Preis')}}</th>
<th>{{__('e. Währung')}}</th>
<th>{{__('Kalkulation')}}</th>
</tr>
</thead>
<tbody>
@foreach($values as $value)
<tr>
<td data-sort="{{ $value->id }}">
<a href="{{route('admin_country_edit', [$value->id])}}" class="btn icon-btn btn-sm btn-primary">
<span class="far fa-edit"></span>
</a>
</td>
<td>{{ $value->de }}</td>
<td>{{ $value->code }}</td>
<td>{{ $value->phone }}</td>
<td data-sort="{{ $value->active }}">{!! get_active_badge($value->active) !!}</td>
<td data-sort="{{ $value->switch }}">{!! get_active_badge($value->switch) !!}</td>
<td data-sort="{{ $value->own_eur }}">{!! get_active_badge($value->own_eur) !!}</td>
<td data-sort="{{ $value->currency }}">{!! get_active_badge($value->currency) !!} {{$value->currency_unit}}</td>
<td data-sort="{{ $value->currency_calc }}">
@if($value->currency)
@if($value->currency_calc)
<span class="badge badge-secondary"><i class="fa fa-cogs"></i> {{$value->currency_faktor}} </span>
@else
<span class="badge badge-info"><i class="fa fa-edit"></i> {{$value->currency_faktor}} </span>
@endif
@else - @endif
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="mt-4 ml-4">
{{--
<a href="{{route('admin_product_category_edit', ['new'])}}" class="btn btn-sm btn-primary">
{{__('Neue Kategorie erstellen')}}
</a>
--}}
</div>
</div>
</div>
<script>
$( document ).ready(function() {
$('.datatables-style').dataTable({
"bLengthChange": false,
"iDisplayLength": 50,
"order": [[ 0, "asc" ]],
"language": {
"url": "/js/German.json"
}
});
});
</script>
@endsection

View file

@ -0,0 +1,110 @@
<div class="card-body">
<h6 class="small font-weight-semibold">
Kunden-, Rechnungsadresse
</h6>
<div class="row">
@if($shopping_user->billing_company)
<div class="col-md-12 mb-3">
<div class="text-muted small">Firma</div>
{{ $shopping_user->billing_company }}
</div>
@endif
<div class="col-md-3 mb-3">
<div class="text-muted small">Anrede</div>
{{ \App\Services\HTMLHelper::getSalutationLang($shopping_user->billing_salutation) }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Vorname</div>
{{ $shopping_user->billing_firstname }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Nachname</div>
{{ $shopping_user->billing_lastname }}
</div>
</div>
<div class="row">
<div class="col-md-3 mb-3">
<div class="text-muted small">Straße</div>
{{ $shopping_user->billing_address }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Zusatz</div>
{{ $shopping_user->billing_address_2 }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">PLZ</div>
{{ $shopping_user->billing_zipcode }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Stadt</div>
{{ $shopping_user->billing_city }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Land</div>
{{-- $shopping_user->billing_country->getLocated() --}}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Telefon</div>
{{ $shopping_user->billing_phone }}
</div>
</div>
</div>
<hr class="m-0">
<!-- / Billing -->
<!-- Shipping -->
<div class="card-body">
<h6 class="small font-weight-semibold">
Lieferadresse
</h6>
@if($shopping_user->same_as_billing)
{{__('email.checkout_mail_same_address')}}
@else
<div class="row">
@if($shopping_user->shipping_company)
<div class="col-md-12 mb-3">
<div class="text-muted small">Firma</div>
{{ $shopping_user->shipping_company }}
</div>
@endif
<div class="col-md-3 mb-3">
<div class="text-muted small">Anrede</div>
{{ \App\Services\HTMLHelper::getSalutationLang($shopping_user->shipping_salutation) }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Vorname</div>
{{ $shopping_user->shipping_firstname }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Nachname</div>
{{ $shopping_user->shipping_lastname }}
</div>
</div>
<div class="row">
<div class="col-md-3 mb-3">
<div class="text-muted small">Straße</div>
{{ $shopping_user->shipping_address }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Zusatz</div>
{{ $shopping_user->shipping_address_2 }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">PLZ</div>
{{ $shopping_user->shipping_zipcode }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Stadt</div>
{{ $shopping_user->shipping_city }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Land</div>
{{-- $shopping_user->shipping_country->getLocated() --}}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Telefon</div>
{{ $shopping_user->shipping_phone }}
</div>
</div>
@endif
</div>

View file

@ -0,0 +1,283 @@
<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">Kundennummer</div>
{{$shopping_user->number}}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Datum</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])}}">Kundendaten bearbeiten</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">Kundennummer</div>
{{$shopping_user->number}}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Erstellt</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])}}">Kundendaten bearbeiten</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">Zugewiesener Berater</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> Berater zuordnen</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">Über Shop</div>
@if($shopping_user->shopping_order)
@if($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">ist Berater</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">Kundenhoheit</div>
@if($shopping_user->is_like)
<span class="badge badge-pill badge-warning"><i class="fa fa-clock"></i> in Prüfung</span>
@else
<span class="badge badge-pill badge-success"><i class="fa fa-check-circle"></i> zugewiesen</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> Kunde hat schon gekauft.
@else
<span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span> Kunde hat noch nicht gekauft.
@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> Kunde ist für Newsletter abonniert.
@else
<span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span> Kunde ist nicht für Newsletter abonniert.
@endif
</div>
</div>
</div>
<hr class="m-0">
<!-- / Shipping -->
@if($isAdmin)
<!-- Order -->
<div class="card-body">
<h6 class="small font-weight-semibold">
Bestellung
</h6>
<div class="table-responsive">
<table class="table table-bordered m-0" style="min-width:550px;">
<tbody>
<tr>
<th>Produkt</th>
<th>Anzahl</th>
<th>Preis</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->name }}
<span class="text-muted">#{{ $shopping_order_item->product->number }}</span></a>
<small>
<span class="text-muted">Inhalt: </span> {{ $shopping_order_item->product->contents }}<br>
<span class="text-muted">Gewicht: </span> {{ $shopping_order_item->product->weight }} g<br>
<span class="text-muted">Points: </span> {{ $shopping_order_item->product->points }}
</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() }} &euro;
</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>Zahlungsart</th>
@if($isAdmin)<th>Referenznummer</th>@endif
<th>Gesamt</th>
<th>Status</th>
<th>Datum</th>
</tr>
</thead>
<tbody>
@php($count=0)
@if($shopping_user->shopping_order)
@foreach($shopping_user->shopping_order->shopping_payments as $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">Status</th>
<th style="min-width: 200px">TX-Action</th>
<th style="min-width: 120px">Datum</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
@endforeach
@endif
</tbody>
</table>
</div>
</div>
@endif
</div>

View file

@ -0,0 +1,400 @@
<div class="card mb-4">
<h5 class="card-header">
<div class="row">
<div class="col-xs-12 col-sm-6">
Kunden-, Rechnungsadresse
</div>
<div class="col-xs-12 col-sm-6">
<span class="text-tiny float-right">* {{trans('register.required_fields')}}</span>
<span class="d-none d-lg-inline">Lieferadresse</span>
</div>
</div>
</h5>
<div class="card-body">
<div class="row">
<div class="col-12 col-lg-6">
<div class="form-row">
<div class="form-group col-md-12">
<label for="billing_company" class="form-label">{{ __('Company name') }} (optional)</label>
{{ Form::text('billing_company', $shopping_user->billing_company, array('placeholder'=>__('Company name'), 'class'=>'form-control', 'id'=>'billing_company', 'tabindex' => 1)) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6 {{ $errors->has('billing_salutation') ? 'has-error' : '' }}">
<label class="form-label">{{ __('Salutation') }}*</label>
<select class="selectpicker" data-style="btn-light" name="billing_salutation" id="billing_salutation" required tabindex="2">
{!! HTMLHelper::getSalutation($shopping_user->billing_salutation) !!}
</select>
@if ($errors->has('billing_salutation'))
<span class="help-block">
<strong>{{ $errors->first('billing_salutation') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6 {{ $errors->has('billing_firstname') ? 'has-error' : '' }}">
<label class="form-label" for="billing_firstname">{{ __('First name') }}*</label>
{{ Form::text('billing_firstname', $shopping_user->billing_firstname, array('placeholder'=>__('First name'), 'class'=>'form-control', 'id'=>'billing_firstname', 'required'=>true, 'tabindex' => 4)) }}
@if ($errors->has('billing_firstname'))
<span class="help-block">
<strong>{{ $errors->first('billing_firstname') }}</strong>
</span>
@endif
</div>
<div class="form-group col-md-6 {{ $errors->has('billing_lastname') ? 'has-error' : '' }}">
<label class="form-label" for="billing_lastname">{{ __('Last name') }}*</label>
{{ Form::text('billing_lastname', $shopping_user->billing_lastname, array('placeholder'=>__('Last name'), 'class'=>'form-control', 'id'=>'billing_lastname', 'required'=>true, 'tabindex' => 5)) }}
@if ($errors->has('billing_lastname'))
<span class="help-block">
<strong>{{ $errors->first('billing_lastname') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-row">
<div class="form-group col-md-12 {{ $errors->has('billing_address') ? 'has-error' : '' }}">
<label class="form-label" for="billing_address">{{ __('Street') }} / {{ __('House number') }}*</label>
{{ Form::text('billing_address', $shopping_user->billing_address, array('placeholder'=>__('Street'), 'class'=>'form-control', 'required'=>true, 'id'=>'billing_address', 'tabindex' => 6)) }}
@if ($errors->has('billing_address'))
<span class="help-block">
<strong>{{ $errors->first('billing_address') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-row">
<div class="form-group col-md-12 {{ $errors->has('billing_address_2') ? 'has-error' : '' }}">
<label class="form-label" for="billing_address_2">{{ __('Wohnung / Gebäude (optional)') }}</label>
{{ Form::text('billing_address_2', $shopping_user->billing_address_2, array('placeholder'=>__('Wohnung / Gebäude (optional)'), 'class'=>'form-control', 'id'=>'billing_address_2', 'tabindex' => 6)) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6 {{ $errors->has('billing_zipcode') ? 'has-error' : '' }}">
<label class="form-label" for="billing_zipcode">{{ __('Postcode') }}*</label>
{{ Form::text('billing_zipcode', $shopping_user->billing_zipcode, array('placeholder'=>__('Postcode'), 'class'=>'form-control', 'required'=>true, 'id'=>'billing_zipcode', 'tabindex' => 7)) }}
@if ($errors->has('billing_zipcode'))
<span class="help-block">
<strong>{{ $errors->first('billing_zipcode') }}</strong>
</span>
@endif
</div>
<div class="form-group col-md-6 {{ $errors->has('billing_city') ? 'has-error' : '' }}">
<label class="form-label" for="billing_city">{{ __('City') }}*</label>
{{ Form::text('billing_city', $shopping_user->billing_city, array('placeholder'=>__('City'), 'class'=>'form-control', 'required'=>true, 'id'=>'billing_city', 'tabindex' => 8)) }}
@if ($errors->has('billing_city'))
<span class="help-block">
<strong>{{ $errors->first('billing_city') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-row">
<div class="form-group col-md-12 {{ $errors->has('billing_country_id') ? 'has-error' : '' }}">
<label class="form-label">{{ __('Country') }}*</label>
<select class="selectpicker" name="billing_country_id" id="billing_country_id" data-style="btn-light" data-live-search="true" required tabindex="9">
{!! HTMLHelper::getContriesWithMore($shopping_user->billing_country_id) !!}
</select>
@if ($errors->has('billing_country_id'))
<span class="help-block">
<strong>{{ $errors->first('billing_country_id') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-row">
<div class="form-group col-md-12 {{ $errors->has('billing_phone') ? 'has-error' : '' }}">
<label class="form-label" for="billing_phone">{{ __('Phone') }}</label>
{{ Form::text('billing_phone', $shopping_user->billing_phone, array('placeholder'=>__('Phone'), 'class'=>'form-control', 'id'=>'billing_phone', 'tabindex' => 11)) }}
</div>
</div>
</div>
<div class="col-12 col-lg-6">
<div class="d-md-block d-lg-none">
<hr>
<h5 class="mt-4">Lieferadresse</h5>
</div>
<div id="show_shipping_address" style="@if($shopping_user->same_as_billing) display:none @endif">
<div class="form-row">
<div class="form-group col-md-12">
<label for="shipping_company" class="form-label">{{ __('Company name') }} (optional)</label>
{{ Form::text('shipping_company', $shopping_user->shipping_company, array('placeholder'=>__('Company name'), 'class'=>'form-control', 'id'=>'shipping_company', 'tabindex' => 16)) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6 {{ $errors->has('shipping_salutation') ? 'has-error' : '' }}">
<label class="form-label">{{ __('Salutation') }}*</label>
<select class="selectpicker" data-style="btn-light" name="shipping_salutation" id="shipping_salutation" required tabindex="17">
{!! HTMLHelper::getSalutation($shopping_user->shipping_salutation) !!}
</select>
@if ($errors->has('shipping_salutation'))
<span class="help-block">
<strong>{{ $errors->first('shipping_salutation') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6 {{ $errors->has('shipping_firstname') ? 'has-error' : '' }}">
<label class="form-label" for="shipping_firstname">{{ __('First name') }}*</label>
{{ Form::text('shipping_firstname', $shopping_user->shipping_firstname, array('placeholder'=>__('First name'), 'class'=>'form-control', 'required'=>true, 'id'=>'shipping_firstname', 'tabindex' => 18)) }}
@if ($errors->has('shipping_firstname'))
<span class="help-block">
<strong>{{ $errors->first('shipping_firstname') }}</strong>
</span>
@endif
</div>
<div class="form-group col-md-6 {{ $errors->has('shipping_lastname') ? 'has-error' : '' }}">
<label class="form-label" for="shipping_lastname">{{ __('Last name') }}*</label>
{{ Form::text('shipping_lastname', $shopping_user->shipping_lastname, array('placeholder'=>__('Last name'), 'class'=>'form-control', 'required'=>true, 'id'=>'shipping_lastname', 'tabindex' => 19)) }}
@if ($errors->has('shipping_lastname'))
<span class="help-block">
<strong>{{ $errors->first('shipping_lastname') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-row">
<div class="form-group col-md-12 {{ $errors->has('shipping_address') ? 'has-error' : '' }}">
<label class="form-label" for="shipping_address">{{ __('Street') }} / {{ __('House number') }}*</label>
{{ Form::text('shipping_address', $shopping_user->shipping_address, array('placeholder'=>__('Street'), 'class'=>'form-control', 'required'=>true, 'id'=>'shipping_address', 'tabindex' => 20)) }}
@if ($errors->has('shipping_address'))
<span class="help-block">
<strong>{{ $errors->first('shipping_address') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-row">
<div class="form-group col-md-12 {{ $errors->has('shipping_address_2') ? 'has-error' : '' }}">
<label class="form-label" for="shipping_address_2">{{ __('Wohnung / Gebäude (optional)') }}</label>
{{ Form::text('shipping_address_2', $shopping_user->shipping_address_2, array('placeholder'=>__('Wohnung / Gebäude (optional)'), 'class'=>'form-control', 'id'=>'shipping_address_2', 'tabindex' => 21)) }}
@if ($errors->has('shipping_address_2'))
<span class="help-block">
<strong>{{ $errors->first('shipping_address_2') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6 {{ $errors->has('shipping_zipcode') ? 'has-error' : '' }}">
<label class="form-label" for="shipping_zipcode">{{ __('Postcode') }}*</label>
{{ Form::text('shipping_zipcode', $shopping_user->shipping_zipcode, array('placeholder'=>__('Postcode'), 'class'=>'form-control', 'required'=>true, 'id'=>'shipping_zipcode', 'tabindex' => 22)) }}
@if ($errors->has('shipping_zipcode'))
<span class="help-block">
<strong>{{ $errors->first('shipping_zipcode') }}</strong>
</span>
@endif
</div>
<div class="form-group col-md-6 {{ $errors->has('shipping_city') ? 'has-error' : '' }}">
<label class="form-label" for="shipping_city">{{ __('City') }}*</label>
{{ Form::text('shipping_city', $shopping_user->shipping_city, array('placeholder'=>__('City'), 'class'=>'form-control', 'required'=>true, 'id'=>'shipping_city', 'tabindex' => 23)) }}
@if ($errors->has('shipping_city'))
<span class="help-block">
<strong>{{ $errors->first('shipping_city') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-row">
<div class="form-group col-md-12 {{ $errors->has('shipping_country_id') ? 'has-error' : '' }}">
<label class="form-label">{{ __('Country') }}*</label>
<select class="selectpicker" name="shipping_country_id" id="shipping_country_id" data-style="btn-light" data-live-search="true" required tabindex="24">
{!! HTMLHelper::getContriesWithMore($shopping_user->shipping_country_id) !!}
</select>
@if ($errors->has('shipping_country_id'))
<span class="help-block">
<strong>{{ $errors->first('shipping_country_id') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-row">
<div class="form-group col-md-12">
<label class="form-label" for="shipping_phone">{{ __('Phone') }}</label>
{{ Form::text('shipping_phone', $shopping_user->shipping_phone, array('placeholder'=>__('Phone'), 'class'=>'form-control', 'id'=>'shipping_phone', 'tabindex' => 26)) }}
</div>
</div>
</div>
<div class="form-group">
<label class="custom-control custom-checkbox m-0">
<input type="checkbox" class="custom-control-input" name="same_as_billing" id="same_as_billing" @if($shopping_user->same_as_billing) checked="checked" @endif>
<span class="custom-control-label">{{__('Versand an die gleiche Adresse')}}</span>
</label>
</div>
<hr>
</div>
</div>
@if($isView === 'customer')
@endif
<div class="card mb-4">
<div class="card-body">
<div class="form-group">
<label class="custom-control custom-checkbox m-0">
<input type="checkbox" class="custom-control-input" name="has_buyed" id="has_buyed" @if($shopping_user->has_buyed) checked="checked" @endif>
<span class="custom-control-label">Ich versichere, dass dieser Kunde bereits bei mir gekauft hat</span>
</label>
</div>
<div class="alert alert-warning mt-3" id="show_has_buyed" style="display: @if($shopping_user->has_buyed) block @else none @endif;">
<label class="custom-control custom-checkbox m-0">
<input type="checkbox" class="custom-control-input" name="subscribed" id="subscribed" @if($shopping_user->subscribed) checked="checked" @endif >
<span class="custom-control-label">Für Newsletter abonniert. Es ist Dir bzw. MIVITA erlaubt, Kunden einen Newsletter zu senden, sofern der Kunde schon mal aktiv gekauft hat.
Sollte der Kunde explizit mitgeteilt haben, dass er keinen Newsletter möchte, dann bitte unbedingt das Häkchen entfernen.</span>
</label>
</div>
</div>
</div>
<hr>
{{ Form::hidden('faker_mail', $shopping_user->faker_mail) }}
@if($isView === 'customer-add')
{{ Form::hidden('billing_email_1', $billing_email) }}
{{ Form::hidden('billing_email-confirm_1', $billing_email) }}
@if($shopping_user->faker_mail)
{{ Form::hidden('billing_email', $billing_email) }}
{{ Form::hidden('billing_email-confirm', $billing_email) }}
@else
<div class="form-row">
<div class="form-group col-md-6">
<label class="form-label" for="billing_email">{{ __('E-Mail Address') }}*</label>
{{ Form::text('billing_email', $billing_email, array('placeholder'=>'E-Mail', 'class'=>'form-control', 'id'=>'billing_email', 'readonly')) }}
</div>
<div class="form-group col-md-6">
<label class="form-label" for="billing_email-confirm">{{ __('Confirm E-Mail') }}</label>
{{ Form::text('billing_email-confirm', $billing_email, array('placeholder'=>__('Confirm E-Mail'), 'class'=>'form-control', 'id'=>'billing_email-confirm', 'readonly')) }}
</div>
</div>
@endif
@else
@if($shopping_user->faker_mail)
{{ Form::hidden('billing_email', $shopping_user->billing_email) }}
{{ Form::hidden('billing_email-confirm', $shopping_user->billing_email) }}
@else
<div class="form-row">
<div class="form-group col-md-6">
<label class="form-label" for="billing_email">{{ __('E-Mail Address') }}*</label>
{{ Form::text('billing_email', $shopping_user->billing_email, array('placeholder'=>'E-Mail', 'class'=>'form-control', 'id'=>'billing_email')) }}
</div>
<div class="form-group col-md-6">
<label class="form-label" for="billing_email-confirm">{{ __('Confirm E-Mail') }}</label>
{{ Form::text('billing_email-confirm', $shopping_user->billing_email, array('placeholder'=>__('Confirm E-Mail'), 'class'=>'form-control', 'id'=>'billing_email-confirm')) }}
</div>
</div>
@endif
@endif
</div>
</div>
<script type="application/javascript">
$( document ).ready(function() {
$('input#has_buyed').on('change', function () {
if($(this).prop('checked')){
$('input#subscribed').prop('checked', true);
$('#show_has_buyed').show('slow');
}else{
$('input#subscribed').prop('checked', false);
$('#show_has_buyed').hide('slow');
}
});
// Shipping Address show|hide
$("#same_as_billing").on("change", function () {
$('#show_shipping_address').slideToggle(200, function () {
// scroll down to shipping area.
if ($('#show_shipping_address').is(":visible")) {
_scrollTo('#show_shipping_address', 20);
}
});
});
$.extend( $.validator.messages, {
required: "Dieses Feld ist ein Pflichtfeld.",
maxlength: $.validator.format( "Geben Sie bitte maximal {0} Zeichen ein." ),
minlength: $.validator.format( "Geben Sie bitte mindestens {0} Zeichen ein." ),
rangelength: $.validator.format( "Geben Sie bitte mindestens {0} und maximal {1} Zeichen ein." ),
email: "Geben Sie bitte eine gültige E-Mail Adresse ein.",
url: "Geben Sie bitte eine gültige URL ein.",
date: "Bitte geben Sie ein gültiges Datum ein.",
number: "Geben Sie bitte eine Nummer ein.",
digits: "Geben Sie bitte nur Ziffern ein.",
equalTo: "Bitte denselben Wert wiederholen.",
range: $.validator.format( "Geben Sie bitte einen Wert zwischen {0} und {1} ein." ),
max: $.validator.format( "Geben Sie bitte einen Wert kleiner oder gleich {0} ein." ),
min: $.validator.format( "Geben Sie bitte einen Wert größer oder gleich {0} ein." ),
creditcard: "Geben Sie bitte eine gültige Kreditkarten-Nummer ein."
});
// Set up validator
$('#lead-form-validation').validate({
rules: {
'billing_email-confirm': {
required: true,
equalTo: "#billing_email"
},
},
errorPlacement: function errorPlacement(error, element) {
$(element).parents('.form-group').append(
error.addClass('invalid-feedback small d-block')
)
},
highlight: function (element) {
if ($(element).hasClass('selectpicker')) {
$(element).parent().addClass('is-invalid');
}
$(element).addClass('is-invalid');
},
unhighlight: function (element) {
$(element).removeClass('is-invalid');
$(element).parents('.form-group').find('.is-invalid').removeClass('is-invalid');
},
messages : {
required: "{{__('This field is required.')}}",
country_id : {
required: "{{__('This field is required.')}}",
},
salutation : {
required: "{{__('Bitte angeben.')}}",
},
first_name : {
required: "{{__('This field is required.')}}",
},
last_name : {
required: "{{__('This field is required.')}}",
},
zipcode : {
required: "{{__('This field is required.')}}",
},
address : {
required: "{{__('This field is required.')}}",
},
city : {
required: "{{__('This field is required.')}}",
},
equalTo : "{{__('Please enter the same value again.')}}",
'billing_email-confirm' : {
equalTo : "{{__('Please enter the same value again.')}}",
required: "{{__('This field is required.')}}",
},
billing_email: {
required : "{{__('This field is required.')}}",
email: "{{ __('Please enter a valid email address.') }}",
remote : "{{ __('This E-mail is already in use.') }}"
},
},
onkeyup: false
});
});
</script>

View file

@ -0,0 +1,12 @@
@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-2 mb-2">
<a href="{{route('admin_customers')}}" class="btn btn-sm btn-default float-right">zurück</a>
{{ __('Kunden Details') }}
</h4>
@include('admin.customer._detail')
<a href="{{route('admin_customers')}}" class="btn btn-sm btn-default mt-2 float-right">zurück</a>
@endsection

View file

@ -0,0 +1,15 @@
@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-2 mb-2">
<a href="{{route('admin_customer_detail', [$shopping_user->id])}}" class="btn btn-sm btn-default float-right">zurück</a>
{{ __('Kunden Details') }} bearbeiten
</h4>
{!! Form::open(['url' => route('admin_customer_edit', [$shopping_user->id]), 'class' => 'form-horizontal', 'id'=>'lead-form-validation']) !!}
@include('admin.customer._edit')
<div class="text-left mt-3">
<button type="submit" class="btn btn-secondary" name="action" value="shopping-user-store">{{ __('save changes') }}</button>&nbsp;
</div>
{!! Form::close() !!}
<a href="{{route('admin_customer_detail', [$shopping_user->id])}}" class="btn btn-sm btn-default float-right">zurück</a>
@endsection

View file

@ -0,0 +1,121 @@
@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-2 mb-2">
{{ __('Kunden') }}
</h4>
<div class="card">
<div class="card-header">
<div class="form-row align-items-center">
{{-- <div class="col-sm-5 mb-2">
<label class="form-label" for="filter_user_shop_id">Filter Kunden/Berater</label>
<select class="custom-select" name="filter_customer_member" id="filter_customer_member">
<option value="">Filter aus</option>
<option value="customers" @if(get_user_attr('filter_customer_member') === 'customers') selected @endif>Kunden</option>
<option value="members" @if(get_user_attr('filter_customer_member') === 'members') selected @endif>Berater</option>
</select>
</div>--}}
<div class="col-sm-10 mb-2">
<label class="form-label" for="filter_user_shop_id">Filter zugewiesener Berater</label>
<select class="custom-select" name="filter_member_id" id="filter_member_id">
<option value="">Filter aus</option>
@foreach($filter_members as $member)
<option value="{{$member->id}}" @if(get_user_attr('filter_member_id') == $member->id) selected @endif>{{$member->first_name}} {{$member->last_name}} |{{$member->email}}</option>
@endforeach
</select>
</div>
<div class="col-2 col-sm-2 mb-2 mt-4">
<a href="{{ route('admin_customers') }}?reset=filter" data-toggle="tooltip" data-placement="top" title="Reset Filter" class="btn icon-btn btn-sm btn-outline-dark float-right">
<span class="fa fa-sync"></span>
</a>
</div>
</div>
</div>
<div class="card-datatable table-responsive">
<div class="ml-4">
<!--<a href="{{ route('admin_lead_edit', ['new']) }}" class="btn btn-sm btn-primary">{{__('Neuen Berater erstellen')}}</a> -->
</div>
<table class="datatables-customers table table-striped table-bordered" id="datatables-customers">
<thead>
<tr>
<th>#</th>
<th>{{__('Nummer')}}</th>
<th>{{__('E-Mail')}}</th>
<th>{{__('ist Berater')}}</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>{{__('zugewiesener Berater')}}</th>
<th>{{__('Datum')}}</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div class="mt-4 ml-4">
<!-- <a href="{{ route('admin_lead_edit', ['new']) }}" class="btn btn-sm btn-primary">{{__('Neuen Berater erstellen')}}</a> -->
</div>
</div>
</div>
<script>
$( document ).ready(function() {
var oTable = $('#datatables-customers').DataTable({
"processing": true,
"serverSide": true,
ajax: {
url: '{!! route( 'admin_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: 'id', searchable: false},
{ data: 'number', name: 'number'},
{ data: 'billing_email', name: 'billing_email' },
{ data: 'isMember', name: 'isMember' },
{ 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: 'member_id', name: 'member_id', searchable: false, orderable: false },
{ data: 'created_at', name: 'created_at' },
],
"bLengthChange": false,
"iDisplayLength": 50,
"language": {
"url": "/js/German.json"
}
});
$('#filter_member_id').on('change', function(){
oTable.draw();
});
$('#filter_customer_member').on('change', function(){
oTable.draw();
});
});
</script>
@endsection

View file

@ -0,0 +1,60 @@
@extends('layouts.layout-2-2')
@section('content')
<div class="row">
<div class="col-sm-6 col-xl-3">
<div class="card mb-4">
<div class="card-body">
<div class="d-flex align-items-center">
<div class="lnr lnr-users display-4 text-primary"></div>
<div class="ml-3">
<div class="text-muted small">{{ __('gesamte Kontakte') }}</div>
<div class="text-large">{{ $export['leads'] }}</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-6 col-xl-3">
<div class="card mb-4">
<div class="card-body">
<div class="d-flex align-items-center">
<div class="lnr lnr-users display-4 text-success"></div>
<div class="ml-3">
<div class="text-muted small">{{ __('E-Mail verifiziert') }}</div>
<div class="text-large">{{ $export['confirmed'] }}</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-6 col-xl-3">
<div class="card mb-4">
<div class="card-body">
<div class="d-flex align-items-center">
<div class="lnr lnr-users display-4 text-primary"></div>
<div class="ml-3">
<div class="text-muted small">{{ __('Daten freigeben') }}</div>
<div class="text-large">{{ $export['active'] }}</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-6 col-xl-3">
<div class="card mb-4">
<div class="card-body">
<div class="d-flex align-items-center">
<div class="lnr lnr-users display-4 text-success"></div>
<div class="ml-3">
<div class="text-muted small">{{__('Einwilligung für weitere Informationen')}}</div>
<div class="text-large">{{ $export['agreement'] }}</div>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection

View file

@ -0,0 +1,37 @@
@extends('layouts.layout-2')
@section('content')
@if ($errors->any())
<div class="row">
<div class="col-sm-12">
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
</div>
</div>
@endif
<h4 class="font-weight-bold py-2 mb-2">
{{ __('Create/Edit Inhaltsstoff') }}
</h4>
{!! Form::open(['url' => route('admin_product_ingredient_store'), 'class' => 'form-horizontal', 'id'=>'']) !!}
<input type="hidden" name="id" id="id" value="@if($model->id>0){{$model->id}}@else new @endif">
@include('admin.ingredient.form')
<div class="text-left mt-0 mb-2">
<button type="submit" class="btn btn-submit">{{ __('save') }}</button>&nbsp;
<a href="{{ route('admin_product_ingredients') }}" class="btn btn-default">{{ __('back') }}</a>
</div>
{!! Form::close() !!}
@endsection

View file

@ -0,0 +1,43 @@
<div class="card mb-2">
<h5 class="card-header">
{{ __('Inhaltsstoff') }}
</h5>
<div class="card-body">
<div class="form-row">
<div class="form-group col">
<label class="custom-control custom-checkbox float-right">
{!! Form::checkbox('active', 1, $model->active, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">{{__('aktiv')}}</span>
</label>
<label class="form-label" for="name">{{ __('Name') }}*</label>
{{ Form::text('name', $model->name, array('placeholder'=>__('Name'), 'class'=>'form-control', 'id'=>'name', 'required')) }}
</div>
</div>
<div class="form-row">
<div class="form-group col">
<label class="form-label" for="headline">{{ __('INCI') }}</label>
{{ Form::textarea('inci', $model->inci, array('placeholder'=>__('INCI'), 'class'=>'form-control', 'id'=>'inci', 'rows'=>3)) }}
</div>
</div>
<div class="form-row">
<div class="form-group col">
<label class="form-label" for="headline">{{ __('Wirkung') }}</label>
{{ Form::textarea('effect', $model->effect, array('placeholder'=>__('Wirkung'), 'class'=>'form-control', 'id'=>'inci', 'rows'=>3)) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-sm-2">
<label class="form-label" for="pos">{{ __('pos') }}</label>
{{ Form::text('pos', $model->pos, array('placeholder'=>__('pos'), 'class'=>'form-control', 'id'=>'pos')) }}
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,72 @@
@extends('layouts.layout-2')
@section('content')
<div class="card">
<h6 class="card-header">
{{__('Inhaltsstoffe')}}
</h6>
<div class="card-datatable table-responsive">
<table class="datatables-style table table-striped table-bordered">
<thead>
<tr>
<th style="max-width: 60px;">&nbsp;</th>
<th>{{__('Pos')}}</th>
<th>{{__('Name')}}</th>
<th>{{__('INCI')}}</th>
<th>{{__('Wirkung') }}</th>
<th>{{__('Status')}}</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach($values as $value)
<tr>
<td>
<a href="{{route('admin_product_ingredient_edit', [$value->id])}}" class="btn icon-btn btn-sm btn-primary">
<span class="far fa-edit"></span>
</a>
</td>
<td>{{ $value->pos }}</td>
<td>{{ $value->name }}</td>
<td>{{ $value->inci }}</td>
<td>{{ $value->effect }}</td>
<td data-sort="{{ $value->active }}">@if($value->active) <span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>@else<span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>@endif</td>
<td><a class="text-danger" href="{{ route('admin_product_ingredient_delete', [$value->id]) }}" onclick="return confirm('{{__('Really delete entry?')}}');"><i class="far fa-trash-alt"></i></a></td>
</tr>
@endforeach
</tbody>
</table>
<div class="mt-4 ml-4">
<a href="{{route('admin_product_ingredient_edit', ['new'])}}" class="btn btn-sm btn-primary">
{{__('Neuen Inhaltsstoff erstellen')}}
</a>
</div>
</div>
</div>
<script>
$( document ).ready(function() {
$('.datatables-style').dataTable({
"bLengthChange": false,
"iDisplayLength": 100,
"order": [[ 1, "asc" ]],
"aoColumns": [
{ "sWidth": "8%" },
{ "sWidth": "8%" },
{ "sWidth": "19%" },
{ "sWidth": "19%" },
{ "sWidth": "30%" },
{ "sWidth": "10%" },
{ "sWidth": "8%" },
],
"language": {
"url": "/js/German.json"
}
});
});
</script>
@endsection

View file

@ -0,0 +1,113 @@
@extends('layouts.layout-2')
@section('content')
@if ($errors->any())
<div class="row">
<div class="col-sm-12">
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
</div>
</div>
@endif
<h4 class="font-weight-bold py-2 mb-2">
@if(!$user->id || $user->id === 'new')
{{ __('Neuen Berater erstellen') }}
@else
{{ __('Berater bearbeiten') }}
@endif
</h4>
{!! Form::open(['url' => route('admin_lead_store')."?show=".$show, 'class' => 'form-horizontal', 'id'=>'lead-form-validation']) !!}
<div class="text-left mt-0 mb-2">
<button type="submit" class="btn btn-submit btn-primary">{{ __('save') }}</button>&nbsp;
<a href="{{ route('admin_leads') }}" class="btn btn-default">{{ __('back') }}</a>
</div>
@include('admin.lead.m_register_data')
@if(!$user->id || $user->id === 'new')
@include('user.user_new_form')
@include('user.data_verify')
@else
@include('user.user_form')
@endif
<div class="text-left mt-3">
<button type="submit" class="btn btn-submit btn-primary">{{ __('save') }}</button>&nbsp;
<a href="{{ route('admin_leads') }}" class="btn btn-default">{{ __('back') }}</a>
</div>
{!! Form::close() !!}
<!-- Modal template -->
<div class="modal fade" id="modals-edit-m-data">
<div class="modal-dialog">
<form class="modal-content" action="{{route('admin_lead_edit', [$user->id])}}?show={{$show}}" method="post">
@csrf
<div class="modal-header">
<h5 class="modal-title"> {{__('Daten mivita')}} <span class="font-weight-light">{{__('edit')}}</span></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="form-row">
<div class="form-group col">
<label for="name" class="form-label">{{__('Passwort eingeben')}}</label>
<input type="text" class="form-control" name="edit_m_data_key" placeholder="gseele">
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
<button type="submit" class="btn btn-primary">{{__('öffnen')}}</button>
</div>
</form>
</div>
</div>
<!-- Modal template -->
<div class="modal fade" id="modals-register-m-data">
<div class="modal-dialog">
<form class="modal-content" action="{{route('admin_lead_released', ['incomplete', $user->id])}}?show={{$show}}" method="post">
@csrf
<div class="modal-header">
<h5 class="modal-title"> {{__('Berater Daten nicht vollständig')}}</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<p>Berater eine E-Mail senden, dass die Daten nicht vollständig sind?<br>
Vervollständige die Nachricht welche Daten fehlerhaft sind, die Nachricht wird an den Berater gesendet. Anrede, Links, Absender wird automatisch in die E-Mail eingefügt. </p>
<div class="form-row">
<div class="form-group col">
<label for="name" class="form-label">{{__('Betreff')}}</label>
<input type="text" class="form-control" name="account_incomplete_subject" value="{{__('email.email_incomplete')}}">
</div>
</div>
<div class="form-row">
<div class="form-group col">
<label for="name" class="form-label">{{__('Nachricht')}}</label>
<textarea name="account_incomplete_message" class="form-control" rows="6">{{__('email.account_incomplete_copy1line')}}</textarea>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
<button type="submit" class="btn btn-primary">{{__('save')}}</button>
</div>
</form>
</div>
</div>
@endsection

View file

@ -0,0 +1,75 @@
@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-2 mb-2">
{{ __('Berater') }}
</h4>
<div class="card">
<div class="card-datatable table-responsive">
{{-- <div class="ml-4">
<a href="{{ route('admin_lead_edit', ['new']) }}" class="btn btn-sm btn-primary">{{__('Neuen Berater erstellen')}}</a>
</div>--}}
<table class="datatables-leads table table-striped table-bordered">
<thead>
<tr>
<th>#</th>
<th>{{__('E-Mail')}}</th>
<th>{{__('Vorname')}}</th>
<th>{{__('Nachname')}}</th>
<th>{{__('Level')}}</th>
<th>{{__('Mitglied')}}</th>
<th>{{__('bis')}}</th>
<th>{{__('Umsatz')}}</th>
<th>{{__('Sales')}}</th>
<th>{{__('verifiziert')}}</th>
<th>{{__('freigegeben')}}</th>
<th>{{__('Einv.')}}</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
{{-- <div class="mt-4 ml-4">
<a href="{{ route('admin_lead_edit', ['new']) }}" class="btn btn-sm btn-primary">{{__('Neuen Berater erstellen')}}</a>
</div> --}}
</div>
</div>
<script>
$( document ).ready(function() {
$('.datatables-leads').dataTable({
"processing": true,
"serverSide": true,
"ajax": '{!! route('admin_leads_datatable') !!}',
"order": [[0, "desc" ]],
"columns": [
{data: 'id', searchable: false},
{ data: 'email', name: 'email' },
{ data: 'first_name', name: 'account.first_name' },
{ data: 'last_name', name: 'account.last_name' },
{ data: 'user_level', name: 'user_level' },
{ data: 'payment_account', name: 'payment_account' },
{ data: 'payment_account_date', name: 'payment_account_date' },
{ data: 'turnover', name: 'turnover' },
{ data: 'sales_total', name: 'sales_total' },
{ data: 'confirmed', name: 'confirmed' },
{ data: 'active', name: 'active' },
{ data: 'agreement', name: 'agreement' },
],
"bLengthChange": false,
"iDisplayLength": 50,
"language": {
"url": "/js/German.json"
}
});
});
</script>
@endsection

View file

@ -0,0 +1,49 @@
@if($m_data_error)
<div class="row">
<div class="col-sm-12">
<div class="alert alert-danger">
<ul>
<li>{{ $m_data_error }}</li>
</ul>
</div>
</div>
</div>
@endif
<div class="card-body">
<div class="float-right">
<button type="button" class="btn btn-sm btn-secondary" data-toggle="modal" data-target="#modals-edit-m-data">
<span class="far fa-edit"></span> Berater Daten bearbeiten
</button>
</div>
<div class="table-responsive">
<table class="table card-table m-0">
<tbody>
<tr>
<th>{{ __('Name') }}</th>
<th>{{ __('Account ID') }}</th>
<th>{{ __('Rolle') }}</th>
<th>{{ __('Sponsor') }}</th>
</tr>
<tr>
<td>{{ \App\Services\HTMLHelper::getSalutationLang($user->account->m_salutation) }} {{ $user->account->m_first_name }} {{ $user->account->m_last_name }}</td>
<td>{{ $user->account->m_account }}</td>
<td>@if($user->user_level){{ $user->user_level->name }}@endif</td>
<td>@if($user->m_sponsor){{ $user->getMUserSponsor() }}@endif</td>
</tr>
</tbody>
</table>
<table class="table card-table m-0">
<tbody>
<tr>
<th>{{ __('weitere Daten') }}</th>
</tr>
<tr>
<td>{{$user->account->m_notes}}</td>
</tr>
</tbody>
</table>
</div>
</div>

View file

@ -0,0 +1,49 @@
<input type="hidden" name="m_data_edit" value="TSOK">
<div class="card-body">
<div class="form-row">
<div class="form-group col-md-4">
<label for="m_account" class="form-label">{{ __('Account ID') }} (unique)</label>
<span class="badge badge-secondary float-right">Nächste freie ID: {{$next_account_id}}</span>
{{ Form::text('m_account', $user->account->m_account, array('placeholder'=>__('Account ID'), 'class'=>'form-control', 'id'=>'m_account')) }}
</div>
<div class="form-group col-md-4">
<label class="form-label">{{ __('Rolle') }}</label>
<select class="selectpicker" data-style="btn-light" name="m_level" id="m_level">
{!! HTMLHelper::getUserLevelOptions($user->m_level) !!}
</select>
</div>
<div class="form-group col-md-4">
<label class="form-label">{{ __('Sponsor') }}</label>
<select class="selectpicker" data-style="btn-light" name="m_sponsor" id="m_sponsor" data-live-search="true">
{!! HTMLHelper::getMembersOptions($user->m_sponsor, true) !!}
</select>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-2">
<label class="form-label">{{ __('Salutation') }}</label>
<select class="selectpicker" data-style="btn-light" name="m_salutation" id="m_salutation">
{!! HTMLHelper::getSalutation($user->account->m_salutation) !!}
</select>
</div>
<div class="form-group col-md-5">
<label class="form-label" for="first_name">{{ __('First name') }}</label>
{{ Form::text('m_first_name', $user->account->m_first_name, array('placeholder'=>__('First name'), 'class'=>'form-control', 'id'=>'m_first_name')) }}
</div>
<div class="form-group col-md-5">
<label class="form-label" for="last_name">{{ __('Last name') }}</label>
{{ Form::text('m_last_name', $user->account->m_last_name, array('placeholder'=>__('Last name'), 'class'=>'form-control', 'id'=>'m_last_name')) }}
</div>
</div>
<div class="form-group">
<label class="form-label" for="m_notes">{{ __('weitere Daten') }}</label>
{{ Form::textarea('m_notes', $user->account->m_notes , array('placeholder'=>__('weitere Daten'), 'class'=>'form-control', 'id'=>'m_notes', 'rows'=>4)) }}
</div>
<div class="text-left mt-3">
<button type="submit" class="btn btn-submit btn-primary">{{ __('save') }}</button>&nbsp;
</div>
<hr>
</div>

View file

@ -0,0 +1,178 @@
<div class="card mb-4">
<h5 class="card-header">
<a href="#" class="@if($show !== 'check_lead' || !$m_data_load) collapsed @endif" data-toggle="collapse" data-target="#collapseMRegister" aria-expanded="@if($show !== 'check_lead' || !$m_data_load) false @else true @endif" aria-controls="collapseMRegister">
<i class="fa fa-caret-expand"></i> {{__('Berater Status') }}
</a>
</h5>
<div class="collapse @if($show === 'check_lead' || $m_data_load) show @endif" id="collapseMRegister">
@if($m_data_load)
@include('admin.lead.m_data_form_edit')
@endif
@if(!$m_data_load)
@include('admin.lead.m_data_form')
@endif
<div class="card-body mb-2 pb-1">
<div class="row">
<div class="col-sm-6">
@if($user->payment_account )
<p><span class="ion ion-md-checkmark-circle-outline text-primary"></span>
<strong>{{__('Berater-Account aktiv')}}</strong> {{__('bis zum:')}} {{ $user->getPaymentAccountDateFormat() }}</p>
@else
<p><span class="ion ion-md-close-circle-outline text-danger"></span>
<strong>{{__('Berater-Account inaktiv')}}</strong></p>
@endif
@if($user->active == 1)
<p><span class="ion ion-md-checkmark-circle-outline text-primary"></span>
<strong>{{__('Daten vollständig, freigeschaltet')}}</strong>: {{ $user->getActiveDateFormat() }}</p>
@if($user->files->count())
@foreach($user->files()->whereIdentifier('contract')->get() as $file)
<a class="btn btn-secondary" href="{{ route('storage_file', [$file->id, 'user']) }}" target="_blank">MIVITA_Beratervertrag.pdf</a>
@endforeach
@endif
@else
<p><span class="ion ion-md-close-circle-outline text-danger"></span>
<strong>{{__('Daten nicht vollständigt, inaktiv')}}</strong></p>
@endif
</div>
<div class="col-sm-6">
@if($user->account_id)
@if($user->agreement)
<p><span class="ion ion-md-checkmark-circle-outline text-primary"></span>
<strong>{{__('Einverständniserklärung')}}</strong>: {{ $user->getAgreementFormat() }}
</p>
@else
<p><span class="ion ion-md-close-circle-outline text-danger"></span>
<strong>{{__('Einverständniserklärung')}}</strong> {{ __('nicht akzeptiert') }}</p>
@endif
@if($user->account->data_protection)
<p><span class="ion ion-md-checkmark-circle-outline text-primary"></span>
<strong>{{__('Privacy policy approved')}}</strong>: {{ $user->account->getDataProtectionFormat() }}
</p>
@endif
@endif
@if($user->confirmed == 1)
<p><span class="ion ion-md-checkmark-circle-outline text-primary"></span>
<strong>{{__('E-Mail verified')}}</strong>: {{ $user->getConfirmationDateFormat() }}</p>
@else
<p><span class="ion ion-md-close-circle-outline text-danger"></span>
<strong>{{__('E-Mail not verified')}}</strong></p>
<a class="btn btn-warning btn-sm" href="{{route('admin_lead_new_mail_verified', $user->id)}}">Neue E-Mail für die Registrierung zusenden</a>
@endif
</div>
<div class="col-sm-12">
@if(!$user->active)
<hr>
@if($user->release_account)
<strong>Registrierung abgeschlossen {{ $user->getReleaseAccountFormat() }}</strong><br>
<a href="{{route('admin_lead_released', ['completed', $user->id])}}" class="btn btn-success" onclick="return confirm('Alle Daten vollständig und Berater freischalten?');">Die Daten sind vollständigt => Berater freischalten</a>
<button type="button" class="btn btn-sm btn-danger float-right" data-toggle="modal" data-target="#modals-register-m-data">
Berater eine E-Mail senden => Daten nicht vollständigt
</button>
@else
<strong><span class="text-danger">Berater muss Registrierung noch abschließen</span></strong>
@endif
@endif
</div>
</div>
<hr>
</div>
@if($user->files->count())
<div class="card-body mb-4 pb-1">
<div class="table-responsive">
<table class="table card-table m-0">
<tbody>
<tr>
<th>Ausweisdaten</th>
<th>Name</th>
<th>Größe</th>
<th class="text-right">löschen</th>
</tr>
@foreach($user->files()->whereIdentifier('id_card')->get() as $file)
<tr>
<td><a target="_blank" href="{{ route('storage_file', [$file->id, 'user']) }}">
@if(strtolower($file->ext ) === 'pdf')
<object data="{{ route('storage_file', [$file->id, 'user']) }}" type="application/pdf" width="160"></object>
@else
<img src="{{ route('storage_file', [$file->id, 'user']) }}" alt="" width="160">
@endif
</a>
</td>
<td><a target="_blank" href="{{ route('storage_file', [$file->id, 'user']) }}">{{ $file->original_name }}</a></td>
<td>{{ $file->formatBytes() }}</td>
<td class="text-right">
<a href="{{ route('admin_lead_delete_file', [$user->id, $file->id, 'upload']) }}" class="btn btn-sm" onclick="return confirm('Datei wirklich löschen?');">
<span class="ion ion-md-trash text-danger"></span>
</a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<hr>
@if($user->account_id)
@if($user->account->getNotice('business_license') === 'later')
<div class="row">
<div class="col-12">
<div class="bg-warning rounded py-2 px-3">
{{__('register.business_license_later')}}
</div>
</div>
</div>
@endif
@if($user->account->getNotice('business_license') === 'non')
<div class="row">
<div class="col-12">
<div class="bg-warning rounded py-2 px-3">
<div class="font-weight-semibold mb-1">{{__('register.business_license_non')}}</div>
<em>{{$user->account->getNotice('business_license_reason')}}</em>
</div>
</div>
</div>
@endif
@endif
<div class="table-responsive">
<table class="table card-table m-0">
<tbody>
<tr>
<th>Gewerbenachweis</th>
<th>Name</th>
<th>Größe</th>
<th class="text-right">löschen</th>
</tr>
@foreach($user->files()->whereIdentifier('business_license')->get() as $file)
<tr>
<td>
<a target="_blank" href="{{ route('storage_file', [$file->id, 'user']) }}">
@if(strtolower($file->ext ) == 'pdf')
<object data="{{ route('storage_file', [$file->id, 'user']) }}" type="application/pdf" width="160"></object>
@else
<img src="{{ route('storage_file', [$file->id, 'user']) }}" alt="" width="160">
@endif
</a>
</td>
<td><a target="_blank" href="{{ route('storage_file', [$file->id, 'user']) }}">{{ $file->original_name }}</a></td>
<td>{{ $file->formatBytes() }}</td>
<td class="text-right">
<a href="{{ route('admin_lead_delete_file', [$user->id, $file->id, 'upload']) }}" class="btn btn-sm" onclick="return confirm('Datei wirklich löschen?');">
<span class="ion ion-md-trash text-danger"></span>
</a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
@endif
</div>
</div>

View file

@ -0,0 +1,152 @@
@extends('layouts.layout-2')
@section('content')
<div class="card">
<h6 class="card-header">
{{__('Rollen')}}
</h6>
<div class="card-datatable table-responsive">
<table class="datatables-style table table-striped table-bordered">
<thead>
<tr>
<th style="max-width: 60px;">&nbsp;</th>
<th>{{__('Pos')}}</th>
<th>{{__('Description')}}</th>
<th>{{__('Translate') }}</th>
<th>{{__('Status')}}</th>
</tr>
</thead>
<tbody>
@foreach($values as $value)
<tr>
<td>
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-default"
data-id="{{ $value->id }}"
data-pos="{{ $value->pos }}"
data-name="{{ $value->name }}"
data-content="{{ $value->content }}"
data-trans_name="{{ json_encode($value->trans_name) }}"
data-active="{{ $value->active }}">
<span class="far fa-edit"></span>
</button>
</td>
<td>{{ $value->pos }}</td>
<td>{{ $value->name }}</td>
<td>{{ $value->getFormattedMargin() }}</td>
<td>{{ $value->getTranNames() }}</td>
<td data-sort="{{ $value->active }}">{!! get_active_badge($value->active) !!}</td>
</tr>
@endforeach
</tbody>
</table>
<div class="mt-4 ml-4">
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-default"
data-id="new"
data-pos=""
data-name=""
data-content=""
data-active="1"
>{{__('Neue Rolle erstellen')}}</button>
</div>
</div>
</div>
<!-- Modal template -->
<div class="modal fade" id="modals-default">
<div class="modal-dialog">
<form class="modal-content" action="{{ route('admin_level_store') }}" method="post">
@csrf
<input type="hidden" class="form-control" name="id">
<div class="modal-header">
<h5 class="modal-title"> {{__('Rollen')}} <span class="font-weight-light">{{__('create/edit')}}</span></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="form-row">
<div class="form-group col">
<label for="name" class="form-label">{{__('Name')}}</label>
<input type="text" class="form-control" name="name" placeholder="{{__('Bezeichnung')}}">
</div>
</div>
<div class="form-row">
<div class="form-group col">
<label for="name" class="form-label">{{__('Beschreibung')}}</label>
<textarea rows="8" class="form-control" name="content" placeholder="{{__('Beschreibung')}}"></textarea>
</div>
</div>
<div class="form-row">
<div class="form-group col-6">
<label class="custom-control custom-checkbox m-2">
<input type="checkbox" class="custom-control-input" name="active" checked>
<span class="custom-control-label">{{__('active')}}</span>
</label>
</div>
<div class="form-group col-6">
<input type="text" class="form-control" name="pos" placeholder="{{__('Number to move the position if necessary')}}">
</div>
</div>
<hr>
@foreach($trans as $tran)
@if($tran != 'de')
<div class="form-row">
<div class="form-group col">
<label for="name" class="form-label">{{__('Translate')}} <strong style="text-transform: uppercase">{{$tran}}</strong></label>
<input type="text" class="form-control" name="trans[{{$tran}}]" id="trans_{{$tran}}" placeholder="">
</div>
</div>
@endif
@endforeach
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
<button type="submit" class="btn btn-primary">{{__('save')}}</button>
</div>
</form>
</div>
</div>
<script>
$( document ).ready(function() {
$('#modals-default').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
$(this).find(".modal-content input[name='id']").val(button.data('id'));
$(this).find(".modal-body input[name='name']").val(button.data('name'));
$(this).find(".modal-body input[name='pos']").val(button.data('pos'));
$(this).find(".modal-body textarea[name='content']").val(button.data('content'));
$(this).find(".modal-body input[name='active']").prop( "checked", button.data('active'));
$.each(button.data('trans_name'), function (i, item) {
var name = '#trans_'+i;
$(name).val(item);
});
});
$('.datatables-style').dataTable({
"bLengthChange": false,
"iDisplayLength": 50,
"aoColumns": [
{ "sWidth": "8%" },
{ "sWidth": "8%" },
{ "sWidth": "19%" },
{ "sWidth": "19%" },
{ "sWidth": "30%" },
{ "sWidth": "10%" },
{ "sWidth": "8%" },
],
"language": {
"url": "/js/German.json"
}
});
});
</script>
@endsection

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>

View file

@ -0,0 +1,148 @@
@extends('layouts.layout-2')
@section('content')
<div class="card">
<h6 class="card-header">
{{__('Zahlungsarten')}}
</h6>
<div class="card-datatable table-responsive">
<table class="datatables-style table table-striped table-bordered">
<thead>
<tr>
<th style="max-width: 60px;">&nbsp;</th>
<th>{{__('Pos')}}</th>
<th>{{__('Name')}}</th>
<th>{{__('sichtbar') }}</th>
<th>{{__('Standard')}}</th>
<th>{{__('Status')}}</th>
</tr>
</thead>
<tbody>
@foreach($values as $value)
<tr>
<td>
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-default"
data-id="{{ $value->id }}"
data-pos="{{ $value->pos }}"
data-name="{{ $value->name }}"
data-short="{{ $value->short }}"
data-show_at="{{ $value->show_at }}"
data-default="{{ $value->default }}"
data-active="{{ $value->active }}">
<span class="far fa-edit"></span>
</button>
</td>
<td>{{ $value->pos }}</td>
<td>{{ $value->name }} ({{ $value->short }})</td>
<td>{{ $value->getShowAtType() }}</td>
<td data-sort="{{ $value->default }}">{!! get_active_badge($value->default) !!}</td>
<td data-sort="{{ $value->active }}">{!! get_active_badge($value->active) !!}</td>
</tr>
@endforeach
</tbody>
</table>
<div class="mt-4 ml-4">
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-default"
data-id="new"
data-pos=""
data-name=""
data-short=""
data-show_at="9"
data-default="1"
data-active="1"
>{{__('Neue Zahlungsart hinzufügen')}}</button>
</div>
</div>
</div>
<!-- Modal template -->
<div class="modal fade" id="modals-default">
<div class="modal-dialog">
<form class="modal-content" action="{{ route('admin_payment_method_store') }}" method="post">
@csrf
<input type="hidden" class="form-control" name="id">
<div class="modal-header">
<h5 class="modal-title"> {{__('Zahlungsart')}} <span class="font-weight-light">{{__('create/edit')}}</span></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="form-row">
<div class="form-group col">
<label for="name" class="form-label">{{__('Name')}}</label>
<input type="text" class="form-control" name="name" placeholder="{{__('Bezeichnung')}}">
</div>
</div>
<div class="form-row">
<div class="form-group col">
<label for="short" class="form-label">{{__('Abkürzung')}}</label>
<input type="text" class="form-control" name="short" placeholder="{{__('Abkürzung')}}">
</div>
</div>
<div class="form-group col-sm-5">
<label class="form-label" for="show_at">{{ __('Produkt anzeigen') }}</label>
{{ Form::select('show_at', \App\Models\PaymentMethod::$showATs, 9, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'show_at') ) }}
</div>
<div class="form-row">
<div class="form-group col-6">
<label class="custom-control custom-checkbox m-2">
<input type="checkbox" class="custom-control-input" name="active" checked>
<span class="custom-control-label">{{__('active')}}</span>
</label>
</div>
<div class="form-group col-6">
<input type="text" class="form-control" name="pos" placeholder="{{__('Number to move the position if necessary')}}">
</div>
</div>
<div class="form-row">
<div class="form-group col-6">
<label class="custom-control custom-checkbox m-2">
<input type="checkbox" class="custom-control-input" name="default" checked>
<span class="custom-control-label">{{__('Standard')}}</span>
</label>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
<button type="submit" class="btn btn-primary">{{__('save')}}</button>
</div>
</form>
</div>
</div>
<script>
$( document ).ready(function() {
$('#modals-default').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
$(this).find(".modal-content input[name='id']").val(button.data('id'));
$(this).find(".modal-body input[name='name']").val(button.data('name'));
$(this).find(".modal-body input[name='short']").val(button.data('short'));
$(this).find(".modal-body input[name='pos']").val(button.data('pos'));
$(this).find(".modal-body select[name='show_at']").val(button.data('show_at'));
$(this).find(".modal-body input[name='active']").prop( "checked", button.data('active'));
$(this).find(".modal-body input[name='default']").prop( "checked", button.data('default'));
$('.selectpicker').selectpicker('refresh');
});
$('.datatables-style').dataTable({
"bLengthChange": false,
"iDisplayLength": 50,
"language": {
"url": "/js/German.json"
}
});
});
</script>
@endsection

View file

@ -0,0 +1,45 @@
@extends('layouts.layout-2')
@section('content')
@if ($errors->any())
<div class="row">
<div class="col-sm-12">
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
</div>
</div>
@endif
<h4 class="font-weight-bold py-2 mb-2">
{{ __('Create/Edit Produkt') }}
</h4>
{!! Form::open(['url' => route('admin_product_store'), 'class' => 'form-horizontal', 'id'=>'']) !!}
<input type="hidden" name="id" id="id" value="@if($product->id>0){{$product->id}}@else new @endif">
<div class="text-left mt-0 mb-2">
<button type="submit" class="btn btn-submit">{{ __('save') }}</button>&nbsp;
<a href="{{ route('admin_product_show') }}" class="btn btn-default">{{ __('back') }}</a>
</div>
@include('admin.product.form')
<div class="text-left mt-0 mb-2">
<button type="submit" class="btn btn-submit">{{ __('save') }}</button>&nbsp;
<a href="{{ route('admin_product_show') }}" class="btn btn-default">{{ __('back') }}</a>
</div>
{!! Form::close() !!}
@include('admin.product.images')
@endsection

View file

@ -0,0 +1,321 @@
<div class="card mb-2">
<h5 class="card-header">
{{ __('Produkt') }}
</h5>
<div class="card-body">
<div class="form-group">
<label class="custom-control custom-checkbox float-right">
{!! Form::checkbox('active', 1, $product->active, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">{{__('aktiv')}}</span>
</label>
<label class="form-label" for="name">{{ __('Produktname / Titel') }}*</label>
{{ Form::text('name', $product->name, array('placeholder'=>__('Name'), 'class'=>'form-control', 'id'=>'name', 'required')) }}
</div>
<div class="form-row">
{{-- <div class="form-group col-sm-6">
<label class="form-label" for="title">{{ __('Title') }}</label>
{{ Form::text('title', $product->title, array('placeholder'=>__('Title'), 'class'=>'form-control', 'id'=>'title')) }}
</div>
--}}
</div>
<div class="form-row">
<div class="form-group col-sm-5">
<label class="form-label" for="title">{{ __('Kategorie (Mehrfachauswahl)') }}*</label>
<select class="selectpicker" name="categories[]" id="categories" data-style="btn-light" data-live-search="false" multiple required>
{!! HTMLHelper::getCategoriesOptions($product->categories()->pluck('category_id')->toArray(), false) !!}
</select>
</div>
<div class="form-group col-sm-5">
<label class="form-label" for="show_at">{{ __('Produkt anzeigen') }}</label>
{{ Form::select('show_at', $product->showATs, $product->show_at, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'show_at') ) }}
</div>
<div class="form-group col-sm-2">
<label class="form-label" for="pos">{{ __('Listenposition') }}</label>
{{ Form::text('pos', $product->pos, array('placeholder'=>__('1, 2, 3, etc'), 'class'=>'form-control', 'id'=>'pos')) }}
</div>
</div>
<div class="form-group">
<label class="form-label" for="copy">{{ __('Produktbeschreibung') }}</label>
{{ Form::textarea('copy', $product->copy , array('placeholder'=>__('Produktbeschreibung'), 'class'=>'form-control summernote', 'id'=>'copy')) }}
</div>
<label class="custom-control custom-checkbox float-right">
{!! Form::checkbox('shipping_addon', 1, $product->shipping_addon, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">Kompensationprodukt beim Versand für Berater</span>
</label>
</div>
</div>
<div class="card mb-2">
<h5 class="card-header">
{{ __('Preise in EUR') }}
</h5>
<div class="card-body">
<div class="form-row">
<div class="form-group col-sm-4 col-md-3">
<label class="form-label" for="price">{{ __('Preis VK in EUR (Brutto)') }}</label>
{{ Form::text('price', $product->getFormattedPrice(), array('placeholder'=>__('Preis VK in EUR (Brutto)'), 'class'=>'form-control', 'id'=>'price')) }}
</div>
<div class="form-group col-sm-4 col-md-3">
<label class="form-label" for="price_ek">{{ __('Preis EK in EUR') }}</label>
{{ Form::text('price_ek', $product->getFormattedPriceEk(), array('placeholder'=>__('Preis EK in EUR'), 'class'=>'form-control', 'id'=>'price_ek')) }}
</div>
<div class="form-group col-sm-4 col-md-3">
<label class="form-label" for="tax">{{ __('MwSt in %') }}</label>
{{ Form::text('tax', $product->getFormattedTax(), array('placeholder'=>__('MwSt in %'), 'class'=>'form-control', 'id'=>'tax')) }}
</div>
<div class="form-group col-sm-4 col-md-3">
<label class="form-label" for="price_old">{{ __('Streichpreis in EUR (wenn > 0)') }}</label>
{{ Form::text('price_old', $product->getFormattedPriceOld(), array('placeholder'=>__('Streichpreis'), 'class'=>'form-control', 'id'=>'price_old')) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-sm-4">
<label class="form-label" for="weight">{{ __('Gewicht in g') }}</label>
{{ Form::text('weight', $product->weight, array('placeholder'=>__('Gewicht in g'), 'class'=>'form-control', 'id'=>'weight')) }}
</div>
<div class="form-group col-sm-4">
<label class="form-label" for="points">{{ __('Points pro Produkt') }}</label>
{{ Form::text('points', $product->points, array('placeholder'=>__('Points pro Produkt'), 'class'=>'form-control', 'id'=>'points')) }}
</div>
<div class="form-group col-sm-4">
<label class="form-label" for="amount">{{ __('Anzahl/Verfügbarkeit') }}</label>
{{ Form::text('amount', $product->amount, array('placeholder'=>__('Anzahl/Verfügbarkeit'), 'class'=>'form-control', 'id'=>'amount')) }}
</div>
</div>
</div>
</div>
<div class="card mb-2">
<h5 class="card-header">
Landesspezifische Preise
</h5>
<div class="card-body pt-0">
@foreach($country_for_prices as $country)
{{ Form::hidden('country_prices[]', $country->id) }}
<div class="card-header bg-light pb-0 mt-3">
<h6>{{$country->de}}</h6>
</div>
<div class="bg-lighter p-2">
@if($country->own_eur)
<div class="form-row">
<div class="form-group col-sm-4 col-md-3">
<label class="form-label">Land hat eigenen EURO Preis</label>
<p></p>
</div>
<div class="form-group col-sm-4 col-md-3">
<label class="form-label" for="price">{{ __('Preis VK in EUR Brutto') }}</label>
{{ Form::text('c_price['.$country->id.']', formatNumber($product->getCPrice($country->id)), array('placeholder'=>__('Preis VK in EUR Brutto'), 'class'=>'form-control', 'id'=>'c_price_'.$country->id)) }}
</div>
<div class="form-group col-sm-4 col-md-3">
<label class="form-label" for="tax">{{ __('MwSt in %') }}</label>
{{ Form::text('c_tax['.$country->id.']', formatNumber($product->getCTax($country->id)), array('placeholder'=>__('MwSt in %'), 'class'=>'form-control', 'id'=>'c_tax'.$country->id)) }}
</div>
<div class="form-group col-sm-4 col-md-3">
<label class="form-label" for="price_old">{{ __('Streichpreis (wenn > 0)') }}</label>
{{ Form::text('c_price_old['.$country->id.']', formatNumber($product->getCPriceOld($country->id)), array('placeholder'=>__('Streichpreis'), 'class'=>'form-control', 'id'=>'c_price_old'.$country->id)) }}
</div>
</div>
@endif
@if($country->currency)
<div class="form-row">
<div class="form-group col-sm-4 col-md-3">
<label class="form-label">Land hat eigene Währung</label>
<p>@if($country->currency_calc) Preis Berechnung automatisch @else Preis manuell
angegeben @endif</p>
</div>
@if($country->currency_calc)
{{--
NUR Anzeige vom automatisch berechneten Preis currency_faktor
Auf Basis vom price
Wenn own_eur auf basis vom own_eur price
--}}
<div class="form-group col-sm-4 col-md-3">
<label class="form-label">Preis VK in {{ $country->currency_unit }}</label>
{{ Form::text('c_currency['.$country->id.']', formatNumber($product->getRealPrice($country) * $country->currency_faktor), array('class'=>'form-control', 'readonly')) }}
</div>
@else
{{--
Eingabe
Währungs Namen aus currency_name
currency_faktor als Hinweis ausgeben
Auf Basis vom price
Wenn own_eur auf basis vom own_eur price
--}}
<div class="form-group col-sm-4 col-md-3">
<label class="form-label">{{__('Preis VK in ')}} {{ $country->currency_unit }} ({{formatNumber($product->getRealPrice($country) * $country->currency_faktor)}})</label>
{{ Form::text('c_currency['.$country->id.']', formatNumber($product->getCCurrency($country->id)), array('placeholder'=>__('Preis VK in ').$country->currency_unit, 'class'=>'form-control')) }}
</div>
@endif
<div class="form-group col-sm-4 col-md-2">
<label class="form-label">{{ __('Währungs Faktor' ) }}</label>
{{ Form::text('currency_faktor['.$country->id.']', formatNumber($country->currency_faktor, 4), array('class'=>'form-control', 'readonly')) }}
</div>
<div class="form-group col-sm-4 col-md-2">
<label class="form-label">{{ __('Preis VK in EUR ') }}</label>
{{ Form::text('preis_eur['.$country->id.']', formatNumber($product->getRealPrice($country)), array('class'=>'form-control', 'readonly')) }}
</div>
<div class="form-group col-sm-4 col-md-2">
<label class="form-label">{{ __('Währung') }}</label>
{{ Form::text('currency_unit['.$country->id.']', $country->currency_unit, array('class'=>'form-control', 'readonly')) }}
</div>
</div>
@endif
</div>
@endforeach
<em class="float-right text-muted small">für die Einstellung von landesspezifischen Preisen müssen diese unter
<a href="{{route('admin_countries')}}">Länder</a> -> Land aktiviert werden.</em>
</div>
</div>
<div class="card mb-2">
<h5 class="card-header">
{{ __('Inhalte') }}
</h5>
<div class="card-body">
<div class="form-row">
<div class="form-group col-sm-5">
<label class="form-label" for="contents">{{ __('Menge Inhalt (ml / g) als Text') }}</label>
{{ Form::text('contents', $product->contents, array('placeholder'=>__('Bsp: 150 ml'), 'class'=>'form-control', 'id'=>'contents')) }}
</div>
<div class="form-group col-sm-3">
<label class="form-label" for="contents_total">{{ __('Gesamter Inhalt (ml / g) als Zahl') }}</label>
{{ Form::text('contents_total', $product->contents_total, array('placeholder'=>__('Bsp: 150'), 'class'=>'form-control', 'id'=>'contents_total')) }}
</div>
<div class="form-group col-sm-2">
<label class="form-label" for="contents">{{ __('Grundpreis Einheit') }}</label>
{{ Form::select('unit', $product->unitTypes, $product->unit, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'unit') ) }}
</div>
<div class="form-group col-sm-2">
<label class="form-label" for="base_price">{{ __('Grundpreis') }}</label>
{{ Form::text('base_price', $product->getBasePriceFormattedFull(), array('placeholder'=>__(''), 'class'=>'form-control', 'id'=>'base_price', 'readonly')) }}
</div>
<div class="form-group col-sm-4">
<label class="form-label" for="number">{{ __('Artikelnummer') }}</label>
{{ Form::text('number', $product->number, array('placeholder'=>__('number'), 'class'=>'form-control', 'id'=>'number')) }}
</div>
<div class="form-group col-sm-4">
<label class="form-label" for="icons">{{ __('Icons') }}</label>
{{ Form::text('icons', $product->icons, array('placeholder'=>__('icons'), 'class'=>'form-control', 'id'=>'icons')) }}
</div>
<div class="form-group col-sm-4">
<label class="form-label" for="title">{{ __('Attribute') }}</label>
<select class="selectpicker" name="attributes[]" id="attributes" data-style="btn-light"
data-live-search="false" multiple>
{!! HTMLHelper::getAttributesOptions($product->attributes()->pluck('attribute_id')->toArray()) !!}
</select>
</div>
</div>
<div class="form-group">
<label class="form-label" for="description">{{ __('Beschreibung') }}</label>
{{ Form::textarea('description', $product->description , array('placeholder'=>__('description'), 'class'=>'form-control summernote', 'id'=>'description')) }}
</div>
<div class="form-group">
<label class="form-label" for="usage">{{ __('Anwendung') }}</label>
{{ Form::textarea('usage', $product->usage , array('placeholder'=>__('usage'), 'class'=>'form-control summernote', 'id'=>'usage')) }}
</div>
<div class="form-group">
<label class="form-label" for="ingredients">{{ __('Hinweise') }}</label>
{{ Form::textarea('ingredients', $product->ingredients , array('placeholder'=>__('ingredients'), 'class'=>'form-control summernote', 'id'=>'ingredients')) }}
</div>
</div>
</div>
<div class="card mb-2">
<h5 class="card-header">
{{ __('Inhalte') }}
</h5>
<div class="card-body">
<div class="card-datatable table-responsive pt-0">
<table class="datatables-style table table-striped table-bordered">
<thead>
<tr>
<th>{{__('Name')}}</th>
<th>{{__('INCI')}}</th>
<th>{{__('Wirkung') }}</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach($product->p_ingredients as $ingredient)
<tr>
<td>{{ $ingredient->name }}</td>
<td>{{ $ingredient->inci }}</td>
<td>{{ $ingredient->effect }}</td>
<td><a class="text-danger" href="{{ route('admin_product_delete', [$product->id, 'ingredient', $ingredient->id]) }}" onclick="return confirm('{{__('Eintrag entfernen?')}}');"><i class="far fa-trash-alt"></i></a></td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="form-row">
<div class="form-group col-sm-10">
<label class="form-label" for="title">{{ __('Inhaltsstoffe hinzufügen (Mehrfachauswahl)') }}</label>
<select class="selectpicker" name="product_ingredients[]" id="product_ingredients" data-style="btn-light" data-live-search="false" multiple>
{!! HTMLHelper::getProductIngredientsOptions($product->p_ingredients()->pluck('ingredient_id')->toArray()) !!}
</select>
<a class="btn btn-default btn-xs mt-2" href="{{route('admin_product_ingredients')}}">Inhaltsstoffe anlegen</a>
</div>
<div class="form-group col-sm-2">
<button type="submit" class="btn btn-submit mt-0 mt-sm-4">{{ __('save') }}</button>&nbsp;
</div>
</div>
</div>
</div>
@if(Auth::user()->isSySAdmin())
<div class="card mb-2">
<h5 class="card-header">
{{ __('SySAdmin Einstellungen') }}
</h5>
<div class="card-body">
<div class="form-row">
<div class="form-group col-sm-5">
<label class="form-label" for="action">{{ __('Aktion beim Zahlungsprozess') }}</label>
{{ Form::select('action[]', $product->actions, $product->action, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'action', 'multiple') ) }}
</div>
<div class="form-group col-sm-5">
<label class="form-label" for="identifier">{{ __('Anzeigeoptionen Zahlung Mitglieder-Accounts') }}</label>
{{ Form::select('identifier', $product->identifiers_types, $product->identifier, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'identifier') ) }}
</div>
<div class="form-group col-sm-2">
<label class="form-label" for="upgrade_to_id">{{ __('Bei Upgrade auf Produkt-ID') }}</label>
{{ Form::text('upgrade_to_id', $product->upgrade_to_id, array('placeholder'=>__('Produkt-ID auf das geupdatet werden soll'), 'class'=>'form-control', 'id'=>'upgrade_to_id')) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-sm-5">
<label class="form-label" for="wp_number">WP Artikel Number (als Zahl ohne Leerzeichen für die WP-API)</label>
{{ Form::text('wp_number', $product->wp_number, array('placeholder'=>__('WP Number'), 'class'=>'form-control', 'id'=>'wp_number')) }}
</div>
</div>
</div>
</div>
@endif

View file

@ -0,0 +1,96 @@
<div class="card mb-2">
<h5 class="card-header">
{{ __('Bilder') }}
</h5>
<div class="card-body">
@if($product->id>0)
<style>
.dz-message {
margin: 2rem 0;
}
.default-style .dz-message {
font-size: 1.1em;
}
</style>
<div class="row">
<div class="col-md-8 col-sm-6">
<div class="row">
@foreach($product->images as $image)
<div class="col-6 col-md-4 text-center" style="border: 1px solid #eee;">
<img class="img-fluid" alt="" src="{{ route('product_image', [$image->slug]) }}">
<br>
<a href="{{ route('admin_product_image_delete', [$image->id, $product->id]) }}" class="btn btn-sm btn-primary mt-2 mb-2" onclick="return confirm('Bild wirklich löschen?');">Bild löschen</a>
@if($image->active)
<a href="{{ route('admin_product_image_attribute', [$image->id, 'active', 0]) }}" class="btn btn-sm btn-default mt-2 mb-2"><span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span> <i class="far fa-sync"></i></a>
@else
<a href="{{ route('admin_product_image_attribute', [$image->id, 'active', 1]) }}" class="btn btn-sm btn-default mt-2 mb-2"><span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span> <i class="far fa-sync"></i></a>
@endif
<br>
<div class="input-group input-group-sm">
<div class="input-group-prepend">
<a href="{{ route('admin_product_image_attribute', [$image->id, 'pos', $image->pos - 1]) }}" class="btn btn-default"><i class="fas fa-chevron-left"></i></a>
</div>
<input type="text" class="form-control text-center" value="{{$image->pos}}">
<div class="input-group-append">
<a href="{{ route('admin_product_image_attribute', [$image->id, 'pos', $image->pos + 1]) }}" class="btn btn-default"><i class="fas fa-chevron-right"></i></a>
</div>
</div>
</div>
@endforeach
</div>
</div>
<div class="col-md-4 col-sm-6">
<div class="card">
<div class="card-body">
<form method="POST" action="{{ route('admin_product_image_upload') }}" accept-charset="UTF-8" class="avatar" enctype="multipart/form-data">
@csrf
<input type="hidden" name="product_id" value="{{$product->id}}">
<div class="slim_holder text-center">
<div class="slim" style="margin:20px auto;"
data-label='<span class="text-green">Foto-Upload</span><br>(Datei suchen oder Drag & Drop)'
data-fetcher="fetch.php"
data-size="600,800"
data-min-size="200,200"
data-max-file-size="10"
data-status-image-too-small="Bild zu klein<br>min. $0 Pixel"
data-status-file-type="Ungültige Datei<br>bitte nur: $0"
data-status-file-size="Die Datei ist zu groß<br>max. $0 MB"
data-button-confirm-label="bestätigen"
data-button-cancel-label="abbrechen"
data-button-confirm-title="bestätigen"
data-button-cancel-title="abbrechen"
data-button-rotate-title="drehen"
data-ratio="3:4">
<input type="file" name="images[]" required />
</div>
<br>
<button class="btn btn-primary" type="submit">Bild speichern</button>
</div>
</form>
</div>
</div>
</div>
</div>
@else
<p>Produkt erst speichern</p>
@endif
</div>
</div>

View file

@ -0,0 +1,99 @@
@extends('layouts.layout-2')
@section('content')
<div class="card">
<h6 class="card-header">
{{__('Produkte')}}
<label class="custom-control custom-checkbox float-right mb-0">
<input type="checkbox" class="custom-control-input show-active-products" name="show_active_products" @if(get_user_attr('show_active_products') === "true") checked @endif>
<span class="custom-control-label font-style-normal font-weight-normal">nur aktive anzeigen</span>
</label>
</h6>
<div class="card-datatable table-responsive">
<table class="datatables-product table table-striped table-bordered">
<thead>
<tr>
<th style="max-width: 60px;">&nbsp;</th>
<th>{{__('Pos')}}</th>
<th>{{__('Bild')}}</th>
<th>{{__('Name')}}</th>
<th>{{__('Artikelnummer')}}</th>
<th>{{__('Kategorie')}}</th>
<th>{{__('Points')}}</th>
<th>{{__('Preis')}}</th>
<th>{{__('Inhalt')}}</th>
<th>{{__('Einheit')}}</th>
<th>{{__('Grundpreis')}}</th>
<th>{{__('Gewicht')}}</th>
<th>{{__('sichbar')}}</th>
<th>{{__('KP')}}</th>
<th>{{__('Status')}}</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach($values as $value)
<tr>
<td>
<a href="{{route('admin_product_edit', [$value->id])}}" class="btn icon-btn btn-sm btn-primary">
<span class="far fa-edit"></span>
</a>
</td>
<td>{{ $value->pos }}</td>
<td>
@if(count($value->images))
<img class="img-fluid" alt="" style="max-height: 80px" src="{{ route('product_image', [$value->images->first()->slug]) }}">
@endif
</td>
<td>{{ $value->name }}</td>
<td>{{ $value->number }}</td>
<td>
@foreach($value->categories as $category)
<div style="white-space: nowrap">{{ $category->category->name }}</div>
@endforeach
</td>
<td>{{ $value->getFormattedPrice() }}</td>
<td>{{ $value->points }}</td>
<td>{{ $value->contents_total }}</td>
<td>{{ $value->getUnitType() }}</td>
<td>{{ $value->getBasePriceFormatted() }}</td>
<td>{{ $value->weight }}</td>
<td>{{ $value->getShowAtType() }}</td>
<td data-sort="{{ $value->shipping_addon }}">{!! get_active_badge($value->shipping_addon) !!}</td>
<td data-sort="{{ $value->active }}">{!! get_active_badge($value->active) !!}</td>
<td><a class="text-info" href="{{ route('admin_product_copy', [$value->id]) }}" onclick="return confirm('{{__('Eintrag kopieren?')}}');"><i class="far fa-copy"></i></a> &nbsp;
<a class="text-danger" href="{{ route('admin_product_delete', [$value->id]) }}" onclick="return confirm('{{__('Really delete entry?')}}');"><i class="far fa-trash-alt"></i></a></td>
</tr>
@endforeach
</tbody>
</table>
<div class="mt-4 ml-4">
<a href="{{route('admin_product_edit', ['new'])}}" class="btn btn-sm btn-primary">
{{__('Neues Produkt erstellen')}}
</a>
</div>
</div>
</div>
<script>
$( document ).ready(function() {
$('.datatables-product').dataTable({
"bLengthChange": false,
"iDisplayLength": 50,
"language": {
"url": "/js/German.json"
}
});
$('.show-active-products').on('change', function () {
console.log($(this));
console.log($(this).prop('checked'));
document.location.search = $(this).attr('name')+"="+$(this).prop('checked');
// window.location.reload(true);
})
});
</script>
@endsection

View file

@ -0,0 +1,694 @@
<div class="card">
<!-- Status -->
<div class="card-body">
<div class="row">
<div class="col-md-6 mb-1">
<strong class="mr-2">Status:</strong>
<span class="text-big">
{!! \App\Services\Payment::getShoppingOrderBadge($shopping_order); !!}
</span>
</div>
<div class="col-md-6 mb-1">
<strong class="mr-2">Versand:</strong>
@if($isAdmin)
<button type="button" class="btn btn-sm btn-{{$shopping_order->getShippedColor()}}" data-toggle="modal" data-target="#modals-shipped"
data-id="{{ $shopping_order->id }}"
data-shipped="{{ $shopping_order->shipped }}"
data-back="{{url()->current()}}"
data-action="store_shipped">
<span class="far fa-edit"></span> <strong>{{$shopping_order->getShippedType()}}</strong>
</button>
@else
<span class="text-big">
<span class="badge badge-pill badge-{{$shopping_order->getShippedColor()}}">{{$shopping_order->getShippedType()}}</span>
</span>
@endif
</div>
</div>
</div>
<hr class="m-0">
<!-- / Status -->
<!-- Info -->
<div class="card-body pb-1">
<div class="row">
<div class="col-md-3 mb-3">
<div class="text-muted small">Bestelldatum</div>
{{$shopping_order->created_at->format("d.m.Y H:i")}}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Anzahl Artikel</div>
{{$shopping_order->getItemsCount()}}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Preis gesamt</div>
{{$shopping_order->getFormattedTotalShipping()}} &euro;
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Points gesamt</div>
{{ $shopping_order->points }}
</div>
</div>
</div>
<hr class="m-0">
<!-- / Info -->
@if($isAdmin)
<!-- Member -->
<div class="card-body pb-1">
<div class="row">
<div class="col-md-8 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">Zugewiesener Berater</div>
@if($isView === 'sales_user')
{{-- @if($shopping_order->user_shop)
{{$shopping_order->user_shop->title}}
@endif
--}}
@endif
@if($isView === 'sales_customer')
@if($shopping_order->shopping_user && $shopping_order->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_order->shopping_user->id}}"
data-action="shopping-user-is-like-member"
data-back="{{route('admin_sales_customers_detail', [$shopping_order->id])}}"
data-modal="modal-xl"
data-route="{{route('modal_load')}}"><span class="fa fa-edit"></span> Berater zuordnen</button>
@else
@if($shopping_order->member)
<a class="btn btn-xs btn-outline-primary" href="{{route('admin_lead_edit', [$shopping_order->member->id])}}"><i class="ion ion-ios-contacts"></i></a>
{{$shopping_order->member->getFullName()}} <span class="text-muted">#{{$shopping_order->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_order->id }}"
data-action="shopping-order-change-member"
data-view="{{$isView}}"
data-route="{{ route('modal_load') }}"><span class="fa fa-edit"></span></button>
@endif
@endif
</div>
<div class="col-md-4 mb-3">
<div class="text-muted small"></div>
</div>
</div>
</div>
<hr class="m-0">
<!-- / Member -->
@endif
<!-- Billing -->
<div class="card-body">
<h6 class="small font-weight-semibold">
@if($shopping_order->shopping_user->is_from === 'shopping' || $shopping_order->shopping_user->is_from === 'extern')
Rechnungsadresse des Kunden
@else
Rechnungsadresse des Beraters
@endif
</h6>
<div class="row">
@if($shopping_order->shopping_user->billing_company)
<div class="col-md-12 mb-3">
<div class="text-muted small">Firma</div>
{{ $shopping_order->shopping_user->billing_company }}
</div>
@endif
<div class="col-md-3 mb-3">
<div class="text-muted small">Anrede</div>
{{ \App\Services\HTMLHelper::getSalutationLang($shopping_order->shopping_user->billing_salutation) }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Vorname</div>
{{ $shopping_order->shopping_user->billing_firstname }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Nachname</div>
{{ $shopping_order->shopping_user->billing_lastname }}
</div>
</div>
<div class="row">
<div class="col-md-3 mb-3">
<div class="text-muted small">Straße</div>
{{ $shopping_order->shopping_user->billing_address }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Zusatz</div>
{{ $shopping_order->shopping_user->billing_address_2 }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">PLZ</div>
{{ $shopping_order->shopping_user->billing_zipcode }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Stadt</div>
{{ $shopping_order->shopping_user->billing_city }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">E-Mail</div>
{{ $shopping_order->shopping_user->billing_email }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Telefon</div>
{{ $shopping_order->shopping_user->billing_phone }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Land</div>
{{ $shopping_order->shopping_user->billing_country->getLocated() }}
</div>
</div>
</div>
<!-- / Billing -->
<!-- Shipping -->
@if($shopping_order->shopping_user->is_from !== 'homeparty')
<hr class="m-0">
<div class="card-body">
<h6 class="small font-weight-semibold">
@if($shopping_order->shopping_user->is_from === 'user_order' || $shopping_order->shopping_user->is_from === 'extern')
@if($shopping_order->shopping_user->is_for === 'me')
Lieferadresse des Berater
@else
Lieferadresse des Kunden
@endif
@endif
@if($shopping_order->shopping_user->is_from === 'wizard')
Lieferadresse des Berater
@endif
@if($shopping_order->shopping_user->is_from === 'membership')
Lieferadresse des Berater
@endif
@if($shopping_order->shopping_user->is_from === 'shopping')
Lieferadresse des Kunden
@endif
</h6>
@if($shopping_order->shopping_user->same_as_billing)
{{__('email.checkout_mail_same_address')}}
@else
<div class="row">
@if($shopping_order->shopping_user->shipping_company)
<div class="col-md-12 mb-3">
<div class="text-muted small">Firma</div>
{{ $shopping_order->shopping_user->shipping_company }}
</div>
@endif
<div class="col-md-3 mb-3">
<div class="text-muted small">Anrede</div>
{{ \App\Services\HTMLHelper::getSalutationLang($shopping_order->shopping_user->shipping_salutation) }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Vorname</div>
{{ $shopping_order->shopping_user->shipping_firstname }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Nachname</div>
{{ $shopping_order->shopping_user->shipping_lastname }}
</div>
</div>
<div class="row">
<div class="col-md-3 mb-3">
<div class="text-muted small">Straße</div>
{{ $shopping_order->shopping_user->shipping_address }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Zusatz</div>
{{ $shopping_order->shopping_user->shipping_address_2 }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">PLZ</div>
{{ $shopping_order->shopping_user->shipping_zipcode }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Stadt</div>
{{ $shopping_order->shopping_user->shipping_city }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">E-Mail</div>
{{ $shopping_order->shopping_user->shipping_email }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Telefon</div>
{{ $shopping_order->shopping_user->shipping_phone }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Land</div>
{{ $shopping_order->shopping_user->shipping_country->getLocated() }}
</div>
</div>
@endif
</div>
@endif
<hr class="m-0">
<!-- / Shipping -->
<!-- Items -->
<div class="card-body">
<h6 class="small font-weight-semibold">
@if($shopping_order->shopping_user->is_from === 'user_order')
@if($shopping_order->shopping_user->is_for === 'me')
<strong>Bestellung für Berater</strong>
@else
<strong>Bestellung für Kunde</strong>
@endif
@endif
@if($shopping_order->shopping_user->is_from === 'wizard')
<strong>Beraterbestellung für Registrierung</strong>
@endif
@if($shopping_order->shopping_user->is_from === 'membership')
<strong>Beraterbestellung für Mitgliedschaft</strong>
@endif
@if($shopping_order->shopping_user->is_from === 'shopping')
<strong>Kundenbestellung über Shop</strong>
@endif
@if($shopping_order->shopping_user->is_from === 'homeparty')
<h5>Beraterbestellung für eine Homeparty</h5>
<hr>
@endif
</h6>
<style>
table.table-product, table.table-product tr td, table.table-product tr th {
border:none;
}
table.table-product tr.border-top td {
border-top: 1px solid #b8b8b9;
}
table.table-product tr.border-bottom td, table.table-product tr.border-bottom th {
border-bottom: 1px solid #b8b8b9;
}
</style>
@if($shopping_order->shopping_user->is_from !== 'homeparty')
<div class="table-responsive">
<table class="table table-product m-0" style="">
<tbody>
<tr class="border-bottom">
<th>Produkt</th>
<th class="text-right">
@if($shopping_order->shopping_user->is_from === 'user_order')
Netto-Preis
@else
Preis
@endif
</th>
<th class="text-right">Anzahl</th>
<th class="text-right">Summe</th>
</tr>
@foreach($shopping_order->shopping_order_items as $shopping_order_item)
<tr class="border-bottom">
<td class="px-3 py-2">
<div class="media align-items-center">
@if($shopping_order_item->product)
@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->name }}
<span class="text-muted">#{{ $shopping_order_item->product->number }}</span></a>
<small>
<span class="text-muted">Inhalt: </span> {{ $shopping_order_item->product->contents }}<br>
<span class="text-muted">Gewicht: </span> {{ $shopping_order_item->product->weight }} g<br>
<span class="text-muted">Points: </span> {{ $shopping_order_item->product->points }}
</small>
</div>
@endif
</div>
</td>
<td class="align-middle px-3 py-2 nowrap text-right" style="min-width:100px;">
@if($shopping_order->shopping_user->is_from === 'user_order')
{{ $shopping_order_item->getFormattedPriceNet() }} &euro;
@else
{{ $shopping_order_item->getFormattedPrice() }} &euro;
@endif
</td>
<!-- Set column width -->
<td class="align-middle px-3 py-2 text-right" style="min-width: 60px;">
{{ $shopping_order_item->qty }}
</td>
<!-- Set column width -->
<td class="font-weight-semibold align-middle px-3 py-2 text-right" style="min-width:120px;">
@if($shopping_order->shopping_user->is_from === 'user_order')
{{ $shopping_order_item->getFormattedTotalPriceNet() }} &euro;
@else
{{ $shopping_order_item->getFormattedTotalPrice() }} &euro;
@endif
</td>
</tr>
@endforeach
</tbody>
<tfoot>
<tr class="border-bottom">
<td colspan="3">
{{__('email.checkout_mail_shipping')}}
</td>
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.6em;">
@if($shopping_order->shopping_user->is_from === 'user_order')
{{ $shopping_order->getFormattedShippingNet() }} &euro;
@else
{{ $shopping_order->getFormattedShipping() }} &euro;
@endif
</td>
</tr>
<tr>
<td colspan="3">
{{__('email.checkout_mail_subtotal_ws')}}
</td>
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.6em;">
{{ $shopping_order->getFormattedSubtotalWs() }} &euro;
</td>
</tr>
<tr class="border-bottom">
<td colspan="3">
{{__('email.checkout_mail_tax')}}
</td>
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.6em;">
{{ $shopping_order->getFormattedTax() }} &euro;
</td>
</tr>
<tr>
<td colspan="3">
<b>{{__('email.checkout_mail_total')}}</b>
</td>
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.6em;">
<b>{{ $shopping_order->getFormattedTotalShipping() }} &euro;</b>
<br>
<span style="font-size: 0.8em">{{__('email.checkout_mail_tax_info')}}</span>
</td>
</tr>
</tfoot>
</table>
</div>
@else
@if($shopping_order->homeparty)
<style>
.table-small {
font-size: 0.9em;
width: auto;
}
.table-small td {
padding: 0.225rem 1rem 0.225rem 0;
}
.btn-md-extra {
padding: 0.3rem 0.6rem;
font-size: 0.8rem;
line-height: 1.5;
border-radius: 0.25rem;
}
.md-btn-extra {
width: calc(1.7rem + 2px) !important;
line-height: 1.5rem;
}
.form-control.input-extra {
padding: 0.28rem 0.6rem;
font-size: 0.8rem;
font-weight: 500;
min-height: calc(1.8rem + 2px);
height: calc(1.8rem + 2px);
width: 44px;
}
.input-group-min-w {
min-width: 102px;
}
.img-extra {
min-width:55px;
max-height: 120px;
}
.table td.border-top {
border: none;
border-top: 1px solid #ccccdb;
}
.table td {
border: none;
}
.table th {
border: none;
border-bottom: 1px solid #c3c3d2;
}
@media (max-width: 767px) {
.default-style:not([dir=rtl]) div.card-datatable table.dataTable thead th:first-child,
.default-style:not([dir=rtl]) div.card-datatable table.dataTable tbody td:first-child,
.default-style:not([dir=rtl]) div.card-datatable table.dataTable tfoot th:first-child {
padding-left: 0.6rem !important;
}
.img-extra {
min-width:35px;
max-height: 160px;
}
}
.table .foot-small td {
padding: 0.225rem 0.625rem;
}
.table .text-body {
font-size: 0.9em;
}
.table .options a.auto-delete-product {
font-size: 0.7em;
font-weight: bold;
text-transform: uppercase;
}
.table .min-width-80 {
min-width: 160px;
}
</style>
@php($homeparty = $shopping_order->homeparty)
@if($homeparty->homeparty_host)
<p><strong>Bestellung Gastgeber/in {{$homeparty->homeparty_host->billing_firstname}} {{$homeparty->homeparty_host->billing_lastname}}</strong></p>
@include('admin.sales._detail_homparty', ['homeparty'=>$shopping_order->homeparty, 'homeparty_guest' => $homeparty->homeparty_host])
@endif
@if($homeparty->homeparty_guests)
@php($g_count = 1)
@foreach($homeparty->homeparty_guests as $homeparty_guest)
<hr>
<p><strong>Bestellung {!! $g_count++ !!}. Gast {{$homeparty_guest->billing_firstname}} {{$homeparty_guest->billing_lastname}}</strong></p>
@include('admin.sales._detail_homparty', ['homeparty'=>$shopping_order->homeparty, 'homeparty_guest' => $homeparty_guest])
@endforeach
@endif
<hr>
@include('admin.sales._detail_homparty_total', ['homeparty' => $homeparty])
@endif
@endif
</div>
<hr class="m-0">
@if($shopping_order->txaction === 'extern')
<div class="card-body">
@if($shopping_order->wp_invoice_path)
<div class="row">
<div class="col-sm-12">
<a href="{{$shopping_order->wp_invoice_path}}" target="_blank" class="btn btn-secondary btn-sm">Link zur Rechnung</a>
</div>
</div>
@endif
@if($shopping_order->wp_notice['wp_advertising'])
<div class="row">
<div class="col-sm-12">
<b>Werbemittel: {!! $shopping_order->wp_notice['wp_advertising'] !!}<br></b>
</div>
</div>
@endif
@if($shopping_order->wp_notice['wp_incentives'])
<div class="row">
<div class="col-sm-12">
<b>Incentives: {!! $shopping_order->wp_notice['wp_incentives'] !!}<br></b>
</div>
</div>
@endif
</div>
<hr class="m-0">
@endif
<!-- / Payment -->
<div class="card-body">
<h6 class="small font-weight-semibold">
Zahlung
</h6>
@if($shopping_order->txaction !== 'extern')
<div class="table-responsive">
<table class="table table-bordered table-striped">
<thead>
<tr>
<th style="min-width: 60px">#</th>
<th>Zahlungsart</th>
<th>Gesamt</th>
<th>Status</th>
<th>Datum</th>
<th>Referenznummer</th>
</tr>
</thead>
<tbody>
@php($count=0)
@foreach($shopping_order->shopping_payments as $shopping_payment)
<tr>
<th scope="row">{{++$count}}</th>
<td>{{$shopping_payment->getPaymentType()}}</td>
<td>{{$shopping_payment->getPaymentAmount()}}</td>
<td>
@if($isAdmin && $shopping_payment->clearingtype === 'fnc' && $shopping_payment->onlinebanktransfertype === 'MIV')
<button type="button" class="btn btn-sm btn-{{ \App\Services\Payment::getFormattedTxactionColor($shopping_payment->txaction)}}" data-toggle="modal" data-target="#modals-txaction"
data-id="{{ $shopping_order->id }}"
data-payment_id="{{ $shopping_payment->id }}"
data-txaction="{{ $shopping_payment->txaction }}"
data-back="{{url()->current()}}"
data-action="store_txaction">
<span class="far fa-edit"></span> <strong>{{ \App\Services\Payment::getFormattedTxaction($shopping_payment->txaction)}}</strong>
</button>
@else
{!! \App\Services\Payment::getShoppingPaymentBadge($shopping_payment) !!}
@endif
</td>
<td>{{$shopping_payment->created_at->format("d.m.Y H:i")}}</td>
<td>{{$shopping_payment->reference}}</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">Status</th>
<th style="min-width: 200px">TX-Action</th>
<th style="min-width: 120px">Datum</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
@endforeach
</tbody>
</table>
</div>
@else
<div class="row">
<div class="col-sm-12">
<div class="alert alert-info p-2 mt-2">
<ul>
<li>Bestellung über externen SHOP</li>
</ul>
</div>
</div>
</div>
@endif
</div>
</div>
@if($isAdmin)
<!-- Modal template -->
<div class="modal fade" id="modals-shipped">
<div class="modal-dialog">
<form class="modal-content" action="{{ route('admin_sales_store') }}" method="post">
@csrf
<input type="hidden" name="id" value="{{$shopping_order->id}}">
<input type="hidden" name="action" value="store_shipped">
<input type="hidden" name="back" value="{{url()->current()}}">
<div class="modal-header">
<h5 class="modal-title">{{__('Bestellung')}} {{__('Versand')}} </h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="form-group col-sm-12">
<label class="form-label" for="shipped">{{ __('Versand') }}</label>
{{ Form::select('shipped', \App\Models\ShoppingOrder::$shippedTypes, $shopping_order->shipped, array('data-live-search'=>'false', 'class'=>'selectpicker') ) }}
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
<button type="submit" class="btn btn-primary">{{__('save')}}</button>
</div>
</form>
</div>
</div>
<!-- Modal template -->
<div class="modal fade" id="modals-txaction">
<div class="modal-dialog">
<form class="modal-content" action="{{ route('admin_sales_store') }}" method="post">
@csrf
<input type="hidden" name="id" value="{{$shopping_order->id}}">
<input type="hidden" name="payment_id">
<input type="hidden" name="action" value="store_txaction">
<input type="hidden" name="back" value="{{url()->current()}}">
<div class="modal-header">
<h5 class="modal-title">{{__('Bestellung')}} {{__('Rechnung')}} </h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="form-group col-sm-12">
<label class="form-label" for="txaction">{{ __('Rechnung') }}</label>
{{ Form::select('txaction', \App\Services\Payment::$txaction_invoice, 'invoice_paid', array('data-live-search'=>'false', 'class'=>'selectpicker') ) }}
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
<button type="submit" class="btn btn-primary">{{__('save')}}</button>
</div>
</form>
</div>
</div>
<script>
$( document ).ready(function() {
$('#modals-txaction').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
$(this).find(".modal-content input[name='payment_id']").val(button.data('payment_id'));
$(this).find(".modal-body select[name='txaction']").val(button.data('txaction'));
$('.selectpicker').selectpicker('refresh');
});
});
</script>
@endif

View file

@ -0,0 +1,246 @@
@if($homeparty_guest && $homeparty_guest->homeparty_user_order_items->count() || $homeparty_guest->is_host)
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>{{__('Bild')}}</th>
<th>{{__('Produkt')}}</th>
<th>{{__('Anzahl')}}</th>
<th>{{__('Marge')}}</th>
<th class="text-right">{{__('EK-Preis')}}</th>
<th class="text-right">{{__('Points')}}</th>
<th class="text-right">{{__('Verdienst')}}</th>
<th class="text-right">{{__('VK-Preis')}}</th>
</tr>
</thead>
<tbody>
@foreach($homeparty_guest->homeparty_user_order_items as $value)
<tr>
<td>
@if(count($value->product->images))
<img class="img-fluid img-extra" alt="" src="{{ route('product_image', [$value->product->images->first()->slug]) }}">
@endif
</td>
<td class="min-width-80">
<strong>{{ $value->product->name }}</strong>
<div class="text-body">
<div>Inhalt: {{ $value->product->contents }}</div>
<div>Art.-Nr.: {{ $value->product->number }}</div>
</div>
</td>
<td>
{{$value->qty}}
</td>
<td>
{{ $value->margin }}%
</td>
<td class="text-right">
{{ $value->getFormattedTotalEKPrice() }} &euro;
</td>
<td class="text-right">
{{ $value->getFormattedTotalPoints() }}
</td>
<td class="text-right">
{{ $value->getFormattedTotalIncomePrice() }} &euro;
</td>
<td class="text-right">
{{ $value->getFormattedTotalPrice() }} &euro;
</td>
</tr>
@endforeach
</tbody>
<tfoot id="insert_show_bonus_host">
@php($user_cart = $homeparty->order['user_carts'][$homeparty_guest->id])
@php($hp_order = $homeparty->order)
@if(!$homeparty_guest->is_host)
<tr class="foot-small">
<td colspan="8" class="text-left">
@if($homeparty_guest->getDelivery() === 'host')
Lieferung an Gastgeber
@endif
@if($homeparty_guest->getDelivery() === 'direct')
Lieferung direkt an den Gast
@endif
</td>
</tr>
@if($homeparty_guest->getDelivery() === 'direct')
<tr>
<td colspan="5" class="text-left">Versandkosten</td>
<td>&nbsp;</td>
<td class="text-right">&nbsp;</td>
<td class="text-right">{{ Util::formatNumber($user_cart['shipping_price'])}} &euro;</td>
</tr>
@endif
<tr>
<td colspan="4" class="border-top"><strong>Gesamt:</strong></td>
<td class="border-top text-right"><strong>{{Util::formatNumber($user_cart['ek_price'])}} &euro;</strong></td>
<td class="border-top text-right"><strong>{{$user_cart['points']}}</strong></td>
<td class="border-top text-right"><strong>{{Util::formatNumber($user_cart['income_price'])}} &euro;</strong></td>
<td class="border-top text-right"><strong>{{Util::formatNumber($user_cart['price'])}} &euro;</strong></td>
</tr>
@else
@if($hp_order['is_bonus'])
<tr class="foot-small">
<td colspan="5" class="text-left">Gutschrift Homeparty Gutschein</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td class="text-right">- {{ Util::formatNumber($hp_order['bonus_value']) }} &euro;</td>
</tr>
@endif
@if($hp_order['is_bonus_coupon'])
<tr class="foot-small">
<td colspan="5" class="text-left">Gutschrift Bonus</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td class="text-right">- {{ Util::formatNumber($hp_order['bonus_coupon']) }} &euro;</td>
</tr>
@endif
@if($hp_order['is_bonus'])
<tr class="foot-small">
<td colspan="5" class="text-left">Abzug Points durch Gutschein</td>
<td class="text-right">- {{ $hp_order['bonus_points_diff'] }} </td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
@endif
<tr class="foot-small">
<td colspan="5" class="text-left">Versandkosten:</td>
<td>&nbsp;</td>
<td class="text-right">&nbsp;</td>
<td class="text-right">{{Util::formatNumber($user_cart['shipping_price'])}} &euro;</td>
</tr>
<tr>
<td colspan="4" class="border-top"><strong>Summen:</strong></td>
<td class="border-top text-right"><strong>{{Util::formatNumber($user_cart['ek_price'])}} &euro;</strong></td>
<td class="border-top text-right"><strong>{{$user_cart['points']}}</strong></td>
<td class="border-top text-right"><strong>{{Util::formatNumber($user_cart['income_price'])}} &euro;</strong></td>
<td class="border-top text-right"><strong>{{Util::formatNumber($user_cart['price'])}} &euro;</strong></td>
</tr>
@endif
</tfoot>
</table>
</div>
@if($homeparty_guest->is_host || $homeparty_guest->getDelivery() === 'direct')
<hr class="m-0">
<div class="card-body" style="background-color: #E5E9EF">
<h6 class="small font-weight-semibold">
Lieferadresse
</h6>
@if($homeparty_guest->same_as_billing)
<div class="row">
@if($homeparty_guest->billing_company)
<div class="col-md-12 mb-3">
<div class="text-muted small">Firma</div>
{{ $homeparty_guest->billing_company }}
</div>
@endif
<div class="col-md-3 mb-3">
<div class="text-muted small">Anrede</div>
{{ \App\Services\HTMLHelper::getSalutationLang($homeparty_guest->billing_salutation) }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Vorname</div>
{{ $homeparty_guest->billing_firstname }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Nachname</div>
{{ $homeparty_guest->billing_lastname }}
</div>
</div>
<div class="row">
<div class="col-md-3 mb-3">
<div class="text-muted small">Straße</div>
{{ $homeparty_guest->billing_address }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Zusatz</div>
{{ $homeparty_guest->billing_address_2 }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">PLZ</div>
{{ $homeparty_guest->billing_zipcode }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Stadt</div>
{{ $homeparty_guest->billing_city }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">E-Mail</div>
{{ $homeparty_guest->billing_email }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Telefon</div>
{{ $homeparty_guest->billing_phone }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Land</div>
{{ $homeparty_guest->billing_country->getLocated() }}
</div>
</div>
@else
<div class="row">
@if($homeparty_guest->shipping_company)
<div class="col-md-12 mb-3">
<div class="text-muted small">Firma</div>
{{ $homeparty_guest->shipping_company }}
</div>
@endif
<div class="col-md-3 mb-3">
<div class="text-muted small">Anrede</div>
{{ \App\Services\HTMLHelper::getSalutationLang($homeparty_guest->shipping_salutation) }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Vorname</div>
{{ $homeparty_guest->shipping_firstname }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Nachname</div>
{{ $homeparty_guest->shipping_lastname }}
</div>
</div>
<div class="row">
<div class="col-md-3 mb-3">
<div class="text-muted small">Straße</div>
{{ $homeparty_guest->shipping_address }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Zusatz</div>
{{ $homeparty_guest->shipping_address_2 }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">PLZ</div>
{{ $homeparty_guest->shipping_zipcode }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Stadt</div>
{{ $homeparty_guest->shipping_city }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">E-Mail</div>
{{ $homeparty_guest->shipping_email }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Telefon</div>
{{ $homeparty_guest->shipping_phone }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Land</div>
{{ $homeparty_guest->shipping_country->getLocated() }}
</div>
</div>
@endif
</div>
@endif
@else
<p>Keine Bestellung</p>
@endif

View file

@ -0,0 +1,58 @@
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>Gesamt</th>
<th class="text-right">{{__('EK-Preis')}}</th>
<th class="text-right">{{__('Points')}}</th>
<th class="text-right">{{__('Verdienst')}}</th>
<th class="text-right">{{__('VK-Preis')}}</th>
</tr>
</thead>
<tbody>
</tbody>
<tfoot>
@php($hp_order = $homeparty->order)
@if($hp_order['is_bonus'])
<tr class="foot-small">
<td colspan="4" class="border-top">
{{ $hp_order['voucher_name'] }}
</td>
<td class="border-top text-right">{{ Util::formatNumber($hp_order['voucher_price'])}} &euro;</td>
</tr>
@endif
<tr class="foot-small">
<td colspan="1" class="border-top">
<strong>Gesamtsummen:</strong>
</td>
<td class="border-top text-right"><strong>{{ Util::formatNumber($hp_order['ek_price'])}} &euro;</strong></td>
<td class="border-top text-right"><strong>{{ $hp_order['points']}}</strong></td>
<td class="border-top text-right"><strong>{{ Util::formatNumber($hp_order['income_price'])}} &euro;</strong></td>
<td class="border-top text-right"><strong>{{ Util::formatNumber($hp_order['price'])}} &euro;</strong></td>
</tr>
<tr class="foot-small">
<td colspan="1" class="text-muted">
Summe ohne MwSt:
</td>
<td class="">&nbsp;</td>
<td class="">&nbsp;</td>
<td class="">&nbsp;</td>
<td class="text-muted text-right">{{ Util::formatNumber($hp_order['price_net'])}} &euro;</td>
</tr>
<tr class="foot-small">
<td colspan="1" class="text-muted">
Enthaltene MwSt:
</td>
<td class="">&nbsp;</td>
<td class="">&nbsp;</td>
<td class="">&nbsp;</td>
<td class="text-muted text-right">{{ Util::formatNumber($hp_order['price']-$hp_order['price_net'])}} &euro;</td>
</tr>
</tfoot>
</table>
</div>

View file

@ -0,0 +1,11 @@
@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-2 mb-2">
<a href="{{route('admin_sales_customers')}}" class="btn btn-sm btn-default float-right">zurück</a>
{{ __('Bestellung Kunde') }} <span class="text-muted">#{{$shopping_order->id}}</span>
</h4>
@include('admin.sales._detail')
<a href="{{route('admin_sales_customers')}}" class="btn btn-sm btn-default mt-2 float-right">zurück</a>
@endsection

View file

@ -0,0 +1,103 @@
@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-2 mb-2">
{{ __('Bestellungen Kunden') }}
</h4>
<div class="card">
<div class="card-header">
<div class="form-row align-items-center">
<div class="col-sm-4 mb-2">
<label class="form-label" for="filter_member_id">Filter zugewiesener Berater</label>
<select class="custom-select" name="filter_member_id" id="filter_member_id">
<option value="">Filter aus</option>
@foreach($filter_members as $member)
<option value="{{$member->id}}" @if(get_user_attr('filter_member_id') == $member->id) selected @endif>{{$member->first_name}} {{$member->last_name}} |{{$member->email}}</option>
@endforeach
</select>
</div>
<div class="col-sm-4 mb-2">
</div>
<div class="col-10 col-sm-3 mb-2">
<label class="form-label" for="filter_txaction">Filter Status</label>
<select class="custom-select" name="filter_txaction" id="filter_txaction">
<option value="">Filter aus</option>
@foreach(\App\Services\Payment::$txaction_text as $id=>$name)
<option value="{{$id}}" @if(get_user_attr('filter_txaction') == $id) selected @endif>{{$name}}</option>
@endforeach
</select>
</div>
<div class="col-2 col-sm-1 mb-2 mt-4">
<a href="{{ route('admin_sales_customers') }}?reset=filter" data-toggle="tooltip" data-placement="top" title="Reset Filter" class="btn icon-btn btn-sm btn-outline-dark float-right">
<span class="fa fa-sync"></span>
</a>
</div>
</div>
</div>
<div class="card-datatable table-responsive">
<table class="datatable-customers table table-striped table-bordered" id="datatable-customers">
<thead>
<tr>
<th>#</th>
<th>{{__('Datum')}}</th>
<th>{{__('Betrag')}}</th>
<th>{{__('Zahlung')}}</th>
<th>{{__('Status')}}</th>
<th>{{__('Versand')}}</th>
<th>{{__('First name')}}</th>
<th>{{__('Last name')}}</th>
<th>{{__('E-Mail')}}</th>
<th>{{__('zugewiesener Berater')}}</th>
<th>{{__('Rf-Nr.')}}</th>
<th>{{__('Käufe')}}</th>
</tr>
</thead>
</table>
</div>
</div>
<script>
$( document ).ready(function() {
var oTable = $('#datatable-customers').DataTable({
"processing": true,
"serverSide": true,
ajax: {
url: '{!! route( 'admin_sales_customers_datatable') !!}',
data: function(d) {
d.filter_member_id = $('select[name=filter_member_id]').val();
d.filter_txaction = $('select[name=filter_txaction]').val();
}
},
"order": [[0, "desc" ]],
"columns": [
{ data: 'id', searchable: false },
{ data: 'created_at', name: 'shopping_orders.created_at' },
{ data: 'total_shipping', name: 'total_shipping' },
{ data: 'payment', name: 'payment', orderable: false },
{ data: 'txaction', name: 'txaction' },
{ data: 'shipped', name: 'shipped' },
{ data: 'shopping_user.billing_firstname', name: 'shopping_user.billing_firstname' },
{ data: 'shopping_user.billing_lastname', name: 'shopping_user.billing_lastname' },
{ data: 'shopping_user.billing_email', name: 'shopping_user.billing_email' },
{ data: 'member_id', name: 'member_id', searchable: false, orderable: false },
{ data: 'reference', name: 'reference' },
{ data: 'shopping_user.orders', name: 'shopping_user.orders' },
],
"bLengthChange": false,
"iDisplayLength": 100,
"language": {
"url": "/js/German.json"
}
});
$('#filter_member_id').on('change', function(){
oTable.draw();
});
$('#filter_txaction').on('change', function(){
oTable.draw();
});
});
</script>
@endsection

View file

@ -0,0 +1,12 @@
@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-2 mb-2">
<a href="{{route('admin_sales_users')}}" class="btn btn-sm btn-default float-right">zurück</a>
{{ __('Bestellung Berater') }} <span class="text-muted">#{{$shopping_order->id}}</span>
</h4>
@include('admin.sales._detail')
<a href="{{route('admin_sales_users')}}" class="btn btn-sm btn-default mt-2 float-right">zurück</a>
@endsection

View file

@ -0,0 +1,71 @@
@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-2 mb-2">
{{ __('Bestellungen Berater') }}
</h4>
<div class="card">
<div class="card-datatable table-responsive">
<table class="datatable-users table table-striped table-bordered">
<thead>
<tr>
<th>#</th>
<th>{{__('Datum')}}</th>
<th>{{__('Betrag')}}</th>
<th>{{__('Zahlung')}}</th>
<th>{{__('Status')}}</th>
<th>{{__('Versand')}}</th>
<th>{{__('Art')}}</th>
<th>{{__('First name')}}</th>
<th>{{__('Last name')}}</th>
<th>{{__('E-Mail')}}</th>
<th>B.{{__('First name')}}</th>
<th>B.{{__('Last name')}}</th>
<th>B.{{__('E-Mail')}}</th>
<th>{{__('Rf-Nr.')}}</th>
<th>{{__('Käufe')}}</th>
</tr>
</thead>
</table>
</div>
</div>
<script>
$( document ).ready(function() {
$('.datatable-users').dataTable({
"processing": true,
"serverSide": true,
"ajax": '{!! route('admin_sales_users_datatable') !!}',
"order": [[0, "desc" ]],
"columns": [
{ data: 'id', searchable: false },
{ data: 'created_at', name: 'shopping_orders.created_at' },
{ data: 'total_shipping', name: 'total_shipping' },
{ data: 'payment', name: 'payment', orderable: false },
{ data: 'txaction', name: 'txaction' },
{ data: 'shipped', name: 'shipped' },
{ data: 'is_for', name: 'is_for', orderable: false },
{ data: 'shopping_user.shipping_firstname', name: 'shopping_user.shipping_firstname', orderable: false },
{ data: 'shopping_user.shipping_lastname', name: 'shopping_user.shipping_lastname', orderable: false },
{ data: 'shopping_user.shipping_email', name: 'shopping_user.shipping_email', orderable: false },
{ data: 'shopping_user.billing_firstname', name: 'shopping_user.billing_firstname', orderable: false },
{ data: 'shopping_user.billing_lastname', name: 'shopping_user.billing_lastname', orderable: false },
{ data: 'shopping_user.billing_email', name: 'shopping_user.billing_email', orderable: false },
{ data: 'reference', name: 'reference' },
{ data: 'shopping_user.orders', name: 'shopping_user.orders' },
],
"bLengthChange": false,
"iDisplayLength": 100,
"language": {
"url": "/js/German.json"
}
});
});
</script>
@endsection

View file

@ -0,0 +1,297 @@
@extends('layouts.layout-2')
@section('content')
@if ($errors->any())
<div class="row">
<div class="col-sm-12">
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
</div>
</div>
@endif
<h4 class="font-weight-bold py-2 mb-2">
{{ __('Create/Edit Versandkosten') }}
</h4>
<div class="text-left mt-0 mb-2">
<a href="{{ route('admin_shippings') }}" class="btn btn-default">{{ __('back') }}</a>
</div>
<div class="card mb-2">
{!! Form::open(['url' => route('admin_shipping_store'), 'class' => 'form-horizontal', 'id'=>'']) !!}
<input type="hidden" name="id" value="@if($value->id>0){{$value->id}}@else new @endif">
<h5 class="card-header">
{{ __('Versandkosten') }}
</h5>
<div class="card-body">
<div class="form-row">
<div class="form-group col-md-6">
<label class="form-label" for="name">{{ __('Name') }}*</label>
{{ Form::text('name', $value->name, array('placeholder'=>__('Name'), 'class'=>'form-control'.($errors->has('name') ? ' is-invalid' : ''), 'required')) }}
@if ($errors->has('name'))
<span class="invalid-feedback" style="display: inline-block;">
<strong>{{ $errors->first('name') }}</strong>
</span>
@endif
</div>
<div class="form-group col-md-6">
<label class="custom-control custom-checkbox float-right">
{!! Form::checkbox('active', 1, $value->active, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">{{__('aktiv')}}</span>
</label>
<label class="form-label" for="title">{{ __('Versandkosten frei ab') }}</label>
{{ Form::text('free', $value->getFormattedFree(), array('placeholder'=>__('in Euro, leer lassen ohne Freigrenze'), 'class'=>'form-control')) }}
</div>
</div>
<div class="text-left mt-0 mb-2">
<button type="submit" class="btn btn-secondary" name="action" value="shipping">{{ __('save') }}</button>&nbsp;
</div>
</div>
{!! Form::close() !!}
</div>
@if($value->id>0)
<div class="card mb-2">
<h6 class="card-header">
{{__('Preise')}}
</h6>
<div class="card-datatable table-responsive">
<table class="datatables-style table table-striped table-bordered">
<thead>
<tr>
<th style="max-width: 60px;">&nbsp;</th>
<th>{{__('Kunden Preis')}}</th>
<th>{{__('Kompensation Preis')}}</th>
<th>{{__('Anzahl KP')}}</th>
<th>{{__('Tax')}}</th>
<th>{{__('Preis von - bis')}}</th>
<th>{{__('Gewicht von - bis')}}</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach($value->prices as $price)
<tr>
<td>
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-price"
data-id="{{ $price->id }}"
data-price="{{ $price->getFormattedPrice() }}"
data-price_comp="{{ $price->getFormattedPriceComp() }}"
data-num_comp="{{ $price->num_comp }}"
data-tax_rate="{{ $price->getFormattedTaxRate() }}"
data-factor="{{ $price->getFormattedFactor() }}"
data-total_from="{{ $price->getFormatTotalFrom() }}"
data-total_to="{{ $price->getFormattedTotalTo() }}"
data-weight_from="{{ $price->weight_from }}"
data-weight_to="{{ $price->weight_to }}">
<span class="far fa-edit"></span>
</button>
</td>
<td>{{ $price->getFormattedPrice() }}</td>
<td>{{ $price->getFormattedPriceComp() }}</td>
<td>{{ $price->num_comp }}</td>
<td>{{ $price->getFormattedTaxRate() }}</td>
<td>{{ $price->getFormatTotalFrom() }} - {{ $price->getFormattedTotalTo() }}</td>
<td>{{ $price->weight_from }} - {{ $price->weight_to }}</td>
<td><a class="text-danger" href="{{ route('admin_shipping_price_delete', [$price->id]) }}" onclick="return confirm('{{__('Really delete entry?')}}');"><i class="far fa-trash-alt"></i></a></td>
</tr>
@endforeach
</tbody>
</table>
<div class="mt-4 ml-4">
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-price"
data-id="new"
data-price=""
data-price_comp=""
data-num_comp=""
data-tax_rate=""
data-factor="1"
data-total_from=""
data-total_to=""
data-weight_from=""
data-weight_to=""
>{{__('Neuen Preis erstellen')}}</button>
</div>
</div>
</div>
<!-- Modal template price -->
<div class="modal fade" id="modals-price">
<div class="modal-dialog">
<form class="modal-content" action="{{ route('admin_shipping_store') }}" method="post">
@csrf
<input type="hidden" name="id">
<input type="hidden" name="shipping_id" value="@if($value->id>0){{$value->id}}@else new @endif">
<div class="modal-header">
<h5 class="modal-title"> {{__('Preis')}} <span class="font-weight-light">{{__('create/edit')}}</span></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="form-row">
<div class="form-group col-6">
<label for="price" class="form-label">{{__('Kunden Preis (brutto)')}}*</label>
<input type="text" class="form-control" name="price" placeholder="{{__('Preis in Euro')}}" required>
</div>
<div class="form-group col-6">
<label for="price_comp" class="form-label">{{__('Kompensation Preis (brutto)')}}*</label>
<input type="text" class="form-control" name="price_comp" placeholder="{{__('Preis in Euro')}}" required>
</div>
</div>
<div class="form-row">
<div class="form-group col-6">
<label for="tax_rate" class="form-label">{{__('enthaltene Tax (%)')}}</label>
<input type="text" class="form-control" name="tax_rate" placeholder="{{__('Tax in %')}}">
</div>
<div class="form-group col-6">
<label for="num_comp" class="form-label">{{__('Anzahl Kompensationsprodukte')}}*</label>
<input type="text" class="form-control" name="num_comp" placeholder="{{__('Anzahl Kompensationsprodukte')}}" required>
</div>
</div>
<div class="form-row">
<div class="form-group col-6">
<label for="total_from" class="form-label">{{__('von Preis')}}</label>
<input type="text" class="form-control" name="total_from" placeholder="{{__('Preis in Euro')}}">
</div>
<div class="form-group col-6">
<label for="total_to" class="form-label">{{__('bis Preis')}}</label>
<input type="text" class="form-control" name="total_to" placeholder="{{__('Preis in Euro')}}">
</div>
</div>
<div class="form-row">
<div class="form-group col-6">
<label for="weight_from" class="form-label">{{__('von Gewicht (g)')}}</label>
<input type="text" class="form-control" name="weight_from" placeholder="{{__('in g')}}">
</div>
<div class="form-group col-6">
<label for="weight_to" class="form-label">{{__('bis Gewicht (g)')}}</label>
<input type="text" class="form-control" name="weight_to" placeholder="{{__('in g')}}">
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
<button type="submit" class="btn btn-primary" name="action" value="price">{{__('save')}}</button>
</div>
</form>
</div>
</div>
<div class="card mb-2">
<h6 class="card-header">
{{__('Land')}}
</h6>
<div class="card-datatable table-responsive">
<table class="datatables-style table table-striped table-bordered">
<tbody>
@foreach($value->countries as $country)
<tr>
<td>
{{ $country->country->de }}
</td>
<td>
@if(!$country->shopping_orders->count())
<a class="text-danger" href="{{ route('admin_shipping_country_delete', [$country->id]) }}" onclick="return confirm('{{__('Really delete entry?')}}');"><i class="far fa-trash-alt"></i></a>
@else
-
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
@if(!$value->countries->count())
<div class="mt-4 ml-4">
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-country"
data-id="new"
>{{__('Land hinzufügen')}}</button>
</div>
@endif
</div>
</div>
<!-- Modal template -->
<div class="modal fade" id="modals-country">
<div class="modal-dialog">
<form class="modal-content" action="{{ route('admin_shipping_store') }}" method="post">
@csrf
<input type="hidden" name="id">
<input type="hidden" name="shipping_id" value="@if($value->id>0){{$value->id}}@else new @endif">
<div class="modal-header">
<h5 class="modal-title"> {{__('Preis')}} <span class="font-weight-light">{{__('create/edit')}}</span></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="form-row">
<div class="form-group col">
<label for="country_ids" class="form-label">{{__('Versandkosten gelten für diese Länder')}}</label>
<select class="selectpicker" data-style="btn-default" name="country_ids[]">
{!! HTMLHelper::getCountriesWithoutUsedShippings() !!}
</select>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
<button type="submit" class="btn btn-primary" name="action" value="country">{{__('save')}}</button>
</div>
</form>
</div>
</div>
<script>
$( document ).ready(function() {
$('#modals-price').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
$(this).find(".modal-content input[name='id']").val(button.data('id'));
$(this).find(".modal-body input[name='price']").val(button.data('price'));
$(this).find(".modal-body input[name='price_comp']").val(button.data('price_comp'));
$(this).find(".modal-body input[name='num_comp']").val(button.data('num_comp'));
$(this).find(".modal-body input[name='tax_rate']").val(button.data('tax_rate'));
$(this).find(".modal-body input[name='factor']").val(button.data('factor'));
$(this).find(".modal-body input[name='total_from']").val(button.data('total_from'));
$(this).find(".modal-body input[name='total_to']").val(button.data('total_to'));
$(this).find(".modal-body input[name='weight_from']").val(button.data('weight_from'));
$(this).find(".modal-body input[name='weight_to']").val(button.data('weight_to'));
});
$('#modals-country').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
$(this).find(".modal-content input[name='id']").val(button.data('id'));
});
});
</script>
@endif
<div class="text-left mt-2 mb-2">
<a href="{{ route('admin_shippings') }}" class="btn btn-default">{{ __('back') }}</a>
</div>
@endsection

View file

@ -0,0 +1,60 @@
@extends('layouts.layout-2')
@section('content')
<div class="card">
<h6 class="card-header">
{{__('Versandkosten')}}
</h6>
<div class="card-datatable table-responsive">
<table class="datatables-style table table-striped table-bordered">
<thead>
<tr>
<th style="max-width: 60px;">&nbsp;</th>
<th>{{__('Name')}}</th>
<th>{{__('Status')}}</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach($values as $value)
<tr>
<td>
<a href="{{route('admin_shipping_edit', [$value->id])}}" class="btn icon-btn btn-sm btn-primary">
<span class="far fa-edit"></span>
</a>
</td>
<td>{{ $value->name }}</td>
<td data-sort="{{ $value->active }}">@if($value->active) <span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>@else<span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>@endif</td>
<td><a class="text-danger" href="{{ route('admin_shipping_delete', [$value->id]) }}" onclick="return confirm('{{__('Really delete entry?')}}');"><i class="far fa-trash-alt"></i></a></td>
</tr>
@endforeach
</tbody>
</table>
<div class="mt-4 ml-4">
<a href="{{route('admin_shipping_edit', ['new'])}}" class="btn btn-sm btn-primary">
{{__('Neue Versandkosten erstellen')}}
</a>
</div>
</div>
</div>
<script>
$( document ).ready(function() {
$('.datatables-style').dataTable({
"bLengthChange": false,
"iDisplayLength": 50,
"aoColumns": [
{ "sWidth": "10%" },
{ "sWidth": "70%" },
{ "sWidth": "10%" },
{ "sWidth": "10%" },
],
"language": {
"url": "/js/German.json"
}
});
});
</script>
@endsection

View file

@ -0,0 +1,41 @@
@extends('layouts.layout-2')
@section('content')
@if ($errors->any())
<div class="row">
<div class="col-sm-12">
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
</div>
</div>
@endif
<h4 class="font-weight-bold py-2 mb-2">
{{ __('Edit Startseite') }}
</h4>
{!! Form::open(['url' => route('admin_sites_store', [$site]), 'class' => 'form-horizontal', 'id'=>'']) !!}
<div class="text-left mt-0 mb-2">
<button type="submit" class="btn btn-submit btn-primary">{{ __('save') }}</button>&nbsp;
</div>
@include('admin.site.form')
<div class="text-left mt-0 mb-2">
<button type="submit" class="btn btn-submit btn-primary">{{ __('save') }}</button>&nbsp;
</div>
{!! Form::close() !!}
@include('admin.site.images')
@endsection

View file

@ -0,0 +1,46 @@
<div class="card mb-2">
<h5 class="card-header">
{{ __('Inhalte') }}
</h5>
<div class="card-body">
<div class="form-row">
<div class="form-group col">
<label class="form-label" for="headline">{{ __('Headline') }}*</label>
{{ Form::text('headline', $value->headline, array('placeholder'=>__('Headline'), 'class'=>'form-control', 'id'=>'headline', 'required')) }}
</div>
</div>
<div class="form-row">
<div class="form-group col">
<label class="form-label" for="copy">{{ __('Copy') }}*</label>
{{ Form::textarea('copy', $value->copy , array('placeholder'=>__('Copy'), 'class'=>'form-control', 'id'=>'copy', 'rows'=>6)) }}
</div>
</div>
<h3>Anzeige Produkte auf der Startseite</h3>
<div class="form-row">
<div class="form-group col-6">
<label for="products" class="form-label">{{__('Produkte')}}</label>
<select class="selectpicker" name="products[]" id="products" data-style="btn-light" data-live-search="true" multiple>
{!! HTMLHelper::getProductsOptions($value->products) !!}
</select>
</div>
<div class="form-group col-6">
<label for="set_products" class="form-label">{{__('Produktsets')}}</label>
<select class="selectpicker" name="set_products[]" id="set_products" data-style="btn-light" data-live-search="true" multiple>
{!! HTMLHelper::getProductsOptions($value->set_products) !!}
</select>
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,93 @@
<div class="card mb-2">
<h5 class="card-header">
{{ __('Headline Bild') }}
</h5>
<div class="card-body">
@if($value->id>0)
<style>
.dz-message {
margin: 2rem 0;
}
.default-style .dz-message {
font-size: 1.1em;
}
</style>
<div class="row">
<div class="col-12">
</div>
<div class="col-12">
<div class="row">
@if($value->iq_image_id)
<div class="col-12 text-center" style="border: 1px solid #eee;">
<img class="" alt="" src="{{ route('iq_image', [$value->iq_image->slug]) }}">
<br>
<a href="{{ route('admin_sites_image_delete', [$value->slug, $value->iq_image->id]) }}" class="btn btn-sm btn-primary mt-2 mb-2" onclick="return confirm('Bild wirklich löschen?');">Bild löschen</a>
@if($value->iq_image->active)
<a href="{{ route('admin_sites_image_attribute', [$value->slug, $value->iq_image->id, 'active', 0]) }}" class="btn btn-sm btn-default mt-2 mb-2"><span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span> <i class="far fa-sync"></i></a>
@else
<a href="{{ route('admin_sites_image_attribute', [$value->slug, $value->iq_image->id, 'active', 1]) }}" class="btn btn-sm btn-default mt-2 mb-2"><span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span> <i class="far fa-sync"></i></a>
@endif
</div>
@endif
</div>
</div>
<div class="col-12">
<hr>
@if(!$value->iq_image_id)
<div class="card">
<div class="card-body">
<form method="POST" action="{{ route('admin_sites_image_upload', [$value->slug]) }}" accept-charset="UTF-8" class="avatar" enctype="multipart/form-data">
@csrf
<input type="hidden" name="value_id" value="{{$value->id}}">
<div class="slim_holder text-center">
<div class="slim" style="margin:20px auto;"
data-label='<span class="text-green">Foto-Upload</span><br>(Datei suchen oder Drag & Drop)'
data-fetcher="fetch.php"
data-size="1920,640"
data-min-size="100,100"
data-max-file-size="10"
data-status-image-too-small="Bild zu klein<br>min. $0 Pixel"
data-status-file-type="Ungültige Datei<br>bitte nur: $0"
data-status-file-size="Die Datei ist zu groß<br>max. $0 MB"
data-button-confirm-label="bestätigen"
data-button-cancel-label="abbrechen"
data-button-confirm-title="bestätigen"
data-button-cancel-title="abbrechen"
data-button-rotate-title="drehen"
data-ratio="">
<input type="file" name="images[]" required />
</div>
<br>
<button class="btn btn-primary" type="submit">Bild speichern</button>
</div>
</form>
</div>
</div>
@else
<p> Nur ein Bild möglich, vor neuem Upload Bild löschen </p>
@endif
</div>
</div>
@else
<p>Kategorie erst anlegen</p>
@endif
</div>
</div>

View file

@ -0,0 +1,36 @@
@extends('layouts.layout-2')
@section('content')
@if ($errors->any())
<div class="row">
<div class="col-sm-12">
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
</div>
</div>
@endif
<h4 class="font-weight-bold py-2 mb-2">
{{ __('Create/Edit Contact') }}
</h4>
{!! Form::open(['url' => route('admin_user_store'), 'class' => 'form-horizontal', 'id'=>'lead-form-validation']) !!}
<input type="hidden" name="user_id" id="user_id" value="@if($user->id>0){{$user->id}}@else new @endif">
{{-- @include('user.form') --}}
<div class="text-left mt-3">
<button type="submit" class="btn btn-submit">{{ __('save') }}</button>&nbsp;
<a href="{{ route('admin_users') }}" class="btn btn-default">{{ __('abort') }}</a>
</div>
{!! Form::close() !!}
@endsection

View file

@ -0,0 +1,383 @@
@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-2 mb-2">
{{ __('User') }}
</h4>
<div class="card">
<div class="card-datatable table-responsive">
<table class="datatables-users table table-striped table-bordered">
<thead>
<tr>
<th>#</th>
<th>{{__('First name')}}</th>
<th>{{__('Last name')}}</th>
<th>{{__('E-Mail')}}</th>
<th>{{__('Zugang')}}</th>
<th>{{__('verified')}} (seit)</th>
<th>{{__('active')}} (seit)</th>
<th>{{__('Account')}} (bis)</th>
<th>{{__('Zahlungsarten')}}</th>
<th>{{__('Test Modus')}}</th>
<th>{{__('delete')}}</th>
</tr>
</thead>
</table>
</div>
</div>
<!-- Modal admin -->
<div class="modal fade" id="modals-admin">
<div class="modal-dialog">
<form class="modal-content" action="{{ route('admin_user_store') }}" method="post">
@csrf
<input type="hidden" class="form-control" name="id">
<div class="modal-header">
<h5 class="modal-title">{{__('User')}} <span class="font-weight-light">{{__('create/edit')}}</span></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="form-row">
<div class="form-group col">
<label for="email" class="form-label">{{__('E-Mail')}}</label>
<input type="text" class="form-control" name="email" placeholder="{{__('E-Mail')}}" readonly>
</div>
</div>
<div class="form-row">
<div class="form-group col">
<label for="admin" class="form-label">{{__('Role')}}</label>
<select class="selectpicker" data-style="btn-default" name="admin">
{!! HTMLHelper::getRolesOptions() !!}
</select>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
<button type="submit" class="btn btn-primary" name="save-admin" value="save-admin">{{__('save')}}</button>
</div>
</form>
</div>
</div>
<!-- Modal confirmed -->
<div class="modal fade" id="modals-confirmed">
<div class="modal-dialog">
<form class="modal-content" action="{{ route('admin_user_store') }}" method="post">
@csrf
<input type="hidden" class="form-control" name="id">
<div class="modal-header">
<h5 class="modal-title">{{__('User')}} <span class="font-weight-light">{{__('create/edit')}}</span></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="form-row">
<div class="form-group col">
<label for="email" class="form-label">{{__('E-Mail')}}</label>
<input type="text" class="form-control" name="email" placeholder="{{__('E-Mail')}}" readonly>
</div>
</div>
<div class="form-group">
<label class="custom-control custom-checkbox m-0">
<input type="checkbox" class="custom-control-input" name="confirmed" checked>
<span class="custom-control-label">{{__('verified')}}</span>
</label>
</div>
<div class="form-row">
<div class="form-group col">
<label for="confirmation_date" class="form-label">{{__('Datum')}} seit</label>
<input type="text" name="confirmation_date" class="form-control b-material-datetime-picker" placeholder="25.10.2020 10:30">
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
<button type="submit" class="btn btn-primary" name="save-confirmed" value="save-confirmed">{{__('save')}}</button>
</div>
</form>
</div>
</div>
<!-- Modal active -->
<div class="modal fade" id="modals-active">
<div class="modal-dialog">
<form class="modal-content" action="{{ route('admin_user_store') }}" method="post">
@csrf
<input type="hidden" class="form-control" name="id">
<div class="modal-header">
<h5 class="modal-title">{{__('User')}} <span class="font-weight-light">{{__('create/edit')}}</span></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="form-row">
<div class="form-group col">
<label for="email" class="form-label">{{__('E-Mail')}}</label>
<input type="text" class="form-control" name="email" placeholder="{{__('E-Mail')}}" readonly>
</div>
</div>
<div class="form-group">
<label class="custom-control custom-checkbox m-0">
<input type="checkbox" class="custom-control-input" name="active" checked>
<span class="custom-control-label">{{__('active')}}</span>
</label>
</div>
<div class="form-row">
<div class="form-group col">
<label for="active_date" class="form-label">{{__('Datum')}} seit</label>
<input type="text" name="active_date" class="form-control b-material-datetime-picker" placeholder="25.10.2020 10:30">
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
<button type="submit" class="btn btn-primary" name="save-active" value="save-active">{{__('save')}}</button>
</div>
</form>
</div>
</div>
<!-- Modal account -->
<div class="modal fade" id="modals-account">
<div class="modal-dialog">
<form class="modal-content" action="{{ route('admin_user_store') }}" method="post">
@csrf
<input type="hidden" class="form-control" name="id">
<div class="modal-header">
<h5 class="modal-title">{{__('User')}} <span class="font-weight-light">{{__('create/edit')}}</span></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="form-row">
<div class="form-group col">
<label for="email" class="form-label">{{__('E-Mail')}}</label>
<input type="text" class="form-control" name="email" placeholder="{{__('E-Mail')}}" readonly>
</div>
</div>
<div class="form-row">
<div class="form-group col">
<label for="payment_account" class="form-label">{{__('Account')}} bis</label>
<input type="text" name="payment_account" class="form-control b-material-datetime-picker" placeholder="25.10.2020 10:30">
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
<button type="submit" class="btn btn-primary" name="save-account" value="save-account">{{__('save')}}</button>
</div>
</form>
</div>
</div>
<!-- Modal account -->
<div class="modal fade" id="modals-shop">
<div class="modal-dialog">
<form class="modal-content" action="{{ route('admin_user_store') }}" method="post">
@csrf
<input type="hidden" class="form-control" name="id">
<div class="modal-header">
<h5 class="modal-title">{{__('User')}} <span class="font-weight-light">{{__('create/edit')}}</span></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="form-row">
<div class="form-group col">
<label for="email" class="form-label">{{__('E-Mail')}}</label>
<input type="text" class="form-control" name="email" placeholder="{{__('E-Mail')}}" readonly>
</div>
</div>
<div class="form-row">
<div class="form-group col">
<label for="payment_shop" class="form-label">{{__('Shop')}} bis</label>
<input type="text" name="payment_shop" class="form-control b-material-datetime-picker" placeholder="25.10.2020 10:30">
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
<button type="submit" class="btn btn-primary" name="save-shop" value="save-shop">{{__('save')}}</button>
</div>
</form>
</div>
</div>
<!-- Modal test modus -->
<div class="modal fade" id="modals-test_mode">
<div class="modal-dialog">
<form class="modal-content" action="{{ route('admin_user_store') }}" method="post">
@csrf
<input type="hidden" class="form-control" name="id">
<div class="modal-header">
<h5 class="modal-title">{{__('User')}} <span class="font-weight-light">{{__('create/edit')}}</span></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="form-row">
<div class="form-group col">
<label for="email" class="form-label">{{__('E-Mail')}}</label>
<input type="text" class="form-control" name="email" placeholder="{{__('E-Mail')}}" readonly>
</div>
</div>
<div class="form-group">
<p>Aktiviert den Testmodus beim den Zahlungsdiensten. Käufe werden als TEST markiert</p>
<label class="custom-control custom-checkbox m-0">
<input type="checkbox" class="custom-control-input" name="test_mode" checked>
<span class="custom-control-label">{{__('Test Mode')}}</span>
</label>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
<button type="submit" class="btn btn-primary" name="save-test_mode" value="save-test_mode">{{__('save')}}</button>
</div>
</form>
</div>
</div>
<!-- Modal test modus -->
<div class="modal fade" id="modals-payment_methods">
<div class="modal-dialog">
<form class="modal-content" action="{{ route('admin_user_store') }}" method="post">
@csrf
<input type="hidden" class="form-control" name="id">
<div class="modal-header">
<h5 class="modal-title">{{__('User')}} <span class="font-weight-light">{{__('create/edit')}}</span></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="form-row">
<div class="form-group col">
<label for="email" class="form-label">{{__('E-Mail')}}</label>
<input type="text" class="form-control" name="email" placeholder="{{__('E-Mail')}}" readonly>
</div>
</div>
@foreach(\App\Models\PaymentMethod::where('active', true)->get() as $payment_method)
<div class="form-group">
<label class="custom-control custom-checkbox m-0">
<input type="checkbox" class="custom-control-input input-payment-methods" name="payment_methods[]" value="{{$payment_method->id}}" @if($payment_method->default) checked @endif>
<span class="custom-control-label">{{ $payment_method->name }}</span>
</label>
</div>
@endforeach
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
<button type="submit" class="btn btn-primary" name="save-payment_methods" value="save-payment_methods">{{__('save')}}</button>
</div>
</form>
</div>
</div>
<script>
$( document ).ready(function() {
$('#modals-admin').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
$(this).find(".modal-content input[name='id']").val(button.data('id'));
$(this).find(".modal-body input[name='email']").val(button.data('email'));
$(this).find(".modal-body select[name='admin']").val(button.data('admin'));
$('.selectpicker').selectpicker('refresh');
});
$('#modals-confirmed').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
$(this).find(".modal-content input[name='id']").val(button.data('id'));
$(this).find(".modal-body input[name='email']").val(button.data('email'));
$(this).find(".modal-body input[name='confirmed']").prop( "checked", button.data('confirmed'));
$(this).find(".modal-body input[name='confirmation_date']").val(button.data('confirmation_date'));
});
$('#modals-active').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
$(this).find(".modal-content input[name='id']").val(button.data('id'));
$(this).find(".modal-body input[name='email']").val(button.data('email'));
$(this).find(".modal-body input[name='active']").prop( "checked", button.data('active'));
$(this).find(".modal-body input[name='active_date']").val(button.data('active_date'));
});
$('#modals-account').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
$(this).find(".modal-content input[name='id']").val(button.data('id'));
$(this).find(".modal-body input[name='email']").val(button.data('email'));
$(this).find(".modal-body input[name='payment_account']").val(button.data('payment_account'));
});
$('#modals-shop').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
$(this).find(".modal-content input[name='id']").val(button.data('id'));
$(this).find(".modal-body input[name='email']").val(button.data('email'));
$(this).find(".modal-body input[name='payment_shop']").val(button.data('payment_shop'));
});
$('#modals-payment_methods').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
$(this).find(".modal-content input[name='id']").val(button.data('id'));
$(this).find(".modal-body input[name='email']").val(button.data('email'));
var payment_methods = button.data('payment_methods');
if(payment_methods){
$.each($(this).find(".modal-body .input-payment-methods"), function (i, item) {
if($.inArray(parseInt($(item).val()), payment_methods) !== -1){
$(item).prop( "checked", true);
}else{
$(item).prop( "checked", false);
}
});
}
});
$('#modals-test_mode').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
$(this).find(".modal-content input[name='id']").val(button.data('id'));
$(this).find(".modal-body input[name='email']").val(button.data('email'));
$(this).find(".modal-body input[name='test_mode']").prop( "checked", button.data('test_mode'));
});
$('.datatables-users').dataTable({
"processing": true,
"serverSide": true,
"ajax": '{!! route('data_table_users') !!}',
"order": [[0, "desc" ]],
"columns": [
{ data: 'id', searchable: false},
{ data: 'first_name', name: 'account.first_name' },
{ data: 'last_name', name: 'account.last_name' },
{ data: 'email', name: 'email' },
{ data: 'admin', name: 'admin' },
{ data: 'confirmed', name: 'confirmed' },
{ data: 'active', name: 'active' },
{ data: 'account', name: 'account' },
{ data: 'my_payment_methods', name: 'my_payment_methods' },
{ data: 'test_mode', name: 'test_mode' },
{ data: 'action_delete', orderable: false, searchable: false},
],
"bLengthChange": false,
"iDisplayLength": 50,
"language": {
"url": "/js/German.json"
}
});
});
</script>
@endsection