UI verbessert

This commit is contained in:
concierge committed 2026-11-19 08:14:13 +01:00
1 parent cc2e85c111
commit a5d4251868
10 files changed
+136 -83

No files matched your search

+6 -17
View File
@@ -440,7 +440,6 @@ func CandidateSuggestions(
rangeAssignments []Assignment,
services []ServiceOccurrence,
serviceAssignments []Assignment,
ignorePreferredWeekdays bool,
liturgicalDay *LiturgicalDay,
) []CandidateSuggestion {
monthKey := MonthKey(service.Date)
@@ -505,24 +504,14 @@ func CandidateSuggestions(
}
weekdayMatch := person.MatchesWeekdayPreference(weekday, service.TimeMinutes, highFeast)
if !weekdayMatch {
switch {
case ignorePreferredWeekdays:
beyond = true
case person.AllowBeyondPreferences:
beyond = true
default:
warnings = append(warnings, "Einsatztag oder Uhrzeit passt nicht")
blocked = true
}
// Manual assignments may always override preferences, but the UI
// asks for confirmation before doing so.
warnings = append(warnings, "Einsatztag oder Uhrzeit passt nicht")
beyond = true
}
if person.MaxPerMonth > 0 && monthlyCounts[person.ID+"|"+monthKey] >= person.MaxPerMonth {
if person.AllowBeyondPreferences {
warnings = append(warnings, "Monatslimit")
beyond = true
} else {
warnings = append(warnings, "Monatslimit")
blocked = true
}
warnings = append(warnings, "Monatslimit")
beyond = true
}
used := dayServices[person.ID+"|"+service.DateKey()]
if len(used) > 0 && !subsetOfSingle(used, service.ID) {