diff --git a/src/components/Dashboard/Inventory/FilamentStocks/NewFilamentStock.jsx b/src/components/Dashboard/Inventory/FilamentStocks/NewFilamentStock.jsx index 3524160..60484b5 100644 --- a/src/components/Dashboard/Inventory/FilamentStocks/NewFilamentStock.jsx +++ b/src/components/Dashboard/Inventory/FilamentStocks/NewFilamentStock.jsx @@ -3,12 +3,12 @@ import ObjectInfo from '../../common/ObjectInfo' import NewObjectForm from '../../common/NewObjectForm' import WizardView from '../../common/WizardView' -const NewFilamentStock = ({ onOk, reset }) => { +const NewFilamentStock = ({ onOk, reset, defaultValues }) => { return ( {({ handleSubmit, submitLoading, objectData, formValid }) => { const steps = [ @@ -64,7 +64,8 @@ const NewFilamentStock = ({ onOk, reset }) => { NewFilamentStock.propTypes = { onOk: PropTypes.func.isRequired, - reset: PropTypes.bool + reset: PropTypes.bool, + defaultValues: PropTypes.object } export default NewFilamentStock diff --git a/src/components/Dashboard/Inventory/PartStocks/NewPartStock.jsx b/src/components/Dashboard/Inventory/PartStocks/NewPartStock.jsx index 69b2dd4..fd64cc1 100644 --- a/src/components/Dashboard/Inventory/PartStocks/NewPartStock.jsx +++ b/src/components/Dashboard/Inventory/PartStocks/NewPartStock.jsx @@ -3,12 +3,12 @@ import ObjectInfo from '../../common/ObjectInfo' import NewObjectForm from '../../common/NewObjectForm' import WizardView from '../../common/WizardView' -const NewPartStock = ({ onOk, reset }) => { +const NewPartStock = ({ onOk, reset, defaultValues }) => { return ( {({ handleSubmit, submitLoading, objectData, formValid }) => { const steps = [ @@ -64,7 +64,8 @@ const NewPartStock = ({ onOk, reset }) => { NewPartStock.propTypes = { onOk: PropTypes.func.isRequired, - reset: PropTypes.bool + reset: PropTypes.bool, + defaultValues: PropTypes.object } export default NewPartStock diff --git a/src/components/Dashboard/Inventory/PurchaseOrders/NewPurchaseOrder.jsx b/src/components/Dashboard/Inventory/PurchaseOrders/NewPurchaseOrder.jsx index 99990a6..898d454 100644 --- a/src/components/Dashboard/Inventory/PurchaseOrders/NewPurchaseOrder.jsx +++ b/src/components/Dashboard/Inventory/PurchaseOrders/NewPurchaseOrder.jsx @@ -5,12 +5,12 @@ import WizardView from '../../common/WizardView' import { getModelProperty } from '../../../../database/ObjectModels.js' import ObjectProperty from '../../common/ObjectProperty.jsx' -const NewPurchaseOrder = ({ onOk, reset }) => { +const NewPurchaseOrder = ({ onOk, reset, defaultValues }) => { return ( {({ handleSubmit, submitLoading, objectData, formValid }) => { const steps = [ @@ -83,7 +83,8 @@ const NewPurchaseOrder = ({ onOk, reset }) => { NewPurchaseOrder.propTypes = { onOk: PropTypes.func.isRequired, - reset: PropTypes.bool + reset: PropTypes.bool, + defaultValues: PropTypes.object } export default NewPurchaseOrder diff --git a/src/components/Dashboard/Inventory/StockAudits/NewStockAudit.jsx b/src/components/Dashboard/Inventory/StockAudits/NewStockAudit.jsx index 9422e8c..536d3a6 100644 --- a/src/components/Dashboard/Inventory/StockAudits/NewStockAudit.jsx +++ b/src/components/Dashboard/Inventory/StockAudits/NewStockAudit.jsx @@ -3,12 +3,12 @@ import ObjectInfo from '../../common/ObjectInfo' import NewObjectForm from '../../common/NewObjectForm' import WizardView from '../../common/WizardView' -const NewStockAudit = ({ onOk, reset }) => { +const NewStockAudit = ({ onOk, reset, defaultValues }) => { return ( {({ handleSubmit, submitLoading, objectData, formValid }) => { const steps = [ @@ -64,7 +64,8 @@ const NewStockAudit = ({ onOk, reset }) => { NewStockAudit.propTypes = { onOk: PropTypes.func.isRequired, - reset: PropTypes.bool + reset: PropTypes.bool, + defaultValues: PropTypes.object } export default NewStockAudit diff --git a/src/components/Dashboard/Management/CourierServices/NewCourierService.jsx b/src/components/Dashboard/Management/CourierServices/NewCourierService.jsx index 10b4a3b..d9e9584 100644 --- a/src/components/Dashboard/Management/CourierServices/NewCourierService.jsx +++ b/src/components/Dashboard/Management/CourierServices/NewCourierService.jsx @@ -3,13 +3,14 @@ import ObjectInfo from '../../common/ObjectInfo' import NewObjectForm from '../../common/NewObjectForm' import WizardView from '../../common/WizardView' -const NewCourierService = ({ onOk }) => { +const NewCourierService = ({ onOk, defaultValues }) => { return ( {({ handleSubmit, submitLoading, objectData, formValid }) => { @@ -80,7 +81,8 @@ const NewCourierService = ({ onOk }) => { NewCourierService.propTypes = { onOk: PropTypes.func.isRequired, - reset: PropTypes.bool + reset: PropTypes.bool, + defaultValues: PropTypes.object } export default NewCourierService diff --git a/src/components/Dashboard/Management/Couriers/NewCourier.jsx b/src/components/Dashboard/Management/Couriers/NewCourier.jsx index 4a66397..9bb99ef 100644 --- a/src/components/Dashboard/Management/Couriers/NewCourier.jsx +++ b/src/components/Dashboard/Management/Couriers/NewCourier.jsx @@ -3,9 +3,9 @@ import ObjectInfo from '../../common/ObjectInfo' import NewObjectForm from '../../common/NewObjectForm' import WizardView from '../../common/WizardView' -const NewCourier = ({ onOk }) => { +const NewCourier = ({ onOk, defaultValues }) => { return ( - + {({ handleSubmit, submitLoading, objectData, formValid }) => { const steps = [ { @@ -74,7 +74,8 @@ const NewCourier = ({ onOk }) => { NewCourier.propTypes = { onOk: PropTypes.func.isRequired, - reset: PropTypes.bool + reset: PropTypes.bool, + defaultValues: PropTypes.object } export default NewCourier diff --git a/src/components/Dashboard/Management/DocumentPrinters/NewDocumentPrinter.jsx b/src/components/Dashboard/Management/DocumentPrinters/NewDocumentPrinter.jsx index 326a46e..af44046 100644 --- a/src/components/Dashboard/Management/DocumentPrinters/NewDocumentPrinter.jsx +++ b/src/components/Dashboard/Management/DocumentPrinters/NewDocumentPrinter.jsx @@ -3,11 +3,11 @@ import ObjectInfo from '../../common/ObjectInfo' import NewObjectForm from '../../common/NewObjectForm' import WizardView from '../../common/WizardView' -const NewDocumentPrinter = ({ onOk }) => { +const NewDocumentPrinter = ({ onOk, defaultValues }) => { return ( {({ handleSubmit, submitLoading, objectData, formValid }) => { const steps = [ @@ -79,7 +79,8 @@ const NewDocumentPrinter = ({ onOk }) => { NewDocumentPrinter.propTypes = { onOk: PropTypes.func.isRequired, - reset: PropTypes.bool + reset: PropTypes.bool, + defaultValues: PropTypes.object } export default NewDocumentPrinter diff --git a/src/components/Dashboard/Management/DocumentSizes/NewDocumentSize.jsx b/src/components/Dashboard/Management/DocumentSizes/NewDocumentSize.jsx index 972bf97..6c62411 100644 --- a/src/components/Dashboard/Management/DocumentSizes/NewDocumentSize.jsx +++ b/src/components/Dashboard/Management/DocumentSizes/NewDocumentSize.jsx @@ -3,9 +3,9 @@ import ObjectInfo from '../../common/ObjectInfo' import NewObjectForm from '../../common/NewObjectForm' import WizardView from '../../common/WizardView' -const NewDocumentSize = ({ onOk }) => { +const NewDocumentSize = ({ onOk, defaultValues }) => { return ( - + {({ handleSubmit, submitLoading, objectData, formValid }) => { const steps = [ { @@ -60,7 +60,8 @@ const NewDocumentSize = ({ onOk }) => { NewDocumentSize.propTypes = { onOk: PropTypes.func.isRequired, - reset: PropTypes.bool + reset: PropTypes.bool, + defaultValues: PropTypes.object } export default NewDocumentSize diff --git a/src/components/Dashboard/Management/DocumentTemplates/NewDocumentTemplate.jsx b/src/components/Dashboard/Management/DocumentTemplates/NewDocumentTemplate.jsx index 440d47f..11f735d 100644 --- a/src/components/Dashboard/Management/DocumentTemplates/NewDocumentTemplate.jsx +++ b/src/components/Dashboard/Management/DocumentTemplates/NewDocumentTemplate.jsx @@ -3,11 +3,11 @@ import ObjectInfo from '../../common/ObjectInfo' import NewObjectForm from '../../common/NewObjectForm' import WizardView from '../../common/WizardView' -const NewDocumentTemplate = ({ onOk }) => { +const NewDocumentTemplate = ({ onOk, defaultValues }) => { return ( {({ handleSubmit, submitLoading, objectData, formValid }) => { const steps = [ @@ -79,7 +79,8 @@ const NewDocumentTemplate = ({ onOk }) => { NewDocumentTemplate.propTypes = { onOk: PropTypes.func.isRequired, - reset: PropTypes.bool + reset: PropTypes.bool, + defaultValues: PropTypes.object } export default NewDocumentTemplate diff --git a/src/components/Dashboard/Management/Parts/NewPart.jsx b/src/components/Dashboard/Management/Parts/NewPart.jsx index 9a71a7c..4f1f152 100644 --- a/src/components/Dashboard/Management/Parts/NewPart.jsx +++ b/src/components/Dashboard/Management/Parts/NewPart.jsx @@ -3,11 +3,15 @@ import ObjectInfo from '../../common/ObjectInfo' import NewObjectForm from '../../common/NewObjectForm' import WizardView from '../../common/WizardView' -const NewPart = ({ onOk }) => { +const NewPart = ({ onOk, defaultValues }) => { return ( {({ handleSubmit, submitLoading, objectData, formValid }) => { const steps = [ @@ -112,7 +116,8 @@ const NewPart = ({ onOk }) => { NewPart.propTypes = { onOk: PropTypes.func.isRequired, - reset: PropTypes.bool + reset: PropTypes.bool, + defaultValues: PropTypes.object } export default NewPart diff --git a/src/components/Dashboard/Management/Products/NewProduct.jsx b/src/components/Dashboard/Management/Products/NewProduct.jsx index ed85e57..ea70cef 100644 --- a/src/components/Dashboard/Management/Products/NewProduct.jsx +++ b/src/components/Dashboard/Management/Products/NewProduct.jsx @@ -3,9 +3,12 @@ import ObjectInfo from '../../common/ObjectInfo' import NewObjectForm from '../../common/NewObjectForm' import WizardView from '../../common/WizardView' -const NewProduct = ({ onOk }) => { +const NewProduct = ({ onOk, defaultValues }) => { return ( - + {({ handleSubmit, submitLoading, objectData, formValid }) => { const steps = [ { @@ -98,7 +101,8 @@ const NewProduct = ({ onOk }) => { NewProduct.propTypes = { onOk: PropTypes.func.isRequired, - reset: PropTypes.bool + reset: PropTypes.bool, + defaultValues: PropTypes.object } export default NewProduct diff --git a/src/components/Dashboard/Management/TaxRates/NewTaxRate.jsx b/src/components/Dashboard/Management/TaxRates/NewTaxRate.jsx index c16b746..ec99bfa 100644 --- a/src/components/Dashboard/Management/TaxRates/NewTaxRate.jsx +++ b/src/components/Dashboard/Management/TaxRates/NewTaxRate.jsx @@ -3,9 +3,9 @@ import ObjectInfo from '../../common/ObjectInfo' import NewObjectForm from '../../common/NewObjectForm' import WizardView from '../../common/WizardView' -const NewTaxRate = ({ onOk }) => { +const NewTaxRate = ({ onOk, defaultValues }) => { return ( - + {({ handleSubmit, submitLoading, objectData, formValid }) => { const steps = [ { @@ -74,7 +74,8 @@ const NewTaxRate = ({ onOk }) => { NewTaxRate.propTypes = { onOk: PropTypes.func.isRequired, - reset: PropTypes.bool + reset: PropTypes.bool, + defaultValues: PropTypes.object } export default NewTaxRate diff --git a/src/components/Dashboard/Management/TaxRecords/NewTaxRecord.jsx b/src/components/Dashboard/Management/TaxRecords/NewTaxRecord.jsx index f690b87..081bb53 100644 --- a/src/components/Dashboard/Management/TaxRecords/NewTaxRecord.jsx +++ b/src/components/Dashboard/Management/TaxRecords/NewTaxRecord.jsx @@ -3,9 +3,9 @@ import ObjectInfo from '../../common/ObjectInfo' import NewObjectForm from '../../common/NewObjectForm' import WizardView from '../../common/WizardView' -const NewTaxRecord = ({ onOk }) => { +const NewTaxRecord = ({ onOk, defaultValues }) => { return ( - + {({ handleSubmit, submitLoading, objectData, formValid }) => { const steps = [ { @@ -74,7 +74,8 @@ const NewTaxRecord = ({ onOk }) => { NewTaxRecord.propTypes = { onOk: PropTypes.func.isRequired, - reset: PropTypes.bool + reset: PropTypes.bool, + defaultValues: PropTypes.object } export default NewTaxRecord diff --git a/src/components/Dashboard/Management/Vendors/NewVendor.jsx b/src/components/Dashboard/Management/Vendors/NewVendor.jsx index dbb3d32..fc72259 100644 --- a/src/components/Dashboard/Management/Vendors/NewVendor.jsx +++ b/src/components/Dashboard/Management/Vendors/NewVendor.jsx @@ -3,9 +3,12 @@ import ObjectInfo from '../../common/ObjectInfo' import NewObjectForm from '../../common/NewObjectForm' import WizardView from '../../common/WizardView' -const NewVendor = ({ onOk }) => { +const NewVendor = ({ onOk, defaultValues }) => { return ( - + {({ handleSubmit, submitLoading, objectData, formValid }) => { const steps = [ { @@ -74,7 +77,8 @@ const NewVendor = ({ onOk }) => { NewVendor.propTypes = { onOk: PropTypes.func.isRequired, - reset: PropTypes.bool + reset: PropTypes.bool, + defaultValues: PropTypes.object } export default NewVendor diff --git a/src/components/Dashboard/Production/GCodeFiles/NewGCodeFile.jsx b/src/components/Dashboard/Production/GCodeFiles/NewGCodeFile.jsx index 5f50977..df1e237 100644 --- a/src/components/Dashboard/Production/GCodeFiles/NewGCodeFile.jsx +++ b/src/components/Dashboard/Production/GCodeFiles/NewGCodeFile.jsx @@ -3,12 +3,13 @@ import ObjectInfo from '../../common/ObjectInfo' import NewObjectForm from '../../common/NewObjectForm' import WizardView from '../../common/WizardView' -const NewGCodeFile = ({ onOk }) => { +const NewGCodeFile = ({ onOk, defaultValues }) => { return ( {({ handleSubmit, submitLoading, objectData, formValid }) => { @@ -83,7 +84,8 @@ const NewGCodeFile = ({ onOk }) => { NewGCodeFile.propTypes = { onOk: PropTypes.func.isRequired, - reset: PropTypes.bool + reset: PropTypes.bool, + defaultValues: PropTypes.object } export default NewGCodeFile diff --git a/src/components/Dashboard/Production/Jobs/NewJob.jsx b/src/components/Dashboard/Production/Jobs/NewJob.jsx index a15667a..9933ec7 100644 --- a/src/components/Dashboard/Production/Jobs/NewJob.jsx +++ b/src/components/Dashboard/Production/Jobs/NewJob.jsx @@ -3,12 +3,13 @@ import ObjectInfo from '../../common/ObjectInfo' import NewObjectForm from '../../common/NewObjectForm' import WizardView from '../../common/WizardView' -const NewJob = ({ onOk }) => { +const NewJob = ({ onOk, defaultValues }) => { return ( {({ handleSubmit, submitLoading, objectData, formValid }) => { @@ -66,7 +67,8 @@ const NewJob = ({ onOk }) => { NewJob.propTypes = { onOk: PropTypes.func.isRequired, - reset: PropTypes.bool + reset: PropTypes.bool, + defaultValues: PropTypes.object } export default NewJob diff --git a/src/components/Dashboard/Production/Printers/NewPrinter.jsx b/src/components/Dashboard/Production/Printers/NewPrinter.jsx index 9a50922..598d494 100644 --- a/src/components/Dashboard/Production/Printers/NewPrinter.jsx +++ b/src/components/Dashboard/Production/Printers/NewPrinter.jsx @@ -3,7 +3,7 @@ import ObjectInfo from '../../common/ObjectInfo' import NewObjectForm from '../../common/NewObjectForm' import WizardView from '../../common/WizardView' -const NewPrinter = ({ onOk }) => { +const NewPrinter = ({ onOk, defaultValues }) => { return ( { port: 7125, protocol: 'ws' }, - active: true + active: true, + ...defaultValues }} > {({ handleSubmit, submitLoading, objectData, formValid }) => { @@ -103,7 +104,8 @@ const NewPrinter = ({ onOk }) => { NewPrinter.propTypes = { onOk: PropTypes.func.isRequired, - reset: PropTypes.bool + reset: PropTypes.bool, + defaultValues: PropTypes.object } export default NewPrinter