- 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:
Surya Paolo
2025-05-06 18:19:03 +02:00
parent 70f1e5cbf1
commit 57cfa5858b
53 changed files with 1123 additions and 428 deletions

View File

@@ -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()