diff --git a/forms-flow-ai/epd-forms/Site Disclosure Statements.json b/forms-flow-ai/epd-forms/Site Disclosure Statements.json index 6650ec91..3d66d41f 100644 --- a/forms-flow-ai/epd-forms/Site Disclosure Statements.json +++ b/forms-flow-ai/epd-forms/Site Disclosure Statements.json @@ -694,35 +694,60 @@ "label": "Send to Approving Authority", "action": "custom", "showValidations": false, + "theme": "primary", + "size": "md", + "block": false, + "leftIcon": "", + "rightIcon": "", + "shortcut": "", + "description": "", + "tooltip": "", + "customClass": "", + "tabindex": "", + "disableOnInvalid": false, + "hidden": false, + "autofocus": false, + "disabled": false, "tableView": false, + "modalEdit": false, "key": "submittoMinistry", - "customConditional": "if(data.section5DeclarationsCheckboxDecommissioning ||\ndata.section5DeclarationsCheckboxCeasingOperations) {\n component.label = 'Send to Ministry';\n} else {\n component.label = 'Send to Approving Authority';\n}", + "tags": [], + "properties": {}, + "conditional": { + "show": null, + "when": null, + "eq": "", + "json": "" + }, + "customConditional": "if(data.section5DeclarationsCheckboxDecommissioning ||\ndata.section5DeclarationsCheckboxCeasingOperations) {\n component.label = 'Send to Ministry';\n} else {\n component.label = 'Send to Approving Authority';\n}\ninstance.triggerRedraw();", + "logic": [], + "attributes": {}, + "overlay": { + "style": "", + "page": "", + "left": "", + "top": "", + "width": "", + "height": "" + }, "type": "button", "custom": "if(data.Signature==='' || data.firstAndLastName==='' || data.datesigned==='' || data.radioGroup==='')\r\n{\r\n alert('Please complete the signature section before submitting!');\r\n \r\n if(!form.checkValidity(null, false, null, true))\r\n {\r\n \tconst submissionId = form._submission._id;\r\n\tconst formId = form._submission.form;\r\n\tconst formDataReqUrl = form.formio?form.formio.formUrl:(localStorage.getItem('customSubmissionUrl')+'/form/'+formId)+'/submission/'+submissionId;\r\n\r\n\tconst formDataReqObj1 = { \"_id\": submissionId, \"data\": data};\r\n\tconst formio = new Formio(formDataReqUrl);\r\n\tformio.saveSubmission(formDataReqObj1).then( result => {\r\n\tform.emit('customEvent', {\r\n \ttype: \"actionComplete\", \r\n \t component: component,\r\n \tactionType: 'Signed'\r\n \t\t}); \r\n\t}).catch((error)=>{\r\n\t//Error callback on not Save\r\n\tform.emit('customEvent', {\r\n \ttype: \"actionError\", \r\n \tcomponent: component,\r\n \tactionType:'Signed'\r\n \t}); \r\n\t});\r\n }\r\n \r\n}\r\nelse\r\n{\r\nconst submissionId = form._submission._id;\r\nconst formId = form._submission.form;\r\nconst formDataReqUrl = form.formio?form.formio.formUrl:(localStorage.getItem('customSubmissionUrl')+'/form/'+formId)+'/submission/'+submissionId;\r\n\r\nconst formDataReqObj1 = { \"_id\": submissionId, \"data\": data};\r\nconst formio = new Formio(formDataReqUrl);\r\nformio.saveSubmission(formDataReqObj1).then( result => {\r\nform.emit('customEvent', {\r\n type: \"actionComplete\", \r\n component: component,\r\n actionType: 'Signed'\r\n }); \r\n}).catch((error)=>{\r\n//Error callback on not Save\r\nform.emit('customEvent', {\r\n type: \"actionError\", \r\n component: component,\r\n actionType:'Signed'\r\n }); \r\n});\r\n}", "input": true, "placeholder": "", "prefix": "", - "customClass": "", "suffix": "", "multiple": false, "defaultValue": null, "protected": false, "unique": false, "persistent": false, - "hidden": false, "clearOnHide": true, "refreshOn": "", "redrawOn": "", - "modalEdit": false, "dataGridLabel": true, "labelPosition": "top", - "description": "", "errorLabel": "", - "tooltip": "", "hideLabel": false, - "tabindex": "", - "disabled": false, - "autofocus": false, "dbIndex": false, "customDefaultValue": "", "calculateValue": "", @@ -730,7 +755,6 @@ "widget": { "type": "input" }, - "attributes": {}, "validateOn": "change", "validate": { "required": false, @@ -740,32 +764,13 @@ "multiple": false, "unique": false }, - "conditional": { - "show": null, - "when": null, - "eq": "" - }, - "overlay": { - "style": "", - "left": "", - "top": "", - "width": "", - "height": "" - }, "allowCalculateOverride": false, "encrypted": false, "showCharCount": false, "showWordCount": false, - "properties": {}, "allowMultipleMasks": false, "addons": [], - "size": "md", - "leftIcon": "", - "rightIcon": "", - "block": false, - "disableOnInvalid": false, - "theme": "primary", - "id": "el7s3lk" + "id": "e7diehb" } ], "width": 3, @@ -6975,7 +6980,7 @@ } ], "collapsible": false, - "id": "e7nge5b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "id": "e7nge5b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "placeholder": "", "prefix": "", "customClass": "", @@ -7449,7 +7454,7 @@ } ], "collapsible": false, - "id": "eapos7600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "id": "eapos760000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "placeholder": "", "prefix": "", "customClass": "", @@ -7665,7 +7670,7 @@ "input": true, "label": "Crown Land File Numbers", "tableView": true, - "id": "e7fs5c500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "id": "e7fs5c50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "placeholder": "", "prefix": "", "customClass": "", diff --git a/forms-flow-ai/forms-flow-ai-ee/forms-flow-bpm/processes/SDS/SDSWorkflow.bpmn b/forms-flow-ai/forms-flow-ai-ee/forms-flow-bpm/processes/SDS/SDSWorkflow.bpmn index 83b31942..6125ab2d 100644 --- a/forms-flow-ai/forms-flow-ai-ee/forms-flow-bpm/processes/SDS/SDSWorkflow.bpmn +++ b/forms-flow-ai/forms-flow-ai-ee/forms-flow-bpm/processes/SDS/SDSWorkflow.bpmn @@ -23,9 +23,10 @@ Event_1jftbqf + Gateway_0rg109d Activity_1gun2rz Activity_1ljp4g2 - Gateway_0rg109d + Activity_1ra9ugf @@ -82,6 +83,9 @@ system.out.println ("isApprovingAuthorityReqd"+execution.getVariable('isApprovin ${isAgentFillingForm== true} + + + ${action == 'Signed'} @@ -115,7 +119,7 @@ system.out.println ("isApprovingAuthorityReqd"+execution.getVariable('isApprovin - + ${isApprovingAuthorityReqd == false} @@ -205,6 +209,22 @@ system.out.println ("isApprovingAuthorityReqd"+execution.getVariable('isApprovin Flow_1lqa1uz Flow_1vu5vy0 + + + + + + + Flow_1yl0zu1 + Flow_1lfvq5z + Flow_0qui51z + + + + Flow_163w4dq + Flow_1xw8647 + Flow_0ci62kp + @@ -235,22 +255,17 @@ system.out.println ("form signed"); Flow_1ezlpcw Flow_0axurx6 - + + Flow_0ib3exu - Flow_1xw8647 - Flow_0ci62kp - - - - - - - - Flow_1yl0zu1 - Flow_1lfvq5z - Flow_0qui51z - - + Flow_163w4dq + var system = java.lang.System; +var decommissioning= execution.getVariable('section5DeclarationsCheckboxDecommissioning'); +var ceasingOperations= execution.getVariable('section5DeclarationsCheckboxCeasingOperations'); +execution.setVariable('isApprovingAuthorityReqd',!(decommissioning||ceasingOperations)); + +system.out.println ("isApprovingAuthorityReqd"+execution.getVariable('isApprovingAuthorityReqd')); + @@ -321,35 +336,39 @@ system.out.println ("form signed"); - - - - - - + + - + - + - - + + + + + + + + + + - + - - + + @@ -357,9 +376,9 @@ system.out.println ("form signed"); - + - + @@ -374,22 +393,22 @@ system.out.println ("form signed"); - - + + - + - + - - + + - + @@ -448,6 +467,10 @@ system.out.println ("form signed"); + + + +