Customers Add+Edit, API WP

This commit is contained in:
Kevin Adametz 2020-06-12 14:46:51 +02:00
parent dc63fa9fb2
commit 75a0f9a38a
120 changed files with 11894 additions and 6134 deletions

View file

@ -36,14 +36,14 @@
{{ Form::text('ru', $country->ru, array('placeholder'=>__('Land RU'), 'class'=>'form-control', 'id'=>'ru')) }}
</div>
</div>
<hr>
<hr>
<div class="form-row">
<div class="form-group col-sm-6">
<label class="form-label" for="code">{{ __('code') }}</label>
<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">{{ __('phone') }}</label>
<label class="form-label" for="phone">Telefonvorwahl</label>
{{ Form::text('phone', $country->phone, array('placeholder'=>__('phone'), 'class'=>'form-control', 'id'=>'phone')) }}
</div>
</div>
@ -51,6 +51,66 @@
</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">
@ -82,6 +142,7 @@
<div class="card mb-2">
<h5 class="card-header">
{{ __('Übersetzungen') }}
@ -100,3 +161,19 @@
</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

@ -15,6 +15,10 @@
<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>
@ -28,17 +32,29 @@
<td>{{ $value->de }}</td>
<td>{{ $value->code }}</td>
<td>{{ $value->phone }}</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 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">
{{--
<a href="{{route('admin_product_category_edit', ['new'])}}" class="btn btn-sm btn-primary">
{{__('Neue Kategorie erstellen')}}
</a>
-->
--}}
</div>
</div>
</div>
@ -50,13 +66,7 @@
"bLengthChange": false,
"iDisplayLength": 50,
"order": [[ 0, "asc" ]],
"aoColumns": [
{ "sWidth": "8%" },
{ "sWidth": "20%" },
{ "sWidth": "10%" },
{ "sWidth": "10%" },
{ "sWidth": "8%" },
],
"language": {
"url": "/js/German.json"
}

View file

