fix financial

This commit is contained in:
hamid zarghami
2025-03-03 09:26:25 +03:30
parent 632c8f4c4e
commit 62e8d0224e
3 changed files with 115 additions and 114 deletions
+6 -6
View File
@@ -2,7 +2,6 @@ import { FC } from 'react'
import { useTranslation } from 'react-i18next'
import { useParams } from 'react-router-dom'
import { useGetInvoiceDetail } from './hooks/useReceiptData'
import { useGetFinancialInfo } from '../financial/hooks/useFinancialData'
import { ReceiptDetailItemType } from './types/ReceiptTypes'
import { NumberFormat } from '../../config/func'
import moment from 'moment-jalaali'
@@ -16,12 +15,13 @@ import ApproveInvoice from './components/ApproveInvoice'
import PayInvoice from './components/PayInvoice'
import Input from '../../components/Input'
import { Helmet } from 'react-helmet-async'
import { useGetProfile } from '../profile/hooks/useProfileData'
const ReceiptsDetail: FC = () => {
const { id } = useParams()
const { t } = useTranslation('global')
const getProfile = useGetFinancialInfo()
const getProfile = useGetProfile()
const getInvoce = useGetInvoiceDetail(id ? id : '')
return (
@@ -72,11 +72,11 @@ const ReceiptsDetail: FC = () => {
{
getProfile.data?.data?.user?.legalUser ?
<LegalInfo data={getProfile.data?.data} />
getProfile.data?.data?.user?.financialType === 'LEGAL' ?
<LegalInfo />
:
getProfile.data?.data?.user?.realUser ?
<RealInfo data={getProfile.data?.data} />
getProfile.data?.data?.user?.financialType === 'REAL' ?
<RealInfo />
: <RegisterInfo data={getProfile.data?.data} />
}