diff --git a/client/src/containers/Items/ItemCategoriesList.js b/client/src/containers/Items/ItemCategoriesList.js index e15049fa0..55b43bbd2 100644 --- a/client/src/containers/Items/ItemCategoriesList.js +++ b/client/src/containers/Items/ItemCategoriesList.js @@ -106,7 +106,7 @@ const ItemCategoryList = ({ setDeleteCategory(false); AppToaster.show({ message: formatMessage({ - id: 'the_item_category_has_been_successfully_deleted', + id: 'the_item_category_has_been_deleted_successfully', }), intent: Intent.SUCCESS, }); @@ -135,7 +135,7 @@ const ItemCategoryList = ({ setBulkDelete(false); AppToaster.show({ message: formatMessage({ - id: 'the_item_categories_has_been_successfully_deleted', + id: 'the_item_categories_has_been_deleted_successfully', }), intent: Intent.SUCCESS, }); diff --git a/client/src/lang/en/index.js b/client/src/lang/en/index.js index f141cf36c..a36eb76e5 100644 --- a/client/src/lang/en/index.js +++ b/client/src/lang/en/index.js @@ -221,8 +221,8 @@ export default { 'The item category has been successfully created.', the_item_category_has_been_successfully_edited: 'The item category has been successfully edited.', - the_item_category_has_been_successfully_deleted: - 'The item category has been successfully deleted', + the_item_category_has_been_deleted_successfully: + 'The item category has been deleted successfully.', once_delete_these_item_categories_you_will_not_able_restore_them: "Once you delete these categories, you won't be able to retrieve them later. Are you sure you want to delete them?", once_delete_these_views_you_will_not_able_restore_them: @@ -855,4 +855,5 @@ export default { posting_date: 'Posting date', customer: 'Customer', email_is_already_used: 'The email is already used.', + the_item_categories_has_been_deleted_successfully: 'The item categories has been deleted successfully .', }; diff --git a/client/src/store/dashboard/dashboard.reducer.js b/client/src/store/dashboard/dashboard.reducer.js index 1336f48f7..f4565a424 100644 --- a/client/src/store/dashboard/dashboard.reducer.js +++ b/client/src/store/dashboard/dashboard.reducer.js @@ -97,7 +97,8 @@ export default persistReducer({ 'pageSubtitle', 'pageHint', 'preferencesPageTitle', - 'topbarEditViewId' + 'topbarEditViewId', + 'backLink' ], storage, }, reducerInstance); diff --git a/client/src/store/itemCategories/itemsCategory.actions.js b/client/src/store/itemCategories/itemsCategory.actions.js index 4de3b2bce..0c471e6b8 100644 --- a/client/src/store/itemCategories/itemsCategory.actions.js +++ b/client/src/store/itemCategories/itemsCategory.actions.js @@ -78,7 +78,7 @@ export const deleteItemCategory = (id) => { export const deleteBulkItemCategories = ({ ids }) => { return (dispatch) => new Promise((resolve, reject) => { - ApiService.delete(`item_categories/bulk`, { params: { ids } }) + ApiService.delete(`item_categories`, { params: { ids } }) .then((response) => { dispatch({ type: t.ITEM_CATEGORIES_BULK_DELETE, diff --git a/server/src/api/controllers/ItemCategories.ts b/server/src/api/controllers/ItemCategories.ts index 6bdd272e9..064e1e16a 100644 --- a/server/src/api/controllers/ItemCategories.ts +++ b/server/src/api/controllers/ItemCategories.ts @@ -110,7 +110,7 @@ export default class ItemsCategoriesController extends BaseController { */ get categoriesBulkValidationSchema() { return [ - query('ids').isArray({ min: 2 }), + query('ids').isArray({ min: 1 }), query('ids.*').isNumeric().toInt(), ]; }