diff --git a/app/controllers/reports_controller.rb b/app/controllers/reports_controller.rb index 1829d1f00..c148511f3 100644 --- a/app/controllers/reports_controller.rb +++ b/app/controllers/reports_controller.rb @@ -349,7 +349,7 @@ class ReportsController < ApplicationController @available_repositories = [] repositories = Repository.active .accessible_by_teams(current_team) - .name_like(search_params[:q]) + .name_like(search_params[:query]) .limit(Constants::SEARCH_LIMIT) repositories.each do |repository| next unless can_manage_repository_rows?(current_user, repository) @@ -365,7 +365,7 @@ class ReportsController < ApplicationController end def search_params - params.permit(:q) + params.permit(:query) end def save_pdf_params diff --git a/app/javascript/vue/reports/modals/save_to_inventory.vue b/app/javascript/vue/reports/modals/save_to_inventory.vue index cf6a24cca..24976c9bb 100644 --- a/app/javascript/vue/reports/modals/save_to_inventory.vue +++ b/app/javascript/vue/reports/modals/save_to_inventory.vue @@ -71,7 +71,7 @@ import axios from '../../../packs/custom_axios.js'; import modalMixin from '../../shared/modal_mixin'; export default { - name: 'NewProtocolModal', + name: 'SaveToInventoryModal', props: { report: Object, repositoriesUrl: String, @@ -129,6 +129,10 @@ export default { }); }, changeRepository(repository) { + if (typeof repository === 'object') { + return; + } + this.selectedColumn = null; this.selectedRepository = null; this.selectedRow = null; diff --git a/app/javascript/vue/reports/table.vue b/app/javascript/vue/reports/table.vue index ab45bf73e..e6472244c 100644 --- a/app/javascript/vue/reports/table.vue +++ b/app/javascript/vue/reports/table.vue @@ -26,6 +26,7 @@ :repositoriesUrl="availableRepositoriesUrl" :columnsUrl="availableColumnsUrl" :rowsUrl="availableRowsUrl" + @close="reportToSave = false" ref="saveToInventoryModal"/>