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