diff --git a/db/db.go b/db/db.go index 4e01243aa..a085ec485 100644 --- a/db/db.go +++ b/db/db.go @@ -537,17 +537,23 @@ func (db database) GetFilterStatusCount() FilterStattuCount { var assignedCount int64 var completedCount int64 var paidCount int64 + var pendingCount int64 + var failedCount int64 db.db.Model(&Bounty{}).Where("show != false").Where("assignee = ''").Where("paid != true").Count(&openCount) db.db.Model(&Bounty{}).Where("show != false").Where("assignee != ''").Where("paid != true").Count(&assignedCount) db.db.Model(&Bounty{}).Where("show != false").Where("assignee != ''").Where("completed = true").Where("paid != true").Count(&completedCount) db.db.Model(&Bounty{}).Where("show != false").Where("assignee != ''").Where("paid = true").Count(&paidCount) + db.db.Model(&Bounty{}).Where("show != false").Where("assignee != ''").Where("payment_pending = true").Count(&pendingCount) + db.db.Model(&Bounty{}).Where("show != false").Where("assignee != ''").Where("payment_failed = true").Count(&failedCount) ms := FilterStattuCount{ Open: openCount, Assigned: assignedCount, Completed: completedCount, Paid: paidCount, + Pending: pendingCount, + Failed: failedCount, } return ms diff --git a/db/structs.go b/db/structs.go index 4e37fc974..9a125ced6 100644 --- a/db/structs.go +++ b/db/structs.go @@ -906,6 +906,8 @@ type FilterStattuCount struct { Assigned int64 `json:"assigned"` Completed int64 `json:"completed"` Paid int64 `json:"paid"` + Pending int64 `json:"pending"` + Failed int64 `json:"failed"` } func (Person) TableName() string {