- Estrazione dei dati da Amazon
- Ciclo di Estrapolazione di tutti i prodotti ed aggiornamento dei campi scraped e scraped_updated - Creazione file CSV con i campi modificati.
This commit is contained in:
@@ -2500,6 +2500,7 @@ export const shared_consts = {
|
|||||||
SCHEDA_PRODOTTO: {
|
SCHEDA_PRODOTTO: {
|
||||||
CMD_NONE: 0,
|
CMD_NONE: 0,
|
||||||
CMD_MODIFICA: 1,
|
CMD_MODIFICA: 1,
|
||||||
|
CMD_SCHEDA: 2,
|
||||||
},
|
},
|
||||||
|
|
||||||
VISU_SEARCHPROD_MODE: {
|
VISU_SEARCHPROD_MODE: {
|
||||||
|
|||||||
@@ -20,4 +20,15 @@
|
|||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.custom-flat-button {
|
||||||
|
border: 1px solid #0078D4; /* Colore del bordo */
|
||||||
|
background-color: transparent; /* Rendi il background trasparente */
|
||||||
|
color: #0078D4; /* Colore dell'icona e del testo */
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-flat-button:hover {
|
||||||
|
background-color: rgba(0, 120, 212, 0.1); /* Aggiungi un colore di hover, se desideri */
|
||||||
|
border-color: #005A8C; /* Colore del bordo al passaggio del mouse */
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,9 +1,18 @@
|
|||||||
import { PropType, computed, defineComponent, onMounted, ref, watch } from 'vue';
|
import {
|
||||||
|
PropType,
|
||||||
|
computed,
|
||||||
|
defineComponent,
|
||||||
|
onMounted,
|
||||||
|
ref,
|
||||||
|
watch,
|
||||||
|
} from 'vue';
|
||||||
import draggable from 'vuedraggable';
|
import draggable from 'vuedraggable';
|
||||||
|
|
||||||
import { tools } from '@tools';
|
import { tools } from '@tools';
|
||||||
|
|
||||||
import { useRouter } from 'vue-router'
|
import { useQuasar } from 'quasar';
|
||||||
|
|
||||||
|
import { useRouter } from 'vue-router';
|
||||||
import { useGlobalStore } from '@src/store/globalStore';
|
import { useGlobalStore } from '@src/store/globalStore';
|
||||||
import { useProducts } from '@src/store/productStore';
|
import { useProducts } from '@src/store/productStore';
|
||||||
|
|
||||||
@@ -58,12 +67,14 @@ export default defineComponent({
|
|||||||
// Copia locale della lista_prodotti per manipolazione interna
|
// Copia locale della lista_prodotti per manipolazione interna
|
||||||
const internalProducts = ref([...(props.lista_prodotti || [])]);
|
const internalProducts = ref([...(props.lista_prodotti || [])]);
|
||||||
|
|
||||||
const productStore = useProducts()
|
const productStore = useProducts();
|
||||||
|
|
||||||
const $router = useRouter()
|
const $router = useRouter();
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
|
const $q = useQuasar();
|
||||||
|
|
||||||
const globalStore = useGlobalStore();
|
const globalStore = useGlobalStore();
|
||||||
const products = useProducts();
|
const products = useProducts();
|
||||||
|
|
||||||
@@ -117,7 +128,24 @@ export default defineComponent({
|
|||||||
|
|
||||||
// Colonne della tabella
|
// Colonne della tabella
|
||||||
const allColumns_Raccolta = ref([
|
const allColumns_Raccolta = ref([
|
||||||
{ name: 'pos', label: 'Ind', field: 'pos', align: 'left', style: 'width: 50px', notsortable: true },
|
{
|
||||||
|
name: 'pos',
|
||||||
|
label: 'Ind',
|
||||||
|
field: 'pos',
|
||||||
|
align: 'left',
|
||||||
|
style: 'width: 50px',
|
||||||
|
notsortable: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'edit',
|
||||||
|
label: 'Mod',
|
||||||
|
field: '',
|
||||||
|
align: 'left',
|
||||||
|
style: 'width: 50px',
|
||||||
|
edit: true,
|
||||||
|
noexp: true,
|
||||||
|
notsortable: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'drag',
|
name: 'drag',
|
||||||
label: 'Ord',
|
label: 'Ord',
|
||||||
@@ -128,16 +156,63 @@ export default defineComponent({
|
|||||||
noexp: true,
|
noexp: true,
|
||||||
notsortable: true,
|
notsortable: true,
|
||||||
},
|
},
|
||||||
{ name: 'image', label: 'Foto', field: 'image', align: 'center', noexp: true, notsortable: true },
|
{
|
||||||
|
name: 'image',
|
||||||
|
label: 'Foto',
|
||||||
|
field: 'image',
|
||||||
|
align: 'center',
|
||||||
|
noexp: true,
|
||||||
|
notsortable: true,
|
||||||
|
},
|
||||||
{ name: 'title', label: 'Titolo', field: 'title', align: 'left' },
|
{ name: 'title', label: 'Titolo', field: 'title', align: 'left' },
|
||||||
{ name: 'pdf_generato', label: 'Generato', field: 'pdf_generato', align: 'center' },
|
{
|
||||||
{ name: 'data_generato', label: 'Data Generato', field: 'data_generato', align: 'center' },
|
name: 'pdf_generato',
|
||||||
{ name: 'pdf_generato_stampa', label: 'Generato Stampa', field: 'pdf_generato_stampa', align: 'center' },
|
label: 'Generato',
|
||||||
{ name: 'data_generato_stampa', label: 'Data Generato Stampa', field: 'data_generato_stampa', align: 'center' },
|
field: 'pdf_generato',
|
||||||
{ name: 'pdf_online', label: 'PDF OnLine', field: 'pdf_online', align: 'center' },
|
align: 'center',
|
||||||
{ name: 'pdf_online_stampa', label: 'PDF OnLine Stampa', field: 'pdf_online_stampa', align: 'center' },
|
},
|
||||||
{ name: 'data_online', label: 'Data Online', field: 'data_online', align: 'center' },
|
{
|
||||||
{ name: 'data_online_stampa', label: 'Data Online Stampa', field: 'data_online_stampa', align: 'center' },
|
name: 'data_generato',
|
||||||
|
label: 'Data Generato',
|
||||||
|
field: 'data_generato',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'pdf_generato_stampa',
|
||||||
|
label: 'Generato Stampa',
|
||||||
|
field: 'pdf_generato_stampa',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'data_generato_stampa',
|
||||||
|
label: 'Data Generato Stampa',
|
||||||
|
field: 'data_generato_stampa',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'pdf_online',
|
||||||
|
label: 'PDF OnLine',
|
||||||
|
field: 'pdf_online',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'pdf_online_stampa',
|
||||||
|
label: 'PDF OnLine Stampa',
|
||||||
|
field: 'pdf_online_stampa',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'data_online',
|
||||||
|
label: 'Data Online',
|
||||||
|
field: 'data_online',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'data_online_stampa',
|
||||||
|
label: 'Data Online Stampa',
|
||||||
|
field: 'data_online_stampa',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'actions',
|
name: 'actions',
|
||||||
label: 'Azioni',
|
label: 'Azioni',
|
||||||
@@ -150,7 +225,24 @@ export default defineComponent({
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
const allColumns_Catalog = ref([
|
const allColumns_Catalog = ref([
|
||||||
{ name: 'pos', label: 'Ind', field: 'pos', align: 'left', style: 'width: 50px', notsortable: true },
|
{
|
||||||
|
name: 'pos',
|
||||||
|
label: 'Ind',
|
||||||
|
field: 'pos',
|
||||||
|
align: 'left',
|
||||||
|
style: 'width: 50px',
|
||||||
|
notsortable: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'edit',
|
||||||
|
label: 'Mod',
|
||||||
|
field: '',
|
||||||
|
align: 'left',
|
||||||
|
style: 'width: 50px',
|
||||||
|
edit: true,
|
||||||
|
noexp: true,
|
||||||
|
notsortable: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'drag',
|
name: 'drag',
|
||||||
label: 'Ord',
|
label: 'Ord',
|
||||||
@@ -161,37 +253,156 @@ export default defineComponent({
|
|||||||
noexp: true,
|
noexp: true,
|
||||||
notsortable: true,
|
notsortable: true,
|
||||||
},
|
},
|
||||||
{ name: 'validato', label: 'Val', field: 'validato', align: 'left', style: '' },
|
{
|
||||||
{ name: 'scraped', label: 'Estratto', field: 'scraped', align: 'left', style: '' },
|
name: 'validato',
|
||||||
{ name: 'image', label: 'Foto', field: 'image', align: 'center', noexp: true, notsortable: true },
|
label: 'Val',
|
||||||
|
field: 'validato',
|
||||||
|
align: 'left',
|
||||||
|
style: '',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'scraped',
|
||||||
|
label: 'Estratto',
|
||||||
|
field: 'scraped',
|
||||||
|
align: 'left',
|
||||||
|
style: '',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'scraped_error',
|
||||||
|
label: 'Err estrazione',
|
||||||
|
field: 'scraped_error',
|
||||||
|
align: 'left',
|
||||||
|
style: '',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'image',
|
||||||
|
label: 'Foto',
|
||||||
|
field: 'image',
|
||||||
|
align: 'center',
|
||||||
|
noexp: true,
|
||||||
|
notsortable: true,
|
||||||
|
},
|
||||||
{ name: 'name', label: 'Titolo', field: 'name', align: 'left' },
|
{ name: 'name', label: 'Titolo', field: 'name', align: 'left' },
|
||||||
{ name: 'sottotitolo', label: 'Sottotitolo', field: 'sottotitolo', align: 'left' },
|
{
|
||||||
|
name: 'sottotitolo',
|
||||||
|
label: 'Sottotitolo',
|
||||||
|
field: 'sottotitolo',
|
||||||
|
align: 'left',
|
||||||
|
},
|
||||||
{ name: 'authors', label: 'Autore', field: 'authors', align: 'left' },
|
{ name: 'authors', label: 'Autore', field: 'authors', align: 'left' },
|
||||||
{ name: 'isbn', label: 'ISBN', field: 'isbn', align: 'left' },
|
{ name: 'isbn', label: 'ISBN', field: 'isbn', align: 'left' },
|
||||||
{ name: 'trafiletto', label: 'Sinossi', field: 'trafiletto', align: 'left' },
|
{
|
||||||
{ name: 'catprods', label: 'Argomento', field: 'catprods', align: 'left' },
|
name: 'trafiletto',
|
||||||
|
label: 'Sinossi',
|
||||||
|
field: 'trafiletto',
|
||||||
|
align: 'left',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'catprods',
|
||||||
|
label: 'Argomento',
|
||||||
|
field: 'catprods',
|
||||||
|
align: 'left',
|
||||||
|
},
|
||||||
{ name: 'edizione', label: 'Edizione', field: 'edizione', align: 'left' },
|
{ name: 'edizione', label: 'Edizione', field: 'edizione', align: 'left' },
|
||||||
{ name: 'casaeditrice', label: 'Casa Editrice', field: 'casaeditrice', align: 'left' },
|
{
|
||||||
{ name: 'idCollana', label: 'Collana', field: 'idCollana', align: 'left' },
|
name: 'casaeditrice',
|
||||||
|
label: 'Casa Editrice',
|
||||||
|
field: 'casaeditrice',
|
||||||
|
align: 'left',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'idCollana',
|
||||||
|
label: 'Collana',
|
||||||
|
field: 'idCollana',
|
||||||
|
align: 'left',
|
||||||
|
},
|
||||||
{ name: 'stato', label: 'Stato', field: 'stato', align: 'left' },
|
{ name: 'stato', label: 'Stato', field: 'stato', align: 'left' },
|
||||||
{ name: 'tipologia', label: 'Tipologia', field: 'tipologia', align: 'left' },
|
{
|
||||||
{ name: 'tipoformato', label: 'Formato', field: 'tipoformato', align: 'left' },
|
name: 'tipologia',
|
||||||
|
label: 'Tipologia',
|
||||||
|
field: 'tipologia',
|
||||||
|
align: 'left',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'tipoformato',
|
||||||
|
label: 'Formato',
|
||||||
|
field: 'tipoformato',
|
||||||
|
align: 'left',
|
||||||
|
},
|
||||||
{ name: 'pagine', label: 'Pag.', field: 'pagine', align: 'right' },
|
{ name: 'pagine', label: 'Pag.', field: 'pagine', align: 'right' },
|
||||||
{ name: 'prezzo', label: '€', field: 'prezzo', align: 'right' },
|
{ name: 'prezzo', label: '€', field: 'prezzo', align: 'right' },
|
||||||
{ name: 'prezzo_sconto', label: '€ (sconto)', field: 'prezzo_sconto', align: 'right' },
|
{
|
||||||
{ name: 'date_pub', label: 'Pubblicato', field: 'date_pub', align: 'left' },
|
name: 'prezzo_sconto',
|
||||||
|
label: '€ (sconto)',
|
||||||
|
field: 'prezzo_sconto',
|
||||||
|
align: 'right',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'date_pub',
|
||||||
|
label: 'Pubblicato',
|
||||||
|
field: 'date_pub',
|
||||||
|
align: 'left',
|
||||||
|
},
|
||||||
//{ name: "ranking", label: "Class.", field: "ranking", align: "right" },
|
//{ name: "ranking", label: "Class.", field: "ranking", align: "right" },
|
||||||
//{ name: "rank3M", label: "Class. 3M", field: "rank3M", align: "right", visu: costanti.VISUCAMPI.PER_EDITORE },
|
//{ name: "rank3M", label: "Class. 3M", field: "rank3M", align: "right", visu: costanti.VISUCAMPI.PER_EDITORE },
|
||||||
//{ name: "rank6M", label: "Class. 6M", field: "rank6M", align: "right", visu: costanti.VISUCAMPI.PER_EDITORE },
|
//{ name: "rank6M", label: "Class. 6M", field: "rank6M", align: "right", visu: costanti.VISUCAMPI.PER_EDITORE },
|
||||||
//{ name: "rank1Y", label: "Class. 1Y", field: "rank1Y", align: "right", visu: costanti.VISUCAMPI.PER_EDITORE },
|
//{ name: "rank1Y", label: "Class. 1Y", field: "rank1Y", align: "right", visu: costanti.VISUCAMPI.PER_EDITORE },
|
||||||
{ name: 'totVen', label: 'Vend', field: 'totVen', align: 'right', visu: costanti.VISUCAMPI.PER_EDITORE },
|
{
|
||||||
{ name: 'vLast6M', label: 'Ven 6M', field: 'vLast6M', align: 'right', visu: costanti.VISUCAMPI.PER_EDITORE },
|
name: 'totVen',
|
||||||
{ name: 'fatLast6M', label: 'Fat 6M', field: 'fatLast6M', align: 'right', visu: costanti.VISUCAMPI.PER_EDITORE },
|
label: 'Vend',
|
||||||
{ name: 'fatLast1Y', label: 'Fat 1A', field: 'fatLast1Y', align: 'right', visu: costanti.VISUCAMPI.PER_EDITORE },
|
field: 'totVen',
|
||||||
{ name: 'fatLast2Y', label: 'Fat 2A', field: 'fatLast2Y', align: 'right', visu: costanti.VISUCAMPI.PER_EDITORE },
|
align: 'right',
|
||||||
{ name: 'totFat', label: 'Fat 5A', field: 'totFat', align: 'right', visu: costanti.VISUCAMPI.PER_EDITORE },
|
visu: costanti.VISUCAMPI.PER_EDITORE,
|
||||||
{ name: 'ult_ord', label: 'Ult. Ordine', field: 'ult_ord', align: 'left', visu: costanti.VISUCAMPI.PER_EDITORE },
|
},
|
||||||
{ name: 'quantity', label: 'Magazz.', field: 'quantity', align: 'right', visu: costanti.VISUCAMPI.PER_EDITORE },
|
{
|
||||||
|
name: 'vLast6M',
|
||||||
|
label: 'Ven 6M',
|
||||||
|
field: 'vLast6M',
|
||||||
|
align: 'right',
|
||||||
|
visu: costanti.VISUCAMPI.PER_EDITORE,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'fatLast6M',
|
||||||
|
label: 'Fat 6M',
|
||||||
|
field: 'fatLast6M',
|
||||||
|
align: 'right',
|
||||||
|
visu: costanti.VISUCAMPI.PER_EDITORE,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'fatLast1Y',
|
||||||
|
label: 'Fat 1A',
|
||||||
|
field: 'fatLast1Y',
|
||||||
|
align: 'right',
|
||||||
|
visu: costanti.VISUCAMPI.PER_EDITORE,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'fatLast2Y',
|
||||||
|
label: 'Fat 2A',
|
||||||
|
field: 'fatLast2Y',
|
||||||
|
align: 'right',
|
||||||
|
visu: costanti.VISUCAMPI.PER_EDITORE,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'totFat',
|
||||||
|
label: 'Fat 5A',
|
||||||
|
field: 'totFat',
|
||||||
|
align: 'right',
|
||||||
|
visu: costanti.VISUCAMPI.PER_EDITORE,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'ult_ord',
|
||||||
|
label: 'Ult. Ordine',
|
||||||
|
field: 'ult_ord',
|
||||||
|
align: 'left',
|
||||||
|
visu: costanti.VISUCAMPI.PER_EDITORE,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'quantity',
|
||||||
|
label: 'Magazz.',
|
||||||
|
field: 'quantity',
|
||||||
|
align: 'right',
|
||||||
|
visu: costanti.VISUCAMPI.PER_EDITORE,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'actions',
|
name: 'actions',
|
||||||
label: 'Azioni',
|
label: 'Azioni',
|
||||||
@@ -210,7 +421,9 @@ export default defineComponent({
|
|||||||
if (props.table === shared_consts.TABLES_CATALOG) {
|
if (props.table === shared_consts.TABLES_CATALOG) {
|
||||||
selectedColumns.value = selectedColumns_Catalogs.value;
|
selectedColumns.value = selectedColumns_Catalogs.value;
|
||||||
} else {
|
} else {
|
||||||
selectedColumns.value = tools.isUtente() ? selectedColumns_Utenti.value : selectedColumns_Editori.value;
|
selectedColumns.value = tools.isUtente()
|
||||||
|
? selectedColumns_Utenti.value
|
||||||
|
: selectedColumns_Editori.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
addstr.value = tools.addstrCookie(props.table);
|
addstr.value = tools.addstrCookie(props.table);
|
||||||
@@ -295,7 +508,10 @@ export default defineComponent({
|
|||||||
switch (field.field) {
|
switch (field.field) {
|
||||||
case 'image':
|
case 'image':
|
||||||
return element.productInfo?.imagefile
|
return element.productInfo?.imagefile
|
||||||
? tools.getFullFileNameByImageFile('productInfos', element.productInfo?.imagefile)
|
? tools.getFullFileNameByImageFile(
|
||||||
|
'productInfos',
|
||||||
|
element.productInfo?.imagefile
|
||||||
|
)
|
||||||
: element.productInfo?.image_link;
|
: element.productInfo?.image_link;
|
||||||
|
|
||||||
case 'name':
|
case 'name':
|
||||||
@@ -318,12 +534,19 @@ export default defineComponent({
|
|||||||
return element.scraped === true
|
return element.scraped === true
|
||||||
? '<span class="text-bold">SI</span>'
|
? '<span class="text-bold">SI</span>'
|
||||||
: '';
|
: '';
|
||||||
|
case 'scraped_error':
|
||||||
|
return element.scraped_error === true
|
||||||
|
? '<span class="text-bold text-red">ERR</span>'
|
||||||
|
: '';
|
||||||
|
|
||||||
case 'isbn':
|
case 'isbn':
|
||||||
return element.isbn;
|
return element.isbn;
|
||||||
|
|
||||||
case 'trafiletto':
|
case 'trafiletto':
|
||||||
return element.productInfo?.descr_trafiletto_catalogo?.length > 100 ? 'SI' : 'NO';
|
return element.productInfo?.descr_trafiletto_catalogo?.length >
|
||||||
|
100
|
||||||
|
? 'SI'
|
||||||
|
: 'NO';
|
||||||
|
|
||||||
case 'catprods':
|
case 'catprods':
|
||||||
return tools.formatCatProds(element.productInfo?.catprods);
|
return tools.formatCatProds(element.productInfo?.catprods);
|
||||||
@@ -332,19 +555,27 @@ export default defineComponent({
|
|||||||
return element.arrvariazioni?.[0]?.edizione;
|
return element.arrvariazioni?.[0]?.edizione;
|
||||||
|
|
||||||
case 'casaeditrice':
|
case 'casaeditrice':
|
||||||
return products.getCasaEditriceByIdPublisher(element.productInfo?.idPublisher);
|
return products.getCasaEditriceByIdPublisher(
|
||||||
|
element.productInfo?.idPublisher
|
||||||
|
);
|
||||||
|
|
||||||
case 'idCollana':
|
case 'idCollana':
|
||||||
return tools.formatCollane(element.productInfo?.idCollana);
|
return tools.formatCollane(element.productInfo?.idCollana);
|
||||||
|
|
||||||
case 'stato':
|
case 'stato':
|
||||||
return products.getDescrStatiProdottoByIdStatoProdotto(element.productInfo?.idStatoProdotto || '');
|
return products.getDescrStatiProdottoByIdStatoProdotto(
|
||||||
|
element.productInfo?.idStatoProdotto || ''
|
||||||
|
);
|
||||||
|
|
||||||
case 'tipologia':
|
case 'tipologia':
|
||||||
return products.getDescrByIdTipologia(element.arrvariazioni?.[0]?.idTipologia || '');
|
return products.getDescrByIdTipologia(
|
||||||
|
element.arrvariazioni?.[0]?.idTipologia || ''
|
||||||
|
);
|
||||||
|
|
||||||
case 'tipoformato':
|
case 'tipoformato':
|
||||||
return products.getDescrByIdTipoFormato(element.arrvariazioni?.[0]?.idTipoFormato || '');
|
return products.getDescrByIdTipoFormato(
|
||||||
|
element.arrvariazioni?.[0]?.idTipoFormato || ''
|
||||||
|
);
|
||||||
|
|
||||||
case 'date_pub':
|
case 'date_pub':
|
||||||
return tools.getstrDate(element.productInfo?.date_pub);
|
return tools.getstrDate(element.productInfo?.date_pub);
|
||||||
@@ -353,7 +584,9 @@ export default defineComponent({
|
|||||||
return element.price ? '€ ' + element.price.toFixed(2) : '';
|
return element.price ? '€ ' + element.price.toFixed(2) : '';
|
||||||
|
|
||||||
case 'prezzo_sconto':
|
case 'prezzo_sconto':
|
||||||
return element.sale_price ? '€ ' + element.sale_price.toFixed(2) : '';
|
return element.sale_price
|
||||||
|
? '€ ' + element.sale_price.toFixed(2)
|
||||||
|
: '';
|
||||||
|
|
||||||
case 'rank3M':
|
case 'rank3M':
|
||||||
return element.productInfo?.rank3M;
|
return element.productInfo?.rank3M;
|
||||||
@@ -386,7 +619,10 @@ export default defineComponent({
|
|||||||
return tools.getstrDate(element.productInfo?.dataUltimoOrdine);
|
return tools.getstrDate(element.productInfo?.dataUltimoOrdine);
|
||||||
|
|
||||||
case 'quantity':
|
case 'quantity':
|
||||||
if (tools.isUtente()) return tools.getDescrQuantitàByQuantity(element.arrvariazioni?.[0]?.quantita);
|
if (tools.isUtente())
|
||||||
|
return tools.getDescrQuantitàByQuantity(
|
||||||
|
element.arrvariazioni?.[0]?.quantita
|
||||||
|
);
|
||||||
else return element.arrvariazioni?.[0]?.quantita;
|
else return element.arrvariazioni?.[0]?.quantita;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -403,7 +639,9 @@ export default defineComponent({
|
|||||||
if (!element) return '';
|
if (!element) return '';
|
||||||
switch (field.field) {
|
switch (field.field) {
|
||||||
case 'trafiletto':
|
case 'trafiletto':
|
||||||
return element.productInfo?.descr_trafiletto_catalogo?.length > 100 ? 'text-green' : 'text-red';
|
return element.productInfo?.descr_trafiletto_catalogo?.length > 100
|
||||||
|
? 'text-green'
|
||||||
|
: 'text-red';
|
||||||
|
|
||||||
case 'stato':
|
case 'stato':
|
||||||
if (products.isProssimaUscita(element.productInfo)) {
|
if (products.isProssimaUscita(element.productInfo)) {
|
||||||
@@ -420,7 +658,9 @@ export default defineComponent({
|
|||||||
case 'validato':
|
case 'validato':
|
||||||
if (element.validaprod?.esito === costanti.VALIDATO.SI) {
|
if (element.validaprod?.esito === costanti.VALIDATO.SI) {
|
||||||
return 'bg-green';
|
return 'bg-green';
|
||||||
} else if (element.validaprod?.esito === costanti.VALIDATO.TO_RESOLV) {
|
} else if (
|
||||||
|
element.validaprod?.esito === costanti.VALIDATO.TO_RESOLV
|
||||||
|
) {
|
||||||
return 'bg-red';
|
return 'bg-red';
|
||||||
} else {
|
} else {
|
||||||
return 'bg-grey';
|
return 'bg-grey';
|
||||||
@@ -514,6 +754,7 @@ export default defineComponent({
|
|||||||
: [
|
: [
|
||||||
'pos',
|
'pos',
|
||||||
'drag',
|
'drag',
|
||||||
|
'edit',
|
||||||
'validato',
|
'validato',
|
||||||
'image',
|
'image',
|
||||||
'name',
|
'name',
|
||||||
@@ -547,7 +788,9 @@ export default defineComponent({
|
|||||||
]
|
]
|
||||||
);
|
);
|
||||||
const selectedColumns_Catalogs = ref(
|
const selectedColumns_Catalogs = ref(
|
||||||
cookieValue.length > 0 ? cookieValue : ['pos', 'drag', 'image', 'title', 'pdf_generato', 'actions']
|
cookieValue.length > 0
|
||||||
|
? cookieValue
|
||||||
|
: ['pos', 'drag', 'image', 'title', 'pdf_generato', 'actions']
|
||||||
);
|
);
|
||||||
|
|
||||||
const selectedColumns = ref([]);
|
const selectedColumns = ref([]);
|
||||||
@@ -564,7 +807,8 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
const ok =
|
const ok =
|
||||||
allColumns.value.some((col) => col.name === column) &&
|
allColumns.value.some((col) => col.name === column) &&
|
||||||
(!props.optcatalogo.showListaArgomenti || (props.optcatalogo.showListaArgomenti && !column.edit));
|
(!props.optcatalogo.showListaArgomenti ||
|
||||||
|
(props.optcatalogo.showListaArgomenti && !column.edit));
|
||||||
return selectedColumns.value.includes(column) && ok;
|
return selectedColumns.value.includes(column) && ok;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -575,13 +819,32 @@ export default defineComponent({
|
|||||||
|
|
||||||
// Funzione per eliminare un prodotto
|
// Funzione per eliminare un prodotto
|
||||||
const removeProduct = (product) => {
|
const removeProduct = (product) => {
|
||||||
internalProducts.value = internalProducts.value.filter((p: any) => p._id !== product._id);
|
return $q
|
||||||
emit('update:lista_prodotti', internalProducts.value); // Notifica il parent del cambiamento
|
.dialog({
|
||||||
|
message: t('scheda.removeProduct'),
|
||||||
|
html: true,
|
||||||
|
ok: {
|
||||||
|
label: t('dialog.yes'),
|
||||||
|
push: false,
|
||||||
|
},
|
||||||
|
title: '',
|
||||||
|
cancel: true,
|
||||||
|
persistent: false,
|
||||||
|
})
|
||||||
|
.onOk(() => {
|
||||||
|
internalProducts.value = internalProducts.value.filter(
|
||||||
|
(p: any) => p._id !== product._id
|
||||||
|
);
|
||||||
|
emit('update:lista_prodotti', internalProducts.value); // Notifica il parent del cambiamento
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// 8. Salvataggio delle colonne selezionate in un cookie
|
// 8. Salvataggio delle colonne selezionate in un cookie
|
||||||
const saveSelectedColumns = () => {
|
const saveSelectedColumns = () => {
|
||||||
tools.setCookie(addstr.value + 'selColCat_2', JSON.stringify(selectedColumns.value));
|
tools.setCookie(
|
||||||
|
addstr.value + 'selColCat_2',
|
||||||
|
JSON.stringify(selectedColumns.value)
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 9. Watcher per salvare automaticamente le preferenze quando cambiano
|
// 9. Watcher per salvare automaticamente le preferenze quando cambiano
|
||||||
@@ -688,11 +951,12 @@ export default defineComponent({
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
updatefromgm.value = true;
|
updatefromgm.value = true;
|
||||||
field_updated_fromGM.value = '';
|
field_updated_fromGM.value = '';
|
||||||
field_updated_fromGM.value = await globalStore.getGM_FieldOf_T_Web_Articoli(
|
field_updated_fromGM.value =
|
||||||
selProd.value.productInfo.sku!,
|
await globalStore.getGM_FieldOf_T_Web_Articoli(
|
||||||
field,
|
selProd.value.productInfo.sku!,
|
||||||
shared_consts.CmdQueryMs.GET
|
field,
|
||||||
);
|
shared_consts.CmdQueryMs.GET
|
||||||
|
);
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -707,32 +971,40 @@ export default defineComponent({
|
|||||||
sortAttribute.value = sortAttributeToSort;
|
sortAttribute.value = sortAttributeToSort;
|
||||||
sortDirection.value = 1;
|
sortDirection.value = 1;
|
||||||
}
|
}
|
||||||
internalProducts.value = internalProducts.value.sort((a: any, b: any) => {
|
internalProducts.value = internalProducts.value.sort(
|
||||||
const aVal = getFieldValue(a, { field: sortAttributeToSort });
|
(a: any, b: any) => {
|
||||||
const bVal = getFieldValue(b, { field: sortAttributeToSort });
|
const aVal = getFieldValue(a, { field: sortAttributeToSort });
|
||||||
if (aVal instanceof Date && bVal instanceof Date) {
|
const bVal = getFieldValue(b, { field: sortAttributeToSort });
|
||||||
return sortDirection.value === 1 ? aVal.getTime() - bVal.getTime() : bVal.getTime() - aVal.getTime();
|
if (aVal instanceof Date && bVal instanceof Date) {
|
||||||
|
return sortDirection.value === 1
|
||||||
|
? aVal.getTime() - bVal.getTime()
|
||||||
|
: bVal.getTime() - aVal.getTime();
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
typeof aVal === 'string' &&
|
||||||
|
typeof bVal === 'string' &&
|
||||||
|
aVal.match(/^\d{1,2}\/\d{1,2}\/\d{4}$/) &&
|
||||||
|
bVal.match(/^\d{1,2}\/\d{1,2}\/\d{4}$/)
|
||||||
|
) {
|
||||||
|
const aDate = new Date(aVal.split('/').reverse().join('-'));
|
||||||
|
const bDate = new Date(bVal.split('/').reverse().join('-'));
|
||||||
|
return sortDirection.value === 1
|
||||||
|
? aDate.getTime() - bDate.getTime()
|
||||||
|
: bDate.getTime() - aDate.getTime();
|
||||||
|
}
|
||||||
|
if (typeof aVal === 'number' && typeof bVal === 'number') {
|
||||||
|
return sortDirection.value === 1 ? aVal - bVal : bVal - aVal;
|
||||||
|
}
|
||||||
|
if (typeof aVal === 'string' && typeof bVal === 'string') {
|
||||||
|
return sortDirection.value === 1
|
||||||
|
? aVal.localeCompare(bVal)
|
||||||
|
: bVal.localeCompare(aVal);
|
||||||
|
}
|
||||||
|
return sortDirection.value === 1
|
||||||
|
? String(aVal).localeCompare(String(bVal))
|
||||||
|
: String(bVal).localeCompare(String(aVal));
|
||||||
}
|
}
|
||||||
if (
|
);
|
||||||
typeof aVal === 'string' &&
|
|
||||||
typeof bVal === 'string' &&
|
|
||||||
aVal.match(/^\d{1,2}\/\d{1,2}\/\d{4}$/) &&
|
|
||||||
bVal.match(/^\d{1,2}\/\d{1,2}\/\d{4}$/)
|
|
||||||
) {
|
|
||||||
const aDate = new Date(aVal.split('/').reverse().join('-'));
|
|
||||||
const bDate = new Date(bVal.split('/').reverse().join('-'));
|
|
||||||
return sortDirection.value === 1 ? aDate.getTime() - bDate.getTime() : bDate.getTime() - aDate.getTime();
|
|
||||||
}
|
|
||||||
if (typeof aVal === 'number' && typeof bVal === 'number') {
|
|
||||||
return sortDirection.value === 1 ? aVal - bVal : bVal - aVal;
|
|
||||||
}
|
|
||||||
if (typeof aVal === 'string' && typeof bVal === 'string') {
|
|
||||||
return sortDirection.value === 1 ? aVal.localeCompare(bVal) : bVal.localeCompare(aVal);
|
|
||||||
}
|
|
||||||
return sortDirection.value === 1
|
|
||||||
? String(aVal).localeCompare(String(bVal))
|
|
||||||
: String(bVal).localeCompare(String(aVal));
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -772,7 +1044,9 @@ export default defineComponent({
|
|||||||
.join('|'),
|
.join('|'),
|
||||||
...internalProducts.value.map((product: any) => {
|
...internalProducts.value.map((product: any) => {
|
||||||
return selectedColumns.value
|
return selectedColumns.value
|
||||||
.filter((col) => !allColumns.value.find((c) => c.name === col)?.noexp)
|
.filter(
|
||||||
|
(col) => !allColumns.value.find((c) => c.name === col)?.noexp
|
||||||
|
)
|
||||||
.map((col: string) => {
|
.map((col: string) => {
|
||||||
const field = { field: col };
|
const field = { field: col };
|
||||||
return field.field === 'pos'
|
return field.field === 'pos'
|
||||||
@@ -783,7 +1057,8 @@ export default defineComponent({
|
|||||||
}),
|
}),
|
||||||
].join('\r\n');
|
].join('\r\n');
|
||||||
|
|
||||||
const filename = 'prodotti_' + new Date().toISOString().slice(0, 10) + '.csv';
|
const filename =
|
||||||
|
'prodotti_' + new Date().toISOString().slice(0, 10) + '.csv';
|
||||||
const blob = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' });
|
const blob = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' });
|
||||||
const link = document.createElement('a');
|
const link = document.createElement('a');
|
||||||
const url = URL.createObjectURL(blob);
|
const url = URL.createObjectURL(blob);
|
||||||
@@ -798,7 +1073,10 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function isSortable(field: string): boolean {
|
function isSortable(field: string): boolean {
|
||||||
return allColumns && !allColumns.value.find((col) => col.name === field)?.notsortable;
|
return (
|
||||||
|
allColumns &&
|
||||||
|
!allColumns.value.find((col) => col.name === field)?.notsortable
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getImageByElement(element) {
|
function getImageByElement(element) {
|
||||||
|
|||||||
@@ -47,12 +47,16 @@
|
|||||||
v-if="isColumnVisible(col.name)"
|
v-if="isColumnVisible(col.name)"
|
||||||
:key="col.name"
|
:key="col.name"
|
||||||
@click="isSortable(col.name) ? sortTable(col.name) : ''"
|
@click="isSortable(col.name) ? sortTable(col.name) : ''"
|
||||||
:style="{ 'background-color': sortAttribute === col.name ? 'yellow' : '' }"
|
:style="{
|
||||||
|
'background-color': sortAttribute === col.name ? 'yellow' : '',
|
||||||
|
}"
|
||||||
>
|
>
|
||||||
<span>{{ col.label }}</span>
|
<span>{{ col.label }}</span>
|
||||||
<span v-if="isSortable(col.name)">
|
<span v-if="isSortable(col.name)">
|
||||||
<q-icon
|
<q-icon
|
||||||
v-if="sortAttribute === col.name && optcatalogo.showListaArgomenti"
|
v-if="
|
||||||
|
sortAttribute === col.name && optcatalogo.showListaArgomenti
|
||||||
|
"
|
||||||
:name="sortDirection === 1 ? 'expand_less' : 'expand_more'"
|
:name="sortDirection === 1 ? 'expand_less' : 'expand_more'"
|
||||||
size="36px"
|
size="36px"
|
||||||
class="q-ml-xs"
|
class="q-ml-xs"
|
||||||
@@ -91,10 +95,14 @@
|
|||||||
>
|
>
|
||||||
<!-- Icona Drag Handle -->
|
<!-- Icona Drag Handle -->
|
||||||
<td v-if="field.name === 'pos' && isColumnVisible('pos')">
|
<td v-if="field.name === 'pos' && isColumnVisible('pos')">
|
||||||
{{
|
<div class="row justify-center">
|
||||||
// put index in the first column
|
<span class="q-ma-sm"
|
||||||
internalProducts.indexOf(element) + 1
|
>{{
|
||||||
}}
|
// put index in the first column
|
||||||
|
internalProducts.indexOf(element) + 1
|
||||||
|
}}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td
|
<td
|
||||||
v-else-if="field.name === 'drag' && isColumnVisible('drag')"
|
v-else-if="field.name === 'drag' && isColumnVisible('drag')"
|
||||||
@@ -106,13 +114,36 @@
|
|||||||
color="primary"
|
color="primary"
|
||||||
/>
|
/>
|
||||||
</td>
|
</td>
|
||||||
|
<td v-else-if="field.name === 'edit' && isColumnVisible('edit')">
|
||||||
|
<span
|
||||||
|
v-if="!tools.isUtente()"
|
||||||
|
class="justify-center"
|
||||||
|
>
|
||||||
|
<q-btn
|
||||||
|
flat
|
||||||
|
rounded
|
||||||
|
outline
|
||||||
|
size="sm"
|
||||||
|
icon="edit"
|
||||||
|
@click="modifyProduct(element)"
|
||||||
|
v-close-popup
|
||||||
|
class="custom-flat-button"
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
|
||||||
<!-- Immagine Piccola -->
|
<!-- Immagine Piccola -->
|
||||||
<td v-else-if="field.name === 'image' && isColumnVisible('image')">
|
<td
|
||||||
|
v-else-if="field.name === 'image' && isColumnVisible('image')"
|
||||||
|
>
|
||||||
<q-img
|
<q-img
|
||||||
:src="
|
:src="
|
||||||
getImageByElement(element)
|
getImageByElement(element)
|
||||||
? tools.getFullFileNameByImageFile(table, getImageByElement(element), element._id)
|
? tools.getFullFileNameByImageFile(
|
||||||
|
table,
|
||||||
|
getImageByElement(element),
|
||||||
|
element._id
|
||||||
|
)
|
||||||
: element.productInfo?.image_link
|
: element.productInfo?.image_link
|
||||||
"
|
"
|
||||||
style="width: 50px; height: 50px"
|
style="width: 50px; height: 50px"
|
||||||
@@ -130,7 +161,11 @@
|
|||||||
<span v-html="getFieldValue(element, field)"></span>
|
<span v-html="getFieldValue(element, field)"></span>
|
||||||
</td>
|
</td>
|
||||||
<!-- Azioni -->
|
<!-- Azioni -->
|
||||||
<td v-else-if="field.name === 'actions' && isColumnVisible('actions', true)">
|
<td
|
||||||
|
v-else-if="
|
||||||
|
field.name === 'actions' && isColumnVisible('actions', true)
|
||||||
|
"
|
||||||
|
>
|
||||||
<q-btn-dropdown
|
<q-btn-dropdown
|
||||||
label="Azioni"
|
label="Azioni"
|
||||||
color="primary"
|
color="primary"
|
||||||
@@ -145,8 +180,12 @@
|
|||||||
>
|
>
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<q-item-label>
|
<q-item-label>
|
||||||
<q-icon name="edit" size="20px" class="q-mr-xs" />
|
<q-icon
|
||||||
Modifica
|
name="edit"
|
||||||
|
size="20px"
|
||||||
|
class="q-mr-xs"
|
||||||
|
/>
|
||||||
|
Scheda
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
@@ -157,7 +196,11 @@
|
|||||||
>
|
>
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<q-item-label>
|
<q-item-label>
|
||||||
<q-icon name="delete" size="20px" class="q-mr-xs" />
|
<q-icon
|
||||||
|
name="delete"
|
||||||
|
size="20px"
|
||||||
|
class="q-mr-xs"
|
||||||
|
/>
|
||||||
Elimina
|
Elimina
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
|
|||||||
@@ -270,6 +270,18 @@ export default defineComponent({
|
|||||||
dense: true,
|
dense: true,
|
||||||
showall: true,
|
showall: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
editOn: true,
|
||||||
|
label: 'Imagefile',
|
||||||
|
table: 'productinfos',
|
||||||
|
id: myproduct.value.productInfo._id, // ID dinamico, da sostituire con il valore reale
|
||||||
|
rec: myproduct.value.productInfo, // Oggetto dinamico, da sostituire con il valore reale
|
||||||
|
mykey: 'imagefile',
|
||||||
|
debounce: '1000',
|
||||||
|
type: costanti.FieldType.string,
|
||||||
|
dense: true,
|
||||||
|
showall: true,
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
return arrlist;
|
return arrlist;
|
||||||
@@ -310,17 +322,6 @@ export default defineComponent({
|
|||||||
type: costanti.FieldType.string,
|
type: costanti.FieldType.string,
|
||||||
dense: true,
|
dense: true,
|
||||||
},
|
},
|
||||||
/*{
|
|
||||||
editOn: true,
|
|
||||||
label: "Pagine",
|
|
||||||
table: "arrvariazioni",
|
|
||||||
id: myproduct.value._id,
|
|
||||||
rec: myproduct.value,
|
|
||||||
mykey: "data_verifica",
|
|
||||||
debounce: "0",
|
|
||||||
type: costanti.FieldType.date,
|
|
||||||
dense: true,
|
|
||||||
},*/
|
|
||||||
{
|
{
|
||||||
editOn: false,
|
editOn: false,
|
||||||
label: 'Pubblicazione',
|
label: 'Pubblicazione',
|
||||||
@@ -478,7 +479,18 @@ export default defineComponent({
|
|||||||
table: 'products',
|
table: 'products',
|
||||||
id: myproduct.value._id,
|
id: myproduct.value._id,
|
||||||
rec: myproduct.value,
|
rec: myproduct.value,
|
||||||
mykey: 'scraped',
|
mykey: 'scraped_date',
|
||||||
|
debounce: '1000',
|
||||||
|
type: costanti.FieldType.data,
|
||||||
|
dense: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
editOn: false,
|
||||||
|
label: 'Err Scraped',
|
||||||
|
table: 'products',
|
||||||
|
id: myproduct.value._id,
|
||||||
|
rec: myproduct.value,
|
||||||
|
mykey: 'scraped_error',
|
||||||
debounce: '1000',
|
debounce: '1000',
|
||||||
type: costanti.FieldType.boolean,
|
type: costanti.FieldType.boolean,
|
||||||
dense: true,
|
dense: true,
|
||||||
@@ -611,6 +623,8 @@ export default defineComponent({
|
|||||||
.then((dataupdated) => {
|
.then((dataupdated) => {
|
||||||
if (dataupdated) {
|
if (dataupdated) {
|
||||||
tools.showPositiveNotif($q, t('dbgm.scrapingOkUpdated'));
|
tools.showPositiveNotif($q, t('dbgm.scrapingOkUpdated'));
|
||||||
|
} else {
|
||||||
|
tools.showNeutralNotif($q, t('dbgm.scrapingNotUpdated'));
|
||||||
}
|
}
|
||||||
return dataupdated;
|
return dataupdated;
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -99,6 +99,7 @@ export interface IVariazione {
|
|||||||
eta?: string
|
eta?: string
|
||||||
validaprod?: IValidaProd
|
validaprod?: IValidaProd
|
||||||
scraped?: boolean
|
scraped?: boolean
|
||||||
|
scraped_error?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IAuthor {
|
export interface IAuthor {
|
||||||
|
|||||||
@@ -2068,12 +2068,14 @@ const msg_it = {
|
|||||||
|
|
||||||
scheda: {
|
scheda: {
|
||||||
isPagIntro: 'Pagina Introduttiva',
|
isPagIntro: 'Pagina Introduttiva',
|
||||||
|
removeProduct: 'Rimuovere il titolo selezionato dalla lista?',
|
||||||
},
|
},
|
||||||
|
|
||||||
dbgm: {
|
dbgm: {
|
||||||
updateLocalDb_OK: 'Dati Aggiornati in locale',
|
updateLocalDb_OK: 'Dati Aggiornati in locale',
|
||||||
updateLocalDb_ERROR: 'Errore aggiornamento singolo libro',
|
updateLocalDb_ERROR: 'Errore aggiornamento singolo libro',
|
||||||
scrapingOkUpdated: 'Dati Aggiornati prelevando dal Web',
|
scrapingOkUpdated: 'Dati Aggiornati prelevando dal Web',
|
||||||
|
scrapingNotUpdated: 'Dati non aggiorrnati (o non trovati!)',
|
||||||
},
|
},
|
||||||
|
|
||||||
queryai: {
|
queryai: {
|
||||||
|
|||||||
@@ -2842,6 +2842,7 @@ export const colTableProducts = [
|
|||||||
AddCol({ name: 'canBeBuyOnline', label_trans: 'products.canBeBuyOnline', fieldtype: costanti.FieldType.boolean }),
|
AddCol({ name: 'canBeBuyOnline', label_trans: 'products.canBeBuyOnline', fieldtype: costanti.FieldType.boolean }),
|
||||||
AddCol({ name: 'validaprod', label_trans: 'products.validaprod', fieldtype: costanti.FieldType.verifica }),
|
AddCol({ name: 'validaprod', label_trans: 'products.validaprod', fieldtype: costanti.FieldType.verifica }),
|
||||||
AddCol({ name: 'scraped', label_trans: 'products.scraped', fieldtype: costanti.FieldType.boolean }),
|
AddCol({ name: 'scraped', label_trans: 'products.scraped', fieldtype: costanti.FieldType.boolean }),
|
||||||
|
AddCol({ name: 'scraped_error', label_trans: 'products.scraped_error', fieldtype: costanti.FieldType.boolean }),
|
||||||
AddCol(DeleteRec),
|
AddCol(DeleteRec),
|
||||||
AddCol(DuplicateRec),
|
AddCol(DuplicateRec),
|
||||||
]
|
]
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1050,9 +1050,11 @@ export const useUserStore = defineStore('UserStore', {
|
|||||||
},
|
},
|
||||||
|
|
||||||
async execDbOp(paramquery: any) {
|
async execDbOp(paramquery: any) {
|
||||||
|
// come faccio a ricevere un file da node.js ?
|
||||||
return Api.SendReq('/users/dbop', 'POST', paramquery, false, false, 0, 5000, null, null, {timeout: 300000})
|
return Api.SendReq('/users/dbop', 'POST', paramquery, false, false, 0, 5000, null, null, {timeout: 300000})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
||||||
|
|
||||||
return res.data
|
return res.data
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
return false
|
return false
|
||||||
|
|||||||
@@ -77,6 +77,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
const risfunz = await userStore.execDbOp({ mydata })
|
const risfunz = await userStore.execDbOp({ mydata })
|
||||||
|
|
||||||
|
|
||||||
$q.loading.hide()
|
$q.loading.hide()
|
||||||
await globalStore.loadSite()
|
await globalStore.loadSite()
|
||||||
|
|
||||||
|
|||||||
@@ -78,6 +78,11 @@ export default defineComponent({
|
|||||||
|
|
||||||
const risfunz = await userStore.execDbOp({ mydata })
|
const risfunz = await userStore.execDbOp({ mydata })
|
||||||
|
|
||||||
|
if (options?.generateCSV) {
|
||||||
|
const today = new Date()
|
||||||
|
tools.createAndDownloadCSVFromData(risfunz.data.mystr.data, `${options?.filename}_${today.getFullYear()}-${today.getMonth() + 1}-${today.getDate()}`)
|
||||||
|
}
|
||||||
|
|
||||||
$q.loading.hide()
|
$q.loading.hide()
|
||||||
await globalStore.loadSite()
|
await globalStore.loadSite()
|
||||||
|
|
||||||
|
|||||||
@@ -68,9 +68,24 @@
|
|||||||
@click="EseguiFunz('removeProductInfoWithoutDateUpdatedFromGM')"
|
@click="EseguiFunz('removeProductInfoWithoutDateUpdatedFromGM')"
|
||||||
></q-btn>
|
></q-btn>
|
||||||
<q-btn
|
<q-btn
|
||||||
label="Estrai dati da Amazon (Scraper)"
|
label="Estrapola ed Aggiorna TUTTI i dati da Amazon (Scraper)"
|
||||||
color="negative"
|
color="negative"
|
||||||
@click="EseguiFunz('ScraperDataAmazon')"
|
@click="EseguiFunz('ScraperMultipleDataAmazon', {update: true, aggiornasoloSeVuoti: true})"
|
||||||
|
></q-btn>
|
||||||
|
<q-btn
|
||||||
|
label="Esporta CSV Dati Mancanti (num.pagine, formato, DataPubbl.)"
|
||||||
|
color="primary"
|
||||||
|
@click="EseguiFunz('ScraperGeneraCSV', {generateCSV: true, filename: 'dati_mancanti'})"
|
||||||
|
></q-btn>
|
||||||
|
<q-btn
|
||||||
|
label="Rimuove Duplicati di ArrVariazioni !"
|
||||||
|
color="negative"
|
||||||
|
@click="EseguiFunz('removeDuplicateVariations')"
|
||||||
|
></q-btn>
|
||||||
|
<q-btn
|
||||||
|
label="Azzera flag 'Estratto' da i Products e ProductInfo"
|
||||||
|
color="negative"
|
||||||
|
@click="EseguiFunz('ScraperAzzeraFlagProducts')"
|
||||||
></q-btn>
|
></q-btn>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
|||||||
Reference in New Issue
Block a user