mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Implemented rework suggestion by adding backer to group aggregation
This commit is contained in:
@@ -71,8 +71,8 @@
|
||||
}
|
||||
|
||||
.tierNPC, .npc {
|
||||
color: #4E4A57;
|
||||
fill: #4E4A57;
|
||||
color: #4e4a57;
|
||||
fill: #4e4a57;
|
||||
stroke: #005737;
|
||||
|
||||
&:hover, &:active, &:focus {
|
||||
|
||||
@@ -38,7 +38,10 @@
|
||||
<span>{{ $t('push') }}</span>
|
||||
</th>
|
||||
</tr>
|
||||
<tr v-for="notification in notificationsIds" :key="notification">
|
||||
<tr
|
||||
v-for="notification in notificationsIds"
|
||||
:key="notification"
|
||||
>
|
||||
<td>
|
||||
<span>{{ $t(notification) }}</span>
|
||||
</td>
|
||||
@@ -55,7 +58,7 @@
|
||||
type="checkbox"
|
||||
@change="set('pushNotifications', notification)"
|
||||
>
|
||||
<td v-else>
|
||||
</td><td v-else>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -33,7 +33,10 @@
|
||||
<div class="how-many-to-buy">
|
||||
<strong>{{ $t('howManyToBuy') }}</strong>
|
||||
</div>
|
||||
<div class="mb-3" v-if="item.addlNotes">
|
||||
<div
|
||||
v-if="item.addlNotes"
|
||||
class="mb-3"
|
||||
>
|
||||
{{ item.addlNotes }}
|
||||
</div>
|
||||
<div class="box">
|
||||
|
||||
@@ -94,6 +94,7 @@ async function usersMapByConversations (owner, users) {
|
||||
_id: '$uuid',
|
||||
userStyles: { $last: '$userStyles' },
|
||||
contributor: { $last: '$contributor' },
|
||||
backer: { $last: '$backer' },
|
||||
},
|
||||
},
|
||||
]);
|
||||
@@ -125,7 +126,6 @@ export async function listConversations (owner) {
|
||||
username: { $last: '$username' },
|
||||
timestamp: { $last: '$timestamp' },
|
||||
text: { $last: '$text' },
|
||||
npc: { $addToSet: '$backer.npc' },
|
||||
count: { $sum: 1 },
|
||||
},
|
||||
},
|
||||
@@ -142,7 +142,7 @@ export async function listConversations (owner) {
|
||||
const conversations = conversationsList.map(res => ({
|
||||
uuid: res._id,
|
||||
...res,
|
||||
backer: Array.isArray(res.npc) && res.npc.length > 0 ? { npc: res.npc[0] } : { npc: null },
|
||||
backer: usersMap[res._id].backer,
|
||||
userStyles: usersMap[res._id].userStyles,
|
||||
contributor: usersMap[res._id].contributor,
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user