Keep track of rows that are outside of the district

This commit is contained in:
Eli Ribble 2026-02-14 04:08:22 +00:00
parent 8932f46900
commit 76f4613320
No known key found for this signature in database
3 changed files with 19 additions and 10 deletions

View file

@ -22,6 +22,7 @@ import (
type UploadPoolDetail struct {
CountExisting int
CountNew int
CountOutside int
Created time.Time
ID int32
Name string
@ -95,9 +96,12 @@ func GetUploadPoolDetail(ctx context.Context, organization_id int32, file_id int
pools := make([]UploadPoolRow, 0)
count_existing := 0
count_new := 0
count_outside := 0
for _, r := range rows {
if r.IsNew {
count_new = count_new + 1
} else if !r.IsInDistrict {
count_outside = count_outside + 1
} else {
count_existing = count_existing + 1
}
@ -108,6 +112,7 @@ func GetUploadPoolDetail(ctx context.Context, organization_id int32, file_id int
}
return UploadPoolDetail{
CountExisting: count_existing,
CountOutside: count_outside,
CountNew: count_new,
Name: file.Name,
Pools: pools,