update 20.10.2025
This commit is contained in:
parent
8c11130b5d
commit
a939cd51ef
616 changed files with 84821 additions and 4121 deletions
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue