2019-11-24 13:16:24 +00:00
|
|
|
<template>
|
|
|
|
<div class="task-relations">
|
2021-01-17 17:57:57 +00:00
|
|
|
<x-button
|
2022-02-06 15:58:52 +00:00
|
|
|
v-if="editEnabled && Object.keys(relatedTasks).length > 0"
|
2021-01-16 20:40:07 +00:00
|
|
|
@click="showNewRelationForm = !showNewRelationForm"
|
2022-06-02 21:00:21 +00:00
|
|
|
class="is-pulled-right add-task-relation-button d-print-none"
|
2021-01-17 17:57:57 +00:00
|
|
|
:class="{'is-active': showNewRelationForm}"
|
2021-06-23 23:24:57 +00:00
|
|
|
v-tooltip="$t('task.relation.add')"
|
2022-01-04 18:58:06 +00:00
|
|
|
variant="secondary"
|
2021-01-17 17:57:57 +00:00
|
|
|
icon="plus"
|
2021-01-20 21:26:33 +00:00
|
|
|
:shadow="false"
|
2021-01-17 17:57:57 +00:00
|
|
|
/>
|
2021-01-16 20:40:07 +00:00
|
|
|
<transition-group name="fade">
|
|
|
|
<template v-if="editEnabled && showCreate">
|
|
|
|
<label class="label" key="label">
|
2021-06-23 23:24:57 +00:00
|
|
|
{{ $t('task.relation.new') }}
|
2022-11-12 18:24:02 +00:00
|
|
|
<CustomTransition name="fade">
|
2021-01-16 20:40:07 +00:00
|
|
|
<span class="is-inline-flex" v-if="taskRelationService.loading">
|
|
|
|
<span class="loader is-inline-block mr-2"></span>
|
2021-06-23 23:24:57 +00:00
|
|
|
{{ $t('misc.saving') }}
|
2021-01-16 20:40:07 +00:00
|
|
|
</span>
|
2021-09-08 09:59:46 +00:00
|
|
|
<span class="has-text-success" v-else-if="!taskRelationService.loading && saved">
|
2021-06-23 23:24:57 +00:00
|
|
|
{{ $t('misc.saved') }}
|
2021-01-16 20:40:07 +00:00
|
|
|
</span>
|
2022-11-12 18:24:02 +00:00
|
|
|
</CustomTransition>
|
2021-01-16 20:40:07 +00:00
|
|
|
</label>
|
|
|
|
<div class="field" key="field-search">
|
2022-09-15 10:52:38 +00:00
|
|
|
<Multiselect
|
2021-06-23 23:24:57 +00:00
|
|
|
:placeholder="$t('task.relation.searchPlaceholder')"
|
2021-01-16 20:40:07 +00:00
|
|
|
@search="findTasks"
|
|
|
|
:loading="taskService.loading"
|
2021-11-13 20:27:23 +00:00
|
|
|
:search-results="mappedFoundTasks"
|
2021-01-16 20:40:07 +00:00
|
|
|
label="title"
|
2022-09-15 10:52:38 +00:00
|
|
|
v-model="newTaskRelation.task"
|
2021-01-16 20:40:07 +00:00
|
|
|
:creatable="true"
|
2021-06-23 23:24:57 +00:00
|
|
|
:create-placeholder="$t('task.relation.createPlaceholder')"
|
2021-01-16 20:40:07 +00:00
|
|
|
@create="createAndRelateTask"
|
2021-01-23 18:05:26 +00:00
|
|
|
>
|
2022-09-15 10:52:38 +00:00
|
|
|
<template #searchResult="{option: task}">
|
2022-10-06 20:41:48 +00:00
|
|
|
<span
|
|
|
|
v-if="typeof task !== 'string'"
|
|
|
|
class="search-result"
|
|
|
|
:class="{'is-strikethrough': task.done}"
|
|
|
|
>
|
2021-01-23 18:05:26 +00:00
|
|
|
<span
|
2022-11-13 21:04:57 +00:00
|
|
|
class="different-project"
|
|
|
|
v-if="task.projectId !== projectId"
|
2021-11-13 20:27:23 +00:00
|
|
|
>
|
|
|
|
<span
|
2022-09-15 10:52:38 +00:00
|
|
|
v-if="task.differentNamespace !== null"
|
2021-11-13 20:27:23 +00:00
|
|
|
v-tooltip="$t('task.relation.differentNamespace')">
|
2022-09-15 10:52:38 +00:00
|
|
|
{{ task.differentNamespace }} >
|
2021-11-13 20:27:23 +00:00
|
|
|
</span>
|
|
|
|
<span
|
2022-11-13 21:04:57 +00:00
|
|
|
v-if="task.differentProject !== null"
|
|
|
|
v-tooltip="$t('task.relation.differentProject')">
|
|
|
|
{{ task.differentProject }} >
|
2021-11-13 20:27:23 +00:00
|
|
|
</span>
|
2021-01-23 18:05:26 +00:00
|
|
|
</span>
|
2022-09-15 10:52:38 +00:00
|
|
|
{{ task.title }}
|
2021-01-23 18:05:26 +00:00
|
|
|
</span>
|
|
|
|
<span class="search-result" v-else>
|
2022-09-15 10:52:38 +00:00
|
|
|
{{ task }}
|
2021-01-23 18:05:26 +00:00
|
|
|
</span>
|
|
|
|
</template>
|
2022-09-15 10:52:38 +00:00
|
|
|
</Multiselect>
|
2020-08-11 18:18:59 +00:00
|
|
|
</div>
|
2021-01-16 20:40:07 +00:00
|
|
|
<div class="field has-addons mb-4" key="field-kind">
|
|
|
|
<div class="control is-expanded">
|
|
|
|
<div class="select is-fullwidth has-defaults">
|
2022-09-15 10:52:38 +00:00
|
|
|
<select v-model="newTaskRelation.kind">
|
2021-10-04 19:52:18 +00:00
|
|
|
<option value="unset">{{ $t('task.relation.select') }}</option>
|
2022-09-15 10:52:38 +00:00
|
|
|
<option :key="`option_${rk}`" :value="rk" v-for="rk in RELATION_KINDS">
|
2022-12-16 13:42:58 +00:00
|
|
|
{{ $t(`task.relation.kinds.${rk}`, 1) }}
|
2021-01-16 20:40:07 +00:00
|
|
|
</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="control">
|
2021-06-23 23:24:57 +00:00
|
|
|
<x-button @click="addTaskRelation()">{{ $t('task.relation.add') }}</x-button>
|
2021-01-16 20:40:07 +00:00
|
|
|
</div>
|
2020-08-11 18:18:59 +00:00
|
|
|
</div>
|
2021-01-16 20:40:07 +00:00
|
|
|
</template>
|
|
|
|
</transition-group>
|
2019-11-24 13:16:24 +00:00
|
|
|
|
2021-11-13 20:27:23 +00:00
|
|
|
<div :key="rts.kind" class="related-tasks" v-for="rts in mappedRelatedTasks">
|
|
|
|
<span class="title">{{ rts.title }}</span>
|
|
|
|
<div class="tasks">
|
|
|
|
<div :key="t.id" class="task" v-for="t in rts.tasks">
|
2022-09-07 15:47:07 +00:00
|
|
|
<div class="is-flex is-align-items-center">
|
|
|
|
<Fancycheckbox
|
|
|
|
class="task-done-checkbox"
|
|
|
|
v-model="t.done"
|
|
|
|
@update:model-value="toggleTaskDone(t)"
|
|
|
|
/>
|
|
|
|
<router-link
|
|
|
|
:to="{ name: route.name as string, params: { id: t.id } }"
|
|
|
|
:class="{ 'is-strikethrough': t.done}"
|
2021-11-13 20:27:23 +00:00
|
|
|
>
|
|
|
|
<span
|
2022-11-13 21:04:57 +00:00
|
|
|
class="different-project"
|
|
|
|
v-if="t.projectId !== projectId"
|
2022-09-07 15:47:07 +00:00
|
|
|
>
|
|
|
|
<span
|
|
|
|
v-if="t.differentNamespace !== null"
|
|
|
|
v-tooltip="$t('task.relation.differentNamespace')">
|
|
|
|
{{ t.differentNamespace }} >
|
|
|
|
</span>
|
|
|
|
<span
|
2022-11-13 21:04:57 +00:00
|
|
|
v-if="t.differentProject !== null"
|
|
|
|
v-tooltip="$t('task.relation.differentProject')">
|
|
|
|
{{ t.differentProject }} >
|
2022-09-07 15:47:07 +00:00
|
|
|
</span>
|
2021-11-13 20:27:23 +00:00
|
|
|
</span>
|
2022-09-07 15:47:07 +00:00
|
|
|
{{ t.title }}
|
|
|
|
</router-link>
|
|
|
|
</div>
|
2022-05-10 23:14:38 +00:00
|
|
|
<BaseButton
|
|
|
|
v-if="editEnabled"
|
2022-09-15 10:52:38 +00:00
|
|
|
@click="setRelationToDelete({
|
|
|
|
relationKind: rts.kind,
|
|
|
|
otherTaskId: t.id
|
|
|
|
})"
|
2021-11-13 20:27:23 +00:00
|
|
|
class="remove"
|
2022-05-10 23:14:38 +00:00
|
|
|
>
|
2021-11-13 20:27:23 +00:00
|
|
|
<icon icon="trash-alt"/>
|
2022-05-10 23:14:38 +00:00
|
|
|
</BaseButton>
|
2019-11-24 13:16:24 +00:00
|
|
|
</div>
|
2021-11-13 20:27:23 +00:00
|
|
|
</div>
|
2019-11-24 13:16:24 +00:00
|
|
|
</div>
|
2020-09-05 20:35:52 +00:00
|
|
|
<p class="none" v-if="showNoRelationsNotice && Object.keys(relatedTasks).length === 0">
|
2021-06-23 23:24:57 +00:00
|
|
|
{{ $t('task.relation.noneYet') }}
|
2020-03-04 20:29:40 +00:00
|
|
|
</p>
|
2019-11-24 13:16:24 +00:00
|
|
|
|
2022-09-15 10:52:38 +00:00
|
|
|
<modal
|
2022-11-12 18:24:02 +00:00
|
|
|
:enabled="relationToDelete !== undefined"
|
2022-09-15 10:52:38 +00:00
|
|
|
@close="relationToDelete = undefined"
|
|
|
|
@submit="removeTaskRelation()"
|
|
|
|
>
|
|
|
|
<template #header><span>{{ $t('task.relation.delete') }}</span></template>
|
|
|
|
|
|
|
|
<template #text>
|
|
|
|
<p>
|
|
|
|
{{ $t('task.relation.deleteText1') }}<br/>
|
|
|
|
<strong class="has-text-white">{{ $t('misc.cannotBeUndone') }}</strong>
|
|
|
|
</p>
|
|
|
|
</template>
|
|
|
|
</modal>
|
2019-11-24 13:16:24 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2022-09-15 10:52:38 +00:00
|
|
|
<script setup lang="ts">
|
|
|
|
import {ref, reactive, shallowReactive, watch, computed, type PropType} from 'vue'
|
|
|
|
import {useI18n} from 'vue-i18n'
|
|
|
|
import {useRoute} from 'vue-router'
|
|
|
|
|
|
|
|
import TaskService from '@/services/task'
|
|
|
|
import TaskModel from '@/models/task'
|
|
|
|
import type {ITask} from '@/modelTypes/ITask'
|
|
|
|
import type {ITaskRelation} from '@/modelTypes/ITaskRelation'
|
|
|
|
import {RELATION_KINDS, RELATION_KIND, type IRelationKind} from '@/types/IRelationKind'
|
2022-02-15 12:07:59 +00:00
|
|
|
|
2022-09-15 10:52:38 +00:00
|
|
|
import TaskRelationService from '@/services/taskRelation'
|
2022-08-04 18:57:43 +00:00
|
|
|
import TaskRelationModel from '@/models/taskRelation'
|
2019-11-24 13:16:24 +00:00
|
|
|
|
2022-11-12 18:24:02 +00:00
|
|
|
import CustomTransition from '@/components/misc/CustomTransition.vue'
|
2022-05-10 23:14:38 +00:00
|
|
|
import BaseButton from '@/components/base/BaseButton.vue'
|
2021-07-25 13:27:15 +00:00
|
|
|
import Multiselect from '@/components/input/multiselect.vue'
|
2022-09-07 15:47:07 +00:00
|
|
|
import Fancycheckbox from '@/components/input/fancycheckbox.vue'
|
|
|
|
|
2022-09-02 09:15:29 +00:00
|
|
|
import {useNamespaceStore} from '@/stores/namespaces'
|
|
|
|
|
2022-09-07 15:47:07 +00:00
|
|
|
import {error, success} from '@/message'
|
2022-09-23 10:55:53 +00:00
|
|
|
import {useTaskStore} from '@/stores/tasks'
|
2019-11-24 13:16:24 +00:00
|
|
|
|
2022-09-15 10:52:38 +00:00
|
|
|
const props = defineProps({
|
|
|
|
taskId: {
|
|
|
|
type: Number,
|
|
|
|
required: true,
|
2020-09-05 20:35:52 +00:00
|
|
|
},
|
2022-09-15 10:52:38 +00:00
|
|
|
initialRelatedTasks: {
|
|
|
|
type: Object as PropType<ITask['relatedTasks']>,
|
|
|
|
default: () => ({}),
|
2020-09-05 20:35:52 +00:00
|
|
|
},
|
2022-09-15 10:52:38 +00:00
|
|
|
showNoRelationsNotice: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false,
|
2020-09-05 20:35:52 +00:00
|
|
|
},
|
2022-11-13 21:04:57 +00:00
|
|
|
projectId: {
|
2022-09-15 10:52:38 +00:00
|
|
|
type: Number,
|
|
|
|
default: 0,
|
2021-01-16 20:40:07 +00:00
|
|
|
},
|
2022-09-15 10:52:38 +00:00
|
|
|
editEnabled: {
|
|
|
|
default: true,
|
2020-09-05 20:35:52 +00:00
|
|
|
},
|
2022-02-15 12:07:59 +00:00
|
|
|
})
|
2022-09-15 10:52:38 +00:00
|
|
|
|
2022-09-23 10:55:53 +00:00
|
|
|
const taskStore = useTaskStore()
|
2022-09-02 09:15:29 +00:00
|
|
|
const namespaceStore = useNamespaceStore()
|
2022-09-15 10:52:38 +00:00
|
|
|
const route = useRoute()
|
|
|
|
const {t} = useI18n({useScope: 'global'})
|
|
|
|
|
|
|
|
type TaskRelation = {kind: IRelationKind, task: ITask}
|
|
|
|
|
|
|
|
const taskService = shallowReactive(new TaskService())
|
|
|
|
|
|
|
|
const relatedTasks = ref<ITask['relatedTasks']>({})
|
|
|
|
|
|
|
|
const newTaskRelation: TaskRelation = reactive({
|
|
|
|
kind: RELATION_KIND.RELATED,
|
|
|
|
task: new TaskModel(),
|
|
|
|
})
|
|
|
|
|
|
|
|
watch(
|
|
|
|
() => props.initialRelatedTasks,
|
|
|
|
(value) => {
|
|
|
|
relatedTasks.value = value
|
|
|
|
},
|
|
|
|
{immediate: true},
|
|
|
|
)
|
|
|
|
|
|
|
|
const showNewRelationForm = ref(false)
|
|
|
|
const showCreate = computed(() => Object.keys(relatedTasks.value).length === 0 || showNewRelationForm.value)
|
|
|
|
|
|
|
|
const query = ref('')
|
|
|
|
const foundTasks = ref<ITask[]>([])
|
|
|
|
|
|
|
|
async function findTasks(newQuery: string) {
|
|
|
|
query.value = newQuery
|
|
|
|
foundTasks.value = await taskService.getAll({}, {s: newQuery})
|
|
|
|
}
|
|
|
|
|
2022-11-13 21:04:57 +00:00
|
|
|
const getProjectAndNamespaceById = (projectId: number) => namespaceStore.getProjectAndNamespaceById(projectId, true)
|
2022-09-15 10:52:38 +00:00
|
|
|
|
2022-11-13 21:04:57 +00:00
|
|
|
const namespace = computed(() => getProjectAndNamespaceById(props.projectId)?.namespace)
|
2022-09-15 10:52:38 +00:00
|
|
|
|
|
|
|
function mapRelatedTasks(tasks: ITask[]) {
|
|
|
|
return tasks.map(task => {
|
|
|
|
// by doing this here once we can save a lot of duplicate calls in the template
|
|
|
|
const {
|
2022-11-13 21:04:57 +00:00
|
|
|
project,
|
2022-09-15 10:52:38 +00:00
|
|
|
namespace: taskNamespace,
|
2022-11-13 21:04:57 +00:00
|
|
|
} = getProjectAndNamespaceById(task.projectId) || {project: null, namespace: null}
|
2022-09-15 10:52:38 +00:00
|
|
|
|
|
|
|
return {
|
|
|
|
...task,
|
|
|
|
differentNamespace:
|
|
|
|
(taskNamespace !== null &&
|
|
|
|
taskNamespace.id !== namespace.value.id &&
|
|
|
|
taskNamespace?.title) || null,
|
2022-11-13 21:04:57 +00:00
|
|
|
differentProject:
|
|
|
|
(project !== null &&
|
|
|
|
task.projectId !== props.projectId &&
|
|
|
|
project?.title) || null,
|
2022-09-15 10:52:38 +00:00
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
const mapRelationKindsTitleGetter = computed(() => ({
|
|
|
|
'subtask': (count: number) => t('task.relation.kinds.subtask', count),
|
|
|
|
'parenttask': (count: number) => t('task.relation.kinds.parenttask', count),
|
|
|
|
'related': (count: number) => t('task.relation.kinds.related', count),
|
|
|
|
'duplicateof': (count: number) => t('task.relation.kinds.duplicateof', count),
|
|
|
|
'duplicates': (count: number) => t('task.relation.kinds.duplicates', count),
|
|
|
|
'blocking': (count: number) => t('task.relation.kinds.blocking', count),
|
|
|
|
'blocked': (count: number) => t('task.relation.kinds.blocked', count),
|
|
|
|
'precedes': (count: number) => t('task.relation.kinds.precedes', count),
|
|
|
|
'follows': (count: number) => t('task.relation.kinds.follows', count),
|
|
|
|
'copiedfrom': (count: number) => t('task.relation.kinds.copiedfrom', count),
|
|
|
|
'copiedto': (count: number) => t('task.relation.kinds.copiedto', count),
|
|
|
|
}))
|
|
|
|
|
|
|
|
const mappedRelatedTasks = computed(() => Object.entries(relatedTasks.value).map(
|
|
|
|
([kind, tasks]) => ({
|
|
|
|
title: mapRelationKindsTitleGetter.value[kind as IRelationKind](tasks.length),
|
|
|
|
tasks: mapRelatedTasks(tasks),
|
|
|
|
kind: kind as IRelationKind,
|
|
|
|
}),
|
|
|
|
))
|
|
|
|
const mappedFoundTasks = computed(() => mapRelatedTasks(foundTasks.value.filter(t => t.id !== props.taskId)))
|
|
|
|
|
|
|
|
const taskRelationService = shallowReactive(new TaskRelationService())
|
|
|
|
const saved = ref(false)
|
|
|
|
|
|
|
|
async function addTaskRelation() {
|
|
|
|
if (newTaskRelation.task.id === 0 && query.value !== '') {
|
|
|
|
return createAndRelateTask(query.value)
|
|
|
|
}
|
|
|
|
|
|
|
|
if (newTaskRelation.task.id === 0) {
|
|
|
|
error({message: t('task.relation.taskRequired')})
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
await taskRelationService.create(new TaskRelationModel({
|
|
|
|
taskId: props.taskId,
|
|
|
|
otherTaskId: newTaskRelation.task.id,
|
|
|
|
relationKind: newTaskRelation.kind,
|
|
|
|
}))
|
|
|
|
relatedTasks.value[newTaskRelation.kind] = [
|
|
|
|
...(relatedTasks.value[newTaskRelation.kind] || []),
|
|
|
|
newTaskRelation.task,
|
|
|
|
]
|
|
|
|
newTaskRelation.task = new TaskModel()
|
|
|
|
saved.value = true
|
|
|
|
showNewRelationForm.value = false
|
|
|
|
setTimeout(() => {
|
|
|
|
saved.value = false
|
|
|
|
}, 2000)
|
|
|
|
}
|
|
|
|
|
|
|
|
const relationToDelete = ref<Partial<ITaskRelation>>()
|
|
|
|
|
|
|
|
function setRelationToDelete(relation: Partial<ITaskRelation>) {
|
|
|
|
relationToDelete.value = relation
|
|
|
|
}
|
|
|
|
|
|
|
|
async function removeTaskRelation() {
|
|
|
|
const relation = relationToDelete.value
|
|
|
|
if (!relation || !relation.relationKind || !relation.otherTaskId) {
|
|
|
|
relationToDelete.value = undefined
|
|
|
|
return
|
|
|
|
}
|
|
|
|
try {
|
|
|
|
const relationKind = relation.relationKind
|
|
|
|
await taskRelationService.delete(new TaskRelationModel({
|
|
|
|
relationKind,
|
|
|
|
taskId: props.taskId,
|
|
|
|
otherTaskId: relation.otherTaskId,
|
|
|
|
}))
|
|
|
|
|
|
|
|
relatedTasks.value[relationKind] = relatedTasks.value[relationKind]?.filter(
|
|
|
|
({id}) => id !== relation.otherTaskId,
|
|
|
|
)
|
|
|
|
|
|
|
|
saved.value = true
|
|
|
|
setTimeout(() => {
|
|
|
|
saved.value = false
|
|
|
|
}, 2000)
|
|
|
|
} finally {
|
|
|
|
relationToDelete.value = undefined
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
async function createAndRelateTask(title: string) {
|
2022-11-13 21:04:57 +00:00
|
|
|
const newTask = await taskService.create(new TaskModel({title, projectId: props.projectId}))
|
2022-09-15 10:52:38 +00:00
|
|
|
newTaskRelation.task = newTask
|
|
|
|
await addTaskRelation()
|
|
|
|
}
|
2022-09-07 15:47:07 +00:00
|
|
|
|
|
|
|
async function toggleTaskDone(task: ITask) {
|
2022-09-23 10:55:53 +00:00
|
|
|
await taskStore.update(task)
|
2022-09-07 15:47:07 +00:00
|
|
|
|
2022-11-13 21:04:57 +00:00
|
|
|
// Find the task in the project and update it so that it is correctly strike through
|
2022-09-07 15:47:07 +00:00
|
|
|
Object.entries(relatedTasks.value).some(([kind, tasks]) => {
|
2022-10-04 10:48:23 +00:00
|
|
|
return (tasks as ITask[]).some((t, key) => {
|
2022-09-07 15:47:07 +00:00
|
|
|
const found = t.id === task.id
|
|
|
|
if (found) {
|
|
|
|
relatedTasks.value[kind as IRelationKind]![key] = task
|
|
|
|
}
|
|
|
|
return found
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
success({message: t('task.detail.updateSuccess')})
|
|
|
|
}
|
2019-11-24 13:16:24 +00:00
|
|
|
</script>
|
2021-01-16 20:40:07 +00:00
|
|
|
|
2021-10-18 12:22:40 +00:00
|
|
|
<style lang="scss" scoped>
|
2021-01-16 20:40:07 +00:00
|
|
|
.add-task-relation-button {
|
|
|
|
margin-top: -3rem;
|
|
|
|
|
|
|
|
svg {
|
|
|
|
transition: transform $transition;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.is-active svg {
|
|
|
|
transform: rotate(45deg);
|
|
|
|
}
|
|
|
|
}
|
2021-10-18 12:22:40 +00:00
|
|
|
|
2022-11-13 21:04:57 +00:00
|
|
|
.different-project {
|
2021-11-22 21:12:54 +00:00
|
|
|
color: var(--grey-500);
|
2021-11-13 20:27:23 +00:00
|
|
|
width: auto;
|
|
|
|
}
|
2021-10-18 12:22:40 +00:00
|
|
|
|
2021-11-13 20:27:23 +00:00
|
|
|
.title {
|
|
|
|
font-size: 1rem;
|
|
|
|
margin: 0;
|
|
|
|
}
|
2021-10-18 12:22:40 +00:00
|
|
|
|
2021-11-16 21:44:07 +00:00
|
|
|
.tasks {
|
|
|
|
padding: .5rem;
|
|
|
|
}
|
|
|
|
|
2021-11-13 20:27:23 +00:00
|
|
|
.task {
|
|
|
|
display: flex;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
justify-content: space-between;
|
|
|
|
padding: .75rem;
|
|
|
|
transition: background-color $transition;
|
|
|
|
border-radius: $radius;
|
2021-10-18 12:22:47 +00:00
|
|
|
|
2021-11-13 20:27:23 +00:00
|
|
|
&:hover {
|
2021-11-22 21:12:54 +00:00
|
|
|
background-color: var(--grey-200);
|
2021-11-13 20:27:23 +00:00
|
|
|
}
|
2021-10-18 12:22:47 +00:00
|
|
|
|
2021-11-13 20:27:23 +00:00
|
|
|
a {
|
2021-11-22 21:12:54 +00:00
|
|
|
color: var(--text);
|
2021-11-13 20:27:23 +00:00
|
|
|
transition: color ease $transition-duration;
|
2021-10-18 12:22:47 +00:00
|
|
|
|
2021-11-13 20:27:23 +00:00
|
|
|
&:hover {
|
2021-11-22 21:12:54 +00:00
|
|
|
color: var(--grey-900);
|
2021-10-18 12:22:47 +00:00
|
|
|
}
|
2021-11-13 20:27:23 +00:00
|
|
|
}
|
2021-10-18 12:22:47 +00:00
|
|
|
|
2021-11-13 20:27:23 +00:00
|
|
|
}
|
|
|
|
|
2022-09-15 10:52:38 +00:00
|
|
|
.remove {
|
|
|
|
text-align: center;
|
|
|
|
color: var(--danger);
|
|
|
|
opacity: 0;
|
|
|
|
transition: opacity $transition;
|
|
|
|
}
|
|
|
|
|
|
|
|
.task:hover .remove {
|
2021-11-13 20:27:23 +00:00
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
.none {
|
|
|
|
font-style: italic;
|
|
|
|
text-align: center;
|
|
|
|
}
|
2021-10-18 12:22:40 +00:00
|
|
|
|
2021-11-13 20:27:23 +00:00
|
|
|
:deep(.multiselect .search-results button) {
|
|
|
|
padding: 0.5rem;
|
2021-10-18 12:22:40 +00:00
|
|
|
}
|
2021-11-08 14:46:39 +00:00
|
|
|
|
2022-09-07 15:47:07 +00:00
|
|
|
// FIXME: The height of the actual checkbox in the <Fancycheckbox/> component is too much resulting in a
|
|
|
|
// weired positioning of the checkbox. Setting the height here is a workaround until we fix the styling
|
|
|
|
// of the component.
|
|
|
|
.task-done-checkbox {
|
|
|
|
padding: 0;
|
|
|
|
height: 18px; // The exact height of the checkbox in the container
|
|
|
|
}
|
2021-10-18 12:22:40 +00:00
|
|
|
</style>
|