Cillian O'Ruanaidh
276b94de5b
Sort orders by last name, then first name i.e. the same way bulk order management works
2023-07-28 14:20:29 +01:00
David Cook
8ef73906db
Show products_v3 in the submenu
...
It's not translated, but that doesn't matter, it's just a shortcut while we're developing it.
2023-07-25 15:31:57 +02:00
David Cook
439c0a8e18
Remove unnecessary match_path options
...
Spree::Tab already knows when to highlight these, based on the controller name. It even handles sub-paths like '/admin/products/garlic/edit'.
2023-07-25 15:31:57 +02:00
David Cook
ea93800ee6
[table] Tax category: display None instead of blank
2023-07-25 15:31:57 +02:00
David Cook
51189a3138
[table] Hide properties for variant row
...
These were a duplicate of the product.
2023-07-25 15:31:57 +02:00
jibees
605cb730f7
Merge pull request #11163 from jibees/productsV3-searching-filtering-pagination
...
🚧 Products v3: viewing, searching, filtering & pagination
2023-07-25 15:22:42 +02:00
Filipe
8bd25f9711
Merge pull request #11251 from jibees/11207-update-all-products-report-to-include-stock
...
Admin, Products & Inventory reports: add `on_hand` and `on_demand?` columns by default ; mark `Inventory (on hand)` report as deprecated
2023-07-21 17:07:00 +01:00
Filipe
0d0beda887
Merge pull request #11084 from abdellani/update_invoice_status_automatically
...
set invoice status automatically after creation
2023-07-21 16:21:05 +01:00
Jean-Baptiste Bellet
a094a89c09
Mark "Inventory (on hand)" report as deprecated
...
Co-Authored-By: Maikel <maikel@email.org.au >, @dacook
2023-07-21 09:27:07 +02:00
filipefurtad0
4b64b9085c
Adds missing keys
2023-07-20 19:18:27 +01:00
Jean-Baptiste Bellet
037589ecda
Add columns translation
2023-07-19 14:58:40 +02:00
Jean-Baptiste Bellet
dec779a357
available_on column has been deleted
...
https://github.com/openfoodfoundation/openfoodnetwork/pull/11136
2023-07-19 14:58:39 +02:00
Jean-Baptiste Bellet
010f19cb83
Create a medium height button, and adjust #sort row
2023-07-19 14:58:39 +02:00
Jean-Baptiste Bellet
c378ad1d88
Add "no results found" container
2023-07-19 14:58:39 +02:00
Jean-Baptiste Bellet
5a8a187f54
Add clear search button and action
2023-07-19 14:58:39 +02:00
Jean-Baptiste Bellet
904c7bfacf
Buttons design
...
Remove already defined `$border-radius`
Defined `app/webpacker/css/admin/globals/variables.scss`
Adjust height
2023-07-19 14:58:39 +02:00
Jean-Baptiste Bellet
7b56cbf3d4
Add labels to selectors, and adjust css
...
+ Adjusting filter elements with flex-grow properties
2023-07-19 14:58:39 +02:00
Jean-Baptiste Bellet
333dc11fc1
Manage form params vs. URL params. And replace state with params.
...
"One needs to understand what the source of the params in a reflex is. And there are two sources:
the closest form
the url of the currently displayed page"
Source: https://github.com/stimulusreflex/stimulus_reflex/issues/290#issuecomment-683334963
2023-07-19 14:58:39 +02:00
Jean-Baptiste Bellet
bfe1884ab5
Can filter by categories
2023-07-19 14:58:39 +02:00
Jean-Baptiste Bellet
ef1702188f
Extract filters from 'no products found' logic
...
We still want to display filters if no products found
2023-07-19 14:58:39 +02:00
Jean-Baptiste Bellet
f58cf2d3b2
Can filter by producer
...
Not sur the request nor the `producers` in the reflex should be like this. This is a proof of concept, and should probably be reviewed
Fix linter issues
2023-07-19 14:58:39 +02:00
Jean-Baptiste Bellet
ddfc60c85e
Don't use events, but call the loading controller itself
2023-07-19 14:58:39 +02:00
Jean-Baptiste Bellet
762b777995
Design of the search button
2023-07-19 14:58:39 +02:00
Jean-Baptiste Bellet
38d0af8ec0
Simplify: don't need to pass through the js controller
...
Use the reflex itself
+ Don't need to create a method that will be called only in the connect
+ Simply code by adding only two lifecycle methods
Actually it seems that all reflex related to products controller should show/hide loading
2023-07-19 14:58:39 +02:00
Jean-Baptiste Bellet
643897abb2
Add search functionnality
2023-07-19 14:58:39 +02:00
Jean-Baptiste Bellet
c786f300ca
Have a tiny url state management by using replace_state of cable_ready
2023-07-19 14:58:39 +02:00
Jean-Baptiste Bellet
3da6e02192
Call pagination via perPage param: no state to manage, use param
2023-07-19 14:58:39 +02:00
Jean-Baptiste Bellet
61d1f30e04
Rename productsV3 to products: avoid upper|lower case issues
...
This is causing some issues, misunderstandings around case.
Therefore, directly use the Reflex, and lifecycle methods `beforeFetch` and `afterFetch` are called, even if we use the Reflex (and not the js controller methods). This is pretty handy.
+ adds some id to pagination element (https://docs.stimulusreflex.com/guide/reflexes.html#declaring-a-reflex-in-html-with-data-attributes )
Global documentation: https://docs.stimulusreflex.com/guide/reflexes.html
2023-07-19 14:58:39 +02:00
Jean-Baptiste Bellet
574adb88d2
Add a per page component
...
This is still a WIP.
2023-07-19 14:58:39 +02:00
Jean-Baptiste Bellet
0b83dc088d
Separation of concerns: use a loading controller
...
Two different events can be used: `show-loading` and `hide-loading`.
I'm not 100% sure this is the right way to go, but let's try!
2023-07-19 14:58:39 +02:00
Jean-Baptiste Bellet
5aebbe4102
use beforeFetch and afterFetch lifecycle methods
...
+ Move outside `Admin` module the reflex
Therefore, this reflex should be _equivalent_ to its javascript controller: `ProductsV3` (relation is made through names)
Remove unwanted line
Actually call StimulusJS controller instead of calling the reflex itself
In order to have this "showLoading", "hideLoading" behavior.
It seems to be possible to directly use the Reflex itself (use `data-reflex` instead of `data-action`) but I can't make it work: the `stimulus-controller:after` event is never broadcasted/catched (but `stimulus-controller:before` yes...)
Documentation:
https://docs.stimulusreflex.com/guide/reflexes.html#understanding-stimulusreflex-controllers
https://docs.stimulusreflex.com/guide/lifecycle.html#generic-life-cycle-methods
Maybe @dacook if you want to have a look...
2023-07-19 14:58:39 +02:00
Jean-Baptiste Bellet
47f21cb59e
Add pagination with pagy
...
For `admin_style_v3` use `<` and `>` for next and previous link
instead of `next` and `previous` string
Extract a mixin for a default box-shadow
Maybe this needs to be redefined. Let's see how next things goes.
When a table is followed by a pagination, remove its margin-bottom + border
Finally, design the pagination component
Add sorting/pagination module, on top of table
We use `cablea_ready.replace`, so need to add `#products-content` id
Use a `pagy` partial with reflex action, instead of the legacy one
- revert the legacy one to its previous state
- in reflex, fetch product with page attribute, 1 by default
Move `pagy` into `admin/shared/v3/` to be reusable
+ use fontawesome icons for next and previous page
Remove useless line
2023-07-19 14:58:39 +02:00
Jean-Baptiste Bellet
776b9adc72
Display shipping address in summary step, instead of the billing one
...
+ update specs accordingly
2023-07-17 09:37:05 +02:00
Filipe
308ce9263d
Merge pull request #11170 from jibees/11160-bulk-actions-function-not-working-on-safari-mac-browser
...
Admin, Orders: Make bulk actions dropdown re-enabled for Safari browser
2023-07-13 17:17:18 +01:00
Filipe
2f8a056bee
Merge pull request #11187 from jibees/10975-white-label-remember-custom-tab-activation-after-error-message
...
Admin, White Label: check the custom tab checkbox if any errors on custom tab (ie. title is blank)
2023-07-13 16:43:18 +01:00
Filipe
448d5ea017
Merge pull request #11135 from Matt-Yorkley/vouchers
...
Vouchers part 2
2023-07-13 12:50:32 +01:00
Jean-Baptiste Bellet
6143f4ce6f
Use dropdown controller to manager actions dropdown in orders page
2023-07-11 10:48:52 +02:00
Mohamed ABDELLANI
4b003aa08b
replace status:status with cancelled:boolean on invoice model
2023-07-11 09:15:25 +01:00
Jean-Baptiste Bellet
a8b9d9d8af
Check the custom tab checkbox if any errors (ie. title is blank)
2023-07-10 16:31:33 +02:00
Filipe
f0bcb79c09
Merge pull request #11169 from openfoodfoundation/11164-admin-orders-actions-dropdown-is-not-well-placed
...
Fix container issues introduced by #11123
2023-07-07 11:15:14 +01:00
Matt-Yorkley
42a3087cdb
Remove :available_on attribute from Product class
2023-07-06 14:36:35 +01:00
Jean-Baptiste Bellet
6ee388fe51
Fix container issues
2023-07-06 11:41:54 +02:00
David Cook
05a22b80bc
Merge pull request #11123 from dacook/buu-products-table
...
[admin_style_v3] Products table with variants
2023-07-06 09:37:31 +10:00
Matt-Yorkley
55cc57cf87
Use pre_discount_total when comparing to voucher amount
2023-07-04 13:13:05 +01:00
Matt-Yorkley
f7912a2240
Fix CSS/layout issues
2023-07-04 13:13:05 +01:00
Matt-Yorkley
672400192f
Update use of params
2023-07-04 13:13:05 +01:00
Matt-Yorkley
9b45b71696
Improve feature toggling
2023-07-04 13:13:05 +01:00
Matt-Yorkley
28795effc3
Clarify named vouchers in UI
2023-07-04 13:13:05 +01:00
Matt-Yorkley
de97e69e7d
Show/hide payment methods if voucher changes order total to zero
2023-07-04 13:13:05 +01:00
Matt-Yorkley
55bce9f1b2
Remove @voucher_adjustment instance variable
2023-07-04 13:13:05 +01:00