Untitled
unknown
json
3 years ago
14 kB
11
Indexable
{
"id": "inboundDashboard",
"type": "container",
"prps": {
"flex": true,
"height": "100%",
"scps": [
{
"triggers": [
{
"event": "onMount",
"source": "inboundDashboard"
}
],
"actions": [
{
"type": "setState",
"target": "warehouseInstructionRepeaterForCounter",
"key": "filters",
"^value": [
{
"key": "customerinstructionid",
"operator": "equals",
"value": "{{state.appDashboard.idForDataQueryCI}}"
}
]
},
{
"type": "wait",
"duration": 100
},
{
"type": "setState",
"target": "warehouseInstructionRepeaterForCounter",
"key": "dtaObj",
"value": "WarehouseInstruction"
},
{
"type": "setState",
"target": "warehouseInstructionRepeaterForCounter-dataLoader",
"key": "needsNewData",
"value": true
}
]
},
{
"triggers": [
{
"event": "onMount"
}
],
"actions": [
{
"type": "wait",
"duration": 500
},
{
"type": "setState",
"target": "inboundCIRepeater",
"key": "filters",
"^value": [
{
"key": "CustomerInstructionId",
"operator": "equals",
"value": "{{state.appDashboard.idForDataQueryCI}}"
}
]
}
]
},
{
"id": "sumScpsForSummary",
"triggers": [
{
"event": "onMount",
"source": "inboundCIRepeater"
},
{
"event": "onStateChange",
"source": "inboundCIRepeater",
"key": "data"
}
],
"actions": [
{
"type": "wait",
"duration": 100
},
{
"type": "createFlow",
"to": "totalLoads",
"toKey": "cpt",
"value": "{{state.inboundCIRepeater.data.length}}"
},
{
"type": "stopScript",
"condition": {
"operator": "isFalsy",
"value": "{{sumScpsForTotalUnits.state.warehouseInstructionRepeaterForCounter.data}}"
}
},
{
"type": "reduceArray",
"value": "{{state.warehouseInstructionRepeaterForCounter.data}}",
"field": "quantity",
"reduction": "add",
"initialValue": 0,
"storeAsVariable": "totalUnitsResult"
},
{
"type": "createFlow",
"to": "totalUnits",
"toKey": "cpt",
"value": "{{variable.totalUnitsResult}}"
},
{
"type": "log",
"msg": "{{variable.totalUnitsResult}}"
},
{
"type": "stopScript",
"condition": {
"operator": "isFalsy",
"value": "{{sumScpsForSummary.state.inboundCIRepeater.data}}"
}
},
{
"type": "reduceArray",
"value": "{{state.inboundCIRepeater.data}}",
"field": "quantity",
"reduction": "add",
"initialValue": 0,
"storeAsVariable": "totalReceivedResult"
},
{
"type": "createFlow",
"to": "totalReceived",
"toKey": "cpt",
"value": "{{variable.totalReceivedResult}}"
},
{
"type": "createFlow",
"to": "unitsOutstanding",
"toKey": "cpt",
"value": "eval- ((state.totalReceived.cpt)) - ((state.totalUnits.cpt))"
}
]
}
]
},
"wgts": [
{
"id": "repeaterContainerWarehouseForCounter",
"type": "container",
"prps": {
"NOTE": "THIS REPEATER IS ONLY TO CALCULATE DATA, NOT FOR FUCNTIONALITY!!!!!!!!!!!!!!!!!!",
"vis": false,
"renderChildrenWhenInvis": true,
"dir": "vertical"
},
"wgts": [
{
"id": "warehouseInstructionRepeaterForCounter",
"type": "repeater",
"prps": {
"dtaObj": "",
"pageSize": 100,
"includeRowCount": true,
"deltaKeys": [
"offset",
"pageSize",
"dtaObj",
"filters",
"sortField"
],
"filters": [
{
"key": "active",
"value": true
}
],
"rowMda": {
"type": "containerSimple",
"rowPrps": {
"storeRowDataAs": "rowData",
"elementIdFormat": "((parentId))-((rowDataConcat.id))"
},
"prps": {
"dir": "vertical"
},
"wgts": [
{
"type": "icon",
"prps": {}
}
]
}
}
}
]
},
{
"traits": [
{
"trait": "shipping/customerInstructions/viewCustomerInstruction/customerInstructionTerminals/inbound/traits/summaryGridInboud",
"traitPrps": {
"totalLoadsLabel": "-",
"totalUnitsLabel": "-",
"totalReceivedLabel": "-",
"unitsOutstandLabel": "-"
}
}
],
"prps": {}
},
{
"traits": [
{
"trait": "shipping/customerInstructions/viewCustomerInstruction/customerInstructionTerminals/inbound/traits/inboundCiGridHeading",
"traitPrps": {}
}
]
},
{
"id": "repeaterContainerForInbound",
"type": "container",
"prps": {
"dir": "vertical"
},
"wgts": [
{
"id": "inboundCIRepeater",
"type": "repeater",
"prps": {
"dtaObj": "Inbound",
"pageSize": 10,
"deltaKeys": [
"offset",
"pageSize",
"dtaObj",
"filters",
"sortField"
],
"includeRowCount": true,
"dataTransformations": [
{
"field": "*",
"match": [
{
"operator": "isEqualCase",
"compareValue": null
}
],
"transformValueTo": "-"
}
],
"rowMda": {
"type": "containerSimple",
"rowPrps": {
"storeRowDataAs": "rowData",
"elementIdFormat": "((parentId))-((rowDataConcat.id))-((rowData.boedate))"
},
"prps": {
"dir": "vertical"
},
"wgts": [
{
"traits": [
{
"trait": "shipping/customerInstructions/viewCustomerInstruction/customerInstructionTerminals/inbound/traits/inboundCiGridBody",
"traitPrps": {
"transporter": "((rowData.transporter))",
"transporterContactPerson": "((rowData.transportercontactperson))",
"transporterContactNo": "((rowData.transportercontactnumber))",
"truckReg": "((rowData.truckregistration))",
"trailer1": "((rowData.trailer1))",
"trailer2": "((rowData.trailer2))",
"manifestNo": "((rowData.manifestnumber))",
"packingType": "((rowData.packagedescription))",
"grnRef": "((rowData.grnreference))",
"dateReceived": "((rowData.datereceived))",
"viewFireScript": {
"actions": [
{
"type": "createFlow",
"to": "viewInboundModalCI",
"toKey": "allDataForInboundCI",
"value": "{{rowData}}"
},
{
"type": "setState",
"target": "modalContent",
"key": "vis",
"value": true
},
{
"type": "setState",
"target": "view",
"key": "value",
"value": "shipping/customerInstructions/viewCustomerInstruction/customerInstructionTerminals/inbound/view/viewInboundModal"
}
]
}
}
}
]
}
]
}
}
}
]
},
{
"id": "pagingContainerInbound",
"traits": [
{
"trait": "shipping/generalTraits/pagingContainer/pagingContainerForShipping",
"traitPrps": {
"blueprintId": "pagingBlueprintInbound",
"innerBlueprintId": "innerBlueprintInbound",
"pageSizeLookupId": "pageSizeLookupInbound",
"currentPageLabelId": "currentPageInbound",
"pageMaxLabelId": "pageMaxInbound",
"totalRecordsLabelId": "totalRecordsInbound",
"targetRepeaterId": "inboundCIRepeater",
"nextPageButton": "nextPageButtonInbound",
"lastPageButton": "lastPageButtonInbound",
"spacingForContainerLeft": "noPadding"
}
}
],
"prps": {}
}
]
}Editor is loading...