Order rows in the data tables
This commit is contained in:
parent
216c91ed10
commit
6dca03fd0a
1 changed files with 3 additions and 0 deletions
3
html.go
3
html.go
|
|
@ -654,6 +654,8 @@ func inspectionsByCell(ctx context.Context, org *models.Organization, c h3.Cell)
|
|||
sm.Where(
|
||||
psql.F("ST_Within", "geom", geom_query),
|
||||
),
|
||||
sm.OrderBy("pointlocid"),
|
||||
sm.OrderBy("enddatetime"),
|
||||
).All(ctx, PGInstance.BobDB)
|
||||
if err != nil {
|
||||
return results, fmt.Errorf("Failed to query rows: %w", err)
|
||||
|
|
@ -681,6 +683,7 @@ func breedingSourcesByCell(ctx context.Context, org *models.Organization, c h3.C
|
|||
sm.Where(
|
||||
psql.F("ST_Within", "geom", geom_query),
|
||||
),
|
||||
sm.OrderBy("lasttreatdate"),
|
||||
).All(ctx, PGInstance.BobDB)
|
||||
if err != nil {
|
||||
return results, fmt.Errorf("Failed to query rows: %w", err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue