mirror of
https://github.com/inventree/inventree-app.git
synced 2025-04-28 05:26:47 +00:00
Show snack when encountering a server error
This commit is contained in:
parent
ca35f44dc8
commit
acecec113e
@ -7,6 +7,8 @@
|
||||
- Simplify process for uploading part images
|
||||
- Display total stock "on order" for purchaseable parts
|
||||
- Display supplier information for purchaseable parts
|
||||
- Handle error responses from server when scanning barcodes
|
||||
- Handle error responses from server when fetching model data
|
||||
- Update translation strings
|
||||
|
||||
### 0.4.1 - July 2021
|
||||
|
@ -3,10 +3,13 @@ import 'dart:async';
|
||||
import 'package:inventree/api.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:inventree/inventree/sentry.dart';
|
||||
import 'package:inventree/widget/dialogs.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
import 'package:path/path.dart' as path;
|
||||
|
||||
import '../l10.dart';
|
||||
|
||||
|
||||
// Paginated response object
|
||||
class InvenTreePageResponse {
|
||||
@ -162,6 +165,11 @@ class InvenTreeModel {
|
||||
}
|
||||
);
|
||||
|
||||
showServerError(
|
||||
L10().serverError,
|
||||
L10().errorFetch,
|
||||
);
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
@ -226,6 +234,11 @@ class InvenTreeModel {
|
||||
}
|
||||
);
|
||||
|
||||
showServerError(
|
||||
L10().serverError,
|
||||
L10().errorFetch,
|
||||
);
|
||||
|
||||
return null;
|
||||
|
||||
}
|
||||
@ -260,6 +273,12 @@ class InvenTreeModel {
|
||||
}
|
||||
);
|
||||
|
||||
showServerError(
|
||||
L10().serverError,
|
||||
L10().errorCreate,
|
||||
);
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
2
lib/l10n
2
lib/l10n
@ -1 +1 @@
|
||||
Subproject commit 7cf4974a05bd78fa5efbea422e456ddb8a542441
|
||||
Subproject commit 3a2f1660fd5a93304272180b25340d04ba0e81aa
|
@ -145,6 +145,7 @@ class InvenTreeDrawer extends StatelessWidget {
|
||||
onTap: _showStock,
|
||||
),
|
||||
|
||||
/*
|
||||
ListTile(
|
||||
title: Text("Suppliers"),
|
||||
leading: FaIcon(FontAwesomeIcons.building),
|
||||
@ -160,6 +161,8 @@ class InvenTreeDrawer extends StatelessWidget {
|
||||
leading: FaIcon(FontAwesomeIcons.users),
|
||||
onTap: _showCustomers,
|
||||
),
|
||||
*/
|
||||
|
||||
ListTile(
|
||||
title: Text(L10().settings),
|
||||
leading: Icon(Icons.settings),
|
||||
|
Loading…
x
Reference in New Issue
Block a user