Membership-System und Bug Fixing (inkl. Nutrition) #8

Merged
Lars merged 56 commits from develop into main 2026-03-21 08:48:57 +01:00
Showing only changes of commit ac56974e83 - Show all commits

View File

@ -434,15 +434,19 @@ export default function AdminUserRestrictionsPage() {
{/* Action */}
<td style={{ padding: '12px 16px', textAlign: 'right' }}>
{override && (
<button
className="btn btn-secondary"
onClick={() => handleChange(feature.id, '')}
style={{ padding: '4px 8px', fontSize: 11 }}
>
Zurück zu Standard
</button>
)}
<button
className="btn btn-secondary"
onClick={() => handleChange(feature.id, '')}
disabled={!override}
style={{
padding: '4px 8px',
fontSize: 11,
opacity: override ? 1 : 0.4,
cursor: override ? 'pointer' : 'not-allowed'
}}
>
Zurück
</button>
</td>
</tr>
)
@ -453,30 +457,6 @@ export default function AdminUserRestrictionsPage() {
</table>
</div>
{/* Fixed Bottom Bar */}
<div style={{
position: 'fixed', bottom: 0, left: 0, right: 0,
background: 'var(--bg)', borderTop: '1px solid var(--border)',
padding: 16, display: 'flex', gap: 8, zIndex: 100,
boxShadow: '0 -2px 10px rgba(0,0,0,0.1)'
}}>
<button
className="btn btn-secondary"
onClick={() => setChanges({})}
disabled={!hasChanges || saving}
style={{ flex: 1 }}
>
<X size={14} /> Abbrechen
</button>
<button
className="btn btn-primary"
onClick={handleSave}
disabled={!hasChanges || saving}
style={{ flex: 2 }}
>
{saving ? 'Speichern...' : hasChanges ? `${Object.keys(changes).length} Änderung(en) speichern` : 'Keine Änderungen'}
</button>
</div>
{/* Legend */}
<div style={{
@ -493,6 +473,33 @@ export default function AdminUserRestrictionsPage() {
</div>
</>
)}
{/* Fixed Bottom Bar - Always visible when user selected */}
{selectedUser && (
<div style={{
position: 'fixed', bottom: 0, left: 0, right: 0,
background: 'var(--bg)', borderTop: '1px solid var(--border)',
padding: 16, display: 'flex', gap: 8, zIndex: 100,
boxShadow: '0 -2px 10px rgba(0,0,0,0.1)'
}}>
<button
className="btn btn-secondary"
onClick={() => setChanges({})}
disabled={!hasChanges || saving}
style={{ flex: 1 }}
>
<X size={14} /> Abbrechen
</button>
<button
className="btn btn-primary"
onClick={handleSave}
disabled={!hasChanges || saving}
style={{ flex: 2 }}
>
{saving ? 'Speichern...' : hasChanges ? `${Object.keys(changes).length} Änderung(en) speichern` : 'Keine Änderungen'}
</button>
</div>
)}
</div>
)
}