From f5dffd5512bc515bde69725c8b62725045955220 Mon Sep 17 00:00:00 2001 From: Tom Butcher Date: Mon, 20 Jul 2026 02:09:20 +0100 Subject: [PATCH] Update NewPrinter component to pass the result object to onOk callback upon successful submission, enhancing the handling of printer creation. --- src/components/Dashboard/Production/Printers/NewPrinter.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Dashboard/Production/Printers/NewPrinter.jsx b/src/components/Dashboard/Production/Printers/NewPrinter.jsx index b0c450e..d2f9ed9 100644 --- a/src/components/Dashboard/Production/Printers/NewPrinter.jsx +++ b/src/components/Dashboard/Production/Printers/NewPrinter.jsx @@ -96,8 +96,8 @@ const NewPrinter = ({ onOk, defaultValues }) => { title='New Printer' onSubmit={async () => { const result = await handleSubmit() - if (result) { - onOk() + if (result?._id) { + onOk(result) } }} />