Commit Graph

31439 Commits

Author SHA1 Message Date
Ahmed Ejaz
aa040737dd 12398: add turbo stream to delete variants 2024-06-17 14:56:22 +02:00
Ahmed Ejaz
bb2e7af190 rename destroy.turbo_stream to make it more generic 2024-06-17 14:56:22 +02:00
Ahmed Ejaz
f2bca2260c 12398: implement the destroy action for products 2024-06-17 14:56:22 +02:00
Ahmed Ejaz
1ab2c31737 12398: fix rebasing mistake 2024-06-17 14:56:22 +02:00
Ahmed Ejaz
4d81f11c39 12398: update modal-link-controller to dynamically set
form action as per the selected product to delete
2024-06-17 14:56:22 +02:00
Ahmed Ejaz
59435c1298 12398: add destroy action with turbo stream 2024-06-17 14:56:22 +02:00
Ahmed Ejaz
52b683743b 12398: update confirm_modal to use button_to form submission 2024-06-17 14:56:22 +02:00
Ahmed Ejaz
faec83578f 12398: add turbo-rails 2024-06-17 14:56:22 +02:00
David Cook
1ae1c95e15 When dropdown fields don't allow blank, but are blank, show as changed
They were already counted as changed by the javascript, but didn't have a 'changed' class to indicate it.
The reason they are 'changed', is because the dropdown has no blank option, and is forced to select the first item in the list.

This is purely to cover the case of invalid data, but should help a lot when debugging data issues. I don't think it's any less efficient, because the extra 'classList.toggle' calls don't do anything on unchanged fields.
2024-06-17 14:56:22 +02:00
Maikel Linke
c321104c21 Move Connected Apps form out of Enterprise form
Nested forms are not valid HTML and we were submitting the wrong
authenticity token to Rails when updating the enterprise.

I inverted the hierarchy of the form and the panels. The menu and
tab-panel structure now sits above and the enterprise edit form is
nested within.

