4.17.0: Остаток баллов, одна строка заголовка
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m3s
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m3s
This commit is contained in:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user