Update serializers, views, and JS for bulk products edit

This commit is contained in:
Matt-Yorkley
2023-07-03 14:36:10 +01:00
committed by Maikel Linke
parent 363bbded43
commit 5a48721af4
5 changed files with 9 additions and 8 deletions

View File

@@ -4,8 +4,8 @@ module Api
module Admin
class ProductSerializer < ActiveModel::Serializer
attributes :id, :name, :sku, :variant_unit, :variant_unit_scale, :variant_unit_name,
:inherits_properties, :on_hand, :price, :tax_category_id, :import_date,
:image_url, :thumb_url, :variants
:inherits_properties, :on_hand, :price, :import_date, :image_url,
:thumb_url, :variants
has_one :supplier, key: :producer_id, embed: :id
has_one :primary_taxon, key: :category_id, embed: :id

View File

@@ -3,7 +3,7 @@
module Api
module Admin
class VariantSerializer < ActiveModel::Serializer
attributes :id, :name, :producer_name, :image, :sku, :import_date,
attributes :id, :name, :producer_name, :image, :sku, :import_date, :tax_category_id,
:options_text, :unit_value, :unit_description, :unit_to_display,
:display_as, :display_name, :name_to_display, :variant_overrides_count,
:price, :on_demand, :on_hand, :in_stock, :stock_location_id, :stock_location_name