From 2f0af0da2f1fda19f19bc995cc2c9814cd4a6cd4 Mon Sep 17 00:00:00 2001 From: Priyanka-eGov Date: Fri, 7 Jun 2024 14:54:29 +0530 Subject: [PATCH 001/118] ISTE-167 pushing to demand indexer topic on create --- .../src/main/java/org/egov/demand/service/DemandService.java | 5 +++++ .../src/main/resources/application.properties | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/business-services/billing-service/src/main/java/org/egov/demand/service/DemandService.java b/business-services/billing-service/src/main/java/org/egov/demand/service/DemandService.java index db0fa4fad..684087b41 100644 --- a/business-services/billing-service/src/main/java/org/egov/demand/service/DemandService.java +++ b/business-services/billing-service/src/main/java/org/egov/demand/service/DemandService.java @@ -56,6 +56,7 @@ import org.egov.demand.config.ApplicationProperties; import org.egov.demand.model.*; import org.egov.demand.model.BillV2.BillStatus; +import org.egov.demand.producer.Producer; import org.egov.demand.repository.AmendmentRepository; import org.egov.demand.repository.BillRepositoryV2; import org.egov.demand.repository.DemandRepository; @@ -120,6 +121,9 @@ public class DemandService { @Autowired private DemandValidatorV1 demandValidatorV1; + + @Autowired + private Producer producer; /** * Method to create new demand @@ -358,6 +362,7 @@ public List getDemands(DemandCriteria demandCriteria, RequestInfo reques public void save(DemandRequest demandRequest) { demandRepository.save(demandRequest); + producer.push(applicationProperties.getDemandIndexTopic(), demandRequest); } public void update(DemandRequest demandRequest, PaymentBackUpdateAudit paymentBackUpdateAudit) { diff --git a/business-services/billing-service/src/main/resources/application.properties b/business-services/billing-service/src/main/resources/application.properties index b38493e0d..83b59d542 100644 --- a/business-services/billing-service/src/main/resources/application.properties +++ b/business-services/billing-service/src/main/resources/application.properties @@ -49,7 +49,7 @@ kafka.topics.receipt.cancel.name=egov.collection.receipt-cancel kafka.topics.receipt.cancel.key=receipt-cancel #Indexer topics -kafka.topics.demand.index.name=create-demand-index-v1 +kafka.topics.demand.index.name=create-demand-index # KAFKA CONSUMER CONFIGURATIONS From 3cd42a689c71910132dd520408b1cbe8e6bb5a21 Mon Sep 17 00:00:00 2001 From: Priyanka-eGov Date: Mon, 10 Jun 2024 12:16:29 +0530 Subject: [PATCH 002/118] ISTE-167 pushing to demand indexer topic for update --- .../org/egov/demand/config/ApplicationProperties.java | 10 ++++++---- .../java/org/egov/demand/service/DemandService.java | 3 ++- .../src/main/resources/application.properties | 3 ++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/business-services/billing-service/src/main/java/org/egov/demand/config/ApplicationProperties.java b/business-services/billing-service/src/main/java/org/egov/demand/config/ApplicationProperties.java index 3ea2daee2..83477836f 100644 --- a/business-services/billing-service/src/main/java/org/egov/demand/config/ApplicationProperties.java +++ b/business-services/billing-service/src/main/java/org/egov/demand/config/ApplicationProperties.java @@ -120,10 +120,12 @@ public class ApplicationProperties { @Value("${kafka.topics.receipt.cancel.name}") private String receiptCancellationTopic; - @Value("${kafka.topics.demand.index.name}") - private String demandIndexTopic; - - + @Value("${kafka.topics.create.demand.index.name}") + private String createDemandIndexTopic; + + @Value("${kafka.topics.update.demand.index.name}") + private String updateDemandIndexTopic; + /* * billing service v1.1 */ diff --git a/business-services/billing-service/src/main/java/org/egov/demand/service/DemandService.java b/business-services/billing-service/src/main/java/org/egov/demand/service/DemandService.java index 684087b41..812ee8533 100644 --- a/business-services/billing-service/src/main/java/org/egov/demand/service/DemandService.java +++ b/business-services/billing-service/src/main/java/org/egov/demand/service/DemandService.java @@ -362,11 +362,12 @@ public List getDemands(DemandCriteria demandCriteria, RequestInfo reques public void save(DemandRequest demandRequest) { demandRepository.save(demandRequest); - producer.push(applicationProperties.getDemandIndexTopic(), demandRequest); + producer.push(applicationProperties.getCreateDemandIndexTopic(), demandRequest); } public void update(DemandRequest demandRequest, PaymentBackUpdateAudit paymentBackUpdateAudit) { demandRepository.update(demandRequest, paymentBackUpdateAudit); + producer.push(applicationProperties.getUpdateDemandIndexTopic(), demandRequest); } diff --git a/business-services/billing-service/src/main/resources/application.properties b/business-services/billing-service/src/main/resources/application.properties index 83b59d542..85f8c63a3 100644 --- a/business-services/billing-service/src/main/resources/application.properties +++ b/business-services/billing-service/src/main/resources/application.properties @@ -49,7 +49,8 @@ kafka.topics.receipt.cancel.name=egov.collection.receipt-cancel kafka.topics.receipt.cancel.key=receipt-cancel #Indexer topics -kafka.topics.demand.index.name=create-demand-index +kafka.topics.create.demand.index.name=create-demand-index +kafka.topics.update.demand.index.name=update-demand-index # KAFKA CONSUMER CONFIGURATIONS From ba63a93492d6e24340d71b60273d29409d32118a Mon Sep 17 00:00:00 2001 From: Saloni-eGov Date: Wed, 12 Jun 2024 12:16:57 +0530 Subject: [PATCH 003/118] ISTE-21 --- .../org/egov/waterconnection/repository/WaterDaoImpl.java | 1 + .../org/egov/waterconnection/service/WaterServiceImpl.java | 4 ++++ .../egov/waterconnection/web/controller/WaterController.java | 3 +++ 3 files changed, 8 insertions(+) diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/WaterDaoImpl.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/WaterDaoImpl.java index c95a6aa18..a13331fc7 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/WaterDaoImpl.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/WaterDaoImpl.java @@ -155,6 +155,7 @@ public WaterConnectionResponse getWaterConnectionList(SearchCriteria criteria, R @Override public void updateWaterConnection(WaterConnectionRequest waterConnectionRequest, boolean isStateUpdatable) { if (isStateUpdatable) { + log.info("sending data to kafka topic updateWaterConnection " +waterConnectionRequest.toString()); waterConnectionProducer.push(updateWaterConnection, waterConnectionRequest); } else { waterConnectionProducer.push(wsConfiguration.getWorkFlowUpdateTopic(), waterConnectionRequest); diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterServiceImpl.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterServiceImpl.java index 704683d4b..0229d7745 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterServiceImpl.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterServiceImpl.java @@ -24,6 +24,7 @@ import javax.validation.Valid; +import lombok.extern.slf4j.Slf4j; import org.egov.common.contract.request.RequestInfo; import org.egov.tracer.model.CustomException; import org.egov.waterconnection.config.WSConfiguration; @@ -55,6 +56,7 @@ import com.fasterxml.jackson.databind.node.ObjectNode; import com.jayway.jsonpath.JsonPath; +@Slf4j @Component public class WaterServiceImpl implements WaterService { @@ -370,10 +372,12 @@ private List updateWaterConnectionForModifyFlow(WaterConnection waterConnectionRequest.getWaterConnection().setApplicationStatus("INACTIVE"); } // setting oldApplication Flag + log.info("sending water connection request to method markOldApplication "+waterConnectionRequest.toString()); markOldApplication(waterConnectionRequest); // check for edit and send edit notification waterDaoImpl.pushForEditNotification(waterConnectionRequest); postForMeterReading(waterConnectionRequest, WCConstants.MODIFY_CONNECTION); + log.info("before sending data from line 380 in water service impl "+waterConnectionRequest.toString()); return Arrays.asList(waterConnectionRequest.getWaterConnection()); } diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/controller/WaterController.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/controller/WaterController.java index cd462ba50..ffa50d458 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/controller/WaterController.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/controller/WaterController.java @@ -4,6 +4,7 @@ import javax.validation.Valid; +import lombok.extern.slf4j.Slf4j; import org.egov.waterconnection.constants.WCConstants; import org.egov.waterconnection.service.SchedulerService; import org.egov.waterconnection.service.WaterService; @@ -45,6 +46,7 @@ import lombok.Getter; import lombok.Setter; +@Slf4j @Getter @Setter @Builder @@ -86,6 +88,7 @@ public ResponseEntity search(@Valid @RequestBody Reques public ResponseEntity updateWaterConnection( @Valid @RequestBody WaterConnectionRequest waterConnectionRequest) { List waterConnection = waterService.updateWaterConnection(waterConnectionRequest); + log.info("response sent back from api update "+waterConnection.toString()); WaterConnectionResponse response = WaterConnectionResponse.builder().waterConnection(waterConnection) .responseInfo(responseInfoFactory .createResponseInfoFromRequestInfo(waterConnectionRequest.getRequestInfo(), true)) From 011f00edfeda634517c27b5c8b46d3f575f6522b Mon Sep 17 00:00:00 2001 From: Priyanka-eGov Date: Wed, 12 Jun 2024 15:01:02 +0530 Subject: [PATCH 004/118] ISTE-167 adding changes for plain search API for demand --- .../demand/config/ApplicationProperties.java | 10 ++ .../org/egov/demand/model/DemandCriteria.java | 6 +- .../demand/repository/DemandRepository.java | 24 +++++ .../querybuilder/DemandQueryBuilder.java | 98 ++++++++++++++----- .../egov/demand/service/DemandService.java | 18 ++++ .../web/controller/DemandController.java | 22 +++-- .../src/main/resources/application.properties | 6 ++ 7 files changed, 149 insertions(+), 35 deletions(-) diff --git a/business-services/billing-service/src/main/java/org/egov/demand/config/ApplicationProperties.java b/business-services/billing-service/src/main/java/org/egov/demand/config/ApplicationProperties.java index 83477836f..e70212df5 100644 --- a/business-services/billing-service/src/main/java/org/egov/demand/config/ApplicationProperties.java +++ b/business-services/billing-service/src/main/java/org/egov/demand/config/ApplicationProperties.java @@ -209,4 +209,14 @@ public class ApplicationProperties { @Value("${kafka.mgramseva.update.bill}") private String updateBill; + + @Value("${egov.demand.default.offset}") + private Integer demandDefaultOffset; + + @Value("${egov.demand.default.limit}") + private Integer demandDefaultLimit; + + @Value("${egov.demand.max.limit}") + private Integer demandMaxLimit; + } diff --git a/business-services/billing-service/src/main/java/org/egov/demand/model/DemandCriteria.java b/business-services/billing-service/src/main/java/org/egov/demand/model/DemandCriteria.java index 1dfff60a5..890c8f9bc 100644 --- a/business-services/billing-service/src/main/java/org/egov/demand/model/DemandCriteria.java +++ b/business-services/billing-service/src/main/java/org/egov/demand/model/DemandCriteria.java @@ -86,7 +86,11 @@ public class DemandCriteria { private String status; private Boolean isPaymentCompleted; - + + private Integer offset; + + private Integer limit; + @Default private Boolean receiptRequired=false; } diff --git a/business-services/billing-service/src/main/java/org/egov/demand/repository/DemandRepository.java b/business-services/billing-service/src/main/java/org/egov/demand/repository/DemandRepository.java index aaff916e4..cacd7b296 100644 --- a/business-services/billing-service/src/main/java/org/egov/demand/repository/DemandRepository.java +++ b/business-services/billing-service/src/main/java/org/egov/demand/repository/DemandRepository.java @@ -49,6 +49,7 @@ import java.util.UUID; import java.util.stream.Collectors; +import org.apache.kafka.common.protocol.types.Field; import org.egov.demand.model.AuditDetails; import org.egov.demand.model.Demand; import org.egov.demand.model.DemandCriteria; @@ -59,15 +60,18 @@ import org.egov.demand.repository.rowmapper.DemandRowMapper; import org.egov.demand.util.Util; import org.egov.demand.web.contract.DemandRequest; +import org.egov.tracer.model.CustomException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.dao.DataAccessException; import org.springframework.jdbc.core.BatchPreparedStatementSetter; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.core.PreparedStatementSetter; +import org.springframework.jdbc.core.SingleColumnRowMapper; import org.springframework.stereotype.Repository; import org.springframework.transaction.annotation.Transactional; import lombok.extern.slf4j.Slf4j; +import org.springframework.util.CollectionUtils; @Repository @Slf4j @@ -409,4 +413,24 @@ public List getDemandHistory(DemandCriteria demandCriteria) { String searchDemandQuery = demandQueryBuilder.getDemandHistoryQuery(demandCriteria, preparedStatementValues); return jdbcTemplate.query(searchDemandQuery, preparedStatementValues.toArray(), demandHistoryRowMapper); } + + public List getDemandIds(DemandCriteria demandCriteria) + { + List preparedStmtList = new ArrayList<>(); + String searchDemandQuery = demandQueryBuilder.getdemandIdSearchQuery(demandCriteria, preparedStmtList); + return jdbcTemplate.query(searchDemandQuery, new SingleColumnRowMapper<>(String.class), preparedStmtList.toArray()); + } + + public List getDemandsPlainSearch(DemandCriteria demandCriteria) { + + if (demandCriteria.getDemandId() == null || CollectionUtils.isEmpty(demandCriteria.getDemandId())) + throw new CustomException("PLAIN_SEARCH_ERROR", "Search only allowed by ids!"); + + List preparedStmtList = new ArrayList<>(); + String query = demandQueryBuilder.getDemandPlainSearchQuery(demandCriteria, preparedStmtList); + log.info("Query: " + query); + log.info("PS: " + preparedStmtList); + return jdbcTemplate.query(query, preparedStmtList.toArray(), demandRowMapper); + } + } diff --git a/business-services/billing-service/src/main/java/org/egov/demand/repository/querybuilder/DemandQueryBuilder.java b/business-services/billing-service/src/main/java/org/egov/demand/repository/querybuilder/DemandQueryBuilder.java index 3c0c39a2c..19a8f7428 100644 --- a/business-services/billing-service/src/main/java/org/egov/demand/repository/querybuilder/DemandQueryBuilder.java +++ b/business-services/billing-service/src/main/java/org/egov/demand/repository/querybuilder/DemandQueryBuilder.java @@ -39,12 +39,10 @@ */ package org.egov.demand.repository.querybuilder; -import java.util.Collection; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.Map.Entry; -import java.util.Set; +import org.apache.kafka.common.protocol.types.Field; import org.egov.demand.model.DemandCriteria; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; @@ -136,7 +134,8 @@ public class DemandQueryBuilder { public static final String DEMAND_UPDATE_CONSUMERCODE_QUERY="UPDATE egbs_demand_v1 SET consumercode=?, lastmodifiedby=?, lastmodifiedtime=? " + " WHERE tenantid=? AND id IN ("; - + + public static final String FETCH_DEMAND_IDS_QUERY = "SELECT dmd.id AS did FROM egbs_demand_v1 dmd WHERE"; public String getDemandQueryForConsumerCodes(Map> businessConsumercodeMap,List preparedStmtList, String tenantId){ @@ -174,9 +173,44 @@ public String getDemandQuery(DemandCriteria demandCriteria, List prepare StringBuilder demandQuery = new StringBuilder(BASE_DEMAND_QUERY); + addDemandCriteria(demandQuery, demandCriteria, preparedStatementValues); + addOrderByClause(demandQuery, DEMAND_QUERY_ORDER_BY_CLAUSE); + addPagingClause(demandQuery, preparedStatementValues); + + log.info("the query String for demand : " + demandQuery.toString()); + return demandQuery.toString(); + } + + public String getdemandIdSearchQuery(DemandCriteria demandCriteria, List preparedStatementValues) + { + StringBuilder demandIdSearchQuery = new StringBuilder(FETCH_DEMAND_IDS_QUERY); + addDemandCriteria(demandIdSearchQuery, demandCriteria, preparedStatementValues); + addOrderByClause(demandIdSearchQuery, DEMAND_QUERY_ORDER_BY_CLAUSE); + addPagingClauseForDemandIdSearch(demandIdSearchQuery, demandCriteria, preparedStatementValues); + log.info("Query for demand id search : " + demandIdSearchQuery.toString()); + return demandIdSearchQuery.toString(); + + } + + public String getDemandPlainSearchQuery(DemandCriteria demandCriteria, List preparedStmtList) { + + StringBuilder demandQuery = new StringBuilder(BASE_DEMAND_QUERY); + + Set ids = demandCriteria.getDemandId(); + if (!CollectionUtils.isEmpty(ids)) { + addAndClause(demandQuery); + demandQuery.append(" dmd.id IN (").append(createQuery( new ArrayList<>(ids))).append(")"); + addToPreparedStatement(preparedStmtList, ids); + } + + return demandQuery.toString(); + } + + public void addDemandCriteria(StringBuilder demandQuery, DemandCriteria demandCriteria, List preparedStatementValues) + { String tenantId = demandCriteria.getTenantId(); String[] tenantIdChunks = tenantId.split("\\."); - + if(tenantIdChunks.length == 1){ demandQuery.append(" dmd.tenantid LIKE ? "); preparedStatementValues.add(demandCriteria.getTenantId() + '%'); @@ -184,7 +218,7 @@ public String getDemandQuery(DemandCriteria demandCriteria, List prepare demandQuery.append(" dmd.tenantid = ? "); preparedStatementValues.add(demandCriteria.getTenantId()); } - + if (demandCriteria.getStatus() != null) { @@ -192,7 +226,7 @@ public String getDemandQuery(DemandCriteria demandCriteria, List prepare demandQuery.append("dmd.status=?"); preparedStatementValues.add(demandCriteria.getStatus()); } - + if (demandCriteria.getDemandId() != null && !demandCriteria.getDemandId().isEmpty()) { addAndClause(demandQuery); demandQuery.append("dmd.id IN (" + getIdQueryForStrings(demandCriteria.getDemandId()) + ")"); @@ -208,39 +242,33 @@ public String getDemandQuery(DemandCriteria demandCriteria, List prepare demandQuery.append("dmd.businessservice=?"); preparedStatementValues.add(demandCriteria.getBusinessService()); } - + if(demandCriteria.getIsPaymentCompleted() != null){ addAndClause(demandQuery); demandQuery.append("dmd.ispaymentcompleted = ?"); preparedStatementValues.add(demandCriteria.getIsPaymentCompleted()); } - + if (demandCriteria.getPeriodFrom() != null) { addAndClause(demandQuery); demandQuery.append("dmd.taxPeriodFrom >= ?"); preparedStatementValues.add(demandCriteria.getPeriodFrom()); } - + if(demandCriteria.getPeriodTo() != null){ addAndClause(demandQuery); demandQuery.append("dmd.taxPeriodTo <= ?"); preparedStatementValues.add(demandCriteria.getPeriodTo()); } - + if (demandCriteria.getConsumerCode() != null && !demandCriteria.getConsumerCode().isEmpty()) { addAndClause(demandQuery); demandQuery.append("dmd.consumercode IN (" - + getIdQueryForStrings(demandCriteria.getConsumerCode()) + ")"); + + getIdQueryForStrings(demandCriteria.getConsumerCode()) + ")"); addToPreparedStatement(preparedStatementValues, demandCriteria.getConsumerCode()); } - - addOrderByClause(demandQuery, DEMAND_QUERY_ORDER_BY_CLAUSE); - addPagingClause(demandQuery, preparedStatementValues); - - log.info("the query String for demand : " + demandQuery.toString()); - return demandQuery.toString(); } - + private static void addOrderByClause(StringBuilder demandQueryBuilder,String columnName) { demandQueryBuilder.append(" ORDER BY " + columnName); } @@ -256,7 +284,7 @@ private static boolean addAndClause(StringBuilder queryString) { queryString.append(" AND "); return true; } - + private static String getIdQueryForStrings(Set idList) { StringBuilder builder = new StringBuilder(); @@ -272,11 +300,11 @@ private void addToPreparedStatement(List preparedStmtList, Collection{ preparedStmtList.add(id);}); } - + public String getDemandHistoryQuery(DemandCriteria demandCriteria, List preparedStatementValues) { - StringBuilder demandQuery = new StringBuilder(BASE_DEMAND_HISTORY_QUERY); - + StringBuilder demandQuery = new StringBuilder(BASE_DEMAND_HISTORY_QUERY); + if( demandCriteria.getTenantId() != null) { demandQuery.append(" dmd.tenantid = ? "); preparedStatementValues.add(demandCriteria.getTenantId()); @@ -286,11 +314,11 @@ public String getDemandHistoryQuery(DemandCriteria demandCriteria, List demandQuery.append("dmd.businessservice=?"); preparedStatementValues.add(demandCriteria.getBusinessService()); } - + if (demandCriteria.getConsumerCode() != null && !demandCriteria.getConsumerCode().isEmpty()) { addAndClause(demandQuery); demandQuery.append("dmd.consumercode IN (" - + getIdQueryForStrings(demandCriteria.getConsumerCode()) + ")"); + + getIdQueryForStrings(demandCriteria.getConsumerCode()) + ")"); addToPreparedStatement(preparedStatementValues, demandCriteria.getConsumerCode()); } @@ -299,4 +327,22 @@ public String getDemandHistoryQuery(DemandCriteria demandCriteria, List log.info("the query String for demand : " + demandQuery.toString()); return demandQuery.toString(); } + + private static void addPagingClauseForDemandIdSearch(StringBuilder demandQuery, DemandCriteria demandCriteria, List preparedStatementValues) { + demandQuery.append(" LIMIT ?"); + preparedStatementValues.add(demandCriteria.getLimit()); + demandQuery.append(" OFFSET ?"); + preparedStatementValues.add(demandCriteria.getOffset()); + } + + private Object createQuery(List ids) { + StringBuilder builder = new StringBuilder(); + int length = ids.size(); + for (int i = 0; i < length; i++) { + builder.append(" ?"); + if (i != length - 1) + builder.append(","); + } + return builder.toString(); + } } diff --git a/business-services/billing-service/src/main/java/org/egov/demand/service/DemandService.java b/business-services/billing-service/src/main/java/org/egov/demand/service/DemandService.java index 812ee8533..0a76576fa 100644 --- a/business-services/billing-service/src/main/java/org/egov/demand/service/DemandService.java +++ b/business-services/billing-service/src/main/java/org/egov/demand/service/DemandService.java @@ -291,6 +291,24 @@ public DemandResponse updateAsync(DemandRequest demandRequest, PaymentBackUpdate return new DemandResponse(responseInfoFactory.getResponseInfo(requestInfo, HttpStatus.CREATED), demands); } + public List demandPlainSearch(DemandCriteria demandCriteria, RequestInfo requestInfo) + { + if (demandCriteria.getLimit() != null && demandCriteria.getLimit() > applicationProperties.getDemandMaxLimit()) + demandCriteria.setLimit(applicationProperties.getDemandMaxLimit()); + + Set demandIds = null; + + if(demandCriteria.getDemandId() != null && !CollectionUtils.isEmpty(demandCriteria.getDemandId())) + demandIds = demandCriteria.getDemandId(); + else + demandIds = new HashSet<>(demandRepository.getDemandIds(demandCriteria)); + + if(demandIds.isEmpty()) + return Collections.emptyList(); + + DemandCriteria demandSearchCriteria = DemandCriteria.builder().demandId(demandIds).build(); + return demandRepository.getDemandsPlainSearch(demandSearchCriteria); + } /** * Search method to fetch demands from DB diff --git a/business-services/billing-service/src/main/java/org/egov/demand/web/controller/DemandController.java b/business-services/billing-service/src/main/java/org/egov/demand/web/controller/DemandController.java index e5a61433d..9807b15b8 100644 --- a/business-services/billing-service/src/main/java/org/egov/demand/web/controller/DemandController.java +++ b/business-services/billing-service/src/main/java/org/egov/demand/web/controller/DemandController.java @@ -62,14 +62,7 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.ModelAttribute; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestHeader; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.ResponseBody; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import lombok.extern.slf4j.Slf4j; @@ -172,4 +165,17 @@ public ResponseEntity getAggregatedDemandDetails(@RequestBody RequestInfoWrap AggregatedDemandDetailResponse demands = demandService.getAllDemands(demandCriteria, requestInfo); return new ResponseEntity<>(demands, HttpStatus.OK); } + + @PostMapping("/_plainsearch") + public ResponseEntity plainsearch(@RequestBody RequestInfoWrapper requestInfoWrapper, + @ModelAttribute @Valid DemandCriteria demandCriteria) { + + RequestInfo requestInfo = requestInfoWrapper.getRequestInfo(); + List demands = demandService.demandPlainSearch(demandCriteria, requestInfo); + DemandResponse response = DemandResponse.builder().demands(demands) + .responseInfo(responseFactory.getResponseInfo(requestInfo, HttpStatus.OK)).build(); + return new ResponseEntity<>(response, HttpStatus.OK); + + } + } \ No newline at end of file diff --git a/business-services/billing-service/src/main/resources/application.properties b/business-services/billing-service/src/main/resources/application.properties index 85f8c63a3..dee69cc87 100644 --- a/business-services/billing-service/src/main/resources/application.properties +++ b/business-services/billing-service/src/main/resources/application.properties @@ -101,6 +101,12 @@ bs.demanddetail.seq.name=seq_egbs_demanddetail bs.demand.audit.seq.name=seq_egbs_demand_audit bs.demanddetail.audit.seq.name=seq_egbs_demanddetail_audit +# Pagination Details +#Pagination +egov.demand.default.offset=0 +egov.demand.default.limit=10 +egov.demand.max.limit=1000 + #billing-service1.1 # localization url From 95793b48074da775e5e72b9ae04b6ed9cf2ddc17 Mon Sep 17 00:00:00 2001 From: Priyanka-eGov Date: Wed, 12 Jun 2024 17:15:00 +0530 Subject: [PATCH 005/118] ISTE-167 adding changes for plain search API for demand --- .../egov/demand/repository/querybuilder/DemandQueryBuilder.java | 1 - 1 file changed, 1 deletion(-) diff --git a/business-services/billing-service/src/main/java/org/egov/demand/repository/querybuilder/DemandQueryBuilder.java b/business-services/billing-service/src/main/java/org/egov/demand/repository/querybuilder/DemandQueryBuilder.java index 19a8f7428..3d5753cac 100644 --- a/business-services/billing-service/src/main/java/org/egov/demand/repository/querybuilder/DemandQueryBuilder.java +++ b/business-services/billing-service/src/main/java/org/egov/demand/repository/querybuilder/DemandQueryBuilder.java @@ -198,7 +198,6 @@ public String getDemandPlainSearchQuery(DemandCriteria demandCriteria, List ids = demandCriteria.getDemandId(); if (!CollectionUtils.isEmpty(ids)) { - addAndClause(demandQuery); demandQuery.append(" dmd.id IN (").append(createQuery( new ArrayList<>(ids))).append(")"); addToPreparedStatement(preparedStmtList, ids); } From 6a03d373eb28427bd8c11dd34a7e1ab9b7d3d6cc Mon Sep 17 00:00:00 2001 From: Priyanka-eGov Date: Fri, 7 Jun 2024 14:54:29 +0530 Subject: [PATCH 006/118] ISTE-167 pushing to demand indexer topic on create --- .../src/main/java/org/egov/demand/service/DemandService.java | 5 +++++ .../src/main/resources/application.properties | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/business-services/billing-service/src/main/java/org/egov/demand/service/DemandService.java b/business-services/billing-service/src/main/java/org/egov/demand/service/DemandService.java index db0fa4fad..684087b41 100644 --- a/business-services/billing-service/src/main/java/org/egov/demand/service/DemandService.java +++ b/business-services/billing-service/src/main/java/org/egov/demand/service/DemandService.java @@ -56,6 +56,7 @@ import org.egov.demand.config.ApplicationProperties; import org.egov.demand.model.*; import org.egov.demand.model.BillV2.BillStatus; +import org.egov.demand.producer.Producer; import org.egov.demand.repository.AmendmentRepository; import org.egov.demand.repository.BillRepositoryV2; import org.egov.demand.repository.DemandRepository; @@ -120,6 +121,9 @@ public class DemandService { @Autowired private DemandValidatorV1 demandValidatorV1; + + @Autowired + private Producer producer; /** * Method to create new demand @@ -358,6 +362,7 @@ public List getDemands(DemandCriteria demandCriteria, RequestInfo reques public void save(DemandRequest demandRequest) { demandRepository.save(demandRequest); + producer.push(applicationProperties.getDemandIndexTopic(), demandRequest); } public void update(DemandRequest demandRequest, PaymentBackUpdateAudit paymentBackUpdateAudit) { diff --git a/business-services/billing-service/src/main/resources/application.properties b/business-services/billing-service/src/main/resources/application.properties index d5c30b522..95fa07bb5 100644 --- a/business-services/billing-service/src/main/resources/application.properties +++ b/business-services/billing-service/src/main/resources/application.properties @@ -49,7 +49,7 @@ kafka.topics.receipt.cancel.name=egov.collection.receipt-cancel kafka.topics.receipt.cancel.key=receipt-cancel #Indexer topics -kafka.topics.demand.index.name=create-demand-index-v1 +kafka.topics.demand.index.name=create-demand-index # KAFKA CONSUMER CONFIGURATIONS From 9e72dcdedfffd8cf664b0339d55781d856010f3c Mon Sep 17 00:00:00 2001 From: Priyanka-eGov Date: Mon, 10 Jun 2024 12:16:29 +0530 Subject: [PATCH 007/118] ISTE-167 pushing to demand indexer topic for update --- .../org/egov/demand/config/ApplicationProperties.java | 10 ++++++---- .../java/org/egov/demand/service/DemandService.java | 3 ++- .../src/main/resources/application.properties | 3 ++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/business-services/billing-service/src/main/java/org/egov/demand/config/ApplicationProperties.java b/business-services/billing-service/src/main/java/org/egov/demand/config/ApplicationProperties.java index 3ea2daee2..83477836f 100644 --- a/business-services/billing-service/src/main/java/org/egov/demand/config/ApplicationProperties.java +++ b/business-services/billing-service/src/main/java/org/egov/demand/config/ApplicationProperties.java @@ -120,10 +120,12 @@ public class ApplicationProperties { @Value("${kafka.topics.receipt.cancel.name}") private String receiptCancellationTopic; - @Value("${kafka.topics.demand.index.name}") - private String demandIndexTopic; - - + @Value("${kafka.topics.create.demand.index.name}") + private String createDemandIndexTopic; + + @Value("${kafka.topics.update.demand.index.name}") + private String updateDemandIndexTopic; + /* * billing service v1.1 */ diff --git a/business-services/billing-service/src/main/java/org/egov/demand/service/DemandService.java b/business-services/billing-service/src/main/java/org/egov/demand/service/DemandService.java index 684087b41..812ee8533 100644 --- a/business-services/billing-service/src/main/java/org/egov/demand/service/DemandService.java +++ b/business-services/billing-service/src/main/java/org/egov/demand/service/DemandService.java @@ -362,11 +362,12 @@ public List getDemands(DemandCriteria demandCriteria, RequestInfo reques public void save(DemandRequest demandRequest) { demandRepository.save(demandRequest); - producer.push(applicationProperties.getDemandIndexTopic(), demandRequest); + producer.push(applicationProperties.getCreateDemandIndexTopic(), demandRequest); } public void update(DemandRequest demandRequest, PaymentBackUpdateAudit paymentBackUpdateAudit) { demandRepository.update(demandRequest, paymentBackUpdateAudit); + producer.push(applicationProperties.getUpdateDemandIndexTopic(), demandRequest); } diff --git a/business-services/billing-service/src/main/resources/application.properties b/business-services/billing-service/src/main/resources/application.properties index 95fa07bb5..0ddcba6ec 100644 --- a/business-services/billing-service/src/main/resources/application.properties +++ b/business-services/billing-service/src/main/resources/application.properties @@ -49,7 +49,8 @@ kafka.topics.receipt.cancel.name=egov.collection.receipt-cancel kafka.topics.receipt.cancel.key=receipt-cancel #Indexer topics -kafka.topics.demand.index.name=create-demand-index +kafka.topics.create.demand.index.name=create-demand-index +kafka.topics.update.demand.index.name=update-demand-index # KAFKA CONSUMER CONFIGURATIONS From f2327a1846baaa9528c1a31aa59e2564716c1634 Mon Sep 17 00:00:00 2001 From: Priyanka-eGov Date: Wed, 12 Jun 2024 15:01:02 +0530 Subject: [PATCH 008/118] ISTE-167 adding changes for plain search API for demand --- .../demand/config/ApplicationProperties.java | 10 ++ .../org/egov/demand/model/DemandCriteria.java | 6 +- .../demand/repository/DemandRepository.java | 24 +++++ .../querybuilder/DemandQueryBuilder.java | 98 ++++++++++++++----- .../egov/demand/service/DemandService.java | 18 ++++ .../web/controller/DemandController.java | 22 +++-- .../src/main/resources/application.properties | 6 ++ 7 files changed, 149 insertions(+), 35 deletions(-) diff --git a/business-services/billing-service/src/main/java/org/egov/demand/config/ApplicationProperties.java b/business-services/billing-service/src/main/java/org/egov/demand/config/ApplicationProperties.java index 83477836f..e70212df5 100644 --- a/business-services/billing-service/src/main/java/org/egov/demand/config/ApplicationProperties.java +++ b/business-services/billing-service/src/main/java/org/egov/demand/config/ApplicationProperties.java @@ -209,4 +209,14 @@ public class ApplicationProperties { @Value("${kafka.mgramseva.update.bill}") private String updateBill; + + @Value("${egov.demand.default.offset}") + private Integer demandDefaultOffset; + + @Value("${egov.demand.default.limit}") + private Integer demandDefaultLimit; + + @Value("${egov.demand.max.limit}") + private Integer demandMaxLimit; + } diff --git a/business-services/billing-service/src/main/java/org/egov/demand/model/DemandCriteria.java b/business-services/billing-service/src/main/java/org/egov/demand/model/DemandCriteria.java index 1dfff60a5..890c8f9bc 100644 --- a/business-services/billing-service/src/main/java/org/egov/demand/model/DemandCriteria.java +++ b/business-services/billing-service/src/main/java/org/egov/demand/model/DemandCriteria.java @@ -86,7 +86,11 @@ public class DemandCriteria { private String status; private Boolean isPaymentCompleted; - + + private Integer offset; + + private Integer limit; + @Default private Boolean receiptRequired=false; } diff --git a/business-services/billing-service/src/main/java/org/egov/demand/repository/DemandRepository.java b/business-services/billing-service/src/main/java/org/egov/demand/repository/DemandRepository.java index aaff916e4..cacd7b296 100644 --- a/business-services/billing-service/src/main/java/org/egov/demand/repository/DemandRepository.java +++ b/business-services/billing-service/src/main/java/org/egov/demand/repository/DemandRepository.java @@ -49,6 +49,7 @@ import java.util.UUID; import java.util.stream.Collectors; +import org.apache.kafka.common.protocol.types.Field; import org.egov.demand.model.AuditDetails; import org.egov.demand.model.Demand; import org.egov.demand.model.DemandCriteria; @@ -59,15 +60,18 @@ import org.egov.demand.repository.rowmapper.DemandRowMapper; import org.egov.demand.util.Util; import org.egov.demand.web.contract.DemandRequest; +import org.egov.tracer.model.CustomException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.dao.DataAccessException; import org.springframework.jdbc.core.BatchPreparedStatementSetter; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.core.PreparedStatementSetter; +import org.springframework.jdbc.core.SingleColumnRowMapper; import org.springframework.stereotype.Repository; import org.springframework.transaction.annotation.Transactional; import lombok.extern.slf4j.Slf4j; +import org.springframework.util.CollectionUtils; @Repository @Slf4j @@ -409,4 +413,24 @@ public List getDemandHistory(DemandCriteria demandCriteria) { String searchDemandQuery = demandQueryBuilder.getDemandHistoryQuery(demandCriteria, preparedStatementValues); return jdbcTemplate.query(searchDemandQuery, preparedStatementValues.toArray(), demandHistoryRowMapper); } + + public List getDemandIds(DemandCriteria demandCriteria) + { + List preparedStmtList = new ArrayList<>(); + String searchDemandQuery = demandQueryBuilder.getdemandIdSearchQuery(demandCriteria, preparedStmtList); + return jdbcTemplate.query(searchDemandQuery, new SingleColumnRowMapper<>(String.class), preparedStmtList.toArray()); + } + + public List getDemandsPlainSearch(DemandCriteria demandCriteria) { + + if (demandCriteria.getDemandId() == null || CollectionUtils.isEmpty(demandCriteria.getDemandId())) + throw new CustomException("PLAIN_SEARCH_ERROR", "Search only allowed by ids!"); + + List preparedStmtList = new ArrayList<>(); + String query = demandQueryBuilder.getDemandPlainSearchQuery(demandCriteria, preparedStmtList); + log.info("Query: " + query); + log.info("PS: " + preparedStmtList); + return jdbcTemplate.query(query, preparedStmtList.toArray(), demandRowMapper); + } + } diff --git a/business-services/billing-service/src/main/java/org/egov/demand/repository/querybuilder/DemandQueryBuilder.java b/business-services/billing-service/src/main/java/org/egov/demand/repository/querybuilder/DemandQueryBuilder.java index 3c0c39a2c..19a8f7428 100644 --- a/business-services/billing-service/src/main/java/org/egov/demand/repository/querybuilder/DemandQueryBuilder.java +++ b/business-services/billing-service/src/main/java/org/egov/demand/repository/querybuilder/DemandQueryBuilder.java @@ -39,12 +39,10 @@ */ package org.egov.demand.repository.querybuilder; -import java.util.Collection; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.Map.Entry; -import java.util.Set; +import org.apache.kafka.common.protocol.types.Field; import org.egov.demand.model.DemandCriteria; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; @@ -136,7 +134,8 @@ public class DemandQueryBuilder { public static final String DEMAND_UPDATE_CONSUMERCODE_QUERY="UPDATE egbs_demand_v1 SET consumercode=?, lastmodifiedby=?, lastmodifiedtime=? " + " WHERE tenantid=? AND id IN ("; - + + public static final String FETCH_DEMAND_IDS_QUERY = "SELECT dmd.id AS did FROM egbs_demand_v1 dmd WHERE"; public String getDemandQueryForConsumerCodes(Map> businessConsumercodeMap,List preparedStmtList, String tenantId){ @@ -174,9 +173,44 @@ public String getDemandQuery(DemandCriteria demandCriteria, List prepare StringBuilder demandQuery = new StringBuilder(BASE_DEMAND_QUERY); + addDemandCriteria(demandQuery, demandCriteria, preparedStatementValues); + addOrderByClause(demandQuery, DEMAND_QUERY_ORDER_BY_CLAUSE); + addPagingClause(demandQuery, preparedStatementValues); + + log.info("the query String for demand : " + demandQuery.toString()); + return demandQuery.toString(); + } + + public String getdemandIdSearchQuery(DemandCriteria demandCriteria, List preparedStatementValues) + { + StringBuilder demandIdSearchQuery = new StringBuilder(FETCH_DEMAND_IDS_QUERY); + addDemandCriteria(demandIdSearchQuery, demandCriteria, preparedStatementValues); + addOrderByClause(demandIdSearchQuery, DEMAND_QUERY_ORDER_BY_CLAUSE); + addPagingClauseForDemandIdSearch(demandIdSearchQuery, demandCriteria, preparedStatementValues); + log.info("Query for demand id search : " + demandIdSearchQuery.toString()); + return demandIdSearchQuery.toString(); + + } + + public String getDemandPlainSearchQuery(DemandCriteria demandCriteria, List preparedStmtList) { + + StringBuilder demandQuery = new StringBuilder(BASE_DEMAND_QUERY); + + Set ids = demandCriteria.getDemandId(); + if (!CollectionUtils.isEmpty(ids)) { + addAndClause(demandQuery); + demandQuery.append(" dmd.id IN (").append(createQuery( new ArrayList<>(ids))).append(")"); + addToPreparedStatement(preparedStmtList, ids); + } + + return demandQuery.toString(); + } + + public void addDemandCriteria(StringBuilder demandQuery, DemandCriteria demandCriteria, List preparedStatementValues) + { String tenantId = demandCriteria.getTenantId(); String[] tenantIdChunks = tenantId.split("\\."); - + if(tenantIdChunks.length == 1){ demandQuery.append(" dmd.tenantid LIKE ? "); preparedStatementValues.add(demandCriteria.getTenantId() + '%'); @@ -184,7 +218,7 @@ public String getDemandQuery(DemandCriteria demandCriteria, List prepare demandQuery.append(" dmd.tenantid = ? "); preparedStatementValues.add(demandCriteria.getTenantId()); } - + if (demandCriteria.getStatus() != null) { @@ -192,7 +226,7 @@ public String getDemandQuery(DemandCriteria demandCriteria, List prepare demandQuery.append("dmd.status=?"); preparedStatementValues.add(demandCriteria.getStatus()); } - + if (demandCriteria.getDemandId() != null && !demandCriteria.getDemandId().isEmpty()) { addAndClause(demandQuery); demandQuery.append("dmd.id IN (" + getIdQueryForStrings(demandCriteria.getDemandId()) + ")"); @@ -208,39 +242,33 @@ public String getDemandQuery(DemandCriteria demandCriteria, List prepare demandQuery.append("dmd.businessservice=?"); preparedStatementValues.add(demandCriteria.getBusinessService()); } - + if(demandCriteria.getIsPaymentCompleted() != null){ addAndClause(demandQuery); demandQuery.append("dmd.ispaymentcompleted = ?"); preparedStatementValues.add(demandCriteria.getIsPaymentCompleted()); } - + if (demandCriteria.getPeriodFrom() != null) { addAndClause(demandQuery); demandQuery.append("dmd.taxPeriodFrom >= ?"); preparedStatementValues.add(demandCriteria.getPeriodFrom()); } - + if(demandCriteria.getPeriodTo() != null){ addAndClause(demandQuery); demandQuery.append("dmd.taxPeriodTo <= ?"); preparedStatementValues.add(demandCriteria.getPeriodTo()); } - + if (demandCriteria.getConsumerCode() != null && !demandCriteria.getConsumerCode().isEmpty()) { addAndClause(demandQuery); demandQuery.append("dmd.consumercode IN (" - + getIdQueryForStrings(demandCriteria.getConsumerCode()) + ")"); + + getIdQueryForStrings(demandCriteria.getConsumerCode()) + ")"); addToPreparedStatement(preparedStatementValues, demandCriteria.getConsumerCode()); } - - addOrderByClause(demandQuery, DEMAND_QUERY_ORDER_BY_CLAUSE); - addPagingClause(demandQuery, preparedStatementValues); - - log.info("the query String for demand : " + demandQuery.toString()); - return demandQuery.toString(); } - + private static void addOrderByClause(StringBuilder demandQueryBuilder,String columnName) { demandQueryBuilder.append(" ORDER BY " + columnName); } @@ -256,7 +284,7 @@ private static boolean addAndClause(StringBuilder queryString) { queryString.append(" AND "); return true; } - + private static String getIdQueryForStrings(Set idList) { StringBuilder builder = new StringBuilder(); @@ -272,11 +300,11 @@ private void addToPreparedStatement(List preparedStmtList, Collection{ preparedStmtList.add(id);}); } - + public String getDemandHistoryQuery(DemandCriteria demandCriteria, List preparedStatementValues) { - StringBuilder demandQuery = new StringBuilder(BASE_DEMAND_HISTORY_QUERY); - + StringBuilder demandQuery = new StringBuilder(BASE_DEMAND_HISTORY_QUERY); + if( demandCriteria.getTenantId() != null) { demandQuery.append(" dmd.tenantid = ? "); preparedStatementValues.add(demandCriteria.getTenantId()); @@ -286,11 +314,11 @@ public String getDemandHistoryQuery(DemandCriteria demandCriteria, List demandQuery.append("dmd.businessservice=?"); preparedStatementValues.add(demandCriteria.getBusinessService()); } - + if (demandCriteria.getConsumerCode() != null && !demandCriteria.getConsumerCode().isEmpty()) { addAndClause(demandQuery); demandQuery.append("dmd.consumercode IN (" - + getIdQueryForStrings(demandCriteria.getConsumerCode()) + ")"); + + getIdQueryForStrings(demandCriteria.getConsumerCode()) + ")"); addToPreparedStatement(preparedStatementValues, demandCriteria.getConsumerCode()); } @@ -299,4 +327,22 @@ public String getDemandHistoryQuery(DemandCriteria demandCriteria, List log.info("the query String for demand : " + demandQuery.toString()); return demandQuery.toString(); } + + private static void addPagingClauseForDemandIdSearch(StringBuilder demandQuery, DemandCriteria demandCriteria, List preparedStatementValues) { + demandQuery.append(" LIMIT ?"); + preparedStatementValues.add(demandCriteria.getLimit()); + demandQuery.append(" OFFSET ?"); + preparedStatementValues.add(demandCriteria.getOffset()); + } + + private Object createQuery(List ids) { + StringBuilder builder = new StringBuilder(); + int length = ids.size(); + for (int i = 0; i < length; i++) { + builder.append(" ?"); + if (i != length - 1) + builder.append(","); + } + return builder.toString(); + } } diff --git a/business-services/billing-service/src/main/java/org/egov/demand/service/DemandService.java b/business-services/billing-service/src/main/java/org/egov/demand/service/DemandService.java index 812ee8533..0a76576fa 100644 --- a/business-services/billing-service/src/main/java/org/egov/demand/service/DemandService.java +++ b/business-services/billing-service/src/main/java/org/egov/demand/service/DemandService.java @@ -291,6 +291,24 @@ public DemandResponse updateAsync(DemandRequest demandRequest, PaymentBackUpdate return new DemandResponse(responseInfoFactory.getResponseInfo(requestInfo, HttpStatus.CREATED), demands); } + public List demandPlainSearch(DemandCriteria demandCriteria, RequestInfo requestInfo) + { + if (demandCriteria.getLimit() != null && demandCriteria.getLimit() > applicationProperties.getDemandMaxLimit()) + demandCriteria.setLimit(applicationProperties.getDemandMaxLimit()); + + Set demandIds = null; + + if(demandCriteria.getDemandId() != null && !CollectionUtils.isEmpty(demandCriteria.getDemandId())) + demandIds = demandCriteria.getDemandId(); + else + demandIds = new HashSet<>(demandRepository.getDemandIds(demandCriteria)); + + if(demandIds.isEmpty()) + return Collections.emptyList(); + + DemandCriteria demandSearchCriteria = DemandCriteria.builder().demandId(demandIds).build(); + return demandRepository.getDemandsPlainSearch(demandSearchCriteria); + } /** * Search method to fetch demands from DB diff --git a/business-services/billing-service/src/main/java/org/egov/demand/web/controller/DemandController.java b/business-services/billing-service/src/main/java/org/egov/demand/web/controller/DemandController.java index e5a61433d..9807b15b8 100644 --- a/business-services/billing-service/src/main/java/org/egov/demand/web/controller/DemandController.java +++ b/business-services/billing-service/src/main/java/org/egov/demand/web/controller/DemandController.java @@ -62,14 +62,7 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.ModelAttribute; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestHeader; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.ResponseBody; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import lombok.extern.slf4j.Slf4j; @@ -172,4 +165,17 @@ public ResponseEntity getAggregatedDemandDetails(@RequestBody RequestInfoWrap AggregatedDemandDetailResponse demands = demandService.getAllDemands(demandCriteria, requestInfo); return new ResponseEntity<>(demands, HttpStatus.OK); } + + @PostMapping("/_plainsearch") + public ResponseEntity plainsearch(@RequestBody RequestInfoWrapper requestInfoWrapper, + @ModelAttribute @Valid DemandCriteria demandCriteria) { + + RequestInfo requestInfo = requestInfoWrapper.getRequestInfo(); + List demands = demandService.demandPlainSearch(demandCriteria, requestInfo); + DemandResponse response = DemandResponse.builder().demands(demands) + .responseInfo(responseFactory.getResponseInfo(requestInfo, HttpStatus.OK)).build(); + return new ResponseEntity<>(response, HttpStatus.OK); + + } + } \ No newline at end of file diff --git a/business-services/billing-service/src/main/resources/application.properties b/business-services/billing-service/src/main/resources/application.properties index 0ddcba6ec..67bcdd3e9 100644 --- a/business-services/billing-service/src/main/resources/application.properties +++ b/business-services/billing-service/src/main/resources/application.properties @@ -101,6 +101,12 @@ bs.demanddetail.seq.name=seq_egbs_demanddetail bs.demand.audit.seq.name=seq_egbs_demand_audit bs.demanddetail.audit.seq.name=seq_egbs_demanddetail_audit +# Pagination Details +#Pagination +egov.demand.default.offset=0 +egov.demand.default.limit=10 +egov.demand.max.limit=1000 + #billing-service1.1 # localization url From 309917010a8bb805abbae40cfaadd925cbf84ece Mon Sep 17 00:00:00 2001 From: Priyanka-eGov Date: Wed, 12 Jun 2024 17:15:00 +0530 Subject: [PATCH 009/118] ISTE-167 adding changes for plain search API for demand --- .../egov/demand/repository/querybuilder/DemandQueryBuilder.java | 1 - 1 file changed, 1 deletion(-) diff --git a/business-services/billing-service/src/main/java/org/egov/demand/repository/querybuilder/DemandQueryBuilder.java b/business-services/billing-service/src/main/java/org/egov/demand/repository/querybuilder/DemandQueryBuilder.java index 19a8f7428..3d5753cac 100644 --- a/business-services/billing-service/src/main/java/org/egov/demand/repository/querybuilder/DemandQueryBuilder.java +++ b/business-services/billing-service/src/main/java/org/egov/demand/repository/querybuilder/DemandQueryBuilder.java @@ -198,7 +198,6 @@ public String getDemandPlainSearchQuery(DemandCriteria demandCriteria, List ids = demandCriteria.getDemandId(); if (!CollectionUtils.isEmpty(ids)) { - addAndClause(demandQuery); demandQuery.append(" dmd.id IN (").append(createQuery( new ArrayList<>(ids))).append(")"); addToPreparedStatement(preparedStmtList, ids); } From c7b5a22cba49f3719570e6c8306aad517fdbaf4d Mon Sep 17 00:00:00 2001 From: Saloni-eGov Date: Thu, 13 Jun 2024 16:12:32 +0530 Subject: [PATCH 010/118] ISTE-21 --- .../validator/WaterConnectionValidator.java | 38 +++++++++++++++++-- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/validator/WaterConnectionValidator.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/validator/WaterConnectionValidator.java index 904661638..be93bb039 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/validator/WaterConnectionValidator.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/validator/WaterConnectionValidator.java @@ -20,6 +20,7 @@ import org.egov.waterconnection.service.MeterInfoValidator; import org.egov.waterconnection.service.PropertyValidator; import org.egov.waterconnection.service.WaterFieldValidator; +import org.egov.waterconnection.util.WaterServicesUtil; import org.egov.waterconnection.web.models.Demand; import org.egov.waterconnection.web.models.DemandDetail; import org.egov.waterconnection.web.models.DemandRequest; @@ -29,6 +30,7 @@ import org.egov.waterconnection.web.models.WaterConnection; import org.egov.waterconnection.web.models.WaterConnectionRequest; import org.egov.waterconnection.web.models.Connection.StatusEnum; +import org.egov.waterconnection.web.models.collection.PaymentResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; @@ -62,6 +64,11 @@ public class WaterConnectionValidator { @Autowired private ObjectMapper mapper; + @Autowired + private WaterServicesUtil waterServiceUtil; + + String businessService = "WS.ONE_TIME_FEE"; + /**Used strategy pattern for avoiding multiple if else condition * * @param waterConnectionRequest @@ -176,18 +183,19 @@ public void validateUpdate(WaterConnectionRequest request, WaterConnection searc } Boolean isArrear = false; Boolean isAdvance = false; - + Boolean hasPayments = checkForPayments(request); + if(request.getWaterConnection().getAdvance()!=null && request.getWaterConnection().getAdvance().compareTo(BigDecimal.ZERO) == 0) { isAdvance = true; } if(request.getWaterConnection().getArrears()!=null && request.getWaterConnection().getArrears().compareTo(BigDecimal.ZERO) == 0) { isArrear = true; } - if ((request.getWaterConnection().getStatus().equals(StatusEnum.INACTIVE) && demList != null && demList.size() > 0) + if (!hasPayments && ((request.getWaterConnection().getStatus().equals(StatusEnum.INACTIVE) && demList != null && demList.size() > 0) || (searchResult.getArrears() != null && request.getWaterConnection().getArrears() == null && demList != null && demList.size() > 0 || (isArrear && demList != null && demList.size() > 0))|| (request.getWaterConnection().getStatus().equals(StatusEnum.INACTIVE) && demList != null && demList.size() > 0) || (searchResult.getAdvance() != null && request.getWaterConnection().getAdvance() == null && demList != null && demList.size() > 0 - || isAdvance)) { + || isAdvance))) { for (Demand demand : demList) { demand.setStatus(org.egov.waterconnection.web.models.Demand.StatusEnum.CANCELLED); } @@ -198,7 +206,29 @@ public void validateUpdate(WaterConnectionRequest request, WaterConnection searc } -/** + + private Boolean checkForPayments(WaterConnectionRequest waterConnectionRequest) { + String consumerCode,service; + if(org.apache.commons.lang.StringUtils.isEmpty(waterConnectionRequest.getWaterConnection().getConnectionNo())){ + consumerCode = waterConnectionRequest.getWaterConnection().getApplicationNo(); + service = businessService; + } + else{ + consumerCode = waterConnectionRequest.getWaterConnection().getConnectionNo(); + service = "WS"; + } + StringBuilder URL = waterServiceUtil.getcollectionURL(); + URL.append(service).append("/_search").append("?").append("consumerCodes=").append(consumerCode) + .append("&").append("tenantId=").append(waterConnectionRequest.getWaterConnection().getTenantId()); + RequestInfoWrapper requestInfoWrapper = RequestInfoWrapper.builder().requestInfo(waterConnectionRequest.getRequestInfo()).build(); + Object response = serviceRequestRepository.fetchResult(URL,requestInfoWrapper); + PaymentResponse paymentResponse = mapper.convertValue(response, PaymentResponse.class); + if(paymentResponse.getPayments().size()>0) + return true; + else return false; + } + + /** * GPWSC specific validation * @param request * @param searchResult From 6f20e5458682693f211ae9216b006fab69c689c4 Mon Sep 17 00:00:00 2001 From: Saloni-eGov Date: Fri, 14 Jun 2024 11:37:58 +0530 Subject: [PATCH 011/118] ISTE-21 --- .../validator/WaterConnectionValidator.java | 45 +++++++++++++++---- 1 file changed, 37 insertions(+), 8 deletions(-) diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/validator/WaterConnectionValidator.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/validator/WaterConnectionValidator.java index be93bb039..b5e2a6c77 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/validator/WaterConnectionValidator.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/validator/WaterConnectionValidator.java @@ -30,7 +30,7 @@ import org.egov.waterconnection.web.models.WaterConnection; import org.egov.waterconnection.web.models.WaterConnectionRequest; import org.egov.waterconnection.web.models.Connection.StatusEnum; -import org.egov.waterconnection.web.models.collection.PaymentResponse; +import org.egov.waterconnection.web.models.collection.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; @@ -183,7 +183,12 @@ public void validateUpdate(WaterConnectionRequest request, WaterConnection searc } Boolean isArrear = false; Boolean isAdvance = false; - Boolean hasPayments = checkForPayments(request); + List demandIds = checkForPayments(request); + + for (String demandId : demandIds) + { + demList.remove(demandId); + } if(request.getWaterConnection().getAdvance()!=null && request.getWaterConnection().getAdvance().compareTo(BigDecimal.ZERO) == 0) { isAdvance = true; @@ -191,11 +196,11 @@ public void validateUpdate(WaterConnectionRequest request, WaterConnection searc if(request.getWaterConnection().getArrears()!=null && request.getWaterConnection().getArrears().compareTo(BigDecimal.ZERO) == 0) { isArrear = true; } - if (!hasPayments && ((request.getWaterConnection().getStatus().equals(StatusEnum.INACTIVE) && demList != null && demList.size() > 0) + if ((request.getWaterConnection().getStatus().equals(StatusEnum.INACTIVE) && demList != null && demList.size() > 0) || (searchResult.getArrears() != null && request.getWaterConnection().getArrears() == null && demList != null && demList.size() > 0 || (isArrear && demList != null && demList.size() > 0))|| (request.getWaterConnection().getStatus().equals(StatusEnum.INACTIVE) && demList != null && demList.size() > 0) || (searchResult.getAdvance() != null && request.getWaterConnection().getAdvance() == null && demList != null && demList.size() > 0 - || isAdvance))) { + || isAdvance)) { for (Demand demand : demList) { demand.setStatus(org.egov.waterconnection.web.models.Demand.StatusEnum.CANCELLED); } @@ -207,7 +212,7 @@ public void validateUpdate(WaterConnectionRequest request, WaterConnection searc } - private Boolean checkForPayments(WaterConnectionRequest waterConnectionRequest) { + private List checkForPayments(WaterConnectionRequest waterConnectionRequest) { String consumerCode,service; if(org.apache.commons.lang.StringUtils.isEmpty(waterConnectionRequest.getWaterConnection().getConnectionNo())){ consumerCode = waterConnectionRequest.getWaterConnection().getApplicationNo(); @@ -223,9 +228,33 @@ private Boolean checkForPayments(WaterConnectionRequest waterConnectionRequest) RequestInfoWrapper requestInfoWrapper = RequestInfoWrapper.builder().requestInfo(waterConnectionRequest.getRequestInfo()).build(); Object response = serviceRequestRepository.fetchResult(URL,requestInfoWrapper); PaymentResponse paymentResponse = mapper.convertValue(response, PaymentResponse.class); - if(paymentResponse.getPayments().size()>0) - return true; - else return false; + List demandIds=new ArrayList<>(); + + if(paymentResponse.getPayments()!=null) + { + for(Payment payment:paymentResponse.getPayments()) + { + if(payment.getPaymentDetails()!=null) + { + for(PaymentDetail paymentDetail:payment.getPaymentDetails()) + { + Bill bill=paymentDetail.getBill(); + if(bill!=null && bill.getBillDetails()!=null) + { + for(BillDetail billDetail:bill.getBillDetails()) + { + demandIds.add(billDetail.getDemandId()); + } + } + } + } + } + } + return demandIds; +// +// if(paymentResponse.getPayments().size()>0) +// return true; +// else return false; } /** From 4d59b239bcc4778126533e7461f42b2c2106f430 Mon Sep 17 00:00:00 2001 From: Saloni-eGov Date: Fri, 14 Jun 2024 15:11:37 +0530 Subject: [PATCH 012/118] ISTE-21 --- .../validator/WaterConnectionValidator.java | 68 +++++++++---------- 1 file changed, 32 insertions(+), 36 deletions(-) diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/validator/WaterConnectionValidator.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/validator/WaterConnectionValidator.java index b5e2a6c77..47c800c5f 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/validator/WaterConnectionValidator.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/validator/WaterConnectionValidator.java @@ -183,12 +183,10 @@ public void validateUpdate(WaterConnectionRequest request, WaterConnection searc } Boolean isArrear = false; Boolean isAdvance = false; - List demandIds = checkForPayments(request); + Boolean hasPayments=false; - for (String demandId : demandIds) - { - demList.remove(demandId); - } + if(!request.getWaterConnection().getStatus().equals(StatusEnum.INACTIVE)) + hasPayments = checkForPayments(request); if(request.getWaterConnection().getAdvance()!=null && request.getWaterConnection().getAdvance().compareTo(BigDecimal.ZERO) == 0) { isAdvance = true; @@ -196,23 +194,21 @@ public void validateUpdate(WaterConnectionRequest request, WaterConnection searc if(request.getWaterConnection().getArrears()!=null && request.getWaterConnection().getArrears().compareTo(BigDecimal.ZERO) == 0) { isArrear = true; } - if ((request.getWaterConnection().getStatus().equals(StatusEnum.INACTIVE) && demList != null && demList.size() > 0) + if (!hasPayments && ((request.getWaterConnection().getStatus().equals(StatusEnum.INACTIVE) && demList != null && demList.size() > 0) || (searchResult.getArrears() != null && request.getWaterConnection().getArrears() == null && demList != null && demList.size() > 0 || (isArrear && demList != null && demList.size() > 0))|| (request.getWaterConnection().getStatus().equals(StatusEnum.INACTIVE) && demList != null && demList.size() > 0) || (searchResult.getAdvance() != null && request.getWaterConnection().getAdvance() == null && demList != null && demList.size() > 0 - || isAdvance)) { + || isAdvance))) { for (Demand demand : demList) { demand.setStatus(org.egov.waterconnection.web.models.Demand.StatusEnum.CANCELLED); } updateDemand(request.getRequestInfo(), demList); - + } } - - } - private List checkForPayments(WaterConnectionRequest waterConnectionRequest) { + private Boolean checkForPayments(WaterConnectionRequest waterConnectionRequest) { String consumerCode,service; if(org.apache.commons.lang.StringUtils.isEmpty(waterConnectionRequest.getWaterConnection().getConnectionNo())){ consumerCode = waterConnectionRequest.getWaterConnection().getApplicationNo(); @@ -228,33 +224,33 @@ private List checkForPayments(WaterConnectionRequest waterConnectionRequ RequestInfoWrapper requestInfoWrapper = RequestInfoWrapper.builder().requestInfo(waterConnectionRequest.getRequestInfo()).build(); Object response = serviceRequestRepository.fetchResult(URL,requestInfoWrapper); PaymentResponse paymentResponse = mapper.convertValue(response, PaymentResponse.class); - List demandIds=new ArrayList<>(); +// List demandIds=new ArrayList<>(); - if(paymentResponse.getPayments()!=null) - { - for(Payment payment:paymentResponse.getPayments()) - { - if(payment.getPaymentDetails()!=null) - { - for(PaymentDetail paymentDetail:payment.getPaymentDetails()) - { - Bill bill=paymentDetail.getBill(); - if(bill!=null && bill.getBillDetails()!=null) - { - for(BillDetail billDetail:bill.getBillDetails()) - { - demandIds.add(billDetail.getDemandId()); - } - } - } - } - } - } - return demandIds; +// if(paymentResponse.getPayments()!=null) +// { +// for(Payment payment:paymentResponse.getPayments()) +// { +// if(payment.getPaymentDetails()!=null) +// { +// for(PaymentDetail paymentDetail:payment.getPaymentDetails()) +// { +// Bill bill=paymentDetail.getBill(); +// if(bill!=null && bill.getBillDetails()!=null) +// { +// for(BillDetail billDetail:bill.getBillDetails()) +// { +// demandIds.add(billDetail.getDemandId()); +// } +// } +// } +// } +// } +// } +// return demandIds; // -// if(paymentResponse.getPayments().size()>0) -// return true; -// else return false; + if(paymentResponse.getPayments().size()>0) + return true; + else return false; } /** From 653c12327bd174ca48963304f623753338369af6 Mon Sep 17 00:00:00 2001 From: Saloni-eGov Date: Fri, 14 Jun 2024 16:27:46 +0530 Subject: [PATCH 013/118] ISTE-21 --- .../validator/WaterConnectionValidator.java | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/validator/WaterConnectionValidator.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/validator/WaterConnectionValidator.java index 47c800c5f..26524aca2 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/validator/WaterConnectionValidator.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/validator/WaterConnectionValidator.java @@ -185,8 +185,9 @@ public void validateUpdate(WaterConnectionRequest request, WaterConnection searc Boolean isAdvance = false; Boolean hasPayments=false; - if(!request.getWaterConnection().getStatus().equals(StatusEnum.INACTIVE)) - hasPayments = checkForPayments(request); + if(!request.getWaterConnection().getStatus().equals(StatusEnum.INACTIVE)) { + hasPayments = checkForPayments(request); + } if(request.getWaterConnection().getAdvance()!=null && request.getWaterConnection().getAdvance().compareTo(BigDecimal.ZERO) == 0) { isAdvance = true; @@ -224,6 +225,7 @@ private Boolean checkForPayments(WaterConnectionRequest waterConnectionRequest) RequestInfoWrapper requestInfoWrapper = RequestInfoWrapper.builder().requestInfo(waterConnectionRequest.getRequestInfo()).build(); Object response = serviceRequestRepository.fetchResult(URL,requestInfoWrapper); PaymentResponse paymentResponse = mapper.convertValue(response, PaymentResponse.class); + log.info("Payment response from line 228 "+paymentResponse.toString()); // List demandIds=new ArrayList<>(); // if(paymentResponse.getPayments()!=null) @@ -248,9 +250,14 @@ private Boolean checkForPayments(WaterConnectionRequest waterConnectionRequest) // } // return demandIds; // - if(paymentResponse.getPayments().size()>0) - return true; - else return false; + if(!paymentResponse.getPayments().isEmpty()) + { + if(paymentResponse.getPayments().size()>0) + { + return true; + } + } + return false; } /** From 4e2bf0829a6fa0aee8dbb420af312ca257634638 Mon Sep 17 00:00:00 2001 From: Saloni-eGov Date: Sun, 16 Jun 2024 12:41:50 +0530 Subject: [PATCH 014/118] ISTE-21 --- .../waterconnection/validator/WaterConnectionValidator.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/validator/WaterConnectionValidator.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/validator/WaterConnectionValidator.java index 26524aca2..f162e2351 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/validator/WaterConnectionValidator.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/validator/WaterConnectionValidator.java @@ -211,7 +211,7 @@ public void validateUpdate(WaterConnectionRequest request, WaterConnection searc private Boolean checkForPayments(WaterConnectionRequest waterConnectionRequest) { String consumerCode,service; - if(org.apache.commons.lang.StringUtils.isEmpty(waterConnectionRequest.getWaterConnection().getConnectionNo())){ + if(StringUtils.isEmpty(waterConnectionRequest.getWaterConnection().getConnectionNo())){ consumerCode = waterConnectionRequest.getWaterConnection().getApplicationNo(); service = businessService; } @@ -224,6 +224,8 @@ private Boolean checkForPayments(WaterConnectionRequest waterConnectionRequest) .append("&").append("tenantId=").append(waterConnectionRequest.getWaterConnection().getTenantId()); RequestInfoWrapper requestInfoWrapper = RequestInfoWrapper.builder().requestInfo(waterConnectionRequest.getRequestInfo()).build(); Object response = serviceRequestRepository.fetchResult(URL,requestInfoWrapper); + log.info("URL for getting payments "+URL.toString()); + log.info("Respinse from paymnets "+response.toString()); PaymentResponse paymentResponse = mapper.convertValue(response, PaymentResponse.class); log.info("Payment response from line 228 "+paymentResponse.toString()); // List demandIds=new ArrayList<>(); From f9e680700f657d06c3e0ab22d967a8f26c7dde86 Mon Sep 17 00:00:00 2001 From: Saloni-eGov Date: Mon, 17 Jun 2024 12:31:43 +0530 Subject: [PATCH 015/118] ISTE-21 --- .../validator/WaterConnectionValidator.java | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/validator/WaterConnectionValidator.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/validator/WaterConnectionValidator.java index f162e2351..b38abd574 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/validator/WaterConnectionValidator.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/validator/WaterConnectionValidator.java @@ -219,14 +219,21 @@ private Boolean checkForPayments(WaterConnectionRequest waterConnectionRequest) consumerCode = waterConnectionRequest.getWaterConnection().getConnectionNo(); service = "WS"; } - StringBuilder URL = waterServiceUtil.getcollectionURL(); - URL.append(service).append("/_search").append("?").append("consumerCodes=").append(consumerCode) + StringBuilder uri = new StringBuilder(); + uri.append(waterServiceUtil.getcollectionURL()).append(service).append("/_search").append("?").append("consumerCodes=").append(consumerCode) .append("&").append("tenantId=").append(waterConnectionRequest.getWaterConnection().getTenantId()); RequestInfoWrapper requestInfoWrapper = RequestInfoWrapper.builder().requestInfo(waterConnectionRequest.getRequestInfo()).build(); - Object response = serviceRequestRepository.fetchResult(URL,requestInfoWrapper); - log.info("URL for getting payments "+URL.toString()); + Object response = serviceRequestRepository.fetchResult(uri,requestInfoWrapper); + log.info("URL for getting payments "+uri); log.info("Respinse from paymnets "+response.toString()); - PaymentResponse paymentResponse = mapper.convertValue(response, PaymentResponse.class); + PaymentResponse paymentResponse=null; + try { + paymentResponse = mapper.convertValue(response, PaymentResponse.class); + } + catch (Exception ex) + { + log.error("Response not found"); + } log.info("Payment response from line 228 "+paymentResponse.toString()); // List demandIds=new ArrayList<>(); @@ -252,9 +259,9 @@ private Boolean checkForPayments(WaterConnectionRequest waterConnectionRequest) // } // return demandIds; // - if(!paymentResponse.getPayments().isEmpty()) + if(paymentResponse.getPayments()!=null) { - if(paymentResponse.getPayments().size()>0) + if(!paymentResponse.getPayments().isEmpty()) { return true; } From 7fcc6911ad780dcd7970dca4dd44164b31a143f8 Mon Sep 17 00:00:00 2001 From: Saloni-eGov Date: Tue, 18 Jun 2024 06:30:30 +0530 Subject: [PATCH 016/118] ISTE-21 --- .../ws-services/src/main/resources/application.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/municipal-services/ws-services/src/main/resources/application.properties b/municipal-services/ws-services/src/main/resources/application.properties index 9af349837..8fb78d02c 100644 --- a/municipal-services/ws-services/src/main/resources/application.properties +++ b/municipal-services/ws-services/src/main/resources/application.properties @@ -154,7 +154,7 @@ ws.pdfservice.link=pdf-service/v1/_create?tenantId=$tenantId&key=$applicationkey egov.filestore.host=http://egov-filestore:8080/ ws.fileStore.link=filestore/v1/files/url?tenantId=$tenantId&fileStoreIds=$fileStoreIds egov.shortener.url=egov-url-shortening/shortener -egov.collection.host=http://collection-services.egov:8080/ +egov.collection.host=http://collection-services.mgramseva:8080/ logging.level.org.egov.waterconnection=DEBUG From bd0aa85aee7666224370cc801309430e43427bf6 Mon Sep 17 00:00:00 2001 From: Taniya-eGov <103186387+Taniya-eGov@users.noreply.github.com> Date: Tue, 18 Jun 2024 11:24:05 +0530 Subject: [PATCH 017/118] Added consumercode not null condition --- .../main/V20221206104420__egbs_bill_alter_add_consumercode.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/business-services/billing-service/src/main/resources/db/migration/main/V20221206104420__egbs_bill_alter_add_consumercode.sql b/business-services/billing-service/src/main/resources/db/migration/main/V20221206104420__egbs_bill_alter_add_consumercode.sql index a8ed241df..628edaba9 100644 --- a/business-services/billing-service/src/main/resources/db/migration/main/V20221206104420__egbs_bill_alter_add_consumercode.sql +++ b/business-services/billing-service/src/main/resources/db/migration/main/V20221206104420__egbs_bill_alter_add_consumercode.sql @@ -1,6 +1,6 @@ ALTER TABLE egbs_bill_v1 ADD COLUMN IF NOT EXISTS consumercode CHARACTER VARYING(256); -UPDATE egbs_bill_v1 b SET consumerCode = bd.consumercode FROM egbs_billdetail_v1 bd WHERE bd.billid = b.id; +UPDATE egbs_bill_v1 b SET consumerCode = bd.consumercode FROM egbs_billdetail_v1 bd WHERE bd.billid = b.id and b.consumercode is null; ALTER TABLE egbs_bill_v1 ALTER COLUMN consumercode SET NOT NULL; From cf5e2d245cc361e3505c39ea6125efb19b9b17ff Mon Sep 17 00:00:00 2001 From: Priyanka-eGov Date: Tue, 18 Jun 2024 16:21:00 +0530 Subject: [PATCH 018/118] ISTE-167 adding changes for hrms indexer --- .../java/org/egov/hrms/config/PropertiesManager.java | 9 +++++++-- .../main/java/org/egov/hrms/service/EmployeeService.java | 2 ++ .../egov-hrms/src/main/resources/application.properties | 2 ++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/business-services/egov-hrms/src/main/java/org/egov/hrms/config/PropertiesManager.java b/business-services/egov-hrms/src/main/java/org/egov/hrms/config/PropertiesManager.java index 3b04dd0f8..07035d44c 100644 --- a/business-services/egov-hrms/src/main/java/org/egov/hrms/config/PropertiesManager.java +++ b/business-services/egov-hrms/src/main/java/org/egov/hrms/config/PropertiesManager.java @@ -91,7 +91,7 @@ public class PropertiesManager { //Kafka Topics @Value("${kafka.topics.save.service}") public String saveEmployeeTopic; - + @Value("${kafka.topics.update.service}") public String UpdateEmployeeTopic; @@ -100,7 +100,12 @@ public class PropertiesManager { @Value("${kafka.topics.hrms.updateData}") public String updateTopic; - + + @Value("${kafka.topics.save.service.index}") + public String saveEmployeeIndexTopic; + + @Value("${kafka.topics.update.service.index}") + public String UpdateEmployeeIndexTopic; //Variables @Value("${egov.idgen.ack.name}") diff --git a/business-services/egov-hrms/src/main/java/org/egov/hrms/service/EmployeeService.java b/business-services/egov-hrms/src/main/java/org/egov/hrms/service/EmployeeService.java index f75cf0cb9..a619cb208 100644 --- a/business-services/egov-hrms/src/main/java/org/egov/hrms/service/EmployeeService.java +++ b/business-services/egov-hrms/src/main/java/org/egov/hrms/service/EmployeeService.java @@ -125,6 +125,7 @@ public EmployeeResponse create(EmployeeRequest employeeRequest) { employee.getUser().setPassword(null); }); hrmsProducer.push(propertiesManager.getSaveEmployeeTopic(), employeeRequest); + hrmsProducer.push(propertiesManager.getSaveEmployeeIndexTopic(), employeeRequest); notificationService.sendNotification(employeeRequest, pwdMap); return generateResponse(employeeRequest); } @@ -344,6 +345,7 @@ public EmployeeResponse update(EmployeeRequest employeeRequest) { updateUser(employee, requestInfo); }); hrmsProducer.push(propertiesManager.getUpdateTopic(), employeeRequest); + hrmsProducer.push(propertiesManager.getUpdateEmployeeIndexTopic(), employeeRequest); //notificationService.sendReactivationNotification(employeeRequest); return generateResponse(employeeRequest); } diff --git a/business-services/egov-hrms/src/main/resources/application.properties b/business-services/egov-hrms/src/main/resources/application.properties index bbeb4a68a..e99d77f64 100644 --- a/business-services/egov-hrms/src/main/resources/application.properties +++ b/business-services/egov-hrms/src/main/resources/application.properties @@ -91,6 +91,8 @@ kafka.topics.save.service=save-hrms-employee kafka.topics.update.service=update-hrms-employee kafka.topics.notification.sms=egov.core.notification.sms kafka.topics.hrms.updateData= egov-hrms-update +kafka.topics.save.service.index=save-hrms-employee-index +kafka.topics.update.service.index=update-hrms-employee-index spring.kafka.listener.missing-topics-fatal=false From 8ad8c67c8093bdc79639b19feb05253c07c789a0 Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Tue, 18 Jun 2024 20:12:44 +0530 Subject: [PATCH 019/118] HRMS - Prebuild Changes --- .../packages/modules/hrms/src/components/hrmscard.js | 9 +++++---- .../modules/hrms/src/pages/EditEmployee/EditForm.js | 7 ++++++- 2 files changed, 11 insertions(+), 5 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 bff488035..b2a880704 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 @@ -24,7 +24,8 @@ const HRMSCard = () => { const { isLoading, isError, error, data, ...rest } = Digit.Hooks.hrms.useHRMSCount(tenantId, roles); const moduleForSomeDIVAdmin = - DIV_ADMIN && MDMS_ADMIN + + DIV_ADMIN && MDMS_ADMIN ? [ { label: t("WORK_BENCH_URL_MASTER_DATA"), @@ -38,10 +39,10 @@ const HRMSCard = () => { : []; const moduleForSomeSTATEUser = - STATE_ADMIN && MDMS_ADMIN + STATE_ADMIN && MDMS_ADMIN ? [ { - label: t("WORK_BENCH_URL_MASTER_DATA"), + label: t("WORK_BENCH_URL_VILLAGE_MASTER_DATA"), link: `${window?.location?.origin}/workbench-ui/employee/workbench/mdms-search-v2?moduleName=tenant&masterName=tenants`, }, ] @@ -82,7 +83,7 @@ const HRMSCard = () => { label: STATE_ADMIN ? t("HR_COMMON_CREATE_DIVISION_EMPLOYEE_HEADER") : t("HR_COMMON_CREATE_EMPLOYEE_HEADER"), link: `/${window?.contextPath}/employee/hrms/create`, }, - { + DIV_ADMIN ? {}: { label: t("HR_STATE_ REPORTS"), link: "https://ifix-dwss.psegs.in/digit-ui/employee/dss/dashboard/ifix", }, diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/EditEmployee/EditForm.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/EditEmployee/EditForm.js index 68a576d10..a657ffbcf 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/EditEmployee/EditForm.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/EditEmployee/EditForm.js @@ -133,12 +133,17 @@ const EditForm = ({ tenantId, data }) => { } } + console.log(formData?.Jurisdictions,"roles"); + if ( formData?.SelectEmployeeGender?.gender.code && formData?.SelectEmployeeName?.employeeName && formData?.SelectEmployeePhoneNumber?.mobileNumber && + + + formData?.Jurisdictions.length && + (formData?.Jurisdictions.filter((juris) => juris?.roles?.length).length > 0 || formData?.Jurisdictions.filter((juris) => juris?.divisionBoundary?.length).length > 0) && checkfield && - // setassigncheck && phonecheck && checkMailNameNum(formData) ) { From f33dbaf0a088124862de5baee7ca8f2d73301c9d Mon Sep 17 00:00:00 2001 From: Saloni-eGov Date: Tue, 18 Jun 2024 22:07:41 +0530 Subject: [PATCH 020/118] ISTE-21 --- .../repository/WaterDaoImpl.java | 1 - .../service/WaterServiceImpl.java | 2 -- .../validator/WaterConnectionValidator.java | 35 ++++--------------- .../web/controller/WaterController.java | 1 - 4 files changed, 6 insertions(+), 33 deletions(-) diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/WaterDaoImpl.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/WaterDaoImpl.java index a13331fc7..c95a6aa18 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/WaterDaoImpl.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/WaterDaoImpl.java @@ -155,7 +155,6 @@ public WaterConnectionResponse getWaterConnectionList(SearchCriteria criteria, R @Override public void updateWaterConnection(WaterConnectionRequest waterConnectionRequest, boolean isStateUpdatable) { if (isStateUpdatable) { - log.info("sending data to kafka topic updateWaterConnection " +waterConnectionRequest.toString()); waterConnectionProducer.push(updateWaterConnection, waterConnectionRequest); } else { waterConnectionProducer.push(wsConfiguration.getWorkFlowUpdateTopic(), waterConnectionRequest); diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterServiceImpl.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterServiceImpl.java index 0229d7745..4abc4ddbb 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterServiceImpl.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterServiceImpl.java @@ -372,12 +372,10 @@ private List updateWaterConnectionForModifyFlow(WaterConnection waterConnectionRequest.getWaterConnection().setApplicationStatus("INACTIVE"); } // setting oldApplication Flag - log.info("sending water connection request to method markOldApplication "+waterConnectionRequest.toString()); markOldApplication(waterConnectionRequest); // check for edit and send edit notification waterDaoImpl.pushForEditNotification(waterConnectionRequest); postForMeterReading(waterConnectionRequest, WCConstants.MODIFY_CONNECTION); - log.info("before sending data from line 380 in water service impl "+waterConnectionRequest.toString()); return Arrays.asList(waterConnectionRequest.getWaterConnection()); } diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/validator/WaterConnectionValidator.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/validator/WaterConnectionValidator.java index b38abd574..35ba1237a 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/validator/WaterConnectionValidator.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/validator/WaterConnectionValidator.java @@ -220,12 +220,14 @@ private Boolean checkForPayments(WaterConnectionRequest waterConnectionRequest) service = "WS"; } StringBuilder uri = new StringBuilder(); - uri.append(waterServiceUtil.getcollectionURL()).append(service).append("/_search").append("?").append("consumerCodes=").append(consumerCode) - .append("&").append("tenantId=").append(waterConnectionRequest.getWaterConnection().getTenantId()); + uri.append(waterServiceUtil.getcollectionURL()).append(service).append("/_search").append("?"). + append("tenantId=").append(waterConnectionRequest.getWaterConnection().getTenantId()) + .append("&"). + append("consumerCodes=").append(consumerCode) + .append("&"). + append("businessService").append(service); RequestInfoWrapper requestInfoWrapper = RequestInfoWrapper.builder().requestInfo(waterConnectionRequest.getRequestInfo()).build(); Object response = serviceRequestRepository.fetchResult(uri,requestInfoWrapper); - log.info("URL for getting payments "+uri); - log.info("Respinse from paymnets "+response.toString()); PaymentResponse paymentResponse=null; try { paymentResponse = mapper.convertValue(response, PaymentResponse.class); @@ -234,31 +236,6 @@ private Boolean checkForPayments(WaterConnectionRequest waterConnectionRequest) { log.error("Response not found"); } - log.info("Payment response from line 228 "+paymentResponse.toString()); -// List demandIds=new ArrayList<>(); - -// if(paymentResponse.getPayments()!=null) -// { -// for(Payment payment:paymentResponse.getPayments()) -// { -// if(payment.getPaymentDetails()!=null) -// { -// for(PaymentDetail paymentDetail:payment.getPaymentDetails()) -// { -// Bill bill=paymentDetail.getBill(); -// if(bill!=null && bill.getBillDetails()!=null) -// { -// for(BillDetail billDetail:bill.getBillDetails()) -// { -// demandIds.add(billDetail.getDemandId()); -// } -// } -// } -// } -// } -// } -// return demandIds; -// if(paymentResponse.getPayments()!=null) { if(!paymentResponse.getPayments().isEmpty()) diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/controller/WaterController.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/controller/WaterController.java index ffa50d458..4221bee90 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/controller/WaterController.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/controller/WaterController.java @@ -88,7 +88,6 @@ public ResponseEntity search(@Valid @RequestBody Reques public ResponseEntity updateWaterConnection( @Valid @RequestBody WaterConnectionRequest waterConnectionRequest) { List waterConnection = waterService.updateWaterConnection(waterConnectionRequest); - log.info("response sent back from api update "+waterConnection.toString()); WaterConnectionResponse response = WaterConnectionResponse.builder().waterConnection(waterConnection) .responseInfo(responseInfoFactory .createResponseInfoFromRequestInfo(waterConnectionRequest.getRequestInfo(), true)) From 3b4d6d8071292b9297d77e4f93db427e03bcfad6 Mon Sep 17 00:00:00 2001 From: Saloni-eGov Date: Tue, 18 Jun 2024 22:10:01 +0530 Subject: [PATCH 021/118] ISTE-21 --- .../org/egov/waterconnection/service/WaterServiceImpl.java | 4 ++-- .../egov/waterconnection/web/controller/WaterController.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterServiceImpl.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterServiceImpl.java index 4abc4ddbb..378431259 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterServiceImpl.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterServiceImpl.java @@ -24,7 +24,7 @@ import javax.validation.Valid; -import lombok.extern.slf4j.Slf4j; + import org.egov.common.contract.request.RequestInfo; import org.egov.tracer.model.CustomException; import org.egov.waterconnection.config.WSConfiguration; @@ -56,7 +56,7 @@ import com.fasterxml.jackson.databind.node.ObjectNode; import com.jayway.jsonpath.JsonPath; -@Slf4j + @Component public class WaterServiceImpl implements WaterService { diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/controller/WaterController.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/controller/WaterController.java index 4221bee90..cda9afdbc 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/controller/WaterController.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/controller/WaterController.java @@ -4,7 +4,7 @@ import javax.validation.Valid; -import lombok.extern.slf4j.Slf4j; + import org.egov.waterconnection.constants.WCConstants; import org.egov.waterconnection.service.SchedulerService; import org.egov.waterconnection.service.WaterService; @@ -46,7 +46,7 @@ import lombok.Getter; import lombok.Setter; -@Slf4j + @Getter @Setter @Builder From bdf05dce373f1a9bff44c76ffd1f61c7d342412e Mon Sep 17 00:00:00 2001 From: Saloni-eGov Date: Tue, 18 Jun 2024 22:10:48 +0530 Subject: [PATCH 022/118] ISTE-21 --- .../java/org/egov/waterconnection/service/WaterServiceImpl.java | 2 -- .../egov/waterconnection/web/controller/WaterController.java | 2 -- 2 files changed, 4 deletions(-) diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterServiceImpl.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterServiceImpl.java index 378431259..704683d4b 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterServiceImpl.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterServiceImpl.java @@ -24,7 +24,6 @@ import javax.validation.Valid; - import org.egov.common.contract.request.RequestInfo; import org.egov.tracer.model.CustomException; import org.egov.waterconnection.config.WSConfiguration; @@ -56,7 +55,6 @@ import com.fasterxml.jackson.databind.node.ObjectNode; import com.jayway.jsonpath.JsonPath; - @Component public class WaterServiceImpl implements WaterService { diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/controller/WaterController.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/controller/WaterController.java index cda9afdbc..cd462ba50 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/controller/WaterController.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/controller/WaterController.java @@ -4,7 +4,6 @@ import javax.validation.Valid; - import org.egov.waterconnection.constants.WCConstants; import org.egov.waterconnection.service.SchedulerService; import org.egov.waterconnection.service.WaterService; @@ -46,7 +45,6 @@ import lombok.Getter; import lombok.Setter; - @Getter @Setter @Builder From 2af578bbd6014c57224407b8db91966e7be38497 Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Wed, 19 Jun 2024 10:50:28 +0530 Subject: [PATCH 023/118] removed console log --- .../packages/modules/hrms/src/pages/EditEmployee/EditForm.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/EditEmployee/EditForm.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/EditEmployee/EditForm.js index a657ffbcf..098141f99 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/EditEmployee/EditForm.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/EditEmployee/EditForm.js @@ -133,8 +133,6 @@ const EditForm = ({ tenantId, data }) => { } } - console.log(formData?.Jurisdictions,"roles"); - if ( formData?.SelectEmployeeGender?.gender.code && formData?.SelectEmployeeName?.employeeName && From f284f281d18155384e0b343c2db1e39d0f9ce5e9 Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Wed, 19 Jun 2024 11:15:28 +0530 Subject: [PATCH 024/118] semi colon change --- .../main/V20221206104420__egbs_bill_alter_add_consumercode.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/business-services/billing-service/src/main/resources/db/migration/main/V20221206104420__egbs_bill_alter_add_consumercode.sql b/business-services/billing-service/src/main/resources/db/migration/main/V20221206104420__egbs_bill_alter_add_consumercode.sql index 4c2c308e6..4ccd414c4 100644 --- a/business-services/billing-service/src/main/resources/db/migration/main/V20221206104420__egbs_bill_alter_add_consumercode.sql +++ b/business-services/billing-service/src/main/resources/db/migration/main/V20221206104420__egbs_bill_alter_add_consumercode.sql @@ -1,6 +1,6 @@ ALTER TABLE egbs_bill_v1 ADD COLUMN IF NOT EXISTS consumercode CHARACTER VARYING(256); -UPDATE egbs_bill_v1 b SET consumerCode = bd.consumercode FROM egbs_billdetail_v1 bd WHERE bd.billid = b.id and b.consumercode is null ; +UPDATE egbs_bill_v1 b SET consumerCode = bd.consumercode FROM egbs_billdetail_v1 bd WHERE bd.billid = b.id and b.consumercode is null; ALTER TABLE egbs_bill_v1 ALTER COLUMN consumercode SET NOT NULL; From 307c5ae5019066c75a4f52801d1e9c4f2c0d255d Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Wed, 19 Jun 2024 21:02:12 +0530 Subject: [PATCH 025/118] HRMS- v2 changes --- .../css/src/pages/employee/inbox.scss | 10 +++++ .../modules/core/src/components/ChangeCity.js | 5 ++- .../modules/core/src/pages/employee/index.js | 39 ++++++++++++++++++- .../hrms/src/components/EmployeeModuleCard.js | 2 +- .../hrms/src/pages/EditEmployee/EditForm.js | 7 +++- .../modules/hrms/src/pages/createEmployee.js | 3 +- 6 files changed, 57 insertions(+), 9 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/inbox.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/inbox.scss index b19e0b2d1..d3cdd6280 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/inbox.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/inbox.scss @@ -447,6 +447,16 @@ height: 263px !important; } } + +@screen dt { + .customEmployeeWarnings { + margin-left: 4rem !important; + margin-top: -4rem !important; + width: 65% !important; + } +} + + .employeeTotalLink { color: theme(colors.text.secondary); font-size: 16px; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/ChangeCity.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/ChangeCity.js index a21e8d69c..c41abeb61 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/ChangeCity.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/ChangeCity.js @@ -22,7 +22,6 @@ const ChangeCity = (prop) => { const history = useHistory(); const isDropdown = prop.dropdown || false; let selectedCities = []; - const uuids = [prop.userDetails?.info?.uuid]; const { data: userData, isUserDataLoading } = Digit.Hooks.useUserSearch(Digit.ULBService.getStateId(), { uuid: uuids }, {}); // setSelectedCity(userData?.data?.user[0]?.roles) @@ -39,6 +38,7 @@ const ChangeCity = (prop) => { loggedInData.info.roles = filteredRoles; loggedInData.info.tenantId = city?.value; } + Digit.SessionStorage.set("Employee.tenantId", city?.value); Digit.UserService.setUser(loggedInData); setDropDownData(city); @@ -54,8 +54,8 @@ const ChangeCity = (prop) => { let teantsArray = [],filteredArray = []; userData?.user[0].roles?.forEach((role) => teantsArray.push(role.tenantId)); let unique = teantsArray.filter((item, i, ar) => ar.indexOf(item) === i); - unique?.forEach((uniCode) => { + data?.MdmsRes?.["tenant"]["tenants"]?.map((items) => { if (items?.code !== "pb" && items?.code === uniCode) { filteredArray.push({ @@ -74,6 +74,7 @@ const ChangeCity = (prop) => { }); selectedCities = filteredArray?.filter((select) => select.value == Digit.SessionStorage.get("Employee.tenantId")); setSelectCityData(filteredArray); + }, [dropDownData, data?.MdmsRes]); return ( diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/index.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/index.js index edd21baf6..d1da2dfbc 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/index.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/index.js @@ -1,4 +1,4 @@ -import React, { useEffect } from "react"; +import React, { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import { Redirect, Route, Switch, useLocation, useRouteMatch, useHistory } from "react-router-dom"; import { AppModules } from "../../components/AppModules"; @@ -10,7 +10,10 @@ import LanguageSelection from "./LanguageSelection"; import EmployeeLogin from "./Login"; import UserProfile from "../citizen/Home/UserProfile"; import ErrorComponent from "../../components/ErrorComponent"; -import { PrivateRoute } from "@egovernments/digit-ui-react-components"; +import { PrivateRoute, Card, CardText, CardSubHeader, CardLabelError } from "@egovernments/digit-ui-react-components"; + + + const userScreensExempted = ["user/profile", "user/error"]; @@ -36,10 +39,24 @@ const EmployeeApp = ({ const location = useLocation(); const showLanguageChange = location?.pathname?.includes("language-selection"); const isUserProfile = userScreensExempted.some((url) => location?.pathname?.includes(url)); + const DIV_ADMIN = Digit.UserService.hasAccess(["DIV_ADMIN"]); + const [showAlert, setShowAlert] = useState(false); useEffect(() => { Digit.UserService.setType("employee"); + if (cityDetails.code == "pb" && DIV_ADMIN == 0) { + setShowAlert(true); + } + else { + setShowAlert(false); + } }, []); + const closeAlert = () => { + setShowAlert(false); + }; + + + return (
@@ -113,7 +130,25 @@ const EmployeeApp = ({ + {/* ALERT BOX */} + {showAlert &&
{/* Centered row */} + +
+
+
+ {t("CS_COMMON_SELECT_TITLE_VILLAGE")} + {t("CS_COMMON_SELECT_VILLAGE")} + {/* */} +
+
+
+
+
} + {/* ALERT BOX */} + +
+
Powered by DIGIT +
{moduleName} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/EditEmployee/EditForm.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/EditEmployee/EditForm.js index 098141f99..c78aaadf7 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/EditEmployee/EditForm.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/EditEmployee/EditForm.js @@ -113,6 +113,7 @@ const EditForm = ({ tenantId, data }) => { }; const onFormValueChange = (setValue = true, formData) => { + console.log(formData); if (formData?.SelectEmployeePhoneNumber?.mobileNumber) { setMobileNumber(formData?.SelectEmployeePhoneNumber?.mobileNumber); } else { @@ -133,14 +134,16 @@ const EditForm = ({ tenantId, data }) => { } } + + if ( formData?.SelectEmployeeGender?.gender.code && formData?.SelectEmployeeName?.employeeName && formData?.SelectEmployeePhoneNumber?.mobileNumber && - formData?.Jurisdictions.length && - (formData?.Jurisdictions.filter((juris) => juris?.roles?.length).length > 0 || formData?.Jurisdictions.filter((juris) => juris?.divisionBoundary?.length).length > 0) && + formData?.Jurisdictions.length && formData?.Jurisdictions.length && !formData?.Jurisdictions.some(juris => juris?.roles?.length === 0 )&& + checkfield && phonecheck && checkMailNameNum(formData) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/createEmployee.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/createEmployee.js index 4fca1bacb..d79ad850c 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/createEmployee.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/createEmployee.js @@ -112,8 +112,7 @@ const CreateEmployee = () => { formData?.SelectEmployeeGender?.gender.code && formData?.SelectEmployeeName?.employeeName && formData?.SelectEmployeePhoneNumber?.mobileNumber && - formData?.Jurisdictions.length && - (formData?.Jurisdictions.filter((juris) => juris?.roles?.length).length > 0 || formData?.Jurisdictions.filter((juris) => juris?.divisionBoundary?.length).length > 0) && + formData?.Jurisdictions.length && formData?.Jurisdictions.length && !formData?.Jurisdictions.some(juris => juris?.roles?.length === 0 )&& checkfield && phonecheck && checkMailNameNum(formData) From 41d6f3811e46afc5700b8c5db7e01c488996fea9 Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Thu, 20 Jun 2024 12:14:14 +0530 Subject: [PATCH 026/118] HRMS - Final changes --- .../css/src/pages/employee/inbox.scss | 2 +- .../modules/core/src/pages/employee/index.js | 49 ++++++++++++++++--- 2 files changed, 44 insertions(+), 7 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/inbox.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/inbox.scss index d3cdd6280..839c86b07 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/inbox.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/inbox.scss @@ -450,7 +450,7 @@ @screen dt { .customEmployeeWarnings { - margin-left: 4rem !important; + margin-left: 2.6rem !important; margin-top: -4rem !important; width: 65% !important; } diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/index.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/index.js index d1da2dfbc..d8523b028 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/index.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/index.js @@ -40,15 +40,52 @@ const EmployeeApp = ({ const showLanguageChange = location?.pathname?.includes("language-selection"); const isUserProfile = userScreensExempted.some((url) => location?.pathname?.includes(url)); const DIV_ADMIN = Digit.UserService.hasAccess(["DIV_ADMIN"]); + const MDMS_ADMIN = Digit.UserService.hasAccess(["MDMS_ADMIN"]); + const STATE_ADMIN = Digit.UserService.hasAccess(["STATE_ADMIN"]); + + + + console.log(DIV_ADMIN,"DIV_ADMIN"); + console.log(MDMS_ADMIN,"MDMS_ADMIN"); + console.log(STATE_ADMIN,"STATE_ADMIN"); + console.log(userDetails ,"userDetails"); const [showAlert, setShowAlert] = useState(false); useEffect(() => { Digit.UserService.setType("employee"); - if (cityDetails.code == "pb" && DIV_ADMIN == 0) { - setShowAlert(true); - } - else { + + + + if(userDetails?.info?.roles.some(obj => obj.name === "STATE ADMIN")){ setShowAlert(false); - } + console.log("REACHED 1"); + } + if (cityDetails.code == "pb") { + if( DIV_ADMIN == 0 && MDMS_ADMIN ==1 && STATE_ADMIN == 1){ + setShowAlert(false); + } + if(DIV_ADMIN == 0 && MDMS_ADMIN ==0 && STATE_ADMIN == 0){ + setShowAlert(true); + + }else{ + setShowAlert(false); + + } + + console.log("REACHED 2"); + } + + else{ + console.log("REACHED 3"); + setShowAlert(false); + } + + + // if (cityDetails.code == "pb") { + // setShowAlert(true); + // } + // else { + // setShowAlert(false); + // } }, []); const closeAlert = () => { @@ -131,7 +168,7 @@ const EmployeeApp = ({ {/* ALERT BOX */} - {showAlert &&
{/* Centered row */} + { (userDetails?.info?.roles.some(obj => obj.name === "STATE ADMIN") ? false : true ) && showAlert &&
{/* Centered row */}
From b215fdbe4dc958085f974b98b435ad83fdbc8c79 Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Thu, 20 Jun 2024 13:02:58 +0530 Subject: [PATCH 027/118] ISTE -159 - Remarks removed --- .../lib/providers/consumer_details_provider.dart | 6 +++--- .../consumer_details/consumer_details.dart | 14 ++++++++------ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/frontend/mgramseva/lib/providers/consumer_details_provider.dart b/frontend/mgramseva/lib/providers/consumer_details_provider.dart index 27667409d..33296b33c 100644 --- a/frontend/mgramseva/lib/providers/consumer_details_provider.dart +++ b/frontend/mgramseva/lib/providers/consumer_details_provider.dart @@ -313,7 +313,7 @@ class ConsumerProvider with ChangeNotifier { "aadharNumber": waterconnection.addharCtrl.text.trim().isEmpty ? null : waterconnection.addharCtrl.text.trim(), - "remarks": property.owners?.first.remarks + "remarks": waterconnection.status == "Inactive" ? property.owners?.first.remarks : "" }); } else { waterconnection.additionalDetails!.locality = @@ -338,8 +338,8 @@ class ConsumerProvider with ChangeNotifier { waterconnection.previousReading; waterconnection.additionalDetails!.propertyType = property.propertyType; - waterconnection.additionalDetails!.remarks = - property.owners?.first.remarks; + waterconnection.additionalDetails!.remarks = waterconnection.status == "Inactive" ? + property.owners?.first.remarks : ""; } try { diff --git a/frontend/mgramseva/lib/screeens/consumer_details/consumer_details.dart b/frontend/mgramseva/lib/screeens/consumer_details/consumer_details.dart index 4db67c9d2..2c8ecea1f 100644 --- a/frontend/mgramseva/lib/screeens/consumer_details/consumer_details.dart +++ b/frontend/mgramseva/lib/screeens/consumer_details/consumer_details.dart @@ -654,13 +654,15 @@ class _ConsumerDetailsState extends State { (consumerProvider.waterconnection.status == "Inactive"), child: Consumer( - builder: (_, consumerProvider, child) { - property.owners!.first.consumerRemarksCtrl - .text = consumerProvider.waterconnection - .additionalDetails!.remarks ?? - ""; + builder: (_, consumerProvider, child) { + + property.owners!.first.consumerRemarksCtrl + .text = consumerProvider.waterconnection + .additionalDetails!.remarks ?? + ""; + + return BuildTextField( - i18.consumer.CONSUMER_REMARKS, property.owners!.first.consumerRemarksCtrl, validator: (val) => From 100e30e70464482a0d149b4dc6a2dd18c21e88e4 Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Thu, 20 Jun 2024 17:09:43 +0530 Subject: [PATCH 028/118] HRMS EDIT FORNM and CREATE FORM --- .../modules/hrms/src/pages/EditEmployee/EditForm.js | 9 ++++++++- .../packages/modules/hrms/src/pages/createEmployee.js | 7 ++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/EditEmployee/EditForm.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/EditEmployee/EditForm.js index c78aaadf7..443555941 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/EditEmployee/EditForm.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/EditEmployee/EditForm.js @@ -141,8 +141,15 @@ const EditForm = ({ tenantId, data }) => { formData?.SelectEmployeeName?.employeeName && formData?.SelectEmployeePhoneNumber?.mobileNumber && + STATE_ADMIN ? + (formData?.Jurisdictions.length && !formData?.Jurisdictions.some(juris => juris?.division == undefined || juris?.divisionBoundary?.length === 0 ) ) + + :formData?.Jurisdictions.length && formData?.Jurisdictions.length && !formData?.Jurisdictions.some(juris => juris?.roles?.length === 0 ) + && + + + // formData?.Jurisdictions.length && formData?.Jurisdictions.length && !formData?.Jurisdictions.some(juris => juris?.division == undefined || juris?.divisionBoundary?.length === 0 )&& - formData?.Jurisdictions.length && formData?.Jurisdictions.length && !formData?.Jurisdictions.some(juris => juris?.roles?.length === 0 )&& checkfield && phonecheck && diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/createEmployee.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/createEmployee.js index d79ad850c..6b05fb5b2 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/createEmployee.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/createEmployee.js @@ -112,7 +112,12 @@ const CreateEmployee = () => { formData?.SelectEmployeeGender?.gender.code && formData?.SelectEmployeeName?.employeeName && formData?.SelectEmployeePhoneNumber?.mobileNumber && - formData?.Jurisdictions.length && formData?.Jurisdictions.length && !formData?.Jurisdictions.some(juris => juris?.roles?.length === 0 )&& + formData?.Jurisdictions.length && + STATE_ADMIN ? + (formData?.Jurisdictions.length && !formData?.Jurisdictions.some(juris => juris?.division == undefined || juris?.divisionBoundary?.length === 0 ) ) + + :formData?.Jurisdictions.length && formData?.Jurisdictions.length && !formData?.Jurisdictions.some(juris => juris?.roles?.length === 0 ) + && checkfield && phonecheck && checkMailNameNum(formData) From 4b1718f3ad95a2b75b7a06aad275cea50def08cb Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Thu, 20 Jun 2024 17:12:14 +0530 Subject: [PATCH 029/118] HRMS COMMENTS REMOVED --- .../modules/hrms/src/pages/EditEmployee/EditForm.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/EditEmployee/EditForm.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/EditEmployee/EditForm.js index 443555941..e2c18b63a 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/EditEmployee/EditForm.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/EditEmployee/EditForm.js @@ -145,12 +145,7 @@ const EditForm = ({ tenantId, data }) => { (formData?.Jurisdictions.length && !formData?.Jurisdictions.some(juris => juris?.division == undefined || juris?.divisionBoundary?.length === 0 ) ) :formData?.Jurisdictions.length && formData?.Jurisdictions.length && !formData?.Jurisdictions.some(juris => juris?.roles?.length === 0 ) - && - - - // formData?.Jurisdictions.length && formData?.Jurisdictions.length && !formData?.Jurisdictions.some(juris => juris?.division == undefined || juris?.divisionBoundary?.length === 0 )&& - - + && checkfield && phonecheck && checkMailNameNum(formData) From 5adc2d52c3ad21aabdefc6ad516b80d1ef9d9136 Mon Sep 17 00:00:00 2001 From: Priyanka-eGov Date: Thu, 20 Jun 2024 17:53:43 +0530 Subject: [PATCH 030/118] ISTE-167 adding changes for hrms plainsearch API --- .../egov/hrms/config/PropertiesManager.java | 3 + .../egov/hrms/repository/EmployeeQueries.java | 4 ++ .../hrms/repository/EmployeeQueryBuilder.java | 68 +++++++++++++++++++ .../hrms/repository/EmployeeRepository.java | 29 ++++++++ .../egov/hrms/service/EmployeeService.java | 36 ++++++++-- .../contract/EmployeePlainSearchCriteria.java | 40 +++++++++++ .../web/controller/EmployeeController.java | 11 +++ .../src/main/resources/application.properties | 3 +- 8 files changed, 187 insertions(+), 7 deletions(-) create mode 100644 business-services/egov-hrms/src/main/java/org/egov/hrms/web/contract/EmployeePlainSearchCriteria.java diff --git a/business-services/egov-hrms/src/main/java/org/egov/hrms/config/PropertiesManager.java b/business-services/egov-hrms/src/main/java/org/egov/hrms/config/PropertiesManager.java index 07035d44c..e9adc7abb 100644 --- a/business-services/egov-hrms/src/main/java/org/egov/hrms/config/PropertiesManager.java +++ b/business-services/egov-hrms/src/main/java/org/egov/hrms/config/PropertiesManager.java @@ -122,4 +122,7 @@ public class PropertiesManager { @Value("${sms.user.creation.enabled}") public boolean isSMSForUserCreationEnable; + + @Value("${egov.hrms.max.pagination.limit}") + public Integer hrmsMaxLimit; } \ No newline at end of file diff --git a/business-services/egov-hrms/src/main/java/org/egov/hrms/repository/EmployeeQueries.java b/business-services/egov-hrms/src/main/java/org/egov/hrms/repository/EmployeeQueries.java index 9bb07130f..f04a84080 100644 --- a/business-services/egov-hrms/src/main/java/org/egov/hrms/repository/EmployeeQueries.java +++ b/business-services/egov-hrms/src/main/java/org/egov/hrms/repository/EmployeeQueries.java @@ -52,4 +52,8 @@ public class EmployeeQueries { public static final String HRMS_GET_ASSIGNMENT = "select distinct(employeeid) from eg_hrms_assignment assignment where assignment.tenantid notnull "; public static final String HRMS_COUNT_EMP_QUERY = "SELECT active, count(*) FROM eg_hrms_employee WHERE tenantid "; + + public static final String HRMS_GET_EMP_IDS_QUERY = "SELECT employee.uuid FROM eg_hrms_employee employee WHERE"; + + public static final String HRMS_QUERY_ORDER_BY_CLAUSE = "employee.createddate"; } diff --git a/business-services/egov-hrms/src/main/java/org/egov/hrms/repository/EmployeeQueryBuilder.java b/business-services/egov-hrms/src/main/java/org/egov/hrms/repository/EmployeeQueryBuilder.java index 67140d47e..960769711 100644 --- a/business-services/egov-hrms/src/main/java/org/egov/hrms/repository/EmployeeQueryBuilder.java +++ b/business-services/egov-hrms/src/main/java/org/egov/hrms/repository/EmployeeQueryBuilder.java @@ -2,6 +2,7 @@ import org.apache.commons.lang3.StringUtils; import org.egov.hrms.config.PropertiesManager; +import org.egov.hrms.web.contract.EmployeePlainSearchCriteria; import org.egov.hrms.web.contract.EmployeeSearchCriteria; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; @@ -13,6 +14,8 @@ import java.util.Set; import java.util.stream.Collectors; +import static org.egov.hrms.repository.EmployeeQueries.HRMS_QUERY_ORDER_BY_CLAUSE; + @Service public class EmployeeQueryBuilder { @@ -158,5 +161,70 @@ private void addToPreparedStatement(List preparedStmtList, List ids) }); } + /** + * Returns query for searching employee ids based on criteria + * + * @param criteria + * @return + */ + public String getEmployeeIdsQuery(EmployeePlainSearchCriteria criteria, List preparedStmtList ) { + StringBuilder builder = new StringBuilder(EmployeeQueries.HRMS_GET_EMP_IDS_QUERY); + + if(!StringUtils.isEmpty(criteria.getTenantId())) { + builder.append(" employee.tenantid = ?"); + preparedStmtList.add(criteria.getTenantId()); + } + else + builder.append(" and employee.tenantid NOTNULL"); + + if(criteria.getCreatedDateFrom() != null){ + builder.append(" and employee.createddate >= ?"); + preparedStmtList.add(criteria.getCreatedDateFrom()); + } + + if(criteria.getCreatedDateFrom()!= null){ + builder.append(" and employee.createddate <= ?"); + preparedStmtList.add(criteria.getCreatedDateFrom()); + } + + addOrderByClause(builder, HRMS_QUERY_ORDER_BY_CLAUSE); + + if(criteria.getLimit() != null) { + builder.append(" limit ?"); + preparedStmtList.add(criteria.getLimit()); + } + else { + builder.append(" limit ?"); + preparedStmtList.add(defaultLimit); + } + + if(criteria.getOffset() != null) { + builder.append(" offset ?"); + preparedStmtList.add(criteria.getOffset()); + } + else { + builder.append(" offset ?"); + preparedStmtList.add(0); + } + + return builder.toString(); + } + + public String getPlainSearchEmployeeQuery(EmployeePlainSearchCriteria criteria, List preparedStmtList ) { + StringBuilder builder = new StringBuilder(EmployeeQueries.HRMS_GET_EMPLOYEES); + + if(!CollectionUtils.isEmpty(criteria.getUuids())){ + builder.append(" employee.uuid IN (").append(createQuery(criteria.getUuids())+")"); + addToPreparedStatement(preparedStmtList,criteria.getUuids()); + } + else + builder.delete(builder.length() - 6, builder.length()); + return builder.toString(); + + } + + private static void addOrderByClause(StringBuilder queryBuilder,String columnName) { + queryBuilder.append(" ORDER BY " + columnName); + } } diff --git a/business-services/egov-hrms/src/main/java/org/egov/hrms/repository/EmployeeRepository.java b/business-services/egov-hrms/src/main/java/org/egov/hrms/repository/EmployeeRepository.java index 518fb1dcf..6062a0733 100644 --- a/business-services/egov-hrms/src/main/java/org/egov/hrms/repository/EmployeeRepository.java +++ b/business-services/egov-hrms/src/main/java/org/egov/hrms/repository/EmployeeRepository.java @@ -8,9 +8,11 @@ import org.egov.common.contract.request.RequestInfo; import org.egov.hrms.utils.HRMSUtils; +import org.egov.hrms.web.contract.EmployeePlainSearchCriteria; import org.egov.hrms.web.contract.EmployeeSearchCriteria; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.jdbc.core.SingleColumnRowMapper; import org.springframework.stereotype.Repository; import lombok.extern.slf4j.Slf4j; @@ -121,4 +123,31 @@ public Map fetchEmployeeCount(String tenantId){ return response; } + public List fetchPlainSearchEmployees(EmployeePlainSearchCriteria criteria){ + List employees = new ArrayList<>(); + List preparedStmtList = new ArrayList<>(); + + String query = queryBuilder.getPlainSearchEmployeeQuery(criteria, preparedStmtList); + try { + employees = jdbcTemplate.query(query, preparedStmtList.toArray(),rowMapper); + }catch(Exception e) { + log.error("Exception while making the db call -> ",e); + log.error("query -> "+query); + } + return employees; + } + + public List fetchEmployeeIds(EmployeePlainSearchCriteria criteria){ + List employeeIds = new ArrayList<>(); + List preparedStmtList = new ArrayList<>(); + String employeeIdsQuery = queryBuilder.getEmployeeIdsQuery(criteria, preparedStmtList); + try { + employeeIds = jdbcTemplate.query(employeeIdsQuery, new SingleColumnRowMapper<>(String.class), preparedStmtList.toArray()); + }catch(Exception e) { + log.error("Exception while making the db call -> ", e); + log.error("query -> " + employeeIdsQuery); + } + return employeeIds; + } + } diff --git a/business-services/egov-hrms/src/main/java/org/egov/hrms/service/EmployeeService.java b/business-services/egov-hrms/src/main/java/org/egov/hrms/service/EmployeeService.java index a619cb208..2282fa671 100644 --- a/business-services/egov-hrms/src/main/java/org/egov/hrms/service/EmployeeService.java +++ b/business-services/egov-hrms/src/main/java/org/egov/hrms/service/EmployeeService.java @@ -215,14 +215,38 @@ public EmployeeResponse search(EmployeeSearchCriteria criteria, RequestInfo requ return EmployeeResponse.builder().responseInfo(factory.createResponseInfoFromRequestInfo(requestInfo, true)) .employees(employees).build(); } - - + /** - * Creates user by making call to egov-user. - * - * @param employee - * @param requestInfo + * Plain search for employees + * + * @param criteria + * @return */ + public List plainsearch(EmployeePlainSearchCriteria criteria) { + if (criteria.getLimit() != null && criteria.getLimit() > propertiesManager.getHrmsMaxLimit()) + criteria.setLimit(propertiesManager.getHrmsMaxLimit()); + + List employeeIds = null; + + if(CollectionUtils.isEmpty(criteria.getUuids())) + employeeIds = repository.fetchEmployeeIds(criteria); + else + employeeIds = criteria.getUuids(); + + + if(employeeIds.isEmpty()) + return Collections.emptyList(); + + EmployeePlainSearchCriteria employeePlainSearchCriteria = EmployeePlainSearchCriteria.builder().uuids(employeeIds).build(); + return repository.fetchPlainSearchEmployees(employeePlainSearchCriteria); + } + + /** + * Creates user by making call to egov-user. + * + * @param employee + * @param requestInfo + */ private void createUser(Employee employee, RequestInfo requestInfo) { enrichUser(employee); UserRequest request = UserRequest.builder().requestInfo(requestInfo).user(employee.getUser()).build(); diff --git a/business-services/egov-hrms/src/main/java/org/egov/hrms/web/contract/EmployeePlainSearchCriteria.java b/business-services/egov-hrms/src/main/java/org/egov/hrms/web/contract/EmployeePlainSearchCriteria.java new file mode 100644 index 000000000..228ba5e8d --- /dev/null +++ b/business-services/egov-hrms/src/main/java/org/egov/hrms/web/contract/EmployeePlainSearchCriteria.java @@ -0,0 +1,40 @@ +package org.egov.hrms.web.contract; + +import lombok.*; +import org.apache.commons.lang3.StringUtils; +import javax.validation.constraints.Size; +import java.util.List; + + +@AllArgsConstructor +@Getter +@NoArgsConstructor +@Setter +@ToString +@Builder +public class EmployeePlainSearchCriteria { + + @Size(max = 250) + public String tenantId; + + private List uuids; + + private Long createdDateFrom; + + private Long createdDateTo; + + public Integer offset; + + public Integer limit; + + + public boolean isPlainSearchCriteriaEmpty(EmployeePlainSearchCriteria criteria) { + if(StringUtils.isEmpty(criteria.getTenantId()) && null == createdDateFrom + && null == createdDateTo) { + return true; + }else { + return false; + } + } + +} diff --git a/business-services/egov-hrms/src/main/java/org/egov/hrms/web/controller/EmployeeController.java b/business-services/egov-hrms/src/main/java/org/egov/hrms/web/controller/EmployeeController.java index 1bf065440..e0a0ec2b7 100644 --- a/business-services/egov-hrms/src/main/java/org/egov/hrms/web/controller/EmployeeController.java +++ b/business-services/egov-hrms/src/main/java/org/egov/hrms/web/controller/EmployeeController.java @@ -43,6 +43,7 @@ import lombok.extern.slf4j.Slf4j; import org.egov.common.contract.request.RequestInfo; import org.egov.hrms.service.EmployeeService; +import org.egov.hrms.utils.ResponseInfoFactory; import org.egov.hrms.web.contract.*; import org.egov.hrms.web.validator.EmployeeValidator; import org.springframework.beans.factory.annotation.Autowired; @@ -67,6 +68,8 @@ public class EmployeeController { @Autowired private EmployeeValidator validator; + @Autowired + private ResponseInfoFactory factory; /** * Maps Post Requests for _create & returns ResponseEntity of either @@ -146,5 +149,13 @@ private ResponseEntity countV1(@RequestParam("tenantId") String tenantId, @Re return new ResponseEntity<>(response,HttpStatus.OK); } + @PostMapping("/_plainsearch") + @ResponseBody + private ResponseEntity plainsearch(@RequestBody @Valid RequestInfoWrapper requestInfoWrapper, @ModelAttribute @Valid EmployeePlainSearchCriteria criteria) { + + EmployeeResponse employeeResponse = EmployeeResponse.builder().responseInfo(factory.createResponseInfoFromRequestInfo(requestInfoWrapper.getRequestInfo(), true)) + .employees(employeeService.plainsearch(criteria)).build(); + return new ResponseEntity<>(employeeResponse,HttpStatus.OK); + } } \ No newline at end of file diff --git a/business-services/egov-hrms/src/main/resources/application.properties b/business-services/egov-hrms/src/main/resources/application.properties index e99d77f64..71a102711 100644 --- a/business-services/egov-hrms/src/main/resources/application.properties +++ b/business-services/egov-hrms/src/main/resources/application.properties @@ -17,7 +17,7 @@ spring.flyway.enabled=true #--------------------------- PATH & PORT CONFIGURATIONS ---------------------------# server.contextPath=/egov-hrms server.servlet.context-path=/egov-hrms -server.port=9999 +server.port=8091 #---------------------------- TIMEZONE CONFIGURATIONS -----------------------------# app.timezone=UTC @@ -68,6 +68,7 @@ egov.hrms.employee.app.link=https://mseva.lgpunjab.gov.in/employee/user/login #CONFIGS egov.hrms.default.pagination.limit=200 +egov.hrms.max.pagination.limit=1000 egov.hrms.default.pwd.length=8 open.search.enabled.roles=SUPERUSER egov.pwd.allowed.special.characters=@#$% From d487ec007f62291c0b3b23c6d1854c1bbc02f022 Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Fri, 21 Jun 2024 11:14:53 +0530 Subject: [PATCH 031/118] schema update for aggregated demand --- frontend/mgramseva/lib/model/demand/demand_list.dart | 4 ++++ frontend/mgramseva/lib/model/demand/demand_list.g.dart | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/frontend/mgramseva/lib/model/demand/demand_list.dart b/frontend/mgramseva/lib/model/demand/demand_list.dart index 723ae2757..93f894ffe 100644 --- a/frontend/mgramseva/lib/model/demand/demand_list.dart +++ b/frontend/mgramseva/lib/model/demand/demand_list.dart @@ -153,6 +153,10 @@ class AggragateDemandDetails { double? netDueWithPenalty; @JsonKey(name: "totalApplicablePenalty") double? totalApplicablePenalty; + @JsonKey(name: "latestDemandCreatedTime") + double? latestDemandCreatedTime; + @JsonKey(name: "latestDemandPenaltyCreatedtime") + double? latestDemandPenaltyCreatedtime; @JsonKey(name: "mapOfDemandDetailList") List>>? mapOfDemandDetailList; AggragateDemandDetails(); diff --git a/frontend/mgramseva/lib/model/demand/demand_list.g.dart b/frontend/mgramseva/lib/model/demand/demand_list.g.dart index 46eec48b0..fa1596193 100644 --- a/frontend/mgramseva/lib/model/demand/demand_list.g.dart +++ b/frontend/mgramseva/lib/model/demand/demand_list.g.dart @@ -149,6 +149,10 @@ AggragateDemandDetails _$AggragateDemandDetailsFromJson( ..netDueWithPenalty = (json['netDueWithPenalty'] as num?)?.toDouble() ..totalApplicablePenalty = (json['totalApplicablePenalty'] as num?)?.toDouble() + ..latestDemandCreatedTime = + (json['latestDemandCreatedTime'] as num?)?.toDouble() + ..latestDemandPenaltyCreatedtime = + (json['latestDemandPenaltyCreatedtime'] as num?)?.toDouble() ..mapOfDemandDetailList = (json['mapOfDemandDetailList'] as List?) ?.map((e) => (e as Map).map( @@ -175,6 +179,8 @@ Map _$AggragateDemandDetailsToJson( 'netdue': instance.netdue, 'netDueWithPenalty': instance.netDueWithPenalty, 'totalApplicablePenalty': instance.totalApplicablePenalty, + 'latestDemandCreatedTime': instance.latestDemandCreatedTime, + 'latestDemandPenaltyCreatedtime': instance.latestDemandPenaltyCreatedtime, 'mapOfDemandDetailList': instance.mapOfDemandDetailList, }; From 1c9d318756b5fb8d1df8f8fd194d1c6bb795859e Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Mon, 24 Jun 2024 12:43:51 +0530 Subject: [PATCH 032/118] HRMS User Name Search Column Removed --- .../packages/modules/hrms/src/pages/Inbox.js | 4 ---- 1 file changed, 4 deletions(-) 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 daf0af281..22219704d 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 @@ -122,10 +122,6 @@ const Inbox = ({ parentRoute, businessService = "HRMS", initialStates = {}, filt const getSearchFields = () => { return [ - { - label: t("HR_NAME_LABEL"), - name: "names", - }, { label: t("HR_MOB_NO_LABEL"), name: "phone", From 4a574016c871a578d8f30da0f77935b1a8f2b130 Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Mon, 24 Jun 2024 13:19:46 +0530 Subject: [PATCH 033/118] log added --- .../packages/modules/core/src/components/TopBarSideBar/TopBar.js | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/TopBar.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/TopBar.js index efaa32f86..924408773 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/TopBar.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/TopBar.js @@ -97,6 +97,7 @@ const TopBar = ({ ); } const loggedin = userDetails?.access_token ? true : false; + console.log(window?.globalConfigs?.getConfig?.("LOGO_URL"),"NAME1"); return (
{mobileView ? : null} From dc80b71ea295f5be9fbafd87b2e0fbbdf5d232ce Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Mon, 24 Jun 2024 16:34:22 +0530 Subject: [PATCH 034/118] Juristictions remove fix --- .../components/pageComponents/jurisdiction.js | 68 ++++++++++++------- 1 file changed, 44 insertions(+), 24 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/jurisdiction.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/jurisdiction.js index af3992ab1..0a4290de8 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/jurisdiction.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/jurisdiction.js @@ -169,6 +169,7 @@ const Jurisdictions = ({ t, config, onSelect, userType, formData }) => { config.key, [...jurisdictionData, ...inactiveJurisdictions].filter((value) => Object.keys(value).length !== 0) ); + }, [jurisdictions, data?.MdmsRes]); // useEffect(() => { // setJuristictionsData(formData?.Jurisdictions); @@ -193,37 +194,56 @@ const Jurisdictions = ({ t, config, onSelect, userType, formData }) => { ]); }; const handleRemoveUnit = (unit) => { - if (unit.id) { - let res = { - id: unit?.id, - hierarchy: unit?.hierarchy?.code, - boundaryType: unit?.boundaryType?.label, - boundary: unit?.boundary?.code, - division: unit?.division?.code, - tenantId: unit?.boundary?.code, - auditDetails: unit?.auditDetails, - isdeleted: true, - isActive: false, - }; - res = cleanup(res); - if (unit?.roles) { - res["roles"] = unit?.roles.map((ele) => { - delete ele.description; - return ele; - }); + if(STATE_ADMIN){ + const updatedJurisdictionsData = jurisdictionsData.filter( + (element) => element.key !== unit.key + ); + setJuristictionsData(updatedJurisdictionsData); + setjurisdictions(updatedJurisdictionsData) + if (FormData.errors?.Jurisdictions?.type == unit.key) { + clearErrors("Jurisdictions"); } - setInactiveJurisdictions([...inactiveJurisdictions, res]); + reviseIndexKeys(); + } - setJuristictionsData((pre) => pre.filter((el) => el.key !== unit.key)); - setjurisdictions((prev) => prev.filter((el) => el.key !== unit.key)); - if (FormData.errors?.Jurisdictions?.type == unit.key) { - clearErrors("Jurisdictions"); + else{ + if (unit.id) { + let res = { + id: unit?.id, + hierarchy: unit?.hierarchy?.code, + boundaryType: unit?.boundaryType?.label, + boundary: unit?.boundary?.code, + division: unit?.division?.code, + tenantId: unit?.boundary?.code, + auditDetails: unit?.auditDetails, + isdeleted: true, + isActive: false, + }; + res = cleanup(res); + if (unit?.roles) { + res["roles"] = unit?.roles.map((ele) => { + delete ele.description; + return ele; + }); + } + setInactiveJurisdictions([...inactiveJurisdictions, res]); + } + setJuristictionsData((pre) => pre.filter((el) => el.key !== unit.key)); + setjurisdictions((prev) => prev.filter((el) => el.key !== unit.key)); + if (FormData.errors?.Jurisdictions?.type == unit.key) { + clearErrors("Jurisdictions"); + } + + reviseIndexKeys(); + } - reviseIndexKeys(); + }; let boundaryTypeoption = []; const [focusIndex, setFocusIndex] = useState(-1); + + function getroledata() { if (STATE_ADMIN) { // Specify the role codes you want to filter From 584bac1f1c3fb216cfa03e834fcbf483571aa0bf Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Mon, 24 Jun 2024 16:44:40 +0530 Subject: [PATCH 035/118] log removed --- .../packages/modules/core/src/components/TopBarSideBar/TopBar.js | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/TopBar.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/TopBar.js index 924408773..efaa32f86 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/TopBar.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/TopBar.js @@ -97,7 +97,6 @@ const TopBar = ({ ); } const loggedin = userDetails?.access_token ? true : false; - console.log(window?.globalConfigs?.getConfig?.("LOGO_URL"),"NAME1"); return (
{mobileView ? : null} From 3d46abba08476d58f555c463f85e9d9a1b6efcb0 Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Mon, 24 Jun 2024 19:23:02 +0530 Subject: [PATCH 036/118] Create Card Issue Fix --- .../modules/hrms/src/pages/EditEmployee/EditForm.js | 10 ++-------- .../packages/modules/hrms/src/pages/createEmployee.js | 4 ++-- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/EditEmployee/EditForm.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/EditEmployee/EditForm.js index e2c18b63a..b10a5c5c4 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/EditEmployee/EditForm.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/EditEmployee/EditForm.js @@ -113,7 +113,6 @@ const EditForm = ({ tenantId, data }) => { }; const onFormValueChange = (setValue = true, formData) => { - console.log(formData); if (formData?.SelectEmployeePhoneNumber?.mobileNumber) { setMobileNumber(formData?.SelectEmployeePhoneNumber?.mobileNumber); } else { @@ -133,18 +132,13 @@ const EditForm = ({ tenantId, data }) => { } } } - - - if ( formData?.SelectEmployeeGender?.gender.code && formData?.SelectEmployeeName?.employeeName && formData?.SelectEmployeePhoneNumber?.mobileNumber && - STATE_ADMIN ? - (formData?.Jurisdictions.length && !formData?.Jurisdictions.some(juris => juris?.division == undefined || juris?.divisionBoundary?.length === 0 ) ) - - :formData?.Jurisdictions.length && formData?.Jurisdictions.length && !formData?.Jurisdictions.some(juris => juris?.roles?.length === 0 ) + (formData?.Jurisdictions?.length && !formData?.Jurisdictions.some(juris => juris?.division == undefined || juris?.divisionBoundary?.length === 0 ) ) + :formData?.Jurisdictions?.length && formData?.Jurisdictions.length && !formData?.Jurisdictions.some(juris => juris?.roles?.length === 0 ) && checkfield && phonecheck && diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/createEmployee.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/createEmployee.js index 6b05fb5b2..2097d8cd7 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/createEmployee.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/createEmployee.js @@ -112,11 +112,11 @@ const CreateEmployee = () => { formData?.SelectEmployeeGender?.gender.code && formData?.SelectEmployeeName?.employeeName && formData?.SelectEmployeePhoneNumber?.mobileNumber && - formData?.Jurisdictions.length && + formData?.Jurisdictions?.length && STATE_ADMIN ? (formData?.Jurisdictions.length && !formData?.Jurisdictions.some(juris => juris?.division == undefined || juris?.divisionBoundary?.length === 0 ) ) - :formData?.Jurisdictions.length && formData?.Jurisdictions.length && !formData?.Jurisdictions.some(juris => juris?.roles?.length === 0 ) + :formData?.Jurisdictions?.length && formData?.Jurisdictions.length && !formData?.Jurisdictions.some(juris => juris?.roles?.length === 0 ) && checkfield && phonecheck && From 390430e38d89214d9b5027d774b21e2122053e87 Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Mon, 24 Jun 2024 20:31:12 +0530 Subject: [PATCH 037/118] Filter Changes --- .../packages/modules/hrms/src/pages/Inbox.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 22219704d..5d5cd0065 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 @@ -48,11 +48,13 @@ const Inbox = ({ parentRoute, businessService = "HRMS", initialStates = {}, filt }; } - const checkRoles = requestBody.criteria.roles[0] !== "DIV_ADMIN"; + const checkRoles = requestBody.criteria.roles[0] !== "DIV_ADMIN"; const { data: divisionData, ...rests } = Digit.Hooks.hrms.useHRMSEmployeeSearch(requestBody, isupdate, { - enabled: (STATE_ADMIN && searchParams?.hasOwnProperty("isActive")) || searchParams?.hasOwnProperty("tenantIds") ? true : false, + enabled: !STATE_ADMIN ? false : (STATE_ADMIN && searchParams?.hasOwnProperty("isActive")) || searchParams?.hasOwnProperty("tenantIds") ? true : false, }); + + if (searchParams?.hasOwnProperty("roles")) { roles.roles = searchParams?.roles; From a7ace788bfa9ac25bd04d9c2d00083a3b0c365ac Mon Sep 17 00:00:00 2001 From: Nipun Arora Date: Mon, 24 Jun 2024 22:10:23 +0530 Subject: [PATCH 038/118] Added payment module code --- .../micro-ui-internals/example/src/index.js | 1 + .../web/micro-ui-internals/package.json | 2 + .../modules/open-payment/package.json | 35 + .../modules/open-payment/src/Module.js | 93 +++ .../open-payment/src/components/OpenSearch.js | 81 ++ .../open-payment/src/components/OpenView.js | 271 +++++++ .../open-payment/src/components/Response.js | 719 ++++++++++++++++++ .../src/configs/OpenSearchConfig.js | 124 +++ .../src/configs/UICustomizations.js | 78 ++ .../modules/open-payment/src/hooks/index.js | 23 + .../open-payment/src/pages/citizen/index.js | 34 + .../modules/open-payment/src/utils/index.js | 2 + .../modules/open-payment/src/utils/payGov.js | 18 + 13 files changed, 1481 insertions(+) create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/package.json create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/Module.js create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/components/OpenSearch.js create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/components/OpenView.js create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/components/Response.js create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/configs/OpenSearchConfig.js create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/configs/UICustomizations.js create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/hooks/index.js create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/pages/citizen/index.js create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/utils/index.js create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/utils/payGov.js diff --git a/frontend/micro-ui/web/micro-ui-internals/example/src/index.js b/frontend/micro-ui/web/micro-ui-internals/example/src/index.js index 0a103644a..6d380a9c9 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/src/index.js +++ b/frontend/micro-ui/web/micro-ui-internals/example/src/index.js @@ -18,6 +18,7 @@ const enabledModules = [ "DSS", "HRMS", "PGR", + // "Engagement", "NDSS","QuickPayLinks", "Payment", // "Utilities", //added to check fsm diff --git a/frontend/micro-ui/web/micro-ui-internals/package.json b/frontend/micro-ui/web/micro-ui-internals/package.json index dfbfd4ff1..9b27da95d 100644 --- a/frontend/micro-ui/web/micro-ui-internals/package.json +++ b/frontend/micro-ui/web/micro-ui-internals/package.json @@ -26,6 +26,7 @@ "dev:components": "cd packages/react-components && yarn start", "dev:pgr": "cd packages/modules/pgr && yarn start", "dev:hrms": "cd packages/modules/hrms && yarn start", + "dev:openpayment": "cd packages/modules/open-payment && yarn start", "dev:core": "cd packages/modules/core && yarn start", "dev:example": "cd example && yarn start", "build": "run-p build:**", @@ -35,6 +36,7 @@ "build:pgr": "cd packages/modules/pgr && yarn build", "build:hrms": "cd packages/modules/hrms && yarn build", "build:core": "cd packages/modules/core && yarn build", + "build:openpayment": "cd packages/modules/open-payment && yarn build", "build:sample": "cd packages/modules/sample && yarn build", "deploy:jenkins": "./scripts/jenkins.sh", "clean": "rm -rf node_modules" diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/package.json b/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/package.json new file mode 100644 index 000000000..ceeb6a03a --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/package.json @@ -0,0 +1,35 @@ +{ + "name": "@egovernments/digit-ui-module-open-payment", + "version": "0.0.1", + "description": "Open Payments", + "main": "dist/index.js", + "module": "dist/index.modern.js", + "source": "src/Module.js", + "files": [ + "dist" + ], + "scripts": { + "start": "microbundle-crl watch --no-compress --format modern,cjs", + "build": "microbundle-crl --compress --no-sourcemap --format cjs", + "prepublish": "yarn build" + }, + "peerDependencies": { + "react": "17.0.2", + "react-router-dom": "5.3.0" + }, + "dependencies": { + "@egovernments/digit-ui-react-components": "1.8.2-beta.4", + "@egovernments/digit-ui-components": "0.0.2-beta.1", + "react": "17.0.2", + "react-dom": "17.0.2", + "react-i18next": "11.16.2", + "react-query": "3.6.1", + "react-router-dom": "5.3.0", + "jquery": "3.6.0" + }, + "author": "JaganKumar ", + "license": "MIT", + "keywords": [ + + ] +} \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/Module.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/Module.js new file mode 100644 index 000000000..7137d524a --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/Module.js @@ -0,0 +1,93 @@ +import { Loader, TourProvider } from "@egovernments/digit-ui-react-components"; +import React from "react"; +import { useRouteMatch } from "react-router-dom"; +import CitizenApp from "./pages/citizen"; +import { CustomisedHooks } from "./hooks"; +import { UICustomizations } from "./configs/UICustomizations"; +import {ErrorBoundary} from "@egovernments/digit-ui-components" + +const OpenPaymentModule = ({ stateCode, userType, tenants }) => { + + const { path, url } = useRouteMatch(); + const tenantId = Digit.ULBService.getCurrentTenantId(); + const moduleCode = ["openpayment", "common-masters", tenantId]; + const language = Digit.StoreData.getCurrentLanguage(); + const { isLoading, data: store } = Digit.Services.useStore({ + stateCode, + moduleCode, + language, + }); + + if (isLoading) { + return ; + } + return ( + + + + + + ) +}; + +const componentsToRegister = { + // HRMSModule:OpenPaymentModule, + OpenPaymentModule + // DSSCard:OpenPaymentModule +}; + +const overrideHooks = () => { + Object.keys(CustomisedHooks).map((ele) => { + if (ele === "Hooks") { + Object.keys(CustomisedHooks[ele]).map((hook) => { + Object.keys(CustomisedHooks[ele][hook]).map((method) => { + setupHooks(hook, method, CustomisedHooks[ele][hook][method]); + }); + }); + } else if (ele === "Utils") { + Object.keys(CustomisedHooks[ele]).map((hook) => { + Object.keys(CustomisedHooks[ele][hook]).map((method) => { + setupHooks(hook, method, CustomisedHooks[ele][hook][method], false); + }); + }); + } else { + Object.keys(CustomisedHooks[ele]).map((method) => { + setupLibraries(ele, method, CustomisedHooks[ele][method]); + }); + } + }); +}; + +/* To Overide any existing hook we need to use similar method */ +const setupHooks = (HookName, HookFunction, method, isHook = true) => { + window.Digit = window.Digit || {}; + window.Digit[isHook ? "Hooks" : "Utils"] = window.Digit[isHook ? "Hooks" : "Utils"] || {}; + window.Digit[isHook ? "Hooks" : "Utils"][HookName] = window.Digit[isHook ? "Hooks" : "Utils"][HookName] || {}; + window.Digit[isHook ? "Hooks" : "Utils"][HookName][HookFunction] = method; +}; +/* To Overide any existing libraries we need to use similar method */ +const setupLibraries = (Library, service, method) => { + window.Digit = window.Digit || {}; + window.Digit[Library] = window.Digit[Library] || {}; + window.Digit[Library][service] = method; +}; + +/* To Overide any existing config/middlewares we need to use similar method */ +const updateCustomConfigs = () => { + setupLibraries("Customizations", "commonUiConfig", { ...window?.Digit?.Customizations?.commonUiConfig, ...UICustomizations }); + // setupLibraries("Utils", "parsingUtils", { ...window?.Digit?.Utils?.parsingUtils, ...parsingUtils }); +}; + +/** + * The `initOpenPaymentComponents` function initializes OpenPayment components by overriding hooks, updating + * custom configurations, and registering components. + */ +const initOpenPaymentComponents = () => { + overrideHooks(); + updateCustomConfigs(); + Object.entries(componentsToRegister).forEach(([key, value]) => { + Digit.ComponentRegistryService.setComponent(key, value); + }); +}; + +export { initOpenPaymentComponents }; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/components/OpenSearch.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/components/OpenSearch.js new file mode 100644 index 000000000..f9aa55e49 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/components/OpenSearch.js @@ -0,0 +1,81 @@ +import React, { useEffect } from "react"; +import { useTranslation } from "react-i18next"; +import { Header, InboxSearchComposer, Loader } from "@egovernments/digit-ui-react-components"; +import { OpenSearchConfig } from "../configs/OpenSearchConfig"; + +const OpenSearch = () => { + const { t } = useTranslation(); + const queryParams = Digit.Hooks.useQueryParams(); + + //An effect to update configs + useEffect(() => { + if (!queryParams.tenantId) { + // Update configs + OpenSearchConfig.minParametersForSearchForm += 1; + OpenSearchConfig.sections.search.uiConfig.minReqFields += 1; + OpenSearchConfig.sections.search.uiConfig.defaultValues = { + ...OpenSearchConfig.sections.search.uiConfig.defaultValues, + tenantId: "" + }; + OpenSearchConfig.sections.search.uiConfig.fields = [ + ...OpenSearchConfig.sections.search.uiConfig.fields, + { + label: "SELECT_TENANT", + type: "dropdown", + isMandatory: false, + disable: false, + populators: { + name: "tenantId", + optionsKey: "name", + optionsCustomStyle: { top: "2.3rem" }, + mdmsConfig: { + masterName: "tenants", + moduleName: "tenant", + localePrefix: "TENANT", + }, + }, + }, + ]; + } + + if (!queryParams.businessService) { + // Update configs + OpenSearchConfig.minParametersForSearchForm += 1; + OpenSearchConfig.sections.search.uiConfig.minReqFields += 1; + OpenSearchConfig.sections.search.uiConfig.defaultValues = { + ...OpenSearchConfig.sections.search.uiConfig.defaultValues, + businessService: "" + }; + OpenSearchConfig.sections.search.uiConfig.fields = [ + ...OpenSearchConfig.sections.search.uiConfig.fields, + { + label: "SELECT_BS", + type: "dropdown", + isMandatory: false, + disable: false, + populators: { + name: "businessService", + optionsKey: "name", + optionsCustomStyle: { top: "2.3rem" }, + mdmsConfig: { + masterName: "BusinessService", + moduleName: "BillingService", + localePrefix: "BUSINESS_SERV", + }, + }, + }, + ]; + } + }, []); + + return ( + +
{t(OpenSearchConfig?.label)}
+
+ +
+
+ ); +}; + +export default OpenSearch; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/components/OpenView.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/components/OpenView.js new file mode 100644 index 000000000..aaaa39bfa --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/components/OpenView.js @@ -0,0 +1,271 @@ +import { Loader,StatusTable,Row,Card,Header,SubmitBar,ActionBar,Toast } from '@egovernments/digit-ui-react-components'; +import React,{Fragment,useState} from 'react' +import { useTranslation } from "react-i18next"; +import { makePayment } from '../utils/payGov'; +import $ from "jquery"; + +const OpenView = () => { + const { t } = useTranslation(); + const [showToast,setShowToast] = useState(null) + const queryParams = Digit.Hooks.useQueryParams(); + const requestCriteria = { + url:"/billing-service/bill/v2/_fetchbill", + params:queryParams, + body:{}, + options:{ + userService:false, + auth:false + }, + config: { + enabled: !!queryParams.consumerCode && !!queryParams.tenantId && !!queryParams.businessService, + select:(data) => { + return data?.Bill?.[0] + } + }, + } + const { isLoading, data:bill, revalidate,isFetching,error } = Digit.Hooks.useCustomAPIHook(requestCriteria); + + const arrears = + bill?.billDetails + ?.sort((a, b) => b.fromPeriod - a.fromPeriod) + ?.reduce((total, current, index) => (index === 0 ? total : total + current.amount), 0) || 0; + + const onSubmit = async () => { + const filterData = { + Transaction: { + tenantId: bill?.tenantId, + txnAmount: bill.totalAmount, + module: bill.businessService, + billId: bill.id, + consumerCode: bill.consumerCode, + productInfo: "Common Payment", + gateway: "PAYGOV", + taxAndPayments: [ + { + billId: bill.id, + amountPaid: bill.totalAmount, + }, + ], + user: { + name: bill?.payerName, + mobileNumber: bill?.mobileNumber, + tenantId: bill?.tenantId, + emailId: "sriranjan.srivastava@owc.com" + }, + // success + // callbackUrl: `${window.location.protocol}//${window.location.host}/${window.contextPath}/citizen/openpayment/success?consumerCode=${queryParams.consumerCode}&tenantId=${queryParams.tenantId}&businessService=${queryParams.businessService}`, + callbackUrl: `${window.location.protocol}//${window.location.host}/${window.contextPath}/citizen/openpayment/success/${queryParams.businessService}/${queryParams.consumerCode}/${queryParams.tenantId}`, + additionalDetails: { + isWhatsapp: false, + }, + }, + }; + + + try { + + const data = await Digit.PaymentService.createCitizenReciept(bill?.tenantId, filterData); + //dummy response + // const data = { + // "ResponseInfo": { + // "apiId": "Rainmaker", + // "ver": null, + // "ts": null, + // "resMsgId": "uief87324", + // "msgId": "1718644477119|en_IN", + // "status": "SUCCESSFUL" + // }, + // "Transaction": { + // "tenantId": "pb.abianakhurd", + // "txnAmount": "160", + // "billId": "3b27460b-d37e-4e0d-bd51-ed32f12e90e3", + // "module": "WS", + // "consumerCode": "WS/7141/2024-25/0316", + // "taxAndPayments": [ + // { + // "taxAmount": null, + // "amountPaid": 160, + // "billId": "3b27460b-d37e-4e0d-bd51-ed32f12e90e3" + // } + // ], + // "productInfo": "Common Payment", + // "gateway": "PAYGOV", + // "callbackUrl": "http://localhost:3000/mgramseva-web/employee/hrms/success?consumerCode=WS/7141/2024-25/0316&tenantId=pb.abianakhurd&businessService=WS&eg_pg_txnid=PB_PG_2024_06_17_0367_81", + // "txnId": "PB_PG_2024_06_17_0367_81", + // "user": { + // "uuid": "e18c2f5b-6035-4360-885b-dfd28b1159f0", + // "name": "hj", + // "userName": "9379239289", + // "mobileNumber": "9379239289", + // "emailId": null, + // "tenantId": "pb" + // }, + // "redirectUrl": "https://pilot.surepay.ndml.in/SurePayPayment/sp/processRequest?additionalField3=pb.abianakhurd&orderId=PB_PG_2024_06_17_0367_81&additionalField4=WS/7141/2024-25/0316&requestDateTime=17-06-202417:14:078&additionalField5=WSabianakhurd&successUrl=https://mgramseva-uat.psegs.in/pg-service/transaction/v1/_redirect?originalreturnurl=/mgramseva-web/employee/hrms/success?consumerCode=WS/7141/2024-25/0316&tenantId=pb.abianakhurd&businessService=WS&eg_pg_txnid=PB_PG_2024_06_17_0367_81&failUrl=https://mgramseva-uat.psegs.in/pg-service/transaction/v1/_redirect?originalreturnurl=/mgramseva-web/employee/hrms/success?consumerCode=WS/7141/2024-25/0316&tenantId=pb.abianakhurd&businessService=WS&eg_pg_txnid=PB_PG_2024_06_17_0367_81&txURL=https://pilot.surepay.ndml.in/SurePayPayment/sp/processRequest&messageType=0100&merchantId=UATPWSSG0000001429&transactionAmount=160&customerId=e18c2f5b-6035-4360-885b-dfd28b1159f0&checksum=3463857141&additionalField1=9379239289&additionalField2=111111&serviceId=WSabianakhurd¤cyCode=INR", + // "txnStatus": "PENDING", + // "txnStatusMsg": "Transaction initiated", + // "gatewayTxnId": null, + // "gatewayPaymentMode": null, + // "gatewayStatusCode": null, + // "gatewayStatusMsg": null, + // "receipt": null, + // "auditDetails": { + // "createdBy": "d158721b-5c25-421b-8c26-c63cf5d38825", + // "createdTime": 1718644478078, + // "lastModifiedBy": null, + // "lastModifiedTime": null + // }, + // "additionalDetails": { + // "isWhatsapp": false, + // "taxAndPayments": [ + // { + // "taxAmount": null, + // "amountPaid": 160, + // "billId": "3b27460b-d37e-4e0d-bd51-ed32f12e90e3" + // } + // ] + // }, + // "bankTransactionNo": null + // } + // } + const redirectUrl = data?.Transaction?.redirectUrl; + // paygov + try { + const gatewayParam = redirectUrl + ?.split("?") + ?.slice(1) + ?.join("?") + ?.split("&") + ?.reduce((curr, acc) => { + var d = acc.split("="); + curr[d[0]] = d[1]; + return curr; + }, {}); + var newForm = $("
", { + action: gatewayParam.txURL, + method: "POST", + target: "_top", + }); + const orderForNDSLPaymentSite = [ + "checksum", + "messageType", + "merchantId", + "serviceId", + "orderId", + "customerId", + "transactionAmount", + "currencyCode", + "requestDateTime", + "successUrl", + "failUrl", + "additionalField1", + "additionalField2", + "additionalField3", + "additionalField4", + "additionalField5", + ]; + + // override default date for UPYOG Custom pay + gatewayParam["requestDateTime"] = gatewayParam["requestDateTime"]?.split(new Date().getFullYear()).join(`${new Date().getFullYear()} `); + + gatewayParam["successUrl"]= redirectUrl?.split("successUrl=")?.[1]?.split("eg_pg_txnid=")?.[0]+'eg_pg_txnid=' +gatewayParam?.orderId; + gatewayParam["failUrl"]= redirectUrl?.split("failUrl=")?.[1]?.split("eg_pg_txnid=")?.[0]+'eg_pg_txnid=' +gatewayParam?.orderId; + // gatewayParam["successUrl"]= data?.Transaction?.callbackUrl; + // gatewayParam["failUrl"]= data?.Transaction?.callbackUrl; + + // var formdata = new FormData(); + + for (var key of orderForNDSLPaymentSite) { + + // formdata.append(key,gatewayParam[key]); + + newForm.append( + $("", { + name: key, + value: gatewayParam[key], + // type: "hidden", + }) + ); + } + $(document.body).append(newForm); + newForm.submit(); + makePayment(gatewayParam.txURL,newForm); + + } catch (e) { + console.log("Error in payment redirect ", e); + //window.location = redirectionUrl; + } + + // window.location = redirectUrl; + } catch (error) { + let messageToShow = "CS_PAYMENT_UNKNOWN_ERROR_ON_SERVER"; + if (error.response?.data?.Errors?.[0]) { + const { code, message } = error.response?.data?.Errors?.[0]; + messageToShow = code; + } + setShowToast({ key: true, label: t(messageToShow) }); + } + + } + + if(isLoading){ + return + } + return ( + <> + +
{t("OP_PAYMENT_DETAILS")}
+ + + + + + + {/*
*/} + {bill?.billDetails?.[0]?.billAccountDetails + ?.sort((a, b) => a.order - b.order) + .map((amountDetails, index) => ( + + ))} + + {arrears?.toFixed?.(2) ? ( + + ) : null} + +
+ +
+
+ + {/* {displayMenu ? : null} */} + + + {showToast && ( + { + setShowToast(null); + }} + /> + )} + + ) +} + +export default OpenView \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/components/Response.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/components/Response.js new file mode 100644 index 000000000..57377af15 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/components/Response.js @@ -0,0 +1,719 @@ +import { Banner, Card, CardText, Loader, Row, StatusTable, SubmitBar, DownloadPrefixIcon } from "@egovernments/digit-ui-react-components"; +import React, { useEffect, useState } from "react"; +import { useTranslation } from "react-i18next"; +import { useQueryClient } from "react-query"; +import { Link, useParams } from "react-router-dom"; + +export const SuccessfulPayment = (props)=>{ + if(localStorage.getItem("BillPaymentEnabled")!=="true"){ + window.history.forward(); + return null; + } + return +} + +export const convertEpochToDate = (dateEpoch) => { + // Returning NA in else case because new Date(null) returns Current date from calender + if (dateEpoch) { + const dateFromApi = new Date(dateEpoch); + let month = dateFromApi.getMonth() + 1; + let day = dateFromApi.getDate(); + let year = dateFromApi.getFullYear(); + month = (month > 9 ? "" : "0") + month; + day = (day > 9 ? "" : "0") + day; + return `${day}/${month}/${year}`; + } else { + return "NA"; + } +}; + const WrapPaymentComponent = (props) => { + + const { t } = useTranslation(); + const queryClient = useQueryClient(); + const { eg_pg_txnid: egId, workflow: workflw, propertyId } = Digit.Hooks.useQueryParams(); + const [printing, setPrinting] = useState(false); + const [allowFetchBill, setallowFetchBill] = useState(false); + const { businessService: business_service, consumerCode, tenantId } = useParams(); + const { data: bpaData = {}, isLoading: isBpaSearchLoading, isSuccess: isBpaSuccess, error: bpaerror } = Digit.Hooks.obps.useOBPSSearch( + "", {}, tenantId, { applicationNo: consumerCode }, {}, {enabled:(window.location.href.includes("bpa") || window.location.href.includes("BPA"))} + ); + + const { isLoading, data, isError } = Digit.Hooks.usePaymentUpdate({ egId }, business_service, { + retry: false, + staleTime: Infinity, + refetchOnWindowFocus: false, + }); + + const { label } = Digit.Hooks.useApplicationsForBusinessServiceSearch({ businessService: business_service }, { enabled: false }); + + // const { data: demand } = Digit.Hooks.useDemandSearch( + // { consumerCode, businessService: business_service }, + // { enabled: !isLoading, retry: false, staleTime: Infinity, refetchOnWindowFocus: false } + // ); + + // const { data: billData, isLoading: isBillDataLoading } = Digit.Hooks.useFetchPayment( + // { tenantId, consumerCode, businessService: business_service }, + // { enabled: allowFetchBill, retry: false, staleTime: Infinity, refetchOnWindowFocus: false } + // ); + const newTenantId=business_service.includes("WS.ONE_TIME_FEE" || "SW.ONE_TIME_FEE")?Digit.ULBService.getStateId():tenantId; + const { data: reciept_data, isLoading: recieptDataLoading } = Digit.Hooks.useRecieptSearch( + { + tenantId, + businessService: business_service, + receiptNumbers: data?.payments?.Payments?.[0]?.paymentDetails[0].receiptNumber, + }, + { + retry: false, + staleTime: Infinity, + refetchOnWindowFocus: false, + select: (dat) => { + return dat.Payments[0]; + }, + enabled: allowFetchBill, + } + ); + + const { data: generatePdfKey } = Digit.Hooks.useCommonMDMS(newTenantId, "common-masters", "ReceiptKey", { + select: (data) => + data["common-masters"]?.uiCommonPay?.filter(({ code }) => business_service?.includes(code))[0]?.receiptKey || "consolidatedreceipt", + retry: false, + staleTime: Infinity, + refetchOnWindowFocus: false, + }); + + const payments = data?.payments; + + useEffect(() => { + return () => { + localStorage.setItem("BillPaymentEnabled","false") + queryClient.clear(); + }; + }, []); + + useEffect(() => { + if (data && data.txnStatus && data.txnStatus !== "FAILURE") { + setallowFetchBill(true); + } + }, [data]); + + if (isLoading || recieptDataLoading) { + return ; + } + + const applicationNo = data?.applicationNo; + + const isMobile = window.Digit.Utils.browser.isMobile(); + + + if (isError || !payments || !payments.Payments || payments.Payments.length === 0 || data.txnStatus === "FAILURE") { + return ( + + + {t("CS_PAYMENT_FAILURE_MESSAGE")} + {!(business_service?.includes("PT")) ? ( + + + + ) : ( + + + + + {/* {business_service?.includes("PT") &&
+ +
} */} +
+ {t("CORE_COMMON_GO_TO_HOME")} +
+
+ )} +
+ ); + } + + const paymentData = data?.payments?.Payments[0]; + const amount = reciept_data?.paymentDetails?.[0]?.totalAmountPaid; + const transactionDate = paymentData?.transactionDate; + const printCertificate = async () => { + //const tenantId = Digit.ULBService.getCurrentTenantId(); + const state = tenantId; + const applicationDetails = await Digit.TLService.search({ applicationNumber: consumerCode, tenantId }); + const generatePdfKeyForTL = "tlcertificate"; + + if (applicationDetails) { + let response = await Digit.PaymentService.generatePdf(state, { Licenses: applicationDetails?.Licenses }, generatePdfKeyForTL); + const fileStore = await Digit.PaymentService.printReciept(state, { fileStoreIds: response.filestoreIds[0] }); + window.open(fileStore[response.filestoreIds[0]], "_blank"); + } + }; + + const printReciept = async () => { + if (printing) return; + setPrinting(true); + let paymentArray=[]; + const tenantId = paymentData?.tenantId; + const state = Digit.ULBService.getStateId(); + let response = { filestoreIds: [payments.Payments[0]?.fileStoreId] }; + if (!paymentData?.fileStoreId) { + let assessmentYear="",assessmentYearForReceipt=""; + let count=0; + let toDate,fromDate; + if(payments.Payments[0].paymentDetails[0].businessService=="PT"){ + + payments.Payments[0].paymentDetails[0].bill.billDetails.map(element => { + + if(element.amount >0 || element.amountPaid>0) + { count=count+1; + toDate=convertEpochToDate(element.toPeriod).split("/")[2]; + fromDate=convertEpochToDate(element.fromPeriod).split("/")[2]; + assessmentYear=assessmentYear==""?fromDate+"-"+toDate+"(Rs."+element.amountPaid+")":assessmentYear+","+fromDate+"-"+toDate+"(Rs."+element.amountPaid+")"; + assessmentYearForReceipt=fromDate+"-"+toDate; + } + + }); + + if(count==0) + { + let toDate=convertEpochToDate( payments.Payments[0].paymentDetails[0].bill.billDetails[0].toPeriod).split("/")[2]; + let fromDate=convertEpochToDate( payments.Payments[0].paymentDetails[0].bill.billDetails[0].fromPeriod).split("/")[2]; + assessmentYear=assessmentYear==""?fromDate+"-"+toDate:assessmentYear+","+fromDate+"-"+toDate; + assessmentYearForReceipt=fromDate+"-"+toDate; + } + + + + const details = { + "assessmentYears": assessmentYear, + "arrearCode": "" + } + + + payments.Payments[0].paymentDetails[0].additionalDetails=details; + printRecieptNew(payments) + } + else { + let details + + if(payments.Payments[0].paymentDetails[0].businessService=="BPAREG") + { + details = {...payments.Payments[0].additionalDetails, + "stakeholderType":"Application" + } + } + payments.Payments[0].additionalDetails=details; + paymentArray[0]=payments.Payments[0] + console.log("paymentArray",paymentArray) + response = await Digit.PaymentService.generatePdf(state, { Payments: paymentArray }, generatePdfKey); + } + } + const fileStore = await Digit.PaymentService.printReciept(state, { fileStoreIds: response.filestoreIds[0] }); + if (fileStore && fileStore[response.filestoreIds[0]]) { + window.open(fileStore[response.filestoreIds[0]], "_blank"); + } + setPrinting(false); + }; + + const convertDateToEpoch = (dateString, dayStartOrEnd = "dayend") => { + //example input format : "2018-10-02" + try { + const parts = dateString.match(/(\d{4})-(\d{1,2})-(\d{1,2})/); + const DateObj = new Date(Date.UTC(parts[1], parts[2] - 1, parts[3])); + DateObj.setMinutes(DateObj.getMinutes() + DateObj.getTimezoneOffset()); + if (dayStartOrEnd === "dayend") { + DateObj.setHours(DateObj.getHours() + 24); + DateObj.setSeconds(DateObj.getSeconds() - 1); + } + return DateObj.getTime(); + } catch (e) { + return dateString; + } + }; + + const printPdf = (blob) => { + const fileURL = URL.createObjectURL(blob); + var myWindow = window.open(fileURL); + if (myWindow != undefined) { + myWindow.addEventListener("load", (event) => { + myWindow.focus(); + myWindow.print(); + }); + } + }; + + const downloadPdf = (blob, fileName) => { + if (window.mSewaApp && window.mSewaApp.isMsewaApp() && window.mSewaApp.downloadBase64File) { + var reader = new FileReader(); + reader.readAsDataURL(blob); + reader.onloadend = function () { + var base64data = reader.result; + mSewaApp.downloadBase64File(base64data, fileName); + }; + } else { + const link = document.createElement("a"); + // create a blobURI pointing to our Blob + link.href = URL.createObjectURL(blob); + link.download = fileName; + // some browser needs the anchor to be in the doc + document.body.append(link); + link.click(); + link.remove(); + // in case the Blob uses a lot of memory + setTimeout(() => URL.revokeObjectURL(link.href), 7000); + } + }; + + const getPermitOccupancyOrderSearch = async(order, mode="download") => { + let queryObj = { applicationNo: bpaData?.[0]?.applicationNo }; + let bpaResponse = await Digit.OBPSService.BPASearch(bpaData?.[0]?.tenantId, queryObj); + const edcrResponse = await Digit.OBPSService.scrutinyDetails(bpaData?.[0]?.tenantId, { edcrNumber: bpaData?.[0]?.edcrNumber }); + let bpaDataDetails = bpaResponse?.BPA?.[0], edcrData = edcrResponse?.edcrDetail?.[0]; + let currentDate = new Date(); + bpaDataDetails.additionalDetails.runDate = convertDateToEpoch( + currentDate.getFullYear() + "-" + (currentDate.getMonth() + 1) + "-" + currentDate.getDate() + ); + let reqData = { ...bpaDataDetails, edcrDetail: [{ ...edcrData }] }; + console.log("reqData",reqData) + let response = await Digit.PaymentService.generatePdf(bpaDataDetails?.tenantId, { Bpa: [reqData] }, order); + const fileStore = await Digit.PaymentService.printReciept(bpaDataDetails?.tenantId, { fileStoreIds: response.filestoreIds[0] }); + window.open(fileStore[response?.filestoreIds[0]], "_blank"); + + reqData["applicationType"] = bpaDataDetails?.additionalDetails?.applicationType; + let edcrresponse = await Digit.OBPSService.edcr_report_download({ BPA: { ...reqData } }); + const responseStatus = parseInt(edcrresponse.status, 10); + if (responseStatus === 201 || responseStatus === 200) { + mode == "print" + ? printPdf(new Blob([edcrresponse.data], { type: "application/pdf" })) + : downloadPdf(new Blob([edcrresponse.data], { type: "application/pdf" }), `edcrReport.pdf`); + } + }; + + const getBillingPeriod = (billDetails) => { + const { taxPeriodFrom, taxPeriodTo, fromPeriod, toPeriod } = billDetails || {}; + if (taxPeriodFrom && taxPeriodTo) { + let from = new Date(taxPeriodFrom).getFullYear().toString(); + let to = new Date(taxPeriodTo).getFullYear().toString(); + return "FY " + from + "-" + to; + } else if (fromPeriod && toPeriod) { + if (workflw === "mcollect") { + let from = + new Date(fromPeriod).getDate().toString() + + " " + + Digit.Utils.date.monthNames[new Date(fromPeriod).getMonth() ].toString() + + " " + + new Date(fromPeriod).getFullYear().toString(); + let to = + new Date(toPeriod).getDate() + + " " + + Digit.Utils.date.monthNames[new Date(toPeriod).getMonth()] + + " " + + new Date(toPeriod).getFullYear(); + return from + " - " + to; + } + else if(workflw === "WNS") + { + let from = + new Date(fromPeriod).getDate().toString() + + "/" + + (new Date(fromPeriod).getMonth() + 1).toString() + + "/" + + new Date(fromPeriod).getFullYear().toString(); + let to = + new Date(toPeriod).getDate() + + "/" + + (new Date(toPeriod).getMonth() + 1) + + "/" + + new Date(toPeriod).getFullYear(); + return from + " - " + to; + } + let from = new Date(fromPeriod).getFullYear().toString(); + let to = new Date(toPeriod).getFullYear().toString(); + return "FY " + from + "-" + to; + } else return "N/A"; + }; + + let bannerText; + if (workflw) { + bannerText = `CITIZEN_SUCCESS_UC_PAYMENT_MESSAGE`; + } else { + if (paymentData?.paymentDetails?.[0]?.businessService && paymentData?.paymentDetails?.[0]?.businessService?.includes("BPA")) { + let nameOfAchitect = sessionStorage.getItem("BPA_ARCHITECT_NAME"); + let parsedArchitectName = nameOfAchitect ? JSON.parse(nameOfAchitect) : "ARCHITECT"; + bannerText = `CITIZEN_SUCCESS_${paymentData?.paymentDetails[0]?.businessService.replace(/\./g, "_")}_${parsedArchitectName}_PAYMENT_MESSAGE`; + } else if (business_service?.includes("WS") || business_service?.includes("SW")) { + bannerText = t(`CITIZEN_SUCCESS_${paymentData?.paymentDetails[0].businessService.replace(/\./g, "_")}_WS_PAYMENT_MESSAGE`); + } else { + bannerText = paymentData?.paymentDetails[0]?.businessService ? `CITIZEN_SUCCESS_${paymentData?.paymentDetails[0]?.businessService.replace(/\./g, "_")}_PAYMENT_MESSAGE` : t("CITIZEN_SUCCESS_UC_PAYMENT_MESSAGE"); + } + } + + // https://dev.digit.org/collection-services/payments/FSM.TRIP_CHARGES/_search?tenantId=pb.amritsar&consumerCodes=107-FSM-2021-02-18-063433 + + // if (billDataLoading) return ; + + const rowContainerStyle = { + padding: "4px 0px", + justifyContent: "space-between", + }; + //New Payment Reciept For PT module with year bifurcations + + const printRecieptNew = async (payment) => { + console.log("paymentpayment",payment,payment.Payments[0].paymentDetails[0].receiptNumber,payment.Payments[0]) + const tenantId = Digit.ULBService.getCurrentTenantId(); + const state = Digit.ULBService.getStateId(); + let paymentArray=[]; + const payments = await Digit.PaymentService.getReciept(tenantId, "PT", { receiptNumbers: payment.Payments[0].paymentDetails[0].receiptNumber }); + let response = { filestoreIds: [payments.Payments[0]?.fileStoreId] }; + if (true) { + let assessmentYear="",assessmentYearForReceipt=""; + let count=0; + let toDate,fromDate; + if(payments.Payments[0].paymentDetails[0].businessService=="PT"){ + let arrearRow={}; let arrearArray=[]; + let taxRow={}; let taxArray=[]; + + + let roundoff=0,tax=0,firecess=0,cancercess=0,penalty=0,rebate=0,interest=0,usage_exemption=0,special_category_exemption=0,adhoc_penalty=0,adhoc_rebate=0,total=0; + let roundoffT=0,taxT=0,firecessT=0,cancercessT=0,penaltyT=0,rebateT=0,interestT=0,usage_exemptionT=0,special_category_exemptionT=0,adhoc_penaltyT=0,adhoc_rebateT=0,totalT=0; + + + payments.Payments[0].paymentDetails[0].bill.billDetails.map(element => { + + if(element.amount >0 || element.amountPaid>0) + { count=count+1; + toDate=convertEpochToDate(element.toPeriod).split("/")[2]; + fromDate=convertEpochToDate(element.fromPeriod).split("/")[2]; + assessmentYear=assessmentYear==""?fromDate+"-"+toDate+"(Rs."+element.amountPaid+")":assessmentYear+","+fromDate+"-"+toDate+"(Rs."+element.amountPaid+")"; + assessmentYearForReceipt=fromDate+"-"+toDate; + + element.billAccountDetails.map(ele => { + if(ele.taxHeadCode == "PT_TAX") + {tax=ele.adjustedAmount; + taxT=ele.amount} + else if(ele.taxHeadCode == "PT_TIME_REBATE") + {rebate=ele.adjustedAmount; + rebateT=ele.amount;} + else if(ele.taxHeadCode == "PT_CANCER_CESS") + {cancercess=ele.adjustedAmount; + cancercessT=ele.amount;} + else if(ele.taxHeadCode == "PT_FIRE_CESS") + {firecess=ele.adjustedAmount; + firecessT=ele.amount;} + else if(ele.taxHeadCode == "PT_TIME_INTEREST") + {interest=ele.adjustedAmount; + interestT=ele.amount;} + else if(ele.taxHeadCode == "PT_TIME_PENALTY") + {penalty=ele.adjustedAmount; + penaltyT=ele.amount;} + else if(ele.taxHeadCode == "PT_OWNER_EXEMPTION") + {special_category_exemption=ele.adjustedAmount; + special_category_exemptionT=ele.amount;} + else if(ele.taxHeadCode == "PT_ROUNDOFF") + {roundoff=ele.adjustedAmount; + roundoffT=ele.amount;} + else if(ele.taxHeadCode == "PT_UNIT_USAGE_EXEMPTION") + {usage_exemption=ele.adjustedAmount; + usage_exemptionT=ele.amount;} + else if(ele.taxHeadCode == "PT_ADHOC_PENALTY") + {adhoc_penalty=ele.adjustedAmount; + adhoc_penaltyT=ele.amount;} + else if(ele.taxHeadCode == "PT_ADHOC_REBATE") + {adhoc_rebate=ele.adjustedAmount; + adhoc_rebateT=ele.amount;} + + totalT=totalT+ele.amount; + }); + arrearRow={ + "year":assessmentYearForReceipt, + "tax":tax, + "firecess":firecess, + "cancercess":cancercess, + "penalty":penalty, + "rebate": rebate, + "interest":interest, + "usage_exemption":usage_exemption, + "special_category_exemption": special_category_exemption, + "adhoc_penalty":adhoc_penalty, + "adhoc_rebate":adhoc_rebate, + "roundoff":roundoff, + "total":element.amountPaid + }; + taxRow={ + "year":assessmentYearForReceipt, + "tax":taxT, + "firecess":firecessT, + "cancercess":cancercessT, + "penalty":penaltyT, + "rebate": rebateT, + "interest":interestT, + "usage_exemption":usage_exemptionT, + "special_category_exemption": special_category_exemptionT, + "adhoc_penalty":adhoc_penaltyT, + "adhoc_rebate":adhoc_rebateT, + "roundoff":roundoffT, + "total":element.amount + }; + arrearArray.push(arrearRow); + taxArray.push(taxRow); + } + + + }); + + if(count==0) + { + let toDate=convertEpochToDate( payments.Payments[0].paymentDetails[0].bill.billDetails[0].toPeriod).split("/")[2]; + let fromDate=convertEpochToDate( payments.Payments[0].paymentDetails[0].bill.billDetails[0].fromPeriod).split("/")[2]; + assessmentYear=assessmentYear==""?fromDate+"-"+toDate:assessmentYear+","+fromDate+"-"+toDate; + assessmentYearForReceipt=fromDate+"-"+toDate; + + + payloadReceiptDetails.Payments[0].paymentDetails[0].bill.billDetails[0].billAccountDetails.map(ele => { + + if(ele.taxHeadCode == "PT_TAX") + {tax=ele.adjustedAmount; + taxT=ele.amount} + else if(ele.taxHeadCode == "PT_TIME_REBATE") + {rebate=ele.adjustedAmount; + rebateT=ele.amount;} + else if(ele.taxHeadCode == "PT_CANCER_CESS") + {cancercess=ele.adjustedAmount; + cancercessT=ele.amount;} + else if(ele.taxHeadCode == "PT_FIRE_CESS") + {firecess=ele.adjustedAmount; + firecessT=ele.amount;} + else if(ele.taxHeadCode == "PT_TIME_INTEREST") + {interest=ele.adjustedAmount; + interestT=ele.amount;} + else if(ele.taxHeadCode == "PT_TIME_PENALTY") + {penalty=ele.adjustedAmount; + penaltyT=ele.amount;} + else if(ele.taxHeadCode == "PT_OWNER_EXEMPTION") + {special_category_exemption=ele.adjustedAmount; + special_category_exemptionT=ele.amount;} + else if(ele.taxHeadCode == "PT_ROUNDOFF") + {roundoff=ele.adjustedAmount; + roundoffT=ele.amount;} + else if(ele.taxHeadCode == "PT_UNIT_USAGE_EXEMPTION") + {usage_exemption=ele.adjustedAmount; + usage_exemptionT=ele.amount;} + else if(ele.taxHeadCode == "PT_ADHOC_PENALTY") + {adhoc_penalty=ele.adjustedAmount; + adhoc_penaltyT=ele.amount;} + else if(ele.taxHeadCode == "PT_ADHOC_REBATE") + {adhoc_rebate=ele.adjustedAmount; + adhoc_rebateT=ele.amount;} + + total=total+ele.adjustedAmount; + totalT=totalT+ele.amount; + + }); + arrearRow={ + "year":assessmentYearForReceipt, + "tax":tax, + "firecess":firecess, + "cancercess":cancercess, + "penalty":penalty, + "interest":interest, + "usage_exemption":usage_exemption, + "special_category_exemption": special_category_exemption, + "adhoc_penalty":adhoc_penalty, + "adhoc_rebate":adhoc_rebate, + "roundoff":roundoff, + "total": payloadReceiptDetails.Payments[0].paymentDetails[0].bill.billDetails[0].amountPaid + + }; + taxRow={ + "year":assessmentYearForReceipt, + "tax":taxT, + "firecess":firecessT, + "cancercess":cancercessT, + "penalty":penaltyT, + "rebate": rebateT, + "interest":interestT, + "usage_exemption":usage_exemptionT, + "special_category_exemption": special_category_exemptionT, + "adhoc_penalty":adhoc_penaltyT, + "adhoc_rebate":adhoc_rebateT, + "roundoff":roundoffT, + "total": payloadReceiptDetails.Payments[0].paymentDetails[0].bill.billDetails[0].amount + }; + arrearArray.push(arrearRow); + taxArray.push(taxRow); + + } + + const details = { + "assessmentYears": assessmentYear, + "arrearArray":arrearArray, + "taxArray": taxArray + } + payments.Payments[0].paymentDetails[0].additionalDetails=details; + + } + + paymentArray[0]=payments.Payments[0] + console.log("payments",payments) + response = await Digit.PaymentService.generatePdf(state, { Payments: paymentArray }, generatePdfKey); + console.log("responseresponse",response) + } + const fileStore = await Digit.PaymentService.printReciept(state, { fileStoreIds: response.filestoreIds[0] }); + window.open(fileStore[response.filestoreIds[0]], "_blank"); + }; + const ommitRupeeSymbol = ["PT"].includes(business_service); + + if ((window.location.href.includes("bpa") || window.location.href.includes("BPA")) && isBpaSearchLoading) return + + return ( + + + + + } + message={t("CS_COMMON_PAYMENT_COMPLETE")} + info={t("CS_COMMON_RECIEPT_NO")} + applicationNumber={paymentData?.paymentDetails[0].receiptNumber} + successful={true} + /> + {t(`${bannerText}_DETAIL`)} + + + {/** TODO : move this key and value into the hook based on business Service */} + {(business_service === "PT" || workflw) && ( + + )} + + {(business_service === "PT" || workflw) && ( + + )} + + + + {(business_service !== "PT" || workflw) && ( + + )} + +
+ {business_service == "TL" ? ( +
+ + + + + {t("TL_RECEIPT")} +
+ ) : null} + {business_service == "TL" ? ( +
+ + + + + {t("TL_CERTIFICATE")} +
+ ) : null} + {bpaData?.[0]?.businessService === "BPA_OC" && (bpaData?.[0]?.status==="APPROVED" || bpaData?.[0]?.status==="PENDING_SANC_FEE_PAYMENT") ? ( +
getPermitOccupancyOrderSearch("occupancy-certificate")}> + + {t("BPA_OC_CERTIFICATE")} +
+ ) : null} + {bpaData?.[0]?.businessService === "BPA_LOW" ? ( +
getPermitOccupancyOrderSearch("buildingpermit-low")}> + + {t("BPA_PERMIT_ORDER")} +
+ ) : null} + {bpaData?.[0]?.businessService === "BPA" && (bpaData?.[0]?.businessService !== "BPA_LOW") && (bpaData?.[0]?.businessService !== "BPA_OC") && (bpaData?.[0]?.status==="PENDING_SANC_FEE_PAYMENT" || bpaData?.[0]?.status==="APPROVED")? ( +
getPermitOccupancyOrderSearch("buildingpermit")}> + + {t("BPA_PERMIT_ORDER")} +
+ ) : null} +
+ {business_service?.includes("PT") &&
+ +
} + {business_service?.includes("PT") ? ( +
+ {t("CS_DOWNLOAD_RECEIPT")} +
+ ) : null} + {business_service?.includes("WS") ? ( +
+ {t("CS_DOWNLOAD_RECEIPT")} +
+ ) : null} + {business_service?.includes("SW") ? ( +
+ {t("CS_DOWNLOAD_RECEIPT")} +
+ ) : null} + {business_service?.includes("FSM") ? ( +
+ {t("CS_DOWNLOAD_RECEIPT")} +
+ ) : null} + {business_service?.includes("BPA") ? ( +
+ {t("CS_DOWNLOAD_RECEIPT")} +
+ ) : null} + {!(business_service == "TL") || !(business_service?.includes("PT")) && } + {!(business_service == "TL") || !(business_service?.includes("PT")) && ( +
+ {t("CORE_COMMON_GO_TO_HOME")} +
+ )} + {business_service == "TL" && ( + + + + )} +
+ ); +}; + +export const FailedPayment = (props) => { + // const { addParams, clearParams } = props; + const { t } = useTranslation(); + // const { consumerCode } = useParams(); + const {consumerCode} = Digit.Hooks.useQueryParams(); + const getMessage = () => "Failure !"; + return ( + + + {t("ES_COMMON_TRACK_COMPLAINT_TEXT")} + + ); +}; + diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/configs/OpenSearchConfig.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/configs/OpenSearchConfig.js new file mode 100644 index 000000000..a3fc3aaec --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/configs/OpenSearchConfig.js @@ -0,0 +1,124 @@ +export const OpenSearchConfig = { + "label": "OPEN_PAYMENT_SEARCH", + "type": "search", + "apiDetails": { + "serviceName": "/billing-service/bill/v2/_fetchbill", + "requestParam": {}, + "requestBody": {}, + "minParametersForSearchForm": 1, + "masterName": "commonUiConfig", + "moduleName": "OpenPaymentSearch", + "tableFormJsonPath": "requestBody.pagination", + "filterFormJsonPath": "requestBody.custom", + "searchFormJsonPath": "requestBody.custom" + }, + "sections": { + "search": { + "uiConfig": { + "type":"search", + "headerLabel": "OPEN_PAYMENT_SEARCH", + "headerStyle": null, + "primaryLabel": "ES_COMMON_SEARCH", + "secondaryLabel": "ES_COMMON_CLEAR_SEARCH", + "minReqFields": 1, + // "showFormInstruction": "OPEN_PAYMENT_SEARCH_HINT", + "defaultValues": { + "consumerCode": "" + }, + "fields": [ + { + "label": "CONNECTION_ID", + "type": "text", + "isMandatory": false, + "disable": false, + "populators": { + "name": "consumerCode", + "style":{ + "marginBottom":"0px" + } + }, + }, + ] + }, + "label": "", + "children": {}, + "show": true + }, + "searchResult": { + "uiConfig": { + "columns": [ + { + "label": "OP_CONS_CODE", + "jsonPath": "consumerCode", + "additionalCustomization": true + }, + { + "label": "OP_BILL_NUM", + "jsonPath": "billNumber", + // "additionalCustomization": true + }, + { + "label": "OP_PAYER_NAME", + "jsonPath": "payerName", + // "additionalCustomization": true + }, + { + "label": "OP_MOB_NO", + "jsonPath": "mobileNumber", + // "additionalCustomization": true + }, + { + "label": "OP_BILL_DATE", + "jsonPath": "billDate", + "additionalCustomization": true + }, + { + "label": "OP_BILL_TOTAL_AMT", + "jsonPath": "totalAmount", + "additionalCustomization": true + }, + // { + // "label": "TQM_PLANT", + // "jsonPath": "plantCode", + // "additionalCustomization": false, + // "prefix": "PQM.PLANT_", + // "translate": true + // }, + // { + // "label": "TQM_TREATMENT_PROCESS", + // "jsonPath": "processCode", + // "additionalCustomization": false, + // "prefix": "PQM.Process_", + // "translate": true + // }, + // { + // "label": "TQM_TEST_TYPE", + // "jsonPath": "testType", + // "additionalCustomization": false, + // "prefix": "PQM.TestType_", + // "translate": true + // }, + // { + // "label": "ES_TQM_TEST_DATE", + // "jsonPath": "auditDetails.lastModifiedTime", + // "additionalCustomization": true + // }, + // { + // "label": "TQM_TEST_RESULTS", + // "jsonPath": "status", + // "additionalCustomization": true + // } + ], + // "showActionBarMobileCard": true, + // "actionButtonLabelMobileCard": "TQM_VIEW_RESULTS", + "enableGlobalSearch": false, + "enableColumnSort": true, + "resultsJsonPath": "Bill", + "tableClassName":"table pqm-table" + }, + "children": {}, + "show": true + } + }, + "additionalSections": {} +} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/configs/UICustomizations.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/configs/UICustomizations.js new file mode 100644 index 000000000..056eb22e4 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/configs/UICustomizations.js @@ -0,0 +1,78 @@ +import { Link, useHistory } from "react-router-dom"; +import _ from "lodash"; +import React from "react"; + +export const UICustomizations = { + OpenPaymentSearch:{ + preProcess: (data, additionalDetails) => { + + //we need to get three things -> consumerCode,businessService,tenantId + // businessService and tenantId can be either in queryParams or in form + let {consumerCode,businessService,tenantId} = data?.state?.searchForm || {}; + businessService = businessService?.code + tenantId = tenantId?.code + if(!businessService){ + businessService = additionalDetails?.queryParams?.businessService + } + if(!tenantId){ + tenantId = additionalDetails?.queryParams?.tenantId + } + const finalParams = { + consumerCode, + tenantId, + businessService + } + data.params = finalParams + console.log(data); + // const tenantId = Digit.ULBService.getCurrentTenantId(); + // data.body = { RequestInfo: data.body.RequestInfo }; + // const { limit, offset } = data?.state?.tableForm || {}; + // const { campaignName, campaignType } = data?.state?.searchForm || {}; + // data.body.CampaignDetails = { + // tenantId: tenantId, + // status: ["failed"], + // createdBy: Digit.UserService.getUser().info.uuid, + // pagination: { + // sortBy: "createdTime", + // sortOrder: "desc", + // limit: limit, + // offset: offset, + // }, + // }; + // if (campaignName) { + // data.body.CampaignDetails.campaignName = campaignName; + // } + // if (campaignType) { + // data.body.CampaignDetails.projectType = campaignType?.[0]?.code; + // } + delete data.body.custom; + delete data.body.pagination; + data.options = { + userService:false, + auth:false + } + // delete data.body.inbox; + // delete data.params; + return data; + }, + additionalCustomizations: (row, key, column, value, t, searchResult) => { + if (key === "OP_BILL_DATE") { + return Digit.DateUtils.ConvertEpochToDate(value); + } + + if(key === "OP_BILL_TOTAL_AMT"){ + return {`₹ ${value}`} + } + + if(key === "OP_CONS_CODE") { + return + + {String(value ? (column.translate ? t(column.prefix ? `${column.prefix}${value}` : value) : value) : t("ES_COMMON_NA"))} + + + } + }, + } +}; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/hooks/index.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/hooks/index.js new file mode 100644 index 000000000..fb518536d --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/hooks/index.js @@ -0,0 +1,23 @@ +import utils from "../utils"; + +const openpayment = { + +}; + +const Hooks = { + openpayment, +}; + +const Utils = { + browser: { + sample: () => {}, + }, + openpayment:{ + ...utils + } +}; + +export const CustomisedHooks = { + Hooks, + Utils, +}; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/pages/citizen/index.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/pages/citizen/index.js new file mode 100644 index 000000000..a202a56d4 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/pages/citizen/index.js @@ -0,0 +1,34 @@ +import React, { useEffect } from "react"; +import { Switch, useLocation,Route } from "react-router-dom"; +import { useTranslation } from "react-i18next"; +import { PrivateRoute, AppContainer, BreadCrumb,BackButton } from "@egovernments/digit-ui-react-components"; +import OpenSearch from "../../components/OpenSearch"; +import OpenView from "../../components/OpenView"; +import { SuccessfulPayment,FailedPayment } from "../../components/Response"; + + +const CitizenApp = ({ path }) => { + const { t } = useTranslation(); + const location = useLocation(); + const commonProps = { stateCode:"pb", cityCode:"pb.abianakhurd", moduleCode:"WS" }; + return ( + +
+ {!location.pathname.includes("response") && {t("CS_COMMON_BACK")}} + +
In Open Payment Module
} /> + } /> + } /> + + + + + + +
+
+
+ ); +}; + +export default CitizenApp; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/utils/index.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/utils/index.js new file mode 100644 index 000000000..aed14ad04 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/utils/index.js @@ -0,0 +1,2 @@ +export const PRIMARY_COLOR = "#C84C0E"; +export default {} \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/utils/payGov.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/utils/payGov.js new file mode 100644 index 000000000..00f2d0339 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/utils/payGov.js @@ -0,0 +1,18 @@ +export const makePayment =async(url,data)=>{ + var myHeaders = new Headers(); +myHeaders.append("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9"); +myHeaders.append("Access-Control-Allow-Origin", "*"); + +var requestOptions = { +method: 'POST', +headers: myHeaders, +body: data, +"mode": "no-cors", +redirect: 'follow' +}; + +fetch(url, requestOptions) +.then(response => response.text()) +.then(result => console.log(result)) +.catch(error => console.log('error', error)); +} \ No newline at end of file From f45846e741cbc528448ffea4e7cab62a13316f6b Mon Sep 17 00:00:00 2001 From: Nipun Arora Date: Tue, 18 Jun 2024 18:05:54 +0530 Subject: [PATCH 039/118] enabled openpayment module --- frontend/micro-ui/web/micro-ui-internals/example/package.json | 1 + frontend/micro-ui/web/micro-ui-internals/example/src/index.js | 4 +++- frontend/micro-ui/web/package.json | 1 + frontend/micro-ui/web/src/App.js | 3 +++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/example/package.json b/frontend/micro-ui/web/micro-ui-internals/example/package.json index ea63ba6af..e31110022 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/package.json +++ b/frontend/micro-ui/web/micro-ui-internals/example/package.json @@ -14,6 +14,7 @@ "@egovernments/digit-ui-module-core": "1.5.46", "@egovernments/digit-ui-module-hrms": "1.5.27", "@egovernments/digit-ui-module-pgr": "1.7.0", + "@egovernments/digit-ui-module-open-payment":"0.0.1", "@egovernments/digit-ui-module-engagement": "1.5.20", "@egovernments/digit-ui-react-components": "1.5.26", "http-proxy-middleware": "^1.0.5", diff --git a/frontend/micro-ui/web/micro-ui-internals/example/src/index.js b/frontend/micro-ui/web/micro-ui-internals/example/src/index.js index 6d380a9c9..613ff03f3 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/src/index.js +++ b/frontend/micro-ui/web/micro-ui-internals/example/src/index.js @@ -7,6 +7,7 @@ import { initDSSComponents } from "@egovernments/digit-ui-module-dss"; import { initEngagementComponents } from "@egovernments/digit-ui-module-engagement"; import { initHRMSComponents } from "@egovernments/digit-ui-module-hrms"; import { initPGRComponents, PGRReducers } from "@egovernments/digit-ui-module-pgr"; +import {initOpenPaymentComponents} from "@egovernments/digit-ui-module-open-payment"; import "@egovernments/digit-ui-css/example/index.css"; import { pgrCustomizations } from "./pgr"; @@ -18,7 +19,7 @@ const enabledModules = [ "DSS", "HRMS", "PGR", - + "OpenPayment" // "Engagement", "NDSS","QuickPayLinks", "Payment", // "Utilities", //added to check fsm @@ -64,6 +65,7 @@ const initDigitUI = () => { initHRMSComponents(); initEngagementComponents(); initPGRComponents(); + initOpenPaymentComponents(); const moduleReducers = (initData) => ({ pgr: PGRReducers(initData), diff --git a/frontend/micro-ui/web/package.json b/frontend/micro-ui/web/package.json index 038d7fd10..2f2b6a839 100644 --- a/frontend/micro-ui/web/package.json +++ b/frontend/micro-ui/web/package.json @@ -22,6 +22,7 @@ "@egovernments/digit-ui-module-hrms": "1.5.27", "@egovernments/digit-ui-module-pgr": "1.7.0", "@egovernments/digit-ui-module-engagement": "1.5.20", + "@egovernments/digit-ui-module-open-payment":"0.0.1", "@egovernments/digit-ui-react-components": "1.5.26", "babel-loader": "8.1.0", "clean-webpack-plugin": "4.0.0", diff --git a/frontend/micro-ui/web/src/App.js b/frontend/micro-ui/web/src/App.js index d5aa1a95c..baa0e194c 100644 --- a/frontend/micro-ui/web/src/App.js +++ b/frontend/micro-ui/web/src/App.js @@ -5,6 +5,7 @@ import { DigitUI } from "@egovernments/digit-ui-module-core"; import { UICustomizations } from "./Customisations/UICustomizations"; import { initDSSComponents } from "@egovernments/digit-ui-module-dss"; import { initEngagementComponents } from "@egovernments/digit-ui-module-engagement"; +import {initOpenPaymentComponents} from "@egovernments/digit-ui-module-open-payment"; import { initPGRComponents, PGRReducers, @@ -20,6 +21,7 @@ const enabledModules = [ "HRMS", "Engagement", "PGR", + "OpenPayment" ]; const moduleReducers = (initData) => ({ @@ -36,6 +38,7 @@ const initDigitUI = () => { initDSSComponents(); initEngagementComponents(); initPGRComponents(); + initOpenPaymentComponents(); }; initLibraries().then(() => { From b4322bf6a96039a6aae07adfdaf7e72bd9285afc Mon Sep 17 00:00:00 2001 From: Nipun Arora Date: Wed, 19 Jun 2024 10:34:01 +0530 Subject: [PATCH 040/118] updates for open payment module --- .../example/devpackage.json | 1 + .../example/src/UICustomizations.js | 72 +++++++++++++++++++ .../libraries/src/hooks/useCustomAPIHook.js | 4 +- .../src/services/atoms/Utils/Request.js | 4 +- .../src/services/elements/CustomService.js | 4 +- .../src/Customisations/UICustomizations.js | 72 +++++++++++++++++++ 6 files changed, 151 insertions(+), 6 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/example/devpackage.json b/frontend/micro-ui/web/micro-ui-internals/example/devpackage.json index 625090509..955e1ca98 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/devpackage.json +++ b/frontend/micro-ui/web/micro-ui-internals/example/devpackage.json @@ -12,6 +12,7 @@ "@egovernments/digit-ui-libraries":"^1.4.0", "@egovernments/digit-ui-module-common":"^1.4.0", "@egovernments/digit-ui-module-engagement":"^1.4.0", + "@egovernments/digit-ui-module-open-payment":"0.0.1", "@egovernments/digit-ui-module-fsm":"^1.4.0", "@egovernments/digit-ui-module-mcollect":"^1.4.0", "@egovernments/digit-ui-module-noc":"^1.4.0", diff --git a/frontend/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js b/frontend/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js index 6d17ab0d5..fc9a9ff1c 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js +++ b/frontend/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js @@ -425,4 +425,76 @@ export const UICustomizations = { } } }, + OpenPaymentSearch:{ + preProcess: (data, additionalDetails) => { + + //we need to get three things -> consumerCode,businessService,tenantId + // businessService and tenantId can be either in queryParams or in form + let {consumerCode,businessService,tenantId} = data?.state?.searchForm || {}; + businessService = businessService?.code + tenantId = tenantId?.code + if(!businessService){ + businessService = additionalDetails?.queryParams?.businessService + } + if(!tenantId){ + tenantId = additionalDetails?.queryParams?.tenantId + } + const finalParams = { + consumerCode, + tenantId, + businessService + } + data.params = finalParams + console.log(data); + // const tenantId = Digit.ULBService.getCurrentTenantId(); + // data.body = { RequestInfo: data.body.RequestInfo }; + // const { limit, offset } = data?.state?.tableForm || {}; + // const { campaignName, campaignType } = data?.state?.searchForm || {}; + // data.body.CampaignDetails = { + // tenantId: tenantId, + // status: ["failed"], + // createdBy: Digit.UserService.getUser().info.uuid, + // pagination: { + // sortBy: "createdTime", + // sortOrder: "desc", + // limit: limit, + // offset: offset, + // }, + // }; + // if (campaignName) { + // data.body.CampaignDetails.campaignName = campaignName; + // } + // if (campaignType) { + // data.body.CampaignDetails.projectType = campaignType?.[0]?.code; + // } + delete data.body.custom; + delete data.body.pagination; + data.options = { + userService:false, + auth:false + } + // delete data.body.inbox; + // delete data.params; + return data; + }, + additionalCustomizations: (row, key, column, value, t, searchResult) => { + if (key === "OP_BILL_DATE") { + return Digit.DateUtils.ConvertEpochToDate(value); + } + + if(key === "OP_BILL_TOTAL_AMT"){ + return {`₹ ${value}`} + } + + if(key === "OP_CONS_CODE") { + return + + {String(value ? (column.translate ? t(column.prefix ? `${column.prefix}${value}` : value) : value) : t("ES_COMMON_NA"))} + + + } + }, + } }; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useCustomAPIHook.js b/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useCustomAPIHook.js index a9a6273e4..40faadcf0 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useCustomAPIHook.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useCustomAPIHook.js @@ -30,12 +30,12 @@ import { CustomService } from "../services/elements/CustomService"; */ -const useCustomAPIHook = ({ url, params, body, config = {}, plainAccessRequest,changeQueryName="Random" }) => { +const useCustomAPIHook = ({ url, params, body, config = {}, plainAccessRequest,changeQueryName="Random",options={} }) => { const client = useQueryClient(); const { isLoading, data, isFetching } = useQuery( [url,changeQueryName].filter((e) => e), - () => CustomService.getResponse({ url, params, body, plainAccessRequest }), + () => CustomService.getResponse({ url, params, body, plainAccessRequest,...options }), { cacheTime:0, ...config, diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/Utils/Request.js b/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/Utils/Request.js index f8e6bd630..cbace88a2 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/Utils/Request.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/Utils/Request.js @@ -56,7 +56,7 @@ export const Request = async ({ headers = {}, useCache = false, params = {}, - auth, + auth=true, urlParams = {}, userService, locale = true, @@ -74,7 +74,7 @@ export const Request = async ({ data.RequestInfo = { apiId: "Rainmaker", }; - if (auth || !!Digit.UserService.getUser()?.access_token) { + if (auth) { data.RequestInfo = { ...data.RequestInfo, ...requestInfo() }; } if (userService) { diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/CustomService.js b/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/CustomService.js index 58c7ae673..053ca9e97 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/CustomService.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/CustomService.js @@ -1,14 +1,14 @@ import { Request } from "../atoms/Utils/Request"; export const CustomService = { - getResponse: ({ url, params, body, plainAccessRequest,useCache=true,userService=true,setTimeParam=true ,userDownload=false}) => + getResponse: ({ url, params, body, plainAccessRequest,useCache=true,userService=true,setTimeParam=true,userDownload=false,auth=true}) => Request({ url: url, data: body, useCache, userService, method: "POST", - auth: true, + auth: auth, params: params, plainAccessRequest: plainAccessRequest, userDownload:userDownload, diff --git a/frontend/micro-ui/web/src/Customisations/UICustomizations.js b/frontend/micro-ui/web/src/Customisations/UICustomizations.js index 6d17ab0d5..fc9a9ff1c 100644 --- a/frontend/micro-ui/web/src/Customisations/UICustomizations.js +++ b/frontend/micro-ui/web/src/Customisations/UICustomizations.js @@ -425,4 +425,76 @@ export const UICustomizations = { } } }, + OpenPaymentSearch:{ + preProcess: (data, additionalDetails) => { + + //we need to get three things -> consumerCode,businessService,tenantId + // businessService and tenantId can be either in queryParams or in form + let {consumerCode,businessService,tenantId} = data?.state?.searchForm || {}; + businessService = businessService?.code + tenantId = tenantId?.code + if(!businessService){ + businessService = additionalDetails?.queryParams?.businessService + } + if(!tenantId){ + tenantId = additionalDetails?.queryParams?.tenantId + } + const finalParams = { + consumerCode, + tenantId, + businessService + } + data.params = finalParams + console.log(data); + // const tenantId = Digit.ULBService.getCurrentTenantId(); + // data.body = { RequestInfo: data.body.RequestInfo }; + // const { limit, offset } = data?.state?.tableForm || {}; + // const { campaignName, campaignType } = data?.state?.searchForm || {}; + // data.body.CampaignDetails = { + // tenantId: tenantId, + // status: ["failed"], + // createdBy: Digit.UserService.getUser().info.uuid, + // pagination: { + // sortBy: "createdTime", + // sortOrder: "desc", + // limit: limit, + // offset: offset, + // }, + // }; + // if (campaignName) { + // data.body.CampaignDetails.campaignName = campaignName; + // } + // if (campaignType) { + // data.body.CampaignDetails.projectType = campaignType?.[0]?.code; + // } + delete data.body.custom; + delete data.body.pagination; + data.options = { + userService:false, + auth:false + } + // delete data.body.inbox; + // delete data.params; + return data; + }, + additionalCustomizations: (row, key, column, value, t, searchResult) => { + if (key === "OP_BILL_DATE") { + return Digit.DateUtils.ConvertEpochToDate(value); + } + + if(key === "OP_BILL_TOTAL_AMT"){ + return {`₹ ${value}`} + } + + if(key === "OP_CONS_CODE") { + return + + {String(value ? (column.translate ? t(column.prefix ? `${column.prefix}${value}` : value) : value) : t("ES_COMMON_NA"))} + + + } + }, + } }; From 433cf41b4a61a57db1acf04ff0955a8d4dd438e2 Mon Sep 17 00:00:00 2001 From: Nipun Arora Date: Mon, 24 Jun 2024 23:32:33 +0530 Subject: [PATCH 041/118] added payment module in mgramseva code --- .../web/micro-ui-internals/example/devpackage.json | 2 +- .../web/micro-ui-internals/example/package.json | 2 +- .../example/src/UICustomizations.js | 2 +- .../web/micro-ui-internals/example/src/index.js | 6 +++--- .../micro-ui/web/micro-ui-internals/package.json | 4 ++-- .../packages/modules/core/src/pages/citizen/index.js | 1 + .../modules/{open-payment => payment}/package.json | 2 +- .../modules/{open-payment => payment}/src/Module.js | 12 +++++------- .../src/components/OpenSearch.js | 0 .../src/components/OpenView.js | 3 ++- .../src/components/Response.js | 0 .../src/configs/OpenSearchConfig.js | 0 .../src/configs/UICustomizations.js | 2 +- .../{open-payment => payment}/src/hooks/index.js | 6 +++--- .../src/pages/citizen/index.js | 5 ++++- .../{open-payment => payment}/src/utils/index.js | 0 .../{open-payment => payment}/src/utils/payGov.js | 0 frontend/micro-ui/web/package.json | 2 +- frontend/micro-ui/web/src/App.js | 6 +++--- .../web/src/Customisations/UICustomizations.js | 2 +- 20 files changed, 30 insertions(+), 27 deletions(-) rename frontend/micro-ui/web/micro-ui-internals/packages/modules/{open-payment => payment}/package.json (93%) rename frontend/micro-ui/web/micro-ui-internals/packages/modules/{open-payment => payment}/src/Module.js (90%) rename frontend/micro-ui/web/micro-ui-internals/packages/modules/{open-payment => payment}/src/components/OpenSearch.js (100%) rename frontend/micro-ui/web/micro-ui-internals/packages/modules/{open-payment => payment}/src/components/OpenView.js (98%) rename frontend/micro-ui/web/micro-ui-internals/packages/modules/{open-payment => payment}/src/components/Response.js (100%) rename frontend/micro-ui/web/micro-ui-internals/packages/modules/{open-payment => payment}/src/configs/OpenSearchConfig.js (100%) rename frontend/micro-ui/web/micro-ui-internals/packages/modules/{open-payment => payment}/src/configs/UICustomizations.js (93%) rename frontend/micro-ui/web/micro-ui-internals/packages/modules/{open-payment => payment}/src/hooks/index.js (78%) rename frontend/micro-ui/web/micro-ui-internals/packages/modules/{open-payment => payment}/src/pages/citizen/index.js (92%) rename frontend/micro-ui/web/micro-ui-internals/packages/modules/{open-payment => payment}/src/utils/index.js (100%) rename frontend/micro-ui/web/micro-ui-internals/packages/modules/{open-payment => payment}/src/utils/payGov.js (100%) diff --git a/frontend/micro-ui/web/micro-ui-internals/example/devpackage.json b/frontend/micro-ui/web/micro-ui-internals/example/devpackage.json index 955e1ca98..395aa9ecd 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/devpackage.json +++ b/frontend/micro-ui/web/micro-ui-internals/example/devpackage.json @@ -12,7 +12,7 @@ "@egovernments/digit-ui-libraries":"^1.4.0", "@egovernments/digit-ui-module-common":"^1.4.0", "@egovernments/digit-ui-module-engagement":"^1.4.0", - "@egovernments/digit-ui-module-open-payment":"0.0.1", + "@egovernments/digit-ui-module-payment":"0.0.1", "@egovernments/digit-ui-module-fsm":"^1.4.0", "@egovernments/digit-ui-module-mcollect":"^1.4.0", "@egovernments/digit-ui-module-noc":"^1.4.0", diff --git a/frontend/micro-ui/web/micro-ui-internals/example/package.json b/frontend/micro-ui/web/micro-ui-internals/example/package.json index e31110022..c41dd5f26 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/package.json +++ b/frontend/micro-ui/web/micro-ui-internals/example/package.json @@ -14,7 +14,7 @@ "@egovernments/digit-ui-module-core": "1.5.46", "@egovernments/digit-ui-module-hrms": "1.5.27", "@egovernments/digit-ui-module-pgr": "1.7.0", - "@egovernments/digit-ui-module-open-payment":"0.0.1", + "@egovernments/digit-ui-module-payment":"0.0.1", "@egovernments/digit-ui-module-engagement": "1.5.20", "@egovernments/digit-ui-react-components": "1.5.26", "http-proxy-middleware": "^1.0.5", diff --git a/frontend/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js b/frontend/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js index fc9a9ff1c..c36821e66 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js +++ b/frontend/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js @@ -489,7 +489,7 @@ export const UICustomizations = { if(key === "OP_CONS_CODE") { return {String(value ? (column.translate ? t(column.prefix ? `${column.prefix}${value}` : value) : value) : t("ES_COMMON_NA"))} diff --git a/frontend/micro-ui/web/micro-ui-internals/example/src/index.js b/frontend/micro-ui/web/micro-ui-internals/example/src/index.js index 613ff03f3..6a520e8a0 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/src/index.js +++ b/frontend/micro-ui/web/micro-ui-internals/example/src/index.js @@ -7,7 +7,7 @@ import { initDSSComponents } from "@egovernments/digit-ui-module-dss"; import { initEngagementComponents } from "@egovernments/digit-ui-module-engagement"; import { initHRMSComponents } from "@egovernments/digit-ui-module-hrms"; import { initPGRComponents, PGRReducers } from "@egovernments/digit-ui-module-pgr"; -import {initOpenPaymentComponents} from "@egovernments/digit-ui-module-open-payment"; +import {initPaymentComponents} from "@egovernments/digit-ui-module-payment"; import "@egovernments/digit-ui-css/example/index.css"; import { pgrCustomizations } from "./pgr"; @@ -19,7 +19,7 @@ const enabledModules = [ "DSS", "HRMS", "PGR", - "OpenPayment" + "Payment" // "Engagement", "NDSS","QuickPayLinks", "Payment", // "Utilities", //added to check fsm @@ -65,7 +65,7 @@ const initDigitUI = () => { initHRMSComponents(); initEngagementComponents(); initPGRComponents(); - initOpenPaymentComponents(); + initPaymentComponents(); const moduleReducers = (initData) => ({ pgr: PGRReducers(initData), diff --git a/frontend/micro-ui/web/micro-ui-internals/package.json b/frontend/micro-ui/web/micro-ui-internals/package.json index 9b27da95d..2f6b4f69d 100644 --- a/frontend/micro-ui/web/micro-ui-internals/package.json +++ b/frontend/micro-ui/web/micro-ui-internals/package.json @@ -26,7 +26,7 @@ "dev:components": "cd packages/react-components && yarn start", "dev:pgr": "cd packages/modules/pgr && yarn start", "dev:hrms": "cd packages/modules/hrms && yarn start", - "dev:openpayment": "cd packages/modules/open-payment && yarn start", + "dev:payment": "cd packages/modules/payment && yarn start", "dev:core": "cd packages/modules/core && yarn start", "dev:example": "cd example && yarn start", "build": "run-p build:**", @@ -36,7 +36,7 @@ "build:pgr": "cd packages/modules/pgr && yarn build", "build:hrms": "cd packages/modules/hrms && yarn build", "build:core": "cd packages/modules/core && yarn build", - "build:openpayment": "cd packages/modules/open-payment && yarn build", + "build:payment": "cd packages/modules/payment && yarn build", "build:sample": "cd packages/modules/sample && yarn build", "deploy:jenkins": "./scripts/jenkins.sh", "clean": "rm -rf node_modules" diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/index.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/index.js index ac66a2ceb..a3c54a261 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/index.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/index.js @@ -23,6 +23,7 @@ const sidebarHiddenFor = [ `/${window?.contextPath}/citizen/select-location`, `/${window?.contextPath}/citizen/login`, `/${window?.contextPath}/citizen/register/otp`, + `/citizen/payment/`, ]; const getTenants = (codes, tenants) => { diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/package.json b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json similarity index 93% rename from frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/package.json rename to frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json index ceeb6a03a..b65e0dccc 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/package.json +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json @@ -1,5 +1,5 @@ { - "name": "@egovernments/digit-ui-module-open-payment", + "name": "@egovernments/digit-ui-module-payment", "version": "0.0.1", "description": "Open Payments", "main": "dist/index.js", diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/Module.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/Module.js similarity index 90% rename from frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/Module.js rename to frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/Module.js index 7137d524a..3b5df7df4 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/Module.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/Module.js @@ -6,7 +6,7 @@ import { CustomisedHooks } from "./hooks"; import { UICustomizations } from "./configs/UICustomizations"; import {ErrorBoundary} from "@egovernments/digit-ui-components" -const OpenPaymentModule = ({ stateCode, userType, tenants }) => { +const PaymentModule = ({ stateCode, userType, tenants }) => { const { path, url } = useRouteMatch(); const tenantId = Digit.ULBService.getCurrentTenantId(); @@ -31,9 +31,7 @@ const OpenPaymentModule = ({ stateCode, userType, tenants }) => { }; const componentsToRegister = { - // HRMSModule:OpenPaymentModule, - OpenPaymentModule - // DSSCard:OpenPaymentModule + PaymentModule }; const overrideHooks = () => { @@ -79,10 +77,10 @@ const updateCustomConfigs = () => { }; /** - * The `initOpenPaymentComponents` function initializes OpenPayment components by overriding hooks, updating + * The `initPaymentComponents` function initializes OpenPayment components by overriding hooks, updating * custom configurations, and registering components. */ -const initOpenPaymentComponents = () => { +const initPaymentComponents = () => { overrideHooks(); updateCustomConfigs(); Object.entries(componentsToRegister).forEach(([key, value]) => { @@ -90,4 +88,4 @@ const initOpenPaymentComponents = () => { }); }; -export { initOpenPaymentComponents }; +export { initPaymentComponents }; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/components/OpenSearch.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenSearch.js similarity index 100% rename from frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/components/OpenSearch.js rename to frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenSearch.js diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/components/OpenView.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js similarity index 98% rename from frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/components/OpenView.js rename to frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js index aaaa39bfa..f2a103090 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/components/OpenView.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js @@ -24,6 +24,7 @@ const OpenView = () => { }, } const { isLoading, data:bill, revalidate,isFetching,error } = Digit.Hooks.useCustomAPIHook(requestCriteria); + const arrears = bill?.billDetails @@ -54,7 +55,7 @@ const OpenView = () => { }, // success // callbackUrl: `${window.location.protocol}//${window.location.host}/${window.contextPath}/citizen/openpayment/success?consumerCode=${queryParams.consumerCode}&tenantId=${queryParams.tenantId}&businessService=${queryParams.businessService}`, - callbackUrl: `${window.location.protocol}//${window.location.host}/${window.contextPath}/citizen/openpayment/success/${queryParams.businessService}/${queryParams.consumerCode}/${queryParams.tenantId}`, + callbackUrl: `${window.location.protocol}//${window.location.host}/${window.contextPath}/citizen/payment/success/${queryParams.businessService}/${queryParams.consumerCode}/${queryParams.tenantId}`, additionalDetails: { isWhatsapp: false, }, diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/components/Response.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/Response.js similarity index 100% rename from frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/components/Response.js rename to frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/Response.js diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/configs/OpenSearchConfig.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/OpenSearchConfig.js similarity index 100% rename from frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/configs/OpenSearchConfig.js rename to frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/OpenSearchConfig.js diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/configs/UICustomizations.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/UICustomizations.js similarity index 93% rename from frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/configs/UICustomizations.js rename to frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/UICustomizations.js index 056eb22e4..fd77f99ad 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/configs/UICustomizations.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/UICustomizations.js @@ -67,7 +67,7 @@ export const UICustomizations = { if(key === "OP_CONS_CODE") { return {String(value ? (column.translate ? t(column.prefix ? `${column.prefix}${value}` : value) : value) : t("ES_COMMON_NA"))} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/hooks/index.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/hooks/index.js similarity index 78% rename from frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/hooks/index.js rename to frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/hooks/index.js index fb518536d..1e5435e13 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/hooks/index.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/hooks/index.js @@ -1,18 +1,18 @@ import utils from "../utils"; -const openpayment = { +const payment = { }; const Hooks = { - openpayment, + payment, }; const Utils = { browser: { sample: () => {}, }, - openpayment:{ + payment:{ ...utils } }; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/pages/citizen/index.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/pages/citizen/index.js similarity index 92% rename from frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/pages/citizen/index.js rename to frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/pages/citizen/index.js index a202a56d4..6edf55dd2 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/pages/citizen/index.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/pages/citizen/index.js @@ -13,7 +13,10 @@ const CitizenApp = ({ path }) => { const commonProps = { stateCode:"pb", cityCode:"pb.abianakhurd", moduleCode:"WS" }; return ( -
+
{!location.pathname.includes("response") && {t("CS_COMMON_BACK")}}
In Open Payment Module
} /> diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/utils/index.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/utils/index.js similarity index 100% rename from frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/utils/index.js rename to frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/utils/index.js diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/utils/payGov.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/utils/payGov.js similarity index 100% rename from frontend/micro-ui/web/micro-ui-internals/packages/modules/open-payment/src/utils/payGov.js rename to frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/utils/payGov.js diff --git a/frontend/micro-ui/web/package.json b/frontend/micro-ui/web/package.json index 2f2b6a839..2fb4e296c 100644 --- a/frontend/micro-ui/web/package.json +++ b/frontend/micro-ui/web/package.json @@ -22,7 +22,7 @@ "@egovernments/digit-ui-module-hrms": "1.5.27", "@egovernments/digit-ui-module-pgr": "1.7.0", "@egovernments/digit-ui-module-engagement": "1.5.20", - "@egovernments/digit-ui-module-open-payment":"0.0.1", + "@egovernments/digit-ui-module-payment":"0.0.1", "@egovernments/digit-ui-react-components": "1.5.26", "babel-loader": "8.1.0", "clean-webpack-plugin": "4.0.0", diff --git a/frontend/micro-ui/web/src/App.js b/frontend/micro-ui/web/src/App.js index baa0e194c..e30eddafd 100644 --- a/frontend/micro-ui/web/src/App.js +++ b/frontend/micro-ui/web/src/App.js @@ -5,7 +5,7 @@ import { DigitUI } from "@egovernments/digit-ui-module-core"; import { UICustomizations } from "./Customisations/UICustomizations"; import { initDSSComponents } from "@egovernments/digit-ui-module-dss"; import { initEngagementComponents } from "@egovernments/digit-ui-module-engagement"; -import {initOpenPaymentComponents} from "@egovernments/digit-ui-module-open-payment"; +import {initPaymentComponents} from "@egovernments/digit-ui-module-payment"; import { initPGRComponents, PGRReducers, @@ -21,7 +21,7 @@ const enabledModules = [ "HRMS", "Engagement", "PGR", - "OpenPayment" + "Payment" ]; const moduleReducers = (initData) => ({ @@ -38,7 +38,7 @@ const initDigitUI = () => { initDSSComponents(); initEngagementComponents(); initPGRComponents(); - initOpenPaymentComponents(); + initPaymentComponents(); }; initLibraries().then(() => { diff --git a/frontend/micro-ui/web/src/Customisations/UICustomizations.js b/frontend/micro-ui/web/src/Customisations/UICustomizations.js index fc9a9ff1c..c36821e66 100644 --- a/frontend/micro-ui/web/src/Customisations/UICustomizations.js +++ b/frontend/micro-ui/web/src/Customisations/UICustomizations.js @@ -489,7 +489,7 @@ export const UICustomizations = { if(key === "OP_CONS_CODE") { return {String(value ? (column.translate ? t(column.prefix ? `${column.prefix}${value}` : value) : value) : t("ES_COMMON_NA"))} From d7d43c73cb4744794d1f8af9159b9315c6404f6e Mon Sep 17 00:00:00 2001 From: Nipun Arora Date: Tue, 25 Jun 2024 00:45:26 +0530 Subject: [PATCH 042/118] updated css --- .../micro-ui/web/micro-ui-internals/example/public/index.html | 2 +- frontend/micro-ui/web/public/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/example/public/index.html b/frontend/micro-ui/web/micro-ui-internals/example/public/index.html index 37582faef..442043cb7 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/public/index.html +++ b/frontend/micro-ui/web/micro-ui-internals/example/public/index.html @@ -10,7 +10,7 @@ mGramSeva - + diff --git a/frontend/micro-ui/web/public/index.html b/frontend/micro-ui/web/public/index.html index 2561ac4d5..485305c6a 100644 --- a/frontend/micro-ui/web/public/index.html +++ b/frontend/micro-ui/web/public/index.html @@ -7,7 +7,7 @@ - + mSeva From 41ddd71a724403f33a1ec7ab200c1e0ac52dbd55 Mon Sep 17 00:00:00 2001 From: Nipun Arora Date: Tue, 25 Jun 2024 01:03:40 +0530 Subject: [PATCH 043/118] Update OpenView.js --- .../modules/payment/src/components/OpenView.js | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js index f2a103090..6ea38243d 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js @@ -4,6 +4,16 @@ import { useTranslation } from "react-i18next"; import { makePayment } from '../utils/payGov'; import $ from "jquery"; +function anonymizeHalfString(input) { + // Calculate the midpoint of the string + const midpoint = Math.ceil(input.length / 2); + + // Replace the first 50% of the string with asterisks + const anonymized = '*'.repeat(midpoint) + input.substring(midpoint); + + return anonymized; +} + const OpenView = () => { const { t } = useTranslation(); const [showToast,setShowToast] = useState(null) @@ -213,13 +223,13 @@ const OpenView = () => { } return ( <> - +
{t("OP_PAYMENT_DETAILS")}
- - - + + + {/*
*/} {bill?.billDetails?.[0]?.billAccountDetails From 1fafa302f292a85ab5269315ded6545c9b59360e Mon Sep 17 00:00:00 2001 From: Nipun Arora Date: Tue, 25 Jun 2024 01:07:44 +0530 Subject: [PATCH 044/118] updated pkg version --- .../micro-ui/web/micro-ui-internals/example/devpackage.json | 2 +- frontend/micro-ui/web/micro-ui-internals/example/package.json | 2 +- .../micro-ui-internals/packages/modules/payment/package.json | 2 +- frontend/micro-ui/web/package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/example/devpackage.json b/frontend/micro-ui/web/micro-ui-internals/example/devpackage.json index 395aa9ecd..4336bd3b1 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/devpackage.json +++ b/frontend/micro-ui/web/micro-ui-internals/example/devpackage.json @@ -12,7 +12,7 @@ "@egovernments/digit-ui-libraries":"^1.4.0", "@egovernments/digit-ui-module-common":"^1.4.0", "@egovernments/digit-ui-module-engagement":"^1.4.0", - "@egovernments/digit-ui-module-payment":"0.0.1", + "@egovernments/digit-ui-module-payment":"0.0.2", "@egovernments/digit-ui-module-fsm":"^1.4.0", "@egovernments/digit-ui-module-mcollect":"^1.4.0", "@egovernments/digit-ui-module-noc":"^1.4.0", diff --git a/frontend/micro-ui/web/micro-ui-internals/example/package.json b/frontend/micro-ui/web/micro-ui-internals/example/package.json index c41dd5f26..132d3a46c 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/package.json +++ b/frontend/micro-ui/web/micro-ui-internals/example/package.json @@ -14,7 +14,7 @@ "@egovernments/digit-ui-module-core": "1.5.46", "@egovernments/digit-ui-module-hrms": "1.5.27", "@egovernments/digit-ui-module-pgr": "1.7.0", - "@egovernments/digit-ui-module-payment":"0.0.1", + "@egovernments/digit-ui-module-payment":"0.0.2", "@egovernments/digit-ui-module-engagement": "1.5.20", "@egovernments/digit-ui-react-components": "1.5.26", "http-proxy-middleware": "^1.0.5", diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json index b65e0dccc..7ff3371ec 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-payment", - "version": "0.0.1", + "version": "0.0.2", "description": "Open Payments", "main": "dist/index.js", "module": "dist/index.modern.js", diff --git a/frontend/micro-ui/web/package.json b/frontend/micro-ui/web/package.json index 2fb4e296c..b8062c1c9 100644 --- a/frontend/micro-ui/web/package.json +++ b/frontend/micro-ui/web/package.json @@ -22,7 +22,7 @@ "@egovernments/digit-ui-module-hrms": "1.5.27", "@egovernments/digit-ui-module-pgr": "1.7.0", "@egovernments/digit-ui-module-engagement": "1.5.20", - "@egovernments/digit-ui-module-payment":"0.0.1", + "@egovernments/digit-ui-module-payment":"0.0.2", "@egovernments/digit-ui-react-components": "1.5.26", "babel-loader": "8.1.0", "clean-webpack-plugin": "4.0.0", From ccafe4422106f4b4d8aad586758bc3569392f57c Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Tue, 25 Jun 2024 10:08:40 +0530 Subject: [PATCH 045/118] HRMS SEARCH Name commented --- .../packages/modules/hrms/src/pages/Inbox.js | 4 ++++ 1 file changed, 4 insertions(+) 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 5d5cd0065..15e18f175 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 @@ -124,6 +124,10 @@ const Inbox = ({ parentRoute, businessService = "HRMS", initialStates = {}, filt const getSearchFields = () => { return [ + // { + // label: t("HR_NAME_LABEL"), + // name: "names", + // }, { label: t("HR_MOB_NO_LABEL"), name: "phone", From 8847ad9a0c7284b65402b3f8c6a3eafbb2dd5c0c Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Tue, 25 Jun 2024 10:09:49 +0530 Subject: [PATCH 046/118] Logs Removed --- .../packages/modules/core/src/pages/employee/index.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/index.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/index.js index d8523b028..1846ecb62 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/index.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/index.js @@ -43,12 +43,7 @@ const EmployeeApp = ({ const MDMS_ADMIN = Digit.UserService.hasAccess(["MDMS_ADMIN"]); const STATE_ADMIN = Digit.UserService.hasAccess(["STATE_ADMIN"]); - - console.log(DIV_ADMIN,"DIV_ADMIN"); - console.log(MDMS_ADMIN,"MDMS_ADMIN"); - console.log(STATE_ADMIN,"STATE_ADMIN"); - console.log(userDetails ,"userDetails"); const [showAlert, setShowAlert] = useState(false); useEffect(() => { Digit.UserService.setType("employee"); @@ -57,7 +52,6 @@ const EmployeeApp = ({ if(userDetails?.info?.roles.some(obj => obj.name === "STATE ADMIN")){ setShowAlert(false); - console.log("REACHED 1"); } if (cityDetails.code == "pb") { if( DIV_ADMIN == 0 && MDMS_ADMIN ==1 && STATE_ADMIN == 1){ @@ -70,12 +64,8 @@ const EmployeeApp = ({ setShowAlert(false); } - - console.log("REACHED 2"); } - else{ - console.log("REACHED 3"); setShowAlert(false); } From fa6ad4c365cf0740eb76cb101473d4d4f6a86375 Mon Sep 17 00:00:00 2001 From: Nipun Arora Date: Tue, 25 Jun 2024 22:33:05 +0530 Subject: [PATCH 047/118] updated payment module --- .../micro-ui-internals/example/package.json | 2 +- .../example/public/index.html | 2 + .../example/src/UICustomizations.js | 37 ++++++++- .../packages/libraries/src/hooks/payment.js | 6 +- .../src/services/elements/Payment.js | 12 +-- .../packages/modules/payment/package.json | 2 +- .../payment/src/components/OpenSearch.js | 56 ++++++------- .../payment/src/components/OpenView.js | 78 ++++++++++++++++--- .../payment/src/components/Response.js | 29 +++---- .../payment/src/configs/OpenSearchConfig.js | 21 ++++- frontend/micro-ui/web/package.json | 2 +- frontend/micro-ui/web/public/index.html | 2 + .../src/Customisations/UICustomizations.js | 37 ++++++++- 13 files changed, 216 insertions(+), 70 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/example/package.json b/frontend/micro-ui/web/micro-ui-internals/example/package.json index 132d3a46c..84c469e37 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/package.json +++ b/frontend/micro-ui/web/micro-ui-internals/example/package.json @@ -14,7 +14,7 @@ "@egovernments/digit-ui-module-core": "1.5.46", "@egovernments/digit-ui-module-hrms": "1.5.27", "@egovernments/digit-ui-module-pgr": "1.7.0", - "@egovernments/digit-ui-module-payment":"0.0.2", + "@egovernments/digit-ui-module-payment":"0.0.3", "@egovernments/digit-ui-module-engagement": "1.5.20", "@egovernments/digit-ui-react-components": "1.5.26", "http-proxy-middleware": "^1.0.5", diff --git a/frontend/micro-ui/web/micro-ui-internals/example/public/index.html b/frontend/micro-ui/web/micro-ui-internals/example/public/index.html index 442043cb7..76004e5d4 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/public/index.html +++ b/frontend/micro-ui/web/micro-ui-internals/example/public/index.html @@ -10,7 +10,9 @@ mGramSeva + + diff --git a/frontend/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js b/frontend/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js index c36821e66..e42553460 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js +++ b/frontend/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js @@ -432,7 +432,7 @@ export const UICustomizations = { // businessService and tenantId can be either in queryParams or in form let {consumerCode,businessService,tenantId} = data?.state?.searchForm || {}; businessService = businessService?.code - tenantId = tenantId?.code + tenantId = tenantId?.[0]?.code if(!businessService){ businessService = additionalDetails?.queryParams?.businessService } @@ -445,7 +445,6 @@ export const UICustomizations = { businessService } data.params = finalParams - console.log(data); // const tenantId = Digit.ULBService.getCurrentTenantId(); // data.body = { RequestInfo: data.body.RequestInfo }; // const { limit, offset } = data?.state?.tableForm || {}; @@ -496,5 +495,39 @@ export const UICustomizations = {
} }, + populateReqCriteria: () => { + const tenantId = Digit.ULBService.getCurrentTenantId(); + return { + url: "/mdms-v2/v1/_search", + params: { tenantId }, + body: { + MdmsCriteria: { + tenantId, + moduleDetails: [ + { + moduleName: "tenant", + masterDetails: [ + { + name: "tenants", + }, + ], + }, + ], + }, + }, + config: { + enabled: true, + select: (data) => { + const result = data?.MdmsRes?.tenant?.tenants?.filter(row => row?.divisionCode && row?.divisionName)?.map(row => { + return { + ...row, + updatedCode:`${row.divisionName} - ${row?.name}` + } + }); + return result; + }, + }, + }; + }, } }; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/payment.js b/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/payment.js index 255ac45ff..abbddd89c 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/payment.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/payment.js @@ -95,12 +95,12 @@ export const useFetchPayment = ({ tenantId, consumerCode, businessService }, con }; }; -export const usePaymentUpdate = ({ egId }, businessService, config) => { +export const usePaymentUpdate = ({ egId }, businessService, config,auth=true,userService=true) => { const getPaymentData = async (egId) => { - const transaction = await Digit.PaymentService.updateCitizenReciept(egId); + const transaction = await Digit.PaymentService.updateCitizenReciept(egId,auth,userService); const payments = await Digit.PaymentService.getReciept(transaction.Transaction[0].tenantId, businessService, { consumerCodes: transaction.Transaction[0].consumerCode, - }); + },auth,userService); return { payments, applicationNo: transaction.Transaction[0].consumerCode, txnStatus: transaction.Transaction[0].txnStatus }; }; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Payment.js b/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Payment.js index d54d5a62a..4b160c90d 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Payment.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Payment.js @@ -49,7 +49,7 @@ export const PaymentService = { data: { ...details }, }), - getReciept: (tenantId, businessservice, filters = {}) => + getReciept: (tenantId, businessservice, filters = {},auth=true,userService=true) => Request({ url: businessservice && businessservice !== "BPAREG" @@ -57,8 +57,8 @@ export const PaymentService = { : `${Urls.payment.print_reciept}/_search`, useCache: false, method: "POST", - auth: true, - userService: true, + auth, + userService, params: { tenantId, ...filters }, }), @@ -95,13 +95,13 @@ export const PaymentService = { data: { ...details }, }), - updateCitizenReciept: (transactionId) => + updateCitizenReciept: (transactionId,auth=true,userService=true) => Request({ url: Urls.payment.update_citizen_reciept, useCache: false, method: "POST", - auth: true, - userService: true, + auth, + userService, params: { transactionId }, }), diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json index 7ff3371ec..0f8d171c8 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-payment", - "version": "0.0.2", + "version": "0.0.3", "description": "Open Payments", "main": "dist/index.js", "module": "dist/index.modern.js", diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenSearch.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenSearch.js index f9aa55e49..ed4b21e3e 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenSearch.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenSearch.js @@ -9,34 +9,34 @@ const OpenSearch = () => { //An effect to update configs useEffect(() => { - if (!queryParams.tenantId) { - // Update configs - OpenSearchConfig.minParametersForSearchForm += 1; - OpenSearchConfig.sections.search.uiConfig.minReqFields += 1; - OpenSearchConfig.sections.search.uiConfig.defaultValues = { - ...OpenSearchConfig.sections.search.uiConfig.defaultValues, - tenantId: "" - }; - OpenSearchConfig.sections.search.uiConfig.fields = [ - ...OpenSearchConfig.sections.search.uiConfig.fields, - { - label: "SELECT_TENANT", - type: "dropdown", - isMandatory: false, - disable: false, - populators: { - name: "tenantId", - optionsKey: "name", - optionsCustomStyle: { top: "2.3rem" }, - mdmsConfig: { - masterName: "tenants", - moduleName: "tenant", - localePrefix: "TENANT", - }, - }, - }, - ]; - } + // if (!queryParams.tenantId) { + // // Update configs + // OpenSearchConfig.minParametersForSearchForm += 1; + // OpenSearchConfig.sections.search.uiConfig.minReqFields += 1; + // OpenSearchConfig.sections.search.uiConfig.defaultValues = { + // ...OpenSearchConfig.sections.search.uiConfig.defaultValues, + // tenantId: "" + // }; + // OpenSearchConfig.sections.search.uiConfig.fields = [ + // ...OpenSearchConfig.sections.search.uiConfig.fields, + // { + // label: "SELECT_TENANT", + // type: "dropdown", + // isMandatory: false, + // disable: false, + // populators: { + // name: "tenantId", + // optionsKey: "name", + // optionsCustomStyle: { top: "2.3rem" }, + // mdmsConfig: { + // masterName: "tenants", + // moduleName: "tenant", + // localePrefix: "TENANT", + // }, + // }, + // }, + // ]; + // } if (!queryParams.businessService) { // Update configs diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js index 6ea38243d..46b21f741 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js @@ -33,9 +33,53 @@ const OpenView = () => { } }, } + const { isLoading, data:bill, revalidate,isFetching,error } = Digit.Hooks.useCustomAPIHook(requestCriteria); + + const requestCriteriaForConnectionSearch = { + url:"/ws-services/wc/_search?", + params:queryParams, + body:{}, + options:{ + userService:false, + auth:false + }, + config: { + enabled: !!queryParams.consumerCode && !!queryParams.tenantId && !!queryParams.businessService, + select:(data) => { + return data?.WaterConnection?.[0] + } + }, + } + const { isLoading:isLoadingConnection, data:connection,isFetching:isFetchingConnection,error:errorConnection } = Digit.Hooks.useCustomAPIHook(requestCriteriaForConnectionSearch); + const requestCriteriaForPayments = { + url:"/collection-services/payments/WS/_search", + params:queryParams, + body:{}, + options:{ + userService:false, + auth:false + }, + config: { + enabled: !!queryParams.consumerCode && !!queryParams.tenantId && !!queryParams.businessService, + select:(data) => { + const payments = data?.Payments + if(payments?.length === 0){ + return null + }else if(payments?.length >5){ + return payments.slice(0,5) + }else{ + return payments + } + } + }, + } + + const { isLoading:isLoadingPayments, data:payments,isFetching:isFetchingPayments,error:isErrorPayments } = Digit.Hooks.useCustomAPIHook(requestCriteriaForPayments); + + const arrears = bill?.billDetails ?.sort((a, b) => b.fromPeriod - a.fromPeriod) @@ -218,18 +262,19 @@ const OpenView = () => { } - if(isLoading){ + if(isLoading || isLoadingPayments || isLoadingConnection){ return } + console.log(payments); return ( <> +
{t("OP_PAYMENT_DETAILS")}
-
{t("OP_PAYMENT_DETAILS")}
- - - - - + {bill && + + {/* */} + {/* */} + {/*
*/} {bill?.billDetails?.[0]?.billAccountDetails @@ -239,7 +284,7 @@ const OpenView = () => { key={index + "taxheads"} labelStyle={{ fontWeight: "normal" }} textStyle={{ textAlign: "right", maxWidth: "100px" }} - label={t(amountDetails.taxHeadCode)} + label={t(`TAX_HC_${amountDetails.taxHeadCode}`)} text={"₹ " + amountDetails.amount?.toFixed(2)} /> ))} @@ -260,11 +305,24 @@ const OpenView = () => { textStyle={{ fontWeight: "bold", textAlign: "right", maxWidth: "100px" }} text={"₹ " + Number(bill?.totalAmount).toFixed(2)} /> -
+
}
+ {payments &&
{t("OP_CONSUMER_RECEIPTS")}
} + {payments && payments.map(payment => { + return ( + + + + + + + + ) + })} + {/* {displayMenu ? : null} */} - + {showToast && ( { - if(localStorage.getItem("BillPaymentEnabled")!=="true"){ - window.history.forward(); - return null; - } +// if(localStorage.getItem("BillPaymentEnabled")!=="true"){ +// window.history.forward(); +// return null; +// } return } @@ -34,17 +34,18 @@ export const convertEpochToDate = (dateEpoch) => { const [printing, setPrinting] = useState(false); const [allowFetchBill, setallowFetchBill] = useState(false); const { businessService: business_service, consumerCode, tenantId } = useParams(); - const { data: bpaData = {}, isLoading: isBpaSearchLoading, isSuccess: isBpaSuccess, error: bpaerror } = Digit.Hooks.obps.useOBPSSearch( - "", {}, tenantId, { applicationNo: consumerCode }, {}, {enabled:(window.location.href.includes("bpa") || window.location.href.includes("BPA"))} - ); + + // const { data: bpaData = {}, isLoading: isBpaSearchLoading, isSuccess: isBpaSuccess, error: bpaerror } = Digit.Hooks.obps.useOBPSSearch( + // "", {}, tenantId, { applicationNo: consumerCode }, {}, {enabled:(window.location.href.includes("bpa") || window.location.href.includes("BPA"))} + // ); const { isLoading, data, isError } = Digit.Hooks.usePaymentUpdate({ egId }, business_service, { retry: false, staleTime: Infinity, refetchOnWindowFocus: false, - }); + },false,false); - const { label } = Digit.Hooks.useApplicationsForBusinessServiceSearch({ businessService: business_service }, { enabled: false }); + // const { label } = Digit.Hooks.useApplicationsForBusinessServiceSearch({ businessService: business_service }, { enabled: false }); // const { data: demand } = Digit.Hooks.useDemandSearch( // { consumerCode, businessService: business_service }, @@ -116,7 +117,7 @@ export const convertEpochToDate = (dateEpoch) => { /> {t("CS_PAYMENT_FAILURE_MESSAGE")} {!(business_service?.includes("PT")) ? ( - + ) : ( @@ -566,7 +567,7 @@ export const convertEpochToDate = (dateEpoch) => { }; const ommitRupeeSymbol = ["PT"].includes(business_service); - if ((window.location.href.includes("bpa") || window.location.href.includes("BPA")) && isBpaSearchLoading) return + // if ((window.location.href.includes("bpa") || window.location.href.includes("BPA")) && isBpaSearchLoading) return return ( @@ -586,7 +587,7 @@ export const convertEpochToDate = (dateEpoch) => { /> {t(`${bannerText}_DETAIL`)} - + {/** TODO : move this key and value into the hook based on business Service */} {(business_service === "PT" || workflw) && ( { {t("TL_CERTIFICATE")}
) : null} - {bpaData?.[0]?.businessService === "BPA_OC" && (bpaData?.[0]?.status==="APPROVED" || bpaData?.[0]?.status==="PENDING_SANC_FEE_PAYMENT") ? ( + {/* {bpaData?.[0]?.businessService === "BPA_OC" && (bpaData?.[0]?.status==="APPROVED" || bpaData?.[0]?.status==="PENDING_SANC_FEE_PAYMENT") ? (
getPermitOccupancyOrderSearch("occupancy-certificate")}> {t("BPA_OC_CERTIFICATE")} @@ -658,7 +659,7 @@ export const convertEpochToDate = (dateEpoch) => { {t("BPA_PERMIT_ORDER")}
- ) : null} + ) : null} */}
{business_service?.includes("PT") &&
diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/OpenSearchConfig.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/OpenSearchConfig.js index a3fc3aaec..184db7ae9 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/OpenSearchConfig.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/OpenSearchConfig.js @@ -5,7 +5,7 @@ export const OpenSearchConfig = { "serviceName": "/billing-service/bill/v2/_fetchbill", "requestParam": {}, "requestBody": {}, - "minParametersForSearchForm": 1, + "minParametersForSearchForm": 2, "masterName": "commonUiConfig", "moduleName": "OpenPaymentSearch", "tableFormJsonPath": "requestBody.pagination", @@ -20,7 +20,7 @@ export const OpenSearchConfig = { "headerStyle": null, "primaryLabel": "ES_COMMON_SEARCH", "secondaryLabel": "ES_COMMON_CLEAR_SEARCH", - "minReqFields": 1, + "minReqFields": 2, // "showFormInstruction": "OPEN_PAYMENT_SEARCH_HINT", "defaultValues": { "consumerCode": "" @@ -38,6 +38,23 @@ export const OpenSearchConfig = { } }, }, + { + label: "SELECT_TENANT", + type: "apidropdown", + isMandatory: false, + disable: false, + populators: { + "optionsCustomStyle": { + "top": "2.3rem" + }, + name: "tenantId", + optionsKey: "updatedCode", + allowMultiSelect: false, + masterName: "commonUiConfig", + moduleName: "OpenPaymentSearch", + customfn: "populateReqCriteria", + }, + }, ] }, "label": "", diff --git a/frontend/micro-ui/web/package.json b/frontend/micro-ui/web/package.json index b8062c1c9..2bdcab2c8 100644 --- a/frontend/micro-ui/web/package.json +++ b/frontend/micro-ui/web/package.json @@ -22,7 +22,7 @@ "@egovernments/digit-ui-module-hrms": "1.5.27", "@egovernments/digit-ui-module-pgr": "1.7.0", "@egovernments/digit-ui-module-engagement": "1.5.20", - "@egovernments/digit-ui-module-payment":"0.0.2", + "@egovernments/digit-ui-module-payment":"0.0.3", "@egovernments/digit-ui-react-components": "1.5.26", "babel-loader": "8.1.0", "clean-webpack-plugin": "4.0.0", diff --git a/frontend/micro-ui/web/public/index.html b/frontend/micro-ui/web/public/index.html index 485305c6a..e4c7aa9f2 100644 --- a/frontend/micro-ui/web/public/index.html +++ b/frontend/micro-ui/web/public/index.html @@ -7,7 +7,9 @@ + + mSeva diff --git a/frontend/micro-ui/web/src/Customisations/UICustomizations.js b/frontend/micro-ui/web/src/Customisations/UICustomizations.js index c36821e66..e42553460 100644 --- a/frontend/micro-ui/web/src/Customisations/UICustomizations.js +++ b/frontend/micro-ui/web/src/Customisations/UICustomizations.js @@ -432,7 +432,7 @@ export const UICustomizations = { // businessService and tenantId can be either in queryParams or in form let {consumerCode,businessService,tenantId} = data?.state?.searchForm || {}; businessService = businessService?.code - tenantId = tenantId?.code + tenantId = tenantId?.[0]?.code if(!businessService){ businessService = additionalDetails?.queryParams?.businessService } @@ -445,7 +445,6 @@ export const UICustomizations = { businessService } data.params = finalParams - console.log(data); // const tenantId = Digit.ULBService.getCurrentTenantId(); // data.body = { RequestInfo: data.body.RequestInfo }; // const { limit, offset } = data?.state?.tableForm || {}; @@ -496,5 +495,39 @@ export const UICustomizations = { } }, + populateReqCriteria: () => { + const tenantId = Digit.ULBService.getCurrentTenantId(); + return { + url: "/mdms-v2/v1/_search", + params: { tenantId }, + body: { + MdmsCriteria: { + tenantId, + moduleDetails: [ + { + moduleName: "tenant", + masterDetails: [ + { + name: "tenants", + }, + ], + }, + ], + }, + }, + config: { + enabled: true, + select: (data) => { + const result = data?.MdmsRes?.tenant?.tenants?.filter(row => row?.divisionCode && row?.divisionName)?.map(row => { + return { + ...row, + updatedCode:`${row.divisionName} - ${row?.name}` + } + }); + return result; + }, + }, + }; + }, } }; From 4b2386d39481e587597135db0190362fc7f66212 Mon Sep 17 00:00:00 2001 From: Nipun Arora Date: Tue, 25 Jun 2024 23:06:33 +0530 Subject: [PATCH 048/118] updated css --- .../micro-ui/web/micro-ui-internals/example/public/index.html | 4 ++-- frontend/micro-ui/web/public/index.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/example/public/index.html b/frontend/micro-ui/web/micro-ui-internals/example/public/index.html index 76004e5d4..3239aa342 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/public/index.html +++ b/frontend/micro-ui/web/micro-ui-internals/example/public/index.html @@ -10,8 +10,8 @@ mGramSeva - - + + diff --git a/frontend/micro-ui/web/public/index.html b/frontend/micro-ui/web/public/index.html index e4c7aa9f2..9149c2a54 100644 --- a/frontend/micro-ui/web/public/index.html +++ b/frontend/micro-ui/web/public/index.html @@ -7,8 +7,8 @@ - - + + From 94ad270c127569a07186c01e1f8bb0f113d42854 Mon Sep 17 00:00:00 2001 From: Nipun Arora Date: Tue, 25 Jun 2024 23:17:46 +0530 Subject: [PATCH 049/118] Update OpenSearch.js --- .../payment/src/components/OpenSearch.js | 116 +++++++++--------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenSearch.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenSearch.js index ed4b21e3e..8988dfdb0 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenSearch.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenSearch.js @@ -8,65 +8,65 @@ const OpenSearch = () => { const queryParams = Digit.Hooks.useQueryParams(); //An effect to update configs - useEffect(() => { - // if (!queryParams.tenantId) { - // // Update configs - // OpenSearchConfig.minParametersForSearchForm += 1; - // OpenSearchConfig.sections.search.uiConfig.minReqFields += 1; - // OpenSearchConfig.sections.search.uiConfig.defaultValues = { - // ...OpenSearchConfig.sections.search.uiConfig.defaultValues, - // tenantId: "" - // }; - // OpenSearchConfig.sections.search.uiConfig.fields = [ - // ...OpenSearchConfig.sections.search.uiConfig.fields, - // { - // label: "SELECT_TENANT", - // type: "dropdown", - // isMandatory: false, - // disable: false, - // populators: { - // name: "tenantId", - // optionsKey: "name", - // optionsCustomStyle: { top: "2.3rem" }, - // mdmsConfig: { - // masterName: "tenants", - // moduleName: "tenant", - // localePrefix: "TENANT", - // }, - // }, - // }, - // ]; - // } + // useEffect(() => { + // // if (!queryParams.tenantId) { + // // // Update configs + // // OpenSearchConfig.minParametersForSearchForm += 1; + // // OpenSearchConfig.sections.search.uiConfig.minReqFields += 1; + // // OpenSearchConfig.sections.search.uiConfig.defaultValues = { + // // ...OpenSearchConfig.sections.search.uiConfig.defaultValues, + // // tenantId: "" + // // }; + // // OpenSearchConfig.sections.search.uiConfig.fields = [ + // // ...OpenSearchConfig.sections.search.uiConfig.fields, + // // { + // // label: "SELECT_TENANT", + // // type: "dropdown", + // // isMandatory: false, + // // disable: false, + // // populators: { + // // name: "tenantId", + // // optionsKey: "name", + // // optionsCustomStyle: { top: "2.3rem" }, + // // mdmsConfig: { + // // masterName: "tenants", + // // moduleName: "tenant", + // // localePrefix: "TENANT", + // // }, + // // }, + // // }, + // // ]; + // // } - if (!queryParams.businessService) { - // Update configs - OpenSearchConfig.minParametersForSearchForm += 1; - OpenSearchConfig.sections.search.uiConfig.minReqFields += 1; - OpenSearchConfig.sections.search.uiConfig.defaultValues = { - ...OpenSearchConfig.sections.search.uiConfig.defaultValues, - businessService: "" - }; - OpenSearchConfig.sections.search.uiConfig.fields = [ - ...OpenSearchConfig.sections.search.uiConfig.fields, - { - label: "SELECT_BS", - type: "dropdown", - isMandatory: false, - disable: false, - populators: { - name: "businessService", - optionsKey: "name", - optionsCustomStyle: { top: "2.3rem" }, - mdmsConfig: { - masterName: "BusinessService", - moduleName: "BillingService", - localePrefix: "BUSINESS_SERV", - }, - }, - }, - ]; - } - }, []); + // if (!queryParams.businessService) { + // // Update configs + // OpenSearchConfig.minParametersForSearchForm += 1; + // OpenSearchConfig.sections.search.uiConfig.minReqFields += 1; + // OpenSearchConfig.sections.search.uiConfig.defaultValues = { + // ...OpenSearchConfig.sections.search.uiConfig.defaultValues, + // businessService: "" + // }; + // OpenSearchConfig.sections.search.uiConfig.fields = [ + // ...OpenSearchConfig.sections.search.uiConfig.fields, + // { + // label: "SELECT_BS", + // type: "dropdown", + // isMandatory: false, + // disable: false, + // populators: { + // name: "businessService", + // optionsKey: "name", + // optionsCustomStyle: { top: "2.3rem" }, + // mdmsConfig: { + // masterName: "BusinessService", + // moduleName: "BillingService", + // localePrefix: "BUSINESS_SERV", + // }, + // }, + // }, + // ]; + // } + // }, []); return ( From fdb001b78b0e36fea4f15d2e784a90df4ffdb037 Mon Sep 17 00:00:00 2001 From: Nipun Arora Date: Tue, 25 Jun 2024 23:18:25 +0530 Subject: [PATCH 050/118] updated pkg version --- frontend/micro-ui/web/micro-ui-internals/example/package.json | 2 +- .../micro-ui-internals/packages/modules/payment/package.json | 2 +- frontend/micro-ui/web/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/example/package.json b/frontend/micro-ui/web/micro-ui-internals/example/package.json index 84c469e37..82155df06 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/package.json +++ b/frontend/micro-ui/web/micro-ui-internals/example/package.json @@ -14,7 +14,7 @@ "@egovernments/digit-ui-module-core": "1.5.46", "@egovernments/digit-ui-module-hrms": "1.5.27", "@egovernments/digit-ui-module-pgr": "1.7.0", - "@egovernments/digit-ui-module-payment":"0.0.3", + "@egovernments/digit-ui-module-payment":"0.0.4", "@egovernments/digit-ui-module-engagement": "1.5.20", "@egovernments/digit-ui-react-components": "1.5.26", "http-proxy-middleware": "^1.0.5", diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json index 0f8d171c8..68563f1c7 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-payment", - "version": "0.0.3", + "version": "0.0.4", "description": "Open Payments", "main": "dist/index.js", "module": "dist/index.modern.js", diff --git a/frontend/micro-ui/web/package.json b/frontend/micro-ui/web/package.json index 2bdcab2c8..95fa1a33d 100644 --- a/frontend/micro-ui/web/package.json +++ b/frontend/micro-ui/web/package.json @@ -22,7 +22,7 @@ "@egovernments/digit-ui-module-hrms": "1.5.27", "@egovernments/digit-ui-module-pgr": "1.7.0", "@egovernments/digit-ui-module-engagement": "1.5.20", - "@egovernments/digit-ui-module-payment":"0.0.3", + "@egovernments/digit-ui-module-payment":"0.0.4", "@egovernments/digit-ui-react-components": "1.5.26", "babel-loader": "8.1.0", "clean-webpack-plugin": "4.0.0", From e6966aa46b4dc19164dc5c06aa8f96c3e5a59a29 Mon Sep 17 00:00:00 2001 From: Nipun Arora Date: Wed, 26 Jun 2024 00:39:15 +0530 Subject: [PATCH 051/118] Update UICustomizations.js --- .../payment/src/configs/UICustomizations.js | 37 ++++++++++++++++++- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/UICustomizations.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/UICustomizations.js index fd77f99ad..8b88265b0 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/UICustomizations.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/UICustomizations.js @@ -10,7 +10,7 @@ export const UICustomizations = { // businessService and tenantId can be either in queryParams or in form let {consumerCode,businessService,tenantId} = data?.state?.searchForm || {}; businessService = businessService?.code - tenantId = tenantId?.code + tenantId = tenantId?.[0]?.code if(!businessService){ businessService = additionalDetails?.queryParams?.businessService } @@ -23,7 +23,6 @@ export const UICustomizations = { businessService } data.params = finalParams - console.log(data); // const tenantId = Digit.ULBService.getCurrentTenantId(); // data.body = { RequestInfo: data.body.RequestInfo }; // const { limit, offset } = data?.state?.tableForm || {}; @@ -74,5 +73,39 @@ export const UICustomizations = { } }, + populateReqCriteria: () => { + const tenantId = Digit.ULBService.getCurrentTenantId(); + return { + url: "/mdms-v2/v1/_search", + params: { tenantId }, + body: { + MdmsCriteria: { + tenantId, + moduleDetails: [ + { + moduleName: "tenant", + masterDetails: [ + { + name: "tenants", + }, + ], + }, + ], + }, + }, + config: { + enabled: true, + select: (data) => { + const result = data?.MdmsRes?.tenant?.tenants?.filter(row => row?.divisionCode && row?.divisionName)?.map(row => { + return { + ...row, + updatedCode:`${row.divisionName} - ${row?.name}` + } + }); + return result; + }, + }, + }; + }, } }; From 7c57c272b40b6500c97a1ec009b47613615d828f Mon Sep 17 00:00:00 2001 From: Nipun Arora Date: Wed, 26 Jun 2024 01:58:29 +0530 Subject: [PATCH 052/118] updated pkg version --- frontend/micro-ui/web/micro-ui-internals/example/package.json | 2 +- .../micro-ui-internals/packages/modules/payment/package.json | 2 +- frontend/micro-ui/web/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/example/package.json b/frontend/micro-ui/web/micro-ui-internals/example/package.json index 82155df06..c733e634d 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/package.json +++ b/frontend/micro-ui/web/micro-ui-internals/example/package.json @@ -14,7 +14,7 @@ "@egovernments/digit-ui-module-core": "1.5.46", "@egovernments/digit-ui-module-hrms": "1.5.27", "@egovernments/digit-ui-module-pgr": "1.7.0", - "@egovernments/digit-ui-module-payment":"0.0.4", + "@egovernments/digit-ui-module-payment":"0.0.5", "@egovernments/digit-ui-module-engagement": "1.5.20", "@egovernments/digit-ui-react-components": "1.5.26", "http-proxy-middleware": "^1.0.5", diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json index 68563f1c7..d56750caf 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-payment", - "version": "0.0.4", + "version": "0.0.5", "description": "Open Payments", "main": "dist/index.js", "module": "dist/index.modern.js", diff --git a/frontend/micro-ui/web/package.json b/frontend/micro-ui/web/package.json index 95fa1a33d..b93bd284d 100644 --- a/frontend/micro-ui/web/package.json +++ b/frontend/micro-ui/web/package.json @@ -22,7 +22,7 @@ "@egovernments/digit-ui-module-hrms": "1.5.27", "@egovernments/digit-ui-module-pgr": "1.7.0", "@egovernments/digit-ui-module-engagement": "1.5.20", - "@egovernments/digit-ui-module-payment":"0.0.4", + "@egovernments/digit-ui-module-payment":"0.0.5", "@egovernments/digit-ui-react-components": "1.5.26", "babel-loader": "8.1.0", "clean-webpack-plugin": "4.0.0", From 8bdb4113d0efe6444fb68cc06f2b1f91b03951a5 Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Wed, 26 Jun 2024 14:15:51 +0530 Subject: [PATCH 053/118] HRMS Back arrow added --- .../packages/modules/hrms/src/pages/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/index.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/index.js index 9bf9aeb07..c357e7fe0 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/index.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/index.js @@ -1,7 +1,7 @@ import { PrivateRoute } from "@egovernments/digit-ui-react-components"; import React,{ useEffect } from "react"; import { useTranslation } from "react-i18next"; -import { Link, Switch, useLocation } from "react-router-dom"; +import { Link, Switch, useLocation, useHistory } from "react-router-dom"; // const {SixFtApart,Rotate360}=SVG; const EmployeeApp = ({ path, url, userType }) => { @@ -14,6 +14,7 @@ const EmployeeApp = ({ path, url, userType }) => { tenantId: tenantId, }, }; + const history = useHistory(); const HRMSResponse = Digit?.ComponentRegistryService?.getComponent("HRMSResponse"); const HRMSDetails = Digit?.ComponentRegistryService?.getComponent("HRMSDetails"); @@ -41,6 +42,8 @@ const EmployeeApp = ({ path, url, userType }) => { {" "} / {location.pathname === `/${window?.contextPath}/employee/hrms/inbox` ? t("HR_COMMON_HEADER") : t("HR_COMMON_HEADER")}

+ + ( From 35e06f63cb8efff4aa2ea3d5c1c6161510544857 Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Wed, 26 Jun 2024 16:23:44 +0530 Subject: [PATCH 054/118] HRMS Search css Heigh Alignment -Fix --- .../packages/css/src/components/textfields.scss | 13 +++++++++++++ .../modules/hrms/src/components/inbox/search.js | 6 +++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/textfields.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/textfields.scss index 715140131..6d73f74e6 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/textfields.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/textfields.scss @@ -9,6 +9,15 @@ .employee-card-input { @apply mb-lg pl-sm outline-none block border w-full h-10 border-input-border border-solid bg-white leading-10 text-form-field text-text-primary; } + +.employee-card-input-only { + @apply mb-lg pl-sm outline-none block border w-full h-12 border-input-border border-solid bg-white leading-10 text-form-field text-text-primary; +} +.employee-card-input-only .employee-card-input { + border: none; +} + + .employee-card-input:disabled { @apply border-grey-dark text-grey-dark !important; pointer-events: none !important; @@ -82,6 +91,10 @@ } } +.citizen-card-input-only { + @apply mb-lg pl-sm outline-none block border w-full h-12 border-input-border border-solid bg-white leading-10 text-form-field text-text-primary; +} + .citizen-card-input { @apply mb-lg pl-sm outline-none block border w-full h-10 border-input-border border-solid bg-white leading-10 text-form-field text-text-primary; } diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/inbox/search.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/inbox/search.js index 33e6be599..db65c9443 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/inbox/search.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/inbox/search.js @@ -66,12 +66,12 @@ const SearchApplication = ({ onSearch, type, onClose, searchFields, searchParams {input.type !== "date" ? (
{input?.componentInFront ? ( - + {input?.componentInFront} ) : null} - -
+ +
) : ( } From a1e05ca71697aa5a29a7bd04a5d920bd1cac404e Mon Sep 17 00:00:00 2001 From: Nipun Arora Date: Wed, 26 Jun 2024 17:14:02 +0530 Subject: [PATCH 055/118] updated payment module : integrated with connection search --- .../micro-ui-internals/example/package.json | 2 +- .../example/src/UICustomizations.js | 47 +- .../packages/modules/payment/package.json | 2 +- .../payment/src/components/OpenView.js | 511 +++++++++--------- .../payment/src/components/Response.js | 10 +- .../payment/src/configs/OpenSearchConfig.js | 71 ++- .../payment/src/configs/UICustomizations.js | 47 +- frontend/micro-ui/web/package.json | 2 +- .../src/Customisations/UICustomizations.js | 47 +- 9 files changed, 467 insertions(+), 272 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/example/package.json b/frontend/micro-ui/web/micro-ui-internals/example/package.json index c733e634d..8aa4dc900 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/package.json +++ b/frontend/micro-ui/web/micro-ui-internals/example/package.json @@ -14,7 +14,7 @@ "@egovernments/digit-ui-module-core": "1.5.46", "@egovernments/digit-ui-module-hrms": "1.5.27", "@egovernments/digit-ui-module-pgr": "1.7.0", - "@egovernments/digit-ui-module-payment":"0.0.5", + "@egovernments/digit-ui-module-payment":"0.0.6", "@egovernments/digit-ui-module-engagement": "1.5.20", "@egovernments/digit-ui-react-components": "1.5.26", "http-proxy-middleware": "^1.0.5", diff --git a/frontend/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js b/frontend/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js index e42553460..c9c517e6d 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js +++ b/frontend/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js @@ -440,11 +440,13 @@ export const UICustomizations = { tenantId = additionalDetails?.queryParams?.tenantId } const finalParams = { - consumerCode, + // consumerCode, tenantId, - businessService + businessService, + textSearch:consumerCode } data.params = finalParams + // data.params.textSearch = finalParams.consumerCode // const tenantId = Digit.ULBService.getCurrentTenantId(); // data.body = { RequestInfo: data.body.RequestInfo }; // const { limit, offset } = data?.state?.tableForm || {}; @@ -477,6 +479,47 @@ export const UICustomizations = { return data; }, additionalCustomizations: (row, key, column, value, t, searchResult) => { + + switch (key) { + case "OP_CONS_CODE": + return + + {String(value ? (column.translate ? t(column.prefix ? `${column.prefix}${value}` : value) : value) : t("ES_COMMON_NA"))} + + + + case "OP_APPLICATION_TYPE": + return
+ { value ? t(Digit.Utils.locale.getTransformedLocale(`OP_APPLICATION_TYPE_${value}`)) : t("ES_COMMON_NA")} +
+ + case "OP_APPLICATION_STATUS": + return
+ { value ? t(Digit.Utils.locale.getTransformedLocale(`OP_APPLICATION_STATUS_${value}`)) : t("ES_COMMON_NA")} +
+ case "OP_CONNECTION_TYPE": + return
+ { value ? t(Digit.Utils.locale.getTransformedLocale(`OP_CONNECTION_TYPE_${value}`)) : t("ES_COMMON_NA")} +
+ case "OP_METER_INSTALLATION_DATE": + return
+ {value ? Digit.DateUtils.ConvertEpochToDate(value) : t("ES_COMMON_NA")} +
+ case "OP_METER_READING_DATE": + return
+ {value ? Digit.DateUtils.ConvertEpochToDate(value) : t("ES_COMMON_NA")} +
+ case "OP_PROPERTY_TYPE": + return
+ { value ? t(Digit.Utils.locale.getTransformedLocale(`OP_PROPERTY_TYPE_${value}`)) : t("ES_COMMON_NA")} +
+ + + default: + return {t("ES_COMMON_DEFAULT_NA")} + } if (key === "OP_BILL_DATE") { return Digit.DateUtils.ConvertEpochToDate(value); } diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json index d56750caf..d12cc7ae7 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-payment", - "version": "0.0.5", + "version": "0.0.6", "description": "Open Payments", "main": "dist/index.js", "module": "dist/index.modern.js", diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js index 46b21f741..c5a0d7467 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js @@ -1,91 +1,93 @@ -import { Loader,StatusTable,Row,Card,Header,SubmitBar,ActionBar,Toast } from '@egovernments/digit-ui-react-components'; -import React,{Fragment,useState} from 'react' +import { Loader, StatusTable, Row, Card, Header, SubmitBar, ActionBar, Toast } from "@egovernments/digit-ui-react-components"; +import React, { Fragment, useState, useEffect } from "react"; import { useTranslation } from "react-i18next"; -import { makePayment } from '../utils/payGov'; +import { makePayment } from "../utils/payGov"; import $ from "jquery"; function anonymizeHalfString(input) { - // Calculate the midpoint of the string - const midpoint = Math.ceil(input.length / 2); + // Calculate the midpoint of the string + const midpoint = Math.ceil(input.length / 2); - // Replace the first 50% of the string with asterisks - const anonymized = '*'.repeat(midpoint) + input.substring(midpoint); + // Replace the first 50% of the string with asterisks + const anonymized = "*".repeat(midpoint) + input.substring(midpoint); - return anonymized; + return anonymized; } const OpenView = () => { const { t } = useTranslation(); - const [showToast,setShowToast] = useState(null) + const [showToast, setShowToast] = useState(null); const queryParams = Digit.Hooks.useQueryParams(); const requestCriteria = { - url:"/billing-service/bill/v2/_fetchbill", - params:queryParams, - body:{}, - options:{ - userService:false, - auth:false + url: "/billing-service/bill/v2/_fetchbill", + params: queryParams, + body: {}, + options: { + userService: false, + auth: false, }, config: { - enabled: !!queryParams.consumerCode && !!queryParams.tenantId && !!queryParams.businessService, - select:(data) => { - return data?.Bill?.[0] - } + enabled: !!queryParams.consumerCode && !!queryParams.tenantId && !!queryParams.businessService, + select: (data) => { + return data?.Bill?.[0]; + }, }, - } - - const { isLoading, data:bill, revalidate,isFetching,error } = Digit.Hooks.useCustomAPIHook(requestCriteria); + }; + + const { isLoading, data: bill, revalidate, isFetching, error } = Digit.Hooks.useCustomAPIHook(requestCriteria); const requestCriteriaForConnectionSearch = { - url:"/ws-services/wc/_search?", - params:queryParams, - body:{}, - options:{ - userService:false, - auth:false + url: "/ws-services/wc/_search?", + params: { ...queryParams, textSearch: queryParams.consumerCode }, + body: {}, + options: { + userService: false, + auth: false, }, config: { - enabled: !!queryParams.consumerCode && !!queryParams.tenantId && !!queryParams.businessService, - select:(data) => { - return data?.WaterConnection?.[0] - } + enabled: !!queryParams.consumerCode && !!queryParams.tenantId && !!queryParams.businessService, + select: (data) => { + return data?.WaterConnection?.[0]; + }, }, - } - const { isLoading:isLoadingConnection, data:connection,isFetching:isFetchingConnection,error:errorConnection } = Digit.Hooks.useCustomAPIHook(requestCriteriaForConnectionSearch); - + }; + const { isLoading: isLoadingConnection, data: connection, isFetching: isFetchingConnection, error: errorConnection } = Digit.Hooks.useCustomAPIHook( + requestCriteriaForConnectionSearch + ); const requestCriteriaForPayments = { - url:"/collection-services/payments/WS/_search", - params:queryParams, - body:{}, - options:{ - userService:false, - auth:false + url: "/collection-services/payments/WS/_search", + params: queryParams, + body: {}, + options: { + userService: false, + auth: false, }, config: { - enabled: !!queryParams.consumerCode && !!queryParams.tenantId && !!queryParams.businessService, - select:(data) => { - const payments = data?.Payments - if(payments?.length === 0){ - return null - }else if(payments?.length >5){ - return payments.slice(0,5) - }else{ - return payments - } + enabled: !!queryParams.consumerCode && !!queryParams.tenantId && !!queryParams.businessService, + select: (data) => { + const payments = data?.Payments; + if (payments?.length === 0) { + return null; + } else if (payments?.length > 5) { + return payments.slice(0, 5); + } else { + return payments; } + }, }, - } - - const { isLoading:isLoadingPayments, data:payments,isFetching:isFetchingPayments,error:isErrorPayments } = Digit.Hooks.useCustomAPIHook(requestCriteriaForPayments); + }; + + const { isLoading: isLoadingPayments, data: payments, isFetching: isFetchingPayments, error: isErrorPayments } = Digit.Hooks.useCustomAPIHook( + requestCriteriaForPayments + ); - const arrears = bill?.billDetails ?.sort((a, b) => b.fromPeriod - a.fromPeriod) ?.reduce((total, current, index) => (index === 0 ? total : total + current.amount), 0) || 0; - - const onSubmit = async () => { + + const onSubmit = async () => { const filterData = { Transaction: { tenantId: bill?.tenantId, @@ -102,10 +104,10 @@ const OpenView = () => { }, ], user: { - name: bill?.payerName, - mobileNumber: bill?.mobileNumber, + name: bill?.payerName, + mobileNumber: bill?.mobileNumber, tenantId: bill?.tenantId, - emailId: "sriranjan.srivastava@owc.com" + emailId: "sriranjan.srivastava@owc.com", }, // success // callbackUrl: `${window.location.protocol}//${window.location.host}/${window.contextPath}/citizen/openpayment/success?consumerCode=${queryParams.consumerCode}&tenantId=${queryParams.tenantId}&businessService=${queryParams.businessService}`, @@ -116,141 +118,76 @@ const OpenView = () => { }, }; - try { - const data = await Digit.PaymentService.createCitizenReciept(bill?.tenantId, filterData); - //dummy response - // const data = { - // "ResponseInfo": { - // "apiId": "Rainmaker", - // "ver": null, - // "ts": null, - // "resMsgId": "uief87324", - // "msgId": "1718644477119|en_IN", - // "status": "SUCCESSFUL" - // }, - // "Transaction": { - // "tenantId": "pb.abianakhurd", - // "txnAmount": "160", - // "billId": "3b27460b-d37e-4e0d-bd51-ed32f12e90e3", - // "module": "WS", - // "consumerCode": "WS/7141/2024-25/0316", - // "taxAndPayments": [ - // { - // "taxAmount": null, - // "amountPaid": 160, - // "billId": "3b27460b-d37e-4e0d-bd51-ed32f12e90e3" - // } - // ], - // "productInfo": "Common Payment", - // "gateway": "PAYGOV", - // "callbackUrl": "http://localhost:3000/mgramseva-web/employee/hrms/success?consumerCode=WS/7141/2024-25/0316&tenantId=pb.abianakhurd&businessService=WS&eg_pg_txnid=PB_PG_2024_06_17_0367_81", - // "txnId": "PB_PG_2024_06_17_0367_81", - // "user": { - // "uuid": "e18c2f5b-6035-4360-885b-dfd28b1159f0", - // "name": "hj", - // "userName": "9379239289", - // "mobileNumber": "9379239289", - // "emailId": null, - // "tenantId": "pb" - // }, - // "redirectUrl": "https://pilot.surepay.ndml.in/SurePayPayment/sp/processRequest?additionalField3=pb.abianakhurd&orderId=PB_PG_2024_06_17_0367_81&additionalField4=WS/7141/2024-25/0316&requestDateTime=17-06-202417:14:078&additionalField5=WSabianakhurd&successUrl=https://mgramseva-uat.psegs.in/pg-service/transaction/v1/_redirect?originalreturnurl=/mgramseva-web/employee/hrms/success?consumerCode=WS/7141/2024-25/0316&tenantId=pb.abianakhurd&businessService=WS&eg_pg_txnid=PB_PG_2024_06_17_0367_81&failUrl=https://mgramseva-uat.psegs.in/pg-service/transaction/v1/_redirect?originalreturnurl=/mgramseva-web/employee/hrms/success?consumerCode=WS/7141/2024-25/0316&tenantId=pb.abianakhurd&businessService=WS&eg_pg_txnid=PB_PG_2024_06_17_0367_81&txURL=https://pilot.surepay.ndml.in/SurePayPayment/sp/processRequest&messageType=0100&merchantId=UATPWSSG0000001429&transactionAmount=160&customerId=e18c2f5b-6035-4360-885b-dfd28b1159f0&checksum=3463857141&additionalField1=9379239289&additionalField2=111111&serviceId=WSabianakhurd¤cyCode=INR", - // "txnStatus": "PENDING", - // "txnStatusMsg": "Transaction initiated", - // "gatewayTxnId": null, - // "gatewayPaymentMode": null, - // "gatewayStatusCode": null, - // "gatewayStatusMsg": null, - // "receipt": null, - // "auditDetails": { - // "createdBy": "d158721b-5c25-421b-8c26-c63cf5d38825", - // "createdTime": 1718644478078, - // "lastModifiedBy": null, - // "lastModifiedTime": null - // }, - // "additionalDetails": { - // "isWhatsapp": false, - // "taxAndPayments": [ - // { - // "taxAmount": null, - // "amountPaid": 160, - // "billId": "3b27460b-d37e-4e0d-bd51-ed32f12e90e3" - // } - // ] - // }, - // "bankTransactionNo": null - // } - // } - const redirectUrl = data?.Transaction?.redirectUrl; - // paygov - try { - const gatewayParam = redirectUrl - ?.split("?") - ?.slice(1) - ?.join("?") - ?.split("&") - ?.reduce((curr, acc) => { - var d = acc.split("="); - curr[d[0]] = d[1]; - return curr; - }, {}); - var newForm = $("", { - action: gatewayParam.txURL, - method: "POST", - target: "_top", - }); - const orderForNDSLPaymentSite = [ - "checksum", - "messageType", - "merchantId", - "serviceId", - "orderId", - "customerId", - "transactionAmount", - "currencyCode", - "requestDateTime", - "successUrl", - "failUrl", - "additionalField1", - "additionalField2", - "additionalField3", - "additionalField4", - "additionalField5", - ]; - // override default date for UPYOG Custom pay - gatewayParam["requestDateTime"] = gatewayParam["requestDateTime"]?.split(new Date().getFullYear()).join(`${new Date().getFullYear()} `); - - gatewayParam["successUrl"]= redirectUrl?.split("successUrl=")?.[1]?.split("eg_pg_txnid=")?.[0]+'eg_pg_txnid=' +gatewayParam?.orderId; - gatewayParam["failUrl"]= redirectUrl?.split("failUrl=")?.[1]?.split("eg_pg_txnid=")?.[0]+'eg_pg_txnid=' +gatewayParam?.orderId; - // gatewayParam["successUrl"]= data?.Transaction?.callbackUrl; - // gatewayParam["failUrl"]= data?.Transaction?.callbackUrl; + const redirectUrl = data?.Transaction?.redirectUrl; + // paygov + try { + const gatewayParam = redirectUrl + ?.split("?") + ?.slice(1) + ?.join("?") + ?.split("&") + ?.reduce((curr, acc) => { + var d = acc.split("="); + curr[d[0]] = d[1]; + return curr; + }, {}); + var newForm = $("", { + action: gatewayParam.txURL, + method: "POST", + target: "_top", + }); + const orderForNDSLPaymentSite = [ + "checksum", + "messageType", + "merchantId", + "serviceId", + "orderId", + "customerId", + "transactionAmount", + "currencyCode", + "requestDateTime", + "successUrl", + "failUrl", + "additionalField1", + "additionalField2", + "additionalField3", + "additionalField4", + "additionalField5", + ]; - // var formdata = new FormData(); + // override default date for UPYOG Custom pay + gatewayParam["requestDateTime"] = gatewayParam["requestDateTime"]?.split(new Date().getFullYear()).join(`${new Date().getFullYear()} `); - for (var key of orderForNDSLPaymentSite) { + gatewayParam["successUrl"] = redirectUrl?.split("successUrl=")?.[1]?.split("eg_pg_txnid=")?.[0] + "eg_pg_txnid=" + gatewayParam?.orderId; + gatewayParam["failUrl"] = redirectUrl?.split("failUrl=")?.[1]?.split("eg_pg_txnid=")?.[0] + "eg_pg_txnid=" + gatewayParam?.orderId; + // gatewayParam["successUrl"]= data?.Transaction?.callbackUrl; + // gatewayParam["failUrl"]= data?.Transaction?.callbackUrl; - // formdata.append(key,gatewayParam[key]); + // var formdata = new FormData(); - newForm.append( - $("", { - name: key, - value: gatewayParam[key], - // type: "hidden", - }) - ); - } - $(document.body).append(newForm); - newForm.submit(); - makePayment(gatewayParam.txURL,newForm); + for (var key of orderForNDSLPaymentSite) { + // formdata.append(key,gatewayParam[key]); - } catch (e) { - console.log("Error in payment redirect ", e); - //window.location = redirectionUrl; + newForm.append( + $("", { + name: key, + value: gatewayParam[key], + // type: "hidden", + }) + ); } - - // window.location = redirectUrl; + $(document.body).append(newForm); + newForm.submit(); + makePayment(gatewayParam.txURL, newForm); + } catch (e) { + console.log("Error in payment redirect ", e); + //window.location = redirectionUrl; + } + + // window.location = redirectUrl; } catch (error) { let messageToShow = "CS_PAYMENT_UNKNOWN_ERROR_ON_SERVER"; if (error.response?.data?.Errors?.[0]) { @@ -259,72 +196,156 @@ const OpenView = () => { } setShowToast({ key: true, label: t(messageToShow) }); } + }; + if (isLoading || isLoadingPayments || isLoadingConnection) { + return ; } - if(isLoading || isLoadingPayments || isLoadingConnection){ - return - } - console.log(payments); return ( <> -
{t("OP_PAYMENT_DETAILS")}
- - {bill && - - {/* */} - {/* */} - - - {/*
*/} - {bill?.billDetails?.[0]?.billAccountDetails - ?.sort((a, b) => a.order - b.order) - .map((amountDetails, index) => ( +
+ {t("OP_PAYMENT_DETAILS")} +
+ + + {connection && ( + <> - ))} + + + + + + + )} + {bill ? ( + <> + {/* + */} + + {/*
*/} + {bill?.billDetails?.[0]?.billAccountDetails + ?.sort((a, b) => a.order - b.order) + .map((amountDetails, index) => ( + + ))} - {arrears?.toFixed?.(2) ? ( - - ) : null} + {arrears?.toFixed?.(2) ? ( + + ) : null} -
- -
} -
- {payments &&
{t("OP_CONSUMER_RECEIPTS")}
} - {payments && payments.map(payment => { - return ( - - - - - +
+ + + ) : ( +
{t("NO_BILLS_AVAILABLE")}
+ )}
-
- ) - })} - - - {/* {displayMenu ? : null} */} - - - {showToast && ( + + {payments && ( +
+ {t("OP_CONSUMER_RECEIPTS")} +
+ )} + {payments && + payments.map((payment) => { + return ( + + + + + + + + + ); + })} + + + {/* {displayMenu ? : null} */} + + + {showToast && ( { /> )} - ) -} + ); +}; -export default OpenView \ No newline at end of file +export default OpenView; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/Response.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/Response.js index 8dc10d578..75febdc5b 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/Response.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/Response.js @@ -208,7 +208,7 @@ export const convertEpochToDate = (dateEpoch) => { } payments.Payments[0].additionalDetails=details; paymentArray[0]=payments.Payments[0] - console.log("paymentArray",paymentArray) + // console.log("paymentArray",paymentArray) response = await Digit.PaymentService.generatePdf(state, { Payments: paymentArray }, generatePdfKey); } } @@ -278,7 +278,7 @@ export const convertEpochToDate = (dateEpoch) => { currentDate.getFullYear() + "-" + (currentDate.getMonth() + 1) + "-" + currentDate.getDate() ); let reqData = { ...bpaDataDetails, edcrDetail: [{ ...edcrData }] }; - console.log("reqData",reqData) + // console.log("reqData",reqData) let response = await Digit.PaymentService.generatePdf(bpaDataDetails?.tenantId, { Bpa: [reqData] }, order); const fileStore = await Digit.PaymentService.printReciept(bpaDataDetails?.tenantId, { fileStoreIds: response.filestoreIds[0] }); window.open(fileStore[response?.filestoreIds[0]], "_blank"); @@ -363,7 +363,7 @@ export const convertEpochToDate = (dateEpoch) => { //New Payment Reciept For PT module with year bifurcations const printRecieptNew = async (payment) => { - console.log("paymentpayment",payment,payment.Payments[0].paymentDetails[0].receiptNumber,payment.Payments[0]) + // console.log("paymentpayment",payment,payment.Payments[0].paymentDetails[0].receiptNumber,payment.Payments[0]) const tenantId = Digit.ULBService.getCurrentTenantId(); const state = Digit.ULBService.getStateId(); let paymentArray=[]; @@ -558,9 +558,9 @@ export const convertEpochToDate = (dateEpoch) => { } paymentArray[0]=payments.Payments[0] - console.log("payments",payments) + // console.log("payments",payments) response = await Digit.PaymentService.generatePdf(state, { Payments: paymentArray }, generatePdfKey); - console.log("responseresponse",response) + // console.log("responseresponse",response) } const fileStore = await Digit.PaymentService.printReciept(state, { fileStoreIds: response.filestoreIds[0] }); window.open(fileStore[response.filestoreIds[0]], "_blank"); diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/OpenSearchConfig.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/OpenSearchConfig.js index 184db7ae9..bf1cb7502 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/OpenSearchConfig.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/OpenSearchConfig.js @@ -2,7 +2,7 @@ export const OpenSearchConfig = { "label": "OPEN_PAYMENT_SEARCH", "type": "search", "apiDetails": { - "serviceName": "/billing-service/bill/v2/_fetchbill", + "serviceName": "/ws-services/wc/_search", "requestParam": {}, "requestBody": {}, "minParametersForSearchForm": 2, @@ -66,35 +66,80 @@ export const OpenSearchConfig = { "columns": [ { "label": "OP_CONS_CODE", - "jsonPath": "consumerCode", + "jsonPath": "connectionNo", "additionalCustomization": true }, + // { + // "label": "OP_BILL_NUM", + // "jsonPath": "billNumber", + // // "additionalCustomization": true + // }, { - "label": "OP_BILL_NUM", - "jsonPath": "billNumber", + "label": "OP_PAYER_NAME", + "jsonPath": "connectionHolders[0].name", // "additionalCustomization": true }, { - "label": "OP_PAYER_NAME", - "jsonPath": "payerName", + "label": "OP_APPLICATION_TYPE", + "jsonPath": "applicationType", + "additionalCustomization": true + }, + { + "label": "OP_CONNECTION_TYPE", + "jsonPath": "connectionType", + "additionalCustomization": true + }, + { + "label": "OP_METER_ID", + "jsonPath": "meterId", // "additionalCustomization": true }, { - "label": "OP_MOB_NO", - "jsonPath": "mobileNumber", + "label": "OP_CONNECTION_OLD_ID", + "jsonPath": "oldConnectionNo", // "additionalCustomization": true }, { - "label": "OP_BILL_DATE", - "jsonPath": "billDate", + "label": "OP_METER_INSTALLATION_DATE", + "jsonPath": "meterInstallationDate", "additionalCustomization": true }, { - "label": "OP_BILL_TOTAL_AMT", - "jsonPath": "totalAmount", + "label": "OP_METER_READING_DATE", + "jsonPath": "previousReadingDate", "additionalCustomization": true }, // { + // "label": "OP_PROPERTY_TYPE", + // "jsonPath": "additionalDetails.propertyType", + // "additionalCustomization": true + // }, + { + "label": "OP_APPLICATION_STATUS", + "jsonPath": "applicationStatus", + "additionalCustomization": true + }, + // { + // "label": "OP_SERVICE_TYPE", + // "jsonPath": "connectionType", + // "additionalCustomization": true + // }, + // { + // "label": "OP_MOB_NO", + // "jsonPath": "mobileNumber", + // // "additionalCustomization": true + // }, + // { + // "label": "OP_BILL_DATE", + // "jsonPath": "billDate", + // "additionalCustomization": true + // }, + // { + // "label": "OP_BILL_TOTAL_AMT", + // "jsonPath": "totalAmount", + // "additionalCustomization": true + // }, + // { // "label": "TQM_PLANT", // "jsonPath": "plantCode", // "additionalCustomization": false, @@ -130,7 +175,7 @@ export const OpenSearchConfig = { // "actionButtonLabelMobileCard": "TQM_VIEW_RESULTS", "enableGlobalSearch": false, "enableColumnSort": true, - "resultsJsonPath": "Bill", + "resultsJsonPath": "WaterConnection", "tableClassName":"table pqm-table" }, "children": {}, diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/UICustomizations.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/UICustomizations.js index 8b88265b0..c64f4f69d 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/UICustomizations.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/UICustomizations.js @@ -18,11 +18,13 @@ export const UICustomizations = { tenantId = additionalDetails?.queryParams?.tenantId } const finalParams = { - consumerCode, + // consumerCode, tenantId, - businessService + businessService, + textSearch:consumerCode } data.params = finalParams + // data.params.textSearch = finalParams.consumerCode // const tenantId = Digit.ULBService.getCurrentTenantId(); // data.body = { RequestInfo: data.body.RequestInfo }; // const { limit, offset } = data?.state?.tableForm || {}; @@ -55,6 +57,47 @@ export const UICustomizations = { return data; }, additionalCustomizations: (row, key, column, value, t, searchResult) => { + + switch (key) { + case "OP_CONS_CODE": + return + + {String(value ? (column.translate ? t(column.prefix ? `${column.prefix}${value}` : value) : value) : t("ES_COMMON_NA"))} + + + + case "OP_APPLICATION_TYPE": + return
+ { value ? t(Digit.Utils.locale.getTransformedLocale(`OP_APPLICATION_TYPE_${value}`)) : t("ES_COMMON_NA")} +
+ + case "OP_APPLICATION_STATUS": + return
+ { value ? t(Digit.Utils.locale.getTransformedLocale(`OP_APPLICATION_STATUS_${value}`)) : t("ES_COMMON_NA")} +
+ case "OP_CONNECTION_TYPE": + return
+ { value ? t(Digit.Utils.locale.getTransformedLocale(`OP_CONNECTION_TYPE_${value}`)) : t("ES_COMMON_NA")} +
+ case "OP_METER_INSTALLATION_DATE": + return
+ {value ? Digit.DateUtils.ConvertEpochToDate(value) : t("ES_COMMON_NA")} +
+ case "OP_METER_READING_DATE": + return
+ {value ? Digit.DateUtils.ConvertEpochToDate(value) : t("ES_COMMON_NA")} +
+ case "OP_PROPERTY_TYPE": + return
+ { value ? t(Digit.Utils.locale.getTransformedLocale(`OP_PROPERTY_TYPE_${value}`)) : t("ES_COMMON_NA")} +
+ + + default: + return {t("ES_COMMON_DEFAULT_NA")} + } if (key === "OP_BILL_DATE") { return Digit.DateUtils.ConvertEpochToDate(value); } diff --git a/frontend/micro-ui/web/package.json b/frontend/micro-ui/web/package.json index b93bd284d..da418c3ac 100644 --- a/frontend/micro-ui/web/package.json +++ b/frontend/micro-ui/web/package.json @@ -22,7 +22,7 @@ "@egovernments/digit-ui-module-hrms": "1.5.27", "@egovernments/digit-ui-module-pgr": "1.7.0", "@egovernments/digit-ui-module-engagement": "1.5.20", - "@egovernments/digit-ui-module-payment":"0.0.5", + "@egovernments/digit-ui-module-payment":"0.0.6", "@egovernments/digit-ui-react-components": "1.5.26", "babel-loader": "8.1.0", "clean-webpack-plugin": "4.0.0", diff --git a/frontend/micro-ui/web/src/Customisations/UICustomizations.js b/frontend/micro-ui/web/src/Customisations/UICustomizations.js index e42553460..c9c517e6d 100644 --- a/frontend/micro-ui/web/src/Customisations/UICustomizations.js +++ b/frontend/micro-ui/web/src/Customisations/UICustomizations.js @@ -440,11 +440,13 @@ export const UICustomizations = { tenantId = additionalDetails?.queryParams?.tenantId } const finalParams = { - consumerCode, + // consumerCode, tenantId, - businessService + businessService, + textSearch:consumerCode } data.params = finalParams + // data.params.textSearch = finalParams.consumerCode // const tenantId = Digit.ULBService.getCurrentTenantId(); // data.body = { RequestInfo: data.body.RequestInfo }; // const { limit, offset } = data?.state?.tableForm || {}; @@ -477,6 +479,47 @@ export const UICustomizations = { return data; }, additionalCustomizations: (row, key, column, value, t, searchResult) => { + + switch (key) { + case "OP_CONS_CODE": + return + + {String(value ? (column.translate ? t(column.prefix ? `${column.prefix}${value}` : value) : value) : t("ES_COMMON_NA"))} + + + + case "OP_APPLICATION_TYPE": + return
+ { value ? t(Digit.Utils.locale.getTransformedLocale(`OP_APPLICATION_TYPE_${value}`)) : t("ES_COMMON_NA")} +
+ + case "OP_APPLICATION_STATUS": + return
+ { value ? t(Digit.Utils.locale.getTransformedLocale(`OP_APPLICATION_STATUS_${value}`)) : t("ES_COMMON_NA")} +
+ case "OP_CONNECTION_TYPE": + return
+ { value ? t(Digit.Utils.locale.getTransformedLocale(`OP_CONNECTION_TYPE_${value}`)) : t("ES_COMMON_NA")} +
+ case "OP_METER_INSTALLATION_DATE": + return
+ {value ? Digit.DateUtils.ConvertEpochToDate(value) : t("ES_COMMON_NA")} +
+ case "OP_METER_READING_DATE": + return
+ {value ? Digit.DateUtils.ConvertEpochToDate(value) : t("ES_COMMON_NA")} +
+ case "OP_PROPERTY_TYPE": + return
+ { value ? t(Digit.Utils.locale.getTransformedLocale(`OP_PROPERTY_TYPE_${value}`)) : t("ES_COMMON_NA")} +
+ + + default: + return {t("ES_COMMON_DEFAULT_NA")} + } if (key === "OP_BILL_DATE") { return Digit.DateUtils.ConvertEpochToDate(value); } From d9d2ad848bb0ccff0795cbcac6dc3c8491da7563 Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Wed, 26 Jun 2024 19:19:22 +0530 Subject: [PATCH 056/118] back btn CSS updated --- .../packages/modules/hrms/src/pages/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/index.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/index.js index c357e7fe0..50c5a0c62 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/index.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/index.js @@ -42,7 +42,10 @@ const EmployeeApp = ({ path, url, userType }) => { {" "} / {location.pathname === `/${window?.contextPath}/employee/hrms/inbox` ? t("HR_COMMON_HEADER") : t("HR_COMMON_HEADER")}

- + Date: Thu, 27 Jun 2024 11:44:57 +0530 Subject: [PATCH 057/118] updated to payment module --- .../packages/modules/payment/src/components/Response.js | 5 ++--- .../packages/modules/payment/src/configs/OpenSearchConfig.js | 2 +- .../packages/modules/payment/src/pages/citizen/index.js | 4 +++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/Response.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/Response.js index 75febdc5b..e464f51ee 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/Response.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/Response.js @@ -73,7 +73,6 @@ export const convertEpochToDate = (dateEpoch) => { enabled: allowFetchBill, } ); - const { data: generatePdfKey } = Digit.Hooks.useCommonMDMS(newTenantId, "common-masters", "ReceiptKey", { select: (data) => data["common-masters"]?.uiCommonPay?.filter(({ code }) => business_service?.includes(code))[0]?.receiptKey || "consolidatedreceipt", @@ -587,7 +586,7 @@ export const convertEpochToDate = (dateEpoch) => { /> {t(`${bannerText}_DETAIL`)} - + {/** TODO : move this key and value into the hook based on business Service */} {(business_service === "PT" || workflw) && ( { rowContainerStyle={rowContainerStyle} last label={t(ommitRupeeSymbol ? "CS_PAYMENT_AMOUNT_PAID_WITHOUT_SYMBOL" : "CS_PAYMENT_AMOUNT_PAID")} - text={reciept_data?.paymentDetails?.[0]?.totalAmountPaid ? ("₹ " + reciept_data?.paymentDetails?.[0]?.totalAmountPaid) : `₹ 0` } + text={paymentData?.totalAmountPaid ? ("₹ " + paymentData?.totalAmountPaid) : `₹ 0` } /> {(business_service !== "PT" || workflw) && ( { const { t } = useTranslation(); const location = useLocation(); const commonProps = { stateCode:"pb", cityCode:"pb.abianakhurd", moduleCode:"WS" }; + const excludeBackBtn = ["/response","/open-search","/success"] + return (
- {!location.pathname.includes("response") && {t("CS_COMMON_BACK")}} + {!excludeBackBtn?.some(url => location.pathname.includes(url)) && {t("CS_COMMON_BACK")}}
In Open Payment Module
} /> } /> From 71e1050a885d299acdc49abbb536bc50c9ad8bfb Mon Sep 17 00:00:00 2001 From: Nipun Arora Date: Thu, 27 Jun 2024 11:45:31 +0530 Subject: [PATCH 058/118] incremented pkg version --- frontend/micro-ui/web/micro-ui-internals/example/package.json | 2 +- .../micro-ui-internals/packages/modules/payment/package.json | 2 +- frontend/micro-ui/web/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/example/package.json b/frontend/micro-ui/web/micro-ui-internals/example/package.json index 8aa4dc900..926c63fc7 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/package.json +++ b/frontend/micro-ui/web/micro-ui-internals/example/package.json @@ -14,7 +14,7 @@ "@egovernments/digit-ui-module-core": "1.5.46", "@egovernments/digit-ui-module-hrms": "1.5.27", "@egovernments/digit-ui-module-pgr": "1.7.0", - "@egovernments/digit-ui-module-payment":"0.0.6", + "@egovernments/digit-ui-module-payment":"0.0.7", "@egovernments/digit-ui-module-engagement": "1.5.20", "@egovernments/digit-ui-react-components": "1.5.26", "http-proxy-middleware": "^1.0.5", diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json index d12cc7ae7..84124c25c 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-payment", - "version": "0.0.6", + "version": "0.0.7", "description": "Open Payments", "main": "dist/index.js", "module": "dist/index.modern.js", diff --git a/frontend/micro-ui/web/package.json b/frontend/micro-ui/web/package.json index da418c3ac..5b19b9cb3 100644 --- a/frontend/micro-ui/web/package.json +++ b/frontend/micro-ui/web/package.json @@ -22,7 +22,7 @@ "@egovernments/digit-ui-module-hrms": "1.5.27", "@egovernments/digit-ui-module-pgr": "1.7.0", "@egovernments/digit-ui-module-engagement": "1.5.20", - "@egovernments/digit-ui-module-payment":"0.0.6", + "@egovernments/digit-ui-module-payment":"0.0.7", "@egovernments/digit-ui-react-components": "1.5.26", "babel-loader": "8.1.0", "clean-webpack-plugin": "4.0.0", From 55ddf3dfa8444f9f65be1db2950888b17ecc09cb Mon Sep 17 00:00:00 2001 From: Nipun Arora Date: Thu, 27 Jun 2024 12:21:07 +0530 Subject: [PATCH 059/118] updated payment module --- .../micro-ui/web/micro-ui-internals/example/package.json | 2 +- .../packages/modules/payment/package.json | 2 +- .../packages/modules/payment/src/components/Response.js | 6 +++--- frontend/micro-ui/web/package.json | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/example/package.json b/frontend/micro-ui/web/micro-ui-internals/example/package.json index 926c63fc7..addd8343b 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/package.json +++ b/frontend/micro-ui/web/micro-ui-internals/example/package.json @@ -14,7 +14,7 @@ "@egovernments/digit-ui-module-core": "1.5.46", "@egovernments/digit-ui-module-hrms": "1.5.27", "@egovernments/digit-ui-module-pgr": "1.7.0", - "@egovernments/digit-ui-module-payment":"0.0.7", + "@egovernments/digit-ui-module-payment":"0.0.8", "@egovernments/digit-ui-module-engagement": "1.5.20", "@egovernments/digit-ui-react-components": "1.5.26", "http-proxy-middleware": "^1.0.5", diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json index 84124c25c..d3926bb5c 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-payment", - "version": "0.0.7", + "version": "0.0.8", "description": "Open Payments", "main": "dist/index.js", "module": "dist/index.modern.js", diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/Response.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/Response.js index e464f51ee..3336a879d 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/Response.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/Response.js @@ -107,7 +107,7 @@ export const convertEpochToDate = (dateEpoch) => { if (isError || !payments || !payments.Payments || payments.Payments.length === 0 || data.txnStatus === "FAILURE") { return ( - + { // if ((window.location.href.includes("bpa") || window.location.href.includes("BPA")) && isBpaSearchLoading) return return ( - + @@ -710,7 +710,7 @@ export const FailedPayment = (props) => { const {consumerCode} = Digit.Hooks.useQueryParams(); const getMessage = () => "Failure !"; return ( - + {t("ES_COMMON_TRACK_COMPLAINT_TEXT")} diff --git a/frontend/micro-ui/web/package.json b/frontend/micro-ui/web/package.json index 5b19b9cb3..c9f9de17f 100644 --- a/frontend/micro-ui/web/package.json +++ b/frontend/micro-ui/web/package.json @@ -22,7 +22,7 @@ "@egovernments/digit-ui-module-hrms": "1.5.27", "@egovernments/digit-ui-module-pgr": "1.7.0", "@egovernments/digit-ui-module-engagement": "1.5.20", - "@egovernments/digit-ui-module-payment":"0.0.7", + "@egovernments/digit-ui-module-payment":"0.0.8", "@egovernments/digit-ui-react-components": "1.5.26", "babel-loader": "8.1.0", "clean-webpack-plugin": "4.0.0", From c9b03866ab436cc033dd829b579b33ef7fb3f470 Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Thu, 27 Jun 2024 15:04:57 +0530 Subject: [PATCH 060/118] Default Select Tenents Check Box Fixed --- .../modules/hrms/src/components/pageComponents/Multiselect.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/Multiselect.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/Multiselect.js index 7020d3f4a..752bec612 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/Multiselect.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/Multiselect.js @@ -109,7 +109,9 @@ const MultiSelectDropdown = ({ useEffect(()=>{ if (alreadyQueuedSelectedState?.length === filteredOptions?.length){ + if(alreadyQueuedSelectedState?.length != 0 && filteredOptions?.length != 0){ setIsSelected(true) + } }else{ setIsSelected(false) From 8592c65867c8c8862453475cb813a07100367574 Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Thu, 27 Jun 2024 16:03:14 +0530 Subject: [PATCH 061/118] Duplicate Tenent ID FormSubmit Prevented --- .../hrms/src/pages/EditEmployee/EditForm.js | 23 ++++++++++++++++++- .../modules/hrms/src/pages/createEmployee.js | 21 ++++++++++++++++- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/EditEmployee/EditForm.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/EditEmployee/EditForm.js index b10a5c5c4..ec159e99c 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/EditEmployee/EditForm.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/EditEmployee/EditForm.js @@ -112,6 +112,25 @@ const EditForm = ({ tenantId, data }) => { return validEmail && name.match(Digit.Utils.getPattern("Name")); }; + + function hasUniqueTenantIds(items) { + // Create a Set to efficiently store unique tenantIds + const uniqueTenantIds = new Set(); + // Iterate through each item + for (const item of items) { + const tenantId = item.tenantId; + // Check if tenantId already exists in the Set + if (uniqueTenantIds.has(tenantId)) { + // Duplicate found, return false + return false; + } + // Add unique tenantId to the Set + uniqueTenantIds.add(tenantId); + } + // No duplicates found, all tenantIds are unique + return true; + } + const onFormValueChange = (setValue = true, formData) => { if (formData?.SelectEmployeePhoneNumber?.mobileNumber) { setMobileNumber(formData?.SelectEmployeePhoneNumber?.mobileNumber); @@ -132,6 +151,7 @@ const EditForm = ({ tenantId, data }) => { } } } + if ( formData?.SelectEmployeeGender?.gender.code && formData?.SelectEmployeeName?.employeeName && @@ -142,7 +162,8 @@ const EditForm = ({ tenantId, data }) => { && checkfield && phonecheck && - checkMailNameNum(formData) + checkMailNameNum(formData)&& + hasUniqueTenantIds(formData?.Jurisdictions) ) { setSubmitValve(true); } else { diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/createEmployee.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/createEmployee.js index 2097d8cd7..411ae2229 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/createEmployee.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/createEmployee.js @@ -85,6 +85,24 @@ const CreateEmployee = () => { const employeeCreateSession = Digit.Hooks.useSessionStorage("NEW_EMPLOYEE_CREATE", {}); const [sessionFormData, setSessionFormData, clearSessionFormData] = employeeCreateSession; + function hasUniqueTenantIds(items) { + // Create a Set to efficiently store unique tenantIds + const uniqueTenantIds = new Set(); + // Iterate through each item + for (const item of items) { + const tenantId = item.tenantId; + // Check if tenantId already exists in the Set + if (uniqueTenantIds.has(tenantId)) { + // Duplicate found, return false + return false; + } + // Add unique tenantId to the Set + uniqueTenantIds.add(tenantId); + } + // No duplicates found, all tenantIds are unique + return true; + } + const onFormValueChange = (setValue = true, formData) => { if (!_.isEqual(sessionFormData, formData)) { setSessionFormData({ ...sessionFormData, ...formData }); @@ -120,7 +138,8 @@ const CreateEmployee = () => { && checkfield && phonecheck && - checkMailNameNum(formData) + checkMailNameNum(formData) && + hasUniqueTenantIds(formData?.Jurisdictions) ) { setSubmitValve(true); } else { From 7cf3391caba866468e7cc99a8362a2da8d15cc7e Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Fri, 28 Jun 2024 13:19:50 +0530 Subject: [PATCH 062/118] ISTE-34 : Mark this bill as canceled disabled for paid radio button --- .../mgramseva/lib/screeens/add_expense/expense_details.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/mgramseva/lib/screeens/add_expense/expense_details.dart b/frontend/mgramseva/lib/screeens/add_expense/expense_details.dart index ae4a8085d..a326288b6 100644 --- a/frontend/mgramseva/lib/screeens/add_expense/expense_details.dart +++ b/frontend/mgramseva/lib/screeens/add_expense/expense_details.dart @@ -579,7 +579,7 @@ class _ExpenseDetailsState extends State { onChanged: expensesDetailsProvider .expenditureDetails .allowEdit == - true + true && expensesDetailsProvider.expenditureDetails.isBillPaid == false ? expensesDetailsProvider .onChangeOfCheckBox : null), @@ -594,7 +594,7 @@ class _ExpenseDetailsState extends State { color: expensesDetailsProvider .expenditureDetails .allowEdit == - true + true && expensesDetailsProvider.expenditureDetails.isBillPaid == false ? Colors.black : Colors.grey, fontWeight: From 1d55071e663f1aca59bd29ed81fcf5d1e3617025 Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Fri, 28 Jun 2024 17:38:55 +0530 Subject: [PATCH 063/118] Back btn Icon added --- .../packages/modules/hrms/src/pages/index.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/index.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/index.js index 50c5a0c62..fc088a989 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/index.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/index.js @@ -42,11 +42,7 @@ const EmployeeApp = ({ path, url, userType }) => { {" "} / {location.pathname === `/${window?.contextPath}/employee/hrms/inbox` ? t("HR_COMMON_HEADER") : t("HR_COMMON_HEADER")}

- - +
history.goBack()}>

Back

( From 3db93f279fac7c50e9e99c2194a9db8f6b3fbfbb Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Fri, 28 Jun 2024 18:10:40 +0530 Subject: [PATCH 064/118] style update input --- .../packages/css/src/components/textfields.scss | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/textfields.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/textfields.scss index 6d73f74e6..233153613 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/textfields.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/textfields.scss @@ -11,10 +11,9 @@ } .employee-card-input-only { - @apply mb-lg pl-sm outline-none block border w-full h-12 border-input-border border-solid bg-white leading-10 text-form-field text-text-primary; } .employee-card-input-only .employee-card-input { - border: none; + @apply mb-lg pl-sm outline-none block border w-full h-12 border-input-border border-solid bg-white leading-10 text-form-field text-text-primary; } From 498b79bec6f037cd8cbc3a3429af5b93878d4532 Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Mon, 1 Jul 2024 11:14:21 +0530 Subject: [PATCH 065/118] PayGov Changes and missing commits --- .../mgramseva/lib/screeens/add_expense/expense_details.dart | 4 ++-- .../packages/css/src/components/textfields.scss | 2 +- .../packages/modules/hrms/src/pages/index.js | 5 +---- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/frontend/mgramseva/lib/screeens/add_expense/expense_details.dart b/frontend/mgramseva/lib/screeens/add_expense/expense_details.dart index ae4a8085d..a30be7781 100644 --- a/frontend/mgramseva/lib/screeens/add_expense/expense_details.dart +++ b/frontend/mgramseva/lib/screeens/add_expense/expense_details.dart @@ -579,7 +579,7 @@ class _ExpenseDetailsState extends State { onChanged: expensesDetailsProvider .expenditureDetails .allowEdit == - true + true && expensesDetailsProvider.expenditureDetails.isBillPaid == false ? expensesDetailsProvider .onChangeOfCheckBox : null), @@ -594,7 +594,7 @@ class _ExpenseDetailsState extends State { color: expensesDetailsProvider .expenditureDetails .allowEdit == - true + true && expensesDetailsProvider.expenditureDetails.isBillPaid == false ? Colors.black : Colors.grey, fontWeight: diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/textfields.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/textfields.scss index 6d73f74e6..a17a34578 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/textfields.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/textfields.scss @@ -11,10 +11,10 @@ } .employee-card-input-only { - @apply mb-lg pl-sm outline-none block border w-full h-12 border-input-border border-solid bg-white leading-10 text-form-field text-text-primary; } .employee-card-input-only .employee-card-input { border: none; + @apply mb-lg pl-sm outline-none block border w-full h-12 border-input-border border-solid bg-white leading-10 text-form-field text-text-primary; } diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/index.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/index.js index 50c5a0c62..5e93c376a 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/index.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/index.js @@ -42,10 +42,7 @@ const EmployeeApp = ({ path, url, userType }) => { {" "} / {location.pathname === `/${window?.contextPath}/employee/hrms/inbox` ? t("HR_COMMON_HEADER") : t("HR_COMMON_HEADER")}

- +
history.goBack()}>

Back

Date: Mon, 1 Jul 2024 14:58:26 +0530 Subject: [PATCH 066/118] ISTE-179: Added chnages to get latest demand created date and penalty created date --- .../model/AggregatedDemandDetailResponse.java | 4 ++ .../egov/demand/service/DemandService.java | 47 ++++++++++++++++++- 2 files changed, 50 insertions(+), 1 deletion(-) diff --git a/business-services/billing-service/src/main/java/org/egov/demand/model/AggregatedDemandDetailResponse.java b/business-services/billing-service/src/main/java/org/egov/demand/model/AggregatedDemandDetailResponse.java index 1feca1ce4..523548b53 100644 --- a/business-services/billing-service/src/main/java/org/egov/demand/model/AggregatedDemandDetailResponse.java +++ b/business-services/billing-service/src/main/java/org/egov/demand/model/AggregatedDemandDetailResponse.java @@ -38,4 +38,8 @@ public class AggregatedDemandDetailResponse { private BigDecimal netDueWithPenalty; private BigDecimal totalApplicablePenalty; + + private long latestDemandCreatedTime; + + private long latestDemandPenaltyCreatedtime; } \ No newline at end of file diff --git a/business-services/billing-service/src/main/java/org/egov/demand/service/DemandService.java b/business-services/billing-service/src/main/java/org/egov/demand/service/DemandService.java index 743f1db6c..acc049f64 100644 --- a/business-services/billing-service/src/main/java/org/egov/demand/service/DemandService.java +++ b/business-services/billing-service/src/main/java/org/egov/demand/service/DemandService.java @@ -571,6 +571,9 @@ public DemandHistory getDemandHistory(@Valid DemandCriteria demandCriteria, Requ public AggregatedDemandDetailResponse getAllDemands(DemandCriteria demandCriteria, RequestInfo requestInfo) { //demandValidatorV1.validateDemandCriteria(demandCriteria, requestInfo); + long latestDemandCreatedTime = 0l; + + long latestDemandPenaltyCreatedtime=0l; UserSearchRequest userSearchRequest = null; List payers = null; @@ -618,6 +621,46 @@ public AggregatedDemandDetailResponse getAllDemands(DemandCriteria demandCriteri }).collect(Collectors.toList()); List>> demandDetailsList = new ArrayList<>(); + List demandsTogetDemandGeneratedDate= demands; + + // Filter demands where demandDetails have taxHeadMasterCode as 10101 + List filteredDemands = demandsTogetDemandGeneratedDate.stream() + .filter(demand -> demand.getDemandDetails().stream() + .anyMatch(detail -> "10101".equals(detail.getTaxHeadMasterCode()))) + .collect(Collectors.toList()); + + Collections.sort(filteredDemands, new Comparator() { + @Override + public int compare(Demand d1, Demand d2) { + return Long.compare(d2.getTaxPeriodFrom(), d1.getTaxPeriodFrom()); + } + }); + + + + if (!filteredDemands.isEmpty()) { + Demand latestDemand = filteredDemands.get(0); + + Optional detail10101 = latestDemand.getDemandDetails().stream() + .filter(detail -> "10101".equals(detail.getTaxHeadMasterCode())) + .findFirst(); + + Optional detailWSTimePenalty = latestDemand.getDemandDetails().stream() + .filter(detail -> "WS_TIME_PENALTY".equals(detail.getTaxHeadMasterCode())) + .findFirst(); + + if (detail10101.isPresent()) { + latestDemandCreatedTime = detail10101.get().getAuditDetails().getCreatedTime(); + } + + if (detailWSTimePenalty.isPresent()) { + latestDemandPenaltyCreatedtime = detailWSTimePenalty.get().getAuditDetails().getCreatedTime(); + } + } else { + log.info("No demands found with taxHeadMasterCode 10101 or WS_TIME_PENALTY."); + } + + for (Demand demand : demands) { log.info("Inside demand"); Map> demandMap = new HashMap<>(); @@ -772,7 +815,9 @@ public AggregatedDemandDetailResponse getAllDemands(DemandCriteria demandCriteri .advanceAdjusted(advanceAdjusted) .advanceAvailable(advanceAvailable) .remainingAdvance(remainingAdvance) - .totalApplicablePenalty(totalApplicablePenalty).build(); + .totalApplicablePenalty(totalApplicablePenalty) + .latestDemandCreatedTime(latestDemandCreatedTime) + .latestDemandPenaltyCreatedtime(latestDemandPenaltyCreatedtime).build(); return aggregatedDemandDetailResponse; From c87d577681b68007b262f93ffd6f5044b528da8d Mon Sep 17 00:00:00 2001 From: Taniya-eGov <103186387+Taniya-eGov@users.noreply.github.com> Date: Mon, 1 Jul 2024 15:46:56 +0530 Subject: [PATCH 067/118] updated filename for billing service --- ....sql => V20221206104422__egbs_bill_alter_add_consumercode.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename business-services/billing-service/src/main/resources/db/migration/main/{V20221206104420__egbs_bill_alter_add_consumercode.sql => V20221206104422__egbs_bill_alter_add_consumercode.sql} (100%) diff --git a/business-services/billing-service/src/main/resources/db/migration/main/V20221206104420__egbs_bill_alter_add_consumercode.sql b/business-services/billing-service/src/main/resources/db/migration/main/V20221206104422__egbs_bill_alter_add_consumercode.sql similarity index 100% rename from business-services/billing-service/src/main/resources/db/migration/main/V20221206104420__egbs_bill_alter_add_consumercode.sql rename to business-services/billing-service/src/main/resources/db/migration/main/V20221206104422__egbs_bill_alter_add_consumercode.sql From 545419f853ba12b64c607747d9d79a0a20214bbf Mon Sep 17 00:00:00 2001 From: Nipun Arora Date: Tue, 2 Jul 2024 12:38:21 +0530 Subject: [PATCH 068/118] updates to payment module --- .../micro-ui-internals/example/.env-mgram-uat | 7 ++++ .../example/src/UICustomizations.js | 13 ++++++++ .../src/components/TopBarSideBar/TopBar.js | 4 +-- .../packages/modules/payment/package.json | 2 +- .../payment/src/components/OpenView.js | 13 ++++---- .../payment/src/components/Response.js | 5 ++- .../payment/src/configs/OpenSearchConfig.js | 32 +++++++++++-------- .../payment/src/configs/UICustomizations.js | 14 ++++++++ 8 files changed, 66 insertions(+), 24 deletions(-) create mode 100644 frontend/micro-ui/web/micro-ui-internals/example/.env-mgram-uat diff --git a/frontend/micro-ui/web/micro-ui-internals/example/.env-mgram-uat b/frontend/micro-ui/web/micro-ui-internals/example/.env-mgram-uat new file mode 100644 index 000000000..691df07e8 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/example/.env-mgram-uat @@ -0,0 +1,7 @@ +SKIP_PREFLIGHT_CHECK=true +REACT_APP_USER_TYPE=EMPLOYEE +REACT_APP_EMPLOYEE_TOKEN=c835932f-2ad4-4d05-83d6-49e0b8c59f8a +REACT_APP_CITIZEN_TOKEN=7cd58aae-30b3-41ed-a1b3-3417107a993c +REACT_APP_PROXY_API=https://mgramseva-uat.psegs.in +REACT_APP_PROXY_ASSETS=https://mgramseva-uat.psegs.in +REACT_APP_GLOBAL=https://egov-dev-assets.s3.ap-south-1.amazonaws.com/globalConfigsMgramsewa.js \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js b/frontend/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js index c9c517e6d..3af34d215 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js +++ b/frontend/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js @@ -7,6 +7,15 @@ import _ from "lodash"; var Digit = window.Digit || {}; +function anonymizeHalfString(input) { + // Calculate the midpoint of the string + const midpoint = Math.ceil(input.length / 2); + + // Replace the first 50% of the string with asterisks + const anonymized = "*".repeat(midpoint) + input.substring(midpoint); + + return anonymized; +} const businessServiceMap = { @@ -515,6 +524,10 @@ export const UICustomizations = { return
{ value ? t(Digit.Utils.locale.getTransformedLocale(`OP_PROPERTY_TYPE_${value}`)) : t("ES_COMMON_NA")}
+ case "OP_PAYER_NAME": + return
+ {value ? anonymizeHalfString(value) : t("ES_COMMON_NA")} +
default: diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/TopBar.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/TopBar.js index efaa32f86..af1405bd3 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/TopBar.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/TopBar.js @@ -74,8 +74,8 @@ const TopBar = ({ const urlsToDisableNotificationIcon = (pathname) => !!Digit.UserService?.getUser()?.access_token ? false - : [`/${window?.contextPath}/citizen/select-language`, `/${window?.contextPath}/citizen/select-location`].includes(pathname); - + : [`/${window?.contextPath}/citizen/select-language`, `/${window?.contextPath}/citizen/select-location`,`/mgramseva-web/citizen/payment`].includes(pathname); + if (CITIZEN) { return (
diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json index d3926bb5c..dc1198eff 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json @@ -18,7 +18,7 @@ "react-router-dom": "5.3.0" }, "dependencies": { - "@egovernments/digit-ui-react-components": "1.8.2-beta.4", + "@egovernments/digit-ui-react-components": "1.8.2-beta.9", "@egovernments/digit-ui-components": "0.0.2-beta.1", "react": "17.0.2", "react-dom": "17.0.2", diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js index c5a0d7467..eb8b08244 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js @@ -221,7 +221,7 @@ const OpenView = () => { text={connection?.connectionHolders?.[0]?.name ? anonymizeHalfString(connection?.connectionHolders?.[0]?.name) : t("ES_COMMON_NA")} rowContainerStyle={{ border: "none" }} /> - { : t("ES_COMMON_NA") } rowContainerStyle={{ border: "none" }} - /> + /> */} { { // textStyle={{ fontWeight: "bold" }} text={payment?.transactionDate ? Digit.DateUtils.ConvertEpochToDate(payment?.transactionDate) : t("ES_COMMON_NA")} /> - + /> */} ); @@ -352,6 +352,7 @@ const OpenView = () => { onClose={() => { setShowToast(null); }} + isDleteBtn={true} /> )} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/Response.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/Response.js index 3336a879d..d63ff9318 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/Response.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/Response.js @@ -75,7 +75,7 @@ export const convertEpochToDate = (dateEpoch) => { ); const { data: generatePdfKey } = Digit.Hooks.useCommonMDMS(newTenantId, "common-masters", "ReceiptKey", { select: (data) => - data["common-masters"]?.uiCommonPay?.filter(({ code }) => business_service?.includes(code))[0]?.receiptKey || "consolidatedreceipt", + data["common-masters"]?.uiCommonPay?.filter(({ code }) => business_service?.includes(code))[0]?.receiptKey || "ws-receipt", retry: false, staleTime: Infinity, refetchOnWindowFocus: false, @@ -673,6 +673,9 @@ export const convertEpochToDate = (dateEpoch) => { {t("CS_DOWNLOAD_RECEIPT")}
) : null} + {business_service?.includes("WS") ? + + :null} {business_service?.includes("SW") ? (
{t("CS_DOWNLOAD_RECEIPT")} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/OpenSearchConfig.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/OpenSearchConfig.js index 7da491bdc..fcf81daa3 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/OpenSearchConfig.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/OpenSearchConfig.js @@ -26,18 +26,6 @@ export const OpenSearchConfig = { "consumerCode": "" }, "fields": [ - { - "label": "CONNECTION_ID", - "type": "text", - "isMandatory": false, - "disable": false, - "populators": { - "name": "consumerCode", - "style":{ - "marginBottom":"0px" - } - }, - }, { label: "SELECT_TENANT", type: "apidropdown", @@ -55,6 +43,22 @@ export const OpenSearchConfig = { customfn: "populateReqCriteria", }, }, + { + "label": "CONNECTION_ID", + "type": "text", + "isMandatory": false, + "disable": false, + "populators": { + "name": "consumerCode", + "style":{ + "marginBottom":"0px" + }, + "placeholder":"WS/7141/2024-25/****", + // "validation":{ + // "maxLength":"1" + // } + }, + }, ] }, "label": "", @@ -77,7 +81,7 @@ export const OpenSearchConfig = { { "label": "OP_PAYER_NAME", "jsonPath": "connectionHolders[0].name", - // "additionalCustomization": true + "additionalCustomization": true }, { "label": "OP_APPLICATION_TYPE", @@ -116,7 +120,7 @@ export const OpenSearchConfig = { // }, { "label": "OP_APPLICATION_STATUS", - "jsonPath": "applicationStatus", + "jsonPath": "status", "additionalCustomization": true }, // { diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/UICustomizations.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/UICustomizations.js index c64f4f69d..3bece21e2 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/UICustomizations.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/UICustomizations.js @@ -2,6 +2,16 @@ import { Link, useHistory } from "react-router-dom"; import _ from "lodash"; import React from "react"; +function anonymizeHalfString(input) { + // Calculate the midpoint of the string + const midpoint = Math.ceil(input.length / 2); + + // Replace the first 50% of the string with asterisks + const anonymized = "*".repeat(midpoint) + input.substring(midpoint); + + return anonymized; +} + export const UICustomizations = { OpenPaymentSearch:{ preProcess: (data, additionalDetails) => { @@ -93,6 +103,10 @@ export const UICustomizations = { return
{ value ? t(Digit.Utils.locale.getTransformedLocale(`OP_PROPERTY_TYPE_${value}`)) : t("ES_COMMON_NA")}
+ case "OP_PAYER_NAME": + return
+ {value ? anonymizeHalfString(value) : t("ES_COMMON_NA")} +
default: From 9f3761a61c848b0c323e4622ed84951267eb4952 Mon Sep 17 00:00:00 2001 From: Saloni-eGov Date: Tue, 2 Jul 2024 12:54:24 +0530 Subject: [PATCH 069/118] Added rollout dashboard cronjob indexer for sending data to indexer --- .../rollout-dashboard-cronjob-indexer/.env | 11 + .../CHANGELOG.md | 7 + .../Dockerfile | 17 + .../LOCALSETUP.md | 15 + .../README.md | 2 + .../rollout-dashboard-cronjob-indexer/app.py | 1074 +++++++++++++++++ .../requirements.txt | 13 + 7 files changed, 1139 insertions(+) create mode 100644 utilities/rollout-dashboard-cronjob-indexer/.env create mode 100644 utilities/rollout-dashboard-cronjob-indexer/CHANGELOG.md create mode 100644 utilities/rollout-dashboard-cronjob-indexer/Dockerfile create mode 100644 utilities/rollout-dashboard-cronjob-indexer/LOCALSETUP.md create mode 100644 utilities/rollout-dashboard-cronjob-indexer/README.md create mode 100644 utilities/rollout-dashboard-cronjob-indexer/app.py create mode 100644 utilities/rollout-dashboard-cronjob-indexer/requirements.txt diff --git a/utilities/rollout-dashboard-cronjob-indexer/.env b/utilities/rollout-dashboard-cronjob-indexer/.env new file mode 100644 index 000000000..fd557a7c8 --- /dev/null +++ b/utilities/rollout-dashboard-cronjob-indexer/.env @@ -0,0 +1,11 @@ +# Database Credentials +DB_HOST=test +DB_SCHEMA=test +DB_USER=test +DB_PWD=tesrt +DB_PORT=5432 + +#mdms call +API_URL= https://localhost:8080/ +TENANT_ID=pb +IFIX_DEP_ENTITY_URL= https://localhost:8080/ diff --git a/utilities/rollout-dashboard-cronjob-indexer/CHANGELOG.md b/utilities/rollout-dashboard-cronjob-indexer/CHANGELOG.md new file mode 100644 index 000000000..f6d8a5c21 --- /dev/null +++ b/utilities/rollout-dashboard-cronjob-indexer/CHANGELOG.md @@ -0,0 +1,7 @@ +# Changelog + +All notable changes to this module will be documented in this file. + + +## 1.0.0 - 2024-07-02 +Rollouot Dashboard indexer initial version release diff --git a/utilities/rollout-dashboard-cronjob-indexer/Dockerfile b/utilities/rollout-dashboard-cronjob-indexer/Dockerfile new file mode 100644 index 000000000..769eb225d --- /dev/null +++ b/utilities/rollout-dashboard-cronjob-indexer/Dockerfile @@ -0,0 +1,17 @@ +FROM python:3.9-slim-buster + +RUN apt-get update && apt-get install -y \ + build-essential \ + libpq-dev \ + && rm -rf /var/lib/apt/lists/* +WORKDIR /app/cron/ +COPY requirements.txt . + +RUN python3.9 -m pip install --no-cache-dir --upgrade \ + pip \ + setuptools \ + wheel +RUN python3.9 -m pip install --no-cache-dir \ + -r requirements.txt + +COPY app.py app.py \ No newline at end of file diff --git a/utilities/rollout-dashboard-cronjob-indexer/LOCALSETUP.md b/utilities/rollout-dashboard-cronjob-indexer/LOCALSETUP.md new file mode 100644 index 000000000..57fbca353 --- /dev/null +++ b/utilities/rollout-dashboard-cronjob-indexer/LOCALSETUP.md @@ -0,0 +1,15 @@ +For local setup: + 1. install python version3. + refer link for installing python 3 on linux system--> https://computingforgeeks.com/how-to-install-python-on-ubuntu-linux-system/ + 2. install pip3 + ex. apt install python3-pip + for version check -> pip3 --version + refer link: https://digit-discuss.atlassian.net/wiki/spaces/DD/pages/1865777171/DIGIT+Internal+Datamart+deployment+steps + 3. install required libraries like requests, pandas, psycopg2-binary etc. mentiond in requirnments.txt file using pip command. + ex. pip3 install requests + 4. To run the application locally, we have to load the variable from the .env file to environment so that script can use to do so run below command (NOTE: this to run locally, when running on the pod these variables will be loaded from help) + ``while read LINE; do export "$LINE"; done < ./.env`` + 4. for running app.py use command + ex. python3 app.py + + diff --git a/utilities/rollout-dashboard-cronjob-indexer/README.md b/utilities/rollout-dashboard-cronjob-indexer/README.md new file mode 100644 index 000000000..6f79e9cf8 --- /dev/null +++ b/utilities/rollout-dashboard-cronjob-indexer/README.md @@ -0,0 +1,2 @@ +1. Written python script collecting for each tenant data from mdms and mgramseva db based on some critria commented in script 'app.py' for each method. +2. Collecting data and dumping data into mgramseva db in 'roll_out_dashboard' table then loading that data into metabase. diff --git a/utilities/rollout-dashboard-cronjob-indexer/app.py b/utilities/rollout-dashboard-cronjob-indexer/app.py new file mode 100644 index 000000000..f419773de --- /dev/null +++ b/utilities/rollout-dashboard-cronjob-indexer/app.py @@ -0,0 +1,1074 @@ +import json +from typing import BinaryIO, List +import requests +from datetime import datetime, timezone, time, timedelta, date +from dateutil.relativedelta import relativedelta +from dateutil import tz +import pytz +from dateutil import parser +from decimal import Decimal +import os +import psycopg2 + + +def getGPWSCHeirarchy(): + # call the projectmodule mdms for each unique tenant which would return the array of unique villages( i.e tenantid) along with the respectie + # zone circle division subdivision project + # https://realpython.com/python-requests/ helps on how make ajax calls. url put it in app.properties and read through configs + + try: + mdms_url = os.getenv('API_URL') + state_tenantid = os.getenv('TENANT_ID') + mdms_requestData = { + "RequestInfo": { + "apiId": "mgramseva-common", + "ver": 0.01, + "ts": "", + "action": "_search", + "did": 1, + "key": "", + "msgId": "" + }, + "MdmsCriteria": { + "tenantId": state_tenantid, + "moduleDetails": [ + { + "moduleName": "tenant", + "masterDetails": [ + { + "name": "tenants" + } + ] + } + ] + } + } + + mdms_response = requests.post(mdms_url + 'mdms-v2/v1/_search', json=mdms_requestData, verify=False) + + mdms_responseData = mdms_response.json() + tenantList = mdms_responseData['MdmsRes']['tenant']['tenants'] + print(len(tenantList)) + teanant_data_Map = {} + for tenant in tenantList: + if tenant.get('code') == state_tenantid or tenant.get('code') == (state_tenantid + '.testing'): + continue + if tenant.get('city') is not None and tenant.get('city').get('code') is not None: + teanant_data_Map.update({tenant.get('city').get('code'): tenant.get('code')}) + + url = 'https://mgramseva-dwss.punjab.gov.in/' + print(url) + requestData = { + "requestHeader": { + "ts": 1627193067, + "version": "2.0.0", + "msgId": "Unknown", + "signature": "NON", + "userInfo": { + "uuid": "admin" + } + }, + "criteria": { + "tenantId": "pb", + "getAncestry": True + } + } + + response = requests.post(url + 'ifix-department-entity/departmentEntity/v1/_search', json=requestData, + verify=False) + + responseData = response.json() + departmentHierarchyList = responseData.get('departmentEntity') + dataList = [] + + for data in departmentHierarchyList: + if (len(data['children']) > 0): + if (data.get('hierarchyLevel') == 0): + child = data['children'][0] + else: + child = data + zone = child.get('name') + if (len(child['children']) > 0): + circle = child['children'][0].get('name') + if (len(child['children'][0]['children']) > 0): + division = child['children'][0]['children'][0].get('name') + if (len(child['children'][0]['children'][0]['children']) > 0): + subdivision = child['children'][0]['children'][0]['children'][0].get('name') + if (len(child['children'][0]['children'][0]['children'][0]['children']) > 0): + section = child['children'][0]['children'][0]['children'][0]['children'][0].get('name') + if (len(child['children'][0]['children'][0]['children'][0]['children'][0][ + 'children']) > 0): + tenantName = \ + child['children'][0]['children'][0]['children'][0]['children'][0]['children'][ + 0].get( + 'name') + tenantCode = \ + child['children'][0]['children'][0]['children'][0]['children'][0]['children'][ + 0].get( + 'code') + # tenantId = tenantName.replace(" ", "").lower() + if teanant_data_Map.get(tenantCode) is not None: + formatedTenantId = teanant_data_Map.get(tenantCode) + #tenantName=teanant_data_Map.get(tenantCode)['name'] + print(teanant_data_Map) + # print(formatedTenantId) + obj1 = {"tenantId": formatedTenantId, "zone": zone, "circle": circle, + "division": division, "subdivision": subdivision, + "section": section, "projectcode": tenantCode,"tenantName":tenantName} + dataList.append(obj1) + print("heirarchy collected") + # print(dataList) + return (dataList) + except Exception as exception: + print("Exception occurred while connecting to the database") + print(exception) + + +def getRateMasters(tenantId): + # make mdms call to get the rate unique rate masters i.e billig slab . count the unique billing slabs and return the number + print("Rate master count returned") + try: + + url = os.getenv('API_URL') + + requestData = { + "RequestInfo": { + "apiId": "mgramseva-common", + "ver": 0.01, + "ts": "", + "action": "_search", + "did": 1, + "key": "", + "msgId": "" + }, + "MdmsCriteria": { + "tenantId": tenantId, + "moduleDetails": [ + { + "moduleName": "ws-services-calculation", + "masterDetails": [ + { + "name": "WCBillingSlab" + } + ] + } + ] + } + } + + response = requests.post(url + 'mdms-v2/v1/_search', json=requestData) + + responseData = response.json() + wcBillingSlabList = responseData['MdmsRes']['ws-services-calculation']['WCBillingSlab'] + + return len(wcBillingSlabList) + except Exception as exception: + print("Exception occurred while connecting to the database") + print(exception) + + +def getCollectionsMade(tenantId, startdate, enddate): + # make db call with query to get the collections made in the current date in the given tenant + # should be till date not current date. + print("collections made returned") + try: + connection = getConnection() + cursor = connection.cursor() + + if startdate != None and enddate != None: + COLLECTION_MADE_TILL_THE_CURRENT_DATE_QUERY = "select sum(amountpaid) from egcl_paymentdetail where businessservice = 'WS' and createdtime between '" + startdate + "'" + " and '" + enddate + "'" + " and tenantid = '" + tenantId + "'" + else: + COLLECTION_MADE_TILL_THE_CURRENT_DATE_QUERY = "select sum(amountpaid) from egcl_paymentdetail where businessservice = 'WS' and tenantid = '" + tenantId + "'" + + cursor.execute(COLLECTION_MADE_TILL_THE_CURRENT_DATE_QUERY) + result = cursor.fetchone() + print(result[0]) + return result[0] + + except Exception as exception: + print("Exception occurred while connecting to the database") + print(exception) + + finally: + if connection: + cursor.close() + connection.close() + + +def getCollectionsMadeOnline(tenantId): + # make db call with query to get the collections made in the current date of type online in the given tenant, as of now no data exists but write the query + # should be till date not current date. + + print("collections made online returned") + try: + connection = getConnection() + cursor = connection.cursor() + + COLLECTION_MADE_TILL_THE_CURRENT_DATE_ONLINE_QUERY = "select sum(pd.amountpaid) from egcl_payment p join egcl_paymentdetail pd on p.id = pd.paymentid where pd.businessservice = 'WS' and p.tenantid = '" + tenantId + "'" + " and p.paymentmode = 'ONLINE' " + + cursor.execute(COLLECTION_MADE_TILL_THE_CURRENT_DATE_ONLINE_QUERY) + result = cursor.fetchone() + print(result[0]) + return result[0] + + except Exception as exception: + print("Exception occurred while connecting to the database") + print(exception) + + finally: + if connection: + cursor.close() + connection.close() + + +def getLastCollectionDate(tenantId, startdate, enddate): + # make db call to get the last collection date for the given tenant + print("lat collection date returned") + try: + connection = getConnection() + cursor = connection.cursor() + if startdate != None and enddate != None: + LAST_COLLECTION_DATE_QUERY = "select createdtime from egcl_paymentdetail where businessservice = 'WS' and createdtime between '" + startdate + "'" + " and '" + enddate + "'" + " and tenantid = '" + tenantId + "'" + " order by createdtime desc limit 1" + else: + LAST_COLLECTION_DATE_QUERY = "select createdtime from egcl_paymentdetail where businessservice = 'WS' and tenantid = '" + tenantId + "'" + " order by createdtime desc limit 1" + + cursor.execute(LAST_COLLECTION_DATE_QUERY) + result = cursor.fetchone() + + formatedDate = datetime.fromtimestamp(result[0] / 1000.0) + + print(formatedDate) + return formatedDate + except Exception as exception: + print("Exception occurred while connecting to the database") + print(exception) + + finally: + if connection: + cursor.close() + connection.close() + + +def getExpenseBillEntered(tenantId, startdate, enddate): + # make db call to get the total no of expenses entered in the give tenant on the current date + # total till date not current date + + print("expense bill entered returned") + try: + connection = getConnection() + cursor = connection.cursor() + if startdate != None and enddate != None: + TOTAL_NO_EXPENSES_TILL_DATE = "select count(*) from eg_echallan where typeofexpense<>'ELECTRICITY_BILL' and applicationstatus='ACTIVE' and createdtime between '" + startdate + "'" + " and '" + enddate + "'" + " and tenantid = '" + tenantId + "'" + else: + TOTAL_NO_EXPENSES_TILL_DATE = "select count(*) from eg_echallan where typeofexpense<>'ELECTRICITY_BILL' and applicationstatus='ACTIVE' and tenantid = '" + tenantId + "'" + + cursor.execute(TOTAL_NO_EXPENSES_TILL_DATE) + result = cursor.fetchone() + print(result[0]) + return result[0] + + except Exception as exception: + print("Exception occurred while connecting to the database") + print(exception) + + finally: + if connection: + cursor.close() + connection.close() + + +def getElectricityExpenseBillEntered(tenantId, startdate, enddate): + # make db call to get the total no of expenses entered in the give tenant on the current date + # total till date not current date + + print("expense bill entered returned") + try: + connection = getConnection() + cursor = connection.cursor() + if startdate != None and enddate != None: + TOTAL_NO_EXPENSES_TILL_DATE = "select count(*) from eg_echallan where typeofexpense='ELECTRICITY_BILL' and applicationstatus='ACTIVE' and createdtime between '" + startdate + "'" + " and '" + enddate + "'" + " and tenantid = '" + tenantId + "'" + else: + TOTAL_NO_EXPENSES_TILL_DATE = "select count(*) from eg_echallan where typeofexpense='ELECTRICITY_BILL' and applicationstatus='ACTIVE' and tenantid = '" + tenantId + "'" + + cursor.execute(TOTAL_NO_EXPENSES_TILL_DATE) + result = cursor.fetchone() + print(result[0]) + return result[0] + + except Exception as exception: + print("Exception occurred while connecting to the database") + print(exception) + + finally: + if connection: + cursor.close() + connection.close() + + +def getLastExpTransactionDate(tenantId, startdate, enddate): + # make db call to get the latest expense bill entered date in that given tenant + print("expense transaction date") + try: + connection = getConnection() + cursor = connection.cursor() + if startdate != None and enddate != None: + LAT_EXP_BILL_DATE = "select createdtime from eg_echallan where applicationstatus='ACTIVE' and createdtime between '" + startdate + "'" + " and '" + enddate + "'" + " and tenantid = '" + tenantId + "'" + " order by createdtime desc limit 1" + else: + LAT_EXP_BILL_DATE = "select createdtime from eg_echallan where applicationstatus='ACTIVE' and tenantid = '" + tenantId + "'" + " order by createdtime desc limit 1" + + cursor.execute(LAT_EXP_BILL_DATE) + result = cursor.fetchone() + formatedDate = datetime.fromtimestamp(result[0] / 1000.0) + print(formatedDate) + return formatedDate + + except Exception as exception: + print("Exception occurred while connecting to the database") + print(exception) + + finally: + if connection: + cursor.close() + connection.close() + + +def getNoOfBillsPaid(tenantId, startdate, enddate): + # make db call to get total no of expenses bills marked as paid till current date. + print("No of bill paid") + try: + connection = getConnection() + cursor = connection.cursor() + if startdate != None and enddate != None: + TOTAL_EXPENSES_BILL_MARKED_PAID = "select count(*) from eg_echallan where typeofexpense<>'ELECTRICITY_BILL' and applicationstatus = 'PAID' and createdtime between '" + startdate + "'" + " and '" + enddate + "'" + " and tenantid = '" + tenantId + "'" + else: + TOTAL_EXPENSES_BILL_MARKED_PAID = "select count(*) from eg_echallan where typeofexpense<>'ELECTRICITY_BILL' and tenantid = '" + tenantId + "'" + " and applicationstatus = 'PAID' " + + cursor.execute(TOTAL_EXPENSES_BILL_MARKED_PAID) + result = cursor.fetchone() + print(result[0]) + return result[0] + except Exception as exception: + print("Exception occurred while connecting to the database") + print(exception) + + finally: + if connection: + cursor.close() + connection.close() + + +def getTotalAmountExpenseBills(tenantId, startdate, enddate): + # make db call to get total no of expenses bills marked as paid till current date. + print("No of bill paid") + try: + connection = getConnection() + cursor = connection.cursor() + if startdate != None and enddate != None: + TOTAL_EXPENSES_BILL_MARKED_PAID = "select sum(dd.taxamount) from eg_echallan challan inner join egbs_Demand_v1 dem on dem.consumercode=challan.referenceid inner join egbs_Demanddetail_v1 dd on dem.id=dd.demandid where dem.status='ACTIVE' and challan.typeofexpense<>'ELECTRICITY_BILL' and challan.createdtime between '" + startdate + "'" + " and '" + enddate + "'" + " and dem.tenantid = '" + tenantId + "'" + else: + TOTAL_EXPENSES_BILL_MARKED_PAID = "select sum(dd.taxamount) from eg_echallan challan inner join egbs_Demand_v1 dem on dem.consumercode=challan.referenceid inner join egbs_Demanddetail_v1 dd on dem.id=dd.demandid where dem.status='ACTIVE' and challan.typeofexpense<>'ELECTRICITY_BILL' and dem.tenantid = '" + tenantId + "'" + + cursor.execute(TOTAL_EXPENSES_BILL_MARKED_PAID) + result = cursor.fetchone() + print(result[0]) + return result[0] + except Exception as exception: + print("Exception occurred while connecting to the database") + print(exception) + + finally: + if connection: + cursor.close() + connection.close() + + +def getTotalAmountElectricityBills(tenantId, startdate, enddate): + # make db call to get total no of expenses bills marked as paid till current date. + print("No of bill paid") + try: + connection = getConnection() + cursor = connection.cursor() + if startdate != None and enddate != None: + TOTAL_EXPENSES_BILL_MARKED_PAID = "select sum(dd.taxamount) from eg_echallan challan inner join egbs_Demand_v1 dem on dem.consumercode=challan.referenceid inner join egbs_Demanddetail_v1 dd on dem.id=dd.demandid where dem.status='ACTIVE' and challan.typeofexpense='ELECTRICITY_BILL' and challan.createdtime between '" + startdate + "'" + " and '" + enddate + "'" + " and dem.tenantid = '" + tenantId + "'" + else: + TOTAL_EXPENSES_BILL_MARKED_PAID = "select sum(dd.taxamount) from eg_echallan challan inner join egbs_Demand_v1 dem on dem.consumercode=challan.referenceid inner join egbs_Demanddetail_v1 dd on dem.id=dd.demandid where dem.status='ACTIVE' and challan.typeofexpense='ELECTRICITY_BILL' and dem.tenantid = '" + tenantId + "'" + + cursor.execute(TOTAL_EXPENSES_BILL_MARKED_PAID) + result = cursor.fetchone() + print(result[0]) + return result[0] + except Exception as exception: + print("Exception occurred while connecting to the database") + print(exception) + + finally: + if connection: + cursor.close() + connection.close() + + +def getTotalAmountPaidBills(tenantId, startdate, enddate): + # make db call to get total no of expenses bills marked as paid till current date. + print("No of bill paid") + try: + connection = getConnection() + cursor = connection.cursor() + if startdate != None and enddate != None: + TOTAL_EXPENSES_BILL_MARKED_PAID = "select sum(dd.taxamount) from eg_echallan challan inner join egbs_Demand_v1 dem on dem.consumercode=challan.referenceid inner join egbs_Demanddetail_v1 dd on dem.id=dd.demandid where challan.applicationstatus='PAID' and challan.typeofexpense<>'ELECTRICITY_BILL' and challan.createdtime between '" + startdate + "'" + " and '" + enddate + "'" + " and dem.tenantid = '" + tenantId + "'" + else: + TOTAL_EXPENSES_BILL_MARKED_PAID = "select sum(dd.taxamount) from eg_echallan challan inner join egbs_Demand_v1 dem on dem.consumercode=challan.referenceid inner join egbs_Demanddetail_v1 dd on dem.id=dd.demandid where challan.applicationstatus='PAID' and challan.typeofexpense<>'ELECTRICITY_BILL' and dem.tenantid = '" + tenantId + "'" + + cursor.execute(TOTAL_EXPENSES_BILL_MARKED_PAID) + result = cursor.fetchone() + print(result[0]) + return result[0] + except Exception as exception: + print("Exception occurred while connecting to the database") + print(exception) + + finally: + if connection: + cursor.close() + connection.close() + + +def getRatingCount(tenantId): + # make db call to get the total no of ratings + print("no of ratings") + try: + connection = getConnection() + cursor = connection.cursor() + + TOTAL_RATINGS = "select count(*) from eg_ws_feedback where tenantid = '" + tenantId + "'" + + cursor.execute(TOTAL_RATINGS) + result = cursor.fetchone() + print(result[0]) + return result[0] + + except Exception as exception: + print("Exception occurred while connecting to the database") + print(exception) + + finally: + if connection: + cursor.close() + connection.close() + + +def getLastRatingDate(tenantId): + # make db call to get the last rating date entered date in that given tenant + print("last rating date geiven") + try: + connection = getConnection() + cursor = connection.cursor() + LAST_RATING_DATE = "select createdtime from eg_ws_feedback where tenantid = '" + tenantId + "'" + " order by createdtime desc limit 1" + + cursor.execute(LAST_RATING_DATE) + result = cursor.fetchone() + formatedDate = datetime.fromtimestamp(result[0] / 1000.0) + print(formatedDate) + return formatedDate + + except Exception as exception: + print("Exception occurred while connecting to the database") + print(exception) + + finally: + if connection: + cursor.close() + connection.close() + + +def getActiveUsersCount(tenantId): + # make db call to get the total no of active users(EMPLOYEE) + print("no of active users") + try: + connection = getConnection() + cursor = connection.cursor() + + NO_OF_ACTIVE_USERS = "select count(distinct ur.user_id) from eg_user u inner join eg_userrole_v1 ur on u.id = ur.user_id where u.active = 't' and u.type='EMPLOYEE' and ur.role_tenantid = '" + tenantId + "'" + + cursor.execute(NO_OF_ACTIVE_USERS) + result = cursor.fetchone() + print(result[0]) + return result[0] + + except Exception as exception: + print("Exception occurred while connecting to the database") + print(exception) + + finally: + if connection: + cursor.close() + connection.close() + + +def getTotalAdvanceCreated(tenantId, startdate, enddate): + # query the postgresql db to get the total count of total advance in the given tenant till date + print("advance sum returned") + try: + connection = getConnection() + cursor = connection.cursor() + + if startdate != None and enddate != None: + ADVANCE_COUNT_QUERY = "select sum(dd.taxamount) from egbs_demanddetail_v1 dd inner join egbs_demand_v1 d on dd.demandid = d.id where d.status = 'ACTIVE' and dd.taxheadcode='WS_ADVANCE_CARRYFORWARD' and d.createdtime between '" + startdate + "'" + " and '" + enddate + "'" + " and d.tenantid = '" + tenantId + "'" + else: + ADVANCE_COUNT_QUERY = "select sum(dd.taxamount) from egbs_demanddetail_v1 dd inner join egbs_demand_v1 d on dd.demandid = d.id where d.status = 'ACTIVE' and dd.taxheadcode='WS_ADVANCE_CARRYFORWARD' and d.tenantid = '" + tenantId + "'" + + cursor.execute(ADVANCE_COUNT_QUERY) + result = cursor.fetchone() + print(result[0]) + return result[0] + + except Exception as exception: + print("Exception occurred while connecting to the database") + print(exception) + + finally: + if connection: + cursor.close() + connection.close() + + +def getTotalPenaltyCreated(tenantId, startdate, enddate): + # query the postgresql db to get the total count of total penalty in the given tenant till date + print("penalty sum returned") + try: + connection = getConnection() + cursor = connection.cursor() + + if startdate != None and enddate != None: + PENALTY_COUNT_QUERY = "select sum(dd.taxamount) from egbs_demanddetail_v1 dd inner join egbs_demand_v1 d on dd.demandid = d.id where d.status = 'ACTIVE' and dd.taxheadcode='WS_TIME_PENALTY' and d.createdtime between '" + startdate + "'" + " and '" + enddate + "'" + " and d.tenantid = '" + tenantId + "'" + else: + PENALTY_COUNT_QUERY = "select sum(dd.taxamount) from egbs_demanddetail_v1 dd inner join egbs_demand_v1 d on dd.demandid = d.id where d.status = 'ACTIVE' and dd.taxheadcode='WS_TIME_PENALTY' and d.tenantid = '" + tenantId + "'" + + cursor.execute(PENALTY_COUNT_QUERY) + result = cursor.fetchone() + print(result[0]) + return result[0] + + except Exception as exception: + print("Exception occurred while connecting to the database") + print(exception) + + finally: + if connection: + cursor.close() + connection.close() + + +def getConsumersCount(tenantId, startdate, enddate): + print("consumer count returned") + try: + connection = getConnection() + cursor = connection.cursor() + + if startdate != None and enddate != None: + CONSUMER_COUNT = "select count(*) from eg_ws_connection where status = 'Active' and createdtime between '" + startdate + "'" + " and '" + enddate + "'" + " and tenantid = '" + tenantId + "'" + else: + CONSUMER_COUNT = "select count(*) from eg_ws_connection where status = 'Active' and tenantid = '" + tenantId + "'" + cursor.execute(CONSUMER_COUNT) + result = cursor.fetchone() + print(result[0]) + return result[0] + + except Exception as exception: + print("Exception occurred while connecting to the database") + print(exception) + + finally: + if connection: + cursor.close() + connection.close() + + +def getTotalConsumerCount(tenantId, startdate, enddate): + print("consumer count returned") + try: + connection = getConnection() + cursor = connection.cursor() + + if startdate != None and enddate != None: + CONSUMER_COUNT = "select count(*) from eg_ws_connection where createdtime between '" + startdate + "'" + " and '" + enddate + "'" + " and tenantid = '" + tenantId + "'" + else: + CONSUMER_COUNT = "select count(*) from eg_ws_connection where tenantid = '" + tenantId + "'" + cursor.execute(CONSUMER_COUNT) + result = cursor.fetchone() + print(result[0]) + return result[0] + + except Exception as exception: + print("Exception occurred while connecting to the database") + print(exception) + + finally: + if connection: + cursor.close() + connection.close() + + +def getLastDemandDate(tenantId, startdate, enddate): + print("last demand date returned") + try: + connection = getConnection() + cursor = connection.cursor() + + if startdate != None and enddate != None: + LAST_DEMAND_DATE = "select max(to_timestamp(taxperiodto/1000)::date) from eg_ws_connection conn left outer join egbs_demand_v1 dmd on dmd.consumercode=conn.connectionno and dmd.status='ACTIVE' left outer join egbs_demanddetail_v1 dtl on dtl.demandid=dmd.id and taxheadcode='10101' where dtl.id is not null and conn.status='Active'and businessservice='WS' and (EXTRACT(epoch FROM (to_timestamp(taxperiodto/1000))-to_timestamp(taxperiodfrom/1000)))::int/86400<=31 and dmd.createdtime between '" + startdate + "'" + " and '" + enddate + "'" + " and dmd.tenantid = '" + tenantId + "'" + else: + LAST_DEMAND_DATE = "select max(to_timestamp(taxperiodto/1000)::date) from eg_ws_connection conn left outer join egbs_demand_v1 dmd on dmd.consumercode=conn.connectionno and dmd.status='ACTIVE' left outer join egbs_demanddetail_v1 dtl on dtl.demandid=dmd.id and taxheadcode='10101' where dtl.id is not null and conn.status='Active'and businessservice='WS' and (EXTRACT(epoch FROM (to_timestamp(taxperiodto/1000))-to_timestamp(taxperiodfrom/1000)))::int/86400<=31 and dmd.tenantid = '" + tenantId + "'" + + cursor.execute(LAST_DEMAND_DATE) + result = cursor.fetchone() + + return result[0] + + except Exception as exception: + print("Exception occurred while connecting to the database") + print(exception) + + finally: + if connection: + cursor.close() + connection.close() + + +def getTotalDemandRaised(tenantId, startdate, enddate): + print("last demand date returned") + try: + connection = getConnection() + cursor = connection.cursor() + if startdate != None and enddate != None: + LAST_DEMAND_COUNT = "select count(distinct dmd.consumercode) from eg_ws_connection conn left outer join egbs_demand_v1 dmd on dmd.consumercode=conn.connectionno and dmd.status='ACTIVE' left outer join egbs_demanddetail_v1 dtl on dtl.demandid=dmd.id and taxheadcode='10101' where conn.status='Active'and businessservice='WS' and dtl.id is not null and (EXTRACT(epoch FROM (to_timestamp(taxperiodto/1000))-to_timestamp(taxperiodfrom/1000)))::int/86400<=31 and dmd.createdtime between '" + startdate + "'" + " and '" + enddate + "'" + " and dmd.tenantid = '" + tenantId + "' group by taxperiodto order by taxperiodto desc limit 1 " + else: + LAST_DEMAND_COUNT = "select count(distinct dmd.consumercode) from eg_ws_connection conn left outer join egbs_demand_v1 dmd on dmd.consumercode=conn.connectionno and dmd.status='ACTIVE' left outer join egbs_demanddetail_v1 dtl on dtl.demandid=dmd.id and taxheadcode='10101' where conn.status='Active'and businessservice='WS' and dtl.id is not null and (EXTRACT(epoch FROM (to_timestamp(taxperiodto/1000))-to_timestamp(taxperiodfrom/1000)))::int/86400<=31 and dmd.tenantid = '" + tenantId + "' group by taxperiodto order by taxperiodto desc limit 1" + + cursor.execute(LAST_DEMAND_COUNT) + result = cursor.fetchone() + + return result[0] + + except Exception as exception: + print("Exception occurred while connecting to the database") + print(exception) + + finally: + if connection: + cursor.close() + connection.close() + + +def getTotalDemandAmount(tenantId, startdate, enddate): + print("demand amount returned") + try: + connection = getConnection() + cursor = connection.cursor() + if startdate != None and enddate != None: + TOTAL_DEMAND_AMOUNT = "select sum(dd.taxamount) from egbs_demand_v1 dem inner join egbs_demanddetail_v1 dd on dem.id=dd.demandid where dem.status='ACTIVE' and dem.businessservice='WS' and dd.taxheadcode<>'WS_ADVANCE_CARRYFORWARD' and dem.createdtime between '" + startdate + "'" + " and '" + enddate + "'" + " and dem.tenantid = '" + tenantId + "'" + else: + TOTAL_DEMAND_AMOUNT = "select sum(dd.taxamount) from egbs_demand_v1 dem inner join egbs_demanddetail_v1 dd on dem.id=dd.demandid where dem.status='ACTIVE' and dem.businessservice='WS' and dd.taxheadcode<>'WS_ADVANCE_CARRYFORWARD' and dem.tenantid = '" + tenantId + "'" + + cursor.execute(TOTAL_DEMAND_AMOUNT) + result = cursor.fetchone() + + print(result[0]) + return result[0] + + except Exception as exception: + print("Exception occurred while connecting to the database") + print(exception) + + finally: + if connection: + cursor.close() + connection.close() + + +def getdaterange(i): + epochnow = None; + lastepoch = None + if i == 'Last seven days': + now = datetime.now() + lastSevenDays = (now - timedelta(days=7)).replace(hour=0, minute=0, second=0, microsecond=0) + lastepoch = now.strftime('%s') + '000' + epochnow = lastSevenDays.strftime('%s') + '000' + + if i == 'Last 15 days': + now = datetime.now() + lastFifteenDays = (now - timedelta(days=15)).replace(hour=0, minute=0, second=0, microsecond=0) + lastepoch = now.strftime('%s') + '000' + epochnow = lastFifteenDays.strftime('%s') + '000' + + if i == 'currentMonth-Till date': + today = datetime.now().year + currentMonth = datetime.now().month + start_date = datetime(today, currentMonth, 1) + epochnow = start_date.strftime('%s') + '000' + lastepoch = datetime.now().strftime('%s') + '000' + + if i == 'Previous Month': + nowdate = datetime.now() + today = nowdate.year + lastonemonth = (nowdate - relativedelta(months=1)).month + if lastonemonth == 12: + start_date = datetime(today - 1, lastonemonth, 1) + end_date = datetime(today, 1, 1) + timedelta(days=-1) + else: + start_date = datetime(today, lastonemonth, 1) + end_date = datetime(today, lastonemonth + 1, 1) + timedelta(days=-1) + enddate = end_date.combine(end_date, time.max) + epochnow = start_date.strftime('%s') + '000' + lastepoch = enddate.strftime('%s') + '000' + + if i == 'Quarter-1': + month = datetime.now().month + if (month < 4): + year = datetime.now().year - 1 + else: + year = datetime.now().year + start_date = datetime(year, 4, 1) + end_date = datetime(year, 6, 30) + end = datetime.combine(end_date, time.max) + epochnow = start_date.strftime('%s') + '000' + lastepoch = end.strftime('%s') + '000' + + if i == 'Quarter-2': + month = datetime.now().month + if (month < 4): + year = datetime.now().year - 1 + else: + year = datetime.now().year + start_date = datetime(year, 7, 1) + end_date = datetime(year, 9, 30) + end = datetime.combine(end_date, time.max) + epochnow = start_date.strftime('%s') + '000' + lastepoch = end.strftime('%s') + '000' + + if i == 'Quarter-3': + month = datetime.now().month + if (month < 4): + year = datetime.now().year - 1 + else: + year = datetime.now().year + start_date = datetime(year, 10, 1) + end_date = datetime(year, 12, 31) + end = datetime.combine(end_date, time.max) + epochnow = start_date.strftime('%s') + '000' + lastepoch = end.strftime('%s') + '000' + + if i == 'Quarter-4': + year = datetime.now().year + start_date = datetime(year, 1, 1) + end_date = datetime(year, 3, 31) + end = datetime.combine(end_date, time.max) + epochnow = start_date.strftime('%s') + '000' + lastepoch = end.strftime('%s') + '000' + + if i == 'FY to date': + today = datetime.now().year + month = datetime.now().month + if (month < 4): + start_date = datetime(today - 1, 4, 1) + else: + start_date = datetime(today, 4, 1) + epochnow = start_date.strftime('%s') + '000' + lastepoch = datetime.now().strftime('%s') + '000' + + if i == 'Previous 1st FY (23-24)': + today = datetime.now().year + lastyear = today - 1 + start_date = datetime(lastyear, 4, 1) + end_date = datetime(today, 4, 1) + timedelta(days=-1) + enddate = end_date.combine(end_date, time.max) + epochnow = start_date.strftime('%s') + '000' + lastepoch = enddate.strftime('%s') + '000' + + if i == 'Previous 2nd FY (22-23)': + today = datetime.now().year + start_date = datetime(today - 2, 4, 1) + end_date = datetime(today - 1, 4, 1) + timedelta(days=-1) + enddate = end_date.combine(end_date, time.max) + epochnow = start_date.strftime('%s') + '000' + lastepoch = enddate.strftime('%s') + '000' + + if i == 'Previous 3rd FY (21-22)': + today = datetime.now().year + start_date = datetime(today - 3, 4, 1) + end_date = datetime(today - 2, 4, 1) + timedelta(days=-1) + enddate = end_date.combine(end_date, time.max) + epochnow = start_date.strftime('%s') + '000' + lastepoch = enddate.strftime('%s') + '000' + + return epochnow, lastepoch + + +def createEntryForRollout(tenant, activeUsersCount, totalAdvance, totalPenalty, totalConsumerCount, consumerCount, + lastDemandGenratedDate, noOfDemandRaised, totaldemAmount, collectionsMade, lastCollectionDate, + expenseCount, countOfElectricityExpenseBills, noOfPaidExpenseBills, lastExpTrnsDate, + totalAmountOfExpenseBills, totalAmountOfElectricityBills, totalAmountOfPaidExpenseBills, + date): + # create entry into new table in postgres db with the table name roll_outdashboard . enter all field into the db and additional createdtime additional column + + print("inserting data into db") + try: + connection = getConnection() + cursor = connection.cursor() + + # createdTime = int(round(time.time() * 1000)) // time in currenttimemillis format + + tzInfo = pytz.timezone('Asia/Kolkata') + createdTime = datetime.now(tz=tzInfo) + print("createdtime -->", createdTime) + + postgres_insert_query = "INSERT INTO roll_out_dashboard (tenantid, projectcode, zone, circle, division, subdivision, section,active_users_count,total_advance,total_penalty,total_connections,active_connections, last_demand_gen_date, demand_generated_consumer_count,total_demand_amount,collection_till_date,last_collection_date,expense_count,count_of_electricity_expense_bills,no_of_paid_expense_bills,last_expense_txn_date,total_amount_of_expense_bills,total_amount_of_electricity_bills,total_amount_of_paid_expense_bills,date_range,createdtime) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)" + record_to_insert = ( + tenant['tenantId'], tenant['projectcode'], tenant['zone'], tenant['circle'], tenant['division'], + tenant['subdivision'], tenant['section'], activeUsersCount, totalAdvance, totalPenalty, totalConsumerCount, + consumerCount, lastDemandGenratedDate, noOfDemandRaised, totaldemAmount, collectionsMade, lastCollectionDate, + expenseCount, countOfElectricityExpenseBills, noOfPaidExpenseBills, lastExpTrnsDate, totalAmountOfExpenseBills, + totalAmountOfElectricityBills, totalAmountOfPaidExpenseBills, date, createdTime) + cursor.execute(postgres_insert_query, record_to_insert) + + connection.commit() + return + + except (Exception, psycopg2.Error) as error: + print("Exception occurred while connecting to the database") + print(exception) + + finally: + if connection: + cursor.close() + connection.close() + + +def convert_decimal_to_float(value): + return float(value) if isinstance(value, Decimal) else value + + +def convert_date_to_string(value): + return value.isoformat() if isinstance(value, (date, datetime)) else None + + +def createEntryForRolloutToElasticSearch(tenant, activeUsersCount, totalAdvance, totalPenalty, totalConsumerCount, + consumerCount, lastDemandGenratedDate, noOfDemandRaised, totaldemAmount, + collectionsMade, lastCollectionDate, expenseCount, + countOfElectricityExpenseBills, noOfPaidExpenseBills, lastExpTrnsDate, + totalAmountOfExpenseBills, totalAmountOfElectricityBills, + totalAmountOfPaidExpenseBills, date,tenantName): + # url = 'http://localhost:8080/ws-calculator/waterCalculator/_rollOutDashboardSearch' + rollOut_headers = {'Content-Type': 'application/json'} + url = os.getenv('WS_API_URL') + + if not url: + print("API_URL environment variable is not set.") + return + + requestData = { + "RequestInfo": { + "apiId": "Rainmaker", + "action": "", + "did": 1, + "key": "", + "msgId": "20170310130900|en_IN", + "requesterId": "", + "ts": 1513579888683, + "ver": ".01", + "authToken": "572ad571-9061-444e-bcdb-84061b61f467" + }, + "rollOutDashboard": { + "id": 1, + "tenantid": tenant['tenantId'], + "projectcode": tenant['projectcode'], + "zone": tenant['zone'], + "circle": tenant['circle'], + "division": tenant['division'], + "subdivision": tenant['subdivision'], + "section": tenant['section'], + "activeUsersCount": activeUsersCount, + "totalAdvance": convert_decimal_to_float(totalAdvance), + "totalPenalty": convert_decimal_to_float(totalPenalty), + "totalConnections": totalConsumerCount, + "activeConnections": consumerCount, + "lastDemandGenDate": convert_date_to_string(lastDemandGenratedDate), + "demandGeneratedConsumerCount": noOfDemandRaised, + "totalDemandAmount": convert_decimal_to_float(totaldemAmount), + "collectionTillDate": convert_decimal_to_float(collectionsMade), + "lastCollectionDate": convert_date_to_string(lastCollectionDate), + "expenseCount": expenseCount, + "countOfElectricityExpenseBills": countOfElectricityExpenseBills, + "noOfPaidExpenseBills": noOfPaidExpenseBills, + "lastExpenseTxnDate": convert_date_to_string(lastExpTrnsDate), + "totalAmountOfExpenseBills": convert_decimal_to_float(totalAmountOfExpenseBills), + "totalAmountOfElectricityBills": convert_decimal_to_float(totalAmountOfElectricityBills), + "totalAmountOfPaidExpenseBills": convert_decimal_to_float(totalAmountOfPaidExpenseBills), + "dateRange": date, + "tenantName": tenantName + } + } + + print(requestData) + + try: + response = requests.post(url + 'ws-calculator/waterCalculator/_rollOutDashboardSearch', headers=rollOut_headers, + json=requestData) + if response.status_code == 200: + print("Successfully inserted data for tenant " + tenant['tenantId'] + " and date range " + date) + else: + print("Failed to insert data for tenant " + tenant['tenantId'] + " and date range " + date) + print("Response:", response.json()) + except Exception as e: + print("An error occurred:") + print(e) + + +def process(): + print("continue is the process") + + try: + connection = getConnection() + cursor = connection.cursor() + + print("cursor: ", cursor) + + DROPPING_TABLE_QUERY = " drop table if exists roll_out_dashboard " + cursor.execute(DROPPING_TABLE_QUERY) + + connection.commit() + + createTableQuery = createTable() + cursor.execute(createTableQuery) + + connection.commit() + + print("table dropped") + except Exception as exception: + print("Exception occurred while connecting to the database") + print(exception) + + finally: + if connection: + cursor.close() + connection.close() + + tenants = getGPWSCHeirarchy() + for tenant in tenants: + print("Tenant:", tenant['tenantId']) + tenantName = tenant['tenantName'] + print("Tenant Name:", tenantName) + activeUsersCount = getActiveUsersCount(tenant['tenantId']) + daterange = ['Consolidated (As on date)'] + for i, date in enumerate(daterange): + startdate, enddate = getdaterange(date) + + totalConsumerCount = getTotalConsumerCount(tenant['tenantId'], startdate, enddate) + if totalConsumerCount > 0: + totaldemAmount = getTotalDemandAmount(tenant['tenantId'], startdate, enddate) + totalAdvance = getTotalAdvanceCreated(tenant['tenantId'], startdate, enddate) + totalPenalty = getTotalPenaltyCreated(tenant['tenantId'], startdate, enddate) + lastDemandGenratedDate = getLastDemandDate(tenant['tenantId'], startdate, enddate) + noOfDemandRaised = getTotalDemandRaised(tenant['tenantId'], startdate, enddate) + lastCollectionDate = getLastCollectionDate(tenant['tenantId'], startdate, enddate) + collectionsMade = getCollectionsMade(tenant['tenantId'], startdate, enddate) + consumerCount = getConsumersCount(tenant['tenantId'], startdate, enddate) + else: + totaldemAmount = 0.0 + totalAdvance = 0.0 + totalPenalty = 0.0 + lastDemandGenratedDate = None + noOfDemandRaised = 0 + lastCollectionDate = None + collectionsMade = 0.0 + consumerCount = 0 + + totalAmountOfExpenseBills = getTotalAmountExpenseBills(tenant['tenantId'], startdate, enddate) + + if totalAmountOfExpenseBills is not None and totalAmountOfExpenseBills > 0: + # totalAmountOfExpenseBills = getTotalAmountExpenseBills(tenant['tenantId'], startdate, enddate) + totalAmountOfElectricityBills = getTotalAmountElectricityBills(tenant['tenantId'], startdate, enddate) + totalAmountOfPaidExpenseBills = getTotalAmountPaidBills(tenant['tenantId'], startdate, enddate) + countOfElectricityExpenseBills = getElectricityExpenseBillEntered(tenant['tenantId'], startdate,enddate) + lastExpTrnsDate = getLastExpTransactionDate(tenant['tenantId'], startdate, enddate) + noOfPaidExpenseBills = getNoOfBillsPaid(tenant['tenantId'], startdate, enddate) + else: + # totalAmountOfExpenseBills = 0.0 + totalAmountOfElectricityBills = 0.0 + totalAmountOfPaidExpenseBills = 0.0 + countOfElectricityExpenseBills = 0 + lastExpTrnsDate = None + noOfPaidExpenseBills = 0 + + expenseCount = getExpenseBillEntered(tenant['tenantId'], startdate, enddate) + # createEntryForRollout(tenant,activeUsersCount,totalAdvance, totalPenalty,totalConsumerCount,consumerCount,lastDemandGenratedDate,noOfDemandRaised,totaldemAmount,collectionsMade,lastCollectionDate, expenseCount,countOfElectricityExpenseBills,noOfPaidExpenseBills, lastExpTrnsDate, totalAmountOfExpenseBills, totalAmountOfElectricityBills, totalAmountOfPaidExpenseBills,date) + createEntryForRolloutToElasticSearch(tenant, activeUsersCount, totalAdvance, totalPenalty, + totalConsumerCount, + consumerCount, lastDemandGenratedDate, noOfDemandRaised, + totaldemAmount, + collectionsMade, lastCollectionDate, expenseCount, + countOfElectricityExpenseBills, + noOfPaidExpenseBills, lastExpTrnsDate, totalAmountOfExpenseBills, + totalAmountOfElectricityBills, totalAmountOfPaidExpenseBills, date,tenantName) + print("End of rollout dashboard") + return + + +def getConnection(): + dbHost = os.getenv('DB_HOST') + dbSchema = os.getenv('DB_SCHEMA') + dbUser = os.getenv('DB_USER') + dbPassword = os.getenv('DB_PWD') + dbPort = os.getenv('DB_PORT') + + connection = psycopg2.connect(user=dbUser, + password=dbPassword, + host=dbHost, + port=dbPort, + database=dbSchema) + + return connection + + +def getCurrentDate(): + currentDate = datetime.today().strftime('%Y-%m-%d') + currentDateInMillis = str(parser.parse(currentDate).timestamp() * 1000) + + return currentDateInMillis + + +def createTable(): + CREATE_TABLE_QUERY = """create table roll_out_dashboard( + id SERIAL primary key, + tenantid varchar(250) NOT NULL, + projectcode varchar(66), + zone varchar(250), + circle varchar(250), + division varchar(250), + subdivision varchar(250), + section varchar(250), + active_users_count NUMERIC(10), + total_advance NUMERIC(10), + total_penalty NUMERIC(10), + total_connections NUMERIC(10), + active_connections NUMERIC(10), + last_demand_gen_date DATE, + demand_generated_consumer_count NUMERIC(10), + total_demand_amount NUMERIC(10), + collection_till_date NUMERIC(12, 2), + last_collection_date DATE, + expense_count BIGINT, + count_of_electricity_expense_bills BIGINT, + no_of_paid_expense_bills BIGINT, + last_expense_txn_date Date, + total_amount_of_expense_bills BIGINT, + total_amount_of_electricity_bills BIGINT, + total_amount_of_paid_expense_bills BIGINT, + date_range varchar(250), + createdtime TIMESTAMP NOT NULL + )""" + + return CREATE_TABLE_QUERY + + +if __name__ == '__main__': + process() \ No newline at end of file diff --git a/utilities/rollout-dashboard-cronjob-indexer/requirements.txt b/utilities/rollout-dashboard-cronjob-indexer/requirements.txt new file mode 100644 index 000000000..6e9c7665b --- /dev/null +++ b/utilities/rollout-dashboard-cronjob-indexer/requirements.txt @@ -0,0 +1,13 @@ +asn1crypto==0.24.0 +enum34==1.1.6 +idna==2.6 +ipaddress==1.0.17 +keyring==10.6.0 +keyrings.alt==3.0 +pyxdg==0.25 +SecretStorage==2.3.1 +six==1.16.0 +requests +python-dateutil +psycopg2 +pytz From 7b6ea3f7df70c1521deffb3fd5f956d8a34a3714 Mon Sep 17 00:00:00 2001 From: Taniya-eGov Date: Tue, 2 Jul 2024 13:07:49 +0530 Subject: [PATCH 070/118] modified query to fetch all tenantid's at state level --- .../org/egov/hrms/repository/EmployeeQueryBuilder.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/business-services/egov-hrms/src/main/java/org/egov/hrms/repository/EmployeeQueryBuilder.java b/business-services/egov-hrms/src/main/java/org/egov/hrms/repository/EmployeeQueryBuilder.java index 960769711..8812b302b 100644 --- a/business-services/egov-hrms/src/main/java/org/egov/hrms/repository/EmployeeQueryBuilder.java +++ b/business-services/egov-hrms/src/main/java/org/egov/hrms/repository/EmployeeQueryBuilder.java @@ -171,8 +171,13 @@ public String getEmployeeIdsQuery(EmployeePlainSearchCriteria criteria, List Date: Tue, 2 Jul 2024 13:22:18 +0530 Subject: [PATCH 071/118] added rollout-dashbaord-cronjob-indexer inn build config file --- build/build-config.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build/build-config.yml b/build/build-config.yml index cc9f05230..a72f3dce8 100644 --- a/build/build-config.yml +++ b/build/build-config.yml @@ -120,6 +120,11 @@ config: - work-dir: "utilities/rollout-dashboard-cronjob" image-name: "rollout-dashboard-cronjob" dockerfile: "utilities/rollout-dashboard-cronjob/Dockerfile" + - name: "builds/mGramSeva/utilities/rollout-dashboard-cronjob-indexer" + build: + - work-dir: "utilities/rollout-dashboard-cronjob-indexer" + image-name: "rollout-dashboard-cronjob-indexer" + dockerfile: "utilities/rollout-dashboard-cronjob-indexer/Dockerfile" - name: "builds/mGramSeva/municipal-services/property-services" build: - work-dir: "municipal-services/property-services" From da99e4328028b140de0adb5cd2d8030c50057901 Mon Sep 17 00:00:00 2001 From: Nipun Arora Date: Tue, 2 Jul 2024 13:46:16 +0530 Subject: [PATCH 072/118] updates --- .../example/public/index.html | 2 ++ .../example/src/UICustomizations.js | 13 +++++++++++++ .../packages/css/package.json | 2 +- .../packages/modules/payment/package.json | 2 +- .../payment/src/configs/UICustomizations.js | 13 +++++++++++++ frontend/micro-ui/web/public/index.html | 2 ++ .../web/src/Customisations/UICustomizations.js | 17 +++++++++++++++++ 7 files changed, 49 insertions(+), 2 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/example/public/index.html b/frontend/micro-ui/web/micro-ui-internals/example/public/index.html index 3239aa342..40a8aa7a9 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/public/index.html +++ b/frontend/micro-ui/web/micro-ui-internals/example/public/index.html @@ -13,6 +13,8 @@ + + diff --git a/frontend/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js b/frontend/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js index 3af34d215..381d3d526 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js +++ b/frontend/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js @@ -585,5 +585,18 @@ export const UICustomizations = { }, }; }, + customValidationCheck: (data) => { + + //checking both to and from date are present + const { consumerCode } = data; + if(!consumerCode) return false; + if(consumerCode.length < 10 || consumerCode.length > 25){ + return { warning: true, label: "ES_COMMON_ENTER_VALID_CONSUMER_CODE" }; + } + // if ((createdFrom === "" && createdTo !== "") || (createdFrom !== "" && createdTo === "")) + // return { warning: true, label: "ES_COMMON_ENTER_DATE_RANGE" }; + + return false; + } } }; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/package.json b/frontend/micro-ui/web/micro-ui-internals/packages/css/package.json index fa4b0ee9e..0892060f7 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/package.json +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-css", - "version": "1.5.50", + "version": "1.5.51", "license": "MIT", "main": "dist/index.css", "author": "Jagankumar ", diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json index dc1198eff..70792cba5 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-payment", - "version": "0.0.8", + "version": "0.0.9", "description": "Open Payments", "main": "dist/index.js", "module": "dist/index.modern.js", diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/UICustomizations.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/UICustomizations.js index 3bece21e2..6810bfe93 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/UICustomizations.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/UICustomizations.js @@ -164,5 +164,18 @@ export const UICustomizations = { }, }; }, + customValidationCheck: (data) => { + + //checking both to and from date are present + const { consumerCode } = data; + if(!consumerCode) return false; + if(consumerCode.length < 10 || consumerCode.length > 25){ + return { warning: true, label: "ES_COMMON_ENTER_VALID_CONSUMER_CODE" }; + } + // if ((createdFrom === "" && createdTo !== "") || (createdFrom !== "" && createdTo === "")) + // return { warning: true, label: "ES_COMMON_ENTER_DATE_RANGE" }; + + return false; + } } }; diff --git a/frontend/micro-ui/web/public/index.html b/frontend/micro-ui/web/public/index.html index 9149c2a54..976418181 100644 --- a/frontend/micro-ui/web/public/index.html +++ b/frontend/micro-ui/web/public/index.html @@ -10,6 +10,8 @@ + + mSeva diff --git a/frontend/micro-ui/web/src/Customisations/UICustomizations.js b/frontend/micro-ui/web/src/Customisations/UICustomizations.js index c9c517e6d..7e894482e 100644 --- a/frontend/micro-ui/web/src/Customisations/UICustomizations.js +++ b/frontend/micro-ui/web/src/Customisations/UICustomizations.js @@ -515,6 +515,10 @@ export const UICustomizations = { return
{ value ? t(Digit.Utils.locale.getTransformedLocale(`OP_PROPERTY_TYPE_${value}`)) : t("ES_COMMON_NA")}
+ case "OP_PAYER_NAME": + return
+ {value ? anonymizeHalfString(value) : t("ES_COMMON_NA")} +
default: @@ -572,5 +576,18 @@ export const UICustomizations = { }, }; }, + customValidationCheck: (data) => { + + //checking both to and from date are present + const { consumerCode } = data; + if(!consumerCode) return false; + if(consumerCode.length < 10 || consumerCode.length > 25){ + return { warning: true, label: "ES_COMMON_ENTER_VALID_CONSUMER_CODE" }; + } + // if ((createdFrom === "" && createdTo !== "") || (createdFrom !== "" && createdTo === "")) + // return { warning: true, label: "ES_COMMON_ENTER_DATE_RANGE" }; + + return false; + } } }; From 8c062e77381d28e0432e7630934777fa12964e90 Mon Sep 17 00:00:00 2001 From: Nipun Arora Date: Tue, 2 Jul 2024 14:35:10 +0530 Subject: [PATCH 073/118] updated pkgs --- .../micro-ui/web/micro-ui-internals/example/devpackage.json | 2 +- frontend/micro-ui/web/micro-ui-internals/example/package.json | 2 +- .../micro-ui/web/micro-ui-internals/example/public/index.html | 2 +- .../micro-ui/web/micro-ui-internals/packages/css/package.json | 2 +- .../micro-ui-internals/packages/modules/payment/package.json | 2 +- frontend/micro-ui/web/package.json | 4 ++-- frontend/micro-ui/web/public/index.html | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/example/devpackage.json b/frontend/micro-ui/web/micro-ui-internals/example/devpackage.json index 4336bd3b1..ff60e88aa 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/devpackage.json +++ b/frontend/micro-ui/web/micro-ui-internals/example/devpackage.json @@ -12,7 +12,7 @@ "@egovernments/digit-ui-libraries":"^1.4.0", "@egovernments/digit-ui-module-common":"^1.4.0", "@egovernments/digit-ui-module-engagement":"^1.4.0", - "@egovernments/digit-ui-module-payment":"0.0.2", + "@egovernments/digit-ui-module-payment":"0.0.10", "@egovernments/digit-ui-module-fsm":"^1.4.0", "@egovernments/digit-ui-module-mcollect":"^1.4.0", "@egovernments/digit-ui-module-noc":"^1.4.0", diff --git a/frontend/micro-ui/web/micro-ui-internals/example/package.json b/frontend/micro-ui/web/micro-ui-internals/example/package.json index addd8343b..160e9d7c4 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/package.json +++ b/frontend/micro-ui/web/micro-ui-internals/example/package.json @@ -14,7 +14,7 @@ "@egovernments/digit-ui-module-core": "1.5.46", "@egovernments/digit-ui-module-hrms": "1.5.27", "@egovernments/digit-ui-module-pgr": "1.7.0", - "@egovernments/digit-ui-module-payment":"0.0.8", + "@egovernments/digit-ui-module-payment":"0.0.10", "@egovernments/digit-ui-module-engagement": "1.5.20", "@egovernments/digit-ui-react-components": "1.5.26", "http-proxy-middleware": "^1.0.5", diff --git a/frontend/micro-ui/web/micro-ui-internals/example/public/index.html b/frontend/micro-ui/web/micro-ui-internals/example/public/index.html index 40a8aa7a9..d34726016 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/public/index.html +++ b/frontend/micro-ui/web/micro-ui-internals/example/public/index.html @@ -13,7 +13,7 @@ - + diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/package.json b/frontend/micro-ui/web/micro-ui-internals/packages/css/package.json index 0892060f7..ee5f0b475 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/package.json +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-css", - "version": "1.5.51", + "version": "1.5.52", "license": "MIT", "main": "dist/index.css", "author": "Jagankumar ", diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json index 70792cba5..db8dac379 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-payment", - "version": "0.0.9", + "version": "0.0.10", "description": "Open Payments", "main": "dist/index.js", "module": "dist/index.modern.js", diff --git a/frontend/micro-ui/web/package.json b/frontend/micro-ui/web/package.json index c9f9de17f..529d2e793 100644 --- a/frontend/micro-ui/web/package.json +++ b/frontend/micro-ui/web/package.json @@ -18,11 +18,11 @@ "@egovernments/digit-ui-libraries": "1.5.7", "@egovernments/digit-ui-module-dss": "1.5.34", "@egovernments/digit-ui-module-core": "1.5.46", - "@egovernments/digit-ui-css": "1.5.50", + "@egovernments/digit-ui-css": "1.5.52", "@egovernments/digit-ui-module-hrms": "1.5.27", "@egovernments/digit-ui-module-pgr": "1.7.0", "@egovernments/digit-ui-module-engagement": "1.5.20", - "@egovernments/digit-ui-module-payment":"0.0.8", + "@egovernments/digit-ui-module-payment":"0.0.10", "@egovernments/digit-ui-react-components": "1.5.26", "babel-loader": "8.1.0", "clean-webpack-plugin": "4.0.0", diff --git a/frontend/micro-ui/web/public/index.html b/frontend/micro-ui/web/public/index.html index 976418181..fb0077fd1 100644 --- a/frontend/micro-ui/web/public/index.html +++ b/frontend/micro-ui/web/public/index.html @@ -10,7 +10,7 @@ - + From 3fc8b0f10ae1d62d07a065c8bbd6fdfcb9d7c1fa Mon Sep 17 00:00:00 2001 From: Nipun Arora Date: Tue, 2 Jul 2024 15:17:18 +0530 Subject: [PATCH 074/118] updated payment pkg --- .../micro-ui/web/micro-ui-internals/example/devpackage.json | 2 +- .../micro-ui/web/micro-ui-internals/example/package.json | 2 +- .../micro-ui-internals/packages/modules/payment/package.json | 2 +- .../packages/modules/payment/src/components/OpenView.js | 5 +++++ .../packages/modules/payment/src/configs/OpenSearchConfig.js | 4 +++- frontend/micro-ui/web/package.json | 2 +- 6 files changed, 12 insertions(+), 5 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/example/devpackage.json b/frontend/micro-ui/web/micro-ui-internals/example/devpackage.json index ff60e88aa..b0df49622 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/devpackage.json +++ b/frontend/micro-ui/web/micro-ui-internals/example/devpackage.json @@ -12,7 +12,7 @@ "@egovernments/digit-ui-libraries":"^1.4.0", "@egovernments/digit-ui-module-common":"^1.4.0", "@egovernments/digit-ui-module-engagement":"^1.4.0", - "@egovernments/digit-ui-module-payment":"0.0.10", + "@egovernments/digit-ui-module-payment":"0.0.11", "@egovernments/digit-ui-module-fsm":"^1.4.0", "@egovernments/digit-ui-module-mcollect":"^1.4.0", "@egovernments/digit-ui-module-noc":"^1.4.0", diff --git a/frontend/micro-ui/web/micro-ui-internals/example/package.json b/frontend/micro-ui/web/micro-ui-internals/example/package.json index 160e9d7c4..aa54c6c6d 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/package.json +++ b/frontend/micro-ui/web/micro-ui-internals/example/package.json @@ -14,7 +14,7 @@ "@egovernments/digit-ui-module-core": "1.5.46", "@egovernments/digit-ui-module-hrms": "1.5.27", "@egovernments/digit-ui-module-pgr": "1.7.0", - "@egovernments/digit-ui-module-payment":"0.0.10", + "@egovernments/digit-ui-module-payment":"0.0.11", "@egovernments/digit-ui-module-engagement": "1.5.20", "@egovernments/digit-ui-react-components": "1.5.26", "http-proxy-middleware": "^1.0.5", diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json index db8dac379..bcd6cb618 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-payment", - "version": "0.0.10", + "version": "0.0.11", "description": "Open Payments", "main": "dist/index.js", "module": "dist/index.modern.js", diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js index eb8b08244..528f8268e 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js @@ -272,6 +272,7 @@ const OpenView = () => { labelStyle={{ fontWeight: "bold" }} textStyle={{ fontWeight: "bold" }} text={t("ES_PAYMENT_AMOUNT")} + rowContainerStyle={{ border: "none" }} /> {/*
*/} {bill?.billDetails?.[0]?.billAccountDetails @@ -283,6 +284,7 @@ const OpenView = () => { textStyle={{ textAlign: "right", maxWidth: "100px" }} label={t(`TAX_HC_${amountDetails.taxHeadCode}`)} text={"₹ " + amountDetails.amount?.toFixed(2)} + rowContainerStyle={{ border: "none" }} /> ))} @@ -292,6 +294,7 @@ const OpenView = () => { textStyle={{ textAlign: "right", maxWidth: "100px" }} label={t("COMMON_ARREARS")} text={"₹ " + arrears?.toFixed?.(2) || Number(0).toFixed(2)} + rowContainerStyle={{ border: "none" }} /> ) : null} @@ -301,6 +304,7 @@ const OpenView = () => { labelStyle={{ fontWeight: "bold" }} textStyle={{ fontWeight: "bold", textAlign: "right", maxWidth: "100px" }} text={"₹ " + Number(bill?.totalAmount).toFixed(2)} + rowContainerStyle={{ border: "none" }} /> ) : ( @@ -329,6 +333,7 @@ const OpenView = () => { // labelStyle={{ fontWeight: "bold" }} // textStyle={{ fontWeight: "bold" }} text={payment?.transactionDate ? Digit.DateUtils.ConvertEpochToDate(payment?.transactionDate) : t("ES_COMMON_NA")} + rowContainerStyle={{ border: "none" }} /> {/* Date: Tue, 2 Jul 2024 15:31:48 +0530 Subject: [PATCH 075/118] search button aligned in a row --- .../hrms/src/components/inbox/search.js | 30 +++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/inbox/search.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/inbox/search.js index db65c9443..bfbdbfe87 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/inbox/search.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/inbox/search.js @@ -57,6 +57,8 @@ const SearchApplication = ({ onSearch, type, onClose, searchFields, searchParams
)}
+ + {searchFields ?.filter((e) => true) ?.map((input, index) => ( @@ -83,8 +85,14 @@ const SearchApplication = ({ onSearch, type, onClose, searchFields, searchParams
))} -
-
+ {/* Updated Search & Clear All Button */} +
+
{type === "desktop" && !mobileView && ( {clearAll()} @@ -99,6 +107,24 @@ const SearchApplication = ({ onSearch, type, onClose, searchFields, searchParams /> )}
+
+
+ {/*Don't Remove :Chance of Updated Search & Clear All Button*/} + {/*
+ {type === "desktop" && !mobileView && ( + + {clearAll()} + + )} + {type === "desktop" && !mobileView && ( + + )} +
*/}
{(type === "mobile" || mobileView) && ( From 00c4a51a328d3234dccfdae8699eff836ea8a5f6 Mon Sep 17 00:00:00 2001 From: Saloni-eGov Date: Tue, 2 Jul 2024 16:09:49 +0530 Subject: [PATCH 076/118] ISTE-175 added code for pushing roll out data to indexer --- .../config/WSCalculationConfiguration.java | 3 ++ .../service/WSCalculationService.java | 6 +-- .../service/WSCalculationServiceImpl.java | 25 ++++++++--- .../web/controller/CalculatorController.java | 14 ++++++- .../web/models/RollOutDashboard.java | 42 +++++++++++++++++++ .../web/models/RollOutDashboardRequest.java | 24 +++++++++++ .../web/models/RollOutDashboardResponse.java | 26 ++++++++++++ .../src/main/resources/application.properties | 1 + 8 files changed, 132 insertions(+), 9 deletions(-) create mode 100644 municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/web/models/RollOutDashboard.java create mode 100644 municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/web/models/RollOutDashboardRequest.java create mode 100644 municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/web/models/RollOutDashboardResponse.java diff --git a/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/config/WSCalculationConfiguration.java b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/config/WSCalculationConfiguration.java index a466bdb3e..44a44c116 100644 --- a/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/config/WSCalculationConfiguration.java +++ b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/config/WSCalculationConfiguration.java @@ -270,4 +270,7 @@ public class WSCalculationConfiguration { @Value("${ws.generate.demand.bulk}") private String wsGenerateDemandBulktopic; + + @Value("${kafka.topic.roll.out.dashboard}") + private String rollOutDashBoardTopic; } diff --git a/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/service/WSCalculationService.java b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/service/WSCalculationService.java index e5cd8cc61..216a1bc87 100644 --- a/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/service/WSCalculationService.java +++ b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/service/WSCalculationService.java @@ -3,9 +3,7 @@ import java.util.List; import org.egov.common.contract.request.RequestInfo; -import org.egov.wscalculation.web.models.BulkDemand; -import org.egov.wscalculation.web.models.Calculation; -import org.egov.wscalculation.web.models.CalculationReq; +import org.egov.wscalculation.web.models.*; public interface WSCalculationService { @@ -15,4 +13,6 @@ public interface WSCalculationService { void generateDemandBasedOnTimePeriod(RequestInfo requestInfo, boolean isSendMessage); void generateBulkDemandForTenant(BulkDemand bulkDemand); + + RollOutDashboard sendDataForRollOut(RollOutDashboardRequest rollOutDashboardRequest); } diff --git a/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/service/WSCalculationServiceImpl.java b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/service/WSCalculationServiceImpl.java index e6d7c5b91..701bc281d 100644 --- a/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/service/WSCalculationServiceImpl.java +++ b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/service/WSCalculationServiceImpl.java @@ -3,11 +3,7 @@ import java.math.BigDecimal; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.stream.Collectors; import com.fasterxml.jackson.core.type.TypeReference; @@ -29,6 +25,7 @@ import org.egov.wscalculation.util.CalculatorUtil; import org.egov.wscalculation.util.WSCalculationUtil; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.dao.DataRetrievalFailureException; import org.springframework.stereotype.Service; import com.jayway.jsonpath.JsonPath; @@ -457,6 +454,24 @@ public List applyAdhocTax(AdhocTaxReq adhocTaxReq) { } + @Override + public RollOutDashboard sendDataForRollOut(RollOutDashboardRequest rollOutDashboardRequest) { + DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); + LocalDateTime date = LocalDateTime.now(); + log.info("Time schedule start for roll out dashboard on : " + date.format(dateTimeFormatter)); + try { + String tenantId = rollOutDashboardRequest.getRollOutDashboard().getTenantid(); + if (tenantId != null) { + rollOutDashboardRequest.getRollOutDashboard().setCreatedTime(new Date()); + log.info("Role out data sending to kafka topic "+ rollOutDashboardRequest.getRollOutDashboard()); + wsCalculationProducer.push(config.getRollOutDashBoardTopic(), rollOutDashboardRequest.getRollOutDashboard()); + } + } catch (Exception e) { + log.info("Exception occurred while fetching tenantId"); + throw new DataRetrievalFailureException("Data not found "+e); + } + return rollOutDashboardRequest.getRollOutDashboard(); + } } diff --git a/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/web/controller/CalculatorController.java b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/web/controller/CalculatorController.java index 2e15735ed..6de67bd0b 100644 --- a/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/web/controller/CalculatorController.java +++ b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/web/controller/CalculatorController.java @@ -4,6 +4,7 @@ import java.util.List; import javax.validation.Valid; +import lombok.extern.slf4j.Slf4j; import org.egov.wscalculation.web.models.*; import org.egov.wscalculation.service.DemandService; @@ -24,7 +25,7 @@ import lombok.Getter; import lombok.Setter; - +@Slf4j @Getter @Setter @Builder @@ -113,4 +114,15 @@ public ResponseEntity addPenalty(@RequestBody Penalt } + @PostMapping("/_rollOutDashboardSearch") + public ResponseEntity rollOutDashboardSearch(@RequestBody RollOutDashboardRequest rollOutDashboardRequest) + { + log.info("Roll out dashboard request"+rollOutDashboardRequest.getRollOutDashboard()); + RollOutDashboard sendDataForRollOut=wSCalculationService.sendDataForRollOut(rollOutDashboardRequest); + RollOutDashboardResponse response = RollOutDashboardResponse.builder(). + rollOutDashboard(sendDataForRollOut).build(); + + return new ResponseEntity<>(response,HttpStatus.OK); + } + } diff --git a/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/web/models/RollOutDashboard.java b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/web/models/RollOutDashboard.java new file mode 100644 index 000000000..53f40a94f --- /dev/null +++ b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/web/models/RollOutDashboard.java @@ -0,0 +1,42 @@ +package org.egov.wscalculation.web.models; + +import jdk.nashorn.internal.ir.annotations.Ignore; +import lombok.*; + +import java.time.LocalDateTime; +import java.util.Date; + +@Data +@AllArgsConstructor +@NoArgsConstructor +@Builder +public class RollOutDashboard { + private String id; + private String tenantid; + private String projectcode; + private String zone; + private String circle; + private String division; + private String subdivision; + private String section; + private int activeUsersCount; + private double totalAdvance; + private double totalPenalty; + private int totalConnections; + private int activeConnections; + private String lastDemandGenDate; + private int demandGeneratedConsumerCount; + private double totalDemandAmount; + private double collectionTillDate; + private String lastCollectionDate; + private int expenseCount; + private int countOfElectricityExpenseBills; + private int noOfPaidExpenseBills; + private String lastExpenseTxnDate; + private double totalAmountOfExpenseBills; + private double totalAmountOfElectricityBills; + private double totalAmountOfPaidExpenseBills; + private String dateRange; + private Date createdTime; + private String tenantName; +} \ No newline at end of file diff --git a/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/web/models/RollOutDashboardRequest.java b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/web/models/RollOutDashboardRequest.java new file mode 100644 index 000000000..21f6f26fc --- /dev/null +++ b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/web/models/RollOutDashboardRequest.java @@ -0,0 +1,24 @@ +package org.egov.wscalculation.web.models; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.egov.common.contract.request.RequestInfo; + +import javax.validation.Valid; + +@AllArgsConstructor +@NoArgsConstructor +@Data +@Builder +public class RollOutDashboardRequest { + + @JsonProperty("RequestInfo") + private RequestInfo requestInfo = null; + + @Valid + @JsonProperty("rollOutDashboard") + private RollOutDashboard rollOutDashboard = null; +} \ No newline at end of file diff --git a/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/web/models/RollOutDashboardResponse.java b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/web/models/RollOutDashboardResponse.java new file mode 100644 index 000000000..ca36edaff --- /dev/null +++ b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/web/models/RollOutDashboardResponse.java @@ -0,0 +1,26 @@ +package org.egov.wscalculation.web.models; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.egov.common.contract.response.ResponseInfo; + +import javax.validation.Valid; +import java.util.List; + +@Data +@AllArgsConstructor +@NoArgsConstructor +@Builder +public class RollOutDashboardResponse { + + @JsonProperty("ResponseInfo") + private ResponseInfo responseInfo = null; + + @JsonProperty("RollOutDashboard") + private RollOutDashboard rollOutDashboard = null; + +} \ No newline at end of file diff --git a/municipal-services/ws-calculator/src/main/resources/application.properties b/municipal-services/ws-calculator/src/main/resources/application.properties index b1fd3f568..86620d15d 100644 --- a/municipal-services/ws-calculator/src/main/resources/application.properties +++ b/municipal-services/ws-calculator/src/main/resources/application.properties @@ -25,6 +25,7 @@ spring.kafka.producer.value-serializer=org.springframework.kafka.support.seriali $KAFKA TOPIC DETAILS egov.watercalculatorservice.createdemand.topic=ws-generate-demand +kafka.topic.roll.out.dashboard=rollout-dashboard-index #Demand Saved And Failed Topic ws.calculator.demand.successful.topic=ws-demand-saved From f6be0c2d3d98cc08309865ee24e7be0303b9cf31 Mon Sep 17 00:00:00 2001 From: Nipun Arora Date: Wed, 3 Jul 2024 11:14:30 +0530 Subject: [PATCH 077/118] css code --- .../packages/css/CHANGELOG.md | 126 ++ .../micro-ui-internals/packages/css/README.md | 29 +- .../packages/css/gulpfile.js | 18 +- .../packages/css/package.json | 53 +- .../packages/css/src/components/body.scss | 8 +- .../packages/css/src/components/buttons.scss | 53 +- .../packages/css/src/components/card.scss | 11 +- .../src/components/inboxv2/InboxLinks.scss | 6 + .../src/components/inboxv2/horizontalNav.scss | 5 + .../src/components/inboxv2/inboxSearch.scss | 188 +-- .../inboxv2/inboxSearchComposer.scss | 44 +- .../css/src/components/loaderWithGap.scss | 45 + .../css/src/components/metricsTable.scss | 1 + .../src/components/multiSelectDropdown.scss | 1 + .../packages/css/src/components/navbar.scss | 9 + .../packages/css/src/components/radiobtn.scss | 1 + .../css/src/components/selectdropdown.scss | 1 + .../packages/css/src/components/sidebar.scss | 141 +++ .../packages/css/src/components/table.scss | 23 + .../css/src/components/textfields.scss | 12 - .../packages/css/src/components/topbar.scss | 4 + .../src/digitv2/components/ErrorMessage.scss | 6 + .../digitv2/components/FormComposerV2.scss | 126 ++ .../src/digitv2/components/actionLinkV2.scss | 7 + .../src/digitv2/components/actionbarV2.scss | 110 ++ .../digitv2/components/appContainerV2.scss | 55 + .../src/digitv2/components/backButtonV2.scss | 26 + .../css/src/digitv2/components/bannerV2.scss | 120 ++ .../digitv2/components/bodyContainerV2.scss | 39 + .../src/digitv2/components/breadCrumbV2.scss | 31 + .../src/digitv2/components/breakLineV2.scss | 6 + .../css/src/digitv2/components/cardV2.scss | 385 ++++++ .../src/digitv2/components/checkboxV2.scss | 61 + .../src/digitv2/components/checkpointV2.scss | 71 ++ .../components/collapseAndExpandGroups.scss | 60 + .../src/digitv2/components/dateWrapV2.scss | 12 + .../digitv2/components/displayPhotosV2.scss | 33 + .../css/src/digitv2/components/headerV2.scss | 6 + .../src/digitv2/components/infoBannerV2.scss | 37 + .../css/src/digitv2/components/keynoteV2.scss | 35 + .../css/src/digitv2/components/loaderV2.scss | 81 ++ .../digitv2/components/mobileNumberV2.scss | 33 + .../components/multiSelectDropdownV2.scss | 92 ++ .../digitv2/components/noresultsfoundV2.scss | 11 + .../src/digitv2/components/otpInputV2.scss | 15 + .../css/src/digitv2/components/popUpV2.scss | 24 + .../src/digitv2/components/radiobtnV2.scss | 51 + .../css/src/digitv2/components/ratingV2.scss | 33 + .../digitv2/components/selectdropdownV2.scss | 180 +++ .../css/src/digitv2/components/tagV2.scss | 28 + .../src/digitv2/components/telephoneV2.scss | 18 + .../src/digitv2/components/textInputV2.scss | 123 ++ .../src/digitv2/components/textareaV2.scss | 11 + .../src/digitv2/components/uploadFileV2.scss | 146 +++ .../packages/css/src/digitv2/index.scss | 167 +++ .../css/src/digitv2/pages/employee/index.scss | 1 + .../src/digitv2/pages/employee/workbench.scss | 1050 +++++++++++++++++ .../packages/css/src/digitv2/typography.scss | 241 ++++ .../packages/css/src/index.scss | 98 +- .../css/src/pages/employee/container.scss | 2 +- .../css/src/pages/employee/inbox.scss | 24 +- .../css/src/pages/employee/index.scss | 87 +- .../css/src/pages/employee/login.scss | 142 ++- .../css/src/pages/employee/scroll-table.scss | 5 + .../packages/css/tailwind.config.js | 132 ++- .../modules/hrms/src/components/hrmscard.js | 4 + .../modules/hrms/src/pages/SearchUser.js | 9 + .../packages/modules/hrms/src/pages/index.js | 3 +- 68 files changed, 4595 insertions(+), 221 deletions(-) create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/CHANGELOG.md create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/loaderWithGap.scss create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/sidebar.scss create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/ErrorMessage.scss create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/FormComposerV2.scss create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/actionLinkV2.scss create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/actionbarV2.scss create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/appContainerV2.scss create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/backButtonV2.scss create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/bannerV2.scss create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/bodyContainerV2.scss create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/breadCrumbV2.scss create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/breakLineV2.scss create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/cardV2.scss create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/checkboxV2.scss create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/checkpointV2.scss create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/collapseAndExpandGroups.scss create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/dateWrapV2.scss create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/displayPhotosV2.scss create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/headerV2.scss create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/infoBannerV2.scss create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/keynoteV2.scss create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/loaderV2.scss create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/mobileNumberV2.scss create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/multiSelectDropdownV2.scss create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/noresultsfoundV2.scss create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/otpInputV2.scss create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/popUpV2.scss create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/radiobtnV2.scss create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/ratingV2.scss create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/selectdropdownV2.scss create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/tagV2.scss create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/telephoneV2.scss create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/textInputV2.scss create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/textareaV2.scss create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/uploadFileV2.scss create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/index.scss create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/pages/employee/index.scss create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/pages/employee/workbench.scss create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/typography.scss create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/SearchUser.js diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/CHANGELOG.md b/frontend/micro-ui/web/micro-ui-internals/packages/css/CHANGELOG.md new file mode 100644 index 000000000..59a873d4b --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/CHANGELOG.md @@ -0,0 +1,126 @@ +# Changelog + +## [1.8.2-beta.3] [06-06-2024] +- added audit history styles + +## [1.8.2-beta.2] +- Updated LogoutDialog Popup styles. + +## [1.8.2-beta.1] +- Formatted changelog file. + +## [1.8.1-beta.11] +- Updated styles for language selection dropdown options card. + +## [1.8.1-beta.10] +- Fixed login header alignment. + +## [1.8.1-beta.8] +- Used a new Primary constant color "#c84c0e". + - **Note:** Use this version with component 1.8.1-beta.15 and core 1.8.1-beta.12. + +## [1.8.1-beta.7] +- Added CSS for Loader With Gap. +- Added CSS for viewcomposer header. + +## [1.8.1-beta.5] +- Added CSS for Tab InboxSearchComposer. + +## [1.8.1-beta.2] +- Added CSS for create hierarchy. + +## [1.8.1-beta.1] +- Republished after merging with Master due to version issues. + +## [1.8.0-beta.20] +- Added CSS for info message in localisation screen. + +## [1.8.0-beta.19] +- Improved Bulk Upload and Bulk Upload Toast CSS. + +## [1.8.0-beta.18] +- Added bulk upload CSS. + +## [1.8.0-beta.17] +- Fixed mobile view issue for detail modals. + +## [1.8.0-beta.16] +- Added styles for detail modals. + +## [1.8.0-beta.15] +- Added styles for multi select dropdowns. + +## [1.8.0-beta.14] +- Added tour help styles. + +## [1.8.0-beta.13] +- Fixed the login text styling issue. + +## [1.8.0] +- Workbench v1.0. + +## [1.8.0-beta.1] +- Added styles for login dropdown and homepage dropdowns. + +## [1.8.0-beta] +- Added workbench related CSS and some new Digit v2 constants based on em. + +## [1.7.0] +- Urban 2.9. + +## [1.6.0] +- Urban 2.8. + +## [1.5.41] +- Added styles for login dropdown and homepage dropdowns. + +## [1.5.40] +- Fixed alignment issue in edit and logout. + +## [1.5.39] +- Updated login SCSS and fixed alignment issues. + +## [1.5.37] +- Updated the README content. + +## [1.5.36] +- Enhanced the formcomposer with header attribute. + +## [1.5.35] +- Fixed the card CSS issues. + +## [1.5.34] +- Fixed breadcrumb styling issue. + +## [1.5.33] +- Fixed some card-related CSS issues due to v2 CSS. + +## [1.5.32] +- Added newer CSS DIGITv2 and corrected a few existing issues. + +## [1.5.31] +- Corrected the CSS for inbox composers and default core UI. + +## [1.5.30] +- Updated the CSS for dynamic dropdown filter DSS. + +## [1.5.29] +- Fixed layout issues. + +## [1.5.28] +- Horizontal Bar chart alignment fixes. + +## [1.5.27] +- DSS UI alignment fixes for Horizontal Metric and bar chart. + +## [1.5.26] +- Added new CSS class for DSS enhancements. + +## [1.5.25] +- Added the CSS of inbox search composers. + +## [1.5.24] +- Added the README file. + +## [1.5.23] +- Base version. diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/README.md b/frontend/micro-ui/web/micro-ui-internals/packages/css/README.md index 600bb6a68..5efb59f41 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/README.md +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/README.md @@ -1,4 +1,4 @@ - + # digit-ui-css @@ -39,23 +39,20 @@ frontend/micro-ui/web/public/index.html ``` -# Changelog +## Changelog -```bash -1.5.31 Corrected the CSS for inbox composers and default core ui -1.5.30 Updated the css for dynamic drodown filter dss -1.5.29 layout issues fixed -1.5.28 Horizontal Bar chart alignment fixes -1.5.27 DSS UI alignment fixes for Horizontal Metric and bar chart -1.5.26 added new css class for dss enhancements -1.5.25 added the css of inbox search composers -1.5.24 added the readme file -1.5.23 base version -``` +### Summary for Version [1.8.2-beta.1] - 2024-06-05 + +For a detailed changelog, see the [CHANGELOG.md](./CHANGELOG.md) file. + + +## Contributors + +[jagankumar-egov] [nipunarora-eGov] [Tulika-eGov] [Ramkrishna-egov] [nabeelmd-eGov] [anil-egov] [vamshikrishnakole-wtt-egov] -## Published from DIGIT Core -Digit Dev Repo (https://github.com/egovernments/DIGIT-Dev/tree/digit-ui-core) +### Published from DIGIT Frontend +DIGIT Frontend Repo (https://github.com/egovernments/Digit-Frontend/tree/develop) ## License -MIT © [jagankumar-egov](https://github.com/jagankumar-egov) \ No newline at end of file +MIT © [jagankumar-egov](https://github.com/jagankumar-egov) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/gulpfile.js b/frontend/micro-ui/web/micro-ui-internals/packages/css/gulpfile.js index f76cae723..5d1a70549 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/gulpfile.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/gulpfile.js @@ -1,7 +1,22 @@ +const fs = require("fs"); +const { name, version, author, cssConfig } = JSON.parse(fs.readFileSync("package.json")); + +const headerString = ` +@charset "UTF-8"; +/*! + * ${name} - ${version} + * + * Copyright (c) ${new Date().getFullYear()} ${author} + * + */ + `; const { series, src, dest, watch, task } = require("gulp"); +const header = require("postcss-header"); + const clean = require("gulp-clean"); const postcss = require("gulp-postcss"); -const sass = require("gulp-sass"); +const sass = require('gulp-sass'); + const postcssPresetEnv = require("postcss-preset-env"); const cleanCSS = require("gulp-clean-css"); const rename = require("gulp-rename"); @@ -23,6 +38,7 @@ function styles() { postcssPresetEnv({ stage: 2, autoprefixer: { cascade: false }, features: { "custom-properties": true } }), require("autoprefixer"), require("cssnano"), + header({ header: headerString }), ]; return src("src/index.scss").pipe(postcss(plugins)).pipe(sass()).pipe(dest(output)); } diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/package.json b/frontend/micro-ui/web/micro-ui-internals/packages/css/package.json index ee5f0b475..1300c00c9 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/package.json +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/package.json @@ -22,30 +22,30 @@ ], "style": "./dist/index.css", "dependencies": { - "node-sass": "^4.14.1", - "normalize.css": "^8.0.1", - "postcss-scss": "^3.0.1", - "tailwindcss": "^1.8.10" + "node-sass": "4.14.1", + "normalize.css": "8.0.1", + "postcss-scss": "3.0.5", + "tailwindcss": "1.9.6" }, - "devDependencies": { - "autoprefixer": "^10.0.0", - "cssnano": "^4.1.10", - "gh-pages": "^3.1.0", - "gulp": "^4.0.2", - "gulp-clean": "^0.4.0", - "gulp-clean-css": "^4.3.0", - "gulp-livereload": "^4.0.2", - "gulp-postcss": "9.0.1", - "gulp-rename": "^2.0.0", - "gulp-sass": "^4.1.0", - "postcss": "^8.0.9", - "postcss-cli": "^8.0.0", - "postcss-header": "^2.0.0", - "postcss-import": "^12.0.1", - "postcss-prefixer": "^2.1.2", - "postcss-preset-env": "^6.7.0", - "postcss-scss": "^3.0.1", - "sass": "^1.26.11" + "devDependencies": { + "autoprefixer": "10.4.14", + "cssnano": "4.1.11", + "gh-pages": "3.2.3", + "gulp": "4.0.2", + "gulp-clean": "0.4.0", + "gulp-clean-css": "4.3.0", + "gulp-livereload": "4.0.2", + "gulp-postcss": "9.0.1", + "gulp-rename": "2.0.0", + "gulp-sass": "4.1.1", + "postcss": "8.4.26", + "postcss-cli": "8.3.1", + "postcss-header": "2.0.0", + "postcss-import": "12.0.1", + "postcss-prefixer": "2.1.3", + "postcss-preset-env": "6.7.1", + "postcss-scss": "3.0.5", + "sass": "^1.26.11" }, "files": [ "dist/index.min.css", @@ -54,5 +54,12 @@ "img/**/*.png", "src/**/*.scss", "src/**/*.css" + ], + "keywords": [ + "digit", + "egov", + "dpg", + "digit-ui", + "css" ] } \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/body.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/body.scss index e9df5ebdc..8965c861f 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/body.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/body.scss @@ -50,14 +50,8 @@ body { color: theme(colors.text.secondary); display: flex; margin-bottom: 10px; - padding: initial; list-style: none; - .bread-crumb--item { - a { - text-decoration: inherit; - color: inherit; - } - } + padding: 0; } .bread-crumb--item { margin-left: 5px; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/buttons.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/buttons.scss index 97c1de02f..14312a250 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/buttons.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/buttons.scss @@ -47,4 +47,55 @@ } .submit-bar:focus { @apply outline-none !important; -} \ No newline at end of file +} + +.jk-digit-secondary-btn { + width: auto; + height: 40px; + background: theme(colors.white); + border: 1px solid theme(colors.primary.main); + padding: 12px; + color: theme(colors.primary.main); + display: flex; + align-items: center; + font-size: 19px; + cursor: pointer; + svg { + margin: 0 10px; + } +} +.jk-digit-primary-btn { + width: auto; + height: 40px; + background: theme(colors.primary.main); + border: 1px solid theme(colors.primary.main); + padding: 6px; + color: theme(colors.white); + display: flex; + align-items: center; + cursor: pointer; + font-size: 19px; + box-shadow: inset 0 -2px 0 #0b0c0c; + svg { + margin: 0 15px; + } +} + +.jk-digit-disabled-btn { + opacity: 0.5; + font-size: 19px; + cursor: not-allowed; +} + +.jk-header-btn-wrapper { + display: flex; + justify-content: space-between; +} + +/* for mobile view */ +@media (max-width: 780px) { + .jk-header-btn-wrapper { + flex-flow: column; + margin-bottom: 15px; + } +} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/card.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/card.scss index a6f52f961..16d6c352c 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/card.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/card.scss @@ -62,7 +62,7 @@ } .employeeCard { - @apply bg-white shadow-card mb-xl; + @apply bg-white shadow-card p-md mb-xl; border-radius: 4px; .card-header { @@ -135,6 +135,7 @@ } .header-content { + margin-top: 0.2rem; } .header-end { @@ -153,7 +154,7 @@ .submit-bar { @apply h-10 bg-primary-main text-center w-full outline-none; box-shadow: inset 0px -2px 0px theme(colors.text.primary); - + cursor: pointer; &:focus { @apply outline-none; } @@ -208,8 +209,10 @@ } .employeeCard { - @apply mb-md mx-md !important; - + /* TODO need to revisit that we need mx-md NABEEL/ANIL + @apply mb-md mx-md !important; + */ + @apply mb-md !important; &.filter { margin-left: auto; margin-right: auto; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/InboxLinks.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/InboxLinks.scss index 1930d2ca3..7549fe0b3 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/InboxLinks.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/InboxLinks.scss @@ -1,10 +1,14 @@ +@import url("../../digitv2/index.scss"); + .inbox-search-links-container { + @extend .light-paper-primary; height: 100%; width: 100% !important; display: flex; flex-direction: column; padding: 1rem; .header { + @extend .light-text-color-primary; display: grid; grid-template-columns: 20% 1fr; .logo { @@ -18,6 +22,7 @@ } } .text { + @extend .light-text-color-primary; line-height: 32px; font-weight: 700; color : black; @@ -44,6 +49,7 @@ display: flex; flex-direction: column; .link { + @extend .light-primary; padding: 8px; --text-opacity: 1; color: #f47738; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/horizontalNav.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/horizontalNav.scss index b97b7c827..13fd228d1 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/horizontalNav.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/horizontalNav.scss @@ -1,4 +1,8 @@ +@import url("../../digitv2/index.scss"); + .horizontal-nav { + @extend .light-paper-primary; + @extend .light-text-color-primary; overflow: auto; display: flex; margin-top: 3rem; @@ -21,6 +25,7 @@ background: none; .icon { + @extend .light-background; display: block; color: rgb(117, 117, 117); fill: rgb(117, 117, 117); diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/inboxSearch.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/inboxSearch.scss index 22e8a9774..a24f8919f 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/inboxSearch.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/inboxSearch.scss @@ -1,104 +1,116 @@ +@import url("../../digitv2/index.scss"); + .search-wrapper { - height: 100%; - width: 100%; - padding: 1rem; + @extend .light-text-color-primary; + @extend .light-paper-primary; + height: 100%; + width: 100%; + padding: 1rem; - .popup-label { - display: flex; - font-size: large; - .header{ - width: 100%; - font-weight: normal; - font-size: large; - .icon { - margin-right: 12px; - margin-top: 5px; - } - } + .popup-label { + display: flex; + font-size: large; + @extend .light-text-color-primary; + .header { + @extend .light-text-color-primary; + width: 100%; + font-weight: normal; + font-size: large; + .icon { + @extend .light-primary; + margin-right: 12px; + margin-top: 5px; + } } + } - .filter-header-wrapper { - display: grid; - grid-template-columns: 15% 1fr 15%; - height: 3rem; - margin-bottom: 1rem; - .icon-refresh { - display: flex; - align-items: center; - justify-content: center; - border: 1px solid #00000017; - cursor: pointer; - svg { - height: 60%; - width: 40%; - } - } - .label { - display: flex; - align-items: center; - justify-content: flex-start; - } - - @media (min-width: 1024px) { - .label { - font-size:24px; - } - } + .filter-header-wrapper { + @extend .light-text-color-primary; + display: grid; + grid-template-columns: 15% 1fr 15%; + height: 3rem; + margin-bottom: 1rem; + .icon-refresh { + display: flex; + align-items: center; + justify-content: center; + border: 1px solid #00000017; + cursor: pointer; + svg { + height: 60%; + width: 40%; + } + } + .label { + @extend .light-text-color-primary; + display: flex; + align-items: center; + justify-content: flex-start; + } - @media (max-width: 1024px) { - .label { - font-size:16px; - } - } + @media (min-width: 1024px) { + .label { + font-size: 24px; + } + } - .icon-filter { - display: flex; - align-items: center; - justify-content: flex-start; - } + @media (max-width: 1024px) { + .label { + font-size: 16px; + } } - .search-field-wrapper { - display: grid; - row-gap: 0.25rem; - column-gap: 1rem; - &.inbox { - grid-template-columns: repeat(3, 1fr); - &.filter { - display: flex; - flex-direction: column; - } - } - &.search { - grid-template-columns: repeat(4, 1fr); - } + .icon-filter { + display: flex; + align-items: center; + justify-content: flex-start; } + } - .search-button-wrapper { + .search-field-wrapper { + display: grid; + row-gap: 0.25rem; + column-gap: 1rem; + &.inbox { + grid-template-columns: repeat(3, 1fr); + &.filter { display: flex; - align-items: center; - justify-content: flex-end; - gap: 1rem; - padding-top: 8px; - &.inbox { - grid-column: 2 / span 2; - &.filter { - button { - width: 100%; - } - } - } - &.search { - grid-column: 3 / span 2; + flex-direction: column; + } + } + &.search { + grid-template-columns: repeat(4, 1fr); + } + .text-input{ + @extend .light-primary; + } + } + + .search-button-wrapper { + display: flex; + align-items: center; + justify-content: flex-end; + gap: 1rem; + padding-top: 8px; + &.inbox { + grid-column: 2 / span 2; + &.filter { + button { + width: 100%; } + } + } + &.search { + grid-column: 3 / span 2; } + } } @screen sm { - .search-wrapper { - .search-field-wrapper { - display: flex; - flex-direction : column; - } - } -} \ No newline at end of file + .search-wrapper { + .search-field-wrapper { + display: flex; + flex-direction: column; + } + } +} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/inboxSearchComposer.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/inboxSearchComposer.scss index 93c815221..7fb3189a2 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/inboxSearchComposer.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/inboxSearchComposer.scss @@ -1,15 +1,36 @@ +@import url("../../digitv2/index.scss"); + .inbox-search-wrapper { + /* + TODO NABEEL/ANIL Removed these since it creates issues in search screen + @extend .light-background; + + */ height: 100%; .inbox-search-component-wrapper { - height: 100%; + /* + TODO NABEEL/ANIL Removed these since it creates issues in search screen + @extend .light-background; + + */ height: 100%; width: 100%; .sections-parent { - height: 100%; + /* + TODO NABEEL/ANIL Removed these since it creates issues in search screen + @extend .light-background; + + */ height: 100%; display: grid; grid-template-columns: 20% 1fr; gap : 1rem; &.inbox { + @extend .light-text-color-primary; .links{ + @extend .light-primary; + @extend .light-paper-primary; + .text{ + @extend .light-text-color-primary; + } .inbox-links-icon{ color:#f47738; fill:#f47738; @@ -31,15 +52,18 @@ } } .search-wrapper { + @extend .light-paper-primary; .search-field-wrapper.search.custom-both-clear-search{ .search-button-wrapper.search { grid-column: initial; } .search-button-wrapper{ .link-label{ + @extend .light-primary; white-space:initial; } .submit-bar { + @extend .light-primary-button; width: 60%; } } @@ -50,8 +74,10 @@ grid-template-columns: 100% } .section { + @extend .light-paper-primary; + @extend .light-text-color-primary; min-height: 10rem; - background-color: white; + /* background-color: white; */ display: flex; align-items: center; justify-content: center; @@ -69,7 +95,17 @@ } } &.filter { - height: fit-content; + @extend .light-paper-primary; + @extend .light-text-color-primary; + height: fit-content; + } + &.tab{ + display: block; + background-color: #eee; + box-shadow: none; + .search-wrapper{ + box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.16); + } } } } diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/loaderWithGap.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/loaderWithGap.scss new file mode 100644 index 000000000..91352b8ab --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/loaderWithGap.scss @@ -0,0 +1,45 @@ +.loader-with-gap-container { + display: flex; + justify-content: center; + align-items: center; + height: 100%; + width: 100%; + display: flex; + flex-direction: column; + background-color: rgba(0, 0, 0, 0.7); + position: fixed; + top: 0; + left: 0; + z-index: 99999; + + .loader { + border: 0.5rem solid rgb(255, 255, 255); + border-top: 0.5rem solid rgba(80, 76, 76, 0); + border-radius: 50%; + width: 3.125rem; + height: 3.125rem; + animation: spin 2s linear infinite; + } + + .loader-inner { + border: 1px solid rgb(255, 255, 255); + border-radius: 50%; + width: 100%; + height: 100%; + } + + .loader-text { + color: whitesmoke; + padding-top: 1.25rem; + } +} + +@keyframes spin { + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(360deg); + } +} \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/metricsTable.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/metricsTable.scss index dcb16b096..786adc3c3 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/metricsTable.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/metricsTable.scss @@ -24,4 +24,5 @@ display: flex; flex-wrap: wrap; margin-top: 15px; + justify-content: space-evenly; } \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/multiSelectDropdown.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/multiSelectDropdown.scss index 5848ee021..f35e380b6 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/multiSelectDropdown.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/multiSelectDropdown.scss @@ -1,5 +1,6 @@ .multi-select-dropdown-wrap{ @apply relative text-form-field text-text-primary w-full; + max-width: 540px; .master, .master-active{ @apply relative border border-solid border-input-border h-10 w-full; input[type=text]{ diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/navbar.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/navbar.scss index 69cacbd35..1074ce0a3 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/navbar.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/navbar.scss @@ -68,6 +68,7 @@ .drawer-list { @apply pt-md; + margin-bottom: 2rem; position: relative; min-height: 1px; overflow: auto; @@ -124,6 +125,7 @@ cursor: pointer; display: flex; flex-direction: column; + .sidebar-link { display: flex; justify-content: space-between; @@ -231,9 +233,11 @@ } .submenu-container { + margin-left: 1.5rem; cursor: pointer; display: flex; flex-direction: column; + .sidebar-link { display: flex; justify-content: space-between; @@ -307,3 +311,8 @@ @apply mr-sm; } } + +.sidebar-list-footer { + position: fixed; + bottom: 0; +} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/radiobtn.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/radiobtn.scss index 74b736237..1d6de0063 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/radiobtn.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/radiobtn.scss @@ -1,5 +1,6 @@ .radio-wrap { @apply my-sm block leading-10 mb-lg; + max-width: 540px; div { @apply block mb-md; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/selectdropdown.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/selectdropdown.scss index 98ef8ec40..57ea39ae5 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/selectdropdown.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/selectdropdown.scss @@ -20,6 +20,7 @@ */ .employee-select-wrap { @apply mb-lg relative; + max-width: 540px; .select { @apply relative block w-full h-10 border border-solid border-input-border; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/sidebar.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/sidebar.scss new file mode 100644 index 000000000..6a04adffd --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/sidebar.scss @@ -0,0 +1,141 @@ +.sidebar-link:hover .arrow { + display: block; +} + +.hidden-arrow { + display: none; +} +.new-dropdown-link{ + display: flex; + align-items: center; + justify-content: space-between; + padding: 10px 15px 15px !important; + color: #fff; + font-size: 1rem; + font-weight: 500; + text-decoration: none; + margin-left: 0px !important; + height: 3rem !important; + margin-left: 1rem; + margin-top: 0.5rem; +} +.selected { + background-color: #e0e0e0; /* Change this to your desired highlight color */ +} + +.selected-item { + background-color: #e0e0e0; /* Set your desired background color for the selected item */ + color: #000; /* Set your desired text color for the selected item */ + /* Add any other styles you want to apply to the selected item */ +} +/* Style the container that acts as the viewport */ +.new-sidebar { + height: 90%; /* Set a fixed height for the viewport */ + overflow: scroll; /* Hide the scrollbar */ + + &::-webkit-scrollbar { + display: none; + } + + &::-webkit-scrollbar { + -ms-overflow-style: none; /* IE and Edge */ + scrollbar-width: none; /* Firefox */ + } +} + +/* Style the content inside the viewport */ +.new-sidebar > div { + height: auto; /* Allow content to expand vertically */ + overflow-y: auto; /* Enable vertical scrolling */ + overflow-x: hidden; + padding-right: 2px; /* Add space for the hidden scrollbar (adjust as needed) */ +} + +/* Style the scrollbar thumb to make it transparent */ +.new-sidebar > div::-webkit-scrollbar-thumb { + background: transparent; +} +.link-icon{ + width: 24px !important; + height: 26px !important; +} +.link-icon svg{ + width: 24px !important; + height: 26px !important; +} + +.employee-search-input{ + width: 150px; + background-color: transparent; + &.nav-bar { + color:#fff; + } + &.nav-bar::placeholder { + color: #fff; + } +} + +.search-icon-wrapper-new { + margin-left: 0.35rem; +} + +.search-icon-wrapper-new svg{ + fill: theme(colors.white) !important; + width: 21px; + height: 21px; +} +.search-icon-wrapper-new svg path { + fill: theme(colors.white) !important; + } + +.submenu-container { + overflow: scroll; + margin-bottom: 1rem; + /* Hide the scrollbar */ + &::-webkit-scrollbar { + display: none; + } + + &.level-2 { + border-left: 1px solid; + margin-left: 2rem; + } + &.level-1 { + margin-left: -1.5rem; + } +} + +.actions { + &.level-0 { + margin-left: 0.4rem; + } + &.selected-action-level-0 { + color: theme(colors.primary.main) !important; + } + &.selected-action-level-1 { + border-left:4px solid theme(colors.primary.main); + margin-left: -0.6rem; + height: 2rem; + color: theme(colors.primary.main) !important; + } + + &.default-0 { + &.active { + + } + } + &.default-1 { + margin-left: -0.6rem; + height: 2rem; + width: 111% !important; + } + + + &.custom { + margin-left: 0.3rem; + } + &:hover { + background-color: #6A8E9D; + opacity: 0.8; + } +} \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/table.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/table.scss index 1b4dcf217..379af9fa6 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/table.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/table.scss @@ -14,6 +14,7 @@ } } + tbody { border: none; padding: 0; @@ -94,6 +95,28 @@ } } } + +.table-fixed-last-column { + thead { + th:last-child { + position: sticky; + background: #fff; + right: 0; + left:0; + border-top-left-radius: 4px; + } + } + tbody { + td:last-child { + position: sticky; + background: #fff; + color: theme(colors.primary.main); + left: 0; + right:0; + } + } +} + .table-fixed-column-common-pay { thead { th:first-child { diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/textfields.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/textfields.scss index 233153613..715140131 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/textfields.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/textfields.scss @@ -9,14 +9,6 @@ .employee-card-input { @apply mb-lg pl-sm outline-none block border w-full h-10 border-input-border border-solid bg-white leading-10 text-form-field text-text-primary; } - -.employee-card-input-only { -} -.employee-card-input-only .employee-card-input { - @apply mb-lg pl-sm outline-none block border w-full h-12 border-input-border border-solid bg-white leading-10 text-form-field text-text-primary; -} - - .employee-card-input:disabled { @apply border-grey-dark text-grey-dark !important; pointer-events: none !important; @@ -90,10 +82,6 @@ } } -.citizen-card-input-only { - @apply mb-lg pl-sm outline-none block border w-full h-12 border-input-border border-solid bg-white leading-10 text-form-field text-text-primary; -} - .citizen-card-input { @apply mb-lg pl-sm outline-none block border w-full h-10 border-input-border border-solid bg-white leading-10 text-form-field text-text-primary; } diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/topbar.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/topbar.scss index 614daa0e3..56bbd8426 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/topbar.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/topbar.scss @@ -146,4 +146,8 @@ video::-webkit-media-controls-panel { top: 55%; position: absolute; width: 100%; +} + +.topbarOptionsClassName { + right: -3rem !important } \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/ErrorMessage.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/ErrorMessage.scss new file mode 100644 index 000000000..07117cc83 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/ErrorMessage.scss @@ -0,0 +1,6 @@ +@import url("../index.scss"); + +.digit-error-message { + @extend .alert-error; + @apply block text-body-s mb-md; +} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/FormComposerV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/FormComposerV2.scss new file mode 100644 index 000000000..c82f8666e --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/FormComposerV2.scss @@ -0,0 +1,126 @@ +@import url("../index.scss"); + +.field-container { + display: flex; + align-items: center; + max-width: 540px; + @apply flex items-center; + + .component-in-front { + @apply flex justify-center items-center; + @extend .light-background; + @extend .light-input-border; + margin-top: 0; + border: 1px solid; + border-right: none; + padding: 7px; + } +} + +.card-date-input { + @apply absolute top-0 left-0 w-3/4 bg-white pl-sm border border-input-border border-solid border-r-0; + outline: transparent solid 1px; + height: 2.5rem; + @extend .light-input-border; +} +.text-input-width { + max-width: 540px; +} + +.text-input { + @apply relative w-full; + input { + background-color: transparent; + &:hover { + @apply border-2 border-solid border-primary-main; + @extend .light-input-border; + } + } +} +.employee-card-input-error { + @apply mb-lg pl-sm block w-full h-10 outline-none border-2 border-error border-solid bg-white leading-10 text-form-field text-text-primary; + @extend .light-input-border; + @extend .alert-error; +} +.card-input-error { + @apply mb-lg pl-sm block w-full h-10 outline-none border-2 border-error border-solid bg-white leading-10 text-form-field text-text-primary; + @extend .light-input-border; + @extend .alert-error; +} + +.employee-card-input { + @apply mb-lg pl-sm outline-none block border w-full h-10 border-input-border border-solid bg-white leading-10 text-form-field text-text-primary; + @extend .light-input-border; +} + +.employee-card-input { + max-width: 540px; +} + +.employee-card-input:disabled { + @apply border-grey-dark text-grey-dark !important; + pointer-events: none !important; + @extend .light-input-border; + @extend .light-text-color-disabled; +} +.employee-card-input--front { + width: fit-content !important; + display: flex; + align-items: center; + /* background: theme(colors.grey.mid); */ + @extend .light-background; + border-right: 0; + padding-right: 5px; +} +.employee-card-input-error { + @apply mb-lg pl-sm block w-full h-10 outline-none border-2 border-error border-solid bg-white leading-10 text-form-field text-text-primary; + @extend .light-input-border; + @extend .alert-error; +} + +.card-textarea, +.employee-card-textarea { + @apply block outline-none mt-md mb-lg border w-full border-input-border border-solid bg-white h-24 text-form-field text-text-primary p-sm; + @extend .light-input-border; +} +.employee-card-textarea { + @apply w-full; + max-width: 540px; +} + +.citizen-card-input { + @apply mb-lg pl-sm outline-none block border w-full h-10 border-input-border border-solid bg-white leading-10 text-form-field text-text-primary; + @extend .light-input-border; +} +.citizen-card-input--front { + @extend .light-background; + width: fit-content !important; + display: flex; + align-items: center; + /* background: theme(colors.grey.mid); */ + border-right: 0; + padding-right: 5px; +} + +.break-line { + @extend .light-input-border; + @apply border-border my-lg; +} + +.primary-label-btn { + @apply flex; + gap: 10px; + + svg { + fill: theme(colors.primary.main); + } + + @extend .light-primary; + cursor: pointer; + font-weight: 500; + width: fit-content; +} + +.digit-form-composer-header{ + font-size:theme(digitv2.fontSize.heading-l-dt); +} \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/actionLinkV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/actionLinkV2.scss new file mode 100644 index 000000000..c41b0b25d --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/actionLinkV2.scss @@ -0,0 +1,7 @@ +@import url("../index.scss"); + +.digit-action-links { + @extend .light-primary; + @apply text-text-btn mr-lg !important; + cursor: pointer; +} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/actionbarV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/actionbarV2.scss new file mode 100644 index 000000000..e5a69acd3 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/actionbarV2.scss @@ -0,0 +1,110 @@ +@import url("../index.scss"); + +.digit-action-bar-wrap { + @extend .light-text-color-primary; + @extend .light-paper-primary; + box-shadow: rgba(0, 0, 0, 0.16) 0 -2px 8px; + max-width: 100%; + z-index: 100; + + @apply left-0 bottom-0 w-full bg-white py-sm px-sm fixed text-right; + + div { + @apply w-full; + } + + .digit-menu-wrap { + @apply absolute bg-white text-left mb-xs z-30 cursor-pointer; + @extend .light-background; + bottom: 45px; + box-shadow: rgba(0, 0, 0, 0.14) 0 8px 10px 1px, rgba(0, 0, 0, 0.12) 0 3px 14px 2px, rgba(0, 0, 0, 0.2) 0 5px 5px -3px; + width: calc(100% - 16px); + right: 8px; + + div { + @apply h-12 pl-sm py-md text-body-l text-text-primary; + @extend .light-primary; + + &:hover { + @apply bg-grey-mid w-full; + @extend .light-background; + } + } + } +} + +@screen dt { + .digit-action-bar-wrap { + box-shadow: rgba(0, 0, 0, 0.16) 0 -2px 8px; + left: 0; + max-width: none; + z-index: 999; + + @apply fixed bottom-0 bg-white py-sm pr-lg text-right; + /* @extend .light-background; */ + + div { + width: calc(100% - 16px); + } + + .digit-menu-wrap { + bottom: 45px; + top: unset; + box-shadow: rgba(0, 0, 0, 0.14) 0 8px 10px 1px, rgba(0, 0, 0, 0.12) 0 3px 14px 2px, rgba(0, 0, 0, 0.2) 0 5px 5px -3px; + @apply absolute h-auto bg-white text-left mb-xs z-30; + width: 240px; + right: 24px; + + div { + @apply h-12 pl-sm py-md text-body-l text-text-primary; + + &:hover { + @apply bg-grey-mid w-full; + /* @extend .light-background; */ + } + } + } + } +} + +.digit-action-bar-wrap-registry { + div { + @apply w-full; + } + .digit-menu-wrap { + @apply absolute bg-white text-left mb-xs z-30 cursor-pointer; + box-shadow: rgba(0, 0, 0, 0.14) 0 8px 10px 1px, rgba(0, 0, 0, 0.12) 0 3px 14px 2px, rgba(0, 0, 0, 0.2) 0 5px 5px -3px; + width: 160px; + right: 60px; + @extend .light-background; + + div { + @apply h-12 pl-sm py-md text-body-l text-text-primary; + + &:hover { + @apply bg-grey-mid w-full; + @extend .light-background; + } + } + } + + .digit-search-add { + padding: 12px 16px; + @extend .light-primary; + color: rgb(244, 119, 56); + display: flex; + cursor: pointer; + } + + .digit-search-add-icon { + @extend .light-primary-button; + background: rgb(244, 119, 56); + border-radius: 50%; + height: 24px; + width: 24px; + display: flex; + justify-content: center; + align-items: center; + margin-left: 10px; + } +} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/appContainerV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/appContainerV2.scss new file mode 100644 index 000000000..fda32e932 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/appContainerV2.scss @@ -0,0 +1,55 @@ +@import url("../index.scss"); + +.app-container { + @extend .light-background; + width: 100%; + form { + .card { + max-width: 960px; + h2 { + @extend .light-text-color-primary; + text-align: left; + } + .field-container { + max-width: 540px; + } + button { + @extend .light-primary-button; + max-width: 240px; + } + .input-otp-wrap, + .card-text-button { + @extend .light-primary-button; + text-align: left; + } + } + } +} + +@screen dt { + .employee-app-container { + @apply w-full; + } + + .app-container { + width: 100%; + form { + .card { + max-width: 960px; + h2 { + text-align: left; + } + .field-container { + max-width: 540px; + } + button { + max-width: 240px; + } + .input-otp-wrap, + .card-text-button { + text-align: left; + } + } + } + } +} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/backButtonV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/backButtonV2.scss new file mode 100644 index 000000000..68f7cf957 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/backButtonV2.scss @@ -0,0 +1,26 @@ +@import url("../index.scss"); + +.digit-back-button { + @extend .light-text-color-primary; + @extend .light-input-border; + width: fit-content; + @apply flex items-center cursor-pointer border-b font-rc text-text-btn ml-sm mb-md; + + img { + @apply flex; + } + + svg { + @apply flex; + } + + p { + @apply flex; + } +} + +@screen dt { + .digit-back-button { + margin-left: 0; + } +} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/bannerV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/bannerV2.scss new file mode 100644 index 000000000..06c16970a --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/bannerV2.scss @@ -0,0 +1,120 @@ +@import url("../index.scss"); + +.digit-banner-success-wrap, +.digit-banner-emp-success-wrap { + @apply block bg-success w-full text-center text-white pt-md pb-sm mb-md; + + header { + @apply block mb-sm font-rc font-bold text-heading-xl; + } + + div { + img { + padding: 13.67px; + margin-left: auto; + margin-right: auto; + @apply border border-solid border-white rounded-full h-16 w-16 bg-white mb-md; + } + + svg { + padding: 13.67px; + margin-left: auto; + margin-right: auto; + @apply border border-solid border-white rounded-full h-16 w-16 bg-white mb-md; + } + + svg.payment-svg { + border: unset; + background-color: unset; + @apply rounded-full; + } + + h2 { + @apply font-bold text-caption-m mb-sm; + } + + p { + @apply font-bold text-caption-l; + } + } +} + +.digit-banner-error-wrap, +.digit-banner-emp-error-wrap { + @apply block bg-error w-full text-center text-white pt-md pb-sm mb-md; + + + header { + @apply block mb-sm font-rc font-bold text-heading-xl; + } + + img { + margin-left: auto; + margin-right: auto; + padding: 13.67px; + @apply border border-solid border-white rounded-full bg-white h-16 w-16 mb-md; + } + + svg { + margin-left: auto; + margin-right: auto; + padding: 13.67px; + @apply border border-solid border-white rounded-full bg-white h-16 w-16 mb-md; + } +} + +@screen dt { + .digit-banner-success-wrap { + header { + @apply text-heading-xl-dt; + } + } + .digit-banner-emp-success-wrap { + width: calc(100%); + header { + @apply text-heading-xl-dt; + } + } + + .digit-banner-error-wrap { + width: 100%; + header { + @apply text-heading-xl-dt; + } + } + + .digit-banner-emp-error-wrap { + width: calc(100%); + header { + @apply text-heading-xl-dt; + } + } +} + +.banner { + @apply flex justify-center items-center; + height: calc(100vh - 80px); + background: linear-gradient(rgba(11, 75, 102, 0.8), rgba(11, 75, 102, 0.8)), var(--banner-url) center center; + + .bannerCard { + min-width: 400px; + } + .bannerLogo { + width: 80px; + height: 40px; + object-fit: contain; + padding-right: 10px; + margin-right: 10px; + border-right: 1px solid theme(colors.text.primary); + } + .bannerHeader { + @apply flex justify-center items-center; + margin-bottom: 24px; + } +} + +.banner-container { + flex-direction: column; + justify-content: center; + align-items: center !important; +} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/bodyContainerV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/bodyContainerV2.scss new file mode 100644 index 000000000..9836a7104 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/bodyContainerV2.scss @@ -0,0 +1,39 @@ +@import url("../index.scss"); + +body { + @extend .light-background; +} + +.body-container { + @extend .light-background; + @apply h-full min-h-screen overflow-x-hidden; +} + +.body-container::-webkit-scrollbar { + display: none; +} + +.h1 { + @extend .light-text-color-primary; + @apply text-heading-l font-bold mb-md ml-md; +} + +.link-label { + @extend .light-primary; + @apply block mb-md ml-md cursor-pointer; + + &:hover { + @extend .light-text-color-primary; + } +} + +@screen dt { + .h1 { + margin-left: 0; + @apply text-heading-l-dt; + } + + .link-label { + margin-left: 0; + } +} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/breadCrumbV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/breadCrumbV2.scss new file mode 100644 index 000000000..2b13c8682 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/breadCrumbV2.scss @@ -0,0 +1,31 @@ +@import url("../index.scss"); + +.digit-bread-crumb { + @extend .light-text-color-secondary; + font-size: 14px; + display: flex; + margin-bottom: 10px; +} +.digit-bread-crumb--item { + margin-left: 5px; + + &:not(:last-child):after { + content: " /"; + } + + button { + outline: none; + } + + .last { + @extend .light-text-color-primary; + } + + span { + cursor: pointer; + } +} +ol, +ul { + list-style: none; +} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/breakLineV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/breakLineV2.scss new file mode 100644 index 000000000..1b67e4bcc --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/breakLineV2.scss @@ -0,0 +1,6 @@ +@import url("../index.scss"); + +.digit-break-line { + @apply border-solid border-2; + @extend .light-input-border; +} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/cardV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/cardV2.scss new file mode 100644 index 000000000..ee75e5a96 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/cardV2.scss @@ -0,0 +1,385 @@ +@import url("../index.scss"); + +.digit-card { + @apply bg-white m-sm px-md pt-md pb-lg shadow-card; + @extend .light-paper-primary; + border-radius: 4px; + max-width: 960px; + + .digit-card-header { + @extend .light-primary; + @apply text-heading-xl font-bold font-rc align-middle text-left mb-md; + } + + .digit-card-sub-header { + @extend .light-primary; + @apply text-caption-xl font-bold align-middle text-left mb-sm; + } + + .digit-card-caption { + @extend .light-text-color-secondary; + @apply text-caption-xl mb-sm; + } + + .digit-card-text { + @extend .light-text-color-secondary; + @apply text-body-l align-middle text-left mb-lg; + + span { + @extend .light-text-color-primary; + } + } + + .digit-card-text-primary { + @extend .light-primary; + @apply text-body-l; + } + + .digit-card-text-button { + @extend .light-primary; + @apply text-text-btn; + } + + .digit-card-label { + @extend .light-primary; + @apply text-legend mb-sm; + } + + .digit-card-label-error { + @extend .alert-error; + @apply block text-body-s text-error mb-md; + } + + .digit-card-label-desc { + @extend .light-text-color-secondary; + @apply font-bold text-heading-s mb-md; + } + + .digit-card-link { + @extend .light-primary; + @apply block text-center text-link mt-md cursor-pointer; + } +} + +.digit-validation-error { + @extend .alert-error; + @apply block text-body-s text-error; +} + +.digit-docsDescription { + @extend .light-text-color-primary; +} + +.digit-field-container { + @apply flex items-center; +} + +.digit-employee-card { + @extend .light-paper-primary; + @apply shadow-card p-md mb-xl; + border-radius: 4px; + + .digit-card-header { + @extend .light-primary; + @apply text-heading-xl font-bold font-rc align-middle text-left mb-md; + } + + .digit-card-sub-header, + .digit-employee-card-sub-header { + @extend .light-primary; + @apply text-caption-xl font-bold align-middle text-left; + } + + .digit-card-section-header { + @extend .light-primary; + @apply text-heading-m font-bold; + } + + .digit-card-section-sub-text { + @extend .light-primary; + @apply text-body-s; + } + + .digit-card-caption { + @extend .light-text-color-secondary; + @apply text-caption-xl mb-sm; + } + + .digit-card-text { + @extend .light-text-color-secondary; + @apply text-body-l align-middle text-left mb-lg; + + span { + @extend .light-text-color-primary; + } + } + + .card-text-primary { + @extend .light-primary; + @apply text-body-l; + } + + .card-text-button { + @extend .light-primary; + @apply text-text-btn; + } + + .card-label { + @extend .light-primary; + @apply text-legend mb-md; + } + + .card-label-error { + @extend .alert-error; + @apply block text-body-s text-error mb-md; + } + + .card-label-desc { + @extend .light-text-color-secondary; + @apply font-bold text-heading-s mb-md; + } + + .card-link { + @extend .light-primary; + @apply block text-center text-link text-link-normal mt-md; + } + + .card-search-heading { + margin-right: 0px !important; + margin-left: 0px !important; + margin-bottom: 0px !important; + padding-bottom: 0px; + padding-left: 25px; + } +} + +.header-wrap { + @apply flex mb-md; + + .header-start { + margin-right: auto; + } + + .header-content { + } + + .header-end { + margin-left: auto; + } +} + +.card-emp { + @extend .card; + padding-right: 0; + padding-top: 0; + padding-left: 0; + @apply bg-white m-sm; + @extend .light-background; +} + +.submit-bar { + @extend .light-primary-button; + @apply h-10 text-center w-full outline-none; + box-shadow: inset 0px -2px 0px theme(colors.text.primary); + cursor: pointer; + + &:focus { + @apply outline-none; + } + + header { + @apply font-rc font-medium text-legend text-white leading-10; + } +} + +.submit-bar-disabled { + @apply h-10 bg-primary-main text-center w-full outline-none opacity-50; + + &:focus { + @apply outline-none; + } + + header { + @apply font-rc font-medium text-legend text-white leading-10; + } +} + +@screen dt { + .submit-bar, + .submit-bar-disabled { + width: 240px; + } + + .card { + display: flex; + flex-direction: column; + + .card-header { + @apply text-heading-xl-dt; + } + + .card-sub-header { + @apply text-heading-l-dt; + } + + .card-caption { + @apply text-caption-xl-dt; + } + + .card-text, + .card-text-primary { + @apply text-body-l-dt; + } + + .card-link { + @apply text-left; + } + } + + .digit-employee-card { + @apply mb-md mx-md !important; + + &.digit-filter { + margin-left: auto; + margin-right: auto; + } + + .digit-card-header { + @apply text-heading-xl-dt; + } + + .digit-card-sub-header { + @apply text-heading-l-dt; + } + + .digit-employee-card-sub-header { + margin-bottom: 40px; + @apply text-heading-l-dt; + } + + .digit-card-section-header { + margin-bottom: 40px; + @apply text-heading-m-dt; + } + + .digit-card-section-sub-text { + @apply text-text-primary text-body-s-dt; + } + + .digit-card-search-heading { + margin-right: 0px !important; + margin-left: 0px !important; + margin-bottom: 0px !important; + padding-bottom: 0px; + padding-left: 25px; + } + + .digit-card-caption { + @apply text-caption-xl-dt; + } + + .digit-card-text, + .digit-card-text-primary { + @apply text-body-l-dt; + } + + .digit-card-link { + @apply text-left; + } + + .digit-label-field-pair { + @apply flex items-center; + + h2 { + width: 30%; + } + + .field { + width: 50%; + margin-right: 20%; + .field { + margin-right: unset; + } + } + } + + .digit-field-container { + span { + border: 2px solid black; + background: rgb(247, 247, 247); + width: 40px; + height: 40px; + display: flex; + justify-content: center; + align-items: center; + margin-top: -16px; + border-right: none; + } + } + } + + .digit-header-wrap { + @apply flex mb-md; + + .header-start { + margin-right: auto; + } + + .header-content { + } + + .header-end { + margin-left: auto; + } + } +} + +.digit-card-section-header { + @extend .light-text-color-primary; + @apply text-text-primary text-heading-m font-bold; +} + +.digit-card-search-heading { + margin-right: 0px !important; + margin-left: 0px !important; + margin-bottom: 0px !important; + padding-bottom: 0px; + padding-left: 25px; +} + +.digit-card-label-error { + @extend .alert-error; + @apply block text-body-s text-error mb-md; +} + +.digit-employee-card-override { + margin-left: 0px !important; +} + +.digit-employee-application-details { + display: flex !important; + justify-content: space-between !important; + max-height: 60px !important; + height: 60px !important; +} +.digit-employee-main-application-details { + padding: 10px !important; +} + +.digit-employee-mulitlink-main-div { + @extend .light-primary; + z-index: 10 !important; + max-width: 41% !important; +} + +.digit-employee-download-btn-className { + position: unset !important; + display: flex !important; + justify-content: flex-end !important; +} + +.digit-employee-options-btn-className { + position: unset !important; + margin: 0 !important; + width: 100% !important; +} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/checkboxV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/checkboxV2.scss new file mode 100644 index 000000000..c19cfe8c2 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/checkboxV2.scss @@ -0,0 +1,61 @@ +@import url("../index.scss"); + +.digit-checkbox-wrap { + @apply flex mb-md relative items-baseline; + + input { + width: 38px; + height: 38px; + @apply opacity-0 absolute top-0 left-0 z-10; + @extend .light-input-border; + } + + .input-emp { + @extend input; + width: 24px; + height: 24px; + } + + .digit-custom-checkbox { + width: 38px; + height: 38px; + @apply absolute top-0 left-0 border border-solid border-input-border z-0; + @extend .light-input-border; + + img { + @apply opacity-0; + } + + svg { + @apply opacity-0; + } + } + + .digit-custom-checkbox-emp { + @extend .digit-custom-checkbox; + width: 24px; + height: 24px; + } + + input:checked ~ .digit-custom-checkbox, + input:hover ~ .digit-custom-checkbox { + @apply border-2 border-primary-main; + @extend .light-input-border; + } + + input:checked ~ .digit-custom-checkbox img { + @apply opacity-100; + } + + input:checked ~ .digit-custom-checkbox svg { + @apply opacity-100; + width: 35px; + height: 35px; + } + + .label { + margin-left: 56px; + @apply text-form-field text-text-primary; + @extend .light-text-color-primary; + } +} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/checkpointV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/checkpointV2.scss new file mode 100644 index 000000000..f751e8a91 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/checkpointV2.scss @@ -0,0 +1,71 @@ +@import url("../index.scss"); + +.digit-checkpoint-connect-wrap { + padding-bottom: 40px; + @apply relative; +} +.digit-checkpoint-done { + @apply flex items-center; + + h2 { + z-index: 1; + width: 24px; + height: 24px; + border-radius: 50%; + @apply border-b border-solid border-primary-main bg-primary-main; + } + + header { + @apply text-heading-s ml-md; + + p { + margin-top: 4px; + @extend .light-text-color-secondary; + @apply text-heading-s; + } + } +} + +.digit-checkpoint { + @apply flex items-center; + + h2 { + z-index: 1; + width: 24px; + height: 24px; + border-radius: 50%; + --text-opacity: 1; + @apply border-b border-solid border-border bg-border; + } + + header { + @apply text-heading-s ml-md; + + p { + margin-top: 4px; + @extend .light-text-color-secondary; + @apply text-heading-s; + } + } +} + +.digit-checkpoint-connect { + margin-left: 12px; + margin-top: 22px; + @apply absolute top-0 left-0 h-full border-l border-solid border-border; +} + +.digit-checkpoint-comments-wrap { + max-width: 560px; + @apply bg-grey-mid p-sm mt-sm; + + h4 { + @extend .light-text-color-primary; + @apply text-heading-s; + } + + p { + @extend .light-text-color-secondary; + @apply text-body-s-dt; + } +} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/collapseAndExpandGroups.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/collapseAndExpandGroups.scss new file mode 100644 index 000000000..3e0b65a66 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/collapseAndExpandGroups.scss @@ -0,0 +1,60 @@ +@import url("../../digitv2/index.scss"); + +.digit-expand-collapse-wrapper { + display: flex; + flex-direction: column; + margin-top: 1rem; +} + +.digit-expand-collapse-header { + background-color: #f2f2f2; + display: grid; + grid-template-columns: 1fr 1fr; + align-items: center; + padding: 12px; + position: relative; + font-weight: bolder; + border: 1px solid #828282; + border-radius: 4px; +} + +.digit-icon-toggle { + position: absolute; + right: 10px; + top: 50%; + transform: translate(0%, -50%); + cursor: pointer; + span{ + display: inline-flex; + align-items: center; + + h5{ + color: theme(colors.primary.main); + display: inline; + } + } +} + +.digit-expand-collapse-header .label { + display: block; + text-align: left; +} + +.digit-expand-collapse-header .value { + display: block; + text-align: right; + margin-right: 2rem; +} + +.digit-toggling-wrapper.digit-collapse { + flex: none; + overflow: hidden; + height: 0; + transition: 0.2s ease-in-out; +} + +.digit-toggling-wrapper { + flex: 1; + transition: 0.2s ease-in-out; + box-sizing: border-box; +} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/dateWrapV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/dateWrapV2.scss new file mode 100644 index 000000000..3d2dc3db7 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/dateWrapV2.scss @@ -0,0 +1,12 @@ +.digit-date-picker { + @apply relative w-full cursor-pointer; + .citizen { + max-width: 540px; + } + .digit-employee-card-input { + @apply mb-lg pl-sm outline-none block border w-full h-10 border-input-border border-solid bg-white leading-10 text-form-field text-text-primary; + @extend .light-input-border; + width: calc(100%-62px); + padding-right: 9px; + } +} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/displayPhotosV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/displayPhotosV2.scss new file mode 100644 index 000000000..77bd2d221 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/displayPhotosV2.scss @@ -0,0 +1,33 @@ +.digit-photos-wrap { + max-width: 640px; + @apply flex pt-md; + + img { + width: calc(33% - 9.333px); + margin-right: 14px; + } + + svg { + width: calc(33% - 9.333px); + margin-right: 14px; + } + + .last { + width: calc(33% - 9.333px); + } +} + +.digit-image-pdf-icon { + @apply flex flex-wrap justify-start content-center; + .digit-url { + min-width: 100px; + margin-right: 10px; + max-width: 100px; + height: auto; + .digit-icon { + background: #f6f6f6; + padding: 8px; + width: 100px; + } + } +} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/headerV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/headerV2.scss new file mode 100644 index 000000000..9f514c0d9 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/headerV2.scss @@ -0,0 +1,6 @@ +@import url("../index.scss"); + +.digit-header { + @extend .light-text-color-primary; + @apply text-heading-l font-bold mb-md ml-md; +} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/infoBannerV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/infoBannerV2.scss new file mode 100644 index 000000000..132ee6c0b --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/infoBannerV2.scss @@ -0,0 +1,37 @@ +@import url("../index.scss"); + +.digit-info-banner-wrap { + @apply bg-opacity-25 m-sm p-md; + max-width: 960px; + + @extend .alert-info-bg; + border-radius: 4px; + svg { + margin-top: 5px; + @apply rounded-full; + } + + div { + @apply flex items-center; + } + + h2 { + @apply text-heading-m text-link-normal mb-md font-bold ml-sm; + } + + p { + @apply text-body-l text-link-normal whitespace-pre-line; + } +} + +@screen dt { + .digit-info-banner-wrap { + h2 { + @apply text-heading-m-dt; + } + + p { + @apply text-body-l-dt; + } + } +} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/keynoteV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/keynoteV2.scss new file mode 100644 index 000000000..02fe872b5 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/keynoteV2.scss @@ -0,0 +1,35 @@ +.digit-key-note-pair { + @apply mb-md; + + h3 { + margin-bottom: 4px; + @apply font-bold text-text-primary text-heading-s; + } + + p { + @apply text-text-primary text-body-l; + } + .digit-key-note-container { + display: inline-flex; + .digit-unmask-container { + display: inline-flex; + width: fit-content; + margin-left: 10px; + margin-top: 5px; + } + } + .digit-caption { + @apply text-body-l text-text-secondary; + } +} + +@screen dt { + .digit-key-note-pair { + p { + @apply text-body-l-dt; + } + .digit-caption { + @apply text-body-l-dt text-text-secondary; + } + } +} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/loaderV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/loaderV2.scss new file mode 100644 index 000000000..7e435da68 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/loaderV2.scss @@ -0,0 +1,81 @@ +@import url("../index.scss"); + +.digit-screen-loader { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + display: flex; + justify-content: center; + align-items: center; + z-index: 9999; + @extend .light-background; + .digit-ldio-pjg92h09b2o div { + position: absolute; + width: 52px; + height: 52px; + border: 12px solid theme(digitv2.lightTheme.primary); + border-top-color: transparent; + border-radius: 50%; + } +} + +.digit-page-loader, +.digit-module-loader { + text-align: center; +} + +.digit-page-loader { + padding-top: 88px; +} + +.digit-module-loader { + padding: 16px; +} + +@keyframes digit-ldio-pjg92h09b2o { + 0% { + transform: translate(-50%, -50%) rotate(0deg); + } + + 100% { + transform: translate(-50%, -50%) rotate(360deg); + } +} + +.digit-ldio-pjg92h09b2o div { + position: absolute; + width: 52px; + height: 52px; + border: 12px solid theme(colors.secondary); + border-top-color: transparent; + border-radius: 50%; +} + +.digit-ldio-pjg92h09b2o div { + animation: digit-ldio-pjg92h09b2o 1s linear infinite; + top: 50px; + left: 50px; +} + +.digit-loadingio-spinner-rolling-faewnb8ux8 { + width: 48px; + height: 48px; + display: inline-block; + overflow: hidden; + background: none; +} + +.digit-ldio-pjg92h09b2o { + width: 100%; + height: 100%; + position: relative; + transform: translateZ(0) scale(0.48); + backface-visibility: hidden; + transform-origin: 0 0; +} + +.digit-ldio-pjg92h09b2o div { + box-sizing: content-box; +} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/mobileNumberV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/mobileNumberV2.scss new file mode 100644 index 000000000..5c7f60880 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/mobileNumberV2.scss @@ -0,0 +1,33 @@ +@import url("../index.scss"); + +.digit-mobile-number-container { + @apply flex items-center; + + .digit-citizen-card-input--front { + @extend .light-background; + width: fit-content !important; + display: flex; + align-items: center; + /* background: theme(colors.grey.mid); */ + border-right: 0; + padding-right: 5px; + } + + .digit-citizen-card-input { + @apply mb-lg pl-sm outline-none block border w-full h-10 border-input-border border-solid bg-white leading-10 text-form-field text-text-primary; + } + + .digit-citizen-card-input--front { + width: fit-content !important; + display: flex; + align-items: center; + background: theme(colors.grey.mid); + border-right: 0; + padding-right: 5px; + } + .digit-employee-card-input-error { + @apply mb-lg pl-sm block w-full h-10 outline-none border-2 border-solid bg-white leading-10 text-form-field text-text-primary; + @extend .light-input-border; + @extend .alert-error; + } +} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/multiSelectDropdownV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/multiSelectDropdownV2.scss new file mode 100644 index 000000000..0862eebe2 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/multiSelectDropdownV2.scss @@ -0,0 +1,92 @@ +@import url("../index.scss"); + +.digit-multi-select-dropdown-wrap { + margin-bottom: 24px; + @apply relative text-form-field text-text-primary w-full; + .digit-master, + .digit-master-active { + @apply relative border border-solid border-input-border h-10 w-full; + input[type="text"] { + @apply absolute top-0 left-0 p-sm pl-sm min-h-full min-w-full opacity-0; + &:focus { + @apply outline-none; + } + } + .digit-label { + @apply flex justify-between p-sm w-full h-full; + svg { + @apply h-6 w-6; + } + } + + &:hover { + @apply border-2 border-solid border-primary-main; + } + } + + .digit-master-active { + @apply border-2 border-primary-main; + input[type="text"] { + @apply opacity-100; + } + .digit-label { + @apply hidden; + } + } + + .digit-server { + box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.2); + top: 40px; + + max-height: 20vmax; + overflow: scroll; + @apply absolute min-w-full z-20; + div { + @apply flex w-full bg-white; + justify-content: flex-start; + align-items: center; + &:hover { + @apply bg-grey-mid; + } + input { + height: 44px; + @apply absolute min-w-full opacity-0 z-20 cursor-pointer; + } + p { + padding: 12px; + margin-top: 5px; + margin-bottom: 5px; + @apply text-form-field text-text-primary; + } + .digit-custom-checkbox { + height: 28px; + width: 28px; + @apply border border-solid border-input-border m-sm; + svg { + @apply opacity-0 z-10; + } + } + input:checked ~ .digit-custom-checkbox, + input:hover ~ .digit-custom-checkbox { + @apply border-2 border-primary-main; + } + + input:checked ~ .digit-custom-checkbox svg { + @apply opacity-100; + } + } + } + .digit-cursorPointer { + @apply cursor-pointer; + } + .digit-master { + .digit-label { + p { + white-space: pre; + margin: auto; + margin-left: 0px; + padding-left: 1%; + } + } + } +} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/noresultsfoundV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/noresultsfoundV2.scss new file mode 100644 index 000000000..aedadebe9 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/noresultsfoundV2.scss @@ -0,0 +1,11 @@ +.digit-no-data-found { + height: 100%; + width: 100%; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + .digit-error-msg { + margin-top: 2rem; + } +} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/otpInputV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/otpInputV2.scss new file mode 100644 index 000000000..b16e2c901 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/otpInputV2.scss @@ -0,0 +1,15 @@ +.digit-input-otp-wrap { + @apply mb-lg; + + input { + @apply border-2 border-solid border-input-border outline-none h-10 w-10 text-form-field text-text-primary mr-sm mb-sm text-center; + } + input::-webkit-outer-spin-button, + input::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; + } + input[type="number"] { + -moz-appearance: textfield; + } +} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/popUpV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/popUpV2.scss new file mode 100644 index 000000000..c14778187 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/popUpV2.scss @@ -0,0 +1,24 @@ +.digit-popup-wrap { + background: rgba(0, 0, 0, 0.7); + @apply flex fixed w-full h-full overflow-auto top-0 left-0 min-h-screen; + z-index: 10000; +} + +@screen dt { + .digit-popup-wrap { + background: rgba(0, 0, 0, 0.7); + @apply min-h-screen; + } +} + +.digit-popup-close-icon { + @apply flex justify-end; +} + +.digit-logout-popup-wrapper{ + width: 31.25rem !important; + + .logout-cancel-button{ + height: 2.5rem; + } +} \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/radiobtnV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/radiobtnV2.scss new file mode 100644 index 000000000..638271e14 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/radiobtnV2.scss @@ -0,0 +1,51 @@ +@import url("../index.scss"); + +.digit-radio-wrap { + @apply my-sm block leading-10 mb-lg; + + div { + @apply block mb-md; + } + + .digit-radio-btn-wrap { + @apply block float-left relative; + &:hover { + .digit-radio-btn-checkmark { + @apply border-primary-main; + } + } + } + + .digit-radio-btn { + @apply opacity-0 absolute cursor-pointer h-10 w-10; + } + + .digit-radio-btn-checkmark { + @extend .light-input-border; + @apply h-10 w-10 border border-input-border border-solid rounded-full block; + } + + label { + @extend .light-text-color-primary; + @apply text-text-primary text-form-field ml-md; + } + + .digit-radio-btn-checkmark:after { + content: ""; + } + + .digit-radio-btn-wrap input:checked ~ .digit-radio-btn-checkmark { + /* @extend .light-input-border; */ + @apply border-2 border-primary-main; + } + + .digit-radio-btn-wrap input:checked ~ .digit-radio-btn-checkmark:after { + /* @extend .light-background; */ + @apply block bg-primary-main h-5 w-5 rounded-full absolute top-10 left-10; + } +} +.digit-reverse-radio-selection-wrapper { + div { + @apply flex flex-row-reverse place-content-between items-center; + } +} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/ratingV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/ratingV2.scss new file mode 100644 index 000000000..98e9e6d56 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/ratingV2.scss @@ -0,0 +1,33 @@ +.digit-rating-star-wrap { + @apply flex w-full mb-lg; + img { + width: 40px; + height: 38px; + display: block; + @apply mr-sm; + } + + svg { + width: 40px; + height: 38px; + display: block; + @apply mr-sm; + } +} + +@screen dt { + .digit-rating-star-wrap { + @apply w-2/5; + } +} + +.digit-rating-with-text { + @apply flex place-items-center w-full; + + svg { + width: 24px; + height: 38px; + display: block; + @apply mr-sm; + } +} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/selectdropdownV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/selectdropdownV2.scss new file mode 100644 index 000000000..60099b63e --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/selectdropdownV2.scss @@ -0,0 +1,180 @@ +.digit-employee-select-wrap { + @apply mb-lg relative; + + .digit-select { + @extend .light-input-border; + @apply relative block w-full h-10 border border-solid border-input-border; + &:hover { + @extend .light-input-border; + @apply border-2 border-solid border-primary-main; + } + input[type="text"] { + width: calc(100% - 32px); + background-color: transparent; + @extend .light-input-border; + @extend .light-text-color-primary; + @apply absolute z-10 w-full h-full outline-none text-text-primary text-form-field pl-sm; + } + + p { + padding-top: 9px; + @extend .light-text-color-primary; + @apply text-form-field text-text-primary float-left ml-sm; + } + + img { + @apply float-right h-6 w-6 mt-sm mr-sm; + } + + svg { + @apply absolute right-0 float-right h-6 w-6 mt-sm mr-sm; + } + } + + .digit-select-active { + @apply relative block w-full h-10 border-2 border-solid border-primary-main; + @extend .light-input-border; + + input[type="text"] { + width: calc(100% - 32px); + background-color: transparent; + @extend .light-background; + @extend .light-text-color-primary; + + @apply absolute z-10 w-full h-full outline-none text-text-primary text-form-field pl-sm; + } + + p { + @extend .light-text-color-primary; + @apply text-form-field text-text-primary float-left ml-sm; + } + + p { + padding-top: 9px; + } + + img { + @apply float-right h-6 w-6 mt-sm mr-sm; + } + + svg { + @apply absolute right-0 float-right h-6 w-6 mt-sm mr-sm; + } + } + + .digit-options-card { + width: 100% !important; + box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.2); + max-height: 400px; + overflow: auto; + @apply absolute z-20 mt-xs bg-white max-w-full; + + p { + padding-top: 14px; + @extend .light-text-color-primary; + @apply w-full h-12 pl-sm text-text-primary text-form-field; + + &:hover { + @apply bg-grey-mid; + @extend .light-background; + } + } + } +} + +.digit-employee-select-wrap--elipses { + width: 85% !important; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.digit-select-wrap { + @apply mb-lg relative; + max-width: 540px; + + .digit-select { + @apply relative block w-full h-10 border border-solid border-input-border; + @extend .light-input-border; + + input[type="text"] { + width: calc(100% - 32px); + background-color: transparent; + @extend .light-text-color-primary; + @apply absolute z-10 w-full h-full outline-none text-text-primary text-form-field pl-sm; + } + + p { + padding-top: 9px; + @extend .light-text-color-primary; + @apply text-form-field text-text-primary float-left ml-sm; + } + + img { + @apply float-right h-6 w-6 mt-sm mr-sm; + } + + svg { + @apply absolute right-0 float-right h-6 w-6 mt-sm mr-sm; + } + } + + .digit-select-active { + @extend .light-input-border; + @apply relative block w-full h-10 border-2 border-solid border-primary-main; + + input[type="text"] { + width: calc(100% - 32px); + background-color: transparent; + @extend .light-text-color-primary; + @apply absolute z-10 w-full h-full outline-none text-text-primary text-form-field pl-sm; + } + + p { + @extend .light-text-color-primary; + @apply text-form-field text-text-primary float-left ml-sm; + } + + p { + padding-top: 9px; + } + + img { + @apply float-right h-6 w-6 mt-sm mr-sm; + } + + svg { + @apply absolute right-0 float-right h-6 w-6 mt-sm mr-sm; + } + } + + .digit-options-card { + width: 100% !important; + box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.2); + @extend .light-background; + @apply absolute z-20 mt-xs bg-white; + + p { + padding-top: 14px; + @extend .light-text-color-primary; + @apply w-full h-12 pl-sm text-text-primary text-form-field; + + &:hover { + @apply bg-grey-mid; + } + } + } +} + +@screen dt { +} + +.digit-dropdown-employee-select-wrap{ + + &.language-dropdown{ + + .digit-dropdown-options-card{ + min-width: fit-content; + } + } +} \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/tagV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/tagV2.scss new file mode 100644 index 000000000..a202bbd67 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/tagV2.scss @@ -0,0 +1,28 @@ +.digit-tag-container { + @apply flex flex-wrap mb-md; + + .digit-tag { + @apply bg-grey-mid rounded-2xl pt-sm pb-sm flex justify-between items-center; + padding-left: 12px; + padding-right: 12px; + font-size: 14px; + margin-left: 2px; + height: 2rem; + margin-top: 1rem; + .digit-text { + padding-right: 5px; + max-width: calc(100% - 24px); + height: 22px; + overflow: hidden; + text-overflow: clip; + } + + &:hover { + @apply cursor-pointer; + + .close { + fill: black; + } + } + } +} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/telephoneV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/telephoneV2.scss new file mode 100644 index 000000000..0953ca8d7 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/telephoneV2.scss @@ -0,0 +1,18 @@ +.digit-telephone { + @apply flex items-baseline; + img, + svg { + height: 22px; + width: 20px; + @apply text-primary-main ml-sm items-center; + margin-left: 0px; + } + + p { + @apply text-text-primary text-body-l pl-sm; + } +} + +.digit-call { + @apply flex text-text-secondary text-body-l; +} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/textInputV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/textInputV2.scss new file mode 100644 index 000000000..863500eb5 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/textInputV2.scss @@ -0,0 +1,123 @@ +@import url("../index.scss"); + +.digit-card-input-error { + @apply mb-lg pl-sm block w-full h-10 outline-none border-2 border-error border-solid bg-white leading-10 text-form-field text-text-primary; +} +.digit-text-input { + @apply relative w-full; +} + +.digit-text-input-width { + max-width: 540px; +} +.digit-card-input { + @apply mb-lg pl-sm outline-none mt-sm block border w-full h-10 border-input-border border-solid bg-white leading-10 text-form-field text-text-primary; +} + +.digit-card-input-error { + @apply mb-lg pl-sm block w-full h-10 outline-none border-2 border-error border-solid bg-white leading-10 text-form-field text-text-primary; +} + +.digit-employee-card-input { + @apply mb-lg pl-sm outline-none block border w-full h-10 border-input-border border-solid bg-white leading-10 text-form-field text-text-primary; +} +.digit-employee-card-input:disabled { + @apply border-grey-dark text-grey-dark !important; + pointer-events: none !important; +} +.digit-employee-card-input--front { + width: fit-content !important; + display: flex; + align-items: center; + background: theme(colors.grey.mid); + border-right: 0; + padding-right: 5px; +} +.digit-employee-card-input-error { + @apply mb-lg pl-sm block w-full h-10 outline-none border-2 border-error border-solid bg-white leading-10 text-form-field text-text-primary; +} + +.digit-card-textarea, +.digit-employee-card-textarea { + @apply block outline-none mt-md mb-lg border w-full border-input-border border-solid bg-white h-24 text-form-field text-text-primary p-sm; +} + +.digit-inputWrapper { + display: flex; + justify-content: flex-start; + max-width: 500px; + + div { + max-width: 80px; + } + + span { + margin-top: 16px; + margin-left: 10%; + margin-right: 10%; + } +} + +@screen dt { + .digit-card-input { + width: 480px; + } + + .digit-card-input-emp { + width: 240px; + } + + .digit-card-input-error { + width: 480px; + } + + .digit-employee-card-input { + @apply w-full; + } + + .digit-employee-card-input-error { + @apply w-full; + } + + .digit-card-textarea { + /* //width: 480px; */ + @apply w-full; + max-width: 540px; + } + + .digit-employee-card-textarea { + @apply w-full; + } + + .card-input-emp { + width: 240px; + } +} + +.digit-citizen-card-input { + @apply mb-lg pl-sm outline-none block border w-full h-10 border-input-border border-solid bg-white leading-10 text-form-field text-text-primary; +} + +.digit-citizen-card-input--front { + width: fit-content !important; + display: flex; + align-items: center; + background: theme(colors.grey.mid); + border-right: 0; + padding-right: 5px; +} + +.digit-employee-card-input-error { + @apply mb-lg pl-sm block w-full h-10 outline-none border-2 border-error border-solid bg-white leading-10 text-form-field text-text-primary; + @extend .light-input-border; + @extend .alert-error; +} +.digit-card-input-error { + @apply mb-lg pl-sm block w-full h-10 outline-none border-2 border-error border-solid bg-white leading-10 text-form-field text-text-primary; + @extend .light-input-border; + @extend .alert-error; +} +.disabled { + @apply border-grey-dark text-grey-dark !important; + pointer-events: none !important; +} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/textareaV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/textareaV2.scss new file mode 100644 index 000000000..1be8174b0 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/textareaV2.scss @@ -0,0 +1,11 @@ +.digit-card-textarea, +.digit-employee-card-textarea { + @apply block outline-none mt-md mb-lg border w-full border-input-border border-solid bg-white h-24 text-form-field text-text-primary p-sm; + @extend .light-input-border; +} +.digit-employee-card-textarea { + @apply w-full; +} +.digit-cell-text { + color: theme(colors.text.secondary); +} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/uploadFileV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/uploadFileV2.scss new file mode 100644 index 000000000..8ebd72365 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/uploadFileV2.scss @@ -0,0 +1,146 @@ +.digit-upload-wrap { + @apply flex w-full h-40 bg-grey-light relative mb-lg px-sm border border-border border-dashed; + max-width: 540px; + min-height: 50px; + padding: 0.5rem; + + img { + display: block; + margin-top: 58px; + margin-left: calc(50% - 23px); + height: 42px; + width: 46px; + } + + svg { + display: block; + margin-top: 58px; + margin-left: calc(50% - 23px); + height: 42px; + width: 46px; + } + + input { + @apply absolute w-full h-full opacity-0 top-0; + } + .digit-cell-text { + color: theme(colors.text.secondary); + padding-top: 3px; + } +} + +.digit-multi-upload-wrap { + @apply flex mb-lg; + + div { + display: block; + position: relative; + background-color: theme(colors.grey.light); + width: calc((100% - 16px) / 3); + margin-right: 8px; + + .digit-delete { + position: absolute; + height: 24px; + width: 24px; + border-radius: 100%; + top: 2px; + right: 2px; + } + } + + .digit-upload-img-container { + border: 1px dashed theme(colors.border); + margin: 0 !important; + + img { + margin-left: auto; + margin-right: auto; + padding-top: calc(33% - 21px); + } + + svg { + @apply flex; + margin: auto; + } + + svg { + margin-left: auto; + margin-right: auto; + top: calc(50% - 21px); + position: relative; + } + + input { + @apply absolute w-full h-full opacity-0 top-0; + } + } +} + +.digit-upload-file-max-width { + max-width: 540px; +} + +.digit-upload-file { + min-height: 56px; + @apply relative border border-input-border w-full; + + div { + @apply flex flex-row h-full items-center pl-md mt-sm flex-wrap; + + .file-upload-status { + @apply text-body-s-dt ml-sm; + } + } + input { + width: 160px; + @apply absolute top-0 left-0 opacity-0 h-full; + } +} + +@screen dt { + .digit-multi-upload-wrap img { + width: 100%; + height: 158px; + } +} + +.digit-upload-file-button-wrap { + display: flex; + justify-content: flex-start; + align-items: center; + flex-wrap: wrap; + margin: 0px; + padding: 0px; + button { + height: auto; + min-height: 40px; + width: 43%; + max-height: 40px; + margin: 5px; + padding: 0px; + h2 { + word-break: break-all; + height: auto; + line-height: 16px; + overflow: hidden; + max-height: 34px; + max-width: 100%; + } + } + .digit-tag-container { + margin: 0px; + padding: 0px; + } +} +.digit-input-mirror-selector-button { + @apply h-16 bg-border text-center border-b-2 border-input-border border-solid outline-none px-lg !important; + + &:focus { + @apply outline-none; + } + + h2 { + @apply font-rc font-medium text-legend text-text-primary; + } +} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/index.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/index.scss new file mode 100644 index 000000000..01a5b9f5d --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/index.scss @@ -0,0 +1,167 @@ +@import url("./components/actionbarV2.scss"); +/* + TODO NABEEL/ANIL Removed these since it creates issues in search screen and home screen +@import url("./components/cardV2.scss"); +*/ + +@import url("./components/checkboxV2.scss"); +@import url("./components/FormComposerV2.scss"); +@import url("./components/radiobtnV2.scss"); +@import url("./components/selectdropdownV2.scss"); +@import url("./typography.scss"); +@import url("./components/actionLinkV2.scss"); +@import url("./components/appContainerV2.scss"); +@import url("./components/bodyContainerV2.scss"); +@import url("./components/breadCrumbV2.scss"); +@import url("./components/bannerV2.scss"); +@import url("./components/breakLineV2.scss"); +@import url("./components/loaderV2.scss"); +@import url("./components/headerV2.scss"); +@import url("./components/checkpointV2.scss"); +@import url("./components/backButtonV2.scss"); +@import url("./components/infoBannerV2.scss"); +@import url("./components/displayPhotosV2.scss"); +@import url("./components/collapseAndExpandGroups.scss"); +@import url("./components/dateWrapV2.scss"); +@import url("./components/ErrorMessage.scss"); +@import url("./components/ratingV2.scss"); +@import url("./components/noresultsfoundV2.scss"); +@import url("./components/mobileNumberV2.scss"); +@import url("./components/tagV2.scss"); +@import url("./components/popUpV2.scss"); +@import url("./components/telephoneV2.scss"); +@import url("./components/textareaV2.scss"); +@import url("./components/textInputV2.scss"); +@import url("./components/otpInputV2.scss"); +@import url("./components/multiSelectDropdownV2.scss"); +@import url("./components/uploadFileV2.scss"); + +/* pages */ +@import url("./pages/employee/index.scss"); + +/* important to be remove after fixing the components */ +.light { + &-primary { + color: theme(digitv2.lightTheme.primary) !important; + + &-button { + background-color: theme(digitv2.lightTheme.primary) !important; + } + + &-bg { + background-color: theme(digitv2.lightTheme.primary-bg) !important; + } + } + + &-text-color { + &-primary { + color: theme(digitv2.lightTheme.text-color-primary) !important; + } + + &-secondary { + color: theme(digitv2.lightTheme.text-color-secondary) !important; + } + + &-disabled { + color: theme(digitv2.lightTheme.text-color-disabled) !important; + } + } + + &-background { + background-color: theme(digitv2.lightTheme.background) !important; + } + + &-paper { + &-primary { + background-color: theme(digitv2.lightTheme.paper) !important; + + &-color { + color: theme(digitv2.lightTheme.paper) !important; + } + } + + &-secondary { + background-color: theme(digitv2.lightTheme.paper-secondary) !important; + } + + &-border { + border-radius: 4px; + border-style: solid; + border-width: 1px; + border-color: theme(digitv2.lightTheme.divider); + } + } + + &-divider { + background-color: theme(digitv2.lightTheme.divider) !important; + } + + &-header-sidenav { + color: theme(digitv2.lightTheme.header-sidenav) !important; + } + + &-input-border { + /* TODO Check why important added here @ANIL/NABEEL */ + border-color: theme(digitv2.lightTheme.input-border); + } +} + +.alert { + &-error { + color: theme(digitv2.alert.error) !important; + + &-bg { + background-color: theme(digitv2.alert.error-bg) !important; + } + + &-border { + border-color: theme(digitv2.alert.error) !important; + } + } + + &-success { + color: theme(digitv2.alert.success) !important; + + &-bg { + background-color: theme(digitv2.alert.success-bg) !important; + } + } + + &-info { + color: theme(digitv2.alert.info) !important; + + &-bg { + background-color: theme(digitv2.alert.info-bg) !important; + } + } +} + +.chart { + &-item-1 { + color: theme(digitv2.chart.chart-1) !important; + } + + &-item-1-gradient { + color: theme(digitv2.chart.chart-1-gradient) !important; + } + + &-item-2 { + color: theme(digitv2.chart.chart-2) !important; + } + + &-item-2-gradient { + color: theme(digitv2.chart.chart-2-gradient) !important; + } + + &-item-3 { + color: theme(digitv2.chart.chart-3) !important; + } + + &-item-4 { + color: theme(digitv2.chart.chart-4) !important; + } + + &-item-5 { + color: theme(digitv2.chart.chart-5) !important; + } +} \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/pages/employee/index.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/pages/employee/index.scss new file mode 100644 index 000000000..99435b650 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/pages/employee/index.scss @@ -0,0 +1 @@ +@import url("./workbench.scss"); diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/pages/employee/workbench.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/pages/employee/workbench.scss new file mode 100644 index 000000000..af97f5293 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/pages/employee/workbench.scss @@ -0,0 +1,1050 @@ +@import url("../../index.scss"); + +.bread-crumb.workbench-bredcrumb { + a { + color: theme(digitv2.lightTheme.primary); + } +} + +.workbench { + &.app-container { + margin-top: 0.75rem; + } + + .workbench-create-form { + display: inherit; + padding-top: 1.5rem; + + .digit-form-composer-sub-header { + @extend .typography.text-heading-m; + padding-left: 1rem; + + @media (max-width: theme(digitv2.screens.mobile)) { + padding-left: 0; + } + } + + form { + #label_digit_root { + display: none; + } + + #digit_root { + width: 100%; + + .field-wrapper { + .form-group.field { + display: flex; + padding: 1em 0 0 1em; + + @media (max-width: theme(digitv2.screens.mobile)) { + flex-direction: column; + } + + &.field-error.has-error.has-danger { + .control-label { + @extend .alert-error; + } + + .form-control { + @extend .alert-error-border; + } + + .card-label-error { + display: inline; + position: relative; + margin: 0px; + padding: 0px; + top: -0.7rem; + font-weight: normal; + + } + } + + &.field-boolean.field-error.has-error.has-danger { + + .card-label-error { + position: initial; + display: block; + margin-top: 0.5rem; + + } + } + + .control-label { + max-width: 12.5rem; + margin-right: 2.5rem; + @extend .card-label; + display: inline-flex; + /* align-self: center; */ + line-height: 3rem; + @extend .typography.text-heading-s; + /* web view*/ + @apply w-1/3; + + /* tablet view*/ + + @media (max-width: theme(digitv2.screens.tablet)) { + max-width: 11rem; + margin-right: 1.5rem; + + } + + /* mobile view*/ + + @media (max-width: theme(digitv2.screens.mobile)) { + /*max-width: 10.2rem;*/ + @apply w-full; + + } + + } + + .all-input-field-wrapper { + + @apply w-3/5; + + @media (max-width: theme(digitv2.screens.mobile)) { + @apply w-full; + } + + .form-control { + @extend .light-input-border; + @extend .employee-card-input; + font-style: inherit; + font-family: inherit; + /* web view*/ + max-width: 37.5rem; + min-width: 20.5rem; + margin-bottom: 1rem; + /* tablet view*/ + + @media (max-width: theme(digitv2.screens.tablet)) { + max-width: 27.5rem; + min-width: 12.5rem; + + } + + /* mobile view*/ + + @media (max-width: theme(digitv2.screens.mobile)) { + max-width: 20.5rem; + min-width: 9.5rem; + @apply w-full; + + } + + &.form-select { + padding: 0%; + border: 0px; + + .digit__control { + @apply outline-none; + + .digit__value-container:in-range { + border-color: unset; + box-shadow: none; + box-sizing: unset; + @apply outline-none; + } + } + + .digit__control--is-focused { + border-color: theme(digitv2.lightTheme.primary) !important; + box-shadow: none; + box-sizing: unset; + @apply outline-none; + } + + + .digit__control:hover { + + border-color: unset; + box-shadow: none; + box-sizing: unset; + @apply outline-none; + } + + .digit__control:focus { + border-color: theme(digitv2.lightTheme.primary); + + .digit__value-container:focus { + border-color: theme(digitv2.lightTheme.primary); + + } + } + } + + &.form-select:focus { + @apply outline-none; + border-color: theme(digitv2.lightTheme.primary); + + } + } + + .form-control:read-only { + background-color: theme(digitv2.lightTheme.background); + color: theme(digitv2.lightTheme["text-color-secondary"]); + } + + .form-control:focus { + + @apply outline-none; + border-color: theme(digitv2.lightTheme.primary); + } + + textarea.form-control { + height: 5rem; + } + } + + &.field-string { + align-self: center; + } + + &.field-boolean { + padding-top: 0rem; + padding-bottom: 1rem; + + .custom-checkbox { + display: inline-flex; + align-items: end; + + &.custom-checkbox-disabled { + pointer-events: none; + opacity: 0.6; + } + + .custom-checkbox-label { + @extend .typography.text-body-s; + @apply pl-sm; + } + } + + .checkbox { + width: 28rem; + + label { + float: left; + + /* display: flex; + flex-direction: row-reverse; + */ + span { + width: 17rem; + display: none; + @extend .card-label; + } + + input[type="checkbox"] { + @extend .light-input-border; + @extend .employee-card-input; + height: 1.5rem; + /* @apply ml-sm;*/ + } + + input[type="checkbox"]#digit_root_active { + accent-color: theme(digitv2.lightTheme.primary); + } + + input:checked, + input:hover { + @apply border-2; + @extend .light-input-border; + } + } + } + + .field-radio-group { + display: inline-flex; + height: 2.5rem; + align-items: center; + + .radio { + @apply mr-sm; + } + } + + + + } + + + + &.field-object>.control-label { + margin-left: 0.5rem; + } + + &.field-object { + display: block; + @extend .light-background; + @extend .light-paper-border; + padding: 1rem; + margin: 1rem; + + .digit-expand-collapse-wrapper { + margin-top: 0px; + } + + .digit-icon-toggle { + top: -1.5rem; + right: 1.5em; + } + + .object-wrapper { + .array-remove-button-wrapper { + position: relative; + } + } + + /* have to revisit for objects + [id^="root_"] { + @extend .light-background; + } + */ + } + + &.field-array { + display: block; + @extend .light-paper-secondary; + @extend .light-paper-border; + padding: 2rem; + margin: 1rem; + padding-top: 1rem; + + .array-wrapper .array-item { + &.jk-array-objects>.array-remove-button-wrapper { + display: block; + } + + &.jk-array-objects { + margin-bottom: 2rem; + + .array-children>span .form-group.field.field-object { + padding-bottom: 3rem; + } + + .array-obj { + position: absolute; + bottom: 1.5rem; + left: 2rem; + + >.array-remove-button-wrapper { + position: unset; + } + } + + } + + &.jk-array-of-non-objects>.array-remove-button-wrapper { + display: inline; + left: 38.5rem; + right: unset; + top: 0.7rem; + } + + &.jk-array-of-non-objects .array-children { + span .form-group { + padding-left: 0%; + + .control-label { + display: none; + } + + } + } + + /* it has been removed since we dont need diff color for array items @extend .light-background;*/ + position: relative; + + .field-object { + margin-left: 0; + margin-right: 0; + } + + + .array-remove-button-wrapper { + position: absolute; + right: 1.3em; + top: 1.3em; + background-color: inherit !important; + + .array-remove-button { + cursor: pointer; + background-color: inherit !important; + + @media (max-width: theme(digitv2.screens.mobile)) { + padding: 0px; + } + + h2 { + @media (max-width: theme(digitv2.screens.mobile)) { + display: none; + } + } + + } + } + + span.all-input-field-wrapper { + @apply w-3/5; + + .form-control { + @apply w-full; + } + } + + .control-label { + @apply w-1/3; + + } + } + + + .jk-digit-secondary-btn { + height: 1.7em; + margin-top: 0.5rem; + + @media (max-width: theme(digitv2.screens.mobile)) { + height: auto; + width: 100%; + } + + h2 { + font-size: 1rem; + } + } + + .all-input-field-wrapper { + .card-label-error { + position: unset !important; + } + } + + } + + .digit-expand-collapse-header { + border: 0; + background-color: inherit; + padding: 0; + } + } + } + } + } + + div.action-bar-wrap { + @extend .action-bar-wrap; + + .submit-bar { + @extend .submit-bar; + cursor: pointer; + @apply font-rc font-medium text-legend text-white leading-10; + } + } + .workbench-bulk-upload { + display: flex; + justify-content: space-between; + margin-bottom: 1.5rem; + .workbench-download-template-btn { + margin-right: 1rem; + } + } + } + + .workbench-no-schema-found { + @apply flex justify-items-center flex-col; + align-items: center; + } + + .jk-digit-loader { + position: absolute; + z-index: 10000; + width: 100vw; + background-color: rgba(189, 189, 189, 0.5); + height: 100vh; + left: 0; + top: 0; + + .jk-spinner-wrapper { + width: 100%; + display: flex; + align-items: center; + justify-content: center; + height: 100%; + + .jk-spinner { + border: 0.4em solid #fe7a51; + border-radius: 50%; + border-top: 0.4em solid #ffffff; + width: 4em; + height: 4em; + -webkit-animation: spin 2s linear infinite; + /* Safari */ + animation: spin 1s linear infinite; + } + } + } + + .jk-sm-inbox-loader { + border: 0.2em solid #fe7a51; + border-radius: 50%; + border-top: 0.2em solid #ffffff; + width: 2em; + height: 2em; + -webkit-animation: spin 2s linear infinite; + /* Safari */ + animation: spin 1s linear infinite; + } + + /* Safari */ + @-webkit-keyframes spin { + 0% { + -webkit-transform: rotate(0deg); + } + + 100% { + -webkit-transform: rotate(360deg); + } + } + + @keyframes spin { + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(360deg); + } + } + + .no-data-found { + height: 100%; + width: 100%; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + + .digit-error-msg { + margin-top: 2rem; + } + } + + + .tooltip .tooltiptext { + + top: 2rem; + left: 0; + margin-left: 0rem; + width: fit-content; + height: max-content; + white-space: normal; + + .tooltiptextvalue { + font-size: 14px; + font-weight: 400px; + color: white; + } + } + + .employeeCard.manage-master-wrapper { + width: 100%; + display: flex; + padding-top: 2.1rem; + + @media (max-width: theme(digitv2.screens.mobile)) { + flex-direction: column; + } + + .employee-select-wrap.form-field { + @apply w-1/4; + margin-right: 1rem; + + @media (max-width: theme(digitv2.screens.mobile)) { + @apply w-full; + } + } + } + + .table { + padding-left: 0.8rem; + padding-right: 0.8rem; + + &-row-mdms:hover { + background-color: theme(digitv2.lightTheme.primary-bg); + /* Change this to the desired hover color */ + cursor: pointer; + } + } +} + +.header-btn { + width: 12rem; +} + +.drag-drop-container { + background-color: #FAFAFA; + border: 1.5px dashed #D6D5D4; + border-radius: 5px; + margin: -1rem 1rem 1rem 1rem; + padding: 1rem 1rem 1rem 1rem; + display: flex; + align-items: center; + flex-direction: column; + + .drag-drop-text { + text-decoration: none; + + .browse-text { + text-decoration: none; + color: #F47738; + transition: color 0.3s; + } + + .browse-text:hover { + color: #F47738; + text-decoration: underline; + cursor: pointer; + } + } + +} + +.uploaded-file-container { + background-color: #FAFAFA; + border: 1.5px solid #D6D5D4; + border-radius: 5px; + margin: 0.5rem 1rem 2rem 1rem; + display: flex; + flex-direction: row; + align-items: center; + padding: 0.6rem; + justify-content: space-between; + + .uploaded-file-container-sub { + display: flex; + align-items: center; + + .icon:hover { + cursor: pointer; + } + } +} + +button:hover { + cursor: pointer; +} + +.popup-header-fix { + margin-top: -0.5rem !important; +} + +.option-details { + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + z-index: 999; + border: 1px solid #D6D5D4; + /* Border color and width */ + background-color: #fff; + padding: 2em; + border-radius: 5px; + display: flex; + flex-direction: column; + width: 40%; + min-width: 300px; + + .detail-container { + margin-top: 20px; + overflow-y: auto; + max-height: 50vh; + + .detail-item { + margin: 10px 0; + display: flex; + align-items: center; + + .key { + flex-basis: 30%; + margin-right: 10px; + font-weight: bold; + text-align: start !important; + } + + .value { + flex-basis: 70%; + text-align: start !important; + } + } + + .separator { + margin: 10px 0; + border: none; + border-bottom: 1px solid #ccc; + } + + .view-more { + display: flex; + justify-content: flex-start; + margin-top: 1.5em; + } + + .select { + display: flex; + justify-content: flex-start; + margin-top: 1.5em; + } + } +} + + +.close-button { + align-self: flex-end; + cursor: pointer; + font-weight: bold; + position: absolute; + padding: 7px; + top: 0; + right: 0; + border: 1px solid black; + margin-bottom: 20px; +} + + + +.option-details-dropdown { + position: absolute; + z-index: 999; + border: #D6D5D4 1px solid; + background-color: #fff; + padding: 10px; + border-radius: 5px; + width: 250px; + margin-left: -250px; +} + + +.modal-wrapper { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + display: flex; + justify-content: center; + align-items: center; + background-color: rgba(0, 0, 0, 0.5); + z-index: 9999; + overflow: auto; + /* Enable scrolling if content exceeds the viewport */ +} + +.modal-content { + background-color: #fff; + padding: 20px; + border: 1px solid #ccc; + border-radius: 4px; + max-width: 80%; + /* Adjust the maximum width as needed */ + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); + max-height: 80vh; + /* Limit the maximum height to 80% of the viewport height */ + display: flex; + flex-direction: column; + justify-content: space-between; +} + +.modal-inner { + overflow-y: auto; + /* Enable scrolling within the modal */ +} + +.modal-content .employee-select-wrap .select input { + width: calc(100% - 32px); + background-color: initial; + position: relative !important; + z-index: 10; + width: 100%; + height: 100%; + outline: 2px solid transparent; + outline-offset: 2px; + padding-left: 8px; +} + +.modal-content .employee-select-wrap .select-active { + position: absolute; + display: block; + width: 100%; + height: 2.5rem; + --border-opacity: 1; + border: 1px solid #f47738; + border-color: rgba(244, 119, 56, var(--border-opacity)); +} + +.modal-content .label-field-pair { + display: -ms-flexbox; + display: block !important; + -ms-flex-align: center; + align-items: center; +} + +.modal-content .employee-select-wrap { + margin-bottom: 24px; +} + +.inbox-search-wrapper { + .add-new-container { + width: 100%; + display: flex; + flex-direction: row-reverse; + + .add-new { + position: relative; + color: #F47738; + cursor: pointer; + margin-right: 1em; + font-weight: bolder; + font-size: 23px; + } + } +} + +.multiselect { + display: flex; + align-items: center; + + @media (max-width: 588px) { + .info-icon-container { + position: absolute; + right: 2px; + margin-right: 0px !important; + margin-left: 0px !important; + display: flex; + justify-content: center; + margin-bottom: 0.7em; + } + } + + .info-icon-container { + margin-left: 0.7em; + margin-right: -2em; + display: flex; + justify-content: center; + margin-bottom: 0.7em; + } + + .info-icon-container .info-icon { + cursor: pointer; + } +} + +.link-container { + flex: 1; + display: flex; + align-items: center; + padding: 10px; + background-color: #bdc5d1; + + .view-all-link { + background-color: #bdc5d1; + color: #f47738; + font-size: 16px; + text-decoration: underline; + cursor: pointer; + } +} + +.action-bar { + display: flex; + flex-direction: row; + justify-content: flex-end; + + .action-bar-button { + margin-right: 0.5em; + } +} + +.progressBarContainer { + position: fixed; + bottom: 20px; + right: 20px; + background-color: #fff; + padding: 45px 45px 20px 20px; + border-radius: 8px; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); + z-index: 9999; + width: 25vw; + + @media (max-width: 768px) { + width: 70vw; + position: fixed; + bottom: 20px; + right: auto; + left: 50%; + transform: translateX(-50%); + } + + .progressBar { + display: flex; + flex-direction: row; + border-radius: 4px; + overflow: hidden; + border: 1px solid #ccc; + height: 20px; + background-color: #4CAF50; + } + + .progressHeading { + margin: 8px 0; + font-size: 16px; + + .success-container { + display: flex; + flex-direction: row; + background-color: #00703C; + color: #fff; + padding: 5px 10px; + border-radius: 5px; + width: fit-content; + align-items: center; + + .success-count { + background-color: #fff; + color: #00703C; + padding: 3px 5px; + border-radius: 3px; + margin-left: 5px; + } + } + } + + .closeButton { + position: absolute; + top: 10px; + right: 10px; + cursor: pointer; + padding: 2px; + border: 1px solid #ccc; + border-radius: 1px; + } + + .no-uploads { + margin-top: 1em; + } +} + +.results-container-orange { + max-height: 50vh; + overflow: auto; + margin-top: 1em; + border: 1px solid #ccc; + border-radius: 4px; + padding: 1em; + background-color: #ea8a3b !important; + + .no-errors { + background-color: #ea8a3b !important; + } +} + +.results-container { + max-height: 50vh; + overflow: auto; + margin-top: 1em; + border: 1px solid #ccc; + border-radius: 4px; + padding: 1em; + + .results-list-item { + border-bottom: 1px solid #ddd; + padding: 0.5em; + cursor: pointer; + + &:hover { + background-color: #D4351C; + color: white; + /* Yellowish color on hover */ + } + } + + .results-details { + white-space: pre-wrap; + border: 1px solid #ccc; + border-radius: 4px; + padding: 1em; + } +} + +.overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.3); + z-index: 9998; +} +.CloseLevelButton{ + font-size: 1rem; + margin-bottom: 24px; + /* margin-left: 24px; */ + position: relative; + right: auto; + border: none; +} + +.mdms-view-audit{ +visibility: hidden; +} +.audit-history{ +.diff{ + table-layout: fixed; +border-collapse: collapse; +width: 100%; +} +.diff-gutter-col { +width: 7ch; +} +.diff-code-delete { +background-color: #fdeff0; +} +.diff-line { +line-height: 1.5; +font-family: Consolas, Courier, monospace; +} +.diff-gutter-delete { +background-color: #fadde0; +} +.diff-gutter, .diff-gutter>a { +padding: 0 1ch; +text-align: right; +cursor: pointer; +user-select: none; +} +.diff-code { +white-space: pre-wrap; +word-wrap: break-word; +word-break: break-all; +padding: 0; +padding-left: .5em; +} +.diff td { +vertical-align: top; +padding-top: 0; +padding-bottom: 0; +} +.diff-gutter-insert { +background-color: #d6fedb; +} +.diff-gutter, .diff-gutter>a { +padding: 0 1ch; +text-align: right; +cursor: pointer; +user-select: none; +} +.diff-code-insert { +background-color: #eaffee; +} +} \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/typography.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/typography.scss new file mode 100644 index 000000000..4f428d7c6 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/typography.scss @@ -0,0 +1,241 @@ +@import url("../index.scss"); + +.typography { + &.text-heading-xl { + font-family: theme(digitv2.fontFamily.rc); + font-style: theme(digitv2.fontStyle.normal); + font-weight: theme(digitv2.fontWeight.bold); + color: theme(digitv2.lightTheme.text-color-primary); + line-height: theme(digitv2.lineHeight.normal); + + @media (min-width: theme(digitv2.screens.desktop)) { + font-size: theme(digitv2.fontSize.heading-xl.desktop); + } + + @media (min-width: theme(digitv2.screens.tablet)) { + font-size: theme(digitv2.fontSize.heading-xl.tablet); + } + + @media (min-width: theme(digitv2.screens.mobile)) { + font-size: theme(digitv2.fontSize.heading-xl.mobile); + } + } + + &.text-heading-l { + font-family: theme(digitv2.fontFamily.sans); + font-style: theme(digitv2.fontStyle.normal); + font-weight: theme(digitv2.fontWeight.bold); + color: theme(digitv2.lightTheme.text-color-primary); + line-height: theme(digitv2.lineHeight.normal); + + @media screen and (min-width: theme(digitv2.screens.desktop)) { + font-size: theme(digitv2.fontSize.heading-l.desktop); + } + @media screen and (min-width: theme(digitv2.screens.tablet)) { + font-size: theme(digitv2.fontSize.heading-l.tablet); + } + + @media screen and (min-width: theme(digitv2.screens.mobile)) { + font-size: theme(digitv2.fontSize.heading-l.mobile); + } + } + &.text-heading-m { + font-family: theme(digitv2.fontFamily.sans); + font-style: theme(digitv2.fontStyle.normal); + font-weight: theme(digitv2.fontWeight.bold); + color: theme(digitv2.lightTheme.text-color-primary); + line-height: theme(digitv2.lineHeight.normal); + + @media screen and (min-width: theme(digitv2.screens.desktop)) { + font-size: theme(digitv2.fontSize.heading-m.desktop); + } + @media screen and (min-width: theme(digitv2.screens.tablet)) { + font-size: theme(digitv2.fontSize.heading-m.tablet); + } + + @media screen and (min-width: theme(digitv2.screens.mobile)) { + font-size: theme(digitv2.fontSize.heading-m.desktop); + } + } + &.text-heading-s { + font-family: theme(digitv2.fontFamily.sans); + font-style: theme(digitv2.fontStyle.normal); + font-weight: theme(digitv2.fontWeight.bold); + color: theme(digitv2.lightTheme.text-color-primary); + line-height: theme(digitv2.lineHeight.normal); + + @media screen and (min-width: theme(digitv2.screens.desktop)) { + font-size: theme(digitv2.fontSize.heading-s.desktop); + } + @media screen and (min-width: theme(digitv2.screens.tablet)) { + font-size: theme(digitv2.fontSize.heading-s.tablet); + } + + @media screen and (min-width: theme(digitv2.screens.mobile)) { + font-size: theme(digitv2.fontSize.heading-s.mobile); + } + } + &.text-heading-xs { + @media screen and (min-width: theme(digitv2.screens.mobile)) { + font-size: theme(digitv2.fontSize.heading-xs.mobile); + font-family: theme(digitv2.fontFamily.sans); + font-style: theme(digitv2.fontStyle.normal); + font-weight: theme(digitv2.fontWeight.bold); + color: theme(digitv2.lightTheme.text-color-primary); + line-height: theme(digitv2.lineHeight.normal); + } + } + &.text-caption-l { + font-family: theme(digitv2.fontFamily.sans); + font-style: theme(digitv2.fontStyle.italic); + font-weight: theme(digitv2.fontWeight.medium); + color: theme(digitv2.lightTheme.text-color-primary); + line-height: theme(digitv2.lineHeight.normal); + + @media screen and (min-width: theme(digitv2.screens.desktop)) { + font-size: theme(digitv2.fontSize.caption-l.desktop); + } + @media screen and (min-width: theme(digitv2.screens.tablet)) { + font-size: theme(digitv2.fontSize.caption-l.tablet); + } + + @media screen and (min-width: theme(digitv2.screens.mobile)) { + font-size: theme(digitv2.fontSize.caption-l.mobile); + } + } + + &.text-caption-m { + font-family: theme(digitv2.fontFamily.sans); + font-style: theme(digitv2.fontStyle.italic); + font-weight: theme(digitv2.fontWeight.medium); + color: theme(digitv2.lightTheme.text-color-primary); + line-height: theme(digitv2.lineHeight.normal); + + @media screen and (min-width: theme(digitv2.screens.desktop)) { + font-size: theme(digitv2.fontSize.caption-m.desktop); + } + @media screen and (min-width: theme(digitv2.screens.tablet)) { + font-size: theme(digitv2.fontSize.caption-m.tablet); + } + + @media screen and (min-width: theme(digitv2.screens.mobile)) { + font-size: theme(digitv2.fontSize.caption-m.mobile); + } + } + + &.text-caption-s { + font-family: theme(digitv2.fontFamily.sans); + font-style: theme(digitv2.fontStyle.italic); + font-weight: theme(digitv2.fontWeight.medium); + color: theme(digitv2.lightTheme.text-color-primary); + line-height: theme(digitv2.lineHeight.normal); + + @media screen and (min-width: theme(digitv2.screens.desktop)) { + font-size: theme(digitv2.fontSize.caption-s.desktop); + } + @media screen and (min-width: theme(digitv2.screens.tablet)) { + font-size: theme(digitv2.fontSize.caption-s.tablet); + } + + @media screen and (min-width: theme(digitv2.screens.mobile)) { + font-size: theme(digitv2.fontSize.caption-s.desktop); + } + } + &.text-body-l { + font-family: theme(digitv2.fontFamily.sans); + font-style: theme(digitv2.fontStyle.italic); + font-weight: theme(digitv2.fontWeight.regular); + color: theme(digitv2.lightTheme.text-color-primary); + + @media screen and (min-width: theme(digitv2.screens.desktop)) { + font-size: theme(digitv2.fontSize.body-l.desktop); + line-height: theme(digitv2.lineHeight.line-height-body-l.desktop); + } + @media screen and (min-width: theme(digitv2.screens.tablet)) { + font-size: theme(digitv2.fontSize.body-l.tablet); + line-height: theme(digitv2.lineHeight.line-height-body-l.tablet); + } + + @media screen and (min-width: theme(digitv2.screens.mobile)) { + font-size: theme(digitv2.fontSize.body-l.mobile); + line-height: theme(digitv2.lineHeight.line-height-body-l.mobile); + } + } + &.text-body-s { + font-family: theme(digitv2.fontFamily.sans); + font-style: theme(digitv2.fontStyle.italic); + font-weight: theme(digitv2.fontWeight.regular); + color: theme(digitv2.lightTheme.text-color-primary); + + @media screen and (min-width: theme(digitv2.screens.desktop)) { + font-size: theme(digitv2.fontSize.body-s.desktop); + line-height: theme(digitv2.lineHeight.line-height-body-s.desktop); + } + @media screen and (min-width: theme(digitv2.screens.tablet)) { + font-size: theme(digitv2.fontSize.body-s.tablet); + line-height: theme(digitv2.lineHeight.line-height-body-s.tablet); + } + + @media screen and (min-width: theme(digitv2.screens.mobile)) { + font-size: theme(digitv2.fontSize.body-s.mobile); + line-height: theme(digitv2.lineHeight.line-height-body-s.mobile); + } + } + &.text-body-xs { + font-family: theme(digitv2.fontFamily.sans); + font-style: theme(digitv2.fontStyle.italic); + font-weight: theme(digitv2.fontWeight.regular); + color: theme(digitv2.lightTheme.text-color-primary); + + @media screen and (min-width: theme(digitv2.screens.desktop)) { + font-size: theme(digitv2.fontSize.body-xs.desktop); + line-height: theme(digitv2.lineHeight.line-height-body-xs.desktop); + } + @media screen and (min-width: theme(digitv2.screens.tablet)) { + font-size: theme(digitv2.fontSize.body-xs.tablet); + line-height: theme(digitv2.lineHeight.line-height-body-xs.tablet); + } + + @media screen and (min-width: theme(digitv2.screens.mobile)) { + font-size: theme(digitv2.fontSize.body-xs.mobile); + line-height: theme(digitv2.lineHeight.line-height-body-xs.mobile); + } + } + &.text-label { + font-family: theme(digitv2.fontFamily.sans); + font-style: theme(digitv2.fontStyle.italic); + font-weight: theme(digitv2.fontWeight.regular); + color: theme(digitv2.lightTheme.text-color-primary); + line-height: theme(digitv2.lineHeight.normal); + + @media screen and (min-width: theme(digitv2.screens.desktop)) { + font-size: theme(digitv2.fontSize.label.desktop); + } + @media screen and (min-width: theme(digitv2.screens.tablet)) { + font-size: theme(digitv2.fontSize.label.tablet); + } + + @media screen and (min-width: theme(digitv2.screens.mobile)) { + font-size: theme(digitv2.fontSize.label.mobile); + } + } + &.text-link { + font-family: theme(digitv2.fontFamily.sans); + font-style: theme(digitv2.fontStyle.normal); + font-weight: theme(digitv2.fontWeight.regular); + color: theme(digitv2.lightTheme.text-color-primary); + line-height: theme(digitv2.lineHeight.normal); + text-decoration: theme(digitv2.textDecorationLine.underline); + + @media screen and (min-width: theme(digitv2.screens.desktop)) { + font-size: theme(digitv2.fontSize.link.desktop); + } + @media screen and (min-width: theme(digitv2.screens.tablet)) { + font-size: theme(digitv2.fontSize.link.tablet); + } + + @media screen and (min-width: theme(digitv2.screens.mobile)) { + font-size: theme(digitv2.fontSize.link.mobile); + } + } +} \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/index.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/index.scss index 2e19e082d..d49f22b40 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/index.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/index.scss @@ -106,7 +106,38 @@ @import "./pages/citizen/updatePropertyNumber.scss"; @import "./pages/citizen/citizenDocument.scss"; @import "./pages/employee/surveys.scss"; +@import "./digitv2/index.scss"; +/* @import "./digitv2/typography.scss"; */ @import "./components/inboxv2/index.scss"; +@import "./components//sidebar.scss"; +@import "./components/loaderWithGap.scss"; + +.wbh-header-container { + display: flex !important; + align-items: center; + justify-content: space-between; + margin:1rem 0.5rem -0.5rem 0.3rem; +} + +.wbh-header { + display: flex !important; + align-items: center; + justify-content: space-between; + margin:1rem 0.5rem -0.5rem 0.3rem; + .header-icon-container{ + cursor: pointer; + h4{ + margin:0px !important; + } + color:#f47738; + display: flex !important; + align-items: center; + svg { + margin:0 0 0 0.1rem; + } + } + +} .display-none { display: none; @@ -116,6 +147,11 @@ padding: unset !important; } +h1, h2, h3, h4, h5, h6 { + font-size: inherit; + font-weight: inherit; } + + .flex-one { @apply flex-1; } @@ -175,6 +211,13 @@ @apply mb-sm; } +.employeeCard { + /* TODO need to revisit that we need mx-md NABEEL/ANIL + @apply mb-md mx-md !important; + */ + @apply mb-md !important; +} + .home-link { margin-left: 16px; margin-bottom: 16px; @@ -250,6 +293,19 @@ color: theme(colors.text.primary) !important; } +input[readonly] { + @apply border-grey-dark !important; + background-color: theme(digitv2.lightTheme.background); + border-color: theme(digitv2.lightTheme.text-color-secondary); + color: theme(digitv2.lightTheme.text-color-secondary); +} + +.hide-input-type-file { + position: absolute; + clip: rect(0, 0, 0, 0); + pointer-events: none !important; +} + @media (hover: hover) { .primary-label-btn { &:hover { @@ -308,6 +364,7 @@ input[type="number"] { -moz-appearance: textfield; } + .static { @apply flex flex-col; min-height: 85vh; @@ -430,6 +487,7 @@ input[type="number"] { .text-input { @apply relative w-full; + max-width: 540px; input { &:hover { @apply border-2 border-solid border-primary-main; @@ -555,11 +613,10 @@ input[type="number"] { .full-employee-card-link { width: 100% !important; margin: 7px 0px; - a{ + a { color: inherit; - text-decoration: inherit + text-decoration: inherit; } - } .full-employee-card-height { height: unset !important; @@ -732,4 +789,39 @@ input[type="number"] { max-height: 120px; margin-top: 90px; } +.localisation-info { + max-width: 100%; + .info-banner-wrap { + max-width: 100%; + margin: 0%; + margin-bottom: 1rem; + display: flex; + align-items: center; + line-height: unset; + align-content: baseline; + gap: 0.5rem; + height: 5rem; + } +} +.info-banner-wrap div{ + align-items: center; +} + +.xls-popup-module { + margin: auto; + width: calc(100% - 5rem); +} +.actionBarClass{ + display: flex; + justify-content: space-between; + flex-direction: row-reverse; +} +.previous-button{ + margin-left: 4rem; +} +.view-composer-header-section{ + display: flex; + justify-content: space-between; + align-items: center; +} \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/container.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/container.scss index c1ad451a0..ee8cd2354 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/container.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/container.scss @@ -19,7 +19,7 @@ } .employee-home-footer { - @apply flex h-10 bg-grey-bg pb-md pt-sm justify-center w-full; + @apply flex h-10 pb-md pt-sm justify-center w-full; img { height: 100%; } diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/inbox.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/inbox.scss index 839c86b07..1d193dca7 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/inbox.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/inbox.scss @@ -447,16 +447,6 @@ height: 263px !important; } } - -@screen dt { - .customEmployeeWarnings { - margin-left: 2.6rem !important; - margin-top: -4rem !important; - width: 65% !important; - } -} - - .employeeTotalLink { color: theme(colors.text.secondary); font-size: 16px; @@ -540,20 +530,28 @@ } .search-tabs-container { - border-bottom: 1px solid rgba(0, 0, 0, 0.2); - margin-bottom: 35px; display: flex; justify-content: space-between; + background-color: #eee; .search-tab-head { padding: 10px 35px; + font-weight: 700; + font-size: 1rem; + border: 1px solid #d6d5d4; + border-radius: 0.5rem 0.5rem 0 0; } .search-tab-head-selected { padding: 10px 35px; color: rgb(244, 119, 56); + background-color: #fff; + border: 1px solid #f47738; + border-radius: 0.5rem 0.5rem 0 0; border-bottom: 4px solid rgb(244, 119, 56); - font-weight: bold; + font-weight: 700; + font-size: 1.125rem; + margin-bottom: -1rem; } .search-tab-head-selected:focus { diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/index.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/index.scss index 5aad56dd9..6a565629d 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/index.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/index.scss @@ -111,11 +111,11 @@ .sidebar { position: fixed; left: 0; - background: theme(colors.secondary); + background: #0B4B66; height: 100%; color: theme(colors.white); - margin-top: 80px; - z-index: 10; + margin-top: 83px; + z-index: 999; transition: 0.3s ease all; white-space: nowrap; height: calc(100vh - 36px); @@ -146,10 +146,19 @@ align-items: center; padding: 20px; font-size: 14px; + + &.level-0 { + margin:0 0.3rem 0 0.3rem; + &.select-level{ + border-top: 1px solid; + border-bottom: 1px solid; + } + } + &.active { color: theme(colors.primary.main) !important; - border-right: 4px solid theme(colors.primary.main); + border-right: none; svg { fill: theme(colors.primary.main) !important; } @@ -177,15 +186,16 @@ } &:hover { - color: theme(colors.primary.main) !important; - background-color: #486480; + + background-color: #0B4B66; cursor: pointer; - svg { - fill: theme(colors.primary.main) !important; - } + } .search-icon-wrapper { + border: 2px solid theme(colors.white); + border-radius: 4px; + padding: 5px; svg { fill: theme(colors.white) !important; width: 21px; @@ -216,17 +226,32 @@ fill: theme(colors.white); } &:hover { - color: #fe7a51 !important; - background-color: #486480; + background-color: #6A8E9D; + opacity: 0.8; cursor: pointer; svg { fill: #fe7a51 !important; } } + + &.active { - color: theme(colors.primary.main) !important; + border-left: 4px solid theme(colors.primary.main); + &.level-0 { + + } + &.level-1 { + border-left: 8.5px solid theme(colors.primary.main); + } + &.level-2 { + border-left: 4px solid theme(colors.primary.main); + } - border-right: 4px solid theme(colors.primary.main); + &.level-3{ + + } + color: theme(colors.primary.main) !important; + border-right: none; svg { fill: theme(colors.primary.main) !important; } @@ -395,6 +420,7 @@ display: flex; flex-direction: column; padding-top: 80px; + margin-left: 72px; width: calc(100%-83px); } .citizen-home-container { @@ -515,9 +541,38 @@ text-decoration: none; div{ span{ - color: #f47738; - text-decoration: none; + color: theme(colors.primary.main) !important; + text-decoration: none; } } } -} \ No newline at end of file +} +.bread-crumb { + a{ + color: inherit; + text-decoration: inherit + } +} + +.sidebar-link{ + .custom-link{ + text-decoration: none; + div{ + span{ + color: theme(colors.white); + text-decoration: none; + } + } + } + } + .mandatory-span { + margin-left: 0.5rem; + color: red !important; + font-size: 1rem; + font-weight: 700; + } + +/* TODO fix required NABEEL/ANIL for home screen card */ + .customEmployeeCard { + @apply m-sm !important; + } diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/login.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/login.scss index 11e44e28c..39d90610d 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/login.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/login.scss @@ -5,23 +5,30 @@ } } } -.banner .bannerCard{ + +.banner .bannerCard { min-width: 420px !important; } + .employeeForgotPassword .employeeCard .field .field-container .component-in-front { margin-top: 0; border: 1px solid; border-right: none; padding: 7px; } + @screen dt { .employeeForgotPassword .employeeCard .field .field-container .component-in-front { padding: 7px; } - .loginFormStyleEmployee .employeeCard, .banner .bannerCard{ + + .loginFormStyleEmployee .employeeCard, + .banner .bannerCard { min-width: 420px !important; } - .employeeForgotPassword .employeeCard, .employeeChangePassword .employeeCard{ + + .employeeForgotPassword .employeeCard, + .employeeChangePassword .employeeCard { max-width: 420px !important; min-width: 420px !important; } @@ -35,51 +42,63 @@ .employeeForgotPassword .field-container { margin: 10px 0; } + .employeeForgotPassword { .submit-bar { @apply w-full; } } + .employeeChangePassword .submit-bar { width: 100% !important; } + .employeeChangePassword .card-text { text-align: center; } + .employeeChangePassword .input-otp-wrap { text-align: center; } + .submit-bar { .submit-bar { @apply w-full; } } + .loginFormStyleEmployee .bannerHeader p, .employeeForgotPassword .bannerHeader p, .employeeChangePassword .bannerHeader p { font-size: 19px; } + .employeeCard .card-sub-header { font-size: 24px; } -.loginFormStyleEmployee .employeeCard .card-label, .employeeForgotPassword .employeeCard .card-label{ + +.loginFormStyleEmployee .employeeCard .card-label, +.employeeForgotPassword .employeeCard .card-label { font-weight: normal; font-size: 16px; line-height: 19px; color: theme(colors.text.primary); margin-top: 20px; } + .banner .bannerHeader { margin-bottom: 20px; } -.employeeCard .card-label{ + +.employeeCard .card-label { font-weight: normal; font-size: 16px; line-height: 19px; color: theme(colors.text.primary); } -.profile-label-margin{ - margin-top: 10px; + +.profile-label-margin { + margin-top: 10px; } .employeeForgotPassword .employeeCard .card-label-desc { @@ -89,100 +108,169 @@ color: theme(colors.text.secondary); margin-top: 15px; } + .employeeChangePassword .employeeCard .card-text { margin-bottom: 15px; font-size: 16px; color: theme(colors.text.secondary); } + @media screen and (max-width: 768px) { .employeeChangePassword .employeeCard .card-text { margin-top: 7px; } + .employeeCard .card-sub-header { font-size: 18px; } } + .employeeChangePassword .employeeCard .card-text-button { text-align: center !important; margin-bottom: 12px !important; } + .employeeChangePassword .employeeCard .input-otp-wrap { margin-bottom: 10px; } + .employee .loginContainer { padding-top: 0px !important; } + .banner { - height: calc(100vh ) !important; + height: calc(100vh) !important; } -.employeeChangePassword .employeeCard .field .field-container{ +.employeeChangePassword .employeeCard .field .field-container { margin-bottom: 24px; } -.employeeForgotPassword .employeeCard .employee-card-sub-header, .employeeChangePassword .employeeCard .employee-card-sub-header, .loginFormStyleEmployee .employeeCard .employee-card-sub-header{ +.employeeForgotPassword .employeeCard .employee-card-sub-header, +.employeeChangePassword .employeeCard .employee-card-sub-header, +.loginFormStyleEmployee .employeeCard .employee-card-sub-header { font-size: 24px !important; line-height: 28px !important; margin-bottom: 0px !important; } -@media screen and (max-width : 768px){ - .employeeForgotPassword .employeeCard .employee-card-sub-header, .employeeChangePassword .employeeCard .employee-card-sub-header, .loginFormStyleEmployee .employeeCard .employee-card-sub-header{ + +@media screen and (max-width : 768px) { + + .employeeForgotPassword .employeeCard .employee-card-sub-header, + .employeeChangePassword .employeeCard .employee-card-sub-header, + .loginFormStyleEmployee .employeeCard .employee-card-sub-header { font-size: 18px !important; line-height: 21px !important; margin-bottom: 0px !important; } - .loginFormStyleEmployee .employeeCard, .banner .bannerCard{ + + .loginFormStyleEmployee .employeeCard, + .banner .bannerCard { min-width: 340px !important; margin: 10px !important; } - .employeeForgotPassword .employeeCard, .employeeChangePassword .employeeCard{ + + .employeeForgotPassword .employeeCard, + .employeeChangePassword .employeeCard { max-width: 360px !important; min-width: 340px !important; margin: 10px !important; } } -.employeeChangePassword .employeeCard .card-text{ + +.employeeChangePassword .employeeCard .card-text { margin-top: 18px !important; margin-bottom: 20px !important; } -.employeeBackbuttonAlign{ + +.employeeBackbuttonAlign { display: none; } -.resend-otp{ + +.resend-otp { cursor: pointer; } .employee-select-wrap.login-city-dd { - .options-card{ - max-height: 200px; + .options-card { + max-height: 200px; } } -@media screen and (max-width: 768px){ - .employeeBackbuttonAlign{ + +@media screen and (max-width: 768px) { + .employeeBackbuttonAlign { display: block; position: absolute; top: 20px; left: 20px; } - .banner{ + + .banner { align-items: flex-end; padding-bottom: 40px; height: 100vh !important; } - .topbar{ + + .topbar { background: rgba(34, 57, 77, var(--bg-opacity)) !important; color: white; } - .employee .loginContainer{ + + .employee .loginContainer { padding-top: 0px !important; } - .removeBottomMargin{ + + .removeBottomMargin { margin-bottom: 0px !important; } + .employee-select-wrap.login-city-dd { - .options-card{ - max-height: 160px; + .options-card { + max-height: 160px; } } } + +.loginFormStyleEmployee { + .loginCardSubHeaderClassName { + text-align: center !important; + } + + .loginCardClassName { + margin: auto !important; + min-width: 408px !important; + + header.employee-card-sub-header { + text-align: center; + margin-top: 10px; + } + + header.digit-header-content { + &:not(.label){ + text-align: center; + } + } + } + + .buttonClassName { + max-width: 100% !important; + width: 100% !important + } + + .field .field-container .text-input input { + margin-bottom: 5px !important; + } + + .bannerHeader { + margin-bottom: 0px !important; + } + + .primary-label-btn { + margin: 20px auto 0 auto !important; + } + + .employee-select-wrap .options-card { + max-height: 150px !important; + } +} \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/scroll-table.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/scroll-table.scss index 1a3dd3b64..c6637ebbc 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/scroll-table.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/scroll-table.scss @@ -111,4 +111,9 @@ color: #B1B4B6; flex: none; flex-grow: 0; margin: 0px 0px; +} + +.icon-wrapper { + margin-left:1rem; + cursor:pointer } \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/tailwind.config.js b/frontend/micro-ui/web/micro-ui-internals/packages/css/tailwind.config.js index 0ccfc7a5c..1e256ad26 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/tailwind.config.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/tailwind.config.js @@ -12,7 +12,7 @@ module.exports = { colors: { primary: { light: "#F18F5E", - main: "#F47738", + main: "#c84c0e", dark: "#C8602B", }, secondary: "#22394D", @@ -25,9 +25,9 @@ module.exports = { hover: "#003078", }, border: "#D6D5D4", - inputBorder:"#464646", + inputBorder: "#464646", "input-border": "#464646", - focus: "#F47738", + focus: "#c84c0e", error: "#D4351C", success: "#00703C", black: "#000000", @@ -101,7 +101,131 @@ module.exports = { 10: "10px", }, extend: {}, + digitv2: { + lightTheme: { + primary: "#c84c0e", + "text-color-primary": "#0B0C0C", + "text-color-secondary": "#505A5F", + "text-color-disabled": "#B1B4B6", + background: "#EEEEEE", + paper: "#FFFFFF", + "paper-secondary": "#FAFAFA", + divider: "#D6D5D4", + "header-sidenav": "#0B4B66", + "input-border": "#505A5F", + "primary-bg": "#FEEFE7", + }, + alert: { + error: "#D4351C", + "error-bg": "#EFC7C1", + success: "#00703C", + "success-bg": "#BAD6C9", + info: "#3498DB", + "info-bg": "#C7E0F1", + }, + chart: { + "chart-1": "#048BD0", + "chart-1-gradient": "#048BD0", + "chart-2": "#FBC02D", + "chart-2-gradient": "#FBC02D", + "chart-3": "#8E29BF", + "chart-4": "#EA8A3B", + "chart-5": "#0BABDE", + }, + fontSize: { + "heading-xl": { + mobile: "2rem", + tablet: "2.25rem", + desktop: "2.5rem", + }, + "heading-l": { + mobile: "1.5rem", + tablet: "1.75rem", + desktop: "2rem", + }, + "heading-m": { + mobile: "1.25rem", + tablet: "1.375rem", + desktop: "1.5rem", + }, + "heading-s": { + mobile: "1rem", + tablet: "1rem", + desktop: "1rem", + }, + "heading-xs": { + mobile: "0.75rem", + }, + "caption-l": { + mobile: "1.5rem", + tablet: "1.75rem", + desktop: "1.75rem", + }, + "caption-m": { + mobile: "1.25rem", + tablet: "1.5rem", + desktop: "1.5rem", + }, + "caption-s": { + mobile: "1rem", + tablet: "1.25rem", + desktop: "1.25rem", + }, + "body-l": { + mobile: "1rem", + tablet: "1.25rem", + desktop: "1.25rem", + }, + "body-s": { + mobile: "0.875rem", + tablet: "1rem", + desktop: "1rem", + }, + "body-xs": { + mobile: "0.75rem", + tablet: "0.875rem", + desktop: "0.875rem", + }, + label: { + mobile: "1rem", + tablet: "1rem", + desktop: "1rem", + }, + link: { + mobile: "1rem", + tablet: "1rem", + desktop: "1rem", + }, + }, + fontFamily: { + sans: ["Roboto"], + rc: ['"Roboto Condensed"'], + }, + fontStyle: { + normal: "normal", + italic: "italic", + }, + textDecorationLine: { + underline: "underline", + }, + fontWeight: { + regular: 400, + medium: 500, + bold: 700, + }, + lineHeight: { + "line-height-body-l": { mobile: "1.5rem", tablet: "1.75rem", desktop: "1.75rem" }, + "line-height-body-s": { mobile: "1.0938rem", tablet: "1.5rem", desktop: "1.5rem" }, + "line-height-body-xs": { mobile: "1.125rem", tablet: "1.5rem", desktop: "1.5rem" }, + normal: "normal", + }, + screens: { + mobile: "400px", + tablet: "768px", + desktop: "1024px", + }, + }, }, variants: {}, plugins: [], -}; +}; \ No newline at end of file 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 b2a880704..455ddb85b 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 @@ -75,6 +75,10 @@ const HRMSCard = () => { }, ], links: [ + { + label: t("HR_SEARCH_USER"), + link: `/${window?.contextPath}/employee/hrms/search-user`, + }, { label: t("HR_HOME_SEARCH_RESULTS_HEADING"), link: `/${window?.contextPath}/employee/hrms/inbox`, diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/SearchUser.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/SearchUser.js new file mode 100644 index 000000000..e1881a3b2 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/SearchUser.js @@ -0,0 +1,9 @@ +import React from 'react' + +const SearchUser = () => { + return ( +
SearchUser
+ ) +} + +export default SearchUser \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/index.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/index.js index 47b1f4e7a..56279ed7e 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/index.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/index.js @@ -2,7 +2,7 @@ import { PrivateRoute } from "@egovernments/digit-ui-react-components"; import React,{ useEffect } from "react"; import { useTranslation } from "react-i18next"; import { Link, Switch, useLocation, useHistory } from "react-router-dom"; - +import SearchUser from "./SearchUser"; // const {SixFtApart,Rotate360}=SVG; const EmployeeApp = ({ path, url, userType }) => { const { t } = useTranslation(); @@ -53,6 +53,7 @@ const EmployeeApp = ({ path, url, userType }) => { } /> } /> } /> + } /> From c3759e4a343e2e3cde9b300e9fd0575d6ea83dd1 Mon Sep 17 00:00:00 2001 From: debasishchakraborty-egovt Date: Wed, 3 Jul 2024 12:26:51 +0530 Subject: [PATCH 078/118] ISTE-226: Added chnages in open search in ws-search --- .../repository/builder/WsQueryBuilder.java | 37 ++++++++++++------- .../web/models/SearchCriteria.java | 3 ++ 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java index 1a6c8d9e1..654062c55 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java @@ -23,6 +23,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; +import org.springframework.util.ObjectUtils; import org.springframework.util.StringUtils; import org.springframework.web.client.RestTemplate; @@ -281,23 +282,31 @@ public StringBuilder applyFilters(StringBuilder query, List preparedStat preparedStatement.add(criteria.getOldConnectionNumber()); } - if (!StringUtils.isEmpty(criteria.getConnectionNumber()) || !StringUtils.isEmpty(criteria.getTextSearch())) { + if(ObjectUtils.isEmpty(criteria.isOpenPaymentSearch()) || !criteria.isOpenPaymentSearch()) { + + if (!StringUtils.isEmpty(criteria.getConnectionNumber()) || !StringUtils.isEmpty(criteria.getTextSearch())) { + addClauseIfRequired(preparedStatement, query); + + if (!StringUtils.isEmpty(criteria.getConnectionNumber())) { + query.append(" conn.connectionno ~* ? "); + preparedStatement.add(criteria.getConnectionNumber()); + } else { + query.append(" conn.connectionno ~* ? "); + preparedStatement.add(criteria.getTextSearch()); + } + + + if (!CollectionUtils.isEmpty(criteria.getConnectionNoSet())) { + query.append(" or conn.connectionno in (").append(createQuery(criteria.getConnectionNoSet())).append(" )"); + addToPreparedStatement(preparedStatement, criteria.getConnectionNoSet()); + } + } + } else { addClauseIfRequired(preparedStatement, query); - - if(!StringUtils.isEmpty(criteria.getConnectionNumber())) { - query.append(" conn.connectionno ~* ? "); + if (!StringUtils.isEmpty(criteria.getConnectionNumber())){ + query.append(" conn.connectionno = ? "); preparedStatement.add(criteria.getConnectionNumber()); } - else { - query.append(" conn.connectionno ~* ? "); - preparedStatement.add(criteria.getTextSearch()); - } - - - if(!CollectionUtils.isEmpty(criteria.getConnectionNoSet())) { - query.append(" or conn.connectionno in (").append(createQuery(criteria.getConnectionNoSet())).append(" )"); - addToPreparedStatement(preparedStatement, criteria.getConnectionNoSet()); - } } if (!StringUtils.isEmpty(criteria.getStatus())) { diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/models/SearchCriteria.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/models/SearchCriteria.java index 9c3993141..dc7b2cf4c 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/models/SearchCriteria.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/models/SearchCriteria.java @@ -32,6 +32,9 @@ public class SearchCriteria { private Set userIds; + @JsonProperty("isOpenPaymentSearch") + private boolean isOpenPaymentSearch; + @JsonProperty("status") private String status; From e2c84fb55df0176442b35cfdaed5c5b7776891fe Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Wed, 3 Jul 2024 12:27:41 +0530 Subject: [PATCH 079/118] water connection table responsive text size issue --- .../generate_bill/widgets/count_table_widget.dart | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/frontend/mgramseva/lib/screeens/generate_bill/widgets/count_table_widget.dart b/frontend/mgramseva/lib/screeens/generate_bill/widgets/count_table_widget.dart index 51587cbfd..06d99ffb1 100644 --- a/frontend/mgramseva/lib/screeens/generate_bill/widgets/count_table_widget.dart +++ b/frontend/mgramseva/lib/screeens/generate_bill/widgets/count_table_widget.dart @@ -1,3 +1,5 @@ +import 'dart:developer'; + import 'package:flutter/material.dart'; import 'package:mgramseva/model/reports/WaterConnectionCount.dart'; import 'package:mgramseva/utils/constants/i18_key_constants.dart'; @@ -27,18 +29,10 @@ class _CountTableWidgetState extends State { children: [ LayoutBuilder( builder: (context, constraints) { - if (constraints.maxWidth <= 760) { return Container( width: MediaQuery.of(context).size.width, - child: FittedBox( - child: _buildDataTable(connectionCount!), - ), + child: _buildDataTable(connectionCount!), ); - } else { - return Container( - width: MediaQuery.of(context).size.width, - child: _buildDataTable(connectionCount!)); - } }, ), if (connectionCount!.length > 5) @@ -96,6 +90,7 @@ class _CountTableWidgetState extends State { return DataRow( color: MaterialStateColor.resolveWith((states) => rowColor!), // Apply alternate row background color + cells: [ DataCell( Text( From 5d361711a4d6240b2bd23719c9735e3d1020fa0c Mon Sep 17 00:00:00 2001 From: debasishchakraborty-egovt Date: Wed, 3 Jul 2024 12:56:10 +0530 Subject: [PATCH 080/118] ISTE-226: Added chnages in open search in ws-search --- .../egov/waterconnection/repository/builder/WsQueryBuilder.java | 2 +- .../org/egov/waterconnection/web/models/SearchCriteria.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java index 654062c55..6928add33 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java @@ -282,7 +282,7 @@ public StringBuilder applyFilters(StringBuilder query, List preparedStat preparedStatement.add(criteria.getOldConnectionNumber()); } - if(ObjectUtils.isEmpty(criteria.isOpenPaymentSearch()) || !criteria.isOpenPaymentSearch()) { + if(ObjectUtils.isEmpty(criteria.getIsOpenPaymentSearch()) || !criteria.getIsOpenPaymentSearch()) { if (!StringUtils.isEmpty(criteria.getConnectionNumber()) || !StringUtils.isEmpty(criteria.getTextSearch())) { addClauseIfRequired(preparedStatement, query); diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/models/SearchCriteria.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/models/SearchCriteria.java index dc7b2cf4c..69411e1af 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/models/SearchCriteria.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/models/SearchCriteria.java @@ -33,7 +33,7 @@ public class SearchCriteria { private Set userIds; @JsonProperty("isOpenPaymentSearch") - private boolean isOpenPaymentSearch; + private Boolean isOpenPaymentSearch; @JsonProperty("status") private String status; From 439703f7fdd028497f2f33943dc713bf003661ed Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Wed, 3 Jul 2024 13:49:07 +0530 Subject: [PATCH 081/118] Home,Expense & Consumer details walkthrough removed, Search aligned in parallal HRMS --- .../screeens/add_expense/expense_details.dart | 54 ++++++++++--------- .../consumer_details/consumer_details.dart | 54 ++++++++++--------- .../mgramseva/lib/screeens/home/home.dart | 49 ++++++++--------- .../hrms/src/components/inbox/search.js | 2 +- 4 files changed, 82 insertions(+), 77 deletions(-) diff --git a/frontend/mgramseva/lib/screeens/add_expense/expense_details.dart b/frontend/mgramseva/lib/screeens/add_expense/expense_details.dart index 1c8b25f11..f0c3fc704 100644 --- a/frontend/mgramseva/lib/screeens/add_expense/expense_details.dart +++ b/frontend/mgramseva/lib/screeens/add_expense/expense_details.dart @@ -163,32 +163,34 @@ class _ExpenseDetailsState extends State { mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ - HomeBack( - widget: Help( - callBack: () => showGeneralDialog( - barrierLabel: "Label", - barrierDismissible: false, - barrierColor: Colors.black.withOpacity(0.5), - transitionDuration: Duration(milliseconds: 700), - context: context, - pageBuilder: (context, anim1, anim2) { - return ExpenseWalkThroughContainer((index) => - expenseProvider.incrementindex( - index, - expenseProvider - .expenseWalkthrougList[index + 1].key)); - }, - transitionBuilder: (context, anim1, anim2, child) { - return SlideTransition( - position: - Tween(begin: Offset(0, 1), end: Offset(0, 0)) - .animate(anim1), - child: child, - ); - }, - ), - walkThroughKey: Constants.ADD_EXPENSE_KEY, - )), + // ExpenseWalkThroughContainer Is Removed + // HomeBack( + // widget: Help( + // callBack: () => showGeneralDialog( + // barrierLabel: "Label", + // barrierDismissible: false, + // barrierColor: Colors.black.withOpacity(0.5), + // transitionDuration: Duration(milliseconds: 700), + // context: context, + // pageBuilder: (context, anim1, anim2) { + // return ExpenseWalkThroughContainer((index) => + // expenseProvider.incrementindex( + // index, + // expenseProvider + // .expenseWalkthrougList[index + 1].key)); + // }, + // transitionBuilder: (context, anim1, anim2, child) { + // return SlideTransition( + // position: + // Tween(begin: Offset(0, 1), end: Offset(0, 0)) + // .animate(anim1), + // child: child, + // ); + // }, + // ), + // walkThroughKey: Constants.ADD_EXPENSE_KEY, + // )), + HomeBack(), Card( child: Consumer( builder: (_, expensesDetailsProvider, child) => Form( diff --git a/frontend/mgramseva/lib/screeens/consumer_details/consumer_details.dart b/frontend/mgramseva/lib/screeens/consumer_details/consumer_details.dart index 2c8ecea1f..d39e940f3 100644 --- a/frontend/mgramseva/lib/screeens/consumer_details/consumer_details.dart +++ b/frontend/mgramseva/lib/screeens/consumer_details/consumer_details.dart @@ -157,32 +157,34 @@ class _ConsumerDetailsState extends State { mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ - HomeBack( - widget: Help( - callBack: () => showGeneralDialog( - barrierLabel: "Label", - barrierDismissible: false, - barrierColor: Colors.black.withOpacity(0.5), - transitionDuration: Duration(milliseconds: 700), - context: context, - pageBuilder: (context, anim1, anim2) { - return WalkThroughContainer((index) => - consumerProvider.incrementIndex( - index, - consumerProvider - .consmerWalkthrougList[index + 1].key)); - }, - transitionBuilder: (context, anim1, anim2, child) { - return SlideTransition( - position: - Tween(begin: Offset(0, 1), end: Offset(0, 0)) - .animate(anim1), - child: child, - ); - }, - ), - walkThroughKey: Constants.CREATE_CONSUMER_KEY, - )), + // ConsmerWalkthrougList Is Removed + // HomeBack( + // widget: Help( + // callBack: () => showGeneralDialog( + // barrierLabel: "Label", + // barrierDismissible: false, + // barrierColor: Colors.black.withOpacity(0.5), + // transitionDuration: Duration(milliseconds: 700), + // context: context, + // pageBuilder: (context, anim1, anim2) { + // return WalkThroughContainer((index) => + // consumerProvider.incrementIndex( + // index, + // consumerProvider + // .consmerWalkthrougList[index + 1].key)); + // }, + // transitionBuilder: (context, anim1, anim2, child) { + // return SlideTransition( + // position: + // Tween(begin: Offset(0, 1), end: Offset(0, 0)) + // .animate(anim1), + // child: child, + // ); + // }, + // ), + // walkThroughKey: Constants.CREATE_CONSUMER_KEY, + // )), + HomeBack(), Card( child: Column( mainAxisAlignment: MainAxisAlignment.start, diff --git a/frontend/mgramseva/lib/screeens/home/home.dart b/frontend/mgramseva/lib/screeens/home/home.dart index 456266158..232df70df 100644 --- a/frontend/mgramseva/lib/screeens/home/home.dart +++ b/frontend/mgramseva/lib/screeens/home/home.dart @@ -44,30 +44,31 @@ class _HomeState extends State { _buildView(homeProvider, Widget notification) { return Column(children: [ - Align( - alignment: Alignment.centerRight, - child: Help( - callBack: () => showGeneralDialog( - barrierLabel: "Label", - barrierDismissible: false, - barrierColor: Colors.black.withOpacity(0.5), - transitionDuration: Duration(milliseconds: 700), - context: context, - pageBuilder: (context, anim1, anim2) { - return HomeWalkThroughContainer((index) => - homeProvider.incrementIndex(index, - homeProvider.homeWalkthroughList[index + 1].key)); - }, - transitionBuilder: (context, anim1, anim2, child) { - return SlideTransition( - position: Tween(begin: Offset(0, 1), end: Offset(0, 0)) - .animate(anim1), - child: child, - ); - }, - ), - walkThroughKey: Constants.HOME_KEY, - )), + /* Note : WalkThroughContainer Is Removed */ + // Align( + // alignment: Alignment.centerRight, + // child: Help( + // callBack: () => showGeneralDialog( + // barrierLabel: "Label", + // barrierDismissible: false, + // barrierColor: Colors.black.withOpacity(0.5), + // transitionDuration: Duration(milliseconds: 700), + // context: context, + // pageBuilder: (context, anim1, anim2) { + // return HomeWalkThroughContainer((index) => + // homeProvider.incrementIndex(index, + // homeProvider.homeWalkthroughList[index + 1].key)); + // }, + // transitionBuilder: (context, anim1, anim2, child) { + // return SlideTransition( + // position: Tween(begin: Offset(0, 1), end: Offset(0, 0)) + // .animate(anim1), + // child: child, + // ); + // }, + // ), + // walkThroughKey: Constants.HOME_KEY, + // )), HomeCard(), notification, Footer() diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/inbox/search.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/inbox/search.js index bfbdbfe87..801c8e6e1 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/inbox/search.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/inbox/search.js @@ -109,7 +109,7 @@ const SearchApplication = ({ onSearch, type, onClose, searchFields, searchParams - {/*Don't Remove :Chance of Updated Search & Clear All Button*/} + {/*Don't Remove : Chance of Updated Search & Clear All Button*/} {/*
{type === "desktop" && !mobileView && ( From ca460ab025268b7c1106306b4bfa65678d85c525 Mon Sep 17 00:00:00 2001 From: Saloni-eGov Date: Wed, 3 Jul 2024 14:08:29 +0530 Subject: [PATCH 082/118] ISTE-224 created API for showing consumer whose demand has not been generated --- .../repository/WaterDaoImpl.java | 17 +++++++++++++ .../repository/builder/WsQueryBuilder.java | 7 ++++++ .../DemandNotGeneratedRowMapper.java | 25 +++++++++++++++++++ .../waterconnection/service/WaterService.java | 1 + .../service/WaterServiceImpl.java | 7 ++++++ .../web/controller/WaterController.java | 10 ++++++++ .../models/ConsumersDemandNotGenerated.java | 13 ++++++++++ .../ConsumersDemandNotGeneratedResponse.java | 16 ++++++++++++ 8 files changed, 96 insertions(+) create mode 100644 municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/rowmapper/DemandNotGeneratedRowMapper.java create mode 100644 municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/models/ConsumersDemandNotGenerated.java create mode 100644 municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/models/ConsumersDemandNotGeneratedResponse.java diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/WaterDaoImpl.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/WaterDaoImpl.java index c95a6aa18..af218d64c 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/WaterDaoImpl.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/WaterDaoImpl.java @@ -49,6 +49,9 @@ @Repository public class WaterDaoImpl implements WaterDao { + @Autowired + private DemandNotGeneratedRowMapper demandNotGeneratedRowMapper; + @Autowired private InactiveConsumerReportRowMapper inactiveConsumerReportRowMapper; @Autowired @@ -665,4 +668,18 @@ public List getInactiveConsumerReport(Long monthStar inactiveConsumerReportList=jdbcTemplate.query(inactive_consumer_query.toString(), preparedStatement.toArray(),inactiveConsumerReportRowMapper); return inactiveConsumerReportList; } + + public List getConsumersByPreviousMeterReading(String previousMeterReading, String tenantId) + { + StringBuilder query=new StringBuilder(wsQueryBuilder.DEMAND_NOT_GENERATED_QUERY); + + List preparedStatement=new ArrayList<>(); + preparedStatement.add(tenantId); + preparedStatement.add(previousMeterReading); + preparedStatement.add(tenantId); + + log.info("Query for consumer demand not generated "+ query +" prepared statement "+ preparedStatement); + List consumersDemandNotGeneratedList=jdbcTemplate.query(query.toString(),preparedStatement.toArray(),demandNotGeneratedRowMapper); + return consumersDemandNotGeneratedList; + } } diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java index 1a6c8d9e1..adcd78a38 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java @@ -168,6 +168,13 @@ public class WsQueryBuilder { + " connectionno IN (SELECT distinct connectionno FROM eg_ws_connection WHERE status='Inactive' AND" + " lastmodifiedtime >= ? AND lastmodifiedtime <= ? AND tenantid=?) " + " order by connectionno,lastmodifiedtime desc"; + + public static final String DEMAND_NOT_GENERATED_QUERY="select conn.connectionno as connectionno from eg_ws_connection conn " + + "INNER JOIN eg_ws_service wc ON wc.connection_id = conn.id WHERE conn.status='Active' " + + "AND conn.tenantid=? and wc.connectiontype='Non_Metered' and conn.previousmeterreading=? and connectionno NOT IN " + + "(select distinct consumercode from egbs_demand_v1 d inner join egbs_demanddetail_v1 dd on dd.demandid = d.id " + + "where dd.taxheadcode='10101' and d.status ='ACTIVE' and d.businessservice='WS' and " + + "d.tenantid=?) order by connectionno;"; /** * diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/rowmapper/DemandNotGeneratedRowMapper.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/rowmapper/DemandNotGeneratedRowMapper.java new file mode 100644 index 000000000..d0be07e7a --- /dev/null +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/rowmapper/DemandNotGeneratedRowMapper.java @@ -0,0 +1,25 @@ +package org.egov.waterconnection.repository.rowmapper; + + +import org.egov.waterconnection.web.models.ConsumersDemandNotGenerated; +import org.springframework.dao.DataAccessException; +import org.springframework.jdbc.core.ResultSetExtractor; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; + +public class DemandNotGeneratedRowMapper implements ResultSetExtractor> { + @Override + public List extractData(ResultSet resultSet) throws SQLException, DataAccessException { + List consumersDemandNotGeneratedList=new ArrayList<>(); + while(resultSet.next()) + { + ConsumersDemandNotGenerated consumersDemandNotGenerated=new ConsumersDemandNotGenerated(); + consumersDemandNotGenerated.setConsumerCode(resultSet.getString("connectionno")); + consumersDemandNotGeneratedList.add(consumersDemandNotGenerated); + } + return consumersDemandNotGeneratedList; + } +} diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterService.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterService.java index 0c72cd1f8..21191e23b 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterService.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterService.java @@ -53,4 +53,5 @@ List collectionReport(String paymentStartDate, String paym List inactiveConsumerReport(String monthStartDate,String monthEndDate,String tenantId, @Valid Integer offset, @Valid Integer limit, RequestInfo requestInfo); + List getConsumersWithDemandNotGenerated(String previousMeterReading, String tenantId,RequestInfo requestInfo); } diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterServiceImpl.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterServiceImpl.java index 704683d4b..e5d51eb87 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterServiceImpl.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterServiceImpl.java @@ -842,4 +842,11 @@ public List inactiveConsumerReport(String monthStart List inactiveConsumerReport=waterDaoImpl.getInactiveConsumerReport(monthStartDateTime,mothEndDateTime,tenantId,offset,limit); return inactiveConsumerReport; } + + @Override + public List getConsumersWithDemandNotGenerated(String previousMeterReading, String tenantId ,RequestInfo requestInfo) + { + List list=waterDaoImpl.getConsumersByPreviousMeterReading(previousMeterReading,tenantId); + return list; + } } \ No newline at end of file diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/controller/WaterController.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/controller/WaterController.java index cd462ba50..18bbdc204 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/controller/WaterController.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/controller/WaterController.java @@ -235,4 +235,14 @@ public ResponseEntity countWCbyDe return new ResponseEntity<>(response, HttpStatus.OK); } + @PostMapping("/consumers/demand-not-generated") + public ResponseEntity getConsumersWithDemandNotGenerated(@Valid @RequestBody RequestInfoWrapper requestInfoWrapper,@RequestParam(value="previousMeterReading") String previousMeterReading,@RequestParam (value="tenantId") String tenantId) + { + List list= waterService.getConsumersWithDemandNotGenerated(previousMeterReading,tenantId,requestInfoWrapper.getRequestInfo()); + ConsumersDemandNotGeneratedResponse response=ConsumersDemandNotGeneratedResponse.builder(). + consumersDemandNotGenerated(list).responseInfo(responseInfoFactory. + createResponseInfoFromRequestInfo(requestInfoWrapper.getRequestInfo(),true)).build(); + return new ResponseEntity<>(response,HttpStatus.OK); + } + } diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/models/ConsumersDemandNotGenerated.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/models/ConsumersDemandNotGenerated.java new file mode 100644 index 000000000..95c8e8e0b --- /dev/null +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/models/ConsumersDemandNotGenerated.java @@ -0,0 +1,13 @@ +package org.egov.waterconnection.web.models; + + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@NoArgsConstructor +@Data +public class ConsumersDemandNotGenerated { + private String consumerCode; +} diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/models/ConsumersDemandNotGeneratedResponse.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/models/ConsumersDemandNotGeneratedResponse.java new file mode 100644 index 000000000..d58acc901 --- /dev/null +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/models/ConsumersDemandNotGeneratedResponse.java @@ -0,0 +1,16 @@ +package org.egov.waterconnection.web.models; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import org.egov.common.contract.response.ResponseInfo; + +import java.util.List; + +@Builder +public class ConsumersDemandNotGeneratedResponse { + @JsonProperty("responseInfo") + private ResponseInfo responseInfo; + + @JsonProperty("ConsumersDemandNotGenerated") + private List consumersDemandNotGenerated; +} From aec80ca2a686ed3732603f591c775d07ab250c9c Mon Sep 17 00:00:00 2001 From: Hari-egov Date: Wed, 3 Jul 2024 14:08:52 +0530 Subject: [PATCH 083/118] check box edge case handled --- .../screeens/add_expense/expense_details.dart | 29 +++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/frontend/mgramseva/lib/screeens/add_expense/expense_details.dart b/frontend/mgramseva/lib/screeens/add_expense/expense_details.dart index f0c3fc704..bf3edb21e 100644 --- a/frontend/mgramseva/lib/screeens/add_expense/expense_details.dart +++ b/frontend/mgramseva/lib/screeens/add_expense/expense_details.dart @@ -464,18 +464,23 @@ class _ExpenseDetailsState extends State { expenseProvider.expenseWalkthrougList[4].key, key: Keys.expense.EXPENSE_PARTY_DATE, ), - RadioButtonFieldBuilder( - context, - i18.expense.HAS_THIS_BILL_PAID, - expensesDetailsProvider - .expenditureDetails.isBillPaid, - '', - '', - true, - Constants.EXPENSESTYPE, - expensesDetailsProvider.onChangeOfBillPaid, - isEnabled: expensesDetailsProvider - .expenditureDetails.allowEdit), + AbsorbPointer( + absorbing: expensesDetailsProvider + .expenditureDetails + .isBillCancelled == true ? true : false, + child: RadioButtonFieldBuilder( + context, + i18.expense.HAS_THIS_BILL_PAID, + expensesDetailsProvider + .expenditureDetails.isBillPaid, + '', + '', + true, + Constants.EXPENSESTYPE, + expensesDetailsProvider.onChangeOfBillPaid, + isEnabled: expensesDetailsProvider + .expenditureDetails.allowEdit), + ), if (expensesDetailsProvider.expenditureDetails.isBillPaid ?? false) BasicDateField(i18.expense.PAYMENT_DATE, true, expensesDetailsProvider.expenditureDetails.paidDateCtrl, From 301b0cff98663337acf90ae878ae260e9e7e24b0 Mon Sep 17 00:00:00 2001 From: debasishchakraborty-egovt Date: Wed, 3 Jul 2024 14:53:14 +0530 Subject: [PATCH 084/118] ISTE-226: Added chnages in open search in ws-search --- .../waterconnection/repository/builder/WsQueryBuilder.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java index 6928add33..3b342f172 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java @@ -309,6 +309,12 @@ public StringBuilder applyFilters(StringBuilder query, List preparedStat } } + if (!CollectionUtils.isEmpty(criteria.getConnectionNoSet())) { + addClauseIfRequired(preparedStatement, query); + query.append(" conn.connectionno in (").append(createQuery(criteria.getConnectionNoSet())).append(" )"); + addToPreparedStatement(preparedStatement, criteria.getConnectionNoSet()); + } + if (!StringUtils.isEmpty(criteria.getStatus())) { addClauseIfRequired(preparedStatement, query); query.append(" conn.status = ? "); From 3b3fb8f01d89a9bc0246c0fa5b8468c7a9c886cb Mon Sep 17 00:00:00 2001 From: Saloni-eGov Date: Wed, 3 Jul 2024 15:01:39 +0530 Subject: [PATCH 085/118] ISTE-224 --- .../repository/builder/WsQueryBuilder.java | 2 +- .../egov/waterconnection/service/WaterService.java | 2 +- .../waterconnection/service/WaterServiceImpl.java | 11 +++++++++-- .../web/controller/WaterController.java | 11 +++++------ 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java index adcd78a38..76ddf926c 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java @@ -171,7 +171,7 @@ public class WsQueryBuilder { public static final String DEMAND_NOT_GENERATED_QUERY="select conn.connectionno as connectionno from eg_ws_connection conn " + "INNER JOIN eg_ws_service wc ON wc.connection_id = conn.id WHERE conn.status='Active' " + - "AND conn.tenantid=? and wc.connectiontype='Non_Metered' and conn.previousmeterreading=? and connectionno NOT IN " + + "AND conn.tenantid=? and wc.connectiontype='Non_Metered' and conn.previousreadingdate=? and connectionno NOT IN " + "(select distinct consumercode from egbs_demand_v1 d inner join egbs_demanddetail_v1 dd on dd.demandid = d.id " + "where dd.taxheadcode='10101' and d.status ='ACTIVE' and d.businessservice='WS' and " + "d.tenantid=?) order by connectionno;"; diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterService.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterService.java index 21191e23b..e4c9ed73b 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterService.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterService.java @@ -53,5 +53,5 @@ List collectionReport(String paymentStartDate, String paym List inactiveConsumerReport(String monthStartDate,String monthEndDate,String tenantId, @Valid Integer offset, @Valid Integer limit, RequestInfo requestInfo); - List getConsumersWithDemandNotGenerated(String previousMeterReading, String tenantId,RequestInfo requestInfo); + WaterConnectionResponse getConsumersWithDemandNotGenerated(String previousMeterReading, String tenantId,RequestInfo requestInfo); } diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterServiceImpl.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterServiceImpl.java index e5d51eb87..19440a9ec 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterServiceImpl.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterServiceImpl.java @@ -844,9 +844,16 @@ public List inactiveConsumerReport(String monthStart } @Override - public List getConsumersWithDemandNotGenerated(String previousMeterReading, String tenantId ,RequestInfo requestInfo) + public WaterConnectionResponse getConsumersWithDemandNotGenerated(String previousMeterReading, String tenantId ,RequestInfo requestInfo) { List list=waterDaoImpl.getConsumersByPreviousMeterReading(previousMeterReading,tenantId); - return list; + Set connectionNo=new HashSet<>(); + for(ConsumersDemandNotGenerated connection:list) + { + connectionNo.add(connection.getConsumerCode()); + } + SearchCriteria criteria=SearchCriteria.builder().connectionNoSet(connectionNo).tenantId(tenantId).build(); + return search(criteria,requestInfo); +// return list; } } \ No newline at end of file diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/controller/WaterController.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/controller/WaterController.java index 18bbdc204..f4da10f1f 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/controller/WaterController.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/controller/WaterController.java @@ -236,13 +236,12 @@ public ResponseEntity countWCbyDe } @PostMapping("/consumers/demand-not-generated") - public ResponseEntity getConsumersWithDemandNotGenerated(@Valid @RequestBody RequestInfoWrapper requestInfoWrapper,@RequestParam(value="previousMeterReading") String previousMeterReading,@RequestParam (value="tenantId") String tenantId) + public ResponseEntity getConsumersWithDemandNotGenerated(@Valid @RequestBody RequestInfoWrapper requestInfoWrapper,@RequestParam(value="previousMeterReading") String previousMeterReading,@RequestParam (value="tenantId") String tenantId) { - List list= waterService.getConsumersWithDemandNotGenerated(previousMeterReading,tenantId,requestInfoWrapper.getRequestInfo()); - ConsumersDemandNotGeneratedResponse response=ConsumersDemandNotGeneratedResponse.builder(). - consumersDemandNotGenerated(list).responseInfo(responseInfoFactory. - createResponseInfoFromRequestInfo(requestInfoWrapper.getRequestInfo(),true)).build(); - return new ResponseEntity<>(response,HttpStatus.OK); + WaterConnectionResponse response= waterService.getConsumersWithDemandNotGenerated(previousMeterReading,tenantId,requestInfoWrapper.getRequestInfo()); + response.setResponseInfo( + responseInfoFactory.createResponseInfoFromRequestInfo(requestInfoWrapper.getRequestInfo(), true)); + return new ResponseEntity<>(response, HttpStatus.OK); } } From 1864170c324bbb2d9ede9565c955898592a36c80 Mon Sep 17 00:00:00 2001 From: debasishchakraborty-egovt Date: Wed, 3 Jul 2024 15:13:38 +0530 Subject: [PATCH 086/118] ISTE-226: Added chnages in open search in ws-search --- .../waterconnection/repository/builder/WsQueryBuilder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java index 3b342f172..acec40a3d 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java @@ -302,8 +302,9 @@ public StringBuilder applyFilters(StringBuilder query, List preparedStat } } } else { - addClauseIfRequired(preparedStatement, query); + if (!StringUtils.isEmpty(criteria.getConnectionNumber())){ + addClauseIfRequired(preparedStatement, query); query.append(" conn.connectionno = ? "); preparedStatement.add(criteria.getConnectionNumber()); } From 79fb4bc997343e3f08defa95c0a3b5ca3c3ee3eb Mon Sep 17 00:00:00 2001 From: Saloni-eGov Date: Wed, 3 Jul 2024 15:24:41 +0530 Subject: [PATCH 087/118] ISTE-224 --- .../egov/waterconnection/repository/builder/WsQueryBuilder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java index 76ddf926c..cb71ad45e 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java @@ -169,7 +169,7 @@ public class WsQueryBuilder { + " lastmodifiedtime >= ? AND lastmodifiedtime <= ? AND tenantid=?) " + " order by connectionno,lastmodifiedtime desc"; - public static final String DEMAND_NOT_GENERATED_QUERY="select conn.connectionno as connectionno from eg_ws_connection conn " + + public static final String DEMAND_NOT_GENERATED_QUERY="select distinct conn.connectionno as connectionno from eg_ws_connection conn " + "INNER JOIN eg_ws_service wc ON wc.connection_id = conn.id WHERE conn.status='Active' " + "AND conn.tenantid=? and wc.connectiontype='Non_Metered' and conn.previousreadingdate=? and connectionno NOT IN " + "(select distinct consumercode from egbs_demand_v1 d inner join egbs_demanddetail_v1 dd on dd.demandid = d.id " + From 02bfe5218467d5679bbb9351eec532c82fb182bc Mon Sep 17 00:00:00 2001 From: Saloni-eGov Date: Wed, 3 Jul 2024 15:52:00 +0530 Subject: [PATCH 088/118] ISTE-224 --- .../ConsumersDemandNotGeneratedResponse.java | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/models/ConsumersDemandNotGeneratedResponse.java diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/models/ConsumersDemandNotGeneratedResponse.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/models/ConsumersDemandNotGeneratedResponse.java deleted file mode 100644 index d58acc901..000000000 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/web/models/ConsumersDemandNotGeneratedResponse.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.egov.waterconnection.web.models; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Builder; -import org.egov.common.contract.response.ResponseInfo; - -import java.util.List; - -@Builder -public class ConsumersDemandNotGeneratedResponse { - @JsonProperty("responseInfo") - private ResponseInfo responseInfo; - - @JsonProperty("ConsumersDemandNotGenerated") - private List consumersDemandNotGenerated; -} From 5008ce7e2d7b4dd11748f9c026eee3f92a182d11 Mon Sep 17 00:00:00 2001 From: Taniya-eGov Date: Wed, 3 Jul 2024 15:54:08 +0530 Subject: [PATCH 089/118] added fromDate,toDate search criteria for planesearch for reindexing --- .../repository/builder/WsQueryBuilder.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java index acec40a3d..21f9fa1aa 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java @@ -670,6 +670,16 @@ public StringBuilder applyFiltersForPlaneSearch(StringBuilder query, List=?"); + preparedStatement.add(criteria.getFromDate()); + } + addClauseIfRequired(preparedStatement, query); + if(criteria.getToDate()!=null){ + query.append("conn.createdtime<=?"); + preparedStatement.add(criteria.getToDate()); + } } return query; } From 6dd8433ae5fb75cb945381af330e0f72e494e9f1 Mon Sep 17 00:00:00 2001 From: Taniya-eGov Date: Wed, 3 Jul 2024 16:10:06 +0530 Subject: [PATCH 090/118] added space in query --- .../waterconnection/repository/builder/WsQueryBuilder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java index 21f9fa1aa..a2f7f888d 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java @@ -672,12 +672,12 @@ public StringBuilder applyFiltersForPlaneSearch(StringBuilder query, List=?"); + query.append(" conn.createdtime>=? "); preparedStatement.add(criteria.getFromDate()); } addClauseIfRequired(preparedStatement, query); if(criteria.getToDate()!=null){ - query.append("conn.createdtime<=?"); + query.append(" conn.createdtime<=?"); preparedStatement.add(criteria.getToDate()); } } From c2a82c34d9b71a246b3272b310ef3bf5e4e658e0 Mon Sep 17 00:00:00 2001 From: Saloni-eGov Date: Wed, 3 Jul 2024 16:10:33 +0530 Subject: [PATCH 091/118] ISTE-224 --- .../repository/rowmapper/DemandNotGeneratedRowMapper.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/rowmapper/DemandNotGeneratedRowMapper.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/rowmapper/DemandNotGeneratedRowMapper.java index d0be07e7a..d42e53595 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/rowmapper/DemandNotGeneratedRowMapper.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/rowmapper/DemandNotGeneratedRowMapper.java @@ -1,15 +1,16 @@ package org.egov.waterconnection.repository.rowmapper; - import org.egov.waterconnection.web.models.ConsumersDemandNotGenerated; import org.springframework.dao.DataAccessException; import org.springframework.jdbc.core.ResultSetExtractor; +import org.springframework.stereotype.Component; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; +@Component public class DemandNotGeneratedRowMapper implements ResultSetExtractor> { @Override public List extractData(ResultSet resultSet) throws SQLException, DataAccessException { From 426654fbc720e8d8aa45d8aaf3d048d3d30e1bd5 Mon Sep 17 00:00:00 2001 From: Saloni-eGov Date: Wed, 3 Jul 2024 16:23:36 +0530 Subject: [PATCH 092/118] ISTE-224 --- .../java/org/egov/waterconnection/service/WaterServiceImpl.java | 1 - 1 file changed, 1 deletion(-) diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterServiceImpl.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterServiceImpl.java index 19440a9ec..6284af925 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterServiceImpl.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterServiceImpl.java @@ -854,6 +854,5 @@ public WaterConnectionResponse getConsumersWithDemandNotGenerated(String previou } SearchCriteria criteria=SearchCriteria.builder().connectionNoSet(connectionNo).tenantId(tenantId).build(); return search(criteria,requestInfo); -// return list; } } \ No newline at end of file From 4cc622d788b57e27eb9ba653288766b51327678f Mon Sep 17 00:00:00 2001 From: Taniya-eGov Date: Wed, 3 Jul 2024 16:25:28 +0530 Subject: [PATCH 093/118] added fromDate,toDate search criteria for planesearch for reindexing --- .../java/org/egov/demand/model/DemandCriteria.java | 4 ++++ .../repository/querybuilder/DemandQueryBuilder.java | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/business-services/billing-service/src/main/java/org/egov/demand/model/DemandCriteria.java b/business-services/billing-service/src/main/java/org/egov/demand/model/DemandCriteria.java index 890c8f9bc..8781713e5 100644 --- a/business-services/billing-service/src/main/java/org/egov/demand/model/DemandCriteria.java +++ b/business-services/billing-service/src/main/java/org/egov/demand/model/DemandCriteria.java @@ -76,6 +76,10 @@ public class DemandCriteria { private Long periodFrom; private Long periodTo; + + private Long fromDate; + + private Long toDate; private Type type; diff --git a/business-services/billing-service/src/main/java/org/egov/demand/repository/querybuilder/DemandQueryBuilder.java b/business-services/billing-service/src/main/java/org/egov/demand/repository/querybuilder/DemandQueryBuilder.java index 3d5753cac..6b443885e 100644 --- a/business-services/billing-service/src/main/java/org/egov/demand/repository/querybuilder/DemandQueryBuilder.java +++ b/business-services/billing-service/src/main/java/org/egov/demand/repository/querybuilder/DemandQueryBuilder.java @@ -260,6 +260,18 @@ public void addDemandCriteria(StringBuilder demandQuery, DemandCriteria demandCr preparedStatementValues.add(demandCriteria.getPeriodTo()); } + if(demandCriteria.getFromDate() != null){ + addAndClause(demandQuery); + demandQuery.append("dmd.createdtime >= ?"); + preparedStatementValues.add(demandCriteria.getFromDate()); + } + + if(demandCriteria.getToDate() != null){ + addAndClause(demandQuery); + demandQuery.append("dmd.createdtime <= ?"); + preparedStatementValues.add(demandCriteria.getToDate()); + } + if (demandCriteria.getConsumerCode() != null && !demandCriteria.getConsumerCode().isEmpty()) { addAndClause(demandQuery); demandQuery.append("dmd.consumercode IN (" From c086f5dd847cda7d718ecf2cba67623b84141fe6 Mon Sep 17 00:00:00 2001 From: Taniya-eGov Date: Wed, 3 Jul 2024 16:32:16 +0530 Subject: [PATCH 094/118] added fromDate,toDate search criteria for planesearch for reindexing --- .../demand/repository/querybuilder/DemandQueryBuilder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/business-services/billing-service/src/main/java/org/egov/demand/repository/querybuilder/DemandQueryBuilder.java b/business-services/billing-service/src/main/java/org/egov/demand/repository/querybuilder/DemandQueryBuilder.java index 6b443885e..70c551954 100644 --- a/business-services/billing-service/src/main/java/org/egov/demand/repository/querybuilder/DemandQueryBuilder.java +++ b/business-services/billing-service/src/main/java/org/egov/demand/repository/querybuilder/DemandQueryBuilder.java @@ -262,13 +262,13 @@ public void addDemandCriteria(StringBuilder demandQuery, DemandCriteria demandCr if(demandCriteria.getFromDate() != null){ addAndClause(demandQuery); - demandQuery.append("dmd.createdtime >= ?"); + demandQuery.append(" dmd.createdtime >= ? "); preparedStatementValues.add(demandCriteria.getFromDate()); } if(demandCriteria.getToDate() != null){ addAndClause(demandQuery); - demandQuery.append("dmd.createdtime <= ?"); + demandQuery.append(" dmd.createdtime <= ? "); preparedStatementValues.add(demandCriteria.getToDate()); } From 87d102de92acccbe987da77a952ea0fd8917b188 Mon Sep 17 00:00:00 2001 From: Saloni-eGov Date: Wed, 3 Jul 2024 16:50:29 +0530 Subject: [PATCH 095/118] ISTE-224 --- .../org/egov/waterconnection/repository/WaterDaoImpl.java | 2 +- .../egov/waterconnection/service/WaterServiceImpl.java | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/WaterDaoImpl.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/WaterDaoImpl.java index af218d64c..84f89fff7 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/WaterDaoImpl.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/WaterDaoImpl.java @@ -669,7 +669,7 @@ public List getInactiveConsumerReport(Long monthStar return inactiveConsumerReportList; } - public List getConsumersByPreviousMeterReading(String previousMeterReading, String tenantId) + public List getConsumersByPreviousMeterReading(Long previousMeterReading, String tenantId) { StringBuilder query=new StringBuilder(wsQueryBuilder.DEMAND_NOT_GENERATED_QUERY); diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterServiceImpl.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterServiceImpl.java index 6284af925..7d164b34f 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterServiceImpl.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterServiceImpl.java @@ -846,7 +846,13 @@ public List inactiveConsumerReport(String monthStart @Override public WaterConnectionResponse getConsumersWithDemandNotGenerated(String previousMeterReading, String tenantId ,RequestInfo requestInfo) { - List list=waterDaoImpl.getConsumersByPreviousMeterReading(previousMeterReading,tenantId); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd/MM/yyyy"); + LocalDate readingDate = LocalDate.parse(previousMeterReading, formatter); + + Long previousReadingEpoch = LocalDateTime.of(readingDate.getYear(), readingDate.getMonth(), readingDate.getDayOfMonth(), 0, 0, 0) + .atZone(ZoneId.systemDefault()).toInstant().toEpochMilli(); + + List list=waterDaoImpl.getConsumersByPreviousMeterReading(previousReadingEpoch,tenantId); Set connectionNo=new HashSet<>(); for(ConsumersDemandNotGenerated connection:list) { From e8be561267fe97abf2bb23ae83edba7856e1318a Mon Sep 17 00:00:00 2001 From: Nipun Arora Date: Wed, 3 Jul 2024 17:00:04 +0530 Subject: [PATCH 096/118] Dependent dropdown functionality --- .../hrms/src/components/SearchUserForm.js | 231 ++++++++++++++++++ .../hrms/src/components/SearchUserResults.js | 9 + .../modules/hrms/src/pages/SearchUser.js | 13 +- 3 files changed, 252 insertions(+), 1 deletion(-) create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/SearchUserForm.js create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/SearchUserResults.js diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/SearchUserForm.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/SearchUserForm.js new file mode 100644 index 000000000..a5c6be517 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/SearchUserForm.js @@ -0,0 +1,231 @@ +import { Loader, Header, Dropdown, LabelFieldPair, CardLabel, LinkLabel, SubmitBar } from "@egovernments/digit-ui-react-components"; +import React, { useState,useMemo,useEffect } from "react"; +import { useTranslation } from "react-i18next"; +import { Controller, useForm, useWatch } from "react-hook-form"; + +function buildTree(data, hierarchy) { + const tree = { options: [] }; + + data.forEach((item) => { + // Ignore items without zoneCode + if (!item.zoneCode) return; + + let currentLevel = tree; + + hierarchy.forEach(({level}, index) => { + const value = item[level]; + + if (!currentLevel[value]) { + // Clone the item and delete the options property from it + const clonedItem = { ...item }; + delete clonedItem.options; + + // Initialize the current level with the cloned item + currentLevel[value] = { ...clonedItem, options: [] }; + + // Push the cloned item to the options array without the options property + currentLevel.options.push({ ...clonedItem }); + } + + if (index === hierarchy.length - 1) { + currentLevel[value].codes = currentLevel[value].codes || []; + currentLevel[value].codes.push(item.code); + } + + currentLevel = currentLevel[value]; + }); + }); + + return tree; +} + +const SearchUserForm = () => { + const { t } = useTranslation(); + const [hierarchy, setHierarchy] = useState([ + { "level": "zoneCode", "value": 1,"optionsKey":"zoneName" }, + { "level": "circleCode", "value": 2,"optionsKey":"circleName" }, + { "level": "divisionCode", "value": 3,"optionsKey":"divisionName" }, + { "level": "subDivisionCode", "value": 4,"optionsKey":"subDivisionName" }, + { "level": "sectionCode", "value": 5,"optionsKey":"sectionName" }, + // { "level": "schemeCode", "value": 6,"optionsKey":"schemeName" }, + { "level": "code", "value": 7,"optionsKey":"name" } +] +); + + const [tree, setTree] = useState(null); + const [zones,setZones] = useState([]) + const [circles,setCircles] = useState([]) + const [divisions,setDivisions] = useState([]) + const [subDivisions,setSubDivisions] = useState([]) + const [sections,setSections] = useState([]) + const [schemes,setSchemes] = useState([]) + const [codes,setCodes] = useState([]) + + console.log("tree", tree); + const requestCriteria = { + url: "/mdms-v2/v1/_search", + params: { tenantId: Digit.ULBService.getStateId() }, + body: { + MdmsCriteria: { + tenantId: Digit.ULBService.getStateId(), + moduleDetails: [ + { + moduleName: "tenant", + masterDetails: [ + { + name: "tenants", + }, + ], + }, + ], + }, + }, + config: { + cacheTime: Infinity, + select: (data) => { + const result = data?.MdmsRes?.tenant?.tenants + const resultInTree = buildTree(result, hierarchy); + setTree(resultInTree); + return result; + }, + }, + }; + + const { isLoading, data, revalidate, isFetching, error } = Digit.Hooks.useCustomAPIHook(requestCriteria); + + const { + register, + handleSubmit, + setValue, + getValues, + reset, + watch, + trigger, + control, + formState, + errors, + setError, + clearErrors, + unregister, + } = useForm({ + defaultValues: {}, + }); + + const formData = watch(); + console.log("formData from watch",formData); + + const clearSearch = () => { + reset({}); + + // dispatch({ + // type: uiConfig?.type === "filter"?"clearFilterForm" :"clearSearchForm", + // state: { ...uiConfig?.defaultValues } + // //need to pass form with empty strings + // }) + //here reset tableForm as well + // dispatch({ + // type: "tableForm", + // state: { limit:10,offset:0 } + // //need to pass form with empty strings + // }) + }; + + const onSubmit = (data) => { + console.log("formData", data); + }; + + // const optionsForHierarchy = (hierarchy) =>{ + // // this gets called whenever formData changes + // // Here we need to add logic to return options for one dropdown and return [] for all the childs + // //zoneCode -> circleCode -> divisionCode -> subDivisionCode -> sectionCode -> schemeCode -> code + // // console.log(hierarchy); + // const data = getValues("zoneCode") + // return tree.options + // debugger + // if(data){ + // return tree?.[data?.zoneCode]?.options + // } + + // return null + // } + + const optionsForHierarchy = (level, value) => { + if (!tree) return []; + + const levels = hierarchy.map(({level}) => level) + const levelIndex = levels.indexOf(level); + + //zoneCode(1st level(highest parent)) + if (levelIndex === -1 || levelIndex=== 0) return tree.options; + + let currentLevel = tree; + for (let i = 0; i < levelIndex; i++) { + const code = formData[levels[i]]?.[levels[i]]; + if (!code || !currentLevel[code]) return []; + currentLevel = currentLevel[code]; + } + return currentLevel.options || []; + }; + + const renderFields = useMemo(() => { return hierarchy.map(({level,optionsKey,...rest},idx) => ( + + {t(Digit.Utils.locale.getTransformedLocale(`HR_SU_${level}`))} + ( + { + props.onChange(e) + //clear all child levels + const childLevels = hierarchy.slice(hierarchy.findIndex(h => h.level === level) + 1); + childLevels.forEach(child => setValue(child.level, "")); + }} + selected={props.value} + defaultValue={props.value} + t={t} + optionCardStyles={{ + top: "2.3rem", + overflow: "auto", + maxHeight: "200px", + }} + /> + )} + rules={{}} + defaultValue={""} + name={level} + control={control} + /> + + ))}, [formData]) + + if (isLoading || !setTree) { + return ; + } + + return ( +
+ +
+

{t("HR_SU_HINT")}

+
+ {renderFields} +
+ { + clearSearch() + }}> + {t("CLEAR_SEARCH")} + + +
+
+
+ +
+ ); +}; + +export default SearchUserForm; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/SearchUserResults.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/SearchUserResults.js new file mode 100644 index 000000000..9669dcd03 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/SearchUserResults.js @@ -0,0 +1,9 @@ +import React from 'react' + +const SearchUserResults = () => { + return ( +
SearchUserResults
+ ) +} + +export default SearchUserResults \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/SearchUser.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/SearchUser.js index e1881a3b2..25ef9a1ce 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/SearchUser.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/SearchUser.js @@ -1,8 +1,19 @@ import React from 'react' +import SearchUserForm from '../components/SearchUserForm' +import { Header } from '@egovernments/digit-ui-react-components' +import { useTranslation } from "react-i18next"; + const SearchUser = () => { + const {t} = useTranslation() + return ( -
SearchUser
+
+
+
{t("HR_SU")}
+ +
+
) } From 9b5ebb186ebaaf7012fa6cd37b243dacac279de7 Mon Sep 17 00:00:00 2001 From: Nipun Arora Date: Wed, 3 Jul 2024 17:06:36 +0530 Subject: [PATCH 097/118] updated open search parameters --- .../micro-ui/web/micro-ui-internals/example/devpackage.json | 2 +- frontend/micro-ui/web/micro-ui-internals/example/package.json | 2 +- .../web/micro-ui-internals/example/src/UICustomizations.js | 3 ++- .../micro-ui-internals/packages/modules/payment/package.json | 2 +- .../packages/modules/payment/src/configs/UICustomizations.js | 3 ++- frontend/micro-ui/web/package.json | 2 +- frontend/micro-ui/web/src/Customisations/UICustomizations.js | 3 ++- 7 files changed, 10 insertions(+), 7 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/example/devpackage.json b/frontend/micro-ui/web/micro-ui-internals/example/devpackage.json index b0df49622..9a8ba7b26 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/devpackage.json +++ b/frontend/micro-ui/web/micro-ui-internals/example/devpackage.json @@ -12,7 +12,7 @@ "@egovernments/digit-ui-libraries":"^1.4.0", "@egovernments/digit-ui-module-common":"^1.4.0", "@egovernments/digit-ui-module-engagement":"^1.4.0", - "@egovernments/digit-ui-module-payment":"0.0.11", + "@egovernments/digit-ui-module-payment":"0.0.12", "@egovernments/digit-ui-module-fsm":"^1.4.0", "@egovernments/digit-ui-module-mcollect":"^1.4.0", "@egovernments/digit-ui-module-noc":"^1.4.0", diff --git a/frontend/micro-ui/web/micro-ui-internals/example/package.json b/frontend/micro-ui/web/micro-ui-internals/example/package.json index aa54c6c6d..0e61c101e 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/package.json +++ b/frontend/micro-ui/web/micro-ui-internals/example/package.json @@ -14,7 +14,7 @@ "@egovernments/digit-ui-module-core": "1.5.46", "@egovernments/digit-ui-module-hrms": "1.5.27", "@egovernments/digit-ui-module-pgr": "1.7.0", - "@egovernments/digit-ui-module-payment":"0.0.11", + "@egovernments/digit-ui-module-payment":"0.0.12", "@egovernments/digit-ui-module-engagement": "1.5.20", "@egovernments/digit-ui-react-components": "1.5.26", "http-proxy-middleware": "^1.0.5", diff --git a/frontend/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js b/frontend/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js index 381d3d526..4addde2b4 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js +++ b/frontend/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js @@ -452,7 +452,8 @@ export const UICustomizations = { // consumerCode, tenantId, businessService, - textSearch:consumerCode + connectionNumber:consumerCode, + isOpenPaymentSearch:true } data.params = finalParams // data.params.textSearch = finalParams.consumerCode diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json index bcd6cb618..e84456ddb 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-payment", - "version": "0.0.11", + "version": "0.0.12", "description": "Open Payments", "main": "dist/index.js", "module": "dist/index.modern.js", diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/UICustomizations.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/UICustomizations.js index 6810bfe93..2a8e0bd33 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/UICustomizations.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/configs/UICustomizations.js @@ -31,7 +31,8 @@ export const UICustomizations = { // consumerCode, tenantId, businessService, - textSearch:consumerCode + connectionNumber:consumerCode, + isOpenPaymentSearch:true } data.params = finalParams // data.params.textSearch = finalParams.consumerCode diff --git a/frontend/micro-ui/web/package.json b/frontend/micro-ui/web/package.json index e8cfe8950..ea954976a 100644 --- a/frontend/micro-ui/web/package.json +++ b/frontend/micro-ui/web/package.json @@ -22,7 +22,7 @@ "@egovernments/digit-ui-module-hrms": "1.5.27", "@egovernments/digit-ui-module-pgr": "1.7.0", "@egovernments/digit-ui-module-engagement": "1.5.20", - "@egovernments/digit-ui-module-payment":"0.0.11", + "@egovernments/digit-ui-module-payment":"0.0.12", "@egovernments/digit-ui-react-components": "1.5.26", "babel-loader": "8.1.0", "clean-webpack-plugin": "4.0.0", diff --git a/frontend/micro-ui/web/src/Customisations/UICustomizations.js b/frontend/micro-ui/web/src/Customisations/UICustomizations.js index 7e894482e..042175868 100644 --- a/frontend/micro-ui/web/src/Customisations/UICustomizations.js +++ b/frontend/micro-ui/web/src/Customisations/UICustomizations.js @@ -443,7 +443,8 @@ export const UICustomizations = { // consumerCode, tenantId, businessService, - textSearch:consumerCode + connectionNumber:consumerCode, + isOpenPaymentSearch:true } data.params = finalParams // data.params.textSearch = finalParams.consumerCode From e9f412ffb767fc71a5855a3e3d4f5869d2e9cc5b Mon Sep 17 00:00:00 2001 From: Saloni-eGov Date: Wed, 3 Jul 2024 17:31:41 +0530 Subject: [PATCH 098/118] ISTE-224 --- .../waterconnection/service/WaterServiceImpl.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterServiceImpl.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterServiceImpl.java index 7d164b34f..ba0803984 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterServiceImpl.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterServiceImpl.java @@ -846,11 +846,12 @@ public List inactiveConsumerReport(String monthStart @Override public WaterConnectionResponse getConsumersWithDemandNotGenerated(String previousMeterReading, String tenantId ,RequestInfo requestInfo) { - DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd/MM/yyyy"); - LocalDate readingDate = LocalDate.parse(previousMeterReading, formatter); - - Long previousReadingEpoch = LocalDateTime.of(readingDate.getYear(), readingDate.getMonth(), readingDate.getDayOfMonth(), 0, 0, 0) - .atZone(ZoneId.systemDefault()).toInstant().toEpochMilli(); + Long previousReadingEpoch; + try { + previousReadingEpoch = Long.parseLong(previousMeterReading); + } catch (NumberFormatException e) { + throw new IllegalArgumentException("Invalid format for previousMeterReading. Expected a timestamp in milliseconds.", e); + } List list=waterDaoImpl.getConsumersByPreviousMeterReading(previousReadingEpoch,tenantId); Set connectionNo=new HashSet<>(); From 89a380e00131579235aa9ab84ffccb28c57e3aa7 Mon Sep 17 00:00:00 2001 From: Taniya-eGov Date: Thu, 4 Jul 2024 11:27:57 +0530 Subject: [PATCH 099/118] updated fromDate and toDate code --- .../waterconnection/repository/builder/WsQueryBuilder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java index a2f7f888d..c2a12d432 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java @@ -670,13 +670,13 @@ public StringBuilder applyFiltersForPlaneSearch(StringBuilder query, List=? "); preparedStatement.add(criteria.getFromDate()); } - addClauseIfRequired(preparedStatement, query); if(criteria.getToDate()!=null){ + addClauseIfRequired(preparedStatement, query); query.append(" conn.createdtime<=?"); preparedStatement.add(criteria.getToDate()); } From edadf1e745853af785e91e61e99df6537ac28b91 Mon Sep 17 00:00:00 2001 From: Nipun Arora Date: Thu, 4 Jul 2024 17:43:41 +0530 Subject: [PATCH 100/118] Search User scren draft one --- .../src/components/MultiSelectDropdown.js | 141 +++++++ .../hrms/src/components/SearchUserForm.js | 354 +++++++++++++----- .../hrms/src/components/SearchUserResults.js | 113 +++++- .../modules/hrms/src/pages/SearchUser.js | 33 +- 4 files changed, 549 insertions(+), 92 deletions(-) create mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/MultiSelectDropdown.js diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/MultiSelectDropdown.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/MultiSelectDropdown.js new file mode 100644 index 000000000..87a3fcee4 --- /dev/null +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/MultiSelectDropdown.js @@ -0,0 +1,141 @@ +import React, { useEffect, useReducer, useRef, useState } from "react"; +import { ArrowDown, CheckSvg } from "@egovernments/digit-ui-react-components"; +import { useTranslation } from "react-i18next"; + +const MultiSelectDropdown = ({ options, optionsKey, selected = [], onSelect, defaultLabel = "", defaultUnit = "",BlockNumber=1,isOBPSMultiple=false,props={},isPropsNeeded=false,ServerStyle={}, isSurvey=false,placeholder, disable=false,config}) => { + const [active, setActive] = useState(false); + const [searchQuery, setSearchQuery] = useState(); + const [optionIndex, setOptionIndex] = useState(-1); + const dropdownRef = useRef(); + const { t } = useTranslation(); + + function reducer(state, action){ + switch(action.type){ + case "ADD_TO_SELECTED_EVENT_QUEUE": + return [...state, {[optionsKey]: action.payload?.[1]?.[optionsKey], propsData: action.payload} ] + case "REMOVE_FROM_SELECTED_EVENT_QUEUE": + const newState = state.filter( e => e?.[optionsKey] !== action.payload?.[1]?.[optionsKey]) + onSelect(newState.map((e) => e.propsData), props); + return newState + case "REPLACE_COMPLETE_STATE": + return action.payload + default: + return state + } + } + + useEffect(() => { + dispatch({type: "REPLACE_COMPLETE_STATE", payload: fnToSelectOptionThroughProvidedSelection(selected) }) + },[selected?.length, selected?.[0]?.code]) + + function fnToSelectOptionThroughProvidedSelection(selected){ + return selected?.map( e => ({[optionsKey]: e?.[optionsKey], propsData: [null, e]})) + } + + const [alreadyQueuedSelectedState, dispatch] = useReducer(reducer, selected, fnToSelectOptionThroughProvidedSelection) + + useEffect(()=> { + if(!active){ + onSelect(alreadyQueuedSelectedState?.map( e => e.propsData), props) + } + },[active]) + + + function handleOutsideClickAndSubmitSimultaneously(){ + setActive(false) + } + + Digit.Hooks.useClickOutside(dropdownRef, handleOutsideClickAndSubmitSimultaneously , active, {capture: true} ); + const filtOptns = + searchQuery?.length > 0 ? options.filter((option) => t(option[optionsKey]&&typeof option[optionsKey]=="string" && option[optionsKey].toUpperCase()).toLowerCase().indexOf(searchQuery.toLowerCase()) >= 0) : options; + + function onSearch(e) { + setSearchQuery(e.target.value); + } + + function onSelectToAddToQueue(...props){ + const isChecked = arguments[0].target.checked + isChecked ? dispatch({type: "ADD_TO_SELECTED_EVENT_QUEUE", payload: arguments }) : dispatch({type: "REMOVE_FROM_SELECTED_EVENT_QUEUE", payload: arguments }) + } + +/* Custom function to scroll and select in the dropdowns while using key up and down */ + const keyChange = (e) => { + if (e.key == "ArrowDown") { + setOptionIndex(state =>state+1== filtOptns.length?0:state+1); + if(optionIndex+1== filtOptns.length){ + e?.target?.parentElement?.parentElement?.children?.namedItem("jk-dropdown-unique")?.scrollTo?.(0,0) + }else{ + optionIndex>2&& e?.target?.parentElement?.parentElement?.children?.namedItem("jk-dropdown-unique")?.scrollBy?.(0,45) + } + e.preventDefault(); + } else if (e.key == "ArrowUp") { + setOptionIndex(state => state!==0? state - 1: filtOptns.length-1); + if(optionIndex===0){ + e?.target?.parentElement?.parentElement?.children?.namedItem("jk-dropdown-unique")?.scrollTo?.(100000,100000) + }else{ + optionIndex>2&&e?.target?.parentElement?.parentElement?.children?.namedItem("jk-dropdown-unique")?.scrollBy?.(0,-45) + } + e.preventDefault(); + }else if(e.key=="Enter"){ + onSelectToAddToQueue(e,filtOptns[optionIndex]); + } + } + + const MenuItem = ({ option, index }) => ( +
+ selectedOption[optionsKey] === option[optionsKey]) ? true : false} + onChange={(e) => isPropsNeeded?onSelectToAddToQueue(e, option,props):isOBPSMultiple?onSelectToAddToQueue(e, option,BlockNumber):onSelectToAddToQueue(e, option)} + style={{minWidth: "24px", width: "100%"}} + disabled={option.isDisabled || false} + /> +
+ +
+

{t(option[optionsKey]&&typeof option[optionsKey]=="string" && option[optionsKey])}

+
+ ); + + const Menu = () => { + const filteredOptions = + searchQuery?.length > 0 ? options.filter((option) => t(option[optionsKey]&&typeof option[optionsKey]=="string" && option[optionsKey].toUpperCase()).toLowerCase().indexOf(searchQuery.toLowerCase()) >= 0) : options; + return filteredOptions?.map((option, index) => ); + }; + + return ( +
+
+
+ setActive(true)} value={searchQuery} onChange={onSearch} placeholder={t(placeholder)} /> +
+

{alreadyQueuedSelectedState.length > 0 ? `${isSurvey? alreadyQueuedSelectedState?.filter((ob) => ob?.i18nKey !== undefined).length : alreadyQueuedSelectedState.length} ${defaultUnit}` : defaultLabel}

+ +
+
+ {active ? ( +
+ +
+ ) : null} + +
+ {config?.isDropdownWithChip ?
+ {alreadyQueuedSelectedState.length > 0 && + alreadyQueuedSelectedState.map((value, index) => { + return onSelectToAddToQueue(e, value,props) + : (e) => onSelectToAddToQueue(e, value) + } />; + })} +
: null} +
+ ); +}; + +export default MultiSelectDropdown; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/SearchUserForm.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/SearchUserForm.js index a5c6be517..fa8e590c4 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/SearchUserForm.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/SearchUserForm.js @@ -1,7 +1,47 @@ -import { Loader, Header, Dropdown, LabelFieldPair, CardLabel, LinkLabel, SubmitBar } from "@egovernments/digit-ui-react-components"; -import React, { useState,useMemo,useEffect } from "react"; +import { Loader, Header, Dropdown, LabelFieldPair, CardLabel, LinkLabel, SubmitBar, Toast } from "@egovernments/digit-ui-react-components"; +import React, { useState, useMemo, useEffect } from "react"; import { useTranslation } from "react-i18next"; import { Controller, useForm, useWatch } from "react-hook-form"; +import MultiSelectDropdown from "./MultiSelectDropdown"; +function filterKeys(data, keys) { + return data.map((item) => { + const filteredItem = {}; + keys.forEach((key) => { + if (item.hasOwnProperty(key)) { + filteredItem[key] = item[key]; + } + }); + return filteredItem; + }); +} + +function getUniqueLeafCodes(tree) { + const codes = new Set(); + + function traverse(node) { + if (!node || typeof node !== "object") return; + + const keys = Object.keys(node).filter((key) => key !== "options" && key !== "codes"); + + // Check if it's a leaf node (all remaining keys' values are strings) + const isLeafNode = keys.every((key) => typeof node[key] === "string"); + + if (isLeafNode && node.code) { + codes.add(node.code); + } else { + // Traverse every other key except options and codes + keys.forEach((key) => { + if (typeof node[key] === "object") { + traverse(node[key]); + } + }); + } + } + + traverse(tree); + + return Array.from(codes); +} function buildTree(data, hierarchy) { const tree = { options: [] }; @@ -12,7 +52,7 @@ function buildTree(data, hierarchy) { let currentLevel = tree; - hierarchy.forEach(({level}, index) => { + hierarchy.forEach(({ level }, index) => { const value = item[level]; if (!currentLevel[value]) { @@ -39,29 +79,28 @@ function buildTree(data, hierarchy) { return tree; } -const SearchUserForm = () => { +const SearchUserForm = ({ uniqueTenants, setUniqueTenants, roles, setUniqueRoles }) => { const { t } = useTranslation(); + const [showToast, setShowToast] = useState(null); const [hierarchy, setHierarchy] = useState([ - { "level": "zoneCode", "value": 1,"optionsKey":"zoneName" }, - { "level": "circleCode", "value": 2,"optionsKey":"circleName" }, - { "level": "divisionCode", "value": 3,"optionsKey":"divisionName" }, - { "level": "subDivisionCode", "value": 4,"optionsKey":"subDivisionName" }, - { "level": "sectionCode", "value": 5,"optionsKey":"sectionName" }, + { level: "zoneCode", value: 1, optionsKey: "zoneName", isMandatory: true }, + { level: "circleCode", value: 2, optionsKey: "circleName", isMandatory: true }, + { level: "divisionCode", value: 3, optionsKey: "divisionName", isMandatory: true }, + { level: "subDivisionCode", value: 4, optionsKey: "subDivisionName", isMandatory: false }, + { level: "sectionCode", value: 5, optionsKey: "sectionName", isMandatory: false }, // { "level": "schemeCode", "value": 6,"optionsKey":"schemeName" }, - { "level": "code", "value": 7,"optionsKey":"name" } -] -); - + { level: "code", value: 7, optionsKey: "name", isMandatory: false }, + ]); const [tree, setTree] = useState(null); - const [zones,setZones] = useState([]) - const [circles,setCircles] = useState([]) - const [divisions,setDivisions] = useState([]) - const [subDivisions,setSubDivisions] = useState([]) - const [sections,setSections] = useState([]) - const [schemes,setSchemes] = useState([]) - const [codes,setCodes] = useState([]) - - console.log("tree", tree); + const [rolesOptions,setRolesOptions] = useState(null) + // const [zones,setZones] = useState([]) + // const [circles,setCircles] = useState([]) + // const [divisions,setDivisions] = useState([]) + // const [subDivisions,setSubDivisions] = useState([]) + // const [sections,setSections] = useState([]) + // const [schemes,setSchemes] = useState([]) + // const [codes,setCodes] = useState([]) + const requestCriteria = { url: "/mdms-v2/v1/_search", params: { tenantId: Digit.ULBService.getStateId() }, @@ -77,14 +116,40 @@ const SearchUserForm = () => { }, ], }, + { + moduleName: "ACCESSCONTROL-ROLES", + masterDetails: [ + { + name: "roles", + }, + ], + } ], }, }, config: { cacheTime: Infinity, select: (data) => { - const result = data?.MdmsRes?.tenant?.tenants - const resultInTree = buildTree(result, hierarchy); + const requiredKeys = [ + "code", + "name", + "zoneCode", + "zoneName", + "circleCode", + "circleName", + "divisionCode", + "divisionName", + "subDivisionCode", + "subDivisionName", + "sectionCode", + "sectionName", + "schemeCode", + "schemeName", + ]; + const result = data?.MdmsRes?.tenant?.tenants; + const filteredResult = filterKeys(result, requiredKeys); + const resultInTree = buildTree(filteredResult, hierarchy); + setRolesOptions(data?.MdmsRes?.["ACCESSCONTROL-ROLES"]?.roles) setTree(resultInTree); return result; }, @@ -108,14 +173,31 @@ const SearchUserForm = () => { clearErrors, unregister, } = useForm({ - defaultValues: {}, + defaultValues: { + "zoneCode": "", + "circleCode": "", + "divisionCode": "", + "subDivisionCode": "", + "sectionCode": "", + "code": "", + "roles": [] + }, }); const formData = watch(); - console.log("formData from watch",formData); const clearSearch = () => { - reset({}); + reset({ + "zoneCode": "", + "circleCode": "", + "divisionCode": "", + "subDivisionCode": "", + "sectionCode": "", + "code": "", + "roles": [] + }); + setUniqueRoles(null); + setUniqueTenants(null); // dispatch({ // type: uiConfig?.type === "filter"?"clearFilterForm" :"clearSearchForm", @@ -131,33 +213,73 @@ const SearchUserForm = () => { }; const onSubmit = (data) => { - console.log("formData", data); - }; + //assuming atleast one hierarchy is entered - // const optionsForHierarchy = (hierarchy) =>{ - // // this gets called whenever formData changes - // // Here we need to add logic to return options for one dropdown and return [] for all the childs - // //zoneCode -> circleCode -> divisionCode -> subDivisionCode -> sectionCode -> schemeCode -> code - // // console.log(hierarchy); - // const data = getValues("zoneCode") - // return tree.options - // debugger - // if(data){ - // return tree?.[data?.zoneCode]?.options - // } + if (Object.keys(data).length === 0 || Object.values(data).every((value) => !value)) { + //toast message + setShowToast({ warning: true, label: t("ES_COMMON_MIN_SEARCH_CRITERIA_MSG") }); + setTimeout(closeToast, 5000); + return; + } + //other validations if any + //check mandatory fields + let areMandatoryFieldsNotFilled = false; + hierarchy.forEach(({ level, isMandatory }) => { + if (isMandatory && (!data[level] || data[level]?.length === 0)) { + areMandatoryFieldsNotFilled = true; + return; // Exit the loop early + } + }); - // return null - // } + if (areMandatoryFieldsNotFilled) { + setShowToast({ warning: true, label: t("ES_COMMON_MIN_SEARCH_CRITERIA_MSG") }); + setTimeout(closeToast, 5000); + return; + } + + //checking roles + if(data?.roles?.length === 0 || !data?.roles){ + setShowToast({ warning: true, label: t("ES_COMMON_MIN_SEARCH_CRITERIA_MSG") }); + setTimeout(closeToast, 5000); + return; + } + + //here apply a logic to compute the subtree based on the hierarchy selected + const levels = hierarchy.map(({ level }) => level); + //compute current level + let maxSelectedLevel = levels[0]; + levels.forEach((level) => { + if (formData[level]) { + maxSelectedLevel = level; + } else { + return; + } + }); + + const levelIndex = levels.indexOf(maxSelectedLevel); + + let currentLevel = tree; + for (let i = 0; i <= levelIndex; i++) { + const code = data?.[levels[i]]?.[levels[i]]; + if (!code || !currentLevel[code]) return []; + currentLevel = currentLevel[code]; + } + + //this is the list of tenants under the current subtree + const listOfUniqueTenants = getUniqueLeafCodes(currentLevel); + setUniqueTenants(() => listOfUniqueTenants); + setUniqueRoles(() => data?.roles?.map(role=> role.code)); + }; const optionsForHierarchy = (level, value) => { if (!tree) return []; - - const levels = hierarchy.map(({level}) => level) + + const levels = hierarchy.map(({ level }) => level); const levelIndex = levels.indexOf(level); //zoneCode(1st level(highest parent)) - if (levelIndex === -1 || levelIndex=== 0) return tree.options; - + if (levelIndex === -1 || levelIndex === 0) return tree.options; + let currentLevel = tree; for (let i = 0; i < levelIndex; i++) { const code = formData[levels[i]]?.[levels[i]]; @@ -167,40 +289,48 @@ const SearchUserForm = () => { return currentLevel.options || []; }; - const renderFields = useMemo(() => { return hierarchy.map(({level,optionsKey,...rest},idx) => ( - - {t(Digit.Utils.locale.getTransformedLocale(`HR_SU_${level}`))} - ( - { - props.onChange(e) - //clear all child levels - const childLevels = hierarchy.slice(hierarchy.findIndex(h => h.level === level) + 1); - childLevels.forEach(child => setValue(child.level, "")); - }} - selected={props.value} - defaultValue={props.value} - t={t} - optionCardStyles={{ - top: "2.3rem", - overflow: "auto", - maxHeight: "200px", - }} - /> - )} - rules={{}} - defaultValue={""} - name={level} - control={control} - /> - - ))}, [formData]) + const closeToast = () => { + setShowToast(null); + }; + + const renderHierarchyFields = useMemo(() => { + return hierarchy.map(({ level, optionsKey, isMandatory, ...rest }, idx) => ( + + {`${t(Digit.Utils.locale.getTransformedLocale(`HR_SU_${level}`))} ${ + isMandatory ? "*" : "" + }`} + ( + { + props.onChange(e); + //clear all child levels + const childLevels = hierarchy.slice(hierarchy.findIndex((h) => h.level === level) + 1); + childLevels.forEach((child) => setValue(child.level, "")); + }} + selected={props.value} + defaultValue={props.value} + t={t} + optionCardStyles={{ + top: "2.3rem", + overflow: "auto", + maxHeight: "200px", + }} + /> + )} + rules={{}} + defaultValue={""} + name={level} + control={control} + /> + + )); + }, [formData]); if (isLoading || !setTree) { return ; @@ -212,18 +342,70 @@ const SearchUserForm = () => {

{t("HR_SU_HINT")}

- {renderFields} + {renderHierarchyFields} + + {`${t(Digit.Utils.locale.getTransformedLocale(`HR_SU_ROLES`))} ${"*"}`} + { + return ( +
+ { + props.onChange( + e + ?.map((row) => { + return row?.[1] ? row[1] : null; + }) + .filter((e) => e) + ) + }} + selected={props?.value || []} + defaultLabel={t("HR_SU_SELECT_ROLES")} + defaultUnit={ t("COMMON_ROLES_SELECTED")} + showSelectAll={true} + t={t} + // config={config} + // disable={false} + // optionsDisable={config?.optionsDisable} + /> +
+ ) + }} + rules={{}} + defaultValue={[]} + name={"roles"} + control={control} + /> +
- { - clearSearch() - }}> - {t("CLEAR_SEARCH")} + { + clearSearch(); + }} + > + {t("HR_SU_CLEAR_SEARCH")} - +
+ {showToast && ( + { + closeToast(); + }} + isDleteBtn={true} + /> + )} ); }; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/SearchUserResults.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/SearchUserResults.js index 9669dcd03..c144f04b6 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/SearchUserResults.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/SearchUserResults.js @@ -1,9 +1,114 @@ import React from 'react' +import { useTranslation } from "react-i18next"; +import { Table,Loader,Card } from "@egovernments/digit-ui-react-components"; +import { Link } from "react-router-dom"; -const SearchUserResults = () => { - return ( -
SearchUserResults
- ) +const SearchUserResults = ({isLoading,data,...props}) => { + const { t } = useTranslation(); + const GetCell = (value) => {t(value)}; + const GetSlaCell = (value) => { + return value == "INACTIVE" ? ( + {t(value) || ""} + ) : ( + {t(value) || ""} + ); + }; + + const columns = React.useMemo(() => { + return [ + { + Header: t("HR_EMP_ID_LABEL"), + disableSortBy: false, + accessor: "code", + Cell: ({ row }) => { + return ( + + {row.original.code} + + // GetCell(`${row.original?.code}`) + ); + }, + }, + { + Header: t("HR_EMP_NAME_LABEL"), + disableSortBy: false, + accessor: "name", + Cell: ({ row }) => { + return GetCell(`${row.original?.user?.name}`); + }, + }, + { + Header: t("HR_USER_ID_LABEL"), + disableSortBy: false, + accessor: "mobileNumber", + Cell: ({ row }) => { + return GetCell(`${row.original?.user?.mobileNumber}`); + }, + }, + { + Header: t("HR_STATUS_LABEL"), + disableSortBy: false, + accessor: "isActive", + Cell: ({ row }) => { + return GetSlaCell(`${row.original?.isActive ? "ACTIVE" : "INACTIVE"}`); + }, + }, + ]; + }, [data]); + + let result; + + if (isLoading) { + result = ; + } else if (data?.length === 0) { + result = ( + + {/* TODO Change localization key */} + {t("COMMON_TABLE_NO_RECORD_FOUND") + .split("\\n") + .map((text, index) => ( +

+ {text} +

+ ))} +
+ ); + } else if (data?.length > 0) { + result = ( + { + return { + style: { + maxWidth: cellInfo.column.Header == t("HR_EMP_ID_LABEL") ? "150px" : "", + padding: "20px 18px", + fontSize: "16px", + minWidth: "150px", + }, + }; + }} + // onNextPage={onNextPage} + // onPrevPage={onPrevPage} + // currentPage={currentPage} + totalRecords={data ? data.length : 0} + // onPageSizeChange={onPageSizeChange} + // pageSizeLimit={pageSizeLimit} + // onSort={onSort} + // sortParams={sortParams} + // disableSort={disableSort} + autoSort={true} + manualPagination={false} + /> + ); + } + + return ( +
+ {result} +
+ ) } export default SearchUserResults \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/SearchUser.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/SearchUser.js index 25ef9a1ce..ead17dcfd 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/SearchUser.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/SearchUser.js @@ -1,17 +1,46 @@ -import React from 'react' +import React,{useState,useEffect} from 'react' import SearchUserForm from '../components/SearchUserForm' +import SearchUserResults from '../components/SearchUserResults'; import { Header } from '@egovernments/digit-ui-react-components' import { useTranslation } from "react-i18next"; const SearchUser = () => { const {t} = useTranslation() + const [uniqueTenants,setUniqueTenants] = useState(null) + const [roles,setUniqueRoles] = useState(null) + + const requestCriteriaForEmployeeSearch = { + url: "/egov-hrms/employees/_searchListOfEmployee", + params: {}, + body: { + criteria:{ + tenantIds:uniqueTenants, + roles:roles, + type:"EMPLOYEE" + } + }, + config: { + enabled: !!uniqueTenants && !!roles, + select: (data) => { + return data?.Employees + }, + + }, + changeQueryName:{uniqueTenants,roles} + }; + + const { isLoading, data, revalidate, isFetching, error } = Digit.Hooks.useCustomAPIHook(requestCriteriaForEmployeeSearch); + return (
{t("HR_SU")}
- + +
+
+
) From a1343633baad0eea34774a3d378a3ebebcdc2fe8 Mon Sep 17 00:00:00 2001 From: Nipun Arora Date: Thu, 4 Jul 2024 17:52:19 +0530 Subject: [PATCH 101/118] updates to Open View screen in payment --- .../micro-ui/web/micro-ui-internals/example/devpackage.json | 2 +- frontend/micro-ui/web/micro-ui-internals/example/package.json | 2 +- .../micro-ui-internals/packages/modules/payment/package.json | 2 +- .../packages/modules/payment/src/components/OpenView.js | 2 +- frontend/micro-ui/web/package.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/example/devpackage.json b/frontend/micro-ui/web/micro-ui-internals/example/devpackage.json index 9a8ba7b26..e5e4c1445 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/devpackage.json +++ b/frontend/micro-ui/web/micro-ui-internals/example/devpackage.json @@ -12,7 +12,7 @@ "@egovernments/digit-ui-libraries":"^1.4.0", "@egovernments/digit-ui-module-common":"^1.4.0", "@egovernments/digit-ui-module-engagement":"^1.4.0", - "@egovernments/digit-ui-module-payment":"0.0.12", + "@egovernments/digit-ui-module-payment":"0.0.13", "@egovernments/digit-ui-module-fsm":"^1.4.0", "@egovernments/digit-ui-module-mcollect":"^1.4.0", "@egovernments/digit-ui-module-noc":"^1.4.0", diff --git a/frontend/micro-ui/web/micro-ui-internals/example/package.json b/frontend/micro-ui/web/micro-ui-internals/example/package.json index 0e61c101e..e08365947 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/package.json +++ b/frontend/micro-ui/web/micro-ui-internals/example/package.json @@ -14,7 +14,7 @@ "@egovernments/digit-ui-module-core": "1.5.46", "@egovernments/digit-ui-module-hrms": "1.5.27", "@egovernments/digit-ui-module-pgr": "1.7.0", - "@egovernments/digit-ui-module-payment":"0.0.12", + "@egovernments/digit-ui-module-payment":"0.0.13", "@egovernments/digit-ui-module-engagement": "1.5.20", "@egovernments/digit-ui-react-components": "1.5.26", "http-proxy-middleware": "^1.0.5", diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json index e84456ddb..b8ad342cb 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-payment", - "version": "0.0.12", + "version": "0.0.13", "description": "Open Payments", "main": "dist/index.js", "module": "dist/index.modern.js", diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js index 528f8268e..ff0852360 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js @@ -38,7 +38,7 @@ const OpenView = () => { const requestCriteriaForConnectionSearch = { url: "/ws-services/wc/_search?", - params: { ...queryParams, textSearch: queryParams.consumerCode }, + params: { tenantId:queryParams.tenantId,businessService:queryParams.businessService, connectionNumber: queryParams.consumerCode,isOpenPaymentSearch:true }, body: {}, options: { userService: false, diff --git a/frontend/micro-ui/web/package.json b/frontend/micro-ui/web/package.json index ea954976a..a9ba64e8f 100644 --- a/frontend/micro-ui/web/package.json +++ b/frontend/micro-ui/web/package.json @@ -22,7 +22,7 @@ "@egovernments/digit-ui-module-hrms": "1.5.27", "@egovernments/digit-ui-module-pgr": "1.7.0", "@egovernments/digit-ui-module-engagement": "1.5.20", - "@egovernments/digit-ui-module-payment":"0.0.12", + "@egovernments/digit-ui-module-payment":"0.0.13", "@egovernments/digit-ui-react-components": "1.5.26", "babel-loader": "8.1.0", "clean-webpack-plugin": "4.0.0", From 161ffc6353639252fd7dbd0feea190607b307f25 Mon Sep 17 00:00:00 2001 From: Nipun Arora Date: Fri, 5 Jul 2024 14:20:13 +0530 Subject: [PATCH 102/118] updated filtered roles --- .../hrms/src/components/SearchUserForm.js | 35 +++++++++++++++++-- .../hrms/src/components/SearchUserResults.js | 8 +++++ 2 files changed, 40 insertions(+), 3 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/SearchUserForm.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/SearchUserForm.js index fa8e590c4..71d3ce537 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/SearchUserForm.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/SearchUserForm.js @@ -149,7 +149,36 @@ const SearchUserForm = ({ uniqueTenants, setUniqueTenants, roles, setUniqueRoles const result = data?.MdmsRes?.tenant?.tenants; const filteredResult = filterKeys(result, requiredKeys); const resultInTree = buildTree(filteredResult, hierarchy); - setRolesOptions(data?.MdmsRes?.["ACCESSCONTROL-ROLES"]?.roles) + // setRolesOptions(data?.MdmsRes?.["ACCESSCONTROL-ROLES"]?.roles) + //updating to state roles as requested + setRolesOptions([ + // { + // code: "", + // name: "Select All", + // description: "", + // }, + { + code: "EMPLOYEE", + name: "EMPLOYEE", + labelKey: "ACCESSCONTROL_ROLES_ROLES_EMPLOYEE", + }, + { + code: "DIV_ADMIN", + name: "DIVISION ADMIN", + labelKey: "ACCESSCONTROL_ROLES_ROLES_DIV_ADMIN", + }, + { + code: "HRMS_ADMIN", + name: "HRMS_ADMIN", + labelKey: "ACCESSCONTROL_ROLES_ROLES_HRMS_ADMIN", + }, + { + code: "MDMS_ADMIN", + name: "MDMS Admin", + description: "Mdms admin", + }, + + ]) setTree(resultInTree); return result; }, @@ -268,7 +297,7 @@ const SearchUserForm = ({ uniqueTenants, setUniqueTenants, roles, setUniqueRoles //this is the list of tenants under the current subtree const listOfUniqueTenants = getUniqueLeafCodes(currentLevel); setUniqueTenants(() => listOfUniqueTenants); - setUniqueRoles(() => data?.roles?.map(role=> role.code)); + setUniqueRoles(() => data?.roles?.filter(row=>row.code)?.map(role=> role.code)); }; const optionsForHierarchy = (level, value) => { @@ -366,7 +395,7 @@ const SearchUserForm = ({ uniqueTenants, setUniqueTenants, roles, setUniqueRoles selected={props?.value || []} defaultLabel={t("HR_SU_SELECT_ROLES")} defaultUnit={ t("COMMON_ROLES_SELECTED")} - showSelectAll={true} + // showSelectAll={true} t={t} // config={config} // disable={false} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/SearchUserResults.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/SearchUserResults.js index c144f04b6..0d9529dd0 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/SearchUserResults.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/SearchUserResults.js @@ -53,6 +53,14 @@ const SearchUserResults = ({isLoading,data,...props}) => { return GetSlaCell(`${row.original?.isActive ? "ACTIVE" : "INACTIVE"}`); }, }, + { + Header: t("HR_SU_TENANT"), + disableSortBy: false, + accessor: "tenantId", + Cell: ({ row }) => { + return GetCell(`${row.original?.tenantId}`); + }, + }, ]; }, [data]); From 5b1ef8ff6040114f7030d605c16407acd66b895e Mon Sep 17 00:00:00 2001 From: Nipun Arora Date: Fri, 5 Jul 2024 14:46:09 +0530 Subject: [PATCH 103/118] updated css module --- .../micro-ui/web/micro-ui-internals/example/public/index.html | 2 +- .../micro-ui/web/micro-ui-internals/packages/css/package.json | 2 +- .../packages/css/src/pages/employee/login.scss | 2 +- frontend/micro-ui/web/package.json | 2 +- frontend/micro-ui/web/public/index.html | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/example/public/index.html b/frontend/micro-ui/web/micro-ui-internals/example/public/index.html index d34726016..76b10cb74 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/public/index.html +++ b/frontend/micro-ui/web/micro-ui-internals/example/public/index.html @@ -13,7 +13,7 @@ - + diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/package.json b/frontend/micro-ui/web/micro-ui-internals/packages/css/package.json index 1300c00c9..8de91d0cf 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/package.json +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-css", - "version": "1.5.52", + "version": "1.5.53", "license": "MIT", "main": "dist/index.css", "author": "Jagankumar ", diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/login.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/login.scss index 39d90610d..1ad97f693 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/login.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/login.scss @@ -259,7 +259,7 @@ } .field .field-container .text-input input { - margin-bottom: 5px !important; + margin-bottom: 24px !important; } .bannerHeader { diff --git a/frontend/micro-ui/web/package.json b/frontend/micro-ui/web/package.json index a9ba64e8f..2f8a078b0 100644 --- a/frontend/micro-ui/web/package.json +++ b/frontend/micro-ui/web/package.json @@ -18,7 +18,7 @@ "@egovernments/digit-ui-libraries": "1.5.7", "@egovernments/digit-ui-module-dss": "1.5.34", "@egovernments/digit-ui-module-core": "1.5.46", - "@egovernments/digit-ui-css": "1.5.52", + "@egovernments/digit-ui-css": "1.5.53", "@egovernments/digit-ui-module-hrms": "1.5.27", "@egovernments/digit-ui-module-pgr": "1.7.0", "@egovernments/digit-ui-module-engagement": "1.5.20", diff --git a/frontend/micro-ui/web/public/index.html b/frontend/micro-ui/web/public/index.html index fb0077fd1..9ed7c0982 100644 --- a/frontend/micro-ui/web/public/index.html +++ b/frontend/micro-ui/web/public/index.html @@ -10,7 +10,7 @@ - + From c1f912c280ef943cbaf80a7c76eea3039fe0d5ec Mon Sep 17 00:00:00 2001 From: Nipun Arora Date: Fri, 5 Jul 2024 15:02:30 +0530 Subject: [PATCH 104/118] Update SearchUserForm.js --- .../hrms/src/components/SearchUserForm.js | 61 ++++++++++--------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/SearchUserForm.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/SearchUserForm.js index 71d3ce537..9e1a3a999 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/SearchUserForm.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/SearchUserForm.js @@ -117,10 +117,10 @@ const SearchUserForm = ({ uniqueTenants, setUniqueTenants, roles, setUniqueRoles ], }, { - moduleName: "ACCESSCONTROL-ROLES", + moduleName: "ws-services-masters", masterDetails: [ { - name: "roles", + name: "WSServiceRoles", }, ], } @@ -149,36 +149,37 @@ const SearchUserForm = ({ uniqueTenants, setUniqueTenants, roles, setUniqueRoles const result = data?.MdmsRes?.tenant?.tenants; const filteredResult = filterKeys(result, requiredKeys); const resultInTree = buildTree(filteredResult, hierarchy); - // setRolesOptions(data?.MdmsRes?.["ACCESSCONTROL-ROLES"]?.roles) + const excludeCodes = ["HRMS_ADMIN", "LOC_ADMIN", "MDMS_ADMIN", "EMPLOYEE", "SYSTEM"]; + setRolesOptions(data?.MdmsRes?.["ws-services-masters"]?.["WSServiceRoles"]?.filter(row => !excludeCodes.includes(row?.code))) //updating to state roles as requested - setRolesOptions([ - // { - // code: "", - // name: "Select All", - // description: "", - // }, - { - code: "EMPLOYEE", - name: "EMPLOYEE", - labelKey: "ACCESSCONTROL_ROLES_ROLES_EMPLOYEE", - }, - { - code: "DIV_ADMIN", - name: "DIVISION ADMIN", - labelKey: "ACCESSCONTROL_ROLES_ROLES_DIV_ADMIN", - }, - { - code: "HRMS_ADMIN", - name: "HRMS_ADMIN", - labelKey: "ACCESSCONTROL_ROLES_ROLES_HRMS_ADMIN", - }, - { - code: "MDMS_ADMIN", - name: "MDMS Admin", - description: "Mdms admin", - }, + // setRolesOptions([ + // // { + // // code: "", + // // name: "Select All", + // // description: "", + // // }, + // { + // code: "EMPLOYEE", + // name: "EMPLOYEE", + // labelKey: "ACCESSCONTROL_ROLES_ROLES_EMPLOYEE", + // }, + // { + // code: "DIV_ADMIN", + // name: "DIVISION ADMIN", + // labelKey: "ACCESSCONTROL_ROLES_ROLES_DIV_ADMIN", + // }, + // { + // code: "HRMS_ADMIN", + // name: "HRMS_ADMIN", + // labelKey: "ACCESSCONTROL_ROLES_ROLES_HRMS_ADMIN", + // }, + // { + // code: "MDMS_ADMIN", + // name: "MDMS Admin", + // description: "Mdms admin", + // }, - ]) + // ]) setTree(resultInTree); return result; }, From 13f7fccab9d16ae92e58f477b60889305d494736 Mon Sep 17 00:00:00 2001 From: Nipun Arora Date: Fri, 5 Jul 2024 15:22:41 +0530 Subject: [PATCH 105/118] updated query params --- .../micro-ui/web/micro-ui-internals/example/devpackage.json | 2 +- frontend/micro-ui/web/micro-ui-internals/example/package.json | 2 +- .../micro-ui-internals/packages/modules/payment/package.json | 2 +- .../packages/modules/payment/src/components/OpenView.js | 2 +- frontend/micro-ui/web/package.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/example/devpackage.json b/frontend/micro-ui/web/micro-ui-internals/example/devpackage.json index e5e4c1445..5a963764d 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/devpackage.json +++ b/frontend/micro-ui/web/micro-ui-internals/example/devpackage.json @@ -12,7 +12,7 @@ "@egovernments/digit-ui-libraries":"^1.4.0", "@egovernments/digit-ui-module-common":"^1.4.0", "@egovernments/digit-ui-module-engagement":"^1.4.0", - "@egovernments/digit-ui-module-payment":"0.0.13", + "@egovernments/digit-ui-module-payment":"0.0.14", "@egovernments/digit-ui-module-fsm":"^1.4.0", "@egovernments/digit-ui-module-mcollect":"^1.4.0", "@egovernments/digit-ui-module-noc":"^1.4.0", diff --git a/frontend/micro-ui/web/micro-ui-internals/example/package.json b/frontend/micro-ui/web/micro-ui-internals/example/package.json index e08365947..978def326 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/package.json +++ b/frontend/micro-ui/web/micro-ui-internals/example/package.json @@ -14,7 +14,7 @@ "@egovernments/digit-ui-module-core": "1.5.46", "@egovernments/digit-ui-module-hrms": "1.5.27", "@egovernments/digit-ui-module-pgr": "1.7.0", - "@egovernments/digit-ui-module-payment":"0.0.13", + "@egovernments/digit-ui-module-payment":"0.0.14", "@egovernments/digit-ui-module-engagement": "1.5.20", "@egovernments/digit-ui-react-components": "1.5.26", "http-proxy-middleware": "^1.0.5", diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json index b8ad342cb..ad8cf2900 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-payment", - "version": "0.0.13", + "version": "0.0.14", "description": "Open Payments", "main": "dist/index.js", "module": "dist/index.modern.js", diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js index ff0852360..baafe512d 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/payment/src/components/OpenView.js @@ -57,7 +57,7 @@ const OpenView = () => { const requestCriteriaForPayments = { url: "/collection-services/payments/WS/_search", - params: queryParams, + params: {consumerCodes:queryParams.consumerCode,tenantId:queryParams.tenantId,businessService:queryParams.businessService}, body: {}, options: { userService: false, diff --git a/frontend/micro-ui/web/package.json b/frontend/micro-ui/web/package.json index a9ba64e8f..4e347449d 100644 --- a/frontend/micro-ui/web/package.json +++ b/frontend/micro-ui/web/package.json @@ -22,7 +22,7 @@ "@egovernments/digit-ui-module-hrms": "1.5.27", "@egovernments/digit-ui-module-pgr": "1.7.0", "@egovernments/digit-ui-module-engagement": "1.5.20", - "@egovernments/digit-ui-module-payment":"0.0.13", + "@egovernments/digit-ui-module-payment":"0.0.14", "@egovernments/digit-ui-react-components": "1.5.26", "babel-loader": "8.1.0", "clean-webpack-plugin": "4.0.0", From feb4d5cc7d6160b619f1925feefcd34aa4f22c3c Mon Sep 17 00:00:00 2001 From: Nipun Arora Date: Fri, 5 Jul 2024 15:28:02 +0530 Subject: [PATCH 106/118] reverted css that is getting used --- .../micro-ui/web/micro-ui-internals/example/public/index.html | 2 +- frontend/micro-ui/web/package.json | 2 +- frontend/micro-ui/web/public/index.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/example/public/index.html b/frontend/micro-ui/web/micro-ui-internals/example/public/index.html index 76b10cb74..d34726016 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/public/index.html +++ b/frontend/micro-ui/web/micro-ui-internals/example/public/index.html @@ -13,7 +13,7 @@ - + diff --git a/frontend/micro-ui/web/package.json b/frontend/micro-ui/web/package.json index 2f8a078b0..a9ba64e8f 100644 --- a/frontend/micro-ui/web/package.json +++ b/frontend/micro-ui/web/package.json @@ -18,7 +18,7 @@ "@egovernments/digit-ui-libraries": "1.5.7", "@egovernments/digit-ui-module-dss": "1.5.34", "@egovernments/digit-ui-module-core": "1.5.46", - "@egovernments/digit-ui-css": "1.5.53", + "@egovernments/digit-ui-css": "1.5.52", "@egovernments/digit-ui-module-hrms": "1.5.27", "@egovernments/digit-ui-module-pgr": "1.7.0", "@egovernments/digit-ui-module-engagement": "1.5.20", diff --git a/frontend/micro-ui/web/public/index.html b/frontend/micro-ui/web/public/index.html index 9ed7c0982..fb0077fd1 100644 --- a/frontend/micro-ui/web/public/index.html +++ b/frontend/micro-ui/web/public/index.html @@ -10,7 +10,7 @@ - + From df0aaad6f7a3829e831bdc82e3c5921e8d1458fb Mon Sep 17 00:00:00 2001 From: Nipun Arora Date: Fri, 5 Jul 2024 15:36:22 +0530 Subject: [PATCH 107/118] reverted css changes --- .../packages/css/CHANGELOG.md | 126 -- .../micro-ui-internals/packages/css/README.md | 29 +- .../packages/css/gulpfile.js | 18 +- .../packages/css/package.json | 55 +- .../packages/css/src/components/body.scss | 8 +- .../packages/css/src/components/buttons.scss | 53 +- .../packages/css/src/components/card.scss | 11 +- .../src/components/inboxv2/InboxLinks.scss | 6 - .../src/components/inboxv2/horizontalNav.scss | 5 - .../src/components/inboxv2/inboxSearch.scss | 188 ++- .../inboxv2/inboxSearchComposer.scss | 44 +- .../css/src/components/loaderWithGap.scss | 45 - .../css/src/components/metricsTable.scss | 1 - .../src/components/multiSelectDropdown.scss | 1 - .../packages/css/src/components/navbar.scss | 9 - .../packages/css/src/components/radiobtn.scss | 1 - .../css/src/components/selectdropdown.scss | 1 - .../packages/css/src/components/sidebar.scss | 141 --- .../packages/css/src/components/table.scss | 23 - .../css/src/components/textfields.scss | 12 + .../packages/css/src/components/topbar.scss | 4 - .../src/digitv2/components/ErrorMessage.scss | 6 - .../digitv2/components/FormComposerV2.scss | 126 -- .../src/digitv2/components/actionLinkV2.scss | 7 - .../src/digitv2/components/actionbarV2.scss | 110 -- .../digitv2/components/appContainerV2.scss | 55 - .../src/digitv2/components/backButtonV2.scss | 26 - .../css/src/digitv2/components/bannerV2.scss | 120 -- .../digitv2/components/bodyContainerV2.scss | 39 - .../src/digitv2/components/breadCrumbV2.scss | 31 - .../src/digitv2/components/breakLineV2.scss | 6 - .../css/src/digitv2/components/cardV2.scss | 385 ------ .../src/digitv2/components/checkboxV2.scss | 61 - .../src/digitv2/components/checkpointV2.scss | 71 -- .../components/collapseAndExpandGroups.scss | 60 - .../src/digitv2/components/dateWrapV2.scss | 12 - .../digitv2/components/displayPhotosV2.scss | 33 - .../css/src/digitv2/components/headerV2.scss | 6 - .../src/digitv2/components/infoBannerV2.scss | 37 - .../css/src/digitv2/components/keynoteV2.scss | 35 - .../css/src/digitv2/components/loaderV2.scss | 81 -- .../digitv2/components/mobileNumberV2.scss | 33 - .../components/multiSelectDropdownV2.scss | 92 -- .../digitv2/components/noresultsfoundV2.scss | 11 - .../src/digitv2/components/otpInputV2.scss | 15 - .../css/src/digitv2/components/popUpV2.scss | 24 - .../src/digitv2/components/radiobtnV2.scss | 51 - .../css/src/digitv2/components/ratingV2.scss | 33 - .../digitv2/components/selectdropdownV2.scss | 180 --- .../css/src/digitv2/components/tagV2.scss | 28 - .../src/digitv2/components/telephoneV2.scss | 18 - .../src/digitv2/components/textInputV2.scss | 123 -- .../src/digitv2/components/textareaV2.scss | 11 - .../src/digitv2/components/uploadFileV2.scss | 146 --- .../packages/css/src/digitv2/index.scss | 167 --- .../css/src/digitv2/pages/employee/index.scss | 1 - .../src/digitv2/pages/employee/workbench.scss | 1050 ----------------- .../packages/css/src/digitv2/typography.scss | 241 ---- .../packages/css/src/index.scss | 98 +- .../css/src/pages/employee/container.scss | 2 +- .../css/src/pages/employee/inbox.scss | 24 +- .../css/src/pages/employee/index.scss | 87 +- .../css/src/pages/employee/login.scss | 142 +-- .../css/src/pages/employee/scroll-table.scss | 5 - .../packages/css/tailwind.config.js | 132 +-- 65 files changed, 221 insertions(+), 4581 deletions(-) delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/CHANGELOG.md delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/loaderWithGap.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/sidebar.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/ErrorMessage.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/FormComposerV2.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/actionLinkV2.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/actionbarV2.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/appContainerV2.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/backButtonV2.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/bannerV2.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/bodyContainerV2.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/breadCrumbV2.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/breakLineV2.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/cardV2.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/checkboxV2.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/checkpointV2.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/collapseAndExpandGroups.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/dateWrapV2.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/displayPhotosV2.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/headerV2.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/infoBannerV2.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/keynoteV2.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/loaderV2.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/mobileNumberV2.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/multiSelectDropdownV2.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/noresultsfoundV2.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/otpInputV2.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/popUpV2.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/radiobtnV2.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/ratingV2.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/selectdropdownV2.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/tagV2.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/telephoneV2.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/textInputV2.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/textareaV2.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/uploadFileV2.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/index.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/pages/employee/index.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/pages/employee/workbench.scss delete mode 100644 frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/typography.scss diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/CHANGELOG.md b/frontend/micro-ui/web/micro-ui-internals/packages/css/CHANGELOG.md deleted file mode 100644 index 59a873d4b..000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/CHANGELOG.md +++ /dev/null @@ -1,126 +0,0 @@ -# Changelog - -## [1.8.2-beta.3] [06-06-2024] -- added audit history styles - -## [1.8.2-beta.2] -- Updated LogoutDialog Popup styles. - -## [1.8.2-beta.1] -- Formatted changelog file. - -## [1.8.1-beta.11] -- Updated styles for language selection dropdown options card. - -## [1.8.1-beta.10] -- Fixed login header alignment. - -## [1.8.1-beta.8] -- Used a new Primary constant color "#c84c0e". - - **Note:** Use this version with component 1.8.1-beta.15 and core 1.8.1-beta.12. - -## [1.8.1-beta.7] -- Added CSS for Loader With Gap. -- Added CSS for viewcomposer header. - -## [1.8.1-beta.5] -- Added CSS for Tab InboxSearchComposer. - -## [1.8.1-beta.2] -- Added CSS for create hierarchy. - -## [1.8.1-beta.1] -- Republished after merging with Master due to version issues. - -## [1.8.0-beta.20] -- Added CSS for info message in localisation screen. - -## [1.8.0-beta.19] -- Improved Bulk Upload and Bulk Upload Toast CSS. - -## [1.8.0-beta.18] -- Added bulk upload CSS. - -## [1.8.0-beta.17] -- Fixed mobile view issue for detail modals. - -## [1.8.0-beta.16] -- Added styles for detail modals. - -## [1.8.0-beta.15] -- Added styles for multi select dropdowns. - -## [1.8.0-beta.14] -- Added tour help styles. - -## [1.8.0-beta.13] -- Fixed the login text styling issue. - -## [1.8.0] -- Workbench v1.0. - -## [1.8.0-beta.1] -- Added styles for login dropdown and homepage dropdowns. - -## [1.8.0-beta] -- Added workbench related CSS and some new Digit v2 constants based on em. - -## [1.7.0] -- Urban 2.9. - -## [1.6.0] -- Urban 2.8. - -## [1.5.41] -- Added styles for login dropdown and homepage dropdowns. - -## [1.5.40] -- Fixed alignment issue in edit and logout. - -## [1.5.39] -- Updated login SCSS and fixed alignment issues. - -## [1.5.37] -- Updated the README content. - -## [1.5.36] -- Enhanced the formcomposer with header attribute. - -## [1.5.35] -- Fixed the card CSS issues. - -## [1.5.34] -- Fixed breadcrumb styling issue. - -## [1.5.33] -- Fixed some card-related CSS issues due to v2 CSS. - -## [1.5.32] -- Added newer CSS DIGITv2 and corrected a few existing issues. - -## [1.5.31] -- Corrected the CSS for inbox composers and default core UI. - -## [1.5.30] -- Updated the CSS for dynamic dropdown filter DSS. - -## [1.5.29] -- Fixed layout issues. - -## [1.5.28] -- Horizontal Bar chart alignment fixes. - -## [1.5.27] -- DSS UI alignment fixes for Horizontal Metric and bar chart. - -## [1.5.26] -- Added new CSS class for DSS enhancements. - -## [1.5.25] -- Added the CSS of inbox search composers. - -## [1.5.24] -- Added the README file. - -## [1.5.23] -- Base version. diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/README.md b/frontend/micro-ui/web/micro-ui-internals/packages/css/README.md index 5efb59f41..600bb6a68 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/README.md +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/README.md @@ -1,4 +1,4 @@ - + # digit-ui-css @@ -39,20 +39,23 @@ frontend/micro-ui/web/public/index.html ``` -## Changelog - -### Summary for Version [1.8.2-beta.1] - 2024-06-05 - -For a detailed changelog, see the [CHANGELOG.md](./CHANGELOG.md) file. - +# Changelog -## Contributors - -[jagankumar-egov] [nipunarora-eGov] [Tulika-eGov] [Ramkrishna-egov] [nabeelmd-eGov] [anil-egov] [vamshikrishnakole-wtt-egov] +```bash +1.5.31 Corrected the CSS for inbox composers and default core ui +1.5.30 Updated the css for dynamic drodown filter dss +1.5.29 layout issues fixed +1.5.28 Horizontal Bar chart alignment fixes +1.5.27 DSS UI alignment fixes for Horizontal Metric and bar chart +1.5.26 added new css class for dss enhancements +1.5.25 added the css of inbox search composers +1.5.24 added the readme file +1.5.23 base version +``` -### Published from DIGIT Frontend -DIGIT Frontend Repo (https://github.com/egovernments/Digit-Frontend/tree/develop) +## Published from DIGIT Core +Digit Dev Repo (https://github.com/egovernments/DIGIT-Dev/tree/digit-ui-core) ## License -MIT © [jagankumar-egov](https://github.com/jagankumar-egov) +MIT © [jagankumar-egov](https://github.com/jagankumar-egov) \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/gulpfile.js b/frontend/micro-ui/web/micro-ui-internals/packages/css/gulpfile.js index 5d1a70549..f76cae723 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/gulpfile.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/gulpfile.js @@ -1,22 +1,7 @@ -const fs = require("fs"); -const { name, version, author, cssConfig } = JSON.parse(fs.readFileSync("package.json")); - -const headerString = ` -@charset "UTF-8"; -/*! - * ${name} - ${version} - * - * Copyright (c) ${new Date().getFullYear()} ${author} - * - */ - `; const { series, src, dest, watch, task } = require("gulp"); -const header = require("postcss-header"); - const clean = require("gulp-clean"); const postcss = require("gulp-postcss"); -const sass = require('gulp-sass'); - +const sass = require("gulp-sass"); const postcssPresetEnv = require("postcss-preset-env"); const cleanCSS = require("gulp-clean-css"); const rename = require("gulp-rename"); @@ -38,7 +23,6 @@ function styles() { postcssPresetEnv({ stage: 2, autoprefixer: { cascade: false }, features: { "custom-properties": true } }), require("autoprefixer"), require("cssnano"), - header({ header: headerString }), ]; return src("src/index.scss").pipe(postcss(plugins)).pipe(sass()).pipe(dest(output)); } diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/package.json b/frontend/micro-ui/web/micro-ui-internals/packages/css/package.json index 8de91d0cf..ee5f0b475 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/package.json +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-css", - "version": "1.5.53", + "version": "1.5.52", "license": "MIT", "main": "dist/index.css", "author": "Jagankumar ", @@ -22,30 +22,30 @@ ], "style": "./dist/index.css", "dependencies": { - "node-sass": "4.14.1", - "normalize.css": "8.0.1", - "postcss-scss": "3.0.5", - "tailwindcss": "1.9.6" + "node-sass": "^4.14.1", + "normalize.css": "^8.0.1", + "postcss-scss": "^3.0.1", + "tailwindcss": "^1.8.10" }, - "devDependencies": { - "autoprefixer": "10.4.14", - "cssnano": "4.1.11", - "gh-pages": "3.2.3", - "gulp": "4.0.2", - "gulp-clean": "0.4.0", - "gulp-clean-css": "4.3.0", - "gulp-livereload": "4.0.2", - "gulp-postcss": "9.0.1", - "gulp-rename": "2.0.0", - "gulp-sass": "4.1.1", - "postcss": "8.4.26", - "postcss-cli": "8.3.1", - "postcss-header": "2.0.0", - "postcss-import": "12.0.1", - "postcss-prefixer": "2.1.3", - "postcss-preset-env": "6.7.1", - "postcss-scss": "3.0.5", - "sass": "^1.26.11" + "devDependencies": { + "autoprefixer": "^10.0.0", + "cssnano": "^4.1.10", + "gh-pages": "^3.1.0", + "gulp": "^4.0.2", + "gulp-clean": "^0.4.0", + "gulp-clean-css": "^4.3.0", + "gulp-livereload": "^4.0.2", + "gulp-postcss": "9.0.1", + "gulp-rename": "^2.0.0", + "gulp-sass": "^4.1.0", + "postcss": "^8.0.9", + "postcss-cli": "^8.0.0", + "postcss-header": "^2.0.0", + "postcss-import": "^12.0.1", + "postcss-prefixer": "^2.1.2", + "postcss-preset-env": "^6.7.0", + "postcss-scss": "^3.0.1", + "sass": "^1.26.11" }, "files": [ "dist/index.min.css", @@ -54,12 +54,5 @@ "img/**/*.png", "src/**/*.scss", "src/**/*.css" - ], - "keywords": [ - "digit", - "egov", - "dpg", - "digit-ui", - "css" ] } \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/body.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/body.scss index 8965c861f..e9df5ebdc 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/body.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/body.scss @@ -50,8 +50,14 @@ body { color: theme(colors.text.secondary); display: flex; margin-bottom: 10px; + padding: initial; list-style: none; - padding: 0; + .bread-crumb--item { + a { + text-decoration: inherit; + color: inherit; + } + } } .bread-crumb--item { margin-left: 5px; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/buttons.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/buttons.scss index 14312a250..97c1de02f 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/buttons.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/buttons.scss @@ -47,55 +47,4 @@ } .submit-bar:focus { @apply outline-none !important; -} - -.jk-digit-secondary-btn { - width: auto; - height: 40px; - background: theme(colors.white); - border: 1px solid theme(colors.primary.main); - padding: 12px; - color: theme(colors.primary.main); - display: flex; - align-items: center; - font-size: 19px; - cursor: pointer; - svg { - margin: 0 10px; - } -} -.jk-digit-primary-btn { - width: auto; - height: 40px; - background: theme(colors.primary.main); - border: 1px solid theme(colors.primary.main); - padding: 6px; - color: theme(colors.white); - display: flex; - align-items: center; - cursor: pointer; - font-size: 19px; - box-shadow: inset 0 -2px 0 #0b0c0c; - svg { - margin: 0 15px; - } -} - -.jk-digit-disabled-btn { - opacity: 0.5; - font-size: 19px; - cursor: not-allowed; -} - -.jk-header-btn-wrapper { - display: flex; - justify-content: space-between; -} - -/* for mobile view */ -@media (max-width: 780px) { - .jk-header-btn-wrapper { - flex-flow: column; - margin-bottom: 15px; - } -} +} \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/card.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/card.scss index 16d6c352c..a6f52f961 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/card.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/card.scss @@ -62,7 +62,7 @@ } .employeeCard { - @apply bg-white shadow-card p-md mb-xl; + @apply bg-white shadow-card mb-xl; border-radius: 4px; .card-header { @@ -135,7 +135,6 @@ } .header-content { - margin-top: 0.2rem; } .header-end { @@ -154,7 +153,7 @@ .submit-bar { @apply h-10 bg-primary-main text-center w-full outline-none; box-shadow: inset 0px -2px 0px theme(colors.text.primary); - cursor: pointer; + &:focus { @apply outline-none; } @@ -209,10 +208,8 @@ } .employeeCard { - /* TODO need to revisit that we need mx-md NABEEL/ANIL - @apply mb-md mx-md !important; - */ - @apply mb-md !important; + @apply mb-md mx-md !important; + &.filter { margin-left: auto; margin-right: auto; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/InboxLinks.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/InboxLinks.scss index 7549fe0b3..1930d2ca3 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/InboxLinks.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/InboxLinks.scss @@ -1,14 +1,10 @@ -@import url("../../digitv2/index.scss"); - .inbox-search-links-container { - @extend .light-paper-primary; height: 100%; width: 100% !important; display: flex; flex-direction: column; padding: 1rem; .header { - @extend .light-text-color-primary; display: grid; grid-template-columns: 20% 1fr; .logo { @@ -22,7 +18,6 @@ } } .text { - @extend .light-text-color-primary; line-height: 32px; font-weight: 700; color : black; @@ -49,7 +44,6 @@ display: flex; flex-direction: column; .link { - @extend .light-primary; padding: 8px; --text-opacity: 1; color: #f47738; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/horizontalNav.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/horizontalNav.scss index 13fd228d1..b97b7c827 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/horizontalNav.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/horizontalNav.scss @@ -1,8 +1,4 @@ -@import url("../../digitv2/index.scss"); - .horizontal-nav { - @extend .light-paper-primary; - @extend .light-text-color-primary; overflow: auto; display: flex; margin-top: 3rem; @@ -25,7 +21,6 @@ background: none; .icon { - @extend .light-background; display: block; color: rgb(117, 117, 117); fill: rgb(117, 117, 117); diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/inboxSearch.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/inboxSearch.scss index a24f8919f..22e8a9774 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/inboxSearch.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/inboxSearch.scss @@ -1,116 +1,104 @@ -@import url("../../digitv2/index.scss"); - .search-wrapper { - @extend .light-text-color-primary; - @extend .light-paper-primary; - height: 100%; - width: 100%; - padding: 1rem; + height: 100%; + width: 100%; + padding: 1rem; - .popup-label { - display: flex; - font-size: large; - @extend .light-text-color-primary; - .header { - @extend .light-text-color-primary; - width: 100%; - font-weight: normal; - font-size: large; - .icon { - @extend .light-primary; - margin-right: 12px; - margin-top: 5px; - } + .popup-label { + display: flex; + font-size: large; + .header{ + width: 100%; + font-weight: normal; + font-size: large; + .icon { + margin-right: 12px; + margin-top: 5px; + } + } } - } - .filter-header-wrapper { - @extend .light-text-color-primary; - display: grid; - grid-template-columns: 15% 1fr 15%; - height: 3rem; - margin-bottom: 1rem; - .icon-refresh { - display: flex; - align-items: center; - justify-content: center; - border: 1px solid #00000017; - cursor: pointer; - svg { - height: 60%; - width: 40%; - } - } - .label { - @extend .light-text-color-primary; - display: flex; - align-items: center; - justify-content: flex-start; - } + .filter-header-wrapper { + display: grid; + grid-template-columns: 15% 1fr 15%; + height: 3rem; + margin-bottom: 1rem; + .icon-refresh { + display: flex; + align-items: center; + justify-content: center; + border: 1px solid #00000017; + cursor: pointer; + svg { + height: 60%; + width: 40%; + } + } + .label { + display: flex; + align-items: center; + justify-content: flex-start; + } - @media (min-width: 1024px) { - .label { - font-size: 24px; - } - } + @media (min-width: 1024px) { + .label { + font-size:24px; + } + } - @media (max-width: 1024px) { - .label { - font-size: 16px; - } - } + @media (max-width: 1024px) { + .label { + font-size:16px; + } + } - .icon-filter { - display: flex; - align-items: center; - justify-content: flex-start; + .icon-filter { + display: flex; + align-items: center; + justify-content: flex-start; + } } - } - .search-field-wrapper { - display: grid; - row-gap: 0.25rem; - column-gap: 1rem; - &.inbox { - grid-template-columns: repeat(3, 1fr); - &.filter { - display: flex; - flex-direction: column; - } - } - &.search { - grid-template-columns: repeat(4, 1fr); - } - .text-input{ - @extend .light-primary; + .search-field-wrapper { + display: grid; + row-gap: 0.25rem; + column-gap: 1rem; + &.inbox { + grid-template-columns: repeat(3, 1fr); + &.filter { + display: flex; + flex-direction: column; + } + } + &.search { + grid-template-columns: repeat(4, 1fr); + } } - } - .search-button-wrapper { - display: flex; - align-items: center; - justify-content: flex-end; - gap: 1rem; - padding-top: 8px; - &.inbox { - grid-column: 2 / span 2; - &.filter { - button { - width: 100%; + .search-button-wrapper { + display: flex; + align-items: center; + justify-content: flex-end; + gap: 1rem; + padding-top: 8px; + &.inbox { + grid-column: 2 / span 2; + &.filter { + button { + width: 100%; + } + } + } + &.search { + grid-column: 3 / span 2; } - } - } - &.search { - grid-column: 3 / span 2; } - } } @screen sm { - .search-wrapper { - .search-field-wrapper { - display: flex; - flex-direction: column; - } - } -} + .search-wrapper { + .search-field-wrapper { + display: flex; + flex-direction : column; + } + } +} \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/inboxSearchComposer.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/inboxSearchComposer.scss index 7fb3189a2..93c815221 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/inboxSearchComposer.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/inboxSearchComposer.scss @@ -1,36 +1,15 @@ -@import url("../../digitv2/index.scss"); - .inbox-search-wrapper { - /* - TODO NABEEL/ANIL Removed these since it creates issues in search screen - @extend .light-background; - - */ height: 100%; .inbox-search-component-wrapper { - /* - TODO NABEEL/ANIL Removed these since it creates issues in search screen - @extend .light-background; - - */ height: 100%; + height: 100%; width: 100%; .sections-parent { - /* - TODO NABEEL/ANIL Removed these since it creates issues in search screen - @extend .light-background; - - */ height: 100%; + height: 100%; display: grid; grid-template-columns: 20% 1fr; gap : 1rem; &.inbox { - @extend .light-text-color-primary; .links{ - @extend .light-primary; - @extend .light-paper-primary; - .text{ - @extend .light-text-color-primary; - } .inbox-links-icon{ color:#f47738; fill:#f47738; @@ -52,18 +31,15 @@ } } .search-wrapper { - @extend .light-paper-primary; .search-field-wrapper.search.custom-both-clear-search{ .search-button-wrapper.search { grid-column: initial; } .search-button-wrapper{ .link-label{ - @extend .light-primary; white-space:initial; } .submit-bar { - @extend .light-primary-button; width: 60%; } } @@ -74,10 +50,8 @@ grid-template-columns: 100% } .section { - @extend .light-paper-primary; - @extend .light-text-color-primary; min-height: 10rem; - /* background-color: white; */ + background-color: white; display: flex; align-items: center; justify-content: center; @@ -95,17 +69,7 @@ } } &.filter { - @extend .light-paper-primary; - @extend .light-text-color-primary; - height: fit-content; - } - &.tab{ - display: block; - background-color: #eee; - box-shadow: none; - .search-wrapper{ - box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.16); - } + height: fit-content; } } } diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/loaderWithGap.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/loaderWithGap.scss deleted file mode 100644 index 91352b8ab..000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/loaderWithGap.scss +++ /dev/null @@ -1,45 +0,0 @@ -.loader-with-gap-container { - display: flex; - justify-content: center; - align-items: center; - height: 100%; - width: 100%; - display: flex; - flex-direction: column; - background-color: rgba(0, 0, 0, 0.7); - position: fixed; - top: 0; - left: 0; - z-index: 99999; - - .loader { - border: 0.5rem solid rgb(255, 255, 255); - border-top: 0.5rem solid rgba(80, 76, 76, 0); - border-radius: 50%; - width: 3.125rem; - height: 3.125rem; - animation: spin 2s linear infinite; - } - - .loader-inner { - border: 1px solid rgb(255, 255, 255); - border-radius: 50%; - width: 100%; - height: 100%; - } - - .loader-text { - color: whitesmoke; - padding-top: 1.25rem; - } -} - -@keyframes spin { - 0% { - transform: rotate(0deg); - } - - 100% { - transform: rotate(360deg); - } -} \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/metricsTable.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/metricsTable.scss index 786adc3c3..dcb16b096 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/metricsTable.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/metricsTable.scss @@ -24,5 +24,4 @@ display: flex; flex-wrap: wrap; margin-top: 15px; - justify-content: space-evenly; } \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/multiSelectDropdown.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/multiSelectDropdown.scss index f35e380b6..5848ee021 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/multiSelectDropdown.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/multiSelectDropdown.scss @@ -1,6 +1,5 @@ .multi-select-dropdown-wrap{ @apply relative text-form-field text-text-primary w-full; - max-width: 540px; .master, .master-active{ @apply relative border border-solid border-input-border h-10 w-full; input[type=text]{ diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/navbar.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/navbar.scss index 1074ce0a3..69cacbd35 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/navbar.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/navbar.scss @@ -68,7 +68,6 @@ .drawer-list { @apply pt-md; - margin-bottom: 2rem; position: relative; min-height: 1px; overflow: auto; @@ -125,7 +124,6 @@ cursor: pointer; display: flex; flex-direction: column; - .sidebar-link { display: flex; justify-content: space-between; @@ -233,11 +231,9 @@ } .submenu-container { - margin-left: 1.5rem; cursor: pointer; display: flex; flex-direction: column; - .sidebar-link { display: flex; justify-content: space-between; @@ -311,8 +307,3 @@ @apply mr-sm; } } - -.sidebar-list-footer { - position: fixed; - bottom: 0; -} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/radiobtn.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/radiobtn.scss index 1d6de0063..74b736237 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/radiobtn.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/radiobtn.scss @@ -1,6 +1,5 @@ .radio-wrap { @apply my-sm block leading-10 mb-lg; - max-width: 540px; div { @apply block mb-md; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/selectdropdown.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/selectdropdown.scss index 57ea39ae5..98ef8ec40 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/selectdropdown.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/selectdropdown.scss @@ -20,7 +20,6 @@ */ .employee-select-wrap { @apply mb-lg relative; - max-width: 540px; .select { @apply relative block w-full h-10 border border-solid border-input-border; diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/sidebar.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/sidebar.scss deleted file mode 100644 index 6a04adffd..000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/sidebar.scss +++ /dev/null @@ -1,141 +0,0 @@ -.sidebar-link:hover .arrow { - display: block; -} - -.hidden-arrow { - display: none; -} -.new-dropdown-link{ - display: flex; - align-items: center; - justify-content: space-between; - padding: 10px 15px 15px !important; - color: #fff; - font-size: 1rem; - font-weight: 500; - text-decoration: none; - margin-left: 0px !important; - height: 3rem !important; - margin-left: 1rem; - margin-top: 0.5rem; -} -.selected { - background-color: #e0e0e0; /* Change this to your desired highlight color */ -} - -.selected-item { - background-color: #e0e0e0; /* Set your desired background color for the selected item */ - color: #000; /* Set your desired text color for the selected item */ - /* Add any other styles you want to apply to the selected item */ -} -/* Style the container that acts as the viewport */ -.new-sidebar { - height: 90%; /* Set a fixed height for the viewport */ - overflow: scroll; /* Hide the scrollbar */ - - &::-webkit-scrollbar { - display: none; - } - - &::-webkit-scrollbar { - -ms-overflow-style: none; /* IE and Edge */ - scrollbar-width: none; /* Firefox */ - } -} - -/* Style the content inside the viewport */ -.new-sidebar > div { - height: auto; /* Allow content to expand vertically */ - overflow-y: auto; /* Enable vertical scrolling */ - overflow-x: hidden; - padding-right: 2px; /* Add space for the hidden scrollbar (adjust as needed) */ -} - -/* Style the scrollbar thumb to make it transparent */ -.new-sidebar > div::-webkit-scrollbar-thumb { - background: transparent; -} -.link-icon{ - width: 24px !important; - height: 26px !important; -} -.link-icon svg{ - width: 24px !important; - height: 26px !important; -} - -.employee-search-input{ - width: 150px; - background-color: transparent; - &.nav-bar { - color:#fff; - } - &.nav-bar::placeholder { - color: #fff; - } -} - -.search-icon-wrapper-new { - margin-left: 0.35rem; -} - -.search-icon-wrapper-new svg{ - fill: theme(colors.white) !important; - width: 21px; - height: 21px; -} -.search-icon-wrapper-new svg path { - fill: theme(colors.white) !important; - } - -.submenu-container { - overflow: scroll; - margin-bottom: 1rem; - /* Hide the scrollbar */ - &::-webkit-scrollbar { - display: none; - } - - &.level-2 { - border-left: 1px solid; - margin-left: 2rem; - } - &.level-1 { - margin-left: -1.5rem; - } -} - -.actions { - &.level-0 { - margin-left: 0.4rem; - } - &.selected-action-level-0 { - color: theme(colors.primary.main) !important; - } - &.selected-action-level-1 { - border-left:4px solid theme(colors.primary.main); - margin-left: -0.6rem; - height: 2rem; - color: theme(colors.primary.main) !important; - } - - &.default-0 { - &.active { - - } - } - &.default-1 { - margin-left: -0.6rem; - height: 2rem; - width: 111% !important; - } - - - &.custom { - margin-left: 0.3rem; - } - &:hover { - background-color: #6A8E9D; - opacity: 0.8; - } -} \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/table.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/table.scss index 379af9fa6..1b4dcf217 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/table.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/table.scss @@ -14,7 +14,6 @@ } } - tbody { border: none; padding: 0; @@ -95,28 +94,6 @@ } } } - -.table-fixed-last-column { - thead { - th:last-child { - position: sticky; - background: #fff; - right: 0; - left:0; - border-top-left-radius: 4px; - } - } - tbody { - td:last-child { - position: sticky; - background: #fff; - color: theme(colors.primary.main); - left: 0; - right:0; - } - } -} - .table-fixed-column-common-pay { thead { th:first-child { diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/textfields.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/textfields.scss index 715140131..233153613 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/textfields.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/textfields.scss @@ -9,6 +9,14 @@ .employee-card-input { @apply mb-lg pl-sm outline-none block border w-full h-10 border-input-border border-solid bg-white leading-10 text-form-field text-text-primary; } + +.employee-card-input-only { +} +.employee-card-input-only .employee-card-input { + @apply mb-lg pl-sm outline-none block border w-full h-12 border-input-border border-solid bg-white leading-10 text-form-field text-text-primary; +} + + .employee-card-input:disabled { @apply border-grey-dark text-grey-dark !important; pointer-events: none !important; @@ -82,6 +90,10 @@ } } +.citizen-card-input-only { + @apply mb-lg pl-sm outline-none block border w-full h-12 border-input-border border-solid bg-white leading-10 text-form-field text-text-primary; +} + .citizen-card-input { @apply mb-lg pl-sm outline-none block border w-full h-10 border-input-border border-solid bg-white leading-10 text-form-field text-text-primary; } diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/topbar.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/topbar.scss index 56bbd8426..614daa0e3 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/topbar.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/topbar.scss @@ -146,8 +146,4 @@ video::-webkit-media-controls-panel { top: 55%; position: absolute; width: 100%; -} - -.topbarOptionsClassName { - right: -3rem !important } \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/ErrorMessage.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/ErrorMessage.scss deleted file mode 100644 index 07117cc83..000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/ErrorMessage.scss +++ /dev/null @@ -1,6 +0,0 @@ -@import url("../index.scss"); - -.digit-error-message { - @extend .alert-error; - @apply block text-body-s mb-md; -} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/FormComposerV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/FormComposerV2.scss deleted file mode 100644 index c82f8666e..000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/FormComposerV2.scss +++ /dev/null @@ -1,126 +0,0 @@ -@import url("../index.scss"); - -.field-container { - display: flex; - align-items: center; - max-width: 540px; - @apply flex items-center; - - .component-in-front { - @apply flex justify-center items-center; - @extend .light-background; - @extend .light-input-border; - margin-top: 0; - border: 1px solid; - border-right: none; - padding: 7px; - } -} - -.card-date-input { - @apply absolute top-0 left-0 w-3/4 bg-white pl-sm border border-input-border border-solid border-r-0; - outline: transparent solid 1px; - height: 2.5rem; - @extend .light-input-border; -} -.text-input-width { - max-width: 540px; -} - -.text-input { - @apply relative w-full; - input { - background-color: transparent; - &:hover { - @apply border-2 border-solid border-primary-main; - @extend .light-input-border; - } - } -} -.employee-card-input-error { - @apply mb-lg pl-sm block w-full h-10 outline-none border-2 border-error border-solid bg-white leading-10 text-form-field text-text-primary; - @extend .light-input-border; - @extend .alert-error; -} -.card-input-error { - @apply mb-lg pl-sm block w-full h-10 outline-none border-2 border-error border-solid bg-white leading-10 text-form-field text-text-primary; - @extend .light-input-border; - @extend .alert-error; -} - -.employee-card-input { - @apply mb-lg pl-sm outline-none block border w-full h-10 border-input-border border-solid bg-white leading-10 text-form-field text-text-primary; - @extend .light-input-border; -} - -.employee-card-input { - max-width: 540px; -} - -.employee-card-input:disabled { - @apply border-grey-dark text-grey-dark !important; - pointer-events: none !important; - @extend .light-input-border; - @extend .light-text-color-disabled; -} -.employee-card-input--front { - width: fit-content !important; - display: flex; - align-items: center; - /* background: theme(colors.grey.mid); */ - @extend .light-background; - border-right: 0; - padding-right: 5px; -} -.employee-card-input-error { - @apply mb-lg pl-sm block w-full h-10 outline-none border-2 border-error border-solid bg-white leading-10 text-form-field text-text-primary; - @extend .light-input-border; - @extend .alert-error; -} - -.card-textarea, -.employee-card-textarea { - @apply block outline-none mt-md mb-lg border w-full border-input-border border-solid bg-white h-24 text-form-field text-text-primary p-sm; - @extend .light-input-border; -} -.employee-card-textarea { - @apply w-full; - max-width: 540px; -} - -.citizen-card-input { - @apply mb-lg pl-sm outline-none block border w-full h-10 border-input-border border-solid bg-white leading-10 text-form-field text-text-primary; - @extend .light-input-border; -} -.citizen-card-input--front { - @extend .light-background; - width: fit-content !important; - display: flex; - align-items: center; - /* background: theme(colors.grey.mid); */ - border-right: 0; - padding-right: 5px; -} - -.break-line { - @extend .light-input-border; - @apply border-border my-lg; -} - -.primary-label-btn { - @apply flex; - gap: 10px; - - svg { - fill: theme(colors.primary.main); - } - - @extend .light-primary; - cursor: pointer; - font-weight: 500; - width: fit-content; -} - -.digit-form-composer-header{ - font-size:theme(digitv2.fontSize.heading-l-dt); -} \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/actionLinkV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/actionLinkV2.scss deleted file mode 100644 index c41b0b25d..000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/actionLinkV2.scss +++ /dev/null @@ -1,7 +0,0 @@ -@import url("../index.scss"); - -.digit-action-links { - @extend .light-primary; - @apply text-text-btn mr-lg !important; - cursor: pointer; -} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/actionbarV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/actionbarV2.scss deleted file mode 100644 index e5a69acd3..000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/actionbarV2.scss +++ /dev/null @@ -1,110 +0,0 @@ -@import url("../index.scss"); - -.digit-action-bar-wrap { - @extend .light-text-color-primary; - @extend .light-paper-primary; - box-shadow: rgba(0, 0, 0, 0.16) 0 -2px 8px; - max-width: 100%; - z-index: 100; - - @apply left-0 bottom-0 w-full bg-white py-sm px-sm fixed text-right; - - div { - @apply w-full; - } - - .digit-menu-wrap { - @apply absolute bg-white text-left mb-xs z-30 cursor-pointer; - @extend .light-background; - bottom: 45px; - box-shadow: rgba(0, 0, 0, 0.14) 0 8px 10px 1px, rgba(0, 0, 0, 0.12) 0 3px 14px 2px, rgba(0, 0, 0, 0.2) 0 5px 5px -3px; - width: calc(100% - 16px); - right: 8px; - - div { - @apply h-12 pl-sm py-md text-body-l text-text-primary; - @extend .light-primary; - - &:hover { - @apply bg-grey-mid w-full; - @extend .light-background; - } - } - } -} - -@screen dt { - .digit-action-bar-wrap { - box-shadow: rgba(0, 0, 0, 0.16) 0 -2px 8px; - left: 0; - max-width: none; - z-index: 999; - - @apply fixed bottom-0 bg-white py-sm pr-lg text-right; - /* @extend .light-background; */ - - div { - width: calc(100% - 16px); - } - - .digit-menu-wrap { - bottom: 45px; - top: unset; - box-shadow: rgba(0, 0, 0, 0.14) 0 8px 10px 1px, rgba(0, 0, 0, 0.12) 0 3px 14px 2px, rgba(0, 0, 0, 0.2) 0 5px 5px -3px; - @apply absolute h-auto bg-white text-left mb-xs z-30; - width: 240px; - right: 24px; - - div { - @apply h-12 pl-sm py-md text-body-l text-text-primary; - - &:hover { - @apply bg-grey-mid w-full; - /* @extend .light-background; */ - } - } - } - } -} - -.digit-action-bar-wrap-registry { - div { - @apply w-full; - } - .digit-menu-wrap { - @apply absolute bg-white text-left mb-xs z-30 cursor-pointer; - box-shadow: rgba(0, 0, 0, 0.14) 0 8px 10px 1px, rgba(0, 0, 0, 0.12) 0 3px 14px 2px, rgba(0, 0, 0, 0.2) 0 5px 5px -3px; - width: 160px; - right: 60px; - @extend .light-background; - - div { - @apply h-12 pl-sm py-md text-body-l text-text-primary; - - &:hover { - @apply bg-grey-mid w-full; - @extend .light-background; - } - } - } - - .digit-search-add { - padding: 12px 16px; - @extend .light-primary; - color: rgb(244, 119, 56); - display: flex; - cursor: pointer; - } - - .digit-search-add-icon { - @extend .light-primary-button; - background: rgb(244, 119, 56); - border-radius: 50%; - height: 24px; - width: 24px; - display: flex; - justify-content: center; - align-items: center; - margin-left: 10px; - } -} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/appContainerV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/appContainerV2.scss deleted file mode 100644 index fda32e932..000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/appContainerV2.scss +++ /dev/null @@ -1,55 +0,0 @@ -@import url("../index.scss"); - -.app-container { - @extend .light-background; - width: 100%; - form { - .card { - max-width: 960px; - h2 { - @extend .light-text-color-primary; - text-align: left; - } - .field-container { - max-width: 540px; - } - button { - @extend .light-primary-button; - max-width: 240px; - } - .input-otp-wrap, - .card-text-button { - @extend .light-primary-button; - text-align: left; - } - } - } -} - -@screen dt { - .employee-app-container { - @apply w-full; - } - - .app-container { - width: 100%; - form { - .card { - max-width: 960px; - h2 { - text-align: left; - } - .field-container { - max-width: 540px; - } - button { - max-width: 240px; - } - .input-otp-wrap, - .card-text-button { - text-align: left; - } - } - } - } -} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/backButtonV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/backButtonV2.scss deleted file mode 100644 index 68f7cf957..000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/backButtonV2.scss +++ /dev/null @@ -1,26 +0,0 @@ -@import url("../index.scss"); - -.digit-back-button { - @extend .light-text-color-primary; - @extend .light-input-border; - width: fit-content; - @apply flex items-center cursor-pointer border-b font-rc text-text-btn ml-sm mb-md; - - img { - @apply flex; - } - - svg { - @apply flex; - } - - p { - @apply flex; - } -} - -@screen dt { - .digit-back-button { - margin-left: 0; - } -} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/bannerV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/bannerV2.scss deleted file mode 100644 index 06c16970a..000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/bannerV2.scss +++ /dev/null @@ -1,120 +0,0 @@ -@import url("../index.scss"); - -.digit-banner-success-wrap, -.digit-banner-emp-success-wrap { - @apply block bg-success w-full text-center text-white pt-md pb-sm mb-md; - - header { - @apply block mb-sm font-rc font-bold text-heading-xl; - } - - div { - img { - padding: 13.67px; - margin-left: auto; - margin-right: auto; - @apply border border-solid border-white rounded-full h-16 w-16 bg-white mb-md; - } - - svg { - padding: 13.67px; - margin-left: auto; - margin-right: auto; - @apply border border-solid border-white rounded-full h-16 w-16 bg-white mb-md; - } - - svg.payment-svg { - border: unset; - background-color: unset; - @apply rounded-full; - } - - h2 { - @apply font-bold text-caption-m mb-sm; - } - - p { - @apply font-bold text-caption-l; - } - } -} - -.digit-banner-error-wrap, -.digit-banner-emp-error-wrap { - @apply block bg-error w-full text-center text-white pt-md pb-sm mb-md; - - - header { - @apply block mb-sm font-rc font-bold text-heading-xl; - } - - img { - margin-left: auto; - margin-right: auto; - padding: 13.67px; - @apply border border-solid border-white rounded-full bg-white h-16 w-16 mb-md; - } - - svg { - margin-left: auto; - margin-right: auto; - padding: 13.67px; - @apply border border-solid border-white rounded-full bg-white h-16 w-16 mb-md; - } -} - -@screen dt { - .digit-banner-success-wrap { - header { - @apply text-heading-xl-dt; - } - } - .digit-banner-emp-success-wrap { - width: calc(100%); - header { - @apply text-heading-xl-dt; - } - } - - .digit-banner-error-wrap { - width: 100%; - header { - @apply text-heading-xl-dt; - } - } - - .digit-banner-emp-error-wrap { - width: calc(100%); - header { - @apply text-heading-xl-dt; - } - } -} - -.banner { - @apply flex justify-center items-center; - height: calc(100vh - 80px); - background: linear-gradient(rgba(11, 75, 102, 0.8), rgba(11, 75, 102, 0.8)), var(--banner-url) center center; - - .bannerCard { - min-width: 400px; - } - .bannerLogo { - width: 80px; - height: 40px; - object-fit: contain; - padding-right: 10px; - margin-right: 10px; - border-right: 1px solid theme(colors.text.primary); - } - .bannerHeader { - @apply flex justify-center items-center; - margin-bottom: 24px; - } -} - -.banner-container { - flex-direction: column; - justify-content: center; - align-items: center !important; -} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/bodyContainerV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/bodyContainerV2.scss deleted file mode 100644 index 9836a7104..000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/bodyContainerV2.scss +++ /dev/null @@ -1,39 +0,0 @@ -@import url("../index.scss"); - -body { - @extend .light-background; -} - -.body-container { - @extend .light-background; - @apply h-full min-h-screen overflow-x-hidden; -} - -.body-container::-webkit-scrollbar { - display: none; -} - -.h1 { - @extend .light-text-color-primary; - @apply text-heading-l font-bold mb-md ml-md; -} - -.link-label { - @extend .light-primary; - @apply block mb-md ml-md cursor-pointer; - - &:hover { - @extend .light-text-color-primary; - } -} - -@screen dt { - .h1 { - margin-left: 0; - @apply text-heading-l-dt; - } - - .link-label { - margin-left: 0; - } -} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/breadCrumbV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/breadCrumbV2.scss deleted file mode 100644 index 2b13c8682..000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/breadCrumbV2.scss +++ /dev/null @@ -1,31 +0,0 @@ -@import url("../index.scss"); - -.digit-bread-crumb { - @extend .light-text-color-secondary; - font-size: 14px; - display: flex; - margin-bottom: 10px; -} -.digit-bread-crumb--item { - margin-left: 5px; - - &:not(:last-child):after { - content: " /"; - } - - button { - outline: none; - } - - .last { - @extend .light-text-color-primary; - } - - span { - cursor: pointer; - } -} -ol, -ul { - list-style: none; -} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/breakLineV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/breakLineV2.scss deleted file mode 100644 index 1b67e4bcc..000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/breakLineV2.scss +++ /dev/null @@ -1,6 +0,0 @@ -@import url("../index.scss"); - -.digit-break-line { - @apply border-solid border-2; - @extend .light-input-border; -} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/cardV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/cardV2.scss deleted file mode 100644 index ee75e5a96..000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/cardV2.scss +++ /dev/null @@ -1,385 +0,0 @@ -@import url("../index.scss"); - -.digit-card { - @apply bg-white m-sm px-md pt-md pb-lg shadow-card; - @extend .light-paper-primary; - border-radius: 4px; - max-width: 960px; - - .digit-card-header { - @extend .light-primary; - @apply text-heading-xl font-bold font-rc align-middle text-left mb-md; - } - - .digit-card-sub-header { - @extend .light-primary; - @apply text-caption-xl font-bold align-middle text-left mb-sm; - } - - .digit-card-caption { - @extend .light-text-color-secondary; - @apply text-caption-xl mb-sm; - } - - .digit-card-text { - @extend .light-text-color-secondary; - @apply text-body-l align-middle text-left mb-lg; - - span { - @extend .light-text-color-primary; - } - } - - .digit-card-text-primary { - @extend .light-primary; - @apply text-body-l; - } - - .digit-card-text-button { - @extend .light-primary; - @apply text-text-btn; - } - - .digit-card-label { - @extend .light-primary; - @apply text-legend mb-sm; - } - - .digit-card-label-error { - @extend .alert-error; - @apply block text-body-s text-error mb-md; - } - - .digit-card-label-desc { - @extend .light-text-color-secondary; - @apply font-bold text-heading-s mb-md; - } - - .digit-card-link { - @extend .light-primary; - @apply block text-center text-link mt-md cursor-pointer; - } -} - -.digit-validation-error { - @extend .alert-error; - @apply block text-body-s text-error; -} - -.digit-docsDescription { - @extend .light-text-color-primary; -} - -.digit-field-container { - @apply flex items-center; -} - -.digit-employee-card { - @extend .light-paper-primary; - @apply shadow-card p-md mb-xl; - border-radius: 4px; - - .digit-card-header { - @extend .light-primary; - @apply text-heading-xl font-bold font-rc align-middle text-left mb-md; - } - - .digit-card-sub-header, - .digit-employee-card-sub-header { - @extend .light-primary; - @apply text-caption-xl font-bold align-middle text-left; - } - - .digit-card-section-header { - @extend .light-primary; - @apply text-heading-m font-bold; - } - - .digit-card-section-sub-text { - @extend .light-primary; - @apply text-body-s; - } - - .digit-card-caption { - @extend .light-text-color-secondary; - @apply text-caption-xl mb-sm; - } - - .digit-card-text { - @extend .light-text-color-secondary; - @apply text-body-l align-middle text-left mb-lg; - - span { - @extend .light-text-color-primary; - } - } - - .card-text-primary { - @extend .light-primary; - @apply text-body-l; - } - - .card-text-button { - @extend .light-primary; - @apply text-text-btn; - } - - .card-label { - @extend .light-primary; - @apply text-legend mb-md; - } - - .card-label-error { - @extend .alert-error; - @apply block text-body-s text-error mb-md; - } - - .card-label-desc { - @extend .light-text-color-secondary; - @apply font-bold text-heading-s mb-md; - } - - .card-link { - @extend .light-primary; - @apply block text-center text-link text-link-normal mt-md; - } - - .card-search-heading { - margin-right: 0px !important; - margin-left: 0px !important; - margin-bottom: 0px !important; - padding-bottom: 0px; - padding-left: 25px; - } -} - -.header-wrap { - @apply flex mb-md; - - .header-start { - margin-right: auto; - } - - .header-content { - } - - .header-end { - margin-left: auto; - } -} - -.card-emp { - @extend .card; - padding-right: 0; - padding-top: 0; - padding-left: 0; - @apply bg-white m-sm; - @extend .light-background; -} - -.submit-bar { - @extend .light-primary-button; - @apply h-10 text-center w-full outline-none; - box-shadow: inset 0px -2px 0px theme(colors.text.primary); - cursor: pointer; - - &:focus { - @apply outline-none; - } - - header { - @apply font-rc font-medium text-legend text-white leading-10; - } -} - -.submit-bar-disabled { - @apply h-10 bg-primary-main text-center w-full outline-none opacity-50; - - &:focus { - @apply outline-none; - } - - header { - @apply font-rc font-medium text-legend text-white leading-10; - } -} - -@screen dt { - .submit-bar, - .submit-bar-disabled { - width: 240px; - } - - .card { - display: flex; - flex-direction: column; - - .card-header { - @apply text-heading-xl-dt; - } - - .card-sub-header { - @apply text-heading-l-dt; - } - - .card-caption { - @apply text-caption-xl-dt; - } - - .card-text, - .card-text-primary { - @apply text-body-l-dt; - } - - .card-link { - @apply text-left; - } - } - - .digit-employee-card { - @apply mb-md mx-md !important; - - &.digit-filter { - margin-left: auto; - margin-right: auto; - } - - .digit-card-header { - @apply text-heading-xl-dt; - } - - .digit-card-sub-header { - @apply text-heading-l-dt; - } - - .digit-employee-card-sub-header { - margin-bottom: 40px; - @apply text-heading-l-dt; - } - - .digit-card-section-header { - margin-bottom: 40px; - @apply text-heading-m-dt; - } - - .digit-card-section-sub-text { - @apply text-text-primary text-body-s-dt; - } - - .digit-card-search-heading { - margin-right: 0px !important; - margin-left: 0px !important; - margin-bottom: 0px !important; - padding-bottom: 0px; - padding-left: 25px; - } - - .digit-card-caption { - @apply text-caption-xl-dt; - } - - .digit-card-text, - .digit-card-text-primary { - @apply text-body-l-dt; - } - - .digit-card-link { - @apply text-left; - } - - .digit-label-field-pair { - @apply flex items-center; - - h2 { - width: 30%; - } - - .field { - width: 50%; - margin-right: 20%; - .field { - margin-right: unset; - } - } - } - - .digit-field-container { - span { - border: 2px solid black; - background: rgb(247, 247, 247); - width: 40px; - height: 40px; - display: flex; - justify-content: center; - align-items: center; - margin-top: -16px; - border-right: none; - } - } - } - - .digit-header-wrap { - @apply flex mb-md; - - .header-start { - margin-right: auto; - } - - .header-content { - } - - .header-end { - margin-left: auto; - } - } -} - -.digit-card-section-header { - @extend .light-text-color-primary; - @apply text-text-primary text-heading-m font-bold; -} - -.digit-card-search-heading { - margin-right: 0px !important; - margin-left: 0px !important; - margin-bottom: 0px !important; - padding-bottom: 0px; - padding-left: 25px; -} - -.digit-card-label-error { - @extend .alert-error; - @apply block text-body-s text-error mb-md; -} - -.digit-employee-card-override { - margin-left: 0px !important; -} - -.digit-employee-application-details { - display: flex !important; - justify-content: space-between !important; - max-height: 60px !important; - height: 60px !important; -} -.digit-employee-main-application-details { - padding: 10px !important; -} - -.digit-employee-mulitlink-main-div { - @extend .light-primary; - z-index: 10 !important; - max-width: 41% !important; -} - -.digit-employee-download-btn-className { - position: unset !important; - display: flex !important; - justify-content: flex-end !important; -} - -.digit-employee-options-btn-className { - position: unset !important; - margin: 0 !important; - width: 100% !important; -} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/checkboxV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/checkboxV2.scss deleted file mode 100644 index c19cfe8c2..000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/checkboxV2.scss +++ /dev/null @@ -1,61 +0,0 @@ -@import url("../index.scss"); - -.digit-checkbox-wrap { - @apply flex mb-md relative items-baseline; - - input { - width: 38px; - height: 38px; - @apply opacity-0 absolute top-0 left-0 z-10; - @extend .light-input-border; - } - - .input-emp { - @extend input; - width: 24px; - height: 24px; - } - - .digit-custom-checkbox { - width: 38px; - height: 38px; - @apply absolute top-0 left-0 border border-solid border-input-border z-0; - @extend .light-input-border; - - img { - @apply opacity-0; - } - - svg { - @apply opacity-0; - } - } - - .digit-custom-checkbox-emp { - @extend .digit-custom-checkbox; - width: 24px; - height: 24px; - } - - input:checked ~ .digit-custom-checkbox, - input:hover ~ .digit-custom-checkbox { - @apply border-2 border-primary-main; - @extend .light-input-border; - } - - input:checked ~ .digit-custom-checkbox img { - @apply opacity-100; - } - - input:checked ~ .digit-custom-checkbox svg { - @apply opacity-100; - width: 35px; - height: 35px; - } - - .label { - margin-left: 56px; - @apply text-form-field text-text-primary; - @extend .light-text-color-primary; - } -} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/checkpointV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/checkpointV2.scss deleted file mode 100644 index f751e8a91..000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/checkpointV2.scss +++ /dev/null @@ -1,71 +0,0 @@ -@import url("../index.scss"); - -.digit-checkpoint-connect-wrap { - padding-bottom: 40px; - @apply relative; -} -.digit-checkpoint-done { - @apply flex items-center; - - h2 { - z-index: 1; - width: 24px; - height: 24px; - border-radius: 50%; - @apply border-b border-solid border-primary-main bg-primary-main; - } - - header { - @apply text-heading-s ml-md; - - p { - margin-top: 4px; - @extend .light-text-color-secondary; - @apply text-heading-s; - } - } -} - -.digit-checkpoint { - @apply flex items-center; - - h2 { - z-index: 1; - width: 24px; - height: 24px; - border-radius: 50%; - --text-opacity: 1; - @apply border-b border-solid border-border bg-border; - } - - header { - @apply text-heading-s ml-md; - - p { - margin-top: 4px; - @extend .light-text-color-secondary; - @apply text-heading-s; - } - } -} - -.digit-checkpoint-connect { - margin-left: 12px; - margin-top: 22px; - @apply absolute top-0 left-0 h-full border-l border-solid border-border; -} - -.digit-checkpoint-comments-wrap { - max-width: 560px; - @apply bg-grey-mid p-sm mt-sm; - - h4 { - @extend .light-text-color-primary; - @apply text-heading-s; - } - - p { - @extend .light-text-color-secondary; - @apply text-body-s-dt; - } -} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/collapseAndExpandGroups.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/collapseAndExpandGroups.scss deleted file mode 100644 index 3e0b65a66..000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/collapseAndExpandGroups.scss +++ /dev/null @@ -1,60 +0,0 @@ -@import url("../../digitv2/index.scss"); - -.digit-expand-collapse-wrapper { - display: flex; - flex-direction: column; - margin-top: 1rem; -} - -.digit-expand-collapse-header { - background-color: #f2f2f2; - display: grid; - grid-template-columns: 1fr 1fr; - align-items: center; - padding: 12px; - position: relative; - font-weight: bolder; - border: 1px solid #828282; - border-radius: 4px; -} - -.digit-icon-toggle { - position: absolute; - right: 10px; - top: 50%; - transform: translate(0%, -50%); - cursor: pointer; - span{ - display: inline-flex; - align-items: center; - - h5{ - color: theme(colors.primary.main); - display: inline; - } - } -} - -.digit-expand-collapse-header .label { - display: block; - text-align: left; -} - -.digit-expand-collapse-header .value { - display: block; - text-align: right; - margin-right: 2rem; -} - -.digit-toggling-wrapper.digit-collapse { - flex: none; - overflow: hidden; - height: 0; - transition: 0.2s ease-in-out; -} - -.digit-toggling-wrapper { - flex: 1; - transition: 0.2s ease-in-out; - box-sizing: border-box; -} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/dateWrapV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/dateWrapV2.scss deleted file mode 100644 index 3d2dc3db7..000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/dateWrapV2.scss +++ /dev/null @@ -1,12 +0,0 @@ -.digit-date-picker { - @apply relative w-full cursor-pointer; - .citizen { - max-width: 540px; - } - .digit-employee-card-input { - @apply mb-lg pl-sm outline-none block border w-full h-10 border-input-border border-solid bg-white leading-10 text-form-field text-text-primary; - @extend .light-input-border; - width: calc(100%-62px); - padding-right: 9px; - } -} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/displayPhotosV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/displayPhotosV2.scss deleted file mode 100644 index 77bd2d221..000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/displayPhotosV2.scss +++ /dev/null @@ -1,33 +0,0 @@ -.digit-photos-wrap { - max-width: 640px; - @apply flex pt-md; - - img { - width: calc(33% - 9.333px); - margin-right: 14px; - } - - svg { - width: calc(33% - 9.333px); - margin-right: 14px; - } - - .last { - width: calc(33% - 9.333px); - } -} - -.digit-image-pdf-icon { - @apply flex flex-wrap justify-start content-center; - .digit-url { - min-width: 100px; - margin-right: 10px; - max-width: 100px; - height: auto; - .digit-icon { - background: #f6f6f6; - padding: 8px; - width: 100px; - } - } -} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/headerV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/headerV2.scss deleted file mode 100644 index 9f514c0d9..000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/headerV2.scss +++ /dev/null @@ -1,6 +0,0 @@ -@import url("../index.scss"); - -.digit-header { - @extend .light-text-color-primary; - @apply text-heading-l font-bold mb-md ml-md; -} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/infoBannerV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/infoBannerV2.scss deleted file mode 100644 index 132ee6c0b..000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/infoBannerV2.scss +++ /dev/null @@ -1,37 +0,0 @@ -@import url("../index.scss"); - -.digit-info-banner-wrap { - @apply bg-opacity-25 m-sm p-md; - max-width: 960px; - - @extend .alert-info-bg; - border-radius: 4px; - svg { - margin-top: 5px; - @apply rounded-full; - } - - div { - @apply flex items-center; - } - - h2 { - @apply text-heading-m text-link-normal mb-md font-bold ml-sm; - } - - p { - @apply text-body-l text-link-normal whitespace-pre-line; - } -} - -@screen dt { - .digit-info-banner-wrap { - h2 { - @apply text-heading-m-dt; - } - - p { - @apply text-body-l-dt; - } - } -} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/keynoteV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/keynoteV2.scss deleted file mode 100644 index 02fe872b5..000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/keynoteV2.scss +++ /dev/null @@ -1,35 +0,0 @@ -.digit-key-note-pair { - @apply mb-md; - - h3 { - margin-bottom: 4px; - @apply font-bold text-text-primary text-heading-s; - } - - p { - @apply text-text-primary text-body-l; - } - .digit-key-note-container { - display: inline-flex; - .digit-unmask-container { - display: inline-flex; - width: fit-content; - margin-left: 10px; - margin-top: 5px; - } - } - .digit-caption { - @apply text-body-l text-text-secondary; - } -} - -@screen dt { - .digit-key-note-pair { - p { - @apply text-body-l-dt; - } - .digit-caption { - @apply text-body-l-dt text-text-secondary; - } - } -} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/loaderV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/loaderV2.scss deleted file mode 100644 index 7e435da68..000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/loaderV2.scss +++ /dev/null @@ -1,81 +0,0 @@ -@import url("../index.scss"); - -.digit-screen-loader { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - display: flex; - justify-content: center; - align-items: center; - z-index: 9999; - @extend .light-background; - .digit-ldio-pjg92h09b2o div { - position: absolute; - width: 52px; - height: 52px; - border: 12px solid theme(digitv2.lightTheme.primary); - border-top-color: transparent; - border-radius: 50%; - } -} - -.digit-page-loader, -.digit-module-loader { - text-align: center; -} - -.digit-page-loader { - padding-top: 88px; -} - -.digit-module-loader { - padding: 16px; -} - -@keyframes digit-ldio-pjg92h09b2o { - 0% { - transform: translate(-50%, -50%) rotate(0deg); - } - - 100% { - transform: translate(-50%, -50%) rotate(360deg); - } -} - -.digit-ldio-pjg92h09b2o div { - position: absolute; - width: 52px; - height: 52px; - border: 12px solid theme(colors.secondary); - border-top-color: transparent; - border-radius: 50%; -} - -.digit-ldio-pjg92h09b2o div { - animation: digit-ldio-pjg92h09b2o 1s linear infinite; - top: 50px; - left: 50px; -} - -.digit-loadingio-spinner-rolling-faewnb8ux8 { - width: 48px; - height: 48px; - display: inline-block; - overflow: hidden; - background: none; -} - -.digit-ldio-pjg92h09b2o { - width: 100%; - height: 100%; - position: relative; - transform: translateZ(0) scale(0.48); - backface-visibility: hidden; - transform-origin: 0 0; -} - -.digit-ldio-pjg92h09b2o div { - box-sizing: content-box; -} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/mobileNumberV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/mobileNumberV2.scss deleted file mode 100644 index 5c7f60880..000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/mobileNumberV2.scss +++ /dev/null @@ -1,33 +0,0 @@ -@import url("../index.scss"); - -.digit-mobile-number-container { - @apply flex items-center; - - .digit-citizen-card-input--front { - @extend .light-background; - width: fit-content !important; - display: flex; - align-items: center; - /* background: theme(colors.grey.mid); */ - border-right: 0; - padding-right: 5px; - } - - .digit-citizen-card-input { - @apply mb-lg pl-sm outline-none block border w-full h-10 border-input-border border-solid bg-white leading-10 text-form-field text-text-primary; - } - - .digit-citizen-card-input--front { - width: fit-content !important; - display: flex; - align-items: center; - background: theme(colors.grey.mid); - border-right: 0; - padding-right: 5px; - } - .digit-employee-card-input-error { - @apply mb-lg pl-sm block w-full h-10 outline-none border-2 border-solid bg-white leading-10 text-form-field text-text-primary; - @extend .light-input-border; - @extend .alert-error; - } -} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/multiSelectDropdownV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/multiSelectDropdownV2.scss deleted file mode 100644 index 0862eebe2..000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/multiSelectDropdownV2.scss +++ /dev/null @@ -1,92 +0,0 @@ -@import url("../index.scss"); - -.digit-multi-select-dropdown-wrap { - margin-bottom: 24px; - @apply relative text-form-field text-text-primary w-full; - .digit-master, - .digit-master-active { - @apply relative border border-solid border-input-border h-10 w-full; - input[type="text"] { - @apply absolute top-0 left-0 p-sm pl-sm min-h-full min-w-full opacity-0; - &:focus { - @apply outline-none; - } - } - .digit-label { - @apply flex justify-between p-sm w-full h-full; - svg { - @apply h-6 w-6; - } - } - - &:hover { - @apply border-2 border-solid border-primary-main; - } - } - - .digit-master-active { - @apply border-2 border-primary-main; - input[type="text"] { - @apply opacity-100; - } - .digit-label { - @apply hidden; - } - } - - .digit-server { - box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.2); - top: 40px; - - max-height: 20vmax; - overflow: scroll; - @apply absolute min-w-full z-20; - div { - @apply flex w-full bg-white; - justify-content: flex-start; - align-items: center; - &:hover { - @apply bg-grey-mid; - } - input { - height: 44px; - @apply absolute min-w-full opacity-0 z-20 cursor-pointer; - } - p { - padding: 12px; - margin-top: 5px; - margin-bottom: 5px; - @apply text-form-field text-text-primary; - } - .digit-custom-checkbox { - height: 28px; - width: 28px; - @apply border border-solid border-input-border m-sm; - svg { - @apply opacity-0 z-10; - } - } - input:checked ~ .digit-custom-checkbox, - input:hover ~ .digit-custom-checkbox { - @apply border-2 border-primary-main; - } - - input:checked ~ .digit-custom-checkbox svg { - @apply opacity-100; - } - } - } - .digit-cursorPointer { - @apply cursor-pointer; - } - .digit-master { - .digit-label { - p { - white-space: pre; - margin: auto; - margin-left: 0px; - padding-left: 1%; - } - } - } -} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/noresultsfoundV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/noresultsfoundV2.scss deleted file mode 100644 index aedadebe9..000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/noresultsfoundV2.scss +++ /dev/null @@ -1,11 +0,0 @@ -.digit-no-data-found { - height: 100%; - width: 100%; - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - .digit-error-msg { - margin-top: 2rem; - } -} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/otpInputV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/otpInputV2.scss deleted file mode 100644 index b16e2c901..000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/otpInputV2.scss +++ /dev/null @@ -1,15 +0,0 @@ -.digit-input-otp-wrap { - @apply mb-lg; - - input { - @apply border-2 border-solid border-input-border outline-none h-10 w-10 text-form-field text-text-primary mr-sm mb-sm text-center; - } - input::-webkit-outer-spin-button, - input::-webkit-inner-spin-button { - -webkit-appearance: none; - margin: 0; - } - input[type="number"] { - -moz-appearance: textfield; - } -} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/popUpV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/popUpV2.scss deleted file mode 100644 index c14778187..000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/popUpV2.scss +++ /dev/null @@ -1,24 +0,0 @@ -.digit-popup-wrap { - background: rgba(0, 0, 0, 0.7); - @apply flex fixed w-full h-full overflow-auto top-0 left-0 min-h-screen; - z-index: 10000; -} - -@screen dt { - .digit-popup-wrap { - background: rgba(0, 0, 0, 0.7); - @apply min-h-screen; - } -} - -.digit-popup-close-icon { - @apply flex justify-end; -} - -.digit-logout-popup-wrapper{ - width: 31.25rem !important; - - .logout-cancel-button{ - height: 2.5rem; - } -} \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/radiobtnV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/radiobtnV2.scss deleted file mode 100644 index 638271e14..000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/radiobtnV2.scss +++ /dev/null @@ -1,51 +0,0 @@ -@import url("../index.scss"); - -.digit-radio-wrap { - @apply my-sm block leading-10 mb-lg; - - div { - @apply block mb-md; - } - - .digit-radio-btn-wrap { - @apply block float-left relative; - &:hover { - .digit-radio-btn-checkmark { - @apply border-primary-main; - } - } - } - - .digit-radio-btn { - @apply opacity-0 absolute cursor-pointer h-10 w-10; - } - - .digit-radio-btn-checkmark { - @extend .light-input-border; - @apply h-10 w-10 border border-input-border border-solid rounded-full block; - } - - label { - @extend .light-text-color-primary; - @apply text-text-primary text-form-field ml-md; - } - - .digit-radio-btn-checkmark:after { - content: ""; - } - - .digit-radio-btn-wrap input:checked ~ .digit-radio-btn-checkmark { - /* @extend .light-input-border; */ - @apply border-2 border-primary-main; - } - - .digit-radio-btn-wrap input:checked ~ .digit-radio-btn-checkmark:after { - /* @extend .light-background; */ - @apply block bg-primary-main h-5 w-5 rounded-full absolute top-10 left-10; - } -} -.digit-reverse-radio-selection-wrapper { - div { - @apply flex flex-row-reverse place-content-between items-center; - } -} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/ratingV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/ratingV2.scss deleted file mode 100644 index 98e9e6d56..000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/ratingV2.scss +++ /dev/null @@ -1,33 +0,0 @@ -.digit-rating-star-wrap { - @apply flex w-full mb-lg; - img { - width: 40px; - height: 38px; - display: block; - @apply mr-sm; - } - - svg { - width: 40px; - height: 38px; - display: block; - @apply mr-sm; - } -} - -@screen dt { - .digit-rating-star-wrap { - @apply w-2/5; - } -} - -.digit-rating-with-text { - @apply flex place-items-center w-full; - - svg { - width: 24px; - height: 38px; - display: block; - @apply mr-sm; - } -} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/selectdropdownV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/selectdropdownV2.scss deleted file mode 100644 index 60099b63e..000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/selectdropdownV2.scss +++ /dev/null @@ -1,180 +0,0 @@ -.digit-employee-select-wrap { - @apply mb-lg relative; - - .digit-select { - @extend .light-input-border; - @apply relative block w-full h-10 border border-solid border-input-border; - &:hover { - @extend .light-input-border; - @apply border-2 border-solid border-primary-main; - } - input[type="text"] { - width: calc(100% - 32px); - background-color: transparent; - @extend .light-input-border; - @extend .light-text-color-primary; - @apply absolute z-10 w-full h-full outline-none text-text-primary text-form-field pl-sm; - } - - p { - padding-top: 9px; - @extend .light-text-color-primary; - @apply text-form-field text-text-primary float-left ml-sm; - } - - img { - @apply float-right h-6 w-6 mt-sm mr-sm; - } - - svg { - @apply absolute right-0 float-right h-6 w-6 mt-sm mr-sm; - } - } - - .digit-select-active { - @apply relative block w-full h-10 border-2 border-solid border-primary-main; - @extend .light-input-border; - - input[type="text"] { - width: calc(100% - 32px); - background-color: transparent; - @extend .light-background; - @extend .light-text-color-primary; - - @apply absolute z-10 w-full h-full outline-none text-text-primary text-form-field pl-sm; - } - - p { - @extend .light-text-color-primary; - @apply text-form-field text-text-primary float-left ml-sm; - } - - p { - padding-top: 9px; - } - - img { - @apply float-right h-6 w-6 mt-sm mr-sm; - } - - svg { - @apply absolute right-0 float-right h-6 w-6 mt-sm mr-sm; - } - } - - .digit-options-card { - width: 100% !important; - box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.2); - max-height: 400px; - overflow: auto; - @apply absolute z-20 mt-xs bg-white max-w-full; - - p { - padding-top: 14px; - @extend .light-text-color-primary; - @apply w-full h-12 pl-sm text-text-primary text-form-field; - - &:hover { - @apply bg-grey-mid; - @extend .light-background; - } - } - } -} - -.digit-employee-select-wrap--elipses { - width: 85% !important; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -.digit-select-wrap { - @apply mb-lg relative; - max-width: 540px; - - .digit-select { - @apply relative block w-full h-10 border border-solid border-input-border; - @extend .light-input-border; - - input[type="text"] { - width: calc(100% - 32px); - background-color: transparent; - @extend .light-text-color-primary; - @apply absolute z-10 w-full h-full outline-none text-text-primary text-form-field pl-sm; - } - - p { - padding-top: 9px; - @extend .light-text-color-primary; - @apply text-form-field text-text-primary float-left ml-sm; - } - - img { - @apply float-right h-6 w-6 mt-sm mr-sm; - } - - svg { - @apply absolute right-0 float-right h-6 w-6 mt-sm mr-sm; - } - } - - .digit-select-active { - @extend .light-input-border; - @apply relative block w-full h-10 border-2 border-solid border-primary-main; - - input[type="text"] { - width: calc(100% - 32px); - background-color: transparent; - @extend .light-text-color-primary; - @apply absolute z-10 w-full h-full outline-none text-text-primary text-form-field pl-sm; - } - - p { - @extend .light-text-color-primary; - @apply text-form-field text-text-primary float-left ml-sm; - } - - p { - padding-top: 9px; - } - - img { - @apply float-right h-6 w-6 mt-sm mr-sm; - } - - svg { - @apply absolute right-0 float-right h-6 w-6 mt-sm mr-sm; - } - } - - .digit-options-card { - width: 100% !important; - box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.2); - @extend .light-background; - @apply absolute z-20 mt-xs bg-white; - - p { - padding-top: 14px; - @extend .light-text-color-primary; - @apply w-full h-12 pl-sm text-text-primary text-form-field; - - &:hover { - @apply bg-grey-mid; - } - } - } -} - -@screen dt { -} - -.digit-dropdown-employee-select-wrap{ - - &.language-dropdown{ - - .digit-dropdown-options-card{ - min-width: fit-content; - } - } -} \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/tagV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/tagV2.scss deleted file mode 100644 index a202bbd67..000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/tagV2.scss +++ /dev/null @@ -1,28 +0,0 @@ -.digit-tag-container { - @apply flex flex-wrap mb-md; - - .digit-tag { - @apply bg-grey-mid rounded-2xl pt-sm pb-sm flex justify-between items-center; - padding-left: 12px; - padding-right: 12px; - font-size: 14px; - margin-left: 2px; - height: 2rem; - margin-top: 1rem; - .digit-text { - padding-right: 5px; - max-width: calc(100% - 24px); - height: 22px; - overflow: hidden; - text-overflow: clip; - } - - &:hover { - @apply cursor-pointer; - - .close { - fill: black; - } - } - } -} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/telephoneV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/telephoneV2.scss deleted file mode 100644 index 0953ca8d7..000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/telephoneV2.scss +++ /dev/null @@ -1,18 +0,0 @@ -.digit-telephone { - @apply flex items-baseline; - img, - svg { - height: 22px; - width: 20px; - @apply text-primary-main ml-sm items-center; - margin-left: 0px; - } - - p { - @apply text-text-primary text-body-l pl-sm; - } -} - -.digit-call { - @apply flex text-text-secondary text-body-l; -} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/textInputV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/textInputV2.scss deleted file mode 100644 index 863500eb5..000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/textInputV2.scss +++ /dev/null @@ -1,123 +0,0 @@ -@import url("../index.scss"); - -.digit-card-input-error { - @apply mb-lg pl-sm block w-full h-10 outline-none border-2 border-error border-solid bg-white leading-10 text-form-field text-text-primary; -} -.digit-text-input { - @apply relative w-full; -} - -.digit-text-input-width { - max-width: 540px; -} -.digit-card-input { - @apply mb-lg pl-sm outline-none mt-sm block border w-full h-10 border-input-border border-solid bg-white leading-10 text-form-field text-text-primary; -} - -.digit-card-input-error { - @apply mb-lg pl-sm block w-full h-10 outline-none border-2 border-error border-solid bg-white leading-10 text-form-field text-text-primary; -} - -.digit-employee-card-input { - @apply mb-lg pl-sm outline-none block border w-full h-10 border-input-border border-solid bg-white leading-10 text-form-field text-text-primary; -} -.digit-employee-card-input:disabled { - @apply border-grey-dark text-grey-dark !important; - pointer-events: none !important; -} -.digit-employee-card-input--front { - width: fit-content !important; - display: flex; - align-items: center; - background: theme(colors.grey.mid); - border-right: 0; - padding-right: 5px; -} -.digit-employee-card-input-error { - @apply mb-lg pl-sm block w-full h-10 outline-none border-2 border-error border-solid bg-white leading-10 text-form-field text-text-primary; -} - -.digit-card-textarea, -.digit-employee-card-textarea { - @apply block outline-none mt-md mb-lg border w-full border-input-border border-solid bg-white h-24 text-form-field text-text-primary p-sm; -} - -.digit-inputWrapper { - display: flex; - justify-content: flex-start; - max-width: 500px; - - div { - max-width: 80px; - } - - span { - margin-top: 16px; - margin-left: 10%; - margin-right: 10%; - } -} - -@screen dt { - .digit-card-input { - width: 480px; - } - - .digit-card-input-emp { - width: 240px; - } - - .digit-card-input-error { - width: 480px; - } - - .digit-employee-card-input { - @apply w-full; - } - - .digit-employee-card-input-error { - @apply w-full; - } - - .digit-card-textarea { - /* //width: 480px; */ - @apply w-full; - max-width: 540px; - } - - .digit-employee-card-textarea { - @apply w-full; - } - - .card-input-emp { - width: 240px; - } -} - -.digit-citizen-card-input { - @apply mb-lg pl-sm outline-none block border w-full h-10 border-input-border border-solid bg-white leading-10 text-form-field text-text-primary; -} - -.digit-citizen-card-input--front { - width: fit-content !important; - display: flex; - align-items: center; - background: theme(colors.grey.mid); - border-right: 0; - padding-right: 5px; -} - -.digit-employee-card-input-error { - @apply mb-lg pl-sm block w-full h-10 outline-none border-2 border-error border-solid bg-white leading-10 text-form-field text-text-primary; - @extend .light-input-border; - @extend .alert-error; -} -.digit-card-input-error { - @apply mb-lg pl-sm block w-full h-10 outline-none border-2 border-error border-solid bg-white leading-10 text-form-field text-text-primary; - @extend .light-input-border; - @extend .alert-error; -} -.disabled { - @apply border-grey-dark text-grey-dark !important; - pointer-events: none !important; -} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/textareaV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/textareaV2.scss deleted file mode 100644 index 1be8174b0..000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/textareaV2.scss +++ /dev/null @@ -1,11 +0,0 @@ -.digit-card-textarea, -.digit-employee-card-textarea { - @apply block outline-none mt-md mb-lg border w-full border-input-border border-solid bg-white h-24 text-form-field text-text-primary p-sm; - @extend .light-input-border; -} -.digit-employee-card-textarea { - @apply w-full; -} -.digit-cell-text { - color: theme(colors.text.secondary); -} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/uploadFileV2.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/uploadFileV2.scss deleted file mode 100644 index 8ebd72365..000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/uploadFileV2.scss +++ /dev/null @@ -1,146 +0,0 @@ -.digit-upload-wrap { - @apply flex w-full h-40 bg-grey-light relative mb-lg px-sm border border-border border-dashed; - max-width: 540px; - min-height: 50px; - padding: 0.5rem; - - img { - display: block; - margin-top: 58px; - margin-left: calc(50% - 23px); - height: 42px; - width: 46px; - } - - svg { - display: block; - margin-top: 58px; - margin-left: calc(50% - 23px); - height: 42px; - width: 46px; - } - - input { - @apply absolute w-full h-full opacity-0 top-0; - } - .digit-cell-text { - color: theme(colors.text.secondary); - padding-top: 3px; - } -} - -.digit-multi-upload-wrap { - @apply flex mb-lg; - - div { - display: block; - position: relative; - background-color: theme(colors.grey.light); - width: calc((100% - 16px) / 3); - margin-right: 8px; - - .digit-delete { - position: absolute; - height: 24px; - width: 24px; - border-radius: 100%; - top: 2px; - right: 2px; - } - } - - .digit-upload-img-container { - border: 1px dashed theme(colors.border); - margin: 0 !important; - - img { - margin-left: auto; - margin-right: auto; - padding-top: calc(33% - 21px); - } - - svg { - @apply flex; - margin: auto; - } - - svg { - margin-left: auto; - margin-right: auto; - top: calc(50% - 21px); - position: relative; - } - - input { - @apply absolute w-full h-full opacity-0 top-0; - } - } -} - -.digit-upload-file-max-width { - max-width: 540px; -} - -.digit-upload-file { - min-height: 56px; - @apply relative border border-input-border w-full; - - div { - @apply flex flex-row h-full items-center pl-md mt-sm flex-wrap; - - .file-upload-status { - @apply text-body-s-dt ml-sm; - } - } - input { - width: 160px; - @apply absolute top-0 left-0 opacity-0 h-full; - } -} - -@screen dt { - .digit-multi-upload-wrap img { - width: 100%; - height: 158px; - } -} - -.digit-upload-file-button-wrap { - display: flex; - justify-content: flex-start; - align-items: center; - flex-wrap: wrap; - margin: 0px; - padding: 0px; - button { - height: auto; - min-height: 40px; - width: 43%; - max-height: 40px; - margin: 5px; - padding: 0px; - h2 { - word-break: break-all; - height: auto; - line-height: 16px; - overflow: hidden; - max-height: 34px; - max-width: 100%; - } - } - .digit-tag-container { - margin: 0px; - padding: 0px; - } -} -.digit-input-mirror-selector-button { - @apply h-16 bg-border text-center border-b-2 border-input-border border-solid outline-none px-lg !important; - - &:focus { - @apply outline-none; - } - - h2 { - @apply font-rc font-medium text-legend text-text-primary; - } -} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/index.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/index.scss deleted file mode 100644 index 01a5b9f5d..000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/index.scss +++ /dev/null @@ -1,167 +0,0 @@ -@import url("./components/actionbarV2.scss"); -/* - TODO NABEEL/ANIL Removed these since it creates issues in search screen and home screen -@import url("./components/cardV2.scss"); -*/ - -@import url("./components/checkboxV2.scss"); -@import url("./components/FormComposerV2.scss"); -@import url("./components/radiobtnV2.scss"); -@import url("./components/selectdropdownV2.scss"); -@import url("./typography.scss"); -@import url("./components/actionLinkV2.scss"); -@import url("./components/appContainerV2.scss"); -@import url("./components/bodyContainerV2.scss"); -@import url("./components/breadCrumbV2.scss"); -@import url("./components/bannerV2.scss"); -@import url("./components/breakLineV2.scss"); -@import url("./components/loaderV2.scss"); -@import url("./components/headerV2.scss"); -@import url("./components/checkpointV2.scss"); -@import url("./components/backButtonV2.scss"); -@import url("./components/infoBannerV2.scss"); -@import url("./components/displayPhotosV2.scss"); -@import url("./components/collapseAndExpandGroups.scss"); -@import url("./components/dateWrapV2.scss"); -@import url("./components/ErrorMessage.scss"); -@import url("./components/ratingV2.scss"); -@import url("./components/noresultsfoundV2.scss"); -@import url("./components/mobileNumberV2.scss"); -@import url("./components/tagV2.scss"); -@import url("./components/popUpV2.scss"); -@import url("./components/telephoneV2.scss"); -@import url("./components/textareaV2.scss"); -@import url("./components/textInputV2.scss"); -@import url("./components/otpInputV2.scss"); -@import url("./components/multiSelectDropdownV2.scss"); -@import url("./components/uploadFileV2.scss"); - -/* pages */ -@import url("./pages/employee/index.scss"); - -/* important to be remove after fixing the components */ -.light { - &-primary { - color: theme(digitv2.lightTheme.primary) !important; - - &-button { - background-color: theme(digitv2.lightTheme.primary) !important; - } - - &-bg { - background-color: theme(digitv2.lightTheme.primary-bg) !important; - } - } - - &-text-color { - &-primary { - color: theme(digitv2.lightTheme.text-color-primary) !important; - } - - &-secondary { - color: theme(digitv2.lightTheme.text-color-secondary) !important; - } - - &-disabled { - color: theme(digitv2.lightTheme.text-color-disabled) !important; - } - } - - &-background { - background-color: theme(digitv2.lightTheme.background) !important; - } - - &-paper { - &-primary { - background-color: theme(digitv2.lightTheme.paper) !important; - - &-color { - color: theme(digitv2.lightTheme.paper) !important; - } - } - - &-secondary { - background-color: theme(digitv2.lightTheme.paper-secondary) !important; - } - - &-border { - border-radius: 4px; - border-style: solid; - border-width: 1px; - border-color: theme(digitv2.lightTheme.divider); - } - } - - &-divider { - background-color: theme(digitv2.lightTheme.divider) !important; - } - - &-header-sidenav { - color: theme(digitv2.lightTheme.header-sidenav) !important; - } - - &-input-border { - /* TODO Check why important added here @ANIL/NABEEL */ - border-color: theme(digitv2.lightTheme.input-border); - } -} - -.alert { - &-error { - color: theme(digitv2.alert.error) !important; - - &-bg { - background-color: theme(digitv2.alert.error-bg) !important; - } - - &-border { - border-color: theme(digitv2.alert.error) !important; - } - } - - &-success { - color: theme(digitv2.alert.success) !important; - - &-bg { - background-color: theme(digitv2.alert.success-bg) !important; - } - } - - &-info { - color: theme(digitv2.alert.info) !important; - - &-bg { - background-color: theme(digitv2.alert.info-bg) !important; - } - } -} - -.chart { - &-item-1 { - color: theme(digitv2.chart.chart-1) !important; - } - - &-item-1-gradient { - color: theme(digitv2.chart.chart-1-gradient) !important; - } - - &-item-2 { - color: theme(digitv2.chart.chart-2) !important; - } - - &-item-2-gradient { - color: theme(digitv2.chart.chart-2-gradient) !important; - } - - &-item-3 { - color: theme(digitv2.chart.chart-3) !important; - } - - &-item-4 { - color: theme(digitv2.chart.chart-4) !important; - } - - &-item-5 { - color: theme(digitv2.chart.chart-5) !important; - } -} \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/pages/employee/index.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/pages/employee/index.scss deleted file mode 100644 index 99435b650..000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/pages/employee/index.scss +++ /dev/null @@ -1 +0,0 @@ -@import url("./workbench.scss"); diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/pages/employee/workbench.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/pages/employee/workbench.scss deleted file mode 100644 index af97f5293..000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/pages/employee/workbench.scss +++ /dev/null @@ -1,1050 +0,0 @@ -@import url("../../index.scss"); - -.bread-crumb.workbench-bredcrumb { - a { - color: theme(digitv2.lightTheme.primary); - } -} - -.workbench { - &.app-container { - margin-top: 0.75rem; - } - - .workbench-create-form { - display: inherit; - padding-top: 1.5rem; - - .digit-form-composer-sub-header { - @extend .typography.text-heading-m; - padding-left: 1rem; - - @media (max-width: theme(digitv2.screens.mobile)) { - padding-left: 0; - } - } - - form { - #label_digit_root { - display: none; - } - - #digit_root { - width: 100%; - - .field-wrapper { - .form-group.field { - display: flex; - padding: 1em 0 0 1em; - - @media (max-width: theme(digitv2.screens.mobile)) { - flex-direction: column; - } - - &.field-error.has-error.has-danger { - .control-label { - @extend .alert-error; - } - - .form-control { - @extend .alert-error-border; - } - - .card-label-error { - display: inline; - position: relative; - margin: 0px; - padding: 0px; - top: -0.7rem; - font-weight: normal; - - } - } - - &.field-boolean.field-error.has-error.has-danger { - - .card-label-error { - position: initial; - display: block; - margin-top: 0.5rem; - - } - } - - .control-label { - max-width: 12.5rem; - margin-right: 2.5rem; - @extend .card-label; - display: inline-flex; - /* align-self: center; */ - line-height: 3rem; - @extend .typography.text-heading-s; - /* web view*/ - @apply w-1/3; - - /* tablet view*/ - - @media (max-width: theme(digitv2.screens.tablet)) { - max-width: 11rem; - margin-right: 1.5rem; - - } - - /* mobile view*/ - - @media (max-width: theme(digitv2.screens.mobile)) { - /*max-width: 10.2rem;*/ - @apply w-full; - - } - - } - - .all-input-field-wrapper { - - @apply w-3/5; - - @media (max-width: theme(digitv2.screens.mobile)) { - @apply w-full; - } - - .form-control { - @extend .light-input-border; - @extend .employee-card-input; - font-style: inherit; - font-family: inherit; - /* web view*/ - max-width: 37.5rem; - min-width: 20.5rem; - margin-bottom: 1rem; - /* tablet view*/ - - @media (max-width: theme(digitv2.screens.tablet)) { - max-width: 27.5rem; - min-width: 12.5rem; - - } - - /* mobile view*/ - - @media (max-width: theme(digitv2.screens.mobile)) { - max-width: 20.5rem; - min-width: 9.5rem; - @apply w-full; - - } - - &.form-select { - padding: 0%; - border: 0px; - - .digit__control { - @apply outline-none; - - .digit__value-container:in-range { - border-color: unset; - box-shadow: none; - box-sizing: unset; - @apply outline-none; - } - } - - .digit__control--is-focused { - border-color: theme(digitv2.lightTheme.primary) !important; - box-shadow: none; - box-sizing: unset; - @apply outline-none; - } - - - .digit__control:hover { - - border-color: unset; - box-shadow: none; - box-sizing: unset; - @apply outline-none; - } - - .digit__control:focus { - border-color: theme(digitv2.lightTheme.primary); - - .digit__value-container:focus { - border-color: theme(digitv2.lightTheme.primary); - - } - } - } - - &.form-select:focus { - @apply outline-none; - border-color: theme(digitv2.lightTheme.primary); - - } - } - - .form-control:read-only { - background-color: theme(digitv2.lightTheme.background); - color: theme(digitv2.lightTheme["text-color-secondary"]); - } - - .form-control:focus { - - @apply outline-none; - border-color: theme(digitv2.lightTheme.primary); - } - - textarea.form-control { - height: 5rem; - } - } - - &.field-string { - align-self: center; - } - - &.field-boolean { - padding-top: 0rem; - padding-bottom: 1rem; - - .custom-checkbox { - display: inline-flex; - align-items: end; - - &.custom-checkbox-disabled { - pointer-events: none; - opacity: 0.6; - } - - .custom-checkbox-label { - @extend .typography.text-body-s; - @apply pl-sm; - } - } - - .checkbox { - width: 28rem; - - label { - float: left; - - /* display: flex; - flex-direction: row-reverse; - */ - span { - width: 17rem; - display: none; - @extend .card-label; - } - - input[type="checkbox"] { - @extend .light-input-border; - @extend .employee-card-input; - height: 1.5rem; - /* @apply ml-sm;*/ - } - - input[type="checkbox"]#digit_root_active { - accent-color: theme(digitv2.lightTheme.primary); - } - - input:checked, - input:hover { - @apply border-2; - @extend .light-input-border; - } - } - } - - .field-radio-group { - display: inline-flex; - height: 2.5rem; - align-items: center; - - .radio { - @apply mr-sm; - } - } - - - - } - - - - &.field-object>.control-label { - margin-left: 0.5rem; - } - - &.field-object { - display: block; - @extend .light-background; - @extend .light-paper-border; - padding: 1rem; - margin: 1rem; - - .digit-expand-collapse-wrapper { - margin-top: 0px; - } - - .digit-icon-toggle { - top: -1.5rem; - right: 1.5em; - } - - .object-wrapper { - .array-remove-button-wrapper { - position: relative; - } - } - - /* have to revisit for objects - [id^="root_"] { - @extend .light-background; - } - */ - } - - &.field-array { - display: block; - @extend .light-paper-secondary; - @extend .light-paper-border; - padding: 2rem; - margin: 1rem; - padding-top: 1rem; - - .array-wrapper .array-item { - &.jk-array-objects>.array-remove-button-wrapper { - display: block; - } - - &.jk-array-objects { - margin-bottom: 2rem; - - .array-children>span .form-group.field.field-object { - padding-bottom: 3rem; - } - - .array-obj { - position: absolute; - bottom: 1.5rem; - left: 2rem; - - >.array-remove-button-wrapper { - position: unset; - } - } - - } - - &.jk-array-of-non-objects>.array-remove-button-wrapper { - display: inline; - left: 38.5rem; - right: unset; - top: 0.7rem; - } - - &.jk-array-of-non-objects .array-children { - span .form-group { - padding-left: 0%; - - .control-label { - display: none; - } - - } - } - - /* it has been removed since we dont need diff color for array items @extend .light-background;*/ - position: relative; - - .field-object { - margin-left: 0; - margin-right: 0; - } - - - .array-remove-button-wrapper { - position: absolute; - right: 1.3em; - top: 1.3em; - background-color: inherit !important; - - .array-remove-button { - cursor: pointer; - background-color: inherit !important; - - @media (max-width: theme(digitv2.screens.mobile)) { - padding: 0px; - } - - h2 { - @media (max-width: theme(digitv2.screens.mobile)) { - display: none; - } - } - - } - } - - span.all-input-field-wrapper { - @apply w-3/5; - - .form-control { - @apply w-full; - } - } - - .control-label { - @apply w-1/3; - - } - } - - - .jk-digit-secondary-btn { - height: 1.7em; - margin-top: 0.5rem; - - @media (max-width: theme(digitv2.screens.mobile)) { - height: auto; - width: 100%; - } - - h2 { - font-size: 1rem; - } - } - - .all-input-field-wrapper { - .card-label-error { - position: unset !important; - } - } - - } - - .digit-expand-collapse-header { - border: 0; - background-color: inherit; - padding: 0; - } - } - } - } - } - - div.action-bar-wrap { - @extend .action-bar-wrap; - - .submit-bar { - @extend .submit-bar; - cursor: pointer; - @apply font-rc font-medium text-legend text-white leading-10; - } - } - .workbench-bulk-upload { - display: flex; - justify-content: space-between; - margin-bottom: 1.5rem; - .workbench-download-template-btn { - margin-right: 1rem; - } - } - } - - .workbench-no-schema-found { - @apply flex justify-items-center flex-col; - align-items: center; - } - - .jk-digit-loader { - position: absolute; - z-index: 10000; - width: 100vw; - background-color: rgba(189, 189, 189, 0.5); - height: 100vh; - left: 0; - top: 0; - - .jk-spinner-wrapper { - width: 100%; - display: flex; - align-items: center; - justify-content: center; - height: 100%; - - .jk-spinner { - border: 0.4em solid #fe7a51; - border-radius: 50%; - border-top: 0.4em solid #ffffff; - width: 4em; - height: 4em; - -webkit-animation: spin 2s linear infinite; - /* Safari */ - animation: spin 1s linear infinite; - } - } - } - - .jk-sm-inbox-loader { - border: 0.2em solid #fe7a51; - border-radius: 50%; - border-top: 0.2em solid #ffffff; - width: 2em; - height: 2em; - -webkit-animation: spin 2s linear infinite; - /* Safari */ - animation: spin 1s linear infinite; - } - - /* Safari */ - @-webkit-keyframes spin { - 0% { - -webkit-transform: rotate(0deg); - } - - 100% { - -webkit-transform: rotate(360deg); - } - } - - @keyframes spin { - 0% { - transform: rotate(0deg); - } - - 100% { - transform: rotate(360deg); - } - } - - .no-data-found { - height: 100%; - width: 100%; - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - - .digit-error-msg { - margin-top: 2rem; - } - } - - - .tooltip .tooltiptext { - - top: 2rem; - left: 0; - margin-left: 0rem; - width: fit-content; - height: max-content; - white-space: normal; - - .tooltiptextvalue { - font-size: 14px; - font-weight: 400px; - color: white; - } - } - - .employeeCard.manage-master-wrapper { - width: 100%; - display: flex; - padding-top: 2.1rem; - - @media (max-width: theme(digitv2.screens.mobile)) { - flex-direction: column; - } - - .employee-select-wrap.form-field { - @apply w-1/4; - margin-right: 1rem; - - @media (max-width: theme(digitv2.screens.mobile)) { - @apply w-full; - } - } - } - - .table { - padding-left: 0.8rem; - padding-right: 0.8rem; - - &-row-mdms:hover { - background-color: theme(digitv2.lightTheme.primary-bg); - /* Change this to the desired hover color */ - cursor: pointer; - } - } -} - -.header-btn { - width: 12rem; -} - -.drag-drop-container { - background-color: #FAFAFA; - border: 1.5px dashed #D6D5D4; - border-radius: 5px; - margin: -1rem 1rem 1rem 1rem; - padding: 1rem 1rem 1rem 1rem; - display: flex; - align-items: center; - flex-direction: column; - - .drag-drop-text { - text-decoration: none; - - .browse-text { - text-decoration: none; - color: #F47738; - transition: color 0.3s; - } - - .browse-text:hover { - color: #F47738; - text-decoration: underline; - cursor: pointer; - } - } - -} - -.uploaded-file-container { - background-color: #FAFAFA; - border: 1.5px solid #D6D5D4; - border-radius: 5px; - margin: 0.5rem 1rem 2rem 1rem; - display: flex; - flex-direction: row; - align-items: center; - padding: 0.6rem; - justify-content: space-between; - - .uploaded-file-container-sub { - display: flex; - align-items: center; - - .icon:hover { - cursor: pointer; - } - } -} - -button:hover { - cursor: pointer; -} - -.popup-header-fix { - margin-top: -0.5rem !important; -} - -.option-details { - position: fixed; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - z-index: 999; - border: 1px solid #D6D5D4; - /* Border color and width */ - background-color: #fff; - padding: 2em; - border-radius: 5px; - display: flex; - flex-direction: column; - width: 40%; - min-width: 300px; - - .detail-container { - margin-top: 20px; - overflow-y: auto; - max-height: 50vh; - - .detail-item { - margin: 10px 0; - display: flex; - align-items: center; - - .key { - flex-basis: 30%; - margin-right: 10px; - font-weight: bold; - text-align: start !important; - } - - .value { - flex-basis: 70%; - text-align: start !important; - } - } - - .separator { - margin: 10px 0; - border: none; - border-bottom: 1px solid #ccc; - } - - .view-more { - display: flex; - justify-content: flex-start; - margin-top: 1.5em; - } - - .select { - display: flex; - justify-content: flex-start; - margin-top: 1.5em; - } - } -} - - -.close-button { - align-self: flex-end; - cursor: pointer; - font-weight: bold; - position: absolute; - padding: 7px; - top: 0; - right: 0; - border: 1px solid black; - margin-bottom: 20px; -} - - - -.option-details-dropdown { - position: absolute; - z-index: 999; - border: #D6D5D4 1px solid; - background-color: #fff; - padding: 10px; - border-radius: 5px; - width: 250px; - margin-left: -250px; -} - - -.modal-wrapper { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - display: flex; - justify-content: center; - align-items: center; - background-color: rgba(0, 0, 0, 0.5); - z-index: 9999; - overflow: auto; - /* Enable scrolling if content exceeds the viewport */ -} - -.modal-content { - background-color: #fff; - padding: 20px; - border: 1px solid #ccc; - border-radius: 4px; - max-width: 80%; - /* Adjust the maximum width as needed */ - box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); - max-height: 80vh; - /* Limit the maximum height to 80% of the viewport height */ - display: flex; - flex-direction: column; - justify-content: space-between; -} - -.modal-inner { - overflow-y: auto; - /* Enable scrolling within the modal */ -} - -.modal-content .employee-select-wrap .select input { - width: calc(100% - 32px); - background-color: initial; - position: relative !important; - z-index: 10; - width: 100%; - height: 100%; - outline: 2px solid transparent; - outline-offset: 2px; - padding-left: 8px; -} - -.modal-content .employee-select-wrap .select-active { - position: absolute; - display: block; - width: 100%; - height: 2.5rem; - --border-opacity: 1; - border: 1px solid #f47738; - border-color: rgba(244, 119, 56, var(--border-opacity)); -} - -.modal-content .label-field-pair { - display: -ms-flexbox; - display: block !important; - -ms-flex-align: center; - align-items: center; -} - -.modal-content .employee-select-wrap { - margin-bottom: 24px; -} - -.inbox-search-wrapper { - .add-new-container { - width: 100%; - display: flex; - flex-direction: row-reverse; - - .add-new { - position: relative; - color: #F47738; - cursor: pointer; - margin-right: 1em; - font-weight: bolder; - font-size: 23px; - } - } -} - -.multiselect { - display: flex; - align-items: center; - - @media (max-width: 588px) { - .info-icon-container { - position: absolute; - right: 2px; - margin-right: 0px !important; - margin-left: 0px !important; - display: flex; - justify-content: center; - margin-bottom: 0.7em; - } - } - - .info-icon-container { - margin-left: 0.7em; - margin-right: -2em; - display: flex; - justify-content: center; - margin-bottom: 0.7em; - } - - .info-icon-container .info-icon { - cursor: pointer; - } -} - -.link-container { - flex: 1; - display: flex; - align-items: center; - padding: 10px; - background-color: #bdc5d1; - - .view-all-link { - background-color: #bdc5d1; - color: #f47738; - font-size: 16px; - text-decoration: underline; - cursor: pointer; - } -} - -.action-bar { - display: flex; - flex-direction: row; - justify-content: flex-end; - - .action-bar-button { - margin-right: 0.5em; - } -} - -.progressBarContainer { - position: fixed; - bottom: 20px; - right: 20px; - background-color: #fff; - padding: 45px 45px 20px 20px; - border-radius: 8px; - box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); - z-index: 9999; - width: 25vw; - - @media (max-width: 768px) { - width: 70vw; - position: fixed; - bottom: 20px; - right: auto; - left: 50%; - transform: translateX(-50%); - } - - .progressBar { - display: flex; - flex-direction: row; - border-radius: 4px; - overflow: hidden; - border: 1px solid #ccc; - height: 20px; - background-color: #4CAF50; - } - - .progressHeading { - margin: 8px 0; - font-size: 16px; - - .success-container { - display: flex; - flex-direction: row; - background-color: #00703C; - color: #fff; - padding: 5px 10px; - border-radius: 5px; - width: fit-content; - align-items: center; - - .success-count { - background-color: #fff; - color: #00703C; - padding: 3px 5px; - border-radius: 3px; - margin-left: 5px; - } - } - } - - .closeButton { - position: absolute; - top: 10px; - right: 10px; - cursor: pointer; - padding: 2px; - border: 1px solid #ccc; - border-radius: 1px; - } - - .no-uploads { - margin-top: 1em; - } -} - -.results-container-orange { - max-height: 50vh; - overflow: auto; - margin-top: 1em; - border: 1px solid #ccc; - border-radius: 4px; - padding: 1em; - background-color: #ea8a3b !important; - - .no-errors { - background-color: #ea8a3b !important; - } -} - -.results-container { - max-height: 50vh; - overflow: auto; - margin-top: 1em; - border: 1px solid #ccc; - border-radius: 4px; - padding: 1em; - - .results-list-item { - border-bottom: 1px solid #ddd; - padding: 0.5em; - cursor: pointer; - - &:hover { - background-color: #D4351C; - color: white; - /* Yellowish color on hover */ - } - } - - .results-details { - white-space: pre-wrap; - border: 1px solid #ccc; - border-radius: 4px; - padding: 1em; - } -} - -.overlay { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - background-color: rgba(0, 0, 0, 0.3); - z-index: 9998; -} -.CloseLevelButton{ - font-size: 1rem; - margin-bottom: 24px; - /* margin-left: 24px; */ - position: relative; - right: auto; - border: none; -} - -.mdms-view-audit{ -visibility: hidden; -} -.audit-history{ -.diff{ - table-layout: fixed; -border-collapse: collapse; -width: 100%; -} -.diff-gutter-col { -width: 7ch; -} -.diff-code-delete { -background-color: #fdeff0; -} -.diff-line { -line-height: 1.5; -font-family: Consolas, Courier, monospace; -} -.diff-gutter-delete { -background-color: #fadde0; -} -.diff-gutter, .diff-gutter>a { -padding: 0 1ch; -text-align: right; -cursor: pointer; -user-select: none; -} -.diff-code { -white-space: pre-wrap; -word-wrap: break-word; -word-break: break-all; -padding: 0; -padding-left: .5em; -} -.diff td { -vertical-align: top; -padding-top: 0; -padding-bottom: 0; -} -.diff-gutter-insert { -background-color: #d6fedb; -} -.diff-gutter, .diff-gutter>a { -padding: 0 1ch; -text-align: right; -cursor: pointer; -user-select: none; -} -.diff-code-insert { -background-color: #eaffee; -} -} \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/typography.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/typography.scss deleted file mode 100644 index 4f428d7c6..000000000 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/typography.scss +++ /dev/null @@ -1,241 +0,0 @@ -@import url("../index.scss"); - -.typography { - &.text-heading-xl { - font-family: theme(digitv2.fontFamily.rc); - font-style: theme(digitv2.fontStyle.normal); - font-weight: theme(digitv2.fontWeight.bold); - color: theme(digitv2.lightTheme.text-color-primary); - line-height: theme(digitv2.lineHeight.normal); - - @media (min-width: theme(digitv2.screens.desktop)) { - font-size: theme(digitv2.fontSize.heading-xl.desktop); - } - - @media (min-width: theme(digitv2.screens.tablet)) { - font-size: theme(digitv2.fontSize.heading-xl.tablet); - } - - @media (min-width: theme(digitv2.screens.mobile)) { - font-size: theme(digitv2.fontSize.heading-xl.mobile); - } - } - - &.text-heading-l { - font-family: theme(digitv2.fontFamily.sans); - font-style: theme(digitv2.fontStyle.normal); - font-weight: theme(digitv2.fontWeight.bold); - color: theme(digitv2.lightTheme.text-color-primary); - line-height: theme(digitv2.lineHeight.normal); - - @media screen and (min-width: theme(digitv2.screens.desktop)) { - font-size: theme(digitv2.fontSize.heading-l.desktop); - } - @media screen and (min-width: theme(digitv2.screens.tablet)) { - font-size: theme(digitv2.fontSize.heading-l.tablet); - } - - @media screen and (min-width: theme(digitv2.screens.mobile)) { - font-size: theme(digitv2.fontSize.heading-l.mobile); - } - } - &.text-heading-m { - font-family: theme(digitv2.fontFamily.sans); - font-style: theme(digitv2.fontStyle.normal); - font-weight: theme(digitv2.fontWeight.bold); - color: theme(digitv2.lightTheme.text-color-primary); - line-height: theme(digitv2.lineHeight.normal); - - @media screen and (min-width: theme(digitv2.screens.desktop)) { - font-size: theme(digitv2.fontSize.heading-m.desktop); - } - @media screen and (min-width: theme(digitv2.screens.tablet)) { - font-size: theme(digitv2.fontSize.heading-m.tablet); - } - - @media screen and (min-width: theme(digitv2.screens.mobile)) { - font-size: theme(digitv2.fontSize.heading-m.desktop); - } - } - &.text-heading-s { - font-family: theme(digitv2.fontFamily.sans); - font-style: theme(digitv2.fontStyle.normal); - font-weight: theme(digitv2.fontWeight.bold); - color: theme(digitv2.lightTheme.text-color-primary); - line-height: theme(digitv2.lineHeight.normal); - - @media screen and (min-width: theme(digitv2.screens.desktop)) { - font-size: theme(digitv2.fontSize.heading-s.desktop); - } - @media screen and (min-width: theme(digitv2.screens.tablet)) { - font-size: theme(digitv2.fontSize.heading-s.tablet); - } - - @media screen and (min-width: theme(digitv2.screens.mobile)) { - font-size: theme(digitv2.fontSize.heading-s.mobile); - } - } - &.text-heading-xs { - @media screen and (min-width: theme(digitv2.screens.mobile)) { - font-size: theme(digitv2.fontSize.heading-xs.mobile); - font-family: theme(digitv2.fontFamily.sans); - font-style: theme(digitv2.fontStyle.normal); - font-weight: theme(digitv2.fontWeight.bold); - color: theme(digitv2.lightTheme.text-color-primary); - line-height: theme(digitv2.lineHeight.normal); - } - } - &.text-caption-l { - font-family: theme(digitv2.fontFamily.sans); - font-style: theme(digitv2.fontStyle.italic); - font-weight: theme(digitv2.fontWeight.medium); - color: theme(digitv2.lightTheme.text-color-primary); - line-height: theme(digitv2.lineHeight.normal); - - @media screen and (min-width: theme(digitv2.screens.desktop)) { - font-size: theme(digitv2.fontSize.caption-l.desktop); - } - @media screen and (min-width: theme(digitv2.screens.tablet)) { - font-size: theme(digitv2.fontSize.caption-l.tablet); - } - - @media screen and (min-width: theme(digitv2.screens.mobile)) { - font-size: theme(digitv2.fontSize.caption-l.mobile); - } - } - - &.text-caption-m { - font-family: theme(digitv2.fontFamily.sans); - font-style: theme(digitv2.fontStyle.italic); - font-weight: theme(digitv2.fontWeight.medium); - color: theme(digitv2.lightTheme.text-color-primary); - line-height: theme(digitv2.lineHeight.normal); - - @media screen and (min-width: theme(digitv2.screens.desktop)) { - font-size: theme(digitv2.fontSize.caption-m.desktop); - } - @media screen and (min-width: theme(digitv2.screens.tablet)) { - font-size: theme(digitv2.fontSize.caption-m.tablet); - } - - @media screen and (min-width: theme(digitv2.screens.mobile)) { - font-size: theme(digitv2.fontSize.caption-m.mobile); - } - } - - &.text-caption-s { - font-family: theme(digitv2.fontFamily.sans); - font-style: theme(digitv2.fontStyle.italic); - font-weight: theme(digitv2.fontWeight.medium); - color: theme(digitv2.lightTheme.text-color-primary); - line-height: theme(digitv2.lineHeight.normal); - - @media screen and (min-width: theme(digitv2.screens.desktop)) { - font-size: theme(digitv2.fontSize.caption-s.desktop); - } - @media screen and (min-width: theme(digitv2.screens.tablet)) { - font-size: theme(digitv2.fontSize.caption-s.tablet); - } - - @media screen and (min-width: theme(digitv2.screens.mobile)) { - font-size: theme(digitv2.fontSize.caption-s.desktop); - } - } - &.text-body-l { - font-family: theme(digitv2.fontFamily.sans); - font-style: theme(digitv2.fontStyle.italic); - font-weight: theme(digitv2.fontWeight.regular); - color: theme(digitv2.lightTheme.text-color-primary); - - @media screen and (min-width: theme(digitv2.screens.desktop)) { - font-size: theme(digitv2.fontSize.body-l.desktop); - line-height: theme(digitv2.lineHeight.line-height-body-l.desktop); - } - @media screen and (min-width: theme(digitv2.screens.tablet)) { - font-size: theme(digitv2.fontSize.body-l.tablet); - line-height: theme(digitv2.lineHeight.line-height-body-l.tablet); - } - - @media screen and (min-width: theme(digitv2.screens.mobile)) { - font-size: theme(digitv2.fontSize.body-l.mobile); - line-height: theme(digitv2.lineHeight.line-height-body-l.mobile); - } - } - &.text-body-s { - font-family: theme(digitv2.fontFamily.sans); - font-style: theme(digitv2.fontStyle.italic); - font-weight: theme(digitv2.fontWeight.regular); - color: theme(digitv2.lightTheme.text-color-primary); - - @media screen and (min-width: theme(digitv2.screens.desktop)) { - font-size: theme(digitv2.fontSize.body-s.desktop); - line-height: theme(digitv2.lineHeight.line-height-body-s.desktop); - } - @media screen and (min-width: theme(digitv2.screens.tablet)) { - font-size: theme(digitv2.fontSize.body-s.tablet); - line-height: theme(digitv2.lineHeight.line-height-body-s.tablet); - } - - @media screen and (min-width: theme(digitv2.screens.mobile)) { - font-size: theme(digitv2.fontSize.body-s.mobile); - line-height: theme(digitv2.lineHeight.line-height-body-s.mobile); - } - } - &.text-body-xs { - font-family: theme(digitv2.fontFamily.sans); - font-style: theme(digitv2.fontStyle.italic); - font-weight: theme(digitv2.fontWeight.regular); - color: theme(digitv2.lightTheme.text-color-primary); - - @media screen and (min-width: theme(digitv2.screens.desktop)) { - font-size: theme(digitv2.fontSize.body-xs.desktop); - line-height: theme(digitv2.lineHeight.line-height-body-xs.desktop); - } - @media screen and (min-width: theme(digitv2.screens.tablet)) { - font-size: theme(digitv2.fontSize.body-xs.tablet); - line-height: theme(digitv2.lineHeight.line-height-body-xs.tablet); - } - - @media screen and (min-width: theme(digitv2.screens.mobile)) { - font-size: theme(digitv2.fontSize.body-xs.mobile); - line-height: theme(digitv2.lineHeight.line-height-body-xs.mobile); - } - } - &.text-label { - font-family: theme(digitv2.fontFamily.sans); - font-style: theme(digitv2.fontStyle.italic); - font-weight: theme(digitv2.fontWeight.regular); - color: theme(digitv2.lightTheme.text-color-primary); - line-height: theme(digitv2.lineHeight.normal); - - @media screen and (min-width: theme(digitv2.screens.desktop)) { - font-size: theme(digitv2.fontSize.label.desktop); - } - @media screen and (min-width: theme(digitv2.screens.tablet)) { - font-size: theme(digitv2.fontSize.label.tablet); - } - - @media screen and (min-width: theme(digitv2.screens.mobile)) { - font-size: theme(digitv2.fontSize.label.mobile); - } - } - &.text-link { - font-family: theme(digitv2.fontFamily.sans); - font-style: theme(digitv2.fontStyle.normal); - font-weight: theme(digitv2.fontWeight.regular); - color: theme(digitv2.lightTheme.text-color-primary); - line-height: theme(digitv2.lineHeight.normal); - text-decoration: theme(digitv2.textDecorationLine.underline); - - @media screen and (min-width: theme(digitv2.screens.desktop)) { - font-size: theme(digitv2.fontSize.link.desktop); - } - @media screen and (min-width: theme(digitv2.screens.tablet)) { - font-size: theme(digitv2.fontSize.link.tablet); - } - - @media screen and (min-width: theme(digitv2.screens.mobile)) { - font-size: theme(digitv2.fontSize.link.mobile); - } - } -} \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/index.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/index.scss index d49f22b40..2e19e082d 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/index.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/index.scss @@ -106,38 +106,7 @@ @import "./pages/citizen/updatePropertyNumber.scss"; @import "./pages/citizen/citizenDocument.scss"; @import "./pages/employee/surveys.scss"; -@import "./digitv2/index.scss"; -/* @import "./digitv2/typography.scss"; */ @import "./components/inboxv2/index.scss"; -@import "./components//sidebar.scss"; -@import "./components/loaderWithGap.scss"; - -.wbh-header-container { - display: flex !important; - align-items: center; - justify-content: space-between; - margin:1rem 0.5rem -0.5rem 0.3rem; -} - -.wbh-header { - display: flex !important; - align-items: center; - justify-content: space-between; - margin:1rem 0.5rem -0.5rem 0.3rem; - .header-icon-container{ - cursor: pointer; - h4{ - margin:0px !important; - } - color:#f47738; - display: flex !important; - align-items: center; - svg { - margin:0 0 0 0.1rem; - } - } - -} .display-none { display: none; @@ -147,11 +116,6 @@ padding: unset !important; } -h1, h2, h3, h4, h5, h6 { - font-size: inherit; - font-weight: inherit; } - - .flex-one { @apply flex-1; } @@ -211,13 +175,6 @@ h1, h2, h3, h4, h5, h6 { @apply mb-sm; } -.employeeCard { - /* TODO need to revisit that we need mx-md NABEEL/ANIL - @apply mb-md mx-md !important; - */ - @apply mb-md !important; -} - .home-link { margin-left: 16px; margin-bottom: 16px; @@ -293,19 +250,6 @@ h1, h2, h3, h4, h5, h6 { color: theme(colors.text.primary) !important; } -input[readonly] { - @apply border-grey-dark !important; - background-color: theme(digitv2.lightTheme.background); - border-color: theme(digitv2.lightTheme.text-color-secondary); - color: theme(digitv2.lightTheme.text-color-secondary); -} - -.hide-input-type-file { - position: absolute; - clip: rect(0, 0, 0, 0); - pointer-events: none !important; -} - @media (hover: hover) { .primary-label-btn { &:hover { @@ -364,7 +308,6 @@ input[type="number"] { -moz-appearance: textfield; } - .static { @apply flex flex-col; min-height: 85vh; @@ -487,7 +430,6 @@ input[type="number"] { .text-input { @apply relative w-full; - max-width: 540px; input { &:hover { @apply border-2 border-solid border-primary-main; @@ -613,10 +555,11 @@ input[type="number"] { .full-employee-card-link { width: 100% !important; margin: 7px 0px; - a { + a{ color: inherit; - text-decoration: inherit; + text-decoration: inherit } + } .full-employee-card-height { height: unset !important; @@ -789,39 +732,4 @@ input[type="number"] { max-height: 120px; margin-top: 90px; } -.localisation-info { - max-width: 100%; - .info-banner-wrap { - max-width: 100%; - margin: 0%; - margin-bottom: 1rem; - display: flex; - align-items: center; - line-height: unset; - align-content: baseline; - gap: 0.5rem; - height: 5rem; - } -} -.info-banner-wrap div{ - align-items: center; -} - -.xls-popup-module { - margin: auto; - width: calc(100% - 5rem); -} -.actionBarClass{ - display: flex; - justify-content: space-between; - flex-direction: row-reverse; -} -.previous-button{ - margin-left: 4rem; -} -.view-composer-header-section{ - display: flex; - justify-content: space-between; - align-items: center; -} \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/container.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/container.scss index ee8cd2354..c1ad451a0 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/container.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/container.scss @@ -19,7 +19,7 @@ } .employee-home-footer { - @apply flex h-10 pb-md pt-sm justify-center w-full; + @apply flex h-10 bg-grey-bg pb-md pt-sm justify-center w-full; img { height: 100%; } diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/inbox.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/inbox.scss index 1d193dca7..839c86b07 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/inbox.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/inbox.scss @@ -447,6 +447,16 @@ height: 263px !important; } } + +@screen dt { + .customEmployeeWarnings { + margin-left: 2.6rem !important; + margin-top: -4rem !important; + width: 65% !important; + } +} + + .employeeTotalLink { color: theme(colors.text.secondary); font-size: 16px; @@ -530,28 +540,20 @@ } .search-tabs-container { + border-bottom: 1px solid rgba(0, 0, 0, 0.2); + margin-bottom: 35px; display: flex; justify-content: space-between; - background-color: #eee; .search-tab-head { padding: 10px 35px; - font-weight: 700; - font-size: 1rem; - border: 1px solid #d6d5d4; - border-radius: 0.5rem 0.5rem 0 0; } .search-tab-head-selected { padding: 10px 35px; color: rgb(244, 119, 56); - background-color: #fff; - border: 1px solid #f47738; - border-radius: 0.5rem 0.5rem 0 0; border-bottom: 4px solid rgb(244, 119, 56); - font-weight: 700; - font-size: 1.125rem; - margin-bottom: -1rem; + font-weight: bold; } .search-tab-head-selected:focus { diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/index.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/index.scss index 6a565629d..5aad56dd9 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/index.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/index.scss @@ -111,11 +111,11 @@ .sidebar { position: fixed; left: 0; - background: #0B4B66; + background: theme(colors.secondary); height: 100%; color: theme(colors.white); - margin-top: 83px; - z-index: 999; + margin-top: 80px; + z-index: 10; transition: 0.3s ease all; white-space: nowrap; height: calc(100vh - 36px); @@ -146,19 +146,10 @@ align-items: center; padding: 20px; font-size: 14px; - - &.level-0 { - margin:0 0.3rem 0 0.3rem; - &.select-level{ - border-top: 1px solid; - border-bottom: 1px solid; - } - } - &.active { color: theme(colors.primary.main) !important; - border-right: none; + border-right: 4px solid theme(colors.primary.main); svg { fill: theme(colors.primary.main) !important; } @@ -186,16 +177,15 @@ } &:hover { - - background-color: #0B4B66; + color: theme(colors.primary.main) !important; + background-color: #486480; cursor: pointer; - + svg { + fill: theme(colors.primary.main) !important; + } } .search-icon-wrapper { - border: 2px solid theme(colors.white); - border-radius: 4px; - padding: 5px; svg { fill: theme(colors.white) !important; width: 21px; @@ -226,32 +216,17 @@ fill: theme(colors.white); } &:hover { - background-color: #6A8E9D; - opacity: 0.8; + color: #fe7a51 !important; + background-color: #486480; cursor: pointer; svg { fill: #fe7a51 !important; } } - - &.active { - border-left: 4px solid theme(colors.primary.main); - &.level-0 { - - } - &.level-1 { - border-left: 8.5px solid theme(colors.primary.main); - } - &.level-2 { - border-left: 4px solid theme(colors.primary.main); - } - - &.level-3{ - - } color: theme(colors.primary.main) !important; - border-right: none; + + border-right: 4px solid theme(colors.primary.main); svg { fill: theme(colors.primary.main) !important; } @@ -420,7 +395,6 @@ display: flex; flex-direction: column; padding-top: 80px; - margin-left: 72px; width: calc(100%-83px); } .citizen-home-container { @@ -541,38 +515,9 @@ text-decoration: none; div{ span{ - color: theme(colors.primary.main) !important; - text-decoration: none; - } - } -} -} -.bread-crumb { - a{ - color: inherit; - text-decoration: inherit - } -} - -.sidebar-link{ - .custom-link{ + color: #f47738; text-decoration: none; - div{ - span{ - color: theme(colors.white); - text-decoration: none; - } } } - } - .mandatory-span { - margin-left: 0.5rem; - color: red !important; - font-size: 1rem; - font-weight: 700; - } - -/* TODO fix required NABEEL/ANIL for home screen card */ - .customEmployeeCard { - @apply m-sm !important; - } +} +} \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/login.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/login.scss index 1ad97f693..11e44e28c 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/login.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/login.scss @@ -5,30 +5,23 @@ } } } - -.banner .bannerCard { +.banner .bannerCard{ min-width: 420px !important; } - .employeeForgotPassword .employeeCard .field .field-container .component-in-front { margin-top: 0; border: 1px solid; border-right: none; padding: 7px; } - @screen dt { .employeeForgotPassword .employeeCard .field .field-container .component-in-front { padding: 7px; } - - .loginFormStyleEmployee .employeeCard, - .banner .bannerCard { + .loginFormStyleEmployee .employeeCard, .banner .bannerCard{ min-width: 420px !important; } - - .employeeForgotPassword .employeeCard, - .employeeChangePassword .employeeCard { + .employeeForgotPassword .employeeCard, .employeeChangePassword .employeeCard{ max-width: 420px !important; min-width: 420px !important; } @@ -42,63 +35,51 @@ .employeeForgotPassword .field-container { margin: 10px 0; } - .employeeForgotPassword { .submit-bar { @apply w-full; } } - .employeeChangePassword .submit-bar { width: 100% !important; } - .employeeChangePassword .card-text { text-align: center; } - .employeeChangePassword .input-otp-wrap { text-align: center; } - .submit-bar { .submit-bar { @apply w-full; } } - .loginFormStyleEmployee .bannerHeader p, .employeeForgotPassword .bannerHeader p, .employeeChangePassword .bannerHeader p { font-size: 19px; } - .employeeCard .card-sub-header { font-size: 24px; } - -.loginFormStyleEmployee .employeeCard .card-label, -.employeeForgotPassword .employeeCard .card-label { +.loginFormStyleEmployee .employeeCard .card-label, .employeeForgotPassword .employeeCard .card-label{ font-weight: normal; font-size: 16px; line-height: 19px; color: theme(colors.text.primary); margin-top: 20px; } - .banner .bannerHeader { margin-bottom: 20px; } - -.employeeCard .card-label { +.employeeCard .card-label{ font-weight: normal; font-size: 16px; line-height: 19px; color: theme(colors.text.primary); } - -.profile-label-margin { - margin-top: 10px; +.profile-label-margin{ + margin-top: 10px; } .employeeForgotPassword .employeeCard .card-label-desc { @@ -108,169 +89,100 @@ color: theme(colors.text.secondary); margin-top: 15px; } - .employeeChangePassword .employeeCard .card-text { margin-bottom: 15px; font-size: 16px; color: theme(colors.text.secondary); } - @media screen and (max-width: 768px) { .employeeChangePassword .employeeCard .card-text { margin-top: 7px; } - .employeeCard .card-sub-header { font-size: 18px; } } - .employeeChangePassword .employeeCard .card-text-button { text-align: center !important; margin-bottom: 12px !important; } - .employeeChangePassword .employeeCard .input-otp-wrap { margin-bottom: 10px; } - .employee .loginContainer { padding-top: 0px !important; } - .banner { - height: calc(100vh) !important; + height: calc(100vh ) !important; } -.employeeChangePassword .employeeCard .field .field-container { +.employeeChangePassword .employeeCard .field .field-container{ margin-bottom: 24px; } -.employeeForgotPassword .employeeCard .employee-card-sub-header, -.employeeChangePassword .employeeCard .employee-card-sub-header, -.loginFormStyleEmployee .employeeCard .employee-card-sub-header { +.employeeForgotPassword .employeeCard .employee-card-sub-header, .employeeChangePassword .employeeCard .employee-card-sub-header, .loginFormStyleEmployee .employeeCard .employee-card-sub-header{ font-size: 24px !important; line-height: 28px !important; margin-bottom: 0px !important; } - -@media screen and (max-width : 768px) { - - .employeeForgotPassword .employeeCard .employee-card-sub-header, - .employeeChangePassword .employeeCard .employee-card-sub-header, - .loginFormStyleEmployee .employeeCard .employee-card-sub-header { +@media screen and (max-width : 768px){ + .employeeForgotPassword .employeeCard .employee-card-sub-header, .employeeChangePassword .employeeCard .employee-card-sub-header, .loginFormStyleEmployee .employeeCard .employee-card-sub-header{ font-size: 18px !important; line-height: 21px !important; margin-bottom: 0px !important; } - - .loginFormStyleEmployee .employeeCard, - .banner .bannerCard { + .loginFormStyleEmployee .employeeCard, .banner .bannerCard{ min-width: 340px !important; margin: 10px !important; } - - .employeeForgotPassword .employeeCard, - .employeeChangePassword .employeeCard { + .employeeForgotPassword .employeeCard, .employeeChangePassword .employeeCard{ max-width: 360px !important; min-width: 340px !important; margin: 10px !important; } } - -.employeeChangePassword .employeeCard .card-text { +.employeeChangePassword .employeeCard .card-text{ margin-top: 18px !important; margin-bottom: 20px !important; } - -.employeeBackbuttonAlign { +.employeeBackbuttonAlign{ display: none; } - -.resend-otp { +.resend-otp{ cursor: pointer; } .employee-select-wrap.login-city-dd { - .options-card { - max-height: 200px; + .options-card{ + max-height: 200px; } } - -@media screen and (max-width: 768px) { - .employeeBackbuttonAlign { +@media screen and (max-width: 768px){ + .employeeBackbuttonAlign{ display: block; position: absolute; top: 20px; left: 20px; } - - .banner { + .banner{ align-items: flex-end; padding-bottom: 40px; height: 100vh !important; } - - .topbar { + .topbar{ background: rgba(34, 57, 77, var(--bg-opacity)) !important; color: white; } - - .employee .loginContainer { + .employee .loginContainer{ padding-top: 0px !important; } - - .removeBottomMargin { + .removeBottomMargin{ margin-bottom: 0px !important; } - .employee-select-wrap.login-city-dd { - .options-card { - max-height: 160px; + .options-card{ + max-height: 160px; } } } - -.loginFormStyleEmployee { - .loginCardSubHeaderClassName { - text-align: center !important; - } - - .loginCardClassName { - margin: auto !important; - min-width: 408px !important; - - header.employee-card-sub-header { - text-align: center; - margin-top: 10px; - } - - header.digit-header-content { - &:not(.label){ - text-align: center; - } - } - } - - .buttonClassName { - max-width: 100% !important; - width: 100% !important - } - - .field .field-container .text-input input { - margin-bottom: 24px !important; - } - - .bannerHeader { - margin-bottom: 0px !important; - } - - .primary-label-btn { - margin: 20px auto 0 auto !important; - } - - .employee-select-wrap .options-card { - max-height: 150px !important; - } -} \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/scroll-table.scss b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/scroll-table.scss index c6637ebbc..1a3dd3b64 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/scroll-table.scss +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/scroll-table.scss @@ -111,9 +111,4 @@ color: #B1B4B6; flex: none; flex-grow: 0; margin: 0px 0px; -} - -.icon-wrapper { - margin-left:1rem; - cursor:pointer } \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/tailwind.config.js b/frontend/micro-ui/web/micro-ui-internals/packages/css/tailwind.config.js index 1e256ad26..0ccfc7a5c 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/tailwind.config.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/tailwind.config.js @@ -12,7 +12,7 @@ module.exports = { colors: { primary: { light: "#F18F5E", - main: "#c84c0e", + main: "#F47738", dark: "#C8602B", }, secondary: "#22394D", @@ -25,9 +25,9 @@ module.exports = { hover: "#003078", }, border: "#D6D5D4", - inputBorder: "#464646", + inputBorder:"#464646", "input-border": "#464646", - focus: "#c84c0e", + focus: "#F47738", error: "#D4351C", success: "#00703C", black: "#000000", @@ -101,131 +101,7 @@ module.exports = { 10: "10px", }, extend: {}, - digitv2: { - lightTheme: { - primary: "#c84c0e", - "text-color-primary": "#0B0C0C", - "text-color-secondary": "#505A5F", - "text-color-disabled": "#B1B4B6", - background: "#EEEEEE", - paper: "#FFFFFF", - "paper-secondary": "#FAFAFA", - divider: "#D6D5D4", - "header-sidenav": "#0B4B66", - "input-border": "#505A5F", - "primary-bg": "#FEEFE7", - }, - alert: { - error: "#D4351C", - "error-bg": "#EFC7C1", - success: "#00703C", - "success-bg": "#BAD6C9", - info: "#3498DB", - "info-bg": "#C7E0F1", - }, - chart: { - "chart-1": "#048BD0", - "chart-1-gradient": "#048BD0", - "chart-2": "#FBC02D", - "chart-2-gradient": "#FBC02D", - "chart-3": "#8E29BF", - "chart-4": "#EA8A3B", - "chart-5": "#0BABDE", - }, - fontSize: { - "heading-xl": { - mobile: "2rem", - tablet: "2.25rem", - desktop: "2.5rem", - }, - "heading-l": { - mobile: "1.5rem", - tablet: "1.75rem", - desktop: "2rem", - }, - "heading-m": { - mobile: "1.25rem", - tablet: "1.375rem", - desktop: "1.5rem", - }, - "heading-s": { - mobile: "1rem", - tablet: "1rem", - desktop: "1rem", - }, - "heading-xs": { - mobile: "0.75rem", - }, - "caption-l": { - mobile: "1.5rem", - tablet: "1.75rem", - desktop: "1.75rem", - }, - "caption-m": { - mobile: "1.25rem", - tablet: "1.5rem", - desktop: "1.5rem", - }, - "caption-s": { - mobile: "1rem", - tablet: "1.25rem", - desktop: "1.25rem", - }, - "body-l": { - mobile: "1rem", - tablet: "1.25rem", - desktop: "1.25rem", - }, - "body-s": { - mobile: "0.875rem", - tablet: "1rem", - desktop: "1rem", - }, - "body-xs": { - mobile: "0.75rem", - tablet: "0.875rem", - desktop: "0.875rem", - }, - label: { - mobile: "1rem", - tablet: "1rem", - desktop: "1rem", - }, - link: { - mobile: "1rem", - tablet: "1rem", - desktop: "1rem", - }, - }, - fontFamily: { - sans: ["Roboto"], - rc: ['"Roboto Condensed"'], - }, - fontStyle: { - normal: "normal", - italic: "italic", - }, - textDecorationLine: { - underline: "underline", - }, - fontWeight: { - regular: 400, - medium: 500, - bold: 700, - }, - lineHeight: { - "line-height-body-l": { mobile: "1.5rem", tablet: "1.75rem", desktop: "1.75rem" }, - "line-height-body-s": { mobile: "1.0938rem", tablet: "1.5rem", desktop: "1.5rem" }, - "line-height-body-xs": { mobile: "1.125rem", tablet: "1.5rem", desktop: "1.5rem" }, - normal: "normal", - }, - screens: { - mobile: "400px", - tablet: "768px", - desktop: "1024px", - }, - }, }, variants: {}, plugins: [], -}; \ No newline at end of file +}; From f3da4badfbecc72ac090a53d24c6b493eee3f9ff Mon Sep 17 00:00:00 2001 From: Nipun Arora Date: Fri, 5 Jul 2024 15:39:03 +0530 Subject: [PATCH 108/118] updated css package --- .../micro-ui/web/micro-ui-internals/example/public/index.html | 2 +- .../micro-ui/web/micro-ui-internals/packages/css/package.json | 2 +- frontend/micro-ui/web/package.json | 2 +- frontend/micro-ui/web/public/index.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/example/public/index.html b/frontend/micro-ui/web/micro-ui-internals/example/public/index.html index d34726016..7f9fb8602 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/public/index.html +++ b/frontend/micro-ui/web/micro-ui-internals/example/public/index.html @@ -13,7 +13,7 @@ - + diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/css/package.json b/frontend/micro-ui/web/micro-ui-internals/packages/css/package.json index ee5f0b475..1e4e5f0d8 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/css/package.json +++ b/frontend/micro-ui/web/micro-ui-internals/packages/css/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-css", - "version": "1.5.52", + "version": "1.5.54", "license": "MIT", "main": "dist/index.css", "author": "Jagankumar ", diff --git a/frontend/micro-ui/web/package.json b/frontend/micro-ui/web/package.json index a9ba64e8f..7e10d2c5c 100644 --- a/frontend/micro-ui/web/package.json +++ b/frontend/micro-ui/web/package.json @@ -18,7 +18,7 @@ "@egovernments/digit-ui-libraries": "1.5.7", "@egovernments/digit-ui-module-dss": "1.5.34", "@egovernments/digit-ui-module-core": "1.5.46", - "@egovernments/digit-ui-css": "1.5.52", + "@egovernments/digit-ui-css": "1.5.54", "@egovernments/digit-ui-module-hrms": "1.5.27", "@egovernments/digit-ui-module-pgr": "1.7.0", "@egovernments/digit-ui-module-engagement": "1.5.20", diff --git a/frontend/micro-ui/web/public/index.html b/frontend/micro-ui/web/public/index.html index fb0077fd1..79178b5bd 100644 --- a/frontend/micro-ui/web/public/index.html +++ b/frontend/micro-ui/web/public/index.html @@ -10,7 +10,7 @@ - + From 8234d7dc2c98f51bbd8303f435a3c5d8397e1a0a Mon Sep 17 00:00:00 2001 From: Taniya-eGov Date: Fri, 5 Jul 2024 17:07:32 +0530 Subject: [PATCH 109/118] addded user call in plainsearch --- .../egov/hrms/service/EmployeeService.java | 25 ++++++++++++++++--- .../web/controller/EmployeeController.java | 4 +-- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/business-services/egov-hrms/src/main/java/org/egov/hrms/service/EmployeeService.java b/business-services/egov-hrms/src/main/java/org/egov/hrms/service/EmployeeService.java index 2282fa671..b8d5bbb0d 100644 --- a/business-services/egov-hrms/src/main/java/org/egov/hrms/service/EmployeeService.java +++ b/business-services/egov-hrms/src/main/java/org/egov/hrms/service/EmployeeService.java @@ -222,7 +222,7 @@ public EmployeeResponse search(EmployeeSearchCriteria criteria, RequestInfo requ * @param criteria * @return */ - public List plainsearch(EmployeePlainSearchCriteria criteria) { + public List plainsearch(EmployeePlainSearchCriteria criteria,RequestInfo requestInfo) { if (criteria.getLimit() != null && criteria.getLimit() > propertiesManager.getHrmsMaxLimit()) criteria.setLimit(propertiesManager.getHrmsMaxLimit()); @@ -233,12 +233,31 @@ public List plainsearch(EmployeePlainSearchCriteria criteria) { else employeeIds = criteria.getUuids(); + EmployeePlainSearchCriteria employeePlainSearchCriteria = EmployeePlainSearchCriteria.builder().uuids(employeeIds).build(); + List employees=repository.fetchPlainSearchEmployees(employeePlainSearchCriteria); + + Map mapOfUsers = new HashMap(); + + if(!CollectionUtils.isEmpty(employeeIds)){ + Map UserSearchCriteria = new HashMap<>(); + UserSearchCriteria.put(HRMSConstants.HRMS_USER_SEARCH_CRITERA_UUID,employeeIds); + if(mapOfUsers.isEmpty()){ + UserResponse userResponse = userService.getUser(requestInfo, UserSearchCriteria); + if(!CollectionUtils.isEmpty(userResponse.getUser())) { + mapOfUsers = userResponse.getUser().stream() + .collect(Collectors.toMap(User :: getUuid, Function.identity())); + } + } + for(Employee employee: employees){ + employee.setUser(mapOfUsers.get(employee.getUuid())); + } + } if(employeeIds.isEmpty()) return Collections.emptyList(); - EmployeePlainSearchCriteria employeePlainSearchCriteria = EmployeePlainSearchCriteria.builder().uuids(employeeIds).build(); - return repository.fetchPlainSearchEmployees(employeePlainSearchCriteria); + + return employees; } /** diff --git a/business-services/egov-hrms/src/main/java/org/egov/hrms/web/controller/EmployeeController.java b/business-services/egov-hrms/src/main/java/org/egov/hrms/web/controller/EmployeeController.java index e0a0ec2b7..8676b3878 100644 --- a/business-services/egov-hrms/src/main/java/org/egov/hrms/web/controller/EmployeeController.java +++ b/business-services/egov-hrms/src/main/java/org/egov/hrms/web/controller/EmployeeController.java @@ -151,10 +151,10 @@ private ResponseEntity countV1(@RequestParam("tenantId") String tenantId, @Re @PostMapping("/_plainsearch") @ResponseBody - private ResponseEntity plainsearch(@RequestBody @Valid RequestInfoWrapper requestInfoWrapper, @ModelAttribute @Valid EmployeePlainSearchCriteria criteria) { + private ResponseEntity plainsearch(@RequestBody @Valid RequestInfoWrapper requestInfoWrapper, @ModelAttribute @Valid EmployeePlainSearchCriteria criteria,@RequestBody RequestInfo requestInfo) { EmployeeResponse employeeResponse = EmployeeResponse.builder().responseInfo(factory.createResponseInfoFromRequestInfo(requestInfoWrapper.getRequestInfo(), true)) - .employees(employeeService.plainsearch(criteria)).build(); + .employees(employeeService.plainsearch(criteria,requestInfo)).build(); return new ResponseEntity<>(employeeResponse,HttpStatus.OK); } From aba0a5fe3a6b0fe03c19a86a25c037e3f64328c7 Mon Sep 17 00:00:00 2001 From: debasishchakraborty-egovt Date: Mon, 8 Jul 2024 11:14:12 +0530 Subject: [PATCH 110/118] indexersearchIssue: Added ssl certificate and auth while calling Indexer --- .../WaterConnectionApplication.java | 38 +++++++++++++++++++ .../config/WSConfiguration.java | 6 +++ .../repository/ElasticSearchRepository.java | 11 +++++- .../src/main/resources/application.properties | 4 ++ 4 files changed, 58 insertions(+), 1 deletion(-) diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/WaterConnectionApplication.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/WaterConnectionApplication.java index 11e2bd9f7..961f3adc5 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/WaterConnectionApplication.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/WaterConnectionApplication.java @@ -3,6 +3,10 @@ import java.util.TimeZone; import javax.annotation.PostConstruct; +import javax.net.ssl.*; +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; +import org.springframework.web.client.RestTemplate; import org.egov.tracer.config.TracerConfiguration; import org.springframework.beans.factory.annotation.Value; @@ -33,10 +37,44 @@ public static void main(String[] args) { } + public static void trustSelfSignedSSL() { + try { + SSLContext ctx = SSLContext.getInstance("TLS"); + X509TrustManager tm = new X509TrustManager() { + public void checkClientTrusted(X509Certificate[] xcs, String string) throws CertificateException { + } + + public void checkServerTrusted(X509Certificate[] xcs, String string) throws CertificateException { + } + + public X509Certificate[] getAcceptedIssuers() { + return null; + } + }; + ctx.init(null, new TrustManager[]{tm}, null); + SSLContext.setDefault(ctx); + + // Disable hostname verification + HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier() { + public boolean verify(String hostname, javax.net.ssl.SSLSession sslSession) { + return true; + } + }); + } catch (Exception ex) { + ex.printStackTrace(); + } + } + @Bean public ObjectMapper objectMapper() { return new ObjectMapper().configure(MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES, true) .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES).setTimeZone(TimeZone.getTimeZone(timeZone)); } + @Bean + public RestTemplate restTemplate() { + trustSelfSignedSSL(); + return new RestTemplate(); + } + } diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/config/WSConfiguration.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/config/WSConfiguration.java index 1ee4ced6d..7f418bd30 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/config/WSConfiguration.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/config/WSConfiguration.java @@ -277,6 +277,12 @@ public class WSConfiguration { @Value("${egov.es.search.endpoint}") private String esSearchEndpoint; + @Value("${egov.indexer.es.username}") + private String esUsername; + + @Value("${egov.indexer.es.password}") + private String esPassword; + @Value("${egov.ws.search.name.fuziness}") private String nameFuziness; diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/ElasticSearchRepository.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/ElasticSearchRepository.java index dfca87fa5..3351dd860 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/ElasticSearchRepository.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/ElasticSearchRepository.java @@ -1,6 +1,7 @@ package org.egov.waterconnection.repository; import java.util.List; +import java.util.Base64; import org.egov.tracer.model.CustomException; import org.egov.waterconnection.config.WSConfiguration; @@ -54,6 +55,9 @@ public Object fuzzySearchProperties(SearchCriteria criteria, List ids) { HttpHeaders headers = new HttpHeaders(); headers.setContentType(MediaType.APPLICATION_JSON); + headers.add("Authorization", getESEncodedCredentials()); + final HttpEntity entity = new HttpEntity( headers); + // response = restTemplate.exchange(url.toString(), HttpMethod.GET, entity, Map.class); HttpEntity requestEntity = new HttpEntity<>(searchQuery, headers); ResponseEntity response = null; try { @@ -82,7 +86,12 @@ private String getESURL() { return builder.toString(); } - + public String getESEncodedCredentials() { + String credentials = config.getEsUsername() + ":" + config.getEsPassword(); + byte[] credentialsBytes = credentials.getBytes(); + byte[] base64CredentialsBytes = Base64.getEncoder().encode(credentialsBytes); + return "Basic " + new String(base64CredentialsBytes); + } } diff --git a/municipal-services/ws-services/src/main/resources/application.properties b/municipal-services/ws-services/src/main/resources/application.properties index 8fb78d02c..15949ae21 100644 --- a/municipal-services/ws-services/src/main/resources/application.properties +++ b/municipal-services/ws-services/src/main/resources/application.properties @@ -202,3 +202,7 @@ sms.edit.water.connection.notification.enabled: true sms.payment.notification.enabled: true sms.feedback.notification.enabled: false sms.workflow.enabled: true + +#ES-config +egov.indexer.es.username=elastic +egov.indexer.es.password=8fwbD6HbJh6HU0oddsHm8TEI From 0d18c4dff8dc7007ec30a6cb95d759f6e3b20562 Mon Sep 17 00:00:00 2001 From: debasishchakraborty-egovt Date: Mon, 8 Jul 2024 11:53:59 +0530 Subject: [PATCH 111/118] indexersearchIssue: Added ssl certificate and auth while calling Indexer --- .../WaterConnectionApplication.java | 38 -------------- .../repository/ElasticSearchRepository.java | 49 +++++++++++++++++-- 2 files changed, 44 insertions(+), 43 deletions(-) diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/WaterConnectionApplication.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/WaterConnectionApplication.java index 961f3adc5..11e2bd9f7 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/WaterConnectionApplication.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/WaterConnectionApplication.java @@ -3,10 +3,6 @@ import java.util.TimeZone; import javax.annotation.PostConstruct; -import javax.net.ssl.*; -import java.security.cert.CertificateException; -import java.security.cert.X509Certificate; -import org.springframework.web.client.RestTemplate; import org.egov.tracer.config.TracerConfiguration; import org.springframework.beans.factory.annotation.Value; @@ -37,44 +33,10 @@ public static void main(String[] args) { } - public static void trustSelfSignedSSL() { - try { - SSLContext ctx = SSLContext.getInstance("TLS"); - X509TrustManager tm = new X509TrustManager() { - public void checkClientTrusted(X509Certificate[] xcs, String string) throws CertificateException { - } - - public void checkServerTrusted(X509Certificate[] xcs, String string) throws CertificateException { - } - - public X509Certificate[] getAcceptedIssuers() { - return null; - } - }; - ctx.init(null, new TrustManager[]{tm}, null); - SSLContext.setDefault(ctx); - - // Disable hostname verification - HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier() { - public boolean verify(String hostname, javax.net.ssl.SSLSession sslSession) { - return true; - } - }); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - @Bean public ObjectMapper objectMapper() { return new ObjectMapper().configure(MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES, true) .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES).setTimeZone(TimeZone.getTimeZone(timeZone)); } - @Bean - public RestTemplate restTemplate() { - trustSelfSignedSSL(); - return new RestTemplate(); - } - } diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/ElasticSearchRepository.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/ElasticSearchRepository.java index 3351dd860..e872b34d7 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/ElasticSearchRepository.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/ElasticSearchRepository.java @@ -1,5 +1,7 @@ package org.egov.waterconnection.repository; +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; import java.util.List; import java.util.Base64; @@ -8,16 +10,22 @@ import org.egov.waterconnection.repository.builder.FuzzySearchQueryBuilder; import org.egov.waterconnection.web.models.SearchCriteria; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Component; -import org.springframework.web.client.RestTemplate; import com.fasterxml.jackson.databind.ObjectMapper; +import javax.net.ssl.*; + +import org.springframework.web.client.RestTemplate; import lombok.extern.slf4j.Slf4j; + +import javax.net.ssl.*; + @Slf4j @Component public class ElasticSearchRepository { @@ -27,15 +35,13 @@ public class ElasticSearchRepository { private FuzzySearchQueryBuilder queryBuilder; - private RestTemplate restTemplate; private ObjectMapper mapper; @Autowired - public ElasticSearchRepository(WSConfiguration config, FuzzySearchQueryBuilder queryBuilder, RestTemplate restTemplate, ObjectMapper mapper) { + public ElasticSearchRepository(WSConfiguration config, FuzzySearchQueryBuilder queryBuilder, ObjectMapper mapper) { this.config = config; this.queryBuilder = queryBuilder; - this.restTemplate = restTemplate; this.mapper = mapper; } @@ -61,7 +67,8 @@ public Object fuzzySearchProperties(SearchCriteria criteria, List ids) { HttpEntity requestEntity = new HttpEntity<>(searchQuery, headers); ResponseEntity response = null; try { - response = restTemplate.postForEntity(url, requestEntity, Object.class); + + response = this.restTemplate().postForEntity(url, requestEntity, Object.class); } catch (Exception e) { log.error("Failed to fetch data from ES: "+e.getMessage()); @@ -92,6 +99,38 @@ public String getESEncodedCredentials() { byte[] base64CredentialsBytes = Base64.getEncoder().encode(credentialsBytes); return "Basic " + new String(base64CredentialsBytes); } + public static void trustSelfSignedSSL() { + try { + SSLContext ctx = SSLContext.getInstance("TLS"); + X509TrustManager tm = new X509TrustManager() { + public void checkClientTrusted(X509Certificate[] xcs, String string) throws CertificateException { + } + + public void checkServerTrusted(X509Certificate[] xcs, String string) throws CertificateException { + } + + public X509Certificate[] getAcceptedIssuers() { + return null; + } + }; + ctx.init(null, new TrustManager[]{tm}, null); + SSLContext.setDefault(ctx); + + // Disable hostname verification + HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier() { + public boolean verify(String hostname, javax.net.ssl.SSLSession sslSession) { + return true; + } + }); + } catch (Exception ex) { + ex.printStackTrace(); + } + } + @Bean + public RestTemplate restTemplate() { + trustSelfSignedSSL(); + return new RestTemplate(); + } } From 17b93ef0fa4dfb08efc9b044c644b16433ad0319 Mon Sep 17 00:00:00 2001 From: debasishchakraborty-egovt Date: Mon, 8 Jul 2024 12:14:37 +0530 Subject: [PATCH 112/118] indexersearchIssue: Added ssl certificate and auth while calling Indexer --- .../waterconnection/repository/ElasticSearchRepository.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/ElasticSearchRepository.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/ElasticSearchRepository.java index e872b34d7..cb20bda74 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/ElasticSearchRepository.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/ElasticSearchRepository.java @@ -38,6 +38,7 @@ public class ElasticSearchRepository { private ObjectMapper mapper; + @Autowired public ElasticSearchRepository(WSConfiguration config, FuzzySearchQueryBuilder queryBuilder, ObjectMapper mapper) { this.config = config; @@ -67,7 +68,6 @@ public Object fuzzySearchProperties(SearchCriteria criteria, List ids) { HttpEntity requestEntity = new HttpEntity<>(searchQuery, headers); ResponseEntity response = null; try { - response = this.restTemplate().postForEntity(url, requestEntity, Object.class); } catch (Exception e) { @@ -127,7 +127,7 @@ public boolean verify(String hostname, javax.net.ssl.SSLSession sslSession) { } } - @Bean + @Bean(name="esRestTemplate") public RestTemplate restTemplate() { trustSelfSignedSSL(); return new RestTemplate(); From af1d6c665f012dd8d28aca07bac43d6ae83df419 Mon Sep 17 00:00:00 2001 From: debasishchakraborty-egovt Date: Mon, 8 Jul 2024 12:27:25 +0530 Subject: [PATCH 113/118] indexersearchIssue: Added ssl certificate and auth while calling Indexer --- .../waterconnection/repository/ElasticSearchRepository.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/ElasticSearchRepository.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/ElasticSearchRepository.java index cb20bda74..f64ff1f49 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/ElasticSearchRepository.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/ElasticSearchRepository.java @@ -10,6 +10,7 @@ import org.egov.waterconnection.repository.builder.FuzzySearchQueryBuilder; import org.egov.waterconnection.web.models.SearchCriteria; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.annotation.Bean; import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; @@ -68,7 +69,7 @@ public Object fuzzySearchProperties(SearchCriteria criteria, List ids) { HttpEntity requestEntity = new HttpEntity<>(searchQuery, headers); ResponseEntity response = null; try { - response = this.restTemplate().postForEntity(url, requestEntity, Object.class); + response = this.esRestTemplate().postForEntity(url, requestEntity, Object.class); } catch (Exception e) { log.error("Failed to fetch data from ES: "+e.getMessage()); @@ -128,7 +129,7 @@ public boolean verify(String hostname, javax.net.ssl.SSLSession sslSession) { } @Bean(name="esRestTemplate") - public RestTemplate restTemplate() { + public RestTemplate esRestTemplate() { trustSelfSignedSSL(); return new RestTemplate(); } From 70544212f3b5c817ba33d78a42360d033a00db42 Mon Sep 17 00:00:00 2001 From: debasishchakraborty-egovt Date: Mon, 8 Jul 2024 12:42:06 +0530 Subject: [PATCH 114/118] indexersearchIssue: Added ssl certificate and auth while calling Indexer --- .../waterconnection/repository/ElasticSearchRepository.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/ElasticSearchRepository.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/ElasticSearchRepository.java index f64ff1f49..9106f6bc8 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/ElasticSearchRepository.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/ElasticSearchRepository.java @@ -12,6 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Primary; import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; @@ -129,6 +130,7 @@ public boolean verify(String hostname, javax.net.ssl.SSLSession sslSession) { } @Bean(name="esRestTemplate") + @Primary public RestTemplate esRestTemplate() { trustSelfSignedSSL(); return new RestTemplate(); From ca0b5e000762ae5bd17ed046b79ade4ab15f6fa5 Mon Sep 17 00:00:00 2001 From: Nipun Arora Date: Mon, 8 Jul 2024 12:42:31 +0530 Subject: [PATCH 115/118] updated css version --- .../micro-ui/web/micro-ui-internals/example/public/index.html | 2 +- frontend/micro-ui/web/package.json | 2 +- frontend/micro-ui/web/public/index.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/example/public/index.html b/frontend/micro-ui/web/micro-ui-internals/example/public/index.html index 7f9fb8602..76b10cb74 100644 --- a/frontend/micro-ui/web/micro-ui-internals/example/public/index.html +++ b/frontend/micro-ui/web/micro-ui-internals/example/public/index.html @@ -13,7 +13,7 @@ - + diff --git a/frontend/micro-ui/web/package.json b/frontend/micro-ui/web/package.json index bcaba2048..18bbe6d0b 100644 --- a/frontend/micro-ui/web/package.json +++ b/frontend/micro-ui/web/package.json @@ -18,7 +18,7 @@ "@egovernments/digit-ui-libraries": "1.5.7", "@egovernments/digit-ui-module-dss": "1.5.34", "@egovernments/digit-ui-module-core": "1.5.46", - "@egovernments/digit-ui-css": "1.5.54", + "@egovernments/digit-ui-css": "1.5.53", "@egovernments/digit-ui-module-hrms": "1.5.27", "@egovernments/digit-ui-module-pgr": "1.7.0", "@egovernments/digit-ui-module-engagement": "1.5.20", diff --git a/frontend/micro-ui/web/public/index.html b/frontend/micro-ui/web/public/index.html index 79178b5bd..9ed7c0982 100644 --- a/frontend/micro-ui/web/public/index.html +++ b/frontend/micro-ui/web/public/index.html @@ -10,7 +10,7 @@ - + From 717c4b453d51c45d0ced039c5eacd7c78d577e5b Mon Sep 17 00:00:00 2001 From: Nipun Arora Date: Mon, 8 Jul 2024 13:08:00 +0530 Subject: [PATCH 116/118] updated css version --- frontend/micro-ui/web/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/micro-ui/web/package.json b/frontend/micro-ui/web/package.json index 18bbe6d0b..bcaba2048 100644 --- a/frontend/micro-ui/web/package.json +++ b/frontend/micro-ui/web/package.json @@ -18,7 +18,7 @@ "@egovernments/digit-ui-libraries": "1.5.7", "@egovernments/digit-ui-module-dss": "1.5.34", "@egovernments/digit-ui-module-core": "1.5.46", - "@egovernments/digit-ui-css": "1.5.53", + "@egovernments/digit-ui-css": "1.5.54", "@egovernments/digit-ui-module-hrms": "1.5.27", "@egovernments/digit-ui-module-pgr": "1.7.0", "@egovernments/digit-ui-module-engagement": "1.5.20", From d03bf8f8d21c3df85a9c2aaee2655dbf430272bc Mon Sep 17 00:00:00 2001 From: debasishchakraborty-egovt Date: Mon, 8 Jul 2024 13:09:21 +0530 Subject: [PATCH 117/118] indexersearchIssue: Added ssl certificate and auth while calling Indexer --- .../waterconnection/repository/ElasticSearchRepository.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/ElasticSearchRepository.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/ElasticSearchRepository.java index 9106f6bc8..4042ef5a1 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/ElasticSearchRepository.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/ElasticSearchRepository.java @@ -70,7 +70,7 @@ public Object fuzzySearchProperties(SearchCriteria criteria, List ids) { HttpEntity requestEntity = new HttpEntity<>(searchQuery, headers); ResponseEntity response = null; try { - response = this.esRestTemplate().postForEntity(url, requestEntity, Object.class); + response = this.restTemplate().postForEntity(url, requestEntity, Object.class); } catch (Exception e) { log.error("Failed to fetch data from ES: "+e.getMessage()); @@ -129,9 +129,8 @@ public boolean verify(String hostname, javax.net.ssl.SSLSession sslSession) { } } - @Bean(name="esRestTemplate") @Primary - public RestTemplate esRestTemplate() { + public RestTemplate restTemplate() { trustSelfSignedSSL(); return new RestTemplate(); } From 0016f92642d97e34fd2b49492d178d217b6250ad Mon Sep 17 00:00:00 2001 From: debasishchakraborty-egovt Date: Mon, 8 Jul 2024 13:33:47 +0530 Subject: [PATCH 118/118] Added Chnages in Es-search in Property service --- .../egov/pt/config/PropertyConfiguration.java | 6 +++ .../repository/ElasticSearchRepository.java | 52 +++++++++++++++++-- .../src/main/resources/application.properties | 2 + 3 files changed, 56 insertions(+), 4 deletions(-) diff --git a/municipal-services/property-services/src/main/java/org/egov/pt/config/PropertyConfiguration.java b/municipal-services/property-services/src/main/java/org/egov/pt/config/PropertyConfiguration.java index 7eb520b6a..5e1241895 100644 --- a/municipal-services/property-services/src/main/java/org/egov/pt/config/PropertyConfiguration.java +++ b/municipal-services/property-services/src/main/java/org/egov/pt/config/PropertyConfiguration.java @@ -354,4 +354,10 @@ public MappingJackson2HttpMessageConverter jacksonConverter(ObjectMapper objectM @Value("${inbox.property.search.allowed}") private Boolean isInboxSearchAllowed; + @Value("${egov.indexer.es.username}") + private String esUsername; + + @Value("${egov.indexer.es.password}") + private String esPassword; + } \ No newline at end of file diff --git a/municipal-services/property-services/src/main/java/org/egov/pt/repository/ElasticSearchRepository.java b/municipal-services/property-services/src/main/java/org/egov/pt/repository/ElasticSearchRepository.java index 0dbeec52f..d28d18d76 100644 --- a/municipal-services/property-services/src/main/java/org/egov/pt/repository/ElasticSearchRepository.java +++ b/municipal-services/property-services/src/main/java/org/egov/pt/repository/ElasticSearchRepository.java @@ -15,6 +15,11 @@ import org.springframework.web.client.RestTemplate; import java.util.List; +import org.springframework.context.annotation.Primary; +import javax.net.ssl.*; +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; +import java.util.Base64; @Component public class ElasticSearchRepository { @@ -24,15 +29,13 @@ public class ElasticSearchRepository { private FuzzySearchQueryBuilder queryBuilder; - private RestTemplate restTemplate; private ObjectMapper mapper; @Autowired - public ElasticSearchRepository(PropertyConfiguration config, FuzzySearchQueryBuilder queryBuilder, RestTemplate restTemplate, ObjectMapper mapper) { + public ElasticSearchRepository(PropertyConfiguration config, FuzzySearchQueryBuilder queryBuilder, ObjectMapper mapper) { this.config = config; this.queryBuilder = queryBuilder; - this.restTemplate = restTemplate; this.mapper = mapper; } @@ -52,10 +55,13 @@ public Object fuzzySearchProperties(PropertyCriteria criteria, List uuid HttpHeaders headers = new HttpHeaders(); headers.setContentType(MediaType.APPLICATION_JSON); + headers.add("Authorization", getESEncodedCredentials()); + final HttpEntity entity = new HttpEntity( headers); + // response = restTemplate.exchange(url.toString(), HttpMethod.GET, entity, Map.class); HttpEntity requestEntity = new HttpEntity<>(searchQuery, headers); ResponseEntity response = null; try { - response = restTemplate.postForEntity(url, requestEntity, Object.class); + response = this.restTemplate().postForEntity(url, requestEntity, Object.class); } catch (Exception e) { e.printStackTrace(); @@ -80,7 +86,45 @@ private String getESURL() { return builder.toString(); } + public String getESEncodedCredentials() { + String credentials = config.getEsUsername() + ":" + config.getEsPassword(); + byte[] credentialsBytes = credentials.getBytes(); + byte[] base64CredentialsBytes = Base64.getEncoder().encode(credentialsBytes); + return "Basic " + new String(base64CredentialsBytes); + } + public static void trustSelfSignedSSL() { + try { + SSLContext ctx = SSLContext.getInstance("TLS"); + X509TrustManager tm = new X509TrustManager() { + public void checkClientTrusted(X509Certificate[] xcs, String string) throws CertificateException { + } + + public void checkServerTrusted(X509Certificate[] xcs, String string) throws CertificateException { + } + + public X509Certificate[] getAcceptedIssuers() { + return null; + } + }; + ctx.init(null, new TrustManager[]{tm}, null); + SSLContext.setDefault(ctx); + + // Disable hostname verification + HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier() { + public boolean verify(String hostname, javax.net.ssl.SSLSession sslSession) { + return true; + } + }); + } catch (Exception ex) { + ex.printStackTrace(); + } + } + @Primary + public RestTemplate restTemplate() { + trustSelfSignedSSL(); + return new RestTemplate(); + } } diff --git a/municipal-services/property-services/src/main/resources/application.properties b/municipal-services/property-services/src/main/resources/application.properties index bce5a957f..759f658ea 100644 --- a/municipal-services/property-services/src/main/resources/application.properties +++ b/municipal-services/property-services/src/main/resources/application.properties @@ -198,6 +198,8 @@ state.level.tenant.id=pb #Elastic search properties elasticsearch.host=http://localhost:9200/ elasticsearch.search.endpoint=/_search +egov.indexer.es.username=elastic +egov.indexer.es.password=8fwbD6HbJh6HU0oddsHm8TEI property.es.index=property-services pt.search.name.fuziness=2