- Per generare la sinossi è possibile estrarre con 1 click la descrizione sia da Amazon che da GruppoMacro.
- corretto piccolo bug sul catalogo.
This commit is contained in:
@@ -20,6 +20,7 @@ import { CMyValueDb } from '@src/components/CMyValueDb';
|
||||
import { CSchedaProdotto } from '@src/components/CSchedaProdotto';
|
||||
import { CSearchProduct } from '@src/components/CSearchProduct';
|
||||
import { CMyDialog } from '@src/components/CMyDialog';
|
||||
import { CModifTrafiletto } from '@src/components/CModifTrafiletto';
|
||||
|
||||
import { costanti } from '@costanti';
|
||||
import { IAuthor, ICatProd } from 'app/src/model';
|
||||
@@ -42,6 +43,7 @@ export default defineComponent({
|
||||
CViewTable,
|
||||
CLabel,
|
||||
CSchedaProdotto,
|
||||
CModifTrafiletto,
|
||||
},
|
||||
props: {
|
||||
lista_prodotti: {
|
||||
@@ -90,6 +92,7 @@ export default defineComponent({
|
||||
const field_updated_fromGM = ref('');
|
||||
|
||||
const modifOn = ref(false);
|
||||
const modifTrafiletto = ref(false);
|
||||
|
||||
const sortAttribute = ref('');
|
||||
const sortDirection = ref(1);
|
||||
@@ -100,6 +103,10 @@ export default defineComponent({
|
||||
|
||||
function handleUpdate(newList) {
|
||||
internalProducts.value = newList;
|
||||
riaggiornaListaProdAlGenitore()
|
||||
}
|
||||
|
||||
function riaggiornaListaProdAlGenitore() {
|
||||
emit('update:lista_prodotti', internalProducts.value);
|
||||
}
|
||||
|
||||
@@ -545,8 +552,8 @@ export default defineComponent({
|
||||
case 'trafiletto':
|
||||
return element.productInfo?.descr_trafiletto_catalogo?.length >
|
||||
100
|
||||
? 'SI'
|
||||
: 'NO';
|
||||
? 'SI ✏️'
|
||||
: 'NO ✏️';
|
||||
|
||||
case 'catprods':
|
||||
return tools.formatCatProds(element.productInfo?.catprods);
|
||||
@@ -699,6 +706,11 @@ export default defineComponent({
|
||||
if (!element) return {};
|
||||
|
||||
switch (field.field) {
|
||||
case 'trafiletto':
|
||||
return {
|
||||
cursor: 'pointer',
|
||||
textAlign: 'center',
|
||||
};
|
||||
case 'prezzo':
|
||||
case 'prezzo_sconto':
|
||||
return { width: '55px', textAlign: 'right' };
|
||||
@@ -725,11 +737,6 @@ export default defineComponent({
|
||||
textAlign: 'right',
|
||||
};
|
||||
|
||||
case 'trafiletto':
|
||||
return {
|
||||
textAlign: 'center',
|
||||
};
|
||||
|
||||
default:
|
||||
return {};
|
||||
}
|
||||
@@ -910,6 +917,14 @@ export default defineComponent({
|
||||
modifOn.value = true;
|
||||
}
|
||||
}
|
||||
function modifyTrafiletto(element: any) {
|
||||
if (element) {
|
||||
selProd.value = element;
|
||||
|
||||
cmd.value = shared_consts.SCHEDA_PRODOTTO.CMD_MODIFICA;
|
||||
modifTrafiletto.value = true;
|
||||
}
|
||||
}
|
||||
|
||||
function updateProduct(element: any) {
|
||||
selProd.value = element;
|
||||
@@ -941,6 +956,7 @@ export default defineComponent({
|
||||
}
|
||||
return prod;
|
||||
});
|
||||
riaggiornaListaProdAlGenitore()
|
||||
} catch (e) {
|
||||
console.error('err', e);
|
||||
}
|
||||
@@ -1014,6 +1030,8 @@ export default defineComponent({
|
||||
|
||||
function getFieldClick(element: any, field: any): (() => void) | null {
|
||||
switch (field.field) {
|
||||
case 'trafiletto':
|
||||
return () => modifyTrafiletto(element);
|
||||
case 'validato':
|
||||
return () => modifyProduct(element);
|
||||
case 'image':
|
||||
@@ -1124,6 +1142,7 @@ export default defineComponent({
|
||||
loading,
|
||||
showQtaDisponibile,
|
||||
modifOn,
|
||||
modifTrafiletto,
|
||||
updateproductmodif,
|
||||
optionscatalogo,
|
||||
t,
|
||||
|
||||
Reference in New Issue
Block a user