setting + danak learning + buy service + footer + header
This commit is contained in:
+7
-1
@@ -328,7 +328,13 @@
|
||||
"mix_charachter_number": "ترکیبی از حروف کوچک و بزرگ باشد",
|
||||
"exsist_number": "شامل اعداد باشد",
|
||||
"exsist_special_character": "شامل کاراکتر های خاص (نماد ها) باشد",
|
||||
"password_changed": "رمز عبور با موفقیت تغییر یافت"
|
||||
"password_changed": "رمز عبور با موفقیت تغییر یافت",
|
||||
"SUPPORT": "پشتیبانی",
|
||||
"SERVICE": "سرویس",
|
||||
"INVOICE": "صورتحساب",
|
||||
"ACCOUNT": "حساب",
|
||||
"NOTIFICATION": "اعلان",
|
||||
"FINANCE": "مالی"
|
||||
},
|
||||
"wallet": {
|
||||
"increese_wallet": "افزایش موجودی حساب اعتباری",
|
||||
|
||||
@@ -30,7 +30,7 @@ const DanakLearning: FC = () => {
|
||||
return (
|
||||
<div key={item.id} className='flex gap-3'>
|
||||
<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>
|
||||
|
||||
<div className='text-xs'>
|
||||
|
||||
@@ -41,7 +41,7 @@ const BuyService: FC = () => {
|
||||
buyService.mutate(values, {
|
||||
onSuccess: () => {
|
||||
toast.success(t('success'))
|
||||
navigate(Pages.services.mine)
|
||||
navigate(Pages.receipts.index)
|
||||
},
|
||||
onError: (error: ErrorType) => {
|
||||
toast.error(error.response?.data?.error.message[0])
|
||||
|
||||
@@ -7,6 +7,7 @@ import PageLoading from '../../components/PageLoading'
|
||||
import Sms from './components/Sms'
|
||||
import ChangePassword from './components/ChangePassword'
|
||||
import { Helmet } from 'react-helmet-async'
|
||||
import TitleLine from '../../components/TitleLine'
|
||||
|
||||
const Setting: FC = () => {
|
||||
|
||||
@@ -61,6 +62,9 @@ const Setting: FC = () => {
|
||||
getSettings.data?.data?.settings?.map((item: any) => {
|
||||
return (
|
||||
<Fragment key={item.id}>
|
||||
<TitleLine
|
||||
title={t(`setting.${item.category}`)}
|
||||
/>
|
||||
{
|
||||
item.settings?.map((item: any) => {
|
||||
return (
|
||||
|
||||
@@ -52,7 +52,6 @@ const TransactionList: FC = () => {
|
||||
</div>
|
||||
<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' />
|
||||
<div>{getTransactions.data?.data?.totalDepositsPercentChange || 0}٪</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -69,9 +68,8 @@ const TransactionList: FC = () => {
|
||||
<div className='text-[#101828] xl:text-xs text-[10px]'>
|
||||
{NumberFormat(getTransactions.data?.data?.totalWithdrawals)} {t('toman')}
|
||||
</div>
|
||||
<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' />
|
||||
<div>{getTransactions.data?.data?.totalWithdrawalsPercentChange || 0}٪</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>
|
||||
</div>
|
||||
</div>
|
||||
@@ -88,10 +86,6 @@ const TransactionList: FC = () => {
|
||||
<div className='text-[#101828] xl:text-xs text-[10px]'>
|
||||
{NumberFormat(getTransactions.data?.data?.balance)} {t('toman')}
|
||||
</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>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { FC, useState } from 'react'
|
||||
import { FC, useEffect, useState } from 'react'
|
||||
import Button from '../../../components/Button'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { clx } from '../../../helpers/utils'
|
||||
@@ -42,6 +42,11 @@ const Online: FC = () => {
|
||||
}
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
setDesiredAmount(amountSelected)
|
||||
}, [amountSelected])
|
||||
|
||||
|
||||
return (
|
||||
<div className='mt-8 bg-white p-8 rounded-3xl'>
|
||||
<div>
|
||||
@@ -71,6 +76,7 @@ const Online: FC = () => {
|
||||
label={t('wallet.optional_price')}
|
||||
placeholder={t('wallet.enter_your_price')}
|
||||
onChange={(e) => setDesiredAmount(Number(e.target.value))}
|
||||
value={desiredAmount}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ const Footer: FC = () => {
|
||||
return (
|
||||
<div className='xl:hidden'>
|
||||
<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}>
|
||||
<div className={`text-description w-[70px] flex flex-col items-center gap-1.5 ${isActive(Pages.dashboard) ? 'text-black' : ''}`}>
|
||||
<Home2
|
||||
|
||||
@@ -74,11 +74,11 @@ const Header: FC = () => {
|
||||
</div>
|
||||
</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'>
|
||||
<CloseCircle onClick={() => setPopoverKey((prevKey) => prevKey + 1)} size={20} color='black' />
|
||||
</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'>
|
||||
<img src={data?.data?.user?.profilePic ? data?.data?.user?.profilePic : AvatarImage} className='size-full object-cover' />
|
||||
</div>
|
||||
@@ -90,7 +90,7 @@ const Header: FC = () => {
|
||||
<div className='text-description'>
|
||||
{data?.data?.user?.email}
|
||||
</div>
|
||||
</div>
|
||||
</Link>
|
||||
|
||||
<div className='pb-6 px-6 border-b border-[#EAEDF5]'>
|
||||
<div className='flex justify-between items-center'>
|
||||
|
||||
Reference in New Issue
Block a user