mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-25 07:45:44 +00:00
adjust periode at create project flock
This commit is contained in:
@@ -120,6 +120,11 @@ func ToProjectFlockListDTOWithPeriod(e entity.ProjectFlock, period int) ProjectF
|
||||
locationSummary = &mapped
|
||||
}
|
||||
|
||||
// Jika period tidak di-pass secara eksplisit (0), derive dari KandangHistory
|
||||
if period == 0 && len(e.KandangHistory) > 0 {
|
||||
period = e.KandangHistory[0].Period
|
||||
}
|
||||
|
||||
latestApproval := defaultProjectFlockLatestApproval(e)
|
||||
if e.LatestApproval != nil {
|
||||
snapshot := approvalDTO.ToApprovalDTO(*e.LatestApproval)
|
||||
|
||||
Reference in New Issue
Block a user