updates on the admincontroller and the hubcity fix and queue orders
This commit is contained in:
@@ -35,6 +35,22 @@ type Hub struct {
|
||||
Createdby int `json:"createdby" gorm:"column:createdby"`
|
||||
Updatedby int `json:"updatedby" gorm:"column:updatedby"`
|
||||
Deletedat *time.Time `json:"deletedat,omitempty" gorm:"column:deletedat"`
|
||||
|
||||
// City is the applocations row this hub sits in, resolved on read and never
|
||||
// stored (`gorm:"-"` keeps it out of both the SELECT and the INSERT).
|
||||
//
|
||||
// It exists because the console asks a hub what city it is in, and until now
|
||||
// nothing answered: the hub response carried `applocationid` and no name, so
|
||||
// `hub.city` was undefined on every screen that reached for it. That is not a
|
||||
// cosmetic gap:
|
||||
//
|
||||
// - ZoneContext.matchesZone falls back to comparing an order's address text
|
||||
// against the hub's city. An empty city makes that branch unreachable,
|
||||
// leaving a 35km radius as the only thing still matching.
|
||||
// - fetchAppLocations names each city `hub.city || hub.hubname`, so the
|
||||
// Pricing and report pickers offered "Coimbatore Jupiter Hub" where they
|
||||
// meant "Coimbatore".
|
||||
City string `json:"city" gorm:"-"`
|
||||
}
|
||||
|
||||
func (Hub) TableName() string {
|
||||
|
||||
Reference in New Issue
Block a user