6.4.4: Логика чипсов и кнопки Без даты
Some checks failed
Build and Push Docker Image / build-and-push (push) Has been cancelled
Some checks failed
Build and Push Docker Image / build-and-push (push) Has been cancelled
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "play-life-web",
|
"name": "play-life-web",
|
||||||
"version": "6.4.3",
|
"version": "6.4.4",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
@@ -333,13 +333,15 @@ function ShoppingList({ onNavigate, refreshTrigger = 0, isActive = false, initia
|
|||||||
groups[groupKey] = { active: [], future: [] }
|
groups[groupKey] = { active: [], future: [] }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.next_show_at) {
|
if (!item.next_show_at) {
|
||||||
|
groups[groupKey].future.push(item)
|
||||||
|
return
|
||||||
|
}
|
||||||
const showAt = new Date(item.next_show_at)
|
const showAt = new Date(item.next_show_at)
|
||||||
if (showAt > todayEnd) {
|
if (showAt > todayEnd) {
|
||||||
groups[groupKey].future.push(item)
|
groups[groupKey].future.push(item)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
|
||||||
groups[groupKey].active.push(item)
|
groups[groupKey].active.push(item)
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -709,9 +711,9 @@ function ShoppingList({ onNavigate, refreshTrigger = 0, isActive = false, initia
|
|||||||
nextShowAtStr = formatDateToLocal(nextShowAtDate)
|
nextShowAtStr = formatDateToLocal(nextShowAtDate)
|
||||||
}
|
}
|
||||||
|
|
||||||
const isToday = nextShowAtStr === todayStr
|
|
||||||
const isTomorrow = nextShowAtStr === tomorrowStr
|
const isTomorrow = nextShowAtStr === tomorrowStr
|
||||||
const showTodayChip = !nextShowAtStr || nextShowAtStr > todayStr
|
// Показываем "Сегодня" только если дата строго в будущем (null, сегодня и прошлое — не показываем)
|
||||||
|
const showTodayChip = !!nextShowAtStr && nextShowAtStr > todayStr
|
||||||
|
|
||||||
// Дата "по плану"
|
// Дата "по плану"
|
||||||
const item = selectedItemForPostpone
|
const item = selectedItemForPostpone
|
||||||
|
|||||||
Reference in New Issue
Block a user