Merge branch 'main' into feature/redirect-to-specific-view
# Conflicts: # src/components/sharing/linkSharing.vue
This commit is contained in:
@ -85,7 +85,7 @@ import DatemathHelp from '@/components/date/datemathHelp.vue'
|
||||
const store = useStore()
|
||||
const {t} = useI18n({useScope: 'global'})
|
||||
|
||||
const emit = defineEmits(['dateChanged', 'update:modelValue'])
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
required: false,
|
||||
@ -127,7 +127,6 @@ function emitChanged() {
|
||||
dateFrom: from.value === '' ? null : from.value,
|
||||
dateTo: to.value === '' ? null : to.value,
|
||||
}
|
||||
emit('dateChanged', args)
|
||||
emit('update:modelValue', args)
|
||||
}
|
||||
|
||||
|
@ -156,8 +156,8 @@ import {calculateItemPosition} from '@/helpers/calculateItemPosition'
|
||||
import {getNamespaceTitle} from '@/helpers/getNamespaceTitle'
|
||||
import {getListTitle} from '@/helpers/getListTitle'
|
||||
import {useEventListener} from '@vueuse/core'
|
||||
import type { IList } from '@/models/list'
|
||||
import type { INamespace } from '@/models/namespace'
|
||||
import type {IList} from '@/modelTypes/IList'
|
||||
import type {INamespace} from '@/modelTypes/INamespace'
|
||||
|
||||
const drag = ref(false)
|
||||
const dragOptions = {
|
||||
|
@ -68,7 +68,7 @@ export default defineComponent({
|
||||
default: 'top',
|
||||
},
|
||||
},
|
||||
emits: ['update:modelValue', 'change'],
|
||||
emits: ['update:modelValue'],
|
||||
watch: {
|
||||
modelValue: {
|
||||
handler(modelValue) {
|
||||
@ -98,7 +98,6 @@ export default defineComponent({
|
||||
|
||||
this.lastChangeTimeout = setTimeout(() => {
|
||||
this.$emit('update:modelValue', this.color)
|
||||
this.$emit('change')
|
||||
}, 500)
|
||||
},
|
||||
reset() {
|
||||
|
@ -131,7 +131,7 @@ export default defineComponent({
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
emits: ['update:modelValue', 'change', 'close', 'close-on-change'],
|
||||
emits: ['update:modelValue', 'close', 'close-on-change'],
|
||||
mounted() {
|
||||
document.addEventListener('click', this.hideDatePopup)
|
||||
},
|
||||
@ -186,7 +186,6 @@ export default defineComponent({
|
||||
updateData() {
|
||||
this.changed = true
|
||||
this.$emit('update:modelValue', this.date)
|
||||
this.$emit('change', this.date)
|
||||
},
|
||||
toggleDatePopup() {
|
||||
if (this.disabled) {
|
||||
|
@ -136,7 +136,7 @@ export default defineComponent({
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
emits: ['update:modelValue', 'change'],
|
||||
emits: ['update:modelValue'],
|
||||
computed: {
|
||||
showPreviewText() {
|
||||
return this.isPreviewActive && this.text === '' && this.emptyText !== ''
|
||||
@ -212,7 +212,6 @@ export default defineComponent({
|
||||
|
||||
this.changeTimeout = setTimeout(() => {
|
||||
this.$emit('update:modelValue', this.text)
|
||||
this.$emit('change', this.text)
|
||||
}, timeout)
|
||||
},
|
||||
replaceAt(str, index, replacement) {
|
||||
|
@ -60,8 +60,8 @@
|
||||
:is-button="false"
|
||||
entity="list"
|
||||
:entity-id="list.id"
|
||||
:subscription="list.subscription"
|
||||
@change="sub => subscription = sub"
|
||||
:model-value="list.subscription"
|
||||
@update:model-value="sub => subscription = sub"
|
||||
type="dropdown"
|
||||
/>
|
||||
<dropdown-item
|
||||
@ -83,8 +83,8 @@ import {getSavedFilterIdFromListId} from '@/helpers/savedFilter'
|
||||
import Dropdown from '@/components/misc/dropdown.vue'
|
||||
import DropdownItem from '@/components/misc/dropdown-item.vue'
|
||||
import TaskSubscription from '@/components/misc/subscription.vue'
|
||||
import type {IList} from '@/models/list'
|
||||
import type { ISubscription } from '@/models/subscription'
|
||||
import type {IList} from '@/modelTypes/IList'
|
||||
import type {ISubscription} from '@/modelTypes/ISubscription'
|
||||
|
||||
const props = defineProps({
|
||||
list: {
|
||||
|
@ -38,7 +38,7 @@
|
||||
<priority-select
|
||||
:disabled="!filters.usePriority || undefined"
|
||||
v-model.number="filters.priority"
|
||||
@change="setPriority"
|
||||
@update:model-value="setPriority"
|
||||
/>
|
||||
<fancycheckbox
|
||||
v-model="filters.usePriority"
|
||||
@ -53,7 +53,7 @@
|
||||
<div class="control single-value-control">
|
||||
<percent-done-select
|
||||
v-model.number="filters.percentDone"
|
||||
@change="setPercentDoneFilter"
|
||||
@update:model-value="setPercentDoneFilter"
|
||||
:disabled="!filters.usePercentDone || undefined"
|
||||
/>
|
||||
<fancycheckbox
|
||||
@ -68,8 +68,9 @@
|
||||
<label class="label">{{ $t('task.attributes.dueDate') }}</label>
|
||||
<div class="control">
|
||||
<datepicker-with-range
|
||||
@dateChanged="values => setDateFilter('due_date', values)"
|
||||
v-model="filters.dueDate">
|
||||
v-model="filters.dueDate"
|
||||
@update:model-value="values => setDateFilter('due_date', values)"
|
||||
>
|
||||
<template #trigger="{toggle, buttonText}">
|
||||
<x-button @click.prevent.stop="toggle()" variant="secondary" :shadow="false" class="mb-2">
|
||||
{{ buttonText }}
|
||||
@ -82,8 +83,9 @@
|
||||
<label class="label">{{ $t('task.attributes.startDate') }}</label>
|
||||
<div class="control">
|
||||
<datepicker-with-range
|
||||
@dateChanged="values => setDateFilter('start_date', values)"
|
||||
v-model="filters.startDate">
|
||||
v-model="filters.startDate"
|
||||
@update:model-value="values => setDateFilter('start_date', values)"
|
||||
>
|
||||
<template #trigger="{toggle, buttonText}">
|
||||
<x-button @click.prevent.stop="toggle()" variant="secondary" :shadow="false" class="mb-2">
|
||||
{{ buttonText }}
|
||||
@ -96,8 +98,9 @@
|
||||
<label class="label">{{ $t('task.attributes.endDate') }}</label>
|
||||
<div class="control">
|
||||
<datepicker-with-range
|
||||
@dateChanged="values => setDateFilter('end_date', values)"
|
||||
v-model="filters.endDate">
|
||||
v-model="filters.endDate"
|
||||
@update:model-value="values => setDateFilter('end_date', values)"
|
||||
>
|
||||
<template #trigger="{toggle, buttonText}">
|
||||
<x-button @click.prevent.stop="toggle()" variant="secondary" :shadow="false" class="mb-2">
|
||||
{{ buttonText }}
|
||||
@ -110,8 +113,9 @@
|
||||
<label class="label">{{ $t('task.attributes.reminders') }}</label>
|
||||
<div class="control">
|
||||
<datepicker-with-range
|
||||
@dateChanged="values => setDateFilter('reminders', values)"
|
||||
v-model="filters.reminders">
|
||||
v-model="filters.reminders"
|
||||
@update:model-value="values => setDateFilter('reminders', values)"
|
||||
>
|
||||
<template #trigger="{toggle, buttonText}">
|
||||
<x-button @click.prevent.stop="toggle()" variant="secondary" :shadow="false" class="mb-2">
|
||||
{{ buttonText }}
|
||||
@ -141,7 +145,7 @@
|
||||
<div class="field">
|
||||
<label class="label">{{ $t('task.attributes.labels') }}</label>
|
||||
<div class="control labels-list">
|
||||
<edit-labels v-model="labels" @change="changeLabelFilter"/>
|
||||
<edit-labels v-model="labels" @update:model-value="changeLabelFilter"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -278,7 +282,7 @@ export default defineComponent({
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
emits: ['update:modelValue', 'change'],
|
||||
emits: ['update:modelValue'],
|
||||
watch: {
|
||||
modelValue: {
|
||||
handler(value) {
|
||||
@ -312,7 +316,6 @@ export default defineComponent({
|
||||
const params = {...this.params}
|
||||
params.filter_value = params.filter_value.map(v => v instanceof Date ? v.toISOString() : v)
|
||||
this.$emit('update:modelValue', params)
|
||||
this.$emit('change', params)
|
||||
},
|
||||
prepareFilters() {
|
||||
this.prepareDone()
|
||||
|
@ -45,7 +45,7 @@ import {getBlobFromBlurHash} from '@/helpers/getBlobFromBlurHash'
|
||||
import {colorIsDark} from '@/helpers/color/colorIsDark'
|
||||
|
||||
import BaseButton from '@/components/base/BaseButton.vue'
|
||||
import type { IList } from '@/models/list'
|
||||
import type {IList} from '@/modelTypes/IList'
|
||||
|
||||
const background = ref<string | null>(null)
|
||||
const backgroundLoading = ref(false)
|
||||
|
@ -5,7 +5,7 @@
|
||||
:icon="iconName"
|
||||
v-tooltip="tooltipText"
|
||||
@click="changeSubscription"
|
||||
:disabled="disabled || undefined"
|
||||
:disabled="disabled"
|
||||
>
|
||||
{{ buttonText }}
|
||||
</x-button>
|
||||
@ -23,6 +23,7 @@
|
||||
v-tooltip="tooltipText"
|
||||
@click="changeSubscription"
|
||||
:class="{'is-disabled': disabled}"
|
||||
:disabled="disabled"
|
||||
>
|
||||
<span class="icon">
|
||||
<icon :icon="iconName"/>
|
||||
@ -39,7 +40,8 @@ import BaseButton from '@/components/base/BaseButton.vue'
|
||||
import DropdownItem from '@/components/misc/dropdown-item.vue'
|
||||
|
||||
import SubscriptionService from '@/services/subscription'
|
||||
import SubscriptionModel, { type ISubscription } from '@/models/subscription'
|
||||
import SubscriptionModel from '@/models/subscription'
|
||||
import type {ISubscription} from '@/modelTypes/ISubscription'
|
||||
|
||||
import {success} from '@/message'
|
||||
|
||||
@ -50,7 +52,7 @@ const props = defineProps({
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
subscription: {
|
||||
modelValue: {
|
||||
type: Object as PropType<ISubscription>,
|
||||
default: null,
|
||||
},
|
||||
@ -60,9 +62,9 @@ const props = defineProps({
|
||||
},
|
||||
})
|
||||
|
||||
const subscriptionEntity = computed<string | null>(() => props.subscription?.entity ?? null)
|
||||
const subscriptionEntity = computed<string | null>(() => props.modelValue?.entity ?? null)
|
||||
|
||||
const emit = defineEmits(['change'])
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
|
||||
const subscriptionService = shallowRef(new SubscriptionService())
|
||||
|
||||
@ -75,27 +77,21 @@ const tooltipText = computed(() => {
|
||||
})
|
||||
}
|
||||
|
||||
return props.subscription !== null ?
|
||||
return props.modelValue !== null ?
|
||||
t('task.subscription.subscribed', {entity: props.entity}) :
|
||||
t('task.subscription.notSubscribed', {entity: props.entity})
|
||||
})
|
||||
|
||||
const buttonText = computed(() => props.subscription !== null ? t('task.subscription.unsubscribe') : t('task.subscription.subscribe'))
|
||||
const iconName = computed(() => props.subscription !== null ? ['far', 'bell-slash'] : 'bell')
|
||||
const disabled = computed(() => {
|
||||
if (props.subscription === null) {
|
||||
return false
|
||||
}
|
||||
|
||||
return subscriptionEntity.value !== props.entity
|
||||
})
|
||||
const buttonText = computed(() => props.modelValue ? t('task.subscription.unsubscribe') : t('task.subscription.subscribe'))
|
||||
const iconName = computed(() => props.modelValue ? ['far', 'bell-slash'] : 'bell')
|
||||
const disabled = computed(() => props.modelValue && subscriptionEntity.value !== props.entity)
|
||||
|
||||
function changeSubscription() {
|
||||
if (disabled.value) {
|
||||
return
|
||||
}
|
||||
|
||||
if (props.subscription === null) {
|
||||
if (props.modelValue === null) {
|
||||
subscribe()
|
||||
} else {
|
||||
unsubscribe()
|
||||
@ -108,7 +104,7 @@ async function subscribe() {
|
||||
entityId: props.entityId,
|
||||
})
|
||||
await subscriptionService.value.create(subscription)
|
||||
emit('change', subscription)
|
||||
emit('update:modelValue', subscription)
|
||||
success({message: t('task.subscription.subscribeSuccess', {entity: props.entity})})
|
||||
}
|
||||
|
||||
@ -118,7 +114,7 @@ async function unsubscribe() {
|
||||
entityId: props.entityId,
|
||||
})
|
||||
await subscriptionService.value.delete(subscription)
|
||||
emit('change', null)
|
||||
emit('update:modelValue', null)
|
||||
success({message: t('task.subscription.unsubscribeSuccess', {entity: props.entity})})
|
||||
}
|
||||
</script>
|
||||
|
@ -34,12 +34,13 @@
|
||||
{{ $t('menu.archive') }}
|
||||
</dropdown-item>
|
||||
<task-subscription
|
||||
v-if="subscription"
|
||||
class="has-no-shadow"
|
||||
:is-button="false"
|
||||
entity="namespace"
|
||||
:entity-id="namespace.id"
|
||||
:subscription="subscription"
|
||||
@change="sub => subscription = sub"
|
||||
:model-value="subscription"
|
||||
@update:model-value="sub => subscription = sub"
|
||||
type="dropdown"
|
||||
/>
|
||||
<dropdown-item
|
||||
@ -59,7 +60,8 @@ import {ref, onMounted, type PropType} from 'vue'
|
||||
import Dropdown from '@/components/misc/dropdown.vue'
|
||||
import DropdownItem from '@/components/misc/dropdown-item.vue'
|
||||
import TaskSubscription from '@/components/misc/subscription.vue'
|
||||
import type { INamespace } from '@/models/namespace'
|
||||
import type {INamespace} from '@/modelTypes/INamespace'
|
||||
import type {ISubscription} from '@/modelTypes/ISubscription'
|
||||
|
||||
const props = defineProps({
|
||||
namespace: {
|
||||
@ -68,7 +70,7 @@ const props = defineProps({
|
||||
},
|
||||
})
|
||||
|
||||
const subscription = ref(null)
|
||||
const subscription = ref<ISubscription | null>(null)
|
||||
onMounted(() => {
|
||||
subscription.value = props.namespace.subscription
|
||||
})
|
||||
|
@ -196,13 +196,14 @@ import {useI18n} from 'vue-i18n'
|
||||
|
||||
import {RIGHTS} from '@/constants/rights'
|
||||
import LinkShareModel from '@/models/linkShare'
|
||||
|
||||
import type {ILinkShare} from '@/modelTypes/ILinkShare'
|
||||
import type {IList} from '@/modelTypes/IList'
|
||||
|
||||
import LinkShareService from '@/services/linkShare'
|
||||
|
||||
import {useCopyToClipboard} from '@/composables/useCopyToClipboard'
|
||||
import {success} from '@/message'
|
||||
import type {IList} from '@/modelTypes/IList'
|
||||
import type {ListView} from '@/types/ListView'
|
||||
import {LIST_VIEWS} from '@/types/ListView'
|
||||
|
||||
|
@ -143,22 +143,29 @@ import {useStore} from '@/store'
|
||||
import {useI18n} from 'vue-i18n'
|
||||
|
||||
import UserNamespaceService from '@/services/userNamespace'
|
||||
import UserNamespaceModel, { type IUserNamespace } from '@/models/userNamespace'
|
||||
import UserNamespaceModel from '@/models/userNamespace'
|
||||
import type {IUserNamespace} from '@/modelTypes/IUserNamespace'
|
||||
|
||||
import UserListService from '@/services/userList'
|
||||
import UserListModel, { type IUserList } from '@/models/userList'
|
||||
import UserListModel from '@/models/userList'
|
||||
import type {IUserList} from '@/modelTypes/IUserList'
|
||||
|
||||
import UserService from '@/services/user'
|
||||
import UserModel, { type IUser } from '@/models/user'
|
||||
import UserModel from '@/models/user'
|
||||
import type {IUser} from '@/modelTypes/IUser'
|
||||
|
||||
import TeamNamespaceService from '@/services/teamNamespace'
|
||||
import TeamNamespaceModel, { type ITeamNamespace } from '@/models/teamNamespace'
|
||||
import TeamNamespaceModel from '@/models/teamNamespace'
|
||||
import type { ITeamNamespace } from '@/modelTypes/ITeamNamespace'
|
||||
|
||||
import TeamListService from '@/services/teamList'
|
||||
import TeamListModel, { type ITeamList } from '@/models/teamList'
|
||||
import TeamListModel from '@/models/teamList'
|
||||
import type { ITeamList } from '@/modelTypes/ITeamList'
|
||||
|
||||
import TeamService from '@/services/team'
|
||||
import TeamModel, { type ITeam } from '@/models/team'
|
||||
import TeamModel from '@/models/team'
|
||||
import type {ITeam} from '@/modelTypes/ITeam'
|
||||
|
||||
|
||||
import {RIGHTS} from '@/constants/rights'
|
||||
import Multiselect from '@/components/input/multiselect.vue'
|
||||
|
@ -36,8 +36,8 @@
|
||||
|
||||
<strong>{{ $t('task.attributes.reminders') }}</strong>
|
||||
<reminders
|
||||
@change="editTaskSubmit()"
|
||||
v-model="taskEditTask.reminderDates"
|
||||
@update:model-value="editTaskSubmit()"
|
||||
/>
|
||||
|
||||
<div class="field">
|
||||
@ -83,7 +83,8 @@ import {useI18n} from 'vue-i18n'
|
||||
import Editor from '@/components/input/AsyncEditor'
|
||||
|
||||
import TaskService from '@/services/task'
|
||||
import TaskModel, { type ITask } from '@/models/task'
|
||||
import TaskModel from '@/models/task'
|
||||
import type {ITask} from '@/modelTypes/ITask'
|
||||
import EditLabels from './partials/editLabels.vue'
|
||||
import Reminders from './partials/reminders.vue'
|
||||
import ColorPicker from '../input/colorPicker.vue'
|
||||
|
@ -147,7 +147,8 @@
|
||||
import {defineComponent} from 'vue'
|
||||
|
||||
import AttachmentService from '../../../services/attachment'
|
||||
import AttachmentModel, { type IAttachment } from '@/models/attachment'
|
||||
import AttachmentModel from '@/models/attachment'
|
||||
import type {IAttachment} from '@/modelTypes/IAttachment'
|
||||
import User from '@/components/misc/user.vue'
|
||||
import {mapState} from 'vuex'
|
||||
|
||||
@ -155,8 +156,8 @@ import { useCopyToClipboard } from '@/composables/useCopyToClipboard'
|
||||
import { uploadFiles, generateAttachmentUrl } from '@/helpers/attachments'
|
||||
import {formatDate, formatDateSince, formatDateLong} from '@/helpers/time/formatDate'
|
||||
|
||||
import BaseButton from '@/components/base/BaseButton'
|
||||
import type { IFile } from '@/models/file'
|
||||
import BaseButton from '@/components/base/BaseButton.vue'
|
||||
import type { IFile } from '@/modelTypes/IFile'
|
||||
import { getHumanSize } from '@/helpers/getHumanSize'
|
||||
|
||||
export default defineComponent({
|
||||
|
@ -14,7 +14,7 @@ import {computed, type PropType} from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
import {getChecklistStatistics} from '@/helpers/checklistFromText'
|
||||
import type {ITask} from '@/models/task'
|
||||
import type {ITask} from '@/modelTypes/ITask'
|
||||
|
||||
const props = defineProps({
|
||||
task: {
|
||||
|
@ -70,13 +70,13 @@
|
||||
:is-edit-enabled="canWrite && c.author.id === currentUserId"
|
||||
:upload-callback="attachmentUpload"
|
||||
:upload-enabled="true"
|
||||
@change="
|
||||
v-model="c.comment"
|
||||
@update:model-value="
|
||||
() => {
|
||||
toggleEdit(c)
|
||||
editComment()
|
||||
}
|
||||
"
|
||||
v-model="c.comment"
|
||||
:bottom-actions="actions[c.id]"
|
||||
:show-save="true"
|
||||
/>
|
||||
@ -159,12 +159,15 @@ import {useI18n} from 'vue-i18n'
|
||||
import Editor from '@/components/input/AsyncEditor'
|
||||
|
||||
import TaskCommentService from '@/services/taskComment'
|
||||
import TaskCommentModel, { type ITaskComment } from '@/models/taskComment'
|
||||
import TaskCommentModel from '@/models/taskComment'
|
||||
|
||||
import type {ITaskComment} from '@/modelTypes/ITaskComment'
|
||||
import type {ITask} from '@/modelTypes/ITask'
|
||||
|
||||
import {uploadFile} from '@/helpers/attachments'
|
||||
import {success} from '@/message'
|
||||
import {formatDateLong, formatDateSince} from '@/helpers/time/formatDate'
|
||||
|
||||
import type { ITask } from '@/models/task'
|
||||
const props = defineProps({
|
||||
taskId: {
|
||||
type: Number,
|
||||
|
@ -28,7 +28,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import {computed, toRefs, type PropType} from 'vue'
|
||||
import type { ITask } from '@/models/task'
|
||||
import type {ITask} from '@/modelTypes/ITask'
|
||||
import {formatISO, formatDateLong, formatDateSince} from '@/helpers/time/formatDate'
|
||||
|
||||
const props = defineProps({
|
||||
|
@ -44,7 +44,7 @@ import {useI18n} from 'vue-i18n'
|
||||
import flatPickr from 'vue-flatpickr-component'
|
||||
|
||||
import TaskService from '@/services/task'
|
||||
import { type ITask } from '@/models/task'
|
||||
import type {ITask} from '@/modelTypes/ITask'
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
|
@ -20,12 +20,12 @@
|
||||
:is-edit-enabled="canWrite"
|
||||
:upload-callback="attachmentUpload"
|
||||
:upload-enabled="true"
|
||||
@change="save"
|
||||
:placeholder="$t('task.description.placeholder')"
|
||||
:empty-text="$t('task.description.empty')"
|
||||
:show-save="true"
|
||||
edit-shortcut="e"
|
||||
v-model="task.description"
|
||||
@update:model-value="save"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@ -36,7 +36,7 @@ import {useStore} from '@/store'
|
||||
|
||||
import Editor from '@/components/input/AsyncEditor'
|
||||
|
||||
import type { ITask } from '@/models/task'
|
||||
import type {ITask} from '@/modelTypes/ITask'
|
||||
|
||||
|
||||
const props = defineProps({
|
||||
|
@ -66,7 +66,7 @@ const props = defineProps({
|
||||
},
|
||||
})
|
||||
|
||||
const emit = defineEmits(['update:modelValue', 'change'])
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
|
||||
const store = useStore()
|
||||
const {t} = useI18n({useScope: 'global'})
|
||||
@ -96,7 +96,6 @@ function findLabel(newQuery: string) {
|
||||
async function addLabel(label: ILabel, showNotification = true) {
|
||||
const bubble = () => {
|
||||
emit('update:modelValue', labels.value)
|
||||
emit('change', labels.value)
|
||||
}
|
||||
|
||||
if (props.taskId === 0) {
|
||||
@ -122,7 +121,6 @@ async function removeLabel(label: ILabel) {
|
||||
}
|
||||
}
|
||||
emit('update:modelValue', labels.value)
|
||||
emit('change', labels.value)
|
||||
success({message: t('task.label.removeSuccess')})
|
||||
}
|
||||
|
||||
|
@ -34,12 +34,14 @@
|
||||
<script setup lang="ts">
|
||||
import {ref, computed, type PropType} from 'vue'
|
||||
import {useStore} from '@/store'
|
||||
import {useRouter} from 'vue-router'
|
||||
|
||||
import BaseButton from '@/components/base/BaseButton.vue'
|
||||
import Done from '@/components/misc/Done.vue'
|
||||
import type {ITask} from '@/models/task'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useCopyToClipboard } from '@/composables/useCopyToClipboard'
|
||||
|
||||
import {useCopyToClipboard} from '@/composables/useCopyToClipboard'
|
||||
|
||||
import type {ITask} from '@/modelTypes/ITask'
|
||||
|
||||
const props = defineProps({
|
||||
task: {
|
||||
|
@ -74,7 +74,8 @@ import User from '../../../components/misc/user.vue'
|
||||
import Done from '@/components/misc/Done.vue'
|
||||
import Labels from '../../../components/tasks/partials/labels.vue'
|
||||
import ChecklistSummary from './checklist-summary.vue'
|
||||
import {TASK_DEFAULT_COLOR, type ITask} from '@/models/task'
|
||||
import {TASK_DEFAULT_COLOR} from '@/models/task'
|
||||
import type {ITask} from '@/modelTypes/ITask'
|
||||
|
||||
import {formatDateLong, formatISO, formatDateSince} from '@/helpers/time/formatDate'
|
||||
import {colorIsDark} from '@/helpers/color/colorIsDark'
|
||||
|
@ -11,8 +11,8 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { PropType } from 'vue'
|
||||
import type { ILabel } from '@/models/label'
|
||||
import type {PropType} from 'vue'
|
||||
import type {ILabel} from '@/modelTypes/ILabel'
|
||||
|
||||
defineProps({
|
||||
labels: {
|
||||
|
@ -21,7 +21,8 @@ import {reactive, ref, watch} from 'vue'
|
||||
import type {PropType} from 'vue'
|
||||
import {useStore} from '@/store'
|
||||
import {useI18n} from 'vue-i18n'
|
||||
import ListModel, { type IList } from '@/models/list'
|
||||
import ListModel from '@/models/list'
|
||||
import type {IList} from '@/modelTypes/IList'
|
||||
import Multiselect from '@/components/input/multiselect.vue'
|
||||
|
||||
const props = defineProps({
|
||||
|
@ -32,13 +32,12 @@ const props = defineProps({
|
||||
},
|
||||
})
|
||||
|
||||
const emit = defineEmits(['update:modelValue', 'change'])
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
|
||||
const percentDone = computed({
|
||||
get: () => props.modelValue,
|
||||
set(percentDone) {
|
||||
emit('update:modelValue', percentDone)
|
||||
emit('change')
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
@ -19,19 +19,19 @@
|
||||
import {ref, watch} from 'vue'
|
||||
import {PRIORITIES} from '@/constants/priorities'
|
||||
|
||||
const priority = ref(0)
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
default: 0,
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
disabled: {
|
||||
default: false,
|
||||
},
|
||||
})
|
||||
|
||||
const emit = defineEmits(['update:modelValue', 'change'])
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
|
||||
const priority = ref(0)
|
||||
|
||||
// FIXME: store value outside
|
||||
// Set the priority to the :value every time it changes from the outside
|
||||
@ -45,6 +45,5 @@ watch(
|
||||
|
||||
function updateData() {
|
||||
emit('update:modelValue', priority.value)
|
||||
emit('change')
|
||||
}
|
||||
</script>
|
||||
|
@ -63,7 +63,7 @@ const props = defineProps({
|
||||
},
|
||||
})
|
||||
|
||||
const emit = defineEmits(['update:modelValue', 'change'])
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
|
||||
const reminders = ref<Reminder[]>([])
|
||||
|
||||
@ -86,7 +86,6 @@ watch(
|
||||
|
||||
function updateData() {
|
||||
emit('update:modelValue', reminders.value)
|
||||
emit('change')
|
||||
}
|
||||
|
||||
const newReminder = ref(null)
|
||||
|
@ -85,7 +85,7 @@ const props = defineProps({
|
||||
|
||||
const {t} = useI18n({useScope: 'global'})
|
||||
|
||||
const emit = defineEmits(['update:modelValue', 'change'])
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
|
||||
const task = ref<ITask>()
|
||||
const repeatAfter = reactive({
|
||||
@ -116,7 +116,6 @@ function updateData() {
|
||||
|
||||
Object.assign(task.value.repeatAfter, repeatAfter)
|
||||
emit('update:modelValue', task.value)
|
||||
emit('change')
|
||||
}
|
||||
|
||||
function setRepeatAfter(amount: number, type: IRepeatAfter['type']) {
|
||||
|
@ -98,7 +98,8 @@
|
||||
<script lang="ts">
|
||||
import {defineComponent, type PropType} from 'vue'
|
||||
|
||||
import TaskModel, { type ITask } from '../../../models/task'
|
||||
import TaskModel from '@/models/task'
|
||||
import type {ITask} from '@/modelTypes/ITask'
|
||||
import PriorityLabel from './priorityLabel.vue'
|
||||
import TaskService from '../../../services/task'
|
||||
import Labels from '@/components/tasks/partials/labels.vue'
|
||||
|
Reference in New Issue
Block a user