This commit is contained in:
Kevin Adametz 2022-06-15 18:08:45 +02:00
parent 9b0b5feb7e
commit 7a040c3e19
106 changed files with 4074 additions and 1349 deletions

View file

@ -2,9 +2,9 @@
@section('content')
<div class="card">
<h6 class="card-header">
<h5 class="card-header">
{{__('Attribute')}}
</h6>
</h5>
<div class="card-datatable table-responsive">
<table class="datatables-style table table-striped table-bordered">
<thead>

View file

@ -0,0 +1,109 @@
@extends('layouts.layout-2')
@section('content')
<div class="card">
<h6 class="card-header">
{{__('Business')}}
</h6>
<div class="card-body p-0">
{!! Form::open(['url' => route('admin_payments_invoice'), 'class' => 'form-horizontal', 'id'=>'form_filter_payment_invoices']) !!}
<div class="form-row align-items-center px-4 pb-2 pt-3">
{{-- <div class="col-12 col-sm-4 col-md-4 col-lg-4 mb-1">
<input class="form-control on_keyup_invoice" name="business_user_filter_name" type="text" value="{{session('business_user_filter_name')}}" placeholder="Name">
</div>
--}}
<div class="col-6 col-sm-4 col-md-4 col-lg-4 mb-1">
<select class="custom-select on_change_invoice" name="business_user_filter_month">
@foreach($filter_months as $key=>$value)
<option value="{{$key}}" @if(session('business_user_filter_month') == $key) selected @endif>{{$value}}</option>
@endforeach
</select>
</div>
<div class="col-6 col-sm-4 col-md-4 col-lg-4 mb-1">
<select class="custom-select on_change_invoice" name="business_user_filter_year">
@foreach($filter_years as $key=>$value)
<option value="{{$value}}" @if(session('business_user_filter_year') == $value) selected @endif>{{$value}}</option>
@endforeach
</select>
</div>
</div>
{!! Form::close() !!}
<div class="card-datatable table-responsive pt-0">
<table class="datatables-style table table-striped table-bordered" id="datatable-users">
<thead>
<tr>
<th>{{__('ID') }}</th>
<th>{{__('Berater-ID') }}</th>
<th>{{__('Points')}}</th>
<th>{{__('Points Shop')}}</th>
<th>{{__('Gesamt')}}</th>
<th>{{__('Umsatz')}}</th>
<th>{{__('Umsatz Shop')}}</th>
<th>{{__('Gesamt Shop')}}</th>
<th>{{__('E-Mail')}}</th>
<th>{{__('Vorname')}}</th>
<th>{{__('Nachname')}}</th>
<th>{{__('Level')}}</th>
<th>{{__('Mitglied')}}</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
<script>
$( document ).ready(function() {
var oTable = $('#datatable-users').DataTable({
"processing": true,
"serverSide": true,
"stateSave": true,
"searching": true,
ajax: {
url: '{!! route('admin_business_user_datatable') !!}',
data: function(d) {
d.business_user_filter_name = $('input[name=business_user_filter_name]').val();
d.business_user_filter_month = $('select[name=business_user_filter_month]').val();
d.business_user_filter_year = $('select[name=business_user_filter_year]').val();
}
},
"order": [[0, "asc" ]],
"columns": [
{ data: 'id', name: 'users.id', searchable: false },
{ data: 'account.m_account', name: 'account.m_account' },
{ data: 'sales_volume_points', name: 'sales_volume_points', orderable: false, searchable: false },
{ data: 'sales_volume_points_shop', name: 'sales_volume_points_shop', orderable: false, searchable: false },
{ data: 'sales_volume_points_sum', name: 'sales_volume_points_sum', orderable: false, searchable: false },
{ data: 'sales_volume_total', name: 'sales_volume_total', orderable: false, searchable: false },
{ data: 'sales_volume_total_shop', name: 'sales_volume_total_shop', orderable: false, searchable: false },
{ data: 'sales_volume_total_sum', name: 'sales_volume_total_sum', orderable: false, searchable: false },
{ data: 'email', name: 'users.email' },
{ data: 'account.first_name', name: 'account.first_name' },
{ data: 'account.last_name', name: 'account.last_name' },
{ data: 'user_level', name: 'user_level', orderable: false, searchable: false },
{ data: 'active_account', name: 'active_account' },
],
"bLengthChange": false,
"iDisplayLength": 100,
"language": {
"url": "/js/German.json"
}
});
$('select.on_change_invoice').on('change', function(){
oTable.draw();
});
$('input.on_keyup_invoice').on('keyup', function(){
oTable.draw();
});
});
/*$('#filter_sales_year').on('change', function(){
$('#form_filter_payment_invoices').submit();
});*/
</script>
@endsection

View file

@ -0,0 +1,113 @@
@extends('layouts.layout-2')
@section('content')
<div class="card">
<h5 class="card-header">
{{__('Business')}} {{__('Übersicht')}}
</h5>
<div class="card-body p-0">
{!! Form::open(['url' => route('admin_payments_invoice'), 'class' => 'form-horizontal', 'id'=>'form_filter_business_user']) !!}
<div class="form-row align-items-center px-4 pb-2 pt-3">
{{-- <div class="col-12 col-sm-4 col-md-4 col-lg-4 mb-1">
<input class="form-control on_keyup_invoice" name="business_user_filter_name" type="text" value="{{session('business_user_filter_name')}}" placeholder="Name">
</div>
--}}
<div class="col-6 col-sm-4 col-md-4 col-lg-4 mb-1">
<select class="custom-select on_change_invoice" name="business_user_filter_month">
@foreach($filter_months as $key=>$value)
<option value="{{$key}}" @if(session('business_user_filter_month') == $key) selected @endif>{{$value}}</option>
@endforeach
</select>
</div>
<div class="col-6 col-sm-4 col-md-4 col-lg-4 mb-1">
<select class="custom-select on_change_invoice" name="business_user_filter_year">
@foreach($filter_years as $key=>$value)
<option value="{{$value}}" @if(session('business_user_filter_year') == $value) selected @endif>{{$value}}</option>
@endforeach
</select>
</div>
<div class="col-6 col-sm-4 col-md-4 col-lg-4 mb-1">
<select class="custom-select on_change_invoice" name="business_user_filter_active">
@foreach($filter_active as $key=>$value)
<option value="{{$key}}" @if(session('business_user_filter_active') == $key) selected @endif>{{$value}}</option>
@endforeach
</select>
</div>
</div>
{!! Form::close() !!}
<div class="card-datatable table-responsive pt-0">
<table class="datatables-style table table-striped table-bordered" id="datatable-users">
<thead>
<tr>
<th>{{__('ID') }}</th>
<th>{{__('Berater-ID') }}</th>
<th>{{ __('Level') }}</th>
<th>{{ __('KD') }}</th>
<th>{{__('Points')}}</th>
<th>{{__('Umsatz')}}</th>
<th>{{__('E-Mail')}}</th>
<th>{{__('Vorname')}}</th>
<th>{{__('Nachname')}}</th>
<th>{{__('Sponsor')}}</th>
<th>{{__('Account')}}</th>
<th>{{__('bis')}}</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
<script>
$( document ).ready(function() {
var oTable = $('#datatable-users').DataTable({
"processing": true,
"serverSide": true,
"stateSave": true,
"searching": true,
ajax: {
url: '{!! route('admin_business_user_datatable') !!}',
data: function(d) {
d.business_user_filter_name = $('input[name=business_user_filter_name]').val();
d.business_user_filter_month = $('select[name=business_user_filter_month]').val();
d.business_user_filter_year = $('select[name=business_user_filter_year]').val();
d.business_user_filter_active = $('select[name=business_user_filter_active]').val();
}
},
"order": [[1, "asc" ]],
"columns": [
{ data: 'id', name: 'users.id', searchable: false },
{ data: 'account.m_account', name: 'account.m_account' },
{ data: 'user_level', name: 'user_level' },
{ data: 'is_qual_kp', name: 'is_qual_kp', orderable: false, searchable: false },
{ data: 'sales_volume_points', name: 'sales_volume_points', orderable: false, searchable: false },
{ data: 'sales_volume_total', name: 'sales_volume_total', orderable: false, searchable: false },
{ data: 'email', name: 'users.email' },
{ data: 'account.first_name', name: 'account.first_name' },
{ data: 'account.last_name', name: 'account.last_name' },
{ data: 'sponsor', name: 'sponsor', orderable: false, searchable: false },
{ data: 'active_account', name: 'active_account' },
{ data: 'payment_account_date', name: 'payment_account_date' },
],
"bLengthChange": false,
"iDisplayLength": 100,
"language": {
"url": "/js/German.json"
}
});
$('select.on_change_invoice').on('change', function(){
oTable.draw();
});
$('input.on_keyup_invoice').on('keyup', function(){
oTable.draw();
});
});
</script>
@endsection

