- newsletter: prende la lista utenti (flag news_on)
- Abilita a Tutti la Newsletter news_on - isCommerciale - JobsInProgress - PCB: Corretto Totali che era a zero
This commit is contained in:
@@ -771,6 +771,11 @@
|
||||
color="positive"
|
||||
@click="EseguiFunz('MyElemSetIdPageInsteadThePah')"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
label="Abilita a Tutti la Newsletter news_on !"
|
||||
color="positive"
|
||||
@click="EseguiFunz('EnableNewsOn_ToAll')"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
label="getGM_Lista_Argomenti"
|
||||
color="positive"
|
||||
|
||||
@@ -52,6 +52,16 @@
|
||||
color="accent"
|
||||
@click="EseguiFunz('updateAllBook', {usaDBGMLocale: true, caricatutti: true})"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
label="Statistiche Macro"
|
||||
color="primary"
|
||||
@click="EseguiFunz('StatMacro')"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
label="Cancella Prodotti non piu aggiornati da GM"
|
||||
color="negative"
|
||||
@click="EseguiFunz('removeProductInfoWithoutDateUpdatedFromGM')"
|
||||
></q-btn>
|
||||
|
||||
<!--
|
||||
<q-btn
|
||||
|
||||
@@ -96,7 +96,7 @@ export default defineComponent({
|
||||
|
||||
const generatinglist = ref(false)
|
||||
|
||||
const optrigenera = ref<IOptRigenera>({ visibilitaDisp: costanti.DISP.DISPONIBILI, stato: costanti.STATO.IN_COMMERCIO, rig_mod: false })
|
||||
const optrigenera = ref<IOptRigenera>({ visibilitaDisp: costanti.DISP.DISPONIBILI, stato: costanti.STATO.IN_COMMERCIO, rig_mod: costanti.RIGENERAMOD.SOVRASCRIVI })
|
||||
|
||||
const optcatalogo = ref(<IOptCatalogo>{ ...props.modelValue });
|
||||
|
||||
@@ -567,6 +567,13 @@ export default defineComponent({
|
||||
|
||||
const trovatocatalogo = getCatalogoByMyPage.value
|
||||
|
||||
if (boolfiltroVuotoProductTypes && boolfiltroVuotoExcludeProductTypes && boolfiltroVuotoidTipologie && boolfiltroVuotoidTipoFormato && boolfiltroVuotoEditore && boolfiltroVuotoCollane && boolfiltroVuotoArgomenti
|
||||
&& (catstr === '' )
|
||||
) {
|
||||
// Nessun filtro selezionato, pertanto non mostrare niente!
|
||||
return []
|
||||
}
|
||||
|
||||
const arrris = products
|
||||
.filter((product: IProduct) => {
|
||||
if (!product || !product.productInfo) {
|
||||
@@ -580,7 +587,7 @@ export default defineComponent({
|
||||
|
||||
if (!(optrigenera.value.visibilitaDisp === costanti.DISP.TUTTI ||
|
||||
(optrigenera.value.visibilitaDisp === costanti.DISP.ESAURITI && productStore.isEsaurito(product)) ||
|
||||
(optrigenera.value.visibilitaDisp === costanti.DISP.DISPONIBILI && (productStore.isDisponibile(product) || productStore.isPrevendita(product))))) {
|
||||
(optrigenera.value.visibilitaDisp === costanti.DISP.DISPONIBILI && (productStore.isDisponibile(product) || productStore.isPrevendita(product.productInfo))))) {
|
||||
return false;
|
||||
}
|
||||
if (!(optrigenera.value.stato === costanti.STATO.TUTTI ||
|
||||
@@ -608,9 +615,12 @@ export default defineComponent({
|
||||
if (!optcatalogo.value.showListaArgomenti) {
|
||||
|
||||
} else {
|
||||
hasCategoria = (catstr === costanti.NO_CATEGORY)
|
||||
? (boolfiltroVuotoCat ? se_tutti_veri : product.productInfo.idCatProds.length === 0)
|
||||
: !catstr || (product.productInfo.idCatProds || []).includes(catstr);
|
||||
const isCatVuoto = boolfiltroVuotoCat || (product.productInfo.idCatProds || []).length === 0;
|
||||
const isCatSenzaArgomento = catstr === costanti.NO_CATEGORY;
|
||||
const isCatCorretto = !catstr || (product.productInfo.idCatProds || []).includes(catstr);
|
||||
hasCategoria = (isCatSenzaArgomento && isCatVuoto)
|
||||
? true
|
||||
: isCatCorretto;
|
||||
|
||||
hasArgomentiCat = boolfiltroVuotoArgomenti
|
||||
? se_tutti_veri
|
||||
@@ -1098,11 +1108,13 @@ export default defineComponent({
|
||||
// console.log('indadded', indadded)
|
||||
if (optcatalogo.value.maxnumlibri! > 0) {
|
||||
if (indtotale > optcatalogo.value.maxnumlibri!)
|
||||
return
|
||||
break
|
||||
|
||||
//} else {
|
||||
// if (indtotale > 5000)
|
||||
// return
|
||||
|
||||
|
||||
} else {
|
||||
// if (indtotale > 1000)
|
||||
// break
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1207,7 +1219,8 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
optrigenera.value.visibilitaDisp = tools.getCookie((showListaArgomenti.value ? 'INC_ES_' : '') + 'VIS_DISP', costanti.DISP.DISPONIBILI)
|
||||
optrigenera.value.rig_mod = tools.getCookie((showListaArgomenti.value ? 'INC_ES_' : '') + 'RIG_MOD', costanti.RIGENERAMOD.AGGIUNGI_SOLO)
|
||||
if (!showListaArgomenti.value)
|
||||
optrigenera.value.rig_mod = tools.getCookie((showListaArgomenti.value ? 'INC_ES_' : '') + 'RIG_MOD', costanti.RIGENERAMOD.AGGIUNGI_SOLO)
|
||||
optrigenera.value.stato = tools.getCookie((showListaArgomenti.value ? 'INC_ES_' : '') + 'VIS_STATO', costanti.STATO.IN_COMMERCIO)
|
||||
|
||||
loadpage.value = false
|
||||
|
||||
@@ -8,13 +8,15 @@
|
||||
{{ getTitoloCatalogo() }}
|
||||
</div>
|
||||
<div
|
||||
v-if="ispageCatalogata && tools.isEditor() && getCatalogoByMyPage?.referenti.length > 0"
|
||||
v-if="
|
||||
ispageCatalogata && (tools.isEditor() || tools.isCommerciale()) && getCatalogoByMyPage?.referenti.length > 0
|
||||
"
|
||||
class="text-h7 text-center text-red q-ma-sm"
|
||||
>
|
||||
{{ $t('cataloglist.referenti') }}: <span class="text-bold">{{ getReferentiCatalogo() }}</span>
|
||||
</div>
|
||||
<q-tabs
|
||||
v-if="optcatalogo.pdf && tools.isEditor()"
|
||||
v-if="optcatalogo.pdf && (tools.isEditor() || tools.isCommerciale())"
|
||||
v-model="tabcatalogo"
|
||||
dense
|
||||
class="bg-green text-white"
|
||||
@@ -221,32 +223,6 @@
|
||||
>
|
||||
</q-spinner-tail>
|
||||
</q-inner-loading>
|
||||
<div>
|
||||
<q-btn
|
||||
v-if="optcatalogo.pdf && !optcatalogo.generazionePDFInCorso"
|
||||
:label="`Prepara PDF`"
|
||||
@click="preparePDF"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
v-if="optcatalogo.generazionePDFInCorso"
|
||||
:label="`Termina Generazione`"
|
||||
@click="terminaPDF"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
v-if="optcatalogo.pdf && optcatalogo.generazionePDFInCorso"
|
||||
:label="`Genera PDF ` + getPdfFilename()"
|
||||
@click="generatePDF()"
|
||||
color="positive"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
label="Debug"
|
||||
@click="toggleDebug()"
|
||||
:push="optcatalogo.indebug"
|
||||
:color="optcatalogo.indebug ? `positive` : 'primary'"
|
||||
></q-btn>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row justify-center q-mx-auto bg-blue-1">
|
||||
<div class="text-center">
|
||||
<q-spinner
|
||||
@@ -293,7 +269,7 @@
|
||||
>
|
||||
</q-tab>
|
||||
<q-tab
|
||||
v-if="showListaArgomenti"
|
||||
v-if="showListaArgomenti && false"
|
||||
name="ricerca"
|
||||
icon="fas fa-search"
|
||||
label="Cerca"
|
||||
@@ -305,6 +281,13 @@
|
||||
>1</q-badge
|
||||
>
|
||||
</q-tab>
|
||||
<q-tab
|
||||
v-if="showListaArgomenti"
|
||||
name="genera"
|
||||
icon="fas fa-book"
|
||||
label="Genera"
|
||||
>
|
||||
</q-tab>
|
||||
</q-tabs>
|
||||
<q-tab-panels
|
||||
v-model="tabvisu"
|
||||
@@ -380,6 +363,32 @@
|
||||
/>-->
|
||||
</q-toolbar>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="genera">
|
||||
<div v-if="tools.isEditor() || tools.isCommerciale()">
|
||||
<q-btn
|
||||
v-if="optcatalogo.pdf && !optcatalogo.generazionePDFInCorso"
|
||||
:label="`Prepara PDF`"
|
||||
@click="preparePDF"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
v-if="optcatalogo.generazionePDFInCorso"
|
||||
:label="`Termina Generazione`"
|
||||
@click="terminaPDF"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
v-if="optcatalogo.pdf && optcatalogo.generazionePDFInCorso"
|
||||
:label="`Genera PDF ` + getPdfFilename()"
|
||||
@click="generatePDF()"
|
||||
color="positive"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
label="Debug"
|
||||
@click="toggleDebug()"
|
||||
:push="optcatalogo.indebug"
|
||||
:color="optcatalogo.indebug ? `positive` : 'primary'"
|
||||
></q-btn>
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="ricerca">
|
||||
<div
|
||||
class="col"
|
||||
@@ -785,7 +794,6 @@
|
||||
</pre>
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
|
||||
</div>
|
||||
</q-page>
|
||||
<CMyDialog
|
||||
|
||||
@@ -315,20 +315,20 @@ export default defineComponent({
|
||||
|
||||
watch(() => mostra_codice.value, (newval, oldval) => {
|
||||
tools.setCookie(tools.COOK_SHOWCODICE, mostra_codice.value ? '1' : '0')
|
||||
updateorders(true)
|
||||
updateorders(true, true)
|
||||
})
|
||||
watch(() => mostra_cat.value, (newval, oldval) => {
|
||||
tools.setCookie(tools.COOK_SHOWCAT, mostra_cat.value ? '1' : '0')
|
||||
updateorders(true)
|
||||
updateorders(true, true)
|
||||
})
|
||||
watch(() => showWhichCode.value, (newval, oldval) => {
|
||||
tools.setCookie(tools.COOK_SHOWCODE, showWhichCode.value.toString())
|
||||
updateorders(true)
|
||||
updateorders(true, true)
|
||||
})
|
||||
|
||||
watch(() => mostra_solo_ordini_produttore.value, (newval, oldval) => {
|
||||
tools.setCookie(tools.COOK_SHOWORDPROD, mostra_solo_ordini_produttore.value ? '1' : '0')
|
||||
updateorders(true)
|
||||
updateorders(false, true)
|
||||
})
|
||||
|
||||
// const { setValDb, getValDb } = MixinBase()
|
||||
@@ -381,8 +381,8 @@ export default defineComponent({
|
||||
return listproductstotal
|
||||
}
|
||||
|
||||
function getTotaleOrdineByOrdId(id: string, idGasordine: string): string {
|
||||
return productStore.getTotaleOrdineByOrdId(id, idGasordine, mostra_solo_ordini_produttore.value).toFixed(2)
|
||||
function getTotaleOrdineByOrdId(id: string, idGasordine: string, totale: boolean): string {
|
||||
return productStore.getTotaleOrdineByOrdId(id, idGasordine, totale, mostra_solo_ordini_produttore.value, taborders.value).toFixed(2)
|
||||
}
|
||||
|
||||
function getOrdersCartWithTotals(): any[] {
|
||||
@@ -428,7 +428,7 @@ export default defineComponent({
|
||||
return productStore.getOrdersAllCart(storeGasordine.value)
|
||||
}
|
||||
|
||||
function updateorders(updatetab: boolean) {
|
||||
function updateorders(updatetab: boolean, notupdatetabsel: boolean) {
|
||||
|
||||
// Rimuovi dalla lista columns_listaTotali il record "codice_interno" se mostra_codice.value = false
|
||||
columns_listafiltrati.value = columns_listaTotali.value.filter((column: any) => {
|
||||
@@ -460,7 +460,8 @@ export default defineComponent({
|
||||
arrnumstatus.value[status] = allorders.filter((rec) => (rec.status === status)).reduce((sum, item) => sum + 1, 0)
|
||||
}
|
||||
|
||||
selectfirstavailable()
|
||||
if (!notupdatetabsel)
|
||||
selectfirstavailable()
|
||||
}
|
||||
|
||||
arrout.value = getOrdersCartWithTotals()
|
||||
|
||||
@@ -222,7 +222,8 @@
|
||||
>{{
|
||||
getTotaleOrdineByOrdId(
|
||||
props.row._id,
|
||||
storeGasordine
|
||||
storeGasordine,
|
||||
props.row.user.name === 'TOTALI'
|
||||
)
|
||||
}}
|
||||
€</q-item-label
|
||||
@@ -457,7 +458,7 @@
|
||||
<span
|
||||
:class="props.row.user.name !== 'TOTALI' ? '' : 'totali'"
|
||||
>{{
|
||||
getTotaleOrdineByOrdId(props.row._id, storeGasordine)
|
||||
getTotaleOrdineByOrdId(props.row._id, storeGasordine, props.row.user.name === 'TOTALI')
|
||||
}}
|
||||
€</span
|
||||
>
|
||||
@@ -578,7 +579,9 @@
|
||||
|
||||
<br>
|
||||
</div>
|
||||
--></div>
|
||||
-->
|
||||
|
||||
</div>
|
||||
<div v-else-if="tabpages === shared_consts.OrderPages.LISTA_TOTALI.value">
|
||||
<div class="q-pa-sm">
|
||||
<q-btn
|
||||
|
||||
@@ -36,7 +36,7 @@ export default defineComponent({
|
||||
|
||||
function load() {
|
||||
// console.log('load')
|
||||
param.value = { em: $route.query.em, mc: $route.query.mc, locale: tools.getLocale(), email: $route.query.email }
|
||||
param.value = { em: $route.query.em, mc: $route.query.mc, locale: tools.getLocale(), email: $route.query.email, diario_on: $route.query.diario }
|
||||
console.log('idlink = ', param.value)
|
||||
let ris = null;
|
||||
ris = userStore.unsubscribe_news_on_fielduser(param.value)
|
||||
|
||||
Reference in New Issue
Block a user