From 36601aba6017aeef16f89351eb487238402ab52e Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Tue, 24 Sep 2024 16:12:50 +0700 Subject: update Perapihan Tag --- .env | 45 ++++ src-migrate/modules/page-content/index.tsx | 61 ++--- .../modules/product-promo/components/Item.tsx | 37 +-- src-migrate/modules/promo/components/Hero.tsx | 103 ++++---- .../modules/promo/components/PromotinProgram.jsx | 223 ++++++++++------- src-migrate/modules/promo/components/Voucher.tsx | 65 +++-- .../modules/register/components/FormBisnis.tsx | 2 +- src-migrate/pages/shop/cart/index.tsx | 146 +++++------ .../components/elements/Footer/BasicFooter.jsx | 8 +- .../components/elements/Navbar/NavbarDesktop.jsx | 95 +++---- src/lib/home/components/BannerSection.jsx | 20 +- src/lib/home/components/CategoryDynamic.jsx | 15 +- src/lib/home/components/CategoryDynamicMobile.jsx | 14 +- src/lib/home/components/CategoryHomeId.jsx | 18 +- src/lib/home/components/CategoryPilihan.jsx | 265 +++++++++++--------- src/lib/home/components/PromotionProgram.jsx | 118 ++++----- src/lib/home/components/ServiceList.jsx | 34 ++- src/lib/quotation/components/Quotationheader.jsx | 131 +++++++--- src/lib/review/components/CustomerReviews.jsx | 37 +-- src/lib/tracking-order/component/TrackingOrder.jsx | 272 +++++++++++---------- src/pages/my/profile.jsx | 69 +++--- 21 files changed, 1043 insertions(+), 735 deletions(-) create mode 100644 .env diff --git a/.env b/.env new file mode 100644 index 00000000..1aca1dbc --- /dev/null +++ b/.env @@ -0,0 +1,45 @@ +SELF_HOST=http://localhost:2100 +# SELF_HOST=http://192.168.23.178:2100 +# ODOO_API_HOST=http://192.168.23.191:8069 +# ODOO_API_HOST=http://192.168.23.251:8069 +# ODOO_API_HOST=http://192.168.23.73:8069 +# ODOO_API_HOST=https://erp.indoteknik.com +ODOO_API_HOST=http://localhost:8069 +SOLR_HOST=http://34.101.189.218:8983 +# SOLR_HOST=http://192.168.23.5:8983 +# SOLR_HOST=http://localhost:8983 + +RAJA_ONGKIR_HOST='https://pro.rajaongkir.com' +RAJA_ONGKIR_KEY='7ac9883688da043b50cc32f0e3070bb6' + +MAIL_PORT=465 +MAIL_HOST=smtp.gmail.com +MAIL_USER=sales@indoteknik.com +MAIL_PASS=#&Win*%a3C%^FF + +MIDTRANS_HOST=https://api.sandbox.midtrans.com +MIDTRANS_ENV=development +MIDTRANS_SERVER_KEY=SB-Mid-server-n-V7d2c2ZB0SVED29OyCWVYp +MIDTRANS_CLIENT_KEY=SB-Mid-client-IsVHHv5mzPqNV7bs + +RECAPTCHA_GOOGLE=6LdajH0lAAAAAI6kCVHjR9rHuD22Pf-X7XakSQ_P + +NEXTAUTH_URL=http://localhost:2100 + +PPN=1.11 + +# GOOGLE_CLIENT_ID="396438712998-308hckshgeekr34phr5jskj1f6qltfvk.apps.googleusercontent.com" +# GOOGLE_CLIENT_SECRET=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 +GOOGLE_CLIENT_ID="140590317805-5k5v3pjb7gcv4rcefgt8udgmn3hllv0q.apps.googleusercontent.com" +GOOGLE_CLIENT_SECRET=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 + +JWT_SECRET=NTNv7j0TuYARvmNMmWXo6fKvM4o6nvaUi9ryX38ZHL1bkrnD1ObOQ8JAUmHCBq7Iy7otZcyAagBLHVKvvYaIpmMuxmARQ97jUVG16Jkpkp1wXOPsrF9zwew6TpczyHkHgX5EuLg2MeBuiTqJACs1J0apruOOJCggOtkjB4c + +NEXT_PUBLIC_SELF_HOST=$SELF_HOST +NEXT_PUBLIC_ODOO_API_HOST=$ODOO_API_HOST +NEXT_PUBLIC_MIDTRANS_CLIENT_KEY=$MIDTRANS_CLIENT_KEY +NEXT_PUBLIC_RECAPTCHA_GOOGLE=$RECAPTCHA_GOOGLE +NEXT_PUBLIC_RAJA_ONGKIR_HOST=$RAJA_ONGKIR_HOST +NEXT_PUBLIC_RAJA_ONGKIR_KEY=$RAJA_ONGKIR_KEY +NEXT_PUBLIC_ODOO_HOST=$ODOO_API_HOST +NEXT_PUBLIC_PPN=$PPN \ No newline at end of file diff --git a/src-migrate/modules/page-content/index.tsx b/src-migrate/modules/page-content/index.tsx index 547b1957..af597641 100644 --- a/src-migrate/modules/page-content/index.tsx +++ b/src-migrate/modules/page-content/index.tsx @@ -1,44 +1,45 @@ -import { useMemo } from "react" -import { useQuery } from "react-query" -import { PageContentProps } from "~/types/pageContent" -import { getPageContent } from "~/services/pageContent" +import { useMemo } from 'react'; +import { useQuery } from 'react-query'; +import { PageContentProps } from '~/types/pageContent'; +import { getPageContent } from '~/services/pageContent'; type Props = { - path: string -} + path: string; +}; const PageContent = ({ path }: Props) => { - const { data, isLoading } = useQuery(`page-content:${path}`, async () => await getPageContent({ path })) + const { data, isLoading } = useQuery( + `page-content:${path}`, + async () => await getPageContent({ path }) + ); const parsedContent = useMemo(() => { - if (!data) return '' + if (!data) return ''; return data.content.replaceAll( 'src="/web/image', `src="${process.env.NEXT_PUBLIC_ODOO_API_HOST}/web/image` - ) - }, [data]) + ); + }, [data]); + console.log('parsedContent', parsedContent); + if (isLoading) return ; - if (isLoading) return - - return ( -
- ) -} + return
; +}; const PageContentSkeleton = () => ( -
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-) +); -export default PageContent \ No newline at end of file +export default PageContent; diff --git a/src-migrate/modules/product-promo/components/Item.tsx b/src-migrate/modules/product-promo/components/Item.tsx index b396160f..4b345654 100644 --- a/src-migrate/modules/product-promo/components/Item.tsx +++ b/src-migrate/modules/product-promo/components/Item.tsx @@ -1,34 +1,35 @@ -import style from '../styles/item.module.css' +import style from '../styles/item.module.css'; -import { Tooltip } from '@chakra-ui/react' +import { Tooltip } from '@chakra-ui/react'; -import Image from '~/components/ui/image' -import { IProductVariantPromo } from '~/types/promotion' +import Image from '~/components/ui/image'; +import { IProductVariantPromo } from '~/types/promotion'; type Props = { - variant: IProductVariantPromo, - isFree?: boolean -} + variant: IProductVariantPromo; + isFree?: boolean; +}; -const ProductPromoItem = ({ - variant, - isFree = false -}: Props) => { +const ProductPromoItem = ({ variant, isFree = false }: Props) => { return (
- {variant.display_name} + {variant.display_name}
{variant.qty} pcs {isFree ? '(free)' : ''}
-
- {variant.name} -
+
{variant.name}
- ) -} + ); +}; -export default ProductPromoItem \ No newline at end of file +export default ProductPromoItem; diff --git a/src-migrate/modules/promo/components/Hero.tsx b/src-migrate/modules/promo/components/Hero.tsx index 97cbe0b7..7d0aad11 100644 --- a/src-migrate/modules/promo/components/Hero.tsx +++ b/src-migrate/modules/promo/components/Hero.tsx @@ -3,34 +3,34 @@ import 'swiper/css'; import Image from 'next/image'; import { useEffect, useMemo } from 'react'; import { useQuery } from 'react-query'; -import { Swiper, SwiperProps, SwiperSlide } from 'swiper/react'; +import { Swiper, SwiperProps, SwiperSlide } from 'swiper/react'; import style from '../styles/hero.module.css'; import 'swiper/css/navigation'; import 'swiper/css/pagination'; -import { Navigation, Pagination, Autoplay } from 'swiper'; +import { Navigation, Pagination, Autoplay } from 'swiper'; import MobileView from '../../../../src/core/components/views/MobileView'; import DesktopView from '@/core/components/views/DesktopView'; -import {bannerApi} from '../../../../src/api/bannerApi' +import { bannerApi } from '../../../../src/api/bannerApi'; interface IPromotionProgram { headlineBanner: string; descriptionBanner: string; - image: string ; + image: string; name: string; } const swiperBanner: SwiperProps = { - modules:[Navigation, Pagination, Autoplay], + modules: [Navigation, Pagination, Autoplay], autoplay: { delay: 6000, - disableOnInteraction: false + disableOnInteraction: false, }, loop: true, className: 'h-[400px] w-full', slidesPerView: 1, spaceBetween: 10, - pagination:true, -} + pagination: true, +}; const swiperBannerMob = { autoplay: { delay: 6000, @@ -43,7 +43,10 @@ const swiperBannerMob = { }; const Hero = () => { - const heroBanner = useQuery('allPromo', bannerApi({ type: 'banner-semua-promo' })); + const heroBanner = useQuery( + 'allPromo', + bannerApi({ type: 'banner-semua-promo' }) + ); const banners: IPromotionProgram[] = useMemo( () => heroBanner?.data || [], @@ -54,52 +57,60 @@ const Hero = () => { ...swiperBannerMob, pagination: { dynamicBullets: false, clickable: true }, }; - + return ( <>
- - {banners?.map((banner, index) => ( - -
-
{banner?.headlineBanner? banner?.headlineBanner : "Pasti Hemat & Untung Selama Belanja di Indoteknik.com!"}
-
-
{banner?.descriptionBanner? banner?.descriptionBanner : "Cari paket yang kami sediakan dengan penawaran harga & Nikmati kemudahan dalam setiap transaksi dengan fitur lengkap Pembayaran hingga barang sampai!"}
+ + {banners?.map((banner, index) => ( + +
+
+ {banner?.headlineBanner + ? banner?.headlineBanner + : 'Pasti Hemat & Untung Selama Belanja di Indoteknik.com!'}
-
- {banner.name} +
+
+ {banner?.descriptionBanner + ? banner?.descriptionBanner + : 'Cari paket yang kami sediakan dengan penawaran harga & Nikmati kemudahan dalam setiap transaksi dengan fitur lengkap Pembayaran hingga barang sampai!'}
- - ))} - -
- - - - {banners?.map((banner, index) => ( - - {banner?.name} +
+
+ {banner.name} +
))} - +
+ + + + {banners?.map((banner, index) => ( + + {banner?.name} + + ))} + - ) -} + ); +}; -export default Hero \ No newline at end of file +export default Hero; diff --git a/src-migrate/modules/promo/components/PromotinProgram.jsx b/src-migrate/modules/promo/components/PromotinProgram.jsx index 33839944..43e4eedf 100644 --- a/src-migrate/modules/promo/components/PromotinProgram.jsx +++ b/src-migrate/modules/promo/components/PromotinProgram.jsx @@ -1,9 +1,7 @@ import React from 'react'; import Image from 'next/image'; -import { InfoIcon } from "lucide-react"; -import MobileView from '../../../../src/core/components/views/MobileView'; -import DesktopView from '@/core/components/views/DesktopView'; -import { Swiper, SwiperProps, SwiperSlide } from 'swiper/react'; +import { InfoIcon } from 'lucide-react'; +import { Swiper, SwiperProps, SwiperSlide } from 'swiper/react'; import 'swiper/css'; import useDevice from '@/core/hooks/useDevice'; @@ -11,9 +9,12 @@ const PromotionProgram = ({ selectedPromo, onSelectPromo }) => { const { isMobile } = useDevice(); return ( <> -
Serba Serbi Promo
+

+ {' '} + Serba Serbi Promo +

- {/*
+ {/*
onSelectPromo('Diskon')} className={`border p-2 flex items-center gap-x-2 rounded-lg cursor-pointer ${selectedPromo === 'Diskon' ? 'bg-red-50 border-red-500 text-red-500' : 'border-gray-200 text-gray-900'}`} @@ -39,93 +40,147 @@ const PromotionProgram = ({ selectedPromo, onSelectPromo }) => {
*/} - - - -
-
onSelectPromo('Bundling')} - className={`border h-full p-1 flex items-center gap-x-2 rounded-lg cursor-pointer ${selectedPromo === 'Bundling' ? 'bg-red-50 border-red-500 text-red-500' : 'border-gray-200 text-gray-900'}`} - > -
- -
-
-
-

Paket Silat

- -
-

- Pilihan bundling barang kombinasi Silat. -

+ + + +
+
onSelectPromo('Bundling')} + className={`border h-full p-1 flex items-center gap-x-2 rounded-lg cursor-pointer ${ + selectedPromo === 'Bundling' + ? 'bg-red-50 border-red-500 text-red-500' + : 'border-gray-200 text-gray-900' + }`} + > +
+ +
+
+
+

+ Paket Silat +

+
+

+ Pilihan bundling barang kombinasi Silat. +

- - -
-
onSelectPromo('Loading')} - className={`border p-2 h-full flex items-center gap-x-2 rounded-lg cursor-pointer ${selectedPromo === 'Loading' ? 'bg-red-50 border-red-500 text-red-500' : 'border-gray-200 text-gray-900'}`} - > -
- -
-
-
-

Paket Barong

- -
-

- Beli banyak barang/partai barang borong. -

+
+ + +
+
onSelectPromo('Loading')} + className={`border p-2 h-full flex items-center gap-x-2 rounded-lg cursor-pointer ${ + selectedPromo === 'Loading' + ? 'bg-red-50 border-red-500 text-red-500' + : 'border-gray-200 text-gray-900' + }`} + > +
+ +
+
+
+

+ Paket Barong +

+
+

+ Beli banyak barang/partai barang borong. +

- - -
-
onSelectPromo('Merchandise')} - className={`border p-2 h-full flex items-center gap-x-2 rounded-lg cursor-pointer ${selectedPromo === 'Merchandise' ? 'bg-red-50 border-red-500 text-red-500' : 'border-gray-200 text-gray-900'}`} - > -
- -
-
-
-

Paket Angklung

- -
-

- Gratis barang promosi/merchandise menang langsung. -

+
+ + +
+
onSelectPromo('Merchandise')} + className={`border p-2 h-full flex items-center gap-x-2 rounded-lg cursor-pointer ${ + selectedPromo === 'Merchandise' + ? 'bg-red-50 border-red-500 text-red-500' + : 'border-gray-200 text-gray-900' + }`} + > +
+ +
+
+
+

