Matt-Yorkley
|
6f2035febe
|
Update (provisional) checkout actions boilerplate
|
2021-08-03 11:24:13 +02:00 |
|
Matt-Yorkley
|
2207aae679
|
Add strong params for checkout
We'll need to add more as we go
|
2021-08-03 11:24:08 +02:00 |
|
Matt-Yorkley
|
a32ca23ca5
|
Simplify routes and partials
|
2021-08-03 11:24:03 +02:00 |
|
Andy Brett
|
3d77ba49ac
|
pseudocode flow for steps
|
2021-07-26 15:47:36 +02:00 |
|
Andy Brett
|
939169c504
|
remove unused advance_to_state param
|
2021-07-26 15:47:36 +02:00 |
|
Jean-Baptiste Bellet
|
91c4beea0f
|
No need to add flash error for error
as we render error on each input with error
|
2021-07-26 15:47:36 +02:00 |
|
Jean-Baptiste Bellet
|
151a6fd16b
|
Add first stimulus controllers to display elements
1. Introduce a stimulus toggle_controller
- controller: { "data-controller": "toggle" }
- action: { "data-action": "toggle#toggle" }
- show or not: { "data-toggle-show": true || false }
- targets: { "data-toggle-target": "content", style: "display: none" }
Display payment method price
2. States are populated via a new dependant_select_controller by stimulus.
Usage:
- controller : { "data-controller": "dependant-select", "data-dependant-select-options-value": [ [1: ["option", "for", "1"], [2: ["option", "for", "2"] ] }
- target (on the populating target): { "data-dependant-select-target": "select" }
- source and action (on the input that leads the dependant select): {"data-dependant-select-target": "source", "data-action": "dependant-select#handleSelectChange"}
Some improvements on readability
3. Populate ShippingMethod description thanks to "shippingmethod_controller"
+
- Add countries and states
|
2021-07-26 15:47:36 +02:00 |
|
Jean-Baptiste Bellet
|
200ced62fb
|
Load shipping methods in the Controller
needed to populate the form
|
2021-07-26 15:47:36 +02:00 |
|
Andy Brett
|
6866cecdfa
|
start with a straight copy of CheckoutController - WIP!
|
2021-07-26 15:47:36 +02:00 |
|
Andy Brett
|
0ea968a900
|
add redirection to correct step
|
2021-07-26 15:47:36 +02:00 |
|
Jean-Baptiste Bellet
|
87a0a5846d
|
WIP; only advance order to delivery state
Use the hidden_field_tag rails helper and move it
|
2021-07-26 15:47:36 +02:00 |
|
Andy Brett
|
af79969d96
|
add SplitCheckoutController and conditional route
|
2021-07-26 15:47:36 +02:00 |
|