From c1e3c2b6c659b53f1d996aa9e0fc25bbc02b02cf Mon Sep 17 00:00:00 2001 From: Gregor Lasnibat Date: Wed, 29 Nov 2023 14:54:30 +0100 Subject: [PATCH] (fix) Update of item table not done, stock modal entry [SCI-9789] --- app/controllers/repository_rows_controller.rb | 2 +- .../repository_values/RepositoryStatusValue.vue | 2 +- .../repository_values/date_time_component.vue | 4 ++-- .../vue/repository_row/manage_stock_value_modal.vue | 3 +++ 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/controllers/repository_rows_controller.rb b/app/controllers/repository_rows_controller.rb index ee815b042..ffbf4bd97 100644 --- a/app/controllers/repository_rows_controller.rb +++ b/app/controllers/repository_rows_controller.rb @@ -210,7 +210,7 @@ class RepositoryRowsController < ApplicationController return render json: { name: @repository_row.name } if update_params['repository_row'].present? column = row_cell_update.column - cell = row_cell_update.cell + cell = row_cell_update.cell&.reload || row_cell_update.cell data = { value_type: column.data_type, id: column.id, value: nil } return render json: data if cell.blank? diff --git a/app/javascript/vue/repository_item_sidebar/repository_values/RepositoryStatusValue.vue b/app/javascript/vue/repository_item_sidebar/repository_values/RepositoryStatusValue.vue index 8079afd23..1f9c0517b 100644 --- a/app/javascript/vue/repository_item_sidebar/repository_values/RepositoryStatusValue.vue +++ b/app/javascript/vue/repository_item_sidebar/repository_values/RepositoryStatusValue.vue @@ -92,7 +92,7 @@ export default { methods: { changeSelected(id) { this.selected = id; - if (id) { + if (id || id === null) { this.update(id); } }, diff --git a/app/javascript/vue/repository_item_sidebar/repository_values/date_time_component.vue b/app/javascript/vue/repository_item_sidebar/repository_values/date_time_component.vue index 3ea8299d4..ee021faa0 100644 --- a/app/javascript/vue/repository_item_sidebar/repository_values/date_time_component.vue +++ b/app/javascript/vue/repository_item_sidebar/repository_values/date_time_component.vue @@ -16,8 +16,8 @@ -