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 #812 from egovernments/ISTE-173-BUILD
Browse files Browse the repository at this point in the history
ISTE 173 - BUILD even with Develop
  • Loading branch information
pradeepkumarcm-egov authored Jun 13, 2024
2 parents ec48fd2 + 230f137 commit 0749c5d
Show file tree
Hide file tree
Showing 57 changed files with 2,564 additions and 1,794 deletions.
1 change: 0 additions & 1 deletion frontend/mgramseva/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ lib/env/
/build/

# Web related
lib/generated_plugin_registrant.dart

# Symbolication related
app.*.symbols
Expand Down
4 changes: 2 additions & 2 deletions frontend/mgramseva/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.dwss.mgramseva"
minSdkVersion 19
targetSdkVersion 33
minSdkVersion flutter.minSdkVersion
targetSdkVersion 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
Expand Down
1 change: 1 addition & 0 deletions frontend/mgramseva/devtools_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
extensions:
81 changes: 50 additions & 31 deletions frontend/mgramseva/lib/components/dashboard/bills_table.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import 'dart:convert';
import 'dart:developer';

import 'package:flutter/material.dart';
import 'package:horizontal_data_table/horizontal_data_table.dart';
import 'package:mgramseva/utils/localization/application_localizations.dart';
Expand All @@ -14,17 +17,22 @@ class BillsTable extends StatefulWidget {
ScrollController scrollController = ScrollController();
BillsTable(
{Key? key,
required this.headerList,
required this.tableData,
required this.leftColumnWidth,
required this.rightColumnWidth, this.height, this.scrollPhysics})
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})
required this.headerList,
required this.tableData,
required this.leftColumnWidth,
required this.rightColumnWidth,
this.height,
this.scrollPhysics,
required this.scrollController})
: super(key: key);

@override
Expand Down Expand Up @@ -106,32 +114,36 @@ class _BillsTable extends State<BillsTable> {
return Container(
decoration: isBorderRequired
? BoxDecoration(
border: Border(
left: tableCellBorder,
bottom: tableCellBorder,
right: tableCellBorder))
border: Border(
left: tableCellBorder,
bottom: tableCellBorder,
right: tableCellBorder))
: null,
child: isAscending != null
? Wrap(
crossAxisAlignment: WrapCrossAlignment.center,
spacing: 5,
children: [
textWidget,
Icon(isAscending
? Icons.arrow_upward
: Icons.arrow_downward_sharp)
],
)
crossAxisAlignment: WrapCrossAlignment.center,
spacing: 5,
children: [
textWidget,
Icon(isAscending
? Icons.arrow_upward
: Icons.arrow_downward_sharp)
],
)
: textWidget,
width: widget.leftColumnWidth,
height: 56,
padding: EdgeInsets.only(left: 17, right: 5, top: 6, bottom: 6),
alignment: Alignment.centerLeft,
);
}

double columnRowIncreasedHeight(int index) {
return
(50 + widget.tableData[index].tableRow.first.label.substring(28).length.toDouble());
return (50 +
widget.tableData[index].tableRow.first.label
.substring(28)
.length
.toDouble());
//if greater than 28 characters
}

Expand All @@ -149,17 +161,20 @@ class _BillsTable extends State<BillsTable> {
child: Container(
decoration: BoxDecoration(
border: Border(
left: tableCellBorder,
bottom: tableCellBorder,
right: tableCellBorder,
)),
left: tableCellBorder,
bottom: tableCellBorder,
right: tableCellBorder,
)),
child: Text(
ApplicationLocalizations.of(context)
.translate(widget.tableData[index].tableRow.first.label),
style: widget.tableData[index].tableRow.first.style ?? TextStyle(color: Theme.of(context).primaryColor),
style: widget.tableData[index].tableRow.first.style ??
TextStyle(color: Theme.of(context).primaryColor),
),
width: widget.leftColumnWidth,
height: widget.tableData[index].tableRow.first.label.length > 28 ? columnRowIncreasedHeight(index) : columnRowFixedHeight,
height: widget.tableData[index].tableRow.first.label.length > 28
? columnRowIncreasedHeight(index)
: columnRowFixedHeight,
padding: EdgeInsets.only(left: 17, right: 5, top: 6, bottom: 6),
alignment: Alignment.centerLeft,
),
Expand All @@ -174,7 +189,8 @@ class _BillsTable extends State<BillsTable> {
child: Row(
children: <Widget>[
Expanded(
child: Text(ApplicationLocalizations.of(context).translate(input),
child: Text(
ApplicationLocalizations.of(context).translate(input),
style: style,
maxLines: 2,
overflow: TextOverflow.ellipsis,
Expand All @@ -183,14 +199,17 @@ class _BillsTable extends State<BillsTable> {
],
),
width: widget.leftColumnWidth,
height: widget.tableData[index].tableRow.first.label.length > 28 ? columnRowIncreasedHeight(index) : columnRowFixedHeight,
height: widget.tableData[index].tableRow.first.label.length > 28
? columnRowIncreasedHeight(index)
: columnRowFixedHeight,
padding: EdgeInsets.only(left: 17, right: 5, top: 6, bottom: 6),
alignment: Alignment.centerLeft,
);
}

Widget _generateRightHandSideColumnRow(BuildContext context, int index) {
var data = widget.tableData[index];

return LayoutBuilder(builder: (context, constraints) {
var list = <Widget>[];
for (int i = 1; i < data.tableRow.length; i++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ class ConsumerBillPaymentsState extends State<ConsumerBillPayments> {
.toString()) +
' only')),
getPrinterLabel(
(item.totalDue ?? 0) - (item.totalAmountPaid ?? 0)>0?i18.consumerReciepts.CONSUMER_PENDING_AMOUNT:i18.common.CORE_ADVANCE,
(item.totalDue ?? 0) - (item.totalAmountPaid ?? 0)>=0?i18.consumerReciepts.CONSUMER_PENDING_AMOUNT:i18.common.CORE_ADVANCE,
('₹' +
((item.totalDue ?? 0) - (item.totalAmountPaid ?? 0)).abs()
.toString())),
Expand Down
Loading

0 comments on commit 0749c5d

Please sign in to comment.