From 4769a9705b2308cf1d217e3c51269b8be79fab61 Mon Sep 17 00:00:00 2001 From: Debasish Chakraborty <117706910+debasishchakraborty-egovt@users.noreply.github.com> Date: Wed, 13 Mar 2024 17:48:50 +0530 Subject: [PATCH 01/14] Update build-config.yml --- build/build-config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/build-config.yml b/build/build-config.yml index dcde66e1d..cc9f05230 100644 --- a/build/build-config.yml +++ b/build/build-config.yml @@ -136,6 +136,6 @@ config: image-name: "egov-apportion-service-db" - name: "builds/mGramSeva/utilities/egov-penalty-schedular" build: - - work-dir: "utilities/egov-penalty-schedular" + - work-dir: "utilities/Penalty" image-name: "egov-penalty-schedular" dockerfile: "build/maven/Dockerfile" From d21ee1defb41a6a5eaa19ff850f50c24dea48089 Mon Sep 17 00:00:00 2001 From: Rahul Dev Garg <34365102+rahuldevgarg@users.noreply.github.com> Date: Fri, 15 Mar 2024 01:05:44 +0530 Subject: [PATCH 02/14] set >=0 in pending amount --- .../house_connection_and_bill/consumer_bill_payment.dart | 2 +- frontend/mgramseva/lib/providers/collect_payment_provider.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/mgramseva/lib/components/house_connection_and_bill/consumer_bill_payment.dart b/frontend/mgramseva/lib/components/house_connection_and_bill/consumer_bill_payment.dart index 11e3be5d9..a7c00e1e5 100644 --- a/frontend/mgramseva/lib/components/house_connection_and_bill/consumer_bill_payment.dart +++ b/frontend/mgramseva/lib/components/house_connection_and_bill/consumer_bill_payment.dart @@ -230,7 +230,7 @@ class ConsumerBillPaymentsState extends State { .toString()) + ' only')), getPrinterLabel( - (item.totalDue ?? 0) - (item.totalAmountPaid ?? 0)>0?i18.consumerReciepts.CONSUMER_PENDING_AMOUNT:i18.common.CORE_ADVANCE, + (item.totalDue ?? 0) - (item.totalAmountPaid ?? 0)>=0?i18.consumerReciepts.CONSUMER_PENDING_AMOUNT:i18.common.CORE_ADVANCE, ('₹' + ((item.totalDue ?? 0) - (item.totalAmountPaid ?? 0)).abs() .toString())), diff --git a/frontend/mgramseva/lib/providers/collect_payment_provider.dart b/frontend/mgramseva/lib/providers/collect_payment_provider.dart index 51d78de5d..bb740a01d 100644 --- a/frontend/mgramseva/lib/providers/collect_payment_provider.dart +++ b/frontend/mgramseva/lib/providers/collect_payment_provider.dart @@ -398,7 +398,7 @@ class CollectPaymentProvider with ChangeNotifier { .toString()) + ' only')), getPrinterLabel( - (item.totalDue ?? 0) - (item.totalAmountPaid ?? 0)>0?i18.consumerReciepts.CONSUMER_PENDING_AMOUNT:i18.common.CORE_ADVANCE, + (item.totalDue ?? 0) - (item.totalAmountPaid ?? 0)>=0?i18.consumerReciepts.CONSUMER_PENDING_AMOUNT:i18.common.CORE_ADVANCE, ('₹' + ((item.totalDue ?? 0) - (item.totalAmountPaid ?? 0)).abs() .toString())), From aaa045134005b93af3f275f80434959395c5628d Mon Sep 17 00:00:00 2001 From: Rahul Dev Garg <34365102+rahuldevgarg@users.noreply.github.com> Date: Fri, 15 Mar 2024 03:24:12 +0530 Subject: [PATCH 03/14] fix-wrong meter reading coming in previous reading in household details --- .../bill_generation_details_provider.dart | 7 ++---- .../providers/household_details_provider.dart | 25 +++++++++++-------- .../consumer_details/consumer_details.dart | 2 +- .../screeens/generate_bill/generate_bill.dart | 2 +- 4 files changed, 19 insertions(+), 17 deletions(-) diff --git a/frontend/mgramseva/lib/providers/bill_generation_details_provider.dart b/frontend/mgramseva/lib/providers/bill_generation_details_provider.dart index b4af33f53..212fb95a8 100644 --- a/frontend/mgramseva/lib/providers/bill_generation_details_provider.dart +++ b/frontend/mgramseva/lib/providers/bill_generation_details_provider.dart @@ -118,7 +118,7 @@ class BillGenerationProvider with ChangeNotifier { setMeterReading(meterRes) { if (meterRes.meterReadings!.length > 0 && - meterRes.meterReadings!.first.currentReading.toString() != '0') { + meterRes.meterReadings!.first.currentReading != null) { readingExist = false; var previousMeterReading = meterRes.meterReadings!.first.currentReading .toString() @@ -134,8 +134,7 @@ class BillGenerationProvider with ChangeNotifier { var reqDate = readDate.add(Duration(days: 1)).toLocal().toString(); prevReadingDate = DateFormats.dateToTimeStamp( DateFormats.getFilteredDate(reqDate, dateFormat: 'dd/MM/yyyy')); - } else if (waterconnection.additionalDetails!.meterReading.toString() != - '0') { + } else { readingExist = false; var previousMeterReading = waterconnection.additionalDetails!.meterReading .toString() @@ -146,8 +145,6 @@ class BillGenerationProvider with ChangeNotifier { billGenerateDetails.om_4Ctrl.text = previousMeterReading.toString()[3]; billGenerateDetails.om_5Ctrl.text = previousMeterReading.toString()[4]; prevReadingDate = waterconnection.previousReadingDate; - } else { - readingExist = true; } notifyListeners(); } diff --git a/frontend/mgramseva/lib/providers/household_details_provider.dart b/frontend/mgramseva/lib/providers/household_details_provider.dart index 98a40253e..e940c3743 100644 --- a/frontend/mgramseva/lib/providers/household_details_provider.dart +++ b/frontend/mgramseva/lib/providers/household_details_provider.dart @@ -12,6 +12,7 @@ import 'package:mgramseva/utils/error_logging.dart'; import 'package:mgramseva/utils/global_variables.dart'; import 'package:provider/provider.dart'; +import '../model/bill/meter_demand_details.dart'; import '../utils/constants.dart'; import 'common_provider.dart'; import 'fetch_bill_provider.dart'; @@ -24,15 +25,15 @@ class HouseHoldProvider with ChangeNotifier { var streamController = StreamController.broadcast(); var isVisible = false; - Future checkMeterDemand( - BillList data, WaterConnection waterConnection) async { - if (data.bill!.isNotEmpty) { + Future> checkMeterDemand( + BillList? data, WaterConnection? waterConnection) async { + if (data!=null && data.bill!.isNotEmpty) { try { var res = await BillGenerateRepository().searchMeteredDemand({ "tenantId": data.bill!.first.tenantId, "connectionNos": data.bill!.first.consumerCode }); - if (res.meterReadings!.isNotEmpty) { + if (res.meterReadings!=null && res.meterReadings!.isNotEmpty) { data.bill!.first.meterReadings = res.meterReadings; } if (data.bill!.first.billDetails != null) { @@ -40,14 +41,12 @@ class HouseHoldProvider with ChangeNotifier { .sort((a, b) => b.toPeriod!.compareTo(a.toPeriod!)); } data.bill!.first.waterConnection = waterConnection; - streamController.add(data); + return res.meterReadings!; } catch (e, s) { - streamController.addError('error'); ErrorHandler().allExceptionsHandler(navigatorKey.currentContext!, e, s); } - } else { - streamController.add(data); } + return []; } Future fetchDemand(data, List? demandList, @@ -120,13 +119,15 @@ class HouseHoldProvider with ChangeNotifier { waterConnection?.demands = demandList; updateDemandList?.demands = demandList; } else {} - + if(waterConnection?.connectionType == 'Metered' && waterConnection?.fetchBill?.bill?.isNotEmpty == true){ + checkMeterDemand(waterConnection?.fetchBill, waterConnection); + } await BillingServiceRepository().fetchdDemand({ "tenantId": data.tenantId, "consumerCode": data.connectionNo.toString(), "businessService": "WS", // "status": "ACTIVE" - }).then((value) { + }).then((value) async{ value.demands = value.demands ?.where((element) => element.status != 'CANCELLED') .toList(); @@ -151,6 +152,10 @@ class HouseHoldProvider with ChangeNotifier { } else { isfirstdemand = true; } + if(waterConnection?.connectionType == 'Metered' && waterConnection?.fetchBill?.bill?.isNotEmpty == true){ + value.demands?.first.meterReadings = await checkMeterDemand( + waterConnection?.fetchBill, waterConnection); + } streamController.add(value); // fetchBill(data); diff --git a/frontend/mgramseva/lib/screeens/consumer_details/consumer_details.dart b/frontend/mgramseva/lib/screeens/consumer_details/consumer_details.dart index c1b7e490c..aa6efb887 100644 --- a/frontend/mgramseva/lib/screeens/consumer_details/consumer_details.dart +++ b/frontend/mgramseva/lib/screeens/consumer_details/consumer_details.dart @@ -457,7 +457,7 @@ class _ConsumerDetailsState extends State { inputFormatter: [ FilteringTextInputFormatter .allow(RegExp( - "[a-zA-Z0-9]")) + r"^(?!0+$)[a-zA-Z0-9]+$")) ], key: Keys.createConsumer .CONSUMER_METER_NUMBER_KEY, diff --git a/frontend/mgramseva/lib/screeens/generate_bill/generate_bill.dart b/frontend/mgramseva/lib/screeens/generate_bill/generate_bill.dart index c3e31cc22..e429aad18 100644 --- a/frontend/mgramseva/lib/screeens/generate_bill/generate_bill.dart +++ b/frontend/mgramseva/lib/screeens/generate_bill/generate_bill.dart @@ -80,7 +80,7 @@ class _GenerateBillState extends State { Provider.of(context, listen: false).clearBillYear(); Navigator.pop(context); },), - WaterConnectionCountWidget(), + widget.id == null ?WaterConnectionCountWidget():Container(), Container( width: MediaQuery.of(context).size.width, child: Card( From 279e66f2918074732939fde19ced09e83115741a Mon Sep 17 00:00:00 2001 From: Rahul Dev Garg <34365102+rahuldevgarg@users.noreply.github.com> Date: Fri, 15 Mar 2024 03:25:58 +0530 Subject: [PATCH 04/14] fix-wrong meter reading coming in previous reading in household details --- .../mgramseva/lib/providers/household_details_provider.dart | 3 --- 1 file changed, 3 deletions(-) diff --git a/frontend/mgramseva/lib/providers/household_details_provider.dart b/frontend/mgramseva/lib/providers/household_details_provider.dart index e940c3743..a012772e4 100644 --- a/frontend/mgramseva/lib/providers/household_details_provider.dart +++ b/frontend/mgramseva/lib/providers/household_details_provider.dart @@ -119,9 +119,6 @@ class HouseHoldProvider with ChangeNotifier { waterConnection?.demands = demandList; updateDemandList?.demands = demandList; } else {} - if(waterConnection?.connectionType == 'Metered' && waterConnection?.fetchBill?.bill?.isNotEmpty == true){ - checkMeterDemand(waterConnection?.fetchBill, waterConnection); - } await BillingServiceRepository().fetchdDemand({ "tenantId": data.tenantId, "consumerCode": data.connectionNo.toString(), From 2a0fc075ee0ca87752c27cbbbee35bc3e996e3ac Mon Sep 17 00:00:00 2001 From: Rahul Dev Garg <34365102+rahuldevgarg@users.noreply.github.com> Date: Fri, 15 Mar 2024 03:37:22 +0530 Subject: [PATCH 05/14] Update urls.dart --- frontend/mgramseva/lib/services/urls.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/mgramseva/lib/services/urls.dart b/frontend/mgramseva/lib/services/urls.dart index 3a0c36f2f..406f0702b 100644 --- a/frontend/mgramseva/lib/services/urls.dart +++ b/frontend/mgramseva/lib/services/urls.dart @@ -3,7 +3,7 @@ class Url { static const String LOCALIZATION = 'localization/messages/v1/_search'; - static const String MDMS = 'egov-mdms-service/v1/_search'; + static const String MDMS = 'mdms-v2/v1/_search'; static const String FILE_UPLOAD = 'filestore/v1/files'; static const String FILE_FETCH = 'filestore/v1/files/url'; static const String URL_SHORTNER = 'eus/shortener'; From b619cea074c2c30bf74d3d72641390888211d356 Mon Sep 17 00:00:00 2001 From: Rahul Dev Garg <34365102+rahuldevgarg@users.noreply.github.com> Date: Fri, 15 Mar 2024 15:55:39 +0530 Subject: [PATCH 06/14] fix-wrong meter reading coming in previous reading in household details --- .../house_connection_and_bill/generate_new_bill.dart | 6 ++++-- .../mgramseva/lib/providers/household_details_provider.dart | 2 +- .../lib/repository/bill_generation_details_repo.dart | 5 ++++- 3 files changed, 9 insertions(+), 4 deletions(-) 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 c34d417b1..44b036c58 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 @@ -131,9 +131,11 @@ class _GenerateNewBillState extends State { : widget.waterConnection?.additionalDetails! .meterReading .toString() - : demandList.demands?.first.meterReadings!.first + :demandList.demands!.first.meterReadings!.isNotEmpty? demandList.demands?.first.meterReadings!.first .currentReading - .toString(), + .toString():widget.waterConnection?.additionalDetails! + .meterReading + .toString(), context), if(CommonProvider.getPenaltyOrAdvanceStatus(widget.waterConnection?.mdmsData, false) && !houseHoldProvider.isfirstdemand && widget.demandList.demands?.first.demandDetails?.first.taxHeadMasterCode != 'WS_ADVANCE_CARRYFORWARD' diff --git a/frontend/mgramseva/lib/providers/household_details_provider.dart b/frontend/mgramseva/lib/providers/household_details_provider.dart index a012772e4..b1a68c19f 100644 --- a/frontend/mgramseva/lib/providers/household_details_provider.dart +++ b/frontend/mgramseva/lib/providers/household_details_provider.dart @@ -27,7 +27,7 @@ class HouseHoldProvider with ChangeNotifier { Future> checkMeterDemand( BillList? data, WaterConnection? waterConnection) async { - if (data!=null && 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, diff --git a/frontend/mgramseva/lib/repository/bill_generation_details_repo.dart b/frontend/mgramseva/lib/repository/bill_generation_details_repo.dart index 4efb27f98..9ff475132 100644 --- a/frontend/mgramseva/lib/repository/bill_generation_details_repo.dart +++ b/frontend/mgramseva/lib/repository/bill_generation_details_repo.dart @@ -58,7 +58,10 @@ class BillGenerateRepository extends BaseService { method: RequestType.POST); if (res != null) { meterDemand = MeterDemand.fromJson(res); - meterDemand.meterReadings!.sort((a, b) => b.currentReading!.compareTo(a.currentReading!)); + if(meterDemand.meterReadings !=null &&meterDemand.meterReadings!.isNotEmpty){ + meterDemand.meterReadings! + .sort((a, b) => b.currentReading!.compareTo(a.currentReading!)); + } } return meterDemand; } From 230b3595645f9b6758229f9beb2304bbc630f458 Mon Sep 17 00:00:00 2001 From: Rahul Dev Garg <34365102+rahuldevgarg@users.noreply.github.com> Date: Fri, 15 Mar 2024 15:57:45 +0530 Subject: [PATCH 07/14] upgraded version number --- frontend/mgramseva/package.json | 2 +- frontend/mgramseva/pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/mgramseva/package.json b/frontend/mgramseva/package.json index 757974e71..019f0a5e2 100644 --- a/frontend/mgramseva/package.json +++ b/frontend/mgramseva/package.json @@ -1,5 +1,5 @@ { "name": "mgramseva", - "version": "1.2.21", + "version": "1.2.22", "license": "egov" } diff --git a/frontend/mgramseva/pubspec.yaml b/frontend/mgramseva/pubspec.yaml index 765917714..6817f56e6 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+37 +version: 1.2.22+38 environment: sdk: ">=2.12.0 <4.0.0" From cbef403217e6165265525624e3ded906c968be08 Mon Sep 17 00:00:00 2001 From: Rahul Dev Garg <34365102+rahuldevgarg@users.noreply.github.com> Date: Fri, 15 Mar 2024 16:22:31 +0530 Subject: [PATCH 08/14] upgraded version number --- frontend/mgramseva/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/mgramseva/pubspec.yaml b/frontend/mgramseva/pubspec.yaml index 6817f56e6..eb7ba7e30 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.22+38 +version: 1.2.21+38 environment: sdk: ">=2.12.0 <4.0.0" From c25dcf6df0fdfb669fd1ad2edc0cbb901565fd04 Mon Sep 17 00:00:00 2001 From: Saloni-eGov Date: Thu, 4 Apr 2024 13:10:14 +0530 Subject: [PATCH 09/14] reverted sms change for arrears --- .../main/java/org/egov/wscalculation/service/DemandService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/service/DemandService.java b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/service/DemandService.java index 4016f83e0..ffb05d85c 100644 --- a/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/service/DemandService.java +++ b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/service/DemandService.java @@ -383,7 +383,7 @@ private void sendDownloadBillSMSNotification(RequestInfo requestInfo, String ten BigDecimal arrears=totalamount.subtract(demandAmount); if(arrears.compareTo(BigDecimal.ZERO)>0) { - messageString = messageString.replace("{billamount}", totalamount.toString()+"(includes Rs."+ arrears.toString()+ " arrears)"); + messageString = messageString.replace("{billamount}", totalamount.toString()); } else { From f2431ff4617b2d183daf807efda9965baf8979ce Mon Sep 17 00:00:00 2001 From: Saloni <103189799+saloni041@users.noreply.github.com> Date: Thu, 2 May 2024 12:41:27 +0530 Subject: [PATCH 10/14] Update application.properties --- .../ws-calculator/src/main/resources/application.properties | 1 - 1 file changed, 1 deletion(-) diff --git a/municipal-services/ws-calculator/src/main/resources/application.properties b/municipal-services/ws-calculator/src/main/resources/application.properties index 9b8bb7a36..c1860ade8 100644 --- a/municipal-services/ws-calculator/src/main/resources/application.properties +++ b/municipal-services/ws-calculator/src/main/resources/application.properties @@ -22,7 +22,6 @@ spring.kafka.consumer.group-id=egov-ws-calc-services spring.kafka.consumer.properties.spring.json.use.type.headers=false spring.kafka.producer.key-serializer=org.apache.kafka.common.serialization.StringSerializer spring.kafka.producer.value-serializer=org.springframework.kafka.support.serializer.JsonSerializer -spring.kafka.consumer.properties.max.poll.interval.ms=600000 $KAFKA TOPIC DETAILS egov.watercalculatorservice.createdemand.topic=ws-generate-demand From fa641fa181cf55d816d902b94591fef4e99b83ed Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Fri, 10 May 2024 12:45:21 +0530 Subject: [PATCH 11/14] WhatsApp Share Logo Alignment Issue Fixed https://digit-discuss.atlassian.net/browse/ISTE-25 --- .../household_register.dart | 36 ++++++++++++++----- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/frontend/mgramseva/lib/screeens/household_register/household_register.dart b/frontend/mgramseva/lib/screeens/household_register/household_register.dart index 36d7d699f..f8fe27fb7 100644 --- a/frontend/mgramseva/lib/screeens/household_register/household_register.dart +++ b/frontend/mgramseva/lib/screeens/household_register/household_register.dart @@ -1,4 +1,6 @@ +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/widgets.dart'; import 'package:flutter_focus_watcher/flutter_focus_watcher.dart'; import 'package:mgramseva/components/household_register/household_card.dart'; import 'package:mgramseva/providers/household_register_provider.dart'; @@ -44,6 +46,7 @@ class _HouseholdRegister extends State @override Widget build(BuildContext context) { + Size size = MediaQuery.of(context).size; var householdRegisterProvider = Provider.of(context, listen: false); @@ -76,14 +79,25 @@ class _HouseholdRegister extends State child: CustomScrollView(slivers: [ SliverList( delegate: SliverChildListDelegate([ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - HomeBack(), - Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [_buildDownload, _buildShare]) - ], + SizedBox( + width: size.width, + child: Row( + children: [ + HomeBack(), + Expanded( + child: Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Expanded( + child: Align( + alignment: Alignment.centerRight, + child: _buildDownload)), + _buildShare + ], + ), + ) + ], + ), ), Container(key: key, child: HouseholdCard()), ])), @@ -130,7 +144,11 @@ class _HouseholdRegister extends State onPressed: () => showDownloadList(Constants.DOWNLOAD_OPTIONS, context), icon: Icon(Icons.download_sharp), label: Text( - ApplicationLocalizations.of(context).translate(i18.common.DOWNLOAD))); + ApplicationLocalizations.of(context).translate(i18.common.DOWNLOAD), + maxLines: 1, + softWrap: false, + overflow: TextOverflow.ellipsis, + )); } showDownloadList(List result, BuildContext context) { From e06bf1f18542cc2f1e81681acf3b6d12a3bd830b Mon Sep 17 00:00:00 2001 From: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Date: Wed, 15 May 2024 19:35:35 +0530 Subject: [PATCH 12/14] ISTE-131,ISTE-132: Fixed numbers not allowing starting from 5, Removed HRMS roles from search and count --- .../modules/hrms/src/components/hrmscard.js | 39 ++++++++++--------- .../packages/modules/hrms/src/pages/Inbox.js | 15 ++++--- 2 files changed, 29 insertions(+), 25 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/hrmscard.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/hrmscard.js index 5fe963f41..d2548841f 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/hrmscard.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/hrmscard.js @@ -14,35 +14,37 @@ const HRMSCard = () => { const { t } = useTranslation(); const tenantId = Digit.ULBService.getCurrentTenantId(); let roles = STATE_ADMIN - ? { roles: "DIV_ADMIN, HRMS_ADMIN", isStateLevelSearch: true } - : { roles: "SYSTEM, GP_ADMIN, COLLECTION_OPERATOR, PROFILE_UPDATE, DASHBOAD_VIEWER, SARPANCH, REVENUE_COLLECTOR, SECRETARY", isStateLevelSearch: false }; + ? { roles: "DIV_ADMIN", isStateLevelSearch: true } + : { + roles: "SYSTEM, GP_ADMIN, COLLECTION_OPERATOR, PROFILE_UPDATE, DASHBOAD_VIEWER, SARPANCH, REVENUE_COLLECTOR, SECRETARY", + isStateLevelSearch: false, + }; const { isLoading, isError, error, data, ...rest } = Digit.Hooks.hrms.useHRMSCount(tenantId, roles); const moduleForSomeDIVAdmin = DIV_ADMIN && MDMS_ADMIN ? [ - { - label: t("WORK_BENCH_URL_MASTER_DATA"), - link: `${window?.location?.origin}/workbench-ui/employee/workbench/mdms-search-v2?moduleName=ws-services-calculation&masterName=WCBillingSlab`, - }, - // { - // label: t("WORK_BENCH_URL_LOCALIZATION"), - // link: `${window?.location?.origin}/workbench-ui/employee/workbench/localisation-search`, - // }, - ] + { + label: t("WORK_BENCH_URL_MASTER_DATA"), + link: `${window?.location?.origin}/workbench-ui/employee/workbench/mdms-search-v2?moduleName=ws-services-calculation&masterName=WCBillingSlab`, + }, + // { + // label: t("WORK_BENCH_URL_LOCALIZATION"), + // link: `${window?.location?.origin}/workbench-ui/employee/workbench/localisation-search`, + // }, + ] : []; const moduleForSomeSTATEUser = STATE_ADMIN && MDMS_ADMIN ? [ - { - label: t("WORK_BENCH_URL_MASTER_DATA"), - link: `${window?.location?.origin}/workbench-ui/employee/workbench/mdms-search-v2?moduleName=tenant&masterName=tenants`, - }, - ] + { + label: t("WORK_BENCH_URL_MASTER_DATA"), + link: `${window?.location?.origin}/workbench-ui/employee/workbench/mdms-search-v2?moduleName=tenant&masterName=tenants`, + }, + ] : []; - const propsForModuleCard = { Icon: , moduleName: t("ACTION_TEST_HRMS"), @@ -73,11 +75,10 @@ const HRMSCard = () => { }, ...moduleForSomeDIVAdmin, ...moduleForSomeSTATEUser, - ], }; return ; }; -export default HRMSCard; \ No newline at end of file +export default HRMSCard; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/Inbox.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/Inbox.js index e4c098037..daf0af281 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/Inbox.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/Inbox.js @@ -27,8 +27,11 @@ const Inbox = ({ parentRoute, businessService = "HRMS", initialStates = {}, filt const isupdate = Digit.SessionStorage.get("isupdate"); let roles = STATE_ADMIN - ? { roles: "DIV_ADMIN, HRMS_ADMIN", isStateLevelSearch: true } - : { roles: "SYSTEM, GP_ADMIN, COLLECTION_OPERATOR, PROFILE_UPDATE, DASHBOAD_VIEWER, SARPANCH, REVENUE_COLLECTOR, SECRETARY", isStateLevelSearch: false }; + ? { roles: "DIV_ADMIN", isStateLevelSearch: true } + : { + roles: "SYSTEM, GP_ADMIN, COLLECTION_OPERATOR, PROFILE_UPDATE, DASHBOAD_VIEWER, SARPANCH, REVENUE_COLLECTOR, SECRETARY", + isStateLevelSearch: false, + }; let requestBody = { criteria: { @@ -102,9 +105,9 @@ const Inbox = ({ parentRoute, businessService = "HRMS", initialStates = {}, filt if (keys_to_delete) keys_to_delete.forEach((key) => delete _new[key]); filterParam.delete; delete _new.delete; - if (!_new.tenantId){ - _new = {tenantId: tenantId} - } + if (!_new.tenantId) { + _new = { tenantId: tenantId }; + } setSearchParams({ ..._new }); }; @@ -127,7 +130,7 @@ const Inbox = ({ parentRoute, businessService = "HRMS", initialStates = {}, filt label: t("HR_MOB_NO_LABEL"), name: "phone", maxlength: 10, - pattern: "[6-9][0-9]{9}", + pattern: "[4-9][0-9]{9}", title: t("ES_SEARCH_APPLICATION_MOBILE_INVALID"), componentInFront: "+91", }, From b59bad697d89f7b972c285866c5c18a1a27a3389 Mon Sep 17 00:00:00 2001 From: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Date: Thu, 23 May 2024 13:22:41 +0530 Subject: [PATCH 13/14] ISTE-149: Removed mobile number validation which starts from 5, now it starts from 4 --- .../modules/core/src/pages/citizen/Home/UserProfile.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/Home/UserProfile.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/Home/UserProfile.js index 57745f68b..ee746e03b 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/Home/UserProfile.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/Home/UserProfile.js @@ -11,7 +11,7 @@ import { BackButton, Loader, SubmitBar, - Password + Password, } from "@egovernments/digit-ui-react-components"; import React, { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; @@ -136,7 +136,7 @@ const UserProfile = ({ stateCode, userType, cityDetails }) => { const setUserMobileNumber = (value) => { setMobileNo(value); - if (userType === "employee" && !new RegExp(/^[6-9]{1}[0-9]{9}$/).test(value)) { + if (userType === "employee" && !new RegExp(/^[4-9]{1}[0-9]{9}$/).test(value)) { setErrors({ ...errors, mobileNumber: { type: "pattern", message: "CORE_COMMON_PROFILE_MOBILE_NUMBER_INVALID" } }); } else { setErrors({ ...errors, mobileNumber: null }); @@ -200,7 +200,7 @@ const UserProfile = ({ stateCode, userType, cityDetails }) => { throw JSON.stringify({ type: "error", message: t("CORE_COMMON_PROFILE_NAME_INVALID") }); } - if (userType === "employee" && !new RegExp(/^[6-9]{1}[0-9]{9}$/).test(mobileNumber)) { + if (userType === "employee" && !new RegExp(/^[4-9]{1}[0-9]{9}$/).test(mobileNumber)) { throw JSON.stringify({ type: "error", message: t("CORE_COMMON_PROFILE_MOBILE_NUMBER_INVALID") }); } @@ -277,7 +277,6 @@ const UserProfile = ({ stateCode, userType, cityDetails }) => { } catch (error) { if (error?.response?.data?.Errors[0].message) { showToast("error", error?.response?.data?.Errors[0].message); - } else { const errorObj = JSON.parse(error); showToast(errorObj.type, t(errorObj.message), 5000); @@ -605,7 +604,6 @@ const UserProfile = ({ stateCode, userType, cityDetails }) => { onChange={(value) => setUserCurrentPassword(value)} disable={editScreen} maxlength={10} - /> {errors?.currentPassword && {t(errors?.currentPassword?.message)}} @@ -643,7 +641,6 @@ const UserProfile = ({ stateCode, userType, cityDetails }) => { onChange={(value) => setUserConfirmPassword(value)} disable={editScreen} maxlength={10} - /> {errors?.confirmPassword && {t(errors?.confirmPassword?.message)}} From 978666a4b9cc103bc390f3689c17571c11697de4 Mon Sep 17 00:00:00 2001 From: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Date: Thu, 23 May 2024 16:26:48 +0530 Subject: [PATCH 14/14] ISTE-152: Mobile number allowed from 4 --- .../packages/libraries/src/utils/index.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/index.js b/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/index.js index 8921129f6..168427def 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/index.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/index.js @@ -5,7 +5,7 @@ import * as locale from "./locale"; import * as obps from "./obps"; import * as pt from "./pt"; import * as privacy from "./privacy"; -import PDFUtil, { downloadReceipt ,downloadPDFFromLink,downloadBill ,getFileUrl} from "./pdf"; +import PDFUtil, { downloadReceipt, downloadPDFFromLink, downloadBill, getFileUrl } from "./pdf"; import getFileTypeFromFileStoreURL from "./fileType"; import preProcessMDMSConfig from "./preProcessMDMSConfig"; import preProcessMDMSConfigInboxSearch from "./preProcessMDMSConfigInboxSearch"; @@ -26,7 +26,7 @@ const getPattern = (type) => { case "SearchOwnerName": return /^[^{0-9}^\$\"<>?\\\\~!@#$%^()+={}\[\]*,/_:;“”‘’]{3,50}$/i; case "MobileNo": - return /^[6789][0-9]{9}$/i; + return /^[456789][0-9]{9}$/i; case "Amount": return /^[0-9]{0,8}$/i; case "NonZeroAmount": @@ -170,9 +170,7 @@ const NOCAccess = () => { const userInfo = Digit.UserService.getUser(); const userRoles = userInfo?.info?.roles?.map((roleData) => roleData?.code); - const NOC_ROLES = [ - "FIRE_NOC_APPROVER" - ] + const NOC_ROLES = ["FIRE_NOC_APPROVER"]; const NOC_ACCESS = userRoles?.filter((role) => NOC_ROLES?.includes(role)); @@ -266,7 +264,7 @@ const hrmsAccess = () => { const wsAccess = () => { const userInfo = Digit.UserService.getUser(); const userRoles = userInfo?.info?.roles?.map((roleData) => roleData?.code); - const waterRoles = ["WS_CEMP", "WS_APPROVER", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER","WS_CLERK"]; + const waterRoles = ["WS_CEMP", "WS_APPROVER", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER", "WS_CLERK"]; const WS_ACCESS = userRoles?.filter((role) => waterRoles?.includes(role)); @@ -276,7 +274,7 @@ const wsAccess = () => { const swAccess = () => { const userInfo = Digit.UserService.getUser(); const userRoles = userInfo?.info?.roles?.map((roleData) => roleData?.code); - const sewerageRoles = ["SW_CEMP", "SW_APPROVER", "SW_FIELD_INSPECTOR", "SW_DOC_VERIFIER","SW_CLERK"]; + const sewerageRoles = ["SW_CEMP", "SW_APPROVER", "SW_FIELD_INSPECTOR", "SW_DOC_VERIFIER", "SW_CLERK"]; const SW_ACCESS = userRoles?.filter((role) => sewerageRoles?.includes(role)); @@ -325,5 +323,5 @@ export default { getConfigModuleName, preProcessMDMSConfig, preProcessMDMSConfigInboxSearch, - ...privacy + ...privacy, };