Added payment reprint and print wrapper component IO-543

This commit is contained in:
Patrick Fic
2021-01-28 16:43:26 -08:00
parent 5cae88d05f
commit 99348c6400
4 changed files with 55 additions and 33 deletions

View File

@@ -0,0 +1,22 @@
import { MailFilled, PrinterFilled } from "@ant-design/icons";
import { Space } from "antd";
import React from "react";
import { GenerateDocument } from "../../utils/RenderTemplate";
export default function PrintWrapperComponent({
templateObject,
messageObject = {},
children,
}) {
return (
<Space>
{children || null}
<PrinterFilled
onClick={() => GenerateDocument(templateObject, {}, "p")}
/>
<MailFilled
onClick={() => GenerateDocument(templateObject, messageObject, "e")}
/>
</Space>
);
}