membership register

This commit is contained in:
Kevin Adametz 2020-02-15 14:53:32 +01:00
parent 3711fcc8d0
commit 37cb2b06c7
38 changed files with 1261 additions and 463 deletions

View file

@ -0,0 +1,8 @@
<hr>
<label class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" name="abo_options" @if($user && $user->abo_options) checked="checked" @endif>
<span class="custom-control-label secondary"><strong>Abo-Option:</strong> Klicke dieses Box an, wenn Du Deine jährlichen Mitgliedschaft-Beiträge automatisch abbuchen lassen willst. Wähle dann bei der Zahlung SEPA-Lastschrift aus, wir speichern Dein SEPA-Lastschrift Mandart und buchen 14 Tage vor ablauf deine Jahresgebühr automatisch ab.</span>
<p class="text-muted">Du kannst Deine Abo-Option jederzeit im Login-Bereich rückgängig machen. Ohne Abo-Option musst du vor Ablauf der Frist selbstänig im Login-Bereich die Zahlung ausführen.</p>
</label>
<hr>

View file

@ -0,0 +1,47 @@
@php($months = Carbon::now()->diffInMonths(Carbon::parse($user->payment_account)) +1)
{!! Form::open(['url' => route('user_membership_store_payment'), 'class' => 'form-horizontal']) !!}
<input type="hidden" name="qty" value="{{$months}}">
<div class="table-responsive">
<table class="table table- m-0">
<tbody class="switchers-stacked">
@foreach($upgrade as $product)
<tr>
<td class="text-center align-middle px-0">
<label class="switcher switcher-secondary">
<input type="radio" class="switcher-input" value="{{$product->id}}" name="switchers-package-wizard" checked="checked">
<span class="switcher-indicator">
<span class="switcher-yes"></span>
<span class="switcher-no"></span>
</span>
<span class="switcher-label"></span>
</label>
</td>
<td class="p-4">
<div class="media align-items-center">
@if(count($product->images))
<img src="{{ route('product_image', [$product->images->first()->slug]) }}" class="d-block ui-w-60 ui-bordered mr-4" alt="">
@endif
<div class="media-body">
<h5 class="d-block text-dark">{{$product->name}}</h5>
{!! $product->getLang('copy') !!}
</div>
</div>
</td>
<td class="text-right font-weight-semibold align-middle p-4">{{$product->getFormattedPrice()}} EUR / Monat</td>
</tr>
<tr>
<td colspan="2" class="text-right">Restlaufzeit: {{$months}} @if($months==1) Monat @else Monate @endif</td>
<td class="text-right font-weight-semibold"> {!! Util::formatNumber($months * $product->price) !!} EUR</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="text-left mt-3">
@include('user.membership._abo_options')
<button type="submit" class="btn btn-secondary">{{ __('wählen und weiter zur Kasse') }}</button>&nbsp;
<br><br>
<em class="small text-center"> <i class="fa fa-lock"></i> Du wirst auf unseren checkout Server weitergeletet, die Verbindung ist SSL verschlüsselt.</em>
</div>
{!! Form::close() !!}

View file

