Fix HUD task bar not disappearing after accept/complete
Changed t.ID to t.TaskID in three places - the API returns TaskID not ID, so filtering and lookups were failing. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
a318b8668f
commit
a998ff890a
1 changed files with 3 additions and 3 deletions
|
|
@ -133,7 +133,7 @@ const HUD = {
|
|||
existingBars.forEach(bar => existingIds.add(parseInt(bar.dataset.taskId)));
|
||||
|
||||
// Get current task IDs
|
||||
const currentIds = new Set(this.tasks.map(t => t.ID));
|
||||
const currentIds = new Set(this.tasks.map(t => t.TaskID));
|
||||
|
||||
// Remove bars for tasks that no longer exist
|
||||
existingBars.forEach(bar => {
|
||||
|
|
@ -210,7 +210,7 @@ const HUD = {
|
|||
const bars = document.querySelectorAll('.task-bar');
|
||||
bars.forEach(bar => {
|
||||
const taskId = parseInt(bar.dataset.taskId);
|
||||
const task = this.tasks.find(t => t.ID === taskId);
|
||||
const task = this.tasks.find(t => t.TaskID === taskId);
|
||||
if (task) {
|
||||
this.updateTaskBar(bar, task);
|
||||
}
|
||||
|
|
@ -330,7 +330,7 @@ const HUD = {
|
|||
|
||||
if (data.OK) {
|
||||
// Remove from local list immediately
|
||||
this.tasks = this.tasks.filter(t => t.ID !== task.TaskID);
|
||||
this.tasks = this.tasks.filter(t => t.TaskID !== task.TaskID);
|
||||
this.renderTasks();
|
||||
this.showFeedback('Task accepted!', 'success');
|
||||
} else {
|
||||
|
|
|
|||
Reference in a new issue