Lizenzübersicht fix
Dieser Commit ist enthalten in:
@@ -54,15 +54,14 @@ def licenses():
|
||||
filtered_licenses = []
|
||||
|
||||
for license in licenses_list:
|
||||
if license_status == 'active' and license.get('is_active') and license.get('valid_until') and license.get('valid_until') > now:
|
||||
if license_status == 'active' and license.get('is_active'):
|
||||
# Active means is_active=true, regardless of expiration date
|
||||
filtered_licenses.append(license)
|
||||
elif license_status == 'expiring':
|
||||
expiry_threshold = now + timedelta(days=30)
|
||||
if license.get('valid_until') and now < license.get('valid_until') <= expiry_threshold:
|
||||
filtered_licenses.append(license)
|
||||
elif license_status == 'expired' and license.get('valid_until') and license.get('valid_until') <= now:
|
||||
# Expired means past valid_until date, regardless of is_active
|
||||
filtered_licenses.append(license)
|
||||
elif license_status == 'inactive' and not license.get('is_active'):
|
||||
# Inactive means is_active=false, regardless of date
|
||||
filtered_licenses.append(license)
|
||||
|
||||
licenses_list = filtered_licenses
|
||||
|
||||
@@ -107,7 +107,6 @@
|
||||
<select class="form-select" name="license_status" id="licenseStatus" onchange="this.form.submit()">
|
||||
<option value="" {% if not request.args.get('license_status') %}selected{% endif %}>Alle Status</option>
|
||||
<option value="active" {% if request.args.get('license_status') == 'active' %}selected{% endif %}>✅ Aktiv</option>
|
||||
<option value="expiring" {% if request.args.get('license_status') == 'expiring' %}selected{% endif %}>⏰ Läuft bald ab</option>
|
||||
<option value="expired" {% if request.args.get('license_status') == 'expired' %}selected{% endif %}>⚠️ Abgelaufen</option>
|
||||
<option value="inactive" {% if request.args.get('license_status') == 'inactive' %}selected{% endif %}>❌ Deaktiviert</option>
|
||||
</select>
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren