Closed agritheory closed 3 months ago
To Dos as of 2/26/24:
all-products
, Item List View, via frappe.boot
#73 @bhattdevarsh This looks great! A couple more things to incorporate:
Added collapsible div
Managed Icon, onclick event and cursor pointer
Added key value to searchComponent called visible
Made possible changes to customize scrollbar on Firefox
Still required for this to be considered complete:
To Dos as of 2/26/24:
- [x] Make views configurable in Inventory Tools settings -
all-products
, Item List View, viafrappe.boot
Load inventory_tools settings into frappe.boot #73- [x] Document and manually test Specification configuration workflow
- [x] Add helper on Item Group (to generate Specification Values for Items in that group)
- [x] Add helper on Item to edit that Item's Specification Values
@bhattdevarsh Can you add these last two features?
@agritheory @Alchez
- [ ] Add helper on Item Group (to generate Specification Values for Items in that group)
I am thinking of a solution where we can use similar approach as helper on Item, Having a button called "Generate Specification Values" under Item Group and on click of that we fetch specification and attributes created for that group. Some Attributes can have some field mapped with it and some may not. For the mapped field attributes we can write a logic that auto-fetch the values from group items and for remaining we let user type it manually.
Attaching the image that demonstrates how the dialogue box may look like. please add/suggest necessary changes.
@bhattdevarsh I was thinking about this too and I think Item Group is actually the wrong place to put this, it should be on the specification itself. I like your approach and I think it makes sense to reuse or modularize the existing modal.
Previous commit carries solution to this issue-> https://github.com/agritheory/inventory_tools/issues/76
It does not appear as though the configuration for app/website visibility is working, filters do not appear to being set in the list view and the styling I think is not getting pulled in.
This feature is getting very lose but it isn't quite there yet. CC @Alchez @bhattdevarsh
@agritheory
It does not appear as though the configuration for app/website visibility is working, filters do not appear to being set in the list view
I've added a commit that should allow the filters to work, but I'm seeing weird UI issues with the applied filters that I've noted in a comment above.
and the styling I think is not getting pulled in.
I couldn't see any stylesheets in the app, and I think all of it is coming from the vue files directly. I think they might just be incompatible or are being overridden?
@agritheory I couldn't get any of the faceted search components to affect the website or listview filters locally. Selecting any of the colours or changing the price filter keeps the current set of filters as is.
I ran the before_test
function in this PR to setup the fixtures.
Also, for some reason, I can't see the black color in the color picker component
@Alchez The tests are incomplete - I want to test the various update insert APIs - and would need to be run in order to see any of the data
Coverage Report
File Stmts Miss Cover Missing inventory_tools __init__.py 5 0 100% customize.py 24 24 0% 4–52 hooks.py 20 0 100% inventory_tools/inventory_tools __init__.py 0 0 100% boot.py 6 6 0% 4–11 faceted_search.py 130 103 21% 18–69, 85–119, 126–154, 157–160, 165–215, 237, 246–309 inventory_tools/inventory_tools/doctype __init__.py 0 0 100% inventory_tools/inventory_tools/doctype/inventory_tools_settings __init__.py 0 0 100% inventory_tools_settings.py 59 35 41% 16–17, 24–45, 60–65, 73–78, 85–91 test_inventory_tools_settings.py 3 0 100% inventory_tools/inventory_tools/doctype/purchase_invoice_subcontracting_detail __init__.py 0 0 100% purchase_invoice_subcontracting_detail.py 3 3 0% 5–9 inventory_tools/inventory_tools/doctype/purchase_order_subcontracting_detail __init__.py 0 0 100% purchase_order_subcontracting_detail.py 3 0 100% inventory_tools/inventory_tools/doctype/specification __init__.py 0 0 100% specification.py 206 120 42% 19–21, 25–37, 43, 57–58, 73–122, 130, 133, 139–143, 151–153, 158–162, 167–169, 174–175, 183–238, 243–268, 276, 292, 310, 330–341, 348–364 test_specification.py 3 0 100% inventory_tools/inventory_tools/doctype/specification_attribute __init__.py 0 0 100% specification_attribute.py 3 0 100% inventory_tools/inventory_tools/doctype/specification_value __init__.py 0 0 100% specification_value.py 3 0 100% test_specification_value.py 3 0 100% inventory_tools/inventory_tools/doctype/subcontracting_default __init__.py 0 0 100% subcontracting_default.py 3 3 0% 5–9 inventory_tools/inventory_tools/overrides job_card.py 17 2 88% 25, 32 purchase_order.py 148 100 32% 22, 81–84, 93–101, 112–131, 136–154, 159–222, 234–240, 253, 262–264, 269–274 sales_order.py 24 1 96% 46 stock_entry.py 78 19 76% 77–78, 81, 87, 96, 104, 162, 168, 172, 180–200 uom.py 63 10 84% 12, 25–27, 48–49, 88, 95, 114, 118 warehouse.py 43 16 63% 12, 17, 36–37, 40, 54–68 work_order.py 251 216 14% 26–29, 32–37, 40–42, 45–46, 49–50, 57–58, 65–93, 102–112, 125–158, 168–181, 191–232, 240–270, 276–289, 293–316, 320–357, 365–380, 385–471, 476–498, 512 workstation.py 53 22 58% 16–20, 27–40, 43–56, 91–93, 104 inventory_tools/inventory_tools/report __init__.py 0 0 100% inventory_tools/inventory_tools/report/manufacturing_capacity __init__.py 0 0 100% manufacturing_capacity.py 80 55 31% 11–12, 16, 84–115, 127–133, 214–296, 311–316, 324–338 inventory_tools/inventory_tools/report/material_demand __init__.py 0 0 100% material_demand.py 148 9 94% 18, 207–208, 227, 240, 248, 258, 274, 315 inventory_tools/inventory_tools/report/quotation_demand __init__.py 0 0 100% quotation_demand.py 63 4 94% 14, 48, 164, 184 inventory_tools/inventory_tools/report/specification __init__.py 0 0 100% specification.py 26 26 0% 4–78 inventory_tools/tests conftest.py 24 2 92% 29–30 test_alternative_workstation.py 14 0 100% test_faceted_search.py 40 18 55% 29–62 test_manufacturing_capacity.py 50 0 100% test_material_demand.py 117 8 93% 47, 92, 129, 136–138, 185, 233 test_overproduction.py 97 0 100% test_quotation_demand_report.py 71 1 99% 43 test_uom.py 29 0 100% test_warehouse_path.py 12 0 100% TOTAL 1922 803 58%
@Alchez Can you revisit the listview filter setting logic? Perhaps an API has changed. I recommend a clean install and then running bench execute 'inventory_tools.tests.setup.create_demo_specification_values'
to setup the appropriate data.
@agritheory I was able to get the filters to run, but it seems like a couple of tests are still failing (CI is reporting incorrectly for some reason). Also, we should get on a call to confirm the final workflows before a merge.
@Alchez /all-products
is now filtering correctly, though the sort order feature is still broken. I am having an issue in the listview where the filter values are not being set correctly: there's a leading comma, and when de/reselecting the "brand" attribute, It doesn't seems to respond reasonably. Perhaps this the debounce function?
I think we need to add a few compatibility features here: When deselecting (no filters are set), the filters are not cleared.
When you click "Clear Filters" it does not reset the Faceted Search selections. We can listen on the clear filters click, I think, but we'd need to add a reset API to attribute filters as well.
@agritheory I've fixed up the bugs you mentioned. Can you give this another test please?
@Alchez Can you branch and pick up changes for list view integration? That should be a PR to this branch. Main integration points should be inside
setFilterValues
inFacetSearch.vue
. Which we should abstract toapi.js
anyway.