innesitare / taskease Goto Github PK
View Code? Open in Web Editor NEWKanban board designed to streamline your workflow and effortlessly manage your specific tasks.
License: MIT License
Kanban board designed to streamline your workflow and effortlessly manage your specific tasks.
License: MIT License
When attempting to drag tasks within the project board, users encounter a TypeError: "Cannot read properties of undefined (reading 'id')"
error. This issue arises due to the 'id' property in the 'user' object being undefined. The task's data is derived from the UpdateBoardTaskRequest
interface, which includes both 'user' and 'userId' properties.
Steps to Reproduce:
Expected Behavior:
The task should be draggable without any errors, and the 'id' property in the 'user' object should be accessible.
Actual Behavior:
Dragging tasks results in a TypeError due to the 'id' property in the 'user' object being undefined.
To resolve this issue, we need to implement additional checks in the drop
method of the project board component. Specifically, we need to ensure that the 'user' object is defined and has a valid 'id' property before accessing it. This will allow us to set the 'userId' based on the 'user.id' if available and avoid accessing undefined properties.
Additional Information:
Error Code: Uncaught (in promise): TypeError: Cannot read properties of undefined (reading 'id')
Issue occurrance:
async drop(event: CdkDragDrop<BoardTask[]>) {
if (event.previousContainer === event.container) {
moveItemInArray(event.container.data, event.previousIndex, event.currentIndex);
} else {
transferArrayItem (
event.previousContainer.data,
event.container.data,
event.previousIndex,
event.currentIndex
);
const droppedTask: UpdateBoardTaskRequest = event.item.data;
droppedTask.status = this.status;
const indexToReplace = this.filteredBoardTasks.findIndex(task => task.id === droppedTask.id);
this.filteredBoardTasks[indexToReplace] = {...droppedTask, userId: droppedTask.user.id};
await this.boardTaskService.updateBoardTask(droppedTask);
}
}
This issue affects users trying to manage tasks within the project board. The error prevents smooth task movement and may cause confusion and frustration.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.