The current structure is not ideal but it's only a transition phase. I'm
expecting the page to get re-designed at some point and re-writen
without AngularJS.
2024-06-17 14:56:22 +02:00
dependabot[bot]
c6be3b16eb chore(deps): bump devise-i18n from 1.12.0 to 1.12.1
Bumps [devise-i18n](https://github.com/tigrish/devise-i18n) from 1.12.0 to 1.12.1.
- [Release notes](https://github.com/tigrish/devise-i18n/releases)
- [Changelog](https://github.com/tigrish/devise-i18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tigrish/devise-i18n/compare/v1.12.0...v1.12.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-17 14:56:22 +02:00
Maikel Linke
b62f43da17 Remove obsolete rake task 2024-06-17 14:56:22 +02:00
cyrillefr
0d8b5ea6f7 Fix RedundantPresenceValidationOnBelongs on some files (part VI)
- presence: true is redundant since Rails 5.0 BUT applies
   with new default config of
   belongs_to_required_by_default to true.
   Lots of files with belongs_to_required_by_default = false
   (backward compatibility).
   So: deleting this setting implies to adding optional: true
 - added 'NOT NULL' constraints so model constraints match
   with contraints on DB tables.
 - corresponding migration files to match AR Models &
   DB tables
 - rake tasks to check corrupt data (ie: NULL/nil in id fields)
   (previous commit)
 - updated the todo
2024-06-17 14:56:22 +02:00
cyrillefr
01902443f1 Task to check missing foreing ids in spree_line_items 2024-06-17 14:56:22 +02:00
David Cook
746b8fc703 Remove redundant code 2024-06-17 14:56:22 +02:00
filipefurtad0
8de9055e7b Removes tests on edit action, under the Delete section 2024-06-17 14:56:22 +02:00
filipefurtad0
9af7975d1c Applies existing helper to assert on rows with product name 2024-06-17 14:56:22 +02:00
filipefurtad0
bea6344fc5 Assures the Edit button link is always displayed for the first variant,
although the delete button is not

Also should work for a second (non-default variant)

Removes unecessary test cases
2024-06-17 14:56:22 +02:00
filipefurtad0
43ee364bf8 Removes pending test case - covered in:
- Changing producers, category and tax category, done in 15ee4f6

- Updating Unit value, done in 49226ff

Removes comment about errors for empty variant_unit_name

I think this was done in commit f05d27b

Would you agree @dacook?
2024-06-17 14:56:22 +02:00
filipefurtad0
3009490c15 Updates tests around product and variant search
Adds test for a non-existing product

Adds test for variant search

Improves tests with multiple variants
2024-06-17 14:56:22 +02:00
filipefurtad0
20fb38da96 Adds tests around using the page
- with no products

- column display dropdown

- listing products with several variants
2024-06-17 14:56:22 +02:00
Maikel Linke
44a296691a Clearer naming of helper method 2024-06-17 14:56:22 +02:00
Maikel Linke
4b4ae8c7ba Allow only enterprise managers to connect apps
Otherwise it doesn't work because non-managers, like super admins, are
not authorised to access enterprise data via the DFC API.
2024-06-17 14:56:22 +02:00
Cillian O'Ruanaidh
36b1c2bd83 Remove redundant spec type offence from MapHelper spec 2024-06-17 14:56:22 +02:00
Cillian O'Ruanaidh
b428450cf8 Make sure OSM map is not enabled in test environment in case it abuses OSM tile servers 2024-06-17 14:56:22 +02:00
Cillian O'Ruanaidh
6dcb182c31 Add tests to make sure the appropriate map is loaded e.g. Open Street Map or Google 2024-06-17 14:56:22 +02:00
Cillian O'Ruanaidh
87fe5f413b Get registration location map working with OSM 2024-06-17 14:56:22 +02:00
Maikel Linke
f4a69b4664 Update locales 2024-05-31 12:16:18 +10:00
Maikel
c0690d51e5 Merge pull request #12530 from openfoodfoundation/dependabot/bundler/rack-timeout-0.7.0
chore(deps): bump rack-timeout from 0.6.3 to 0.7.0
2024-05-31 09:42:30 +10:00
Filipe
9eaf6c3b9c Merge pull request #12489 from mkllnk/available-locales
More realistic test env for translations
2024-05-30 15:00:36 +02:00
Filipe
a01dcaadcf Merge pull request #12506 from anansilva/12448-sanitise-html-enterprise-group
Sanitise HTML in long description of enterprise group [read-only]
2024-05-30 14:07:20 +02:00
dependabot[bot]
6dee200938 chore(deps): bump rack-timeout from 0.6.3 to 0.7.0
Bumps [rack-timeout](https://github.com/zombocom/rack-timeout) from 0.6.3 to 0.7.0.
- [Changelog](https://github.com/zombocom/rack-timeout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/zombocom/rack-timeout/compare/v0.6.3...v0.7.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-29 09:35:40 +00:00
Gaetan Craig-Riou
c81e7f3b5d Update all locales with the latest Transifex translations v4.4.48 2024-05-29 14:19:54 +10:00
Gaetan Craig-Riou
0e9b753bbc Merge pull request #12514 from cyrillefr/RedundantPresenceValidationOnBelongs_part_V
Fix redundant presence validation on belongs part V
2024-05-29 09:57:22 +10:00
Maikel
5f137c19a3 Merge pull request #12527 from openfoodfoundation/dependabot/bundler/view_component-3.12.1
chore(deps): bump view_component from 3.12.0 to 3.12.1
2024-05-29 08:47:53 +10:00
dependabot[bot]
8421c35e42 chore(deps): bump view_component from 3.12.0 to 3.12.1
Bumps [view_component](https://github.com/viewcomponent/view_component) from 3.12.0 to 3.12.1.
- [Release notes](https://github.com/viewcomponent/view_component/releases)
- [Changelog](https://github.com/ViewComponent/view_component/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/viewcomponent/view_component/compare/v3.12.0...v3.12.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-28 09:59:37 +00:00
Gaetan Craig-Riou
6f5bcda421 Merge pull request #12523 from openfoodfoundation/dependabot/bundler/webmock-3.23.1
chore(deps-dev): bump webmock from 3.23.0 to 3.23.1
2024-05-28 10:02:00 +10:00
dependabot[bot]
f70dd58533 chore(deps-dev): bump webmock from 3.23.0 to 3.23.1
Bumps [webmock](https://github.com/bblimke/webmock) from 3.23.0 to 3.23.1.
- [Changelog](https://github.com/bblimke/webmock/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bblimke/webmock/compare/v3.23.0...v3.23.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-27 09:50:38 +00:00
David Cook
a405f17c0b Merge pull request #12510 from cyrillefr/RemoveUnusedMissingIdsCheckRakeTasks
Deleting some used one-shot rake tasks
2024-05-27 13:53:21 +10:00
Gaetan Craig-Riou
a64bf68d54 Merge pull request #12517 from openfoodfoundation/dependabot/bundler/knapsack_pro-7.4.0
chore(deps-dev): bump knapsack_pro from 7.2.0 to 7.4.0
2024-05-27 10:11:25 +10:00
dependabot[bot]
9cd5f5aaa0 chore(deps-dev): bump knapsack_pro from 7.2.0 to 7.4.0
Bumps [knapsack_pro](https://github.com/KnapsackPro/knapsack_pro-ruby) from 7.2.0 to 7.4.0.
- [Changelog](https://github.com/KnapsackPro/knapsack_pro-ruby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v7.2.0...v7.4.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-24 09:13:06 +00:00
filipefurtad0
0bfa9fe997 Update all locales with the latest Transifex translations v4.4.47 2024-05-24 09:49:20 +01:00
cyrillefr
5bc6d16f34 Fix redundant presence validation on belongs part V
- presence: true is redundant since Rails 5.0 BUT applies
   with new default config of
   belongs_to_required_by_default to true.
   Lots of files with belongs_to_required_by_default = false
   (backward compatibility).
   So: deleting this setting implies to adding optional: true
2024-05-24 08:22:20 +02:00
Maikel
5b9e83745d Merge pull request #12508 from mkllnk/schema
Fixup db schema.rb
2024-05-24 08:19:31 +10:00
Filipe
88baf5e1de Merge pull request #12496 from isidzukuri/12355-remove-unused-discourse
[12355] Remove discourse
2024-05-23 19:28:02 +01:00
Filipe
5455e68620 Merge pull request #12504 from dacook/buu/edit-image-turbo-12399
[BUU] Remove StimulusReflex from Image Edit
2024-05-23 17:32:59 +01:00
Rachel Arnould
163e9b6c9c Merge pull request #12505 from filipefurtad0/remove_deprecation
Removes deprecation strikethrough from tax report (by producer)
2024-05-23 17:14:28 +02:00
cyrillefr
8c0e20f53c Deleting some used one-shot rake taskes
- in relation to: Fix Rubocop Rails issues #11482
 - and  Require belongs_to associations by default #11297
 - and #12407 #12428 etc.
2024-05-23 10:07:56 +02:00
Maikel Linke
b9c7be769a Fixup db schema.rb
It looks like I forgot to commit the latest change in 46cd60aa3c.
2024-05-23 15:51:43 +10:00
Maikel Linke
968456e5e0 Create special locale for test environment
So hopefully we'll notice if our fallback mechanism fails.
2024-05-23 15:10:24 +10:00