Skip to content

Commit

Permalink
Removed completed label
Browse files Browse the repository at this point in the history
  • Loading branch information
Shubham Sharma committed Jun 1, 2024
1 parent 17c0cad commit bd6ffeb
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions app/components/task/holder.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ export default class TasksHolderComponent extends Component {

constructor() {
super(...arguments);
if (!this.args.dev) {
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
Expand All @@ -30,11 +35,7 @@ export default class TasksHolderComponent extends Component {
const statusToDisplay = this.availabletaskStatusList.filter(
(taskStatus) => {
if (this.args.dev) {
return (
taskStatus.key !== 'ALL' &&
(taskStatus.key !== TASK_KEYS.COMPLETED ||
this.args.task.status === TASK_KEYS.COMPLETED)
);
return taskStatus.key !== 'ALL' && taskStatus.key !== 'COMPLETED';
} else {
return taskStatus.key !== 'ALL' && taskStatus.key !== 'DONE';
}
Expand All @@ -45,13 +46,10 @@ export default class TasksHolderComponent extends Component {

get taskStyleClass() {
const statusNotOverDueList = [
TASK_KEYS.COMPLETED,
this.args.dev ? TASK_KEYS.DONE : TASK_KEYS.COMPLETED,
TASK_KEYS.VERIFIED,
TASK_KEYS.AVAILABLE,
];
if (this.args.dev) {
statusNotOverDueList.push(TASK_KEYS.DONE);
}
if (
this.args.task.endsOn * 1000 < Date.now() &&
!statusNotOverDueList.includes(this.status)
Expand Down

0 comments on commit bd6ffeb

Please sign in to comment.