From a49f5a3f968dcc8c84759a382a0762abf0bc758b Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Thu, 23 Mar 2023 17:01:03 +0700 Subject: cart, checkout, quotation --- src/lib/quotation/components/Quotation.jsx | 273 +++++++++++++++++++++-------- 1 file changed, 197 insertions(+), 76 deletions(-) (limited to 'src/lib/quotation/components/Quotation.jsx') diff --git a/src/lib/quotation/components/Quotation.jsx b/src/lib/quotation/components/Quotation.jsx index b6e276a3..3054616c 100644 --- a/src/lib/quotation/components/Quotation.jsx +++ b/src/lib/quotation/components/Quotation.jsx @@ -12,6 +12,9 @@ import { toast } from 'react-hot-toast' import checkoutApi from '@/lib/checkout/api/checkoutApi' import { useRouter } from 'next/router' 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' const Quotation = () => { const router = useRouter() @@ -77,89 +80,207 @@ const Quotation = () => { return ( <> -
- -
- -
- - Jika mengalami kesulitan dalam melakukan pembelian di website Indoteknik. Hubungi kami - disini - -
-
- - - -
- {products && ( - - )} -
- - - -
-
-
Ringkasan Penawaran
-
{products?.length} Barang
+ +
+ +
+ +
+ + Jika mengalami kesulitan dalam melakukan pembelian di website Indoteknik. Hubungi kami + disini + +
-
-
-
-
Total Belanja
-
{currencyFormat(totalAmount)}
-
-
-
Total Diskon
-
- {currencyFormat(totalDiscountAmount)}
+ + + +
+ {products && } +
+ + + +
+
+
Ringkasan Penawaran
+
{products?.length} Barang
-
-
Subtotal
-
{currencyFormat(totalAmount - totalDiscountAmount)}
+
+
+
+
Total Belanja
+
{currencyFormat(totalAmount)}
+
+
+
Total Diskon
+
- {currencyFormat(totalDiscountAmount)}
+
+
+
Subtotal
+
{currencyFormat(totalAmount - totalDiscountAmount)}
+
+
+
PPN 11% (Incl.)
+
{currencyFormat((totalAmount - totalDiscountAmount) * 0.11)}
+
-
-
PPN 11% (Incl.)
-
{currencyFormat((totalAmount - totalDiscountAmount) * 0.11)}
+
+
+
Grand Total
+
+ {currencyFormat(totalAmount - totalDiscountAmount)} +
+

*) Belum termasuk biaya pengiriman

+

+ Dengan melakukan pembelian melalui website Indoteknik, saya menyetujui{' '} + + Syarat & Ketentuan + {' '} + yang berlaku +

+
+ + + +
+
-
-
-
Grand Total
-
- {currencyFormat(totalAmount - totalDiscountAmount)} + + + +
+
+
Detail Barang
+ + + + + + + + + + + {products?.map((product) => ( + + + + + + + ))} + +
Nama ProdukJumlahHargaSubtotal
+
+ {product?.name} +
+
+
+ {product?.parent?.name} +
+
+ {product?.code}{' '} + {product?.attributes.length > 0 + ? `| ${product?.attributes.join(', ')}` + : ''} +
+
+
+ + + {product?.price?.discountPercentage > 0 && ( +
+
+ {currencyFormat(product?.price?.price)} +
+
+ {product?.price?.discountPercentage}% +
+
+ )} +
+ {currencyFormat(product?.price?.priceDiscount)} +
+
+
+ {currencyFormat(product?.price?.priceDiscount * product?.quantity)} +
+
+
+ +
+
+
+
Ringkasan Pesanan
+
{products?.length} Barang
+
+ +
+ +
+
+
Total Belanja
+
{currencyFormat(totalAmount)}
+
+
+
Total Diskon
+
- {currencyFormat(totalDiscountAmount)}
+
+
+
Subtotal
+
{currencyFormat(totalAmount - totalDiscountAmount)}
+
+
+
PPN 11% (Incl.)
+
{currencyFormat((totalAmount - totalDiscountAmount) * 0.11)}
+
+
+ +
+ +
+
Grand Total
+
+ {currencyFormat(totalAmount - totalDiscountAmount)} +
+
+

+ *) Belum termasuk biaya pengiriman +

+

+ Dengan melakukan pembelian melalui website Indoteknik, saya menyetujui{' '} + + Syarat & Ketentuan + {' '} + yang berlaku +

+ +
+ + +
-

*) Belum termasuk biaya pengiriman

-

- Dengan melakukan pembelian melalui website Indoteknik, saya menyetujui{' '} - - Syarat & Ketentuan - {' '} - yang berlaku -

-
- - - -
- -
+ ) } -- cgit v1.2.3