umwd-components 0.1.819 → 0.1.821
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/dist/cjs/src/components/e-commerce/iro/RmaForm.js +1 -1
- package/dist/cjs/tsconfig.build.tsbuildinfo +1 -1
- package/dist/esm/_virtual/index4.js +2 -2
- package/dist/esm/_virtual/index5.js +2 -2
- package/dist/esm/_virtual/index6.js +2 -2
- package/dist/esm/_virtual/index8.js +2 -2
- package/dist/esm/_virtual/index9.js +2 -2
- package/dist/esm/node_modules/color-string/index.js +1 -1
- package/dist/esm/node_modules/crypto-js/index.js +1 -1
- package/dist/esm/node_modules/prop-types/node_modules/react-is/index.js +1 -1
- package/dist/esm/node_modules/safe-buffer/index.js +1 -1
- package/dist/esm/node_modules/scheduler/index.js +1 -1
- package/dist/esm/src/components/e-commerce/iro/RmaForm.js +6 -11
- package/dist/esm/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { getDefaultExportFromCjs } from '../../_virtual/_commonjsHelpers.js';
|
|
8
|
-
import { __module as colorString$1 } from '../../_virtual/
|
|
8
|
+
import { __module as colorString$1 } from '../../_virtual/index4.js';
|
|
9
9
|
import { c as colorName } from '../color-name/index.js';
|
|
10
10
|
import { s as simpleSwizzleExports } from '../simple-swizzle/index.js';
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { commonjsGlobal, getDefaultExportFromCjs } from '../../_virtual/_commonjsHelpers.js';
|
|
8
|
-
import { __module as cryptoJs } from '../../_virtual/
|
|
8
|
+
import { __module as cryptoJs } from '../../_virtual/index5.js';
|
|
9
9
|
import { __require as requireCore } from './core.js';
|
|
10
10
|
import { __require as requireX64Core } from './x64-core.js';
|
|
11
11
|
import { __require as requireLibTypedarrays } from './lib-typedarrays.js';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { __module as reactIs } from '../../../../_virtual/
|
|
7
|
+
import { __module as reactIs } from '../../../../_virtual/index6.js';
|
|
8
8
|
import { __require as requireReactIs_production_min } from './cjs/react-is.production.min.js';
|
|
9
9
|
import { __require as requireReactIs_development } from './cjs/react-is.development.js';
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { __module as safeBuffer } from '../../_virtual/
|
|
7
|
+
import { __module as safeBuffer } from '../../_virtual/index9.js';
|
|
8
8
|
import require$$0 from 'buffer';
|
|
9
9
|
|
|
10
10
|
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { getDefaultExportFromCjs } from '../../_virtual/_commonjsHelpers.js';
|
|
8
|
-
import { __module as scheduler } from '../../_virtual/
|
|
8
|
+
import { __module as scheduler } from '../../_virtual/index8.js';
|
|
9
9
|
import { __require as requireScheduler_production } from './cjs/scheduler.production.js';
|
|
10
10
|
import { __require as requireScheduler_development } from './cjs/scheduler.development.js';
|
|
11
11
|
|
|
@@ -107,6 +107,7 @@ const ConfirmRMADialog = ({ open, onClose, items, formState, submitCallback, })
|
|
|
107
107
|
if (submitCallback) {
|
|
108
108
|
startTransition(() => {
|
|
109
109
|
submitCallback();
|
|
110
|
+
onClose(); // Close the dialog after the transition
|
|
110
111
|
});
|
|
111
112
|
}
|
|
112
113
|
};
|
|
@@ -123,6 +124,10 @@ function RmaForm({ opo, sx, revalidateCallback, handleClose, }) {
|
|
|
123
124
|
const [open, setOpen] = useState(false);
|
|
124
125
|
const [itemsToReturn, setItemsToReturn] = useState([]);
|
|
125
126
|
const [selectedItems, setSelectedItems] = useState([]);
|
|
127
|
+
const handleSubmit = () => {
|
|
128
|
+
console.log("Submitting RMA request");
|
|
129
|
+
setOpen(false);
|
|
130
|
+
};
|
|
126
131
|
useEffect(() => {
|
|
127
132
|
if (formState?.message) {
|
|
128
133
|
handleAddMessage({
|
|
@@ -143,17 +148,7 @@ function RmaForm({ opo, sx, revalidateCallback, handleClose, }) {
|
|
|
143
148
|
});
|
|
144
149
|
}
|
|
145
150
|
}, [formState?.strapiErrors]);
|
|
146
|
-
return (jsx(Box, { sx: [...(Array.isArray(sx) ? sx : [sx])], children: jsx("form", { action: formAction, children: jsxs(Grid, { container: true, spacing: 2, children: [jsx(Grid, { size: 12, children: jsx(Typography, { variant: "h6", children: "RMA Form" }) }), jsx("input", { type: "hidden", name: "opos", value: opo.documentId }), jsx(Grid, { size: 12, children: jsxs(Stack, { spacing: 2, children: [jsx(Typography, { variant: "body1", children: "Please fill out the form below to request a return merchandise authorization. Due to the sensitive nature of the products, only unopened packages can be returned." }), jsx(Alert, { severity: "warning", children: "We urge you to carefully photograph the items you are returning. These pictures can be requested at a later time by our team to verify the condition of the items." })] }) }), jsx(Grid, { size: 12, children: opo.opo_items ? (jsx(Stack, { spacing: 1, children: opo.opo_items && (jsx(ItemLines, { items: opo.opo_items, itemsToReturn: itemsToReturn, setItemsToReturn: setItemsToReturn, selectedItems: selectedItems, setSelectedItems: setSelectedItems }, opo.documentId)) })) : (jsx(Typography, { variant: "body1", children: "No items" })) }), jsx(ConfirmRMADialog, { formState: formState, open: open, items: itemsToReturn.filter((item) => item.returned_quantity > 0), onClose: () => setOpen(!open), submitCallback: () => {
|
|
147
|
-
console.log("submit callback");
|
|
148
|
-
const formElement = document.querySelector("form");
|
|
149
|
-
if (formElement) {
|
|
150
|
-
formAction(new FormData(formElement));
|
|
151
|
-
}
|
|
152
|
-
else {
|
|
153
|
-
formAction(new FormData());
|
|
154
|
-
}
|
|
155
|
-
setOpen(!open);
|
|
156
|
-
} }), jsx(Grid, { size: 12, children: jsx(Button, { onClick: () => {
|
|
151
|
+
return (jsx(Box, { sx: [...(Array.isArray(sx) ? sx : [sx])], children: jsx("form", { action: formAction, children: jsxs(Grid, { container: true, spacing: 2, children: [jsx(Grid, { size: 12, children: jsx(Typography, { variant: "h6", children: "RMA Form" }) }), jsx("input", { type: "hidden", name: "opos", value: opo.documentId }), jsx(Grid, { size: 12, children: jsxs(Stack, { spacing: 2, children: [jsx(Typography, { variant: "body1", children: "Please fill out the form below to request a return merchandise authorization. Due to the sensitive nature of the products, only unopened packages can be returned." }), jsx(Alert, { severity: "warning", children: "We urge you to carefully photograph the items you are returning. These pictures can be requested at a later time by our team to verify the condition of the items." })] }) }), jsx(Grid, { size: 12, children: opo.opo_items ? (jsx(Stack, { spacing: 1, children: opo.opo_items && (jsx(ItemLines, { items: opo.opo_items, itemsToReturn: itemsToReturn, setItemsToReturn: setItemsToReturn, selectedItems: selectedItems, setSelectedItems: setSelectedItems }, opo.documentId)) })) : (jsx(Typography, { variant: "body1", children: "No items" })) }), jsx(ConfirmRMADialog, { formState: formState, open: open, items: itemsToReturn.filter((item) => item.returned_quantity > 0), onClose: () => setOpen(!open), submitCallback: () => handleSubmit() }), jsx(Grid, { size: 12, children: jsx(Button, { onClick: () => {
|
|
157
152
|
console.log(formState);
|
|
158
153
|
setOpen(!open);
|
|
159
154
|
}, disabled: selectedItems.length === 0 ||
|