ReturnsList container
The ReturnsList
container displays a complete list of all created returns available to the user. Each return card follows the same structure as the OrderReturns
container, allowing consistent presentation of return details. It provides an overview of all return requests, enabling users to manage and track their status in one place.
ReturnsList container
Configurations
The ReturnsList
container provides the following configuration options:
Example
The following example demonstrates how to render the ReturnsList
container:
export default async function decorate(block) { const { 'minified-view': minifiedViewConfig = 'false', } = readBlockConfig(block);
if (!checkIsAuthenticated()) { window.location.href = CUSTOMER_LOGIN_PATH; } else { await orderRenderer.render(ReturnsList, { minifiedView: minifiedViewConfig === 'true', routeTracking: ({ carrier, number }) => { if (carrier?.toLowerCase() === 'ups') { return `${UPS_TRACKING_URL}?tracknum=${number}`; } return ''; }, routeReturnDetails: ({ orderNumber, returnNumber }) => `${CUSTOMER_RETURN_DETAILS_PATH}?orderRef=${orderNumber}&returnRef=${returnNumber}`, routeOrderDetails: ({ orderNumber }) => `${CUSTOMER_ORDER_DETAILS_PATH}?orderRef=${orderNumber}`, routeReturnsList: () => CUSTOMER_RETURNS_PATH, routeProductDetails: (productData) => (productData ? `/products/${productData.product.urlKey}/${productData.product.sku}` : '#'), })(block); }}