CategoryStore, API calls

This commit is contained in:
2024-09-18 16:21:07 +02:00
parent 9ee344f45f
commit 7b245da959
11 changed files with 83 additions and 52 deletions

View File

@@ -1,8 +1,9 @@
import { BasketItemModel } from "@/data/models/basketItemModel";
import { CategoryModel } from "@/data/models/categoryModel";
import { ProductModel } from "@/data/models/productModel";
import { ProductWithCategoryModel } from "@/data/models/productWithCategoryModel";
export function calcProductPrice(product: ProductModel, quantity: number = 1): number {
export function calcProductPrice(product: ProductWithCategoryModel, quantity: number = 1): number {
return calcPrice(product.price, product.discount, quantity)
}