- Cataloghi: parte finale... prima bozza 9 dic
This commit is contained in:
@@ -8,7 +8,7 @@ import MixinMetaTags from '@src/mixins/mixin-metatags'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { IDataPass, IProducer, IProduct, ISpecialField } from '@model'
|
||||
import { IDataPass, IProducer, IProduct, IProductInfo, ISpecialField, IVariazione } from '@model'
|
||||
import { tools } from '../store/Modules/tools'
|
||||
import { costanti } from '@costanti'
|
||||
import { fieldsTable } from '@store/Modules/fieldsTable'
|
||||
@@ -190,6 +190,20 @@ export default function () {
|
||||
const idprod = productStore.products.findIndex((rec: IProduct) => rec._id === id)
|
||||
if (idprod >= 0 && key) {
|
||||
productStore.products[idprod][key as keyof IProduct] = value
|
||||
}
|
||||
} else if (table === 'productinfos') {
|
||||
const productStore = useProducts()
|
||||
const idprod = productStore.products.findIndex((rec: IProduct) => rec.productInfo._id === id)
|
||||
if (idprod >= 0 && key) {
|
||||
const myfield = key as keyof IProductInfo
|
||||
productStore.products[idprod].productInfo[myfield] = value
|
||||
}
|
||||
} else if (table === 'arrvariazioni') {
|
||||
const productStore = useProducts()
|
||||
const idprod = productStore.products.findIndex((rec: IProduct) => rec._id === id)
|
||||
if (idprod >= 0 && key) {
|
||||
const myfield = key as keyof IVariazione
|
||||
productStore.products[idprod].arrvariazioni[0][myfield] = value
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user