@evenicanpm/portal-table-ui 2.3.0 → 2.3.2

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": "2.3.0",
3
+ "version": "2.3.2",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "",
@@ -47,5 +47,5 @@
47
47
  "date-fns": "^4.1.0",
48
48
  "zod": "^4.4.3"
49
49
  },
50
- "gitHead": "72bf1aeb02a3d96c587706c0d91606698e38ff6a"
50
+ "gitHead": "213ad422feec74815e682bd9950ef94893e5ecda"
51
51
  }
@@ -78,6 +78,7 @@ interface InvoiceData {
78
78
  Notes?: string;
79
79
  Id: string;
80
80
  OrderedByCustomerName?: string;
81
+ ChargeTotal?: number;
81
82
  }
82
83
 
83
84
  interface TableColumn {
@@ -88,7 +89,7 @@ interface TableColumn {
88
89
 
89
90
  const detailSkeletonKeys = ["from", "bill-to", "invoice-date", "due-date"];
90
91
  const tableSkeletonRowKeys = ["line-1", "line-2", "line-3", "line-4"];
91
- const totalSkeletonKeys = ["subtotal", "tax", "total"];
92
+ const totalSkeletonKeys = ["subtotal", "charge-total", "tax", "total"];
92
93
 
93
94
  const isDataEmpty = (data: InvoiceData | null | undefined): boolean => {
94
95
  if (!data) return true;
@@ -138,7 +139,7 @@ export const InvoiceDetailsTemplate = ({
138
139
  const subtotal = invoice?.InvoiceSubtotal ?? 0;
139
140
  const tax = invoice?.TotalTaxAmount ?? 0;
140
141
  const total = invoice?.Amount ?? 0;
141
-
142
+ const chargeTotal = invoice?.ChargeTotal ?? 0;
142
143
  // Fixed column definitions with specific widths
143
144
  const columns: TableColumn[] = [
144
145
  { label: "#", width: 60, aligned: "left" },
@@ -562,6 +563,12 @@ export const InvoiceDetailsTemplate = ({
562
563
  {formatCurrency(subtotal)}
563
564
  </Typography>
564
565
  </Box>
566
+ <Box display="flex" justifyContent="space-between" mb={1}>
567
+ <Typography variant="body2">Total Charges</Typography>
568
+ <Typography variant="body2" fontWeight={500}>
569
+ {formatCurrency(chargeTotal)}
570
+ </Typography>
571
+ </Box>
565
572
  <Box display="flex" justifyContent="space-between" mb={1}>
566
573
  <Typography variant="body2">Tax</Typography>
567
574
  <Typography variant="body2" fontWeight={500}>
@@ -241,13 +241,16 @@ export default function DocumentTable({
241
241
  bulkRegistry,
242
242
  );
243
243
 
244
- const hasActions =
244
+ /* const hasActions =
245
245
  configPending ||
246
246
  (resolvedActions.length > 0 &&
247
247
  rows?.data?.some((row) =>
248
248
  resolvedActions.some((a) => !a.isEnabled || a.isEnabled(row)),
249
249
  )) ||
250
- false;
250
+ false; */
251
+ // we want the column to appear by default, actions will render separately
252
+ // when ready which is currently the desired behaviour per item 7435
253
+ const hasActions = (config?.Actions?.length ?? 0) > 0;
251
254
  const hasBulkActions = resolvedBulkActions.length > 0;
252
255
 
253
256
  // --- Render --- //
@@ -32,7 +32,7 @@ export const getVisibleColumns = (columns: Column[] | undefined) =>
32
32
  columns
33
33
  ?.filter(
34
34
  (column): column is Column & { ColumnOrder: number } =>
35
- typeof column.ColumnOrder === "number",
35
+ typeof column.ColumnOrder === "number" && column.IsVisible !== false,
36
36
  )
37
37
  .sort((a, b) => a.ColumnOrder - b.ColumnOrder);
38
38