import placeholderImage from "@assets/images/placeholder60x60.png"; import { Omit } from "@material-ui/core"; import { adminUserPermissions } from "@saleor/fixtures"; import { storiesOf } from "@storybook/react"; import React from "react"; import OrderDetailsPage, { OrderDetailsPageProps, } from "../../../orders/components/OrderDetailsPage"; import { countries, order as orderFixture } from "../../../orders/fixtures"; import { FulfillmentStatus, OrderStatus, PaymentChargeStatusEnum, } from "../../../types/globalTypes"; import Decorator from "../../Decorator"; const order = orderFixture(placeholderImage); const props: Omit = { countries, onBack: () => undefined, onBillingAddressEdit: undefined, onClickInvoice: () => undefined, onFulfillmentCancel: () => undefined, onFulfillmentTrackingNumberUpdate: () => undefined, onInvoiceClick: () => undefined, onInvoiceGenerate: () => undefined, onInvoiceSend: () => undefined, onNoteAdd: undefined, onOrderCancel: undefined, onOrderFulfill: undefined, onPaymentCapture: undefined, onPaymentPaid: undefined, onPaymentRefund: undefined, onPaymentVoid: undefined, onProductClick: undefined, onProfileView: () => undefined, onShippingAddressEdit: undefined, order, userPermissions: adminUserPermissions, }; storiesOf("Views / Orders / Order details", module) .addDecorator(Decorator) .add("default", () => ) .add("loading", () => ) .add("pending payment", () => ( )) .add("payment error", () => ( )) .add("payment confirmed", () => ( )) .add("no payment", () => ( )) .add("refunded payment", () => ( )) .add("rejected payment", () => ( )) .add("cancelled", () => ( ({ ...fulfillment, status: FulfillmentStatus.CANCELED, })), status: OrderStatus.CANCELED, }} /> )) .add("fulfilled", () => ( )) .add("partially fulfilled", () => ( )) .add("unfulfilled", () => ( )) .add("no shipping address", () => ( )) .add("no customer note", () => ( ));