@ -0,0 +1,209 @@
@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">
{{ __('Deine Mitgliedschaft') }}
</h4>
<div class="row">
<div class="col order-2 order-md-1">
@if($user->isActiveAccount() && !$user->isActiveShop())
<div class="card w-100 mb-4">
<h5 class="card-header">{{__('MIVITA BUSINESS Paket')}} {{__('Upgrade')}}</h5>
<div class="card-body">
<h5 class="d-block text-dark">Erweitere jetzt Deine Mitglidschaft auf MIVITA BUSINESS Paket!</h5>
<p>Berechnet werden die restlichen Monate bis zur Berater-Mitgliedschaft Verlängerung. Danach wird jährlich der MIVITA BUSINESS Paketpreis berechnet.</p>
@include('user.membership._upgrade')
</div>
</div>
@endif
@if($user->abo_options && $user->payment_account)
<div class="card w-100 mb-4">
<h5 class="card-header">{{__('Abo-Option')}} {{__('deaktivieren')}}</h5>
<div class="card-body">
<p>Abo-Option dekativeren und SEPA Mandat zurückziehen.<br>
Die nächste Buchung ist am: <strong>{!! Carbon::parse($user->payment_account)->modify('- 29 days')->format('d.m.Y') !!}</strong></p>
<button type="submit" class="btn btn-secondary">{{ __('Abo-Option') }} {{__('deaktivieren')}}</button>&nbsp;
</div>
</div>
@endif
{{--
TODO
//Warnungen und Zahlungen verlängerung.
//upgrade speichern über api
//Verlängern
//cron sepa
//cron Mails erinnerungen
//downgrade
--}}
<!-- Description -->
<div class="card mb-4">
<div class="card-body">
{!! Form::open(['url' => route('wizard_store_payment', [20]), 'class' => 'form-horizontal']) !!}
<div class="table-responsive">
<table class="table table- m-0">
<tbody class="switchers-stacked">
@foreach($products as $product)
<tr>
<td class="text-center align-middle px-0">
<label class="switcher switcher-secondary">
<input type="radio" class="switcher-input" value="{{$product->id}}" name="switchers-package-wizard" @if($product->id == $user->payment_order_id) checked @endif >
<span class="switcher-indicator">
<span class="switcher-yes"></span>
<span class="switcher-no"></span>
</span>
<span class="switcher-label"></span>
</label>
</td>
<td class="p-4">
<div class="media align-items-center">
@if(count($product->images))
<img src="{{ route('product_image', [$product->images->first()->slug]) }}" class="d-block ui-w-60 ui-bordered mr-4" alt="">
@endif
<div class="media-body">
<h5 class="d-block text-dark">{{$product->name}}</h5>
{!! $product->getLang('copy') !!}
</div>
</div>
</td>
<td class="text-right font-weight-semibold align-middle p-4">{{$product->getFormattedPrice()}} EUR / p.a.</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="text-left mt-3">
<hr>
<label class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" name="abo_options">
<span class="custom-control-label secondary"><strong>Abo-Option:</strong> Klicke dieses Box an, wenn Du Deine jährlichen Mitgliedschaft-Beiträge automatisch abbuchen lassen willst. Wähle dann bei der Zahlung SEPA-Lastschrift aus, wir speichern Dein SEPA-Lastschrift Mandart und buchen 14 Tage vor ablauf deine Jahresgebühr automatisch ab.</span>
<p class="text-muted">Du kannst Deine Abo-Option jederzeit im Login-Bereich rückgängig machen. Ohne Abo-Option musst du vor Ablauf der Frist selbstänig im Login-Bereich die Zahlung ausführen.</p>
</label>
<hr>
<button type="submit" class="btn btn-secondary">{{ __('wählen und weiter zur Kasse') }}</button>&nbsp;
<br><br>
<em class="small text-center"> <i class="fa fa-lock"></i> Du wirst auf unseren checkout Server weitergeletet, die Verbindung ist SSL verschlüsselt.</em>
</div>
{!! Form::close() !!}
</div>
</div>
<!-- / Description -->
</div>
<div class="col-md-5 col-xl-4 order-1 order-md-2">
<!-- Project details -->
<div class="card mb-4">
<h6 class="card-header">{{ __('Mitgliedschaft Details') }}</h6>
<ul class="list-group list-group-flush">
<li class="list-group-item d-flex justify-content-between align-items-center">
<div class="text-muted">{{__('gebuchtes Paket')}}</div>
<div class="text-right">
@if($user->payment_order_id)
{{ $user->payment_order->name }}
@endif
</div>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center">
<div class="text-muted">{{ __('Berater-Mitgliedschaft') }}</div>
<div class="text-right">
@if($user->isActiveAccount() )
<span class="badge badge-pill badge-success"><i class="fa fa-check"></i> {{ __('aktiv') }}</span>
@else
<span class="badge badge-pill badge-danger"><i class="fa fa-times"></i> {{ __('inaktiv') }}</span>
@endif
</div>
</li>
@if($user->isActiveAccount() )
<li class="list-group-item d-flex justify-content-between align-items-center">
<div class="text-muted">{{__('bis zum')}}</div>
<div class="text-right">
{{ $user->getPaymentAccountDateFormat() }}
</div>
</li>
@else
@if($user->payment_account)
<li class="list-group-item d-flex justify-content-between align-items-center">
<div class="text-muted">{{__('abgelaufen am')}}}</div>
<div class="text-right">
{{ $user->getPaymentAccountDateFormat() }}
</div>
</li>
@endif
@endif
<li class="list-group-item d-flex justify-content-between align-items-center">
<div class="text-muted">{{ __('Berater-Online-Shop') }}</div>
<div class="text-right">
@if($user->isActiveShop() )
<span class="badge badge-pill badge-success"><i class="fa fa-check"></i> {{ __('aktiv') }}</span>
@else
<span class="badge badge-pill badge-danger"><i class="fa fa-times"></i> {{ __('inaktiv') }}</span>
@endif
</div>
</li>
@if($user->isActiveShop() )
<li class="list-group-item d-flex justify-content-between align-items-center">
<div class="text-muted">{{__('bis zum')}}</div>
<div class="text-right">
{{ $user->getPaymentShopDateFormat() }}
</div>
</li>
@else
@if($user->payment_shop)
<li class="list-group-item d-flex justify-content-between align-items-center">
<div class="text-muted">{{__('abgelaufen am')}}</div>
<div class="text-right">
{{ $user->getPaymentShopDateFormat() }}
</div>
</li>
@endif
@endif
<li class="list-group-item d-flex justify-content-between align-items-center">
<div class="text-muted">{{__('Abo-Option')}}</div>
<div class="text-right">
@if($user->abo_options)
<span class="badge badge-pill badge-success"><i class="fa fa-check"></i> {{ __('aktiv') }}</span>
@else
<span class="badge badge-pill badge-danger"><i class="fa fa-times"></i> {{ __('inaktiv') }}</span>
@endif
</div>
</li>
</ul>
</div>
<!-- / Project details -->
</div>
</div>
@endsection

