- filtro se GAS o Prodotti

This commit is contained in:
Surya Paolo
2023-12-28 21:00:10 +01:00
parent 196b19ac66
commit ed76b9c1dd
12 changed files with 207 additions and 36 deletions

View File

@@ -1,4 +1,4 @@
import { defineComponent, onMounted, ref } from 'vue'
import { defineComponent, onMounted, ref, watch } from 'vue'
import { tools } from '@store/Modules/tools'
import { useUserStore } from '@store/UserStore'
import { useRouter } from 'vue-router'
@@ -31,6 +31,15 @@ export default defineComponent({
const myarrrec = ref(<any>{})
const myoldrec = ref(<any>{})
const cosa = ref(0)
const initialPagination = ref({
sortBy: 'desc',
descending: false,
rowsPerPage: 10,
// rowsNumber: xx if getting data from a server
})
const conferma_carrello = ref(false)
const conferma_ordine = ref(false)
const endload = ref(false)
@@ -136,6 +145,10 @@ export default defineComponent({
}
])
watch(() => cosa.value, (newval, oldval) => {
})
// const { setValDb, getValDb } = MixinBase()
function getCols(props: any) {
@@ -143,8 +156,10 @@ export default defineComponent({
}
function getOrdersCart(): IOrderCart[] | undefined {
const ris = productStore.getOrdersCart(taborders.value)
// console.log(ris)
const hasGasordine: any = (cosa.value === shared_consts.PROD.TUTTI) ? undefined : (cosa.value === shared_consts.PROD.GAS)
console.log('hasgas', hasGasordine)
const ris = productStore.getOrdersCart(taborders.value, hasGasordine)
return ris
}
@@ -314,6 +329,8 @@ export default defineComponent({
getOrdersCartWithTotals,
productStore,
t,
initialPagination,
cosa,
}
}
})