Merge branch 'main' into feature/vue3-modals-with-router-4
continuous-integration/drone/pr Build is failing Details

This commit is contained in:
kolaente 2022-01-18 22:27:32 +01:00
commit 8555ffcd17
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
4 changed files with 44 additions and 12 deletions

View File

@ -38,7 +38,9 @@ const props = defineProps({
},
subscription: {
required: true,
type: Object as PropType<SubscriptionModel>,
validator(value) {
return value instanceof SubscriptionModel || value === null
}
},
entityId: {
required: true,

View File

@ -25,13 +25,13 @@
<template #searchResult="props">
<span
v-if="typeof props.option === 'string'"
class="tag">
class="tag search-result">
<span>{{ props.option }}</span>
</span>
<span
v-else
:style="{'background': props.option.hexColor, 'color': props.option.textColor}"
class="tag">
class="tag search-result">
<span>{{ props.option.title }}</span>
</span>
</template>
@ -146,6 +146,18 @@ export default {
<style lang="scss" scoped>
.tag {
margin: .5rem 0 0 .5rem;
margin: .25rem !important;
}
.tag.search-result {
margin: 0 !important;
}
:deep(.input-wrapper) {
padding: .25rem !important;
}
:deep(input.input) {
padding: 0 .5rem;
}
</style>

View File

@ -179,9 +179,18 @@ export default {
console.debug('Could not add label to task in kanban, task not found', t)
return r
}
// FIXME: direct store manipulation (task)
t.task.labels.push(label)
ctx.commit('kanban/setTaskInBucketByIndex', t, { root: true })
const labels = [...t.task.labels]
labels.push(label)
ctx.commit('kanban/setTaskInBucketByIndex', {
task: {
labels,
...t.task,
},
...t,
}, { root: true })
return r
},
@ -200,15 +209,21 @@ export default {
}
// Remove the label from the list
for (const l in t.task.labels) {
if (t.task.labels[l].id === label.id) {
// FIXME: direct store manipulation (task)
t.task.labels.splice(l, 1)
const labels = [...t.task.labels]
for (const l in labels) {
if (labels[l].id === label.id) {
labels.splice(l, 1)
break
}
}
ctx.commit('kanban/setTaskInBucketByIndex', t, {root: true})
ctx.commit('kanban/setTaskInBucketByIndex', {
task: {
labels,
...t.task,
},
...t,
}, {root: true})
return response
},

View File

@ -601,6 +601,9 @@ export default {
}
},
scrollToHeading() {
if(!this.$refs?.heading?.$el) {
return
}
this.$refs.heading.$el.scrollIntoView({block: 'center'})
},
setActiveFields() {