Jean-Baptiste Bellet
8fec5f1464
Use mixins useRenderCustomer
2022-05-31 09:00:24 +02:00
Jean-Baptiste Bellet
39b7f56e6d
Use mixins useSearchCustomer
...
Prefer composition vs. inheritance
2022-05-31 08:57:11 +02:00
Jean-Baptiste Bellet
760de3b507
Do not set null value to select controller
2022-05-24 12:35:23 +02:00
Jean-Baptiste Bellet
5e27795a15
Special method to handle customer with no bill_address
2022-05-24 12:30:11 +02:00
Jean-Baptiste Bellet
ce058c6e36
Create a SelectCustomer controller
...
To be used in `/admin/orders/ORDER_ID/customer` page
- Fetch `/admin/search/customers.json?` with query as params
- Render each items response thanks to `renderOption()` method
- `onItemSelect()` is here to fill the associated form in the page
2022-05-24 12:30:00 +02:00
Jean-Baptiste Bellet
5018f824f5
Prepare tom-select controller to inherit others controllers
2022-05-24 12:30:00 +02:00
Jean-Baptiste Bellet
68cb8d9965
Formatting file
2022-05-24 12:30:00 +02:00
jibees
641df45fcd
Revert "When creating an order, and assigning a customer, fill all the customer inputs in the shipping/billing address form"
2022-05-24 09:50:18 +02:00
Rachel Arnould
5dfc3c7a62
Merge pull request #9151 from jibees/9140-fill-all-the-input-when-selecting-a-customer
...
When creating an order, and assigning a customer, fill all the customer inputs in the shipping/billing address form
2022-05-18 17:41:59 +02:00
Jean-Baptiste Bellet
c98d669b92
Create a SelectCustomer controller
...
To be used in `/admin/orders/ORDER_ID/customer` page
- Fetch `/admin/search/customers.json?` with query as params
- Render each items response thanks to `renderOption()` method
- `onItemSelect()` is here to fill the associated form in the page
2022-05-02 13:36:49 +02:00
Jean-Baptiste Bellet
11b224f805
Prepare tom-select controller to inherit others controllers
2022-05-02 13:33:57 +02:00
Jean-Baptiste Bellet
d7df714280
Formatting file
2022-04-29 10:36:53 +02:00
Jean-Baptiste Bellet
5fe8060ea6
Actually don't use requestSubmit() as it is not supported by Safari
...
https://caniuse.com/?search=requestSubmit
2022-04-27 15:43:05 +02:00
Jean-Baptiste Bellet
a8afe7fee3
Use requestSubmit() method for actually submit the form with event
...
... that could be catch by turbo (and then handled by cable_ready)
`this.catchFormSubmit` avoid infinite loop then
2022-04-27 15:43:05 +02:00
Cillian O'Ruanaidh
4162830bee
Switch help modals from angular templates to use ViewComponent and StimulusJs
2022-04-20 09:36:30 +10:00
Matt-Yorkley
be9156d40f
Refactor dependant-selector further and (conditionally) update TomSelect if present
...
I'm also introducing a convention here of adding a `private` comment to visually demarcate which methods are meant to be part of the public interface of the class and which aren't. The methods aren't *actually* private in any technical sense, it's just a bit of syntactic sugar to allow the intention to be communicated more clearly in the code's structure.
2022-04-05 18:56:51 +01:00
Matt-Yorkley
9bce2ca64c
Allow initializing with custom TomSelect configurations
2022-04-05 18:56:51 +01:00
Matt-Yorkley
5e3e8c32c3
Create a simple Stimulus controller and add basic styling
2022-04-05 18:56:51 +01:00
Filipe
be1c255067
Merge pull request #8892 from Matt-Yorkley/spree-login-routes
...
Fix issue with unconfirmed email messages
2022-03-28 13:38:17 +01:00
Matt-Yorkley
3effff8821
Show resent confirmation message in current tab
2022-02-18 09:42:49 +00:00
Cillian O'Ruanaidh
b43a68d717
Merge branch 'master' into remove-inline-advanced-settings-toggle-js
2022-02-04 12:24:17 +00:00
Cillian O'Ruanaidh
05756616dd
Add a remote-toggle controller that can toggle elements outside of its scope
...
This is instead of adding the :data-controller attribute to the div#wrapper because that will wrap pretty much all content on the admin pages.
Co-authored-by: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com >
2022-02-04 12:23:24 +00:00
Cillian O'Ruanaidh
d03b52a163
Revert "Replace inline JS for toggling order cycle advanced settings with StimulusJs controller"
...
This reverts commit 67ae2e72f3 .
2022-02-04 11:47:38 +00:00
Filipe
e403fc171d
Merge pull request #8808 from Matt-Yorkley/login-modal
...
Remove all Angular code from Login/Signup process
2022-02-03 19:36:44 +00:00
Filipe
c4751d7056
Merge pull request #8813 from Matt-Yorkley/split-checkout-address-state
...
Split checkout: fix loading of saved addresses
2022-02-03 19:06:35 +00:00
Matt-Yorkley
5eb88e020c
Extract/clarify methods in tabs_controller
2022-01-31 16:35:41 +00:00
Jean-Baptiste Bellet
293bc10dde
Create a sticky controller that handle the sticky position of an element
...
.. at the bottom
And then add the sticked class to this element if the element is actually sticked
2022-01-31 11:31:32 +01:00
Matt-Yorkley
5f02ab79d4
Adjust animation handling for show/hide
2022-01-31 10:02:09 +00:00
Matt-Yorkley
908a22bcb6
Don't repopulate states select on page load; breaks pre-filling selection from saved address
2022-01-30 11:33:31 +00:00
Matt-Yorkley
bf4428b688
Tidy up dependent-select controller
2022-01-30 11:33:31 +00:00
Matt-Yorkley
77d8e7da90
Use non-Angular login modal in /registration pages
2022-01-29 14:49:23 +00:00
Matt-Yorkley
a522e597e1
Add Matamo event
2022-01-29 14:49:23 +00:00
Matt-Yorkley
0577b46f3f
Create simpler non-Angular login modal
2022-01-29 14:49:23 +00:00
Matt-Yorkley
04da148af0
Decouple login modal opening from Angular
2022-01-29 10:08:51 +00:00
Cillian O'Ruanaidh
67ae2e72f3
Replace inline JS for toggling order cycle advanced settings with StimulusJs controller
...
Partially addresses #8699 .
This adjusts the Stimulus toggle controller so you can toggle content in both directions via a single element. This is in addition to the previous behaviour for toggling via multiple elements like radio buttons when each element always toggles in one direction only.
If a toggle element contains a chevron icon this will automatically toggle the direction of that icon too.
Note, in order to not have to re-implement the animation provided by the slideToggle() function in standard JavaScript, this just switches the style :display between 'none' and 'block' so it is not as smooth. Perhaps it could be made more smooth later with a CSS transition.
2022-01-28 16:19:36 +00:00
Filipe
54083ea803
Merge pull request #8738 from jibees/add-locale-to-stripe-elements
...
Add locale to stripe elements options to display stripe error messages in globale interface chosen language
2022-01-26 19:01:37 +00:00
Matt-Yorkley
21ed136e00
Enable opening login modal via broadcasted DOM Event
2022-01-19 13:14:10 +00:00
Matt-Yorkley
8ce27bed86
Move guest checkout handling to the frontend
2022-01-19 13:14:10 +00:00
Jean-Baptiste Bellet
c22f3ec1db
Add locale to stripe elements options to display messages in right language
...
List of supported language by stripe elements:
https://stripe.com/docs/js/appendix/supported_locales
2022-01-17 15:10:51 +01:00
Matt-Yorkley
dd23e3d38a
Simplify payment method controller
2021-12-20 18:47:22 +00:00
Matt-Yorkley
b4dab46cf8
Remove unused code for changing required attributes
2021-12-20 18:36:28 +00:00
Matt-Yorkley
723d6489cd
Extract initSelectedCard()
2021-12-20 18:36:26 +00:00
Matt-Yorkley
9525e353a3
Don't try to select a card if there is no select element
...
This error was being thrown when the user had no cards saved:
```
TypeError: stripeCardsController is null
```
2021-12-20 18:36:09 +00:00
Matt-Yorkley
a64f654697
Don't try to select a card if there is no selectTarget
...
This error was being thrown when the user had no cards saved:
```
Error: Missing target element "stripe-cards.select"
```
2021-12-20 15:41:22 +00:00
Matt-Yorkley
f18fc3c2f3
Implement disconnect() to tidy up (remove) event listeners from the DOM when finished
2021-12-20 15:29:52 +00:00
Matt-Yorkley
d58f5aa25d
Move initialization to initialize()
2021-12-20 15:29:52 +00:00
Matt-Yorkley
33c156bb55
Extract (arrow) functions for callbacks used by event listeners and reduce variable assignments
2021-12-20 15:29:52 +00:00
Matt-Yorkley
24c051bad3
Simplify stripe selected check
2021-12-20 15:21:13 +00:00
Jean-Baptiste Bellet
2c5667ef56
Initialize stripe-cards controller when selecting a payment method
2021-12-20 15:34:58 +01:00
Jean-Baptiste Bellet
d4ec075dfc
Disabled stripe-cards input if a already registred card is select
...
And then re-enabled it, if use decide to register a new card
2021-12-20 15:34:58 +01:00