mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
feat(BE-59,60,61): build stock transfer API with validation and audit log
This commit is contained in:
@@ -29,9 +29,8 @@ type AreaDTO struct {
|
||||
}
|
||||
|
||||
type LocationDTO struct {
|
||||
Id uint `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Area *AreaDTO `json:"area"`
|
||||
Id uint `json:"id"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
type WarehouseDetailDTO struct {
|
||||
@@ -119,11 +118,9 @@ func toLocationDTO(l *entity.Location) *LocationDTO {
|
||||
if l == nil {
|
||||
return nil
|
||||
}
|
||||
// Area selalu diisi jika l.Area ada
|
||||
return &LocationDTO{
|
||||
Id: l.Id,
|
||||
Name: l.Name,
|
||||
Area: toAreaDTO(&l.Area),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,7 +132,7 @@ func toWarehouseDetailDTO(w *entity.Warehouse) *WarehouseDetailDTO {
|
||||
Id: w.Id,
|
||||
Name: w.Name,
|
||||
Location: toLocationDTO(w.Location),
|
||||
Area: toAreaDTO(&w.Area),
|
||||
Area: toAreaDTO(&w.Area), // Ambil area langsung dari warehouse (area_id)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user