InvenTree/InvenTree/company
Oliver 74bec86675
Part page loading improvements (#3185)
* Lazy load the pricing bom table when the "pricing" tab is selected

* Update django-debug-toolbar configuration

* Major refactoring for the 'can_build' function

- Use a single annotated query to the db, rather than a for loop (which is what a caveman would use)
- Query performance is greatly improved
- Also refactors existing variant-part-stock subquery code, to make it re-usable

* Use minified JS and CSS where possible

* Render a 'preview' version of each part image

- Saves load time when the image is quite large
- Adds a data migration to render out the new variation

* Adds 'preview' version of company images

* Defer loading of javascript files

Note: some cannot be deferred - jquery in particular

* Crucial bugfix for user roles context

- Previously was *not* being calculated correctly
- A non-superuser role would most likely display pages incorrectly

* Prevent loading of "about" on every page

- Load dynamically when requested
- Takes ~400ms!
- Cuts out a lot of fat

* Match displayed image size to preview image size

* Utilize caching framework for accessing user "role" information

- Reduces number of DB queries required by rendering framework

* Remove redundant query elements

* Remove 'stock' field from PartBrief serializer

- A calculated field on a serializer is a *bad idea* when that calculation requires a DB hit

* Query improvements for StockItem serializer

- Remove calculated fields
- Fix annotations

* Bug fixes

* Remove JS load test

- Loading of JS files is now deferred, so the unit test does not work as it used to

* Fix broken template for "maintenance" page

* Remove thumbnail generation migrations

- Already performed manually as part of ''invoke migrate"
- Running as a migration causes unit test problems
- Not sensible to run this as a data-migration anyway

* tweak for build table
2022-06-17 21:26:28 +10:00
..
fixtures fix endline 2022-05-20 13:35:07 +02:00
migrations SupplierPart availability (#3148) 2022-06-08 21:49:07 +10:00
templates/company Part page loading improvements (#3185) 2022-06-17 21:26:28 +10:00
__init__.py Docstring checks in QC checks (#3089) 2022-06-02 01:37:39 +10:00
admin.py Merge pull request from GHSA-7rq4-qcpw-74gq 2022-06-15 18:32:35 +10:00
api.py Add bleach (#41) (#3204) 2022-06-16 10:01:53 +10:00
apps.py Docstring checks in QC checks (#3089) 2022-06-02 01:37:39 +10:00
forms.py Docstring checks in QC checks (#3089) 2022-06-02 01:37:39 +10:00
models.py Part page loading improvements (#3185) 2022-06-17 21:26:28 +10:00
serializers.py SupplierPart availability (#3148) 2022-06-08 21:49:07 +10:00
test_api.py SupplierPart availability (#3148) 2022-06-08 21:49:07 +10:00
test_migrations.py Docstring checks in QC checks (#3089) 2022-06-02 01:37:39 +10:00
test_views.py Docstring checks in QC checks (#3089) 2022-06-02 01:37:39 +10:00
tests.py Docstring checks in QC checks (#3089) 2022-06-02 01:37:39 +10:00
urls.py Docstring checks in QC checks (#3089) 2022-06-02 01:37:39 +10:00
views.py Add more checks to pre-commit (#3132) 2022-06-06 08:56:52 +10:00