6.6.1: Скрытие прошедших дат в товарах
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m5s
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m5s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -638,7 +638,19 @@ function ShoppingList({ onNavigate, refreshTrigger = 0, isActive = false, initia
|
||||
|
||||
{hasFuture && isFutureExpanded && (
|
||||
<div className="task-group completed-tasks">
|
||||
{group.future.map(item => (
|
||||
{group.future.map(item => {
|
||||
let dateDisplay = null
|
||||
if (item.next_show_at) {
|
||||
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 (
|
||||
<div
|
||||
key={item.id}
|
||||
className="task-item"
|
||||
@@ -661,9 +673,9 @@ function ShoppingList({ onNavigate, refreshTrigger = 0, isActive = false, initia
|
||||
<div className="task-name-container">
|
||||
<div className="task-name-wrapper">
|
||||
<div className="task-name">{item.name}</div>
|
||||
<div className="task-next-show-date">
|
||||
{formatDateForDisplay(item.next_show_at)}
|
||||
</div>
|
||||
{dateDisplay && (
|
||||
<div className="task-next-show-date">{dateDisplay}</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<div className="task-actions">
|
||||
@@ -683,7 +695,7 @@ function ShoppingList({ onNavigate, refreshTrigger = 0, isActive = false, initia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
)})}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user