Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Change money props to object
Lukasz Szewczyk3cc96b09f0e3
diff --git a/saleor/static/dashboard-next/components/ProductList/ProductList.tsx b/saleor/static/dashboard-next/components/ProductList/ProductList.tsxindex 5858d67604..0da792f223 100644--- a/saleor/static/dashboard-next/components/ProductList/ProductList.tsx+++ b/saleor/static/dashboard-next/components/ProductList/ProductList.tsx@@ -119,10 +119,7 @@ export const ProductList = decorate<ProductListProps>(product.price &&product.price.amount !== undefined &&product.price.currency !== undefined ? (- <Money- amount={product.price.amount}- currency={product.price.currency}- />+ <Money moneyDetalis={product.price} />) : (<Skeleton />)}diff --git a/saleor/static/dashboard-next/customers/components/CustomerOrders/CustomerOrders.tsx b/saleor/static/dashboard-next/customers/components/CustomerOrders/CustomerOrders.tsxindex 1361c64ae2..1f15c37ae7 100644--- a/saleor/static/dashboard-next/customers/components/CustomerOrders/CustomerOrders.tsx+++ b/saleor/static/dashboard-next/customers/components/CustomerOrders/CustomerOrders.tsx@@ -109,10 +109,7 @@ const CustomerOrders = decorate<CustomerOrdersProps>(</TableCell><TableCell className={classes.textRight} padding="dense">{maybe(() => order.total.gross) ? (- <Money- amount={order.total.gross.amount}- currency={order.total.gross.currency}- />+ <Money moneyDetalis={order.total.gross} />) : (<Skeleton />)}diff --git a/saleor/static/dashboard-next/home/components/HomePage/HomePage.tsx b/saleor/static/dashboard-next/home/components/HomePage/HomePage.tsxindex 41878282da..2a5a94a4b9 100644--- a/saleor/static/dashboard-next/home/components/HomePage/HomePage.tsx+++ b/saleor/static/dashboard-next/home/components/HomePage/HomePage.tsx@@ -87,7 +87,7 @@ const HomePage = decorate<HomePageProps>(>{maybe(() => (- <Money amount={sales.amount} currency={sales.currency} />+ <Money moneyDetalis={sales} />),<Skeleton style={{ width: "5em" }} />)}diff --git a/saleor/static/dashboard-next/home/components/HomeProductListCard/HomeProductListCard.tsx b/saleor/static/dashboard-next/home/components/HomeProductListCard/HomeProductListCard.tsxindex 2ecbfdc071..12b82fd653 100644--- a/saleor/static/dashboard-next/home/components/HomeProductListCard/HomeProductListCard.tsx+++ b/saleor/static/dashboard-next/home/components/HomeProductListCard/HomeProductListCard.tsx@@ -98,10 +98,7 @@ export const HomeProductList = decorate<HomeProductListProps>(<Typography align={"right"}>{maybe(() => (- <Money- amount={variant.revenue.gross.amount}- currency={variant.revenue.gross.currency}- />+ <Money moneyDetalis={variant.revenue.gross} />),<Skeleton />)}diff --git a/saleor/static/dashboard-next/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx b/saleor/static/dashboard-next/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsxindex 959c08c688..17f7696c37 100644--- a/saleor/static/dashboard-next/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx+++ b/saleor/static/dashboard-next/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx@@ -120,10 +120,7 @@ const OrderDraftDetailsProducts = decorate<OrderDraftDetailsProductsProps>(</TableCell><TableCell className={classes.textRight}>{maybe(() => line.unitPrice.net) ? (- <Money- amount={line.unitPrice.net.amount}- currency={line.unitPrice.net.currency}- />+ <Money moneyDetalis={line.unitPrice.net} />) : (<Skeleton />)}@@ -131,8 +128,10 @@ const OrderDraftDetailsProducts = decorate<OrderDraftDetailsProductsProps>(<TableCell className={classes.textRight}>{maybe(() => line.unitPrice.net && line.quantity) ? (<Money- amount={line.unitPrice.net.amount * line.quantity}- currency={line.unitPrice.net.currency}+ moneyDetalis={{+ amount: line.unitPrice.net.amount * line.quantity,+ currency: line.unitPrice.net.currency+ }}/>) : (<Skeleton />diff --git a/saleor/static/dashboard-next/orders/components/OrderDraftDetailsSummary/OrderDraftDetailsSummary.tsx b/saleor/static/dashboard-next/orders/components/OrderDraftDetailsSummary/OrderDraftDetailsSummary.tsxindex 2c979fea7f..acf5a7c036 100644--- a/saleor/static/dashboard-next/orders/components/OrderDraftDetailsSummary/OrderDraftDetailsSummary.tsx+++ b/saleor/static/dashboard-next/orders/components/OrderDraftDetailsSummary/OrderDraftDetailsSummary.tsx@@ -32,7 +32,7 @@ const OrderDraftDetailsSummary = decorate<OrderDraftDetailsSummaryProps>(<><td>{i18n.t("Subtotal")}</td><td className={classes.textRight}>- <Money {...order.subtotal.gross} />+ <Money moneyDetalis={order.subtotal.gross} /></td></>) : (@@ -53,7 +53,7 @@ const OrderDraftDetailsSummary = decorate<OrderDraftDetailsSummaryProps>(</td><td className={classes.textRight}>{maybe(() => order.shippingPrice) ? (- <Money {...order.shippingPrice.gross} />+ <Money moneyDetalis={order.shippingPrice.gross} />) : ("---")}@@ -70,7 +70,7 @@ const OrderDraftDetailsSummary = decorate<OrderDraftDetailsSummaryProps>(<><td>{i18n.t("Taxes (VAT included)")}</td><td className={classes.textRight}>- <Money {...order.total.tax} />+ <Money moneyDetalis={order.total.tax} /></td></>) : (@@ -84,7 +84,7 @@ const OrderDraftDetailsSummary = decorate<OrderDraftDetailsSummaryProps>(<><td>{i18n.t("Total")}</td><td className={classes.textRight}>- <Money {...order.total.gross} />+ <Money moneyDetalis={order.total.gross} /></td></>) : (diff --git a/saleor/static/dashboard-next/orders/components/OrderFulfillment/OrderFulfillment.tsx b/saleor/static/dashboard-next/orders/components/OrderFulfillment/OrderFulfillment.tsxindex ca1aba6a98..281a340f4c 100644--- a/saleor/static/dashboard-next/orders/components/OrderFulfillment/OrderFulfillment.tsx+++ b/saleor/static/dashboard-next/orders/components/OrderFulfillment/OrderFulfillment.tsx@@ -146,10 +146,7 @@ const OrderFulfillment = decorate<OrderFulfillmentProps>(</TableCell><TableCell className={classes.textRight}>{maybe(() => line.orderLine.unitPrice.gross) ? (- <Money- amount={line.orderLine.unitPrice.gross.amount}- currency={line.orderLine.unitPrice.gross.currency}- />+ <Money moneyDetalis={line.orderLine.unitPrice.gross} />) : (<Skeleton />)}@@ -159,10 +156,11 @@ const OrderFulfillment = decorate<OrderFulfillmentProps>(() => line.quantity * line.orderLine.unitPrice.gross.amount) ? (<Money- amount={- line.quantity * line.orderLine.unitPrice.gross.amount- }- currency={line.orderLine.unitPrice.gross.currency}+ moneyDetalis={{+ amount:+ line.quantity * line.orderLine.unitPrice.gross.amount,+ currency: line.orderLine.unitPrice.gross.currency+ }}/>) : (<Skeleton />diff --git a/saleor/static/dashboard-next/orders/components/OrderList/OrderList.tsx b/saleor/static/dashboard-next/orders/components/OrderList/OrderList.tsxindex a5b513f746..a682aded4f 100644--- a/saleor/static/dashboard-next/orders/components/OrderList/OrderList.tsx+++ b/saleor/static/dashboard-next/orders/components/OrderList/OrderList.tsx@@ -152,10 +152,7 @@ export const OrderList = decorate<OrderListProps>(</TableCell><TableCell className={classes.textRight} padding="dense">{maybe(() => order.total.gross) ? (- <Money- amount={order.total.gross.amount}- currency={order.total.gross.currency}- />+ <Money moneyDetalis={order.total.gross} />) : (<Skeleton />)}diff --git a/saleor/static/dashboard-next/orders/components/OrderPayment/OrderPayment.tsx b/saleor/static/dashboard-next/orders/components/OrderPayment/OrderPayment.tsxindex de4523968a..34044c8f3a 100644--- a/saleor/static/dashboard-next/orders/components/OrderPayment/OrderPayment.tsx+++ b/saleor/static/dashboard-next/orders/components/OrderPayment/OrderPayment.tsx@@ -81,7 +81,7 @@ const OrderPayment = decorate<OrderPaymentProps>({maybe(() => order.subtotal.gross) === undefined ? (<Skeleton />) : (- <Money {...order.subtotal.gross} />+ <Money moneyDetalis={order.subtotal.gross} />)}</td></tr>@@ -100,7 +100,7 @@ const OrderPayment = decorate<OrderPaymentProps>({maybe(() => order.total.tax) === undefined ? (<Skeleton />) : (- <Money {...order.total.tax} />+ <Money moneyDetalis={order.total.tax} />)}</td></tr>@@ -120,7 +120,7 @@ const OrderPayment = decorate<OrderPaymentProps>({maybe(() => order.shippingPrice.gross) === undefined ? (<Skeleton />) : (- <Money {...order.shippingPrice.gross} />+ <Money moneyDetalis={order.shippingPrice.gross} />)}</td></tr>@@ -131,7 +131,7 @@ const OrderPayment = decorate<OrderPaymentProps>({maybe(() => order.total.gross) === undefined ? (<Skeleton />) : (- <Money {...order.total.gross} />+ <Money moneyDetalis={order.total.gross} />)}</td></tr>diff --git a/saleor/static/dashboard-next/orders/components/OrderShippingMethodEditDialog/OrderShippingMethodEditDialog.tsx b/saleor/static/dashboard-next/orders/components/OrderShippingMethodEditDialog/OrderShippingMethodEditDialog.tsxindex f47fae1fb0..70746a5143 100644--- a/saleor/static/dashboard-next/orders/components/OrderShippingMethodEditDialog/OrderShippingMethodEditDialog.tsx+++ b/saleor/static/dashboard-next/orders/components/OrderShippingMethodEditDialog/OrderShippingMethodEditDialog.tsx@@ -55,7 +55,7 @@ const OrderShippingMethodEditDialog = decorate<<span className={classes.shippingMethodName}>{s.name}</span> <span>- <Money {...s.price} />+ <Money moneyDetalis={s.price} /></span></div>),diff --git a/saleor/static/dashboard-next/orders/types/OrderDetails.ts b/saleor/static/dashboard-next/orders/types/OrderDetails.tsindex 01378c815c..fe0f1a39cf 100644--- a/saleor/static/dashboard-next/orders/types/OrderDetails.ts+++ b/saleor/static/dashboard-next/orders/types/OrderDetails.ts@@ -1,7 +1,15 @@/* tslint:disable */// This file was automatically generated and should not be edited.-import { OrderEventsEmails, OrderEvents, FulfillmentStatus, PaymentChargeStatusEnum, OrderStatus, OrderAction, WeightUnitsEnum } from "./../../types/globalTypes";+import {+ OrderEventsEmails,+ OrderEvents,+ FulfillmentStatus,+ PaymentChargeStatusEnum,+ OrderStatus,+ OrderAction,+ WeightUnitsEnum+} from "./../../types/globalTypes";// ====================================================// GraphQL query operation: OrderDetails@@ -251,7 +259,9 @@ export interface OrderDetails_order {totalCaptured: OrderDetails_order_totalCaptured | null;user: OrderDetails_order_user | null;userEmail: string | null;- availableShippingMethods: (OrderDetails_order_availableShippingMethods | null)[] | null;+ availableShippingMethods:+ | (OrderDetails_order_availableShippingMethods | null)[]+ | null;}export interface OrderDetails_shop_countries {