mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-17 04:35:26 +00:00
Code cleanup
This commit is contained in:
@ -1,18 +1,10 @@
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:InvenTree/api.dart';
|
||||
import 'package:InvenTree/widget/dialogs.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:one_context/one_context.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
// import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:path/path.dart' as path;
|
||||
import 'package:http/http.dart' as http;
|
||||
|
||||
|
||||
// Paginated response object
|
||||
|
@ -1,14 +1,10 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:InvenTree/api.dart';
|
||||
import 'package:InvenTree/inventree/stock.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:InvenTree/l10.dart';
|
||||
|
||||
import 'model.dart';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:path/path.dart' as path;
|
||||
import 'package:http/http.dart' as http;
|
||||
|
||||
class InvenTreePartCategory extends InvenTreeModel {
|
||||
@ -42,7 +38,7 @@ class InvenTreePartCategory extends InvenTreeModel {
|
||||
String p = psplit.join("/");
|
||||
|
||||
if (p.isEmpty) {
|
||||
p = "Top level part category";
|
||||
p = L10().partCategoryTopLevel;
|
||||
}
|
||||
|
||||
return p;
|
||||
|
@ -35,8 +35,7 @@ class InvenTreeStockItemTestResult extends InvenTreeModel {
|
||||
|
||||
InvenTreeStockItemTestResult() : super();
|
||||
|
||||
InvenTreeStockItemTestResult.fromJson(Map<String, dynamic> json) : super.fromJson(json) {
|
||||
}
|
||||
InvenTreeStockItemTestResult.fromJson(Map<String, dynamic> json) : super.fromJson(json);
|
||||
|
||||
@override
|
||||
InvenTreeStockItemTestResult createFromJson(Map<String, dynamic> json) {
|
||||
@ -388,9 +387,8 @@ class InvenTreeStockItem extends InvenTreeModel {
|
||||
}
|
||||
|
||||
String get locationPathString {
|
||||
String path = '';
|
||||
|
||||
if (locationId == -1 || !jsondata.containsKey('location_detail')) return 'No location specified';
|
||||
if (locationId == -1 || !jsondata.containsKey('location_detail')) return L10().locationNotSet;
|
||||
|
||||
return jsondata['location_detail']['pathstring'] ?? '';
|
||||
}
|
||||
|
Reference in New Issue
Block a user