update 20.10.2025
This commit is contained in:
parent
8c11130b5d
commit
a939cd51ef
616 changed files with 84821 additions and 4121 deletions
|
|
@ -11,23 +11,25 @@
|
|||
@if($TreeCalcBot->__get('business_user')->payment_account_date)
|
||||
{{ __('team.until') }}: {{ formatDate($TreeCalcBot->__get('business_user')->payment_account_date) }}
|
||||
@endif
|
||||
(ID: {{ $TreeCalcBot->__get('business_user')->m_account }}) <span class="badge badge-outline-info">Optimized</span>
|
||||
(ID: {{ $TreeCalcBot->__get('business_user')->m_account }}) <span class="badge badge-outline-default">v2</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{{ __('team.date') }}:</td>
|
||||
<td>
|
||||
<strong>{{ HTMLHelper::getMonth($data['month']) }} {{ $data['year'] }}</strong> | {{ __('team.completed') }}:
|
||||
<strong>{{ HTMLHelper::getMonth($data['month']) }} {{ $data['year'] }}</strong> |
|
||||
@if($TreeCalcBot->__get('business_user')->isSave())
|
||||
{{ __('team.completed') }}:
|
||||
<span class="badge badge-outline-success"><i class="fa fa-check-circle"></i></span>
|
||||
@if(Auth::user()->isAdmin())
|
||||
{{-- @if(Auth::user()->isSySAdmin())
|
||||
<a target="_blank" class="btn btn-outline-secondary btn-xs" href="{{ route('admin_business_optimized_user_detail', [$user->id, 'force_live' => true]) }}">
|
||||
<i class="fa fa-redo"></i> {{ __('Live Berechnung') }}
|
||||
</a>
|
||||
@endif
|
||||
@endif --}}
|
||||
@else
|
||||
<span class="badge badge-outline-warning-dark"><i class="fa fa-times"></i></span>
|
||||
{{ __('team.open') }}:
|
||||
<span class="badge badge-outline-warning-dark"><i class="fa fa-history"></i></span>
|
||||
|
||||
@endif
|
||||
</td>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<div class="card">
|
||||
<h5 class="card-header">
|
||||
{{__('Business')}} {{__('Übersicht')}}
|
||||
<span class="badge badge-success ml-2">OPTIMIERT</span>
|
||||
<span class="badge badge-default ml-2">v2</span>
|
||||
</h5>
|
||||
|
||||
<div class="card-body p-0">
|
||||
|
|
@ -63,6 +63,7 @@
|
|||
{!! Form::close() !!}
|
||||
|
||||
<!-- Performance Info Banner -->
|
||||
@if(config('app.debug'))
|
||||
<div class="alert alert-info mx-4 mb-3">
|
||||
<div class="d-flex align-items-center">
|
||||
<i class="fa fa-rocket mr-2"></i>
|
||||
|
|
@ -74,7 +75,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
<div class="card-datatable table-responsive pt-0">
|
||||
<table class="datatables-style table table-striped table-bordered" id="datatable-users">
|
||||
<thead>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<div class="card">
|
||||
<h5 class="card-header">
|
||||
{{__('team.business')}} {{__('team.structure')}}
|
||||
<span class="badge badge-success ml-2">OPTIMIERT</span>
|
||||
<span class="badge badge-default ml-2">v2</span>
|
||||
</h5>
|
||||
|
||||
<div class="card-body">
|
||||
|
|
@ -29,7 +29,7 @@
|
|||
{!! Form::close() !!}
|
||||
|
||||
<!-- Performance Metrics Display -->
|
||||
@if(isset($performance))
|
||||
@if(config('app.debug') && isset($performance))
|
||||
<div class="alert alert-success">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
|
|
@ -59,6 +59,7 @@
|
|||
<button type="button" class="btn btn-default btn-sm" data-action="collapse-all">{{ __('team.collapse_all') }}</button>
|
||||
|
||||
<!-- Zusätzliche Optimierungs-Controls -->
|
||||
@if(config('app.debug'))
|
||||
<div class="btn-group ml-3" role="group">
|
||||
<button type="button" class="btn btn-info btn-sm" onclick="showPerformanceDetails()">
|
||||
<i class="fa fa-chart-line"></i> Performance Details
|
||||
|
|
@ -76,6 +77,7 @@
|
|||
</a>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
|
@ -91,7 +93,7 @@
|
|||
<div class="col-md-12">
|
||||
<hr>
|
||||
<h6 class="">
|
||||
Berater ohne Sponsor
|
||||
Berater mit abgelaufenem Account
|
||||
<span class="badge badge-warning">{{ count($TreeCalcBot->__get('parentless')) }}</span>
|
||||
</h6>
|
||||
<div class="dd" id="">
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<div class="card">
|
||||
<h5 class="card-header">
|
||||
{{__('Business')}} {{__('Übersicht')}} Berater
|
||||
<span class="badge badge-success ml-2">OPTIMIERT</span>
|
||||
<span class="badge badge-default ml-2">v2</span>
|
||||
</h5>
|
||||
{!! Form::open(['action' => route('admin_business_optimized_user_detail', [$user->id]), 'class' => 'form-horizontal', 'id'=>'']) !!}
|
||||
{{ Form::hidden('user_id', $user->id ) }}
|
||||
|
|
@ -17,13 +17,10 @@
|
|||
<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>
|
||||
|
||||
{{-- <button type="submit" class="btn btn-submit btn-secondary btn-sm float-right mr-4">{{ __('save') }}</button> --}}
|
||||
|
||||
</h4>
|
||||
</h4>
|
||||
|
||||
<!-- Performance Info -->
|
||||
@if(isset($data['performance']))
|
||||
@if(config('app.debug') && isset($data['performance']))
|
||||
<div class="mt-2">
|
||||
<small class="text-muted">
|
||||
<i class="fa fa-rocket mr-1"></i>
|
||||
|
|
@ -33,10 +30,12 @@
|
|||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! Form::close() !!}
|
||||
|
||||
<div class="card-body">
|
||||
<!-- Navigation zwischen Original und Optimiert -->
|
||||
@if(config('app.debug'))
|
||||
<div class="alert alert-info">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div>
|
||||
|
|
@ -49,7 +48,7 @@
|
|||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
@include('admin.business_optimized._user_detail_in')
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -131,92 +131,13 @@
|
|||
<a href="{{ route('admin.dhl.cockpit') }}" class="btn btn-outline-secondary">
|
||||
<i class="fas fa-sync"></i> Zurücksetzen
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Quick Actions -->
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0">
|
||||
<i class="fas fa-bolt text-warning"></i>
|
||||
Schnellaktionen
|
||||
</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="card bg-light border-primary h-100">
|
||||
<div class="card-body text-center">
|
||||
<i class="fas fa-plus-circle fa-3x text-primary mb-3"></i>
|
||||
<h5 class="card-title">Neue Sendung erstellen</h5>
|
||||
<p class="card-text text-muted">
|
||||
Erstellen Sie eine neue DHL-Sendung basierend auf einer bestehenden Bestellung.
|
||||
</p>
|
||||
<button type="button" class="btn btn-primary"
|
||||
data-toggle="modal"
|
||||
data-id="new"
|
||||
data-target="#modals-load-content"
|
||||
data-action="create-dhl-shipment"
|
||||
data-route="{{ route('modal_load') }}">
|
||||
<i class="fas fa-shipping-fast"></i> Sendung erstellen
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="card bg-light border-info h-100">
|
||||
<div class="card-body text-center">
|
||||
<i class="fas fa-search fa-3x text-info mb-3"></i>
|
||||
<h5 class="card-title">Sendung anzeigen</h5>
|
||||
<p class="card-text text-muted">
|
||||
Suchen und anzeigen einer bestimmten Sendung nach ID oder Tracking-Nummer.
|
||||
</p>
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-info dropdown-toggle" type="button" id="showDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fas fa-eye"></i> Sendung anzeigen
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="showDropdown">
|
||||
<h6 class="dropdown-header">Sendung finden:</h6>
|
||||
<a class="dropdown-item" href="#" onclick="promptShipmentId()">
|
||||
<i class="fas fa-hashtag"></i> Sendungs-ID eingeben
|
||||
</a>
|
||||
<a class="dropdown-item" href="#" onclick="promptTrackingNumber()">
|
||||
<i class="fas fa-barcode"></i> Tracking-Nummer eingeben
|
||||
</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="#" onclick="$('#search').focus();">
|
||||
<i class="fas fa-filter"></i> Filter verwenden
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="card bg-light border-secondary h-100">
|
||||
<div class="card-body text-center">
|
||||
<i class="fas fa-plug fa-3x text-secondary mb-3"></i>
|
||||
<h5 class="card-title">API Login Test</h5>
|
||||
<p class="card-text text-muted">
|
||||
Überprüfen Sie, ob die in der <code>.env</code>-Datei hinterlegten DHL-Zugangsdaten korrekt sind.
|
||||
</p>
|
||||
<button type="button" class="btn btn-secondary" id="test-dhl-login-btn">
|
||||
<span class="spinner-border spinner-border-sm" role="status" style="display: none;"></span>
|
||||
<i class="fas fa-key"></i> Login testen
|
||||
</button>
|
||||
<div id="dhl-test-result" class="mt-3 text-left"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Batch Actions -->
|
||||
<div class="card mb-4">
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
|
|
@ -224,11 +145,23 @@
|
|||
<i class="fas fa-list text-primary"></i>
|
||||
Sendungsübersicht
|
||||
</h5>
|
||||
<div class="float-right">
|
||||
<button type="button" class="btn btn-sm btn-primary"
|
||||
data-toggle="modal"
|
||||
data-id="new"
|
||||
data-target="#modals-load-content"
|
||||
data-action="create-dhl-shipment"
|
||||
data-route="{{ route('modal_load') }}">
|
||||
<i class="fas fa-shipping-fast"></i> Sendung erstellen
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="batch-actions" style="display: none;">
|
||||
{{-- Todo: Add cancel button
|
||||
<button type="button" class="btn btn-sm btn-warning batch-action-btn" data-action="cancel">
|
||||
<i class="fas fa-ban"></i> Ausgewählte stornieren
|
||||
</button>
|
||||
--}}
|
||||
<button type="button" class="btn btn-sm btn-info batch-action-btn" data-action="update_tracking">
|
||||
<i class="fas fa-sync"></i> Tracking aktualisieren
|
||||
</button>
|
||||
|
|
@ -278,6 +211,8 @@ $(document).ready(function() {
|
|||
var dhlTable = $('#dhl-shipments-table').DataTable({
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
searching: false,
|
||||
pageLength: 50,
|
||||
ajax: {
|
||||
url: "{{ route('admin.dhl.datatable') }}",
|
||||
type: "POST",
|
||||
|
|
@ -316,6 +251,8 @@ $(document).ready(function() {
|
|||
// Handle filter form submission
|
||||
$('#dhl-filter-form').on('submit', function(e) {
|
||||
e.preventDefault();
|
||||
console.log(('#date_from').val());
|
||||
console.log(('#date_to').val());
|
||||
dhlTable.draw();
|
||||
});
|
||||
|
||||
|
|
@ -327,54 +264,7 @@ $(document).ready(function() {
|
|||
// Tooltip initialization for static elements
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
|
||||
// --- DHL LOGIN TEST ---
|
||||
$('#test-dhl-login-btn').click(function() {
|
||||
var btn = $(this);
|
||||
var spinner = btn.find('.spinner-border');
|
||||
var resultContainer = $('#dhl-test-result');
|
||||
|
||||
btn.prop('disabled', true);
|
||||
spinner.show();
|
||||
resultContainer.html('');
|
||||
|
||||
$.ajax({
|
||||
url: '{{ route("admin.dhl.test_login") }}',
|
||||
method: 'POST',
|
||||
data: {
|
||||
_token: '{{ csrf_token() }}'
|
||||
},
|
||||
success: function(response) {
|
||||
var alertClass = response.success ? 'alert-success' : 'alert-danger';
|
||||
var icon = response.success ? 'fas fa-check-circle' : 'fas fa-times-circle';
|
||||
var resultHtml = `
|
||||
<div class="alert ${alertClass} d-flex align-items-center" role="alert">
|
||||
<i class="${icon} mr-2"></i>
|
||||
<div>
|
||||
${response.message}
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
resultContainer.html(resultHtml);
|
||||
},
|
||||
error: function(xhr) {
|
||||
var errorHtml = `
|
||||
<div class="alert alert-danger d-flex align-items-center" role="alert">
|
||||
<i class="fas fa-server mr-2"></i>
|
||||
<div>
|
||||
Ein Serverfehler ist aufgetreten. Prüfen Sie die Browser-Konsole und die Laravel-Logs.
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
resultContainer.html(errorHtml);
|
||||
},
|
||||
complete: function() {
|
||||
btn.prop('disabled', false);
|
||||
spinner.hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// --- BATCH & ROW ACTIONS ---
|
||||
|
||||
// Select All functionality
|
||||
$('#dhl-shipments-table').on('change', '#select-all', function() {
|
||||
|
|
@ -417,28 +307,81 @@ $(document).ready(function() {
|
|||
if (!confirm('Möchten Sie diese Aktion für ' + selectedIds.length + ' Sendung(en) ausführen?')) {
|
||||
return;
|
||||
}
|
||||
console.log(selectedIds);
|
||||
console.log(action);
|
||||
|
||||
// Perform batch action
|
||||
$.ajax({
|
||||
url: '{{ route("admin.dhl.batch-action") }}',
|
||||
method: 'POST',
|
||||
data: {
|
||||
action: action,
|
||||
shipment_ids: selectedIds,
|
||||
_token: '{{ csrf_token() }}'
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
showAlert('success', response.message);
|
||||
location.reload();
|
||||
} else {
|
||||
showAlert('error', response.message);
|
||||
if (action === 'download_labels') {
|
||||
// Handle file download differently
|
||||
$.ajax({
|
||||
url: '{{ route("admin.dhl.batch-action") }}',
|
||||
method: 'POST',
|
||||
data: {
|
||||
action: action,
|
||||
shipment_ids: selectedIds,
|
||||
_token: '{{ csrf_token() }}'
|
||||
},
|
||||
xhrFields: {
|
||||
responseType: 'blob'
|
||||
},
|
||||
success: function(data, status, xhr) {
|
||||
// Check if it's actually a JSON error response
|
||||
if (xhr.getResponseHeader('content-type') && xhr.getResponseHeader('content-type').indexOf('application/json') !== -1) {
|
||||
var reader = new FileReader();
|
||||
reader.onload = function() {
|
||||
try {
|
||||
var response = JSON.parse(reader.result);
|
||||
if (response.success) {
|
||||
showAlert('success', response.message);
|
||||
} else {
|
||||
showAlert('error', response.message);
|
||||
}
|
||||
} catch (e) {
|
||||
showAlert('error', 'Fehler beim Verarbeiten der Antwort.');
|
||||
}
|
||||
};
|
||||
reader.readAsText(data);
|
||||
} else {
|
||||
// It's a file download
|
||||
var blob = new Blob([data]);
|
||||
var url = window.URL.createObjectURL(blob);
|
||||
var a = document.createElement('a');
|
||||
a.href = url;
|
||||
a.download = 'dhl_labels_' + new Date().toISOString().slice(0,19).replace(/:/g, '-') + '.zip';
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
document.body.removeChild(a);
|
||||
window.URL.revokeObjectURL(url);
|
||||
showAlert('success', 'Labels werden heruntergeladen...');
|
||||
}
|
||||
},
|
||||
error: function(xhr) {
|
||||
showAlert('error', 'Fehler beim Download der Labels.');
|
||||
}
|
||||
},
|
||||
error: function(xhr) {
|
||||
showAlert('error', 'Fehler bei der Stapelverarbeitung.');
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
// Handle other batch actions normally
|
||||
$.ajax({
|
||||
url: '{{ route("admin.dhl.batch-action") }}',
|
||||
method: 'POST',
|
||||
data: {
|
||||
action: action,
|
||||
shipment_ids: selectedIds,
|
||||
_token: '{{ csrf_token() }}'
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
showAlert('success', response.message);
|
||||
location.reload();
|
||||
} else {
|
||||
showAlert('error', response.message);
|
||||
}
|
||||
},
|
||||
error: function(xhr) {
|
||||
showAlert('error', 'Fehler bei der Stapelverarbeitung.');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Individual action buttons (delegated events)
|
||||
|
|
@ -528,31 +471,6 @@ $(document).ready(function() {
|
|||
});
|
||||
*/
|
||||
|
||||
function promptShipmentId() {
|
||||
var shipmentId = prompt('Bitte geben Sie die Sendungs-ID ein:');
|
||||
if (shipmentId && shipmentId.trim()) {
|
||||
shipmentId = shipmentId.trim();
|
||||
if (!isNaN(shipmentId) && shipmentId > 0) {
|
||||
window.location.href = '{{ route("admin.dhl.show", ":shipmentId") }}'.replace(':shipmentId', shipmentId);
|
||||
} else {
|
||||
alert('Bitte geben Sie eine gültige Sendungs-ID (Zahl) ein.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function promptTrackingNumber() {
|
||||
var trackingNumber = prompt('Bitte geben Sie die Tracking-Nummer ein:');
|
||||
if (trackingNumber && trackingNumber.trim()) {
|
||||
trackingNumber = trackingNumber.trim();
|
||||
if (trackingNumber.length >= 10) {
|
||||
// Use search functionality to find by tracking number
|
||||
$('#search').val(trackingNumber);
|
||||
$('#dhl-filter-form').submit();
|
||||
} else {
|
||||
alert('Bitte geben Sie eine gültige Tracking-Nummer ein (mindestens 10 Zeichen).');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Alert helper function
|
||||
function showAlert(type, message) {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,13 @@
|
|||
<div class="modal-header">
|
||||
<h5 class="modal-title">
|
||||
<i class="fas fa-shipping-fast text-primary"></i>
|
||||
DHL Sendung erstellen
|
||||
@if($modalMode === 'search')
|
||||
DHL Sendung erstellen
|
||||
@elseif($modalMode === 'info')
|
||||
DHL Sendungen - Bestellung #{{ $order->id }}
|
||||
@elseif($modalMode === 'create')
|
||||
DHL Sendung erstellen - Bestellung #{{ $order->id }}
|
||||
@endif
|
||||
</h5>
|
||||
<button type="button" class="close" data-dismiss="modal">
|
||||
<span aria-hidden="true">×</span>
|
||||
|
|
@ -42,293 +48,18 @@
|
|||
</div>
|
||||
@endif
|
||||
|
||||
@if($order)
|
||||
<form id="modal-create-shipment-form" method="POST" action="{{ route('admin.dhl.store') }}">
|
||||
@csrf
|
||||
<input type="hidden" name="order_id" value="{{ $order->id }}">
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
{{-- Left Column: Order Info --}}
|
||||
<div class="col-md-6">
|
||||
<h6 class="text-primary mb-3">
|
||||
<i class="fas fa-info-circle"></i>
|
||||
Bestellinformationen
|
||||
</h6>
|
||||
|
||||
<div class="card bg-light">
|
||||
<div class="card-body">
|
||||
<h6 class="card-title">Bestellung #{{ $order->id }}</h6>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<small class="text-muted d-block">Kunde:</small>
|
||||
<strong>{{ $order->shopping_user->billing_firstname ?? '' }} {{ $order->shopping_user->billing_lastname ?? '' }}</strong>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<small class="text-muted d-block">Datum:</small>
|
||||
<strong>{{ $order->created_at->format('d.m.Y') }}</strong>
|
||||
</div>
|
||||
<div class="col-6 mt-2">
|
||||
<small class="text-muted d-block">Wert:</small>
|
||||
<strong>{{ number_format($order->total, 2) }} €</strong>
|
||||
</div>
|
||||
<div class="col-6 mt-2">
|
||||
<small class="text-muted d-block">Artikel:</small>
|
||||
<strong>{{ $order->shopping_order_items->count() }} Stück</strong>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Right Column: Shipment Config --}}
|
||||
<div class="col-md-6">
|
||||
<h6 class="text-primary mb-3">
|
||||
<i class="fas fa-cog"></i>
|
||||
Sendungskonfiguration
|
||||
</h6>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="modal-weight" class="font-weight-semibold">
|
||||
<i class="fas fa-weight"></i>
|
||||
Gewicht (kg) <span class="text-danger">*</span>
|
||||
</label>
|
||||
<input type="number"
|
||||
class="form-control"
|
||||
id="modal-weight"
|
||||
name="weight"
|
||||
min="0.1"
|
||||
max="31.5"
|
||||
step="0.1"
|
||||
value="{{ number_format($orderWeight, 1) }}"
|
||||
required>
|
||||
<small class="form-text text-muted">
|
||||
Berechnet: {{ number_format($orderWeight, 1) }} kg
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="modal-product-code" class="font-weight-semibold">
|
||||
<i class="fas fa-cube"></i>
|
||||
Produktcode
|
||||
</label>
|
||||
<select class="form-control custom-select" id="modal-product-code" name="product_code">
|
||||
@foreach($productCodes as $code => $name)
|
||||
<option value="{{ $code }}">{{ $code }} - {{ $name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="modal-priority" class="font-weight-semibold">
|
||||
<i class="fas fa-exclamation-triangle"></i>
|
||||
Priorität
|
||||
</label>
|
||||
<select class="form-control custom-select" id="modal-priority" name="priority">
|
||||
<option value="normal">Normal</option>
|
||||
<option value="high">Hoch</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox"
|
||||
class="custom-control-input"
|
||||
id="modal-auto-track"
|
||||
name="auto_track"
|
||||
value="1"
|
||||
checked>
|
||||
<label class="custom-control-label" for="modal-auto-track">
|
||||
Automatisches Tracking
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
{{-- Shipping Address Section --}}
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h6 class="text-primary mb-3">
|
||||
<i class="fas fa-map-marker-alt"></i>
|
||||
Lieferadresse
|
||||
@if(!empty($warnings))
|
||||
<small class="text-warning">(Bitte Adresse prüfen)</small>
|
||||
@else
|
||||
<small class="text-muted">(zur Not anpassbar)</small>
|
||||
@endif
|
||||
</h6>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="shipping_firstname">Vorname <span class="text-danger">*</span></label>
|
||||
<input type="text"
|
||||
class="form-control {{ empty($shippingAddress['firstname']) ? 'is-invalid' : '' }}"
|
||||
name="shipping_firstname"
|
||||
id="shipping_firstname"
|
||||
value="{{ $shippingAddress['firstname'] ?? '' }}"
|
||||
required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="shipping_lastname">Nachname <span class="text-danger">*</span></label>
|
||||
<input type="text"
|
||||
class="form-control {{ empty($shippingAddress['lastname']) ? 'is-invalid' : '' }}"
|
||||
name="shipping_lastname"
|
||||
id="shipping_lastname"
|
||||
value="{{ $shippingAddress['lastname'] ?? '' }}"
|
||||
required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="shipping_company">Firma <small class="text-muted">(optional)</small></label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
name="shipping_company"
|
||||
id="shipping_company"
|
||||
value="{{ $shippingAddress['company'] ?? '' }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<div class="form-group">
|
||||
<label for="shipping_address">Straße <span class="text-danger">*</span></label>
|
||||
<input type="text"
|
||||
class="form-control {{ empty($shippingAddress['address']) ? 'is-invalid' : '' }}"
|
||||
name="shipping_address"
|
||||
id="shipping_address"
|
||||
value="{{ $shippingAddress['address'] ?? '' }}"
|
||||
required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="shipping_houseNumber">Nr./Zusatz <span class="text-danger">*</span></label>
|
||||
<input type="text"
|
||||
class="form-control {{ empty($shippingAddress['houseNumber']) ? 'border-warning' : '' }}"
|
||||
name="shipping_houseNumber"
|
||||
id="shipping_houseNumber"
|
||||
value="{{ $shippingAddress['houseNumber'] ?? '' }}"
|
||||
required>
|
||||
@if(empty($shippingAddress['houseNumber']))
|
||||
<small class="text-warning">Hausnummer benötigt</small>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="shipping_zipcode">PLZ <span class="text-danger">*</span></label>
|
||||
<input type="text"
|
||||
class="form-control {{ empty($shippingAddress['zipcode']) ? 'is-invalid' : '' }}"
|
||||
name="shipping_zipcode"
|
||||
id="shipping_zipcode"
|
||||
value="{{ $shippingAddress['zipcode'] ?? '' }}"
|
||||
required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<div class="form-group">
|
||||
<label for="shipping_city">Ort <span class="text-danger">*</span></label>
|
||||
<input type="text"
|
||||
class="form-control {{ empty($shippingAddress['city']) ? 'is-invalid' : '' }}"
|
||||
name="shipping_city"
|
||||
id="shipping_city"
|
||||
value="{{ $shippingAddress['city'] ?? '' }}"
|
||||
required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="shipping_country">Land <span class="text-danger">*</span></label>
|
||||
<select class="form-control custom-select" name="shipping_country_id" id="shipping_country" required>
|
||||
@foreach($availableCountries as $countryOption)
|
||||
<option value="{{ $countryOption->id }}"
|
||||
{{ $shippingAddress['country'] && $shippingAddress['country']->id == $countryOption->id ? 'selected' : '' }}>
|
||||
{{ $countryOption->getLocated() }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="shipping_phone">Telefon <small class="text-muted">(empfohlen)</small></label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
name="shipping_phone"
|
||||
id="shipping_phone"
|
||||
value="{{ $shippingAddress['phone'] ?? '' }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
||||
<i class="fas fa-times"></i> Abbrechen
|
||||
</button>
|
||||
<button type="submit" class="btn btn-primary" id="create-shipment-btn" {{ !empty($errors) ? 'disabled' : '' }}>
|
||||
<i class="fas fa-shipping-fast"></i> Sendung erstellen
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
@else
|
||||
{{-- Order Selection when no order ID provided --}}
|
||||
<div class="modal-body">
|
||||
<div class="text-center">
|
||||
<i class="fas fa-search fa-3x text-primary mb-4"></i>
|
||||
<h4>Bestellung auswählen</h4>
|
||||
<p class="text-muted mb-4">Geben Sie eine Bestellungs-ID ein, um eine DHL-Sendung zu erstellen.</p>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8 mx-auto">
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">#</span>
|
||||
</div>
|
||||
<input type="number"
|
||||
class="form-control form-control-lg"
|
||||
id="order-id-input"
|
||||
placeholder="z.B. 12345"
|
||||
min="1">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-primary" type="button" id="load-order-btn">
|
||||
<i class="fas fa-search"></i> Laden
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-center mt-3">
|
||||
<div class="mb-3">oder</div>
|
||||
<a href="{{ route('admin_sales_customers') }}"
|
||||
target="_blank"
|
||||
class="btn btn-outline-secondary">
|
||||
<i class="fas fa-external-link-alt"></i>
|
||||
In Bestellverwaltung suchen
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
||||
<i class="fas fa-times"></i> Abbrechen
|
||||
</button>
|
||||
</div>
|
||||
@if($modalMode === 'search')
|
||||
@include('admin.dhl.modal_in_search_shipment')
|
||||
@elseif($modalMode === 'info')
|
||||
@include('admin.dhl.modal_in_shipment_info')
|
||||
@elseif($modalMode === 'create')
|
||||
@include('admin.dhl.modal_in_order_shipment')
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
@if(!$order)
|
||||
@if($modalMode === 'search')
|
||||
// Load order functionality
|
||||
$('#load-order-btn').click(function() {
|
||||
var orderId = $('#order-id-input').val();
|
||||
|
|
@ -363,7 +94,7 @@ $(document).ready(function() {
|
|||
});
|
||||
@endif
|
||||
|
||||
@if($order)
|
||||
@if($modalMode === 'create')
|
||||
// Form submission with improved validation
|
||||
$('#modal-create-shipment-form').on('submit', function(e) {
|
||||
e.preventDefault();
|
||||
|
|
@ -387,20 +118,47 @@ $(document).ready(function() {
|
|||
data: formData,
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
// Close modal
|
||||
$('#modals-load-content').modal('hide');
|
||||
console.log(response);
|
||||
|
||||
// Show success message and reload
|
||||
// Show success message
|
||||
if (typeof showAlert === 'function') {
|
||||
showAlert('success', response.message);
|
||||
} else {
|
||||
alert(response.message);
|
||||
}
|
||||
|
||||
// Reload page after 2 seconds
|
||||
// Switch to info mode instead of closing modal
|
||||
setTimeout(function() {
|
||||
location.reload();
|
||||
}, 2000);
|
||||
// Show loading indicator
|
||||
var loadingHtml = `
|
||||
<div class="modal-body text-center py-5">
|
||||
<div class="spinner-border text-primary mb-3" role="status">
|
||||
<span class="sr-only">Laden...</span>
|
||||
</div>
|
||||
<h5>Sendung erfolgreich erstellt!</h5>
|
||||
<p class="text-muted">Lade Sendungsinformationen...</p>
|
||||
</div>
|
||||
`;
|
||||
$('#modals-load-content .modal-dialog').html(loadingHtml);
|
||||
|
||||
// Reload modal in info mode to show the created shipment
|
||||
$.post('{{ route('modal_load') }}', {
|
||||
action: 'create-dhl-shipment',
|
||||
id: {{ $order->id }},
|
||||
_token: '{{ csrf_token() }}'
|
||||
}).done(function(response) {
|
||||
$('#modals-load-content .modal-dialog').html(response.html);
|
||||
|
||||
// Show success message in the new modal content
|
||||
setTimeout(function() {
|
||||
if (typeof showAlert === 'function') {
|
||||
showAlert('success', 'Sendung erfolgreich erstellt! Die Sendungsinformationen werden angezeigt.');
|
||||
}
|
||||
}, 100);
|
||||
}).fail(function() {
|
||||
alert('Fehler beim Laden der Sendungsinformationen.');
|
||||
});
|
||||
}, 1000); // Wait 1 seconds to show success message
|
||||
} else {
|
||||
alert(response.message || 'Fehler beim Erstellen der Sendung.');
|
||||
submitBtn.prop('disabled', false).html('<i class="fas fa-shipping-fast"></i> Sendung erstellen');
|
||||
|
|
@ -494,5 +252,30 @@ $(document).ready(function() {
|
|||
}
|
||||
});
|
||||
@endif
|
||||
|
||||
// Helper function for showing alerts
|
||||
window.showAlert = function(type, message) {
|
||||
var alertClass = type === 'success' ? 'alert-success' : 'alert-danger';
|
||||
var iconClass = type === 'success' ? 'fas fa-check-circle' : 'fas fa-exclamation-circle';
|
||||
|
||||
var alertHtml = `
|
||||
<div class="alert ${alertClass} alert-dismissible fade show" role="alert">
|
||||
<i class="${iconClass}"></i>
|
||||
${message}
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
`;
|
||||
|
||||
$('.modal-body').prepend(alertHtml);
|
||||
|
||||
// Auto-hide success alerts after 5 seconds
|
||||
if (type === 'success') {
|
||||
setTimeout(function() {
|
||||
$('.alert-success').alert('close');
|
||||
}, 5000);
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
207
resources/views/admin/dhl/modal_in_order_shipment.blade.php
Normal file
207
resources/views/admin/dhl/modal_in_order_shipment.blade.php
Normal file
|
|
@ -0,0 +1,207 @@
|
|||
<form id="modal-create-shipment-form" method="POST" action="{{ route('admin.dhl.store') }}">
|
||||
@csrf
|
||||
<input type="hidden" name="order_id" value="{{ $order->id }}">
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
{{-- Left Column: Order Info --}}
|
||||
<div class="col-md-6">
|
||||
<h6 class="text-primary mb-3">
|
||||
<i class="fas fa-info-circle"></i>
|
||||
Bestellinformationen
|
||||
</h6>
|
||||
|
||||
<div class="card bg-light">
|
||||
<div class="card-body">
|
||||
<h6 class="card-title">Bestellung #{{ $order->id }}</h6>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<small class="text-muted d-block">Kunde:</small>
|
||||
<strong>{{ $order->shopping_user->billing_firstname ?? '' }}
|
||||
{{ $order->shopping_user->billing_lastname ?? '' }}</strong>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<small class="text-muted d-block">Datum:</small>
|
||||
<strong>{{ $order->created_at->format('d.m.Y') }}</strong>
|
||||
</div>
|
||||
<div class="col-6 mt-2">
|
||||
<small class="text-muted d-block">Wert:</small>
|
||||
<strong>{{ number_format($order->total, 2, ',', '.') }} €</strong>
|
||||
</div>
|
||||
<div class="col-6 mt-2">
|
||||
<small class="text-muted d-block">Artikel:</small>
|
||||
<strong>{{ $order->shopping_order_items->count() }} Stück</strong>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Right Column: Shipment Config --}}
|
||||
<div class="col-md-6">
|
||||
<h6 class="text-primary mb-3">
|
||||
<i class="fas fa-cog"></i>
|
||||
Sendungskonfiguration
|
||||
</h6>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="modal-weight" class="font-weight-semibold">
|
||||
<i class="fas fa-weight"></i>
|
||||
Gewicht (kg) <span class="text-danger">*</span>
|
||||
</label>
|
||||
<input type="number" class="form-control" id="modal-weight" name="weight" min="0.1"
|
||||
max="31.5" step="0.1" value="{{ number_format($orderWeight, 1) }}" required>
|
||||
<small class="form-text text-muted">
|
||||
Berechnet: {{ number_format($orderWeight, 1) }} kg
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="modal-product-code" class="font-weight-semibold">
|
||||
<i class="fas fa-cube"></i>
|
||||
Produktcode
|
||||
</label>
|
||||
<select class="form-control custom-select" id="modal-product-code" name="product_code">
|
||||
@foreach ($productCodes as $code => $name)
|
||||
<option value="{{ $code }}">{{ $code }} - {{ $name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="modal-priority" class="font-weight-semibold">
|
||||
<i class="fas fa-exclamation-triangle"></i>
|
||||
Priorität
|
||||
</label>
|
||||
<select class="form-control custom-select" id="modal-priority" name="priority">
|
||||
<option value="normal">Normal</option>
|
||||
<option value="high">Hoch</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input" id="modal-auto-track" name="auto_track"
|
||||
value="1" checked>
|
||||
<label class="custom-control-label" for="modal-auto-track">
|
||||
Automatisches Tracking
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
{{-- Shipping Address Section --}}
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h6 class="text-primary mb-3">
|
||||
<i class="fas fa-map-marker-alt"></i>
|
||||
Lieferadresse
|
||||
@if (!empty($warnings))
|
||||
<small class="text-warning">(Bitte Adresse prüfen)</small>
|
||||
@else
|
||||
<small class="text-muted">(zur Not anpassbar)</small>
|
||||
@endif
|
||||
</h6>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="shipping_firstname">Vorname <span class="text-danger">*</span></label>
|
||||
<input type="text"
|
||||
class="form-control {{ empty($shippingAddress['firstname']) ? 'is-invalid' : '' }}"
|
||||
name="shipping_firstname" id="shipping_firstname"
|
||||
value="{{ $shippingAddress['firstname'] ?? '' }}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="shipping_lastname">Nachname <span class="text-danger">*</span></label>
|
||||
<input type="text"
|
||||
class="form-control {{ empty($shippingAddress['lastname']) ? 'is-invalid' : '' }}"
|
||||
name="shipping_lastname" id="shipping_lastname"
|
||||
value="{{ $shippingAddress['lastname'] ?? '' }}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="shipping_company">Firma <small class="text-muted">(optional)</small></label>
|
||||
<input type="text" class="form-control" name="shipping_company" id="shipping_company"
|
||||
value="{{ $shippingAddress['company'] ?? '' }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<div class="form-group">
|
||||
<label for="shipping_address">Straße <span class="text-danger">*</span></label>
|
||||
<input type="text"
|
||||
class="form-control {{ empty($shippingAddress['address']) ? 'is-invalid' : '' }}"
|
||||
name="shipping_address" id="shipping_address"
|
||||
value="{{ $shippingAddress['address'] ?? '' }}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="shipping_houseNumber">Nr./Zusatz <span class="text-danger">*</span></label>
|
||||
<input type="text"
|
||||
class="form-control {{ empty($shippingAddress['houseNumber']) ? 'border-warning' : '' }}"
|
||||
name="shipping_houseNumber" id="shipping_houseNumber"
|
||||
value="{{ $shippingAddress['houseNumber'] ?? '' }}" required>
|
||||
@if (empty($shippingAddress['houseNumber']))
|
||||
<small class="text-warning">Hausnummer benötigt</small>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="shipping_zipcode">PLZ <span class="text-danger">*</span></label>
|
||||
<input type="text"
|
||||
class="form-control {{ empty($shippingAddress['zipcode']) ? 'is-invalid' : '' }}"
|
||||
name="shipping_zipcode" id="shipping_zipcode"
|
||||
value="{{ $shippingAddress['zipcode'] ?? '' }}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<div class="form-group">
|
||||
<label for="shipping_city">Ort <span class="text-danger">*</span></label>
|
||||
<input type="text"
|
||||
class="form-control {{ empty($shippingAddress['city']) ? 'is-invalid' : '' }}"
|
||||
name="shipping_city" id="shipping_city" value="{{ $shippingAddress['city'] ?? '' }}"
|
||||
required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="shipping_country">Land <span class="text-danger">*</span></label>
|
||||
<select class="form-control custom-select" name="shipping_country_id"
|
||||
id="shipping_country" required>
|
||||
@foreach ($availableCountries as $countryOption)
|
||||
<option value="{{ $countryOption->id }}"
|
||||
{{ $shippingAddress['country'] && $shippingAddress['country']->id == $countryOption->id ? 'selected' : '' }}>
|
||||
{{ $countryOption->getLocated() }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="shipping_phone">Telefon <small class="text-muted">(empfohlen)</small></label>
|
||||
<input type="text" class="form-control" name="shipping_phone" id="shipping_phone"
|
||||
value="{{ $shippingAddress['phone'] ?? '' }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
||||
<i class="fas fa-times"></i> Abbrechen
|
||||
</button>
|
||||
<button type="submit" class="btn btn-primary" id="create-shipment-btn"
|
||||
{{ !empty($errors) ? 'disabled' : '' }}>
|
||||
<i class="fas fa-shipping-fast"></i> Sendung erstellen
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
46
resources/views/admin/dhl/modal_in_search_shipment.blade.php
Normal file
46
resources/views/admin/dhl/modal_in_search_shipment.blade.php
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{{-- Order Selection when no order ID provided --}}
|
||||
<div class="modal-body">
|
||||
<div class="text-center">
|
||||
<i class="fas fa-search fa-3x text-primary mb-4"></i>
|
||||
<h4>Bestellung auswählen</h4>
|
||||
<p class="text-muted mb-4">Geben Sie eine Bestellungs-ID ein, um eine DHL-Sendung zu erstellen.</p>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8 mx-auto">
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">#</span>
|
||||
</div>
|
||||
<input type="number"
|
||||
class="form-control form-control-lg"
|
||||
id="order-id-input"
|
||||
placeholder="z.B. 12345"
|
||||
min="1">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-primary" type="button" id="load-order-btn">
|
||||
<i class="fas fa-search"></i> Laden
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-center mt-3">
|
||||
<div class="mb-3">oder</div>
|
||||
<a href="{{ route('admin_sales_customers') }}"
|
||||
target="_blank"
|
||||
class="btn btn-outline-secondary">
|
||||
<i class="fas fa-external-link-alt"></i>
|
||||
In Bestellverwaltung suchen
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
||||
<i class="fas fa-times"></i> Abbrechen
|
||||
</button>
|
||||
</div>
|
||||
306
resources/views/admin/dhl/modal_in_shipment_info.blade.php
Normal file
306
resources/views/admin/dhl/modal_in_shipment_info.blade.php
Normal file
|
|
@ -0,0 +1,306 @@
|
|||
{{-- Shipment Information Display when shipments already exist --}}
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
{{-- Left Column: Order Info --}}
|
||||
<div class="col-md-6">
|
||||
<h6 class="text-primary mb-3">
|
||||
<i class="fas fa-info-circle"></i>
|
||||
Bestellinformationen
|
||||
</h6>
|
||||
|
||||
<div class="card bg-light">
|
||||
<div class="card-body">
|
||||
<h6 class="card-title">Bestellung #{{ $order->id }}</h6>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<small class="text-muted d-block">Kunde:</small>
|
||||
<strong>{{ $order->shopping_user->billing_firstname ?? '' }}
|
||||
{{ $order->shopping_user->billing_lastname ?? '' }}</strong>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<small class="text-muted d-block">Datum:</small>
|
||||
<strong>{{ $order->created_at->format('d.m.Y') }}</strong>
|
||||
</div>
|
||||
<div class="col-6 mt-2">
|
||||
<small class="text-muted d-block">Wert:</small>
|
||||
<strong>{{ number_format($order->total, 2, ',', '.') }} €</strong>
|
||||
</div>
|
||||
<div class="col-6 mt-2">
|
||||
<small class="text-muted d-block">Artikel:</small>
|
||||
<strong>{{ $order->shopping_order_items->count() }} Stück</strong>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Right Column: Shipment Summary --}}
|
||||
<div class="col-md-6">
|
||||
<h6 class="text-primary mb-3">
|
||||
<i class="fas fa-shipping-fast"></i>
|
||||
Sendungsübersicht
|
||||
</h6>
|
||||
|
||||
<div class="card bg-light">
|
||||
<div class="card-body">
|
||||
<div class="text-center mb-3">
|
||||
<i class="fas fa-box fa-2x text-success"></i>
|
||||
<h5 class="mt-2">{{ count($existingShipments) }} Sendung(en) erstellt</h5>
|
||||
</div>
|
||||
|
||||
<div class="row text-center">
|
||||
<div class="col-6">
|
||||
<small class="text-muted d-block">Letzte Sendung:</small>
|
||||
<strong>{{ date('d.m.Y H:i', strtotime($existingShipments[0]['created_at'])) }}</strong>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<small class="text-muted d-block">Status:</small>
|
||||
<span class="badge badge-{{ $existingShipments[0]['status'] == 'created' ? 'success' : 'warning' }}">
|
||||
{{ $existingShipments[0]['status_translated'] }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
{{-- Shipment Details --}}
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h6 class="text-primary mb-3">
|
||||
<i class="fas fa-list"></i>
|
||||
Sendungsdetails
|
||||
</h6>
|
||||
|
||||
@foreach($existingShipments as $index => $shipment)
|
||||
<div class="card mb-3 {{ $shipment['type'] == 'outbound' ? 'border-primary' : 'border-info' }}">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="d-flex justify-content-between align-items-start mb-2">
|
||||
<h6 class="mb-0">
|
||||
@if($shipment['type'] == 'outbound')
|
||||
<i class="fas fa-arrow-right text-primary"></i>
|
||||
Ausgehende Sendung
|
||||
@else
|
||||
<i class="fas fa-undo text-info"></i>
|
||||
Retoure
|
||||
@endif
|
||||
@if($index === 0)
|
||||
<span class="badge badge-primary ml-2">Neueste</span>
|
||||
@endif
|
||||
</h6>
|
||||
<span class="badge badge-{{ $shipment['status'] == 'created' ? 'success' : 'warning' }}">
|
||||
{{ $shipment['status_translated'] }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<small class="text-muted d-block">Sendungsnummer:</small>
|
||||
@if($shipment['shipment_number'])
|
||||
<code class="text-success">{{ $shipment['shipment_number'] }}</code>
|
||||
@else
|
||||
<span class="text-muted">Nicht verfügbar</span>
|
||||
@endif
|
||||
</div>
|
||||
{{--
|
||||
<div class="col-sm-6">
|
||||
<small class="text-muted d-block">Tracking-Nummer:</small>
|
||||
@if($shipment['tracking_number'])
|
||||
<code class="text-info">{{ $shipment['tracking_number'] }}</code>
|
||||
@else
|
||||
<span class="text-muted">Nicht verfügbar</span>
|
||||
@endif
|
||||
</div>
|
||||
--}}
|
||||
<div class="col-sm-6 mt-2">
|
||||
<small class="text-muted d-block">Produktcode:</small>
|
||||
<code>{{ $shipment['product_code'] }}</code>
|
||||
</div>
|
||||
<div class="col-sm-6 mt-2">
|
||||
<small class="text-muted d-block">Gewicht:</small>
|
||||
<strong>{{ number_format($shipment['weight'], 2) }} kg</strong>
|
||||
</div>
|
||||
<div class="col-sm-6 mt-2">
|
||||
<small class="text-muted d-block">Erstellt:</small>
|
||||
<strong>{{ date('d.m.Y H:i', strtotime($shipment['created_at'])) }}</strong>
|
||||
</div>
|
||||
@if($shipment['tracking_status'])
|
||||
<div class="col-sm-6 mt-2">
|
||||
<small class="text-muted d-block">Tracking-Status:</small>
|
||||
<span class="badge badge-info">{{ $shipment['tracking_status_translated'] }}</span>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 text-right">
|
||||
<div class="btn-group-vertical w-100">
|
||||
@if($shipment['label_path'])
|
||||
<a href="{{ route('admin.dhl.download-label', $shipment['id']) }}"
|
||||
class="btn btn-success btn-sm mb-2">
|
||||
<i class="fas fa-download"></i> Label herunterladen
|
||||
</a>
|
||||
@endif
|
||||
|
||||
<a href="{{ route('admin.dhl.show', $shipment['id']) }}"
|
||||
class="btn btn-outline-primary btn-sm mb-2" target="_blank">
|
||||
<i class="fas fa-eye"></i> Details anzeigen
|
||||
</a>
|
||||
{{-- Todo: Add tracking button
|
||||
@if($shipment['can_cancel'])
|
||||
<button type="button"
|
||||
class="btn btn-outline-warning btn-sm mb-2"
|
||||
onclick="cancelShipment({{ $shipment['id'] }})">
|
||||
<i class="fas fa-ban"></i> Stornieren
|
||||
</button>
|
||||
@endif
|
||||
|
||||
@if($shipment['type'] == 'outbound' && !$shipment['is_delivered'])
|
||||
<button type="button"
|
||||
class="btn btn-outline-info btn-sm"
|
||||
onclick="createReturnLabel({{ $shipment['id'] }})">
|
||||
<i class="fas fa-undo"></i> Retoure erstellen
|
||||
</button>
|
||||
@endif
|
||||
--}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Action Buttons --}}
|
||||
<div class="row mt-4">
|
||||
<div class="col-12 text-center">
|
||||
<div class="alert alert-info">
|
||||
<i class="fas fa-info-circle"></i>
|
||||
<strong>Hinweis:</strong> Für diese Bestellung wurden bereits DHL-Sendungen erstellt.
|
||||
Sie können weitere Sendungen erstellen oder bestehende verwalten.
|
||||
</div>
|
||||
|
||||
<button type="button"
|
||||
class="btn btn-primary mr-2"
|
||||
onclick="createAdditionalShipment()">
|
||||
<i class="fas fa-plus"></i> Weitere Sendung erstellen
|
||||
</button>
|
||||
|
||||
<a href="{{ route('admin.dhl.cockpit') }}"
|
||||
class="btn btn-outline-secondary">
|
||||
<i class="fas fa-list"></i> Zum DHL-Cockpit
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
||||
<i class="fas fa-times"></i> Schließen
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function cancelShipment(shipmentId) {
|
||||
if (!confirm('Möchten Sie diese Sendung wirklich stornieren?\n\nDieser Vorgang kann nicht rückgängig gemacht werden.')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: `/admin/dhl/shipment/${shipmentId}/cancel`,
|
||||
method: 'DELETE',
|
||||
data: {
|
||||
_token: '{{ csrf_token() }}'
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
showAlert('success', response.message);
|
||||
setTimeout(function() {
|
||||
location.reload();
|
||||
}, 2000);
|
||||
} else {
|
||||
showAlert('error', response.message);
|
||||
}
|
||||
},
|
||||
error: function(xhr) {
|
||||
showAlert('error', 'Fehler beim Stornieren der Sendung.');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function createReturnLabel(shipmentId) {
|
||||
if (!confirm('Möchten Sie ein Retourenlabel für diese Sendung erstellen?')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: `/admin/dhl/shipment/${shipmentId}/return-label`,
|
||||
method: 'POST',
|
||||
data: {
|
||||
_token: '{{ csrf_token() }}'
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
showAlert('success', response.message);
|
||||
setTimeout(function() {
|
||||
location.reload();
|
||||
}, 2000);
|
||||
} else {
|
||||
showAlert('error', response.message);
|
||||
}
|
||||
},
|
||||
error: function(xhr) {
|
||||
showAlert('error', 'Fehler beim Erstellen des Retourenlabels.');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function createAdditionalShipment() {
|
||||
// Reload modal in create mode
|
||||
$.post('{{ route('modal_load') }}', {
|
||||
action: 'create-dhl-shipment',
|
||||
id: {{ $order->id }},
|
||||
force_create: true,
|
||||
_token: '{{ csrf_token() }}'
|
||||
}).done(function(response) {
|
||||
$('#modals-load-content .modal-dialog').html(response.html);
|
||||
}).fail(function() {
|
||||
alert('Fehler beim Laden des Erstellungsformulars.');
|
||||
});
|
||||
}
|
||||
|
||||
window.showAlert = function(type, message) {
|
||||
var alertClass = type === 'success' ? 'alert-success' : 'alert-danger';
|
||||
var iconClass = type === 'success' ? 'fas fa-check-circle' : 'fas fa-exclamation-circle';
|
||||
|
||||
var alertHtml = `
|
||||
<div class="alert ${alertClass} alert-dismissible fade show" role="alert">
|
||||
<i class="${iconClass}"></i>
|
||||
${message}
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
`;
|
||||
|
||||
$('.modal-body').prepend(alertHtml);
|
||||
|
||||
// Auto-hide success alerts after 5 seconds
|
||||
if (type === 'success') {
|
||||
setTimeout(function() {
|
||||
$('.alert-success').alert('close');
|
||||
}, 5000);
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize modal
|
||||
$(document).ready(function() {
|
||||
// Modal is ready for interaction
|
||||
});
|
||||
</script>
|
||||
|
|
@ -36,37 +36,37 @@
|
|||
@switch($shipment->status)
|
||||
@case('pending')
|
||||
<div class="h5 mb-0 font-weight-bold text-gray-800">
|
||||
<span class="badge badge-warning">Wartend</span>
|
||||
<span class="badge badge-warning">{{ __('dhl.status.pending') }}</span>
|
||||
</div>
|
||||
@break
|
||||
@case('created')
|
||||
<div class="h5 mb-0 font-weight-bold text-gray-800">
|
||||
<span class="badge badge-success">Erstellt</span>
|
||||
<span class="badge badge-success">{{ __('dhl.status.created') }}</span>
|
||||
</div>
|
||||
@break
|
||||
@case('shipped')
|
||||
<div class="h5 mb-0 font-weight-bold text-gray-800">
|
||||
<span class="badge badge-primary">Versendet</span>
|
||||
<span class="badge badge-primary">{{ __('dhl.status.shipped') }}</span>
|
||||
</div>
|
||||
@break
|
||||
@case('delivered')
|
||||
<div class="h5 mb-0 font-weight-bold text-gray-800">
|
||||
<span class="badge badge-info">Zugestellt</span>
|
||||
<span class="badge badge-info">{{ __('dhl.status.delivered') }}</span>
|
||||
</div>
|
||||
@break
|
||||
@case('cancelled')
|
||||
<div class="h5 mb-0 font-weight-bold text-gray-800">
|
||||
<span class="badge badge-secondary">Storniert</span>
|
||||
<span class="badge badge-secondary">{{ __('dhl.status.cancelled') }}</span>
|
||||
</div>
|
||||
@break
|
||||
@case('failed')
|
||||
<div class="h5 mb-0 font-weight-bold text-gray-800">
|
||||
<span class="badge badge-danger">Fehler</span>
|
||||
<span class="badge badge-danger">{{ __('dhl.status.failed') }}</span>
|
||||
</div>
|
||||
@break
|
||||
@default
|
||||
<div class="h5 mb-0 font-weight-bold text-gray-800">
|
||||
<span class="badge badge-light">{{ $shipment->status }}</span>
|
||||
<span class="badge badge-light">{{ $shipment->getStatusTranslation() }}</span>
|
||||
</div>
|
||||
@endswitch
|
||||
</div>
|
||||
|
|
@ -85,8 +85,8 @@
|
|||
<div>
|
||||
<div class="text-xs font-weight-bold text-success text-uppercase mb-1">Sendungsnummer</div>
|
||||
<div class="h6 mb-0 font-weight-bold text-gray-800">
|
||||
@if($shipment->shipment_number)
|
||||
<code class="text-success">{{ $shipment->shipment_number }}</code>
|
||||
@if($shipment->dhl_shipment_no)
|
||||
<code class="text-success">{{ $shipment->dhl_shipment_no }}</code>
|
||||
@else
|
||||
<span class="text-muted">Nicht verfügbar</span>
|
||||
@endif
|
||||
|
|
@ -105,12 +105,12 @@
|
|||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between">
|
||||
<div>
|
||||
<div class="text-xs font-weight-bold text-info text-uppercase mb-1">Tracking-Nummer</div>
|
||||
<div class="text-xs font-weight-bold text-info text-uppercase mb-1">Tracking</div>
|
||||
<div class="h6 mb-0 font-weight-bold text-gray-800">
|
||||
@if($shipment->tracking_number)
|
||||
<code class="text-info">{{ $shipment->tracking_number }}</code>
|
||||
@if(false)
|
||||
<code class="text-info">{{ $shipment->dhl_shipment_no }}</code>
|
||||
<br>
|
||||
<a href="{{ route('public.tracking') }}?tracking_number={{ $shipment->tracking_number }}"
|
||||
<a href="{{ route('public.tracking') }}?dhl_shipment_no={{ $shipment->dhl_shipment_no }}"
|
||||
target="_blank" class="text-muted small">
|
||||
<i class="fas fa-external-link-alt"></i> Verfolgen
|
||||
</a>
|
||||
|
|
@ -134,7 +134,7 @@
|
|||
<div>
|
||||
<div class="text-xs font-weight-bold text-warning text-uppercase mb-1">Gewicht</div>
|
||||
<div class="h5 mb-0 font-weight-bold text-gray-800">
|
||||
{{ number_format($shipment->weight, 2) }} kg
|
||||
{{ number_format($shipment->weight_kg, 2, ',', '.') }} kg
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
|
|
@ -157,7 +157,7 @@
|
|||
<i class="fas fa-download"></i> Label herunterladen
|
||||
</a>
|
||||
@endif
|
||||
|
||||
{{-- Todo: Add tracking button
|
||||
@if($shipment->canCancel())
|
||||
<button type="button"
|
||||
class="btn btn-warning mr-2"
|
||||
|
|
@ -175,8 +175,8 @@
|
|||
<i class="fas fa-undo"></i> Retourenlabel erstellen
|
||||
</button>
|
||||
@endif
|
||||
|
||||
@if($shipment->tracking_number)
|
||||
--}}
|
||||
@if($shipment->dhl_shipment_no)
|
||||
<button type="button"
|
||||
class="btn btn-secondary mr-2"
|
||||
id="update-tracking-btn"
|
||||
|
|
@ -209,16 +209,49 @@
|
|||
<td class="font-weight-semibold">ID:</td>
|
||||
<td>#{{ $shipment->id }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="font-weight-semibold">DHL Sendungsnummer:</td>
|
||||
<td>
|
||||
@if($shipment->dhl_shipment_no)
|
||||
<code class="text-success">{{ $shipment->dhl_shipment_no }}</code>
|
||||
@else
|
||||
<span class="text-muted">Nicht verfügbar</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
{{--
|
||||
<tr>
|
||||
<td class="font-weight-semibold">Routing-Code:</td>
|
||||
<td>
|
||||
@if($shipment->routing_code)
|
||||
<code class="text-info">{{ $shipment->routing_code }}</code>
|
||||
@else
|
||||
<span class="text-muted">Nicht verfügbar</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
--}}
|
||||
|
||||
<tr>
|
||||
<td class="font-weight-semibold">Rechnungsnummer:</td>
|
||||
<td>
|
||||
@if($shipment->billing_number)
|
||||
<code class="text-dark">{{ $shipment->billing_number }}</code>
|
||||
@else
|
||||
<span class="text-muted">Nicht verfügbar</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="font-weight-semibold">Typ:</td>
|
||||
<td>
|
||||
@if($shipment->type == 'outbound')
|
||||
<span class="badge badge-primary">
|
||||
<i class="fas fa-arrow-right"></i> Ausgehend
|
||||
<i class="fas fa-arrow-right"></i> {{ __('dhl.type.outbound') }}
|
||||
</span>
|
||||
@else
|
||||
<span class="badge badge-info">
|
||||
<i class="fas fa-undo"></i> Retoure
|
||||
<i class="fas fa-undo"></i> {{ __('dhl.type.return') }}
|
||||
</span>
|
||||
@if($shipment->relatedShipment)
|
||||
<br>
|
||||
|
|
@ -233,23 +266,14 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="font-weight-semibold">Produktcode:</td>
|
||||
<td><code>{{ $shipment->product_code }}</code></td>
|
||||
<td class="font-weight-semibold">{{ __('dhl.fields.product_code') }}:</td>
|
||||
<td><code>{{ $shipment->product_code }}</code> - {{ $shipment->getProductCodeTranslation() }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="font-weight-semibold">Label-Format:</td>
|
||||
<td>{{ strtoupper($shipment->label_format) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="font-weight-semibold">Label gedruckt:</td>
|
||||
<td>
|
||||
@if($shipment->label_printed)
|
||||
<span class="badge badge-success">Ja</span>
|
||||
@else
|
||||
<span class="badge badge-secondary">Nein</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
|
@ -282,6 +306,124 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Recipient Information -->
|
||||
@if($shipment->firstname || $shipment->lastname || $shipment->company || $shipment->recipient)
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0">
|
||||
<i class="fas fa-user text-warning"></i>
|
||||
Empfängerinformationen
|
||||
</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<table class="table table-sm">
|
||||
<tr>
|
||||
<td class="font-weight-semibold">Name:</td>
|
||||
<td>
|
||||
@if($shipment->firstname || $shipment->lastname)
|
||||
{{ $shipment->firstname }} {{ $shipment->lastname }}
|
||||
@elseif($shipment->recipient && isset($shipment->recipient['firstname']))
|
||||
{{ $shipment->recipient['firstname'] }} {{ $shipment->recipient['lastname'] }}
|
||||
@else
|
||||
<span class="text-muted">Nicht verfügbar</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@if($shipment->company)
|
||||
<tr>
|
||||
<td class="font-weight-semibold">Firma:</td>
|
||||
<td>
|
||||
@if($shipment->company)
|
||||
{{ $shipment->company }}
|
||||
@elseif($shipment->recipient && isset($shipment->recipient['company']))
|
||||
{{ $shipment->recipient['company'] }}
|
||||
@else
|
||||
<span class="text-muted">-</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<td class="font-weight-semibold">Straße:</td>
|
||||
<td>
|
||||
@if($shipment->recipient && isset($shipment->recipient['street']))
|
||||
{{ $shipment->recipient['street'] }}
|
||||
@if(isset($shipment->recipient['houseNumber']))
|
||||
{{ $shipment->recipient['houseNumber'] }}
|
||||
@endif
|
||||
@else
|
||||
<span class="text-muted">Nicht verfügbar</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="font-weight-semibold">PLZ:</td>
|
||||
<td>
|
||||
@if($shipment->recipient && isset($shipment->recipient['postalCode']))
|
||||
{{ $shipment->recipient['postalCode'] }}
|
||||
@else
|
||||
<span class="text-muted">Nicht verfügbar</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="font-weight-semibold">Stadt:</td>
|
||||
<td>
|
||||
@if($shipment->recipient && isset($shipment->recipient['city']))
|
||||
{{ $shipment->recipient['city'] }}
|
||||
@else
|
||||
<span class="text-muted">Nicht verfügbar</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<table class="table table-sm">
|
||||
|
||||
<tr>
|
||||
<td class="font-weight-semibold">Land:</td>
|
||||
<td>
|
||||
@if($shipment->recipient && isset($shipment->recipient['country']))
|
||||
{{ $shipment->recipient['country'] }}
|
||||
@else
|
||||
<span class="text-muted">Nicht verfügbar</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="font-weight-semibold">E-Mail:</td>
|
||||
<td>
|
||||
@if($shipment->recipient && isset($shipment->recipient['email']))
|
||||
<a href="mailto:{{ $shipment->recipient['email'] }}" class="text-primary">
|
||||
{{ $shipment->recipient['email'] }}
|
||||
</a>
|
||||
@else
|
||||
<span class="text-muted">Nicht verfügbar</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="font-weight-semibold">Telefon:</td>
|
||||
<td>
|
||||
@if($shipment->recipient && isset($shipment->recipient['phone']))
|
||||
<a href="tel:{{ $shipment->recipient['phone'] }}" class="text-primary">
|
||||
{{ $shipment->recipient['phone'] }}
|
||||
</a>
|
||||
@else
|
||||
<span class="text-muted">Nicht verfügbar</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Order Information -->
|
||||
@if($shipment->shoppingOrder)
|
||||
<div class="card mb-4">
|
||||
|
|
@ -325,14 +467,12 @@
|
|||
<table class="table table-sm">
|
||||
<tr>
|
||||
<td class="font-weight-semibold">Bestellwert:</td>
|
||||
<td><strong>{{ number_format($shipment->shoppingOrder->total, 2) }} €</strong></td>
|
||||
<td><strong>{{ number_format($shipment->shoppingOrder->total, 2, ',', '.') }} €</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="font-weight-semibold">Status:</td>
|
||||
<td>
|
||||
<span class="badge badge-{{ $shipment->shoppingOrder->status == 'completed' ? 'success' : 'warning' }}">
|
||||
{{ $shipment->shoppingOrder->status }}
|
||||
</span>
|
||||
<span class="badge badge-pill badge-{{ $shipment->shoppingOrder->getShippedColor() }}">{{ $shipment->shoppingOrder->getShippedType() }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
@ -345,9 +485,15 @@
|
|||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Right Column -->
|
||||
<div class="col-lg-4">
|
||||
|
||||
|
||||
<!-- Tracking Information -->
|
||||
@if($shipment->tracking_status || $shipment->tracking_number)
|
||||
@if($shipment->tracking_status || $shipment->dhl_shipment_no)
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0">
|
||||
|
|
@ -370,30 +516,29 @@
|
|||
</div>
|
||||
@endif
|
||||
|
||||
@if($shipment->tracking_number)
|
||||
@if($shipment->dhl_shipment_no)
|
||||
<div class="text-center">
|
||||
<p>Verfolgen Sie diese Sendung direkt bei DHL:</p>
|
||||
<a href="https://www.dhl.de/de/privatkunden/pakete-empfangen/verfolgen.html?lang=de&idc={{ $shipment->tracking_number }}"
|
||||
<a href="https://www.dhl.de/de/privatkunden/pakete-empfangen/verfolgen.html?lang=de&idc={{ $shipment->dhl_shipment_no }}"
|
||||
target="_blank"
|
||||
class="btn btn-outline-warning">
|
||||
class="btn btn-warning">
|
||||
<i class="fas fa-external-link-alt"></i>
|
||||
Bei DHL verfolgen
|
||||
</a>
|
||||
<a href="{{ route('public.tracking') }}?tracking_number={{ $shipment->tracking_number }}"
|
||||
{{-- TODO: Tracking-Nummer ist nicht mehr verfügbar
|
||||
<a href="{{ route('public.tracking') }}?tracking_number={{ $shipment->dhl_shipment_no }}"
|
||||
target="_blank"
|
||||
class="btn btn-outline-info ml-2">
|
||||
<i class="fas fa-search"></i>
|
||||
Lokales Tracking
|
||||
</a>
|
||||
--}}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<!-- Right Column -->
|
||||
<div class="col-lg-4">
|
||||
|
||||
<!-- Related Shipments -->
|
||||
@if($shipment->type == 'outbound' && $shipment->relatedShipments && $shipment->relatedShipments->count() > 0)
|
||||
<div class="card mb-4">
|
||||
|
|
|
|||
171
resources/views/admin/level-reports/index.blade.php
Normal file
171
resources/views/admin/level-reports/index.blade.php
Normal file
|
|
@ -0,0 +1,171 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
<div class="card">
|
||||
<h5 class="card-header">
|
||||
Level-Aufstieg Reports
|
||||
<span class="badge badge-info ml-2">{{ $promotions->count() }}</span>
|
||||
</h5>
|
||||
|
||||
<div class="card-body p-0">
|
||||
<!-- Filter Form -->
|
||||
<form method="GET" action="{{ route('admin.level-reports.index') }}" class="form-horizontal" id="form_filter_level_reports">
|
||||
<div class="form-row align-items-center px-4 pb-2 pt-3">
|
||||
<div class="col-6 col-sm-6 col-md-2 col-lg-2 mb-1">
|
||||
<select class="custom-select" name="month">
|
||||
<option value="">Alle Monate</option>
|
||||
@foreach($availableMonths as $key => $value)
|
||||
<option value="{{ $key }}" @if($filters['month'] == $key) selected @endif>{{ $value }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-6 col-sm-6 col-md-2 col-lg-2 mb-1">
|
||||
<select class="custom-select" name="year">
|
||||
<option value="">Alle Jahre</option>
|
||||
@foreach($availableYears as $year)
|
||||
<option value="{{ $year }}" @if($filters['year'] == $year) selected @endif>{{ $year }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
{{-- <div class="col-6 col-sm-6 col-md-2 col-lg-2 mb-1">
|
||||
<input type="number" class="form-control" name="user_id" placeholder="User ID" value="{{ $filters['user_id'] }}">
|
||||
</div> --}}
|
||||
<div class="col-6 col-sm-6 col-md-3 col-lg-3 mb-1">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input" id="not_updated" name="not_updated" value="1" @if($filters['only_not_updated']) checked @endif>
|
||||
<label class="custom-control-label" for="not_updated">Nur nicht umgestellte User</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-sm-6 col-md-3 col-lg-3 mb-1">
|
||||
<button type="submit" class="btn btn-primary mr-2">Filter</button>
|
||||
<a href="{{ route('admin.level-reports.export', request()->query()) }}" class="btn btn-success">CSV Export</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@if($promotions->count() > 0)
|
||||
<!-- Statistiken -->
|
||||
<div class="px-4 pb-3">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="card bg-primary text-white">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title">{{ $statistics['total_count'] }}</h4>
|
||||
<p class="card-text">Gesamt Aufstiege</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h6 class="card-subtitle mb-2 text-muted">Aufstiege nach Level</h6>
|
||||
@foreach($statistics['level_stats'] as $level => $count)
|
||||
<span class="badge badge-secondary mr-1">{{ $level }}: {{ $count }}</span>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Tabelle -->
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-hover mb-0">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th>Datum</th>
|
||||
<th>User</th>
|
||||
<th>Von Level</th>
|
||||
<th>Zu Level</th>
|
||||
<th>Aktueller Level</th>
|
||||
<th>KP Quali</th>
|
||||
<th>User KP</th>
|
||||
<th>PP Quali</th>
|
||||
<th>User PP</th>
|
||||
<th>Update</th>
|
||||
<th>Aktiv</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($promotions as $promotion)
|
||||
<tr class="@if($promotion['level_updated'] === 'Nein') table-warning @endif">
|
||||
<td>{{ $promotion['date'] }}</td>
|
||||
<td>
|
||||
<strong>{{ $promotion['first_name'] }} {{ $promotion['last_name'] }}</strong><br>
|
||||
<small class="text-muted">
|
||||
ID: {{ $promotion['user_id'] }}<br>
|
||||
{{ $promotion['email'] }}
|
||||
</small>
|
||||
</td>
|
||||
<td>
|
||||
<span class="badge badge-secondary">
|
||||
{{ $promotion['from_level_name'] }}
|
||||
</span>
|
||||
<br><small>ID: {{ $promotion['from_level_id'] }}</small>
|
||||
</td>
|
||||
<td>
|
||||
<span class="badge badge-success">
|
||||
{{ $promotion['to_level_name'] }}
|
||||
</span>
|
||||
<br><small>ID: {{ $promotion['to_level_id'] }}</small>
|
||||
</td>
|
||||
<td>
|
||||
<span class="badge badge-info">
|
||||
{{ $promotion['current_user_level_name'] }}
|
||||
</span>
|
||||
<br><small>ID: {{ $promotion['current_user_level_id'] ?? 'N/A' }}</small>
|
||||
</td>
|
||||
<td><span class="badge badge-outline-info">{{ number_format($promotion['to_level_qual_kp'], 0, ',', '.') }}</span></td>
|
||||
<td><span class="badge badge-outline-success">{{ number_format($promotion['sales_volume_points_sum'], 0, ',', '.') }}</span></td>
|
||||
<td><span class="badge badge-outline-info">{{ number_format($promotion['to_level_qual_pp'], 0, ',', '.') }}</span></td>
|
||||
<td><span class="badge badge-outline-success">{{ number_format($promotion['payline_points_qual_kp'], 0, ',', '.') }}</span></td>
|
||||
<td>
|
||||
@if($promotion['level_updated'] === 'Ja')
|
||||
<span class="badge badge-success">Ja</span>
|
||||
@else
|
||||
<span class="badge badge-warning">Nein</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if($promotion['active_account'] === 'Ja')
|
||||
<span class="badge badge-success">Ja</span>
|
||||
@else
|
||||
<span class="badge badge-danger">Nein</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@if($statistics['period_stats'])
|
||||
<!-- Periode Statistiken -->
|
||||
<div class="px-4 py-3 border-top">
|
||||
<h6 class="text-muted mb-2">Aufstiege nach Zeitraum</h6>
|
||||
@foreach($statistics['period_stats'] as $period => $count)
|
||||
<span class="badge badge-outline-default mr-1">{{ $period }}: {{ $count }}</span>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
@else
|
||||
<div class="px-4 py-5 text-center">
|
||||
<h5 class="text-muted">Keine Level-Aufstiege gefunden</h5>
|
||||
<p class="text-muted">Mit den aktuellen Filtern wurden keine Einträge gefunden.</p>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
// Auto-submit Form bei Änderung der Filter
|
||||
const selects = document.querySelectorAll('#form_filter_level_reports select, #form_filter_level_reports input[type="checkbox"]');
|
||||
selects.forEach(function(select) {
|
||||
select.addEventListener('change', function() {
|
||||
document.getElementById('form_filter_level_reports').submit();
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
|
|
@ -2,15 +2,15 @@
|
|||
<!-- Status -->
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-3 mb-1">
|
||||
<div class="col-md-2 mb-1">
|
||||
<strong class="mr-2">{{ __('Status') }}:</strong>
|
||||
<span class="text-big">
|
||||
{!! \App\Services\Payment::getShoppingOrderBadge($shopping_order) !!}
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-md-3 mb-1">
|
||||
<div class="col-md-4 mb-1">
|
||||
<strong class="mr-2">{{ __('order.shipping') }}:</strong>
|
||||
|
||||
<div style="display: inline-block;">
|
||||
@if($shopping_order->payment_for !== 8)
|
||||
@if ($isAdmin)
|
||||
<button type="button" class="btn btn-sm btn-{{ $shopping_order->getShippedColor() }}"
|
||||
|
|
@ -19,6 +19,15 @@
|
|||
data-action="store_shipped">
|
||||
<span class="fa fa-edit"></span> <strong>{{ $shopping_order->getShippedType() }}</strong>
|
||||
</button>
|
||||
|
||||
<button type="button" class="btn btn-sm btn-{{ $shopping_order->hasDhlShipments() ? 'primary' : 'secondary' }}"
|
||||
data-toggle="modal"
|
||||
data-id="{{ $shopping_order->id }}"
|
||||
data-target="#modals-load-content"
|
||||
data-action="create-dhl-shipment"
|
||||
data-route="{{ route('modal_load') }}">
|
||||
<i class="fas fa-shipping-fast"></i> DHL
|
||||
</button>
|
||||
@else
|
||||
<span class="text-big">
|
||||
<span
|
||||
|
|
@ -26,9 +35,11 @@
|
|||
</span>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 mb-1">
|
||||
<strong class="mr-2">{{ __('order.invoice') }}:</strong>
|
||||
<div style="display: inline-block;">
|
||||
@if ($isAdmin)
|
||||
@if ($shopping_order->isInvoice())
|
||||
<a href="{{ route('storage_file', [$shopping_order->id, 'invoice', 'download']) }}"
|
||||
|
|
@ -65,16 +76,19 @@
|
|||
<a href="{{ $shopping_order->wp_invoice_path }}" class="btn btn-secondary btn-sm"><i
|
||||
class="fa fa-external-link-alt"></i> <i class="fa fa-download"></i></a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 mb-1">
|
||||
@if ($isAdmin && $shopping_order->payment_for != 8)
|
||||
<strong class="mr-2">{{ __('order.delivery_note') }}:</strong>
|
||||
<div style="display: inline-block;">
|
||||
@if ($shopping_order->isInvoice())
|
||||
<a href="{{ route('storage_file', [$shopping_order->id, 'delivery', 'download']) }}"
|
||||
class="btn btn-primary btn-sm"><i class="fa fa-download"></i></a>
|
||||
<a href="{{ route('storage_file', [$shopping_order->id, 'delivery', 'stream']) }}"
|
||||
target="_blank" class="btn btn-warning btn-sm"><i class="fa fa-eye"></i></a>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@
|
|||
<th>{{__('tables.payment')}}</th>
|
||||
<th>{{__('tables.status')}}</th>
|
||||
<th>{{__('tables.shipping')}}</th>
|
||||
<th>{{__('dhl.dhl')}}</th>
|
||||
<th>{{__('tables.invoice')}}</th>
|
||||
<th>{{__('First name')}}</th>
|
||||
<th>{{__('Last name')}}</th>
|
||||
|
|
@ -89,6 +90,7 @@
|
|||
{ data: 'payment', name: 'payment', orderable: false },
|
||||
{ data: 'txaction', name: 'txaction' },
|
||||
{ data: 'shipped', name: 'shipped' },
|
||||
{ data: 'dhl_button', name: 'dhl_button' },
|
||||
{ data: 'invoice', name: 'invoice', orderable: false },
|
||||
{ data: 'shopping_user.billing_firstname', name: 'shopping_user.billing_firstname' },
|
||||
{ data: 'shopping_user.billing_lastname', name: 'shopping_user.billing_lastname' },
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
<th>{{__('Zahlung')}}</th>
|
||||
<th>{{__('tables.status')}}</th>
|
||||
<th>{{__('Versand')}}</th>
|
||||
<th>{{__('dhl.dhl')}}</th>
|
||||
<th>{{__('Art')}}</th>
|
||||
<th>{{__('Rechnung')}}</th>
|
||||
<th>{{__('First name')}}</th>
|
||||
|
|
@ -50,6 +51,7 @@
|
|||
{ data: 'payment', name: 'payment', orderable: false },
|
||||
{ data: 'txaction', name: 'txaction' },
|
||||
{ data: 'shipped', name: 'shipped' },
|
||||
{ data: 'dhl_button', name: 'dhl_button' },
|
||||
{ data: 'payment_for', name: 'payment_for' },
|
||||
{ data: 'invoice', name: 'invoice', orderable: false },
|
||||
{ data: 'shopping_user.shipping_firstname', name: 'shopping_user.shipping_firstname', orderable: false },
|
||||
|
|
|
|||
|
|
@ -177,6 +177,12 @@
|
|||
<strong>Deaktiviert:</strong> Versandlabel werden sofort erstellt (synchron)
|
||||
</small>
|
||||
</div>
|
||||
<div class="form-group col-sm-4">
|
||||
<button type="button" class="btn btn-secondary" id="test-dhl-login-btn">
|
||||
<i class="fas fa-key"></i> API Login testen
|
||||
</button>
|
||||
<div id="dhl-test-result" class="mt-3 text-left"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
|
@ -308,14 +314,6 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<button type="submit" name="action" value="save_dhl" class="btn btn-primary btn-sm mb-2">
|
||||
<i class="fas fa-truck"></i> DHL Einstellungen speichern
|
||||
</button>
|
||||
|
|
@ -324,4 +322,58 @@
|
|||
|
||||
{!! Form::close() !!}
|
||||
|
||||
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// --- DHL LOGIN TEST ---
|
||||
$('#test-dhl-login-btn').click(function() {
|
||||
var btn = $(this);
|
||||
var spinner = btn.find('.spinner-border');
|
||||
var resultContainer = $('#dhl-test-result');
|
||||
|
||||
btn.prop('disabled', true);
|
||||
spinner.show();
|
||||
resultContainer.html('');
|
||||
|
||||
$.ajax({
|
||||
url: '{{ route("admin.dhl.test_login") }}',
|
||||
method: 'POST',
|
||||
data: {
|
||||
_token: '{{ csrf_token() }}'
|
||||
},
|
||||
success: function(response) {
|
||||
var alertClass = response.success ? 'alert-success' : 'alert-danger';
|
||||
var icon = response.success ? 'fas fa-check-circle' : 'fas fa-times-circle';
|
||||
var resultHtml = `
|
||||
<div class="alert ${alertClass} d-flex align-items-center" role="alert">
|
||||
<i class="${icon} mr-2"></i>
|
||||
<div>
|
||||
${response.message}
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
resultContainer.html(resultHtml);
|
||||
},
|
||||
error: function(xhr) {
|
||||
var errorHtml = `
|
||||
<div class="alert alert-danger d-flex align-items-center" role="alert">
|
||||
<i class="fas fa-server mr-2"></i>
|
||||
<div>
|
||||
Ein Serverfehler ist aufgetreten. Prüfen Sie die Browser-Konsole und die Laravel-Logs.
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
resultContainer.html(errorHtml);
|
||||
},
|
||||
complete: function() {
|
||||
btn.prop('disabled', false);
|
||||
spinner.hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
|
|
@ -1,8 +1,6 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
|
||||
|
||||
<h4 class="font-weight-bold py-2 mb-2">
|
||||
{{ __('User') }}
|
||||
</h4>
|
||||
|
|
@ -12,23 +10,24 @@
|
|||
<table class="datatables-users table table-striped table-bordered">
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{{__('tables.firstname')}}</th>
|
||||
<th>{{__('tables.lastname')}}</th>
|
||||
<th>{{__('E-Mail')}}</th>
|
||||
<th>{{__('Zugang')}}</th>
|
||||
<th>{{__('verified')}} (seit)</th>
|
||||
<th>{{__('active')}} (seit)</th>
|
||||
<th>{{__('tables.account')}} (bis)</th>
|
||||
<th>{{__('tables.shop')}} (bis)</th>
|
||||
<th>{{__('tables.shop')}} ab</th>
|
||||
<th>{{__('Zahlungsarten')}}</th>
|
||||
<th>{{__('Land')}}</th>
|
||||
<th>{{__('Test Modus')}}</th>
|
||||
<th>{{__('login')}}</th>
|
||||
<th>{{__('delete')}}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{{ __('tables.firstname') }}</th>
|
||||
<th>{{ __('tables.lastname') }}</th>
|
||||
<th>{{ __('E-Mail') }}</th>
|
||||
<th>{{ __('Zugang') }}</th>
|
||||
<th>{{ __('verified') }} (seit)</th>
|
||||
<th>{{ __('active') }} (seit)</th>
|
||||
<th>{{ __('tables.account') }} (bis)</th>
|
||||
<th>{{ __('tables.shop') }} (bis)</th>
|
||||
<th>{{ __('tables.shop') }} ab</th>
|
||||
<th>{{ __('Shop URL') }}</th>
|
||||
<th>{{ __('Zahlungsarten') }}</th>
|
||||
<th>{{ __('Land') }}</th>
|
||||
<th>{{ __('Test Modus') }}</th>
|
||||
<th>{{ __('login') }}</th>
|
||||
<th>{{ __('delete') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
|
|
@ -44,31 +43,34 @@
|
|||
<input type="hidden" class="form-control" name="id">
|
||||
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">{{__('User')}} <span class="font-weight-light">{{__('create/edit')}}</span></h5>
|
||||
<h5 class="modal-title">{{ __('User') }} <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="email" class="form-label">{{__('E-Mail')}}</label>
|
||||
<input type="text" class="form-control" name="email" placeholder="{{__('E-Mail')}}" readonly>
|
||||
<label for="email" class="form-label">{{ __('E-Mail') }}</label>
|
||||
<input type="text" class="form-control" name="email" placeholder="{{ __('E-Mail') }}"
|
||||
readonly>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label for="admin" class="form-label">{{__('Role')}}</label>
|
||||
<label for="admin" class="form-label">{{ __('Role') }}</label>
|
||||
<select class="selectpicker" data-style="btn-default" name="admin">
|
||||
{!! HTMLHelper::getRolesOptions() !!}
|
||||
{!! HTMLHelper::getRolesOptions() !!}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
|
||||
<button type="submit" class="btn btn-primary" name="save-admin" value="save-admin">{{__('save')}}</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ __('close') }}</button>
|
||||
<button type="submit" class="btn btn-primary" name="save-admin"
|
||||
value="save-admin">{{ __('save') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
@ -82,32 +84,36 @@
|
|||
<input type="hidden" class="form-control" name="id">
|
||||
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">{{__('User')}} <span class="font-weight-light">{{__('create/edit')}}</span></h5>
|
||||
<h5 class="modal-title">{{ __('User') }} <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="email" class="form-label">{{__('E-Mail')}}</label>
|
||||
<input type="text" class="form-control" name="email" placeholder="{{__('E-Mail')}}" readonly>
|
||||
<label for="email" class="form-label">{{ __('E-Mail') }}</label>
|
||||
<input type="text" class="form-control" name="email" placeholder="{{ __('E-Mail') }}"
|
||||
readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="custom-control custom-checkbox m-0">
|
||||
<input type="checkbox" class="custom-control-input" name="confirmed" checked>
|
||||
<span class="custom-control-label">{{__('verified')}}</span>
|
||||
<span class="custom-control-label">{{ __('verified') }}</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label for="confirmation_date" class="form-label">{{__('Datum')}} seit</label>
|
||||
<input type="text" name="confirmation_date" class="form-control b-material-datetime-picker" placeholder="25.10.2020 10:30">
|
||||
<label for="confirmation_date" class="form-label">{{ __('Datum') }} seit</label>
|
||||
<input type="text" name="confirmation_date" class="form-control b-material-datetime-picker"
|
||||
placeholder="25.10.2020 10:30">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
|
||||
<button type="submit" class="btn btn-primary" name="save-confirmed" value="save-confirmed">{{__('save')}}</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ __('close') }}</button>
|
||||
<button type="submit" class="btn btn-primary" name="save-confirmed"
|
||||
value="save-confirmed">{{ __('save') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
@ -121,34 +127,38 @@
|
|||
<input type="hidden" class="form-control" name="id">
|
||||
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">{{__('User')}} <span class="font-weight-light">{{__('create/edit')}}</span></h5>
|
||||
<h5 class="modal-title">{{ __('User') }} <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="email" class="form-label">{{__('E-Mail')}}</label>
|
||||
<input type="text" class="form-control" name="email" placeholder="{{__('E-Mail')}}" readonly>
|
||||
<label for="email" class="form-label">{{ __('E-Mail') }}</label>
|
||||
<input type="text" class="form-control" name="email" placeholder="{{ __('E-Mail') }}"
|
||||
readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="custom-control custom-checkbox m-0">
|
||||
<input type="checkbox" class="custom-control-input" name="active" checked>
|
||||
<span class="custom-control-label">{{__('active')}}</span>
|
||||
<span class="custom-control-label">{{ __('active') }}</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label for="active_date" class="form-label">{{__('Datum')}} seit</label>
|
||||
<input type="text" name="active_date" class="form-control b-material-datetime-picker" placeholder="25.10.2020 10:30">
|
||||
<label for="active_date" class="form-label">{{ __('Datum') }} seit</label>
|
||||
<input type="text" name="active_date" class="form-control b-material-datetime-picker"
|
||||
placeholder="25.10.2020 10:30">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
|
||||
<button type="submit" class="btn btn-primary" name="save-active" value="save-active">{{__('save')}}</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ __('close') }}</button>
|
||||
<button type="submit" class="btn btn-primary" name="save-active"
|
||||
value="save-active">{{ __('save') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
@ -162,28 +172,32 @@
|
|||
<input type="hidden" class="form-control" name="id">
|
||||
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">{{__('User')}} <span class="font-weight-light">{{__('create/edit')}}</span></h5>
|
||||
<h5 class="modal-title">{{ __('User') }} <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="email" class="form-label">{{__('E-Mail')}}</label>
|
||||
<input type="text" class="form-control" name="email" placeholder="{{__('E-Mail')}}" readonly>
|
||||
<label for="email" class="form-label">{{ __('E-Mail') }}</label>
|
||||
<input type="text" class="form-control" name="email" placeholder="{{ __('E-Mail') }}"
|
||||
readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label for="payment_account" class="form-label">{{__('tables.account')}} bis</label>
|
||||
<input type="text" name="payment_account" class="form-control b-material-datetime-picker" placeholder="25.10.2020 10:30">
|
||||
<label for="payment_account" class="form-label">{{ __('tables.account') }} bis</label>
|
||||
<input type="text" name="payment_account" class="form-control b-material-datetime-picker"
|
||||
placeholder="25.10.2020 10:30">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
|
||||
<button type="submit" class="btn btn-primary" name="save-account" value="save-account">{{__('save')}}</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ __('close') }}</button>
|
||||
<button type="submit" class="btn btn-primary" name="save-account"
|
||||
value="save-account">{{ __('save') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
@ -197,27 +211,31 @@
|
|||
<input type="hidden" class="form-control" name="id">
|
||||
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">{{__('User')}} <span class="font-weight-light">{{__('create/edit')}}</span></h5>
|
||||
<h5 class="modal-title">{{ __('User') }} <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="email" class="form-label">{{__('E-Mail')}}</label>
|
||||
<input type="text" class="form-control" name="email" placeholder="{{__('E-Mail')}}" readonly>
|
||||
<label for="email" class="form-label">{{ __('E-Mail') }}</label>
|
||||
<input type="text" class="form-control" name="email" placeholder="{{ __('E-Mail') }}"
|
||||
readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label for="payment_shop" class="form-label">{{__('tables.shop')}} bis</label>
|
||||
<input type="text" name="payment_shop" class="form-control b-material-datetime-picker" placeholder="25.10.2020 10:30">
|
||||
<label for="payment_shop" class="form-label">{{ __('tables.shop') }} bis</label>
|
||||
<input type="text" name="payment_shop" class="form-control b-material-datetime-picker"
|
||||
placeholder="25.10.2020 10:30">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
|
||||
<button type="submit" class="btn btn-primary" name="save-shop" value="save-shop">{{__('save')}}</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ __('close') }}</button>
|
||||
<button type="submit" class="btn btn-primary" name="save-shop"
|
||||
value="save-shop">{{ __('save') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
@ -230,22 +248,25 @@
|
|||
<form class="modal-content" action="{{ route('admin_user_delete') }}" method="post">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="id">
|
||||
|
||||
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">{{__('User')}} <span class="font-weight-light">{{__('löschen')}}</span></h5>
|
||||
<h5 class="modal-title">{{ __('User') }} <span
|
||||
class="font-weight-light">{{ __('löschen') }}</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="email" class="form-label">{{__('E-Mail')}}</label>
|
||||
<input type="text" class="form-control" name="email" placeholder="{{__('E-Mail')}}" readonly>
|
||||
<label for="email" class="form-label">{{ __('E-Mail') }}</label>
|
||||
<input type="text" class="form-control" name="email" placeholder="{{ __('E-Mail') }}"
|
||||
readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<hr>
|
||||
<h5>User löschen</h5>
|
||||
<p>Dieser User wird gelöscht, alle Daten werden auf den übergeordneten Berater übertragen, jedoch sind die Grunddaten als Admin hier noch einsehbar.</p>
|
||||
<p>Dieser User wird gelöscht, alle Daten werden auf den übergeordneten Berater übertragen, jedoch
|
||||
sind die Grunddaten als Admin hier noch einsehbar.</p>
|
||||
<label class="custom-control custom-checkbox m-0">
|
||||
<input type="checkbox" class="custom-control-input" name="realy_delete_user">
|
||||
<span class="custom-control-label">User wirklich löschen?</span>
|
||||
|
|
@ -262,8 +283,9 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
|
||||
<button type="submit" class="btn btn-danger" name="user-delete" value="user-delete">{{__('User löschen')}}</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ __('close') }}</button>
|
||||
<button type="submit" class="btn btn-danger" name="user-delete"
|
||||
value="user-delete">{{ __('User löschen') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
@ -277,29 +299,34 @@
|
|||
<input type="hidden" class="form-control" name="id">
|
||||
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">{{__('User')}} <span class="font-weight-light">{{__('create/edit')}}</span></h5>
|
||||
<h5 class="modal-title">{{ __('User') }} <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="email" class="form-label">{{__('E-Mail')}}</label>
|
||||
<input type="text" class="form-control" name="email" placeholder="{{__('E-Mail')}}" readonly>
|
||||
<label for="email" class="form-label">{{ __('E-Mail') }}</label>
|
||||
<input type="text" class="form-control" name="email" placeholder="{{ __('E-Mail') }}"
|
||||
readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<p>Aktiviert den Testmodus beim den Zahlungsdiensten. Käufe werden als TEST markiert und die Mails gehen an devtest@mivita.care</p>
|
||||
<p><a target="_blank" href="https://docs.payone.com/display/public/PLATFORM/Testdata">Zu den Testdaten für den Kauf von Payone</a>.</p>
|
||||
<p>Aktiviert den Testmodus beim den Zahlungsdiensten. Käufe werden als TEST markiert und die Mails
|
||||
gehen an devtest@mivita.care</p>
|
||||
<p><a target="_blank" href="https://docs.payone.com/display/public/PLATFORM/Testdata">Zu den
|
||||
Testdaten für den Kauf von Payone</a>.</p>
|
||||
<label class="custom-control custom-checkbox m-0">
|
||||
<input type="checkbox" class="custom-control-input" name="test_mode" checked>
|
||||
<span class="custom-control-label">{{__('Test Mode')}}</span>
|
||||
<span class="custom-control-label">{{ __('Test Mode') }}</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
|
||||
<button type="submit" class="btn btn-primary" name="save-test_mode" value="save-test_mode">{{__('save')}}</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ __('close') }}</button>
|
||||
<button type="submit" class="btn btn-primary" name="save-test_mode"
|
||||
value="save-test_mode">{{ __('save') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
@ -313,36 +340,41 @@
|
|||
<input type="hidden" class="form-control" name="id">
|
||||
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">{{__('User')}} <span class="font-weight-light">{{__('create/edit')}}</span></h5>
|
||||
<h5 class="modal-title">{{ __('User') }} <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="email" class="form-label">{{__('E-Mail')}}</label>
|
||||
<input type="text" class="form-control" name="email" placeholder="{{__('E-Mail')}}" readonly>
|
||||
<label for="email" class="form-label">{{ __('E-Mail') }}</label>
|
||||
<input type="text" class="form-control" name="email" placeholder="{{ __('E-Mail') }}"
|
||||
readonly>
|
||||
</div>
|
||||
</div>
|
||||
@foreach(\App\Models\PaymentMethod::where('active', true)->get() as $payment_method)
|
||||
<div class="form-group">
|
||||
<label class="custom-control custom-checkbox m-0">
|
||||
<input type="checkbox" class="custom-control-input input-payment-methods" name="payment_methods[]" value="{{$payment_method->id}}" @if($payment_method->default) checked @endif>
|
||||
<span class="custom-control-label">{{ $payment_method->name }}</span>
|
||||
</label>
|
||||
</div>
|
||||
@foreach (\App\Models\PaymentMethod::where('active', true)->get() as $payment_method)
|
||||
<div class="form-group">
|
||||
<label class="custom-control custom-checkbox m-0">
|
||||
<input type="checkbox" class="custom-control-input input-payment-methods"
|
||||
name="payment_methods[]" value="{{ $payment_method->id }}"
|
||||
@if ($payment_method->default) checked @endif>
|
||||
<span class="custom-control-label">{{ $payment_method->name }}</span>
|
||||
</label>
|
||||
</div>
|
||||
@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" name="save-payment_methods" value="save-payment_methods">{{__('save')}}</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ __('close') }}</button>
|
||||
<button type="submit" class="btn btn-primary" name="save-payment_methods"
|
||||
value="save-payment_methods">{{ __('save') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
$('#modals-admin').on('show.bs.modal', function (event) {
|
||||
$(document).ready(function() {
|
||||
$('#modals-admin').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='email']").val(button.data('email'));
|
||||
|
|
@ -350,64 +382,68 @@
|
|||
$('.selectpicker').selectpicker('refresh');
|
||||
});
|
||||
|
||||
$('#modals-confirmed').on('show.bs.modal', function (event) {
|
||||
$('#modals-confirmed').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='email']").val(button.data('email'));
|
||||
$(this).find(".modal-body input[name='confirmed']").prop( "checked", button.data('confirmed'));
|
||||
$(this).find(".modal-body input[name='confirmation_date']").val(button.data('confirmation_date'));
|
||||
$(this).find(".modal-body input[name='confirmed']").prop("checked", button.data(
|
||||
'confirmed'));
|
||||
$(this).find(".modal-body input[name='confirmation_date']").val(button.data(
|
||||
'confirmation_date'));
|
||||
});
|
||||
|
||||
$('#modals-active').on('show.bs.modal', function (event) {
|
||||
$('#modals-active').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='email']").val(button.data('email'));
|
||||
$(this).find(".modal-body input[name='active']").prop( "checked", button.data('active'));
|
||||
$(this).find(".modal-body input[name='active']").prop("checked", button.data('active'));
|
||||
$(this).find(".modal-body input[name='active_date']").val(button.data('active_date'));
|
||||
});
|
||||
|
||||
$('#modals-account').on('show.bs.modal', function (event) {
|
||||
$('#modals-account').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='email']").val(button.data('email'));
|
||||
$(this).find(".modal-body input[name='payment_account']").val(button.data('payment_account'));
|
||||
$(this).find(".modal-body input[name='payment_account']").val(button.data(
|
||||
'payment_account'));
|
||||
});
|
||||
|
||||
$('#modals-shop').on('show.bs.modal', function (event) {
|
||||
$('#modals-shop').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='email']").val(button.data('email'));
|
||||
$(this).find(".modal-body input[name='payment_shop']").val(button.data('payment_shop'));
|
||||
});
|
||||
|
||||
$('#modals-user-delete').on('show.bs.modal', function (event) {
|
||||
$('#modals-user-delete').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='email']").val(button.data('email'));
|
||||
});
|
||||
|
||||
$('#modals-payment_methods').on('show.bs.modal', function (event) {
|
||||
|
||||
$('#modals-payment_methods').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='email']").val(button.data('email'));
|
||||
var payment_methods = button.data('payment_methods');
|
||||
if(payment_methods){
|
||||
if (payment_methods) {
|
||||
|
||||
$.each($(this).find(".modal-body .input-payment-methods"), function (i, item) {
|
||||
if($.inArray(parseInt($(item).val()), payment_methods) !== -1){
|
||||
$(item).prop( "checked", true);
|
||||
}else{
|
||||
$(item).prop( "checked", false);
|
||||
$.each($(this).find(".modal-body .input-payment-methods"), function(i, item) {
|
||||
if ($.inArray(parseInt($(item).val()), payment_methods) !== -1) {
|
||||
$(item).prop("checked", true);
|
||||
} else {
|
||||
$(item).prop("checked", false);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$('#modals-test_mode').on('show.bs.modal', function (event) {
|
||||
$('#modals-test_mode').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='email']").val(button.data('email'));
|
||||
$(this).find(".modal-body input[name='test_mode']").prop( "checked", button.data('test_mode'));
|
||||
$(this).find(".modal-body input[name='test_mode']").prop("checked", button.data(
|
||||
'test_mode'));
|
||||
});
|
||||
|
||||
|
||||
|
|
@ -415,23 +451,75 @@
|
|||
"processing": true,
|
||||
"serverSide": true,
|
||||
"ajax": '{!! route('admin_user_datatable') !!}',
|
||||
"order": [[0, "desc" ]],
|
||||
"columns": [
|
||||
{ data: 'id', searchable: false},
|
||||
{ data: 'first_name', name: 'account.first_name' },
|
||||
{ data: 'last_name', name: 'account.last_name' },
|
||||
{ data: 'email', name: 'email' },
|
||||
{ data: 'admin', name: 'admin' },
|
||||
{ data: 'confirmed', name: 'confirmed' },
|
||||
{ data: 'active', name: 'active' },
|
||||
{ data: 'account', name: 'account' },
|
||||
{ data: 'shop', name: 'shop' },
|
||||
{ data: 'since', name: 'since' },
|
||||
{ data: 'my_payment_methods', name: 'my_payment_methods' },
|
||||
{ data: 'country', name: 'country' },
|
||||
{ data: 'test_mode', name: 'test_mode' },
|
||||
{ data: 'action_login', orderable: false, searchable: false},
|
||||
{ data: 'action_delete', orderable: false, searchable: false},
|
||||
"order": [
|
||||
[0, "desc"]
|
||||
],
|
||||
"columns": [{
|
||||
data: 'id',
|
||||
searchable: false
|
||||
},
|
||||
{
|
||||
data: 'first_name',
|
||||
name: 'account.first_name'
|
||||
},
|
||||
{
|
||||
data: 'last_name',
|
||||
name: 'account.last_name'
|
||||
},
|
||||
{
|
||||
data: 'email',
|
||||
name: 'email'
|
||||
},
|
||||
{
|
||||
data: 'admin',
|
||||
name: 'admin'
|
||||
},
|
||||
{
|
||||
data: 'confirmed',
|
||||
name: 'confirmed'
|
||||
},
|
||||
{
|
||||
data: 'active',
|
||||
name: 'active'
|
||||
},
|
||||
{
|
||||
data: 'account',
|
||||
name: 'account'
|
||||
},
|
||||
{
|
||||
data: 'shop',
|
||||
name: 'shop'
|
||||
},
|
||||
{
|
||||
data: 'shop_domain',
|
||||
name: 'shop_domain'
|
||||
},
|
||||
{
|
||||
data: 'since',
|
||||
name: 'since'
|
||||
},
|
||||
{
|
||||
data: 'my_payment_methods',
|
||||
name: 'my_payment_methods'
|
||||
},
|
||||
{
|
||||
data: 'country',
|
||||
name: 'country'
|
||||
},
|
||||
{
|
||||
data: 'test_mode',
|
||||
name: 'test_mode'
|
||||
},
|
||||
{
|
||||
data: 'action_login',
|
||||
orderable: false,
|
||||
searchable: false
|
||||
},
|
||||
{
|
||||
data: 'action_delete',
|
||||
orderable: false,
|
||||
searchable: false
|
||||
},
|
||||
],
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 50,
|
||||
|
|
@ -442,4 +530,4 @@
|
|||
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@endsection
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue