Skip to content

Add price editing overview page #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: 18-user-group-roles
Choose a base branch
from

Conversation

x-m-el
Copy link

@x-m-el x-m-el commented Nov 13, 2024

Add a page for editing prices inline. This can only be viewed by price-admins.
The inline editing will first show the returned data from mu-search and loads the records in the background so editing is possible. If a user tries to edit before the loading is done, it is "kept in a queue" and will save the change the moment the records are loaded. There is an indication if the saving was successful or not.
Some helper components are adjusted so they can also handle mu-search data.
The pages under /products are moved around so filter logic can be reused in this new page.
Filter logic is in products.list, with the original list of products set in products.list.index and the new price list in products.list.prices.
Templating syntax (.gjs file) is used as the inline editing needs a few components to work (alternative would be to create 4 extra files).

Ruben added 6 commits November 5, 2024 22:32
- same filters as original product list
- allows editing purchasePrice, margin and sellingPrice
- auto saves whenever a change occurs

The initial search returns ES search objects, so the template is made to handle both ES and ED (which also means adjusting some components to handle both).
ember-data records are fetched to be able to save the records with their changes, but also react on changes in the template.
Data is shown the moment ES returns a response. ED records are loaded while the user can already see the table.
Some helpers specified inside a model are moved out of it so these can be used by ES results too.
- show an icon depending on the state of saving the specific row.
- queues changes, so user can do multiple actions (e.g. change inputPrice and margin)
- remove unused helpers
- use svg-jar for icons
- avoid jumping UI when clicking buttons in pricelist
- add page-title
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant