summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2023-05-04 13:56:04 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2023-05-04 13:56:04 +0700
commit2dccfa3f8953231599cf646d82078fb23297f1c7 (patch)
tree1ef253cffca85e3dc5b25dbb457a151213eaa077 /src
parent4b18484f8b3417184a3335553331e40ccf05e29a (diff)
fixing quotation price
Diffstat (limited to 'src')
-rw-r--r--src/lib/quotation/components/Quotation.jsx9
-rw-r--r--src/pages/shop/quotation/finish.jsx2
2 files changed, 2 insertions, 9 deletions
diff --git a/src/lib/quotation/components/Quotation.jsx b/src/lib/quotation/components/Quotation.jsx
index a68889f5..6ff40327 100644
--- a/src/lib/quotation/components/Quotation.jsx
+++ b/src/lib/quotation/components/Quotation.jsx
@@ -15,7 +15,6 @@ import VariantGroupCard from '@/lib/variant/components/VariantGroupCard'
import MobileView from '@/core/components/views/MobileView'
import DesktopView from '@/core/components/views/DesktopView'
import Image from '@/core/components/elements/Image/Image'
-import variantPriceApi from '@/lib/variant/api/variantPriceApi'
const Quotation = () => {
const router = useRouter()
@@ -32,15 +31,9 @@ const Quotation = () => {
.map((o) => o.productId)
.join(',')
const dataProducts = await CartApi({ variantIds })
- const productsWithQuantity = dataProducts?.map(async (product) => {
- const productPrice = await variantPriceApi({ id: product.id })
+ const productsWithQuantity = dataProducts?.map((product) => {
return {
...product,
- price: {
- price: productPrice.priceExclude,
- discountPercentage: productPrice.discount,
- priceDiscount: productPrice.priceExcludeAfterDiscount
- },
quantity: getItemCart({ productId: product.id }).quantity
}
})
diff --git a/src/pages/shop/quotation/finish.jsx b/src/pages/shop/quotation/finish.jsx
index 0e9c5672..3850fef8 100644
--- a/src/pages/shop/quotation/finish.jsx
+++ b/src/pages/shop/quotation/finish.jsx
@@ -30,7 +30,7 @@ export default function FinishQuotation() {
</p>
{id && (
<Link
- href={`/my/transaction/${id}`}
+ href={`/my/quotations/${id}`}
className='btn-yellow !text-gray_r-12 mt-6 w-full md:w-1/3 md:mx-auto'
>
Lihat Penawaran