-
Notifications
You must be signed in to change notification settings - Fork 436
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
Feat: Optional Customizable Attribute Filters #385
base: develop
Are you sure you want to change the base?
Conversation
- Now has options to add two attribute filters (2 select fields) - Changed Item Group filter location to the top bar for better UX
- new attribute filtering fields from previous commit now use the item_attributes field instead on columns from SQL statement while not using the use_limit_search field. - fixed an issue where the condition for fetching variant item attributes was incorrect.
If possible the Item Select Query through if it is not possible to use |
Can you please explain the use case? |
This feature offers the ability to add two more filters to the POS interface to filter the products like the Item Group Filter. You can enable filtering using two attributes of your choice, for example, you can enable the first attribute filter and set its data to the list of Size attributes. This feature is disabled by default and can be enabled by the user. |
changed from frappe.db.sql (method to get items_data) to frappe.qb for more security and to follow the new direction to push for frappe.qb instead if frappe.db.sql
New Commit: changed from frappe.db.sql to frappe.qb changed from |
Changed filtering items depending on if they have stock or not through the option (hide unavailable items) in POS profile to be applied as a condition while fetching the data from the database instead of looping through the db result and then filtering. this results in a better performance when the (Hide Unavailable Items) is enabled.
New Commit: Changed filtering items depending on whether they have stock or not through the option This results in a better performance when the (Hide Unavailable Items) is enabled. |
If you need more clarification on any of the commits, please let me know. |
I think we already have this feature but it works in different way, |
Doesn't the template item filters popup only work if you have show template items set to true? I didn't know that it works as a filter, to be honest. I just thought that this feature would be a clean, easy, and straightforward way for managers to set filters on specific attributes that they think are the most important for their use case scenario. Also, I was planning to refactor/redesign that popup window for better UX. |
Ok, then I think this PR not necessary any more |
I think it is a bit inconvenient to have to look for and click on the template item to set some filters for items that you want to search for. This is not UX friendly, that's why i thought the Show Template Items was supposed to only work when you hide the variant items. And that's why I came up with this idea, however if you see this as pointless and the Show Template Items option is a filtering method, then this BR should be closed and the current filtering logic NEEDS some SERIOUS refactoring. |
First Commit : Feat: Optional Attribute Filters
Second Commit: Fixed: filtering and attribute field not populating
Note: Please make sure that the fixes in code starting from line 310 in file
posawesome/posawesome/api/posapp.py
do not break any other code logic