(fix) Update of item table not done, stock modal entry [SCI-9789]

This commit is contained in:
Gregor Lasnibat 2023-11-29 14:54:30 +01:00
parent 843cff8e1a
commit 90f62ae9c2
4 changed files with 7 additions and 4 deletions

View file

@ -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
data = { value_type: column.data_type, id: column.id, value: nil }
return render json: data if cell.blank?

View file

@ -92,7 +92,7 @@ export default {
methods: {
changeSelected(id) {
this.selected = id;
if (id) {
if (id || id === null) {
this.update(id);
}
},

View file

@ -16,8 +16,8 @@
</template>
</span>
<span v-else >
<template v-if="colVal.datetime">
{{ colVal.datetime.formatted }}
<template v-if="colVal.formatted">
{{ colVal.formatted }}
</template>
<template v-else>
{{ viewPlaceholder }}

View file

@ -209,6 +209,9 @@
},
methods: {
setOperation($event) {
if ($event !== this.operation) {
this.amount = null;
}
this.operation = $event;
if ([2, 3].includes($event)) {
this.unit = this.stockValue.unit;