update carton and add staff name
This commit is contained in:
@@ -3,6 +3,7 @@ import 'dart:async';
|
||||
import 'package:cloud_firestore/cloud_firestore.dart';
|
||||
import 'package:fcs/data/services/services.dart';
|
||||
import 'package:fcs/domain/constants.dart';
|
||||
import 'package:fcs/domain/entities/cargo_type.dart';
|
||||
import 'package:fcs/domain/entities/carton.dart';
|
||||
import 'package:fcs/domain/vo/message.dart';
|
||||
import 'package:fcs/domain/vo/shipment_status.dart';
|
||||
@@ -55,11 +56,8 @@ class CartonModel extends BaseModel {
|
||||
});
|
||||
}
|
||||
|
||||
List<String> cartonTypes = [
|
||||
carton_from_packages,
|
||||
carton_mix_box,
|
||||
carton_small_bag
|
||||
];
|
||||
List<String> cartonTypes = [carton_from_packages, carton_mix_box];
|
||||
List<String> mixTypes = [mix_delivery, mix_pickup];
|
||||
List<String> cartonTypesInfo = [
|
||||
carton_from_packages,
|
||||
carton_mix_box,
|
||||
@@ -220,4 +218,40 @@ class CartonModel extends BaseModel {
|
||||
Future<void> deleteCarton(Carton carton) {
|
||||
return Services.instance.cartonService.deleteCarton(carton);
|
||||
}
|
||||
|
||||
Future<List<Carton>> searchCarton(String term) async {
|
||||
if (term == null || term == '') return List();
|
||||
|
||||
List<Carton> _cartons = [];
|
||||
|
||||
try {
|
||||
_cartons = [
|
||||
Carton(
|
||||
cartonNumber: "A100B-1#1",
|
||||
cargoTypes: [CargoType(name: "General", weight: 12)],
|
||||
userName: "Seven 7"),
|
||||
Carton(
|
||||
cartonNumber: "A100B-1#2",
|
||||
cargoTypes: [CargoType(name: "General", weight: 12)],
|
||||
userName: "Seven 7"),
|
||||
Carton(
|
||||
cartonNumber: "A100B-1#3",
|
||||
cargoTypes: [CargoType(name: "General", weight: 12)],
|
||||
userName: "Seven 7"),
|
||||
Carton(
|
||||
cartonNumber: "A100B-1#4",
|
||||
cargoTypes: [CargoType(name: "General", weight: 12)],
|
||||
userName: "Seven 7"),
|
||||
Carton(
|
||||
cartonNumber: "A100B-1#5",
|
||||
cargoTypes: [CargoType(name: "General", weight: 12)],
|
||||
userName: "Seven 7"),
|
||||
];
|
||||
} catch (e) {
|
||||
// permission error
|
||||
log.warning("user error:" + e.toString());
|
||||
return null;
|
||||
}
|
||||
return _cartons;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user