David Cook
759705efcf
Add spec for onKeyup
2023-09-19 14:48:39 +10:00
David Cook
6bfdd1bc12
Split spec into multiple examples
2023-09-19 14:48:34 +10:00
David Cook
e075d40525
Prevent accidentally leaving the page
2023-09-15 16:00:41 +10:00
David Cook
99ac48a258
Discarding changes reloads from DB
...
But it also clears any search filters. To confirm exactly what behaviour is desired before fixing...
2023-09-15 15:46:02 +10:00
David Cook
8ff67aca41
Disable filters and sorting when form is modified
...
Stimulus controllers aren't supposed to reach outside their own element (so we can't do this with targets). Perhaps the controller should be bigger to encompass more, but I wanted to see if I could avoid making a mega component that does everything. For now it seems appropriate just to pass a selector in.
Another option is to publish events on other controllers using Outlets, but I don't know if we need to go there just yet.
2023-09-15 15:45:48 +10:00
David Cook
e047f49998
Make form actions float over sort controls.
2023-09-15 15:45:48 +10:00
David Cook
15f7a8299b
Show form actions only when modified
2023-09-15 15:45:48 +10:00
David Cook
daefada5a9
Show summary of modified records
...
I found myself trying to write Ruby in Javascript, and it's not nearly as pretty..
Javascript now has more advanced data structures like Map, but it's rather useless because it doesn't have the usual iterator methods (such as filter, map, reduce etc).
Also for the spec I wasn't sure of the best approach, so will gladly recieve feedback.
2023-09-15 15:45:48 +10:00
David Cook
18e40bebd0
Mark modified fields
2023-09-15 15:45:45 +10:00
David Cook
7ef4df0087
Update all locales with the latest Transifex translations
v4.4.11
2023-09-14 13:47:58 +10:00
David Cook
0966864589
Merge pull request #11511 from dacook/fix-update-button-11349
...
Fix Update button sizing
2023-09-14 13:37:19 +10:00
David Cook
2e6e083667
[fixup] Fix Update button sizing
...
By disabling line wrap we can consistently predict how it will appear. The longest translation we currently have is 14 characters so this should be fine.
2023-09-14 09:37:10 +10:00
Maikel
8e226bc473
Merge pull request #11537 from filipefurtad0/fix_flaky_orders_cycle_supplier_totals_report_spec.rb
...
Renames product so it always appears first on the report results
2023-09-14 09:08:16 +10:00
Maikel
758c6e033f
Merge pull request #11533 from macanudo527/fix_stylehash_2
...
Fix Style/HashSyntax 3/13
2023-09-14 09:04:03 +10:00
Maikel
0382b4c80a
Merge pull request #11535 from openfoodfoundation/dependabot/bundler/newrelic_rpm-9.5.0
...
chore(deps): bump newrelic_rpm from 9.4.2 to 9.5.0
2023-09-14 08:45:44 +10:00
Konrad
c36c5be2c9
Merge pull request #11497 from Matt-Yorkley/import-tax-category
...
Fix error when importing entries with a tax category
2023-09-13 23:28:16 +02:00
Konrad
29a12c7235
Merge pull request #11013 from filipefurtad0/add_enterprise_fees_w_tax_report_by_producer
...
Adds enterprise fees w tax report by producer
2023-09-13 21:55:59 +02:00
David Cook
ee2520a1f6
Visit page directly to save time
...
Shaved a couple of seconds off, 35->33 sec.
And make it easier to hide from the list.
2023-09-13 19:09:55 +02:00
David Cook
b27f63fa60
Refactor: DRY up init code
2023-09-13 19:09:55 +02:00
David Cook
ef1ccca4fa
Temporarily 'hide' report
...
The reports framework doesn't currently support hidden reports, but we can mark it with a strike-through at least.
2023-09-13 19:09:55 +02:00
David Cook
db8392ce81
Temporarily hide report
2023-09-13 19:09:55 +02:00
Mohamed ABDELLANI
4cb91da8b2
load only enterprise fees connected to incoming exchanges on the OC
2023-09-13 19:09:55 +02:00
filipefurtad0
af525f9f7f
Fixes rubocop issues
2023-09-13 19:09:55 +02:00
filipefurtad0
131474e91d
Updates test case
...
should list all the tax rates (2)
2023-09-13 19:09:55 +02:00
filipefurtad0
57f058eeb2
Updates test case
...
should list all the tax rates
2023-09-13 19:09:55 +02:00
filipefurtad0
fc9826b44a
Updates test case
...
should filter by fee name
2023-09-13 19:09:55 +02:00
filipefurtad0
86e6697723
Updates test case
...
should filter by producer
2023-09-13 19:09:55 +02:00
filipefurtad0
7734b0417d
Updates test case
...
should filter by distributor and order cycle (2)
2023-09-13 19:09:55 +02:00
filipefurtad0
d7a6db3eb0
Updates test case
...
should filter by distributor and order cycle
2023-09-13 19:09:55 +02:00
filipefurtad0
d8501e7d83
Updates test case
...
generates the report and displays fees for the respective suppliers
2023-09-13 19:09:55 +02:00
David Cook
47d5fe909e
Deduplicate order2 setup
2023-09-13 19:09:55 +02:00
David Cook
8c514b2fe9
Deduplicate order setup
2023-09-13 19:09:55 +02:00
David Cook
b574e71fc9
Refactor: set included_in_price once
...
This saves the need for an update, and more importantly moves setup out of the before block which means we can finally deduplicate order setup.
2023-09-13 19:09:55 +02:00
David Cook
6e15049728
Refactor distributor
2023-09-13 19:09:55 +02:00
David Cook
bf2298829f
Refactor order cycle setup more
...
Moving more code out of before blocks which will help us reduce duplication in following commits.
2023-09-13 19:09:55 +02:00
David Cook
ce57ac65f3
Refactor order cycle lets
...
It turns out the outgoing exchanges were never even used.
2023-09-13 19:09:55 +02:00
Mohamed ABDELLANI
9a22cdc5e7
test scenario: 'multiple orders, same enterprise fee, different tax rates'
2023-09-13 19:09:55 +02:00
Mohamed ABDELLANI
624b4c8ad2
fix calculation of the summary row's total excl tax
2023-09-13 19:09:55 +02:00
Mohamed ABDELLANI
a3f012c9fe
calculate tax total using existing rows
2023-09-13 19:09:55 +02:00
Mohamed ABDELLANI
f0c3d7685e
replace string reference with the translated string
2023-09-13 19:09:55 +02:00
David Cook
420494715f
Tighten up spec
...
I noticed that the tests don't check if the right totals are shown for each section. Now we can be certain.
2023-09-13 19:09:55 +02:00
David Cook
b7e1a660c3
Rename supplier to be more specific
...
To ensure specs are matching the right supplier.
2023-09-13 19:09:55 +02:00
David Cook
e934bc7cb9
Ignore ClassLength
...
I'm never quite sure the best way to deal with these, so I added a comment to at least explain my justification.
2023-09-13 19:09:55 +02:00
David Cook
93cca56e68
Style/HashSyntax
2023-09-13 19:09:55 +02:00
filipefurtad0
019c7b3e71
Splits filtering tests between orders
...
Sets pending test case for orders with more than one supplier
2023-09-13 19:09:55 +02:00
filipefurtad0
e43661fd3c
Adds/corrects comments around Added tax section
2023-09-13 19:09:55 +02:00
Mohamed ABDELLANI
080e81e0fe
optimize join_supplier
2023-09-13 19:09:55 +02:00
Mohamed ABDELLANI
44e8d2d735
fix pending lint issues
2023-09-13 19:09:55 +02:00
Mohamed ABDELLANI
219c581f9a
remove pending from "should filter by producer"
2023-09-13 19:09:55 +02:00
Mohamed ABDELLANI
6dd70d310c
fix the calculation of the cost of produce
...
we want the cost of produce to only include the items produced by the supplier used to group the rows.
2023-09-13 19:09:55 +02:00