register, Grundpreis

This commit is contained in:
Kevin Adametz 2020-04-01 15:35:11 +02:00
parent f06d2d15a5
commit 8e4bb0c2f6
32 changed files with 965 additions and 216 deletions

View file

@ -13,54 +13,41 @@
{!! Form::checkbox('active', 1, $product->active, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">{{__('aktiv')}}</span>
</label>
<label class="form-label" for="name">{{ __('Name') }}*</label>
<label class="form-label" for="name">{{ __('Produktname / Titel') }}*</label>
{{ Form::text('name', $product->name, array('placeholder'=>__('Name'), 'class'=>'form-control', 'id'=>'name', 'required')) }}
</div>
<div class="form-row">
<div class="form-group col-sm-6">
{{-- <div class="form-group col-sm-6">
<label class="form-label" for="title">{{ __('Title') }}</label>
{{ Form::text('title', $product->title, array('placeholder'=>__('Title'), 'class'=>'form-control', 'id'=>'title')) }}
</div>
<div class="form-group col-sm-3">
<label class="form-label" for="title">{{ __('Anzeigen') }}</label>
{{ Form::select('show_at', $product->showATs, $product->show_at, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'show_at') ) }}
</div>
<div class="form-group col-sm-3">
<label class="form-label" for="identifier">{{ __('Kennung') }}</label>
{{ Form::text('identifier', $product->identifier, array('placeholder'=>__('Kennung'), 'class'=>'form-control', 'id'=>'identifier')) }}
</div>
--}}
</div>
<div class="form-row">
<div class="form-group col-sm-8">
<label class="form-label" for="title">{{ __('Kategorie(n)') }}</label>
<div class="form-group col-sm-5">
<label class="form-label" for="title">{{ __('Kategorie (Mehrfachauswahl)') }}</label>
<select class="selectpicker" name="categories[]" id="categories" data-style="btn-light" data-live-search="false" multiple>
{!! HTMLHelper::getCategoriesOptions($product->categories()->pluck('category_id')->toArray()) !!}
</select>
</div>
<div class="form-group col-sm-5">
<label class="form-label" for="show_at">{{ __('Produkt anzeigen') }}</label>
{{ Form::select('show_at', $product->showATs, $product->show_at, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'show_at') ) }}
</div>
<div class="form-group col-sm-4">
<label class="form-label" for="pos">{{ __('pos') }}</label>
{{ Form::text('pos', $product->pos, array('placeholder'=>__('pos'), 'class'=>'form-control', 'id'=>'pos')) }}
<div class="form-group col-sm-2">
<label class="form-label" for="pos">{{ __('Listenposition') }}</label>
{{ Form::text('pos', $product->pos, array('placeholder'=>__('1, 2, 3, etc'), 'class'=>'form-control', 'id'=>'pos')) }}
</div>
</div>
<div class="form-group">
<label class="form-label" for="copy">{{ __('copy') }}</label>
{{ Form::textarea('copy', $product->copy , array('placeholder'=>__('Leistungen'), 'class'=>'form-control summernote', 'id'=>'copy')) }}
<label class="form-label" for="copy">{{ __('Produktbeschreibung') }}</label>
{{ Form::textarea('copy', $product->copy , array('placeholder'=>__('Produktbeschreibung'), 'class'=>'form-control summernote', 'id'=>'copy')) }}
</div>
<div class="form-row">
<div class="form-group col-sm-8">
<label class="form-label" for="action">{{ __('Action') }}</label>
{{ Form::select('action[]', $product->actions, $product->action, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'action', 'multiple') ) }}
</div>
<div class="form-group col-sm-4">
<label class="form-label" for="upgrade_to_id">{{ __('Upgrade to ID') }}</label>
{{ 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>
</div>
@ -117,28 +104,42 @@
{{ __('Inhalte') }}
</h5>
<div class="card-body">
<div class="form-group">
<label class="form-label" for="contents">{{ __('Menge Inhalt (ml / g)') }}</label>
{{ Form::text('contents', $product->contents, array('placeholder'=>__('contents'), 'class'=>'form-control', 'id'=>'contents')) }}
<div class="form-row">
<div class="form-group col-sm-5">
<label class="form-label" for="contents">{{ __('Menge Inhalt (ml / g) als Text') }}</label>
{{ Form::text('contents', $product->contents, array('placeholder'=>__('Bsp: 150 ml'), 'class'=>'form-control', 'id'=>'contents')) }}
</div>
<div class="form-group col-sm-3">
<label class="form-label" for="contents_total">{{ __('Gesamter Inhalt (ml / g) als Zahl') }}</label>
{{ Form::text('contents_total', $product->contents_total, array('placeholder'=>__('Bsp: 150'), 'class'=>'form-control', 'id'=>'contents_total')) }}
</div>
<div class="form-group col-sm-2">
<label class="form-label" for="contents">{{ __('Grundpreis Einheit') }}</label>
{{ Form::select('unit', $product->unitTypes, $product->unit, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'unit') ) }}
</div>
<div class="form-group col-sm-2">
<label class="form-label" for="base_price">{{ __('Grundpreis') }}</label>
{{ Form::text('base_price', $product->getBasePriceFormattedFull(), array('placeholder'=>__(''), 'class'=>'form-control', 'id'=>'base_price', 'readonly')) }}
</div>
<div class="form-group">
<div class="form-group col-sm-4">
<label class="form-label" for="number">{{ __('Artikelnummer') }}</label>
{{ Form::text('number', $product->number, array('placeholder'=>__('number'), 'class'=>'form-control', 'id'=>'number')) }}
</div>
<div class="form-group">
<div class="form-group col-sm-4">
<label class="form-label" for="icons">{{ __('Icons') }}</label>
{{ Form::text('icons', $product->icons, array('placeholder'=>__('icons'), 'class'=>'form-control', 'id'=>'icons')) }}
</div>
<div class="form-group">
<div class="form-group col-sm-4">
<label class="form-label" for="title">{{ __('Attribute') }}</label>
<select class="selectpicker" name="attributes[]" id="attributes" data-style="btn-light" data-live-search="false" multiple>
{!! HTMLHelper::getAttributesOptions($product->attributes()->pluck('attribute_id')->toArray()) !!}
</select>
</div>
</div>
<div class="form-group">
<label class="form-label" for="description">{{ __('Beschreibung') }}</label>
@ -156,3 +157,25 @@
</div>
</div>
<div class="card mb-2">
<h5 class="card-header">
{{ __('Admin Einstellungen') }}
</h5>
<div class="card-body">
<div class="form-row">
<div class="form-group col-sm-5">
<label class="form-label" for="action">{{ __('Aktion beim Zahlungsprozess') }}</label>
{{ Form::select('action[]', $product->actions, $product->action, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'action', 'multiple') ) }}
</div>
<div class="form-group col-sm-5">
<label class="form-label" for="identifier">{{ __('Kennzeichnung für die Anzeige') }}</label>
{{ Form::select('identifier', $product->identifiers_types, $product->identifier, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'identifier') ) }}
</div>
<div class="form-group col-sm-2">
<label class="form-label" for="upgrade_to_id">{{ __('Upgrade to ID') }}</label>
{{ 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>
</div>

View file

@ -14,6 +14,10 @@
<th>{{__('Bild')}}</th>
<th>{{__('Name')}}</th>
<th>{{__('Kategorie')}}</th>
<th>{{__('Preis')}}</th>
<th>{{__('Inhalt')}}</th>
<th>{{__('Einheit')}}</th>
<th>{{__('Grundpreis')}}</th>
<th>{{__('Status')}}</th>
<th></th>
</tr>
@ -32,17 +36,19 @@
<img class="img-fluid" alt="" style="max-height: 80px" src="{{ route('product_image', [$value->images->first()->slug]) }}">
@endif
</td>
<td>{{ $value->name }}</td>
<td>
@foreach($value->categories as $category)
{{ $category->category->name }}
@endforeach
</td>
<td>{{ $value->getFormattedPrice() }}</td>
<td>{{ $value->contents_total }}</td>
<td>{{ $value->getUnitType() }}</td>
<td>{{ $value->getBasePriceFormatted() }}</td>
<td data-sort="{{ $value->active }}">@if($value->active) <span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>@else<span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>@endif</td>
<td><a class="text-info" href="{{ route('admin_product_copy', [$value->id]) }}" onclick="return confirm('{{__('Eintrag kopieren?')}}');"><i class="far fa-copy"></i></a> &nbsp;
<a class="text-danger" href="{{ route('admin_product_delete', [$value->id]) }}" onclick="return confirm('{{__('Really delete entry?')}}');"><i class="far fa-trash-alt"></i></a></td>
</tr>
@endforeach
</tbody>

View file

@ -95,7 +95,12 @@
<body class="body" style="padding:0; margin:0; display:block; background:#f8f8f8; -webkit-text-size-adjust:none" bgcolor="#f8f8f8">
<div style="display: none; mso-hide: all; width: 0px; height: 0px; max-width: 0px; max-height: 0px; font-size: 0px; line-height: 0px;">
{{ $copy1line }}
@if(isset($copy1line))
{{ strip_tags($copy1line) }}
@endif
@if(isset($content))
{{ strip_tags($content) }}
@endif
</div>
<table align="center" cellpadding="0" cellspacing="0" width="100%" height="100%">
@ -139,6 +144,7 @@
<b>{{ $salutation }} </b>
</td>
</tr>
@if(isset($copy1line))
<tr>
<td>
<center>
@ -155,6 +161,20 @@
</center>
</td>
</tr>
@endif
@if(isset($content))
<tr>
<td>
<table style="padding: 20px; border:1px solid #eee; background-color: #f6fdf5" cellpadding="2" cellspacing="0" width="100%">
<tr>
<td>
{!! nl2br($content) !!}
</td>
</tr>
</table>
</td>
</tr>
@endif
<tr>
<td>
<center>

View file

@ -0,0 +1,268 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>mivita.care</title>
<style type="text/css">
img {
max-width: 600px;
outline: none;
text-decoration: none;
-ms-interpolation-mode: bicubic;
}
a {
text-decoration: none;
border: 0;
outline: none;
color: #919f7a;
}
a:hover {
color: #b6b600;
}
a img {
border: none;
}
td, h1, h2, h3 {
font-family: Helvetica, Verdana, Arial, sans-serif;
font-weight: 400;
}
td {
text-align: left;
}
body {
-webkit-font-smoothing: antialiased;
-webkit-text-size-adjust: none;
width: 100%;
height: 100%;
color: #37302d;
background: #ffffff;
font-size: 14px;
line-height: 22px
}
table {
border-collapse: separate !important;
}
.headline {
color: #37302d;
font-size: 18px;
}
.sub_headline {
color: #788662;
font-size: 15px;
}
.force-full-width {
width: 100% !important;
}
hr {
border: none;
border-top: 1px solid #b7c59e;
}
</style>
<style type="text/css" media="screen">
@media screen {
/*Thanks Outlook 2013! http://goo.gl/XLxpyl*/
td, h1, h2, h3 {
font-family: Helvetica, Verdana, Arial, sans-serif;
}
}
</style>
<style type="text/css" media="only screen and (max-width: 480px)">
/* Mobile styles */
@media only screen and (max-width: 480px) {
table[class="w320"] {
width: 320px !important;
}
}
</style>
<!--[if mso]>
<style type="text/css">
body, table, td {
font-family: Helvetica, Arial, sans-serif !important;
}
</style>
<![endif]-->
</head>
<body class="body" style="padding:0; margin:0; display:block; background:#f8f8f8; -webkit-text-size-adjust:none" bgcolor="#f8f8f8">
<div style="display: none; mso-hide: all; width: 0px; height: 0px; max-width: 0px; max-height: 0px; font-size: 0px; line-height: 0px;">
{{ strip_tags($content) }}
</div>
<table align="left" cellpadding="0" cellspacing="0" width="100%" height="100%">
<tr>
<td align="left" valign="top" bgcolor="#f8f8f8" width="100%">
<br>
<table style="margin: 0 auto;" cellpadding="0" cellspacing="0" width="700" class="w320">
<tr>
<td align="left" valign="top">
<table style="margin: 0 auto;" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td style=" text-align:center;">
<center>
<table width="100%" cellpadding="0" cellspacing="0" border="0" class="">
<tbody class="">
<tr class="">
<td align="center" valign="middle" style="font-size: 0px;" class="">
<center>
<picture style="text-align: center">
<img src="https://my.mivita.care/images/logo_mivita.png" alt="mivita.care" style="border:none" width="230">
</picture>
</center>
</td>
</tr>
<tr>
<td><br></td>
</tr>
</tbody>
</table>
</center>
</td>
</tr>
</table>
<table cellpadding="10" style="padding: 10px;" cellspacing="0" border="0" width="100%" bgcolor="#ffffff">
<tr>
<td class="headline" style="text-align: center">
<center>
<b>{{ $title }}</b>
</center>
</td>
</tr>
<tr>
<td>
<table style="padding: 0px 20px; border:1px solid #eee; background-color: #f6fdf5" cellpadding="2" cellspacing="0" width="100%">
<tr>
<td>
{!! nl2br($content) !!}
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<center>
<table role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
<tbody>
<tr>
<td style="word-wrap:break-word;background:transparent;font-size:0px;padding:10px 25px;" align="center" valign="top" background="data:image/gif;base64,">
<table role="presentation" cellpadding="0" cellspacing="0" align="center" border="0">
<tbody>
<tr>
<td style="border:none;border-radius:20px;color:#ffffff;cursor:auto;padding:15px 25px;" align="center" valign="middle" bgcolor="#b5c49b">
<p style="text-decoration:none;background:#b5c49b;color:#ffffff;font-family:Arial, sans-serif;font-size:13px;font-weight:normal;line-height:120%;text-transform:none;margin:0px;">
<a href="{{ $url }}" style="color:#ffffff;font-size:14px;font-weight:bold;text-align:center;text-decoration:none;-webkit-text-size-adjust:none;">{{ $button }}</a>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</center>
</td>
<tr>
<tr>
<td style="color:#37302d;font-size: 14px;">
<center>
<table style="margin: 0 auto;" cellpadding="0" cellspacing="0" width="90%">
<tr>
<td style="color:#37302d; text-align: center">
{{ $copy2line }}<br>
<span style="color: #cabda9; font-weight: normal; font-size: 13px; text-decoration: underline; word-wrap: break-word;white-space: pre-line;">{{ $url }}</span>
</td>
</tr>
</table>
</center>
</td>
</tr>
@if(isset($content_last) && $content_last != "")
<tr>
<td>
<table style="padding: 0px 20px; border:1px solid #eee; background-color: #f6fdf5" cellpadding="2" cellspacing="0" width="100%">
<tr>
<td>
{!! nl2br($content_last) !!}
</td>
</tr>
</table>
</td>
</tr>
@endif
<tr>
<td style="color:#37302d;font-size: 14px;">
<center>
<table style="margin: 0 auto;" cellpadding="0" cellspacing="0" width="90%">
<tr>
<td style="color:#37302d; text-align: center">
{{ $copy3line }}
<br>
{{ $greetings }} <br><br><b>{{ $sender }}</b>
</td>
</tr>
<tr>
<td><br></td>
</tr>
</table>
</center>
</td>
</tr>
</table>
<center>
<table cellpadding="0" cellspacing="0" class="force-full-width"
bgcolor="#f8f8f8" style="margin: 0 auto; text-align: center">
<tr>
<td style="color:#7B7B7E; font-size:14px; text-align: center">
<p>
{{__('email.footer_copy1')}}
</p>
<a href="https://www.mivita.care" style="color: #7B7B7E; text-decoration: underline;">www.mivita.care</a>
<br>
</td>
</tr>
<tr>
<td style="color:#bbbbbb; font-size:12px; text-align: center">
<p>{{__('email.footer_copy2')}}</p>
<a href="https://www.mivita.care/datenschutz">Datenschutzerklärung</a> <br>
<p>{{__('email.footer_copy3')}}</p>
<br>
<br>
</td>
</tr>
</table>
</center>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

View file

@ -27,36 +27,60 @@
<hr class="container-m-nx mt-0 mb-4">
<div class="row">
@if($user->active == 1)
@if($user->payment_account && $user->daysActiveAccount() <= config('mivita.renewal_days'))
@if($user->payment_account && $user->daysActiveAccount() <= config('mivita.remind_first_days'))
<div class="d-flex col-xl-12 align-items-stretch">
<!-- SHOP -->
<div class="card w-100 mb-4">
<h5 class="card-header">
{{__('Mitgliedschaft / Jahresbeitrag') }}
{{__('membership.home_hl') }}
</h5>
<div class="card-body">
<h5><strong>Achtung:</strong> Deine Mitgliedschaft wurde verlängert!</h5>
@if($user->daysActiveAccount() <= 0)
@if($user->isActiveAccount())
<h5 class="alert badge-danger">Dein Zahlungsfrist läuft heute aus, bitte aktualisiere jetzt Deine Mitgliedschaft!</h5>
<h5 class="alert badge-danger">{{__('membership.home_copy_alert_35')}}</h5>
<p>{{__('membership.home_copy_last_35', ['days'=>$user->daysActiveAccount(), 'datetime'=>$user->getPaymentAccountDateFormat()])}}</p>
@else
<h5 class="alert badge-danger">Dein Zahlungsfrist ist vor {{ $user->daysActiveAccount()*-1 }} Tagen ausgelaufen, bitte aktualisiere jetzt Deine Mitgliedschaft!</h5>
{{-- 35, 36 --}}
@if($user->daysActiveAccount() == 0)
<h5 class="alert badge-danger">{{__('membership.home_copy_alert_36_today', ['datetime'=>$user->getPaymentAccountDateFormat()])}}</h5>
@else
<h5 class="alert badge-danger">{{__('membership.home_copy_alert_36', ['days'=>$user->daysActiveAccount()*-1, 'datetime'=>$user->getPaymentAccountDateFormat()])}}</h5>
@endif
@elseif($user->daysActiveAccount() < config('mivita.abo_booking_days') )
<h5 class="alert badge-warning">Dein Zahlungsfrist läuft in {{$user->daysActiveAccount()}} Tagen aus, bitte aktualisiere jetzt Deine Mitgliedschaft!</h5>
@else
<h5 class="alert badge-default">Dein Zahlungsfrist läuft in {{$user->daysActiveAccount()}} Tagen aus, bitte aktualisiere jetzt Deine Mitgliedschaft!</h5>
@if($user->abo_options && $user->payment_account)
<p>Deine automatische Verlängerung ist aktiv, wir werden am <strong>{!! Carbon::parse($user->payment_account)->modify('-'.config('mivita.abo_booking_days').' days')->format('d.m.Y') !!}</strong> Deine Mitgliedschaftsgebühr automatisch per SEPA Mandat einziehen.<br>
@endif
@endif
<p>Erst wenn Dein Jahresbeitrag bei uns eingeht wird Deine Mitgliedschaft automastisch für ein Jahr verlängert. Die Verlängerung gilt ab erstes Abschlussdatum ein weiteres volles Jahr, bis zum <strong>{{$user->modifyActiveAccount()}}</strong>.
Sollte nach Ablauf der Zahlungsfrist Dein Jahresbeitrag nicht bei uns eingehen, wird Dein Account gesperrt.</p>
@if($user->payment_account && $user->isAboOption())
{{ __('membership.home_copy_SEPA_36', ['price'=> 'von '.$user->payment_order_product->getFormattedPrice().' EUR', 'pay_date'=>Carbon::parse($user->payment_account)->modify('- '.config('mivita.abo_booking_days').' days')->format('d.m.Y')]) }}
<hr>
@endif
<p>{{__('membership.home_copy_last_36', ['days'=>$user->daysActiveAccount(), 'datetime'=>$user->getPaymentAccountDateFormat()])}}</p>
@endif
@elseif($user->daysActiveAccount() < config('mivita.remind_last_days') )
{{-- 33 --}}
<h5 class="alert badge-warning">{{ __('membership.home_copy_alert_31', ['datetime'=>$user->getPaymentAccountDateFormat()]) }}</h5>
<p>{{__('membership.home_copy_last_34', ['days'=>$user->daysActiveAccount(), 'datetime'=>$user->getPaymentAccountDateFormat()])}}</p>
@elseif($user->daysActiveAccount() < config('mivita.remind_sec_days'))
{{-- 33 --}}
<h5 class="alert badge-warning">{{ __('membership.home_copy_alert_31', ['datetime'=>$user->getPaymentAccountDateFormat()]) }}</h5>
@if($user->payment_account && $user->isAboOption())
@if($user->daysActiveAccount() < config('mivita.abo_booking_days') )
<p>{{ __('membership.home_copy_SEPA_33', ['price'=> 'von '.$user->payment_order_product->getFormattedPrice().' EUR', 'pay_date'=>Carbon::parse($user->payment_account)->modify('- '.config('mivita.abo_booking_days').' days')->format('d.m.Y')]) }}</p>
@else
<p>{{ __('membership.home_copy_SEPA_32', ['price'=> 'von '.$user->payment_order_product->getFormattedPrice().' EUR', 'pay_date'=>Carbon::parse($user->payment_account)->modify('- '.config('mivita.abo_booking_days').' days')->format('d.m.Y')]) }}</p>
@endif
<hr>
@endif
<p>{{__('membership.home_copy_last_33', ['days'=>$user->daysActiveAccount()])}}</p>
@else
{{-- 32 / 31 --}}
<h5 class="alert badge-default">{{ __('membership.home_copy_alert_31', ['datetime'=>$user->getPaymentAccountDateFormat()]) }}</h5>
@if($user->payment_account && $user->isAboOption())
{{ __('membership.home_copy_SEPA_32', ['price'=> 'von '.$user->payment_order_product->getFormattedPrice().' EUR', 'pay_date'=>Carbon::parse($user->payment_account)->modify('- '.config('mivita.abo_booking_days').' days')->format('d.m.Y')]) }}
<hr>
@endif
<p>{{__('membership.home_copy_last_31', ['days'=>$user->daysActiveAccount()])}}</p>
@endif
</div>
<div class="card-footer py-3">
<a href="{{route('user_membership')}}" class="btn btn-info mb-3"><i class="ion ion-ios-refresh text-default mr-1"></i> Mitgliedschaft jetzt hier verwalten</a>

View file

@ -135,6 +135,9 @@
<div>{{ __('Tools') }}</div>
</a>
<ul class="sidenav-menu">
<li class="sidenav-item{{ Request::is('sysadmin/tools/cronjobs') ? ' active' : '' }}">
<a href="{{ route('sysadmin_tools_cronjobs') }}" class="sidenav-link"><i class="sidenav-icon ion ion-md-settings"></i><div>{{ __('Cron Jobs') }}</div></a>
</li>
<li class="sidenav-item{{ Request::is('sysadmin/tools/domainssl') ? ' active' : '' }}">
<a href="{{ route('sysadmin_tools_domainssl') }}" class="sidenav-link"><i class="sidenav-icon ion ion-md-lock"></i><div>{{ __('Domain SSL') }}</div></a>
</li>

View file

@ -0,0 +1,50 @@
@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 mb-4">
Cron Jobs
</h4>
<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>
{!! Form::close() !!}
</div>--}}
@if(count($values)>0)
<div class="card-body">
<!-- Controls -->
@foreach($values as $name=>$link)
<a href="{{$link}}" target="_blank">{{$name}} | {{$link}}</a><br><br>
@endforeach
</div>
@endif
</div>
@endsection

