diff --git a/src/components/CategoriesTable.vue b/src/components/CategoriesTable.vue
index 9420464..84d1065 100644
--- a/src/components/CategoriesTable.vue
+++ b/src/components/CategoriesTable.vue
@@ -1,7 +1,7 @@
diff --git a/src/components/DeleteCategories.vue b/src/components/DeleteCategories.vue
new file mode 100644
index 0000000..aa7dd30
--- /dev/null
+++ b/src/components/DeleteCategories.vue
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+ Are you absolutely sure you want to delete the {{ ids.length }} selected categories? This
+ is unrecoverable.
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/stores/categories.ts b/src/stores/categories.ts
index d3d54e8..76fe5db 100644
--- a/src/stores/categories.ts
+++ b/src/stores/categories.ts
@@ -46,10 +46,19 @@ export const useCategoriesStore = defineStore('categories', () => {
})
}
+ const deleteCategories = async (ids: number[]): Promise => {
+ return await fetch(`${api.url}/category`, {
+ ...api.options,
+ method: 'DELETE',
+ body: JSON.stringify({ ids })
+ })
+ }
+
return {
getCategories,
postCategory,
deleteCategory,
+ deleteCategories,
updateSkipTake,
updateSort
}
diff --git a/src/views/CategoriesView.vue b/src/views/CategoriesView.vue
index ab0a7c2..a76604a 100644
--- a/src/views/CategoriesView.vue
+++ b/src/views/CategoriesView.vue
@@ -1,6 +1,7 @@