handle missing shipping costs and black styling issue

This commit is contained in:
tedraykov
2024-07-09 11:40:14 +03:00
parent 9c05d36b31
commit c6530d3ded
19 changed files with 53 additions and 93 deletions

View File

@@ -643,10 +643,6 @@ function reshapeOrder(shopifyOrder: ShopifyOrder): Order {
totalTax: reshapeMoney(shopifyOrder.totalTax),
totalPrice: reshapeMoney(shopifyOrder.totalPrice),
createdAt: shopifyOrder.createdAt,
shippingMethod: {
name: shopifyOrder.shippingLine?.title,
price: reshapeMoney(shopifyOrder.shippingLine.originalPrice)!
},
warrantyActivationDeadline: shopifyOrder.warrantyActivationDeadline,
warrantyStatus: shopifyOrder.warrantyStatus,
warrantyActivationInstallation: shopifyOrder.warrantyActivationInstallation,
@@ -667,6 +663,13 @@ function reshapeOrder(shopifyOrder: ShopifyOrder): Order {
coreReturnDescription: shopifyOrder.coreReturnDescription
};
if (shopifyOrder.shippingLine) {
order.shippingMethod = {
name: shopifyOrder.shippingLine.title,
price: reshapeMoney(shopifyOrder.shippingLine.originalPrice)
};
}
if (shopifyOrder.customer) {
order.customer = reshapeCustomer(shopifyOrder.customer);
}

View File

@@ -163,7 +163,7 @@ export type Order = {
totalShipping: Money;
totalTax: Money;
totalPrice: Money;
shippingMethod: {
shippingMethod?: {
name: string;
price: Money;
};

View File

@@ -18,9 +18,6 @@ export const carPartPlanetColor = {
200: '#666C89',
500: '#2D3A7B',
600: '#111C55'
},
black: {
700: '#1A1A25'
}
};
@@ -44,9 +41,6 @@ export const remanTransmissionColor = {
200: '#666C89',
500: '#2D3A7B',
600: '#111C55'
},
black: {
700: '#1A1A25'
}
};
@@ -70,8 +64,5 @@ export const transmissionLocatorColor = {
200: '#666C89',
500: '#2D3A7B',
600: '#111C55'
},
black: {
700: '#1A1A25'
}
};