Skip to content

Commit

Permalink
Fix createTodo
Browse files Browse the repository at this point in the history
  • Loading branch information
KikyTokamuro committed Apr 14, 2023
1 parent d0e2160 commit 2046c9b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion static/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,12 @@ export class TodolistUI {
return;
}

const currentGroup = $(`.todolist-group-button[style="background: rgba(0, 0, 0, 0.1);"]`)
.attr("group");

this.api.createNewTodo(taskGroup, taskText).done((data) => {
if (data.ERROR == undefined) {
if ($(`.todolist-group-button[group="${data["GROUP-ID"]}"][style="background: rgba(0, 0, 0, 0.1);"]`).length !== 0) {
if (["all", data["GROUP-ID"].toString()].includes(currentGroup)) {
$(`.todolist-column-body[status=${data["STATUS-ID"]}]`)
.append(this.generateTaskElement(
data["GROUP-ID"],
Expand Down

0 comments on commit 2046c9b

Please sign in to comment.