fix(manual print): fixed so the print disables
This commit is contained in:
@@ -18,6 +18,7 @@ export default function ManualPrint({ lot }: { lot: LotType }) {
|
||||
//const serverUrl = `http://${server}:${serverPort}`;
|
||||
|
||||
const handlePrintLabel = async (lot: LotType) => {
|
||||
setPrinting(true);
|
||||
const labels: any = await manualPrintLabels(lot, session?.user);
|
||||
|
||||
if (labels.success) {
|
||||
@@ -25,7 +26,6 @@ export default function ManualPrint({ lot }: { lot: LotType }) {
|
||||
setTimeout(() => {
|
||||
setPrinting(false);
|
||||
}, 5 * 1000);
|
||||
setPrinting(true);
|
||||
} else {
|
||||
toast.error(labels.message);
|
||||
setTimeout(() => {
|
||||
|
||||
Reference in New Issue
Block a user