Maikel Linke
35b4e8c4d1
Allow editing of invalid quantities
...
If the user entered an invalid quantity, Angular set the model to
undefined and we removed the input field to show the add button. That
makes it impossible for a user to see what the maximum quantity to enter
would be. For example:
- The variant has a stock level of 5.
- The user enters 7.
- Angular sets it to undefined.
- The input field disappears.
- The user is startled and doesn't know how to proceed.
But now we hide the input only if it's deliberately set to zero.
2021-01-22 16:42:21 +11:00
Maikel Linke
0166400b03
Guard against invalid quantity input
...
The user can now type anything into the quantity field and some of it
may not be valid. These safe guards ensure that the buttons still work
even if the quantity is undefined or out of range.
Angular guards against the value being out of range but that has other
side-effects. We want to be able to de-activate some of Angular's
behaviour.
2021-01-22 16:42:20 +11:00
Maikel Linke
cf2a105b2a
Prevent line breaks within plus/minus buttons
2021-01-22 16:42:20 +11:00
Maikel Linke
688be46b10
Avoid horizontal scroll bar on small screens
2021-01-22 16:42:20 +11:00
Maikel Linke
3558d01fce
Give the new input fields more space
...
The additional input needs more space and we are adjusting columns here.
2021-01-22 16:42:20 +11:00
Maikel Linke
66423a1ec3
Add quantity input to shop front product list
...
Adding bigger quantities can now be done via an input field instead of
clicking a thousand times.
The add-button has been widened to match the new space requirements.
2021-01-22 16:42:20 +11:00
Maikel Linke
e5506df5ea
Replace bulk quantity label with input field
...
Enable the user to enter a number directly.
2021-01-22 16:42:20 +11:00
Maikel Linke
af918e63ee
Change bulk quantities on any quantity change
...
This prepares for changing the quantity with an input field. It also
applies if the quantity is changed after an ajax request.
2021-01-22 16:42:20 +11:00
Andy Brett
0f92b3c4de
Merge pull request #6685 from Matt-Yorkley/angular-csrf
...
[Rails 5] Update Angular CSRF handling
2021-01-21 11:01:06 -08:00
Andy Brett
70f30f5224
Merge pull request #6658 from andrewpbrett/item-counter-fix
...
Further fix #5989 (Item counter accepts values higher than the available stock)
2021-01-21 10:56:18 -08:00
Matt-Yorkley
ea9ebc8a33
Update Angular CSRF handling
2021-01-16 13:41:24 +00:00
Andy Brett
8c4d12a501
limit item counter to max quantity available even if amount is manually filled in
2021-01-13 16:23:41 -08:00
Matt-Yorkley
09b7512cd8
Remove dead code around unused payment_method_field data-hook
2021-01-09 13:26:30 +00:00
Matt-Yorkley
2864f62a08
Fix missing semicolons in spree_paypal_express.js
2021-01-09 13:22:25 +00:00
Matt-Yorkley
2fb7dfa430
Bring in Paypal Express javascript
2021-01-09 13:22:09 +00:00
Matt-Yorkley
d0800b5e32
Specify json format for API routes that return json in OrderCycleResource
2021-01-08 17:47:09 +00:00
Matt-Yorkley
4bb2653306
Tidy up pagination in Api::ProductsController#overridable and Angular PagedFetcher service
...
Refactors away some unnecessary mess and unblocks the last remaining issue in upgrading the Kaminari gem (deprecated calls to #num_pages method)
2021-01-05 18:57:08 +00:00
Pau Pérez Fabregat
c79baead84
Merge pull request #6524 from ankis17/DatePickerTranslation
...
Fixed Translation for DatePicker
2020-12-14 16:41:51 +01:00
Pau Pérez Fabregat
9f517e1931
Merge pull request #6455 from arku/fix/tabs
...
Fix tab toggle
2020-12-14 09:34:05 +01:00
Ankita Satyavarapu
377febd8d7
Fixed Translation for DatePicker
2020-12-11 22:52:22 -05:00
Andy Brett
a745fceb53
Merge pull request #6469 from andrewpbrett/sca-backend
...
Allow SCA cards to be setup and charged offline for subscriptions
2020-12-11 14:23:12 -08:00
Andy Brett
c70ea44091
show specific error message when add-to-cart fails
2020-12-08 14:37:16 -08:00
Andy Brett
cad8a018f9
put SetupIntent on the connected Stripe account
2020-12-08 07:52:41 -08:00
Andy Brett
215d1bbe20
create js setup intent when authing shop
2020-12-08 07:52:41 -08:00
Andy Brett
f875e406a8
update karma specs for setting default card
2020-12-08 07:46:10 -08:00
Andy Brett
3b44c8e7e2
update UI after changing default card
2020-12-08 07:46:10 -08:00
Andy Brett
c60dcc75cd
confirm changes to default card
2020-12-08 07:46:10 -08:00
Arun Kumar Mohan
868a19df6e
Fix tab toggle
2020-12-03 21:03:44 -05:00
Luis Ramos
f71de8123a
Dont show 'closing in' message when oc closes in more than 3 months
2020-12-03 15:29:14 -08:00
Andy Brett
902f8caea9
direct specifically to shop tab
2020-12-02 11:39:02 -08:00
Andy Brett
14091cd106
fix #6415
2020-12-02 11:39:02 -08:00
Andy Brett
a3a6205343
fix #6252
2020-12-02 11:37:25 -08:00
Luis Ramos
eada388534
Add handle_extensions to get Spree.translations (archaic spree js translations) in handlebars templates
...
This is all legacy from spree that can be cleaned up at some point, we only have two handlebars templates in OFN
2020-11-04 12:15:45 +00:00
Luis Ramos
a18a198812
Fix locations of requires in admin js all.js
2020-11-04 12:15:45 +00:00
Luis Ramos
cf3f511f4d
Add directive spec to validate the dialog template is loaded on element click
2020-10-30 15:09:13 +00:00
Luis Ramos
3b682bc47f
Add warning when uploading a file
2020-10-30 15:09:13 +00:00
Luis Ramos
be35f97622
Add tooltip icon to terms and conditions
2020-10-30 15:09:13 +00:00
Luis Ramos
ca79270ba3
Show T&Cs warning when uploading a new file
2020-10-30 15:09:13 +00:00
Luis Ramos
ceee89fad0
Make Checkout form submit read terms_and_conditions_accepted from the checkout form checkbox
2020-10-30 15:09:13 +00:00
Luis Ramos
57a9d6e1e2
Make customer terms_and_conditions_accepted_at be set to current time
...
after a successful checkout
2020-10-30 15:09:13 +00:00
Luis Ramos
6b826423c1
Merge pull request #6145 from andrewpbrett/instance-unit-picker
...
Allow instances to choose available units for products/variants
2020-10-29 22:22:33 +00:00
Andy Brett
2605b9cdf0
refactor unitScales function
2020-10-29 09:18:24 -07:00
Andy Brett
867947f6b2
refactor availableUnitScales into unitScales
2020-10-29 09:18:24 -07:00
Andy Brett
8591934c19
extract availableUnits to separate method
2020-10-29 09:18:24 -07:00
Andy Brett
23dd09eaad
remove extra debugger statement 🤦
2020-10-29 09:18:23 -07:00
Andy Brett
fa62ec0bff
only show available units for products
2020-10-29 09:17:49 -07:00
Luis Ramos
e860e2ca57
Add label to customer balance so it's clear to the manager what's the balance status: credit owed or balance due
2020-10-29 13:38:36 +00:00
Luis Ramos
76afc0b407
Merge pull request #6202 from cillian/sort-admin-products-by-name-fix
...
Fix sorting of admin products by name
2020-10-29 00:09:31 +00:00
Matt-Yorkley
5edd562691
Merge pull request #6238 from openfoodfoundation/mobile-5-product-listings
...
Merge Product Listings to master
2020-10-22 21:55:42 +02:00
Matt-Yorkley
489529d30e
Merge pull request #5729 from luisramos0/image_settings
...
Remove Image settings page and standardise Paperclip styles
2020-10-22 15:58:14 +02:00