Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/srs 121 #569

Merged
merged 3 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -465,44 +465,67 @@
"action": "custom",
"showValidations": false,
"theme": "warning",
"size": "md",
"block": false,
"leftIcon": "",
"rightIcon": "",
"shortcut": "",
"description": "",
"tooltip": "",
"customClass": "",
"tabindex": "",
"disableOnInvalid": false,
"hidden": false,
"autofocus": false,
"disabled": true,
"tableView": false,
"modalEdit": false,
"key": "needsMoreInfo",
"customConditional": "const UserDetails = JSON.parse(localStorage.getItem(\"UserDetails\"));\r\nconst roles = UserDetails[\"role\"];\r\nconst taskUrl = window.location.pathname.split('/');\r\nconst taskId = taskUrl[2];\r\nconst authToken = localStorage.getItem(\"authToken\");\r\nconst bpmUrl = localStorage.getItem(\"bpmApiUrl\");\r\nvar reqUrl = bpmUrl + \"/task/\" + taskId + \"/variables\";\r\n\r\n\r\n getData(reqUrl, authToken).then((response) => {\r\n \r\n\t if(roles.includes(\"formsflow-reviewer\")) {\r\n \tvar applicationStatus = response.applicationStatus ? response.applicationStatus.value : '';\r\n \t show = true;\r\n \t \r\n\r\n \t\t\r\n\t if (applicationStatus === 'Resubmit') {\r\n\t component.disabled = true;\r\n\t component.description = 'Disabled since SRCR resubmission in progress';\r\n\t instance.triggerRedraw();\r\n\t } else {\r\n\t component.description = '';\r\n\t component.disabled = false;\r\n\t instance.triggerRedraw();\r\n\t }\r\n\t }\r\n\t else\r\n\t {\r\n \t\tshow = false;\r\n\t }\r\n });\r\n\r\n\r\nasync function getData(reqUrl, authToken) {\r\n const response = await fetch(reqUrl, {\r\n method: \"GET\",\r\n headers: {\r\n \"Content-type\": \"application/json\",\r\n Accept: \"application/json\",\r\n Authorization: \"Bearer \" + authToken,\r\n },\r\n });\r\n const data = await response.json();\r\n return data;\r\n}",
"tags": [],
"properties": {},
"conditional": {
"show": null,
"when": null,
"eq": "",
"json": ""
},
"customConditional": "const UserDetails = JSON.parse(localStorage.getItem(\"UserDetails\"));\r\nconst roles = UserDetails[\"role\"];\r\nconst taskUrl = window.location.pathname.split('/');\r\nconst taskId = taskUrl[2];\r\nconst authToken = localStorage.getItem(\"authToken\");\r\nconst bpmUrl = localStorage.getItem(\"bpmApiUrl\");\r\nvar reqUrl = bpmUrl + \"/task/\" + taskId + \"/variables\";\r\n\r\n\r\n getData(reqUrl, authToken).then((response) => {\r\n \r\n\t if(roles.includes(\"formsflow-reviewer\")) {\r\n \tvar applicationStatus = response.applicationStatus ? response.applicationStatus.value : '';\r\n\tvar isResubmitted = response.isSrcrResubmitted ? response.isSrcrResubmitted.value : false;\r\n\r\n \t show = true;\r\n \t \r\n\r\n \t\t\r\n\t if (isResubmitted) {\r\n\t component.disabled = true;\r\n\t component.description = 'Disabled since SRCR resubmission in progress';\r\n\t instance.triggerRedraw();\r\n\t } else {\r\n\t component.description = '';\r\n\t component.disabled = false;\r\n\t instance.triggerRedraw();\r\n\t }\r\n\t }\r\n\t else\r\n\t {\r\n \t\tshow = false;\r\n\t }\r\n });\r\n\r\n\r\nasync function getData(reqUrl, authToken) {\r\n const response = await fetch(reqUrl, {\r\n method: \"GET\",\r\n headers: {\r\n \"Content-type\": \"application/json\",\r\n Accept: \"application/json\",\r\n Authorization: \"Bearer \" + authToken,\r\n },\r\n });\r\n const data = await response.json();\r\n return data;\r\n}",
"logic": [],
"attributes": {},
"overlay": {
"style": "",
"page": "",
"left": "",
"top": "",
"width": "",
"height": ""
},
"type": "button",
"custom": "const 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;+submissionId;\r\nconst filteredData = _.pick(data, data.cssaUtilKeys);\r\nconst formDataReqObj1 = { \"_id\": submissionId, \"data\": filteredData};\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: 'Returned'\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:'Returned'\r\n }); \r\n});",
"input": true,
"redrawOn": "textField",
"keyModified": true,
"placeholder": "",
"prefix": "",
"customClass": "",
"suffix": "",
"multiple": false,
"defaultValue": null,
"protected": false,
"unique": false,
"persistent": false,
"hidden": false,
"clearOnHide": true,
"refreshOn": "",
"modalEdit": false,
"dataGridLabel": true,
"labelPosition": "top",
"description": "",
"errorLabel": "",
"tooltip": "",
"hideLabel": false,
"tabindex": "",
"autofocus": false,
"dbIndex": false,
"customDefaultValue": "",
"calculateValue": "",
"calculateServer": false,
"widget": {
"type": "input"
},
"attributes": {},
"validateOn": "change",
"validate": {
"required": false,
Expand All @@ -512,31 +535,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,
"id": "ewzp0gq"
"id": "e7zbnrio"
}
],
"size": "md",
Expand Down Expand Up @@ -7612,7 +7617,7 @@
"addons": [],
"tree": false,
"lazyLoad": false,
"id": "ehmz9lv"
"id": "ehmz9lv0000"
}
],
"placeholder": "",
Expand Down Expand Up @@ -9255,7 +9260,7 @@
}
],
"collapsible": false,
"id": "ewhx8sm",
"id": "ewhx8sm0000",
"placeholder": "",
"prefix": "",
"customClass": "",
Expand Down Expand Up @@ -18423,7 +18428,7 @@
},
"inputMask": "999-999-999",
"tableView": true,
"id": "elva88",
"id": "elva880000",
"placeholder": "",
"prefix": "",
"customClass": "",
Expand Down Expand Up @@ -18503,7 +18508,7 @@
"tableView": true,
"autoExpand": true,
"inputFormat": "plain",
"id": "ey48nu",
"id": "ey48nu0000",
"placeholder": "",
"prefix": "",
"customClass": "",
Expand Down Expand Up @@ -18878,7 +18883,7 @@
"input": true,
"label": "PIN",
"tableView": true,
"id": "eyxe45n",
"id": "eyxe45n0000",
"placeholder": "",
"prefix": "",
"customClass": "",
Expand Down Expand Up @@ -18971,7 +18976,7 @@
"autoExpand": true,
"inputFormat": "plain",
"placeholder": "example, metes and bounds",
"id": "efdcvf",
"id": "efdcvf0000",
"prefix": "",
"customClass": "",
"suffix": "",
Expand Down Expand Up @@ -19185,7 +19190,7 @@
"input": true,
"label": "Crown Land File Numbers",
"tableView": true,
"id": "emf4u7g",
"id": "emf4u7g0000",
"placeholder": "",
"prefix": "",
"customClass": "",
Expand Down Expand Up @@ -20237,7 +20242,7 @@
},
"inputMask": "999-999-999",
"tableView": true,
"id": "ev43oe9",
"id": "ev43oe90000",
"placeholder": "",
"prefix": "",
"customClass": "",
Expand Down Expand Up @@ -20317,7 +20322,7 @@
"tableView": true,
"autoExpand": true,
"inputFormat": "plain",
"id": "eb3d0l",
"id": "eb3d0l0000",
"placeholder": "",
"prefix": "",
"customClass": "",
Expand Down Expand Up @@ -20692,7 +20697,7 @@
"input": true,
"label": "PIN",
"tableView": true,
"id": "eyv4fcu",
"id": "eyv4fcu0000",
"placeholder": "",
"prefix": "",
"customClass": "",
Expand Down Expand Up @@ -20785,7 +20790,7 @@
"autoExpand": true,
"inputFormat": "plain",
"placeholder": "example, metes and bounds",
"id": "ecgeub",
"id": "ecgeub0000",
"prefix": "",
"customClass": "",
"suffix": "",
Expand Down Expand Up @@ -20999,7 +21004,7 @@
"input": true,
"label": "Crown Land File Numbers",
"tableView": true,
"id": "eguyyh",
"id": "eguyyh0000",
"placeholder": "",
"prefix": "",
"customClass": "",
Expand Down
Loading
Loading