update shipment type
This commit is contained in:
@@ -6,6 +6,7 @@ class FcsShipment {
|
||||
String? id;
|
||||
String? shipmentNumber;
|
||||
DateTime? cutoffDate;
|
||||
String? shipmentTypeId;
|
||||
String? shipType;
|
||||
DateTime? arrivalDate;
|
||||
DateTime? departureDate;
|
||||
@@ -19,6 +20,7 @@ class FcsShipment {
|
||||
this.id,
|
||||
this.shipmentNumber,
|
||||
this.cutoffDate,
|
||||
this.shipmentTypeId,
|
||||
this.shipType,
|
||||
this.status,
|
||||
this.arrivalDate,
|
||||
@@ -34,17 +36,14 @@ class FcsShipment {
|
||||
map['cutoff_date'] == null ? null : (map['cutoff_date'] as Timestamp);
|
||||
var _arrivalDate =
|
||||
map['arrival_date'] == null ? null : (map['arrival_date'] as Timestamp);
|
||||
var _departureDate = map['departure_date'] == null
|
||||
? null
|
||||
: (map['departure_date'] as Timestamp);
|
||||
|
||||
return FcsShipment(
|
||||
id: docID,
|
||||
cutoffDate: _cutoffDate != null ? _cutoffDate.toDate() : null,
|
||||
arrivalDate: _arrivalDate != null ? _arrivalDate.toDate() : null,
|
||||
departureDate: _departureDate != null ? _departureDate.toDate() : null,
|
||||
shipmentNumber: map['shipment_number'],
|
||||
shipType: map['shipment_type'],
|
||||
shipmentTypeId: map['shipment_type_id'] ?? "",
|
||||
status: map['status'],
|
||||
consignee: map['consignee'],
|
||||
port: map['port'],
|
||||
@@ -62,8 +61,8 @@ class FcsShipment {
|
||||
'consignee': consignee,
|
||||
'port': port,
|
||||
'destination': destination,
|
||||
'status': status,
|
||||
'report_name': reportName,
|
||||
// 'status': status,
|
||||
// 'report_name': reportName,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -75,7 +74,7 @@ class FcsShipment {
|
||||
return fcsShipment.shipmentNumber != this.shipmentNumber ||
|
||||
fcsShipment.cutoffDate != this.cutoffDate ||
|
||||
fcsShipment.arrivalDate != this.arrivalDate ||
|
||||
fcsShipment.shipType != this.shipType ||
|
||||
fcsShipment.shipmentTypeId != this.shipmentTypeId ||
|
||||
fcsShipment.consignee != this.consignee ||
|
||||
fcsShipment.port != this.port ||
|
||||
fcsShipment.destination != this.destination;
|
||||
|
||||
10
lib/domain/entities/shipment_type.dart
Normal file
10
lib/domain/entities/shipment_type.dart
Normal file
@@ -0,0 +1,10 @@
|
||||
class ShipmentType {
|
||||
String id;
|
||||
String desc;
|
||||
|
||||
ShipmentType({required this.id, required this.desc});
|
||||
|
||||
factory ShipmentType.fromMap(Map<String, dynamic> map, String id) {
|
||||
return ShipmentType(id: id, desc: map['desc'] ?? "");
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ import 'package:intl/intl.dart';
|
||||
import '../constants.dart';
|
||||
|
||||
DateFormat dayFormat = DateFormat("MMM dd yyyy");
|
||||
DateFormat timeFormat = DateFormat("HH:mm");
|
||||
DateFormat timeFormat = DateFormat("hh:mm a");
|
||||
final DateFormat dateFormat = DateFormat("d MMM yyyy");
|
||||
|
||||
class User {
|
||||
|
||||
Reference in New Issue
Block a user