Get progress info from trello

This commit is contained in:
Jonathan Barrow
2021-04-19 16:21:50 -04:00
parent 5f50fe4ed1
commit 9be553cd9f
8 changed files with 457 additions and 13 deletions

View File

@@ -47,13 +47,13 @@ app.engine('handlebars', handlebars({
},
customCheckbox(type) {
switch(type) {
case 'done':
case 'completed':
return `
<div class="custom-checkbox done">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check"><polyline points="20 6 9 17 4 12"></polyline></svg>
</div>
`;
case 'ongoing':
case 'started':
return `
<div class="custom-checkbox ongoing">
<div class="small-dot"></div>

View File

@@ -2,14 +2,16 @@ const getLocale = require('../../util/getLocale');
const { Router } = require('express');
const router = new Router();
const progressLists = require('../progress-lists');
const { getTrelloCache } = require('../../util/trello');
router.get('/', (req, res) => {
router.get('/', async (request, response) => {
const tmpLocale = getLocale('US', 'en');
res.render('progress', {
const cache = await getTrelloCache();
response.render('progress', {
layout: 'main',
locale: tmpLocale,
progressLists
progressLists: cache
});
});