@@ -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}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user