Jean-Baptiste Bellet
333dc11fc1
Manage form params vs. URL params. And replace state with params.
...
"One needs to understand what the source of the params in a reflex is. And there are two sources:
the closest form
the url of the currently displayed page"
Source: https://github.com/stimulusreflex/stimulus_reflex/issues/290#issuecomment-683334963
2023-07-19 14:58:39 +02:00
Jean-Baptiste Bellet
c786f300ca
Have a tiny url state management by using replace_state of cable_ready
2023-07-19 14:58:39 +02:00
Filipe
843bcaa500
Merge pull request #11184 from rioug/11183-fix-delete-voucher-tax-excl-price
...
[vouchers] fix delete voucher when tax excluded from price
2023-07-19 11:24:25 +01:00
Filipe
40db81f056
Merge pull request #11150 from macanudo527/fix_admin_class_size
...
Fix Metrics/ClassSize
2023-07-18 19:10:03 +01:00
Filipe
15282f9738
Merge pull request #11115 from abdellani/fix-enterprise-users-should-have-access-to-invoices
...
authorize enterprise users to access invoices page
2023-07-18 16:42:00 +01:00
Neal Chambers
8fc0a20249
Add Additional Test for Model Creation
2023-07-18 08:17:34 +09:00
Neal Chambers
521af70959
Add Strong Params to Enterprise Fees Form
2023-07-18 08:17:34 +09:00
Neal Chambers
fb1ae855c2
Fix Metrics/ClassLength
2023-07-18 08:17:34 +09:00
Gaetan Craig-Riou
dc711bde78
Fix voucher adjustment delete
...
When using a voucher with tax not incluced in price, we need to delete
both the voucher adjustment and the tax adjustment
2023-07-14 13:37:45 +10:00
Filipe
448d5ea017
Merge pull request #11135 from Matt-Yorkley/vouchers
...
Vouchers part 2
2023-07-13 12:50:32 +01:00
Maikel Linke
11a4cd8613
Protect invoicing against unauthorized use
...
This could be optimised for performance but this was the simplest way
and we can work on it if performance becomes a problem.
2023-07-06 17:36:13 +01:00
Maikel Linke
15c30246a5
Allow to see only invoices of managed enterprises
2023-07-06 17:36:13 +01:00
Matt-Yorkley
42a3087cdb
Remove :available_on attribute from Product class
2023-07-06 14:36:35 +01:00
David Cook
05a22b80bc
Merge pull request #11123 from dacook/buu-products-table
...
[admin_style_v3] Products table with variants
2023-07-06 09:37:31 +10:00
Matt-Yorkley
f7912a2240
Fix CSS/layout issues
2023-07-04 13:13:05 +01:00
Matt-Yorkley
672400192f
Update use of params
2023-07-04 13:13:05 +01:00
Matt-Yorkley
37a4c73a12
Fix rubocop complaint
2023-07-04 13:13:05 +01:00
Matt-Yorkley
de97e69e7d
Show/hide payment methods if voucher changes order total to zero
2023-07-04 13:13:05 +01:00
Matt-Yorkley
55bce9f1b2
Remove @voucher_adjustment instance variable
2023-07-04 13:13:05 +01:00
Matt-Yorkley
7a0b83076b
Move loading of saved cards out of checkout concern
2023-07-04 13:13:05 +01:00
Matt-Yorkley
bd29a9acde
Introduce "zero priced orders" to checkout UI and order state flow
2023-07-04 13:13:05 +01:00
Matt-Yorkley
d7950617ec
Drop superfluous method
2023-07-04 13:13:05 +01:00
Matt-Yorkley
9e5061fc31
Move voucher processing out of checkout controller
2023-07-04 13:13:05 +01:00
Matt-Yorkley
75e6ccd580
Simplify voucher controller
2023-07-03 11:03:05 +01:00
Matt-Yorkley
fefa9288a4
Remove :permalink attribute from Product
2023-06-30 11:37:57 +01:00
Filipe
b175793b91
Merge pull request #10704 from abdellani/hide-customers-with-no-completed-orders
...
Hide users with no completed orders from a hub's customers list
2023-06-30 10:56:56 +01:00
Filipe
ba99f85f5c
Merge pull request #10914 from abdellani/fix-stripe-sca-failure
...
redirect user to payment when the card doesn't have enough credit
2023-06-28 19:58:18 +01:00
Matt-Yorkley
a0a1f8f910
Merge pull request #11002 from openfoodfoundation/voucher-prep
...
Vouchers part 1
2023-06-28 11:30:12 +01:00
David Cook
841192fb96
Add new products page
...
Hidden behind admin_style_v3 feature toggle.
2023-06-28 09:59:57 +10:00
Mohamed ABDELLANI
e678c6149f
extract payment_faild from processing_failed
2023-06-27 09:26:26 +01:00
Mohamed ABDELLANI
4cca823a66
redirect user to payment when the card doesn't have enough credit
2023-06-27 09:14:48 +01:00
Maikel
014fb69d4b
Merge pull request #10964 from macanudo527/fix_linelength_bundle1
...
Fix Layout/LineLength - Bundle 1
2023-06-26 12:10:39 +10:00
Maikel
a7915b8089
Merge pull request #10849 from mkllnk/report-cable
...
Show "loading" screen for background reports and display when ready
2023-06-26 10:25:48 +10:00
Maikel Linke
ff588cec40
Restore line item ordering
...
The line item sorting by id has been replaced by sorting by completed_at
time: ccb183d60b
While that's a good idea, the query param to order was only defined in
the client Javascript and there was no default ordering. Line items also
get their completed_at date from the order. So it's the same for all
items of the same order and the ordering with that group of line items
was random.
Now we are adding an order in addition. Items are first sorted by date
and then by id if there's any ambiguity.
2023-06-25 19:24:58 +02:00
David Cook
6240baec0d
Update app/controllers/admin/enterprises_controller.rb
...
Co-authored-by: Gaetan Craig-Riou <40413322+rioug@users.noreply.github.com >
2023-06-23 16:18:45 +09:00
Maikel
e065910d2d
Merge pull request #10939 from Matt-Yorkley/master-variants
...
Remove master variants
2023-06-23 13:42:58 +10:00
Neal Chambers
1e4034534c
Fix Layout/LineLength
2023-06-23 09:08:04 +09:00
Matt-Yorkley
c6ec13443e
Drop next_invoice_number method from Spree::Order
2023-06-18 21:03:13 +02:00
Matt-Yorkley
d3a31bd0bd
Rename @invoice_presenter instance variable to @order in invoice templates
2023-06-18 21:03:13 +02:00
Mohamed ABDELLANI
0ed7599267
extract methods related to invoices from the order model to the OrderInvoiceComparator
2023-06-18 21:03:13 +02:00
Mohamed ABDELLANI
d86173c509
add feature toggle
...
seperate the invoice templates that rely on presenters from the old ones.
2023-06-18 21:03:13 +02:00
Mohamed ABDELLANI
0fbf88190e
Generate invoice model
...
There are three main components:
1. The invoice model
2. order serializers: serialize the order for the invoice
3. data presenters: the object that will be use to access the order's serialize data
2023-06-18 21:03:13 +02:00
Matt-Yorkley
ced60d4382
Remove superfluous method from products controller
2023-06-16 21:23:44 +01:00
Matt-Yorkley
1daab8994d
Remove is_master and not_master scopes
2023-06-16 21:23:44 +01:00
Matt-Yorkley
8247dce2dc
Improve validation feedback on new variant page and add test coverage
2023-06-16 21:23:44 +01:00
Matt-Yorkley
3ef7d2c9ff
Remove master variant from product
2023-06-16 21:23:44 +01:00
Matt-Yorkley
7dc1091bc2
Migrate product image from master variant to product
2023-06-16 21:23:44 +01:00
Matt-Yorkley
1b06c20197
Stop using master variant as a potential store for prices
2023-06-16 21:21:40 +01:00
David Cook
d195882645
Use builtin Rails method
2023-06-15 15:26:22 +10:00
Maikel Linke
75cce8bc19
Simplify customer code
...
The API endpoint merges the created_manually flag in the params already.
No need to write it separately.
2023-06-15 12:02:45 +10:00