2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-04-28 05:26:47 +00:00

174 Commits

Author SHA1 Message Date
Oliver
a889c4adbe
Filter fix (#473)
* Add check for "null" top level locations and categories

* Fix API

- Top level location and category broken after API 174
- Ref: https://github.com/inventree/InvenTree/pull/6536
2024-02-28 16:23:46 +11:00
Oliver
1d41d229ca
Error report updates (#470)
* Prevent error reporting for certain status codes

- These error codes indicate that there is something wrong with the server setup
- Outside scope

* Bump version
2024-01-16 00:31:10 +11:00
Oliver
d152475de4
Catch errors (#469)
* Catch error comparing dropdown items

* Update version number and release notes

* Data conversion

* Catch error when loading image from network

* Suppress error reporting for statusCode -1
2024-01-10 23:24:40 +11:00
Oliver
571b491846
Sales order barcode (#466)
* Add barcode handler for allocating stock to sales order

* Refactor sales order allocation fields

* Improve barcode handling

* Handle barcode scan from sales order line detail view

* Remove debug statements
2023-12-13 23:49:55 +11:00
Oliver
bf3df770c7
Po barcode scan (#458)
* Refactor existing barcode scan endpoint

- Break out into new file just for purchase orders

* Handle scanning of salesorder

* Add new handler for adding items to PO via barcode

* Allocate with barcode

* Add new string
2023-11-20 23:48:42 +11:00
Oliver
bdd5470e68
Sales order support (#438)
* Add new models for SalesOrder

- Create generic Order and OrderLine models with common functionality

* Refactor

- Move some widgets around
- Cleanup directory structure

* Add link to home screen and nav drawer

* Add SalesOrder list widget

* Linting fixes

* Fix string

* Refactor PurchaseOrderDetailWidget

* Tweaks to existing code

* linting

* Fixes for drawer widget

* Add "detail" page for SalesOrder

* Add more tiles to SalesOrder detail

* Allow editing of salesorder

* add list filters for sales orders

* Display list of line items

* Customer updates

- Display customer icon on home screen
- Fetch sales orders for customer detail page

* Cleanup company detail view

* Create new sales order from list

* Stricter typing for formFields method

* Create new PurchaseOrder and SalesOrder from company deatil

* Status code updates

- Add function for name comparison
- Remove hard-coded values

* Update view permission checks for home widget

* Add ability to manually add SalesOrderLineItem

* Add nice progress bar widgets

* Display detail view for sales order line item

* edit SalesOrderLineItem

* Fix unused import

* Hide "shipped items" tab

- Will be added in a future update
2023-11-12 23:13:22 +11:00
Oliver
76b6191a67
Token auth (#434)
* Embed device platform information into token request

* Remove username and password from userProfile

* Display icon to show if profile has associated user token

* Remove username / password from login settings screen

* Refactor login procedure around token auth

* Refactoring

* Add profile login screen

- Username / password values are not stored
- Just to fetch api token

* Login with basic auth

* Pass profile to API when connecting

* Remove _BASE_URL accessor

- Fixes URL caching bug

* Add more context to login screen

* Add helper functions for unit tests

- Change default port to 8000 (makes testing easier with local inventree instance)

* api.dart handles basic auth now

* fix api_test.dart

* Further test improvements

* linting fixes

* Provide feedback when login fails

* More linting

* Record user details on login, and display in "about" widget

* Fix string lookup

* Add extra debug

* Fix auth values

* Fix user profile test
2023-10-23 01:29:16 +11:00
Bobbe
67fd6a564a
Add POReceiveBarcodeHandler to support barcode/po-receive/ endpoint (#421)
* Add POReceiveBarcodeHandler to support barcode/po-receive/ endpoint

* Remove german translation

* Add api version checks

* Add getOverlayText method to barcode handler

* Bump required API version to 139

* Update barcode.dart

The "quantity" field is not an integer, and can cause the app to crash if not handled correctly

---------

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2023-10-19 23:28:32 +11:00
Oliver
6520873384
Translation fix (#424)
* Fix locale header

- Moving to new framework meant that Intl.getCurrentLocale was no longer working

* Update release notes

* Fix typo in pubspec.yaml

* Clear cached values when locale is changed

* Add extra context check
2023-09-20 08:37:48 +10:00
Oliver
dd12769a51
Stock transfer extra (#420)
* Add API version check

* Support "packaging" and "status" fields when performing a stock-transfer action

* Update release notes
2023-09-09 00:32:57 +10:00
Oliver
8200140976
Label fix (#411)
* Cleanup label printing options

- Improve calls to setState()
- Should fix potential race conditions

* Use name if description not available

* Code simplification

* Fetch plugins even if the server reports "plugins enabled"

- Builtin plugins are still a thing!

* Use name *and* description to display label
2023-08-12 20:41:11 +10:00
Oliver
e9eb84eace
Stock display (#379)
* Display stock quantity more prominently

* Cleanup search widget

* Update for stock_detail widget

* More tweaks

* Change bottom bar icon

* Display boolean parameters appropriately

* Adds ability to edit part parameters

* Bump icon size a bit

* Improvements to filter options

- Allow filtering by "option" type
- To start with, filter stock by status code

* Remove debug message

* Remove getTriState method

- No longer needed
- Remove associated unit tests

* Adjust filters based on server API version

* Muted colors
2023-06-24 11:34:42 +10:00
Oliver
21ace1ae02
Package updates (#365)
* Update dart version

* Update flutter version in workflow

* Update packages

* Updates to android workflow

* Specify dart verrsion in CI

* Run flutter upgrade

* Helps to check which workflow is actually running I guess

* Disable linting check

* linting fixes

* linting

* Bug fix for paginator
2023-06-12 22:52:07 +10:00
Oliver
b7e806efee
PO Line Item Improvements (#340)
* Refactor thumbnail image

* Add paginated list of purchase order line items

* Refactor getBody() function

- No longer "have" to specify
- Can use getTiles for a simpler interface

* Add detail widget for polineitem

* add pricing info

* Receive line items via action button

* tweak color

* update release notes

* linting fixes
2023-04-21 23:15:00 +10:00
Oliver
2c5ceeabdb
Handle OSError when attempting connection (#339) 2023-04-21 21:24:14 +10:00
Oliver
e23a8b4d5e
Project code support (#336)
* Determine if project codes are supported

* Add helpers for boolean functions

* Adds helper methods for generic "model" class

- Will allow us to do some good refactoring

* Refactor the refactor

* Add debug support and getMap function

* Major refactoring for model data accessors

* Handle null values

* Add sentry reporting if key is used incorrectly

* Fix typo

* Refactor createFromJson function

* Add model for ProjectCode

* Display and edit project code for purchase orders
2023-04-21 21:12:22 +10:00
Oliver
b9ffabd561
Make notes widget "generic" (#327)
* Make notes widget "generic"

- No longer tied to the "part" model
- Will allow us to use it elsewhere

* Update release notes

* Add helper methods for checking model permissions

* Refactoring of permissions checks

* Add notes to the "purchase order" widget

* Fix typos

* remove bom tab from part view

* linting fixes
2023-04-19 21:57:28 +10:00
Oliver
946abb60a0
Update notifications periodically (#311)
- Call periodically from API class
2023-04-11 21:25:39 +10:00
Oliver
26b86a2194
Update status codes (#307)
* Extra error info when connecting to server

* Adds accessors for various types of status codes

* Cleanup / refactor stock status codes

- No longer need to duplicate these on the app

* improvements to purchase order list

- Add option to show closed orders
- Render order status

* Add purchase order status to order detail widget

* Update release notes

* Cleanup for imports

* linting fixes
2023-04-10 23:12:30 +10:00
Oliver
020cc4497c
PO Contact (#305)
* Bug fix in API forms

- Allow form fields to specify custom filters at runtime

* Add "contact" model to purchase order edit form

* Add action to create new purchase order from list widget

* widget updates for purchase order
2023-04-10 16:59:45 +10:00
Oliver
f7d3315c99
Support barcode scan for purchase order (#298)
* Add functions for determining API support levels

* Handle scanning of purchase orders
2023-04-05 22:43:29 +10:00
Oliver
d7f2c3939b
Consolidated search (#289)
* Update search widget to support consolidated search API endpoint

* Finer control over global search

* Update release notes

* remove unused variable
2023-03-24 21:09:38 +11:00
Oliver
9485d858eb
Add support for company attachments (#261)
* Add support for company attachments

- Add API version check
- Add new class
- Add link to company detail page
- Assorted refactoring

* linting fixes
2023-02-16 22:50:32 +11:00
Gustaf Järgren
6d4973deb8
Updated dependencies (#255)
* Bump android compile and target version, also flutter dependencies and resolve issues

* Remove deprecated splashscreen and added support for new Android 12 version.

* Updated workflow action versions and flutter sdk

* Resolved linting issues

* Resolved test binding issues
2023-02-11 00:24:06 +11:00
Oliver
e9d9cf5322
Handle case where streaming respone has invalid length (#250) 2023-01-27 23:23:11 +11:00
Oliver
d2b74e7684
Stock barcode fix (#232)
* API: Provide more info in error messages

* Fix support for legacy stock item custom barcodes

* Refresh display after assigning barcode

* Update release notes

* Fix for scanning unkown barcode

- Modern API returns slightly different data

* Fix for scanning unkown barcode

- Modern API returns slightly different data

* Update release notes
2022-12-11 23:41:21 +11:00
Oliver
730521fd00
New barcode actions (#218)
* Bump release notes

* Adds method for linking custom barcodes

* Custom getter method for determining if an item has barcode data

* Add method to check if the API supports "modern" barcodes

* Refactor custom barcode implementation for StockItem

- Needs testing

* Unit testing for linking and unlinking barcodes

* Fixes

* Refactor code for "custom barcode action" tile

* Add custom barcode action to StockLocation

* Add extra debug to debug the debugging

* Unit test fix

* Change scope I guess?

* remove handler test
2022-12-05 23:39:40 +11:00
Oliver
c2574e9fa5
Part parameters (#224)
* Adds class representing the PartParameter model

* Adds API method for determining support for PartParmaters

* Display part parameter count in part detail widget

* Adds user setting for controlling if part parameters are displayed

* Fix URL for model

* Widget for displaying part parameters

* linting
2022-12-04 20:51:48 +11:00
Oliver
d122a352a6
Structural categories (#220)
* Add support for editing "structural" tree field

- Requires API v83 or newer

* Update release notes
2022-11-28 20:18:57 +11:00
Oliver
6d796a2e32
Barcode updates (#211)
* Adds API function for unlinking a barcode

* Show barcode unlink result

* Update release notes and version number
2022-09-15 14:22:40 +10:00
Oliver
e78bb78bfd
Check status code before throwing JSON error (#198)
* Check status code before throwing JSON error

* Update release notes
2022-08-01 13:18:26 +10:00
Oliver
dacbf880da
Improve error handling and reporting (#190)
* Prevent duplicate reporting of errors to sentry

* Prevent error message upload on some server error codes

* Filter out some common errors we are not interested in
2022-07-26 15:57:16 +10:00
Oliver
19ad3153e4
Remove and fix some TODO entries (#188) 2022-07-20 14:18:07 +10:00
Oliver
01dd046dd1
Display overlay screen for blocking operations (#186)
* Catch state error in homepage widget

* Add flutter_overlay_loader lib

- Displays an overlay screen to indicate blocking operation

* Wrap blocking widget transitions in a loading overlay

- Prevents user from doing other things while loading
- Shows the user that something is happening

* Linting fixes

* Show overlay when uploading attachment file

* Show overlay when downloading file also

* Show overlay when loading or submitting API forms

- Major improvements to usability "feel"

* UI improvements for stock item test results widget

* Fix API_FORM bug

- onSuccess function was not being called
2022-07-20 09:05:21 +10:00
Oliver
e03a8561b9
Main screen loading indicator (#183)
* Bug fix for login screen

- Prevent setState() from being called if the widget is no longer loaded

* Add callback function when API status changes

- Home screen uses this function to update connection status indicator

* Linting fixes
2022-07-19 23:10:06 +10:00
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
21e7a976ee Improve checks for API user permissions 2022-06-03 20:42:25 +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
850c2b8c12 Remove support for legacy stock transfer API code
- Relies on modern API now
- Checks for error messages against hidden fields in stock items
2022-05-22 15:59:19 +10:00
Oliver Walters
b98f044204 More checks 2022-05-22 09:56:22 +10:00
Oliver Walters
4e14bd077c Improved debug messages 2022-05-22 09:17:32 +10:00
Oliver Walters
625d29fcf1 Adds debug message helper 2022-05-22 09:13:49 +10:00
Oliver Walters
e424a3cf7b Start of unit tests for the actual API code 2022-05-22 00:04:13 +10:00
Oliver Walters
b18dd92079 Fixes after preferences file refactor 2022-05-21 19:44:47 +10:00
Oliver Walters
c90a849a5a Add extra context information to sentry error reports
- Should help to track down bugs where stacktrace is missing information
- Adds some more error catching, too
2022-05-12 22:46:12 +10:00
Oliver Walters
6d764e32a0 Improve barcode error handling 2022-05-10 23:37:21 +10:00
Oliver Walters
9f6269375f linting 2022-05-10 01:19:38 +10:00
Oliver Walters
5ba887d59b Refactor locate function 2022-05-10 00:28:49 +10:00
Oliver
cc3f7e7f7c
Merge pull request #123 from inventree/server-settings
Server settings
2022-05-09 22:20:09 +10:00
Oliver Walters
97ee077419 Require API version 46 2022-05-09 21:46:29 +10:00