scinote-web/app/views/repository_stock_values/edit.json.jbuilder
wandji c22d1e226b
Add new stock management modal and edit itemm card stock fields [SCI-9415] (#6474)
* Add edit fetaure to item card stock field [SCI-9415]

* Replace manage stock modal [SCI-9415]

* Fix issue displaying item card [SCI-9415]

* Minor improvements [SCI-9415]

* Enable stock modal in assigned inventories [SCI-9415]

* Use toggleable reminder value [SCI-9415]
2023-10-27 10:31:38 +02:00

13 lines
637 B
Ruby

# frozen_string_literal: true
json.stock_url update_repository_stock_repository_repository_row_url(@repository, @repository_row)
json.repository_row_name @repository_row.name
json.stock_value do
json.id @repository_stock_value.id
json.amount @repository_stock_value.formatted_value
json.decimals @repository_column.metadata['decimals']
json.units @repository_column.repository_stock_unit_items.pluck(:id, :data)
json.unit @repository_stock_value.repository_stock_unit_item_id
json.reminder_enabled @repository_stock_value.low_stock_threshold.present?
json.low_stock_treshold @repository_stock_value.formatted_treshold
end