umwd-components 0.1.714 → 0.1.715
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +273 -0
- package/dist/_virtual/_commonjsHelpers.js +1 -1
- package/dist/_virtual/_rollupPluginBabelHelpers.js +1 -1
- package/dist/node_modules/@mollie/api-client/dist/mollie.esm.js +1 -1
- package/dist/node_modules/axios/index.js +6 -0
- package/dist/node_modules/axios/lib/adapters/adapters.js +1 -1
- package/dist/node_modules/axios/lib/adapters/fetch.js +1 -1
- package/dist/node_modules/axios/lib/adapters/xhr.js +1 -1
- package/dist/node_modules/axios/lib/cancel/CancelToken.js +1 -1
- package/dist/node_modules/axios/lib/core/Axios.js +1 -1
- package/dist/node_modules/axios/lib/core/AxiosError.js +1 -1
- package/dist/node_modules/axios/lib/core/AxiosHeaders.js +1 -1
- package/dist/node_modules/axios/lib/core/InterceptorManager.js +1 -1
- package/dist/node_modules/axios/lib/core/dispatchRequest.js +1 -1
- package/dist/node_modules/axios/lib/core/mergeConfig.js +1 -1
- package/dist/node_modules/axios/lib/core/transformData.js +1 -1
- package/dist/node_modules/axios/lib/defaults/index.js +1 -1
- package/dist/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +1 -1
- package/dist/node_modules/axios/lib/helpers/HttpStatusCode.js +1 -1
- package/dist/node_modules/axios/lib/helpers/composeSignals.js +1 -1
- package/dist/node_modules/axios/lib/helpers/formDataToJSON.js +1 -1
- package/dist/node_modules/axios/lib/helpers/parseHeaders.js +1 -1
- package/dist/node_modules/axios/lib/helpers/progressEventReducer.js +1 -1
- package/dist/node_modules/axios/lib/helpers/resolveConfig.js +1 -1
- package/dist/node_modules/axios/lib/helpers/throttle.js +1 -1
- package/dist/node_modules/axios/lib/helpers/toFormData.js +1 -1
- package/dist/node_modules/axios/lib/helpers/trackStream.js +1 -1
- package/dist/node_modules/axios/lib/helpers/validator.js +1 -1
- package/dist/node_modules/axios/lib/platform/index.js +1 -1
- package/dist/node_modules/axios/lib/utils.js +1 -1
- package/dist/node_modules/call-bind-apply-helpers/actualApply.js +6 -0
- package/dist/node_modules/call-bind-apply-helpers/functionApply.js +6 -0
- package/dist/node_modules/call-bind-apply-helpers/functionCall.js +6 -0
- package/dist/node_modules/call-bind-apply-helpers/index.js +6 -0
- package/dist/node_modules/call-bind-apply-helpers/reflectApply.js +6 -0
- package/dist/node_modules/call-bound/index.js +6 -0
- package/dist/node_modules/dayjs/dayjs.min.js +1 -1
- package/dist/node_modules/dunder-proto/get.js +6 -0
- package/dist/node_modules/es-define-property/index.js +1 -1
- package/dist/{_virtual/index7.js → node_modules/es-object-atoms/index.js} +1 -1
- package/dist/node_modules/function-bind/implementation.js +1 -1
- package/dist/node_modules/function-bind/index.js +1 -1
- package/dist/node_modules/get-intrinsic/index.js +1 -1
- package/dist/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
- package/dist/node_modules/get-proto/Reflect.getPrototypeOf.js +6 -0
- package/dist/node_modules/get-proto/index.js +6 -0
- package/dist/{_virtual/index5.js → node_modules/gopd/gOPD.js} +1 -1
- package/dist/node_modules/gopd/index.js +1 -1
- package/dist/node_modules/has-symbols/index.js +1 -1
- package/dist/node_modules/has-symbols/shams.js +1 -1
- package/dist/node_modules/hasown/index.js +1 -1
- package/dist/{_virtual/index8.js → node_modules/math-intrinsics/abs.js} +1 -1
- package/dist/{_virtual/types.js → node_modules/math-intrinsics/floor.js} +1 -1
- package/dist/node_modules/math-intrinsics/isNaN.js +6 -0
- package/dist/{_virtual/index6.js → node_modules/math-intrinsics/max.js} +1 -1
- package/dist/node_modules/math-intrinsics/min.js +6 -0
- package/dist/node_modules/math-intrinsics/pow.js +6 -0
- package/dist/node_modules/math-intrinsics/round.js +6 -0
- package/dist/node_modules/math-intrinsics/sign.js +6 -0
- package/dist/node_modules/object-assign/index.js +1 -1
- package/dist/node_modules/object-inspect/index.js +1 -1
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +1 -1
- package/dist/node_modules/prop-types/index.js +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/qs/lib/index.js +1 -1
- package/dist/node_modules/qs/lib/parse.js +1 -1
- package/dist/node_modules/qs/lib/stringify.js +1 -1
- package/dist/node_modules/qs/lib/utils.js +1 -1
- package/dist/node_modules/react-csv/lib/components/Download.js +1 -1
- package/dist/node_modules/react-csv/lib/components/Link.js +1 -1
- package/dist/node_modules/react-csv/lib/core.js +1 -1
- package/dist/node_modules/safe-buffer/index.js +2 -2
- package/dist/node_modules/sax/lib/sax.js +1 -1
- package/dist/node_modules/side-channel/index.js +1 -1
- package/dist/node_modules/side-channel-list/index.js +6 -0
- package/dist/node_modules/side-channel-map/index.js +6 -0
- package/dist/node_modules/side-channel-weakmap/index.js +6 -0
- package/dist/node_modules/string_decoder/lib/string_decoder.js +1 -1
- package/dist/node_modules/tslib/tslib.es6.js +1 -1
- package/dist/node_modules/xml-js/lib/js2xml.js +1 -1
- package/dist/node_modules/xml-js/lib/xml2json.js +1 -1
- package/dist/src/components/ContactForm.js +1 -1
- package/dist/src/components/FluidBackground.js +1 -1
- package/dist/src/components/LogoutButton.js +1 -1
- package/dist/src/components/WebsitePlaceholder.js +1 -1
- package/dist/src/components/ZodErrors.js +1 -1
- package/dist/src/components/auth/AuthWidget.js +1 -1
- package/dist/src/components/common/Address.js +1 -1
- package/dist/src/components/common/AmountUpdater.js +1 -1
- package/dist/src/components/common/EnhancedTable/EnhancedTable.js +1 -1
- package/dist/src/components/common/EnhancedTable/EnhancedTableFilterRow.js +1 -1
- package/dist/src/components/common/EnhancedTable/EnhancedTableHead.js +1 -1
- package/dist/src/components/common/EnhancedTable/EnhancedTableRow.js +1 -1
- package/dist/src/components/common/EnhancedTable/EnhancedTableToolbar.js +1 -1
- package/dist/src/components/common/NumberInput.js +1 -1
- package/dist/src/components/common/WeekPicker.js +1 -1
- package/dist/src/components/common/cookie-consent/CookieConsentContext.js +1 -1
- package/dist/src/components/common/csv/CsvDownloader.js +1 -1
- package/dist/src/components/common/media/MediaGrid.js +1 -1
- package/dist/src/components/common/media/MediaLibraryDialog.js +1 -1
- package/dist/src/components/common/media/UploadBase64MediaForm.js +1 -1
- package/dist/src/components/common/media/UploadMediaForm.js +1 -1
- package/dist/src/components/common/snackbar/GlobalSnackbar.js +1 -1
- package/dist/src/components/e-commerce/cart/CartSummary.js +1 -1
- package/dist/src/components/e-commerce/cart/hooks.js +1 -1
- package/dist/src/components/e-commerce/categories/AddCategoryForm.js +1 -1
- package/dist/src/components/e-commerce/categories/CategorySelectorV2.js +1 -1
- package/dist/src/components/e-commerce/categories/EditCategoryForm.js +1 -1
- package/dist/src/components/e-commerce/checkout/CheckoutForm.js +1 -1
- package/dist/src/components/e-commerce/checkout/Step2.js +1 -1
- package/dist/src/components/e-commerce/checkout/Step4.js +1 -1
- package/dist/src/components/e-commerce/checkout/Step5.js +1 -1
- package/dist/src/components/e-commerce/customer/BusinessCredentials.js +1 -1
- package/dist/src/components/e-commerce/customer/CustomerCompletenessWarning.js +1 -1
- package/dist/src/components/e-commerce/customer/CustomerProfileDisplay.js +1 -1
- package/dist/src/components/e-commerce/customer/CustomerProfileEditForm.js +1 -1
- package/dist/src/components/e-commerce/customer/CustomerSelector.js +1 -1
- package/dist/src/components/e-commerce/enduser/EnduserProfileEditForm.js +1 -1
- package/dist/src/components/e-commerce/invoice/CreateInvoiceForm.js +1 -1
- package/dist/src/components/e-commerce/invoice/InvoiceItemFields.js +1 -1
- package/dist/src/components/e-commerce/invoice/InvoicePDF.js +1 -1
- package/dist/src/components/e-commerce/iro/CreateIROForm.js +1 -1
- package/dist/src/components/e-commerce/iro/IROItemFields.js +1 -1
- package/dist/src/components/e-commerce/iro/IroItemDisplay.js +1 -1
- package/dist/src/components/e-commerce/iro/IroItemUpdater.js +1 -1
- package/dist/src/components/e-commerce/iro/IroStatusIndicator.js +1 -1
- package/dist/src/components/e-commerce/iro/ManageIROForm.js +1 -1
- package/dist/src/components/e-commerce/iro/RmaForm.js +1 -1
- package/dist/src/components/e-commerce/iro/TextualIROItemUpdater.js +1 -1
- package/dist/src/components/e-commerce/iro/TextualManageIROForm.js +1 -1
- package/dist/src/components/e-commerce/opo/CreateOpoForm.js +1 -1
- package/dist/src/components/e-commerce/opo/ManageOpoForm.js +1 -1
- package/dist/src/components/e-commerce/opo/OPOItemFields.js +1 -1
- package/dist/src/components/e-commerce/opo/OpoItemDisplay.js +1 -1
- package/dist/src/components/e-commerce/opo/OpoItemUpdater.js +1 -1
- package/dist/src/components/e-commerce/opo/OpoStatusIndicator.js +1 -1
- package/dist/src/components/e-commerce/opo/OpoSummary.js +1 -1
- package/dist/src/components/e-commerce/opo/PaymentStatusIndicator.js +1 -1
- package/dist/src/components/e-commerce/opo/TextualManageOpoForm.js +1 -1
- package/dist/src/components/e-commerce/opo/TextualOpoItemUpdater.js +1 -1
- package/dist/src/components/e-commerce/products/AddProductForm.js +1 -1
- package/dist/src/components/e-commerce/products/EditProductForm.js +1 -1
- package/dist/src/components/e-commerce/products/EditStockForm.js +1 -1
- package/dist/src/components/e-commerce/products/PriceFields.js +1 -1
- package/dist/src/components/e-commerce/products/ProductCategoryCard.js +1 -1
- package/dist/src/components/e-commerce/products/ProductSelector.js +1 -1
- package/dist/src/components/e-commerce/products/SingleProduct.js +1 -1
- package/dist/src/components/layout/Footer.js +1 -1
- package/dist/src/components/layout/Navbar.js +1 -1
- package/dist/src/components/layout/NavbarV2.js +1 -1
- package/dist/src/components/layout/SideNav.js +1 -1
- package/dist/src/components/logistics/dispatcher/DispatcherProfileEditForm.js +1 -1
- package/dist/src/components/logistics/ipo/AddIPOForm.js +1 -1
- package/dist/src/components/logistics/ipo/IPOItemFields.js +1 -1
- package/dist/src/components/logistics/ipo/IPOItemUpdater.js +1 -1
- package/dist/src/components/logistics/ipo/IpoStatusIndicator.js +1 -1
- package/dist/src/components/logistics/ipo/ManageIPOForm.js +1 -1
- package/dist/src/components/logistics/ipo/TextualIPOItemUpdater.js +1 -1
- package/dist/src/components/logistics/ipo/TextualManageIPOForm.js +1 -1
- package/dist/src/components/logistics/note/NoteTakingComponent.js +1 -1
- package/dist/src/components/logistics/note/NotesDisplay.js +1 -1
- package/dist/src/components/logistics/report/PreReportsDisplay.js +1 -1
- package/dist/src/components/logistics/report/ReportMakingComponent.js +1 -1
- package/dist/src/components/logistics/report/ReportsDisplay.js +1 -1
- package/dist/src/components/logistics/vendor/AddVendorForm.js +1 -1
- package/dist/src/components/logistics/vendor/EditVendorForm.js +1 -1
- package/dist/src/components/logistics/vendor/VendorDisplay.js +1 -1
- package/dist/src/components/logistics/vendor/VendorSelector.js +1 -1
- package/dist/src/components/page-builder/ColumnsSection.js +1 -1
- package/dist/src/components/page-builder/FleetSection.js +1 -1
- package/dist/src/components/page-builder/IconSection.js +1 -1
- package/dist/src/components/page-builder/LogoBarSection.js +1 -1
- package/dist/src/components/page-builder/PBFeaturesSection.js +1 -1
- package/dist/src/components/page-builder/PBPersonaliaSection.js +1 -1
- package/dist/src/components/page-builder/PBTextImageSection.js +1 -1
- package/dist/src/components/page-builder/PictureBarSection.js +1 -1
- package/dist/src/components/page-elements/CategoryBlock.js +1 -1
- package/dist/src/components/page-elements/ColumnsSection.js +1 -1
- package/dist/src/components/page-elements/FeaturesSection.js +1 -1
- package/dist/src/components/page-elements/FleetSection.js +1 -1
- package/dist/src/components/page-elements/IconSection.js +1 -1
- package/dist/src/components/page-elements/LogoBarSection.js +1 -1
- package/dist/src/components/page-elements/PersonaliaSection.js +1 -1
- package/dist/src/components/page-elements/PictureBarSection.js +1 -1
- package/dist/src/components/page-elements/TextImageSection.js +1 -1
- package/dist/src/components/public-information/PublicInformationForm.js +1 -1
- package/dist/src/context/auth/SessionContext.js +1 -1
- package/dist/src/context/common/SnackbarContext.js +1 -1
- package/dist/src/context/e-commerce/cart/CartContext.js +1 -1
- package/dist/src/context/e-commerce/checkout/CheckoutContext.js +1 -1
- package/dist/src/data/actions/auth-actions.js +1 -1
- package/dist/src/data/actions/e-commerce/categories/createCategoryAction.js +1 -1
- package/dist/src/data/actions/e-commerce/categories/updateCategoryAction.js +1 -1
- package/dist/src/data/actions/e-commerce/checkout-action.js +1 -1
- package/dist/src/data/actions/e-commerce/enduser/profile-actions.js +1 -1
- package/dist/src/data/actions/e-commerce/invoices/createInvoiceAction.js +1 -1
- package/dist/src/data/actions/e-commerce/iro/createIroAction.js +1 -1
- package/dist/src/data/actions/e-commerce/iro/requestRmaAction.js +1 -1
- package/dist/src/data/actions/e-commerce/iro/updateIroAction.js +1 -1
- package/dist/src/data/actions/e-commerce/opo/createOpoAction.js +1 -1
- package/dist/src/data/actions/e-commerce/opo/updateOpoAction.js +1 -1
- package/dist/src/data/actions/e-commerce/product/createProductAction.js +1 -1
- package/dist/src/data/actions/e-commerce/product/updateProductAction.js +1 -1
- package/dist/src/data/actions/logistics/dispatcher/profile-actions.js +1 -1
- package/dist/src/data/actions/logistics/ipo/createIPOAction.js +1 -1
- package/dist/src/data/actions/logistics/ipo/updateIpoAction.js +1 -1
- package/dist/src/data/actions/logistics/note/createNoteAction.js +1 -1
- package/dist/src/data/actions/logistics/report/createReportAction.js +1 -1
- package/dist/src/data/actions/logistics/vendor/createVendorAction.js +1 -1
- package/dist/src/data/actions/logistics/vendor/updateVendorAction.js +1 -1
- package/dist/src/data/actions/media/updateMediaAction.js +1 -1
- package/dist/src/data/actions/media/uploadBase64MediaAction.js +1 -1
- package/dist/src/data/actions/media/uploadMediaAction.js +1 -1
- package/dist/src/data/actions/pagebuilder-actions.js +1 -1
- package/dist/src/data/actions/profile-actions.js +1 -1
- package/dist/src/data/actions/public-information/updatePublicInformationAction.js +1 -1
- package/dist/src/data/loaders/common/media/downloadBase64File.js +1 -1
- package/dist/src/data/loaders/common/media/getAllMedia.js +1 -1
- package/dist/src/data/loaders/e-commerce/getAllCategoryNames.js +1 -1
- package/dist/src/data/loaders/e-commerce/getAllCustomers.js +1 -1
- package/dist/src/data/loaders/e-commerce/getAllInvoices.js +1 -1
- package/dist/src/data/loaders/e-commerce/getAllOpos.js +1 -1
- package/dist/src/data/loaders/e-commerce/getCustomerLabels.js +1 -1
- package/dist/src/data/loaders/e-commerce/getCustomerModel.js +1 -1
- package/dist/src/data/loaders/e-commerce/getOpoModel.js +1 -1
- package/dist/src/data/loaders/e-commerce/getPaginatedCategories.js +1 -1
- package/dist/src/data/loaders/e-commerce/getProductModel.js +1 -1
- package/dist/src/data/loaders/e-commerce/getProductNames.js +1 -1
- package/dist/src/data/loaders/e-commerce/getShop.js +1 -1
- package/dist/src/data/loaders/e-commerce/getSingleCategory.js +1 -1
- package/dist/src/data/loaders/e-commerce/getSingleCustomer.js +1 -1
- package/dist/src/data/loaders/e-commerce/getSingleOpo.js +1 -1
- package/dist/src/data/loaders/e-commerce/getSingleProduct.js +1 -1
- package/dist/src/data/loaders/e-commerce/getSingleStock.js +1 -1
- package/dist/src/data/loaders/e-commerce/getTableProducts.js +1 -1
- package/dist/src/data/loaders/e-commerce/iros/getAllIros.js +1 -1
- package/dist/src/data/loaders/e-commerce/iros/getIroModel.js +1 -1
- package/dist/src/data/loaders/e-commerce/iros/getSingleIro.js +1 -1
- package/dist/src/data/loaders/e-commerce/iros/queryAllIros.js +1 -1
- package/dist/src/data/loaders/e-commerce/queryAllCustomers.js +1 -1
- package/dist/src/data/loaders/e-commerce/queryAllOpos.js +1 -1
- package/dist/src/data/loaders/e-commerce/queryAllProducts.js +1 -1
- package/dist/src/data/loaders/e-commerce-loaders.js +1 -1
- package/dist/src/data/loaders/loaders.js +1 -1
- package/dist/src/data/loaders/logistics/getIpoModel.js +1 -1
- package/dist/src/data/loaders/logistics/getIpoNames.js +1 -1
- package/dist/src/data/loaders/logistics/getSingleIpo.js +1 -1
- package/dist/src/data/loaders/logistics/getSingleVendor.js +1 -1
- package/dist/src/data/loaders/logistics/getTableIpos.js +1 -1
- package/dist/src/data/loaders/logistics/getTableVendors.js +1 -1
- package/dist/src/data/loaders/logistics/getVendorModel.js +1 -1
- package/dist/src/data/loaders/logistics/getVendorNames.js +1 -1
- package/dist/src/data/loaders/logistics/queryAllIpos.js +1 -1
- package/dist/src/data/loaders/logistics/queryAllVendors.js +1 -1
- package/dist/src/data/loaders/page-builder/getTablePages.js +1 -1
- package/dist/src/data/loaders/page-elements/getSinglePage.js +1 -1
- package/dist/src/data/loaders/public-information/getPublicInformation.js +1 -1
- package/dist/src/data/loaders/user/getUserMeLoader.js +1 -1
- package/dist/src/data/services/archive-service.js +1 -1
- package/dist/src/data/services/auth-service.js +1 -1
- package/dist/src/data/services/common/cancellation-service.js +1 -1
- package/dist/src/data/services/common/confirmation-service.js +1 -1
- package/dist/src/data/services/e-commerce/enduser/get-enduser-me-loader.js +1 -1
- package/dist/src/data/services/file-service.js +1 -1
- package/dist/src/data/services/get-token.js +1 -1
- package/dist/src/data/services/get-user-me-loader.js +1 -1
- package/dist/src/data/services/logistics/dispatcher/get-dispatcher-me-loader.js +1 -1
- package/dist/src/data/services/mutate-data.js +1 -1
- package/dist/src/lib/eoriValidate.js +1 -1
- package/dist/src/lib/molliePaymentProvider.js +1 -1
- package/dist/src/lib/parseNavigation.js +1 -1
- package/dist/src/lib/processFilters.js +1 -1
- package/dist/src/lib/utils.js +1 -1
- package/dist/src/lib/vatValidate.js +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/components/StrapiErrors.d.ts +2 -2
- package/dist/types/components/e-commerce/cart/hooks.d.ts +2 -3
- package/dist/types/components/e-commerce/products/AddProductForm.d.ts +3 -3
- package/dist/types/lib/getIcon.d.ts +0 -1
- package/dist/types/types/StrapiImageProps.d.ts +0 -1
- package/dist/types/types/common/Contact.d.ts +0 -1
- package/dist/types/types/common/Socials.d.ts +0 -1
- package/dist/types/types/common/enhancedTable/types.d.ts +0 -1
- package/package.json +14 -25
- package/postcss.config.js +5 -6
- package/rollup.config.mjs +9 -0
- package/src/components/Logo.tsx +20 -9
- package/src/components/LogoutButton.tsx +1 -29
- package/src/components/StrapiErrors.tsx +5 -1
- package/src/components/e-commerce/invoice/InvoicePDF.tsx +54 -48
- package/src/components/e-commerce/iro/ManageIROForm.tsx +3 -3
- package/src/components/e-commerce/opo/ManageOpoForm.tsx +7 -2
- package/src/components/e-commerce/opo/OpoItemUpdater.tsx +16 -6
- package/src/index.ts +327 -327
- package/src/lib/APIcon.svg +6 -6
- package/src/lib/utils.ts +0 -7
- package/src/styles/globals.css +2 -3
- package/tsconfig.json +24 -34
- package/.storybook/main.js +0 -26
- package/.storybook/preview.js +0 -50
- package/dist/_virtual/inherits_browser.js +0 -6
- package/dist/_virtual/punycode.js +0 -6
- package/dist/_virtual/url.js +0 -6
- package/dist/_virtual/util.js +0 -6
- package/dist/node_modules/available-typed-arrays/index.js +0 -6
- package/dist/node_modules/base64-js/index.js +0 -6
- package/dist/node_modules/buffer/index.js +0 -12
- package/dist/node_modules/call-bind/callBound.js +0 -6
- package/dist/node_modules/call-bind/index.js +0 -6
- package/dist/node_modules/define-data-property/index.js +0 -6
- package/dist/node_modules/for-each/index.js +0 -6
- package/dist/node_modules/has-property-descriptors/index.js +0 -6
- package/dist/node_modules/has-proto/index.js +0 -6
- package/dist/node_modules/has-tostringtag/shams.js +0 -6
- package/dist/node_modules/ieee754/index.js +0 -7
- package/dist/node_modules/inherits/inherits_browser.js +0 -6
- package/dist/node_modules/is-arguments/index.js +0 -6
- package/dist/node_modules/is-callable/index.js +0 -6
- package/dist/node_modules/is-generator-function/index.js +0 -6
- package/dist/node_modules/is-typed-array/index.js +0 -6
- package/dist/node_modules/set-function-length/index.js +0 -6
- package/dist/node_modules/url/node_modules/punycode/punycode.js +0 -7
- package/dist/node_modules/url/url.js +0 -6
- package/dist/node_modules/util/support/isBufferBrowser.js +0 -6
- package/dist/node_modules/util/support/types.js +0 -6
- package/dist/node_modules/util/util.js +0 -6
- package/dist/node_modules/uuid/dist/esm-browser/native.js +0 -6
- package/dist/node_modules/uuid/dist/esm-browser/rng.js +0 -6
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js +0 -6
- package/dist/node_modules/uuid/dist/esm-browser/v4.js +0 -6
- package/dist/node_modules/which-typed-array/index.js +0 -6
- package/dist/types/app/checkout/layout.d.ts +0 -4
- package/dist/types/app/checkout/page.d.ts +0 -3
- package/dist/types/app/layout.d.ts +0 -8
- package/dist/types/app/page.d.ts +0 -2
- package/dist/types/components/e-commerce/cart/CartWidgetOld.d.ts +0 -9
- package/next-env.d.ts +0 -5
- package/next.config.js +0 -18
- package/public/AMH/BulletSVG.svg +0 -9
- package/public/AMH/desktop_wallpaper@0.25x.png +0 -0
- package/public/Logo.svg +0 -6
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -43
- package/public/logo.png +0 -0
- package/public/logo_decorated.png +0 -0
- package/public/logo_text.png +0 -0
- package/public/logo_thick.png +0 -0
- package/public/manifest.json +0 -25
- package/public/placeholders/fullscreen_1920X1080.png +0 -0
- package/public/placeholders/highres_2400X1600.png +0 -0
- package/public/placeholders/large_1200X800.png +0 -0
- package/public/placeholders/medium_600X400.png +0 -0
- package/public/placeholders/small_300X200.png +0 -0
- package/public/placeholders/thumbnail_100X100.png +0 -0
- package/public/robots.txt +0 -3
- package/readme.MD +0 -0
- package/rollup.config copy.mjs +0 -80
- package/src/app/checkout/layout.tsx +0 -28
- package/src/app/checkout/page.tsx +0 -9
- package/src/app/layout.tsx +0 -16
- package/src/app/page.tsx +0 -38
- package/src/stories/ContactForm.stories.js +0 -13
- package/src/stories/FeatureSection.stories.js +0 -86
- package/src/stories/FluidBackground.stories.js +0 -29
- package/src/stories/Footer.stories.js +0 -130
- package/src/stories/HeroSection.stories.js +0 -101
- package/src/stories/LogoutButton.stories.js +0 -15
- package/src/stories/Page.stories.js +0 -536
- package/src/stories/PageBuilder.stories.js +0 -396
- package/src/stories/RegisterForm.stories.js +0 -13
- package/src/stories/ScrollNavbar.stories.js +0 -121
- package/src/stories/SideNav.stories.js +0 -47
- package/src/stories/SigninForm.stories.js +0 -13
- package/src/stories/StrapiImage.stories.js +0 -23
- package/src/stories/TextImageSection.stories.js +0 -73
- package/src/stories/WebsitePlaceholder.stories.js +0 -178
- package/src/stories/WhatsAppClickToChatButton.stories.js +0 -69
- package/src/stories/styles.css +0 -39
- package/tailwind.config.ts +0 -80
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__read as e,__awaiter as t,__generator as n}from"../../../../node_modules/tslib/tslib.es6.js";import r,{useState as i,Fragment as o}from"react";import l from"@mui/material/Grid";import{MediaItem as m}from"./MediaItem.js";import a from"./EditMediaDialog.js";function u(u){var d=this,c=u.mediaArray,s=u.selected,f=void 0===s?[]:s,p=u.handleSelect,E=e(i(!1),2),h=E[0],v=E[1],x=e(i(null),2),g=x[0],j=x[1],I=function(){v(!1),null!==g&&j(null)};return r.createElement(l,{container:!0,spacing:2,sx:{transform:"translateX(-1rem)"}},(null==c?void 0:c.length)>0&&c.map(
|
|
7
|
+
import{__read as e,__awaiter as t,__generator as n}from"../../../../node_modules/tslib/tslib.es6.js";import r,{useState as i,Fragment as o}from"react";import l from"@mui/material/Grid";import{MediaItem as m}from"./MediaItem.js";import a from"./EditMediaDialog.js";function u(u){var d=this,c=u.mediaArray,s=u.selected,f=void 0===s?[]:s,p=u.handleSelect,E=e(i(!1),2),h=E[0],v=E[1],x=e(i(null),2),g=x[0],j=x[1],I=function(){v(!1),null!==g&&j(null)};return r.createElement(l,{container:!0,spacing:2,sx:{transform:"translateX(-1rem)"}},(null==c?void 0:c.length)>0&&c.map(function(e,i){return r.createElement(o,{key:e.id},r.createElement(a,{open:h&&g===i,handleClose:I,data:e}),r.createElement(l,{item:!0,xs:3},r.createElement(m,{mediaItem:e,isSelected:-1!==f.findIndex(function(t){return t.id===e.id}),onClick:p?function(){return p(e)}:function(){return function(e){return t(d,void 0,void 0,function(){return n(this,function(t){return j(e),v(!0),[2]})})}(i)}})))}))}export{u as MediaGrid};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__read as e,__awaiter as t,__generator as r}from"../../../../node_modules/tslib/tslib.es6.js";import a,{useState as n,useEffect as i}from"react";import{MediaGrid as l}from"./MediaGrid.js";import{UploadMediaForm as o}from"./UploadMediaForm.js";import m from"@mui/material/Dialog";import c from"@mui/material/Button";import d from"@mui/material/Divider";import u from"@mui/material/Stack";import{DialogTitle as s,DialogContent as f,Typography as p,DialogActions as h}from"@mui/material";import{getAllMedia as v}from"../../../data/loaders/common/media/getAllMedia.js";function E(E){var b=this,g=E.open,y=E.handleClose,C=E.handleCancel,j=E.selected,k=E.handleSelect,M=e(n(),2),S=M[0],U=M[1];i(
|
|
7
|
+
import{__read as e,__awaiter as t,__generator as r}from"../../../../node_modules/tslib/tslib.es6.js";import a,{useState as n,useEffect as i}from"react";import{MediaGrid as l}from"./MediaGrid.js";import{UploadMediaForm as o}from"./UploadMediaForm.js";import m from"@mui/material/Dialog";import c from"@mui/material/Button";import d from"@mui/material/Divider";import u from"@mui/material/Stack";import{DialogTitle as s,DialogContent as f,Typography as p,DialogActions as h}from"@mui/material";import{getAllMedia as v}from"../../../data/loaders/common/media/getAllMedia.js";function E(E){var b=this,g=E.open,y=E.handleClose,C=E.handleCancel,j=E.selected,k=E.handleSelect,M=e(n(),2),S=M[0],U=M[1];i(function(){!function(){t(this,void 0,void 0,function(){var e;return r(this,function(t){switch(t.label){case 0:return[4,v()];case 1:return e=t.sent(),U(e),[2]}})})}()},[]);return a.createElement(m,{open:g,fullWidth:!0,maxWidth:"lg"},a.createElement(s,null,"Media Library"),a.createElement(f,null,a.createElement(u,{spacing:2},a.createElement(p,{variant:"body2"},"Upload media to use in your content"),a.createElement(o,{revalidateCallback:function(){t(b,void 0,void 0,function(){var e;return r(this,function(t){switch(t.label){case 0:return[4,v()];case 1:return e=t.sent(),U(e),[2]}})})}}),a.createElement(d,null),a.createElement(p,{variant:"body2"},"Select media to use in your content"),S&&a.createElement(l,{mediaArray:S,selected:j,handleSelect:k}))),a.createElement(h,null,a.createElement(c,{variant:"outlined",onClick:C},"Close"),j.length>0&&a.createElement(c,{variant:"contained",onClick:y},"Use selected file".concat(j.length>1?"s":""))))}export{E as MediaLibraryDialog};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__read as e}from"../../../../node_modules/tslib/tslib.es6.js";import t,{useState as r,useRef as n,useEffect as l}from"react";import a from"@mui/material/Stack";import i from"@mui/material/Typography";import o from"@mui/material/Box";import{useFormState as m}from"react-dom";import{uploadBase64MediaAction as c}from"../../../data/actions/media/uploadBase64MediaAction.js";import{StrapiErrors as p}from"../../StrapiErrors.js";import{ZodErrors as u}from"../../ZodErrors.js";import d from"@mui/material/Alert";import{SubmitButton as s}from"../../SubmitButton.js";var f={zodErrors:null,strapiErrors:null,data:null,message:null};function E(E){var v,y=E.reference,g=E.refID,x=void 0===g?0:g,h=E.field,b=E.multiple,j=void 0===b||b,k=E.accept,w=void 0===k?"image/*":k,C=E.path,I=void 0===C?"api/ipos":C,O=E.componentName,_=void 0===O?"":O,B=E.componentReference,R=E.revalidateCallback,S=e(r(null),2),z=S[0],A=S[1],H=e(r(null),2),L=H[0],N=H[1],T=c.bind(null,I,x,_),U=e(m(T,f),2),D=U[0],F=U[1],M=n(null);return l(
|
|
7
|
+
import{__read as e}from"../../../../node_modules/tslib/tslib.es6.js";import t,{useState as r,useRef as n,useEffect as l}from"react";import a from"@mui/material/Stack";import i from"@mui/material/Typography";import o from"@mui/material/Box";import{useFormState as m}from"react-dom";import{uploadBase64MediaAction as c}from"../../../data/actions/media/uploadBase64MediaAction.js";import{StrapiErrors as p}from"../../StrapiErrors.js";import{ZodErrors as u}from"../../ZodErrors.js";import d from"@mui/material/Alert";import{SubmitButton as s}from"../../SubmitButton.js";var f={zodErrors:null,strapiErrors:null,data:null,message:null};function E(E){var v,y=E.reference,g=E.refID,x=void 0===g?0:g,h=E.field,b=E.multiple,j=void 0===b||b,k=E.accept,w=void 0===k?"image/*":k,C=E.path,I=void 0===C?"api/ipos":C,O=E.componentName,_=void 0===O?"":O,B=E.componentReference,R=E.revalidateCallback,S=e(r(null),2),z=S[0],A=S[1],H=e(r(null),2),L=H[0],N=H[1],T=c.bind(null,I,x,_),U=e(m(T,f),2),D=U[0],F=U[1],M=n(null);return l(function(){D.data&&R&&R()},[D.data]),t.createElement("form",{action:F,id:h},t.createElement(o,{sx:[z&&z.length>0&&{border:"2px solid red",p:1}]},t.createElement(a,{spacing:1,sx:{flex:1}},y&&t.createElement("input",{type:"text",name:"ref",value:y,style:{display:"none"},readOnly:!0}),x&&t.createElement("input",{type:"text",name:"refId",value:x,style:{display:"none"},readOnly:!0})," ",h&&t.createElement("input",{type:"text",name:"field",value:h,style:{display:"none"},readOnly:!0}),t.createElement("input",{id:"component_name",type:"hidden",name:"".concat(_,".__component"),value:B}),null!==z?t.createElement(o,{onClick:function(){var e;return null===(e=M.current)||void 0===e?void 0:e.click()},sx:{p:2,width:"100%",border:"1px dashed white",minHeight:"100px"}},void 0===w||"image/*"===w?t.createElement(a,{direction:"row",spacing:1,justifyContent:"flex-end"},z.map(function(e,r){return t.createElement("img",{key:r,src:e.url,alt:e.name,style:{width:"100px"}})})):t.createElement(a,{spacing:1,justifyContent:"flex-end"},z.map(function(e,r){return t.createElement(i,{key:r},e.name)}))):t.createElement(o,{onClick:function(){var e;return null===(e=M.current)||void 0===e?void 0:e.click()},sx:{p:2,width:"100%",border:"1px dashed white",minHeight:"100px",cursor:"pointer"}},t.createElement(i,null,"No file","".concat(j?"s":"")," selected for upload")),t.createElement(a,{direction:"column",spacing:2,alignItems:"center",justifyContent:"space-between"},t.createElement(p,{error:D.strapiErrors}),t.createElement(u,{error:null===(v=D.zodErrors)||void 0===v?void 0:v.image}),(null==D?void 0:D.message)&&t.createElement(d,{severity:"error"},null==D?void 0:D.message),t.createElement(o,null,t.createElement("label",{htmlFor:"pictureInput"},t.createElement("input",{id:"pictureInput",accept:w,multiple:j,type:"file",name:"files",ref:M,onChange:function(e){var t=e.target.files;if(null!==t){var r=Object.keys(t).map(function(e,r){return{url:URL.createObjectURL(t[r]),name:t[r].name}});N(t),A(r)}},style:{display:"none"}})),null!==L&&t.createElement(s,{text:"upload",loadingText:"loading"}))))))}export{E as UploadBase64MediaForm};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__read as e}from"../../../../node_modules/tslib/tslib.es6.js";import t,{useState as r,useRef as n,useEffect as l}from"react";import{useFormState as a}from"react-dom";import{uploadMediaAction as i}from"../../../data/actions/media/uploadMediaAction.js";import{StrapiErrors as m}from"../../StrapiErrors.js";import{ZodErrors as o}from"../../ZodErrors.js";import{SubmitButton as c}from"../../SubmitButton.js";import u from"@mui/material/Stack";import s from"@mui/material/Typography";import p from"@mui/material/Box";import d from"@mui/material/Grid";import f from"@mui/material/Alert";var E={zodErrors:null,strapiErrors:null,data:null,message:null};function y(y){var v,g=y.reference,x=y.refID,h=y.field,k=y.multiple,b=void 0===k||k,j=y.accept,w=void 0===j?"image/*":j,C=y.revalidateCallback,I=e(r(null),2),O=I[0],S=I[1],z=e(r(null),2),A=z[0],B=z[1],H=e(a(i,E),2),L=H[0],R=H[1],T=n(null);return l(
|
|
7
|
+
import{__read as e}from"../../../../node_modules/tslib/tslib.es6.js";import t,{useState as r,useRef as n,useEffect as l}from"react";import{useFormState as a}from"react-dom";import{uploadMediaAction as i}from"../../../data/actions/media/uploadMediaAction.js";import{StrapiErrors as m}from"../../StrapiErrors.js";import{ZodErrors as o}from"../../ZodErrors.js";import{SubmitButton as c}from"../../SubmitButton.js";import u from"@mui/material/Stack";import s from"@mui/material/Typography";import p from"@mui/material/Box";import d from"@mui/material/Grid";import f from"@mui/material/Alert";var E={zodErrors:null,strapiErrors:null,data:null,message:null};function y(y){var v,g=y.reference,x=y.refID,h=y.field,k=y.multiple,b=void 0===k||k,j=y.accept,w=void 0===j?"image/*":j,C=y.revalidateCallback,I=e(r(null),2),O=I[0],S=I[1],z=e(r(null),2),A=z[0],B=z[1],H=e(a(i,E),2),L=H[0],R=H[1],T=n(null);return l(function(){L.data&&(null==C||C())},[L.data]),t.createElement("form",{action:R},t.createElement(u,{spacing:1,sx:{flex:1}},g&&t.createElement("input",{type:"text",name:"ref",value:g,style:{display:"none"},readOnly:!0}),x&&t.createElement("input",{type:"text",name:"refId",value:x,style:{display:"none"},readOnly:!0}),h&&t.createElement("input",{type:"text",name:"field",value:h,style:{display:"none"},readOnly:!0}),null!==O?t.createElement(p,{onClick:function(){var e;return null===(e=T.current)||void 0===e?void 0:e.click()},sx:{p:2,width:"100%",border:"1px dashed white",minHeight:"100px"}},void 0===w||"image/*"===w?t.createElement(d,{container:!0},O.map(function(e,r){return t.createElement(d,{item:!0,key:r,xs:12,sm:6,md:4,lg:2},t.createElement("img",{key:r,src:e.url,alt:e.name,style:{width:"100px"}}))})):t.createElement(d,{container:!0},O.map(function(e,r){return t.createElement(d,{item:!0,key:r,xs:12,sm:6,md:4,lg:2},t.createElement(s,null,e.name))}))):t.createElement(p,{onClick:function(){var e;return null===(e=T.current)||void 0===e?void 0:e.click()},sx:{p:2,width:"100%",border:"1px dashed white",minHeight:"100px",cursor:"pointer"}},t.createElement(s,null,"No file","".concat(b?"s":"")," selected, click here to start uploading new files")),t.createElement(u,{direction:"column",spacing:2,alignItems:"center",justifyContent:"space-between"},t.createElement(m,{error:L.strapiErrors}),t.createElement(o,{error:null===(v=L.zodErrors)||void 0===v?void 0:v.image}),(null==L?void 0:L.message)&&t.createElement(f,{severity:"error"},null==L?void 0:L.message),t.createElement(p,null,t.createElement("label",{htmlFor:"pictureInput"},t.createElement("input",{id:"pictureInput",accept:w,multiple:b,type:"file",name:"files",ref:T,onChange:function(e){var t=e.target.files;if(null!==t){var r=Object.keys(t).map(function(e,r){return{url:URL.createObjectURL(t[r]),name:t[r].name}});B(t),S(r)}},style:{display:"none"}})),null!==A&&t.createElement(c,{text:"upload",loadingText:"loading"})))))}export{y as UploadMediaForm};
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* @copyright Jelle Paulus
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
|
-
import{__spreadArray as e,__read as t}from"../../../../node_modules/tslib/tslib.es6.js";import n from"react";import r from"@mui/material/Snackbar";import o from"@mui/material/Alert";import i from"@mui/material/Box";import{useSnackbar as a}from"../../../context/common/SnackbarContext.js";function m(){var m=a(),s=m.state,c=m.dispatch,l=s.messages.filter(
|
|
6
|
+
import{__spreadArray as e,__read as t}from"../../../../node_modules/tslib/tslib.es6.js";import n from"react";import r from"@mui/material/Snackbar";import o from"@mui/material/Alert";import i from"@mui/material/Box";import{useSnackbar as a}from"../../../context/common/SnackbarContext.js";function m(){var m=a(),s=m.state,c=m.dispatch,l=s.messages.filter(function(e){return!0===e.open}),u=function(n,r,o){if("clickaway"!==r){var i=e([],t(s.messages),!1),a=i.findIndex(function(e){return e.id===o});i[a].open=!1,c({type:"ADD_MESSAGE",payload:i})}};return n.createElement(i,null,l&&l.length>0&&l.map(function(e,t){return n.createElement(r,{key:t,open:e.open,autoHideDuration:3e3,onClose:function(t,n){return u(0,n,e.id)},sx:{translate:"0px -".concat(60*t,"px"),minWidth:"400px"}},n.createElement(o,{onClose:function(t){return u(0,"clickaway",e.id)},severity:e.severity,sx:{width:"100%"}},e.message))}))}export{m as default};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import e from"@mui/material/Box";import t from"@mui/material/Table";import r from"@mui/material/TableBody";import a from"@mui/material/TableRow";import l from"@mui/material/TableCell";import m from"@mui/material/TableFooter";import o from"@mui/material/Typography";import i from"@mui/material/useMediaQuery";import n from"@mui/material/CircularProgress";import{useTheme as c}from"@mui/material/styles";import s from"./CartSummaryRow.js";import{useClientSideCart as p}from"./hooks.js";import u from"react";var x=function(){var x=p(),f=x.state,E=x.isClient,T=c(),d=i(T.breakpoints.down("sm"));return E?u.createElement(e,{sx:{p:{xs:1,md:2}}},f.items.length>0?u.createElement(t,null,u.createElement(r,null,f.items.map(
|
|
7
|
+
import e from"@mui/material/Box";import t from"@mui/material/Table";import r from"@mui/material/TableBody";import a from"@mui/material/TableRow";import l from"@mui/material/TableCell";import m from"@mui/material/TableFooter";import o from"@mui/material/Typography";import i from"@mui/material/useMediaQuery";import n from"@mui/material/CircularProgress";import{useTheme as c}from"@mui/material/styles";import s from"./CartSummaryRow.js";import{useClientSideCart as p}from"./hooks.js";import u from"react";var x=function(){var x=p(),f=x.state,E=x.isClient,T=c(),d=i(T.breakpoints.down("sm"));return E?u.createElement(e,{sx:{p:{xs:1,md:2}}},f.items.length>0?u.createElement(t,null,u.createElement(r,null,f.items.map(function(e){return u.createElement(s,{key:e.id,data:e})})),u.createElement(m,null,u.createElement(a,null,!d&&u.createElement(l,{sx:{p:{xs:1,sm:2}}}),u.createElement(l,{sx:{p:{xs:1,sm:2}},colSpan:d?2:1}),d?u.createElement(u.Fragment,null,u.createElement(l,{colSpan:2,align:"right",sx:{color:"#555",padding:1}},u.createElement(o,{sx:{fontSize:14}},"Total "),u.createElement(o,{sx:{fontSize:14}},"excl VAT: € ",f.totalExVAT.toFixed(2)),u.createElement(o,{sx:{fontSize:14}},"incl VAT: € ",f.totalInclVAT.toFixed(2)))):u.createElement(u.Fragment,null,u.createElement(l,{colSpan:1,align:"right",sx:{color:"#555"}},"Total excl VAT: € ",f.totalExVAT.toFixed(2)),u.createElement(l,{colSpan:2,align:"right",sx:{color:"#555",fontSize:16,fontWeight:600}},"Total: € ",f.totalInclVAT.toFixed(2)))))):u.createElement(o,{variant:"body1"},"No products in cart")):u.createElement(n,null)};export{x as default};
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* @copyright Jelle Paulus
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
|
-
import{__read as t}from"../../../../node_modules/tslib/tslib.es6.js";import{useState as r,useEffect as e}from"react";import{useCart as o}from"../../../context/e-commerce/cart/CartContext.js";var i=function(){var i=t(r(!1),2),s=i[0],a=i[1],c=o(),m=c.state,n=c.dispatch;return e(
|
|
6
|
+
import{__read as t}from"../../../../node_modules/tslib/tslib.es6.js";import{useState as r,useEffect as e}from"react";import{useCart as o}from"../../../context/e-commerce/cart/CartContext.js";var i=function(){var i=t(r(!1),2),s=i[0],a=i[1],c=o(),m=c.state,n=c.dispatch;return e(function(){a(!0)},[]),{state:m,dispatch:n,isClient:s}};export{i as useClientSideCart};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__read as e,__spreadArray as r}from"../../../../node_modules/tslib/tslib.es6.js";import t,{useEffect as a}from"react";import o from"@mui/material/Box";import i from"@mui/material/Stack";import m from"@mui/material/TextField";import n from"@mui/material/Typography";import{Button as s}from"@mui/material";import{SubmitButton as c}from"../../SubmitButton.js";import{useFormState as l}from"react-dom";import{createCategoryAction as d}from"../../../data/actions/e-commerce/categories/createCategoryAction.js";import u from"@mui/material/Grid";import p from"../products/ProductSelector.js";import E from"../../common/markdown/MarkdownEditor.js";import{useSnackbar as g}from"../../../context/common/SnackbarContext.js";var y={zodErrors:null,strapiErrors:null,data:null,message:null,severity:null};function f(f){var v=f.productNamesArray,x=f.revalidateCallback,C=f.sx,b=f.handleClose,h=e(l(d,y),2),j=h[0],k=h[1],A=g().handleAddMessage;return a(
|
|
7
|
+
import{__read as e,__spreadArray as r}from"../../../../node_modules/tslib/tslib.es6.js";import t,{useEffect as a}from"react";import o from"@mui/material/Box";import i from"@mui/material/Stack";import m from"@mui/material/TextField";import n from"@mui/material/Typography";import{Button as s}from"@mui/material";import{SubmitButton as c}from"../../SubmitButton.js";import{useFormState as l}from"react-dom";import{createCategoryAction as d}from"../../../data/actions/e-commerce/categories/createCategoryAction.js";import u from"@mui/material/Grid";import p from"../products/ProductSelector.js";import E from"../../common/markdown/MarkdownEditor.js";import{useSnackbar as g}from"../../../context/common/SnackbarContext.js";var y={zodErrors:null,strapiErrors:null,data:null,message:null,severity:null};function f(f){var v=f.productNamesArray,x=f.revalidateCallback,C=f.sx,b=f.handleClose,h=e(l(d,y),2),j=h[0],k=h[1],A=g().handleAddMessage;return a(function(){(null==j?void 0:j.message)&&(A({message:j.message||"Error creating category",severity:j.severity||"error"}),"success"===j.severity&&(x&&x(),b&&b()))},[null==j?void 0:j.message]),a(function(){(null==j?void 0:j.strapiErrors)&&A({message:j.strapiErrors.message||"Error creating category",severity:j.severity||"error"})},[null==j?void 0:j.strapiErrors]),t.createElement(o,{sx:r([],e(Array.isArray(C)?C:[C]),!1)},t.createElement("form",{action:k},t.createElement(u,{container:!0,spacing:2},t.createElement(u,{item:!0,xs:12},t.createElement(i,{spacing:2},t.createElement(n,{variant:"h3",component:"h1"},"Add Category"),t.createElement(n,{variant:"body2"},"Create a new category for your products. You can add products to this category later."))),t.createElement(u,{item:!0,xs:12},t.createElement(i,{spacing:2},t.createElement(m,{id:"title",name:"title",label:"Title"}),t.createElement(E,{name:"description",label:"Description"}))),t.createElement(u,{item:!0,xs:12},t.createElement(n,{variant:"h6"},"Products"),t.createElement(p,{productNames:v,currentValue:[]})),t.createElement(u,{item:!0,xs:12},t.createElement(i,{direction:"row",justifyContent:"space-between",alignItems:"center",sx:{pt:2}},b&&t.createElement(s,{onClick:b,variant:"outlined"},"Cancel"),t.createElement(c,{text:"Create category",loadingText:"Loading...",variant:"contained"}))))))}export{f as AddCategoryForm};
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* @copyright Jelle Paulus
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
|
-
import{extends as e}from"../../../../_virtual/_rollupPluginBabelHelpers.js";import{__read as t}from"../../../../node_modules/tslib/tslib.es6.js";import r,{useState as n}from"react";import i from"@mui/material/Autocomplete";import l from"@mui/material/TextField";var o=function(o){var u=o.categories,a=o.currentValue,m=t(n(a||[]),2),c=m[0],p=m[1];return r.createElement(r.Fragment,null,r.createElement(i,{multiple:!0,options:u,getOptionLabel:function(e){return e.title},filterSelectedOptions:!0,onChange:function(e,t){t.map(
|
|
6
|
+
import{extends as e}from"../../../../_virtual/_rollupPluginBabelHelpers.js";import{__read as t}from"../../../../node_modules/tslib/tslib.es6.js";import r,{useState as n}from"react";import i from"@mui/material/Autocomplete";import l from"@mui/material/TextField";var o=function(o){var u=o.categories,a=o.currentValue,m=t(n(a||[]),2),c=m[0],p=m[1];return r.createElement(r.Fragment,null,r.createElement(i,{multiple:!0,options:u,getOptionLabel:function(e){return e.title},filterSelectedOptions:!0,onChange:function(e,t){t.map(function(e){return e.id}),p(t.map(function(e){return e.id}))},renderInput:function(t){return r.createElement(l,e({},t,{label:"Category"}))},value:u.filter(function(e){return c.includes(e.id)})}),r.createElement("input",{type:"hidden",name:"categories",value:JSON.stringify(c)||""}))};export{o as default};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__read as e,__spreadArray as t}from"../../../../node_modules/tslib/tslib.es6.js";import r,{useEffect as a}from"react";import i from"@mui/material/Box";import o from"@mui/material/Stack";import m from"@mui/material/TextField";import n from"@mui/material/Typography";import{SubmitButton as l}from"../../SubmitButton.js";import{useFormState as s}from"react-dom";import{updateCategoryAction as c}from"../../../data/actions/e-commerce/categories/updateCategoryAction.js";import d from"@mui/material/Grid";import u from"../products/ProductSelector.js";import p from"../../common/markdown/MarkdownEditor.js";import{useSnackbar as E}from"../../../context/common/SnackbarContext.js";import{Button as g}from"@mui/material";var f={zodErrors:null,strapiErrors:null,data:null,message:null,severity:null};function v(v){var y=v.data,x=v.revalidateCallback,h=v.handleClose,b=v.productNamesArray,C=v.sx,j=y.id,k=y.title,A=y.description;y.slug,y.is_archive;var w=y.products,S=(null==w?void 0:w.data)||[],T=e(s(c,f),2),V=T[0],B=T[1],M=E().handleAddMessage;return a(
|
|
7
|
+
import{__read as e,__spreadArray as t}from"../../../../node_modules/tslib/tslib.es6.js";import r,{useEffect as a}from"react";import i from"@mui/material/Box";import o from"@mui/material/Stack";import m from"@mui/material/TextField";import n from"@mui/material/Typography";import{SubmitButton as l}from"../../SubmitButton.js";import{useFormState as s}from"react-dom";import{updateCategoryAction as c}from"../../../data/actions/e-commerce/categories/updateCategoryAction.js";import d from"@mui/material/Grid";import u from"../products/ProductSelector.js";import p from"../../common/markdown/MarkdownEditor.js";import{useSnackbar as E}from"../../../context/common/SnackbarContext.js";import{Button as g}from"@mui/material";var f={zodErrors:null,strapiErrors:null,data:null,message:null,severity:null};function v(v){var y=v.data,x=v.revalidateCallback,h=v.handleClose,b=v.productNamesArray,C=v.sx,j=y.id,k=y.title,A=y.description;y.slug,y.is_archive;var w=y.products,S=(null==w?void 0:w.data)||[],T=e(s(c,f),2),V=T[0],B=T[1],M=E().handleAddMessage;return a(function(){(null==V?void 0:V.message)&&(M({message:V.message,severity:V.severity||"error"}),"success"===V.severity&&(x&&x(),h&&h()))},[null==V?void 0:V.message]),a(function(){(null==V?void 0:V.strapiErrors)&&M({message:V.strapiErrors.message||"Error updating category",severity:V.severity||"error"})},[null==V?void 0:V.strapiErrors]),r.createElement(i,{sx:t([],e(Array.isArray(C)?C:[C]),!1)},r.createElement("form",{action:B},j&&r.createElement("input",{id:"id",type:"hidden",name:"id",value:j}),r.createElement(d,{container:!0,spacing:2},r.createElement(d,{item:!0,xs:12},r.createElement(o,{spacing:2},r.createElement(n,{variant:"h3",component:"h1"},"Edit Category"),r.createElement(n,{variant:"body2"},"Edit the category for your products. You can add products to this category later."))),r.createElement(d,{item:!0,xs:12},r.createElement(o,{spacing:2},r.createElement(m,{id:"title",name:"title",label:"Title",defaultValue:k}),r.createElement(p,{name:"description",label:"Description",defaultValue:A}))),r.createElement(d,{item:!0,xs:12},r.createElement(n,{variant:"h6"},"Products"),r.createElement(u,{productNames:b,currentValue:t([],e(S.map(function(e){return e.id})),!1)})),r.createElement(d,{item:!0,xs:12}," ",r.createElement(o,{direction:"row",justifyContent:"space-between",alignItems:"center",sx:{pt:2}},h&&r.createElement(g,{onClick:h,variant:"outlined"},"Cancel"),r.createElement(l,{text:"Update category",loadingText:"Loading...",variant:"contained"}))))))}export{v as EditCategoryForm};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{extends as e}from"../../../../_virtual/_rollupPluginBabelHelpers.js";import{__read as t}from"../../../../node_modules/tslib/tslib.es6.js";import r from"@mui/material/Typography";import n from"@mui/material/Container";import l from"@mui/material/Stack";import o from"@mui/material/Grid";import i from"@mui/material/Paper";import a from"@mui/material/Box";import m from"@mui/material/Button";import s from"@mui/material/Stepper";import c from"@mui/material/Step";import u from"@mui/material/StepLabel";import p from"@mui/material/MobileStepper";import d from"@mui/material/Alert";import f from"@mui/material/useMediaQuery";import{useTheme as E}from"@mui/material/styles";import x,{useState as g,useEffect as v,useMemo as b}from"react";import h from"next/link";import{useSearchParams as y}from"next/navigation";import{useSession as k}from"../../../context/auth/SessionContext.js";import B from"@mui/icons-material/KeyboardArrowLeft";import C from"@mui/icons-material/KeyboardArrowRight";import S from"./Step1.js";import _ from"./Step2.js";import A from"./Step3.js";import j from"./Step4.js";import N from"./Step5.js";import{useCheckout as D}from"../../../context/e-commerce/checkout/CheckoutContext.js";import{useCart as P}from"../../../context/e-commerce/cart/CartContext.js";import w from"../../../lib/isCustomerProfileCompleteEnough.js";function z(z){var I=z.shopUrl,O=void 0===I?"/shop":I,T=E(),H=f(T.breakpoints.down("sm")),L=D(),M=L.state,R=L.runAllChecks,V=L.togglePrefersBillingAddress,F=L.togglePrefersDeliveryAddress,K=L.setCustomerInternalReference,G=P().dispatch,Q=k(),U=Q.loading;Q.error;var q=Q.user;Q.login;var J=Q.logout,W=t(g(0),2),X=W[0],Y=W[1],Z=t(g(null),2),$=Z[0],ee=Z[1],te=t(g(null),2),re=te[0],ne=te[1],le=function(){Y(
|
|
7
|
+
import{extends as e}from"../../../../_virtual/_rollupPluginBabelHelpers.js";import{__read as t}from"../../../../node_modules/tslib/tslib.es6.js";import r from"@mui/material/Typography";import n from"@mui/material/Container";import l from"@mui/material/Stack";import o from"@mui/material/Grid";import i from"@mui/material/Paper";import a from"@mui/material/Box";import m from"@mui/material/Button";import s from"@mui/material/Stepper";import c from"@mui/material/Step";import u from"@mui/material/StepLabel";import p from"@mui/material/MobileStepper";import d from"@mui/material/Alert";import f from"@mui/material/useMediaQuery";import{useTheme as E}from"@mui/material/styles";import x,{useState as g,useEffect as v,useMemo as b}from"react";import h from"next/link";import{useSearchParams as y}from"next/navigation";import{useSession as k}from"../../../context/auth/SessionContext.js";import B from"@mui/icons-material/KeyboardArrowLeft";import C from"@mui/icons-material/KeyboardArrowRight";import S from"./Step1.js";import _ from"./Step2.js";import A from"./Step3.js";import j from"./Step4.js";import N from"./Step5.js";import{useCheckout as D}from"../../../context/e-commerce/checkout/CheckoutContext.js";import{useCart as P}from"../../../context/e-commerce/cart/CartContext.js";import w from"../../../lib/isCustomerProfileCompleteEnough.js";function z(z){var I=z.shopUrl,O=void 0===I?"/shop":I,T=E(),H=f(T.breakpoints.down("sm")),L=D(),M=L.state,R=L.runAllChecks,V=L.togglePrefersBillingAddress,F=L.togglePrefersDeliveryAddress,K=L.setCustomerInternalReference,G=P().dispatch,Q=k(),U=Q.loading;Q.error;var q=Q.user;Q.login;var J=Q.logout,W=t(g(0),2),X=W[0],Y=W[1],Z=t(g(null),2),$=Z[0],ee=Z[1],te=t(g(null),2),re=te[0],ne=te[1],le=function(){Y(function(e){return e+1})},oe=function(){Y(function(e){return e-1})},ie=y();v(function(){if(null!==ie){var e=ie.get("order");e&&ee(e);var t=ie.get("message"),r=ie.get("severity");t&&r&&ne({message:t,severity:r})}},[ie]),v(function(){$&&(Y(4),localStorage.removeItem("cart"),G({type:"SET_ITEMS",payload:[]}))},[$]),v(function(){q&&(console.log("checkout change in user"),R())},[q]);var ae=!M.confirmations.itemsInCart,me=b(function(){return null!==(null==q?void 0:q.customer_profile)&&w(null==q?void 0:q.customer_profile)},[null==q?void 0:q.customer_profile]),se=b(function(){return[{label:"Login or register",children:x.createElement(S,{user:q,logout:J}),backButton:x.createElement(m,{variant:H?"text":"outlined",disabled:0===X,onClick:oe,sx:{mr:1}},"Back",H&&x.createElement(B,null)),nextButton:x.createElement(m,{variant:H?"text":"contained",onClick:le,sx:{ml:1},disabled:(!q||ae)&&"production"===process.env.NODE_ENV,size:H?"small":"large"},"Next",H&&x.createElement(C,null))},{label:"Provide us with your address",children:x.createElement(_,null),backButton:x.createElement(m,{size:H?"small":"large",onClick:oe,disabled:0===X,variant:H?"text":"outlined"},"Back",H&&x.createElement(B,null)),nextButton:x.createElement(m,{size:H?"small":"large",variant:H?"text":"contained",onClick:function(){le()},disabled:(!q||ae||!me)&&"production"===process.env.NODE_ENV},"Next",H&&x.createElement(C,null))},{label:"Set up mailing options",children:x.createElement(A,{user:q,prefersBillingAddress:M.prefersBillingAddress,prefersDeliveryAddress:M.prefersDeliveryAddress,delivery_options:M.delivery_options,payment_options:M.payment_options,togglePrefersBillingAddress:V,togglePrefersDeliveryAddress:F,setCustomerInternalReference:K}),backButton:x.createElement(m,{size:H?"small":"large",variant:H?"text":"outlined",onClick:oe,disabled:0===X},"Back",H&&x.createElement(B,null)),nextButton:x.createElement(m,{size:H?"small":"large",variant:H?"text":"contained",onClick:function(){le()},disabled:(!q||ae||!me)&&"production"===process.env.NODE_ENV},"Next",H&&x.createElement(C,null))},{label:"Confirm and make a payment",children:x.createElement(j,{customer_reference:M.customer_reference}),nextButton:x.createElement(x.Fragment,null,x.createElement(m,{size:H?"small":"large",variant:H?"text":"contained",onClick:function(){le()},disabled:!0},"Next",H&&x.createElement(C,null))),backButton:x.createElement(m,{size:H?"small":"large",variant:H?"text":"outlined",onClick:oe,disabled:0===X},"Back",H&&x.createElement(B,null))},{label:"Done!",children:x.createElement(N,null)}]},[q,ae,me,M,H,X]);return x.createElement(n,{sx:{py:2,minHeight:"100vh"}},x.createElement(o,{container:!0,spacing:2,sx:{py:3,minHeight:"60vh"}},x.createElement(o,{item:!0,xs:12},x.createElement(r,{variant:"h4",align:"center"},"Check Out")),ae&&4!=X&&x.createElement(o,{item:!0,xs:12},x.createElement(d,{severity:"error"},x.createElement(r,{variant:"h5"},"No products in cart"),x.createElement(r,{variant:"body1"},"There are no products selected to order, please visit the shop befor continuing"))),null!=re&&x.createElement(o,{item:!0,xs:12},x.createElement(d,{severity:re.severity},x.createElement(r,{variant:"body1"},re.message))),x.createElement(o,{item:!0,xs:12},x.createElement(a,{width:"100%"},x.createElement(i,{sx:{p:2,mb:2,display:{xs:"block",sm:"none"}}},x.createElement(l,{direction:"row",spacing:2,alignItems:"center"},x.createElement(r,{variant:"body2"},"".concat(X+1," / ").concat(se.length)),x.createElement(r,null,"".concat(se[X].label)))),x.createElement(i,{sx:{px:2,pt:2,mb:2,display:{xs:"none",sm:"block"}}},x.createElement(s,{activeStep:X},se.map(function(t,r){var n={};return x.createElement(c,e({key:r},{},{sx:{pb:"20px"}}),x.createElement(u,n,t.label))}))),!U&&x.createElement(x.Fragment,null,se[X].children,x.createElement(i,{sx:{p:2,mt:2,display:{xs:"none",sm:"block"}}},x.createElement(l,{direction:"row",spacing:2},se[X].backButton,x.createElement(m,{variant:"outlined",sx:{ml:1}},x.createElement(h,{href:O},"continue shopping")),x.createElement(a,{sx:{flex:"1 1 auto"}}),se[X].nextButton))))),x.createElement(o,{item:!0,xs:12},x.createElement(p,{sx:{display:{xs:"flex",sm:"none"}},variant:"text",steps:se.length,position:"static",activeStep:X,nextButton:se[X].nextButton,backButton:se[X].backButton}))))}export{z as default};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__read as e}from"../../../../node_modules/tslib/tslib.es6.js";import r,{useState as t,useEffect as o}from"react";import i from"@mui/material/Button";import m from"@mui/material/Paper";import l from"@mui/material/Stack";import a from"@mui/material/Box";import n from"@mui/material/CircularProgress";import{useSession as s}from"../../../context/auth/SessionContext.js";import c from"../customer/DenseCustomerProfileDisplay.js";import u from"../customer/CustomerProfileEditForm.js";import p from"../../../lib/isCustomerProfileCompleteEnough.js";function f(){var f=s(),d=f.user,E=f.loading,x=f.error,C=e(t((null==d?void 0:d.customer_profile)?d.customer_profile:null),2),g=C[0],h=C[1],v=p(g),j=e(t(!(g&&v)),2),P=j[0],_=j[1];return E||!d?r.createElement(a,{sx:{display:{xs:"none",md:"flex"},flexGrow:0,position:"relative",width:"40px",height:"40px"}},r.createElement(n,null)):x?r.createElement("p",null,"Error: ",x):(o(
|
|
7
|
+
import{__read as e}from"../../../../node_modules/tslib/tslib.es6.js";import r,{useState as t,useEffect as o}from"react";import i from"@mui/material/Button";import m from"@mui/material/Paper";import l from"@mui/material/Stack";import a from"@mui/material/Box";import n from"@mui/material/CircularProgress";import{useSession as s}from"../../../context/auth/SessionContext.js";import c from"../customer/DenseCustomerProfileDisplay.js";import u from"../customer/CustomerProfileEditForm.js";import p from"../../../lib/isCustomerProfileCompleteEnough.js";function f(){var f=s(),d=f.user,E=f.loading,x=f.error,C=e(t((null==d?void 0:d.customer_profile)?d.customer_profile:null),2),g=C[0],h=C[1],v=p(g),j=e(t(!(g&&v)),2),P=j[0],_=j[1];return E||!d?r.createElement(a,{sx:{display:{xs:"none",md:"flex"},flexGrow:0,position:"relative",width:"40px",height:"40px"}},r.createElement(n,null)):x?r.createElement("p",null,"Error: ",x):(o(function(){h((null==d?void 0:d.customer_profile)?d.customer_profile:null)},[d]),r.createElement(m,{sx:{p:2}},P?r.createElement(l,{spacing:2},r.createElement(u,{data:g}),r.createElement(i,{variant:"contained",onClick:function(){_(!1)},disabled:!v},"cancel")):r.createElement(l,{spacing:2},r.createElement(c,{data:g}),r.createElement(i,{variant:"contained",onClick:function(){_(!0)}},"Change address"))))}export{f as default};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__read as e}from"../../../../node_modules/tslib/tslib.es6.js";import t,{Fragment as r}from"react";import a from"@mui/material/Paper";import o from"@mui/material/Stack";import m from"@mui/material/Alert";import n from"@mui/material/Button";import i from"@mui/material/Typography";import{useClientSideCart as l}from"../cart/hooks.js";import c from"../cart/CartSummary.js";import{useFormState as s}from"react-dom";import{checkoutAction as p}from"../../../data/actions/e-commerce/checkout-action.js";import{StrapiErrors as u}from"../../StrapiErrors.js";function d(d){var y=d.customer_reference,f=l(),E=f.state;f.isClient;var h=e(s(p,{zodErrors:null,strapiErrors:null,data:null,message:null}),2),v=h[0],g=h[1];return t.createElement(a,{sx:{p:2}},t.createElement(o,{spacing:2},t.createElement(c,null),t.createElement(u,{error:null==v?void 0:v.strapiErrors}),(null==v?void 0:v.message)&&t.createElement(m,{severity:"error"},null==v?void 0:v.message),t.createElement(i,null,"Please double check all details prior to payment. ",y),t.createElement(i,null,"Is this order compleet?"),t.createElement("form",{id:"paymentform",action:g},E.items&&E.items.map(
|
|
7
|
+
import{__read as e}from"../../../../node_modules/tslib/tslib.es6.js";import t,{Fragment as r}from"react";import a from"@mui/material/Paper";import o from"@mui/material/Stack";import m from"@mui/material/Alert";import n from"@mui/material/Button";import i from"@mui/material/Typography";import{useClientSideCart as l}from"../cart/hooks.js";import c from"../cart/CartSummary.js";import{useFormState as s}from"react-dom";import{checkoutAction as p}from"../../../data/actions/e-commerce/checkout-action.js";import{StrapiErrors as u}from"../../StrapiErrors.js";function d(d){var y=d.customer_reference,f=l(),E=f.state;f.isClient;var h=e(s(p,{zodErrors:null,strapiErrors:null,data:null,message:null}),2),v=h[0],g=h[1];return t.createElement(a,{sx:{p:2}},t.createElement(o,{spacing:2},t.createElement(c,null),t.createElement(u,{error:null==v?void 0:v.strapiErrors}),(null==v?void 0:v.message)&&t.createElement(m,{severity:"error"},null==v?void 0:v.message),t.createElement(i,null,"Please double check all details prior to payment. ",y),t.createElement(i,null,"Is this order compleet?"),t.createElement("form",{id:"paymentform",action:g},E.items&&E.items.map(function(e,a){return t.createElement(r,{key:a},t.createElement("input",{type:"hidden",name:"opo_items[".concat(a,"].product"),value:e.id}),t.createElement("input",{type:"hidden",name:"opo_items[".concat(a,"].ordered_quantity"),value:e.quantity}))}),t.createElement("input",{type:"hidden",name:"customer_reference",value:y}),t.createElement(i,null,"Please click 'Proceed to payment' to proceed to the secure payment page. After completing the payment, you will automatically return to our shop. For any updates on this order, you can always access the latest information in your personal details."),t.createElement(n,{variant:"contained",form:"paymentform",type:"submit"},"Proceed to payment"))))}export{d as default};
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* @copyright Jelle Paulus
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
|
-
import{__read as e,__awaiter as t,__generator as r}from"../../../../node_modules/tslib/tslib.es6.js";import i,{useState as o,useEffect as l}from"react";import{getSingleOrderByUuid as n}from"../../../data/loaders/e-commerce-loaders.js";import{useSearchParams as a}from"next/navigation";import m from"../opo/OpoDisplay.js";import c from"@mui/material/Paper";import s from"@mui/material/Stack";import u from"@mui/material/Typography";import d from"@mui/material/useMediaQuery";import p from"@mui/icons-material/MoreVert";import f from"@mui/icons-material/ListAlt";import h from"@mui/icons-material/AccountCircle";import{useTheme as v}from"@mui/material/styles";function E(){var E=a(),g=e(o(null),2),y=g[0],b=g[1],x=null!==E?E.get("order"):null,k=v(),A=d(k.breakpoints.down("md"));return l(
|
|
6
|
+
import{__read as e,__awaiter as t,__generator as r}from"../../../../node_modules/tslib/tslib.es6.js";import i,{useState as o,useEffect as l}from"react";import{getSingleOrderByUuid as n}from"../../../data/loaders/e-commerce-loaders.js";import{useSearchParams as a}from"next/navigation";import m from"../opo/OpoDisplay.js";import c from"@mui/material/Paper";import s from"@mui/material/Stack";import u from"@mui/material/Typography";import d from"@mui/material/useMediaQuery";import p from"@mui/icons-material/MoreVert";import f from"@mui/icons-material/ListAlt";import h from"@mui/icons-material/AccountCircle";import{useTheme as v}from"@mui/material/styles";function E(){var E=a(),g=e(o(null),2),y=g[0],b=g[1],x=null!==E?E.get("order"):null,k=v(),A=d(k.breakpoints.down("md"));return l(function(){!function(){t(this,void 0,void 0,function(){var e;return r(this,function(t){switch(t.label){case 0:return x?[4,n(x)]:[3,2];case 1:e=t.sent(),b(e.error?null:e),t.label=2;case 2:return[2]}})})}()},[x]),x&&null!==y?y?i.createElement(c,{sx:{p:2}},i.createElement(s,{spacing:2},y&&i.createElement(m,{opo:y}),i.createElement(u,{variant:"h6"},"Thank you for shopping with us!"),i.createElement(u,null,"You are always able to access your information and documents in your personal details."),A?i.createElement(u,null,"Click on the ",i.createElement(p,{sx:{verticalAlign:"middle"}})," icon in the top-right bottom of the screen, then click on"," ",i.createElement(f,{sx:{verticalAlign:"middle"}})," Orders"):i.createElement(u,null,"Hover over the"," ",i.createElement(h,{sx:{verticalAlign:"middle"}})," icon in the top-right corner of the screen, then click on"," ",i.createElement(f,{sx:{verticalAlign:"middle"}})," Orders"))):i.createElement("div",null,"Loading..."):i.createElement("div",null,"No order to display...")}export{E as default};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__read as e,__assign as n}from"../../../../node_modules/tslib/tslib.es6.js";import a,{useState as t,useEffect as o}from"react";import c from"@mui/material/Typography";import m from"@mui/material/Stack";import i from"@mui/material/Box";import r from"@mui/material/TextField";import l from"@mui/icons-material/BusinessCenter";function u(e){var n=e.data,t=n.company_name,o=n.business_entity_name,r=n.coc_number,u=n.vat_number,d=n.eori_number,b=n.vat_valid,_=n.eori_valid;return a.createElement(m,{spacing:2,direction:"row"},a.createElement(l,null),a.createElement(i,null,a.createElement(c,{variant:"h6",component:"p"},t),a.createElement(c,{variant:"body2",component:"p"},o),a.createElement(c,{variant:"body2",component:"p"},r),a.createElement(m,{direction:"row",spacing:1},a.createElement(c,{variant:"body2",component:"p"},u),!1===b&&a.createElement(c,{variant:"body2",component:"p",color:"red"},"Could not validate VAT number")),a.createElement(m,{direction:"row",spacing:1},a.createElement(c,{variant:"body2",component:"p"},d),!1===_&&a.createElement(c,{variant:"body2",component:"p",color:"red"},"Could not validate EORI number"))))}function d(c){var i,u=c.data,d=c.componentName,b=c.componentReference,_=c.disabled,s=void 0!==_&&_,p=e(t(((i={})["".concat(d,"id")]=(null==u?void 0:u.id)||"",i["".concat(d,".company_name")]=(null==u?void 0:u.company_name)||"",i["".concat(d,".business_entity_name")]=(null==u?void 0:u.business_entity_name)||"",i["".concat(d,".coc_number")]=(null==u?void 0:u.coc_number)||"",i["".concat(d,".vat_number")]=(null==u?void 0:u.vat_number)||"",i["".concat(d,".eori_number")]=(null==u?void 0:u.eori_number)||"",i)),2),v=p[0],y=p[1],E=function(e){var a=e.target,t=a.name,o=a.value;y(
|
|
7
|
+
import{__read as e,__assign as n}from"../../../../node_modules/tslib/tslib.es6.js";import a,{useState as t,useEffect as o}from"react";import c from"@mui/material/Typography";import m from"@mui/material/Stack";import i from"@mui/material/Box";import r from"@mui/material/TextField";import l from"@mui/icons-material/BusinessCenter";function u(e){var n=e.data,t=n.company_name,o=n.business_entity_name,r=n.coc_number,u=n.vat_number,d=n.eori_number,b=n.vat_valid,_=n.eori_valid;return a.createElement(m,{spacing:2,direction:"row"},a.createElement(l,null),a.createElement(i,null,a.createElement(c,{variant:"h6",component:"p"},t),a.createElement(c,{variant:"body2",component:"p"},o),a.createElement(c,{variant:"body2",component:"p"},r),a.createElement(m,{direction:"row",spacing:1},a.createElement(c,{variant:"body2",component:"p"},u),!1===b&&a.createElement(c,{variant:"body2",component:"p",color:"red"},"Could not validate VAT number")),a.createElement(m,{direction:"row",spacing:1},a.createElement(c,{variant:"body2",component:"p"},d),!1===_&&a.createElement(c,{variant:"body2",component:"p",color:"red"},"Could not validate EORI number"))))}function d(c){var i,u=c.data,d=c.componentName,b=c.componentReference,_=c.disabled,s=void 0!==_&&_,p=e(t(((i={})["".concat(d,"id")]=(null==u?void 0:u.id)||"",i["".concat(d,".company_name")]=(null==u?void 0:u.company_name)||"",i["".concat(d,".business_entity_name")]=(null==u?void 0:u.business_entity_name)||"",i["".concat(d,".coc_number")]=(null==u?void 0:u.coc_number)||"",i["".concat(d,".vat_number")]=(null==u?void 0:u.vat_number)||"",i["".concat(d,".eori_number")]=(null==u?void 0:u.eori_number)||"",i)),2),v=p[0],y=p[1],E=function(e){var a=e.target,t=a.name,o=a.value;y(function(e){var a;return n(n({},e),((a={})[t]=o,a))})};return o(function(){var e;y(((e={})["".concat(d,".id")]=(null==u?void 0:u.id)||"",e["".concat(d,".company_name")]=(null==u?void 0:u.company_name)||"",e["".concat(d,".business_entity_name")]=(null==u?void 0:u.business_entity_name)||"",e["".concat(d,".coc_number")]=(null==u?void 0:u.coc_number)||"",e["".concat(d,".vat_number")]=(null==u?void 0:u.vat_number)||"",e["".concat(d,".eori_number")]=(null==u?void 0:u.eori_number)||"",e))},[u]),a.createElement(m,{spacing:1,direction:"row"},a.createElement(l,null),a.createElement(m,{spacing:1,sx:{flex:1}},a.createElement("input",{id:"component_name",type:"hidden",name:"".concat(d,".__component"),value:b}),v.id&&a.createElement("input",{id:"component_id",type:"hidden",name:"".concat(d,".id"),value:v["".concat(d,".id")]}),a.createElement(r,{id:"company_name",name:"".concat(d,".company_name"),label:"Company Name",value:v["".concat(d,".company_name")],onChange:E,disabled:s}),a.createElement(r,{id:"business_entity_name",name:"".concat(d,".business_entity_name"),label:"Business Entity Name",value:v["".concat(d,".business_entity_name")],onChange:E,disabled:s}),a.createElement(r,{id:"coc_number",name:"".concat(d,".coc_number"),label:"CoC Number",value:v["".concat(d,".coc_number")],onChange:E,disabled:s}),a.createElement(r,{id:"vat_number",name:"".concat(d,".vat_number"),label:"VAT Number",value:v["".concat(d,".vat_number")],onChange:E,disabled:s}),a.createElement(r,{id:"eori_number",name:"".concat(d,".eori_number"),label:"EORI Number",value:v["".concat(d,".eori_number")],onChange:E,disabled:s})))}export{d as BusinessCredentialsFields,u as default};
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* @copyright Jelle Paulus
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
|
-
import{__read as e}from"../../../../node_modules/tslib/tslib.es6.js";import r from"react";import t from"@mui/material/Tooltip";import m from"@mui/material/Typography";import o from"@mui/material/List";import i from"@mui/material/ListItem";import a from"@mui/icons-material/PriorityHigh";import{isCustomerProfileCompleteV2 as l}from"../../../lib/isCustomerProfileCompleteV2.js";var n=function(n){var c=n.customer,s=l(c);return r.createElement(r.Fragment,null," ",!Object.values(s).every(Boolean)&&r.createElement(t,{title:r.createElement(r.Fragment,null,r.createElement(m,{variant:"h6"},"Customer Profile Incomplete"),r.createElement(m,{variant:"body2"},"Please be extra careful when processing this order"),r.createElement(o,{dense:!0},Object.entries(s).map(
|
|
6
|
+
import{__read as e}from"../../../../node_modules/tslib/tslib.es6.js";import r from"react";import t from"@mui/material/Tooltip";import m from"@mui/material/Typography";import o from"@mui/material/List";import i from"@mui/material/ListItem";import a from"@mui/icons-material/PriorityHigh";import{isCustomerProfileCompleteV2 as l}from"../../../lib/isCustomerProfileCompleteV2.js";var n=function(n){var c=n.customer,s=l(c);return r.createElement(r.Fragment,null," ",!Object.values(s).every(Boolean)&&r.createElement(t,{title:r.createElement(r.Fragment,null,r.createElement(m,{variant:"h6"},"Customer Profile Incomplete"),r.createElement(m,{variant:"body2"},"Please be extra careful when processing this order"),r.createElement(o,{dense:!0},Object.entries(s).map(function(t){var m=e(t,2),o=m[0];return m[1]?null:r.createElement(i,{key:o},r.createElement(a,{color:"error"})," ",o)})))},r.createElement(a,{color:"error"})))};export{n as default};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__assign as e}from"../../../../node_modules/tslib/tslib.es6.js";import t from"react";import r from"@mui/material/Paper";import a from"@mui/material/Stack";import n from"@mui/material/Box";import l from"@mui/material/Typography";import m from"@mui/material/Button";import i from"@mui/material/Grid";import o from"@mui/material/Table";import c from"@mui/material/TableBody";import s from"@mui/material/TableCell";import u from"@mui/material/TableHead";import E from"@mui/material/TableRow";import d from"@mui/material/Divider";import p from"@mui/icons-material/Person";import f from"@mui/icons-material/Email";import g from"@mui/icons-material/Phone";import h from"../../common/Address.js";import v from"./BusinessCredentials.js";import{StyledLink as b}from"../../StyledLink.js";import{Alert as y}from"@mui/material";import{usePathname as _}from"next/navigation";function x(x){var w=x.data,A=w.first_name,B=w.last_name,C=w.email,D=w.phone,T=w.company_address,j=w.billing_address,N=w.delivery_address,I=w.business_credentials,P=w.editProfileUrl,S=void 0===P?"/user/profile/edit":P,k=w.completeEnough,z=void 0!==k&&k,O=w.orders,R=w.returns;if(!w)return t.createElement(a,{spacing:2},t.createElement(l,null,"Customer profile not available"));var V=_().includes("/user/");return t.createElement(i,{container:!0,sx:{width:"100%"},spacing:2},t.createElement(i,{item:!0,xs:12},t.createElement(a,{spacing:2},t.createElement(a,{direction:"row",spacing:2,justifyContent:"space-between"},t.createElement(a,{spacing:2,sx:{width:"100%"}},t.createElement(l,{variant:"h3",component:"h1"},V?"Your Profile":"Customer Profile"),!V&&w.customer_number&&t.createElement(l,{variant:"body1"},"Customer Number: ",t.createElement("strong",null,w.customer_number))),V&&t.createElement(t.Fragment,null,Boolean(z)?t.createElement(a,{direction:"row",justifyContent:"flex-end"},t.createElement(b,{href:S,target:"_self"},t.createElement(m,{variant:"contained"},"edit profile"))):t.createElement(y,{severity:"warning",action:t.createElement(b,{href:S,target:"_self"},t.createElement(m,{variant:"contained"},"complete profile"))},"After completion of your profile you can enjoy all the benefits of your services."))),t.createElement(d,null))),t.createElement(i,{item:!0,xs:12},I?t.createElement(v,{data:I}):t.createElement(l,null,"Business credentials not available"),t.createElement(d,{sx:{pt:2}})),t.createElement(i,{item:!0,xs:12},t.createElement(a,{spacing:2,direction:"row"},t.createElement(p,null),t.createElement(n,null,t.createElement(l,{variant:"body1",component:"p"},A," ",B," ",!A&&!B&&"N/A"))),t.createElement(a,{spacing:2,direction:"row"},t.createElement(f,null),t.createElement(n,null,t.createElement(l,{variant:"body1",component:"p"},C," ",!C&&"N/A"))),t.createElement(a,{spacing:2,direction:"row"},t.createElement(g,null),t.createElement(n,null,t.createElement(l,{variant:"body1",component:"p"},D," ",!D&&"N/A"))),t.createElement(d,{sx:{pt:2}})),T?t.createElement(i,{item:!0,xs:12,md:4},t.createElement(l,{variant:"h6"},"Company Address"),t.createElement(h,{data:e({},T)})):t.createElement(i,{item:!0,xs:12,md:4},t.createElement(l,null,"Company address not available")),N?t.createElement(i,{item:!0,xs:12,md:4},t.createElement(l,{variant:"h6"},"Delivery Address"),t.createElement(h,{data:e({},N)})):t.createElement(i,{item:!0,xs:12,md:4},t.createElement(l,null,"Delivery address not available")),j?t.createElement(i,{item:!0,xs:12,md:4},t.createElement(l,{variant:"h6"},"Billing Address"),t.createElement(h,{data:e({},j)})):t.createElement(i,{item:!0,xs:12,md:4},t.createElement(l,null,"Billing address not available")),t.createElement(i,{item:!0,xs:12},t.createElement(l,{variant:"h6",gutterBottom:!0},"Orders"),t.createElement(r,null,O&&O.data&&O.data.length>0?t.createElement(o,null,t.createElement(u,null,t.createElement(E,null,t.createElement(s,null,"Order Number"),t.createElement(s,null,"Date"),t.createElement(s,null,"Status"),t.createElement(s,{align:"right"},"Total"),t.createElement(s,{align:"right"},"Actions"))),t.createElement(c,null,O.data.map(
|
|
7
|
+
import{__assign as e}from"../../../../node_modules/tslib/tslib.es6.js";import t from"react";import r from"@mui/material/Paper";import a from"@mui/material/Stack";import n from"@mui/material/Box";import l from"@mui/material/Typography";import m from"@mui/material/Button";import i from"@mui/material/Grid";import o from"@mui/material/Table";import c from"@mui/material/TableBody";import s from"@mui/material/TableCell";import u from"@mui/material/TableHead";import E from"@mui/material/TableRow";import d from"@mui/material/Divider";import p from"@mui/icons-material/Person";import f from"@mui/icons-material/Email";import g from"@mui/icons-material/Phone";import h from"../../common/Address.js";import v from"./BusinessCredentials.js";import{StyledLink as b}from"../../StyledLink.js";import{Alert as y}from"@mui/material";import{usePathname as _}from"next/navigation";function x(x){var w=x.data,A=w.first_name,B=w.last_name,C=w.email,D=w.phone,T=w.company_address,j=w.billing_address,N=w.delivery_address,I=w.business_credentials,P=w.editProfileUrl,S=void 0===P?"/user/profile/edit":P,k=w.completeEnough,z=void 0!==k&&k,O=w.orders,R=w.returns;if(!w)return t.createElement(a,{spacing:2},t.createElement(l,null,"Customer profile not available"));var V=_().includes("/user/");return t.createElement(i,{container:!0,sx:{width:"100%"},spacing:2},t.createElement(i,{item:!0,xs:12},t.createElement(a,{spacing:2},t.createElement(a,{direction:"row",spacing:2,justifyContent:"space-between"},t.createElement(a,{spacing:2,sx:{width:"100%"}},t.createElement(l,{variant:"h3",component:"h1"},V?"Your Profile":"Customer Profile"),!V&&w.customer_number&&t.createElement(l,{variant:"body1"},"Customer Number: ",t.createElement("strong",null,w.customer_number))),V&&t.createElement(t.Fragment,null,Boolean(z)?t.createElement(a,{direction:"row",justifyContent:"flex-end"},t.createElement(b,{href:S,target:"_self"},t.createElement(m,{variant:"contained"},"edit profile"))):t.createElement(y,{severity:"warning",action:t.createElement(b,{href:S,target:"_self"},t.createElement(m,{variant:"contained"},"complete profile"))},"After completion of your profile you can enjoy all the benefits of your services."))),t.createElement(d,null))),t.createElement(i,{item:!0,xs:12},I?t.createElement(v,{data:I}):t.createElement(l,null,"Business credentials not available"),t.createElement(d,{sx:{pt:2}})),t.createElement(i,{item:!0,xs:12},t.createElement(a,{spacing:2,direction:"row"},t.createElement(p,null),t.createElement(n,null,t.createElement(l,{variant:"body1",component:"p"},A," ",B," ",!A&&!B&&"N/A"))),t.createElement(a,{spacing:2,direction:"row"},t.createElement(f,null),t.createElement(n,null,t.createElement(l,{variant:"body1",component:"p"},C," ",!C&&"N/A"))),t.createElement(a,{spacing:2,direction:"row"},t.createElement(g,null),t.createElement(n,null,t.createElement(l,{variant:"body1",component:"p"},D," ",!D&&"N/A"))),t.createElement(d,{sx:{pt:2}})),T?t.createElement(i,{item:!0,xs:12,md:4},t.createElement(l,{variant:"h6"},"Company Address"),t.createElement(h,{data:e({},T)})):t.createElement(i,{item:!0,xs:12,md:4},t.createElement(l,null,"Company address not available")),N?t.createElement(i,{item:!0,xs:12,md:4},t.createElement(l,{variant:"h6"},"Delivery Address"),t.createElement(h,{data:e({},N)})):t.createElement(i,{item:!0,xs:12,md:4},t.createElement(l,null,"Delivery address not available")),j?t.createElement(i,{item:!0,xs:12,md:4},t.createElement(l,{variant:"h6"},"Billing Address"),t.createElement(h,{data:e({},j)})):t.createElement(i,{item:!0,xs:12,md:4},t.createElement(l,null,"Billing address not available")),t.createElement(i,{item:!0,xs:12},t.createElement(l,{variant:"h6",gutterBottom:!0},"Orders"),t.createElement(r,null,O&&O.data&&O.data.length>0?t.createElement(o,null,t.createElement(u,null,t.createElement(E,null,t.createElement(s,null,"Order Number"),t.createElement(s,null,"Date"),t.createElement(s,null,"Status"),t.createElement(s,{align:"right"},"Total"),t.createElement(s,{align:"right"},"Actions"))),t.createElement(c,null,O.data.map(function(e,r){return t.createElement(E,{key:r},t.createElement(s,null,e.opo_number),t.createElement(s,null,new Date(e.order_date).toLocaleDateString()),t.createElement(s,null,e.status),t.createElement(s,{align:"right"},e.total_incl_vat," ",e.order_currency),t.createElement(s,{align:"right"},V?t.createElement(b,{href:"/user/orders?selectedOpoId=".concat(e.id),target:"_self"},t.createElement(m,{variant:"contained",size:"small"},"View")):t.createElement(b,{href:"/dashboard/admin/e-commerce/opos?selectedOpoId=".concat(e.id),target:"_self"},t.createElement(m,{variant:"contained",size:"small"},"View"))))}))):t.createElement(n,{p:2},V?t.createElement(l,null,"You have no orders."):t.createElement(l,null,"This user has no orders.")))),t.createElement(i,{item:!0,xs:12},t.createElement(l,{variant:"h6",gutterBottom:!0},"Returns"),t.createElement(r,null,R&&R.data&&R.data.length>0?t.createElement(o,null,t.createElement(u,null,t.createElement(E,null,t.createElement(s,null,"Return Number"),t.createElement(s,null,"RMA Number"),t.createElement(s,null,"Date"),t.createElement(s,null,"Status"),t.createElement(s,{align:"right"},"Actions"))),t.createElement(c,null,R.data.map(function(e,r){return t.createElement(E,{key:r},t.createElement(s,null,e.return_number),t.createElement(s,null,e.rma_number),t.createElement(s,null,new Date(e.return_date).toLocaleDateString()),t.createElement(s,null,e.status),t.createElement(s,{align:"right"},V?t.createElement(b,{href:"/user/returns?selectedIroId=".concat(e.id),target:"_self"},t.createElement(m,{variant:"contained",size:"small"},"View")):t.createElement(b,{href:"/dashboard/admin/e-commerce/iros?selectedIroId=".concat(e.id),target:"_self"},t.createElement(m,{variant:"contained",size:"small"},"View"))))}))):t.createElement(n,{p:2},V?t.createElement(l,null,"You have no returns."):t.createElement(l,null,"This user has no returns.")))))}export{x as default};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__read as e,__spreadArray as t}from"../../../../node_modules/tslib/tslib.es6.js";import a from"@mui/material/Box";import r from"@mui/material/Stack";import n from"@mui/material/Grid";import m from"@mui/material/Divider";import l from"@mui/material/TextField";import i from"@mui/material/Typography";import s from"@mui/material/Checkbox";import o from"@mui/material/Button";import{AddressFields as c}from"../../common/Address.js";import{SubmitButton as d}from"../../SubmitButton.js";import{useFormState as u}from"react-dom";import{updateCustomerProfileAction as p}from"../../../data/actions/profile-actions.js";import{BusinessCredentialsFields as E}from"./BusinessCredentials.js";import{useSession as f}from"../../../context/auth/SessionContext.js";import v,{useState as g,useEffect as x}from"react";import{useSnackbar as h}from"../../../context/common/SnackbarContext.js";var b={zodErrors:null,strapiErrors:null,data:null,message:null,severity:null};function y(y){var _=y.data,C=y.sx,j=y.revalidateCallback,k=y.handleClose,A=_.id;_.uuid,_.customer_number;var S=_.first_name,B=_.last_name,N=_.email,w=_.phone,R=_.company_address,V=_.delivery_address,D=_.billing_address,I=_.business_credentials,P=e(u(p,b),2),T=P[0],U=P[1],F=e(g(null!=V),2),z=F[0],G=F[1],L=e(g(null!=D),2),M=L[0],q=L[1],H=f().refreshSession,J=h().handleAddMessage;return x(
|
|
7
|
+
import{__read as e,__spreadArray as t}from"../../../../node_modules/tslib/tslib.es6.js";import a from"@mui/material/Box";import r from"@mui/material/Stack";import n from"@mui/material/Grid";import m from"@mui/material/Divider";import l from"@mui/material/TextField";import i from"@mui/material/Typography";import s from"@mui/material/Checkbox";import o from"@mui/material/Button";import{AddressFields as c}from"../../common/Address.js";import{SubmitButton as d}from"../../SubmitButton.js";import{useFormState as u}from"react-dom";import{updateCustomerProfileAction as p}from"../../../data/actions/profile-actions.js";import{BusinessCredentialsFields as E}from"./BusinessCredentials.js";import{useSession as f}from"../../../context/auth/SessionContext.js";import v,{useState as g,useEffect as x}from"react";import{useSnackbar as h}from"../../../context/common/SnackbarContext.js";var b={zodErrors:null,strapiErrors:null,data:null,message:null,severity:null};function y(y){var _=y.data,C=y.sx,j=y.revalidateCallback,k=y.handleClose,A=_.id;_.uuid,_.customer_number;var S=_.first_name,B=_.last_name,N=_.email,w=_.phone,R=_.company_address,V=_.delivery_address,D=_.billing_address,I=_.business_credentials,P=e(u(p,b),2),T=P[0],U=P[1],F=e(g(null!=V),2),z=F[0],G=F[1],L=e(g(null!=D),2),M=L[0],q=L[1],H=f().refreshSession,J=h().handleAddMessage;return x(function(){(null==T?void 0:T.message)&&(J({message:T.message,severity:T.severity||"error"}),"success"===T.severity&&(H(),j&&j(),k&&k()))},[null==T?void 0:T.message]),x(function(){(null==T?void 0:T.strapiErrors)&&J({message:T.strapiErrors.message||"Error updating profile",severity:T.severity||"error"})},[null==T?void 0:T.strapiErrors]),v.createElement(a,{sx:t([],e(Array.isArray(C)?C:[C]),!1)},v.createElement("form",{action:U},v.createElement(n,{container:!0,spacing:2},v.createElement(n,{item:!0,xs:12},v.createElement(r,{spacing:2},v.createElement(i,{variant:"h3",component:"h1"},"Edit Profile"),v.createElement(i,{variant:"body2"},"Update your personal and business information"))),v.createElement(n,{item:!0,xs:12},v.createElement("input",{type:"hidden",name:"id",value:A}),v.createElement(i,{variant:"h6"},"Personal Details"),v.createElement(m,null),v.createElement(r,{spacing:2,sx:{mt:2}},v.createElement(l,{id:"first_name",name:"first_name",label:"First Name",defaultValue:S}),v.createElement(l,{id:"last_name",name:"last_name",label:"Last Name",defaultValue:B}),v.createElement(l,{id:"email",name:"email",label:"Email",defaultValue:N,disabled:!0}),v.createElement(l,{id:"phone",name:"phone",label:"Phone",defaultValue:w}))),v.createElement(n,{item:!0,xs:12},v.createElement(i,{variant:"h6"},"Business Credentials"),v.createElement(m,null),v.createElement(a,{sx:{mt:2}},v.createElement(E,{componentName:"business_credentials",componentReference:"business.credentials",data:I}))),v.createElement(n,{item:!0,xs:12},v.createElement(i,{variant:"h6"},"Company Address"),v.createElement(m,null),v.createElement(a,{sx:{mt:2}},v.createElement(c,{componentName:"company_address",componentReference:"common.address",data:R}))),v.createElement(n,{item:!0,xs:12},v.createElement(i,{variant:"h6"},"Delivery Address"),v.createElement(m,null),v.createElement(r,{spacing:2,sx:{mt:2}},v.createElement(r,{direction:"row",spacing:2,alignItems:"center"},v.createElement(s,{value:z,checked:z,onChange:function(){return G(!z)}}),v.createElement(i,null,"Use a different address for delivery")),z&&v.createElement(c,{componentName:"delivery_address",componentReference:"common.address",data:V}))),v.createElement(n,{item:!0,xs:12},v.createElement(i,{variant:"h6"},"Billing Address"),v.createElement(m,null),v.createElement(r,{spacing:2,sx:{mt:2}},v.createElement(r,{direction:"row",spacing:2,alignItems:"center"},v.createElement(s,{value:M,checked:M,onChange:function(){return q(!M)}}),v.createElement(i,null,"Use a different address for billing")),M&&v.createElement(c,{componentName:"billing_address",componentReference:"common.address",data:D}))),v.createElement(n,{item:!0,xs:12},v.createElement(r,{direction:"row",justifyContent:"space-between",alignItems:"center",sx:{pt:2}},k&&v.createElement(o,{onClick:k,variant:"outlined"},"Cancel"),v.createElement(d,{text:"Save changes",loadingText:"Saving...",variant:"contained"}))))))}export{y as default};
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* @copyright Jelle Paulus
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
|
-
import{extends as e}from"../../../../_virtual/_rollupPluginBabelHelpers.js";import{__read as t}from"../../../../node_modules/tslib/tslib.es6.js";import r,{useState as n}from"react";import i from"@mui/material/Autocomplete";import l from"@mui/material/TextField";var u=function(u){var o=u.customerLabels,a=u.currentValue,m=u.multiple,c=void 0!==m&&m,s=u.onChangeCallback,p=t(n(a||[]),2),d=p[0],f=p[1];return r.createElement(r.Fragment,null,r.createElement(i,{multiple:c,options:o,getOptionLabel:function(e){return e.title},filterSelectedOptions:!0,onChange:function(e,t,r,n){if(Array.isArray(t)){var i=t.map(
|
|
6
|
+
import{extends as e}from"../../../../_virtual/_rollupPluginBabelHelpers.js";import{__read as t}from"../../../../node_modules/tslib/tslib.es6.js";import r,{useState as n}from"react";import i from"@mui/material/Autocomplete";import l from"@mui/material/TextField";var u=function(u){var o=u.customerLabels,a=u.currentValue,m=u.multiple,c=void 0!==m&&m,s=u.onChangeCallback,p=t(n(a||[]),2),d=p[0],f=p[1];return r.createElement(r.Fragment,null,r.createElement(i,{multiple:c,options:o,getOptionLabel:function(e){return e.title},filterSelectedOptions:!0,onChange:function(e,t,r,n){if(Array.isArray(t)){var i=t.map(function(e){return e.id});f(i),s&&s(i)}else t?(f([t.id]),s&&s([t.id])):(f([]),s&&s([]))},renderOption:function(t,n){return r.createElement("li",e({},t,{key:n.id}),n.title)},renderInput:function(t){return r.createElement(l,e({},t,{label:"Customer"}))},value:o.filter(function(e){return d.includes(e.id)})[0]||null}),r.createElement("input",{type:"hidden",name:"customer",value:c?JSON.stringify(d)||"":d[0]||""}))};export{u as CustomerSelector,u as default};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__read as e,__spreadArray as t}from"../../../../node_modules/tslib/tslib.es6.js";import r from"@mui/material/Box";import a from"@mui/material/Stack";import n from"@mui/material/Grid";import i from"@mui/material/TextField";import m from"@mui/material/Typography";import o from"@mui/material/Button";import{SubmitButton as l}from"../../SubmitButton.js";import{useFormState as s}from"react-dom";import{updateEnduserProfileAction as c}from"../../../data/actions/e-commerce/enduser/profile-actions.js";import{useSession as u}from"../../../context/auth/SessionContext.js";import{useSnackbar as p}from"../../../context/common/SnackbarContext.js";import d,{useEffect as f}from"react";import E from"@mui/icons-material/Email";import g from"@mui/icons-material/Phone";import v from"@mui/icons-material/Person";var x={zodErrors:null,strapiErrors:null,data:null,message:null,severity:null};function h(h){var y=h.data,b=h.sx,C=h.revalidateCallback,S=h.handleClose,j=y.id,I=y.first_name,w=y.last_name,P=y.email,k=y.phone,A=c.bind(null,parseInt(j)),B=e(s(A,x),2),T=B[0],_=B[1],V=p().handleAddMessage,z=u().refreshSession;return f(
|
|
7
|
+
import{__read as e,__spreadArray as t}from"../../../../node_modules/tslib/tslib.es6.js";import r from"@mui/material/Box";import a from"@mui/material/Stack";import n from"@mui/material/Grid";import i from"@mui/material/TextField";import m from"@mui/material/Typography";import o from"@mui/material/Button";import{SubmitButton as l}from"../../SubmitButton.js";import{useFormState as s}from"react-dom";import{updateEnduserProfileAction as c}from"../../../data/actions/e-commerce/enduser/profile-actions.js";import{useSession as u}from"../../../context/auth/SessionContext.js";import{useSnackbar as p}from"../../../context/common/SnackbarContext.js";import d,{useEffect as f}from"react";import E from"@mui/icons-material/Email";import g from"@mui/icons-material/Phone";import v from"@mui/icons-material/Person";var x={zodErrors:null,strapiErrors:null,data:null,message:null,severity:null};function h(h){var y=h.data,b=h.sx,C=h.revalidateCallback,S=h.handleClose,j=y.id,I=y.first_name,w=y.last_name,P=y.email,k=y.phone,A=c.bind(null,parseInt(j)),B=e(s(A,x),2),T=B[0],_=B[1],V=p().handleAddMessage,z=u().refreshSession;return f(function(){(null==T?void 0:T.message)&&(V({message:T.message,severity:T.severity||"error"}),"success"===T.severity&&(z(),C&&C(),S&&S()))},[null==T?void 0:T.message]),f(function(){(null==T?void 0:T.strapiErrors)&&V({message:T.strapiErrors.message||"Error performing action",severity:"error"})},[null==T?void 0:T.strapiErrors]),d.createElement(r,{sx:t([],e(Array.isArray(b)?b:[b]),!1)},d.createElement("form",{action:_},d.createElement(n,{container:!0,spacing:2},d.createElement(n,{item:!0,xs:12},d.createElement(a,{spacing:2},d.createElement(m,{variant:"h3",component:"h1"},"Edit Profile"),d.createElement(m,{variant:"body1"},"Update your profile information"))),d.createElement(n,{item:!0,xs:12},d.createElement(a,{spacing:2},d.createElement(m,{variant:"h6"},"Personal Information"),d.createElement(a,{direction:"row",alignItems:"center"},d.createElement(v,null),d.createElement(m,null,"".concat(I," ").concat(w))),d.createElement(a,{direction:"row",alignItems:"center"},d.createElement(E,null),d.createElement(i,{id:"email",name:"email",label:"Email",type:"email",defaultValue:P})),d.createElement(a,{direction:"row",alignItems:"center"},d.createElement(g,null),d.createElement(i,{id:"phone",name:"phone",label:"Phone",type:"tel",defaultValue:k})))),d.createElement(n,{item:!0,xs:12},d.createElement(a,{direction:"row",justifyContent:"space-between",spacing:2,alignItems:"center",sx:{mt:2}},S&&d.createElement(o,{onClick:S,variant:"outlined"},"Cancel"),d.createElement(l,{text:"Save Changes",loadingText:"Saving...",variant:"contained"}))))))}export{h as default};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__read as e,__spreadArray as n,__assign as t,__awaiter as r,__generator as a}from"../../../../node_modules/tslib/tslib.es6.js";import l,{useState as i,useEffect as o}from"react";import c from"@mui/material/Box";import s from"@mui/material/Stack";import m from"@mui/material/Button";import u from"@mui/material/TextField";import d from"@mui/material/Typography";import{SubmitButton as v}from"../../SubmitButton.js";import{useFormState as _}from"react-dom";import{createInvoiceAction as f}from"../../../data/actions/e-commerce/invoices/createInvoiceAction.js";import p from"@mui/material/Grid";import{AddressFields as b}from"../../common/Address.js";import E from"@mui/material/Divider";import{BusinessCredentialsFields as g}from"../customer/BusinessCredentials.js";import{CustomerSelector as y}from"../customer/CustomerSelector.js";import{getSingleCustomer as h}from"../../../data/loaders/e-commerce/getSingleCustomer.js";import C from"@mui/material/Checkbox";import{InvoiceItemFields as x}from"./InvoiceItemFields.js";import{InvoicePDFViewer as k}from"./InvoicePDF.js";import{getPublicInformation as j}from"../../../data/loaders/public-information/getPublicInformation.js";import I from"../../common/markdown/MarkdownEditor.js";import{useSnackbar as w}from"../../../context/common/SnackbarContext.js";var A={zodErrors:null,strapiErrors:null,data:null,message:null,severity:null};function N(N){var F=this,B=N.customerLabels,R=N.revalidateCallback,S=N.handleClose,T=N.sx,D=e(_(f,A),2),L=D[0],P=D[1],M=w().handleAddMessage,U=e(i(!1),2),z=U[0],G=U[1],V=e(i(!1),2),q=V[0],H=V[1],J=e(i(null),2),K=J[0],O=J[1],Q=e(i(null),2),W=Q[0],X=Q[1];o(
|
|
7
|
+
import{__read as e,__spreadArray as n,__assign as t,__awaiter as r,__generator as a}from"../../../../node_modules/tslib/tslib.es6.js";import l,{useState as i,useEffect as o}from"react";import c from"@mui/material/Box";import s from"@mui/material/Stack";import m from"@mui/material/Button";import u from"@mui/material/TextField";import d from"@mui/material/Typography";import{SubmitButton as v}from"../../SubmitButton.js";import{useFormState as _}from"react-dom";import{createInvoiceAction as f}from"../../../data/actions/e-commerce/invoices/createInvoiceAction.js";import p from"@mui/material/Grid";import{AddressFields as b}from"../../common/Address.js";import E from"@mui/material/Divider";import{BusinessCredentialsFields as g}from"../customer/BusinessCredentials.js";import{CustomerSelector as y}from"../customer/CustomerSelector.js";import{getSingleCustomer as h}from"../../../data/loaders/e-commerce/getSingleCustomer.js";import C from"@mui/material/Checkbox";import{InvoiceItemFields as x}from"./InvoiceItemFields.js";import{InvoicePDFViewer as k}from"./InvoicePDF.js";import{getPublicInformation as j}from"../../../data/loaders/public-information/getPublicInformation.js";import I from"../../common/markdown/MarkdownEditor.js";import{useSnackbar as w}from"../../../context/common/SnackbarContext.js";var A={zodErrors:null,strapiErrors:null,data:null,message:null,severity:null};function N(N){var F=this,B=N.customerLabels,R=N.revalidateCallback,S=N.handleClose,T=N.sx,D=e(_(f,A),2),L=D[0],P=D[1],M=w().handleAddMessage,U=e(i(!1),2),z=U[0],G=U[1],V=e(i(!1),2),q=V[0],H=V[1],J=e(i(null),2),K=J[0],O=J[1],Q=e(i(null),2),W=Q[0],X=Q[1];o(function(){(null==L?void 0:L.message)&&(M({message:L.message,severity:L.severity||"error"}),"success"===L.severity&&(R&&R(),S&&S()))},[null==L?void 0:L.message]),o(function(){(null==L?void 0:L.strapiErrors)&&M({message:L.strapiErrors.message||"Error creating invoice",severity:L.severity||"error"})},[null==L?void 0:L.strapiErrors]);return o(function(){!function(){r(this,void 0,void 0,function(){var e;return a(this,function(n){switch(n.label){case 0:return[4,j()];case 1:return e=n.sent(),X(function(n){return t(t({},n),{seller_phone:null==e?void 0:e.phone,seller_email:null==e?void 0:e.email,seller_company_address:null==e?void 0:e.address,seller_business_credentials:null==e?void 0:e.business_credentials})}),[2]}})})}()},[]),l.createElement(c,{sx:n([],e(Array.isArray(T)?T:[T]),!1)},l.createElement("form",{action:P},l.createElement(p,{container:!0,spacing:2},l.createElement(p,{item:!0,xs:12},l.createElement(s,{spacing:2},l.createElement(d,{variant:"h3",component:"h1"},"Create Invoice"),l.createElement(d,{variant:"body2"},"Create a new invoice by selecting a customer or filling in the details manually"))),l.createElement(p,{item:!0,xs:12},l.createElement(d,{variant:"h6"},"Choose a user"),l.createElement(y,{customerLabels:B,onChangeCallback:function(e){return r(F,void 0,void 0,function(){var n;return a(this,function(t){switch(t.label){case 0:return 0===e.length?(O(null),[2]):[4,h(e[0])];case 1:return n=t.sent(),O(n),[2]}})})}}),l.createElement(d,{variant:"h6"},"Set user details manually"),l.createElement(s,{spacing:2,direction:"row"},l.createElement(u,{name:"buyer_first_name",label:"First Name",value:(null==K?void 0:K.first_name)||(null==W?void 0:W.buyer_first_name)||"",onChange:function(e){X(function(n){return t(t({},n),{buyer_first_name:e.target.value})})},disabled:null!==K}),l.createElement(u,{name:"buyer_last_name",label:"Last Name",value:(null==K?void 0:K.last_name)||(null==W?void 0:W.buyer_last_name)||"",onChange:function(e){X(function(n){return t(t({},n),{buyer_last_name:e.target.value})})},disabled:null!==K})),l.createElement(d,{variant:"body2"}),l.createElement(d,{variant:"h6"},"Company Address"),l.createElement(E,null),l.createElement(b,{data:null==K?void 0:K.company_address,componentName:"buyer_company_address",componentReference:"common.address",onChangeCallback:function(e){X(function(n){return t(t({},n),{buyer_company_address:e})})},disabled:null!==K}),l.createElement(d,{variant:"h6"},"Delivery Address"),l.createElement(E,null),null!==K?l.createElement(l.Fragment,null,null===K.delivery_address?l.createElement(d,{variant:"body2"},"No delivery address on file"):l.createElement(b,{data:null==K?void 0:K.delivery_address,componentName:"buyer_delivery_address",componentReference:"common.address",onChangeCallback:function(e){X(function(n){return t(t({},n),{buyer_delivery_address:e})})},disabled:null!==K})):l.createElement(l.Fragment,null,l.createElement(s,{direction:"row",spacing:2,alignItems:"center"},l.createElement(C,{value:q,checked:q,onChange:function(){return H(!q)}}),l.createElement(d,null,"Use a different address for delivery")),q&&l.createElement(b,{componentName:"buyer_delivery_address",componentReference:"common.address",onChangeCallback:function(e){X(function(n){return t(t({},n),{buyer_delivery_address:e})})}})),l.createElement(d,{variant:"h6"},"Billing Address"),l.createElement(E,null),null!==K?l.createElement(l.Fragment,null,null===K.billing_address?l.createElement(d,{variant:"body2"},"No billing address on file"):l.createElement(b,{data:null==K?void 0:K.billing_address,componentName:"buyer_billing_address",componentReference:"common.address",onChangeCallback:function(e){X(function(n){return t(t({},n),{buyer_billing_address:e})})},disabled:null!==K})):l.createElement(l.Fragment,null,l.createElement(s,{direction:"row",spacing:2,alignItems:"center"},l.createElement(C,{value:z,checked:z,onChange:function(){return G(!z)}}),l.createElement(d,null,"Use a different address for billing")),z&&l.createElement(b,{componentName:"buyer_billing_address",componentReference:"common.address",onChangeCallback:function(e){X(function(n){return t(t({},n),{buyer_billing_address:e})})}})),l.createElement(d,{variant:"h6"},"Bussiness Credentials"),l.createElement(E,null),l.createElement(g,{data:null==K?void 0:K.business_credentials,componentName:"buyer_business_credentials",componentReference:"business.credentials",onChangeCallback:function(e){X(function(n){return t(t({},n),{buyer_business_credentials:e})})},disabled:null!==K})),l.createElement(p,{item:!0,xs:12},l.createElement(d,{variant:"h6"},"Invoice Items"),l.createElement(x,{onChangeCallback:function(e){X(function(n){return n?t(t({},n),{items:e.map(function(e){return t(t({},e),{product:"product"in e?e.product:void 0,item_description:"item_description"in e?e.item_description:void 0,price_excl_vat:"price_excl_vat"in e?e.price_excl_vat:0,vat_rate:"vat_rate"in e?e.vat_rate:0,vat:"vat"in e?e.vat:0,price_incl_vat:"price_incl_vat"in e?e.price_incl_vat:0})}),VAT_total:e.reduce(function(e,n){return e+n.price_excl_vat*(n.vat_rate/100)},0),total_excl_vat:e.reduce(function(e,n){return e+n.price_excl_vat},0),total_incl_vat:e.reduce(function(e,n){return e+n.price_excl_vat+n.price_excl_vat*(n.vat_rate/100)},0)}):null})}})),l.createElement(p,{item:!0,xs:12},l.createElement(d,{variant:"h6"},"Add a Comment"),l.createElement(I,{name:"comments",label:"Comments",onChangeCallback:function(e){return X(function(n){return n?t(t({},n),{comments:e}):null})}})),l.createElement(p,{item:!0,xs:12},l.createElement(d,{variant:"h6"},"Preview the Invoice"),null!==W&&l.createElement(k,{invoice:W}))," ",l.createElement(p,{item:!0,xs:12},l.createElement(s,{direction:"row",justifyContent:"space-between",alignItems:"center",sx:{pt:2}},S&&l.createElement(m,{onClick:S,variant:"outlined"},"Cancel"),l.createElement(v,{text:"Create Invoice",loadingText:"Creating...",variant:"contained"}))))))}export{N as CreateInvoiceForm};
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* @copyright Jelle Paulus
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
|
-
import{__read as e,__spreadArray as t}from"../../../../node_modules/tslib/tslib.es6.js";import a,{useState as r}from"react";import i from"@mui/material/Table";import n from"@mui/material/TableHead";import l from"@mui/material/TableBody";import m from"@mui/material/TableCell";import c from"@mui/material/TableRow";import o from"@mui/material/IconButton";import u from"@mui/icons-material/Add";import s from"@mui/material/Typography";import p from"@mui/material/Stack";import d from"@mui/material/TextField";import v from"@mui/icons-material/Delete";function _(_){var E=_.onChangeCallback,x=e(r([]),2),h=x[0],g=x[1],f=e(r(""),2),w=f[0],b=f[1],y=e(r(0),2),I=y[0],T=y[1],A=e(r(0),2),C=A[0],q=A[1],V=e(r(0),2),k=V[0],D=V[1];return a.createElement(p,{spacing:2},a.createElement(s,{variant:"h5"},"Adding the items to the invoice"),a.createElement(s,{variant:"body1"}),a.createElement(s,{variant:"body2"}),a.createElement(i,null,a.createElement(n,null,a.createElement(c,null,a.createElement(m,{id:"line_item_number",sx:[{width:"15%"}]},"Line Item Number"),a.createElement(m,{sx:[{width:"35%"}]},"Item Description"),a.createElement(m,{sx:[{width:"10%"}]},"Price excl. VAT"),a.createElement(m,{sx:[{width:"10%"}]},"VAT Rate"),a.createElement(m,{sx:[{width:"10%"}]},"VAT"),a.createElement(m,{sx:[{width:"10%"}]},"Price incl. VAT"),a.createElement(m,{sx:[{width:"10%"}]},"Amount"),a.createElement(m,null))),a.createElement(l,null,h.map(
|
|
6
|
+
import{__read as e,__spreadArray as t}from"../../../../node_modules/tslib/tslib.es6.js";import a,{useState as r}from"react";import i from"@mui/material/Table";import n from"@mui/material/TableHead";import l from"@mui/material/TableBody";import m from"@mui/material/TableCell";import c from"@mui/material/TableRow";import o from"@mui/material/IconButton";import u from"@mui/icons-material/Add";import s from"@mui/material/Typography";import p from"@mui/material/Stack";import d from"@mui/material/TextField";import v from"@mui/icons-material/Delete";function _(_){var E=_.onChangeCallback,x=e(r([]),2),h=x[0],g=x[1],f=e(r(""),2),w=f[0],b=f[1],y=e(r(0),2),I=y[0],T=y[1],A=e(r(0),2),C=A[0],q=A[1],V=e(r(0),2),k=V[0],D=V[1];return a.createElement(p,{spacing:2},a.createElement(s,{variant:"h5"},"Adding the items to the invoice"),a.createElement(s,{variant:"body1"}),a.createElement(s,{variant:"body2"}),a.createElement(i,null,a.createElement(n,null,a.createElement(c,null,a.createElement(m,{id:"line_item_number",sx:[{width:"15%"}]},"Line Item Number"),a.createElement(m,{sx:[{width:"35%"}]},"Item Description"),a.createElement(m,{sx:[{width:"10%"}]},"Price excl. VAT"),a.createElement(m,{sx:[{width:"10%"}]},"VAT Rate"),a.createElement(m,{sx:[{width:"10%"}]},"VAT"),a.createElement(m,{sx:[{width:"10%"}]},"Price incl. VAT"),a.createElement(m,{sx:[{width:"10%"}]},"Amount"),a.createElement(m,null))),a.createElement(l,null,h.map(function(e,t){return a.createElement(c,{key:t},a.createElement(m,{sx:[{width:"15%"}]},t+1,".0.0"),a.createElement(m,{sx:[{width:"35%"}]},e.item_description),a.createElement(m,{sx:{width:"10%"}},e.price_excl_vat),a.createElement(m,{sx:{width:"10%"}},e.vat_rate),a.createElement(m,{sx:{width:"10%"}},e.price_excl_vat*(e.vat_rate/100)),a.createElement(m,{sx:{width:"10%"}},e.price_excl_vat*(1+e.vat_rate/100)),a.createElement(m,{sx:{width:"5%"}},e.quantity),a.createElement(m,{align:"right",sx:{width:"5%"}},a.createElement(o,null,a.createElement(v,null))))}))),a.createElement("input",{type:"hidden",name:"admin_items",value:JSON.stringify(function(e){return e.map(function(e,t){return{line_item_number:t+1+".0.0",description:e.item_description,vat_rate:e.vat_rate,price_excl_vat:e.price_excl_vat,quantity:e.quantity}})}(h))}),a.createElement(p,{direction:"row",spacing:1,alignItems:"center",sx:{p:2,width:"100%"}},a.createElement(s,{variant:"body1",sx:{width:"15%"}},h.length+1,".0.0"),a.createElement(d,{id:"item_description",name:"item_description",label:"Item Description",sx:{width:"35%"},value:w,onChange:function(e){return b(e.target.value)}}),a.createElement(d,{id:"price_excl_vat",name:"price_excl_vat",type:"number",label:"Price",value:C,onChange:function(e){""!==e.target.value?parseInt(e.target.value)<0?q(0):q(parseInt(e.target.value)):q(0)},sx:{width:"10%"}}),a.createElement(d,{id:"vat_rate",name:"vat_rate",type:"number",label:"VAT Rate",value:k,onChange:function(e){""!==e.target.value?parseInt(e.target.value)<0?D(0):D(parseInt(e.target.value)):D(0)},sx:{width:"30%"}}),a.createElement(d,{id:"quantity",name:"quantity",type:"number",label:"Amount",value:I,onChange:function(e){""!==e.target.value?parseInt(e.target.value)<0?T(0):T(parseInt(e.target.value)):T(0)},sx:{width:"5%"}}),a.createElement(o,{onClick:function(){if(null!==w&&null!==I){var a={item_description:w,quantity:I,price_excl_vat:C,vat_rate:k,vat:C*(k/100),price_incl_vat:C*(1+k/100)};g(t(t([],e(h),!1),[a],!1)),E&&E(t(t([],e(h),!1),[a],!1)),b(""),T(0),q(0),D(0)}else console.log("nextItemDescription or nextAmount is null")}},a.createElement(u,null))))}export{_ as InvoiceItemFields};
|