mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-05 20:23:16 +08:00
Read inventory item number column decimal value from backend [SCI-9764] (#6698)
This commit is contained in:
parent
eaa0989c77
commit
3b165ba92d
3 changed files with 8 additions and 4 deletions
|
@ -15,6 +15,7 @@
|
|||
:updatePath="updatePath"
|
||||
:optionsPath="column.options_path"
|
||||
:inArchivedRepositoryRow="inArchivedRepositoryRow"
|
||||
:decimals="column.decimals"
|
||||
:canEdit="permissions.can_manage && !inArchivedRepositoryRow"
|
||||
:editingField="editingField"
|
||||
@setEditingField="editingField = $event"
|
||||
|
|
|
@ -65,12 +65,9 @@ export default {
|
|||
colName: String,
|
||||
colVal: Number,
|
||||
permissions: null,
|
||||
decimals: { type: Number, default: 0 },
|
||||
canEdit: { type: Boolean, defaul: false}
|
||||
},
|
||||
created() {
|
||||
// constants
|
||||
this.decimals = Number(document.getElementById(`${this.colId}`).dataset['metadataDecimals']) || 0;
|
||||
},
|
||||
methods: {
|
||||
toggleCollapse() {
|
||||
if (!this.expandable) return;
|
||||
|
|
|
@ -57,6 +57,12 @@ json.custom_columns do
|
|||
{
|
||||
options_path: items_repository_repository_columns_checklist_column_path(@repository, repository_column)
|
||||
}
|
||||
when 'RepositoryNumberValue'
|
||||
{
|
||||
decimals: repository_column.metadata.fetch(
|
||||
'decimals', Constants::REPOSITORY_NUMBER_TYPE_DEFAULT_DECIMALS
|
||||
).to_i
|
||||
}
|
||||
else
|
||||
{
|
||||
options_path: ''
|
||||
|
|
Loading…
Reference in a new issue