View file

@ -0,0 +1,61 @@
@if($user->shopping_orders->count())
@php
$last_shopping_order = $user->shopping_orders->last();
$last_shopping_payments = $last_shopping_order->shopping_payments->last();
@endphp
<div class="alert alert-secondary">
Es wurde eine Zahlung ausgeführt. Referenz: {{$last_shopping_payments->reference }}.
<br>Bitte warte die Zahlungs-Bestätiung per E-Mail.
</div>
@endif
{!! Form::open(['url' => route('wizard_store_payment', [20]), 'class' => 'form-horizontal']) !!}
<div class="table-responsive">
<table class="table table- m-0">
<tbody class="switchers-stacked">
@php($counter = 1)
@foreach($products as $product)
<tr>
<td class="text-center align-middle px-0">
<label class="switcher switcher-secondary">
<input type="radio" class="switcher-input" value="{{$product->id}}" name="switchers-package-wizard" @if($counter == 2) checked @endif >
<span class="switcher-indicator">
<span class="switcher-yes"></span>
<span class="switcher-no"></span>
</span>
<span class="switcher-label"></span>
</label>
</td>
<td class="p-4">
<div class="media align-items-center">
@if(count($product->images))
<img src="{{ route('product_image', [$product->images->first()->slug]) }}" class="d-block ui-w-60 ui-bordered mr-4" alt="">
@endif
<div class="media-body">
<h5 class="d-block text-dark">{{$product->name}}</h5>
{!! $product->getLang('copy') !!}
</div>
</div>
</td>
<td class="text-right font-weight-semibold align-middle p-4">{{$product->getFormattedPrice()}} EUR / p.a.</td>
</tr>
@php($counter++)
@endforeach
</tbody>
</table>
</div>
<div class="text-left mt-3">
<hr>
<label class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" name="abo_options">
<span class="custom-control-label secondary"><strong>Abo-Option:</strong> Klicke dieses Box an, wenn Du Deine jährlichen Mitgliedschaft-Beiträge automatisch abbuchen lassen willst. Wähle dann bei der Zahlung SEPA-Lastschrift aus, wir speichern Dein SEPA-Lastschrift Mandart und buchen 14 Tage vor ablauf deine Jahresgebühr automatisch ab.</span>
<p class="text-muted">Du kannst Deine Abo-Option jederzeit im Login-Bereich rückgängig machen. Ohne Abo-Option musst du vor Ablauf der Frist selbstänig im Login-Bereich die Zahlung ausführen.</p>
</label>
<hr>
<button type="submit" class="btn btn-secondary">{{ __('wählen und weiter zur Kasse') }}</button>&nbsp;
<br><br>
<em class="small text-center"> <i class="fa fa-lock"></i> Du wirst auf unseren checkout Server weitergeletet, die Verbindung ist SSL verschlüsselt.</em>
</div>
{!! Form::close() !!}

