Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Update fixtures

dominik-zeglen779630a115e6
diff --git a/saleor/static/dashboard-next/components/AddressFormatter/AddressFormatter.tsx b/saleor/static/dashboard-next/components/AddressFormatter/AddressFormatter.tsx
index da97701584..62ce23100b 100644
--- a/saleor/static/dashboard-next/components/AddressFormatter/AddressFormatter.tsx
+++ b/saleor/static/dashboard-next/components/AddressFormatter/AddressFormatter.tsx
@@ -23,9 +23,9 @@ const AddressFormatter: React.StatelessComponent<AddressFormatterProps> = ({
<Typography component="span">{address.companyName}</Typography>
)}
<Typography component="span">
- {address.streetAddress_1}
+ {address.streetAddress1}
<br />
- {address.streetAddress_2}
+ {address.streetAddress2}
</Typography>
<Typography component="span">
{" "}
diff --git a/saleor/static/dashboard-next/components/Timeline/Timeline.tsx b/saleor/static/dashboard-next/components/Timeline/Timeline.tsx
index 805a093f87..a6795bad10 100644
--- a/saleor/static/dashboard-next/components/Timeline/Timeline.tsx
+++ b/saleor/static/dashboard-next/components/Timeline/Timeline.tsx
@@ -23,13 +23,18 @@ import DateFormatter from "../DateFormatter";
interface TimelineNodeProps {
date: string;
title: string;
+ amount: number | null;
+ email: string | null;
+ emailType: string | null;
+ type: string;
+ quantity: number | null;
}
interface TimelineNoteProps {
date: string;
+ message: string | null;
user: {
email: string;
};
- content: string;
}
interface TimelineAddNoteProps {
user: {
@@ -180,7 +185,7 @@ export const TimelineNode = decorate<TimelineNodeProps>(
)
);
export const TimelineNote = decorate<TimelineNoteProps>(
- ({ classes, date, user, content }) => (
+ ({ classes, date, user, message }) => (
<Card className={classes.noteRoot}>
<CardContent className={classes.noteTitle}>
<Avatar
@@ -194,7 +199,7 @@ export const TimelineNote = decorate<TimelineNoteProps>(
</div>
</CardContent>
<CardContent>
- <Typography className={classes.noteContent}>{content}</Typography>
+ <Typography className={classes.noteContent}>{message}</Typography>
</CardContent>
</Card>
)
diff --git a/saleor/static/dashboard-next/customers/components/CustomerDetailsPage/CustomerDetailsPage.tsx b/saleor/static/dashboard-next/customers/components/CustomerDetailsPage/CustomerDetailsPage.tsx
index b0cb1ceaa8..11546a1847 100644
--- a/saleor/static/dashboard-next/customers/components/CustomerDetailsPage/CustomerDetailsPage.tsx
+++ b/saleor/static/dashboard-next/customers/components/CustomerDetailsPage/CustomerDetailsPage.tsx
@@ -25,16 +25,18 @@ interface CustomerDetailsPageProps {
};
orders?: Array<{
id: string;
- number: number;
+ number: string;
created: string;
- price: {
- amount: number;
- currency: string;
- };
orderStatus: {
localized: string;
status: string;
};
+ total: {
+ gross: {
+ amount: number;
+ currency: string;
+ };
+ };
}>;
pageInfo?: {
hasPreviousPage: boolean;
diff --git a/saleor/static/dashboard-next/customers/components/CustomerOrders/CustomerOrders.tsx b/saleor/static/dashboard-next/customers/components/CustomerOrders/CustomerOrders.tsx
index 013bd998b6..50bbbaf460 100644
--- a/saleor/static/dashboard-next/customers/components/CustomerOrders/CustomerOrders.tsx
+++ b/saleor/static/dashboard-next/customers/components/CustomerOrders/CustomerOrders.tsx
@@ -20,15 +20,17 @@ import { renderCollection } from "../../../misc";
interface CustomerOrdersProps {
orders?: Array<{
id: string;
- number: number;
+ number: string;
orderStatus: {
localized: string;
status: string;
};
created: string;
- price: {
- amount: number;
- currency: string;
+ total: {
+ gross: {
+ amount: number;
+ currency: string;
+ };
};
}>;
dateNow?: number;
@@ -111,10 +113,10 @@ const CustomerOrders = decorate<CustomerOrdersProps>(
)}
</TableCell>
<TableCell className={classes.textRight}>
- {order && order.price ? (
+ {order && order.total && order.total.gross ? (
<Money
- amount={order.price.amount}
- currency={order.price.currency}
+ amount={order.total.gross.amount}
+ currency={order.total.gross.currency}
/>
) : (
<Skeleton />
diff --git a/saleor/static/dashboard-next/customers/fixtures.ts b/saleor/static/dashboard-next/customers/fixtures.ts
index 629b421d82..4468f4bdb3 100644
--- a/saleor/static/dashboard-next/customers/fixtures.ts
+++ b/saleor/static/dashboard-next/customers/fixtures.ts
@@ -10,11 +10,10 @@ export const customers = [
firstName: "Alexander",
id: "52402",
lastName: "Simonis",
- phone_number: "253-928-8945",
- phone_prefix: "17",
+ phone: "+17 253-928-8945",
postalCode: "47639-5237",
- streetAddress_1: "83772 Savanah Summit",
- streetAddress_2: null
+ streetAddress1: "83772 Savanah Summit",
+ streetAddress2: null
},
defaultShippingAddress: {
city: "West Bret",
@@ -25,11 +24,10 @@ export const customers = [
firstName: "Alexander",
id: "77109",
lastName: "Simonis",
- phone_number: "463-243-6545",
- phone_prefix: "21",
+ phone: "+21 463-243-6545",
postalCode: "21665",
- streetAddress_1: "780 Jaime Prairie",
- streetAddress_2: null
+ streetAddress1: "780 Jaime Prairie",
+ streetAddress2: null
},
id: "11810",
@@ -48,11 +46,10 @@ export const customers = [
firstName: "Augustus",
id: "81868",
lastName: "Crist",
- phone_number: "583-374-8576",
- phone_prefix: "19",
+ phone: "+19 583-374-8576",
postalCode: "29966",
- streetAddress_1: "5656 Crooks Park",
- streetAddress_2: null
+ streetAddress1: "5656 Crooks Park",
+ streetAddress2: null
},
defaultShippingAddress: {
city: "East Brandttown",
@@ -63,11 +60,10 @@ export const customers = [
firstName: "Augustus",
id: "11788",
lastName: "Crist",
- phone_number: "584-961-3073",
- phone_prefix: "52",
+ phone: "+52 584-961-3073",
postalCode: "80218",
- streetAddress_1: "37212 O'Reilly Ford",
- streetAddress_2: null
+ streetAddress1: "37212 O'Reilly Ford",
+ streetAddress2: null
},
id: "34351",
@@ -86,11 +82,10 @@ export const customers = [
firstName: "Kelton",
id: "77939",
lastName: "Eichmann",
- phone_number: "650-119-2676",
- phone_prefix: "17",
+ phone: "+17 650-119-2676",
postalCode: "94747-5311",
- streetAddress_1: "5060 Aufderhar Common",
- streetAddress_2: null
+ streetAddress1: "5060 Aufderhar Common",
+ streetAddress2: null
},
defaultShippingAddress: {
city: "East Raymond",
@@ -101,11 +96,10 @@ export const customers = [
firstName: "Kelton",
id: "77939",
lastName: "Eichmann",
- phone_number: "650-119-2676",
- phone_prefix: "17",
+ phone: "+17 650-119-2676",
postalCode: "94747-5311",
- streetAddress_1: "5060 Aufderhar Common",
- streetAddress_2: null
+ streetAddress1: "5060 Aufderhar Common",
+ streetAddress2: null
},
id: "47883",
@@ -124,11 +118,10 @@ export const customers = [
firstName: "Magnolia",
id: "2237",
lastName: "Brakus",
- phone_number: "136-461-3995",
- phone_prefix: "52",
+ phone: "+52 136-461-3995",
postalCode: "64573",
- streetAddress_1: "106 Swift Squares",
- streetAddress_2: null
+ streetAddress1: "106 Swift Squares",
+ streetAddress2: null
},
defaultShippingAddress: {
city: "Torphyton",
@@ -139,11 +132,10 @@ export const customers = [
firstName: "Magnolia",
id: "2237",
lastName: "Brakus",
- phone_number: "136-461-3995",
- phone_prefix: "52",
+ phone: "+52 136-461-3995",
postalCode: "64573",
- streetAddress_1: "106 Swift Squares",
- streetAddress_2: null
+ streetAddress1: "106 Swift Squares",
+ streetAddress2: null
},
id: "53433",
@@ -162,11 +154,10 @@ export const customers = [
firstName: "Adonis",
id: "10532",
lastName: "Pacocha",
- phone_number: "944-018-0185",
- phone_prefix: "11",
+ phone: "+11 944-018-0185",
postalCode: "52460-3432",
- streetAddress_1: "32181 Lindgren Turnpike",
- streetAddress_2: null
+ streetAddress1: "32181 Lindgren Turnpike",
+ streetAddress2: null
},
defaultShippingAddress: {
city: "East Fletcher",
@@ -177,11 +168,10 @@ export const customers = [
firstName: "Adonis",
id: "45425",
lastName: "Pacocha",
- phone_number: "549-984-7736",
- phone_prefix: "36",
+ phone: "+36 549-984-7736",
postalCode: "29123-8368",
- streetAddress_1: "938 Jordyn Harbor",
- streetAddress_2: null
+ streetAddress1: "938 Jordyn Harbor",
+ streetAddress2: null
},
id: "42657",
@@ -200,11 +190,10 @@ export const customers = [
firstName: "Carlie",
id: "83778",
lastName: "Walsh",
- phone_number: "387-984-3969",
- phone_prefix: "27",
+ phone: "+27 387-984-3969",
postalCode: "48003",
- streetAddress_1: "08030 Corrine Row",
- streetAddress_2: null
+ streetAddress1: "08030 Corrine Row",
+ streetAddress2: null
},
defaultShippingAddress: {
city: "North Tanyafurt",
@@ -215,11 +204,10 @@ export const customers = [
firstName: "Carlie",
id: "14941",
lastName: "Walsh",
- phone_number: "320-941-3747",
- phone_prefix: "44",
+ phone: "+44 320-941-3747",
postalCode: "33296",
- streetAddress_1: "1231 Eriberto Stravenue",
- streetAddress_2: null
+ streetAddress1: "1231 Eriberto Stravenue",
+ streetAddress2: null
},
id: "93594",
@@ -238,11 +226,10 @@ export const customers = [
firstName: "Junius",
id: "86163",
lastName: "Crist",
- phone_number: "605-434-6759",
- phone_prefix: "47",
+ phone: "+47 605-434-6759",
postalCode: "39521",
- streetAddress_1: "333 Bernie Fords",
- streetAddress_2: null
+ streetAddress1: "333 Bernie Fords",
+ streetAddress2: null
},
defaultShippingAddress: {
city: "Kaylistad",
@@ -253,11 +240,10 @@ export const customers = [
firstName: "Junius",
id: "78537",
lastName: "Crist",
- phone_number: "893-019-4257",
- phone_prefix: "20",
+ phone: "+20 893-019-4257",
postalCode: "43886-6932",
- streetAddress_1: "0597 Angeline Gateway",
- streetAddress_2: null
+ streetAddress1: "0597 Angeline Gateway",
+ streetAddress2: null
},
id: "70932",
@@ -276,11 +262,10 @@ export const customers = [
firstName: "Pedro",
id: "70545",
lastName: "Harvey",
- phone_number: "817-342-0603",
- phone_prefix: "35",
+ phone: "+35 817-342-0603",
postalCode: "72196",
- streetAddress_1: "9280 Asa Center",
- streetAddress_2: null
+ streetAddress1: "9280 Asa Center",
+ streetAddress2: null
},
defaultShippingAddress: {
city: "Lydiahaven",
@@ -291,11 +276,10 @@ export const customers = [
firstName: "Pedro",
id: "70545",
lastName: "Harvey",
- phone_number: "817-342-0603",
- phone_prefix: "35",
+ phone: "+35 817-342-0603",
postalCode: "72196",
- streetAddress_1: "9280 Asa Center",
- streetAddress_2: null
+ streetAddress1: "9280 Asa Center",
+ streetAddress2: null
},
id: "61255",
@@ -314,11 +298,10 @@ export const customers = [
firstName: "Raven",
id: "9167",
lastName: "Deckow",
- phone_number: "210-019-3184",
- phone_prefix: "62",
+ phone: "+62 210-019-3184",
postalCode: "02296",
- streetAddress_1: "8546 Marks Highway",
- streetAddress_2: null
+ streetAddress1: "8546 Marks Highway",
+ streetAddress2: null
},
defaultShippingAddress: {
city: "South Hendersonbury",
@@ -329,11 +312,10 @@ export const customers = [
firstName: "Raven",
id: "48467",
lastName: "Deckow",
- phone_number: "654-130-2375",
- phone_prefix: "46",
+ phone: "+46 654-130-2375",
postalCode: "00611",
- streetAddress_1: "87001 Howell Forge",
- streetAddress_2: null
+ streetAddress1: "87001 Howell Forge",
+ streetAddress2: null
},
id: "84610",
@@ -352,11 +334,10 @@ export const customers = [
firstName: "Paige",
id: "63622",
lastName: "Lesch",
- phone_number: "972-463-2863",
- phone_prefix: "8",
+ phone: "+08 972-463-2863",
postalCode: "80681-4790",
- streetAddress_1: "93719 Hackett Mountain",
- streetAddress_2: null
+ streetAddress1: "93719 Hackett Mountain",
+ streetAddress2: null
},
defaultShippingAddress: {
city: "Windlerton",
@@ -367,11 +348,10 @@ export const customers = [
firstName: "Paige",
id: "63622",
lastName: "Lesch",
- phone_number: "972-463-2863",
- phone_prefix: "8",
+ phone: "+08 972-463-2863",
postalCode: "80681-4790",
- streetAddress_1: "93719 Hackett Mountain",
- streetAddress_2: null
+ streetAddress1: "93719 Hackett Mountain",
+ streetAddress2: null
},
id: "28741",
@@ -390,11 +370,10 @@ export const customers = [
firstName: "Santino",
id: "89962",
lastName: "Bins",
- phone_number: "844-752-5593",
- phone_prefix: "45",
+ phone: "+45 844-752-5593",
postalCode: "33593-8299",
- streetAddress_1: "557 Jacobi Gateway",
- streetAddress_2: null
+ streetAddress1: "557 Jacobi Gateway",
+ streetAddress2: null
},
defaultShippingAddress: {
city: "West Jolieland",
@@ -405,11 +384,10 @@ export const customers = [
firstName: "Santino",
id: "58915",
lastName: "Bins",
- phone_number: "685-424-9436",
- phone_prefix: "25",
+ phone: "+25 685-424-9436",
postalCode: "58377",
- streetAddress_1: "6647 Kody Locks",
- streetAddress_2: null
+ streetAddress1: "6647 Kody Locks",
+ streetAddress2: null
},
id: "46991",
@@ -428,11 +406,10 @@ export const customers = [
firstName: "Quinn",
id: "94894",
lastName: "Barrows",
- phone_number: "995-317-3324",
- phone_prefix: "35",
+ phone: "+35 995-317-3324",
postalCode: "41805",
- streetAddress_1: "146 Dee Station",
- streetAddress_2: null
+ streetAddress1: "146 Dee Station",
+ streetAddress2: null
},
defaultShippingAddress: {
city: "North Sister",
@@ -443,11 +420,10 @@ export const customers = [
firstName: "Quinn",
id: "94894",
lastName: "Barrows",
- phone_number: "995-317-3324",
- phone_prefix: "35",
+ phone: "+35 995-317-3324",
postalCode: "41805",
- streetAddress_1: "146 Dee Station",
- streetAddress_2: null
+ streetAddress1: "146 Dee Station",
+ streetAddress2: null
},
id: "50687",
@@ -466,11 +442,10 @@ export const customers = [
firstName: "Berry",
id: "93575",
lastName: "Windler",
- phone_number: "876-373-9137",
- phone_prefix: "41",
+ phone: "+41 876-373-9137",
postalCode: "89880-6342",
- streetAddress_1: "01419 Bernhard Plain",
- streetAddress_2: null
+ streetAddress1: "01419 Bernhard Plain",
+ streetAddress2: null
},
defaultShippingAddress: {
city: "Kenstad",
@@ -481,11 +456,10 @@ export const customers = [
firstName: "Berry",
id: "93575",
lastName: "Windler",
- phone_number: "876-373-9137",
- phone_prefix: "41",
+ phone: "+41 876-373-9137",
postalCode: "89880-6342",
- streetAddress_1: "01419 Bernhard Plain",
- streetAddress_2: null
+ streetAddress1: "01419 Bernhard Plain",
+ streetAddress2: null
},
id: "36798",
@@ -504,11 +478,10 @@ export const customers = [
firstName: "Johnathon",
id: "78744",
lastName: "Kohler",
- phone_number: "888-798-4522",
- phone_prefix: "63",
+ phone: "+63 888-798-4522",
postalCode: "43892-8110",
- streetAddress_1: "287 Rowe Mews",
- streetAddress_2: null
+ streetAddress1: "287 Rowe Mews",
+ streetAddress2: null
},
defaultShippingAddress: {
city: "Jamilstad",
@@ -519,11 +492,10 @@ export const customers = [
firstName: "Johnathon",
id: "78744",
lastName: "Kohler",
- phone_number: "888-798-4522",
- phone_prefix: "63",
+ phone: "+63 888-798-4522",
postalCode: "43892-8110",
- streetAddress_1: "287 Rowe Mews",
- streetAddress_2: null
+ streetAddress1: "287 Rowe Mews",
+ streetAddress2: null
},
id: "98483",
@@ -542,11 +514,10 @@ export const customers = [
firstName: "Linwood",
id: "19005",
lastName: "Windler",
- phone_number: "815-222-0791",
- phone_prefix: "60",
+ phone: "+60 815-222-0791",
postalCode: "12595",
- streetAddress_1: "496 Sporer Mountain",
- streetAddress_2: null
+ streetAddress1: "496 Sporer Mountain",
+ streetAddress2: null
},
defaultShippingAddress: {
city: "Keltonland",
@@ -557,11 +528,10 @@ export const customers = [
firstName: "Linwood",
id: "19005",
lastName: "Windler",
- phone_number: "815-222-0791",
- phone_prefix: "60",
+ phone: "+60 815-222-0791",
postalCode: "12595",
- streetAddress_1: "496 Sporer Mountain",
- streetAddress_2: null
+ streetAddress1: "496 Sporer Mountain",
+ streetAddress2: null
},
id: "18050",
@@ -580,11 +550,10 @@ export const customers = [
firstName: "Timmy",
id: "33855",
lastName: "Macejkovic",
- phone_number: "460-907-9374",
- phone_prefix: "41",
+ phone: "+41 460-907-9374",
postalCode: "15926",
- streetAddress_1: "0238 Cremin Freeway",
- streetAddress_2: null
+ streetAddress1: "0238 Cremin Freeway",
+ streetAddress2: null
},
defaultShippingAddress: {
city: "Larkinstad",
@@ -595,11 +564,10 @@ export const customers = [
firstName: "Timmy",
id: "67467",
lastName: "Macejkovic",
- phone_number: "943-882-1295",
- phone_prefix: "64",
+ phone: "+64 943-882-1295",
postalCode: "43425",
- streetAddress_1: "96332 Corkery Lane",
- streetAddress_2: null
+ streetAddress1: "96332 Corkery Lane",
+ streetAddress2: null
},
id: "65578",
diff --git a/saleor/static/dashboard-next/orders/components/OrderDetailsPage/OrderDetailsPage.tsx b/saleor/static/dashboard-next/orders/components/OrderDetailsPage/OrderDetailsPage.tsx
index 790b01bdda..d544591777 100644
--- a/saleor/static/dashboard-next/orders/components/OrderDetailsPage/OrderDetailsPage.tsx
+++ b/saleor/static/dashboard-next/orders/components/OrderDetailsPage/OrderDetailsPage.tsx
@@ -330,7 +330,7 @@ class OrderDetailsPageComponent extends React.Component<
/>
<OrderFulfillmentDialog
open={openedFulfillmentDialog && !!order}
- products={unfulfilled}
+ lines={unfulfilled}
onClose={this.toggleFulfillmentDialog}
onSubmit={onOrderFulfill}
/>
diff --git a/saleor/static/dashboard-next/orders/components/OrderFulfillmentDialog/OrderFulfillmentDialog.tsx b/saleor/static/dashboard-next/orders/components/OrderFulfillmentDialog/OrderFulfillmentDialog.tsx
index 0dee2a9758..9e7a88afc6 100644
--- a/saleor/static/dashboard-next/orders/components/OrderFulfillmentDialog/OrderFulfillmentDialog.tsx
+++ b/saleor/static/dashboard-next/orders/components/OrderFulfillmentDialog/OrderFulfillmentDialog.tsx
@@ -22,7 +22,7 @@ export interface FormData {
interface OrderFulfillmentDialogProps {
open: boolean;
- products?: Array<{
+ lines: Array<{
id: string;
productName: string;
productSku: string;
@@ -51,13 +51,13 @@ const decorate = withStyles(
{ name: "OrderFulfillmentDialog" }
);
const OrderFulfillmentDialog = decorate<OrderFulfillmentDialogProps>(
- ({ classes, open, products, onClose, onSubmit }) => (
+ ({ classes, open, lines, onClose, onSubmit }) => (
<Dialog open={open}>
<Form
initial={{
lines: maybe(
() =>
- products.map(
+ lines.map(
product => product.quantity - product.quantityFulfilled
),
[]
@@ -94,7 +94,7 @@ const OrderFulfillmentDialog = decorate<OrderFulfillmentDialogProps>(
</TableRow>
</TableHead>
<TableBody>
- {products.map((product, productIndex) => {
+ {lines.map((product, productIndex) => {
const remainingQuantity =
product.quantity - product.quantityFulfilled;
return (
diff --git a/saleor/static/dashboard-next/orders/components/OrderHistory/OrderHistory.tsx b/saleor/static/dashboard-next/orders/components/OrderHistory/OrderHistory.tsx
index 9ba5509457..256985ca72 100644
--- a/saleor/static/dashboard-next/orders/components/OrderHistory/OrderHistory.tsx
+++ b/saleor/static/dashboard-next/orders/components/OrderHistory/OrderHistory.tsx
@@ -69,15 +69,20 @@ const OrderHistory = decorate<OrderHistoryProps>(
if (event.type === OrderEvents.NOTE_ADDED) {
return (
<TimelineNote
- user={event.user}
date={event.date}
- content={event.message}
+ user={event.user}
+ message={event.message}
key={event.id}
/>
);
}
return (
<TimelineNode
+ amount={event.amount}
+ email={event.email}
+ emailType={event.emailType}
+ quantity={event.quantity}
+ type={event.type}
date={event.date}
title={event.message}
key={event.id}
diff --git a/saleor/static/dashboard-next/orders/components/OrderProducts/OrderProducts.tsx b/saleor/static/dashboard-next/orders/components/OrderProducts/OrderProducts.tsx
index 15c9f82b0d..06efdf9529 100644
--- a/saleor/static/dashboard-next/orders/components/OrderProducts/OrderProducts.tsx
+++ b/saleor/static/dashboard-next/orders/components/OrderProducts/OrderProducts.tsx
@@ -31,7 +31,7 @@ interface MoneyType {
export interface OrderProductsProps {
authorized?: MoneyType;
isDraft?: boolean;
- lines: Array<{
+ lines?: Array<{
id: string;
productName: string;
unitPrice: TaxedMoneyType;
diff --git a/saleor/static/dashboard-next/orders/components/OrderShippingMethodEditDialog/OrderShippingMethodEditDialog.tsx b/saleor/static/dashboard-next/orders/components/OrderShippingMethodEditDialog/OrderShippingMethodEditDialog.tsx
index 671a840f66..ec9d509549 100644
--- a/saleor/static/dashboard-next/orders/components/OrderShippingMethodEditDialog/OrderShippingMethodEditDialog.tsx
+++ b/saleor/static/dashboard-next/orders/components/OrderShippingMethodEditDialog/OrderShippingMethodEditDialog.tsx
@@ -68,7 +68,9 @@ const OrderShippingMethodEditDialog = decorate<
: [];
return (
<Dialog open={open} classes={{ paper: classes.dialog }}>
- <DialogTitle>{i18n.t("Edit customer details")}</DialogTitle>
+ <DialogTitle>
+ {i18n.t("Edit shipping method", { context: "title" })}
+ </DialogTitle>
<DialogContent className={classes.root}>
<SingleAutocompleteSelectField
choices={choices}
diff --git a/saleor/static/dashboard-next/orders/components/OrderSummary/OrderSummary.tsx b/saleor/static/dashboard-next/orders/components/OrderSummary/OrderSummary.tsx
index a18770e5ba..4a648a782e 100644
--- a/saleor/static/dashboard-next/orders/components/OrderSummary/OrderSummary.tsx
+++ b/saleor/static/dashboard-next/orders/components/OrderSummary/OrderSummary.tsx
@@ -12,17 +12,9 @@ import OrderProducts, {
OrderProductsProps
} from "../OrderProducts/OrderProducts";
-interface MoneyType {
- amount: number;
- currency: string;
-}
interface OrderSummaryProps extends OrderProductsProps {
paymentStatus?: string;
paymentVariant?: string;
- shippingMethodName?: string;
- shippingPrice: {
- gross: MoneyType;
- };
status?: OrderStatus;
onCapture?();
onCreate?();
diff --git a/saleor/static/dashboard-next/orders/fixtures.ts b/saleor/static/dashboard-next/orders/fixtures.ts
index 464607e37d..2afadf52b8 100644
--- a/saleor/static/dashboard-next/orders/fixtures.ts
+++ b/saleor/static/dashboard-next/orders/fixtures.ts
@@ -22,73 +22,91 @@ export const orders = [
client: clients[0],
created: "2018-04-07T11:18:19+00:00",
id: "o1",
- number: 11,
+ number: "11",
paymentStatus: "confirmed",
- price: {
- amount: 19.2,
- currency: "USD"
+ status: "fulfilled",
+ total: {
+ gross: {
+ amount: 19.2,
+ currency: "USD"
+ }
},
- status: "fulfilled"
+ userEmail: "[email protected]"
},
{
client: clients[0],
created: "2018-04-07T11:11:19+00:00",
id: "o2",
- number: 10,
+ number: "10",
paymentStatus: "confirmed",
- price: {
- amount: 28.9,
- currency: "USD"
+ status: "unfulfilled",
+ total: {
+ gross: {
+ amount: 28.9,
+ currency: "USD"
+ }
},
- status: "unfulfilled"
+ userEmail: "[email protected]"
},
{
client: clients[1],
created: "2018-04-07T10:44:44+00:00",
id: "o3",
- number: 9,
+ number: "9",
paymentStatus: "rejected",
- price: {
- amount: 289.0,
- currency: "USD"
+ status: "fulfilled",
+ total: {
+ gross: {
+ amount: 289.0,
+ currency: "USD"
+ }
},
- status: "fulfilled"
+ userEmail: "[email protected]"
},
{
client: clients[2],
created: "2018-04-07T10:33:19+00:00",
id: "o4",
- number: 9,
+ number: "9",
paymentStatus: "unknown",
- price: {
- amount: 100.05,
- currency: "USD"
+ status: "fulfilled",
+ total: {
+ gross: {
+ amount: 100.05,
+ currency: "USD"
+ }
},
- status: "fulfilled"
+ userEmail: "[email protected]"
},
{
client: clients[3],
created: "2018-04-07T07:39:19+00:00",
id: "o5",
- number: 9,
+ number: "9",
paymentStatus: "waiting",
- price: {
- amount: 14.87,
- currency: "USD"
+ status: "fulfilled",
+ total: {
+ gross: {
+ amount: 14.87,
+ currency: "USD"
+ }
},
- status: "fulfilled"
+ userEmail: "[email protected]"
},
{
client: clients[3],
created: "2018-04-06T19:18:19+00:00",
id: "o6",
- number: 8,
+ number: "8",
paymentStatus: "rejected",
- price: {
- amount: 14.87,
- currency: "USD"
+ status: "unfulfilled",
+ total: {
+ gross: {
+ amount: 14.87,
+ currency: "USD"
+ }
},
- status: "unfulfilled"
+ userEmail: "[email protected]"
}
];
export const order = (placeholder, args?) => ({
@@ -117,38 +135,30 @@ export const order = (placeholder, args?) => ({
created: "2018-04-07T11:18:19+00:00",
events: [
{
- content: "Created order",
- date: "2018-04-07T11:18:19+00:00",
- id: "n1",
- type: "created",
- },
- {
- content: "Received payment",
- date: "2018-04-07T11:33:19+00:00",
- id: "n2",
- params: { amount: 165.7, currency: "USD" },
- type: "payment",
- },
- {
- content: "Shipped order",
- date: "2018-04-07T13:31:19+00:00",
- id: "n3",
- params: {
- shippingAddress:
- "Test Client<br />9297 Barker Extension<br />95393-6818 Keithport<br />Cyprus"
- },
- type: "shipped",
+ amount: null,
+ date: "2018-09-13T16:22:46.997106+00:00",
+ email: null,
+ emailType: null,
+ id: "T3JkZXJFdmVudDoxMw==",
+ message: null,
+ quantity: 3,
+ type: "FULFILLMENT_FULFILLED_ITEMS",
+ user: {
+ }
},
{
- content:
- "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur arcu nisi, dignissim non placerat id, varius imperdiet nisi. Duis lobortis, massa sed feugiat ultricies, massa felis commodo dui, tempor tempus tellus ligula id arcu. Nam erat dui, fermentum sed dui a, tincidunt molestie magna.",
- date: "2018-04-08T11:18:19+00:00",
- id: "n4",
- type: "note",
+ amount: null,
+ date: "2018-09-13T16:39:54.172431+00:00",
+ email: null,
+ emailType: null,
+ id: "T3JkZXJFdmVudDoxNA==",
+ message: null,
+ quantity: null,
+ type: "FULFILLMENT_FULFILLED_ITEMS",
+ user: {
+ }
}
],
fulfillments: [
@@ -195,58 +205,62 @@ export const order = (placeholder, args?) => ({
lines: [
{
id: "UHJvZHVjdDox",
- name: "Gardner, Graham and King",
price: {
gross: {
amount: 12.4,
currency: "USD"
}
},
+ productName: "Gardner, Graham and King",
+ productSku: "9123021",
quantity: 1,
- sku: "9123021",
+ quantityFulfilled: 0,
thumbnailUrl: placeholder
},
{
id: "UHJvZHVjdDoy",
- name: "Gardner and Graham",
price: {
gross: {
amount: 11.6,
currency: "USD"
}
},
+ productName: "Gardner and Graham",
+ productSku: "9123022",
quantity: 2,
- sku: "9123022",
+ quantityFulfilled: 1,
thumbnailUrl: placeholder
},
{
id: "UHJvZHVjdDoz",
- name: "Gardner and King",
price: {
gross: {
amount: 22.4,
currency: "USD"
}
},
+ productName: "Gardner and King",
+ productSku: "9123023",
quantity: 7,
- sku: "9123023",
+ quantityFulfilled: 5,
thumbnailUrl: placeholder
},
{
id: "UHJvZHVjdDoa",
- name: "Graham and King",
price: {
gross: {
amount: 9.9,
currency: "USD"
}
},
+ productName: "Graham and King",
+ productSku: "9123024",
quantity: 3,
- sku: "9123024",
+ quantityFulfilled: 0,
thumbnailUrl: placeholder
}
],
- number: 11,
+ number: "11",
payment: {
net: {
amount: 6,
@@ -310,13 +324,13 @@ export const flatOrders = orders.map(order => ({
paymentStatus: transformPaymentStatus(order.paymentStatus)
}));
export const variants = [
- { id: "p1", name: "Product 1: variant 1", sku: "12345", stockAllocated: 3 },
- { id: "p2", name: "Product 1: variant 2", sku: "12346", stockAllocated: 1 },
- { id: "p3", name: "Product 2: variant 1", sku: "12355", stockAllocated: 10 },
- { id: "p4", name: "Product 3: variant 1", sku: "12445", stockAllocated: 12 },
- { id: "p5", name: "Product 3: variant 2", sku: "12545", stockAllocated: 7 },
- { id: "p6", name: "Product 5: variant 1", sku: "13345", stockAllocated: 3 },
- { id: "p7", name: "Product 5: variant 2", sku: "14345", stockAllocated: 11 }
+ { id: "p1", name: "Product 1: variant 1", sku: "12345", stockQuantity: 3 },
+ { id: "p2", name: "Product 1: variant 2", sku: "12346", stockQuantity: 1 },
+ { id: "p3", name: "Product 2: variant 1", sku: "12355", stockQuantity: 10 },
+ { id: "p4", name: "Product 3: variant 1", sku: "12445", stockQuantity: 12 },
+ { id: "p5", name: "Product 3: variant 2", sku: "12545", stockQuantity: 7 },
+ { id: "p6", name: "Product 5: variant 1", sku: "13345", stockQuantity: 3 },
+ { id: "p7", name: "Product 5: variant 2", sku: "14345", stockQuantity: 11 }
];
export const prefixes = ["01", "02", "41", "49"];
export const countries = [
diff --git a/saleor/static/dashboard-next/storybook/stories/components/AddressEdit.tsx b/saleor/static/dashboard-next/storybook/stories/components/AddressEdit.tsx
index 83c85b3916..7f8f559b95 100644
--- a/saleor/static/dashboard-next/storybook/stories/components/AddressEdit.tsx
+++ b/saleor/static/dashboard-next/storybook/stories/components/AddressEdit.tsx
@@ -4,7 +4,7 @@ import * as React from "react";
import AddressEdit from "../../../components/AddressEdit";
import { Container } from "../../../components/Container";
import { customer } from "../../../customers/fixtures";
-import { countries, prefixes } from "../../../orders/fixtures";
+import { countries } from "../../../orders/fixtures";
import Decorator from "../../Decorator";
storiesOf("Generics / AddressEdit", module)
@@ -13,7 +13,6 @@ storiesOf("Generics / AddressEdit", module)
<Container width="sm">
<AddressEdit
data={customer.defaultBillingAddress}
- prefixes={prefixes}
countries={countries}
onChange={undefined}
/>
diff --git a/saleor/static/dashboard-next/storybook/stories/components/Timeline.tsx b/saleor/static/dashboard-next/storybook/stories/components/Timeline.tsx
index dbe60eda77..097801a934 100644
--- a/saleor/static/dashboard-next/storybook/stories/components/Timeline.tsx
+++ b/saleor/static/dashboard-next/storybook/stories/components/Timeline.tsx
@@ -12,14 +12,29 @@ storiesOf("Generics / Timeline", module)
.add("default", () => (
<Timeline>
<TimelineNode
+ amount={null}
+ email={null}
+ emailType={null}
+ quantity={null}
+ type={null}
date="2018-05-07T16:58:02+00:00"
title="Expansion panel 1"
/>
<TimelineNode
+ amount={null}
+ email={null}
+ emailType={null}
+ quantity={null}
+ type={null}
date="2018-05-07T16:48:02+00:00"
title="Expansion panel 2"
/>
<TimelineNode
+ amount={null}
+ email={null}
+ emailType={null}
+ quantity={null}
+ type={null}
date="2018-05-06T16:58:02+00:00"
title="Expansion panel 3"
/>
@@ -27,15 +42,39 @@ storiesOf("Generics / Timeline", module)
))
.add("with expansion panels", () => (
<Timeline>
- <TimelineNode date="2018-05-07T16:58:02+00:00" title="Expansion panel 1">
+ <TimelineNode
+ amount={null}
+ email={null}
+ emailType={null}
+ quantity={null}
+ type={null}
+ date="2018-05-07T16:58:02+00:00"
+ title="Expansion panel 1"
+ >
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse
malesuada lacus ex, sit amet blandit leo lobortis eget.
</TimelineNode>
- <TimelineNode date="2018-05-07T16:48:02+00:00" title="Expansion panel 2">
+ <TimelineNode
+ amount={null}
+ email={null}
+ emailType={null}
+ quantity={null}
+ type={null}
+ date="2018-05-07T16:48:02+00:00"
+ title="Expansion panel 2"
+ >
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse
malesuada lacus ex, sit amet blandit leo lobortis eget.
</TimelineNode>
- <TimelineNode date="2018-05-06T16:58:02+00:00" title="Expansion panel 3">
+ <TimelineNode
+ amount={null}
+ email={null}
+ emailType={null}
+ quantity={null}
+ type={null}
+ date="2018-05-06T16:58:02+00:00"
+ title="Expansion panel 3"
+ >
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse
malesuada lacus ex, sit amet blandit leo lobortis eget.
</TimelineNode>
@@ -43,23 +82,39 @@ storiesOf("Generics / Timeline", module)
))
.add("with order notes", () => (
<Timeline>
- <TimelineNode date="2018-05-07T16:58:02+00:00" title="Expansion panel 1">
+ <TimelineNode
+ amount={null}
+ email={null}
+ emailType={null}
+ quantity={null}
+ type={null}
+ date="2018-05-07T16:58:02+00:00"
+ title="Expansion panel 1"
+ >
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse
malesuada lacus ex, sit amet blandit leo lobortis eget.
</TimelineNode>
<TimelineNote
date="2018-05-07T16:58:02+00:00"
- content="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse
+ user={{ email: "[email protected]" }}
+ message="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse
malesuada lacus ex, sit amet blandit leo lobortis eget."
/>
<TimelineNote
date="2018-05-07T16:58:02+00:00"
- content="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse
+ user={{ email: "[email protected]" }}
+ message="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse
malesuada lacus ex, sit amet blandit leo lobortis eget."
/>
- <TimelineNode date="2018-05-06T16:58:02+00:00" title="Expansion panel 3">
+ <TimelineNode
+ amount={null}
+ email={null}
+ emailType={null}
+ quantity={null}
+ type={null}
+ date="2018-05-06T16:58:02+00:00"
+ title="Expansion panel 3"
+ >
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse
malesuada lacus ex, sit amet blandit leo lobortis eget.
</TimelineNode>
diff --git a/saleor/static/dashboard-next/storybook/stories/orders/OrderAddressEditDialog.tsx b/saleor/static/dashboard-next/storybook/stories/orders/OrderAddressEditDialog.tsx
index 9a3080de98..fbcc039aea 100644
--- a/saleor/static/dashboard-next/storybook/stories/orders/OrderAddressEditDialog.tsx
+++ b/saleor/static/dashboard-next/storybook/stories/orders/OrderAddressEditDialog.tsx
@@ -3,11 +3,7 @@ import * as React from "react";
import { transformAddressToForm } from "../../../orders";
import OrderAddressEditDialog from "../../../orders/components/OrderAddressEditDialog";
-import {
- countries,
- order as orderFixture,
- prefixes
-} from "../../../orders/fixtures";
+import { countries, order as orderFixture } from "../../../orders/fixtures";
import Decorator from "../../Decorator";
const order = orderFixture("");
@@ -21,7 +17,6 @@ storiesOf("Orders / OrderAddressEditDialog", module)
data={transformAddressToForm(order.shippingAddress)}
onChange={undefined}
countries={countries}
- prefixes={prefixes}
/>
))
.add("billing address", () => (
@@ -30,7 +25,6 @@ storiesOf("Orders / OrderAddressEditDialog", module)
variant="billing"
data={transformAddressToForm(order.billingAddress)}
onChange={undefined}
- prefixes={prefixes}
countries={countries}
/>
));
diff --git a/saleor/static/dashboard-next/storybook/stories/orders/OrderCancelDialog.tsx b/saleor/static/dashboard-next/storybook/stories/orders/OrderCancelDialog.tsx
index 817c2b81d4..4c8294c595 100644
--- a/saleor/static/dashboard-next/storybook/stories/orders/OrderCancelDialog.tsx
+++ b/saleor/static/dashboard-next/storybook/stories/orders/OrderCancelDialog.tsx
@@ -9,7 +9,7 @@ storiesOf("Orders / OrderCancelDialog", module)
.add("default", () => (
<OrderCancelDialog
open={true}
- id="123"
+ number="123"
onConfirm={undefined}
onClose={undefined}
/>
diff --git a/saleor/static/dashboard-next/storybook/stories/orders/OrderDetailsPage.tsx b/saleor/static/dashboard-next/storybook/stories/orders/OrderDetailsPage.tsx
index 8b36c4063e..6314eb79c3 100644
--- a/saleor/static/dashboard-next/storybook/stories/orders/OrderDetailsPage.tsx
+++ b/saleor/static/dashboard-next/storybook/stories/orders/OrderDetailsPage.tsx
@@ -2,16 +2,16 @@ import { storiesOf } from "@storybook/react";
import * as React from "react";
import * as placeholderImage from "../../../../images/placeholder60x60.png";
-import { OrderStatus, PaymentStatus } from "../../../orders";
+import { PaymentStatus } from "../../../orders";
import OrderDetailsPage from "../../../orders/components/OrderDetailsPage";
import {
clients,
countries,
order as orderFixture,
- prefixes,
shippingMethods,
variants
} from "../../../orders/fixtures";
+import { OrderStatus } from "../../../types/globalTypes";
import Decorator from "../../Decorator";
const order = orderFixture(placeholderImage);
@@ -27,23 +27,26 @@ const callbacks = {
onCreate: undefined,
onCustomerEmailClick: () => undefined,
onOrderCancel: undefined,
+ onOrderFulfill: undefined,
onOrderLineChange: () => () => () => undefined,
onOrderLineRemove: () => () => undefined,
onPackingSlipClick: () => undefined,
+ onPaymentCapture: undefined,
+ onPaymentRefund: undefined,
onPaymentRelease: undefined,
onPrintClick: undefined,
+ onProductAdd: undefined,
onProductClick: undefined
};
storiesOf("Views / Orders / Order details", module)
.addDecorator(Decorator)
- .add("when loading data", () => <OrderDetailsPage onBack={() => undefined} />)
+ .add("when loading data", () => <OrderDetailsPage {...callbacks} />)
.add("when loaded data", () => (
<OrderDetailsPage
countries={countries}
order={order}
- prefixes={prefixes}
+ user={{ email: "[email protected]" }}
{...callbacks}
/>
))
@@ -51,9 +54,8 @@ storiesOf("Views / Orders / Order details", module)
<OrderDetailsPage
countries={countries}
order={orderDraft}
- prefixes={prefixes}
shippingMethods={shippingMethods}
+ user={{ email: "[email protected]" }}
users={clients}
variants={variants}
variantsLoading={false}
@@ -67,9 +69,8 @@ storiesOf("Views / Orders / Order details", module)
<OrderDetailsPage
countries={countries}
order={orderWithoutPayment}
- prefixes={prefixes}
shippingMethods={shippingMethods}
+ user={{ email: "[email protected]" }}
users={clients}
variants={variants}
variantsLoading={false}
diff --git a/saleor/static/dashboard-next/storybook/stories/orders/OrderFulfillmentDialog.tsx b/saleor/static/dashboard-next/storybook/stories/orders/OrderFulfillmentDialog.tsx
index a4e1f10c62..aa6e0c29a9 100644
--- a/saleor/static/dashboard-next/storybook/stories/orders/OrderFulfillmentDialog.tsx
+++ b/saleor/static/dashboard-next/storybook/stories/orders/OrderFulfillmentDialog.tsx
@@ -13,8 +13,8 @@ storiesOf("Orders / OrderFulfillmentDialog", module)
.add("default", () => (
<OrderFulfillmentDialog
open={true}
- products={order.products}
- onChange={undefined}
- data={{}}
+ lines={order.lines}
+ onClose={undefined}
+ onSubmit={undefined}
/>
));
diff --git a/saleor/static/dashboard-next/storybook/stories/orders/OrderHistory.tsx b/saleor/static/dashboard-next/storybook/stories/orders/OrderHistory.tsx
index 9dd140a60c..6a39cd7e1d 100644
--- a/saleor/static/dashboard-next/storybook/stories/orders/OrderHistory.tsx
+++ b/saleor/static/dashboard-next/storybook/stories/orders/OrderHistory.tsx
@@ -10,5 +10,8 @@ const order = orderFixture("");
storiesOf("Orders / OrderHistory", module)
.addDecorator(Decorator)
.add("default", () => (
- <OrderHistory user="[email protected]" history={order.events} />
+ <OrderHistory
+ user={{ email: "[email protected]" }}
+ history={order.events}
+ />
));
diff --git a/saleor/static/dashboard-next/storybook/stories/orders/OrderPaymentDialog.tsx b/saleor/static/dashboard-next/storybook/stories/orders/OrderPaymentDialog.tsx
index fe333cf2db..af281f05a6 100644
--- a/saleor/static/dashboard-next/storybook/stories/orders/OrderPaymentDialog.tsx
+++ b/saleor/static/dashboard-next/storybook/stories/orders/OrderPaymentDialog.tsx
@@ -10,15 +10,15 @@ storiesOf("Orders / OrderPaymentDialog", module)
<OrderPaymentDialog
variant="capture"
open={true}
- onChange={undefined}
- value={120}
+ onClose={undefined}
+ onSubmit={undefined}
/>
))
.add("refund payment", () => (
<OrderPaymentDialog
variant="refund"
open={true}
- onChange={undefined}
- value={140}
+ onClose={undefined}
+ onSubmit={undefined}
/>
));
diff --git a/saleor/static/dashboard-next/storybook/stories/orders/OrderProductAddDialog.tsx b/saleor/static/dashboard-next/storybook/stories/orders/OrderProductAddDialog.tsx
index b349061380..d75c6c68b6 100644
--- a/saleor/static/dashboard-next/storybook/stories/orders/OrderProductAddDialog.tsx
+++ b/saleor/static/dashboard-next/storybook/stories/orders/OrderProductAddDialog.tsx
@@ -1,7 +1,6 @@
import { storiesOf } from "@storybook/react";
import * as React from "react";
-import Form from "../../../components/Form";
import OrderProductAddDialog from "../../../orders/components/OrderProductAddDialog";
import { variants } from "../../../orders/fixtures";
import Decorator from "../../Decorator";
@@ -9,18 +8,12 @@ import Decorator from "../../Decorator";
storiesOf("Orders / OrderProductAddDialog", module)
.addDecorator(Decorator)
.add("default", () => (
- <Form initial={{ quantity: 0, variant: { label: "", value: "" } }}>
- {({ change, data }) => (
- <OrderProductAddDialog
- open={true}
- onChange={change}
- onConfirm={undefined}
- onClose={undefined}
- variants={variants}
- fetchVariants={undefined}
- quantity={data.quantity}
- variant={data.variant}
- />
- )}
- </Form>
+ <OrderProductAddDialog
+ loading={false}
+ open={true}
+ onClose={undefined}
+ variants={variants}
+ fetchVariants={undefined}
+ onSubmit={undefined}
+ />
));
diff --git a/saleor/static/dashboard-next/storybook/stories/orders/OrderSummary.tsx b/saleor/static/dashboard-next/storybook/stories/orders/OrderSummary.tsx
index 87b012d2ab..b9f36f229e 100644
--- a/saleor/static/dashboard-next/storybook/stories/orders/OrderSummary.tsx
+++ b/saleor/static/dashboard-next/storybook/stories/orders/OrderSummary.tsx
@@ -4,6 +4,7 @@ import * as React from "react";
import * as placeholderImage from "../../../../images/placeholder60x60.png";
import OrderSummary from "../../../orders/components/OrderSummary";
import { order as orderFixture } from "../../../orders/fixtures";
+import { OrderStatus } from "../../../types/globalTypes";
import Decorator from "../../Decorator";
const order = orderFixture(placeholderImage);
@@ -19,17 +20,24 @@ const callbacks = {
onRowClick: () => undefined
};
+const shippingPrice = {
+ gross: {
+ amount: 9123.12,
+ currency: "USD"
+ }
+};
+
storiesOf("Orders / OrderSummary", module)
.addDecorator(Decorator)
- .add("when loading data", () => <OrderSummary />)
+ .add("when loading data", () => <OrderSummary {...callbacks} />)
.add("order unfulfilled", () => (
<OrderSummary
- net={order.payment.net}
paid={order.payment.paid}
paymentStatus={order.paymentStatus}
lines={order.products}
- refunded={order.payment.refunded}
- status={"unfulfilled"}
+ shippingMethodName="DHL"
+ shippingPrice={shippingPrice}
+ status={OrderStatus.UNFULFILLED}
subtotal={order.subtotal}
total={order.total}
{...callbacks}
@@ -37,12 +45,12 @@ storiesOf("Orders / OrderSummary", module)
))
.add("order partially fulfilled", () => (
<OrderSummary
- net={order.payment.net}
paid={order.payment.paid}
paymentStatus={order.paymentStatus}
- products={order.products}
- refunded={order.payment.refunded}
- status={"partially fulfilled"}
+ lines={order.products}
+ shippingMethodName="DHL"
+ shippingPrice={shippingPrice}
+ status={OrderStatus.PARTIALLY_FULFILLED}
subtotal={order.subtotal}
total={order.total}
{...callbacks}
@@ -50,12 +58,12 @@ storiesOf("Orders / OrderSummary", module)
))
.add("order fulfilled", () => (
<OrderSummary
- net={order.payment.net}
paid={order.payment.paid}
paymentStatus={order.paymentStatus}
- products={order.products}
- refunded={order.payment.refunded}
- status={"fulfilled"}
+ lines={order.products}
+ shippingMethodName="DHL"
+ shippingPrice={shippingPrice}
+ status={OrderStatus.FULFILLED}
subtotal={order.subtotal}
total={order.total}
{...callbacks}
@@ -63,12 +71,12 @@ storiesOf("Orders / OrderSummary", module)
))
.add("order cancelled", () => (
<OrderSummary
- net={order.payment.net}
paid={order.payment.paid}
paymentStatus={order.paymentStatus}
- products={order.products}
- refunded={order.payment.refunded}
- status={"cancelled"}
+ lines={order.products}
+ shippingMethodName="DHL"
+ shippingPrice={shippingPrice}
+ status={OrderStatus.CANCELED}
subtotal={order.subtotal}
total={order.total}
{...callbacks}
@@ -76,12 +84,12 @@ storiesOf("Orders / OrderSummary", module)
))
.add("order draft", () => (
<OrderSummary
- net={order.payment.net}
paid={order.payment.paid}
paymentStatus={order.paymentStatus}
- products={order.products}
- refunded={order.payment.refunded}
- status={"draft"}
+ lines={order.products}
+ shippingMethodName="DHL"
+ shippingPrice={shippingPrice}
+ status={OrderStatus.DRAFT}
subtotal={order.subtotal}
total={order.total}
{...callbacks}
@@ -89,11 +97,11 @@ storiesOf("Orders / OrderSummary", module)
))
.add("payment confirmed", () => (
<OrderSummary
- net={order.payment.net}
paid={order.payment.paid}
paymentStatus="confirmed"
- products={order.products}
- refunded={order.payment.refunded}
+ lines={order.products}
+ shippingMethodName="DHL"
+ shippingPrice={shippingPrice}
status={order.status}
subtotal={order.subtotal}
total={order.total}
@@ -102,11 +110,11 @@ storiesOf("Orders / OrderSummary", module)
))
.add("payment error", () => (
<OrderSummary
- net={order.payment.net}
paid={order.payment.paid}
paymentStatus="error"
- products={order.products}
- refunded={order.payment.refunded}
+ lines={order.products}
+ shippingMethodName="DHL"
+ shippingPrice={shippingPrice}
status={order.status}
subtotal={order.subtotal}
total={order.total}
@@ -115,11 +123,11 @@ storiesOf("Orders / OrderSummary", module)
))
.add("payment input", () => (
<OrderSummary
- net={order.payment.net}
paid={order.payment.paid}
paymentStatus="input"
- products={order.products}
- refunded={order.payment.refunded}
+ lines={order.products}
+ shippingMethodName="DHL"
+ shippingPrice={shippingPrice}
status={order.status}
subtotal={order.subtotal}
total={order.total}
@@ -128,11 +136,11 @@ storiesOf("Orders / OrderSummary", module)
))
.add("payment preauth", () => (
<OrderSummary
- net={order.payment.net}
paid={order.payment.paid}
paymentStatus="preauth"
- products={order.products}
- refunded={order.payment.refunded}
+ lines={order.products}
+ shippingMethodName="DHL"
+ shippingPrice={shippingPrice}
status={order.status}
subtotal={order.subtotal}
total={order.total}
@@ -141,11 +149,11 @@ storiesOf("Orders / OrderSummary", module)
))
.add("payment refunded", () => (
<OrderSummary
- net={order.payment.net}
paid={order.payment.paid}
paymentStatus="refunded"
- products={order.products}
- refunded={order.payment.refunded}
+ lines={order.products}
+ shippingMethodName="DHL"
+ shippingPrice={shippingPrice}
status={order.status}
subtotal={order.subtotal}
total={order.total}
@@ -154,11 +162,11 @@ storiesOf("Orders / OrderSummary", module)
))
.add("payment rejected", () => (
<OrderSummary
- net={order.payment.net}
paid={order.payment.paid}
paymentStatus="rejected"
- products={order.products}
- refunded={order.payment.refunded}
+ lines={order.products}
+ shippingMethodName="DHL"
+ shippingPrice={shippingPrice}
status={order.status}
subtotal={order.subtotal}
total={order.total}
@@ -167,11 +175,11 @@ storiesOf("Orders / OrderSummary", module)
))
.add("payment waiting", () => (
<OrderSummary
- net={order.payment.net}
paid={order.payment.paid}
paymentStatus="waiting"
- products={order.products}
- refunded={order.payment.refunded}
+ lines={order.products}
+ shippingMethodName="DHL"
+ shippingPrice={shippingPrice}
status={order.status}
subtotal={order.subtotal}
total={order.total}