mirror of
https://github.com/wekan/wekan.git
synced 2026-01-04 16:48:49 +01:00
board page didn't always show the list counters
This commit is contained in:
parent
10a9306abd
commit
ea3144492e
3 changed files with 45 additions and 38 deletions
|
|
@ -124,7 +124,7 @@ class AdminReport extends BlazeComponent {
|
|||
}
|
||||
|
||||
abbreviate(text) {
|
||||
if (text.length > 30) {
|
||||
if (text?.length > 30) {
|
||||
return `${text.substr(0, 29)}...`;
|
||||
}
|
||||
return text;
|
||||
|
|
@ -162,17 +162,13 @@ class AdminReport extends BlazeComponent {
|
|||
collection = Boards;
|
||||
|
||||
userNames(members) {
|
||||
let text = '';
|
||||
members.forEach(member => {
|
||||
const user = ReactiveCache.getUser(member.userId);
|
||||
text += text ? ', ' : '';
|
||||
if (user) {
|
||||
text += user.username;
|
||||
} else {
|
||||
text += member.userId
|
||||
}
|
||||
});
|
||||
return text;
|
||||
const ret = (members || [])
|
||||
.map(_member => {
|
||||
const _ret = ReactiveCache.getUser(_member.userId)?.username || _member.userId;
|
||||
return _ret;
|
||||
})
|
||||
.join(", ");
|
||||
return ret;
|
||||
}
|
||||
}.register('boardsReport'));
|
||||
|
||||
|
|
@ -180,13 +176,13 @@ class AdminReport extends BlazeComponent {
|
|||
collection = Cards;
|
||||
|
||||
userNames(userIds) {
|
||||
let text = '';
|
||||
userIds.forEach(userId => {
|
||||
const user = ReactiveCache.getUser(userId);
|
||||
text += text ? ', ' : '';
|
||||
text += user.username;
|
||||
});
|
||||
return text;
|
||||
const ret = (userIds || [])
|
||||
.map(_userId => {
|
||||
const _ret = ReactiveCache.getUser(_userId)?.username;
|
||||
return _ret;
|
||||
})
|
||||
.join(", ");
|
||||
return ret
|
||||
}
|
||||
}.register('cardsReport'));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue