umwd-components 0.1.699 → 0.1.700
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/customer/CustomerProfileDisplay.js +1 -1
- package/dist/src/data/actions/logistics/note/createNoteAction.js +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/components/e-commerce/customer/CustomerProfileDisplay.tsx +21 -25
- package/src/data/actions/logistics/note/createNoteAction.ts +9 -2
package/package.json
CHANGED
|
@@ -71,7 +71,7 @@ export default function CustomerProfileDisplay({
|
|
|
71
71
|
<Grid item xs={12}>
|
|
72
72
|
<Stack spacing={2}>
|
|
73
73
|
<Stack direction={"row"} spacing={2} justifyContent={"space-between"}>
|
|
74
|
-
<Stack spacing={2}>
|
|
74
|
+
<Stack spacing={2} sx={{ width: "100%" }}>
|
|
75
75
|
<Typography variant="h3" component={"h1"}>
|
|
76
76
|
{isCustomer ? "Your Profile" : "Customer Profile"}
|
|
77
77
|
</Typography>
|
|
@@ -81,28 +81,24 @@ export default function CustomerProfileDisplay({
|
|
|
81
81
|
</Typography>
|
|
82
82
|
)}
|
|
83
83
|
</Stack>
|
|
84
|
-
{isCustomer && (
|
|
85
|
-
<
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
<
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
</StyledLink>
|
|
103
|
-
</Stack>
|
|
104
|
-
)}
|
|
105
|
-
</Grid>
|
|
84
|
+
{isCustomer && !Boolean(completeEnough) ? (
|
|
85
|
+
<Alert
|
|
86
|
+
severity="warning"
|
|
87
|
+
action={
|
|
88
|
+
<StyledLink href={editProfileUrl} target="_self">
|
|
89
|
+
<Button variant="contained">complete profile</Button>
|
|
90
|
+
</StyledLink>
|
|
91
|
+
}
|
|
92
|
+
>
|
|
93
|
+
After completion of your profile you can enjoy all the benefits
|
|
94
|
+
of your services.
|
|
95
|
+
</Alert>
|
|
96
|
+
) : (
|
|
97
|
+
<Stack direction={"row"} justifyContent={"flex-end"}>
|
|
98
|
+
<StyledLink href={editProfileUrl} target="_self">
|
|
99
|
+
<Button variant="contained">edit profile</Button>
|
|
100
|
+
</StyledLink>
|
|
101
|
+
</Stack>
|
|
106
102
|
)}
|
|
107
103
|
</Stack>
|
|
108
104
|
<Divider />
|
|
@@ -115,7 +111,7 @@ export default function CustomerProfileDisplay({
|
|
|
115
111
|
) : (
|
|
116
112
|
<Typography>Business credentials not available</Typography>
|
|
117
113
|
)}
|
|
118
|
-
<Divider />
|
|
114
|
+
<Divider sx={{ pt: 2 }} />
|
|
119
115
|
</Grid>
|
|
120
116
|
|
|
121
117
|
<Grid item xs={12}>
|
|
@@ -143,7 +139,7 @@ export default function CustomerProfileDisplay({
|
|
|
143
139
|
</Typography>
|
|
144
140
|
</Box>
|
|
145
141
|
</Stack>
|
|
146
|
-
<Divider />
|
|
142
|
+
<Divider sx={{ pt: 2 }} />
|
|
147
143
|
</Grid>
|
|
148
144
|
|
|
149
145
|
{company_address ? (
|
|
@@ -10,10 +10,17 @@ export async function createNoteAction(
|
|
|
10
10
|
prevState: any,
|
|
11
11
|
formData: FormData
|
|
12
12
|
) {
|
|
13
|
-
// const rawFormData = Object.fromEntries(formData);
|
|
14
|
-
|
|
15
13
|
const parsedFormData = parseFormData(formData);
|
|
16
14
|
|
|
15
|
+
if (parsedFormData.data.content.length < 5) {
|
|
16
|
+
return {
|
|
17
|
+
...prevState,
|
|
18
|
+
strapiErrors: null,
|
|
19
|
+
message: "Content cannot be empty.",
|
|
20
|
+
severity: "error",
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
17
24
|
const noteData = {
|
|
18
25
|
data: {
|
|
19
26
|
...parsedFormData.data,
|