- aggiornato catalogo lista con filtri per editori e grafico
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { IBaseOrder, ICart, IOrder, IOrderCart, IProduct, IProductsState, IProductInfo, ICatProd, IUserShort, IGasordine, IAuthor, ISubCatProd, IText, IOptCatalogo, ICatalog } from 'model'
|
||||
import { IBaseOrder, ICart, IOrder, IOrderCart, IProduct, IProductsState, IProductInfo, ICatProd, IUserShort, IGasordine, IAuthor, ISubCatProd, IText, IOptCatalogo, ICatalog, ICatPrTotali } from 'model'
|
||||
|
||||
import { Api } from '@api'
|
||||
import { serv_constants } from '@src/store/Modules/serv_constants'
|
||||
@@ -170,6 +170,14 @@ export const useProducts = defineStore('Products', {
|
||||
}
|
||||
return ''
|
||||
},
|
||||
getTotaliProdottiByIdCatProd: (state: IProductsState) => (idCatProd: string): number => {
|
||||
const myfirstcat = state.catprtotali!.find((rec: ICatPrTotali) => rec._id === idCatProd)
|
||||
|
||||
if (myfirstcat) {
|
||||
return myfirstcat.quanti!
|
||||
}
|
||||
return 0
|
||||
},
|
||||
|
||||
getSubCatProdsByGas: (state: IProductsState) => (idGasOrdine: string, idCatProd: string): ISubCatProd[] => {
|
||||
let arrcat = state.subcatprods
|
||||
|
||||
Reference in New Issue
Block a user