2019-06-19 14:40:52 +00:00
|
|
|
import DialogContentText from "@material-ui/core/DialogContentText";
|
2019-08-09 10:26:22 +00:00
|
|
|
import React from "react";
|
2019-08-26 17:44:42 +00:00
|
|
|
import { FormattedMessage, useIntl } from "react-intl";
|
2019-06-19 14:40:52 +00:00
|
|
|
|
|
|
|
import ActionDialog from "@saleor/components/ActionDialog";
|
|
|
|
import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton";
|
|
|
|
|
|
|
|
export interface OrderMarkAsPaidDialogProps {
|
|
|
|
confirmButtonState: ConfirmButtonTransitionState;
|
|
|
|
open: boolean;
|
|
|
|
onClose: () => void;
|
|
|
|
onConfirm: () => void;
|
|
|
|
}
|
|
|
|
|
|
|
|
const OrderMarkAsPaidDialog: React.StatelessComponent<
|
|
|
|
OrderMarkAsPaidDialogProps
|
2019-08-26 17:44:42 +00:00
|
|
|
> = ({ confirmButtonState, onClose, onConfirm, open }) => {
|
|
|
|
const intl = useIntl();
|
|
|
|
|
|
|
|
return (
|
|
|
|
<ActionDialog
|
|
|
|
confirmButtonState={confirmButtonState}
|
|
|
|
open={open}
|
|
|
|
title={intl.formatMessage({
|
|
|
|
defaultMessage: "Mark Order as Paid",
|
|
|
|
description: "dialog header"
|
2019-06-19 14:40:52 +00:00
|
|
|
})}
|
2019-08-26 17:44:42 +00:00
|
|
|
onClose={onClose}
|
|
|
|
onConfirm={onConfirm}
|
|
|
|
>
|
|
|
|
<DialogContentText>
|
|
|
|
<FormattedMessage defaultMessage="Are you sure you want to mark this order as paid?" />
|
|
|
|
</DialogContentText>
|
|
|
|
</ActionDialog>
|
|
|
|
);
|
|
|
|
};
|
2019-06-19 14:40:52 +00:00
|
|
|
OrderMarkAsPaidDialog.displayName = "OrderMarkAsPaidDialog";
|
|
|
|
export default OrderMarkAsPaidDialog;
|