Untitled
unknown
json
4 years ago
35 kB
4
Indexable
{ "id": "newQuote", "type": "container", "prps": { "mainAxisAlign": "space-between", "singlePage": true, "counter": 0, "recordArray": [ "quoteAndCosting/newQuote/tabs/detail", "quoteAndCosting/newQuote/tabs/costPerContainer", "quoteAndCosting/newQuote/tabs/costPerMt", "quoteAndCosting/newQuote/tabs/storage", "quoteAndCosting/newQuote/tabs/specialServiceRequest", "quoteAndCosting/newQuote/tabs/quoteOutput", "quoteAndCosting/newQuote/tabs/cAgreement" ], "scps": [ { "triggers": [ { "event": "onStateChange", "source": "tabViewport", "key": "value" } ], "actions": [ { "type": "applyComparison", "operator": "isEqual", "compareValue": "quoteAndCosting/newQuote/tabs/detail", "value": "((state.tabViewport.value))", "branch": { "true": [ { "type": "setState", "target": "simpleHeadingSection", "key": "vis", "value": true }, { "type": "setState", "target": "moreDetailExpandedHeadingSection", "key": "vis", "value": false } ], "false": [ { "type": "setState", "target": "simpleHeadingSection", "key": "vis", "value": false }, { "type": "setState", "target": "moreDetailExpandedHeadingSection", "key": "vis", "value": true } ] } } ] }, { "triggers": [ { "event": "onMount", "source": "tabViewport" }, { "event": "onStateChange", "source": "newQuote", "key": "counter" } ], "actions": [ { "type": "setState", "target": "tabViewport", "key": "value", "value": "((state.newQuote.recordArray.((state.newQuote.counter))))" } ] }, { "triggers": [ { "event": "onMount" } ], "actions": [ { "type": "setState", "target": "appDashboard", "key": "page2", "value": "New Quote" }, { "type": "setState", "target": "page2", "key": "vis", "value": true }, { "type": "setState", "target": "arrow", "key": "vis", "value": true } ] } ] }, "wgts": [ { "blueprint": "bridgeBook/custom/quoteAndCosting/addNewQuote/mainPageFullScreenWithProgressBar", "blueprintPrps": { "id": "headingLabel", "borderBottomColor": "primary", "cpt": "New Quote", "icon": "request_quote", "iconColor": "primary", "cptColor": "primaryText", "bold": true }, "prps": { "singlePage": false, "flows": [ { "from": "newQuote", "fromKey": "headersRecord", "to": "headingLabel", "toKey": "cpt", "mapFunctionString": "v => (v === null) ? 'New Quote': 'Edit Quote'" } ] } }, { "id": "simpleHeadingSection", "type": "container", "prps": { "dir": "horizontal", "marginLeft": "{theme.global.padding}", "mainAxisAlign": "start", "marginTop": "{theme.global.mediumPadding}", "vis": true, "renderChildrenWhenInvis": true }, "wgts": [ { "blueprint": "bridgeBook/atoms/inputFields/filledInputFieldsWithLookupsForDivision", "blueprintPrps": { "id": "divisionFilter", "cptPlaceholderText": "Filter...", "cptHeading": "Division", "icon": "groups", "lookupDtaObj": "Division_Lkp", "lookupKey": "division_name", "targetRepeater": "", "filterKey": "division_ptp_cde", "dropdownWidth": "340px", "filterOnRecord": "ptp_pat_cde", "gatewayRequestKey": "ptp_cde" }, "prps": { "width": "18%", "marginRight": "{theme.global.smallPadding}", "scps": [ { "triggers": [ { "event": "onMount" } ], "actions": [ { "type": "wait", "duration": 300 }, { "type": "applyComparison", "operator": "isNotFalsy", "value": "((state.newQuote.headersRecord.division_ptp_cde))", "branch": { "true": [ { "type": "setState", "target": "divisionFilter", "key": "value", "value": "((state.newQuote.headersRecord.division_name))" }, { "type": "setState", "target": "divisionFilter", "key": "storedGatewayValue", "value": "((state.newQuote.headersRecord.division_ptp_cde))" }, { "type": "setState", "target": "divisionFilter", "key": "forceClosePopup", "value": true } ] } } ] } ] } }, { "blueprint": "bridgeBook/atoms/inputFields/filledInputFieldsWithLeadingAndTrailingIcon", "blueprintPrps": { "id": "quoteNumber", "cptPlaceholderText": "...", "cptHeading": "Quote Number", "icon": "groups", "dropdownArrow": false, "required": false }, "prps": { "width": "18%", "marginRight": "{theme.global.smallPadding}", "enabled": false, "flows": [ { "from": "newQuote", "fromKey": "headersRecord", "fromSubKey": "quote_number", "to": "quoteNumber", "toKey": "value" } ] } }, { "blueprint": "bridgeBook/custom/quoteAndCosting/addNewQuote/filledInputFieldsForClient", "blueprintPrps": { "id": "clientQuote", "cptPlaceholderText": "Filter...", "cptHeading": "Client", "icon": "supervised_user_circle", "dtaObj": "apl_ptp_mst_clt", "lookupKey": "nme", "dropdownWidth": "17vw", "required": true, "gatewayRequestKey": "ptp_cde" }, "prps": { "width": "18%", "marginRight": "{theme.global.smallPadding}", "flows": [ { "from": "newQuote", "fromKey": "headersRecord", "fromSubKey": "client_name", "to": "clientQuote", "toKey": "value" }, { "from": "newQuote", "fromKey": "headersRecord", "fromSubKey": "client_ptp_cde", "to": "clientQuote", "toKey": "storedGatewayValue" } ] } }, { "blueprint": "bridgeBook/atoms/inputFields/filledInputFieldsWithDatePicker", "blueprintPrps": { "id": "expiryDateQuote", "cptHeading": "Expiry Date", "icon": "event", "defaultDate": "2022/10/10", "trailingIcon": "arrow_drop_down", "required": true, "dateFormat": "YYYY-MM-DD" }, "prps": { "width": "13%", "marginRight": "{theme.global.smallPadding}", "flows": [ { "from": "newQuote", "fromKey": "headersRecord", "fromSubKey": "expiry_date", "to": "expiryDateQuote", "toKey": "value" } ] } }, { "blueprint": "bridgeBook/atoms/inputFields/filledInputFieldsWithLeadingAndTrailingIcon", "blueprintPrps": { "id": "profitMarginQuote", "cptPlaceholderText": "Enter...", "cptHeading": "Profit Margin", "icon": "attach_money", "dropdownArrow": false, "required": true, "trailingIcon": "unfold_more", "prpsInput": { "dataType": "integer", "hideNumberArrows": true } }, "prps": { "width": "13%", "marginRight": "{theme.global.smallPadding}", "flows": [ { "from": "newQuote", "fromKey": "headersRecord", "fromSubKey": "profit_margin", "to": "profitMarginQuote", "toKey": "value" } ] } }, { "blueprint": "bridgeBook/atoms/inputFields/filledInputFieldsWithLookup", "blueprintPrps": { "id": "statusQuote", "cptPlaceholderText": "Filter...", "cptHeading": "Status", "icon": "priority_high", "lookupDtaObj": "Quote_Status_Lkp", "lookupKey": "stt_des", "dropdownWidth": "17vw", "required": true, "gatewayRequestKey": "stt_cde" }, "prps": { "width": "13%", "marginRight": "{theme.global.smallPadding}", "flows": [ { "from": "newQuote", "fromKey": "headersRecord", "fromSubKey": "stt_des", "to": "statusQuote", "toKey": "value" }, { "from": "newQuote", "fromKey": "headersRecord", "fromSubKey": "dev_stt_cde", "to": "statusQuote", "toKey": "storedGatewayValue" } ] } }, { "type": "container", "prps": { "marginTop": "{theme.global.fontSize}" }, "wgts": [ { "type": "button", "prps": { "prpsIcon": { "value": "local_police", "fontSize": "fontSizeBiggest", "color": "secondaryText" }, "marginRight": "{theme.global.mediumPadding}", "tooltip": "Add a Foward Cover", "tooltipPosition": "bottom", "tooltipBlueprint": "system/tooltips/tooltipBridge", "enabled": false, "flows": [ { "from": "statusQuote", "fromKey": "value", "toKey": "enabled", "mapFunctionString": "v => (v === 'Approved') ? true : false" } ], "fireScript": { "actions": [ { "type": "setState", "target": "modalContent", "key": "vis", "value": true }, { "type": "setState", "target": "view", "key": "value", "value": "quoteAndCosting/newQuote/modal/forwardCoverModal" } ] } } } ] } ] }, { "id": "moreDetailExpandedHeadingSection", "blueprint": "bridgeBook/custom/quoteAndCosting/addNewQuote/expandableHeaderContainer", "blueprintPrps": {}, "prps": { "marginTop": "{theme.global.mediumPadding}", "vis": false } }, { "blueprint": "bridgeBook/custom/quoteAndCosting/addNewQuote/tabContainer", "blueprintPrps": {} }, { "type": "container", "prps": { "dir": "horizontal", "marginTop": "{theme.global.mediumPadding}", "flex": true }, "wgts": [ { "id": "tabViewport", "type": "viewport", "prps": {} } ] }, { "type": "container", "prps": { "flex": true, "mainAxisAlign": "end", "marginTop": "{theme.global.tinyPadding}", "height": "90px" }, "wgts": [ { "id": "buttonsContainer", "type": "container", "prps": { "marginTop": "{theme.global.smallPadding}", "backgroundColor": "transparent", "dir": "horizontal", "mainAxisAlign": "space-between", "marginBottom": "{theme.global.smallPadding}" }, "wgts": [ { "type": "container", "prps": { "width": "24%", "marginLeft": "{theme.global.mediumPadding}" }, "wgts": [ { "id": "prevButton", "blueprint": "designBook/atoms/buttons/textIconOutlinedButton", "blueprintPrps": { "cpt": "PREVIOUS", "enabled": true, "backgroundColor": "transparent", "captionColor": "primary", "icon": "arrow_left", "iconColor": "primary" }, "prps": { "border": "1px solid var(--colors-primary)", "borderRadius": "tinyPadding", "paddingSize": "tinyPadding", "fireScript": { "actions": [ { "type": "setState", "target": "newQuote", "key": "counter", "value": "eval- ((state.newQuote.counter))-1" } ] }, "flows": [ { "from": "newQuote", "fromKey": "counter", "toKey": "enabled", "mapFunctionString": "v => (v === 0) ? false: true" } ] } } ] }, { "type": "container", "prps": { "width": "24%", "marginLeft": "{theme.global.mediumPadding}" }, "wgts": [ { "blueprint": "designBook/atoms/buttons/textIconOutlinedButton", "blueprintPrps": { "id": "cancelButton", "cpt": "CANCEL", "enabled": true, "backgroundColor": "transparent", "captionColor": "error", "icon": "close", "iconColor": "error" }, "prps": { "border": "1px solid var(--colors-error)", "borderRadius": "tinyPadding", "paddingSize": "tinyPadding", "fireScript": { "actions": [ { "type": "setState", "target": "viewport", "key": "value", "value": "quoteAndCosting/quoteQuery/quoteQueryDashboard" } ] } } } ] }, { "id": "addContainer", "type": "container", "prps": { "width": "24%" }, "wgts": [ { "type": "container", "prps": { "marginLeft": "{theme.global.mediumPadding}" }, "wgts": [ { "id": "saveAndCloseButton", "blueprint": "designBook/atoms/buttons/textIconOutlinedButton", "blueprintPrps": { "cpt": "SAVE & CLOSE", "enabled": false, "backgroundColor": "transparent", "captionColor": "primary", "icon": "save", "iconColor": "primary" }, "prps": { "border": "1px solid var(--colors-primary)", "borderRadius": "tinyPadding", "paddingSize": "tinyPadding", "scps": [ { "triggers": [ { "event": "onStateChange", "source": "divisionFilter" }, { "event": "onStateChange", "source": "clientQuote" }, { "event": "onStateChange", "source": "expiryDateQuote" }, { "event": "onStateChange", "source": "profitMarginQuote" }, { "event": "onStateChange", "source": "statusQuote" } ], "actions": [ { "type": "setState", "target": "saveAndCloseButton", "key": "enabled", "value": "eval-('((state.divisionFilter.value))'.length && '((state.clientQuote.value))'.length && '((state.expiryDateQuote.value))'.length && '((state.profitMarginQuote.value))'.length && '((state.statusQuote.value))'.length)" } ] } ], "fireScript": { "actions": [ { "note": "checks if we are on details tab", "type": "applyComparison", "operator": "isEqual", "compareValue": "quoteAndCosting/newQuote/tabs/detail", "value": "((state.tabViewport.value))", "branch": { "true": [ { "type": "applyComparison", "operator": "isNotFalsy", "value": "((state.divisionFilter.value))", "branch": { "true": [ { "note": "checks if we are doing a save or an edit", "type": "applyComparison", "operator": "isFalsy", "value": "{{state.newQuote.headerId}}", "branch": { "true": [ { "note": "NEW QUOTE SAVE", "type": "queryGateway", "serializeAttrs": true, "defaultEmptyStrings": "none", "^queryData": { "action": "vld_exec_nom", "token": "((state.app.token))", "^parameters": { "^attrs": [ { "atr": "client_ptp_cde", "val": "((state.clientQuote.storedGatewayValue))" }, { "atr": "expiry_date", "val": "((state.expiryDateQuote.valueFormatted))" }, { "atr": "profit_margin", "val": "((state.profitMarginQuote.value))" }, { "atr": "dev_stt_cde", "val": "((state.statusQuote.storedGatewayValue))" }, { "atr": "division_ptp_cde", "val": "((state.divisionFilter.storedGatewayValue))" }, { "atr": "acs_usr_cde", "val": "((state.app.userCode))" } ], "save_action": "Insert", "dtaObj": "cst_quo_quote_query_wrt_bck" } }, "extractResults": [ { "path": "response.success", "variable": "success" }, { "path": "response.result.0.serviceresult.response.fields.id", "variable": "quoteId" } ] }, { "type": "setState", "target": "newQuote", "key": "headerId", "value": "{{variable.quoteId}}" }, { "type": "setState", "target": "detailsTabContainer", "key": "doSave", "value": true }, { "type": "setState", "target": "newQuote", "key": "headerId", "value": "{{variable.quoteId}}" }, { "type": "wait", "duration": 1000 }, { "type": "setState", "target": "detailsTabContainer", "key": "doSave", "value": false }, { "type": "wait", "duration": 500 }, { "type": "setState", "target": "newQuote", "key": "counter", "value": "eval- ((state.newQuote.counter))+1" } ], "false": [ { "note": "EDIT QUOTE SAVE", "type": "queryGateway", "serializeAttrs": true, "defaultEmptyStrings": "none", "^queryData": { "action": "vld_exec_nom", "token": "((state.app.token))", "^parameters": { "^attrs": [ { "atr": "id", "val": "((state.newQuote.headerId))" }, { "atr": "client_ptp_cde", "val": "((state.clientQuote.storedGatewayValue))" }, { "atr": "expiry_date", "val": "((state.expiryDateQuote.valueFormatted))" }, { "atr": "profit_margin", "val": "((state.profitMarginQuote.value))" }, { "atr": "dev_stt_cde", "val": "((state.statusQuote.storedGatewayValue))" }, { "atr": "dev_acs_usr_cde", "val": "((state.app.userCode))" } ], "save_action": "Update", "dtaObj": "cst_quo_quote_query_wrt_bck" } }, "extractResults": [ { "path": "response.success", "variable": "success" } ] }, { "type": "setState", "target": "detailsTabContainer", "key": "doSave", "value": true }, { "type": "wait", "duration": 1000 }, { "type": "setState", "target": "detailsTabContainer", "key": "doSave", "value": false }, { "type": "wait", "duration": 500 }, { "type": "setState", "target": "newQuote", "key": "counter", "value": "eval- ((state.newQuote.counter))+1" } ] } } ], "false": [ { "type": "showNotification", "msgType": "warning", "msg": "Please select a division" } ] } } ] } }, { "type": "showNotification", "msgType": "success", "msg": "Opening Quote Query now . . . " }, { "type": "wait", "duration": 500 }, { "type": "setState", "target": "viewport", "key": "value", "value": "quoteAndCosting/quoteQuery/quoteQueryDashboard" } ] } } } ] } ] }, { "type": "container", "prps": { "width": "24%", "marginLeft": "{theme.global.mediumPadding}", "marginRight": "{theme.global.mediumPadding}" }, "wgts": [ { "id": "nextButton", "blueprint": "bridgeBook/atoms/buttons/textContainedButtonWithTrailingIcon", "blueprintPrps": { "cpt": "NEXT", "enabled": true, "backgroundColor": "primary", "captionColor": "iconPrimary", "icon": "arrow_right", "iconColor": "iconPrimary", "fireScript": { "actions": [ { "note": "checks if we are on details tab", "type": "applyComparison", "operator": "isEqual", "compareValue": "quoteAndCosting/newQuote/tabs/detail", "value": "((state.tabViewport.value))", "branch": { "true": [ { "type": "applyComparison", "operator": "isNotFalsy", "value": "{{state.divisionFilter.storedGatewayValue}}", "branch": { "true": [ { "note": "checks if we are doing a save or an edit", "type": "applyComparison", "operator": "isFalsy", "value": "{{state.newQuote.headerId}}", "branch": { "true": [ { "note": "NEW QUOTE SAVE", "type": "queryGateway", "serializeAttrs": true, "defaultEmptyStrings": "none", "^queryData": { "action": "vld_exec_nom", "token": "((state.app.token))", "^parameters": { "^attrs": [ { "atr": "client_ptp_cde", "val": "((state.clientQuote.storedGatewayValue))" }, { "atr": "expiry_date", "val": "((state.expiryDateQuote.valueFormatted))" }, { "atr": "profit_margin", "val": "((state.profitMarginQuote.value))" }, { "atr": "dev_stt_cde", "val": "((state.statusQuote.storedGatewayValue))" }, { "atr": "division_ptp_cde", "val": "((state.divisionFilter.storedGatewayValue))" }, { "atr": "acs_usr_cde", "val": "((state.app.userCode))" } ], "save_action": "Insert", "dtaObj": "cst_quo_quote_query_wrt_bck" } }, "extractResults": [ { "path": "response.success", "variable": "success" }, { "path": "response.result.0.serviceresult.response.fields.id", "variable": "quoteId" } ] }, { "type": "setState", "target": "newQuote", "key": "headerId", "value": "{{variable.quoteId}}" }, { "type": "setState", "target": "detailsTabContainer", "key": "doSave", "value": true }, { "type": "wait", "duration": 1000 }, { "type": "setState", "target": "detailsTabContainer", "key": "doSave", "value": false }, { "type": "wait", "duration": 500 }, { "type": "setState", "target": "newQuote", "key": "counter", "value": "eval- ((state.newQuote.counter))+1" } ], "false": [ { "note": "EDIT QUOTE SAVE", "type": "queryGateway", "serializeAttrs": true, "defaultEmptyStrings": "none", "^queryData": { "action": "vld_exec_nom", "token": "((state.app.token))", "^parameters": { "^attrs": [ { "atr": "id", "val": "((state.newQuote.headerId))" }, { "atr": "client_ptp_cde", "val": "((state.clientQuote.storedGatewayValue))" }, { "atr": "expiry_date", "val": "((state.expiryDateQuote.valueFormatted))" }, { "atr": "profit_margin", "val": "((state.profitMarginQuote.value))" }, { "atr": "dev_stt_cde", "val": "((state.statusQuote.storedGatewayValue))" }, { "atr": "dev_acs_usr_cde", "val": "((state.app.userCode))" } ], "save_action": "Update", "dtaObj": "cst_quo_quote_query_wrt_bck" } }, "extractResults": [ { "path": "response.success", "variable": "success" } ] }, { "type": "setState", "target": "detailsTabContainer", "key": "doSave", "value": true }, { "type": "wait", "duration": 1000 }, { "type": "setState", "target": "detailsTabContainer", "key": "doSave", "value": false }, { "type": "wait", "duration": 500 }, { "type": "setState", "target": "newQuote", "key": "counter", "value": "eval- ((state.newQuote.counter))+1" } ] } } ], "false": [ { "type": "showNotification", "msgType": "warning", "msg": "Please select a division" } ] } } ], "false": [ { "type": "setState", "target": "newQuote", "key": "counter", "value": "eval- ((state.newQuote.counter))+1" } ] } } ] } }, "prps": { "border": "1px solid var(--colors-primary)", "borderRadius": "tinyPadding", "paddingSize": "tinyPadding", "flows": [ { "from": "newQuote", "fromKey": "counter", "toKey": "enabled", "mapFunctionString": "v => (v === 6) ? false: true" } ] } } ] } ] } ] } ] }
Editor is loading...