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