diff --git a/apps/atrium-telegram/app/components/SectionTitle.vue b/apps/atrium-telegram/app/components/SectionTitle.vue index 8e98dbab..3a50374a 100644 --- a/apps/atrium-telegram/app/components/SectionTitle.vue +++ b/apps/atrium-telegram/app/components/SectionTitle.vue @@ -1,5 +1,5 @@ diff --git a/apps/atrium-telegram/app/components/StaffBlock.vue b/apps/atrium-telegram/app/components/StaffBlock.vue index 33de1a98..7b621a31 100644 --- a/apps/atrium-telegram/app/components/StaffBlock.vue +++ b/apps/atrium-telegram/app/components/StaffBlock.vue @@ -4,7 +4,7 @@
diff --git a/apps/atrium-telegram/app/components/TaskCard.vue b/apps/atrium-telegram/app/components/TaskActiveCard.vue similarity index 55% rename from apps/atrium-telegram/app/components/TaskCard.vue rename to apps/atrium-telegram/app/components/TaskActiveCard.vue index 04b84f33..3d5c03bf 100644 --- a/apps/atrium-telegram/app/components/TaskCard.vue +++ b/apps/atrium-telegram/app/components/TaskActiveCard.vue @@ -1,34 +1,5 @@ @@ -85,15 +19,15 @@ import type { DropdownMenuItem } from '@nuxt/ui' import type { Task } from '@roll-stack/database' import { ModalCompleteTask, ModalUpdateTask } from '#components' -import { DateFormatter, getLocalTimeZone, parseDate } from '@internationalized/date' const { task } = defineProps<{ task: Task }>() const { vibrate } = useFeedback() -const taskStore = useTaskStore() + const userStore = useUserStore() +const taskStore = useTaskStore() const list = computed(() => taskStore.lists.find((list) => list.id === task.listId)) @@ -101,10 +35,6 @@ const overlay = useOverlay() const modalUpdateTask = overlay.create(ModalUpdateTask) const modalCompleteTask = overlay.create(ModalCompleteTask) -const df = new DateFormatter('ru-RU', { - dateStyle: 'long', -}) - const isCompleted = computed(() => !!task.completedAt) const performer = computed(() => userStore.staff.find((staff) => staff.id === task.performerId)) @@ -113,8 +43,6 @@ const canComplete = computed(() => canEdit.value && !isCompleted.value && (task. const canFocus = computed(() => task.performerId === userStore.id && !isCompleted.value) const isFocused = computed(() => task.id === performer.value?.focusedTaskId) -const checkbox = ref(false) - const items = computed(() => { const menuItems: DropdownMenuItem[] = [ { @@ -147,6 +75,12 @@ const items = computed(() => { }, condition: canEdit.value, }, + { + label: 'Задача закрыта', + icon: 'i-lucide-check', + disabled: true, + condition: isCompleted.value, + }, ] return menuItems.filter((item) => item.condition) @@ -177,16 +111,4 @@ async function onUnfocus() { vibrate('error') } } - -function handleComplete() { - vibrate() - - if (!checkbox.value) { - return - } - - modalCompleteTask.open({ taskId: task.id }) - - checkbox.value = false -} diff --git a/apps/atrium-telegram/app/components/TaskInfoCard.vue b/apps/atrium-telegram/app/components/TaskInfoCard.vue index 4f3a9b5b..2b83e7a3 100644 --- a/apps/atrium-telegram/app/components/TaskInfoCard.vue +++ b/apps/atrium-telegram/app/components/TaskInfoCard.vue @@ -1,5 +1,5 @@