WIP(tasks): new summary modal

This commit is contained in:
SabreCat
2022-07-21 15:35:59 -05:00
parent 153561dd42
commit e06a0e5e7f
8 changed files with 353 additions and 226 deletions

View File

@@ -0,0 +1,32 @@
import clone from 'lodash/clone';
export default {
methods: {
async syncTask () {
if (this.groupId) {
const members = await this.$store.dispatch('members:getGroupMembers', {
groupId: this.groupId,
includeAllPublicFields: true,
});
this.members = members;
this.membersNameAndId = [];
this.members.forEach(member => {
this.membersNameAndId.push({
id: member._id,
name: member.profile.name,
addlText: `@${member.auth.local.username}`,
});
this.memberNamesById[member._id] = member.profile.name;
});
this.assignedMembers = [];
if (this.task.group?.assignedUsers) {
this.assignedMembers = this.task.group.assignedUsers;
}
}
// @TODO: Task modal component is mutating a prop
// and that causes issues. We need to not copy the prop similar to group modals
if (this.task) this.checklist = clone(this.task.checklist);
},
},
};