Skip to content

Commit

Permalink
Merge pull request #585 from bcgov/srs-30
Browse files Browse the repository at this point in the history
disabled form fields for reviewer roles
  • Loading branch information
nikhila-aot authored Dec 6, 2023
2 parents c88aeba + 0469ca0 commit 4ab47d5
Show file tree
Hide file tree
Showing 11 changed files with 10,751 additions and 2,120 deletions.
7,049 changes: 7,048 additions & 1 deletion forms-flow-ai/epd-forms/Protocol 6 Pre-approval Application.json

Large diffs are not rendered by default.

1,108 changes: 728 additions & 380 deletions forms-flow-ai/epd-forms/Site Disclosure Statements.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,100 @@
"common"
],
"components": [
{
"label": "Text Area",
"labelPosition": "top",
"placeholder": "",
"description": "",
"tooltip": "",
"prefix": "",
"suffix": "",
"widget": {
"type": "input"
},
"displayMask": "",
"editor": "",
"autoExpand": false,
"customClass": "",
"tabindex": "",
"autocomplete": "",
"hidden": false,
"hideLabel": false,
"showWordCount": false,
"showCharCount": false,
"autofocus": false,
"spellcheck": true,
"disabled": false,
"tableView": true,
"modalEdit": false,
"multiple": false,
"persistent": true,
"inputFormat": "html",
"protected": false,
"dbIndex": false,
"case": "",
"truncateMultipleSpaces": false,
"encrypted": false,
"redrawOn": "",
"clearOnHide": true,
"customDefaultValue": "",
"calculateValue": "",
"calculateServer": false,
"allowCalculateOverride": false,
"validateOn": "change",
"validate": {
"required": false,
"pattern": "",
"customMessage": "",
"custom": "",
"customPrivate": false,
"json": "",
"minLength": "",
"maxLength": "",
"minWords": "",
"maxWords": "",
"strictDateValidation": false,
"multiple": false,
"unique": false
},
"unique": false,
"errorLabel": "",
"errors": "",
"key": "textArea",
"tags": [],
"properties": {},
"conditional": {
"show": null,
"when": null,
"eq": "",
"json": ""
},
"customConditional": "var userData =JSON.parse(localStorage.getItem('UserDetails'))\r\n\r\nif(!(userData.groups.includes(\"/formsflow/formsflow-client\") || userData.groups.includes(\"/formsflow/formsflow-reviewer/formsflow-client-reviewer\")))\r\n{\r\n\r\n utils.eachComponent(form.components, (x)=>{\r\n\r\n //console.log('B',x.label,x.key,x.disabled);\r\n\r\n // if(x.key === \"numericalStandards\")\r\n // {\r\n // console.log('B',x.label,x.key,x.disabled);\r\n\r\n // }\r\n \r\n if(x.type==='select' && (x.key === 'selectCssaSdm' || x.key === 'selectCssaCaseworker'))\r\n {\r\n //do nothing\r\n }\r\n else if ((x.type==='editgrid' && (x.key === 'notes' || x.key === 'srcrNotes' || x.key === 'deraNotes' || x.key === 'cssaNotes') ) ||x.key === 'comments' || x.key === 'commentFor')\r\n {\r\n //do nothing\r\n }\r\n else if(x.type === 'button')\r\n {\r\n //do nothing\r\n }\r\n else if(x.type === 'approvingAuthorityContactInformation')\r\n { \r\n if(userData.groups.includes(\"/formsflow/formsflow-reviewer/csap\") || userData.groups.includes(\"/formsflow/formsflow-reviewer/csap-society\"))\r\n {\r\n x.disabled = false;\r\n }\r\n }\r\n else if(x.properties.apField === \"true\")\r\n {\r\n if(userData.groups.includes(\"/formsflow/formsflow-reviewer/csap\") || userData.groups.includes(\"/formsflow/formsflow-reviewer/csap-society\"))\r\n {\r\n x.disabled = false;\r\n }\r\n else\r\n {\r\n\r\n }\r\n }\r\n else\r\n {\r\n x.disabled = true;\r\n }\r\n\r\n \r\n\r\n })\r\n\r\n}\r\n\r\nshow = false",
"logic": [],
"attributes": {},
"overlay": {
"style": "",
"page": "",
"left": "",
"top": "",
"width": "",
"height": ""
},
"type": "textarea",
"rows": 3,
"wysiwyg": false,
"input": true,
"refreshOn": "",
"dataGridLabel": false,
"allowMultipleMasks": false,
"addons": [],
"mask": false,
"inputType": "text",
"inputMask": "",
"fixedSize": true,
"id": "emv5sb5",
"defaultValue": ""
},
{
"title": "Reviewer Actions",
"collapsible": false,
Expand Down Expand Up @@ -5670,7 +5764,7 @@
"attributes": {},
"components": [
{
"id": "ecmzjdn00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"id": "ecmzjdn0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"key": "panel",
"tree": false,
"type": "panel",
Expand Down
93 changes: 90 additions & 3 deletions forms-flow-ai/epd-forms/Site Risk Classification Report.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,93 @@
"common"
],
"components": [
{
"label": "Text Field",
"labelPosition": "top",
"placeholder": "",
"description": "",
"tooltip": "",
"prefix": "",
"suffix": "",
"widget": {
"type": "input"
},
"inputMask": "",
"displayMask": "",
"allowMultipleMasks": false,
"customClass": "",
"tabindex": "",
"autocomplete": "",
"hidden": false,
"hideLabel": false,
"showWordCount": false,
"showCharCount": false,
"mask": false,
"autofocus": false,
"spellcheck": true,
"disabled": false,
"tableView": true,
"modalEdit": false,
"multiple": false,
"persistent": true,
"inputFormat": "plain",
"protected": false,
"dbIndex": false,
"case": "",
"truncateMultipleSpaces": false,
"encrypted": false,
"redrawOn": "",
"clearOnHide": true,
"customDefaultValue": "",
"calculateValue": "",
"calculateServer": false,
"allowCalculateOverride": false,
"validateOn": "change",
"validate": {
"required": false,
"pattern": "",
"customMessage": "",
"custom": "",
"customPrivate": false,
"json": "",
"minLength": "",
"maxLength": "",
"strictDateValidation": false,
"multiple": false,
"unique": false
},
"unique": false,
"errorLabel": "",
"errors": "",
"key": "textField",
"tags": [],
"properties": {},
"conditional": {
"show": null,
"when": null,
"eq": "",
"json": ""
},
"customConditional": "var userData =JSON.parse(localStorage.getItem('UserDetails'))\r\n\r\nif(!(userData.groups.includes(\"/formsflow/formsflow-client\") || userData.groups.includes(\"/formsflow/formsflow-reviewer/formsflow-client-reviewer\")))\r\n{\r\n\r\n utils.eachComponent(form.components, (x)=>{\r\n\r\n //console.log('B',x.label,x.key,x.disabled);\r\n\r\n // if(x.key === \"numericalStandards\")\r\n // {\r\n // console.log('B',x.label,x.key,x.disabled);\r\n\r\n // }\r\n \r\n if(x.type==='select' && (x.key === 'selectCssaSdm' || x.key === 'selectCssaCaseworker'))\r\n {\r\n //do nothing\r\n }\r\n else if ((x.type==='editgrid' && (x.key === 'notes' || x.key === 'srcrNotes' || x.key === 'deraNotes' || x.key === 'cssaNotes') ) ||x.key === 'comments' || x.key === 'commentFor')\r\n {\r\n //do nothing\r\n }\r\n else if(x.type === 'button')\r\n {\r\n //do nothing\r\n }\r\n else if(x.type === 'approvingAuthorityContactInformation')\r\n { \r\n if(userData.groups.includes(\"/formsflow/formsflow-reviewer/csap\") || userData.groups.includes(\"/formsflow/formsflow-reviewer/csap-society\"))\r\n {\r\n x.disabled = false;\r\n }\r\n }\r\n else if(x.properties.apField === \"true\")\r\n {\r\n if(userData.groups.includes(\"/formsflow/formsflow-reviewer/csap\") || userData.groups.includes(\"/formsflow/formsflow-reviewer/csap-society\"))\r\n {\r\n x.disabled = false;\r\n }\r\n else\r\n {\r\n\r\n }\r\n }\r\n else\r\n {\r\n x.disabled = true;\r\n }\r\n\r\n \r\n\r\n })\r\n\r\n}\r\n\r\nshow = false",
"logic": [],
"attributes": {},
"overlay": {
"style": "",
"page": "",
"left": "",
"top": "",
"width": "",
"height": ""
},
"type": "textfield",
"input": true,
"refreshOn": "",
"dataGridLabel": false,
"addons": [],
"inputType": "text",
"id": "erdvja",
"defaultValue": ""
},
{
"title": "Reviewer Actions",
"theme": "default",
Expand Down Expand Up @@ -4218,7 +4305,7 @@
"attributes": {},
"components": [
{
"id": "ele95t0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"id": "ele95t00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"key": "spropertyOwnerAndOrOperator",
"tree": false,
"type": "panel",
Expand Down Expand Up @@ -13628,7 +13715,7 @@
"attributes": {},
"components": [
{
"id": "eks0gu000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"id": "eks0gu0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"key": "exposurePathwayQuestionnaireAffectedParcel",
"tree": false,
"type": "panel",
Expand Down Expand Up @@ -17571,7 +17658,7 @@
}
],
"collapsible": false,
"id": "eo5mwyp0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"id": "eo5mwyp00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"placeholder": "",
"prefix": "",
"customClass": "",
Expand Down
Loading

0 comments on commit 4ab47d5

Please sign in to comment.