Compare commits

..

307 Commits

Author SHA1 Message Date
Mohamed ABDELLANI
1c60a3a660 read rendering options directly from the model ReportRendingOptions 2022-11-16 12:40:02 +01:00
Mohamed ABDELLANI
ac7a7b11a5 store display_header_row flag in the model 2022-11-16 12:29:44 +01:00
Mohamed ABDELLANI
0fb273ce93 store display_summary_row in the model 2022-11-16 12:27:52 +01:00
Mohamed ABDELLANI
709dfa42bc load fields_to_show from DB when user access the report 2022-11-16 12:08:32 +01:00
Mohamed ABDELLANI
9561140466 create ReportRenderingOptions model 2022-11-16 12:02:47 +01:00
Filipe
94db55dd43 Merge pull request #9993 from openfoodfoundation/revert-9926-cache-address
Revert "Cache address JSON to avoid database queries"
2022-11-15 10:18:51 +00:00
jibees
6dcc50ad15 Revert "Cache address JSON to avoid database queries" 2022-11-15 10:40:22 +01:00
jibees
911d816233 Merge pull request #9979 from filipefurtad0/fix_flaky_bom_3
[Flaky BOM] Bumps retry: 2 -> 3
2022-11-14 09:21:17 +01:00
Konrad
c2d5ea4a5a Merge pull request #9942 from mkllnk/taxonomies-spec
Avoid image load error and show errors in spec
2022-11-12 20:30:04 +01:00
Konrad
59d555165f Merge pull request #9936 from dacook/minor-admin-updates
Code cleanup: admin interface
2022-11-12 19:43:44 +01:00
Konrad
2eca3d5ef8 Merge pull request #9914 from openfoodfoundation/dependabot/bundler/spreadsheet_architect-5.0.0
Bump spreadsheet_architect from 4.2.0 to 5.0.0
2022-11-11 22:49:17 +01:00
Konrad
5fc17b51d2 Merge pull request #9887 from openfoodfoundation/dependabot/bundler/aws-sdk-s3-1.117.1
Bump aws-sdk-s3 from 1.117.0 to 1.117.1
2022-11-11 21:15:58 +01:00
Konrad
c6178f5df9 Merge pull request #9877 from mkllnk/ignored-columns
Remove outdated ignoring of Paperclip columns
2022-11-11 21:08:42 +01:00
Sigmund Petersen
bd718406f4 Merge pull request #9980 from openfoodfoundation/filipefurtad0-add-knapsackpro-badge-to-readme
Adds KnapsackPro badge to enable unlimited plan use
2022-11-11 13:20:58 +01:00
Filipe
ca4d92bf99 Adds KnapsackPro badge to enable KnapsackPro use
As requested per email: "Please add the Knapsack Pro badge to your open source project readme"
2022-11-11 11:46:24 +00:00
filipefurtad0
2f7cb4d3ca Bumps retry: 2 -> 3 2022-11-11 10:51:11 +00:00
David Cook
1e24988bd1 Remove label from bug report template
I accidentally added it last week.
2022-11-11 09:31:08 +11:00
Konrad
c44195c8a0 Merge pull request #9911 from viniciusueharaweb/9781-improve-shipping-category-not-found-error-message
[Product Import] Wrong error message when shipping category does not match predefined shipping categories
2022-11-10 22:48:25 +01:00
Konrad
5b44dc9609 Corrected missspelling of 'mispelling' in en.yml 2022-11-10 20:53:30 +01:00
Jean-Baptiste Bellet
dff9c6d333 Update all locales with the latest Transifex translations 2022-11-10 20:39:17 +01:00
Filipe
4b3184a6ef Merge pull request #9923 from mkllnk/cache-country
Cache default country for an hour
2022-11-10 19:10:29 +00:00
Filipe
f1dd69a4f7 Merge pull request #9926 from mkllnk/cache-address
Cache address JSON to avoid database queries
2022-11-10 18:18:03 +00:00
Filipe
24eda1bfae Merge pull request #9927 from mkllnk/lazy-load-product-images
Load product images in the shop lazily to improve performance
2022-11-10 18:11:56 +00:00
Konrad
ae09f7a415 Merge pull request #9869 from abdellani/fix-unit_value_with_description-calculation-on-products-page_admin_dashboard
use js-big-decimal to calculate unit_value_with_description in products page
2022-11-10 18:47:16 +01:00
dependabot[bot]
d8d1b38a4d Merge pull request #9967 from openfoodfoundation/dependabot/npm_and_yarn/socket.io-parser-4.0.5 2022-11-10 10:09:27 +00:00
Filipe
a7353eb69f Merge pull request #9575 from apricot12/9487-Dimensions-Packing-Reports
Added HEIGHT, WEIGHT, WIDTH, DEPTH columns to packing reports by customer.
2022-11-10 09:55:26 +00:00
jibees
8a702daccd Merge pull request #9966 from filipefurtad0/fix_flaky_spec_9902_2
Increases retry option from 2 to 3
2022-11-10 10:05:05 +01:00
jibees
f4de39ae00 Merge pull request #9965 from filipefurtad0/adds_retry_to_BOM_spec
Adds retry option to flaky BOM spec
2022-11-10 10:04:33 +01:00
dependabot[bot]
177e3d5885 Bump socket.io-parser from 4.0.4 to 4.0.5
Bumps [socket.io-parser](https://github.com/socketio/socket.io-parser) from 4.0.4 to 4.0.5.
- [Release notes](https://github.com/socketio/socket.io-parser/releases)
- [Changelog](https://github.com/socketio/socket.io-parser/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io-parser/compare/4.0.4...4.0.5)

---
updated-dependencies:
- dependency-name: socket.io-parser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-09 22:15:43 +00:00
Filipe
b7fcc0b4fc Merge pull request #9924 from jibees/9757-BOM-show-only-one-modal-when-changing-date-range-
BOM: Display confirm modal on date range change only one time
2022-11-09 18:42:28 +00:00
filipefurtad0
86d38bbaa5 Increases retry option from 2 to 3 2022-11-09 17:19:13 +00:00
filipefurtad0
36bc17c8b4 Adds retry option to flaky examples 2022-11-09 16:36:36 +00:00
Konrad
b22beea5fc Merge pull request #9945 from jibees/9944-translate-columns-in-packing-and-xero-reports
Packing reports: translate columns name in the columns selector component
2022-11-09 09:55:21 +01:00
dependabot[bot]
2c17a2bafe Merge pull request #9952 from openfoodfoundation/dependabot/npm_and_yarn/babel-loader-8.3.0 2022-11-08 09:35:27 +00:00
dependabot[bot]
c25375f00a Merge pull request #9951 from openfoodfoundation/dependabot/npm_and_yarn/babel/preset-env-7.20.2 2022-11-08 09:34:45 +00:00
dependabot[bot]
7322362eea Merge pull request #9949 from openfoodfoundation/dependabot/bundler/capybara-3.38.0 2022-11-08 09:34:21 +00:00
dependabot[bot]
94b14d16bf Merge pull request #9950 from openfoodfoundation/dependabot/npm_and_yarn/husky-8.0.2 2022-11-08 09:33:39 +00:00
dependabot[bot]
116764166c Merge pull request #9954 from openfoodfoundation/dependabot/bundler/sidekiq-6.5.8 2022-11-08 09:33:21 +00:00
dependabot[bot]
de807b1ee0 Merge pull request #9948 from openfoodfoundation/dependabot/npm_and_yarn/loader-utils-1.4.1 2022-11-08 09:32:05 +00:00
Mohamed ABDELLANI
70e47f3929 fix: convert @attrs[:units] to big decimal instead of float in the unit converter 2022-11-08 10:26:00 +01:00
Mohamed ABDELLANI
b203803eb9 fix test: change product_unit_value_with_description value to float (2 digits precision) 2022-11-08 10:26:00 +01:00
Mohamed ABDELLANI
44d719fcb5 use js-big-decimal to calculate unit_value_with_description 2022-11-08 10:26:00 +01:00
dependabot[bot]
2a8731c8da Bump sidekiq from 6.5.7 to 6.5.8
Bumps [sidekiq](https://github.com/mperham/sidekiq) from 6.5.7 to 6.5.8.
- [Release notes](https://github.com/mperham/sidekiq/releases)
- [Changelog](https://github.com/mperham/sidekiq/blob/main/Changes.md)
- [Commits](https://github.com/mperham/sidekiq/compare/v6.5.7...v6.5.8)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-08 09:04:23 +00:00
dependabot[bot]
ed81ce8ada Bump babel-loader from 8.2.5 to 8.3.0
Bumps [babel-loader](https://github.com/babel/babel-loader) from 8.2.5 to 8.3.0.
- [Release notes](https://github.com/babel/babel-loader/releases)
- [Changelog](https://github.com/babel/babel-loader/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel-loader/compare/v8.2.5...v8.3.0)

---
updated-dependencies:
- dependency-name: babel-loader
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-08 09:03:02 +00:00
dependabot[bot]
1c0132ca4d Bump @babel/preset-env from 7.19.4 to 7.20.2
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.19.4 to 7.20.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.20.2/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-08 09:02:37 +00:00
dependabot[bot]
c1cd524157 Bump husky from 8.0.1 to 8.0.2
Bumps [husky](https://github.com/typicode/husky) from 8.0.1 to 8.0.2.
- [Release notes](https://github.com/typicode/husky/releases)
- [Commits](https://github.com/typicode/husky/compare/v8.0.1...v8.0.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-08 09:02:01 +00:00
dependabot[bot]
2198f12922 Bump capybara from 3.37.1 to 3.38.0
Bumps [capybara](https://github.com/teamcapybara/capybara) from 3.37.1 to 3.38.0.
- [Release notes](https://github.com/teamcapybara/capybara/releases)
- [Changelog](https://github.com/teamcapybara/capybara/blob/master/History.md)
- [Commits](https://github.com/teamcapybara/capybara/compare/3.37.1...3.38.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-08 09:01:35 +00:00
dependabot[bot]
d86498c81e Bump loader-utils from 1.4.0 to 1.4.1
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.0 to 1.4.1.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.1/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v1.4.0...v1.4.1)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-08 08:36:50 +00:00
Jean-Baptiste Bellet
3e9647590d Packing report don't need untranslated headers for xlxs, csv format 2022-11-07 15:53:39 +01:00
Jean-Baptiste Bellet
f4572cb8cb nil is the value of :report_format when GETting a report page
This method is used in `custom_headers()` method that handle headers customization. Then, it's `@report.available_headers`
2022-11-07 11:44:01 +01:00
Maikel Linke
122fe8253e Avoid image load error and show errors in spec
I stumbled across some spec code which was hiding an unexpected error. So I
fixed it properly. This code is to be replaced soon anyway and this is a tiny
step in that direction.
2022-11-07 16:07:41 +11:00
Maikel
85017893d3 Merge pull request #9939 from jibees/fix-flatpickr-system-spec
Fix flatpickr system spec: `spec/system/flatpickr_spec.rb`
2022-11-07 15:37:57 +11:00
Maikel
35a8f6be74 Merge pull request #9935 from dacook/update-transifex
Update Transifex config format for latest version
2022-11-07 15:28:08 +11:00
Jean-Baptiste Bellet
9464f49031 Fix flatpickr system spec
On `/admin/orders`, we now have a date range picker.
This spec seems to test only the behavior of flatpickr, which is an external dependencies ; we probably shouldn't test it since it's not our responsibilities. Leave the spec as it for now.
2022-11-04 15:29:36 +01:00
Jean-Baptiste Bellet
39e5613db8 When confirm modal is dismissed, reset daterange picker to previous values
+ update specs as well
2022-11-04 14:18:29 +01:00
David Cook
20c0449128 Remove unnecessary case
Seems cleaner to me.

Best viewed with whitespace ignored.
2022-11-04 14:26:41 +11:00
David Cook
5405d6f525 Ensure all text inputs have full width
I think `url` and `tel` are currently unused, but I think we should use them in the future.
2022-11-04 14:26:39 +11:00
David Cook
9ef07cb110 Update GETTING_STARTED.md
[doc] Link to info about loading sample data

[skip ci]
2022-11-04 14:20:48 +11:00
David Cook
8d49ad9d18 Update Transifex config for APIv3
I installed the latest version of the CLI client (1.4.1), and the old config no longer worked. This config contains:
 - o: organisation
 - p: project
 - r: resource

You may need to upgrade your installation:

    tx update
2022-11-04 09:46:11 +11:00
Jean-Baptiste Bellet
228e484f02 Flatpicker instance can now handle flatpickr:change event
With:
```
detail: {
  startDate: "2022-10-02",
  endDate: "2022-10-10"
}
```
2022-11-03 16:57:03 +01:00
Jean-Baptiste Bellet
66a684920a allSaved() method from LineItems needs to be spy 2022-11-03 15:55:48 +01:00
Jean-Baptiste Bellet
1a241e4953 Only call confirmRefresh() on time, on date range change
Previously, when changing the date range, we had several modals that opened.
Now, the `confirmRefresh()` method should be open only one time.

Update specs as well:
 - use the method `accept_confirm`
 - Removing pending and sleep as the spec is now green
2022-11-03 15:55:48 +01:00
dependabot[bot]
74529cd595 Merge pull request #9930 from openfoodfoundation/dependabot/bundler/view_component-2.75.0 2022-11-03 13:50:27 +00:00
jibees
d69c2f8314 Merge pull request #9931 from filipefurtad0/fix_flaky_spec_9805_4
Sets retry: 3 on flaky example
2022-11-03 14:46:39 +01:00
jibees
3f00e523d3 Merge pull request #9932 from filipefurtad0/fix_flaky_bom_2
Sets retry: 3 for BOM spec
2022-11-03 14:45:51 +01:00
filipefurtad0
c10f5ce5df Sets retry: 3 for BOM spec 2022-11-03 13:13:42 +00:00
filipefurtad0
6bf332ef20 Sets retry: 3 on flaky example 2022-11-03 12:48:22 +00:00
dependabot[bot]
ef27e4f241 Bump view_component from 2.74.1 to 2.75.0
Bumps [view_component](https://github.com/viewcomponent/view_component) from 2.74.1 to 2.75.0.
- [Release notes](https://github.com/viewcomponent/view_component/releases)
- [Changelog](https://github.com/ViewComponent/view_component/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/viewcomponent/view_component/compare/v2.74.1...v2.75.0)

---
updated-dependencies:
- dependency-name: view_component
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-03 09:03:30 +00:00
David Cook
af2c185f9f Update release issue template
Fix link 😳
2022-11-03 17:59:46 +11:00
David Cook
d7558a9aea Update release issue template
Add link to slack channel
2022-11-03 17:55:17 +11:00
David Cook
076244ee1c Update translations 2022-11-03 17:30:01 +11:00
Maikel
2e2488a25e Make Github expand the issue title on pull request 2022-11-03 14:11:51 +11:00
Maikel Linke
762beb7c1c Load product images in the shop lazily
The browser decides when to load the image, usually when it's close to
the viewport.
2022-11-03 14:02:01 +11:00
Maikel Linke
118c1f7cbd Cache address JSON to avoid database queries
We found that our database is quite busy querying the country all the
time. One source of these queries is the shop front which serializes
enterprises including their addresses. But addresses should be safe to
cache because:

- country records never change
- state records never change
- updating any other attribute changes the cache key

The caching was previously removed when the state_name attribute was
added. That is technically correct because it's possible to change a
state's name without updating the address. Then the cache would be out
of date. But we never update state names. And if we did, we would need
to invalidate the cache now.
2022-11-03 13:07:59 +11:00
Maikel Linke
8009b37723 Spec the AddressSerializer before changing it 2022-11-03 13:01:02 +11:00
dependabot[bot]
bf950d7c69 Merge pull request #9922 from openfoodfoundation/dependabot/npm_and_yarn/stimulus-3.1.1 2022-11-02 07:42:12 +00:00
Maikel Linke
a2c4242994 Simplify Address code
The DefaultCountry code has a fallback already.
2022-11-02 16:21:15 +11:00
Maikel Linke
392aeb7321 Remove unused method loading default country
And another unused method.
2022-11-02 16:21:15 +11:00
Maikel Linke
f971131888 Cache default country for an hour
The default country usually never changes after the initial setup of an
instance.
2022-11-02 15:33:43 +11:00
Maikel
257959448a Merge pull request #9921 from openfoodfoundation/dependabot/bundler/rubocop-1.38.0
Bump rubocop from 1.37.1 to 1.38.0
2022-11-02 13:00:57 +11:00
Maikel
ba4e7e440d Merge pull request #9896 from jibees/improve-reliability-of-specs
Flaky ; Add a `retry` on spec
2022-11-02 11:25:16 +11:00
Maikel
cb83069101 Merge pull request #9920 from filipefurtad0/webmock_do_not_always_require
Disables default loading of webmock and some seldom used gems
2022-11-02 11:10:05 +11:00
Maikel
456355da79 Merge pull request #9893 from jibees/small-improvments-on-script/rspec-slow-repeat-file
Small improvements on `script/rspec-slow-repeat` file
2022-11-02 11:01:04 +11:00
dependabot[bot]
2dc3c472c1 Bump stimulus from 3.1.0 to 3.1.1
Bumps [stimulus](https://github.com/stimulusjs/stimulus) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/stimulusjs/stimulus/releases)
- [Changelog](https://github.com/hotwired/stimulus/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stimulusjs/stimulus/compare/v3.1.0...v3.1.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-01 09:30:31 +00:00
dependabot[bot]
dfec0c3caf Bump rubocop from 1.37.1 to 1.38.0
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.37.1 to 1.38.0.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.37.1...v1.38.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-01 09:30:16 +00:00
filipefurtad0
73596308ab Disables default loading of some other seldom used gems 2022-10-31 22:10:58 +00:00
filipefurtad0
b736db0d7b Disables default loading of webmock gem 2022-10-31 22:07:07 +00:00
Jean-Baptiste Bellet
3ff1cd0793 Prefer to killall descendants instead of just killing yes processes 2022-10-31 16:11:32 +01:00
Jean-Baptiste Bellet
b93f6dfdad Add convenient logging when failing 2022-10-31 16:11:32 +01:00
Jean-Baptiste Bellet
9ba0695652 Trap CTRL+C to exit all yes commands 2022-10-31 16:11:31 +01:00
Jean-Baptiste Bellet
df42a88150 Retry specs as couldn't make it reliable 2022-10-31 15:34:04 +01:00
dependabot[bot]
8b73660d75 Merge pull request #9915 from openfoodfoundation/dependabot/npm_and_yarn/floating-ui/dom-1.0.4 2022-10-31 10:11:54 +00:00
dependabot[bot]
f214c1f14f Merge pull request #9916 from openfoodfoundation/dependabot/bundler/active_storage_validations-1.0.3 2022-10-31 09:41:02 +00:00
Jean-Baptiste Bellet
0eff4d3906 Add some comment on the purpose 2022-10-31 10:19:36 +01:00
Jean-Baptiste Bellet
84831266f1 Remove useless information 2022-10-31 10:19:14 +01:00
dependabot[bot]
5e1d4892b1 Bump active_storage_validations from 1.0.2 to 1.0.3
Bumps [active_storage_validations](https://github.com/igorkasyanchuk/active_storage_validations) from 1.0.2 to 1.0.3.
- [Release notes](https://github.com/igorkasyanchuk/active_storage_validations/releases)
- [Changelog](https://github.com/igorkasyanchuk/active_storage_validations/blob/master/CHANGES.md)
- [Commits](https://github.com/igorkasyanchuk/active_storage_validations/compare/1.0.2...1.0.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-31 09:05:49 +00:00
dependabot[bot]
7260bf1041 Bump @floating-ui/dom from 1.0.3 to 1.0.4
Bumps [@floating-ui/dom](https://github.com/floating-ui/floating-ui/tree/HEAD/packages/dom) from 1.0.3 to 1.0.4.
- [Release notes](https://github.com/floating-ui/floating-ui/releases)
- [Commits](https://github.com/floating-ui/floating-ui/commits/@floating-ui/dom@1.0.4/packages/dom)

---
updated-dependencies:
- dependency-name: "@floating-ui/dom"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-31 09:04:17 +00:00
dependabot[bot]
ded0604d18 Bump spreadsheet_architect from 4.2.0 to 5.0.0
Bumps [spreadsheet_architect](https://github.com/westonganger/spreadsheet_architect) from 4.2.0 to 5.0.0.
- [Release notes](https://github.com/westonganger/spreadsheet_architect/releases)
- [Changelog](https://github.com/westonganger/spreadsheet_architect/blob/master/CHANGELOG.md)
- [Commits](https://github.com/westonganger/spreadsheet_architect/compare/v4.2.0...v5.0.0)

---
updated-dependencies:
- dependency-name: spreadsheet_architect
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-31 09:03:40 +00:00
Maikel
01a907de9f Merge pull request #9907 from filipefurtad0/fix_flaky_spec_9805_2
Adds retry: 2 option
2022-10-31 11:46:53 +11:00
Maikel
5e0a08d99b Merge pull request #9906 from filipefurtad0/fix_flaky_spec_9902
Wraps success message around within block; adds retry option
2022-10-31 11:45:49 +11:00
Vinicius Uehara
6da442eb97 Fix trailing whitespace 2022-10-30 21:42:48 -03:00
Maikel
7b5debb76b Merge pull request #9904 from openfoodfoundation/dependabot/npm_and_yarn/js-big-decimal-1.3.12
Bump js-big-decimal from 1.3.10 to 1.3.12
2022-10-31 11:41:46 +11:00
Vinicius Uehara
f6cc9fca26 Prioritize attribute errors over product validations
With product validations being prioritized, custom and
insightful error messages were being overwriten by
general and ambiguous model validations, which
were confusing users
2022-10-30 20:02:08 -03:00
Vinicius Uehara
1f498e6052 Improve shipping category not found error message 2022-10-30 20:02:05 -03:00
filipefurtad0
32fb898962 Adds retry: 2 option 2022-10-28 18:32:21 +01:00
filipefurtad0
df8fd88682 Wraps success message around within block; adds retry option 2022-10-28 18:03:45 +01:00
Konrad
68b2e48fb3 Merge pull request #9900 from ijdershem/idersh/issue-9845
[9845] Make checkout terms and conditions label clickable
2022-10-28 14:28:06 +02:00
Konrad
0202bb40cf Merge pull request #9827 from saunmanoj888/fix-vairant-unit-decimal-issue
Fix unit description UI issue on updating a Product having imperial weight (oz)
2022-10-28 13:52:00 +02:00
Filipe
f7c62dfe45 Merge pull request #9862 from drummer83/master
Format reports as list, even if only one sub-type available
2022-10-28 12:13:42 +01:00
Konrad
1c185c2ca4 Merge pull request #9823 from abdellani/fix-product-duplication
Fix product duplication
2022-10-28 12:51:01 +02:00
dependabot[bot]
883f01e3e6 Bump js-big-decimal from 1.3.10 to 1.3.12
Bumps [js-big-decimal](https://github.com/royNiladri/js-big-decimal) from 1.3.10 to 1.3.12.
- [Release notes](https://github.com/royNiladri/js-big-decimal/releases)
- [Commits](https://github.com/royNiladri/js-big-decimal/compare/v1.3.10...v1.3.12)

---
updated-dependencies:
- dependency-name: js-big-decimal
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-28 09:04:17 +00:00
jibees
8ccc88d770 Merge pull request #9897 from filipefurtad0/fix_flaky_spec_9805
Wraps expectation on within block
2022-10-28 10:47:04 +02:00
jibees
133512e4f4 Merge pull request #9898 from filipefurtad0/fix_flaky_spec_9894
Changes click method making it overlap-safe
2022-10-28 10:45:52 +02:00
dependabot[bot]
86b4570fc2 Merge pull request #9901 from openfoodfoundation/dependabot/bundler/test-prof-1.0.11 2022-10-28 07:45:14 +00:00
dependabot[bot]
3c996fdfb3 Bump test-prof from 1.0.10 to 1.0.11
Bumps [test-prof](https://github.com/test-prof/test-prof) from 1.0.10 to 1.0.11.
- [Release notes](https://github.com/test-prof/test-prof/releases)
- [Changelog](https://github.com/test-prof/test-prof/blob/master/CHANGELOG.md)
- [Commits](https://github.com/test-prof/test-prof/compare/v1.0.10...v1.0.11)

---
updated-dependencies:
- dependency-name: test-prof
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-28 07:02:29 +00:00
dependabot[bot]
8048dc2c8b Merge pull request #9891 from openfoodfoundation/dependabot/bundler/rubocop-rails-2.17.2 2022-10-28 07:01:20 +00:00
ijdershem-jf
0f9f4b07a8 [9845] Make checkout terms and conditions label clickable; associate label with input using correct for attribute 2022-10-27 20:30:42 -06:00
filipefurtad0
a6fdefff08 Changes click method making it overlap-safe 2022-10-27 21:25:45 +01:00
filipefurtad0
6a28918654 Wraps expectation on within block 2022-10-27 19:15:08 +01:00
Konrad
d544233bac Merge pull request #9780 from jibees/9777-select-the-right-country
Admin, Enterprise Details: Fix country selection on business address panel
2022-10-27 14:32:52 +02:00
dependabot[bot]
d577d60de6 Bump rubocop-rails from 2.17.1 to 2.17.2
Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from 2.17.1 to 2.17.2.
- [Release notes](https://github.com/rubocop/rubocop-rails/releases)
- [Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-rails/compare/v2.17.1...v2.17.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-27 10:26:01 +00:00
Sigmund Petersen
473a35f330 Merge pull request #9892 from filipefurtad0/dependabot_exclude_push_from_build_double
Excludes build triggers using /** syntax for branch pushes
2022-10-27 12:24:40 +02:00
filipefurtad0
2fd8ffa413 Excludes build triggers using /** syntax for branch pushes 2022-10-27 11:00:39 +01:00
Jean-Baptiste Bellet
bbf400a83b /proc/cpuinfo is not available on Darwin arch (ie. mac) 2022-10-27 11:19:55 +02:00
Maikel Linke
d1cd1fdefe Update translations 2022-10-27 11:00:42 +11:00
Maikel
df868d88d8 Merge pull request #9883 from filipefurtad0/dependabot_exclude_push_from_build
Adds ignore tag for pull_request dependabot branches
2022-10-27 10:45:04 +11:00
Maikel
da61fdbc2c Merge pull request #9881 from openfoodfoundation/dependabot/bundler/pdf-reader-2.11.0
Bump pdf-reader from 2.10.0 to 2.11.0
2022-10-27 10:34:54 +11:00
dependabot[bot]
a07b72c3c9 Bump aws-sdk-s3 from 1.117.0 to 1.117.1
Bumps [aws-sdk-s3](https://github.com/aws/aws-sdk-ruby) from 1.117.0 to 1.117.1.
- [Release notes](https://github.com/aws/aws-sdk-ruby/releases)
- [Changelog](https://github.com/aws/aws-sdk-ruby/blob/version-3/gems/aws-sdk-s3/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-ruby/commits)

---
updated-dependencies:
- dependency-name: aws-sdk-s3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-26 22:55:37 +00:00
Maikel
54b0554bb4 Merge pull request #9831 from filipefurtad0/fix_flaky_spec_bom_9811
Brings back rspec_retry; Creates helper method for flaky spec #9811
2022-10-27 09:52:43 +11:00
Rachel Arnould
2652bc086a Merge pull request #9755 from cillian/order-cycle-payment-methods
Let people choose which payment methods are available to customers on order cycles
2022-10-26 20:10:34 +02:00
filipefurtad0
f72e040a4d Adds ignore tag for pull_request dependabot branches 2022-10-26 13:58:28 +01:00
dependabot[bot]
1546619718 Bump pdf-reader from 2.10.0 to 2.11.0
Bumps [pdf-reader](https://github.com/yob/pdf-reader) from 2.10.0 to 2.11.0.
- [Release notes](https://github.com/yob/pdf-reader/releases)
- [Changelog](https://github.com/yob/pdf-reader/blob/main/CHANGELOG)
- [Commits](https://github.com/yob/pdf-reader/compare/v2.10.0...v2.11.0)

---
updated-dependencies:
- dependency-name: pdf-reader
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-26 12:40:42 +00:00
dependabot[bot]
1c17c37915 Merge pull request #9879 from openfoodfoundation/dependabot/bundler/oauth2-1.4.11 2022-10-26 12:39:20 +00:00
dependabot[bot]
063e424bc0 Merge pull request #9878 from openfoodfoundation/dependabot/bundler/aws-sdk-s3-1.117.0 2022-10-26 12:36:25 +00:00
filipefurtad0
b53faceebb Retries improved but still flaky examples 2022-10-26 13:26:21 +01:00
filipefurtad0
aebf84b53f Brings back rspec-retry gem and configs 2022-10-26 13:26:21 +01:00
dependabot[bot]
9ce1c536e4 Merge pull request #9880 from openfoodfoundation/dependabot/bundler/rubocop-rails-2.17.1 2022-10-26 09:50:48 +00:00
Jean-Baptiste Bellet
edb2645af1 Add a country to test db and modify one spec
Check that businness address changes are ok
Test with another county since only one country and one state couldn't spot the fact that when changing country it needs to change also states selector
2022-10-26 11:21:44 +02:00
Jean-Baptiste Bellet
d797ef2b3a As we are in the Business Address panel, use the business_address attr
Not the address one, which is different

Business address country could be null, so use an empty array
2022-10-26 11:21:44 +02:00
Jean-Baptiste Bellet
d46105ea90 Correct some input styling 2022-10-26 11:21:44 +02:00
Jean-Baptiste Bellet
151e71b4d9 Actually controller is named dependEnt-select 2022-10-26 11:21:44 +02:00
Jean-Baptiste Bellet
b6bc4c66a2 Specify the current value of country 2022-10-26 11:21:44 +02:00
dependabot[bot]
b8b50fa165 Bump rubocop-rails from 2.16.1 to 2.17.1
Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from 2.16.1 to 2.17.1.
- [Release notes](https://github.com/rubocop/rubocop-rails/releases)
- [Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-rails/compare/v2.16.1...v2.17.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-26 09:06:16 +00:00
dependabot[bot]
4d23113265 Bump oauth2 from 1.4.10 to 1.4.11
Bumps [oauth2](https://gitlab.com/oauth-xx/oauth2) from 1.4.10 to 1.4.11.
- [Release notes](https://gitlab.com/oauth-xx/oauth2/tags)
- [Changelog](https://gitlab.com/oauth-xx/oauth2/blob/main/CHANGELOG.md)
- [Commits](https://gitlab.com/oauth-xx/oauth2/compare/v1.4.10...v1.4.11)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-26 09:04:45 +00:00
dependabot[bot]
f909b742ce Bump aws-sdk-s3 from 1.116.0 to 1.117.0
Bumps [aws-sdk-s3](https://github.com/aws/aws-sdk-ruby) from 1.116.0 to 1.117.0.
- [Release notes](https://github.com/aws/aws-sdk-ruby/releases)
- [Changelog](https://github.com/aws/aws-sdk-ruby/blob/version-3/gems/aws-sdk-s3/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-ruby/commits)

---
updated-dependencies:
- dependency-name: aws-sdk-s3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-26 09:04:18 +00:00
Maikel
5a4727138c Merge pull request #9875 from filipefurtad0/fix_flaky_spec_8701
Minor changes to improve flakyness
2022-10-26 14:00:08 +11:00
Maikel
fe05d17078 Merge pull request #9872 from jibees/update-actions/upload-artifact-to-lastest-version
Build: use the latest version of `actions/upload-artifact`
2022-10-26 13:58:48 +11:00
Maikel Linke
9f9d8020c1 Fix URL generation for report without subtype
The URL is generated in the partial and it just needs to know that
there's no subtype.
2022-10-26 11:53:25 +11:00
Maikel Linke
3ebd896c3e Remove outdated ignoring of columns
Those columns have been removed from the database and don't need to be
ignored any more.
2022-10-26 10:42:19 +11:00
filipefurtad0
14955ac8ca Minor changes to improve flakyness 2022-10-25 17:39:10 +01:00
dependabot[bot]
06c6853323 Merge pull request #9856 from openfoodfoundation/dependabot/npm_and_yarn/storybook/addon-docs-6.5.13 2022-10-25 14:08:01 +00:00
dependabot[bot]
4e0b206c7b Merge pull request #9857 from openfoodfoundation/dependabot/npm_and_yarn/storybook/addon-controls-6.5.13 2022-10-25 13:59:39 +00:00
Konrad
3d003a735f Merge pull request #9851 from openfoodfoundation/dependabot/bundler/aws-sdk-s3-1.116.0
Bump aws-sdk-s3 from 1.114.0 to 1.116.0
2022-10-25 15:52:34 +02:00
Jean-Baptiste Bellet
e16c8661a2 Use the same template even if there is no sub_report 2022-10-25 15:27:43 +02:00
dependabot[bot]
eaa6e9bc18 Bump @storybook/addon-docs from 6.5.12 to 6.5.13
Bumps [@storybook/addon-docs](https://github.com/storybookjs/storybook/tree/HEAD/addons/docs) from 6.5.12 to 6.5.13.
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/v6.5.13/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v6.5.13/addons/docs)

---
updated-dependencies:
- dependency-name: "@storybook/addon-docs"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-25 13:20:15 +00:00
dependabot[bot]
91652ba792 Bump @storybook/addon-controls from 6.5.12 to 6.5.13
Bumps [@storybook/addon-controls](https://github.com/storybookjs/storybook/tree/HEAD/addons/controls) from 6.5.12 to 6.5.13.
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/v6.5.13/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v6.5.13/addons/controls)

---
updated-dependencies:
- dependency-name: "@storybook/addon-controls"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-25 13:19:28 +00:00
dependabot[bot]
4bf640f0c4 Merge pull request #9866 from openfoodfoundation/dependabot/bundler/rubocop-1.37.1 2022-10-25 13:18:51 +00:00
jibees
cf489e809f Merge pull request #9867 from openfoodfoundation/dependabot/bundler/rswag-specs-2.7.0
Bump rswag-specs from 2.6.0 to 2.7.0
2022-10-25 15:18:18 +02:00
jibees
35bb539271 Merge pull request #9855 from openfoodfoundation/dependabot/npm_and_yarn/hotwired/turbo-7.2.4
Bump @hotwired/turbo from 7.2.2 to 7.2.4
2022-10-25 15:17:25 +02:00
jibees
b3020a5573 Merge pull request #9854 from openfoodfoundation/dependabot/npm_and_yarn/floating-ui/dom-1.0.3
Bump @floating-ui/dom from 1.0.2 to 1.0.3
2022-10-25 15:17:05 +02:00
jibees
250b9bc3c0 Merge pull request #9853 from openfoodfoundation/dependabot/npm_and_yarn/storybook/server-6.5.13
Bump @storybook/server from 6.5.12 to 6.5.13
2022-10-25 15:16:30 +02:00
Jean-Baptiste Bellet
e58add6af0 Use the latest version of actions/upload-artifact 2022-10-25 15:00:14 +02:00
filipefurtad0
3447959a06 Adds click_on_select2 helper 2022-10-25 13:32:29 +01:00
Mohamed ABDELLANI
41440af533 test if product's variant is duplicated properly 2022-10-25 11:28:16 +01:00
Mohamed ABDELLANI
826b1e95ef add a product variant. 2022-10-25 11:27:51 +01:00
Mohamed ABDELLANI
6cabbee1a2 rename new_variant double to new_master_variant 2022-10-25 11:27:14 +01:00
Mohamed ABDELLANI
11bc5c775c rename the variant double to master_variant 2022-10-25 11:26:43 +01:00
Mohamed ABDELLANI
788093c7cf implement variant duplication 2022-10-25 11:23:35 +01:00
Mohamed ABDELLANI
f44228eef7 extract variant duplication logic into a separated function 2022-10-25 11:23:35 +01:00
Konrad
62935f65a2 Merge pull request #9849 from openfoodfoundation/dependabot/bundler/active_storage_validations-1.0.2
Bump active_storage_validations from 1.0.0 to 1.0.2
2022-10-25 12:04:50 +02:00
Konrad
e8425c5805 Merge pull request #9792 from vsmay98/6531-remove-user-registrations-controller
Remove spree user registrations controller file
2022-10-25 11:52:34 +02:00
dependabot[bot]
31cde7e06e Bump @hotwired/turbo from 7.2.2 to 7.2.4
Bumps [@hotwired/turbo](https://github.com/hotwired/turbo) from 7.2.2 to 7.2.4.
- [Release notes](https://github.com/hotwired/turbo/releases)
- [Commits](https://github.com/hotwired/turbo/compare/v7.2.2...v7.2.4)

---
updated-dependencies:
- dependency-name: "@hotwired/turbo"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-25 09:31:08 +00:00
dependabot[bot]
f467efc42b Bump @storybook/server from 6.5.12 to 6.5.13
Bumps [@storybook/server](https://github.com/storybookjs/storybook/tree/HEAD/app/server) from 6.5.12 to 6.5.13.
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/v6.5.13/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v6.5.13/app/server)

---
updated-dependencies:
- dependency-name: "@storybook/server"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-25 09:30:49 +00:00
dependabot[bot]
faa8888e2a Bump @floating-ui/dom from 1.0.2 to 1.0.3
Bumps [@floating-ui/dom](https://github.com/floating-ui/floating-ui/tree/HEAD/packages/dom) from 1.0.2 to 1.0.3.
- [Release notes](https://github.com/floating-ui/floating-ui/releases)
- [Commits](https://github.com/floating-ui/floating-ui/commits/@floating-ui/dom@1.0.3/packages/dom)

---
updated-dependencies:
- dependency-name: "@floating-ui/dom"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-25 09:30:47 +00:00
jibees
84f488917e Merge pull request #9865 from jibees/sort-package.json-file
Sort package.json to avoid conflicts
2022-10-25 11:29:41 +02:00
dependabot[bot]
00c57fa06c Bump rswag-specs from 2.6.0 to 2.7.0
Bumps [rswag-specs](https://github.com/rswag/rswag) from 2.6.0 to 2.7.0.
- [Release notes](https://github.com/rswag/rswag/releases)
- [Changelog](https://github.com/rswag/rswag/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rswag/rswag/compare/2.6.0...2.7.0)

---
updated-dependencies:
- dependency-name: rswag-specs
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-25 09:03:31 +00:00
dependabot[bot]
c4748104a0 Bump rubocop from 1.36.0 to 1.37.1
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.36.0 to 1.37.1.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.36.0...v1.37.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-25 09:02:59 +00:00
Jean-Baptiste Bellet
46bbf1b1ec Sort package.json to avoid conflicts 2022-10-25 10:54:11 +02:00
Konrad
d12e99e363 Merge pull request #9808 from abdellani/sort_items_by_product_name_in_ocstd_report
add sort by product name to order_cycle_supplier_totals_by_distributo…
2022-10-25 10:34:22 +02:00
Jean-Baptiste Bellet
ede38a417f Respect rubocop Metrics/AbcSize by extracting a method 2022-10-25 10:22:35 +02:00
Jean-Baptiste Bellet
23b5e73c97 Weight is computed with unit_value and product variant_unit_scale 2022-10-25 10:22:35 +02:00
Maikel Linke
7081e712e8 Flag style issue on todo list for later
The code needs some bigger refactoring to avoid this style issue.
2022-10-25 10:09:26 +02:00
Nihal Mohammed
5c0f3a2d4b Add weight, height, width, depth fields to pack by customer reports
+ update specs by adding dimensions fields into reports specs
2022-10-25 10:09:26 +02:00
Nihal Mohammed
f8657aaf41 Copy dimensions from variants to line items before validation 2022-10-25 10:09:26 +02:00
Nihal Mohammed
f38661cdf1 Add weight, height, width, depth fields to line items 2022-10-25 10:09:26 +02:00
Maikel
85c8a0ac35 Merge pull request #9852 from openfoodfoundation/dependabot/bundler/rswag-api-2.7.0
Bump rswag-api from 2.6.0 to 2.7.0
2022-10-25 14:33:04 +11:00
Maikel
0e9869c4d3 Merge pull request #9848 from openfoodfoundation/dependabot/bundler/debug-1.6.3
Bump debug from 1.6.2 to 1.6.3
2022-10-25 14:02:17 +11:00
Maikel
a3416bcb80 Merge pull request #9790 from matisnape/update-docker-readme-for-m1-users-#8421
Update docker readme for M1 users [#8421]
2022-10-25 11:12:09 +11:00
Maikel
bf206dc4e6 Merge pull request #9858 from jibees/setup-redis-for-build
Setup redis on build
2022-10-25 11:11:08 +11:00
Maikel
55ef4dfe0d Merge pull request #8809 from Matt-Yorkley/dead-code-variants-check
Remove dead code: Product#variants?
2022-10-25 10:49:01 +11:00
Konrad
3489f08ec5 Format reports as list, even if only one sub-type available 2022-10-25 00:31:00 +02:00
Konrad
4a7ac45dba Merge pull request #9830 from jibees/9821-remove-report_inverse_columns_logic-feature-toggle
Remove `report_inverse_columns_logic` feature toggle
2022-10-25 00:23:31 +02:00
Konrad
df925d6412 Merge pull request #9737 from Laurel16/fix_issue#9559
Translate error messages when creating products
2022-10-24 23:17:32 +02:00
Konrad
84bf38ce4d Merge pull request #9791 from vsmay98/8250-fix-snail-for-all-enterprise-fee
Fix snail issue for all enterprise fees
2022-10-24 21:49:45 +02:00
saunmanoj888
490c5afc59 Mock bigDecimal methods in specs 2022-10-25 00:05:31 +05:30
filipefurtad0
367f77f477 Replaces select2_select helper for find/click 2022-10-24 17:57:10 +01:00
Jean-Baptiste Bellet
892a020bcc Setup redis on build 2022-10-24 17:01:12 +02:00
dependabot[bot]
1f5281ac1a Bump rswag-api from 2.6.0 to 2.7.0
Bumps [rswag-api](https://github.com/rswag/rswag) from 2.6.0 to 2.7.0.
- [Release notes](https://github.com/rswag/rswag/releases)
- [Changelog](https://github.com/rswag/rswag/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rswag/rswag/compare/2.6.0...2.7.0)

---
updated-dependencies:
- dependency-name: rswag-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-24 11:19:45 +00:00
Rachel Arnould
3c9b7a10f4 Merge pull request #9058 from Matt-Yorkley/oidc-redux
Add OIDC authentication for Les Communs
2022-10-24 13:18:36 +02:00
Jean-Baptiste Bellet
e2441cdcf6 Use the report type or subtype as the title 2022-10-24 11:12:22 +02:00
Jean-Baptiste Bellet
6dec80aaaf Links only on right side 2022-10-24 11:12:22 +02:00
Jean-Baptiste Bellet
1c349049d1 Remove report description when they are useless 2022-10-24 11:12:22 +02:00
Jean-Baptiste Bellet
edc667a336 By default, some columns are hidden. 2022-10-24 11:12:22 +02:00
Jean-Baptiste Bellet
02787e668f Remove report_inverse_columns_logic feature toggle
Co-Authored-By: Maikel <maikel@email.org.au>
2022-10-24 11:12:22 +02:00
dependabot[bot]
830a7c8f1d Bump aws-sdk-s3 from 1.114.0 to 1.116.0
Bumps [aws-sdk-s3](https://github.com/aws/aws-sdk-ruby) from 1.114.0 to 1.116.0.
- [Release notes](https://github.com/aws/aws-sdk-ruby/releases)
- [Changelog](https://github.com/aws/aws-sdk-ruby/blob/version-3/gems/aws-sdk-s3/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-ruby/commits)

---
updated-dependencies:
- dependency-name: aws-sdk-s3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-24 09:03:55 +00:00
dependabot[bot]
cd43bd4522 Bump active_storage_validations from 1.0.0 to 1.0.2
Bumps [active_storage_validations](https://github.com/igorkasyanchuk/active_storage_validations) from 1.0.0 to 1.0.2.
- [Release notes](https://github.com/igorkasyanchuk/active_storage_validations/releases)
- [Changelog](https://github.com/igorkasyanchuk/active_storage_validations/blob/master/CHANGES.md)
- [Commits](https://github.com/igorkasyanchuk/active_storage_validations/compare/1.0.0...1.0.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-24 09:03:07 +00:00
dependabot[bot]
9dbc9f7272 Bump debug from 1.6.2 to 1.6.3
Bumps [debug](https://github.com/ruby/debug) from 1.6.2 to 1.6.3.
- [Release notes](https://github.com/ruby/debug/releases)
- [Commits](https://github.com/ruby/debug/compare/v1.6.2...v1.6.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-24 09:02:49 +00:00
Mohamed ABDELLANI
da9a4803ff add it "lists products sorted by name" test 2022-10-24 09:01:42 +01:00
Mohamed ABDELLANI
732ebd8457 fix the expected table size in "generates the report" test 2022-10-24 09:01:42 +01:00
Mohamed ABDELLANI
39e567d386 set line_items_count to 3 2022-10-24 09:01:42 +01:00
Mohamed ABDELLANI
4740c2b0db add sort by product name to order_cycle_supplier_totals_by_distributor report rules 2022-10-24 09:01:42 +01:00
jibees
ee70ab8adb Merge pull request #9847 from mkllnk/stable-orders_and_fulfillment_spec
Expect report rows for same product in random order
2022-10-24 09:57:06 +02:00
Maikel
936a96bd6c Merge pull request #9839 from openfoodfoundation/dependabot/bundler/rswag-ui-2.7.0
Bump rswag-ui from 2.6.0 to 2.7.0
2022-10-24 16:01:04 +11:00
Maikel
b3492981d3 Merge pull request #9832 from openfoodfoundation/dependabot/bundler/nokogiri-1.13.9
Bump nokogiri from 1.13.8 to 1.13.9
2022-10-24 15:58:57 +11:00
Maikel Linke
167ce0e53c Expect report rows in random order
It's not deterministic which variant is shown first and therefore this
spec would fail from time to time.
2022-10-24 15:40:35 +11:00
Maikel
8f47d2b2be Merge pull request #9820 from jibees/update-all-github-action-to-avoid-deprecated
Upgrade deprecated github/actions in our CI
2022-10-24 15:26:54 +11:00
Maikel
e873771f18 Merge pull request #9822 from filipefurtad0/redis_CannotConnectError
Extracts routing outside it block
2022-10-24 13:33:01 +11:00
Maikel
627b8af37b Merge pull request #9828 from mkllnk/authorize-api-key
Prevent users from changing API keys for others
2022-10-24 11:22:35 +11:00
Cillian O'Ruanaidh
eb72ec8e13 An order cycle isn't ready for checkout if a tag rule means no payment/shipping methods are available to the customer 2022-10-21 17:21:31 +01:00
Cillian O'Ruanaidh
7458dccea6 Call @order_cycles.count instead of #size because TagRuleApplicator doesn't return Relation anymore
In March 2020 this was changed to use :size instead of :count because TagRuleApplicator returned an ActiveRecord::Relation, see:

d2eee1dafd

However in October 2020 TagRuleApplicator was changed to always return an Array so this is no longer needed, see:

7e606471e4
2022-10-21 17:21:31 +01:00
Cillian O'Ruanaidh
3e24b7ba6b Assign variable across two lines so Rubocop override comment isn't needed in OrderCycleClone
Co-authored-by: Maikel <maikel@email.org.au>
2022-10-21 17:21:31 +01:00
Cillian O'Ruanaidh
62cd507fb9 Stub Spree::Config.stripe_connect_enabled instead of changing it before and back after tests
It's less code and sometimes there can be issues when config cache values are changed.

Co-authored-by: Maikel <maikel@email.org.au>
2022-10-21 17:21:31 +01:00
Cillian O'Ruanaidh
beba3c7684 Disable Metrics/ClassLength check for OrderCycleForm 2022-10-21 17:21:31 +01:00
Cillian O'Ruanaidh
f5bd23b4d8 Remove unused Spree::Order#available_payment_methods method
This was introduced in 47d2f698ef but we are using OrderAvailablePaymentMethods now.
2022-10-21 17:21:31 +01:00
Cillian O'Ruanaidh
2c14aecf4f Extract a OrderCycleClone service
Before it was giving a Rubocop error, probably not a bad idea anyway.
2022-10-21 17:21:31 +01:00
Cillian O'Ruanaidh
4e6d64c0a1 Let people choose which payment methods are available to customers on order cycles 2022-10-21 17:21:31 +01:00
Cillian O'Ruanaidh
5718f9f00c Create :order_cycles_distributor_payment_methods HABTM join table 2022-10-21 17:21:31 +01:00
Cillian O'Ruanaidh
5423c1c02e Resolve conflict in db/schema.rb 2022-10-21 17:21:24 +01:00
saunmanoj888
ee8454bd2c Use js-big-decimal package for calculation 2022-10-21 21:30:00 +05:30
dependabot[bot]
45c23a76ff Bump rswag-ui from 2.6.0 to 2.7.0
Bumps [rswag-ui](https://github.com/rswag/rswag) from 2.6.0 to 2.7.0.
- [Release notes](https://github.com/rswag/rswag/releases)
- [Changelog](https://github.com/rswag/rswag/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rswag/rswag/compare/2.6.0...2.7.0)

---
updated-dependencies:
- dependency-name: rswag-ui
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-21 13:24:52 +00:00
Jean-Baptiste Bellet
5a1d9013c6 Update all locales with the latest Transifex translations 2022-10-20 23:12:32 +02:00
jibees
3a68e237de Merge pull request #9772 from mkllnk/revenue-report-for-au
Add more fields to revenue report as used by Aus
2022-10-20 23:10:17 +02:00
Jean-Baptiste Bellet
87ed23211e Use the last version of github/codeql-action/upload-sarif 2022-10-20 17:42:22 +02:00
jibees
48e18b016a Merge pull request #9756 from vsmay98/8249-fix-snail-for-all-shipping-method-fee
Fix snail issue for all shipping method fees
2022-10-20 17:31:24 +02:00
jibees
da851079f4 Merge pull request #9776 from abdellani/product-creation-minor-improvements
Product creation minor improvements
2022-10-20 17:30:47 +02:00
jibees
1d265d19ce Merge pull request #8872 from Matt-Yorkley/bugsnag-data
Update Bugsnag error data
2022-10-20 17:30:14 +02:00
jibees
9e4bd23332 Merge pull request #9738 from AthiraKadampatta/9726-remove-unused-paperclip-columns
Delete unused paperclip columns.
2022-10-20 17:29:44 +02:00
jibees
fdc362cb44 Merge pull request #9806 from mkllnk/feature-constraint
Generalise feature toggle constraint
2022-10-20 17:27:46 +02:00
Vishal Jain
8d3845508c remove check_permissions method 2022-10-20 19:54:23 +05:30
Vishal Jain
952b6039f9 Remove spree user registrations controller file 2022-10-20 19:54:23 +05:30
Jean-Baptiste Bellet
053af8416b Previous setup-ruby action was deprecated. Use ruby/setup-ruby@v1 2022-10-20 16:14:14 +02:00
dependabot[bot]
955b84ae6f Bump nokogiri from 1.13.8 to 1.13.9
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.13.8 to 1.13.9.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.13.8...v1.13.9)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-20 13:45:27 +00:00
jibees
2455ecabde Merge pull request #9758 from openfoodfoundation/dependabot/bundler/activerecord-import-1.4.1
Bump activerecord-import from 1.4.0 to 1.4.1
2022-10-20 15:44:42 +02:00
Konrad
71037022ec Merge pull request #9816 from viniciusueharaweb/9703-product-description-should-have-a-pointer-cursor
Add pointer cursor when hovering a clickable product description
2022-10-20 10:38:46 +02:00
Jean-Baptiste Bellet
7ffd4669be Change node version to use the latest LTS
We probably need to modify our `ofn-install` build to also use the latest LTS
2022-10-20 10:20:09 +02:00
jibees
2b7b83ba37 Merge pull request #9826 from filipefurtad0/fix_flaky_spec_bom_9824
Clarifies contexts, cleans-up spec DRY
2022-10-20 09:55:33 +02:00
Maikel Linke
fc79612f26 Prevent users from changing API keys for others
It was checking for the permission to create a user which everyone can
do. Now it's checking for updating that particular user and doesn't
allow generating new keys for other users any more.

This would have been an inconvenience but not a big security issue
because you can't view the key of another user.
2022-10-20 17:56:46 +11:00
Vishal Jain
de28027623 add system spec 2022-10-20 12:15:22 +05:30
Vishal Jain
755107ec9f Fix snail issue for all enterprise fees 2022-10-20 12:15:21 +05:30
saunmanoj888
b40cd579bc Fix spec failure 2022-10-19 23:18:22 +05:30
saunmanoj888
8e45b758ba Fix unit value UI issue 2022-10-19 22:59:28 +05:30
filipefurtad0
c4de247dd9 Clarifies contexts, cleans-up spec DRY 2022-10-19 16:56:04 +01:00
filipefurtad0
a244b34627 Extracts routing to context (DRY); creates context for separate it block 2022-10-19 11:15:15 +01:00
filipefurtad0
dabe37ebcb Extracts routing outside it block 2022-10-19 11:01:56 +01:00
Jean-Baptiste Bellet
2fcbe437f2 Upgrade "actions/setup-node" to non-deprecated version 2022-10-19 11:31:47 +02:00
Jean-Baptiste Bellet
642938afe0 Upgrade "actions/checkout" to non-deprecated version 2022-10-19 11:28:31 +02:00
jibees
7b96a1fb5b Merge pull request #9815 from mkllnk/bulk-product-spec
Stabilise spec by waiting for JS
2022-10-19 09:50:55 +02:00
Matt-Yorkley
0ca86344d2 Update use of deprecated #add_tab method to #add_metadata 2022-10-19 17:36:53 +11:00
Matt-Yorkley
980f004b83 Update Bugsnag error data 2022-10-19 17:36:52 +11:00
Matt-Yorkley
c0ee72319f Remove dead code: Product#variants?
This only makes sense in the context of Products which only have "master" variants, and we removed that option a while back.

Remove #variants? check from ProductStock concern
2022-10-19 16:30:12 +11:00
Maikel
3d26b76d17 Merge pull request #9814 from filipefurtad0/fix_flaky_spec_bom_9809
Replaces js select2 methods by find/click methods
2022-10-19 14:41:55 +11:00
Vinicius Uehara
7772c01e16 Add pointer cursor when hovering a clickable product description 2022-10-18 23:11:56 -03:00
Maikel Linke
04921aeed4 Stabilise spec by waiting for JS 2022-10-19 09:59:51 +11:00
filipefurtad0
c71c5054e0 Replaces js select2 methods by find/click methods 2022-10-18 21:27:52 +01:00
Filipe
4015413d1d Merge pull request #9813 from filipefurtad0/fix_flaky_spec_bom
Comments out and adds pending on flaky examples
2022-10-18 11:32:50 +01:00
filipefurtad0
b3059bbdbc Comments out and adds pending on flaky examples 2022-10-18 10:28:44 +01:00
Maikel Linke
a35fab5e1f Speed up spec by skipping a page 2022-10-18 14:27:18 +11:00
Maikel Linke
c22f6cb805 Add more fields to revenue report as used by Aus
We currently maintain our own CSV generation script which could be
replaced if we got all this information here.
2022-10-18 12:51:13 +11:00
Maikel Linke
f00aeb006e Allow enterprise users to authorize via OIDC 2022-10-18 11:32:14 +11:00
Matt-Yorkley
66c3ba3bba Remove default omniauth link 2022-10-18 11:32:14 +11:00
Matt-Yorkley
b322df8515 Generate devise links view 2022-10-18 11:32:14 +11:00
Matt-Yorkley
617164684c Configure OIDC 2022-10-18 11:32:14 +11:00
Matt-Yorkley
b36fae1bbb Add migration for omniauth attributes 2022-10-18 11:31:35 +11:00
Matt-Yorkley
3a5f263fb5 Add omniauth / OIDC gems 2022-10-18 11:31:35 +11:00
Filipe
d5c3edc8fa Merge pull request #9749 from drummer83/master
Fix layout of 'Create a new product' button in dashboard overview
2022-10-17 13:45:37 +01:00
Laurel16
ec65e4dcaa Fix: Missing translation in error messages issue#9559
Fix: changing local translation for variant_unit in spree/product en.yml

Fix: add unite_value key to en.yml
2022-10-17 15:32:04 +11:00
Maikel
c83eb5d5dc Merge pull request #9768 from ashwini-seshadri/admin_permissions_granting_permission_to_a_shop_displays_it_in_producers_list_as_if_it_was_a_supplier
Fix for: [Admin][Permissions] Granting permission to a shop displays it in "Producers" list as if it was a supplier #9589
2022-10-17 09:58:03 +11:00
Anna Nowak
9a40329bd7 Update docker readme for m1 users [#8421] 2022-10-15 18:29:51 +02:00
jibees
bf74612892 Merge pull request #9775 from openfoodfoundation/dependabot/npm_and_yarn/tom-select-2.2.2
Bump tom-select from 2.2.1 to 2.2.2
2022-10-14 09:27:06 +02:00
jibees
eae7d96b30 Merge pull request #9774 from openfoodfoundation/dependabot/npm_and_yarn/hotwired/turbo-7.2.2
Bump @hotwired/turbo from 7.2.0 to 7.2.2
2022-10-14 09:21:36 +02:00
Mohamed ABDELLANI
96c6f58ba2 fix test @/spec/system/admin/products_spec.rb:32 2022-10-14 03:26:40 +01:00
Mohamed ABDELLANI
6a8c7b15dc fix product category errors message in the form 2022-10-14 03:26:40 +01:00
Mohamed ABDELLANI
955492bfdd show the error message when the variant unit is not selected 2022-10-14 03:26:40 +01:00
Mohamed ABDELLANI
0000faab91 render the error message when the unit value is not set 2022-10-14 03:26:40 +01:00
Mohamed ABDELLANI
e3f157ebdd remove empty option from unit size 2022-10-14 03:26:40 +01:00
Mohamed ABDELLANI
f8af84d9d4 remove red start from tax category form 2022-10-14 03:26:40 +01:00
Mohamed ABDELLANI
bddbb36813 remove red star from supplier 2022-10-14 03:26:40 +01:00
dependabot[bot]
78b73c988e Bump tom-select from 2.2.1 to 2.2.2
Bumps [tom-select](https://github.com/orchidjs/tom-select) from 2.2.1 to 2.2.2.
- [Release notes](https://github.com/orchidjs/tom-select/releases)
- [Commits](https://github.com/orchidjs/tom-select/compare/v2.2.1...v2.2.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-13 09:41:37 +00:00
jibees
cd641cc5d6 Merge pull request #9714 from openfoodfoundation/dependabot/npm_and_yarn/tom-select-2.2.1
Bump tom-select from 2.1.0 to 2.2.1
2022-10-13 11:30:13 +02:00
dependabot[bot]
50555a3fe9 Bump @hotwired/turbo from 7.2.0 to 7.2.2
Bumps [@hotwired/turbo](https://github.com/hotwired/turbo) from 7.2.0 to 7.2.2.
- [Release notes](https://github.com/hotwired/turbo/releases)
- [Commits](https://github.com/hotwired/turbo/compare/v7.2.0...v7.2.2)

---
updated-dependencies:
- dependency-name: "@hotwired/turbo"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-13 09:08:24 +00:00
jibees
7c6e220bf7 Merge pull request #9771 from mkllnk/rspec-slow
Add convencience script to test flaky specs
2022-10-13 10:44:00 +02:00
Maikel Linke
3496b57942 Add convencience script to test flaky specs 2022-10-13 16:28:09 +11:00
Ashwini Seshadri
1596649034 Merge branch 'master' into admin_permissions_granting_permission_to_a_shop_displays_it_in_producers_list_as_if_it_was_a_supplier 2022-10-13 06:48:40 +02:00
Maikel Linke
81461684f3 Generalise feature toggle constraint
Now we can re-use it for any feature.
2022-10-13 10:42:20 +11:00
Maikel Linke
9da6f862cd Stabilise pending spec 2022-10-12 16:49:29 +11:00
Maikel Linke
3eb597bff4 Fix specs which accidentally reversed relationships 2022-10-12 16:49:29 +11:00
Maikel Linke
46fde6bd40 Remove now unused scope 2022-10-12 16:48:32 +11:00
Ashwini Seshadri
590a09f069 Fixed the permissions relationship, so the shop displays only suppliers and does not display distributors in producers list
and updated relevant tests
2022-10-12 16:48:31 +11:00
Vishal Jain
e02de2b17d Fix snail issue for all shipping method fees 2022-10-11 15:30:19 +05:30
dependabot[bot]
7bb7391634 Bump activerecord-import from 1.4.0 to 1.4.1
Bumps [activerecord-import](https://github.com/zdennis/activerecord-import) from 1.4.0 to 1.4.1.
- [Release notes](https://github.com/zdennis/activerecord-import/releases)
- [Changelog](https://github.com/zdennis/activerecord-import/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zdennis/activerecord-import/compare/v1.4.0...v1.4.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-11 07:35:27 +00:00
AthiraKadampatta
e5a136801d 9726 Remove attachment_width and attachment_height from spree_asset 2022-10-11 10:26:32 +05:30
AthiraKadampatta
addd2ea9ac #9726 Add migration to remove unused paperclip columns 2022-10-11 10:26:32 +05:30
Jean-Baptiste Bellet
1f329e85bc Also include plugins 2022-10-10 17:15:46 +02:00
Jean-Baptiste Bellet
4140e3d153 Import tom-select file directly
can't use "tom-select" anymore, due to a mis-configuration with babel I guess
2022-10-10 16:10:33 +02:00
Jean-Baptiste Bellet
db70c47a31 Specify IE 11 as a target
Comes from error using tom-select:

```
ERROR in ./node_modules/tom-select/dist/esm/tom-select.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: /Users/jibees/dev/openfoodnetwork/node_modules/tom-select/dist/esm/tom-select.js: unknown Statement of type "ForOfStatement"
```
2022-10-10 16:09:43 +02:00
dependabot[bot]
981c306977 Bump tom-select from 2.1.0 to 2.2.1
Bumps [tom-select](https://github.com/orchidjs/tom-select) from 2.1.0 to 2.2.1.
- [Release notes](https://github.com/orchidjs/tom-select/releases)
- [Commits](https://github.com/orchidjs/tom-select/compare/v2.1.0...v2.2.1)

---
updated-dependencies:
- dependency-name: tom-select
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-10 03:00:21 +00:00
Konrad
52c6f5a222 Fix layout of 'Create a new product' button in dashboard overview 2022-10-07 12:37:45 +02:00
215 changed files with 3796 additions and 1998 deletions

View File

@@ -1 +1,2 @@
defaults
IE 11

View File

@@ -6,3 +6,6 @@ STRIPE_SECRET_TEST_API_KEY="bogus_key"
STRIPE_CUSTOMER="bogus_customer"
SITE_URL="test.host"
OPENID_APP_ID="test-provider"
OPENID_APP_SECRET="12345"

View File

@@ -1,7 +1,7 @@
---
name: Release task
about: Track the process of a new release
title: 'Release v'
title: Release v
labels: ''
assignees: ''
@@ -18,7 +18,7 @@ assignees: ''
- [ ] [Find build] of the release commit and copy it below.
- [ ] Move this issue to Test Ready.
- [ ] Notify testers.
- [ ] Notify `@testers` in [#testing].
- [ ] Test build: <!-- paste build link here, e.g. https://semaphore...builds/1234 -->
## Finish on Tuesday
@@ -44,5 +44,6 @@ The full process is described at https://github.com/openfoodfoundation/openfoodn
[Draft new release]: https://github.com/openfoodfoundation/openfoodnetwork/releases/new?tag=v&title=v+Code+Name&body=Congrats%0A%0ADescription%0A%0A%23%23+User+facing+changes+:eyes:%0A%0A%0A%0A%23%23+Technical+changes+:wrench:%0A%0A
[releases]: https://github.com/openfoodfoundation/openfoodnetwork/releases
[#instance-managers]: https://app.slack.com/client/T02G54U79/CG7NJ966B
[#testing]: https://openfoodnetwork.slack.com/app_redirect?channel=C02TZ6X00
[Find build]: https://semaphoreci.com/openfoodfoundation/openfoodnetwork-2/branches/master
[#global-community]: https://app.slack.com/client/T02G54U79/C59ADD8F2

View File

@@ -1,6 +1,6 @@
#### What? Why?
Closes # <!-- Insert issue number here. -->
- Closes # <!-- Insert issue number here. -->
<!-- Explain why this change is needed and the solution you propose.
Provide context for others to understand it. -->

View File

@@ -23,11 +23,11 @@ jobs:
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
# Customize the ruby version depending on your needs
- name: Setup Ruby
uses: actions/setup-ruby@v1
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
@@ -45,6 +45,6 @@ jobs:
# Upload the SARIF file generated in the previous step
- name: Upload SARIF
uses: github/codeql-action/upload-sarif@v1
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: output.sarif.json

View File

@@ -3,6 +3,8 @@ name: Build
on:
workflow_dispatch:
push:
branches-ignore:
- 'dependabot/**'
pull_request:
env:
@@ -45,16 +47,21 @@ jobs:
- "engines/*/spec"
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup redis
uses: supercharge/redis-github-action@1.4.0
with:
redis-version: 6
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- uses: actions/setup-node@v2
- uses: actions/setup-node@v3
with:
node-version: '14.15.5'
node-version: 16
- name: Install JS dependencies
run: yarn install --frozen-lockfile
@@ -69,7 +76,7 @@ jobs:
- name: Archive failed tests screenshots
if: failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: failed-tests-screenshots
path: tmp/capybara/screenshots/*.png
@@ -92,16 +99,21 @@ jobs:
POSTGRES_USER: ofn
POSTGRES_PASSWORD: f00d
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup redis
uses: supercharge/redis-github-action@1.4.0
with:
redis-version: 6
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- uses: actions/setup-node@v2
- uses: actions/setup-node@v3
with:
node-version: '14.15.5'
node-version: 16
- name: Install JS dependencies
run: yarn install --frozen-lockfile

View File

@@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: prettier
uses: EPMatt/reviewdog-action-prettier@v1
with:

View File

@@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: true
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: docker/build
- run: docker-compose up --detach
- run: until curl -f -s http://localhost:3000; do echo "waiting for api server"; sleep 1; done
@@ -39,13 +39,13 @@ jobs:
# Archive HTML report
- name: Archive Mayhem for API report
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: mapi-report
path: mapi.html
# Upload SARIF file (only available on public repos or github enterprise)
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v1
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: mapi.sarif

View File

@@ -478,6 +478,7 @@ Metrics/ClassLength:
- 'app/serializers/api/enterprise_shopfront_serializer.rb'
- 'app/services/cart_service.rb'
- 'app/services/order_syncer.rb'
- 'app/services/order_cycle_form.rb'
- 'engines/order_management/app/services/order_management/order/updater.rb'
- 'lib/open_food_network/enterprise_fee_calculator.rb'
- 'lib/open_food_network/order_cycle_form_applicator.rb'

View File

@@ -1,7 +1,7 @@
[main]
host = https://www.transifex.com
[open-food-network.enyml]
[o:open-food-foundation:p:open-food-network:r:enyml]
file_filter = config/locales/<lang>.yml
source_lang = en
type = YML

View File

@@ -68,6 +68,8 @@ To login as the default user, use:
email: ofn@example.com
password: ofn123
Seee [Locale and sample data] about loading data.
### Testing
@@ -129,3 +131,4 @@ If these commands succeed, you should be able to [continue the setup process](#g
[rubocop]: https://rubocop.readthedocs.io/en/latest/
[karma]: https://github.com/openfoodfoundation/openfoodnetwork/wiki/Karma
[slack-dev]: https://openfoodnetwork.slack.com/messages/C2GQ45KNU
[Locale and sample data]: https://github.com/openfoodfoundation/openfoodnetwork/wiki/Locale-and-sample-data

13
Gemfile
View File

@@ -69,6 +69,10 @@ gem 'pagy', '~> 5.1'
gem 'rswag-api'
gem 'rswag-ui'
gem 'gitlab-omniauth-openid-connect', require: 'omniauth_openid_connect'
gem 'openid_connect', '~> 1.3'
gem 'omniauth-rails_csrf_protection'
gem 'angularjs-rails', '1.8.0'
gem 'bugsnag'
gem 'haml'
@@ -146,9 +150,10 @@ group :test, :development do
gem "factory_bot_rails", '6.2.0', require: false
gem 'fuubar', '~> 2.5.1'
gem 'json_spec', '~> 1.1.4'
gem 'knapsack'
gem 'knapsack', require: false
gem 'letter_opener', '>= 1.4.1'
gem 'rspec-rails', ">= 3.5.2"
gem 'rspec-retry', require: false
gem 'rswag-specs'
gem 'shoulda-matchers'
gem 'timecop'
@@ -159,9 +164,9 @@ group :test do
gem 'pdf-reader'
gem 'rails-controller-testing'
gem 'simplecov', require: false
gem 'test-prof'
gem 'vcr'
gem 'webmock'
gem 'test-prof', require: false
gem 'vcr', require: false
gem 'webmock', require: false
# See spec/spec_helper.rb for instructions
# gem 'perftools.rb'
end

View File

@@ -93,7 +93,7 @@ GEM
rails-html-sanitizer (~> 1.1, >= 1.2.0)
active_model_serializers (0.8.4)
activemodel (>= 3.0)
active_storage_validations (1.0.0)
active_storage_validations (1.0.3)
activejob (>= 5.2.0)
activemodel (>= 5.2.0)
activestorage (>= 5.2.0)
@@ -111,7 +111,7 @@ GEM
activerecord (6.1.7)
activemodel (= 6.1.7)
activesupport (= 6.1.7)
activerecord-import (1.4.0)
activerecord-import (1.4.1)
activerecord (>= 4.2)
activerecord-postgresql-adapter (0.0.1)
pg
@@ -140,6 +140,7 @@ GEM
activerecord (>= 4.2)
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
aes_key_wrap (1.1.0)
afm (0.2.2)
angular-rails-templates (1.2.0)
railties (>= 5.0, < 7.1)
@@ -153,29 +154,28 @@ GEM
arel-helpers (2.14.0)
activerecord (>= 3.1.0, < 8)
ast (2.4.2)
attr_required (1.0.1)
awesome_nested_set (3.5.0)
activerecord (>= 4.0.0, < 7.1)
aws-eventstream (1.2.0)
aws-partitions (1.601.0)
aws-sdk-core (3.131.2)
aws-partitions (1.651.0)
aws-sdk-core (3.166.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.525.0)
aws-sigv4 (~> 1.1)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.5)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.57.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sdk-kms (1.59.0)
aws-sdk-core (~> 3, >= 3.165.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.114.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sdk-s3 (1.117.1)
aws-sdk-core (~> 3, >= 3.165.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.4)
aws-sigv4 (1.5.0)
aws-sigv4 (1.5.2)
aws-eventstream (~> 1, >= 1.0.2)
axlsx_styler (1.1.0)
activesupport (>= 3.1)
caxlsx (>= 2.0.2)
bcrypt (3.1.18)
bigdecimal (3.0.2)
bindata (2.4.12)
bindex (0.8.1)
bootsnap (1.13.0)
msgpack (~> 1.2)
@@ -194,7 +194,7 @@ GEM
railties (>= 5.2)
thread-local (>= 1.1.0)
cancancan (1.15.0)
capybara (3.37.1)
capybara (3.38.0)
addressable
matrix
mini_mime (>= 0.1.3)
@@ -203,7 +203,7 @@ GEM
rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
caxlsx (3.1.1)
caxlsx (3.3.0)
htmlentities (~> 4.3, >= 4.3.4)
marcel (~> 1.0)
nokogiri (~> 1.10, >= 1.10.4)
@@ -242,7 +242,7 @@ GEM
debase-ruby_core_source (= 0.10.12)
msgpack
debase-ruby_core_source (0.10.12)
debug (1.6.2)
debug (1.6.3)
irb (>= 1.3.6)
reline (>= 0.3.1)
debugger-linecache (1.2.0)
@@ -265,7 +265,6 @@ GEM
dotenv-rails (2.8.1)
dotenv (= 2.8.1)
railties (>= 3.2)
dry-inflector (0.2.1)
erubi (1.11.0)
et-orbi (1.2.7)
tzinfo
@@ -276,10 +275,12 @@ GEM
factory_bot_rails (6.2.0)
factory_bot (~> 6.2.0)
railties (>= 5.0.0)
faraday (2.3.0)
faraday-net_http (~> 2.0)
faraday (2.6.0)
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-net_http (2.0.3)
faraday-follow_redirects (0.3.0)
faraday (>= 1, < 3)
faraday-net_http (3.0.1)
ferrum (0.11)
addressable (~> 2.5)
cliver (~> 0.3)
@@ -320,6 +321,10 @@ GEM
rspec-core (~> 3.0)
ruby-progressbar (~> 1.4)
geocoder (1.8.1)
gitlab-omniauth-openid-connect (0.10.0)
addressable (~> 2.7)
omniauth (>= 1.9, < 3)
openid_connect (~> 1.2)
globalid (1.0.0)
activesupport (>= 5.0)
gmaps4rails (2.1.2)
@@ -331,9 +336,11 @@ GEM
tilt
hashdiff (1.0.1)
hashery (2.1.2)
hashie (5.0.0)
highline (2.0.3)
hiredis (0.6.3)
htmlentities (4.3.4)
httpclient (2.8.3)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
i18n-js (3.9.2)
@@ -345,7 +352,7 @@ GEM
activerecord (>= 3.0)
io-console (0.5.11)
ipaddress (0.8.3)
irb (1.4.1)
irb (1.4.2)
reline (>= 0.3.0)
jmespath (1.6.1)
jquery-rails (4.4.0)
@@ -355,8 +362,14 @@ GEM
jquery-ui-rails (4.2.1)
railties (>= 3.2.16)
json (2.6.2)
json-schema (2.8.1)
addressable (>= 2.4)
json-jwt (1.16.0)
activesupport (>= 4.2)
aes_key_wrap
bindata
faraday (~> 2.0)
faraday-follow_redirects
json-schema (3.0.0)
addressable (>= 2.8)
json_spec (1.1.5)
multi_json (~> 1.0)
rspec (>= 2.0, < 4.0)
@@ -400,16 +413,38 @@ GEM
msgpack (1.5.4)
multi_json (1.15.0)
multi_xml (0.6.0)
net-protocol (0.1.3)
timeout
net-smtp (0.3.2)
net-protocol
nio4r (2.5.8)
nokogiri (1.13.8)
nokogiri (1.13.9)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
oauth2 (1.4.10)
oauth2 (1.4.11)
faraday (>= 0.17.3, < 3.0)
jwt (>= 1.0, < 3.0)
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (>= 1.2, < 3)
rack (>= 1.2, < 4)
omniauth (2.1.0)
hashie (>= 3.4.6)
rack (>= 2.2.3)
rack-protection
omniauth-rails_csrf_protection (1.0.1)
actionpack (>= 4.2)
omniauth (~> 2.0)
openid_connect (1.4.2)
activemodel
attr_required (>= 1.0.0)
json-jwt (>= 1.15.0)
net-smtp
rack-oauth2 (~> 1.21)
swd (~> 1.3)
tzinfo
validate_email
validate_url
webfinger (~> 1.2)
orm_adapter (0.5.0)
pagy (5.10.1)
activesupport
@@ -426,7 +461,7 @@ GEM
xml-simple
paypal-sdk-merchant (1.117.2)
paypal-sdk-core (~> 0.3.0)
pdf-reader (2.10.0)
pdf-reader (2.11.0)
Ascii85 (~> 1.0)
afm (~> 0.2.1)
hashery (~> 2.0)
@@ -445,6 +480,12 @@ GEM
rack (2.2.4)
rack-mini-profiler (2.3.4)
rack (>= 1.2.0)
rack-oauth2 (1.21.3)
activesupport
attr_required
httpclient
json-jwt (>= 1.11.0)
rack (>= 2.1.0)
rack-protection (2.1.0)
rack
rack-proxy (0.7.0)
@@ -505,7 +546,7 @@ GEM
ffi (~> 1.0)
redcarpet (3.5.1)
redis (4.8.0)
regexp_parser (2.5.0)
regexp_parser (2.6.0)
reline (0.3.1)
io-console (~> 0.5)
request_store (1.5.0)
@@ -520,9 +561,8 @@ GEM
roadie-rails (3.0.0)
railties (>= 5.1, < 7.1)
roadie (~> 5.0)
rodf (1.1.1)
rodf (1.2.0)
builder (>= 3.0)
dry-inflector (~> 0.1)
rubyzip (>= 1.0)
roo (2.9.0)
nokogiri (~> 1)
@@ -547,29 +587,32 @@ GEM
rspec-expectations (~> 3.10)
rspec-mocks (~> 3.10)
rspec-support (~> 3.10)
rspec-retry (0.6.2)
rspec-core (> 3.3)
rspec-support (3.10.3)
rswag-api (2.6.0)
rswag-api (2.7.0)
railties (>= 3.1, < 7.1)
rswag-specs (2.6.0)
rswag-specs (2.7.0)
activesupport (>= 3.1, < 7.1)
json-schema (~> 2.2)
json-schema (>= 2.2, < 4.0)
railties (>= 3.1, < 7.1)
rswag-ui (2.6.0)
rspec-core (>= 2.14)
rswag-ui (2.7.0)
actionpack (>= 3.1, < 7.1)
railties (>= 3.1, < 7.1)
rubocop (1.36.0)
rubocop (1.38.0)
json (~> 2.3)
parallel (~> 1.10)
parser (>= 3.1.2.1)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.20.1, < 2.0)
rubocop-ast (>= 1.23.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.21.0)
rubocop-ast (1.23.0)
parser (>= 3.1.1.0)
rubocop-rails (2.16.1)
rubocop-rails (2.17.2)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
@@ -594,8 +637,8 @@ GEM
semantic_range (3.0.0)
shoulda-matchers (5.2.0)
activesupport (>= 5.2.0)
sidekiq (6.5.7)
connection_pool (>= 2.2.5)
sidekiq (6.5.8)
connection_pool (>= 2.2.5, < 3)
rack (~> 2.0)
redis (>= 4.5.0, < 5)
sidekiq-scheduler (4.0.3)
@@ -609,9 +652,8 @@ GEM
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.3)
spreadsheet_architect (4.2.0)
axlsx_styler (>= 1.0.0, < 2)
caxlsx (>= 2.0.2, < 4)
spreadsheet_architect (5.0.0)
caxlsx (>= 3.3.0, < 4)
rodf (>= 1.0.0, < 2)
spring (4.1.0)
spring-commands-rspec (1.0.4)
@@ -642,14 +684,19 @@ GEM
redis
stringex (2.8.5)
stripe (7.1.0)
swd (1.3.0)
activesupport (>= 3)
attr_required (>= 0.0.5)
httpclient (>= 2.4)
temple (0.8.2)
test-prof (1.0.10)
test-prof (1.0.11)
test-unit (3.5.5)
power_assert
thor (1.2.1)
thread-local (1.1.0)
tilt (2.0.11)
timecop (0.9.5)
timeout (0.3.0)
ttfunk (1.7.0)
tzinfo (2.0.5)
concurrent-ruby (~> 1.0)
@@ -658,8 +705,14 @@ GEM
valid_email2 (4.0.4)
activemodel (>= 3.2)
mail (~> 2.5)
validate_email (0.1.6)
activemodel (>= 3.0)
mail (>= 2.2.5)
validate_url (1.0.15)
activemodel (>= 3.0.0)
public_suffix
vcr (6.1.0)
view_component (2.74.1)
view_component (2.75.0)
activesupport (>= 5.0.0, < 8.0)
concurrent-ruby (~> 1.0)
method_source (~> 1.0)
@@ -672,6 +725,9 @@ GEM
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
railties (>= 6.0.0)
webfinger (1.2.0)
activesupport
httpclient (>= 2.4)
webmock (3.18.1)
addressable (>= 2.8.0)
crack (>= 0.3.2)
@@ -692,7 +748,7 @@ GEM
xml-simple (1.1.8)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.6.1)
zeitwerk (2.6.4)
PLATFORMS
ruby
@@ -746,6 +802,7 @@ DEPENDENCIES
foreman
fuubar (~> 2.5.1)
geocoder
gitlab-omniauth-openid-connect
gmaps4rails
good_migrations
haml
@@ -770,6 +827,8 @@ DEPENDENCIES
monetize (~> 1.11)
oauth2 (~> 1.4.7)
ofn-qz!
omniauth-rails_csrf_protection
openid_connect (~> 1.3)
order_management!
pagy (~> 5.1)
paper_trail (~> 12.1.0)
@@ -796,6 +855,7 @@ DEPENDENCIES
roadie-rails
roo
rspec-rails (>= 3.5.2)
rspec-retry
rswag-api
rswag-specs
rswag-ui

View File

@@ -35,7 +35,13 @@ We also have a [Super Admin Guide][super-admin-guide] to help with configuration
If you'd like to help out with testing, please introduce yourself on the #testing channel on [Slack][slack-invite] and download the [ZenHub browser extension][zenhub] to view the development pipeline. Also, do have a look in our [Welcome New QAs board](https://github.com/orgs/openfoodfoundation/projects/1) for some good first issues, both on manual and automated testing (RSpec/Capybara).
We use [BrowserStack](https://www.browserstack.com/) as a manual testing tool. BrowserStack provides open source projects with unlimited and free of charge accounts. A big thanks to them!
We use [BrowserStack](https://www.browserstack.com/) as a manual testing tool. BrowserStack provides open source projects with unlimited and free of charge accounts. A big thanks to them!
We use [KnapsackPro](https://knapsackpro.com/) for optimal parallelisation of our automated tests. KnapsackPro offers unlimited plans for non-commercial open source projects, like ours - a big thanks to them!
![image](https://user-images.githubusercontent.com/49817236/201330047-e64147a7-d91c-4c10-bd4d-ca519d8fe945.png)
## Licence

View File

@@ -261,7 +261,8 @@ angular.module("ofn.admin").controller "AdminProductEditCtrl", ($scope, $timeout
product = BulkProducts.find product.id
variant.unit_value = parseFloat(match[1].replace(",", "."))
variant.unit_value = null if isNaN(variant.unit_value)
variant.unit_value *= product.variant_unit_scale if variant.unit_value && product.variant_unit_scale
if variant.unit_value && product.variant_unit_scale
variant.unit_value = parseFloat(window.bigDecimal.multiply(variant.unit_value, product.variant_unit_scale, 2))
variant.unit_description = match[3]
$scope.incrementLimit = ->

View File

@@ -5,6 +5,8 @@ angular.module("admin.lineItems").controller 'LineItemsCtrl', ($scope, $timeout,
$scope.confirmDelete = true
$scope.startDate = moment().startOf('day').subtract(7, 'days').format('YYYY-MM-DD')
$scope.endDate = moment().startOf('day').format('YYYY-MM-DD')
$scope.previousDates = { startDate: $scope.startDate, endDate: $scope.endDate }
$scope.datesChangedOnCancelEvent = false
$scope.bulkActions = [ { name: t("admin.orders.bulk_management.actions_delete"), callback: 'deleteLineItems' } ]
$scope.selectedUnitsProduct = {}
$scope.selectedUnitsVariant = {}
@@ -26,9 +28,27 @@ angular.module("admin.lineItems").controller 'LineItemsCtrl', ($scope, $timeout,
$scope.refreshData()
$scope.$watchCollection "[startDate, endDate]", (newValues, oldValues) ->
if newValues != oldValues
$scope.refreshData()
if newValues != oldValues && !$scope.datesChangedOnCancelEvent
state = $scope.refreshData()
if (state == "cancel")
$scope.datesChangedOnCancelEvent = true
$scope.cancelDateChange()
$scope.cancelDateChange = ->
# Reset the date filters to the previous values
$scope.startDate = $scope.previousDates.startDate
$scope.endDate = $scope.previousDates.endDate
# throw a flatpickr:change event to change the date back in the datepicker
event = new CustomEvent('flatpickr:change', {
detail: {
startDate: $scope.previousDates.startDate,
endDate: $scope.previousDates.endDate
}
})
window.dispatchEvent(event)
$timeout ->
$scope.datesChangedOnCancelEvent = false
$scope.refreshData = ->
unless !$scope.orderCycleFilter? || $scope.orderCycleFilter == ''
$scope.setOrderCycleDateRange()
@@ -38,6 +58,8 @@ angular.module("admin.lineItems").controller 'LineItemsCtrl', ($scope, $timeout,
return unless moment($scope.formattedStartDate).isValid() and moment($scope.formattedEndDate).isValid()
return "cancel" unless $scope.confirmRefresh()
$scope.loadOrders()
$scope.loadLineItems()
@@ -45,6 +67,11 @@ angular.module("admin.lineItems").controller 'LineItemsCtrl', ($scope, $timeout,
$scope.loadAssociatedData()
$scope.dereferenceLoadedData()
$timeout ->
# update the previous dates with the current ones since loading was successful
$scope.previousDates.startDate = $scope.startDate
$scope.previousDates.endDate = $scope.endDate
$scope.setOrderCycleDateRange = ->
start_date = OrderCycles.byID[$scope.orderCycleFilter].orders_open_at

View File

@@ -36,7 +36,7 @@ angular.module("admin.products")
$scope.product.master.unit_description = match[3]
else
value = $scope.product.master.unit_value
value /= $scope.product.variant_unit_scale if $scope.product.master.unit_value && $scope.product.variant_unit_scale
value = window.bigDecimal.divide(value, $scope.product.variant_unit_scale, 2) if $scope.product.master.unit_value && $scope.product.variant_unit_scale
$scope.product.master.unit_value_with_description = value + " " + $scope.product.master.unit_description
$scope.processUnitPrice = ->

View File

@@ -65,7 +65,8 @@ angular.module("ofn.admin").factory "BulkProducts", (ProductResource, dataFetche
variantUnitValue: (product, variant) ->
if variant.unit_value?
if product.variant_unit_scale
@divideAsInteger variant.unit_value, product.variant_unit_scale
variant_unit_value = @divideAsInteger variant.unit_value, product.variant_unit_scale
parseFloat(window.bigDecimal.round(variant_unit_value, 2))
else
variant.unit_value
else

View File

@@ -0,0 +1,15 @@
# frozen_string_literal: true
class FeatureToggleConstraint
def initialize(feature_name)
@feature = feature_name
end
def matches?(request)
OpenFoodNetwork::FeatureToggle.enabled?(@feature, current_user(request))
end
def current_user(request)
request.env['warden'].user
end
end

View File

@@ -1,11 +0,0 @@
# frozen_string_literal: true
class SplitCheckoutConstraint
def matches?(request)
OpenFoodNetwork::FeatureToggle.enabled? :split_checkout, current_user(request)
end
def current_user(request)
request.env['warden'].user
end
end

View File

@@ -6,6 +6,7 @@ module Admin
class EnterpriseFeesController < Admin::ResourceController
before_action :load_enterprise_fee_set, only: :index
before_action :load_data
before_action :check_enterprise_fee_input, only: [:bulk_update]
def index
@include_calculators = params[:include_calculators].present?
@@ -35,13 +36,6 @@ module Admin
end
def bulk_update
@flat_percent_value = enterprise_fee_bulk_params.dig('collection_attributes', '0', 'calculator_attributes', 'preferred_flat_percent')
unless @flat_percent_value.nil? || Float(@flat_percent_value, exception: false)
flash[:error] = I18n.t(:calculator_preferred_value_error)
return redirect_to redirect_path
end
@enterprise_fee_set = Sets::EnterpriseFeeSet.new(enterprise_fee_bulk_params)
if @enterprise_fee_set.save
@@ -105,5 +99,25 @@ module Admin
]
)
end
def check_enterprise_fee_input
enterprise_fee_bulk_params['collection_attributes'].each do |_, fee_row|
enterprise_fees = fee_row['calculator_attributes']&.slice(
:preferred_flat_percent, :preferred_amount,
:preferred_first_item, :preferred_additional_item,
:preferred_minimal_amount, :preferred_normal_amount,
:preferred_discount_amount, :preferred_per_unit
)
next unless enterprise_fees
enterprise_fees.each do |_, enterprise_amount|
unless enterprise_amount.nil? || Float(enterprise_amount, exception: false)
flash[:error] = I18n.t(:calculator_preferred_value_error)
return redirect_to redirect_path
end
end
end
end
end
end

View File

@@ -0,0 +1,7 @@
# frozen_string_literal: true
module Admin
class OidcSettingsController < Spree::Admin::BaseController
def index; end
end
end

View File

@@ -43,18 +43,12 @@ module Admin
@report_type = report_type
@report_subtypes = report_subtypes
@report_subtype = report_subtype
# Initialize data
params[:display_summary_row] = true if request.get?
if OpenFoodNetwork::FeatureToggle.enabled?(:report_inverse_columns_logic,
spree_current_user)
@params_fields_to_show = if request.get?
@report.columns.keys
else
params[:fields_to_show]
end
end
@report_title = if report_subtype
report_subtype_title
else
I18n.t(:name, scope: [:admin, :reports, @report_type])
end
@rendering_options = rendering_options
@data = Reporting::FrontendData.new(spree_current_user)
end
end

View File

@@ -22,12 +22,8 @@ class BaseController < ApplicationController
end
# Default to the only order cycle if there's only one
#
# Here we need to use @order_cycles.size not @order_cycles.count
# because OrderCyclesList returns a modified ActiveRecord::Relation
# and these modifications are not seen if it is reloaded with count
def set_order_cycle
return if @order_cycles.size != 1
return if @order_cycles.count != 1
current_order(true).set_order_cycle! @order_cycles.first
end

View File

@@ -50,7 +50,9 @@ module OrderCompletion
end
def order_invalid!
Bugsnag.notify("Notice: invalid order loaded during checkout", order: @order)
Bugsnag.notify("Notice: invalid order loaded during checkout") do |payload|
payload.add_metadata :order, @order
end
flash[:error] = t('checkout.order_not_loaded')
redirect_to main_app.shop_path
@@ -81,7 +83,9 @@ module OrderCompletion
end
def processing_failed(error = RuntimeError.new(order_processing_error))
Bugsnag.notify(error, order: @order)
Bugsnag.notify(error) do |payload|
payload.add_metadata :order, @order
end
flash[:error] = order_processing_error if flash.blank?
Checkout::PostCheckoutActions.new(@order).failure
end

View File

@@ -21,7 +21,9 @@ module OrderStockCheck
def check_order_cycle_expiry
return unless current_order_cycle&.closed?
Bugsnag.notify("Notice: order cycle closed during checkout completion", order: current_order)
Bugsnag.notify("Notice: order cycle closed during checkout completion") do |payload|
payload.add_metadata :order, current_order
end
current_order.empty!
current_order.set_order_cycle! nil

View File

@@ -39,6 +39,10 @@ module ReportsActions
params[:report_subtype] || report_subtypes_codes.first
end
def report_subtype_title
report_subtypes.select { |_name, key| key.to_sym == report_subtype.to_sym }.first[0]
end
def ransack_params
raw_params[:q]
end
@@ -58,4 +62,27 @@ module ReportsActions
def i18n_scope
'admin.reports'
end
def rendering_options
@rendering_options ||= ReportRenderingOptions.where(
user: spree_current_user,
report_type: report_type,
report_subtype: report_subtype
).first_or_create do |new_instance|
new_instance.options[:fields_to_show] = if @report.present?
@report.columns.keys - @report.fields_to_hide
else
[]
end
new_instance.options[:display_summary_row] = request.get? || params[:display_summary_row].present?
params[:display_header_row] = params[:display_header_row].present?
end
if params[:fields_to_show].present?
@rendering_options.options[:fields_to_show] = params[:fields_to_show]
end
@rendering_options.options[:display_summary_row] = params[:display_summary_row].present?
@rendering_options.options[:display_header_row] = params[:display_header_row].present?
@rendering_options.save
@rendering_options
end
end

View File

@@ -0,0 +1,16 @@
# frozen_string_literal: true
class OmniauthCallbacksController < Devise::OmniauthCallbacksController
def openid_connect
spree_current_user.link_from_omniauth(request.env["omniauth.auth"])
redirect_to admin_oidc_settings_path
end
def failure
error_message = request.env["omniauth.error"].to_s
flash[:error] = t("devise.oidc.failure", error: error_message)
super
end
end

View File

@@ -227,10 +227,10 @@ module Spree
def notify_bugsnag(error, product, variant)
Bugsnag.notify(error) do |report|
report.add_tab(:product, product.attributes)
report.add_tab(:product_error, product.errors.first) unless product.valid?
report.add_tab(:variant, variant.attributes)
report.add_tab(:variant_error, variant.errors.first) unless variant.valid?
report.add_metadata(:product, product.attributes)
report.add_metadata(:product_error, product.errors.first) unless product.valid?
report.add_metadata(:variant, variant.attributes)
report.add_metadata(:variant_error, variant.errors.first) unless variant.valid?
end
end

View File

@@ -95,11 +95,20 @@ module Spree
end
def check_shipping_fee_input
shipping_amount = permitted_resource_params.dig('calculator_attributes', 'preferred_amount')
shipping_fees = permitted_resource_params['calculator_attributes']&.slice(
:preferred_flat_percent, :preferred_amount,
:preferred_first_item, :preferred_additional_item,
:preferred_minimal_amount, :preferred_normal_amount,
:preferred_discount_amount, :preferred_per_unit
)
unless shipping_amount.nil? || Float(shipping_amount, exception: false)
flash[:error] = I18n.t(:calculator_preferred_value_error)
return redirect_to location_after_save
return unless shipping_fees
shipping_fees.each do |_, shipping_amount|
unless shipping_amount.nil? || Float(shipping_amount, exception: false)
flash[:error] = I18n.t(:calculator_preferred_value_error)
return redirect_to location_after_save
end
end
end
end

View File

@@ -32,7 +32,7 @@ module Spree
def load_object
@user ||= find_user
if @user
authorize! params[:action].to_sym, @user
authorize! :update, @user
else
redirect_to main_app.login_path
end

View File

@@ -1,48 +0,0 @@
# frozen_string_literal: true
require "spree/core/controller_helpers/auth"
require "spree/core/controller_helpers/common"
require "spree/core/controller_helpers/order"
module Spree
class UserRegistrationsController < Devise::RegistrationsController
helper 'spree/base'
include Spree::Core::ControllerHelpers::Auth
include Spree::Core::ControllerHelpers::Common
include Spree::Core::ControllerHelpers::Order
before_action :check_permissions, only: [:edit, :update]
skip_before_action :require_no_authentication
# GET /resource/edit
def edit
super
end
# PUT /resource
def update
super
end
# DELETE /resource
def destroy
super
end
# GET /resource/cancel
# Forces the session data which is usually expired after sign
# in to be expired now. This is useful if the user wants to
# cancel oauth signing in/up in the middle of the process,
# removing all OAuth session data.
def cancel
super
end
protected
def check_permissions
authorize!(:create, resource)
end
end
end

View File

@@ -1,13 +1,23 @@
# frozen_string_literal: true
require 'open_food_network/error_logger'
require "spree/core/controller_helpers/auth"
require "spree/core/controller_helpers/common"
require "spree/core/controller_helpers/order"
class UserRegistrationsController < Spree::UserRegistrationsController
class UserRegistrationsController < Devise::RegistrationsController
I18N_SCOPE = 'devise.user_registrations.spree_user'
before_action :set_checkout_redirect, only: :create
helper 'spree/base'
include Spree::Core::ControllerHelpers::Auth
include Spree::Core::ControllerHelpers::Common
include Spree::Core::ControllerHelpers::Order
include I18nHelper
skip_before_action :require_no_authentication
before_action :set_checkout_redirect, only: :create
before_action :set_locale
# POST /resource/sign_up

View File

@@ -1,7 +1,5 @@
# frozen_string_literal: true
require 'open_food_network/available_payment_method_filter'
module EnterprisesHelper
def current_distributor
@current_distributor ||= current_order(false)&.distributor
@@ -18,18 +16,7 @@ module EnterprisesHelper
end
def available_payment_methods
return [] if current_distributor.blank?
payment_methods = current_distributor.payment_methods.available(:both).to_a
filter = OpenFoodNetwork::AvailablePaymentMethodFilter.new
filter.filter!(payment_methods)
applicator = OpenFoodNetwork::TagRuleApplicator.new(current_distributor,
"FilterPaymentMethods", current_customer&.tag_list)
applicator.filter!(payment_methods)
payment_methods
OrderAvailablePaymentMethods.new(current_order, current_customer).to_a
end
def managed_enterprises

View File

@@ -55,7 +55,9 @@ class SubscriptionConfirmJob < ActiveJob::Base
if order.errors.any?
send_failed_payment_email(order)
else
Bugsnag.notify(e, order: order)
Bugsnag.notify(e) do |payload|
payload.add_metadata :order, order
end
send_failed_payment_email(order, e.message)
end
end
@@ -106,6 +108,9 @@ class SubscriptionConfirmJob < ActiveJob::Base
record_and_log_error(:failed_payment, order, error_message)
SubscriptionMailer.failed_payment_email(order).deliver_now
rescue StandardError => e
Bugsnag.notify(e, order: order, error_message: error_message)
Bugsnag.notify(e) do |payload|
payload.add_metadata :order, order
payload.add_metadata :error_message, error_message
end
end
end

View File

@@ -9,9 +9,9 @@ module PaymentMethodDistributors
extend ActiveSupport::Concern
included do
has_and_belongs_to_many :distributors, join_table: 'distributors_payment_methods',
class_name: 'Enterprise',
foreign_key: 'payment_method_id',
association_foreign_key: 'distributor_id'
has_many :distributor_payment_methods, dependent: :destroy
has_many :distributors, through: :distributor_payment_methods,
class_name: 'Enterprise',
foreign_key: 'distributor_id'
end
end

View File

@@ -6,20 +6,12 @@ module ProductStock
extend ActiveSupport::Concern
def on_demand
if variants?
raise 'Cannot determine product on_demand value of product with multiple variants' if variants.size > 1
raise 'Cannot determine product on_demand value of product with multiple variants' if variants.size > 1
variants.first.on_demand
else
master.on_demand
end
variants.first.on_demand
end
def on_hand
if variants?
variants.map(&:on_hand).reduce(:+)
else
master.on_hand
end
variants.map(&:on_hand).reduce(:+)
end
end

View File

@@ -0,0 +1,7 @@
# frozen_string_literal: true
class DistributorPaymentMethod < ApplicationRecord
self.table_name = "distributors_payment_methods"
belongs_to :payment_method, class_name: "Spree::PaymentMethod", touch: true
belongs_to :distributor, class_name: "Enterprise", touch: true
end

View File

@@ -16,19 +16,6 @@ class Enterprise < ApplicationRecord
large: { resize_to_fill: [1200, 260] },
}.freeze
self.ignored_columns = %i(terms_and_conditions_file_name
terms_and_conditions_content_type
terms_and_conditions_file_size
terms_and_conditions_updated_at
logo_file_name
logo_content_type
logo_file_size
logo_updated_at
promo_image_file_name
promo_image_content_type
promo_image_file_size
promo_image_updated_at)
searchable_attributes :sells, :is_primary_producer
searchable_associations :properties
searchable_scopes :is_primary_producer, :is_distributor, :is_hub, :activated, :visible,
@@ -69,10 +56,9 @@ class Enterprise < ApplicationRecord
has_many :users, through: :enterprise_roles
belongs_to :owner, class_name: 'Spree::User',
inverse_of: :owned_enterprises
has_and_belongs_to_many :payment_methods, join_table: 'distributors_payment_methods',
class_name: 'Spree::PaymentMethod',
foreign_key: 'distributor_id'
has_many :distributor_payment_methods, foreign_key: :distributor_id
has_many :distributor_shipping_methods, foreign_key: :distributor_id
has_many :payment_methods, through: :distributor_payment_methods
has_many :shipping_methods, through: :distributor_shipping_methods
has_many :customers
has_many :inventory_items
@@ -210,15 +196,14 @@ class Enterprise < ApplicationRecord
joins(:enterprise_roles).where('enterprise_roles.user_id = ?', user.id)
end
}
scope :relatives_of_one_union_others, lambda { |one, others|
scope :parents_of_one_union_others, lambda { |one, others|
where("
enterprises.id IN
(SELECT child_id FROM enterprise_relationships WHERE enterprise_relationships.parent_id=?)
OR enterprises.id IN
(SELECT parent_id FROM enterprise_relationships WHERE enterprise_relationships.child_id=?)
OR enterprises.id IN
(?)
", one, one, others)
", one, others)
}
def business_address_empty?(attributes)
@@ -273,9 +258,9 @@ class Enterprise < ApplicationRecord
", id, id)
end
def plus_relatives_and_oc_producers(order_cycles)
def plus_parents_and_order_cycle_producers(order_cycles)
oc_producer_ids = Exchange.in_order_cycle(order_cycles).incoming.pluck :sender_id
Enterprise.not_hidden.is_primary_producer.relatives_of_one_union_others(id, oc_producer_ids | [id])
Enterprise.not_hidden.is_primary_producer.parents_of_one_union_others(id, oc_producer_ids | [id])
end
def relatives_including_self
@@ -401,7 +386,7 @@ class Enterprise < ApplicationRecord
end
def ready_for_checkout?
shipping_methods.frontend.any? && payment_methods.available.any?
shipping_methods.frontend.any? && payment_methods.available.any?(&:configured?)
end
def self.find_available_permalink(test_permalink)

View File

@@ -5,15 +5,6 @@ require 'open_food_network/locking'
class EnterpriseGroup < ApplicationRecord
include PermalinkGenerator
self.ignored_columns = %i(logo_file_name
logo_content_type
logo_file_size
logo_updated_at
promo_image_file_name
promo_image_content_type
promo_image_file_size
promo_image_updated_at)
acts_as_list
has_and_belongs_to_many :enterprises, join_table: 'enterprise_groups_enterprises'

View File

@@ -24,6 +24,9 @@ class OrderCycle < ApplicationRecord
has_many :distributors, -> { distinct }, source: :receiver, through: :cached_outgoing_exchanges
has_many :order_cycle_schedules
has_many :schedules, through: :order_cycle_schedules
has_and_belongs_to_many :selected_distributor_payment_methods,
class_name: 'DistributorPaymentMethod',
join_table: 'order_cycles_distributor_payment_methods'
has_and_belongs_to_many :selected_distributor_shipping_methods,
class_name: 'DistributorShippingMethod',
join_table: 'order_cycles_distributor_shipping_methods'
@@ -152,12 +155,10 @@ class OrderCycle < ApplicationRecord
]
end
def attachable_payment_methods
Spree::PaymentMethod.available(:both).
joins("INNER JOIN distributors_payment_methods
ON payment_method_id = spree_payment_methods.id").
where("distributor_id IN (?)", distributor_ids).
distinct
def attachable_distributor_payment_methods
DistributorPaymentMethod.joins(:payment_method).
merge(Spree::PaymentMethod.available).
where("distributor_id IN (?)", distributor_ids)
end
def attachable_distributor_shipping_methods
@@ -167,21 +168,7 @@ class OrderCycle < ApplicationRecord
end
def clone!
oc = dup
oc.name = I18n.t("models.order_cycle.cloned_order_cycle_name", order_cycle: oc.name)
oc.orders_open_at = oc.orders_close_at = oc.mails_sent = oc.processed_at = nil
oc.coordinator_fee_ids = coordinator_fee_ids
# rubocop:disable Layout/LineLength
oc.preferred_product_selection_from_coordinator_inventory_only = preferred_product_selection_from_coordinator_inventory_only
# rubocop:enable Layout/LineLength
oc.schedule_ids = schedule_ids
oc.save!
exchanges.each { |e| e.clone!(oc) }
oc.selected_distributor_shipping_method_ids = (
attachable_distributor_shipping_methods.map(&:id) & selected_distributor_shipping_method_ids
)
sync_subscriptions
oc.reload
OrderCycleClone.new(self).create
end
def variants
@@ -293,6 +280,18 @@ class OrderCycle < ApplicationRecord
items.each { |li| scoper.scope(li.variant) }
end
def distributor_payment_methods
if simple? || selected_distributor_payment_methods.none?
attachable_distributor_payment_methods
else
attachable_distributor_payment_methods.where(
"distributors_payment_methods.id IN (?) OR distributor_id NOT IN (?)",
selected_distributor_payment_methods.map(&:id),
selected_distributor_payment_methods.map(&:distributor_id)
)
end
end
def distributor_shipping_methods
if simple? || selected_distributor_shipping_methods.none?
attachable_distributor_shipping_methods

View File

@@ -299,7 +299,7 @@ module ProductImport
entry.public_send("#{type}_category_id=", index[category])
else
mark_as_invalid(entry, attribute: "#{type}_category",
error: I18n.t('admin.product_import.model.not_found'))
error: I18n.t('admin.product_import.model.category_not_found'))
end
end

View File

@@ -68,7 +68,7 @@ module ProductImport
def invalid_attributes
invalid_attrs = {}
errors = @product_validations ? self.errors.messages.merge(@product_validations.messages) : self.errors.messages
errors = @product_validations ? @product_validations.messages.merge(self.errors.messages) : self.errors.messages
errors.each do |attr, message|
invalid_attrs[attr.to_s] = "#{attr.to_s.capitalize} #{message.first}"
end

View File

@@ -54,7 +54,7 @@ module ProductImport
end
def assign_weight_or_volume_attributes
units = @attrs['units'].to_f
units = @attrs['units'].to_d
unit_type = @attrs['unit_type'].to_s.downcase
return unless valid_unit_type? unit_type

View File

@@ -0,0 +1,4 @@
class ReportRenderingOptions < ApplicationRecord
belongs_to :user, class_name: "Spree::User"
serialize :options, Hash
end

View File

@@ -177,6 +177,8 @@ module Spree
end
can [:admin, :create], :manager_invitation
can [:admin, :index], :oidc_setting
end
def add_product_management_abilities(user)

View File

@@ -29,12 +29,7 @@ module Spree
delegate :name, to: :state, prefix: true, allow_nil: true
def self.default
country = begin
DefaultCountry.country
rescue StandardError
Spree::Country.first
end
new(country: country)
new(country: DefaultCountry.country)
end
def full_name

View File

@@ -6,6 +6,12 @@ module Spree
validates :name, :iso_name, presence: true
def self.cached_find_by(attrs)
Rails.cache.fetch("countries/#{attrs.hash}", expires_in: 1.hour) do
find_by(attrs)
end
end
def <=>(other)
name <=> other.name
end

View File

@@ -9,13 +9,6 @@ module Spree
large: { resize_to_limit: [600, 600] },
}.freeze
self.ignored_columns = %i(attachment_file_name
attachment_content_type
attachment_file_size
attachment_updated_at
attachment_width
attachment_height)
has_one_attached :attachment
validates :attachment, attached: true, content_type: %r{\Aimage/(png|jpeg|gif|jpg|svg\+xml|webp)\Z}

View File

@@ -28,6 +28,7 @@ module Spree
before_validation :adjust_quantity
before_validation :copy_price
before_validation :copy_tax_category
before_validation :copy_dimensions
validates :variant, presence: true
validates :quantity, numericality: {
@@ -122,6 +123,15 @@ module Spree
self.tax_category = variant.product.tax_category
end
def copy_dimensions
return unless variant
self.weight ||= computed_weight_from_variant
self.height ||= variant.height
self.width ||= variant.width
self.depth ||= variant.depth
end
def amount
price * quantity
end
@@ -226,6 +236,14 @@ module Spree
private
def computed_weight_from_variant
if variant.product.variant_unit == "weight"
variant.unit_value / variant.product.variant_unit_scale
else
variant.weight
end
end
def update_inventory
return unless changed?

View File

@@ -376,10 +376,6 @@ module Spree
payment_state == 'paid' || payment_state == 'credit_owed'
end
def available_payment_methods
@available_payment_methods ||= PaymentMethod.available(:both)
end
# "Checkout" is the initial state and, for card payments, "pending" is the state after auth
# These are both valid states to process the payment
def pending_payments
@@ -540,9 +536,9 @@ module Spree
# And the shipping fee is already up-to-date when this error occurs.
# https://github.com/openfoodfoundation/openfoodnetwork/issues/3924
Bugsnag.notify(e) do |report|
report.add_tab(:order, attributes)
report.add_tab(:shipment, shipment.attributes)
report.add_tab(:shipment_in_db, Spree::Shipment.find_by(id: shipment.id).attributes)
report.add_metadata(:order, attributes)
report.add_metadata(:shipment, shipment.attributes)
report.add_metadata(:shipment_in_db, Spree::Shipment.find_by(id: shipment.id).attributes)
end
end

View File

@@ -20,6 +20,8 @@ module Spree
after_initialize :init
scope :inactive_or_backend, -> { where("active = false OR display_on = 'back_end'") }
scope :production, -> { where(environment: 'production') }
scope :managed_by, lambda { |user|
@@ -57,6 +59,10 @@ module Spree
Rails.application.config.spree.payment_methods
end
def configured?
!stripe? || stripe_configured?
end
def provider_class
raise 'You must implement provider_class method for this gateway.'
end
@@ -71,6 +77,10 @@ module Spree
nil
end
def frontend?
active? && display_on != "back_end"
end
# The class that will process payments for this payment type, used for @payment.source
# e.g. CreditCard in the case of a the Gateway payment type
# nil means the payment method doesn't require a source e.g. check
@@ -120,5 +130,17 @@ module Spree
def distributor_validation
validates_with DistributorsValidator
end
def stripe?
type.ends_with?("StripeSCA")
end
def stripe_configured?
Spree::Config.stripe_connect_enabled &&
Stripe.publishable_key &&
preferred_enterprise_id.present? &&
preferred_enterprise_id > 0 &&
stripe_account_id.present?
end
end
end

View File

@@ -251,11 +251,6 @@ module Spree
permalink.present? ? permalink : (permalink_was || UrlGenerator.to_url(name))
end
# the master variant is not a member of the variants array
def variants?
variants.any?
end
def tax_category
if self[:tax_category_id].nil?
TaxCategory.find_by(is_default: true)

View File

@@ -7,8 +7,10 @@ module Spree
searchable_attributes :email
devise :database_authenticatable, :token_authenticatable, :registerable, :recoverable,
:rememberable, :trackable, :validatable,
:encryptable, :confirmable, encryptor: 'authlogic_sha512', reconfirmable: true
:rememberable, :trackable, :validatable, :omniauthable,
:encryptable, :confirmable,
encryptor: 'authlogic_sha512', reconfirmable: true,
omniauth_providers: [:openid_connect]
has_many :orders
belongs_to :ship_address, class_name: 'Spree::Address'
@@ -44,6 +46,8 @@ module Spree
after_create :associate_customers, :associate_orders
validate :limit_owned_enterprises
validates :uid, uniqueness: true, if: lambda { uid.present? }
validates_email :uid, if: lambda { uid.present? }
class DestroyWithOrdersError < StandardError; end
@@ -51,6 +55,10 @@ module Spree
User.admin.count > 0
end
def link_from_omniauth(auth)
update!(provider: auth.provider, uid: auth.uid)
end
# Whether a user has a role or not.
def has_spree_role?(role_in_question)
spree_roles.where(name: role_in_question.to_s).any?

View File

@@ -5,11 +5,6 @@ class TermsOfServiceFile < ApplicationRecord
validates :attachment, attached: true
self.ignored_columns = %i(attachment_file_name
attachment_content_type
attachment_file_size
attachment_updated_at)
# The most recently uploaded file is the current one.
def self.current
order(:id).last

View File

@@ -54,7 +54,7 @@ module Api
def producers
ActiveModel::ArraySerializer.new(
enterprise.plus_relatives_and_oc_producers(
enterprise.plus_parents_and_order_cycle_producers(
OrderCycle.not_closed.with_distributor(enterprise)
),
each_serializer: Api::EnterpriseThinSerializer

View File

@@ -10,6 +10,6 @@ class DefaultCountry
end
def self.country
Spree::Country.find_by(iso: ENV["DEFAULT_COUNTRY_CODE"]) || Spree::Country.first
Spree::Country.cached_find_by(iso: ENV["DEFAULT_COUNTRY_CODE"]) || Spree::Country.first
end
end

View File

@@ -5,17 +5,6 @@
class DefaultStockLocation
NAME = 'default'
def self.create!
country = Spree::Country.find_by(iso: ENV['DEFAULT_COUNTRY_CODE'])
state = country.states.first
Spree::StockLocation.create!(name: NAME, country_id: country.id, state_id: state.id,
backorderable_default: false)
end
def self.destroy_all
Spree::StockLocation.where(name: NAME).destroy_all
end
def self.find_or_create
Spree::StockLocation.find_or_create_by(name: NAME)
end

View File

@@ -0,0 +1,37 @@
# frozen_string_literal: true
class OrderAvailablePaymentMethods
attr_reader :order, :customer
delegate :distributor,
:order_cycle,
to: :order
def initialize(order, customer = nil)
@order, @customer = order, customer
end
def to_a
return [] if distributor.blank?
payment_methods = payment_methods_before_tag_rules_applied
applicator = OpenFoodNetwork::TagRuleApplicator.new(distributor,
"FilterPaymentMethods", customer&.tag_list)
applicator.filter!(payment_methods)
payment_methods.uniq
end
private
def payment_methods_before_tag_rules_applied
if order_cycle.nil? || order_cycle.simple?
distributor.payment_methods
else
distributor.payment_methods.where(
id: order_cycle.distributor_payment_methods.select(:payment_method_id)
)
end.available.select(&:configured?)
end
end

View File

@@ -0,0 +1,45 @@
# frozen_string_literal: true
require 'order_management/subscriptions/proxy_order_syncer'
class OrderCycleClone
def initialize(order_cycle)
@original_order_cycle = order_cycle
end
def create
oc = @original_order_cycle.dup
oc.name = I18n.t("models.order_cycle.cloned_order_cycle_name", order_cycle: oc.name)
oc.orders_open_at = oc.orders_close_at = oc.mails_sent = oc.processed_at = nil
oc.coordinator_fee_ids = @original_order_cycle.coordinator_fee_ids
oc.preferred_product_selection_from_coordinator_inventory_only =
@original_order_cycle.preferred_product_selection_from_coordinator_inventory_only
oc.schedule_ids = @original_order_cycle.schedule_ids
oc.save!
@original_order_cycle.exchanges.each { |e| e.clone!(oc) }
oc.selected_distributor_payment_method_ids = selected_distributor_payment_method_ids
oc.selected_distributor_shipping_method_ids = selected_distributor_shipping_method_ids
sync_subscriptions
oc.reload
end
private
def selected_distributor_payment_method_ids
@original_order_cycle.attachable_distributor_payment_methods.map(&:id) &
@original_order_cycle.selected_distributor_payment_method_ids
end
def selected_distributor_shipping_method_ids
@original_order_cycle.attachable_distributor_shipping_methods.map(&:id) &
@original_order_cycle.selected_distributor_shipping_method_ids
end
def sync_subscriptions
return unless @original_order_cycle.schedule_ids.any?
OrderManagement::Subscriptions::ProxyOrderSyncer.new(
Subscription.where(schedule_id: @original_order_cycle.schedule_ids)
).sync!
end
end

View File

@@ -12,6 +12,9 @@ class OrderCycleForm
@user = user
@permissions = OpenFoodNetwork::Permissions.new(user)
@schedule_ids = order_cycle_params.delete(:schedule_ids)
@selected_distributor_payment_method_ids = order_cycle_params.delete(
:selected_distributor_payment_method_ids
)
@selected_distributor_shipping_method_ids = order_cycle_params.delete(
:selected_distributor_shipping_method_ids
)
@@ -27,6 +30,7 @@ class OrderCycleForm
order_cycle.schedule_ids = schedule_ids if parameter_specified?(:schedule_ids)
order_cycle.save!
apply_exchange_changes
attach_selected_distributor_payment_methods
attach_selected_distributor_shipping_methods
sync_subscriptions
true
@@ -49,16 +53,29 @@ class OrderCycleForm
return if exchanges_unchanged?
OpenFoodNetwork::OrderCycleFormApplicator.new(order_cycle, user).go!
# reload so outgoing exchanges are up-to-date for shipping/payment method validations
order_cycle.reload
end
def attach_selected_distributor_payment_methods
return if @selected_distributor_payment_method_ids.nil?
order_cycle.selected_distributor_payment_method_ids = selected_distributor_payment_method_ids
order_cycle.save!
end
def attach_selected_distributor_shipping_methods
return if @selected_distributor_shipping_method_ids.nil?
order_cycle.reload # so outgoing exchanges are up-to-date for shipping method validations
order_cycle.selected_distributor_shipping_method_ids = selected_distributor_shipping_method_ids
order_cycle.save!
end
def attachable_distributor_payment_method_ids
@attachable_distributor_payment_method_ids ||= order_cycle.attachable_distributor_payment_methods.map(&:id)
end
def attachable_distributor_shipping_method_ids
@attachable_distributor_shipping_method_ids ||= order_cycle.attachable_distributor_shipping_methods.map(&:id)
end
@@ -69,6 +86,19 @@ class OrderCycleForm
end
end
def selected_distributor_payment_method_ids
@selected_distributor_payment_method_ids = (
attachable_distributor_payment_method_ids &
@selected_distributor_payment_method_ids.reject(&:blank?).map(&:to_i)
)
if attachable_distributor_payment_method_ids.sort == @selected_distributor_payment_method_ids.sort
@selected_distributor_payment_method_ids = []
end
@selected_distributor_payment_method_ids
end
def selected_distributor_shipping_method_ids
@selected_distributor_shipping_method_ids = (
attachable_distributor_shipping_method_ids &

View File

@@ -17,7 +17,8 @@ module PermittedAttributes
:name, :orders_open_at, :orders_close_at, :coordinator_id,
:preferred_product_selection_from_coordinator_inventory_only,
:automatic_notifications,
{ schedule_ids: [], selected_distributor_shipping_method_ids: [], coordinator_fee_ids: [] }
{ schedule_ids: [], selected_distributor_payment_method_ids: [],
selected_distributor_shipping_method_ids: [], coordinator_fee_ids: [] }
]
end

View File

@@ -24,7 +24,9 @@ class PlaceProxyOrder
send_placement_email
rescue StandardError => e
summarizer.record_and_log_error(:processing, order, e.message)
Bugsnag.notify(e, order: order)
Bugsnag.notify(e) do |payload|
payload.add_metadata :order, order
end
end
private
@@ -54,7 +56,10 @@ class PlaceProxyOrder
true
rescue StandardError => e
Bugsnag.notify(e, subscription: subscription, proxy_order: proxy_order)
Bugsnag.notify(e) do |payload|
payload.add_metadata :subscription, subscription
payload.add_metadata :proxy_order, proxy_order
end
false
end

View File

@@ -132,11 +132,11 @@ module Sets
def notify_bugsnag(error, product, variant, variant_attributes)
Bugsnag.notify(error) do |report|
report.add_tab(:product, product.attributes)
report.add_tab(:product_error, product.errors.first) unless product.valid?
report.add_tab(:variant_attributes, variant_attributes)
report.add_tab(:variant, variant.attributes)
report.add_tab(:variant_error, variant.errors.first) unless variant.valid?
report.add_metadata(:product, product.attributes)
report.add_metadata(:product_error, product.errors.first) unless product.valid?
report.add_metadata(:variant_attributes, variant_attributes)
report.add_metadata(:variant, variant.attributes)
report.add_metadata(:variant_error, variant.errors.first) unless variant.valid?
end
end

View File

@@ -8,9 +8,11 @@ module Shop
end
def self.ready_for_checkout_for(distributor, customer)
return OrderCycle.none unless distributor.ready_for_checkout?
new(distributor, customer).call
new(distributor, customer).call.select do |order_cycle|
order = Spree::Order.new(distributor: distributor, order_cycle: order_cycle)
OrderAvailablePaymentMethods.new(order, customer).to_a.any? &&
OrderAvailableShippingMethods.new(order, customer).to_a.any?
end
end
def initialize(distributor, customer)

View File

@@ -5,12 +5,6 @@
%legend= t(".#{ item[:name] }.legend")
= render "admin/enterprises/form/#{ item[:form_name] || item[:name] }", f: f
- when 'address'
= f.fields_for :address do |af|
%fieldset.alpha.no-border-bottom{ id: "#{item[:name]}_panel", data: { "tabs-and-panels-target": "panel" }}
%legend= t(".#{ item[:name] }.legend")
= render 'admin/enterprises/form/address', af: af
- when 'enterprise_permissions'
%fieldset.alpha.no-border-bottom{ id: "#{item[:name]}_panel", data: { "tabs-and-panels-target": "panel" }}
%legend= t(".#{ item[:name] }.legend")

View File

@@ -87,16 +87,16 @@
= af.text_field :city, { placeholder: t(:city_placeholder)}
.five.columns.omega
= af.text_field :zipcode, { placeholder: t(:postcode_placeholder)}
%div{"data-controller": "dependant-select", "data-dependant-select-options-value": countries_with_states }
%div{"data-controller": "dependent-select", "data-dependent-select-options-value": countries_with_states }
.row
.three.columns.alpha
= af.label :state_id, t(:state)
\/
= af.label :country_id, t(:country)
.four.columns
= af.select :country_id, available_countries.map { |c| [c.name, c.id] }, {}, { "data-controller": "tom-select", "data-dependant-select-target": "source", "data-action": "dependant-select#handleSelectChange", class: "primary" }
= af.select :country_id, available_countries.map { |c| [c.name, c.id] }, {}, { "data-controller": "tom-select", "data-dependent-select-target": "source", "data-action": "dependent-select#handleSelectChange", class: "primary" }
.five.columns.omega
= af.select :state_id, @enterprise.address.country.states.map { |s| [s.name, s.id] }, {}, { "data-controller": "tom-select", "data-dependant-select-target": "select", class: "primary" }
= af.select :state_id, @enterprise.address.country.states.map { |s| [s.name, s.id] }, {}, { "data-controller": "tom-select", "data-dependent-select-target": "select", class: "primary" }
.row
.three.columns.alpha
= af.label :latitude, t(:latitude)

View File

@@ -1,54 +1,55 @@
-# redo denoting required fields in the whole project
.row
= t(:required_fields)
(
%span.required *
)
.row
.three.columns.alpha
= af.label :address1, t(:address)
= f.fields_for :address do |af|
.row
= t(:required_fields)
(
%span.required *
.eight.columns.omega
= af.text_field :address1, { placeholder: t(:address_placeholder) }
.row
.alpha.three.columns
= af.label :address2, t(:address2)
.eight.columns.omega
= af.text_field :address2
.row
.three.columns.alpha
= af.label :city, t(:city)
\/
= af.label :zipcode, t(:postcode)
%span.required *
.four.columns
= af.text_field :city, { placeholder: t(:city_placeholder) }
.four.columns.omega
= af.text_field :zipcode, { placeholder: t(:postcode_placeholder) }
.row{"data-controller": "dependent-select", "data-dependent-select-options-value": countries_with_states }
.three.columns.alpha
= af.label :state_id, t(:state)
\/
= af.label :country_id, t(:country)
%span.required *
.four.columns
= af.select :state_id, @enterprise.address.country.states.map { |s| [s.name, s.id] }, {}, { "data-controller": "tom-select", "data-dependent-select-target": "select", class: "primary" }
.four.columns.omega{ data: { controller: "primary-details" }}
= af.select :country_id, available_countries.map { |c| [c.name, c.id] }, {}, { "data-controller": "tom-select", "data-dependent-select-target": "source", "data-action": "dependent-select#handleSelectChange", class: "primary" }
.row
.three.columns.alpha
= af.label :latitude, t(:latitude)
\/
= af.label :longitude, t(:longitude)
%span.required *
= render partial: 'admin/shared/tooltip', locals: {tooltip_text: t('latitude_longitude_tip')}
.four.columns
= af.text_field :latitude, { placeholder: t(:latitude_placeholder) }
.four.columns.omega
= af.text_field :longitude, { placeholder: t(:longitude_placeholder) }
.row
.three.columns.alpha
= "&nbsp;".html_safe
.five.columns.omega
= check_box_tag "use_geocoder"
= label_tag "use_geocoder", t('use_geocoder')
)
.row
.three.columns.alpha
= af.label :address1, t(:address)
%span.required *
.eight.columns.omega
= af.text_field :address1, { placeholder: t(:address_placeholder) }
.row
.alpha.three.columns
= af.label :address2, t(:address2)
.eight.columns.omega
= af.text_field :address2
.row
.three.columns.alpha
= af.label :city, t(:city)
\/
= af.label :zipcode, t(:postcode)
%span.required *
.four.columns
= af.text_field :city, { placeholder: t(:city_placeholder) }
.four.columns.omega
= af.text_field :zipcode, { placeholder: t(:postcode_placeholder) }
.row{"data-controller": "dependent-select", "data-dependent-select-options-value": countries_with_states }
.three.columns.alpha
= af.label :state_id, t(:state)
\/
= af.label :country_id, t(:country)
%span.required *
.four.columns
= af.select :state_id, @enterprise.address.country.states.map { |s| [s.name, s.id] }, {}, { "data-controller": "tom-select", "data-dependent-select-target": "select", class: "primary" }
.four.columns.omega{ data: { controller: "primary-details" }}
= af.select :country_id, available_countries.map { |c| [c.name, c.id] }, {}, { "data-controller": "tom-select", "data-dependent-select-target": "source", "data-action": "dependent-select#handleSelectChange", class: "primary" }
.row
.three.columns.alpha
= af.label :latitude, t(:latitude)
\/
= af.label :longitude, t(:longitude)
%span.required *
= render partial: 'admin/shared/tooltip', locals: {tooltip_text: t('latitude_longitude_tip')}
.four.columns
= af.text_field :latitude, { placeholder: t(:latitude_placeholder) }
.four.columns.omega
= af.text_field :longitude, { placeholder: t(:longitude_placeholder) }
.row
.three.columns.alpha
= "&nbsp;".html_safe
.five.columns.omega
= check_box_tag "use_geocoder"
= label_tag "use_geocoder", t('use_geocoder')

View File

@@ -9,6 +9,7 @@
.three.columns.alpha
= bf.label :address1, t('.address1')
%i.text-big.icon-question-sign{ "data-controller": "help-modal-link", "data-action": "click->help-modal-link#open", "data-help-modal-link-target-value": "business_address_info_modal" }
.eight.columns.omega
= bf.text_field :address1, { placeholder: t(".address1_placeholder") }
.row
.alpha.three.columns
@@ -24,16 +25,16 @@
= bf.text_field :city, { placeholder: t(:city_placeholder) }
.four.columns.omega
= bf.text_field :zipcode, { placeholder: t(:postcode_placeholder) }
.row
.row{"data-controller": "dependent-select", "data-dependent-select-options-value": countries_with_states }
.three.columns.alpha
= bf.label :country_id, t(:country)
\/
= bf.label :state_id, t(:state)
%div{"data-controller": "dependant-select", "data-dependant-select-options-value": countries_with_states }
.four.columns
= bf.select :country_id, available_countries.map { |c| [c.name, c.id] }, {}, { "data-controller": "tom-select", "data-dependant-select-target": "source", "data-action": "dependant-select#handleSelectChange", class: "primary" }
.four.columns.omega
= bf.select :state_id, @enterprise.address.country.states.map { |s| [s.name, s.id] }, {}, { "data-controller": "tom-select", "data-dependant-select-target": "select", class: "primary" }
.four.columns
= bf.select :country_id, options_for_select(available_countries.map { |c| [c.name, c.id] }, @enterprise.business_address.country_id), {}, { "data-controller": "tom-select", "data-dependent-select-target": "source", "data-action": "dependent-select#handleSelectChange", class: "primary" }
.four.columns.omega
- states = @enterprise.business_address.country.present? ? @enterprise.business_address.country&.states&.map { |s| [s.name, s.id] } : []
= bf.select :state_id, states, {}, { "data-controller": "tom-select", "data-dependent-select-target": "select", class: "primary" }
.row
.three.columns.alpha

View File

@@ -0,0 +1,25 @@
- content_for :page_title do
= t(".title")
= render 'admin/shared/enterprises_sub_menu'
%div
%h2= t(".connect")
%br
- if spree_current_user.provider == 'openid_connect' && spree_current_user.uid.present?
= t(".already_connected")
= spree_current_user.uid
%br
%br
= t(".view_account")
= link_to t(".les_communs_link"), "#{ Devise.omniauth_configs[:openid_connect].options[:issuer] }/account"
- else
= t(".link_your_account")
%br
%br
= button_to t(".link_account_button"),
Spree::Core::Engine.routes.url_helpers.spree_user_openid_connect_omniauth_authorize_path(auth_type: "login"),
method: :post

View File

@@ -10,8 +10,6 @@
%fieldset.no-border-bottom
%legend{ align: 'center'}= t('.checkout_options')
= hidden_field_tag "order_cycle[selected_distributor_shipping_method_ids][]", ""
.row
.three.columns
&nbsp;
@@ -19,10 +17,12 @@
%table.checkout-options
%thead
%tr
%th{ colspan: 2 }= t('.shipping_methods')
%th{ colspan: 2 }
= t('.shipping_methods')
= hidden_field_tag "order_cycle[selected_distributor_shipping_method_ids][]", ""
- @order_cycle.distributors.each do |distributor|
- distributor_shipping_methods = @order_cycle.attachable_distributor_shipping_methods.where("distributor_id = ?", distributor.id).includes(:shipping_method)
%tr{ "data-controller": "select-all" }
%tr{ class: "distributor-#{distributor.id}-shipping-methods", "data-controller": "select-all" }
%td.text-center
- if distributor_shipping_methods.many?
%label
@@ -48,17 +48,36 @@
%p
= t('.no_shipping_methods')
%tr
%th{ colspan: 2 }= t('.payment_methods')
%tr
%td
%td
- if @order_cycle.attachable_payment_methods.available(:both).any?
%ul
- @order_cycle.attachable_payment_methods.available(:both).each do |payment_method|
%li= payment_method.name
- else
%p
= t('.no_payment_methods')
%th{ colspan: 2 }
= t('.payment_methods')
= hidden_field_tag "order_cycle[selected_distributor_payment_method_ids][]", ""
- @order_cycle.distributors.each do |distributor|
- distributor_payment_methods = @order_cycle.attachable_distributor_payment_methods.where("distributor_id = ?", distributor.id).includes(:payment_method)
%tr{ class: "distributor-#{distributor.id}-payment-methods", "data-controller": "select-all" }
%td.text-center
- if distributor_payment_methods.many?
%label
= check_box_tag nil, nil, nil, { "data-action": "change->select-all#toggleAll", "data-select-all-target": "all" }
= t(".select_all")
%td
%em= distributor.name
- distributor_payment_methods.each do |distributor_payment_method|
%p
%label{ class: ("disabled" if distributor_payment_methods.one? || !distributor_payment_method.payment_method.frontend?) }
= check_box_tag "order_cycle[selected_distributor_payment_method_ids][]",
distributor_payment_method.id,
@order_cycle.distributor_payment_methods.include?(distributor_payment_method),
id: "order_cycle_selected_distributor_payment_method_ids_#{distributor_payment_method.id}",
data: ({ "action" => "change->select-all#toggleCheckbox", "select-all-target" => "checkbox" } if distributor_payment_method.payment_method.frontend?)
= distributor_payment_method.payment_method.name
- distributor.payment_methods.inactive_or_backend.each do |payment_method|
%label.disabled
= check_box_tag nil, nil, false, disabled: true
= payment_method.name
= "(#{t('.back_end')})"
- if distributor.payment_methods.available.none?
%p
= t('.no_payment_methods')
%div#save-bar
%div.container

View File

@@ -1,11 +1,5 @@
- if @report_subtypes.present? && @report_subtypes.count > 1
- if feature?(:report_inverse_columns_logic, spree_current_user)
%input{type: 'hidden', name: 'report_subtype', value: @report_subtype}
- else
.row
.alpha.two.columns= label_tag nil, t(:report_type)
.omega.fourteen.columns
= select_tag(:report_subtype, options_for_select(@report_subtypes, @report_subtype))
%input{type: 'hidden', name: 'report_subtype', value: @report_subtype}
.row.rendering-options{ "data-controller": "csv-select" }
.alpha.two.columns
@@ -22,21 +16,16 @@
.omega.fourteen.columns
- if @report.header_option?
%span.inline-checkbox{ style: "margin-right: 1rem;" }
= check_box_tag :display_header_row, true, params[:display_header_row]
= check_box_tag :display_header_row, true, @render_options.options[:display_header_row]
= label_tag :display_header_row, t(".header_row")
- if @report.summary_row_option?
%span.inline-checkbox
= check_box_tag :display_summary_row, true, params[:display_summary_row], { "data-csv-select-target": "checkbox" }
= check_box_tag :display_summary_row, true, @render_options.options[:display_summary_row], { "data-csv-select-target": "checkbox" }
= label_tag :display_summary_row, t(".summary_row"), { "data-csv-select-target": "label" }
- if @report.available_headers.present?
.row
- if feature? :report_inverse_columns_logic, spree_current_user
.alpha.two.columns= label_tag nil, t(:report_columns)
.omega.fourteen.columns
= render MultipleCheckedSelectComponent.new(name: "fields_to_show", options: @report.available_headers, selected: @params_fields_to_show)
- else
.alpha.two.columns= label_tag nil, t(:report_hide_columns)
.omega.fourteen.columns
= select_tag(:fields_to_hide, options_for_select(@report.available_headers, params[:fields_to_hide]),
class: "select2 fullwidth", multiple: true)
.alpha.two.columns= label_tag nil, t(:report_columns)
.omega.fourteen.columns
= render MultipleCheckedSelectComponent.new(name: "fields_to_show", options: @report.available_headers, selected: @render_options.options[:fields_to_show])

View File

@@ -11,13 +11,9 @@
- @reports.each do |report_type, report_subtypes|
%tr
%td
- name = I18n.t(:name, scope: [:admin, :reports, report_type])
- url = main_app.admin_report_url(report_type: report_type)
= link_to name, url
= I18n.t(:name, scope: [:admin, :reports, report_type])
%td
- begin
= I18n.t!(:description, scope: [:admin, :reports, report_type])
- if feature? :report_inverse_columns_logic, spree_current_user
= render partial: "report_subtype", locals: { report_subtypes: report_subtypes, report_type: report_type }
- rescue I18n::MissingTranslationData
= render partial: "report_subtype", locals: { report_subtypes: report_subtypes, report_type: report_type }
- if report_subtypes.empty?
- name = I18n.t(:name, scope: [:admin, :reports, report_type])
- report_subtypes = [[name, nil]]
= render partial: "report_subtype", locals: { report_subtypes: report_subtypes, report_type: report_type }

View File

@@ -1,3 +1,6 @@
- content_for :page_title do
= @report_title
= form_for @report.search, :url => url_for(only_path: false) do |f|
%fieldset.no-border-bottom.print-hidden
%legend{ align: 'center'}= t(:report_filters)

View File

@@ -2,3 +2,5 @@
%ul#sub_nav.inline-menu{"data-hook" => "admin_enterprise_sub_tabs"}
= tab :enterprises, url: main_app.admin_enterprises_path
= tab :enterprise_relationships, url: main_app.admin_enterprise_relationships_path
- if ENV["OPENID_APP_ID"].present? && ENV["OPENID_APP_SECRET"].present?
= tab :oidc_settings, url: main_app.admin_oidc_settings_path

View File

@@ -4,6 +4,6 @@
= form_with url: "/admin/subscriptions/new", method: :get do |f|
.text-left.margin-bottom-30
= select_tag "subscription[shop_id]", options_from_collection_for_select(@shops, "id", "name"), { "data-controller": "tom-select", "data-dependant-select-target": "source", "data-action": "dependant-select#handleSelectChange", class: "primary" }
= select_tag "subscription[shop_id]", options_from_collection_for_select(@shops, "id", "name"), { "data-controller": "tom-select", "data-dependent-select-target": "source", "data-action": "dependent-select#handleSelectChange", class: "primary" }
.text-center
= f.submit "Continue", class: "button red icon-plus"
= f.submit "Continue", class: "button red icon-plus"

View File

@@ -1,4 +1,10 @@
%p
%input{ type: "checkbox", id: "accept_terms", ng: { model: "platform_tos_accepted", init: "platform_tos_accepted = #{platform_tos_already_accepted?}" } }
%label.small{for: "platform_tos_accepted"}
%input{ type: "checkbox",
id: "accept_terms",
ng: {
model: "platform_tos_accepted",
init: "platform_tos_accepted = #{platform_tos_already_accepted?}"
}
}
%label.small{for: "accept_terms"}
= t(".message_html", tos_link: link_to_platform_terms)

View File

@@ -0,0 +1,19 @@
<%- if controller_name != 'sessions' %>
<%= link_to t(".sign_in"), new_session_path(resource_name) %><br />
<% end %>
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
<%= link_to t(".sign_up"), new_registration_path(resource_name) %><br />
<% end %>
<%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
<%= link_to t(".forgot_your_password"), new_password_path(resource_name) %><br />
<% end %>
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
<%= link_to t('.didn_t_receive_confirmation_instructions'), new_confirmation_path(resource_name) %><br />
<% end %>
<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
<%= link_to t('.didn_t_receive_unlock_instructions'), new_unlock_path(resource_name) %><br />
<% end %>

View File

@@ -2,7 +2,7 @@
%a{"ng-click" => "triggerProductModal()"}
%span.product-thumb__bulk-label{"ng-if" => "::product.group_buy"}
= t(".bulk")
%img{"ng-src" => "{{::product.primaryImageOrMissing}}"}
%img{"ng-src" => "{{::product.primaryImageOrMissing}}", loading: "lazy"}
.summary
.summary-header

View File

@@ -50,16 +50,16 @@
= bill_address.text_field :zipcode, { placeholder: t("split_checkout.step1.address.zipcode.placeholder") }
= f.error_message_on "bill_address.zipcode"
%div{ "data-controller": "dependant-select", "data-dependant-select-options-value": countries_with_states }
%div{ "data-controller": "dependent-select", "data-dependent-select-options-value": countries_with_states }
- bill_address_country = @order.bill_address.country || DefaultCountry.country
%div.checkout-input
= bill_address.label :country_id, t("split_checkout.step1.address.country_id.label")
= bill_address.select :country_id, countries, { selected: bill_address_country.id }, { "data-dependant-select-target": "source", "data-action": "dependant-select#handleSelectChange" }
= bill_address.select :country_id, countries, { selected: bill_address_country.id }, { "data-dependent-select-target": "source", "data-action": "dependent-select#handleSelectChange" }
%div.checkout-input
= bill_address.label :state_id, t("split_checkout.step1.address.state_id.label")
= bill_address.select :state_id, states_for_country(bill_address_country), { selected: @order.bill_address&.state_id }, { "data-dependant-select-target": "select" }
= bill_address.select :state_id, states_for_country(bill_address_country), { selected: @order.bill_address&.state_id }, { "data-dependent-select-target": "select" }
- if spree_current_user
%div.checkout-input
@@ -130,16 +130,16 @@
= ship_address.text_field :zipcode, { placeholder: t("split_checkout.step1.address.zipcode.placeholder") }
= f.error_message_on "ship_address.zipcode"
%div{ "data-controller": "dependant-select", "data-dependant-select-options-value": countries_with_states }
%div{ "data-controller": "dependent-select", "data-dependent-select-options-value": countries_with_states }
- ship_address_country = @order.ship_address.country || DefaultCountry.country
%div.checkout-input
= ship_address.label :country_id, t("split_checkout.step1.address.country_id.label")
= ship_address.select :country_id, countries, { selected: ship_address_country.id }, { "data-dependant-select-target": "source", "data-action": "dependant-select#handleSelectChange" }
= ship_address.select :country_id, countries, { selected: ship_address_country.id }, { "data-dependent-select-target": "source", "data-action": "dependent-select#handleSelectChange" }
%div.checkout-input
= ship_address.label :state_id, t("split_checkout.step1.address.state_id.label")
= ship_address.select :state_id, states_for_country(ship_address_country), { selected: @order.ship_address&.state_id }, { "data-dependant-select-target": "select" }
= ship_address.select :state_id, states_for_country(ship_address_country), { selected: @order.ship_address&.state_id }, { "data-dependent-select-target": "select" }
- if spree_current_user
%div.checkout-input{ "data-toggle-target": "content", style: "display: #{display_ship_address ? 'block' : 'none'}" }

View File

@@ -23,8 +23,8 @@
%br
%div{ data: { controller: "flatpickr", "flatpickr-mode-value": "range", "flatpickr-default-date": "{{ [startDate, endDate] }}" } }
%input.datepicker.fullwidth{ class: "datepicker", data: { "flatpickr-target": "instance" } }
%input{ type: "text", id: 'start_date_filter', 'ng-model': "startDate", data: { "flatpickr-target": "start" }, style: "display: none;", "confirm-change": "confirmRefresh()" }
%input{ type: "text", id: 'end_date_filter', 'ng-model': "endDate", data: { "flatpickr-target": "end" }, style: "display: none;", "confirm-change": "confirmRefresh()"}
%input{ type: "text", id: 'start_date_filter', 'ng-model': "startDate", data: { "flatpickr-target": "start" }, style: "display: none;" }
%input{ type: "text", id: 'end_date_filter', 'ng-model': "endDate", data: { "flatpickr-target": "end" }, style: "display: none;" }
.one.column &nbsp;
.filter_select{ :class => "three columns" }
%label{ :for => 'supplier_filter' }

View File

@@ -24,6 +24,6 @@
= t(".active_products", count: @product_count )
%span.three.columns.omega
%span.icon-remove-sign
%a.eight.columns.alpha.button.bottom.red{ href: "#{new_admin_product_path}" }
%a.sixteen.columns.alpha.button.bottom.red{ href: "#{new_admin_product_path}" }
= t "spree_admin_enterprises_create_new_product"
%span.icon-arrow-right

View File

@@ -1,6 +1,6 @@
= f.field_container :primary_taxon_id do
= f.field_container :primary_taxon do
= f.label :primary_taxon_id, t('.product_category')
%span.required *
%br
= f.collection_select(:primary_taxon_id, Spree::Taxon.order(:name), :id, :name, {:include_blank => true}, {:class => "select2 fullwidth"})
= f.error_message_on :primary_taxon_id
= f.error_message_on :primary_taxon

View File

@@ -1,6 +1,5 @@
= f.field_container :tax_category_id do
= f.label :tax_category_id, t(:tax_category)
%span.required *
%br
= f.collection_select(:tax_category_id, Spree::TaxCategory.all, :id, :name, {:include_blank => Spree::Config.products_require_tax_category ? false : t(:none)}, {:class => "select2 fullwidth"})
= f.error_message_on :tax_category_id

View File

@@ -10,7 +10,6 @@
.eight.columns.alpha
= f.field_container :supplier do
= f.label :supplier_id, t(".supplier")
%span.required *
= f.select :supplier_id, options_from_collection_for_select(@producers, :id, :name, @product.supplier_id), {}, { "data-controller": "tom-select", class: "primary" }
= f.error_message_on :supplier
.eight.columns.omega
@@ -22,13 +21,14 @@
= f.error_message_on :name
.sixteen.columns.alpha
.eight.columns.alpha
= f.field_container :units do
= f.field_container :variant_unit do
= f.label :variant_unit_with_scale, t(".units")
%span.required *
%select{id: 'product_variant_unit_with_scale', 'ng-model' => 'product.variant_unit_with_scale', 'ng-options' => 'unit[1] as unit[0] for unit in variant_unit_options',"data-controller": "tom-select", class: "primary"}
%select{id: 'product_variant_unit_with_scale', 'ng-model' => 'product.variant_unit_with_scale', 'ng-options' => 'unit[1] as unit[0] for unit in variant_unit_options', "data-controller": "tom-select","data-tom-select-options-value": '{"allowEmptyOption":false}', class: "primary"}
%option{'value' => '', 'ng-hide' => "hasUnit(product)"}
%input{ type: 'hidden', 'ng-value': 'product.variant_unit', "ng-init": "product.variant_unit='#{@product.variant_unit}'", name: 'product[variant_unit]' }
%input{ type: 'hidden', 'ng-value': 'product.variant_unit_scale', "ng-init": "product.variant_unit_scale='#{@product.variant_unit_scale}'", name: 'product[variant_unit_scale]' }
= f.error_message_on :variant_unit
.two.columns
= f.field_container :unit_value do
= f.label :unit_value_with_description, t(".value"), 'ng-disabled' => "!hasUnit(product)"
@@ -36,6 +36,7 @@
%input.fullwidth{ id: 'product_unit_value_with_description', 'ng-model' => 'product.master.unit_value_with_description', :type => 'text', placeholder: "eg. 2", 'ng-disabled' => "!hasUnit(product)" }
%input{ type: 'hidden', 'ng-value': 'product.master.unit_value', "ng-init": "product.master.unit_value='#{@product.master.unit_value}'", name: 'product[unit_value]' }
%input{ type: 'hidden', 'ng-value': 'product.master.unit_description', "ng-init": "product.master.unit_description='#{@product.master.unit_description}'", name: 'product[unit_description]' }
= f.error_message_on :unit_value
= render 'display_as', f: f
.six.columns.omega{ 'ng-show' => "product.variant_unit_with_scale == 'items'" }
= f.field_container :unit_name do

View File

@@ -4,7 +4,7 @@
= tab :orders, :subscriptions, :customer_details, :adjustments, :payments, :return_authorizations, url: admin_orders_path('q[s]' => 'completed_at desc'), icon: 'icon-shopping-cart'
= tab :reports, url: main_app.admin_reports_path, icon: 'icon-file'
= tab :general_settings, :mail_methods, :tax_categories, :tax_rates, :tax_settings, :zones, :countries, :states, :payment_methods, :taxonomies, :shipping_methods, :shipping_categories, :enterprise_fees, :contents, :invoice_settings, :matomo_settings, :stripe_connect_settings, label: 'configuration', icon: 'icon-wrench', url: edit_admin_general_settings_path
= tab :enterprises, :enterprise_relationships, url: main_app.admin_enterprises_path
= tab :enterprises, :enterprise_relationships, :oidc_settings, url: main_app.admin_enterprises_path
= tab :customers, url: main_app.admin_customers_path
= tab :enterprise_groups, url: main_app.admin_enterprise_groups_path, label: 'groups'
- if can? :admin, Spree::User

View File

@@ -51,6 +51,7 @@ export default class extends Flatpickr {
plugins: this.plugins(mode, datetimepicker),
mode,
};
window.addEventListener("flatpickr:change", this.onChangeEvent.bind(this));
}
clear(e) {
@@ -60,6 +61,23 @@ export default class extends Flatpickr {
open() {
this.fp.element.dispatchEvent(new Event("focus"));
}
onChangeEvent(e) {
if (
this.modeValue == "range" &&
this.hasStartTarget &&
this.hasEndTarget &&
e.detail.startDate &&
e.detail.endDate
) {
// date range mode
this.startTarget.value = e.detail.startDate;
this.endTarget.value = e.detail.endDate;
this.fp.setDate([e.detail.startDate, e.detail.endDate]);
} else if (e.detail.date) {
// single date mode
this.fp.setDate(e.detail.date);
}
}
change(selectedDates, dateStr, instance) {
if (this.hasStartTarget && this.hasEndTarget && this.modeValue == "range") {

View File

@@ -1,5 +1,5 @@
import { Controller } from "stimulus";
import TomSelect from "tom-select";
import TomSelect from "tom-select/dist/esm/tom-select.complete";
export default class extends Controller {
static values = { options: Object };

View File

@@ -195,7 +195,7 @@ table#listing_enterprise_groups {
}
.fullwidth_inputs {
input[type=text], select {
#{$text-inputs}, select {
width: 100%;
}
}

View File

@@ -1,12 +1,11 @@
input[type="text"],
input[type="password"],
input[type="email"],
$text-inputs:
"input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel]";
#{$text-inputs},
input[type="date"],
input[type="datetime"],
input[type="time"],
input[type="url"],
input[type="number"],
input[type="tel"],
textarea, fieldset {
@include border-radius($border-radius);
padding: 7px 10px;

View File

@@ -148,6 +148,7 @@
overflow: hidden;
text-overflow: ellipsis;
margin-bottom: 0.75rem;
cursor: pointer;
}
.product-properties {

View File

@@ -142,3 +142,25 @@ Devise::TokenAuthenticatable.setup do |config|
# Defines name of the authentication token params key
config.token_authentication_key = :auth_token
end
if ENV["OPENID_APP_ID"].present? && ENV["OPENID_APP_SECRET"].present?
Devise.setup do |config|
protocol = Rails.env.development? ? "http://" : "https://"
config.omniauth :openid_connect, {
name: :openid_connect,
issuer: "https://login.lescommuns.org/auth/realms/data-food-consortium",
scope: [:openid, :profile, :email],
response_type: :code,
uid_field: "email",
discovery: true,
client_auth_method: :jwks,
client_options: {
identifier: ENV["OPENID_APP_ID"],
secret: ENV["OPENID_APP_SECRET"],
redirect_uri: "#{protocol}#{ENV["SITE_URL"]}/user/spree_user/auth/openid_connect/callback",
jwks_uri: 'https://login.lescommuns.org/auth/realms/data-food-consortium/protocol/openid-connect/certs'
}
}
end
end

View File

@@ -23,6 +23,8 @@ ar:
state: محافظة
source: المصدر
spree/product:
name: "اسم المنتج"
price: "السعر"
primary_taxon: "نوع المنتج "
supplier: "المورد"
shipping_category_id: "نوع الشحن"
@@ -2656,6 +2658,9 @@ ar:
report_header_delivery_postcode: تسليم الرمز البريدي
report_header_bulk_unit_size: حجم الوحدة بالجملة
report_header_weight: وزن
report_header_height: الارتفاع
report_header_width: العرض
report_header_depth: العمق
report_header_sum_total: اجمالي
report_header_date_of_order: تاريخ الطلب
report_header_amount_owing: المبلغ المستحق

View File

@@ -23,11 +23,14 @@ ca:
state: Estat
source: Source
spree/product:
name: "Nom del producte"
price: "Preu"
primary_taxon: "Categoria del producte"
supplier: "Proveïdora"
shipping_category_id: "Categoria d'enviament"
variant_unit: "Unitat de la variant"
variant_unit_name: "Nom de la unitat de la variant"
unit_value: "Valor de la unitat"
spree/credit_card:
base: "Targeta de crèdit"
number: "Número"
@@ -86,12 +89,30 @@ ca:
duplicate_transaction: "Fa molt poc que s'ha enviat una transacció amb la mateixa quantitat i informació de la mateixa targeta de crèdit."
fraudulent: "El pagament s'ha rebutjat perquè Stripe sospita que és fraudulent."
generic_decline: "La targeta s'ha rebutjat per un motiu desconegut."
incorrect_pin: "El PIN introduït no és correcte. Aquest codi de rebuig només s'aplica els pagaments fets amb lector de targetes"
insufficient_funds: "La targeta no disposa de prou saldo per completar la compra"
invalid_account: "La targeta, o el compte vinculat a la targeta, no és vàlida."
invalid_amount: "L'import del pagament no és vàlid o supera l'import permès."
invalid_pin: "El PIN introduït no és correcte. Aquest codi de rebuig només s'aplica els pagaments fets amb lector de targetes"
issuer_not_available: "No s'ha pogut contactar amb l'entitat emissora de la targeta, de forma que no s'ha pogut autoritzar el pagament."
lost_card: "El pagament ha estat denegat perquè la targeta ha estat anul·lada per pèrdua."
merchant_blacklist: "El pagament ha estat rebutjat perquè coincideix amb un valor de la llista de bloqueig de l'usuari de Stripe."
new_account_information_available: "La targeta, o el compte vinculat a la targeta, no és vàlida."
no_action_taken: "La targeta s'ha rebutjat per un motiu desconegut."
not_permitted: "No es permet el pagament."
offline_pin_required: "S'ha rebutjat la targeta perquè requereix un PIN."
online_or_offline_pin_required: "La targeta s'ha rebutjat perquè requereix un PIN."
pickup_card: "La targeta no es pot utilitzar per fer aquest pagament (és possible que s'hagi bloquejat per pèrdua o robatori)."
pin_try_exceeded: "S'ha superat el nombre permès d'intents d'escriure el PIN."
reenter_transaction: "L'emissor no ha pogut processar el pagament per un motiu desconegut."
restricted_card: "Doncs pot utilitzar la targeta per fer aquest pagament (és possible que s'hagi bloquejat per pèrdua o robatori)."
revocation_of_all_authorizations: "La targeta s'ha rebutjat per un motiu desconegut."
revocation_of_authorization: "La targeta s'ha rebutjat per un motiu desconegut."
security_violation: "La targeta s'ha rebutjat per un motiu desconegut."
service_not_allowed: "La targeta s'ha rebutjat per un motiu desconegut."
stolen_card: "El pagament s'ha denegat perquè la targeta està bloquejada per robatori."
stop_payment_order: "La targeta s'ha rebutjat per un motiu desconegut."
testmode_decline: "S'ha utilitzat un número de targeta de prova de Stripe."
transaction_not_allowed: "La targeta s'ha rebutjat per un motiu desconegut."
try_again_later: "La targeta s'ha rebutjat per un motiu desconegut."
withdrawal_count_limit_exceeded: "El consumidor ha superat el saldo o el límit de crèdit disponible a la seva targeta."
@@ -123,7 +144,11 @@ ca:
cardholder_name: "Nom del titular de la targeta"
community_forum_url: "URL del fòrum de la comunitat"
customer_instructions: "Instruccions de la consumidora"
additional_information: "Informació adicional"
devise:
passwords:
spree_user:
cannot_be_blank: "La contrasenya d'usuari no pot estar en blanc. Introduïu una contrasenya."
confirmations:
send_instructions: "Rebreu un correu electrònic amb instruccions sobre com confirmar el vostre compte en pocs minuts."
failed_to_send: "S'ha produït un error en enviar el correu electrònic de confirmació."
@@ -140,6 +165,7 @@ ca:
signed_up_but_unconfirmed: "S'ha enviat un missatge amb un enllaç de confirmació a la teva adreça de correu electrònic. Obre l'enllaç per activar el teu compte."
unknown_error: "S'ha produït un error en crear el teu compte. Comprova la teva adreça de correu electrònic i torna-ho a provar."
failure:
disabled: "S'ha desactivat el teu compte. Poseu-vos en contacte amb un administrador per resoldre aquest problema."
invalid: |
Correu electrònic o contrasenya no vàlids.
Va ser un convidat l'última vegada? Potser vostè necessita crear un compte o restablir la contrasenya.
@@ -147,11 +173,16 @@ ca:
already_registered: "Aquesta adreça electrònica ja està registrada. Inicieu sessió per continuar o torneu endarrere per utilitzar una altra adreça de correu electrònic."
success:
logged_in_succesfully: "Sessió iniciada correctament"
sessions:
signed_out: "La sessió s'ha tancat correctament."
already_signed_out: "La sessió s'ha tancat correctament."
user_passwords:
spree_user:
updated_not_active: "La vostra contrasenya s'ha restablert, però el vostre correu electrònic encara no s'ha confirmat."
updated: "La vostra contrasenya s'ha canviat correctament. Ja teniu la sessió iniciada."
send_instructions: "Rebreu un correu electrònic amb instruccions sobre com confirmar el vostre compte en pocs minuts."
oidc:
failure: "No s'ha pogut iniciar la sessió: %{error}"
home_page_alert_html: "HTML banner d'alerta de la pàgina d'inici"
hub_signup_case_studies_html: "HTML casos d'estudi de hub"
hub_signup_detail_html: "HTML detall del registre de hub"
@@ -262,6 +293,7 @@ ca:
search_by_name: Cercar per nom o barri ...
producers_join: Els productors australians son ara benvinguts a unir-se a Open Food Network.
charges_sales_tax: Càrrecs d'IVA?
business_address: "Adreça fiscal"
print_invoice: "Imprimir Factura"
print_ticket: "Imprimir tiquet"
select_ticket_printer: "Seleccionar la impressora de tiquets"
@@ -446,6 +478,8 @@ ca:
terms_of_service: "Termes del servei"
delete: "Eliminar arxiu"
confirm_delete: "Esteu segur que voleu suprimir el fitxer de condicions del servei actual?"
attachment: "Adjunt"
create_terms_of_service: "Crear fitxer de condicions del servei"
number_localization:
number_localization_settings: "Configuració de localització numèrica"
enable_localized_number: "Utilitzeu l'estàndard internacional per separar milers/decimals"
@@ -455,6 +489,7 @@ ca:
enable_invoices?: "Activar factures?"
invoice_style2?: "Utilitzeu el model de factura alternatiu que inclou el desglossament dels càrregs totals per tarifa i la informació sobre la taxa impositiva per article (encara no està disponible per als països sense recàrregs en concpte d'impostos)"
enable_receipt_printing?: "Mostra les opcions per imprimir rebuts amb impressores tèrmiques en el menú desplegable de la comanda?"
enterprise_number_required_on_invoices?: "Vols fer el NIF obligatori per generar una factura?"
stripe_connect_settings:
edit:
title: "Stripe Connect"
@@ -502,6 +537,8 @@ ca:
guest_label: "Fer comanda com a convidat"
credit_owed: "Crèdit a deure"
balance_due: "A pagar"
destroy:
has_associated_subscriptions: "No es pot esborrar: aquest client té subscripcions actives. Cancel·leu-les primer."
contents:
edit:
title: Contingut
@@ -680,6 +717,8 @@ ca:
display_name: Nom de visualització
category: Categoria
description: Descripció
units: Unitats
unit_type: Tipus d'unitat
variant_unit_name: Nom de la unitat de la variant
price: Preu
on_hand: Disponibles
@@ -739,6 +778,9 @@ ca:
variants_without_unit_value: "Atenció: algunes variants no tenen cap unitat assignada."
all: "Tots"
select_variant: "Selecciona un paràmetre"
note:
note_label: "Nota:"
no_note_present: "Cap nota proporcionada"
enterprise:
select_outgoing_oc_products_from: Selecciona els productes sortints del Cicle de Comandes
enterprises:
@@ -769,8 +811,21 @@ ca:
terms_and_conditions: "Termes i condicions"
remove_terms_and_conditions: "Elimina el fitxer"
uploaded_on: "carregat el"
reset_form: "Reiniciar el formulari"
business_address_legend: "Adreça fiscal"
invoice_item_sorting_legend: "Ordre de productes a la factura"
sort_items_by_supplier?: Ordenar els articles per proveïdor?
sort_items_by_supplier_tip: "Quan està activat, els articles s'ordenaran pel nom del proveïdor."
enabled: Habilitat
disabled: Deshabilitat
business_address:
company_legal_name: Nom fiscal de l'organització o empresa
company_placeholder: La meva cooperativa SCCL
address1: Adreça fiscal
address1_placeholder: Carrer de dalt 123
address2: Adreça (continua)
legal_phone_number: 'Telèfon administratiu '
phone_placeholder: "912 345 678"
contact:
legend: "Contacte"
name: Nom
@@ -780,6 +835,8 @@ ca:
email_address_tip: "Aquesta adreça de correu electrònic es mostrarà al vostre perfil públic"
phone: Telèfon
phone_placeholder: p. ex. 98 765 43 21
whatsapp_phone: Número de telèfon de WhatsApp
whatsapp_phone_tip: "Aquest número es mostrarà al vostre perfil públic i s'enllaçarà amb el vostre WhatsApp."
website: Lloc web
website_placeholder: 'p. ex.: www.hortajosepribes.com'
enterprise_fees:
@@ -834,9 +891,12 @@ ca:
none: Cap
own: Propis
sells: Ven
sells_tip: "Cap: l'organització no ven als clients directament. <br /> Propietari: l'organització ven productes propis als clients. <br /> Qualsevol: l'organització pot vendre productes propis o d'altres empreses. <br />"
sells_tip: "Cap: l'organització no disposa de botiga pròpia per vendre a clients finals directament. <br /> Propis: l'organització disposa d'una botiga pròpia per vendre NOMÉS els seus productes. <br /> Qualsevol: l'organització pot vendre productes propis o d'altres empreses que li proporcionin aquest permís. <br />"
visible_in_search: Visible a la cerca?
visible_in_search_tip: "Les organitzacions poden ser<br /> 1. Visibles públicament, apareixen al mapa i als llistats de Katuma-OFN.<br /> 2. Oculta. No visible en mapes i llistats però referenciats per altres botigues amb enllaç al seu perfil.<br /> 3. Totalment oculta. No visible en mapes i llistats ni és possible referencia-les."
visible: Públic
not_visible: Oculta
hidden: Totalment oculta
properties:
legend: "Propietats"
permalink:
@@ -901,6 +961,8 @@ ca:
shopfront_sort_by_producer: "Per productora"
shopfront_sort_by_category_placeholder: "Categoria"
shopfront_sort_by_producer_placeholder: "Productora"
display_remaining_stock: "Mostra l'estoc restant a la botiga si és baix (3 unitats)"
display_remaining_stock_tip: "Avisa els compradors quan només quedin 3 unitats o menys d'un producte."
enabled: "Habilitat"
disabled: "Deshabilitat"
social:
@@ -1033,6 +1095,7 @@ ca:
back_to_list: "Tornar a la llista"
save_and_back_to_list: "Desa i torna a la llista"
choose_products_from: "Trieu Productes des de:"
notify_producers_tip: Això enviarà un correu electrònic a cada productor amb la llista dels seus productes demanats a les comandes.
incoming:
incoming: "Entrant"
supplier: "Proveïdora"
@@ -1060,7 +1123,9 @@ ca:
checkout_options:
back_end: "Només pàgina administració (back office) "
cancel: "Cancel·lar"
checkout_options: "Opcions del Checkout"
distributor: "Distribuïdora"
no_shipping_methods: Cada distribuïdor d'aquest cicle de comanda ha de tenir almenys un mètode d'enviament.
payment_methods: "Mètodes de Pagament"
save: "Desa"
save_and_back_to_list: "Desa i torna a la llista"
@@ -1070,6 +1135,7 @@ ca:
edit: "1. Configuració general"
incoming: "2. Productes entrants"
outgoing: "3. Productes sortints"
checkout_options: "4. Opcions de Checkout"
exchange_form:
pickup_time_tip: Quan les comandes d'aquest cicle de comandes estiguin llestes per a les consumidores
pickup_instructions_placeholder: "Instruccions de recollida"
@@ -1083,6 +1149,8 @@ ca:
add_supplier: 'Afegeix proveïdora'
add_distributor: 'Afegeix distribuïdora'
advanced_settings:
automatic_notifications: Notificacions automàtiques
automatic_notifications_tip: Notifiqueu automàticament per correu electrònic als productors les comandes que els hi feu així que es tanquin els cicles de comanda.
title: Configuració avançada
choose_product_tip: Podeu restringir els productes entrants i sortints a només linventari d%{inventory}.
preferred_product_selection_from_coordinator_inventory_only_here: Només inventari del coordinador
@@ -1194,6 +1262,8 @@ ca:
unitsize: UNITAT DE MESURA
total: TOTAL
total_items: ARTICLES TOTALS
total_by_customer: Total per client
total_by_supplier: Total per proveïdor
supplier_totals: Total de de proveïdores del Cicle de Comanda
supplier_totals_by_distributor: Total de proveïdores del Cicle de Comanda - per distribuïdora
totals_by_supplier: Totals de la distribuïdora del Cicle de Comanda - per proveïdora
@@ -1207,8 +1277,12 @@ ca:
delivery: Informe de lliurament
tax_types: Tipus d'impostos
tax_rates: Tarifes fiscals
pack_by_customer: Paquets per consumidora
pack_by_supplier: Paquets per proveïdora
pack_by_customer: Repartiment per consumidora
pack_by_supplier: Repartiment per proveïdora
pack_by_product: Repartiment per producte
revenues_by_hub:
name: Ingressos per grup/empresa
description: Ingressos per grup/empresa
orders_and_distributors:
name: Comandes i distribuïdores
description: Comandes amb detalls de la distribuïdora
@@ -1254,9 +1328,11 @@ ca:
temp_controlled: "Control de temperatura?"
price: "Preu"
rendering_options:
generate_report: "Generació d'informe"
on_screen: "A la pantalla"
display: Mostra
packing:
name: "Informes d'embalatge"
name: "Informes de repartiment"
subscriptions:
index:
title: "Subscripcions"
@@ -2128,6 +2204,8 @@ ca:
contact_field_placeholder: "Nom de contacte"
contact_field_required: "Has d'introduir un contacte principal."
phone_field: "Número de telèfon "
whatsapp_phone_field: "Número de telèfon de WhatsApp"
whatsapp_phone_tooltip: "Aquest número es mostrarà al vostre perfil públic i s'enllaçarà amb el vostre WhatsApp."
phone_field_placeholder: "p. ex. 012 345 678 "
type:
title: "Tipus"
@@ -2505,6 +2583,9 @@ ca:
report_header_delivery_postcode: Codi postal de lliurament
report_header_bulk_unit_size: Mida de la unitat a granel
report_header_weight: Pes
report_header_height: Alçada
report_header_width: Amplada
report_header_depth: Profunditat
report_header_sum_total: Suma total
report_header_date_of_order: Data de la comanda
report_header_amount_owing: Import adeutat
@@ -2702,6 +2783,8 @@ ca:
title: "S'estan penjant els termes i condicions"
message_1: "Tots els compradors hauran dacceptar-los al fer la comanda. Si actualitzeu el fitxer, tots els compradors hauran dacceptar-los de nou a la finalització de la compra."
message_2: "Per als compradors que tinguin subscripcions, heu denviar-los per correu electrònic els Termes i condicions (o els canvis que shi apliquen) per ara, res els notificarà sobre aquests nous Termes i condicions."
business_address_info:
message: "El Nom legal de l'empresa, l'Adreça fiscal i el telèfon administratiu s'utilitzen per a les empreses/organitzacions que facturen des d'una entitat jurídica registrada amb dades diferents de la seva informació comercial pública. Aquestes dades NOMÉS s'usaran a les factures. Si aquestes dades estan en blanc, el vostre nom públic, adreça i número de telèfon es faran servir a les factures."
panels:
save: DESA
saved: DESAT
@@ -3514,6 +3597,9 @@ ca:
from: "De"
to: "Facturar a"
shipping: "Enviament"
note:
note_label: "Nota:"
no_note_present: "Cap nota proporcionada"
form:
distribution_fields:
title: "Distribució"
@@ -4008,3 +4094,6 @@ ca:
x_years:
one: "1 any"
other: "%{count} anys"
errors:
not_found:
message_html: "<b>Si us plau torna-ho a provar</b> Això podria ser un problema temporal. Feu clic al botó Enrere per tornar a la pantalla anterior o torneu a <a href='/'>Inici</a> i torneu-ho a provar. <b>Contacteu amb suport</b><p> Si el problema persisteix o és urgent, si us plau, digueu-nos-ho. Esn pots enviar un correua a <a href='https://openfoodnetwork.org/ofn-local/' target='blank'>suport<p>katuma.org </a>.</p><p> Ens ajuda molt si pots donar tants detalls com sigui possible sobre de què estaves fent quan va aparèixer l'error.</p>"

View File

@@ -23,6 +23,8 @@ cy:
state: Sir
source: Ffynhonnell
spree/product:
name: "Enw Cynnyrch"
price: "Pris"
primary_taxon: "Categori Cynnyrch"
supplier: "Cyflenwr"
shipping_category_id: "Categori dosbarthu."
@@ -141,6 +143,7 @@ cy:
cardholder_name: "Enw deiliad y cerdyn."
community_forum_url: "URL Fforwm Cymunedol."
customer_instructions: "Cyfarwyddiadau cwsmeriaid"
additional_information: "Gwybodaeth ychwanegol"
devise:
passwords:
spree_user:
@@ -472,6 +475,8 @@ cy:
terms_of_service: "Telerau Gwasanaeth"
delete: "Dileu ffeil"
confirm_delete: "Ydych chi'n siwr eich bod am ddileu'r ffeil Telerau Gwasanaeth cyfredol?"
attachment: "Atodiad"
create_terms_of_service: "Creu ffeil Telerau gwasanaeth"
number_localization:
number_localization_settings: "Gosodiadau Rhif Lleoleiddio"
enable_localized_number: "Defnyddiwch resymeg gwahanydd mil / degol rhyngwladol"
@@ -529,6 +534,8 @@ cy:
guest_label: "Talu fel gwestai"
credit_owed: "Credyd yn ddyledus"
balance_due: "Balans sy'n ddyledus"
destroy:
has_associated_subscriptions: "Wedi methu dileu: Mae gan y cwsmer hwn danysgrifiadau gweithredol. Mae angen eu canslo'n gyntaf."
contents:
edit:
title: Cynnwys
@@ -1113,7 +1120,10 @@ cy:
checkout_options:
back_end: "Swyddfa gefn yn unig"
cancel: "Canslo"
checkout_options: "Opsiynau talu"
distributor: "Dosbarthwr"
no_payment_methods: Mae angen o leiaf un dull talu ar gyfer bob dosbarthwr ar y cylch archebu hwn.
no_shipping_methods: Mae angen o leiaf un dull cludo ar gyfer pob dosbarthwr ar y cylch archebu hwn.
payment_methods: "Dulliau Talu"
save: "Cadw"
save_and_back_to_list: "Cadw ac Yn ôl i'r Rhestr"
@@ -1123,6 +1133,7 @@ cy:
edit: "1. Gosodiadau Cyffredinol"
incoming: "2. Cynnyrch sy'n Dod i Mewn"
outgoing: "3. Cynnyrch sy'n mynd allan"
checkout_options: "4. Opsiynau talu"
exchange_form:
pickup_time_tip: Pan fydd archebion gan yr OC hwn yn barod ar gyfer y cwsmer
pickup_instructions_placeholder: "Cyfarwyddiadau casglu"
@@ -1270,6 +1281,9 @@ cy:
pack_by_customer: Pecyn fesul Cwsmer
pack_by_supplier: Pecyn fesul Cyflenwr
pack_by_product: Pecynnu yn ôl Cynnyrch
revenues_by_hub:
name: Refeniw fesul Hyb
description: Refeniw fesul hyb
orders_and_distributors:
name: Archebion a Dosbarthwyr
description: Archebion gyda manylion dosbarthwr
@@ -1843,6 +1857,7 @@ cy:
invalid_email: "Rhowch gyfeiriad e-bost dilys"
select_a_shipping_method: Dewiswch ddull cludo
select_a_payment_method: Dewiswch ddull talu
no_shipping_methods_available: Nid yw'n bosibl talu oherwydd diffyg opsiynau cludo. Cysylltwch â pherchennog y siop.
order_paid: TALWYD
order_not_paid: HEB EI DALU
order_total: Cyfanswm archeb
@@ -2572,6 +2587,8 @@ cy:
report_header_hub_address: Cyfeiriad Hwb
report_header_to_hub: I Hwb
report_header_hub_code: Cod Hwb
report_header_hub_id: Dull Adnabod Hyb
report_header_hub_owner_email: Ebost Perchennog yr Hyb
report_header_code: Côd
report_header_paid: Wedi talu?
report_header_delivery: Dosbarthu?
@@ -2642,6 +2659,9 @@ cy:
report_header_delivery_postcode: Cod Post Cyflenwi
report_header_bulk_unit_size: Maint Uned Swmp
report_header_weight: Pwysau
report_header_height: Uchder
report_header_width: Lled
report_header_depth: Dyfnder
report_header_sum_total: 'Cyfanswm '
report_header_date_of_order: Dyddiad archebu
report_header_amount_owing: Swm sy'n ddyledus
@@ -2731,6 +2751,7 @@ cy:
action_required: "Mae angen gewithredu"
tag_rules: "Rheolau Tag"
enterprise_fee_whole_order: Archeb cyfan
enterprise_fee_by_name: "%{name} fee by %{role}%{enterprise_name}"
validation_msg_relationship_already_established: "^ Sefydlwyd y berthynas honno eisoes."
validation_msg_at_least_one_hub: "^ Rhaid dewis o leiaf un hwb"
validation_msg_tax_category_cant_be_blank: "^ Ni chaniateir gadael y Categori Trethi yn wag"
@@ -3555,6 +3576,7 @@ cy:
email: E-bost
account_updated: "Diweddarwyd y cyfrif!"
email_updated: "Bydd y cyfrif yn cael ei ddiweddaru ar ôl cadarnhau'r cyfeiriad e-bost newydd."
show_api_key_view_toggled: "Dangos y newidiwyd gwedd yr allwedd API!"
my_account: "Fy nghyfrif"
date: "Dyddiad"
time: "Amser"
@@ -3700,6 +3722,11 @@ cy:
results_found: "Cafwyd hyd i%{number} canlyniad."
viewing: "Yn edrych ar %{start} i %{end}."
print_invoices: "Argraffu anfonebau"
cancel_orders: "Canslo Archebion"
selected:
zero: "Ni ddewiswyd archeb."
one: "Dewiswyd 1 archeb"
other: "Dewiswyd %{count} archeb"
sortable_header:
payment_state: "Cyflwr Talu"
shipment_state: "Sir anfon"
@@ -3839,6 +3866,7 @@ cy:
paypal:
no_payment_via_admin_backend: Ni ellir cipio taliadau Paypal yn y Swyddfa Gefn
products:
image_upload_error: "Dylid defnyddio fformat JPG, ONG, GIF, SVG neu WEBP i lanlwytho'r llun."
new:
title: "Cynnyrch Newydd"
new_product: "Cynnyrch Newydd"
@@ -4104,10 +4132,14 @@ cy:
users:
api_keys:
regenerate_key: "Allwedd Adfer"
title: Allwedd API
developer_settings:
title: Gosodiadau'r Datblygwr
form:
account_settings: Gosodiadau Cyfrif
show:
tabs:
developer_settings: Gosodiadau'r Datblygwr
orders: Archebion
cards: Cardiau Credyd
transactions: Trafodion
@@ -4138,6 +4170,7 @@ cy:
total: Cyfanswm
paid?: Talwyd?
status: Statws
completed: Cwblhawyd
cancelled: Canslwyd
saved_cards:
default?: Yn ddiofyn?
@@ -4149,6 +4182,7 @@ cy:
authorised_shops:
shop_name: "Enw'r Siop"
allow_charges?: "Caniatau defnyddio'r Cerdyn Diofyn i dalu?"
no_default_saved_cards_tooltip: Mae angen ichi nodi un cerdyn credyd fel cerdyn diofyn i ganiatau ffioedd.
localized_number:
invalid_format: fformat annilys. Noder rhif.
api:
@@ -4167,6 +4201,7 @@ cy:
shipment:
cannot_ready: "Methu â pharatoi'r llwyth."
invalid_taxonomy_id: "Tacsonomeg id. annilys"
toggle_api_key_view: "Dangos gwedd yr allwedd API ar gyfer y defnyddiwr."
activerecord:
models:
spree/payment:
@@ -4239,3 +4274,10 @@ cy:
two: "%{count} mlynedd"
many: "%{count} mlynedd"
other: "%{count} blwyddyn"
errors:
not_found:
title: "Nid yw'r dudalen rydych yn chwilio amdani'n bodoli (404)"
internal_server_error:
title: "Mae'n ddrwg gennym, aeth rhywbeth o'i le (500)"
unprocessable_entity:
title: "Gwrthodwyd y newid roeddech chi am ei wneud (422)"

View File

@@ -23,6 +23,8 @@ de_CH:
state: Status
source: Zahlungsart
spree/product:
name: "Produktname"
price: "Preis"
primary_taxon: "Produktkategorie"
supplier: "Lieferant"
shipping_category_id: "Lieferkategorie"
@@ -2630,6 +2632,9 @@ de_CH:
report_header_delivery_postcode: Lieferpostleitzahl
report_header_bulk_unit_size: Gruppenkauf-Einheit
report_header_weight: Gewicht
report_header_height: Höhe
report_header_width: Breite
report_header_depth: Tiefe
report_header_sum_total: Gesamtsumme
report_header_date_of_order: Bestelldatum
report_header_amount_owing: Offener Betrag

View File

@@ -23,11 +23,14 @@ de_DE:
state: Status
source: Zahlungsart
spree/product:
name: "Produktname"
price: "Preis"
primary_taxon: "Produktkategorie"
supplier: "Lieferant"
shipping_category_id: "Lieferkategorie"
variant_unit: "Varianteneinheit"
variant_unit_name: "Name der Varianteneinheit"
unit_value: "Menge"
spree/credit_card:
base: "Kreditkarte"
number: "Kreditkartennummer"
@@ -178,6 +181,8 @@ de_DE:
updated_not_active: "Ihr Passwort wurde zurückgesetzt, aber ihre E-Mail-Adresse muss noch bestätigt werden."
updated: "Ihr Kennwort wurde erfolgreich geändert. Sie sind jetzt angemeldet."
send_instructions: "Sie erhalten in Kürze eine E-Mail mit Anweisungen zur Bestätigung Ihres Kontos."
oidc:
failure: "Einloggen nicht möglich: %{error}"
home_page_alert_html: "Startseite Banner HTML"
hub_signup_case_studies_html: "Registrierung für Läden - Beispiele HTML"
hub_signup_detail_html: "Registrierung für Läden - Details HTML"
@@ -770,7 +775,7 @@ de_DE:
current_fulfilled_units: "Aktuell erfüllte Einheiten"
max_fulfilled_units: "Max erfüllte Einheiten"
order_error: "Bevor Sie Bestellungen aktualisieren können, müssen Fehler behoben werden.\nFelder mit roten Rahmen enthalten Fehler."
variants_without_unit_value: "WARNUNG: Manche Produktvarianten haben keine Einheit"
variants_without_unit_value: "ACHTUNG: Für manche Produktvarianten ist keine Einheit festgelegt!"
all: "Alle"
select_variant: "Wählen Sie eine Produktvariante"
note:
@@ -968,12 +973,12 @@ de_DE:
facebook_placeholder: "z. B. www.facebook.com/IhreSeite"
linkedin_placeholder: "z. B. www.linkedin.com/in/IhrName"
stripe_connect:
connect_with_stripe: "Stripe integrieren"
connect_with_stripe: "Mit Stripe verbinden"
stripe_connect_intro: "Um Zahlungen mit Kreditkarte zu akzeptieren, müssen Sie Ihr Stripe-Konto mit dem Open Food Network verbinden. Verwenden Sie die Schaltfläche rechts, um loszulegen."
stripe_account_connected: "Stripe-Konto verbunden."
disconnect: "Stripe-Konto trennen"
confirm_modal:
title: Stripe integrieren
title: Mit Stripe verbinden
part1: Stripe ist ein Zahlungsdienst, der es Läden im Open Food Network ermöglicht, Kreditkartenzahlungen von Kunden entgegenzunehmen.
part2: Um diese Funktion zu verwenden, müssen Sie Ihr Stripe-Konto mit dem Open Food Network verbinden. Klicken Sie "Zustimmen", um auf die Stripe-Website weitergeleitet zu werden, wo Sie ein bestehendes Stripe-Konto verbinden oder ein neues erstellen können.
part3: Dadurch kann das Open Food Network Kreditkartenzahlungen von Kunden in Ihrem Namen akzeptieren. Bitte beachten Sie, dass Sie ein eigenes Stripe-Konto benötigen, die entstehenden Stripe-Gebühren bezahlen und etwaige Rückbuchungen und Kundenservices selbst vornehmen müssen.
@@ -1344,6 +1349,15 @@ de_DE:
formatted_data: Formatierte Daten
packing:
name: "Packlisten"
oidc_settings:
index:
title: "OIDC-Einstellungen"
connect: "Verbinden Sie Ihr Benutzerkonto"
already_connected: "Ihr Benutzerkonto ist bereits mit diesem DFC-Autorisierungskonto verbunden:"
les_communs_link: "Les Communs Open ID-Server"
link_your_account: "Sie müssen Ihr Benutzerkonto zunächst mit dem von DFC (Les Communs Open ID Connect) verwendeten Autorisierungsanbieter verbinden."
link_account_button: "Verbinden Sie Ihr Les Communs OIDC-Konto"
view_account: "Ihr Benutzerkonto anzeigen:"
subscriptions:
index:
title: "Abonnements"
@@ -2489,7 +2503,7 @@ de_DE:
spree_admin_single_enterprise_alert_mail_sent: "Wir haben eine E-Mail gesendet an "
spree_admin_overview_action_required: "Handlung erforderlich"
spree_admin_overview_check_your_inbox: "Bitte überprüfen Sie Ihren Posteingang für weitere Anweisungen. Vielen Dank!"
spree_admin_unit_value: Einheitswert
spree_admin_unit_value: Menge
spree_admin_unit_description: Einheit Beschreibung
spree_admin_variant_unit: Varianteneinheit
spree_admin_variant_unit_scale: Einheit der Produktvariante
@@ -2588,7 +2602,17 @@ de_DE:
report_header_to_hub: An den Hub
report_header_hub_code: Hub-Code
report_header_hub_id: Laden-ID
report_header_hub_business_number: "USt-IdNr."
report_header_hub_legal_name: "Unternehmensname"
report_header_hub_contact_name: "Kontaktname"
report_header_hub_email: "Öffentliche E-Mail-Adresse"
report_header_hub_owner_email: E-Mail-Adresse des Ladenbetreibers
report_header_hub_phone: "Telefonnummer"
report_header_hub_address_line1: "Straße + Hausnummer"
report_header_hub_address_line2: "Adresszusatz"
report_header_hub_address_city: "Ort"
report_header_hub_address_zipcode: "Postleitzahl"
report_header_hub_address_state_name: "Bundesland"
report_header_code: Code
report_header_paid: Bezahlt?
report_header_delivery: Lieferung?
@@ -2623,6 +2647,7 @@ de_DE:
report_header_total_tax: "Summe Steuern (%{currency_symbol})"
report_header_total_excl_tax: "Summe exkl. Steuern (%{currency_symbol})"
report_header_total_incl_tax: "Summe inkl. Steuern (%{currency_symbol})"
report_header_total_orders: "Anzahl der Bestellungen"
report_header_enterprise: Unternehmen
report_header_customer: Kunde
report_header_customer_code: Kundennummer
@@ -2659,6 +2684,9 @@ de_DE:
report_header_delivery_postcode: Lieferpostleitzahl
report_header_bulk_unit_size: Gruppenkauf-Einheit
report_header_weight: Gewicht
report_header_height: Höhe
report_header_width: Breite
report_header_depth: Tiefe
report_header_sum_total: Gesamtsumme
report_header_date_of_order: Bestelldatum
report_header_amount_owing: Offener Betrag
@@ -4037,7 +4065,7 @@ de_DE:
thanks: "Danke für Ihren Einkauf!"
track_information: "Sendungsinformationen: %{tracking}"
track_link: "Link zur Sendung: %{url}"
picked_up_instructions: "Ihre Bestellung bei %{distributor} wurde abgeholt"
picked_up_instructions: "Ihre Bestellung bei %{distributor} wurde abgeholt. "
picked_up_subject: "Abholbenachrichtigung"
test_mailer:
test_email:
@@ -4213,3 +4241,6 @@ de_DE:
unprocessable_entity:
title: "Die gewünschte Änderung wurde abgelehnt (422). "
message_html: "<p>Die gewünschte Änderung wurde abgelehnt. Vielleicht haben Sie versucht, etwas zu ändern, auf das Sie keinen Zugriff haben.<br><h3> <a href='/' >Zur Startseite zurückkehren</a></h3></p>"
components:
multiple_checked_select:
filter_placeholder: "Suche"

View File

@@ -44,11 +44,14 @@ en:
state: State
source: Source
spree/product:
name: "Product Name"
price: "Price"
primary_taxon: "Product Category"
supplier: "Supplier"
shipping_category_id: "Shipping Category"
variant_unit: "Variant Unit"
variant_unit_name: "Variant Unit Name"
unit_value: "Unit value"
spree/credit_card:
base: "Credit Card"
number: "Number"
@@ -224,7 +227,8 @@ en:
updated_not_active: "Your password has been reset, but your email has not been confirmed yet."
updated: "Your password was changed successfully. You are now signed in."
send_instructions: "You will receive an email with instructions about how to confirm your account in a few minutes."
oidc:
failure: "Could not sign in: %{error}"
home_page_alert_html: "Home page alert HTML"
hub_signup_case_studies_html: "Hub signup case studies HTML"
hub_signup_detail_html: "Hub signup detail HTML"
@@ -702,6 +706,7 @@ en:
conditional_blank: can't be blank if unit_type is blank
no_product: did not match any products in the database
not_found: not found in database
category_not_found: doesn't match allowed categories. See the correct categories to choose from on the product import page, or check that there's no misspelling.
not_updatable: cannot be updated on existing products via product import
blank: can't be blank
products_no_permission: you do not have permission to manage products for this enterprise
@@ -1423,6 +1428,15 @@ en:
formatted_data: Formatted Data
packing:
name: "Packing Reports"
oidc_settings:
index:
title: "OIDC Settings"
connect: "Connect Your Account"
already_connected: "Your account is already linked to this DFC authorization account:"
les_communs_link: "Les Communs Open ID server"
link_your_account: "You need first to link your account with the authorization provider used by DFC (Les Communs Open ID Connect)."
link_account_button: "Link your Les Communs OIDC Account"
view_account: "To view your account, see:"
subscriptions:
index:
title: "Subscriptions"
@@ -2745,7 +2759,17 @@ See the %{link} to find out more about %{sitename}'s features and to start using
report_header_to_hub: To Hub
report_header_hub_code: Hub Code
report_header_hub_id: Hub ID
report_header_hub_business_number: "Hub Business Number"
report_header_hub_legal_name: "Hub Legal Name"
report_header_hub_contact_name: "Hub Contact Name"
report_header_hub_email: "Hub Public Email"
report_header_hub_owner_email: Hub Owner Email
report_header_hub_phone: "Hub Phone Number"
report_header_hub_address_line1: "Hub Address Line 1"
report_header_hub_address_line2: "Hub Address Line 2"
report_header_hub_address_city: "Hub Suburb"
report_header_hub_address_zipcode: "Hub Postcode"
report_header_hub_address_state_name: "Hub State"
report_header_code: Code
report_header_paid: Paid?
report_header_delivery: Delivery?
@@ -2780,6 +2804,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using
report_header_total_tax: "Total Tax (%{currency_symbol})"
report_header_total_excl_tax: "Total excl. tax (%{currency_symbol})"
report_header_total_incl_tax: "Total incl. tax (%{currency_symbol})"
report_header_total_orders: "Total Number of Orders"
report_header_enterprise: Enterprise
report_header_customer: Customer
report_header_customer_code: Customer Code
@@ -2816,6 +2841,9 @@ See the %{link} to find out more about %{sitename}'s features and to start using
report_header_delivery_postcode: Delivery Postcode
report_header_bulk_unit_size: Bulk Unit Size
report_header_weight: Weight
report_header_height: Height
report_header_width: Width
report_header_depth: Depth
report_header_sum_total: Sum Total
report_header_date_of_order: Date of Order
report_header_amount_owing: Amount Owing

View File

@@ -22,6 +22,8 @@ en_AU:
state: State
source: Source
spree/product:
name: "Product Name"
price: "Price"
primary_taxon: "Product Category"
supplier: "Supplier"
shipping_category_id: "Shipping Category"
@@ -2390,6 +2392,9 @@ en_AU:
report_header_delivery_postcode: Delivery Postcode
report_header_bulk_unit_size: Bulk Unit Size
report_header_weight: Weight
report_header_height: Height
report_header_width: Width
report_header_depth: Depth
report_header_sum_total: Sum Total
report_header_date_of_order: Date of Order
report_header_amount_owing: Amount Owing

View File

@@ -21,6 +21,8 @@ en_BE:
amount: Amount
state: State
spree/product:
name: "Product Name"
price: "Price"
primary_taxon: "Product Category"
supplier: "Supplier"
shipping_category_id: "Shipping Category"

Some files were not shown because too many files have changed in this diff Show More