Maikel Linke
f3c60148c1
Simplify filtering of Stripe
2026-01-09 16:54:25 +11:00
Maikel Linke
2e08c9c44e
Simplify with defined order of payment methods
2026-01-09 16:54:21 +11:00
Maikel Linke
93f2af7e7d
Lazy load payment method classes
...
This avoids any class reloading issues in dev, simplifies most of the
code path and opens up for refactoring.
The only reason we still load the class is to call `clean_name` on it
for the translation key. We can probably do better.
2026-01-09 16:54:02 +11:00
Maikel Linke
cb7a4b67ce
Replace custom lookup with default Rails feature
...
Rails renders an error when you try to supply an invalid value. Our code
is safe without an allow-list and the UX doesn't allow you to select an
invalid value.
2026-01-09 16:53:06 +11:00
Maikel Linke
41a8d06326
Remove duplicate definition of payment providers
2026-01-09 15:16:36 +11:00
Maikel Linke
a1bdfa0a20
Move list of payment methods to where it is used
2026-01-09 15:16:36 +11:00
David Rodríguez
6bd2f5af8d
Use Spree.t directly for translating the successfully_removed flash message
...
Since none of the current keys have a `%{resource}` parameter.
2025-11-26 12:18:06 +01:00
David Cook
8e5fac9fb3
Merge pull request #13632 from rioug/security-247-code-injection
...
[security] Fix potential code injection
2025-11-05 16:34:37 +11:00
Gaetan Craig-Riou
bd0db57768
Per review, more concise code
2025-11-03 15:58:27 +11:00
David Rodríguez
4c6d894bc0
Bump RuboCop to 1.86.6
...
There were a few changes needed:
* Plugins are now specified through `plugin:` config keyword.
* All plugin gems need to be specified explicitly in Gemfile since they
are no longer dependencies of plugins already specified explicitly.
* All plugin gems need to be updated in other to use the new APIs.
* One cop was renamed.
* New offenses safe to correct were corrected directly with `bundle exec
rubocop -a`.
* New offenses unsafe to correct were added to the TODO configuration
with `bundle exec rubocop --auto-gen-config --auto-gen-only-exclude
--exclude-limit 1400 --no-auto-gen-timestamp`.
2025-10-27 11:30:33 +01:00
Gaetan Craig-Riou
adb7563ccb
Fix possible code injection
...
It will fix this security issue :
https://github.com/openfoodfoundation/openfoodnetwork/security/code-scanning/247
2025-10-21 15:48:27 +11:00
Ahmed Ejaz
df4cf4b768
Fix specs
2025-07-27 07:58:04 +05:00
Ahmed Ejaz
0fa67c69fd
Remove bulk product update functionality
...
Removes the bulk product update feature and its associated components:
- Removes Angular-based bulk product editing controller and views
- Deletes bulk product API endpoints and related controller actions
- Removes product cloning and variant deletion functionality
- Removes associated JavaScript tests and specs
This appears to be part of a larger effort to modernize/simplify the product management interface, removing legacy Angular-based bulk editing in favor of a different approach.
2025-07-27 06:03:14 +05:00
Ahmed Ejaz
765ce68c11
Add order_id to order controller, variant autocomplete, and search parameters for improved order management
2025-06-21 16:19:31 +05:00
Ahmed Ejaz
8e8878e43a
Add search_variants_as parameter to variant search functionality
2025-06-21 16:19:31 +05:00
Filipe
3efa2832de
Merge pull request #13257 from ashishp91/13221-make-shipped-orders-uneditable
...
13221 - Don't allow shipped orders to be editable
2025-05-15 19:23:33 +01:00
cyrillefr
55ad9429db
Fixes variable number naming offenses in spree module
2025-05-08 09:24:28 +02:00
Ashish Gaur
5fc3fe03ee
13221 Add spec for checking flash error is shown when editing a shipped order
2025-05-05 20:37:59 +05:30
Ashish Gaur
8d96411741
13221 Fix rubocop issues
2025-05-05 20:03:47 +05:30
Ashish Gaur
c533111509
13221 Don't allow shipped orders to process update request
2025-05-05 20:03:47 +05:30
Carlos Chitty
d0c687650e
Autocorrect Style/HashEachMethods offenses
2025-04-29 15:16:34 -04:00
Carlos Chitty
63168086e7
Autocorrect Style/HashConversion offenses
2025-04-29 14:27:31 -04:00
piyush828-design
5e890bb361
Merge branch 'master' into pagy_upgrade
2025-04-24 17:46:39 +05:30
piyush828-design
3202d0ea81
fixed test failure
2025-04-16 18:24:32 +05:30
Ahmed Ejaz
d9308799b0
add ability search supplier products in orders
2025-04-13 21:35:55 +05:00
David Cook
9adf3a22af
Show only first 25 enterprises
...
I thought about reducing it further, but maybe people are used to having a large list. Let's see how this performs
2025-03-03 14:46:24 +01:00
Gaetan Craig-Riou
0ae855047d
Fix User controlled method execution
...
Add white list for the fire endpoint to limit which action can be taken.
Add specs for fire endpoint
2025-02-18 14:42:26 +11:00
Filipe
e2161660b3
Merge pull request #13090 from mkllnk/replace-spree-roles
...
Replace spree roles
2025-01-30 21:30:56 -06:00
Maikel Linke
d49cea5e3d
Use admin flag instead of user role
2025-01-22 14:59:49 +11:00
Maikel Linke
f8f6c80aa9
Remove unused helper module
...
SimpleCov says that it's not used. So let's see about that. If any
included helpers are used, we can bring them back individually.
2025-01-22 13:51:35 +11:00
Filipe
3c1dd10219
Merge pull request #13047 from mkllnk/spree-roles
...
Clarify that our only user role is "admin" and simplify code
2025-01-16 18:06:49 -06:00
Konrad
428eb465c0
Merge pull request #13009 from MrBowmanXD/dev
...
Added the :selected option with the default tax category #12989
2025-01-07 20:04:28 +01:00
Maikel Linke
a7140d1f60
Use only admin role, on demand
...
We are now creating the role on demand which removes the need for
seeding it as well.
2024-12-19 09:02:04 +11:00
Maikel Linke
88837b55b9
Amend backorder also when resuming order
2024-12-11 12:40:46 +11:00
Maikel Linke
9c0a15f431
Amend backorders on admin update orders
2024-12-11 12:40:46 +11:00
Maikel Linke
9ca1b48d2e
Move backorder amendment out of order callback
...
Triggering it for each order is inefficient when we cancel them in bulk.
The callback doesn't allow us to optimise this.
2024-12-11 12:40:46 +11:00
Maikel
de938f6f10
Merge pull request #12949 from rioug/12859-use-VINE-voucher
...
[City OFN Voucher] A shopper can use a VINE voucher
2024-12-03 14:04:44 +11:00
Manuel Gonçalves
d95bb7736a
Fixed the logic and moved the code to a helper file
2024-12-01 20:43:31 +00:00
Gaetan Craig-Riou
12cf62c2ff
Refactor, add OrderManagement::Order::Updater#update_voucher
...
Move the logic to update a voucher and associated order to
`OrderManagement`
2024-11-28 13:35:01 +01:00
Gaetan Craig-Riou
0569b30e0d
Refactor Vine related services
...
Move them under Vine module to keep the code nicely organised
2024-11-28 13:35:01 +01:00
Gaetan Craig-Riou
9f3da1af4f
Reddeem VINE voucher when firing "capture_and_complete_order"o
...
'Spree::Payment#capture_and_complete!' will try to complete the order,
so we want to redeem any VINE voucher associated with the order first.
2024-11-28 13:35:01 +01:00
Gaetan Craig-Riou
92c4cb9b7f
Redeem VINE voucher when creating a new payment
...
Creating a new payment will try to complete the order, so we want to
redeem any VINE voucher associated with the order first
2024-11-28 13:35:01 +01:00
Maikel Linke
0d8df5d2a8
Replace Bugsnag calls with Alert.raise
2024-11-21 15:58:55 +11:00
Gaetan Craig-Riou
eb66244b74
Fix Bugsnag call to notify
...
Make sure we add metadata as expected:
https://docs.bugsnag.com/platforms/ruby/rails/reporting-handled-errors/#add_metadata
2024-11-06 14:01:48 +11:00
Gaetan Craig-Riou
b461d499ad
Merge pull request #12914 from mkllnk/remove-stock-location-from-return-authorization
...
Remove StockLocation from ReturnAuthorization
2024-10-16 10:26:09 +11:00
Maikel Linke
a64aea4b9c
Remove StockLocation from ReturnAuthorization
...
We have only one default location and don't need it associated to
anything.
2024-10-15 13:36:57 +11:00
Gaetan Craig-Riou
9db417319d
Improve variant related validation when creating product
...
I disabled Metrics/AbcSize for ensure_standard_variant as I don't think
that's hard to understand the code. And utimately it will be removed
once product actually becomes optional.
2024-10-14 15:01:18 +11:00
Gaetan Craig-Riou
4ad6971121
Fix Bulk product edit system spec after rebase
2024-10-14 15:01:18 +11:00
David Cook
917079931e
Merge pull request #12778 from chahmedejaz/bugfix/12596-fix-annoying-oc-warning-display
...
[BUU] Fix Messy flash notifications on new products page
2024-08-16 10:29:43 +10:00
Ahmed Ejaz
46e54f48c9
12596: keep flash[:notice] check
2024-08-15 14:50:32 +05:00