mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-23 23:05:44 +00:00
fix api get all closing; fix get closing sapronak; fix get all maste data product
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"math"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
commonSvc "gitlab.com/mbugroup/lti-api.git/internal/common/service"
|
||||
entity "gitlab.com/mbugroup/lti-api.git/internal/entities"
|
||||
@@ -332,18 +333,20 @@ func (s closingService) getApprovalStatuses(ctx context.Context, projectFlockID
|
||||
}
|
||||
|
||||
var (
|
||||
minStep uint16
|
||||
statusProject string
|
||||
completed int
|
||||
minStep uint16
|
||||
statusProject string
|
||||
completed int
|
||||
latestActionAt time.Time
|
||||
)
|
||||
|
||||
for _, rec := range records {
|
||||
if minStep == 0 || rec.StepNumber < minStep {
|
||||
minStep = rec.StepNumber
|
||||
statusProject = rec.StepName
|
||||
}
|
||||
if rec.StepNumber == uint16(utils.ProjectFlockStepAktif) {
|
||||
completed++
|
||||
|
||||
if latestActionAt.IsZero() || rec.ActionAt.After(latestActionAt) {
|
||||
latestActionAt = rec.ActionAt
|
||||
statusProject = rec.StepName
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user