mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-28 01:53:25 +00:00
Compare commits
307 Commits
v4.2.17
...
add-abilit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1c60a3a660 | ||
|
|
ac7a7b11a5 | ||
|
|
0fb273ce93 | ||
|
|
709dfa42bc | ||
|
|
9561140466 | ||
|
|
94db55dd43 | ||
|
|
6dcc50ad15 | ||
|
|
911d816233 | ||
|
|
c2d5ea4a5a | ||
|
|
59d555165f | ||
|
|
2eca3d5ef8 | ||
|
|
5fc17b51d2 | ||
|
|
c6178f5df9 | ||
|
|
bd718406f4 | ||
|
|
ca4d92bf99 | ||
|
|
2f7cb4d3ca | ||
|
|
1e24988bd1 | ||
|
|
c44195c8a0 | ||
|
|
5b44dc9609 | ||
|
|
dff9c6d333 | ||
|
|
4b3184a6ef | ||
|
|
f1dd69a4f7 | ||
|
|
24eda1bfae | ||
|
|
ae09f7a415 | ||
|
|
d8d1b38a4d | ||
|
|
a7353eb69f | ||
|
|
8a702daccd | ||
|
|
f4de39ae00 | ||
|
|
177e3d5885 | ||
|
|
b7fcc0b4fc | ||
|
|
86d38bbaa5 | ||
|
|
36bc17c8b4 | ||
|
|
b22beea5fc | ||
|
|
2c17a2bafe | ||
|
|
c25375f00a | ||
|
|
7322362eea | ||
|
|
94b14d16bf | ||
|
|
116764166c | ||
|
|
de807b1ee0 | ||
|
|
70e47f3929 | ||
|
|
b203803eb9 | ||
|
|
44d719fcb5 | ||
|
|
2a8731c8da | ||
|
|
ed81ce8ada | ||
|
|
1c0132ca4d | ||
|
|
c1cd524157 | ||
|
|
2198f12922 | ||
|
|
d86498c81e | ||
|
|
3e9647590d | ||
|
|
f4572cb8cb | ||
|
|
122fe8253e | ||
|
|
85017893d3 | ||
|
|
35a8f6be74 | ||
|
|
9464f49031 | ||
|
|
39e5613db8 | ||
|
|
20c0449128 | ||
|
|
5405d6f525 | ||
|
|
9ef07cb110 | ||
|
|
8d49ad9d18 | ||
|
|
228e484f02 | ||
|
|
66a684920a | ||
|
|
1a241e4953 | ||
|
|
74529cd595 | ||
|
|
d69c2f8314 | ||
|
|
3f00e523d3 | ||
|
|
c10f5ce5df | ||
|
|
6bf332ef20 | ||
|
|
ef27e4f241 | ||
|
|
af2c185f9f | ||
|
|
d7558a9aea | ||
|
|
076244ee1c | ||
|
|
2e2488a25e | ||
|
|
762beb7c1c | ||
|
|
118c1f7cbd | ||
|
|
8009b37723 | ||
|
|
bf950d7c69 | ||
|
|
a2c4242994 | ||
|
|
392aeb7321 | ||
|
|
f971131888 | ||
|
|
257959448a | ||
|
|
ba4e7e440d | ||
|
|
cb83069101 | ||
|
|
456355da79 | ||
|
|
2dc3c472c1 | ||
|
|
dfec0c3caf | ||
|
|
73596308ab | ||
|
|
b736db0d7b | ||
|
|
3ff1cd0793 | ||
|
|
b93f6dfdad | ||
|
|
9ba0695652 | ||
|
|
df42a88150 | ||
|
|
8b73660d75 | ||
|
|
f214c1f14f | ||
|
|
0eff4d3906 | ||
|
|
84831266f1 | ||
|
|
5e1d4892b1 | ||
|
|
7260bf1041 | ||
|
|
ded0604d18 | ||
|
|
01a907de9f | ||
|
|
5e0a08d99b | ||
|
|
6da442eb97 | ||
|
|
7b5debb76b | ||
|
|
f6cc9fca26 | ||
|
|
1f498e6052 | ||
|
|
32fb898962 | ||
|
|
df8fd88682 | ||
|
|
68b2e48fb3 | ||
|
|
0202bb40cf | ||
|
|
f7c62dfe45 | ||
|
|
1c185c2ca4 | ||
|
|
883f01e3e6 | ||
|
|
8ccc88d770 | ||
|
|
133512e4f4 | ||
|
|
86b4570fc2 | ||
|
|
3c996fdfb3 | ||
|
|
8048dc2c8b | ||
|
|
0f9f4b07a8 | ||
|
|
a6fdefff08 | ||
|
|
6a28918654 | ||
|
|
d544233bac | ||
|
|
d577d60de6 | ||
|
|
473a35f330 | ||
|
|
2fd8ffa413 | ||
|
|
bbf400a83b | ||
|
|
d1cd1fdefe | ||
|
|
df868d88d8 | ||
|
|
da61fdbc2c | ||
|
|
a07b72c3c9 | ||
|
|
54b0554bb4 | ||
|
|
2652bc086a | ||
|
|
f72e040a4d | ||
|
|
1546619718 | ||
|
|
1c17c37915 | ||
|
|
063e424bc0 | ||
|
|
b53faceebb | ||
|
|
aebf84b53f | ||
|
|
9ce1c536e4 | ||
|
|
edb2645af1 | ||
|
|
d797ef2b3a | ||
|
|
d46105ea90 | ||
|
|
151e71b4d9 | ||
|
|
b6bc4c66a2 | ||
|
|
b8b50fa165 | ||
|
|
4d23113265 | ||
|
|
f909b742ce | ||
|
|
5a4727138c | ||
|
|
fe05d17078 | ||
|
|
9f9d8020c1 | ||
|
|
3ebd896c3e | ||
|
|
14955ac8ca | ||
|
|
06c6853323 | ||
|
|
4e0b206c7b | ||
|
|
3d003a735f | ||
|
|
e16c8661a2 | ||
|
|
eaa6e9bc18 | ||
|
|
91652ba792 | ||
|
|
4bf640f0c4 | ||
|
|
cf489e809f | ||
|
|
35bb539271 | ||
|
|
b3020a5573 | ||
|
|
250b9bc3c0 | ||
|
|
e58add6af0 | ||
|
|
3447959a06 | ||
|
|
41440af533 | ||
|
|
826b1e95ef | ||
|
|
6cabbee1a2 | ||
|
|
11bc5c775c | ||
|
|
788093c7cf | ||
|
|
f44228eef7 | ||
|
|
62935f65a2 | ||
|
|
e8425c5805 | ||
|
|
31cde7e06e | ||
|
|
f467efc42b | ||
|
|
faa8888e2a | ||
|
|
84f488917e | ||
|
|
00c57fa06c | ||
|
|
c4748104a0 | ||
|
|
46bbf1b1ec | ||
|
|
d12e99e363 | ||
|
|
ede38a417f | ||
|
|
23b5e73c97 | ||
|
|
7081e712e8 | ||
|
|
5c0f3a2d4b | ||
|
|
f8657aaf41 | ||
|
|
f38661cdf1 | ||
|
|
85c8a0ac35 | ||
|
|
0e9869c4d3 | ||
|
|
a3416bcb80 | ||
|
|
bf206dc4e6 | ||
|
|
55ef4dfe0d | ||
|
|
3489f08ec5 | ||
|
|
4a7ac45dba | ||
|
|
df925d6412 | ||
|
|
84bf38ce4d | ||
|
|
490c5afc59 | ||
|
|
367f77f477 | ||
|
|
892a020bcc | ||
|
|
1f5281ac1a | ||
|
|
3c9b7a10f4 | ||
|
|
e2441cdcf6 | ||
|
|
6dec80aaaf | ||
|
|
1c349049d1 | ||
|
|
edc667a336 | ||
|
|
02787e668f | ||
|
|
830a7c8f1d | ||
|
|
cd43bd4522 | ||
|
|
9dbc9f7272 | ||
|
|
da9a4803ff | ||
|
|
732ebd8457 | ||
|
|
39e567d386 | ||
|
|
4740c2b0db | ||
|
|
ee70ab8adb | ||
|
|
936a96bd6c | ||
|
|
b3492981d3 | ||
|
|
167ce0e53c | ||
|
|
8f47d2b2be | ||
|
|
e873771f18 | ||
|
|
627b8af37b | ||
|
|
eb72ec8e13 | ||
|
|
7458dccea6 | ||
|
|
3e24b7ba6b | ||
|
|
62cd507fb9 | ||
|
|
beba3c7684 | ||
|
|
f5bd23b4d8 | ||
|
|
2c14aecf4f | ||
|
|
4e6d64c0a1 | ||
|
|
5718f9f00c | ||
|
|
5423c1c02e | ||
|
|
ee8454bd2c | ||
|
|
45c23a76ff | ||
|
|
5a1d9013c6 | ||
|
|
3a68e237de | ||
|
|
87ed23211e | ||
|
|
48e18b016a | ||
|
|
da851079f4 | ||
|
|
1d265d19ce | ||
|
|
9e4bd23332 | ||
|
|
fdc362cb44 | ||
|
|
8d3845508c | ||
|
|
952b6039f9 | ||
|
|
053af8416b | ||
|
|
955b84ae6f | ||
|
|
2455ecabde | ||
|
|
71037022ec | ||
|
|
7ffd4669be | ||
|
|
2b7b83ba37 | ||
|
|
fc79612f26 | ||
|
|
de28027623 | ||
|
|
755107ec9f | ||
|
|
b40cd579bc | ||
|
|
8e45b758ba | ||
|
|
c4de247dd9 | ||
|
|
a244b34627 | ||
|
|
dabe37ebcb | ||
|
|
2fcbe437f2 | ||
|
|
642938afe0 | ||
|
|
7b96a1fb5b | ||
|
|
0ca86344d2 | ||
|
|
980f004b83 | ||
|
|
c0ee72319f | ||
|
|
3d26b76d17 | ||
|
|
7772c01e16 | ||
|
|
04921aeed4 | ||
|
|
c71c5054e0 | ||
|
|
4015413d1d | ||
|
|
b3059bbdbc | ||
|
|
a35fab5e1f | ||
|
|
c22f6cb805 | ||
|
|
f00aeb006e | ||
|
|
66c3ba3bba | ||
|
|
b322df8515 | ||
|
|
617164684c | ||
|
|
b36fae1bbb | ||
|
|
3a5f263fb5 | ||
|
|
d5c3edc8fa | ||
|
|
ec65e4dcaa | ||
|
|
c83eb5d5dc | ||
|
|
9a40329bd7 | ||
|
|
bf74612892 | ||
|
|
eae7d96b30 | ||
|
|
96c6f58ba2 | ||
|
|
6a8c7b15dc | ||
|
|
955492bfdd | ||
|
|
0000faab91 | ||
|
|
e3f157ebdd | ||
|
|
f8af84d9d4 | ||
|
|
bddbb36813 | ||
|
|
78b73c988e | ||
|
|
cd641cc5d6 | ||
|
|
50555a3fe9 | ||
|
|
7c6e220bf7 | ||
|
|
3496b57942 | ||
|
|
1596649034 | ||
|
|
81461684f3 | ||
|
|
9da6f862cd | ||
|
|
3eb597bff4 | ||
|
|
46fde6bd40 | ||
|
|
590a09f069 | ||
|
|
e02de2b17d | ||
|
|
7bb7391634 | ||
|
|
e5a136801d | ||
|
|
addd2ea9ac | ||
|
|
1f329e85bc | ||
|
|
4140e3d153 | ||
|
|
db70c47a31 | ||
|
|
981c306977 | ||
|
|
52c6f5a222 |
@@ -1 +1,2 @@
|
||||
defaults
|
||||
IE 11
|
||||
|
||||
@@ -6,3 +6,6 @@ STRIPE_SECRET_TEST_API_KEY="bogus_key"
|
||||
STRIPE_CUSTOMER="bogus_customer"
|
||||
|
||||
SITE_URL="test.host"
|
||||
|
||||
OPENID_APP_ID="test-provider"
|
||||
OPENID_APP_SECRET="12345"
|
||||
|
||||
5
.github/ISSUE_TEMPLATE/release.md
vendored
5
.github/ISSUE_TEMPLATE/release.md
vendored
@@ -1,7 +1,7 @@
|
||||
---
|
||||
name: Release task
|
||||
about: Track the process of a new release
|
||||
title: 'Release v'
|
||||
title: Release v
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
@@ -18,7 +18,7 @@ assignees: ''
|
||||
|
||||
- [ ] [Find build] of the release commit and copy it below.
|
||||
- [ ] Move this issue to Test Ready.
|
||||
- [ ] Notify testers.
|
||||
- [ ] Notify `@testers` in [#testing].
|
||||
- [ ] Test build: <!-- paste build link here, e.g. https://semaphore...builds/1234 -->
|
||||
|
||||
## Finish on Tuesday
|
||||
@@ -44,5 +44,6 @@ The full process is described at https://github.com/openfoodfoundation/openfoodn
|
||||
[Draft new release]: https://github.com/openfoodfoundation/openfoodnetwork/releases/new?tag=v&title=v+Code+Name&body=Congrats%0A%0ADescription%0A%0A%23%23+User+facing+changes+:eyes:%0A%0A%0A%0A%23%23+Technical+changes+:wrench:%0A%0A
|
||||
[releases]: https://github.com/openfoodfoundation/openfoodnetwork/releases
|
||||
[#instance-managers]: https://app.slack.com/client/T02G54U79/CG7NJ966B
|
||||
[#testing]: https://openfoodnetwork.slack.com/app_redirect?channel=C02TZ6X00
|
||||
[Find build]: https://semaphoreci.com/openfoodfoundation/openfoodnetwork-2/branches/master
|
||||
[#global-community]: https://app.slack.com/client/T02G54U79/C59ADD8F2
|
||||
|
||||
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -1,6 +1,6 @@
|
||||
#### What? Why?
|
||||
|
||||
Closes # <!-- Insert issue number here. -->
|
||||
- Closes # <!-- Insert issue number here. -->
|
||||
|
||||
<!-- Explain why this change is needed and the solution you propose.
|
||||
Provide context for others to understand it. -->
|
||||
|
||||
6
.github/workflows/brakeman-analysis.yml
vendored
6
.github/workflows/brakeman-analysis.yml
vendored
@@ -23,11 +23,11 @@ jobs:
|
||||
steps:
|
||||
# Checkout the repository to the GitHub Actions runner
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# Customize the ruby version depending on your needs
|
||||
- name: Setup Ruby
|
||||
uses: actions/setup-ruby@v1
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: '2.7'
|
||||
|
||||
@@ -45,6 +45,6 @@ jobs:
|
||||
|
||||
# Upload the SARIF file generated in the previous step
|
||||
- name: Upload SARIF
|
||||
uses: github/codeql-action/upload-sarif@v1
|
||||
uses: github/codeql-action/upload-sarif@v2
|
||||
with:
|
||||
sarif_file: output.sarif.json
|
||||
|
||||
26
.github/workflows/build.yml
vendored
26
.github/workflows/build.yml
vendored
@@ -3,6 +3,8 @@ name: Build
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'dependabot/**'
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
@@ -45,16 +47,21 @@ jobs:
|
||||
- "engines/*/spec"
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup redis
|
||||
uses: supercharge/redis-github-action@1.4.0
|
||||
with:
|
||||
redis-version: 6
|
||||
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
||||
|
||||
- uses: actions/setup-node@v2
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '14.15.5'
|
||||
node-version: 16
|
||||
|
||||
- name: Install JS dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
@@ -69,7 +76,7 @@ jobs:
|
||||
|
||||
- name: Archive failed tests screenshots
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: failed-tests-screenshots
|
||||
path: tmp/capybara/screenshots/*.png
|
||||
@@ -92,16 +99,21 @@ jobs:
|
||||
POSTGRES_USER: ofn
|
||||
POSTGRES_PASSWORD: f00d
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup redis
|
||||
uses: supercharge/redis-github-action@1.4.0
|
||||
with:
|
||||
redis-version: 6
|
||||
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
||||
|
||||
- uses: actions/setup-node@v2
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '14.15.5'
|
||||
node-version: 16
|
||||
|
||||
- name: Install JS dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
|
||||
2
.github/workflows/linters.yml
vendored
2
.github/workflows/linters.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
- name: prettier
|
||||
uses: EPMatt/reviewdog-action-prettier@v1
|
||||
with:
|
||||
|
||||
6
.github/workflows/mapi.yml
vendored
6
.github/workflows/mapi.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: true
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- run: docker/build
|
||||
- run: docker-compose up --detach
|
||||
- run: until curl -f -s http://localhost:3000; do echo "waiting for api server"; sleep 1; done
|
||||
@@ -39,13 +39,13 @@ jobs:
|
||||
|
||||
# Archive HTML report
|
||||
- name: Archive Mayhem for API report
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: mapi-report
|
||||
path: mapi.html
|
||||
|
||||
# Upload SARIF file (only available on public repos or github enterprise)
|
||||
- name: Upload SARIF file
|
||||
uses: github/codeql-action/upload-sarif@v1
|
||||
uses: github/codeql-action/upload-sarif@v2
|
||||
with:
|
||||
sarif_file: mapi.sarif
|
||||
|
||||
@@ -478,6 +478,7 @@ Metrics/ClassLength:
|
||||
- 'app/serializers/api/enterprise_shopfront_serializer.rb'
|
||||
- 'app/services/cart_service.rb'
|
||||
- 'app/services/order_syncer.rb'
|
||||
- 'app/services/order_cycle_form.rb'
|
||||
- 'engines/order_management/app/services/order_management/order/updater.rb'
|
||||
- 'lib/open_food_network/enterprise_fee_calculator.rb'
|
||||
- 'lib/open_food_network/order_cycle_form_applicator.rb'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[main]
|
||||
host = https://www.transifex.com
|
||||
|
||||
[open-food-network.enyml]
|
||||
[o:open-food-foundation:p:open-food-network:r:enyml]
|
||||
file_filter = config/locales/<lang>.yml
|
||||
source_lang = en
|
||||
type = YML
|
||||
|
||||
@@ -68,6 +68,8 @@ To login as the default user, use:
|
||||
|
||||
email: ofn@example.com
|
||||
password: ofn123
|
||||
|
||||
Seee [Locale and sample data] about loading data.
|
||||
|
||||
### Testing
|
||||
|
||||
@@ -129,3 +131,4 @@ If these commands succeed, you should be able to [continue the setup process](#g
|
||||
[rubocop]: https://rubocop.readthedocs.io/en/latest/
|
||||
[karma]: https://github.com/openfoodfoundation/openfoodnetwork/wiki/Karma
|
||||
[slack-dev]: https://openfoodnetwork.slack.com/messages/C2GQ45KNU
|
||||
[Locale and sample data]: https://github.com/openfoodfoundation/openfoodnetwork/wiki/Locale-and-sample-data
|
||||
|
||||
13
Gemfile
13
Gemfile
@@ -69,6 +69,10 @@ gem 'pagy', '~> 5.1'
|
||||
gem 'rswag-api'
|
||||
gem 'rswag-ui'
|
||||
|
||||
gem 'gitlab-omniauth-openid-connect', require: 'omniauth_openid_connect'
|
||||
gem 'openid_connect', '~> 1.3'
|
||||
gem 'omniauth-rails_csrf_protection'
|
||||
|
||||
gem 'angularjs-rails', '1.8.0'
|
||||
gem 'bugsnag'
|
||||
gem 'haml'
|
||||
@@ -146,9 +150,10 @@ group :test, :development do
|
||||
gem "factory_bot_rails", '6.2.0', require: false
|
||||
gem 'fuubar', '~> 2.5.1'
|
||||
gem 'json_spec', '~> 1.1.4'
|
||||
gem 'knapsack'
|
||||
gem 'knapsack', require: false
|
||||
gem 'letter_opener', '>= 1.4.1'
|
||||
gem 'rspec-rails', ">= 3.5.2"
|
||||
gem 'rspec-retry', require: false
|
||||
gem 'rswag-specs'
|
||||
gem 'shoulda-matchers'
|
||||
gem 'timecop'
|
||||
@@ -159,9 +164,9 @@ group :test do
|
||||
gem 'pdf-reader'
|
||||
gem 'rails-controller-testing'
|
||||
gem 'simplecov', require: false
|
||||
gem 'test-prof'
|
||||
gem 'vcr'
|
||||
gem 'webmock'
|
||||
gem 'test-prof', require: false
|
||||
gem 'vcr', require: false
|
||||
gem 'webmock', require: false
|
||||
# See spec/spec_helper.rb for instructions
|
||||
# gem 'perftools.rb'
|
||||
end
|
||||
|
||||
154
Gemfile.lock
154
Gemfile.lock
@@ -93,7 +93,7 @@ GEM
|
||||
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
||||
active_model_serializers (0.8.4)
|
||||
activemodel (>= 3.0)
|
||||
active_storage_validations (1.0.0)
|
||||
active_storage_validations (1.0.3)
|
||||
activejob (>= 5.2.0)
|
||||
activemodel (>= 5.2.0)
|
||||
activestorage (>= 5.2.0)
|
||||
@@ -111,7 +111,7 @@ GEM
|
||||
activerecord (6.1.7)
|
||||
activemodel (= 6.1.7)
|
||||
activesupport (= 6.1.7)
|
||||
activerecord-import (1.4.0)
|
||||
activerecord-import (1.4.1)
|
||||
activerecord (>= 4.2)
|
||||
activerecord-postgresql-adapter (0.0.1)
|
||||
pg
|
||||
@@ -140,6 +140,7 @@ GEM
|
||||
activerecord (>= 4.2)
|
||||
addressable (2.8.1)
|
||||
public_suffix (>= 2.0.2, < 6.0)
|
||||
aes_key_wrap (1.1.0)
|
||||
afm (0.2.2)
|
||||
angular-rails-templates (1.2.0)
|
||||
railties (>= 5.0, < 7.1)
|
||||
@@ -153,29 +154,28 @@ GEM
|
||||
arel-helpers (2.14.0)
|
||||
activerecord (>= 3.1.0, < 8)
|
||||
ast (2.4.2)
|
||||
attr_required (1.0.1)
|
||||
awesome_nested_set (3.5.0)
|
||||
activerecord (>= 4.0.0, < 7.1)
|
||||
aws-eventstream (1.2.0)
|
||||
aws-partitions (1.601.0)
|
||||
aws-sdk-core (3.131.2)
|
||||
aws-partitions (1.651.0)
|
||||
aws-sdk-core (3.166.0)
|
||||
aws-eventstream (~> 1, >= 1.0.2)
|
||||
aws-partitions (~> 1, >= 1.525.0)
|
||||
aws-sigv4 (~> 1.1)
|
||||
aws-partitions (~> 1, >= 1.651.0)
|
||||
aws-sigv4 (~> 1.5)
|
||||
jmespath (~> 1, >= 1.6.1)
|
||||
aws-sdk-kms (1.57.0)
|
||||
aws-sdk-core (~> 3, >= 3.127.0)
|
||||
aws-sdk-kms (1.59.0)
|
||||
aws-sdk-core (~> 3, >= 3.165.0)
|
||||
aws-sigv4 (~> 1.1)
|
||||
aws-sdk-s3 (1.114.0)
|
||||
aws-sdk-core (~> 3, >= 3.127.0)
|
||||
aws-sdk-s3 (1.117.1)
|
||||
aws-sdk-core (~> 3, >= 3.165.0)
|
||||
aws-sdk-kms (~> 1)
|
||||
aws-sigv4 (~> 1.4)
|
||||
aws-sigv4 (1.5.0)
|
||||
aws-sigv4 (1.5.2)
|
||||
aws-eventstream (~> 1, >= 1.0.2)
|
||||
axlsx_styler (1.1.0)
|
||||
activesupport (>= 3.1)
|
||||
caxlsx (>= 2.0.2)
|
||||
bcrypt (3.1.18)
|
||||
bigdecimal (3.0.2)
|
||||
bindata (2.4.12)
|
||||
bindex (0.8.1)
|
||||
bootsnap (1.13.0)
|
||||
msgpack (~> 1.2)
|
||||
@@ -194,7 +194,7 @@ GEM
|
||||
railties (>= 5.2)
|
||||
thread-local (>= 1.1.0)
|
||||
cancancan (1.15.0)
|
||||
capybara (3.37.1)
|
||||
capybara (3.38.0)
|
||||
addressable
|
||||
matrix
|
||||
mini_mime (>= 0.1.3)
|
||||
@@ -203,7 +203,7 @@ GEM
|
||||
rack-test (>= 0.6.3)
|
||||
regexp_parser (>= 1.5, < 3.0)
|
||||
xpath (~> 3.2)
|
||||
caxlsx (3.1.1)
|
||||
caxlsx (3.3.0)
|
||||
htmlentities (~> 4.3, >= 4.3.4)
|
||||
marcel (~> 1.0)
|
||||
nokogiri (~> 1.10, >= 1.10.4)
|
||||
@@ -242,7 +242,7 @@ GEM
|
||||
debase-ruby_core_source (= 0.10.12)
|
||||
msgpack
|
||||
debase-ruby_core_source (0.10.12)
|
||||
debug (1.6.2)
|
||||
debug (1.6.3)
|
||||
irb (>= 1.3.6)
|
||||
reline (>= 0.3.1)
|
||||
debugger-linecache (1.2.0)
|
||||
@@ -265,7 +265,6 @@ GEM
|
||||
dotenv-rails (2.8.1)
|
||||
dotenv (= 2.8.1)
|
||||
railties (>= 3.2)
|
||||
dry-inflector (0.2.1)
|
||||
erubi (1.11.0)
|
||||
et-orbi (1.2.7)
|
||||
tzinfo
|
||||
@@ -276,10 +275,12 @@ GEM
|
||||
factory_bot_rails (6.2.0)
|
||||
factory_bot (~> 6.2.0)
|
||||
railties (>= 5.0.0)
|
||||
faraday (2.3.0)
|
||||
faraday-net_http (~> 2.0)
|
||||
faraday (2.6.0)
|
||||
faraday-net_http (>= 2.0, < 3.1)
|
||||
ruby2_keywords (>= 0.0.4)
|
||||
faraday-net_http (2.0.3)
|
||||
faraday-follow_redirects (0.3.0)
|
||||
faraday (>= 1, < 3)
|
||||
faraday-net_http (3.0.1)
|
||||
ferrum (0.11)
|
||||
addressable (~> 2.5)
|
||||
cliver (~> 0.3)
|
||||
@@ -320,6 +321,10 @@ GEM
|
||||
rspec-core (~> 3.0)
|
||||
ruby-progressbar (~> 1.4)
|
||||
geocoder (1.8.1)
|
||||
gitlab-omniauth-openid-connect (0.10.0)
|
||||
addressable (~> 2.7)
|
||||
omniauth (>= 1.9, < 3)
|
||||
openid_connect (~> 1.2)
|
||||
globalid (1.0.0)
|
||||
activesupport (>= 5.0)
|
||||
gmaps4rails (2.1.2)
|
||||
@@ -331,9 +336,11 @@ GEM
|
||||
tilt
|
||||
hashdiff (1.0.1)
|
||||
hashery (2.1.2)
|
||||
hashie (5.0.0)
|
||||
highline (2.0.3)
|
||||
hiredis (0.6.3)
|
||||
htmlentities (4.3.4)
|
||||
httpclient (2.8.3)
|
||||
i18n (1.12.0)
|
||||
concurrent-ruby (~> 1.0)
|
||||
i18n-js (3.9.2)
|
||||
@@ -345,7 +352,7 @@ GEM
|
||||
activerecord (>= 3.0)
|
||||
io-console (0.5.11)
|
||||
ipaddress (0.8.3)
|
||||
irb (1.4.1)
|
||||
irb (1.4.2)
|
||||
reline (>= 0.3.0)
|
||||
jmespath (1.6.1)
|
||||
jquery-rails (4.4.0)
|
||||
@@ -355,8 +362,14 @@ GEM
|
||||
jquery-ui-rails (4.2.1)
|
||||
railties (>= 3.2.16)
|
||||
json (2.6.2)
|
||||
json-schema (2.8.1)
|
||||
addressable (>= 2.4)
|
||||
json-jwt (1.16.0)
|
||||
activesupport (>= 4.2)
|
||||
aes_key_wrap
|
||||
bindata
|
||||
faraday (~> 2.0)
|
||||
faraday-follow_redirects
|
||||
json-schema (3.0.0)
|
||||
addressable (>= 2.8)
|
||||
json_spec (1.1.5)
|
||||
multi_json (~> 1.0)
|
||||
rspec (>= 2.0, < 4.0)
|
||||
@@ -400,16 +413,38 @@ GEM
|
||||
msgpack (1.5.4)
|
||||
multi_json (1.15.0)
|
||||
multi_xml (0.6.0)
|
||||
net-protocol (0.1.3)
|
||||
timeout
|
||||
net-smtp (0.3.2)
|
||||
net-protocol
|
||||
nio4r (2.5.8)
|
||||
nokogiri (1.13.8)
|
||||
nokogiri (1.13.9)
|
||||
mini_portile2 (~> 2.8.0)
|
||||
racc (~> 1.4)
|
||||
oauth2 (1.4.10)
|
||||
oauth2 (1.4.11)
|
||||
faraday (>= 0.17.3, < 3.0)
|
||||
jwt (>= 1.0, < 3.0)
|
||||
multi_json (~> 1.3)
|
||||
multi_xml (~> 0.5)
|
||||
rack (>= 1.2, < 3)
|
||||
rack (>= 1.2, < 4)
|
||||
omniauth (2.1.0)
|
||||
hashie (>= 3.4.6)
|
||||
rack (>= 2.2.3)
|
||||
rack-protection
|
||||
omniauth-rails_csrf_protection (1.0.1)
|
||||
actionpack (>= 4.2)
|
||||
omniauth (~> 2.0)
|
||||
openid_connect (1.4.2)
|
||||
activemodel
|
||||
attr_required (>= 1.0.0)
|
||||
json-jwt (>= 1.15.0)
|
||||
net-smtp
|
||||
rack-oauth2 (~> 1.21)
|
||||
swd (~> 1.3)
|
||||
tzinfo
|
||||
validate_email
|
||||
validate_url
|
||||
webfinger (~> 1.2)
|
||||
orm_adapter (0.5.0)
|
||||
pagy (5.10.1)
|
||||
activesupport
|
||||
@@ -426,7 +461,7 @@ GEM
|
||||
xml-simple
|
||||
paypal-sdk-merchant (1.117.2)
|
||||
paypal-sdk-core (~> 0.3.0)
|
||||
pdf-reader (2.10.0)
|
||||
pdf-reader (2.11.0)
|
||||
Ascii85 (~> 1.0)
|
||||
afm (~> 0.2.1)
|
||||
hashery (~> 2.0)
|
||||
@@ -445,6 +480,12 @@ GEM
|
||||
rack (2.2.4)
|
||||
rack-mini-profiler (2.3.4)
|
||||
rack (>= 1.2.0)
|
||||
rack-oauth2 (1.21.3)
|
||||
activesupport
|
||||
attr_required
|
||||
httpclient
|
||||
json-jwt (>= 1.11.0)
|
||||
rack (>= 2.1.0)
|
||||
rack-protection (2.1.0)
|
||||
rack
|
||||
rack-proxy (0.7.0)
|
||||
@@ -505,7 +546,7 @@ GEM
|
||||
ffi (~> 1.0)
|
||||
redcarpet (3.5.1)
|
||||
redis (4.8.0)
|
||||
regexp_parser (2.5.0)
|
||||
regexp_parser (2.6.0)
|
||||
reline (0.3.1)
|
||||
io-console (~> 0.5)
|
||||
request_store (1.5.0)
|
||||
@@ -520,9 +561,8 @@ GEM
|
||||
roadie-rails (3.0.0)
|
||||
railties (>= 5.1, < 7.1)
|
||||
roadie (~> 5.0)
|
||||
rodf (1.1.1)
|
||||
rodf (1.2.0)
|
||||
builder (>= 3.0)
|
||||
dry-inflector (~> 0.1)
|
||||
rubyzip (>= 1.0)
|
||||
roo (2.9.0)
|
||||
nokogiri (~> 1)
|
||||
@@ -547,29 +587,32 @@ GEM
|
||||
rspec-expectations (~> 3.10)
|
||||
rspec-mocks (~> 3.10)
|
||||
rspec-support (~> 3.10)
|
||||
rspec-retry (0.6.2)
|
||||
rspec-core (> 3.3)
|
||||
rspec-support (3.10.3)
|
||||
rswag-api (2.6.0)
|
||||
rswag-api (2.7.0)
|
||||
railties (>= 3.1, < 7.1)
|
||||
rswag-specs (2.6.0)
|
||||
rswag-specs (2.7.0)
|
||||
activesupport (>= 3.1, < 7.1)
|
||||
json-schema (~> 2.2)
|
||||
json-schema (>= 2.2, < 4.0)
|
||||
railties (>= 3.1, < 7.1)
|
||||
rswag-ui (2.6.0)
|
||||
rspec-core (>= 2.14)
|
||||
rswag-ui (2.7.0)
|
||||
actionpack (>= 3.1, < 7.1)
|
||||
railties (>= 3.1, < 7.1)
|
||||
rubocop (1.36.0)
|
||||
rubocop (1.38.0)
|
||||
json (~> 2.3)
|
||||
parallel (~> 1.10)
|
||||
parser (>= 3.1.2.1)
|
||||
rainbow (>= 2.2.2, < 4.0)
|
||||
regexp_parser (>= 1.8, < 3.0)
|
||||
rexml (>= 3.2.5, < 4.0)
|
||||
rubocop-ast (>= 1.20.1, < 2.0)
|
||||
rubocop-ast (>= 1.23.0, < 2.0)
|
||||
ruby-progressbar (~> 1.7)
|
||||
unicode-display_width (>= 1.4.0, < 3.0)
|
||||
rubocop-ast (1.21.0)
|
||||
rubocop-ast (1.23.0)
|
||||
parser (>= 3.1.1.0)
|
||||
rubocop-rails (2.16.1)
|
||||
rubocop-rails (2.17.2)
|
||||
activesupport (>= 4.2.0)
|
||||
rack (>= 1.1)
|
||||
rubocop (>= 1.33.0, < 2.0)
|
||||
@@ -594,8 +637,8 @@ GEM
|
||||
semantic_range (3.0.0)
|
||||
shoulda-matchers (5.2.0)
|
||||
activesupport (>= 5.2.0)
|
||||
sidekiq (6.5.7)
|
||||
connection_pool (>= 2.2.5)
|
||||
sidekiq (6.5.8)
|
||||
connection_pool (>= 2.2.5, < 3)
|
||||
rack (~> 2.0)
|
||||
redis (>= 4.5.0, < 5)
|
||||
sidekiq-scheduler (4.0.3)
|
||||
@@ -609,9 +652,8 @@ GEM
|
||||
simplecov_json_formatter (~> 0.1)
|
||||
simplecov-html (0.12.3)
|
||||
simplecov_json_formatter (0.1.3)
|
||||
spreadsheet_architect (4.2.0)
|
||||
axlsx_styler (>= 1.0.0, < 2)
|
||||
caxlsx (>= 2.0.2, < 4)
|
||||
spreadsheet_architect (5.0.0)
|
||||
caxlsx (>= 3.3.0, < 4)
|
||||
rodf (>= 1.0.0, < 2)
|
||||
spring (4.1.0)
|
||||
spring-commands-rspec (1.0.4)
|
||||
@@ -642,14 +684,19 @@ GEM
|
||||
redis
|
||||
stringex (2.8.5)
|
||||
stripe (7.1.0)
|
||||
swd (1.3.0)
|
||||
activesupport (>= 3)
|
||||
attr_required (>= 0.0.5)
|
||||
httpclient (>= 2.4)
|
||||
temple (0.8.2)
|
||||
test-prof (1.0.10)
|
||||
test-prof (1.0.11)
|
||||
test-unit (3.5.5)
|
||||
power_assert
|
||||
thor (1.2.1)
|
||||
thread-local (1.1.0)
|
||||
tilt (2.0.11)
|
||||
timecop (0.9.5)
|
||||
timeout (0.3.0)
|
||||
ttfunk (1.7.0)
|
||||
tzinfo (2.0.5)
|
||||
concurrent-ruby (~> 1.0)
|
||||
@@ -658,8 +705,14 @@ GEM
|
||||
valid_email2 (4.0.4)
|
||||
activemodel (>= 3.2)
|
||||
mail (~> 2.5)
|
||||
validate_email (0.1.6)
|
||||
activemodel (>= 3.0)
|
||||
mail (>= 2.2.5)
|
||||
validate_url (1.0.15)
|
||||
activemodel (>= 3.0.0)
|
||||
public_suffix
|
||||
vcr (6.1.0)
|
||||
view_component (2.74.1)
|
||||
view_component (2.75.0)
|
||||
activesupport (>= 5.0.0, < 8.0)
|
||||
concurrent-ruby (~> 1.0)
|
||||
method_source (~> 1.0)
|
||||
@@ -672,6 +725,9 @@ GEM
|
||||
activemodel (>= 6.0.0)
|
||||
bindex (>= 0.4.0)
|
||||
railties (>= 6.0.0)
|
||||
webfinger (1.2.0)
|
||||
activesupport
|
||||
httpclient (>= 2.4)
|
||||
webmock (3.18.1)
|
||||
addressable (>= 2.8.0)
|
||||
crack (>= 0.3.2)
|
||||
@@ -692,7 +748,7 @@ GEM
|
||||
xml-simple (1.1.8)
|
||||
xpath (3.2.0)
|
||||
nokogiri (~> 1.8)
|
||||
zeitwerk (2.6.1)
|
||||
zeitwerk (2.6.4)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
@@ -746,6 +802,7 @@ DEPENDENCIES
|
||||
foreman
|
||||
fuubar (~> 2.5.1)
|
||||
geocoder
|
||||
gitlab-omniauth-openid-connect
|
||||
gmaps4rails
|
||||
good_migrations
|
||||
haml
|
||||
@@ -770,6 +827,8 @@ DEPENDENCIES
|
||||
monetize (~> 1.11)
|
||||
oauth2 (~> 1.4.7)
|
||||
ofn-qz!
|
||||
omniauth-rails_csrf_protection
|
||||
openid_connect (~> 1.3)
|
||||
order_management!
|
||||
pagy (~> 5.1)
|
||||
paper_trail (~> 12.1.0)
|
||||
@@ -796,6 +855,7 @@ DEPENDENCIES
|
||||
roadie-rails
|
||||
roo
|
||||
rspec-rails (>= 3.5.2)
|
||||
rspec-retry
|
||||
rswag-api
|
||||
rswag-specs
|
||||
rswag-ui
|
||||
|
||||
@@ -35,7 +35,13 @@ We also have a [Super Admin Guide][super-admin-guide] to help with configuration
|
||||
|
||||
If you'd like to help out with testing, please introduce yourself on the #testing channel on [Slack][slack-invite] and download the [ZenHub browser extension][zenhub] to view the development pipeline. Also, do have a look in our [Welcome New QAs board](https://github.com/orgs/openfoodfoundation/projects/1) for some good first issues, both on manual and automated testing (RSpec/Capybara).
|
||||
|
||||
We use [BrowserStack](https://www.browserstack.com/) as a manual testing tool. BrowserStack provides open source projects with unlimited and free of charge accounts. A big thanks to them!
|
||||
We use [BrowserStack](https://www.browserstack.com/) as a manual testing tool. BrowserStack provides open source projects with unlimited and free of charge accounts. A big thanks to them!
|
||||
|
||||
|
||||
We use [KnapsackPro](https://knapsackpro.com/) for optimal parallelisation of our automated tests. KnapsackPro offers unlimited plans for non-commercial open source projects, like ours - a big thanks to them!
|
||||
|
||||

|
||||
|
||||
|
||||
## Licence
|
||||
|
||||
|
||||
@@ -261,7 +261,8 @@ angular.module("ofn.admin").controller "AdminProductEditCtrl", ($scope, $timeout
|
||||
product = BulkProducts.find product.id
|
||||
variant.unit_value = parseFloat(match[1].replace(",", "."))
|
||||
variant.unit_value = null if isNaN(variant.unit_value)
|
||||
variant.unit_value *= product.variant_unit_scale if variant.unit_value && product.variant_unit_scale
|
||||
if variant.unit_value && product.variant_unit_scale
|
||||
variant.unit_value = parseFloat(window.bigDecimal.multiply(variant.unit_value, product.variant_unit_scale, 2))
|
||||
variant.unit_description = match[3]
|
||||
|
||||
$scope.incrementLimit = ->
|
||||
|
||||
@@ -5,6 +5,8 @@ angular.module("admin.lineItems").controller 'LineItemsCtrl', ($scope, $timeout,
|
||||
$scope.confirmDelete = true
|
||||
$scope.startDate = moment().startOf('day').subtract(7, 'days').format('YYYY-MM-DD')
|
||||
$scope.endDate = moment().startOf('day').format('YYYY-MM-DD')
|
||||
$scope.previousDates = { startDate: $scope.startDate, endDate: $scope.endDate }
|
||||
$scope.datesChangedOnCancelEvent = false
|
||||
$scope.bulkActions = [ { name: t("admin.orders.bulk_management.actions_delete"), callback: 'deleteLineItems' } ]
|
||||
$scope.selectedUnitsProduct = {}
|
||||
$scope.selectedUnitsVariant = {}
|
||||
@@ -26,9 +28,27 @@ angular.module("admin.lineItems").controller 'LineItemsCtrl', ($scope, $timeout,
|
||||
$scope.refreshData()
|
||||
|
||||
$scope.$watchCollection "[startDate, endDate]", (newValues, oldValues) ->
|
||||
if newValues != oldValues
|
||||
$scope.refreshData()
|
||||
|
||||
if newValues != oldValues && !$scope.datesChangedOnCancelEvent
|
||||
state = $scope.refreshData()
|
||||
if (state == "cancel")
|
||||
$scope.datesChangedOnCancelEvent = true
|
||||
$scope.cancelDateChange()
|
||||
|
||||
$scope.cancelDateChange = ->
|
||||
# Reset the date filters to the previous values
|
||||
$scope.startDate = $scope.previousDates.startDate
|
||||
$scope.endDate = $scope.previousDates.endDate
|
||||
# throw a flatpickr:change event to change the date back in the datepicker
|
||||
event = new CustomEvent('flatpickr:change', {
|
||||
detail: {
|
||||
startDate: $scope.previousDates.startDate,
|
||||
endDate: $scope.previousDates.endDate
|
||||
}
|
||||
})
|
||||
window.dispatchEvent(event)
|
||||
$timeout ->
|
||||
$scope.datesChangedOnCancelEvent = false
|
||||
|
||||
$scope.refreshData = ->
|
||||
unless !$scope.orderCycleFilter? || $scope.orderCycleFilter == ''
|
||||
$scope.setOrderCycleDateRange()
|
||||
@@ -38,6 +58,8 @@ angular.module("admin.lineItems").controller 'LineItemsCtrl', ($scope, $timeout,
|
||||
|
||||
return unless moment($scope.formattedStartDate).isValid() and moment($scope.formattedEndDate).isValid()
|
||||
|
||||
return "cancel" unless $scope.confirmRefresh()
|
||||
|
||||
$scope.loadOrders()
|
||||
$scope.loadLineItems()
|
||||
|
||||
@@ -45,6 +67,11 @@ angular.module("admin.lineItems").controller 'LineItemsCtrl', ($scope, $timeout,
|
||||
$scope.loadAssociatedData()
|
||||
|
||||
$scope.dereferenceLoadedData()
|
||||
|
||||
$timeout ->
|
||||
# update the previous dates with the current ones since loading was successful
|
||||
$scope.previousDates.startDate = $scope.startDate
|
||||
$scope.previousDates.endDate = $scope.endDate
|
||||
|
||||
$scope.setOrderCycleDateRange = ->
|
||||
start_date = OrderCycles.byID[$scope.orderCycleFilter].orders_open_at
|
||||
|
||||
@@ -36,7 +36,7 @@ angular.module("admin.products")
|
||||
$scope.product.master.unit_description = match[3]
|
||||
else
|
||||
value = $scope.product.master.unit_value
|
||||
value /= $scope.product.variant_unit_scale if $scope.product.master.unit_value && $scope.product.variant_unit_scale
|
||||
value = window.bigDecimal.divide(value, $scope.product.variant_unit_scale, 2) if $scope.product.master.unit_value && $scope.product.variant_unit_scale
|
||||
$scope.product.master.unit_value_with_description = value + " " + $scope.product.master.unit_description
|
||||
|
||||
$scope.processUnitPrice = ->
|
||||
|
||||
@@ -65,7 +65,8 @@ angular.module("ofn.admin").factory "BulkProducts", (ProductResource, dataFetche
|
||||
variantUnitValue: (product, variant) ->
|
||||
if variant.unit_value?
|
||||
if product.variant_unit_scale
|
||||
@divideAsInteger variant.unit_value, product.variant_unit_scale
|
||||
variant_unit_value = @divideAsInteger variant.unit_value, product.variant_unit_scale
|
||||
parseFloat(window.bigDecimal.round(variant_unit_value, 2))
|
||||
else
|
||||
variant.unit_value
|
||||
else
|
||||
|
||||
15
app/constraints/feature_toggle_constraint.rb
Normal file
15
app/constraints/feature_toggle_constraint.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class FeatureToggleConstraint
|
||||
def initialize(feature_name)
|
||||
@feature = feature_name
|
||||
end
|
||||
|
||||
def matches?(request)
|
||||
OpenFoodNetwork::FeatureToggle.enabled?(@feature, current_user(request))
|
||||
end
|
||||
|
||||
def current_user(request)
|
||||
request.env['warden'].user
|
||||
end
|
||||
end
|
||||
@@ -1,11 +0,0 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class SplitCheckoutConstraint
|
||||
def matches?(request)
|
||||
OpenFoodNetwork::FeatureToggle.enabled? :split_checkout, current_user(request)
|
||||
end
|
||||
|
||||
def current_user(request)
|
||||
request.env['warden'].user
|
||||
end
|
||||
end
|
||||
@@ -6,6 +6,7 @@ module Admin
|
||||
class EnterpriseFeesController < Admin::ResourceController
|
||||
before_action :load_enterprise_fee_set, only: :index
|
||||
before_action :load_data
|
||||
before_action :check_enterprise_fee_input, only: [:bulk_update]
|
||||
|
||||
def index
|
||||
@include_calculators = params[:include_calculators].present?
|
||||
@@ -35,13 +36,6 @@ module Admin
|
||||
end
|
||||
|
||||
def bulk_update
|
||||
@flat_percent_value = enterprise_fee_bulk_params.dig('collection_attributes', '0', 'calculator_attributes', 'preferred_flat_percent')
|
||||
|
||||
unless @flat_percent_value.nil? || Float(@flat_percent_value, exception: false)
|
||||
flash[:error] = I18n.t(:calculator_preferred_value_error)
|
||||
return redirect_to redirect_path
|
||||
end
|
||||
|
||||
@enterprise_fee_set = Sets::EnterpriseFeeSet.new(enterprise_fee_bulk_params)
|
||||
|
||||
if @enterprise_fee_set.save
|
||||
@@ -105,5 +99,25 @@ module Admin
|
||||
]
|
||||
)
|
||||
end
|
||||
|
||||
def check_enterprise_fee_input
|
||||
enterprise_fee_bulk_params['collection_attributes'].each do |_, fee_row|
|
||||
enterprise_fees = fee_row['calculator_attributes']&.slice(
|
||||
:preferred_flat_percent, :preferred_amount,
|
||||
:preferred_first_item, :preferred_additional_item,
|
||||
:preferred_minimal_amount, :preferred_normal_amount,
|
||||
:preferred_discount_amount, :preferred_per_unit
|
||||
)
|
||||
|
||||
next unless enterprise_fees
|
||||
|
||||
enterprise_fees.each do |_, enterprise_amount|
|
||||
unless enterprise_amount.nil? || Float(enterprise_amount, exception: false)
|
||||
flash[:error] = I18n.t(:calculator_preferred_value_error)
|
||||
return redirect_to redirect_path
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
7
app/controllers/admin/oidc_settings_controller.rb
Normal file
7
app/controllers/admin/oidc_settings_controller.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Admin
|
||||
class OidcSettingsController < Spree::Admin::BaseController
|
||||
def index; end
|
||||
end
|
||||
end
|
||||
@@ -43,18 +43,12 @@ module Admin
|
||||
@report_type = report_type
|
||||
@report_subtypes = report_subtypes
|
||||
@report_subtype = report_subtype
|
||||
|
||||
# Initialize data
|
||||
params[:display_summary_row] = true if request.get?
|
||||
if OpenFoodNetwork::FeatureToggle.enabled?(:report_inverse_columns_logic,
|
||||
spree_current_user)
|
||||
@params_fields_to_show = if request.get?
|
||||
@report.columns.keys
|
||||
else
|
||||
params[:fields_to_show]
|
||||
end
|
||||
end
|
||||
|
||||
@report_title = if report_subtype
|
||||
report_subtype_title
|
||||
else
|
||||
I18n.t(:name, scope: [:admin, :reports, @report_type])
|
||||
end
|
||||
@rendering_options = rendering_options
|
||||
@data = Reporting::FrontendData.new(spree_current_user)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -22,12 +22,8 @@ class BaseController < ApplicationController
|
||||
end
|
||||
|
||||
# Default to the only order cycle if there's only one
|
||||
#
|
||||
# Here we need to use @order_cycles.size not @order_cycles.count
|
||||
# because OrderCyclesList returns a modified ActiveRecord::Relation
|
||||
# and these modifications are not seen if it is reloaded with count
|
||||
def set_order_cycle
|
||||
return if @order_cycles.size != 1
|
||||
return if @order_cycles.count != 1
|
||||
|
||||
current_order(true).set_order_cycle! @order_cycles.first
|
||||
end
|
||||
|
||||
@@ -50,7 +50,9 @@ module OrderCompletion
|
||||
end
|
||||
|
||||
def order_invalid!
|
||||
Bugsnag.notify("Notice: invalid order loaded during checkout", order: @order)
|
||||
Bugsnag.notify("Notice: invalid order loaded during checkout") do |payload|
|
||||
payload.add_metadata :order, @order
|
||||
end
|
||||
|
||||
flash[:error] = t('checkout.order_not_loaded')
|
||||
redirect_to main_app.shop_path
|
||||
@@ -81,7 +83,9 @@ module OrderCompletion
|
||||
end
|
||||
|
||||
def processing_failed(error = RuntimeError.new(order_processing_error))
|
||||
Bugsnag.notify(error, order: @order)
|
||||
Bugsnag.notify(error) do |payload|
|
||||
payload.add_metadata :order, @order
|
||||
end
|
||||
flash[:error] = order_processing_error if flash.blank?
|
||||
Checkout::PostCheckoutActions.new(@order).failure
|
||||
end
|
||||
|
||||
@@ -21,7 +21,9 @@ module OrderStockCheck
|
||||
def check_order_cycle_expiry
|
||||
return unless current_order_cycle&.closed?
|
||||
|
||||
Bugsnag.notify("Notice: order cycle closed during checkout completion", order: current_order)
|
||||
Bugsnag.notify("Notice: order cycle closed during checkout completion") do |payload|
|
||||
payload.add_metadata :order, current_order
|
||||
end
|
||||
current_order.empty!
|
||||
current_order.set_order_cycle! nil
|
||||
|
||||
|
||||
@@ -39,6 +39,10 @@ module ReportsActions
|
||||
params[:report_subtype] || report_subtypes_codes.first
|
||||
end
|
||||
|
||||
def report_subtype_title
|
||||
report_subtypes.select { |_name, key| key.to_sym == report_subtype.to_sym }.first[0]
|
||||
end
|
||||
|
||||
def ransack_params
|
||||
raw_params[:q]
|
||||
end
|
||||
@@ -58,4 +62,27 @@ module ReportsActions
|
||||
def i18n_scope
|
||||
'admin.reports'
|
||||
end
|
||||
|
||||
def rendering_options
|
||||
@rendering_options ||= ReportRenderingOptions.where(
|
||||
user: spree_current_user,
|
||||
report_type: report_type,
|
||||
report_subtype: report_subtype
|
||||
).first_or_create do |new_instance|
|
||||
new_instance.options[:fields_to_show] = if @report.present?
|
||||
@report.columns.keys - @report.fields_to_hide
|
||||
else
|
||||
[]
|
||||
end
|
||||
new_instance.options[:display_summary_row] = request.get? || params[:display_summary_row].present?
|
||||
params[:display_header_row] = params[:display_header_row].present?
|
||||
end
|
||||
if params[:fields_to_show].present?
|
||||
@rendering_options.options[:fields_to_show] = params[:fields_to_show]
|
||||
end
|
||||
@rendering_options.options[:display_summary_row] = params[:display_summary_row].present?
|
||||
@rendering_options.options[:display_header_row] = params[:display_header_row].present?
|
||||
@rendering_options.save
|
||||
@rendering_options
|
||||
end
|
||||
end
|
||||
|
||||
16
app/controllers/omniauth_callbacks_controller.rb
Normal file
16
app/controllers/omniauth_callbacks_controller.rb
Normal file
@@ -0,0 +1,16 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class OmniauthCallbacksController < Devise::OmniauthCallbacksController
|
||||
def openid_connect
|
||||
spree_current_user.link_from_omniauth(request.env["omniauth.auth"])
|
||||
|
||||
redirect_to admin_oidc_settings_path
|
||||
end
|
||||
|
||||
def failure
|
||||
error_message = request.env["omniauth.error"].to_s
|
||||
flash[:error] = t("devise.oidc.failure", error: error_message)
|
||||
|
||||
super
|
||||
end
|
||||
end
|
||||
@@ -227,10 +227,10 @@ module Spree
|
||||
|
||||
def notify_bugsnag(error, product, variant)
|
||||
Bugsnag.notify(error) do |report|
|
||||
report.add_tab(:product, product.attributes)
|
||||
report.add_tab(:product_error, product.errors.first) unless product.valid?
|
||||
report.add_tab(:variant, variant.attributes)
|
||||
report.add_tab(:variant_error, variant.errors.first) unless variant.valid?
|
||||
report.add_metadata(:product, product.attributes)
|
||||
report.add_metadata(:product_error, product.errors.first) unless product.valid?
|
||||
report.add_metadata(:variant, variant.attributes)
|
||||
report.add_metadata(:variant_error, variant.errors.first) unless variant.valid?
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -95,11 +95,20 @@ module Spree
|
||||
end
|
||||
|
||||
def check_shipping_fee_input
|
||||
shipping_amount = permitted_resource_params.dig('calculator_attributes', 'preferred_amount')
|
||||
shipping_fees = permitted_resource_params['calculator_attributes']&.slice(
|
||||
:preferred_flat_percent, :preferred_amount,
|
||||
:preferred_first_item, :preferred_additional_item,
|
||||
:preferred_minimal_amount, :preferred_normal_amount,
|
||||
:preferred_discount_amount, :preferred_per_unit
|
||||
)
|
||||
|
||||
unless shipping_amount.nil? || Float(shipping_amount, exception: false)
|
||||
flash[:error] = I18n.t(:calculator_preferred_value_error)
|
||||
return redirect_to location_after_save
|
||||
return unless shipping_fees
|
||||
|
||||
shipping_fees.each do |_, shipping_amount|
|
||||
unless shipping_amount.nil? || Float(shipping_amount, exception: false)
|
||||
flash[:error] = I18n.t(:calculator_preferred_value_error)
|
||||
return redirect_to location_after_save
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -32,7 +32,7 @@ module Spree
|
||||
def load_object
|
||||
@user ||= find_user
|
||||
if @user
|
||||
authorize! params[:action].to_sym, @user
|
||||
authorize! :update, @user
|
||||
else
|
||||
redirect_to main_app.login_path
|
||||
end
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "spree/core/controller_helpers/auth"
|
||||
require "spree/core/controller_helpers/common"
|
||||
require "spree/core/controller_helpers/order"
|
||||
|
||||
module Spree
|
||||
class UserRegistrationsController < Devise::RegistrationsController
|
||||
helper 'spree/base'
|
||||
|
||||
include Spree::Core::ControllerHelpers::Auth
|
||||
include Spree::Core::ControllerHelpers::Common
|
||||
include Spree::Core::ControllerHelpers::Order
|
||||
|
||||
before_action :check_permissions, only: [:edit, :update]
|
||||
skip_before_action :require_no_authentication
|
||||
|
||||
# GET /resource/edit
|
||||
def edit
|
||||
super
|
||||
end
|
||||
|
||||
# PUT /resource
|
||||
def update
|
||||
super
|
||||
end
|
||||
|
||||
# DELETE /resource
|
||||
def destroy
|
||||
super
|
||||
end
|
||||
|
||||
# GET /resource/cancel
|
||||
# Forces the session data which is usually expired after sign
|
||||
# in to be expired now. This is useful if the user wants to
|
||||
# cancel oauth signing in/up in the middle of the process,
|
||||
# removing all OAuth session data.
|
||||
def cancel
|
||||
super
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def check_permissions
|
||||
authorize!(:create, resource)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,13 +1,23 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'open_food_network/error_logger'
|
||||
require "spree/core/controller_helpers/auth"
|
||||
require "spree/core/controller_helpers/common"
|
||||
require "spree/core/controller_helpers/order"
|
||||
|
||||
class UserRegistrationsController < Spree::UserRegistrationsController
|
||||
class UserRegistrationsController < Devise::RegistrationsController
|
||||
I18N_SCOPE = 'devise.user_registrations.spree_user'
|
||||
|
||||
before_action :set_checkout_redirect, only: :create
|
||||
helper 'spree/base'
|
||||
|
||||
include Spree::Core::ControllerHelpers::Auth
|
||||
include Spree::Core::ControllerHelpers::Common
|
||||
include Spree::Core::ControllerHelpers::Order
|
||||
include I18nHelper
|
||||
|
||||
skip_before_action :require_no_authentication
|
||||
|
||||
before_action :set_checkout_redirect, only: :create
|
||||
before_action :set_locale
|
||||
|
||||
# POST /resource/sign_up
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'open_food_network/available_payment_method_filter'
|
||||
|
||||
module EnterprisesHelper
|
||||
def current_distributor
|
||||
@current_distributor ||= current_order(false)&.distributor
|
||||
@@ -18,18 +16,7 @@ module EnterprisesHelper
|
||||
end
|
||||
|
||||
def available_payment_methods
|
||||
return [] if current_distributor.blank?
|
||||
|
||||
payment_methods = current_distributor.payment_methods.available(:both).to_a
|
||||
|
||||
filter = OpenFoodNetwork::AvailablePaymentMethodFilter.new
|
||||
filter.filter!(payment_methods)
|
||||
|
||||
applicator = OpenFoodNetwork::TagRuleApplicator.new(current_distributor,
|
||||
"FilterPaymentMethods", current_customer&.tag_list)
|
||||
applicator.filter!(payment_methods)
|
||||
|
||||
payment_methods
|
||||
OrderAvailablePaymentMethods.new(current_order, current_customer).to_a
|
||||
end
|
||||
|
||||
def managed_enterprises
|
||||
|
||||
@@ -55,7 +55,9 @@ class SubscriptionConfirmJob < ActiveJob::Base
|
||||
if order.errors.any?
|
||||
send_failed_payment_email(order)
|
||||
else
|
||||
Bugsnag.notify(e, order: order)
|
||||
Bugsnag.notify(e) do |payload|
|
||||
payload.add_metadata :order, order
|
||||
end
|
||||
send_failed_payment_email(order, e.message)
|
||||
end
|
||||
end
|
||||
@@ -106,6 +108,9 @@ class SubscriptionConfirmJob < ActiveJob::Base
|
||||
record_and_log_error(:failed_payment, order, error_message)
|
||||
SubscriptionMailer.failed_payment_email(order).deliver_now
|
||||
rescue StandardError => e
|
||||
Bugsnag.notify(e, order: order, error_message: error_message)
|
||||
Bugsnag.notify(e) do |payload|
|
||||
payload.add_metadata :order, order
|
||||
payload.add_metadata :error_message, error_message
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -9,9 +9,9 @@ module PaymentMethodDistributors
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
included do
|
||||
has_and_belongs_to_many :distributors, join_table: 'distributors_payment_methods',
|
||||
class_name: 'Enterprise',
|
||||
foreign_key: 'payment_method_id',
|
||||
association_foreign_key: 'distributor_id'
|
||||
has_many :distributor_payment_methods, dependent: :destroy
|
||||
has_many :distributors, through: :distributor_payment_methods,
|
||||
class_name: 'Enterprise',
|
||||
foreign_key: 'distributor_id'
|
||||
end
|
||||
end
|
||||
|
||||
@@ -6,20 +6,12 @@ module ProductStock
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
def on_demand
|
||||
if variants?
|
||||
raise 'Cannot determine product on_demand value of product with multiple variants' if variants.size > 1
|
||||
raise 'Cannot determine product on_demand value of product with multiple variants' if variants.size > 1
|
||||
|
||||
variants.first.on_demand
|
||||
else
|
||||
master.on_demand
|
||||
end
|
||||
variants.first.on_demand
|
||||
end
|
||||
|
||||
def on_hand
|
||||
if variants?
|
||||
variants.map(&:on_hand).reduce(:+)
|
||||
else
|
||||
master.on_hand
|
||||
end
|
||||
variants.map(&:on_hand).reduce(:+)
|
||||
end
|
||||
end
|
||||
|
||||
7
app/models/distributor_payment_method.rb
Normal file
7
app/models/distributor_payment_method.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class DistributorPaymentMethod < ApplicationRecord
|
||||
self.table_name = "distributors_payment_methods"
|
||||
belongs_to :payment_method, class_name: "Spree::PaymentMethod", touch: true
|
||||
belongs_to :distributor, class_name: "Enterprise", touch: true
|
||||
end
|
||||
@@ -16,19 +16,6 @@ class Enterprise < ApplicationRecord
|
||||
large: { resize_to_fill: [1200, 260] },
|
||||
}.freeze
|
||||
|
||||
self.ignored_columns = %i(terms_and_conditions_file_name
|
||||
terms_and_conditions_content_type
|
||||
terms_and_conditions_file_size
|
||||
terms_and_conditions_updated_at
|
||||
logo_file_name
|
||||
logo_content_type
|
||||
logo_file_size
|
||||
logo_updated_at
|
||||
promo_image_file_name
|
||||
promo_image_content_type
|
||||
promo_image_file_size
|
||||
promo_image_updated_at)
|
||||
|
||||
searchable_attributes :sells, :is_primary_producer
|
||||
searchable_associations :properties
|
||||
searchable_scopes :is_primary_producer, :is_distributor, :is_hub, :activated, :visible,
|
||||
@@ -69,10 +56,9 @@ class Enterprise < ApplicationRecord
|
||||
has_many :users, through: :enterprise_roles
|
||||
belongs_to :owner, class_name: 'Spree::User',
|
||||
inverse_of: :owned_enterprises
|
||||
has_and_belongs_to_many :payment_methods, join_table: 'distributors_payment_methods',
|
||||
class_name: 'Spree::PaymentMethod',
|
||||
foreign_key: 'distributor_id'
|
||||
has_many :distributor_payment_methods, foreign_key: :distributor_id
|
||||
has_many :distributor_shipping_methods, foreign_key: :distributor_id
|
||||
has_many :payment_methods, through: :distributor_payment_methods
|
||||
has_many :shipping_methods, through: :distributor_shipping_methods
|
||||
has_many :customers
|
||||
has_many :inventory_items
|
||||
@@ -210,15 +196,14 @@ class Enterprise < ApplicationRecord
|
||||
joins(:enterprise_roles).where('enterprise_roles.user_id = ?', user.id)
|
||||
end
|
||||
}
|
||||
scope :relatives_of_one_union_others, lambda { |one, others|
|
||||
|
||||
scope :parents_of_one_union_others, lambda { |one, others|
|
||||
where("
|
||||
enterprises.id IN
|
||||
(SELECT child_id FROM enterprise_relationships WHERE enterprise_relationships.parent_id=?)
|
||||
OR enterprises.id IN
|
||||
(SELECT parent_id FROM enterprise_relationships WHERE enterprise_relationships.child_id=?)
|
||||
OR enterprises.id IN
|
||||
(?)
|
||||
", one, one, others)
|
||||
", one, others)
|
||||
}
|
||||
|
||||
def business_address_empty?(attributes)
|
||||
@@ -273,9 +258,9 @@ class Enterprise < ApplicationRecord
|
||||
", id, id)
|
||||
end
|
||||
|
||||
def plus_relatives_and_oc_producers(order_cycles)
|
||||
def plus_parents_and_order_cycle_producers(order_cycles)
|
||||
oc_producer_ids = Exchange.in_order_cycle(order_cycles).incoming.pluck :sender_id
|
||||
Enterprise.not_hidden.is_primary_producer.relatives_of_one_union_others(id, oc_producer_ids | [id])
|
||||
Enterprise.not_hidden.is_primary_producer.parents_of_one_union_others(id, oc_producer_ids | [id])
|
||||
end
|
||||
|
||||
def relatives_including_self
|
||||
@@ -401,7 +386,7 @@ class Enterprise < ApplicationRecord
|
||||
end
|
||||
|
||||
def ready_for_checkout?
|
||||
shipping_methods.frontend.any? && payment_methods.available.any?
|
||||
shipping_methods.frontend.any? && payment_methods.available.any?(&:configured?)
|
||||
end
|
||||
|
||||
def self.find_available_permalink(test_permalink)
|
||||
|
||||
@@ -5,15 +5,6 @@ require 'open_food_network/locking'
|
||||
class EnterpriseGroup < ApplicationRecord
|
||||
include PermalinkGenerator
|
||||
|
||||
self.ignored_columns = %i(logo_file_name
|
||||
logo_content_type
|
||||
logo_file_size
|
||||
logo_updated_at
|
||||
promo_image_file_name
|
||||
promo_image_content_type
|
||||
promo_image_file_size
|
||||
promo_image_updated_at)
|
||||
|
||||
acts_as_list
|
||||
|
||||
has_and_belongs_to_many :enterprises, join_table: 'enterprise_groups_enterprises'
|
||||
|
||||
@@ -24,6 +24,9 @@ class OrderCycle < ApplicationRecord
|
||||
has_many :distributors, -> { distinct }, source: :receiver, through: :cached_outgoing_exchanges
|
||||
has_many :order_cycle_schedules
|
||||
has_many :schedules, through: :order_cycle_schedules
|
||||
has_and_belongs_to_many :selected_distributor_payment_methods,
|
||||
class_name: 'DistributorPaymentMethod',
|
||||
join_table: 'order_cycles_distributor_payment_methods'
|
||||
has_and_belongs_to_many :selected_distributor_shipping_methods,
|
||||
class_name: 'DistributorShippingMethod',
|
||||
join_table: 'order_cycles_distributor_shipping_methods'
|
||||
@@ -152,12 +155,10 @@ class OrderCycle < ApplicationRecord
|
||||
]
|
||||
end
|
||||
|
||||
def attachable_payment_methods
|
||||
Spree::PaymentMethod.available(:both).
|
||||
joins("INNER JOIN distributors_payment_methods
|
||||
ON payment_method_id = spree_payment_methods.id").
|
||||
where("distributor_id IN (?)", distributor_ids).
|
||||
distinct
|
||||
def attachable_distributor_payment_methods
|
||||
DistributorPaymentMethod.joins(:payment_method).
|
||||
merge(Spree::PaymentMethod.available).
|
||||
where("distributor_id IN (?)", distributor_ids)
|
||||
end
|
||||
|
||||
def attachable_distributor_shipping_methods
|
||||
@@ -167,21 +168,7 @@ class OrderCycle < ApplicationRecord
|
||||
end
|
||||
|
||||
def clone!
|
||||
oc = dup
|
||||
oc.name = I18n.t("models.order_cycle.cloned_order_cycle_name", order_cycle: oc.name)
|
||||
oc.orders_open_at = oc.orders_close_at = oc.mails_sent = oc.processed_at = nil
|
||||
oc.coordinator_fee_ids = coordinator_fee_ids
|
||||
# rubocop:disable Layout/LineLength
|
||||
oc.preferred_product_selection_from_coordinator_inventory_only = preferred_product_selection_from_coordinator_inventory_only
|
||||
# rubocop:enable Layout/LineLength
|
||||
oc.schedule_ids = schedule_ids
|
||||
oc.save!
|
||||
exchanges.each { |e| e.clone!(oc) }
|
||||
oc.selected_distributor_shipping_method_ids = (
|
||||
attachable_distributor_shipping_methods.map(&:id) & selected_distributor_shipping_method_ids
|
||||
)
|
||||
sync_subscriptions
|
||||
oc.reload
|
||||
OrderCycleClone.new(self).create
|
||||
end
|
||||
|
||||
def variants
|
||||
@@ -293,6 +280,18 @@ class OrderCycle < ApplicationRecord
|
||||
items.each { |li| scoper.scope(li.variant) }
|
||||
end
|
||||
|
||||
def distributor_payment_methods
|
||||
if simple? || selected_distributor_payment_methods.none?
|
||||
attachable_distributor_payment_methods
|
||||
else
|
||||
attachable_distributor_payment_methods.where(
|
||||
"distributors_payment_methods.id IN (?) OR distributor_id NOT IN (?)",
|
||||
selected_distributor_payment_methods.map(&:id),
|
||||
selected_distributor_payment_methods.map(&:distributor_id)
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
def distributor_shipping_methods
|
||||
if simple? || selected_distributor_shipping_methods.none?
|
||||
attachable_distributor_shipping_methods
|
||||
|
||||
@@ -299,7 +299,7 @@ module ProductImport
|
||||
entry.public_send("#{type}_category_id=", index[category])
|
||||
else
|
||||
mark_as_invalid(entry, attribute: "#{type}_category",
|
||||
error: I18n.t('admin.product_import.model.not_found'))
|
||||
error: I18n.t('admin.product_import.model.category_not_found'))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ module ProductImport
|
||||
|
||||
def invalid_attributes
|
||||
invalid_attrs = {}
|
||||
errors = @product_validations ? self.errors.messages.merge(@product_validations.messages) : self.errors.messages
|
||||
errors = @product_validations ? @product_validations.messages.merge(self.errors.messages) : self.errors.messages
|
||||
errors.each do |attr, message|
|
||||
invalid_attrs[attr.to_s] = "#{attr.to_s.capitalize} #{message.first}"
|
||||
end
|
||||
|
||||
@@ -54,7 +54,7 @@ module ProductImport
|
||||
end
|
||||
|
||||
def assign_weight_or_volume_attributes
|
||||
units = @attrs['units'].to_f
|
||||
units = @attrs['units'].to_d
|
||||
unit_type = @attrs['unit_type'].to_s.downcase
|
||||
|
||||
return unless valid_unit_type? unit_type
|
||||
|
||||
4
app/models/report_rendering_options.rb
Normal file
4
app/models/report_rendering_options.rb
Normal file
@@ -0,0 +1,4 @@
|
||||
class ReportRenderingOptions < ApplicationRecord
|
||||
belongs_to :user, class_name: "Spree::User"
|
||||
serialize :options, Hash
|
||||
end
|
||||
@@ -177,6 +177,8 @@ module Spree
|
||||
end
|
||||
|
||||
can [:admin, :create], :manager_invitation
|
||||
|
||||
can [:admin, :index], :oidc_setting
|
||||
end
|
||||
|
||||
def add_product_management_abilities(user)
|
||||
|
||||
@@ -29,12 +29,7 @@ module Spree
|
||||
delegate :name, to: :state, prefix: true, allow_nil: true
|
||||
|
||||
def self.default
|
||||
country = begin
|
||||
DefaultCountry.country
|
||||
rescue StandardError
|
||||
Spree::Country.first
|
||||
end
|
||||
new(country: country)
|
||||
new(country: DefaultCountry.country)
|
||||
end
|
||||
|
||||
def full_name
|
||||
|
||||
@@ -6,6 +6,12 @@ module Spree
|
||||
|
||||
validates :name, :iso_name, presence: true
|
||||
|
||||
def self.cached_find_by(attrs)
|
||||
Rails.cache.fetch("countries/#{attrs.hash}", expires_in: 1.hour) do
|
||||
find_by(attrs)
|
||||
end
|
||||
end
|
||||
|
||||
def <=>(other)
|
||||
name <=> other.name
|
||||
end
|
||||
|
||||
@@ -9,13 +9,6 @@ module Spree
|
||||
large: { resize_to_limit: [600, 600] },
|
||||
}.freeze
|
||||
|
||||
self.ignored_columns = %i(attachment_file_name
|
||||
attachment_content_type
|
||||
attachment_file_size
|
||||
attachment_updated_at
|
||||
attachment_width
|
||||
attachment_height)
|
||||
|
||||
has_one_attached :attachment
|
||||
|
||||
validates :attachment, attached: true, content_type: %r{\Aimage/(png|jpeg|gif|jpg|svg\+xml|webp)\Z}
|
||||
|
||||
@@ -28,6 +28,7 @@ module Spree
|
||||
before_validation :adjust_quantity
|
||||
before_validation :copy_price
|
||||
before_validation :copy_tax_category
|
||||
before_validation :copy_dimensions
|
||||
|
||||
validates :variant, presence: true
|
||||
validates :quantity, numericality: {
|
||||
@@ -122,6 +123,15 @@ module Spree
|
||||
self.tax_category = variant.product.tax_category
|
||||
end
|
||||
|
||||
def copy_dimensions
|
||||
return unless variant
|
||||
|
||||
self.weight ||= computed_weight_from_variant
|
||||
self.height ||= variant.height
|
||||
self.width ||= variant.width
|
||||
self.depth ||= variant.depth
|
||||
end
|
||||
|
||||
def amount
|
||||
price * quantity
|
||||
end
|
||||
@@ -226,6 +236,14 @@ module Spree
|
||||
|
||||
private
|
||||
|
||||
def computed_weight_from_variant
|
||||
if variant.product.variant_unit == "weight"
|
||||
variant.unit_value / variant.product.variant_unit_scale
|
||||
else
|
||||
variant.weight
|
||||
end
|
||||
end
|
||||
|
||||
def update_inventory
|
||||
return unless changed?
|
||||
|
||||
|
||||
@@ -376,10 +376,6 @@ module Spree
|
||||
payment_state == 'paid' || payment_state == 'credit_owed'
|
||||
end
|
||||
|
||||
def available_payment_methods
|
||||
@available_payment_methods ||= PaymentMethod.available(:both)
|
||||
end
|
||||
|
||||
# "Checkout" is the initial state and, for card payments, "pending" is the state after auth
|
||||
# These are both valid states to process the payment
|
||||
def pending_payments
|
||||
@@ -540,9 +536,9 @@ module Spree
|
||||
# And the shipping fee is already up-to-date when this error occurs.
|
||||
# https://github.com/openfoodfoundation/openfoodnetwork/issues/3924
|
||||
Bugsnag.notify(e) do |report|
|
||||
report.add_tab(:order, attributes)
|
||||
report.add_tab(:shipment, shipment.attributes)
|
||||
report.add_tab(:shipment_in_db, Spree::Shipment.find_by(id: shipment.id).attributes)
|
||||
report.add_metadata(:order, attributes)
|
||||
report.add_metadata(:shipment, shipment.attributes)
|
||||
report.add_metadata(:shipment_in_db, Spree::Shipment.find_by(id: shipment.id).attributes)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@ module Spree
|
||||
|
||||
after_initialize :init
|
||||
|
||||
scope :inactive_or_backend, -> { where("active = false OR display_on = 'back_end'") }
|
||||
|
||||
scope :production, -> { where(environment: 'production') }
|
||||
|
||||
scope :managed_by, lambda { |user|
|
||||
@@ -57,6 +59,10 @@ module Spree
|
||||
Rails.application.config.spree.payment_methods
|
||||
end
|
||||
|
||||
def configured?
|
||||
!stripe? || stripe_configured?
|
||||
end
|
||||
|
||||
def provider_class
|
||||
raise 'You must implement provider_class method for this gateway.'
|
||||
end
|
||||
@@ -71,6 +77,10 @@ module Spree
|
||||
nil
|
||||
end
|
||||
|
||||
def frontend?
|
||||
active? && display_on != "back_end"
|
||||
end
|
||||
|
||||
# The class that will process payments for this payment type, used for @payment.source
|
||||
# e.g. CreditCard in the case of a the Gateway payment type
|
||||
# nil means the payment method doesn't require a source e.g. check
|
||||
@@ -120,5 +130,17 @@ module Spree
|
||||
def distributor_validation
|
||||
validates_with DistributorsValidator
|
||||
end
|
||||
|
||||
def stripe?
|
||||
type.ends_with?("StripeSCA")
|
||||
end
|
||||
|
||||
def stripe_configured?
|
||||
Spree::Config.stripe_connect_enabled &&
|
||||
Stripe.publishable_key &&
|
||||
preferred_enterprise_id.present? &&
|
||||
preferred_enterprise_id > 0 &&
|
||||
stripe_account_id.present?
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -251,11 +251,6 @@ module Spree
|
||||
permalink.present? ? permalink : (permalink_was || UrlGenerator.to_url(name))
|
||||
end
|
||||
|
||||
# the master variant is not a member of the variants array
|
||||
def variants?
|
||||
variants.any?
|
||||
end
|
||||
|
||||
def tax_category
|
||||
if self[:tax_category_id].nil?
|
||||
TaxCategory.find_by(is_default: true)
|
||||
|
||||
@@ -7,8 +7,10 @@ module Spree
|
||||
searchable_attributes :email
|
||||
|
||||
devise :database_authenticatable, :token_authenticatable, :registerable, :recoverable,
|
||||
:rememberable, :trackable, :validatable,
|
||||
:encryptable, :confirmable, encryptor: 'authlogic_sha512', reconfirmable: true
|
||||
:rememberable, :trackable, :validatable, :omniauthable,
|
||||
:encryptable, :confirmable,
|
||||
encryptor: 'authlogic_sha512', reconfirmable: true,
|
||||
omniauth_providers: [:openid_connect]
|
||||
|
||||
has_many :orders
|
||||
belongs_to :ship_address, class_name: 'Spree::Address'
|
||||
@@ -44,6 +46,8 @@ module Spree
|
||||
after_create :associate_customers, :associate_orders
|
||||
|
||||
validate :limit_owned_enterprises
|
||||
validates :uid, uniqueness: true, if: lambda { uid.present? }
|
||||
validates_email :uid, if: lambda { uid.present? }
|
||||
|
||||
class DestroyWithOrdersError < StandardError; end
|
||||
|
||||
@@ -51,6 +55,10 @@ module Spree
|
||||
User.admin.count > 0
|
||||
end
|
||||
|
||||
def link_from_omniauth(auth)
|
||||
update!(provider: auth.provider, uid: auth.uid)
|
||||
end
|
||||
|
||||
# Whether a user has a role or not.
|
||||
def has_spree_role?(role_in_question)
|
||||
spree_roles.where(name: role_in_question.to_s).any?
|
||||
|
||||
@@ -5,11 +5,6 @@ class TermsOfServiceFile < ApplicationRecord
|
||||
|
||||
validates :attachment, attached: true
|
||||
|
||||
self.ignored_columns = %i(attachment_file_name
|
||||
attachment_content_type
|
||||
attachment_file_size
|
||||
attachment_updated_at)
|
||||
|
||||
# The most recently uploaded file is the current one.
|
||||
def self.current
|
||||
order(:id).last
|
||||
|
||||
@@ -54,7 +54,7 @@ module Api
|
||||
|
||||
def producers
|
||||
ActiveModel::ArraySerializer.new(
|
||||
enterprise.plus_relatives_and_oc_producers(
|
||||
enterprise.plus_parents_and_order_cycle_producers(
|
||||
OrderCycle.not_closed.with_distributor(enterprise)
|
||||
),
|
||||
each_serializer: Api::EnterpriseThinSerializer
|
||||
|
||||
@@ -10,6 +10,6 @@ class DefaultCountry
|
||||
end
|
||||
|
||||
def self.country
|
||||
Spree::Country.find_by(iso: ENV["DEFAULT_COUNTRY_CODE"]) || Spree::Country.first
|
||||
Spree::Country.cached_find_by(iso: ENV["DEFAULT_COUNTRY_CODE"]) || Spree::Country.first
|
||||
end
|
||||
end
|
||||
|
||||
@@ -5,17 +5,6 @@
|
||||
class DefaultStockLocation
|
||||
NAME = 'default'
|
||||
|
||||
def self.create!
|
||||
country = Spree::Country.find_by(iso: ENV['DEFAULT_COUNTRY_CODE'])
|
||||
state = country.states.first
|
||||
Spree::StockLocation.create!(name: NAME, country_id: country.id, state_id: state.id,
|
||||
backorderable_default: false)
|
||||
end
|
||||
|
||||
def self.destroy_all
|
||||
Spree::StockLocation.where(name: NAME).destroy_all
|
||||
end
|
||||
|
||||
def self.find_or_create
|
||||
Spree::StockLocation.find_or_create_by(name: NAME)
|
||||
end
|
||||
|
||||
37
app/services/order_available_payment_methods.rb
Normal file
37
app/services/order_available_payment_methods.rb
Normal file
@@ -0,0 +1,37 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class OrderAvailablePaymentMethods
|
||||
attr_reader :order, :customer
|
||||
|
||||
delegate :distributor,
|
||||
:order_cycle,
|
||||
to: :order
|
||||
|
||||
def initialize(order, customer = nil)
|
||||
@order, @customer = order, customer
|
||||
end
|
||||
|
||||
def to_a
|
||||
return [] if distributor.blank?
|
||||
|
||||
payment_methods = payment_methods_before_tag_rules_applied
|
||||
|
||||
applicator = OpenFoodNetwork::TagRuleApplicator.new(distributor,
|
||||
"FilterPaymentMethods", customer&.tag_list)
|
||||
applicator.filter!(payment_methods)
|
||||
|
||||
payment_methods.uniq
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def payment_methods_before_tag_rules_applied
|
||||
if order_cycle.nil? || order_cycle.simple?
|
||||
distributor.payment_methods
|
||||
else
|
||||
distributor.payment_methods.where(
|
||||
id: order_cycle.distributor_payment_methods.select(:payment_method_id)
|
||||
)
|
||||
end.available.select(&:configured?)
|
||||
end
|
||||
end
|
||||
45
app/services/order_cycle_clone.rb
Normal file
45
app/services/order_cycle_clone.rb
Normal file
@@ -0,0 +1,45 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'order_management/subscriptions/proxy_order_syncer'
|
||||
|
||||
class OrderCycleClone
|
||||
def initialize(order_cycle)
|
||||
@original_order_cycle = order_cycle
|
||||
end
|
||||
|
||||
def create
|
||||
oc = @original_order_cycle.dup
|
||||
oc.name = I18n.t("models.order_cycle.cloned_order_cycle_name", order_cycle: oc.name)
|
||||
oc.orders_open_at = oc.orders_close_at = oc.mails_sent = oc.processed_at = nil
|
||||
oc.coordinator_fee_ids = @original_order_cycle.coordinator_fee_ids
|
||||
oc.preferred_product_selection_from_coordinator_inventory_only =
|
||||
@original_order_cycle.preferred_product_selection_from_coordinator_inventory_only
|
||||
oc.schedule_ids = @original_order_cycle.schedule_ids
|
||||
oc.save!
|
||||
@original_order_cycle.exchanges.each { |e| e.clone!(oc) }
|
||||
oc.selected_distributor_payment_method_ids = selected_distributor_payment_method_ids
|
||||
oc.selected_distributor_shipping_method_ids = selected_distributor_shipping_method_ids
|
||||
sync_subscriptions
|
||||
oc.reload
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def selected_distributor_payment_method_ids
|
||||
@original_order_cycle.attachable_distributor_payment_methods.map(&:id) &
|
||||
@original_order_cycle.selected_distributor_payment_method_ids
|
||||
end
|
||||
|
||||
def selected_distributor_shipping_method_ids
|
||||
@original_order_cycle.attachable_distributor_shipping_methods.map(&:id) &
|
||||
@original_order_cycle.selected_distributor_shipping_method_ids
|
||||
end
|
||||
|
||||
def sync_subscriptions
|
||||
return unless @original_order_cycle.schedule_ids.any?
|
||||
|
||||
OrderManagement::Subscriptions::ProxyOrderSyncer.new(
|
||||
Subscription.where(schedule_id: @original_order_cycle.schedule_ids)
|
||||
).sync!
|
||||
end
|
||||
end
|
||||
@@ -12,6 +12,9 @@ class OrderCycleForm
|
||||
@user = user
|
||||
@permissions = OpenFoodNetwork::Permissions.new(user)
|
||||
@schedule_ids = order_cycle_params.delete(:schedule_ids)
|
||||
@selected_distributor_payment_method_ids = order_cycle_params.delete(
|
||||
:selected_distributor_payment_method_ids
|
||||
)
|
||||
@selected_distributor_shipping_method_ids = order_cycle_params.delete(
|
||||
:selected_distributor_shipping_method_ids
|
||||
)
|
||||
@@ -27,6 +30,7 @@ class OrderCycleForm
|
||||
order_cycle.schedule_ids = schedule_ids if parameter_specified?(:schedule_ids)
|
||||
order_cycle.save!
|
||||
apply_exchange_changes
|
||||
attach_selected_distributor_payment_methods
|
||||
attach_selected_distributor_shipping_methods
|
||||
sync_subscriptions
|
||||
true
|
||||
@@ -49,16 +53,29 @@ class OrderCycleForm
|
||||
return if exchanges_unchanged?
|
||||
|
||||
OpenFoodNetwork::OrderCycleFormApplicator.new(order_cycle, user).go!
|
||||
|
||||
# reload so outgoing exchanges are up-to-date for shipping/payment method validations
|
||||
order_cycle.reload
|
||||
end
|
||||
|
||||
def attach_selected_distributor_payment_methods
|
||||
return if @selected_distributor_payment_method_ids.nil?
|
||||
|
||||
order_cycle.selected_distributor_payment_method_ids = selected_distributor_payment_method_ids
|
||||
order_cycle.save!
|
||||
end
|
||||
|
||||
def attach_selected_distributor_shipping_methods
|
||||
return if @selected_distributor_shipping_method_ids.nil?
|
||||
|
||||
order_cycle.reload # so outgoing exchanges are up-to-date for shipping method validations
|
||||
order_cycle.selected_distributor_shipping_method_ids = selected_distributor_shipping_method_ids
|
||||
order_cycle.save!
|
||||
end
|
||||
|
||||
def attachable_distributor_payment_method_ids
|
||||
@attachable_distributor_payment_method_ids ||= order_cycle.attachable_distributor_payment_methods.map(&:id)
|
||||
end
|
||||
|
||||
def attachable_distributor_shipping_method_ids
|
||||
@attachable_distributor_shipping_method_ids ||= order_cycle.attachable_distributor_shipping_methods.map(&:id)
|
||||
end
|
||||
@@ -69,6 +86,19 @@ class OrderCycleForm
|
||||
end
|
||||
end
|
||||
|
||||
def selected_distributor_payment_method_ids
|
||||
@selected_distributor_payment_method_ids = (
|
||||
attachable_distributor_payment_method_ids &
|
||||
@selected_distributor_payment_method_ids.reject(&:blank?).map(&:to_i)
|
||||
)
|
||||
|
||||
if attachable_distributor_payment_method_ids.sort == @selected_distributor_payment_method_ids.sort
|
||||
@selected_distributor_payment_method_ids = []
|
||||
end
|
||||
|
||||
@selected_distributor_payment_method_ids
|
||||
end
|
||||
|
||||
def selected_distributor_shipping_method_ids
|
||||
@selected_distributor_shipping_method_ids = (
|
||||
attachable_distributor_shipping_method_ids &
|
||||
|
||||
@@ -17,7 +17,8 @@ module PermittedAttributes
|
||||
:name, :orders_open_at, :orders_close_at, :coordinator_id,
|
||||
:preferred_product_selection_from_coordinator_inventory_only,
|
||||
:automatic_notifications,
|
||||
{ schedule_ids: [], selected_distributor_shipping_method_ids: [], coordinator_fee_ids: [] }
|
||||
{ schedule_ids: [], selected_distributor_payment_method_ids: [],
|
||||
selected_distributor_shipping_method_ids: [], coordinator_fee_ids: [] }
|
||||
]
|
||||
end
|
||||
|
||||
|
||||
@@ -24,7 +24,9 @@ class PlaceProxyOrder
|
||||
send_placement_email
|
||||
rescue StandardError => e
|
||||
summarizer.record_and_log_error(:processing, order, e.message)
|
||||
Bugsnag.notify(e, order: order)
|
||||
Bugsnag.notify(e) do |payload|
|
||||
payload.add_metadata :order, order
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
@@ -54,7 +56,10 @@ class PlaceProxyOrder
|
||||
|
||||
true
|
||||
rescue StandardError => e
|
||||
Bugsnag.notify(e, subscription: subscription, proxy_order: proxy_order)
|
||||
Bugsnag.notify(e) do |payload|
|
||||
payload.add_metadata :subscription, subscription
|
||||
payload.add_metadata :proxy_order, proxy_order
|
||||
end
|
||||
false
|
||||
end
|
||||
|
||||
|
||||
@@ -132,11 +132,11 @@ module Sets
|
||||
|
||||
def notify_bugsnag(error, product, variant, variant_attributes)
|
||||
Bugsnag.notify(error) do |report|
|
||||
report.add_tab(:product, product.attributes)
|
||||
report.add_tab(:product_error, product.errors.first) unless product.valid?
|
||||
report.add_tab(:variant_attributes, variant_attributes)
|
||||
report.add_tab(:variant, variant.attributes)
|
||||
report.add_tab(:variant_error, variant.errors.first) unless variant.valid?
|
||||
report.add_metadata(:product, product.attributes)
|
||||
report.add_metadata(:product_error, product.errors.first) unless product.valid?
|
||||
report.add_metadata(:variant_attributes, variant_attributes)
|
||||
report.add_metadata(:variant, variant.attributes)
|
||||
report.add_metadata(:variant_error, variant.errors.first) unless variant.valid?
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -8,9 +8,11 @@ module Shop
|
||||
end
|
||||
|
||||
def self.ready_for_checkout_for(distributor, customer)
|
||||
return OrderCycle.none unless distributor.ready_for_checkout?
|
||||
|
||||
new(distributor, customer).call
|
||||
new(distributor, customer).call.select do |order_cycle|
|
||||
order = Spree::Order.new(distributor: distributor, order_cycle: order_cycle)
|
||||
OrderAvailablePaymentMethods.new(order, customer).to_a.any? &&
|
||||
OrderAvailableShippingMethods.new(order, customer).to_a.any?
|
||||
end
|
||||
end
|
||||
|
||||
def initialize(distributor, customer)
|
||||
|
||||
@@ -5,12 +5,6 @@
|
||||
%legend= t(".#{ item[:name] }.legend")
|
||||
= render "admin/enterprises/form/#{ item[:form_name] || item[:name] }", f: f
|
||||
|
||||
- when 'address'
|
||||
= f.fields_for :address do |af|
|
||||
%fieldset.alpha.no-border-bottom{ id: "#{item[:name]}_panel", data: { "tabs-and-panels-target": "panel" }}
|
||||
%legend= t(".#{ item[:name] }.legend")
|
||||
= render 'admin/enterprises/form/address', af: af
|
||||
|
||||
- when 'enterprise_permissions'
|
||||
%fieldset.alpha.no-border-bottom{ id: "#{item[:name]}_panel", data: { "tabs-and-panels-target": "panel" }}
|
||||
%legend= t(".#{ item[:name] }.legend")
|
||||
|
||||
@@ -87,16 +87,16 @@
|
||||
= af.text_field :city, { placeholder: t(:city_placeholder)}
|
||||
.five.columns.omega
|
||||
= af.text_field :zipcode, { placeholder: t(:postcode_placeholder)}
|
||||
%div{"data-controller": "dependant-select", "data-dependant-select-options-value": countries_with_states }
|
||||
%div{"data-controller": "dependent-select", "data-dependent-select-options-value": countries_with_states }
|
||||
.row
|
||||
.three.columns.alpha
|
||||
= af.label :state_id, t(:state)
|
||||
\/
|
||||
= af.label :country_id, t(:country)
|
||||
.four.columns
|
||||
= af.select :country_id, available_countries.map { |c| [c.name, c.id] }, {}, { "data-controller": "tom-select", "data-dependant-select-target": "source", "data-action": "dependant-select#handleSelectChange", class: "primary" }
|
||||
= af.select :country_id, available_countries.map { |c| [c.name, c.id] }, {}, { "data-controller": "tom-select", "data-dependent-select-target": "source", "data-action": "dependent-select#handleSelectChange", class: "primary" }
|
||||
.five.columns.omega
|
||||
= af.select :state_id, @enterprise.address.country.states.map { |s| [s.name, s.id] }, {}, { "data-controller": "tom-select", "data-dependant-select-target": "select", class: "primary" }
|
||||
= af.select :state_id, @enterprise.address.country.states.map { |s| [s.name, s.id] }, {}, { "data-controller": "tom-select", "data-dependent-select-target": "select", class: "primary" }
|
||||
.row
|
||||
.three.columns.alpha
|
||||
= af.label :latitude, t(:latitude)
|
||||
|
||||
@@ -1,54 +1,55 @@
|
||||
-# redo denoting required fields in the whole project
|
||||
.row
|
||||
= t(:required_fields)
|
||||
(
|
||||
%span.required *
|
||||
)
|
||||
.row
|
||||
.three.columns.alpha
|
||||
= af.label :address1, t(:address)
|
||||
= f.fields_for :address do |af|
|
||||
.row
|
||||
= t(:required_fields)
|
||||
(
|
||||
%span.required *
|
||||
.eight.columns.omega
|
||||
= af.text_field :address1, { placeholder: t(:address_placeholder) }
|
||||
.row
|
||||
.alpha.three.columns
|
||||
= af.label :address2, t(:address2)
|
||||
.eight.columns.omega
|
||||
= af.text_field :address2
|
||||
.row
|
||||
.three.columns.alpha
|
||||
= af.label :city, t(:city)
|
||||
\/
|
||||
= af.label :zipcode, t(:postcode)
|
||||
%span.required *
|
||||
.four.columns
|
||||
= af.text_field :city, { placeholder: t(:city_placeholder) }
|
||||
.four.columns.omega
|
||||
= af.text_field :zipcode, { placeholder: t(:postcode_placeholder) }
|
||||
.row{"data-controller": "dependent-select", "data-dependent-select-options-value": countries_with_states }
|
||||
.three.columns.alpha
|
||||
= af.label :state_id, t(:state)
|
||||
\/
|
||||
= af.label :country_id, t(:country)
|
||||
%span.required *
|
||||
.four.columns
|
||||
= af.select :state_id, @enterprise.address.country.states.map { |s| [s.name, s.id] }, {}, { "data-controller": "tom-select", "data-dependent-select-target": "select", class: "primary" }
|
||||
.four.columns.omega{ data: { controller: "primary-details" }}
|
||||
= af.select :country_id, available_countries.map { |c| [c.name, c.id] }, {}, { "data-controller": "tom-select", "data-dependent-select-target": "source", "data-action": "dependent-select#handleSelectChange", class: "primary" }
|
||||
.row
|
||||
.three.columns.alpha
|
||||
= af.label :latitude, t(:latitude)
|
||||
\/
|
||||
= af.label :longitude, t(:longitude)
|
||||
%span.required *
|
||||
= render partial: 'admin/shared/tooltip', locals: {tooltip_text: t('latitude_longitude_tip')}
|
||||
.four.columns
|
||||
= af.text_field :latitude, { placeholder: t(:latitude_placeholder) }
|
||||
.four.columns.omega
|
||||
= af.text_field :longitude, { placeholder: t(:longitude_placeholder) }
|
||||
.row
|
||||
.three.columns.alpha
|
||||
= " ".html_safe
|
||||
.five.columns.omega
|
||||
= check_box_tag "use_geocoder"
|
||||
= label_tag "use_geocoder", t('use_geocoder')
|
||||
)
|
||||
.row
|
||||
.three.columns.alpha
|
||||
= af.label :address1, t(:address)
|
||||
%span.required *
|
||||
.eight.columns.omega
|
||||
= af.text_field :address1, { placeholder: t(:address_placeholder) }
|
||||
.row
|
||||
.alpha.three.columns
|
||||
= af.label :address2, t(:address2)
|
||||
.eight.columns.omega
|
||||
= af.text_field :address2
|
||||
.row
|
||||
.three.columns.alpha
|
||||
= af.label :city, t(:city)
|
||||
\/
|
||||
= af.label :zipcode, t(:postcode)
|
||||
%span.required *
|
||||
.four.columns
|
||||
= af.text_field :city, { placeholder: t(:city_placeholder) }
|
||||
.four.columns.omega
|
||||
= af.text_field :zipcode, { placeholder: t(:postcode_placeholder) }
|
||||
.row{"data-controller": "dependent-select", "data-dependent-select-options-value": countries_with_states }
|
||||
.three.columns.alpha
|
||||
= af.label :state_id, t(:state)
|
||||
\/
|
||||
= af.label :country_id, t(:country)
|
||||
%span.required *
|
||||
.four.columns
|
||||
= af.select :state_id, @enterprise.address.country.states.map { |s| [s.name, s.id] }, {}, { "data-controller": "tom-select", "data-dependent-select-target": "select", class: "primary" }
|
||||
.four.columns.omega{ data: { controller: "primary-details" }}
|
||||
= af.select :country_id, available_countries.map { |c| [c.name, c.id] }, {}, { "data-controller": "tom-select", "data-dependent-select-target": "source", "data-action": "dependent-select#handleSelectChange", class: "primary" }
|
||||
.row
|
||||
.three.columns.alpha
|
||||
= af.label :latitude, t(:latitude)
|
||||
\/
|
||||
= af.label :longitude, t(:longitude)
|
||||
%span.required *
|
||||
= render partial: 'admin/shared/tooltip', locals: {tooltip_text: t('latitude_longitude_tip')}
|
||||
.four.columns
|
||||
= af.text_field :latitude, { placeholder: t(:latitude_placeholder) }
|
||||
.four.columns.omega
|
||||
= af.text_field :longitude, { placeholder: t(:longitude_placeholder) }
|
||||
.row
|
||||
.three.columns.alpha
|
||||
= " ".html_safe
|
||||
.five.columns.omega
|
||||
= check_box_tag "use_geocoder"
|
||||
= label_tag "use_geocoder", t('use_geocoder')
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
.three.columns.alpha
|
||||
= bf.label :address1, t('.address1')
|
||||
%i.text-big.icon-question-sign{ "data-controller": "help-modal-link", "data-action": "click->help-modal-link#open", "data-help-modal-link-target-value": "business_address_info_modal" }
|
||||
.eight.columns.omega
|
||||
= bf.text_field :address1, { placeholder: t(".address1_placeholder") }
|
||||
.row
|
||||
.alpha.three.columns
|
||||
@@ -24,16 +25,16 @@
|
||||
= bf.text_field :city, { placeholder: t(:city_placeholder) }
|
||||
.four.columns.omega
|
||||
= bf.text_field :zipcode, { placeholder: t(:postcode_placeholder) }
|
||||
.row
|
||||
.row{"data-controller": "dependent-select", "data-dependent-select-options-value": countries_with_states }
|
||||
.three.columns.alpha
|
||||
= bf.label :country_id, t(:country)
|
||||
\/
|
||||
= bf.label :state_id, t(:state)
|
||||
%div{"data-controller": "dependant-select", "data-dependant-select-options-value": countries_with_states }
|
||||
.four.columns
|
||||
= bf.select :country_id, available_countries.map { |c| [c.name, c.id] }, {}, { "data-controller": "tom-select", "data-dependant-select-target": "source", "data-action": "dependant-select#handleSelectChange", class: "primary" }
|
||||
.four.columns.omega
|
||||
= bf.select :state_id, @enterprise.address.country.states.map { |s| [s.name, s.id] }, {}, { "data-controller": "tom-select", "data-dependant-select-target": "select", class: "primary" }
|
||||
.four.columns
|
||||
= bf.select :country_id, options_for_select(available_countries.map { |c| [c.name, c.id] }, @enterprise.business_address.country_id), {}, { "data-controller": "tom-select", "data-dependent-select-target": "source", "data-action": "dependent-select#handleSelectChange", class: "primary" }
|
||||
.four.columns.omega
|
||||
- states = @enterprise.business_address.country.present? ? @enterprise.business_address.country&.states&.map { |s| [s.name, s.id] } : []
|
||||
= bf.select :state_id, states, {}, { "data-controller": "tom-select", "data-dependent-select-target": "select", class: "primary" }
|
||||
|
||||
.row
|
||||
.three.columns.alpha
|
||||
|
||||
25
app/views/admin/oidc_settings/index.html.haml
Normal file
25
app/views/admin/oidc_settings/index.html.haml
Normal file
@@ -0,0 +1,25 @@
|
||||
- content_for :page_title do
|
||||
= t(".title")
|
||||
|
||||
= render 'admin/shared/enterprises_sub_menu'
|
||||
|
||||
%div
|
||||
%h2= t(".connect")
|
||||
%br
|
||||
|
||||
- if spree_current_user.provider == 'openid_connect' && spree_current_user.uid.present?
|
||||
= t(".already_connected")
|
||||
= spree_current_user.uid
|
||||
%br
|
||||
%br
|
||||
|
||||
= t(".view_account")
|
||||
= link_to t(".les_communs_link"), "#{ Devise.omniauth_configs[:openid_connect].options[:issuer] }/account"
|
||||
|
||||
- else
|
||||
= t(".link_your_account")
|
||||
%br
|
||||
%br
|
||||
= button_to t(".link_account_button"),
|
||||
Spree::Core::Engine.routes.url_helpers.spree_user_openid_connect_omniauth_authorize_path(auth_type: "login"),
|
||||
method: :post
|
||||
@@ -10,8 +10,6 @@
|
||||
%fieldset.no-border-bottom
|
||||
%legend{ align: 'center'}= t('.checkout_options')
|
||||
|
||||
= hidden_field_tag "order_cycle[selected_distributor_shipping_method_ids][]", ""
|
||||
|
||||
.row
|
||||
.three.columns
|
||||
|
||||
@@ -19,10 +17,12 @@
|
||||
%table.checkout-options
|
||||
%thead
|
||||
%tr
|
||||
%th{ colspan: 2 }= t('.shipping_methods')
|
||||
%th{ colspan: 2 }
|
||||
= t('.shipping_methods')
|
||||
= hidden_field_tag "order_cycle[selected_distributor_shipping_method_ids][]", ""
|
||||
- @order_cycle.distributors.each do |distributor|
|
||||
- distributor_shipping_methods = @order_cycle.attachable_distributor_shipping_methods.where("distributor_id = ?", distributor.id).includes(:shipping_method)
|
||||
%tr{ "data-controller": "select-all" }
|
||||
%tr{ class: "distributor-#{distributor.id}-shipping-methods", "data-controller": "select-all" }
|
||||
%td.text-center
|
||||
- if distributor_shipping_methods.many?
|
||||
%label
|
||||
@@ -48,17 +48,36 @@
|
||||
%p
|
||||
= t('.no_shipping_methods')
|
||||
%tr
|
||||
%th{ colspan: 2 }= t('.payment_methods')
|
||||
%tr
|
||||
%td
|
||||
%td
|
||||
- if @order_cycle.attachable_payment_methods.available(:both).any?
|
||||
%ul
|
||||
- @order_cycle.attachable_payment_methods.available(:both).each do |payment_method|
|
||||
%li= payment_method.name
|
||||
- else
|
||||
%p
|
||||
= t('.no_payment_methods')
|
||||
%th{ colspan: 2 }
|
||||
= t('.payment_methods')
|
||||
= hidden_field_tag "order_cycle[selected_distributor_payment_method_ids][]", ""
|
||||
- @order_cycle.distributors.each do |distributor|
|
||||
- distributor_payment_methods = @order_cycle.attachable_distributor_payment_methods.where("distributor_id = ?", distributor.id).includes(:payment_method)
|
||||
%tr{ class: "distributor-#{distributor.id}-payment-methods", "data-controller": "select-all" }
|
||||
%td.text-center
|
||||
- if distributor_payment_methods.many?
|
||||
%label
|
||||
= check_box_tag nil, nil, nil, { "data-action": "change->select-all#toggleAll", "data-select-all-target": "all" }
|
||||
= t(".select_all")
|
||||
%td
|
||||
%em= distributor.name
|
||||
- distributor_payment_methods.each do |distributor_payment_method|
|
||||
%p
|
||||
%label{ class: ("disabled" if distributor_payment_methods.one? || !distributor_payment_method.payment_method.frontend?) }
|
||||
= check_box_tag "order_cycle[selected_distributor_payment_method_ids][]",
|
||||
distributor_payment_method.id,
|
||||
@order_cycle.distributor_payment_methods.include?(distributor_payment_method),
|
||||
id: "order_cycle_selected_distributor_payment_method_ids_#{distributor_payment_method.id}",
|
||||
data: ({ "action" => "change->select-all#toggleCheckbox", "select-all-target" => "checkbox" } if distributor_payment_method.payment_method.frontend?)
|
||||
= distributor_payment_method.payment_method.name
|
||||
- distributor.payment_methods.inactive_or_backend.each do |payment_method|
|
||||
%label.disabled
|
||||
= check_box_tag nil, nil, false, disabled: true
|
||||
= payment_method.name
|
||||
= "(#{t('.back_end')})"
|
||||
- if distributor.payment_methods.available.none?
|
||||
%p
|
||||
= t('.no_payment_methods')
|
||||
|
||||
%div#save-bar
|
||||
%div.container
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
- if @report_subtypes.present? && @report_subtypes.count > 1
|
||||
- if feature?(:report_inverse_columns_logic, spree_current_user)
|
||||
%input{type: 'hidden', name: 'report_subtype', value: @report_subtype}
|
||||
- else
|
||||
.row
|
||||
.alpha.two.columns= label_tag nil, t(:report_type)
|
||||
.omega.fourteen.columns
|
||||
= select_tag(:report_subtype, options_for_select(@report_subtypes, @report_subtype))
|
||||
%input{type: 'hidden', name: 'report_subtype', value: @report_subtype}
|
||||
|
||||
.row.rendering-options{ "data-controller": "csv-select" }
|
||||
.alpha.two.columns
|
||||
@@ -22,21 +16,16 @@
|
||||
.omega.fourteen.columns
|
||||
- if @report.header_option?
|
||||
%span.inline-checkbox{ style: "margin-right: 1rem;" }
|
||||
= check_box_tag :display_header_row, true, params[:display_header_row]
|
||||
= check_box_tag :display_header_row, true, @render_options.options[:display_header_row]
|
||||
= label_tag :display_header_row, t(".header_row")
|
||||
- if @report.summary_row_option?
|
||||
%span.inline-checkbox
|
||||
= check_box_tag :display_summary_row, true, params[:display_summary_row], { "data-csv-select-target": "checkbox" }
|
||||
= check_box_tag :display_summary_row, true, @render_options.options[:display_summary_row], { "data-csv-select-target": "checkbox" }
|
||||
= label_tag :display_summary_row, t(".summary_row"), { "data-csv-select-target": "label" }
|
||||
|
||||
- if @report.available_headers.present?
|
||||
.row
|
||||
- if feature? :report_inverse_columns_logic, spree_current_user
|
||||
.alpha.two.columns= label_tag nil, t(:report_columns)
|
||||
.omega.fourteen.columns
|
||||
= render MultipleCheckedSelectComponent.new(name: "fields_to_show", options: @report.available_headers, selected: @params_fields_to_show)
|
||||
- else
|
||||
.alpha.two.columns= label_tag nil, t(:report_hide_columns)
|
||||
.omega.fourteen.columns
|
||||
= select_tag(:fields_to_hide, options_for_select(@report.available_headers, params[:fields_to_hide]),
|
||||
class: "select2 fullwidth", multiple: true)
|
||||
.alpha.two.columns= label_tag nil, t(:report_columns)
|
||||
.omega.fourteen.columns
|
||||
= render MultipleCheckedSelectComponent.new(name: "fields_to_show", options: @report.available_headers, selected: @render_options.options[:fields_to_show])
|
||||
|
||||
@@ -11,13 +11,9 @@
|
||||
- @reports.each do |report_type, report_subtypes|
|
||||
%tr
|
||||
%td
|
||||
- name = I18n.t(:name, scope: [:admin, :reports, report_type])
|
||||
- url = main_app.admin_report_url(report_type: report_type)
|
||||
= link_to name, url
|
||||
= I18n.t(:name, scope: [:admin, :reports, report_type])
|
||||
%td
|
||||
- begin
|
||||
= I18n.t!(:description, scope: [:admin, :reports, report_type])
|
||||
- if feature? :report_inverse_columns_logic, spree_current_user
|
||||
= render partial: "report_subtype", locals: { report_subtypes: report_subtypes, report_type: report_type }
|
||||
- rescue I18n::MissingTranslationData
|
||||
= render partial: "report_subtype", locals: { report_subtypes: report_subtypes, report_type: report_type }
|
||||
- if report_subtypes.empty?
|
||||
- name = I18n.t(:name, scope: [:admin, :reports, report_type])
|
||||
- report_subtypes = [[name, nil]]
|
||||
= render partial: "report_subtype", locals: { report_subtypes: report_subtypes, report_type: report_type }
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
- content_for :page_title do
|
||||
= @report_title
|
||||
|
||||
= form_for @report.search, :url => url_for(only_path: false) do |f|
|
||||
%fieldset.no-border-bottom.print-hidden
|
||||
%legend{ align: 'center'}= t(:report_filters)
|
||||
|
||||
@@ -2,3 +2,5 @@
|
||||
%ul#sub_nav.inline-menu{"data-hook" => "admin_enterprise_sub_tabs"}
|
||||
= tab :enterprises, url: main_app.admin_enterprises_path
|
||||
= tab :enterprise_relationships, url: main_app.admin_enterprise_relationships_path
|
||||
- if ENV["OPENID_APP_ID"].present? && ENV["OPENID_APP_SECRET"].present?
|
||||
= tab :oidc_settings, url: main_app.admin_oidc_settings_path
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
|
||||
= form_with url: "/admin/subscriptions/new", method: :get do |f|
|
||||
.text-left.margin-bottom-30
|
||||
= select_tag "subscription[shop_id]", options_from_collection_for_select(@shops, "id", "name"), { "data-controller": "tom-select", "data-dependant-select-target": "source", "data-action": "dependant-select#handleSelectChange", class: "primary" }
|
||||
= select_tag "subscription[shop_id]", options_from_collection_for_select(@shops, "id", "name"), { "data-controller": "tom-select", "data-dependent-select-target": "source", "data-action": "dependent-select#handleSelectChange", class: "primary" }
|
||||
.text-center
|
||||
= f.submit "Continue", class: "button red icon-plus"
|
||||
= f.submit "Continue", class: "button red icon-plus"
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
%p
|
||||
%input{ type: "checkbox", id: "accept_terms", ng: { model: "platform_tos_accepted", init: "platform_tos_accepted = #{platform_tos_already_accepted?}" } }
|
||||
%label.small{for: "platform_tos_accepted"}
|
||||
%input{ type: "checkbox",
|
||||
id: "accept_terms",
|
||||
ng: {
|
||||
model: "platform_tos_accepted",
|
||||
init: "platform_tos_accepted = #{platform_tos_already_accepted?}"
|
||||
}
|
||||
}
|
||||
%label.small{for: "accept_terms"}
|
||||
= t(".message_html", tos_link: link_to_platform_terms)
|
||||
|
||||
19
app/views/devise/shared/_links.html.erb
Normal file
19
app/views/devise/shared/_links.html.erb
Normal file
@@ -0,0 +1,19 @@
|
||||
<%- if controller_name != 'sessions' %>
|
||||
<%= link_to t(".sign_in"), new_session_path(resource_name) %><br />
|
||||
<% end %>
|
||||
|
||||
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
|
||||
<%= link_to t(".sign_up"), new_registration_path(resource_name) %><br />
|
||||
<% end %>
|
||||
|
||||
<%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
|
||||
<%= link_to t(".forgot_your_password"), new_password_path(resource_name) %><br />
|
||||
<% end %>
|
||||
|
||||
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
|
||||
<%= link_to t('.didn_t_receive_confirmation_instructions'), new_confirmation_path(resource_name) %><br />
|
||||
<% end %>
|
||||
|
||||
<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
|
||||
<%= link_to t('.didn_t_receive_unlock_instructions'), new_unlock_path(resource_name) %><br />
|
||||
<% end %>
|
||||
@@ -2,7 +2,7 @@
|
||||
%a{"ng-click" => "triggerProductModal()"}
|
||||
%span.product-thumb__bulk-label{"ng-if" => "::product.group_buy"}
|
||||
= t(".bulk")
|
||||
%img{"ng-src" => "{{::product.primaryImageOrMissing}}"}
|
||||
%img{"ng-src" => "{{::product.primaryImageOrMissing}}", loading: "lazy"}
|
||||
|
||||
.summary
|
||||
.summary-header
|
||||
|
||||
@@ -50,16 +50,16 @@
|
||||
= bill_address.text_field :zipcode, { placeholder: t("split_checkout.step1.address.zipcode.placeholder") }
|
||||
= f.error_message_on "bill_address.zipcode"
|
||||
|
||||
%div{ "data-controller": "dependant-select", "data-dependant-select-options-value": countries_with_states }
|
||||
%div{ "data-controller": "dependent-select", "data-dependent-select-options-value": countries_with_states }
|
||||
- bill_address_country = @order.bill_address.country || DefaultCountry.country
|
||||
|
||||
%div.checkout-input
|
||||
= bill_address.label :country_id, t("split_checkout.step1.address.country_id.label")
|
||||
= bill_address.select :country_id, countries, { selected: bill_address_country.id }, { "data-dependant-select-target": "source", "data-action": "dependant-select#handleSelectChange" }
|
||||
= bill_address.select :country_id, countries, { selected: bill_address_country.id }, { "data-dependent-select-target": "source", "data-action": "dependent-select#handleSelectChange" }
|
||||
|
||||
%div.checkout-input
|
||||
= bill_address.label :state_id, t("split_checkout.step1.address.state_id.label")
|
||||
= bill_address.select :state_id, states_for_country(bill_address_country), { selected: @order.bill_address&.state_id }, { "data-dependant-select-target": "select" }
|
||||
= bill_address.select :state_id, states_for_country(bill_address_country), { selected: @order.bill_address&.state_id }, { "data-dependent-select-target": "select" }
|
||||
|
||||
- if spree_current_user
|
||||
%div.checkout-input
|
||||
@@ -130,16 +130,16 @@
|
||||
= ship_address.text_field :zipcode, { placeholder: t("split_checkout.step1.address.zipcode.placeholder") }
|
||||
= f.error_message_on "ship_address.zipcode"
|
||||
|
||||
%div{ "data-controller": "dependant-select", "data-dependant-select-options-value": countries_with_states }
|
||||
%div{ "data-controller": "dependent-select", "data-dependent-select-options-value": countries_with_states }
|
||||
- ship_address_country = @order.ship_address.country || DefaultCountry.country
|
||||
|
||||
%div.checkout-input
|
||||
= ship_address.label :country_id, t("split_checkout.step1.address.country_id.label")
|
||||
= ship_address.select :country_id, countries, { selected: ship_address_country.id }, { "data-dependant-select-target": "source", "data-action": "dependant-select#handleSelectChange" }
|
||||
= ship_address.select :country_id, countries, { selected: ship_address_country.id }, { "data-dependent-select-target": "source", "data-action": "dependent-select#handleSelectChange" }
|
||||
|
||||
%div.checkout-input
|
||||
= ship_address.label :state_id, t("split_checkout.step1.address.state_id.label")
|
||||
= ship_address.select :state_id, states_for_country(ship_address_country), { selected: @order.ship_address&.state_id }, { "data-dependant-select-target": "select" }
|
||||
= ship_address.select :state_id, states_for_country(ship_address_country), { selected: @order.ship_address&.state_id }, { "data-dependent-select-target": "select" }
|
||||
|
||||
- if spree_current_user
|
||||
%div.checkout-input{ "data-toggle-target": "content", style: "display: #{display_ship_address ? 'block' : 'none'}" }
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
%br
|
||||
%div{ data: { controller: "flatpickr", "flatpickr-mode-value": "range", "flatpickr-default-date": "{{ [startDate, endDate] }}" } }
|
||||
%input.datepicker.fullwidth{ class: "datepicker", data: { "flatpickr-target": "instance" } }
|
||||
%input{ type: "text", id: 'start_date_filter', 'ng-model': "startDate", data: { "flatpickr-target": "start" }, style: "display: none;", "confirm-change": "confirmRefresh()" }
|
||||
%input{ type: "text", id: 'end_date_filter', 'ng-model': "endDate", data: { "flatpickr-target": "end" }, style: "display: none;", "confirm-change": "confirmRefresh()"}
|
||||
%input{ type: "text", id: 'start_date_filter', 'ng-model': "startDate", data: { "flatpickr-target": "start" }, style: "display: none;" }
|
||||
%input{ type: "text", id: 'end_date_filter', 'ng-model': "endDate", data: { "flatpickr-target": "end" }, style: "display: none;" }
|
||||
.one.column
|
||||
.filter_select{ :class => "three columns" }
|
||||
%label{ :for => 'supplier_filter' }
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
= t(".active_products", count: @product_count )
|
||||
%span.three.columns.omega
|
||||
%span.icon-remove-sign
|
||||
%a.eight.columns.alpha.button.bottom.red{ href: "#{new_admin_product_path}" }
|
||||
%a.sixteen.columns.alpha.button.bottom.red{ href: "#{new_admin_product_path}" }
|
||||
= t "spree_admin_enterprises_create_new_product"
|
||||
%span.icon-arrow-right
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
= f.field_container :primary_taxon_id do
|
||||
= f.field_container :primary_taxon do
|
||||
= f.label :primary_taxon_id, t('.product_category')
|
||||
%span.required *
|
||||
%br
|
||||
= f.collection_select(:primary_taxon_id, Spree::Taxon.order(:name), :id, :name, {:include_blank => true}, {:class => "select2 fullwidth"})
|
||||
= f.error_message_on :primary_taxon_id
|
||||
= f.error_message_on :primary_taxon
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
= f.field_container :tax_category_id do
|
||||
= f.label :tax_category_id, t(:tax_category)
|
||||
%span.required *
|
||||
%br
|
||||
= f.collection_select(:tax_category_id, Spree::TaxCategory.all, :id, :name, {:include_blank => Spree::Config.products_require_tax_category ? false : t(:none)}, {:class => "select2 fullwidth"})
|
||||
= f.error_message_on :tax_category_id
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
.eight.columns.alpha
|
||||
= f.field_container :supplier do
|
||||
= f.label :supplier_id, t(".supplier")
|
||||
%span.required *
|
||||
= f.select :supplier_id, options_from_collection_for_select(@producers, :id, :name, @product.supplier_id), {}, { "data-controller": "tom-select", class: "primary" }
|
||||
= f.error_message_on :supplier
|
||||
.eight.columns.omega
|
||||
@@ -22,13 +21,14 @@
|
||||
= f.error_message_on :name
|
||||
.sixteen.columns.alpha
|
||||
.eight.columns.alpha
|
||||
= f.field_container :units do
|
||||
= f.field_container :variant_unit do
|
||||
= f.label :variant_unit_with_scale, t(".units")
|
||||
%span.required *
|
||||
%select{id: 'product_variant_unit_with_scale', 'ng-model' => 'product.variant_unit_with_scale', 'ng-options' => 'unit[1] as unit[0] for unit in variant_unit_options',"data-controller": "tom-select", class: "primary"}
|
||||
%select{id: 'product_variant_unit_with_scale', 'ng-model' => 'product.variant_unit_with_scale', 'ng-options' => 'unit[1] as unit[0] for unit in variant_unit_options', "data-controller": "tom-select","data-tom-select-options-value": '{"allowEmptyOption":false}', class: "primary"}
|
||||
%option{'value' => '', 'ng-hide' => "hasUnit(product)"}
|
||||
%input{ type: 'hidden', 'ng-value': 'product.variant_unit', "ng-init": "product.variant_unit='#{@product.variant_unit}'", name: 'product[variant_unit]' }
|
||||
%input{ type: 'hidden', 'ng-value': 'product.variant_unit_scale', "ng-init": "product.variant_unit_scale='#{@product.variant_unit_scale}'", name: 'product[variant_unit_scale]' }
|
||||
= f.error_message_on :variant_unit
|
||||
.two.columns
|
||||
= f.field_container :unit_value do
|
||||
= f.label :unit_value_with_description, t(".value"), 'ng-disabled' => "!hasUnit(product)"
|
||||
@@ -36,6 +36,7 @@
|
||||
%input.fullwidth{ id: 'product_unit_value_with_description', 'ng-model' => 'product.master.unit_value_with_description', :type => 'text', placeholder: "eg. 2", 'ng-disabled' => "!hasUnit(product)" }
|
||||
%input{ type: 'hidden', 'ng-value': 'product.master.unit_value', "ng-init": "product.master.unit_value='#{@product.master.unit_value}'", name: 'product[unit_value]' }
|
||||
%input{ type: 'hidden', 'ng-value': 'product.master.unit_description', "ng-init": "product.master.unit_description='#{@product.master.unit_description}'", name: 'product[unit_description]' }
|
||||
= f.error_message_on :unit_value
|
||||
= render 'display_as', f: f
|
||||
.six.columns.omega{ 'ng-show' => "product.variant_unit_with_scale == 'items'" }
|
||||
= f.field_container :unit_name do
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
= tab :orders, :subscriptions, :customer_details, :adjustments, :payments, :return_authorizations, url: admin_orders_path('q[s]' => 'completed_at desc'), icon: 'icon-shopping-cart'
|
||||
= tab :reports, url: main_app.admin_reports_path, icon: 'icon-file'
|
||||
= tab :general_settings, :mail_methods, :tax_categories, :tax_rates, :tax_settings, :zones, :countries, :states, :payment_methods, :taxonomies, :shipping_methods, :shipping_categories, :enterprise_fees, :contents, :invoice_settings, :matomo_settings, :stripe_connect_settings, label: 'configuration', icon: 'icon-wrench', url: edit_admin_general_settings_path
|
||||
= tab :enterprises, :enterprise_relationships, url: main_app.admin_enterprises_path
|
||||
= tab :enterprises, :enterprise_relationships, :oidc_settings, url: main_app.admin_enterprises_path
|
||||
= tab :customers, url: main_app.admin_customers_path
|
||||
= tab :enterprise_groups, url: main_app.admin_enterprise_groups_path, label: 'groups'
|
||||
- if can? :admin, Spree::User
|
||||
|
||||
@@ -51,6 +51,7 @@ export default class extends Flatpickr {
|
||||
plugins: this.plugins(mode, datetimepicker),
|
||||
mode,
|
||||
};
|
||||
window.addEventListener("flatpickr:change", this.onChangeEvent.bind(this));
|
||||
}
|
||||
|
||||
clear(e) {
|
||||
@@ -60,6 +61,23 @@ export default class extends Flatpickr {
|
||||
open() {
|
||||
this.fp.element.dispatchEvent(new Event("focus"));
|
||||
}
|
||||
onChangeEvent(e) {
|
||||
if (
|
||||
this.modeValue == "range" &&
|
||||
this.hasStartTarget &&
|
||||
this.hasEndTarget &&
|
||||
e.detail.startDate &&
|
||||
e.detail.endDate
|
||||
) {
|
||||
// date range mode
|
||||
this.startTarget.value = e.detail.startDate;
|
||||
this.endTarget.value = e.detail.endDate;
|
||||
this.fp.setDate([e.detail.startDate, e.detail.endDate]);
|
||||
} else if (e.detail.date) {
|
||||
// single date mode
|
||||
this.fp.setDate(e.detail.date);
|
||||
}
|
||||
}
|
||||
|
||||
change(selectedDates, dateStr, instance) {
|
||||
if (this.hasStartTarget && this.hasEndTarget && this.modeValue == "range") {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Controller } from "stimulus";
|
||||
import TomSelect from "tom-select";
|
||||
import TomSelect from "tom-select/dist/esm/tom-select.complete";
|
||||
|
||||
export default class extends Controller {
|
||||
static values = { options: Object };
|
||||
|
||||
@@ -195,7 +195,7 @@ table#listing_enterprise_groups {
|
||||
}
|
||||
|
||||
.fullwidth_inputs {
|
||||
input[type=text], select {
|
||||
#{$text-inputs}, select {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
input[type="text"],
|
||||
input[type="password"],
|
||||
input[type="email"],
|
||||
$text-inputs:
|
||||
"input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel]";
|
||||
|
||||
#{$text-inputs},
|
||||
input[type="date"],
|
||||
input[type="datetime"],
|
||||
input[type="time"],
|
||||
input[type="url"],
|
||||
input[type="number"],
|
||||
input[type="tel"],
|
||||
textarea, fieldset {
|
||||
@include border-radius($border-radius);
|
||||
padding: 7px 10px;
|
||||
|
||||
@@ -148,6 +148,7 @@
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
margin-bottom: 0.75rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.product-properties {
|
||||
|
||||
@@ -142,3 +142,25 @@ Devise::TokenAuthenticatable.setup do |config|
|
||||
# Defines name of the authentication token params key
|
||||
config.token_authentication_key = :auth_token
|
||||
end
|
||||
|
||||
if ENV["OPENID_APP_ID"].present? && ENV["OPENID_APP_SECRET"].present?
|
||||
Devise.setup do |config|
|
||||
protocol = Rails.env.development? ? "http://" : "https://"
|
||||
config.omniauth :openid_connect, {
|
||||
name: :openid_connect,
|
||||
issuer: "https://login.lescommuns.org/auth/realms/data-food-consortium",
|
||||
scope: [:openid, :profile, :email],
|
||||
response_type: :code,
|
||||
uid_field: "email",
|
||||
discovery: true,
|
||||
client_auth_method: :jwks,
|
||||
|
||||
client_options: {
|
||||
identifier: ENV["OPENID_APP_ID"],
|
||||
secret: ENV["OPENID_APP_SECRET"],
|
||||
redirect_uri: "#{protocol}#{ENV["SITE_URL"]}/user/spree_user/auth/openid_connect/callback",
|
||||
jwks_uri: 'https://login.lescommuns.org/auth/realms/data-food-consortium/protocol/openid-connect/certs'
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
@@ -23,6 +23,8 @@ ar:
|
||||
state: محافظة
|
||||
source: المصدر
|
||||
spree/product:
|
||||
name: "اسم المنتج"
|
||||
price: "السعر"
|
||||
primary_taxon: "نوع المنتج "
|
||||
supplier: "المورد"
|
||||
shipping_category_id: "نوع الشحن"
|
||||
@@ -2656,6 +2658,9 @@ ar:
|
||||
report_header_delivery_postcode: تسليم الرمز البريدي
|
||||
report_header_bulk_unit_size: حجم الوحدة بالجملة
|
||||
report_header_weight: وزن
|
||||
report_header_height: الارتفاع
|
||||
report_header_width: العرض
|
||||
report_header_depth: العمق
|
||||
report_header_sum_total: اجمالي
|
||||
report_header_date_of_order: تاريخ الطلب
|
||||
report_header_amount_owing: المبلغ المستحق
|
||||
|
||||
@@ -23,11 +23,14 @@ ca:
|
||||
state: Estat
|
||||
source: Source
|
||||
spree/product:
|
||||
name: "Nom del producte"
|
||||
price: "Preu"
|
||||
primary_taxon: "Categoria del producte"
|
||||
supplier: "Proveïdora"
|
||||
shipping_category_id: "Categoria d'enviament"
|
||||
variant_unit: "Unitat de la variant"
|
||||
variant_unit_name: "Nom de la unitat de la variant"
|
||||
unit_value: "Valor de la unitat"
|
||||
spree/credit_card:
|
||||
base: "Targeta de crèdit"
|
||||
number: "Número"
|
||||
@@ -86,12 +89,30 @@ ca:
|
||||
duplicate_transaction: "Fa molt poc que s'ha enviat una transacció amb la mateixa quantitat i informació de la mateixa targeta de crèdit."
|
||||
fraudulent: "El pagament s'ha rebutjat perquè Stripe sospita que és fraudulent."
|
||||
generic_decline: "La targeta s'ha rebutjat per un motiu desconegut."
|
||||
incorrect_pin: "El PIN introduït no és correcte. Aquest codi de rebuig només s'aplica els pagaments fets amb lector de targetes"
|
||||
insufficient_funds: "La targeta no disposa de prou saldo per completar la compra"
|
||||
invalid_account: "La targeta, o el compte vinculat a la targeta, no és vàlida."
|
||||
invalid_amount: "L'import del pagament no és vàlid o supera l'import permès."
|
||||
invalid_pin: "El PIN introduït no és correcte. Aquest codi de rebuig només s'aplica els pagaments fets amb lector de targetes"
|
||||
issuer_not_available: "No s'ha pogut contactar amb l'entitat emissora de la targeta, de forma que no s'ha pogut autoritzar el pagament."
|
||||
lost_card: "El pagament ha estat denegat perquè la targeta ha estat anul·lada per pèrdua."
|
||||
merchant_blacklist: "El pagament ha estat rebutjat perquè coincideix amb un valor de la llista de bloqueig de l'usuari de Stripe."
|
||||
new_account_information_available: "La targeta, o el compte vinculat a la targeta, no és vàlida."
|
||||
no_action_taken: "La targeta s'ha rebutjat per un motiu desconegut."
|
||||
not_permitted: "No es permet el pagament."
|
||||
offline_pin_required: "S'ha rebutjat la targeta perquè requereix un PIN."
|
||||
online_or_offline_pin_required: "La targeta s'ha rebutjat perquè requereix un PIN."
|
||||
pickup_card: "La targeta no es pot utilitzar per fer aquest pagament (és possible que s'hagi bloquejat per pèrdua o robatori)."
|
||||
pin_try_exceeded: "S'ha superat el nombre permès d'intents d'escriure el PIN."
|
||||
reenter_transaction: "L'emissor no ha pogut processar el pagament per un motiu desconegut."
|
||||
restricted_card: "Doncs pot utilitzar la targeta per fer aquest pagament (és possible que s'hagi bloquejat per pèrdua o robatori)."
|
||||
revocation_of_all_authorizations: "La targeta s'ha rebutjat per un motiu desconegut."
|
||||
revocation_of_authorization: "La targeta s'ha rebutjat per un motiu desconegut."
|
||||
security_violation: "La targeta s'ha rebutjat per un motiu desconegut."
|
||||
service_not_allowed: "La targeta s'ha rebutjat per un motiu desconegut."
|
||||
stolen_card: "El pagament s'ha denegat perquè la targeta està bloquejada per robatori."
|
||||
stop_payment_order: "La targeta s'ha rebutjat per un motiu desconegut."
|
||||
testmode_decline: "S'ha utilitzat un número de targeta de prova de Stripe."
|
||||
transaction_not_allowed: "La targeta s'ha rebutjat per un motiu desconegut."
|
||||
try_again_later: "La targeta s'ha rebutjat per un motiu desconegut."
|
||||
withdrawal_count_limit_exceeded: "El consumidor ha superat el saldo o el límit de crèdit disponible a la seva targeta."
|
||||
@@ -123,7 +144,11 @@ ca:
|
||||
cardholder_name: "Nom del titular de la targeta"
|
||||
community_forum_url: "URL del fòrum de la comunitat"
|
||||
customer_instructions: "Instruccions de la consumidora"
|
||||
additional_information: "Informació adicional"
|
||||
devise:
|
||||
passwords:
|
||||
spree_user:
|
||||
cannot_be_blank: "La contrasenya d'usuari no pot estar en blanc. Introduïu una contrasenya."
|
||||
confirmations:
|
||||
send_instructions: "Rebreu un correu electrònic amb instruccions sobre com confirmar el vostre compte en pocs minuts."
|
||||
failed_to_send: "S'ha produït un error en enviar el correu electrònic de confirmació."
|
||||
@@ -140,6 +165,7 @@ ca:
|
||||
signed_up_but_unconfirmed: "S'ha enviat un missatge amb un enllaç de confirmació a la teva adreça de correu electrònic. Obre l'enllaç per activar el teu compte."
|
||||
unknown_error: "S'ha produït un error en crear el teu compte. Comprova la teva adreça de correu electrònic i torna-ho a provar."
|
||||
failure:
|
||||
disabled: "S'ha desactivat el teu compte. Poseu-vos en contacte amb un administrador per resoldre aquest problema."
|
||||
invalid: |
|
||||
Correu electrònic o contrasenya no vàlids.
|
||||
Va ser un convidat l'última vegada? Potser vostè necessita crear un compte o restablir la contrasenya.
|
||||
@@ -147,11 +173,16 @@ ca:
|
||||
already_registered: "Aquesta adreça electrònica ja està registrada. Inicieu sessió per continuar o torneu endarrere per utilitzar una altra adreça de correu electrònic."
|
||||
success:
|
||||
logged_in_succesfully: "Sessió iniciada correctament"
|
||||
sessions:
|
||||
signed_out: "La sessió s'ha tancat correctament."
|
||||
already_signed_out: "La sessió s'ha tancat correctament."
|
||||
user_passwords:
|
||||
spree_user:
|
||||
updated_not_active: "La vostra contrasenya s'ha restablert, però el vostre correu electrònic encara no s'ha confirmat."
|
||||
updated: "La vostra contrasenya s'ha canviat correctament. Ja teniu la sessió iniciada."
|
||||
send_instructions: "Rebreu un correu electrònic amb instruccions sobre com confirmar el vostre compte en pocs minuts."
|
||||
oidc:
|
||||
failure: "No s'ha pogut iniciar la sessió: %{error}"
|
||||
home_page_alert_html: "HTML banner d'alerta de la pàgina d'inici"
|
||||
hub_signup_case_studies_html: "HTML casos d'estudi de hub"
|
||||
hub_signup_detail_html: "HTML detall del registre de hub"
|
||||
@@ -262,6 +293,7 @@ ca:
|
||||
search_by_name: Cercar per nom o barri ...
|
||||
producers_join: Els productors australians son ara benvinguts a unir-se a Open Food Network.
|
||||
charges_sales_tax: Càrrecs d'IVA?
|
||||
business_address: "Adreça fiscal"
|
||||
print_invoice: "Imprimir Factura"
|
||||
print_ticket: "Imprimir tiquet"
|
||||
select_ticket_printer: "Seleccionar la impressora de tiquets"
|
||||
@@ -446,6 +478,8 @@ ca:
|
||||
terms_of_service: "Termes del servei"
|
||||
delete: "Eliminar arxiu"
|
||||
confirm_delete: "Esteu segur que voleu suprimir el fitxer de condicions del servei actual?"
|
||||
attachment: "Adjunt"
|
||||
create_terms_of_service: "Crear fitxer de condicions del servei"
|
||||
number_localization:
|
||||
number_localization_settings: "Configuració de localització numèrica"
|
||||
enable_localized_number: "Utilitzeu l'estàndard internacional per separar milers/decimals"
|
||||
@@ -455,6 +489,7 @@ ca:
|
||||
enable_invoices?: "Activar factures?"
|
||||
invoice_style2?: "Utilitzeu el model de factura alternatiu que inclou el desglossament dels càrregs totals per tarifa i la informació sobre la taxa impositiva per article (encara no està disponible per als països sense recàrregs en concpte d'impostos)"
|
||||
enable_receipt_printing?: "Mostra les opcions per imprimir rebuts amb impressores tèrmiques en el menú desplegable de la comanda?"
|
||||
enterprise_number_required_on_invoices?: "Vols fer el NIF obligatori per generar una factura?"
|
||||
stripe_connect_settings:
|
||||
edit:
|
||||
title: "Stripe Connect"
|
||||
@@ -502,6 +537,8 @@ ca:
|
||||
guest_label: "Fer comanda com a convidat"
|
||||
credit_owed: "Crèdit a deure"
|
||||
balance_due: "A pagar"
|
||||
destroy:
|
||||
has_associated_subscriptions: "No es pot esborrar: aquest client té subscripcions actives. Cancel·leu-les primer."
|
||||
contents:
|
||||
edit:
|
||||
title: Contingut
|
||||
@@ -680,6 +717,8 @@ ca:
|
||||
display_name: Nom de visualització
|
||||
category: Categoria
|
||||
description: Descripció
|
||||
units: Unitats
|
||||
unit_type: Tipus d'unitat
|
||||
variant_unit_name: Nom de la unitat de la variant
|
||||
price: Preu
|
||||
on_hand: Disponibles
|
||||
@@ -739,6 +778,9 @@ ca:
|
||||
variants_without_unit_value: "Atenció: algunes variants no tenen cap unitat assignada."
|
||||
all: "Tots"
|
||||
select_variant: "Selecciona un paràmetre"
|
||||
note:
|
||||
note_label: "Nota:"
|
||||
no_note_present: "Cap nota proporcionada"
|
||||
enterprise:
|
||||
select_outgoing_oc_products_from: Selecciona els productes sortints del Cicle de Comandes
|
||||
enterprises:
|
||||
@@ -769,8 +811,21 @@ ca:
|
||||
terms_and_conditions: "Termes i condicions"
|
||||
remove_terms_and_conditions: "Elimina el fitxer"
|
||||
uploaded_on: "carregat el"
|
||||
reset_form: "Reiniciar el formulari"
|
||||
business_address_legend: "Adreça fiscal"
|
||||
invoice_item_sorting_legend: "Ordre de productes a la factura"
|
||||
sort_items_by_supplier?: Ordenar els articles per proveïdor?
|
||||
sort_items_by_supplier_tip: "Quan està activat, els articles s'ordenaran pel nom del proveïdor."
|
||||
enabled: Habilitat
|
||||
disabled: Deshabilitat
|
||||
business_address:
|
||||
company_legal_name: Nom fiscal de l'organització o empresa
|
||||
company_placeholder: La meva cooperativa SCCL
|
||||
address1: Adreça fiscal
|
||||
address1_placeholder: Carrer de dalt 123
|
||||
address2: Adreça (continua)
|
||||
legal_phone_number: 'Telèfon administratiu '
|
||||
phone_placeholder: "912 345 678"
|
||||
contact:
|
||||
legend: "Contacte"
|
||||
name: Nom
|
||||
@@ -780,6 +835,8 @@ ca:
|
||||
email_address_tip: "Aquesta adreça de correu electrònic es mostrarà al vostre perfil públic"
|
||||
phone: Telèfon
|
||||
phone_placeholder: p. ex. 98 765 43 21
|
||||
whatsapp_phone: Número de telèfon de WhatsApp
|
||||
whatsapp_phone_tip: "Aquest número es mostrarà al vostre perfil públic i s'enllaçarà amb el vostre WhatsApp."
|
||||
website: Lloc web
|
||||
website_placeholder: 'p. ex.: www.hortajosepribes.com'
|
||||
enterprise_fees:
|
||||
@@ -834,9 +891,12 @@ ca:
|
||||
none: Cap
|
||||
own: Propis
|
||||
sells: Ven
|
||||
sells_tip: "Cap: l'organització no ven als clients directament. <br /> Propietari: l'organització ven productes propis als clients. <br /> Qualsevol: l'organització pot vendre productes propis o d'altres empreses. <br />"
|
||||
sells_tip: "Cap: l'organització no disposa de botiga pròpia per vendre a clients finals directament. <br /> Propis: l'organització disposa d'una botiga pròpia per vendre NOMÉS els seus productes. <br /> Qualsevol: l'organització pot vendre productes propis o d'altres empreses que li proporcionin aquest permís. <br />"
|
||||
visible_in_search: Visible a la cerca?
|
||||
visible_in_search_tip: "Les organitzacions poden ser<br /> 1. Visibles públicament, apareixen al mapa i als llistats de Katuma-OFN.<br /> 2. Oculta. No visible en mapes i llistats però referenciats per altres botigues amb enllaç al seu perfil.<br /> 3. Totalment oculta. No visible en mapes i llistats ni és possible referencia-les."
|
||||
visible: Públic
|
||||
not_visible: Oculta
|
||||
hidden: Totalment oculta
|
||||
properties:
|
||||
legend: "Propietats"
|
||||
permalink:
|
||||
@@ -901,6 +961,8 @@ ca:
|
||||
shopfront_sort_by_producer: "Per productora"
|
||||
shopfront_sort_by_category_placeholder: "Categoria"
|
||||
shopfront_sort_by_producer_placeholder: "Productora"
|
||||
display_remaining_stock: "Mostra l'estoc restant a la botiga si és baix (3 unitats)"
|
||||
display_remaining_stock_tip: "Avisa els compradors quan només quedin 3 unitats o menys d'un producte."
|
||||
enabled: "Habilitat"
|
||||
disabled: "Deshabilitat"
|
||||
social:
|
||||
@@ -1033,6 +1095,7 @@ ca:
|
||||
back_to_list: "Tornar a la llista"
|
||||
save_and_back_to_list: "Desa i torna a la llista"
|
||||
choose_products_from: "Trieu Productes des de:"
|
||||
notify_producers_tip: Això enviarà un correu electrònic a cada productor amb la llista dels seus productes demanats a les comandes.
|
||||
incoming:
|
||||
incoming: "Entrant"
|
||||
supplier: "Proveïdora"
|
||||
@@ -1060,7 +1123,9 @@ ca:
|
||||
checkout_options:
|
||||
back_end: "Només pàgina administració (back office) "
|
||||
cancel: "Cancel·lar"
|
||||
checkout_options: "Opcions del Checkout"
|
||||
distributor: "Distribuïdora"
|
||||
no_shipping_methods: Cada distribuïdor d'aquest cicle de comanda ha de tenir almenys un mètode d'enviament.
|
||||
payment_methods: "Mètodes de Pagament"
|
||||
save: "Desa"
|
||||
save_and_back_to_list: "Desa i torna a la llista"
|
||||
@@ -1070,6 +1135,7 @@ ca:
|
||||
edit: "1. Configuració general"
|
||||
incoming: "2. Productes entrants"
|
||||
outgoing: "3. Productes sortints"
|
||||
checkout_options: "4. Opcions de Checkout"
|
||||
exchange_form:
|
||||
pickup_time_tip: Quan les comandes d'aquest cicle de comandes estiguin llestes per a les consumidores
|
||||
pickup_instructions_placeholder: "Instruccions de recollida"
|
||||
@@ -1083,6 +1149,8 @@ ca:
|
||||
add_supplier: 'Afegeix proveïdora'
|
||||
add_distributor: 'Afegeix distribuïdora'
|
||||
advanced_settings:
|
||||
automatic_notifications: Notificacions automàtiques
|
||||
automatic_notifications_tip: Notifiqueu automàticament per correu electrònic als productors les comandes que els hi feu així que es tanquin els cicles de comanda.
|
||||
title: Configuració avançada
|
||||
choose_product_tip: Podeu restringir els productes entrants i sortints a només l’inventari d’%{inventory}.
|
||||
preferred_product_selection_from_coordinator_inventory_only_here: Només inventari del coordinador
|
||||
@@ -1194,6 +1262,8 @@ ca:
|
||||
unitsize: UNITAT DE MESURA
|
||||
total: TOTAL
|
||||
total_items: ARTICLES TOTALS
|
||||
total_by_customer: Total per client
|
||||
total_by_supplier: Total per proveïdor
|
||||
supplier_totals: Total de de proveïdores del Cicle de Comanda
|
||||
supplier_totals_by_distributor: Total de proveïdores del Cicle de Comanda - per distribuïdora
|
||||
totals_by_supplier: Totals de la distribuïdora del Cicle de Comanda - per proveïdora
|
||||
@@ -1207,8 +1277,12 @@ ca:
|
||||
delivery: Informe de lliurament
|
||||
tax_types: Tipus d'impostos
|
||||
tax_rates: Tarifes fiscals
|
||||
pack_by_customer: Paquets per consumidora
|
||||
pack_by_supplier: Paquets per proveïdora
|
||||
pack_by_customer: Repartiment per consumidora
|
||||
pack_by_supplier: Repartiment per proveïdora
|
||||
pack_by_product: Repartiment per producte
|
||||
revenues_by_hub:
|
||||
name: Ingressos per grup/empresa
|
||||
description: Ingressos per grup/empresa
|
||||
orders_and_distributors:
|
||||
name: Comandes i distribuïdores
|
||||
description: Comandes amb detalls de la distribuïdora
|
||||
@@ -1254,9 +1328,11 @@ ca:
|
||||
temp_controlled: "Control de temperatura?"
|
||||
price: "Preu"
|
||||
rendering_options:
|
||||
generate_report: "Generació d'informe"
|
||||
on_screen: "A la pantalla"
|
||||
display: Mostra
|
||||
packing:
|
||||
name: "Informes d'embalatge"
|
||||
name: "Informes de repartiment"
|
||||
subscriptions:
|
||||
index:
|
||||
title: "Subscripcions"
|
||||
@@ -2128,6 +2204,8 @@ ca:
|
||||
contact_field_placeholder: "Nom de contacte"
|
||||
contact_field_required: "Has d'introduir un contacte principal."
|
||||
phone_field: "Número de telèfon "
|
||||
whatsapp_phone_field: "Número de telèfon de WhatsApp"
|
||||
whatsapp_phone_tooltip: "Aquest número es mostrarà al vostre perfil públic i s'enllaçarà amb el vostre WhatsApp."
|
||||
phone_field_placeholder: "p. ex. 012 345 678 "
|
||||
type:
|
||||
title: "Tipus"
|
||||
@@ -2505,6 +2583,9 @@ ca:
|
||||
report_header_delivery_postcode: Codi postal de lliurament
|
||||
report_header_bulk_unit_size: Mida de la unitat a granel
|
||||
report_header_weight: Pes
|
||||
report_header_height: Alçada
|
||||
report_header_width: Amplada
|
||||
report_header_depth: Profunditat
|
||||
report_header_sum_total: Suma total
|
||||
report_header_date_of_order: Data de la comanda
|
||||
report_header_amount_owing: Import adeutat
|
||||
@@ -2702,6 +2783,8 @@ ca:
|
||||
title: "S'estan penjant els termes i condicions"
|
||||
message_1: "Tots els compradors hauran d’acceptar-los al fer la comanda. Si actualitzeu el fitxer, tots els compradors hauran d’acceptar-los de nou a la finalització de la compra."
|
||||
message_2: "Per als compradors que tinguin subscripcions, heu d’enviar-los per correu electrònic els Termes i condicions (o els canvis que s’hi apliquen) per ara, res els notificarà sobre aquests nous Termes i condicions."
|
||||
business_address_info:
|
||||
message: "El Nom legal de l'empresa, l'Adreça fiscal i el telèfon administratiu s'utilitzen per a les empreses/organitzacions que facturen des d'una entitat jurídica registrada amb dades diferents de la seva informació comercial pública. Aquestes dades NOMÉS s'usaran a les factures. Si aquestes dades estan en blanc, el vostre nom públic, adreça i número de telèfon es faran servir a les factures."
|
||||
panels:
|
||||
save: DESA
|
||||
saved: DESAT
|
||||
@@ -3514,6 +3597,9 @@ ca:
|
||||
from: "De"
|
||||
to: "Facturar a"
|
||||
shipping: "Enviament"
|
||||
note:
|
||||
note_label: "Nota:"
|
||||
no_note_present: "Cap nota proporcionada"
|
||||
form:
|
||||
distribution_fields:
|
||||
title: "Distribució"
|
||||
@@ -4008,3 +4094,6 @@ ca:
|
||||
x_years:
|
||||
one: "1 any"
|
||||
other: "%{count} anys"
|
||||
errors:
|
||||
not_found:
|
||||
message_html: "<b>Si us plau torna-ho a provar</b> Això podria ser un problema temporal. Feu clic al botó Enrere per tornar a la pantalla anterior o torneu a <a href='/'>Inici</a> i torneu-ho a provar. <b>Contacteu amb suport</b><p> Si el problema persisteix o és urgent, si us plau, digueu-nos-ho. Esn pots enviar un correua a <a href='https://openfoodnetwork.org/ofn-local/' target='blank'>suport<p>katuma.org </a>.</p><p> Ens ajuda molt si pots donar tants detalls com sigui possible sobre de què estaves fent quan va aparèixer l'error.</p>"
|
||||
|
||||
@@ -23,6 +23,8 @@ cy:
|
||||
state: Sir
|
||||
source: Ffynhonnell
|
||||
spree/product:
|
||||
name: "Enw Cynnyrch"
|
||||
price: "Pris"
|
||||
primary_taxon: "Categori Cynnyrch"
|
||||
supplier: "Cyflenwr"
|
||||
shipping_category_id: "Categori dosbarthu."
|
||||
@@ -141,6 +143,7 @@ cy:
|
||||
cardholder_name: "Enw deiliad y cerdyn."
|
||||
community_forum_url: "URL Fforwm Cymunedol."
|
||||
customer_instructions: "Cyfarwyddiadau cwsmeriaid"
|
||||
additional_information: "Gwybodaeth ychwanegol"
|
||||
devise:
|
||||
passwords:
|
||||
spree_user:
|
||||
@@ -472,6 +475,8 @@ cy:
|
||||
terms_of_service: "Telerau Gwasanaeth"
|
||||
delete: "Dileu ffeil"
|
||||
confirm_delete: "Ydych chi'n siwr eich bod am ddileu'r ffeil Telerau Gwasanaeth cyfredol?"
|
||||
attachment: "Atodiad"
|
||||
create_terms_of_service: "Creu ffeil Telerau gwasanaeth"
|
||||
number_localization:
|
||||
number_localization_settings: "Gosodiadau Rhif Lleoleiddio"
|
||||
enable_localized_number: "Defnyddiwch resymeg gwahanydd mil / degol rhyngwladol"
|
||||
@@ -529,6 +534,8 @@ cy:
|
||||
guest_label: "Talu fel gwestai"
|
||||
credit_owed: "Credyd yn ddyledus"
|
||||
balance_due: "Balans sy'n ddyledus"
|
||||
destroy:
|
||||
has_associated_subscriptions: "Wedi methu dileu: Mae gan y cwsmer hwn danysgrifiadau gweithredol. Mae angen eu canslo'n gyntaf."
|
||||
contents:
|
||||
edit:
|
||||
title: Cynnwys
|
||||
@@ -1113,7 +1120,10 @@ cy:
|
||||
checkout_options:
|
||||
back_end: "Swyddfa gefn yn unig"
|
||||
cancel: "Canslo"
|
||||
checkout_options: "Opsiynau talu"
|
||||
distributor: "Dosbarthwr"
|
||||
no_payment_methods: Mae angen o leiaf un dull talu ar gyfer bob dosbarthwr ar y cylch archebu hwn.
|
||||
no_shipping_methods: Mae angen o leiaf un dull cludo ar gyfer pob dosbarthwr ar y cylch archebu hwn.
|
||||
payment_methods: "Dulliau Talu"
|
||||
save: "Cadw"
|
||||
save_and_back_to_list: "Cadw ac Yn ôl i'r Rhestr"
|
||||
@@ -1123,6 +1133,7 @@ cy:
|
||||
edit: "1. Gosodiadau Cyffredinol"
|
||||
incoming: "2. Cynnyrch sy'n Dod i Mewn"
|
||||
outgoing: "3. Cynnyrch sy'n mynd allan"
|
||||
checkout_options: "4. Opsiynau talu"
|
||||
exchange_form:
|
||||
pickup_time_tip: Pan fydd archebion gan yr OC hwn yn barod ar gyfer y cwsmer
|
||||
pickup_instructions_placeholder: "Cyfarwyddiadau casglu"
|
||||
@@ -1270,6 +1281,9 @@ cy:
|
||||
pack_by_customer: Pecyn fesul Cwsmer
|
||||
pack_by_supplier: Pecyn fesul Cyflenwr
|
||||
pack_by_product: Pecynnu yn ôl Cynnyrch
|
||||
revenues_by_hub:
|
||||
name: Refeniw fesul Hyb
|
||||
description: Refeniw fesul hyb
|
||||
orders_and_distributors:
|
||||
name: Archebion a Dosbarthwyr
|
||||
description: Archebion gyda manylion dosbarthwr
|
||||
@@ -1843,6 +1857,7 @@ cy:
|
||||
invalid_email: "Rhowch gyfeiriad e-bost dilys"
|
||||
select_a_shipping_method: Dewiswch ddull cludo
|
||||
select_a_payment_method: Dewiswch ddull talu
|
||||
no_shipping_methods_available: Nid yw'n bosibl talu oherwydd diffyg opsiynau cludo. Cysylltwch â pherchennog y siop.
|
||||
order_paid: TALWYD
|
||||
order_not_paid: HEB EI DALU
|
||||
order_total: Cyfanswm archeb
|
||||
@@ -2572,6 +2587,8 @@ cy:
|
||||
report_header_hub_address: Cyfeiriad Hwb
|
||||
report_header_to_hub: I Hwb
|
||||
report_header_hub_code: Cod Hwb
|
||||
report_header_hub_id: Dull Adnabod Hyb
|
||||
report_header_hub_owner_email: Ebost Perchennog yr Hyb
|
||||
report_header_code: Côd
|
||||
report_header_paid: Wedi talu?
|
||||
report_header_delivery: Dosbarthu?
|
||||
@@ -2642,6 +2659,9 @@ cy:
|
||||
report_header_delivery_postcode: Cod Post Cyflenwi
|
||||
report_header_bulk_unit_size: Maint Uned Swmp
|
||||
report_header_weight: Pwysau
|
||||
report_header_height: Uchder
|
||||
report_header_width: Lled
|
||||
report_header_depth: Dyfnder
|
||||
report_header_sum_total: 'Cyfanswm '
|
||||
report_header_date_of_order: Dyddiad archebu
|
||||
report_header_amount_owing: Swm sy'n ddyledus
|
||||
@@ -2731,6 +2751,7 @@ cy:
|
||||
action_required: "Mae angen gewithredu"
|
||||
tag_rules: "Rheolau Tag"
|
||||
enterprise_fee_whole_order: Archeb cyfan
|
||||
enterprise_fee_by_name: "%{name} fee by %{role}%{enterprise_name}"
|
||||
validation_msg_relationship_already_established: "^ Sefydlwyd y berthynas honno eisoes."
|
||||
validation_msg_at_least_one_hub: "^ Rhaid dewis o leiaf un hwb"
|
||||
validation_msg_tax_category_cant_be_blank: "^ Ni chaniateir gadael y Categori Trethi yn wag"
|
||||
@@ -3555,6 +3576,7 @@ cy:
|
||||
email: E-bost
|
||||
account_updated: "Diweddarwyd y cyfrif!"
|
||||
email_updated: "Bydd y cyfrif yn cael ei ddiweddaru ar ôl cadarnhau'r cyfeiriad e-bost newydd."
|
||||
show_api_key_view_toggled: "Dangos y newidiwyd gwedd yr allwedd API!"
|
||||
my_account: "Fy nghyfrif"
|
||||
date: "Dyddiad"
|
||||
time: "Amser"
|
||||
@@ -3700,6 +3722,11 @@ cy:
|
||||
results_found: "Cafwyd hyd i%{number} canlyniad."
|
||||
viewing: "Yn edrych ar %{start} i %{end}."
|
||||
print_invoices: "Argraffu anfonebau"
|
||||
cancel_orders: "Canslo Archebion"
|
||||
selected:
|
||||
zero: "Ni ddewiswyd archeb."
|
||||
one: "Dewiswyd 1 archeb"
|
||||
other: "Dewiswyd %{count} archeb"
|
||||
sortable_header:
|
||||
payment_state: "Cyflwr Talu"
|
||||
shipment_state: "Sir anfon"
|
||||
@@ -3839,6 +3866,7 @@ cy:
|
||||
paypal:
|
||||
no_payment_via_admin_backend: Ni ellir cipio taliadau Paypal yn y Swyddfa Gefn
|
||||
products:
|
||||
image_upload_error: "Dylid defnyddio fformat JPG, ONG, GIF, SVG neu WEBP i lanlwytho'r llun."
|
||||
new:
|
||||
title: "Cynnyrch Newydd"
|
||||
new_product: "Cynnyrch Newydd"
|
||||
@@ -4104,10 +4132,14 @@ cy:
|
||||
users:
|
||||
api_keys:
|
||||
regenerate_key: "Allwedd Adfer"
|
||||
title: Allwedd API
|
||||
developer_settings:
|
||||
title: Gosodiadau'r Datblygwr
|
||||
form:
|
||||
account_settings: Gosodiadau Cyfrif
|
||||
show:
|
||||
tabs:
|
||||
developer_settings: Gosodiadau'r Datblygwr
|
||||
orders: Archebion
|
||||
cards: Cardiau Credyd
|
||||
transactions: Trafodion
|
||||
@@ -4138,6 +4170,7 @@ cy:
|
||||
total: Cyfanswm
|
||||
paid?: Talwyd?
|
||||
status: Statws
|
||||
completed: Cwblhawyd
|
||||
cancelled: Canslwyd
|
||||
saved_cards:
|
||||
default?: Yn ddiofyn?
|
||||
@@ -4149,6 +4182,7 @@ cy:
|
||||
authorised_shops:
|
||||
shop_name: "Enw'r Siop"
|
||||
allow_charges?: "Caniatau defnyddio'r Cerdyn Diofyn i dalu?"
|
||||
no_default_saved_cards_tooltip: Mae angen ichi nodi un cerdyn credyd fel cerdyn diofyn i ganiatau ffioedd.
|
||||
localized_number:
|
||||
invalid_format: fformat annilys. Noder rhif.
|
||||
api:
|
||||
@@ -4167,6 +4201,7 @@ cy:
|
||||
shipment:
|
||||
cannot_ready: "Methu â pharatoi'r llwyth."
|
||||
invalid_taxonomy_id: "Tacsonomeg id. annilys"
|
||||
toggle_api_key_view: "Dangos gwedd yr allwedd API ar gyfer y defnyddiwr."
|
||||
activerecord:
|
||||
models:
|
||||
spree/payment:
|
||||
@@ -4239,3 +4274,10 @@ cy:
|
||||
two: "%{count} mlynedd"
|
||||
many: "%{count} mlynedd"
|
||||
other: "%{count} blwyddyn"
|
||||
errors:
|
||||
not_found:
|
||||
title: "Nid yw'r dudalen rydych yn chwilio amdani'n bodoli (404)"
|
||||
internal_server_error:
|
||||
title: "Mae'n ddrwg gennym, aeth rhywbeth o'i le (500)"
|
||||
unprocessable_entity:
|
||||
title: "Gwrthodwyd y newid roeddech chi am ei wneud (422)"
|
||||
|
||||
@@ -23,6 +23,8 @@ de_CH:
|
||||
state: Status
|
||||
source: Zahlungsart
|
||||
spree/product:
|
||||
name: "Produktname"
|
||||
price: "Preis"
|
||||
primary_taxon: "Produktkategorie"
|
||||
supplier: "Lieferant"
|
||||
shipping_category_id: "Lieferkategorie"
|
||||
@@ -2630,6 +2632,9 @@ de_CH:
|
||||
report_header_delivery_postcode: Lieferpostleitzahl
|
||||
report_header_bulk_unit_size: Gruppenkauf-Einheit
|
||||
report_header_weight: Gewicht
|
||||
report_header_height: Höhe
|
||||
report_header_width: Breite
|
||||
report_header_depth: Tiefe
|
||||
report_header_sum_total: Gesamtsumme
|
||||
report_header_date_of_order: Bestelldatum
|
||||
report_header_amount_owing: Offener Betrag
|
||||
|
||||
@@ -23,11 +23,14 @@ de_DE:
|
||||
state: Status
|
||||
source: Zahlungsart
|
||||
spree/product:
|
||||
name: "Produktname"
|
||||
price: "Preis"
|
||||
primary_taxon: "Produktkategorie"
|
||||
supplier: "Lieferant"
|
||||
shipping_category_id: "Lieferkategorie"
|
||||
variant_unit: "Varianteneinheit"
|
||||
variant_unit_name: "Name der Varianteneinheit"
|
||||
unit_value: "Menge"
|
||||
spree/credit_card:
|
||||
base: "Kreditkarte"
|
||||
number: "Kreditkartennummer"
|
||||
@@ -178,6 +181,8 @@ de_DE:
|
||||
updated_not_active: "Ihr Passwort wurde zurückgesetzt, aber ihre E-Mail-Adresse muss noch bestätigt werden."
|
||||
updated: "Ihr Kennwort wurde erfolgreich geändert. Sie sind jetzt angemeldet."
|
||||
send_instructions: "Sie erhalten in Kürze eine E-Mail mit Anweisungen zur Bestätigung Ihres Kontos."
|
||||
oidc:
|
||||
failure: "Einloggen nicht möglich: %{error}"
|
||||
home_page_alert_html: "Startseite Banner HTML"
|
||||
hub_signup_case_studies_html: "Registrierung für Läden - Beispiele HTML"
|
||||
hub_signup_detail_html: "Registrierung für Läden - Details HTML"
|
||||
@@ -770,7 +775,7 @@ de_DE:
|
||||
current_fulfilled_units: "Aktuell erfüllte Einheiten"
|
||||
max_fulfilled_units: "Max erfüllte Einheiten"
|
||||
order_error: "Bevor Sie Bestellungen aktualisieren können, müssen Fehler behoben werden.\nFelder mit roten Rahmen enthalten Fehler."
|
||||
variants_without_unit_value: "WARNUNG: Manche Produktvarianten haben keine Einheit"
|
||||
variants_without_unit_value: "ACHTUNG: Für manche Produktvarianten ist keine Einheit festgelegt!"
|
||||
all: "Alle"
|
||||
select_variant: "Wählen Sie eine Produktvariante"
|
||||
note:
|
||||
@@ -968,12 +973,12 @@ de_DE:
|
||||
facebook_placeholder: "z. B. www.facebook.com/IhreSeite"
|
||||
linkedin_placeholder: "z. B. www.linkedin.com/in/IhrName"
|
||||
stripe_connect:
|
||||
connect_with_stripe: "Stripe integrieren"
|
||||
connect_with_stripe: "Mit Stripe verbinden"
|
||||
stripe_connect_intro: "Um Zahlungen mit Kreditkarte zu akzeptieren, müssen Sie Ihr Stripe-Konto mit dem Open Food Network verbinden. Verwenden Sie die Schaltfläche rechts, um loszulegen."
|
||||
stripe_account_connected: "Stripe-Konto verbunden."
|
||||
disconnect: "Stripe-Konto trennen"
|
||||
confirm_modal:
|
||||
title: Stripe integrieren
|
||||
title: Mit Stripe verbinden
|
||||
part1: Stripe ist ein Zahlungsdienst, der es Läden im Open Food Network ermöglicht, Kreditkartenzahlungen von Kunden entgegenzunehmen.
|
||||
part2: Um diese Funktion zu verwenden, müssen Sie Ihr Stripe-Konto mit dem Open Food Network verbinden. Klicken Sie "Zustimmen", um auf die Stripe-Website weitergeleitet zu werden, wo Sie ein bestehendes Stripe-Konto verbinden oder ein neues erstellen können.
|
||||
part3: Dadurch kann das Open Food Network Kreditkartenzahlungen von Kunden in Ihrem Namen akzeptieren. Bitte beachten Sie, dass Sie ein eigenes Stripe-Konto benötigen, die entstehenden Stripe-Gebühren bezahlen und etwaige Rückbuchungen und Kundenservices selbst vornehmen müssen.
|
||||
@@ -1344,6 +1349,15 @@ de_DE:
|
||||
formatted_data: Formatierte Daten
|
||||
packing:
|
||||
name: "Packlisten"
|
||||
oidc_settings:
|
||||
index:
|
||||
title: "OIDC-Einstellungen"
|
||||
connect: "Verbinden Sie Ihr Benutzerkonto"
|
||||
already_connected: "Ihr Benutzerkonto ist bereits mit diesem DFC-Autorisierungskonto verbunden:"
|
||||
les_communs_link: "Les Communs Open ID-Server"
|
||||
link_your_account: "Sie müssen Ihr Benutzerkonto zunächst mit dem von DFC (Les Communs Open ID Connect) verwendeten Autorisierungsanbieter verbinden."
|
||||
link_account_button: "Verbinden Sie Ihr Les Communs OIDC-Konto"
|
||||
view_account: "Ihr Benutzerkonto anzeigen:"
|
||||
subscriptions:
|
||||
index:
|
||||
title: "Abonnements"
|
||||
@@ -2489,7 +2503,7 @@ de_DE:
|
||||
spree_admin_single_enterprise_alert_mail_sent: "Wir haben eine E-Mail gesendet an "
|
||||
spree_admin_overview_action_required: "Handlung erforderlich"
|
||||
spree_admin_overview_check_your_inbox: "Bitte überprüfen Sie Ihren Posteingang für weitere Anweisungen. Vielen Dank!"
|
||||
spree_admin_unit_value: Einheitswert
|
||||
spree_admin_unit_value: Menge
|
||||
spree_admin_unit_description: Einheit Beschreibung
|
||||
spree_admin_variant_unit: Varianteneinheit
|
||||
spree_admin_variant_unit_scale: Einheit der Produktvariante
|
||||
@@ -2588,7 +2602,17 @@ de_DE:
|
||||
report_header_to_hub: An den Hub
|
||||
report_header_hub_code: Hub-Code
|
||||
report_header_hub_id: Laden-ID
|
||||
report_header_hub_business_number: "USt-IdNr."
|
||||
report_header_hub_legal_name: "Unternehmensname"
|
||||
report_header_hub_contact_name: "Kontaktname"
|
||||
report_header_hub_email: "Öffentliche E-Mail-Adresse"
|
||||
report_header_hub_owner_email: E-Mail-Adresse des Ladenbetreibers
|
||||
report_header_hub_phone: "Telefonnummer"
|
||||
report_header_hub_address_line1: "Straße + Hausnummer"
|
||||
report_header_hub_address_line2: "Adresszusatz"
|
||||
report_header_hub_address_city: "Ort"
|
||||
report_header_hub_address_zipcode: "Postleitzahl"
|
||||
report_header_hub_address_state_name: "Bundesland"
|
||||
report_header_code: Code
|
||||
report_header_paid: Bezahlt?
|
||||
report_header_delivery: Lieferung?
|
||||
@@ -2623,6 +2647,7 @@ de_DE:
|
||||
report_header_total_tax: "Summe Steuern (%{currency_symbol})"
|
||||
report_header_total_excl_tax: "Summe exkl. Steuern (%{currency_symbol})"
|
||||
report_header_total_incl_tax: "Summe inkl. Steuern (%{currency_symbol})"
|
||||
report_header_total_orders: "Anzahl der Bestellungen"
|
||||
report_header_enterprise: Unternehmen
|
||||
report_header_customer: Kunde
|
||||
report_header_customer_code: Kundennummer
|
||||
@@ -2659,6 +2684,9 @@ de_DE:
|
||||
report_header_delivery_postcode: Lieferpostleitzahl
|
||||
report_header_bulk_unit_size: Gruppenkauf-Einheit
|
||||
report_header_weight: Gewicht
|
||||
report_header_height: Höhe
|
||||
report_header_width: Breite
|
||||
report_header_depth: Tiefe
|
||||
report_header_sum_total: Gesamtsumme
|
||||
report_header_date_of_order: Bestelldatum
|
||||
report_header_amount_owing: Offener Betrag
|
||||
@@ -4037,7 +4065,7 @@ de_DE:
|
||||
thanks: "Danke für Ihren Einkauf!"
|
||||
track_information: "Sendungsinformationen: %{tracking}"
|
||||
track_link: "Link zur Sendung: %{url}"
|
||||
picked_up_instructions: "Ihre Bestellung bei %{distributor} wurde abgeholt"
|
||||
picked_up_instructions: "Ihre Bestellung bei %{distributor} wurde abgeholt. "
|
||||
picked_up_subject: "Abholbenachrichtigung"
|
||||
test_mailer:
|
||||
test_email:
|
||||
@@ -4213,3 +4241,6 @@ de_DE:
|
||||
unprocessable_entity:
|
||||
title: "Die gewünschte Änderung wurde abgelehnt (422). "
|
||||
message_html: "<p>Die gewünschte Änderung wurde abgelehnt. Vielleicht haben Sie versucht, etwas zu ändern, auf das Sie keinen Zugriff haben.<br><h3> <a href='/' >Zur Startseite zurückkehren</a></h3></p>"
|
||||
components:
|
||||
multiple_checked_select:
|
||||
filter_placeholder: "Suche"
|
||||
|
||||
@@ -44,11 +44,14 @@ en:
|
||||
state: State
|
||||
source: Source
|
||||
spree/product:
|
||||
name: "Product Name"
|
||||
price: "Price"
|
||||
primary_taxon: "Product Category"
|
||||
supplier: "Supplier"
|
||||
shipping_category_id: "Shipping Category"
|
||||
variant_unit: "Variant Unit"
|
||||
variant_unit_name: "Variant Unit Name"
|
||||
unit_value: "Unit value"
|
||||
spree/credit_card:
|
||||
base: "Credit Card"
|
||||
number: "Number"
|
||||
@@ -224,7 +227,8 @@ en:
|
||||
updated_not_active: "Your password has been reset, but your email has not been confirmed yet."
|
||||
updated: "Your password was changed successfully. You are now signed in."
|
||||
send_instructions: "You will receive an email with instructions about how to confirm your account in a few minutes."
|
||||
|
||||
oidc:
|
||||
failure: "Could not sign in: %{error}"
|
||||
home_page_alert_html: "Home page alert HTML"
|
||||
hub_signup_case_studies_html: "Hub signup case studies HTML"
|
||||
hub_signup_detail_html: "Hub signup detail HTML"
|
||||
@@ -702,6 +706,7 @@ en:
|
||||
conditional_blank: can't be blank if unit_type is blank
|
||||
no_product: did not match any products in the database
|
||||
not_found: not found in database
|
||||
category_not_found: doesn't match allowed categories. See the correct categories to choose from on the product import page, or check that there's no misspelling.
|
||||
not_updatable: cannot be updated on existing products via product import
|
||||
blank: can't be blank
|
||||
products_no_permission: you do not have permission to manage products for this enterprise
|
||||
@@ -1423,6 +1428,15 @@ en:
|
||||
formatted_data: Formatted Data
|
||||
packing:
|
||||
name: "Packing Reports"
|
||||
oidc_settings:
|
||||
index:
|
||||
title: "OIDC Settings"
|
||||
connect: "Connect Your Account"
|
||||
already_connected: "Your account is already linked to this DFC authorization account:"
|
||||
les_communs_link: "Les Communs Open ID server"
|
||||
link_your_account: "You need first to link your account with the authorization provider used by DFC (Les Communs Open ID Connect)."
|
||||
link_account_button: "Link your Les Communs OIDC Account"
|
||||
view_account: "To view your account, see:"
|
||||
subscriptions:
|
||||
index:
|
||||
title: "Subscriptions"
|
||||
@@ -2745,7 +2759,17 @@ See the %{link} to find out more about %{sitename}'s features and to start using
|
||||
report_header_to_hub: To Hub
|
||||
report_header_hub_code: Hub Code
|
||||
report_header_hub_id: Hub ID
|
||||
report_header_hub_business_number: "Hub Business Number"
|
||||
report_header_hub_legal_name: "Hub Legal Name"
|
||||
report_header_hub_contact_name: "Hub Contact Name"
|
||||
report_header_hub_email: "Hub Public Email"
|
||||
report_header_hub_owner_email: Hub Owner Email
|
||||
report_header_hub_phone: "Hub Phone Number"
|
||||
report_header_hub_address_line1: "Hub Address Line 1"
|
||||
report_header_hub_address_line2: "Hub Address Line 2"
|
||||
report_header_hub_address_city: "Hub Suburb"
|
||||
report_header_hub_address_zipcode: "Hub Postcode"
|
||||
report_header_hub_address_state_name: "Hub State"
|
||||
report_header_code: Code
|
||||
report_header_paid: Paid?
|
||||
report_header_delivery: Delivery?
|
||||
@@ -2780,6 +2804,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using
|
||||
report_header_total_tax: "Total Tax (%{currency_symbol})"
|
||||
report_header_total_excl_tax: "Total excl. tax (%{currency_symbol})"
|
||||
report_header_total_incl_tax: "Total incl. tax (%{currency_symbol})"
|
||||
report_header_total_orders: "Total Number of Orders"
|
||||
report_header_enterprise: Enterprise
|
||||
report_header_customer: Customer
|
||||
report_header_customer_code: Customer Code
|
||||
@@ -2816,6 +2841,9 @@ See the %{link} to find out more about %{sitename}'s features and to start using
|
||||
report_header_delivery_postcode: Delivery Postcode
|
||||
report_header_bulk_unit_size: Bulk Unit Size
|
||||
report_header_weight: Weight
|
||||
report_header_height: Height
|
||||
report_header_width: Width
|
||||
report_header_depth: Depth
|
||||
report_header_sum_total: Sum Total
|
||||
report_header_date_of_order: Date of Order
|
||||
report_header_amount_owing: Amount Owing
|
||||
|
||||
@@ -22,6 +22,8 @@ en_AU:
|
||||
state: State
|
||||
source: Source
|
||||
spree/product:
|
||||
name: "Product Name"
|
||||
price: "Price"
|
||||
primary_taxon: "Product Category"
|
||||
supplier: "Supplier"
|
||||
shipping_category_id: "Shipping Category"
|
||||
@@ -2390,6 +2392,9 @@ en_AU:
|
||||
report_header_delivery_postcode: Delivery Postcode
|
||||
report_header_bulk_unit_size: Bulk Unit Size
|
||||
report_header_weight: Weight
|
||||
report_header_height: Height
|
||||
report_header_width: Width
|
||||
report_header_depth: Depth
|
||||
report_header_sum_total: Sum Total
|
||||
report_header_date_of_order: Date of Order
|
||||
report_header_amount_owing: Amount Owing
|
||||
|
||||
@@ -21,6 +21,8 @@ en_BE:
|
||||
amount: Amount
|
||||
state: State
|
||||
spree/product:
|
||||
name: "Product Name"
|
||||
price: "Price"
|
||||
primary_taxon: "Product Category"
|
||||
supplier: "Supplier"
|
||||
shipping_category_id: "Shipping Category"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user