2424 </template >
2525 </UPopover >
2626 </template >
27- <UTooltip v-else-if =" canComplete " text="Задача выполнена?">
28- <UCheckbox
29- v-model =" checkbox "
30- color="secondary"
31- variant="list"
32- size="xl"
33- icon="i-lucide-check"
34- class="mt-1.5 duration-200 motion-preset-bounce"
35- @change =" onStartCompleting "
36- />
37- </UTooltip >
27+ <UCheckbox
28+ v-else-if =" canComplete "
29+ v-model =" checkbox "
30+ color="secondary"
31+ variant="list"
32+ size="xl"
33+ icon="i-lucide-check"
34+ class="mt-1.5 duration-200 motion-preset-bounce"
35+ @change =" onStartCompleting "
36+ />
3837 <UCheckbox
3938 v-else
4039 v-model =" checkbox "
6564 } "
6665 class="group/task duration-200 motion-preset-bounce cursor-pointer"
6766 :class =" [
68- isFocused && ' border border-secondary' ,
67+ isFocused && ' border border-secondary/25 ' ,
6968 ] "
69+ @click =" vibrate "
7070 >
7171 <div class =" flex flex-col gap-2 items-start" >
7272 <div class =" flex flex-col gap-1 items-start text-left" >
@@ -116,7 +116,7 @@ const { task } = defineProps<{
116116}>()
117117
118118const { t } = useI18n ()
119- const toast = useToast ()
119+ const { vibrate } = useFeedback ()
120120const actionToast = useActionToast ()
121121const taskStore = useTaskStore ()
122122const userStore = useUserStore ()
@@ -140,7 +140,6 @@ const canFocus = computed(() => task.performerId === userStore.id && !isComplete
140140const isFocused = computed (() => task .id === performer .value ?.focusedTaskId )
141141
142142const checkbox = ref (false )
143- const toastId = ref (` task-close-${task .id } ` )
144143
145144const items = computed <DropdownMenuItem []>(() => {
146145 const menuItems: DropdownMenuItem [] = [
@@ -195,21 +194,14 @@ async function onUnfocus() {
195194}
196195
197196function onStartCompleting() {
197+ vibrate ()
198+
198199 if (! checkbox .value ) {
199200 return
200201 }
201202
202203 modalCompleteTask .open ({ taskId: task .id })
203204
204205 checkbox .value = false
205-
206- toast .add ({
207- id: toastId .value ,
208- title: ' Закрываем задачу?' ,
209- description: ' Сразу как успешную или есть что добавить? Заполните форму.' ,
210- color: ' secondary' ,
211- type: ' foreground' ,
212- duration: 5000 ,
213- })
214206}
215207 </script >
0 commit comments