fix financial
This commit is contained in:
@@ -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} />
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user