Merge branch 'fix/week-record' into 'development'

[FIX][BE]: adjust calculate for week at recording list

See merge request mbugroup/lti-api!520
This commit is contained in:
Giovanni Gabriel Septriadi
2026-05-08 05:15:42 +00:00
3 changed files with 93 additions and 2 deletions
@@ -314,9 +314,13 @@ func toRecordingProjectFlockDTO(e entity.Recording) RecordingProjectFlockDTO {
result.Period = pfk.Period
if pfk.ProjectFlock.ProductionStandard.Id != 0 {
week := recordingWeekValue(e)
if e.StandardWeek != nil && *e.StandardWeek > 0 {
week = *e.StandardWeek
}
result.ProductionStandart = &RecordingProductionStandardDTO{
Id: pfk.ProjectFlock.ProductionStandard.Id,
Week: recordingWeekValue(e),
Week: week,
Name: pfk.ProjectFlock.ProductionStandard.Name,
HenDayStd: floatValue(e.StandardHenDay),
HenHouseStd: floatValue(e.StandardHenHouse),