Show list if the search result for a task belongs to a different list

This commit is contained in:
kolaente 2021-01-23 19:05:26 +01:00
parent 0d64506d73
commit 850e4ecc15
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 21 additions and 6 deletions

View File

@ -35,7 +35,22 @@
:creatable="true"
create-placeholder="Add this as new related task"
@create="createAndRelateTask"
/>
>
<template v-slot:searchResult="props">
<span v-if="typeof props.option !== 'string'" class="search-result">
<span
class="different-list"
v-if="props.option.listId !== listId"
v-tooltip="'This task belongs to a different list.'">
{{ $store.getters['lists/getListById'](props.option.listId) === null ? '' : $store.getters['lists/getListById'](props.option.listId).title }} >
</span>
{{ props.option.title }}
</span>
<span class="search-result" v-else>
{{ props.option }}
</span>
</template>
</multiselect>
</div>
<div class="field has-addons mb-4" key="field-kind">
<div class="control is-expanded">

View File

@ -9,6 +9,11 @@ $remove-icon-width: 24px;
}
}
.different-list {
color: $grey-500;
width: auto;
}
.related-tasks {
.title {
font-size: 1rem;
@ -20,11 +25,6 @@ $remove-icon-width: 24px;
a:not(.remove) {
width: calc(100% - #{$remove-icon-width});
.different-list {
color: $grey-500;
width: auto;
}
}
.task .tasktext {