Skip to content

Commit

Permalink
issue fix for srs 33
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhila-aot committed Sep 22, 2023
1 parent c0cdf28 commit f94df98
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 72 deletions.
71 changes: 38 additions & 33 deletions forms-flow-ai/epd-forms/Site Disclosure Statements.json
Original file line number Diff line number Diff line change
Expand Up @@ -694,43 +694,67 @@
"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": "",
"calculateServer": false,
"widget": {
"type": "input"
},
"attributes": {},
"validateOn": "change",
"validate": {
"required": false,
Expand All @@ -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,
Expand Down Expand Up @@ -6975,7 +6980,7 @@
}
],
"collapsible": false,
"id": "e7nge5b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"id": "e7nge5b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"placeholder": "",
"prefix": "",
"customClass": "",
Expand Down Expand Up @@ -7449,7 +7454,7 @@
}
],
"collapsible": false,
"id": "eapos7600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"id": "eapos760000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"placeholder": "",
"prefix": "",
"customClass": "",
Expand Down Expand Up @@ -7665,7 +7670,7 @@
"input": true,
"label": "Crown Land File Numbers",
"tableView": true,
"id": "e7fs5c500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"id": "e7fs5c50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"placeholder": "",
"prefix": "",
"customClass": "",
Expand Down
Loading

0 comments on commit f94df98

Please sign in to comment.