umwd-components 0.1.651 → 0.1.652
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/src/components/e-commerce/iro/CreateIROForm.js +1 -1
- package/dist/src/data/actions/e-commerce/iro/createIroAction.js +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/components/e-commerce/iro/CreateIROForm.tsx +17 -12
- package/src/data/actions/e-commerce/iro/createIroAction.ts +3 -0
package/package.json
CHANGED
|
@@ -69,6 +69,13 @@ export default function CreateIroForm({
|
|
|
69
69
|
<Box sx={[{ p: 2 }, ...(Array.isArray(sx) ? sx : [sx])]}>
|
|
70
70
|
<form action={formAction}>
|
|
71
71
|
<Grid container spacing={2}>
|
|
72
|
+
<Grid item xs={12}>
|
|
73
|
+
<Stack spacing={2}>
|
|
74
|
+
<Typography variant="h3" component={"h1"}>
|
|
75
|
+
Create new return order
|
|
76
|
+
</Typography>
|
|
77
|
+
</Stack>
|
|
78
|
+
</Grid>
|
|
72
79
|
<Grid item xs={12}>
|
|
73
80
|
<Stack spacing={2}>
|
|
74
81
|
<Typography variant="h6">Choose a customer</Typography>
|
|
@@ -140,18 +147,16 @@ export default function CreateIroForm({
|
|
|
140
147
|
/>
|
|
141
148
|
</Grid>
|
|
142
149
|
<Grid item xs={12}>
|
|
143
|
-
<
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
<Alert severity="error">{formState?.message}</Alert>
|
|
154
|
-
)}
|
|
150
|
+
<Stack direction={"row"} justifyContent={"space-between"}>
|
|
151
|
+
<Button onClick={handleClose} variant="outlined">
|
|
152
|
+
Cancel
|
|
153
|
+
</Button>
|
|
154
|
+
<SubmitButton
|
|
155
|
+
text="Confirm"
|
|
156
|
+
loadingText="Loading..."
|
|
157
|
+
variant="contained"
|
|
158
|
+
/>
|
|
159
|
+
</Stack>
|
|
155
160
|
</Grid>
|
|
156
161
|
</Grid>
|
|
157
162
|
</form>
|
|
@@ -37,6 +37,7 @@ export async function createIroAction(prevState: any, formData: FormData) {
|
|
|
37
37
|
return {
|
|
38
38
|
...prevState,
|
|
39
39
|
strapiErrors: null,
|
|
40
|
+
severity: "error",
|
|
40
41
|
message: "Ops! Something went wrong. Please try again.",
|
|
41
42
|
};
|
|
42
43
|
}
|
|
@@ -45,6 +46,7 @@ export async function createIroAction(prevState: any, formData: FormData) {
|
|
|
45
46
|
return {
|
|
46
47
|
...prevState,
|
|
47
48
|
strapiErrors: responseData.error,
|
|
49
|
+
severity: "error",
|
|
48
50
|
message: "Failed to Create Iro.",
|
|
49
51
|
};
|
|
50
52
|
}
|
|
@@ -54,6 +56,7 @@ export async function createIroAction(prevState: any, formData: FormData) {
|
|
|
54
56
|
return {
|
|
55
57
|
...prevState,
|
|
56
58
|
message: "Iro Created Successfully",
|
|
59
|
+
severity: "success",
|
|
57
60
|
data: flattenedData,
|
|
58
61
|
strapiErrors: null,
|
|
59
62
|
};
|