Commit Graph

17788 Commits

Author SHA1 Message Date
Ahmed Ejaz
e4e7ef395b Merge pull request #14113 from gbathree/13817-fix-guest-order-cancellation
Fix guest order cancellation redirecting to home page
2026-04-04 21:42:44 +05:00
Ahmed Ejaz
ec24740c3b Merge pull request #14085 from dacook/admin-product-actions-fixes
[Admin Products] Action menu fixes
2026-04-04 21:42:12 +05:00
Rachel Arnould
c19241ddd9 Merge pull request #14118 from dacook/linked-variants-14088
Prevent creating a linked variant from a linked variant
2026-04-02 17:44:34 +02:00
Maikel
450fe4ada1 Merge pull request #14119 from mkllnk/replace-whenever
Replace whenever with sidekiq scheduler
2026-04-01 15:37:33 +11:00
Maikel Linke
bcecbf9a0f Require rake dependency to run it within jobs 2026-04-01 15:18:49 +11:00
David Cook
cacb62f58c Style fix 2026-04-01 14:11:19 +11:00
David Cook
6048fcb053 Define function as member arrow function
This way it behaves as an instance method, and we don't have to pass in the object.
2026-04-01 14:11:19 +11:00
David Cook
6013b6be70 Remove transform at end of animation
During transform, any overflow on the element is clipped/hidden. This caused all dropdown menus to be clipped and unusable. Now, once the animation is complete, the overflow is visible, and menus are usable.

Mistral Vibe AI was used to find this solution. I tried to find a CSS solution last week but failed, then started to consider using JS to remove the class, but decided against it once I realised that the product clone JS was already doing that, and it didn't seem to solve the clipping issue.
So I asked Mistral Vibe and it suggested adding 'forwards' (before it had spent energy on evaluating the existing style rules). As you can see 'forwards' was already there, but removing it helped. So Mistral was wrong, but at least pointed me in the right direction, yay!
2026-04-01 14:11:19 +11:00
David Cook
22a1528ac7 Show unit in tooltip
Variants may have the same name, or no display_name at all. This helper method provides a more comprehensive way of describing the variant.
2026-04-01 14:11:19 +11:00
David Cook
19006d6c17 Close action menu when making a selection
But don't hide it immediately, because the user can't see if they made a selection, or accidentally closed it. Instead, fade slowly so that you can see the selected option momentarily (like system menus). This gives enough feedback while we wait for the selected action to perform.

I did attempt a blink on the item background colour, like my favourite OS does which is really helpful. But couldn't get the CSS to work.
2026-04-01 14:11:19 +11:00
David Cook
da69e2c383 Widen action menus slightly when needed 2026-04-01 14:11:19 +11:00
Ahmed Ejaz
9b145da898 Merge pull request #14040 from chahmedejaz/task/13797-improve-performance-of-products-page
Fix Admin Bulk Products screen performance issue
2026-04-01 00:37:40 +05:00
David Cook
ccc38367f3 Prevent creating a linked variant from a linked variant
It's just too confusing.
2026-03-31 14:34:17 +11:00
Maikel Linke
80a12db191 Move database clean from cron to Sidekiq scheduler
After moving the remaining tasks from schedule.rb to sidekiq.yml, we can
remove whenever and won't rely on cron any more. That will simplify the
setup and migration to a new server.
2026-03-31 12:34:47 +11:00
Ahmed Ejaz
3ee338fa8d Add ajax search controller 2026-03-31 01:54:02 +05:00
Greg Austic
c72976b1e2 Fix guest order cancellation redirecting to home page
When a guest places an order and tries to cancel it from the order
confirmation page, the cancellation silently failed and redirected
to the home page. The guest was left unsure whether the order was
cancelled, and the hub received no cancellation notification.

Root cause: two missing pieces for guest (token-based) authorization:

1. The `:cancel` ability in Ability#add_shopping_abilities only checked
   `order.user == user`, ignoring the guest token. The `:read` and
   `:update` abilities already support `order.token && token == order.token`
   as a fallback — `:cancel` now does the same.

2. The `cancel` action called `authorize! :cancel, @order` without
   passing `session[:access_token]`, so even with the corrected ability
   the token was never evaluated.

