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 #537 from egovernments/PFM-4080
Browse files Browse the repository at this point in the history
changed download button
  • Loading branch information
rahuldevgarg authored Sep 6, 2023
2 parents 0cde23f + b10d032 commit 3d0fa0d
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 32 deletions.
13 changes: 5 additions & 8 deletions frontend/mgramseva/lib/screeens/reports/bill_report.dart
Original file line number Diff line number Diff line change
Expand Up @@ -76,21 +76,18 @@ class _BillReport extends State<BillReport>
// SizedBox(
// width: 10,
// ),
Container(
width: 100,
child: Button(
"Download",
() {
TextButton.icon(
onPressed: () {
if (reportProvider.selectedBillPeriod == null) {
Notifiers.getToastMessage(
context, 'Select Billing Cycle', 'ERROR');
} else {
reportProvider.getDemandReport(true);
}
},
key: Keys.billReport.BILL_REPORT_DOWNLOAD_BUTTON,
),
),
icon: Icon(Icons.download_sharp),
label: Text(
ApplicationLocalizations.of(context).translate(i18.common.CORE_DOWNLOAD))),
],
),
],
Expand Down
16 changes: 6 additions & 10 deletions frontend/mgramseva/lib/screeens/reports/collection_report.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class _CollectionReport extends State<CollectionReport>
children: [
Row(
children: [
Text("1. ",
Text("2. ",
style: TextStyle(
fontSize: 16, fontWeight: FontWeight.w700)),
Text(
Expand Down Expand Up @@ -76,22 +76,18 @@ class _CollectionReport extends State<CollectionReport>
// SizedBox(
// width: 10,
// ),
Container(
width: 100,
child: Button(
"Download",
() {
TextButton.icon(
onPressed: () {
if (reportProvider.selectedBillPeriod == null) {
Notifiers.getToastMessage(
context, 'Select Billing Cycle', 'ERROR');
} else {
reportProvider.getCollectionReport(true);
}
},
key:
Keys.billReport.COLLECTION_REPORT_DOWNLOAD_BUTTON,
),
),
icon: Icon(Icons.download_sharp),
label: Text(
ApplicationLocalizations.of(context).translate(i18.common.CORE_DOWNLOAD))),
],
),
],
Expand Down
29 changes: 15 additions & 14 deletions frontend/mgramseva/lib/screeens/reports/reports.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import '../../widgets/drawer_wrapper.dart';
import 'package:mgramseva/utils/constants/i18_key_constants.dart';
import '../../widgets/footer.dart';
import '../../widgets/home_back.dart';
import '../../widgets/label_text.dart';
import '../../widgets/select_field_builder.dart';
import '../../widgets/side_bar.dart';
import 'bill_report.dart';
Expand Down Expand Up @@ -101,6 +102,20 @@ class _Reports extends State<Reports> with SingleTickerProviderStateMixin {
: Column(
children: [
HomeBack(),
Card(
margin: EdgeInsets.only(bottom: 2),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(0.0),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
LabelText(i18.dashboard.CORE_REPORTS),

])),
SizedBox(
height: 30,
),
Card(
margin: EdgeInsets.only(bottom: 2),
shape: RoundedRectangleBorder(
Expand All @@ -110,16 +125,6 @@ class _Reports extends State<Reports> with SingleTickerProviderStateMixin {
padding: const EdgeInsets.only(top:15,bottom: 10.0),
child: Column(
children: [
Text(
ApplicationLocalizations.of(context)
.translate(
i18.dashboard.CORE_REPORTS),
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w700)),
SizedBox(
height: 30,
),
Consumer<ReportsProvider>(
builder: (_, reportProvider, child) =>
Container(
Expand Down Expand Up @@ -173,10 +178,6 @@ class _Reports extends State<Reports> with SingleTickerProviderStateMixin {
SizedBox(
height: 30,
),
Container(
height: 1,
color: Colors.black,
),
Card(
margin: EdgeInsets.only(top: 15,bottom: 2),
shape: RoundedRectangleBorder(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ class Common {

/// Payment complete
String get DOWNLOAD => 'DOWNLOAD';
String get CORE_DOWNLOAD => 'CORE_DOWNLOAD';

/// Payment complete
String get SHARE_BILL => 'SHARE_BILL';
Expand Down

0 comments on commit 3d0fa0d

Please sign in to comment.