var myModalEl,kanbanboard,scroll,addNewBoard,addMember,profileField,reader,tasks_list=[document.getElementById("kanbanboard"),document.getElementById("unassigned-task"),document.getElementById("todo-task"),document.getElementById("inprogress-task"),document.getElementById("reviews-task"),document.getElementById("completed-task"),document.getElementById("new-task")];function noTaskImage(){Array.from(document.querySelectorAll("#kanbanboard .tasks-list")).forEach(function(e){0
'+e+'0
',document.getElementById("kanbanboard").insertAdjacentHTML("beforeend",kanbanlisthtml),document.getElementById("addBoardBtn-close").click(),noTaskImage(),taskCounter(),drake.destroy(),tasks_list.push(document.getElementById(t)),drake=dragula(tasks_list).on("out",function(e,a){noTaskImage(),taskCounter()}),document.getElementById("boardName").value=""}function newMemberAdd(){var e=document.getElementById("firstnameInput").value,a=localStorage.getItem("kanbanboard-member");newMembar=''+a+"",document.getElementById("newMembar").insertAdjacentHTML("afterbegin",newMembar),document.getElementById("btn-close-member").click()}tasks_list&&((myModalEl=document.getElementById("deleteRecordModal"))&&myModalEl.addEventListener("show.bs.modal",function(e){document.getElementById("delete-record").addEventListener("click",function(){e.relatedTarget.closest(".tasks-box").remove(),document.getElementById("delete-btn-close").click(),taskCounter()})}),drake=dragula(tasks_list).on("drag",function(e){e.className=e.className.replace("ex-moved","")}).on("drop",function(e){e.className+=" ex-moved"}).on("over",function(e,a){a.className+=" ex-over"}).on("out",function(e,a){a.className=a.className.replace("ex-over",""),noTaskImage(),taskCounter()}),(kanbanboard=document.querySelectorAll("#kanbanboard"))&&(scroll=autoScroll([document.querySelector("#kanbanboard")],{margin:20,maxSpeed:100,scrollWhenOutside:!0,autoScroll:function(){return this.down&&drake.dragging}})),(addNewBoard=document.getElementById("addNewBoard"))&&document.getElementById("addNewBoard").addEventListener("click",newKanbanbaord),addMember=document.getElementById("addMember"))&&(document.getElementById("addMember").addEventListener("click",newMemberAdd),profileField=document.getElementById("profileimgInput"),reader=new FileReader,profileField.addEventListener("change",function(e){reader.readAsDataURL(profileField.files[0]),reader.onload=function(){var e=reader.result;localStorage.setItem("kanbanboard-member",'profile')}}));