Commit Graph

30732 Commits

Author SHA1 Message Date
cyrillefr
62739c0458 Requested changes in spec
- use of new service instead of manually advancing an order
2024-03-11 10:13:46 +01:00
cyrillefr
7fdf1a110d Fix incorrect results for multiple tax rates in report
- total_excl_tax would sum amounts and taxes without
    knowledge if taxes rates were really applied or not
  - spec shows use case described in issue 12066
2024-03-11 10:13:46 +01:00
filipefurtad0
07a43fecdf Update all locales with the latest Transifex translations v4.4.33 2024-03-08 11:48:31 +00:00
Maikel
b27e0b5339 Merge pull request #12228 from openfoodfoundation/dependabot/bundler/json-jwt-1.16.6
chore(deps): bump json-jwt from 1.16.5 to 1.16.6
2024-03-08 11:39:43 +11:00
Maikel
61f29a4ebf Merge pull request #12226 from openfoodfoundation/dependabot/bundler/rubocop-rspec-2.27.1
chore(deps-dev): bump rubocop-rspec from 2.27.0 to 2.27.1
2024-03-08 11:39:06 +11:00
Filipe
9abaf90907 Merge pull request #12233 from dacook/buu/unit-scale-basic-12005
[BUU] Unit Scale - basic implementation
2024-03-07 17:20:45 +00:00
Filipe
de9446f5f3 Merge pull request #12167 from mkllnk/haml-up
Update Haml syntax and gem to version 6
2024-03-07 15:36:29 +00:00
Rachel Arnould
cd9bef4f7b Merge pull request #12172 from abdellani/12067-fix-invoice-render-multiple-tax-rates
fix invoice render multiple tax rates
2024-03-07 10:53:52 +01:00
Maikel
b4385623b2 Merge pull request #12236 from openfoodfoundation/dependabot/bundler/i18n-1.14.3
chore(deps): bump i18n from 1.14.1 to 1.14.3
2024-03-07 14:45:45 +11:00
Maikel
a256d01440 Merge pull request #12224 from dacook/rubocop-negation-matcher
Add Rubocop negation matcher
2024-03-07 14:41:20 +11:00
Rachel Arnould
5f302f347a Merge pull request #12189 from abdellani/11829-remove-alternative-invoice-when-invoice-feature-is-enabled
hide alternative invoice checkbox if invoices feature is enabled
2024-03-06 11:25:38 +01:00
dependabot[bot]
c0db3eb6ff chore(deps): bump i18n from 1.14.1 to 1.14.3
Bumps [i18n](https://github.com/ruby-i18n/i18n) from 1.14.1 to 1.14.3.
- [Release notes](https://github.com/ruby-i18n/i18n/releases)
- [Changelog](https://github.com/ruby-i18n/i18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ruby-i18n/i18n/compare/v1.14.1...v1.14.3)

---
updated-dependencies:
- dependency-name: i18n
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-06 09:35:21 +00:00
David Cook
29d3b34776 Increase dropdown height 2024-03-06 17:12:15 +11:00
David Cook
8612f7baab Only add extra padding on alignment edge
Saves a few precious pixels on the other edge.
2024-03-06 14:10:54 +11:00
David Cook
e770f10f2b Tomselect has minimum width 2024-03-06 14:10:54 +11:00
David Cook
cbcf388acc Ensure gap between fields wrapped over a line 2024-03-06 14:10:51 +11:00
David Cook
133c9c0609 Add descriptions for taxomony tree
Better late than never.
2024-03-06 13:41:22 +11:00
David Cook
864b95612a Show error message on variant_unit_name
Now passing options through to the error tag
2024-03-06 13:41:22 +11:00
David Cook
e8bd8389b5 Remove unused parameters
They're being silently discarded. I checked, and those classes weren't needed anyway. (theres' no conditions to even show an error in the second case, but nevermind..)
2024-03-06 13:41:22 +11:00
David Cook
38766f5256 Show variant_unit_name for 'items' 2024-03-06 13:41:22 +11:00
David Cook
e52b8daf50 Refactor: DRY 2024-03-06 13:41:22 +11:00
David Cook
b3cf977c96 Add unit name (items) field 2024-03-06 13:41:22 +11:00
David Cook
bfd6319cf2 Mark tom-select as changed
Thankfully I was able to use basic DOM features, so there's no coupling of the logic with tom-select.

It wasn't going to be simple to get tom-select to listen for the 'changed' class on the original select, so I found a simple solution with a CSS sibling selector instead.
2024-03-06 13:41:22 +11:00
David Cook
af748158aa Hide chevron until hover to allow a bit more space for text 2024-03-06 13:41:22 +11:00
David Cook
864b876a9a Add tom-select with naked style
The rem units are converted to em to make the padding relative to the chevron size. This means different font sizes will Just Work.
2024-03-06 13:41:22 +11:00
David Cook
822054b748 Use capybara helper to find field
This is more flexible and can find a field based on name, id or aria-label
2024-03-06 13:41:22 +11:00
David Cook
4b2406c9c2 Add unit scale dropdown 2024-03-06 13:41:17 +11:00
David Cook
8f0e9c9f5c Remove unnecessary selector
I can't see any reason that fieldsets, which are containers, should share styles with inputs. Maybe font styles, but everything looks fine still.
2024-03-06 13:01:44 +11:00
David Cook
958288b223 Move input styles to form stylesheet
A better way to arrange it, and as a bonus it makes the selectors simpler, yay!
2024-03-06 13:01:44 +11:00
David Cook
2ef9e34f28 Re-arrange imperial units
Who would have guessed it was this complicated.

Fingers crossed this doesn't break any other functionality...
2024-03-06 13:01:43 +11:00
David Cook
ea0067946d Generate variant unit options in Ruby
This re-implements Angular JS function VariantUnitManager.variantUnitOptions()

Well.. almost. See next commit.
2024-03-06 13:01:43 +11:00
David Cook
a1135f7db7 Move unit scale to separate column
This is because it's going to move from product to variant soon, as part of Product Refactor.
2024-03-06 13:01:43 +11:00
David Cook
8f31d8799f Adjust column widths
Table layout is tricky. I had originally hoped that the table would allow us to use min/max width. But that simply doesn't work with `table-layout: fixed`. So we need to set preconfigured widths.

Now I think that table layout doesn't bring any benefit, so I think we should consider switching to flexbox or grid. ButI'll wait until all elements are in place before trying anything new.
2024-03-06 13:01:43 +11:00
David Cook
3e0d54f5f8 Fix Layout/LineLength
Ha, `not_to have` is one character longer..
2024-03-06 09:20:22 +11:00
David Cook
ea0967e22e Safely autocorrect Capybara/NegationMatcher 2024-03-06 09:20:22 +11:00
David Cook
0a70d70118 Add rubocop Capybara/NegationMatcher
And remove other config which was actually disabled already.
2024-03-06 09:20:22 +11:00
Filipe
af9f07f496 Merge pull request #12194 from cyrillefr/Replace-dropdown_controller-with-generic-toggle-control_controller
Re-implement dropdown controller with html details element
2024-03-05 16:28:29 +00:00
Filipe
cd7a9c606e Merge pull request #12208 from abdellani/11673-add-a-coder-for-every-serialized-attribute
add for every serialized attribute a coder
2024-03-05 15:41:45 +00:00
dependabot[bot]
e95a58f735 chore(deps): bump json-jwt from 1.16.5 to 1.16.6
Bumps [json-jwt](https://github.com/nov/json-jwt) from 1.16.5 to 1.16.6.
- [Release notes](https://github.com/nov/json-jwt/releases)
- [Changelog](https://github.com/nov/json-jwt/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nov/json-jwt/compare/v1.16.5...v1.16.6)

---
updated-dependencies:
- dependency-name: json-jwt
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-04 20:28:10 +00:00
dependabot[bot]
0f0ec729f1 chore(deps-dev): bump rubocop-rspec from 2.27.0 to 2.27.1
Bumps [rubocop-rspec](https://github.com/rubocop/rubocop-rspec) from 2.27.0 to 2.27.1.
- [Release notes](https://github.com/rubocop/rubocop-rspec/releases)
- [Changelog](https://github.com/rubocop/rubocop-rspec/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-rspec/compare/v2.27.0...v2.27.1)

---
updated-dependencies:
- dependency-name: rubocop-rspec
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-04 09:47:53 +00:00
Gaetan Craig-Riou
9ab775c774 Merge pull request #12221 from mkllnk/rspec-sql
Use new rspec-sql gem
2024-03-04 11:37:38 +11:00
David Cook
5440c0dc65 Merge pull request #12223 from openfoodfoundation/dependabot/bundler/rubocop-rspec-2.27.0
chore(deps-dev): bump rubocop-rspec from 2.26.1 to 2.27.0
2024-03-04 10:20:49 +11:00
David Cook
2fa681ae8a Merge pull request #12203 from feruzoripov/queries/naming
Standardize Naming Conventions for Query-Related Services in `app/queries`
2024-03-04 10:15:49 +11:00
Feruz Oripov
1f299c84bc Merge branch 'master' into queries/naming 2024-03-02 16:32:50 +05:00
Feruz Oripov
3bf76c81aa Update specs 2024-03-02 16:11:26 +05:00
dependabot[bot]
d761ddabb7 chore(deps-dev): bump rubocop-rspec from 2.26.1 to 2.27.0
Bumps [rubocop-rspec](https://github.com/rubocop/rubocop-rspec) from 2.26.1 to 2.27.0.
- [Release notes](https://github.com/rubocop/rubocop-rspec/releases)
- [Changelog](https://github.com/rubocop/rubocop-rspec/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-rspec/compare/v2.26.1...v2.27.0)

---
updated-dependencies:
- dependency-name: rubocop-rspec
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-01 09:35:47 +00:00
Maikel Linke
60b86e1d64 Replace custom query counter with new gem rspec-sql 2024-03-01 11:44:25 +11:00
Maikel Linke
58490c26c1 Add rspec-sql gem 2024-03-01 11:42:03 +11:00
Maikel
a692fc9d12 Merge pull request #12218 from openfoodfoundation/dependabot/bundler/jwt-2.8.1
chore(deps): bump jwt from 2.8.0 to 2.8.1
2024-03-01 08:25:29 +11:00
Maikel
3795880fcd Merge pull request #12216 from openfoodfoundation/dependabot/bundler/rack-2.2.8.1
chore(deps): bump rack from 2.2.8 to 2.2.8.1
2024-03-01 08:15:13 +11:00