feat: implement OrdersPage component for supplier dashboard with order management and tracking features
This commit is contained in:
parent
991320403e
commit
e793e8c043
1 changed files with 3 additions and 2 deletions
|
|
@ -686,6 +686,7 @@ export const OrdersPage: React.FC = () => {
|
|||
const sortCode = selectedOrderForLabel.sort_code || '';
|
||||
const destHub = selectedOrderForLabel.destination_hub || '';
|
||||
const recipientName = selectedOrderForLabel.recipient?.name || '';
|
||||
const recipientPhone = selectedOrderForLabel.recipient?.phone || selectedOrderForLabel.customer_phone || (selectedOrderForLabel.recipient?.address?.match(/\b[6-9]\d{9}\b/) ? selectedOrderForLabel.recipient.address.match(/\b[6-9]\d{9}\b/)[0] : '');
|
||||
const recipientAddress = selectedOrderForLabel.recipient?.address || '';
|
||||
const sellerName = (selectedOrderForLabel.sender?.name || '').toUpperCase();
|
||||
const sellerPhone = selectedOrderForLabel.sender?.phone || '';
|
||||
|
|
@ -792,7 +793,7 @@ export const OrdersPage: React.FC = () => {
|
|||
{/* Ship to (Left) */}
|
||||
<div style={{ flex: '1 1 65%', paddingRight: '8px' }}>
|
||||
<div style={{ fontSize: '12px', color: '#000', marginBottom: '2px' }}>
|
||||
Ship to - <strong>{recipientName}</strong>
|
||||
Ship to - <strong>{recipientName}</strong>{recipientPhone ? ` (Ph: ${recipientPhone})` : ''}
|
||||
</div>
|
||||
<div style={{ fontSize: '9.5px', color: '#222', lineHeight: '1.35', marginBottom: '4px' }}>
|
||||
{recipientAddress}
|
||||
|
|
@ -929,7 +930,7 @@ export const OrdersPage: React.FC = () => {
|
|||
<div className="mb-2 pb-2" style={{ borderBottom: '1px solid #000', fontSize: '11px', lineHeight: '1.35' }}>
|
||||
<div><strong>Seller:</strong> {sellerName}{sellerPhone ? ` (Ph: ${sellerPhone})` : ''}</div>
|
||||
<div>{sellerAddress}</div>
|
||||
<div className="mt-1"><strong>Customer (Ship To):</strong> {recipientName}</div>
|
||||
<div className="mt-1"><strong>Customer (Ship To):</strong> {recipientName}{recipientPhone ? ` (Ph: ${recipientPhone})` : ''}</div>
|
||||
<div>{recipientAddress}</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue