From e34e0bbfd5a0dd3122e0864aab4132f9bf3c8375 Mon Sep 17 00:00:00 2001 From: Rahul Dev Garg <34365102+rahuldevgarg@users.noreply.github.com> Date: Thu, 7 Sep 2023 15:07:36 +0530 Subject: [PATCH] fix custom things --- .../consumer_bill_payment.dart | 8 +++---- .../providers/collect_payment_provider.dart | 8 +++---- .../lib/repository/billing_service_repo.dart | 22 ++++++++----------- .../lib/repository/expenses_repo.dart | 2 ++ .../consumer_details/consumer_details.dart | 1 + .../screeens/gpwsc_details/gpwsc_details.dart | 4 ++-- frontend/mgramseva/lib/utils/constants.dart | 10 ++++----- 7 files changed, 27 insertions(+), 28 deletions(-) diff --git a/frontend/mgramseva/lib/components/house_connection_and_bill/consumer_bill_payment.dart b/frontend/mgramseva/lib/components/house_connection_and_bill/consumer_bill_payment.dart index 29e0eae1..3c3b9947 100644 --- a/frontend/mgramseva/lib/components/house_connection_and_bill/consumer_bill_payment.dart +++ b/frontend/mgramseva/lib/components/house_connection_and_bill/consumer_bill_payment.dart @@ -156,9 +156,9 @@ class ConsumerBillPaymentsState extends State { ApplicationLocalizations.of(navigatorKey.currentContext!) .translate(commonProvider .userDetails!.selectedtenant!.code!)), - getPrinterlabel(i18.consumerReciepts.RECEIPT_CONSUMER_NO, - CommonMethods.getSplitStings(widget.waterconnection!.connectionNo!,16)), - getPrinterlabel( + getPrinterLabel(i18.consumerReciepts.RECEIPT_CONSUMER_NO, + CommonMethods.getSplitStings(widget.waterConnection!.connectionNo!,16)), + getPrinterLabel( i18.consumerReciepts.RECEIPT_CONSUMER_NAME, widget.waterConnection!.connectionHolders!.first.name, ), @@ -224,7 +224,7 @@ class ConsumerBillPaymentsState extends State { // .convert('en-in', item.totalAmountPaid!.toInt()) // .toString()) + // ' only')), - getPrinterlabel( + getPrinterLabel( i18.consumerReciepts.CONSUMER_PENDING_AMOUNT, ('₹' + ((item.totalDue ?? 0) - (item.totalAmountPaid ?? 0)) diff --git a/frontend/mgramseva/lib/providers/collect_payment_provider.dart b/frontend/mgramseva/lib/providers/collect_payment_provider.dart index 4e98c2d0..ed894300 100644 --- a/frontend/mgramseva/lib/providers/collect_payment_provider.dart +++ b/frontend/mgramseva/lib/providers/collect_payment_provider.dart @@ -319,7 +319,7 @@ class CollectPaymentProvider with ChangeNotifier { SizedBox( height: 4, ), - getPrinterlabel( + getPrinterLabel( i18.consumerReciepts.GRAM_PANCHAYAT_WATER_SUPPLY_AND_SANITATION, ""), SizedBox( @@ -330,9 +330,9 @@ class CollectPaymentProvider with ChangeNotifier { ApplicationLocalizations.of(navigatorKey.currentContext!) .translate(commonProvider .userDetails!.selectedtenant!.code!)), - getPrinterlabel(i18.consumerReciepts.RECEIPT_CONSUMER_NO, + getPrinterLabel(i18.consumerReciepts.RECEIPT_CONSUMER_NO, '${CommonMethods.getSplitStings(fetchBill.consumerCode!,16)}'), - getPrinterlabel( + getPrinterLabel( i18.consumerReciepts.RECEIPT_CONSUMER_NAME, '${item.paidBy}', ), @@ -399,7 +399,7 @@ class CollectPaymentProvider with ChangeNotifier { // .convert('en-in', item.totalAmountPaid!.toInt()) // .toString()) + // ' only')), - getPrinterlabel( + getPrinterLabel( i18.consumerReciepts.CONSUMER_PENDING_AMOUNT, ('₹' + ((item.totalDue ?? 0) - (item.totalAmountPaid ?? 0)) diff --git a/frontend/mgramseva/lib/repository/billing_service_repo.dart b/frontend/mgramseva/lib/repository/billing_service_repo.dart index b297fe76..6593b26a 100644 --- a/frontend/mgramseva/lib/repository/billing_service_repo.dart +++ b/frontend/mgramseva/lib/repository/billing_service_repo.dart @@ -37,7 +37,8 @@ class BillingServiceRepository extends BaseService { late DemandList demandList; var res = await makeRequest( url: Url.FETCH_DEMAND, - body: {'RequestInfo': {}}, + requestInfo: getRequestInfo('_search'), + body: {}, queryParameters: queryparams, // requestInfo: getRequestInfo('_search'), method: RequestType.POST); @@ -56,7 +57,8 @@ class BillingServiceRepository extends BaseService { late UpdateDemandList demandList; var res = await makeRequest( url: Url.FETCH_UPDATE_DEMAND, - body: {'RequestInfo': {}, ...body}, + requestInfo: getRequestInfo('_search'), + body: body, queryParameters: queryparams, // requestInfo: getRequestInfo('_search'), method: RequestType.POST); @@ -92,7 +94,8 @@ class BillingServiceRepository extends BaseService { late BillList billList; var res = await makeRequest( url: Url.SEARCH_BILL, - body: {"RequestInfo": {}}, + requestInfo: getRequestInfo('_search'), + body: {}, queryParameters: queryparams, method: RequestType.POST); if (res != null) { @@ -124,7 +127,8 @@ class BillingServiceRepository extends BaseService { late BillPayments billPaymentList; var res = await makeRequest( url: Url.FETCH_BILL_PAYMENTS, - body: {"RequestInfo": {}}, + requestInfo: getRequestInfo('_search'), + body: {}, queryParameters: queryparams, method: RequestType.POST); if (res != null) { @@ -140,15 +144,7 @@ class BillingServiceRepository extends BaseService { url: Url.FETCH_FILESTORE_ID_PDF_SERVICE, body: body, queryParameters: params, - requestInfo: RequestInfo( - APIConstants.API_MODULE_NAME, - APIConstants.API_VERSION, - APIConstants.API_TS, - "_create", - APIConstants.API_DID, - APIConstants.API_KEY, - "string|" + 'en_IN', - ""), + requestInfo: getRequestInfo('_create'), method: RequestType.POST); if (res != null) { billPaymentpdf = PDFServiceResponse.fromJson(res); diff --git a/frontend/mgramseva/lib/repository/expenses_repo.dart b/frontend/mgramseva/lib/repository/expenses_repo.dart index 478bb879..cf3e4721 100644 --- a/frontend/mgramseva/lib/repository/expenses_repo.dart +++ b/frontend/mgramseva/lib/repository/expenses_repo.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:mgramseva/model/expenses_details/expenses_details.dart'; import 'package:mgramseva/model/expenses_details/vendor.dart'; import 'package:mgramseva/providers/common_provider.dart'; diff --git a/frontend/mgramseva/lib/screeens/consumer_details/consumer_details.dart b/frontend/mgramseva/lib/screeens/consumer_details/consumer_details.dart index 8d9a6610..751756cf 100644 --- a/frontend/mgramseva/lib/screeens/consumer_details/consumer_details.dart +++ b/frontend/mgramseva/lib/screeens/consumer_details/consumer_details.dart @@ -30,6 +30,7 @@ import 'package:mgramseva/widgets/footer.dart'; import 'package:mgramseva/widgets/help.dart'; import 'package:provider/provider.dart'; +import '../../providers/language.dart'; import '../../utils/notifiers.dart'; import '../../widgets/bottom_button_bar.dart'; import '../../widgets/custom_app_bar.dart'; diff --git a/frontend/mgramseva/lib/screeens/gpwsc_details/gpwsc_details.dart b/frontend/mgramseva/lib/screeens/gpwsc_details/gpwsc_details.dart index 8dc2661d..93f50450 100644 --- a/frontend/mgramseva/lib/screeens/gpwsc_details/gpwsc_details.dart +++ b/frontend/mgramseva/lib/screeens/gpwsc_details/gpwsc_details.dart @@ -40,7 +40,7 @@ class _GpwscDetails extends State var departmentProvider = Provider.of( navigatorKey.currentContext!, listen: false); - departmentProvider.getDepartments(); + // departmentProvider.getDepartments(); departmentProvider.getBillingSlabs(); } @@ -76,7 +76,7 @@ class _GpwscDetails extends State controller: scrollController, child: Column( children: [ - GPWSCBoundaryDetailCard(), + // GPWSCBoundaryDetailCard(), SizedBox( height: 10, ), diff --git a/frontend/mgramseva/lib/utils/constants.dart b/frontend/mgramseva/lib/utils/constants.dart index 6d983c4e..534b7751 100644 --- a/frontend/mgramseva/lib/utils/constants.dart +++ b/frontend/mgramseva/lib/utils/constants.dart @@ -100,11 +100,11 @@ class Constants { (i18.dashboard.CORE_GPWSC_DETAILS_AND_RATE_INFO), HomeIcons.gpwscdetails, Routes.GPWSC_DETAILS_AND_RATE_INFO, {}), - HomeItem( - "CORE_REPORTS", - (i18.dashboard.CORE_REPORTS), - Icons.assessment, - Routes.REPORTS, {}), + // HomeItem( + // "CORE_REPORTS", + // (i18.dashboard.CORE_REPORTS), + // Icons.assessment, + // Routes.REPORTS, {}), ]; static List SERVICECATEGORY = [