Add Class Code and BOMs Used In columns to Unused Items page

- Join classcode table for class code display
- Subquery bomitem for count of distinct parent BOMs each item appears in
- Add both columns to table widget between Item Type and Created By

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-24 08:56:50 -05:00
parent 74ff4d6aef
commit 9e88a6b1ad
3 changed files with 79 additions and 5 deletions

View File

@@ -35,6 +35,8 @@
"Item Number",
"Description",
"Item Type",
"Class Code",
"BOMs Used In",
"Created By",
"Date Created",
"Last Transaction",
@@ -56,6 +58,8 @@
{"key": "primaryColumns.Item Number.computedValue"},
{"key": "primaryColumns.Description.computedValue"},
{"key": "primaryColumns.Item Type.computedValue"},
{"key": "primaryColumns.Class Code.computedValue"},
{"key": "primaryColumns.BOMs Used In.computedValue"},
{"key": "primaryColumns.Created By.computedValue"},
{"key": "primaryColumns.Date Created.computedValue"},
{"key": "primaryColumns.Last Transaction.computedValue"},
@@ -185,6 +189,68 @@
"verticalAlignment": "CENTER",
"width": 150
},
"Class Code": {
"alias": "Class Code",
"allowCellWrapping": false,
"allowSameOptionsInNewRow": true,
"columnType": "text",
"computedValue": "{{(() => { const tableData = Table1.processedTableData || []; return tableData.length > 0 ? tableData.map((currentRow, currentIndex) => (currentRow[\"Class Code\"])) : [] })()}}",
"currencyCode": "USD",
"decimals": 0,
"enableFilter": true,
"enableSort": true,
"horizontalAlignment": "LEFT",
"id": "Class Code",
"index": 3,
"isCellEditable": false,
"isCellVisible": true,
"isDerived": false,
"isDisabled": false,
"isDiscardVisible": true,
"isEditable": false,
"isSaveVisible": true,
"isVisible": true,
"label": "Class Code",
"notation": "standard",
"originalId": "Class Code",
"sticky": "",
"textSize": "0.775rem",
"thousandSeparator": true,
"validation": {},
"verticalAlignment": "CENTER",
"width": 150
},
"BOMs Used In": {
"alias": "BOMs Used In",
"allowCellWrapping": false,
"allowSameOptionsInNewRow": true,
"columnType": "number",
"computedValue": "{{(() => { const tableData = Table1.processedTableData || []; return tableData.length > 0 ? tableData.map((currentRow, currentIndex) => (currentRow[\"BOMs Used In\"])) : [] })()}}",
"currencyCode": "USD",
"decimals": 0,
"enableFilter": true,
"enableSort": true,
"horizontalAlignment": "LEFT",
"id": "BOMs Used In",
"index": 4,
"isCellEditable": false,
"isCellVisible": true,
"isDerived": false,
"isDisabled": false,
"isDiscardVisible": true,
"isEditable": false,
"isSaveVisible": true,
"isVisible": true,
"label": "BOMs Used In",
"notation": "standard",
"originalId": "BOMs Used In",
"sticky": "",
"textSize": "0.775rem",
"thousandSeparator": true,
"validation": {},
"verticalAlignment": "CENTER",
"width": 150
},
"Created By": {
"alias": "Created By",
"allowCellWrapping": false,
@@ -197,7 +263,7 @@
"enableSort": true,
"horizontalAlignment": "LEFT",
"id": "Created By",
"index": 3,
"index": 5,
"isCellEditable": false,
"isCellVisible": true,
"isDerived": false,
@@ -228,7 +294,7 @@
"enableSort": true,
"horizontalAlignment": "LEFT",
"id": "Date Created",
"index": 4,
"index": 6,
"isCellEditable": false,
"isCellVisible": true,
"isDerived": false,
@@ -259,7 +325,7 @@
"enableSort": true,
"horizontalAlignment": "LEFT",
"id": "Last Transaction",
"index": 5,
"index": 7,
"isCellEditable": false,
"isCellVisible": true,
"isDerived": false,
@@ -290,7 +356,7 @@
"enableSort": true,
"horizontalAlignment": "LEFT",
"id": "Days Unused",
"index": 6,
"index": 8,
"isCellEditable": false,
"isCellVisible": true,
"isDerived": false,