6.5.0: Табы вместо селекта в форме цели
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m6s

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
poignatov
2026-03-09 22:23:41 +03:00
parent 3a1b836ece
commit a693d3fa4b
4 changed files with 66 additions and 27 deletions

View File

@@ -1548,23 +1548,27 @@ function ConditionForm({ tasks, projects, onSubmit, onCancel, editingCondition,
return (
<div className="condition-form-overlay" onClick={onCancel}>
<div className="condition-form" onClick={(e) => e.stopPropagation()}>
<div className="condition-form-header">
<h3>{isEditing ? 'Редактировать цель' : 'Добавить цель'}</h3>
<button onClick={onCancel} className="condition-form-close-button">
</button>
</div>
<form onSubmit={handleSubmit}>
<div className="form-group">
<label>Тип условия</label>
<select
value={type}
onChange={(e) => setType(e.target.value)}
className="form-input"
>
<option value="project_points">Баллы</option>
<option value="task_completion">Задача</option>
</select>
<div className="condition-tabs-container">
<div className="condition-tabs-inner">
<button
type="button"
className={`condition-tab-button ${type === 'project_points' ? 'active' : ''}`}
onClick={() => setType('project_points')}
>
Баллы
</button>
<button
type="button"
className={`condition-tab-button ${type === 'task_completion' ? 'active' : ''}`}
onClick={() => setType('task_completion')}
>
Задача
</button>
</div>
<button type="button" onClick={onCancel} className="condition-form-close-button condition-tabs-close">
</button>
</div>
{type === 'task_completion' && (
@@ -1625,14 +1629,10 @@ function ConditionForm({ tasks, projects, onSubmit, onCancel, editingCondition,
{isEditing ? 'Сохранить' : 'Добавить'}
</button>
</div>
{type === 'project_points' && (
{type === 'project_points' && calculatedWeeksText && (
<div className="calculated-weeks-info">
{calculatedWeeksText && (
<>
<span>Срок: </span>
<span style={{ fontWeight: '600' }}>{calculatedWeeksText}</span>
</>
)}
<span>Срок: </span>
<span style={{ fontWeight: '600' }}>{calculatedWeeksText}</span>
</div>
)}
</form>