mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-24 07:15:43 +00:00
fix projectflock approval with dto
This commit is contained in:
+11
-2
@@ -101,13 +101,22 @@ func (u *ProjectFlockKandangController) Closing(c *fiber.Ctx) error {
|
||||
return err
|
||||
}
|
||||
|
||||
detail, availableQtys, productWarehouses, err := u.ProjectFlockKandangService.GetOne(c, result.Id)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
detailDTO := dto.ToProjectFlockKandangDetailDTOWithAvailableQty(*detail, availableQtys, productWarehouses)
|
||||
|
||||
return c.Status(fiber.StatusOK).
|
||||
JSON(response.Success{
|
||||
Code: fiber.StatusOK,
|
||||
Status: "success",
|
||||
Message: "Status closing kandang diperbarui",
|
||||
// Data: dto.ProjectFlockKandangDetailDTO(*result),
|
||||
Data: result,
|
||||
Data: fiber.Map{
|
||||
"detail": detailDTO,
|
||||
"approval": detailDTO.Approval,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user