Skip to content

Conversation

@iLuxa142
Copy link
Owner

@iLuxa142 iLuxa142 commented Mar 21, 2021

План новых фич: > 1. Списки задач. +2. Сортировки по полям. +3. Поиск/фильтрация. +4. Вид списков: карточки. +5. Markdown notes. 6. Порядок списков через drag&drop

@iLuxa142 iLuxa142 requested a review from kazurus March 21, 2021 14:11
const idx = state.tasks.findIndex(t => t.id === id);

state.tasks[idx].status = 'completed';
changeComplete(state, id) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Больше похоже на toggleCompleteStatus

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

переименовал

<input
type="checkbox"
class="filled-in"
:checked="task.status == 'completed'"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Напрашивается компонент task, и в нём computed на статус, либо в самом объекте task сделать поле isCompleted, тогда не будет такой логики в шаблоне

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

сделал через поле isCompleted

<span></span>
</label>
</td>
<td>{{ task.title }}</td>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Большой шаблон кандидат на декомпозицию

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

вынес шаблон и скрипт отображения тасков в компонент Tasks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants