Resolved bulk printing & status for printing items. IO-690
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { MailOutlined, PrinterOutlined } from "@ant-design/icons";
|
||||
import React from "react";
|
||||
import { Spin } from "antd";
|
||||
import React, { useState } from "react";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { setEmailOptions } from "../../redux/email/email.actions";
|
||||
@@ -22,8 +23,10 @@ export function PrintCenterItemComponent({
|
||||
bodyshop,
|
||||
disabled,
|
||||
}) {
|
||||
const [loading, setLoading] = useState(false);
|
||||
const { context } = printCenterModal;
|
||||
const renderToNewWindow = async () => {
|
||||
setLoading(true);
|
||||
await GenerateDocument(
|
||||
{
|
||||
name: item.key,
|
||||
@@ -32,6 +35,7 @@ export function PrintCenterItemComponent({
|
||||
{},
|
||||
"p"
|
||||
);
|
||||
setLoading(false);
|
||||
};
|
||||
|
||||
if (disabled) return <li className="print-center-item">{item.title} </li>;
|
||||
@@ -51,6 +55,7 @@ export function PrintCenterItemComponent({
|
||||
);
|
||||
}}
|
||||
/>
|
||||
{loading && <Spin size="small" />}
|
||||
</li>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user