supplier client sections working with problematic authentication still active
This commit is contained in:
@@ -6,7 +6,11 @@ module Suppliers
|
||||
end
|
||||
|
||||
def show
|
||||
current_supplier.sections.include_relations(:tables, :section_areas, :section_elements, product_categories: {products: :product_variants})
|
||||
#current_supplier.sections.include_relations(:tables, :section_areas, :section_elements, product_categories: {products: :product_variants})
|
||||
FlatKeys.as_nested_structure(Supplier::PRELOAD_INCLUDES).last.each do |relation_name, includes|
|
||||
relation_result = current_supplier.public_send(relation_name)
|
||||
relation_result.include_relations(includes) if relation_result.is_a?(Array)
|
||||
end
|
||||
#render json: JSONAPI::Serializer.serialize(current_supplier, serializer: Suppliers::SupplierSerializer, include: %w[
|
||||
#sections
|
||||
#sections.tables
|
||||
@@ -16,15 +20,7 @@ module Suppliers
|
||||
#product_categories.products
|
||||
#product_categories.products.product_variants
|
||||
#]) #.new(current_supplier).as_json
|
||||
render json: current_supplier, include: %w[
|
||||
sections
|
||||
sections.tables
|
||||
sections.section_areas
|
||||
sections.section_elements
|
||||
product_categories
|
||||
product_categories.products
|
||||
product_categories.products.product_variants
|
||||
]
|
||||
render json: current_supplier, include: Supplier::PRELOAD_INCLUDES
|
||||
end
|
||||
|
||||
def update
|
||||
|
||||
Reference in New Issue
Block a user