From ff9fec7d7aa77ac60ce7e8f86731affc083afbee Mon Sep 17 00:00:00 2001 From: poignatov Date: Tue, 3 Feb 2026 14:03:19 +0300 Subject: [PATCH] =?UTF-8?q?4.8.8:=20=D0=91=D0=B5=D1=81=D0=BA=D0=BE=D0=BD?= =?UTF-8?q?=D0=B5=D1=87=D0=BD=D1=8B=D0=B5=20=D0=B7=D0=B0=D0=B4=D0=B0=D1=87?= =?UTF-8?q?=D0=B8=20=D0=B2=20completed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VERSION | 2 +- play-life-web/package.json | 2 +- play-life-web/src/components/TaskList.jsx | 23 +++++++++++++---------- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/VERSION b/VERSION index 5fb8716..fd8ccaa 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.8.7 +4.8.8 diff --git a/play-life-web/package.json b/play-life-web/package.json index 245c8fd..c3e7c39 100644 --- a/play-life-web/package.json +++ b/play-life-web/package.json @@ -1,6 +1,6 @@ { "name": "play-life-web", - "version": "4.8.7", + "version": "4.8.8", "type": "module", "scripts": { "dev": "vite", diff --git a/play-life-web/src/components/TaskList.jsx b/play-life-web/src/components/TaskList.jsx index c4195f3..ec339fa 100644 --- a/play-life-web/src/components/TaskList.jsx +++ b/play-life-web/src/components/TaskList.jsx @@ -455,21 +455,24 @@ function TaskList({ onNavigate, data, loading, backgroundLoading, error, onRetry // Определяем, в какую группу попадает задача let isCompleted = false - let isInfinite = false - // Используем только next_show_at для группировки - if (task.next_show_at) { + // Сначала проверяем, является ли задача бесконечной + // Бесконечная задача: repetition_period == 0 И (repetition_date == 0 ИЛИ отсутствует) + // Для обратной совместимости: если repetition_period = 0, считаем бесконечной + const hasZeroPeriod = task.repetition_period && isZeroPeriod(task.repetition_period) + const hasZeroDate = task.repetition_date && isZeroDate(task.repetition_date) + // Идеально: оба поля = 0, но для старых задач может быть только repetition_period = 0 + const isInfinite = (hasZeroPeriod && hasZeroDate) || (hasZeroPeriod && !task.repetition_date) + + // Бесконечные задачи всегда идут в completed, независимо от next_show_at + if (isInfinite) { + isCompleted = true + } else if (task.next_show_at) { + // Для обычных задач используем next_show_at для группировки const nextShowDate = new Date(task.next_show_at) nextShowDate.setHours(0, 0, 0, 0) isCompleted = nextShowDate.getTime() > today.getTime() - isInfinite = false } else { - // Бесконечная задача: repetition_period == 0 И (repetition_date == 0 ИЛИ отсутствует) - // Для обратной совместимости: если repetition_period = 0, считаем бесконечной - const hasZeroPeriod = task.repetition_period && isZeroPeriod(task.repetition_period) - const hasZeroDate = task.repetition_date && isZeroDate(task.repetition_date) - // Идеально: оба поля = 0, но для старых задач может быть только repetition_period = 0 - isInfinite = (hasZeroPeriod && hasZeroDate) || (hasZeroPeriod && !task.repetition_date) isCompleted = false }