feature/IO-3103-Ant5-Notifications

This commit is contained in:
Dave Richer
2025-01-21 17:20:46 -08:00
parent 0e218abbf4
commit 85d25862eb
161 changed files with 759 additions and 354 deletions

View File

@@ -2,6 +2,7 @@ import { MailFilled, PrinterFilled } from "@ant-design/icons";
import { Space, Spin } from "antd";
import React, { useState } from "react";
import { GenerateDocument } from "../../utils/RenderTemplate";
import { useNotification } from "../../contexts/Notifications/notificationContext.jsx";
export default function PrintWrapperComponent({
templateObject,
@@ -12,10 +13,12 @@ export default function PrintWrapperComponent({
disabled
}) {
const [loading, setLoading] = useState(false);
const notification = useNotification();
const handlePrint = async (type) => {
if (disabled) return;
setLoading(true);
await GenerateDocument(templateObject, messageObject, type, id);
await GenerateDocument(templateObject, messageObject, type, id, notification);
setLoading(false);
};