summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--server.js5
-rw-r--r--views/tm_list.pug2
2 files changed, 6 insertions, 1 deletions
diff --git a/server.js b/server.js
index 5caf238..125d468 100644
--- a/server.js
+++ b/server.js
@@ -2750,6 +2750,8 @@ const TM_SEED_LIST_USER = SQL(`
order by seed_name
`)
+const TM_POOL_LIST_ACTIVE = SQL("select * from tm_pool_active_view")
+
const TM_POOL_LIST_USER_ACTIVE = SQL(`
select * from tm_pool_active_view
where not is_finished and pool_id in (
@@ -2983,7 +2985,8 @@ const TM_SELECT_SEED_READY_MINI_CUP = SQL(`
app.get("/tm/list", function (req, res) {
let seeds = TM_SEED_LIST_ALL.all(req.user ? req.user.user_id : 0)
let seeds_by_title = object_group_by(seeds, "title_id")
- res.render("tm_list.pug", { user: req.user, seeds, seeds_by_title })
+ let active_pools = TM_POOL_LIST_ACTIVE.all()
+ res.render("tm_list.pug", { user: req.user, seeds, seeds_by_title, active_pools })
})
app.get("/tm/seed/:seed_name", function (req, res) {
diff --git a/views/tm_list.pug b/views/tm_list.pug
index 41945fc..4f7c147 100644
--- a/views/tm_list.pug
+++ b/views/tm_list.pug
@@ -26,3 +26,5 @@ html
+seedlist(seeds, TITLE_NAME[title_id])
if 1
+seedlist(seeds, "Mini Cup")
+
+ +poollist(active_pools, "Active")