mivita/resources/views/user/membership/index.blade.php
2020-02-15 14:53:32 +01:00

209 lines
11 KiB
PHP

@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