feat: locking days, if they are submitted and accepted

fixed #76
This commit is contained in:
2026-02-09 00:32:00 +01:00
parent 2d8747c971
commit 8911165c4b
13 changed files with 218 additions and 115 deletions

View File

@@ -17,6 +17,17 @@ type CompoundDay struct {
DayParts []IWorkDay
}
// IsSubmittedAndAccepted implements IWorkDay.
func (c *CompoundDay) IsSubmittedAndAccepted() bool {
var isSubmittedAndAccepted = true
for _, day := range c.DayParts {
_isSubmittedAndAccepted := day.IsSubmittedAndAccepted()
isSubmittedAndAccepted = isSubmittedAndAccepted && _isSubmittedAndAccepted
slog.Info("Result from IsSubmittedCheck", "Result", _isSubmittedAndAccepted, "compount", day.ToString())
}
return isSubmittedAndAccepted
}
func NewCompondDay(date time.Time, dayParts ...IWorkDay) *CompoundDay {
return &CompoundDay{Day: date, DayParts: dayParts}
}