add description and attachment in detail of invoice
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
VITE_TOKEN_NAME = 'negareh_t'
|
VITE_TOKEN_NAME = 'negareh_t'
|
||||||
VITE_REFRESH_TOKEN_NAME = 'negareh_rt'
|
VITE_REFRESH_TOKEN_NAME = 'negareh_rt'
|
||||||
# VITE_API_BASE_URL = 'https://negareh-api.dev.danakcorp.com'
|
VITE_API_BASE_URL = 'https://negareh-api.dev.danakcorp.com'
|
||||||
VITE_API_BASE_URL = 'http://10.197.246.88:4000'
|
# VITE_API_BASE_URL = 'http://10.197.246.88:4000'
|
||||||
|
|||||||
@@ -198,6 +198,32 @@ const InvoiceDetail: FC = () => {
|
|||||||
<span className='text-[#8C90A3]'>روش پرداخت:</span>
|
<span className='text-[#8C90A3]'>روش پرداخت:</span>
|
||||||
<span className='text-black leading-6'>{invoiceData.paymentMethod}</span>
|
<span className='text-black leading-6'>{invoiceData.paymentMethod}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{invoice?.description && (
|
||||||
|
<div className='mt-5 flex flex-col gap-1.5 text-xs'>
|
||||||
|
<span className='text-[#8C90A3]'>توضیحات:</span>
|
||||||
|
<span className='text-black leading-6'>{invoice.description}</span>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{invoice?.attachments && invoice.attachments.length > 0 && (
|
||||||
|
<div className='mt-5 flex flex-col gap-1.5 text-xs'>
|
||||||
|
<span className='text-[#8C90A3]'>پیوستها:</span>
|
||||||
|
<ul className='text-black leading-6 list-disc list-inside space-y-1'>
|
||||||
|
{invoice.attachments.map((att: unknown, index: number) => {
|
||||||
|
const url = typeof att === 'string' ? att : (att as { url?: string })?.url
|
||||||
|
const name = typeof att === 'object' && att && 'name' in (att as object) ? (att as { name?: string }).name : url || `پیوست ${index + 1}`
|
||||||
|
return url ? (
|
||||||
|
<li key={index}>
|
||||||
|
<a href={url} target='_blank' rel='noopener noreferrer' className='text-[#0047FF] hover:underline'>
|
||||||
|
{name}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
) : null
|
||||||
|
})}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* بخش دوم: اقلام درخواستی */}
|
{/* بخش دوم: اقلام درخواستی */}
|
||||||
|
|||||||
Reference in New Issue
Block a user