umwd-components 0.1.820 → 0.1.822
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/index8.js +2 -2
- package/dist/esm/_virtual/index9.js +2 -2
- 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 +5 -11
- package/dist/esm/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -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/index8.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/index9.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
|
|
|
@@ -124,6 +124,10 @@ function RmaForm({ opo, sx, revalidateCallback, handleClose, }) {
|
|
|
124
124
|
const [open, setOpen] = useState(false);
|
|
125
125
|
const [itemsToReturn, setItemsToReturn] = useState([]);
|
|
126
126
|
const [selectedItems, setSelectedItems] = useState([]);
|
|
127
|
+
const handleSubmit = () => {
|
|
128
|
+
console.log("Submitting RMA request");
|
|
129
|
+
setOpen(false);
|
|
130
|
+
};
|
|
127
131
|
useEffect(() => {
|
|
128
132
|
if (formState?.message) {
|
|
129
133
|
handleAddMessage({
|
|
@@ -144,17 +148,7 @@ function RmaForm({ opo, sx, revalidateCallback, handleClose, }) {
|
|
|
144
148
|
});
|
|
145
149
|
}
|
|
146
150
|
}, [formState?.strapiErrors]);
|
|
147
|
-
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: () => {
|
|
148
|
-
console.log("submit callback");
|
|
149
|
-
const formElement = document.querySelector("form");
|
|
150
|
-
if (formElement) {
|
|
151
|
-
formAction(new FormData(formElement));
|
|
152
|
-
}
|
|
153
|
-
else {
|
|
154
|
-
formAction(new FormData());
|
|
155
|
-
}
|
|
156
|
-
setOpen(!open);
|
|
157
|
-
} }), 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: () => {
|
|
158
152
|
console.log(formState);
|
|
159
153
|
setOpen(!open);
|
|
160
154
|
}, disabled: selectedItems.length === 0 ||
|