From 8d871df5610ba7d5376a93ca736ee6001dceeb88 Mon Sep 17 00:00:00 2001 From: Rahul Dev Garg <34365102+rahuldevgarg@users.noreply.github.com> Date: Fri, 8 Sep 2023 19:35:54 +0530 Subject: [PATCH 1/2] added api contract changes --- .../mgramseva/lib/model/reports/collection_report_data.dart | 4 ++-- frontend/mgramseva/lib/providers/reports_provider.dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/mgramseva/lib/model/reports/collection_report_data.dart b/frontend/mgramseva/lib/model/reports/collection_report_data.dart index 5b5f5235a..6be6137ce 100644 --- a/frontend/mgramseva/lib/model/reports/collection_report_data.dart +++ b/frontend/mgramseva/lib/model/reports/collection_report_data.dart @@ -5,7 +5,7 @@ class CollectionReportData { String? oldConnectionNo; String? userId; String? paymentMode; - List? paymentAmount; + double? paymentAmount; CollectionReportData( {this.tenantName, @@ -23,7 +23,7 @@ class CollectionReportData { oldConnectionNo = json['oldConnectionNo']; userId = json['userId']; paymentMode = json['paymentMode']; - paymentAmount = json['paymentAmount'].cast(); + paymentAmount = json['paymentAmount']; } Map toJson() { diff --git a/frontend/mgramseva/lib/providers/reports_provider.dart b/frontend/mgramseva/lib/providers/reports_provider.dart index 6ca7b99d2..8f4bb1c25 100644 --- a/frontend/mgramseva/lib/providers/reports_provider.dart +++ b/frontend/mgramseva/lib/providers/reports_provider.dart @@ -99,7 +99,7 @@ class ReportsProvider with ChangeNotifier { TableData('${data.oldConnectionNo ?? '-'}'), TableData('${name?? '-'}'), TableData('${data.paymentMode ?? '-'}'), - TableData('${data.paymentAmount==null?null:data.paymentAmount!.isNotEmpty?data.paymentAmount?.first:null ?? '0'}'), + TableData('${data.paymentAmount ?? '0'}'), ]); } void callNotifier() { From daf70d7168642c8fa84434dc857cadfab641e317 Mon Sep 17 00:00:00 2001 From: Rahul Dev Garg <34365102+rahuldevgarg@users.noreply.github.com> Date: Fri, 8 Sep 2023 19:37:10 +0530 Subject: [PATCH 2/2] added api contract changes --- .../mgramseva/lib/model/reports/collection_report_data.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/mgramseva/lib/model/reports/collection_report_data.dart b/frontend/mgramseva/lib/model/reports/collection_report_data.dart index 6be6137ce..57778865d 100644 --- a/frontend/mgramseva/lib/model/reports/collection_report_data.dart +++ b/frontend/mgramseva/lib/model/reports/collection_report_data.dart @@ -5,7 +5,7 @@ class CollectionReportData { String? oldConnectionNo; String? userId; String? paymentMode; - double? paymentAmount; + String? paymentAmount; CollectionReportData( {this.tenantName,