Maikel Linke
faeb8ae8f8
Fix Exchange clone tagging
...
The validation of ActsAsTaggableOn::Taggable failed when trying to copy
tag ids during cloning. But I found that it's totally unnecessary
because `Exchange.dup` copies the `tag_list` attribute already and it
gets saved correctly. There's an existing spec for this.
2023-08-11 10:14:47 +10:00
Maikel Linke
4a13576f78
Remove now superfluous belongs_to default declaration
2023-08-11 10:14:47 +10:00
Maikel Linke
e6c679cb34
Apply belongs_to_required_by_default to all models
...
Unless they state otherwise.
The new standard also changes the default behaviour of the Shoulda
matcher in Rspec. It now defaults to asserting that an association is
required. That needed some spec updates.
In one case, Spree::Product, I also had to update the model because the
presence validation was somehow not recognised by the Shoulda matcher.
The error message may change slightly but the outcome should be the
same.
2023-08-11 10:14:47 +10:00
Maikel Linke
8ef6966891
Declare old belongs_to default on remaining models
...
It would take ages to go through all files now and assess all belongs_to
associations. So I just declare the old default and then we can move on
and apply the new default for the application while these classes still
use the old one. All new models will then use the new default which is
the goal of this excercise and we can refactor old classes when we touch
them anyway.
2023-08-11 10:14:43 +10:00
Maikel Linke
252f809463
Require CustomTab.belongs_to by default
2023-08-11 10:14:15 +10:00
Maikel Linke
070d1e722e
Require EnterpriseRole.belongs_to by default
2023-08-11 10:14:14 +10:00
Maikel Linke
4dd2955400
Require EnterpriseRelationshipPermission.belongs_to by default
...
I had to change some specs to keep them simple but I don't think
anything is broken. In one case, it would have needed a lot more setup
to make the spec work. But in production, the permissions are never used
with ModelSet, for example.
2023-08-11 10:13:48 +10:00
Maikel Linke
cb494b84f2
Require EnterpriseRelationship.belongs_to by default
2023-08-11 10:13:29 +10:00
Maikel Linke
4b630f187b
Require EnterpriseGroup.belongs_to by default
2023-08-11 10:13:10 +10:00
Maikel Linke
13b2f37884
Require EnterpriseFee.belongs_to by default
2023-08-11 10:13:09 +10:00
Maikel Linke
87ccfc94ef
Require Enterprise.belongs_to by default
...
And remove a duplicate spec.
2023-08-11 10:13:09 +10:00
Konrad
60212f92c3
Merge pull request #11270 from rioug/9553-removing-cutomer-tag-when-search-for-tag
...
Fix removing customer tag when using search bar for said tag
2023-08-11 00:11:55 +02:00
Konrad
c3414143e6
Merge pull request #11222 from Matt-Yorkley/checkout-controller
...
Reduce controller size
2023-08-10 23:28:57 +02:00
Konrad
f59e681826
Merge pull request #11259 from cillian/single-line-voucher-code
...
Don't allow multi-line voucher codes
2023-08-10 23:09:55 +02:00
Matt-Yorkley
b82f368bec
Drop :is_master column from variants table
2023-08-10 12:25:18 +01:00
Maikel
8db8d6de8d
Merge pull request #11372 from Matt-Yorkley/remove-variant-position
...
Remove unused variant :position attribute
2023-08-10 11:48:55 +10:00
Mohamed ABDELLANI
620dd70dd7
rename 'new invoice' button to 'create or update invoice'
2023-08-10 09:35:13 +10:00
Matt-Yorkley
a33b6e0ec9
Update variant sorting
2023-08-09 18:30:56 +01:00
Matt-Yorkley
e65efe0f85
Remove unused variant :position attribute
2023-08-09 18:24:46 +01:00
Rachel Arnould
4505beff98
Merge pull request #11327 from bouaik/fix-display-invoice-tab-for-completed-resumed-canceled-only
...
Fix display invoice tab for completed, resumed and canceled orders only
2023-08-09 18:37:02 +02:00
Rachel Arnould
2b108dfeee
Merge pull request #11116 from abdellani/fix-show-date-only-on-invoices-list
...
render date without time on invoices list
2023-08-09 14:33:40 +02:00
Konrad
89d8fa0306
Merge pull request #11346 from Matt-Yorkley/remove-multiple-taxons
...
[Product Refactor] Remove multiple taxons
2023-08-09 11:19:11 +02:00
Maikel
b50fa216eb
Merge pull request #11117 from rioug/10857-voucher-error-moving-between-summary-and-cart-take2
...
[vouchers] error moving between summary and cart pages
2023-08-09 11:14:52 +10:00
Matt-Yorkley
6fee1d2dde
Use dependent: :restrict_with_error on Taxon/Product association
2023-08-08 11:36:31 +01:00
Matt-Yorkley
38d9f4f1da
Update product v3 table
2023-08-08 11:36:31 +01:00
Matt-Yorkley
820f9530b2
Update product serializer
2023-08-08 11:36:31 +01:00
Matt-Yorkley
33d40ed750
Update association
2023-08-08 11:36:31 +01:00
Matt-Yorkley
cffd7073e2
Delete unused method
2023-08-08 11:36:31 +01:00
Matt-Yorkley
a93809b75f
Remove associated abilities
2023-08-08 11:36:31 +01:00
Matt-Yorkley
a69ab2ef71
Remove multiple taxons on products functionality
2023-08-08 11:36:31 +01:00
Gaetan Craig-Riou
a64023c3df
Apply review suggestion, simplify code slightly
2023-08-08 15:29:23 +10:00
Gaetan Craig-Riou
4e468c81f9
Handle updating customer attribute when directive is destroyed
...
Handle any customer attribute not just tags
2023-08-08 15:29:22 +10:00
Gaetan Craig-Riou
f96bd51344
Rework form to allow displaying the save bar when no result
...
When filtering by a tag, and then removing the tag on the filtered
customers, it let us show the save bar once the last customer has been
removed from the filtered list.
2023-08-08 15:28:13 +10:00
Gaetan Craig-Riou
dba8809057
Handle deleting tag when directive destroyed
2023-08-08 15:28:13 +10:00
Maikel
ccc5975517
Merge pull request #11320 from dacook/css-cleanup
...
SCSS cleanup
2023-08-07 10:23:49 +10:00
Rachel Arnould
1b1279aa56
Merge pull request #11192 from abdellani/bulk-invoice-printing
...
fix Bulk invoice printing/sending
2023-08-04 12:02:43 +02:00
Cillian O'Ruanaidh
d026438edc
Revert "Validate voucher code length doesn't exceed the database column length i.e. 255 characters"
...
This reverts commit 0d0df82522 .
2023-08-04 10:24:21 +01:00
Cillian O'Ruanaidh
9eba266efc
Strip leading and trailing whitespace from code on assignment instead of before validation
...
Co-authored-by: Maikel <maikel@email.org.au >
2023-08-04 10:15:22 +01:00
Cillian O'Ruanaidh
ab0d899a17
Revert "Validate voucher code doesn't contain new line characters"
...
This reverts commit 0c0b85f4c4 .
2023-08-04 10:04:14 +01:00
Gaetan Craig-Riou
6ed35f4cc1
Per review, delete only incomplete payments
...
Use destroy_all so we don't have to manually delete the payment fees
adjustment
2023-08-04 17:03:31 +10:00
David Cook
42230c07b2
Merge pull request #11312 from macanudo527/fix_rubocop_5
...
Fix autocorrect Rails Cops
2023-08-04 11:13:52 +10:00
bouaik
41d649404f
make suggested changes
2023-08-04 00:55:35 +01:00
Maikel
2b18effe6d
Merge pull request #11322 from macanudo527/fix_remaining_line_length
...
Fix remaining Layout/LineLength Rubocop Errors
2023-08-04 09:34:00 +10:00
Matt-Yorkley
dd9bdd9c0e
Move address params handling into Checkout::Params
2023-08-04 08:43:15 +10:00
Matt-Yorkley
13a7c19a06
Extract checkout step(s) validation to a service
2023-08-04 08:43:15 +10:00
Matt-Yorkley
82b8bb74a1
Remove #before_save_hook method and clarify it's intention
2023-08-04 08:43:15 +10:00
Matt-Yorkley
f3899ee251
Extract some related methods to CheckoutSteps concern
2023-08-04 08:43:15 +10:00
Matt-Yorkley
d1bcdde49f
Simplify split checkout errors
2023-08-04 08:43:15 +10:00
Filipe
69dfd53658
Merge pull request #11254 from rioug/11130-add-product-filter-order-report
...
11130 add product filter order report
2023-08-03 16:08:44 +01:00
Mohamed ABDELLANI
6c53f3b8b0
move pretty_date helper into invoice presenter
2023-08-03 15:12:02 +01:00