()
| 153 | newTodoText = '' |
| 154 | |
| 155 | addTodo() { |
| 156 | if (!this.newTodoText.trim()) return |
| 157 | |
| 158 | const newTodo = { |
| 159 | id: Date.now(), |
| 160 | text: this.newTodoText.trim(), |
| 161 | projectID: this.selectedProjectId(), |
| 162 | completed: false, |
| 163 | created_at: new Date(), |
| 164 | } |
| 165 | |
| 166 | todosCollection.insert(newTodo) |
| 167 | this.newTodoText = '' |
| 168 | } |
| 169 | |
| 170 | toggleTodo(id: number) { |
| 171 | todosCollection.update(id, (draft: any) => { |
no test coverage detected