diff --git a/src/components/labels/ListLabels.vue b/src/components/labels/ListLabels.vue
index 2bb1cddb..df8bc1f5 100644
--- a/src/components/labels/ListLabels.vue
+++ b/src/components/labels/ListLabels.vue
@@ -3,25 +3,26 @@
Manage labels
Click on a label to edit it.
- You can edit all labels you created, you can use all labels which are associated with a task to whose list you have access.
+ You can edit all labels you created, you can use all labels which are associated with a task to whose list
+ you have access.
+ v-if="user.infos.id !== l.createdBy.id"
+ v-tooltip.bottom="'You are not allowed to edit this label because you dont own it.'">
{{ l.title }}
+ @click="editLabel(l)"
+ :style="{'color': l.textColor}"
+ v-else>
{{ l.title }}
@@ -44,13 +45,20 @@
@@ -68,12 +76,15 @@
-
+
Save
-
+ {deleteLabel(labelEditLabel);isLabelEdit = false}">
@@ -117,7 +128,24 @@
},
methods: {
loadLabels() {
- this.labelService.getAll()
+ const getAllLabels = (page = 1) => {
+ return this.labelService.getAll({}, {}, page)
+ .then(labels => {
+ if(page < this.labelService.totalPages) {
+ return getAllLabels(page + 1)
+ .then(nextLabels => {
+ return labels.concat(nextLabels)
+ })
+ } else {
+ return labels
+ }
+ })
+ .catch(e => {
+ return Promise.reject(e)
+ })
+ }
+
+ getAllLabels()
.then(r => {
this.$set(this, 'labels', r)
})
@@ -155,7 +183,7 @@
})
},
editLabel(label) {
- if(label.createdBy.id !== this.user.infos.id) {
+ if (label.createdBy.id !== this.user.infos.id) {
return
}
this.labelEditLabel = label