Обновление интерфейса задач и версия 3.21.0
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 49s
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 49s
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import React from 'react'
|
||||
import ProjectProgressBar from './ProjectProgressBar'
|
||||
import LoadingError from './LoadingError'
|
||||
import { getAllProjectsSorted, getProjectColor } from '../utils/projectUtils'
|
||||
|
||||
@@ -177,7 +177,6 @@ function TaskForm({ onNavigate, taskId, wishlistId, isTest: isTestFromProps = fa
|
||||
// Парсим repetition_period если он есть
|
||||
setRepetitionMode('after')
|
||||
const periodStr = data.task.repetition_period.trim()
|
||||
console.log('Parsing repetition_period:', periodStr, 'Full task data:', data.task) // Отладка
|
||||
|
||||
// PostgreSQL может возвращать INTERVAL в разных форматах:
|
||||
// - "1 day" / "1 days" / "10 days"
|
||||
@@ -194,8 +193,6 @@ function TaskForm({ onNavigate, taskId, wishlistId, isTest: isTestFromProps = fa
|
||||
const value = parseInt(match[1], 10)
|
||||
const unit = match[2].toLowerCase()
|
||||
|
||||
console.log('Matched value:', value, 'unit:', unit) // Отладка
|
||||
|
||||
if (!isNaN(value) && value >= 0) {
|
||||
// Преобразуем единицы PostgreSQL в наш формат
|
||||
if (unit.startsWith('minute')) {
|
||||
@@ -293,8 +290,6 @@ function TaskForm({ onNavigate, taskId, wishlistId, isTest: isTestFromProps = fa
|
||||
console.log('Failed to parse repetition_period:', periodStr) // Отладка
|
||||
setRepetitionPeriodValue('')
|
||||
setRepetitionPeriodType('day')
|
||||
} else {
|
||||
console.log('Successfully parsed repetition_period - value will be set') // Отладка
|
||||
}
|
||||
} else {
|
||||
console.log('No repetition_period or repetition_date in task data') // Отладка
|
||||
|
||||
@@ -556,10 +556,43 @@ function TaskList({ onNavigate, data, loading, backgroundLoading, error, onRetry
|
||||
onClick={(e) => handleCheckmarkClick(task, e)}
|
||||
title={isTest ? 'Запустить тест' : (showDetailOnCheckmark ? 'Открыть детали' : 'Выполнить задачу')}
|
||||
>
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="10" cy="10" r="9" stroke="currentColor" strokeWidth="2" fill="none" className="checkmark-circle" />
|
||||
<path d="M6 10 L9 13 L14 7" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" className="checkmark-check" />
|
||||
</svg>
|
||||
{isTest ? (
|
||||
<svg
|
||||
width="20"
|
||||
height="20"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
strokeWidth="2"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
>
|
||||
<path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"></path>
|
||||
<path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"></path>
|
||||
</svg>
|
||||
) : isWishlist ? (
|
||||
<svg
|
||||
width="20"
|
||||
height="20"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
strokeWidth="2"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
>
|
||||
<polyline points="20 12 20 22 4 22 4 12"></polyline>
|
||||
<rect x="2" y="7" width="20" height="5"></rect>
|
||||
<line x1="12" y1="22" x2="12" y2="7"></line>
|
||||
<path d="M12 7H7.5a2.5 2.5 0 0 1 0-5C11 2 12 7 12 7z"></path>
|
||||
<path d="M12 7h4.5a2.5 2.5 0 0 0 0-5C13 2 12 7 12 7z"></path>
|
||||
</svg>
|
||||
) : (
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="10" cy="10" r="9" stroke="currentColor" strokeWidth="2" fill="none" className="checkmark-circle" />
|
||||
<path d="M6 10 L9 13 L14 7" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" className="checkmark-check" />
|
||||
</svg>
|
||||
)}
|
||||
</div>
|
||||
<div className="task-name-container">
|
||||
<div className="task-name-wrapper">
|
||||
@@ -569,43 +602,6 @@ function TaskList({ onNavigate, data, loading, backgroundLoading, error, onRetry
|
||||
<span className="task-subtasks-count">(+{task.subtasks_count})</span>
|
||||
)}
|
||||
<span className="task-badge-bar">
|
||||
{isWishlist && (
|
||||
<svg
|
||||
className="task-wishlist-icon"
|
||||
width="16"
|
||||
height="16"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
strokeWidth="2"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
title="Связано с желанием"
|
||||
>
|
||||
<polyline points="20 12 20 22 4 22 4 12"></polyline>
|
||||
<rect x="2" y="7" width="20" height="5"></rect>
|
||||
<line x1="12" y1="22" x2="12" y2="7"></line>
|
||||
<path d="M12 7H7.5a2.5 2.5 0 0 1 0-5C11 2 12 7 12 7z"></path>
|
||||
<path d="M12 7h4.5a2.5 2.5 0 0 0 0-5C13 2 12 7 12 7z"></path>
|
||||
</svg>
|
||||
)}
|
||||
{isTest && (
|
||||
<svg
|
||||
className="task-test-icon"
|
||||
width="16"
|
||||
height="16"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
strokeWidth="2"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
title="Тест"
|
||||
>
|
||||
<path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"></path>
|
||||
<path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"></path>
|
||||
</svg>
|
||||
)}
|
||||
{hasProgression && (
|
||||
<svg
|
||||
className="task-progression-icon"
|
||||
|
||||
@@ -236,13 +236,13 @@ function Wishlist({ onNavigate, refreshTrigger = 0, isActive = false, initialBoa
|
||||
useEffect(() => {
|
||||
if (!initialFetchDoneRef.current) {
|
||||
initialFetchDoneRef.current = true
|
||||
|
||||
|
||||
// Загружаем доски из кэша
|
||||
const boardsCacheLoaded = loadBoardsFromCache()
|
||||
if (boardsCacheLoaded) {
|
||||
setBoardsLoading(false)
|
||||
}
|
||||
|
||||
|
||||
// Загружаем доски с сервера
|
||||
fetchBoards()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user