diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml
index b19363c12..c1748c8ff 100644
--- a/src/i18n/locale/en.yml
+++ b/src/i18n/locale/en.yml
@@ -1055,114 +1055,6 @@ travel:
warehouse: Warehouse
travelFileDescription: 'Travel id { travelId }'
file: File
-item:
- searchbar:
- label: Search item
- descriptor:
- item: Item
- buyer: Buyer
- color: Color
- category: Category
- stems: Stems
- visible: Visible
- available: Available
- warehouseText: 'Calculated on the warehouse of { warehouseName }'
- itemDiary: Item diary
- producer: Producer
- list:
- id: Identifier
- grouping: Grouping
- packing: Packing
- description: Description
- stems: Stems
- category: Category
- typeName: Type
- intrastat: Intrastat
- isActive: Active
- size: Size
- origin: Origin
- userName: Buyer
- weightByPiece: Weight/Piece
- stemMultiplier: Multiplier
- producer: Producer
- landed: Landed
- basicData:
- type: Type
- reference: Reference
- relevancy: Relevancy
- stems: Stems
- multiplier: Multiplier
- generic: Generic
- intrastat: Intrastat
- expense: Expense
- weightByPiece: Weight/Piece
- boxUnits: Units/Box
- recycledPlastic: Recycled Plastic
- nonRecycledPlastic: Non recycled plastic
- isActive: Active
- hasKgPrice: Price in kg
- isFragile: Fragile
- isFragileTooltip: Is shown at website, app that this item cannot travel (wreath, palms, ...)
- isPhotoRequested: Do photo
- isPhotoRequestedTooltip: This item does need a photo
- description: Description
- fixedPrice:
- itemFk: Item ID
- groupingPrice: Grouping price
- packingPrice: Packing price
- hasMinPrice: Has min price
- minPrice: Min price
- started: Started
- ended: Ended
- warehouse: Warehouse
- create:
- name: Name
- tag: Tag
- priority: Priority
- type: Type
- intrastat: Intrastat
- origin: Origin
- buyRequest:
- ticketId: 'Ticket ID'
- shipped: 'Shipped'
- requester: 'Requester'
- requested: 'Requested'
- price: 'Price'
- attender: 'Attender'
- item: 'Item'
- achieved: 'Achieved'
- concept: 'Concept'
- state: 'State'
- summary:
- basicData: 'Basic data'
- otherData: 'Other data'
- description: 'Description'
- tax: 'Tax'
- tags: 'Tags'
- botanical: 'Botanical'
- barcode: 'Barcode'
- name: 'Nombre'
- completeName: 'Nombre completo'
- family: 'Familia'
- size: 'Medida'
- origin: 'Origen'
- stems: 'Tallos'
- multiplier: 'Multiplicador'
- buyer: 'Comprador'
- doPhoto: 'Do photo'
- intrastatCode: 'Código intrastat'
- intrastat: 'Intrastat'
- ref: 'Referencia'
- relevance: 'Relevancia'
- weight: 'Peso (gramos)/tallo'
- units: 'Unidades/caja'
- expense: 'Gasto'
- generic: 'Genérico'
- recycledPlastic: 'Plástico reciclado'
- nonRecycledPlastic: 'Plástico no reciclado'
- minSalesQuantity: 'Cantidad mínima de venta'
- genus: 'Genus'
- specie: 'Specie'
components:
topbar: {}
itemsFilterPanel:
diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml
index 7c368b7b7..bd414a793 100644
--- a/src/i18n/locale/es.yml
+++ b/src/i18n/locale/es.yml
@@ -1053,114 +1053,6 @@ travel:
warehouse: Almacén
travelFileDescription: 'Id envío { travelId }'
file: Fichero
-item:
- searchbar:
- label: Buscar artículo
- descriptor:
- item: Artículo
- buyer: Comprador
- color: Color
- category: Categoría
- stems: Tallos
- visible: Visible
- available: Disponible
- warehouseText: 'Calculado sobre el almacén de { warehouseName }'
- itemDiary: Registro de compra-venta
- producer: Productor
- list:
- id: Identificador
- grouping: Grouping
- packing: Packing
- description: Descripción
- stems: Tallos
- category: Reino
- typeName: Tipo
- intrastat: Intrastat
- isActive: Activo
- size: Medida
- origin: Origen
- weightByPiece: Peso (gramos)/tallo
- userName: Comprador
- stemMultiplier: Multiplicador
- producer: Productor
- landed: F. entrega
- basicData:
- type: Tipo
- reference: Referencia
- relevancy: Relevancia
- stems: Tallos
- multiplier: Multiplicador
- generic: Genérico
- intrastat: Intrastat
- expense: Gasto
- weightByPiece: Peso (gramos)/tallo
- boxUnits: Unidades/caja
- recycledPlastic: Plastico reciclado
- nonRecycledPlastic: Plático no reciclado
- isActive: Activo
- hasKgPrice: Precio en kg
- isFragile: Frágil
- isFragileTooltip: Se muestra en la web, app que este artículo no puede viajar (coronas, palmas, ...)
- isPhotoRequested: Hacer foto
- isPhotoRequestedTooltip: Este artículo necesita una foto
- description: Descripción
- fixedPrice:
- itemFk: ID Artículo
- groupingPrice: Precio grouping
- packingPrice: Precio packing
- hasMinPrice: Tiene precio mínimo
- minPrice: Precio min
- started: Inicio
- ended: Fin
- warehouse: Almacén
- create:
- name: Nombre
- tag: Etiqueta
- priority: Prioridad
- type: Tipo
- intrastat: Intrastat
- origin: Origen
- summary:
- basicData: 'Datos básicos'
- otherData: 'Otros datos'
- description: 'Descripción'
- tax: 'IVA'
- tags: 'Etiquetas'
- botanical: 'Botánico'
- barcode: 'Código de barras'
- name: 'Nombre'
- completeName: 'Nombre completo'
- family: 'Familia'
- size: 'Medida'
- origin: 'Origen'
- stems: 'Tallos'
- multiplier: 'Multiplicador'
- buyer: 'Comprador'
- doPhoto: 'Hacer foto'
- intrastatCode: 'Código intrastat'
- intrastat: 'Intrastat'
- ref: 'Referencia'
- relevance: 'Relevancia'
- weight: 'Peso (gramos)/tallo'
- units: 'Unidades/caja'
- expense: 'Gasto'
- generic: 'Genérico'
- recycledPlastic: 'Plástico reciclado'
- nonRecycledPlastic: 'Plástico no reciclado'
- minSalesQuantity: 'Cantidad mínima de venta'
- genus: 'Genus'
- specie: 'Specie'
- buyRequest:
- ticketId: 'ID Ticket'
- shipped: 'F. envío'
- requester: 'Solicitante'
- requested: 'Solicitado'
- price: 'Precio'
- attender: 'Comprador'
- item: 'Artículo'
- achieved: 'Conseguido'
- concept: 'Concepto'
- state: 'Estado'
components:
topbar: {}
itemsFilterPanel:
diff --git a/src/pages/Item/Card/ItemDescriptor.vue b/src/pages/Item/Card/ItemDescriptor.vue
index 635dd17c8..243d4c7cb 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') }}
@@ -221,8 +195,6 @@ const openCloneDialog = async () => {
es:
Regularize stock: Regularizar stock
- All its properties will be copied: Todas sus propiedades serán copiadas
- Do you want to clone this item?: ¿Desea clonar este artículo?
Inactive article: Artículo inactivo
diff --git a/src/pages/Item/ItemList.vue b/src/pages/Item/ItemList.vue
index 92c9d188b..cca5560fe 100644
--- a/src/pages/Item/ItemList.vue
+++ b/src/pages/Item/ItemList.vue
@@ -1,27 +1,24 @@
@@ -381,8 +355,6 @@ const openCloneDialog = async () => {
es:
New item: Nuevo artículo
- All its properties will be copied: Todas sus propiedades serán copiadas
- Do you want to clone this item?: ¿Desea clonar este artículo?
Preview: Vista previa
Regularize stock: Regularizar stock
diff --git a/src/pages/Item/composables/cloneItem.js b/src/pages/Item/composables/cloneItem.js
new file mode 100644
index 000000000..2421c0808
--- /dev/null
+++ b/src/pages/Item/composables/cloneItem.js
@@ -0,0 +1,36 @@
+import axios from 'axios';
+import { 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 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('item.descriptor.clone.title'),
+ message: t('item.descriptor.clone.subTitle'),
+ },
+ })
+ .onOk(async () => {
+ await cloneItem(entityId);
+ });
+ };
+ return { openCloneDialog };
+}
diff --git a/src/pages/Item/locale/en.yml b/src/pages/Item/locale/en.yml
index c32ee493c..53310cbd0 100644
--- a/src/pages/Item/locale/en.yml
+++ b/src/pages/Item/locale/en.yml
@@ -88,3 +88,114 @@ itemType:
worker: Worker
category: Category
temperature: Temperature
+item:
+ searchbar:
+ label: Search item
+ descriptor:
+ item: Item
+ buyer: Buyer
+ color: Color
+ category: Category
+ stems: Stems
+ visible: Visible
+ available: Available
+ warehouseText: 'Calculated on the warehouse of { warehouseName }'
+ itemDiary: Item diary
+ producer: Producer
+ clone:
+ title: All its properties will be copied
+ subTitle: Do you want to clone this item?
+ list:
+ id: Identifier
+ grouping: Grouping
+ packing: Packing
+ description: Description
+ stems: Stems
+ category: Category
+ typeName: Type
+ intrastat: Intrastat
+ isActive: Active
+ size: Size
+ origin: Origin
+ userName: Buyer
+ weightByPiece: Weight/Piece
+ stemMultiplier: Multiplier
+ producer: Producer
+ landed: Landed
+ basicData:
+ type: Type
+ reference: Reference
+ relevancy: Relevancy
+ stems: Stems
+ multiplier: Multiplier
+ generic: Generic
+ intrastat: Intrastat
+ expense: Expense
+ weightByPiece: Weight/Piece
+ boxUnits: Units/Box
+ recycledPlastic: Recycled Plastic
+ nonRecycledPlastic: Non recycled plastic
+ isActive: Active
+ hasKgPrice: Price in kg
+ isFragile: Fragile
+ isFragileTooltip: Is shown at website, app that this item cannot travel (wreath, palms, ...)
+ isPhotoRequested: Do photo
+ isPhotoRequestedTooltip: This item does need a photo
+ description: Description
+ fixedPrice:
+ itemFk: Item ID
+ groupingPrice: Grouping price
+ packingPrice: Packing price
+ hasMinPrice: Has min price
+ minPrice: Min price
+ started: Started
+ ended: Ended
+ warehouse: Warehouse
+ create:
+ name: Name
+ tag: Tag
+ priority: Priority
+ type: Type
+ intrastat: Intrastat
+ origin: Origin
+ buyRequest:
+ ticketId: 'Ticket ID'
+ shipped: 'Shipped'
+ requester: 'Requester'
+ requested: 'Requested'
+ price: 'Price'
+ attender: 'Attender'
+ item: 'Item'
+ achieved: 'Achieved'
+ concept: 'Concept'
+ state: 'State'
+ summary:
+ basicData: 'Basic data'
+ otherData: 'Other data'
+ description: 'Description'
+ tax: 'Tax'
+ tags: 'Tags'
+ botanical: 'Botanical'
+ barcode: 'Barcode'
+ name: 'Nombre'
+ completeName: 'Nombre completo'
+ family: 'Familia'
+ size: 'Medida'
+ origin: 'Origen'
+ stems: 'Tallos'
+ multiplier: 'Multiplicador'
+ buyer: 'Comprador'
+ doPhoto: 'Do photo'
+ intrastatCode: 'Código intrastat'
+ intrastat: 'Intrastat'
+ ref: 'Referencia'
+ relevance: 'Relevancia'
+ weight: 'Peso (gramos)/tallo'
+ units: 'Unidades/caja'
+ expense: 'Gasto'
+ generic: 'Genérico'
+ recycledPlastic: 'Plástico reciclado'
+ nonRecycledPlastic: 'Plástico no reciclado'
+ minSalesQuantity: 'Cantidad mínima de venta'
+ genus: 'Genus'
+ specie: 'Specie'
diff --git a/src/pages/Item/locale/es.yml b/src/pages/Item/locale/es.yml
index d32cb7885..1ade9b955 100644
--- a/src/pages/Item/locale/es.yml
+++ b/src/pages/Item/locale/es.yml
@@ -88,3 +88,114 @@ itemType:
worker: Trabajador
category: Reino
temperature: Temperatura
+item:
+ searchbar:
+ label: Buscar artículo
+ descriptor:
+ item: Artículo
+ buyer: Comprador
+ color: Color
+ category: Categoría
+ stems: Tallos
+ visible: Visible
+ available: Disponible
+ warehouseText: 'Calculado sobre el almacén de { warehouseName }'
+ itemDiary: Registro de compra-venta
+ producer: Productor
+ clone:
+ title: Todas sus propiedades serán copiadas
+ subTitle: ¿Desea clonar este artículo?
+ list:
+ id: Identificador
+ grouping: Grouping
+ packing: Packing
+ description: Descripción
+ stems: Tallos
+ category: Reino
+ typeName: Tipo
+ intrastat: Intrastat
+ isActive: Activo
+ size: Medida
+ origin: Origen
+ weightByPiece: Peso (gramos)/tallo
+ userName: Comprador
+ stemMultiplier: Multiplicador
+ producer: Productor
+ landed: F. entrega
+ basicData:
+ type: Tipo
+ reference: Referencia
+ relevancy: Relevancia
+ stems: Tallos
+ multiplier: Multiplicador
+ generic: Genérico
+ intrastat: Intrastat
+ expense: Gasto
+ weightByPiece: Peso (gramos)/tallo
+ boxUnits: Unidades/caja
+ recycledPlastic: Plastico reciclado
+ nonRecycledPlastic: Plático no reciclado
+ isActive: Activo
+ hasKgPrice: Precio en kg
+ isFragile: Frágil
+ isFragileTooltip: Se muestra en la web, app que este artículo no puede viajar (coronas, palmas, ...)
+ isPhotoRequested: Hacer foto
+ isPhotoRequestedTooltip: Este artículo necesita una foto
+ description: Descripción
+ fixedPrice:
+ itemFk: ID Artículo
+ groupingPrice: Precio grouping
+ packingPrice: Precio packing
+ hasMinPrice: Tiene precio mínimo
+ minPrice: Precio min
+ started: Inicio
+ ended: Fin
+ warehouse: Almacén
+ create:
+ name: Nombre
+ tag: Etiqueta
+ priority: Prioridad
+ type: Tipo
+ intrastat: Intrastat
+ origin: Origen
+ summary:
+ basicData: 'Datos básicos'
+ otherData: 'Otros datos'
+ description: 'Descripción'
+ tax: 'IVA'
+ tags: 'Etiquetas'
+ botanical: 'Botánico'
+ barcode: 'Código de barras'
+ name: 'Nombre'
+ completeName: 'Nombre completo'
+ family: 'Familia'
+ size: 'Medida'
+ origin: 'Origen'
+ stems: 'Tallos'
+ multiplier: 'Multiplicador'
+ buyer: 'Comprador'
+ doPhoto: 'Hacer foto'
+ intrastatCode: 'Código intrastat'
+ intrastat: 'Intrastat'
+ ref: 'Referencia'
+ relevance: 'Relevancia'
+ weight: 'Peso (gramos)/tallo'
+ units: 'Unidades/caja'
+ expense: 'Gasto'
+ generic: 'Genérico'
+ recycledPlastic: 'Plástico reciclado'
+ nonRecycledPlastic: 'Plástico no reciclado'
+ minSalesQuantity: 'Cantidad mínima de venta'
+ genus: 'Genus'
+ specie: 'Specie'
+ buyRequest:
+ ticketId: 'ID Ticket'
+ shipped: 'F. envío'
+ requester: 'Solicitante'
+ requested: 'Solicitado'
+ price: 'Precio'
+ attender: 'Comprador'
+ item: 'Artículo'
+ achieved: 'Conseguido'
+ concept: 'Concepto'
+ state: 'Estado'