2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-30 12:36:45 +00:00

715 Commits

Author SHA1 Message Date
Oliver
2c294d6ebe
Sales order improvements (#8445)
* Migration for SalesOrderAllocation

- Allow allocation against order with null shipment

* Enhaced query efficiency

* Further API cleanup

* Adjust serializer

* PUI updates

* Enable editing of allocation shipment

* Improve shipment filtering

* Add sub-table for salesorderlineitem

* Add helper method to SalesOrder to return pending SalesOrderAllocations

* Fix for CUI

* Update form for CUI

* Prevent SalesOrder completion with incomplete allocations

* Fixes for StockItem API

* Frontend refactoring

* Code cleanup

* Annotate shipment information to SalesOrder API endpoint

* Update frontend PUI

* Additional filtering for SalesOrderAllocation

* Bump API version

* Hide panel based on user permissions

* js linting

* Unit test fix

* Update playwright tests

* Revert diff

* Disable playwright test (temporary)

* View output from build table
2024-11-08 23:05:24 +11:00
Oliver
656950aea3
UI consolidation (#8450)
* UI consolidation

- Combine "suppliers" and "manufactuers" onto same tab

* Update StylishText.tsx

Remove unused import
2024-11-08 23:05:13 +11:00
Oliver
8f24119f29
Fix for stock item edit (#8451)
- Pass stockItem instance through to form
2024-11-08 13:22:46 +11:00
Oliver
c062d5e48d
Cleanup modals (#8432)
* Cleanup modals

* Fix for playwright test

* Playwright test updates
2024-11-06 21:53:37 +11:00
Oliver
245803b0d4
[PUI] Updates for AdminButton (#8434)
* [PUI] Updates for AdminButton

- Hide if django admin interface is disabled
- Use correct admin URL

* Adjust InfoView

* Add playwright tests
2024-11-06 09:27:43 +11:00
Oliver
93a8090e99
Fix for links in notification drawer (#8435) 2024-11-06 08:15:19 +11:00
Oliver
f470d30493
Improve optional chaining checks (#8431)
- Fixes bug where part_detail is potentially undefined
2024-11-06 06:04:13 +11:00
Oliver
7b640a4f88
Build hide incomplete (#8433)
* PUI panel tab updates

Hide build order tabs for cancelled or complete orders

* Fix a // TODO entry
2024-11-06 00:45:39 +11:00
Oliver
d6745137f6
Enable printing actions for PartTable (#8430) 2024-11-05 23:57:49 +11:00
github-actions[bot]
b4310bf91e
New Crowdin translations by GitHub Action (#8412)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-11-04 22:33:04 +11:00
Oliver
4df42cd776
PO receive fix (#8423)
* Add "active" filter to PurchaseOrderLineItem.part field

* Fix for allocation serial numbers to incoming items

* Validate serial numbers per line item
2024-11-04 14:10:17 +11:00
Oliver
c9079d9a0e
Ignore MissingRate errors (#8420)
* Improved permission checking for data importing

- Permission checks on the imported model type

* Improved validation for DateField

* Ignore MissingRate errors

- Do not send these to sentry
2024-11-03 18:23:34 +11:00
Oliver
abad36786f
Importer permissions (#8419)
* Improved permission checking for data importing

- Permission checks on the imported model type

* Improved validation for DateField

* Fix for unit test
2024-11-03 17:43:09 +11:00
Oliver
4308f0c2f9
Bug fix for plugin table (#8411)
- Allow "deactivation" of missing plugin
- Required before it can be deleted
2024-11-03 00:22:26 +11:00
github-actions[bot]
d11b7d3a7c
New Crowdin translations by GitHub Action (#8355)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-11-02 21:46:12 +11:00
Oliver
cc6a2f4548
Re-render panels when context changes (#8407) 2024-11-02 11:59:40 +11:00
Oliver
18e5b0df58
[PUI] Dashboard refactor (#8278)
* Refactor plugin components into <RemoteComponent />

* Clean up footer

* Allow BuildOrder list to be sorted by 'outstanding'

* Fix model name

* Update BuildOrderTable filter

* Add StockItemTable column

* Working towards new dashboard

* Cleanup unused imports

* Updates: Now rendering some custom widgets

* Define icons for model types

* Add icon

* Cleanup / refactor / delete

- Complete transfer of files into new structure

* Follow link for query count widgets

* Add some more widgets to the library

* Remove old dashboard link in header

* Remove feedback widget

* Bump API version

* Remove test widget

* Rename "Home" -> "Dashboard"

* Add some more widgets

* Pass 'editable' property through to widgets

* Cleanup

* Add drawer for selecting new widgets

* Allow different layouts per user on the same machine

* Fixes

* Add ability to *remove* widgets

* Add helpful button

* Add a keyboard shortcut

* Refactoring

* Add backend code for serving custom dashboard items

* Load dashboard items from plugins

* Tweak for dashboard item API query

- Refetch if user changes
- Tweak "loaded" value
- Prevent refetchOnMount

* Add message if no dashboard widgets are displayed

* Refactoring main navigation menu

- Group into sections
- Cleanup / consolidation
- General refactoring

* Remove playground

* Add backend field for storing dashboard layout

* Add extra type definitions for UseInstance

* Manual labels for builtin dashboard items

- Otherwise they will change with translation locale

* Shorten labels for more plugins

* Adjust DashboardMenu

* Reduce stored data

* Add widget filter by text

* Remove back-end settings

* Update playwright tests for dashboard

* Updated tests

* Refactor backend API for fetching plugin features

* Further fixes for back-end code

* More back-end fixes

* Refactor frontend:

- Custom panels
- Custom dashboard items

* Further backend fixes

* Yet more backend fixes

- Improve error handling

* Fix for custom plugin settings rendering

* Enable plugin panels for part index and stock index pages

* Cleanup

* Fix nav menu

* Update typing

* Helper func to return all plugin settings as a dict

* Update API version date

* Fix for UseInstancea

* typing fix

* Tweak layout callbacks

* Pass query parameters through to navigation functions

* Improve custom query display

* Add "news" widget

* Ensure links are prepended with base URL on receipt

* Update NewsWidget

* Bug fix

* Refactor template editor tests

* Refactor unit testing for test_ui_panels

* Unit test for dashboard item API endpoint

* Update comment

* Adjust playwright tests

* More playwright fixes

* Hide barcode scanning options if disabled

* Tweak dashboard widget

* Fix custom panel title

* Update documentation around UIMixin class

* Cleanup

* Additional docs

* Add icon def for 'error' ModelType

* Add error boundary to TemplateEditor component

* Fix so that it works with template editors and previews again

* Tweak error messages

* API unit test fixes

* Unit test fix

* More unit test fixes

* Playwright test tweaks

* Adjust error messages
2024-11-02 08:48:29 +11:00
Oliver
c4031dba7f
Purchase Order Destination (#8403)
* Add "destination" field to PurchaseOrder

* Add 'destination' field to API

* Add location to PurchaseOrderDetail page

* Display "destination" on PurchaseOrderDetail page

* Pre-select location based on selected "destination"

* Fix order of reception priority

* Auto-expand the per-line destination field

* Add "Purchase Order" detail to StockItemDetail page

* Bug fix in PurchaseOrderForms

* Split playwright tests

* Docs updates

* Bump API version

* Unit test fixes

* Fix more tests

* Backport to CUI

* Use PurchaseOrder destination when scanning items
2024-11-01 11:10:25 +11:00
Oliver
871cd905f1
[PUI] Table refactor (#8395)
* Refactor table header items out into new file

* Improve BomItem API query

* Allow table header to be removed entirely

* revert BomTable

* Re-add "box" component

* Reimplement partlocked attribute

* Fix for PartDetail

- Revert to proper panels

* Updated playwright tests

* Additional tests
2024-11-01 07:23:26 +11:00
Oliver
feefa60a8f
Fix image size restriction in PageDetail header (#8398) 2024-10-31 13:13:50 +11:00
Oliver
8822194b0d
[PUI] stock table (#8396)
* [PUI] Add extra fields to StockItemTable

* Add SKU and MPN to StockItem export data

* Enable sorting

* Bump API version
2024-10-31 12:34:28 +11:00
Oliver
8a7a2da07b
[PUI] notifications fix (#8392)
* Include actual model name in notification repot

* Include model_id in API

* Refactoring for NotificationDrawer

- Add error boundary
- Separate rendering func for individual entry
- Allow router navigation
- Better link introspection
- Add tooltip for notification description

* Add URL support for errors

* Allow navigation to an individual error in the admin center

* Updates

* Add rendering method for 'error' model type
2024-10-29 15:00:34 +11:00
Oliver
40f456fbc9
[PUI] Build allocation sub tables (#8380)
* Add helpers methods for table row expansion

* Render a simplified "line item sub table"

- Akin to CUI implementation
- But like, better...

* Edit / delete individual stock allocations

* Improvements for BuildLineTable and BuildOutputTable

* Improvements for table fields

* Refactoring

* Refactor BuildLineTable

- Calculate and cache filtered allocation values

* Code cleanup

* Further fixes and features

* Revert new serializer field

- Turns out not to be needed

* Add playwright tests

* Bug fix for CUI tables

- Ensure allocations are correctly filtered by output ID

* Adjust CUI table
2024-10-29 11:36:32 +11:00
Oliver
89946aed15
[PUI] Search tweak (#8381)
* Cleanup buttons and add Tooltip

* Clearer separation

* Link cleanup
2024-10-29 01:31:19 +11:00
Oliver
234ee2b40f
Add "received" filter to PurchaseOrderLineTable (#8377) 2024-10-28 17:39:37 +11:00
Oliver
6953640161
[Bug] Fix issue with build order lines table (#8376)
* Revert change to BuildItem API

- Requires "allocations" for build output table
- Probably can refactor this later

* Bug fix for BuildOutputTable in PUI

- Correct calculation for "fully allocated"

* Adjust annotations for serializer

* Bump API version
2024-10-28 17:06:09 +11:00
Oliver
9fd882f95e
[PUI] Task table enhancements (#8369)
* Refresh task counts when updating tables

* Handle case where error is null
2024-10-26 12:40:24 +11:00
github-actions[bot]
6bf9a97f52
New Crowdin translations by GitHub Action (#8348)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-10-24 21:15:17 +11:00
Oliver
328472701d
[PUI] Machines table refactor (#8352)
* Reorganize MachineManagementPanel

- Use Accordion
- More consistent with PluginManagementPanel

* Code cleanup

* Refactor machine drawer display

* Refactor MachineTypeDetailDrawer
2024-10-24 15:24:52 +11:00
Oliver
556ff4f15b
Settings validation enhancements (#8351)
* Enforce lower case for model name checks

* Enhance settings validation

- Add support for "float" settings type
- Improve validation code and error handling
2024-10-24 13:12:39 +11:00
Oliver
ba3bac10a7
PUI: Show "Return from customer" option (#8345)
* PUI: Show "Return from customer" option

* Extend playwright tests

* Additional unit tests
2024-10-23 23:24:21 +11:00
github-actions[bot]
aa1e23d455
New Crowdin translations by GitHub Action (#8266)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-10-23 16:10:59 +11:00
simonkuehling
5ed0af20c8
use LABEL_DEFAULT_PRINTER user setting to pre-select plugin in label printing forms (#8330) 2024-10-23 15:18:02 +11:00
Oliver
a6bba144e7
Part pricing cleanup (#8340)
* Part pricing cleanup

- Improve / tweak rendering for PurchaseHistoryPanel

* Adjust playwright tests
2024-10-23 14:33:42 +11:00
Oliver
28146bbbf0
Fix display of purchase order lines (#8339) 2024-10-23 14:33:31 +11:00
Oliver
cbe547b873
Add "View Part" action in BuildLineTable (#8335) 2024-10-23 07:16:38 +11:00
Oliver
ca31bb0322
[API] Sales order filters (#8331)
* Fix 'allocated' queryset annotation for SalesOrderLineItemSerializer

* Add 'allocated' filter for SalesOrderLineItemList

* Allow ordering by 'allocated' and 'shipped' values

* Updated unit testing

* Bump API version

* Update playwright tests
2024-10-23 07:16:26 +11:00
Oliver
2adb41f448
Hide "allocations" tab for items which are not in stock (#8334) 2024-10-23 07:16:14 +11:00
Oliver
ddea9fa4b9
[PUI] Platform fixes (#8324)
* Add "IPN" column to build order allocated stock table

* Allow sorting and searching by IPN

* Handle allocations where allocated but required == 0

* Add "no info available" message to part scheduling

* Adjust PartSchedulingTable

* Icon fix

* Add "latest serial number" information to PartDetail page

* Cleanup code for serial-number placeholder in forms

* Logic fix for displaying non-unity pack quantity

* Fix description field on SupplierPart page

* Fix duplicate table column
2024-10-22 12:17:24 +11:00
Oliver
90f726e325
[PUI] Tweaks for part purchase order table (#8319)
* Improve API query

* Table ordering fixes for PartPurchaseOrdersTable
2024-10-20 15:01:05 +11:00
Oliver
29726d8d0d
Refactoring / Enhancements (#8307)
* Create simply PartSalesPanel component

* Updates

* Add API endpoint for SalesHistory

- And serializers
- Basic, needs lots of work still

* Fix for PartDetail page

* SalesOrder page updates

* More page updates

* Update API endpoint

* Backend improvements

* add API endpoint

* Front-end rendering

* Make frontend generic

* Fix for CompanyTable

* Make back-end API more generic

* More API improvements

* Implement history for purchasing

* API / UI fixes

* Remove debug statements

* Support file download

* Add endpoint for build order history

* Implement UI for build order history

* Revert backend

* Revert frontend

* Remove unsed imports

* Cleanup permission checks

* Bump API version

* Improve token management code

- Do not request token if other cookies are unavailable
- Do not fetch user data if token is unavailable
- Prevents connection error logs

* Fix for CompanyTable - onRowClick
2024-10-20 12:48:29 +11:00
Oliver
5f905aab9d
Fix breadcrumb for <BuildOrderDetail /> (#8305)
* Fix breadcrumb for <BuildOrderDetail />

* Add delay for playwright tests
2024-10-18 15:24:20 +11:00
Oliver
59fa3bb4ff
Order table variants (#8295)
* BuildOrderTable: Show variants

- Allow filtering of build orders by part variant

* Add "include_variants" filter for SalesOrder table

- A bit tricker!

* Add "include_variants" filter to PartPurchaseOrdersTable

* Enable filtering ReturnOrder by "part" attribute

* Add similiar functionality for SalesOrderAllocation

* Add similar filter for BuildAllocation table

* Add migration file
2024-10-16 20:19:11 +11:00
Oliver
0c9e986796
Table date filters (#8299)
* Add date filtering for tables

* Update filters for build order table

* Update other tables

* Typing fix

* Fix filter type
2024-10-16 20:18:59 +11:00
Oliver
7c19e51d80
Simplify display of "locked" part status (#8297)
* Simplify display of "locked" part status

- REmove big badge
- Show subtle icon

* Update playwright test
2024-10-16 19:43:10 +11:00
Alexis Vézina
d59994ea75
Fix GH Link in links.tsx (#8292) 2024-10-16 07:27:06 +11:00
Oliver
e808fad98d
[PUI] Add "index" page for build orders (#8287)
* Add "index" page for build orders

- Make consistent with other pages
- Allow plugin panels here
- Prepare for future development

* Rearrange URLs for "manufacturing"

- Provide same format as other order types
- Allow for other sub-pages under "manufacturing" in the future

* Fix breadcrumbs

* Adjust playwright tests
2024-10-15 23:57:30 +11:00
Oliver
eeab8d30fb
[PUI] Table query params (#8279)
* Pass more information through in redirect after login

- Include query parameters in redirect

* InvenTreeTable: Update filters based on URL query parameters

* Add button to remove custom URL query filters
2024-10-14 13:10:53 +11:00
Oliver
7d3eb433d6
Remove <Playground> from PUI frontend (#8276)
* Remove <Playground> from PUI frontend

- Components are now mature enough with sufficient examples in the codebase

* Remove dead code
2024-10-13 20:58:53 +11:00
Oliver
8aade768c3
[PUI] subscribe (#8272)
* Add "starred" icon to part category table

* Edit "starred" status for PartCategory in PUI

* Edit "starred" state of part in PUI

* Playground fix
2024-10-12 11:55:23 +11:00