Merge branch 'MBS-2045' of https://bitbucket.org/magnapower/statistics-app into MBS-2045

This commit is contained in:
2026-03-31 07:00:10 -04:00
3 changed files with 197 additions and 161 deletions

View File

@@ -5,7 +5,7 @@
"pluginType": "DB", "pluginType": "DB",
"unpublishedAction": { "unpublishedAction": {
"actionConfiguration": { "actionConfiguration": {
"body": "SELECT\n i.item_number AS \"Item Number\",\n i.item_descrip1 AS \"Description\",\n CASE i.item_type\n WHEN 'P' THEN 'Purchased'\n WHEN 'M' THEN 'Manufactured'\n WHEN 'R' THEN 'Reference'\n WHEN 'T' THEN 'Tooling'\n WHEN 'O' THEN 'Outside Process'\n WHEN 'B' THEN 'Breeder'\n WHEN 'C' THEN 'Co-Product'\n WHEN 'F' THEN 'Phantom'\n ELSE i.item_type\n END AS \"Item Type\",\n clc.classcode_code AS \"Class Code\",\n COALESCE(bom_count.num_boms, 0) AS \"BOMs Used In\",\n COALESCE(qoh.qty_on_hand, 0) AS \"QOH\",\n cc.comment_user AS \"Created By\",\n COALESCE(i.item_created, cc.comment_date)::date AS \"Date Created\",\n last_txn.last_transaction_date::date AS \"Last Transaction\",\n (CURRENT_DATE - COALESCE(last_txn.last_transaction_date, i.item_created, cc.comment_date)::date) AS \"Days Unused\"\nFROM item i\nLEFT JOIN classcode clc ON clc.classcode_id = i.item_classcode_id\nLEFT JOIN (\n SELECT bomitem_item_id, COUNT(DISTINCT bomitem_parent_item_id) AS num_boms\n FROM bomitem\n GROUP BY bomitem_item_id\n) bom_count ON bom_count.bomitem_item_id = i.item_id\nLEFT JOIN (\n SELECT itemsite_item_id, SUM(itemsite_qtyonhand) AS qty_on_hand\n FROM itemsite\n GROUP BY itemsite_item_id\n) qoh ON qoh.itemsite_item_id = i.item_id\nLEFT JOIN comment cc\n ON cc.comment_source_id = i.item_id\n AND cc.comment_source = 'I'\n AND cc.comment_text = 'Created'\nLEFT JOIN (\n SELECT\n isite.itemsite_item_id,\n MAX(ih.invhist_transdate) AS last_transaction_date\n FROM itemsite isite\n JOIN invhist ih ON ih.invhist_itemsite_id = isite.itemsite_id\n GROUP BY isite.itemsite_item_id\n) last_txn ON last_txn.itemsite_item_id = i.item_id\nWHERE i.item_active\n AND (CURRENT_DATE - COALESCE(last_txn.last_transaction_date, i.item_created, cc.comment_date)::date)\n >= '{{UnusedDays.text}}'::int\nORDER BY \"Days Unused\" DESC", "body": "SELECT\n i.item_number AS \"Item Number\",\n i.item_descrip1 AS \"Description\",\n CASE i.item_type\n WHEN 'P' THEN 'Purchased'\n WHEN 'M' THEN 'Manufactured'\n WHEN 'R' THEN 'Reference'\n WHEN 'T' THEN 'Tooling'\n WHEN 'O' THEN 'Outside Process'\n WHEN 'B' THEN 'Breeder'\n WHEN 'C' THEN 'Co-Product'\n WHEN 'F' THEN 'Phantom'\n ELSE i.item_type\n END AS \"Item Type\",\n clc.classcode_code AS \"Class Code\",\n COALESCE(bom_count.num_boms, 0) AS \"BOMs Used In\",\n COALESCE(qoh.qty_on_hand, 0) AS \"QOH\",\n cc.comment_user AS \"Created By\",\n COALESCE(i.item_created, cc.comment_date)::date AS \"Date Created\",\n last_txn.last_transaction_date::date AS \"Last Transaction\",\n (CURRENT_DATE - COALESCE(last_txn.last_transaction_date, i.item_created, cc.comment_date)::date) AS \"Days Unused\"\nFROM item i\nLEFT JOIN classcode clc ON clc.classcode_id = i.item_classcode_id\nLEFT JOIN (\n SELECT bomitem_item_id, COUNT(DISTINCT bomitem_parent_item_id) AS num_boms\n FROM bomitem\n GROUP BY bomitem_item_id\n) bom_count ON bom_count.bomitem_item_id = i.item_id\nLEFT JOIN (\n SELECT itemsite_item_id, SUM(itemsite_qtyonhand) AS qty_on_hand\n FROM itemsite\n GROUP BY itemsite_item_id\n) qoh ON qoh.itemsite_item_id = i.item_id\nLEFT JOIN comment cc\n ON cc.comment_source_id = i.item_id\n AND cc.comment_source = 'I'\n AND cc.comment_text = 'Created'\nLEFT JOIN (\n SELECT\n isite.itemsite_item_id,\n MAX(ih.invhist_transdate) AS last_transaction_date\n FROM itemsite isite\n JOIN invhist ih ON ih.invhist_itemsite_id = isite.itemsite_id\n GROUP BY isite.itemsite_item_id\n) last_txn ON last_txn.itemsite_item_id = i.item_id\nWHERE i.item_active\n AND (CURRENT_DATE - COALESCE(last_txn.last_transaction_date, i.item_created, cc.comment_date)::date)\n >= '{{UnusedDays.text}}'::int\nORDER BY \"Days Unused\" DESC\n",
"encodeParamsToggle": true, "encodeParamsToggle": true,
"paginationType": "NONE", "paginationType": "NONE",
"pluginSpecifiedTemplates": [ "pluginSpecifiedTemplates": [

View File

@@ -4,7 +4,7 @@
"borderColor": "#E0DEDE", "borderColor": "#E0DEDE",
"borderRadius": "0.375rem", "borderRadius": "0.375rem",
"borderWidth": "1", "borderWidth": "1",
"bottomRow": 67, "bottomRow": 124,
"boxShadow": "{{appsmith.theme.boxShadow.appBoxShadow}}", "boxShadow": "{{appsmith.theme.boxShadow.appBoxShadow}}",
"cachedTableData": {}, "cachedTableData": {},
"canFreezeColumn": true, "canFreezeColumn": true,
@@ -50,25 +50,55 @@
"customIsLoadingValue": "", "customIsLoadingValue": "",
"defaultPageSize": 0, "defaultPageSize": 0,
"defaultSelectedRowIndex": 0, "defaultSelectedRowIndex": 0,
"defaultSelectedRowIndices": [0], "defaultSelectedRowIndices": [
0
],
"delimiter": ",", "delimiter": ",",
"dynamicBindingPathList": [ "dynamicBindingPathList": [
{"key": "accentColor"}, {
{"key": "boxShadow"}, "key": "accentColor"
{"key": "tableData"}, },
{"key": "primaryColumns.Item Number.computedValue"}, {
{"key": "primaryColumns.Description.computedValue"}, "key": "boxShadow"
{"key": "primaryColumns.Item Type.computedValue"}, },
{"key": "primaryColumns.Class Code.computedValue"}, {
{"key": "primaryColumns.BOMs Used In.computedValue"}, "key": "tableData"
{"key": "primaryColumns.QOH.computedValue"}, },
{"key": "primaryColumns.Created By.computedValue"}, {
{"key": "primaryColumns.Date Created.computedValue"}, "key": "primaryColumns.Item Number.computedValue"
{"key": "primaryColumns.Last Transaction.computedValue"}, },
{"key": "primaryColumns.Days Unused.computedValue"} {
"key": "primaryColumns.Description.computedValue"
},
{
"key": "primaryColumns.Item Type.computedValue"
},
{
"key": "primaryColumns.Class Code.computedValue"
},
{
"key": "primaryColumns.BOMs Used In.computedValue"
},
{
"key": "primaryColumns.QOH.computedValue"
},
{
"key": "primaryColumns.Created By.computedValue"
},
{
"key": "primaryColumns.Date Created.computedValue"
},
{
"key": "primaryColumns.Last Transaction.computedValue"
},
{
"key": "primaryColumns.Days Unused.computedValue"
}
], ],
"dynamicPropertyPathList": [ "dynamicPropertyPathList": [
{"key": "textSize"} {
"key": "textSize"
}
], ],
"dynamicTriggerPathList": [], "dynamicTriggerPathList": [],
"enableClientSideSearch": true, "enableClientSideSearch": true,
@@ -98,130 +128,6 @@
"parentId": "0", "parentId": "0",
"parentRowSpace": 10, "parentRowSpace": 10,
"primaryColumns": { "primaryColumns": {
"Item Number": {
"alias": "Item Number",
"allowCellWrapping": false,
"allowSameOptionsInNewRow": true,
"columnType": "text",
"computedValue": "{{(() => { const tableData = Table1.processedTableData || []; return tableData.length > 0 ? tableData.map((currentRow, currentIndex) => (currentRow[\"Item Number\"])) : [] })()}}",
"currencyCode": "USD",
"decimals": 0,
"enableFilter": true,
"enableSort": true,
"horizontalAlignment": "LEFT",
"id": "Item Number",
"index": 0,
"isCellEditable": false,
"isCellVisible": true,
"isDerived": false,
"isDisabled": false,
"isDiscardVisible": true,
"isEditable": false,
"isSaveVisible": true,
"isVisible": true,
"label": "Item Number",
"notation": "standard",
"originalId": "Item Number",
"sticky": "",
"textSize": "0.775rem",
"thousandSeparator": true,
"validation": {},
"verticalAlignment": "CENTER",
"width": 150
},
"Description": {
"alias": "Description",
"allowCellWrapping": false,
"allowSameOptionsInNewRow": true,
"columnType": "text",
"computedValue": "{{(() => { const tableData = Table1.processedTableData || []; return tableData.length > 0 ? tableData.map((currentRow, currentIndex) => (currentRow[\"Description\"])) : [] })()}}",
"currencyCode": "USD",
"decimals": 0,
"enableFilter": true,
"enableSort": true,
"horizontalAlignment": "LEFT",
"id": "Description",
"index": 1,
"isCellEditable": false,
"isCellVisible": true,
"isDerived": false,
"isDisabled": false,
"isDiscardVisible": true,
"isEditable": false,
"isSaveVisible": true,
"isVisible": true,
"label": "Description",
"notation": "standard",
"originalId": "Description",
"sticky": "",
"textSize": "0.775rem",
"thousandSeparator": true,
"validation": {},
"verticalAlignment": "CENTER",
"width": 150
},
"Item Type": {
"alias": "Item Type",
"allowCellWrapping": false,
"allowSameOptionsInNewRow": true,
"columnType": "text",
"computedValue": "{{(() => { const tableData = Table1.processedTableData || []; return tableData.length > 0 ? tableData.map((currentRow, currentIndex) => (currentRow[\"Item Type\"])) : [] })()}}",
"currencyCode": "USD",
"decimals": 0,
"enableFilter": true,
"enableSort": true,
"horizontalAlignment": "LEFT",
"id": "Item Type",
"index": 2,
"isCellEditable": false,
"isCellVisible": true,
"isDerived": false,
"isDisabled": false,
"isDiscardVisible": true,
"isEditable": false,
"isSaveVisible": true,
"isVisible": true,
"label": "Item Type",
"notation": "standard",
"originalId": "Item Type",
"sticky": "",
"textSize": "0.775rem",
"thousandSeparator": true,
"validation": {},
"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": { "BOMs Used In": {
"alias": "BOMs Used In", "alias": "BOMs Used In",
"allowCellWrapping": false, "allowCellWrapping": false,
@@ -253,19 +159,19 @@
"verticalAlignment": "CENTER", "verticalAlignment": "CENTER",
"width": 150 "width": 150
}, },
"QOH": { "Class Code": {
"alias": "QOH", "alias": "Class Code",
"allowCellWrapping": false, "allowCellWrapping": false,
"allowSameOptionsInNewRow": true, "allowSameOptionsInNewRow": true,
"columnType": "number", "columnType": "text",
"computedValue": "{{(() => { const tableData = Table1.processedTableData || []; return tableData.length > 0 ? tableData.map((currentRow, currentIndex) => (currentRow[\"QOH\"])) : [] })()}}", "computedValue": "{{(() => { const tableData = Table1.processedTableData || []; return tableData.length > 0 ? tableData.map((currentRow, currentIndex) => (currentRow[\"Class Code\"])) : [] })()}}",
"currencyCode": "USD", "currencyCode": "USD",
"decimals": 0, "decimals": 0,
"enableFilter": true, "enableFilter": true,
"enableSort": true, "enableSort": true,
"horizontalAlignment": "LEFT", "horizontalAlignment": "LEFT",
"id": "QOH", "id": "Class Code",
"index": 5, "index": 3,
"isCellEditable": false, "isCellEditable": false,
"isCellVisible": true, "isCellVisible": true,
"isDerived": false, "isDerived": false,
@@ -274,9 +180,9 @@
"isEditable": false, "isEditable": false,
"isSaveVisible": true, "isSaveVisible": true,
"isVisible": true, "isVisible": true,
"label": "QOH", "label": "Class Code",
"notation": "standard", "notation": "standard",
"originalId": "QOH", "originalId": "Class Code",
"sticky": "", "sticky": "",
"textSize": "0.775rem", "textSize": "0.775rem",
"thousandSeparator": true, "thousandSeparator": true,
@@ -346,6 +252,130 @@
"verticalAlignment": "CENTER", "verticalAlignment": "CENTER",
"width": 150 "width": 150
}, },
"Days Unused": {
"alias": "Days Unused",
"allowCellWrapping": false,
"allowSameOptionsInNewRow": true,
"columnType": "number",
"computedValue": "{{(() => { const tableData = Table1.processedTableData || []; return tableData.length > 0 ? tableData.map((currentRow, currentIndex) => (currentRow[\"Days Unused\"])) : [] })()}}",
"currencyCode": "USD",
"decimals": 0,
"enableFilter": true,
"enableSort": true,
"horizontalAlignment": "LEFT",
"id": "Days Unused",
"index": 9,
"isCellEditable": false,
"isCellVisible": true,
"isDerived": false,
"isDisabled": false,
"isDiscardVisible": true,
"isEditable": false,
"isSaveVisible": true,
"isVisible": true,
"label": "Days Unused",
"notation": "standard",
"originalId": "Days Unused",
"sticky": "",
"textSize": "0.775rem",
"thousandSeparator": true,
"validation": {},
"verticalAlignment": "CENTER",
"width": 150
},
"Description": {
"alias": "Description",
"allowCellWrapping": false,
"allowSameOptionsInNewRow": true,
"columnType": "text",
"computedValue": "{{(() => { const tableData = Table1.processedTableData || []; return tableData.length > 0 ? tableData.map((currentRow, currentIndex) => (currentRow[\"Description\"])) : [] })()}}",
"currencyCode": "USD",
"decimals": 0,
"enableFilter": true,
"enableSort": true,
"horizontalAlignment": "LEFT",
"id": "Description",
"index": 1,
"isCellEditable": false,
"isCellVisible": true,
"isDerived": false,
"isDisabled": false,
"isDiscardVisible": true,
"isEditable": false,
"isSaveVisible": true,
"isVisible": true,
"label": "Description",
"notation": "standard",
"originalId": "Description",
"sticky": "",
"textSize": "0.775rem",
"thousandSeparator": true,
"validation": {},
"verticalAlignment": "CENTER",
"width": 150
},
"Item Number": {
"alias": "Item Number",
"allowCellWrapping": false,
"allowSameOptionsInNewRow": true,
"columnType": "text",
"computedValue": "{{(() => { const tableData = Table1.processedTableData || []; return tableData.length > 0 ? tableData.map((currentRow, currentIndex) => (currentRow[\"Item Number\"])) : [] })()}}",
"currencyCode": "USD",
"decimals": 0,
"enableFilter": true,
"enableSort": true,
"horizontalAlignment": "LEFT",
"id": "Item Number",
"index": 0,
"isCellEditable": false,
"isCellVisible": true,
"isDerived": false,
"isDisabled": false,
"isDiscardVisible": true,
"isEditable": false,
"isSaveVisible": true,
"isVisible": true,
"label": "Item Number",
"notation": "standard",
"originalId": "Item Number",
"sticky": "",
"textSize": "0.775rem",
"thousandSeparator": true,
"validation": {},
"verticalAlignment": "CENTER",
"width": 150
},
"Item Type": {
"alias": "Item Type",
"allowCellWrapping": false,
"allowSameOptionsInNewRow": true,
"columnType": "text",
"computedValue": "{{(() => { const tableData = Table1.processedTableData || []; return tableData.length > 0 ? tableData.map((currentRow, currentIndex) => (currentRow[\"Item Type\"])) : [] })()}}",
"currencyCode": "USD",
"decimals": 0,
"enableFilter": true,
"enableSort": true,
"horizontalAlignment": "LEFT",
"id": "Item Type",
"index": 2,
"isCellEditable": false,
"isCellVisible": true,
"isDerived": false,
"isDisabled": false,
"isDiscardVisible": true,
"isEditable": false,
"isSaveVisible": true,
"isVisible": true,
"label": "Item Type",
"notation": "standard",
"originalId": "Item Type",
"sticky": "",
"textSize": "0.775rem",
"thousandSeparator": true,
"validation": {},
"verticalAlignment": "CENTER",
"width": 150
},
"Last Transaction": { "Last Transaction": {
"alias": "Last Transaction", "alias": "Last Transaction",
"allowCellWrapping": false, "allowCellWrapping": false,
@@ -377,19 +407,19 @@
"verticalAlignment": "CENTER", "verticalAlignment": "CENTER",
"width": 150 "width": 150
}, },
"Days Unused": { "QOH": {
"alias": "Days Unused", "alias": "QOH",
"allowCellWrapping": false, "allowCellWrapping": false,
"allowSameOptionsInNewRow": true, "allowSameOptionsInNewRow": true,
"columnType": "number", "columnType": "number",
"computedValue": "{{(() => { const tableData = Table1.processedTableData || []; return tableData.length > 0 ? tableData.map((currentRow, currentIndex) => (currentRow[\"Days Unused\"])) : [] })()}}", "computedValue": "{{(() => { const tableData = Table1.processedTableData || []; return tableData.length > 0 ? tableData.map((currentRow, currentIndex) => (currentRow[\"QOH\"])) : [] })()}}",
"currencyCode": "USD", "currencyCode": "USD",
"decimals": 0, "decimals": 0,
"enableFilter": true, "enableFilter": true,
"enableSort": true, "enableSort": true,
"horizontalAlignment": "LEFT", "horizontalAlignment": "LEFT",
"id": "Days Unused", "id": "QOH",
"index": 9, "index": 5,
"isCellEditable": false, "isCellEditable": false,
"isCellVisible": true, "isCellVisible": true,
"isDerived": false, "isDerived": false,
@@ -398,9 +428,9 @@
"isEditable": false, "isEditable": false,
"isSaveVisible": true, "isSaveVisible": true,
"isVisible": true, "isVisible": true,
"label": "Days Unused", "label": "QOH",
"notation": "standard", "notation": "standard",
"originalId": "Days Unused", "originalId": "QOH",
"sticky": "", "sticky": "",
"textSize": "0.775rem", "textSize": "0.775rem",
"thousandSeparator": true, "thousandSeparator": true,

View File

@@ -7,8 +7,12 @@
"boxShadow": "none", "boxShadow": "none",
"defaultText": "365", "defaultText": "365",
"dynamicBindingPathList": [ "dynamicBindingPathList": [
{"key": "accentColor"}, {
{"key": "borderRadius"} "key": "accentColor"
},
{
"key": "borderRadius"
}
], ],
"dynamicHeight": "FIXED", "dynamicHeight": "FIXED",
"dynamicTriggerPathList": [], "dynamicTriggerPathList": [],
@@ -34,6 +38,8 @@
"mobileRightColumn": 21, "mobileRightColumn": 21,
"mobileTopRow": 1, "mobileTopRow": 1,
"needsErrorInfo": false, "needsErrorInfo": false,
"originalBottomRow": 12,
"originalTopRow": 5,
"parentColumnSpace": 25.109375, "parentColumnSpace": 25.109375,
"parentId": "0", "parentId": "0",
"parentRowSpace": 10, "parentRowSpace": 10,