View file

@ -0,0 +1,90 @@
@extends('layouts.layout-2')
@section('content')
<div class="card">
<h5 class="card-header">
{{__('Business')}} {{__('Struktur')}}
</h5>
<div class="card-body">
{!! Form::open(['url' => route('admin_business_structure'), 'class' => 'form-horizontal', 'id'=>'form_filter_business_user']) !!}
<div class="form-row align-items-center px-0 pb-2 pt-0">
<div class="col-6 col-sm-4 col-md-4 col-lg-4 mb-1">
<select class="custom-select on_change_select_filter" name="business_user_filter_month">
@foreach($filter_months as $key=>$value)
<option value="{{$key}}" @if(session('business_user_filter_month') == $key) selected @endif>{{$value}}</option>
@endforeach
</select>
</div>
<div class="col-6 col-sm-4 col-md-4 col-lg-4 mb-1">
<select class="custom-select on_change_select_filter" name="business_user_filter_year">
@foreach($filter_years as $key=>$value)
<option value="{{$value}}" @if(session('business_user_filter_year') == $value) selected @endif>{{$value}}</option>
@endforeach
</select>
</div>
</div>
{!! Form::close() !!}
<hr class="container-m-nx border-light mt-0">
<div>
<div id="nestable-menu" class="mb-4">
<button type="button" class="btn btn-default btn-sm" data-action="expand-all">Alles aufklappen</button>
<button type="button" class="btn btn-default btn-sm" data-action="collapse-all">Alles zuklappen</button>
</div>
<div class="row">
<div class="col-md-12">
<div class="dd" id="nestable2">
{!! $TreeCalcBot->makeHtmlTree() !!}
</div>
</div>
</div>
@if($TreeCalcBot->isParentless())
<div class="row">
<div class="col-md-12">
<hr>
<h6 class="">
Berater ohne Sponsor
</h6>
<div class="dd" id="">
{!! $TreeCalcBot->makeParentlessHtml() !!}
</div>
</div>
</div>
@endif
</div>
</div>
<link rel="stylesheet" href="/vendor/libs/nestable/nestable.css">
<script src="/vendor/libs/nestable/jquery-nestable.js?v=1"></script>
<script>
$( document ).ready(function() {
function updateOutput(e) {
//var list = e.length ? e : $(e.target);
//var output = list.data('output');
};
$('#nestable2').nestable().on('change', updateOutput);
// output initial serialised data
//updateOutput($('#nestable2').data('output', $('#nestable2-output')));
$('#nestable-menu').on('click', function(e) {
var target = $(e.target);
var action = target.data('action');
if (action === 'expand-all') {
$('.dd').nestable('expandAll');
}
if (action === 'collapse-all') {
$('.dd').nestable('collapseAll');
}
});
});
$('.on_change_select_filter').on('change', function(){
$('#form_filter_business_user').submit();
});
</script>
@endsection

View file

@ -0,0 +1,157 @@
@extends('layouts.layout-2')
@section('content')
<div class="card">
<h5 class="card-header">
{{__('Business')}} {{__('Übersicht')}} Berater
</h5>
<div class="media align-items-center pt-3 mb-0">
{{-- <img src="assets/img/avatars/5-small.png" alt="" class="d-block ui-w-100 rounded-circle">--}}
<div class="media-body ml-4">
<h4 class="font-weight-bold mb-0">{{ $user->account->first_name }} {{ $user->account->last_name }} <a class="font-weight-normal" href="mailto:{{ $user->email }}">{{ $user->email }}</a></h4>
</div>
</div>
<div class="card-body">
<table class="table user-view-table m-0">
<tbody>
<tr>
<td>Account ID:</td>
<td>{{ $user->account->m_account }}</td>
</tr>
<tr>
<td>Level:</td>
<td>
@if($user->user_level)
{{ $user->user_level->name }}
@else
-
@endif
</td>
</tr>
<tr>
<td>Kundenprovision:</td>
<td>
{{ $TreeCalcBot->user->margin }} %
</td>
</tr>
<tr>
<td>Shop Provision:</td>
<td>
{{ $TreeCalcBot->user->margin_shop }} %
</td>
</tr>
<tr>
<td>Account:</td>
<td>
@if($user->isActiveAccount())
<span class="badge badge-outline-success">aktiv</span>
@else
<span class="badge badge-outline-danger">nicht aktiv</span>
@endif
@if($user->payment_account)
bis: {{ $user->getPaymentAccountDateFormat(false) }}
@endif
</td>
</tr>
<tr>
<td>Sponsor:</td>
<td>@if($user->user_sponsor)
@if($user->user_sponsor->account)
{{ $user->user_sponsor->account->first_name }} {{ $user->user_sponsor->account->last_name }} |
@endif
{{ $user->email }} |
@if($user->user_sponsor->account)
{{ $user->user_sponsor->account->m_account }} |
@endif
<a href="{{ route('admin_business_user_detail', [$user->user_sponsor->id]) }}" class="btn icon-btn btn-xs btn-secondary"><span class="far fa-calculator"></span></a>
@else
-
@endif
</td>
</tr>
<tr>
<td>Datum:</td>
<td><strong>{{ $month }} {{ $year }}</strong></td>
</tr>
<tr>
<td>Points:</td>
<td>
<strong>{{ $TreeCalcBot->user->sales_volume_points_sum }}</strong>
| Berater: {{ $TreeCalcBot->user->sales_volume_points }} | Shop: {{ $TreeCalcBot->user->sales_volume_points_shop }}
</td>
</tr>
<tr>
<td>Umsatz:</td>
<td>
<strong>{{ $TreeCalcBot->user->sales_volume_total_sum }} </strong>
| Berater: {{ $TreeCalcBot->user->sales_volume_total }} | Shop: {{ $TreeCalcBot->user->sales_volume_total_shop }}
</td>
</tr>
<tr>
<td>Persönliches Volumen:</td>
<td>
<span class="badge {{ $TreeCalcBot->user->isQualKP() ? 'badge-outline-success' : 'badge-outline-danger' }}"> KD {{ $TreeCalcBot->user->qual_kp }}</span>
</td>
</tr>
<tr>
<td>Qualifikation:</td>
<td>
TP {{ formatNumber($TreeCalcBot->user->qual_tp, 0) }} /
@if($TreeCalcBot->user->isQualKP())
<strong> TP{{ formatNumber($TreeCalcBot->total_qual_tp, 0) }}</strong> &nbsp;
@if($TreeCalcBot->qual_user_level)
<span class="badge badge-outline-success">{{ formatNumber($TreeCalcBot->qual_user_level->qual_tp, 0) }} | {{ $TreeCalcBot->qual_user_level->name }}</span>
@endif
@else
<span class="ion ion-md-close text-danger"></span>
@endif
</td>
</tr>
</tbody>
</table>
</div>
<hr class="border-light m-0">
<div class="table-responsive">
<table class="table card-table m-0">
<tbody>
<tr>
<th>Linie</th>
<th>Points</th>
<th>Provision</th>
<th>Provision</th>
</tr>
@for ($line=1; $line<=6; $line++)
<tr>
<td>
<div class="font-weight-bolder line-height-1 my-2 text-dark badge badge-outline-dark">{{ $line }}</div>
</td>
<td>{{ formatNumber($TreeCalcBot->getKeybyLine($line, 'points'), 0) }}</td>
<td>{{ formatNumber($TreeCalcBot->getKeybyLine($line, 'margin'), 0) }} %</td>
<td>{{ formatNumber($TreeCalcBot->getKeybyLine($line, 'commission'), 2) }}</td>
</tr>
@endfor
</tbody>
<tfoot>
<tr>
<td>Gesamt</td>
<td>{{ formatNumber($TreeCalcBot->total_tp, 0) }}</td>
<td></td>
<td><strong>{{ formatNumber($TreeCalcBot->commission_total, 2) }}</strong></td>
</tr>
</tfoot>
</table>
</div>
<script>
$( document ).ready(function() {
});
</script>
@endsection