View file

@ -1,7 +1,7 @@
<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>
<input type="checkbox" class="custom-control-input" name="abo_options" @if($user && $user->isAboOption()) checked="checked" @endif>
<span class="custom-control-label secondary"><strong>{{__('payment.status.auto_renewal_hl')}}:</strong> {{__('payment.status.auto_renewal_line_1')}}</span>
<p class="text-muted">{{__('payment.status.auto_renewal_line_2')}}</p>
</label>

View file

@ -41,7 +41,7 @@
</table>
</div>
<div class="text-left mt-3">
@if(!$user->abo_options)
@if(!$user->isAboOption())
<hr>
<label class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" name="abo_options">

View file

@ -26,13 +26,21 @@
@if($user->isRenewalAccount())
<div class="card w-100 mb-4">
<h5 class="card-header">Deine Mitglidschaft wurde am {!! Carbon::parse($user->payment_account)->modify('-'.config('mivita.abo_booking_days').' days')->format('d.m.Y') !!} verlänget.</h5>
<h5 class="card-header">Deine Mitglidschaft wurde am {{ $user->nextRenewalAccount() }} verlängert.</h5>
<div class="card-body">
@if($userHistoryPaymentOrder && $userHistoryPaymentOrder->status > 2)
<h6 class="alert badge-{{$userHistoryPaymentOrder->getStatusColor()}}">Eine Zahlung wurde ausgeführt. Status: {{ trans('payment.status.'.$userHistoryPaymentOrder->getStatusType())}}</h6>
@endif
@if($user->abo_options && $user->payment_account)
<p class="alert py-2 px-2 badge-secondary">Deine automatische Verlängerung ist aktiv, wir werden am <strong>{!! Carbon::parse($user->payment_account)->modify('-'.config('mivita.abo_booking_days').' days')->format('d.m.Y') !!}</strong> Deine Mitgliedschaftsgebühr automatisch per SEPA Mandat einziehen.<br>
@if($user->payment_account && $user->isAboOption())
@if($user->payment_account && $user->isAboOption())
@if($user->daysActiveAccount() < config('mivita.abo_booking_days') )
<p class="alert py-2 px-2 badge-secondary">Wir konnten am <strong>{!! Carbon::parse($user->payment_account)->modify('-'.config('mivita.abo_booking_days').' days')->format('d.m.Y') !!}</strong> Deine Mitgliedschaftsgebühr <strong>nicht</strong> automatisch per SEPA Mandat einziehen.<br>
@else
<p class="alert py-2 px-2 badge-secondary">Deine automatische Verlängerung ist aktiv, wir werden am <strong>{!! Carbon::parse($user->payment_account)->modify('-'.config('mivita.abo_booking_days').' days')->format('d.m.Y') !!}</strong> Deine Mitgliedschaftsgebühr automatisch per SEPA Mandat einziehen.<br>
@endif
<hr>
@endif
@else
@if($user->payment_order_id && $user->payment_order_product->identifier === 'show_upgrade')
<p></p>
@ -44,10 +52,9 @@
<p><strong>Du hast die Möglichkeit Dein Paket zu upgraden, wähle einfach das erweiterte Paket aus und gehe weiter zur Zahlung.</strong></p>
@endif
@if($user->payment_order_product->identifier === 'show_order')
<p><strong>Eine Änderung Deiner Berater-Mitgliedschaft ist nicht mehr möglich.</strong></p>
<p><strong>Eine Änderung Deines Berater-Paketes ist nicht mehr möglich.</strong></p>
@endif
@endif
@include('user.membership._payment_order')
</div>
</div>
@ -73,7 +80,7 @@
<div class="card w-100 mb-4">
<h5 class="card-header">{{__('Mitgliedschaft')}} {{__('anpassen')}}</h5>
<div class="card-body">
<h6 class="d-block text-dark">Ändere Deine Mitglidschaft für die nächste Vertragsverlängerung.</h6>
<h6 class="d-block text-dark">Du kannst Deine Mitglidschaft bis zur nächsten Vertragsverlängerung, am {{ $user->nextRenewalAccount() }}, ändern</h6>
<p>Die restlichen Läufzeiten bleiben erhalten, erst mit der Verlängerung wird das geänderte Paket aktiv.</p>
@include('user.membership._change')
</div>
@ -82,28 +89,30 @@
@endif
{{-- remove ABO Options --}}
@if($user->abo_options && $user->payment_account)
<div class="card w-100 mb-4">
{!! Form::open(['url' => route('user_membership_store', ['remove_abo']), 'class' => 'form-horizontal']) !!}
<h5 class="card-header">{{__('payment.status.auto_renewal_hl')}} {{__('deaktivieren')}}</h5>
<div class="card-body">
<p>Automatische Verlängerung dekativeren und SEPA Mandat zurückziehen.<br>
Die nächste Buchung ist am: <strong>{!! Carbon::parse($user->payment_account)->modify('-'.config('mivita.abo_booking_days').' days')->format('d.m.Y') !!}</strong></p>
{{-- remove ABO Options --}}
@if($user->payment_account && $user->isAboOption())
<div class="card w-100 mb-4">
{!! Form::open(['url' => route('user_membership_store', ['remove_abo']), 'class' => 'form-horizontal']) !!}
<h5 class="card-header">{{__('payment.status.auto_renewal_hl')}} {{__('deaktivieren')}}</h5>
<label class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" name="abo_options_remove">
<span class="custom-control-label secondary">Hiermit bestätige ich, mein SEPA zu löschen und die automatische Verlängerung dekativeren.</span>
</label>
<button type="submit" class="btn btn-secondary btn-sm">{{__('payment.status.auto_renewal_hl')}} {{__('deaktivieren')}}</button>&nbsp;
</div>
{!! Form::close() !!}
<div class="card-body">
<p>Automatische Verlängerung dekativeren und SEPA Mandat zurückziehen.<br>
Die nächste Buchung ist am: <strong>{!! Carbon::parse($user->payment_account)->modify('-'.config('mivita.abo_booking_days').' days')->format('d.m.Y') !!}</strong></p>
<label class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" name="abo_options_remove">
<span class="custom-control-label secondary">Hiermit bestätige ich, mein SEPA zu löschen und die automatische Verlängerung dekativeren.</span>
</label>
<button type="submit" class="btn btn-secondary btn-sm">{{__('payment.status.auto_renewal_hl')}} {{__('deaktivieren')}}</button>&nbsp;
</div>
@endif
{!! Form::close() !!}
</div>
@endif
@if($user->payment_account)
@if($user->payment_account)
<div class="card w-100 mb-4">
{!! Form::open(['url' => route('user_membership_store', ['delete_membership']), 'class' => 'form-horizontal']) !!}
<h5 class="card-header">{{__('Mitgliedschaft')}} {{__('beenden')}}</h5>
@ -115,27 +124,19 @@
@if($userHistoryDeleteMembership && $userHistoryDeleteMembership->status == 50)
<p class="alert py-2 px-2 badge-danger">Die Beendigung und Löschung Deiner MIVITA Mitgliedschaft ist beantragt.<br>
@else
<label class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" name="delete_membership_mivita">
<span class="custom-control-label secondary">Ja, ich möchte die MIVITA Mitgliedschaft beenden, ich verzichte auf jeglichen Anspruch gegenüber MIVITA und möchte, dass mein Account gelöscht wird!</span>
</label>
<button type="submit" class="btn btn-default btn-sm">{{ __('Mitgliedschaft hiermit beenden') }}</button>&nbsp;
@else
<label class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" name="delete_membership_mivita">
<span class="custom-control-label secondary">Ja, ich möchte die MIVITA Mitgliedschaft beenden, ich verzichte auf jeglichen Anspruch gegenüber MIVITA und möchte, dass mein Account gelöscht wird!</span>
</label>
<button type="submit" class="btn btn-default btn-sm">{{ __('Mitgliedschaft hiermit beenden') }}</button>&nbsp;
@endif
</div>
{!! Form::close() !!}
</div>
@endif
@endif
{{--
TODO
//cron sepa
//cron Mails erinnerungen
--}}
</div>
<div class="col-md-5 col-xl-4 order-1 order-md-2">
<!-- Project details -->
@ -179,7 +180,7 @@
@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-muted">{{__('abgelaufen am')}}</div>
<div class="text-right">
{{ $user->getPaymentAccountDateFormat() }}
</div>
@ -217,7 +218,7 @@
<li class="list-group-item d-flex justify-content-between align-items-center">
<div class="text-muted">{{__('payment.status.auto_renewal_hl')}}</div>
<div class="text-right">
@if($user->abo_options)
@if($user->isAboOption())
<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>