@evenicanpm/portal-table-ui 1.8.3 → 2.0.0

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": "@evenicanpm/portal-table-ui",
3
- "version": "1.8.3",
3
+ "version": "2.0.0",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "",
@@ -41,11 +41,11 @@
41
41
  },
42
42
  "dependencies": {
43
43
  "@arrows/multimethod": "^2.1.0",
44
- "@evenicanpm/portal-types-schemas": "^1.8.1",
45
- "@evenicanpm/ui": "^1.8.1",
44
+ "@evenicanpm/portal-types-schemas": "^2.0.0",
45
+ "@evenicanpm/ui": "^2.0.0",
46
46
  "@mui/lab": "^7.0.1-beta.19",
47
47
  "@tanstack/react-query": "^5.90.11",
48
48
  "date-fns": "^4.1.0"
49
49
  },
50
- "gitHead": "75086d547f588fd7c1832bc23c48c486cc5af588"
50
+ "gitHead": "7552c1e700a0027b8a65506c77cb10dae092fdfb"
51
51
  }
@@ -84,9 +84,9 @@ const PortalAuthProvider = ({
84
84
  };
85
85
 
86
86
  export {
87
- PortalAuthProvider,
88
- useAuth,
89
- type AuthProviderProps,
90
87
  AuthContext,
88
+ type AuthProviderProps,
89
+ PortalAuthProvider,
91
90
  type Session,
91
+ useAuth,
92
92
  };
@@ -1,4 +1,5 @@
1
1
  "use client";
2
+ import FlagIcon from "@mui/icons-material/Flag";
2
3
  import {
3
4
  Box,
4
5
  Card,
@@ -35,7 +36,7 @@ const formatDate = (dateString?: string): string => {
35
36
  if (!dateString) return "—";
36
37
  try {
37
38
  const date = new Date(dateString);
38
- if (isNaN(date.getTime())) return dateString;
39
+ if (Number.isNaN(date.getTime())) return dateString;
39
40
  return new Intl.DateTimeFormat("en-US", {
40
41
  year: "numeric",
41
42
  month: "long",
@@ -60,6 +61,7 @@ interface InvoiceLine {
60
61
 
61
62
  interface InvoiceData {
62
63
  Status?: string | number;
64
+ IsOverdue?: boolean;
63
65
  SalesInvoiceLine?: InvoiceLine[];
64
66
  InvoiceSubtotal?: number;
65
67
  TotalTaxAmount?: number;
@@ -337,7 +339,14 @@ export const InvoiceDetailsTemplate = ({
337
339
  <Typography variant="body2" color="text.secondary">
338
340
  Due Date
339
341
  </Typography>
340
- <Typography>{formatDate(invoice.DueDate)}</Typography>
342
+
343
+ <Box sx={{ display: "flex", alignItems: "center", gap: 1 }}>
344
+ <Typography>{formatDate(invoice.DueDate)}</Typography>
345
+
346
+ {invoice?.IsOverdue && (
347
+ <FlagIcon sx={{ color: "error.main" }} fontSize="small" />
348
+ )}
349
+ </Box>
341
350
  </Grid2>
342
351
  )}
343
352
  </Grid2>
@@ -1,2 +1,3 @@
1
1
  import Table from "./table";
2
+
2
3
  export { Table };