View file

@ -2,9 +2,9 @@
@section('content')
<div class="card">
<h6 class="card-header">
<h5 class="card-header">
{{__('Kategorien')}}
</h6>
</h5>
<div class="card-datatable table-responsive">
<table class="datatables-style table table-striped table-bordered">
<thead>

View file

@ -1,7 +1,7 @@
<div class="card mb-2">
<h6 class="card-header">
<h5 class="card-header">
{{__('Produktliste')}} / {{ $category->name }}
</h6>
</h5>
<div class="mt-3 ml-3">
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-categorie-products"
data-id="new"

View file

@ -2,9 +2,9 @@
@section('content')
<div class="card mb-4">
<h6 class="card-header">
<h5 class="card-header">
{{$user->email}} | {{__('Change E-Mail')}}
</h6>
</h5>
<div class="card-body">
<div class="row">
<div class="col-sm-2"></div>
@ -33,7 +33,7 @@
@if ($errors->has('email_confirmation'))
<span class="invalid-feedback" role="alert">
<strong>{{ $errors->first('email_confirmation') }}</strong>
</span>
</span>
@endif
</div>
</div>

View file

@ -3,9 +3,9 @@
@section('content')
<div class="card">
<h6 class="card-header">
<h5 class="card-header">
{{__('Länder')}}
</h6>
</h5>
<div class="card-datatable table-responsive">
<table class="datatables-style table table-striped table-bordered">
<thead>

View file

@ -2,9 +2,9 @@
@section('content')
<div class="card">
<h6 class="card-header">
<h5 class="card-header">
{{__('Inhaltsstoffe')}}
</h6>
</h5>
<div class="card-datatable table-responsive">
<table class="datatables-style table table-striped table-bordered">
<thead>

View file

@ -20,7 +20,7 @@
<tbody>
<tr>
<th>{{ __('Name') }}</th>
<th>{{ __('Account ID') }}</th>
<th>{{ __('Berater-ID') }}</th>
<th>{{ __('Karriere-Level') }}</th>
<th>{{ __('Sponsor') }}</th>
</tr>

View file

@ -3,9 +3,9 @@
<div class="card-body">
<div class="form-row">
<div class="form-group col-md-4">
<label for="m_account" class="form-label">{{ __('Account ID') }} (unique)</label>
<label for="m_account" class="form-label">{{ __('Berater-ID') }} (unique)</label>
<span class="badge badge-secondary float-right">Nächste freie ID: {{$next_account_id}}</span>
{{ Form::text('m_account', $user->account->m_account, array('placeholder'=>__('Account ID'), 'class'=>'form-control', 'id'=>'m_account')) }}
{{ Form::text('m_account', $user->account->m_account, array('placeholder'=>__('Berater-ID'), 'class'=>'form-control', 'id'=>'m_account')) }}
</div>
<div class="form-group col-md-4">
<label class="form-label">{{ __('Karriere-Level') }}</label>

View file

