Matt-Yorkley
ab143ceaed
Merge pull request #5352 from pacodelaluna/change-date-displayed-on-sales-tax-report
...
Change date displayed on sales_tax reports
2020-05-11 09:56:38 +02:00
Matt-Yorkley
3ca491683a
Merge pull request #5317 from Matt-Yorkley/caching-timed-shops
...
[Caching] Timed caching on shops data
2020-05-09 15:33:26 +02:00
Pau Pérez Fabregat
b85e439b0e
Merge pull request #5395 from coopdevs/skip-broken-spec
...
Skip unreliable caching test
2020-05-08 17:11:12 +02:00
Pau Perez
fa8c1270ce
Skip unreliable caching test
...
This spec failed two times in a row and it's blocking the release.
2020-05-08 16:37:30 +02:00
Pau Pérez Fabregat
09caf88b6c
Merge pull request #5396 from coopdevs/fix-brittle-test
...
Make test not depend on response's order
2020-05-08 16:37:06 +02:00
Pau Perez
b99bcc3c12
Make test not depend on response's order
...
I'm assuming this is failing in CI due to the order in which the closed
shops are returned.
2020-05-08 15:56:20 +02:00
Pau Perez
ad70a63370
Update all locales with the latest Transifex translations
2020-05-08 12:01:42 +02:00
Pau Pérez Fabregat
60470aaf9f
Merge pull request #5332 from coopdevs/add-timestamps-to-oc-schedule
...
Add timestamps to OC schedule join table
2020-05-08 10:51:43 +02:00
Pau Pérez Fabregat
2cf407ce35
Merge pull request #5349 from openfoodfoundation/transifex
...
Transifex
2020-05-08 10:20:07 +02:00
Pau Pérez Fabregat
c38c59b0b9
Merge pull request #5223 from luisramos0/def_user
...
Change default user from spree@example.com to ofn@example.com ❤️
2020-05-08 09:51:31 +02:00
Luis Ramos
424932d61b
Merge pull request #5262 from luisramos0/closed_shop_msg
...
[Mobile] Improve the design of shop page messages (closed shop, private shop and select OC)
2020-05-08 07:52:58 +01:00
Matt-Yorkley
5518ffa856
Ensure validations are called when updating attributes in test
2020-05-07 19:37:43 +02:00
Luis Ramos
dd5041db65
Remove unnecessary default user email and pwd from docker setup
...
These are now the default values in the app
2020-05-07 18:18:42 +01:00
Luis Ramos
052dbca1ba
Merge pull request #5370 from Matt-Yorkley/dont-render-twice
...
Don't render twice
2020-05-07 18:15:47 +01:00
Matt-Yorkley
86bfd1bebb
Add explanatory comments on usages of Timecop.travel
2020-05-07 17:29:58 +02:00
Luis Ramos
468576ee8a
Merge pull request #5329 from romale/master
...
Correct translations
2020-05-07 16:04:24 +01:00
Luis Ramos
c9b60d0f62
Merge pull request #5341 from mathewdbutton/5173-show-outstanding-order-balance-on-orders-page
...
Show outstanding balance on orders page
2020-05-07 16:03:58 +01:00
Luis Ramos
52b39d04a4
Merge pull request #5359 from mbudm/issue/5108
...
Add NavigationCheck to order cycles edit form
2020-05-07 14:37:32 +01:00
Matt-Yorkley
01d741509f
Fix test of rendered properties AMS
...
Here the displayed properties that we're testing also rely on shops data (including the list of supplied properties), which is now cached for 15 seconds. We clear that cache entry so we can cleanly test only the caching of the properties AMS array.
2020-05-07 15:20:37 +02:00
Luis Ramos
66fe26fcc5
Merge pull request #5295 from Matt-Yorkley/shopfront-optimising
...
Enterprise serializer optimisations
2020-05-07 13:08:14 +01:00
Matt-Yorkley
460ab6cdb4
Use #allow instead of #stub
2020-05-07 13:20:30 +02:00
Matt-Yorkley
7457543c2b
Adds spec for timed caching on shops data
2020-05-07 13:20:30 +02:00
Matt-Yorkley
6b6ab864ef
Improve comment on Fragment Caching
2020-05-07 13:20:30 +02:00
Matt-Yorkley
e73c8232de
Improve unit test in cache_service_spec
2020-05-07 13:20:30 +02:00
Matt-Yorkley
37821beb1b
Extract home stats caching to method in service
2020-05-07 13:20:30 +02:00
Matt-Yorkley
2292cbaae4
Extract timed enterprise AMS fragment caching options to service
2020-05-07 13:20:28 +02:00
Luis Ramos
987347d5ab
Move translation keys to new correct location
2020-05-07 12:18:40 +01:00
Luis Ramos
3c7970f72f
Add select oc message when there are multiple OCs
2020-05-07 12:18:40 +01:00
Luis Ramos
d4980893a1
Refactor darker-background directive, extract method
2020-05-07 12:17:43 +01:00
Luis Ramos
0d6d071db2
Remove dead class .shopfront_hidden_message
2020-05-07 12:17:43 +01:00
Luis Ramos
cba9382230
Replace line-height with margin
2020-05-07 12:17:43 +01:00
Luis Ramos
7fcee0fe6d
Fix problem in warning sign
2020-05-07 12:17:43 +01:00
Luis Ramos
f3347a8e16
Make teal links appear only when the darker background is activated
...
This way links in producers, about, etc, where the background is white will still appear as orange, as per design
2020-05-07 12:17:43 +01:00
Luis Ramos
782988b61c
Fix with-darker-background class by moving it inside page-view selector and using opacity instead of just grey so that other elements in the page (shadow from element above) can be seen
2020-05-07 12:17:43 +01:00
Luis Ramos
21a1ba2fb5
Move translation keys according to new location in the customer_required partial
2020-05-07 12:17:43 +01:00
Luis Ramos
ba25986756
Fix some css rubocop issues
2020-05-07 12:17:43 +01:00
Luis Ramos
098ad6f250
Merge partial messages back to home partial where it is only used
2020-05-07 12:17:43 +01:00
Luis Ramos
319657d2c5
Move closed shop partial to /messages
2020-05-07 12:17:43 +01:00
Luis Ramos
eb773a813e
Extract open shop message to partial
2020-05-07 12:17:43 +01:00
Luis Ramos
5dedbc4231
Extract customer_required message to separate partial
2020-05-07 12:17:43 +01:00
Luis Ramos
84c00fe215
Remove duplicate conditionals already present in ShopHelper#shop_tabs, when these partials are rendered, these conditions will always be true
...
In the shops partial, by adding the else, we avoid rendering empty space with an empty
products list in case the shop is closed
2020-05-07 12:17:43 +01:00
Luis Ramos
77d7d2b804
Make the background darker only in specific cases
2020-05-07 12:17:43 +01:00
Luis Ramos
b34fb79d69
Move content div to messages partial so that it's not used in the closed shop message (no margin according to design)
2020-05-07 12:17:43 +01:00
Luis Ramos
1c41061f9e
If shop is closed show closed shop message partial in the home tab
2020-05-07 12:17:43 +01:00
Luis Ramos
b86081090f
Extract closed shop message to a partial
2020-05-07 12:17:43 +01:00
Luis Ramos
dbdbe01d6a
Add new style to closed shop message
2020-05-07 12:17:43 +01:00
Luis Ramos
0996c28c09
Memoize helper methods that are called several times in the views
2020-05-07 12:17:43 +01:00
Luis Ramos
5f70ef6e75
Improve style of closed shop message and remove border from message
2020-05-07 12:17:43 +01:00
Luis Ramos
e0b3e9a040
Remove border of message and paddings, add background color, change link color and split message in two lines
2020-05-07 12:17:43 +01:00
Matt-Yorkley
2876b98155
Use time-based caching on rendered AMS data for shops
2020-05-07 13:11:53 +02:00
Matt-Yorkley
545ca85644
Extract caching of homepage stats to service
2020-05-07 13:11:28 +02:00
Luis Ramos
c64ba75e8d
Merge pull request #5348 from luisramos0/single_oc_selector
...
Replace select box with text when only one OC is available for selection
2020-05-07 12:07:19 +01:00
Luis Ramos
56b9737676
Merge pull request #5343 from luisramos0/windows
...
Make OC selector options color explicitly gray and not white
2020-05-07 11:44:14 +01:00
Luis Ramos
d967d855fc
Merge pull request #5319 from Matt-Yorkley/caching-by-class
...
[Caching] Caching data by class
2020-05-07 11:43:44 +01:00
Luis Ramos
1e9b4516cb
Merge pull request #5318 from Matt-Yorkley/caching-api
...
[Caching] API Action Caching on shop filters
2020-05-07 11:42:52 +01:00
Transifex-Openfoodnetwork
ffebaee9c7
Updating translations for config/locales/tr.yml
2020-05-07 17:34:22 +10:00
Luis Ramos
066f978c59
Update ruby version in GETTING_STARTED
2020-05-06 22:19:43 +01:00
Luis Ramos
d1392d400a
Merge pull request #5350 from luisramos0/edit_order_snail
...
Improve order edit page in data inconsistency scenario (follow up from S2 #4186 )
2020-05-06 20:33:40 +01:00
Luis Ramos
20984ac008
Merge pull request #5379 from openfoodfoundation/dependabot/bundler/ddtrace-0.35.1
...
Bump ddtrace from 0.35.0 to 0.35.1
2020-05-06 20:31:20 +01:00
dependabot-preview[bot]
7f9dfb6142
Bump ddtrace from 0.35.0 to 0.35.1
...
Bumps [ddtrace](https://github.com/DataDog/dd-trace-rb ) from 0.35.0 to 0.35.1.
- [Release notes](https://github.com/DataDog/dd-trace-rb/releases )
- [Changelog](https://github.com/DataDog/dd-trace-rb/blob/master/CHANGELOG.md )
- [Commits](https://github.com/DataDog/dd-trace-rb/compare/v0.35.0...v0.35.1 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-05-06 19:20:07 +00:00
Transifex-Openfoodnetwork
6c71259b25
Updating translations for config/locales/en_FR.yml
2020-05-07 03:10:34 +10:00
Transifex-Openfoodnetwork
29a54cbfe4
Updating translations for config/locales/fr.yml
2020-05-07 03:10:22 +10:00
Transifex-Openfoodnetwork
05820c7ef0
Updating translations for config/locales/tr.yml
2020-05-07 00:14:33 +10:00
Transifex-Openfoodnetwork
492f96c90f
Updating translations for config/locales/tr.yml
2020-05-07 00:11:28 +10:00
Pau Pérez Fabregat
ace3767eb2
Merge pull request #5333 from coopdevs/add-worker-docker-container
...
Create a container to run a DJ worker in dev
2020-05-06 16:11:21 +02:00
Luis Ramos
c7c8bfe212
Merge pull request #5347 from luisramos0/hide_oc_selector_for_private_shop
...
[Mobile] Hide OC selector if shop requires login/customer
2020-05-06 14:31:52 +01:00
Pau Pérez Fabregat
dadc17398f
Merge pull request #5371 from Matt-Yorkley/cart-add-error
...
Cart add error handling
2020-05-06 15:22:06 +02:00
Pau Pérez Fabregat
194c87e805
Merge pull request #5361 from Matt-Yorkley/cart-with-soft-deletion
...
Cart with soft-deletion
2020-05-06 15:20:35 +02:00
Pau Pérez Fabregat
ead21a97cc
Merge pull request #5327 from openfoodfoundation/luisramos0-patch-2
...
Add link to docker tips wiki page to Docker.md
2020-05-06 14:10:37 +02:00
Pau Pérez Fabregat
a0012e1c5b
Merge pull request #5326 from openfoodfoundation/luisramos0-patch-1-1
...
Add link to Docker.md from GETTING_STARTED.md
2020-05-06 12:31:00 +02:00
Matt-Yorkley
9c24c1cd05
Ensure #caches_action works in test suite
2020-05-06 12:24:33 +02:00
Matt-Yorkley
4aac97c985
Add feature spec for action caching of taxon and properties endpoints
2020-05-06 11:47:51 +02:00
Matt-Yorkley
7e4c00ba3f
Ensure caching works in cache tests for API controllers
2020-05-06 11:47:45 +02:00
Pau Pérez Fabregat
65433c6ac6
Merge pull request #5351 from luisramos0/improve_sample_data
...
Improve ship methods names on sample data
2020-05-06 11:27:34 +02:00
Pau Pérez Fabregat
b3205c5459
Merge pull request #5309 from luisramos0/better-karma
...
Make dockerfile install node and adapt karma browser config to work inside a docker container
2020-05-06 11:11:00 +02:00
Transifex-Openfoodnetwork
d52db51b29
Updating translations for config/locales/nb.yml
2020-05-06 17:25:07 +10:00
Mathew Button
e088b27a13
Always display the outstanding balance if not zero
2020-05-06 16:45:44 +10:00
Steve Roberts
4573127c59
Add NavigationCheck to order cycles edit form
...
- Simplify if statements with safe navigation operator
- Simplify order cycle nav check spec
- Rename nav check callback so a comment is not needed and remove unnecessary assignation to $scope
2020-05-06 10:43:21 +10:00
Matt-Yorkley
61d7adaf74
Enable optional caching tag in test metadata
2020-05-05 18:43:09 +02:00
Matt-Yorkley
bdc2d002fa
Update karma tests
2020-05-05 17:22:12 +02:00
Matt-Yorkley
13e4411b89
Add error message on cart populate failure and don't keep re-sending the data to the server.
...
This was triggering many requests to be continuously re-sent in a very problematic way (server-melting), and with no user feedback.
2020-05-05 17:22:10 +02:00
Luis Ramos
c2a9a698f4
Merge pull request #5312 from openfoodfoundation/dependabot/bundler/unicorn-5.5.5
...
Bump unicorn from 5.5.4 to 5.5.5
2020-05-05 15:24:59 +01:00
Matt-Yorkley
9a7807b134
Don't continuously re-post data on cart error
2020-05-05 16:04:05 +02:00
Luis Ramos
24414b83dd
Merge pull request #5325 from oeoeaio/enhancement-5214
...
Add order number and date/time to order cycles customer report
2020-05-05 14:34:47 +01:00
Matt-Yorkley
4f4b3fb206
Don't render twice 🙈
2020-05-05 15:21:05 +02:00
Matt-Yorkley
6afda87baf
Add explanatory comment on soft-deleted variant stock logic
2020-05-05 13:57:50 +02:00
Matt-Yorkley
0a28abbf2d
Add additional feature specs for soft-deleted variants in cart
2020-05-05 13:57:50 +02:00
Matt-Yorkley
26ba76cff9
Fix soft-deletion in CartService and update spec
2020-05-05 13:57:50 +02:00
Matt-Yorkley
a3458aa562
Ensure VariantStockLevels can process soft-deleted variants
2020-05-05 13:57:50 +02:00
Matt-Yorkley
0e429da377
Return zero available stock (total_on_hand) for variants that are soft-deleted
2020-05-05 13:57:50 +02:00
Matt-Yorkley
eb51b87bea
Add spec for current soft deletion behaviour in OrderCycle#variants_distributed_by scope
2020-05-05 13:57:50 +02:00
Matt-Yorkley
d3de1ce47e
Add spec for current soft deletion behaviour in VariantOverride#indexed
2020-05-05 13:57:50 +02:00
Matt-Yorkley
5639b21c77
Add tests for current soft-deleted variant behavior in CartService
2020-05-05 13:57:50 +02:00
Matt-Yorkley
068c8feea7
Merge pull request #5289 from Matt-Yorkley/cart-populate
...
Cart populate
2020-05-05 13:56:17 +02:00
François Turbelin
6e5cbebf4a
Change date value on order_and_distributor_report
2020-05-05 12:27:17 +02:00
François Turbelin
9cfd7db99d
Change date displayed on sales_tax reports
2020-05-05 12:27:17 +02:00
Luis Ramos
bcfa8982ef
Merge pull request #5364 from openfoodfoundation/dependabot/bundler/ddtrace-0.35.0
...
Bump ddtrace from 0.34.2 to 0.35.0
2020-05-05 10:58:13 +01:00
Matt-Yorkley
805f91e838
Remove unnecessary #all call
2020-05-05 09:56:08 +02:00
Matt-Yorkley
a3757992b5
Use #tap to destroy and remove before block
2020-05-05 09:55:14 +02:00
dependabot-preview[bot]
7180af2736
Bump ddtrace from 0.34.2 to 0.35.0
...
Bumps [ddtrace](https://github.com/DataDog/dd-trace-rb ) from 0.34.2 to 0.35.0.
- [Release notes](https://github.com/DataDog/dd-trace-rb/releases )
- [Changelog](https://github.com/DataDog/dd-trace-rb/blob/master/CHANGELOG.md )
- [Commits](https://github.com/DataDog/dd-trace-rb/compare/v0.34.2...v0.35.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-05-04 22:46:59 +00:00
Mathew Button
fe6c810505
Add brackets in view instead of API response
2020-05-04 19:09:18 +10:00
Luis Ramos
44872844ed
Make ship methods in sample data have the name of the enterprise so it's easier to distinguish them
2020-05-03 16:36:12 +01:00
Luis Ramos
bf0b941e1c
Merge pull request #4935 from coopdevs/data-archiving
...
Allow data archiving using the :truncate_data task
2020-05-03 12:58:31 +01:00
Luis Ramos
e2b26b2e9c
Replace break with if
...
What we would need would be a continue, not break, so that other units will be processed without halting the cycle through the units
2020-05-03 12:00:23 +01:00
Luis Ramos
92d0a5b735
Change default user from spree@example.com to ofn@example.com
2020-05-03 10:12:43 +01:00
Luis Ramos
8e27ace563
Adapt specs where there is only one OC available to the absence of the OC selector
2020-05-02 20:16:41 +01:00
Transifex-Openfoodnetwork
93881a742e
Updating translations for config/locales/en_GB.yml
2020-05-03 05:09:16 +10:00
Luis Ramos
b92e257e44
Fix codeclimate issue
2020-05-02 19:12:47 +01:00
Luis Ramos
fa908d4024
Extract change_order_cycle partial from main enterprise shop view
2020-05-02 19:01:36 +01:00
Luis Ramos
7fd14cf29b
Adjust line height of select label and select itself
2020-05-02 19:01:36 +01:00
Luis Ramos
ef0e9dc0ca
Replace select box with text when only one OC is available for selection
2020-05-02 19:01:33 +01:00
Luis Ramos
89cb447387
Hide OC selector if shop requires login/customer
2020-05-02 17:56:49 +01:00
Luis Ramos
b568d25446
Update all locales with the latest Transifex translations
2020-05-02 17:08:53 +01:00
Luis Ramos
303464a04e
Merge pull request #5297 from openfoodfoundation/transifex
...
Transifex
2020-05-02 15:40:54 +01:00
Luis Ramos
0662c57d9d
Merge pull request #5344 from luisramos0/debug_assets
...
Move PROFILE debug assets flag to another ENV var
2020-05-02 14:21:15 +01:00
Luis Ramos
acb7e9751b
Move debug assets flag to another env var so we go back to having both profile and debug assets disabled by default
2020-05-02 10:42:49 +01:00
Luis Ramos
9ae3ad9279
Move rule on option out of the select rule to fix rubocop issue
2020-05-01 17:43:52 +01:00
Luis Ramos
240e2a36d3
Make option color explicitly gray and not white otherwise we will have options render white on white on some browsers, namely chrome on windows 10
2020-05-01 17:39:12 +01:00
Mathew Button
8087e6b31b
Show outstanding balance on orders page
...
Prior to this change, there was no way of knowing how much was owed (or
in need of refunding) at a glance for each order on the orders index page,
this information was only available by clicking through to an order
payment page
This change adds the outstanding balance for each order
2020-05-01 21:38:20 +10:00
Transifex-Openfoodnetwork
39875308c2
Updating translations for config/locales/en_FR.yml
2020-05-01 04:55:35 +10:00
Transifex-Openfoodnetwork
c424e7b65e
Updating translations for config/locales/fr.yml
2020-05-01 04:55:21 +10:00
Pau Perez
9d253e1e3e
Create a container to run a DJ worker in dev
2020-04-30 17:52:22 +02:00
Matt-Yorkley
1990417b72
Test values are not fetched from database when cache exists
2020-04-30 17:37:48 +02:00
Matt-Yorkley
7a22f7f783
Move and rename caching spec
2020-04-30 17:37:45 +02:00
Luis Ramos
74c7a01151
Merge pull request #5259 from luchiago/add-extra-social-media-to-emails
...
Add extra social media to order confirmation email
2020-04-30 15:01:09 +01:00
Matt-Yorkley
f724d1b572
Add feature spec for caching properties and taxons AMS
2020-04-30 15:35:39 +02:00
Luis Ramos
8845260979
Merge pull request #5285 from rmklaus12/5246-missing-translation-orders-list
...
5246 missing translation orders list
2020-04-30 14:00:26 +01:00
Pau Perez
1903134e13
Add timestamps to OC schedule join table
...
This is critical to debug bugs related to subscriptions.
Essentially, `has_and_belongs_to_many` doesn't give us the option for
any other column that the foreign keys themselves:
> A has_and_belongs_to_many association creates a direct many-to-many
> connection with another model, with no intervening model.
Source: https://guides.rubyonrails.org/v3.2/association_basics.html#the-has_and_belongs_to_many-association
Note however, that there's no way to update an order_cycle_schedule,
that I can think of but `updated_at` doesn't do any harm.
2020-04-30 15:00:13 +02:00
Pau Pérez Fabregat
4174ea69a1
Merge pull request #5247 from chrishil1/Placeholders_variant
...
Added placeholders in variant edit page
2020-04-30 12:05:59 +02:00
Pau Pérez Fabregat
676add18c3
Merge pull request #5322 from luisramos0/dead_content
...
Delete some dead views
2020-04-30 12:02:14 +02:00
Matt-Yorkley
a35f8cdb02
Move cache keys used in views into the cache service
2020-04-30 09:45:15 +02:00
Luis Ramos
8a107bee98
Merge pull request #5235 from luisramos0/mail_methods
...
Remove smtp config from admin config page
2020-04-29 19:10:02 +01:00
Matt-Yorkley
210029aaff
Enable optional caching tag in test metadata
2020-04-29 20:04:54 +02:00
Transifex-Openfoodnetwork
5bc5ef9a9d
Updating translations for config/locales/pt_BR.yml
2020-04-30 03:52:57 +10:00
Matt-Yorkley
f2cd122ec8
Update variant_stock_spec for unsaved and soft-deleted cases
2020-04-29 18:29:44 +02:00
Matt-Yorkley
4054bdd722
Add Bugsnag call for "variant with no stock item" case
2020-04-29 17:34:48 +02:00
romale
3a4ef2697c
Correct translations
...
Without it, some labels not translated to other language.
And, please check code:
en.admin.subscription.subscriptions - does not exists
but
en.admin.subscriptions.subscriptions - is exist
2020-04-29 18:27:09 +03:00
Matt-Yorkley
2bdda7de04
Change order of methods for easier reading
2020-04-29 17:22:46 +02:00
Matt-Yorkley
92a881c584
Simplify relation used in #exchanges_supplying
2020-04-29 17:19:16 +02:00
Pau Perez
647a7bdddf
Clarify we won't use truncate_date in prod yet
...
We initially aimed at implementing data archiving in production reusing
this rake task but priorities have changed. It'll be just a refactor for
now.
2020-04-29 17:00:53 +02:00
Pau Perez
e0228f66af
Default to archiving data older than 2 years.
...
This is safer than the current 3 months.
2020-04-29 16:49:43 +02:00
Pau Perez
38ea95ea85
Prevent nil input to turn into 0
2020-04-29 16:49:43 +02:00
Pau Perez
6ceeda7d9e
Instrument TruncateData logging start and end
2020-04-29 16:49:43 +02:00
Pau Perez
703706ee0b
Replace one-letter variable with full word
2020-04-29 16:49:43 +02:00
Pau Perez
e2a3dd0c6f
Delete only return auths. of the deleted orders
...
They are associated to order and as such we can't remove them all
blindly.
2020-04-29 16:49:43 +02:00
Pau Perez
a3b8638faf
Delete sessions older than two weeks
...
This affects users that are actively purchasing, so 2 weeks data is more
than enough. Others can afford to log in again.
2020-04-29 16:49:43 +02:00
Pau Perez
4f015320a3
Upper case DELETE statement
...
This keeps it consistent with the rest of the log.
2020-04-29 16:49:43 +02:00
Pau Perez
0f1d57db73
Delete LogEntries older than a month
...
They are useful for troubleshooting but a month data seems enough.
2020-04-29 16:49:43 +02:00
Pau Perez
5f84c51c13
Delete StateChanges older than a month
...
They are useful for troubleshooting but a month data seems enough.
2020-04-29 16:49:43 +02:00
Pau Perez
d215c76bc9
Make it even more explicit the action is dangerous
...
We're yelling at the person to make a backup before proceeding.
2020-04-29 16:49:43 +02:00
Pau Perez
e1a80edb7e
Carefully doc how to archive data from an instance
2020-04-29 16:49:43 +02:00
Pau Perez
a4372e4d31
Fix long lines
2020-04-29 16:49:43 +02:00
Pau Perez
b6d3c3039a
Fix "Method has too many lines" violation
2020-04-29 16:49:43 +02:00
Pau Perez
f199cb1bea
Warn but allow executing :truncate_data in prod
2020-04-29 16:49:43 +02:00
Pau Perez
be123b2a72
Specify how much data to remove in :truncate_data
2020-04-29 16:49:43 +02:00
Pau Perez
60d29d619f
Replace :truncate_data definition with new class
...
And cover it with a test.
2020-04-29 16:49:43 +02:00
Pau Perez
78fd785f0c
Extract TruncateData out of :truncate_data task
2020-04-29 16:49:43 +02:00
Pau Pérez Fabregat
f9f4bdae8f
Merge pull request #5238 from Matt-Yorkley/moar-performance
...
Improve Pain Points
2020-04-29 16:36:15 +02:00
Luis Ramos
0f16c43f21
Add link to docker tips wiki page to Docker.md
2020-04-29 14:16:59 +01:00
Luis Ramos
865024fc1f
Add link to the docker setup guide to the getting started guide.
2020-04-29 14:05:45 +01:00
Luis Ramos
407d890d23
Merge pull request #5315 from Matt-Yorkley/ordercyles-controller-tweaks
...
OrderCylesController tweaks
2020-04-29 13:50:10 +01:00
Luis Ramos
0e5d7c1eb1
Add migration to drop dead spree_mail_methods table and some dead mail_methods preferences
2020-04-29 13:34:50 +01:00
Luis Ramos
a38b18bd0d
Remove smtp config from admin config page
2020-04-29 13:34:19 +01:00
Rob H
6405c34428
Add order number and date/time to order cycles customer report
2020-04-29 21:20:14 +10:00
Pau Pérez Fabregat
e7df9bb58d
Merge pull request #5178 from coopdevs/dont-populate-empty-cart
...
Dont populate empty cart
2020-04-29 13:08:26 +02:00
Matt-Yorkley
d3af3d3f27
Avoid extra query on stock_items every time #on_demand is called on a variant.
...
In the case where the variant has not been saved yet, we can use #new_record? here instead of #stock_items.empty?, to avoid an additional query. This can be called a vast number of times per request, in various N+1s. The other case where we need to return here is when a variant has been deleted, so #stock_items will be empty and #stock_item will be nil. Likewise, we can just check that with #deleted? and avoid #stock_items.empty?
2020-04-28 20:54:04 +02:00
Matt-Yorkley
9682544442
Eager-load and update BasicEnterpriseSerializer
2020-04-28 20:10:40 +02:00
Matt-Yorkley
f4bcf6c6d5
Eager-load line_item associations in order
2020-04-28 20:10:40 +02:00
Luis Ramos
e6fa08edfc
Delete some dead views
2020-04-28 19:07:19 +01:00
Transifex-Openfoodnetwork
18fc4b7c92
Updating translations for config/locales/ca.yml
2020-04-29 01:13:42 +10:00
Transifex-Openfoodnetwork
612cc45ab7
Updating translations for config/locales/en_FR.yml
2020-04-29 01:13:35 +10:00
Transifex-Openfoodnetwork
16e289bf37
Updating translations for config/locales/en_GB.yml
2020-04-29 01:13:29 +10:00
Transifex-Openfoodnetwork
b54c6fcb26
Updating translations for config/locales/nb.yml
2020-04-29 01:13:26 +10:00
Transifex-Openfoodnetwork
8365c66add
Updating translations for config/locales/fil_PH.yml
2020-04-29 01:13:22 +10:00
Transifex-Openfoodnetwork
5590671c23
Updating translations for config/locales/fr.yml
2020-04-29 01:13:19 +10:00
Luis Ramos
9e43661127
Merge pull request #5153 from luisramos0/bye_bye_ga
...
Bye bye Google Analytics
2020-04-28 16:09:16 +01:00
Matt-Yorkley
ec581dccb8
Use class-based caching for queries in EnterpriseInjectionData
2020-04-28 15:11:59 +02:00
Matt-Yorkley
4d098448f5
Cache rendered AMS arrays in darkswarm layout based on latest timestamps of rendered object classes
2020-04-28 15:11:59 +02:00
Matt-Yorkley
53ebe10483
Fix issue with generic primary taxon in product factory changing which taxons are correctly counted as being in open order cycles.
2020-04-28 15:11:59 +02:00
Matt-Yorkley
eb5f8b85ff
Touch primary taxon when a product's primary_taxon is changed
2020-04-28 15:11:59 +02:00
Matt-Yorkley
1b18808d21
Touch ShippingMethod when it's assigned to a new distributor
2020-04-28 15:11:59 +02:00
Matt-Yorkley
6ef345c5d8
Touch taxon when a taxon is applied to a product
2020-04-28 15:11:59 +02:00
Matt-Yorkley
a25a75bbe8
Ensure action caching includes GET params
...
By default the auto-generated action cache keys looks like this:
`views/0.0.0.0:3000/api/order_cycles/1/properties`
With this change the cache keys now look like this:
`views/0.0.0.0:3000/api/order_cycles/1/properties?distributor=3`
2020-04-28 15:11:14 +02:00
Matt-Yorkley
ea1ec1a1c6
Use ActionCaching in OrderCyclesController (taxons and properties)
2020-04-28 15:11:12 +02:00
Matt-Yorkley
975afb3152
Enable use of Action Caching in the API 🎉
...
See: https://guides.rubyonrails.org/api_app.html#adding-other-modules
2020-04-28 15:11:00 +02:00
Kristina Lim
265871932f
Merge pull request #5146 from coopdevs/dev-mode-profiling-settings
...
Add PROFILE var to set production-like settings
2020-04-28 20:31:13 +08:00
Kristina Lim
c34570e96e
Merge pull request #5313 from kristinalim/fix/mirror_db_script_bucket
...
Fix script for syncing public/ in AWS bucket to local
2020-04-28 20:28:05 +08:00
Matt-Yorkley
ac166f3590
Add CacheService
2020-04-28 14:15:16 +02:00
Matt-Yorkley
e4985a9d51
Avoid needlessly fetching the current user records (for authentication and API key checks)
...
These endpoints are absolutely public, and don't need the current user at any point.
2020-04-28 14:06:02 +02:00
Matt-Yorkley
eb7de18298
Return early (before hitting the DB) in complex product list rendering if we already know the order cycle is closed
2020-04-28 13:51:25 +02:00
Matt-Yorkley
67a7140642
Memoize distributor and order_cycle in Api::OrderCyclesController
2020-04-28 13:48:07 +02:00
Luis Ramos
868929eed3
Merge pull request #4993 from luisramos0/move_ent_fees
...
Change engine routes to better work with specs in rails 4
2020-04-28 11:48:41 +01:00
Transifex-Openfoodnetwork
8e6d53f6c6
Updating translations for config/locales/nb.yml
2020-04-28 17:59:10 +10:00
Robin Klaus
f072e9d9c2
Add missing translations on order list page
2020-04-28 16:47:39 +10:00
Kristina Lim
7c985f39ab
Fix script for syncing public/ in AWS bucket to local
2020-04-28 13:22:48 +08:00
Kristina Lim
efb83c2f95
Merge pull request #5250 from mkllnk/mirror-db-script
...
Add cache to mirror_db script
2020-04-28 13:18:29 +08:00
Matt-Yorkley
74e81b078f
Avoid N+1s in Order#cap_quantity_at_stock!
2020-04-28 01:11:28 +02:00
Matt-Yorkley
3fa2b3161f
Avoid N+1s when using OrderCycle#exchanges_supplying
2020-04-28 01:10:07 +02:00
Matt-Yorkley
fe2bf8d531
Eager-load variants and stock items when doing stock checks on multiple variants
2020-04-28 01:05:42 +02:00
Matt-Yorkley
eb858159ce
Eager-load :default_price on variants
2020-04-28 01:04:22 +02:00
Matt-Yorkley
43869fc140
Replace fired events with clearer method call
...
The 'spree.cart.add' event has no listeners in spree_core on in ofn. The 'spree.order.contents_changed' just has a single listener that calls `order.update_distribution_charge`.
2020-04-28 00:56:18 +02:00
Matt-Yorkley
a5c4364f92
Fetch (or create) current_order only once
2020-04-28 00:52:09 +02:00
dependabot-preview[bot]
02775d033d
Bump unicorn from 5.5.4 to 5.5.5
...
Bumps [unicorn](https://yhbt.net/unicorn/ ) from 5.5.4 to 5.5.5.
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-04-27 20:50:56 +00:00
Luis Ramos
6559b4d3a4
Make dockerfile install node and adapt karma browser config to work inside a docker container
2020-04-27 19:05:11 +01:00
Luis Ramos
d851aa5106
Add model definition to migration to make migration more resilient
2020-04-27 18:40:56 +01:00
Luis Ramos
c5b9727177
Remove ga_cookies_preference from DB
2020-04-27 18:40:56 +01:00
Luis Ramos
248b0016d4
Remove trackers and google analytics
2020-04-27 18:40:33 +01:00
Luis Ramos
d8d6bad11c
Remove config and sections related to google analytics in the cookies banner and cookies page
2020-04-27 18:40:00 +01:00
Luis Ramos
ab16931d70
Merge pull request #5257 from luisramos0/stripe_sca_payments_last
...
StripeSCA - reuse better method to fetch last payment of an order to avoid nasty bugs in the future
2020-04-27 18:34:35 +01:00
Matt-Yorkley
e33de8a20e
Update specs and refactor a bit
2020-04-27 19:27:07 +02:00
Matt-Yorkley
468cb3f57e
Remove obviously private methods from the public interface in CartService
...
These methods are not called from anywhere in the app, only in a couple of tests in cart_service_spec.
2020-04-27 19:27:07 +02:00
Matt-Yorkley
1152f307e2
Eager-load associated line_items data in #update_distribution_charge!
2020-04-27 19:27:07 +02:00
Matt-Yorkley
25525d4f75
Use guard clause in each block
2020-04-27 19:27:07 +02:00
Matt-Yorkley
a759d8c7c7
Avoid N+1s for variants and for line_items of variants
2020-04-27 19:27:07 +02:00
Matt-Yorkley
b3242041e5
Return earlier (before scoping process, if possible)
2020-04-27 19:27:07 +02:00
Matt-Yorkley
106bb7a27f
Rename some variables and add comments for clarity in cart_service
2020-04-27 19:27:07 +02:00
Matt-Yorkley
2334ab6d00
Delete some dead code in cart_service
...
This Bugsnag error was added a year ago and hasn't been seen
2020-04-27 19:27:07 +02:00
Matt-Yorkley
11af5dffdc
Memoize scoper in cart_service
...
Avoids fetching all of the hub's variant overrides from the db every time it's initialized.
2020-04-27 19:27:07 +02:00
Matt-Yorkley
3ce7e96777
Add some debounce and an onwheel hack to product add to basket field
...
Debounce ensures we don't get a million requests if the up/down buttons are clicked rapidly. The onwheel hack adds some protection against scrolling triggering the quantity up/down. See: https://stackoverflow.com/a/51076231
2020-04-27 19:27:07 +02:00
Transifex-Openfoodnetwork
670fff9d36
Updating translations for config/locales/es_CR.yml
2020-04-28 02:38:07 +10:00
Transifex-Openfoodnetwork
171ba09663
Updating translations for config/locales/fr.yml
2020-04-28 01:40:44 +10:00
Transifex-Openfoodnetwork
65c9c287e8
Updating translations for config/locales/en_FR.yml
2020-04-28 01:37:49 +10:00
Transifex-Openfoodnetwork
4332734f27
Updating translations for config/locales/ca.yml
2020-04-28 01:37:44 +10:00
Transifex-Openfoodnetwork
340f669506
Updating translations for config/locales/en_GB.yml
2020-04-28 01:37:36 +10:00
Transifex-Openfoodnetwork
3b7ad0ef4e
Updating translations for config/locales/ca.yml
2020-04-27 23:49:48 +10:00
Luis Ramos
6e23f5bdac
Merge pull request #5233 from luisramos0/stripe_sca_bo
...
[StripeSCA] Fix card payments in the Backoffice
2020-04-27 13:00:24 +01:00
Luis Ramos
8b5378e673
Merge pull request #5251 from luisramos0/Issue4654
...
Change Result of PriceSack Calculation from Integers to Floats, clone #4812
2020-04-27 12:36:18 +01:00
Transifex-Openfoodnetwork
ba32e2d676
Updating translations for config/locales/fil_PH.yml
2020-04-27 18:08:38 +10:00
Pau Pérez Fabregat
74c4722cfe
Merge pull request #5286 from rmklaus12/4966-missing-translation-admin-prod-list
...
4966 missing translation admin prod list
2020-04-27 09:28:57 +02:00
Luis Ramos
b3eda9fecb
Merge pull request #5256 from dacook/5190-fix-order-sorting
...
Fix sorting of orders list
2020-04-26 14:24:00 +01:00
Pau Perez
c224df9b6a
Do not trigger an orderChanged with null quantity
...
When loading the page $watchGroup calls the listener function for every
listed line item but with a set variant and null quantity and
max_quantity. There's no point on computing an order change when there
was none.
This saves an empty request on the second most used endpoint of the app,
specially busy when users are placing orders.
2020-04-24 15:54:46 +02:00
Luis Ramos
b9c86d54b0
Merge pull request #5261 from luisramos0/search-iphone
...
[Mobile] Make search box font size be 16px so that no zoom happens on iphone
2020-04-24 11:30:26 +01:00
Transifex-Openfoodnetwork
cebba4dd43
Updating translations for config/locales/en_GB.yml
2020-04-24 18:22:49 +10:00
Matt-Yorkley
43ba73ac19
Avoid expensive queries for supplied product properties if enterprise is not a supplier
2020-04-23 21:51:39 +02:00
Matt-Yorkley
728326c2a5
Eager-load :properties on supplied products in enterprise_shopfront_serializer
2020-04-23 21:48:41 +02:00
Transifex-Openfoodnetwork
8bcc9456d8
Updating translations for config/locales/en_FR.yml
2020-04-24 04:30:04 +10:00
Transifex-Openfoodnetwork
5f51b21fe9
Updating translations for config/locales/fr.yml
2020-04-24 04:29:52 +10:00
Luis Ramos
2984829790
Merge pull request #5253 from luisramos0/edit_order
...
Make edit order page work even if inventory_items dont have a corresponding line_item in the order
2020-04-23 19:27:31 +01:00
Luis Ramos
f366aa2605
Merge pull request #5290 from openfoodfoundation/dependabot/bundler/mini_racer-0.2.10
...
Bump mini_racer from 0.2.9 to 0.2.10
2020-04-23 18:53:14 +01:00
Matt-Yorkley
bf16a10129
Update all locales with the latest Transifex translations
2020-04-23 19:05:22 +02:00
Matt-Yorkley
43836d2b30
Merge pull request #5292 from openfoodfoundation/transifex
...
Transifex
2020-04-23 18:53:36 +02:00
Pau Pérez Fabregat
82156e32e0
Merge pull request #4920 from luisramos0/api_var_ctrl
...
Bring Spree::Variant#active from Spree so that we can improve it
2020-04-23 17:35:49 +02:00
Matt-Yorkley
69cf7dff2c
Memoize :active in enterprise serializers that call it multiple times
2020-04-23 13:17:44 +02:00
Pau Pérez Fabregat
a8ca471cd2
Merge pull request #5189 from Matt-Yorkley/mobile-buttons
...
[Mobile UX] Style updates on buttons
2020-04-23 12:56:49 +02:00
Luis Ramos
aa52cf8bf0
Merge pull request #5254 from chrishil1/missing_translation_save_as_default
...
Added missing translation to column dropdown
2020-04-23 11:08:33 +01:00
Luis Ramos
ac6501c5d8
Merge pull request #5195 from luisramos0/prod_helper
...
Delete dead code from several places...
2020-04-23 11:07:44 +01:00
Luis Ramos
568e570b4b
Move method to more generic helper to use it in mailers
2020-04-23 16:08:10 +10:00
Luis Ramos
42be6c905f
Added spec for OrderPaymentFinder
2020-04-23 16:08:10 +10:00
Luis Ramos
d482cccefe
Use OrderPaymentFinder methods instead of payments.last and payments.pending.last
2020-04-23 16:08:10 +10:00
Luis Ramos
52becf6abc
Extract payment method logic from OrderPaymentFinder into the orders helper
2020-04-23 16:08:10 +10:00
Transifex-Openfoodnetwork
15319d66e2
Updating translations for config/locales/es_CR.yml
2020-04-23 12:27:58 +10:00
Robin Klaus
d8f4df4bcc
Fixed missing translation, added keys to en.yml file
2020-04-23 09:58:47 +10:00
dependabot-preview[bot]
240d4a7802
Bump mini_racer from 0.2.9 to 0.2.10
...
Bumps [mini_racer](https://github.com/discourse/mini_racer ) from 0.2.9 to 0.2.10.
- [Release notes](https://github.com/discourse/mini_racer/releases )
- [Changelog](https://github.com/rubyjs/mini_racer/blob/master/CHANGELOG )
- [Commits](https://github.com/discourse/mini_racer/compare/v0.2.9...v0.2.10 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-04-22 19:41:50 +00:00
Luis Ramos
3dff11e405
Merge pull request #5182 from luisramos0/nokogiri
...
Bump Nokogiri
2020-04-22 20:40:04 +01:00
Pau Perez
2d9b41729e
Use memory cache-store when profiling
...
Or you want see any change when playing fragment-caching or other caching
strategies.
2020-04-22 17:56:56 +02:00
Pau Perez
de8d8e658c
Add PROFILE var to set production-like settings
...
I took this from a recent newsletter I read. Sometimes replication
performance issues locally is actually slower than production due to dev
mode settings (code reloading, etc.), heavy de-only gems and the asset
pipeline.
The PROFILE env var switches these settings all at the same time,
giving us an environment closer to production, essential for reliable
profiling. Then, rack-mini-profiler is going to be more accurate.
Apparently it's something
[RubyGems](b026df86ae/config/environments/development.rb (L72-L92) )
and
[CodeTriage](a3c957647d )
both use.
2020-04-22 17:53:17 +02:00
Pau Pérez Fabregat
a7013b5542
Merge pull request #5241 from Matt-Yorkley/remove-old-migrations
...
Remove old migrations!
2020-04-22 17:01:01 +02:00
Maikel
24fe7e8878
Merge pull request #5280 from openfoodfoundation/transifex
...
Transifex
2020-04-22 16:08:57 +10:00
Maikel
eb94c5a5bd
Merge pull request #5283 from Matt-Yorkley/customer-tags
...
Fix disappearing tags issue
2020-04-22 16:03:17 +10:00
Matt-Yorkley
4ef61b642e
Fix disappearing tags issue
2020-04-22 01:33:38 +02:00
Luis Ramos
23f4faf192
Merge pull request #4841 from luisramos0/kill_rabl
...
Hide broken product taxons field, remove last rabl template and rabl itself
2020-04-21 18:49:12 +01:00
Transifex-Openfoodnetwork
becd57f7a4
Updating translations for config/locales/fr.yml
2020-04-21 22:52:47 +10:00
Transifex-Openfoodnetwork
2e4b224d48
Updating translations for config/locales/en_FR.yml
2020-04-21 22:42:53 +10:00
Transifex-Openfoodnetwork
2b210bd096
Updating translations for config/locales/fr.yml
2020-04-21 22:42:34 +10:00
Matt-Yorkley
53183b8598
Eager-load properties in inject_enterprise_and_relatives
2020-04-21 11:13:20 +02:00
Pau Perez
91306d5ce4
Update all locales with the latest Transifex translations
2020-04-21 10:13:00 +02:00
Pau Pérez Fabregat
e20e19f963
Merge pull request #5244 from coopdevs/include-deleted-variants-and-products
...
Include deleted products in OC mailer
2020-04-20 20:46:21 +02:00
Luis Ramos
2ab07bc6a9
Make search box font size be 16px so that no zoom happens on iphone
2020-04-18 18:50:25 +01:00
Luis Ramos
15e56b21ae
Merge pull request #5229 from chrishil1/missing_translation
...
Added missing translations to enterprise_relationship page
2020-04-18 18:15:54 +01:00
Luis Ramos
629db3ae4d
Merge pull request #5230 from chrishil1/missing_translation_2
...
Add product translations to admin order creation
2020-04-18 18:15:01 +01:00
Luis Ramos
43274ecb4f
Remove dead code
...
Dead since https://github.com/openfoodfoundation/openfoodnetwork/pull/3305
2020-04-18 14:47:33 +01:00
Luis Ramos
437c7367db
Remove dead code
2020-04-18 14:37:07 +01:00
Lucas Hiago
acfe0c540a
Create instagram css property and apply
2020-04-18 10:06:14 -03:00
Lucas Hiago
ac2ab34e11
Add connect with us footer to customer order confirmation email
2020-04-18 10:06:06 -03:00
Lucas Hiago
41c0204cfa
Update instagram and linkedin links
2020-04-18 10:05:59 -03:00
Luis Ramos
910cc99c2f
Add spec to cover orders_controller watch sortOptions
2020-04-18 10:23:02 +01:00
David Cook
a0a361673a
Fix sorting of orders
...
(wrong copied function call)
2020-04-18 15:03:39 +10:00
jeffrey s hill md
70005a99a3
Added missing translations
2020-04-17 17:02:37 -05:00
Luis Ramos
8f8dce4bab
Do not render inventory items in the shipment that dont have a line item in the order
2020-04-17 20:23:29 +01:00
Luis Ramos
8973a1b76c
Merging 6 specs in one takes around 1 minute of execution time
2020-04-17 20:18:13 +01:00
Luis Ramos
c1b28543c6
Extract print ticket spec to a separate file
2020-04-17 20:07:45 +01:00
Luis Ramos
c33352904a
Make spec a bit more resilient
2020-04-17 18:48:20 +01:00
Luis Ramos
8bd3062b16
Fix rubocop issues
2020-04-17 18:17:54 +01:00
jeffrey s hill md
ed91c179cd
Changed translation paths
2020-04-17 12:04:27 -05:00
Luis Ramos
c7fb85a715
Replace background with members with before with let statements
2020-04-17 17:34:36 +01:00
Luis Ramos
e901615b61
Make spec simpler
2020-04-17 16:56:56 +01:00
Pau Perez
d8e6d98912
Preload line item's option_values
...
This fixes an N+1 with the query
```sql
SELECT "spree_option_values".* FROM "spree_option_values"
INNER JOIN "spree_option_types"
ON "spree_option_types"."id" = "spree_option_values"."option_type_id"
INNER JOIN "spree_option_values_line_items"
ON "spree_option_values"."id" = "spree_option_values_line_items"."option_value_id"
WHERE "spree_option_values_line_items"."line_item_id" = 1679
ORDER BY spree_option_types.position asc
```
2020-04-17 17:34:53 +02:00
Luis Ramos
c455dfb609
Make some specs faster by going directly to the order edit page and move incomplete order spec to a specific context
2020-04-17 16:28:27 +01:00
Pau Perez
63eb0980eb
Memoize result of line items query
...
No need to fetch twice what we just loaded from DB.
2020-04-17 17:27:21 +02:00
Pau Perez
06ead827d8
Split long method
2020-04-17 17:27:21 +02:00
Pau Perez
6dd4a866e5
Address some Rubocop violations
2020-04-17 17:25:35 +02:00
Pau Perez
04c962432a
Skip deleted default_scope in OC notification
...
This fixes the RuntimeError we get when accessing deleted variants due
to the variant being nil.
https://github.com/rails/rails/issues/11036 is still an open Rails bug,
as some people mention in https://github.com/rails/rails/pull/21550 .
The issue is that `includes` doesn't respect `unscoped`. I found
a potential solution for the entire app in
https://github.com/rails/rails/issues/11036#issuecomment-302133116 but
our friend @markets has a gem,
https://github.com/markets/unscoped_associations , that solves that too.
2020-04-17 17:25:34 +02:00
Luis Ramos
d96d6b2337
Split orders_spec in two: tests for orders list page and tests for orders edit page
2020-04-17 15:21:03 +01:00
Luis Ramos
9147518422
Remove some unnecessary code
2020-04-17 14:51:06 +01:00
Luis Ramos
d23397f250
Move float test to a separate context
2020-04-17 14:49:09 +01:00
blainebillings
993a684e44
Add Price Sack Spec for Float Amounts
2020-04-17 14:43:28 +01:00
blainebillings
427dc54945
Change Result of PriceSack Calculation from Integers to Floats
2020-04-17 14:43:28 +01:00
Luis Ramos
ffceff3f0a
Update GETTING_STARTED.md
...
Update link to osx catalina setup guide in wiki
2020-04-17 11:41:02 +01:00
Maikel Linke
b5d159e163
Add cache to mirror_db script
...
Also added some better error handling around image syncing.
2020-04-17 16:09:22 +10:00
Maikel Linke
4658a53aeb
Update translations from Transifex
2020-04-17 15:37:54 +10:00
Maikel
3bc834435d
Merge pull request #5152 from Matt-Yorkley/missing-indexes
...
Add missing indexes to spree_orders and spree_products
2020-04-17 15:16:03 +10:00
Maikel
9111ff1a38
Merge pull request #5211 from openfoodfoundation/transifex
...
Transifex
2020-04-17 14:24:26 +10:00
Maikel
b0eac1ecaa
Merge branch 'master' into missing-indexes
2020-04-17 14:17:32 +10:00
Maikel
2e31f234d6
Merge pull request #5196 from Matt-Yorkley/customers-performance
...
Admin Customers performance
2020-04-17 13:28:39 +10:00
Maikel
e29a81cacc
Merge pull request #5186 from oeoeaio/customer-totals-inventory-sku
...
Take sku overrides into account in customer totals report
2020-04-17 13:27:43 +10:00
Maikel
a672af1a79
Merge pull request #5237 from luisramos0/master_with_change
...
Clone of #5176
2020-04-17 13:27:14 +10:00
Maikel Linke
75207247e6
Correct database commands
2020-04-17 12:52:05 +10:00
Maikel Linke
8af40f4675
Format and indent migration message
...
It's much clearer to read this way:
```
== OldMigrationsRemoved: migrating ===========================================
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
You haven't updated your dev environment in a long time!
Legacy migration files before 2019 have now been removed.
Run `rails db:schema:load` before running `rails db:migrate`.
```
2020-04-17 12:47:49 +10:00
Maikel Linke
63ac6c5088
Remove superfluous conditional
...
A migration's `up` method is only run when the migration needs to be
applied. The only case we could have a higher version number is when a
migration with a higher version got merged before the current one. And
in that case, we still want this migration to fail, because it hasn't
been applied yet.
2020-04-17 12:40:54 +10:00
jeffrey s hill md
d8444dcf3c
Added placeholders
2020-04-16 14:59:41 -05:00
Matt-Yorkley
71c7c35679
Remove old migrations! 🎉
2020-04-16 13:44:18 +02:00
Maikel
f282ff805d
Merge pull request #5172 from kristinalim/feature/5170-increase_locale_chars_in_spree_users
...
Increase max characters for locale in spree_users
2020-04-16 18:18:45 +10:00
Transifex-Openfoodnetwork
2f7dc9a578
Updating translations for config/locales/es.yml
2020-04-16 17:09:44 +10:00
chrishil1
a9829ba5d9
Update _enterprise_relationship.html.haml
2020-04-15 17:01:22 -05:00
Luis Ramos
8532fa16cd
Merge pull request #5202 from luisramos0/improve_checkout_js
...
Improve Checkout error handling in JS
2020-04-15 22:25:05 +01:00
chrishil1
c3f01be580
Fixed display all required tag
2020-04-15 19:00:35 +01:00
Luis Ramos
fcc746a1b7
Fix long lines in payments_controller_spec
2020-04-15 16:18:17 +01:00
Luis Ramos
8f7b3df9b5
Make payment controller authorize stripe_sca payments before processing them or advancing order workflow (that also calls payment.process)
2020-04-15 16:07:34 +01:00
jeffrey s hill md
e23045b19e
Add product translations
2020-04-14 14:15:57 -05:00
jeffrey s hill md
5e1dea61a8
added missing translations to enterprise_relationship page
2020-04-14 11:20:56 -05:00
Luis Ramos
cedf1b26f2
If no flash is sent from the server, show the generic error
2020-04-14 14:31:34 +01:00
Luis Ramos
47a93568dc
Make code simpler by extracting methods
2020-04-14 13:55:20 +01:00
Luis Ramos
62471bf2ab
Clear Loading spinner when exception is caught
2020-04-14 13:50:38 +01:00
Luis Ramos
cdf5bcb7eb
Improve unexpected error handling and add test cases for it
2020-04-14 13:44:58 +01:00
Luis Ramos
7414047b92
Switch from old success/error to modern then/catch structure
...
Catch() will get a few more errors then errors()
Also, add try/catch inside catch to detect any errors parsing the
response error payload
2020-04-14 13:04:28 +01:00
Pau Pérez Fabregat
4ef5dfe430
Merge pull request #5199 from openfoodfoundation/dependabot/bundler/rubocop-rails-2.5.2
...
Bump rubocop-rails from 2.5.1 to 2.5.2
2020-04-14 10:17:59 +02:00
Pau Pérez Fabregat
e58a1d080f
Merge pull request #5205 from openfoodfoundation/dependabot/bundler/ddtrace-0.34.2
...
Bump ddtrace from 0.34.1 to 0.34.2
2020-04-14 10:17:06 +02:00
Luis Ramos
357a88fa22
Merge pull request #4786 from luisramos0/stripe_sca_extra_subs_fix
...
Make StripeSCA (with new authorize/purchase workflow) work with Subscriptions again
2020-04-13 17:21:53 +01:00
Rob H
f71045b3f2
Improve naming of variables in VariantOverridesIndexed for readability
2020-04-13 22:24:25 +10:00
Rob H
dcdd3f2444
Modify interface of VariantOverridesIndexed#indexed
...
Stop using keyword args and accept variant_ids instead of line_items
2020-04-13 22:11:58 +10:00
Rob H
6820919552
Rename VariantOverrides class to VariantOverridesIndexed
2020-04-13 21:56:37 +10:00
Rob H
4a4173bdc0
Move VariantOverrides class to app/services
2020-04-13 21:54:10 +10:00
Rob H
9a7e782102
Only load up variant overrides for relevant hubs
2020-04-13 12:07:17 +10:00
Transifex-Openfoodnetwork
9fa892346e
Updating translations for config/locales/es_CR.yml
2020-04-13 10:30:00 +10:00
Transifex-Openfoodnetwork
7341912390
Updating translations for config/locales/pt_BR.yml
2020-04-12 07:14:21 +10:00
Transifex-Openfoodnetwork
d0c797b797
Updating translations for config/locales/es_CR.yml
2020-04-12 07:12:21 +10:00
Transifex-Openfoodnetwork
cb2e17d7dc
Updating translations for config/locales/es_CR.yml
2020-04-12 07:09:21 +10:00
Transifex-Openfoodnetwork
147654df41
Updating translations for config/locales/es_CR.yml
2020-04-12 07:05:59 +10:00
Rob H
14cf168e3b
Take sku overrides into account in customer totals report
2020-04-11 16:05:15 +10:00
dependabot-preview[bot]
c3ee7b7c64
Bump ddtrace from 0.34.1 to 0.34.2
...
Bumps [ddtrace](https://github.com/DataDog/dd-trace-rb ) from 0.34.1 to 0.34.2.
- [Release notes](https://github.com/DataDog/dd-trace-rb/releases )
- [Changelog](https://github.com/DataDog/dd-trace-rb/blob/master/CHANGELOG.md )
- [Commits](https://github.com/DataDog/dd-trace-rb/compare/v0.34.1...v0.34.2 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-04-10 19:19:13 +00:00
Matt-Yorkley
a6414b6dbe
Make sure taggable_type is 'Customer' when querying customer tags
2020-04-10 20:14:14 +02:00
Luis Ramos
eafffa2c23
Update all locales with the latest Transifex translations
2020-04-10 13:08:11 +01:00
Luis Ramos
82a4753eec
Merge pull request #5191 from openfoodfoundation/transifex
...
Transifex
2020-04-10 13:05:30 +01:00
Matt-Yorkley
b92e858448
Merge pull request #5197 from Matt-Yorkley/cart-populate-performance
...
Cart populate performance
2020-04-10 11:41:56 +02:00
Matt-Yorkley
4c41c84cc1
Refactor tag rules loading for customers
...
Fixes N+1 queries on customer tags
2020-04-10 10:12:32 +02:00
Matt-Yorkley
e53f733966
Eager-load addresses in customer serializer
2020-04-10 08:20:15 +02:00
Matt-Yorkley
2a8809e6e8
Eager-load default card in customer serializer
2020-04-10 08:20:15 +02:00
Matt-Yorkley
31a54e49c5
Allow User#default_card to work with eager-loading
2020-04-10 08:20:13 +02:00
Luis Ramos
b5ba2acb21
Merge pull request #5169 from jeduardo824/enhancement/5102-make-shop-names-links
...
make shop name a link on /account
2020-04-09 22:01:34 +01:00
dependabot-preview[bot]
0fabde8849
Bump rubocop-rails from 2.5.1 to 2.5.2
...
Bumps [rubocop-rails](https://github.com/rubocop-hq/rubocop-rails ) from 2.5.1 to 2.5.2.
- [Release notes](https://github.com/rubocop-hq/rubocop-rails/releases )
- [Changelog](https://github.com/rubocop-hq/rubocop-rails/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rubocop-hq/rubocop-rails/compare/v2.5.1...v2.5.2 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-04-09 19:21:30 +00:00
Transifex-Openfoodnetwork
e97a16cb40
Updating translations for config/locales/ca.yml
2020-04-10 04:14:21 +10:00
Luis Ramos
314fed063d
Merge property with property_decorator both in our codebase
2020-04-09 19:09:22 +01:00
Luis Ramos
0d5c08c363
Remove dead code, there's no Spree::Money in app/models/spree and the Spree::Money in lib/spree already has a class_eval with this function
2020-04-09 19:06:05 +01:00
Matt-Yorkley
57d87a8042
Eager-load variant stock items
...
Avoids another N+1
2020-04-09 19:55:08 +02:00
Matt-Yorkley
0ca87580e8
Load variants in cart in one query
...
Avoids an N+1
2020-04-09 19:55:06 +02:00
Luis Ramos
59f56cb0f6
Remove before delivery method in checkout controller, this differentiator is never used in OFN, only in Spree frontend code
2020-04-09 17:32:28 +01:00
Matt-Yorkley
cf712e9478
Select only enterprise id
2020-04-09 17:41:13 +02:00
Luis Ramos
2ff8356c63
Delete dead code from products helper
2020-04-09 16:33:17 +01:00
Luis Ramos
59e0f3d9f4
Merge pull request #5175 from Matt-Yorkley/memoize-scoper
...
Memoize ScopeProductToHub in product list
2020-04-09 14:45:57 +01:00
Luis Ramos
fc5aff8c79
Merge pull request #5145 from luisramos0/inv_perf
...
Performance improvements to Inventory page
2020-04-09 13:56:33 +01:00
Luis Ramos
4aad80c134
Update message for capybara with new upgrade blocker
2020-04-09 13:39:40 +01:00
Luis Ramos
71ffa6b178
Upgrade nokogiri as much as possible (it's not an explicit dependency of OFN and we dont need to control the version now, so I remove it from Gemfile)
2020-04-09 13:39:40 +01:00
Luis Ramos
e3de71668a
Depend on a spree version in which spree_core doesnt depend on deface AND remove deface from list of dependencies
2020-04-09 13:39:40 +01:00
Luis Ramos
dd717fe8ac
Merge pull request #5184 from Matt-Yorkley/inventory-loading
...
Inventory loading
2020-04-09 13:26:12 +01:00
Luis Ramos
6341c5fd80
Merge pull request #4964 from luisramos0/po_fix
...
Fix proxy orders controller in rails 4 by removing the use of responders
2020-04-09 10:12:33 +01:00
Matt-Yorkley
47ac6c1491
Remove unused methods from ProductSimpleSerializer
2020-04-09 09:51:32 +02:00
Matt-Yorkley
6afda141a1
Remove track_inventory_levels conditional
...
This value is always true in OFN
2020-04-09 09:19:37 +02:00
Matt-Yorkley
5bb2614f9d
Refactor PagedFetcher so it makes one request at a time
2020-04-09 09:19:37 +02:00
Matt-Yorkley
b3c968856b
Fix some rubocop issues
2020-04-09 09:19:37 +02:00
Matt-Yorkley
b0a7497f2a
Remove another N+1 in product serialization
2020-04-09 09:19:37 +02:00
Matt-Yorkley
f959e632ea
Modify Spree::Stock::Quantifier to not re-fetch stock items if they are already eager-loaded
...
This helps to remove a big N+1 here, and will also be very helpful elsewhere in the app
2020-04-09 09:19:37 +02:00
Matt-Yorkley
f9cf826f1c
Bring Spree::Stock::Quantifier in to OFN
...
This is the original unmodified Class from Spree. Modifications added in subsequent commits.
2020-04-09 09:19:36 +02:00
Matt-Yorkley
ececbce596
Only select id in producers query
2020-04-09 09:16:44 +02:00
Matt-Yorkley
1b7ac1a252
Don't re-use fat serializers when thin ones are needed.
...
This cuts the pageload and query count in half, again.
2020-04-09 09:10:41 +02:00
Transifex-Openfoodnetwork
d31b24786a
Updating translations for config/locales/en_NZ.yml
2020-04-09 16:16:24 +10:00
Matt-Yorkley
374bf04118
Merge pull request #5142 from Matt-Yorkley/shops-firefighting
...
Don't load distributed properties on inactive distributors
2020-04-08 20:45:01 +02:00
Matt-Yorkley
3aff7f62e3
Don't query distributed properties on enterprises that aren't active distributors
...
Cuts page load on /shops by ~75% (with production data) and removes ~300 expensive and superfluous queries.
2020-04-08 20:08:12 +02:00
Matt-Yorkley
fc5e346a06
Merge pull request #5156 from Matt-Yorkley/closed-shops
...
Load closed shops in a separate request on /shops page
2020-04-08 20:05:26 +02:00
Matt-Yorkley
538e4e54d2
Set cart buttons to fixed width and expand when screen is too small
2020-04-08 11:19:14 +02:00
Matt-Yorkley
1ddbabd841
Adjust colours of primary buttons to use (bright) orange instead of (warning) red
2020-04-08 10:57:33 +02:00
Matt-Yorkley
0414f4984d
Align buttons left and right on cart page
2020-04-08 10:55:55 +02:00
Matt-Yorkley
9c421e146e
Remove arrows from cart and checkout buttons
2020-04-08 10:23:18 +02:00
Luis Ramos
29bbf2fa74
Merge pull request #5088 from coopdevs/do-not-recreate-when-booting-docker
...
Do not reset the dev env when booting docker
2020-04-07 21:56:09 +01:00
Matt-Yorkley
64c66ddedc
Eager-load variant data for overridable products
...
Cuts query count and page load time in half for this endpoint.
2020-04-07 15:16:32 +02:00
Luis Ramos
e0e2c32d9f
Merge pull request #5177 from openfoodfoundation/dependabot/bundler/oj-3.10.6
...
Bump oj from 3.10.5 to 3.10.6
2020-04-07 11:44:09 +01:00
Matt-Yorkley
003341ef7a
Add loading indicator when showing closed shops
2020-04-07 10:40:49 +02:00
Matt-Yorkley
94f8ea2f93
Fix flicker effect showing 3 buttons when clicking "Show Closed Shops" button
2020-04-07 10:31:56 +02:00
Kristina Lim
e6cd33ee57
Increase max characters for locale in spree_users
...
There are many locales that have six (6) characters.
2020-04-07 15:08:49 +08:00
Maikel
eb64112b22
Merge pull request #5144 from openfoodfoundation/transifex
...
Transifex
2020-04-07 16:23:35 +10:00
Maikel
3e14b62b46
Merge pull request #5136 from openfoodfoundation/dependabot/bundler/ddtrace-0.34.1
...
Bump ddtrace from 0.34.0 to 0.34.1
2020-04-07 16:05:53 +10:00
Maikel
3244650932
Merge pull request #5135 from openfoodfoundation/dependabot/bundler/rubocop-rails-2.5.1
...
Bump rubocop-rails from 2.5.0 to 2.5.1
2020-04-07 16:05:18 +10:00
Transifex-Openfoodnetwork
b6753a2593
Updating translations for config/locales/fil_PH.yml
2020-04-07 16:03:57 +10:00
Transifex-Openfoodnetwork
1b119805b4
Updating translations for config/locales/fil_PH.yml
2020-04-07 15:15:12 +10:00
Transifex-Openfoodnetwork
edde7689a9
Updating translations for config/locales/de_DE.yml
2020-04-07 13:57:54 +10:00
Transifex-Openfoodnetwork
8060977786
Updating translations for config/locales/en_GB.yml
2020-04-07 13:54:53 +10:00
Transifex-Openfoodnetwork
837a345958
Updating translations for config/locales/en_FR.yml
2020-04-07 13:54:46 +10:00
dependabot-preview[bot]
7c5e511fde
Bump oj from 3.10.5 to 3.10.6
...
Bumps [oj](https://github.com/ohler55/oj ) from 3.10.5 to 3.10.6.
- [Release notes](https://github.com/ohler55/oj/releases )
- [Changelog](https://github.com/ohler55/oj/blob/develop/CHANGELOG.md )
- [Commits](https://github.com/ohler55/oj/compare/v3.10.5...v3.10.6 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-04-06 19:24:48 +00:00
Luis Ramos
d18a06a0f7
Merge pull request #4783 from luisramos0/stripe_sca_extra_subs
...
Move all subscriptions services to the OrderManagement engine
2020-04-06 20:20:02 +01:00
Luis Ramos
d23b4fd307
Merge pull request #5174 from coopdevs/change-pool-size
...
Allow changing the connection pool size
2020-04-06 19:29:09 +01:00
Matt-Yorkley
2cb4c6bec2
Memoize OpenFoodNetwork::ScopeProductToHub
...
This means we avoid fetching all of the hub's variants every time we scope a product. Applies to every product loaded when displaying a shops's product list.
2020-04-06 19:41:05 +02:00
Pau Pérez Fabregat
924e816a5b
Merge pull request #5151 from luisramos0/fix_order_perms
...
Fix Permissions::Order spec in rails 4
2020-04-06 18:07:39 +02:00
Pau Pérez Fabregat
109da43905
Merge pull request #2 from luisramos0/do-not-recreate-when-booting-docker
...
Re-add setup instructions removed from docker-compose into Dockerfile…
2020-04-06 16:55:59 +02:00
Pau Perez
33ca6a2096
Allow changing the connection pool size
...
This allows us to tune for UK. The hypothesis from @kristinalim is:
> From what I understand, it can result to Rails processes waiting for
each other to complete, while the DB server can take more simultaneous
connections.
2020-04-06 16:03:06 +02:00
Eduardo
e7b780f963
make shop name a link on /account
2020-04-06 08:34:24 -03:00
dependabot-preview[bot]
13cba3d244
Bump ddtrace from 0.34.0 to 0.34.1
...
Bumps [ddtrace](https://github.com/DataDog/dd-trace-rb ) from 0.34.0 to 0.34.1.
- [Release notes](https://github.com/DataDog/dd-trace-rb/releases )
- [Changelog](https://github.com/DataDog/dd-trace-rb/blob/master/CHANGELOG.md )
- [Commits](https://github.com/DataDog/dd-trace-rb/compare/v0.34.0...v0.34.1 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-04-06 11:27:10 +00:00
Matt-Yorkley
ce45e7cf71
Merge pull request #5162 from Matt-Yorkley/unicorn-worker-killer
...
Add optional unicorn-worker-killer configs
2020-04-06 13:25:22 +02:00
Matt-Yorkley
ba5a56db14
Make upper and lower bounds configurable
2020-04-06 10:39:51 +02:00
Matt-Yorkley
276dcf4a3b
Add optional unicorn-worker-killer configs
2020-04-06 10:39:50 +02:00
Transifex-Openfoodnetwork
dcfb1aec6d
Updating translations for config/locales/en_PH.yml
2020-04-06 18:11:07 +10:00
Pau Pérez Fabregat
fde2aac366
Merge pull request #5163 from coopdevs/collect-Ruby-GC
...
Enable Ruby Runtime Metrics in Datadog
2020-04-05 14:32:54 +02:00
Luis Ramos
63138aef30
Re-add setup instructions removed from docker-compose into Dockerfile and Docker.md
2020-04-05 00:06:31 +01:00
Pau Perez
7612415991
Enable Ruby Runtime Metrics in Datadog
...
This automatically collects a bunch of Ruby's GC-related metrics that
will come in handy while we tune the Unicorn workers. Some of theres
are:
* runtime.ruby.class_count
* runtime.ruby.gc.malloc_increase_bytes
* runtime.ruby.gc.total_allocated_objects
* runtime.ruby.gc.total_freed_objects
* runtime.ruby.gc.heap_marked_slots
* runtime.ruby.gc.heap_available_slots
* runtime.ruby.gc.heap_free_slots
* runtime.ruby.thread_count
Check https://docs.datadoghq.com/tracing/runtime_metrics/ruby/#data-collected for the complete list.
The cool thing is that
> Runtime metrics can be viewed in correlation with your Ruby services
2020-04-05 00:16:10 +02:00
Luis Ramos
53d901b41b
Merge pull request #5064 from luisramos0/fix_sample_data
...
Fix sample data and custom paper_trail config on order_cycles and schedules on rails 4
2020-04-04 18:29:26 +01:00
Matt-Yorkley
bc859cf9f7
Add api/shops_controller and refactor
2020-04-04 17:02:27 +02:00
Matt-Yorkley
af48cac140
Load closed shops in a separate request on /shops page
2020-04-04 14:06:10 +02:00
Luis Ramos
59bb956677
Merge pull request #5010 from Matt-Yorkley/remove_simple_form
...
Remove simple_form
2020-04-04 11:53:06 +01:00
Matt-Yorkley
8a544f3ab3
Add missing indexes to spree_orders and spree_products
2020-04-04 10:12:15 +02:00
Luis Ramos
55b3f4d54f
Move search params test case to a different context so that we dont have to set the producer of the products in the order
...
This is working in master by chance of the factories but breaks in rails 4 because the orders in this test dont have products supplied by the producer which is a necessary condition in the context where it was
2020-04-03 19:47:33 +01:00
Luis Ramos
452ab3a842
Add comment to better explain variant_override_set.collection_to_delete
2020-04-03 15:36:19 +01:00
Luis Ramos
a049e7a433
Add product to includes to avoid N+1 queries to fetch products when VO authorization is done right after this
2020-04-03 14:48:06 +01:00
Transifex-Openfoodnetwork
97063bf47e
Updating translations for config/locales/en_GB.yml
2020-04-03 23:24:25 +11:00
Luis Ramos
e64d573337
Revert accidental push of a byebug statement with the direct translations push to master 🙈
2020-04-03 12:06:39 +01:00
Luis Ramos
7858a26e5e
Update all locales with the latest Transifex translations
2020-04-03 12:03:40 +01:00
Luis Ramos
4922c05bcf
Merge pull request #5139 from openfoodfoundation/transifex
...
Transifex
2020-04-03 11:28:11 +01:00
Transifex-Openfoodnetwork
d06b7b8606
Updating translations for config/locales/de_DE.yml
2020-04-03 19:26:04 +11:00
Transifex-Openfoodnetwork
72b47fbceb
Updating translations for config/locales/de_DE.yml
2020-04-03 19:22:55 +11:00
Luis Ramos
da7b0966be
Merge pull request #5133 from Matt-Yorkley/cache-in-hand
...
Cache counts used in homepage for 24 hours
2020-04-03 08:34:58 +01:00
Luis Ramos
445eb9f287
Merge pull request #5121 from Matt-Yorkley/flaky-maps-js
...
Update vendor/assets/angular-google-maps.min.js
2020-04-02 22:13:51 +01:00
dependabot-preview[bot]
5b4dd57380
Bump rubocop-rails from 2.5.0 to 2.5.1
...
Bumps [rubocop-rails](https://github.com/rubocop-hq/rubocop-rails ) from 2.5.0 to 2.5.1.
- [Release notes](https://github.com/rubocop-hq/rubocop-rails/releases )
- [Changelog](https://github.com/rubocop-hq/rubocop-rails/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rubocop-hq/rubocop-rails/compare/v2.5.0...v2.5.1 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-04-02 19:15:11 +00:00
Matt-Yorkley
adb61e48c5
Cache counts used in homepage for 24 hours
2020-04-02 19:09:03 +02:00
Matt-Yorkley
838ffdbf00
Add code comment for dependency
2020-04-02 17:33:10 +02:00
Pau Pérez Fabregat
fe8beb5448
Merge pull request #5099 from Matt-Yorkley/ticking-time-bom
...
Improve BOM
2020-04-02 16:01:48 +02:00
Matt-Yorkley
18ee5254f9
Make Geo service calls more resilient in /shops page
...
The Geo service is used heavily in the /shops page and especially in the search function. If the google maps js library has failed to load it was throwing a lot of fatal errors, so this change ensures the /shops page can at least: a) load, b) show some shops, and c) search for shops by name (but not location)
2020-04-02 13:56:25 +02:00
Matt-Yorkley
40f8cf660c
Update vendor/assets/angular-google-maps.min.js
...
Fixes an issue where if the js library from maps.googleapis.com failed to load in the <head>, all of our subsequent Angular would completely break.
See: https://github.com/angular-ui/angular-google-maps
Note: `bluebird.js` is a new dependency of `angular-google-maps.js`.
2020-04-02 13:32:55 +02:00
Matt-Yorkley
2c70db7952
Merge pull request #5070 from luisramos0/master_card
...
Translate credit card brand so that active merchand code handles the payment correctly
2020-04-02 12:18:00 +02:00
Pau Pérez Fabregat
1a38a4e1a7
Merge pull request #5091 from openfoodfoundation/transifex
...
Transifex
2020-04-02 11:56:29 +02:00
Pau Pérez Fabregat
15d106bb0a
Merge pull request #5116 from openfoodfoundation/dependabot/bundler/ddtrace-0.34.0
...
Bump ddtrace from 0.33.1 to 0.34.0
2020-04-02 11:55:53 +02:00
Pau Pérez Fabregat
c8be2fb89a
Merge pull request #5125 from openfoodfoundation/dependabot/bundler/rubocop-0.81.0
...
Bump rubocop from 0.80.1 to 0.81.0
2020-04-02 11:54:00 +02:00
Transifex-Openfoodnetwork
b1f8f91011
Updating translations for config/locales/fr.yml
2020-04-02 18:03:11 +11:00
Transifex-Openfoodnetwork
e08606a310
Updating translations for config/locales/en_FR.yml
2020-04-02 18:02:57 +11:00
Transifex-Openfoodnetwork
2230d83729
Updating translations for config/locales/pt_BR.yml
2020-04-02 08:41:25 +11:00
dependabot-preview[bot]
d38da02113
Bump rubocop from 0.80.1 to 0.81.0
...
Bumps [rubocop](https://github.com/rubocop-hq/rubocop ) from 0.80.1 to 0.81.0.
- [Release notes](https://github.com/rubocop-hq/rubocop/releases )
- [Changelog](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rubocop-hq/rubocop/compare/v0.80.1...v0.81.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-04-01 19:20:42 +00:00
Luis Ramos
0e268a171f
Switch to console.error so we get a bugsnag alert everytime a user has a problem with their card
...
Add paymentMethodsAPI specific mapping function, we had some errors in production with mastercards probably caused by ActiveMerchant not handling the card type correctly
2020-04-01 18:58:43 +01:00
Luis Ramos
73c4eedd06
Translate credit card brand so that active merchant code handles the payment correctly
...
Adds a simple console.log statement in case there is an error adding the
card
2020-04-01 18:58:10 +01:00
Luis Ramos
8a220742f5
Merge pull request #5103 from jeduardo824/bug/5092-remove-blue-setence-in-payment-method-setting
...
remove blue sentence in payment method setting
2020-04-01 18:56:09 +01:00
Luis Ramos
9fa604db0d
Merge pull request #5076 from luisramos0/rails_f_helper
...
Remove Rails Foundation Helper and improve error display and logging in checkout controller
2020-04-01 18:54:45 +01:00
Transifex-Openfoodnetwork
6083d91d3e
Updating translations for config/locales/ca.yml
2020-04-02 01:57:50 +11:00
Transifex-Openfoodnetwork
9bdb396b86
Updating translations for config/locales/ca.yml
2020-04-02 01:54:42 +11:00
Matt-Yorkley
ad42b1b485
Remove pagination limits in BOM
...
We can re-assess this later, but for now it looks like some of the BOM functionality won't work if results are returned across multiple pages.
2020-04-01 13:43:21 +02:00
Luis Ramos
78170bc709
Merge pull request #4807 from openfoodfoundation/dependabot/bundler/compass-rails-4.0.0
...
Bump compass-rails from 3.1.0 to 4.0.0
2020-04-01 12:42:42 +01:00
Luis Ramos
957b398a54
Add call to $evalAsync() after Loading and FlashLoader are updated so
...
that a angular digest is triggered
This is required so that Loading.clear triggers a refresh and makes its placeholder to be cleared
2020-04-01 12:08:55 +01:00
Luis Ramos
c3d25bf163
Make checkout controller send bugsnag alerts on every checkout problem
...
There are two new situations here: we will see order.errors after update_attributes fails but before order restart; and we will see how often the order is not complete when the workflow finishes (maybe none)
2020-04-01 12:03:39 +01:00
Luis Ramos
ce2a164c66
Stop using f_form_for
...
Add labels for some fields, this was done automatically by rails foundation helper
2020-04-01 12:03:39 +01:00
Luis Ramos
b898ce1ae1
Make checkout controller add flash error if order contains any type of error
...
Here we add translations for a particular case where the credit card expiry date is in the past
2020-04-01 12:03:39 +01:00
Luis Ramos
409681b7af
Merge pull request #5089 from Matt-Yorkley/checkout-scoping
...
Cart variant scoping
2020-04-01 11:49:23 +01:00
Luis Ramos
9317549103
Merge pull request #4813 from luisramos0/oc_selector
...
If there's only one OC available to the customer because there are tag rules hidding other OCs, select that OC by default
2020-04-01 10:44:58 +01:00
dependabot-preview[bot]
b22ad244f9
Bump ddtrace from 0.33.1 to 0.34.0
...
Bumps [ddtrace](https://github.com/DataDog/dd-trace-rb ) from 0.33.1 to 0.34.0.
- [Release notes](https://github.com/DataDog/dd-trace-rb/releases )
- [Changelog](https://github.com/DataDog/dd-trace-rb/blob/master/CHANGELOG.md )
- [Commits](https://github.com/DataDog/dd-trace-rb/compare/v0.33.1...v0.34.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-03-31 19:40:01 +00:00
Transifex-Openfoodnetwork
9c17a91215
Updating translations for config/locales/en_GB.yml
2020-04-01 05:07:08 +11:00
Luis Ramos
6a1c541479
Remove specific error color on checkout page so that the error message takes the default foundation error color which is white
2020-03-31 16:32:33 +01:00
Luis Ramos
6c64261868
Merge pull request #5113 from mkllnk/5110-bugsnag-js-logging
...
Add Bugsnag JS logging
2020-03-31 15:51:12 +01:00
Matt-Yorkley
f437d0f8a0
Report environment correctly in Bugsnag JS
2020-03-31 15:59:17 +02:00
Transifex-Openfoodnetwork
79d6d7cc9e
Updating translations for config/locales/de_DE.yml
2020-03-31 22:09:16 +11:00
Matt-Yorkley
e200ece280
Rename partial to bugsnag_js for clarity
2020-03-31 12:57:12 +02:00
Matt-Yorkley
30bf9257ab
Move conditional inside partial and use default key as fallback
2020-03-31 12:55:28 +02:00
Matt-Yorkley
03e229da08
Add bugsnag js script to admin layout above all.js
2020-03-31 12:25:42 +02:00
Maikel Linke
28473c9087
Add Bugsnag JS logging
2020-03-31 15:51:04 +11:00
Matt-Yorkley
09c8819e5a
Remove unnecessary Bugsnag calls
...
The Bugsnag notification was just here to see if this was dead code. It's not.
2020-03-30 20:36:45 +02:00
Matt-Yorkley
f7c047b798
Memoize ScopeVariantToHub to avoid fetching the hub's overrides each time
2020-03-30 20:33:27 +02:00
Luis Ramos
635ea9c505
Fix some long lines on variant_decorator
2020-03-30 11:21:47 +01:00
Luis Ramos
fbbe586996
Avoid rails 3 bug where the first where clause is overriden by a second where clause
...
Co-Authored-By: Maikel <maikel@email.org.au >
2020-03-30 11:21:47 +01:00
Luis Ramos
a5184cce9d
Make method a bit more readable and add comment with details
2020-03-30 11:21:47 +01:00
Luis Ramos
69b57544f1
Bring Spree::Variant#active so that we can make it return just variants without includes
...
This makes the variants returned not readonly in rails 4 and thus fixes a spec in Spree::VariantsController#destroy
2020-03-30 11:21:47 +01:00
Eduardo
b6da0e2092
remove @payment_method explict variable from the view
2020-03-29 20:32:55 -03:00
Matt-Yorkley
95963c5732
Refactor Angular line_items_controller
2020-03-29 19:54:49 +02:00
Matt-Yorkley
aba1b5b67a
Add pagination specs and refactor
2020-03-29 19:54:49 +02:00
Matt-Yorkley
fe58121c7f
Fix clear filters button
2020-03-29 19:54:49 +02:00
Matt-Yorkley
5c4a2c2790
Update javascript specs
2020-03-29 19:54:49 +02:00
Matt-Yorkley
a07281910b
Fix dropdown placeholders
2020-03-29 19:54:49 +02:00
Matt-Yorkley
72f9da3ac4
Fix regex validation and HTML "type" settings not allowing decimals for final_weight_volume
...
`final_weight_volume` can be a decimal, and often *is* in production data. Not regarding them as valid was breaking the form submission in various cases
2020-03-29 19:54:49 +02:00
Matt-Yorkley
375b4648dc
Add pagination to Bulk Order Management
2020-03-29 19:54:47 +02:00
Transifex-Openfoodnetwork
9af0a39305
Updating translations for config/locales/en_FR.yml
2020-03-29 06:43:01 +11:00
Transifex-Openfoodnetwork
6817231f29
Updating translations for config/locales/fr.yml
2020-03-29 06:42:36 +11:00
Matt-Yorkley
7c7f9551d6
Fix bug in order cycle select dropdown
...
The date filters were being filled with the string: "Invalid date" because momentjs was not able to parse the input
2020-03-28 15:17:31 +01:00
Matt-Yorkley
d568b45d4a
Limit spamming the server with lots of requests
...
This uses "debounce" to add a little waiting time whilst the user is part-way through selecting dates (or manually typing in the date filter) so we don't make too many unnecessary requests.
2020-03-28 11:20:23 +01:00
Matt-Yorkley
b76a6d15a3
Improve date field query triggers
...
Don't submit the request if the user is part-way through typing something in the date field and the date is (currently) invalid; this results in the date ranges being broken and triggering a query for *all* results (with no date range).
2020-03-28 11:16:25 +01:00
Luis Ramos
940423acfc
Merge pull request #5067 from gao329700254/fix/fix_fr_translation_in_order_cycles_outgoing(4937)
...
Fix translation missing in order cycles outgoing page (closed #4937 )
2020-03-27 22:00:19 +00:00
Transifex-Openfoodnetwork
6a57aa3b29
Updating translations for config/locales/en_FR.yml
2020-03-28 04:08:31 +11:00
Transifex-Openfoodnetwork
ca78e9d0e2
Updating translations for config/locales/fr.yml
2020-03-28 04:08:17 +11:00
Luis Ramos
e705e88007
Merge pull request #5087 from luisramos0/custom_data
...
Fix bug in subscriptions logging by making versions.custom_data a longer field
2020-03-27 16:04:31 +00:00
Pau Pérez Fabregat
1fbb9fa3df
Merge pull request #5083 from openfoodfoundation/transifex
...
Transifex
2020-03-27 16:51:30 +01:00
Matt-Yorkley
71f00f9283
Remove comment warning about this issue
2020-03-27 14:23:48 +01:00
Matt-Yorkley
7d33a237d0
Add scoping to VariantsStockLevels when variant is not in the order
2020-03-27 14:15:15 +01:00
Matt-Yorkley
857cacb74b
Add test for additional case where variant is not in the order
2020-03-27 14:03:17 +01:00
Matt-Yorkley
fbfe663ebc
Add variant scoping to VariantStockLevels
2020-03-27 13:38:57 +01:00
Matt-Yorkley
83b90f3167
Add spec variant override test to VariantsStockLevels
2020-03-27 13:31:39 +01:00
Luis Ramos
14fd9a121e
Make versions.custom_data text so it can take longer lists
2020-03-27 11:34:01 +00:00
Pau Perez
904e89e325
Do not reset the dev env when booting docker
...
The current web container's command destroys anything you might have in
your local DB from a previous session, assuming you always want start
from a clean environment. This is hardly the case and makes
`docker-compose up` take quite long. What if you just stopped containers
temporally while developing?
This changes the approach to not assume anything. If you need to install
a new gem or reset your DB just run the commands you would without
docker. You can run anything you want with `docker-compose run web bundle exec
<rails/rake command>` anyway.
For someone setting things for the first time, the `Dockerfile` process
still installs all dependencies.
2020-03-27 12:17:09 +01:00
Transifex-Openfoodnetwork
2e98b0b5c1
Updating translations for config/locales/en_GB.yml
2020-03-27 01:40:20 +11:00
Luis Ramos
523faa670d
Remove FoundationRailsHelper, this is dead code now
2020-03-25 17:31:56 +00:00
Luis Ramos
e5e9325499
Fix paper_trail custom_data for order_cycle, custom data must be a string, cant be an array
2020-03-25 15:35:51 +00:00
Luis Ramos
2e4f8003b6
Fix group factory in rails 4
...
params[:address] was breaking the creation of the EnterpriseGroup
2020-03-25 15:32:16 +00:00
Yuhao Gao
60d9edb185
fix translation missing in order cycles outgoing page ( closed #4937 )
2020-03-25 21:51:13 +09:00
Matt-Yorkley
e014e6c1a4
Ensure perform_deliveries is correctly set when testing user confirmation emails
2020-03-24 13:12:20 +00:00
Luis Ramos
9994bc75ca
Adapt reports controller to handle routes of reports in the order_management engine differently
2020-03-20 11:07:23 +00:00
Luis Ramos
3f5a964dec
Move enterprise_fee_summaries_spec to order_management engine, moving
...
translation keys for the views and adapting some routes
2020-03-20 11:07:23 +00:00
Luis Ramos
b4befea606
Fix namespace in spec
2020-03-20 11:07:23 +00:00
Luis Ramos
58465c4645
Adapt routes placeholder in the new catalog engine to make it similar to the other engines
2020-03-20 11:07:23 +00:00
Luis Ramos
0b05312f19
Move cookies spec to web engine and adapt routes to the fact they are now normal main apps routes
2020-03-20 11:07:23 +00:00
Luis Ramos
e209452f8b
Make engine routes just prepend to apps routes instead of creating engine routes
...
This makes things a bit simpler in terms of routing, we avoid a problem running specs and we can still have the engine routes separated in specific files
2020-03-20 11:07:23 +00:00
Luis Ramos
a8078b22f8
Move enterprise fees summaries controller and views to ordermanagement engine
2020-03-20 11:07:23 +00:00
Luis Ramos
0e62dc04bd
Improve comments to explain glitch on set_order_cycle and OrderCyclesList
2020-03-20 09:47:59 +00:00
Luis Ramos
e2940eb9ff
Add namespace to OrderCyclesList
...
Shop will probably be the name of the future engine/domain for the shopfront pages
2020-03-20 09:47:59 +00:00
Luis Ramos
1c1f066884
Extract Shop::OrderCyclesList from base_controller
2020-03-20 09:47:59 +00:00
Luis Ramos
d5cf355a11
Call fetch_order_cycles from reset_order_cycles so we dont repeat the calculation
...
BaseController#set_order_cycle cant be used in reset_order_cycle because it will empty the order if the OC is not defined previously
2020-03-20 09:47:59 +00:00
Luis Ramos
d2eee1dafd
Extract and fix reset_order_cycle logic from set_order_cycles: ActiveRecord.count will reload the relation and ignore the changes done by the TagRuleApplicator
2020-03-20 09:46:05 +00:00
Luis Ramos
540b26105f
Delete dead code in oc helper
2020-03-20 09:46:05 +00:00
Matt-Yorkley
45b5e838b7
Remove simple_form
...
It looks like we don't use this at all. Discovered during the Spree 2.1 upgrade.
2020-03-17 17:03:48 +01:00
Luis Ramos
da837ff100
Remove rabl dependency 🎉
2020-03-17 15:51:50 +00:00
Luis Ramos
da2598282b
Can be object or {}, it's what the injector is doing, not related to rabl any more
2020-03-17 15:51:26 +00:00
Luis Ramos
0308f1465d
Remove taxons/search action and respective rabl view
...
This is dead code
2020-03-17 15:51:26 +00:00
Luis Ramos
a6e4893287
Remove taxons list field from product edit form.
...
It is not working and it's not used in any other place in the app, there's the product category already (product.primary_taxon_id)
2020-03-17 15:51:25 +00:00
Luis Ramos
26769b4150
Add StripeSCA payment authorize and use it both subs_confirm job as well as on teh checkout stripe redirect
2020-03-16 20:04:59 +00:00
Luis Ramos
84745e4ccb
Add stripe payment setup spec and make minor tweaks to the code itself.
...
Also, add a missing . to card_set? that eanbles it! If the card was
already set, it would anyway set the default card. Now it will use the
defined card if there is one already.
2020-03-16 20:03:12 +00:00
Luis Ramos
aac7a5e559
Adapt PaymentSetup spec to new version and remove some private method testing (payment) as well as some tests testing order.pending_payments logic
2020-03-16 20:03:12 +00:00
Luis Ramos
0a2941ed96
Extract StripePaymentSetup from PaymentSetup
2020-03-16 20:03:12 +00:00
dependabot-preview[bot]
05ccd1ecbf
Bump compass-rails from 3.1.0 to 4.0.0
...
Bumps [compass-rails](https://github.com/Compass/compass-rails ) from 3.1.0 to 4.0.0.
- [Release notes](https://github.com/Compass/compass-rails/releases )
- [Changelog](https://github.com/Compass/compass-rails/blob/master/CHANGELOG.md )
- [Commits](https://github.com/Compass/compass-rails/commits )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-03-16 18:49:51 +00:00
Luis Ramos
f8a4f00d52
Fix rubocop issues in subs specs
2020-03-16 17:20:01 +00:00
Luis Ramos
29377bbff9
Move 5 subscriptions services from app/services to the engines/order_management/app/services
2020-03-16 17:20:01 +00:00
Luis Ramos
f68d0c2a0f
Remove Subscription from the name of the subscription summarizer and summary because it is already in the namespace
2020-03-16 17:20:01 +00:00
Luis Ramos
3901c49af9
Fix rubocop issues
2020-03-16 17:20:01 +00:00
Luis Ramos
ae0ceb61a1
Move ProxyOrderSyncer to OrderManagement engine
2020-03-16 17:20:01 +00:00
Luis Ramos
fb1c825fbc
Move both subscription summarizer and subscription summary to order management engine
2020-03-16 17:20:01 +00:00
Luis Ramos
e36b0249b9
Use nested module names to fix rubocpo issue
2020-03-16 17:20:01 +00:00
Luis Ramos
34fa2d7ad6
Move Subscriptions::PaymentSetup to OrderManagement engine where all subscription code will be at some point in the future
2020-03-16 17:19:04 +00:00
Luis Ramos
3aefea9f04
Prepare SubsConfirmJob to receive a bit more payment logic
2020-03-16 17:19:04 +00:00
Luis Ramos
15231a9128
Make SubsConfirmJob more readable
2020-03-16 17:19:04 +00:00
Luis Ramos
25e3f72934
Fix rubocop issues in subs payment_setup
2020-03-16 17:19:04 +00:00
Luis Ramos
523d819575
Move and rename SubscriptionPaymentUpdater to Subscriptios::PaymentSetup to move to services/subscriptions and call it Setup instead to make explicit this is executed before the payment is processed
2020-03-16 17:16:31 +00:00
Luis Ramos
bc0a1d9bae
Remove one more responder and fix rubocop issues
2020-03-10 15:56:08 +00:00
Luis Ramos
a53dc3a8c1
Remove usage of the responder as this is a json only controller
2020-03-10 14:46:16 +00:00