View file

@ -56,16 +56,6 @@
<span class="sw-number">4</span>
Paket
<div class="text-muted small">auswählen</div>
</a>
</li>
<li>
<a href="#smartwizard-3-step-5" class="mb-3">
<span class="sw-done-icon ion ion-md-checkmark"></span>
<span class="sw-number">5</span>
Registrierung
<div class="text-muted small">abgeschlossen</div>
</a>
</li>
</ul>
@ -73,7 +63,7 @@
<div class="mb-3">
<div id="smartwizard-3-step-1" class="card animated fadeIn">
<div class="card-body">
{!! Form::open(['url' => route('wizard_store_create', [0]), 'class' => 'form-horizontal', 'id'=>'lead-form-validation-confirm']) !!}
{!! Form::open(['url' => route('wizard_store_create', [10]), 'class' => 'form-horizontal', 'id'=>'lead-form-validation-confirm']) !!}
@include('user.data_confirm')
<div class="text-left mt-3">
<button type="submit" class="btn btn-secondary">{{ __('zustimmen und weiter') }}</button>&nbsp;
@ -84,14 +74,14 @@
<div id="smartwizard-3-step-2" class="card animated fadeIn">
<div class="card-body">
@if(!$user->isPasswort())
{!! Form::open(['url' => route('wizard_store_create', [1])]) !!}
{!! Form::open(['url' => route('wizard_store_create', [11])]) !!}
@include('user.update_password_first_form')
<div class="text-left mt-3">
<button type="submit" class="btn btn-secondary">{{ __('erstellen und weiter') }}</button>&nbsp;
</div>
{!! Form::close() !!}
@else
{!! Form::open(['url' => route('wizard_store_create', [1])]) !!}
{!! Form::open(['url' => route('wizard_store_create', [11])]) !!}
<p>Passwort wurde bereits erstellt.</p>
<button type="submit" class="btn btn-secondary">{{ __('weiter') }}</button>&nbsp;
{!! Form::close() !!}
@ -100,7 +90,7 @@
</div>
<div id="smartwizard-3-step-3" class="card animated fadeIn">
<div class="card-body">
{!! Form::open(['url' => route('wizard_store_create', [2]), 'class' => 'form-horizontal', 'id'=>'lead-form-validation']) !!}
{!! Form::open(['url' => route('wizard_store_create', [12]), 'class' => 'form-horizontal', 'id'=>'lead-form-validation']) !!}
@include('user.user_form')
<div class="text-left mt-3">
<button type="submit" class="btn btn-secondary">{{ __('speichern und weiter') }}</button>&nbsp;
@ -110,57 +100,7 @@
</div>
<div id="smartwizard-3-step-4" class="card animated fadeIn">
<div class="card-body">
{!! Form::open(['url' => route('wizard_store_create', [3]), 'class' => 'form-horizontal']) !!}
<div class="table-responsive">
<table class="table table- m-0">
<tbody>
<div class="switchers-stacked">
@php($counter = 1)
@foreach($products as $product)
<tr>
<td class="text-center align-middle px-0">
<label class="switcher switcher-secondary">
<input type="radio" class="switcher-input" value="{{$product->id}}" name="switchers-package-wizard" @if($counter == 2) checked @endif >
<span class="switcher-indicator">
<span class="switcher-yes"></span>
<span class="switcher-no"></span>
</span>
<span class="switcher-label"></span>
</label>
</td>
<td class="p-4">
<div class="media align-items-center">
@if(count($product->images))
<img src="{{ route('product_image', [$product->images->first()->slug]) }}" class="d-block ui-w-60 ui-bordered mr-4" alt="">
@endif
<div class="media-body">
<h5 class="d-block text-dark">{{$product->name}}</h5>
{!! $product->getLang('copy') !!}
</div>
</div>
</td>
<td class="text-right font-weight-semibold align-middle p-4">{{$product->getFormattedPrice()}} EUR / p.a.</td>
</tr>
@php($counter++)
@endforeach
</div>
</tbody>
</table>
</div>
<div class="text-left mt-3">
<button type="submit" class="btn btn-secondary">{{ __('wählen und weiter zur Kasse') }}</button>&nbsp;
<br><br>
<em class="small text-center"> <i class="fa fa-lock"></i> Sie werden auf unseren checkout Server weitergeletet, die Verbindung ist mit SSL verschlüsselt.</em>
</div>
{!! Form::close() !!}
</div>
</div>
<div id="smartwizard-3-step-5" class="card animated fadeIn">
<div class="card-body">
<h4>Vielen Dank,</h4>
<p>Deine Registrierung ist abgeschlossen!</p>
<p>Sobald die Zahlung bei uns eingegangen ist, erhälst du automatisch eine E-Mail und dein Account wird freigeschaltet.</p>
@include('user.wizard._payment')
</div>
</div>
</div>
@ -176,7 +116,7 @@
backButtonSupport: true,
useURLhash: false,
showStepURLhash: false,
selected: '{{$step}}',
selected: '{{$step-10}}',
toolbarSettings: {
showNextButton: false,
showPreviousButton: false,

View file

@ -0,0 +1,38 @@
@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">
{{ __('Registrierung abgeschlossen') }}
</h4>
<div id="smartwizard-3" class="smartwizard-register">
<div class="mb-3">
<div id="smartwizard-3-step-6" class="card animated fadeIn">
<div class="card-body">
<h4>Vielen Dank,</h4>
<p>Deine Registrierung und Buchung der Mitgliedschaft ist abgeschlossen!</p>
<p>Sobald die Zahlung bei uns eingegangen ist, erhälst Du automatisch eine E-Mail und Deine Mitgliedschaft wird automatisch freigeschaltet.</p>
</div>
</div>
</div>
</div>
@endsection
@section('scripts')
@endsection

View file

@ -0,0 +1,63 @@
@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">
{{ __('Registrierung abschließen') }}
</h4>
<div id="smartwizard-3" class="smartwizard-register">
<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>
Paket
<div class="text-muted small">auswählen</div>
</a>
</li>
</ul>
<div class="mb-3">
<div id="smartwizard-3-step-1" class="card animated fadeIn">
<div class="card-body">
@include('user.wizard._payment')
</div>
</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-register').smartWizard({
autoAdjustHeight: true,
backButtonSupport: true,
useURLhash: false,
showStepURLhash: false,
selected: '{{$step}}',
toolbarSettings: {
showNextButton: false,
showPreviousButton: false,
}
});
});
</script>
@endsection