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 #513 from egovernments/PFM-bugbash
Browse files Browse the repository at this point in the history
Bugbash issues
  • Loading branch information
rahuldevgarg authored Aug 31, 2023
2 parents 4862254 + 2f6b3b7 commit 03e92de
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class RevenueDashboard with ChangeNotifier {
var surplus = int.parse(collection.pendingCollection ?? '0') - int.parse(expense.amountUnpaid ?? '0');
filteredList.add(
TableDataRow([
TableData('${DateFormats.getMonth(
TableData('${DateFormats.getMonthAndYearFromDateTime(
DateFormats.getFormattedDateToDateTime(
DateFormats.timeStampToDate(collection.month))!)}',
callBack: onTapOfMonth,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -670,8 +670,13 @@ class _ConsumerCollectPaymentViewState extends State<ConsumerCollectPayment> {
if (formKey.currentState!.validate()) {
autoValidation = false;
if (fetchBill.paymentMethod == 'PAYGOV') {
final billDetails = FetchBill.fromJson(fetchBill.toJson());
formKey.currentState?.reset();
setState(() {
checkValue=false;
});
consumerPaymentProvider.createTransaction(
fetchBill, widget.query['tenantId'], context,widget.query);
billDetails, widget.query['tenantId'], context,widget.query);
}
} else {
setState(() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ class _ConsumerDetailsState extends State<ConsumerDetails> {
isRequired: true,
validator: (val) =>
Validators.maxCharactersValidator(
val, 100, i18.consumer.CONSUMER_NAME),
val, 50, i18.consumer.CONSUMER_NAME),
contextKey:
consumerProvider.consmerWalkthrougList[0].key,
key: Keys.createConsumer.CONSUMER_NAME_KEY,
Expand All @@ -231,7 +231,7 @@ class _ConsumerDetailsState extends State<ConsumerDetails> {
isRequired: true,
validator: (val) =>
Validators.maxCharactersValidator(
val, 100, i18.consumer.FATHER_SPOUSE_NAME),
val, 50, i18.consumer.FATHER_SPOUSE_NAME),
inputFormatter: [
FilteringTextInputFormatter.allow(
RegExp("[A-Za-z ]"))
Expand Down
7 changes: 6 additions & 1 deletion frontend/mgramseva/lib/screeens/dashboard/dashboard.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import 'package:mgramseva/widgets/tab_button.dart';
import 'package:path_provider/path_provider.dart';
import 'package:provider/provider.dart';
import 'package:screenshot/screenshot.dart';
import '../../routers/routers.dart';
import '../../widgets/custom_app_bar.dart';
import 'revenue_expense_dashboard/revenue_dashboard.dart';
import 'search_expense.dart';
Expand Down Expand Up @@ -388,6 +389,10 @@ class _Dashboard extends State<Dashboard> with SingleTickerProviderStateMixin {

void onClickOfBackButton() {
CustomOverlay.removeOverLay();
Navigator.pop(context);
var dashBoardProvider =
Provider.of<DashBoardProvider>(context, listen: false);
if(dashBoardProvider.selectedMonth.dateType != DateType.MONTH) Navigator.pop(context);
else{
Navigator.popAndPushNamed(context,Routes.DASHBOARD);}
}
}
8 changes: 8 additions & 0 deletions frontend/mgramseva/lib/utils/date_formats.dart
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,12 @@ class DateFormats {
return '';
}
}

static String getMonthAndYearFromDateTime(DateTime date) {
try {
return '${DateFormat.MMM().format(date)}-${DateFormat.y().format(date)}';
} catch (e) {
return '';
}
}
}

0 comments on commit 03e92de

Please sign in to comment.