Customers Add+Edit, API WP
This commit is contained in:
parent
dc63fa9fb2
commit
75a0f9a38a
120 changed files with 11894 additions and 6134 deletions
103
resources/views/user/customer/add.blade.php
Normal file
103
resources/views/user/customer/add.blade.php
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
|
||||
{{--
|
||||
@if ($errors->any())
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
--}}
|
||||
<h4 class="font-weight-bold py-2 mb-2">
|
||||
{{ __('Kunden hinzufügen') }}
|
||||
</h4>
|
||||
|
||||
<div id="smartwizard-3" class="smartwizard-add-client">
|
||||
<ul class="card px-4 pt-3 mb-3">
|
||||
<li>
|
||||
<a href="#smartwizard-3-step-1" class="mb-3">
|
||||
<span class="sw-done-icon ion ion-md-checkmark"></span>
|
||||
<span class="sw-number">1</span>
|
||||
E-Mail Adresse
|
||||
<div class="text-muted small">prüfen</div>
|
||||
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#smartwizard-3-step-2" class="mb-3">
|
||||
<span class="sw-done-icon ion ion-md-checkmark"></span>
|
||||
<span class="sw-number">2</span>
|
||||
Daten
|
||||
<div class="text-muted small">eingeben</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="mb-3">
|
||||
<div id="smartwizard-3-step-1" class="card animated fadeIn">
|
||||
<div class="card-body">
|
||||
{!! Form::open(['url' => route('user_customer_edit', ['new']), 'class' => 'form-horizontal', 'id'=>'lead-form-validation-confirm']) !!}
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6 {{ $errors->has('email') ? 'has-error' : '' }}">
|
||||
<label class="form-label" for="email">{{ __('E-Mail Address') }}*</label>
|
||||
{{ Form::text('email', '', array('placeholder'=>'E-Mail Adresse', 'class'=>'form-control', 'id'=>'email', 'required'=>true ,'tabindex' => 1)) }}
|
||||
@if ($errors->has('email'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('email') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
<p class="mt-2">Kundenhoheit: Es können nur Kunden hinzugefügt werden, die noch nicht im mivita-Salescenter vorhanden sind. </p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-left mt-2">
|
||||
<button type="submit" class="btn btn-secondary" name="action" value="add_customer_step_email">{{ __('prüfen und weiter') }}</button>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
<div id="smartwizard-3-step-2" class="card animated fadeIn">
|
||||
<div class="card-body">
|
||||
@if($step == 1)
|
||||
{!! Form::open(['url' => route('user_customer_edit', ['new']), 'class' => 'form-horizontal', 'id'=>'lead-form-validation']) !!}
|
||||
@include('admin.customer._edit')
|
||||
|
||||
<div class="text-left mt-3">
|
||||
<button type="submit" class="btn btn-secondary" name="action" value="shopping-user-store-new">{{ __('save changes') }}</button>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<link rel="stylesheet" href="{{ mix('/vendor/libs/smartwizard/smartwizard.css') }}">
|
||||
<script src="{{ mix('/vendor/libs/smartwizard/smartwizard.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
|
||||
$('.smartwizard-add-client').smartWizard({
|
||||
autoAdjustHeight: true,
|
||||
backButtonSupport: true,
|
||||
useURLhash: false,
|
||||
showStepURLhash: false,
|
||||
selected: '{{$step}}',
|
||||
toolbarSettings: {
|
||||
showNextButton: false,
|
||||
showPreviousButton: false,
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@endsection
|
||||
12
resources/views/user/customer/detail.blade.php
Normal file
12
resources/views/user/customer/detail.blade.php
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
|
||||
<h4 class="font-weight-bold py-2 mb-2">
|
||||
<a href="{{route('user_customers')}}" class="btn btn-sm btn-default float-right">zurück</a>
|
||||
{{ __('Kunden Details') }}
|
||||
</h4>
|
||||
@include('admin.customer._detail')
|
||||
<a href="{{route('user_customers')}}" class="btn btn-sm btn-default mt-2 float-right">zurück</a>
|
||||
|
||||
@endsection
|
||||
16
resources/views/user/customer/edit.blade.php
Normal file
16
resources/views/user/customer/edit.blade.php
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
|
||||
<h4 class="font-weight-bold py-2 mb-2">
|
||||
<a href="{{route('user_customer_edit', [$shopping_user->id])}}" class="btn btn-sm btn-default float-right">zurück</a>
|
||||
{{ __('Kunden Details') }} bearbeiten
|
||||
</h4>
|
||||
{!! Form::open(['url' => route('user_customer_edit', [$shopping_user->id]), 'class' => 'form-horizontal', 'id'=>'lead-form-validation']) !!}
|
||||
@include('admin.customer._edit')
|
||||
<div class="text-left mt-3">
|
||||
<button type="submit" class="btn btn-secondary" name="action" value="shopping-user-store">{{ __('save changes') }}</button>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
<a href="{{route('user_customer_edit', [$shopping_user->id])}}" class="btn btn-sm btn-default float-right">zurück</a>
|
||||
@endsection
|
||||
89
resources/views/user/customer/index.blade.php
Normal file
89
resources/views/user/customer/index.blade.php
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
<h4 class="font-weight-bold py-2 mb-2">
|
||||
{{ __('navigation.my_clients') }}
|
||||
</h4>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-datatable table-responsive">
|
||||
<div class="ml-4">
|
||||
<!--<a href="{{ route('admin_lead_edit', ['new']) }}" class="btn btn-sm btn-primary">{{__('Neuen Berater erstellen')}}</a> -->
|
||||
</div>
|
||||
<table class="datatables-customers table table-striped table-bordered" id="datatables-customers">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{{__('E-Mail')}}</th>
|
||||
<th>{{__('Anrede')}}</th>
|
||||
<th>{{__('Firma')}}</th>
|
||||
<th>{{__('Vorname')}}</th>
|
||||
<th>{{__('Nachname')}}</th>
|
||||
<th>{{__('PLZ')}}</th>
|
||||
<th>{{__('Stadt')}}</th>
|
||||
<th>{{__('Land')}}</th>
|
||||
<th>{{__('Käufe')}}</th>
|
||||
<th>{{__('Newsletter')}}</th>
|
||||
<th>{{__('erstellt')}}</th>
|
||||
<th>{{__('ID Kunden')}}</th>
|
||||
<th>WP</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="mt-4 ml-4">
|
||||
<!-- <a href="{{ route('admin_lead_edit', ['new']) }}" class="btn btn-sm btn-primary">{{__('Neuen Berater erstellen')}}</a> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
|
||||
var oTable = $('#datatables-customers').DataTable({
|
||||
"processing": true,
|
||||
"serverSide": true,
|
||||
ajax: {
|
||||
url: '{!! route( 'user_customer_datatable') !!}',
|
||||
data: function(d) {
|
||||
// d.filter_member_id = $('select[name=filter_member_id]').val();
|
||||
// d.filter_customer_member = $('select[name=filter_customer_member]').val();
|
||||
}
|
||||
},
|
||||
"order": [[0, "desc" ]],
|
||||
"columns": [
|
||||
{ data: 'id', searchable: false},
|
||||
{ data: 'billing_email', name: 'billing_email' },
|
||||
{ data: 'billing_salutation', name: 'billing_salutation' },
|
||||
{ data: 'billing_company', name: 'billing_company' },
|
||||
{ data: 'billing_firstname', name: 'billing_firstname' },
|
||||
{ data: 'billing_lastname', name: 'billing_lastname' },
|
||||
{ data: 'billing_zipcode', name: 'billing_zipcode' },
|
||||
{ data: 'billing_city', name: 'billing_city' },
|
||||
{ data: 'billing_country_id', name: 'billing_country_id' },
|
||||
{ data: 'orders', name: 'orders' },
|
||||
{ data: 'subscribed', name: 'subscribed' },
|
||||
{ data: 'first_created_at', name: 'first_created_at' },
|
||||
{ data: 'number', name: 'number'},
|
||||
{ data: 'extras', name: 'extras', searchable: false, orderable: false},
|
||||
],
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 50,
|
||||
"language": {
|
||||
"url": "/js/German.json"
|
||||
}
|
||||
});
|
||||
/* $('#filter_member_id').on('change', function(){
|
||||
oTable.draw();
|
||||
});
|
||||
$('#filter_customer_member').on('change', function(){
|
||||
oTable.draw();
|
||||
});
|
||||
*/
|
||||
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue