-
+
Employee Login
{" | "}
diff --git a/web/egov-common-screen/src/components/propertyQRData/api.jsx b/web/egov-common-screen/src/components/propertyQRData/api.jsx
new file mode 100644
index 0000000000..25ce72398c
--- /dev/null
+++ b/web/egov-common-screen/src/components/propertyQRData/api.jsx
@@ -0,0 +1,44 @@
+import axios from "axios";
+const isDev = import.meta.env.DEV;
+const API = axios.create({
+ baseURL: isDev ? "" : import.meta.env.VITE_API_HOST,
+ headers: {
+ "Content-Type": "application/json",
+ },
+});
+
+// Function to generate RequestInfo
+const generateRequestInfo = () => {
+ return {
+ apiId: "Rainmaker",
+ ver: ".01",
+ ts: Date.now(),
+ action: "token",
+ did: "1",
+ key: "",
+ msgId: `${Date.now()}|en_IN`,
+ authToken: localStorage.getItem("authToken") || "",
+ };
+};
+
+// Request Interceptor
+API.interceptors.request.use(
+ (config) => {
+ // Only attach for POST / PUT / PATCH
+ if (
+ config.method === "post" ||
+ config.method === "put" ||
+ config.method === "patch"
+ ) {
+ config.data = {
+ RequestInfo: generateRequestInfo(),
+ ...config.data,
+ };
+ }
+
+ return config;
+ },
+ (error) => Promise.reject(error)
+);
+
+export default API;
\ No newline at end of file
diff --git a/web/egov-common-screen/src/components/propertyQRData/constant.jsx b/web/egov-common-screen/src/components/propertyQRData/constant.jsx
new file mode 100644
index 0000000000..94870c30b3
--- /dev/null
+++ b/web/egov-common-screen/src/components/propertyQRData/constant.jsx
@@ -0,0 +1,2 @@
+export const statetenantId = 'pb'
+export const AUTHORIZATION_TOKEN = "Basic ZWdvdi11c2VyLWNsaWVudDplZ292LXVzZXItc2VjcmV0";
diff --git a/web/egov-common-screen/src/components/propertyQRData/displayPropertyRecord.jsx b/web/egov-common-screen/src/components/propertyQRData/displayPropertyRecord.jsx
new file mode 100644
index 0000000000..138d086ade
--- /dev/null
+++ b/web/egov-common-screen/src/components/propertyQRData/displayPropertyRecord.jsx
@@ -0,0 +1,92 @@
+import { useSearchParams } from 'react-router-dom';
+import { useEffect, useState } from 'react';
+import { searchPropertyBySurvey, getAddressArray } from "./function"
+const DisplayPropertyRecord = () => {
+ const [missingParams, setMissingParams] = useState(false);
+ const [searchParams] = useSearchParams();
+ const [propertyData, setPropertyData] = useState([]);
+ // Extract date from query parameters
+ const surveyID = searchParams.get('surveyid');
+ const tenantId = searchParams.get('tenantid');
+ const mobileNumber = searchParams.get('mobileno');
+ useEffect(() => {
+ if (!surveyID || !tenantId || !mobileNumber) {
+ if (!errorShown.current) { // Show error only once
+ showError("Please scan the QR code again");
+ errorShown.current = true;
+ }
+ setMissingParams(true);
+ return;
+ }
+
+ const fetchProp = async () => {
+ try {
+ const data = await searchPropertyBySurvey({ tenantId, surveyId: surveyID });
+ //console.log("data",data)
+ setPropertyData(data?.Properties || []);
+
+ } catch (err) {
+ console.error("API Failed:", err);
+ }
+ };
+
+ fetchProp();
+ }, [surveyID, tenantId, mobileNumber]);
+ // console.log("propertyData", propertyData)
+ const editPropertyurl = (propertyID, tenantid)=>{
+ debugger
+ let url = `/citizen/property-tax/assessment-form?assessmentId=0&purpose=update&propertyId=${propertyID}&tenantId=${tenantid}`;
+ window.location.replace(url);
+ }
+ return (
+
+ {missingParams ? (
+
+
Invalid QR Code
+
Please scan a valid QR code to proceed
+
+ ) : (
+
+ {propertyData.length === 0 ? (
+
No properties found
+ ) : (
+ propertyData.map((prop, idx) => (
+
+
+ Property ID: {prop?.propertyId}
+
+
+
+ Owner:
+ {prop?.owners[0]?.name || 'NA'}
+
+
+
+ Guardian:
+ {prop?.owners[0]?.fatherOrHusbandName || 'NA'}
+
+
+
+ {getAddressArray(prop.address)}
+
+
+
+ {prop?.status}
+
+
+
+
+ ))
+ )}
+
+ )}
+
+ );
+}
+
+export default DisplayPropertyRecord;
\ No newline at end of file
diff --git a/web/egov-common-screen/src/components/propertyQRData/function.jsx b/web/egov-common-screen/src/components/propertyQRData/function.jsx
index e3ffbe918f..0e4d070a84 100644
--- a/web/egov-common-screen/src/components/propertyQRData/function.jsx
+++ b/web/egov-common-screen/src/components/propertyQRData/function.jsx
@@ -1,11 +1,165 @@
-const checkMobileNumber = (number) => {
+import API from "./api";
+import { statetenantId, AUTHORIZATION_TOKEN} from "./constant";
+import { showSuccess, showError } from "../../utils/toast";
+import { storage } from "../../utils/localstorage";
+import { use } from "react";
+import axios from "axios";
+export const checkMobileNumber = async (number) => {
const mobileNumberPattern = /^[6-9]\d{9}$/;
const isMobileValid = mobileNumberPattern.test(number);
if(isMobileValid){
- // return number;
+ const data = await sendOtp(number);
+ //console.log("data",data)
}
}
+export const sendOtp = async (mobileNumber) => {
+ try {
+ const payload = createOtpPayload(mobileNumber,statetenantId);
+ const response = await API.post(
+ "/user-otp/v1/_send?tenantId=pb",
+ payload
+ );
+ // console.log("response",response.data)
+ showSuccess("Enter OTP");
-export default checkMobileNumber;
\ No newline at end of file
+ } catch (error) {
+ showError(
+ error?.response?.data?.Errors?.[0]?.message ||
+ "Failed to send OTP"
+ );
+ // return {
+ // success: false,
+ // message:
+ // error?.response?.data?.Errors?.[0]?.message ||
+ // "Failed to send OTP. Please try again.",
+ // };
+ }
+};
+
+const createOtpPayload = (mobileNumber, tenantId, userType='CITIZEN') => ({
+ otp: {
+ mobileNumber,
+ type: "login",
+ tenantId: tenantId,
+ userType: userType,
+ },
+});
+
+export const loginWithOtp = async (mobileNumber, otp, userType='CITIZEN') => {
+ try {
+ //debugger
+ // Create form-urlencoded body
+ const params = new URLSearchParams();
+ params.append("username", mobileNumber);
+ params.append("password", otp);
+ params.append("grant_type", "password");
+ params.append("scope", "read");
+ params.append("tenantId", statetenantId);
+ params.append("userType", userType);
+
+ const response = await axios.post(
+ "/user/oauth/token",
+ params,
+ {
+ headers: {
+ "Content-Type": "application/x-www-form-urlencoded",
+ Authorization: AUTHORIZATION_TOKEN,
+ },
+ }
+ );
+
+ if (response?.status === 200) {
+ return {
+ success: true,
+ message: "Login Successful",
+ data: response.data,
+ };
+ }
+
+ return {
+ success: false,
+ message: "Unexpected server response",
+ };
+
+ } catch (error) {
+ showError(error?.response?.data?.error_description ||
+ "Invalid OTP or login failed")
+ // return {
+ // success: false,
+ // message:
+ // error?.response?.data?.error_description ||
+ // "Invalid OTP or login failed",
+ // };
+ //
+ }
+};
+
+
+export const searchPropertyBySurvey = async ({ tenantId, surveyId }) => {
+ try {
+ const query = new URLSearchParams({
+ tenantId,
+ surveyId,
+ }).toString();
+
+ const response = await API.post(
+ `/property-services/property/_search?${query}`
+ );
+
+ return response?.data;
+ } catch (error) {
+ console.error(
+ "Property Search API Error:",
+ error?.response?.data || error.message
+ );
+ throw error;
+ }
+};
+
+export const getAddressArray = (propertyaddress) => {
+ if (!propertyaddress) return [];
+
+ const addressParts = [
+ propertyaddress.buildingName,
+ propertyaddress.doorNo !== propertyaddress.buildingName ? propertyaddress.doorNo : null,
+ propertyaddress.street,
+ propertyaddress.locality?.name,
+ propertyaddress.city,
+ propertyaddress.district,
+ propertyaddress.state,
+ propertyaddress.country,
+ propertyaddress.pincode,
+ ];
+
+ // Remove null, undefined, empty string
+ return addressParts.filter(Boolean);
+};
+
+export const setUserDetails = (userData, statetenantId)=>{
+ storage.set("user-info", userData.UserRequest);
+ storage.set("token", userData.access_token);
+ storage.set("tenant-id",statetenantId);
+ storage.set("refresh-token", userData.refresh_token);
+ storage.set("module", "rainmaker-common");
+ storage.set("locale", "en_IN");
+ storage.set("isNative",false);
+ storage.set("expires-in",userData.expires_in);
+ storage.set("CITIZEN.CITY",userData.UserRequest.permanentCity);
+ storage.set("path","");
+ storage.set("menuPath","");
+ storage.set("menuName","");
+ storage.set("Citizen.user-info", userData.UserRequest);
+ storage.set("Citizen.token", userData.access_token);
+ storage.set("Citizen.tenant-id",statetenantId);
+ storage.set("Citizen.refresh-token", userData.refresh_token);
+ storage.set("Citizen.module", "rainmaker-common");
+ storage.set("Citizen.locale", "en_IN");
+ storage.set("Citizen.isNative",false);
+ storage.set("Citizen.expires-in",userData.expires_in);
+ storage.set("Citizen.CITIZEN.CITY",userData.UserRequest.permanentCity);
+ storage.set("Citizen.path","");
+ storage.set("Citizen.menuPath","");
+ storage.set("Citizen.menuName","");
+}
\ No newline at end of file
diff --git a/web/egov-common-screen/src/components/propertyQRData/index.css b/web/egov-common-screen/src/components/propertyQRData/index.css
new file mode 100644
index 0000000000..2269f479b6
--- /dev/null
+++ b/web/egov-common-screen/src/components/propertyQRData/index.css
@@ -0,0 +1,213 @@
+.otp-container {
+ display: flex;
+ gap: 10px;
+ justify-content: center;
+}
+
+.otp-input {
+ width: 48px;
+ height: 48px;
+ border: 2px solid #ccc;
+ border-radius: 8px;
+ text-align: center;
+ font-size: 22px;
+ font-weight: 600;
+ outline: none;
+ transition: 0.2s;
+}
+
+.otp-input:focus {
+ border-color: #4f46e5;
+ box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
+}
+.otp-page {
+ min-height: 100vh;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ background: linear-gradient(135deg, #4f46e5, #06b6d4);
+ padding: 14px;
+}
+
+.otp-card {
+ background: white;
+ width: 100%;
+ max-width: 420px;
+ padding: 24px 20px;
+ border-radius: 14px;
+ box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
+ text-align: center;
+}
+
+/* Typography */
+
+.otp-title {
+ font-size: 22px;
+ margin-bottom: 10px;
+}
+
+.otp-subtext {
+ font-size: 13px;
+ margin-bottom: 14px;
+}
+
+/* Info Box */
+
+.info-box {
+ font-size: 14px;
+ padding: 10px;
+ margin-bottom: 14px;
+ display: flex;
+ flex-direction: column;
+ align-items: flex-start;
+ justify-content: center;
+}
+
+/* Button */
+
+.verify-btn {
+ margin-top: 18px;
+ width: 100%;
+ padding: 12px;
+ border-radius: 10px;
+ font-size: 15px;
+}
+
+/* OTP Input Boxes */
+
+.otp-container {
+ gap: 8px;
+}
+
+.otp-input {
+ width: 42px;
+ height: 42px;
+ font-size: 18px;
+}
+
+/* Tablet */
+
+@media (min-width: 640px) {
+ .otp-card {
+ padding: 28px 24px;
+ }
+
+ .otp-title {
+ font-size: 24px;
+ }
+
+ .otp-input {
+ width: 48px;
+ height: 48px;
+ font-size: 20px;
+ }
+}
+
+/* Desktop */
+
+@media (min-width: 1024px) {
+ .otp-card {
+ max-width: 440px;
+ }
+}
+/* Container styling */
+.property_card-container {
+ display: flex;
+ flex-wrap: wrap; /* Allows wrapping */
+ gap: 20px;
+ padding: 20px;
+ justify-content: flex-start;
+}
+
+
+.property-card {
+ background: #ffffff;
+ border-radius: 16px;
+ padding: 20px;
+ width: 100%;
+ max-width: 320px;
+ box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
+ transition: all 0.3s ease;
+ border: 1px solid #f0f0f0;
+}
+
+.property-card:hover {
+ transform: translateY(-4px);
+ box-shadow: 0 16px 35px rgba(0, 0, 0, 0.12);
+}
+
+/* Property ID */
+.property-id {
+ font-size: 18px;
+ font-weight: 700;
+ color: #2b2d42;
+ margin-bottom: 12px;
+}
+
+/* Label + Value row */
+.property-row {
+ margin-bottom: 8px;
+ font-size: 14px;
+ display: flex;
+ flex-wrap: wrap;
+}
+
+.property-label {
+ font-weight: 600;
+ color: #6c757d;
+ margin-right: 6px;
+}
+
+.property-value {
+ color: #212529;
+ font-weight: 500;
+}
+
+/* Address */
+.property-address {
+ margin-top: 10px;
+ font-size: 14px;
+ color: #495057;
+ line-height: 1.5;
+}
+
+/* Status Badge */
+.status-badge {
+ display: inline-block;
+ padding: 4px 10px;
+ border-radius: 20px;
+ font-size: 12px;
+ font-weight: 600;
+ margin-top: 10px;
+}
+
+/* Status Colors */
+.status-active {
+ background: #e6f7ee;
+ color: #1b8a5a;
+}
+
+.status-inworkflow {
+ background: #fff4e5;
+ color: #d97706;
+}
+
+/* Button */
+.property-btn {
+ margin-top: 16px;
+ width: 100%;
+ padding: 10px 0;
+ border: none;
+ border-radius: 10px;
+ background: linear-gradient(135deg, #4f46e5, #6366f1);
+ color: #fff;
+ font-weight: 600;
+ font-size: 14px;
+ cursor: pointer;
+ transition: all 0.3s ease;
+}
+
+.property-btn:hover {
+ opacity: 0.9;
+ transform: translateY(-1px);
+}
\ No newline at end of file
diff --git a/web/egov-common-screen/src/components/propertyQRData/index.jsx b/web/egov-common-screen/src/components/propertyQRData/index.jsx
index 0a239b6ef5..143939029b 100644
--- a/web/egov-common-screen/src/components/propertyQRData/index.jsx
+++ b/web/egov-common-screen/src/components/propertyQRData/index.jsx
@@ -1,57 +1,112 @@
-import { useEffect, useState } from 'react';
+import { useEffect, useState, useRef } from 'react';
import 'bootstrap/dist/css/bootstrap.min.css';
import './index.css'
+import { useNavigate } from 'react-router-dom';
import OtpInput from './otpInput';
import { useSearchParams } from 'react-router-dom';
-import checkMobileNumber from './function.jsx'
+import { checkMobileNumber, loginWithOtp, setUserDetails } from './function.jsx'
+import { statetenantId } from "./constant.jsx"
//URL : propertyQRData?surveyid=123&tenantid=pb.amritsar&mobileno=9335130557
+import { showLoading, showError } from "../../utils/toast.jsx"
+import { storage } from '../../utils/localstorage.jsx';
const ProppertyQRData = () => {
- const [displaypage, setDisplaypage] = useState(true);
+ const Navigate = useNavigate();
+ const [displaypage, setDisplaypage] = useState(false);
const [loader, setLoader] = useState(false);
const [searchParams] = useSearchParams();
+ const [missingParams, setMissingParams] = useState(false);
+ const sentFor = useRef(null);
+ const errorShown = useRef(false);
// Extract date from query parameters
- const surveyID = searchParams.get('surveyid');
- const tenantId = searchParams.get('tenantid');
- const mobileNumber = searchParams.get('mobileno');
+ const surveyID = searchParams.get('surveyid');
+ const tenantId = searchParams.get('tenantid');
+ const mobileNumber = searchParams.get('mobileno');
+ useEffect(() => {
+ storage.clear();
+ }, [])
+ useEffect(() => {
+ if (!surveyID || !tenantId || !mobileNumber) {
+ if (!errorShown.current) { // Show error only once
+ showError("Please scan the QR code again");
+ errorShown.current = true;
+ }
+ setMissingParams(true);
+ return;
+ }
+ setMissingParams(false);
+ }, [surveyID, tenantId, mobileNumber]);
+ useEffect(() => {
+ if (loader) {
+ showLoading("Loading...");
+ }
+ }, [loader]);
+ useEffect(() => {
+ if (!mobileNumber) return;
+ if (sentFor.current === mobileNumber) return;
+ sentFor.current = mobileNumber
- useEffect(()=>{
- checkMobileNumber(mobileNumber)
- setDisplaypage(true)
- setLoader(false)
- }),[mobileNumber]
+ checkMobileNumber(mobileNumber).finally(() => setLoader(false))
+ setDisplaypage(true)
- const handleOtpComplete = (otp) => {
+ }), [mobileNumber]
+
+ const handleOtpComplete = async (otp) => {
console.log("OTP Entered:", otp);
+ const result = await loginWithOtp(mobileNumber, otp);
+ if (result.success) {
+ console.log("Access Token:", result);
+ // storage.set("user-info", result.data.UserRequest);
+ // storage.set("token", result.data.access_token);
+ // storage.set("tenant-id", statetenantId);
+ setUserDetails(result.data, statetenantId)
+ const qs = new URLSearchParams({
+ surveyid: surveyID,
+ tenantid: tenantId,
+ mobileno: mobileNumber,
+ }).toString();
+ Navigate(`/displayPropertyRecord?${qs}`, { replace: true });
+ // try {
+ // const data = await searchPropertyBySurvey({ tenantId: tenantId, surveyId: surveyID });
+
+ // console.log(data);
+ // } catch (err) {
+ // console.error("API Failed:", err);
+ // }
+ } else {
+ console.error(result.message);
+ }
};
- if(loader){
-//show loader
- }
return (
- {displaypage && (
-
-
-
OTP Verification
-
-
-
Survey ID: {surveyID}
-
Tenant ID: {tenantId}
-
Mobile: {mobileNumber}
-
-
-
- Enter the 6-digit OTP sent to your mobile
-
-
-
-
-
- )}
-
+ {missingParams ? (
+
+
Invalid QR Code
+
Please scan a valid QR code to proceed
+
+ ) : (
+ <>
+ {displaypage && !loader && (
+
+
OTP Verification
+
+
Survey ID: {surveyID}
+
Tenant ID: {tenantId}
+
Mobile: {mobileNumber}
+
+
+ Enter the 6-digit OTP sent to your mobile
+
+
+
+
+ )}
+ >
+ )}
+
)
}
export default ProppertyQRData;
\ No newline at end of file
diff --git a/web/egov-common-screen/src/utils/localstorage.jsx b/web/egov-common-screen/src/utils/localstorage.jsx
new file mode 100644
index 0000000000..00340b1cc2
--- /dev/null
+++ b/web/egov-common-screen/src/utils/localstorage.jsx
@@ -0,0 +1,43 @@
+export const storage = {
+ set: (key, value) => {
+ try {
+ const stringValue =
+ typeof value === "string" ? value : JSON.stringify(value);
+ localStorage.setItem(key, stringValue);
+ } catch (error) {
+ console.error("LocalStorage Set Error:", error);
+ }
+ },
+
+ get: (key) => {
+ try {
+ const value = localStorage.getItem(key);
+ if (!value) return null;
+
+ try {
+ return JSON.parse(value); // if object
+ } catch {
+ return value; // if normal string
+ }
+ } catch (error) {
+ console.error("LocalStorage Get Error:", error);
+ return null;
+ }
+ },
+
+ remove: (key) => {
+ try {
+ localStorage.removeItem(key);
+ } catch (error) {
+ console.error("LocalStorage Remove Error:", error);
+ }
+ },
+
+ clear: () => {
+ try {
+ localStorage.clear();
+ } catch (error) {
+ console.error("LocalStorage Clear Error:", error);
+ }
+ },
+};
\ No newline at end of file
diff --git a/web/egov-common-screen/src/utils/privateRoute.jsx b/web/egov-common-screen/src/utils/privateRoute.jsx
new file mode 100644
index 0000000000..14e0e85d99
--- /dev/null
+++ b/web/egov-common-screen/src/utils/privateRoute.jsx
@@ -0,0 +1,13 @@
+import { Navigate } from "react-router-dom";
+import { storage } from "./localstorage";
+
+const PrivateRoute = ({ children }) => {
+ const user = storage.get("user-info");
+ if (!user) {
+ return
;
+ }
+
+ return children;
+};
+
+export default PrivateRoute;
\ No newline at end of file
diff --git a/web/egov-common-screen/src/utils/toast.jsx b/web/egov-common-screen/src/utils/toast.jsx
new file mode 100644
index 0000000000..abbe54d8f2
--- /dev/null
+++ b/web/egov-common-screen/src/utils/toast.jsx
@@ -0,0 +1,13 @@
+import toast from "react-hot-toast";
+
+export const showSuccess = (message) => {
+ toast.success(message);
+};
+
+export const showError = (message) => {
+ toast.error(message);
+};
+
+export const showLoading = (message) => {
+ return toast.loading(message);
+};
\ No newline at end of file
diff --git a/web/egov-common-screen/vite.config.js b/web/egov-common-screen/vite.config.js
index 5714f8d393..8a3f795da9 100644
--- a/web/egov-common-screen/vite.config.js
+++ b/web/egov-common-screen/vite.config.js
@@ -1,12 +1,38 @@
-import { defineConfig } from 'vite'
-import react from '@vitejs/plugin-react'
-
-// https://vite.dev/config/
-export default defineConfig({
- plugins: [react()],
- base: '/common',
- server: {
- host: 'localhost',
- port: 3000,
- },
-})
+import { defineConfig, loadEnv } from "vite";
+import react from "@vitejs/plugin-react";
+
+export default defineConfig(({ mode }) => {
+ // Load environment variables
+ const env = loadEnv(mode, process.cwd());
+
+ return {
+ plugins: [react()],
+ base: "/common",
+
+ server: {
+ host: "localhost",
+ port: 3000,
+
+ proxy: {
+ "/user-otp": {
+ target: env.VITE_API_HOST,
+ changeOrigin: true,
+ secure: false,
+ rewrite: (path) => path.replace(/^\/api/, ""),
+ },
+ "/user": {
+ target: env.VITE_API_HOST,
+ changeOrigin: true,
+ secure: false,
+ rewrite: (path) => path.replace(/^\/api/, ""),
+ },
+ "/property-services": {
+ target: env.VITE_API_HOST,
+ changeOrigin: true,
+ secure: false,
+ rewrite: (path) => path.replace(/^\/api/, ""),
+ },
+ },
+ },
+ };
+});
\ No newline at end of file
diff --git a/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/abg/bulkmeterreading.js b/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/abg/bulkmeterreading.js
new file mode 100644
index 0000000000..f165bd0ca1
--- /dev/null
+++ b/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/abg/bulkmeterreading.js
@@ -0,0 +1,187 @@
+import {
+ getBreak, getCommonHeader, getLabel, getCommonCard,
+ getCommonContainer,
+ getTextField, getSelectField
+} from "egov-ui-framework/ui-config/screens/specs/utils";
+import { prepareFinalObject } from "egov-ui-framework/ui-redux/screen-configuration/actions";
+import { getTenantId } from "egov-ui-kit/utils/localStorageUtils";
+import { httpRequest } from "../../../../ui-utils";
+import { getBoundaryData } from "../../../../ui-utils/commons";
+import {
+ abgSearchCard,
+ //mergeDownloadButton,
+ resetFields
+} from "./gBmr/groupBillSearch";
+
+// import { updateAllReadings } from "./gBmr/functions";
+import { searchResults, updateAllReadings } from "./gBmr/searchResults";
+import "./index.css";
+
+const tenantId = getTenantId();
+
+const header = getCommonHeader({
+ labelName: "Bulk Meter Reading",
+ labelKey: "Bulk Meter Reading"
+});
+
+const getMDMSData = async (action, state, dispatch) => {
+ const tenantId = getTenantId();
+ let mdmsBody = {
+ MdmsCriteria: {
+ tenantId: tenantId,
+ moduleDetails: [
+ {
+ moduleName: "egf-master",
+ masterDetails: [
+ { name: "FinancialYear", filter: "[?(@.module=='PT')]" } //FY Filter hardcoded for PT
+ ]
+ },
+ {
+ moduleName: "BillingService",
+ masterDetails: [
+ {
+ name: "BusinessService"
+ // filter: "[?(@.type=='Adhoc')]"
+ },
+ {
+ name: "TaxHeadMaster"
+ },
+ {
+ name: "TaxPeriod"
+ }
+ ]
+ },
+ {
+ moduleName: "common-masters",
+ masterDetails: [
+ {
+ name: "uiCommonPay"
+ }
+ ]
+ },
+ {
+ moduleName: "tenant",
+ masterDetails: [
+ {
+ name: "tenants"
+ }
+ ]
+ }
+ ]
+ }
+ };
+ try {
+ const payload = await httpRequest(
+ "post",
+ "/egov-mdms-service/v1/_search",
+ "_search",
+ [],
+ mdmsBody
+ );
+ payload.MdmsRes.BillingService.BusinessService = payload.MdmsRes.BillingService.BusinessService.filter(service => service.billGineiURL);
+ dispatch(prepareFinalObject("searchScreenMdmsData", payload.MdmsRes));
+ } catch (e) {
+ console.log(e);
+ }
+};
+
+const getData = async (action, state, dispatch) => {
+ await getMDMSData(action, state, dispatch);
+};
+
+const abgSearchAndResult = {
+ uiFramework: "material-ui",
+ name: "bulkmeterreading",
+ beforeInitScreen: (action, state, dispatch) => {
+ resetFields(state, dispatch);
+ getData(action, state, dispatch).then(responseAction => {
+ const queryObj = [{ key: "tenantId", value: tenantId }];
+ getBoundaryData(action, state, dispatch, queryObj, tenantId);
+ });
+ return action;
+ },
+ components: {
+ div: {
+ uiFramework: "custom-atoms",
+ componentPath: "Form",
+ props: {
+ className: "common-div-css",
+ id: "bulkmeterreading"
+ },
+ children: {
+ headerDiv: {
+ uiFramework: "custom-atoms",
+ componentPath: "Container",
+
+ children: {
+ header: {
+ gridDefination: {
+ xs: 12,
+ sm: 6
+ },
+ ...header
+ }
+ }
+ },
+ abgSearchCard,
+ breakAfterSearch: getBreak(),
+ // progressStatus,
+ searchResults,
+ breakAfterSearchResults: getBreak(),
+
+ button: getCommonContainer({
+ buttonContainer: getCommonContainer({
+ firstCont: {
+ uiFramework: "custom-atoms",
+ componentPath: "Div",
+ gridDefination: {
+ xs: 12,
+ sm: 3
+ }
+ },
+
+ updateAllButton: {
+ componentPath: "Button",
+ gridDefination: {
+ xs: 12,
+ sm: 3
+ },
+ props: {
+ variant: "contained",
+ style: {
+ color: "white",
+ backgroundColor: "#FE7A51",
+ borderRadius: "2px",
+ width: window.innerWidth > 480 ? "80%" : "100%",
+ height: "48px"
+ }
+ },
+ children: {
+ buttonLabel: getLabel({
+ labelName: "Update All Readings",
+ labelKey: "Update All Readings"
+ })
+ },
+ onClickDefination: {
+ action: "condition",
+ callBack: updateAllReadings
+ }
+ },
+ lastCont: {
+ uiFramework: "custom-atoms",
+ componentPath: "Div",
+ gridDefination: {
+ xs: 12,
+ sm: 3
+ }
+ }
+ })
+ })
+
+ }
+ },
+ //mergeDownloadButton
+ }
+};
+
+export default abgSearchAndResult;
diff --git a/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/abg/gBmr/functions.js b/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/abg/gBmr/functions.js
new file mode 100644
index 0000000000..90c428682a
--- /dev/null
+++ b/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/abg/gBmr/functions.js
@@ -0,0 +1,232 @@
+import get from "lodash/get";
+//import { getGroupBillSearch } from "../../../../../ui-utils/commons";
+import {
+ handleScreenConfigurationFieldChange as handleField,
+ prepareFinalObject,
+ toggleSpinner,
+ toggleSnackbar
+} from "egov-ui-framework/ui-redux/screen-configuration/actions";
+import { httpRequest } from "egov-ui-framework/ui-utils/api";
+import {
+ convertEpochToDate,
+ validateFields,
+ getTextToLocalMapping
+} from "../../utils/index";
+import { getTenantId, getUserInfo } from "egov-ui-kit/utils/localStorageUtils";
+import isEmpty from "lodash/isEmpty"
+import { loadUlbLogo } from "../../utils/receiptTransformer";
+
+// const tenantId = getTenantId();
+const tenantId = getTenantId();
+export const updatesingleReading = async (consumerId, lastReading, currentReadingRaw, currentReading, billingPeriod, status, readingDate, lastReadingDate, tenantId) => {
+
+ const payload = {
+ meterReadingslist: [
+ {
+ currentReadingDate: readingDate,
+ currentReading: currentReading,
+ billingPeriod: billingPeriod,
+ meterStatus: status,
+ connectionNo: consumerId,
+ lastReading: lastReading,
+ lastReadingDate: lastReadingDate,
+ tenantId: tenantId,
+ generateDemand: true
+ }
+ ]
+
+
+ };
+ try {
+ const url = "/ws-calculator/meterConnection/_createmultiple";
+
+
+ const response = await httpRequest("post", url, "_update", [], payload);
+
+
+ return response;
+ } catch (e) {
+ console.error("API error:", e);
+ throw e;
+ }
+};
+
+export const searchApiCall = async (state, dispatch) => {
+
+ showHideTable(false, dispatch);
+ //showHideMergeButton(false, dispatch);
+ let searchScreenObject = get(
+ state.screenConfiguration.preparedFinalObject,
+ "searchCriteria",
+ {}
+ );
+ const isSearchBoxFirstRowValid = validateFields(
+ "components.div.children.abgSearchCard.children.cardContent.children.searchContainer.children",
+ state,
+ dispatch,
+ "bulkmeterreading"
+ );
+
+ const isSearchBoxSecondRowValid = validateFields(
+ "components.div.children.abgSearchCard.children.cardContent.children.searchContainer.children",
+ state,
+ dispatch,
+ "bulkmeterreading"
+ );
+
+ if (!(isSearchBoxFirstRowValid && isSearchBoxSecondRowValid)) {
+ dispatch(
+ toggleSnackbar(
+ true,
+ {
+ labelName: "Please fill at least one field to start search",
+ labelKey: "ABG_SEARCH_SELECT_AT_LEAST_ONE_TOAST_MESSAGE"
+ },
+ "warning"
+ )
+ );
+ } else if (
+ Object.keys(searchScreenObject).length == 0 ||
+ Object.values(searchScreenObject).every(x => x === "")
+ ) {
+ dispatch(
+ toggleSnackbar(
+ true,
+ {
+ labelName: "Please fill at least one field to start search",
+ labelKey: "ABG_SEARCH_SELECT_AT_LEAST_ONE_TOAST_MESSAGE"
+ },
+ "warning"
+ )
+ );
+ } else {
+ for (var key in searchScreenObject) {
+ if (
+ searchScreenObject.hasOwnProperty(key) &&
+ searchScreenObject[key] === ""
+ ) {
+ delete searchScreenObject[key];
+ }
+ }
+ let serviceObject = get(
+ state.screenConfiguration.preparedFinalObject,
+ "searchScreenMdmsData.BillingService.BusinessService"
+ ).filter(item => item.code === searchScreenObject.businesService);
+
+ searchScreenObject.url = serviceObject && serviceObject[0] && serviceObject[0].billGineiURL;
+ searchScreenObject.tenantId = process.env.REACT_APP_NAME === "Employee" ? getTenantId() : JSON.parse(getUserInfo()).permanentCity;
+ const getGroupBillSearch = async (dispatch, searchScreenObject) => {
+
+ try {
+ dispatch(toggleSpinner(true));
+ const requestBody = {
+ tenantId: searchScreenObject.tenantId || tenantId,
+ locality: searchScreenObject.locality || "",
+ offset: searchScreenObject.offset !== undefined ? searchScreenObject.offset : 0
+ };
+ const url = `ws-calculator/meterConnection/_searchV2?tenantId=${encodeURIComponent(requestBody.tenantId)}&locality=${encodeURIComponent(requestBody.locality)}&offset=${encodeURIComponent(requestBody.offset)}`;
+ const response = await httpRequest("post", url, "_searchV2", []);
+ // dispatch(toggleSpinner(false));
+ // return response;
+
+ const bills = (response && response.meterReadings) || [];
+ dispatch(
+ prepareFinalObject("searchScreenMdmsData.meterReadings", bills)
+ );
+ dispatch(toggleSpinner(false));
+ return response;
+ } catch (error) {
+ dispatch(toggleSpinner(false));
+ dispatch(
+ toggleSnackbar(
+ true,
+ { labelName: error.message || "Something went wrong", labelKey: error.message || "ERROR" },
+ "error"
+ )
+ );
+ return {};
+ }
+
+
+ };
+ const responseFromAPI = await getGroupBillSearch(dispatch, searchScreenObject);
+
+
+ const bills = (responseFromAPI && responseFromAPI.meterReadings) || [];
+ dispatch(
+ prepareFinalObject("searchScreenMdmsData.billSearchResponse", bills)
+ );
+ const response = [];
+ for (let i = 0; i < bills.length; i++) {
+
+ response.push({
+ connectionNo: get(bills[i], "connectionNo"),
+
+ lastReading: get(bills[i], "currentReading"),
+ // currentReading may come from API (per consumer). Use existing field if present.
+ currentReading: get(bills[i], "currentReading") || "",
+ currentReadingDate: get(bills[i], "currentReadingDate"),
+ billingPeriod: get(bills[i], "billingPeriod"),
+ meterStatus: get(bills[i], "meterStatus"),
+ tenantId: tenantId
+ })
+
+ }
+ try {
+ let data = response.map(item => ({
+ ["Consumer ID"]: item.connectionNo || "-",
+
+ // last confirmed reading from system
+ ["Last Reading"]: item.currentReading || "-",
+
+ // user will enter these for bulk update; keep empty initially
+ ["New Reading(in KL)"]: "",
+ ["New Reading Date"]: "",
+
+ // existing reading date from system
+ ["Current Reading Date"]:
+ convertEpochToDate(item.currentReadingDate) || "-",
+ ["Billing Period"]: item.billingPeriod || "-",
+ ["Status"]: item.meterStatus || "-",
+ ["TENANT_ID"]: item.tenantId
+ }));
+ dispatch(
+ handleField(
+ "bulkmeterreading",
+ "components.div.children.searchResults",
+ "props.data",
+ data
+ )
+ );
+ dispatch(
+ handleField(
+ "bulkmeterreading",
+ "components.div.children.searchResults",
+ "props.rows",
+ data.length
+ )
+ );
+ showHideTable(true, dispatch);
+ if (!isEmpty(response)) {
+
+ loadUlbLogo(tenantId);
+ };
+ } catch (error) {
+ dispatch(toggleSnackbar(true, error.message, "error"));
+ console.log(error);
+ }
+ }
+};
+
+const showHideTable = (booleanHideOrShow, dispatch) => {
+ dispatch(
+ handleField(
+ "bulkmeterreading",
+ "components.div.children.searchResults",
+ "visible",
+ booleanHideOrShow
+ )
+ );
+};
+
+
diff --git a/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/abg/gBmr/groupBillSearch.js b/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/abg/gBmr/groupBillSearch.js
new file mode 100644
index 0000000000..a8bc0a1ca8
--- /dev/null
+++ b/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/abg/gBmr/groupBillSearch.js
@@ -0,0 +1,249 @@
+import {
+ getCommonCard,
+ getCommonContainer,
+ getLabel, getTextField, getSelectField
+} from "egov-ui-framework/ui-config/screens/specs/utils";
+import { handleScreenConfigurationFieldChange as handleField } from "egov-ui-framework/ui-redux/screen-configuration/actions";
+import { getTenantId, getUserInfo } from "egov-ui-kit/utils/localStorageUtils";
+import { generateMultipleBill } from "../../utils/receiptPdf";
+import { searchApiCall, updatesingleReading } from "./functions";
+
+
+const tenantId = process.env.REACT_APP_NAME === "Employee" ? getTenantId() : JSON.parse(getUserInfo()).permanentCity;
+export const resetFields = (state, dispatch) => {
+
+ dispatch(
+ handleField(
+ "bulkmeterreading",
+ "components.div.children.abgSearchCard.children.cardContent.children.searchContainer.children.ulb",
+ "props.value",
+ tenantId
+ )
+ );
+ dispatch(
+ handleField(
+ "bulkmeterreading",
+ "components.div.children.abgSearchCard.children.cardContent.children.searchContainer.children.consumerId",
+ "props.value",
+ ""
+ )
+ );
+ dispatch(
+ handleField(
+ "bulkmeterreading",
+ "components.div.children.abgSearchCard.children.cardContent.children.searchContainer.children.locMohalla",
+ "props.value",
+ ""
+ )
+ );
+ dispatch(
+ handleField(
+ "bulkmeterreading",
+ "components.div.children.abgSearchCard.children.cardContent.children.searchContainer.children.locMohalla",
+ "props.error",
+ false
+ )
+ );
+ dispatch(
+ handleField(
+ "bulkmeterreading",
+ "components.div.children.abgSearchCard.children.cardContent.children.searchContainer.children.locMohalla",
+ "props.helperText",
+ ""
+ )
+ );
+ dispatch(
+ handleField(
+ "bulkmeterreading",
+ "components.div.children.abgSearchCard.children.cardContent.children.searchContainer.children.serviceCategory",
+ "props.value",
+ ""
+ )
+ );
+ dispatch(
+ handleField(
+ "bulkmeterreading",
+ "components.div.children.abgSearchCard.children.cardContent.children.searchContainer.children.serviceCategory",
+ "props.error",
+ false
+ )
+ );
+ dispatch(
+ handleField(
+ "bulkmeterreading",
+ "components.div.children.abgSearchCard.children.cardContent.children.searchContainer.children.serviceCategory",
+ "props.helperText",
+ ""
+ )
+ );
+};
+
+export const abgSearchCard = getCommonCard({
+ searchContainer: getCommonContainer(
+ {
+ ulb: {
+ uiFramework: "custom-containers-local",
+ moduleName: "egov-abg",
+ componentPath: "AutosuggestContainer",
+ props: {
+ label: {
+ labelName: "ULB",
+ labelKey: "ABG_ULB_LABEL"
+ },
+ localePrefix: {
+ moduleName: "TENANT",
+ masterName: "TENANTS"
+ },
+ optionLabel: "name",
+ placeholder: {
+ labelName: "Select ULB",
+ labelKey: "ABG_ULB_PLACEHOLDER"
+ },
+ required: true,
+ value: tenantId,
+ disabled: true,
+ isClearable: true,
+ labelsFromLocalisation: true,
+ className: "autocomplete-dropdown",
+ jsonPath: "searchCriteria.tenantId",
+ sourceJsonPath: "searchScreenMdmsData.tenant.tenants",
+ },
+ required: true,
+ jsonPath: "searchCriteria.tenantId",
+ disabled: false,
+ gridDefination: {
+ xs: 12,
+ sm: 4
+ }
+ },
+
+ locMohalla: {
+ uiFramework: "custom-containers-local",
+ moduleName: "egov-abg",
+ componentPath: "AutosuggestContainer",
+ gridDefination: {
+ xs: 12,
+ sm: 4
+ },
+ jsonPath: "searchCriteria.locality",
+ required: true,
+ props: {
+ className: "autocomplete-dropdown",
+ label: {
+ labelName: "Location/Mohalla",
+ labelKey: "ABG_LOCMOHALLA_LABEL"
+ },
+ placeholder: {
+ labelName: "Select Location/Mohalla",
+ labelKey: "ABG_LOCMOHALLA_PLACEHOLDER"
+ },
+ jsonPath: "searchCriteria.locality",
+ sourceJsonPath: "searchScreenMdmsData.localities",
+ labelsFromLocalisation: true,
+ required: true,
+ isClearable: true,
+ }
+ },
+ // consumerId: getTextField({
+ // label: {
+ // labelName: "Consumer ID",
+ // labelKey: "ABG_CONSUMER_ID_LABEL"
+ // },
+ // placeholder: {
+ // labelName: "Enter Consumer ID",
+ // labelKey: "ABG_CONSUMER_ID_PLACEHOLDER"
+ // },
+ // gridDefination: {
+ // xs: 12,
+ // sm: 4
+ // },
+ // required: false,
+ // jsonPath: "searchCriteria.consumerCode"
+ // })
+
+ },
+ {
+ style: {
+ overflow: "visible"
+ }
+ }
+ ),
+
+ button: getCommonContainer({
+ buttonContainer: getCommonContainer({
+ firstCont: {
+ uiFramework: "custom-atoms",
+ componentPath: "Div",
+ gridDefination: {
+ xs: 12,
+ sm: 3
+ }
+ },
+ resetButton: {
+ componentPath: "Button",
+ gridDefination: {
+ xs: 12,
+ sm: 3
+ },
+ props: {
+ variant: "outlined",
+ style: {
+ color: "#FE7A51",
+ border: "#FE7A51 solid 1px",
+ borderRadius: "2px",
+ width: window.innerWidth > 480 ? "80%" : "100%",
+ height: "48px"
+ }
+ },
+ children: {
+ buttonLabel: getLabel({
+ labelName: "RESET",
+ labelKey: "ABG_RESET_BUTTON"
+ })
+ },
+ onClickDefination: {
+ action: "condition",
+ callBack: resetFields
+ }
+ },
+ searchButton: {
+ componentPath: "Button",
+ gridDefination: {
+ xs: 12,
+ sm: 3
+ // align: "center"
+ },
+ props: {
+ variant: "contained",
+ style: {
+ color: "white",
+ backgroundColor: "#FE7A51",
+ borderRadius: "2px",
+ width: window.innerWidth > 480 ? "80%" : "100%",
+ height: "48px"
+ }
+ },
+ children: {
+ buttonLabel: getLabel({
+ labelName: "Search",
+ labelKey: "ABG_GROUP_BILL_SEARCH_BUTTON"
+ })
+ },
+ onClickDefination: {
+ action: "condition",
+ callBack: searchApiCall
+ }
+ },
+ lastCont: {
+ uiFramework: "custom-atoms",
+ componentPath: "Div",
+ gridDefination: {
+ xs: 12,
+ sm: 3
+ }
+ }
+ })
+ })
+});
+
+
diff --git a/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/abg/gBmr/searchResults.js b/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/abg/gBmr/searchResults.js
new file mode 100644
index 0000000000..da0b33f93d
--- /dev/null
+++ b/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/abg/gBmr/searchResults.js
@@ -0,0 +1,343 @@
+import React from "react";
+import get from "lodash/get";
+import { sortByEpoch, getEpochForDate } from "../../utils";
+import { generateSingleBill } from "../../utils/receiptPdf";
+import { httpRequest } from "egov-ui-framework/ui-utils/api.js";
+import { localStorageGet } from "egov-ui-kit/utils/localStorageUtils";
+import { download, downloadBill } from "egov-common/ui-utils/commons";
+import { updatesingleReading } from "./functions";
+
+
+export const searchResults = {
+ uiFramework: "custom-molecules",
+ componentPath: "Table",
+ visible: false,
+ props: {
+ columns: [
+ { labelName: "Consumer ID", labelKey: "Consumer ID" },
+
+ { labelName: "Last Reading", labelKey: "Last Reading" },
+ { labelName: "Current Reading Date", labelKey: "Current Reading Date" },
+ {
+ labelName: "New Reading(in KL)",
+ labelKey: "New Reading(in KL)",
+ options: {
+ filter: false,
+ customBodyRender: (value, tableMeta, updateValue) => {
+ // Last Reading is the second column (index 1)
+ const lastReading = tableMeta.rowData && tableMeta.rowData[1];
+ const status = tableMeta.rowData && tableMeta.rowData[6];
+ const isEditable = ["Working", "Breakdown", "Locked"].includes(status);
+ return (
+
{
+ e.target.value = e.target.value.replace(/[^0-9]/g, "");
+ }}
+ onBlur={e => {
+ if (!isEditable) return;
+ const v = e.target.value.trim();
+ if (v === "") { updateValue(""); return; }
+ const numeric = Number(v);
+ const min = Number(lastReading || 0);
+ if (!Number.isFinite(numeric) || numeric < min) {
+ // reset and notify user
+ e.target.value = "";
+ updateValue("");
+ alert("Please enter a numeric value greater than or equal to Last Reading");
+ } else {
+ updateValue(v);
+ }
+ }}
+ />
+ );
+ }
+ }
+ },
+ {
+ labelName: "New Reading Date",
+ labelKey: "New Reading Date",
+ options: {
+ filter: false,
+ customBodyRender: (value, tableMeta, updateValue) => {
+ // Disable dates earlier than Current Reading Date for that row
+ const currentReadingDateDisplay =
+ tableMeta.rowData && tableMeta.rowData[2]; // e.g. "05/02/2026"
+ const status = tableMeta.rowData && tableMeta.rowData[6];
+ const isEditable = ["Working", "Breakdown", "Locked"].includes(status);
+
+ let minDate = "";
+ if (
+ currentReadingDateDisplay &&
+ currentReadingDateDisplay !== "-" &&
+ currentReadingDateDisplay.indexOf("/") > -1
+ ) {
+ const [dd, mm, yyyy] = currentReadingDateDisplay.split("/");
+ if (dd && mm && yyyy) {
+ minDate = `${yyyy}-${mm.padStart(2, "0")}-${dd.padStart(2, "0")}`;
+ }
+ }
+ return (
+
{
+ if (!isEditable) return;
+ updateValue(e.target.value);
+ }}
+ />
+ );
+ }
+ }
+ },
+
+ { labelName: "Billing Period", labelKey: "Billing Period" },
+ {
+ labelName: "Status",
+ labelKey: "Status",
+ options: {
+ filter: false,
+ customBodyRender: (value, tableMeta, updateValue) => {
+ const statusOptions = [
+ "Working",
+ "Locked",
+ "No-meter",
+ "Breakdown",
+ "No_Meter",
+ "Reset",
+ "NULL",
+ "Replacement"
+ ];
+ const currentStatus = value || "";
+ return (
+
+ );
+ }
+ }
+ },
+ {
+ labelName: "Tenant Id",
+ labelKey: "TENANT_ID",
+ options: {
+ display: false
+ }
+ },
+ {
+ labelName: "Action",
+ labelKey: "ABG_COMMON_TABLE_COL_ACTION",
+ options: {
+ filter: false,
+ customBodyRender: (value, tableMeta, updateValue) => {
+ let readingDatenew = tableMeta.rowData && tableMeta.rowData[4] ? tableMeta.rowData[4] : null;
+ readingDatenew = readingDatenew ? readingDatenew.split("-").reverse().join("/") : null;
+ const handleUpdate = async () => {
+ const consumerId = tableMeta.rowData && tableMeta.rowData[0];
+ const lastReading = Number(tableMeta.rowData && tableMeta.rowData[1]) || 0;
+ const currentReadingDate = tableMeta.rowData && tableMeta.rowData[2] ? getEpochForDate(tableMeta.rowData[2]) : null;
+ const lastReadingDate = currentReadingDate;
+ const currentReadingRaw = Number(tableMeta.rowData && tableMeta.rowData[3]) || 0;
+ const currentReading = Number(currentReadingRaw) || 0;
+ const billingPeriod = readingDatenew ? `${tableMeta.rowData[2]} - ${readingDatenew}` : "";
+ const readingDate = readingDatenew ? getEpochForDate(readingDatenew) : null;
+ const statusSelects = document.querySelectorAll("select.bulk-status-select");
+ const statusFromSelect = statusSelects[tableMeta.rowIndex] && statusSelects[tableMeta.rowIndex].value;
+ const status = statusFromSelect || (tableMeta.rowData && tableMeta.rowData[6]) || "";
+ const tenantId = tableMeta.rowData && tableMeta.rowData[7];
+ if (!currentReadingRaw || !Number.isFinite(currentReading)) {
+ alert("Please enter a numeric Current Reading greater than or equal to Last Reading before updating");
+ return;
+ }
+
+ if (currentReading < lastReading) {
+ alert("Please enter a numeric Current Reading greater than or equal to Last Reading before updating");
+ return;
+ }
+
+ // New Reading Date must not be earlier than Current Reading Date
+ if (readingDate && currentReadingDate && readingDate < currentReadingDate) {
+ alert("New Reading Date cannot be earlier than Current Reading Date");
+ return;
+ }
+
+ try {
+ const resp = await updatesingleReading(consumerId, lastReading, currentReadingRaw, currentReading, billingPeriod, status, readingDate, lastReadingDate, tenantId);
+ // updatesingleReading may return response or throw on error
+ alert("Update successful for Consumer ID: " + (consumerId || ""));
+ } catch (err) {
+ console.error(err);
+ alert("Update failed: " + (err && err.message ? err.message : "Unknown error"));
+ }
+ };
+
+ return (
+
+ );
+ }
+ }
+ },
+ ],
+ title: { labelName: "Search Results for Group Bills", labelKey: "BILL_GENIE_GROUP_SEARCH_HEADER" },
+ rows: "",
+ options: {
+ filter: false,
+ download: false,
+ responsive: "stacked",
+ pagination: false,
+ selectableRows: false,
+ hover: true,
+ rowsPerPageOptions: [10, 15, 20],
+ },
+ customSortColumn: {
+ column: "Date Created",
+ sortingFn: (data, i, sortDateOrder) => {
+ const epochDates = data.reduce((acc, curr) => {
+ acc.push([...curr, getEpochForDate(curr[2], "dayend")]);
+ return acc;
+ }, []);
+ const order = sortDateOrder === "asc" ? true : false;
+ const finalData = sortByEpoch(epochDates, !order).map(item => {
+ item.pop();
+ return item;
+ });
+ return { data: finalData, currentOrder: !order ? "asc" : "desc" };
+ }
+ }
+ }
+};
+export const updateAllReadings = async (state, dispatch) => {
+
+ let allarray = [];
+
+ // get table data from screen config
+ const rows = get(
+ state,
+ "screenConfiguration.screenConfig.bulkmeterreading.components.div.children.searchResults.props.data",
+ []
+ );
+
+ // read the live values typed in the table inputs
+ const readingInputs = document.querySelectorAll("input.bulk-new-reading");
+ const dateInputs = document.querySelectorAll("input.bulk-new-reading-date");
+ const statusSelects = document.querySelectorAll("select.bulk-status-select");
+
+ for (let i = 0; i < rows.length; i++) {
+ const row = rows[i];
+
+ // Support both object-style rows and array-style rows
+ const isArrayRow = Array.isArray(row);
+
+ const consumerId = isArrayRow ? row[0] : row["Consumer ID"];
+ const lastReading = Number(isArrayRow ? row[1] : row["Last Reading"]) || 0;
+
+ // New reading / date: always take what user typed in the row inputs
+ const currentReadingRawEl = readingInputs[i];
+ const newReadingDateEl = dateInputs[i];
+ const currentReadingRaw = currentReadingRawEl ? currentReadingRawEl.value : "";
+ const newReadingDate = newReadingDateEl ? newReadingDateEl.value : "";
+
+ const currentReadingDateDisplay = isArrayRow ? row[2] : row["Current Reading Date"];
+ const lastReadingDate = getEpochForDate(currentReadingDateDisplay);
+ const statusFromRow = isArrayRow ? row[6] : row["Status"];
+ const status = statusSelects[i] && statusSelects[i].value ? statusSelects[i].value : statusFromRow;
+ const tenantId = isArrayRow ? row[7] : row["TENANT_ID"];
+
+ // only allow bulk update for selected meter statuses
+ const isEditableStatus = ["Working", "Breakdown", "Locked"].includes(status);
+ if (!isEditableStatus) {
+ continue;
+ }
+
+ // only take complete rows (both value and date filled)
+ if (!currentReadingRaw || !newReadingDate) {
+ continue;
+ }
+
+ const currentReading = Number(currentReadingRaw) || 0;
+
+ // skip invalid readings
+ if (!Number.isFinite(currentReading) || currentReading < lastReading) {
+ continue;
+ }
+
+ const readingDatenew = newReadingDate
+ ? newReadingDate.split("-").reverse().join("/")
+ : null;
+ const billingPeriod =
+ readingDatenew && currentReadingDateDisplay
+ ? `${currentReadingDateDisplay} - ${readingDatenew}`
+ : "";
+ const readingDate = readingDatenew ? getEpochForDate(readingDatenew) : null;
+
+ // New Reading Date must not be earlier than Current Reading Date
+ const currentReadingDateEpoch = currentReadingDateDisplay
+ ? getEpochForDate(currentReadingDateDisplay)
+ : null;
+ if (readingDate && currentReadingDateEpoch && readingDate < currentReadingDateEpoch) {
+ // skip this row if date is invalid
+ continue;
+ }
+
+ // push only complete row into array
+ allarray.push({
+ consumerId,
+ lastReading,
+ newReading: currentReadingRaw,
+ newReadingDate,
+ currentReadingDate: currentReadingDateDisplay,
+ lastReadingDate,
+ billingPeriod,
+ status,
+ tenantId,
+ readingDate
+ });
+
+ // call single update API
+ try {
+ await updatesingleReading(
+ consumerId,
+ lastReading,
+ currentReadingRaw,
+ currentReading,
+ billingPeriod,
+ status,
+ readingDate,
+ lastReadingDate,
+ tenantId
+ );
+ } catch (err) {
+ console.error(`Failed to update Consumer ${consumerId}:`, err);
+ }
+ }
+
+
+ return allarray;
+};
\ No newline at end of file
diff --git a/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/abg/groupBills.js b/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/abg/groupBills.js
index 59b2196714..15cd8e4161 100644
--- a/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/abg/groupBills.js
+++ b/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/abg/groupBills.js
@@ -145,8 +145,8 @@ const abgSearchAndResult = {
? `/egov-ui-framework/abg/groupBillDownloads`
: `/abg/groupBillDownloads`
},
- //visible: (process.env.REACT_APP_NAME === "Citizen") ? false : true
- visible: false
+ visible: (process.env.REACT_APP_NAME === "Citizen") ? false : true
+ //visible: false
}
}
},
diff --git a/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/abg/propertyMapped/ptmapedPopup.js b/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/abg/propertyMapped/ptmapedPopup.js
index e3de6687ca..b75ffc1cf8 100644
--- a/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/abg/propertyMapped/ptmapedPopup.js
+++ b/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/abg/propertyMapped/ptmapedPopup.js
@@ -123,7 +123,7 @@ const PTmapPopup = ({ propertiesId, ownerName, ownerMobile, locality, landArea,
// Map usageCategory to category code
const raw = String(usageCategory || "").trim().toUpperCase();
if (raw.includes("RESIDENTIAL") && !raw.includes("NONRESIDENTIAL")) return "110";
- if (raw.includes("COMMERCIAL") || raw.includes("NONRESIDENTIAL")) return "111";
+ if (raw.includes("COMMERCIAL") || raw.includes("NONRESIDENTIAL") || raw.includes("INSTITUTIONAL")) return "111";
if (raw.includes("INDUSTRIAL")) return "112";
if (raw.includes("OTHERS")) return "113";
if (raw.includes("AGRICULTURE")) return "109";
@@ -204,7 +204,7 @@ const PTmapPopup = ({ propertiesId, ownerName, ownerMobile, locality, landArea,
(x) => String(x.name).trim().toUpperCase() === "RESIDENTIAL"
);
setUsageCategoryState((residential && residential.code) || "110");
- } else if (raw.includes("COMMERCIAL") || raw.includes("NONRESIDENTIAL")) {
+ } else if (raw.includes("COMMERCIAL") || raw.includes("NONRESIDENTIAL") || raw.includes("INSTITUTIONAL")) {
const commercial = USAGE_CATEGORY_OPTIONS.find(
(x) => String(x.name).trim().toUpperCase() === "COMMERCIAL"
);
@@ -243,7 +243,7 @@ const PTmapPopup = ({ propertiesId, ownerName, ownerMobile, locality, landArea,
const fetchRevenueData = async () => {
try {
setIsSubmitting(true);
-
+
console.log("Prepared object:", prepared);
// Try multiple paths to get tenantId
@@ -271,7 +271,7 @@ const PTmapPopup = ({ propertiesId, ownerName, ownerMobile, locality, landArea,
requestBody
);
-
+
setRevenueData(response);
const propertydisits = (response && response.districts) || [];
@@ -281,7 +281,7 @@ const PTmapPopup = ({ propertiesId, ownerName, ownerMobile, locality, landArea,
if (Array.isArray(propertydisits) && propertydisits.length > 0) {
setDistricts(propertydisits);
-
+
// If no persisted district, auto-select based on login/tenant (first available)
const persistedDistrict = localStorage.getItem("ptmap_district") || "";
@@ -296,7 +296,7 @@ const PTmapPopup = ({ propertiesId, ownerName, ownerMobile, locality, landArea,
}
}
} else {
-
+
setDistricts([]);
}
@@ -626,7 +626,7 @@ const PTmapPopup = ({ propertiesId, ownerName, ownerMobile, locality, landArea,
requestBody
);
-
+
// Extract tehsils from response
const tehsilsData = (response && response.tehsils) || [];
@@ -662,7 +662,7 @@ const PTmapPopup = ({ propertiesId, ownerName, ownerMobile, locality, landArea,
if (selectedTehsil) {
try {
setIsSubmitting(true);
-
+
const requestBody = {
searchCriteria: {
@@ -689,11 +689,11 @@ const PTmapPopup = ({ propertiesId, ownerName, ownerMobile, locality, landArea,
response.data
)) || [];
-
+
if (Array.isArray(villagesData) && villagesData.length > 0) {
setVillages(villagesData);
-
+
} else {
console.warn('No villages found for tehsil');
setVillages([]);
@@ -720,7 +720,7 @@ const PTmapPopup = ({ propertiesId, ownerName, ownerMobile, locality, landArea,
if (selectedVillage) {
try {
setIsSubmitting(true);
-
+
const requestBody = {
searchCriteria: {
villageId: selectedVillage,
@@ -745,7 +745,7 @@ const PTmapPopup = ({ propertiesId, ownerName, ownerMobile, locality, landArea,
response.segmentList ||
response.data
)) || [];
-
+
if (Array.isArray(segmentsData) && segmentsData.length > 0) {
setSegments(segmentsData);
@@ -779,7 +779,7 @@ const PTmapPopup = ({ propertiesId, ownerName, ownerMobile, locality, landArea,
// Fetch sub-segments for selected segment
try {
setIsSubmitting(true);
-
+
const subSegRequestBody = {
searchCriteria: {
segmentId: selectedSegment,
@@ -788,7 +788,7 @@ const PTmapPopup = ({ propertiesId, ownerName, ownerMobile, locality, landArea,
}
};
-
+
const subSegResponse = await httpRequest(
"post",
@@ -798,7 +798,7 @@ const PTmapPopup = ({ propertiesId, ownerName, ownerMobile, locality, landArea,
subSegRequestBody
);
-
+
const subSegmentsData = (subSegResponse && (
subSegResponse.subSegments ||
@@ -812,7 +812,7 @@ const PTmapPopup = ({ propertiesId, ownerName, ownerMobile, locality, landArea,
code: String(s.code || s.subSegmentId || s.id || s.value || idx + 1),
name: s.name || s.label || s.display || s.subSegmentName || (s.code || `Sub-Segment ${idx + 1}`)
}));
-
+
setSubSegments(subSegmentOptions);
} else {
console.warn('No sub-segments found for segment');
@@ -846,7 +846,7 @@ const PTmapPopup = ({ propertiesId, ownerName, ownerMobile, locality, landArea,
try {
setIsSubmitting(true);
-
+
const requestBody = {
searchCriteria: {
@@ -863,7 +863,7 @@ const PTmapPopup = ({ propertiesId, ownerName, ownerMobile, locality, landArea,
}
};
-
+
const url = "/egov-property-rate/property-rate/_search";
@@ -892,7 +892,7 @@ const PTmapPopup = ({ propertiesId, ownerName, ownerMobile, locality, landArea,
setIsSubmitting(false);
} catch (error) {
-
+
setIsSubmitting(false);
setMappedRate(0);
setMappedRateId(0);
@@ -919,7 +919,7 @@ const PTmapPopup = ({ propertiesId, ownerName, ownerMobile, locality, landArea,
try {
setIsSubmitting(true);
-
+
const requestBody = {
searchCriteria: {
@@ -940,7 +940,7 @@ const PTmapPopup = ({ propertiesId, ownerName, ownerMobile, locality, landArea,
requestBody
);
-
+
const usageData = (response && (
response.usageCategories ||
@@ -1116,7 +1116,7 @@ const PTmapPopup = ({ propertiesId, ownerName, ownerMobile, locality, landArea,
try {
setIsSubmitting(true);
-
+
const requestBody = {
PropertyRates: [{
id: rowdatacomplete.integration_id,
@@ -1137,7 +1137,7 @@ const PTmapPopup = ({ propertiesId, ownerName, ownerMobile, locality, landArea,
}]
};
-
+
const url = "/egov-property-rate/property-rate/_update";
@@ -1149,7 +1149,7 @@ const PTmapPopup = ({ propertiesId, ownerName, ownerMobile, locality, landArea,
requestBody
);
-
+
// Close all popups first, then show success message
if (response) {
diff --git a/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/abg/ptMaps/ptmapPopup.js b/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/abg/ptMaps/ptmapPopup.js
index 567c06f055..82b728612c 100644
--- a/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/abg/ptMaps/ptmapPopup.js
+++ b/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/abg/ptMaps/ptmapPopup.js
@@ -128,7 +128,7 @@ const PTmapPopup = ({ propertiesId, ownerName, ownerMobile, locality, landArea,
const raw = String(rawUsageCategory || "").trim().toUpperCase();
// exact-only match
if (raw === "RESIDENTIAL" || raw === "110") return "110";
- if (raw === "NONRESIDENTIAL.COMMERCIAL" || raw === "NONRESIDENTIAL.OTHERS" || raw === "111") return "111";
+ if (raw === "NONRESIDENTIAL.COMMERCIAL" || raw === "NONRESIDENTIAL.OTHERS" || raw === "NONRESIDENTIAL.INSTITUTIONAL" || raw === "111") return "111";
if (raw === "NONRESIDENTIAL.INDUSTRIAL" || raw === "112") return "112";
return "";
};
@@ -149,7 +149,7 @@ const PTmapPopup = ({ propertiesId, ownerName, ownerMobile, locality, landArea,
// exact match for RESIDENTIAL, COMMERCIAL, INDUSTRIAL, or OTHERS
const isResidentialExact = raw === "RESIDENTIAL" || raw === "110";
- const isCommercialExact = raw === "NONRESIDENTIAL.COMMERCIAL" || raw === "NONRESIDENTIAL.OTHERS" || raw === "NONRESIDENTIAL" || raw === "111";
+ const isCommercialExact = raw === "NONRESIDENTIAL.COMMERCIAL" || raw === "NONRESIDENTIAL.OTHERS" || raw === "NONRESIDENTIAL.INSTITUTIONAL" || raw === "NONRESIDENTIAL" || raw === "111";
const isIndustrialExact = raw === "NONRESIDENTIAL.INDUSTRIAL" || raw === "112";
if (isResidentialExact) {
diff --git a/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/utils/receiptPdf.js b/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/utils/receiptPdf.js
index 3c8f4ed808..eaa243ba44 100644
--- a/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/utils/receiptPdf.js
+++ b/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/utils/receiptPdf.js
@@ -1,4 +1,3 @@
-// import { downloadMultipleBill } from "egov-common/ui-utils/commons";
import { toggleSpinner, toggleSnackbar } from "egov-ui-framework/ui-redux/screen-configuration/actions";
import get from "lodash/get";
import isEmpty from "lodash/isEmpty";
@@ -199,74 +198,71 @@ export const generateMultipleBill = async (state, dispatch, type) => {
"preparedFinalObject.searchCriteria.tenantId",
''
);
- let batchtype = get(
- state.screenConfiguration,
- "preparedFinalObject.generateBillScreen.batchtype",
- ''
- );
+ let batchtype = get(
+ state.screenConfiguration,
+ "preparedFinalObject.generateBillScreen.batchtype",
+ ''
+ );
let billkey = ''
const index = commonPayDetails && commonPayDetails.findIndex((item) => {
return item.code == businessService;
});
- if(batchtype === "Integrated Bill"){
+ if (batchtype === "Integrated Bill") {
billkey = 'wsn-integrated'
- }else{
- if (index > -1) {
- billkey = get(commonPayDetails[index], 'billKey', '');
+ } else {
+ if (index > -1) {
+ billkey = get(commonPayDetails[index], 'billKey', '');
} else {
const details = commonPayDetails && commonPayDetails.filter(item => item.code === "DEFAULT");
billkey = get(details, 'billKey', '');
}
}
- if(batchtype === "Integrated Bill"){
- allBills = allBills.filter(bill => bill.connection.propertyTotalAmount >0);
- }else{
- allBills = allBills.filter(bill => bill.status === 'ACTIVE' && bill.totalAmount >0 && bill.connection.status=="Active");
+ if (batchtype === "Integrated Bill") {
+ allBills = allBills.filter(bill => bill.connection.propertyTotalAmount > 0);
+ } else {
+ allBills = allBills.filter(bill => bill.status === 'ACTIVE' && bill.totalAmount > 0 && bill.connection.status == "Active");
}
-
-
-
- //allBills = allBills.filter(bill => bill.status === 'ACTIVE' && bill.totalAmount > 0);
- // if (
- // batchtype == 'Locality' && locality &&
- // !Array.isArray(locality) &&
- // typeof locality === "string" &&
- // locality.trim() !== ""
- // ) {
- // try {
- // const egovPdfResponse = await batchMergeAndDownload(
- // billkey,
- // locality,
- // businessService,
- // tenantId
- // );
- // let labelKey = egovPdfResponse.message+" Job ID :"+egovPdfResponse.jobId
- // dispatch(
- // toggleSnackbar(
- // true,
- // {
- // labelName: labelKey,
- // labelKey: labelKey
- // },
- // "warning"
- // )
- // );
- // } catch (error) {
- // console.error("Error while batch merge and download:", error);
- // dispatch(
- // toggleSnackbar(
- // true,
- // {
- // labelName: error,
- // labelKey: error
- // },
- // "warning"
- // )
- // );
- // }
- // } else {
+ allBills = allBills.filter(bill => bill.status === 'ACTIVE' && bill.totalAmount > 0);
+ if (
+ batchtype == 'Locality' && locality &&
+ !Array.isArray(locality) &&
+ typeof locality === "string" &&
+ locality.trim() !== ""
+ ) {
+ try {
+ const egovPdfResponse = await batchMergeAndDownload(
+ billkey,
+ locality,
+ businessService,
+ tenantId
+ );
+ let labelKey = egovPdfResponse.message + " Job ID :" + egovPdfResponse.jobId
+ dispatch(
+ toggleSnackbar(
+ true,
+ {
+ labelName: labelKey,
+ labelKey: labelKey
+ },
+ "warning"
+ )
+ );
+ } catch (error) {
+ console.error("Error while batch merge and download:", error);
+ dispatch(
+ toggleSnackbar(
+ true,
+ {
+ labelName: error,
+ labelKey: error
+ },
+ "warning"
+ )
+ );
+ }
+ } else {
allBills && allBills.length > 0 && await downloadMultipleBill(allBills, billkey, businessService);
- // }
+ }
/*
To Download Files based on Filestoreid logic
@@ -284,7 +280,7 @@ allBills.map(bill=>{
bills&&bills.length>0&&await downloadMultipleBill(bills,billkey);
filestoreids&&filestoreids.length>0&&downloadMultipleFileFromFilestoreIds(filestoreids,'download'); */
dispatch(toggleSpinner());
-
+
};
/* await loadMdmsData(tenant);
// data1 is for ULB logo from loadUlbLogo
diff --git a/web/rainmaker/dev-packages/egov-pt-dev/src/ui-config/screens/specs/pt-mutation/mutation-methods.js b/web/rainmaker/dev-packages/egov-pt-dev/src/ui-config/screens/specs/pt-mutation/mutation-methods.js
index 2cdcc79b90..d0b320d878 100644
--- a/web/rainmaker/dev-packages/egov-pt-dev/src/ui-config/screens/specs/pt-mutation/mutation-methods.js
+++ b/web/rainmaker/dev-packages/egov-pt-dev/src/ui-config/screens/specs/pt-mutation/mutation-methods.js
@@ -48,7 +48,7 @@ export const resetFields = (state, dispatch) => {
false
)
);
- }else{
+ } else {
dispatch(
handleField(
"propertySearch",
@@ -170,118 +170,118 @@ export const searchPropertyDetails = getCommonCard({
subParagraph: getCommonParagraph({
labelName: "Provide at least one non-mandatory parameter to search for an application (In case of Search by locality and name . please select city name again)",
- //labelKey: "PT_HOME_SEARCH_RESULTS_DESC"
+ //labelKey: "PT_HOME_SEARCH_RESULTS_DESC"
labelKey: "Provide at least one non-mandatory parameter to search for an application (In case of search by locality and name . please select city name again)",
-
+
}
),
ulbCityContainer: getCommonContainer({
ulbCity: {
...getSelectField({
- uiFramework: "custom-containers-local",
- moduleName: "egov-pt",
- componentPath: "AutosuggestContainer",
- props: {
- className: "autocomplete-dropdown",
- suggestions: [],
- label: {
- labelName: "ULB",
- labelKey: "PT_ULB_CITY"
- },
- placeholder: {
- labelName: "Select ULB",
- labelKey: "PT_ULB_CITY_PLACEHOLDER"
- },
- localePrefix: {
- moduleName: "TENANT",
- masterName: "TENANTS"
+ uiFramework: "custom-containers-local",
+ moduleName: "egov-pt",
+ componentPath: "AutosuggestContainer",
+ props: {
+ className: "autocomplete-dropdown",
+ suggestions: [],
+ label: {
+ labelName: "ULB",
+ labelKey: "PT_ULB_CITY"
+ },
+ placeholder: {
+ labelName: "Select ULB",
+ labelKey: "PT_ULB_CITY_PLACEHOLDER"
+ },
+ localePrefix: {
+ moduleName: "TENANT",
+ masterName: "TENANTS"
+ },
+ jsonPath: "ptSearchScreen.tenantId",
+ sourceJsonPath: "searchScreenMdmsData.tenant.tenants",
+ labelsFromLocalisation: true,
+ required: true,
+ isClearable: true,
+ disabled: process.env.REACT_APP_NAME === "Citizen" ? false : true,
+ inputLabelProps: {
+ shrink: true
+ }
},
+ required: true,
jsonPath: "ptSearchScreen.tenantId",
sourceJsonPath: "searchScreenMdmsData.tenant.tenants",
- labelsFromLocalisation: true,
- required: true,
- isClearable: true,
- disabled: process.env.REACT_APP_NAME === "Citizen" ? false : true,
- inputLabelProps: {
- shrink: true
- }
- },
- required: true,
- jsonPath: "ptSearchScreen.tenantId",
- sourceJsonPath: "searchScreenMdmsData.tenant.tenants",
- }),
- beforeFieldChange: async (action, state, dispatch) => {
- //Below only runs for citizen - not required here in employee
-
- try {
- let payload = await httpRequest(
- "post",
- "/egov-location/location/v11/boundarys/_search?hierarchyTypeCode=REVENUE&boundaryType=Locality",
- "_search",
- [{ key: "tenantId", value: action.value }],
- {}
- );
- console.log("payload", payload)
- const mohallaData =
- payload &&
- payload.TenantBoundary[0] &&
- payload.TenantBoundary[0].boundary &&
- payload.TenantBoundary[0].boundary.reduce((result, item) => {
- result.push({
- ...item,
- name: `${action.value
- .toUpperCase()
- .replace(
- /[.]/g,
- "_"
- )}_REVENUE_${item.code
+ }),
+ beforeFieldChange: async (action, state, dispatch) => {
+ //Below only runs for citizen - not required here in employee
+
+ try {
+ let payload = await httpRequest(
+ "post",
+ "/egov-location/location/v11/boundarys/_search?hierarchyTypeCode=REVENUE&boundaryType=Locality",
+ "_search",
+ [{ key: "tenantId", value: action.value }],
+ {}
+ );
+ console.log("payload", payload)
+ const mohallaData =
+ payload &&
+ payload.TenantBoundary[0] &&
+ payload.TenantBoundary[0].boundary &&
+ payload.TenantBoundary[0].boundary.reduce((result, item) => {
+ result.push({
+ ...item,
+ name: `${action.value
.toUpperCase()
- .replace(/[._:-\s\/]/g, "_")}`
- });
- return result;
- }, []);
-
- console.log(mohallaData, "mohallaData")
-
-
-
- dispatch(
- prepareFinalObject(
- "applyScreenMdmsData.tenant.localities",
- mohallaData
- )
- );
- dispatch(
- handleField(
- "apply",
- "components.div.children.formwizardSecondStep.children.propertyLocationDetails.children.cardContent.children.propertyDetailsConatiner.children.propertyMohalla",
- "props.suggestions",
- mohallaData
- )
- );
- const mohallaLocalePrefix = {
- moduleName: action.value,
- masterName: "REVENUE"
- };
- dispatch(
- handleField(
- "apply",
- "components.div.children.formwizardSecondStep.children.propertyLocationDetails.children.cardContent.children.propertyDetailsConatiner.children.propertyMohalla",
- "props.localePrefix",
- mohallaLocalePrefix
- )
- );
-
- dispatch(
- fetchLocalizationLabel(getLocale(), action.value, action.value)
- );
-
- } catch (e) {
- console.log(e);
- }
+ .replace(
+ /[.]/g,
+ "_"
+ )}_REVENUE_${item.code
+ .toUpperCase()
+ .replace(/[._:-\s\/]/g, "_")}`
+ });
+ return result;
+ }, []);
+
+ console.log(mohallaData, "mohallaData")
+
+
+
+ dispatch(
+ prepareFinalObject(
+ "applyScreenMdmsData.tenant.localities",
+ mohallaData
+ )
+ );
+ dispatch(
+ handleField(
+ "apply",
+ "components.div.children.formwizardSecondStep.children.propertyLocationDetails.children.cardContent.children.propertyDetailsConatiner.children.propertyMohalla",
+ "props.suggestions",
+ mohallaData
+ )
+ );
+ const mohallaLocalePrefix = {
+ moduleName: action.value,
+ masterName: "REVENUE"
+ };
+ dispatch(
+ handleField(
+ "apply",
+ "components.div.children.formwizardSecondStep.children.propertyLocationDetails.children.cardContent.children.propertyDetailsConatiner.children.propertyMohalla",
+ "props.localePrefix",
+ mohallaLocalePrefix
+ )
+ );
+
+ dispatch(
+ fetchLocalizationLabel(getLocale(), action.value, action.value)
+ );
+
+ } catch (e) {
+ console.log(e);
+ }
- },
+ },
gridDefination: {
xs: 12,
sm: 4
@@ -309,7 +309,7 @@ export const searchPropertyDetails = getCommonCard({
required: false,
pattern: getPattern("MobileNo"),
jsonPath: "ptSearchScreen.mobileNumber",
- // disabled: process.env.REACT_APP_NAME === "Citizen" ? true : false,
+ disabled: process.env.REACT_APP_NAME === "Citizen" ? true : false,
errorMessage: "ERR_INVALID_MOBILE_NUMBER"
}),
propertyTaxUniqueId: getTextField({
@@ -350,101 +350,101 @@ export const searchPropertyDetails = getCommonCard({
errorMessage: "ERR_INVALID_PROPERTY_ID",
jsonPath: "ptSearchScreen.oldpropertyids"
}),
-
- //-------------locality--------------
- propertyMohalla: {
- uiFramework: "custom-containers",
- componentPath: "AutosuggestContainer",
- jsonPath:"ptSearchScreen.locality",
- required: true,
- props: {
- style: {
- width: "100%",
- cursor: "pointer"
+
+ //-------------locality--------------
+ propertyMohalla: {
+ uiFramework: "custom-containers",
+ componentPath: "AutosuggestContainer",
+ jsonPath: "ptSearchScreen.locality",
+ required: true,
+ props: {
+ style: {
+ width: "100%",
+ cursor: "pointer"
+ },
+ label: {
+ labelName: "Locality/Mohalla",
+ // labelKey: "NOC_PROPERTY_DETAILS_MOHALLA_LABEL"
+ },
+ placeholder: {
+ labelName: "Select Locality/Mohalla",
+ //labelKey: "NOC_PROPERTY_DETAILS_MOHALLA_PLACEHOLDER"
+ },
+ jsonPath: "ptSearchScreen.locality",
+ sourceJsonPath: "applyScreenMdmsData.tenant.localities",
+ labelsFromLocalisation: true,
+ errorMessage: "ERR_DEFAULT_INPUT_FIELD_MSG",
+ suggestions: [],
+ fullwidth: true,
+ required: false,
+ // disabled: process.env.REACT_APP_NAME === "Citizen" ? true : false,
+ // type:hidden,
+ inputLabelProps: {
+ shrink: true
+ }
+ // className: "tradelicense-mohalla-apply"
+ },
+ beforeFieldChange: async (action, state, dispatch) => {
+ // dispatch(
+ // prepareFinalObject(
+ // "Licenses[0].tradeLicenseDetail.address.locality.name",
+ // action.value && action.value.label
+ // )
+ // );
},
+ gridDefination: {
+ xs: 12,
+ sm: 4
+ }
+ },
+ //---------------locality-end--------------
+ //-------------------Owner Name----------------------
+ ownerName: getTextField({
label: {
- labelName: "Locality/Mohalla",
- // labelKey: "NOC_PROPERTY_DETAILS_MOHALLA_LABEL"
+ labelName: "Owner Name",
+ labelKey: "Owner Name"
},
placeholder: {
- labelName: "Select Locality/Mohalla",
- //labelKey: "NOC_PROPERTY_DETAILS_MOHALLA_PLACEHOLDER"
+ labelName: "Enter Owner Name",
+ labelKey: "Owner Name"
+ },
+ gridDefination: {
+ xs: 12,
+ sm: 4,
+
},
- jsonPath:"ptSearchScreen.locality",
- sourceJsonPath: "applyScreenMdmsData.tenant.localities",
- labelsFromLocalisation: true,
- errorMessage: "ERR_DEFAULT_INPUT_FIELD_MSG",
- suggestions: [],
- fullwidth: true,
required: false,
+ // pattern: /^[^\$\"'<>?\\\\~`!@$%^()+={}\[\]*:;“”‘’]{1,64}$/i,
+ errorMessage: "ERR_INVALID_PROPERTY_ID",
+ jsonPath: "ptSearchScreen.name",
// disabled: process.env.REACT_APP_NAME === "Citizen" ? true : false,
- // type:hidden,
- inputLabelProps: {
- shrink: true
- }
- // className: "tradelicense-mohalla-apply"
- },
- beforeFieldChange: async (action, state, dispatch) => {
- // dispatch(
- // prepareFinalObject(
- // "Licenses[0].tradeLicenseDetail.address.locality.name",
- // action.value && action.value.label
- // )
- // );
- },
- gridDefination: {
- xs: 12,
- sm: 4
- }
- },
- //---------------locality-end--------------
- //-------------------Owner Name----------------------
- ownerName: getTextField({
- label: {
- labelName: "Owner Name",
- labelKey: "Owner Name"
- },
- placeholder: {
- labelName: "Enter Owner Name",
- labelKey: "Owner Name"
- },
- gridDefination: {
- xs: 12,
- sm: 4,
+ }),
- },
- required: false,
- // pattern: /^[^\$\"'<>?\\\\~`!@$%^()+={}\[\]*:;“”‘’]{1,64}$/i,
- errorMessage: "ERR_INVALID_PROPERTY_ID",
- jsonPath: "ptSearchScreen.name",
- // disabled: process.env.REACT_APP_NAME === "Citizen" ? true : false,
- }),
+ surveyId: getTextField({
+ label: {
+ labelName: "Survey Id",
+ labelKey: "Survey Id"
+ },
+ placeholder: {
+ labelName: "Enter Survey Id",
+ labelKey: "Survey Id"
+ },
+ gridDefination: {
+ xs: 12,
+ sm: 4,
- surveyId: getTextField({
- label: {
- labelName: "Survey Id",
- labelKey: "Survey Id"
- },
- placeholder: {
- labelName: "Enter Survey Id",
- labelKey: "Survey Id"
- },
- gridDefination: {
- xs: 12,
- sm: 4,
+ },
+ required: false,
+ // pattern: /^[^\$\"'<>?\\\\~`!@$%^()+={}\[\]*:;“”‘’]{1,64}$/i,
+ errorMessage: "ERR_INVALID_SURVEY_ID",
+ jsonPath: "ptSearchScreen.surveyId",
+ disabled: process.env.REACT_APP_NAME === "Citizen" ? true : false,
+ }),
- },
- required: false,
- // pattern: /^[^\$\"'<>?\\\\~`!@$%^()+={}\[\]*:;“”‘’]{1,64}$/i,
- errorMessage: "ERR_INVALID_SURVEY_ID",
- jsonPath: "ptSearchScreen.surveyId",
- disabled: process.env.REACT_APP_NAME === "Citizen" ? true : false,
- }),
-
- //-------------------End SurveyId --------------------------------
+ //-------------------End SurveyId --------------------------------
}),
-
+
button: getCommonContainer({
buttonContainer: getCommonContainer({
resetButton: {
@@ -560,7 +560,7 @@ export const searchApplicationDetails = getCommonCard({
position: "start"
},
required: false,
- // disabled: process.env.REACT_APP_NAME === "Citizen" ? true : false,
+ disabled: process.env.REACT_APP_NAME === "Citizen" ? true : false,
pattern: getPattern("MobileNo"),
jsonPath: "ptSearchScreen.mobileNumber",
errorMessage: "ERR_INVALID_MOBILE_NUMBER"
@@ -580,7 +580,7 @@ export const searchApplicationDetails = getCommonCard({
},
required: false,
- // disabled: process.env.REACT_APP_NAME === "Citizen" ? true : false,
+ // disabled: process.env.REACT_APP_NAME === "Citizen" ? true : false,
pattern: /^[a-zA-Z0-9-]*$/i,
errorMessage: "ERR_INVALID_PROPERTY_ID",
jsonPath: "ptSearchScreen.ids"
diff --git a/web/rainmaker/dev-packages/egov-ui-kit-dev/src/common/propertyTax/Property/index.js b/web/rainmaker/dev-packages/egov-ui-kit-dev/src/common/propertyTax/Property/index.js
index 4b19fdde71..c53b097509 100644
--- a/web/rainmaker/dev-packages/egov-ui-kit-dev/src/common/propertyTax/Property/index.js
+++ b/web/rainmaker/dev-packages/egov-ui-kit-dev/src/common/propertyTax/Property/index.js
@@ -208,9 +208,9 @@ class Property extends Component {
dialogueOpen: true,
urlToAppend: getPropertyLink(propertyId, tenantId, PROPERTY_FORM_PURPOSE.ASSESS, -1, assessmentNo),
});
- if (process.env.REACT_APP_NAME === "Citizen") {
- alert("One-Time Settlement for Property Tax has been enabled in mSeva. Please review and re-assess your property details before proceeding with payment.");
- }
+ // if (process.env.REACT_APP_NAME === "Citizen") {
+ // alert("One-Time Settlement for Property Tax has been enabled in mSeva. Please review and re-assess your property details before proceeding with payment.");
+ // }
}
};
onEditPropertyClick = () => {
diff --git a/web/rainmaker/dev-packages/egov-ui-kit-dev/src/common/propertyTax/YearDialogue/index.js b/web/rainmaker/dev-packages/egov-ui-kit-dev/src/common/propertyTax/YearDialogue/index.js
index a29d690bdc..02e64df98c 100644
--- a/web/rainmaker/dev-packages/egov-ui-kit-dev/src/common/propertyTax/YearDialogue/index.js
+++ b/web/rainmaker/dev-packages/egov-ui-kit-dev/src/common/propertyTax/YearDialogue/index.js
@@ -13,7 +13,6 @@ import { httpRequest } from "../../../utils/api";
import "./index.css";
import { getTenantId, getUserInfo } from "../../../utils/localStorageUtils";
//"egov-ui-kit/utils/localStorageUtils"
-
var localityCode = null;
var surveyIdcode = null;
var editlocalityCode = null;
@@ -91,13 +90,13 @@ const breakYear = (financialYear)=>{
}
return parseInt(financialYear.split("-")[1]);
}
-const checkAssessmentStatus = (constructionYear, assessmentArray,tenantId,selectedYear, getYearList) => {
- //console.log("assessmentArray",getYearList)
+const checkAssessmentStatus = (constructionYear, assessmentArray,tenantId,selectedYear) => {
+ console.log("assessmentArray",assessmentArray)
let missingYears = [];
// if(tenantId === "pb.testing" || tenantId === "pb.patiala"){
let checkedYears;
- const mFinancialYear = getYearList[0]; //getCurrentFinancialYear()
+ const mFinancialYear = getCurrentFinancialYear()
const currentFinancialYear = breakYear(mFinancialYear)
const lastFifthFinancialYear = currentFinancialYear - 4;
const newConstructionYear = constructionYear ==='NA' ? lastFifthFinancialYear : breakYear(constructionYear);
@@ -227,7 +226,7 @@ class YearDialog extends Component {
//
let assessed = userType.toUpperCase() === 'CITIZEN' ? checkAssessmentStatus(constructionYear,assessment,propertiestenantId,this.state.selectedYear)
// : checkAssessmentStatus(constructionYear,assessment,tenantIdcode,this.state.selectedYear);
//console.log("assessed",assessed);
- let assessed = checkAssessmentStatus(constructionYear,assessment,propertiestenantId,this.state.selectedYear, getYearList);
+ let assessed = checkAssessmentStatus(constructionYear,assessment,propertiestenantId,this.state.selectedYear);
if(isLocMatch){
if (this.state.selectedYear !== '' && surveyIdcode != null) {
if(assessed.length > 0){
diff --git a/web/rainmaker/dev-packages/egov-wns-dev/src/ui-config/screens/specs/wns/applyResource/additionalDetails.js b/web/rainmaker/dev-packages/egov-wns-dev/src/ui-config/screens/specs/wns/applyResource/additionalDetails.js
index ee02bc3446..a110479d38 100644
--- a/web/rainmaker/dev-packages/egov-wns-dev/src/ui-config/screens/specs/wns/applyResource/additionalDetails.js
+++ b/web/rainmaker/dev-packages/egov-wns-dev/src/ui-config/screens/specs/wns/applyResource/additionalDetails.js
@@ -340,11 +340,11 @@ export const additionDetails = getCommonCard({
// pattern: /^[0-9]*$/i,
errorMessage: "ERR_DEFAULT_INPUT_FIELD_MSG"
}),
-
+
afterFieldChange: async (action, state, dispatch) => {
let ConectionCategory = await get(state, "screenConfiguration.preparedFinalObject.applyScreen.additionalDetails.connectionCategory");
let connType = await get(state, "screenConfiguration.preparedFinalObject.applyScreen.connectionType");
-
+
if (ConectionCategory === "REGULARIZED" || ConectionCategory === 'DISCHARGE_CONNECTION') {
dispatch(
handleField(
@@ -417,6 +417,14 @@ export const additionDetails = getCommonCard({
true
)
);
+ dispatch(
+ handleField(
+ "apply",
+ `components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.activationDetailsContainer.children.cardContent.children.activeDetails.children.relatedSwConnection`,
+ "visible",
+ false
+ )
+ );
dispatch(
handleField(
"apply",
@@ -433,7 +441,14 @@ export const additionDetails = getCommonCard({
true
)
);
-
+ dispatch(
+ handleField(
+ "apply",
+ `components.div.children.formwizardSecondStep.children.additionDetails.children.cardContent.children.activationDetailsContainer.children.cardContent.children.activeDetails.children.initialMeterReading`,
+ "visible",
+ false
+ )
+ );
}
}
@@ -884,6 +899,21 @@ export const additionDetails = getCommonCard({
errorMessage: "ERR_DEFAULT_INPUT_FIELD_MSG",
jsonPath: "applyScreen.additionalDetails.initialMeterReading"
}),
+ relatedSwConnection: getTextField({
+ label: {
+ labelKey: "WS_ADDN_DETAILS_RELATED_SW_CONNECTION"
+ },
+ placeholder: {
+ labelKey: "WS_ADDN_DETAILS_RELATED_SW_CONNECTION_PLACEHOLDER"
+ },
+ gridDefination: {
+ xs: 12,
+ sm: 6
+ },
+
+ errorMessage: "ERR_DEFAULT_INPUT_FIELD_MSG",
+ jsonPath: "applyScreen.relatedSwConnection"
+ }),
...WSMeterMakes,
})
diff --git a/web/rainmaker/dev-packages/egov-wns-dev/src/ui-config/screens/specs/wns/applyResource/footer.js b/web/rainmaker/dev-packages/egov-wns-dev/src/ui-config/screens/specs/wns/applyResource/footer.js
index f50f7b65f7..2ef22767eb 100644
--- a/web/rainmaker/dev-packages/egov-wns-dev/src/ui-config/screens/specs/wns/applyResource/footer.js
+++ b/web/rainmaker/dev-packages/egov-wns-dev/src/ui-config/screens/specs/wns/applyResource/footer.js
@@ -29,20 +29,20 @@ import commonConfig from "config/common.js";
const isMode = isModifyMode();
const isModeAction = isModifyModeAction();
const setReviewPageRoute = (state, dispatch) => {
- let serviceType = get (state, "screenConfiguration.preparedFinalObject.applyScreen.service");
- let roadCuttingInfo ;
- if(serviceType === "Sewerage"){
- roadCuttingInfo = get(state, "screenConfiguration.preparedFinalObject.applyScreen.roadCuttingInfosw", []);
- dispatch(prepareFinalObject("WaterConnection[0].additionalDetails.userCharges", get(state, "screenConfiguration.preparedFinalObject.applyScreen.additionalDetails.userChargessw")));
- dispatch(prepareFinalObject("WaterConnection[0].additionalDetails.othersFee", get(state, "screenConfiguration.preparedFinalObject.applyScreen.additionalDetails.othersFeesw")));
- dispatch(prepareFinalObject("WaterConnection[0].additionalDetails.compositionFee", get(state, "screenConfiguration.preparedFinalObject.applyScreen.additionalDetails.compositionFeesw")));
- }else{
- roadCuttingInfo = get(state, "screenConfiguration.preparedFinalObject.applyScreen.roadCuttingInfo", []);
- dispatch(prepareFinalObject("WaterConnection[0].additionalDetails.userCharges", get(state, "screenConfiguration.preparedFinalObject.applyScreen.additionalDetails.userCharges")));
- dispatch(prepareFinalObject("WaterConnection[0].additionalDetails.othersFee", get(state, "screenConfiguration.preparedFinalObject.applyScreen.additionalDetails.othersFee")));
- dispatch(prepareFinalObject("WaterConnection[0].additionalDetails.compositionFee", get(state, "screenConfiguration.preparedFinalObject.applyScreen.additionalDetails.compositionFee")));
+ let serviceType = get(state, "screenConfiguration.preparedFinalObject.applyScreen.service");
+ let roadCuttingInfo;
+ if (serviceType === "Sewerage") {
+ roadCuttingInfo = get(state, "screenConfiguration.preparedFinalObject.applyScreen.roadCuttingInfosw", []);
+ dispatch(prepareFinalObject("WaterConnection[0].additionalDetails.userCharges", get(state, "screenConfiguration.preparedFinalObject.applyScreen.additionalDetails.userChargessw")));
+ dispatch(prepareFinalObject("WaterConnection[0].additionalDetails.othersFee", get(state, "screenConfiguration.preparedFinalObject.applyScreen.additionalDetails.othersFeesw")));
+ dispatch(prepareFinalObject("WaterConnection[0].additionalDetails.compositionFee", get(state, "screenConfiguration.preparedFinalObject.applyScreen.additionalDetails.compositionFeesw")));
+ } else {
+ roadCuttingInfo = get(state, "screenConfiguration.preparedFinalObject.applyScreen.roadCuttingInfo", []);
+ dispatch(prepareFinalObject("WaterConnection[0].additionalDetails.userCharges", get(state, "screenConfiguration.preparedFinalObject.applyScreen.additionalDetails.userCharges")));
+ dispatch(prepareFinalObject("WaterConnection[0].additionalDetails.othersFee", get(state, "screenConfiguration.preparedFinalObject.applyScreen.additionalDetails.othersFee")));
+ dispatch(prepareFinalObject("WaterConnection[0].additionalDetails.compositionFee", get(state, "screenConfiguration.preparedFinalObject.applyScreen.additionalDetails.compositionFee")));
}
-
+
if (roadCuttingInfo && roadCuttingInfo.length > 0) {
let formatedRoadCuttingInfo = roadCuttingInfo.filter(value => value.isEmpty !== true);
dispatch(prepareFinalObject("applyScreen.roadCuttingInfo", formatedRoadCuttingInfo));
@@ -368,7 +368,7 @@ const callBackForNext = async (state, dispatch) => {
)
}
} else if (sewerage) {
-
+
if (validateFeildsForSewerage(applyScreenObject)) {
isFormValid = true;
hasFieldToaster = false;
@@ -499,9 +499,9 @@ const callBackForNext = async (state, dispatch) => {
subUsageType && subUsageType.map(items => {
if (items["parentUsageType"] === propertyUsageType) {
let obj = {};
- obj.code = items.code;
- obj.name = items.name;
- obj.parentUsageType = items.parentUsageType,
+ obj.code = items.code;
+ obj.name = items.name;
+ obj.parentUsageType = items.parentUsageType,
obj.active = items.active
usageTypes.push(obj);
if (waterSubUsageType === items.name) {
@@ -539,7 +539,7 @@ const callBackForNext = async (state, dispatch) => {
let connType = get(state.screenConfiguration.preparedFinalObject, "applyScreen.connectionType", "");
let applicationNumber = get(state.screenConfiguration.preparedFinalObject, "applyScreen.applicationNo", "");
if (applicationStatus === "PENDING_FOR_CONNECTION_ACTIVATION" && window.location.href.includes("action=edit")) {
-
+
const sewerage = get(
state.screenConfiguration.preparedFinalObject,
"applyScreen.sewerage"
@@ -553,27 +553,27 @@ const callBackForNext = async (state, dispatch) => {
state.screenConfiguration.preparedFinalObject,
"applyScreen.discharge"
);
-
+
// Show sewerage-specific field handling only for sewerage-only applications
- if(sewerage && !water && !discharge){
- // if(sewerage){
- dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.connectionType", "required", false));
- dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.connectionType", "props.required", false));
- dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.numberOfTaps", "required", false));
- dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.numberOfTaps", "props.required", false));
- dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.pipeSize", "required", false));
- dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.pipeSize", "props.required", false));
+ if (sewerage && !water && !discharge) {
+ // if(sewerage){
+ dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.connectionType", "required", false));
+ dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.connectionType", "props.required", false));
+ dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.numberOfTaps", "required", false));
+ dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.numberOfTaps", "props.required", false));
+ dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.pipeSize", "required", false));
+ dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.pipeSize", "props.required", false));
}
// For water or discharge applications, treat them the same way
if (applicationNumber.includes("WS") || discharge) {
- // if (applicationNumber.includes("WS")) {
+ // if (applicationNumber.includes("WS")) {
dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.connectionType", "required", false));
dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.connectionType", "props.required", false));
dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.numberOfTaps", "required", true));
dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.numberOfTaps", "props.required", true));
dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.pipeSize", "required", true));
dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.pipeSize", "props.required", true));
-
+
// Only make subUsageType required if water service is selected (not for discharge-only)
if (water) {
dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.subUsageType", "required", true));
@@ -597,7 +597,7 @@ const callBackForNext = async (state, dispatch) => {
dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.noOfWaterClosets", "required", false));
dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.noOfWaterClosets", "props.required", false));
} else if (sewerage && !water && !discharge) {
- // } else {
+ // } else {
dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.noOfToilets", "required", true));
dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.noOfToilets", "props.required", true));
dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.noOfWaterClosets", "required", true));
@@ -646,7 +646,7 @@ const callBackForNext = async (state, dispatch) => {
dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.roadCuttingChargeContainer.children.cardContent.children.applicantTypeContainer.children.roadCuttingChargeInfoCard.children.multipleApplicantInfo.props.scheama.children.cardContent.children.roadDetails.children.enterArea", "props.required", false));
dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.roadCuttingChargeContainer.children.cardContent.children.applicantTypeContainer.children.roadCuttingChargeInfoCard.children.multipleApplicantInfo.props.scheama.children.cardContent.children.roadDetails.children.roadType", "required", false));
dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.roadCuttingChargeContainer.children.cardContent.children.applicantTypeContainer.children.roadCuttingChargeInfoCard.children.multipleApplicantInfo.props.scheama.children.cardContent.children.roadDetails.children.roadType", "props.required", false));
- }
+ }
else {
const sewerage = get(
state.screenConfiguration.preparedFinalObject,
@@ -660,61 +660,61 @@ const callBackForNext = async (state, dispatch) => {
state.screenConfiguration.preparedFinalObject,
"applyScreen.discharge"
);
-
+
// Show sewerage fields only if sewerage is selected (and not water or discharge)
- if(sewerage && !water && !discharge){
- // if(sewerage){
+ if (sewerage && !water && !discharge) {
+ // if(sewerage){
dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.connectionType", "required", false));
- dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.connectionType", "props.required", false));
- dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.numberOfTaps", "required", false));
- dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.numberOfTaps", "props.required", false));
- dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.pipeSize", "required", false));
- dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.pipeSize", "props.required", false));
- }
-else{
- dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.noOfToilets", "required", false));
- dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.noOfToilets", "props.required", false));
- dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.noOfWaterClosets", "required", false));
- dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.noOfWaterClosets", "props.required", false));
-
- dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.connectionType", "required", true));
- dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.connectionType", "props.required", true));
- dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.numberOfTaps", "required", false));
- dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.numberOfTaps", "props.required", false));
- dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.pipeSize", "required", false));
- dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.pipeSize", "props.required", false));
-
- // Only make subUsageType required if water service is selected (not for discharge-only or sewerage-only)
- if (water) {
- dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.subUsageType", "required", true));
- dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.subUsageType", "props.required", true));
- } else {
- dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.subUsageType", "required", false));
- dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.subUsageType", "props.required", false));
+ dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.connectionType", "props.required", false));
+ dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.numberOfTaps", "required", false));
+ dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.numberOfTaps", "props.required", false));
+ dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.pipeSize", "required", false));
+ dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.pipeSize", "props.required", false));
}
- // dispatch( handleField( "apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.waterSourceType", "required", false ) );
- // dispatch( handleField( "apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.waterSourceType", "props.required", false ) );
- // dispatch( handleField( "apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.dynamicMdmsWaterSource.props.dropdownFields[0]", "isRequired", false) );
- // dispatch( handleField( "apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.dynamicMdmsWaterSource.props.dropdownFields[0]", "requiredValue", false ) );
- // dispatch( handleField( "apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.dynamicMdmsWaterSource.props.dropdownFields[1]", "isRequired", false ) );
- // dispatch( handleField( "apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.dynamicMdmsWaterSource.props.dropdownFields[1]", "requiredValue", false ) );
- dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.activationDetailsContainer.children.cardContent.children.activeDetails.children.connectionExecutionDate", "required", false));
- dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.activationDetailsContainer.children.cardContent.children.activeDetails.children.connectionExecutionDate", "props.required", false));
+ else {
+ dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.noOfToilets", "required", false));
+ dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.noOfToilets", "props.required", false));
+ dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.noOfWaterClosets", "required", false));
+ dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.noOfWaterClosets", "props.required", false));
- dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.roadCuttingChargeContainer.children.cardContent.children.applicantTypeContainer.children.roadCuttingChargeInfoCard.children.multipleApplicantInfo.props.scheama.children.cardContent.children.roadDetails.children.enterArea", "required", false));
- dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.roadCuttingChargeContainer.children.cardContent.children.applicantTypeContainer.children.roadCuttingChargeInfoCard.children.multipleApplicantInfo.props.scheama.children.cardContent.children.roadDetails.children.enterArea", "props.required", false));
- dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.roadCuttingChargeContainer.children.cardContent.children.applicantTypeContainer.children.roadCuttingChargeInfoCard.children.multipleApplicantInfo.props.scheama.children.cardContent.children.roadDetails.children.roadType", "required", false));
- dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.roadCuttingChargeContainer.children.cardContent.children.applicantTypeContainer.children.roadCuttingChargeInfoCard.children.multipleApplicantInfo.props.scheama.children.cardContent.children.roadDetails.children.roadType", "props.required", false));
+ dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.connectionType", "required", true));
+ dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.connectionType", "props.required", true));
+ dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.numberOfTaps", "required", false));
+ dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.numberOfTaps", "props.required", false));
+ dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.pipeSize", "required", false));
+ dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.pipeSize", "props.required", false));
- dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.activationDetailsContainer.children.cardContent.children.activeDetails.children.connectionExecutionDate", "required", false));
- dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.activationDetailsContainer.children.cardContent.children.activeDetails.children.connectionExecutionDate", "props.required", false));
- dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.activationDetailsContainer.children.cardContent.children.activeDetails.children.initialMeterReading", "required", false));
- dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.activationDetailsContainer.children.cardContent.children.activeDetails.children.initialMeterReading", "props.required", false));
- dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.activationDetailsContainer.children.cardContent.children.activeDetails.children.meterID", "required", false));
- dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.activationDetailsContainer.children.cardContent.children.activeDetails.children.meterID", "props.required", false));
- dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.activationDetailsContainer.children.cardContent.children.activeDetails.children.meterInstallationDate", "required", false));
- dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.activationDetailsContainer.children.cardContent.children.activeDetails.children.meterInstallationDate", "props.required", false));
-}
+ // Only make subUsageType required if water service is selected (not for discharge-only or sewerage-only)
+ if (water) {
+ dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.subUsageType", "required", true));
+ dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.subUsageType", "props.required", true));
+ } else {
+ dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.subUsageType", "required", false));
+ dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.subUsageType", "props.required", false));
+ }
+ // dispatch( handleField( "apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.waterSourceType", "required", false ) );
+ // dispatch( handleField( "apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.waterSourceType", "props.required", false ) );
+ // dispatch( handleField( "apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.dynamicMdmsWaterSource.props.dropdownFields[0]", "isRequired", false) );
+ // dispatch( handleField( "apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.dynamicMdmsWaterSource.props.dropdownFields[0]", "requiredValue", false ) );
+ // dispatch( handleField( "apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.dynamicMdmsWaterSource.props.dropdownFields[1]", "isRequired", false ) );
+ // dispatch( handleField( "apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children.dynamicMdmsWaterSource.props.dropdownFields[1]", "requiredValue", false ) );
+ dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.activationDetailsContainer.children.cardContent.children.activeDetails.children.connectionExecutionDate", "required", false));
+ dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.activationDetailsContainer.children.cardContent.children.activeDetails.children.connectionExecutionDate", "props.required", false));
+
+ dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.roadCuttingChargeContainer.children.cardContent.children.applicantTypeContainer.children.roadCuttingChargeInfoCard.children.multipleApplicantInfo.props.scheama.children.cardContent.children.roadDetails.children.enterArea", "required", false));
+ dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.roadCuttingChargeContainer.children.cardContent.children.applicantTypeContainer.children.roadCuttingChargeInfoCard.children.multipleApplicantInfo.props.scheama.children.cardContent.children.roadDetails.children.enterArea", "props.required", false));
+ dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.roadCuttingChargeContainer.children.cardContent.children.applicantTypeContainer.children.roadCuttingChargeInfoCard.children.multipleApplicantInfo.props.scheama.children.cardContent.children.roadDetails.children.roadType", "required", false));
+ dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.roadCuttingChargeContainer.children.cardContent.children.applicantTypeContainer.children.roadCuttingChargeInfoCard.children.multipleApplicantInfo.props.scheama.children.cardContent.children.roadDetails.children.roadType", "props.required", false));
+
+ dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.activationDetailsContainer.children.cardContent.children.activeDetails.children.connectionExecutionDate", "required", false));
+ dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.activationDetailsContainer.children.cardContent.children.activeDetails.children.connectionExecutionDate", "props.required", false));
+ dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.activationDetailsContainer.children.cardContent.children.activeDetails.children.initialMeterReading", "required", false));
+ dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.activationDetailsContainer.children.cardContent.children.activeDetails.children.initialMeterReading", "props.required", false));
+ dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.activationDetailsContainer.children.cardContent.children.activeDetails.children.meterID", "required", false));
+ dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.activationDetailsContainer.children.cardContent.children.activeDetails.children.meterID", "props.required", false));
+ dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.activationDetailsContainer.children.cardContent.children.activeDetails.children.meterInstallationDate", "required", false));
+ dispatch(handleField("apply", "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.activationDetailsContainer.children.cardContent.children.activeDetails.children.meterInstallationDate", "props.required", false));
+ }
}
if (connType === undefined || connType === "Non Metered" || connType === "Bulk-supply" || connType !== "Metered") {
showHideFeilds(dispatch, false);
@@ -734,7 +734,7 @@ else{
if (roadCuttingInfo && roadCuttingInfo.length > 0) {
dispatch(prepareFinalObject("applyScreen.tempRoadCuttingInfo", roadCuttingInfo));
let formatedRoadCuttingInfo = roadCuttingInfo.filter(value => value.emptyObj !== true);
- if (applicationNumber.includes("SW")){
+ if (applicationNumber.includes("SW")) {
dispatch(prepareFinalObject("applyScreen.roadCuttingInfosw", formatedRoadCuttingInfo));
dispatch(prepareFinalObject("applyScreen.additionalDetails.userChargessw", swUserCharges));
dispatch(prepareFinalObject("applyScreen.additionalDetails.othersFeesw", swOthersFee));
@@ -743,7 +743,7 @@ else{
dispatch(prepareFinalObject("applyScreen.additionalDetails.othersFee", ""));
dispatch(prepareFinalObject("applyScreen.additionalDetails.compositionFee", ""));
dispatch(prepareFinalObject("applyScreen.roadCuttingInfo", []));
- }else{
+ } else {
dispatch(prepareFinalObject("applyScreen.roadCuttingInfo", formatedRoadCuttingInfo));
dispatch(prepareFinalObject("applyScreen.additionalDetails.userCharges", swUserCharges));
dispatch(prepareFinalObject("applyScreen.additionalDetails.othersFee", swOthersFee));
@@ -752,7 +752,7 @@ else{
dispatch(prepareFinalObject("applyScreen.additionalDetails.othersFeesw", ""));
dispatch(prepareFinalObject("applyScreen.additionalDetails.compositionFeesw", ""));
dispatch(prepareFinalObject("applyScreen.roadCuttingInfosw", []));
- }
+ }
}
let UsageType = get(state, "screenConfiguration.preparedFinalObject.applyScreen.property.usageCategory");
if (UsageType === "MIXED") {
@@ -804,23 +804,23 @@ else{
}
/* validations for Additional /Docuemnts details screen */
if (activeStep === 2 && process.env.REACT_APP_NAME !== "Citizen") {
-
+
// Get application type flags from Redux state
const isDischargeApplication = get(state, "screenConfiguration.preparedFinalObject.applyScreen.discharge", false);
const isWaterApplication = get(state, "screenConfiguration.preparedFinalObject.applyScreen.water", false);
- const isSewerageApplication = get(state, "screenConfiguration.preparedFinalObject.applyScreen.sewerage", false);
+ const isSewerageApplication = get(state, "screenConfiguration.preparedFinalObject.applyScreen.sewerage", false);
let validate = true;
// Special validation for discharge-only applications
if (isDischargeApplication && !isWaterApplication && !isSewerageApplication) {
// For discharge-only apps, check if discharge fee is entered
let dischargeFee = get(state, "screenConfiguration.preparedFinalObject.applyScreen.additionalDetails.dischargeFee", null);
- //validate = dischargeFee && dischargeFee > 0;
+ //validate = dischargeFee && dischargeFee > 0;
validate = validateFieldsNew("components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children", state, dispatch);
} else {
// For water/sewerage applications, use standard validation
validate = validateFieldsNew("components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.connectiondetailscontainer.children.cardContent.children.connectionDetails.children", state, dispatch);
}
-
+
if (validate) {
isFormValid = true;
hasFieldToaster = false;
@@ -854,11 +854,11 @@ else{
// }
}
else {
-
+
let roadCuttingInfo = get(state, "screenConfiguration.preparedFinalObject.applyScreen.roadCuttingInfo", []);
let roadCuttingInfosw = get(state, "screenConfiguration.preparedFinalObject.applyScreen.roadCuttingInfosw", []);
- if (roadCuttingInfo === 'NA') roadCuttingInfo =[]
- if (roadCuttingInfosw === 'NA') roadCuttingInfosw =[]
+ if (roadCuttingInfo === 'NA') roadCuttingInfo = []
+ if (roadCuttingInfosw === 'NA') roadCuttingInfosw = []
let applicationStatus = get(state.screenConfiguration.preparedFinalObject, "applyScreen.applicationStatus", "");
if (applicationStatus === "PENDING_FOR_CONNECTION_ACTIVATION") {
let waterSourceType = get(state.screenConfiguration.preparedFinalObject, "DynamicMdms.ws-services-masters.waterSource.selectedValues[0].waterSourceType", "");
@@ -1004,15 +1004,15 @@ else{
if (activeStep === 3) {
let waterId
let sewerId
- if (!isModifyMode()){
+ if (!isModifyMode()) {
waterId = get(state, "screenConfiguration.preparedFinalObject.WaterConnection[0].id");
sewerId = get(state, "screenConfiguration.preparedFinalObject.SewerageConnection[0].id");
- }else{
+ } else {
waterId = get(state, "screenConfiguration.preparedFinalObject.WaterConnection[0].water");
sewerId = get(state, "screenConfiguration.preparedFinalObject.SewerageConnection[0].sewerage");
}
-
-
+
+
let roadCuttingInfo = get(state, "screenConfiguration.preparedFinalObject.applyScreen.roadCuttingInfo", []);
// Check application types
const isDischargeApplication = get(state, "screenConfiguration.preparedFinalObject.applyScreen.discharge", false);
@@ -1062,46 +1062,61 @@ else{
}
let applyFor = get(state.screenConfiguration.preparedFinalObject, "applyScreen");
if (!isModifyMode()) {
- const waterVisible = applyFor.water ;
+ const waterVisible = applyFor.water;
const sewerageVisible = applyFor.sewerage;
const dischargeVisible = applyFor.discharge;
- dispatch(
- handleField(
- "apply",
- "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.roadCuttingChargeContainer",
- "visible",
- waterVisible
- )
- );
-
- dispatch(
- handleField(
- "apply",
- "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.roadCuttingChargeContainersw",
- "visible",
- sewerageVisible
- )
- );
+ dispatch(
+ handleField(
+ "apply",
+ "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.roadCuttingChargeContainer",
+ "visible",
+ waterVisible
+ )
+ );
+ dispatch(
+ handleField(
+ "apply",
+ `components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.activationDetailsContainer.children.cardContent.children.activeDetails.children.relatedSwConnection`,
+ "visible",
+ waterVisible
+ )
+ );
-}else{
- dispatch(
- handleField(
- "apply",
- "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.roadCuttingChargeContainer",
- "visible",
- false
- )
- );
+ dispatch(
+ handleField(
+ "apply",
+ "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.roadCuttingChargeContainersw",
+ "visible",
+ sewerageVisible
+ )
+ );
- dispatch(
- handleField(
- "apply",
- "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.roadCuttingChargeContainersw",
- "visible",
- false
- )
- );
-}
+ } else {
+ dispatch(
+ handleField(
+ "apply",
+ "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.roadCuttingChargeContainer",
+ "visible",
+ false
+ )
+ );
+ dispatch(
+ handleField(
+ "apply",
+ `components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.activationDetailsContainer.children.cardContent.children.activeDetails.children.relatedSwConnection`,
+ "visible",
+ false
+ )
+ );
+ dispatch(
+ handleField(
+ "apply",
+ "components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.roadCuttingChargeContainersw",
+ "visible",
+ false
+ )
+ );
+ }
};
const moveToSuccess = (combinedArray, dispatch) => {
diff --git a/web/rainmaker/dev-packages/egov-wns-dev/src/ui-config/screens/specs/wns/applyResource/review-owner.js b/web/rainmaker/dev-packages/egov-wns-dev/src/ui-config/screens/specs/wns/applyResource/review-owner.js
index ce51213e2e..8cdfaa80cd 100644
--- a/web/rainmaker/dev-packages/egov-wns-dev/src/ui-config/screens/specs/wns/applyResource/review-owner.js
+++ b/web/rainmaker/dev-packages/egov-wns-dev/src/ui-config/screens/specs/wns/applyResource/review-owner.js
@@ -18,7 +18,7 @@ import {
handleScreenConfigurationFieldChange as handleField,
prepareFinalObject
} from "egov-ui-framework/ui-redux/screen-configuration/actions";
-import { convertEpochToDateAndHandleNA, handleNA,handleNAnew, handleRoadType } from "../../utils";
+import { convertEpochToDateAndHandleNA, handleNA, handleNAnew, handleRoadType } from "../../utils";
import { serviceConst } from "../../../../../ui-utils/commons";
@@ -382,6 +382,22 @@ export const activateDetailsMeter = {
jsonPath: "WaterConnectionOld[0].additionalDetails.avarageMeterReading",
callBack: handleNA
}
+ ),
+ relatedSwConnection: getLabelWithValueForModifiedLabel(
+ {
+ labelName: "Related SW Connection",
+ labelKey: "WS_ADDN_DETAILS_RELATED_SW_CONNECTION"
+ },
+ {
+ jsonPath: "WaterConnection[0].relatedSwConnection",
+ callBack: handleNA
+ }, {
+ labelKey: "WS_ADDN_DETAILS_RELATED_SW_CONNECTION"
+ },
+ {
+ jsonPath: "WaterConnectionOld[0].relatedSwConnection",
+ callBack: handleNA
+ }
)
}
@@ -407,8 +423,10 @@ export const activationDetailsContainer = {
// }
// ),
reviewConnectionExecutionDate: getDateField({
- label: { labelName: "Connection Execution Date",
- labelKey: "WS_SERV_DETAIL_CONN_EXECUTION_DATE"},
+ label: {
+ labelName: "Connection Execution Date",
+ labelKey: "WS_SERV_DETAIL_CONN_EXECUTION_DATE"
+ },
gridDefination: {
xs: 12,
@@ -432,7 +450,7 @@ export const activationDetailsContainer = {
},
sourceJsonPath: "WaterConnection[0].meterId",
required: true,
- // pattern: /^[a-z0-9]+$/i,
+ // pattern: /^[a-z0-9]+$/i,
errorMessage: "ERR_DEFAULT_INPUT_FIELD_MSG",
jsonPath: "WaterConnection[0].meterId"
}),
@@ -464,6 +482,21 @@ export const activationDetailsContainer = {
errorMessage: "ERR_DEFAULT_INPUT_FIELD_MSG",
jsonPath: "WaterConnection[0].additionalDetails.initialMeterReading"
}),
+ relatedSwConnection: getTextField({
+ label: {
+ labelKey: "WS_ADDN_DETAILS_RELATED_SW_CONNECTION"
+ },
+ placeholder: {
+ labelKey: "WS_ADDN_DETAILS_RELATED_SW_CONNECTION_PLACEHOLDER"
+ },
+ gridDefination: {
+ xs: 12,
+ sm: 6
+ },
+
+ errorMessage: "ERR_DEFAULT_INPUT_FIELD_MSG",
+ jsonPath: "applyScreen.relatedSwConnection"
+ }),
// ...WSMeterMakes,
meterMake: getTextField({
label: {
@@ -498,78 +531,78 @@ export const activationDetailsContainer = {
jsonPath: "WaterConnection[0].additionalDetails.avarageMeterReading"
}),
button: getCommonContainer({
- buttonContainer: getCommonContainer({
- searchButton: {
- uiFramework: "custom-atoms-local",
- moduleName: "egov-pt",
- componentPath: "Button",
- gridDefination: {
- xs: 12,
- sm: 6
- },
- props: {
- variant: "contained",
- className: "public-domain-search-buttons",
- style: {
- color: "white",
- margin: "8px",
- backgroundColor: "rgb(254, 122, 81)",
- borderRadius: "2px",
- width: "220px",
- height: "48px"
- }
- },
- children: {
- buttonLabel: getLabel({
- labelName: "Update",
- labelKey: "Update"
- })
- },
- onClickDefination: {
- action: "condition",
- callBack: async(state, dispatch) => {
+ buttonContainer: getCommonContainer({
+ searchButton: {
+ uiFramework: "custom-atoms-local",
+ moduleName: "egov-pt",
+ componentPath: "Button",
+ gridDefination: {
+ xs: 12,
+ sm: 6
+ },
+ props: {
+ variant: "contained",
+ className: "public-domain-search-buttons",
+ style: {
+ color: "white",
+ margin: "8px",
+ backgroundColor: "rgb(254, 122, 81)",
+ borderRadius: "2px",
+ width: "220px",
+ height: "48px"
+ }
+ },
+ children: {
+ buttonLabel: getLabel({
+ labelName: "Update",
+ labelKey: "Update"
+ })
+ },
+ onClickDefination: {
+ action: "condition",
+ callBack: async (state, dispatch) => {
let tenantid = getQueryArg(window.location.href, "tenantId");
- let applicationNumber = getQueryArg(window.location.href, "applicationNumber");
- let serviceType = getQueryArg(window.location.href, "service");
-
- // console.log(state.screenConfiguration.preparedFinalObject.WaterConnection,"ddd");
- let WaterConnection =[];
-
- WaterConnection = state.screenConfiguration.preparedFinalObject.WaterConnection[0];
- // state.screenConfiguration.preparedFinalObject.WaterConnection[0].additionalDetails.meterMake = parseInt(state.screenConfiguration.preparedFinalObject.WaterConnection[0].additionalDetails.meterMake);
- state.screenConfiguration.preparedFinalObject.WaterConnection[0].additionalDetails.initialMeterReading = parseInt(state.screenConfiguration.preparedFinalObject.WaterConnection[0].additionalDetails.initialMeterReading);
+ let applicationNumber = getQueryArg(window.location.href, "applicationNumber");
+ let serviceType = getQueryArg(window.location.href, "service");
+
+ // console.log(state.screenConfiguration.preparedFinalObject.WaterConnection,"ddd");
+ let WaterConnection = [];
+
+ WaterConnection = state.screenConfiguration.preparedFinalObject.WaterConnection[0];
+ // state.screenConfiguration.preparedFinalObject.WaterConnection[0].additionalDetails.meterMake = parseInt(state.screenConfiguration.preparedFinalObject.WaterConnection[0].additionalDetails.meterMake);
+ state.screenConfiguration.preparedFinalObject.WaterConnection[0].additionalDetails.initialMeterReading = parseInt(state.screenConfiguration.preparedFinalObject.WaterConnection[0].additionalDetails.initialMeterReading);
state.screenConfiguration.preparedFinalObject.WaterConnection[0].connectionExecutionDate = new Date(state.screenConfiguration.preparedFinalObject.WaterConnection[0].connectionExecutionDate).getTime();
- state.screenConfiguration.preparedFinalObject.WaterConnection[0].meterInstallationDate = new Date(state.screenConfiguration.preparedFinalObject.WaterConnection[0].meterInstallationDate).getTime();
- state.screenConfiguration.preparedFinalObject.WaterConnection[0].additionalDetails.avarageMeterReading = parseInt(state.screenConfiguration.preparedFinalObject.WaterConnection[0].additionalDetails.avarageMeterReading);
- let mydatadum = [
- { key: "tenantId", value: tenantid },
- { key: "applicationNumber", value: applicationNumber }
- ];
-
- const responseWater = await httpRequest(
- "post",
- "/ws-services/wc/_search",
- "_search",
- mydatadum
- );
-
- if (responseWater.WaterConnection && responseWater.WaterConnection.length > 0) {
+ state.screenConfiguration.preparedFinalObject.WaterConnection[0].meterInstallationDate = new Date(state.screenConfiguration.preparedFinalObject.WaterConnection[0].meterInstallationDate).getTime();
+ state.screenConfiguration.preparedFinalObject.WaterConnection[0].additionalDetails.avarageMeterReading = parseInt(state.screenConfiguration.preparedFinalObject.WaterConnection[0].additionalDetails.avarageMeterReading);
+ let mydatadum = [
+ { key: "tenantId", value: tenantid },
+ { key: "applicationNumber", value: applicationNumber }
+ ];
+
+ const responseWater = await httpRequest(
+ "post",
+ "/ws-services/wc/_search",
+ "_search",
+ mydatadum
+ );
+
+ if (responseWater.WaterConnection && responseWater.WaterConnection.length > 0) {
// WaterConnection.push(responseWater.WaterConnection[0]);"isworkflowdisabled":true,
- }
- dispatch(prepareFinalObject("WaterConnection[0].isworkflowdisabled", true));
- WaterConnection
- if(serviceType == "WATER"){
- let responce = await httpRequest("post","/ws-services/wc/_update","_update", [], { WaterConnection: WaterConnection });
- if(responce.WaterConnection.length > 0 ){
+ }
+ dispatch(prepareFinalObject("WaterConnection[0].isworkflowdisabled", true));
+ WaterConnection
+ if (serviceType == "WATER") {
+ let responce = await httpRequest("post", "/ws-services/wc/_update", "_update", [], { WaterConnection: WaterConnection });
+ if (responce.WaterConnection.length > 0) {
alert("Updated Meter Details");
- }
}
+ }
}
- }
- }
- })
- }),
+ }
+ }
+ })
+ }),
})
};
export const activateDetailsNonMeter = {
diff --git a/web/rainmaker/dev-packages/egov-wns-dev/src/ui-config/screens/specs/wns/applyResource/reviewOwner.js b/web/rainmaker/dev-packages/egov-wns-dev/src/ui-config/screens/specs/wns/applyResource/reviewOwner.js
index e99c6665d1..6ef68b72d2 100644
--- a/web/rainmaker/dev-packages/egov-wns-dev/src/ui-config/screens/specs/wns/applyResource/reviewOwner.js
+++ b/web/rainmaker/dev-packages/egov-wns-dev/src/ui-config/screens/specs/wns/applyResource/reviewOwner.js
@@ -7,7 +7,7 @@ import {
getDivider,
getLabelWithValueForModifiedLabel
} from "egov-ui-framework/ui-config/screens/specs/utils";
-import { convertEpochToDateAndHandleNA, handleNA,handleNAnew, handleRoadType } from '../../utils';
+import { convertEpochToDateAndHandleNA, handleNA, handleNAnew, handleRoadType } from '../../utils';
import { changeStep } from "./footer";
const getHeader = label => {
@@ -38,7 +38,7 @@ const roadCuttingChargesHeader = getHeader({
});
const roadCuttingChargesHeadersw = getHeader({
labelKey: "Sewerage Road Cutting Charges"
- // labelKey: "WS_ROAD_CUTTING_CHARGE_DETAILSsss"
+
});
@@ -237,8 +237,10 @@ export const reviewMeterMakeReading = getLabelWithValueForModifiedLabel(
labelName: "Initial Meter Reading",
labelKey: "WS_ADDN_DETAILS_INITIAL_METER_MAKE"
},
- { jsonPath: "applyScreen.additionalDetails.meterMake",
- callBack: handleNA },
+ {
+ jsonPath: "applyScreen.additionalDetails.meterMake",
+ callBack: handleNA
+ },
{
labelKey: "WS_OLD_LABEL_NAME"
},
@@ -252,8 +254,10 @@ export const reviewAverageMakeReading = getLabelWithValueForModifiedLabel(
labelName: "Initial Meter Reading",
labelKey: "WS_ADDN_DETAILS_INITIAL_AVERAGE_MAKE"
},
- { jsonPath: "applyScreen.additionalDetails.avarageMeterReading",
- callBack: handleNA },
+ {
+ jsonPath: "applyScreen.additionalDetails.avarageMeterReading",
+ callBack: handleNA
+ },
{
labelKey: "WS_OLD_LABEL_NAME"
},
@@ -262,7 +266,23 @@ export const reviewAverageMakeReading = getLabelWithValueForModifiedLabel(
callBack: handleNA
}
);
-
+export const relatedSwConnection = getLabelWithValueForModifiedLabel(
+ {
+ labelName: "Related SW Connection",
+ labelKey: "WS_ADDN_DETAILS_RELATED_SW_CONNECTION"
+ },
+ {
+ jsonPath: "applyScreen.relatedSwConnection",
+ callBack: handleNA
+ },
+ {
+ labelKey: "WS_OLD_LABEL_NAME"
+ },
+ {
+ jsonPath: "WaterConnectionOld[0].relatedSwConnection",
+ callBack: handleNA
+ }
+);
export const reviewWaterSource = getLabelWithValueForModifiedLabel(
{
labelName: "Water Source",
@@ -417,8 +437,10 @@ export const reviewPlumberName = getLabelWithValueForModifiedLabel(
labelName: "Plumber Name",
labelKey: "WS_ADDN_DETAILS_PLUMBER_NAME_LABEL"
},
- { jsonPath: "applyScreen.plumberInfo[0].name",
- callBack: handleNA },
+ {
+ jsonPath: "applyScreen.plumberInfo[0].name",
+ callBack: handleNA
+ },
{
labelKey: "WS_OLD_LABEL_NAME"
},
@@ -528,8 +550,10 @@ export const reviewMeterId = getLabelWithValueForModifiedLabel(
labelName: "Meter ID",
labelKey: "WS_SERV_DETAIL_METER_ID"
},
- { jsonPath: "applyScreen.meterId",
- callBack: handleNA },
+ {
+ jsonPath: "applyScreen.meterId",
+ callBack: handleNA
+ },
{
labelKey: "WS_OLD_LABEL_NAME"
},
@@ -562,8 +586,9 @@ export const reviewInitialMeterReading = getLabelWithValueForModifiedLabel(
labelName: "Initial Meter Reading",
labelKey: "WS_ADDN_DETAILS_INITIAL_METER_READING"
},
- { jsonPath: "applyScreen.additionalDetails.initialMeterReading",
- callBack: handleNAnew
+ {
+ jsonPath: "applyScreen.additionalDetails.initialMeterReading",
+ callBack: handleNAnew
},
{
labelKey: "WS_OLD_LABEL_NAME"
@@ -655,7 +680,7 @@ const connectionDetails = getCommonContainer({
reviewWaterSource,
// reviewWaterSubSource,
reviewPipeSize,
-
+
reviewWaterClosets,
reviewNumberOfToilets,
reviewSubUsageType,
@@ -675,26 +700,26 @@ const roadCuttingCharges = {
props: {
className: "applicant-summary",
scheama: getCommonContainer({
- reviewRoadType : getLabelWithValue(
- {
- labelName: "Road Type",
- labelKey: "WS_ADDN_DETAIL_ROAD_TYPE"
- },
- {
- jsonPath: "applyScreen.roadCuttingInfo[0].roadType",
- callBack: handleRoadType
- }
- ),
- reviewArea : getLabelWithValue(
- {
- labelName: "Area (in sq ft)",
- labelKey: "WS_ADDN_DETAILS_AREA_LABEL"
- },
- {
- jsonPath: "applyScreen.roadCuttingInfo[0].roadCuttingArea",
- callBack: handleNA
- }
- ),
+ reviewRoadType: getLabelWithValue(
+ {
+ labelName: "Road Type",
+ labelKey: "WS_ADDN_DETAIL_ROAD_TYPE"
+ },
+ {
+ jsonPath: "applyScreen.roadCuttingInfo[0].roadType",
+ callBack: handleRoadType
+ }
+ ),
+ reviewArea: getLabelWithValue(
+ {
+ labelName: "Area (in sq ft)",
+ labelKey: "WS_ADDN_DETAILS_AREA_LABEL"
+ },
+ {
+ jsonPath: "applyScreen.roadCuttingInfo[0].roadCuttingArea",
+ callBack: handleNA
+ }
+ ),
}),
items: [],
hasAddItem: false,
@@ -710,7 +735,7 @@ const roadCuttingExtraCharges = getCommonContainer({
reviewCompositionFee,
reviewUserCharges,
reviewOthersFee,
-
+
});
const roadCuttingChargessw = {
uiFramework: "custom-containers",
@@ -718,26 +743,26 @@ const roadCuttingChargessw = {
props: {
className: "applicant-summary",
scheama: getCommonContainer({
- reviewRoadTypesw : getLabelWithValue(
- {
- labelName: "Road Type",
- labelKey: "SW_ADDN_DETAIL_ROAD_TYPE"
- },
- {
- jsonPath: "applyScreen.roadCuttingInfosw[0].roadType",
- callBack: handleRoadType
- }
- ),
- reviewArea : getLabelWithValue(
- {
- labelName: "Area (in sq ft)",
- labelKey: "SW_ADDN_DETAILS_AREA_LABEL"
- },
- {
- jsonPath: "applyScreen.roadCuttingInfosw[0].roadCuttingArea",
- callBack: handleNA
- }
- ),
+ reviewRoadTypesw: getLabelWithValue(
+ {
+ labelName: "Road Type",
+ labelKey: "SW_ADDN_DETAIL_ROAD_TYPE"
+ },
+ {
+ jsonPath: "applyScreen.roadCuttingInfosw[0].roadType",
+ callBack: handleRoadType
+ }
+ ),
+ reviewArea: getLabelWithValue(
+ {
+ labelName: "Area (in sq ft)",
+ labelKey: "SW_ADDN_DETAILS_AREA_LABEL"
+ },
+ {
+ jsonPath: "applyScreen.roadCuttingInfosw[0].roadCuttingArea",
+ callBack: handleNA
+ }
+ ),
}),
items: [],
hasAddItem: false,
@@ -750,7 +775,7 @@ const roadCuttingChargessw = {
}
export const reviewCompositionFeesw = getLabelWithValueForModifiedLabel(
-
+
{
labelName: "Area (in sq ft)",
labelKey: "SW_ADDN_DETAILS_COMPOSITION_LABEL"
@@ -814,4 +839,5 @@ const activationDetails = getCommonContainer({
reviewInitialMeterReading,
reviewMeterMakeReading,
reviewAverageMakeReading,
+ relatedSwConnection,
});
diff --git a/web/rainmaker/dev-packages/egov-wns-dev/src/ui-config/screens/specs/wns/connectionDetailsResource/service-details.js b/web/rainmaker/dev-packages/egov-wns-dev/src/ui-config/screens/specs/wns/connectionDetailsResource/service-details.js
index 211def050e..1660bbd561 100644
--- a/web/rainmaker/dev-packages/egov-wns-dev/src/ui-config/screens/specs/wns/connectionDetailsResource/service-details.js
+++ b/web/rainmaker/dev-packages/egov-wns-dev/src/ui-config/screens/specs/wns/connectionDetailsResource/service-details.js
@@ -27,6 +27,7 @@ export const waterDetails = () => {
waterSource: getLabelWithValue({ labelKey: "WS_SERV_DETAIL_WATER_SOURCE" }, { jsonPath: "WaterConnection[0].waterSource" }),
ledgerId: getLabelWithValue({ labelKey: "WS_SERV_DETAIL_LEDGER_ID" }, { jsonPath: "WaterConnection[0].additionalDetails.ledgerId", callBack: checkValueForNA }),
averageMeterReading: getLabelWithValue({ labelKey: "AVERAGE METER READING" }, { jsonPath: "WaterConnection[0].additionalDetails.avarageMeterReading" }),
+ relatedSwConnection: getLabelWithValue({ labelKey: "WS_SERV_DETAIL_RELATED_SW_CONNECTION" }, { jsonPath: "WaterConnection[0].relatedSwConnection", callBack: checkValueForNA }),
group: getLabelWithValue({ labelKey: "Group" }, { jsonPath: "WaterConnection[0].additionalDetails.groups" }),
oldConsumerNo: getLabelWithValue({ labelKey: "WS_OLD_CONSUMER_NO" }, { jsonPath: "WaterConnection[0].oldConnectionNo", callBack: checkValueForNA }),
})
@@ -40,6 +41,7 @@ export const waterDetails = () => {
waterSource: getLabelWithValue({ labelKey: "WS_SERV_DETAIL_WATER_SOURCE" }, { jsonPath: "WaterConnection[0].waterSource" }),
ledgerId: getLabelWithValue({ labelKey: "WS_SERV_DETAIL_LEDGER_ID" }, { jsonPath: "WaterConnection[0].additionalDetails.ledgerId", callBack: checkValueForNA }),
averageMeterReading: getLabelWithValue({ labelKey: "AVERAGE METER READING" }, { jsonPath: "WaterConnection[0].additionalDetails.avarageMeterReading" }),
+ relatedSwConnection: getLabelWithValue({ labelKey: "WS_SERV_DETAIL_RELATED_SW_CONNECTION" }, { jsonPath: "WaterConnection[0].relatedSwConnection", callBack: checkValueForNA }),
group: getLabelWithValue({ labelKey: "Group" }, { jsonPath: "WaterConnection[0].additionalDetails.groups" }),
// waterSubSource: getLabelWithValue({ labelKey: "WS_SERV_DETAIL_WATER_SUB_SOURCE" }, { jsonPath: "WaterConnection[0].waterSubSource" }),
numberOfTaps: getLabelWithValue({ labelKey: "WS_SERV_DETAIL_NO_OF_TAPS" }, { jsonPath: "WaterConnection[0].noOfTaps" }),
diff --git a/web/rainmaker/dev-packages/egov-wns-dev/src/ui-config/screens/specs/wns/search-preview.js b/web/rainmaker/dev-packages/egov-wns-dev/src/ui-config/screens/specs/wns/search-preview.js
index 47e567ac6e..92d5a3b899 100644
--- a/web/rainmaker/dev-packages/egov-wns-dev/src/ui-config/screens/specs/wns/search-preview.js
+++ b/web/rainmaker/dev-packages/egov-wns-dev/src/ui-config/screens/specs/wns/search-preview.js
@@ -1213,7 +1213,7 @@ const searchResults = async (action, state, dispatch, applicationNumber, process
set(
action.screenConfig,
"components.div.children.taskDetails.children.cardContent.children.estimate.visible",
- false
+ true
);
}
};
diff --git a/web/rainmaker/dev-packages/egov-wns-dev/src/ui-config/screens/specs/wns/ticket.js b/web/rainmaker/dev-packages/egov-wns-dev/src/ui-config/screens/specs/wns/ticket.js
index b0e0f2f38f..678ed25a3f 100644
--- a/web/rainmaker/dev-packages/egov-wns-dev/src/ui-config/screens/specs/wns/ticket.js
+++ b/web/rainmaker/dev-packages/egov-wns-dev/src/ui-config/screens/specs/wns/ticket.js
@@ -148,6 +148,5 @@ const ticket = {
export default ticket
const openTicketTool = (state, dispatch) => {
- //window.open("https://stvending.punjab.gov.in/ticket/", "_blank")
- window.open("https://mseva.lgpunjab.gov.in/ticket/", "_blank")
+ window.open("https://stvending.punjab.gov.in/ticket/", "_blank")
};
diff --git a/web/rainmaker/dev-packages/egov-wns-dev/src/ui-utils/commons.js b/web/rainmaker/dev-packages/egov-wns-dev/src/ui-utils/commons.js
index 781c8e1cbd..c9b2010459 100644
--- a/web/rainmaker/dev-packages/egov-wns-dev/src/ui-utils/commons.js
+++ b/web/rainmaker/dev-packages/egov-wns-dev/src/ui-utils/commons.js
@@ -610,7 +610,7 @@ export const prepareDocumentsUploadData = (state, dispatch) => {
};
const parserFunction = (state) => {
-
+
let queryObject = JSON.parse(JSON.stringify(get(state.screenConfiguration.preparedFinalObject, "applyScreen", {})));
//console.log("Hello Test"+JSON.stringify(queryObject))
let iPin = getIPin();
@@ -1122,6 +1122,14 @@ export const applyForSewerage = async (state, dispatch) => {
false
)
);
+ dispatch(
+ handleField(
+ "apply",
+ `components.div.children.formwizardThirdStep.children.additionDetails.children.cardContent.children.activationDetailsContainer.children.cardContent.children.activeDetails.children.relatedSwConnection`,
+ "visible",
+ false
+ )
+ );
dispatch(
handleField(
"apply",
@@ -1151,7 +1159,7 @@ export const applyForSewerage = async (state, dispatch) => {
//queryObject.tenantId = (queryObject && queryObject.property && queryObject.property.tenantId) ? queryObject.property.tenantId : null;
queryObject.tenantId = parsedTenantId;
if (method === "UPDATE") {
-
+
queryObject.additionalDetails.appCreatedDate = get(
state.screenConfiguration.preparedFinalObject,
"SewerageConnection[0].additionalDetails.appCreatedDate"
@@ -1197,7 +1205,7 @@ export const applyForSewerage = async (state, dispatch) => {
}
queryObject.additionalDetails.locality = queryObject.property.address.locality.code;
today = convertDateToEpoch(today);
-
+
let today = new Date();
let dd = String(today.getDate()).padStart(2, '0');
let mm = String(today.getMonth() + 1).padStart(2, '0'); //January is 0!
@@ -1233,7 +1241,7 @@ export const applyForSewerage = async (state, dispatch) => {
}
export const applyForBothWaterAndSewerage = async (state, dispatch) => {
-
+
let method;
let queryObject = parserFunction(state);
@@ -1651,9 +1659,9 @@ export const getPastPaymentsForSewerage = async (dispatch) => {
export const createMeterReading = async (dispatch, body, mode) => {
dispatch(toggleSpinner());
let url
- if(mode === 'edit'){
+ if (mode === 'edit') {
url = "/ws-calculator/meterConnection/_update"
- }else{
+ } else {
url = "/ws-calculator/meterConnection/_create"
}
try {
diff --git a/web/rainmaker/dev-packages/egov-workflow-dev/src/ui-containers-local/WorkFlowContainer/index.js b/web/rainmaker/dev-packages/egov-workflow-dev/src/ui-containers-local/WorkFlowContainer/index.js
index daf76fe34f..c6a0cd86ca 100644
--- a/web/rainmaker/dev-packages/egov-workflow-dev/src/ui-containers-local/WorkFlowContainer/index.js
+++ b/web/rainmaker/dev-packages/egov-workflow-dev/src/ui-containers-local/WorkFlowContainer/index.js
@@ -109,6 +109,7 @@ class WorkFlowContainer extends React.Component {
case "RESUBMIT":
case "FORWARD_FOR_APPROVAL":
case "FORWARD_FOR_FIELD_INSPECTION":
+ case "FORWARD_FOR_FEE":
return "purpose=forward&status=success";
case "MARK":
return "purpose=mark&status=success";
@@ -144,6 +145,9 @@ class WorkFlowContainer extends React.Component {
return "purpose=approve&status=success";
case "ACTIVATE_CONNECTION":
return "purpose=activate&status=success";
+ case "PAY_FEE":
+ case "PAY_DEMAND":
+ return "purpose=pay&status=success";
case "REVOCATE":
return "purpose=application&status=revocated";
case "VOID":
@@ -446,7 +450,7 @@ class WorkFlowContainer extends React.Component {
const PTStatus = get(preparedFinalObject,"Property.workflow.action", []);
const WSassigneePresent = get(preparedFinalObject,"WaterConnection[0].assignee", []) ? get(preparedFinalObject,"WaterConnection[0].assignee", []).length > 0 : false;
const WSassigneeAction = get(preparedFinalObject,"WaterConnection[0].action", "");
- if(assigneePresent || FirenocassigneePresent || PTassigneePresent || WSassigneePresent || assigneeStatus === "PENDINGAPPROVAL" || fireNOCassigneeStatus === "PENDINGAPPROVAL" || PTStatus === "APPROVE" || WSassigneeAction === "APPROVE_FOR_CONNECTION" || WSassigneeAction === "ACTIVATE_CONNECTION" || assigneeAction=== "REJECT" || assigneeAction === "SENDBACKTOCITIZEN"|| FireNOCassigneeAction === "REJECT" || FireNOCassigneeAction === "SENDBACKTOCITIZEN" || PTassigneeAction === "REJECT" || PTassigneeAction === "SENDBACKTOCITIZEN" ){
+ if(assigneePresent || FirenocassigneePresent || PTassigneePresent || WSassigneePresent || assigneeStatus === "PENDINGAPPROVAL" || fireNOCassigneeStatus === "PENDINGAPPROVAL" || PTStatus === "APPROVE" || WSassigneeAction === "APPROVE_FOR_CONNECTION" || WSassigneeAction === "ACTIVATE_CONNECTION" || WSassigneeAction === "FORWARD_FOR_FEE" || assigneeAction=== "REJECT" || assigneeAction === "SENDBACKTOCITIZEN"|| FireNOCassigneeAction === "REJECT" || FireNOCassigneeAction === "SENDBACKTOCITIZEN" || PTassigneeAction === "REJECT" || PTassigneeAction === "SENDBACKTOCITIZEN" ){
this.wfUpdate(label);
}
} else {
@@ -474,7 +478,7 @@ class WorkFlowContainer extends React.Component {
const WSassigneePresent = get(preparedFinalObject,"WaterConnection[0].assignee", []) ? get(preparedFinalObject,"WaterConnection[0].assignee", []).length > 0 : false;
const WSassigneeAction = get(preparedFinalObject,"WaterConnection[0].action", "");
- if(assigneePresent || FirenocassigneePresent ||window.location.pathname.includes("bill-amend")|| PTassigneePresent || WSassigneePresent || assigneeStatus === "PENDINGAPPROVAL" || fireNOCassigneeStatus === "PENDINGAPPROVAL" || PTStatus === "APPROVE" || WSassigneeAction === "APPROVE" || WSassigneeAction === "APPROVE_FOR_CONNECTION" || WSassigneeAction === "APPROVE_CONNECTION" || WSassigneeAction === "ACTIVATE_CONNECTION" || assigneeAction=== "REJECT" || assigneeAction === "CANCEL"|| assigneeAction === "RESUBMIT" || assigneeAction === "SENDBACKTOCITIZEN" ||WSassigneeAction ==="SEND_BACK_TO_CITIZEN"|| WSassigneeAction === "RESUBMIT_APPLICATION" || WSassigneeAction === "REJECT" || FireNOCassigneeAction ==="RESUBMIT" || FireNOCassigneeAction === "REJECT" || FireNOCassigneeAction === "SENDBACKTOCITIZEN" || FireNOCassigneeAction === "CANCEL" || PTassigneeAction === "REJECT" ||PTassigneeAction === "SENDBACKTOCITIZEN" || assigneeStatus === "INITIATED"){
+ if(assigneePresent || FirenocassigneePresent ||window.location.pathname.includes("bill-amend")|| PTassigneePresent || WSassigneePresent || assigneeStatus === "PENDINGAPPROVAL" || fireNOCassigneeStatus === "PENDINGAPPROVAL" || PTStatus === "APPROVE" || WSassigneeAction === "APPROVE" || WSassigneeAction === "APPROVE_FOR_CONNECTION" || WSassigneeAction === "APPROVE_CONNECTION" || WSassigneeAction === "ACTIVATE_CONNECTION" || WSassigneeAction === "FORWARD_FOR_FEE" || assigneeAction=== "REJECT" || assigneeAction === "CANCEL"|| assigneeAction === "RESUBMIT" || assigneeAction === "SENDBACKTOCITIZEN" ||WSassigneeAction ==="SEND_BACK_TO_CITIZEN"|| WSassigneeAction === "RESUBMIT_APPLICATION" || WSassigneeAction === "REJECT" || FireNOCassigneeAction ==="RESUBMIT" || FireNOCassigneeAction === "REJECT" || FireNOCassigneeAction === "SENDBACKTOCITIZEN" || FireNOCassigneeAction === "CANCEL" || PTassigneeAction === "REJECT" ||PTassigneeAction === "SENDBACKTOCITIZEN" || assigneeStatus === "INITIATED"){
this.wfUpdate(label);
}
@@ -534,6 +538,8 @@ getRedirectUrl = (action, businessId, moduleName) => {
}
const payUrl = `/egov-common/pay?consumerCode=${businessId}&tenantId=${tenant}`;
switch (action) {
+ case "PAY_FEE": return bservice ? `${payUrl}&businessService=${bservice}` : payUrl;
+ case "PAY_DEMAND": return bservice ? `${payUrl}&businessService=${bservice}` : payUrl;
case "PAY": return bservice ? `${payUrl}&businessService=${bservice}` : payUrl;
case "EDIT": return isAlreadyEdited
? `/${baseUrl}/apply?applicationNumber=${businessId}&tenantId=${tenant}&action=edit&edited=true`
@@ -706,12 +712,14 @@ prepareWorkflowContract = (data, moduleName) => {
item.action !== "SEND_BACK_TO_CITIZEN" &&
item.action !== "APPROVE_CONNECTION" &&
item.action !== "APPROVE_FOR_CONNECTION" &&
- item.action !== "RESUBMIT_APPLICATION";
+ item.action !== "RESUBMIT_APPLICATION" &&
+ item.action !== "PAY_FEE" &&
+ item.action !== "PAY_DEMAND";
return {
buttonLabel: item.action,
moduleName: data[data.length - 1].businessService,
- isLast: item.action === "PAY" ? true : false,
+ isLast: item.action === "PAY" || item.action === "PAY_FEE" || item.action === "PAY_DEMAND" ? true : false,
buttonUrl: getRedirectUrl(item.action, businessId, businessService),
dialogHeader: getHeaderName(item.action),
showEmployeeList: showEmployeeListResult,
@@ -726,7 +734,7 @@ prepareWorkflowContract = (data, moduleName) => {
return {
buttonLabel: item.action,
moduleName: data[data.length - 1].businessService,
- isLast: item.action === "PAY" ? true : false,
+ isLast: item.action === "PAY" || item.action === "PAY_FEE" || item.action === "PAY_DEMAND" ? true : false,
buttonUrl: getRedirectUrl(item.action, businessId, businessService),
dialogHeader: getHeaderName(item.action),
showEmployeeList: showEmployeeListResult,
diff --git a/web/rainmaker/dev-packages/egov-workflow-dev/src/ui-molecules-local/Footer/index.js b/web/rainmaker/dev-packages/egov-workflow-dev/src/ui-molecules-local/Footer/index.js
index a949415d75..443ce2aa50 100644
--- a/web/rainmaker/dev-packages/egov-workflow-dev/src/ui-molecules-local/Footer/index.js
+++ b/web/rainmaker/dev-packages/egov-workflow-dev/src/ui-molecules-local/Footer/index.js
@@ -239,6 +239,12 @@ class Footer extends React.Component {
item.showEmployeeList = false;
}
}
+
+ if (item.buttonLabel === "PAY_FEE" || item.buttonLabel === "PAY_DEMAND") {
+ item.isLast = true;
+ item.showEmployeeList = false;
+ }
+
if (dataPath === "BPA") {
handleFieldChange(`${dataPath}.comment`, "");
handleFieldChange(`${dataPath}.assignees`, "");