Problem Kunden gelöscht
Dieser Commit ist enthalten in:
@@ -295,8 +295,15 @@ function loadCustomerLicenses(customerId) {
|
||||
container.innerHTML = '<div class="text-center py-5"><div class="spinner-border text-primary" role="status"></div></div>';
|
||||
|
||||
fetch(`{{ url_for('customers.api_customer_licenses', customer_id=0) }}`.replace('0', customerId))
|
||||
.then(response => response.json())
|
||||
.then(response => {
|
||||
console.log('API Response Status:', response.status);
|
||||
if (!response.ok) {
|
||||
throw new Error(`HTTP error! status: ${response.status}`);
|
||||
}
|
||||
return response.json();
|
||||
})
|
||||
.then(data => {
|
||||
console.log('API Response Data:', data);
|
||||
if (data.success) {
|
||||
// Update header with customer info
|
||||
const customerItem = document.querySelector(`[data-customer-id="${customerId}"]`);
|
||||
@@ -320,11 +327,14 @@ function loadCustomerLicenses(customerId) {
|
||||
</div>`;
|
||||
|
||||
updateLicenseView(customerId, data.licenses);
|
||||
} else {
|
||||
console.error('API returned success: false', data);
|
||||
container.innerHTML = '<div class="alert alert-warning">Keine Lizenzdaten gefunden</div>';
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error:', error);
|
||||
container.innerHTML = '<div class="alert alert-danger">Fehler beim Laden der Lizenzen</div>';
|
||||
container.innerHTML = `<div class="alert alert-danger">Fehler beim Laden der Lizenzen: ${error.message}</div>`;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren