Skip to content

Commit

Permalink
Merge pull request #694 from bcgov/bug/srs-305-fix
Browse files Browse the repository at this point in the history
changed to prev version in dev
  • Loading branch information
jaspalsingh-aot authored May 9, 2024
2 parents 988807f + 078c117 commit 21192cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion forms-flow-ai/epd-forms/Summary of Site Condition.json
Original file line number Diff line number Diff line change
Expand Up @@ -1853,7 +1853,7 @@
"templates": {
"header": "{% console.log(\"row-key header\",'commentFor',row['commentFor']) %}\r\n{% const UserDetails = JSON.parse(localStorage.getItem(\"UserDetails\"))%}\r\n{% const groups = UserDetails[\"groups\"]; %}\r\n\r\n{% if(groups.includes(\"/formsflow/formsflow-client\") || groups.includes(\"/formsflow/formsflow-reviewer/csap\") || groups.includes(\"/formsflow/formsflow-reviewer/csap-society\")){ %}\r\n\r\n<div class=\"row card-header bg-default\">\r\n {% util.eachComponent(components, function(component) { %}\r\n {% if (displayValue(component) && component.key !== 'commentFor' ) { %}\r\n {% if(component.label === 'Notes') { %}\r\n <div class=\"col-sm-4\">{{ t(component.label) }}</div>\r\n {% } else if(component.key !== 'comments') { %}\r\n <div class=\"col-sm-2\">{{ t(component.label) }}</div>\r\n {% } %}\r\n {% } %}\r\n {% }) %}\r\n </div>\r\n\r\n{% } else { %}\r\n\r\n<div class=\"row card-header bg-default\">\r\n {% util.eachComponent(components, function(component) { %}\r\n {% if (displayValue(component)) { %}\r\n \r\n {% if(component.key == 'comments') { %}\r\n <div class=\"col-sm-4\"> {{ t(component.label)}} </div>\r\n {% } else if(component.key == 'commentFor' || component.key == 'role' || component.key == 'createdBy') { %}\r\n <div class=\"col-sm-2\"> {{ t(component.label)}} </div>\r\n{% } else { %}\r\n <div class=\"col-sm-1\"> {{ t(component.label)}} </div>\r\n{% } %} \r\n\r\n \r\n {% } %}\r\n {% }) %}\r\n </div>\r\n\r\n{% } %}\r\n\r\n\r\n\r\n\r\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": "{% console.log(\"row-key main sosc\",'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-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-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-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/site-risk-classification-officer\") || groups.includes(\"/formsflow/formsflow-reviewer/cssa-team\") || groups.includes(\"/formsflow/formsflow-reviewer/caseworker\") || groups.includes(\"/formsflow/formsflow-reviewer/cssa-manager\") || 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 == 'commentFor' || 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() }} %}",
"row": "{% console.log(\"row-key main sosc\",'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-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-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-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/site-risk-classification-officer\") || groups.includes(\"/formsflow/formsflow-reviewer/cssa-team\") || groups.includes(\"/formsflow/formsflow-reviewer/caseworker\") || groups.includes(\"/formsflow/formsflow-reviewer/cssa-manager\") || 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 == 'commentFor' || 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()) && (row['role'] == 'CSSA Team' && groups.includes(\"/formsflow/formsflow-reviewer/cssa-team\") ) ) { %}\r\n <button class=\"btn btn-danger btn-sm removeRow\"><i class=\"{{ iconClass('trash') }}\"></i></button>\r\n {% } %}\r\n \t {% if ((!instance.hasRemoveButtons || instance.hasRemoveButtons()) && (row['role'] == 'CSSA Manager' && groups.includes(\"/formsflow/formsflow-reviewer/cssa-manager\") ) ) { %}\r\n <button class=\"btn btn-danger btn-sm removeRow\"><i class=\"{{ iconClass('trash') }}\"></i></button>\r\n {% } %}\r\n {% if ((!instance.hasRemoveButtons || instance.hasRemoveButtons()) && (row['role'] == 'Client' && groups.includes(\"/formsflow/formsflow-client\") ) ) { %}\r\n <button class=\"btn btn-danger btn-sm removeRow\"><i class=\"{{ iconClass('trash') }}\"></i></button>\r\n {% } %}\r\n {% if ((!instance.hasRemoveButtons || instance.hasRemoveButtons()) && (row['role'] == 'Approved Professional' && groups.includes(\"/formsflow/formsflow-reviewer/csap\") ) ) { %}\r\n <button class=\"btn btn-danger btn-sm removeRow\"><i class=\"{{ iconClass('trash') }}\"></i></button>\r\n {% } %}\r\n {% if ((!instance.hasRemoveButtons || instance.hasRemoveButtons()) && (row['role'] == 'CSAP Society' && groups.includes(\"/formsflow/formsflow-reviewer/csap-society\") ) ) { %}\r\n <button class=\"btn btn-danger btn-sm removeRow\"><i class=\"{{ iconClass('trash') }}\"></i></button>\r\n {% } %}\r\n \t {% if ((!instance.hasRemoveButtons || instance.hasRemoveButtons()) && (row['role'] == 'Caseworker' && groups.includes(\"/formsflow/formsflow-reviewer/caseworker\") ) ) { %}\r\n <button class=\"btn btn-danger btn-sm removeRow\"><i class=\"{{ iconClass('trash') }}\"></i></button>\r\n {% } %}\r\n \t {% if ((!instance.hasRemoveButtons || instance.hasRemoveButtons()) && (row['role'] == 'Statutory Decision Maker' && groups.includes(\"/formsflow/formsflow-reviewer/sdm\") ) ) { %}\r\n <button class=\"btn btn-danger btn-sm removeRow\"><i class=\"{{ iconClass('trash') }}\"></i></button>\r\n {% } %}\r\n \t {% if ((!instance.hasRemoveButtons || instance.hasRemoveButtons()) && (row['role'] == 'Site Risk Classification Officer' && groups.includes(\"/formsflow/formsflow-reviewer/site-risk-classification-officer\") ) ) { %}\r\n <button class=\"btn btn-danger btn-sm removeRow\"><i class=\"{{ iconClass('trash') }}\"></i></button>\r\n {% } %}\r\n \t {% if ((!instance.hasRemoveButtons || instance.hasRemoveButtons()) && (row['role'] == 'Site Information Advisor' && groups.includes(\"/formsflow/formsflow-reviewer/site-information-advisor\") ) ) { %}\r\n <button class=\"btn btn-danger btn-sm removeRow\"><i class=\"{{ iconClass('trash') }}\"></i></button>\r\n {% } %}\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 ",
"footer": "{% 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() }} %}\r\n"
},
Expand Down

0 comments on commit 21192cf

Please sign in to comment.