mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-25 15:55:48 +00:00
feat(FE-208): add PurchaseOrderInvoice component for PDF generation and update PurchaseOrderDetail to integrate invoice display
This commit is contained in:
@@ -14,6 +14,7 @@ import Modal from '@/components/Modal';
|
||||
import ConfirmationModalWithNotes from '@/components/modal/ConfirmationModalWithNotes';
|
||||
import PurchaseOrderStaffApprovalForm from '@/components/pages/purchase/form/order/PurchaseOrderStaffApprovalForm';
|
||||
import PurchaseOrderAcceptApprovalForm from '@/components/pages/purchase/form/order/PurchaseOrderAcceptApprovalForm';
|
||||
import PurchaseOrderInvoice from '@/components/pages/purchase/order/PurchaseOrderInvoice';
|
||||
|
||||
import { BaseGroupedApproval } from '@/types/api/api-general';
|
||||
import { PURCHASE_ORDER_APPROVAL_LINE } from '@/config/approval-line';
|
||||
@@ -49,17 +50,17 @@ const dummyPurchaseData: Purchase = {
|
||||
supplier: {
|
||||
id: 1,
|
||||
name: 'PT. CHAROEN POKPHAND JAYA FARM',
|
||||
alias: '',
|
||||
pic: '',
|
||||
type: '',
|
||||
category: '',
|
||||
hatchery: '',
|
||||
phone: '',
|
||||
email: '',
|
||||
address: '-',
|
||||
npwp: '',
|
||||
account_number: '',
|
||||
due_date: 0,
|
||||
alias: 'CP JAYA FARM',
|
||||
pic: 'Budi Santoso',
|
||||
type: 'Supplier',
|
||||
category: 'Feed',
|
||||
hatchery: 'Jawa Barat',
|
||||
phone: '+62-22-7563850',
|
||||
email: 'info@cp.co.id',
|
||||
address: 'Jl. Raya Bandung - Sumedang Km. 28, Desa Cisantana, Kec. Cigendel, Kabupaten Sumedang, Jawa Barat 45363',
|
||||
npwp: '01.938.451.6-433.000',
|
||||
account_number: '123-456-7890',
|
||||
due_date: 30,
|
||||
balance: 0,
|
||||
created_at: '2025-01-01T00:00:00Z',
|
||||
updated_at: '2025-01-01T00:00:00Z',
|
||||
@@ -682,27 +683,7 @@ const PurchaseOrderDetail = ({
|
||||
<div className='ml-3'>
|
||||
{purchaseData.po_number &&
|
||||
purchaseData.po_number !== 'Belum dibuat' ? (
|
||||
<Button
|
||||
color='primary'
|
||||
className='w-fit min-w-32 flex items-center justify-start gap-1 px-2 py-1 text-sm font-mono'
|
||||
disabled={!purchaseData.po_document_path}
|
||||
href={purchaseData.po_document_path ?? undefined}
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
>
|
||||
{purchaseData.po_document_path ? (
|
||||
<>
|
||||
<Icon
|
||||
icon='material-symbols:file-open-outline'
|
||||
width={16}
|
||||
height={16}
|
||||
/>
|
||||
{purchaseData.po_number}
|
||||
</>
|
||||
) : (
|
||||
purchaseData.po_number
|
||||
)}
|
||||
</Button>
|
||||
<PurchaseOrderInvoice data={purchaseData} />
|
||||
) : (
|
||||
<Button
|
||||
color='primary'
|
||||
|
||||
Reference in New Issue
Block a user