4.17.0: Остаток баллов, одна строка заголовка
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m3s

This commit is contained in:
poignatov
2026-02-04 18:14:48 +03:00
parent 62d36dca17
commit 8965e43341
5 changed files with 22 additions and 14 deletions

View File

@@ -554,16 +554,13 @@ function Wishlist({ onNavigate, refreshTrigger = 0, isActive = false, initialBoa
if (condition.type === 'task_completion') {
conditionText = condition.task_name || 'Задача'
} else {
const points = condition.required_points || 0
const requiredPoints = condition.required_points || 0
const currentPoints = condition.current_points || 0
const remainingPoints = Math.max(0, requiredPoints - currentPoints)
const project = condition.project_name || 'Проект'
let dateText = ''
if (condition.start_date) {
const date = new Date(condition.start_date + 'T00:00:00')
dateText = ` с ${date.toLocaleDateString('ru-RU')}`
} else {
dateText = ' за всё время'
}
conditionText = `${points} в ${project}${dateText}`
// Показываем оставшиеся баллы в формате "33 в Привлекательность"
// Дата начала отсчёта уже учтена в current_points на бэкенде
conditionText = `${Math.round(remainingPoints)} в ${project}`
}
return (