Created
September 14, 2022 09:28
-
-
Save aasumitro/d4ad0d3105e3cddc3eca21f8a3edb660 to your computer and use it in GitHub Desktop.
shipping.status.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable */ | |
export enum LalamoveShippingStatus { | |
ORDER_CREATED = 'ORDER_CREATED', | |
ASSIGNING_DRIVER = 'ASSIGNING_DRIVER', | |
ON_GOING = 'ON_GOING', | |
DRIVER_ASSIGNED = 'DRIVER_ASSIGNED', | |
PICKED_UP = 'PICKED_UP', | |
COMPLETED = 'COMPLETED', | |
REJECTED = 'REJECTED', | |
EXPIRED = 'EXPIRED', | |
CANCELED = 'CANCELED', | |
} | |
export namespace LalamoveShippingStatus { | |
export const transformStatusToText = (status: string): string => { | |
switch (status) { | |
case LalamoveShippingStatus.ORDER_CREATED: | |
return 'Handover to Lalamove'; | |
case LalamoveShippingStatus.ASSIGNING_DRIVER: | |
return 'Assigning Driver'; | |
case LalamoveShippingStatus.ON_GOING: | |
return 'On Going'; | |
case LalamoveShippingStatus.DRIVER_ASSIGNED: | |
return 'Driver Assigned'; | |
case LalamoveShippingStatus.PICKED_UP: | |
return 'Picked Up'; | |
case LalamoveShippingStatus.COMPLETED: | |
return 'Delivered'; | |
case LalamoveShippingStatus.REJECTED: | |
return 'Rejected by Driver' | |
case LalamoveShippingStatus.EXPIRED: | |
return 'Expired' | |
case LalamoveShippingStatus.CANCELED: | |
return 'Canceled' | |
} | |
}; | |
export const transformStatusToDescriptionText = (status: string): string => { | |
switch (status) { | |
case LalamoveShippingStatus.ORDER_CREATED: | |
return 'We have received your order and are preparing to ship your parcel.'; | |
case LalamoveShippingStatus.ASSIGNING_DRIVER: | |
return 'Our logistic partner has been assigned to your order.'; | |
case LalamoveShippingStatus.ON_GOING: | |
return 'We are assigning our logistic partner to your order.'; | |
case LalamoveShippingStatus.DRIVER_ASSIGNED: | |
return 'Our logistic partner has been assigned to your order.'; | |
case LalamoveShippingStatus.PICKED_UP: | |
return 'Your parcel has been picked up by our logistics partner.'; | |
case LalamoveShippingStatus.COMPLETED: | |
return 'Your parcel has been delivered.'; | |
case LalamoveShippingStatus.REJECTED: | |
return 'Your parcel rejected by lalamove driver' | |
case LalamoveShippingStatus.EXPIRED: | |
return 'Your parcel delivery is expired due to not accepted by the driver for a period' | |
case LalamoveShippingStatus.CANCELED: | |
return 'Your parcel deliver is canceled by lalamove' | |
} | |
}; | |
} | |
export const DHLShippingStatus = { | |
'ORDER_CREATED': 'Handover to DHL', | |
'77123': 'Handover to DHL', | |
}; | |
export const DHLShippingDescription = { | |
'ORDER_CREATED': 'DHL have received your order and are preparing to ship your parcel.', | |
'71005': 'Over to DHL', | |
'77123': 'Shipment data received - Awaiting Parcel Handover to DHL', | |
'77206': 'Your parcel has been picked up by our logistics partner.', | |
// '77015': '', | |
// '77027': '', | |
// '77169': '', | |
// '77178': '', | |
// '77184': '', | |
// '77090': '', | |
'77093': 'Your parcel has been delivered.', | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment