feature/IO-3103-Ant5-Notifications
This commit is contained in:
@@ -3,11 +3,13 @@ import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { GenerateDocument } from "../../utils/RenderTemplate";
|
||||
import { TemplateList } from "../../utils/TemplateConstants";
|
||||
import { useNotification } from "../../contexts/Notifications/notificationContext.jsx";
|
||||
|
||||
export default function BillPrintButton({ billid }) {
|
||||
const { t } = useTranslation();
|
||||
const [loading, setLoading] = useState(false);
|
||||
const Templates = TemplateList("job_special");
|
||||
const notification = useNotification();
|
||||
|
||||
const submitHandler = async () => {
|
||||
setLoading(true);
|
||||
@@ -20,7 +22,9 @@ export default function BillPrintButton({ billid }) {
|
||||
}
|
||||
},
|
||||
{},
|
||||
"p"
|
||||
"p",
|
||||
null,
|
||||
notification
|
||||
);
|
||||
} catch (e) {
|
||||
console.warn("Warning: Error generating a document.");
|
||||
|
||||
Reference in New Issue
Block a user