Filipe
9966b5b33c
Merge pull request #8565 from jibees/8171-group-by-imperial-unit
...
Handle imperial units in the Bulk Order Management interface
2022-02-21 14:47:38 +00:00
Matt-Yorkley
81f5755e3d
Add tests for tabs_controller
2022-01-31 16:34:35 +00:00
Jean-Baptiste Bellet
f6e64f3a3c
Update the tests as well
2022-01-10 11:27:32 +01:00
Jean-Baptiste Bellet
515e2cfc51
Multiply by unit_value as sumOfUnitValues is now scaled
2022-01-07 10:32:47 +01:00
Jean-Baptiste Bellet
b746eacd11
Both sumUnitValues and sumMaxUnitValues should handle imperial units
2022-01-07 10:32:46 +01:00
Jean-Baptiste Bellet
d4435b5f10
Update variant_unit_manager_spec.js.coffee
2022-01-07 10:32:46 +01:00
Jean-Baptiste Bellet
9cf5645478
Add a spec to handle imperial units
2022-01-07 10:32:46 +01:00
Jean-Baptiste Bellet
7b2a9df326
Handle unitsVariant when calling formattedValueWithUnitName
...
- unitsVariant was unread but is necessary to compute the unit_name thanks to `VariantUnitManager.getUnitName()`
2022-01-07 10:32:46 +01:00
Jean-Baptiste Bellet
3922ffa6a9
Handle imperial units for VariantUnitManager
2022-01-07 10:32:45 +01:00
SuprajaR
f9a1b17709
asserted the confirmation msg in test
2022-01-04 00:10:38 +05:30
Filipe
7560b4e056
Merge pull request #8482 from jibees/6689-search-city-and-state-name
...
Search enterprises through name + city and state_name
2021-12-23 21:33:06 +00:00
Matt-Yorkley
b4dab46cf8
Remove unused code for changing required attributes
2021-12-20 18:36:28 +00: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
Jean-Baptiste Bellet
7b6aa99de2
Handle when input is already checked
...
ie. user hasn't click on anything
2021-12-20 15:34:58 +01:00
Filipe
fd94f26765
Merge pull request #8557 from Matt-Yorkley/card-brand-formatting
...
Credit card brand formatting
2021-12-15 20:18:21 +00:00
Matt-Yorkley
d85597fe4c
Rename stripe cards controller
2021-12-07 16:29:25 +00:00
Jean-Baptiste Bellet
fd5ad7566a
Disabled all form elements that should not be sent to the controller
2021-12-07 16:27:22 +00:00
Jean-Baptiste Bellet
7437c6a6d7
Add a stripe controller that show/hide stripe form if saved cards or not
2021-12-07 16:27:22 +00:00
Jean-Baptiste Bellet
5f3ea6accb
Do not init by hidden all the container
...
that allow to init the content without clicking on anything
2021-12-07 16:27:22 +00:00
Jean-Baptiste Bellet
7159cc3ff1
Handle required attribute on input for PaymentMethod controller
...
This is done for one reason : do not submit form with required attribute on input that are actually hidden ; this is not handle correctly by browsers.
This idea here is to add/remove the required attribute on each input if the form is visible or not.
2021-12-07 16:27:22 +00:00
Jean-Baptiste Bellet
3063b041d1
Change the paymentmethod controller to handle both desc and form
...
Add tests as well
Update _payment.html.haml
Update _payment.html.haml
2021-12-07 16:23:39 +00:00
Matt-Yorkley
4cdb892c75
Refactor formatting of credit card brand names and reformat automatically when saving
...
This little bit of "translation" between what we might receive as input and what ActiveMerchant requires is important, but currently the responsibility for this job is spread all over the code base. It can now just live in the CreditCard model (in one place) and doesn't need to be duplicated anywhere else (like several different places in frontend Javascript!)
2021-12-02 16:22:52 +00:00
Jean-Baptiste Bellet
3df304c9d6
Search and match through name + city and state_name
...
- Rename enterpriseMatchesNameQueryFilter as well to enterpriseMatchesQueryFilter
- Update tests as well
2021-11-12 15:57:28 +01:00
Jean-Baptiste Bellet
786b198f4d
Create an updateinput controller
...
- that update the targets input value to the value stored in data attribute
- Add tests
2021-10-06 15:06:56 +05:30
Jean-Baptiste Bellet
ba09618374
Avoid rounded with float numbers errors with javascript
...
0.7/0.001 = 699.9999999999999
Use Math.round() to avoid this.
2021-09-14 10:45:31 +02:00
Jean-Baptiste Bellet
7cdf09322c
First test for toggle_controller
2021-09-03 14:14:25 +02:00
Matt-Yorkley
5fb782aeba
Update $qProvider configuration
...
The default logic for how rejected promises are handled has changed slightly. This reinstates the previous default behaviour.
2021-08-10 16:22:47 +01:00
Matt-Yorkley
f5a05bf0d8
Remove angular-backstretch
2021-08-02 20:58:10 +01:00
Jean-Baptiste Bellet
2116779527
Add order cycle coordinator to the list of enterprises with fees
...
- Thus, coordinator can choose to add its own fee for a specific supplier
2021-07-28 11:40:57 +02:00
Nihal Mohammed
edca260af4
Hide shipped orders from BOM and update specs
2021-06-24 18:26:39 +05:30
Andy Brett
ca7b1f047b
Merge pull request #7780 from apricot12/new_payment_method_html_bug
...
Fix HTML bug on new payment method page
2021-06-23 08:58:45 -07:00
Pau Pérez Fabregat
b500486f6b
Merge pull request #7211 from jibees/4207-add-query-params-in-url
...
Orders list : save filters params
2021-06-18 11:19:26 +02:00
Pau Pérez Fabregat
ef724d2de8
Merge pull request #7758 from jibees/7710-manage-comma-as-decimal-separator-in-unit-value-field
...
[UnitPrice] Manage comma as decimal separator in unit value field
2021-06-17 11:46:22 +02:00
Nihal Mohammed
522a7384e7
Fix HTML bug on new payment method page and update providers_controller spec
2021-06-12 01:47:08 +05:30
Jean-Baptiste Bellet
db8f8a2675
Create internal methods with regexp test
...
- Make it more easily readable and add unit tests
2021-06-11 10:40:02 +02:00
Jean-Baptiste Bellet
178c0a441b
Move unlocalize_currency filter to a PriceParser service
...
- It's no longer a filter but more a service: it's therefore more logic.
2021-06-11 10:01:19 +02:00
Jean-Baptiste Bellet
d3c2158121
Handle comma as decimal separator in the unit value field
...
- Add comma as a decimal separator in the regexp
- Do not use parseFloat but our `unlocalizeCurrencyFilter` which is more tolerant
2021-06-08 09:51:30 +02:00
Jean-Baptiste Bellet
0cb2739139
Handle case when price is not a number
...
And return a `null` if so.
2021-06-08 09:46:24 +02:00
Jean-Baptiste Bellet
3ebba9502a
Handle more cases with decimal/thousands separator
...
- ',' or '.' can be used as decimal separator (defined in the application configuration)
- Remove thousands separator if it's detected as so (use regexp to match)
2021-06-07 16:53:20 +02:00
Matt-Yorkley
dc6be6f06b
Don't resubmit the whole cart contents for no reason.
...
There's a couple of places where this was causing a cart update submission where it wasn't needed, eg the items had not actually changed. The conditional here was designed to stop that from happening, but it was actually passing every time (the conditional logic was not actually catching the case it was supposed to).
This is really expensive!
2021-06-04 17:10:50 +01:00
Jean-Baptiste Bellet
f73e5c74fb
Handle null/undefined cases for price
2021-06-01 11:40:02 +02:00
Jean-Baptiste Bellet
7008b5ec7b
Make a more generic solution: KeyValueMapStore
...
- As QueryPersistence, stored in the localStorage too but it is now more generic and has nothing to do with Query
- Add some js unit testing
2021-05-31 10:44:21 +02:00
Jean-Baptiste Bellet
dd47430f19
Improve unlocalizeCurrency filter to handle many cases
...
- Complete the unit test to handle all these cases.
2021-05-25 13:14:53 +02:00
Jean-Baptiste Bellet
d8042b25e4
Add test for unlocalize currency filter
...
- Test that comma is well handle in both cases where comma is the default decimal separator or not.
2021-05-24 10:55:05 +02:00
Jean-Baptiste Bellet
f97e71d054
Add test for decimal price separated by point or comma
2021-05-24 10:55:05 +02:00
Guido Oliveira
84285ff985
prevent deleting only item in confirmed order
2021-04-28 17:37:28 -03:00
Matt-Yorkley
80d43c714d
Remove TagRule::DiscountOrder
...
This class was removed from the UI in 2016 and hasn't been used since...
2021-04-08 12:37:17 +01:00
Andy Brett
5a19a14042
rename to v0
2021-03-27 11:21:18 -07:00
Jean-Baptiste Bellet
d8772752da
Factorize Unit Price into a single method: displayableUnitPrice
...
- Code is at a single place
- No need to import `localizeCurrencyFilter` into Controllers that required unit_prices
- Add `currencyconfig` into unit_prices_spec as it's now dependant to localizeCurrencyFilter
2021-03-18 09:48:42 +01:00
Jean-Baptiste Bellet
c084299b72
Add tests in imperial weight system
2021-03-18 09:48:42 +01:00