adjust response api summary daily checklist

This commit is contained in:
MacBook Air M1
2026-01-12 10:37:33 +07:00
parent ae41422776
commit d568b87e01
2 changed files with 10 additions and 5 deletions
@@ -151,6 +151,10 @@ func (u *DailyChecklistController) GetSummary(c *fiber.Ctx) error {
performanceMap[summary.EmployeeID] = &dto.DailyChecklistPerformanceOverviewDTO{ performanceMap[summary.EmployeeID] = &dto.DailyChecklistPerformanceOverviewDTO{
EmployeeID: summary.EmployeeID, EmployeeID: summary.EmployeeID,
EmployeeName: summary.EmployeeName, EmployeeName: summary.EmployeeName,
Kandang: dto.DailyChecklistReportEntityDTO{
Id: summary.KandangID,
Name: summary.KandangName,
},
} }
} }
@@ -64,11 +64,12 @@ type DailyChecklistSummaryDTO struct {
} }
type DailyChecklistPerformanceOverviewDTO struct { type DailyChecklistPerformanceOverviewDTO struct {
EmployeeID uint `json:"employee_id"` EmployeeID uint `json:"employee_id"`
EmployeeName string `json:"employee_name"` EmployeeName string `json:"employee_name"`
TotalActivity int `json:"total_activity"` Kandang DailyChecklistReportEntityDTO `json:"kandang"`
ActivityDone int `json:"activity_done"` TotalActivity int `json:"total_activity"`
ActivityLeft int `json:"activity_left"` ActivityDone int `json:"activity_done"`
ActivityLeft int `json:"activity_left"`
} }
type DailyChecklistReportDTO struct { type DailyChecklistReportDTO struct {