invoice pay approve , ...

This commit is contained in:
hamid zarghami
2025-02-22 12:42:12 +03:30
parent 983deef7c8
commit 1532fbc0ad
7 changed files with 260 additions and 6 deletions
+26 -3
View File
@@ -11,6 +11,9 @@ import LegalInfo from './components/LegalInfo'
import RealInfo from './components/RealInfo'
import RegisterInfo from './components/RegisterInfo'
import { clx } from '../../helpers/utils'
import Button from '../../components/Button'
import ApproveInvoice from './components/ApproveInvoice'
import PayInvoice from './components/PayInvoice'
const ReceiptsDetail: FC = () => {
@@ -21,8 +24,10 @@ const ReceiptsDetail: FC = () => {
return (
<div className='mt-4'>
<div>
{t('receip.detail_account')}
<div className='flex gap-6 items-center'>
<div>{t('receip.detail_account')}</div>
<ApproveInvoice status={getInvoce.data?.data?.invoice?.status} id={id ? id : ''} refetch={getInvoce.refetch} />
</div>
{
@@ -107,13 +112,17 @@ const ReceiptsDetail: FC = () => {
</div>
<div className='bg-white xl:w-sidebar text-sm h-fit rounded-3xl p-8'>
<div className='p-6 bg-green-50 rounded-2xl text-green-400 text-xs mb-6'>
<p>{t('receip.thank_pay_1')}</p>
<p className='mt-1'>{t('receip.thank_pay_2')}</p>
</div>
<div className='flex justify-between items-center'>
<div>
{t('receip.receip_information')}
</div>
<div className={clx(
'border border-orange-400 text-orange-400 rounded-lg text-[9px] h-6 flex items-center px-1',
getInvoce.data?.data?.invoice?.status === 'PAID' ? 'border-green-400 text-green-400' : getInvoce.data?.data?.invoice?.status !== 'PENDING' ? 'border-red-400 text-red-400' : 'border-orange-400 text-orange-400'
getInvoce.data?.data?.invoice?.status === 'PAID' || getInvoce.data?.data?.invoice?.status === 'APPROVED' ? 'border-green-400 text-green-400' : getInvoce.data?.data?.invoice?.status !== 'PENDING' ? 'border-red-400 text-red-400' : 'border-orange-400 text-orange-400'
)}>
<div>{t(`receip.${getInvoce.data?.data?.invoice?.status}`)}</div>
</div>
@@ -152,6 +161,20 @@ const ReceiptsDetail: FC = () => {
{t(`receip.${getInvoce.data?.data?.invoice?.status}`)}
</div>
</div>
{
getInvoce.data?.data?.invoice?.status === 'APPROVED' &&
<div className='flex gap-4 items-center mt-8'>
<Button
label={t('receip.get_factor')}
className='bg-[#E8E8E8] text-description text-xs'
/>
<PayInvoice
id={id ? id : ''}
refetch={getInvoce.refetch}
/>
</div>
}
</div>