mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-13 02:35:27 +00:00
Show snack when encountering a server error
This commit is contained in:
@ -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
Submodule lib/l10n updated: 7cf4974a05...3a2f1660fd
@ -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),
|
||||
|
Reference in New Issue
Block a user