Fixes #13817

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 09:05:47 -04:00
Gaetan Craig-Riou
01cff7a618 Merge pull request #14060 from mvanhorn/add-order-id-to-webhook
Add order number to Payment webhook payload
2026-03-27 09:29:10 +11:00
Ahmed Ejaz
4a66984ec4 Merge pull request #14084 from chahmedejaz/bugfix/14081-delete-user
Fix authorization for removing enterprise managers for non-admins
2026-03-26 05:10:36 +05:00
Ahmed Ejaz
2fe28d1707 Merge pull request #14101 from mkllnk/taler-currency
Use real currency for Taler payments unless using demo backend
2026-03-25 20:44:44 +05:00
Rachel Arnould
dcf3ab74b8 Merge pull request #13962 from mkllnk/taler-credit
Credit customers via Taler
2026-03-25 15:24:06 +01:00
Maikel Linke
fe0c6a4deb Use real currency for Taler payments unless using demo backend. 2026-03-25 15:09:43 +11:00
Ahmed Ejaz
8ba0ab6b5a Update specs according to new remote search function on products page 2026-03-25 02:01:36 +05:00
Ahmed Ejaz
044f6131da fix aria_label translations 2026-03-25 01:30:06 +05:00
Ahmed Ejaz
062fcd317c Add searchable dropdowns for producers, categories, and tax categories in products_v3 2026-03-25 01:30:06 +05:00
David Cook
5e92fa9a17 Merge pull request #14078 from rioug/fix-flacky-order-cylcle-spec
[Spec] Fix flaky order cycle spec
2026-03-23 12:24:05 +11:00
Gaetan Craig-Riou
d6c69fdc2c Fix code typo
Co-authored-by: Maikel <maikel@email.org.au>
2026-03-23 10:48:27 +11:00
Ahmed Ejaz
715a8f421a 14081: fix permission issue for deleting manager 2026-03-21 03:38:38 +05:00
Rachel Arnould
06d6db5a07 Merge pull request #14075 from gbathree/13688-fix-button-font-consistency
Fix: unify font-family across all .button elements
2026-03-20 11:03:51 +01:00
Rachel Arnould
3f81883bc7 Merge pull request #14061 from mvanhorn/fix/enterprise-user-inline-error-style
Fix inline error style in Add Manager dialog
2026-03-20 11:03:32 +01:00
Rachel Arnould
27be0f6fd1 Merge pull request #13912 from dacook/sourced-variant1-13887
Create linked variants
2026-03-20 10:59:46 +01:00
Gaetan Craig-Riou
4dc44c6156 Fix code syntax 2026-03-20 15:49:41 +11:00
Gaetan Craig-Riou
8defb2f4c8 Improve EnterpriseFee loading
Request is only send if there isn't another currently running, and also
ensure that filtered enterprise fees are loaded only when not other
request is running.
2026-03-20 14:38:49 +11:00
Maikel Linke
b4b3e21cf6 Replace deprecated option bypass
- https://github.com/heartcombo/devise/pull/5803
2026-03-20 11:32:49 +11:00
Maikel Linke
ce90ec0f5b Ignore unused authentication_token column 2026-03-20 11:32:49 +11:00
Maikel Linke
2998432744 Remove use of devise token_authenticable
Our production servers don't show any use of this feature. The
associated column is nil for all users.

The gem has not been updated in seven years and it's blocking an
important upgrade of devise.
2026-03-20 11:32:48 +11:00
Maikel
c5aaecf76a Merge pull request #13961 from mkllnk/taler-checkout-stock-error
Taler checkout stock error
2026-03-20 11:29:58 +11:00
Greg Austic
032953e7d6 Fix: unify font-family across all .button elements
<button> elements don't inherit font-family from parent by default
in all browsers, causing a visible font mismatch between the
link-based buttons (Back To Store, Back To Website, Cancel Order)
and the button-tag-based Save Changes button on the order
confirmation page.

Add `font-family: inherit` to the base `.button, button` rule so
all button elements use the inherited page font (Roboto). Remove the
now-redundant `font-family: $body-font` from the `.primary` rule.

Fixes #13688

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 10:22:59 -04:00
Matt Van Horn
1878a39188 Fix inline error style in Add Manager dialog to match product list
Add .field class to the email row in the user invitation modal so
the .formError styles (icon, color, font-size) defined in forms.scss
apply consistently with the product list inline errors.

Fixes #13993
2026-03-18 21:46:21 -07:00
Matt Van Horn
544f62dbc5 feat(payments): add order number to webhook payload
Include the order number in the webhook payload so consumers can
identify which order a payment notification belongs to.

Fixes #13858
2026-03-18 00:12:23 -07:00
David Cook
8e6f1c4e99 Show display name 2026-03-18 14:30:27 +11:00
David Cook
2004934399 Register only necessary elements
This should be more efficient.

Best viewed with whitespace ignored.
2026-03-18 14:30:23 +11:00
David Cook
827ba1990d Ensure changes are tracked on newly added variant
I considered a few ways to do this. Cloned products are done with MutationObserver but it doesn't quite sit right with me. A dedicated controller for newly added rows would provide a good general solution. But do we want yet another controller? I'm not sure. This works and is pretty simple (although it requires a quick loop over _every_ form element.. let's see if we can avoid that.)
2026-03-18 14:03:11 +11:00
Maikel Linke
9961578fc1 Don't offer to void a refund 2026-03-16 12:56:38 +11:00
Maikel Linke
53c2ef53d5 Call #credit with right arguments 2026-03-16 12:56:22 +11:00
Gaetan Craig-Riou
c134bbf49b Add missing ability for credit customer
Fix the specs to use a non super admin user, so it should catch missing
ability in the future.
2026-03-11 15:34:27 +11:00
Maikel Linke
35e03ea3c7 Check stock before completing order after Taler payment 2026-03-11 15:12:21 +11:00
Maikel Linke
9ca1a9e33f Allow orders to be paid before checkout
Taler puts the payment completion into the hands of the user. So we
can't strictly finalise the payment and order together.

And in the bigger picture, it should be okay if a payment goes through
but we have to abort checkout due to stock issues. Then we want to be
able to check out again, using the existing complete payment. Any
refunds can be handled later by the shop owner.
2026-03-11 14:46:06 +11:00
Maikel Linke
7619062ad2 Revert "Move payment action logic to payment"
This reverts commit fdd22bc097.

And it adds the now needed `can_credit?` method to Taler.
It's just a duplicate.
2026-03-11 11:32:08 +11:00
David Cook
18fb1cfa74 Rename variant 'owner' to 'hub'
As discussed by team, and using same nomenclature as VariantOverride.
2026-03-11 11:09:13 +11:00
David Cook
e9ce2df5a9 Rename 'source variant' to linked variant (in most places)
There are two types of linked variant associations: source and target, so we need to keep the name there.
But when cloning a variant and retaining a link as source,  we will prefer the general term 'linked variant'. Hopefully this name works well.
2026-03-11 11:09:13 +11:00