mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-09 06:04:46 +08:00
Merge pull request #7091 from lasniscinote/gl_SCI_10086
(fix) Non decimal number in inventory table has commas [gl-SCI-10086]
This commit is contained in:
commit
34777d766d
3 changed files with 4 additions and 4 deletions
|
@ -162,9 +162,9 @@ $.fn.dataTable.render.defaultRepositoryNumberValue = function() {
|
|||
return '';
|
||||
};
|
||||
|
||||
$.fn.dataTable.render.RepositoryNumberValue = function(data) {
|
||||
$.fn.dataTable.render.RepositoryNumberValue = function (data) {
|
||||
return `<span class="number-value" data-value="${data.value}">
|
||||
${data.value.toLocaleString('en-US', { timeZone: 'UTC' })}
|
||||
${data.value}
|
||||
</span>`;
|
||||
};
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
'max-h-[4rem]': collapsed,
|
||||
'max-h-[40rem]': !collapsed
|
||||
}">
|
||||
{{ colVal.toLocaleString('en-US', { timezone: 'UTC' }) }}
|
||||
{{ colval }}
|
||||
</div>
|
||||
<div v-else
|
||||
class="text-sn-dark-grey font-inter text-sm font-normal leading-5">
|
||||
|
|
|
@ -4,7 +4,7 @@ module RepositoryDatatable
|
|||
class RepositoryNumberValueSerializer < RepositoryBaseValueSerializer
|
||||
def value
|
||||
decimals = scope[:column].metadata.fetch('decimals', Constants::REPOSITORY_NUMBER_TYPE_DEFAULT_DECIMALS).to_i
|
||||
value_object.data.round(value_object.data.scale.zero? ? 0 : decimals)
|
||||
value_object.data.round(value_object.data.scale.zero? ? 0 : decimals).to_s
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue