mirror of
https://github.com/inventree/inventree-app.git
synced 2025-04-27 21:16:48 +00:00
Cleanup
This commit is contained in:
parent
d07b704014
commit
2bdadc2140
@ -1,3 +1,5 @@
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:dropdown_search/dropdown_search.dart';
|
||||
|
||||
@ -128,9 +130,6 @@ class APIFormField {
|
||||
results.add(result);
|
||||
}
|
||||
|
||||
print("Results:");
|
||||
print(results);
|
||||
|
||||
return results;
|
||||
} else {
|
||||
return [];
|
||||
@ -140,11 +139,16 @@ class APIFormField {
|
||||
hint: helpText,
|
||||
onChanged: print,
|
||||
showClearButton: !required,
|
||||
// popupTitle: Text(
|
||||
// label,
|
||||
// style: _labelStyle(),
|
||||
// ),
|
||||
itemAsString: (dynamic item) {
|
||||
return item['pathstring'];
|
||||
},
|
||||
isFilteredOnline: true,
|
||||
showSearchBox: true,
|
||||
autoFocusSearchBox: true,
|
||||
compareFn: (dynamic item, dynamic selectedItem) {
|
||||
|
||||
if (item == null || selectedItem == null) {
|
||||
@ -198,7 +202,9 @@ class APIFormField {
|
||||
return new TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 18,
|
||||
fontFamily: "arial",
|
||||
color: hasErrors() ? COLOR_DANGER : COLOR_GRAY,
|
||||
fontStyle: FontStyle.normal,
|
||||
);
|
||||
}
|
||||
|
||||
@ -246,8 +252,6 @@ Future<void> launchApiForm(BuildContext context, String title, String url, Map<S
|
||||
|
||||
var options = await InvenTreeAPI().options(url);
|
||||
|
||||
final _formKey = new GlobalKey<FormState>();
|
||||
|
||||
// Invalid response from server
|
||||
if (!options.isValid()) {
|
||||
return;
|
||||
|
@ -271,8 +271,7 @@ class StockItemBarcodeAssignmentHandler extends BarcodeHandler {
|
||||
|
||||
final InvenTreeStockItem item;
|
||||
|
||||
StockItemBarcodeAssignmentHandler(this.item) {
|
||||
}
|
||||
StockItemBarcodeAssignmentHandler(this.item);
|
||||
|
||||
@override
|
||||
String getOverlayText(BuildContext context) => L10().barcodeScanAssign;
|
||||
|
@ -296,9 +296,7 @@ class InvenTreeModel {
|
||||
// Create a new object (of the current class type
|
||||
InvenTreeModel obj = createFromJson(d);
|
||||
|
||||
if (obj != null) {
|
||||
results.add(obj);
|
||||
}
|
||||
results.add(obj);
|
||||
}
|
||||
|
||||
return results;
|
||||
|
@ -476,14 +476,7 @@ class InvenTreeStockItem extends InvenTreeModel {
|
||||
expectedStatusCode: 200
|
||||
);
|
||||
|
||||
print("Adjustment completed!");
|
||||
|
||||
if (response == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Stock adjustment succeeded!
|
||||
return true;
|
||||
return response.isValid();
|
||||
}
|
||||
|
||||
Future<bool> countStock(BuildContext context, double q, {String? notes}) async {
|
||||
|
@ -21,19 +21,14 @@ class PaginatedSearchWidget extends StatelessWidget {
|
||||
leading: GestureDetector(
|
||||
child: FaIcon(controller.text.isEmpty ? FontAwesomeIcons.search : FontAwesomeIcons.backspace),
|
||||
onTap: () {
|
||||
if (onChanged != null) {
|
||||
controller.clear();
|
||||
onChanged();
|
||||
}
|
||||
controller.clear();
|
||||
onChanged();
|
||||
},
|
||||
),
|
||||
title: TextFormField(
|
||||
controller: controller,
|
||||
onChanged: (value) {
|
||||
|
||||
if (onChanged != null) {
|
||||
onChanged();
|
||||
}
|
||||
onChanged();
|
||||
},
|
||||
decoration: InputDecoration(
|
||||
hintText: L10().search,
|
||||
|
21
pubspec.lock
21
pubspec.lock
@ -127,13 +127,6 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.1"
|
||||
dropdown_plus:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: dropdown_plus
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.0.9"
|
||||
dropdown_search:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -162,13 +155,6 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "6.1.2"
|
||||
find_dropdown:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: find_dropdown
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
flutter:
|
||||
dependency: "direct main"
|
||||
description: flutter
|
||||
@ -511,13 +497,6 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.27.1"
|
||||
select_dialog:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: select_dialog
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
sembast:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
Loading…
x
Reference in New Issue
Block a user