diff --git a/frontend/mgramseva/.gitignore b/frontend/mgramseva/.gitignore index def354f06..23774e411 100644 --- a/frontend/mgramseva/.gitignore +++ b/frontend/mgramseva/.gitignore @@ -33,7 +33,6 @@ lib/env/ /build/ # Web related -lib/generated_plugin_registrant.dart # Symbolication related app.*.symbols diff --git a/frontend/mgramseva/android/app/build.gradle b/frontend/mgramseva/android/app/build.gradle index c4c6a7af2..5fadb8b39 100644 --- a/frontend/mgramseva/android/app/build.gradle +++ b/frontend/mgramseva/android/app/build.gradle @@ -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 diff --git a/frontend/mgramseva/devtools_options.yaml b/frontend/mgramseva/devtools_options.yaml new file mode 100644 index 000000000..7e7e7f67d --- /dev/null +++ b/frontend/mgramseva/devtools_options.yaml @@ -0,0 +1 @@ +extensions: diff --git a/frontend/mgramseva/lib/components/house_connection_and_bill/generate_new_bill.dart b/frontend/mgramseva/lib/components/house_connection_and_bill/generate_new_bill.dart index 44b036c58..779c5ff78 100644 --- a/frontend/mgramseva/lib/components/house_connection_and_bill/generate_new_bill.dart +++ b/frontend/mgramseva/lib/components/house_connection_and_bill/generate_new_bill.dart @@ -1,3 +1,6 @@ +import 'dart:convert'; +import 'dart:developer'; + import 'package:flutter/material.dart'; import 'package:mgramseva/model/connection/water_connection.dart'; import 'package:mgramseva/model/demand/demand_list.dart'; @@ -53,7 +56,7 @@ class _GenerateNewBillState extends State { if (demandList.demands!.isNotEmpty) { int? num = demandList.demands?.first.auditDetails?.createdTime; var houseHoldProvider = - Provider.of(context, listen: false); + Provider.of(context, listen: false); return LayoutBuilder(builder: (context, constraints) { return Column( children: [ @@ -85,35 +88,24 @@ class _GenerateNewBillState extends State { Padding( padding: EdgeInsets.all(16), child: Text( - DateTime.now() - .difference(DateTime - .fromMillisecondsSinceEpoch( - num!)) - .inDays == - 0 - ? ApplicationLocalizations.of(context) - .translate(i18 - .generateBillDetails.TODAY) + DateTime.now().difference(DateTime.fromMillisecondsSinceEpoch(num!)).inDays == 0 + ? ApplicationLocalizations.of(context).translate( + i18.generateBillDetails.TODAY) : DateTime.now() - .difference( - DateTime.fromMillisecondsSinceEpoch( - num)) + .difference(DateTime.fromMillisecondsSinceEpoch( + num)) .inDays .toString() + - " " + (DateTime.now() - .difference( - DateTime.fromMillisecondsSinceEpoch( - num)) - .inDays - .toString() == '1' ? - ApplicationLocalizations.of(context) - .translate(i18 - .generateBillDetails - .DAY_AGO) : - ApplicationLocalizations.of(context) - .translate(i18 - .generateBillDetails - .DAYS_AGO)), + " " + + (DateTime.now().difference(DateTime.fromMillisecondsSinceEpoch(num)).inDays.toString() == '1' + ? ApplicationLocalizations.of(context) + .translate(i18 + .generateBillDetails + .DAY_AGO) + : ApplicationLocalizations.of(context) + .translate(i18 + .generateBillDetails + .DAYS_AGO)), style: TextStyle( color: Theme.of(context).primaryColor), @@ -137,39 +129,107 @@ class _GenerateNewBillState extends State { .meterReading .toString(), context), - if(CommonProvider.getPenaltyOrAdvanceStatus(widget.waterConnection?.mdmsData, false) && !houseHoldProvider.isfirstdemand && - widget.demandList.demands?.first.demandDetails?.first.taxHeadMasterCode != 'WS_ADVANCE_CARRYFORWARD' - && widget.demandList.demands?.first.demandDetails?.first.taxHeadMasterCode != 'WS_TIME_PENALTY') + if (CommonProvider.getPenaltyOrAdvanceStatus( + widget.waterConnection?.mdmsData, false) && + !houseHoldProvider.isfirstdemand && + widget.demandList.demands?.first.demandDetails + ?.first.taxHeadMasterCode != + 'WS_ADVANCE_CARRYFORWARD' && + widget.demandList.demands?.first.demandDetails + ?.first.taxHeadMasterCode != + 'WS_TIME_PENALTY') _getLabelText( 'WS_${widget.demandList.demands?.first.demandDetails?.first.taxHeadMasterCode}', - ('₹' + ((widget.demandList.demands?.first.demandDetails?.first.taxAmount ?? 0) - (widget.demandList.demands?.first.demandDetails?.first.collectionAmount ?? 0)).toString()), + ('₹' + + ((widget + .demandList + .demands + ?.first + .demandDetails + ?.first + .taxAmount ?? + 0) - + (widget + .demandList + .demands + ?.first + .demandDetails + ?.first + .collectionAmount ?? + 0)) + .toString()), context), - if(!houseHoldProvider.isfirstdemand && widget.demandList.demands?.first.demandDetails?.first.taxHeadMasterCode == 'WS_TIME_PENALTY') + if (!houseHoldProvider.isfirstdemand && + widget.demandList.demands?.first.demandDetails + ?.first.taxHeadMasterCode == + 'WS_TIME_PENALTY') _getLabelText( i18.billDetails.WS_10201, - ('₹' + (CommonProvider.getPenaltyApplicable(widget.demandList.demands).penaltyApplicable).toString()), + ('₹' + + (CommonProvider.getPenaltyApplicable( + widget.demandList.demands) + .penaltyApplicable) + .toString()), context), - if(!houseHoldProvider.isfirstdemand && widget.demandList.demands?.first.demandDetails?.first.taxHeadMasterCode == 'WS_TIME_PENALTY') + if (!houseHoldProvider.isfirstdemand && + widget.demandList.demands?.first.demandDetails + ?.first.taxHeadMasterCode == + 'WS_TIME_PENALTY') _getLabelText( i18.billDetails.WS_10102, - ('₹' + (CommonProvider.getArrearsAmount(widget.demandList.demands ?? [])).toString()), + ('₹' + + (CommonProvider.getArrearsAmount( + widget.demandList.demands ?? [])) + .toString()), context), - if(!houseHoldProvider.isfirstdemand && widget.demandList.demands?.first.demandDetails?.first.taxHeadMasterCode == '10201' - && CommonProvider.getArrearsAmount(widget.demandList.demands ?? []) > 0) + if (!houseHoldProvider.isfirstdemand && + widget.demandList.demands?.first.demandDetails + ?.first.taxHeadMasterCode == + '10201' && + CommonProvider.getArrearsAmount( + widget.demandList.demands ?? []) > + 0) _getLabelText( 'WS_${widget.demandList.demands?.first.demandDetails?.last.taxHeadMasterCode}', - ('₹' + ((widget.demandList.demands?.first.demandDetails?.last.taxAmount ?? 0) - (widget.demandList.demands?.first.demandDetails?.last.collectionAmount ?? 0)).toString()), + ('₹' + + ((widget + .demandList + .demands + ?.first + .demandDetails + ?.last + .taxAmount ?? + 0) - + (widget + .demandList + .demands + ?.first + .demandDetails + ?.last + .collectionAmount ?? + 0)) + .toString()), context), - !houseHoldProvider.isfirstdemand && getPendingAmount > 0 ? - _getLabelText( - i18.billDetails.TOTAL_AMOUNT, - ('₹' + - CommonProvider.getTotalBillAmount(widget.demandList.demands ?? []).toString()), - context) - : _getLabelText( getPendingAmount >= 0 ? i18.generateBillDetails.PENDING_AMOUNT : i18.common.ADVANCE_AVAILABLE, - ('₹' + (getPendingAmount >= 0 ? getPendingAmount : getPendingAmount.abs()).toString()), context), + !houseHoldProvider.isfirstdemand && getPendingAmount > 0 + ? _getLabelText( + i18.billDetails.TOTAL_AMOUNT, + ('₹' + + CommonProvider.getTotalBillAmount( + widget.demandList.demands ?? []) + .toString()), + context) + : _getLabelText( + getPendingAmount >= 0 + ? i18.generateBillDetails.PENDING_AMOUNT + : i18.common.ADVANCE_AVAILABLE, + ('₹' + + (getPendingAmount >= 0 + ? getPendingAmount + : getPendingAmount.abs()) + .toString()), + context), houseHoldProvider.isfirstdemand == false && - getPendingAmount > 0 + getPendingAmount > 0 ? new Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, @@ -188,8 +248,15 @@ class _GenerateNewBillState extends State { children: [ Expanded( child: OutlinedButton.icon( - onPressed: widget.waterConnection?.status == Constants.CONNECTION_STATUS.first ? null : () => - Navigator.pushNamed(context, + onPressed: widget + .waterConnection + ?.status == + Constants + .CONNECTION_STATUS + .first + ? null + : () => Navigator.pushNamed( + context, Routes.BILL_GENERATE, arguments: widget .waterConnection), @@ -214,7 +281,7 @@ class _GenerateNewBillState extends State { icon: Text(""), label: Padding( padding: const EdgeInsets - .symmetric( + .symmetric( vertical: 15), child: Text( ApplicationLocalizations @@ -244,11 +311,14 @@ class _GenerateNewBillState extends State { ) : ShortButton( i18.generateBillDetails.GENERATE_NEW_BTN_LABEL, - widget.waterConnection?.status == Constants.CONNECTION_STATUS.first ? null : () => { - Navigator.pushNamed( - context, Routes.BILL_GENERATE, - arguments: widget.waterConnection) - }), + widget.waterConnection?.status == + Constants.CONNECTION_STATUS.first + ? null + : () => { + Navigator.pushNamed( + context, Routes.BILL_GENERATE, + arguments: widget.waterConnection) + }), SizedBox( height: 10, ) @@ -280,6 +350,8 @@ class _GenerateNewBillState extends State { } double get getPendingAmount { - return widget.waterConnection!.fetchBill!.bill!.isNotEmpty ? (widget.waterConnection?.fetchBill?.bill?.first.totalAmount ?? 0) : 0; + return widget.waterConnection!.fetchBill!.bill!.isNotEmpty + ? (widget.waterConnection?.fetchBill?.bill?.first.totalAmount ?? 0) + : 0; } } diff --git a/frontend/mgramseva/lib/components/house_connection_and_bill/new_consumer_bill.dart b/frontend/mgramseva/lib/components/house_connection_and_bill/new_consumer_bill.dart index a57411937..71b4f3a55 100644 --- a/frontend/mgramseva/lib/components/house_connection_and_bill/new_consumer_bill.dart +++ b/frontend/mgramseva/lib/components/house_connection_and_bill/new_consumer_bill.dart @@ -1,3 +1,5 @@ +import 'dart:convert'; +import 'dart:developer'; import 'package:flutter/material.dart'; import 'package:mgramseva/model/bill/billing.dart'; @@ -5,6 +7,7 @@ import 'package:mgramseva/model/connection/water_connection.dart'; import 'package:mgramseva/model/demand/demand_list.dart'; import 'package:mgramseva/providers/common_provider.dart'; import 'package:mgramseva/providers/household_details_provider.dart'; +import 'package:mgramseva/repository/pdf_repository.dart'; import 'package:mgramseva/routers/routers.dart'; import 'package:mgramseva/utils/constants/i18_key_constants.dart'; import 'package:mgramseva/utils/date_formats.dart'; @@ -23,7 +26,8 @@ class NewConsumerBill extends StatefulWidget { final WaterConnection? waterConnection; final List demandList; - const NewConsumerBill(this.mode, this.status, this.waterConnection, this.demandList); + const NewConsumerBill( + this.mode, this.status, this.waterConnection, this.demandList); @override State createState() { return NewConsumerBillState(); @@ -34,8 +38,17 @@ class NewConsumerBillState extends State { @override void initState() { super.initState(); - } + WidgetsBinding.instance.addPostFrameCallback((timeStamp) { + // var houseHoldProvider = + // Provider.of(context, listen: false); + + // if (houseHoldProvider.isfirstdemand && + // widget.waterConnection?.connectionType != 'Metered') { + // createPDFInitCall(); + // } + }); + } static getLabelText(label, value, context, {subLabel = ''}) { return Container( @@ -52,27 +65,34 @@ class NewConsumerBillState extends State { children: [ Text( ApplicationLocalizations.of(context).translate(label), - style: TextStyle(fontSize: 16, fontWeight: FontWeight.w700), + style: TextStyle( + fontSize: 16, fontWeight: FontWeight.w700), textAlign: TextAlign.start, ), subLabel?.trim?.toString() != '' - ? Text( subLabel, - style: TextStyle(fontSize: 14, fontWeight: FontWeight.w400, - color: Theme.of(context).primaryColorLight), - ) : Text('') + ? Text( + subLabel, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w400, + color: Theme.of(context).primaryColorLight), + ) + : Text('') ])), - Text(value, - style: TextStyle(fontSize: 16, fontWeight: FontWeight.w400), - textAlign: TextAlign.center,) + Text( + value, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w400), + textAlign: TextAlign.center, + ) ], ))); } - static getDueDatePenalty(dueDate, BuildContext context){ + static getDueDatePenalty(dueDate, BuildContext context) { late String localizationText; - localizationText = '${ApplicationLocalizations.of(context).translate(i18.billDetails.CORE_PAID_AFTER)}'; - localizationText = localizationText.replaceFirst( - '{dueDate}', dueDate); + localizationText = + '${ApplicationLocalizations.of(context).translate(i18.billDetails.CORE_PAID_AFTER)}'; + localizationText = localizationText.replaceFirst('{dueDate}', dueDate); return localizationText; } @@ -82,20 +102,22 @@ class NewConsumerBillState extends State { } buildBillView(BillList billList) { + var houseHoldProvider = + Provider.of(context, listen: false); var commonProvider = Provider.of(context, listen: false); - var penalty = billList.bill!.isEmpty ? Penalty(0.0, '0', false) : CommonProvider.getPenalty(widget.waterConnection?.demands); - var penaltyApplicable = billList.bill!.isEmpty ? PenaltyApplicable(0.0) : CommonProvider.getPenaltyApplicable(widget.demandList); + var penalty = billList.bill!.isEmpty + ? Penalty(0.0, '0', false) + : CommonProvider.getPenalty(widget.waterConnection?.demands); + // var penaltyApplicable = billList.bill!.isEmpty + // ? PenaltyApplicable(0.0) + // : CommonProvider.getPenaltyApplicable(widget.demandList); return LayoutBuilder(builder: (context, constraints) { - var houseHoldProvider = - Provider.of(context, listen: false); + // Handler Status return billList.bill!.isEmpty - ? - Text("") - : - showBill(widget.demandList) - ? - houseHoldProvider.isfirstdemand == false && + ? Text("") + : showBill(widget.demandList) + ? houseHoldProvider.isfirstdemand == false && widget.mode != 'collect' ? Text("") : Column( @@ -118,26 +140,10 @@ class NewConsumerBillState extends State { ? true : false, child: TextButton.icon( - onPressed: () => commonProvider - .getFileFromPDFBillService( - { - "Bill": [billList.bill?.first] - }, - { - "key": widget.waterConnection - ?.connectionType == - 'Metered' - ? "ws-bill" - : "ws-bill-nm", - "tenantId": commonProvider - .userDetails - ?.selectedtenant - ?.code, - }, - billList - .bill!.first.mobileNumber, - billList.bill?.first, - "Download"), + onPressed: () => downloadPdf( + commonProvider, + billList, + houseHoldProvider), icon: Icon(Icons.download_sharp), label: Text( ApplicationLocalizations.of(context) @@ -162,86 +168,208 @@ class NewConsumerBillState extends State { .toString(), context) : Text(""), - if(CommonProvider.getPenaltyOrAdvanceStatus(widget.waterConnection?.mdmsData, false) && !houseHoldProvider.isfirstdemand && widget.demandList.first.demandDetails?.any((e) => e.taxHeadMasterCode == '10201' ) == true ) + if (CommonProvider + .getPenaltyOrAdvanceStatus( + widget.waterConnection + ?.mdmsData, + false) && + !houseHoldProvider.isfirstdemand && + widget.demandList.first.demandDetails + ?.any((e) => + e.taxHeadMasterCode == + '10201') == + true) getLabelText( i18.billDetails.WS_10201, - ('₹' + CommonProvider.getNormalPenalty(widget.demandList).toString()), + ('₹' + + CommonProvider.getNormalPenalty( + widget.demandList) + .toString()), + context), + if (!houseHoldProvider.isfirstdemand && + (billList.bill?.first + .totalAmount ?? + 0) >= + 0) + getLabelText( + houseHoldProvider + .isfirstdemand == + true + ? i18.billDetails.CURRENT_BILL + : i18.billDetails.ARRERS_DUES, + ('₹' + + (houseHoldProvider + .isfirstdemand + ? widget + .demandList + .first + .demandDetails! + .first + .taxAmount + : CommonProvider + .getArrearsAmount( + widget + .demandList)) + .toString()), + context), + // Current Bill + if (houseHoldProvider.isfirstdemand) + getLabelText( + i18.billDetails.CURRENT_BILL, + "₹ ${(houseHoldProvider.aggDemandItems?.currentmonthTotalDue ?? 0.0) + double.parse(CommonProvider.getAdvanceAdjustedAmount(widget.demandList))}", + context), + // Arrear Dues + if (houseHoldProvider.isfirstdemand == + true) + getLabelText( + i18.billDetails.ARRERS_DUES, + "₹ ${houseHoldProvider.aggDemandItems?.totalAreasWithPenalty ?? 0.0}", context), - if(!houseHoldProvider.isfirstdemand && (billList.bill?.first.totalAmount ?? 0) >= 0) getLabelText( - houseHoldProvider.isfirstdemand == - true - ? i18.billDetails.CURRENT_BILL - : i18.billDetails.ARRERS_DUES, - ('₹' + - (houseHoldProvider.isfirstdemand ? widget.demandList.first.demandDetails! - .first.taxAmount : CommonProvider.getArrearsAmount(widget.demandList)) - .toString()), - context), - if(houseHoldProvider.isfirstdemand) getLabelText( - houseHoldProvider.isfirstdemand == - true - ? i18.billDetails.CURRENT_BILL - : i18.billDetails.ARRERS_DUES, - ('₹' + - (houseHoldProvider.isfirstdemand ? widget.demandList.first.demandDetails!.first.taxHeadMasterCode == 'WS_TIME_PENALTY' - ? CommonProvider.getCurrentBill(widget.demandList) - : CommonProvider.checkAdvance(widget.demandList) ? (widget.demandList.first.demandDetails!.first.taxAmount ?? 0) - : ((widget.demandList.first.demandDetails!.first.taxAmount ?? 0) - (widget.demandList.first.demandDetails!.first.collectionAmount ?? 0)) : CommonProvider.getArrearsAmount(widget.demandList)) - .toString()), - context), - if(houseHoldProvider.isfirstdemand == true) - getLabelText( - i18.billDetails.ARRERS_DUES, - ( widget.demandList.first.demandDetails!.first.taxHeadMasterCode == 'WS_TIME_PENALTY' - ? '₹' + CommonProvider.getArrearsAmountOncePenaltyExpires(widget.demandList).toString() : '₹' + CommonProvider.getArrearsAmount(widget.demandList).toString()), - context), - getLabelText( - !houseHoldProvider.isfirstdemand ? ((widget.waterConnection?.fetchBill?.bill?.first.totalAmount ?? 0) >= 0 ? i18.generateBillDetails.PENDING_AMOUNT : i18.common.ADVANCE_AVAILABLE) : i18.billDetails.TOTAL_AMOUNT, - ('₹' + - (!houseHoldProvider.isfirstdemand ? - (widget.waterConnection?.fetchBill?.bill?.first.totalAmount ?? 0).abs() : widget.demandList.first.demandDetails!.first.taxHeadMasterCode == 'WS_TIME_PENALTY' - ? CommonProvider.getCurrentBill(widget.demandList) + CommonProvider.getArrearsAmountOncePenaltyExpires(widget.demandList) : CommonProvider.getTotalBillAmount(widget.demandList)).toString()), - context), - if(CommonProvider.getPenaltyOrAdvanceStatus(widget.waterConnection?.mdmsData, true) && houseHoldProvider.isfirstdemand) getLabelText( - i18.common.CORE_ADVANCE_ADJUSTED, - ((double.parse(CommonProvider.getAdvanceAdjustedAmount(widget.demandList)).abs() != 0.0 - ? '- ₹' + (CommonProvider.getAdvanceAdjustedAmount(widget.demandList)).toString() - : '₹' +(CommonProvider.getAdvanceAdjustedAmount(widget.demandList)).toString())), - context), - if(CommonProvider.getPenaltyOrAdvanceStatus(widget.waterConnection?.mdmsData, false, true) && houseHoldProvider.isfirstdemand && penalty.isDueDateCrossed) getLabelText( - i18.billDetails.CORE_PENALTY, - ('₹' + - penaltyApplicable.penaltyApplicable - .toString()), - context), - if(CommonProvider.getPenaltyOrAdvanceStatus(widget.waterConnection?.mdmsData, true) && houseHoldProvider.isfirstdemand) getLabelText( - i18.common.CORE_NET_DUE_AMOUNT, - ('₹' + - ( CommonProvider.getNetDueAmountWithWithOutPenalty(billList.bill?.first.totalAmount ?? 0, penalty)) - .toString()), - context), - if(CommonProvider.getPenaltyOrAdvanceStatus(widget.waterConnection?.mdmsData, false, true) && houseHoldProvider.isfirstdemand ) CustomDetailsCard( - Column( - children: [ - getLabelText( - i18.billDetails.CORE_PENALTY, - ('₹' + - (penalty.isDueDateCrossed ? penaltyApplicable.penaltyApplicable : penalty.penalty) - .toString()), - context, - subLabel: getDueDatePenalty(penalty.date, context)), - getLabelText( - i18.billDetails.CORE_NET_DUE_AMOUNT_WITH_PENALTY, - ('₹' + - CommonProvider.getNetDueAmountWithWithOutPenalty(billList.bill?.first.totalAmount ?? 0, penalty, true) - .toString()), - context, - subLabel: getDueDatePenalty(penalty.date, context)) + // Total Amount + if (houseHoldProvider.isfirstdemand == + true) + getLabelText( + i18.billDetails.TOTAL_AMOUNT, + "₹ ${(houseHoldProvider.aggDemandItems?.netDueWithPenalty ?? 0.0) + double.parse(CommonProvider.getAdvanceAdjustedAmount(widget.demandList))}", + context), + + // Advance Avaialble + if (houseHoldProvider.aggDemandItems + ?.remainingAdvance != + null && + houseHoldProvider.aggDemandItems + ?.remainingAdvance != + 0 && + !houseHoldProvider.isfirstdemand) + getLabelText( + i18.common.ADVANCE_AVAILABLE, + "${houseHoldProvider.aggDemandItems?.remainingAdvance?.sign == -1 ? "-" : ""} ₹ ${(houseHoldProvider.aggDemandItems?.remainingAdvance?.abs())}", + context), + + // Advance Adjust Amount + if (CommonProvider + .getPenaltyOrAdvanceStatus( + widget.waterConnection + ?.mdmsData, + true) && + houseHoldProvider.isfirstdemand) + getLabelText( + i18.common.CORE_ADVANCE_ADJUSTED, + double.parse(CommonProvider + .getAdvanceAdjustedAmount( + widget + .demandList)) <= + 0 + ? "₹ ${double.parse(CommonProvider.getAdvanceAdjustedAmount(widget.demandList))}" + : '- ₹${double.parse(CommonProvider.getAdvanceAdjustedAmount(widget.demandList))}', + context), + // Net Due Amount + if (CommonProvider + .getPenaltyOrAdvanceStatus( + widget.waterConnection + ?.mdmsData, + true) && + houseHoldProvider.isfirstdemand) + getLabelText( + i18.common.CORE_NET_DUE_AMOUNT, + "${netDueAmount(houseHoldProvider)}", + context), + // if (CommonProvider + // .getPenaltyOrAdvanceStatus( + // widget.waterConnection + // ?.mdmsData, + // false, + // true) && + // houseHoldProvider.isfirstdemand && + // penalty.isDueDateCrossed) + // getLabelText( + // i18.billDetails.CORE_PENALTY, + // ('₹' + + // penaltyApplicable + // .penaltyApplicable + // .toString()), + // context), + // if (CommonProvider + // .getPenaltyOrAdvanceStatus( + // widget.waterConnection + // ?.mdmsData, + // true) && + // houseHoldProvider.isfirstdemand) + //Net due Amount + // getLabelText( + // i18.common.CORE_NET_DUE_AMOUNT, + // ('₹' + + // "${houseHoldProvider.aggDemandItems?.netDueWithPenalty ?? 0.0}" + // .toString()), + // context), + if (CommonProvider + .getPenaltyOrAdvanceStatus( + widget.waterConnection + ?.mdmsData, + false, + true) && + houseHoldProvider.isfirstdemand) + CustomDetailsCard(Column( + children: [ + getLabelText( + i18.billDetails.CORE_PENALTY, + ('₹' + + "${houseHoldProvider.aggDemandItems?.totalApplicablePenalty ?? 0.0}"), + context, + subLabel: getDueDatePenalty( + penalty.date, context)), + getLabelText( + i18.billDetails + .CORE_NET_DUE_AMOUNT_WITH_PENALTY, + ('₹' + + "${(houseHoldProvider.aggDemandItems?.netDueWithPenalty ?? 0.0) + (houseHoldProvider.aggDemandItems?.totalApplicablePenalty ?? 0.0)}"), + // OLD + // CommonProvider + // .getNetDueAmountWithWithOutPenalty( + // billList + // .bill + // ?.first + // .totalAmount ?? + // 0, + // penalty, + // true) + // .toString()), + // OLD + context, + subLabel: getDueDatePenalty( + penalty.date, context)) + ], + )), + + // Total Amount Due + + // if (houseHoldProvider.isfirstdemand) + // getLabelText( + // i18.common.TOTAL_DUE_AMOUNT, + // ('₹' + + // (widget + // .demandList + // .first + // .demandDetails! + // .first + // .taxHeadMasterCode == + // 'WS_TIME_PENALTY' + // ? CommonProvider + // .getCurrentBill( + // widget + // .demandList) + + // CommonProvider + // .getArrearsAmountOncePenaltyExpires( + // widget + // .demandList) + // : CommonProvider + // .getTotalBillAmount( + // widget + // .demandList)) + // .toString()), + // context), - ], - ) - ), widget.mode == 'collect' ? Align( alignment: Alignment.centerLeft, @@ -283,33 +411,49 @@ class NewConsumerBillState extends State { billList.bill! .first, "Share"), - CommonProvider.getPenaltyOrAdvanceStatus(widget.waterConnection?.mdmsData, true) - && CommonProvider.checkAdvance(widget.demandList) - && ( CommonProvider.getNetDueAmountWithWithOutPenalty(billList.bill?.first.totalAmount ?? 0, penalty) == 0) - ? null - : () => - onClickOfCollectPayment( - billList - .bill!, - context)) + CommonProvider.getPenaltyOrAdvanceStatus( + widget + .waterConnection + ?.mdmsData, + true) && + CommonProvider.checkAdvance( + widget.demandList) && + (CommonProvider.getNetDueAmountWithWithOutPenalty(billList.bill?.first.totalAmount ?? 0, penalty) == 0) + ? null + : () => onClickOfCollectPayment(billList.bill!, context)) : Visibility( - visible: (billList.bill?.first.totalAmount ?? 0) > 0, - child: ShortButton( - i18.billDetails - .COLLECT_PAYMENT, - CommonProvider.getPenaltyOrAdvanceStatus(widget.waterConnection?.mdmsData, true) - && CommonProvider.checkAdvance(widget.demandList) - && CommonProvider.getAdvanceAmount(widget.demandList) == 0 - && ( CommonProvider.getNetDueAmountWithWithOutPenalty(billList.bill?.first.totalAmount ?? 0, penalty) == 0) - ? null - : () => - onClickOfCollectPayment( - billList - .bill!, - context)), - )) - : houseHoldProvider.isfirstdemand == - true + visible: (billList + .bill + ?.first + .totalAmount ?? + 0) > + 0, + child: ShortButton( + i18.billDetails + .COLLECT_PAYMENT, + CommonProvider.getPenaltyOrAdvanceStatus( + widget + .waterConnection + ?.mdmsData, + true) && + CommonProvider.checkAdvance( + widget + .demandList) && + CommonProvider.getAdvanceAmount(widget.demandList) == + 0 && + (CommonProvider.getNetDueAmountWithWithOutPenalty( + billList.bill?.first.totalAmount ?? + 0, + penalty) == + 0) + ? null + : () => + onClickOfCollectPayment( + billList + .bill!, + context)), + )) + : houseHoldProvider.isfirstdemand == true ? Container( width: constraints.maxWidth > 760 @@ -347,14 +491,22 @@ class NewConsumerBillState extends State { billList.bill!.first, "Share", ), - style: ElevatedButton.styleFrom(padding:EdgeInsets.symmetric(vertical: 8),alignment: Alignment.center,side:BorderSide( - width: 1, - color: Theme.of(context).disabledColor)), + style: ElevatedButton.styleFrom( + padding: EdgeInsets + .symmetric( + vertical: 8), + alignment: + Alignment.center, + side: BorderSide( + width: 1, + color: Theme.of( + context) + .disabledColor)), icon: (Image.asset( 'assets/png/whats_app.png')), label: Padding( padding: const EdgeInsets - .symmetric( + .symmetric( vertical: 5), child: Text( ApplicationLocalizations @@ -378,6 +530,44 @@ class NewConsumerBillState extends State { }); } + double netDueAmount(HouseHoldProvider houseHoldProvider) { + var data = ((houseHoldProvider.aggDemandItems?.netDueWithPenalty ?? 0.0) + + double.parse( + CommonProvider.getAdvanceAdjustedAmount(widget.demandList))) - + ((double.parse( + CommonProvider.getAdvanceAdjustedAmount(widget.demandList)))); + return data; + } + + void downloadPdf(CommonProvider commonProvider, BillList billList, + HouseHoldProvider houseHoldProvider) async { + if (houseHoldProvider.isfirstdemand) { + await PDFServiceRepository() + .CreatePDF( + houseHoldProvider.createPDFBody, houseHoldProvider.createPDFPrams) + .then((value) async { + commonProvider.getFileFromPDFBillService( + { + "BillAndDemand": { + "Bill": [billList.bill?.first], + "AggregatedDemands": houseHoldProvider.aggDemandItems + } + }, + { + "key": widget.waterConnection?.connectionType == 'Metered' + ? "ws-bill-v2" + : "ws-bill-nm-v2", + "tenantId": commonProvider.userDetails?.selectedtenant?.code, + }, + billList.bill!.first.mobileNumber, + billList.bill?.first, + "Download", + fireStoreId: value?.filestoreIds?.first, + ); + }); + } + } + void onClickOfCollectPayment(List bill, BuildContext context) { var commonProvider = Provider.of(context, listen: false); @@ -385,10 +575,10 @@ class NewConsumerBillState extends State { 'consumerCode': bill.first.consumerCode, 'businessService': bill.first.businessService, 'tenantId': commonProvider.userDetails?.selectedtenant?.code, - 'demandList' : widget.demandList, - 'fetchBill' : bill, + 'demandList': widget.demandList, + 'fetchBill': bill, 'status': widget.status, - 'connectionType':widget.waterConnection?.connectionType + 'connectionType': widget.waterConnection?.connectionType }; Navigator.pushNamed(context, Routes.HOUSEHOLD_DETAILS_COLLECT_PAYMENT, arguments: query); @@ -396,55 +586,70 @@ class NewConsumerBillState extends State { bool showBill(List demandList) { var index = -1; - var houseHoldRegister = Provider.of(context, listen: false); + var houseHoldRegister = + Provider.of(context, listen: false); - demandList = demandList.where((e) => - (!(e.isPaymentCompleted ?? false) && e.status != 'CANCELLED')) + demandList = demandList + .where((e) => + (!(e.isPaymentCompleted ?? false) && e.status != 'CANCELLED')) .toList(); demandList = demandList.map((e) => Demands.fromJson(e.toJson())).toList(); demandList.forEach((e) { - e.demandDetails?.sort((a, b) => a - .auditDetails!.createdTime! - .compareTo(b.auditDetails!.createdTime!)); + e.demandDetails?.sort((a, b) => + a.auditDetails!.createdTime!.compareTo(b.auditDetails!.createdTime!)); }); - if(demandList.isEmpty){ + if (demandList.isEmpty) { return false; - }else if(!houseHoldRegister.isfirstdemand && widget.waterConnection?.connectionType != 'Metered' - && (widget.waterConnection?.fetchBill?.bill?.length) == 0){ + } else if (!houseHoldRegister.isfirstdemand && + widget.waterConnection?.connectionType != 'Metered' && + (widget.waterConnection?.fetchBill?.bill?.length) == 0) { return false; - }else if((widget.waterConnection?.fetchBill?.bill?.length ?? 0) > 0 && (widget.waterConnection?.fetchBill?.bill?.first.totalAmount ?? 0) >= 0){ + } else if ((widget.waterConnection?.fetchBill?.bill?.length ?? 0) > 0 && + (widget.waterConnection?.fetchBill?.bill?.first.totalAmount ?? 0) >= + 0) { return true; } else { - if(demandList.isEmpty) return false; + if (demandList.isEmpty) return false; for (int i = 0; i < demandList.length; i++) { - index = demandList[i].demandDetails?.lastIndexWhere((e) => e - .taxHeadMasterCode == 'WS_ADVANCE_CARRYFORWARD') ?? -1; + index = demandList[i].demandDetails?.lastIndexWhere( + (e) => e.taxHeadMasterCode == 'WS_ADVANCE_CARRYFORWARD') ?? + -1; if (index != -1) { var demandDetail = demandList[i].demandDetails?[index]; - if(demandDetail!.collectionAmount! == demandDetail.taxAmount!){ - if(demandList.first.demandDetails?.last.collectionAmount != 0){ + if (demandDetail!.collectionAmount! == demandDetail.taxAmount!) { + if (demandList.first.demandDetails?.last.collectionAmount != 0) { var list = []; - for(int j = 0; j <= i ; j++){ - for(int k = 0; k < (demandList[j].demandDetails?.length ?? 0); k++) { + for (int j = 0; j <= i; j++) { + for (int k = 0; + k < (demandList[j].demandDetails?.length ?? 0); + k++) { if (k == index && j == i) break; - list.add(demandList[j].demandDetails![k].collectionAmount ?? 0); + list.add( + demandList[j].demandDetails![k].collectionAmount ?? 0); } } - var collectedAmount = list.reduce((a, b) => a+b); - return collectedAmount == demandDetail.collectionAmount?.abs(); + var collectedAmount = list.reduce((a, b) => a + b); + return collectedAmount == demandDetail.collectionAmount?.abs(); } - }else if(demandDetail.taxAmount! < demandDetail.collectionAmount!){ - return true; - } + } else if (demandDetail.taxAmount! < demandDetail.collectionAmount!) { + return true; + } else if ((houseHoldRegister.aggDemandItems?.remainingAdvance ?? + 0) == + 0) { + return false; + } else if (((houseHoldRegister.aggDemandItems?.remainingAdvance ?? + 0) != + 0)) { + return true; + } } } } return false; } - } diff --git a/frontend/mgramseva/lib/env/app_config.dart b/frontend/mgramseva/lib/env/app_config.dart index a5dc5ba55..94253b5b1 100644 --- a/frontend/mgramseva/lib/env/app_config.dart +++ b/frontend/mgramseva/lib/env/app_config.dart @@ -45,7 +45,7 @@ class FirebaseConfigurations { static const _authDomain = "mgramseva-qa.egov.org.in"; static const _projectId = "sample-mgramseva"; static const _storageBucket = "sample-mgramseva.appspot.com"; - static const _messagingSenderId ="1026518772539"; + static const _messagingSenderId = "1026518772539"; static const _appId = "1:1026518772539:android:bfa7ff7ef250f28789251e"; //Make some getter functions @@ -56,5 +56,11 @@ class FirebaseConfigurations { String get messagingSenderId => _messagingSenderId; String get appId => _appId; - static FirebaseOptions get firebaseOptions => FirebaseOptions(apiKey: _apiKey, appId: _appId, messagingSenderId: _messagingSenderId, projectId: _projectId, storageBucket: _storageBucket, authDomain: _authDomain); + static FirebaseOptions get firebaseOptions => FirebaseOptions( + apiKey: _apiKey, + appId: _appId, + messagingSenderId: _messagingSenderId, + projectId: _projectId, + storageBucket: _storageBucket, + authDomain: _authDomain); } diff --git a/frontend/mgramseva/lib/main.dart b/frontend/mgramseva/lib/main.dart index eb9e13865..8a12efb3d 100644 --- a/frontend/mgramseva/lib/main.dart +++ b/frontend/mgramseva/lib/main.dart @@ -74,14 +74,13 @@ void main() { WidgetsFlutterBinding.ensureInitialized(); await dotenv.load(fileName: 'assets/.env'); - if(kIsWeb){ - await Firebase.initializeApp(options: FirebaseConfigurations.firebaseOptions); - }else{ + if (kIsWeb) { + await Firebase.initializeApp( + options: FirebaseConfigurations.firebaseOptions); + } else { await Firebase.initializeApp(); } - if (Firebase.apps.length == 0) { - - } + if (Firebase.apps.length == 0) {} if (!kIsWeb) { await FlutterDownloader.initialize( @@ -136,9 +135,9 @@ class _MyAppState extends State { IsolateNameServer.removePortNameMapping('downloader_send_port'); super.dispose(); } + @pragma('vm:entry-point') - static void downloadCallback( - String id, int status, int progress) { + static void downloadCallback(String id, int status, int progress) { final SendPort send = IsolateNameServer.lookupPortByName('downloader_send_port')!; @@ -156,7 +155,8 @@ class _MyAppState extends State { // print("Download progress: "+progress.toString()); if (status == DownloadTaskStatus.complete) { if (CommonProvider.downloadUrl.containsKey(id)) { - if (CommonProvider.downloadUrl[id] != null) OpenFilex.open(CommonProvider.downloadUrl[id] ?? ''); + if (CommonProvider.downloadUrl[id] != null) + OpenFilex.open(CommonProvider.downloadUrl[id] ?? ''); CommonProvider.downloadUrl.remove(id); } else if (status == DownloadTaskStatus.failed || status == DownloadTaskStatus.canceled || @@ -286,8 +286,7 @@ class _LandingPageState extends State { commonProvider.getLoginCredentials(); await commonProvider.getAppVersionDetails(); if (!kIsWeb) - CommonMethods() - .checkVersion(context, commonProvider.appVersion!); + CommonMethods().checkVersion(context, commonProvider.appVersion!); } @override diff --git a/frontend/mgramseva/lib/model/bill/bill_generation_details/bill_generation_details.g.dart b/frontend/mgramseva/lib/model/bill/bill_generation_details/bill_generation_details.g.dart index 1d019dd28..707400d5e 100644 --- a/frontend/mgramseva/lib/model/bill/bill_generation_details/bill_generation_details.g.dart +++ b/frontend/mgramseva/lib/model/bill/bill_generation_details/bill_generation_details.g.dart @@ -7,30 +7,29 @@ part of 'bill_generation_details.dart'; // ************************************************************************** BillGenerationDetails _$BillGenerationDetailsFromJson( - Map json) { - return BillGenerationDetails() - ..tenantId = json['tenantId'] as String? - ..currentReading = json['currentReading'] as int? - ..currentReadingDate = json['currentReadingDate'] as int? - ..connectionNo = json['connectionNo'] as String? - ..billingPeriod = json['billingPeriod'] as String? - ..lastReading = json['lastReading'] as int? - ..meterStatus = json['meterStatus'] as String? - ..lastReadingDate = json['lastReadingDate'] as int? - ..generateDemand = json['generateDemand'] as bool? - ..connectionCategory = json['connectionCategory'] as String? - ..serviceCat = json['serviceCat'] as String? - ..serviceType = json['serviceType'] as String? - ..propertyType = json['propertyType'] as String? - ..billYear = json['billYear'] == null - ? null - : TaxPeriod.fromJson(json['billYear'] as Map) - ..billCycle = json['billCycle'] as String? - ..meterNumber = json['meterNumber'] as String? - ..oldMeterReading = json['oldMeterReading'] as String? - ..newMeterReading = json['newMeterReading'] as String? - ..meterReadingDate = json['meterReadingDate'] as int?; -} + Map json) => + BillGenerationDetails() + ..tenantId = json['tenantId'] as String? + ..currentReading = json['currentReading'] as int? + ..currentReadingDate = json['currentReadingDate'] as int? + ..connectionNo = json['connectionNo'] as String? + ..billingPeriod = json['billingPeriod'] as String? + ..lastReading = json['lastReading'] as int? + ..meterStatus = json['meterStatus'] as String? + ..lastReadingDate = json['lastReadingDate'] as int? + ..generateDemand = json['generateDemand'] as bool? + ..connectionCategory = json['connectionCategory'] as String? + ..serviceCat = json['serviceCat'] as String? + ..serviceType = json['serviceType'] as String? + ..propertyType = json['propertyType'] as String? + ..billYear = json['billYear'] == null + ? null + : TaxPeriod.fromJson(json['billYear'] as Map) + ..billCycle = json['billCycle'] as String? + ..meterNumber = json['meterNumber'] as String? + ..oldMeterReading = json['oldMeterReading'] as String? + ..newMeterReading = json['newMeterReading'] as String? + ..meterReadingDate = json['meterReadingDate'] as int?; Map _$BillGenerationDetailsToJson( BillGenerationDetails instance) => diff --git a/frontend/mgramseva/lib/model/bill/bill_payments.g.dart b/frontend/mgramseva/lib/model/bill/bill_payments.g.dart index 167dde568..6c26782b8 100644 --- a/frontend/mgramseva/lib/model/bill/bill_payments.g.dart +++ b/frontend/mgramseva/lib/model/bill/bill_payments.g.dart @@ -6,46 +6,42 @@ part of 'bill_payments.dart'; // JsonSerializableGenerator // ************************************************************************** -BillPayments _$BillPaymentsFromJson(Map json) { - return BillPayments() - ..payments = (json['Payments'] as List?) - ?.map((e) => Payments.fromJson(e as Map)) - .toList(); -} +BillPayments _$BillPaymentsFromJson(Map json) => BillPayments() + ..payments = (json['Payments'] as List?) + ?.map((e) => Payments.fromJson(e as Map)) + .toList(); Map _$BillPaymentsToJson(BillPayments instance) => { 'Payments': instance.payments, }; -Payments _$PaymentsFromJson(Map json) { - return Payments() - ..id = json['id'] as String? - ..tenantId = json['tenantId'] as String? - ..totalDue = (json['totalDue'] as num?)?.toDouble() - ..totalAmountPaid = (json['totalAmountPaid'] as num?)?.toDouble() - ..transactionNumber = json['transactionNumber'] as String? - ..transactionDate = json['transactionDate'] as int? - ..paymentMode = json['paymentMode'] as String? - ..instrumentDate = json['instrumentDate'] as int? - ..instrumentNumber = json['instrumentNumber'] as String? - ..instrumentStatus = json['instrumentStatus'] as String? - ..ifscCode = json['ifscCode'] as String? - ..auditDetails = json['auditDetails'] == null - ? null - : AuditDetails.fromJson(json['auditDetails'] as Map) - ..paymentDetails = (json['paymentDetails'] as List?) - ?.map((e) => PaymentDetails.fromJson(e as Map)) - .toList() - ..paidBy = json['paidBy'] as String? - ..mobileNumber = json['mobileNumber'] as String? - ..payerName = json['payerName'] as String? - ..payerAddress = json['payerAddress'] as String? - ..payerEmail = json['payerEmail'] as String? - ..payerId = json['payerId'] as String? - ..paymentStatus = json['paymentStatus'] as String? - ..fileStoreId = json['fileStoreId'] as String?; -} +Payments _$PaymentsFromJson(Map json) => Payments() + ..id = json['id'] as String? + ..tenantId = json['tenantId'] as String? + ..totalDue = (json['totalDue'] as num?)?.toDouble() + ..totalAmountPaid = (json['totalAmountPaid'] as num?)?.toDouble() + ..transactionNumber = json['transactionNumber'] as String? + ..transactionDate = json['transactionDate'] as int? + ..paymentMode = json['paymentMode'] as String? + ..instrumentDate = json['instrumentDate'] as int? + ..instrumentNumber = json['instrumentNumber'] as String? + ..instrumentStatus = json['instrumentStatus'] as String? + ..ifscCode = json['ifscCode'] as String? + ..auditDetails = json['auditDetails'] == null + ? null + : AuditDetails.fromJson(json['auditDetails'] as Map) + ..paymentDetails = (json['paymentDetails'] as List?) + ?.map((e) => PaymentDetails.fromJson(e as Map)) + .toList() + ..paidBy = json['paidBy'] as String? + ..mobileNumber = json['mobileNumber'] as String? + ..payerName = json['payerName'] as String? + ..payerAddress = json['payerAddress'] as String? + ..payerEmail = json['payerEmail'] as String? + ..payerId = json['payerId'] as String? + ..paymentStatus = json['paymentStatus'] as String? + ..fileStoreId = json['fileStoreId'] as String?; Map _$PaymentsToJson(Payments instance) => { 'id': instance.id, @@ -71,13 +67,11 @@ Map _$PaymentsToJson(Payments instance) => { 'fileStoreId': instance.fileStoreId, }; -AuditDetails _$AuditDetailsFromJson(Map json) { - return AuditDetails() - ..createdBy = json['id'] as String? - ..createdTime = json['createdTime'] as int? - ..lastModifiedBy = json['lastModifiedBy'] as String? - ..lastModifiedTime = json['lastModifiedTime'] as int?; -} +AuditDetails _$AuditDetailsFromJson(Map json) => AuditDetails() + ..createdBy = json['id'] as String? + ..createdTime = json['createdTime'] as int? + ..lastModifiedBy = json['lastModifiedBy'] as String? + ..lastModifiedTime = json['lastModifiedTime'] as int?; Map _$AuditDetailsToJson(AuditDetails instance) => { @@ -87,27 +81,26 @@ Map _$AuditDetailsToJson(AuditDetails instance) => 'lastModifiedTime': instance.lastModifiedTime, }; -PaymentDetails _$PaymentDetailsFromJson(Map json) { - return PaymentDetails() - ..paymentId = json['paymentId'] as String? - ..id = json['id'] as String? - ..tenantId = json['tenantId'] as String? - ..totalDue = (json['totalDue'] as num?)?.toDouble() - ..totalAmountPaid = (json['totalAmountPaid'] as num?)?.toDouble() - ..receiptNumber = json['receiptNumber'] as String? - ..manualReceiptNumber = json['manualReceiptNumber'] as String? - ..manualReceiptDate = json['manualReceiptDate'] as int? - ..receiptDate = json['receiptDate'] as int? - ..receiptType = json['receiptType'] as String? - ..businessService = json['businessService'] as String? - ..billId = json['billId'] as String? - ..bill = json['bill'] == null - ? null - : Bill.fromJson(json['bill'] as Map) - ..auditDetails = json['auditDetails'] == null - ? null - : AuditDetails.fromJson(json['auditDetails'] as Map); -} +PaymentDetails _$PaymentDetailsFromJson(Map json) => + PaymentDetails() + ..paymentId = json['paymentId'] as String? + ..id = json['id'] as String? + ..tenantId = json['tenantId'] as String? + ..totalDue = (json['totalDue'] as num?)?.toDouble() + ..totalAmountPaid = (json['totalAmountPaid'] as num?)?.toDouble() + ..receiptNumber = json['receiptNumber'] as String? + ..manualReceiptNumber = json['manualReceiptNumber'] as String? + ..manualReceiptDate = json['manualReceiptDate'] as int? + ..receiptDate = json['receiptDate'] as int? + ..receiptType = json['receiptType'] as String? + ..businessService = json['businessService'] as String? + ..billId = json['billId'] as String? + ..bill = json['bill'] == null + ? null + : Bill.fromJson(json['bill'] as Map) + ..auditDetails = json['auditDetails'] == null + ? null + : AuditDetails.fromJson(json['auditDetails'] as Map); Map _$PaymentDetailsToJson(PaymentDetails instance) => { diff --git a/frontend/mgramseva/lib/model/bill/billing.g.dart b/frontend/mgramseva/lib/model/bill/billing.g.dart index b466d7c2b..6f571fda9 100644 --- a/frontend/mgramseva/lib/model/bill/billing.g.dart +++ b/frontend/mgramseva/lib/model/bill/billing.g.dart @@ -6,49 +6,45 @@ part of 'billing.dart'; // JsonSerializableGenerator // ************************************************************************** -BillList _$BillListFromJson(Map json) { - return BillList() - ..bill = (json['Bill'] as List?) - ?.map((e) => Bill.fromJson(e as Map)) - .toList(); -} +BillList _$BillListFromJson(Map json) => BillList() + ..bill = (json['Bill'] as List?) + ?.map((e) => Bill.fromJson(e as Map)) + .toList(); Map _$BillListToJson(BillList instance) => { 'Bill': instance.bill, }; -Bill _$BillFromJson(Map json) { - return Bill() - ..id = json['id'] as String? - ..mobileNumber = json['mobileNumber'] as String? - ..payerName = json['payerName'] as String? - ..payerAddress = json['payerAddress'] as String? - ..payerEmail = json['payerEmail'] as String? - ..status = json['status'] as String? - ..totalAmount = (json['totalAmount'] as num?)?.toDouble() - ..penalty = (json['penalty'] as num?)?.toDouble() - ..netAmountDueWithPenalty = - (json['netAmountDueWithPenalty'] as num?)?.toDouble() - ..businessService = json['businessService'] as String? - ..billNumber = json['billNumber'] as String? - ..billDate = json['billDate'] as int? - ..consumerCode = json['consumerCode'] as String? - ..billDetails = (json['billDetails'] as List?) - ?.map((e) => BillDetails.fromJson(e as Map)) - .toList() - ..tenantId = json['tenantId'] as String? - ..fileStoreId = json['fileStoreId'] as String? - ..auditDetails = json['auditDetails'] == null - ? null - : AuditDetails.fromJson(json['auditDetails'] as Map) - ..meterReadings = (json['meterReadings'] as List?) - ?.map((e) => MeterReadings.fromJson(e as Map)) - .toList() - ..waterConnection = json['waterconnection'] == null - ? null - : WaterConnection.fromJson( - json['waterconnection'] as Map); -} +Bill _$BillFromJson(Map json) => Bill() + ..id = json['id'] as String? + ..mobileNumber = json['mobileNumber'] as String? + ..payerName = json['payerName'] as String? + ..payerAddress = json['payerAddress'] as String? + ..payerEmail = json['payerEmail'] as String? + ..status = json['status'] as String? + ..totalAmount = (json['totalAmount'] as num?)?.toDouble() + ..penalty = (json['penalty'] as num?)?.toDouble() + ..netAmountDueWithPenalty = + (json['netAmountDueWithPenalty'] as num?)?.toDouble() + ..businessService = json['businessService'] as String? + ..billNumber = json['billNumber'] as String? + ..billDate = (json['billDate'] as num?)?.toInt() + ..consumerCode = json['consumerCode'] as String? + ..billDetails = (json['billDetails'] as List?) + ?.map((e) => BillDetails.fromJson(e as Map)) + .toList() + ..tenantId = json['tenantId'] as String? + ..fileStoreId = json['fileStoreId'] as String? + ..auditDetails = json['auditDetails'] == null + ? null + : AuditDetails.fromJson(json['auditDetails'] as Map) + ..meterReadings = (json['meterReadings'] as List?) + ?.map((e) => MeterReadings.fromJson(e as Map)) + .toList() + ..waterConnection = json['waterconnection'] == null + ? null + : WaterConnection.fromJson( + json['waterconnection'] as Map); Map _$BillToJson(Bill instance) => { 'id': instance.id, @@ -72,20 +68,18 @@ Map _$BillToJson(Bill instance) => { 'waterconnection': instance.waterConnection, }; -BillDetails _$BillDetailsFromJson(Map json) { - return BillDetails() - ..id = json['id'] as String? - ..tenantId = json['tenantId'] as String? - ..demandId = json['demandId'] as String? - ..billId = json['billId'] as String? - ..expiryDate = json['expiryDate'] as int? - ..amount = (json['amount'] as num?)?.toDouble() - ..fromPeriod = json['fromPeriod'] as int? - ..toPeriod = json['toPeriod'] as int? - ..billAccountDetails = (json['billAccountDetails'] as List?) - ?.map((e) => BillAccountDetails.fromJson(e as Map)) - .toList(); -} +BillDetails _$BillDetailsFromJson(Map json) => BillDetails() + ..id = json['id'] as String? + ..tenantId = json['tenantId'] as String? + ..demandId = json['demandId'] as String? + ..billId = json['billId'] as String? + ..expiryDate = (json['expiryDate'] as num?)?.toInt() + ..amount = (json['amount'] as num?)?.toDouble() + ..fromPeriod = (json['fromPeriod'] as num?)?.toInt() + ..toPeriod = (json['toPeriod'] as num?)?.toInt() + ..billAccountDetails = (json['billAccountDetails'] as List?) + ?.map((e) => BillAccountDetails.fromJson(e as Map)) + .toList(); Map _$BillDetailsToJson(BillDetails instance) => { @@ -100,17 +94,16 @@ Map _$BillDetailsToJson(BillDetails instance) => 'billAccountDetails': instance.billAccountDetails, }; -BillAccountDetails _$BillAccountDetailsFromJson(Map json) { - return BillAccountDetails() - ..id = json['id'] as String? - ..tenantId = json['tenantId'] as String? - ..billDetailId = json['billDetailId'] as String? - ..demandDetailId = json['demandDetailId'] as String? - ..order = json['order'] as int? - ..amount = (json['amount'] as num?)?.toDouble() - ..adjustedAmount = (json['adjustedAmount'] as num?)?.toDouble() - ..taxHeadCode = json['taxHeadCode'] as String?; -} +BillAccountDetails _$BillAccountDetailsFromJson(Map json) => + BillAccountDetails() + ..id = json['id'] as String? + ..tenantId = json['tenantId'] as String? + ..billDetailId = json['billDetailId'] as String? + ..demandDetailId = json['demandDetailId'] as String? + ..order = (json['order'] as num?)?.toInt() + ..amount = (json['amount'] as num?)?.toDouble() + ..adjustedAmount = (json['adjustedAmount'] as num?)?.toDouble() + ..taxHeadCode = json['taxHeadCode'] as String?; Map _$BillAccountDetailsToJson(BillAccountDetails instance) => { @@ -124,13 +117,11 @@ Map _$BillAccountDetailsToJson(BillAccountDetails instance) => 'taxHeadCode': instance.taxHeadCode, }; -AuditDetails _$AuditDetailsFromJson(Map json) { - return AuditDetails() - ..createdBy = json['createdBy'] as String? - ..lastModifiedBy = json['lastModifiedBy'] as String? - ..createdTime = json['createdTime'] as int? - ..lastModifiedTime = json['lastModifiedTime'] as int?; -} +AuditDetails _$AuditDetailsFromJson(Map json) => AuditDetails() + ..createdBy = json['createdBy'] as String? + ..lastModifiedBy = json['lastModifiedBy'] as String? + ..createdTime = (json['createdTime'] as num?)?.toInt() + ..lastModifiedTime = (json['lastModifiedTime'] as num?)?.toInt(); Map _$AuditDetailsToJson(AuditDetails instance) => { diff --git a/frontend/mgramseva/lib/model/common/demand.dart b/frontend/mgramseva/lib/model/common/demand.dart index 23dec86b7..2229fdc7e 100644 --- a/frontend/mgramseva/lib/model/common/demand.dart +++ b/frontend/mgramseva/lib/model/common/demand.dart @@ -4,7 +4,6 @@ part 'demand.g.dart'; @JsonSerializable() class Demand { - @JsonKey(name: "id") String? id; @@ -46,16 +45,13 @@ class Demand { Demand(); - factory Demand.fromJson(Map json) => - _$DemandFromJson(json); + factory Demand.fromJson(Map json) => _$DemandFromJson(json); Map toJson() => _$DemandToJson(this); } - @JsonSerializable() class Payer { - @JsonKey(name: "uuid") String? uuid; @@ -85,15 +81,13 @@ class Payer { Payer(); - factory Payer.fromJson(Map json) => - _$PayerFromJson(json); + factory Payer.fromJson(Map json) => _$PayerFromJson(json); Map toJson() => _$PayerToJson(this); } @JsonSerializable() class DemandDetails { - @JsonKey(name: "id") String? id; @@ -118,4 +112,4 @@ class DemandDetails { _$DemandDetailsFromJson(json); Map toJson() => _$DemandDetailsToJson(this); -} \ No newline at end of file +} diff --git a/frontend/mgramseva/lib/model/common/fetch_bill.g.dart b/frontend/mgramseva/lib/model/common/fetch_bill.g.dart index 9062b9cbc..906552596 100644 --- a/frontend/mgramseva/lib/model/common/fetch_bill.g.dart +++ b/frontend/mgramseva/lib/model/common/fetch_bill.g.dart @@ -6,21 +6,19 @@ part of 'fetch_bill.dart'; // JsonSerializableGenerator // ************************************************************************** -FetchBill _$FetchBillFromJson(Map json) { - return FetchBill() - ..id = json['id'] as String? - ..mobileNumber = json['mobileNumber'] as String? - ..payerName = json['payerName'] as String? - ..status = json['status'] as String? - ..totalAmount = (json['totalAmount'] as num?)?.toDouble() - ..businessService = json['businessService'] as String? - ..billNumber = json['billNumber'] as String? - ..billDate = json['billDate'] as int? - ..consumerCode = json['consumerCode'] as String? - ..billDetails = (json['billDetails'] as List?) - ?.map((e) => BillDetails.fromJson(e as Map)) - .toList(); -} +FetchBill _$FetchBillFromJson(Map json) => FetchBill() + ..id = json['id'] as String? + ..mobileNumber = json['mobileNumber'] as String? + ..payerName = json['payerName'] as String? + ..status = json['status'] as String? + ..totalAmount = (json['totalAmount'] as num?)?.toDouble() + ..businessService = json['businessService'] as String? + ..billNumber = json['billNumber'] as String? + ..billDate = json['billDate'] as int? + ..consumerCode = json['consumerCode'] as String? + ..billDetails = (json['billDetails'] as List?) + ?.map((e) => BillDetails.fromJson(e as Map)) + .toList(); Map _$FetchBillToJson(FetchBill instance) => { 'id': instance.id, @@ -32,23 +30,21 @@ Map _$FetchBillToJson(FetchBill instance) => { 'billNumber': instance.billNumber, 'billDate': instance.billDate, 'consumerCode': instance.consumerCode, - 'billDetails': instance.billDetails?.map((e) => e.toJson()).toList(), + 'billDetails': instance.billDetails, }; -BillDetails _$BillDetailsFromJson(Map json) { - return BillDetails() - ..id = json['id'] as String? - ..tenantId = json['tenantId'] as String? - ..demandId = json['demandId'] as String? - ..billId = json['billId'] as String? - ..expiryDate = json['expiryDate'] as int? - ..amount = (json['amount'] as num?)?.toDouble() - ..fromPeriod = json['fromPeriod'] as int? - ..toPeriod = json['toPeriod'] as int? - ..billAccountDetails = (json['billAccountDetails'] as List?) - ?.map((e) => BillAccountDetails.fromJson(e as Map)) - .toList(); -} +BillDetails _$BillDetailsFromJson(Map json) => BillDetails() + ..id = json['id'] as String? + ..tenantId = json['tenantId'] as String? + ..demandId = json['demandId'] as String? + ..billId = json['billId'] as String? + ..expiryDate = json['expiryDate'] as int? + ..amount = (json['amount'] as num?)?.toDouble() + ..fromPeriod = json['fromPeriod'] as int? + ..toPeriod = json['toPeriod'] as int? + ..billAccountDetails = (json['billAccountDetails'] as List?) + ?.map((e) => BillAccountDetails.fromJson(e as Map)) + .toList(); Map _$BillDetailsToJson(BillDetails instance) => { @@ -60,22 +56,21 @@ Map _$BillDetailsToJson(BillDetails instance) => 'amount': instance.amount, 'fromPeriod': instance.fromPeriod, 'toPeriod': instance.toPeriod, - 'billAccountDetails': instance.billAccountDetails?.map((e) => e.toJson()).toList(), + 'billAccountDetails': instance.billAccountDetails, }; -BillAccountDetails _$BillAccountDetailsFromJson(Map json) { - return BillAccountDetails() - ..id = json['id'] as String? - ..tenantId = json['tenantId'] as String? - ..billDetailId = json['billDetailId'] as String? - ..demandDetailId = json['demandDetailId'] as String? - ..order = json['order'] as int? - ..amount = (json['amount'] as num).toDouble() - ..adjustedAmount = (json['adjustedAmount'] as num?)?.toDouble() - ..advanceAdjustedAmount = - (json['advanceAdjustedAmount'] as num?)?.toDouble() - ..taxHeadCode = json['taxHeadCode'] as String; -} +BillAccountDetails _$BillAccountDetailsFromJson(Map json) => + BillAccountDetails() + ..id = json['id'] as String? + ..tenantId = json['tenantId'] as String? + ..billDetailId = json['billDetailId'] as String? + ..demandDetailId = json['demandDetailId'] as String? + ..order = json['order'] as int? + ..amount = (json['amount'] as num).toDouble() + ..adjustedAmount = (json['adjustedAmount'] as num?)?.toDouble() + ..advanceAdjustedAmount = + (json['advanceAdjustedAmount'] as num?)?.toDouble() + ..taxHeadCode = json['taxHeadCode'] as String; Map _$BillAccountDetailsToJson(BillAccountDetails instance) => { diff --git a/frontend/mgramseva/lib/model/connection/water_connection.dart b/frontend/mgramseva/lib/model/connection/water_connection.dart index 720e7333c..62fc87b72 100644 --- a/frontend/mgramseva/lib/model/connection/water_connection.dart +++ b/frontend/mgramseva/lib/model/connection/water_connection.dart @@ -254,30 +254,30 @@ class WaterConnection { @override int get hashCode { return id.hashCode ^ - connectionNo.hashCode ^ - propertyId.hashCode ^ - applicationNo.hashCode ^ - tenantId.hashCode ^ - action.hashCode ^ - status.hashCode ^ - meterInstallationDate.hashCode ^ - documents.hashCode ^ - proposedTaps.hashCode ^ - noOfTaps.hashCode ^ - arrears.hashCode ^ - connectionType.hashCode ^ - oldConnectionNo.hashCode ^ - meterId.hashCode ^ - propertyType.hashCode ^ - previousReadingDate.hashCode ^ - previousReading.hashCode ^ - proposedPipeSize.hashCode ^ - connectionHolders.hashCode ^ - additionalDetails.hashCode ^ - processInstance.hashCode ^ - paymentType.hashCode ^ - penalty.hashCode ^ - advance.hashCode; + connectionNo.hashCode ^ + propertyId.hashCode ^ + applicationNo.hashCode ^ + tenantId.hashCode ^ + action.hashCode ^ + status.hashCode ^ + meterInstallationDate.hashCode ^ + documents.hashCode ^ + proposedTaps.hashCode ^ + noOfTaps.hashCode ^ + arrears.hashCode ^ + connectionType.hashCode ^ + oldConnectionNo.hashCode ^ + meterId.hashCode ^ + propertyType.hashCode ^ + previousReadingDate.hashCode ^ + previousReading.hashCode ^ + proposedPipeSize.hashCode ^ + connectionHolders.hashCode ^ + additionalDetails.hashCode ^ + processInstance.hashCode ^ + paymentType.hashCode ^ + penalty.hashCode ^ + advance.hashCode; } } diff --git a/frontend/mgramseva/lib/model/connection/water_connection.g.dart b/frontend/mgramseva/lib/model/connection/water_connection.g.dart index 1ff036767..c4e271ea1 100644 --- a/frontend/mgramseva/lib/model/connection/water_connection.g.dart +++ b/frontend/mgramseva/lib/model/connection/water_connection.g.dart @@ -42,7 +42,7 @@ WaterConnection _$WaterConnectionFromJson(Map json) => json['processInstance'] as Map) ..paymentType = json['paymentType'] as String? ..penalty = (json['penalty'] as num?)?.toDouble() - ..advance = (json['advance'] as num?)?.toDouble().abs(); + ..advance = (json['advance'] as num?)?.toDouble(); Map _$WaterConnectionToJson(WaterConnection instance) => { @@ -83,9 +83,7 @@ Map _$ProcessInstanceToJson(ProcessInstance instance) => AdditionalDetails _$AdditionalDetailsFromJson(Map json) => AdditionalDetails() - ..initialMeterReading = json['initialMeterReading'] is double - ? json['initialMeterReading'].toInt() - : json['initialMeterReading'] as int? + ..initialMeterReading = json['initialMeterReading'] as int? ..meterReading = json['meterReading'] as int? ..locality = json['locality'] as String? ..category = json['category'] as String? @@ -97,9 +95,9 @@ AdditionalDetails _$AdditionalDetailsFromJson(Map json) => ..doorNo = json['doorNo'] as String? ..collectionAmount = json['collectionAmount'] as String? ..collectionPendingAmount = json['collectionPendingAmount'] as String? - ..action = json['action'] as String? ..totalAmount = json['totalamount'] as String? - ..appCreatedDate = json['appCreatedDate'] as num?; + ..appCreatedDate = json['appCreatedDate'] as num? + ..action = json['action'] as String?; Map _$AdditionalDetailsToJson(AdditionalDetails instance) => { @@ -115,7 +113,7 @@ Map _$AdditionalDetailsToJson(AdditionalDetails instance) => 'doorNo': instance.doorNo, 'collectionAmount': instance.collectionAmount, 'collectionPendingAmount': instance.collectionPendingAmount, - 'action': instance.action, 'totalamount': instance.totalAmount, 'appCreatedDate': instance.appCreatedDate, + 'action': instance.action, }; diff --git a/frontend/mgramseva/lib/model/connection/water_connections.g.dart b/frontend/mgramseva/lib/model/connection/water_connections.g.dart index ce4cf095a..b57d199ea 100644 --- a/frontend/mgramseva/lib/model/connection/water_connections.g.dart +++ b/frontend/mgramseva/lib/model/connection/water_connections.g.dart @@ -6,22 +6,21 @@ part of 'water_connections.dart'; // JsonSerializableGenerator // ************************************************************************** -WaterConnections _$WaterConnectionsFromJson(Map json) { - return WaterConnections() - ..waterConnection = (json['WaterConnection'] as List?) - ?.map((e) => WaterConnection.fromJson(e as Map)) - .toList() - ..waterConnectionData = (json['waterConnectionData'] as List?) - ?.map((e) => WaterConnection.fromJson(e as Map)) - .toList() ?? - [] - ..tabData = json['propertyCount'] as Map? - ..collectionDataCount = json['collectionDataCount'] == null - ? null - : CollectionDataCount.fromJson( - json['collectionDataCount'] as Map) - ..totalCount = json['totalCount'] as int? ?? 0; -} +WaterConnections _$WaterConnectionsFromJson(Map json) => + WaterConnections() + ..waterConnection = (json['WaterConnection'] as List?) + ?.map((e) => WaterConnection.fromJson(e as Map)) + .toList() + ..waterConnectionData = (json['waterConnectionData'] as List?) + ?.map((e) => WaterConnection.fromJson(e as Map)) + .toList() ?? + [] + ..tabData = json['propertyCount'] as Map? + ..collectionDataCount = json['collectionDataCount'] == null + ? null + : CollectionDataCount.fromJson( + json['collectionDataCount'] as Map) + ..totalCount = json['totalCount'] as int? ?? 0; Map _$WaterConnectionsToJson(WaterConnections instance) => { @@ -32,11 +31,10 @@ Map _$WaterConnectionsToJson(WaterConnections instance) => 'totalCount': instance.totalCount, }; -CollectionDataCount _$CollectionDataCountFromJson(Map json) { - return CollectionDataCount() - ..collectionPending = json['collectionPending'] as int? - ..collectionPaid = json['collectionPaid'] as int?; -} +CollectionDataCount _$CollectionDataCountFromJson(Map json) => + CollectionDataCount() + ..collectionPending = json['collectionPending'] as int? + ..collectionPaid = json['collectionPaid'] as int?; Map _$CollectionDataCountToJson( CollectionDataCount instance) => diff --git a/frontend/mgramseva/lib/model/demand/demand_list.dart b/frontend/mgramseva/lib/model/demand/demand_list.dart index e65a4773c..723ae2757 100644 --- a/frontend/mgramseva/lib/model/demand/demand_list.dart +++ b/frontend/mgramseva/lib/model/demand/demand_list.dart @@ -1,5 +1,6 @@ import 'package:json_annotation/json_annotation.dart'; import 'package:mgramseva/model/bill/meter_demand_details.dart'; +import 'package:mgramseva/model/connection/water_connection.dart'; part 'demand_list.g.dart'; @JsonSerializable() @@ -114,6 +115,8 @@ class DemandDetails { double? taxAmount; @JsonKey(name: "collectionAmount") double? collectionAmount; + @JsonKey(name: "additionalDetails") + AdditionalDetails? additionalDetails; @JsonKey(name: "auditDetails") AuditDetails? auditDetails; @JsonKey(name: "tenantId") @@ -126,6 +129,53 @@ class DemandDetails { Map toJson() => _$DemandDetailsToJson(this); } +@JsonSerializable() +class AggragateDemandDetails { + @JsonKey(name: "advanceAvailable") + double? advanceAvailable; + @JsonKey(name: "advanceAdjusted") + double? advanceAdjusted; + @JsonKey(name: "remainingAdvance") + double? remainingAdvance; + @JsonKey(name: "currentmonthBill") + double? currentmonthBill; + @JsonKey(name: "currentMonthPenalty") + double? currentMonthPenalty; + @JsonKey(name: "currentmonthTotalDue") + double? currentmonthTotalDue; + @JsonKey(name: "totalAreas") + double? totalAreas; + @JsonKey(name: "totalAreasWithPenalty") + double? totalAreasWithPenalty; + @JsonKey(name: "netdue") + double? netdue; + @JsonKey(name: "netDueWithPenalty") + double? netDueWithPenalty; + @JsonKey(name: "totalApplicablePenalty") + double? totalApplicablePenalty; + @JsonKey(name: "mapOfDemandDetailList") + List>>? mapOfDemandDetailList; + AggragateDemandDetails(); + + factory AggragateDemandDetails.fromJson(Map json) => + _$AggragateDemandDetailsFromJson(json); + + Map toJson() => _$AggragateDemandDetailsToJson(this); +} + +@JsonSerializable() +class AggregateDemandDetailsList { + // Renamed class to match JSON element + final List>> mapOfDemandDetailList; + + AggregateDemandDetailsList({required this.mapOfDemandDetailList}); + + factory AggregateDemandDetailsList.fromJson(Map json) => + _$AggregateDemandDetailsListFromJson(json); + + Map toJson() => _$AggregateDemandDetailsListToJson(this); +} + @JsonSerializable() class AuditDetails { @JsonKey(name: "createdBy") diff --git a/frontend/mgramseva/lib/model/demand/demand_list.g.dart b/frontend/mgramseva/lib/model/demand/demand_list.g.dart index e773c5e50..46eec48b0 100644 --- a/frontend/mgramseva/lib/model/demand/demand_list.g.dart +++ b/frontend/mgramseva/lib/model/demand/demand_list.g.dart @@ -6,41 +6,40 @@ part of 'demand_list.dart'; // JsonSerializableGenerator // ************************************************************************** -DemandList _$DemandListFromJson(Map json) { - return DemandList() - ..demands = (json['Demands'] as List?) - ?.map((e) => Demands.fromJson(e as Map)) - .toList(); -} +DemandList _$DemandListFromJson(Map json) => DemandList() + ..demands = (json['Demands'] as List?) + ?.map((e) => Demands.fromJson(e as Map)) + .toList(); Map _$DemandListToJson(DemandList instance) => { 'Demands': instance.demands, }; -Demands _$DemandsFromJson(Map json) { - return Demands() - ..id = json['id'] as String? - ..tenantId = json['tenantId'] as String? - ..consumerCode = json['consumerCode'] as String? - ..consumerType = json['consumerType'] as String? - ..businessService = json['businessService'] as String? - ..payer = json['payer'] == null - ? null - : Payer.fromJson(json['payer'] as Map) - ..taxPeriodFrom = json['taxPeriodFrom'] as int? - ..taxPeriodTo = json['taxPeriodTo'] as int? - ..demandDetails = (json['demandDetails'] as List?) - ?.map((e) => DemandDetails.fromJson(e as Map)) - .toList() - ..auditDetails = json['auditDetails'] == null - ? null - : AuditDetails.fromJson(json['auditDetails'] as Map) - ..billExpiryTime = json['billExpiryTime'] as int? - ..minimumAmountPayable = (json['minimumAmountPayable'] as num?)?.toDouble() - ..status = json['status'] as String? - ..isPaymentCompleted = json['isPaymentCompleted'] as bool?; -} +Demands _$DemandsFromJson(Map json) => Demands() + ..id = json['id'] as String? + ..tenantId = json['tenantId'] as String? + ..consumerCode = json['consumerCode'] as String? + ..consumerType = json['consumerType'] as String? + ..businessService = json['businessService'] as String? + ..payer = json['payer'] == null + ? null + : Payer.fromJson(json['payer'] as Map) + ..taxPeriodFrom = json['taxPeriodFrom'] as int? + ..taxPeriodTo = json['taxPeriodTo'] as int? + ..demandDetails = (json['demandDetails'] as List?) + ?.map((e) => DemandDetails.fromJson(e as Map)) + .toList() + ..auditDetails = json['auditDetails'] == null + ? null + : AuditDetails.fromJson(json['auditDetails'] as Map) + ..billExpiryTime = json['billExpiryTime'] as int? + ..minimumAmountPayable = (json['minimumAmountPayable'] as num?)?.toDouble() + ..status = json['status'] as String? + ..meterReadings = (json['meterReadings'] as List?) + ?.map((e) => MeterReadings.fromJson(e as Map)) + .toList() + ..isPaymentCompleted = json['isPaymentCompleted'] as bool?; Map _$DemandsToJson(Demands instance) => { 'id': instance.id, @@ -56,31 +55,31 @@ Map _$DemandsToJson(Demands instance) => { 'billExpiryTime': instance.billExpiryTime, 'minimumAmountPayable': instance.minimumAmountPayable, 'status': instance.status, + 'meterReadings': instance.meterReadings, + 'isPaymentCompleted': instance.isPaymentCompleted, }; -Payer _$PayerFromJson(Map json) { - return Payer() - ..uuid = json['uuid'] as String? - ..id = json['id'] as int? - ..userName = json['userName'] as String? - ..type = json['type'] as String? - ..salutation = json['salutation'] as String? - ..name = json['name'] as String? - ..gender = json['gender'] as String? - ..mobileNumber = json['mobileNumber'] as String? - ..emailId = json['emailId'] as String? - ..altContactNumber = json['altContactNumber'] as String? - ..pan = json['pan'] as String? - ..aadhaarNumber = json['aadhaarNumber'] as String? - ..permanentAddress = json['permanentAddress'] as String? - ..permanentCity = json['permanentCity'] as String? - ..permanentPinCode = json['permanentPinCode'] as String? - ..correspondenceAddress = json['correspondenceAddress'] as String? - ..correspondenceCity = json['correspondenceCity'] as String? - ..correspondencePinCode = json['correspondencePinCode'] as String? - ..active = json['active'] as bool? - ..tenantId = json['tenantId'] as String?; -} +Payer _$PayerFromJson(Map json) => Payer() + ..uuid = json['uuid'] as String? + ..id = json['id'] as int? + ..userName = json['userName'] as String? + ..type = json['type'] as String? + ..salutation = json['salutation'] as String? + ..name = json['name'] as String? + ..gender = json['gender'] as String? + ..mobileNumber = json['mobileNumber'] as String? + ..emailId = json['emailId'] as String? + ..altContactNumber = json['altContactNumber'] as String? + ..pan = json['pan'] as String? + ..aadhaarNumber = json['aadhaarNumber'] as String? + ..permanentAddress = json['permanentAddress'] as String? + ..permanentCity = json['permanentCity'] as String? + ..permanentPinCode = json['permanentPinCode'] as String? + ..correspondenceAddress = json['correspondenceAddress'] as String? + ..correspondenceCity = json['correspondenceCity'] as String? + ..correspondencePinCode = json['correspondencePinCode'] as String? + ..active = json['active'] as bool? + ..tenantId = json['tenantId'] as String?; Map _$PayerToJson(Payer instance) => { 'uuid': instance.uuid, @@ -105,18 +104,21 @@ Map _$PayerToJson(Payer instance) => { 'tenantId': instance.tenantId, }; -DemandDetails _$DemandDetailsFromJson(Map json) { - return DemandDetails() - ..id = json['id'] as String? - ..demandId = json['demandId'] as String? - ..taxHeadMasterCode = json['taxHeadMasterCode'] as String? - ..taxAmount = (json['taxAmount'] as num?)?.toDouble() - ..collectionAmount = (json['collectionAmount'] as num?)?.toDouble() - ..auditDetails = json['auditDetails'] == null - ? null - : AuditDetails.fromJson(json['auditDetails'] as Map) - ..tenantId = json['tenantId'] as String?; -} +DemandDetails _$DemandDetailsFromJson(Map json) => + DemandDetails() + ..id = json['id'] as String? + ..demandId = json['demandId'] as String? + ..taxHeadMasterCode = json['taxHeadMasterCode'] as String? + ..taxAmount = (json['taxAmount'] as num?)?.toDouble() + ..collectionAmount = (json['collectionAmount'] as num?)?.toDouble() + ..additionalDetails = json['additionalDetails'] == null + ? null + : AdditionalDetails.fromJson( + json['additionalDetails'] as Map) + ..auditDetails = json['auditDetails'] == null + ? null + : AuditDetails.fromJson(json['auditDetails'] as Map) + ..tenantId = json['tenantId'] as String?; Map _$DemandDetailsToJson(DemandDetails instance) => { @@ -125,17 +127,83 @@ Map _$DemandDetailsToJson(DemandDetails instance) => 'taxHeadMasterCode': instance.taxHeadMasterCode, 'taxAmount': instance.taxAmount, 'collectionAmount': instance.collectionAmount, + 'additionalDetails': instance.additionalDetails, 'auditDetails': instance.auditDetails?.toJson(), 'tenantId': instance.tenantId, }; -AuditDetails _$AuditDetailsFromJson(Map json) { - return AuditDetails() - ..createdBy = json['createdBy'] as String? - ..lastModifiedBy = json['lastModifiedBy'] as String? - ..createdTime = json['createdTime'] as int? - ..lastModifiedTime = json['lastModifiedTime'] as int?; -} +AggragateDemandDetails _$AggragateDemandDetailsFromJson( + Map json) => + AggragateDemandDetails() + ..advanceAvailable = (json['advanceAvailable'] as num?)?.toDouble() + ..advanceAdjusted = (json['advanceAdjusted'] as num?)?.toDouble() + ..remainingAdvance = (json['remainingAdvance'] as num?)?.toDouble() + ..currentmonthBill = (json['currentmonthBill'] as num?)?.toDouble() + ..currentMonthPenalty = (json['currentMonthPenalty'] as num?)?.toDouble() + ..currentmonthTotalDue = + (json['currentmonthTotalDue'] as num?)?.toDouble() + ..totalAreas = (json['totalAreas'] as num?)?.toDouble() + ..totalAreasWithPenalty = + (json['totalAreasWithPenalty'] as num?)?.toDouble() + ..netdue = (json['netdue'] as num?)?.toDouble() + ..netDueWithPenalty = (json['netDueWithPenalty'] as num?)?.toDouble() + ..totalApplicablePenalty = + (json['totalApplicablePenalty'] as num?)?.toDouble() + ..mapOfDemandDetailList = (json['mapOfDemandDetailList'] + as List?) + ?.map((e) => (e as Map).map( + (k, e) => MapEntry( + k, + (e as List) + .map((e) => + DemandDetails.fromJson(e as Map)) + .toList()), + )) + .toList(); + +Map _$AggragateDemandDetailsToJson( + AggragateDemandDetails instance) => + { + 'advanceAvailable': instance.advanceAvailable, + 'advanceAdjusted': instance.advanceAdjusted, + 'remainingAdvance': instance.remainingAdvance, + 'currentmonthBill': instance.currentmonthBill, + 'currentMonthPenalty': instance.currentMonthPenalty, + 'currentmonthTotalDue': instance.currentmonthTotalDue, + 'totalAreas': instance.totalAreas, + 'totalAreasWithPenalty': instance.totalAreasWithPenalty, + 'netdue': instance.netdue, + 'netDueWithPenalty': instance.netDueWithPenalty, + 'totalApplicablePenalty': instance.totalApplicablePenalty, + 'mapOfDemandDetailList': instance.mapOfDemandDetailList, + }; + +AggregateDemandDetailsList _$AggregateDemandDetailsListFromJson( + Map json) => + AggregateDemandDetailsList( + mapOfDemandDetailList: (json['mapOfDemandDetailList'] as List) + .map((e) => (e as Map).map( + (k, e) => MapEntry( + k, + (e as List) + .map((e) => + DemandDetails.fromJson(e as Map)) + .toList()), + )) + .toList(), + ); + +Map _$AggregateDemandDetailsListToJson( + AggregateDemandDetailsList instance) => + { + 'mapOfDemandDetailList': instance.mapOfDemandDetailList, + }; + +AuditDetails _$AuditDetailsFromJson(Map json) => AuditDetails() + ..createdBy = json['createdBy'] as String? + ..lastModifiedBy = json['lastModifiedBy'] as String? + ..createdTime = json['createdTime'] as int? + ..lastModifiedTime = json['lastModifiedTime'] as int?; Map _$AuditDetailsToJson(AuditDetails instance) => { diff --git a/frontend/mgramseva/lib/model/expenses_details/expenses_details.g.dart b/frontend/mgramseva/lib/model/expenses_details/expenses_details.g.dart index 3243a56d9..4565dd482 100644 --- a/frontend/mgramseva/lib/model/expenses_details/expenses_details.g.dart +++ b/frontend/mgramseva/lib/model/expenses_details/expenses_details.g.dart @@ -7,54 +7,65 @@ part of 'expenses_details.dart'; // ************************************************************************** ExpensesDetailsWithPagination _$ExpensesDetailsWithPaginationFromJson( - Map json) { - return ExpensesDetailsWithPagination() - ..totalCount = json['totalCount'] as int? - ..billDataCount = json['billData'] == null - ? null - : BillDataCount.fromJson(json['billData'] as Map) - ..expenseDetailList = (json['challans'] as List?) - ?.map((e) => ExpensesDetailsModel.fromJson(e as Map)) - .toList(); -} + Map json) => + ExpensesDetailsWithPagination() + ..totalCount = json['totalCount'] as int? + ..billDataCount = json['billData'] == null + ? null + : BillDataCount.fromJson(json['billData'] as Map) + ..expenseDetailList = (json['challans'] as List?) + ?.map((e) => ExpensesDetailsModel.fromJson(e as Map)) + .toList(); Map _$ExpensesDetailsWithPaginationToJson( ExpensesDetailsWithPagination instance) => { 'totalCount': instance.totalCount, + 'billData': instance.billDataCount, 'challans': instance.expenseDetailList, }; -ExpensesDetailsModel _$ExpensesDetailsModelFromJson(Map json) { - return ExpensesDetailsModel() - ..citizen = json['citizen'] == null - ? null - : Citizen.fromJson(json['citizen'] as Map) - ..auditDetails = json['auditDetails'] == null - ? null - : AuditDetails.fromJson(json['auditDetails'] as Map) - ..id = json['id'] as String? - ..tenantId = json['tenantId'] as String? - ..businessService = json['businessService'] as String? - ..consumerType = json['consumerType'] as String? - ..expenseType = json['typeOfExpense'] as String? - ..vendorId = json['vendor'] as String? - ..vendorName = json['vendorName'] as String? - ..expensesAmount = (json['amount'] as List?) - ?.map((e) => ExpensesAmount.fromJson(e as Map)) - .toList() - ..billDate = json['billDate'] as int? - ..paidDate = json['paidDate'] as int? - ..billIssuedDate = json['billIssuedDate'] as int? - ..challanNo = json['challanNo'] as String? - ..accountId = json['accountId'] as String? - ..applicationStatus = json['applicationStatus'] as String? - ..totalAmount = (json['totalAmount'] as num?)?.toDouble() - ..isBillPaid = json['isBillPaid'] as bool? ?? false - ..fileStoreId = json['filestoreid'] as String? - ..taxPeriodFrom = json['taxPeriodFrom'] as int? - ..taxPeriodTo = json['taxPeriodTo'] as int?; -} +BillDataCount _$BillDataCountFromJson(Map json) => + BillDataCount() + ..notPaidCount = json['notPaidcount'] as String? + ..paidCount = json['paidcount'] as String?; + +Map _$BillDataCountToJson(BillDataCount instance) => + { + 'notPaidcount': instance.notPaidCount, + 'paidcount': instance.paidCount, + }; + +ExpensesDetailsModel _$ExpensesDetailsModelFromJson( + Map json) => + ExpensesDetailsModel() + ..citizen = json['citizen'] == null + ? null + : Citizen.fromJson(json['citizen'] as Map) + ..auditDetails = json['auditDetails'] == null + ? null + : AuditDetails.fromJson(json['auditDetails'] as Map) + ..id = json['id'] as String? + ..tenantId = json['tenantId'] as String? + ..businessService = json['businessService'] as String? + ..consumerType = json['consumerType'] as String? + ..expenseType = json['typeOfExpense'] as String? + ..vendorId = json['vendor'] as String? + ..vendorName = json['vendorName'] as String? + ..expensesAmount = (json['amount'] as List?) + ?.map((e) => ExpensesAmount.fromJson(e as Map)) + .toList() + ..billDate = json['billDate'] as int? + ..paidDate = json['paidDate'] as int? + ..billIssuedDate = json['billIssuedDate'] as int? + ..challanNo = json['challanNo'] as String? + ..accountId = json['accountId'] as String? + ..applicationStatus = json['applicationStatus'] as String? + ..totalAmount = (json['totalAmount'] as num?)?.toDouble() + ..isBillPaid = json['isBillPaid'] as bool? ?? false + ..fileStoreId = json['filestoreid'] as String? + ..taxPeriodFrom = json['taxPeriodFrom'] as int? + ..taxPeriodTo = json['taxPeriodTo'] as int?; Map _$ExpensesDetailsModelToJson( ExpensesDetailsModel instance) => @@ -82,11 +93,10 @@ Map _$ExpensesDetailsModelToJson( 'taxPeriodTo': instance.taxPeriodTo, }; -ExpensesAmount _$ExpensesAmountFromJson(Map json) { - return ExpensesAmount() - ..taxHeadCode = json['taxHeadCode'] as String? - ..amount = json['amount'] as String?; -} +ExpensesAmount _$ExpensesAmountFromJson(Map json) => + ExpensesAmount() + ..taxHeadCode = json['taxHeadCode'] as String? + ..amount = json['amount'] as String?; Map _$ExpensesAmountToJson(ExpensesAmount instance) => { @@ -94,14 +104,12 @@ Map _$ExpensesAmountToJson(ExpensesAmount instance) => 'amount': instance.amount, }; -Citizen _$CitizenFromJson(Map json) { - return Citizen() - ..id = json['id'] as int? - ..uuid = json['uuid'] as String? - ..userName = json['userName'] as String? - ..name = json['name'] as String? - ..mobileNumber = json['mobileNumber'] as String?; -} +Citizen _$CitizenFromJson(Map json) => Citizen() + ..id = json['id'] as int? + ..uuid = json['uuid'] as String? + ..userName = json['userName'] as String? + ..name = json['name'] as String? + ..mobileNumber = json['mobileNumber'] as String?; Map _$CitizenToJson(Citizen instance) => { 'id': instance.id, @@ -111,13 +119,11 @@ Map _$CitizenToJson(Citizen instance) => { 'mobileNumber': instance.mobileNumber, }; -AuditDetails _$AuditDetailsFromJson(Map json) { - return AuditDetails() - ..createdBy = json['createdBy'] as String? - ..lastModifiedBy = json['lastModifiedBy'] as String? - ..createdTime = json['createdTime'] as int? - ..lastModifiedTime = json['lastModifiedTime'] as int?; -} +AuditDetails _$AuditDetailsFromJson(Map json) => AuditDetails() + ..createdBy = json['createdBy'] as String? + ..lastModifiedBy = json['lastModifiedBy'] as String? + ..createdTime = json['createdTime'] as int? + ..lastModifiedTime = json['lastModifiedTime'] as int?; Map _$AuditDetailsToJson(AuditDetails instance) => { @@ -126,9 +132,3 @@ Map _$AuditDetailsToJson(AuditDetails instance) => 'createdTime': instance.createdTime, 'lastModifiedTime': instance.lastModifiedTime, }; - -BillDataCount _$BillDataCountFromJson(Map json) { - return BillDataCount() - ..notPaidCount = json['notPaidcount'] as String? - ..paidCount = json['paidcount'] as String?; -} \ No newline at end of file diff --git a/frontend/mgramseva/lib/model/success_handler.dart b/frontend/mgramseva/lib/model/success_handler.dart index ac808a5a1..ae3f2bfb3 100644 --- a/frontend/mgramseva/lib/model/success_handler.dart +++ b/frontend/mgramseva/lib/model/success_handler.dart @@ -34,7 +34,7 @@ class SuccessHandler { @JsonKey(name: "printLabel") String? printLabel; - @JsonKey(name: "subHeaderFun") + @JsonKey(name: "subTextFun") String Function()? subTextFun; @JsonKey(name: "subtitleFun") diff --git a/frontend/mgramseva/lib/providers/authentication_provider.dart b/frontend/mgramseva/lib/providers/authentication_provider.dart index 7e7943d55..a294b09d7 100644 --- a/frontend/mgramseva/lib/providers/authentication_provider.dart +++ b/frontend/mgramseva/lib/providers/authentication_provider.dart @@ -3,6 +3,7 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:mgramseva/providers/common_provider.dart'; import 'package:mgramseva/routers/routers.dart'; + import 'package:mgramseva/utils/custom_exception.dart'; import 'package:mgramseva/utils/error_logging.dart'; import 'package:mgramseva/utils/global_variables.dart'; @@ -12,7 +13,9 @@ import 'package:provider/provider.dart'; import '../repository/authentication_repo.dart'; import 'language.dart'; -class AuthenticationProvider with ChangeNotifier { +import 'package:mgramseva/services/base_service.dart'; + +class AuthenticationProvider with ChangeNotifier, BaseService { validateLogin(BuildContext context, String userName, String password) async { /// Unfocus the text field FocusScope.of(context).unfocus(); @@ -48,8 +51,7 @@ class AuthenticationProvider with ChangeNotifier { "id": [loginResponse.userRequest!.id], "mobileNumber": loginResponse.userRequest!.mobileNumber }, loginResponse.accessToken!); - var commonProvider = - Provider.of(context, listen: false); + var commonProvider = Provider.of(context, listen: false); loginResponse.isFirstTimeLogin = userInfo.user!.first.defaultPwdChgd; commonProvider.loginCredentials = loginResponse; if (userInfo.user!.first.defaultPwdChgd == false) { @@ -61,7 +63,7 @@ class AuthenticationProvider with ChangeNotifier { Navigator.of(context).pushNamedAndRemoveUntil( Routes.HOME, (Route route) => false); } - } on CustomException catch (e, s) { + } on CustomException catch (e, s) { Navigator.pop(context); if (ErrorHandler.handleApiException(context, e, s)) { Notifiers.getToastMessage(context, e.message, 'ERROR'); diff --git a/frontend/mgramseva/lib/providers/common_provider.dart b/frontend/mgramseva/lib/providers/common_provider.dart index 22a16977b..8eb71078e 100644 --- a/frontend/mgramseva/lib/providers/common_provider.dart +++ b/frontend/mgramseva/lib/providers/common_provider.dart @@ -1,5 +1,6 @@ import 'dart:async'; import 'dart:convert'; +import 'dart:developer'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; @@ -15,6 +16,7 @@ import 'package:mgramseva/model/mdms/payment_type.dart'; import 'package:mgramseva/model/user/user_details.dart'; import 'package:mgramseva/model/user_profile/user_profile.dart'; import 'package:mgramseva/providers/language.dart'; +import 'package:mgramseva/repository/authentication_repo.dart'; import 'package:mgramseva/repository/core_repo.dart'; import 'package:mgramseva/routers/routers.dart'; import 'package:mgramseva/services/local_storage.dart'; @@ -79,7 +81,7 @@ class CommonProvider with ChangeNotifier { var response = await CoreRepository().getLocilisation(query); labels = localizedStrings = response; setLocalizationLabels(response); - } catch (e) { + } catch (e) { print(e); } return labels; @@ -262,8 +264,8 @@ class CommonProvider with ChangeNotifier { Future getAppVersionDetails() async { try { - var localizationList = - await CoreRepository().getMdms(initRequestBody({"tenantId": dotenv.get('STATE_LEVEL_TENANT_ID')})); + var localizationList = await CoreRepository().getMdms( + initRequestBody({"tenantId": dotenv.get('STATE_LEVEL_TENANT_ID')})); appVersion = localizationList.mdmsRes!.commonMasters!.appVersion!.first; } catch (e) { print(e.toString()); @@ -324,10 +326,12 @@ class CommonProvider with ChangeNotifier { return userDetails; } - void onLogout() { - navigatorKey.currentState - ?.pushNamedAndRemoveUntil(Routes.SELECT_LANGUAGE, (route) => false); - loginCredentials = null; + void onLogout() async { + await AuthenticationRepository().logoutUser().then((onValue) { + navigatorKey.currentState + ?.pushNamedAndRemoveUntil(Routes.SELECT_LANGUAGE, (route) => false); + loginCredentials = null; + }); } void onTapOfAttachment(FileStore store, context) async { @@ -423,15 +427,13 @@ class CommonProvider with ChangeNotifier { } } - void getFileFromPDFBillService( - body, - params, - mobileNumber, - bill, - mode, - ) async { + void getFileFromPDFBillService(body, params, mobileNumber, bill, mode, + {String? fireStoreId = ""}) async { try { - var res = await CoreRepository().getFileStorefromPdfService(body, params); + var res; + if (fireStoreId == "") { + res = await CoreRepository().getFileStorefromPdfService(body, params); + } String link = (ApplicationLocalizations.of(navigatorKey.currentContext!) .translate(i18.common.SHARE_BILL_LINK) @@ -442,7 +444,7 @@ class CommonProvider with ChangeNotifier { .replaceFirst('{new consumer id}', bill.consumerCode!.toString()) .replaceFirst('{Amount}', bill.totalAmount.toString())); getStoreFileDetails( - res!.filestoreIds!.first, + fireStoreId != "" ? fireStoreId : res!.filestoreIds!.first, mode, mobileNumber, navigatorKey.currentContext, @@ -587,46 +589,59 @@ class CommonProvider with ChangeNotifier { // } static String getAdvanceAdjustedAmount(List demandList) { + // Set Amt as 0 var amount = '0'; var index = -1; + // if demandList.isEmpty return Amt as 0 if (demandList.isEmpty) return amount; + // Sort Demands where Payments were not completed var filteredDemands = demandList.where((e) => !(e.isPaymentCompleted ?? false)).toList(); + + // Early return if first demand has time penalty and there's applicable penalty if (filteredDemands.first.demandDetails?.first.taxHeadMasterCode == 'WS_TIME_PENALTY' && CommonProvider.getPenaltyApplicable(demandList).penaltyApplicable != 0) { + // here also return 0; return amount; } else { for (int i = 0; i < filteredDemands.length; i++) { index = demandList[i].demandDetails?.lastIndexWhere( (e) => e.taxHeadMasterCode == 'WS_ADVANCE_CARRYFORWARD') ?? -1; - + // Find the last index of "WS_ADVANCE_CARRYFORWARD" element in the current demand's details list (if it exists) + // true => index value else => -1 if (index != -1) { var demandDetail = demandList[i].demandDetails?[index]; + // Collection Amt < tax amt if (demandDetail!.collectionAmount!.abs() < demandDetail.taxAmount!.abs()) { + // save amount amount = filteredDemands.first.demandDetails?.last.collectionAmount ?.toString() ?? '0.0'; } else if (demandDetail.collectionAmount! == demandDetail.taxAmount!) { + // Iterate through filteredDemands if (filteredDemands.first.demandDetails?.last.collectionAmount != 0) { var list = []; for (int j = 0; j <= i; j++) { + // Iterate through elements in the current demand's details list for (int k = 0; k < (filteredDemands[j].demandDetails?.length ?? 0); k++) { if (k == index && j == i) break; + // Add amount to collection list.add( filteredDemands[j].demandDetails![k].collectionAmount ?? 0); } } + // find sum of colleted amount var collectedAmount = list.reduce((a, b) => a + b); amount = double.parse("$collectedAmount") >= double.parse("${demandDetail.collectionAmount?.abs()}") @@ -634,6 +649,7 @@ class CommonProvider with ChangeNotifier { ?.toString() ?? '0' : '0'; + // set amount } } } diff --git a/frontend/mgramseva/lib/providers/consumer_details_provider.dart b/frontend/mgramseva/lib/providers/consumer_details_provider.dart index 92b8cac9b..aabae950a 100644 --- a/frontend/mgramseva/lib/providers/consumer_details_provider.dart +++ b/frontend/mgramseva/lib/providers/consumer_details_provider.dart @@ -152,15 +152,12 @@ class ConsumerProvider with ChangeNotifier { isEdit = true; waterconnection = data; waterconnection.getText(); - selectedcycle = {'code':DateTime.fromMillisecondsSinceEpoch(waterconnection.previousReadingDate!), - 'name':"${ApplicationLocalizations.of(navigatorKey.currentContext!) - .translate(DateFormats.timeStampToDate( - waterconnection.previousReadingDate, - format: 'MMMM')) + - " - " + - DateFormats.timeStampToDate( - waterconnection.previousReadingDate, - format: 'yyyy')}"}; + selectedcycle = { + 'code': DateTime.fromMillisecondsSinceEpoch( + waterconnection.previousReadingDate!), + 'name': + "${ApplicationLocalizations.of(navigatorKey.currentContext!).translate(DateFormats.timeStampToDate(waterconnection.previousReadingDate, format: 'MMMM')) + " - " + DateFormats.timeStampToDate(waterconnection.previousReadingDate, format: 'yyyy')}" + }; if (waterconnection.previousReadingDate != null && (languageList?.mdmsRes?.billingService?.taxPeriodList?.isNotEmpty ?? false)) { @@ -479,12 +476,14 @@ class ConsumerProvider with ChangeNotifier { "tenantId": commonProvider.userDetails!.selectedtenant!.code }); boundaryList = []; - result['TenantBoundary']!=null && result['TenantBoundary'].length>0?boundaryList.addAll( - TenantBoundary.fromJson(result['TenantBoundary'][0]).boundary!):{}; + result['TenantBoundary'] != null && result['TenantBoundary'].length > 0 + ? boundaryList.addAll( + TenantBoundary.fromJson(result['TenantBoundary'][0]).boundary!) + : {}; if (boundaryList.length == 1) { property.address.localityCtrl = boundaryList.first; onChangeOfLocality(property.address.localityCtrl); - }else{ + } else { boundaryList.add(Boundary.fromJson({ "code": "WARD1", "name": commonProvider.userDetails!.selectedtenant!.name, @@ -557,8 +556,8 @@ class ConsumerProvider with ChangeNotifier { return (languageList?.mdmsRes?.category?.categoryList ?? []) .map((value) { return value.code!; - }).toList(); - } + }).toList(); + } return []; } @@ -602,7 +601,8 @@ class ConsumerProvider with ChangeNotifier { DateTime result = DateTime.parse(val['code'].toString()); waterconnection.previousReadingDateCtrl.clear(); waterconnection.BillingCycleCtrl.text = result.toLocal().toString(); - waterconnection.meterInstallationDateCtrl.text = result.toLocal().toString(); + waterconnection.meterInstallationDateCtrl.text = + result.toLocal().toString(); notifyListeners(); } @@ -619,8 +619,8 @@ class ConsumerProvider with ChangeNotifier { } //Displaying Billing Cycle Vaule (EX- JAN-2021,,) - List> getBillingCycle() { - var dates = >[]; + List> getBillingCycle() { + var dates = >[]; if (billYear != null) { DatePeriod ytd; var fromDate = DateFormats.getFormattedDateToDateTime( @@ -629,32 +629,35 @@ class ConsumerProvider with ChangeNotifier { var toDate = DateFormats.getFormattedDateToDateTime( DateFormats.timeStampToDate(billYear?.toDate)) as DateTime; - ytd = DatePeriod(fromDate,toDate,DateType.YTD); + ytd = DatePeriod(fromDate, toDate, DateType.YTD); /// Get months based on selected billing year var months = CommonMethods.getPastMonthUntilFinancialYTD(ytd); /// if selected year is future year means all the months will be removed - if(fromDate.year > ytd.endDate.year) months.clear(); + if (fromDate.year > ytd.endDate.year) months.clear(); for (var i = 0; i < months.length; i++) { var prevMonth = months[i].startDate; - var r = {"code": prevMonth, "name": '${ApplicationLocalizations.of(navigatorKey.currentContext!) - .translate((Constants.MONTHS[prevMonth.month - 1])) + - " - " + - prevMonth.year.toString()}'}; + var r = { + "code": prevMonth, + "name": + '${ApplicationLocalizations.of(navigatorKey.currentContext!).translate((Constants.MONTHS[prevMonth.month - 1])) + " - " + prevMonth.year.toString()}' + }; dates.add(r); } } if (dates.length > 0 && waterconnection.connectionType == 'Non_Metered') { return dates; } - return >[]; + return >[]; } + //Displaying Billing Cycle Vaule (EX- JAN-2021,,) - List> getBillingCycleMonthCountCurrent(TaxPeriod? billYear) { - var dates = >[]; - if (billYear!=null) { + List> getBillingCycleMonthCountCurrent( + TaxPeriod? billYear) { + var dates = >[]; + if (billYear != null) { DatePeriod ytd; var fromDate = DateFormats.getFormattedDateToDateTime( DateFormats.timeStampToDate(billYear?.fromDate)) as DateTime; @@ -662,27 +665,28 @@ class ConsumerProvider with ChangeNotifier { var toDate = DateFormats.getFormattedDateToDateTime( DateFormats.timeStampToDate(billYear?.toDate)) as DateTime; - ytd = DatePeriod(fromDate,toDate,DateType.YTD); + ytd = DatePeriod(fromDate, toDate, DateType.YTD); /// Get months based on selected billing year var months = CommonMethods.getPastMonthUntilFinancialYTD(ytd); /// if selected year is future year means all the months will be removed - if(fromDate.year > ytd.endDate.year) months.clear(); + if (fromDate.year > ytd.endDate.year) months.clear(); for (var i = 0; i < months.length; i++) { var prevMonth = months[i].startDate; - var r = {"code": prevMonth, "name": '${ApplicationLocalizations.of(navigatorKey.currentContext!) - .translate((Constants.MONTHS[prevMonth.month - 1])) + - " - " + - prevMonth.year.toString()}'}; + var r = { + "code": prevMonth, + "name": + '${ApplicationLocalizations.of(navigatorKey.currentContext!).translate((Constants.MONTHS[prevMonth.month - 1])) + " - " + prevMonth.year.toString()}' + }; dates.add(r); } } if (dates.length > 0 && waterconnection.connectionType == 'Non_Metered') { return dates; } - return >[]; + return >[]; } incrementIndex(index, consumerGenderKey) async { @@ -716,28 +720,41 @@ class ConsumerProvider with ChangeNotifier { List getFinancialYearList() { if (languageList?.mdmsRes?.billingService?.taxPeriodList != null) { - CommonMethods.getFilteredFinancialYearList(languageList?.mdmsRes?.billingService?.taxPeriodList ?? []); - languageList?.mdmsRes?.billingService?.taxPeriodList!.sort((a,b)=>a.fromDate!.compareTo(b.fromDate!)); + CommonMethods.getFilteredFinancialYearList( + languageList?.mdmsRes?.billingService?.taxPeriodList ?? + []); + languageList?.mdmsRes?.billingService?.taxPeriodList! + .sort((a, b) => a.fromDate!.compareTo(b.fromDate!)); return (languageList?.mdmsRes?.billingService?.taxPeriodList ?? - []) + []) .map((value) { - return value; - }).toList().reversed.toList(); + return value; + }) + .toList() + .reversed + .toList(); } return []; } + List getLastFinancialYearList(int count) { - return getFinancialYearList().length>count?getFinancialYearList().sublist(0,count):getFinancialYearList(); + return getFinancialYearList().length > count + ? getFinancialYearList().sublist(0, count) + : getFinancialYearList(); } - List> newBillingCycleFunction({int pastMonthCount = 2}){ + + List> newBillingCycleFunction({int pastMonthCount = 2}) { List financialYears = getFinancialYearList(); - var dates = >[]; + var dates = >[]; financialYears.forEach((year) { dates.addAll(getBillingCycleMonthCountCurrent(year)); }); dates.sort((a, b) => b['code'].compareTo(a['code'])); - return dates.toList().length>2?dates.toList().sublist(0,2):dates.toList(); + return dates.toList().length > 2 + ? dates.toList().sublist(0, 2) + : dates.toList(); } + void onChangeOfAmountType(value) { waterconnection.paymentType = value; diff --git a/frontend/mgramseva/lib/providers/household_details_provider.dart b/frontend/mgramseva/lib/providers/household_details_provider.dart index b1a68c19f..895c16347 100644 --- a/frontend/mgramseva/lib/providers/household_details_provider.dart +++ b/frontend/mgramseva/lib/providers/household_details_provider.dart @@ -1,12 +1,16 @@ import 'dart:async'; +import 'dart:convert'; +import 'dart:developer'; import 'package:flutter/material.dart'; import 'package:mgramseva/model/bill/billing.dart'; +import 'package:mgramseva/model/common/fetch_bill.dart'; import 'package:mgramseva/model/connection/water_connection.dart'; import 'package:mgramseva/model/demand/demand_list.dart'; import 'package:mgramseva/model/demand/update_demand_list.dart'; import 'package:mgramseva/repository/bill_generation_details_repo.dart'; import 'package:mgramseva/repository/billing_service_repo.dart'; +import 'package:mgramseva/repository/pdf_repository.dart'; import 'package:mgramseva/repository/search_connection_repo.dart'; import 'package:mgramseva/utils/error_logging.dart'; import 'package:mgramseva/utils/global_variables.dart'; @@ -21,19 +25,25 @@ class HouseHoldProvider with ChangeNotifier { late GlobalKey formKey; WaterConnection? waterConnection; UpdateDemandList? updateDemandList; + AggragateDemandDetails? aggDemandItems; + List? demandListItems = []; + bool isfirstdemand = false; var streamController = StreamController.broadcast(); var isVisible = false; Future> checkMeterDemand( BillList? data, WaterConnection? waterConnection) async { - if (data!=null && data.bill!=null && data.bill!.isNotEmpty&& data.bill!.isNotEmpty) { + if (data != null && + data.bill != null && + data.bill!.isNotEmpty && + data.bill!.isNotEmpty) { try { var res = await BillGenerateRepository().searchMeteredDemand({ "tenantId": data.bill!.first.tenantId, "connectionNos": data.bill!.first.consumerCode }); - if (res.meterReadings!=null && res.meterReadings!.isNotEmpty) { + if (res.meterReadings != null && res.meterReadings!.isNotEmpty) { data.bill!.first.meterReadings = res.meterReadings; } if (data.bill!.first.billDetails != null) { @@ -49,19 +59,22 @@ class HouseHoldProvider with ChangeNotifier { return []; } + //*** Body FOR CreatePDF ***// + Map createPDFBody = {}; + Map createPDFPrams = {}; Future fetchDemand(data, List? demandList, [String? id, String? status]) async { var commonProvider = Provider.of( navigatorKey.currentContext!, listen: false); + try { if (data == null) { var res = await SearchConnectionRepository().getconnection({ "tenantId": commonProvider.userDetails!.selectedtenant!.code, ...{'connectionNumber': id}, }); - if (res.waterConnection != null && - res.waterConnection!.isNotEmpty) { + if (res.waterConnection != null && res.waterConnection!.isNotEmpty) { data = res.waterConnection!.first; } } @@ -72,6 +85,33 @@ class HouseHoldProvider with ChangeNotifier { listen: false) .fetchBill(waterConnection, navigatorKey.currentContext!); + //*** Fetch Aggregated Demand Details ***// + aggDemandItems = null; + // isLoading = true; + notifyListeners(); + await BillingServiceRepository().fetchAggregateDemand({ + "tenantId": data.tenantId, + "consumerCode": data.connectionNo.toString(), + "businessService": "WS", + }).then((AggragateDemandDetails? value) { + if (value != null) { + aggDemandItems = value; + notifyListeners(); + } + createPDFBody = { + "Bill": waterConnection?.fetchBill?.bill, + "AggregatedDemands": aggDemandItems, + }; + }); + notifyListeners(); + + //*** Create PDF Request Body ***// + if (waterConnection?.connectionType == 'Metered') { + createPDFPrams = {"key": "ws-bill-v2", "tenantId": data.tenantId}; + } else { + createPDFPrams = {"key": "ws-bill-nm-v2", "tenantId": data.tenantId}; + } + var mdms = await CommonProvider.getMdmsBillingService( commonProvider.userDetails!.selectedtenant?.code.toString() ?? commonProvider.userDetails!.userRequest!.tenantId.toString()); @@ -124,7 +164,7 @@ class HouseHoldProvider with ChangeNotifier { "consumerCode": data.connectionNo.toString(), "businessService": "WS", // "status": "ACTIVE" - }).then((value) async{ + }).then((value) async { value.demands = value.demands ?.where((element) => element.status != 'CANCELLED') .toList(); @@ -144,18 +184,21 @@ class HouseHoldProvider with ChangeNotifier { value.demands?.first.demandDetails?.first.taxHeadMasterCode == 'WS_ADVANCE_CARRYFORWARD' && ((waterConnection?.fetchBill?.bill ?? []).length == 0) || - ((waterConnection?.fetchBill?.bill??[]).length>0?(waterConnection?.fetchBill?.bill?.first.totalAmount ?? 0):0) < 0) { + ((waterConnection?.fetchBill?.bill ?? []).length > 0 + ? (waterConnection?.fetchBill?.bill?.first.totalAmount ?? + 0) + : 0) < + 0) { isfirstdemand = false; } else { isfirstdemand = true; } - if(waterConnection?.connectionType == 'Metered' && waterConnection?.fetchBill?.bill?.isNotEmpty == true){ + if (waterConnection?.connectionType == 'Metered' && + waterConnection?.fetchBill?.bill?.isNotEmpty == true) { value.demands?.first.meterReadings = await checkMeterDemand( waterConnection?.fetchBill, waterConnection); } streamController.add(value); - - // fetchBill(data); } else { DemandList demandList = new DemandList(); demandList.demands = []; diff --git a/frontend/mgramseva/lib/repository/authentication_repo.dart b/frontend/mgramseva/lib/repository/authentication_repo.dart index 68bd4f45a..aaa8aed9c 100644 --- a/frontend/mgramseva/lib/repository/authentication_repo.dart +++ b/frontend/mgramseva/lib/repository/authentication_repo.dart @@ -1,10 +1,14 @@ +import 'dart:convert'; + import 'package:mgramseva/model/user/user_details.dart'; import 'package:mgramseva/model/user_profile/user_profile.dart'; +import 'package:mgramseva/providers/common_provider.dart'; import 'package:mgramseva/services/request_info.dart'; import 'package:mgramseva/services/base_service.dart'; import 'package:mgramseva/services/urls.dart'; import 'package:mgramseva/utils/global_variables.dart'; import 'package:mgramseva/utils/models.dart'; +import 'package:provider/provider.dart'; class AuthenticationRepository extends BaseService { Future validateLogin( @@ -44,4 +48,39 @@ class AuthenticationRepository extends BaseService { } return userProfile; } + + Future logoutUser() async { + var commonProvider = Provider.of( + navigatorKey.currentContext!, + listen: false); + + final requestInfo = RequestInfo( + APIConstants.API_MODULE_NAME, + APIConstants.API_VERSION, + APIConstants.API_TS, + "POST", + APIConstants.API_DID, + APIConstants.API_KEY, + APIConstants.API_MESSAGE_ID, + commonProvider.userDetails!.accessToken, + ); + + var query = { + "access_token": commonProvider.userDetails!.accessToken, + "tenantId": commonProvider.userDetails?.selectedtenant?.code!, + "-": "${DateTime.now().millisecondsSinceEpoch}" + }; + + var res = await makeRequest( + url: UserUrl.LOGOUT_USER, + method: RequestType.POST, + body: { + "access_token": commonProvider.userDetails!.accessToken, + "RequestInfo": requestInfo + }, + queryParameters: query, + ); + + return res; + } } diff --git a/frontend/mgramseva/lib/repository/billing_service_repo.dart b/frontend/mgramseva/lib/repository/billing_service_repo.dart index b297fe76d..0e892c4ce 100644 --- a/frontend/mgramseva/lib/repository/billing_service_repo.dart +++ b/frontend/mgramseva/lib/repository/billing_service_repo.dart @@ -1,3 +1,7 @@ +import 'dart:convert'; +import 'dart:developer'; + +import 'package:flutter/foundation.dart'; import 'package:mgramseva/model/bill/bill_payments.dart'; import 'package:mgramseva/model/bill/billing.dart'; import 'package:mgramseva/model/common/pdf_service.dart'; @@ -45,9 +49,34 @@ class BillingServiceRepository extends BaseService { demandList = DemandList.fromJson({"Demands": res['Demands']}); (res); } + return demandList; } + Future fetchAggregateDemand( + Map queryparams) async { + // log(jsonEncode(queryparams)); + // log(jsonEncode( + // { + // 'RequestInfo': getRequestInfo('_search'), + // }, + // )); + late AggragateDemandDetails aggItems; + var res = await makeRequest( + url: Url.FETCH_AGGREGATE_DEMAND, + body: { + 'RequestInfo': getRequestInfo('_search'), + }, + queryParameters: queryparams, + method: RequestType.POST); + + if (res != null) { + aggItems = AggragateDemandDetails.fromJson(res); + } + + return aggItems; + } + Future fetchUpdateDemand( Map queryparams, dynamic body) async { var commonProvider = Provider.of( diff --git a/frontend/mgramseva/lib/repository/pdf_repository.dart b/frontend/mgramseva/lib/repository/pdf_repository.dart new file mode 100644 index 000000000..cb6bc5516 --- /dev/null +++ b/frontend/mgramseva/lib/repository/pdf_repository.dart @@ -0,0 +1,60 @@ +import 'dart:convert'; +import 'dart:developer'; + +import 'package:flutter/foundation.dart'; +import 'package:mgramseva/model/bill/bill_payments.dart'; +import 'package:mgramseva/model/bill/billing.dart'; +import 'package:mgramseva/model/common/pdf_service.dart'; +import 'package:mgramseva/model/demand/demand_list.dart'; +import 'package:mgramseva/model/demand/update_demand_list.dart'; +import 'package:mgramseva/model/file/file_store.dart'; +import 'package:mgramseva/providers/common_provider.dart'; +import 'package:mgramseva/services/base_service.dart'; +import 'package:mgramseva/services/request_info.dart'; +import 'package:mgramseva/services/urls.dart'; +import 'package:mgramseva/utils/global_variables.dart'; +import 'package:mgramseva/utils/models.dart'; +import 'package:provider/provider.dart'; + +class PDFServiceRepository extends BaseService { + getRequestInfo(CRITERIA) { + var commonProvider = Provider.of( + navigatorKey.currentContext!, + listen: false); + + return RequestInfo( + APIConstants.API_MODULE_NAME, + APIConstants.API_VERSION, + APIConstants.API_TS, + CRITERIA, + APIConstants.API_DID, + APIConstants.API_KEY, + APIConstants.API_MESSAGE_ID, + commonProvider.userDetails?.accessToken, + commonProvider.userDetails?.userRequest?.toJson()); + } + + Future CreatePDF( + body, Map params) async { + late PDFServiceResponse billPaymentpdf; + + var res = await makeRequest( + url: Url.FETCH_FILESTORE_ID_PDF_SERVICE, + body: {"BillAndDemand": 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', + ""), + method: RequestType.POST); + if (res != null) { + billPaymentpdf = PDFServiceResponse.fromJson(res); + } + return billPaymentpdf; + } +} diff --git a/frontend/mgramseva/lib/screeens/add_expense/expense_details.dart b/frontend/mgramseva/lib/screeens/add_expense/expense_details.dart index db6f7e022..ae4a8085d 100644 --- a/frontend/mgramseva/lib/screeens/add_expense/expense_details.dart +++ b/frontend/mgramseva/lib/screeens/add_expense/expense_details.dart @@ -82,7 +82,7 @@ class _ExpenseDetailsState extends State { if (!_numberFocus.hasFocus) { Provider.of(context, listen: false) ..phoneNumberAutoValidation = true - ..callNotifyer(); + ..callNotifyer(); } } @@ -92,61 +92,65 @@ class _ExpenseDetailsState extends State { Provider.of(context, listen: false); return KeyboardFocusWatcher( child: Scaffold( - appBar: CustomAppBar(), - drawer: DrawerWrapper( - Drawer(child: SideBar()), - ), - body: SingleChildScrollView( - child: Column(children: [ - StreamBuilder( - stream: expensesDetailsProvider.streamController.stream, - builder: (context, AsyncSnapshot snapshot) { - if (snapshot.hasData) { - if (snapshot.data is String) { - return CommonWidgets.buildEmptyMessage( - snapshot.data, context); - } - return _buildUserView(); - } else if (snapshot.hasError) { - return Notifiers.networkErrorPage( - context, - () => expensesDetailsProvider.getExpensesDetails( - context, widget.expensesDetails, widget.id)); - } else { - switch (snapshot.connectionState) { - case ConnectionState.waiting: - return Loaders.circularLoader(); - case ConnectionState.active: - return Loaders.circularLoader(); - default: - return Container(); - } - } - }), - Footer() - ])), - bottomNavigationBar: Consumer( - builder: (_, expensesDetailsProvider, child) => BottomButtonBar( - i18.common.SUBMIT, - (isUpdate && - (expensesDetailsProvider - .expenditureDetails.allowEdit ?? - false)) || - ((isUpdate && - !(expensesDetailsProvider - .expenditureDetails.allowEdit ?? - false) && - (expensesDetailsProvider - .expenditureDetails.isBillCancelled ?? - false)) || - !isUpdate) - ? expensesDetailsProvider.isPSPCLEnabled && expensesDetailsProvider - .expenditureDetails.expenseType=='ELECTRICITY_BILL'?null:() => expensesDetailsProvider.validateExpensesDetails( - context, isUpdate) - : null, - key: Keys.expense.EXPENSE_SUBMIT, - ), - ))); + appBar: CustomAppBar(), + drawer: DrawerWrapper( + Drawer(child: SideBar()), + ), + body: SingleChildScrollView( + child: Column(children: [ + StreamBuilder( + stream: expensesDetailsProvider.streamController.stream, + builder: (context, AsyncSnapshot snapshot) { + if (snapshot.hasData) { + if (snapshot.data is String) { + return CommonWidgets.buildEmptyMessage( + snapshot.data, context); + } + return _buildUserView(); + } else if (snapshot.hasError) { + return Notifiers.networkErrorPage( + context, + () => expensesDetailsProvider.getExpensesDetails( + context, widget.expensesDetails, widget.id)); + } else { + switch (snapshot.connectionState) { + case ConnectionState.waiting: + return Loaders.circularLoader(); + case ConnectionState.active: + return Loaders.circularLoader(); + default: + return Container(); + } + } + }), + Footer() + ])), + bottomNavigationBar: Consumer( + builder: (_, expensesDetailsProvider, child) => BottomButtonBar( + i18.common.SUBMIT, + (isUpdate && + (expensesDetailsProvider + .expenditureDetails.allowEdit ?? + false)) || + ((isUpdate && + !(expensesDetailsProvider + .expenditureDetails.allowEdit ?? + false) && + (expensesDetailsProvider + .expenditureDetails.isBillCancelled ?? + false)) || + !isUpdate) + ? expensesDetailsProvider.isPSPCLEnabled && + expensesDetailsProvider + .expenditureDetails.expenseType == + 'ELECTRICITY_BILL' + ? null + : () => expensesDetailsProvider.validateExpensesDetails( + context, isUpdate) + : null, + key: Keys.expense.EXPENSE_SUBMIT, + ), + ))); } saveInput(context) async { @@ -204,31 +208,36 @@ class _ExpenseDetailsState extends State { if (isUpdate) BuildTextField( '${i18.common.BILL_ID}', - expensesDetailsProvider.expenditureDetails.challanNumberCtrl, + expensesDetailsProvider + .expenditureDetails.challanNumberCtrl, isDisabled: true, ), SelectFieldBuilder( i18.expense.EXPENSE_TYPE, - expensesDetailsProvider.expenditureDetails.expenseType, + expensesDetailsProvider + .expenditureDetails.expenseType, '', '', expensesDetailsProvider.onChangeOfExpenses, - expensesDetailsProvider.getExpenseTypeList(isSearch: isUpdate), + expensesDetailsProvider.getExpenseTypeList( + isSearch: isUpdate), true, - readOnly: !expensesDetailsProvider.expenditureDetails.allowEdit!, + readOnly: !expensesDetailsProvider + .expenditureDetails.allowEdit!, requiredMessage: i18.expense.SELECT_EXPENDITURE_CATEGORY, contextKey: expenseProvider.expenseWalkthrougList[0].key, - controller: expensesDetailsProvider.expenditureDetails.expenseTypeController, + controller: expensesDetailsProvider + .expenditureDetails.expenseTypeController, key: Keys.expense.EXPENSE_TYPE, - itemAsString: (i) =>'${ApplicationLocalizations.of(context) - .translate( - i.toString())}', + itemAsString: (i) => + '${ApplicationLocalizations.of(context).translate(i.toString())}', ), AutoCompleteView( labelText: i18.expense.VENDOR_NAME, - controller: expensesDetailsProvider.expenditureDetails.vendorNameCtrl, + controller: expensesDetailsProvider + .expenditureDetails.vendorNameCtrl, suggestionsBoxController: expensesDetailsProvider .suggestionsBoxController, onSuggestionSelected: @@ -237,7 +246,8 @@ class _ExpenseDetailsState extends State { expensesDetailsProvider.onSearchVendorList, listTile: buildTile, isRequired: true, - isEnabled: expensesDetailsProvider.expenditureDetails.allowEdit, + isEnabled: expensesDetailsProvider + .expenditureDetails.allowEdit, requiredMessage: i18.expense.MENTION_NAME_OF_VENDOR, inputFormatter: [ @@ -248,30 +258,38 @@ class _ExpenseDetailsState extends State { expenseProvider.expenseWalkthrougList[1].key, key: Keys.expense.VENDOR_NAME, ), - if (expensesDetailsProvider.expenditureDetails.vendorNameCtrl.text.trim().isNotEmpty) + if (expensesDetailsProvider + .expenditureDetails.vendorNameCtrl.text + .trim() + .isNotEmpty) BuildTextField( '${i18.common.MOBILE_NUMBER}', - expensesDetailsProvider.expenditureDetails.mobileNumberController, + expensesDetailsProvider + .expenditureDetails.mobileNumberController, isRequired: true, prefixText: '+91 - ', textInputType: TextInputType.number, validator: Validators.mobileNumberValidator, focusNode: _numberFocus, - autoValidation: expensesDetailsProvider.phoneNumberAutoValidation + autoValidation: expensesDetailsProvider + .phoneNumberAutoValidation ? AutovalidateMode.always : AutovalidateMode.disabled, maxLength: 10, - isDisabled: !expensesDetailsProvider.isNewVendor(), + isDisabled: + !expensesDetailsProvider.isNewVendor(), inputFormatter: [ FilteringTextInputFormatter.allow( RegExp("[0-9]")) ], - onChange: expensesDetailsProvider.onChangeOfMobileNumber, + onChange: expensesDetailsProvider + .onChangeOfMobileNumber, key: Keys.expense.VENDOR_MOBILE_NUMBER, ), BuildTextField( '${i18.expense.AMOUNT}', - expensesDetailsProvider.expenditureDetails.expensesAmount!.first.amountCtrl, + expensesDetailsProvider.expenditureDetails + .expensesAmount!.first.amountCtrl, isRequired: true, textInputType: TextInputType.number, inputFormatter: [ @@ -280,7 +298,9 @@ class _ExpenseDetailsState extends State { ], placeHolder: '${i18.expense.AMOUNT} (₹)', labelSuffix: '(₹)', - isDisabled: (expensesDetailsProvider.expenditureDetails.allowEdit ?? true) + isDisabled: (expensesDetailsProvider + .expenditureDetails.allowEdit ?? + true) ? false : true, requiredMessage: @@ -290,103 +310,154 @@ class _ExpenseDetailsState extends State { expenseProvider.expenseWalkthrougList[2].key, key: Keys.expense.EXPENSE_AMOUNT, ), - LayoutBuilder( - builder: (context, constraints) { - var margin = constraints.maxWidth > 760 ? EdgeInsets.only( - top: 20.0, bottom: 5, right: 10, left: 10) : null; - return Container( - padding: constraints.maxWidth > 760 ? EdgeInsets.only(bottom: 12) : EdgeInsets.all(8), - margin: EdgeInsets.all(10), + LayoutBuilder(builder: (context, constraints) { + var margin = constraints.maxWidth > 760 + ? EdgeInsets.only( + top: 20.0, bottom: 5, right: 10, left: 10) + : null; + return Container( + padding: constraints.maxWidth > 760 + ? EdgeInsets.only(bottom: 12) + : EdgeInsets.all(8), + margin: EdgeInsets.all(10), decoration: BoxDecoration( - color: Color.fromRGBO(238, 238, 238, 0.4), - border: Border.all(color: Colors.grey, width: 0.6), - borderRadius: BorderRadius.all(Radius.circular(10), - ) - ), + color: Color.fromRGBO(238, 238, 238, 0.4), + border: Border.all( + color: Colors.grey, width: 0.6), + borderRadius: BorderRadius.all( + Radius.circular(10), + )), child: Wrap( children: [ BasicDateField( i18.expense.BILL_DATE, true, - expensesDetailsProvider.expenditureDetails.billDateCtrl, - firstDate: expensesDetailsProvider.expenditureDetails.billIssuedDateCtrl.text - .trim() - .isEmpty + expensesDetailsProvider + .expenditureDetails.billDateCtrl, + firstDate: expensesDetailsProvider + .expenditureDetails + .billIssuedDateCtrl + .text + .trim() + .isEmpty ? null - : DateFormats.getFormattedDateToDateTime( - expensesDetailsProvider.expenditureDetails.billIssuedDateCtrl.text + : DateFormats + .getFormattedDateToDateTime( + expensesDetailsProvider + .expenditureDetails + .billIssuedDateCtrl + .text + .trim(), + ), + initialDate: DateFormats + .getFormattedDateToDateTime( + expensesDetailsProvider + .expenditureDetails + .billDateCtrl + .text .trim(), ), - initialDate: - DateFormats.getFormattedDateToDateTime( - expensesDetailsProvider.expenditureDetails.billDateCtrl.text.trim(), - ), lastDate: DateTime.now(), - onChangeOfDate: - expensesDetailsProvider.onChangeOfBillDate, - isEnabled: expensesDetailsProvider.expenditureDetails.allowEdit, - requiredMessage: - i18.expense.DATE_BILL_ENTERED_IN_RECORDS, - contextKey: - expenseProvider.expenseWalkthrougList[3].key, + onChangeOfDate: expensesDetailsProvider + .onChangeOfBillDate, + isEnabled: expensesDetailsProvider + .expenditureDetails.allowEdit, + requiredMessage: i18 + .expense.DATE_BILL_ENTERED_IN_RECORDS, + contextKey: expenseProvider + .expenseWalkthrougList[3].key, key: Keys.expense.EXPENSE_BILL_DATE, margin: margin, ), BasicDateField( i18.expense.EXPENSE_START_DATE, true, - expensesDetailsProvider.expenditureDetails.fromDateCtrl, - onChangeOfDate: - expensesDetailsProvider.onChangeOfStartEndDate, - lastDate: DateFormats.getFormattedDateToDateTime( - expensesDetailsProvider.expenditureDetails.billDateCtrl.text.trim(), - ) ?? DateTime.now(), - isEnabled: expensesDetailsProvider.expenditureDetails.allowEdit, - validator: (val) => expensesDetailsProvider.fromToDateValidator(val, true), - autoValidation: expenseProvider.dateAutoValidation ? AutovalidateMode.always - : AutovalidateMode.disabled, + expensesDetailsProvider + .expenditureDetails.fromDateCtrl, + onChangeOfDate: expensesDetailsProvider + .onChangeOfStartEndDate, + lastDate: DateFormats + .getFormattedDateToDateTime( + expensesDetailsProvider + .expenditureDetails + .billDateCtrl + .text + .trim(), + ) ?? + DateTime.now(), + isEnabled: expensesDetailsProvider + .expenditureDetails.allowEdit, + validator: (val) => + expensesDetailsProvider + .fromToDateValidator(val, true), + autoValidation: + expenseProvider.dateAutoValidation + ? AutovalidateMode.always + : AutovalidateMode.disabled, margin: margin, ), BasicDateField( i18.expense.EXPENSE_END_DATE, true, - expensesDetailsProvider.expenditureDetails.toDateCtrl, - initialDate: DateFormats.getFormattedDateToDateTime( - expensesDetailsProvider.expenditureDetails.billDateCtrl.text.trim(), + expensesDetailsProvider + .expenditureDetails.toDateCtrl, + initialDate: DateFormats + .getFormattedDateToDateTime( + expensesDetailsProvider + .expenditureDetails + .billDateCtrl + .text + .trim(), ), - lastDate: DateFormats.getFormattedDateToDateTime( - expensesDetailsProvider.expenditureDetails.billDateCtrl.text.trim(), - ) ?? DateTime.now(), - onChangeOfDate: - expensesDetailsProvider.onChangeOfStartEndDate, - isEnabled: expensesDetailsProvider.expenditureDetails.allowEdit, - validator: expensesDetailsProvider.fromToDateValidator, - autoValidation: expenseProvider.dateAutoValidation ? AutovalidateMode.always - : AutovalidateMode.disabled, + lastDate: DateFormats + .getFormattedDateToDateTime( + expensesDetailsProvider + .expenditureDetails + .billDateCtrl + .text + .trim(), + ) ?? + DateTime.now(), + onChangeOfDate: expensesDetailsProvider + .onChangeOfStartEndDate, + isEnabled: expensesDetailsProvider + .expenditureDetails.allowEdit, + validator: expensesDetailsProvider + .fromToDateValidator, + autoValidation: + expenseProvider.dateAutoValidation + ? AutovalidateMode.always + : AutovalidateMode.disabled, margin: margin, ) ], ), ); - } - ), + }), BasicDateField( i18.expense.PARTY_BILL_DATE, false, - expensesDetailsProvider.expenditureDetails.billIssuedDateCtrl, + expensesDetailsProvider + .expenditureDetails.billIssuedDateCtrl, initialDate: DateFormats.getFormattedDateToDateTime( - expensesDetailsProvider.expenditureDetails.billIssuedDateCtrl.text.trim(), + expensesDetailsProvider + .expenditureDetails.billIssuedDateCtrl.text + .trim(), ), - lastDate: expensesDetailsProvider.expenditureDetails.billDateCtrl.text + lastDate: expensesDetailsProvider + .expenditureDetails.billDateCtrl.text .trim() .isEmpty ? DateTime.now() : DateFormats.getFormattedDateToDateTime( - expensesDetailsProvider.expenditureDetails.billDateCtrl.text.trim()), + expensesDetailsProvider + .expenditureDetails.billDateCtrl.text + .trim()), onChangeOfDate: expensesDetailsProvider.onChangeOfDate, - isEnabled: expensesDetailsProvider.expenditureDetails.allowEdit, + isEnabled: expensesDetailsProvider + .expenditureDetails.allowEdit, contextKey: expenseProvider.expenseWalkthrougList[4].key, key: Keys.expense.EXPENSE_PARTY_DATE, @@ -394,31 +465,37 @@ class _ExpenseDetailsState extends State { RadioButtonFieldBuilder( context, i18.expense.HAS_THIS_BILL_PAID, - expensesDetailsProvider.expenditureDetails.isBillPaid, + expensesDetailsProvider + .expenditureDetails.isBillPaid, '', '', true, Constants.EXPENSESTYPE, expensesDetailsProvider.onChangeOfBillPaid, - isEnabled: expensesDetailsProvider.expenditureDetails.allowEdit), + isEnabled: expensesDetailsProvider + .expenditureDetails.allowEdit), if (expensesDetailsProvider.expenditureDetails.isBillPaid ?? false) BasicDateField(i18.expense.PAYMENT_DATE, true, expensesDetailsProvider.expenditureDetails.paidDateCtrl, - firstDate: - DateFormats.getFormattedDateToDateTime( - expensesDetailsProvider.expenditureDetails.billDateCtrl.text - .trim()), + firstDate: DateFormats.getFormattedDateToDateTime( + expensesDetailsProvider + .expenditureDetails.billDateCtrl.text + .trim()), lastDate: DateTime.now(), - initialDate: - DateFormats.getFormattedDateToDateTime( - expensesDetailsProvider.expenditureDetails.paidDateCtrl.text - .trim()), + initialDate: DateFormats.getFormattedDateToDateTime( + expensesDetailsProvider + .expenditureDetails.paidDateCtrl.text + .trim()), onChangeOfDate: expensesDetailsProvider.onChangeOfDate, - isEnabled: expensesDetailsProvider.expenditureDetails.allowEdit), + isEnabled: expensesDetailsProvider + .expenditureDetails.allowEdit), if (isUpdate && - expensesDetailsProvider.expenditureDetails.fileStoreList != null && - expensesDetailsProvider.expenditureDetails.fileStoreList!.isNotEmpty) + expensesDetailsProvider + .expenditureDetails.fileStoreList != + null && + expensesDetailsProvider.expenditureDetails + .fileStoreList!.isNotEmpty) Container( margin: const EdgeInsets.only( top: 20.0, bottom: 5, right: 20, left: 20), @@ -433,7 +510,8 @@ class _ExpenseDetailsState extends State { fontSize: 19, fontWeight: FontWeight.normal)), Wrap( - children: expensesDetailsProvider.expenditureDetails.fileStoreList! + children: expensesDetailsProvider + .expenditureDetails.fileStoreList! .map((e) => InkWell( onTap: () => expensesDetailsProvider @@ -464,7 +542,9 @@ class _ExpenseDetailsState extends State { ], ), ), - if (expensesDetailsProvider.expenditureDetails.allowEdit ?? true) + if (expensesDetailsProvider + .expenditureDetails.allowEdit ?? + true) FilePickerDemo( key: expensesDetailsProvider.filePickerKey, callBack: @@ -474,37 +554,54 @@ class _ExpenseDetailsState extends State { .expenseWalkthrougList[5].key, ), if (isUpdate) - expensesDetailsProvider.isPSPCLEnabled && expensesDetailsProvider.expenditureDetails.expenseType=='ELECTRICITY_BILL'?Container(): - Container( - alignment: Alignment.centerLeft, - padding: EdgeInsets.symmetric( - vertical: 10, horizontal: 18), - child: Wrap( - direction: Axis.horizontal, - crossAxisAlignment: WrapCrossAlignment.center, - spacing: 8, - children: [ - SizedBox( - width: 20, - height: 20, - child: Checkbox( - value: expensesDetailsProvider.expenditureDetails.isBillCancelled, - onChanged: - expensesDetailsProvider.expenditureDetails.allowEdit == true ? - expensesDetailsProvider - .onChangeOfCheckBox : null ) , + expensesDetailsProvider.isPSPCLEnabled && + expensesDetailsProvider + .expenditureDetails.expenseType == + 'ELECTRICITY_BILL' + ? Container() + : Container( + alignment: Alignment.centerLeft, + padding: EdgeInsets.symmetric( + vertical: 10, horizontal: 18), + child: Wrap( + direction: Axis.horizontal, + crossAxisAlignment: + WrapCrossAlignment.center, + spacing: 8, + children: [ + SizedBox( + width: 20, + height: 20, + child: Checkbox( + value: expensesDetailsProvider + .expenditureDetails + .isBillCancelled, + onChanged: expensesDetailsProvider + .expenditureDetails + .allowEdit == + true + ? expensesDetailsProvider + .onChangeOfCheckBox + : null), + ), + Text( + ApplicationLocalizations.of( + context) + .translate(i18.expense + .MARK_BILL_HAS_CANCELLED), + style: TextStyle( + fontSize: 19, + color: expensesDetailsProvider + .expenditureDetails + .allowEdit == + true + ? Colors.black + : Colors.grey, + fontWeight: + FontWeight.normal)) + ], ), - Text( - ApplicationLocalizations.of(context) - .translate(i18.expense - .MARK_BILL_HAS_CANCELLED), - style: TextStyle( - fontSize: 19, - color: expensesDetailsProvider.expenditureDetails.allowEdit == true ? Colors.black: Colors.grey, - fontWeight: FontWeight.normal)) - ], - ), - ), + ), SizedBox( height: 20, ), @@ -520,17 +617,17 @@ class _ExpenseDetailsState extends State { Widget buildTile(context, vendor) { var style = TextStyle(fontSize: 18); return Container( - padding: EdgeInsets.symmetric(vertical: 6, horizontal: 5), - child: - Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text('${vendor?.name}', style: style), - Text('${vendor.owner.mobileNumber}', style : style.apply(fontSizeDelta: -2)) - ], - )); + padding: EdgeInsets.symmetric(vertical: 6, horizontal: 5), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text('${vendor?.name}', style: style), + Text('${vendor.owner.mobileNumber}', + style: style.apply(fontSizeDelta: -2)) + ], + )); } - bool get isUpdate => widget.id != null || widget.expensesDetails != null ; + bool get isUpdate => widget.id != null || widget.expensesDetails != null; } diff --git a/frontend/mgramseva/lib/screeens/connection_results/connection_details_card.dart b/frontend/mgramseva/lib/screeens/connection_results/connection_details_card.dart index da6729b67..8b6b1fee3 100644 --- a/frontend/mgramseva/lib/screeens/connection_results/connection_details_card.dart +++ b/frontend/mgramseva/lib/screeens/connection_results/connection_details_card.dart @@ -1,3 +1,6 @@ +import 'dart:convert'; +import 'dart:developer'; + import 'package:flutter/material.dart'; import 'package:mgramseva/model/connection/water_connections.dart'; import 'package:mgramseva/providers/common_provider.dart'; @@ -64,27 +67,31 @@ class SearchConnectionDetailCard extends StatelessWidget { return Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( padding: EdgeInsets.only(left: 15), - child: isNameSearch == true ? Text( - waterconnections.waterConnectionData!.length.toString() != null - ? waterconnections.waterConnectionData!.length.toString() + - " " + - '${waterconnections.waterConnectionData!.length.toString() == '1' ? ApplicationLocalizations.of(context).translate(i18.searchWaterConnection.CONNECTION_FOUND_ONE) : ApplicationLocalizations.of(context).translate(i18.searchWaterConnection.CONNECTION_FOUND)}' - : "0" + - ApplicationLocalizations.of(context).translate( - i18.searchWaterConnection.CONNECTION_FOUND), - style: TextStyle(fontSize: 28, fontWeight: FontWeight.w700), - textAlign: TextAlign.left, - ) : Text( - waterconnections.waterConnection!.length.toString() != null - ? waterconnections.waterConnection!.length.toString() + - " " + - '${waterconnections.waterConnection!.length.toString() == '1' ? ApplicationLocalizations.of(context).translate(i18.searchWaterConnection.CONNECTION_FOUND_ONE) : ApplicationLocalizations.of(context).translate(i18.searchWaterConnection.CONNECTION_FOUND)}' - : "0" + - ApplicationLocalizations.of(context).translate( - i18.searchWaterConnection.CONNECTION_FOUND), - style: TextStyle(fontSize: 28, fontWeight: FontWeight.w700), - textAlign: TextAlign.left, - )), + child: isNameSearch == true + ? Text( + waterconnections.waterConnectionData!.length.toString() != + null + ? waterconnections.waterConnectionData!.length + .toString() + + " " + + '${waterconnections.waterConnectionData!.length.toString() == '1' ? ApplicationLocalizations.of(context).translate(i18.searchWaterConnection.CONNECTION_FOUND_ONE) : ApplicationLocalizations.of(context).translate(i18.searchWaterConnection.CONNECTION_FOUND)}' + : "0" + + ApplicationLocalizations.of(context).translate( + i18.searchWaterConnection.CONNECTION_FOUND), + style: TextStyle(fontSize: 28, fontWeight: FontWeight.w700), + textAlign: TextAlign.left, + ) + : Text( + waterconnections.waterConnection!.length.toString() != null + ? waterconnections.waterConnection!.length.toString() + + " " + + '${waterconnections.waterConnection!.length.toString() == '1' ? ApplicationLocalizations.of(context).translate(i18.searchWaterConnection.CONNECTION_FOUND_ONE) : ApplicationLocalizations.of(context).translate(i18.searchWaterConnection.CONNECTION_FOUND)}' + : "0" + + ApplicationLocalizations.of(context).translate( + i18.searchWaterConnection.CONNECTION_FOUND), + style: TextStyle(fontSize: 28, fontWeight: FontWeight.w700), + textAlign: TextAlign.left, + )), Padding( padding: const EdgeInsets.all(15.0), child: RichText( @@ -114,7 +121,9 @@ class SearchConnectionDetailCard extends StatelessWidget { Expanded( child: ListView.builder( padding: const EdgeInsets.all(0), - itemCount: isNameSearch == true ? waterconnections.waterConnectionData!.length : waterconnections.waterConnection!.length, + itemCount: isNameSearch == true + ? waterconnections.waterConnectionData!.length + : waterconnections.waterConnection!.length, itemBuilder: (BuildContext context, int index) { return Card( child: Padding( @@ -126,153 +135,142 @@ class SearchConnectionDetailCard extends StatelessWidget { ApplicationLocalizations.of(context).translate( i18.searchWaterConnection .NEW_CONNECTION_ID), - isNameSearch == true ? waterconnections - .waterConnectionData![index].connectionNo : waterconnections.waterConnection![index].connectionNo, + isNameSearch == true + ? waterconnections + .waterConnectionData![index] + .connectionNo + : waterconnections + .waterConnection![index].connectionNo, context, constraints), _getDetailtext( ApplicationLocalizations.of(context).translate( i18.searchWaterConnection .OLD_CONNECTION_ID), - isNameSearch == true ? (waterconnections.waterConnectionData![index] - .oldConnectionNo != - "" - ? waterconnections - .waterConnectionData![index].oldConnectionNo - : ApplicationLocalizations.of(context) - .translate(i18.common.NA)) : (waterconnections.waterConnection![index] - .oldConnectionNo != - "" - ? waterconnections - .waterConnection![index].oldConnectionNo - : ApplicationLocalizations.of(context) - .translate(i18.common.NA)), + isNameSearch == true + ? (waterconnections + .waterConnectionData![index] + .oldConnectionNo != + "" + ? waterconnections + .waterConnectionData![index] + .oldConnectionNo + : ApplicationLocalizations.of(context) + .translate(i18.common.NA)) + : (waterconnections.waterConnection![index] + .oldConnectionNo != + "" + ? waterconnections + .waterConnection![index] + .oldConnectionNo + : ApplicationLocalizations.of(context) + .translate(i18.common.NA)), context, constraints), _getDetailtext( ApplicationLocalizations.of(context).translate( i18.searchWaterConnection .RESULTS_CONSUMER_NAME), - isNameSearch == true ? (waterconnections.waterConnectionData![index] - .connectionHolders != - null - ? waterconnections.waterConnectionData![index] - .connectionHolders!.first.name - : ApplicationLocalizations.of(context) - .translate(i18.common.NA) ) : (waterconnections.waterConnection![index] - .connectionHolders != - null - ? waterconnections.waterConnection![index] - .connectionHolders!.first.name - : ApplicationLocalizations.of(context) - .translate(i18.common.NA)), + isNameSearch == true + ? (waterconnections + .waterConnectionData![index] + .connectionHolders != + null + ? waterconnections + .waterConnectionData![index] + .connectionHolders! + .first + .name + : ApplicationLocalizations.of(context) + .translate(i18.common.NA)) + : (waterconnections.waterConnection![index] + .connectionHolders != + null + ? waterconnections + .waterConnection![index] + .connectionHolders! + .first + .name + : ApplicationLocalizations.of(context) + .translate(i18.common.NA)), context, constraints), _getDetailtext( ApplicationLocalizations.of(context).translate( i18.searchWaterConnection .RESULTS_PHONE_NUM), - isNameSearch == true ? (waterconnections.waterConnectionData![index] - .connectionHolders != - null - ? '+91 - ' + - '${waterconnections.waterConnectionData![index].connectionHolders!.first.mobileNumber}' - : ApplicationLocalizations.of(context) - .translate(i18.common.NA)) : (waterconnections.waterConnection![index] - .connectionHolders != - null - ? '+91 - ' + - '${waterconnections.waterConnection![index].connectionHolders!.first.mobileNumber}' - : ApplicationLocalizations.of(context) - .translate(i18.common.NA)), + isNameSearch == true + ? (waterconnections + .waterConnectionData![index] + .connectionHolders != + null + ? '+91 - ' + + '${waterconnections.waterConnectionData![index].connectionHolders!.first.mobileNumber}' + : ApplicationLocalizations.of(context) + .translate(i18.common.NA)) + : (waterconnections.waterConnection![index] + .connectionHolders != + null + ? '+91 - ' + + '${waterconnections.waterConnection![index].connectionHolders!.first.mobileNumber}' + : ApplicationLocalizations.of(context) + .translate(i18.common.NA)), context, constraints), _getDetailtext( ApplicationLocalizations.of(context).translate( i18.searchWaterConnection.RESULTS_ADDRESS), - isNameSearch == true ? ((waterconnections.waterConnectionData![index] - .additionalDetails!.doorNo != - null - ? waterconnections + isNameSearch == true + ? ((waterconnections .waterConnectionData![index] .additionalDetails! - .doorNo! != - "" - ? waterconnections + .doorNo != + null + ? waterconnections.waterConnectionData![index].additionalDetails!.doorNo! != + "" + ? waterconnections.waterConnectionData![index].additionalDetails!.doorNo! + + ', ' + : "" + : "") + + (waterconnections .waterConnectionData![index] .additionalDetails! - .doorNo! + - ', ' - : "" - : "") + - (waterconnections.waterConnectionData![index] - .additionalDetails!.street != - null - ? waterconnections + .street != + null + ? waterconnections.waterConnectionData![index].additionalDetails!.street! != + "" + ? waterconnections.waterConnectionData![index].additionalDetails!.street! + + ', ' + : "" + : "") + + (waterconnections .waterConnectionData![index] .additionalDetails! - .street! != - "" - ? waterconnections - .waterConnectionData![index] - .additionalDetails! - .street! + - ', ' - : "" - : "") + - (waterconnections.waterConnectionData![index] - .additionalDetails!.locality!.isNotEmpty - || waterconnections.waterConnectionData![index] - .additionalDetails!.locality != null - ? ApplicationLocalizations.of(context) - .translate(waterconnections.waterConnectionData![index] - .additionalDetails!.locality.toString()) : "" ) + - ', ' + - ApplicationLocalizations.of(context) - .translate(commonProvider.userDetails!.selectedtenant!.code!)) : - ((waterconnections.waterConnection![index] - .additionalDetails!.doorNo != - null - ? waterconnections - .waterConnection![index] - .additionalDetails! - .doorNo! != - "" - ? waterconnections - .waterConnection![index] - .additionalDetails! - .doorNo! + - ', ' - : "" - : "") + - (waterconnections.waterConnection![index] - .additionalDetails!.street != - null - ? waterconnections - .waterConnection![index] - .additionalDetails! - .street! != - "" - ? waterconnections - .waterConnection![index] - .additionalDetails! - .street! + - ', ' - : "" - : "") + - (waterconnections - .waterConnection![index] - .additionalDetails!.locality!.isNotEmpty - || waterconnections - .waterConnection![index] - .additionalDetails!.locality != null - ? ApplicationLocalizations.of(context) - .translate(waterconnections - .waterConnection![index] - .additionalDetails!.locality.toString()) : "" ) + - ', ' + - ApplicationLocalizations.of(context) - .translate(commonProvider.userDetails!.selectedtenant!.code!)), + .locality! + .isNotEmpty || + waterconnections.waterConnectionData![index].additionalDetails!.locality != + null + ? ApplicationLocalizations.of(context).translate(waterconnections + .waterConnectionData![index] + .additionalDetails! + .locality + .toString()) + : "") + + ', ' + + ApplicationLocalizations.of(context).translate(commonProvider.userDetails!.selectedtenant!.code!)) + : ((waterconnections.waterConnection![index].additionalDetails!.doorNo != null + ? waterconnections.waterConnection![index].additionalDetails!.doorNo! != "" + ? waterconnections.waterConnection![index].additionalDetails!.doorNo! + ', ' + : "" + : "") + + (waterconnections.waterConnection![index].additionalDetails!.street != null + ? waterconnections.waterConnection![index].additionalDetails!.street! != "" + ? waterconnections.waterConnection![index].additionalDetails!.street! + ', ' + : "" + : "") + + (waterconnections.waterConnection![index].additionalDetails!.locality!.isNotEmpty || waterconnections.waterConnection![index].additionalDetails!.locality != null ? ApplicationLocalizations.of(context).translate(waterconnections.waterConnection![index].additionalDetails!.locality.toString()) : "") + + ', ' + + ApplicationLocalizations.of(context).translate(commonProvider.userDetails!.selectedtenant!.code!)), context, constraints), SizedBox( @@ -286,23 +284,30 @@ class SearchConnectionDetailCard extends StatelessWidget { ? i18.searchWaterConnection .HOUSE_DETAILS_VIEW : i18.searchWaterConnection - .HOUSE_DETAILS_EDIT, - () => Navigator.pushNamed( - context, - (arguments['Mode'] == 'collect' - ? Routes.HOUSEHOLD_DETAILS - : arguments['Mode'] == 'receipts' - ? Routes.HOUSEHOLD_DETAILS - : Routes.CONSUMER_UPDATE), - arguments: { - "waterconnections": isNameSearch == true ? waterconnections - .waterConnectionData![index] : waterconnections - .waterConnection![index], - "mode": arguments['Mode'], - "status": isNameSearch == true ? waterconnections - .waterConnectionData![index].status : waterconnections - .waterConnection![index].status - })), + .HOUSE_DETAILS_EDIT, () { + log("${isNameSearch}"); + log("${jsonEncode(waterconnections.waterConnection![index])}"); + Navigator.pushNamed( + context, + (arguments['Mode'] == 'collect' + ? Routes.HOUSEHOLD_DETAILS + : arguments['Mode'] == 'receipts' + ? Routes.HOUSEHOLD_DETAILS + : Routes.CONSUMER_UPDATE), + arguments: { + "waterconnections": isNameSearch == true + ? waterconnections + .waterConnectionData![index] + : waterconnections + .waterConnection![index], + "mode": arguments['Mode'], + "status": isNameSearch == true + ? waterconnections + .waterConnectionData![index].status + : waterconnections + .waterConnection![index].status + }); + }), SizedBox( height: 8, ), diff --git a/frontend/mgramseva/lib/screeens/connection_results/connection_results.dart b/frontend/mgramseva/lib/screeens/connection_results/connection_results.dart index f37112189..9149823f0 100644 --- a/frontend/mgramseva/lib/screeens/connection_results/connection_results.dart +++ b/frontend/mgramseva/lib/screeens/connection_results/connection_results.dart @@ -1,3 +1,6 @@ +import 'dart:convert'; +import 'dart:developer'; + import 'package:flutter/material.dart'; import 'package:mgramseva/model/connection/water_connections.dart'; import 'package:mgramseva/providers/search_connection_provider.dart'; @@ -33,7 +36,11 @@ class _SearchConsumerResultState extends State { } buildconsumerView(WaterConnections waterConnections) { - return SearchConnectionDetailCard(waterConnections, widget.arguments, isNameSearch: widget.arguments['isNameSearch'],); + return SearchConnectionDetailCard( + waterConnections, + widget.arguments, + isNameSearch: widget.arguments['isNameSearch'], + ); } @override diff --git a/frontend/mgramseva/lib/screeens/consumer_details/consumer_details.dart b/frontend/mgramseva/lib/screeens/consumer_details/consumer_details.dart index aa6efb887..9575cd86d 100644 --- a/frontend/mgramseva/lib/screeens/consumer_details/consumer_details.dart +++ b/frontend/mgramseva/lib/screeens/consumer_details/consumer_details.dart @@ -1,3 +1,6 @@ +import 'dart:convert'; +import 'dart:developer'; + import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:mgramseva/model/connection/property.dart'; @@ -298,7 +301,8 @@ class _ConsumerDetailsState extends State { false, // contextkey: consumerProvider // .consmerWalkthrougList[6].key, - itemAsString: (i) =>'${ApplicationLocalizations.of(context).translate(i.toString())}', + itemAsString: (i) => + '${ApplicationLocalizations.of(context).translate(i.toString())}', controller: consumerProvider.waterconnection.categoryCtrl, key: Keys.createConsumer.CONSUMER_CATEORY_KEY, @@ -316,7 +320,8 @@ class _ConsumerDetailsState extends State { consumerProvider.onChangeOfSubCategory, consumerProvider.getSubCategoryList(), false, - itemAsString: (i) =>'${ApplicationLocalizations.of(context).translate(i.toString())}', + itemAsString: (i) => + '${ApplicationLocalizations.of(context).translate(i.toString())}', // contextkey: consumerProvider // .consmerWalkthrougList[6].key, controller: consumerProvider @@ -366,7 +371,8 @@ class _ConsumerDetailsState extends State { consumerProvider.onChangeOfLocality, consumerProvider.getBoundaryList(), true, - itemAsString: (i) =>'${ApplicationLocalizations.of(context).translate(i.code!.toString())}', + itemAsString: (i) => + '${ApplicationLocalizations.of(context).translate(i.code!.toString())}', contextKey: consumerProvider .consmerWalkthrougList[5].key) : Container()), @@ -382,7 +388,8 @@ class _ConsumerDetailsState extends State { consumerProvider.onChangeOfPropertyType, consumerProvider.getPropertyTypeList(), true, - itemAsString: (i) =>'${ApplicationLocalizations.of(context).translate(i.toString())}', + itemAsString: (i) => + '${ApplicationLocalizations.of(context).translate(i.toString())}', contextKey: consumerProvider.consmerWalkthrougList[6].key, controller: property.address.propertyCtrl, @@ -404,7 +411,8 @@ class _ConsumerDetailsState extends State { consumerProvider .getConnectionTypeList(), true, - itemAsString: (i) =>'${ApplicationLocalizations.of(context).translate(i.toString())}', + itemAsString: (i) => + '${ApplicationLocalizations.of(context).translate(i.toString())}', contextKey: consumerProvider .consmerWalkthrougList[7].key, controller: consumerProvider @@ -437,8 +445,15 @@ class _ConsumerDetailsState extends State { consumerProvider .waterconnection .previousReadingDateCtrl, - firstDate: - DateTime.fromMillisecondsSinceEpoch(consumerProvider.getLastFinancialYearList(2).reversed.first.fromDate??0), + firstDate: DateTime + .fromMillisecondsSinceEpoch( + consumerProvider + .getLastFinancialYearList( + 2) + .reversed + .first + .fromDate ?? + 0), lastDate: DateTime.now(), onChangeOfDate: @@ -534,7 +549,8 @@ class _ConsumerDetailsState extends State { consumerProvider .newBillingCycleFunction(), true, - itemAsString: (i) =>"${ApplicationLocalizations.of(context).translate(i['name'])}", + itemAsString: (i) => + "${ApplicationLocalizations.of(context).translate(i['name'])}", controller: consumerProvider .waterconnection .BillingCycleCtrl, @@ -567,6 +583,17 @@ class _ConsumerDetailsState extends State { contextKey: consumerProvider .consmerWalkthrougList[8].key, isEnabled: true), + + // // Test + // Column( + // children: [ + // Text( + // "${consumerProvider.waterconnection.paymentType != null}"), + // Text( + // "${consumerProvider.waterconnection.paymentType == Constants.CONSUMER_PAYMENT_TYPE.first.key}"), + // ], + // ), + // // Test Visibility( visible: consumerProvider .waterconnection.paymentType != diff --git a/frontend/mgramseva/lib/screeens/household_detail/household_detail.dart b/frontend/mgramseva/lib/screeens/household_detail/household_detail.dart index 623505356..2ac460db1 100644 --- a/frontend/mgramseva/lib/screeens/household_detail/household_detail.dart +++ b/frontend/mgramseva/lib/screeens/household_detail/household_detail.dart @@ -1,3 +1,5 @@ +import 'dart:developer'; + import 'package:flutter/material.dart'; import 'package:mgramseva/components/house_connection_and_bill/consumer_bill_payment.dart'; import 'package:mgramseva/components/house_connection_and_bill/generate_new_bill.dart'; @@ -50,6 +52,8 @@ class _HouseholdDetailState extends State { buildDemandView(DemandList data) { var houseHoldProvider = Provider.of(context, listen: false); + log("${houseHoldProvider.waterConnection?.connectionType}"); + log("${houseHoldProvider.isfirstdemand}"); return Column( children: [ data.demands!.isEmpty @@ -90,6 +94,7 @@ class _HouseholdDetailState extends State { Widget build(BuildContext context) { var houseHoldProvider = Provider.of(context, listen: false); + return Scaffold( backgroundColor: Theme.of(context).colorScheme.background, appBar: CustomAppBar(), diff --git a/frontend/mgramseva/lib/services/urls.dart b/frontend/mgramseva/lib/services/urls.dart index 406f0702b..ed2e833dc 100644 --- a/frontend/mgramseva/lib/services/urls.dart +++ b/frontend/mgramseva/lib/services/urls.dart @@ -43,6 +43,8 @@ class Url { static const String FETCH_DEMAND = 'billing-service/demand/_search'; static const String FETCH_UPDATE_DEMAND = 'ws-calculator/waterCalculator/_getPenaltyDetails'; + static const String FETCH_AGGREGATE_DEMAND = + 'billing-service/demand/_getAggregateDemandDetails'; static const String FETCH_BILL = 'billing-service/bill/v2/_fetchbill'; static const String SEARCH_BILL = 'billing-service/bill/v2/_search'; @@ -85,22 +87,20 @@ class Url { /// GPWSC Details static const String IFIX_DEPARTMENT_ENTITY = 'ifix-department-entity/departmentEntity/v1/_search'; - static const String ADAPTER_MASTER_DATA_PROJECT_SEARCH= + static const String ADAPTER_MASTER_DATA_PROJECT_SEARCH = 'adapter-master-data/project/v1/_search'; + ///Reports - static const String BILL_REPORT= - 'ws-services/wc/_billReport'; - static const String COLLECTION_REPORT= - 'ws-services/wc/_collectionReport'; - static const String INACTIVE_CONSUMER_REPORT= + static const String BILL_REPORT = 'ws-services/wc/_billReport'; + static const String COLLECTION_REPORT = 'ws-services/wc/_collectionReport'; + static const String INACTIVE_CONSUMER_REPORT = 'ws-services/wc/_inactiveConsumerReport'; - static const String EXPENSE_BILL_REPORT= + static const String EXPENSE_BILL_REPORT = 'echallan-services/eChallan/v1/_expenseBillReport'; - static const String WATER_CONNECTION_COUNT= + static const String WATER_CONNECTION_COUNT = 'ws-services/wc/_countWCbyDemandGenerationDate'; } - class UserUrl { static const String RESET_PASSWORD = 'user/password/nologin/_update'; static const String OTP_RESET_PASSWORD = 'user-otp/v1/_send'; @@ -108,4 +108,5 @@ class UserUrl { static const String USER_PROFILE = 'user/_search'; static const String EDIT_PROFILE = 'user/profile/_update'; static const String CHANGE_PASSWORD = 'user/password/_update'; + static const String LOGOUT_USER = 'user/_logout'; } diff --git a/frontend/mgramseva/pubspec.lock b/frontend/mgramseva/pubspec.lock index e744e5644..e3dcf88e7 100644 --- a/frontend/mgramseva/pubspec.lock +++ b/frontend/mgramseva/pubspec.lock @@ -5,42 +5,42 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051 + sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" url: "https://pub.dev" source: hosted - version: "64.0.0" + version: "67.0.0" _flutterfire_internals: dependency: transitive description: name: _flutterfire_internals - sha256: dd68ecea9f1e3556d385521bd21c7bafd6311a8c1e11abe2595ca27974f468ee + sha256: e4be6711f96d3d4eebe79728897d645b7a5585bbfdd6d534878d202c171266d7 url: "https://pub.dev" source: hosted - version: "1.3.13" + version: "1.3.34" analyzer: dependency: transitive description: name: analyzer - sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893" + sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" url: "https://pub.dev" source: hosted - version: "6.2.0" + version: "6.4.1" archive: dependency: transitive description: name: archive - sha256: "7b875fd4a20b165a3084bd2d210439b22ebc653f21cea4842729c0c30c82596b" + sha256: ecf4273855368121b1caed0d10d4513c7241dfc813f7d3c8933b36622ae9b265 url: "https://pub.dev" source: hosted - version: "3.4.9" + version: "3.5.1" args: dependency: transitive description: name: args - sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 + sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" url: "https://pub.dev" source: hosted - version: "2.4.2" + version: "2.5.0" async: dependency: transitive description: @@ -53,10 +53,10 @@ packages: dependency: transitive description: name: barcode - sha256: "789f898eef0bd88312470bdb2cc996f895ad7dd5f89e9adde84b204546a90b45" + sha256: ab180ce22c6555d77d45f0178a523669db67f95856e3378259ef2ffeb43e6003 url: "https://pub.dev" source: hosted - version: "2.2.4" + version: "2.2.8" bidi: dependency: transitive description: @@ -93,34 +93,34 @@ packages: dependency: transitive description: name: build_daemon - sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" + sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" url: "https://pub.dev" source: hosted - version: "4.0.1" + version: "4.0.2" build_resolvers: dependency: transitive description: name: build_resolvers - sha256: "64e12b0521812d1684b1917bc80945625391cb9bdd4312536b1d69dcb6133ed8" + sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" url: "https://pub.dev" source: hosted - version: "2.4.1" + version: "2.4.2" build_runner: dependency: "direct dev" description: name: build_runner - sha256: "10c6bcdbf9d049a0b666702cf1cee4ddfdc38f02a19d35ae392863b47519848b" + sha256: "1414d6d733a85d8ad2f1dfcb3ea7945759e35a123cb99ccfac75d0758f75edfa" url: "https://pub.dev" source: hosted - version: "2.4.6" + version: "2.4.10" build_runner_core: dependency: transitive description: name: build_runner_core - sha256: c9e32d21dd6626b5c163d48b037ce906bbe428bc23ab77bcd77bb21e593b6185 + sha256: "4ae8ffe5ac758da294ecf1802f2aff01558d8b1b00616aa7538ea9a8a5d50799" url: "https://pub.dev" source: hosted - version: "7.2.11" + version: "7.3.0" built_collection: dependency: transitive description: @@ -133,18 +133,18 @@ packages: dependency: transitive description: name: built_value - sha256: "69acb7007eb2a31dc901512bfe0f7b767168be34cb734835d54c070bfa74c1b2" + sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb url: "https://pub.dev" source: hosted - version: "8.8.0" + version: "8.9.2" buttons_tabbar: dependency: "direct main" description: name: buttons_tabbar - sha256: "3f0969c26574ef15c0c9ff1dee42c3c4b0d3563d2c8607804372490fb8b76896" + sha256: a25c19618f84feeb822a019d8f61cebc5c3879a030c97cd1a704b23ae6400f2f url: "https://pub.dev" source: hosted - version: "1.3.8" + version: "1.3.10" characters: dependency: transitive description: @@ -161,14 +161,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.1" - charset_converter: - dependency: "direct main" - description: - name: charset_converter - sha256: e4827b2d623ab75c2b6767d69e03485ea5bc894db6f6bdcb2ffeda58446bbe26 - url: "https://pub.dev" - source: hosted - version: "2.1.1" checked_yaml: dependency: transitive description: @@ -181,10 +173,10 @@ packages: dependency: transitive description: name: cli_util - sha256: b8db3080e59b2503ca9e7922c3df2072cf13992354d5e944074ffa836fba43b7 + sha256: c05b7406fdabc7a49a3929d4af76bcaccbbffcbcdcf185b082e1ae07da323d19 url: "https://pub.dev" source: hosted - version: "0.4.0" + version: "0.4.1" clock: dependency: transitive description: @@ -197,10 +189,10 @@ packages: dependency: transitive description: name: code_builder - sha256: b2151ce26a06171005b379ecff6e08d34c470180ffe16b8e14b6d52be292b55f + sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 url: "https://pub.dev" source: hosted - version: "4.8.0" + version: "4.10.0" collection: dependency: "direct main" description: @@ -213,18 +205,18 @@ packages: dependency: transitive description: name: community_charts_common - sha256: "20697244c826df0545237ebe01d61caa96a2a2e4d23c6f88890441636a4d5220" + sha256: d997ade57f15490346de46efbe23805d378a672aafbf5e47e19517964b671009 url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "1.0.4" community_charts_flutter: dependency: "direct main" description: name: community_charts_flutter - sha256: ca5bd07337e162daee13c19679f602cd8b3f704520d242beeebbc2e312f84f89 + sha256: "4614846b99782ab79b613687704865e5468ecada3f0ad1afe1cdc3ff5b727f72" url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "1.0.4" convert: dependency: transitive description: @@ -237,10 +229,10 @@ packages: dependency: transitive description: name: cross_file - sha256: "2f9d2cbccb76127ba28528cb3ae2c2326a122446a83de5a056aaa3880d3882c5" + sha256: "55d7b444feb71301ef6b8838dbc1ae02e63dd48c8773f3810ff53bb1e2945b32" url: "https://pub.dev" source: hosted - version: "0.3.3+7" + version: "0.3.4+1" crypto: dependency: transitive description: @@ -261,26 +253,18 @@ packages: dependency: "direct main" description: name: cupertino_icons - sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d + sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 url: "https://pub.dev" source: hosted - version: "1.0.6" - dart_ping: - dependency: transitive - description: - name: dart_ping - sha256: "2f5418d0a5c64e53486caaac78677b25725b1e13c33c5be834ce874ea18bd24f" - url: "https://pub.dev" - source: hosted - version: "9.0.1" + version: "1.0.8" dart_style: dependency: transitive description: name: dart_style - sha256: "40ae61a5d43feea6d24bd22c0537a6629db858963b99b4bc1c3db80676f32368" + sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9" url: "https://pub.dev" source: hosted - version: "2.3.4" + version: "2.3.6" datetime_picker_formfield: dependency: "direct main" description: @@ -289,14 +273,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.1" - dbus: - dependency: transitive - description: - name: dbus - sha256: "365c771ac3b0e58845f39ec6deebc76e3276aa9922b0cc60840712094d9047ac" - url: "https://pub.dev" - source: hosted - version: "0.7.10" dropdown_search: dependency: "direct main" description: @@ -305,14 +281,6 @@ packages: url: "https://pub.dev" source: hosted version: "5.0.6" - enum_to_string: - dependency: transitive - description: - name: enum_to_string - sha256: bd9e83a33b754cb43a75b36a9af2a0b92a757bfd9847d2621ca0b1bed45f8e7a - url: "https://pub.dev" - source: hosted - version: "2.0.1" fake_async: dependency: transitive description: @@ -325,26 +293,26 @@ packages: dependency: transitive description: name: ffi - sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.2" file: dependency: transitive description: name: file - sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" url: "https://pub.dev" source: hosted - version: "6.1.4" + version: "7.0.0" file_picker: dependency: "direct main" description: name: file_picker - sha256: "4e42aacde3b993c5947467ab640882c56947d9d27342a5b6f2895b23956954a6" + sha256: "1bbf65dd997458a08b531042ec3794112a6c39c07c37ff22113d2e7e4f81d4e4" url: "https://pub.dev" source: hosted - version: "6.1.1" + version: "6.2.1" file_selector_linux: dependency: transitive description: @@ -357,18 +325,18 @@ packages: dependency: transitive description: name: file_selector_macos - sha256: b15c3da8bd4908b9918111fa486903f5808e388b8d1c559949f584725a6594d6 + sha256: f42eacb83b318e183b1ae24eead1373ab1334084404c8c16e0354f9a3e55d385 url: "https://pub.dev" source: hosted - version: "0.9.3+3" + version: "0.9.4" file_selector_platform_interface: dependency: transitive description: name: file_selector_platform_interface - sha256: "0aa47a725c346825a2bd396343ce63ac00bda6eff2fbc43eabe99737dede8262" + sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b url: "https://pub.dev" source: hosted - version: "2.6.1" + version: "2.6.2" file_selector_windows: dependency: transitive description: @@ -381,34 +349,34 @@ packages: dependency: "direct main" description: name: firebase_analytics - sha256: de3d73b5c5618bf31004308b017b4067b7d9156b96e97b62d59ae5eab71081ec + sha256: "08f98034f51c8018d08cd56ac51f44c63ab684f85a7b8f0ede92c4acfb23a2bc" url: "https://pub.dev" source: hosted - version: "10.7.1" + version: "10.10.6" firebase_analytics_platform_interface: dependency: transitive description: name: firebase_analytics_platform_interface - sha256: ffc59c0b00a572cd1fbf915a1d50cb4ccdc61e429614aa6ae9a598ee5723b96a + sha256: "4de04e25bd739184eb2cfcd76c2f336c9e03bf65457e1e17d027d65f2344a2df" url: "https://pub.dev" source: hosted - version: "3.8.1" + version: "3.10.7" firebase_analytics_web: dependency: transitive description: name: firebase_analytics_web - sha256: "0e725a7dcdeb0a59e44d93d1d45dfec94efe54329ac9d6aa145e24d31429100c" + sha256: "77ded8cb214193cc816395625ab8a031539cdd870d667123d1b9d53c7303a82d" url: "https://pub.dev" source: hosted - version: "0.5.5+8" + version: "0.5.7+6" firebase_core: dependency: "direct main" description: name: firebase_core - sha256: "471b46ea6a9af503184d4de691566887daedd312aec5baac5baa42d819f56446" + sha256: "4b5100e2dbc3fe72c2d4241a046d3f01457fe11293283a324f5c52575e3406f8" url: "https://pub.dev" source: hosted - version: "2.23.0" + version: "2.31.1" firebase_core_platform_interface: dependency: transitive description: @@ -421,10 +389,10 @@ packages: dependency: transitive description: name: firebase_core_web - sha256: "0631a2ec971dbc540275e2fa00c3a8a2676f0a7adbc3c197d6fba569db689d97" + sha256: "43d9e951ac52b87ae9cc38ecdcca1e8fa7b52a1dd26a96085ba41ce5108db8e9" url: "https://pub.dev" source: hosted - version: "2.8.1" + version: "2.17.0" fixnum: dependency: transitive description: @@ -458,10 +426,10 @@ packages: dependency: "direct main" description: name: flutter_downloader - sha256: "36c16cc6657274f3cf7ccb681aeca89df62531ff5956f85e175f6be4b8d6b140" + sha256: "188d921f78471cb28ec2346bcf4045a27a516e384e2bfc9b4be12ae12d3ff8c8" url: "https://pub.dev" source: hosted - version: "1.11.5" + version: "1.11.7" flutter_driver: dependency: transitive description: flutter @@ -540,10 +508,10 @@ packages: dependency: transitive description: name: flutter_plugin_android_lifecycle - sha256: b068ffc46f82a55844acfa4fdbb61fad72fa2aef0905548419d97f0f95c456da + sha256: "8cf40eebf5dec866a6d1956ad7b4f7016e6c0cc69847ab946833b7d43743809f" url: "https://pub.dev" source: hosted - version: "2.0.17" + version: "2.0.19" flutter_rating_bar: dependency: "direct main" description: @@ -556,50 +524,50 @@ packages: dependency: "direct main" description: name: flutter_secure_storage - sha256: ffdbb60130e4665d2af814a0267c481bcf522c41ae2e43caf69fa0146876d685 + sha256: "8496a89eea74e23f92581885f876455d9d460e71201405dffe5f55dfe1155864" url: "https://pub.dev" source: hosted - version: "9.0.0" + version: "9.2.1" flutter_secure_storage_linux: dependency: transitive description: name: flutter_secure_storage_linux - sha256: "3d5032e314774ee0e1a7d0a9f5e2793486f0dff2dd9ef5a23f4e3fb2a0ae6a9e" + sha256: "4d91bfc23047422cbcd73ac684bc169859ee766482517c22172c86596bf1464b" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.1" flutter_secure_storage_macos: dependency: transitive description: name: flutter_secure_storage_macos - sha256: bd33935b4b628abd0b86c8ca20655c5b36275c3a3f5194769a7b3f37c905369c + sha256: b768a7dab26d6186b68e2831b3104f8968154f0f4fdbf66e7c2dd7bdf299daaf url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.1.1" flutter_secure_storage_platform_interface: dependency: transitive description: name: flutter_secure_storage_platform_interface - sha256: "0d4d3a5dd4db28c96ae414d7ba3b8422fd735a8255642774803b2532c9a61d7e" + sha256: cf91ad32ce5adef6fba4d736a542baca9daf3beac4db2d04be350b87f69ac4a8 url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "1.1.2" flutter_secure_storage_web: dependency: transitive description: name: flutter_secure_storage_web - sha256: "30f84f102df9dcdaa2241866a958c2ec976902ebdaa8883fbfe525f1f2f3cf20" + sha256: f4ebff989b4f07b2656fb16b47852c0aab9fed9b4ec1c70103368337bc1886a9 url: "https://pub.dev" source: hosted - version: "1.1.2" + version: "1.2.1" flutter_secure_storage_windows: dependency: transitive description: name: flutter_secure_storage_windows - sha256: "5809c66f9dd3b4b93b0a6e2e8561539405322ee767ac2f64d084e2ab5429d108" + sha256: b20b07cb5ed4ed74fc567b78a72936203f587eba460af1df11281c9326cd3709 url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "3.1.2" flutter_share_me: dependency: "direct main" description: @@ -612,18 +580,18 @@ packages: dependency: "direct main" description: name: flutter_spinkit - sha256: b39c753e909d4796906c5696a14daf33639a76e017136c8d82bf3e620ce5bb8e + sha256: d2696eed13732831414595b98863260e33e8882fc069ee80ec35d4ac9ddb0472 url: "https://pub.dev" source: hosted - version: "5.2.0" + version: "5.2.1" flutter_svg: dependency: "direct main" description: name: flutter_svg - sha256: d39e7f95621fc84376bc0f7d504f05c3a41488c562f4a8ad410569127507402c + sha256: "7b4ca6cf3304575fe9c8ec64813c8d02ee41d2afe60bcfe0678bcb5375d596a2" url: "https://pub.dev" source: hosted - version: "2.0.9" + version: "2.0.10+1" flutter_test: dependency: "direct dev" description: flutter @@ -646,17 +614,17 @@ packages: dependency: transitive description: name: frontend_server_client - sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 url: "https://pub.dev" source: hosted - version: "3.2.0" + version: "4.0.0" fuchsia_remote_debug_protocol: dependency: transitive description: flutter source: sdk version: "0.0.0" gbk_codec: - dependency: transitive + dependency: "direct main" description: name: gbk_codec sha256: "3af5311fc9393115e3650ae6023862adf998051a804a08fb804f042724999f61" @@ -680,7 +648,7 @@ packages: source: hosted version: "2.3.1" hex: - dependency: transitive + dependency: "direct main" description: name: hex sha256: "4e7cd54e4b59ba026432a6be2dd9d96e4c5205725194997193bf871703b82c4a" @@ -707,10 +675,10 @@ packages: dependency: "direct main" description: name: http - sha256: "759d1a329847dd0f39226c688d3e06a6b8679668e350e2891a6474f8b4bb8525" + sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938" url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.2.1" http_multi_server: dependency: transitive description: @@ -731,42 +699,42 @@ packages: dependency: transitive description: name: image - sha256: "028f61960d56f26414eb616b48b04eb37d700cbe477b7fb09bf1d7ce57fd9271" + sha256: "4c68bfd5ae83e700b5204c1e74451e7bf3cf750e6843c6e158289cf56bda018e" url: "https://pub.dev" source: hosted - version: "4.1.3" + version: "4.1.7" image_picker: dependency: "direct main" description: name: image_picker - sha256: "7d7f2768df2a8b0a3cefa5ef4f84636121987d403130e70b17ef7e2cf650ba84" + sha256: "33974eca2e87e8b4e3727f1b94fa3abcb25afe80b6bc2c4d449a0e150aedf720" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.1.1" image_picker_android: dependency: transitive description: name: image_picker_android - sha256: d6a6e78821086b0b737009b09363018309bbc6de3fd88cc5c26bc2bb44a4957f + sha256: "0f57fee1e8bfadf8cc41818bbcd7f72e53bb768a54d9496355d5e8a5681a19f1" url: "https://pub.dev" source: hosted - version: "0.8.8+2" + version: "0.8.12+1" image_picker_for_web: dependency: transitive description: name: image_picker_for_web - sha256: "50bc9ae6a77eea3a8b11af5eb6c661eeb858fdd2f734c2a4fd17086922347ef7" + sha256: "5d6eb13048cd47b60dbf1a5495424dea226c5faf3950e20bf8120a58efb5b5f3" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.4" image_picker_ios: dependency: transitive description: name: image_picker_ios - sha256: "76ec722aeea419d03aa915c2c96bf5b47214b053899088c9abb4086ceecf97a7" + sha256: "4824d8c7f6f89121ef0122ff79bb00b009607faecc8545b86bca9ab5ce1e95bf" url: "https://pub.dev" source: hosted - version: "0.8.8+4" + version: "0.8.11+2" image_picker_linux: dependency: transitive description: @@ -787,10 +755,10 @@ packages: dependency: transitive description: name: image_picker_platform_interface - sha256: ed9b00e63977c93b0d2d2b343685bed9c324534ba5abafbb3dfbd6a780b1b514 + sha256: "9ec26d410ff46f483c5519c29c02ef0e02e13a543f882b152d4bfd2f06802f80" url: "https://pub.dev" source: hosted - version: "2.9.1" + version: "2.10.0" image_picker_windows: dependency: transitive description: @@ -808,10 +776,10 @@ packages: dependency: transitive description: name: intl - sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf url: "https://pub.dev" source: hosted - version: "0.18.1" + version: "0.19.0" io: dependency: transitive description: @@ -824,10 +792,10 @@ packages: dependency: transitive description: name: jiffy - sha256: cc1d4b75016a9156c29b5d61f0c9176c3e0fb0580cc5a0e0422b5d2cab3fbfff + sha256: "3497caaa36d36a29033e66803c9739ce6bccbc7e241ca46070f76ee9e6f6eb0c" url: "https://pub.dev" source: hosted - version: "6.2.1" + version: "6.3.1" js: dependency: "direct main" description: @@ -840,18 +808,42 @@ packages: dependency: "direct main" description: name: json_annotation - sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" url: "https://pub.dev" source: hosted - version: "4.8.1" + version: "4.9.0" json_serializable: dependency: "direct dev" description: name: json_serializable - sha256: aa1f5a8912615733e0fdc7a02af03308933c93235bdc8d50d0b0c8a8ccb0b969 + sha256: ea1432d167339ea9b5bb153f0571d0039607a873d6e04e0117af043f14a1fd4b url: "https://pub.dev" source: hosted - version: "6.7.1" + version: "6.8.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" lint: dependency: transitive description: @@ -872,42 +864,42 @@ packages: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.12.0" mime: dependency: "direct main" description: name: mime - sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.0.5" nearby_connections: dependency: "direct main" description: name: nearby_connections - sha256: "7a7237421c4654867a60a0a3314f150962097c0383ebab8ad2d5942cedd54da6" + sha256: e6845538b7389a0bd489faaf4f59a0a1564ddbe72a1eb4083e3780e496b67375 url: "https://pub.dev" source: hosted - version: "4.0.1" + version: "4.1.1" nested: dependency: transitive description: @@ -916,22 +908,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.0" - network_info_plus: - dependency: transitive - description: - name: network_info_plus - sha256: "2d9e88b9a459e5d4e224f828d26cc38ea140511e89b943116939994324be5c96" - url: "https://pub.dev" - source: hosted - version: "4.1.0" - network_info_plus_platform_interface: - dependency: transitive - description: - name: network_info_plus_platform_interface - sha256: "881f5029c5edaf19c616c201d3d8b366c5b1384afd5c1da5a49e4345de82fb8b" - url: "https://pub.dev" - source: hosted - version: "1.1.3" new_version_plus: dependency: "direct main" description: @@ -940,14 +916,6 @@ packages: url: "https://pub.dev" source: hosted version: "0.0.11" - nm: - dependency: transitive - description: - name: nm - sha256: "2c9aae4127bdc8993206464fcc063611e0e36e72018696cd9631023a31b24254" - url: "https://pub.dev" - source: hosted - version: "0.5.0" number_to_words: dependency: "direct main" description: @@ -960,10 +928,10 @@ packages: dependency: "direct main" description: name: open_filex - sha256: a6c95237767c5647e68b71a476602fcf4f1bfc530c126265e53addae22ef5fc2 + sha256: "74e2280754cf8161e860746c3181db2c996d6c1909c7057b738ede4a469816b8" url: "https://pub.dev" source: hosted - version: "4.3.4" + version: "4.4.0" package_config: dependency: transitive description: @@ -992,10 +960,10 @@ packages: dependency: "direct main" description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" path_parsing: dependency: transitive description: @@ -1008,26 +976,26 @@ packages: dependency: "direct main" description: name: path_provider - sha256: a1aa8aaa2542a6bc57e381f132af822420216c80d4781f7aa085ca3229208aaa + sha256: c9e7d3a4cd1410877472158bee69963a4579f78b68c65a2b7d40d1a7a88bb161 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.3" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: e595b98692943b4881b219f0a9e3945118d3c16bd7e2813f98ec6e532d905f72 + sha256: a248d8146ee5983446bf03ed5ea8f6533129a12b11f12057ad1b4a67a2b3b41d url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.2.4" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: "19314d595120f82aca0ba62787d58dde2cc6b5df7d2f0daf72489e38d1b57f2d" + sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16 url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.4.0" path_provider_linux: dependency: transitive description: @@ -1040,10 +1008,10 @@ packages: dependency: transitive description: name: path_provider_platform_interface - sha256: "94b1e0dd80970c1ce43d5d4e050a9918fce4f4a775e6142424c30a29a363265c" + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" path_provider_windows: dependency: transitive description: @@ -1056,66 +1024,74 @@ packages: dependency: "direct main" description: name: pdf - sha256: aa8835fcb9cfaf57ab2f1970e8548ceed3d0cb53eda7da906648f8153eaf37c9 + sha256: "243f05342fc0bdf140eba5b069398985cdbdd3dbb1d776cf43d5ea29cc570ba6" url: "https://pub.dev" source: hosted - version: "3.10.6" + version: "3.10.8" + pdf_widget_wrapper: + dependency: transitive + description: + name: pdf_widget_wrapper + sha256: c930860d987213a3d58c7ec3b7ecf8085c3897f773e8dc23da9cae60a5d6d0f5 + url: "https://pub.dev" + source: hosted + version: "1.0.4" permission_handler: dependency: "direct main" description: name: permission_handler - sha256: "860c6b871c94c78e202dc69546d4d8fd84bd59faeb36f8fb9888668a53ff4f78" + sha256: "18bf33f7fefbd812f37e72091a15575e72d5318854877e0e4035a24ac1113ecb" url: "https://pub.dev" source: hosted - version: "11.1.0" + version: "11.3.1" permission_handler_android: dependency: transitive description: name: permission_handler_android - sha256: "2f1bec180ee2f5665c22faada971a8f024761f632e93ddc23310487df52dcfa6" + sha256: "8bb852cd759488893805c3161d0b2b5db55db52f773dbb014420b304055ba2c5" url: "https://pub.dev" source: hosted - version: "12.0.1" + version: "12.0.6" permission_handler_apple: dependency: transitive description: name: permission_handler_apple - sha256: "1a816084338ada8d574b1cb48390e6e8b19305d5120fe3a37c98825bacc78306" + sha256: e9ad66020b89ff1b63908f247c2c6f931c6e62699b756ef8b3c4569350cd8662 url: "https://pub.dev" source: hosted - version: "9.2.0" + version: "9.4.4" permission_handler_html: dependency: transitive description: name: permission_handler_html - sha256: d96ff56a757b7f04fa825c469d296c5aebc55f743e87bd639fef91a466a24da8 + sha256: "54bf176b90f6eddd4ece307e2c06cf977fb3973719c35a93b85cc7093eb6070d" url: "https://pub.dev" source: hosted - version: "0.1.0+1" + version: "0.1.1" permission_handler_platform_interface: dependency: transitive description: name: permission_handler_platform_interface - sha256: d87349312f7eaf6ce0adaf668daf700ac5b06af84338bd8b8574dfbd93ffe1a1 + sha256: "48d4fcf201a1dad93ee869ab0d4101d084f49136ec82a8a06ed9cfeacab9fd20" url: "https://pub.dev" source: hosted - version: "4.0.2" + version: "4.2.1" permission_handler_windows: dependency: transitive description: name: permission_handler_windows - sha256: "1e8640c1e39121128da6b816d236e714d2cf17fac5a105dd6acdd3403a628004" + sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e" url: "https://pub.dev" source: hosted - version: "0.2.0" + version: "0.2.1" petitparser: dependency: transitive description: name: petitparser - sha256: eeb2d1428ee7f4170e2bd498827296a18d4e7fc462b71727d111c0ac7707cfa6 + sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 url: "https://pub.dev" source: hosted - version: "6.0.1" + version: "6.0.2" pin_input_text_field: dependency: "direct main" description: @@ -1124,30 +1100,22 @@ packages: url: "https://pub.dev" source: hosted version: "4.5.1" - ping_discover_network_forked: - dependency: transitive - description: - name: ping_discover_network_forked - sha256: d3975c4f3fbaa388f78fb4037ad9c33059d8e2ec0e804ed45e05277d2451fe77 - url: "https://pub.dev" - source: hosted - version: "0.0.1" platform: dependency: transitive description: name: platform - sha256: ae68c7bfcd7383af3629daafb32fb4e8681c7154428da4febcff06200585f102 + sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "3.1.4" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - sha256: f4f88d4a900933e7267e2b353594774fc0d07fb072b47eedcd5b54e1ea3269f8 + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" url: "https://pub.dev" source: hosted - version: "2.1.7" + version: "2.1.8" pointer_interceptor: dependency: transitive description: @@ -1156,14 +1124,6 @@ packages: url: "https://pub.dev" source: hosted version: "0.9.3+7" - pointycastle: - dependency: transitive - description: - name: pointycastle - sha256: "7c1e5f0d23c9016c5bbd8b1473d0d3fb3fc851b876046039509e18e0c7485f2c" - url: "https://pub.dev" - source: hosted - version: "3.7.3" pool: dependency: transitive description: @@ -1176,34 +1136,34 @@ packages: dependency: "direct main" description: name: print_bluetooth_thermal - sha256: aecc2c8e799e524e4622e3ab298bfc8cc44bc3d61de425591e17f1cacf6a3f5a + sha256: bdca68db1a7959d46a421eeb60d0d8698a7aff1dd5983e7dd8b18574fe792c11 url: "https://pub.dev" source: hosted - version: "1.0.9" + version: "1.1.0" printing: dependency: "direct main" description: name: printing - sha256: ad39a42a5f83125952457dfd94f395c8cf0eb1f7759583dadb769be5c7f99d24 + sha256: "1c99cab90ebcc1fff65831d264627d5b529359d563e53f33ab9b8117f2d280bc" url: "https://pub.dev" source: hosted - version: "5.11.1" + version: "5.12.0" process: dependency: transitive description: name: process - sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" + sha256: "21e54fd2faf1b5bdd5102afd25012184a6793927648ea81eea80552ac9405b32" url: "https://pub.dev" source: hosted - version: "4.2.4" + version: "5.0.2" provider: dependency: "direct main" description: name: provider - sha256: "9a96a0a19b594dbc5bf0f1f27d2bc67d5f95957359b461cd9feb44ed6ae75096" + sha256: c8a055ee5ce3fd98d6fc872478b03823ffdb448699c6ebdbbc71d59b596fd48c url: "https://pub.dev" source: hosted - version: "6.1.1" + version: "6.1.2" pub_semver: dependency: transitive description: @@ -1228,22 +1188,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.1" - rxdart: - dependency: transitive - description: - name: rxdart - sha256: "0c7c0cedd93788d996e33041ffecda924cc54389199cde4e6a34b440f50044cb" - url: "https://pub.dev" - source: hosted - version: "0.27.7" screenshot: dependency: "direct main" description: name: screenshot - sha256: "455284ff1f5b911d94a43c25e1385485cf6b4f288293eba68f15dad711c7b81c" + sha256: "63817697a7835e6ce82add4228e15d233b74d42975c143ad8cfe07009fab866b" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "3.0.0" shelf: dependency: transitive description: @@ -1256,10 +1208,10 @@ packages: dependency: transitive description: name: shelf_web_socket - sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + sha256: "073c147238594ecd0d193f3456a5fe91c4b0abbcc68bf5cd95b36c4e194ac611" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "2.0.0" sky_engine: dependency: transitive description: flutter @@ -1269,10 +1221,10 @@ packages: dependency: transitive description: name: source_gen - sha256: fc0da689e5302edb6177fdd964efcb7f58912f43c28c2047a808f5bfff643d16 + sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "1.5.0" source_helper: dependency: transitive description: @@ -1333,26 +1285,26 @@ packages: dependency: transitive description: name: syncfusion_flutter_core - sha256: "8a1220f978491f56431c66dacf1bb97bf2abcd1458b542fe0dfbf1a630c67260" + sha256: "63108a33f9b0d89f7b6b56cce908b8e519fe433dbbe0efcf41ad3e8bb2081bd9" url: "https://pub.dev" source: hosted - version: "23.2.4" + version: "25.2.5" syncfusion_flutter_xlsio: dependency: "direct main" description: name: syncfusion_flutter_xlsio - sha256: "1587750fc3d3550a63fe89e12f60b82cd781ecea336a8c5b536354ebc7820707" + sha256: "048887911817de1c83735790bf3de085e863f4d2d552817099af4e9c866b2ec3" url: "https://pub.dev" source: hosted - version: "23.2.4" + version: "25.2.5" syncfusion_officecore: dependency: transitive description: name: syncfusion_officecore - sha256: "9dca5adca8e79b485b7217708e199366466a9b7ccbbf4a2a967d3d78771ad4b7" + sha256: "31cfd13d779fb6461b29d6cc81fe931f23629a051b4639bfc78b55e5908604a1" url: "https://pub.dev" source: hosted - version: "23.2.4" + version: "25.2.5" term_glyph: dependency: transitive description: @@ -1365,18 +1317,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" - thermal_printer: - dependency: "direct main" - description: - name: thermal_printer - sha256: d04fd0ade194df0143bcef57af18cad59fa053be6e7102c5d341f378325c7508 - url: "https://pub.dev" - source: hosted - version: "1.0.4" + version: "0.7.0" timing: dependency: transitive description: @@ -1413,66 +1357,66 @@ packages: dependency: "direct main" description: name: url_launcher - sha256: b1c9e98774adf8820c96fbc7ae3601231d324a7d5ebd8babe27b6dfac91357ba + sha256: "6ce1e04375be4eed30548f10a315826fd933c1e493206eab82eed01f438c8d2e" url: "https://pub.dev" source: hosted - version: "6.2.1" + version: "6.2.6" url_launcher_android: dependency: transitive description: name: url_launcher_android - sha256: "31222ffb0063171b526d3e569079cf1f8b294075ba323443fdc690842bfd4def" + sha256: "17cd5e205ea615e2c6ea7a77323a11712dffa0720a8a90540db57a01347f9ad9" url: "https://pub.dev" source: hosted - version: "6.2.0" + version: "6.3.2" url_launcher_ios: dependency: transitive description: name: url_launcher_ios - sha256: bba3373219b7abb6b5e0d071b0fe66dfbe005d07517a68e38d4fc3638f35c6d3 + sha256: "7068716403343f6ba4969b4173cbf3b84fc768042124bc2c011e5d782b24fe89" url: "https://pub.dev" source: hosted - version: "6.2.1" + version: "6.3.0" url_launcher_linux: dependency: transitive description: name: url_launcher_linux - sha256: "9f2d390e096fdbe1e6e6256f97851e51afc2d9c423d3432f1d6a02a8a9a8b9fd" + sha256: ab360eb661f8879369acac07b6bb3ff09d9471155357da8443fd5d3cf7363811 url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.1.1" url_launcher_macos: dependency: transitive description: name: url_launcher_macos - sha256: b7244901ea3cf489c5335bdacda07264a6e960b1c1b1a9f91e4bc371d9e68234 + sha256: "9a1a42d5d2d95400c795b2914c36fdcb525870c752569438e4ebb09a2b5d90de" url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.2.0" url_launcher_platform_interface: dependency: transitive description: name: url_launcher_platform_interface - sha256: "980e8d9af422f477be6948bdfb68df8433be71f5743a188968b0c1b887807e50" + sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.2" url_launcher_web: dependency: transitive description: name: url_launcher_web - sha256: "138bd45b3a456dcfafc46d1a146787424f8d2edfbf2809c9324361e58f851cf7" + sha256: "8d9e750d8c9338601e709cd0885f95825086bd8b642547f26bda435aade95d8a" url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.3.1" url_launcher_windows: dependency: transitive description: name: url_launcher_windows - sha256: "7754a1ad30ee896b265f8d14078b0513a4dba28d358eabb9d5f339886f4a1adc" + sha256: ecf9725510600aa2bb6d7ddabe16357691b6d2805f66216a97d1b881e21beff7 url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.1.1" url_strategy: dependency: "direct main" description: @@ -1485,26 +1429,26 @@ packages: dependency: transitive description: name: vector_graphics - sha256: "0f0c746dd2d6254a0057218ff980fc7f5670fd0fcf5e4db38a490d31eed4ad43" + sha256: "32c3c684e02f9bc0afb0ae0aa653337a2fe022e8ab064bcd7ffda27a74e288e3" url: "https://pub.dev" source: hosted - version: "1.1.9+1" + version: "1.1.11+1" vector_graphics_codec: dependency: transitive description: name: vector_graphics_codec - sha256: "0edf6d630d1bfd5589114138ed8fada3234deacc37966bec033d3047c29248b7" + sha256: c86987475f162fadff579e7320c7ddda04cd2fdeffbe1129227a85d9ac9e03da url: "https://pub.dev" source: hosted - version: "1.1.9+1" + version: "1.1.11+1" vector_graphics_compiler: dependency: transitive description: name: vector_graphics_compiler - sha256: d24333727332d9bd20990f1483af4e09abdb9b1fc7c3db940b56ab5c42790c26 + sha256: "12faff3f73b1741a36ca7e31b292ddeb629af819ca9efe9953b70bd63fc8cd81" url: "https://pub.dev" source: hosted - version: "1.1.9+1" + version: "1.1.11+1" vector_math: dependency: transitive description: @@ -1517,10 +1461,10 @@ packages: dependency: transitive description: name: vm_service - sha256: c538be99af830f478718b51630ec1b6bee5e74e52c8a802d328d9e71d35d2583 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "11.10.0" + version: "14.2.1" watcher: dependency: transitive description: @@ -1533,50 +1477,66 @@ packages: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "0.5.1" + web_socket: + dependency: transitive + description: + name: web_socket + sha256: "217f49b5213796cb508d6a942a5dc604ce1cb6a0a6b3d8cb3f0c314f0ecea712" + url: "https://pub.dev" + source: hosted + version: "0.1.4" web_socket_channel: dependency: transitive description: name: web_socket_channel - sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + sha256: a2d56211ee4d35d9b344d9d4ce60f362e4f5d1aafb988302906bd732bc731276 url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "3.0.0" webdriver: dependency: transitive description: name: webdriver - sha256: "3c923e918918feeb90c4c9fdf1fe39220fa4c0e8e2c0fffaded174498ef86c49" + sha256: "003d7da9519e1e5f329422b36c4dcdf18d7d2978d1ba099ea4e45ba490ed845e" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.0.3" win32: dependency: transitive description: name: win32 - sha256: "7c99c0e1e2fa190b48d25c81ca5e42036d5cac81430ef249027d97b0935c553f" + sha256: a79dbe579cb51ecd6d30b17e0cae4e0ea15e2c0e66f69ad4198f22a6789e94f4 url: "https://pub.dev" source: hosted - version: "5.1.0" + version: "5.5.1" + win_ble: + dependency: transitive + description: + name: win_ble + sha256: "2a867e13c4b355b101fc2c6e2ac85eeebf965db34eca46856f8b478e93b41e96" + url: "https://pub.dev" + source: hosted + version: "1.1.1" xdg_directories: dependency: transitive description: name: xdg_directories - sha256: "589ada45ba9e39405c198fe34eb0f607cddb2108527e658136120892beac46d2" + sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "1.0.4" xml: dependency: transitive description: name: xml - sha256: af5e77e9b83f2f4adc5d3f0a4ece1c7f45a2467b695c2540381bac793e34e556 + sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 url: "https://pub.dev" source: hosted - version: "6.4.2" + version: "6.5.0" yaml: dependency: transitive description: @@ -1586,5 +1546,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.2.0 <4.0.0" - flutter: ">=3.16.0" + dart: ">=3.4.0 <4.0.0" + flutter: ">=3.22.0" diff --git a/frontend/mgramseva/pubspec.yaml b/frontend/mgramseva/pubspec.yaml index eb7ba7e30..75584d712 100644 --- a/frontend/mgramseva/pubspec.yaml +++ b/frontend/mgramseva/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.2.21+38 +version: 1.2.25+39 environment: sdk: ">=2.12.0 <4.0.0" @@ -41,7 +41,7 @@ dependencies: flutter_spinkit: ^5.0.0 json_annotation: ^4.8.0 url_strategy: ^0.2.0 - screenshot: ^2.1.0 + screenshot: any number_to_words: ^1.0.0 flutter_localizations: sdk: flutter @@ -71,7 +71,8 @@ dependencies: firebase_core: ^2.23.0 package_info_plus: ^4.0.2 open_filex: ^4.3.4 - syncfusion_flutter_xlsio: ^23.2.4 + syncfusion_flutter_xlsio: ^25.2.4 + # syncfusion_flutter_xlsio: ^23.2.4 print_bluetooth_thermal: ^1.0.9 nearby_connections: ^4.0.1 dropdown_search: ^5.0.6