aggiornato prodotti e scontistica

This commit is contained in:
Surya Paolo
2023-12-29 15:19:21 +01:00
parent 2083655e99
commit 6758c6e00f
38 changed files with 49 additions and 9 deletions

View File

@@ -75,9 +75,9 @@ export default defineComponent({
function getCatProds() {
let arrcat = productStore.getCatProds()
let riscat = [{ label: 'Tutti', value: '' }]
let riscat: any = [{ label: 'Tutti', value: '', icon: undefined, color: undefined }]
for (const rec of arrcat) {
riscat.push({ label: rec.name, value: rec._id })
riscat.push({ label: rec.name, value: rec._id, icon: rec.icon, color: rec.color })
}
return riscat

View File

@@ -62,9 +62,11 @@
<div v-for="(reccat, index) in getCatProds()" :key="index">
<q-btn
:push="cat === reccat.value"
dense
:dense="cat !== reccat.value"
:icon="reccat.icon"
:color="reccat.color ? reccat.color : undefined"
:text-color="cat === reccat.value ? 'blue' : 'black'"
rounded
:color="cat === reccat.value ? 'blue' : undefined"
glossy
:label="reccat.label"
@click="cat = reccat.value"