From 9d1966ea795ccad9fa961692219dfb3d3d0e32ea Mon Sep 17 00:00:00 2001 From: vickytechkey Date: Tue, 13 Oct 2026 19:03:36 +0530 Subject: [PATCH] feat: add ReschedulePickupView component and related seller types and context --- .../orders/ReschedulePickupView.tsx | 27 +++++++++-- src/context/SellerContext.tsx | 48 ++++++++++++------- src/pages/dashboard/OrdersPage.tsx | 15 ++++-- src/types/seller.ts | 2 + 4 files changed, 68 insertions(+), 24 deletions(-) diff --git a/src/components/orders/ReschedulePickupView.tsx b/src/components/orders/ReschedulePickupView.tsx index 80ed63d..08e5e69 100644 --- a/src/components/orders/ReschedulePickupView.tsx +++ b/src/components/orders/ReschedulePickupView.tsx @@ -138,7 +138,9 @@ export const ReschedulePickupView: React.FC = ({ onBa
-

Schedule Courier Pickup

+

+ {targetOrder?.pickupId ? 'Reschedule Courier Pickup' : 'Schedule Courier Pickup'} +

{/* Carrier Badge */} = ({ onBa }}> {carrierDisplayName} + {targetOrder?.pickupId && ( + + PR #{targetOrder.pickupId} + + )}

- {isDelhivery && 'Delhivery supports custom pickup date and hour slots. Choose your preferred arrival window.'} + {isDelhivery && (targetOrder?.pickupId + ? `Delhivery Pickup Request #${targetOrder.pickupId} is active. You can reschedule the collection date or hour slot below.` + : 'Delhivery supports custom pickup date and hour slots. Choose your preferred arrival window.')} {isEkart && 'Ekart Logistics allows choosing a preferred dispatch date. Sweeps occur during standard daily runs.'} {isShadowfax && 'Shadowfax operates automated warehouse sweeps based on registered dispatch cutoff times.'}

@@ -474,6 +487,14 @@ export const ReschedulePickupView: React.FC = ({ onBa
)} + {targetOrder?.pickupId && ( +
+ Active Pickup ID + + #{targetOrder.pickupId} + +
+ )}
Pickup Location {locationName} @@ -527,7 +548,7 @@ export const ReschedulePickupView: React.FC = ({ onBa className={`button is-rounded shadow-sm ${isSubmitting ? 'is-loading' : ''}`} style={{ height: 'auto', minHeight: '48px', whiteSpace: 'normal', padding: '10px 16px', lineHeight: '1.3', backgroundColor: '#791b2c', color: '#ffffff', fontWeight: 600, border: 'none', transition: 'all 0.2s' }} > - Confirm Scheduled Pickup + {targetOrder?.pickupId ? 'Confirm Rescheduled Pickup' : 'Confirm Scheduled Pickup'}