Skip to content

Commit

Permalink
Bug : Fixed task red issue on my site
Browse files Browse the repository at this point in the history
  • Loading branch information
joyguptaa committed Dec 14, 2023
1 parent 55e9ce7 commit dcb2df2
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions app/components/task/holder.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,20 @@ export default class TasksHolderComponent extends Component {
TASK_KEYS = TASK_KEYS;
availabletaskStatusList = TASK_STATUS_LIST;

constructor() {
super(...arguments);
if (this.args.dev) {
this.status =
this.args.task.status === TASK_KEYS.COMPLETED
? TASK_KEYS.DONE
: this.args.task.status;
} else {
this.status =
this.args.task.status === TASK_KEYS.DONE
? TASK_KEYS.COMPLETED
: this.args.task.status;
}
}
get taskStatusList() {
const statusToDisplay = this.availabletaskStatusList.filter(
(taskStatus) => {
Expand All @@ -35,7 +49,7 @@ export default class TasksHolderComponent extends Component {
];
if (
this.args.task.endsOn * 1000 < Date.now() &&
!statusNotOverDueList.includes(this.args.task.status)
!statusNotOverDueList.includes(this.status)
) {
return 'task-late';
} else return '';
Expand Down Expand Up @@ -85,7 +99,7 @@ export default class TasksHolderComponent extends Component {
}

get isProgressBarDisabled() {
return this.args.task.status !== TASK_KEYS.IN_PROGRESS;
return this.status !== TASK_KEYS.IN_PROGRESS;
}

@action
Expand Down

0 comments on commit dcb2df2

Please sign in to comment.