From 5d207f5bc60a0ed5d4adfd9eabd7f6459ccc2d84 Mon Sep 17 00:00:00 2001
From: "HATEC\\SPVDEV001" <tri.susilo@altama.co.id>
Date: Fri, 8 Mar 2024 10:19:23 +0700
Subject: CR - Keranjang Mobile : informasi harga

---
 src-migrate/modules/cart/components/Summary.tsx | 110 +++++++++++++-----------
 1 file changed, 61 insertions(+), 49 deletions(-)

(limited to 'src-migrate/modules/cart/components/Summary.tsx')

diff --git a/src-migrate/modules/cart/components/Summary.tsx b/src-migrate/modules/cart/components/Summary.tsx
index 2e55c8df..1e76d4fa 100644
--- a/src-migrate/modules/cart/components/Summary.tsx
+++ b/src-migrate/modules/cart/components/Summary.tsx
@@ -1,20 +1,20 @@
-import style from '../styles/summary.module.css'
+import style from '../styles/summary.module.css';
 
-import React from 'react'
-import formatCurrency from '~/libs/formatCurrency'
-import clsxm from '~/libs/clsxm'
-import { Skeleton } from '@chakra-ui/react'
-import _ from 'lodash'
+import React from 'react';
+import formatCurrency from '~/libs/formatCurrency';
+import clsxm from '~/libs/clsxm';
+import { Skeleton } from '@chakra-ui/react';
+import _ from 'lodash';
 
 type Props = {
-  total?: number
-  discount?: number
-  subtotal?: number
-  tax?: number
-  shipping?: number
-  grandTotal?: number
-  isLoaded: boolean
-}
+  total?: number;
+  discount?: number;
+  subtotal?: number;
+  tax?: number;
+  shipping?: number;
+  grandTotal?: number;
+  isLoaded: boolean;
+};
 
 const CartSummary = ({
   total,
@@ -27,49 +27,61 @@ const CartSummary = ({
 }: Props) => {
   return (
     <>
-      <div className='text-h-sm font-medium'>Ringkasan Pesanan</div>
-
-      <div className="h-6" />
+      <div className='text-h-sm font-medium hidden md:block'>
+        Ringkasan Pesanan
+      </div>
 
-      <div className='flex flex-col gap-y-3'>
-        <Skeleton isLoaded={isLoaded} className={style.line}>
-          <span className={style.label}>Total Belanja</span>
-          <span className={style.value}>Rp {formatCurrency(subtotal || 0)}</span>
-        </Skeleton>
+      <div className='h-6' />
 
-        <Skeleton isLoaded={isLoaded} className={style.line}>
-          <span className={style.label}>Total Diskon</span>
-          <span className={clsxm(style.value, style.discount)}>- Rp {formatCurrency(discount || 0)}</span>
-        </Skeleton>
+      <div className='hidden md:block'>
+        <div className='flex flex-col gap-y-3'>
+          <Skeleton isLoaded={isLoaded} className={style.line}>
+            <span className={style.label}>Total Belanja</span>
+            <span className={style.value}>
+              Rp {formatCurrency(subtotal || 0)}
+            </span>
+          </Skeleton>
 
-        <div className={style.divider} />
+          <Skeleton isLoaded={isLoaded} className={style.line}>
+            <span className={style.label}>Total Diskon</span>
+            <span className={clsxm(style.value, style.discount)}>
+              - Rp {formatCurrency(discount || 0)}
+            </span>
+          </Skeleton>
 
-        <Skeleton isLoaded={isLoaded} className={style.line}>
-          <span className={style.label}>Subtotal</span>
-          <span className={style.value}>Rp {formatCurrency(total || 0)}</span>
-        </Skeleton>
+          <div className={style.divider} />
 
-        <Skeleton isLoaded={isLoaded} className={style.line}>
-          <span className={style.label}>Tax 11%</span>
-          <span className={style.value}>Rp {formatCurrency(tax || 0)}</span>
-        </Skeleton>
+          <Skeleton isLoaded={isLoaded} className={style.line}>
+            <span className={style.label}>Subtotal</span>
+            <span className={style.value}>Rp {formatCurrency(total || 0)}</span>
+          </Skeleton>
 
-        <Skeleton isLoaded={isLoaded} className={style.line}>
-          <span className={style.label}>Biaya Kirim</span>
-          <span className={style.value}>Rp {formatCurrency(shipping || 0)}</span>
-        </Skeleton>
+          <Skeleton isLoaded={isLoaded} className={style.line}>
+            <span className={style.label}>Tax 11%</span>
+            <span className={style.value}>Rp {formatCurrency(tax || 0)}</span>
+          </Skeleton>
 
-        <div className={style.divider} />
+          <Skeleton isLoaded={isLoaded} className={style.line}>
+            <span className={style.label}>Biaya Kirim</span>
+            <span className={style.value}>
+              Rp {formatCurrency(shipping || 0)}
+            </span>
+          </Skeleton>
 
-        <Skeleton isLoaded={isLoaded} className={style.line}>
-          <span className={clsxm(style.label, style.grandTotal)}>
-            Grand Total
-          </span>
-          <span className={style.value}>Rp {formatCurrency(grandTotal || 0)}</span>
-        </Skeleton>
+          <div className={style.divider} />
+        </div>
       </div>
+
+      <Skeleton isLoaded={isLoaded} className={style.line}>
+        <span className={clsxm(style.label, style.grandTotal)}>
+          Grand Total
+        </span>
+        <span className={style.value}>
+          Rp {formatCurrency(grandTotal || 0)}
+        </span>
+      </Skeleton>
     </>
-  )
-}
+  );
+};
 
-export default CartSummary
\ No newline at end of file
+export default CartSummary;
-- 
cgit v1.2.3

