diff --git a/internal/modules/dashboards/repositories/dashboard_stats.repository.go b/internal/modules/dashboards/repositories/dashboard_stats.repository.go index a06fdb71..948c1b56 100644 --- a/internal/modules/dashboards/repositories/dashboard_stats.repository.go +++ b/internal/modules/dashboards/repositories/dashboard_stats.repository.go @@ -24,7 +24,7 @@ type FeedUsageByUom struct { type RecordingWeeklyMetric struct { Week int - HandDay float64 + HenDay float64 EggWeight float64 FeedIntake float64 FcrValue float64 @@ -110,7 +110,7 @@ func (r *DashboardRepositoryImpl) GetRecordingWeeklyMetrics(ctx context.Context, db := r.DB().WithContext(ctx). Table("recordings AS r"). Select(`((r.day - 1) / 7 + 1) AS week, - COALESCE(AVG(r.hen_day), 0) AS hand_day, + COALESCE(AVG(r.hen_day), 0) AS hen_day, COALESCE(AVG(r.egg_weight), 0) AS egg_weight, COALESCE(AVG(r.feed_intake), 0) AS feed_intake, COALESCE(AVG(r.fcr_value), 0) AS fcr_value, diff --git a/internal/modules/dashboards/services/dashboard.service.go b/internal/modules/dashboards/services/dashboard.service.go index 6653d669..614307d3 100644 --- a/internal/modules/dashboards/services/dashboard.service.go +++ b/internal/modules/dashboards/services/dashboard.service.go @@ -288,7 +288,7 @@ func (s dashboardService) buildPerformanceCharts(ctx context.Context, params *va performanceDataset = append(performanceDataset, map[string]interface{}{ "week": week, - "act_laying": roundTo(rec.HandDay, 2), + "act_laying": roundTo(rec.HenDay, 2), "std_laying": roundTo(std.StdLaying, 2), "act_egg_weight": roundTo(rec.EggWeight, 2), "std_egg_weight": roundTo(std.StdEggWeight, 2),