diff --git a/app/controllers/tasks.js b/app/controllers/tasks.js index 94333d56..bdcfbe04 100644 --- a/app/controllers/tasks.js +++ b/app/controllers/tasks.js @@ -16,6 +16,7 @@ const API_BASE_URL = ENV.BASE_API_URL; export default class TasksController extends Controller { queryParams = ['dev']; @service toast; + @service featureFlag; TASK_KEYS = TASK_KEYS; taskStatusList = TASK_STATUS_LIST; tabsTaskStatusList = TABS_TASK_STATUS_LIST; @@ -42,6 +43,10 @@ export default class TasksController extends Controller { @tracked showFetchButton = this.isShowFetchButton() && !this.alreadyFetched; alreadyFetched = localStorage.getItem('already-fetched'); + get isDevMode() { + return this.featureFlag.isDevMode; + } + @action toggleDropDown() { this.showDropDown = !this.showDropDown; } @@ -93,7 +98,9 @@ export default class TasksController extends Controller { const taskCompletionPercentage = object.percentCompleted; if (taskCompletionPercentage) { if (taskCompletionPercentage === TASK_PERCENTAGE.completedPercentage) { - requestBody.status = 'DONE'; + this.isDevMode === true + ? (requestBody.status = 'DONE') + : (requestBody.status = 'COMPLETED'); } requestBody.percentCompleted = parseInt(taskCompletionPercentage); }