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

Commit

Permalink
Merge pull request #559 from egovernments/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
rahuldevgarg authored Sep 8, 2023
2 parents dc3b506 + c7f6dea commit 11df151
Show file tree
Hide file tree
Showing 20 changed files with 503 additions and 290 deletions.
11 changes: 9 additions & 2 deletions frontend/mgramseva/lib/components/dashboard/bills_table.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,21 @@ class BillsTable extends StatefulWidget {
final double rightColumnWidth;
final double? height;
final ScrollPhysics? scrollPhysics;
ScrollController scrollController = ScrollController();
BillsTable(
{Key? key,
required this.headerList,
required this.tableData,
required this.leftColumnWidth,
required this.rightColumnWidth, this.height, this.scrollPhysics})
: super(key: key);
BillsTable.withScrollController(
{Key? key,
required this.headerList,
required this.tableData,
required this.leftColumnWidth,
required this.rightColumnWidth, this.height, this.scrollPhysics, required this.scrollController})
: super(key: key);

@override
State<StatefulWidget> createState() {
Expand All @@ -27,7 +35,6 @@ class BillsTable extends StatefulWidget {
}

class _BillsTable extends State<BillsTable> {
final ScrollController controller = ScrollController();
final double columnRowFixedHeight = 52.0;

@override
Expand Down Expand Up @@ -134,7 +141,7 @@ class _BillsTable extends State<BillsTable> {
return LayoutBuilder(builder: (context, constraints) {
var data = widget.tableData[index].tableRow.first;
return ScrollParent(
controller,
widget.scrollController,
InkWell(
onTap: () {
if (data.callBack != null) {
Expand Down
8 changes: 5 additions & 3 deletions frontend/mgramseva/lib/model/common/BillsTableData.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import '../../utils/models.dart';

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

BillsTableData(this.tableHeaders, this.tabledata);
List<TableDataRow> tableData;
bool isEmpty(){
return tableData.isEmpty;
}
BillsTableData(this.tableHeaders, this.tableData);
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class CollectionReportData {
String? oldConnectionNo;
String? userId;
String? paymentMode;
List<double>? paymentAmount;
double? paymentAmount;

CollectionReportData(
{this.tenantName,
Expand All @@ -23,7 +23,7 @@ class CollectionReportData {
oldConnectionNo = json['oldConnectionNo'];
userId = json['userId'];
paymentMode = json['paymentMode'];
paymentAmount = json['paymentAmount'].cast<double>();
paymentAmount = json['paymentAmount'];
}

Map<String, dynamic> toJson() {
Expand Down
Loading

0 comments on commit 11df151

Please sign in to comment.