2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-04-28 13:36:50 +00:00

71 Commits

Author SHA1 Message Date
Oliver
aa274b2e45
Stock location scan (#169)
* Add action for scanning a stock location into another location

* Adds barcode scan handler for new functionality

* Handle scanning of stock location

* Cleanup

* Refactor existing barcode scanning functions

- Will require extensive testing and validation

* Add entry to release notes

* Delete dead code

* Improved ordering based on stock quantity

* Bug fix for 'adjustStock' function

* Improve error responses for barcode scanning

* Improve error responses for barcode scanning

* Remove old debug statements

* Add some extra explanatory texts

* Icon change

* Fixes for unit tests

* Adds extra functionality for user profile manager

* Refactor barcode code - do not rely on BuildContext

* Adds initial unit testing for barcode scanning

- Work on mocking barcode data
- Add hooks for testing snackBar and audio files

* Linting fixes

* More barcode unit tests

* Cleanup unit tests for barcode

* Remove unused import

* Handle HTTPException in API

* Improvements for API unit testing

* Unit testing for scanning item into location

* Add unit test for scanning in items from a location context

* Unit test for scanning location into parent location

* Improve feedback for barcode scanning events
2022-07-18 22:10:00 +10:00
Oliver Walters
dbc024491c Pass URL through to the showServeError method
- Can decide, based on the URL, if we want to show an error
2022-06-03 20:23:59 +10:00
Oliver Walters
f13b04d029 Refactor audio file player
- Do not play if there is no context available (e.g. unit testing)
2022-05-22 08:23:20 +10:00
Oliver Walters
6d764e32a0 Improve barcode error handling 2022-05-10 23:37:21 +10:00
Oliver Walters
e2ed80f2d0 Add barcode scan context 2022-05-10 18:26:55 +10:00
Oliver Walters
2a6df373c5 Refactor imports 2022-03-29 19:54:19 +11:00
Oliver Walters
c78dd7cfa5 Update packages
- Trying to find source of null check bug
2022-03-29 19:43:38 +11:00
Oliver
5d0ffa059d Refactor stock adjustment functions
- Provide compatibility with "modern" and "legacy" API versions
2022-01-08 23:05:45 +11:00
Oliver
b9ee0157d2 Allow toggle of camera and flash when scanning barcodes 2022-01-05 12:10:44 +11:00
Oliver
d296d589d9 Update barcode / qrcode icons 2022-01-05 12:08:47 +11:00
Oliver
4f8794e652 Refactor barcode scann function
- Provide a custom callback to be executed when the barcode is scanned
2021-10-03 12:04:01 +11:00
Oliver
f75aa4ca0e Update form field with scanned barcode 2021-10-03 11:41:16 +11:00
Oliver
6288088a65 Adds "barcode" field handler for API forms 2021-10-03 11:36:41 +11:00
Oliver
77bac9af36 Yet more linting 2021-09-28 20:35:19 +10:00
Oliver
ad0cc36540 More linting work 2021-09-28 20:24:55 +10:00
Oliver
c1152ee286 Fixes for type casting 2021-09-28 17:53:14 +10:00
Oliver
0d6d0f754a Fix barcode appBar text 2021-08-10 21:01:03 +10:00
Oliver Walters
2d005ba86b Adds app bar with back button to barcode scanning widget 2021-08-09 23:59:53 +10:00
Oliver
8f02092731 Add extra error reporting information in sentry errors 2021-08-09 08:22:36 +10:00
Oliver
ca35f44dc8 Error fixes / catches
- Barcode scan returns invalid response
- model.reload() returns invalid response
- model.create() returns invalid response
- model.get() returns invalid response
2021-08-05 08:37:11 +10:00
Oliver
07017c4745 Barcode handler code cleanup 2021-07-30 11:09:01 +10:00
Oliver
b423d43db8 Cleanup 2021-07-29 17:23:07 +10:00
Oliver
6d1bed29c0 Pass BuildContext variable to barcode views, rather than storing it locally 2021-07-29 01:26:35 +10:00
Oliver
058cde1d3d Adjust calls in barcode.dart to match example 2021-07-28 22:36:39 +10:00
Oliver
2bdadc2140 Cleanup 2021-07-26 17:28:16 +10:00
Oliver
6ed0acce27 Refactor API requests
- Return a non-nullable APIRequest object
- Contains status-code, url, method, etc
- Pass all API requests through a common function which does error handling
2021-07-16 16:39:33 +10:00
Oliver
e637e2a9bc make package name lowercase 2021-07-16 15:07:28 +10:00
Oliver
83e29777c2 More cleanup 2021-07-15 23:28:55 +10:00
Oliver
d2ce3fadf1 Code cleanup 2021-07-15 11:27:19 +10:00
Oliver
dce3b6c14a Context fixes 2021-07-10 00:19:11 +10:00
Oliver
d3eec6a79e Many many changes for null-safety support 2021-07-09 23:56:38 +10:00
Oliver
2fd7409804 Throw assertion errors which will be sent to sentry 2021-06-29 22:27:09 +10:00
Oliver
65cabc2fa9 Update package versions and refactor accordingly 2021-06-18 21:28:07 +10:00
Oliver Walters
2a3e83509f Refactor of translation lookup! 2021-05-19 23:33:28 +10:00
Oliver Walters
96ba41474f Fix references for showServerError 2021-05-19 22:35:29 +10:00
Oliver Walters
b8c535560d API post request now uses HttpClient 2021-04-19 21:56:20 +10:00
Oliver Walters
989e0e81b3 Add settings to control sounds 2021-03-03 21:39:46 +11:00
Oliver Walters
b293806fe3 Adds audio feedback 2021-03-02 22:22:16 +11:00
Oliver Walters
feaafe068d Fix barcode widget to prevent flutter widget error 2021-02-25 17:38:41 +11:00
Oliver Walters
90df4c6135 Update qr_code_scanner to the latest version 2021-02-25 17:23:19 +11:00
Oliver Walters
24b7cfaede Scan items into location from location context 2021-02-17 08:57:08 +11:00
Oliver Walters
b7e9c06dfa Snack bars for barcode actions 2021-02-17 08:41:17 +11:00
Oliver Walters
00943b7536 API error messages now use snackIcon
- Press "details" for further error information
- Is nice
2021-02-17 08:00:41 +11:00
Oliver Walters
8ae4d2b584 snack bar now uses OneContext() 2021-02-16 23:24:23 +11:00
Oliver Walters
47e4e13878 Add overlay text to barcode scanner view 2021-02-15 21:14:24 +11:00
Oliver Walters
33bb6148de Cleanup for API error handling
Ref: https://stackoverflow.com/questions/54617432/looking-up-a-deactivated-widgets-ancestor-is-unsafe
2021-02-09 21:38:50 +11:00
Oliver Walters
90072904a0 String translations 2021-02-09 20:31:55 +11:00
Oliver Walters
e77b9539f9 Disable some more natty dialogs 2021-02-04 23:56:06 +11:00
Oliver Walters
b69762ff15 API refactoring:
- Error if the server version is *older* than the min required version
- Display dialog boxes for different server errors
2021-02-02 20:37:54 +11:00
Oliver Walters
3433d57f83 Refactor display for StockLocation 2021-01-29 00:52:15 +11:00