diff --git a/src/pages/Item/Card/ItemDescriptor.vue b/src/pages/Item/Card/ItemDescriptor.vue
index 635dd17c8..6fbc5a4bd 100644
--- a/src/pages/Item/Card/ItemDescriptor.vue
+++ b/src/pages/Item/Card/ItemDescriptor.vue
@@ -1,20 +1,18 @@
@@ -144,7 +118,7 @@ const openCloneDialog = async () => {
-
+
{{ t('globals.clone') }}
diff --git a/src/pages/Item/ItemList.vue b/src/pages/Item/ItemList.vue
index 92c9d188b..30b86bc11 100644
--- a/src/pages/Item/ItemList.vue
+++ b/src/pages/Item/ItemList.vue
@@ -1,27 +1,24 @@
diff --git a/src/pages/Item/composables/cloneItem.js b/src/pages/Item/composables/cloneItem.js
new file mode 100644
index 000000000..f1114c779
--- /dev/null
+++ b/src/pages/Item/composables/cloneItem.js
@@ -0,0 +1,38 @@
+import axios from 'axios';
+import { computed, ref, onMounted } from 'vue';
+import { useRoute, useRouter } from 'vue-router';
+import { useI18n } from 'vue-i18n';
+import { useQuasar } from 'quasar';
+import VnConfirm from 'components/ui/VnConfirm.vue';
+
+export function cloneItem() {
+ const { t } = useI18n();
+
+ const quasar = useQuasar();
+ const route = useRoute();
+ const router = useRouter();
+ const cloneItem = async (entityId) => {
+ const { id } = entityId;
+ try {
+ const { data } = await axios.post(`Items/${id ?? entityId}/clone`);
+ router.push({ name: 'ItemTags', params: { id: data.id } });
+ } catch (err) {
+ console.error('Error cloning item');
+ }
+ };
+
+ const openCloneDialog = async (entityId) => {
+ quasar
+ .dialog({
+ component: VnConfirm,
+ componentProps: {
+ title: t('All its properties will be copied'),
+ message: t('Do you want to clone this item?'),
+ },
+ })
+ .onOk(async () => {
+ await cloneItem(entityId);
+ });
+ };
+ return { openCloneDialog };
+}