6.4.4: Логика чипсов и кнопки Без даты
Some checks failed
Build and Push Docker Image / build-and-push (push) Has been cancelled

This commit is contained in:
poignatov
2026-03-08 19:36:45 +03:00
parent 4169285394
commit 81de26e586
3 changed files with 12 additions and 10 deletions

View File

@@ -1 +1 @@
6.4.3
6.4.4

View File

@@ -1,6 +1,6 @@
{
"name": "play-life-web",
"version": "6.4.3",
"version": "6.4.4",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -333,12 +333,14 @@ function ShoppingList({ onNavigate, refreshTrigger = 0, isActive = false, initia
groups[groupKey] = { active: [], future: [] }
}
if (item.next_show_at) {
const showAt = new Date(item.next_show_at)
if (showAt > todayEnd) {
groups[groupKey].future.push(item)
return
}
if (!item.next_show_at) {
groups[groupKey].future.push(item)
return
}
const showAt = new Date(item.next_show_at)
if (showAt > todayEnd) {
groups[groupKey].future.push(item)
return
}
groups[groupKey].active.push(item)
})
@@ -709,9 +711,9 @@ function ShoppingList({ onNavigate, refreshTrigger = 0, isActive = false, initia
nextShowAtStr = formatDateToLocal(nextShowAtDate)
}
const isToday = nextShowAtStr === todayStr
const isTomorrow = nextShowAtStr === tomorrowStr
const showTodayChip = !nextShowAtStr || nextShowAtStr > todayStr
// Показываем "Сегодня" только если дата строго в будущем (null, сегодня и прошлое — не показываем)
const showTodayChip = !!nextShowAtStr && nextShowAtStr > todayStr
// Дата "по плану"
const item = selectedItemForPostpone