Maikel Linke
d5ff1f5c71
Remove StockItem#stock_location
2025-01-22 11:20:05 +11:00
Gaetan Craig-Riou
b1b534aa1b
Fix product and variant api serializer
2024-10-14 15:01:18 +11:00
Gaetan Craig-Riou
507fa028c1
Fix api admin serializers
2024-07-03 10:17:49 +10:00
Matt-Yorkley
65731f6c52
Update serializers and views for admin products index
2024-04-02 09:27:36 +11:00
Matt-Yorkley
5a48721af4
Update serializers, views, and JS for bulk products edit
2023-07-31 09:23:20 +10:00
Matt-Yorkley
7dc1091bc2
Migrate product image from master variant to product
2023-06-16 21:23:44 +01:00
Matt-Yorkley
1995a44848
Improve eager-loading on admin products page adn resolve issue with serializer
...
For some reason eager-loaded data isn't passed to nested serializers when using associations. Defining the association as a method and passing in some optional paramaters resolves the issue.
This reduces queries run by the controller action by around 75%, as well as the response times.
2023-05-06 17:15:27 +01:00
Maikel Linke
b7efa1b018
Replace Paperclip on Spree::Image
2022-06-01 17:16:55 +10:00
Matt-Yorkley
bd4560cff6
Don't serialize all variant override objects where they are not needed
...
This is only needed in one place, and only as a count, and can cause huge amounts of superfluous data to be fetched and serialized, for example in the admin products index page (where variant override data is not used at all).
2021-01-06 16:04:47 +00:00
Luis Ramos
7cc7c62232
Fix long lines
2020-10-30 16:14:39 +00:00
Luis Ramos
b6dc46a911
Fix rubocop issue by nesting module and class declarations
...
No file contents changed
2020-10-30 16:14:34 +00:00
luisramos0
9404aacfb2
run rubocop --auto-correct
2019-11-10 18:42:43 +00:00
luisramos0
a44a251d96
Remove duplicated attributes tag from all serializers to create consistency
2019-09-19 16:32:09 +01:00
luisramos0
2d5eccbf97
Add :in_stock, :stock_location_id, :stock_location_name to admin variant serializer, these are needed for the variant_autocomplete js code from spree
2019-07-23 21:38:29 +01:00
luisramos0
7e6259da31
Replace admin/variants/search rabl template with existing admin variant serializer with a few added attributes
...
This commit fixes a bug as the image of the variatn was not being rendered, we need to fetch the image of the product, not the image of the variant.
2019-07-23 21:37:45 +01:00
luisramos0
30967a5ffa
Fix bulk product edit page. on_hand and on_demand should never be mixed on the server side, the UI can make the decision to show on_demand on the on_hand column if on_demand is true
2019-02-18 22:01:48 +00:00
Matt-Yorkley
e362c2d867
PI timestamps
2018-05-26 19:34:19 +01:00
Julius Pabrinkis
1920ee7e88
Extract translations from serializers and overrides
2017-07-21 12:17:12 +10:00
Rob Harrington
521f227f74
Adding sku and on_demand to VariantOverride
2016-01-13 18:49:33 +11:00
Rob Harrington
ab7bfd10c5
Revert "Renaming options_text to unit_text so that we can use method from included VariantAndLineItemNaming module"
...
This reverts commit e86e08b72e939fee61eddd41d56081395666a877.
Conflicts:
lib/open_food_network/order_and_distributor_report.rb
spec/features/admin/variants_spec.rb
spec/lib/open_food_network/order_and_distributor_report_spec.rb
2015-10-28 13:08:50 +11:00
Rob Harrington
795830d94d
Renaming options_text to unit_text so that we can use method from included VariantAndLineItemNaming module
2015-10-28 13:07:31 +11:00
Maikel Linke
73884d4f01
BPE: Display notice about variant overrides
2015-05-21 13:01:28 +10:00
Rob Harrington
5d6f265c0a
Moving spree namespaced serializers into admin
2015-04-22 21:02:06 +10:00