@ -2,9 +2,9 @@
@section('content')
<div class="card">
<h6 class="card-header">
<h5 class="card-header">
{{__('Karriere-Level')}}
</h6>
</h5>
<div class="card-datatable table-responsive">
<table class="datatables-style table table-striped table-bordered">
<thead>
@ -12,30 +12,50 @@
<th style="max-width: 60px;">&nbsp;</th>
<th>{{__('Pos')}}</th>
<th>{{__('Description')}}</th>
<th>{{__('Marge') }}</th>
<th>{{__('Translate') }}</th>
<th>{{__('Nächste Ebene')}}</th>
<th>{{__('Pr.') }}</th>
<th>{{__('Pr.Shop') }}</th>
<th>{{__('Qual.KP') }}</th>
<th>{{__('Qual.TP') }}</th>
<th>{{__('Pr. L.1') }}</th>
<th>{{__('Pr. L.2') }}</th>
<th>{{__('Pr. L.3') }}</th>
<th>{{__('Pr. L.4') }}</th>
<th>{{__('Pr. L.5') }}</th>
<th>{{__('Pr. L.6') }}</th>
<th>{{__('W.Bonus') }}</th>
<th>{{__('Status')}}</th>
<th>{{__('Standard')}}</th>
<th>{{__('ID')}}</th>
</tr>
</thead>
<tbody>
@foreach($values as $value)
<tr>
<td>
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-default"
data-id="{{ $value->id }}"
data-pos="{{ $value->pos }}"
data-name="{{ $value->name }}"
data-margin="{{ $value->getFormattedMargin() }}"
data-trans_name="{{ json_encode($value->trans_name) }}"
data-active="{{ $value->active }}">
<span class="far fa-edit"></span>
</button>
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-load-content"
data-id="{{ $value->id }}"
data-action="user-level-edit"
data-view="view"
data-route="{{ route('modal_load') }}"><span class="fa fa-edit"></span></button>
</td>
<td>{{ $value->pos }}</td>
<td>{{ $value->name }}</td>
<td>{{ $value->getFormattedMargin() }}</td>
<td>{{ $value->getTranNames() }}</td>
<td>@if($value->next_user_level) {{ $value->next_user_level->name }} @endif</td>
<td>{{ $value->margin }}</td>
<td>{{ $value->margin_shop }}</td>
<td>{{ $value->qual_kp }}</td>
<td>{{ $value->qual_tp }}</td>
<td>{{ $value->pr_line_1 }}</td>
<td>{{ $value->pr_line_2 }}</td>
<td>{{ $value->pr_line_3 }}</td>
<td>{{ $value->pr_line_4 }}</td>
<td>{{ $value->pr_line_5 }}</td>
<td>{{ $value->pr_line_6 }}</td>
<td>{{ $value->getFormattedGrowthBonus() }}</td>
<td data-sort="{{ $value->active }}">{!! get_active_badge($value->active) !!}</td>
<td data-sort="{{ $value->default }}">{!! get_active_badge($value->default) !!}</td>
<td>{{ $value->id }}</td>
</tr>
@endforeach
</tbody>
@ -51,99 +71,15 @@
</div>
</div>
</div>
<!-- Modal template -->
<div class="modal fade" id="modals-default">
<div class="modal-dialog">
<form class="modal-content" action="{{ route('admin_level_store') }}" method="post">
@csrf
<input type="hidden" class="form-control" name="id">
<div class="modal-header">
<h5 class="modal-title"> {{__('Attribute')}} <span class="font-weight-light">{{__('create/edit')}}</span></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="form-row">
<div class="form-group col">
<label for="name" class="form-label">{{__('Name')}}</label>
<input type="text" class="form-control" name="name" placeholder="{{__('Bezeichnung')}}">
</div>
</div>
<div class="form-row">
<div class="form-group col">
<label for="margin" class="form-label">{{__('Marge in %')}}</label>
<input type="text" class="form-control" name="margin" placeholder="{{__('Marge in %')}}">
</div>
</div>
<div class="form-row">
<div class="form-group col-6">
<label class="custom-control custom-checkbox m-2">
<input type="checkbox" class="custom-control-input" name="active" checked>
<span class="custom-control-label">{{__('active')}}</span>
</label>
</div>
<div class="form-group col-6">
<input type="text" class="form-control" name="pos" placeholder="{{__('Number to move the position if necessary')}}">
</div>
</div>
<hr>
@foreach($trans as $tran)
@if($tran != 'de')
<div class="form-row">
<div class="form-group col">
<label for="name" class="form-label">{{__('Translate')}} <strong style="text-transform: uppercase">{{$tran}}</strong></label>
<input type="text" class="form-control" name="trans[{{$tran}}]" id="trans_{{$tran}}" placeholder="">
</div>
</div>
@endif
@endforeach
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
<button type="submit" class="btn btn-primary">{{__('save')}}</button>
</div>
</form>
</div>
</div>
</div>
<script>
$( document ).ready(function() {
$('#modals-default').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
$(this).find(".modal-content input[name='id']").val(button.data('id'));
$(this).find(".modal-body input[name='name']").val(button.data('name'));
$(this).find(".modal-body input[name='pos']").val(button.data('pos'));
$(this).find(".modal-body input[name='margin']").val(button.data('margin'));
$(this).find(".modal-body input[name='active']").prop( "checked", button.data('active'));
$.each(button.data('trans_name'), function (i, item) {
var name = '#trans_'+i;
$(name).val(item);
});
});
$('.datatables-style').dataTable({
"bLengthChange": false,
"iDisplayLength": 50,
"aoColumns": [
{ "sWidth": "8%" },
{ "sWidth": "8%" },
{ "sWidth": "19%" },
{ "sWidth": "19%" },
{ "sWidth": "30%" },
{ "sWidth": "10%" },
{ "sWidth": "8%" },
],
"order": [[ 1, "asc" ]],
"language": {
"url": "/js/German.json"
}

View file

@ -0,0 +1,162 @@
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">
{{__('Business')}} {{__('Berater')}}<br>
@if(isset($user))
<span class="font-weight-light">{{ $user->account->first_name }} {{ $user->account->last_name }} <a class="font-weight-normal" href="mailto:{{ $user->email }}">{{ $user->email }}</a></span>
@endif
</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
@if(isset($TreeCalcBot))
<table class="table user-view-table m-0">
<tbody>
<tr>
<td>Account ID:</td>
<td>{{ $user->account->m_account }}</td>
</tr>
<tr>
<td>Level:</td>
<td>
@if($user->user_level)
{{ $user->user_level->name }}
@else
-
@endif
</td>
</tr>
<tr>
<td>Kundenprovision:</td>
<td>
{{ $TreeCalcBot->user->margin }} %
</td>
</tr>
<tr>
<td>Shop Provision:</td>
<td>
{{ $TreeCalcBot->user->margin_shop }} %
</td>
</tr>
<tr>
<td>Account:</td>
<td>
@if($user->isActiveAccount())
<span class="badge badge-outline-success">aktiv</span>
@else
<span class="badge badge-outline-danger">nicht aktiv</span>
@endif
@if($user->payment_account)
bis: {{ $user->getPaymentAccountDateFormat(false) }}
@endif
</td>
</tr>
<tr>
<td>Sponsor:</td>
<td>@if($user->user_sponsor)
@if($user->user_sponsor->account)
{{ $user->user_sponsor->account->first_name }} {{ $user->user_sponsor->account->last_name }} |
@endif
{{ $user->user_sponsor->email }} |
@if($user->user_sponsor->account)
{{ $user->user_sponsor->account->m_account }} |
@endif
{{-- <a href="{{ route('admin_business_user_detail', [$user->user_sponsor->id]) }}" class="btn icon-btn btn-xs btn-secondary"><span class="far fa-calculator"></span></a> --}}
@else
-
@endif
</td>
</tr>
<tr>
<td>Datum:</td>
<td><strong>{{ HTMLHelper::getMonth($data['month']) }} {{ $data['year'] }}</strong></td>
</tr>
<tr>
<td>Points:</td>
<td>
<strong>{{ $TreeCalcBot->user->sales_volume_points_sum }}</strong>
| Berater: {{ $TreeCalcBot->user->sales_volume_points }} | Shop: {{ $TreeCalcBot->user->sales_volume_points_shop }}
</td>
</tr>
<tr>
<td>Umsatz:</td>
<td>
<strong>{{ $TreeCalcBot->user->sales_volume_total_sum }} </strong>
| Berater: {{ $TreeCalcBot->user->sales_volume_total }} | Shop: {{ $TreeCalcBot->user->sales_volume_total_shop }}
</td>
</tr>
<tr>
<td>Persönliches Volumen:</td>
<td>
<span class="badge {{ $TreeCalcBot->user->isQualKP() ? 'badge-outline-success' : 'badge-outline-danger' }}"> KD {{ $TreeCalcBot->user->qual_kp }}</span>
</td>
</tr>
<tr>
<td>Qualifikation:</td>
<td>
TP {{ formatNumber($TreeCalcBot->user->qual_tp, 0) }} /
@if($TreeCalcBot->user->isQualKP())
<strong> TP {{ formatNumber($TreeCalcBot->total_qual_tp, 0) }}</strong> &nbsp;
@if($TreeCalcBot->qual_user_level)
<span class="badge badge-outline-success">{{ formatNumber($TreeCalcBot->qual_user_level->qual_tp, 0) }} | {{ $TreeCalcBot->qual_user_level->name }}</span>
@endif
@else
<span class="ion ion-md-close text-danger"></span>
@endif
</td>
</tr>
</tbody>
</table>
<hr class="border-light m-0">
<div class="table-responsive">
<table class="table card-table m-0">
<tbody>
<tr>
<th>Linie</th>
<th>Points</th>
<th>Provision</th>
<th>Provision</th>
</tr>
@for ($line=1; $line<=6; $line++)
<tr>
<td>
<div class="font-weight-bolder line-height-1 my-2 text-dark badge badge-outline-dark">{{ $line }}</div>
</td>
<td>{{ formatNumber($TreeCalcBot->getKeybyLine($line, 'points'), 0) }}</td>
<td>{{ formatNumber($TreeCalcBot->getKeybyLine($line, 'margin'), 0) }} %</td>
<td>{{ formatNumber($TreeCalcBot->getKeybyLine($line, 'commission'), 2) }}</td>
</tr>
@endfor
</tbody>
<tfoot>
<tr>
<td>Gesamt</td>
<td>{{ formatNumber($TreeCalcBot->total_tp, 0) }}</td>
<td></td>
<td><strong>{{ formatNumber($TreeCalcBot->commission_total, 2) }}</strong></td>
</tr>
</tfoot>
</table>
</div>
@endif
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">schließen</button>
</div>
<script>
$( document ).ready(function() {
});
</script>
</div>

View file

@ -77,8 +77,5 @@
</script>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">schließen</button>
</div>
</div>

View file

@ -0,0 +1,119 @@
{!! Form::open(['url' => $route, 'class' => 'modal-content', 'enctype' => 'multipart/form-data']) !!}
<div class="modal-header">
<h5 class="modal-title">
{{ __('Berater') }} Karriere-Level
<span class="font-weight-light">bearbeiten</span>
</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<input type="hidden" name="action" value="{{$data['action']}}">
<input type="hidden" name="id" value="{{$data['id']}}">
<input type="hidden" name="view" value="{{$data['view']}}">
<div class="form-row">
<div class="form-group col-12">
<label class="custom-control custom-checkbox float-right">
{!! Form::checkbox('active', 1, $value->active, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">{{__('aktiv')}}</span>
</label>
<label for="name" class="form-label">{{__('Bezeichnung')}} </label>
{{ Form::text('name', $value->name, array('placeholder'=>__('Bezeichnung'), 'class'=>'form-control', 'id'=>'name')) }}
</div>
<div class="form-group col-12">
<label for="next_id" class="form-label">{{ __('Nächster Karriere-Level') }}*</label>
{{ Form::select('next_id', $value->getNextUserLevels(), $value->next_id, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'next_id') ) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-sm-6">
<label for="margin" class="form-label">{{__('Kundenprovision in %')}}</label>
{{ Form::text('margin', $value->margin, array('placeholder'=>__('Marge in %'), 'class'=>'form-control', 'id'=>'margin')) }}
</div>
<div class="form-group col-sm-6">
<label for="margin_shop" class="form-label">{{__('Shop Provision in %')}}</label>
{{ Form::text('margin_shop', $value->margin_shop, array('placeholder'=>__('Marge in %'), 'class'=>'form-control', 'id'=>'margin_shop')) }}
</div>
<div class="form-group col-sm-6">
<label for="qual_kp" class="form-label">{{__('Persönliches Volumen')}} {{__('Kundenpoints')}}</label>
{{ Form::text('qual_kp', $value->qual_kp, array('placeholder'=>__('Kundenpoints'), 'class'=>'form-control', 'id'=>'qual_kp')) }}
</div>
<div class="form-group col-sm-6">
<label for="qual_tp" class="form-label">{{__('Qualifikation')}} {{__('Team-Points')}}</label>
{{ Form::text('qual_tp', $value->qual_tp, array('placeholder'=>__('Team-Points'), 'class'=>'form-control', 'id'=>'qual_tp')) }}
</div>
<div class="form-group col-sm-12">
<label for="growth_bonus" class="form-label">{{__('Wachstumsbonus in %')}} </label>
{{ Form::text('growth_bonus', $value->getFormattedGrowthBonus(), array('placeholder'=>__('Wachstumsbonus in %'), 'class'=>'form-control', 'id'=>'growth_bonus')) }}
</div>
</div>
<hr>
<h6>{{__('Provision Team')}}</h6>
<div class="form-row">
<div class="form-group col-sm-4">
<label for="pr_line_1" class="form-label">1 {{__('Ebene in %')}} </label>
{{ Form::text('pr_line_1', $value->pr_line_1, array('placeholder'=>__('Ebene 1'), 'class'=>'form-control', 'id'=>'pr_line_1')) }}
</div>
<div class="form-group col-sm-4">
<label for="pr_line_2" class="form-label">2 {{__('Ebene in %')}} </label>
{{ Form::text('pr_line_2', $value->pr_line_2, array('placeholder'=>__('Ebene 1'), 'class'=>'form-control', 'id'=>'pr_line_2')) }}
</div>
<div class="form-group col-sm-4">
<label for="pr_line_3" class="form-label">3 {{__('Ebene in %')}} </label>
{{ Form::text('pr_line_3', $value->pr_line_3, array('placeholder'=>__('Ebene 1'), 'class'=>'form-control', 'id'=>'pr_line_3')) }}
</div>
<div class="form-group col-sm-4">
<label for="pr_line_4" class="form-label">4 {{__('Ebene in %')}} </label>
{{ Form::text('pr_line_4', $value->pr_line_4, array('placeholder'=>__('Ebene 1'), 'class'=>'form-control', 'id'=>'pr_line_4')) }}
</div>
<div class="form-group col-sm-4">
<label for="pr_line_5" class="form-label">5 {{__('Ebene in %')}} </label>
{{ Form::text('pr_line_5', $value->pr_line_5, array('placeholder'=>__('Ebene 1'), 'class'=>'form-control', 'id'=>'pr_line_5')) }}
</div>
<div class="form-group col-sm-4">
<label for="pr_line_6" class="form-label">6 {{__('Ebene in %')}} </label>
{{ Form::text('pr_line_6', $value->pr_line_6, array('placeholder'=>__('Ebene 1'), 'class'=>'form-control', 'id'=>'pr_line_6')) }}
</div>
</div>
<hr>
<div class="form-row">
<div class="form-group col-sm-6">
<label for="pos" class="form-label">{{__('Pos')}} {{__('Sortierung')}} </label>
{{ Form::text('pos', $value->pos, array('placeholder'=>__('Pos'), 'class'=>'form-control', 'id'=>'pos')) }}
</div>
<div class="form-group col-sm-6">
<label for="default" class="form-label">&nbsp;</label>
<label class="custom-control custom-checkbox">
{!! Form::checkbox('default', 1, $value->default, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">Wird als Standard bei Neuregistrierungen gesetzt.</span>
</label>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">schließen</button>
<button type="submit" class="btn btn-primary">{{__('übernehmen')}}</button>
</div>
{!! Form::close() !!}
<script type="text/javascript">
$( document ).ready(function() {
});
</script>

View file

@ -2,11 +2,9 @@
@section('content')
<div class="card">
<h6 class="card-header">
<h5 class="card-header">
Finanzen / Rechnungen
</h6>
</h5>
<div class="card-body p-0">
{!! Form::open(['url' => route('admin_payments_invoice'), 'class' => 'form-horizontal', 'id'=>'form_filter_payment_invoices']) !!}

View file

@ -2,9 +2,9 @@
@section('content')
<div class="card">
<h6 class="card-header">
<h5 class="card-header">
{{__('Zahlungsarten')}}
</h6>
</h5>
<div class="card-datatable table-responsive">
<table class="datatables-style table table-striped table-bordered">
<thead>

View file

@ -0,0 +1,353 @@
<div class="card mb-2">
<h5 class="card-header">
{{ __('Produkt') }}
</h5>
<div class="card-body">
<div class="form-group">
<label class="custom-control custom-checkbox float-right">
{!! Form::checkbox('active', 1, $product->active, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">{{__('aktiv')}}</span>
</label>
<label class="form-label" for="name">{{ __('Produktname / Titel') }}*</label>
{{ Form::text('name', $product->name, array('placeholder'=>__('Name'), 'class'=>'form-control', 'id'=>'name', 'required')) }}
</div>
<div class="form-row">
<div class="form-group col-sm-6">
<label class="form-label" for="number">{{ __('Artikelnummer') }}</label>
{{ Form::text('number', $product->number, array('placeholder'=>__('number'), 'class'=>'form-control', 'id'=>'number')) }}
</div>
<div class="form-group col-sm-6">
<label class="form-label" for="ean">{{ __('EAN') }}</label>
{{ Form::text('ean', $product->ean, array('placeholder'=>__('EAN'), 'class'=>'form-control', 'id'=>'ean')) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-sm-10">
<label class="form-label" for="title">{{ __('Kategorie (Mehrfachauswahl)') }}*</label>
<select class="selectpicker" name="categories[]" id="categories" data-style="btn-light" data-live-search="false" multiple required>
{!! HTMLHelper::getCategoriesOptions($product->categories()->pluck('category_id')->toArray(), false) !!}
</select>
</div>
{{--
<div class="form-group col-sm-5">
<label class="form-label" for="show_at">{{ __('Produkt anzeigen') }} alt</label>
{{ Form::select('show_at', $product->showATs, $product->show_at, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'show_at') ) }}
</div>
--}}
<div class="form-group col-sm-2">
<label class="form-label" for="pos">{{ __('Listenposition') }}</label>
{{ Form::text('pos', $product->pos, array('placeholder'=>__('1, 2, 3, etc'), 'class'=>'form-control', 'id'=>'pos')) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-md-10">
<label class="form-label" for="show_on">{{ __('Produkt anzeigen (Mehrfachauswahl)') }}</label>
{{ Form::select('show_on[]', $product->showONs, $product->show_on, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'show_on', 'multiple') ) }}
</div>
</div>
<div class="form-group">
<label class="form-label" for="copy">{{ __('Produktbeschreibung') }}</label>
{{ Form::textarea('copy', $product->copy , array('placeholder'=>__('Produktbeschreibung'), 'class'=>'form-control summernote', 'id'=>'copy')) }}
</div>
<label class="custom-control custom-checkbox float-right">
{!! Form::checkbox('shipping_addon', 1, $product->shipping_addon, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">Kompensationprodukt beim Versand für Berater</span>
</label>
</div>
</div>
<div class="card mb-2">
<h5 class="card-header">
{{ __('Preise in EUR') }}
</h5>
<div class="card-body">
<div class="form-row">
<div class="form-group col-sm-4 col-md-3">
<label class="form-label" for="price">{{ __('Preis VK in EUR (Brutto)') }}</label>
{{ Form::text('price', $product->getFormattedPrice(), array('placeholder'=>__('Preis VK in EUR (Brutto)'), 'class'=>'form-control', 'id'=>'price')) }}
</div>
<div class="form-group col-sm-4 col-md-3">
<label class="form-label" for="price_ek">{{ __('Preis EK in EUR') }}</label>
{{ Form::text('price_ek', $product->getFormattedPriceEk(), array('placeholder'=>__('Preis EK in EUR'), 'class'=>'form-control', 'id'=>'price_ek')) }}
</div>
<div class="form-group col-sm-4 col-md-3">
<label class="form-label" for="tax">{{ __('MwSt in %') }}</label>
{{ Form::text('tax', $product->getFormattedTax(), array('placeholder'=>__('MwSt in %'), 'class'=>'form-control', 'id'=>'tax')) }}
</div>
<div class="form-group col-sm-4 col-md-3">
<label class="form-label" for="price_old">{{ __('Streichpreis in EUR (wenn > 0)') }}</label>
{{ Form::text('price_old', $product->getFormattedPriceOld(), array('placeholder'=>__('Streichpreis'), 'class'=>'form-control', 'id'=>'price_old')) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-sm-4">
<label class="form-label" for="weight">{{ __('Gewicht in g') }}</label>
{{ Form::text('weight', $product->weight, array('placeholder'=>__('Gewicht in g'), 'class'=>'form-control', 'id'=>'weight')) }}
</div>
<div class="form-group col-sm-4">
<label class="form-label" for="points">{{ __('Points pro Produkt') }}</label>
{{ Form::text('points', $product->points, array('placeholder'=>__('Points pro Produkt'), 'class'=>'form-control', 'id'=>'points')) }}
</div>
<div class="form-group col-sm-4">
<label class="form-label" for="amount">{{ __('Anzahl/Verfügbarkeit') }}</label>
{{ Form::text('amount', $product->amount, array('placeholder'=>__('Anzahl/Verfügbarkeit'), 'class'=>'form-control', 'id'=>'amount')) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-sm-12">
<label class="form-label">Keine Provision</label>
<label class="custom-control custom-checkbox">
{!! Form::checkbox('no_commission', 1, $product->no_commission, ['class'=>'custom-control-input', 'id'=>'no_commission']) !!}
<span class="custom-control-label">Dieses Produkt ist nicht provisionsfähig.</span>
</label>
</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)), 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)), 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)), 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>
{{-- 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>
{{--@if($country->currency_calc)
@else
Eingabe
Währungs Namen aus currency_name
currency_faktor als Hinweis ausgeben
Auf Basis vom price
Wenn own_eur auf basis vom own_eur price
<div class="form-group col-sm-4 col-md-3">
<label class="form-label">{{__('Preis VK in ')}} {{ $country->currency_unit }} ({{formatNumber($product->getRealPrice($country) * $country->currency_faktor)}})</label>
{{ Form::text('c_currency['.$country->id.']', formatNumber($product->getCCurrency($country->id)), array('placeholder'=>__('Preis VK in ').$country->currency_unit, 'class'=>'form-control')) }}
</div>
@endif --}}
<div class="form-group col-sm-4 col-md-2">
<label class="form-label">{{ __('Währungs Faktor' ) }}</label>
{{ Form::text('currency_faktor['.$country->id.']', formatNumber($country->currency_faktor, 4), array('class'=>'form-control', 'readonly')) }}
</div>
<div class="form-group col-sm-4 col-md-2">
<label class="form-label">{{ __('Preis VK in EUR ') }}</label>
{{ Form::text('preis_eur['.$country->id.']', formatNumber($product->getRealPrice($country)), array('class'=>'form-control', 'readonly')) }}
</div>
<div class="form-group col-sm-4 col-md-2">
<label class="form-label">{{ __('Währung') }}</label>
{{ Form::text('currency_unit['.$country->id.']', $country->currency_unit, array('class'=>'form-control', 'readonly')) }}
</div>
</div>
@endif
</div>
@endforeach
<em class="float-right text-muted small">für die Einstellung von landesspezifischen Preisen müssen diese unter
<a href="{{route('admin_countries')}}">Länder</a> -> Land aktiviert werden.</em>
</div>
</div>
<div class="card mb-2">
<h5 class="card-header">
{{ __('Details') }}
</h5>
<div class="card-body">
<div class="form-row">
<div class="form-group col-sm-5">
<label class="form-label" for="contents">{{ __('Menge Inhalt (ml / g) als Text') }}</label>
{{ Form::text('contents', $product->contents, array('placeholder'=>__('Bsp: 150 ml'), 'class'=>'form-control', 'id'=>'contents')) }}
</div>
<div class="form-group col-sm-3">
<label class="form-label" for="contents_total">{{ __('Gesamter Inhalt (ml / g) als Zahl') }}</label>
{{ Form::text('contents_total', $product->contents_total, array('placeholder'=>__('Bsp: 150'), 'class'=>'form-control', 'id'=>'contents_total')) }}
</div>
<div class="form-group col-sm-2">
<label class="form-label" for="contents">{{ __('Grundpreis Einheit') }}</label>
{{ Form::select('unit', $product->unitTypes, $product->unit, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'unit') ) }}
</div>
<div class="form-group col-sm-2">
<label class="form-label" for="base_price">{{ __('Grundpreis') }}</label>
{{ Form::text('base_price', $product->getBasePriceFormattedFull(), array('placeholder'=>__(''), 'class'=>'form-control', 'id'=>'base_price', 'readonly')) }}
</div>
{{-- <div class="form-group col-sm-4">
<label class="form-label" for="title">{{ __('Attribute') }}</label>
<select class="selectpicker" name="attributes[]" id="attributes" data-style="btn-light"
data-live-search="false" multiple>
{!! HTMLHelper::getAttributesOptions($product->attributes()->pluck('attribute_id')->toArray()) !!}
</select>
</div>
--}}
</div>
<div class="form-group">
<label class="form-label" for="description">{{ __('Beschreibung') }}</label>
{{ Form::textarea('description', $product->description , array('placeholder'=>__('description'), 'class'=>'form-control summernote', 'id'=>'description')) }}
</div>
<div class="form-group">
<label class="form-label" for="usage">{{ __('Anwendung') }}</label>
{{ Form::textarea('usage', $product->usage , array('placeholder'=>__('usage'), 'class'=>'form-control summernote', 'id'=>'usage')) }}
</div>
<div class="form-group">
<label class="form-label" for="ingredients">{{ __('Hinweise') }}</label>
{{ Form::textarea('ingredients', $product->ingredients , array('placeholder'=>__('ingredients'), 'class'=>'form-control summernote', 'id'=>'ingredients')) }}
</div>
<div class="form-group col-sm-6">
<label class="form-label" for="icons">{{ __('Icons') }}</label>
{{ Form::text('icons', $product->icons, array('placeholder'=>__('icons'), 'class'=>'form-control', 'id'=>'icons')) }}
"product_icons_1.png"
</div>
</div>
</div>
<div class="card mb-2">
<h5 class="card-header">
{{ __('Inhalte') }}
</h5>
<div class="card-body">
<div class="card-datatable table-responsive pt-0">
<table class="datatables-style table table-striped table-bordered">
<thead>
<tr>
<th>{{__('Name')}}</th>
<th>{{__('INCI')}}</th>
<th>{{__('Wirkung') }}</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach($product->p_ingredients as $ingredient)
<tr>
<td>{{ $ingredient->name }}</td>
<td>{{ $ingredient->inci }}</td>
<td>{{ $ingredient->effect }}</td>
<td><a class="text-danger" href="{{ route('admin_product_delete', [$product->id, 'ingredient', $ingredient->id]) }}" onclick="return confirm('{{__('Eintrag entfernen?')}}');"><i class="far fa-trash-alt"></i></a></td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="form-row">
<div class="form-group col-sm-10">
<label class="form-label" for="title">{{ __('Inhaltsstoffe hinzufügen (Mehrfachauswahl)') }}</label>
<select class="selectpicker" name="product_ingredients[]" id="product_ingredients" data-style="btn-light" data-live-search="false" multiple>
{!! HTMLHelper::getProductIngredientsOptions($product->p_ingredients()->pluck('ingredient_id')->toArray()) !!}
</select>
<a class="btn btn-default btn-xs mt-2" href="{{route('admin_product_ingredients')}}">Inhaltsstoffe anlegen</a>
</div>
<div class="form-group col-sm-2">
<button type="submit" class="btn btn-submit mt-0 mt-sm-4">{{ __('save') }}</button>&nbsp;
</div>
</div>
</div>
</div>
@if(Auth::user()->isSuperAdmin())
<div class="card mb-2">
<h5 class="card-header">
{{ __('SuperAdmin Einstellungen') }}
</h5>
<div class="card-body">
<div class="form-row">
<div class="form-group col-sm-6">
<label class="form-label" for="action">{{ __('Aktion beim Zahlungsprozess') }}</label>
{{ Form::select('action[]', $product->actionNames, $product->action, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'action', 'multiple') ) }}
</div>
<div class="form-group col-sm-6">
<label class="form-label" for="identifier">{{ __('Anzeigeoptionen Zahlung Mitglieder-Accounts') }}</label>
{{ Form::select('identifier', $product->identifiers_types, $product->identifier, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'identifier') ) }}
</div>
<div class="form-group col-sm-2">
<label class="form-label" for="upgrade_to_id">{{ __('Bei Upgrade auf ID') }}</label>
{{ Form::text('upgrade_to_id', $product->upgrade_to_id, array('placeholder'=>__('Upgrade-ID'), 'class'=>'form-control', 'id'=>'upgrade_to_id')) }}
</div>
<div class="form-group col-sm-6">
@if($product->action && is_array($product->action))
@foreach ($product->action as $do )
@if($product->getActionName($do) === 'payment_for_shop_upgrade')
<label class="form-label" for="">{{ __('Upgrade auf das Produkt') }} <span class="small">(Wird nach dem Speichern aktualisiert)</span></label>
<div class="mt-2"><strong>{{ $product->getUpgradeToIdName('payment_for_shop_upgrade') }}</strong>
</div>
@endif
@if($product->getActionName($do) === 'payment_for_lead_upgrade')
<label class="form-label" for="">{{ __('Upgrade auf Karriere Level') }} <span class="small">(Wird nach dem Speichern aktualisiert)</span></label>
<div class="mt-2"><strong>{{ $product->getUpgradeToIdName('payment_for_lead_upgrade') }}</strong>
@endif
@endforeach
@endif
</div>
</div>
<div class="form-row">
<div class="form-group col-sm-5">
<label class="form-label" for="wp_number">WP Artikel Number (als Zahl ohne Leerzeichen für die WP-API)</label>
{{ Form::text('wp_number', $product->wp_number, array('placeholder'=>__('WP Number'), 'class'=>'form-control', 'id'=>'wp_number')) }}
</div>
</div>
</div>
</div>
@endif

71
resources/views/admin/product/form.blade.php Executable file → Normal file
View file

@ -17,11 +17,16 @@
{{ Form::text('name', $product->name, array('placeholder'=>__('Name'), 'class'=>'form-control', 'id'=>'name', 'required')) }}
</div>
<div class="form-row">
{{-- <div class="form-group col-sm-6">
<label class="form-label" for="title">{{ __('Title') }}</label>
{{ Form::text('title', $product->title, array('placeholder'=>__('Title'), 'class'=>'form-control', 'id'=>'title')) }}
<div class="form-group col-sm-6">
<label class="form-label" for="number">{{ __('Artikelnummer') }}</label>
{{ Form::text('number', $product->number, array('placeholder'=>__('number'), 'class'=>'form-control', 'id'=>'number')) }}
</div>
<div class="form-group col-sm-6">
<label class="form-label" for="ean">{{ __('EAN Code') }}</label>
{{ Form::text('ean', $product->ean, array('placeholder'=>__('EAN'), 'class'=>'form-control', 'id'=>'ean')) }}
</div>
--}}
</div>
<div class="form-row">
@ -207,7 +212,7 @@
<div class="card mb-2">
<h5 class="card-header">
{{ __('Inhalte') }}
{{ __('Details') }}
</h5>
<div class="card-body">
<div class="form-row">
@ -227,25 +232,15 @@
<div class="form-group col-sm-2">
<label class="form-label" for="base_price">{{ __('Grundpreis') }}</label>
{{ Form::text('base_price', $product->getBasePriceFormattedFull(), array('placeholder'=>__(''), 'class'=>'form-control', 'id'=>'base_price', 'readonly')) }}
</div>
<div class="form-group col-sm-4">
<label class="form-label" for="number">{{ __('Artikelnummer') }}</label>
{{ Form::text('number', $product->number, array('placeholder'=>__('number'), 'class'=>'form-control', 'id'=>'number')) }}
</div>
<div class="form-group col-sm-4">
<label class="form-label" for="icons">{{ __('Icons') }}</label>
{{ Form::text('icons', $product->icons, array('placeholder'=>__('icons'), 'class'=>'form-control', 'id'=>'icons')) }}
</div>
<div class="form-group col-sm-4">
{{-- <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">
@ -260,6 +255,18 @@
<label class="form-label" for="ingredients">{{ __('Hinweise') }}</label>
{{ Form::textarea('ingredients', $product->ingredients , array('placeholder'=>__('ingredients'), 'class'=>'form-control summernote', 'id'=>'ingredients')) }}
</div>
<div class="form-row">
<div class="form-group col-sm-6">
<label class="form-label" for="icons">{{ __('Produkt Icon') }}</label>
{{ Form::select('icons', [null=>'Kein Icon', 'product_icons_1.png'=>'product_icons_1.png','product_icons_2.jpg'=>'product_icons_2.jpg'], $product->icons, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'icons') ) }}
</div>
<div class="form-group col-sm-6">
<img src="/assets/images/{{ $product->icons }}" alt="" class="img-responsive" width="200">
</div>
</div>
</div>
</div>
@ -305,24 +312,40 @@
</div>
</div>
@if(Auth::user()->isSySAdmin())
@if(Auth::user()->isSuperAdmin())
<div class="card mb-2">
<h5 class="card-header">
{{ __('SySAdmin Einstellungen') }}
{{ __('SuperAdmin Einstellungen') }}
</h5>
<div class="card-body">
<div class="form-row">
<div class="form-group col-sm-5">
<div class="form-group col-sm-6">
<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') ) }}
{{ Form::select('action[]', $product->actionNames, $product->action, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'action', 'multiple') ) }}
</div>
<div class="form-group col-sm-5">
<div class="form-group col-sm-6">
<label class="form-label" for="identifier">{{ __('Anzeigeoptionen Zahlung Mitglieder-Accounts') }}</label>
{{ Form::select('identifier', $product->identifiers_types, $product->identifier, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'identifier') ) }}
</div>
<div class="form-group col-sm-2">
<label class="form-label" for="upgrade_to_id">{{ __('Bei Upgrade auf Produkt-ID') }}</label>
{{ Form::text('upgrade_to_id', $product->upgrade_to_id, array('placeholder'=>__('Produkt-ID auf das geupdatet werden soll'), 'class'=>'form-control', 'id'=>'upgrade_to_id')) }}
<label class="form-label" for="upgrade_to_id">{{ __('Bei Upgrade auf ID') }}</label>
{{ Form::text('upgrade_to_id', $product->upgrade_to_id, array('placeholder'=>__('Upgrade-ID'), 'class'=>'form-control', 'id'=>'upgrade_to_id')) }}
</div>
<div class="form-group col-sm-6">
@if($product->action && is_array($product->action))
@foreach ($product->action as $do )
@if($product->getActionName($do) === 'payment_for_shop_upgrade')
<label class="form-label" for="">{{ __('Upgrade auf das Produkt') }} <span class="small">(Wird nach dem Speichern aktualisiert)</span></label>
<div class="mt-2"><strong>{{ $product->getUpgradeToIdName('payment_for_shop_upgrade') }}</strong>
</div>
@endif
@if($product->getActionName($do) === 'payment_for_lead_upgrade')
<label class="form-label" for="">{{ __('Upgrade auf Karriere Level') }} <span class="small">(Wird nach dem Speichern aktualisiert)</span></label>
<div class="mt-2"><strong>{{ $product->getUpgradeToIdName('payment_for_lead_upgrade') }}</strong>
@endif
@endforeach
@endif
</div>
</div>
<div class="form-row">

View file

@ -3,13 +3,13 @@
@section('content')
<div class="card">
<h6 class="card-header">
<h5 class="card-header">
{{__('Produkte')}}
<label class="custom-control custom-checkbox float-right mb-0">
<input type="checkbox" class="custom-control-input show-active-products" name="show_active_products" @if(get_user_attr('show_active_products') === "true") checked @endif>
<span class="custom-control-label font-style-normal font-weight-normal">nur aktive anzeigen</span>
</label>
</h6>
</h5>
<div class="card-datatable table-responsive">
<table class="datatables-product table table-striped table-bordered">
<thead>

View file

@ -43,7 +43,8 @@
</button>
@endif
@else
{{--
@if(Auth::user()->isSySAdmin())
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-invoice"
data-id="{{ $shopping_order->id }}"
//TODO
@ -52,7 +53,7 @@
data-action="create_invoice">
<span class="fa fa-file"></span> <strong>Rechnung erstellen</strong>
</button>
--}}
@endif
@endif
@else
@if($shopping_order->isInvoice())

View file

@ -60,9 +60,9 @@
@if($value->id>0)
<div class="card mb-2">
<h6 class="card-header">
<h5 class="card-header">
{{__('Preise')}}
</h6>
</h5>
<div class="card-datatable table-responsive">
<table class="datatables-style table table-striped table-bordered">
<thead>
@ -195,9 +195,9 @@
</div>
<div class="card mb-2">
<h6 class="card-header">
<h5 class="card-header">
{{__('Land')}}
</h6>
</h5>
<div class="card-datatable table-responsive">
<table class="datatables-style table table-striped table-bordered">
<tbody>

View file

@ -2,9 +2,9 @@
@section('content')
<div class="card">
<h6 class="card-header">
<h5 class="card-header">
{{__('Versandkosten')}}
</h6>
</h5>
<div class="card-datatable table-responsive">
<table class="datatables-style table table-striped table-bordered">
<thead>