umwd-components 0.1.702 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "umwd-components",
3
- "version": "0.1.702",
3
+ "version": "0.1.703",
4
4
  "description": "UMWD Component library",
5
5
  "main": "dist/src/index.js",
6
6
  "module": "dist/src/index.js",
@@ -214,7 +214,7 @@ export default function CustomerProfileDisplay({
214
214
  <TableCell align="right">
215
215
  {isCustomer ? (
216
216
  <StyledLink
217
- href={`/user/orders?selectedOrder=${order.id}`}
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?selectedOrder=${order.id}`}
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/selectedIro=${iro.id}`}
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?selectedIro=${iro.id}`}
288
+ href={`/dashboard/admin/e-commerce/iros?selectedIroId=${iro.id}`}
289
289
  target="_self"
290
290
  >
291
291
  <Button variant="contained" size="small">
@@ -43,7 +43,9 @@ export default function OpoDisplay({ opo }: { opo: Opo }) {
43
43
  </TableRow>
44
44
  </TableBody>
45
45
  </Table>
46
- <Typography variant="body1">Contents of the order:</Typography>
46
+ <Typography variant="body1" sx={{ mt: 2 }}>
47
+ Contents of the order:
48
+ </Typography>
47
49
  <OpoSummary opo={opo} />
48
50
  {/* shiping details*/}
49
51
  </>
@@ -15,11 +15,14 @@ export function OpoSummaryRow({ data }: OpoSummaryRowProps) {
15
15
  <TableRow>
16
16
  <TableCell>{ordered_quantity}</TableCell>
17
17
  <TableCell>{product?.title}</TableCell>
18
- {/*
19
- TODO
20
- price is not yet populated
21
- <TableCell>€ {product?.price?.price}</TableCell>
22
- <TableCell>€ {product?.price?.price_incl_vat}</TableCell> */}
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>
23
26
  </TableRow>
24
27
  );
25
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
  },