2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-04-29 14:24:25 +00:00
Commit Graph

15 Commits

Author SHA1 Message Date
Oliver 4c9d4add2c Table custom buttons (#5075)
* Add generic implementation for barcode actions

- Commonize code against tables
- Cleaner UI
- Better code
- Will make future react refactor easier

* Add permissions.js

- Separate .js file for dynamically checking permissions

* Update stock table to use client-side actions

* API endpoint for bulk category adjustment

* Bug fix for purchase_order.js

- Prevent some really strange API calls

* Refactor actions for part table

- Now done dynamically

* Refactor actions for the attachment tables

* Refactor actions for build output table

* Increment API version

* Cleanup janky button

* Refactor supplier part table

* Refactor manufacturer part table

* Remove linkButtonsToSelection

- no longer needed
- Cleanup, yay!

* Cleanup purchase order line table

* Refactor BOM table buttons

* JS linting

* Further cleanup

* Template cleanup

- remove extra div elements

* js linting

* js fix
2023-06-20 07:45:35 +10:00
Oliver 12fcccb5a6 Fix API endpoint permission for the "AttachmentMixin" class (#3218)
* Fix API endpoint permission for the "AttachmentMixin" class

- Any authenticated user could perform CREATE and UPDATE operations on attachments
- Could be performed via the browsable DRF API
- Could also be performed via the front-end (with some advaned jiggering of OPTIONS code)

* Show or hide buttons depending on the permissions of the user

* Add shortcut for table permission check
2022-06-18 14:48:09 +10:00
Oliver 403655e3d2 Adding bulk deletion endpoint for notifications (#3154)
* Catch DoesNotExist error

* Move notificationtable function to js file

* Fix for custom metadata class

- Previously only worked if a POST or PUT action was available on the endpoint
- So, a ListAPIView endpoint would not actually work!
- Adding in a BulkDelete mixin to a ListAPIView caused failure

* Add unit test to ensure new OPTIONS metadata updates are checked

* Expand functionality of the existing BulkDelete mixin

- Allow deletion by custom filters
- Allow each implementing class to implement custom filters
- Adds more unit testing for BulkDelete mixin class

* Add bulk delete operation for Notification API

- Ensure users can only delete their *own* notifications

* Improve notification tables / buttons / etc

* Adds unit testing for bulk delete of notifications

- Fixed API permissions for notifications list endpoint

* Update BulkDelete operations for the StockItemTestResult table

* Use filters parameter in attachments table to ensure that only correct attachments are deleted

* JS linting

* Fixes for unit tests
2022-06-08 07:45:30 +10:00
Oliver 66a6915213 Adds 'multi delete' for attachment tables (#3111)
* Adds 'multi delete' for attachment tables

- Should roll out seamlessly to any attachment table

* JS linting
2022-06-01 17:23:36 +10:00
Matthias Mair 74726f0fda fix endline 2022-05-20 13:35:07 +02:00
Oliver 103f98b665 Adds "reload" button to attachment table(s) 2021-12-21 16:51:26 +11:00
Oliver 360f0406b5 CSS updates
- Add template for filter lists
- Filter lists now layout horizontally
- Change flex-row to flex-wrap
2021-11-01 08:38:24 +11:00
Oliver 3849ea8057 Rearranging buttons 2021-10-29 23:20:09 +11:00
Oliver 9b4db43232 Refactoring "attachment" tables to use the API
- Part attachments
- StockItem attachments
- PurchaseOrder attachments
- SalesOrder attachments
- BuildOrder attachments
2021-06-30 17:40:44 +10:00
eeintech 2c38be2d13 Added global setting and updated stock item templates 2020-12-01 15:54:05 -05:00
Oliver Walters d0b7d91ca4 Update multiple templates with fontawesome icons 2020-10-28 18:30:38 +11:00
eeintech 095cfe9845 Updated Stock permission views and templates 2020-10-06 08:55:40 -05:00
Oliver Walters 327682b719 Add forms / views / etc to create / edit / delete test results manually 2020-05-17 00:26:10 +10:00
Oliver Walters db01f3646a Enable drag-and-drop attachment upload for Part 2020-05-13 11:13:26 +10:00
Oliver Walters f5b97da5d2 Refactor "attachment" table into template 2020-05-12 22:05:38 +10:00