You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

309 lines
8.6 KiB

import React from 'react';
import { useNavigate } from 'react-router-dom';
import { MobileShell } from '../../components/layout/MobileShell';
import { StandardPageHeader } from '../../components/layout/TopHeader';
import { ShipmentStatusCard } from '../../components/orders/ShipmentStatusCard';
import { ORDER_DETAIL_SHIPMENTS } from '../../data/ordersData';
/**
* Node 4175:10421 — `shop-order detail` (Order Details & Multi-Shipment Stepper, 375×1061)
*/
export const ShopOrderDetailPage: React.FC = () => {
const navigate = useNavigate();
return (
<MobileShell width={375} height={1061} backgroundColor="#f3f1ef">
{/* Top Header: Back button + "Order Details" */}
<StandardPageHeader
title="Order Details"
titleTop={29}
backTo="/shop-orders"
/>
<div
style={{
display: 'flex',
flexDirection: 'column',
flex: 1,
padding: '26px var(--page-px) 20px',
gap: 20,
}}
>
{/* Top Order Summary Card (4175:11005) */}
<div
style={{
width: '100%',
padding: 12,
borderRadius: 20,
backgroundColor: '#ebe8e5',
display: 'flex',
flexDirection: 'column',
gap: 15,
}}
>
{/* Row 1: Order code, dot, price, and date */}
<div
style={{
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
gap: 8,
flexWrap: 'wrap',
minHeight: 26,
}}
>
<div
style={{
display: 'flex',
alignItems: 'center',
gap: 6,
flexWrap: 'wrap',
}}
>
<span
style={{
fontFamily: 'var(--font-sans)',
fontWeight: 600,
fontSize: 14,
lineHeight: '24px',
color: '#111111',
whiteSpace: 'nowrap',
}}
>
ORD-28465
</span>
<span
style={{
width: 6,
height: 6,
borderRadius: '50%',
backgroundColor: '#bcbcbc',
flexShrink: 0,
}}
/>
<span
style={{
fontFamily: 'var(--font-sans)',
fontWeight: 600,
fontSize: 14,
lineHeight: '24px',
color: '#111111',
whiteSpace: 'nowrap',
}}
>
$24.00
</span>
</div>
{/* Date on right */}
<div
style={{
display: 'inline-flex',
alignItems: 'center',
gap: 4,
}}
>
<img
src="/assets/images/icon-date-time-grey-18.svg"
alt=""
style={{
width: 18,
height: 18,
flexShrink: 0,
}}
/>
<span
style={{
fontFamily: 'var(--font-sans)',
fontWeight: 600,
fontSize: 14,
lineHeight: '14px',
color: '#747474',
whiteSpace: 'nowrap',
}}
>
Mar 15,2025
</span>
</div>
</div>
{/* Grey Status Bar */}
<div
style={{
width: '100%',
minHeight: 41,
padding: '10px',
borderRadius: 12,
backgroundColor: '#f3f3f3',
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
gap: 8,
flexWrap: 'wrap',
}}
>
<div
style={{
display: 'flex',
alignItems: 'center',
gap: 9,
}}
>
<div style={{ display: 'inline-flex', alignItems: 'center', gap: 4 }}>
<img
src="/assets/images/icon-shipping-box-grey-18.svg"
alt=""
style={{
width: 18,
height: 18,
flexShrink: 0,
}}
/>
<span
style={{
fontFamily: 'var(--font-sans)',
fontWeight: 600,
fontSize: 14,
lineHeight: '14px',
color: '#111111',
whiteSpace: 'nowrap',
}}
>
3 item
</span>
</div>
{/* Vertical divider */}
<div
style={{
width: 1,
height: 17,
backgroundColor: '#dbdbdb',
flexShrink: 0,
}}
/>
<div style={{ display: 'inline-flex', alignItems: 'center', gap: 4 }}>
<img
src="/assets/images/icon-order-item-next-circle.svg"
alt=""
style={{
width: 16,
height: 16,
flexShrink: 0,
}}
/>
<span
style={{
fontFamily: 'var(--font-sans)',
fontWeight: 600,
fontSize: 14,
lineHeight: '14px',
color: '#111111',
whiteSpace: 'nowrap',
}}
>
1 shop
</span>
</div>
</div>
{/* Right delivery count */}
<div
style={{
display: 'inline-flex',
alignItems: 'center',
gap: 4,
}}
>
<div
style={{
width: 16,
height: 16,
borderRadius: 10,
backgroundColor: '#0eb13c',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexShrink: 0,
}}
>
<img
src="/assets/images/icon-check-white-tiny.svg"
alt=""
style={{
width: 8,
height: 6,
}}
/>
</div>
<span
style={{
fontFamily: 'var(--font-sans)',
fontWeight: 600,
fontSize: 12,
lineHeight: '14px',
color: '#111111',
whiteSpace: 'nowrap',
}}
>
1 / 3 Delivery
</span>
</div>
</div>
</div>
{/* 3 Shipment Cards (Packed, Delivered, Shiping) */}
<div className="habib-orders-grid">
{ORDER_DETAIL_SHIPMENTS.map((shipment) => (
<ShipmentStatusCard key={shipment.id} shipment={shipment} />
))}
</div>
{/* Bottom CTA Button "Order support" (4175:10432) */}
<button
type="button"
onClick={() => navigate('/shop-support')}
style={{
marginTop: 'auto',
width: '100%',
height: 52,
borderRadius: 11,
backgroundColor: '#d78e06',
border: 'none',
padding: '0 16px',
cursor: 'pointer',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
gap: 6,
}}
>
<img
src="/assets/images/icon-customer-support-headset-white.svg"
alt=""
style={{
width: 24,
height: 24,
flexShrink: 0,
}}
/>
<span
style={{
fontFamily: 'var(--font-sans)',
fontWeight: 600,
fontSize: 16,
lineHeight: '24px',
color: '#fbfbfc',
whiteSpace: 'nowrap',
}}
>
Order support
</span>
</button>
</div>
</MobileShell>
);
};