From 24085453bcf3f86da20d67330974e68f48be91c0 Mon Sep 17 00:00:00 2001 From: hamid zarghami Date: Mon, 17 Feb 2025 19:04:08 +0330 Subject: [PATCH] financial --- src/components/Select.tsx | 4 +- src/components/Tabs.tsx | 2 +- src/components/Textarea.tsx | 7 +- src/langs/fa.json | 35 ++- src/pages/ads/hooks/useAdsData.ts | 10 + src/pages/ads/service/AdsService.ts | 8 + src/pages/ads/types/AdsTypes.ts | 20 ++ src/pages/financial/Financial.tsx | 48 ++++ src/pages/financial/components/Legal.tsx | 216 +++++++++++++++ src/pages/financial/components/Personal.tsx | 247 ++++++++++++++++++ src/pages/financial/hooks/useFinancialData.ts | 42 +++ .../financial/service/FinancialService.ts | 30 +++ src/pages/financial/types/FinancialTypes.ts | 24 ++ src/pages/home/Home.tsx | 84 +++--- src/pages/profile/Profile.tsx | 4 +- src/pages/service/OtherServices.tsx | 107 ++++---- src/router/Main.tsx | 2 + 17 files changed, 776 insertions(+), 114 deletions(-) create mode 100644 src/pages/ads/hooks/useAdsData.ts create mode 100644 src/pages/ads/service/AdsService.ts create mode 100644 src/pages/ads/types/AdsTypes.ts create mode 100644 src/pages/financial/Financial.tsx create mode 100644 src/pages/financial/components/Legal.tsx create mode 100644 src/pages/financial/components/Personal.tsx create mode 100644 src/pages/financial/hooks/useFinancialData.ts create mode 100644 src/pages/financial/service/FinancialService.ts create mode 100644 src/pages/financial/types/FinancialTypes.ts diff --git a/src/components/Select.tsx b/src/components/Select.tsx index 0367e11..d38c1da 100644 --- a/src/components/Select.tsx +++ b/src/components/Select.tsx @@ -12,6 +12,7 @@ type Props = { error_text?: string, placeholder?: string, label?: string, + readOnly?: boolean, } & SelectHTMLAttributes const Select: FC = (props: Props) => { @@ -25,6 +26,7 @@ const Select: FC = (props: Props) => { } { props.error_text && props.error_text !== '' ? diff --git a/src/components/Tabs.tsx b/src/components/Tabs.tsx index aac29f6..e52f78a 100644 --- a/src/components/Tabs.tsx +++ b/src/components/Tabs.tsx @@ -32,7 +32,7 @@ const Tabs: FC = (props: Props) => { props.onChange(item.value)} key={item.value} className={clx( 'flex flex-col max-w-fit mt-[15px] items-center gap-2 cursor-pointer', index === 0 && 'pr-[30px]', - index === props.items.length - 1 && 'pl-[30px]', + index === props.items.length - 1 && props.items.length > 3 && 'pl-[30px]', props.active === item.value && 'text-black' )}> {item.icon} diff --git a/src/components/Textarea.tsx b/src/components/Textarea.tsx index 360dfec..18831eb 100644 --- a/src/components/Textarea.tsx +++ b/src/components/Textarea.tsx @@ -1,5 +1,6 @@ import { FC, InputHTMLAttributes } from 'react' import Error from './Error' +import { clx } from '../helpers/utils' type Props = { label: string, @@ -14,7 +15,11 @@ const Textarea: FC = (props: Props) => {