issue-35 #37

Merged
sebastian merged 4 commits from issue-35 into master 2023-10-29 16:16:34 +01:00
2 changed files with 28 additions and 7 deletions
Showing only changes of commit 62165e0afb - Show all commits

View File

@ -4,9 +4,8 @@
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="3a869f59-290a-4ab2-b036-a878ce801bc4" name="Changes" comment="Forget single schedule">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/core/repositories/timemanager/TaskRepository.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/core/repositories/timemanager/TaskRepository.java" afterDir="false" />
<list default="true" id="3a869f59-290a-4ab2-b036-a878ce801bc4" name="Changes" comment="Fix marking finished task as overdue">
<change beforePath="$PROJECT_DIR$/../frontend/src/app/overdue-task-overview/overdue-task-overview.component.ts" beforeDir="false" afterPath="$PROJECT_DIR$/../frontend/src/app/overdue-task-overview/overdue-task-overview.component.ts" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -260,7 +259,15 @@
<option name="project" value="LOCAL" />
<updated>1698573369764</updated>
</task>
<option name="localTasksCounter" value="20" />
<task id="LOCAL-00020" summary="Fix marking finished task as overdue">
<option name="closed" value="true" />
<created>1698592265846</created>
<option name="number" value="00020" />
<option name="presentableId" value="LOCAL-00020" />
<option name="project" value="LOCAL" />
<updated>1698592265846</updated>
</task>
<option name="localTasksCounter" value="21" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
@ -287,7 +294,8 @@
<MESSAGE value="Check if there is another active schedule when starting task now" />
<MESSAGE value="List missed Schedules" />
<MESSAGE value="Forget single schedule" />
<option name="LAST_COMMIT_MESSAGE" value="Forget single schedule" />
<MESSAGE value="Fix marking finished task as overdue" />
<option name="LAST_COMMIT_MESSAGE" value="Fix marking finished task as overdue" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>

View File

@ -77,8 +77,21 @@ export class OverdueTaskOverviewComponent implements OnInit{
})
}
deleteTask(task: TaskTaskgroupInfo) {
deleteTask(deletedTask: TaskTaskgroupInfo) {
this.taskService.tasksTaskIDDelete(deletedTask.taskID).subscribe({
next: resp => {
this.overdueTasks = this.overdueTasks.filter(task => task.taskID !== deletedTask.taskID);
},
error: err => {
if(err.status == 403) {
this.snackbar.open("No permissions", "", {duration: 2000});
} else if(err.status == 404) {
this.snackbar.open("Not found", "", {duration: 2000});
} else {
this.snackbar.open("Unexpected error", "", {duration: 2000});
}
}
})
}