umwd-components 0.1.701 → 0.1.703
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/node_modules/base64-js/index.js +1 -1
- package/dist/node_modules/ieee754/index.js +1 -1
- package/dist/src/components/e-commerce/customer/CustomerProfileDisplay.js +1 -1
- package/dist/src/components/e-commerce/opo/OpoDisplay.js +1 -1
- package/dist/src/components/e-commerce/opo/OpoSummary.js +1 -1
- package/dist/src/components/e-commerce/opo/OpoSummaryRow.js +1 -1
- package/dist/src/data/loaders/e-commerce/getSingleOpo.js +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/components/e-commerce/customer/CustomerProfileDisplay.tsx +4 -4
- package/src/components/e-commerce/opo/OpoDisplay.tsx +4 -1
- package/src/components/e-commerce/opo/OpoSummary.tsx +10 -3
- package/src/components/e-commerce/opo/OpoSummaryRow.tsx +8 -2
- package/src/data/loaders/e-commerce/getSingleOpo.ts +2 -0
package/package.json
CHANGED
|
@@ -214,7 +214,7 @@ export default function CustomerProfileDisplay({
|
|
|
214
214
|
<TableCell align="right">
|
|
215
215
|
{isCustomer ? (
|
|
216
216
|
<StyledLink
|
|
217
|
-
href={`/user/orders?
|
|
217
|
+
href={`/user/orders?selectedOpoId=${order.id}`}
|
|
218
218
|
target="_self"
|
|
219
219
|
>
|
|
220
220
|
<Button variant="contained" size="small">
|
|
@@ -223,7 +223,7 @@ export default function CustomerProfileDisplay({
|
|
|
223
223
|
</StyledLink>
|
|
224
224
|
) : (
|
|
225
225
|
<StyledLink
|
|
226
|
-
href={`/dashboard/admin/e-commerce/opos?
|
|
226
|
+
href={`/dashboard/admin/e-commerce/opos?selectedOpoId=${order.id}`}
|
|
227
227
|
target="_self"
|
|
228
228
|
>
|
|
229
229
|
<Button variant="contained" size="small">
|
|
@@ -276,7 +276,7 @@ export default function CustomerProfileDisplay({
|
|
|
276
276
|
<TableCell align="right">
|
|
277
277
|
{isCustomer ? (
|
|
278
278
|
<StyledLink
|
|
279
|
-
href={`/user/returns/
|
|
279
|
+
href={`/user/returns/selectedIroId=${iro.id}`}
|
|
280
280
|
target="_self"
|
|
281
281
|
>
|
|
282
282
|
<Button variant="contained" size="small">
|
|
@@ -285,7 +285,7 @@ export default function CustomerProfileDisplay({
|
|
|
285
285
|
</StyledLink>
|
|
286
286
|
) : (
|
|
287
287
|
<StyledLink
|
|
288
|
-
href={`/dashboard/admin/e-commerce/iros?
|
|
288
|
+
href={`/dashboard/admin/e-commerce/iros?selectedIroId=${iro.id}`}
|
|
289
289
|
target="_self"
|
|
290
290
|
>
|
|
291
291
|
<Button variant="contained" size="small">
|
|
@@ -32,6 +32,7 @@ export default function OpoDisplay({ opo }: { opo: Opo }) {
|
|
|
32
32
|
* will show a link to the payment page
|
|
33
33
|
* TODO: In the far future it will be possible to pay with multiple payment
|
|
34
34
|
* methods or in multiple installments
|
|
35
|
+
* TODO: getSingleOpo does not populate payments yet
|
|
35
36
|
*/}
|
|
36
37
|
<TableCell>
|
|
37
38
|
<PaymentStatusIndicator
|
|
@@ -42,7 +43,9 @@ export default function OpoDisplay({ opo }: { opo: Opo }) {
|
|
|
42
43
|
</TableRow>
|
|
43
44
|
</TableBody>
|
|
44
45
|
</Table>
|
|
45
|
-
<Typography variant="body1"
|
|
46
|
+
<Typography variant="body1" sx={{ mt: 2 }}>
|
|
47
|
+
Contents of the order:
|
|
48
|
+
</Typography>
|
|
46
49
|
<OpoSummary opo={opo} />
|
|
47
50
|
{/* shiping details*/}
|
|
48
51
|
</>
|
|
@@ -18,6 +18,12 @@ import { OpoSummaryRow } from "./OpoSummaryRow";
|
|
|
18
18
|
export function OpoSummary({ opo }: { opo: Opo }) {
|
|
19
19
|
const { opo_items } = opo;
|
|
20
20
|
|
|
21
|
+
if (!opo_items) {
|
|
22
|
+
return <Typography>Loading...</Typography>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
console.log("opo_items", opo_items);
|
|
26
|
+
|
|
21
27
|
return (
|
|
22
28
|
<Box sx={{ p: { xs: 1, md: 2 } }}>
|
|
23
29
|
{opo_items != null ? (
|
|
@@ -31,9 +37,10 @@ export function OpoSummary({ opo }: { opo: Opo }) {
|
|
|
31
37
|
</TableRow>
|
|
32
38
|
</TableHead>
|
|
33
39
|
<TableBody>
|
|
34
|
-
{opo_items
|
|
35
|
-
|
|
36
|
-
|
|
40
|
+
{opo_items?.data &&
|
|
41
|
+
opo_items.data.map((item: OpoItem) => (
|
|
42
|
+
<OpoSummaryRow key={item.id} data={item} />
|
|
43
|
+
))}
|
|
37
44
|
</TableBody>
|
|
38
45
|
<TableFooter>
|
|
39
46
|
<TableRow>
|
|
@@ -15,8 +15,14 @@ export function OpoSummaryRow({ data }: OpoSummaryRowProps) {
|
|
|
15
15
|
<TableRow>
|
|
16
16
|
<TableCell>{ordered_quantity}</TableCell>
|
|
17
17
|
<TableCell>{product?.title}</TableCell>
|
|
18
|
-
<TableCell
|
|
19
|
-
|
|
18
|
+
<TableCell>
|
|
19
|
+
{product?.price?.price ? `€ ${product.price.price}` : "no information"}
|
|
20
|
+
</TableCell>
|
|
21
|
+
<TableCell>
|
|
22
|
+
{product?.price?.price_incl_vat
|
|
23
|
+
? `€ ${product.price.price_incl_vat}`
|
|
24
|
+
: "no information"}
|
|
25
|
+
</TableCell>
|
|
20
26
|
</TableRow>
|
|
21
27
|
);
|
|
22
28
|
}
|
|
@@ -4,6 +4,7 @@ import qs from "qs";
|
|
|
4
4
|
import { fetchData } from "../loaders";
|
|
5
5
|
import { flattenAttributes, getStrapiURL } from "../../../lib/utils";
|
|
6
6
|
import { unstable_noStore as noStore } from "next/cache";
|
|
7
|
+
import Price from "@/components/e-commerce/products/Price";
|
|
7
8
|
|
|
8
9
|
const baseUrl = getStrapiURL();
|
|
9
10
|
|
|
@@ -18,6 +19,7 @@ async function getSingleOpo(id: number) {
|
|
|
18
19
|
populate: {
|
|
19
20
|
product: {
|
|
20
21
|
populate: {
|
|
22
|
+
price: true,
|
|
21
23
|
image: true,
|
|
22
24
|
},
|
|
23
25
|
},
|