diff --git a/seed/static/seed/js/controllers/portfolio_summary_controller.js b/seed/static/seed/js/controllers/portfolio_summary_controller.js index f3c81acab2..271146750b 100644 --- a/seed/static/seed/js/controllers/portfolio_summary_controller.js +++ b/seed/static/seed/js/controllers/portfolio_summary_controller.js @@ -42,7 +42,8 @@ angular.module('BE.seed.controller.portfolio_summary', []) spinner_utility ) { $scope.organization = organization_payload.organization; - $scope.write_permission = $scope.menu.user.is_ali_root || !$scope.menu.user.is_ali_leaf; + const viewer = $scope.menu.user.organization.user_role === 'viewer'; + $scope.write_permission = ($scope.menu.user.is_ali_root || !$scope.menu.user.is_ali_leaf) && !viewer; // Ii there a better way to convert string units to displayUnits? const area_units = $scope.organization.display_units_area.replace('**2', '²'); const eui_units = $scope.organization.display_units_eui.replace('**2', '²'); @@ -209,7 +210,7 @@ angular.module('BE.seed.controller.portfolio_summary', []) combined_result[cycle_priority[0].id] = properties; const property_ids = properties.map((p) => p.id); - get_paginated_properties(page, per_page, cycle_priority[1], access_level_instance_id, false, property_ids).then((result1) => { + get_paginated_properties(page, per_page, cycle_priority[1], access_level_instance_id, false, property_ids, $scope.goal.id).then((result1) => { properties = result1.results; // if result0 returns fewer properties than result1, use result1 for ui-grid config if (result1.pagination.num_pages > $scope.inventory_pagination.num_pages) { @@ -530,7 +531,7 @@ angular.module('BE.seed.controller.portfolio_summary', []) editDropdownOptionsArray: $scope.question_options, editDropdownIdLabel: 'value', enableCellEdit: $scope.write_permission, - cellClass: () => $scope.write_permission && 'cell-dropdown', + cellClass: () => $scope.write_permission && 'cell-edit', // if user has write permission show a dropdown indicator width: 350, cellTemplate: ` @@ -547,9 +548,8 @@ angular.module('BE.seed.controller.portfolio_summary', []) displayName: 'Resolution', enableFiltering: false, enableSorting: false, - enableCellEdit: true, - editableCellTemplate: 'ui-grid/cellTitleValidator', - cellClass: 'cell-edit', + enableCellEdit: !viewer, + cellClass: !viewer && 'cell-edit', width: 300 }, { @@ -557,9 +557,8 @@ angular.module('BE.seed.controller.portfolio_summary', []) displayName: 'Historical Notes', enableFiltering: false, enableSorting: false, - enableCellEdit: true, - editableCellTemplate: 'ui-grid/cellTitleValidator', - cellClass: 'cell-edit', + enableCellEdit: !viewer, + cellClass: !viewer && 'cell-edit', width: 300 }, { @@ -571,7 +570,7 @@ angular.module('BE.seed.controller.portfolio_summary', []) editDropdownOptionsArray: [{ id: 1, value: true }, { id: 2, value: false }], editDropdownIdLabel: 'value', enableCellEdit: $scope.write_permission, - cellClass: () => $scope.write_permission && 'cell-dropdown', + cellClass: () => $scope.write_permission && 'cell-edit', // if user has write permission show a dropdown indicator cellTemplate: `
@@ -590,7 +589,7 @@ angular.module('BE.seed.controller.portfolio_summary', []) editDropdownOptionsArray: [{ id: 1, value: true }, { id: 2, value: false }], editDropdownIdLabel: 'value', enableCellEdit: $scope.write_permission, - cellClass: () => $scope.write_permission && 'cell-dropdown', + cellClass: () => $scope.write_permission && 'cell-edit', // if user has write permission show a dropdown indicator cellTemplate: `
diff --git a/seed/static/seed/scss/style.scss b/seed/static/seed/scss/style.scss index 26ea70d3ba..08b74f8c55 100755 --- a/seed/static/seed/scss/style.scss +++ b/seed/static/seed/scss/style.scss @@ -5428,11 +5428,8 @@ tags-input .tags .tag-item { word-wrap: break-word; } -.cell-dropdown { - cursor: copy; -} .cell-edit { - cursor: cell; + cursor: copy; } .cell-dropdown-indicator { display: flex;