From 961d68ecdd7cb503889fc23e47490673d52bb5ac Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Fri, 12 May 2023 16:32:58 +0700 Subject: swiper loop slide --- src/lib/home/components/HeroBanner.jsx | 19 ++++++++++--------- src/lib/review/components/CustomerReviews.jsx | 14 ++++++++++++-- 2 files changed, 22 insertions(+), 11 deletions(-) (limited to 'src/lib') diff --git a/src/lib/home/components/HeroBanner.jsx b/src/lib/home/components/HeroBanner.jsx index 50cfc0ff..889bb2ce 100644 --- a/src/lib/home/components/HeroBanner.jsx +++ b/src/lib/home/components/HeroBanner.jsx @@ -15,22 +15,23 @@ import Link from '@/core/components/elements/Link/Link' const HeroBanner = () => { const { heroBanners } = useHeroBanner() - const swiperBannerMobile = { - pagination: { dynamicBullets: true, clickable: true }, + const swiperBanner = { autoplay: { delay: 6000, disableOnInteraction: false }, - modules: [Pagination, Autoplay] + modules: [Pagination, Autoplay], + loop: true + } + + const swiperBannerMobile = { + ...swiperBanner, + pagination: { dynamicBullets: true, clickable: true } } const swiperBannerDesktop = { - pagination: { dynamicBullets: false, clickable: true }, - autoplay: { - delay: 6000, - disableOnInteraction: false - }, - modules: [Pagination, Autoplay] + ...swiperBanner, + pagination: { dynamicBullets: false, clickable: true } } return ( diff --git a/src/lib/review/components/CustomerReviews.jsx b/src/lib/review/components/CustomerReviews.jsx index 935d4a3d..5cc179e9 100644 --- a/src/lib/review/components/CustomerReviews.jsx +++ b/src/lib/review/components/CustomerReviews.jsx @@ -2,6 +2,7 @@ import DesktopView from '@/core/components/views/DesktopView' import MobileView from '@/core/components/views/MobileView' import Image from 'next/image' import { Swiper, SwiperSlide } from 'swiper/react' +import { Autoplay } from 'swiper' const { useQuery } = require('react-query') const { getCustomerReviews } = require('../api/customerReviewsApi') @@ -14,7 +15,7 @@ const CustomerReviews = () => {
Ulasan Konsumen Kami
- + {customerReviews && customerReviews?.map((customerReview) => ( @@ -25,7 +26,7 @@ const CustomerReviews = () => { - + {customerReviews && customerReviews?.map((customerReview) => ( @@ -38,6 +39,15 @@ const CustomerReviews = () => { ) } +const swiperProps = { + autoplay: { + delay: 6000, + disableOnInteraction: false + }, + loop: true, + modules: [Autoplay] +} + const Card = ({ customerReview }) => (
-- cgit v1.2.3 From 2a0933e4dd2230bd76cf09f287dcbeee8ede67e3 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Mon, 15 May 2023 09:39:34 +0700 Subject: Add quotation, invoice, transaction title and manage profile desktop --- src/lib/auth/components/CompanyProfile.jsx | 70 ++++++++++++------------- src/lib/auth/components/Menu.jsx | 3 ++ src/lib/auth/components/PersonalProfile.jsx | 54 +++++++++---------- src/lib/invoice/components/Invoices.jsx | 6 +-- src/lib/transaction/components/Transactions.jsx | 4 +- 5 files changed, 68 insertions(+), 69 deletions(-) (limited to 'src/lib') diff --git a/src/lib/auth/components/CompanyProfile.jsx b/src/lib/auth/components/CompanyProfile.jsx index 13d4a194..ff673953 100644 --- a/src/lib/auth/components/CompanyProfile.jsx +++ b/src/lib/auth/components/CompanyProfile.jsx @@ -60,7 +60,6 @@ const CompanyProfile = () => { } const isUpdated = await odooApi('PUT', `/api/v1/partner/${auth.parentId}`, data) if (isUpdated?.id) { - setIsOpen(false) toast.success('Berhasil mengubah profil', { duration: 1500 }) return } @@ -69,59 +68,58 @@ const CompanyProfile = () => { return ( <> - {isOpen && ( -
-
- - } - /> -
-
-
Nama Usaha
-
+ +
+
+ } + render={(props) => } />
-
- +
+
Nama Usaha
+
+ } + /> +
+
+ +
+
+
+ + +
+
+ +
-
- - -
-
- - -
- diff --git a/src/lib/auth/components/Menu.jsx b/src/lib/auth/components/Menu.jsx index 8a8e2e8a..f91fd552 100644 --- a/src/lib/auth/components/Menu.jsx +++ b/src/lib/auth/components/Menu.jsx @@ -29,6 +29,9 @@ const Menu = () => { Daftar Alamat + + Profil Saya + diff --git a/src/lib/auth/components/PersonalProfile.jsx b/src/lib/auth/components/PersonalProfile.jsx index bca54e24..b9fb3f5f 100644 --- a/src/lib/auth/components/PersonalProfile.jsx +++ b/src/lib/auth/components/PersonalProfile.jsx @@ -38,7 +38,6 @@ const PersonalProfile = () => { if (isUpdated?.user) { setAuth(isUpdated.user) setValue('password', '') - setIsOpen(false) toast.success('Berhasil mengubah profil', { duration: 1500 }) return } @@ -47,46 +46,45 @@ const PersonalProfile = () => { return ( <> - {isOpen && ( -
-
- - + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
-
- - -
-
- - -
-
- - -
- diff --git a/src/lib/invoice/components/Invoices.jsx b/src/lib/invoice/components/Invoices.jsx index 96686bbb..5edcfdbf 100644 --- a/src/lib/invoice/components/Invoices.jsx +++ b/src/lib/invoice/components/Invoices.jsx @@ -71,7 +71,7 @@ const Invoices = () => { {!invoices.isLoading && invoices.data?.invoices?.length === 0 && ( - Tidak ada data invoice + Tidak ada invoice )} @@ -198,7 +198,7 @@ const Invoices = () => { {invoices.isLoading && ( - +
@@ -208,7 +208,7 @@ const Invoices = () => { {!invoices.isLoading && (!invoices?.data?.invoices || invoices?.data?.invoices?.length == 0) && ( - Tidak ada data invoice + Tidak ada invoice )} {invoices.data?.invoices?.map((invoice) => ( diff --git a/src/lib/transaction/components/Transactions.jsx b/src/lib/transaction/components/Transactions.jsx index c1c27a51..642881a6 100644 --- a/src/lib/transaction/components/Transactions.jsx +++ b/src/lib/transaction/components/Transactions.jsx @@ -83,7 +83,7 @@ const Transactions = ({ context = '' }) => { {!transactions.isLoading && transactions.data?.saleOrders?.length === 0 && ( - Tidak ada data transaksi + Tidak ada transaksi )} @@ -246,7 +246,7 @@ const Transactions = ({ context = '' }) => { (!transactions?.data?.saleOrders || transactions?.data?.saleOrders?.length == 0) && ( - Tidak ada data transaksi + Tidak ada transaksi )} {transactions.data?.saleOrders?.map((saleOrder) => ( -- cgit v1.2.3 From df7a1e34fab9014e775facfb20e58e7087200160 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Mon, 15 May 2023 15:09:03 +0700 Subject: sticky menu on user dashboard --- src/lib/auth/components/Menu.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib') diff --git a/src/lib/auth/components/Menu.jsx b/src/lib/auth/components/Menu.jsx index f91fd552..386b817c 100644 --- a/src/lib/auth/components/Menu.jsx +++ b/src/lib/auth/components/Menu.jsx @@ -7,7 +7,7 @@ const Menu = () => { const routeStartWith = (route) => router.pathname.startsWith(route) return ( -
+
Menu
Daftar Quotation -- cgit v1.2.3 From dd5aec9566205c7fefec9c0cdbd04b0f8ecb67d0 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Tue, 16 May 2023 14:03:41 +0700 Subject: fixing layout --- src/lib/home/components/CategoryHomeId.jsx | 2 +- src/lib/product/components/ProductCard.jsx | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/lib') diff --git a/src/lib/home/components/CategoryHomeId.jsx b/src/lib/home/components/CategoryHomeId.jsx index c37a6af7..4899f216 100644 --- a/src/lib/home/components/CategoryHomeId.jsx +++ b/src/lib/home/components/CategoryHomeId.jsx @@ -6,7 +6,7 @@ const CategoryHomeId = () => { const { categoryHomeIds } = useCategoryHomeId() return ( -
+
{categoryHomeIds.data?.map((id) => ( diff --git a/src/lib/product/components/ProductCard.jsx b/src/lib/product/components/ProductCard.jsx index 9a5fe9a2..8b48cf06 100644 --- a/src/lib/product/components/ProductCard.jsx +++ b/src/lib/product/components/ProductCard.jsx @@ -36,7 +36,7 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { product?.manufacture?.name, product?.manufacture.id )} - className='mb-1 font-normal' + className='mb-1' > {product.manufacture.name} @@ -45,7 +45,7 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { )} { product?.manufacture?.name, product?.manufacture.id )} - className='mb-1 font-normal' + className='mb-1' > {product.manufacture.name} @@ -117,7 +117,7 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { )} -- cgit v1.2.3 From db6350771d7668f27db026c42e3885a097989f1e Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Tue, 16 May 2023 15:35:24 +0700 Subject: optimize render --- src/lib/home/components/CategoryHome.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib') diff --git a/src/lib/home/components/CategoryHome.jsx b/src/lib/home/components/CategoryHome.jsx index 8fe3788c..4566bc4b 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 ? ( Date: Tue, 16 May 2023 16:23:08 +0700 Subject: fix product detail image height --- src/lib/product/components/Product/ProductDesktop.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib') diff --git a/src/lib/product/components/Product/ProductDesktop.jsx b/src/lib/product/components/Product/ProductDesktop.jsx index 8ce6da00..75b37b9d 100644 --- a/src/lib/product/components/Product/ProductDesktop.jsx +++ b/src/lib/product/components/Product/ProductDesktop.jsx @@ -106,7 +106,7 @@ const ProductDesktop = ({ product, wishlist, toggleWishlist }) => { {product.name}
-- cgit v1.2.3