mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 03:26:24 +00:00
More checks
This commit is contained in:
parent
53b69d9623
commit
b98f044204
7 changed files with 50 additions and 30 deletions
10
lib/api.dart
10
lib/api.dart
|
|
@ -208,7 +208,7 @@ class InvenTreeAPI {
|
|||
* Check server connection and display messages if not connected.
|
||||
* Useful as a precursor check before performing operations.
|
||||
*/
|
||||
bool checkConnection(BuildContext context) {
|
||||
bool checkConnection() {
|
||||
// Firstly, is the server connected?
|
||||
if (!isConnected()) {
|
||||
|
||||
|
|
@ -292,14 +292,10 @@ class InvenTreeAPI {
|
|||
static final InvenTreeAPI _api = InvenTreeAPI._internal();
|
||||
|
||||
// API endpoint for receiving purchase order line items was introduced in v12
|
||||
bool supportPoReceive() {
|
||||
return apiVersion >= 12;
|
||||
}
|
||||
bool get supportsPoReceive => apiVersion >= 12;
|
||||
|
||||
// "Modern" API transactions were implemented in API v14
|
||||
bool supportModernStockTransactions() {
|
||||
return apiVersion >= 14;
|
||||
}
|
||||
bool get supportsModernStockTransactions => apiVersion >= 14;
|
||||
|
||||
/*
|
||||
* Connect to the remote InvenTree server:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue