Rachel Arnould
2a7e8816c0
Merge pull request #13834 from mkllnk/pay-methods
...
Simplify code listing available payment method types
2026-01-23 22:52:29 +01:00
David Cook
feed223ab4
Merge pull request #13528 from dacook/vine-expiry-message-13495
...
[VINE] Show helpful message if voucher expired
2026-01-19 09:20:18 +11:00
David Cook
368da19993
Display more specific invalid_voucher message to customer
...
It was implemented with error code 409 in https://github.com/openfoodfoundation/vine/pull/112
2026-01-12 17:14:57 +11:00
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
Filipe
c73f28b434
Merge pull request #13815 from mkllnk/secrets
...
Replace deprecated Rails secrets with credentials
2026-01-08 18:46:33 +00:00
Filipe
d0f48687e2
Merge pull request #13777 from rioug/13481-webhook-payment
...
Payment status change webhook
2026-01-08 11:26:41 +00:00
Filipe
25063d2c4d
Merge pull request #13649 from deivid-rodriguez/fix-removal-flash-message-translations
...
Improve translations of some flash messages
2026-01-07 16:33:34 +00:00
Maikel Linke
e91fab5702
Remove legacy config for secret key
2025-12-19 14:22:25 +11:00
Maikel Linke
e09853af0c
Replace deprecated Rails secrets
...
Use new credentials interface.
2025-12-19 13:28:05 +11:00
Filipe
ce46115139
Merge pull request #13648 from deivid-rodriguez/improve-enterprise-removal
...
Improve enterprise removal
2025-12-15 16:54:05 +00:00
Ahmed Ejaz
6b78f8b855
Merge pull request #13804 from rioug/13802-revert-enbling-variant-tag-no-inventory
...
[Inventory] display inventory link for user who manage enterprises with inventory and enterprises without inventory
2025-12-13 01:13:34 +05:00
Maikel Linke
0dabca583f
Set stronger secret password for managers
...
And avoid depending on Devise for this.
2025-12-12 15:17:57 +11:00
Gaetan Craig-Riou
bcf4507795
Only show hub with inventory enabled
2025-12-12 13:04:44 +11:00
Maikel Linke
1973e36634
Extract token and HTTP layer for re-use
...
Calling a webhook as a platform and fetching enterprise data will have
the same auth.
2025-12-10 16:24:53 +11:00
Gaetan Craig-Riou
d7505bcef4
Add Payments::WebhookPayload to manage payload data
...
It includes test data so any change in the payload should not affect
the test webhook enpoint functionality
2025-12-10 10:28:12 +11:00
Gaetan Craig-Riou
5e4df41ec8
Add button to send test data to endpoint
...
It will allow a user to easily test the endpoint
2025-12-10 10:28:12 +11:00
Gaetan Craig-Riou
d6ef56af6e
Fix existing code to support webhook_type
2025-12-10 10:28:11 +11:00
Filipe
20107986a6
Merge pull request #13725 from rioug/13642-disable-inventory-not-using
...
[Variant Tags] Enable variant tag for enterprise with no inventory
2025-12-08 20:38:14 +00:00
David Rodríguez
c526e72539
Improve enterprise removal (failure case)
...
Make sure failure to delete due to dependent objects is handled through
activemodel errors and not by rescuing
`ActiveRecord::DeleteRestrictionError` exceptions.
Previously we would display two alert prompts, and we would weirdly
display the content of our 500 error page on top of the screen.
Now, we display a flash error message explaining the reason to fail to
remove it.
2025-11-27 19:10:15 +01:00
David Rodríguez
6aa7ef3c21
Improve enterprise removal (success case)
...
Make enterprise removal use turbo, which provides the following
benefits:
* More responsive removal since there's no full page reload.
* A success flash message (previously nothing was displayed).
* No double alert prompt.
It also goes in the direction of removing mrujs in favor of turbo.
2025-11-27 19:09:35 +01:00
David Rodríguez
bf0e5c0d44
Let "Tag Rule" and "Voucher" be translated in flash messages
2025-11-26 12:18:06 +01: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 Rodríguez
7bf54088a6
Use Spree.t directly for translating the not_found message
...
Since none of the current keys interpolate a `%{resource}` parameter.
2025-11-26 12:18:06 +01:00
Filipe
dddc945c42
Merge pull request #13679 from deivid-rodriguez/customer-edition
...
Improve `/admin/customers` form handling
2025-11-21 10:51:55 +00:00
Filipe
12c0363b7e
Merge pull request #13716 from chahmedejaz/bugfix/13554-sorting-on-demand-products
...
"On hand" value influences sorting of "on demand" products/variants
2025-11-21 10:05:44 +00:00
Gaetan Craig-Riou
acfe180e1d
Fix check inventory enabled
...
Inventory cannot be enabled if variant tag is also enabled
Re generated the rubocop todo to account for Product::Importer, it has
too many line but it's temporary. Once the inventory is removed it won't
be an issue anymore
2025-11-18 13:56:46 +11:00
Filipe
d9e3076a3b
Merge pull request #13654 from pacodelaluna/check-enterprise-image-logic
...
Improve enterprise images-related logic
2025-11-14 18:15:50 +00:00
Filipe
3e02a03312
Merge pull request #13650 from rioug/13539-update-variant-multi-producer
...
Fix update multi producer products
2025-11-14 16:56:16 +00:00
Ahmed Ejaz
763655f0e5
Enhance product sorting for On-Demand items and add backorderable name support
2025-11-14 06:04:32 +05:00
David Rodríguez
e990e5ffd5
Don't show flash messages in customer edition form
...
They don't actually show up when the customer is saved, but the next
time the page is reloaded. We already have the save bar for the same
purpose so it's not necessary.
2025-11-13 08:37:52 +01:00
Gaetan Craig-Riou
ab443fa50f
Refactor the clone template to use local variable
...
and add define locals on the template
2025-11-10 16:29:27 +11:00
Gaetan Craig-Riou
25d55fec24
Filter out variant the user is not allowed to update
...
With a product with mutiple variant, we can end in a scenario where a
user sees variant associated to producer it doesn't have permission for.
This prevents the user from updating any variant. This fix filter out
variant a user shoudn't be seeing
2025-11-10 16:29:27 +11:00
Maikel
587f76415b
Merge pull request #13656 from pacodelaluna/replace-alias-attribute-with-alias-method
...
Replace alias_attribute with alias_method
2025-11-10 11:50:33 +11:00
Rachel Arnould
94bda6d0f8
Merge pull request #13592 from rioug/13266-tag-variant-tag-rule
...
[Variant tags] Add tag rules for variant
2025-11-07 14:14:50 +01:00
Filipe
95ad87d840
Merge pull request #13666 from chahmedejaz/bugfix/13519-order-disappear-from-orders-page
...
Order lines are deleted when one tries to capture a payment after order cycle is closed
2025-11-06 13:07:36 +00: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
Ahmed Ejaz
913dded766
Refactor order cycle handling to simplify closed cycle checks and improve redirection messaging
2025-11-05 02:50:01 +05:00
François Turbelin
b2d7d797d9
Use wrap_parameters to handle address params on Customer v1 API
2025-11-03 11:35:39 +01:00
François Turbelin
e385b9f708
Revert "Use customer-nested params for Customer v1 API writing operations"
...
This reverts commit cf4cd311b3 .
2025-11-03 10:32:26 +01:00
Gaetan Craig-Riou
bd0db57768
Per review, more concise code
2025-11-03 15:58:27 +11:00
Gaetan Craig-Riou
bb8ecccc31
Fix variant tag rules endpoint
...
It now returns tag rules filtered on the preferred variant tags and not
the prefered customer tags
2025-11-03 15:50:12 +11:00
Gaetan Craig-Riou
59340c7cff
Per review, remove unnecessary new translation
2025-11-03 14:25:48 +11:00
Gaetan Craig-Riou
07a3e83dc6
Fix enterprise specs
...
Plus small refactor
2025-11-03 14:25:48 +11:00
Gaetan Craig-Riou
3bb9eb9765
Add endpoint to provide autocomplete tag for variant
...
It return a list of available tags and number of related rules, based on
the given enterprise and a partial match on the given tag
2025-11-03 14:25:05 +11:00
Gaetan Craig-Riou
c38c8bcff2
Pass the variant_tag_enbabled options to relevant services
...
Plus add integration testing for variant tag rule filtering.
2025-11-03 14:25:05 +11:00