Skip to content

Commit

Permalink
chore: cleanup task details component
Browse files Browse the repository at this point in the history
  • Loading branch information
DenysVuika committed May 6, 2024
1 parent 5071dde commit e2b5b34
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class ChecklistComponent implements OnChanges {

checklist: TaskDetailsModel[] = [];

constructor(private activitiTaskList: TaskListService, private dialog: MatDialog) {}
constructor(private taskListService: TaskListService, private dialog: MatDialog) {}

ngOnChanges(changes: SimpleChanges) {
const taskId = changes['taskId'];
Expand All @@ -75,7 +75,7 @@ export class ChecklistComponent implements OnChanges {
getTaskChecklist() {
this.checklist = [];
if (this.taskId) {
this.activitiTaskList.getTaskChecklist(this.taskId).subscribe(
this.taskListService.getTaskChecklist(this.taskId).subscribe(
(taskDetailsModel) => {
taskDetailsModel.forEach((task) => {
this.checklist.push(task);
Expand All @@ -100,7 +100,7 @@ export class ChecklistComponent implements OnChanges {
parentTaskId: this.taskId,
assignee: { id: this.assignee }
});
this.activitiTaskList.addTask(newTask).subscribe(
this.taskListService.addTask(newTask).subscribe(
(taskDetailsModel) => {
this.checklist.push(taskDetailsModel);
this.checklistTaskCreated.emit(taskDetailsModel);
Expand All @@ -114,7 +114,7 @@ export class ChecklistComponent implements OnChanges {
}

public delete(taskId: string) {
this.activitiTaskList.deleteTask(taskId).subscribe(
this.taskListService.deleteTask(taskId).subscribe(
() => {
this.checklist = this.checklist.filter((check) => check.id !== taskId);
this.checklistTaskDeleted.emit(taskId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ export class TaskStandaloneComponent {
@Output()
showAttachForm = new EventEmitter<void>();

constructor() {}

onCancelButtonClick(): void {
this.cancel.emit();
}
Expand Down

0 comments on commit e2b5b34

Please sign in to comment.