diff --git a/frontend/mgramseva/lib/providers/expenses_details_provider.dart b/frontend/mgramseva/lib/providers/expenses_details_provider.dart index ce3e16c74..4443c3536 100644 --- a/frontend/mgramseva/lib/providers/expenses_details_provider.dart +++ b/frontend/mgramseva/lib/providers/expenses_details_provider.dart @@ -550,11 +550,7 @@ class ExpensesDetailsProvider with ChangeNotifier { var res = languageList?.mdmsRes?.pspclIntegration?.accountNumberGpMapping?.where((element) => element.departmentEntityCode==commonProvider.userDetails?.selectedtenant?.city?.code).toList(); var temp_list = languageList?.mdmsRes?.expense?.expenseList?.toList(); if(res!.isNotEmpty){ - isPSPCLEnabled = true; - notifyListeners(); isSearch?{}:temp_list!.removeWhere((element) => element.code=="ELECTRICITY_BILL"); - }else{ - isPSPCLEnabled = false; } return (temp_list ?? []) .map((value) { diff --git a/frontend/mgramseva/lib/screeens/expense/search_expense.dart b/frontend/mgramseva/lib/screeens/expense/search_expense.dart index 7b0d1acd3..f7cc46c0f 100644 --- a/frontend/mgramseva/lib/screeens/expense/search_expense.dart +++ b/frontend/mgramseva/lib/screeens/expense/search_expense.dart @@ -36,10 +36,12 @@ class _SearchExpenseState extends State { @override void initState() { - Provider.of(context, listen: false)..getExpenses(); + WidgetsBinding.instance.addPostFrameCallback((_) => afterViewBuild()); super.initState(); } - + afterViewBuild() { + Provider.of(context, listen: false)..getExpenses(); + } @override Widget build(BuildContext context) { return KeyboardFocusWatcher(child:Scaffold( @@ -73,20 +75,22 @@ class _SearchExpenseState extends State { '\n${ApplicationLocalizations.of(context).translate(i18.common.OR)}', textAlign: TextAlign.center), Consumer( - builder: (_, expensesDetailsProvider, child) => - SelectFieldBuilder( - i18.expense.EXPENSE_TYPE, - expenseType, - '', - '', - onChangeOfExpense, - expensesDetailsProvider.getExpenseTypeList(isSearch: true), - false, - hint: - '${ApplicationLocalizations.of(context).translate(i18.common.ELECTRICITY_HINT)}', - controller: expenseTypeCtrl, - key: Keys.expense.SEARCH_EXPENSE_TYPE, - ), + builder: (_, expensesDetailsProvider, child) { + return SelectFieldBuilder( + i18.expense.EXPENSE_TYPE, + expenseType, + '', + '', + onChangeOfExpense, + expensesDetailsProvider.getExpenseTypeList(isSearch: true)??[], + false, + hint: + '${ApplicationLocalizations.of(context).translate(i18.common.ELECTRICITY_HINT)}', + controller: expenseTypeCtrl, + key: Keys.expense.SEARCH_EXPENSE_TYPE, + ); + } + , ), Column( mainAxisAlignment: MainAxisAlignment.start, diff --git a/frontend/mgramseva/package.json b/frontend/mgramseva/package.json index a71e0eca9..19b5160b1 100644 --- a/frontend/mgramseva/package.json +++ b/frontend/mgramseva/package.json @@ -1,5 +1,5 @@ { "name": "mgramseva", - "version": "1.2.11", + "version": "1.2.12", "license": "egov" } diff --git a/frontend/mgramseva/pubspec.yaml b/frontend/mgramseva/pubspec.yaml index 72c837f43..f3a612aca 100644 --- a/frontend/mgramseva/pubspec.yaml +++ b/frontend/mgramseva/pubspec.yaml @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.2.11+30 +version: 1.2.12+30 environment: sdk: ">=2.12.0 <3.0.0"