Fakultas Ilmu Komputer UI

Commit c9ca783c authored by Tsamara Esperanti Erwin's avatar Tsamara Esperanti Erwin
Browse files

Merge branch 'coldfix-pbi2' of...

Merge branch 'coldfix-pbi2' of https://gitlab.cs.ui.ac.id/ppl-fasilkom-ui/itproject-2020/group-b/pilar-mobile into PBI-7-Progress_Program
parents c054a38a c9f2aa0a
......@@ -70,7 +70,7 @@ Map<String, dynamic> _$DonationToJson(Donation instance) => <String, dynamic>{
'goods_quantity': instance.goodsQuantity,
'goods_description': instance.goodsDescription,
'delivery_method': instance.deliveryMethod,
'delivery_address': instance.deliveryAddress
'delivery_address': instance.deliveryAddress,
};
const _$StatusDonationEnumMap = {
......
......@@ -49,8 +49,12 @@ class Transaction {
final DateTime updatedAt;
final String subtotal;
final List<TransactionItem> transactionItems;
@JsonKey(nullable: true)
final String batch;
@JsonKey(nullable: true)
final String batchName;
@JsonKey(nullable: true)
final DateTime batchEndDate;
const Transaction(
......
......@@ -46,7 +46,7 @@ Transaction _$TransactionFromJson(Map<String, dynamic> json) {
subtotal: json['subtotal'] as String,
batch: json['batch'] as String,
batchName: json['batch_name'] as String,
batchEndDate: DateTime.parse(json['end_date'] as String)
batchEndDate: json['end_date'] != null ? DateTime.parse(json['end_date'] as String) : DateTime.now(),
);
}
......@@ -87,8 +87,8 @@ Map<String, dynamic> _$TransactionToJson(Transaction instance) =>
'transaction_items':
instance.transactionItems.map((e) => e.toJson()).toList(),
'batch': instance.batch,
'batch_name':instance.batchName,
'end_date':instance.batchEndDate
'batch_name': instance.batchName,
'end_date': instance.batchEndDate.toIso8601String(),
};
const _$PaymentMethodEnumMap = {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment