From 0ca62faf89775496320025c170c942b2cb3e1a20 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Sat, 8 Apr 2023 10:12:31 +0700 Subject: update theme color --- src/core/components/elements/Badge/Badge.jsx | 29 --------- src/core/components/elements/Link/Link.jsx | 2 +- .../components/elements/Navbar/NavbarDesktop.jsx | 6 +- src/core/components/elements/Navbar/Search.jsx | 2 +- src/lib/address/components/CreateAddress.jsx | 16 ++--- src/lib/address/components/EditAddress.jsx | 16 ++--- src/lib/auth/components/RegisterDesktop.jsx | 4 +- src/lib/auth/components/RegisterMobile.jsx | 2 +- src/lib/brand/components/Brand.jsx | 4 +- src/lib/brand/components/BrandCard.jsx | 2 +- src/lib/brand/components/Brands.jsx | 2 +- src/lib/cart/components/Cart.jsx | 43 +++++------- src/lib/checkout/components/Checkout.jsx | 6 +- src/lib/checkout/components/FinishCheckout.jsx | 10 +-- src/lib/content/components/PageContent.jsx | 2 +- src/lib/home/components/CategoryHome.jsx | 2 +- src/lib/invoice/components/Invoice.jsx | 2 +- src/lib/invoice/components/Invoices.jsx | 2 +- .../product/components/Product/ProductDesktop.jsx | 12 ++-- .../product/components/Product/ProductMobile.jsx | 12 ++-- src/lib/product/components/ProductCard.jsx | 4 +- src/lib/product/components/ProductFilter.jsx | 2 +- src/lib/product/components/ProductSearch.jsx | 2 +- src/lib/quotation/components/Quotation.jsx | 6 +- src/lib/transaction/components/Transaction.jsx | 4 +- src/lib/transaction/components/Transactions.jsx | 2 +- src/pages/blog/[slug].jsx | 2 +- src/pages/shop/quotation/finish.jsx | 4 +- src/pages/sitemap/products.xml.js | 30 +++++++++ src/pages/sitemap/products/[id].xml.js | 32 +++++++++ src/pages/video.jsx | 2 +- src/styles/globals.css | 76 ++++++++++------------ 32 files changed, 179 insertions(+), 163 deletions(-) delete mode 100644 src/core/components/elements/Badge/Badge.jsx create mode 100644 src/pages/sitemap/products.xml.js create mode 100644 src/pages/sitemap/products/[id].xml.js (limited to 'src') diff --git a/src/core/components/elements/Badge/Badge.jsx b/src/core/components/elements/Badge/Badge.jsx deleted file mode 100644 index e50cdc78..00000000 --- a/src/core/components/elements/Badge/Badge.jsx +++ /dev/null @@ -1,29 +0,0 @@ -const Badge = ({ children, type, ...props }) => { - return ( -
- {children} -
- ) -} - -Badge.defaultProps = { - className: '' -} - -const badgeStyle = (type) => { - let className = ['rounded px-1 text-[11px]'] - switch (type) { - case 'solid-red': - className.push('bg-red_r-11 text-white') - break - case 'light': - className.push('bg-gray_r-4 text-gray_r-11') - break - } - return className.join(' ') -} - -export default Badge diff --git a/src/core/components/elements/Link/Link.jsx b/src/core/components/elements/Link/Link.jsx index 05859639..360444a6 100644 --- a/src/core/components/elements/Link/Link.jsx +++ b/src/core/components/elements/Link/Link.jsx @@ -13,7 +13,7 @@ const Link = ({ children, ...props }) => { {children} diff --git a/src/core/components/elements/Navbar/NavbarDesktop.jsx b/src/core/components/elements/Navbar/NavbarDesktop.jsx index c01cb777..0bc9e967 100644 --- a/src/core/components/elements/Navbar/NavbarDesktop.jsx +++ b/src/core/components/elements/Navbar/NavbarDesktop.jsx @@ -22,7 +22,7 @@ const NavbarDesktop = () => { return ( -
+
Tentang Indoteknik.com @@ -129,13 +129,13 @@ const NavbarDesktop = () => { <> Masuk Daftar diff --git a/src/core/components/elements/Navbar/Search.jsx b/src/core/components/elements/Navbar/Search.jsx index 32a8d170..d0627b24 100644 --- a/src/core/components/elements/Navbar/Search.jsx +++ b/src/core/components/elements/Navbar/Search.jsx @@ -73,7 +73,7 @@ const Search = () => { {suggestion.term} diff --git a/src/lib/address/components/CreateAddress.jsx b/src/lib/address/components/CreateAddress.jsx index a4669ee0..86519147 100644 --- a/src/lib/address/components/CreateAddress.jsx +++ b/src/lib/address/components/CreateAddress.jsx @@ -105,7 +105,7 @@ const CreateAddress = () => { )} /> -
{errors.type?.message}
+
{errors.type?.message}
@@ -116,7 +116,7 @@ const CreateAddress = () => { type='text' className='form-input' /> -
{errors.name?.message}
+
{errors.name?.message}
@@ -127,7 +127,7 @@ const CreateAddress = () => { type='email' className='form-input' /> -
{errors.email?.message}
+
{errors.email?.message}
@@ -138,7 +138,7 @@ const CreateAddress = () => { type='tel' className='form-input' /> -
{errors.mobile?.message}
+
{errors.mobile?.message}
@@ -149,7 +149,7 @@ const CreateAddress = () => { type='text' className='form-input' /> -
{errors.street?.message}
+
{errors.street?.message}
@@ -160,7 +160,7 @@ const CreateAddress = () => { type='number' className='form-input' /> -
{errors.zip?.message}
+
{errors.zip?.message}
@@ -170,7 +170,7 @@ const CreateAddress = () => { control={control} render={(props) => } /> -
{errors.city?.message}
+
{errors.city?.message}
@@ -182,7 +182,7 @@ const CreateAddress = () => { )} /> -
{errors.district?.message}
+
{errors.district?.message}
diff --git a/src/lib/address/components/EditAddress.jsx b/src/lib/address/components/EditAddress.jsx index 006ea407..30555ecd 100644 --- a/src/lib/address/components/EditAddress.jsx +++ b/src/lib/address/components/EditAddress.jsx @@ -120,7 +120,7 @@ const EditAddress = ({ id, defaultValues }) => { )} /> -
{errors.type?.message}
+
{errors.type?.message}
@@ -131,7 +131,7 @@ const EditAddress = ({ id, defaultValues }) => { type='text' className='form-input' /> -
{errors.name?.message}
+
{errors.name?.message}
@@ -142,7 +142,7 @@ const EditAddress = ({ id, defaultValues }) => { type='email' className='form-input' /> -
{errors.email?.message}
+
{errors.email?.message}
@@ -153,7 +153,7 @@ const EditAddress = ({ id, defaultValues }) => { type='tel' className='form-input' /> -
{errors.mobile?.message}
+
{errors.mobile?.message}
@@ -164,7 +164,7 @@ const EditAddress = ({ id, defaultValues }) => { type='text' className='form-input' /> -
{errors.street?.message}
+
{errors.street?.message}
@@ -175,7 +175,7 @@ const EditAddress = ({ id, defaultValues }) => { type='number' className='form-input' /> -
{errors.zip?.message}
+
{errors.zip?.message}
@@ -185,7 +185,7 @@ const EditAddress = ({ id, defaultValues }) => { control={control} render={(props) => } /> -
{errors.city?.message}
+
{errors.city?.message}
@@ -197,7 +197,7 @@ const EditAddress = ({ id, defaultValues }) => { )} /> -
{errors.district?.message}
+
{errors.district?.message}
diff --git a/src/lib/auth/components/RegisterDesktop.jsx b/src/lib/auth/components/RegisterDesktop.jsx index 5f0caf73..ac6ac960 100644 --- a/src/lib/auth/components/RegisterDesktop.jsx +++ b/src/lib/auth/components/RegisterDesktop.jsx @@ -91,14 +91,14 @@ const RegisterDesktop = () => {
- +
diff --git a/src/lib/auth/components/RegisterMobile.jsx b/src/lib/auth/components/RegisterMobile.jsx index 11935439..214584f4 100644 --- a/src/lib/auth/components/RegisterMobile.jsx +++ b/src/lib/auth/components/RegisterMobile.jsx @@ -100,7 +100,7 @@ const RegisterMobile = () => { className='form-input flex items-start w-fit mr-2' required /> -
diff --git a/src/lib/brand/components/Brand.jsx b/src/lib/brand/components/Brand.jsx index 6e156b8e..6ebb8aa7 100644 --- a/src/lib/brand/components/Brand.jsx +++ b/src/lib/brand/components/Brand.jsx @@ -58,7 +58,7 @@ const Brand = ({ id }) => { /> )} {!brand?.data?.logo && ( -
+
{brand?.data?.name}
)} @@ -102,7 +102,7 @@ const Brand = ({ id }) => { /> )} {!brand?.data?.logo && ( -
+
{brand?.data?.name}
)} diff --git a/src/lib/brand/components/BrandCard.jsx b/src/lib/brand/components/BrandCard.jsx index 984a9fa6..f8c01e6d 100644 --- a/src/lib/brand/components/BrandCard.jsx +++ b/src/lib/brand/components/BrandCard.jsx @@ -20,7 +20,7 @@ const BrandCard = ({ brand }) => { {!brand.logo && ( {brand.name} diff --git a/src/lib/brand/components/Brands.jsx b/src/lib/brand/components/Brands.jsx index 777e05ac..25fb1c67 100644 --- a/src/lib/brand/components/Brands.jsx +++ b/src/lib/brand/components/Brands.jsx @@ -56,7 +56,7 @@ const Brands = () => { key={index} className={ 'p-2 py-1 border bg-white border-gray_r-6 rounded w-10 flex-shrink-0' + - (startWith == alphabet ? ' !bg-yellow_r-9 border-yellow_r-9 ' : '') + (startWith == alphabet ? ' !bg-warning-500 border-warning-500 ' : '') } type='button' onClick={() => toggleStartWith(alphabet)} diff --git a/src/lib/cart/components/Cart.jsx b/src/lib/cart/components/Cart.jsx index 1131fed7..5b8a4690 100644 --- a/src/lib/cart/components/Cart.jsx +++ b/src/lib/cart/components/Cart.jsx @@ -170,16 +170,13 @@ const Cart = () => { {products?.map((product) => (
- + checked={product?.selected} + className='mr-2 accent-danger-500 w-4' + /> + { {currencyFormat(product?.price?.priceDiscount)}
-
+
{currencyFormat(product?.price?.priceDiscount * product?.quantity)}
@@ -255,7 +252,7 @@ const Cart = () => {
Total: - +   {selectedProduct().length > 0 ? currencyFormat(totalPriceBeforeTax - totalDiscountAmount + totalTaxAmount) @@ -319,18 +316,12 @@ const Cart = () => { {products?.map((product) => ( - + checked={product?.selected} + className='accent-danger-500 w-4' + /> { product?.parent.name, product?.parent.id )} - className='w-[30%] flex-shrink-0' + className='w-[20%] flex-shrink-0' > {product?.name}
@@ -391,7 +382,7 @@ const Cart = () => {
-
+
{currencyFormat(product?.price?.priceDiscount * product?.quantity)}
@@ -429,7 +420,7 @@ const Cart = () => {
Total: - +   {selectedProduct().length > 0 ? currencyFormat(totalPriceBeforeTax - totalDiscountAmount + totalTaxAmount) diff --git a/src/lib/checkout/components/Checkout.jsx b/src/lib/checkout/components/Checkout.jsx index c9e0556b..17ac20e1 100644 --- a/src/lib/checkout/components/Checkout.jsx +++ b/src/lib/checkout/components/Checkout.jsx @@ -184,7 +184,7 @@ const Checkout = () => {
Total Diskon
-
- {currencyFormat(totalDiscountAmount)}
+
- {currencyFormat(totalDiscountAmount)}
Subtotal
@@ -313,7 +313,7 @@ const Checkout = () => {
-
+
{currencyFormat(product?.price?.priceDiscount * product?.quantity)}
@@ -340,7 +340,7 @@ const Checkout = () => {
Total Diskon
-
- {currencyFormat(totalDiscountAmount)}
+
- {currencyFormat(totalDiscountAmount)}
Subtotal
diff --git a/src/lib/checkout/components/FinishCheckout.jsx b/src/lib/checkout/components/FinishCheckout.jsx index 4af39e91..cd93e3a4 100644 --- a/src/lib/checkout/components/FinishCheckout.jsx +++ b/src/lib/checkout/components/FinishCheckout.jsx @@ -3,19 +3,19 @@ import Link from '@/core/components/elements/Link/Link' const FinishCheckout = ({ query }) => { return (
-
-
+
+

Terima Kasih atas Pembelian Anda

-

+

Rincian belanja sudah kami kirimkan ke email anda. Mohon dicek kembali. jika tidak menerima email, anda dapat menghubungi kami disini.

{query?.order_id?.replaceAll('-', '/')}

-

No. Transaksi

+

No. Transaksi

Lihat detail pembelian Anda disini diff --git a/src/lib/content/components/PageContent.jsx b/src/lib/content/components/PageContent.jsx index bb44dd92..8b07cbfb 100644 --- a/src/lib/content/components/PageContent.jsx +++ b/src/lib/content/components/PageContent.jsx @@ -15,7 +15,7 @@ const PageContent = ({ path }) => { const contentClassNames = ` prose prose-gray - prose-a:text-red_r-10 + prose-a:text-danger-500 prose-p:my-0 prose-headings:my-0 prose-headings:mb-1 diff --git a/src/lib/home/components/CategoryHome.jsx b/src/lib/home/components/CategoryHome.jsx index 05f0ca28..8fe3788c 100644 --- a/src/lib/home/components/CategoryHome.jsx +++ b/src/lib/home/components/CategoryHome.jsx @@ -6,7 +6,7 @@ const CategoryHome = ({ id }) => { const { categoryHome } = useCategoryHome({ id }) return ( -
+
{categoryHome.data ? ( { {invoice.data?.efaktur ? (
)} -

+

{activeVariant?.price?.priceDiscount > 0 ? ( currencyFormat(activeVariant?.price?.priceDiscount) ) : ( Hubungi kami untuk dapatkan harga terbaik,  - + klik disini @@ -232,7 +232,7 @@ const ProductMobile = ({ product, wishlist, toggleWishlist }) => { )} {activeVariant?.stock == 0 && ( - + Tanya Stok )} @@ -240,7 +240,7 @@ const ProductMobile = ({ product, wishlist, toggleWishlist }) => { {activeVariant?.weight > 0 && {activeVariant?.weight} KG} {activeVariant?.weight == 0 && ( - + Tanya Berat )} @@ -275,7 +275,7 @@ const informationTabOptions = [ ] const TabButton = ({ children, active, ...props }) => { - const activeClassName = active ? 'text-red_r-11 underline underline-offset-4' : 'text-gray_r-11' + const activeClassName = active ? 'text-danger-500 underline underline-offset-4' : 'text-gray_r-11' return (

)} -
+
{product?.lowestPrice.priceDiscount > 0 ? ( currencyFormat(product?.lowestPrice.priceDiscount) ) : ( @@ -126,7 +126,7 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => {
)} -
+
{product?.lowestPrice?.priceDiscount > 0 ? ( currencyFormat(product?.lowestPrice?.priceDiscount) ) : ( diff --git a/src/lib/product/components/ProductFilter.jsx b/src/lib/product/components/ProductFilter.jsx index eca95f74..be1edd18 100644 --- a/src/lib/product/components/ProductFilter.jsx +++ b/src/lib/product/components/ProductFilter.jsx @@ -88,7 +88,7 @@ const ProductFilter = ({ active, close, brands, categories, prefixUrl, defaultBr +
+ + Semua Brand + + + Ready Stock + + + Blog Indoteknik + + + Indoteknik TV +
- -
- - Semua Brand - - - Ready Stock - - - Blog Indoteknik - - - Indoteknik TV - -
-
- {!auth && ( - <> - - Masuk - - - Daftar - - - )} - {auth && ( - <> -
- Halo, {auth?.name} -
- +
+ {!auth && ( + <> + + Masuk + + + Daftar + + + )} + {auth && ( + <> +
+ Halo, {auth?.name} +
+ +
-
- - - )} + + + )} +
-
+ ) } diff --git a/src/lib/cart/api/CartApi.js b/src/lib/cart/api/CartApi.js index 33b61891..7683a935 100644 --- a/src/lib/cart/api/CartApi.js +++ b/src/lib/cart/api/CartApi.js @@ -2,7 +2,7 @@ import odooApi from '@/core/api/odooApi' const CartApi = async ({ variantIds }) => { if (variantIds) { - const dataCart = await odooApi('GET', `/api/v1/product_variant/${variantIds}`) + const dataCart = await odooApi('GET', `/api/v2/product_variant/${variantIds}`) return dataCart } return null diff --git a/src/lib/product/api/productApi.js b/src/lib/product/api/productApi.js index 4fe4cd7d..8156d1ec 100644 --- a/src/lib/product/api/productApi.js +++ b/src/lib/product/api/productApi.js @@ -2,7 +2,7 @@ import odooApi from '@/core/api/odooApi' const productApi = async ({ id }) => { if (!id) return - const dataProduct = await odooApi('GET', `/api/v1/product/${id}`) + const dataProduct = await odooApi('GET', `/api/v2/product/${id}`) return dataProduct } diff --git a/src/styles/globals.css b/src/styles/globals.css index d27913a2..551ff057 100644 --- a/src/styles/globals.css +++ b/src/styles/globals.css @@ -151,6 +151,7 @@ button { @apply bg-danger-500 border-danger-500 text-gray_r-1 + hover:bg-danger-600 disabled:text-gray_r-1 disabled:bg-danger-200 disabled:border-danger-200; @@ -488,7 +489,7 @@ button { font-medium !text-gray_r-1 rounded-none - rounded-tr-xl; + rounded-t-xl; } .navbar-user-dropdown-button span { -- cgit v1.2.3