mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-06-09 15:07:51 +00:00
feat: add copy button for PR and PO number
This commit is contained in:
@@ -847,9 +847,25 @@ const PurchaseOrderDetail = ({
|
||||
<span className='font-medium text-gray-600 min-w-[140px] shrink-0'>
|
||||
Nomor
|
||||
</span>
|
||||
<span className='text-gray-900 ml-3 break-all'>
|
||||
: {purchaseData.pr_number}
|
||||
</span>
|
||||
<div className='flex items-center gap-1'>
|
||||
<span className='text-gray-900 ml-3 break-all'>
|
||||
: {purchaseData.pr_number}
|
||||
</span>
|
||||
<Button
|
||||
type='button'
|
||||
variant='ghost'
|
||||
color='none'
|
||||
className='p-1 min-h-0 h-auto'
|
||||
onClick={() => {
|
||||
navigator.clipboard.writeText(
|
||||
purchaseData.pr_number || ''
|
||||
);
|
||||
toast.success('Nomor berhasil disalin');
|
||||
}}
|
||||
>
|
||||
<Icon icon='mdi:content-copy' width={14} height={14} />
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className='group'>
|
||||
@@ -857,11 +873,31 @@ const PurchaseOrderDetail = ({
|
||||
<span className='font-medium text-gray-600 min-w-[140px] shrink-0'>
|
||||
Nomor PO
|
||||
</span>
|
||||
<div className='ml-3'>
|
||||
<div className='ml-3 flex items-center gap-1'>
|
||||
{canShowPurchaseOrderInvoice &&
|
||||
purchaseData.po_number &&
|
||||
purchaseData.po_number !== 'Belum dibuat' ? (
|
||||
<PurchaseOrderInvoice data={purchaseData} />
|
||||
<>
|
||||
<PurchaseOrderInvoice data={purchaseData} />
|
||||
<Button
|
||||
type='button'
|
||||
variant='ghost'
|
||||
color='none'
|
||||
className='p-1 min-h-0 h-auto'
|
||||
onClick={() => {
|
||||
navigator.clipboard.writeText(
|
||||
purchaseData.po_number || ''
|
||||
);
|
||||
toast.success('Nomor PO berhasil disalin');
|
||||
}}
|
||||
>
|
||||
<Icon
|
||||
icon='mdi:content-copy'
|
||||
width={14}
|
||||
height={14}
|
||||
/>
|
||||
</Button>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
: <i className='text-gray-400'>Belum dibuat</i>
|
||||
|
||||
Reference in New Issue
Block a user