mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Removing obsolete rabl templates
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
object @line_item
|
||||
attributes :id, :quantity, :max_quantity
|
||||
node( :supplier ) { |li| partial 'api/enterprises/bulk_show', :object => li.product.supplier }
|
||||
node( :units_product ) { |li| partial 'spree/api/products/units_show', :object => li.product }
|
||||
node( :units_variant ) { |li| partial 'spree/api/variants/units_show', :object => li.variant }
|
||||
@@ -1,2 +0,0 @@
|
||||
collection @orders.order('id ASC')
|
||||
extends "spree/api/orders/bulk_show"
|
||||
@@ -1,14 +0,0 @@
|
||||
object @order
|
||||
attributes :id, :number
|
||||
|
||||
node( :full_name ) { |order| order.billing_address.nil? ? "" : ( order.billing_address.full_name || "" ) }
|
||||
node( :email ) { |order| order.email || "" }
|
||||
node( :phone ) { |order| order.billing_address.nil? ? "a" : ( order.billing_address.phone || "" ) }
|
||||
node( :completed_at ) { |order| order.completed_at.blank? ? "" : order.completed_at.strftime("%F %T") }
|
||||
node( :distributor ) { |order| partial 'api/enterprises/bulk_show', :object => order.distributor }
|
||||
node( :order_cycle ) { |order| partial 'api/order_cycles/bulk_show', :object => order.order_cycle }
|
||||
node( :line_items ) do |order|
|
||||
order.line_items.managed_by(@current_api_user).order('id ASC').map do |line_item|
|
||||
partial 'spree/api/line_items/bulk_show', :object => line_item
|
||||
end
|
||||
end
|
||||
@@ -1,2 +0,0 @@
|
||||
object @product
|
||||
attributes :id, :name, :group_buy_unit_size, :variant_unit
|
||||
@@ -1,9 +0,0 @@
|
||||
object @variant
|
||||
attributes :id
|
||||
|
||||
node( :unit_text ) do |v|
|
||||
options_text = v.options_text
|
||||
v.product.name + (options_text.empty? ? "" : ": #{options_text}")
|
||||
end
|
||||
|
||||
node( :unit_value ) { |v| v.unit_value }
|
||||
Reference in New Issue
Block a user