David Cook
6240baec0d
Update app/controllers/admin/enterprises_controller.rb
...
Co-authored-by: Gaetan Craig-Riou <40413322+rioug@users.noreply.github.com >
2023-06-23 16:18:45 +09:00
Maikel
e065910d2d
Merge pull request #10939 from Matt-Yorkley/master-variants
...
Remove master variants
2023-06-23 13:42:58 +10:00
Maikel Linke
33d212d274
Gracefully deal with missing S3 config
...
I could have split this into several commits:
* DRY direct linking to images.
* Check S3 config before direct linking.
* Just check if service is public instead of relying on name.
Developers may copy a staging or production database or experiment with
S3 storage. But when the S3 config is missing then calling `service`
raises an ArgumentError due to a missing name.
Now we only try to call `service` if the S3 config is present.
2023-06-23 12:41:36 +10:00
David Cook
4bf65e330b
Enable master variants with associated order cycles
...
There's only 5 in UK prod. keeping them is easier than figuring out if it's safe to delete.
2023-06-23 11:50:26 +10:00
David Cook
2025a98f58
Delete stock_items for master variants
...
All variants have stock_items records, but master variants never use them, so these were always redundant.
2023-06-23 11:49:29 +10:00
David Cook
3bff7a9f13
Fix query
...
With deep nesting syntax.
I chose the longer alias 'left_outer_joins' because it's more explicit, and matches the use up on line 121.
2023-06-23 09:11:03 +09:00
Neal Chambers
172b1eea94
Update .rubocop_todo.yml
2023-06-23 09:11:02 +09:00
Neal Chambers
1e4034534c
Fix Layout/LineLength
2023-06-23 09:08:04 +09:00
Filipe
bca7813320
Merge pull request #10323 from abdellani/enterprise-fee-w-tax-by-order
...
Enterprise fee w tax by order
2023-06-22 23:25:11 +01:00
Filipe
9293dd379b
Merge pull request #11087 from Matt-Yorkley/image-error-notifications
...
Add image error Bugsnag notifications
2023-06-22 16:30:57 +01:00
Filipe
b4c4381473
Merge pull request #10987 from jibees/10979-white-label-trix-link-unlink-buttons-are-white-text-on-white-background
...
[White Label] Fix colors of custom content editor to have beautiful toolbar
2023-06-22 16:12:25 +01:00
Jean-Baptiste Bellet
7ce3c3f447
Overide a text-transform: uppercase to capitalize
...
Inherit comes from `app/webpacker/css/admin/components/buttons.scss`
2023-06-22 14:15:43 +02:00
Jean-Baptiste Bellet
91d24ba8ab
Add Edit tooptip for action icon in orders table
2023-06-22 14:15:43 +02:00
Matt-Yorkley
c88799618f
Set master variants which are associated to line items to non-master
...
Line items which reference a master variant is a scenario that in theory shouldn't have been valid or even possible for at least 5-6 years, and these old bits of data in theory should have been cleaned up at the time those changes were made. But a couple of servers have some really old data that's not in a nice state.
Here we can just flip the is_master flag to false for those specific (legacy data) cases before deleting any other master variants, to keep the legacy line item data intact.
2023-06-22 13:10:47 +01:00
jibees
22a3b31172
Merge pull request #11100 from mkllnk/remove-json-patch
...
Revert "Fix json v1.8.6 common.rb warning"
2023-06-22 11:11:21 +02:00
jibees
8eee90118e
Merge pull request #11093 from openfoodfoundation/dependabot/npm_and_yarn/floating-ui/dom-1.4.2
...
chore(deps): bump @floating-ui/dom from 1.3.0 to 1.4.2
2023-06-22 10:25:13 +02:00
jibees
5ba9c815cf
Merge pull request #11082 from openfoodfoundation/dependabot/bundler/rubocop-rails-2.20.2
...
chore(deps-dev): bump rubocop-rails from 2.19.1 to 2.20.2
2023-06-22 10:18:26 +02:00
jibees
300c4ceed2
Merge pull request #11083 from openfoodfoundation/dependabot/bundler/knapsack_pro-5.1.2
...
chore(deps-dev): bump knapsack_pro from 5.1.0 to 5.1.2
2023-06-22 10:17:44 +02:00
Mohamed ABDELLANI
b072da142e
filter distributors before listing on checkout options
2023-06-22 09:00:39 +01:00
Maikel Linke
08a06d21fa
Allow access to DFC API with OFN API token
2023-06-22 16:58:12 +10:00
Maikel Linke
82fc6a2a9d
Prepare spec to authenticate with other means
...
I want to add OFN API key support.
2023-06-22 16:27:04 +10:00
Maikel Linke
e7fe04f526
Revert "Fix json v1.8.6 common.rb warning"
...
This reverts commit 21b80db0ee .
This fix was needed for an old version of the JSON module with a newer
version of Ruby. But we updated the json gem since and don't need this
any more.
2023-06-22 12:47:28 +10:00
Matt-Yorkley
f9185ea56e
Remove line items related to master variants
...
These shouldn't technically exist, but apparently they can be present if the dataset is old enough. They can trigger a foreign key violation if they are present when a master variant is deleted, so they need to be dropped if present.
2023-06-21 18:08:21 +01:00
Matt-Yorkley
6f5d3ceacc
Remove inventory units related to master variants
...
These shouldn't technically exist, but apparently they can be present if the dataset is old enough. They can trigger a foreign key violation if they are present when a master variant is deleted, so they need to be dropped if present.
2023-06-21 17:20:28 +01:00
Jean-Baptiste Bellet
d2534d6645
Be more specific via !important than the default button rule
...
This one should override the default one
2023-06-21 15:01:14 +02:00
Jean-Baptiste Bellet
7d9018c590
Instead of overriding css rules, prefer to not select rules for trix buttons
2023-06-21 15:01:14 +02:00
dependabot[bot]
c532e822e5
chore(deps): bump @floating-ui/dom from 1.3.0 to 1.4.2
...
Bumps [@floating-ui/dom](https://github.com/floating-ui/floating-ui/tree/HEAD/packages/dom ) from 1.3.0 to 1.4.2.
- [Release notes](https://github.com/floating-ui/floating-ui/releases )
- [Commits](https://github.com/floating-ui/floating-ui/commits/@floating-ui/dom@1.4.2/packages/dom )
---
updated-dependencies:
- dependency-name: "@floating-ui/dom"
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-06-21 09:57:46 +00:00
Jean-Baptiste Bellet
5d1c32e8cd
Remove linksDropdown which is now unused
2023-06-21 10:29:48 +02:00
Jean-Baptiste Bellet
4ec41572b1
Add spec on Canceling an order
...
Strange that it doesn't exist, but anyway, let's create it!
2023-06-21 10:29:48 +02:00
Jean-Baptiste Bellet
ce28c14544
Replace AngularJS directive to a StimulusJS one
...
Delete _order_links.html.haml_spec.rb
2023-06-21 10:29:48 +02:00
Jean-Baptiste Bellet
7421691506
Creates a dropdown controller with its specs
2023-06-21 10:29:47 +02:00
David Cook
5ec872c6fd
Merge pull request #11008 from mkllnk/dfc-connector-import
...
Prototype: Import products via DFC Connector
2023-06-21 12:23:58 +10:00
Maikel Linke
14b2e0f962
Remove datadog gem, too expensive
2023-06-21 11:44:21 +10:00
Matt-Yorkley
98a56bfcf8
Update workflow permissions check to latest version
2023-06-20 14:41:17 +01:00
Matt-Yorkley
776eac9f52
Add image error Bugsnag notifications
2023-06-20 14:14:19 +01:00
Matt-Yorkley
24aa55e053
Remove array syntax on new product form for product image
2023-06-20 13:14:52 +01:00
dependabot[bot]
e8e3aa5f5d
chore(deps-dev): bump knapsack_pro from 5.1.0 to 5.1.2
...
Bumps [knapsack_pro](https://github.com/KnapsackPro/knapsack_pro-ruby ) from 5.1.0 to 5.1.2.
- [Changelog](https://github.com/KnapsackPro/knapsack_pro-ruby/blob/master/CHANGELOG.md )
- [Commits](https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v5.1.0...v5.1.2 )
---
updated-dependencies:
- dependency-name: knapsack_pro
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-06-20 09:31:26 +00:00
dependabot[bot]
584a25052f
chore(deps-dev): bump rubocop-rails from 2.19.1 to 2.20.2
...
Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails ) from 2.19.1 to 2.20.2.
- [Release notes](https://github.com/rubocop/rubocop-rails/releases )
- [Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rubocop/rubocop-rails/compare/v2.19.1...v2.20.2 )
---
updated-dependencies:
- dependency-name: rubocop-rails
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-06-20 09:14:06 +00:00
Gaetan Craig-Riou
ea73781668
Fix bulk order cancellation
...
Add unticking of "send cancellation email to customer" to match
the current test expectation
2023-06-20 10:03:55 +10:00
Maikel Linke
a9f8c7c4ab
Update DFC API docs, describe all endpoints
2023-06-19 16:20:35 +10:00
Maikel Linke
ec8c710e3a
Import simple DFC SuppliedProduct
...
OFN products and variants need more data like a price but the DFC
stores that in a different object. We may get a larger graph containing
that information but we don't have any test data yet.
2023-06-19 16:19:48 +10:00
Maikel Linke
df9e1ac2b4
Encapsulate SuppliedProductBuilder
...
And improve EnterpriseBuilder. It was builder products twice.
2023-06-19 16:19:48 +10:00
Maikel Linke
1adfb5463a
Import DFC measures
2023-06-19 16:19:40 +10:00
Maikel Linke
949019a277
Map has* predicates to Connector attributes
2023-06-19 16:19:40 +10:00
Maikel Linke
bfd084d9b6
Import graphs including anonymous objects
2023-06-19 16:18:58 +10:00
Maikel Linke
3c6f90dbb3
Import from IO objects for convenience, efficiency
...
The Connector exports to a String but Rails' `request.body` is an IO
object. Since the used JSON-LD parser needs an IO object anyway and it
can lower the memory usage we take IO objects as well and handle
in-memory Strings only when given.
2023-06-19 16:18:58 +10:00
Maikel Linke
f5f8c349e1
Resolve DFC Connector objects when importing graph
2023-06-19 16:18:51 +10:00
Maikel Linke
12d56d725b
Import properties which contains lists
...
Not just single values.
2023-06-19 16:18:51 +10:00
Maikel Linke
2abad60511
Import DFC graphs with multiple objects
2023-06-19 16:18:42 +10:00
Maikel Linke
15dd38d6c6
Import simple data from DFC
2023-06-19 16:16:18 +10:00