CSSの最適化や内部挙動の改良
This commit is contained in:
@@ -378,6 +378,10 @@ func (s *AssignmentService) GetStatistics(userID uint, filter StatisticsFilter)
|
||||
return summary, nil
|
||||
}
|
||||
|
||||
func (s *AssignmentService) GetForExport(userID uint, from, to *time.Time, subject string) ([]models.Assignment, error) {
|
||||
return s.assignmentRepo.FindForExport(userID, from, to, subject)
|
||||
}
|
||||
|
||||
func (s *AssignmentService) ArchiveSubject(userID uint, subject string) error {
|
||||
return s.assignmentRepo.ArchiveBySubject(userID, subject)
|
||||
}
|
||||
|
||||
@@ -413,11 +413,6 @@ func (s *RecurringAssignmentService) generateNextIfPending(recurring *models.Rec
|
||||
return nil
|
||||
}
|
||||
|
||||
pendingCount, err := s.recurringRepo.CountPendingByRecurringID(recurring.ID)
|
||||
if err != nil || pendingCount > 0 {
|
||||
return err
|
||||
}
|
||||
|
||||
latest, err := s.recurringRepo.GetLatestAssignmentByRecurringID(recurring.ID)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -426,6 +421,10 @@ func (s *RecurringAssignmentService) generateNextIfPending(recurring *models.Rec
|
||||
return nil
|
||||
}
|
||||
|
||||
if !latest.IsCompleted && !latest.IsOverdue() {
|
||||
return nil
|
||||
}
|
||||
|
||||
nextDueDate := recurring.CalculateNextDueDate(latest.DueDate)
|
||||
|
||||
if recurring.GenerationLeadDays > 0 {
|
||||
|
||||
Reference in New Issue
Block a user