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

fix visibility column displayed for site-owner #561

Merged
merged 1 commit into from
Oct 31, 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 @@ -441,7 +441,7 @@
"tableView": false,
"modalEdit": false,
"templates": {
"header": "{% console.log(\"row-key header\",'commentFor',row['commentFor']) %}\n{% const UserDetails = JSON.parse(localStorage.getItem(\"UserDetails\"))%}\n{% const groups = UserDetails[\"groups\"]; %}\n\n{% if(groups.includes(\"/formsflow/formsflow-client\") || groups.includes(\"/formsflow/formsflow-reviewer/csap\") || groups.includes(\"/formsflow/formsflow-reviewer/csap-society\")){ %}\n\n<div class=\"row card-header bg-default\">\n {% util.eachComponent(components, function(component) { %}\n {% if (displayValue(component) && component.key !== 'commentFor' ) { %}\n {% if(component.label === 'Notes') { %}\n <div class=\"col-sm-4\">{{ t(component.label) }}</div>\n {% } else if(component.key !== 'comments') { %}\n <div class=\"col-sm-2\">{{ t(component.label) }}</div>\n {% } %}\n {% } %}\n {% }) %}\n </div>\n\n{% } else { %}\n\n<div class=\"row card-header bg-default\">\n {% util.eachComponent(components, function(component) { %}\n {% if (displayValue(component)) { %}\n {% if(component.key == 'comments') { %}\n <div class=\"col-sm-4\"> {{ t(component.label)}} </div>\n {% } else if(component.key == 'role' || component.key == 'createdBy') { %}\n <div class=\"col-sm-2\"> {{ t(component.label)}} </div>\n{% } else { %}\n <div class=\"col-sm-1\"> {{ t(component.label)}} </div>\n{% } %} \n {% } %}\n {% }) %}\n </div>\n\n{% } %}",
"header": "{% console.log(\"row-key header\",'commentFor',row['commentFor']) %}\n{% const UserDetails = JSON.parse(localStorage.getItem(\"UserDetails\"))%}\n{% const groups = UserDetails[\"groups\"]; %}\n\n{% if(groups.includes(\"/formsflow/formsflow-reviewer/formsflow-client-reviewer\") || groups.includes(\"/formsflow/formsflow-client\") || groups.includes(\"/formsflow/formsflow-reviewer/csap\") || groups.includes(\"/formsflow/formsflow-reviewer/csap-society\")){ %}\n\n<div class=\"row card-header bg-default\">\n {% util.eachComponent(components, function(component) { %}\n {% if (displayValue(component) && component.key !== 'commentFor' ) { %}\n {% if(component.label === 'Notes') { %}\n <div class=\"col-sm-4\">{{ t(component.label) }}</div>\n {% } else if(component.key !== 'comments') { %}\n <div class=\"col-sm-2\">{{ t(component.label) }}</div>\n {% } %}\n {% } %}\n {% }) %}\n </div>\n\n{% } else { %}\n\n<div class=\"row card-header bg-default\">\n {% util.eachComponent(components, function(component) { %}\n {% if (displayValue(component)) { %}\n {% if(component.key == 'comments') { %}\n <div class=\"col-sm-4\"> {{ t(component.label)}} </div>\n {% } else if(component.key == 'role' || component.key == 'createdBy') { %}\n <div class=\"col-sm-2\"> {{ t(component.label)}} </div>\n{% } else { %}\n <div class=\"col-sm-1\"> {{ t(component.label)}} </div>\n{% } %} \n {% } %}\n {% }) %}\n </div>\n\n{% } %}",
"tableHeader": "\n <tr>\n {% util.eachComponent(components, function(component) { %}\n {% if (!component.hasOwnProperty('tableView') || component.tableView) { %}\n <td class=\"editgrid-table-column\">{{ component.label }}</td>\n {% } %}\n {% }) %}\n {% if (!instance.options.readOnly && !instance.disabled) { %}\n <td class=\"editgrid-table-column\">Actions</td>\n {% } %}\n </tr>\n ",
"row": "\r\n\r\n{% console.log(\"row-key main\",'commentFor',row['commentFor']) %}\r\n{% const UserDetails = JSON.parse(localStorage.getItem(\"UserDetails\"))%}\r\n{% const groups = UserDetails[\"groups\"]; %}\r\n{% console.log('rendering edit grid body')%}\r\n{% if((groups.includes(\"/formsflow/formsflow-reviewer/formsflow-client-reviewer\") || groups.includes(\"/formsflow/formsflow-client\") || groups.includes(\"/formsflow/formsflow-reviewer/csap\") || groups.includes(\"/formsflow/formsflow-reviewer/csap-society\")) && row['commentFor']==='external'){ %}\r\n\r\n\r\n\r\n<div class=\"row\">\r\n\r\n {% util.eachComponent(components, function(component) { %}\r\n {% if (displayValue(component) && component.key !== 'commentFor' ) { %}\r\n {% console.log(\"row-key\",component.key,row[component.key]) %}\r\n {% const UserDetails = JSON.parse(localStorage.getItem(\"UserDetails\"))%}\r\n{% const groups = UserDetails[\"groups\"]; %}\r\n{% if((groups.includes(\"/formsflow/formsflow-reviewer/formsflow-client-reviewer\") || groups.includes(\"/formsflow/formsflow-client\") || groups.includes(\"/formsflow/formsflow-reviewer/csap\") || groups.includes(\"/formsflow/formsflow-reviewer/csap-society\")) && row['commentFor']==='external'){ %}\r\n{% if(component.key == 'comments') { %}\r\n <div class=\"col-sm-4 text-break\">\r\n {{ getView(component, row[component.key])}}\r\n </div>\r\n{% } else { %}\r\n <div class=\"col-sm-2 text-break\">\r\n {{ getView(component, row[component.key])}}\r\n </div>\r\n{%}%}\r\n \r\n\r\n {% } %}\r\n {% } %}\r\n {% }) %}\r\n {% if (!instance.options.readOnly && !instance.disabled) { %}\r\n {% const UserDetails = JSON.parse(localStorage.getItem(\"UserDetails\"))%}\r\n{% const groups = UserDetails[\"groups\"]; %}\r\n{% if((groups.includes(\"/formsflow/formsflow-reviewer/formsflow-client-reviewer\") || groups.includes(\"/formsflow/formsflow-client\") || groups.includes(\"/formsflow/formsflow-reviewer/csap\") || groups.includes(\"/formsflow/formsflow-reviewer/csap-society\")) && row['commentFor']==='external'){ %}\r\n <div class=\"col-sm-2\">\r\n <div class=\"btn-group pull-right\">\r\n {% if (!instance.hasRemoveButtons || instance.hasRemoveButtons()) { %}\r\n <button class=\"btn btn-danger btn-sm removeRow\"><i class=\"{{ iconClass('trash') }}\"></i></button>\r\n {% } %}\r\n </div>\r\n </div>\r\n \r\n {% } %}\r\n {% } %}\r\n </div>\r\n {% } else if (groups.includes(\"/formsflow/formsflow-reviewer/site-information-advisor\") || groups.includes(\"/formsflow/formsflow-reviewer/cssa-team\") || groups.includes(\"/formsflow/formsflow-reviewer/caseworker\") || groups.includes(\"/formsflow/formsflow-reviewer/sdm\")) { %}\r\n <div class=\"row\">\r\n {% util.eachComponent(components, function(component) { %}\r\n {% console.log('for sia') %}\r\n {% if (displayValue(component)) { %}\r\n {% if(component.key == 'comments') { %}\r\n <div class=\"col-sm-4 text-break\"> {{ getView(component, row[component.key])}} </div>\r\n {% } else if(component.key == 'role' || component.key == 'createdBy') { %}\r\n <div class=\"col-sm-2 text-break\"> {{ getView(component, row[component.key])}} </div>\r\n{% } else { %}\r\n <div class=\"col-sm-1\"> {{ getView(component, row[component.key])}} </div>\r\n{% } %} \r\n \r\n {% } %}\r\n {% }) %}\r\n {% if (!instance.options.readOnly && !instance.disabled) { %}\r\n <div class=\"col-sm-1\">\r\n <div class=\"btn-group pull-right\">\r\n {% if (!instance.hasRemoveButtons || instance.hasRemoveButtons()) { %}\r\n <button class=\"btn btn-danger btn-sm removeRow\"><i class=\"{{ iconClass('trash') }}\"></i></button>\r\n {% } %}\r\n </div>\r\n </div>\r\n {% } %}\r\n </div>\r\n {% } %}\r\n \r\n \r\n \r\n{% const emptyElements = []; %}\r\n{% const elements = document.getElementsByClassName(\"list-group-item\"); %}\r\n{% for (let i = 0; i < elements.length; i++) { %}\r\n{% const element = elements[i]; %}\r\n{% if(element.querySelectorAll('div.row').length===0){(element).remove() }} %}",
"tableRow": "\n {% util.eachComponent(components, function(component) { %}\n {% if (!component.hasOwnProperty('tableView') || component.tableView) { %}\n <td class=\"editgrid-table-column\">\n {{ getView(component, row[component.key]) }}\n </td>\n {% } %}\n {% }) %}\n {% if (!instance.options.readOnly && !instance.disabled) { %}\n <td class=\"editgrid-table-column\">\n <div class=\"btn-group\">\n <button class=\"btn btn-default btn-light btn-sm editRow\" aria-label=\"{{ t('Edit row') }}\"><i class=\"{{ iconClass('edit') }}\"></i></button>\n {% if (!instance.hasRemoveButtons || instance.hasRemoveButtons()) { %}\n <button class=\"btn btn-danger btn-sm removeRow\" aria-label=\"{{ t('Remove row') }}\"><i class=\"{{ iconClass('trash') }}\"></i></button>\n {% } %}\n </div>\n </td>\n {% } %}\n ",
Expand Down Expand Up @@ -588,7 +588,7 @@
"wysiwyg": false,
"editor": "",
"fixedSize": true,
"id": "e9hosx"
"id": "eg5nycl"
}
],
"width": 4,
Expand Down Expand Up @@ -680,7 +680,7 @@
"addons": [],
"inputType": "radio",
"fieldSet": false,
"id": "ecfcvd"
"id": "eemn8j"
}
],
"width": 2,
Expand Down Expand Up @@ -767,7 +767,7 @@
"displayMask": "",
"spellcheck": true,
"truncateMultipleSpaces": false,
"id": "e16qs9g"
"id": "ekujf"
}
],
"size": "md",
Expand Down Expand Up @@ -854,7 +854,7 @@
"displayMask": "",
"spellcheck": true,
"truncateMultipleSpaces": false,
"id": "ea0a6k3"
"id": "ejtmegx"
}
],
"size": "md",
Expand Down Expand Up @@ -941,7 +941,7 @@
"displayMask": "",
"spellcheck": true,
"truncateMultipleSpaces": false,
"id": "ezrqe67"
"id": "e92ykyh"
}
],
"size": "md",
Expand Down Expand Up @@ -1016,7 +1016,7 @@
"tree": false,
"lazyLoad": false,
"autoAdjust": false,
"id": "em2rzym"
"id": "eq9y9ki"
}
],
"placeholder": "",
Expand All @@ -1035,7 +1035,7 @@
"tree": true,
"lazyLoad": false,
"defaultOpen": false,
"id": "e62bz6a"
"id": "e49d927"
},
{
"id": "ecf3gbp",
Expand Down Expand Up @@ -9078,7 +9078,7 @@
"attributes": {},
"components": [
{
"id": "epivnsp00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"id": "epivnsp00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"key": "contaminant",
"mask": false,
"type": "textfield",
Expand Down Expand Up @@ -9155,7 +9155,7 @@
"truncateMultipleSpaces": false
},
{
"id": "el3hlvr00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"id": "el3hlvr00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"key": "maximumConcentration",
"mask": false,
"type": "textfield",
Expand Down Expand Up @@ -9900,7 +9900,7 @@
"attributes": {},
"components": [
{
"id": "esedw400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"id": "esedw400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"key": "contaminant",
"mask": false,
"type": "textfield",
Expand Down Expand Up @@ -9977,7 +9977,7 @@
"truncateMultipleSpaces": false
},
{
"id": "esor90600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"id": "esor90600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"key": "maximumConcentration",
"mask": false,
"type": "textfield",
Expand Down Expand Up @@ -10719,7 +10719,7 @@
"attributes": {},
"components": [
{
"id": "ej0y4100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"id": "ej0y4100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"key": "contaminant",
"mask": false,
"type": "textfield",
Expand Down Expand Up @@ -10796,7 +10796,7 @@
"truncateMultipleSpaces": false
},
{
"id": "e8qg9fh00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"id": "e8qg9fh00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"key": "maximumConcentration",
"mask": false,
"type": "textfield",
Expand Down Expand Up @@ -11544,7 +11544,7 @@
"attributes": {},
"components": [
{
"id": "eevqmo90000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"id": "eevqmo90000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"key": "contaminant",
"mask": false,
"type": "textfield",
Expand Down Expand Up @@ -11621,7 +11621,7 @@
"truncateMultipleSpaces": false
},
{
"id": "et223l30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"id": "et223l30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"key": "maximumConcentration",
"mask": false,
"type": "textfield",
Expand Down
Loading
Loading