feature/IO-3103-Ant5-Notifications
This commit is contained in:
@@ -9,6 +9,7 @@ import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import { GenerateDocuments } from "../../utils/RenderTemplate";
|
||||
import { TemplateList } from "../../utils/TemplateConstants";
|
||||
import { useNotification } from "../../contexts/Notifications/notificationContext.jsx";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop //currentUser: selectCurrentUser
|
||||
@@ -21,6 +22,7 @@ export function PrintCenterSpeedPrint({ bodyshop, jobId }) {
|
||||
const [loading, setLoading] = useState(false);
|
||||
const { speedprint } = bodyshop;
|
||||
const { t } = useTranslation();
|
||||
const notification = useNotification();
|
||||
|
||||
const renderAllTemplates = async (templateKeys) => {
|
||||
logImEXEvent("speed_print_render_all_templates");
|
||||
@@ -28,7 +30,8 @@ export function PrintCenterSpeedPrint({ bodyshop, jobId }) {
|
||||
await GenerateDocuments(
|
||||
templateKeys.map((key) => {
|
||||
return { name: key, variables: { id: jobId } };
|
||||
})
|
||||
}),
|
||||
notification
|
||||
);
|
||||
setLoading(false);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user