+ Paket Angklung +

+
+

+ Gratis barang promosi/merchandise menang langsung. +

- - +
+
+
); diff --git a/src-migrate/modules/promo/components/Voucher.tsx b/src-migrate/modules/promo/components/Voucher.tsx index 510fe746..034d13e9 100644 --- a/src-migrate/modules/promo/components/Voucher.tsx +++ b/src-migrate/modules/promo/components/Voucher.tsx @@ -55,15 +55,18 @@ const VoucherComponent = () => { slidesPerView: isMobile ? 1.2 : 3.2, spaceBetween: 2, }; - - const dataVouchers = useMemo(() => voucherQuery?.data || [], [voucherQuery?.data]); - const vouchers = auth?.id? listVouchers : dataVouchers; + const dataVouchers = useMemo( + () => voucherQuery?.data || [], + [voucherQuery?.data] + ); + const vouchers = auth?.id ? listVouchers : dataVouchers; const copyText = (text: string) => { if (navigator.clipboard && navigator.clipboard.writeText) { - navigator.clipboard.writeText(text) + navigator.clipboard + .writeText(text) .then(() => { toast({ title: 'Salin ke papan klip', @@ -72,7 +75,7 @@ const VoucherComponent = () => { duration: 3000, isClosable: true, position: 'top', - }) + }); }) .catch(() => { fallbackCopyTextToClipboard(text); @@ -80,10 +83,10 @@ const VoucherComponent = () => { } else { fallbackCopyTextToClipboard(text); } - } + }; const fallbackCopyTextToClipboard = (text: string) => { - const textArea = document.createElement("textarea"); + const textArea = document.createElement('textarea'); textArea.value = text; // Tambahkan style untuk menyembunyikan textArea secara visual textArea.style.position = 'fixed'; @@ -108,23 +111,26 @@ const VoucherComponent = () => { duration: 3000, isClosable: true, position: 'top', - }) + }); } catch (err) { console.error('Fallback: Oops, unable to copy', err); } document.body.removeChild(textArea); - } + }; return ( <> -
Pakai Voucher Belanja
+

Pakai Voucher Belanja

{voucherQuery?.isLoading && (
{Array.from({ length: 3 }).map((_, index) => ( -
+
))}
)} @@ -134,17 +140,36 @@ const VoucherComponent = () => { {vouchers?.map((voucher) => (
- {voucher?.name} + {voucher?.name}
-
{voucher?.name}
-
{voucher?.description}
+
+ {voucher?.name} +
+
+ {voucher?.description} +
-
Kode Promo
-
{voucher?.code}
+
+ Kode Promo +
+
+ {voucher?.code} +
- +
@@ -154,7 +179,7 @@ const VoucherComponent = () => {
)} - ) -} + ); +}; -export default VoucherComponent +export default VoucherComponent; diff --git a/src-migrate/modules/register/components/FormBisnis.tsx b/src-migrate/modules/register/components/FormBisnis.tsx index 5ee19e58..e4cf3442 100644 --- a/src-migrate/modules/register/components/FormBisnis.tsx +++ b/src-migrate/modules/register/components/FormBisnis.tsx @@ -325,7 +325,7 @@ const form: React.FC = ({ className='w-full h-full ' width={800} height={800} - quality={100} + quality={85} />
diff --git a/src-migrate/pages/shop/cart/index.tsx b/src-migrate/pages/shop/cart/index.tsx index 4768f62d..c5386c91 100644 --- a/src-migrate/pages/shop/cart/index.tsx +++ b/src-migrate/pages/shop/cart/index.tsx @@ -14,10 +14,10 @@ import clsxm from '~/libs/clsxm'; import useDevice from '@/core/hooks/useDevice'; import CartSummaryMobile from '~/modules/cart/components/CartSummaryMobile'; import Image from '~/components/ui/image'; -import { CartItem } from '~/types/cart' -import { deleteUserCart ,upsertUserCart } from '~/services/cart' +import { CartItem } from '~/types/cart'; +import { deleteUserCart, upsertUserCart } from '~/services/cart'; import { Trash2Icon } from 'lucide-react'; -import { useProductCartContext } from '@/contexts/ProductCartContext' +import { useProductCartContext } from '@/contexts/ProductCartContext'; const CartPage = () => { const router = useRouter(); @@ -26,11 +26,11 @@ const CartPage = () => { const [isSelectedAll, setIsSelectedAll] = useState(false); const [isButtonChek, setIsButtonChek] = useState(false); const [buttonSelectNow, setButtonSelectNow] = useState(true); - const [isLoad, setIsLoad] = useState(false) - const [isLoadDelete, setIsLoadDelete] = useState(false) + const [isLoad, setIsLoad] = useState(false); + const [isLoadDelete, setIsLoadDelete] = useState(false); const { loadCart, cart, summary, updateCartItem } = useCartStore(); const useDivvice = useDevice(); - const { setRefreshCart } = useProductCartContext() + const { setRefreshCart } = useProductCartContext(); const [isTop, setIsTop] = useState(true); const [hasChanged, setHasChanged] = useState(false); const prevCartRef = useRef(null); @@ -64,18 +64,19 @@ const CartPage = () => { const hasSelectedChanged = () => { if (prevCartRef.current && cart) { const prevCart = prevCartRef.current; - return cart.products.some((item, index) => - prevCart[index] && prevCart[index].selected !== item.selected + return cart.products.some( + (item, index) => + prevCart[index] && prevCart[index].selected !== item.selected ); } return false; }; if (hasSelectedChanged()) { - setHasChanged(true) + setHasChanged(true); // Perform necessary actions here if selection has changed - }else{ - setHasChanged(false) + } else { + setHasChanged(false); } prevCartRef.current = cart ? [...cart.products] : null; @@ -83,35 +84,38 @@ const CartPage = () => { const hasSelectedPromo = useMemo(() => { if (!cart) return false; - return cart.products.some(item => item.cart_type === 'promotion' && item.selected); + return cart.products.some( + (item) => item.cart_type === 'promotion' && item.selected + ); }, [cart]); const hasSelected = useMemo(() => { if (!cart) return false; - return cart.products.some(item => item.selected); + return cart.products.some((item) => item.selected); }, [cart]); const hasSelectNoPrice = useMemo(() => { if (!cart) return false; - return cart.products.some(item => item.selected && item.price.price_discount === 0); + return cart.products.some( + (item) => item.selected && item.price.price_discount === 0 + ); }, [cart]); const hasSelectedAll = useMemo(() => { if (!cart || !Array.isArray(cart.products)) return false; - return cart.products.every(item => item.selected); + return cart.products.every((item) => item.selected); }, [cart]); - useEffect(() => { const updateCartItems = async () => { if (typeof auth === 'object' && cart) { - const upsertPromises = cart.products.map(item => + const upsertPromises = cart.products.map((item) => upsertUserCart({ userId: auth.id, type: item.cart_type, id: item.id, qty: item.quantity, - selected: item.selected + selected: item.selected, }) ); try { @@ -128,7 +132,7 @@ const CartPage = () => { const handleCheckout = () => { router.push('/shop/checkout'); - } + }; const handleQuotation = () => { if (hasSelectedPromo || !hasSelected) { @@ -136,54 +140,53 @@ const CartPage = () => { } else { router.push('/shop/quotation'); } - } + }; const handleChange = async (e: React.ChangeEvent) => { - - if (cart) { const updatedCart = { ...cart, - products: cart.products.map(item => ({ + products: cart.products.map((item) => ({ ...item, - selected: !hasSelectedAll - })) + selected: !hasSelectedAll, + })), }; - - updateCartItem(updatedCart); - if(hasSelectedAll){ + + updateCartItem(updatedCart); + if (hasSelectedAll) { setIsSelectedAll(false); - }else{ + } else { setIsSelectedAll(true); } } }; - const handleDelete = async () => { if (typeof auth !== 'object' || !cart) return; - setIsLoadDelete(true) + setIsLoadDelete(true); for (const item of cart.products) { - if(item.selected === true){ - await deleteUserCart(auth.id, [item.cart_id]) - await loadCart(auth.id) + if (item.selected === true) { + await deleteUserCart(auth.id, [item.cart_id]); + await loadCart(auth.id); } } - setIsLoadDelete(false) - setRefreshCart(true) - } + setIsLoadDelete(false); + setRefreshCart(true); + }; return ( <> -
-
Keranjang Belanja
+
+

Keranjang Belanja

- {isLoad && ( - - )} + {isLoad && } {!isLoad && ( { onChange={handleChange} /> )} -

- {hasSelectedAll ? "Uncheck all" : "Select all"} -

+

+ {hasSelectedAll ? 'Uncheck all' : 'Select all'} +

+
+
+ + +
-
- - - -
-
@@ -274,7 +274,13 @@ const CartPage = () => { )} -
+
{ ); }; -export default CartPage; \ No newline at end of file +export default CartPage; diff --git a/src/core/components/elements/Footer/BasicFooter.jsx b/src/core/components/elements/Footer/BasicFooter.jsx index 8f024d86..4688b15b 100644 --- a/src/core/components/elements/Footer/BasicFooter.jsx +++ b/src/core/components/elements/Footer/BasicFooter.jsx @@ -175,7 +175,7 @@ const CustomerGuide = () => (
Bantuan & Panduan
    -
  • +
  • Metode Pembayaran @@ -395,7 +395,7 @@ const Payments = () => ( alt='Metode Pembayaran - Indoteknik' width={512} height={512} - quality={100} + quality={85} className='w-full' />
@@ -409,7 +409,7 @@ const Shippings = () => ( alt='Jasa Pengiriman - Indoteknik' width={512} height={512} - quality={100} + quality={85} className='w-full' />
@@ -423,7 +423,7 @@ const Secures = () => ( alt='Keamanan Belanja - Indoteknik' width={512} height={512} - quality={100} + quality={85} className='w-full' />
diff --git a/src/core/components/elements/Navbar/NavbarDesktop.jsx b/src/core/components/elements/Navbar/NavbarDesktop.jsx index 2a51c41f..d480aa8d 100644 --- a/src/core/components/elements/Navbar/NavbarDesktop.jsx +++ b/src/core/components/elements/Navbar/NavbarDesktop.jsx @@ -5,7 +5,7 @@ import { createSlug } from '@/core/utils/slug'; import whatsappUrl from '@/core/utils/whatsappUrl'; import IndoteknikLogo from '@/images/logo.png'; import Cardheader from '@/lib/cart/components/Cartheader'; -import Quotationheader from "../../../../../src/lib/quotation/components/Quotationheader.jsx" +import Quotationheader from '../../../../../src/lib/quotation/components/Quotationheader.jsx'; import Category from '@/lib/category/components/Category'; import { useProductCartContext } from '@/contexts/ProductCartContext'; import { @@ -30,7 +30,7 @@ import { MenuList, useDisclosure, } from '@chakra-ui/react'; -import style from "./style/NavbarDesktop.module.css"; +import style from './style/NavbarDesktop.module.css'; import useTransactions from '@/lib/transaction/hooks/useTransactions'; import { useCartStore } from '~/modules/cart/stores/useCartStore'; @@ -43,7 +43,7 @@ const NavbarDesktop = () => { const [cartCount, setCartCount] = useState(0); const [quotationCount, setQuotationCount] = useState(0); - const [pendingTransactions, setPendingTransactions] = useState([]) + const [pendingTransactions, setPendingTransactions] = useState([]); const [templateWA, setTemplateWA] = useState(null); const [payloadWA, setPayloadWa] = useState(null); const [urlPath, setUrlPath] = useState(null); @@ -52,14 +52,17 @@ const NavbarDesktop = () => { const { product } = useProductContext(); const { isOpen, onOpen, onClose } = useDisclosure(); - + const query = { context: 'quotation', - site: - (auth?.webRole === null && auth?.site ? auth.site : null), + site: auth?.webRole === null && auth?.site ? auth.site : null, }; - - const { transactions } = useTransactions({ query }); + let transactions = null; + + if (auth) { + transactions = useTransactions({ query }); + } + const data = transactions?.data?.saleOrders.filter( (transaction) => transaction.status === 'draft' ); @@ -106,9 +109,8 @@ const NavbarDesktop = () => { useEffect(() => { setPendingTransactions(data); - }, [transactions.data]); - - + }, [transactions?.data]); + useEffect(() => { if (router.pathname === '/shop/product/[slug]') { setPayloadWa({ @@ -117,11 +119,11 @@ const NavbarDesktop = () => { url: createSlug('/shop/product/', product?.name, product?.id, true), }); setTemplateWA('product'); - + setUrlPath(router.asPath); } }, [product, router]); - + useEffect(() => { const handleCartChange = () => { const cart = async () => { @@ -130,14 +132,14 @@ const NavbarDesktop = () => { }; cart(); }; - handleCartChange(); - + handleCartChange(); + window.addEventListener('localStorageChange', handleCartChange); - + return () => { window.removeEventListener('localStorageChange', handleCartChange); }; - }, [transactions.data, cart]); + }, [transactions?.data, cart]); useEffect(() => { const handleQuotationChange = () => { @@ -154,7 +156,7 @@ const NavbarDesktop = () => { window.removeEventListener('localStorageChange', handleQuotationChange); }; }, [pendingTransactions]); - + return ( @@ -174,7 +176,7 @@ const NavbarDesktop = () => { >
Fitur Layanan
- +
{
- + @@ -271,29 +276,30 @@ const NavbarDesktop = () => {
- - - {showPopup && ( -
+ {showPopup && ( +
penawaran terbatas + src='/images/penawaran-terbatas.jpg' + alt='penawaran terbatas' + width={1440} + height={160} + quality={85} + // className={`fixed ${isTop ? 'md:top-[145px] lg:top-[160px] ' : 'lg:top-[85px] top-[80px]'} rounded-3xl md:left-1/4 lg:left-1/4 xl:left-1/4 left-2/3 w-40 h-12 p-2 z-50 transition-all duration-300 animate-pulse`} + className={`inline-block relative -top-8 transition-all duration-300 z-20 animate-pulse`} + />
- )} - Semua Promo + )} + + Semua Promo + {/* {showPopup && router.pathname === '/' && (
@@ -302,17 +308,18 @@ const NavbarDesktop = () => {

)} */} - - Semua Brand + + Semua Brand + { target='_blank' rel='noreferrer' > - Ready Stock + + Ready Stock + { target='_blank' rel='noreferrer noopener' > - Blog Indoteknik + + Blog Indoteknik + {/* { - const fetchBannerSection = async () => await bannerSectionApi() - const bannerSection = useQuery('bannerSection', fetchBannerSection) + const fetchBannerSection = async () => await bannerSectionApi(); + const bannerSection = useQuery('bannerSection', fetchBannerSection); return ( bannerSection.data && @@ -17,7 +17,7 @@ const BannerSection = () => { {banner.name} { ))}
) - ) -} + ); +}; -export default BannerSection +export default BannerSection; diff --git a/src/lib/home/components/CategoryDynamic.jsx b/src/lib/home/components/CategoryDynamic.jsx index 79092c9d..49a9a93f 100644 --- a/src/lib/home/components/CategoryDynamic.jsx +++ b/src/lib/home/components/CategoryDynamic.jsx @@ -3,13 +3,12 @@ import { fetchCategoryManagementSolr } from '../api/categoryManagementApi'; import NextImage from 'next/image'; import Link from 'next/link'; import { createSlug } from '@/core/utils/slug'; -import odooApi from '@/core/api/odooApi'; import { Skeleton } from '@chakra-ui/react'; import { Swiper, SwiperSlide } from 'swiper/react'; import 'swiper/css'; import 'swiper/css/navigation'; import 'swiper/css/pagination'; -import { Navigation, Pagination, Autoplay } from 'swiper'; +import { Pagination } from 'swiper'; const CategoryDynamic = () => { const [categoryManagement, setCategoryManagement] = useState([]); @@ -73,9 +72,9 @@ const CategoryDynamic = () => {
-
+

{category.name} -

+ {/*

{countLevel1} Produk tersedia

*/} @@ -113,9 +112,9 @@ const CategoryDynamic = () => { className='object-fit p-4' />
-
+

{subCategory?.name} -

+ {/*

{countLevel2} Produk tersedia @@ -157,9 +156,9 @@ const CategoryDynamic = () => { height={40} />

-
+

{childCategory.name} -

+
diff --git a/src/lib/home/components/CategoryDynamicMobile.jsx b/src/lib/home/components/CategoryDynamicMobile.jsx index af151df2..4a8f13cf 100644 --- a/src/lib/home/components/CategoryDynamicMobile.jsx +++ b/src/lib/home/components/CategoryDynamicMobile.jsx @@ -59,9 +59,9 @@ const CategoryDynamicMobile = () => { categoryManagement?.map((category) => (
-
- {category?.name} -
+

+ {category.name} +

{ className='' />
-
+

{index?.name} -

+
@@ -131,9 +131,9 @@ const CategoryDynamicMobile = () => { className='p-2' />
-
+

{x?.name} -

+
diff --git a/src/lib/home/components/CategoryHomeId.jsx b/src/lib/home/components/CategoryHomeId.jsx index 71428e27..9f436dac 100644 --- a/src/lib/home/components/CategoryHomeId.jsx +++ b/src/lib/home/components/CategoryHomeId.jsx @@ -1,13 +1,15 @@ -import { LazyLoadComponent } from 'react-lazy-load-image-component' -import useCategoryHomeId from '../hooks/useCategoryHomeId' -import CategoryHome from './CategoryHome' +import { LazyLoadComponent } from 'react-lazy-load-image-component'; +import useCategoryHomeId from '../hooks/useCategoryHomeId'; +import CategoryHome from './CategoryHome'; const CategoryHomeId = () => { - const { categoryHomeIds } = useCategoryHomeId() + const { categoryHomeIds } = useCategoryHomeId(); return (
-
Kategori Pilihan
+

+ Kategori Pilihan +

{categoryHomeIds.data?.map((id) => ( @@ -16,7 +18,7 @@ const CategoryHomeId = () => { ))}
- ) -} + ); +}; -export default CategoryHomeId +export default CategoryHomeId; diff --git a/src/lib/home/components/CategoryPilihan.jsx b/src/lib/home/components/CategoryPilihan.jsx index 6dbf771e..2e5ca721 100644 --- a/src/lib/home/components/CategoryPilihan.jsx +++ b/src/lib/home/components/CategoryPilihan.jsx @@ -1,123 +1,168 @@ -import Image from 'next/image' -import useCategoryHome from '../hooks/useCategoryHome' -import Link from '@/core/components/elements/Link/Link' -import { createSlug } from '@/core/utils/slug' +import Image from 'next/image'; +import useCategoryHome from '../hooks/useCategoryHome'; +import Link from '@/core/components/elements/Link/Link'; +import { createSlug } from '@/core/utils/slug'; import { useEffect, useState } from 'react'; import { bannerApi } from '../../../api/bannerApi'; -const { useQuery } = require('react-query') +const { useQuery } = require('react-query'); import { HeroBannerSkeleton } from '../../../components/skeleton/BannerSkeleton'; import useCategoryPilihan from '../hooks/useCategoryPilihan'; -import useDevice from '@/core/hooks/useDevice' +import useDevice from '@/core/hooks/useDevice'; import { Swiper, SwiperSlide } from 'swiper/react'; import 'swiper/css'; const CategoryPilihan = ({ id, categories }) => { - const { isDesktop, isMobile } = useDevice() - const { categoryPilihan } = useCategoryPilihan(); - const heroBanner = useQuery('categoryPilihan', bannerApi({ type: 'banner-category-list' })); - return ( - categoryPilihan.length > 0 && ( -
- {isDesktop && ( -
-
-
LOB Kategori Pilihan
-

200 Rb+ Produk Unggulan & 800+ Brand Rekomendasi tersedia!

-
- {heroBanner.data && - heroBanner.data?.length > 0 && ( -
- - {heroBanner.data[0].name} - -
- )} -
- {categoryPilihan?.data?.map((category) => ( -
-
-
-
- {category?.name} -
-

{category?.industries}

-
-
-
- - Lihat semua - -
-
- ))} + const { isDesktop, isMobile } = useDevice(); + const { categoryPilihan } = useCategoryPilihan(); + const heroBanner = useQuery( + 'categoryPilihan', + bannerApi({ type: 'banner-category-list' }) + ); + return ( + categoryPilihan.length > 0 && ( +
+ {isDesktop && ( +
+
+
+ LOB Kategori Pilihan +
+

+ 200 Rb+ Produk Unggulan & 800+ Brand Rekomendasi tersedia! +

+
+ {heroBanner.data && heroBanner.data?.length > 0 && ( +
+ + {heroBanner.data[0].name} + +
+ )} +
+ {categoryPilihan?.data?.map((category) => ( +
+
+
+
+ {category?.name} +
+

+ {category?.industries} +

+
+
+ + Lihat semua + +
- )} - {isMobile && ( -
-
-
LOB Kategori Pilihan
- {/*

200 Rb+ Produk Unggulan & 800+ Brand Rekomendasi tersedia!

*/} + ))} +
+
+ )} + {isMobile && ( +
+
+
+ LOB Kategori Pilihan +
+ {/*

200 Rb+ Produk Unggulan & 800+ Brand Rekomendasi tersedia!

*/} +
+
+ {heroBanner.data && heroBanner.data?.length > 0 && ( +
+ + {heroBanner.data[0].name} + +
+ )} +
+ + {categoryPilihan?.data?.map((category) => ( + +
+
+
+
+ {category?.name} +
+

+ {category?.industries} +

+
-
- {heroBanner.data && - heroBanner.data?.length > 0 && ( -
- - {heroBanner.data[0].name} - -
- )} +
+ + Lihat semua +
- - {categoryPilihan?.data?.map((category) => ( - -
-
-
-
- {category?.name} -
-

{category?.industries}

-
-
-
- - Lihat semua - -
-
-
- ))} - -
- -
- )} -
- - ) - ) -} +
+ + ))} + +
+ )} +
+ ) + ); +}; -export default CategoryPilihan +export default CategoryPilihan; diff --git a/src/lib/home/components/PromotionProgram.jsx b/src/lib/home/components/PromotionProgram.jsx index ae8d5d6f..ae06bd4d 100644 --- a/src/lib/home/components/PromotionProgram.jsx +++ b/src/lib/home/components/PromotionProgram.jsx @@ -1,13 +1,16 @@ -import Link from '@/core/components/elements/Link/Link' -import Image from 'next/image' +import Link from '@/core/components/elements/Link/Link'; +import Image from 'next/image'; import { bannerApi } from '@/api/bannerApi'; -import useDevice from '@/core/hooks/useDevice' +import useDevice from '@/core/hooks/useDevice'; import { Swiper, SwiperSlide } from 'swiper/react'; -import BannerPromoSkeleton from '../components/Skeleton/BannerPromoSkeleton'; -const { useQuery } = require('react-query') +import BannerPromoSkeleton from '../components/Skeleton/BannerPromoSkeleton'; +const { useQuery } = require('react-query'); const BannerSection = () => { - const promotionProgram = useQuery('promotionProgram', bannerApi({ type: 'banner-promotion' })); - const { isMobile, isDesktop } = useDevice() + const promotionProgram = useQuery( + 'promotionProgram', + bannerApi({ type: 'banner-promotion' }) + ); + const { isMobile, isDesktop } = useDevice(); if (promotionProgram.isLoading) { return ; @@ -16,60 +19,65 @@ const BannerSection = () => { return (
-

Promo Tersedia

+

+ {' '} + + Promo Tersedia + +

{isDesktop && ( - Lihat Semua - + Lihat Semua + )} {isMobile && ( - - Lihat Semua - - )} -
- {isDesktop && (promotionProgram.data && - promotionProgram.data?.length > 0 && ( -
- {promotionProgram.data?.map((banner) => ( - - {banner.name} + + Lihat Semua - ))} + )}
- - ))} + {isDesktop && + promotionProgram.data && + promotionProgram.data?.length > 0 && ( +
+ {promotionProgram.data?.map((banner) => ( + + {banner.name} + + ))} +
+ )} -{isMobile && ( - - - {promotionProgram.data?.map((banner) => ( - - - {banner.name} - - - ))} - - - )} + {isMobile && ( + + {promotionProgram.data?.map((banner) => ( + + + {banner.name} + + + ))} + + )}
- - ) -} + ); +}; -export default BannerSection +export default BannerSection; diff --git a/src/lib/home/components/ServiceList.jsx b/src/lib/home/components/ServiceList.jsx index b8799d7d..5b16915d 100644 --- a/src/lib/home/components/ServiceList.jsx +++ b/src/lib/home/components/ServiceList.jsx @@ -1,5 +1,5 @@ -import Image from 'next/image' -import Link from '@/core/components/elements/Link/Link' +import Image from 'next/image'; +import Link from '@/core/components/elements/Link/Link'; const ServiceList = () => { return ( @@ -14,14 +14,16 @@ const ServiceList = () => {
-

One Stop Solution

+

+ One Stop Solution +

Temukan Solusi Lengkap Anda dalam Satu Tempat.

@@ -37,14 +39,16 @@ const ServiceList = () => {
-

Garansi Resmi

+

+ Garansi Resmi +

Garansi Keaslian Barang dan Jaminan Purna Jual.

@@ -60,14 +64,16 @@ const ServiceList = () => {
-

Pembayaran Tempo

+

+ Pembayaran Tempo +

Lebih mudah mengatur pembelian dengan pembayaran tempo.

@@ -83,14 +89,16 @@ const ServiceList = () => {
-

Faktur Pajak

+

+ Faktur Pajak +

Dapat Faktur pajak untuk setiap transaksi dengan indoteknik.com

@@ -99,7 +107,7 @@ const ServiceList = () => {
- ) -} + ); +}; -export default ServiceList +export default ServiceList; diff --git a/src/lib/quotation/components/Quotationheader.jsx b/src/lib/quotation/components/Quotationheader.jsx index 4529c977..cb7684ed 100644 --- a/src/lib/quotation/components/Quotationheader.jsx +++ b/src/lib/quotation/components/Quotationheader.jsx @@ -19,14 +19,22 @@ const Quotationheader = (quotationCount) => { context: 'quotation', site: auth?.webRole === null && auth?.site ? auth.site : null, }; - + const router = useRouter(); const [subTotal, setSubTotal] = useState(null); const [buttonLoading, SetButtonTerapkan] = useState(false); const itemLoading = [1, 2, 3]; const [countQuotation, setCountQuotation] = useState(null); - const { productCart, setProductCart, refreshCart, setRefreshCart, isLoading, setIsloading, productQuotation, setProductQuotation } = - useProductCartContext(); + const { + productCart, + setProductCart, + refreshCart, + setRefreshCart, + isLoading, + setIsloading, + productQuotation, + setProductQuotation, + } = useProductCartContext(); const [isHovered, setIsHovered] = useState(false); const [isTop, setIsTop] = useState(true); @@ -49,34 +57,44 @@ const Quotationheader = (quotationCount) => { refreshCartf(); } }; - let { transactions } = useTransactions({ query }); + let transactions = null; + + if (auth) { + transactions = useTransactions({ query }); + } const refreshCartf = useCallback(async () => { setIsloading(true); - let pendingTransactions = transactions?.data?.saleOrders.filter(transaction => transaction.status === 'draft'); + let pendingTransactions = transactions?.data?.saleOrders.filter( + (transaction) => transaction.status === 'draft' + ); setProductQuotation(pendingTransactions); - setCountQuotation(pendingTransactions?.length ? pendingTransactions?.length : pendingTransactions?.length); + setCountQuotation( + pendingTransactions?.length + ? pendingTransactions?.length + : pendingTransactions?.length + ); setIsloading(false); }, [setProductQuotation, setIsloading]); useEffect(() => { - if (!qotation) return + if (!qotation) return; - let calculateTotalDiscountAmount = 0 + let calculateTotalDiscountAmount = 0; for (const product of qotation) { - // if (qotation.quantity == '') continue - calculateTotalDiscountAmount += product.amountUntaxed + // if (qotation.quantity == '') continue + calculateTotalDiscountAmount += product.amountUntaxed; } - let subTotal = calculateTotalDiscountAmount - setSubTotal(subTotal) - }, [qotation]) + let subTotal = calculateTotalDiscountAmount; + setSubTotal(subTotal); + }, [qotation]); useEffect(() => { if (refreshCart) { refreshCartf(); } setRefreshCart(false); - }, [ refreshCartf, setRefreshCart]); + }, [refreshCartf, setRefreshCart]); useEffect(() => { setCountQuotation(quotationCount.quotationCount); @@ -95,7 +113,10 @@ const Quotationheader = (quotationCount) => { const handleCheckout = async () => { SetButtonTerapkan(true); - let checkoutAll = await odooApi('POST', `/api/v1/user/${auth.id}/cart/select-all`); + let checkoutAll = await odooApi( + 'POST', + `/api/v1/user/${auth.id}/cart/select-all` + ); router.push('/my/quotations'); }; @@ -150,7 +171,9 @@ const Quotationheader = (quotationCount) => { className='w-full max-w-md p-2 bg-white border border-gray-200 rounded-lg shadow overflow-hidden' >
-
Daftar Quotation
+
+ Daftar Quotation +

@@ -158,7 +181,10 @@ const Quotationheader = (quotationCount) => {

Silahkan{' '} - + Login {' '} Untuk Melihat Daftar Quotation Anda @@ -167,7 +193,11 @@ const Quotationheader = (quotationCount) => { )} {isLoading && itemLoading.map((item) => ( -

+
@@ -189,43 +219,70 @@ const Quotationheader = (quotationCount) => { )} {auth && qotation.length > 0 && !isLoading && ( <> -
    +
      {qotation && qotation?.map((product, index) => ( <>
    • - + className='hover:border-red-500' + >
      -

      Sales :

      -

      {product.sales}

      +

      + Sales :{' '} +

      +

      + {product.sales} +

      -

      Status :

      -

      Pending Quotation

      +

      + Status : +

      +

      + Pending Quotation +

      -

      No. Transaksi

      -

      {product.name}

      +

      + No. Transaksi +

      +

      + {' '} + {product.name} +

      -

      No. Purchase Order

      -

      {product.purchaseOrderName ? product.purchaseOrderName : '-'}

      +

      + No. Purchase Order +

      +

      + {' '} + {product.purchaseOrderName + ? product.purchaseOrderName + : '-'} +

      {/*
      */}
      -

      Total

      -

      {currencyFormat(product.amountUntaxed)}

      +

      + Total +

      +

      + {currencyFormat(product.amountUntaxed)} +

      - +
    • @@ -238,8 +295,12 @@ const Quotationheader = (quotationCount) => { {auth && qotation.length > 0 && !isLoading && ( <>
      - Subtotal Sebelum PPN : - {currencyFormat(subTotal)} + + Subtotal Sebelum PPN :{' '} + + + {currencyFormat(subTotal)} +
      -
      - - {/* Display the API error message */} - {apiError &&
      {apiError}
      } - +
      + + +
      + {errors.email?.message} +
      -
- ) -} +
+
+ +
+ + {/* Display the API error message */} + {apiError &&
{apiError}
} + +
+
+ ); +}; const validationSchema = Yup.object().shape({ - email: Yup.string().email('Format harus seperti contoh@email.com').required('Harus di-isi'), - id: Yup.string().required('Harus di-isi'), -}) + email: Yup.string() + .email('Format harus seperti contoh@email.com') + .required('Harus di-isi'), + id: Yup.string().required('Harus di-isi'), +}); const defaultValues = { - email: '', - id: '' -} + email: '', + id: '', +}; -export default TrackingOrder +export default TrackingOrder; diff --git a/src/pages/my/profile.jsx b/src/pages/my/profile.jsx index 25c3a608..7cf1bcbb 100644 --- a/src/pages/my/profile.jsx +++ b/src/pages/my/profile.jsx @@ -1,41 +1,44 @@ -import Divider from '@/core/components/elements/Divider/Divider' -import AppLayout from '@/core/components/layouts/AppLayout' -import BasicLayout from '@/core/components/layouts/BasicLayout' -import DesktopView from '@/core/components/views/DesktopView' -import MobileView from '@/core/components/views/MobileView' -import useAuth from '@/core/hooks/useAuth' -import CompanyProfile from '@/lib/auth/components/CompanyProfile' -import IsAuth from '@/lib/auth/components/IsAuth' -import Menu from '@/lib/auth/components/Menu' -import PersonalProfile from '@/lib/auth/components/PersonalProfile' +import Divider from '@/core/components/elements/Divider/Divider'; +import AppLayout from '@/core/components/layouts/AppLayout'; +import BasicLayout from '@/core/components/layouts/BasicLayout'; +import DesktopView from '@/core/components/views/DesktopView'; +import MobileView from '@/core/components/views/MobileView'; +import useAuth from '@/core/hooks/useAuth'; +import CompanyProfile from '@/lib/auth/components/CompanyProfile'; +import IsAuth from '@/lib/auth/components/IsAuth'; +import Menu from '@/lib/auth/components/Menu'; +import PersonalProfile from '@/lib/auth/components/PersonalProfile'; +import Seo from '@/core/components/Seo'; export default function Profile() { - const auth = useAuth() + const auth = useAuth(); return ( - - - - - - {auth?.parentId && } - - - - - -
-
- -
-
+ <> + + + + {auth?.parentId && } + + -
-
-
-
-
- ) + + +
+
+ +
+
+ + + {auth?.parentId && } +
+
+
+
+ + + ); } -- cgit v1.2.3 From 6448a83e088b68195e9b94036d3e8e2184ae701c Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Tue, 24 Sep 2024 16:54:37 +0700 Subject: update code --- src/lib/brand/components/BrandCard.jsx | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/lib/brand/components/BrandCard.jsx b/src/lib/brand/components/BrandCard.jsx index 2d78d956..ebd41a67 100644 --- a/src/lib/brand/components/BrandCard.jsx +++ b/src/lib/brand/components/BrandCard.jsx @@ -1,10 +1,10 @@ -import Image from '~/components/ui/image' -import Link from '@/core/components/elements/Link/Link' -import useDevice from '@/core/hooks/useDevice' -import { createSlug } from '@/core/utils/slug' +import NextImage from 'next/image'; +import Link from '@/core/components/elements/Link/Link'; +import useDevice from '@/core/hooks/useDevice'; +import { createSlug } from '@/core/utils/slug'; const BrandCard = ({ brand }) => { - const { isMobile } = useDevice() + const { isMobile } = useDevice(); return ( { }`} > {brand.logo && ( - {brand.name} )} {!brand.logo && ( - + {brand.name} )} - ) -} + ); +}; -export default BrandCard +export default BrandCard; -- cgit v1.2.3 From a66b690ad0445452816f3ac8f8e98dba2e53ca31 Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Tue, 24 Sep 2024 17:08:08 +0700 Subject: delete env --- .env | 45 --------------------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 .env diff --git a/.env b/.env deleted file mode 100644 index 1aca1dbc..00000000 --- a/.env +++ /dev/null @@ -1,45 +0,0 @@ -SELF_HOST=http://localhost:2100 -# SELF_HOST=http://192.168.23.178:2100 -# ODOO_API_HOST=http://192.168.23.191:8069 -# ODOO_API_HOST=http://192.168.23.251:8069 -# ODOO_API_HOST=http://192.168.23.73:8069 -# ODOO_API_HOST=https://erp.indoteknik.com -ODOO_API_HOST=http://localhost:8069 -SOLR_HOST=http://34.101.189.218:8983 -# SOLR_HOST=http://192.168.23.5:8983 -# SOLR_HOST=http://localhost:8983 - -RAJA_ONGKIR_HOST='https://pro.rajaongkir.com' -RAJA_ONGKIR_KEY='7ac9883688da043b50cc32f0e3070bb6' - -MAIL_PORT=465 -MAIL_HOST=smtp.gmail.com -MAIL_USER=sales@indoteknik.com -MAIL_PASS=#&Win*%a3C%^FF - -MIDTRANS_HOST=https://api.sandbox.midtrans.com -MIDTRANS_ENV=development -MIDTRANS_SERVER_KEY=SB-Mid-server-n-V7d2c2ZB0SVED29OyCWVYp -MIDTRANS_CLIENT_KEY=SB-Mid-client-IsVHHv5mzPqNV7bs - -RECAPTCHA_GOOGLE=6LdajH0lAAAAAI6kCVHjR9rHuD22Pf-X7XakSQ_P - -NEXTAUTH_URL=http://localhost:2100 - -PPN=1.11 - -# GOOGLE_CLIENT_ID="396438712998-308hckshgeekr34phr5jskj1f6qltfvk.apps.googleusercontent.com" -# GOOGLE_CLIENT_SECRET=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 -GOOGLE_CLIENT_ID="140590317805-5k5v3pjb7gcv4rcefgt8udgmn3hllv0q.apps.googleusercontent.com" -GOOGLE_CLIENT_SECRET=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 - -JWT_SECRET=NTNv7j0TuYARvmNMmWXo6fKvM4o6nvaUi9ryX38ZHL1bkrnD1ObOQ8JAUmHCBq7Iy7otZcyAagBLHVKvvYaIpmMuxmARQ97jUVG16Jkpkp1wXOPsrF9zwew6TpczyHkHgX5EuLg2MeBuiTqJACs1J0apruOOJCggOtkjB4c - -NEXT_PUBLIC_SELF_HOST=$SELF_HOST -NEXT_PUBLIC_ODOO_API_HOST=$ODOO_API_HOST -NEXT_PUBLIC_MIDTRANS_CLIENT_KEY=$MIDTRANS_CLIENT_KEY -NEXT_PUBLIC_RECAPTCHA_GOOGLE=$RECAPTCHA_GOOGLE -NEXT_PUBLIC_RAJA_ONGKIR_HOST=$RAJA_ONGKIR_HOST -NEXT_PUBLIC_RAJA_ONGKIR_KEY=$RAJA_ONGKIR_KEY -NEXT_PUBLIC_ODOO_HOST=$ODOO_API_HOST -NEXT_PUBLIC_PPN=$PPN \ No newline at end of file -- cgit v1.2.3