umwd-components 0.1.701 → 0.1.702

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.701",
3
+ "version": "0.1.702",
4
4
  "description": "UMWD Component library",
5
5
  "main": "dist/src/index.js",
6
6
  "module": "dist/src/index.js",
@@ -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
@@ -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.map((item: OpoItem) => (
35
- <OpoSummaryRow key={item.id} data={item} />
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,11 @@ 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
18
21
  <TableCell>€ {product?.price?.price}</TableCell>
19
- <TableCell>€ {product?.price?.price_incl_vat}</TableCell>
22
+ <TableCell>€ {product?.price?.price_incl_vat}</TableCell> */}
20
23
  </TableRow>
21
24
  );
22
25
  }