diff --git a/lib/Db/Circle.php b/lib/Db/Circle.php index fad2f0cb7..194cae86b 100644 --- a/lib/Db/Circle.php +++ b/lib/Db/Circle.php @@ -31,7 +31,7 @@ class Circle extends RelationalObject { protected $object; public function __construct(\OCA\Circles\Model\Circle $circle) { - $primaryKey = IShare::TYPE_CIRCLE . ':' . $circle->getUniqueId(); + $primaryKey = $circle->getUniqueId(); parent::__construct($primaryKey, $circle); } @@ -40,7 +40,8 @@ class Circle extends RelationalObject { 'uid' => $this->object->getUniqueId(), 'displayname' => $this->object->getName(), 'typeString' => $this->object->getTypeString(), - 'circleOwner' => $this->object->getOwner() + 'circleOwner' => $this->object->getOwner(), + 'type' => 7 ]; } } diff --git a/lib/Db/Group.php b/lib/Db/Group.php index 451078ae4..516afb323 100644 --- a/lib/Db/Group.php +++ b/lib/Db/Group.php @@ -28,14 +28,15 @@ use OCP\Share\IShare; class Group extends RelationalObject { public function __construct(IGroup $group) { - $primaryKey = IShare::TYPE_GROUP . ':' . $group->getGID(); + $primaryKey = $group->getGID(); parent::__construct($primaryKey, $group); } public function getObjectSerialization() { return [ 'uid' => $this->object->getGID(), - 'displayname' => $this->object->getDisplayName() + 'displayname' => $this->object->getDisplayName(), + 'type' => 1 ]; } } diff --git a/lib/Db/User.php b/lib/Db/User.php index 83ff2fc32..0a1334a35 100644 --- a/lib/Db/User.php +++ b/lib/Db/User.php @@ -28,14 +28,15 @@ use OCP\Share\IShare; class User extends RelationalObject { public function __construct(IUser $user) { - $primaryKey = IShare::TYPE_USER . ':' . $user->getUID(); + $primaryKey = $user->getUID(); parent::__construct($primaryKey, $user); } public function getObjectSerialization() { return [ 'uid' => $this->object->getUID(), - 'displayname' => $this->object->getDisplayName() + 'displayname' => $this->object->getDisplayName(), + 'type' => 0 ]; } diff --git a/src/components/board/Board.vue b/src/components/board/Board.vue index 3d18bdfa2..50e388031 100644 --- a/src/components/board/Board.vue +++ b/src/components/board/Board.vue @@ -24,12 +24,12 @@
-
+

{{ t('deck', 'Loading board') }}

-
+
-
+

{{ t('deck', 'Board not found') }}

-
diff --git a/src/components/board/SharingTabSidebar.vue b/src/components/board/SharingTabSidebar.vue index b4b90002c..e2b4b667d 100644 --- a/src/components/board/SharingTabSidebar.vue +++ b/src/components/board/SharingTabSidebar.vue @@ -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 @@ -
  • +
  • @@ -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 diff --git a/src/components/card/CardSidebar.vue b/src/components/card/CardSidebar.vue index 6485581a6..2c53cb042 100644 --- a/src/components/card/CardSidebar.vue +++ b/src/components/card/CardSidebar.vue @@ -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"> @@ -89,6 +90,7 @@ :key="option.primaryKey" :user="option.participant.uid" :display-name="option.participant.displayname" + :is-no-user="scope.option.isNoUser" :size="32" />
    @@ -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 = [] } diff --git a/src/components/cards/AvatarList.vue b/src/components/cards/AvatarList.vue index 95b9f2a6e..2147a6b7d 100644 --- a/src/components/cards/AvatarList.vue +++ b/src/components/cards/AvatarList.vue @@ -33,14 +33,14 @@ :disable-menu="true" :size="32" />