Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Commit

Permalink
Merge branch 'PFM-4079' into develop
Browse files Browse the repository at this point in the history
# Conflicts:
#	frontend/mgramseva/lib/utils/role_actions.dart
  • Loading branch information
rahuldevgarg committed Sep 4, 2023
2 parents 653350e + c78fcfa commit 5de9a20
Show file tree
Hide file tree
Showing 24 changed files with 1,103 additions and 6 deletions.
2 changes: 2 additions & 0 deletions frontend/mgramseva/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_downloader/flutter_downloader.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:mgramseva/env/app_config.dart';
import 'package:mgramseva/providers/reports_provider.dart';
import 'package:mgramseva/routing.dart';
import 'package:mgramseva/providers/authentication_provider.dart';
import 'package:mgramseva/providers/bill_generation_details_provider.dart';
Expand Down Expand Up @@ -192,6 +193,7 @@ class _MyAppState extends State<MyApp> {
ChangeNotifierProvider(create: (_) => NotificationScreenProvider()),
ChangeNotifierProvider(create: (_) => TransactionUpdateProvider()),
ChangeNotifierProvider(create: (_) => IfixHierarchyProvider()),
ChangeNotifierProvider(create: (_) => ReportsProvider()),
],
child: Consumer<LanguageProvider>(
builder: (_, userProvider, child) => GestureDetector(
Expand Down
8 changes: 8 additions & 0 deletions frontend/mgramseva/lib/model/common/BillsTableData.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import '../../utils/models.dart';

class BillsTableData{
List<TableHeader> tableHeaders;
List<TableDataRow> tabledata;

BillsTableData(this.tableHeaders, this.tabledata);
}
37 changes: 37 additions & 0 deletions frontend/mgramseva/lib/model/reports/bill_report_data.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import 'package:json_annotation/json_annotation.dart';

part 'bill_report_data.g.dart';

@JsonSerializable()
class BillReportData {
@JsonKey(name: "tenantName")
String? tenantName;
@JsonKey(name: "consumerName")
String? consumerName;
@JsonKey(name: "connectionNo")
String? connectionNo;
@JsonKey(name: "oldConnectionNo")
String? oldConnectionNo;
@JsonKey(name: "consumerCreatedOnDate")
String? consumerCreatedOnDate;
@JsonKey(name: "penalty")
double? penalty;
@JsonKey(name: "advance")
double? advance;
@JsonKey(name: "demandAmount")
double? demandAmount;
@JsonKey(name: "userId")
String? userId;

@override
String toString() {
return 'BillReportData{tenantName: $tenantName, consumerName: $consumerName, connectionNo: $connectionNo, oldConnectionNo: $oldConnectionNo, consumerCreatedOnDate: $consumerCreatedOnDate, advance: $advance, penalty: $penalty, demandAmount: $demandAmount, userId: $userId}';
}

BillReportData();

factory BillReportData.fromJson(Map<String, dynamic> json) =>
_$BillReportDataFromJson(json);

Map<String, dynamic> toJson(List list) => _$BillReportDataToJson(this);
}
32 changes: 32 additions & 0 deletions frontend/mgramseva/lib/model/reports/bill_report_data.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 40 additions & 0 deletions frontend/mgramseva/lib/model/reports/collection_report_data.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
class CollectionReportData {
String? tenantName;
String? consumerName;
String? connectionNo;
String? oldConnectionNo;
String? userId;
String? paymentMode;
List<double>? paymentAmount;

CollectionReportData(
{this.tenantName,
this.consumerName,
this.connectionNo,
this.oldConnectionNo,
this.userId,
this.paymentMode,
this.paymentAmount});

CollectionReportData.fromJson(Map<String, dynamic> json) {
tenantName = json['tenantName'];
consumerName = json['consumerName'];
connectionNo = json['connectionNo'];
oldConnectionNo = json['oldConnectionNo'];
userId = json['userId'];
paymentMode = json['paymentMode'];
paymentAmount = json['paymentAmount'].cast<double>();
}

Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['tenantName'] = this.tenantName;
data['consumerName'] = this.consumerName;
data['connectionNo'] = this.connectionNo;
data['oldConnectionNo'] = this.oldConnectionNo;
data['userId'] = this.userId;
data['paymentMode'] = this.paymentMode;
data['paymentAmount'] = this.paymentAmount;
return data;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ class BillGenerationProvider with ChangeNotifier {
getServiceTypeConnectionTypePropertyTypeMDMS(
commonProvider.userDetails!.userRequest!.tenantId.toString()));
languageList = res;
notifyListeners();
streamController.add(billGenerateDetails);
} catch (e, s) {
ErrorHandler().allExceptionsHandler(navigatorKey.currentContext!, e, s);
Expand Down
Loading

0 comments on commit 5de9a20

Please sign in to comment.