@ -1,37 +1,54 @@
<div class="card">
<!-- Info -->
<div class="card-body pb-1">
@if($isAdmin)
<div class="row">
<div class="col-md-4 mb-3">
<div class="text-muted small">Datum</div>
{{$shopping_user->created_at->format("d.m.Y H:i")}}
<div class="col-md-3 mb-3">
<div class="text-muted small">E-Mail</div>
{{ $shopping_user->billing_email }}
</div>
<div class="col-md-4 mb-3">
<div class="col-md-3 mb-3">
<div class="text-muted small">Kundennummer</div>
{{$shopping_user->number}}
</div>
<div class="col-md-4 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 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>
{{ $shopping_user->billing_email }}
</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">
<a class="btn btn-sm btn-secondary mt-2" href="{{route('user_customer_edit', [$shopping_user->id])}}">Kundendaten bearbeiten</a>
</div>
</div>
@endif
</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">
<div class="col-md-6 mb-3">
@if(isset($change_member_error) && $change_member_error)
<div class="row">
<div class="col-sm-12">
@ -44,16 +61,14 @@
</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_edit', [$shopping_user->id])}}"
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
@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>
@ -64,10 +79,8 @@
data-view="customer"
data-route="{{ route('modal_load') }}"><span class="fa fa-edit"></span></button>
@endif
</div>
<div class="col-md-4 mb-3">
<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())
@ -77,6 +90,16 @@
@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>
</div>
</div>
<hr class="m-0">
@ -95,7 +118,6 @@
{{ $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) }}
@ -127,17 +149,13 @@
{{ $shopping_user->billing_city }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">E-Mail</div>
{{ $shopping_user->billing_email }}
<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 class="col-md-3 mb-3">
<div class="text-muted small">Land</div>
{{ $shopping_user->billing_country->getLocated() }}
</div>
</div>
</div>
<hr class="m-0">
@ -158,7 +176,6 @@
{{ $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) }}
@ -190,23 +207,41 @@
{{ $shopping_user->shipping_city }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">E-Mail</div>
{{ $shopping_user->shipping_email }}
<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 class="col-md-3 mb-3">
<div class="text-muted small">Land</div>
{{ $shopping_user->shipping_country->getLocated() }}
</div>
</div>
@endif
</div>
<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">
@ -323,4 +358,5 @@
</table>
</div>
</div>
@endif
</div>

View file

@ -0,0 +1,388 @@
<div class="card mb-4">
<h5 class="card-header">
<div class="row">
<div class="col-xs-12 col-sm-6">
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-12 {{ $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>
<hr>
<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>
</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>
@if($isView === 'customer-add')
{{ Form::hidden('billing_email_1', $billing_email) }}
{{ Form::hidden('billing_email-confirm_1', $billing_email) }}
<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>
@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
</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

@ -4,7 +4,7 @@
<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') }} <span class="text-muted">#{{$shopping_user->id}}</span>
{{ __('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>

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

@ -41,7 +41,6 @@
<!--<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>
@ -56,6 +55,7 @@
<th>{{__('Stadt')}}</th>
<th>{{__('Land')}}</th>
<th>{{__('Käufe')}}</th>
<th>{{__('Newsletter')}}</th>
<th>{{__('zugewiesener Berater')}}</th>
<th>{{__('Datum')}}</th>
</tr>
@ -98,6 +98,7 @@
{ 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' },
],

View file

@ -66,6 +66,32 @@
</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>
@ -80,14 +106,17 @@
<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>
@ -99,7 +128,6 @@
@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">

View file

@ -22,11 +22,8 @@
{{ 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>
@ -53,28 +50,28 @@
<div class="card mb-2">
<h5 class="card-header">
{{ __('Preise') }}
{{ __('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') }}</label>
{{ Form::text('price', $product->getFormattedPrice(), array('placeholder'=>__('price'), 'class'=>'form-control', 'id'=>'price')) }}
<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') }}</label>
{{ Form::text('price_ek', $product->getFormattedPriceEk(), array('placeholder'=>__('price_ek'), 'class'=>'form-control', 'id'=>'price_ek')) }}
<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') }}</label>
{{ Form::text('tax', $product->getFormattedTax(), array('placeholder'=>__('tax'), 'class'=>'form-control', 'id'=>'tax')) }}
<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 (wenn > 0)') }}</label>
{{ Form::text('price_old', $product->getFormattedPriceOld(), array('placeholder'=>__('price_old'), 'class'=>'form-control', 'id'=>'price_old')) }}
<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>
@ -85,18 +82,108 @@
{{ 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') }}</label>
<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'=>__('amount'), 'class'=>'form-control', 'id'=>'amount')) }}
{{ 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">
@ -135,24 +222,25 @@
</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>
<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">{{ __('Inhaltsstoffe') }}</label>
{{ Form::textarea('ingredients', $product->ingredients , array('placeholder'=>__('ingredients'), 'class'=>'form-control summernote', 'id'=>'ingredients')) }}
</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">{{ __('Inhaltsstoffe') }}</label>
{{ Form::textarea('ingredients', $product->ingredients , array('placeholder'=>__('ingredients'), 'class'=>'form-control summernote', 'id'=>'ingredients')) }}
</div>
</div>
</div>
@ -176,6 +264,12 @@
{{ Form::text('upgrade_to_id', $product->upgrade_to_id, array('placeholder'=>__('Product ID when need an upgrade'), '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 Leerreichen 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>

View file

@ -13,8 +13,20 @@
</li>
@if(Auth::user()->showSideNav())
<li class="sidenav-item{{ Request::is('user/edit') ? ' active' : '' }}">
<a href="{{ route('user_edit') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-create"></i><div>{{ __('navigation.my_data') }}</div></a>
<li class="sidenav-item @if(Request::is('user/edit', 'user/membership')) open @endif">
<a href="javascript:void(0)" class="sidenav-link sidenav-toggle">
<i class="sidenav-icon ion ion-ios-contact"></i>
<div>{{ __('navigation.my_account') }}</div>
</a>
<ul class="sidenav-menu">
<li class="sidenav-item{{ Request::is('user/edit') ? ' active' : '' }}">
<a href="{{ route('user_edit') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-create"></i><div>{{ __('navigation.my_data') }}</div></a>
</li>
<li class="sidenav-item{{ Request::is('user/membership') ? ' active' : '' }}">
<a href="{{ route('user_membership') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-people"></i><div>{{ __('navigation.membership') }}</div></a>
</li>
</ul>
</li>
@if(Auth::user()->isActiveShop())
@ -46,6 +58,22 @@
</ul>
</li>
@endif
@if(Auth::user()->isActiveAccount())
<li class="sidenav-item @if(Request::is('user/customers', 'user/customer/*')) open @endif">
<a href="javascript:void(0)" class="sidenav-link sidenav-toggle">
<i class="sidenav-icon ion ion-md-contacts"></i>
<div>{{ __('navigation.my_clients') }}</div>
</a>
<ul class="sidenav-menu">
<li class="sidenav-item{{ Request::is('user/customers', 'user/customer/detail/*') ? ' active' : '' }}">
<a href="{{ route('user_customers') }}" class="sidenav-link"><i class="sidenav-icon ion ion ion-md-contacts"></i><div>{{ __('navigation.overview') }}</div></a>
</li>
<li class="sidenav-item{{ Request::is('user/customer/add/*') ? ' active' : '' }}">
<a href="{{ route('user_customer_add', ['new']) }}" class="sidenav-link"><i class="sidenav-icon ion ion ion-md-person-add"></i><div>{{ __('navigation.add') }}</div></a>
</li>
</ul>
</li>
@endif
@endif
@if(Auth::user()->isAdmin())
@ -56,10 +84,9 @@
<a href="{{ route('admin_leads') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-contacts"></i><div>{{ __('navigation.member') }}</div></a>
</li>
<li class="sidenav-item{{ Request::is('admin/customers') ? ' active' : '' }} {{ Request::is('admin/customer/edit/*') ? ' active' : '' }}">
<li class="sidenav-item{{ Request::is('admin/customers') ? ' active' : '' }} {{ Request::is('admin/customer/*') ? ' active' : '' }}">
<a href="{{ route('admin_customers') }}" class="sidenav-link"><i class="sidenav-icon ion ion-md-contacts"></i><div>{{ __('navigation.clients') }}</div></a>
</li>
<li class="sidenav-item @if(Request::is('admin/sales/*')) open @endif">
<a href="javascript:void(0)" class="sidenav-link sidenav-toggle">
<i class="sidenav-icon ion ion-ios-cart"></i>
@ -162,7 +189,9 @@
</li>
<li class="sidenav-item{{ Request::is('sysadmin/tools/shopping_orders') ? ' active' : '' }}">
<a href="{{ route('sysadmin_tools_shopping_orders') }}" class="sidenav-link"><i class="sidenav-icon ion ion-md-analytics"></i><div>Shopping Orders</div></a>
</li>
<li class="sidenav-item{{ Request::is('sysadmin/import') ? ' active' : '' }}">
<a href="{{ route('sysadmin_import') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-cloud-upload"></i><div>Import</div></a>
</li>
</ul>
</li>

View file

@ -24,17 +24,17 @@
<div class="card mb-4">
{{-- <div class="card-body">
<!-- Controls -->
{!! Form::open(['url' => url()->current(), 'class' => '']) !!}
<div class="form-group mb-1">
<label class="form-label" for="description">Description</label>
{{ Form::textarea('text', $text, array('class'=>'form-control', 'rows'=>20)) }}
</div>
<button type="submit" class="btn btn-primary"><i class="ion"></i> action</button>
{{-- <div class="card-body">
<!-- Controls -->
{!! Form::open(['url' => url()->current(), 'class' => '']) !!}
<div class="form-group mb-1">
<label class="form-label" for="description">Description</label>
{{ Form::textarea('text', $text, array('class'=>'form-control', 'rows'=>20)) }}
</div>
<button type="submit" class="btn btn-primary"><i class="ion"></i> action</button>
{!! Form::close() !!}
</div>--}}
{!! Form::close() !!}
</div>--}}
@if(count($values)>0)
<div class="card-body">

View file

@ -21,31 +21,56 @@
Kunden
</h4>
{!! Form::open(['url' => url()->current(), 'class' => '']) !!}
<div class="card mb-4">
{{-- <div class="card-body">
<div class="card-body">
<!-- Controls -->
{!! Form::open(['url' => url()->current(), 'class' => '']) !!}
<div class="form-group mb-1">
<label class="form-label" for="description">Description</label>
{{ Form::textarea('text', $text, array('class'=>'form-control', 'rows'=>20)) }}
{{ Form::textarea('text', $text, array('class'=>'form-control', 'rows'=>1)) }}
</div>
<button type="submit" class="btn btn-primary"><i class="ion"></i> action</button>
<button type="submit" name="action" value="checkForAll" class="btn btn-primary"><i class="ion"></i> checkForAll</button>
{!! Form::close() !!}
</div>--}}
</div>
@if(count($values)>0)
<div class="card-body">
<div class="card-datatable table-responsive">
<table class="table table-striped table-bordered">
<thead>
<tr>
<th style="max-width: 60px;">ID</th>
<th>{{__('Mail')}}</th>
<th>{{__('is like')}}</th>
<th>{{__('OrderID')}}</th>
<th>{{__('txaction')}}</th>
<th>{{__('Action')}}</th>
</tr>
</thead>
<tbody>
@foreach($values as $shopping_user)
<tr>
<td>{{$shopping_user->id}}</td>
<td>{{$shopping_user->billing_email}}</td>
<td>{{$shopping_user->is_like}}</td>
<td>@if($shopping_user->shopping_order){{$shopping_user->shopping_order->id}}@endif</td>
<td>@if($shopping_user->shopping_order){{$shopping_user->shopping_order->txaction}}@endif</td>
<td><button type="submit" name="action" value="checkOne_{{$shopping_user->id}}" class="btn btn-xs btn-primary"><i class="ion"></i> checkOne</button></td>
</tr>
@endforeach
</tbody>
</table>
<!-- Controls -->
@foreach($values as $shopping_user)
<pre>{{$shopping_user->billing_email}} |
@if($shopping_user->shopping_order && $shopping_user->shopping_order->user_shop) {{ $shopping_user->shopping_order->user_shop->user_id}} @endif {{$shopping_user->orders}}</pre>
@endforeach
</div>
</div>
@endif
</div>
{!! Form::close() !!}
@endsection

View file

@ -0,0 +1,104 @@
@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-3 mb-4">
Kontakte Import Status
</h4>
<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">{{ __('eingelesene Datensätze') }}</div>
<div class="text-large">{{ $import['count'] }}</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">{{ __('Kontakte importiert') }}</div>
<div class="text-large">{{ count($import['imported']) }}</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-danger"></div>
<div class="ml-3">
<div class="text-muted small">{{ __('ohne E-Mai Adresse') }}</div>
<div class="text-large">{{ $import['not'] }}</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-danger"></div>
<div class="ml-3">
<div class="text-muted small">{{__('Mail schon vorhanden')}}</div>
<div class="text-large">{{ count($import['has_imported']) }}</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="card mb-4">
<div class="card-body">
<table class="table user-view-table m-0">
<tbody>
<tr>
<td style="border-top: none">{{__('Datei')}}:</td>
<td style="border-top: none">{{ $file }} </td>
</tr>
<tr>
<td>{{__('Import Position start')}}:</td>
<td>{{$skip}}</td>
</tr>
<tr>
<td>{{__('Import limit')}}:</td>
<td>{{ $limit }}</td>
</tr>
</tbody>
</table>
<hr>
<h5>Vorhandene Mails</h5>
@foreach($import['has_imported'] as $row)
{{$row}} <br>
@endforeach
</div>
</div>
@endsection

View file

@ -0,0 +1,109 @@
@extends('layouts.layout-2')
@section('content')
<style>
/* Dropzone */
.dropzone {
min-height: 230px;
border: 2px dashed rgba(0, 0, 0, 0.3);
background: white;
border-radius: 6px;
}
.dropzone .dz-message {
font-size: 28px;
}
</style>
<h4 class="font-weight-bold py-3 mb-4">
Kontakte importieren
</h4>
<div class="card mb-4">
<h6 class="card-header">
Excel-Datei hochladen
</h6>
<div class="card-body">
{!! Form::open([ 'url' => route('sysadmin_import_store'), 'method' => 'post', 'files' => true, 'enctype' => 'multipart/form-data', 'class' => 'dropzone', 'id' => 'realDropzone' ]) !!}
<div class="fallback">
<input name="file" type="file" multiple>
</div>
{!! Form::close() !!}
<br>
<div class="alert alert-danger alert-dismissable" style="display:none;"></div>
</div>
</div>
@endsection
@section('scripts')
<script type="text/javascript">
var real_dropzone = {
uploadMultiple: false,
parallelUploads: 1,
maxFilesize: 32,
addRemoveLinks: true,
dictDefaultMessage: 'Hier klicken, oder Datei hier reinziehen (Drag&Drop)',
dictFallbackMessage: 'Dein Browser unterstützt Drag&Drop Dateiuploads nicht',
dictFallbackText: 'Benutze das Formular um Deine Dateien hochzuladen',
dictFileTooBig: "Die Datei ist zu groß. Die maximale Dateigröße beträgt 32 MB",
dictInvalidFileType: 'Eine Datei dieses Typs kann nicht hochgeladen werden',
dictResponseError: "Der Server hat ihre Anfrage mit Status error abgelehnt",
dictCancelUpload: 'Hochladen abbrechen',
dictCancelUploadConfirmation: null,
dictRemoveFile: 'Datei entfernen',
dictMaxFilesExceeded: 'Du kannst keine weiteren Dateien mehr hochladen',
// The setting up of the dropzone
init:function() {
console.log("init");
this.on("removedfile", function(file) {
var _ele = $('.alert-danger');
_ele.fadeOut();
} );
this.on("addedfile", function (file) {
var _ele = $('.alert-danger');
_ele.fadeOut();
});
},
error: function(file, response) {
console.log(file);
console.log(response);
var message
if($.type(response) === "string")
message = response; //dropzone sends it's own error messages in string
else
message = response.message;
var _ele = $('.alert-danger');
_ele.fadeIn();
_ele.text(message);
},
success: function(file,response) {
console.log(file);
console.log(response.filename);
console.log(response.filedata);
console.log(response);
if(response.redirect){
window.location.href = response.redirect;
}else{
if(response.error === false){
//true
window.location.href = window.location.href;
}
}
}
};
Dropzone.options.realDropzone = real_dropzone;
</script>
@endsection

View file

@ -0,0 +1,468 @@
<div class="card mb-4">
<h5 class="card-header">
{{ __('Rechnungsdaten') }}
<span class="text-tiny float-right">* {{trans('register.required_fields')}}</span>
</h5>
<div class="card-body">
<input type="hidden" name="user_id" value="{{$user->id}}">
<div class="form-row">
<div class="form-group col-md-12">
<label for="company" class="form-label">{{ __('Company name') }} (optional)</label>
{{ Form::text('company', $user->account->company, array('placeholder'=>__('Company name'), 'class'=>'form-control', 'id'=>'company', 'tabindex' => 1)) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-md-2 {{ $errors->has('salutation') ? 'has-error' : '' }}">
<label class="form-label">{{ __('Salutation') }}*</label>
<select class="selectpicker" data-style="btn-light" name="salutation" id="salutation" required tabindex="2">
{!! HTMLHelper::getSalutation($user->account->salutation) !!}
</select>
@if ($errors->has('salutation'))
<span class="help-block">
<strong>{{ $errors->first('salutation') }}</strong>
</span>
@endif
</div>
<div class="form-group col-md-5 {{ $errors->has('first_name') ? 'has-error' : '' }}">
<label class="form-label" for="first_name">{{ __('First name') }}*</label>
{{ Form::text('first_name', $user->account->first_name, array('placeholder'=>__('First name'), 'class'=>'form-control', 'id'=>'first_name', 'required'=>true, 'tabindex' => 4)) }}
@if ($errors->has('first_name'))
<span class="help-block">
<strong>{{ $errors->first('first_name') }}</strong>
</span>
@endif
</div>
<div class="form-group col-md-5 {{ $errors->has('last_name') ? 'has-error' : '' }}">
<label class="form-label" for="last_name">{{ __('Last Name') }}*</label>
{{ Form::text('last_name', $user->account->last_name, array('placeholder'=>__('Last Name'), 'class'=>'form-control', 'id'=>'last_name', 'required'=>true, 'tabindex' => 5)) }}
@if ($errors->has('last_name'))
<span class="help-block">
<strong>{{ $errors->first('last_name') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group {{ $errors->has('address') ? 'has-error' : '' }}">
<label class="form-label" for="address">{{ __('Street') }} / {{ __('House number') }}*</label>
{{ Form::text('address', $user->account->address, array('placeholder'=>__('Street'), 'class'=>'form-control', 'required'=>true, 'id'=>'address', 'tabindex' => 6)) }}
@if ($errors->has('address'))
<span class="help-block">
<strong>{{ $errors->first('address') }}</strong>
</span>
@endif
</div>
<div class="form-row">
<div class="form-group col-md-7 {{ $errors->has('address_2') ? 'has-error' : '' }}">
<label class="form-label" for="address_2">{{ __('Wohnung / Gebäude (optional)') }}</label>
{{ Form::text('address_2', $user->account->address_2, array('placeholder'=>__('Wohnung / Gebäude (optional)'), 'class'=>'form-control', 'id'=>'address_2', 'tabindex' => 6)) }}
</div>
<div class="form-group col-md-5">
<label for="birthday" class="form-label">{{ __('Geburtsdatum') }}*</label>
{{ Form::text('birthday', $user->account->birthday, array('placeholder'=>Util::formatDate(), 'data-date-format'=>Util::formatDate(), 'data-start_view'=>2, 'required'=>true, 'class'=>'form-control datepicker-birthday')) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-md-2 {{ $errors->has('zipcode') ? 'has-error' : '' }}">
<label class="form-label" for="zipcode">{{ __('Postcode') }}*</label>
{{ Form::text('zipcode', $user->account->zipcode, array('placeholder'=>__('Postcode'), 'class'=>'form-control', 'required'=>true, 'id'=>'zipcode', 'tabindex' => 7)) }}
@if ($errors->has('zipcode'))
<span class="help-block">
<strong>{{ $errors->first('zipcode') }}</strong>
</span>
@endif
</div>
<div class="form-group col-md-6 {{ $errors->has('city') ? 'has-error' : '' }}">
<label class="form-label" for="city">{{ __('City') }}*</label>
{{ Form::text('city', $user->account->city, array('placeholder'=>__('City'), 'class'=>'form-control', 'required'=>true, 'id'=>'city', 'tabindex' => 8)) }}
@if ($errors->has('city'))
<span class="help-block">
<strong>{{ $errors->first('city') }}</strong>
</span>
@endif
</div>
<div class="form-group col-md-4 {{ $errors->has('country_id') ? 'has-error' : '' }}">
<label class="form-label">{{ __('Country') }}*</label>
<select class="selectpicker" name="country_id" id="country_id" data-style="btn-light" data-live-search="true" required tabindex="9">
{!! HTMLHelper::getContriesWithMore($user->account->country_id) !!}
</select>
@if ($errors->has('country_id'))
<span class="help-block">
<strong>{{ $errors->first('country_id') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-row">
<div class="form-group col-md-4">
<label class="form-label" for="pre_phone_id">{{ __('Country code') }}</label>
<select class="selectpicker" name="pre_phone_id" id="pre_phone_id" data-style="btn-light" data-live-search="true" tabindex="10">
{!! HTMLHelper::getContriesCodes($user->account->pre_phone_id) !!}
</select>
</div>
<div class="form-group col-md-8 {{ $errors->has('phone') ? 'has-error' : '' }}">
<label class="form-label" for="phone">{{ __('Phone') }}</label>
{{ Form::text('phone', $user->account->phone, array('placeholder'=>__('Phone'), 'class'=>'form-control', 'id'=>'phone', 'tabindex' => 11)) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-md-4">
<label class="form-label" for="pre_mobil_id">{{ __('Country code') }}</label>
<select class="selectpicker" name="pre_mobil_id" id="pre_mobil_id" data-style="btn-light" data-live-search="true" tabindex="12">
{!! HTMLHelper::getContriesCodes($user->account->pre_mobil_id) !!}
</select>
</div>
<div class="form-group col-md-8 {{ $errors->has('mobil') ? 'has-error' : '' }}">
<label class="form-label" for="mobil">{{ __('Mobile Phone') }}</label>
{{ Form::text('mobil', $user->account->mobil, array('placeholder'=>__('Mobile Phone'), 'class'=>'form-control', 'id'=>'mobil', 'tabindex' => 13)) }}
</div>
<div class="form-group col-md-12">
@if($errors->has('phone') || $errors->has('mobil'))
<div class="alert badge-danger block p-2">Bitte {{ __('Phone') }} und/oder {{ __('Mobile Phone') }} angeben!*</div>
@else
<div class="badge badge-warning">Bitte {{ __('Phone') }} und/oder {{ __('Mobile Phone') }} angeben!*</div>
@endif
</div>
</div>
@if(!isset($step))
<hr>
@if($user->email)
<div class="form-row">
<div class="form-group col-md-6">
<label class="form-label" for="email">{{ __('E-Mail Address') }}*</label>
{{ Form::text('email', $user->email, array('placeholder'=>'E-Mail', 'class'=>'form-control', 'id'=>'email', 'readonly'=>true, 'tabindex' => 14)) }}
</div>
<div class="form-group col-md-6">
<label class="form-label" for="email-confirm">{{ __('Confirm E-Mail') }}</label>
{{ Form::text('email-confirm', $user->email, array('placeholder'=>__('Confirm E-Mail'), 'class'=>'form-control', 'id'=>'email-confirm', 'readonly'=>true, 'tabindex' => 15)) }}
</div>
</div>
@if(isset($can_change_mail))
@if(count($user->user_update_email) > 0)
<p class="badge badge-primary" style=" color:#fff;">{{ $user->user_update_email->first()->email }} {{__('waiting for activation since')}} | {{ $user->user_update_email->first()->created_at->format('d.m.Y H:i') }}</p><br>
@endif
<a href="{{ route('admin_lead_change_mail', [$user->id]) }}" class="btn btn-default btn-sm"> {{ __('Contact') }} {{__('Change E-Mail')}}</a>
@else
<a href="{{ route('user_update_email', [$user->id]) }}" class="btn btn-default btn-sm">{{__('Change E-Mail')}}</a>
@endif
@else
<div class="form-row">
<div class="form-group col-md-6">
<label class="form-label" for="email">{{ __('E-Mail Address') }}*</label>
{{ Form::text('email', $user->email, array('placeholder'=>'E-Mail', 'class'=>'form-control', 'id'=>'email', 'tabindex' => 14)) }}
</div>
<div class="form-group col-md-6">
<label class="form-label" for="email-confirm">{{ __('Confirm E-Mail') }}</label>
{{ Form::text('email-confirm', $user->email, array('placeholder'=>__('Confirm E-Mail'), 'class'=>'form-control', 'id'=>'email-confirm', 'tabindex' => 15)) }}
</div>
</div>
@endif
@endif
</div>
</div>
<div class="card mb-4">
<div class="card-body">
<div class="form-row">
<div class="form-group col-md-12">
<label class="form-label" for="taxable_sales">{{ __('Umsatzsteuerpflicht') }} @if($user->account->getCountryAttrAs('taxable_sales'))* @endif</label>
<select class="selectpicker" name="taxable_sales" id="taxable_sales" data-style="btn-light" @if($user->account->getCountryAttrAs('taxable_sales')) required @endif>
{!! HTMLHelper::getTaxSaleOptions($user->account->taxable_sales) !!}
</select>
<p class="badge">Wähle Kleinunternehmer, wenn Du nicht mehr als 22.000 EUR Umsatz pro Jahr mit Deinem Gewerbe erwirtschaftest.</p>
</div>
<div class="form-group col-md-6">
<label class="form-label" for="tax_number">{{ __('Steuernummer') }} @if($user->account->getCountryAttrAs('tax_number'))* @endif</label>
{{ Form::text('tax_number', $user->account->tax_number, array('placeholder'=>__('Steuernummer'), 'class'=>'form-control', 'id'=>'tax_number', $user->account->getCountryAttrAs('tax_number','required'))) }}
</div>
<div class="form-group col-md-6">
<label class="form-label" for=" tax_identification_number">{{ __('USt-ID Nummer') }} @if($user->account->getCountryAttrAs('tax_id_number'))* @endif</label>
{{ Form::text('tax_identification_number', $user->account-> tax_identification_number, array('placeholder'=>__('USt-ID Nummer'), 'class'=>'form-control', 'id'=>'tax_identification_number', $user->account->getCountryAttrAs('tax_id_number','required'))) }}
</div>
</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($user->account->same_as_billing) checked="checked" @endif>
<span class="custom-control-label">{{__('Versand an die gleiche Adresse')}}</span>
</label>
</div>
<div class="card mb-4" id="show_shipping_address" style="@if($user->account->same_as_billing) display:none @endif">
<h5 class="card-header">
{{ __('Versand Adresse') }}
</h5>
<div class="card-body">
<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', $user->account->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-2 {{ $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($user->account->shipping_salutation) !!}
</select>
@if ($errors->has('shipping_salutation'))
<span class="help-block">
<strong>{{ $errors->first('shipping_salutation') }}</strong>
</span>
@endif
</div>
<div class="form-group col-md-5 {{ $errors->has('shipping_firstname') ? 'has-error' : '' }}">
<label class="form-label" for="shipping_firstname">{{ __('First name') }}*</label>
{{ Form::text('shipping_firstname', $user->account->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-5 {{ $errors->has('shipping_lastname') ? 'has-error' : '' }}">
<label class="form-label" for="shipping_lastname">{{ __('Last Name') }}*</label>
{{ Form::text('shipping_lastname', $user->account->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-group {{ $errors->has('shipping_address') ? 'has-error' : '' }}">
<label class="form-label" for="shipping_address">{{ __('Street') }} / {{ __('House number') }}*</label>
{{ Form::text('shipping_address', $user->account->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 class="form-group {{ $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', $user->account->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 class="form-row">
<div class="form-group col-md-2 {{ $errors->has('shipping_zipcode') ? 'has-error' : '' }}">
<label class="form-label" for="shipping_zipcode">{{ __('Postcode') }}*</label>
{{ Form::text('shipping_zipcode', $user->account->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', $user->account->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 class="form-group col-md-4 {{ $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($user->account->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-4">
<label class="form-label" for="shipping_pre_phone_id">{{ __('Country code') }}</label>
<select class="selectpicker" name="shipping_pre_phone_id" id="shipping_pre_phone_id" data-style="btn-light" data-live-search="true" tabindex="25">
{!! HTMLHelper::getContriesCodes($user->account->shipping_pre_phone_id) !!}
</select>
</div>
<div class="form-group col-md-8">
<label class="form-label" for="shipping_phone">{{ __('Phone') }}</label>
{{ Form::text('shipping_phone', $user->account->shipping_phone, array('placeholder'=>__('Phone'), 'class'=>'form-control', 'id'=>'shipping_phone', 'tabindex' => 26)) }}
</div>
</div>
</div>
</div>
{{-- <div class="card mb-4">
<h5 class="card-header">
{{ __('weiteres') }}
</h5>
<div class="card-body">
<div class="form-row">
<div class="form-group col-md-4">
<label class="form-label" for="website">{{ __('Webseite') }}</label>
{{ Form::text('website', $user->account->website, array('placeholder'=>__('Webseite'), 'class'=>'form-control', 'id'=>'website')) }}
</div>
<div class="form-group col-md-4">
<label class="form-label" for="instagram">{{ __('Instagram') }}</label>
{{ Form::text('instagram', $user->account->instagram, array('placeholder'=>__('Instagram'), 'class'=>'form-control', 'id'=>'instagram')) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6">
<label class="form-label" for="facebook">{{ __('Facebook') }}</label>
{{ Form::text('facebook', $user->account->facebook, array('placeholder'=>__('Facebook'), 'class'=>'form-control', 'id'=>'facebook')) }}
</div>
<div class="form-group col-md-6">
<label class="form-label" for="facebook_fanpage">{{ __('Facebook Fanpage') }}</label>
{{ Form::text('facebook_fanpage', $user->account->facebook_fanpage, array('placeholder'=>__('Facebook Fanpage'), 'class'=>'form-control', 'id'=>'facebook_fanpage')) }}
</div>
</div>
</div>
</div>--}}
<script type="application/javascript">
$( document ).ready(function() {
// 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: {
'email': {
required: true,
email: true,
remote:
{
url: "{{ route('user_check_mail') }}",
type: "post",
data:
{
user_id: function()
{
return $('#lead-form-validation :input[name="user_id"]').val();
},
email: function()
{
return $('#lead-form-validation :input[name="email"]').val();
}
},
encode: true,
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
}
},
'email-confirm': {
required: true,
equalTo: "#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.')}}",
},
birthday : {
required: "{{__('This field is required.')}}",
},
equalTo : "{{__('Please enter the same value again.')}}",
'email-confirm' : {
equalTo : "{{__('Please enter the same value again.')}}",
required: "{{__('This field is required.')}}",
},
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,103 @@
@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">
{{ __('Kunden hinzufügen') }}
</h4>
<div id="smartwizard-3" class="smartwizard-add-client">
<ul class="card px-4 pt-3 mb-3">
<li>
<a href="#smartwizard-3-step-1" class="mb-3">
<span class="sw-done-icon ion ion-md-checkmark"></span>
<span class="sw-number">1</span>
E-Mail Adresse
<div class="text-muted small">prüfen</div>
</a>
</li>
<li>
<a href="#smartwizard-3-step-2" class="mb-3">
<span class="sw-done-icon ion ion-md-checkmark"></span>
<span class="sw-number">2</span>
Daten
<div class="text-muted small">eingeben</div>
</a>
</li>
</ul>
<div class="mb-3">
<div id="smartwizard-3-step-1" class="card animated fadeIn">
<div class="card-body">
{!! Form::open(['url' => route('user_customer_edit', ['new']), 'class' => 'form-horizontal', 'id'=>'lead-form-validation-confirm']) !!}
<div class="form-row">
<div class="form-group col-md-6 {{ $errors->has('email') ? 'has-error' : '' }}">
<label class="form-label" for="email">{{ __('E-Mail Address') }}*</label>
{{ Form::text('email', '', array('placeholder'=>'E-Mail Adresse', 'class'=>'form-control', 'id'=>'email', 'required'=>true ,'tabindex' => 1)) }}
@if ($errors->has('email'))
<span class="help-block">
<strong>{{ $errors->first('email') }}</strong>
</span>
@endif
<p class="mt-2">Kundenhoheit: Es können nur Kunden hinzugefügt werden, die noch nicht im mivita-Salescenter vorhanden sind. </p>
</div>
</div>
<div class="text-left mt-2">
<button type="submit" class="btn btn-secondary" name="action" value="add_customer_step_email">{{ __('prüfen und weiter') }}</button>&nbsp;
</div>
{!! Form::close() !!}
</div>
</div>
<div id="smartwizard-3-step-2" class="card animated fadeIn">
<div class="card-body">
@if($step == 1)
{!! Form::open(['url' => route('user_customer_edit', ['new']), '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-new">{{ __('save changes') }}</button>&nbsp;
</div>
{!! Form::close() !!}
</div>
@endif
</div>
</div>
</div>
<link rel="stylesheet" href="{{ mix('/vendor/libs/smartwizard/smartwizard.css') }}">
<script src="{{ mix('/vendor/libs/smartwizard/smartwizard.js') }}"></script>
<script type="text/javascript">
$(document).ready(function() {
$('.smartwizard-add-client').smartWizard({
autoAdjustHeight: true,
backButtonSupport: true,
useURLhash: false,
showStepURLhash: false,
selected: '{{$step}}',
toolbarSettings: {
showNextButton: false,
showPreviousButton: false,
}
});
});
</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('user_customers')}}" class="btn btn-sm btn-default float-right">zurück</a>
{{ __('Kunden Details') }}
</h4>
@include('admin.customer._detail')
<a href="{{route('user_customers')}}" class="btn btn-sm btn-default mt-2 float-right">zurück</a>
@endsection

View file

@ -0,0 +1,16 @@
@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-2 mb-2">
<a href="{{route('user_customer_edit', [$shopping_user->id])}}" class="btn btn-sm btn-default float-right">zurück</a>
{{ __('Kunden Details') }} bearbeiten
</h4>
{!! Form::open(['url' => route('user_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('user_customer_edit', [$shopping_user->id])}}" class="btn btn-sm btn-default float-right">zurück</a>
@endsection

View file

@ -0,0 +1,89 @@
@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-2 mb-2">
{{ __('navigation.my_clients') }}
</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-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>{{__('ID Kunden')}}</th>
<th>WP</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( '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: 'id', 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: 'number', name: 'number'},
{ data: 'extras', name: 'extras', searchable: false, orderable: false},
],
"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

@ -15,11 +15,9 @@
</div>
</div>
@endif
<h4 class="font-weight-bold py-2 mb-2">
{{ __('Your Data') }}
{{ __('navigation.my_data') }}
</h4>
{!! Form::open(['url' => route('user_edit'), '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.user_form')

View file

@ -15,12 +15,9 @@
</div>
</div>
@endif
<h4 class="font-weight-bold py-2 mb-2">
{{ __('Mitgliedschaft') }}
{{ __('navigation.my_membership') }}
</h4>
<div class="row">
<div class="col order-2 order-md-1">
@ -40,7 +37,6 @@
@endif
<hr>
@endif
@else
@if($user->payment_order_id && $user->payment_order_product->identifier === 'show_upgrade')
<p></p>

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') }} <span class="text-muted">#{{$shopping_user->id}}</span>
</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

@ -16,7 +16,7 @@
</div>
@endif
<h4 class="font-weight-bold py-2 mb-2">
{{ __('navigation.my_shop') }}
{{ __('navigation.my_team') }}
</h4>
<div class="card">
<h5 class="card-header">Berater registrieren</h5>

View file

@ -1,171 +1,306 @@
<div class="card mb-4">
<h5 class="card-header">
{{ __('Rechnungsdaten') }}
<span class="text-tiny float-right">* {{trans('register.required_fields')}}</span>
<div class="row">
<div class="col-xs-12 col-sm-6">
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">
<input type="hidden" name="user_id" value="{{$user->id}}">
<div class="form-row">
<div class="form-group col-md-12">
<label for="company" class="form-label">{{ __('Company name') }} (optional)</label>
{{ Form::text('company', $user->account->company, array('placeholder'=>__('Company name'), 'class'=>'form-control', 'id'=>'company', 'tabindex' => 1)) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-md-2 {{ $errors->has('salutation') ? 'has-error' : '' }}">
<label class="form-label">{{ __('Salutation') }}*</label>
<select class="selectpicker" data-style="btn-light" name="salutation" id="salutation" required tabindex="2">
{!! HTMLHelper::getSalutation($user->account->salutation) !!}
</select>
@if ($errors->has('salutation'))
<span class="help-block">
<div class="row">
<div class="col-12 col-lg-6">
<div class="form-row">
<div class="form-group col-md-12">
<label for="company" class="form-label">{{ __('Company name') }} (optional)</label>
{{ Form::text('company', $user->account->company, array('placeholder'=>__('Company name'), 'class'=>'form-control', 'id'=>'company', 'tabindex' => 1)) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6 {{ $errors->has('salutation') ? 'has-error' : '' }}">
<label class="form-label">{{ __('Salutation') }}*</label>
<select class="selectpicker" data-style="btn-light" name="salutation" id="salutation" required tabindex="2">
{!! HTMLHelper::getSalutation($user->account->salutation) !!}
</select>
@if ($errors->has('salutation'))
<span class="help-block">
<strong>{{ $errors->first('salutation') }}</strong>
</span>
@endif
</div>
<div class="form-group col-md-5 {{ $errors->has('first_name') ? 'has-error' : '' }}">
<label class="form-label" for="first_name">{{ __('First name') }}*</label>
{{ Form::text('first_name', $user->account->first_name, array('placeholder'=>__('First name'), 'class'=>'form-control', 'id'=>'first_name', 'required'=>true, 'tabindex' => 4)) }}
@if ($errors->has('first_name'))
<span class="help-block">
@endif
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6 {{ $errors->has('first_name') ? 'has-error' : '' }}">
<label class="form-label" for="first_name">{{ __('First name') }}*</label>
{{ Form::text('first_name', $user->account->first_name, array('placeholder'=>__('First name'), 'class'=>'form-control', 'id'=>'first_name', 'required'=>true, 'tabindex' => 4)) }}
@if ($errors->has('first_name'))
<span class="help-block">
<strong>{{ $errors->first('first_name') }}</strong>
</span>
@endif
@endif
</div>
<div class="form-group col-md-5 {{ $errors->has('last_name') ? 'has-error' : '' }}">
<label class="form-label" for="last_name">{{ __('Last Name') }}*</label>
{{ Form::text('last_name', $user->account->last_name, array('placeholder'=>__('Last Name'), 'class'=>'form-control', 'id'=>'last_name', 'required'=>true, 'tabindex' => 5)) }}
@if ($errors->has('last_name'))
<span class="help-block">
</div>
<div class="form-group col-md-6 {{ $errors->has('last_name') ? 'has-error' : '' }}">
<label class="form-label" for="last_name">{{ __('Last name') }}*</label>
{{ Form::text('last_name', $user->account->last_name, array('placeholder'=>__('Last name'), 'class'=>'form-control', 'id'=>'last_name', 'required'=>true, 'tabindex' => 5)) }}
@if ($errors->has('last_name'))
<span class="help-block">
<strong>{{ $errors->first('last_name') }}</strong>
</span>
@endif
@endif
</div>
</div>
<div class="form-group {{ $errors->has('address') ? 'has-error' : '' }}">
<label class="form-label" for="address">{{ __('Street') }} / {{ __('House number') }}*</label>
{{ Form::text('address', $user->account->address, array('placeholder'=>__('Street'), 'class'=>'form-control', 'required'=>true, 'id'=>'address', 'tabindex' => 6)) }}
@if ($errors->has('address'))
<span class="help-block">
<strong>{{ $errors->first('address') }}</strong>
</span>
@endif
</div>
<div class="form-row">
<div class="form-group col-md-7 {{ $errors->has('address_2') ? 'has-error' : '' }}">
<label class="form-label" for="address_2">{{ __('Wohnung / Gebäude (optional)') }}</label>
{{ Form::text('address_2', $user->account->address_2, array('placeholder'=>__('Wohnung / Gebäude (optional)'), 'class'=>'form-control', 'id'=>'address_2', 'tabindex' => 6)) }}
</div>
<div class="form-group col-md-5">
<label for="birthday" class="form-label">{{ __('Geburtsdatum') }}*</label>
{{ Form::text('birthday', $user->account->birthday, array('placeholder'=>Util::formatDate(), 'data-date-format'=>Util::formatDate(), 'data-start_view'=>2, 'required'=>true, 'class'=>'form-control datepicker-birthday')) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-md-2 {{ $errors->has('zipcode') ? 'has-error' : '' }}">
<label class="form-label" for="zipcode">{{ __('Postcode') }}*</label>
{{ Form::text('zipcode', $user->account->zipcode, array('placeholder'=>__('Postcode'), 'class'=>'form-control', 'required'=>true, 'id'=>'zipcode', 'tabindex' => 7)) }}
@if ($errors->has('zipcode'))
<span class="help-block">
</div>
</div>
<div class="form-row">
<div class="form-group col-md-12 {{ $errors->has('address') ? 'has-error' : '' }}">
<label class="form-label" for="address">{{ __('Street') }} / {{ __('House number') }}*</label>
{{ Form::text('address', $user->account->address, array('placeholder'=>__('Street'), 'class'=>'form-control', 'required'=>true, 'id'=>'address', 'tabindex' => 6)) }}
@if ($errors->has('address'))
<span class="help-block">
<strong>{{ $errors->first('address') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-row">
<div class="form-group col-md-12 {{ $errors->has('address_2') ? 'has-error' : '' }}">
<label class="form-label" for="address_2">{{ __('Wohnung / Gebäude (optional)') }}</label>
{{ Form::text('address_2', $user->account->address_2, array('placeholder'=>__('Wohnung / Gebäude (optional)'), 'class'=>'form-control', 'id'=>'address_2', 'tabindex' => 6)) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6 {{ $errors->has('zipcode') ? 'has-error' : '' }}">
<label class="form-label" for="zipcode">{{ __('Postcode') }}*</label>
{{ Form::text('zipcode', $user->account->zipcode, array('placeholder'=>__('Postcode'), 'class'=>'form-control', 'required'=>true, 'id'=>'zipcode', 'tabindex' => 7)) }}
@if ($errors->has('zipcode'))
<span class="help-block">
<strong>{{ $errors->first('zipcode') }}</strong>
</span>
@endif
</div>
<div class="form-group col-md-6 {{ $errors->has('city') ? 'has-error' : '' }}">
<label class="form-label" for="city">{{ __('City') }}*</label>
{{ Form::text('city', $user->account->city, array('placeholder'=>__('City'), 'class'=>'form-control', 'required'=>true, 'id'=>'city', 'tabindex' => 8)) }}
@if ($errors->has('city'))
<span class="help-block">
</span>
@endif
</div>
<div class="form-group col-md-6 {{ $errors->has('city') ? 'has-error' : '' }}">
<label class="form-label" for="city">{{ __('City') }}*</label>
{{ Form::text('city', $user->account->city, array('placeholder'=>__('City'), 'class'=>'form-control', 'required'=>true, 'id'=>'city', 'tabindex' => 8)) }}
@if ($errors->has('city'))
<span class="help-block">
<strong>{{ $errors->first('city') }}</strong>
</span>
@endif
</div>
<div class="form-group col-md-4 {{ $errors->has('country_id') ? 'has-error' : '' }}">
<label class="form-label">{{ __('Country') }}*</label>
<select class="selectpicker" name="country_id" id="country_id" data-style="btn-light" data-live-search="true" required tabindex="9">
{!! HTMLHelper::getContriesWithMore($user->account->country_id) !!}
</select>
@if ($errors->has('country_id'))
<span class="help-block">
</span>
@endif
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6 {{ $errors->has('country_id') ? 'has-error' : '' }}">
<label class="form-label">{{ __('Country') }}*</label>
<select class="selectpicker" name="country_id" id="country_id" data-style="btn-light" data-live-search="true" required tabindex="9">
{!! HTMLHelper::getContriesWithMore($user->account->country_id) !!}
</select>
@if ($errors->has('country_id'))
<span class="help-block">
<strong>{{ $errors->first('country_id') }}</strong>
</span>
@endif
@endif
</div>
<div class="form-group col-md-6">
<label for="birthday" class="form-label">{{ __('Geburtsdatum') }}*</label>
{{ Form::text('birthday', $user->account->birthday, array('placeholder'=>Util::formatDate(), 'data-date-format'=>Util::formatDate(), 'data-start_view'=>2, 'required'=>true, 'class'=>'form-control datepicker-birthday')) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-md-4">
<label class="form-label" for="pre_phone_id">{{ __('Country code') }}</label>
<select class="selectpicker" name="pre_phone_id" id="pre_phone_id" data-style="btn-light" data-live-search="true" tabindex="10">
{!! HTMLHelper::getContriesCodes($user->account->pre_phone_id) !!}
</select>
</div>
<div class="form-group col-md-8 {{ $errors->has('phone') ? 'has-error' : '' }}">
<label class="form-label" for="phone">{{ __('Phone') }}</label>
{{ Form::text('phone', $user->account->phone, array('placeholder'=>__('Phone'), 'class'=>'form-control', 'id'=>'phone', 'tabindex' => 11)) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-md-4">
<label class="form-label" for="pre_mobil_id">{{ __('Country code') }}</label>
<select class="selectpicker" name="pre_mobil_id" id="pre_mobil_id" data-style="btn-light" data-live-search="true" tabindex="12">
{!! HTMLHelper::getContriesCodes($user->account->pre_mobil_id) !!}
</select>
</div>
<div class="form-group col-md-8 {{ $errors->has('mobil') ? 'has-error' : '' }}">
<label class="form-label" for="mobil">{{ __('Mobile Phone') }}</label>
{{ Form::text('mobil', $user->account->mobil, array('placeholder'=>__('Mobile Phone'), 'class'=>'form-control', 'id'=>'mobil', 'tabindex' => 13)) }}
</div>
<div class="form-group col-md-12">
@if($errors->has('phone') || $errors->has('mobil'))
<div class="alert badge-danger block p-2">Bitte {{ __('Phone') }} und/oder {{ __('Mobile Phone') }} angeben!*</div>
@else
<div class="badge badge-warning">Bitte {{ __('Phone') }} und/oder {{ __('Mobile Phone') }} angeben!*</div>
@endif
</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($user->account->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', $user->account->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($user->account->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', $user->account->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', $user->account->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', $user->account->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', $user->account->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', $user->account->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', $user->account->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($user->account->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-4">
<label class="form-label" for="shipping_pre_phone_id">{{ __('Country code') }}</label>
<select class="selectpicker" name="shipping_pre_phone_id" id="shipping_pre_phone_id" data-style="btn-light" data-live-search="true" tabindex="25">
{!! HTMLHelper::getContriesCodes($user->account->shipping_pre_phone_id) !!}
</select>
</div>
<div class="form-group col-md-8">
<label class="form-label" for="shipping_phone">{{ __('Phone') }}</label>
{{ Form::text('shipping_phone', $user->account->shipping_phone, array('placeholder'=>__('Phone'), 'class'=>'form-control', 'id'=>'shipping_phone', 'tabindex' => 26)) }}
</div>
</div>
</div>
<hr>
<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($user->account->same_as_billing) checked="checked" @endif>
<span class="custom-control-label">{{__('Versand an die gleiche Adresse')}}</span>
</label>
</div>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-4">
<label class="form-label" for="pre_phone_id">{{ __('Country code') }}</label>
<select class="selectpicker" name="pre_phone_id" id="pre_phone_id" data-style="btn-light" data-live-search="true" tabindex="10">
{!! HTMLHelper::getContriesCodes($user->account->pre_phone_id) !!}
</select>
</div>
<div class="form-group col-md-8 {{ $errors->has('phone') ? 'has-error' : '' }}">
<label class="form-label" for="phone">{{ __('Phone') }}</label>
{{ Form::text('phone', $user->account->phone, array('placeholder'=>__('Phone'), 'class'=>'form-control', 'id'=>'phone', 'tabindex' => 11)) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-md-4">
<label class="form-label" for="pre_mobil_id">{{ __('Country code') }}</label>
<select class="selectpicker" name="pre_mobil_id" id="pre_mobil_id" data-style="btn-light" data-live-search="true" tabindex="12">
{!! HTMLHelper::getContriesCodes($user->account->pre_mobil_id) !!}
</select>
</div>
<div class="form-group col-md-8 {{ $errors->has('mobil') ? 'has-error' : '' }}">
<label class="form-label" for="mobil">{{ __('Mobile Phone') }}</label>
{{ Form::text('mobil', $user->account->mobil, array('placeholder'=>__('Mobile Phone'), 'class'=>'form-control', 'id'=>'mobil', 'tabindex' => 13)) }}
</div>
<div class="form-group col-md-12">
@if($errors->has('phone') || $errors->has('mobil'))
<div class="alert badge-danger block p-2">Bitte {{ __('Phone') }} und/oder {{ __('Mobile Phone') }} angeben!*</div>
@else
<div class="badge badge-warning">Bitte {{ __('Phone') }} und/oder {{ __('Mobile Phone') }} angeben!*</div>
@endif
</div>
</div>
@if(!isset($step))
<hr>
@if($user->email)
<div class="form-row">
<div class="form-group col-md-6">
<label class="form-label" for="email">{{ __('E-Mail Address') }}*</label>
{{ Form::text('email', $user->email, array('placeholder'=>'E-Mail', 'class'=>'form-control', 'id'=>'email', 'readonly'=>true, 'tabindex' => 14)) }}
@if($user->email)
<div class="form-row">
<div class="form-group col-md-6">
<label class="form-label" for="email">{{ __('E-Mail Address') }}*</label>
{{ Form::text('email', $user->email, array('placeholder'=>'E-Mail', 'class'=>'form-control', 'id'=>'email', 'readonly'=>true, 'tabindex' => 14)) }}
</div>
<div class="form-group col-md-6">
<label class="form-label" for="email-confirm">{{ __('Confirm E-Mail') }}</label>
{{ Form::text('email-confirm', $user->email, array('placeholder'=>__('Confirm E-Mail'), 'class'=>'form-control', 'id'=>'email-confirm', 'readonly'=>true, 'tabindex' => 15)) }}
</div>
</div>
<div class="form-group col-md-6">
<label class="form-label" for="email-confirm">{{ __('Confirm E-Mail') }}</label>
{{ Form::text('email-confirm', $user->email, array('placeholder'=>__('Confirm E-Mail'), 'class'=>'form-control', 'id'=>'email-confirm', 'readonly'=>true, 'tabindex' => 15)) }}
</div>
</div>
@if(isset($can_change_mail))
@if(count($user->user_update_email) > 0)
<p class="badge badge-primary" style=" color:#fff;">{{ $user->user_update_email->first()->email }} {{__('waiting for activation since')}} | {{ $user->user_update_email->first()->created_at->format('d.m.Y H:i') }}</p><br>
@if(isset($can_change_mail))
@if(count($user->user_update_email) > 0)
<p class="badge badge-primary" style=" color:#fff;">{{ $user->user_update_email->first()->email }} {{__('waiting for activation since')}} | {{ $user->user_update_email->first()->created_at->format('d.m.Y H:i') }}</p><br>
@endif
<a href="{{ route('admin_lead_change_mail', [$user->id]) }}" class="btn btn-default btn-sm"> {{ __('Contact') }} {{__('Change E-Mail')}}</a>
@else
<a href="{{ route('user_update_email', [$user->id]) }}" class="btn btn-default btn-sm">{{__('Change E-Mail')}}</a>
@endif
<a href="{{ route('admin_lead_change_mail', [$user->id]) }}" class="btn btn-default btn-sm"> {{ __('Contact') }} {{__('Change E-Mail')}}</a>
@else
<a href="{{ route('user_update_email', [$user->id]) }}" class="btn btn-default btn-sm">{{__('Change E-Mail')}}</a>
<div class="form-row">
<div class="form-group col-md-6">
<label class="form-label" for="email">{{ __('E-Mail Address') }}*</label>
{{ Form::text('email', $user->email, array('placeholder'=>'E-Mail', 'class'=>'form-control', 'id'=>'email', 'tabindex' => 14)) }}
</div>
<div class="form-group col-md-6">
<label class="form-label" for="email-confirm">{{ __('Confirm E-Mail') }}</label>
{{ Form::text('email-confirm', $user->email, array('placeholder'=>__('Confirm E-Mail'), 'class'=>'form-control', 'id'=>'email-confirm', 'tabindex' => 15)) }}
</div>
</div>
@endif
@else
<div class="form-row">
<div class="form-group col-md-6">
<label class="form-label" for="email">{{ __('E-Mail Address') }}*</label>
{{ Form::text('email', $user->email, array('placeholder'=>'E-Mail', 'class'=>'form-control', 'id'=>'email', 'tabindex' => 14)) }}
</div>
<div class="form-group col-md-6">
<label class="form-label" for="email-confirm">{{ __('Confirm E-Mail') }}</label>
{{ Form::text('email-confirm', $user->email, array('placeholder'=>__('Confirm E-Mail'), 'class'=>'form-control', 'id'=>'email-confirm', 'tabindex' => 15)) }}
</div>
</div>
@endif
@endif
</div>
</div>
@ -173,19 +308,19 @@
<div class="card mb-4">
<div class="card-body">
<div class="form-row">
<div class="form-group col-md-12">
<div class="form-group col-md-12">
<label class="form-label" for="taxable_sales">{{ __('Umsatzsteuerpflicht') }} @if($user->account->getCountryAttrAs('taxable_sales'))* @endif</label>
<select class="selectpicker" name="taxable_sales" id="taxable_sales" data-style="btn-light" @if($user->account->getCountryAttrAs('taxable_sales')) required @endif>
{!! HTMLHelper::getTaxSaleOptions($user->account->taxable_sales) !!}
</select>
<p class="badge">Wähle Kleinunternehmer, wenn Du nicht mehr als 22.000 EUR Umsatz pro Jahr mit Deinem Gewerbe erwirtschaftest.</p>
</div>
<div class="form-group col-md-6">
<div class="form-group col-md-6">
<label class="form-label" for="tax_number">{{ __('Steuernummer') }} @if($user->account->getCountryAttrAs('tax_number'))* @endif</label>
{{ Form::text('tax_number', $user->account->tax_number, array('placeholder'=>__('Steuernummer'), 'class'=>'form-control', 'id'=>'tax_number', $user->account->getCountryAttrAs('tax_number','required'))) }}
</div>
<div class="form-group col-md-6">
<label class="form-label" for=" tax_identification_number">{{ __('USt-ID Nummer') }} @if($user->account->getCountryAttrAs('tax_id_number'))* @endif</label>
<div class="form-group col-md-6">
<label class="form-label" for="tax_identification_number">{{ __('USt-ID Nummer') }} @if($user->account->getCountryAttrAs('tax_id_number'))* @endif</label>
{{ Form::text('tax_identification_number', $user->account-> tax_identification_number, array('placeholder'=>__('USt-ID Nummer'), 'class'=>'form-control', 'id'=>'tax_identification_number', $user->account->getCountryAttrAs('tax_id_number','required'))) }}
</div>
@ -193,161 +328,10 @@
</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($user->account->same_as_billing) checked="checked" @endif>
<span class="custom-control-label">{{__('Versand an die gleiche Adresse')}}</span>
</label>
</div>
<div class="card mb-4" id="show_shipping_address" style="@if($user->account->same_as_billing) display:none @endif">
<h5 class="card-header">
{{ __('Versand Adresse') }}
</h5>
<div class="card-body">
<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', $user->account->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-2 {{ $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($user->account->shipping_salutation) !!}
</select>
@if ($errors->has('shipping_salutation'))
<span class="help-block">
<strong>{{ $errors->first('shipping_salutation') }}</strong>
</span>
@endif
</div>
<div class="form-group col-md-5 {{ $errors->has('shipping_firstname') ? 'has-error' : '' }}">
<label class="form-label" for="shipping_firstname">{{ __('First name') }}*</label>
{{ Form::text('shipping_firstname', $user->account->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-5 {{ $errors->has('shipping_lastname') ? 'has-error' : '' }}">
<label class="form-label" for="shipping_lastname">{{ __('Last Name') }}*</label>
{{ Form::text('shipping_lastname', $user->account->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-group {{ $errors->has('shipping_address') ? 'has-error' : '' }}">
<label class="form-label" for="shipping_address">{{ __('Street') }} / {{ __('House number') }}*</label>
{{ Form::text('shipping_address', $user->account->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 class="form-group {{ $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', $user->account->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 class="form-row">
<div class="form-group col-md-2 {{ $errors->has('shipping_zipcode') ? 'has-error' : '' }}">
<label class="form-label" for="shipping_zipcode">{{ __('Postcode') }}*</label>
{{ Form::text('shipping_zipcode', $user->account->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', $user->account->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 class="form-group col-md-4 {{ $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($user->account->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-4">
<label class="form-label" for="shipping_pre_phone_id">{{ __('Country code') }}</label>
<select class="selectpicker" name="shipping_pre_phone_id" id="shipping_pre_phone_id" data-style="btn-light" data-live-search="true" tabindex="25">
{!! HTMLHelper::getContriesCodes($user->account->shipping_pre_phone_id) !!}
</select>
</div>
<div class="form-group col-md-8">
<label class="form-label" for="shipping_phone">{{ __('Phone') }}</label>
{{ Form::text('shipping_phone', $user->account->shipping_phone, array('placeholder'=>__('Phone'), 'class'=>'form-control', 'id'=>'shipping_phone', 'tabindex' => 26)) }}
</div>
</div>
</div>
</div>
{{-- <div class="card mb-4">
<h5 class="card-header">
{{ __('weiteres') }}
</h5>
<div class="card-body">
<div class="form-row">
<div class="form-group col-md-4">
<label class="form-label" for="website">{{ __('Webseite') }}</label>
{{ Form::text('website', $user->account->website, array('placeholder'=>__('Webseite'), 'class'=>'form-control', 'id'=>'website')) }}
</div>
<div class="form-group col-md-4">
<label class="form-label" for="instagram">{{ __('Instagram') }}</label>
{{ Form::text('instagram', $user->account->instagram, array('placeholder'=>__('Instagram'), 'class'=>'form-control', 'id'=>'instagram')) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6">
<label class="form-label" for="facebook">{{ __('Facebook') }}</label>
{{ Form::text('facebook', $user->account->facebook, array('placeholder'=>__('Facebook'), 'class'=>'form-control', 'id'=>'facebook')) }}
</div>
<div class="form-group col-md-6">
<label class="form-label" for="facebook_fanpage">{{ __('Facebook Fanpage') }}</label>
{{ Form::text('facebook_fanpage', $user->account->facebook_fanpage, array('placeholder'=>__('Facebook Fanpage'), 'class'=>'form-control', 'id'=>'facebook_fanpage')) }}
</div>
</div>
</div>
</div>--}}
<script type="application/javascript">
$( document ).ready(function() {
// Shipping Address show|hide
$("#same_as_billing").on("change", function () {
$('#show_shipping_address').slideToggle(200, function () {

View file

@ -6,118 +6,142 @@
</h5>
<div class="card-body">
<input type="hidden" name="user_id" value="{{$user->id}}">
<div class="form-row">
<div class="form-group col-md-12">
<label for="company" class="form-label">{{ __('Company name') }} (optional)</label>
{{ Form::text('company', $user->account->company, array('placeholder'=>__('Company name'), 'class'=>'form-control', 'id'=>'company', 'tabindex' => 1)) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-md-2 {{ $errors->has('salutation') ? 'has-error' : '' }}">
<label class="form-label">{{ __('Salutation') }}*</label>
<select class="selectpicker" data-style="btn-light" name="salutation" id="salutation" required tabindex="2">
{!! HTMLHelper::getSalutation($user->account->salutation) !!}
</select>
@if ($errors->has('salutation'))
<span class="help-block">
<div class="row">
<div class="col-12 col-lg-6">
<div class="form-row">
<div class="form-group col-md-12">
<label for="company" class="form-label">{{ __('Company name') }} (optional)</label>
{{ Form::text('company', $user->account->company, array('placeholder'=>__('Company name'), 'class'=>'form-control', 'id'=>'company', 'tabindex' => 1)) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6 {{ $errors->has('salutation') ? 'has-error' : '' }}">
<label class="form-label">{{ __('Salutation') }}*</label>
<select class="selectpicker" data-style="btn-light" name="salutation" id="salutation" required tabindex="2">
{!! HTMLHelper::getSalutation($user->account->salutation) !!}
</select>
@if ($errors->has('salutation'))
<span class="help-block">
<strong>{{ $errors->first('salutation') }}</strong>
</span>
@endif
</div>
<div class="form-group col-md-5 {{ $errors->has('first_name') ? 'has-error' : '' }}">
<label class="form-label" for="first_name">{{ __('First name') }}*</label>
{{ Form::text('first_name', $user->account->first_name, array('placeholder'=>__('First name'), 'class'=>'form-control', 'id'=>'first_name', 'required'=>true, 'tabindex' => 4)) }}
@if ($errors->has('first_name'))
<span class="help-block">
@endif
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6 {{ $errors->has('first_name') ? 'has-error' : '' }}">
<label class="form-label" for="first_name">{{ __('First name') }}*</label>
{{ Form::text('first_name', $user->account->first_name, array('placeholder'=>__('First name'), 'class'=>'form-control', 'id'=>'first_name', 'required'=>true, 'tabindex' => 4)) }}
@if ($errors->has('first_name'))
<span class="help-block">
<strong>{{ $errors->first('first_name') }}</strong>
</span>
@endif
@endif
</div>
<div class="form-group col-md-5 {{ $errors->has('last_name') ? 'has-error' : '' }}">
<label class="form-label" for="last_name">{{ __('Last Name') }}*</label>
{{ Form::text('last_name', $user->account->last_name, array('placeholder'=>__('Last Name'), 'class'=>'form-control', 'id'=>'last_name', 'required'=>true, 'tabindex' => 5)) }}
@if ($errors->has('last_name'))
<span class="help-block">
</div>
<div class="form-group col-md-6 {{ $errors->has('last_name') ? 'has-error' : '' }}">
<label class="form-label" for="last_name">{{ __('Last name') }}*</label>
{{ Form::text('last_name', $user->account->last_name, array('placeholder'=>__('Last name'), 'class'=>'form-control', 'id'=>'last_name', 'required'=>true, 'tabindex' => 5)) }}
@if ($errors->has('last_name'))
<span class="help-block">
<strong>{{ $errors->first('last_name') }}</strong>
</span>
@endif
@endif
</div>
</div>
<div class="form-group {{ $errors->has('address') ? 'has-error' : '' }}">
<label class="form-label" for="address">{{ __('Street') }} / {{ __('House number') }}</label>
{{ Form::text('address', $user->account->address, array('placeholder'=>__('Street'), 'class'=>'form-control', 'id'=>'address', 'tabindex' => 6)) }}
@if ($errors->has('address'))
<span class="help-block">
<strong>{{ $errors->first('address') }}</strong>
</span>
@endif
</div>
<div class="form-group {{ $errors->has('address_2') ? 'has-error' : '' }}">
<label class="form-label" for="address_2">{{ __('Wohnung / Gebäude (optional)') }}</label>
{{ Form::text('address_2', $user->account->address_2, array('placeholder'=>__('Wohnung / Gebäude (optional)'), 'class'=>'form-control', 'id'=>'address_2', 'tabindex' => 6)) }}
</div>
<div class="form-row">
<div class="form-group col-md-2 {{ $errors->has('zipcode') ? 'has-error' : '' }}">
<label class="form-label" for="zipcode">{{ __('Postcode') }}</label>
{{ Form::text('zipcode', $user->account->zipcode, array('placeholder'=>__('Postcode'), 'class'=>'form-control', 'id'=>'zipcode', 'tabindex' => 7)) }}
@if ($errors->has('zipcode'))
<span class="help-block">
</div>
</div>
<div class="form-row">
<div class="form-group col-md-12 {{ $errors->has('address') ? 'has-error' : '' }}">
<label class="form-label" for="address">{{ __('Street') }} / {{ __('House number') }}</label>
{{ Form::text('address', $user->account->address, array('placeholder'=>__('Street'), 'class'=>'form-control', 'id'=>'address', 'tabindex' => 6)) }}
@if ($errors->has('address'))
<span class="help-block">
<strong>{{ $errors->first('address') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-row">
<div class="form-group col-md-12 {{ $errors->has('address_2') ? 'has-error' : '' }}">
<label class="form-label" for="address_2">{{ __('Wohnung / Gebäude (optional)') }}</label>
{{ Form::text('address_2', $user->account->address_2, array('placeholder'=>__('Wohnung / Gebäude (optional)'), 'class'=>'form-control', 'id'=>'address_2', 'tabindex' => 6)) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6 {{ $errors->has('zipcode') ? 'has-error' : '' }}">
<label class="form-label" for="zipcode">{{ __('Postcode') }}</label>
{{ Form::text('zipcode', $user->account->zipcode, array('placeholder'=>__('Postcode'), 'class'=>'form-control', 'id'=>'zipcode', 'tabindex' => 7)) }}
@if ($errors->has('zipcode'))
<span class="help-block">
<strong>{{ $errors->first('zipcode') }}</strong>
</span>
@endif
</div>
<div class="form-group col-md-6 {{ $errors->has('city') ? 'has-error' : '' }}">
<label class="form-label" for="city">{{ __('City') }}</label>
{{ Form::text('city', $user->account->city, array('placeholder'=>__('City'), 'class'=>'form-control', 'id'=>'city', 'tabindex' => 8)) }}
@if ($errors->has('city'))
<span class="help-block">
</span>
@endif
</div>
<div class="form-group col-md-6 {{ $errors->has('city') ? 'has-error' : '' }}">
<label class="form-label" for="city">{{ __('City') }}</label>
{{ Form::text('city', $user->account->city, array('placeholder'=>__('City'), 'class'=>'form-control', 'id'=>'city', 'tabindex' => 8)) }}
@if ($errors->has('city'))
<span class="help-block">
<strong>{{ $errors->first('city') }}</strong>
</span>
@endif
</div>
<div class="form-group col-md-4 {{ $errors->has('country_id') ? 'has-error' : '' }}">
<label class="form-label">{{ __('Country') }}*</label>
<select class="selectpicker" name="country_id" id="country_id" data-style="btn-light" data-live-search="true" required tabindex="9">
{!! HTMLHelper::getContriesWithMore($user->account->country_id) !!}
</select>
@if ($errors->has('country_id'))
<span class="help-block">
</span>
@endif
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6 {{ $errors->has('country_id') ? 'has-error' : '' }}">
<label class="form-label">{{ __('Country') }}*</label>
<select class="selectpicker" name="country_id" id="country_id" data-style="btn-light" data-live-search="true" required tabindex="9">
{!! HTMLHelper::getContriesWithMore($user->account->country_id) !!}
</select>
@if ($errors->has('country_id'))
<span class="help-block">
<strong>{{ $errors->first('country_id') }}</strong>
</span>
@endif
@endif
</div>
<div class="form-group col-md-6">
<label for="birthday" class="form-label">{{ __('Geburtsdatum') }}</label>
{{ Form::text('birthday', $user->account->birthday, array('placeholder'=>Util::formatDate(), 'data-date-format'=>Util::formatDate(), 'data-start_view'=>2, 'class'=>'form-control datepicker-birthday')) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-md-4">
<label class="form-label" for="pre_phone_id">{{ __('Country code') }}</label>
<select class="selectpicker" name="pre_phone_id" id="pre_phone_id" data-style="btn-light" data-live-search="true" tabindex="10">
{!! HTMLHelper::getContriesCodes($user->account->pre_phone_id) !!}
</select>
</div>
<div class="form-group col-md-8 {{ $errors->has('phone') ? 'has-error' : '' }}">
<label class="form-label" for="phone">{{ __('Phone') }}</label>
{{ Form::text('phone', $user->account->phone, array('placeholder'=>__('Phone'), 'class'=>'form-control', 'id'=>'phone', 'tabindex' => 11)) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-md-4">
<label class="form-label" for="pre_mobil_id">{{ __('Country code') }}</label>
<select class="selectpicker" name="pre_mobil_id" id="pre_mobil_id" data-style="btn-light" data-live-search="true" tabindex="12">
{!! HTMLHelper::getContriesCodes($user->account->pre_mobil_id) !!}
</select>
</div>
<div class="form-group col-md-8 {{ $errors->has('mobil') ? 'has-error' : '' }}">
<label class="form-label" for="mobil">{{ __('Mobile Phone') }}</label>
{{ Form::text('mobil', $user->account->mobil, array('placeholder'=>__('Mobile Phone'), 'class'=>'form-control', 'id'=>'mobil', 'tabindex' => 13)) }}
</div>
</div>
</div>
<div class="col-12 col-lg-6">
<hr>
<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" checked="checked" disabled>
<span class="custom-control-label">{{__('Versand an die gleiche Adresse')}}</span>
</label>
</div>
</div>
</div>
<hr>
<div class="form-row">
<div class="form-group col-md-4">
<label class="form-label" for="pre_phone_id">{{ __('Country code') }}</label>
<select class="selectpicker" name="pre_phone_id" id="pre_phone_id" data-style="btn-light" data-live-search="true" tabindex="10">
{!! HTMLHelper::getContriesCodes($user->account->pre_phone_id) !!}
</select>
</div>
<div class="form-group col-md-8">
<label class="form-label" for="phone">{{ __('Phone') }}</label>
{{ Form::text('phone', $user->account->phone, array('placeholder'=>__('Phone'), 'class'=>'form-control', 'id'=>'phone', 'tabindex' => 11)) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-md-4">
<label class="form-label" for="pre_mobil_id">{{ __('Country code') }}</label>
<select class="selectpicker" name="pre_mobil_id" id="pre_mobil_id" data-style="btn-light" data-live-search="true" tabindex="12">
{!! HTMLHelper::getContriesCodes($user->account->pre_mobil_id) !!}
</select>
</div>
<div class="form-group col-md-8">
<label class="form-label" for="mobil">{{ __('Mobile Phone') }}</label>
{{ Form::text('mobil', $user->account->mobil, array('placeholder'=>__('Mobile Phone'), 'class'=>'form-control', 'id'=>'mobil', 'tabindex' => 13)) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6">
<label class="form-label" for="email">{{ __('E-Mail Address') }}*</label>
{{ Form::text('email', $user->email, array('placeholder'=>'E-Mail', 'class'=>'form-control', 'required'=>true, 'id'=>'email', 'tabindex' => 14)) }}