diff --git a/src/components/lists/ShowList.vue b/src/components/lists/ShowList.vue
index 14968a35..c5843ea4 100644
--- a/src/components/lists/ShowList.vue
+++ b/src/components/lists/ShowList.vue
@@ -183,6 +183,44 @@
+
+
+
+
+
+
+
+
+ Oops! No user found. Consider changing the search query.
+
+
+
+
+
@@ -232,11 +270,15 @@
import message from '../../message'
import flatPickr from 'vue-flatpickr-component'
import 'flatpickr/dist/flatpickr.css'
+ import multiselect from 'vue-multiselect'
+ import {differenceWith} from 'lodash'
import ListService from '../../services/list'
import TaskService from '../../services/task'
import TaskModel from '../../models/task'
import ListModel from '../../models/list'
+ import UserModel from '../../models/user'
+ import UserService from '../../services/user'
import priorities from '../../models/priorities'
export default {
@@ -263,10 +305,15 @@
onOpen: this.updateLastReminderDate,
onClose: this.addReminderDate,
},
+
+ newAssignee: UserModel,
+ userService: UserService,
+ foundUsers: [],
}
},
components: {
- flatPickr
+ flatPickr,
+ multiselect,
},
beforeMount() {
// Check if the user is already logged in, if so, redirect him to the homepage
@@ -278,6 +325,8 @@
this.listService = new ListService()
this.taskService = new TaskService()
this.newTask = new TaskModel()
+ this.userService = new UserService()
+ this.newAssignee = new UserModel()
this.loadList()
},
watch: {
@@ -395,7 +444,33 @@
this.taskEditTask.reminderDates.splice(index, 1)
// Reset the last to 0 to have the "add reminder" button
this.taskEditTask.reminderDates[this.taskEditTask.reminderDates.length - 1] = null
- }
+ },
+ addAssignee() {
+ this.taskEditTask.assignees.push(this.newAssignee)
+ },
+ deleteAssigneeByIndex(index) {
+ this.taskEditTask.assignees.splice(index, 1)
+ },
+ findUser(query) {
+ if(query === '') {
+ this.clearAll()
+ return
+ }
+
+ this.userService.getAll({}, {s: query})
+ .then(response => {
+ // Filter the results to not include users who are already assigned
+ this.$set(this, 'foundUsers', differenceWith(response, this.taskEditTask.assignees, (first, second) => {
+ return first.id === second.id
+ }))
+ })
+ .catch(e => {
+ message.error(e, this)
+ })
+ },
+ clearAll () {
+ this.$set(this, 'foundUsers', [])
+ },
}
}
\ No newline at end of file
diff --git a/src/components/sharing/userTeam.vue b/src/components/sharing/userTeam.vue
index bc49b2d4..a0c27c78 100644
--- a/src/components/sharing/userTeam.vue
+++ b/src/components/sharing/userTeam.vue
@@ -304,9 +304,6 @@
clearAll () {
this.$set(this, 'found', [])
},
- limitText (count) {
- return `and ${count} others`
- },
},
}
diff --git a/src/styles/_multiselect.scss b/src/styles/_multiselect.scss
index 3b2e5112..c01c6bf7 100644
--- a/src/styles/_multiselect.scss
+++ b/src/styles/_multiselect.scss
@@ -268,6 +268,10 @@ fieldset[disabled] .multiselect {
margin: 0;
min-width: 100%;
vertical-align: top;
+
+ li + li {
+ margin: 0;
+ }
}
.multiselect--above .multiselect__content-wrapper {
diff --git a/src/styles/tasks.scss b/src/styles/tasks.scss
index 09e5e521..0fa1db1d 100644
--- a/src/styles/tasks.scss
+++ b/src/styles/tasks.scss
@@ -120,4 +120,23 @@
width: 100%;
}
}
+
+ ul.assingees {
+ list-style: none;
+ margin: 0;
+
+ li{
+ padding: 0.5em 0.5em 0;
+
+ a{
+ float: right;
+ color: $red;
+ transition: all $transition;
+
+ &:hover{
+ color: darken($red, 15);
+ }
+ }
+ }
+ }
}
\ No newline at end of file
diff --git a/src/styles/theme.scss b/src/styles/theme.scss
index 4a58d7ed..18b8608a 100644
--- a/src/styles/theme.scss
+++ b/src/styles/theme.scss
@@ -13,13 +13,18 @@
font-size: 0.85rem;
font-weight: bold;
height: 2.648em;
-
box-shadow: 0.3em 0.3em 1em lighten($dark, 75);
+
&.is-hovered,
&:hover {
box-shadow: 0.6em 0.6em 1em lighten($dark, 75);
}
+ &.fullheight{
+ padding-right: 7px;
+ height: 100%;
+ }
+
&.is-active,
&.is-focused,
&:active,
diff --git a/todo.md b/todo.md
index 04caaac8..a67012bb 100644
--- a/todo.md
+++ b/todo.md
@@ -91,7 +91,7 @@
* [ ] Teams with access to a namespace
* [x] Priorities
* [x] Highlight tasks with high priority
-* [ ] Assignees
+* [x] Assignees
* [ ] Labels
* [ ] Timeline/Calendar view -> Dazu tasks die in einem Bestimmten Bereich due sind, macht dann das Frontend
@@ -120,3 +120,4 @@
* [ ] "Performance-Statistik" -> Wie viele Tasks man in bestimmten Zeiträumen so geschafft hat etc
* [ ] Activity Feed, so à la "der und der hat das und das gemacht etc"
* [ ] Attachments for tasks
+* [ ] Search for users at new task assignees only in users who have access to the list