feat: accept multiple formats for unlimited in user overrides
All checks were successful
Deploy Development / deploy (push) Successful in 54s
Build Test / lint-backend (push) Successful in 1s
Build Test / build-frontend (push) Successful in 12s

User can now input unlimited with:
- "unbegrenzt" (German)
- "unlimited" (English)
- "inf"
- "999999"
- "∞" (infinity symbol)

All map to NULL (unlimited) in database.

Updated legend to show:
- "unbegrenzt, inf, 999999" = Unbegrenzt
- Clear documentation for users

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Lars 2026-03-20 10:40:56 +01:00
parent 0c0b1ee811
commit 917c8937cf

View File

@ -83,7 +83,11 @@ export default function AdminUserRestrictionsPage() {
} else {
// Parse value
let parsedValue = null
if (value === 'unlimited' || value === '∞') {
const lowerValue = value.toLowerCase().trim()
// Accept multiple formats for unlimited
if (lowerValue === 'unlimited' || lowerValue === 'unbegrenzt' ||
value === '∞' || lowerValue === 'inf' || lowerValue === '999999') {
parsedValue = null
} else if (value === '0') {
parsedValue = 0
@ -495,8 +499,8 @@ export default function AdminUserRestrictionsPage() {
<div style={{ marginTop: 8, display: 'flex', gap: 24, flexWrap: 'wrap' }}>
<span><strong>Leer</strong> = Tier-Standard nutzen (kein Override)</span>
<span><strong style={{ color: 'var(--danger)' }}>0</strong> = Feature deaktiviert</span>
<span><strong> oder leer</strong> = Unbegrenzt (bei Count-Features)</span>
<span><strong>1-999999</strong> = Limit-Wert</span>
<span><strong>unbegrenzt, inf, 999999</strong> = Unbegrenzt</span>
<span><strong>1-999998</strong> = Limit-Wert</span>
</div>
</div>
</>