Merge branch 'rc/01' into 'production'

Rc/01

See merge request mbugroup/lti-api!578
This commit is contained in:
Giovanni Gabriel Septriadi
2026-05-30 03:14:16 +00:00
@@ -387,16 +387,12 @@ func (s productionStandardService) EnsureWeekAvailable(ctx context.Context, stan
return nil return nil
} }
upperCategory := strings.ToUpper(category) week := ((day - 1) / 7) + 1
weekBase := 1
if upperCategory == string(utils.ProjectFlockCategoryLaying) {
weekBase = config.LayingWeekStart()
}
week := ((day - 1) / 7) + weekBase
if week <= 0 { if week <= 0 {
return nil return nil
} }
upperCategory := strings.ToUpper(category)
if upperCategory == string(utils.ProjectFlockCategoryLaying) { if upperCategory == string(utils.ProjectFlockCategoryLaying) {
detail, err := s.ProductionStandardDetailRepo.GetByStandardIDAndWeek(ctx, standardID, week) detail, err := s.ProductionStandardDetailRepo.GetByStandardIDAndWeek(ctx, standardID, week)
if err != nil { if err != nil {