jibees
20ee0d5009
Merge pull request #9301 from mkllnk/3975-unsupported-image
...
Allow SVG images for products and show errors when uploading unsupported file
2022-07-21 16:56:11 +02:00
Jean-Baptiste Bellet
afa40ea82f
Authorize product and not @product
2022-07-13 14:26:11 +02:00
Jean-Baptiste Bellet
90af6bd22d
Handle note saving with a new action on existing API controller
2022-07-05 10:09:20 +02:00
Maikel
553046addb
Merge pull request #9255 from jibees/fix-admin-taxonomies-interface
...
Fix admin taxonomies interface
2022-06-21 09:41:55 +10:00
Maikel Linke
5f11b6a650
Respond with errors if image upload fails
2022-06-14 15:06:17 +10:00
Maikel Linke
831aa3aae0
Simplify ProductImagesController
2022-06-14 14:50:55 +10:00
Filipe
9fee4f1554
Merge pull request #9203 from AgriculturaFamiliar/remove-closed-associated-adjustments-button
...
Remove closed associated adjustments button
2022-06-10 10:10:50 +01:00
Jean-Baptiste Bellet
817b5f437f
Authorize :position params
2022-06-02 15:41:44 +02:00
Maikel Linke
4a0ed99919
Replace Paperclip on Enterprise model
...
We configured Paperclip to convert images to JPG in some cases but I
omitted that here because we don't need it. If an image is better
represented as PNG or another format then the user should be able to
choose that.
Some specs were also testing the generated URL but the Active Storage
URL doesn't contain a style name anymore and it's not helpful to test
the URL.
2022-06-01 17:16:55 +10:00
Arthur Vieira
95010fcd12
Remove the unlock condition in shipment controller
...
This assumes unlock is always true so the shipment's fee adjustments
always opens and closes.
2022-05-26 09:21:48 -03:00
Sebastian Castro
287e8f5845
Reports Refactor 3
...
Easily group and create header and summary row
Auto format cells when appropriate type (boolean, dates) and render_format (neither csv nor json)
2022-05-12 16:54:13 +02:00
Sebastian Castro
452a3fa933
Reports Refactor 2: Merge Spree::reports into Admin::Reports
2022-05-12 16:54:13 +02:00
GeorgeThoppil
8903496a1b
Optional restocking items
2022-05-06 10:55:24 -04:00
Jean-Baptiste Bellet
4a3e0ea9b9
Use the right scope to retrieve products based on properties
2022-02-07 08:57:18 +01:00
Jean-Baptiste Bellet
dfe8ed26d9
Update tests and use ransack to search with the new scope: with_properties
2022-02-07 08:57:18 +01:00
Matt-Yorkley
6d2521bf5f
Remove Spree.user_class
...
This construct was previously used in Spree to switch out the user class with a dummy class during certain tests. We don't use this any more, so it's just mess.
🔥
2021-12-10 18:18:20 +00:00
Matt-Yorkley
439a2318fb
Move API response under top-level :data node
2021-11-04 14:55:23 +00:00
Matt-Yorkley
924f6568d6
Replace data loading with new Reports::QueryInterface
2021-11-04 14:55:23 +00:00
Matt-Yorkley
817f0942dd
Pull in reports POC work replacing Packing reports
2021-11-04 14:55:23 +00:00
Luis Azcuaga
e8fd89a6d2
Run rubocop over existing todo
2021-10-25 21:28:28 -05:00
Matt-Yorkley
1d5077061e
Remove andand
...
This old gem implemented some functionality for handling nils which is no longer needed, as it's provided natively by Ruby with the &. operator.
2021-09-08 14:28:31 +01:00
Matt-Yorkley
1b112961d1
Handle request timeouts explicitly with rack-timeout
...
Puma doesn't terminate execution of long-running requests by default.
2021-07-31 13:11:10 +01:00
Matt-Yorkley
58f95bd34c
Remove ActionController::Metal class_eval hack
2021-07-24 21:28:13 +01:00
Matt-Yorkley
4b4450d34f
Update conditional pagination in Api::OrdersController
2021-07-14 13:19:02 +01:00
Matt-Yorkley
41f9f07a80
Simplify cases where pagination is conditional and pagination data may or may not be used
2021-07-14 13:17:33 +01:00
Matt-Yorkley
e5afa3a26e
Simplify #pagy calls without default item counts
...
Pagy will pick up the :per_page param by default now, so we don't need to specify `items: params[:per_page]` unless we want to use something beyond that param's value.
2021-07-14 13:17:33 +01:00
Matt-Yorkley
a146782bcd
Update pagination in Api::StatesController
2021-07-14 13:17:33 +01:00
Matt-Yorkley
eba60a6130
Deal with Api::OrdersController and SearchOrders service
2021-07-14 13:17:33 +01:00
Matt-Yorkley
3213c30a37
Update pagination in Api::ExchangeProductsController
2021-07-14 13:17:33 +01:00
Nihal Mohammed
e5bdaa603a
Setup pagy
2021-07-14 13:17:33 +01:00
Andy Brett
07a2a584c3
remove calls to ssl_allowed as well
2021-06-24 12:06:34 -07:00
Andy Brett
334b9b520a
removed deprecated calls to force_ssl; rely on config.force_ssl
2021-06-24 11:58:33 -07:00
Luis Ramos
e52937c113
Use rubocop auto correct to add frozen string literal to all files
...
This is an unsafe auto corection, we will need to trust our build here
2021-06-17 23:07:26 +01:00
Matt-Yorkley
f5c08baabb
Use OrderContents in LineItemsController and move enterprise fee updating logic
2021-06-04 17:10:50 +01:00
Jean-Baptiste Bellet
6842cbfda4
Force content type to "text/html"
...
- Force the content type to be `text/html` (instead of `application/json`)
2021-05-25 15:30:21 +02:00
Matt-Yorkley
2e248744c0
Merge pull request #7520 from Matt-Yorkley/shipment-controller
...
Shipment controller: test coverage and improvements
2021-05-13 20:26:51 +02:00
Andy Brett
a7331efd67
Merge pull request #7477 from luisramos0/require_dependency
...
Remove require_dependency or use require
2021-05-05 13:24:19 -07:00
Matt-Yorkley
2eb17dbbd1
Remove currency from OrderContents
...
The currency argument here is not actually used anywhere. The related conditional logic is also not covered in any tests.
2021-05-01 11:10:51 +01:00
Matt-Yorkley
e290c128bf
Fix error in Api::ShipmentController#update with :unlock parameter
...
This is a generic issue caused by a clash between state machines trying to define (or failing to define) the #open method on adjustments as part of their state changes interface. This method is already defined in Object. For more details, see: bb42e33bf7/lib/state_machines/machine.rb (L323-L350)
2021-04-30 14:13:22 +01:00
Matt-Yorkley
b843b871f6
Ensure order totals and payment/shipment states are correct when changing shipping method on a completed order.
...
This used to happen via an after_save callback in Shipment, which called `order.update!`. That has recently been removed. After changing a shipment's selected shipping rate (shipping method), we need to ensure the order's totals and states are updated. We don't need to update all of the order's adjustments though (see previous commit).
FYI Spree handled this issue like this: 24388485ed , but there are lots of things about that commit that are clearly awful, like: params handling in a model, duplication of Order::Updater logic across the codebase, the Shipment class having responsiblity for knowing which things need to be updated on the order, etc. The result is ultimately the same as what we're doing here though.
2021-04-30 12:57:01 +01:00
Matt-Yorkley
045ce73c83
Simplify shipment controller params
2021-04-30 12:20:47 +01:00
Luis Ramos
f357c3ff30
Remove require_dependency or use require
...
See here https://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#require-dependency
2021-04-23 19:20:25 +01:00
Cillian O'Ruanaidh
c41476423b
Merge latest master into julesemmac/6584-map-location-confirm and resolve conflict in api/enterprises_controller.rb
2021-04-22 19:43:49 +01:00
Matt-Yorkley
3f6fcf3350
Fix taxon error handling in Api::TaxonsController
...
Fixes:
Api::V0::TaxonsController as an admin cannot create a new taxon with invalid taxonomy_id
Failure/Error: expect(json_response["error"]).to eq("Invalid resource. Please fix errors and try again.")
expected: "Invalid resource. Please fix errors and try again."
got: nil
(compared using ==)
# ./spec/controllers/api/v0/taxons_controller_spec.rb:105:in `block (3 levels) in <top (required)>'
2021-04-13 16:54:31 -07:00
Andy Brett
c6be9deb9b
Merge pull request #7352 from Matt-Yorkley/dead-code-api-helper
...
Dead code: Spree::Api::ApiHelpers
2021-04-08 12:48:22 -07:00
Andy Brett
9b3628a4dd
Merge pull request #7299 from andrewpbrett/line-item-fees
...
Update fees after changing a line item
2021-04-08 07:26:34 -07:00
Matt-Yorkley
88df425b78
Remove Spree::Api::ApiHelpers
...
🔥
2021-04-08 12:53:17 +01:00
Maikel Linke
f0d5bf0ab5
Disallow changes of canceled order
2021-04-08 09:24:39 +10:00
Andy Brett
38f5bfdca2
update fees after changing a line item
2021-03-31 14:17:10 -07:00
Andy Brett
d92510db56
fix some easy rubocop offenses
2021-03-27 11:21:18 -07:00