summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/pages/dashboard/todos/index/todos.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/pages/dashboard/todos/index/todos.js')
-rw-r--r--app/assets/javascripts/pages/dashboard/todos/index/todos.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/app/assets/javascripts/pages/dashboard/todos/index/todos.js b/app/assets/javascripts/pages/dashboard/todos/index/todos.js
index 42341436b55..946076cfb29 100644
--- a/app/assets/javascripts/pages/dashboard/todos/index/todos.js
+++ b/app/assets/javascripts/pages/dashboard/todos/index/todos.js
@@ -4,7 +4,7 @@ import $ from 'jquery';
import { getGroups } from '~/api/groups_api';
import { getProjects } from '~/api/projects_api';
import initDeprecatedJQueryDropdown from '~/deprecated_jquery_dropdown';
-import { deprecatedCreateFlash as flash } from '~/flash';
+import createFlash from '~/flash';
import axios from '~/lib/utils/axios_utils';
import { isMetaClick } from '~/lib/utils/common_utils';
import { addDelimiter } from '~/lib/utils/text_utility';
@@ -103,7 +103,9 @@ export default class Todos {
})
.catch(() => {
this.updateRowState(target, true);
- return flash(__('Error updating status of to-do item.'));
+ return createFlash({
+ message: __('Error updating status of to-do item.'),
+ });
});
}
@@ -145,7 +147,11 @@ export default class Todos {
this.updateAllState(target, data);
this.updateBadges(data);
})
- .catch(() => flash(__('Error updating status for all to-do items.')));
+ .catch(() =>
+ createFlash({
+ message: __('Error updating status for all to-do items.'),
+ }),
+ );
}
updateAllState(target, data) {