Add the selected contacts to a group#2763
Conversation
Codecov ReportBase: 67.96% // Head: 67.96% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## main #2763 +/- ##
=========================================
Coverage 67.96% 67.96%
Complexity 253 253
=========================================
Files 23 23
Lines 721 721
=========================================
Hits 490 490
Misses 231 231 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
82fb27f to
f7a792c
Compare
|
I just rebased this. Hopefully I didn't break anything while doing so. |
01631a5 to
e2559bd
Compare
Add checkbox on hover and add a button to delete the selected contacts Signed-off-by: Bastien PROMPSY <bastienprompsy@gmail.com>
Add a button to merge the selected contacts Signed-off-by: Bastien PROMPSY <bastienprompsy@gmail.com>
When the button 'add to group' is clicked, a multiselect appears who allow to select the group or type it Signed-off-by: Bastien PROMPSY <bastienprompsy@gmail.com>
Signed-off-by: szaimen <szaimen@e.mail.de>
e2559bd to
15e64b5
Compare
|
@ChristophWurst I fixed the imports :) |
| menu-align="right"> | ||
| <template v-if="selected.length >= 1"> | ||
| <ActionButton v-if="showAddToGroup" | ||
| icon="icon-clone" |
There was a problem hiding this comment.
icon classes have been deprecated. please use a material icon.
| </template> | ||
| <ActionButton v-if="selected.length >= 2" | ||
| :close-after-click="true" | ||
| icon="icon-clone" |
| </ActionButton> | ||
| <ActionButton v-if="selected.length >= 1" | ||
| :close-after-click="true" | ||
| icon="icon-delete" |
| :data-component="ContactsListItem" | ||
| :estimate-size="68" /> | ||
| :estimate-size="68" | ||
| :extra-props={selected} |
| VirtualList, | ||
| Actions, | ||
| ActionButton, | ||
| Multiselect |
| const contactjcal = this.contacts[element].jCal[1] | ||
| this.addValue(firstContact, contactjcal) | ||
| // delete the contact merged and the uid in the selected | ||
| this.$store.dispatch('deleteContact', { contact: this.contacts[element] }) && this.selected.splice(this.selected.indexOf(element), 1) |
| }) | ||
| this.$store.dispatch('updateContact', firstContact) | ||
| }, | ||
| OpenMultiselect() { |
There was a problem hiding this comment.
| OpenMultiselect() { | |
| openMultiselect() { |
camel case for methods
| const selectedContact = this.contacts[element] | ||
| const data = selectedContact.groups | ||
| if (!data.includes(value)) { | ||
| this.$store.dispatch('addContactToGroup', { |
| isUnselected() { | ||
| this.ischecked = false | ||
| // update the selected | ||
| this.$parent.$parent.$emit('update-check-selected', this.source.key) |
There was a problem hiding this comment.
accessing the grandparent is a no go. this makes the component depend on the exact structure and is prone to break in unnoticed ways. Please find a better way to pass around the data. Could you use Vuex?
| isSelected() { | ||
| this.ischecked = true | ||
| // update the selected | ||
| this.$parent.$parent.$emit('update-check-selected', this.source.key) |
There was a problem hiding this comment.
please don't access the grandparent component this way
Linked to the pull request #2756 (comment)
By using the menu of the selected contacts.
Add selected contacts in a group who already exist
When the multiselect is clicked, it will display all the group which already exists and by clicking on a group, it will add all the selected contacts to this group
Create a group and add the selected contacts
It's the same but when typing the name of the new group and press down the return key, it will create a group of this name and add the selected contacts into it