Skip to content

Commit 550107f

Browse files
committed
fix current subtask class
1 parent 0a133f6 commit 550107f

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

projects/social_platform/src/app/office/courses/task/task/task.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
[attr.data-id]="id"
1616
[ngClass]="{
1717
'progress__task--done': doneTasks().includes(id) || taskService.currentTaskDone(),
18-
'progress__task--current': currentSubTaskId() === id
18+
'progress__task--current': isCurrent(id)
1919
}"
2020
>
2121
<p class="text-body-12">{{ $index + 1 }}</p>

projects/social_platform/src/app/office/courses/task/task/task.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,4 +171,8 @@ export class TaskComponent implements OnInit {
171171

172172
return [...new Set([...serverDone, ...localDone])];
173173
});
174+
175+
isCurrent(subTaskId: number) {
176+
return this.currentSubTaskId() === subTaskId;
177+
}
174178
}

0 commit comments

Comments
 (0)