- scheda prodotto migliorata

- aggiornamento filtri
This commit is contained in:
Surya Paolo
2025-04-24 01:03:20 +02:00
parent fc015404a6
commit 8d6c53803e
18 changed files with 420 additions and 152 deletions

View File

@@ -10,6 +10,7 @@ import { shared_consts } from '@src/common/shared_vuejs'
import type { IColGridTable } from 'model';
import { IOperators } from 'model'
import { tools } from '@tools'
import { useProducts } from 'app/src/store/Products';
export default defineComponent({
name: 'CMySelect',
@@ -177,6 +178,8 @@ export default defineComponent({
const selectMultiple = ref(null)
const selectGeneric = ref(null)
const productStore = useProducts()
const mystr = ref('')
const valoriload = computed(() => {
@@ -829,6 +832,20 @@ export default defineComponent({
emit('searchOnGM', mystr)
}
function applyLabelColorBasedOnProductStatus(myrec: any) {
let classi = ''
if (props.tablesel === 'products') {
if (productStore.isNonVendibile(myrec)) {
classi = 'bg-grey'
}
if (!productStore.isDisponibile(myrec)) {
classi = 'bg-red-1'
}
}
return classi
}
onMounted(mounted)
@@ -850,6 +867,7 @@ export default defineComponent({
clear,
mystr,
searchOnGM,
applyLabelColorBasedOnProductStatus,
}
}
})