Do not change participant primary key
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
@@ -24,12 +24,12 @@
|
||||
<div class="board-wrapper">
|
||||
<Controls :board="board" />
|
||||
<transition name="fade" mode="out-in">
|
||||
<div v-if="loading" class="emptycontent" key="loading">
|
||||
<div v-if="loading" key="loading" class="emptycontent">
|
||||
<div class="icon icon-loading" />
|
||||
<h2>{{ t('deck', 'Loading board') }}</h2>
|
||||
<p />
|
||||
</div>
|
||||
<div v-else-if="board && !loading" class="board" key="board">
|
||||
<div v-else-if="board && !loading" key="board" class="board">
|
||||
<Container lock-axix="y"
|
||||
orientation="horizontal"
|
||||
:drag-handle-selector="dragHandleSelector"
|
||||
@@ -39,13 +39,12 @@
|
||||
</Draggable>
|
||||
</Container>
|
||||
</div>
|
||||
<div v-else class="emptycontent" key="notfound">
|
||||
<div v-else key="notfound" class="emptycontent">
|
||||
<div class="icon icon-deck" />
|
||||
<h2>{{ t('deck', 'Board not found') }}</h2>
|
||||
<p />
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
:options="formatedSharees"
|
||||
:user-select="true"
|
||||
label="displayName"
|
||||
track-by="user"
|
||||
:internal-search="false"
|
||||
track-by="multiselectKey"
|
||||
:internal-search="true"
|
||||
@input="clickAddAcl"
|
||||
@search-change="asyncFind" />
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
<li v-for="acl in board.acl" :key="acl.participant.primaryKey">
|
||||
<li v-for="acl in board.acl" :key="acl.id">
|
||||
<Avatar v-if="acl.type===0" :user="acl.participant.uid" />
|
||||
<div v-if="acl.type===1" class="avatardiv icon icon-group" />
|
||||
<div v-if="acl.type===7" class="avatardiv icon icon-circles" />
|
||||
@@ -101,11 +101,11 @@ export default {
|
||||
},
|
||||
formatedSharees() {
|
||||
return this.unallocatedSharees.map(item => {
|
||||
|
||||
const sharee = {
|
||||
user: item.label,
|
||||
displayName: item.label,
|
||||
icon: 'icon-user',
|
||||
multiselectKey: item.shareType + ':' + item.primaryKey,
|
||||
}
|
||||
|
||||
if (item.value.shareType === 1) {
|
||||
@@ -124,7 +124,7 @@ export default {
|
||||
unallocatedSharees() {
|
||||
return this.sharees.filter((sharee) => {
|
||||
const foundIndex = this.board.acl.findIndex((acl) => {
|
||||
return acl.participant.uid === sharee.value.shareWith
|
||||
return acl.participant.uid === sharee.value.shareWith && acl.participant.type === sharee.value.shareType
|
||||
})
|
||||
if (foundIndex === -1) {
|
||||
return true
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
:auto-limit="false"
|
||||
:placeholder="t('deck', 'Assign a user to this card…')"
|
||||
label="displayname"
|
||||
track-by="primaryKey"
|
||||
track-by="multiselectKey"
|
||||
@select="assignUserToCard"
|
||||
@remove="removeUserFromCard">
|
||||
<template #tag="scope">
|
||||
@@ -80,6 +80,7 @@
|
||||
<Avatar :user="scope.option.uid"
|
||||
:display-name="scope.option.displayname"
|
||||
:size="24"
|
||||
:is-no-user="scope.option.isNoUser"
|
||||
:disable-menu="true" />
|
||||
</div>
|
||||
</template>
|
||||
@@ -89,6 +90,7 @@
|
||||
:key="option.primaryKey"
|
||||
:user="option.participant.uid"
|
||||
:display-name="option.participant.displayname"
|
||||
:is-no-user="scope.option.isNoUser"
|
||||
:size="32" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -258,6 +260,7 @@ export default {
|
||||
displayName: item.displayname,
|
||||
icon: 'icon-user',
|
||||
isNoUser: false,
|
||||
multiselectKey: item.type + ':' + item.uid,
|
||||
}
|
||||
|
||||
if (item.type === 1) {
|
||||
@@ -313,7 +316,11 @@ export default {
|
||||
this.allLabels = this.currentCard.labels
|
||||
|
||||
if (this.currentCard.assignedUsers && this.currentCard.assignedUsers.length > 0) {
|
||||
this.assignedUsers = this.currentCard.assignedUsers.map((item) => item.participant)
|
||||
this.assignedUsers = this.currentCard.assignedUsers.map((item) => ({
|
||||
...item.participant,
|
||||
isNoUser: item.participant.type !== 0,
|
||||
multiselectKey: item.participant.type + ':' + item.participant.primaryKey,
|
||||
}))
|
||||
} else {
|
||||
this.assignedUsers = []
|
||||
}
|
||||
|
||||
@@ -33,14 +33,14 @@
|
||||
:disable-menu="true"
|
||||
:size="32" />
|
||||
<Avatar v-if="user.type === 1"
|
||||
:user="user.participant.primaryKey"
|
||||
:user="user.participant.uid"
|
||||
:display-name="user.participant.displayname"
|
||||
:tooltip-message="user.participant.displayname + ' ' + t('deck', '(group)')"
|
||||
:is-no-user="true"
|
||||
:disable-="true"
|
||||
:size="32" />
|
||||
<Avatar v-if="user.type === 7"
|
||||
:user="user.participant.primaryKey"
|
||||
:user="user.participant.uid"
|
||||
:display-name="user.participant.displayname"
|
||||
:tooltip-message="user.participant.displayname + ' ' + t('deck', '(circle)')"
|
||||
:is-no-user="true"
|
||||
|
||||
Reference in New Issue
Block a user