6.4.9: Скрытие даты для товаров с прошедшей датой
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m11s
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m11s
This commit is contained in:
@@ -577,8 +577,13 @@ function ShoppingList({ onNavigate, refreshTrigger = 0, isActive = false, initia
|
||||
{group.active.map(item => {
|
||||
let dateDisplay = null
|
||||
if (item.next_show_at) {
|
||||
dateDisplay = formatDateForDisplay(item.next_show_at)
|
||||
if (dateDisplay === 'Сегодня') dateDisplay = null
|
||||
const itemDate = new Date(item.next_show_at)
|
||||
const now = new Date()
|
||||
now.setHours(0, 0, 0, 0)
|
||||
const target = new Date(itemDate.getFullYear(), itemDate.getMonth(), itemDate.getDate())
|
||||
if (target > now) {
|
||||
dateDisplay = formatDateForDisplay(item.next_show_at)
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user