-
Notifications
You must be signed in to change notification settings - Fork 0
/
modal.js
27 lines (23 loc) · 890 Bytes
/
modal.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
var t = TrelloPowerUp.iframe();
t.render(function(){
console.log(t.lists('*').then(function(data){ console.log('listttt', data); }));
t.cards('name', 'desc', 'members', 'labels').then(function(cards) {
var summary = new CardsSummary(cards.map((card) => new CardStat(card)));
var table = document.getElementById('estimates');
var tbody = table.querySelector('tbody');
tbody.innerHTML = Object.values(summary.members).map(function(member) {
return `
<tr>
<td>${member.name}</td>
<td>${member.estimatedDev()}</td>
<td>${member.actualPlannedDev()}</td>
<td>${member.actualAdHocDev()}</td>
<td>${member.estimatedQA()}</td>
<td>${member.actualQA()}</td>
<td>${member.estimatedWork()}</td>
<td>${member.actualWork()}</td>
</tr>
`
}).join('');
});
});