feat: замена period_type на start_date в wishlist, обновление UI формы условий
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
- Добавлена миграция 020 для замены period_type на start_date в score_conditions - Обновлена функция подсчёта баллов: calculateProjectPointsFromDate вместо calculateProjectPointsForPeriod - Добавлен компонент DateSelector для выбора даты начала подсчёта - По умолчанию выбран тип условия 'Баллы' - Переименованы опции: 'Баллы' и 'Задача' - Версия: 3.9.3
This commit is contained in:
@@ -166,16 +166,14 @@ function WishlistDetail({ wishlistId, onNavigate, onRefresh }) {
|
||||
const requiredPoints = condition.required_points || 0
|
||||
const currentPoints = condition.current_points || 0
|
||||
const project = condition.project_name || 'Проект'
|
||||
let period = ''
|
||||
if (condition.period_type) {
|
||||
const periodLabels = {
|
||||
week: 'за неделю',
|
||||
month: 'за месяц',
|
||||
year: 'за год',
|
||||
}
|
||||
period = ' ' + periodLabels[condition.period_type] || ''
|
||||
let dateText = ''
|
||||
if (condition.start_date) {
|
||||
const date = new Date(condition.start_date + 'T00:00:00')
|
||||
dateText = ` с ${date.toLocaleDateString('ru-RU')}`
|
||||
} else {
|
||||
dateText = ' за всё время'
|
||||
}
|
||||
conditionText = `${requiredPoints} в ${project}${period}`
|
||||
conditionText = `${requiredPoints} в ${project}${dateText}`
|
||||
progress = {
|
||||
type: 'points',
|
||||
current: currentPoints,
|
||||
|
||||
Reference in New Issue
Block a user