aggiornato prodotti e scontistica
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user