rename shipment

This commit is contained in:
Sai Naw Wun
2020-10-07 14:42:07 +06:30
parent 65dda16fe6
commit 897e5c9b93
15 changed files with 117 additions and 172 deletions

View File

@@ -7,20 +7,11 @@ import 'package:fcs/domain/vo/radio.dart';
import 'package:fcs/pages/main/model/base_model.dart';
import 'package:logging/logging.dart';
class PickUpModel extends BaseModel {
final log = Logger('PickUpModel');
class ShipmentModel extends BaseModel {
final log = Logger('ShipmentModel');
StreamSubscription<QuerySnapshot> listener;
// var profile = FCSProfile(
// id: '1',
// usaAddress: '154-19 64th Ave.\nFlushing, NY 11367',
// mmAddress: 'FCS Trading Myanmar\nRoom 333, Yangon',
// usaContactNumber: '1 (929) 215-2247',
// mmContactNumber: '+95 9 700224723',
// mail: 'admin@fcs.com',
// facebook: 'https://facebook.com/fcs');
List<RadioGroup> radioGroups1 = [
RadioGroup(
text: "FCS Pickup",
@@ -62,9 +53,9 @@ class PickUpModel extends BaseModel {
return radioGroups;
}
List<PickUp> get pickups {
List<PickUp> pickups = [
PickUp(
List<Shipment> get pickups {
List<Shipment> pickups = [
Shipment(
id: "S200412 - 12 Apr 2020",
userName: "Ko Kyaw Nyi",
phoneNumber: '+959111111111',
@@ -83,7 +74,7 @@ class PickUpModel extends BaseModel {
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
]),
PickUp(
Shipment(
id: "S200125 - 12 May 2020",
userName: "Ko Kyaw Nyi",
phoneNumber: '+959111111111',
@@ -100,7 +91,7 @@ class PickUpModel extends BaseModel {
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
]),
PickUp(
Shipment(
id: "S200441 - 13 Apr 2020",
userName: "Ko Kyaw Nyi",
phoneNumber: '+959111111111',
@@ -118,7 +109,7 @@ class PickUpModel extends BaseModel {
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
]),
PickUp(
Shipment(
id: "S200412 - 12 Apr 2020",
userName: "Ko Kyaw Nyi",
phoneNumber: '+959111111111',
@@ -135,7 +126,7 @@ class PickUpModel extends BaseModel {
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
]),
PickUp(
Shipment(
id: "S200125 - 12 May 2020",
userName: "Ko Kyaw Nyi",
phoneNumber: '+959111111111',
@@ -152,7 +143,7 @@ class PickUpModel extends BaseModel {
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
]),
PickUp(
Shipment(
id: "S200441 - 13 Apr 2020",
userName: "Ko Kyaw Nyi",
phoneNumber: '+959111111111',
@@ -169,7 +160,7 @@ class PickUpModel extends BaseModel {
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
]),
PickUp(
Shipment(
id: "S200441 - 10 Apr 2020",
userName: "Ko Kyaw Nyi",
phoneNumber: '+959111111111',
@@ -186,7 +177,7 @@ class PickUpModel extends BaseModel {
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
]),
PickUp(
Shipment(
id: "S200441 - 6 Apr 2020",
userName: "Ko Kyaw Nyi",
phoneNumber: '+959111111111',
@@ -207,8 +198,8 @@ class PickUpModel extends BaseModel {
return pickups;
}
List<PickUp> pickups1 = [
PickUp(
List<Shipment> pickups1 = [
Shipment(
id: "S200412 - 12 Apr 2020",
userName: "Ko Kyaw Nyi",
phoneNumber: '+959111111111',
@@ -227,7 +218,7 @@ class PickUpModel extends BaseModel {
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
]),
PickUp(
Shipment(
id: "S200125 - 12 May 2020",
userName: "Ko Kyaw Nyi",
phoneNumber: '+959111111111',
@@ -244,7 +235,7 @@ class PickUpModel extends BaseModel {
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
]),
PickUp(
Shipment(
id: "S200441 - 13 Apr 2020",
userName: "Ko Kyaw Nyi",
phoneNumber: '+959111111111',
@@ -262,7 +253,7 @@ class PickUpModel extends BaseModel {
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
]),
PickUp(
Shipment(
id: "S200412 - 12 Apr 2020",
userName: "Ko Kyaw Nyi",
phoneNumber: '+959111111111',
@@ -279,7 +270,7 @@ class PickUpModel extends BaseModel {
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
]),
PickUp(
Shipment(
id: "S200125 - 12 May 2020",
userName: "Ko Kyaw Nyi",
phoneNumber: '+959111111111',
@@ -296,7 +287,7 @@ class PickUpModel extends BaseModel {
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
]),
PickUp(
Shipment(
id: "S200441 - 13 Apr 2020",
userName: "Ko Kyaw Nyi",
phoneNumber: '+959111111111',
@@ -313,7 +304,7 @@ class PickUpModel extends BaseModel {
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
]),
PickUp(
Shipment(
id: "S200441 - 10 Apr 2020",
userName: "Ko Kyaw Nyi",
phoneNumber: '+959111111111',
@@ -330,7 +321,7 @@ class PickUpModel extends BaseModel {
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
]),
PickUp(
Shipment(
id: "S200441 - 6 Apr 2020",
userName: "Ko Kyaw Nyi",
phoneNumber: '+959111111111',
@@ -349,22 +340,22 @@ class PickUpModel extends BaseModel {
]),
];
List<PickUp> get canceled {
List<PickUp> _p = pickups.where((e) => e.status == "Canceled").toList()
List<Shipment> get canceled {
List<Shipment> _p = pickups.where((e) => e.status == "Canceled").toList()
..sort((e1, e2) {
return e2.date.compareTo(e1.date);
});
return _p;
}
List<PickUp> get completed {
List<Shipment> get completed {
return pickups.where((e) => e.status == "Pickuped").toList()
..sort((e1, e2) {
return e2.date.compareTo(e1.date);
});
}
List<PickUp> get upcoming {
List<Shipment> get upcoming {
return pickups
.where((e) =>
e.status == "Pending" ||