Cillian O'Ruanaidh
7e40ad39cb
Bring back select all checkboxes on order cycle checkout options form.
2022-09-30 13:13:39 +01:00
Cillian O'Ruanaidh
4b0b4ad991
Revert "Use a more simple layout on the order cycle checkout options form"
...
This reverts commit 0dddaa6c2b9f1925adca6ff8deac8181691ae119.
2022-09-30 13:13:39 +01:00
Cillian O'Ruanaidh
8e47949260
Check 'Select all' checkboxes on page load if all its checkboxes are checked
...
This means the code to set the initial value in the view template isn't needed.
2022-09-30 13:13:39 +01:00
Cillian O'Ruanaidh
0673f9a5ae
Use a more simple layout on the order cycle checkout options form
...
Before there was a row for each distributor and a 'shared' row for shipping methods which were shared among more than one distributor. This layout displays a single list of shipping methods with the distributor or distributors it belongs to beside it as suggested by @lin-d-hop
2022-09-30 13:13:39 +01:00
Rachel Arnould
e98d4af630
Merge pull request #9659 from saunmanoj888/fix-bulk-product-update-unit-value
...
Allow to change unit value for numbers with a comma separator on bulk product update
2022-09-21 13:04:08 +02:00
saunmanoj888
498d003684
Add unit specs for the js changes for unit_value
2022-09-13 23:28:27 +05:30
binarygit
90f4b1328b
Remove angular from shipping methods tab in enterprise/edit
2022-09-13 15:20:33 +05:45
Jean-Baptiste Bellet
d53b2b94b9
When creating new product via /admin/products/new use BigDecimal
...
to avoid bad rounded multiplication
example here:
700*0.001 = 0.7000000000000001
+ update specs as well
2022-09-07 09:17:46 +02:00
binarygit
8861b6d077
Replace permalinks angular ctrl with stimulus
2022-08-31 10:06:51 +05:45
binarygit
79ba223e12
Delete angular code for side_menu
2022-08-10 15:14:15 +05:45
binarygit
e18a242b90
Render admin/enterprises/<name>/edit page using stimulus
2022-08-10 15:08:59 +05:45
Filipe
2f550725e3
Merge pull request #9368 from jibees/9178-add-note-on-order
...
Admin, Edit order: Can add note on order
2022-07-08 12:13:18 +01:00
Jean-Baptiste Bellet
b2a0310e6f
Handle the case when errors is a string
2022-07-05 15:48:31 +02:00
Jean-Baptiste Bellet
de8c71d098
Create a controller that handle a counter for an input text
2022-07-05 10:09:20 +02:00
Jean-Baptiste Bellet
a68f9a71fb
When items quantities, update sumUnitValues() and sumMaxUnitValues()
...
by summing only `quantity` and `max_quantity`
+ update the specs as well
Co-Authored-By: Maikel <maikel@email.org.au >
2022-04-27 11:21:47 +02:00
Jean-Baptiste Bellet
a4afeeaa3d
When BOM is 'item', do not update sumOfUnitValues with scale
...
since scale is always `1`, but return a value
+ update tests as well
2022-04-25 15:53:38 +02:00
Jean-Baptiste Bellet
3553cc0d9f
When it's items scale is '1'
...
update tests as well
2022-04-25 15:51:38 +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
Filipe
01e915800e
Merge pull request #9037 from jibees/9028-last-item-of-order-cancellation
...
BOM: show custom modal on last item deletion of an order
2022-04-15 18:47:51 +01:00
Jean-Baptiste Bellet
af69064d3a
Add mocked shopfront
2022-04-15 10:53:28 +10:00
GeorgeThoppil
706f6025e9
Add all variants for only one distributor
2022-04-04 19:59:42 -04:00
Jean-Baptiste Bellet
17989b2f90
Update tests as well around order cancellation on item deletion
...
js specs are not that easy to code (needs to spy callback...). Use system spec instead.
2022-03-25 11:52:08 +01:00
Filipe
87c79a5941
Merge pull request #8294 from guidoDutra/8131-cancel-empty-orders-on-BOM-page
...
Cancel empty orders on BOM page
2022-03-18 11:24:26 +00:00
Filipe
19270f1777
Merge pull request #8987 from jibees/8981-BOM-correct-value-for-current-and-max-fullfilled
...
BOM: correct max and current fulfilled units values
2022-03-17 18:15:59 +00:00
Filipe
53544ee66a
Merge pull request #8805 from cillian/remove-inline-advanced-settings-toggle-js
...
Replace inline JS for toggling order cycle advanced settings with StimulusJs controller
2022-03-17 16:05:46 +00:00
Jean-Baptiste Bellet
ea3e15f0c8
Max|Current fulfilled value is the max|current divided by group_buy_unit_size
...
+ improve testing with representative values
+ Update bulk_order_management_spec.rb and revert previously changed values
2022-03-14 09:06:05 +01:00
Jean-Baptiste Bellet
915714246f
Directly use the variant_unit_scale instead of VariantUnitManager.getScale
...
and update the tests as well
2022-03-08 14:59:08 +01:00
Jean-Baptiste Bellet
adcdca812d
Delete that getScale method which is now useless
...
since we now rely on the serialized variant_unit_scale
2022-03-08 14:58:34 +01:00
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
Cillian O'Ruanaidh
1b8c1bd27a
Only initialise Stimulus app once in Jest tests in :beforeAll rather than :beforeEach
...
Before there was an issue with the remote_toggle_controller tests, which contains two tests. If you commented out one test and ran the other it would pass and vice versa but if both tests were uncommented only the first test would ever pass, the second one would fail. See https://github.com/openfoodfoundation/openfoodnetwork/pull/8805#discussion_r801464322
Co-authored-by: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com >
2022-02-11 10:21:26 +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
Matt-Yorkley
81f5755e3d
Add tests for tabs_controller
2022-01-31 16:34:35 +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
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