setting + danak learning + buy service + footer + header

This commit is contained in:
hamid zarghami
2025-03-01 17:58:55 +03:30
parent 1012ea7544
commit 9acf0e7085
8 changed files with 26 additions and 16 deletions
+7 -1
View File
@@ -328,7 +328,13 @@
"mix_charachter_number": "ترکیبی از حروف کوچک و بزرگ باشد", "mix_charachter_number": "ترکیبی از حروف کوچک و بزرگ باشد",
"exsist_number": "شامل اعداد باشد", "exsist_number": "شامل اعداد باشد",
"exsist_special_character": "شامل کاراکتر های خاص (نماد ها) باشد", "exsist_special_character": "شامل کاراکتر های خاص (نماد ها) باشد",
"password_changed": "رمز عبور با موفقیت تغییر یافت" "password_changed": "رمز عبور با موفقیت تغییر یافت",
"SUPPORT": "پشتیبانی",
"SERVICE": "سرویس",
"INVOICE": "صورتحساب",
"ACCOUNT": "حساب",
"NOTIFICATION": "اعلان",
"FINANCE": "مالی"
}, },
"wallet": { "wallet": {
"increese_wallet": "افزایش موجودی حساب اعتباری", "increese_wallet": "افزایش موجودی حساب اعتباری",
+1 -1
View File
@@ -30,7 +30,7 @@ const DanakLearning: FC = () => {
return ( return (
<div key={item.id} className='flex gap-3'> <div key={item.id} className='flex gap-3'>
<Link to={Pages.learning.detail + item.id}> <Link to={Pages.learning.detail + item.id}>
<img src={item.coverUrl} alt='danak-learning-1' className='w-36 h-24 object-cover rounded-2xl' /> <img src={item.coverUrl} alt='danak-learning-1' className='w-24 object-cover rounded-2xl' />
</Link> </Link>
<div className='text-xs'> <div className='text-xs'>
+1 -1
View File
@@ -41,7 +41,7 @@ const BuyService: FC = () => {
buyService.mutate(values, { buyService.mutate(values, {
onSuccess: () => { onSuccess: () => {
toast.success(t('success')) toast.success(t('success'))
navigate(Pages.services.mine) navigate(Pages.receipts.index)
}, },
onError: (error: ErrorType) => { onError: (error: ErrorType) => {
toast.error(error.response?.data?.error.message[0]) toast.error(error.response?.data?.error.message[0])
+4
View File
@@ -7,6 +7,7 @@ import PageLoading from '../../components/PageLoading'
import Sms from './components/Sms' import Sms from './components/Sms'
import ChangePassword from './components/ChangePassword' import ChangePassword from './components/ChangePassword'
import { Helmet } from 'react-helmet-async' import { Helmet } from 'react-helmet-async'
import TitleLine from '../../components/TitleLine'
const Setting: FC = () => { const Setting: FC = () => {
@@ -61,6 +62,9 @@ const Setting: FC = () => {
getSettings.data?.data?.settings?.map((item: any) => { getSettings.data?.data?.settings?.map((item: any) => {
return ( return (
<Fragment key={item.id}> <Fragment key={item.id}>
<TitleLine
title={t(`setting.${item.category}`)}
/>
{ {
item.settings?.map((item: any) => { item.settings?.map((item: any) => {
return ( return (
+2 -8
View File
@@ -52,7 +52,6 @@ const TransactionList: FC = () => {
</div> </div>
<div className='flex gap gap-0.5 px-2 py-1 bg-green-100 rounded-lg text-[10px] text-success'> <div className='flex gap gap-0.5 px-2 py-1 bg-green-100 rounded-lg text-[10px] text-success'>
<ArrowRight size={12} color='#00BA4B' className='-rotate-45' /> <ArrowRight size={12} color='#00BA4B' className='-rotate-45' />
<div>{getTransactions.data?.data?.totalDepositsPercentChange || 0}٪</div>
</div> </div>
</div> </div>
</div> </div>
@@ -69,9 +68,8 @@ const TransactionList: FC = () => {
<div className='text-[#101828] xl:text-xs text-[10px]'> <div className='text-[#101828] xl:text-xs text-[10px]'>
{NumberFormat(getTransactions.data?.data?.totalWithdrawals)} {t('toman')} {NumberFormat(getTransactions.data?.data?.totalWithdrawals)} {t('toman')}
</div> </div>
<div className='flex gap gap-0.5 px-2 py-1 bg-green-100 rounded-lg text-[10px] text-success'> <div className='flex gap gap-0.5 px-2 py-1 text-red-400 rounded-lg text-[10px] bg-red-100'>
<ArrowRight size={12} color='#00BA4B' className='-rotate-45' /> <ArrowRight size={12} color='red' className='rotate-45' />
<div>{getTransactions.data?.data?.totalWithdrawalsPercentChange || 0}٪</div>
</div> </div>
</div> </div>
</div> </div>
@@ -88,10 +86,6 @@ const TransactionList: FC = () => {
<div className='text-[#101828] xl:text-xs text-[10px]'> <div className='text-[#101828] xl:text-xs text-[10px]'>
{NumberFormat(getTransactions.data?.data?.balance)} {t('toman')} {NumberFormat(getTransactions.data?.data?.balance)} {t('toman')}
</div> </div>
<div className='flex gap gap-0.5 px-2 py-1 text-red-400 rounded-lg text-[10px] bg-red-100'>
<ArrowRight size={12} color='red' className='rotate-45' />
<div>{getTransactions.data?.data?.balancePercentChange || 0}٪</div>
</div>
</div> </div>
</div> </div>
</div> </div>
+7 -1
View File
@@ -1,4 +1,4 @@
import { FC, useState } from 'react' import { FC, useEffect, useState } from 'react'
import Button from '../../../components/Button' import Button from '../../../components/Button'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { clx } from '../../../helpers/utils' import { clx } from '../../../helpers/utils'
@@ -42,6 +42,11 @@ const Online: FC = () => {
} }
} }
useEffect(() => {
setDesiredAmount(amountSelected)
}, [amountSelected])
return ( return (
<div className='mt-8 bg-white p-8 rounded-3xl'> <div className='mt-8 bg-white p-8 rounded-3xl'>
<div> <div>
@@ -71,6 +76,7 @@ const Online: FC = () => {
label={t('wallet.optional_price')} label={t('wallet.optional_price')}
placeholder={t('wallet.enter_your_price')} placeholder={t('wallet.enter_your_price')}
onChange={(e) => setDesiredAmount(Number(e.target.value))} onChange={(e) => setDesiredAmount(Number(e.target.value))}
value={desiredAmount}
/> />
</div> </div>
+1 -1
View File
@@ -13,7 +13,7 @@ const Footer: FC = () => {
return ( return (
<div className='xl:hidden'> <div className='xl:hidden'>
<div className='h-[60px] '></div> <div className='h-[60px] '></div>
<div className='fixed bottom-2 right-3 left-3 bg-white h-[60px] rounded-2xl flex justify-between items-center px-3'> <div className='fixed z-50 bottom-2 right-3 left-3 bg-white h-[60px] rounded-2xl flex justify-between items-center px-3'>
<Link to={Pages.dashboard}> <Link to={Pages.dashboard}>
<div className={`text-description w-[70px] flex flex-col items-center gap-1.5 ${isActive(Pages.dashboard) ? 'text-black' : ''}`}> <div className={`text-description w-[70px] flex flex-col items-center gap-1.5 ${isActive(Pages.dashboard) ? 'text-black' : ''}`}>
<Home2 <Home2
+3 -3
View File
@@ -74,11 +74,11 @@ const Header: FC = () => {
</div> </div>
</PopoverButton> </PopoverButton>
<PopoverPanel style={{ minHeight: window.innerWidth < 1140 ? window.innerHeight : undefined }} anchor="bottom" className="flex xl:ml-6 overflow-auto flex-col gap-3 bg-white boxShadow xl:mt-7 z-30 py-4 text-xs rounded-2.5 xl:w-[300px] -mt-[50px] w-full fixed xl:h-fit h-full"> <PopoverPanel style={{ minHeight: window.innerWidth < 1140 ? window.innerHeight : undefined }} anchor="bottom" className="flex xl:ml-6 overflow-auto flex-col gap-3 bg-white boxShadow xl:mt-7 z-30 py-4 text-xs rounded-2.5 xl:w-[300px] -mt-[50px] w-full fixed xl:h-fit h-full shadow-md">
<div className='absolute xl:hidden top-6 left-6'> <div className='absolute xl:hidden top-6 left-6'>
<CloseCircle onClick={() => setPopoverKey((prevKey) => prevKey + 1)} size={20} color='black' /> <CloseCircle onClick={() => setPopoverKey((prevKey) => prevKey + 1)} size={20} color='black' />
</div> </div>
<div className='flex flex-col gap-2 items-center justify-center border-b border-[#EAEDF5] pb-4'> <Link to={Pages.profile} className='flex flex-col gap-2 items-center justify-center border-b border-[#EAEDF5] pb-4'>
<div className='size-14 rounded-full overflow-hidden'> <div className='size-14 rounded-full overflow-hidden'>
<img src={data?.data?.user?.profilePic ? data?.data?.user?.profilePic : AvatarImage} className='size-full object-cover' /> <img src={data?.data?.user?.profilePic ? data?.data?.user?.profilePic : AvatarImage} className='size-full object-cover' />
</div> </div>
@@ -90,7 +90,7 @@ const Header: FC = () => {
<div className='text-description'> <div className='text-description'>
{data?.data?.user?.email} {data?.data?.user?.email}
</div> </div>
</div> </Link>
<div className='pb-6 px-6 border-b border-[#EAEDF5]'> <div className='pb-6 px-6 border-b border-[#EAEDF5]'>
<div className='flex justify-between items-center'> <div className='flex justify-between items-center'>