feat(logistics): add multi-carrier package tracking links for Delhivery and Shiprocket
This commit is contained in:
parent
ef70c14efa
commit
45bb9213ce
1 changed files with 17 additions and 0 deletions
|
|
@ -80,6 +80,9 @@ interface Order {
|
||||||
status: string;
|
status: string;
|
||||||
payment_status: string;
|
payment_status: string;
|
||||||
created_at: string;
|
created_at: string;
|
||||||
|
logistics_provider?: string;
|
||||||
|
tracking_number?: string;
|
||||||
|
courier_name?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Warranty {
|
interface Warranty {
|
||||||
|
|
@ -722,6 +725,20 @@ function AccountDashboardPage() {
|
||||||
Cancel
|
Cancel
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
|
{order.tracking_number && (
|
||||||
|
<a
|
||||||
|
href={
|
||||||
|
order.logistics_provider === 'DELHIVERY'
|
||||||
|
? `https://www.delhivery.com/track/package/${order.tracking_number}`
|
||||||
|
: `https://shiprocket.co/tracking/${order.tracking_number}`
|
||||||
|
}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
className="px-3 py-1 border border-primary/30 text-primary hover:bg-primary/5 font-semibold text-[11px] uppercase tracking-wider transition inline-flex items-center gap-1"
|
||||||
|
>
|
||||||
|
Track ({order.logistics_provider === 'DELHIVERY' ? 'Delhivery' : 'Shiprocket'})
|
||||||
|
</a>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue