Display all bands grouped by genre, create m:n association between Band and Genre in database
This commit is contained in:
@@ -6,7 +6,6 @@ import { useFeedbackStore } from "./feedbackStore";
|
||||
import { loginAccount, registerAccount, updateAccount } from "../api/accountApi";
|
||||
import { getUserOrders } from "../api/orderApi";
|
||||
import { BannerStateEnum } from "../enums/bannerStateEnum";
|
||||
import { calcPrice } from "@/scripts/productScripts";
|
||||
import { AddressModel } from "../models/addressModel";
|
||||
import { PaymentModel } from "../models/paymentModel";
|
||||
|
||||
@@ -86,9 +85,9 @@ export const useAccountStore = defineStore("accountStore", {
|
||||
let totalPrice = 0
|
||||
let order: OrderModel = this.orders.find((order: OrderModel) => order.id == orderId)
|
||||
|
||||
for (let item of order.orderItems) {
|
||||
totalPrice += calcPrice(item.orderPrice, 0, item.quantity)
|
||||
}
|
||||
// for (let item of order.orderItems) {
|
||||
// totalPrice += calcPrice(item.orderPrice, 0, item.quantity)
|
||||
// }
|
||||
|
||||
return Math.round(totalPrice * 100) / 100
|
||||
},
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { defineStore } from "pinia";
|
||||
import { useLocalStorage } from "@vueuse/core";
|
||||
import { calcPrice } from "@/scripts/productScripts";
|
||||
import { BasketItemModel } from "../models/basketItemModel";
|
||||
import { useFeedbackStore } from "./feedbackStore";
|
||||
import { BannerStateEnum } from "../enums/bannerStateEnum";
|
||||
@@ -26,9 +25,9 @@ export const useBasketStore = defineStore('basketStore', {
|
||||
getTotalPrice() {
|
||||
let result = 0
|
||||
|
||||
for (let item of this.itemsInBasket) {
|
||||
result += calcPrice(item.product.price, item.product.discount, item.quantity)
|
||||
}
|
||||
// for (let item of this.itemsInBasket) {
|
||||
// result += calcPrice(item.product.price, item.product.discount, item.quantity)
|
||||
// }
|
||||
|
||||
return Math.round(result * 100) / 100
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user