Compare commits

...

195 Commits

Author SHA1 Message Date
Jean-Baptiste Bellet
cba9779168 Update all locales with the latest Transifex translations 2022-09-22 16:35:32 +02:00
Rachel Arnould
e98d4af630 Merge pull request #9659 from saunmanoj888/fix-bulk-product-update-unit-value
Allow to change unit value for numbers with a comma separator on bulk product update
2022-09-21 13:04:08 +02:00
jibees
e0aa94e6af Merge pull request #9689 from openfoodfoundation/dependabot/npm_and_yarn/floating-ui/dom-1.0.2
Bump @floating-ui/dom from 1.0.1 to 1.0.2
2022-09-21 09:21:46 +02:00
Maikel
a4de128a76 Merge pull request #9674 from filipefurtad0/wicked_pdf_config
Makes wicked-pdf config ENV-dependent
2022-09-21 13:16:41 +10:00
Maikel
fe2e510fdc Merge pull request #9621 from filipefurtad0/invoice_spec_to_account_for_tax_ordering
Invoice spec to account for tax ordering
2022-09-21 10:14:07 +10:00
dependabot[bot]
ae152fd94f Bump @floating-ui/dom from 1.0.1 to 1.0.2
Bumps [@floating-ui/dom](https://github.com/floating-ui/floating-ui/tree/HEAD/packages/dom) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/floating-ui/floating-ui/releases)
- [Commits](https://github.com/floating-ui/floating-ui/commits/@floating-ui/dom@1.0.2/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-09-20 09:04:55 +00:00
Maikel
5173ddb7a0 Merge pull request #9675 from filipefurtad0/split_build_consumer_tests
Makes build run all specs; fixes failing specs
2022-09-20 11:20:52 +10:00
Filipe
bd698f5d81 Merge pull request #9683 from filipefurtad0/customer_query_superadmin_spec
Spec reproducing failing customer query, as superadmin
2022-09-19 15:53:07 +01:00
filipefurtad0
7e168fad02 Spec reproduing failing customer query, as superadmin 2022-09-19 14:11:13 +01:00
jibees
c574b2d8ba Merge pull request #9634 from binarygit/remove-angular-from-shipping-methods
Remove shipping methods controller
2022-09-19 14:16:07 +02:00
jibees
502abfdfce Merge pull request #9681 from openfoodfoundation/dependabot/bundler/rubocop-rails-2.16.1
Bump rubocop-rails from 2.16.0 to 2.16.1
2022-09-19 14:13:22 +02:00
jibees
c714204877 Merge pull request #9673 from openfoodfoundation/dependabot/npm_and_yarn/babel/preset-env-7.19.1
Bump @babel/preset-env from 7.19.0 to 7.19.1
2022-09-19 14:13:08 +02:00
dependabot[bot]
cb84f6671a Bump @babel/preset-env from 7.19.0 to 7.19.1
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.19.0 to 7.19.1.
- [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.19.1/packages/babel-preset-env)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-19 08:38:38 +00:00
jibees
20c393e4e9 Merge pull request #9680 from openfoodfoundation/dependabot/bundler/shoulda-matchers-5.2.0
Bump shoulda-matchers from 5.1.0 to 5.2.0
2022-09-19 10:38:01 +02:00
jibees
8e3cd4653d Merge pull request #9669 from openfoodfoundation/dependabot/npm_and_yarn/storybook/addon-docs-6.5.12
Bump @storybook/addon-docs from 6.5.10 to 6.5.12
2022-09-19 10:33:59 +02:00
jibees
b4deb19d8e Merge pull request #9667 from openfoodfoundation/dependabot/npm_and_yarn/storybook/addon-controls-6.5.12
Bump @storybook/addon-controls from 6.5.10 to 6.5.12
2022-09-19 10:33:41 +02:00
dependabot[bot]
e30ebd3671 Bump rubocop-rails from 2.16.0 to 2.16.1
Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from 2.16.0 to 2.16.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.0...v2.16.1)

---
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-09-19 07:58:34 +00:00
dependabot[bot]
b7f8422f30 Bump shoulda-matchers from 5.1.0 to 5.2.0
Bumps [shoulda-matchers](https://github.com/thoughtbot/shoulda-matchers) from 5.1.0 to 5.2.0.
- [Release notes](https://github.com/thoughtbot/shoulda-matchers/releases)
- [Changelog](https://github.com/thoughtbot/shoulda-matchers/blob/main/CHANGELOG.md)
- [Commits](https://github.com/thoughtbot/shoulda-matchers/compare/v5.1.0...v5.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-19 07:56:59 +00:00
dependabot[bot]
b3d628551e Bump @storybook/addon-controls from 6.5.10 to 6.5.12
Bumps [@storybook/addon-controls](https://github.com/storybookjs/storybook/tree/HEAD/addons/controls) from 6.5.10 to 6.5.12.
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/v6.5.12/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v6.5.12/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-09-19 07:55:08 +00:00
dependabot[bot]
70e39174d2 Bump @storybook/addon-docs from 6.5.10 to 6.5.12
Bumps [@storybook/addon-docs](https://github.com/storybookjs/storybook/tree/HEAD/addons/docs) from 6.5.10 to 6.5.12.
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/v6.5.12/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v6.5.12/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-09-19 07:54:54 +00:00
jibees
b03cfa163a Merge pull request #9672 from openfoodfoundation/dependabot/bundler/view_component-2.72.0
Bump view_component from 2.71.0 to 2.72.0
2022-09-19 09:54:38 +02:00
jibees
4c32548e83 Merge pull request #9668 from openfoodfoundation/dependabot/npm_and_yarn/storybook/server-6.5.12
Bump @storybook/server from 6.5.10 to 6.5.12
2022-09-19 09:53:47 +02:00
Jean-Baptiste Bellet
7186526dc6 Fix block too long warnings 2022-09-19 09:26:34 +02:00
filipefurtad0
8c8b262ea1 Sets examples pending and dry running with xit 2022-09-16 15:24:51 +01:00
filipefurtad0
6ae741936f Scrolls down the page to enable finding element 2022-09-16 15:24:39 +01:00
Jean-Baptiste Bellet
cf8bab97e8 Fix spec by not raising the error image not found
`GET http://localhost:3000/throbber.gif 404 (Not Found)`

In the meantime, open an issue to remove jquery.jstree from this page: 9677
2022-09-16 11:04:08 +02:00
Jean-Baptiste Bellet
ba2ad4a0c4 Since #9126, replacing Paperclip with ActiveStorage, some methods changed 2022-09-16 10:51:04 +02:00
Jean-Baptiste Bellet
4a8dc37b40 Since #9087, we don't use a boolean but an enum, 'public' or 'hidden' 2022-09-16 10:02:27 +02:00
Jean-Baptiste Bellet
3942c4d808 Fix failing spec: since #9606 we use tom-select 2022-09-16 09:32:34 +02:00
filipefurtad0
ba8162c1d0 Splits consumer specs into two parallel runs 2022-09-15 17:34:01 +01:00
filipefurtad0
bf1fc736b9 Removes _spec.rb ending from admin specs on build.yml 2022-09-15 17:32:48 +01:00
filipefurtad0
bc1ae01eb6 Updates invoice_spec to A3 page size setting
Separates display_as in assertion to prevent line break failures
2022-09-15 14:34:15 +01:00
filipefurtad0
e4cceffd5c Makes wicked-pdf config env dependent 2022-09-15 12:12:47 +01:00
Maikel Linke
887f886110 Update translations 2022-09-15 16:25:33 +10:00
dependabot[bot]
78fa44739f Bump view_component from 2.71.0 to 2.72.0
Bumps [view_component](https://github.com/viewcomponent/view_component) from 2.71.0 to 2.72.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.71.0...v2.72.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-09-15 06:22:01 +00:00
Maikel
1f00ddeb3b Merge pull request #9654 from openfoodfoundation/dependabot/bundler/rswag-specs-2.6.0
Bump rswag-specs from 2.5.1 to 2.6.0
2022-09-15 16:17:41 +10:00
dependabot[bot]
46c19580bc Bump @storybook/server from 6.5.10 to 6.5.12
Bumps [@storybook/server](https://github.com/storybookjs/storybook/tree/HEAD/app/server) from 6.5.10 to 6.5.12.
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/v6.5.12/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v6.5.12/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-09-14 09:04:51 +00:00
filipefurtad0
e54acf3ca0 Changes tax parcels into the correct order
This should fail now, adding pending example on next commit

Wraps failing assertions around pending block

Addresses rubocop Style/LineEndConcatenation convention

Removes pending blocks
2022-09-14 08:02:45 +01:00
saunmanoj888
498d003684 Add unit specs for the js changes for unit_value 2022-09-13 23:28:27 +05:30
binarygit
90f4b1328b Remove angular from shipping methods tab in enterprise/edit 2022-09-13 15:20:33 +05:45
dependabot[bot]
0c81ec0202 Bump rswag-specs from 2.5.1 to 2.6.0
Bumps [rswag-specs](https://github.com/rswag/rswag) from 2.5.1 to 2.6.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.5.1...2.6.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-09-13 00:44:05 +00:00
Maikel
584430d64b Merge pull request #9655 from openfoodfoundation/dependabot/bundler/rswag-ui-2.6.0
Bump rswag-ui from 2.5.1 to 2.6.0
2022-09-13 10:42:41 +10:00
Maikel
8334923a5c Merge pull request #9653 from openfoodfoundation/dependabot/bundler/rswag-api-2.6.0
Bump rswag-api from 2.5.1 to 2.6.0
2022-09-13 10:42:00 +10:00
Maikel
61784ed174 Merge pull request #9656 from openfoodfoundation/dependabot/bundler/rubocop-rails-2.16.0
Bump rubocop-rails from 2.15.2 to 2.16.0
2022-09-13 10:40:00 +10:00
Maikel
906bfc5ae8 Merge pull request #9657 from openfoodfoundation/dependabot/bundler/rails-6.1.7
Bump rails from 6.1.6.1 to 6.1.7
2022-09-13 10:37:32 +10:00
jibees
5a4b38ec55 Merge pull request #9536 from jibees/9145-Splitcheckout,-add-error-message-when-no-shipping-methods-are-available-to-the-customer
Split Checkout: add error message when no shipping methods are available to the customer
2022-09-12 15:22:11 +02:00
saunmanoj888
6917125173 Allow to change unit value for numbers with a comma separator 2022-09-12 15:55:03 +05:30
dependabot[bot]
65506769ab Bump rails from 6.1.6.1 to 6.1.7
Bumps [rails](https://github.com/rails/rails) from 6.1.6.1 to 6.1.7.
- [Release notes](https://github.com/rails/rails/releases)
- [Commits](https://github.com/rails/rails/compare/v6.1.6.1...v6.1.7)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-12 09:17:01 +00:00
dependabot[bot]
9909e84cb9 Bump rubocop-rails from 2.15.2 to 2.16.0
Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from 2.15.2 to 2.16.0.
- [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.15.2...v2.16.0)

---
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-09-12 09:16:36 +00:00
dependabot[bot]
e00ee364ea Bump rswag-ui from 2.5.1 to 2.6.0
Bumps [rswag-ui](https://github.com/rswag/rswag) from 2.5.1 to 2.6.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.5.1...2.6.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-09-12 09:16:16 +00:00
dependabot[bot]
479c895a59 Bump rswag-api from 2.5.1 to 2.6.0
Bumps [rswag-api](https://github.com/rswag/rswag) from 2.5.1 to 2.6.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.5.1...2.6.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-09-12 09:14:43 +00:00
Jean-Baptiste Bellet
86cb86e8b5 Add a flash error where no available shipping methods to the customer
+ update specs as well
2022-09-12 09:42:26 +02:00
Jean-Baptiste Bellet
9dd3a8bc5a Store all distributors shipping methods to one array 2022-09-12 09:42:26 +02:00
Maikel
68256346e7 Merge pull request #9644 from filipefurtad0/fix_flaky_search
Splits tests into existing/non-existing shops
2022-09-12 14:05:49 +10:00
Maikel
44bf63137a Merge pull request #9606 from binarygit/remove-angular-from-address
Remove Angular from Address Tab
2022-09-12 13:49:54 +10:00
Maikel
e9ad573bcd Merge pull request #9641 from mkllnk/prod-schema
Synchronise db schema with (AU) production
2022-09-12 13:40:57 +10:00
filipefurtad0
215f3e97ad Splits tests into existing/non-existing shops
Sets failing tests as pending for issues #9649 and #5467
2022-09-09 13:08:45 +01:00
Jean-Baptiste Bellet
49f78f3706 Update all locales with the latest Transifex translations 2022-09-08 16:40:17 +02:00
jibees
9563dd6c51 Merge pull request #9497 from jibees/9493-fix-issues-around-rounding-in-imperial-metric-system
Avoid floating rounded errors when using imperial or metric system
2022-09-08 16:34:12 +02:00
Rachel Arnould
aa36986d66 Merge pull request #9521 from jibees/create-new-report-revenues-by-hub
Create a new report that shows revenues (incl. or excl. taxes) by hub only available for super-admin
2022-09-08 16:10:14 +02:00
jibees
9843e0e450 Merge pull request #9640 from openfoodfoundation/dependabot/npm_and_yarn/babel/preset-env-7.19.0
Bump @babel/preset-env from 7.18.10 to 7.19.0
2022-09-08 09:07:02 +02:00
Jean-Baptiste Bellet
53978de632 Create a new report that show revenues (incl. or excl. taxes) by hub
+ Create spec
2022-09-08 09:04:44 +02:00
Maikel
d9f5f7995d Merge pull request #9611 from mkllnk/9605-tax-total
Index tax totals correctly for invoice display
2022-09-08 12:04:19 +10:00
Maikel
f201b9fd11 Merge pull request #9631 from mkllnk/9153-tax-recalculation
[Split Checkout] Recalculate tax on summary step
2022-09-08 11:39:44 +10:00
Jean-Baptiste Bellet
d53b2b94b9 When creating new product via /admin/products/new use BigDecimal
to avoid bad rounded multiplication

example here:
700*0.001 = 0.7000000000000001

+ update specs as well
2022-09-07 09:17:46 +02:00
Jean-Baptiste Bellet
4452ad2c51 Use BigDecimal to avoir multiplication/division floating errors
Like 28.35 * 12 / 12 = 28.350000000000005

+ in js, use parseFloat() to format `12.00` as `12`
2022-09-07 09:17:46 +02:00
Jean-Baptiste Bellet
6594419b22 Add js-big-decimal to work with division and multiplication
Use a lib instead of Math.round((value*100)/100)
2022-09-07 09:17:46 +02:00
Maikel Linke
4ba008f31b Synchronise db schema with production
Rails seems to have changed the options in schema.rb at some point to
include more specifics but we didn't record this in our tracked
schema.rb. As a result, production shows changes in that file after
running migrations.

Sometimes I also use production dumps in development, for example to
test migrations. Then the schema is changed for the migration and for
these syntax changes. Synching the schema with migration should
standardise all our setups and and make git diffs clearer.
2022-09-07 16:02:51 +10:00
Maikel
dd2e77a244 Merge pull request #9557 from jibees/9555-update-the-build-env
Update the build env. from ubuntu-18.04 to ubuntu-20.04
2022-09-07 13:43:42 +10:00
dependabot[bot]
be561d1032 Bump @babel/preset-env from 7.18.10 to 7.19.0
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.18.10 to 7.19.0.
- [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.19.0/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-09-06 09:04:41 +00:00
Jean-Baptiste Bellet
24fc941b4c Update the build env. from ubuntu-18.04 to ubuntu-20.04 2022-09-06 10:28:26 +02:00
Maikel
21054c1a8a Merge pull request #9594 from binarygit/remove-angular-from-primary-details
Remove Angular from Primary Details Tab
2022-09-06 10:17:14 +10:00
Maikel
0778c5f550 Merge pull request #9607 from openfoodfoundation/dependabot/bundler/sidekiq-6.5.6
Bump sidekiq from 6.5.4 to 6.5.6
2022-09-06 10:16:39 +10:00
Maikel Linke
1d04510365 Update totals on summary step 2022-09-05 15:54:33 +10:00
Maikel Linke
6c7a089527 Recalculate tax on summary step 2022-09-05 15:14:08 +10:00
binarygit
abbb61b943 Remove country controller from enterprises/new and Business Details tab 2022-09-05 09:52:27 +05:45
binarygit
36b5cb3b49 Replace country controller with dependent select in address tab 2022-09-05 09:52:27 +05:45
binarygit
0cfe842bd6 Fix typo: dependant to dependent in dependent-select controller 2022-09-05 09:52:27 +05:45
Maikel Linke
eaca953106 Create only required test data for speed
It reduced the execution time by 5% on my machine (2-3 seconds).
2022-09-05 13:42:47 +10:00
Maikel Linke
cc5125f49e Apply related db assertions in tax spec
Somehow the helper methods were testing two different orders even though
each spec is using only one order, the one which is currently being
checked out by the user.

So I brought the code closer into the example to easier see what is
related and tested.

I also changed the assertions for the pending spec but can't really
verify them yet until I have completely working code.
2022-09-05 11:40:47 +10:00
Maikel Linke
3f2b3b88eb Re-use in-memory test objects
And reduce code by referring to objects instead of just ids.
2022-09-05 10:59:15 +10:00
Maikel
7101bacc8c Merge pull request #9620 from openfoodfoundation/dependabot/bundler/rubocop-1.36.0
Bump rubocop from 1.35.1 to 1.36.0
2022-09-05 10:30:05 +10:00
Maikel
d76b274d25 Merge pull request #9617 from openfoodfoundation/dependabot/bundler/view_component-2.71.0
Bump view_component from 2.69.0 to 2.71.0
2022-09-02 16:56:59 +10:00
dependabot[bot]
8d7f39941a Bump view_component from 2.69.0 to 2.71.0
Bumps [view_component](https://viewcomponent.org) from 2.69.0 to 2.71.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-09-02 06:33:40 +00:00
Maikel
95839f88f2 Merge pull request #9623 from mkllnk/fix-storybook
Load storybook only in development
2022-09-02 16:32:19 +10:00
Maikel Linke
728eee6d3f Load storybook after view_component has been loaded automatically 2022-09-02 16:10:19 +10:00
Maikel Linke
7089bd597e Avoid loading view_component engine manually
We load view_component in the application config and it should be
automatic anyway.
2022-09-02 16:08:09 +10:00
Maikel Linke
2aade10aaf Load storybook only in development
The gem is not available in other environments an the app fails to boot.
2022-09-02 16:07:25 +10:00
Maikel
4057df5b93 Merge pull request #9586 from openfoodfoundation/dependabot/bundler/stripe-7.1.0
Bump stripe from 7.0.0 to 7.1.0
2022-09-02 13:34:11 +10:00
Filipe
8270a3f386 Merge pull request #9513 from filipefurtad0/matomo_tag_on_register_page
Add matomo_tag to /register pages
2022-09-01 10:19:54 +01:00
dependabot[bot]
a2aa5f2607 Bump rubocop from 1.35.1 to 1.36.0
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.35.1 to 1.36.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.35.1...v1.36.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-09-01 09:07:43 +00:00
Maikel Linke
30a9e80024 Update translations 2022-09-01 11:55:03 +10:00
Maikel
612001fc3f Merge pull request #9600 from mkllnk/rubocop
Update rubocop config to avoid deprecation
2022-09-01 11:42:15 +10:00
Maikel
2a93968370 Merge pull request #9599 from mkllnk/load-storybook
Avoid storybook deprecation warning
2022-09-01 11:41:27 +10:00
Maikel
b0a4fcdc26 Merge pull request #9598 from mkllnk/spec-typos
Correct typo in spec which lead to flakiness
2022-09-01 11:39:38 +10:00
Maikel Linke
326b0af35f Sort tax total by percentage on invoice 2022-09-01 11:19:02 +10:00
Maikel Linke
91eaa522cf Simplify tax totals helper 2022-08-31 16:47:04 +10:00
Maikel Linke
2a57dc9766 Index tax totals correctly for invoice display 2022-08-31 16:47:04 +10:00
Maikel Linke
f37b681fac Allow more tax data in the summary
I converted the value to a hash so that we can put all information in
there and we won't need the current hash key as percentage any more.
2022-08-31 16:47:04 +10:00
Maikel Linke
f4466b1aad Spec problem with tax rate summary display 2022-08-31 16:47:04 +10:00
Maikel Linke
33feb7f63f Test for explicit values, not reusing faulty code 2022-08-31 16:47:04 +10:00
binarygit
02e3184945 Replace angular tooltips in Primary Details tab 2022-08-31 11:51:51 +05:45
Maikel
04778c6fa8 Merge pull request #9597 from saunmanoj888/fix-account-setting-headers-alignment
Fix alignment for header Developer settings under Accounts settings
2022-08-31 16:01:41 +10:00
binarygit
8861b6d077 Replace permalinks angular ctrl with stimulus 2022-08-31 10:06:51 +05:45
binarygit
52b1f40acb Replace select2 with tom-select in primary details tab 2022-08-31 10:06:51 +05:45
Filipe
8ace56956b Merge pull request #9560 from binarygit/replace-tooltip
Replace tooltip on Enterprise Settings /contact page
2022-08-30 16:23:09 +01:00
dependabot[bot]
7718f7c0fc Bump sidekiq from 6.5.4 to 6.5.6
Bumps [sidekiq](https://github.com/mperham/sidekiq) from 6.5.4 to 6.5.6.
- [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.4...v6.5.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-30 09:04:24 +00:00
Maikel
b74c368de2 Merge pull request #9602 from filipefurtad0/fix_flaky_invoice_spec
Adds specific tax rates to each type of cost
2022-08-30 09:47:53 +10:00
filipefurtad0
e0a20bf8af Adds specific tax rates to each type of cost 2022-08-29 17:36:39 +01:00
Maikel Linke
17afdb5912 Update rubocop config to avoid deprecation 2022-08-29 15:31:18 +10:00
Maikel Linke
d55a43d4b1 Avoid storybook deprecation warning
Loading the engine directly is deprecated and I followed the current
documentation to load storybook in the app. This avoids a warning:

> DEPRECATION WARNING: This manually engine loading is deprecated and will be removed in v1.0.0. Remove `require "view_component/storybook/engine"`. (called from <top (required)> at config/application.rb:30)
2022-08-29 14:57:14 +10:00
Maikel Linke
bf3da0531e Correct grammar in spec description 2022-08-29 14:43:43 +10:00
Maikel Linke
3a365b6dc6 Remove useless braces 2022-08-29 14:42:11 +10:00
Maikel Linke
ee7dc821ca Correct typo in spec which lead to flakiness
I'm not sure why this spec passed on CI when it was retried but it was
obviously wrong. Correcting that copy&paste error seems to make the spec
pass.
2022-08-29 14:39:43 +10:00
Maikel
07018370e0 Merge pull request #9595 from openfoodfoundation/dependabot/bundler/jwt-2.5.0
Bump jwt from 2.4.1 to 2.5.0
2022-08-29 11:43:27 +10:00
Maikel
bba665e2e1 Merge pull request #9577 from filipefurtad0/invoice-spec
Moves invoice_spec.rb into /system; sets :rack_test as webdriver
2022-08-29 11:34:20 +10:00
saunmanoj888
5e69320ff5 Fix header alignmnet 2022-08-27 15:31:19 +05:30
dependabot[bot]
d0242d28d2 Bump jwt from 2.4.1 to 2.5.0
Bumps [jwt](https://github.com/jwt/ruby-jwt) from 2.4.1 to 2.5.0.
- [Release notes](https://github.com/jwt/ruby-jwt/releases)
- [Changelog](https://github.com/jwt/ruby-jwt/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jwt/ruby-jwt/compare/v2.4.1...v2.5.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-26 09:04:29 +00:00
Maikel
9dbdcc9181 Merge pull request #9592 from openfoodfoundation/dependabot/bundler/redis-4.8.0
Bump redis from 4.7.1 to 4.8.0
2022-08-25 09:55:45 +10:00
Maikel
7819495d57 Merge pull request #9590 from openfoodfoundation/dependabot/bundler/puma-5.6.5
Bump puma from 5.6.4 to 5.6.5
2022-08-25 09:54:50 +10:00
Maikel
8723520848 Merge pull request #9585 from mkllnk/revert-stripe-update
Restore ability to check out with Stripe while storing a new card
2022-08-25 09:51:59 +10:00
binarygit
b76d9045ce Replace power-tip in enterprises/edit/<name>/contact with floatingUI 2022-08-24 13:31:45 +05:45
Maikel
b42d6cf2ac Merge pull request #9587 from openfoodfoundation/dependabot/bundler/valid_email2-4.0.4
Bump valid_email2 from 4.0.3 to 4.0.4
2022-08-24 16:52:13 +10:00
Maikel
f78e72af0d Merge pull request #9588 from openfoodfoundation/dependabot/bundler/rubocop-1.35.1
Bump rubocop from 1.35.0 to 1.35.1
2022-08-24 16:51:14 +10:00
dependabot[bot]
5e021b76b5 Bump valid_email2 from 4.0.3 to 4.0.4
Bumps [valid_email2](https://github.com/micke/valid_email2) from 4.0.3 to 4.0.4.
- [Release notes](https://github.com/micke/valid_email2/releases)
- [Changelog](https://github.com/micke/valid_email2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micke/valid_email2/compare/v4.0.3...v4.0.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-24 06:50:55 +00:00
Maikel
d03a5458ff Merge pull request #9582 from openfoodfoundation/dependabot/bundler/view_component-2.69.0
Bump view_component from 2.68.0 to 2.69.0
2022-08-24 16:49:45 +10:00
dependabot[bot]
3aef0b4029 Bump stripe from 7.0.0 to 7.1.0
Bumps [stripe](https://github.com/stripe/stripe-ruby) from 7.0.0 to 7.1.0.
- [Release notes](https://github.com/stripe/stripe-ruby/releases)
- [Changelog](https://github.com/stripe/stripe-ruby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stripe/stripe-ruby/compare/v7.0.0...v7.1.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-24 06:48:28 +00:00
Maikel
cd5a83e814 Merge pull request #9581 from openfoodfoundation/dependabot/bundler/webmock-3.18.1
Bump webmock from 3.17.1 to 3.18.1
2022-08-24 16:47:45 +10:00
dependabot[bot]
a943d2fee6 Bump redis from 4.7.1 to 4.8.0
Bumps [redis](https://github.com/redis/redis-rb) from 4.7.1 to 4.8.0.
- [Release notes](https://github.com/redis/redis-rb/releases)
- [Changelog](https://github.com/redis/redis-rb/blob/master/CHANGELOG.md)
- [Commits](https://github.com/redis/redis-rb/compare/v4.7.1...v4.8.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-24 06:47:28 +00:00
Maikel
b016ebd5b4 Merge pull request #9567 from openfoodfoundation/dependabot/bundler/bullet-7.0.3
Bump bullet from 7.0.2 to 7.0.3
2022-08-24 16:47:07 +10:00
Maikel
314459df92 Merge pull request #9566 from openfoodfoundation/dependabot/bundler/test-prof-1.0.10
Bump test-prof from 1.0.9 to 1.0.10
2022-08-24 16:46:29 +10:00
dependabot[bot]
eb0051c033 Bump puma from 5.6.4 to 5.6.5
Bumps [puma](https://github.com/puma/puma) from 5.6.4 to 5.6.5.
- [Release notes](https://github.com/puma/puma/releases)
- [Changelog](https://github.com/puma/puma/blob/master/History.md)
- [Commits](https://github.com/puma/puma/compare/v5.6.4...v5.6.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-23 09:04:05 +00:00
dependabot[bot]
ca9a7d255e Bump rubocop from 1.35.0 to 1.35.1
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.35.0 to 1.35.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.35.0...v1.35.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-22 09:06:17 +00:00
Maikel Linke
7cb74f2452 Revert "Merge pull request #9456 from openfoodfoundation/dependabot/bundler/activemerchant-1.126.0"
This reverts commit 82f38c9aea, reversing
changes made to 689720b749.
2022-08-22 15:31:57 +10:00
dependabot[bot]
8f42c6fbed Bump view_component from 2.68.0 to 2.69.0
Bumps [view_component](https://viewcomponent.org) from 2.68.0 to 2.69.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-08-19 09:05:47 +00:00
dependabot[bot]
bb233c5656 Bump webmock from 3.17.1 to 3.18.1
Bumps [webmock](https://github.com/bblimke/webmock) from 3.17.1 to 3.18.1.
- [Release notes](https://github.com/bblimke/webmock/releases)
- [Changelog](https://github.com/bblimke/webmock/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bblimke/webmock/compare/v3.17.1...v3.18.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-19 09:05:12 +00:00
filipefurtad0
be021f4697 Removes spec/features from the build-run 🎉 2022-08-17 23:25:02 +01:00
filipefurtad0
f47d86c15b Sets cuprite as default; sets rack_test in before/after blocks 2022-08-17 23:25:02 +01:00
Filipe
ae391f8af4 Merge pull request #9414 from Philwi/user-generates-api-key
Let users view and regenerates api key
2022-08-17 21:36:13 +01:00
Filipe
f28c52342c Merge pull request #9532 from jibees/9492-translate-404,-500,-422-errors-pages
Translate 404, 500, 422 errors pages
2022-08-17 21:12:04 +01:00
Filipe
d3f1d4a5f9 Merge pull request #9529 from Philwi/make-the-shop-url-clickable
Make the shop url clickable
2022-08-17 20:47:07 +01:00
Filipe
cedfa35a98 Merge pull request #9341 from jibees/9336-redirect-to-login_path-if-user-is-disabled
Disabled_at logic: redirect to login path if user is disabled
2022-08-17 20:33:57 +01:00
Filipe
c11b7ed268 Merge pull request #9407 from Philwi/handle-for-invalid-referer-for-embedded-page-service
Handle for invalid referer for embedded page service
2022-08-17 18:40:43 +01:00
Filipe
b992daa1d8 Merge pull request #9510 from binarygit/convert-enterprises/edit-page-to-stimulus
Convert enterprises/edit page to stimulus
2022-08-17 18:11:59 +01:00
Filipe
10aa534f52 Merge pull request #9554 from apricot12/9179-Note-on-invoices
Add order note at the end of both invoices following current UI patterns.
2022-08-17 17:41:23 +01:00
Filipe
de990b906d Merge pull request #9563 from aintluks/bulk-coop-report-csv
Disable header row bulk_coop report
2022-08-17 16:43:37 +01:00
Maikel Linke
41ef2a4ea5 Run invoice spec as feature spec 2022-08-17 16:30:57 +10:00
filipefurtad0
077479346e Moves invoice_print_spec into system 2022-08-17 16:21:54 +10:00
binarygit
19c33e4050 Add floating UI 2022-08-17 11:39:13 +05:45
Maikel
1ff3d4a534 Merge pull request #9571 from openfoodfoundation/dependabot/bundler/view_component-2.68.0
Bump view_component from 2.64.0 to 2.68.0
2022-08-17 15:06:46 +10:00
dependabot[bot]
8ae6a36b33 Bump bullet from 7.0.2 to 7.0.3
Bumps [bullet](https://github.com/flyerhzm/bullet) from 7.0.2 to 7.0.3.
- [Release notes](https://github.com/flyerhzm/bullet/releases)
- [Changelog](https://github.com/flyerhzm/bullet/blob/master/CHANGELOG.md)
- [Commits](https://github.com/flyerhzm/bullet/compare/7.0.2...7.0.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-17 04:59:40 +00:00
dependabot[bot]
d8687f30cd Bump test-prof from 1.0.9 to 1.0.10
Bumps [test-prof](https://github.com/test-prof/test-prof) from 1.0.9 to 1.0.10.
- [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.9...v1.0.10)

---
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-08-17 04:58:49 +00:00
Maikel
bff2ddb8db Merge pull request #9565 from openfoodfoundation/dependabot/bundler/rubocop-1.35.0
Bump rubocop from 1.33.0 to 1.35.0
2022-08-17 14:56:36 +10:00
Lucas da Costa
2a9db0eea4 Disable header row bulk_coop report 2022-08-16 16:32:19 -03:00
Filipe
5c41022f76 Merge pull request #9165 from filipefurtad0/tax_split_checkout
[Split Checkout] Adds spec to test Tax charges (repoducing issue #9153)
2022-08-16 19:30:32 +01:00
dependabot[bot]
a9dec41cc1 Bump view_component from 2.64.0 to 2.68.0
Bumps [view_component](https://viewcomponent.org) from 2.64.0 to 2.68.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-08-16 09:04:18 +00:00
Maikel
918cbb8d92 Merge pull request #9570 from mkllnk/bundle-lock
Clean up Gemfile.lock after manual change
2022-08-16 16:16:19 +10:00
Maikel Linke
7cc7de7a5f Clean up Gemfile.lock
It was manually edited before which introduced a couple inconsistencies.
I'm fixing this up here by running `bundle` and restoring the bundler
version.
2022-08-16 16:10:30 +10:00
Maikel Linke
56d8d1eaf7 Scope helper methods to relevant test cases
Global methods are usually not a good idea.
2022-08-15 17:34:21 +01:00
dependabot[bot]
b57685e9d5 Bump rubocop from 1.33.0 to 1.35.0
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.33.0 to 1.35.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.33.0...v1.35.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-08-15 07:36:07 +00:00
Maikel
a3fa4a0d3e Merge pull request #9543 from filipefurtad0/remove_selenium_webdriver
Removes selenium-webdriver and webdriver gems; updates spec_helper
2022-08-15 17:34:46 +10:00
Maikel Linke
d86aeaa22a Remove unnecessary after-spec code 2022-08-15 16:51:53 +10:00
filipefurtad0
97f18d7b86 Changes names from helpers to prevent leak between specs 2022-08-15 16:13:37 +10:00
filipefurtad0
bded15a869 Updates spec for inclusive; adds pending related to epic 7540 2022-08-15 16:13:37 +10:00
filipefurtad0
fff5927cdf Changes pick-up into delivery shipping method
On line 62 we set the dependency on the shipping address to calculate taxes. Therefore, we might be better off mocking a delivery-shipping method instead of a pick-up shipping method and assuring the customers shipping address is used for this accordingly.
2022-08-15 16:13:37 +10:00
filipefurtad0
f9881b9af5 Removes if blocks from assert_db_
Initianlly, I thought it would be agood idea to have both setups - for included and added tax - in the same file. Hence, the private section would need to cover all cases. The PR has now two separate files, each one for the two tax types, so it seems unecessary to have these if blocks there. I think it is more readable this way.
2022-08-15 16:13:37 +10:00
filipefurtad0
79182a2d32 Removes test on 9131; moves test on 9153 into respective context 2022-08-15 16:13:37 +10:00
Jean-Baptiste Bellet
77eec6e6f3 Check step params and redirect if step is inconsistent to order state 2022-08-15 16:13:37 +10:00
filipefurtad0
a6e3f43344 Adds bug reproducing steps 2022-08-15 16:13:36 +10:00
filipefurtad0
f525a9f5da Adds inclusive tax-spec 2022-08-15 16:13:36 +10:00
filipefurtad0
2427bfa6ea Spec tax charging on legacy and split checkout 2022-08-15 16:13:36 +10:00
Maikel Linke
7eea4fdd1c Adds zone_with_state_member to zone factory
And make zone factories more flexible.
2022-08-15 16:13:36 +10:00
Filipe
dde4bd39b2 Merge pull request #9351 from vsmay98/9338-redirect-disabled-user-to-homepage
Redirect to homepage with flash error when disabled user trying to access any page
2022-08-12 13:52:19 +01:00
Maikel Linke
091c271237 Spec API key changes more precisely 2022-08-12 15:44:59 +10:00
Philipp Winkler
141a2a507d Make shop url clickable 2022-08-11 22:14:51 +02:00
filipefurtad0
232088f3a2 Adds the tag matomo code to the darkswarm template 2022-08-11 15:40:15 +01:00
filipefurtad0
66b9679a7c Adds matomo_tag to /register pages template 2022-08-11 14:07:02 +01:00
filipefurtad0
42753d85c7 Creates new file for matomo tag code 2022-08-11 14:07:02 +01:00
filipefurtad0
3eca13e2bc Renames general tracking code file; updates darkswarm 2022-08-11 14:07:02 +01:00
filipefurtad0
1fd09617cb Changes cookies_spec from feature to system spec 2022-08-11 10:44:22 +01:00
filipefurtad0
e5eb74f077 Updates spec_helper 2022-08-11 10:44:22 +01:00
Jean-Baptiste Bellet
f474947d2d Do not remove 500.html file since it is used by nxginx
in case of critical problems when application cannot respond
2022-08-11 11:41:39 +02:00
filipefurtad0
d1b90193a4 Removes selenium-webdriver & webdrivers gems 2022-08-11 10:34:24 +01:00
Nihal Mohammed
53ee5c32eb Add order note at the end of both invoices following current UI patterns
Add translation for note title in invoice

Update invoice spec to also test for order note
2022-08-10 23:02:13 +05:30
binarygit
79ba223e12 Delete angular code for side_menu 2022-08-10 15:14:15 +05:45
binarygit
27552c99b8 Render enterprise groups #edit and #new page using stimulus 2022-08-10 15:14:09 +05:45
binarygit
6b56a8df0a Display/hide side-menu items when values in primary details change 2022-08-10 15:11:53 +05:45
binarygit
e18a242b90 Render admin/enterprises/<name>/edit page using stimulus 2022-08-10 15:08:59 +05:45
Jean-Baptiste Bellet
60a5bf682b Handle errors page through controller ErrorsController 2022-08-08 15:36:46 +02:00
Jean-Baptiste Bellet
47c07831c1 Create an ErrorsController that handle errors thrown application 2022-08-08 15:36:23 +02:00
Philipp Winkler
bf53a02270 Add api key toggle view checkbox 2022-08-07 09:48:49 +02:00
Philipp Winkler
6291e3c587 Handle invalid referer for embedded page service 2022-07-11 22:07:00 +02:00
Vishal Jain
3143cc9d92 skip disabled user check for session controller 2022-07-05 11:35:11 +05:30
Vishal Jain
84b711e130 redirect disabled user to homepage 2022-06-24 18:09:15 +05:30
Jean-Baptiste Bellet
4007b17b1e Redirect to login path also if user is disabled
+ update spec as well
2022-06-22 15:51:11 +02:00
172 changed files with 4376 additions and 2083 deletions

View File

@@ -17,7 +17,7 @@ permissions:
jobs:
rspec:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
services:
postgres:
image: postgres:10
@@ -36,13 +36,13 @@ jobs:
specs:
- "spec/controllers"
- "spec/models"
- "spec/features/admin/[a-o0-9]*_spec.rb"
- "spec/lib"
- "spec/migrations"
- "spec/serializers"
- "spec/system/admin/[a-o0-9]*_spec.rb"
- "spec/system/admin/[p-z]*_spec.rb"
- "spec/system/consumer"
- "spec/system/admin/[a-o0-9]*"
- "spec/system/admin/[p-z]*"
- "spec/system/consumer/[a-o0-9]*"
- "spec/system/consumer/[p-z]*"
- "engines/*/spec"
fail-fast: false
steps:
@@ -78,7 +78,7 @@ jobs:
if-no-files-found: ignore
test-the-rest:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
services:
postgres:
image: postgres:10

View File

@@ -23,7 +23,7 @@ Metrics:
Enabled: true
Metrics/BlockLength:
IgnoredMethods: [
AllowedMethods: [
"class_eval",
"collection",
"context",
@@ -41,6 +41,7 @@ Metrics/BlockLength:
"resources",
"scenario",
"shared_examples",
"xdescribe",
]
Rails/SkipsModelValidations:

View File

@@ -1,13 +1,13 @@
# This configuration was generated by
# `rubocop --auto-gen-config --auto-gen-only-exclude --exclude-limit 1400`
# on 2022-03-29 16:07:39 UTC using RuboCop version 1.22.2.
# on 2022-08-29 05:26:26 UTC using RuboCop version 1.35.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.
# Offense count: 1
# Cop supports --auto-correct.
# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include.
# Include: **/*.gemfile, **/Gemfile, **/gems.rb
Bundler/OrderedGems:
@@ -25,20 +25,13 @@ Gemspec/RequiredRubyVersion:
- 'engines/web/web.gemspec'
# Offense count: 1
# Cop supports --auto-correct.
# This cop supports safe autocorrection (--autocorrect).
Layout/ClosingParenthesisIndentation:
Exclude:
- 'lib/reporting/queries/joins.rb'
# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: EmptyLineBetweenMethodDefs, EmptyLineBetweenClassDefs, EmptyLineBetweenModuleDefs, AllowAdjacentOneLineDefs, NumberOfEmptyLines.
Layout/EmptyLineBetweenDefs:
Exclude:
- 'spec/lib/reports/report_loader_spec.rb'
# Offense count: 2
# Cop supports --auto-correct.
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: empty_lines, no_empty_lines
Layout/EmptyLinesAroundBlockBody:
@@ -47,15 +40,15 @@ Layout/EmptyLinesAroundBlockBody:
- 'spec/system/admin/order_cycles/list_spec.rb'
# Offense count: 1
# Cop supports --auto-correct.
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowDoxygenCommentStyle, AllowGemfileRubyComment.
Layout/LeadingCommentSpace:
Exclude:
- 'spec/system/admin/enterprises_spec.rb'
# Offense count: 856
# Cop supports --auto-correct.
# Configuration parameters: Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# Offense count: 862
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, IgnoredPatterns.
# URISchemes: http, https
Layout/LineLength:
Exclude:
@@ -68,7 +61,6 @@ Layout/LineLength:
- 'app/controllers/admin/subscriptions_controller.rb'
- 'app/controllers/api/v0/order_cycles_controller.rb'
- 'app/controllers/payment_gateways/paypal_controller.rb'
- 'app/controllers/spree/admin/reports_controller.rb'
- 'app/controllers/spree/users_controller.rb'
- 'app/controllers/user_confirmations_controller.rb'
- 'app/helpers/angular_form_builder.rb'
@@ -85,7 +77,6 @@ Layout/LineLength:
- 'app/models/concerns/variant_stock.rb'
- 'app/models/customer.rb'
- 'app/models/enterprise.rb'
- 'app/models/enterprise_group.rb'
- 'app/models/product_import/entry_processor.rb'
- 'app/models/product_import/spreadsheet_entry.rb'
- 'app/models/product_import/unit_converter.rb'
@@ -111,23 +102,15 @@ Layout/LineLength:
- 'engines/order_management/app/services/order_management/subscriptions/validator.rb'
- 'engines/order_management/spec/services/order_management/order/updater_spec.rb'
- 'engines/web/app/helpers/web/cookies_policy_helper.rb'
- 'engines/web/spec/features/consumer/cookies_spec.rb'
- 'lib/discourse/single_sign_on.rb'
- 'lib/open_food_network/enterprise_fee_applicator.rb'
- 'lib/open_food_network/enterprise_fee_calculator.rb'
- 'lib/open_food_network/enterprise_issue_validator.rb'
- 'lib/open_food_network/order_cycle_form_applicator.rb'
- 'lib/open_food_network/order_cycle_permissions.rb'
- 'lib/open_food_network/scope_variants_for_search.rb'
- 'lib/reporting/line_items.rb'
- 'lib/reporting/reports/bulk_coop/bulk_coop_report.rb'
- 'lib/reporting/reports/enterprise_fee_summary/report_data/enterprise_fee_type_total.rb'
- 'lib/reporting/reports/order_cycle_management/order_cycle_management_report.rb'
- 'lib/open_food_network/order_cycle_permissions.rb'
- 'lib/reporting/reports/orders_and_fulfillment/customer_totals_report.rb'
- 'lib/reporting/reports/orders_and_fulfillment/distributor_totals_by_supplier_report.rb'
- 'lib/reporting/reports/payments/payments_report.rb'
- 'lib/reporting/reports/products_and_inventory/lettuce_share_report.rb'
- 'lib/reporting/reports/sales_tax/sales_tax_report.rb'
- 'lib/reporting/reports/xero_invoices/base.rb'
- 'lib/spree/localized_number.rb'
- 'lib/tasks/data.rake'
@@ -145,12 +128,10 @@ Layout/LineLength:
- 'spec/controllers/admin/subscriptions_controller_spec.rb'
- 'spec/controllers/admin/variant_overrides_controller_spec.rb'
- 'spec/controllers/api/v0/base_controller_spec.rb'
- 'spec/controllers/api/v0/enterprises_controller_spec.rb'
- 'spec/controllers/api/v0/exchange_products_controller_spec.rb'
- 'spec/controllers/api/v0/logos_controller_spec.rb'
- 'spec/controllers/api/v0/order_cycles_controller_spec.rb'
- 'spec/controllers/api/v0/orders_controller_spec.rb'
- 'spec/controllers/api/v0/product_images_controller_spec.rb'
- 'spec/controllers/api/v0/products_controller_spec.rb'
- 'spec/controllers/api/v0/promo_images_controller_spec.rb'
- 'spec/controllers/api/v0/terms_and_conditions_controller_spec.rb'
@@ -164,7 +145,6 @@ Layout/LineLength:
- 'spec/controllers/spree/admin/orders/invoices_spec.rb'
- 'spec/controllers/spree/admin/orders_controller_spec.rb'
- 'spec/controllers/spree/admin/payment_methods_controller_spec.rb'
- 'spec/controllers/spree/admin/reports_controller_spec.rb'
- 'spec/controllers/spree/admin/variants_controller_spec.rb'
- 'spec/controllers/spree/credit_cards_controller_spec.rb'
- 'spec/controllers/spree/orders_controller_spec.rb'
@@ -187,13 +167,9 @@ Layout/LineLength:
- 'spec/lib/open_food_network/tag_rule_applicator_spec.rb'
- 'spec/lib/reports/customers_report_spec.rb'
- 'spec/lib/reports/order_cycle_management_report_spec.rb'
- 'spec/lib/reports/order_grouper_spec.rb'
- 'spec/lib/reports/orders_and_fulfillment/orders_and_fulfillment_report_spec.rb'
- 'spec/lib/reports/packing/packing_report_spec.rb'
- 'spec/lib/reports/products_and_inventory_report_spec.rb'
- 'spec/lib/reports/users_and_enterprises_report_spec.rb'
- 'spec/lib/reports/xero_invoices_report_spec.rb'
- 'spec/lib/stripe/authorize_response_patcher_spec.rb'
- 'spec/mailers/order_mailer_spec.rb'
- 'spec/mailers/producer_mailer_spec.rb'
- 'spec/mailers/subscription_mailer_spec.rb'
@@ -201,7 +177,6 @@ Layout/LineLength:
- 'spec/models/concerns/calculated_adjustments_spec.rb'
- 'spec/models/concerns/order_shipment_spec.rb'
- 'spec/models/concerns/product_stock_spec.rb'
- 'spec/models/enterprise_group_spec.rb'
- 'spec/models/enterprise_relationship_spec.rb'
- 'spec/models/enterprise_spec.rb'
- 'spec/models/exchange_spec.rb'
@@ -227,7 +202,6 @@ Layout/LineLength:
- 'spec/models/tag_rule/filter_payment_methods_spec.rb'
- 'spec/models/tag_rule/filter_products_spec.rb'
- 'spec/models/tag_rule/filter_shipping_methods_spec.rb'
- 'spec/models/terms_of_service_file_spec.rb'
- 'spec/models/variant_override_spec.rb'
- 'spec/requests/api/orders_spec.rb'
- 'spec/requests/checkout/failed_checkout_spec.rb'
@@ -287,6 +261,7 @@ Layout/LineLength:
- 'spec/system/admin/variant_overrides_spec.rb'
- 'spec/system/consumer/authentication_spec.rb'
- 'spec/system/consumer/caching/shops_caching_spec.rb'
- 'spec/system/consumer/cookies_spec.rb'
- 'spec/system/consumer/shopping/cart_spec.rb'
- 'spec/system/consumer/shopping/checkout_auth_spec.rb'
- 'spec/system/consumer/shopping/checkout_spec.rb'
@@ -300,35 +275,20 @@ Layout/LineLength:
- 'spec/views/spree/admin/payment_methods/index.html.haml_spec.rb'
# Offense count: 1
# Cop supports --auto-correct.
Layout/MultilineBlockLayout:
Exclude:
- 'spec/lib/reports/report_renderer_spec.rb'
# Offense count: 1
# Cop supports --auto-correct.
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: symmetrical, new_line, same_line
Layout/MultilineMethodCallBraceLayout:
Exclude:
- 'lib/reporting/queries/joins.rb'
# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, IndentationWidth.
# SupportedStyles: aligned, indented, indented_relative_to_receiver
Layout/MultilineMethodCallIndentation:
Exclude:
- 'lib/reporting/reports/customers/customers_report.rb'
# Offense count: 20
# Cop supports --auto-correct.
# Offense count: 22
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowInHeredoc.
Layout/TrailingWhitespace:
Exclude:
- 'app/controllers/spree/admin/shipping_methods_controller.rb'
- 'spec/controllers/spree/admin/shipping_methods_controller_spec.rb'
- 'spec/system/admin/enterprises_spec.rb'
- 'spec/system/admin/order_spec.rb'
- 'spec/system/admin/shipping_methods_spec.rb'
- 'spec/system/flatpickr_spec.rb'
@@ -357,6 +317,7 @@ Lint/DuplicateMethods:
- 'lib/discourse/single_sign_on.rb'
# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
Lint/DuplicateRequire:
Exclude:
- 'spec/lib/open_food_network/scope_variants_to_search_spec.rb'
@@ -378,9 +339,8 @@ Lint/IneffectiveAccessModifier:
Exclude:
- 'app/models/spree/user.rb'
# Offense count: 1
# Cop supports --auto-correct.
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: AllowedMethods.
# AllowedMethods: instance_of?, kind_of?, is_a?, eql?, respond_to?, equal?
Lint/RedundantSafeNavigation:
@@ -388,6 +348,7 @@ Lint/RedundantSafeNavigation:
- 'app/models/spree/payment.rb'
# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowedMethods.
# AllowedMethods: present?, blank?, presence, try, try!, in?
Lint/SafeNavigationChain:
@@ -396,22 +357,21 @@ Lint/SafeNavigationChain:
- 'app/models/spree/stock/availability_validator.rb'
# Offense count: 2
# Cop supports --auto-correct.
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods.
Lint/UnusedMethodArgument:
Exclude:
- 'lib/reporting/queries/query_interface.rb'
# Offense count: 5
# Cop supports --auto-correct.
# Configuration parameters: AllowComments.
# This cop supports unsafe autocorrection (--autocorrect-all).
Lint/UselessMethodDefinition:
Exclude:
- 'app/controllers/spree/user_registrations_controller.rb'
- 'app/models/spree/gateway.rb'
# Offense count: 38
# Configuration parameters: IgnoredMethods, CountRepeatedAttributes, Max.
# Offense count: 28
# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods, CountRepeatedAttributes, Max.
Metrics/AbcSize:
Exclude:
- 'app/controllers/admin/enterprises_controller.rb'
@@ -433,20 +393,14 @@ Metrics/AbcSize:
- 'app/models/spree/return_authorization.rb'
- 'lib/discourse/single_sign_on.rb'
- 'lib/open_food_network/order_cycle_form_applicator.rb'
- 'lib/reporting/reports/bulk_coop/bulk_coop_report.rb'
- 'lib/reporting/reports/customers/customers_report.rb'
- 'lib/open_food_network/order_cycle_permissions.rb'
- 'lib/reporting/reports/orders_and_distributors/orders_and_distributors_report.rb'
- 'lib/reporting/reports/packing/customer.rb'
- 'lib/reporting/reports/payments/payments_report.rb'
- 'lib/reporting/reports/sales_tax/sales_tax_report.rb'
- 'lib/spree/core/controller_helpers/order.rb'
- 'lib/tasks/enterprises.rake'
- 'spec/services/order_checkout_restart_spec.rb'
# Offense count: 43
# Configuration parameters: CountComments, Max, CountAsOne, ExcludedMethods, IgnoredMethods.
# IgnoredMethods: refine
# Offense count: 42
# Configuration parameters: CountComments, Max, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods.
# AllowedMethods: refine
Metrics/BlockLength:
Exclude:
- 'app/models/spree/order/checkout.rb'
@@ -474,7 +428,6 @@ Metrics/BlockLength:
- 'spec/support/matchers/select2_matchers.rb'
- 'spec/support/matchers/table_matchers.rb'
- 'spec/swagger_helper.rb'
- 'spec/system/admin/order_cycles/complex_updating_specific_time_spec.rb'
- 'spec/system/consumer/shopping/checkout_spec.rb'
# Offense count: 1
@@ -483,7 +436,7 @@ Metrics/BlockNesting:
Exclude:
- 'app/models/spree/payment/processing.rb'
# Offense count: 50
# Offense count: 45
# Configuration parameters: CountComments, Max, CountAsOne.
Metrics/ClassLength:
Exclude:
@@ -502,7 +455,6 @@ Metrics/ClassLength:
- 'app/controllers/spree/admin/payment_methods_controller.rb'
- 'app/controllers/spree/admin/payments_controller.rb'
- 'app/controllers/spree/admin/products_controller.rb'
- 'app/controllers/spree/admin/reports_controller.rb'
- 'app/controllers/spree/admin/users_controller.rb'
- 'app/controllers/spree/orders_controller.rb'
- 'app/models/enterprise.rb'
@@ -529,16 +481,13 @@ Metrics/ClassLength:
- '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'
- 'lib/open_food_network/permissions.rb'
- 'lib/reporting/reports/bulk_coop/bulk_coop_report.rb'
- 'lib/reporting/reports/enterprise_fee_summary/scope.rb'
- 'lib/reporting/reports/order_cycle_management/order_cycle_management_report.rb'
- 'lib/open_food_network/order_cycle_permissions.rb'
- 'lib/reporting/reports/payments/payments_report.rb'
- 'lib/open_food_network/permissions.rb'
- 'lib/reporting/reports/enterprise_fee_summary/scope.rb'
- 'lib/reporting/reports/xero_invoices/base.rb'
# Offense count: 39
# Configuration parameters: IgnoredMethods, Max.
# Offense count: 35
# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods, Max.
Metrics/CyclomaticComplexity:
Exclude:
- 'app/controllers/admin/enterprises_controller.rb'
@@ -565,18 +514,14 @@ Metrics/CyclomaticComplexity:
- 'app/models/spree/zone.rb'
- 'lib/discourse/single_sign_on.rb'
- 'lib/open_food_network/enterprise_issue_validator.rb'
- 'lib/reporting/reports/bulk_coop/bulk_coop_report.rb'
- 'lib/reporting/reports/customers/customers_report.rb'
- 'lib/reporting/reports/orders_and_fulfillment/customer_totals_report.rb'
- 'lib/reporting/reports/payments/payments_report.rb'
- 'lib/reporting/reports/xero_invoices/base.rb'
- 'lib/spree/core/controller_helpers/order.rb'
- 'lib/spree/core/controller_helpers/respond_with.rb'
- 'lib/spree/localized_number.rb'
- 'spec/models/product_importer_spec.rb'
# Offense count: 32
# Configuration parameters: CountComments, Max, CountAsOne, ExcludedMethods, IgnoredMethods.
# Offense count: 26
# Configuration parameters: CountComments, Max, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods.
Metrics/MethodLength:
Exclude:
- 'app/controllers/admin/enterprises_controller.rb'
@@ -593,15 +538,12 @@ Metrics/MethodLength:
- 'app/models/spree/preferences/preferable_class_methods.rb'
- 'lib/discourse/single_sign_on.rb'
- 'lib/open_food_network/order_cycle_form_applicator.rb'
- 'lib/reporting/reports/bulk_coop/bulk_coop_report.rb'
- 'lib/reporting/reports/enterprise_fee_summary/scope.rb'
- 'lib/reporting/reports/order_cycle_management/order_cycle_management_report.rb'
- 'lib/open_food_network/order_cycle_permissions.rb'
- 'lib/reporting/reports/payments/payments_report.rb'
- 'lib/reporting/reports/enterprise_fee_summary/scope.rb'
- 'lib/reporting/reports/xero_invoices/base.rb'
- 'lib/tasks/sample_data/product_factory.rb'
# Offense count: 54
# Offense count: 51
# Configuration parameters: CountComments, Max, CountAsOne.
Metrics/ModuleLength:
Exclude:
@@ -641,9 +583,6 @@ Metrics/ModuleLength:
- 'spec/lib/reports/customers_report_spec.rb'
- 'spec/lib/reports/enterprise_fee_summary/authorizer_spec.rb'
- 'spec/lib/reports/order_cycle_management_report_spec.rb'
- 'spec/lib/reports/order_grouper_spec.rb'
- 'spec/lib/reports/orders_and_fulfillment/customer_totals_report_spec.rb'
- 'spec/lib/reports/orders_and_fulfillment/orders_and_fulfillment_report_spec.rb'
- 'spec/lib/reports/products_and_inventory_report_spec.rb'
- 'spec/lib/reports/users_and_enterprises_report_spec.rb'
- 'spec/models/spree/adjustment_spec.rb'
@@ -670,8 +609,8 @@ Metrics/ParameterLists:
- 'spec/support/controller_requests_helper.rb'
- 'spec/system/admin/reports_spec.rb'
# Offense count: 7
# Configuration parameters: IgnoredMethods, Max.
# Offense count: 5
# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods, Max.
Metrics/PerceivedComplexity:
Exclude:
- 'app/controllers/spree/admin/taxons_controller.rb'
@@ -679,10 +618,8 @@ Metrics/PerceivedComplexity:
- 'app/models/enterprise_relationship.rb'
- 'app/models/spree/ability.rb'
- 'app/models/spree/order/checkout.rb'
- 'lib/reporting/reports/bulk_coop/bulk_coop_report.rb'
- 'lib/reporting/reports/payments/payments_report.rb'
# Offense count: 9
# Offense count: 8
Naming/AccessorMethodName:
Exclude:
- 'app/controllers/spree/admin/taxonomies_controller.rb'
@@ -716,8 +653,8 @@ Naming/MethodParameterName:
Exclude:
- 'app/services/process_payment_intent.rb'
# Offense count: 30
# Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers.
# Offense count: 28
# Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
# SupportedStyles: snake_case, normalcase, non_integer
# AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339
Naming/VariableNumber:
@@ -725,7 +662,6 @@ Naming/VariableNumber:
- 'app/controllers/spree/orders_controller.rb'
- 'app/models/content_configuration.rb'
- 'app/models/preference_sections/main_links_section.rb'
- 'lib/reporting/reports/orders_and_fulfillment/customer_totals_report.rb'
- 'lib/spree/core/controller_helpers/common.rb'
- 'spec/controllers/spree/admin/search_controller_spec.rb'
- 'spec/factories/stock_location_factory.rb'
@@ -741,13 +677,13 @@ Rails/ActiveRecordOverride:
- 'app/models/spree/product.rb'
# Offense count: 1
# Cop supports --auto-correct.
# This cop supports unsafe autocorrection (--autocorrect-all).
Rails/ApplicationController:
Exclude:
- 'engines/dfc_provider/app/controllers/dfc_provider/api/base_controller.rb'
# Offense count: 6
# Cop supports --auto-correct.
# This cop supports unsafe autocorrection (--autocorrect-all).
Rails/ApplicationJob:
Exclude:
- 'app/jobs/bulk_invoice_job.rb'
@@ -758,19 +694,19 @@ Rails/ApplicationJob:
- 'app/jobs/subscription_placement_job.rb'
# Offense count: 1
# Cop supports --auto-correct.
# This cop supports unsafe autocorrection (--autocorrect-all).
Rails/ApplicationMailer:
Exclude:
- 'app/mailers/spree/base_mailer.rb'
# Offense count: 1
# Cop supports --auto-correct.
# This cop supports unsafe autocorrection (--autocorrect-all).
Rails/ApplicationRecord:
Exclude:
- 'lib/tasks/data/remove_transient_data.rb'
# Offense count: 5
# Cop supports --auto-correct.
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: NilOrEmpty, NotPresent, UnlessPresent.
Rails/Blank:
Exclude:
@@ -812,7 +748,7 @@ Rails/HasAndBelongsToMany:
- 'app/models/spree/variant.rb'
- 'app/models/spree/zone.rb'
# Offense count: 47
# Offense count: 45
# Configuration parameters: Include.
# Include: app/models/**/*.rb
Rails/HasManyOrHasOneDependent:
@@ -838,9 +774,8 @@ Rails/HasManyOrHasOneDependent:
- 'app/models/spree/taxonomy.rb'
- 'app/models/spree/user.rb'
- 'app/models/spree/variant.rb'
- 'app/models/subscription.rb'
# Offense count: 59
# Offense count: 62
# Configuration parameters: Include.
# Include: app/helpers/**/*.rb
Rails/HelperInstanceVariable:
@@ -881,7 +816,7 @@ Rails/InverseOf:
# Offense count: 38
# Configuration parameters: Include.
# Include: app/controllers/**/*.rb
# Include: app/controllers/**/*.rb, app/mailers/**/*.rb
Rails/LexicallyScopedActionFilter:
Exclude:
- 'app/controllers/admin/enterprise_groups_controller.rb'
@@ -904,10 +839,9 @@ Rails/LexicallyScopedActionFilter:
- 'app/controllers/spree/admin/zones_controller.rb'
- 'app/controllers/spree/users_controller.rb'
# Offense count: 19
# Offense count: 18
Rails/OutputSafety:
Exclude:
- 'app/controllers/spree/admin/reports_controller.rb'
- 'app/helpers/angular_form_helper.rb'
- 'app/helpers/application_helper.rb'
- 'app/helpers/reports_helper.rb'
@@ -922,7 +856,7 @@ Rails/OutputSafety:
- 'spec/system/admin/order_print_ticket_spec.rb'
# Offense count: 1
# Cop supports --auto-correct.
# This cop supports unsafe autocorrection (--autocorrect-all).
Rails/RelativeDateConstant:
Exclude:
- 'lib/tasks/data/remove_transient_data.rb'
@@ -936,7 +870,7 @@ Rails/SkipsModelValidations:
- 'spec/models/spree/line_item_spec.rb'
# Offense count: 5
# Cop supports --auto-correct.
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: strict, flexible
Rails/TimeZone:
@@ -971,20 +905,20 @@ Security/Open:
- 'app/services/image_importer.rb'
# Offense count: 1
# Cop supports --auto-correct.
# This cop supports safe autocorrection (--autocorrect).
Style/BlockComments:
Exclude:
- 'spec/system/admin/tag_rules_spec.rb'
# Offense count: 1
# Cop supports --auto-correct.
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowOnConstant.
Style/CaseEquality:
Exclude:
- 'spec/models/spree/payment_spec.rb'
# Offense count: 3
# Cop supports --auto-correct.
# This cop supports unsafe autocorrection (--autocorrect-all).
Style/CaseLikeIf:
Exclude:
- 'app/controllers/admin/order_cycles_controller.rb'
@@ -992,7 +926,7 @@ Style/CaseLikeIf:
- 'app/models/spree/payment/processing.rb'
# Offense count: 25
# Cop supports --auto-correct.
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: nested, compact
Style/ClassAndModuleChildren:
@@ -1027,13 +961,14 @@ Style/ClassVars:
- 'lib/spree/core/delegate_belongs_to.rb'
# Offense count: 2
# Configuration parameters: MaxUnannotatedPlaceholdersAllowed, IgnoredMethods.
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: MaxUnannotatedPlaceholdersAllowed, AllowedMethods, AllowedPatterns, IgnoredMethods.
# SupportedStyles: annotated, template, unannotated
Style/FormatStringToken:
EnforcedStyle: unannotated
# Offense count: 1
# Cop supports --auto-correct.
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: always, always_true, never
Style/FrozenStringLiteralComment:
@@ -1041,7 +976,7 @@ Style/FrozenStringLiteralComment:
- '.simplecov'
# Offense count: 6
# Cop supports --auto-correct.
# This cop supports unsafe autocorrection (--autocorrect-all).
Style/GlobalStdStream:
Exclude:
- 'lib/tasks/data.rake'
@@ -1050,8 +985,8 @@ Style/GlobalStdStream:
- 'lib/tasks/subscriptions/debug.rake'
- 'lib/tasks/subscriptions/test.rake'
# Offense count: 39
# Configuration parameters: MinBodyLength.
# Offense count: 40
# Configuration parameters: MinBodyLength, AllowConsecutiveConditionals.
Style/GuardClause:
Exclude:
- 'app/controllers/admin/enterprises_controller.rb'
@@ -1085,8 +1020,8 @@ Style/HashLikeCase:
- 'app/models/enterprise.rb'
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: IgnoredMethods.
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
Style/MethodCallWithoutArgsParentheses:
Exclude:
- 'spec/system/flatpickr_spec.rb'
@@ -1098,22 +1033,8 @@ Style/MissingRespondToMissing:
- 'app/models/spree/gateway.rb'
- 'app/models/spree/preferences/configuration.rb'
# Offense count: 1
Style/MixinUsage:
Exclude:
- 'lib/reporting/reports/orders_and_fulfillment/orders_and_fulfillment_report.rb'
# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: literals, strict
Style/MutableConstant:
Exclude:
- 'lib/reporting/report_template.rb'
- 'lib/reporting/reports/packing/base.rb'
# Offense count: 22
# Cop supports --auto-correct.
# This cop supports safe autocorrection (--autocorrect).
Style/NestedModifier:
Exclude:
- 'spec/controllers/admin/subscriptions_controller_spec.rb'
@@ -1127,7 +1048,7 @@ Style/NestedModifier:
- 'spec/system/admin/payments_stripe_spec.rb'
- 'spec/system/admin/reports_spec.rb'
# Offense count: 26
# Offense count: 17
# Configuration parameters: AllowedMethods.
# AllowedMethods: respond_to_missing?
Style/OptionalBooleanParameter:
@@ -1139,7 +1060,6 @@ Style/OptionalBooleanParameter:
- 'app/models/enterprise_relationship.rb'
- 'app/models/product_import/entry_processor.rb'
- 'app/models/spree/order_contents.rb'
- 'app/models/spree/preferences/file_configuration.rb'
- 'app/models/spree/shipment.rb'
- 'engines/order_management/app/services/order_management/stock/estimator.rb'
- 'lib/spree/core/controller_helpers/order.rb'
@@ -1147,7 +1067,7 @@ Style/OptionalBooleanParameter:
- 'spec/support/request/web_helper.rb'
# Offense count: 1
# Cop supports --auto-correct.
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: short, verbose
Style/PreferredHashMethods:
@@ -1155,13 +1075,13 @@ Style/PreferredHashMethods:
- 'app/controllers/api/v0/shipments_controller.rb'
# Offense count: 1
# Cop supports --auto-correct.
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowMultipleReturnValues.
Style/RedundantReturn:
Exclude:
- 'app/controllers/spree/admin/shipping_methods_controller.rb'
# Offense count: 205
# Offense count: 209
Style/Send:
Exclude:
- 'app/controllers/split_checkout_controller.rb'
@@ -1195,17 +1115,16 @@ Style/Send:
- 'spec/services/cart_service_spec.rb'
- 'spec/services/products_renderer_spec.rb'
- 'spec/services/variant_units/option_value_namer_spec.rb'
- 'spec/spec_helper.rb'
- 'spec/support/localized_number_helper.rb'
# Offense count: 1
# Cop supports --auto-correct.
# This cop supports unsafe autocorrection (--autocorrect-all).
Style/SingleArgumentDig:
Exclude:
- 'app/services/checkout/form_data_adapter.rb'
# Offense count: 4
# Cop supports --auto-correct.
# This cop supports unsafe autocorrection (--autocorrect-all).
Style/SlicingWithRange:
Exclude:
- 'app/helpers/spree/admin/navigation_helper.rb'
@@ -1213,8 +1132,8 @@ Style/SlicingWithRange:
- 'engines/order_management/app/services/order_management/subscriptions/validator.rb'
- 'lib/discourse/single_sign_on.rb'
# Offense count: 28
# Cop supports --auto-correct.
# Offense count: 29
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: Mode.
Style/StringConcatenation:
Exclude:

View File

@@ -131,7 +131,7 @@ gem 'flipper'
gem 'flipper-active_record'
gem 'flipper-ui'
gem "view_component", require: "view_component/engine"
gem "view_component"
group :production, :staging do
gem 'ddtrace'
@@ -152,10 +152,8 @@ group :test, :development do
gem 'rspec-rails', ">= 3.5.2"
gem 'rspec-retry'
gem 'rswag-specs'
gem 'selenium-webdriver'
gem 'shoulda-matchers'
gem 'timecop'
gem 'webdrivers'
gem 'debug', '>= 1.0.0'
end
@@ -180,7 +178,7 @@ group :development do
gem 'spring-commands-rspec'
gem 'web-console'
gem "view_component_storybook", require: "view_component/storybook/engine"
gem "view_component_storybook"
gem 'rack-mini-profiler', '< 3.0.0'
end

View File

@@ -51,42 +51,42 @@ GEM
remote: https://rubygems.org/
specs:
Ascii85 (1.1.0)
actioncable (6.1.6.1)
actionpack (= 6.1.6.1)
activesupport (= 6.1.6.1)
actioncable (6.1.7)
actionpack (= 6.1.7)
activesupport (= 6.1.7)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.1.6.1)
actionpack (= 6.1.6.1)
activejob (= 6.1.6.1)
activerecord (= 6.1.6.1)
activestorage (= 6.1.6.1)
activesupport (= 6.1.6.1)
actionmailbox (6.1.7)
actionpack (= 6.1.7)
activejob (= 6.1.7)
activerecord (= 6.1.7)
activestorage (= 6.1.7)
activesupport (= 6.1.7)
mail (>= 2.7.1)
actionmailer (6.1.6.1)
actionpack (= 6.1.6.1)
actionview (= 6.1.6.1)
activejob (= 6.1.6.1)
activesupport (= 6.1.6.1)
actionmailer (6.1.7)
actionpack (= 6.1.7)
actionview (= 6.1.7)
activejob (= 6.1.7)
activesupport (= 6.1.7)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.1.6.1)
actionview (= 6.1.6.1)
activesupport (= 6.1.6.1)
actionpack (6.1.7)
actionview (= 6.1.7)
activesupport (= 6.1.7)
rack (~> 2.0, >= 2.0.9)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actionpack-action_caching (1.2.2)
actionpack (>= 4.0.0)
actiontext (6.1.6.1)
actionpack (= 6.1.6.1)
activerecord (= 6.1.6.1)
activestorage (= 6.1.6.1)
activesupport (= 6.1.6.1)
actiontext (6.1.7)
actionpack (= 6.1.7)
activerecord (= 6.1.7)
activestorage (= 6.1.7)
activesupport (= 6.1.7)
nokogiri (>= 1.8.5)
actionview (6.1.6.1)
activesupport (= 6.1.6.1)
actionview (6.1.7)
activesupport (= 6.1.7)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
@@ -98,19 +98,19 @@ GEM
activemodel (>= 5.2.0)
activestorage (>= 5.2.0)
activesupport (>= 5.2.0)
activejob (6.1.6.1)
activesupport (= 6.1.6.1)
activejob (6.1.7)
activesupport (= 6.1.7)
globalid (>= 0.3.6)
activemerchant (1.126.0)
activemerchant (1.123.0)
activesupport (>= 4.2)
builder (>= 2.1.2, < 4.0.0)
i18n (>= 0.6.9)
nokogiri (~> 1.4)
activemodel (6.1.6.1)
activesupport (= 6.1.6.1)
activerecord (6.1.6.1)
activemodel (= 6.1.6.1)
activesupport (= 6.1.6.1)
activemodel (6.1.7)
activesupport (= 6.1.7)
activerecord (6.1.7)
activemodel (= 6.1.7)
activesupport (= 6.1.7)
activerecord-import (1.4.0)
activerecord (>= 4.2)
activerecord-postgresql-adapter (0.0.1)
@@ -121,14 +121,14 @@ GEM
multi_json (~> 1.11, >= 1.11.2)
rack (>= 2.0.8, < 3)
railties (>= 5.2.4.1)
activestorage (6.1.6.1)
actionpack (= 6.1.6.1)
activejob (= 6.1.6.1)
activerecord (= 6.1.6.1)
activesupport (= 6.1.6.1)
activestorage (6.1.7)
actionpack (= 6.1.7)
activejob (= 6.1.7)
activerecord (= 6.1.7)
activesupport (= 6.1.7)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (6.1.6.1)
activesupport (6.1.7)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
@@ -138,8 +138,8 @@ GEM
activerecord (>= 5.0, < 6.2)
acts_as_list (1.0.4)
activerecord (>= 4.2)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
afm (0.2.2)
angular-rails-templates (1.2.0)
railties (>= 5.0, < 7.1)
@@ -182,7 +182,7 @@ GEM
bugsnag (6.24.2)
concurrent-ruby (~> 1.0)
builder (3.2.4)
bullet (7.0.2)
bullet (7.0.3)
activesupport (>= 3.0.0)
uniform_notifier (~> 1.11)
cable_ready (5.0.0.pre3)
@@ -203,7 +203,6 @@ GEM
marcel (~> 1.0)
nokogiri (~> 1.10, >= 1.10.4)
rubyzip (>= 1.3.0, < 3)
childprocess (4.1.0)
chronic (0.10.2)
cliver (0.3.2)
coderay (1.1.3)
@@ -357,7 +356,7 @@ GEM
rspec (>= 2.0, < 4.0)
jsonapi-serializer (2.2.0)
activesupport (>= 4.2)
jwt (2.4.1)
jwt (2.5.0)
knapsack (4.0.0)
rake
launchy (2.5.0)
@@ -387,7 +386,7 @@ GEM
mini_portile2 (2.8.0)
mini_racer (0.4.0)
libv8-node (~> 15.14.0.0)
minitest (5.16.2)
minitest (5.16.3)
monetize (1.12.0)
money (~> 6.12)
money (6.16.0)
@@ -414,7 +413,7 @@ GEM
parallel (1.22.1)
paranoia (2.6.0)
activerecord (>= 5.1, < 7.1)
parser (3.1.2.0)
parser (3.1.2.1)
ast (~> 2.4.1)
paypal-sdk-core (0.3.4)
multi_json (~> 1.0)
@@ -432,8 +431,8 @@ GEM
pry (0.13.1)
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (4.0.7)
puma (5.6.4)
public_suffix (5.0.0)
puma (5.6.5)
nio4r (~> 2.0)
raabro (1.4.0)
racc (1.6.0)
@@ -450,20 +449,20 @@ GEM
rack-test (2.0.2)
rack (>= 1.3)
rack-timeout (0.6.3)
rails (6.1.6.1)
actioncable (= 6.1.6.1)
actionmailbox (= 6.1.6.1)
actionmailer (= 6.1.6.1)
actionpack (= 6.1.6.1)
actiontext (= 6.1.6.1)
actionview (= 6.1.6.1)
activejob (= 6.1.6.1)
activemodel (= 6.1.6.1)
activerecord (= 6.1.6.1)
activestorage (= 6.1.6.1)
activesupport (= 6.1.6.1)
rails (6.1.7)
actioncable (= 6.1.7)
actionmailbox (= 6.1.7)
actionmailer (= 6.1.7)
actionpack (= 6.1.7)
actiontext (= 6.1.7)
actionview (= 6.1.7)
activejob (= 6.1.7)
activemodel (= 6.1.7)
activerecord (= 6.1.7)
activestorage (= 6.1.7)
activesupport (= 6.1.7)
bundler (>= 1.15.0)
railties (= 6.1.6.1)
railties (= 6.1.7)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
@@ -478,9 +477,9 @@ GEM
i18n (>= 0.7, < 2)
railties (>= 6.0.0, < 8)
rails_safe_tasks (1.0.0)
railties (6.1.6.1)
actionpack (= 6.1.6.1)
activesupport (= 6.1.6.1)
railties (6.1.7)
actionpack (= 6.1.7)
activesupport (= 6.1.7)
method_source
rake (>= 12.2)
thor (~> 1.0)
@@ -494,7 +493,7 @@ GEM
rb-inotify (0.10.1)
ffi (~> 1.0)
redcarpet (3.5.1)
redis (4.7.1)
redis (4.8.0)
regexp_parser (2.5.0)
reline (0.3.1)
io-console (~> 0.5)
@@ -540,31 +539,31 @@ GEM
rspec-retry (0.6.2)
rspec-core (> 3.3)
rspec-support (3.10.3)
rswag-api (2.5.1)
rswag-api (2.6.0)
railties (>= 3.1, < 7.1)
rswag-specs (2.5.1)
rswag-specs (2.6.0)
activesupport (>= 3.1, < 7.1)
json-schema (~> 2.2)
railties (>= 3.1, < 7.1)
rswag-ui (2.5.1)
rswag-ui (2.6.0)
actionpack (>= 3.1, < 7.1)
railties (>= 3.1, < 7.1)
rubocop (1.33.0)
rubocop (1.36.0)
json (~> 2.3)
parallel (~> 1.10)
parser (>= 3.1.0.0)
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.19.1, < 2.0)
rubocop-ast (>= 1.20.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.19.1)
rubocop-ast (1.21.0)
parser (>= 3.1.1.0)
rubocop-rails (2.15.2)
rubocop-rails (2.16.1)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.7.0, < 2.0)
rubocop (>= 1.33.0, < 2.0)
ruby-progressbar (1.11.0)
ruby-rc4 (0.1.5)
ruby-vips (2.1.4)
@@ -581,18 +580,13 @@ GEM
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
sd_notify (0.1.1)
selenium-webdriver (4.3.0)
childprocess (>= 0.5, < 5.0)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
semantic_range (3.0.0)
shoulda-matchers (5.1.0)
shoulda-matchers (5.2.0)
activesupport (>= 5.2.0)
sidekiq (6.5.4)
connection_pool (>= 2.2.2)
sidekiq (6.5.6)
connection_pool (>= 2.2.5)
rack (~> 2.0)
redis (>= 4.5.0)
redis (>= 4.5.0, < 5)
sidekiq-scheduler (4.0.2)
redis (>= 4.2.0)
rufus-scheduler (~> 3.2)
@@ -626,9 +620,9 @@ GEM
activerecord (>= 5.1)
state_machines-activemodel (>= 0.8.0)
stringex (2.8.5)
stripe (7.0.0)
stripe (7.1.0)
temple (0.8.2)
test-prof (1.0.9)
test-prof (1.0.10)
test-unit (3.5.3)
power_assert
thor (1.2.1)
@@ -640,12 +634,12 @@ GEM
concurrent-ruby (~> 1.0)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
unicode-display_width (2.2.0)
unicode-display_width (2.3.0)
uniform_notifier (1.16.0)
valid_email2 (4.0.3)
valid_email2 (4.0.4)
activemodel (>= 3.2)
mail (~> 2.5)
view_component (2.64.0)
view_component (2.72.0)
activesupport (>= 5.0.0, < 8.0)
concurrent-ruby (~> 1.0)
method_source (~> 1.0)
@@ -658,11 +652,7 @@ GEM
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
railties (>= 6.0.0)
webdrivers (5.0.0)
nokogiri (~> 1.6)
rubyzip (>= 1.3.0)
selenium-webdriver (~> 4.0)
webmock (3.17.1)
webmock (3.18.1)
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
@@ -671,7 +661,6 @@ GEM
rack-proxy (>= 0.6.1)
railties (>= 5.2)
semantic_range (>= 2.3.0)
websocket (1.2.9)
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
@@ -794,7 +783,6 @@ DEPENDENCIES
rubocop-rails
sd_notify
select2-rails!
selenium-webdriver
shoulda-matchers
sidekiq
sidekiq-scheduler
@@ -814,7 +802,6 @@ DEPENDENCIES
view_component_storybook
web!
web-console
webdrivers
webmock
webpacker (~> 5)
whenever

View File

@@ -105,6 +105,8 @@
//= require moment/locale/tr.js
//= require moment/locale/pl.js
//= require js-big-decimal/dist/web/js-big-decimal.min.js
// foundation
//= require ../shared/mm-foundation-tpls-0.9.0-20180826174721.min.js

View File

@@ -256,10 +256,10 @@ angular.module("ofn.admin").controller "AdminProductEditCtrl", ($scope, $timeout
$scope.packVariant = (product, variant) ->
if variant.hasOwnProperty("unit_value_with_description")
match = variant.unit_value_with_description.match(/^([\d\.]+(?= |$)|)( |)(.*)$/)
match = variant.unit_value_with_description.match(/^([\d\.\,]+(?= |$)|)( |)(.*)$/)
if match
product = BulkProducts.find product.id
variant.unit_value = parseFloat(match[1])
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
variant.unit_description = match[3]

View File

@@ -39,9 +39,9 @@ angular.module("ofn.admin").directive "ofnDisplayAs", (OptionValueNamer) ->
# get relevant variant properties
variant = scope.$eval(attrs.ofnDisplayAs) # Like this so we can switch between 'master' and 'variant'
if variant.unit_value_with_description?
match = variant.unit_value_with_description.match(/^([\d\.]+(?= |$)|)( |)(.*)$/)
match = variant.unit_value_with_description.match(/^([\d\.\,]+(?= |$)|)( |)(.*)$/)
if match
unit_value = parseFloat(match[1])
unit_value = parseFloat(match[1].replace(",", "."))
unit_value = null if isNaN(unit_value)
unit_value *= variant_unit_scale if unit_value && variant_unit_scale
unit_description = match[3]

View File

@@ -1,15 +0,0 @@
angular.module("admin.enterprise_groups")
.controller "sideMenuCtrl", ($scope, SideMenu) ->
$scope.menu = SideMenu
$scope.select = SideMenu.select
$scope.menu.setItems [
{ name: 'primary_details', label: t('primary_details'), icon_class: "icon-user" }
{ name: 'users', label: t('users'), icon_class: "icon-user" }
{ name: 'about', label: t('about'), icon_class: "icon-pencil" }
{ name: 'images', label: t('images'), icon_class: "icon-picture" }
{ name: 'contact', label: t('admin_enterprise_groups_contact'), icon_class: "icon-phone" }
{ name: 'web', label: t('admin_enterprise_groups_web'), icon_class: "icon-globe" }
]
$scope.select(0)

View File

@@ -1,20 +0,0 @@
# Used in enterprise new and edit forms to reset the state when the country is changed
angular.module("admin.enterprises").controller 'countryCtrl', ($scope, $timeout, availableCountries) ->
$scope.address_type = "address"
$scope.countries = availableCountries
$scope.countriesById = $scope.countries.reduce (obj, country) ->
obj[country.id] = country
obj
, {}
$timeout ->
$scope.$watch 'Enterprise.' + $scope.address_type + '.country_id', (newID, oldID) ->
$scope.clearState() unless $scope.addressStateMatchesCountry()
$scope.clearState = ->
$scope.Enterprise[$scope.address_type].state_id = null
$scope.addressStateMatchesCountry = ->
$scope.countriesById[$scope.Enterprise[$scope.address_type].country_id].states.some (state) ->
state.id == $scope.Enterprise[$scope.address_type].state_id

View File

@@ -1,9 +1,8 @@
angular.module("admin.enterprises")
.controller "enterpriseCtrl", ($scope, $http, $window, NavigationCheck, enterprise, Enterprises, EnterprisePaymentMethods, EnterpriseShippingMethods, SideMenu, StatusMessage, RequestMonitor) ->
.controller "enterpriseCtrl", ($scope, $http, $window, NavigationCheck, enterprise, Enterprises, EnterprisePaymentMethods, SideMenu, StatusMessage, RequestMonitor) ->
$scope.Enterprise = enterprise
$scope.Enterprises = Enterprises
$scope.PaymentMethods = EnterprisePaymentMethods.paymentMethods
$scope.ShippingMethods = EnterpriseShippingMethods.shippingMethods
$scope.navClear = NavigationCheck.clear
$scope.menu = SideMenu
$scope.newManager = { id: null, email: (t('add_manager')) }

View File

@@ -1,27 +0,0 @@
angular.module("admin.enterprises")
.controller "permalinkCtrl", ($scope, PermalinkChecker) ->
# locals
initialPermalink = $scope.Enterprise.permalink
pendingRequest = null
# variables on $scope
$scope.availablility = ""
$scope.checking = false
$scope.$watch "Enterprise.permalink", (newValue, oldValue) ->
if newValue == initialPermalink
$scope.availability = ""
return
$scope.checking = true
pendingRequest = PermalinkChecker.check(newValue)
pendingRequest.then (data) ->
if data.permalink == initialPermalink
$scope.availability = ""
else
$scope.availability = data.available
$scope.Enterprise.permalink = data.permalink
$scope.checking = false
, (data) ->
# Do nothing (this is hopefully an aborted request)

View File

@@ -1,49 +0,0 @@
angular.module("admin.enterprises")
.controller "sideMenuCtrl", ($scope, $parse, enterprise, SideMenu, enterprisePermissions) ->
$scope.Enterprise = enterprise
$scope.menu = SideMenu
$scope.select = SideMenu.select
$scope.menu.setItems [
{ name: 'primary_details', label: t('primary_details'), icon_class: "icon-home" }
{ name: 'address', label: t('address'), icon_class: "icon-map-marker" }
{ name: 'contact', label: t('contact'), icon_class: "icon-phone" }
{ name: 'social', label: t('social'), icon_class: "icon-twitter" }
{ name: 'about', label: t('about'), icon_class: "icon-pencil" }
{ name: 'business_details', label: t('business_details'), icon_class: "icon-briefcase" }
{ name: 'images', label: t('images'), icon_class: "icon-picture" }
{ name: 'properties', label: t('properties'), icon_class: "icon-tags", show: "showProperties()" }
{ name: 'shipping_methods', label: t('shipping_methods'), icon_class: "icon-truck", show: "showShippingMethods()" }
{ name: 'payment_methods', label: t('payment_methods'), icon_class: "icon-money", show: "showPaymentMethods()" }
{ name: 'enterprise_fees', label: t('enterprise_fees'), icon_class: "icon-tasks", show: "showEnterpriseFees()" }
{ name: 'enterprise_permissions', label: t('enterprise_permissions'), icon_class: "icon-plug" }
{ name: 'inventory_settings', label: t('inventory_settings'), icon_class: "icon-list-ol", show: "enterpriseIsShop()" }
{ name: 'tag_rules', label: t('tag_rules'), icon_class: "icon-random", show: "enterpriseIsShop()" }
{ name: 'shop_preferences', label: t('shop_preferences'), icon_class: "icon-shopping-cart", show: "enterpriseIsShop()" }
{ name: 'users', label: t('users'), icon_class: "icon-user" }
]
SideMenu.init()
$scope.showItem = (item) ->
if item.show?
$parse(item.show)($scope)
else
true
$scope.showProperties = ->
!!$scope.Enterprise.is_primary_producer
$scope.showShippingMethods = ->
enterprisePermissions.can_manage_shipping_methods && $scope.Enterprise.sells != "none"
$scope.showPaymentMethods = ->
enterprisePermissions.can_manage_payment_methods && $scope.Enterprise.sells != "none"
$scope.showEnterpriseFees = ->
enterprisePermissions.can_manage_enterprise_fees && ($scope.Enterprise.sells != "none" || $scope.Enterprise.is_primary_producer)
$scope.enterpriseIsShop = ->
$scope.Enterprise.sells != "none"
$scope.menu.redirect_function('enterprise_permissions', '/admin/enterprise_relationships')

View File

@@ -1,20 +0,0 @@
angular.module("admin.enterprises")
.factory "EnterpriseShippingMethods", (enterprise, ShippingMethods) ->
new class EnterpriseShippingMethods
shippingMethods: ShippingMethods.all
constructor: ->
for shipping_method in @shippingMethods
shipping_method.selected = shipping_method.id in enterprise.shipping_method_ids
displayColor: ->
if @shippingMethods.length > 0 && @selectedCount() > 0
"blue"
else
"red"
selectedCount: ->
@shippingMethods.reduce (count, shipping_method) ->
count++ if shipping_method.selected
count
, 0

View File

@@ -32,7 +32,7 @@ angular.module("admin.products")
if match
$scope.product.master.unit_value = PriceParser.parse(match[1])
$scope.product.master.unit_value = null if isNaN($scope.product.master.unit_value)
$scope.product.master.unit_value *= $scope.product.variant_unit_scale if $scope.product.master.unit_value && $scope.product.variant_unit_scale
$scope.product.master.unit_value = window.bigDecimal.multiply($scope.product.master.unit_value, $scope.product.variant_unit_scale, 2) if $scope.product.master.unit_value && $scope.product.variant_unit_scale
$scope.product.master.unit_description = match[3]
else
value = $scope.product.master.unit_value

View File

@@ -23,10 +23,10 @@ angular.module("admin.products").controller "variantUnitsCtrl", ($scope, Variant
$scope.updateValue = ->
unit_value_human = angular.element('#unit_value_human').val()
$scope.unit_value = PriceParser.parse(unit_value_human) * $scope.scale
$scope.unit_value = bigDecimal.multiply(PriceParser.parse(unit_value_human), $scope.scale, 2)
variant_unit_value = angular.element('#variant_unit_value').val()
$scope.unit_value_human = variant_unit_value / $scope.scale
$scope.unit_value_human = parseFloat(bigDecimal.divide(variant_unit_value, $scope.scale, 2))
$timeout -> $scope.processUnitPrice()
$timeout -> $scope.updateValue()

View File

@@ -1,3 +0,0 @@
angular.module("admin.shippingMethods").controller "shippingMethodsCtrl", ($scope, ShippingMethods) ->
$scope.findShippingMethodByID = (id) ->
$scope.ShippingMethod = ShippingMethods.byID[id]

View File

@@ -7,6 +7,7 @@ require 'open_food_network/order_cycle_permissions'
module Admin
class EnterprisesController < Admin::ResourceController
include GeocodeEnterpriseAddress
include CablecarResponses
# These need to run before #load_resource so that @object is initialised with sanitised values
prepend_before_action :override_owner, only: :create
@@ -44,7 +45,12 @@ module Admin
def edit
@object = Enterprise.where(permalink: params[:id]).
includes(users: [:ship_address, :bill_address]).first
super
if params[:stimulus]
@enterprise.is_primary_producer = params[:is_primary_producer]
@enterprise.sells = params[:enterprise_sells]
render operations: cable_car.morph("#side_menu", partial("admin/shared/side_menu"))
.morph("#permalink", partial("admin/enterprises/form/permalink"))
end
end
def welcome

View File

@@ -165,8 +165,9 @@ class ApplicationController < ActionController::Base
return unless current_spree_user.disabled
flash[:success] = nil
flash.now[:error] = I18n.t("devise.failure.disabled")
flash[:error] = I18n.t("devise.failure.disabled")
sign_out current_spree_user
redirect_to main_app.root_path
end
end

View File

@@ -0,0 +1,17 @@
# frozen_string_literal: true
class ErrorsController < ApplicationController
layout "errors"
def not_found
render status: :not_found
end
def internal_server_error
render status: :internal_server_error
end
def unprocessable_entity
render status: :unprocessable_entity
end
end

View File

@@ -21,6 +21,10 @@ class SplitCheckoutController < ::BaseController
def edit
redirect_to_step_based_on_order unless params[:step]
check_step if params[:step]
recalculate_tax if params[:step] == "summary"
flash_error_when_no_shipping_method_available if available_shipping_methods.none?
end
def update
@@ -45,6 +49,10 @@ class SplitCheckoutController < ::BaseController
private
def flash_error_when_no_shipping_method_available
flash[:error] = I18n.t('split_checkout.errors.no_shipping_methods_available')
end
def clear_invalid_payments
@order.payments.with_state(:invalid).delete_all
end
@@ -145,4 +153,18 @@ class SplitCheckoutController < ::BaseController
end
redirect_to_step_based_on_order
end
def check_step
case @order.state
when "cart", "address", "delivery"
redirect_to checkout_step_path(:details) unless params[:step] == "details"
when "payment"
redirect_to checkout_step_path(:payment) if params[:step] == "summary"
end
end
def recalculate_tax
@order.create_tax_charge!
@order.update_order!
end
end

View File

@@ -48,30 +48,11 @@ module Spree
@user.spree_roles = roles.reject(&:blank?).collect{ |r| Spree::Role.find(r) }
end
message = if new_email_unconfirmed?
Spree.t(:email_updated)
else
Spree.t(:account_updated)
end
flash.now[:success] = message
flash.now[:success] = update_message
end
render :edit
end
def generate_api_key
if @user.generate_spree_api_key!
flash[:success] = t('spree.api.key_generated')
end
redirect_to spree.edit_admin_user_path(@user)
end
def clear_api_key
if @user.clear_spree_api_key!
flash[:success] = t('spree.api.key_cleared')
end
redirect_to spree.edit_admin_user_path(@user)
end
protected
def collection
@@ -100,6 +81,16 @@ module Spree
private
def update_message
return Spree.t(:show_api_key_view_toggled) if @user.show_api_key_view_previously_changed?
if new_email_unconfirmed?
Spree.t(:email_updated)
else
Spree.t(:account_updated)
end
end
# handling raise from Admin::ResourceController#destroy
def user_destroy_with_orders_error
render status: :forbidden, text: Spree.t(:error_user_destroy_with_orders)
@@ -137,7 +128,9 @@ module Spree
end
def user_params
::PermittedAttributes::User.new(params).call([:enterprise_limit])
::PermittedAttributes::User.new(params).call(
%i[enterprise_limit show_api_key_view]
)
end
end
end

View File

@@ -0,0 +1,57 @@
# frozen_string_literal: true
module Spree
class ApiKeysController < ::BaseController
include Spree::Core::ControllerHelpers
include I18nHelper
prepend_before_action :load_object
def create
@user.generate_api_key
if @user.save
flash[:success] = t('spree.api.key_generated')
end
redirect_to redirect_path
end
def destroy
@user.spree_api_key = nil
if @user.save
flash[:success] = t('spree.api.key_cleared')
end
redirect_to redirect_path
end
private
def load_object
@user ||= find_user
if @user
authorize! params[:action].to_sym, @user
else
redirect_to main_app.login_path
end
end
def find_user
Spree::User.find_by(id: params[:id]) || spree_current_user
end
def redirect_path
if request.referer.blank? || request.referer.include?(spree.account_path)
developer_settings_path
else
request.referer
end
end
def developer_settings_path
"#{spree.account_path}#/developer_settings"
end
end
end

View File

@@ -6,7 +6,6 @@ module Spree
include Rails.application.routes.url_helpers
include CablecarResponses
layout 'darkswarm'
rescue_from ActiveRecord::RecordNotFound, with: :render_404

View File

@@ -16,6 +16,7 @@ module Spree
prepend_before_action :handle_unconfirmed_email
before_action :set_checkout_redirect, only: :create
after_action :ensure_valid_locale_persisted, only: :create
skip_before_action :check_disabled_user
def create
authenticate_spree_user!

View File

@@ -78,7 +78,7 @@ module Spree
def load_object
@user ||= spree_current_user
if @user
if @user && !@user.disabled
authorize! params[:action].to_sym, @user
else
redirect_to main_app.login_path

View File

@@ -0,0 +1,17 @@
# frozen_string_literal: true
module Admin
module EnterpriseGroupsHelper
def enterprise_group_side_menu_items
[
{ name: 'primary_details', label: 'primary_details', icon_class: "icon-user",
selected: "selected" },
{ name: 'users', label: 'users', icon_class: "icon-user" },
{ name: 'about', label: 'about', icon_class: "icon-pencil" },
{ name: 'images', label: 'images', icon_class: "icon-picture" },
{ name: 'contact', label: 'admin_enterprise_groups_contact', icon_class: "icon-phone" },
{ name: 'web', label: 'admin_enterprise_groups_web', icon_class: "icon-globe" },
]
end
end
end

View File

@@ -13,5 +13,34 @@ module Admin
def select_only_item(producers)
producers.size == 1 ? producers.first.id : nil
end
def enterprise_side_menu_items(enterprise)
is_shop = enterprise.sells != "none"
show_properties = !!enterprise.is_primary_producer
show_shipping_methods = can?(:manage_shipping_methods, enterprise) && is_shop
show_payment_methods = can?(:manage_payment_methods, enterprise) && is_shop
show_enterprise_fees = can?(:manage_enterprise_fees,
enterprise) && (is_shop || enterprise.is_primary_producer)
[
{ name: 'primary_details', icon_class: "icon-home", show: true, selected: 'selected' },
{ name: 'address', icon_class: "icon-map-marker", show: true },
{ name: 'contact', icon_class: "icon-phone", show: true },
{ name: 'social', icon_class: "icon-twitter", show: true },
{ name: 'about', icon_class: "icon-pencil", show: true, form_name: "about_us" },
{ name: 'business_details', icon_class: "icon-briefcase", show: true },
{ name: 'images', icon_class: "icon-picture", show: true },
{ name: 'properties', icon_class: "icon-tags", show: show_properties },
{ name: 'shipping_methods', icon_class: "icon-truck", show: show_shipping_methods },
{ name: 'payment_methods', icon_class: "icon-money", show: show_payment_methods },
{ name: 'enterprise_fees', icon_class: "icon-tasks", show: show_enterprise_fees },
{ name: 'enterprise_permissions', icon_class: "icon-plug", show: true,
href: admin_enterprise_relationships_path },
{ name: 'inventory_settings', icon_class: "icon-list-ol", show: is_shop },
{ name: 'tag_rules', icon_class: "icon-random", show: is_shop },
{ name: 'shop_preferences', icon_class: "icon-shopping-cart", show: is_shop },
{ name: 'users', icon_class: "icon-user", show: true }
]
end
end
end

View File

@@ -70,10 +70,13 @@ module CheckoutHelper
def display_checkout_taxes_hash(order)
totals = OrderTaxAdjustmentsFetcher.new(order).totals
totals.each_with_object({}) do |(tax_rate, tax_amount), hash|
hash[number_to_percentage(tax_rate.amount * 100, precision: 1)] =
Spree::Money.new tax_amount, currency: order.currency
end
totals.map do |tax_rate, tax_amount|
{
amount: Spree::Money.new(tax_amount, currency: order.currency),
percentage: number_to_percentage(tax_rate.amount * 100, precision: 1),
rate_amount: tax_rate.amount,
}
end.sort_by { |tax| tax[:rate_amount] }
end
def display_line_item_tax_rates(line_item)

View File

@@ -71,6 +71,10 @@ module Spree
set_reset_password_token
end
def generate_api_key
self.spree_api_key = SecureRandom.hex(24)
end
def known_users
if admin?
Spree::User.where(nil)
@@ -132,16 +136,6 @@ module Spree
end
end
def generate_spree_api_key!
self.spree_api_key = SecureRandom.hex(24)
save!
end
def clear_spree_api_key!
self.spree_api_key = nil
save!
end
def last_incomplete_spree_order
spree_orders.incomplete.where(created_by_id: id).order('created_at DESC').first
end

View File

@@ -68,12 +68,12 @@ class EmbeddedPageService
end
def current_referer
return if @request.referer.blank?
uri = URI(@request.referer)
return if uri.host.blank?
uri = URI.parse(@request.referer)
return unless uri.is_a?(URI::HTTP) && uri.host.present?
uri.host.downcase
rescue URI::InvalidURIError
false
end
def current_referer_without_www

View File

@@ -12,9 +12,9 @@ module PermittedAttributes
:email, :special_instructions,
:existing_card_id, :shipping_method_id,
{ payments_attributes: [
:payment_method_id,
{ source_attributes: PermittedAttributes::PaymentSource.attributes }
],
:payment_method_id,
{ source_attributes: PermittedAttributes::PaymentSource.attributes }
],
ship_address_attributes: PermittedAttributes::Address.attributes,
bill_address_attributes: PermittedAttributes::Address.attributes }
],

View File

@@ -56,7 +56,7 @@ module VariantUnits
def option_value_value_unit_scaled
unit_scale, unit_name = scale_for_unit_value
value = @variant.unit_value / unit_scale
value = BigDecimal(@variant.unit_value / unit_scale, 6)
[value, unit_name]
end

View File

@@ -1,7 +1,7 @@
= render 'spree/shared/error_messages', target: @enterprise
= form_for [main_app, :admin, @enterprise_group] do |f|
.row{ ng: {app: 'admin.enterprise_groups', controller: 'enterpriseGroupCtrl'} }
.row{ ng: {app: 'admin.enterprise_groups', controller: 'enterpriseGroupCtrl'}, data: { controller: 'tabs-and-panels', "tabs-and-panels-class-name-value": "selected" } }
.sixteen.columns.alpha
.four.columns.alpha
= render 'admin/shared/side_menu'

View File

@@ -1,5 +1,5 @@
%fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='about'" } }
%legend {{menu.selected.label}}
%fieldset.alpha.no-border-bottom#about_panel{ data: { "tabs-and-panels-target": "panel" } }
%legend= t('about')
= f.field_container :long_description do
%text-angular{'id' => 'enterprise_group_long_description', 'name' => 'enterprise_group[long_description]', 'class' => 'text-angular', "textangular-links-target-blank" => true,
'ta-toolbar' => "[['h1','h2','h3','h4','p'],['bold','italics','underline','clear'],['insertLink']]"}

View File

@@ -1,6 +1,6 @@
= f.fields_for :address do |af|
%fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='contact'" } }
%legend {{menu.selected.label}}
%fieldset.alpha.no-border-bottom#contact_panel{ data: { "tabs-and-panels-target": "panel" } }
%legend= t('admin_enterprise_groups_contact')
.row
.alpha.three.columns
= af.label :phone

View File

@@ -1,5 +1,5 @@
%fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='images'" } }
%legend {{menu.selected.label}}
%fieldset.alpha.no-border-bottom#images_panel{ data: { "tabs-and-panels-target": "panel" } }
%legend= t('images')
.row
.alpha.three.columns
= f.label :logo, 'ofn-with-tip' => t('admin_enterprise_groups_data_powertip_logo')

View File

@@ -1,5 +1,5 @@
%fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='primary_details'" } }
%legend {{menu.selected.label}}
%fieldset.alpha.no-border-bottom#primary_details_panel{ data: { "tabs-and-panels-target": "panel default" } }
%legend= t('primary_details')
= f.field_container :name do
= f.label :name
%br/

View File

@@ -1,5 +1,5 @@
%fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='users'" } }
%legend {{menu.selected.label}}
%fieldset.alpha.no-border-bottom#users_panel{ data: { "tabs-and-panels-target": "panel" } }
%legend= t('users')
.row
.three.columns.alpha
=f.label :owner_id, t(:admin_enterprise_groups_owner)

View File

@@ -1,5 +1,5 @@
%fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='web'" } }
%legend {{menu.selected.label}}
%fieldset.alpha.no-border-bottom#web_panel{ data: { "tabs-and-panels-target": "panel" } }
%legend= t('admin_enterprise_groups_web')
.row
.alpha.three.columns
= f.label :website

View File

@@ -29,7 +29,7 @@
= t('.producer')
- if spree_current_user.admin?
%td= enterprise_form.select :sells, Enterprise::SELLS, {}, class: 'select2 fullwidth'
%td= enterprise_form.check_box :visible
%td= enterprise_form.check_box :visible, {}, 'public', 'hidden'
- if spree_current_user.admin?
%td= enterprise_form.select :owner_id, enterprise.users.map{ |e| [ e.email, e.id ] }, {}, class: "select2 fullwidth"
%td{"data-hook" => "admin_users_index_row_actions"}

View File

@@ -1,63 +1,21 @@
%fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='primary_details'" } }
%legend {{menu.selected.label}}
= render 'admin/enterprises/form/primary_details', f: f
- enterprise_side_menu_items(@enterprise).each do |item|
- case item[:name]
- when 'primary_details'
%fieldset.alpha.no-border-bottom{ id: "#{item[:name]}_panel", data: { controller: "primary-details", "primary-details-primary-producer-value": @enterprise.is_primary_producer.to_s, "primary-details-enterprise-sells-value": @enterprise.sells, "tabs-and-panels-target": "panel default" }}
%legend= t("#{ item[:name] }")
= render "admin/enterprises/form/#{ item[:form_name] || item[:name] }", f: f
%fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='users'" } }
%legend {{menu.selected.label}}
= render 'admin/enterprises/form/users', 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] }")
= render 'admin/enterprises/form/address', af: af
= f.fields_for :address do |af|
%fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='address'" } }
%legend {{menu.selected.label}}
= 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] }")
%fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='contact'" } }
%legend {{menu.selected.label}}
= render 'admin/enterprises/form/contact', f: f
%fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='social'" } }
%legend {{menu.selected.label}}
= render 'admin/enterprises/form/social', f: f
%fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='business_details'" } }
%legend {{menu.selected.label}}
= render 'admin/enterprises/form/business_details', f: f
%fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='about'" } }
%legend {{menu.selected.label}}
= render 'admin/enterprises/form/about_us', f: f
%fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='images'" } }
%legend {{menu.selected.label}}
= render 'admin/enterprises/form/images', f: f
%fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='properties'" } }
%legend {{menu.selected.label}}
= render 'admin/enterprises/form/properties', f: f
%fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='shipping_methods'" } }
%legend {{menu.selected.label}}
= render 'admin/enterprises/form/shipping_methods', f: f
%fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='payment_methods'" } }
%legend {{menu.selected.label}}
= render 'admin/enterprises/form/payment_methods', f: f
%fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='enterprise_fees'" } }
%legend {{menu.selected.label}}
= render 'admin/enterprises/form/enterprise_fees', f: f
%fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='enterprise_permissions'" } }
%legend {{menu.selected.label}}
%fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='inventory_settings'" } }
%legend {{menu.selected.label}}
= render 'admin/enterprises/form/inventory_settings', f: f
%fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='shop_preferences'" } }
%legend {{menu.selected.label}}
= render 'admin/enterprises/form/shop_preferences', f: f
%fieldset.alpha.no-border-bottom{ ng: { if: "menu.selected.name=='tag_rules'" } }
%legend {{menu.selected.label}}
= render 'admin/enterprises/form/tag_rules', f: f
- else
%fieldset.alpha.no-border-bottom{ id: "#{item[:name]}_panel", data: { "tabs-and-panels-target": "panel" }}
%legend= t("#{ item[:name] }")
= render "admin/enterprises/form/#{ item[:form_name] || item[:name] }", f: f

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{ "ng-controller" => "countryCtrl" }
%div{"data-controller": "dependant-select", "data-dependant-select-options-value": countries_with_states }
.row
.three.columns.alpha
= af.label :state_id, t(:state)
\/
= af.label :country_id, t(:country)
.four.columns
%input.ofn-select2.fullwidth#enterprise_address_attributes_state_id{ name: 'enterprise[address_attributes][state_id]', type: 'number', data: 'countriesById[Enterprise.address.country_id].states', placeholder: t('admin.choose'), ng: { model: 'Enterprise.address.state_id' } }
= 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" }
.five.columns.omega
%input.ofn-select2.fullwidth#enterprise_address_attributes_country_id{ name: 'enterprise[address_attributes][country_id]', type: 'number', data: 'countries', placeholder: t('admin.choose'), ng: { model: 'Enterprise.address.country_id' } }
= 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" }
.row
.three.columns.alpha
= af.label :latitude, t(:latitude)

View File

@@ -10,7 +10,8 @@
%input.red{ type: "button", value: t(:update), ng: { click: "submit()", disabled: "!enterprise_form.$dirty" } }
%input{ type: "button", ng: { value: "enterprise_form.$dirty ? '#{t(:cancel)}' : '#{t(:close)}'", click: "cancel('#{main_app.admin_enterprises_path}')" } }
.row
.row{ data: {
controller: "tabs-and-panels", "tabs-and-panels-class-name-value": "selected" }}
.sixteen.columns.alpha
.four.columns.alpha
= render 'admin/shared/side_menu'

View File

@@ -25,24 +25,23 @@
= af.text_field :city, { placeholder: t(:city_placeholder) }
.four.columns.omega
= af.text_field :zipcode, { placeholder: t(:postcode_placeholder) }
.row
.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{ "ng-controller" => "countryCtrl" }
%input.ofn-select2.fullwidth#enterprise_address_attributes_state_id{ name: 'enterprise[address_attributes][state_id]', type: 'number', data: 'countriesById[Enterprise.address.country_id].states', placeholder: t('admin.choose'), ng: { model: 'Enterprise.address.state_id' } }
.four.columns.omega{ "ng-controller" => "countryCtrl" }
%input.ofn-select2.fullwidth#enterprise_address_attributes_country_id{ name: 'enterprise[address_attributes][country_id]', type: 'number', data: 'countries', placeholder: t('admin.choose'), ng: { model: 'Enterprise.address.country_id' } }
.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 *
%div{'ofn-with-tip' => t('latitude_longitude_tip')}
%a= t('admin.whats_this')
= 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

View File

@@ -29,12 +29,11 @@
= bf.label :country_id, t(:country)
\/
= bf.label :state_id, t(:state)
%div{ "ng-controller": "countryCtrl", "ng-init": "address_type='business_address'" }
%div{"data-controller": "dependant-select", "data-dependant-select-options-value": countries_with_states }
.four.columns
%input.ofn-select2.fullwidth#enterprise_business_address_attributes_country_id{ name: 'enterprise[business_address_attributes][country_id]', type: 'number', data: 'countries', placeholder: t('admin.choose'), ng: { model: 'Enterprise.business_address.country_id' } }
= 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
%input.ofn-select2.fullwidth#enterprise_business_address_attributes_state_id{ name: 'enterprise[business_address_attributes][state_id]', type: 'number', data: 'countriesById[Enterprise.address.country_id].states', placeholder: t('admin.choose'), ng: { model: 'Enterprise.business_address.state_id' } }
= 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" }
.row
.three.columns.alpha

View File

@@ -6,8 +6,8 @@
.row
.alpha.three.columns
= f.label :email_address, t('.email_address')
%div{'ofn-with-tip' => t('.email_address_tip')}
%a= t('admin.whats_this')
= render partial: 'admin/shared/tooltip', locals: {tooltip_text: t('.email_address_tip')}
.omega.eight.columns
= f.text_field :email_address, { placeholder: t('.email_address_placeholder') }
.row
@@ -18,8 +18,8 @@
.row
.alpha.three.columns
= f.label :whatsapp_phone, t('.whatsapp_phone')
%div{'ofn-with-tip' => t('.whatsapp_phone_tip')}
%a= t('admin.whats_this')
= render partial: 'admin/shared/tooltip', locals: {tooltip_text: t('.whatsapp_phone_tip')}
.omega.eight.columns
= f.text_field :whatsapp_phone, { placeholder: t('.whatsapp_phone_placeholder') }
.row

View File

@@ -0,0 +1,32 @@
.permalink#permalink{ data: { controller: 'permalink', permalink: { 'initial-permalink-value': @enterprise.permalink, 'url-value': check_permalink_enterprises_url } }}
- unless @enterprise.sells == 'none'
.row
.three.columns.alpha
= label_tag :permalink, t('.permalink')
= render partial: 'admin/shared/tooltip', locals: {tooltip_text: t('.permalink_tip', link: main_app.root_url)}
.eight.columns
= text_field_tag "enterprise[permalink]", @enterprise.permalink, data: { action: "input->permalink#validate", "permalink-target": "permalinkField" }
.two.columns.omega
%div{ style: "width: 30px; height: 30px;", class: "hidden", data: { "permalink-target": "spinner" } }
= render partial: "components/admin_spinner"
%span.available.hidden{data: { "permalink-target": "available" }}
= t('available')
%i.icon-ok-sign
%span.unavailable.hidden{data: { "permalink-target": "unavailable" }}
= t('js.unavailable')
%i.icon-remove-sign
- unless @enterprise.sells == 'none'
.row
.three.columns.alpha
%label= t('.link_to_front')
= render partial: 'admin/shared/tooltip', locals: {tooltip_text: t('.link_to_front_tip')}
.eight.columns.omega
- front_shop_path = "#{main_app.root_url}#{@enterprise.permalink}/shop"
= link_to front_shop_path, front_shop_path , target: "_blank"
.row
.three.columns.alpha
= label_tag :id, t('.ofn_uid')
= render partial: 'admin/shared/tooltip', locals: {tooltip_text: t('.ofn_uid_tip')}
.six.columns
= @enterprise.id

View File

@@ -8,39 +8,34 @@
.row
.three.columns.alpha
= f.label :group_ids, t('.groups')
%div{'ofn-with-tip' => t('.groups_tip')}
%a= t('admin.whats_this')
= render partial: 'admin/shared/tooltip', locals: {tooltip_text: t('.groups_tip')}
.eight.columns.omega
= f.collection_select :group_ids, @groups, :id, :name, {}, class: "select2 fullwidth", multiple: true, placeholder: t('.groups_placeholder')
= f.collection_select :group_ids, @groups, :id, :name, {}, data: { controller: "tom-select", "tom-select-options-value": { plugins: ['remove_button'], maxItems: nil } }, class: "full-width", multiple: true, placeholder: t('.groups_placeholder')
.row
.three.columns.alpha
%label= t('.primary_producer')
%div{'ofn-with-tip' => t('.primary_producer_tip')}
%a= t('admin.whats_this')
= render partial: 'admin/shared/tooltip', locals: {tooltip_text: t('.primary_producer_tip')}
.five.columns.omega
= f.check_box :is_primary_producer, 'ng-model' => 'Enterprise.is_primary_producer'
= f.check_box :is_primary_producer, data: { action: "change->primary-details#primaryProducerChanged" }
= f.label :is_primary_producer, t('.producer')
- if spree_current_user.admin?
.row
.three.columns.alpha
= f.label :sells, t('.sells')
%div{'ofn-with-tip' => t('.sells_tip')}
%a= t('admin.whats_this')
= render partial: 'admin/shared/tooltip', locals: {tooltip_text: t('.sells_tip')}
.two.columns
= f.radio_button :sells, "none", 'ng-model' => 'Enterprise.sells'
= f.radio_button :sells, "none", 'ng-model' => 'Enterprise.sells', data: {action: "change->primary-details#enterpriseSellsChanged"}
= f.label :sells, t('.none'), value: "none"
.two.columns
= f.radio_button :sells, "own", 'ng-model' => 'Enterprise.sells'
= f.radio_button :sells, "own", 'ng-model' => 'Enterprise.sells', data: {action: "change->primary-details#enterpriseSellsChanged"}
= f.label :sells, t('.own'), value: "own"
.four.columns.omega
= f.radio_button :sells, "any", 'ng-model' => 'Enterprise.sells'
= f.radio_button :sells, "any", 'ng-model' => 'Enterprise.sells', data: {action: "change->primary-details#enterpriseSellsChanged"}
= f.label :sells, t('.any'), value: "any"
.row
.three.columns.alpha
%label= t('.visible_in_search')
%div{'ofn-with-tip' => t('.visible_in_search_tip')}
%a= t('admin.whats_this')
= render partial: 'admin/shared/tooltip', locals: {tooltip_text: t('.visible_in_search_tip')}
.two.columns
= f.radio_button :visible, "public", 'ng-model' => 'Enterprise.visible'
= f.label :visible, t('.visible'), value: 'public'
@@ -50,32 +45,5 @@
.four.columns.omega
= f.radio_button :visible, "hidden", 'ng-model' => 'Enterprise.visible'
= f.label :visible, t('.hidden'), value: 'hidden'
.permalink{ ng: { controller: "permalinkCtrl" } }
.row{ ng: { show: "Enterprise.sells == 'own' || Enterprise.sells == 'any'" } }
.three.columns.alpha
= f.label :permalink, t('.permalink')
%div{'ofn-with-tip' => t('.permalink_tip', link: main_app.root_url)}
%a= t('admin.whats_this')
.eight.columns
= f.text_field :permalink, { 'ng-model' => "Enterprise.permalink", placeholder: "eg. your-shop-name", 'ng-model-options' => "{ updateOn: 'default blur', debounce: {'default': 300, 'blur': 0} }" }
.two.columns.omega
%div{ng: {show: "checking", cloak: true}, style: "width: 30px; height: 30px;"}
= render partial: "components/admin_spinner"
%span{ ng: { class: 'availability.toLowerCase()', hide: "checking" } }
{{ availability }}
%i{ ng: { class: "{'icon-ok-sign': availability == 'Available', 'icon-remove-sign': availability == 'Unavailable'}" } }
.row{ ng: { show: "Enterprise.sells == 'own' || Enterprise.sells == 'any'" } }
.three.columns.alpha
%label= t('.link_to_front')
%div{'ofn-with-tip' => t('.link_to_front_tip')}
%a= t('admin.whats_this')
.eight.columns.omega
= surround main_app.root_url, "/shop" do
{{Enterprise.permalink}}
.row
.three.columns.alpha
= f.label :id, t('.ofn_uid')
%div{'ofn-with-tip' => t('.ofn_uid_tip')}
%a= t('admin.whats_this')
.six.columns
{{Enterprise.id}}
= render partial: 'admin/enterprises/form/permalink'

View File

@@ -9,9 +9,9 @@
%th
%tbody
- @shipping_methods.each do |shipping_method|
%tr{ ng: { controller: 'shippingMethodsCtrl', init: "findShippingMethodByID(#{shipping_method.id})" } }
%tr
%td= shipping_method.name
%td= f.check_box :shipping_method_ids, { :multiple => true, 'ng-model' => 'ShippingMethod.selected' }, shipping_method.id, nil
%td= f.check_box :shipping_method_ids, { :multiple => true }, shipping_method.id, nil
%td= link_to t(:edit), edit_admin_shipping_method_path(shipping_method)
%br
.row

View File

@@ -7,19 +7,27 @@
.omega.fourteen.columns
= select_tag(:report_subtype, options_for_select(@report_subtypes, @report_subtype))
.row.rendering-options{ "data-controller": "csv-select" }
.alpha.two.columns
= label_tag :report_format, t(".generate_report")
.omega.fourteen.columns{ style: "margin-bottom: 1.5em;" }
= select_tag :report_format, grouped_options_for_select({ |
t('.formatted_data') => { t('.on_screen') => '', "PDF" => 'pdf', t('.spreadsheet') => 'xlsx' }, |
t('.raw_data') => { "CSV" => 'csv' }, |
}), { "data-csv-select-target": "reportType", "data-action": "csv-select#handleSelectChange" }
- if @report.header_option? || @report.summary_row_option?
.row
.alpha.two.columns= label_tag nil, t(".display")
.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]
= 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]
= label_tag :display_summary_row, t(".summary_row")
- if @report.header_option? || @report.summary_row_option?
.row
.alpha.two.columns= label_tag nil, t(".display")
.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]
= 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" }
= label_tag :display_summary_row, t(".summary_row"), { "data-csv-select-target": "label" }
- if @report.available_headers.present?
.row
@@ -33,14 +41,3 @@
.omega.fourteen.columns
= select_tag(:fields_to_hide, options_for_select(@report.available_headers, params[:fields_to_hide]),
class: "select2 fullwidth", multiple: true)
.row.rendering-options
.alpha.two.columns
= label_tag :report_format, t(".generate_report")
.omega.fourteen.columns
= select_tag :report_format, grouped_options_for_select({ |
t('.formatted_data') => { t('.on_screen') => '', "PDF" => 'pdf', t('.spreadsheet') => 'xlsx' }, |
t('.raw_data') => { "CSV" => 'csv' }, |
})

View File

@@ -0,0 +1,2 @@
= render 'admin/reports/date_range_form', f: f

View File

@@ -1,8 +1,13 @@
.side_menu{ ng: { controller: 'sideMenuCtrl' } }
%a.menu_item{ href: "", id: "{{ item.name.toLowerCase().replace(' ', '_') }}",
ng: { repeat: '(index,item) in menu.items | filter:{visible:true}',
click: 'select(index)',
show: '!showItem || showItem(item)',
class: '{ selected: item.selected }' } }
%i{ class: "{{item.icon_class}}" }
%span {{ item.label }}
.side_menu#side_menu
- if @enterprise
- enterprise_side_menu_items(@enterprise).each do |item|
- next unless item[:show]
%a.menu_item{ href: item[:href] || "##{item[:name]}_panel", id: item[:name], data: { action: "tabs-and-panels#changeActivePanel tabs-and-panels#changeActiveTab", "tabs-and-panels-target": "tab" }, class: item[:selected] }
%i{ class: item[:icon_class] }
%span= t("#{item[:name] }")
- else
- enterprise_group_side_menu_items.each do |item|
%a.menu_item{ href: "##{item[:name]}_panel", class: item[:selected], id: item[:name], data: { action: "tabs-and-panels#changeActivePanel tabs-and-panels#changeActiveTab", "tabs-and-panels-target": "tab" } }
%i{ class: item[:icon_class] }
%span= t("#{item[:label] }")

View File

@@ -0,0 +1,6 @@
%div{"data-controller": "tooltip"}
%a{"data-tooltip-target": "element", "data-action": "mouseenter->tooltip#showTooltip mouseleave->tooltip#hideTooltip"}= t('admin.whats_this')
.tooltip-container
.tooltip{"data-tooltip-target": "tooltip"}
= sanitize tooltip_text
.arrow{"data-tooltip-target": "arrow"}

View File

@@ -0,0 +1,8 @@
- content_for :title do
= I18n.t("errors.internal_server_error.title")
.dialog
%a{href: "/"}
%img{src: "/500.jpg"}
%h1
= t("errors.internal_server_error.title")
= t("errors.internal_server_error.message_html")

View File

@@ -0,0 +1,8 @@
- content_for :title do
= I18n.t("errors.not_found.title")
.dialog
%a{href: "/"}
%img{src: "/500.jpg"}
%h1
= t("errors.not_found.title")
= t("errors.not_found.message_html")

View File

@@ -0,0 +1,26 @@
:css
body {
text-align: center;
}
a {
font-size: 100%;
color: black;
line-height: 1.5em;
text-decoration: none;
border-bottom: 1px dotted black;
padding: 0 0.2rem;
}
a:hover, a:focus, a:active{
background: #8f301d;
color: white;
border-bottom: none;
}
- content_for :title do
= I18n.t("errors.unprocessable_entity.title")
.dialog
%a{href: "/", style: "border: none; background: none;"}
%img{src: "/422.jpg"}
%h1
= t("errors.unprocessable_entity.title")
= t("errors.unprocessable_entity.message_html")

View File

@@ -6,19 +6,3 @@
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
var u="#{Spree::Config.matomo_tag_manager_url}";
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u; s.parentNode.insertBefore(g,s);
- if Spree::Config.matomo_url.present?
:javascript
var _paq = window._paq || [];
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
_paq.push(["setCookieDomain", "*.#{Spree::Config.site_url}"]);
_paq.push(["setDomains", ["*.#{Spree::Config.site_url}"]]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="#{Spree::Config.matomo_url}";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '#{Spree::Config.matomo_site_id}']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();

View File

@@ -0,0 +1,16 @@
- if Spree::Config.matomo_url.present?
:javascript
var _paq = window._paq || [];
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
_paq.push(["setCookieDomain", "*.#{Spree::Config.site_url}"]);
_paq.push(["setDomains", ["*.#{Spree::Config.site_url}"]]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="#{Spree::Config.matomo_url}";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '#{Spree::Config.matomo_site_id}']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();

View File

@@ -15,6 +15,7 @@
%link{href: "https://fonts.googleapis.com/css?family=Roboto:400,300italic,400italic,300,700,700italic|Oswald:300,400,700", rel: "stylesheet", type: "text/css"}
%link{href: asset_pack_path("media/fonts/OFN-v2.woff"), rel: "preload", as: "font", crossorigin: "anonymous"}
= render "layouts/matomo_tag"
= render "layouts/matomo_tracking"
= language_meta_tags
= stylesheet_pack_tag "darkswarm", "data-turbo-track": "reload"

View File

@@ -0,0 +1,28 @@
%html
%head
:css
body {
background-color: #fff;
color: #666;
font-family: arial, sans-serif;
}
div.dialog {
width: 600px;
margin: auto;
}
@media only screen
and (min-width: 320px)
and (max-width: 568px) {
div.dialog, div.dialog img {
width: 95%;
}
}
div.dialog h1 {
font-size: 1.8em;
}
%title
= yield(:title)
%body
= yield

View File

@@ -9,6 +9,7 @@
- else
= favicon_link_tag "/favicon-staging.ico"
%link{href: "https://fonts.googleapis.com/css?family=Roboto:400,300italic,400italic,300,700,700italic|Oswald:300,400,700", rel: "stylesheet", type: "text/css"}
= render "layouts/matomo_tag"
= language_meta_tags
= stylesheet_pack_tag "darkswarm"

View File

@@ -47,12 +47,12 @@
%strong= @order.has_taxes_included ? t(:total_incl_tax) : t(:total_excl_tax)
%td{:align => "right", :colspan => "2"}
%strong= @order.has_taxes_included ? @order.display_total : display_checkout_total_less_tax(@order)
- display_checkout_taxes_hash(@order).each do |tax_rate, tax_value|
- display_checkout_taxes_hash(@order).each do |tax|
%tr
%td{:align => "right", :colspan => "3"}
= t(:tax_total, rate: tax_rate)
= t(:tax_total, rate: tax[:percentage])
%td{:align => "right", :colspan => "2"}
= tax_value
= tax[:amount]
%tr
%td{:align => "right", :colspan => "3"}
= @order.has_taxes_included ? t(:total_excl_tax) : t(:total_incl_tax)

View File

@@ -29,17 +29,17 @@
%div{class: "field"}
= f.label :zipcode, Spree.t(:zip) + ':'
= f.text_field :zipcode, class: 'fullwidth'
%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 }
%div{class: "field"}
= f.label :country_id, Spree.t(:country) + ':'
%span{id: "#{s_or_b}country"}
= f.select :country_id, countries, { selected: @order.send("#{address_type}_address").country_id },
{ "data-controller": "tom-select", "data-dependant-select-target": "source", "data-action": "dependant-select#handleSelectChange", class: "primary" }
{ "data-controller": "tom-select", "data-dependent-select-target": "source", "data-action": "dependent-select#handleSelectChange", class: "primary" }
%div{class: "field"}
= f.label :state_id, Spree.t(:state) + ':'
%span{id: "#{s_or_b}state"}
= f.select :state_id, states_for_country(@order.send("#{address_type}_address").country), { selected: @order.send("#{address_type}_address").state_id },
{ "data-controller": "tom-select", "data-dependant-select-target": "select", class: "primary" }
{ "data-controller": "tom-select", "data-dependent-select-target": "select", class: "primary" }
%div{class: "field"}
= f.label :phone, Spree.t(:phone) + ':'

View File

@@ -77,3 +77,6 @@
= @order.distributor.invoice_text
= render 'spree/shared/payment'
- if @order.note.present?
= render partial: 'spree/shared/order_note'

View File

@@ -89,3 +89,6 @@
= @order.distributor.invoice_text
= render 'spree/shared/payment'
- if @order.note.present?
= render partial: 'spree/shared/order_note'

View File

@@ -58,10 +58,10 @@
j(@order.display_total.format(with_currency: false))]}",
'\x1B' + '\x45' + '\x0A', // bold off
'\x0A',
"#{display_checkout_taxes_hash(@order).map { |tax_rate, tax_value|
"#{display_checkout_taxes_hash(@order).map { |tax|
'%31s%10s' %
[j(t(:tax_total, rate: tax_rate)),
j(tax_value.format(with_currency: false))] +
[j(t(:tax_total, rate: tax[:percentage])),
j(tax[:amount].format(with_currency: false))] +
'" + \'\x0A\' + "'}.join }",
"#{'%31s%10s' %
[j(t(:total_excl_tax)),

View File

@@ -1,17 +1,23 @@
%fieldset.omega.six.columns
%legend= t('spree.api.access')
= form_with(model: @user, url: spree.admin_user_path(@user)) do |form|
= form.check_box :show_api_key_view, onchange: "this.form.submit()"
= form.label :show_api_key_view, t('spree.api.toggle_api_key_view')
- if @user.spree_api_key.present?
.field
= label_tag t('spree.api.key')
= ":"
= @user.spree_api_key
.filter-actions.actions
= form_tag spree.clear_api_key_admin_user_path(@user), method: :put do
= button t('spree.api.clear_key'), 'icon-trash'
= form_tag spree.generate_api_key_admin_user_path(@user), method: :put do
= button t('spree.api.regenerate_key'), 'icon-refresh'
= form_with(model: @user, url: spree.api_key_path(id: @user), method: :delete) do |form|
= form.button t('spree.api.clear_key'), class: 'icon-trash', icon: 'icon-trash'
= form_with(model: @user, url: spree.api_keys_path(id: @user), method: :post) do |form|
= form.button t('spree.api.regenerate_key'), class: 'icon-refresh', icon: 'icon-refresh'
- else
.no-objects-found= t('spree.api.no_key')
.filter-actions.actions
= form_tag spree.generate_api_key_admin_user_path(@user), method: :put do
= button t('spree.api.generate_key'), 'icon-key'
= form_with(model: @user, url: spree.api_keys_path(id: @user), method: :post) do |form|
= form.button t('spree.api.generate_key'), class: 'icon-key', icon: 'icon-key'

View File

@@ -0,0 +1,4 @@
%p.callout{style: "margin-top: 30px"}
%strong= t :additional_information
%p{style: "margin: 5px"}
= @order.note

View File

@@ -0,0 +1,7 @@
%hr
%h3= t('.title')
%br
%p
= text_field_tag :api_key, @user.spree_api_key, disabled: true, class: 'title'
= form_tag spree.api_keys_path(@user), method: :post, class: 'inline' do
= button_tag(t('.regenerate_key'), type: 'submit', class: "button primary")

View File

@@ -0,0 +1,3 @@
%script{ type: "text/ng-template", id: "account/developer_settings.html" }
%h3= t('.title')
= render partial: 'api_keys'

View File

@@ -20,17 +20,23 @@
= render 'cards'
= render 'transactions'
= render 'settings'
= render 'developer_settings' if @user.show_api_key_view
.row.tabset-ctrl#account-tabs{ style: 'margin-bottom: 100px', navigate: 'true', selected: 'orders', prefix: 'account' }
.small.12.medium-3.columns.tab{ name: "orders" }
.small.12.medium-2.columns.tab{ name: "orders" }
%a=t('.tabs.orders')
- if Spree::Config.stripe_connect_enabled && Stripe.publishable_key
.small.12.medium-3.columns.tab{ name: "cards" }
.small.12.medium-2.columns.tab{ name: "cards" }
%a=t('.tabs.cards')
.small.12.medium-3.columns.tab{ name: "transactions" }
.small.12.medium-2.columns.tab{ name: "transactions" }
%a=t('.tabs.transactions')
.small.12.medium-3.columns.tab{ name: "settings" }
.small.12.medium-2.columns.tab{ name: "settings" }
%a=t('.tabs.settings')
// the api_keys partial is the only content for now, so we have to hide the whole tab for now
// if there is new content, we will need to handle this inside the developer_settings partial
- if @user.show_api_key_view
.small.12.medium-3.columns.tab{ name: "developer_settings" }
%a=t('.tabs.developer_settings')
.small-12.columns.tab-view
= render partial: "shared/footer"

View File

@@ -0,0 +1,21 @@
import { Controller } from "stimulus";
export default class extends Controller {
static targets = ["reportType", "checkbox", "label"]
handleSelectChange() {
this.reportTypeTarget.value == "csv" ? this.disableField() : this.enableField()
}
disableField() {
this.checkboxTarget.checked = false;
this.checkboxTarget.disabled = true;
this.labelTarget.classList.add("disabled");
}
enableField() {
this.checkboxTarget.checked = true;
this.checkboxTarget.disabled = false;
this.labelTarget.classList.remove("disabled");
}
}

View File

@@ -23,7 +23,7 @@ export default class extends Controller {
}
populateNewOptions(sourceId) {
const options = this.dependantOptionsFor(sourceId);
const options = this.dependentOptionsFor(sourceId);
options.forEach((item) => {
this.addOption(item[0], item[1]);
@@ -40,7 +40,7 @@ export default class extends Controller {
this.selectTarget.appendChild(newOption);
}
dependantOptionsFor(sourceId) {
dependentOptionsFor(sourceId) {
return this.optionsValue.find((option) => option[0] === sourceId)[1];
}
}

View File

@@ -0,0 +1,52 @@
import { Controller } from "stimulus";
export default class extends Controller {
static values = { initialPermalink: String, url: String };
static targets = ["spinner", "permalinkField", "available", "unavailable"];
initialize() {
this.validate = _.debounce(this.validate, 300);
}
async validate() {
this.hideAvailability();
this.showSpinner();
const response = await fetch(
this.urlValue + `?permalink="${this.permalinkFieldTarget.value}"`
);
const result = await response.text();
if (this.initialPermalinkValue == result) {
this.permalinkFieldTarget.value = result;
this.hideSpinner();
return;
}
this.displayAvailability(response);
this.hideSpinner();
this.permalinkFieldTarget.value = result;
}
displayAvailability(response) {
if (response.ok) {
this.availableTarget.classList.remove("hidden");
} else {
this.unavailableTarget.classList.remove("hidden");
}
}
hideAvailability() {
this.availableTarget.classList.add("hidden");
this.unavailableTarget.classList.add("hidden");
}
showSpinner() {
this.spinnerTarget.classList.remove("hidden");
}
hideSpinner() {
this.spinnerTarget.classList.add("hidden");
}
}

View File

@@ -0,0 +1,30 @@
import { Controller } from "stimulus";
import CableReady from "cable_ready";
export default class extends Controller {
static values = { primaryProducer: String, enterpriseSells: String };
primaryProducerChanged(event) {
this.primaryProducerValue = event.currentTarget.checked;
this.makeRequest();
}
enterpriseSellsChanged(event) {
if (event.currentTarget.checked) {
this.enterpriseSellsValue = event.currentTarget.value;
this.makeRequest();
}
}
makeRequest() {
fetch(
`?stimulus=true&enterprise_sells=${this.enterpriseSellsValue}&is_primary_producer=${this.primaryProducerValue}`,
{
method: "GET",
headers: { "Content-type": "application/json; charset=UTF-8" },
}
)
.then((data) => data.json())
.then(CableReady.perform);
}
}

View File

@@ -0,0 +1,40 @@
import { Controller } from "stimulus";
export default class extends Controller {
static targets = ["tab", "panel", "default"];
static values = { className: String };
connect() {
// hide all active panel
this.panelTargets.forEach((panel) => {
panel.style.display = "none";
});
// only display the default panel
this.defaultTarget.style.display = "block";
}
changeActivePanel(event) {
const newActivePanel = this.panelTargets.find(
(panel) => panel.id == `${event.currentTarget.id}_panel`
);
this.currentActivePanel.style.display = "none";
newActivePanel.style.display = "block";
}
changeActiveTab(event) {
this.currentActiveTab.classList.remove(`${this.classNameValue}`);
event.currentTarget.classList.add(`${this.classNameValue}`);
}
get currentActiveTab() {
return this.tabTargets.find((tab) => tab.classList.contains("selected"));
}
get currentActivePanel() {
return this.panelTargets.find(
(panel) => panel.id == `${this.currentActiveTab.id}_panel`
);
}
}

View File

@@ -8,6 +8,9 @@ export default class extends Controller {
maxOptions: null,
plugins: ["dropdown_input"],
allowEmptyOption: true,
onItemAdd: function () {
this.setTextboxValue("");
},
};
connect(options = {}) {

View File

@@ -0,0 +1,49 @@
import { Controller } from "stimulus";
import { computePosition, offset, arrow } from "@floating-ui/dom";
export default class extends Controller {
static targets = ["element", "tooltip", "arrow"];
static values = {
placement: {
type: String,
default: "top",
},
};
update() {
computePosition(this.elementTarget, this.tooltipTarget, {
placement: this.placementValue,
middleware: [offset(6), arrow({ element: this.arrowTarget })],
}).then(({ x, y, placement, middlewareData }) => {
Object.assign(this.tooltipTarget.style, {
left: `${x}px`,
top: `${y}px`,
});
const { x: arrowX, y: arrowY } = middlewareData.arrow;
const staticSide = {
top: "bottom",
right: "left",
bottom: "top",
left: "right",
}[placement.split("-")[0]];
Object.assign(this.arrowTarget.style, {
left: arrowX != null ? `${arrowX}px` : "",
top: arrowY != null ? `${arrowY}px` : "",
right: "",
bottom: "",
[staticSide]: "-4px",
});
});
}
showTooltip() {
this.tooltipTarget.style.display = "block";
this.update();
}
hideTooltip() {
this.tooltipTarget.style.display = "";
}
}

View File

@@ -2,3 +2,31 @@
max-width: 240px;
white-space: normal;
}
.tooltip {
display: none;
position: absolute;
top: 0;
left: 0;
font-size: 13px;
pointer-events: none;
background-color: #5498da;
padding: 5px 15px;
border-radius: 3px;
color: #fff;
max-width: 240px;
white-space: normal;
}
.arrow {
background-color: #5498da;
position: absolute;
width: 8px;
height: 8px;
transform: rotate(45deg);
}
.tooltip-container {
position: relative;
width: 240px;
}

View File

@@ -32,6 +32,8 @@ if defined?(Bundler)
# Bundler.require(:default, :assets, Rails.env)
end
require "view_component/storybook" if Rails.env.development?
module Openfoodnetwork
class Application < Rails::Application
config.middleware.insert_before(
@@ -243,5 +245,7 @@ module Openfoodnetwork
config.active_storage.service = ENV["S3_BUCKET"].present? ? :amazon : :local
config.active_storage.content_types_to_serve_as_binary -= ["image/svg+xml"]
config.active_storage.variable_content_types += ["image/svg+xml"]
config.exceptions_app = self.routes
end
end

View File

@@ -1,9 +1,21 @@
Rails.application.reloader.to_prepare do
WickedPdf.config = {
#:wkhtmltopdf => '/usr/local/bin/wkhtmltopdf',
#:layout => "pdf.html",
:exe_path => `bundle exec which wkhtmltopdf`.chomp
}
if Rails.env.test?
Rails.application.reloader.to_prepare do
WickedPdf.config = {
#:wkhtmltopdf => '/usr/local/bin/wkhtmltopdf',
#:layout => "pdf.html",
:page_size => 'A3',
:exe_path => `bundle exec which wkhtmltopdf`.chomp
}
end
else
Rails.application.reloader.to_prepare do
WickedPdf.config = {
#:wkhtmltopdf => '/usr/local/bin/wkhtmltopdf',
#:layout => "pdf.html",
:page_size => 'A4', # default
:exe_path => `bundle exec which wkhtmltopdf`.chomp
}
end
end
# A monkey-patch to remove WickedPdf's monkey-patch, as it clashes with ViewComponents.

View File

@@ -852,6 +852,7 @@ ar:
sells_tip: "لا شيء - لا تبيع المؤسسات للعملاء مباشرة. <br /> الخاصة - تبيع المؤسسات المنتجات الخاصة بها للعملاء. <br /> أي - يمكن للمؤسسات بيع منتجات المؤسسات الخاصة أو غيرها. <br />"
visible_in_search: مرئي في البحث؟
visible: عام
permalink:
permalink: الرابط الثابت (بدون مسافات)
permalink_tip: "يستخدم الرابط الثابت لإنشاء رابط إلى متجرك: %{link}your-shop-name / shop"
link_to_front: رابط إلى واجهة المتجر
@@ -2506,6 +2507,8 @@ ar:
report_header_tax_on_delivery: "الضريبة على التسليم (%{currency_symbol})"
report_header_tax_on_fees: "الضريبة على الرسوم (%{currency_symbol})"
report_header_total_tax: "إجمالي الضريبة (%{currency_symbol})"
report_header_total_excl_tax: "المجموع باستثناء الضريبة (%{currency_symbol})"
report_header_total_incl_tax: "إجمالي مدفوع الضريبة (%{currency_symbol})"
report_header_enterprise: الشركة
report_header_customer: عميل
report_header_customer_code: كود العميل
@@ -4036,6 +4039,8 @@ ar:
connection_failed: "تعذر الاتصال بـ PayPal."
generic_error: "فشل PayPal. %{reasons}"
users:
api_keys:
regenerate_key: "انشاء مفتاح"
form:
account_settings: إعدادت الحساب
show:

View File

@@ -61,11 +61,6 @@ ca:
using_producer_stock_settings_but_count_on_hand_set: "ha d'estar en blanc perquè s'utilitza la configuració d'estoc de la productora"
on_demand_but_count_on_hand_set: "ha d'estar en blanc si és sota demanda"
limited_stock_but_no_count_on_hand: "cal especificar-se perquè força existències limitades"
errors:
messages:
file_size_out_of_range: "la mida %{file_size} no és entre el rang necessari"
limit_out_of_range: "el total està fora del marge"
image_metadata_missing: "no és una imatge vàlida"
stripe:
error_code:
incorrect_number: "El número de la targeta és incorrecte."
@@ -819,6 +814,7 @@ ca:
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 />"
visible_in_search: Visible a la cerca?
visible: Públic
permalink:
permalink: Permalink (sense espais)
permalink_tip: "Aquest enllaç permanent s'utilitza per crear l'url a la vostra botiga: %{link} el-nom-de-la-vostra-botiga /botiga"
link_to_front: Enllaç a la botiga
@@ -2409,6 +2405,8 @@ ca:
report_header_tax_on_delivery: "Impost sobre el lliurament (%{currency_symbol})"
report_header_tax_on_fees: "Impost sobre les comissions (%{currency_symbol})"
report_header_total_tax: "Impost total (%{currency_symbol})"
report_header_total_excl_tax: "Total excl. impostos (%{currency_symbol})"
report_header_total_incl_tax: "Total incl. impostos (%{currency_symbol})"
report_header_enterprise: Organització
report_header_customer: Consumidora
report_header_customer_code: Codi de la consumidora
@@ -3843,6 +3841,8 @@ ca:
connection_failed: "No s'ha pogut connectar a PayPal."
generic_error: "PayPal ha fallat. %{reasons}"
users:
api_keys:
regenerate_key: "Regenerar la clau"
form:
account_settings: Configuració del compte
show:

View File

@@ -61,27 +61,6 @@ cy:
using_producer_stock_settings_but_count_on_hand_set: "rhaid bod yn wag oherwydd defnydd o osodiadau stoc cynhyrchwyr"
on_demand_but_count_on_hand_set: "rhaid iddo fod yn wag os ar alw"
limited_stock_but_no_count_on_hand: "rhaid nodi hyn oherwydd gorfodi stoc gyfyngedig"
errors:
messages:
content_type_invalid: "math o gynnwys annilys"
file_size_out_of_range: "nid yw'r maint %{file_size} rhwng yr ystod ofynnol"
limit_out_of_range: "mae'r cyfanswm rhif tu hwnt i'r ystod"
image_metadata_missing: "nid yw'n llun dilys"
dimension_min_inclusion: "mae'n gorfod bod yn fwy neu'r un faint â %{width} x %{height} picsel."
dimension_max_inclusion: "mae'n gorfod bod yn llai neu'r un faint â %{width} x %{height} picsel."
dimension_width_inclusion: "nid yw lled yn cael ei gynnwys rhwng %{min} ac %{max} picsel."
dimension_height_inclusion: "nid yw uchder yn cael ei gynnwys rhwng %{min} acd %{max} picsel."
dimension_width_greater_than_or_equal_to: "mae'r lled yn gorfod bod yn fwy neu'r un faint â %{length} picsel."
dimension_height_greater_than_or_equal_to: "mae'r uchder yn gorfod bod yn fwy neu'r un faint â %{length} picsel."
dimension_width_less_than_or_equal_to: "mae'r lled yn gorfod bod yn llai neu'r un faint â %{length} picsel."
dimension_height_less_than_or_equal_to: "mae'r uchder yn gorfod bod yn llai neu'r un faint â %{length} picsel."
dimension_width_equal_to: "mae'r lled yn gorfod bod yr un faint â %{length} picsel."
dimension_height_equal_to: "mae'r uchder yn gorfod bod yr un faint â %{length} picsel."
aspect_ratio_not_square: "mae'n gorfod bod yn llun sgwâr"
aspect_ratio_not_portrait: "mae'n gorfod bod yn llun siâp portread"
aspect_ratio_not_landscape: "mae'n gorfod bod yn llun siâp tirlun"
aspect_ratio_is_not: "mae'n rhaid cael cymhareb agwedd o %{aspect_ratio}"
aspect_ratio_unknown: "yn meddu ar gymhareb agwedd anhysbys"
stripe:
error_code:
incorrect_number: "Mae rhif y cerdyn yn anghywir"
@@ -886,6 +865,7 @@ cy:
visible: Cyhoeddus
not_visible: Cudd
hidden: Cuddio pob cyfeirnod
permalink:
permalink: Permaddolen (dim bylchau)
permalink_tip: "Defnyddir y permaddolen hon i greu'r url ar gyfer eich siop: %{link}enw-eich-siop / siop"
link_to_front: Dolen i ffrynt y siop
@@ -1837,13 +1817,13 @@ cy:
email_signoff: "Hwyl,"
email_signature: "Tîm %{sitename} "
email_confirm_customer_greeting: "Helo %{name},"
email_confirm_customer_intro_html: "Diolch am siopa yn <strong>%{distributor}</strong> !"
email_confirm_customer_number_html: "Cadarnhad o archeb <strong># %{number}</strong>"
email_confirm_customer_details_html: "Dyma fanylion eich archeb o <strong>%{distributor}</strong> :"
email_confirm_customer_intro_html: "Diolch am siopa gyda ni <strong>%{distributor}</strong> !"
email_confirm_customer_number_html: "Cadarnhad archeb <strong># %{number}</strong>"
email_confirm_customer_details_html: "Dyma fanylion eich archeb gan<strong>%{distributor}</strong> :"
email_confirm_customer_signoff: "Cofion cynnes,"
email_confirm_shop_greeting: "Helo %{name},"
email_confirm_shop_order_html: "Da iawn! Mae gennych archeb newydd ar gyfer <strong>%{distributor}</strong> !"
email_confirm_shop_number_html: "Cadarnhad o archeb <strong># %{number}</strong>"
email_confirm_shop_number_html: "Cadarnhad archeb <strong># %{number}</strong>"
email_order_summary_item: "Eitem"
email_order_summary_quantity: "NIfer"
email_order_summary_sku: "Cod y Cynnyrch"
@@ -2079,7 +2059,7 @@ cy:
orders_oc_expired_text_link: "neu gweler y cylchoedd archebu eraill sydd ar gael yn yr hwb yma"
orders_oc_expired_email: "E-bost:"
orders_oc_expired_phone: "Ffôn:"
orders_show_title: "Cadarnhau Archeb"
orders_show_title: "Cadarnhad Archeb"
orders_show_time: "Archeb yn barod ar"
orders_show_order_number: "Archeb # %{number}"
orders_show_cancelled: "Canslwyd"
@@ -2562,6 +2542,8 @@ cy:
report_header_tax_on_delivery: "Treth ar Gyflenwi (%{currency_symbol})"
report_header_tax_on_fees: "Treth ar Ffioedd (%{currency_symbol})"
report_header_total_tax: "Cyfanswm Treth (%{currency_symbol})"
report_header_total_excl_tax: "Cyfanswm heb dreth (%{currency_symbol})"
report_header_total_incl_tax: "Cyfanswm gan gynnwys treth (%{currency_symbol})"
report_header_enterprise: Menter
report_header_customer: Cwsmer
report_header_customer_code: Cod Cwsmer
@@ -4064,6 +4046,8 @@ cy:
connection_failed: "Methu cysylltu â PayPal."
generic_error: "PayPal wedi methu %{reasons}"
users:
api_keys:
regenerate_key: "Allwedd Adfer"
form:
account_settings: Gosodiadau Cyfrif
show:

View File

@@ -61,27 +61,6 @@ de_CH:
using_producer_stock_settings_but_count_on_hand_set: "muss leer sein, da die Einstellungen des Produzentenbestands verwendet werden"
on_demand_but_count_on_hand_set: "muss leer sein, wenn unbegrenzt verfügbar oder die Produktion auf Bestellung erfolgt"
limited_stock_but_no_count_on_hand: "muss angegeben werden, da nur begrenzte Lagerbestände verfügbar sind"
errors:
messages:
content_type_invalid: "hat ein ungültiges Datenformat"
file_size_out_of_range: "Dateigrösse %{file_size} liegt ausserhalb des zulässigen Bereichs"
limit_out_of_range: "Gesamtzahl liegt ausserhalb des zulässigen Bereichs"
image_metadata_missing: "ist kein gültiges Bild"
dimension_min_inclusion: "muss grösser oder gleich %{width} x %{height} Pixel sein"
dimension_max_inclusion: "muss kleiner oder gleich %{width} x %{height} Pixel sein"
dimension_width_inclusion: "Breite liegt nicht zwischen %{min} und %{max} Pixel"
dimension_height_inclusion: "Höhe liegt nicht zwischen %{min} und %{max} Pixel"
dimension_width_greater_than_or_equal_to: "Breite muss grösser oder gleich %{length} Pixel sein"
dimension_height_greater_than_or_equal_to: "Höhe muss grösser oder gleich %{length} Pixel sein"
dimension_width_less_than_or_equal_to: "Breite muss kleiner oder gleich %{length} Pixel sein"
dimension_height_less_than_or_equal_to: "Höhe muss kleiner oder gleich %{length} Pixel sein"
dimension_width_equal_to: "Breite muss %{length} Pixel sein"
dimension_height_equal_to: "Höhe muss %{length} Pixel sein"
aspect_ratio_not_square: "muss ein quadratisches Bild sein"
aspect_ratio_not_portrait: "muss ein Bild im Hochformat sein"
aspect_ratio_not_landscape: "muss ein Bild im Querformat sein"
aspect_ratio_is_not: "muss ein Seitenverhältnis von %{aspect_ratio} haben"
aspect_ratio_unknown: "hat ein unbekanntes Seitenverhältnis"
stripe:
error_code:
incorrect_number: "Die Kreditkartennummer ist fehlerhaft."
@@ -879,6 +858,7 @@ de_CH:
visible: öffentlich sichtbar
not_visible: versteckt aber referenziert
hidden: vollständig versteckt
permalink:
permalink: Permalink (keine Leerzeichen)
permalink_tip: "Dieser Permalink wird verwendet, um die URL zu Ihrem Laden zu erstellen: %{link}name-ihres-ladens/shop"
link_to_front: Link zum Laden
@@ -2550,6 +2530,8 @@ de_CH:
report_header_tax_on_delivery: "Steuer auf Lieferkosten (%{currency_symbol})"
report_header_tax_on_fees: "Steuer auf Gebühren (%{currency_symbol})"
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_enterprise: Unternehmen
report_header_customer: Kunde
report_header_customer_code: Kundennummer
@@ -4004,6 +3986,8 @@ de_CH:
connection_failed: "Es konnte keine Verbindung zu PayPal hergestellt werden."
generic_error: "PayPal ist fehlgeschlagen. %{reasons}"
users:
api_keys:
regenerate_key: "Schlüssel neu generieren"
form:
account_settings: E-Mail-Adresse und Passwort ändern
show:

View File

@@ -61,27 +61,6 @@ de_DE:
using_producer_stock_settings_but_count_on_hand_set: "muss leer sein, da die Einstellungen des Produzentenbestands verwendet werden"
on_demand_but_count_on_hand_set: "muss leer sein, wenn unbegrenzt verfügbar oder die Produktion auf Bestellung erfolgt"
limited_stock_but_no_count_on_hand: "muss angegeben werden, da nur begrenzte Lagerbestände verfügbar sind"
errors:
messages:
content_type_invalid: "hat ein ungültiges Datenformat"
file_size_out_of_range: "Dateigröße %{file_size} liegt außerhalb des zulässigen Bereichs"
limit_out_of_range: "Gesamtzahl liegt außerhalb des zulässigen Bereichs"
image_metadata_missing: "ist kein gültiges Bild"
dimension_min_inclusion: "muss größer oder gleich %{width} x %{height} Pixel sein"
dimension_max_inclusion: "muss kleiner oder gleich %{width} x %{height} Pixel sein"
dimension_width_inclusion: "Breite liegt nicht zwischen %{min} und %{max} Pixel"
dimension_height_inclusion: "Höhe liegt nicht zwischen %{min} und %{max} Pixel"
dimension_width_greater_than_or_equal_to: "Breite muss größer oder gleich %{length} Pixel sein"
dimension_height_greater_than_or_equal_to: "Höhe muss größer oder gleich %{length} Pixel sein"
dimension_width_less_than_or_equal_to: "Breite muss kleiner oder gleich %{length} Pixel sein"
dimension_height_less_than_or_equal_to: "Höhe muss kleiner oder gleich %{length} Pixel sein"
dimension_width_equal_to: "Breite muss %{length} Pixel sein"
dimension_height_equal_to: "Höhe muss %{length} Pixel sein"
aspect_ratio_not_square: "muss ein quadratisches Bild sein"
aspect_ratio_not_portrait: "muss ein Bild im Hochformat sein"
aspect_ratio_not_landscape: "muss ein Bild im Querformat sein"
aspect_ratio_is_not: "muss ein Seitenverhältnis von %{aspect_ratio} haben"
aspect_ratio_unknown: "hat ein unbekanntes Seitenverhältnis"
stripe:
error_code:
incorrect_number: "Die Kreditkartennummer ist fehlerhaft."
@@ -162,6 +141,7 @@ de_DE:
cardholder_name: "Kreditkarteninhaber"
community_forum_url: "URL des Community-Forums"
customer_instructions: "Informationen für Kunden"
additional_information: "Anmerkung"
devise:
passwords:
spree_user:
@@ -891,6 +871,7 @@ de_DE:
visible: öffentlich sichtbar
not_visible: versteckt aber referenziert
hidden: vollständig versteckt
permalink:
permalink: Permalink (keine Leerzeichen)
permalink_tip: "Dieser Permalink wird verwendet, um die URL zu Ihrem Laden zu erstellen: %{link}name-ihres-ladens/shop"
link_to_front: Link zum Laden
@@ -1231,6 +1212,9 @@ de_DE:
pack_by_customer: Packliste nach Kunden
pack_by_supplier: Packliste nach Lieferanten
pack_by_product: Packliste nach Produkten
revenues_by_hub:
name: Umsätze
description: Umsätze nach Läden/Händlern/Hubs
orders_and_distributors:
name: Bestellungen und Verteilstellen
description: Bestellungen mit Verteilstellendetails
@@ -1804,6 +1788,7 @@ de_DE:
invalid_email: "Bitte geben Sie eine gültige E-Mail-Adresse ein."
select_a_shipping_method: Bitte wählen Sie eine Lieferoption aus.
select_a_payment_method: Bitte wählen Sie eine Zahlungsart aus.
no_shipping_methods_available: 'Ein Bestellabschluss ist aufgrund fehlender Lieferoptionen nicht möglich. Bitte wenden Sie sich an den Betreiber des Ladens. '
order_paid: BEZAHLT
order_not_paid: NICHT BEZAHLT
order_total: 'Gesamtsumme:'
@@ -2536,6 +2521,8 @@ de_DE:
report_header_hub_address: Hubadresse
report_header_to_hub: An den Hub
report_header_hub_code: Hub-Code
report_header_hub_id: Laden-ID
report_header_hub_owner_email: E-Mail-Adresse des Ladenbetreibers
report_header_code: Code
report_header_paid: Bezahlt?
report_header_delivery: Lieferung?
@@ -2568,6 +2555,8 @@ de_DE:
report_header_tax_on_delivery: "Steuer auf Lieferkosten (%{currency_symbol})"
report_header_tax_on_fees: "Steuer auf Gebühren (%{currency_symbol})"
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_enterprise: Unternehmen
report_header_customer: Kunde
report_header_customer_code: Kundennummer
@@ -3480,6 +3469,7 @@ de_DE:
email: E-Mail-Adresse
account_updated: "Konto aktualisiert!"
email_updated: "Das Konto wird aktualisiert, sobald die neue E-Mail-Adresse bestätigt wurde."
show_api_key_view_toggled: "Anzeige des API-Schlüssels wurde geändert!"
my_account: "Ihr Konto"
date: "Datum"
time: "Uhrzeit"
@@ -4031,10 +4021,16 @@ de_DE:
connection_failed: "Es konnte keine Verbindung zu PayPal hergestellt werden."
generic_error: "PayPal ist fehlgeschlagen. %{reasons}"
users:
api_keys:
regenerate_key: "Schlüssel neu generieren"
title: API-Schlüssel
developer_settings:
title: Entwicklereinstellungen
form:
account_settings: E-Mail-Adresse und Passwort ändern
show:
tabs:
developer_settings: Entwicklereinstellungen
orders: Bestellungen
cards: Kreditkarten
transactions: Transaktionen
@@ -4076,7 +4072,8 @@ de_DE:
saved_cards_popover: Dies ist die Liste der Kreditkarten, die Sie für spätere Verwendung gespeichert haben. Ihr "Standard" wird automatisch beim Abschließen einer Bestellung ausgewählt und kann von allen Läden belastet werden, die Sie dazu berechtigt haben (siehe rechts).
authorised_shops:
shop_name: "Ladenname"
allow_charges?: "Abbuchungen für die Standardkreditkarte zulassen?"
allow_charges?: "Abbuchungen von der Standardkreditkarte zulassen?"
no_default_saved_cards_tooltip: Sie müssen eine Kreditkarte als Standard markieren, um automatische Abbuchungen zuzulassen.
localized_number:
invalid_format: hat ein ungültiges Format. Bitte Ziffern eingeben.
api:
@@ -4095,6 +4092,7 @@ de_DE:
shipment:
cannot_ready: "Versand nicht möglich."
invalid_taxonomy_id: "Ungültige Kategorie-ID"
toggle_api_key_view: "API-Schlüssel dem Benutzer anzeigen"
activerecord:
models:
spree/payment:
@@ -4141,3 +4139,13 @@ de_DE:
x_years:
one: "1 Jahr"
other: "%{count} Jahren"
errors:
not_found:
title: "Die gesuchte Seite existiert nicht (404). "
message_html: "<b>Bitte versuchen Sie es erneut</b><p> Dies könnte ein vorübergehendes Problem sein. Bitte klicken Sie auf die Zurück-Schaltfläche, um zum vorherigen Bildschirm zurückzukehren, oder gehen Sie zurück zur <a href='/'>Startseite</a> und versuchen Sie es erneut.</p> <b>Kontaktieren Sie den Support</b><p> Wenn das Problem weiterhin besteht oder dringend ist, teilen Sie uns dies bitte mit. Unsere Kontaktdaten finden Sie auf der <a href='https://openfoodnetwork.org/ofn-local/' target='blank'>lokalen Seite des globalen Open Food Network</a> .</p><p> Es hilft uns sehr, wenn Sie so detailliert wie möglich angeben können, worum es auf der fehlenden Seite geht.</p>"
internal_server_error:
title: "Es tut uns leid, aber etwas ist schief gelaufen (500). "
message_html: "<b>Bitte versuchen Sie es erneut</b><p> Dies könnte ein vorübergehendes Problem sein. Bitte klicken Sie auf die Zurück-Schaltfläche, um zum vorherigen Bildschirm zurückzukehren, oder gehen Sie zurück zur <a href='/''>Startseite</a> und versuchen Sie es erneut.</p> <b>Wir kümmern uns</b><p> Wenn Sie dieses Problem schon einmal gesehen haben, kennen wir es wahrscheinlich bereits und arbeiten an einer Lösung. Wir erfassen alle auftretenden Fehler.</p> <b>Kontaktieren Sie den Support</b><p> Wenn das Problem weiterhin besteht oder dringend ist, teilen Sie uns dies bitte mit. Unsere Kontaktdaten finden Sie auf der <a href='https://openfoodnetwork.org/ofn-local/' target='blank'>lokalen Seite des globalen Open Food Network</a> .</p><p> Es hilft uns sehr, wenn Sie so detailliert wie möglich angeben, was Sie getan haben, als dieser Fehler auftrat.</p>"
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>"

View File

@@ -187,6 +187,7 @@ en:
cardholder_name: "Cardholder name"
community_forum_url: "Community forum URL"
customer_instructions: "Customer instructions"
additional_information: "Additional Information"
devise:
passwords:
spree_user:
@@ -949,6 +950,7 @@ en:
visible: Public
not_visible: Hidden
hidden: Hide all references
permalink:
permalink: Permalink (no spaces)
permalink_tip: "This permalink is used to create the url to your shop: %{link}your-shop-name/shop"
link_to_front: Link to shop front
@@ -1288,6 +1290,9 @@ en:
pack_by_customer: Pack By Customer
pack_by_supplier: Pack By Supplier
pack_by_product: Pack By Product
revenues_by_hub:
name: Revenues By Hub
description: Revenues by hub
orders_and_distributors:
name: Orders And Distributors
description: Orders with distributor details
@@ -1898,6 +1903,7 @@ en:
invalid_email: "Please enter a valid email address"
select_a_shipping_method: Select a shipping method
select_a_payment_method: Select a payment method
no_shipping_methods_available: Checkout is not possible due to absence of shipping options. Please contact the shop owner.
order_paid: PAID
order_not_paid: NOT PAID
order_total: Total order
@@ -2671,6 +2677,8 @@ See the %{link} to find out more about %{sitename}'s features and to start using
report_header_hub_address: Hub Address
report_header_to_hub: To Hub
report_header_hub_code: Hub Code
report_header_hub_id: Hub ID
report_header_hub_owner_email: Hub Owner Email
report_header_code: Code
report_header_paid: Paid?
report_header_delivery: Delivery?
@@ -2703,6 +2711,8 @@ See the %{link} to find out more about %{sitename}'s features and to start using
report_header_tax_on_delivery: "Tax on Delivery (%{currency_symbol})"
report_header_tax_on_fees: "Tax on Fees (%{currency_symbol})"
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_enterprise: Enterprise
report_header_customer: Customer
report_header_customer_code: Customer Code
@@ -3638,6 +3648,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using
# TODO: remove 'account_updated' key once we get to Spree 2.0
account_updated: "Account updated!"
email_updated: "The account will be updated once the new email is confirmed."
show_api_key_view_toggled: "Show API key view has been changed!"
my_account: "My account"
date: "Date"
time: "Time"
@@ -4192,10 +4203,16 @@ See the %{link} to find out more about %{sitename}'s features and to start using
connection_failed: "Could not connect to PayPal."
generic_error: "PayPal failed. %{reasons}"
users:
api_keys:
regenerate_key: "Regenerate Key"
title: API key
developer_settings:
title: Developer Settings
form:
account_settings: Account Settings
show:
tabs:
developer_settings: Developer Settings
orders: Orders
cards: Credit Cards
transactions: Transactions
@@ -4257,6 +4274,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using
shipment:
cannot_ready: "Cannot ready shipment."
invalid_taxonomy_id: "Invalid taxonomy id."
toggle_api_key_view: "Show API key view for user"
activerecord:
models:
spree/payment:
@@ -4303,3 +4321,25 @@ See the %{link} to find out more about %{sitename}'s features and to start using
x_years:
one: 1 year
other: "%{count} years"
errors:
not_found:
title: "The page you were looking for doesn't exist (404)"
message_html: "<b>Please try again</b>
<p>This might be a temporary problem. Please click the back button to return to the previous screen or go back to <a href='/'>Home</a> and try again.</p>
<b>Contact support</b>
<p>If the problem persists or is urgent, please tell us about it. Find our contact details from the global <a href='https://openfoodnetwork.org/ofn-local/' target='blank'>Open Food Network Local page</a>.</p>
<p>It really helps us if you can give as much detail as possible about what the missing page is about.</p>"
internal_server_error:
title: "We're sorry, but something went wrong (500)"
message_html: "<b>Please try again</b>
<p>This might be a temporary problem. Please click the back button to return to the previous screen or go back to <a href='/''>Home</a> and try again.</p>
<b>We're on it</b>
<p>If you have seen this problem before, we probably already know about it and are working on a fix. We record all the errors that come up.</p>
<b>Contact support</b>
<p>If the problem persists or is urgent, please tell us about it. Find our contact details from the global <a href='https://openfoodnetwork.org/ofn-local/' target='blank'>Open Food Network Local page</a>.</p>
<p>It really helps us if you can give as much detail as possible about what you were doing when this error occurred.</p>"
unprocessable_entity:
title: "The change you wanted was rejected (422)"
message_html: "<p>The change you wanted was rejected. Maybe you tried to change something you don't have access to.
<br><h3><a href='/' >Return home</a></h3>
</p>"

View File

@@ -724,6 +724,7 @@ en_AU:
sells_tip: "None - enterprise does not sell to customers directly.<br />Own - Enterprise sells own products to customers.<br />Any - Enterprise can sell own or other enterprises products.<br />"
visible_in_search: Visible in search?
visible: Public
permalink:
permalink: Permalink (no spaces)
permalink_tip: "This permalink is used to create the url to your shop: %{link}your-shop-name/shop"
link_to_front: Link to shop front
@@ -2289,6 +2290,8 @@ en_AU:
report_header_tax_on_delivery: "Tax on Delivery (%{currency_symbol})"
report_header_tax_on_fees: "Tax on Fees (%{currency_symbol})"
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_enterprise: Enterprise
report_header_customer: Customer
report_header_customer_code: Customer Code
@@ -3605,6 +3608,8 @@ en_AU:
paypal:
refund_amount: "Amount"
users:
api_keys:
regenerate_key: "Regenerate Key"
form:
account_settings: Account Settings
show:

View File

@@ -677,6 +677,7 @@ en_BE:
sells_tip: "None - enterprise does not sell to customers directly.<br />Own - Enterprise sells own products to customers.<br />Any - Enterprise can sell own or other enterprises products.<br />"
visible_in_search: Visible in search?
visible: Public
permalink:
permalink: Permalink (no spaces)
permalink_tip: "This permalink is used to create the url to your shop: %{link}your-shop-name/shop"
link_to_front: Link to shop front
@@ -2156,6 +2157,8 @@ en_BE:
report_header_tax_on_delivery: "Tax on Delivery (%{currency_symbol})"
report_header_tax_on_fees: "Tax on Fees (%{currency_symbol})"
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_enterprise: Enterprise
report_header_customer: Customer
report_header_customer_code: Customer Code

View File

@@ -61,27 +61,6 @@ en_CA:
using_producer_stock_settings_but_count_on_hand_set: "must be blank because you are using producer stock settings"
on_demand_but_count_on_hand_set: "must be blank if 'on demand' is used"
limited_stock_but_no_count_on_hand: "must be specified because you are forcing limited stock"
errors:
messages:
content_type_invalid: "has an invalid content type"
file_size_out_of_range: "size %{file_size} is not within required range"
limit_out_of_range: "total number is out of range"
image_metadata_missing: "is not a valid image"
dimension_min_inclusion: "must be greater than or equal to %{width} x %{height} pixels."
dimension_max_inclusion: "must be less than or equal to %{width} x %{height} pixels."
dimension_width_inclusion: "width is not between %{min} and %{max} pixels."
dimension_height_inclusion: "height is not between %{min} and %{max} pixels."
dimension_width_greater_than_or_equal_to: "width must be greater than or equal to %{length} pixels."
dimension_height_greater_than_or_equal_to: "height must be greater than or equal to %{length} pixels."
dimension_width_less_than_or_equal_to: "width must be less than or equal to %{length} pixels."
dimension_height_less_than_or_equal_to: "height must be less than or equal to %{length} pixels."
dimension_width_equal_to: "width must be equal to %{length} pixels."
dimension_height_equal_to: "height must be equal to %{length} pixels."
aspect_ratio_not_square: "must be a square image"
aspect_ratio_not_portrait: "must be a portrait image"
aspect_ratio_not_landscape: "must be a landscape image"
aspect_ratio_is_not: "must have an aspect ration of %{aspect_ratio}"
aspect_ratio_unknown: "has an unknown aspect ration"
stripe:
error_code:
incorrect_number: "The card number is incorrect."
@@ -162,6 +141,7 @@ en_CA:
cardholder_name: "Cardholder name"
community_forum_url: "Community forum URL"
customer_instructions: "Customer instructions"
additional_information: "Additional information"
devise:
passwords:
spree_user:
@@ -182,6 +162,7 @@ en_CA:
signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please open the link to activate your account."
unknown_error: "Something went wrong while creating your account. Check your email address and try again."
failure:
disabled: "Your account has been disabled. Please contact support@openfoodnetwork.ca"
invalid: |
Invalid email or password.
Were you a guest last time? Perhaps you need to create an account or reset your password.
@@ -493,6 +474,8 @@ en_CA:
terms_of_service: "Terms of Service"
delete: "Delete file"
confirm_delete: "Are you sure you want to delete the current Terms of Service file?"
attachment: "Attachment"
create_terms_of_service: "Create a Terms of Service file"
number_localization:
number_localization_settings: "Number Localization Settings"
enable_localized_number: "Use the international thousand/decimal separator logic"
@@ -502,6 +485,7 @@ en_CA:
enable_invoices?: "Enable Invoices?"
invoice_style2?: "Use the alternative invoice model that includes total tax breakdown per rate and tax rate info per item (not yet suitable for countries displaying prices excluding tax)"
enable_receipt_printing?: "Show options for printing receipts using thermal printers in order dropdown?"
enterprise_number_required_on_invoices?: "Require a business number to generate an invoice?"
stripe_connect_settings:
edit:
title: "Stripe Connect"
@@ -549,6 +533,8 @@ en_CA:
guest_label: "Guest checkout"
credit_owed: "Credit Owed"
balance_due: "Balance Due"
destroy:
has_associated_subscriptions: "Delete failed: This customer has active subscriptions. Cancel them first."
contents:
edit:
title: Content
@@ -776,6 +762,9 @@ en_CA:
variants_without_unit_value: "WARNING: Some variants do not have a unit value"
all: "All"
select_variant: "Select a variant"
note:
note_label: "Note:"
no_note_present: "No note provided"
enterprise:
select_outgoing_oc_products_from: Select outgoing OC products from
enterprises:
@@ -824,6 +813,9 @@ en_CA:
email_address_tip: "This email address will be displayed in your public profile"
phone: Phone
phone_placeholder: eg. 519 885 8888
whatsapp_phone: WhatsApp phone number
whatsapp_phone_placeholder: eg. +614 9876 5432
whatsapp_phone_tip: "This number will be displayed in your public profile to be opened as a WhatsApp link."
website: Website
website_placeholder: eg. www.truffles.com
enterprise_fees:
@@ -878,6 +870,7 @@ en_CA:
visible: Public
not_visible: Hidden
hidden: Hide all references
permalink:
permalink: Permalink (no spaces)
permalink_tip: "This permalink is used to create the url to your shop: %{link}your-shop-name/shop"
link_to_front: Link to shop front
@@ -1168,6 +1161,9 @@ en_CA:
cancel: Cancel
proceed: Proceed
status:
undated: undated
upcoming: upcoming
open: open
closed: closed
producer_properties:
index:
@@ -1214,6 +1210,9 @@ en_CA:
pack_by_customer: Pack By Customer
pack_by_supplier: Pack By Supplier
pack_by_product: Pack By Product
revenues_by_hub:
name: Revenues by Hub
description: Revenues by Hub
orders_and_distributors:
name: Orders And Distributors
description: Orders with distributor details
@@ -1805,6 +1804,7 @@ en_CA:
order_hub_info: Hub Info
order_back_to_store: Back To Store
order_back_to_cart: Back To Cart
order_back_to_website: Back to Website
bom_tip: "Use this page to alter product quantities across multiple orders. Products may also be removed from orders entirely, if required."
unsaved_changes_warning: "Unsaved changes exist and will be lost if you continue."
unsaved_changes_error: "Fields with red borders contain errors."
@@ -2200,7 +2200,10 @@ en_CA:
contact_field_placeholder: "Contact Name"
contact_field_required: "You need to enter a primary contact."
phone_field: "Phone number"
whatsapp_phone_field: "WhatsApp phone number"
whatsapp_phone_tooltip: "This number will be displayed in your public profile to be opened as a WhatsApp link."
phone_field_placeholder: "eg.(519) 885 8888"
whatsapp_phone_field_placeholder: "eg. +614 1234 5678"
type:
title: "Type"
headline: "Last step to add %{enterprise}!"
@@ -2515,6 +2518,8 @@ en_CA:
report_header_hub_address: Hub Address
report_header_to_hub: To Hub
report_header_hub_code: Customer Code
report_header_hub_id: Hub ID
report_header_hub_owner_email: Hub Owner Email
report_header_code: Code
report_header_paid: Paid?
report_header_delivery: Delivery?
@@ -2547,6 +2552,8 @@ en_CA:
report_header_tax_on_delivery: "Tax on Delivery (%{currency_symbol})"
report_header_tax_on_fees: "Tax on Fees (%{currency_symbol})"
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_enterprise: Enterprise
report_header_customer: Customer
report_header_customer_code: Customer Code
@@ -3451,6 +3458,7 @@ en_CA:
email: Email
account_updated: "Account updated!"
email_updated: "The account will be updated once the new email is confirmed."
show_api_key_view_toggled: "Show API key view has been changed!"
my_account: "My account"
date: "Date"
time: "Time"
@@ -3596,6 +3604,10 @@ en_CA:
results_found: " %{number} Results found."
viewing: "Viewing %{start} to %{end}."
print_invoices: "Print Invoices"
selected:
zero: "No order selected"
one: "1 order selected"
other: "%{count} orders selected"
sortable_header:
payment_state: "Payment State"
shipment_state: "Shipment State"
@@ -3610,6 +3622,9 @@ en_CA:
from: "From"
to: "Bill to"
shipping: "Delivery/Pick-up"
note:
note_label: "Note:"
no_note_present: "No note provided"
form:
distribution_fields:
title: "Distribution"
@@ -3732,6 +3747,7 @@ en_CA:
paypal:
no_payment_via_admin_backend: Paypal payments cannot be captured in the backoffice.
products:
image_upload_error: "Please upload the image in JPG, PNG, GIF, SVG or WEBP format."
new:
title: "New Product"
new_product: "New Product"
@@ -3794,6 +3810,7 @@ en_CA:
back_to_users_list: "Back To Users List"
general_settings: "General Settings"
form:
disabled: "Disabled?"
email: "Email"
roles: "Roles"
enterprise_limit: "Enterprise Limit"
@@ -3994,10 +4011,16 @@ en_CA:
connection_failed: "Could not connect to PayPal."
generic_error: "PayPal failed. %{reasons}"
users:
api_keys:
regenerate_key: "Regenerate Key"
title: API key
developer_settings:
title: Developer Settings
form:
account_settings: Account Settings
show:
tabs:
developer_settings: Developer Settings
orders: Orders
cards: Credit Cards
transactions: Transactions
@@ -4028,6 +4051,7 @@ en_CA:
total: Total
paid?: Paid?
status: Status
completed: Completed
cancelled: Cancelled
saved_cards:
default?: Default?
@@ -4039,6 +4063,7 @@ en_CA:
authorised_shops:
shop_name: "Shop Name"
allow_charges?: "Authorising"
no_default_saved_cards_tooltip: You need to mark one credit card as default to allow charges.
localized_number:
invalid_format: has an invalid format. Please enter a number.
api:
@@ -4057,6 +4082,7 @@ en_CA:
shipment:
cannot_ready: "Cannot ready shipment."
invalid_taxonomy_id: "Invalid taxonomy id."
toggle_api_key_view: "Show API key view for user"
activerecord:
models:
spree/payment:
@@ -4103,3 +4129,13 @@ en_CA:
x_years:
one: "1 year"
other: "%{count} years"
errors:
not_found:
title: "The page you were looking for doesn't exist (404)"
message_html: "<b>Please try again</b> <p>This might be a temporary problem. Please click the back button to return to the previous screen or go back to <a href='/'>Home</a>and try again.</p> <b>Contact support <p>If the problem persists or is urgent, please tell us about it. Find our contact details from the global <a href='https://openfoodnetwork.org/ofn-local/' target='blank'>Open Food Network Local page</a>.</p> <p>It really helps us if you can give as much detail as possible about what the missing page is about.</p>"
internal_server_error:
title: "We're sorry, but something went wrong (500)"
message_html: "<b>Please try again</b> <p>This might be a temporary problem. Please click the back button to return to the previous screen or go back to <a href='/''>Home</a>and try again.</p> <b>We're on it</b> <p>If you have seen this problem before, we probably already know about it and are working on a fix. We record all the errors that come up.</p> <b>Contact support</b> <p> If the problem persists or is urgent, please tell us about it. Find our contact details from the global <a href='https://openfoodnetwork.org/ofn-local/' target='blank'>Open Food Network Local page</a>. </p> <p>It really helps us if you can give as much detail as possible about what you were doing when this error occurred.</p>"
unprocessable_entity:
title: "The change you wanted was rejected (422)"
message_html: "<p>The change you wanted was rejected. Maybe you tried to change something you don't have access to.<br><h3><a href='/' >Return home</a></h3></p>"

View File

@@ -7,7 +7,7 @@ en_CH:
admin:
enterprises:
form:
primary_details:
permalink:
link_to_front_tip: A direct link to your shopfront on the Open Food Switzerland.
ofn_uid_tip: The unique id used to identify the enterprise on Open Food Switzerland.
stripe_connect:

View File

@@ -685,6 +685,7 @@ en_DE:
sells_tip: "None - enterprise does not sell to customers directly.<br />Own - Enterprise sells own products to customers.<br />Any - Enterprise can sell own or other enterprises products.<br />"
visible_in_search: Visible in search?
visible: Public
permalink:
permalink: Permalink (no spaces)
permalink_tip: "This permalink is used to create the url to your shop: %{link}your-shop-name/shop"
link_to_front: Link to shop front
@@ -2165,6 +2166,8 @@ en_DE:
report_header_tax_on_delivery: "Tax on Delivery (%{currency_symbol})"
report_header_tax_on_fees: "Tax on Fees (%{currency_symbol})"
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_enterprise: Enterprise
report_header_customer: Customer
report_header_customer_code: Customer Code

View File

@@ -61,27 +61,6 @@ en_FR:
using_producer_stock_settings_but_count_on_hand_set: "must be blank because using producer stock settings"
on_demand_but_count_on_hand_set: "must be blank if on demand"
limited_stock_but_no_count_on_hand: "must be specified because forcing limited stock"
errors:
messages:
content_type_invalid: "has an invalid content type"
file_size_out_of_range: "size %{file_size} is not between required range"
limit_out_of_range: "total number is out of range"
image_metadata_missing: "is not a valid image"
dimension_min_inclusion: "must be greater than or equal to %{width} x %{height} pixel."
dimension_max_inclusion: "must be less than or equal to %{width} x %{height} pixel."
dimension_width_inclusion: "width is not included between %{min} and %{max} pixel."
dimension_height_inclusion: "height is not included between %{min} and %{max} pixel."
dimension_width_greater_than_or_equal_to: "width must be greater than or equal to %{length} pixel."
dimension_height_greater_than_or_equal_to: "height must be greater than or equal to %{length} pixel."
dimension_width_less_than_or_equal_to: "width must be less than or equal to %{length} pixel."
dimension_height_less_than_or_equal_to: "height must be less than or equal to %{length} pixel."
dimension_width_equal_to: "width must be equal to %{length} pixel."
dimension_height_equal_to: "height must be equal to %{length} pixel."
aspect_ratio_not_square: "must be a square image"
aspect_ratio_not_portrait: "must be a portrait image"
aspect_ratio_not_landscape: "must be a landscape image"
aspect_ratio_is_not: "must have an aspect ratio of %{aspect_ratio}"
aspect_ratio_unknown: "has an unknown aspect ratio"
stripe:
error_code:
incorrect_number: "The card number is incorrect."
@@ -162,6 +141,7 @@ en_FR:
cardholder_name: "Cardholder name"
community_forum_url: "Community forum URL"
customer_instructions: "Customer instructions"
additional_information: "Additional Information"
devise:
passwords:
spree_user:
@@ -890,6 +870,7 @@ en_FR:
visible: Public
not_visible: Hidden
hidden: Hide all references
permalink:
permalink: Permalink (no spaces)
permalink_tip: "This permalink is used to create the url to your shop: %{link}your-shop-name/shop"
link_to_front: Link to shop front
@@ -1229,6 +1210,9 @@ en_FR:
pack_by_customer: Pack By Customer
pack_by_supplier: Pack By Supplier
pack_by_product: Pack By Product
revenues_by_hub:
name: Revenues By Hub
description: Revenues by hub
orders_and_distributors:
name: Orders And Distributors
description: Orders with distributor details
@@ -1802,6 +1786,7 @@ en_FR:
invalid_email: "Please enter a valid email address"
select_a_shipping_method: Select a shipping method
select_a_payment_method: Select a payment method
no_shipping_methods_available: Checkout is not possible due to absence of shipping options. Please contact the shop owner.
order_paid: PAID
order_not_paid: NOT PAID
order_total: Total order
@@ -2534,6 +2519,8 @@ en_FR:
report_header_hub_address: Hub Address
report_header_to_hub: To Hub
report_header_hub_code: Code
report_header_hub_id: Hub ID
report_header_hub_owner_email: Hub Owner Email
report_header_code: Code
report_header_paid: Paid?
report_header_delivery: Delivery?
@@ -2566,6 +2553,8 @@ en_FR:
report_header_tax_on_delivery: "Tax on Delivery (%{currency_symbol})"
report_header_tax_on_fees: "Tax on Fees (%{currency_symbol})"
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_enterprise: Enterprise
report_header_customer: Customer
report_header_customer_code: Customer Code
@@ -3471,6 +3460,7 @@ en_FR:
email: Email
account_updated: "Account updated!"
email_updated: "The account will be updated once the new email is confirmed."
show_api_key_view_toggled: "Show API key view has been changed!"
my_account: "My account"
date: "Date"
time: "Time"
@@ -4023,10 +4013,16 @@ en_FR:
connection_failed: "Could not connect to PayPal."
generic_error: "PayPal failed. %{reasons}"
users:
api_keys:
regenerate_key: "Regenerate Key"
title: API key
developer_settings:
title: Developer Settings
form:
account_settings: Account Settings
show:
tabs:
developer_settings: Developer Settings
orders: Orders
cards: Credit Cards
transactions: Transactions
@@ -4069,6 +4065,7 @@ en_FR:
authorised_shops:
shop_name: "Shop Name"
allow_charges?: "Allow Charges to Default Card?"
no_default_saved_cards_tooltip: You need to mark one credit card as default to allow charges.
localized_number:
invalid_format: has an invalid format. Please enter a number.
api:
@@ -4087,6 +4084,7 @@ en_FR:
shipment:
cannot_ready: "Cannot ready shipment."
invalid_taxonomy_id: "Invalid taxonomy id."
toggle_api_key_view: "Show API key view for user"
activerecord:
models:
spree/payment:
@@ -4133,3 +4131,13 @@ en_FR:
x_years:
one: "1 year"
other: "%{count} years"
errors:
not_found:
title: "The page you were looking for doesn't exist (404)"
message_html: "<b> Please try again </b> <p> This might be a temporary problem. Please click the back button to return to the previous screen or go back to <a href='/'> Home </a> and try again. </p> <b> Contact support </b> <p> f the problem persists or is urgent, please tell us about it. </p>"
internal_server_error:
title: "We're sorry, but something went wrong (500)"
message_html: "<b> Please try again </b> <p> This might be a temporary problem. Please click the back button to return to the previous screen or go back to <a href='/''> Home </a>and try again. </p> <b> We're on it </b> <p>If you have seen this problem before, we probably already know about it and are working on a fix. We record all the errors that come up. </p> <b> Contact support </b> <p> If the problem persists or is urgent, please tell us about it. </p>"
unprocessable_entity:
title: "The change you wanted was rejected (422)"
message_html: "<p> The change you wanted was rejected. Maybe you tried to change something you don't have access to. <br><h3><a href='/' > Return home </a></h3></p>"

View File

@@ -61,27 +61,6 @@ en_GB:
using_producer_stock_settings_but_count_on_hand_set: "must be blank because using producer stock settings"
on_demand_but_count_on_hand_set: "must be blank if on demand"
limited_stock_but_no_count_on_hand: "must be specified because forcing limited stock"
errors:
messages:
content_type_invalid: "has an invalid content type"
file_size_out_of_range: "size %{file_size} is not between required range"
limit_out_of_range: "total number is out of range"
image_metadata_missing: "is not a valid image"
dimension_min_inclusion: "must be greater than or equal to %{width} x %{height} pixel."
dimension_max_inclusion: "must be less than or equal to %{width} x %{height} pixel."
dimension_width_inclusion: "width is not included between %{min} and %{max} pixel."
dimension_height_inclusion: "height is not included between %{min} and %{max} pixel."
dimension_width_greater_than_or_equal_to: "width must be greater than or equal to %{length} pixel."
dimension_height_greater_than_or_equal_to: "height must be greater than or equal to %{length} pixel."
dimension_width_less_than_or_equal_to: "width must be less than or equal to %{length} pixel."
dimension_height_less_than_or_equal_to: "height must be less than or equal to %{length} pixel."
dimension_width_equal_to: "width must be equal to %{length} pixel."
dimension_height_equal_to: "height must be equal to %{length} pixel."
aspect_ratio_not_square: "must be a square image"
aspect_ratio_not_portrait: "must be a portrait image"
aspect_ratio_not_landscape: "must be a landscape image"
aspect_ratio_is_not: "must have an aspect ratio of %{aspect_ratio}"
aspect_ratio_unknown: "has an unknown aspect ratio"
stripe:
error_code:
incorrect_number: "The card number is incorrect."
@@ -494,6 +473,8 @@ en_GB:
terms_of_service: "Terms of Service"
delete: "Delete file"
confirm_delete: "Are you sure you want to delete the current Terms of Service file?"
attachment: "Attachment"
create_terms_of_service: "Create Terms of service file"
number_localization:
number_localization_settings: "Number Localisation Settings"
enable_localized_number: "Use the international thousand/decimal separator logic"
@@ -551,6 +532,8 @@ en_GB:
guest_label: "Guest checkout"
credit_owed: "Credit Owed"
balance_due: "Balance Due"
destroy:
has_associated_subscriptions: "Delete failed: This customer has active subscriptions. Cancel them first."
contents:
edit:
title: Content
@@ -886,6 +869,7 @@ en_GB:
visible: Public
not_visible: Hidden
hidden: Hide all references
permalink:
permalink: Permalink (no spaces)
permalink_tip: "This permalink is used to create the url to your shop: %{link}your-shop-name/shop"
link_to_front: Link to shop front
@@ -2562,6 +2546,8 @@ en_GB:
report_header_tax_on_delivery: "Tax on Delivery (%{currency_symbol})"
report_header_tax_on_fees: "Tax on Fees (%{currency_symbol})"
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_enterprise: Enterprise
report_header_customer: Customer
report_header_customer_code: Customer Code
@@ -3618,6 +3604,10 @@ en_GB:
results_found: "%{number} Results found."
viewing: "Viewing %{start} to %{end}."
print_invoices: "Print Invoices"
selected:
zero: "No order selected"
one: "1 order selected"
other: " %{count}orders selected"
sortable_header:
payment_state: "Payment State"
shipment_state: "Shipment State"
@@ -4020,6 +4010,8 @@ en_GB:
connection_failed: "Could not connect to PayPal."
generic_error: "PayPal failed. %{reasons}"
users:
api_keys:
regenerate_key: "Regenerate Key"
form:
account_settings: Account Settings
show:
@@ -4054,6 +4046,7 @@ en_GB:
total: Total
paid?: Paid?
status: Status
completed: Completed
cancelled: Cancelled
saved_cards:
default?: Default?
@@ -4065,6 +4058,7 @@ en_GB:
authorised_shops:
shop_name: "Shop Name"
allow_charges?: "Allow Charges to Default Card?"
no_default_saved_cards_tooltip: You need to mark one credit card as default to allow charges.
localized_number:
invalid_format: has an invalid format. Please enter a number.
api:

View File

@@ -852,6 +852,7 @@ en_IE:
sells_tip: "None - enterprise does not sell to customers directly.<br />Own - Enterprise sells own products to customers.<br />Any - Enterprise can sell own or other enterprises products.<br />"
visible_in_search: Visible in search?
visible: Public
permalink:
permalink: Permalink (no spaces)
permalink_tip: "This permalink is used to create the url to your shop: %{link}your-shop-name/shop"
link_to_front: Link to shop front
@@ -2506,6 +2507,8 @@ en_IE:
report_header_tax_on_delivery: "Tax on Delivery (%{currency_symbol})"
report_header_tax_on_fees: "Tax on Fees (%{currency_symbol})"
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_enterprise: Enterprise
report_header_customer: Customer
report_header_customer_code: Customer Code
@@ -3952,6 +3955,8 @@ en_IE:
connection_failed: "Could not connect to PayPal."
generic_error: "PayPal failed. %{reasons}"
users:
api_keys:
regenerate_key: "Regenerate Key"
form:
account_settings: Account Settings
show:

View File

@@ -702,6 +702,7 @@ en_IN:
sells_tip: "None - enterprise does not sell to customers directly.<br />Own - Enterprise sells own products to customers.<br />Any - Enterprise can sell own or other enterprises products.<br />"
visible_in_search: Visible in search?
visible: Public
permalink:
permalink: Permalink (no spaces)
permalink_tip: "This permalink is used to create the url to your shop: %{link}your-shop-name/shop"
link_to_front: Link to shop front
@@ -2231,6 +2232,8 @@ en_IN:
report_header_tax_on_delivery: "Tax on Delivery (%{currency_symbol})"
report_header_tax_on_fees: "Tax on Fees (%{currency_symbol})"
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_enterprise: Enterprise
report_header_customer: Customer
report_header_customer_code: Customer Code
@@ -3509,6 +3512,8 @@ en_IN:
paypal:
refund_amount: "Amount"
users:
api_keys:
regenerate_key: "Regenerate Key"
form:
account_settings: Account Settings
show:

View File

@@ -61,27 +61,6 @@ en_NZ:
using_producer_stock_settings_but_count_on_hand_set: "must be blank because using producer stock settings"
on_demand_but_count_on_hand_set: "must be blank if on demand"
limited_stock_but_no_count_on_hand: "must be specified because forcing limited stock"
errors:
messages:
content_type_invalid: "has an invalid content type"
file_size_out_of_range: "size %{file_size} is not between required range"
limit_out_of_range: "total number is out of range"
image_metadata_missing: "is not a valid image"
dimension_min_inclusion: "must be greater than or equal to %{width} x %{height} pixel."
dimension_max_inclusion: "must be less than or equal to %{width} x %{height} pixel."
dimension_width_inclusion: "width is not included between %{min} and %{max} pixel."
dimension_height_inclusion: "height is not included between %{min} and %{max} pixel."
dimension_width_greater_than_or_equal_to: "width must be greater than or equal to %{length} pixel."
dimension_height_greater_than_or_equal_to: "height must be greater than or equal to %{length} pixel."
dimension_width_less_than_or_equal_to: "width must be less than or equal to %{length} pixel."
dimension_height_less_than_or_equal_to: "height must be less than or equal to %{length} pixel."
dimension_width_equal_to: "width must be equal to %{length} pixel."
dimension_height_equal_to: "height must be equal to %{length} pixel."
aspect_ratio_not_square: "must be a square image"
aspect_ratio_not_portrait: "must be a portrait image"
aspect_ratio_not_landscape: "must be a landscape image"
aspect_ratio_is_not: "must have an aspect ratio of %{aspect_ratio}"
aspect_ratio_unknown: "has an unknown aspect ratio"
stripe:
error_code:
incorrect_number: "The card number is incorrect."
@@ -888,6 +867,7 @@ en_NZ:
visible: Public
not_visible: Hidden
hidden: Hide all references
permalink:
permalink: Permalink (no spaces)
permalink_tip: "This permalink is used to create the url to your shop: %{link}your-shop-name/shop"
link_to_front: Link to shop front
@@ -2554,6 +2534,8 @@ en_NZ:
report_header_tax_on_delivery: "Tax on Delivery (%{currency_symbol})"
report_header_tax_on_fees: "Tax on Fees (%{currency_symbol})"
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_enterprise: Enterprise
report_header_customer: Customer
report_header_customer_code: Customer Code
@@ -3924,6 +3906,8 @@ en_NZ:
connection_failed: "Could not connect to PayPal."
generic_error: "PayPal failed. %{reasons}"
users:
api_keys:
regenerate_key: "Regenerate Key"
form:
account_settings: Account Settings
show:

View File

@@ -696,6 +696,7 @@ en_PH:
sells_tip: "None - enterprise does not sell to customers directly.<br />Own - Enterprise sells own products to customers.<br />Any - Enterprise can sell own or other enterprises products.<br />"
visible_in_search: Visible in search?
visible: Public
permalink:
permalink: Permalink (no spaces)
permalink_tip: "This permalink is used to create the url to your shop: %{link}your-shop-name/shop"
link_to_front: Link to shop front
@@ -2205,6 +2206,8 @@ en_PH:
report_header_tax_on_delivery: "Tax on Delivery (%{currency_symbol})"
report_header_tax_on_fees: "Tax on Fees (%{currency_symbol})"
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_enterprise: Enterprise
report_header_customer: Customer
report_header_customer_code: Customer Code
@@ -3438,6 +3441,8 @@ en_PH:
paypal:
refund_amount: "Amount"
users:
api_keys:
regenerate_key: "Regenerate Key"
form:
account_settings: Account Settings
show:

View File

@@ -849,6 +849,7 @@ en_US:
sells_tip: "None - enterprise does not sell to customers directly.<br />Own - Enterprise sells own products to customers.<br />Any - Enterprise can sell own or other enterprises products.<br />"
visible_in_search: Visible in search?
visible: Public
permalink:
permalink: Permalink (no spaces)
permalink_tip: "This permalink is used to create the url to your shop: %{link}your-shop-name/shop"
link_to_front: Link to shop front
@@ -2501,6 +2502,8 @@ en_US:
report_header_tax_on_delivery: "Tax on Delivery (%{currency_symbol})"
report_header_tax_on_fees: "Tax on Fees (%{currency_symbol})"
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_enterprise: Enterprise
report_header_customer: Customer
report_header_customer_code: Customer Code
@@ -3941,6 +3944,8 @@ en_US:
connection_failed: "Could not connect to PayPal."
generic_error: "PayPal failed. %{reasons}"
users:
api_keys:
regenerate_key: "Regenerate Key"
form:
account_settings: Account Settings
show:

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