From 634fae4d4a1ad3ec1b74a472b6203560df0d2223 Mon Sep 17 00:00:00 2001 From: hamid zarghami Date: Wed, 5 Mar 2025 16:11:28 +0330 Subject: [PATCH] timing approve and quik access --- dev-dist/sw.js | 2 +- src/assets/images/logo.svg | 136 +++++++++--------- src/components/ServiceItem.tsx | 10 +- src/index.css | 8 ++ src/pages/home/Home.tsx | 4 +- src/pages/home/types/HomeTypes.ts | 9 ++ src/pages/receipts/Detail.tsx | 2 +- .../receipts/components/ApproveInvoice.tsx | 25 +++- 8 files changed, 120 insertions(+), 76 deletions(-) mode change 100755 => 100644 src/assets/images/logo.svg diff --git a/dev-dist/sw.js b/dev-dist/sw.js index b615680..ceef7b5 100644 --- a/dev-dist/sw.js +++ b/dev-dist/sw.js @@ -82,7 +82,7 @@ define(['./workbox-e7681877'], (function (workbox) { 'use strict'; "revision": "3ca0b8505b4bec776b69afdba2768812" }, { "url": "index.html", - "revision": "0.fvumg9unmfo" + "revision": "0.rmod2v0c8l" }], {}); workbox.cleanupOutdatedCaches(); workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), { diff --git a/src/assets/images/logo.svg b/src/assets/images/logo.svg old mode 100755 new mode 100644 index 4883e85..200db25 --- a/src/assets/images/logo.svg +++ b/src/assets/images/logo.svg @@ -1,7 +1,7 @@ + viewBox="0 0 961.6 222.5" style="enable-background:new 0 0 961.6 222.5;" xml:space="preserve"> @@ -9,85 +9,83 @@ - - + - + - - - - - - + + + + + + - - - - + + + + - - + + - - + c2.3,0,4.2,0.6,5.5,1.7c1.3,1.2,2,2.8,2.1,4.8v9.3c0,1.9,0.2,3.3,0.7,4.4v0.3H867V204.7z M861.3,202c1.1,0,2.1-0.3,3.1-0.8 + c1-0.6,1.7-1.3,2.1-2.2v-4.1h-2.7c-4.2,0-6.4,1.2-6.4,3.7c0,1.1,0.4,1.9,1.1,2.5C859.2,201.7,860.2,202,861.3,202z"/> + + - - - - - + + + + + - + - - - - - + + + + + - - - - - + + + + + diff --git a/src/components/ServiceItem.tsx b/src/components/ServiceItem.tsx index d9d336f..fc36008 100644 --- a/src/components/ServiceItem.tsx +++ b/src/components/ServiceItem.tsx @@ -11,7 +11,8 @@ type Props = { className?: string, isLinkPanel?: boolean, businessName?: string, - isDisabled?: boolean + isDisabled?: boolean, + isQuikAccess?: boolean } const ServiceItem: FC = (props: Props) => { @@ -38,7 +39,12 @@ const ServiceItem: FC = (props: Props) => {
-
{item.title}
+ { + props.isQuikAccess && props.businessName ? +
{props.businessName}
+ : +
{item.title}
+ }
diff --git a/src/index.css b/src/index.css index f1fd977..c7ce8d6 100644 --- a/src/index.css +++ b/src/index.css @@ -130,6 +130,14 @@ tbody tr { backdrop-filter: blur(44px); } +.carousel .left-4 { + left: 0px; +} + +.carousel .right-4 { + right: 0px; +} + .rc-rate-star { margin-right: 3px !important; /* فاصله بین ستاره‌ها */ } diff --git a/src/pages/home/Home.tsx b/src/pages/home/Home.tsx index a93b8ad..8b7ba69 100644 --- a/src/pages/home/Home.tsx +++ b/src/pages/home/Home.tsx @@ -37,7 +37,7 @@ const Home: FC = () => { :
- { }} onPointerLeaveCapture={() => { }} > + { }} onPointerLeaveCapture={() => { }} > { getAds.data?.data?.ads?.map((item: AdsItemType) => { return ( @@ -129,6 +129,8 @@ const Home: FC = () => { key={item.service.id} item={item.service} className='flex-1 min-w-[40%] xl:!min-w-[20%] xl:p-6 p-4 flex flex-col' + isQuikAccess + businessName={item.userSubscription.businessName} /> ) }) diff --git a/src/pages/home/types/HomeTypes.ts b/src/pages/home/types/HomeTypes.ts index 0165b79..9ec6472 100644 --- a/src/pages/home/types/HomeTypes.ts +++ b/src/pages/home/types/HomeTypes.ts @@ -8,4 +8,13 @@ export type QuikAccessItemType = { author: string; createDate: string; updatedAt: string; + userSubscription: { + id: string; + userId: string; + businessId: string; + businessName: string; + isActive: boolean; + createdAt: string; + updatedAt: string; + }; }; diff --git a/src/pages/receipts/Detail.tsx b/src/pages/receipts/Detail.tsx index 87f0956..e89e4b9 100644 --- a/src/pages/receipts/Detail.tsx +++ b/src/pages/receipts/Detail.tsx @@ -40,7 +40,7 @@ const ReceiptsDetail: FC = () => { { getInvoce.data?.data?.invoice?.status === 'PENDING' || getInvoce.data?.data?.invoice?.status === 'APPROVED' ? -
+
= ({ id, refetch, status }) => { const approveInvoce = useApproveInvoice() const requestApprove = useRequestApprove() const getProfile = useGetProfile() + const { value, reset } = useCountDown(2, true) const [showModal, setShowModal] = useState(false) const { t } = useTranslation('global') const [code, setCode] = useState('') @@ -47,6 +49,7 @@ const ApproveInvoice: FC = ({ id, refetch, status }) => { requestApprove.mutate(params, { onSuccess: () => { setShowModal(true) + reset() }, onError: (error: ErrorType) => { toast.error(error.response?.data?.error.message[0]) @@ -110,7 +113,25 @@ const ApproveInvoice: FC = ({ id, refetch, status }) => { />
-
+
+ { + value !== '00:00' ? +
+
{value}
+
{t('auth.counter_otp')}
+
+ : +
+
+ {t('auth.try_again')} +
+
+ + } + +
+ +