@djb25/digit-ui-module-ws 1.0.122 → 1.0.123
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1530 -1042
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +1532 -1044
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -512,23 +512,6 @@ const convertDateToEpoch = function (dateString, dayStartOrEnd) {
|
|
|
512
512
|
return dateString;
|
|
513
513
|
}
|
|
514
514
|
};
|
|
515
|
-
const convertDateToEpochNew = function (dateString, dayStartOrEnd) {
|
|
516
|
-
if (dayStartOrEnd === void 0) {
|
|
517
|
-
dayStartOrEnd = "dayend";
|
|
518
|
-
}
|
|
519
|
-
try {
|
|
520
|
-
const parts = dateString.match(/(\d{4})-(\d{1,2})-(\d{1,2})/);
|
|
521
|
-
const DateObj = new Date(Date.UTC(parts[1], parts[3] - 1, parts[2]));
|
|
522
|
-
DateObj.setMinutes(DateObj.getMinutes() + DateObj.getTimezoneOffset());
|
|
523
|
-
if (dayStartOrEnd === "dayend") {
|
|
524
|
-
DateObj.setHours(DateObj.getHours() + 24);
|
|
525
|
-
DateObj.setSeconds(DateObj.getSeconds() - 1);
|
|
526
|
-
}
|
|
527
|
-
return DateObj.getTime();
|
|
528
|
-
} catch (e) {
|
|
529
|
-
return dateString;
|
|
530
|
-
}
|
|
531
|
-
};
|
|
532
515
|
const convertEpochToDates = dateEpoch => {
|
|
533
516
|
if (dateEpoch) {
|
|
534
517
|
const dateFromApi = new Date(dateEpoch);
|
|
@@ -8882,6 +8865,16 @@ const WSInfoLabel = _ref2 => {
|
|
|
8882
8865
|
}), ` ${t("WS_CLICK_ON_INFO_LABEL")}`)));
|
|
8883
8866
|
};
|
|
8884
8867
|
|
|
8868
|
+
const chunkArray = function (arr, size) {
|
|
8869
|
+
if (size === void 0) {
|
|
8870
|
+
size = 100;
|
|
8871
|
+
}
|
|
8872
|
+
const chunks = [];
|
|
8873
|
+
for (let i = 0; i < arr.length; i += size) {
|
|
8874
|
+
chunks.push(arr.slice(i, i + size));
|
|
8875
|
+
}
|
|
8876
|
+
return chunks;
|
|
8877
|
+
};
|
|
8885
8878
|
const WSMyApplications = () => {
|
|
8886
8879
|
var _user$info, _user$info$userName, _user$info2, _user$info3, _data$WaterConnection, _SWdata$SewerageConne, _data$WaterConnection2, _SWdata$SewerageConne2, _WSapplicationsList, _SWapplicationsList, _WSapplicationsList2, _SWapplicationsList2, _applicationsList, _filteredApplications;
|
|
8887
8880
|
const {
|
|
@@ -8949,8 +8942,11 @@ const WSMyApplications = () => {
|
|
|
8949
8942
|
},
|
|
8950
8943
|
enabled: userMobileNumber ? true : false
|
|
8951
8944
|
});
|
|
8945
|
+
const userConnectionsEnabled = !!(userMobileNumber && tenantId);
|
|
8952
8946
|
const {
|
|
8953
|
-
|
|
8947
|
+
isLoading: isConnectionsLoading,
|
|
8948
|
+
data: userConnections,
|
|
8949
|
+
error: connectionsError
|
|
8954
8950
|
} = Digit.Hooks.ws.useMyApplicationSearch({
|
|
8955
8951
|
filters: {
|
|
8956
8952
|
tenantId,
|
|
@@ -8963,54 +8959,108 @@ const WSMyApplications = () => {
|
|
|
8963
8959
|
mobileNumber: userMobileNumber,
|
|
8964
8960
|
searchType: "CONNECTION"
|
|
8965
8961
|
},
|
|
8966
|
-
enabled:
|
|
8962
|
+
enabled: userConnectionsEnabled
|
|
8967
8963
|
});
|
|
8964
|
+
const {
|
|
8965
|
+
isLoading: isSWConnectionsLoading,
|
|
8966
|
+
data: userSWConnections,
|
|
8967
|
+
error: swConnectionsError
|
|
8968
|
+
} = Digit.Hooks.ws.useMyApplicationSearch({
|
|
8969
|
+
filters: {
|
|
8970
|
+
tenantId,
|
|
8971
|
+
mobileNumber: userMobileNumber,
|
|
8972
|
+
searchType: "CONNECTION"
|
|
8973
|
+
},
|
|
8974
|
+
BusinessService: "SW"
|
|
8975
|
+
}, {
|
|
8976
|
+
filters: {
|
|
8977
|
+
tenantId,
|
|
8978
|
+
mobileNumber: userMobileNumber,
|
|
8979
|
+
searchType: "CONNECTION"
|
|
8980
|
+
},
|
|
8981
|
+
enabled: userConnectionsEnabled
|
|
8982
|
+
});
|
|
8983
|
+
const isConnectionsFetching = userConnectionsEnabled && (isConnectionsLoading && !connectionsError || isSWConnectionsLoading && !swConnectionsError);
|
|
8968
8984
|
const [pageOffset, setPageOffset] = React.useState(0);
|
|
8969
8985
|
const [pageSize, setPageSize] = React.useState(10);
|
|
8970
8986
|
const [searchParams, setSearchParams] = React.useState(null);
|
|
8971
8987
|
const [billAmendments, setBillAmendments] = React.useState([]);
|
|
8972
8988
|
const [isBillAmendLoading, setIsBillAmendLoading] = React.useState(false);
|
|
8989
|
+
const wsConnectionKeys = React.useMemo(() => {
|
|
8990
|
+
const codes = new Set();
|
|
8991
|
+
((userConnections === null || userConnections === void 0 ? void 0 : userConnections.WaterConnection) || []).forEach(c => {
|
|
8992
|
+
if (c !== null && c !== void 0 && c.connectionNo && typeof c.connectionNo === "string" && c.connectionNo.trim().length > 0) {
|
|
8993
|
+
codes.add(c.connectionNo.trim());
|
|
8994
|
+
}
|
|
8995
|
+
});
|
|
8996
|
+
return Array.from(codes).sort().join(",");
|
|
8997
|
+
}, [userConnections === null || userConnections === void 0 ? void 0 : userConnections.WaterConnection]);
|
|
8998
|
+
const swConnectionKeys = React.useMemo(() => {
|
|
8999
|
+
const codes = new Set();
|
|
9000
|
+
((userSWConnections === null || userSWConnections === void 0 ? void 0 : userSWConnections.SewerageConnections) || []).forEach(c => {
|
|
9001
|
+
if (c !== null && c !== void 0 && c.connectionNo && typeof c.connectionNo === "string" && c.connectionNo.trim().length > 0) {
|
|
9002
|
+
codes.add(c.connectionNo.trim());
|
|
9003
|
+
}
|
|
9004
|
+
});
|
|
9005
|
+
return Array.from(codes).sort().join(",");
|
|
9006
|
+
}, [userSWConnections === null || userSWConnections === void 0 ? void 0 : userSWConnections.SewerageConnections]);
|
|
8973
9007
|
React.useEffect(() => {
|
|
8974
9008
|
let isMounted = true;
|
|
8975
9009
|
const fetchBillAmendments = function () {
|
|
8976
9010
|
try {
|
|
9011
|
+
var _searchParams$applica;
|
|
8977
9012
|
if (!userMobileNumber) return Promise.resolve();
|
|
9013
|
+
if (isConnectionsFetching) return Promise.resolve();
|
|
9014
|
+
const wsCodes = wsConnectionKeys ? wsConnectionKeys.split(",").filter(Boolean) : [];
|
|
9015
|
+
const swCodes = swConnectionKeys ? swConnectionKeys.split(",").filter(Boolean) : [];
|
|
9016
|
+
const searchAppNo = searchParams === null || searchParams === void 0 ? void 0 : (_searchParams$applica = searchParams.applicationNo) === null || _searchParams$applica === void 0 ? void 0 : _searchParams$applica.trim();
|
|
9017
|
+
if (wsCodes.length === 0 && swCodes.length === 0 && !searchAppNo) {
|
|
9018
|
+
setBillAmendments([]);
|
|
9019
|
+
setIsBillAmendLoading(false);
|
|
9020
|
+
return Promise.resolve();
|
|
9021
|
+
}
|
|
8978
9022
|
setIsBillAmendLoading(true);
|
|
8979
9023
|
const _temp = _finallyRethrows(function () {
|
|
8980
9024
|
return _catch(function () {
|
|
8981
|
-
const consumerCodes = new Set();
|
|
8982
|
-
((data === null || data === void 0 ? void 0 : data.WaterConnection) || []).forEach(c => (c === null || c === void 0 ? void 0 : c.connectionNo) && consumerCodes.add(c.connectionNo));
|
|
8983
|
-
((SWdata === null || SWdata === void 0 ? void 0 : SWdata.SewerageConnections) || []).forEach(c => (c === null || c === void 0 ? void 0 : c.connectionNo) && consumerCodes.add(c.connectionNo));
|
|
8984
|
-
((userConnections === null || userConnections === void 0 ? void 0 : userConnections.WaterConnection) || []).forEach(c => (c === null || c === void 0 ? void 0 : c.connectionNo) && consumerCodes.add(c.connectionNo));
|
|
8985
|
-
((userConnections === null || userConnections === void 0 ? void 0 : userConnections.SewerageConnections) || []).forEach(c => (c === null || c === void 0 ? void 0 : c.connectionNo) && consumerCodes.add(c.connectionNo));
|
|
8986
9025
|
const amendmentPromises = [];
|
|
8987
|
-
|
|
8988
|
-
|
|
8989
|
-
|
|
8990
|
-
|
|
8991
|
-
|
|
8992
|
-
|
|
8993
|
-
|
|
8994
|
-
|
|
8995
|
-
|
|
8996
|
-
|
|
8997
|
-
|
|
8998
|
-
|
|
8999
|
-
|
|
9000
|
-
|
|
9001
|
-
|
|
9002
|
-
|
|
9003
|
-
|
|
9004
|
-
|
|
9005
|
-
|
|
9006
|
-
|
|
9007
|
-
})
|
|
9008
|
-
|
|
9009
|
-
|
|
9010
|
-
|
|
9011
|
-
|
|
9012
|
-
|
|
9013
|
-
|
|
9026
|
+
if (wsCodes.length > 0) {
|
|
9027
|
+
const wsChunks = chunkArray(wsCodes, 100);
|
|
9028
|
+
wsChunks.forEach(chunk => {
|
|
9029
|
+
amendmentPromises.push(Digit.PaymentService.searchAmendment(tenantId, {
|
|
9030
|
+
consumerCode: chunk.join(","),
|
|
9031
|
+
businessService: "WS"
|
|
9032
|
+
}).catch(() => ({
|
|
9033
|
+
Amendments: []
|
|
9034
|
+
})));
|
|
9035
|
+
});
|
|
9036
|
+
}
|
|
9037
|
+
if (swCodes.length > 0) {
|
|
9038
|
+
const swChunks = chunkArray(swCodes, 100);
|
|
9039
|
+
swChunks.forEach(chunk => {
|
|
9040
|
+
amendmentPromises.push(Digit.PaymentService.searchAmendment(tenantId, {
|
|
9041
|
+
consumerCode: chunk.join(","),
|
|
9042
|
+
businessService: "SW"
|
|
9043
|
+
}).catch(() => ({
|
|
9044
|
+
Amendments: []
|
|
9045
|
+
})));
|
|
9046
|
+
});
|
|
9047
|
+
}
|
|
9048
|
+
if (searchAppNo) {
|
|
9049
|
+
if (searchAppNo.includes("SW")) {
|
|
9050
|
+
amendmentPromises.push(Digit.PaymentService.searchAmendment(tenantId, {
|
|
9051
|
+
amendmentId: searchAppNo,
|
|
9052
|
+
businessService: "SW"
|
|
9053
|
+
}).catch(() => ({
|
|
9054
|
+
Amendments: []
|
|
9055
|
+
})));
|
|
9056
|
+
} else {
|
|
9057
|
+
amendmentPromises.push(Digit.PaymentService.searchAmendment(tenantId, {
|
|
9058
|
+
amendmentId: searchAppNo,
|
|
9059
|
+
businessService: "WS"
|
|
9060
|
+
}).catch(() => ({
|
|
9061
|
+
Amendments: []
|
|
9062
|
+
})));
|
|
9063
|
+
}
|
|
9014
9064
|
}
|
|
9015
9065
|
return Promise.resolve(Promise.all(amendmentPromises)).then(function (responses) {
|
|
9016
9066
|
const allAmendmentsMap = new Map();
|
|
@@ -9044,7 +9094,7 @@ const WSMyApplications = () => {
|
|
|
9044
9094
|
return () => {
|
|
9045
9095
|
isMounted = false;
|
|
9046
9096
|
};
|
|
9047
|
-
}, [tenantId, userMobileNumber,
|
|
9097
|
+
}, [tenantId, userMobileNumber, wsConnectionKeys, swConnectionKeys, searchParams === null || searchParams === void 0 ? void 0 : searchParams.applicationNo, isConnectionsFetching]);
|
|
9048
9098
|
const isMobile = window.Digit.Utils.browser.isMobile();
|
|
9049
9099
|
const GetCell = value => /*#__PURE__*/React__default.createElement("span", {
|
|
9050
9100
|
className: "cell-text"
|
|
@@ -9212,7 +9262,7 @@ const WSMyApplications = () => {
|
|
|
9212
9262
|
setSearchParams(data);
|
|
9213
9263
|
setPageOffset(0);
|
|
9214
9264
|
};
|
|
9215
|
-
if (isLoading || isSWLoading || PTisLoading || isBillAmendLoading) {
|
|
9265
|
+
if (isLoading || isSWLoading || PTisLoading || isBillAmendLoading || isConnectionsFetching) {
|
|
9216
9266
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
|
|
9217
9267
|
}
|
|
9218
9268
|
let {
|
|
@@ -14140,7 +14190,7 @@ const CloseBtn$5 = props => {
|
|
|
14140
14190
|
onClick: props.onClick
|
|
14141
14191
|
}, /*#__PURE__*/React__default.createElement(Close$5, null));
|
|
14142
14192
|
};
|
|
14143
|
-
const convertDateToEpochNew
|
|
14193
|
+
const convertDateToEpochNew = function (dateString, dayStartOrEnd) {
|
|
14144
14194
|
if (dayStartOrEnd === void 0) {
|
|
14145
14195
|
dayStartOrEnd = "dayend";
|
|
14146
14196
|
}
|
|
@@ -14395,10 +14445,10 @@ const ActionModal$5 = _ref => {
|
|
|
14395
14445
|
}
|
|
14396
14446
|
if (data !== null && data !== void 0 && data.date && (_applicationData11 = applicationData) !== null && _applicationData11 !== void 0 && (_applicationData11$ap = _applicationData11.applicationType) !== null && _applicationData11$ap !== void 0 && _applicationData11$ap.includes("DISCONNECT")) {
|
|
14397
14447
|
const disconnectionExecutionDate = cloneDeep_1(data === null || data === void 0 ? void 0 : data.date);
|
|
14398
|
-
applicationData.disconnectionExecutionDate = convertDateToEpochNew
|
|
14448
|
+
applicationData.disconnectionExecutionDate = convertDateToEpochNew(disconnectionExecutionDate);
|
|
14399
14449
|
} else if (data !== null && data !== void 0 && data.date) {
|
|
14400
14450
|
const connectionExecutionDate = cloneDeep_1(data === null || data === void 0 ? void 0 : data.date);
|
|
14401
|
-
applicationData.connectionExecutionDate = convertDateToEpochNew
|
|
14451
|
+
applicationData.connectionExecutionDate = convertDateToEpochNew(connectionExecutionDate);
|
|
14402
14452
|
}
|
|
14403
14453
|
if (((_applicationData12 = applicationData) === null || _applicationData12 === void 0 ? void 0 : (_applicationData12$pr = _applicationData12.processInstance) === null || _applicationData12$pr === void 0 ? void 0 : _applicationData12$pr.businessService) == "DisconnectWSConnection" || ((_applicationData13 = applicationData) === null || _applicationData13 === void 0 ? void 0 : (_applicationData13$pr = _applicationData13.processInstance) === null || _applicationData13$pr === void 0 ? void 0 : _applicationData13$pr.businessService) == "DisconnectSWConnection" || window.location.href.includes("disconnection")) {
|
|
14404
14454
|
var _applicationData14, _applicationData14$se, _applicationData15, _applicationData15$ap;
|
|
@@ -17669,7 +17719,7 @@ const Rebate_menu = [{
|
|
|
17669
17719
|
value: "Others"
|
|
17670
17720
|
}];
|
|
17671
17721
|
const WSFeeEstimation = _ref => {
|
|
17672
|
-
var _wsAdditionalDetails$, _wsAdditionalDetails$2, _wsAdditionalDetails$3, _wsAdditionalDetails$4, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetails$data9, _wsAdditionalDetails$5, _wsAdditionalDetails$6, _wsAdditionalDetails$7, _workflowDetails$data0, _wsAdditionalDetails$8, _wsAdditionalDetails$9, _wsAdditionalDetails$0, _wsAdditionalDetails$1, _wsAdditionalDetails$10, _wsAdditionalDetails$11, _wsAdditionalDetails$12, _wsAdditionalDetails$13, _wsAdditionalDetails$14, _wsAdditionalDetails$15, _wsAdditionalDetails$16, _workflowDetails$data1, _workflowDetails$data10, _workflowDetails$data11, _workflowDetails$Proc, _workflowDetails$Proc2, _wsAdditionalDetails$17, _wsAdditionalDetails$18, _billDetails$billDeta, _billDetails$billDeta2, _fields$adhocPenaltyR, _fields$adhocRebateRe;
|
|
17722
|
+
var _wsAdditionalDetails$, _wsAdditionalDetails$2, _wsAdditionalDetails$3, _wsAdditionalDetails$4, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetails$data9, _wsAdditionalDetails$5, _wsAdditionalDetails$6, _wsAdditionalDetails$7, _workflowDetails$data0, _wsAdditionalDetails$8, _wsAdditionalDetails$9, _wsAdditionalDetails$0, _wsAdditionalDetails$1, _wsAdditionalDetails$10, _wsAdditionalDetails$11, _wsAdditionalDetails$12, _wsAdditionalDetails$13, _wsAdditionalDetails$14, _wsAdditionalDetails$15, _wsAdditionalDetails$16, _workflowDetails$data1, _workflowDetails$data10, _workflowDetails$data11, _workflowDetails$Proc, _workflowDetails$Proc2, _wsAdditionalDetails$17, _wsAdditionalDetails$18, _billDetails$billDeta, _billDetails$billDeta2, _wsAdditionalDetails$19, _wsAdditionalDetails$20, _wsAdditionalDetails$21, _wsAdditionalDetails$22, _wsAdditionalDetails$23, _wsAdditionalDetails$24, _wsAdditionalDetails$25, _wsAdditionalDetails$26, _wsAdditionalDetails$27, _wsAdditionalDetails$28, _wsAdditionalDetails$29, _wsAdditionalDetails$35, _wsAdditionalDetails$36, _fields$adhocPenaltyR, _fields$adhocRebateRe;
|
|
17673
17723
|
let {
|
|
17674
17724
|
wsAdditionalDetails,
|
|
17675
17725
|
workflowDetails,
|
|
@@ -17711,40 +17761,64 @@ const WSFeeEstimation = _ref => {
|
|
|
17711
17761
|
const reopeningFee = billRows.find(row => (row === null || row === void 0 ? void 0 : row.taxHeadCode) === "WS_REOPENING_FEE" || (row === null || row === void 0 ? void 0 : row.taxHeadCode) === "SW_REOPENING_FEE");
|
|
17712
17762
|
const displayedValues = isDisconnectionFeeOnly ? values.filter(value => (value === null || value === void 0 ? void 0 : value.title) === "WS_DISCONNECTION_FEE" || (value === null || value === void 0 ? void 0 : value.title) === "SW_DISCONNECTION_FEE") : isReconnectionFeeOnly ? values.filter(value => (value === null || value === void 0 ? void 0 : value.title) === "WS_REOPENING_FEE" || (value === null || value === void 0 ? void 0 : value.title) === "SW_REOPENING_FEE") : values;
|
|
17713
17763
|
const displayedTotalAmount = isDisconnectionFeeOnly ? (disconnectionFee === null || disconnectionFee === void 0 ? void 0 : disconnectionFee.amount) ?? (disconnectionFee === null || disconnectionFee === void 0 ? void 0 : disconnectionFee.estimateAmount) ?? 0 : isReconnectionFeeOnly ? (reopeningFee === null || reopeningFee === void 0 ? void 0 : reopeningFee.amount) ?? (reopeningFee === null || reopeningFee === void 0 ? void 0 : reopeningFee.estimateAmount) ?? 0 : billDetails === null || billDetails === void 0 ? void 0 : billDetails.totalAmount;
|
|
17714
|
-
const
|
|
17764
|
+
const hasAdditionalInfraCharge = Boolean((wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$19 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$19 === void 0 ? void 0 : _wsAdditionalDetails$19.hasAdditionalInfraCharge) || billRows.some(b => (b === null || b === void 0 ? void 0 : b.taxHeadCode) === "WS_ADDITIONAL_INFRASTRUCTURE_CHARGE") || values.some(v => (v === null || v === void 0 ? void 0 : v.title) === "WS_ADDITIONAL_INFRASTRUCTURE_CHARGE" || (v === null || v === void 0 ? void 0 : v.taxHeadCode) === "WS_ADDITIONAL_INFRASTRUCTURE_CHARGE"));
|
|
17765
|
+
const isPropUpdated = Boolean(hasAdditionalInfraCharge || (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$20 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$20 === void 0 ? void 0 : _wsAdditionalDetails$20.isPropUpdated) || (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$21 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$21 === void 0 ? void 0 : _wsAdditionalDetails$21.isPropertyUpdated) || (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$22 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$22 === void 0 ? void 0 : (_wsAdditionalDetails$23 = _wsAdditionalDetails$22.appDetails) === null || _wsAdditionalDetails$23 === void 0 ? void 0 : (_wsAdditionalDetails$24 = _wsAdditionalDetails$23.additionalDetails) === null || _wsAdditionalDetails$24 === void 0 ? void 0 : _wsAdditionalDetails$24.isPropertyUpdated) || (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$25 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$25 === void 0 ? void 0 : (_wsAdditionalDetails$26 = _wsAdditionalDetails$25.appDetails) === null || _wsAdditionalDetails$26 === void 0 ? void 0 : (_wsAdditionalDetails$27 = _wsAdditionalDetails$26.additionalDetails) === null || _wsAdditionalDetails$27 === void 0 ? void 0 : _wsAdditionalDetails$27.isPropUpdated));
|
|
17766
|
+
const hasUnpaidCharge = isPropUpdated && Boolean((wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$28 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$28 === void 0 ? void 0 : _wsAdditionalDetails$28.hasUnpaidCharge) !== undefined ? wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$29 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$29 === void 0 ? void 0 : _wsAdditionalDetails$29.hasUnpaidCharge : billRows.some(b => {
|
|
17767
|
+
const st = String((b === null || b === void 0 ? void 0 : b.status) || "").toUpperCase();
|
|
17768
|
+
return st === "UNPAID" || (b === null || b === void 0 ? void 0 : b.taxHeadCode) === "WS_ADDITIONAL_INFRASTRUCTURE_CHARGE" && st !== "PAID";
|
|
17769
|
+
}) || values.some(v => {
|
|
17770
|
+
const st = String((v === null || v === void 0 ? void 0 : v.status) || "").toUpperCase();
|
|
17771
|
+
return st === "UNPAID" || ((v === null || v === void 0 ? void 0 : v.title) === "WS_ADDITIONAL_INFRASTRUCTURE_CHARGE" || (v === null || v === void 0 ? void 0 : v.taxHeadCode) === "WS_ADDITIONAL_INFRASTRUCTURE_CHARGE") && st !== "PAID";
|
|
17772
|
+
}));
|
|
17773
|
+
const displayedIsPaid = isPropUpdated ? !hasUnpaidCharge : isDisconnectionExecuted ? (disconnectionFee === null || disconnectionFee === void 0 ? void 0 : disconnectionFee.status) === "PAID" || isPaid : isPaid;
|
|
17715
17774
|
const stateCode = Digit.ULBService.getStateId();
|
|
17716
17775
|
const {
|
|
17717
17776
|
isMdmsLoading,
|
|
17718
17777
|
data: mdmsRes
|
|
17719
17778
|
} = Digit.Hooks.ws.useMDMS(stateCode, "BillingService", ["TaxHeadMaster"]);
|
|
17720
17779
|
React.useEffect(() => {
|
|
17721
|
-
var _wsAdditionalDetails$
|
|
17780
|
+
var _wsAdditionalDetails$30, _wsAdditionalDetails$31, _sessionFormData$bill;
|
|
17722
17781
|
const data = {
|
|
17723
|
-
...(wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$
|
|
17782
|
+
...(wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$30 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$30 === void 0 ? void 0 : (_wsAdditionalDetails$31 = _wsAdditionalDetails$30.appDetails) === null || _wsAdditionalDetails$31 === void 0 ? void 0 : _wsAdditionalDetails$31.additionalDetails)
|
|
17724
17783
|
};
|
|
17725
17784
|
if ((sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill = sessionFormData.billDetails) === null || _sessionFormData$bill === void 0 ? void 0 : _sessionFormData$bill.length) > 0) {
|
|
17726
|
-
var _sessionFormData$bill2, _sessionFormData$bill3, _sessionFormData$bill4, _sessionFormData$bill5, _sessionFormData$bill6, _sessionFormData$bill7, _sessionFormData$bill8, _sessionFormData$bill9, _sessionFormData$bill0, _sessionFormData$bill1, _sessionFormData$bill10;
|
|
17785
|
+
var _sessionFormData$bill2, _sessionFormData$bill3, _sessionFormData$bill4, _sessionFormData$bill5, _sessionFormData$bill6, _sessionFormData$bill7, _sessionFormData$bill8, _sessionFormData$bill9, _sessionFormData$bill0, _sessionFormData$bill1, _sessionFormData$bill10, _sessionFormData$bill11, _sessionFormData$bill12, _sessionFormData$bill13, _sessionFormData$bill14, _sessionFormData$bill15, _sessionFormData$bill16;
|
|
17727
17786
|
const billAccountDetails = (sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill2 = sessionFormData.billDetails) === null || _sessionFormData$bill2 === void 0 ? void 0 : (_sessionFormData$bill3 = _sessionFormData$bill2[0]) === null || _sessionFormData$bill3 === void 0 ? void 0 : _sessionFormData$bill3.billAccountDetails) || (sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill4 = sessionFormData.billDetails) === null || _sessionFormData$bill4 === void 0 ? void 0 : (_sessionFormData$bill5 = _sessionFormData$bill4[0]) === null || _sessionFormData$bill5 === void 0 ? void 0 : _sessionFormData$bill5.taxHeadEstimates) || [];
|
|
17728
17787
|
const values = billAccountDetails.length > 0 ? billAccountDetails.map(bill => ({
|
|
17729
17788
|
title: bill === null || bill === void 0 ? void 0 : bill.taxHeadCode,
|
|
17730
|
-
value: /*#__PURE__*/React__default.createElement("span", null, "\u20B9", Number(bill === null || bill === void 0 ? void 0 : bill.amount).toFixed(2))
|
|
17789
|
+
value: /*#__PURE__*/React__default.createElement("span", null, "\u20B9", Number((bill === null || bill === void 0 ? void 0 : bill.amount) ?? (bill === null || bill === void 0 ? void 0 : bill.estimateAmount) ?? 0).toFixed(2)),
|
|
17790
|
+
status: bill === null || bill === void 0 ? void 0 : bill.status,
|
|
17791
|
+
taxHeadCode: bill === null || bill === void 0 ? void 0 : bill.taxHeadCode,
|
|
17792
|
+
amount: (bill === null || bill === void 0 ? void 0 : bill.amount) ?? (bill === null || bill === void 0 ? void 0 : bill.estimateAmount) ?? 0
|
|
17731
17793
|
})) : [{
|
|
17732
17794
|
title: "WS_APPLICATION_FEE_HEADER",
|
|
17733
|
-
value: /*#__PURE__*/React__default.createElement("span", null, "\u20B9", sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill6 = sessionFormData.billDetails) === null || _sessionFormData$bill6 === void 0 ? void 0 : (_sessionFormData$bill7 = _sessionFormData$bill6[0]) === null || _sessionFormData$bill7 === void 0 ? void 0 : _sessionFormData$bill7.fee)
|
|
17795
|
+
value: /*#__PURE__*/React__default.createElement("span", null, "\u20B9", (sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill6 = sessionFormData.billDetails) === null || _sessionFormData$bill6 === void 0 ? void 0 : (_sessionFormData$bill7 = _sessionFormData$bill6[0]) === null || _sessionFormData$bill7 === void 0 ? void 0 : _sessionFormData$bill7.fee) || 0),
|
|
17796
|
+
amount: (sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill8 = sessionFormData.billDetails) === null || _sessionFormData$bill8 === void 0 ? void 0 : (_sessionFormData$bill9 = _sessionFormData$bill8[0]) === null || _sessionFormData$bill9 === void 0 ? void 0 : _sessionFormData$bill9.fee) || 0
|
|
17734
17797
|
}, {
|
|
17735
17798
|
title: "WS_SERVICE_FEE_HEADER",
|
|
17736
|
-
value: /*#__PURE__*/React__default.createElement("span", null, "\u20B9", sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$
|
|
17799
|
+
value: /*#__PURE__*/React__default.createElement("span", null, "\u20B9", (sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill0 = sessionFormData.billDetails) === null || _sessionFormData$bill0 === void 0 ? void 0 : (_sessionFormData$bill1 = _sessionFormData$bill0[0]) === null || _sessionFormData$bill1 === void 0 ? void 0 : _sessionFormData$bill1.charge) || 0),
|
|
17800
|
+
amount: (sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill10 = sessionFormData.billDetails) === null || _sessionFormData$bill10 === void 0 ? void 0 : (_sessionFormData$bill11 = _sessionFormData$bill10[0]) === null || _sessionFormData$bill11 === void 0 ? void 0 : _sessionFormData$bill11.charge) || 0
|
|
17737
17801
|
}, {
|
|
17738
17802
|
title: "WS_TAX_HEADER",
|
|
17739
|
-
value: /*#__PURE__*/React__default.createElement("span", null, "\u20B9", sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$
|
|
17803
|
+
value: /*#__PURE__*/React__default.createElement("span", null, "\u20B9", (sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill12 = sessionFormData.billDetails) === null || _sessionFormData$bill12 === void 0 ? void 0 : (_sessionFormData$bill13 = _sessionFormData$bill12[0]) === null || _sessionFormData$bill13 === void 0 ? void 0 : _sessionFormData$bill13.taxAmount) || 0),
|
|
17804
|
+
amount: (sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill14 = sessionFormData.billDetails) === null || _sessionFormData$bill14 === void 0 ? void 0 : (_sessionFormData$bill15 = _sessionFormData$bill14[0]) === null || _sessionFormData$bill15 === void 0 ? void 0 : _sessionFormData$bill15.taxAmount) || 0
|
|
17740
17805
|
}];
|
|
17741
17806
|
setValues(values);
|
|
17742
|
-
setBillDetails(sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$
|
|
17807
|
+
setBillDetails(sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill16 = sessionFormData.billDetails) === null || _sessionFormData$bill16 === void 0 ? void 0 : _sessionFormData$bill16[0]);
|
|
17743
17808
|
} else {
|
|
17744
17809
|
setSessionFormData(data);
|
|
17745
17810
|
setFields(data);
|
|
17746
17811
|
}
|
|
17747
17812
|
}, []);
|
|
17813
|
+
React.useEffect(() => {
|
|
17814
|
+
var _wsAdditionalDetails$32, _wsAdditionalDetails$33, _sessionFormData$bill17, _wsAdditionalDetails$34, _sessionFormData$bill18;
|
|
17815
|
+
if ((wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$32 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$32 === void 0 ? void 0 : (_wsAdditionalDetails$33 = _wsAdditionalDetails$32.values) === null || _wsAdditionalDetails$33 === void 0 ? void 0 : _wsAdditionalDetails$33.length) > 0 && (!(sessionFormData !== null && sessionFormData !== void 0 && sessionFormData.billDetails) || (sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill17 = sessionFormData.billDetails) === null || _sessionFormData$bill17 === void 0 ? void 0 : _sessionFormData$bill17.length) === 0)) {
|
|
17816
|
+
setValues(wsAdditionalDetails.additionalDetails.values);
|
|
17817
|
+
}
|
|
17818
|
+
if (wsAdditionalDetails !== null && wsAdditionalDetails !== void 0 && (_wsAdditionalDetails$34 = wsAdditionalDetails.additionalDetails) !== null && _wsAdditionalDetails$34 !== void 0 && _wsAdditionalDetails$34.data && (!(sessionFormData !== null && sessionFormData !== void 0 && sessionFormData.billDetails) || (sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill18 = sessionFormData.billDetails) === null || _sessionFormData$bill18 === void 0 ? void 0 : _sessionFormData$bill18.length) === 0)) {
|
|
17819
|
+
setBillDetails(wsAdditionalDetails.additionalDetails.data);
|
|
17820
|
+
}
|
|
17821
|
+
}, [wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$35 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$35 === void 0 ? void 0 : _wsAdditionalDetails$35.values, wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$36 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$36 === void 0 ? void 0 : _wsAdditionalDetails$36.data]);
|
|
17748
17822
|
let validation = {};
|
|
17749
17823
|
const Heading = props => {
|
|
17750
17824
|
return /*#__PURE__*/React__default.createElement("h1", {
|
|
@@ -17774,8 +17848,8 @@ const WSFeeEstimation = _ref => {
|
|
|
17774
17848
|
const adhocAmount = fields !== null && fields !== void 0 && fields.adhocPenalty ? Number(fields === null || fields === void 0 ? void 0 : fields.adhocPenalty) : 0;
|
|
17775
17849
|
const rebateAmount = fields !== null && fields !== void 0 && fields.adhocRebate ? Number(fields === null || fields === void 0 ? void 0 : fields.adhocRebate) : 0;
|
|
17776
17850
|
if (adhocAmount || rebateAmount) {
|
|
17777
|
-
var _wsAdditionalDetails$
|
|
17778
|
-
const totalAmount = wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$
|
|
17851
|
+
var _wsAdditionalDetails$37, _wsAdditionalDetails$38;
|
|
17852
|
+
const totalAmount = wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$37 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$37 === void 0 ? void 0 : (_wsAdditionalDetails$38 = _wsAdditionalDetails$37.data) === null || _wsAdditionalDetails$38 === void 0 ? void 0 : _wsAdditionalDetails$38.totalAmount;
|
|
17779
17853
|
if (rebateAmount > totalAmount) {
|
|
17780
17854
|
setShowToast({
|
|
17781
17855
|
isError: false,
|
|
@@ -17784,16 +17858,16 @@ const WSFeeEstimation = _ref => {
|
|
|
17784
17858
|
message: t("ERR_WS_REBATE_GREATER_THAN_AMOUNT")
|
|
17785
17859
|
});
|
|
17786
17860
|
} else {
|
|
17787
|
-
var _wsAdditionalDetails$
|
|
17788
|
-
const applicationNo = wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$
|
|
17789
|
-
const tenantId = wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$
|
|
17861
|
+
var _wsAdditionalDetails$43, _wsAdditionalDetails$44, _wsAdditionalDetails$45, _wsAdditionalDetails$46, _wsAdditionalDetails$47, _wsAdditionalDetails$48, _wsAdditionalDetails$49, _wsAdditionalDetails$50, _wsAdditionalDetails$51, _wsAdditionalDetails$52;
|
|
17862
|
+
const applicationNo = wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$43 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$43 === void 0 ? void 0 : (_wsAdditionalDetails$44 = _wsAdditionalDetails$43.appDetails) === null || _wsAdditionalDetails$44 === void 0 ? void 0 : _wsAdditionalDetails$44.applicationNo;
|
|
17863
|
+
const tenantId = wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$45 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$45 === void 0 ? void 0 : (_wsAdditionalDetails$46 = _wsAdditionalDetails$45.appDetails) === null || _wsAdditionalDetails$46 === void 0 ? void 0 : _wsAdditionalDetails$46.tenantId;
|
|
17790
17864
|
const appAdditionalDetails = {
|
|
17791
|
-
...(wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$
|
|
17865
|
+
...(wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$47 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$47 === void 0 ? void 0 : (_wsAdditionalDetails$48 = _wsAdditionalDetails$47.appDetails) === null || _wsAdditionalDetails$48 === void 0 ? void 0 : _wsAdditionalDetails$48.additionalDetails),
|
|
17792
17866
|
...fields
|
|
17793
17867
|
};
|
|
17794
17868
|
wsAdditionalDetails.additionalDetails.appDetails.additionalDetails = appAdditionalDetails;
|
|
17795
17869
|
const data = {
|
|
17796
|
-
CalculationCriteria: (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$
|
|
17870
|
+
CalculationCriteria: (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$49 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$49 === void 0 ? void 0 : (_wsAdditionalDetails$50 = _wsAdditionalDetails$49.appDetails) === null || _wsAdditionalDetails$50 === void 0 ? void 0 : _wsAdditionalDetails$50.service) == "WATER" ? [{
|
|
17797
17871
|
applicationNo: applicationNo,
|
|
17798
17872
|
tenantId: tenantId,
|
|
17799
17873
|
waterConnection: wsAdditionalDetails.additionalDetails.appDetails
|
|
@@ -17804,9 +17878,9 @@ const WSFeeEstimation = _ref => {
|
|
|
17804
17878
|
}],
|
|
17805
17879
|
isconnectionCalculation: false
|
|
17806
17880
|
};
|
|
17807
|
-
let businessService = (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$
|
|
17881
|
+
let businessService = (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$51 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$51 === void 0 ? void 0 : (_wsAdditionalDetails$52 = _wsAdditionalDetails$51.appDetails) === null || _wsAdditionalDetails$52 === void 0 ? void 0 : _wsAdditionalDetails$52.service) == "WATER" ? "WS" : "SW";
|
|
17808
17882
|
Digit.WSService.wsCalculationEstimate(data, businessService).then((result, err) => {
|
|
17809
|
-
var _result$Calculation, _result$Calculation$, _result$Calculation$$, _result$Calculation3, _result$Calculation3$, _result$Calculation4, _result$Calculation4$, _result$Calculation5, _result$Calculation5$, _result$Calculation6, _result$Calculation6$, _result$Calculation7, _result$Calculation7$, _result$Calculation8;
|
|
17883
|
+
var _result$Calculation, _result$Calculation$, _result$Calculation$$, _result$Calculation3, _result$Calculation3$, _result$Calculation4, _result$Calculation4$, _result$Calculation5, _result$Calculation5$, _result$Calculation6, _result$Calculation6$, _result$Calculation7, _result$Calculation7$, _result$Calculation8, _result$Calculation8$, _result$Calculation9, _result$Calculation9$, _result$Calculation0, _result$Calculation0$, _result$Calculation1;
|
|
17810
17884
|
if ((result === null || result === void 0 ? void 0 : (_result$Calculation = result.Calculation) === null || _result$Calculation === void 0 ? void 0 : (_result$Calculation$ = _result$Calculation[0]) === null || _result$Calculation$ === void 0 ? void 0 : (_result$Calculation$$ = _result$Calculation$.taxHeadEstimates) === null || _result$Calculation$$ === void 0 ? void 0 : _result$Calculation$$.length) > 0) {
|
|
17811
17885
|
var _result$Calculation2, _result$Calculation2$, _result$Calculation2$2;
|
|
17812
17886
|
result === null || result === void 0 ? void 0 : (_result$Calculation2 = result.Calculation) === null || _result$Calculation2 === void 0 ? void 0 : (_result$Calculation2$ = _result$Calculation2[0]) === null || _result$Calculation2$ === void 0 ? void 0 : (_result$Calculation2$2 = _result$Calculation2$.taxHeadEstimates) === null || _result$Calculation2$2 === void 0 ? void 0 : _result$Calculation2$2.forEach(data => data.amount = data.estimateAmount);
|
|
@@ -17815,19 +17889,25 @@ const WSFeeEstimation = _ref => {
|
|
|
17815
17889
|
const taxHeadEstimates = (result === null || result === void 0 ? void 0 : (_result$Calculation4 = result.Calculation) === null || _result$Calculation4 === void 0 ? void 0 : (_result$Calculation4$ = _result$Calculation4[0]) === null || _result$Calculation4$ === void 0 ? void 0 : _result$Calculation4$.taxHeadEstimates) || [];
|
|
17816
17890
|
const values = taxHeadEstimates.length > 0 ? taxHeadEstimates.map(data => ({
|
|
17817
17891
|
title: data === null || data === void 0 ? void 0 : data.taxHeadCode,
|
|
17818
|
-
value: /*#__PURE__*/React__default.createElement("span", null, "\u20B9", Number(data === null || data === void 0 ? void 0 : data.estimateAmount).toFixed(2))
|
|
17892
|
+
value: /*#__PURE__*/React__default.createElement("span", null, "\u20B9", Number((data === null || data === void 0 ? void 0 : data.estimateAmount) ?? (data === null || data === void 0 ? void 0 : data.amount) ?? 0).toFixed(2)),
|
|
17893
|
+
status: data === null || data === void 0 ? void 0 : data.status,
|
|
17894
|
+
taxHeadCode: data === null || data === void 0 ? void 0 : data.taxHeadCode,
|
|
17895
|
+
amount: (data === null || data === void 0 ? void 0 : data.estimateAmount) ?? (data === null || data === void 0 ? void 0 : data.amount) ?? 0
|
|
17819
17896
|
})) : [{
|
|
17820
17897
|
title: "WS_APPLICATION_FEE_HEADER",
|
|
17821
|
-
value: (_result$Calculation5 = result.Calculation) === null || _result$Calculation5 === void 0 ? void 0 : (_result$Calculation5$ = _result$Calculation5[0]) === null || _result$Calculation5$ === void 0 ? void 0 : _result$Calculation5$.fee
|
|
17898
|
+
value: /*#__PURE__*/React__default.createElement("span", null, "\u20B9", ((_result$Calculation5 = result.Calculation) === null || _result$Calculation5 === void 0 ? void 0 : (_result$Calculation5$ = _result$Calculation5[0]) === null || _result$Calculation5$ === void 0 ? void 0 : _result$Calculation5$.fee) || 0),
|
|
17899
|
+
amount: ((_result$Calculation6 = result.Calculation) === null || _result$Calculation6 === void 0 ? void 0 : (_result$Calculation6$ = _result$Calculation6[0]) === null || _result$Calculation6$ === void 0 ? void 0 : _result$Calculation6$.fee) || 0
|
|
17822
17900
|
}, {
|
|
17823
17901
|
title: "WS_SERVICE_FEE_HEADER",
|
|
17824
|
-
value: (_result$
|
|
17902
|
+
value: /*#__PURE__*/React__default.createElement("span", null, "\u20B9", ((_result$Calculation7 = result.Calculation) === null || _result$Calculation7 === void 0 ? void 0 : (_result$Calculation7$ = _result$Calculation7[0]) === null || _result$Calculation7$ === void 0 ? void 0 : _result$Calculation7$.charge) || 0),
|
|
17903
|
+
amount: ((_result$Calculation8 = result.Calculation) === null || _result$Calculation8 === void 0 ? void 0 : (_result$Calculation8$ = _result$Calculation8[0]) === null || _result$Calculation8$ === void 0 ? void 0 : _result$Calculation8$.charge) || 0
|
|
17825
17904
|
}, {
|
|
17826
17905
|
title: "WS_TAX_HEADER",
|
|
17827
|
-
value: (_result$
|
|
17906
|
+
value: /*#__PURE__*/React__default.createElement("span", null, "\u20B9", ((_result$Calculation9 = result.Calculation) === null || _result$Calculation9 === void 0 ? void 0 : (_result$Calculation9$ = _result$Calculation9[0]) === null || _result$Calculation9$ === void 0 ? void 0 : _result$Calculation9$.taxAmount) || 0),
|
|
17907
|
+
amount: ((_result$Calculation0 = result.Calculation) === null || _result$Calculation0 === void 0 ? void 0 : (_result$Calculation0$ = _result$Calculation0[0]) === null || _result$Calculation0$ === void 0 ? void 0 : _result$Calculation0$.taxAmount) || 0
|
|
17828
17908
|
}];
|
|
17829
17909
|
setSessionBillFormData(cloneDeep_1(result.Calculation[0]));
|
|
17830
|
-
setBillDetails(result === null || result === void 0 ? void 0 : (_result$
|
|
17910
|
+
setBillDetails(result === null || result === void 0 ? void 0 : (_result$Calculation1 = result.Calculation) === null || _result$Calculation1 === void 0 ? void 0 : _result$Calculation1[0]);
|
|
17831
17911
|
setValues(values);
|
|
17832
17912
|
fields.billDetails = result === null || result === void 0 ? void 0 : result.Calculation;
|
|
17833
17913
|
setSessionFormData(fields);
|
|
@@ -17883,11 +17963,24 @@ const WSFeeEstimation = _ref => {
|
|
|
17883
17963
|
minWidth: "280px"
|
|
17884
17964
|
}
|
|
17885
17965
|
}, values && /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, null, /*#__PURE__*/React__default.createElement("div", null, displayedValues === null || displayedValues === void 0 ? void 0 : displayedValues.map((value, index) => {
|
|
17966
|
+
const billRow = billRows === null || billRows === void 0 ? void 0 : billRows.find(b => (b === null || b === void 0 ? void 0 : b.taxHeadCode) === (value === null || value === void 0 ? void 0 : value.title) || (b === null || b === void 0 ? void 0 : b.taxHeadCode) === (value === null || value === void 0 ? void 0 : value.taxHeadCode));
|
|
17967
|
+
const rawStatus = (value === null || value === void 0 ? void 0 : value.status) || (billRow === null || billRow === void 0 ? void 0 : billRow.status) || ((value === null || value === void 0 ? void 0 : value.title) === "WS_ADDITIONAL_INFRASTRUCTURE_CHARGE" || (value === null || value === void 0 ? void 0 : value.taxHeadCode) === "WS_ADDITIONAL_INFRASTRUCTURE_CHARGE" ? "UNPAID" : "");
|
|
17968
|
+
const status = String(rawStatus || "").toUpperCase();
|
|
17969
|
+
const isItemPaid = status === "PAID";
|
|
17970
|
+
const isItemUnpaid = status === "UNPAID";
|
|
17971
|
+
const showItemStatus = isPropUpdated && (isItemPaid || isItemUnpaid);
|
|
17886
17972
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
17887
17973
|
className: "border-none",
|
|
17888
|
-
key: `${value.title}`,
|
|
17974
|
+
key: `${value.title || index}`,
|
|
17889
17975
|
label: `${t(`${value.title}`)}`,
|
|
17890
|
-
text: value !== null && value !== void 0 && value.value ? value === null || value === void 0 ? void 0 : value.value : ""
|
|
17976
|
+
text: showItemStatus ? /*#__PURE__*/React__default.createElement("span", null, value !== null && value !== void 0 && value.value ? value === null || value === void 0 ? void 0 : value.value : /*#__PURE__*/React__default.createElement("span", null, "\u20B9", Number((value === null || value === void 0 ? void 0 : value.amount) ?? (billRow === null || billRow === void 0 ? void 0 : billRow.amount) ?? (billRow === null || billRow === void 0 ? void 0 : billRow.estimateAmount) ?? 0).toFixed(2)), /*#__PURE__*/React__default.createElement("span", {
|
|
17977
|
+
style: {
|
|
17978
|
+
color: isItemPaid ? "#2E9E8F" : "#D83A2F",
|
|
17979
|
+
marginLeft: "8px",
|
|
17980
|
+
fontWeight: "600",
|
|
17981
|
+
fontSize: "14px"
|
|
17982
|
+
}
|
|
17983
|
+
}, isItemPaid ? "(paid)" : "(unpaid)")) : value !== null && value !== void 0 && value.value ? value === null || value === void 0 ? void 0 : value.value : ""
|
|
17891
17984
|
});
|
|
17892
17985
|
})), /*#__PURE__*/React__default.createElement("hr", {
|
|
17893
17986
|
style: {
|
|
@@ -17908,7 +18001,7 @@ const WSFeeEstimation = _ref => {
|
|
|
17908
18001
|
className: "border-none",
|
|
17909
18002
|
key: `CS_INBOX_STATUS_FILTER`,
|
|
17910
18003
|
label: `${t(`CS_INBOX_STATUS_FILTER`)}`,
|
|
17911
|
-
text: displayedIsPaid ? t("WS_COMMON_PAID_LABEL") : t("WS_COMMON_NOT_PAID"),
|
|
18004
|
+
text: displayedIsPaid ? t("WS_COMMON_PAID_LABEL") || "PAID" : isPropUpdated ? "UNPAID" : t("WS_COMMON_NOT_PAID"),
|
|
17912
18005
|
textStyle: !displayedIsPaid ? {
|
|
17913
18006
|
color: "#D83A2F"
|
|
17914
18007
|
} : {
|
|
@@ -18109,7 +18202,7 @@ const InfoDetails = _ref2 => {
|
|
|
18109
18202
|
};
|
|
18110
18203
|
|
|
18111
18204
|
const ViewBreakup = _ref => {
|
|
18112
|
-
var _breakUpData$calculat, _breakUpData$calculat2, _breakUpData$calculat3, _wsAdditionalDetails$
|
|
18205
|
+
var _wsAdditionalDetails$2, _wsAdditionalDetails$3, _breakUpData$taxHeadE, _breakUpData$billDeta, _breakUpData$billDeta2, _breakUpData$billDeta3, _wsAdditionalDetails$4, _wsAdditionalDetails$5, _breakUpData$calculat, _breakUpData$calculat2, _breakUpData$calculat3, _wsAdditionalDetails$10, _breakUpData$billSlab4, _breakUpData$billSlab5, _breakUpData$billSlab6, _breakUpData$billSlab7, _breakUpData$billSlab8, _breakUpData$billSlab9;
|
|
18113
18206
|
let {
|
|
18114
18207
|
wsAdditionalDetails,
|
|
18115
18208
|
workflowDetails,
|
|
@@ -18190,8 +18283,27 @@ const ViewBreakup = _ref => {
|
|
|
18190
18283
|
setBreakUpData(breakupData);
|
|
18191
18284
|
showPopUp(true);
|
|
18192
18285
|
};
|
|
18286
|
+
const isPropUpdated = Boolean((wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$2 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$2 === void 0 ? void 0 : _wsAdditionalDetails$2.isPropUpdated) || (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$3 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$3 === void 0 ? void 0 : _wsAdditionalDetails$3.hasAdditionalInfraCharge) || (breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$taxHeadE = breakUpData.taxHeadEstimates) === null || _breakUpData$taxHeadE === void 0 ? void 0 : _breakUpData$taxHeadE.some(b => (b === null || b === void 0 ? void 0 : b.taxHeadCode) === "WS_ADDITIONAL_INFRASTRUCTURE_CHARGE")) || (breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$billDeta = breakUpData.billDetails) === null || _breakUpData$billDeta === void 0 ? void 0 : (_breakUpData$billDeta2 = _breakUpData$billDeta[0]) === null || _breakUpData$billDeta2 === void 0 ? void 0 : (_breakUpData$billDeta3 = _breakUpData$billDeta2.billAccountDetails) === null || _breakUpData$billDeta3 === void 0 ? void 0 : _breakUpData$billDeta3.some(b => (b === null || b === void 0 ? void 0 : b.taxHeadCode) === "WS_ADDITIONAL_INFRASTRUCTURE_CHARGE")) || (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$4 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$4 === void 0 ? void 0 : (_wsAdditionalDetails$5 = _wsAdditionalDetails$4.values) === null || _wsAdditionalDetails$5 === void 0 ? void 0 : _wsAdditionalDetails$5.some(v => (v === null || v === void 0 ? void 0 : v.title) === "WS_ADDITIONAL_INFRASTRUCTURE_CHARGE" || (v === null || v === void 0 ? void 0 : v.taxHeadCode) === "WS_ADDITIONAL_INFRASTRUCTURE_CHARGE")));
|
|
18287
|
+
const renderAmountWithStatus = data => {
|
|
18288
|
+
const rawStatus = (data === null || data === void 0 ? void 0 : data.status) || ((data === null || data === void 0 ? void 0 : data.taxHeadCode) === "WS_ADDITIONAL_INFRASTRUCTURE_CHARGE" ? "UNPAID" : "");
|
|
18289
|
+
const status = String(rawStatus || "").toUpperCase();
|
|
18290
|
+
const isItemPaid = status === "PAID";
|
|
18291
|
+
const isItemUnpaid = status === "UNPAID";
|
|
18292
|
+
const showItemStatus = isPropUpdated && (isItemPaid || isItemUnpaid);
|
|
18293
|
+
if (!showItemStatus) {
|
|
18294
|
+
return /*#__PURE__*/React__default.createElement("span", null, "\u20B9", Number(data === null || data === void 0 ? void 0 : data.amount) || 0);
|
|
18295
|
+
}
|
|
18296
|
+
return /*#__PURE__*/React__default.createElement("span", null, /*#__PURE__*/React__default.createElement("span", null, "\u20B9", Number(data === null || data === void 0 ? void 0 : data.amount) || 0), /*#__PURE__*/React__default.createElement("span", {
|
|
18297
|
+
style: {
|
|
18298
|
+
color: isItemPaid ? "#2E9E8F" : "#D83A2F",
|
|
18299
|
+
marginLeft: "8px",
|
|
18300
|
+
fontWeight: "600",
|
|
18301
|
+
fontSize: "14px"
|
|
18302
|
+
}
|
|
18303
|
+
}, isItemPaid ? "(paid)" : "(unpaid)"));
|
|
18304
|
+
};
|
|
18193
18305
|
const getBreakupReportDetails = () => {
|
|
18194
|
-
var _wsAdditionalDetails$
|
|
18306
|
+
var _wsAdditionalDetails$6, _wsAdditionalDetails$7, _wsAdditionalDetails$8, _wsAdditionalDetails$9, _wsAdditionalDetails$0, _wsAdditionalDetails$1, _breakUpData$billSlab, _breakUpData$billSlab2, _breakUpData$billSlab3;
|
|
18195
18307
|
const amountRows = function (rows) {
|
|
18196
18308
|
if (rows === void 0) {
|
|
18197
18309
|
rows = [];
|
|
@@ -18201,10 +18313,10 @@ const ViewBreakup = _ref => {
|
|
|
18201
18313
|
value: /*#__PURE__*/React__default.createElement("span", null, `₹${formatNumber(row === null || row === void 0 ? void 0 : row.amount)}`)
|
|
18202
18314
|
}));
|
|
18203
18315
|
};
|
|
18204
|
-
const connectionHolder = wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$
|
|
18316
|
+
const connectionHolder = wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$6 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$6 === void 0 ? void 0 : (_wsAdditionalDetails$7 = _wsAdditionalDetails$6.appDetails) === null || _wsAdditionalDetails$7 === void 0 ? void 0 : (_wsAdditionalDetails$8 = _wsAdditionalDetails$7.connectionHolders) === null || _wsAdditionalDetails$8 === void 0 ? void 0 : _wsAdditionalDetails$8[0];
|
|
18205
18317
|
const applicantName = [connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.name, connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.middleName, connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.lastName].filter(Boolean).join(" ") || "-";
|
|
18206
18318
|
const mobileNumber = (connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.mobileNumber) || "-";
|
|
18207
|
-
const appNumber = (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$
|
|
18319
|
+
const appNumber = (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$9 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$9 === void 0 ? void 0 : (_wsAdditionalDetails$0 = _wsAdditionalDetails$9.data) === null || _wsAdditionalDetails$0 === void 0 ? void 0 : _wsAdditionalDetails$0.applicationNo) || (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$1 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$1 === void 0 ? void 0 : _wsAdditionalDetails$1.applicationNumber) || "-";
|
|
18208
18320
|
return [{
|
|
18209
18321
|
title: "Applicant Details",
|
|
18210
18322
|
values: [{
|
|
@@ -18438,7 +18550,7 @@ const ViewBreakup = _ref => {
|
|
|
18438
18550
|
maxWidth: "950px",
|
|
18439
18551
|
minWidth: "280px"
|
|
18440
18552
|
}
|
|
18441
|
-
}, wsAdditionalDetails !== null && wsAdditionalDetails !== void 0 && (_wsAdditionalDetails$
|
|
18553
|
+
}, wsAdditionalDetails !== null && wsAdditionalDetails !== void 0 && (_wsAdditionalDetails$10 = wsAdditionalDetails.additionalDetails) !== null && _wsAdditionalDetails$10 !== void 0 && _wsAdditionalDetails$10.isViewBreakup ? /*#__PURE__*/React__default.createElement("div", {
|
|
18442
18554
|
onClick: e => onPopupOpen(),
|
|
18443
18555
|
style: {
|
|
18444
18556
|
marginTop: "12px"
|
|
@@ -18483,7 +18595,7 @@ const ViewBreakup = _ref => {
|
|
|
18483
18595
|
},
|
|
18484
18596
|
key: `${data === null || data === void 0 ? void 0 : data.taxHeadCode}`,
|
|
18485
18597
|
label: `${t(`${data === null || data === void 0 ? void 0 : data.taxHeadCode}`)}`,
|
|
18486
|
-
text:
|
|
18598
|
+
text: renderAmountWithStatus(data),
|
|
18487
18599
|
textStyle: {
|
|
18488
18600
|
textAlign: "right"
|
|
18489
18601
|
}
|
|
@@ -18497,7 +18609,7 @@ const ViewBreakup = _ref => {
|
|
|
18497
18609
|
},
|
|
18498
18610
|
key: `${data === null || data === void 0 ? void 0 : data.taxHeadCode}`,
|
|
18499
18611
|
label: `${t(`${data === null || data === void 0 ? void 0 : data.taxHeadCode}`)}`,
|
|
18500
|
-
text:
|
|
18612
|
+
text: renderAmountWithStatus(data),
|
|
18501
18613
|
textStyle: {
|
|
18502
18614
|
textAlign: "right"
|
|
18503
18615
|
}
|
|
@@ -18511,7 +18623,7 @@ const ViewBreakup = _ref => {
|
|
|
18511
18623
|
},
|
|
18512
18624
|
key: `${data === null || data === void 0 ? void 0 : data.taxHeadCode}`,
|
|
18513
18625
|
label: `${t(`${data === null || data === void 0 ? void 0 : data.taxHeadCode}`)}`,
|
|
18514
|
-
text:
|
|
18626
|
+
text: renderAmountWithStatus(data),
|
|
18515
18627
|
textStyle: {
|
|
18516
18628
|
textAlign: "right"
|
|
18517
18629
|
}
|
|
@@ -21510,7 +21622,9 @@ const App = _ref => {
|
|
|
21510
21622
|
component: WSExecuteDisconnection
|
|
21511
21623
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
21512
21624
|
path: `${path}/activate-connection`,
|
|
21513
|
-
component:
|
|
21625
|
+
component: () => /*#__PURE__*/React__default.createElement(digitUiReactComponents.LayoutWrapper, {
|
|
21626
|
+
layoutClass: "action"
|
|
21627
|
+
}, /*#__PURE__*/React__default.createElement(WSActivateConnection, null))
|
|
21514
21628
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
21515
21629
|
path: `${path}/restore-application`,
|
|
21516
21630
|
component: WSRestoration
|
|
@@ -22280,12 +22394,12 @@ const WSCalculation = _ref => {
|
|
|
22280
22394
|
var _formValue$useDetails, _formValue$useDetails2, _formValue$useDetails3, _formValue$useDetails4;
|
|
22281
22395
|
const plotAreaNum = parseFloat(formValue === null || formValue === void 0 ? void 0 : (_formValue$useDetails = formValue.useDetails) === null || _formValue$useDetails === void 0 ? void 0 : _formValue$useDetails.plotArea);
|
|
22282
22396
|
const builtUpAreaNum = parseFloat(formValue === null || formValue === void 0 ? void 0 : (_formValue$useDetails2 = formValue.useDetails) === null || _formValue$useDetails2 === void 0 ? void 0 : _formValue$useDetails2.builtUpArea);
|
|
22283
|
-
if (!isNaN(plotAreaNum) && !isNaN(builtUpAreaNum) && plotAreaNum
|
|
22284
|
-
const plotTrans = t("WS_PLOT_AREA_MORE_THAN_BUILT_UP_AREA");
|
|
22397
|
+
if (!isNaN(plotAreaNum) && !isNaN(builtUpAreaNum) && plotAreaNum < builtUpAreaNum) {
|
|
22398
|
+
const plotTrans = t("WS_PLOT_AREA_MORE_THAN_OR_EQUAL_BUILT_UP_AREA") || t("WS_PLOT_AREA_MORE_THAN_BUILT_UP_AREA");
|
|
22285
22399
|
if (setError) {
|
|
22286
22400
|
setError(config === null || config === void 0 ? void 0 : config.key, {
|
|
22287
22401
|
type: "custom",
|
|
22288
|
-
message: plotTrans && plotTrans !== "WS_PLOT_AREA_MORE_THAN_BUILT_UP_AREA" ? plotTrans : "Plot area should always be more than built up area."
|
|
22402
|
+
message: plotTrans && plotTrans !== "WS_PLOT_AREA_MORE_THAN_OR_EQUAL_BUILT_UP_AREA" && plotTrans !== "WS_PLOT_AREA_MORE_THAN_BUILT_UP_AREA" ? plotTrans : "Plot area should always be more than or equal to built up area."
|
|
22289
22403
|
});
|
|
22290
22404
|
}
|
|
22291
22405
|
return;
|
|
@@ -22758,8 +22872,8 @@ const WSCalculation = _ref => {
|
|
|
22758
22872
|
var _formValue$useDetails5;
|
|
22759
22873
|
const plot = parseFloat(formValue === null || formValue === void 0 ? void 0 : (_formValue$useDetails5 = formValue.useDetails) === null || _formValue$useDetails5 === void 0 ? void 0 : _formValue$useDetails5.plotArea);
|
|
22760
22874
|
const built = parseFloat(value);
|
|
22761
|
-
if (!isNaN(plot) && !isNaN(built) && plot
|
|
22762
|
-
return t("WS_PLOT_AREA_MORE_THAN_BUILT_UP_AREA") || "Plot area should always be more than built up area.";
|
|
22875
|
+
if (!isNaN(plot) && !isNaN(built) && plot < built) {
|
|
22876
|
+
return t("WS_PLOT_AREA_MORE_THAN_OR_EQUAL_BUILT_UP_AREA") || t("WS_PLOT_AREA_MORE_THAN_BUILT_UP_AREA") || "Plot area should always be more than or equal to built up area.";
|
|
22763
22877
|
}
|
|
22764
22878
|
return true;
|
|
22765
22879
|
}
|
|
@@ -25979,7 +26093,9 @@ const App$1 = _ref2 => {
|
|
|
25979
26093
|
})
|
|
25980
26094
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
25981
26095
|
path: `${path}/activate-connection`,
|
|
25982
|
-
component:
|
|
26096
|
+
component: () => /*#__PURE__*/React__default.createElement(digitUiReactComponents.LayoutWrapper, {
|
|
26097
|
+
layoutClass: "action"
|
|
26098
|
+
}, /*#__PURE__*/React__default.createElement(WSActivateConnection, null))
|
|
25983
26099
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
25984
26100
|
path: `${path}/water/bill-amendment/search-application`,
|
|
25985
26101
|
component: props => /*#__PURE__*/React__default.createElement(WSSearchBillAmendment, _extends({}, props, {
|
|
@@ -26824,8 +26940,53 @@ const WSPlumberPreference = _ref => {
|
|
|
26824
26940
|
})));
|
|
26825
26941
|
};
|
|
26826
26942
|
|
|
26943
|
+
const METER_MAKES = [{
|
|
26944
|
+
name: "Anand Asahi",
|
|
26945
|
+
code: "ANAND_ASAHI",
|
|
26946
|
+
i18nKey: "WS_METER_MAKE_ANAND_ASAHI"
|
|
26947
|
+
}, {
|
|
26948
|
+
name: "Arad",
|
|
26949
|
+
code: "ARAD",
|
|
26950
|
+
i18nKey: "WS_METER_MAKE_ARAD"
|
|
26951
|
+
}, {
|
|
26952
|
+
name: "Baylan",
|
|
26953
|
+
code: "BAYLAN",
|
|
26954
|
+
i18nKey: "WS_METER_MAKE_BAYLAN"
|
|
26955
|
+
}, {
|
|
26956
|
+
name: "Crescent",
|
|
26957
|
+
code: "CRESCENT",
|
|
26958
|
+
i18nKey: "WS_METER_MAKE_CRESCENT"
|
|
26959
|
+
}, {
|
|
26960
|
+
name: "Dasmesh / DMB",
|
|
26961
|
+
code: "DASMESH",
|
|
26962
|
+
i18nKey: "WS_METER_MAKE_DASMESH"
|
|
26963
|
+
}, {
|
|
26964
|
+
name: "Fedrel",
|
|
26965
|
+
code: "FEDREL",
|
|
26966
|
+
i18nKey: "WS_METER_MAKE_FEDREL"
|
|
26967
|
+
}, {
|
|
26968
|
+
name: "Itron",
|
|
26969
|
+
code: "ITRON",
|
|
26970
|
+
i18nKey: "WS_METER_MAKE_ITRON"
|
|
26971
|
+
}, {
|
|
26972
|
+
name: "Konark",
|
|
26973
|
+
code: "KONARK",
|
|
26974
|
+
i18nKey: "WS_METER_MAKE_KONARK"
|
|
26975
|
+
}, {
|
|
26976
|
+
name: "Kranti",
|
|
26977
|
+
code: "KRANTI",
|
|
26978
|
+
i18nKey: "WS_METER_MAKE_KRANTI"
|
|
26979
|
+
}, {
|
|
26980
|
+
name: "Teksan",
|
|
26981
|
+
code: "TEKSAN",
|
|
26982
|
+
i18nKey: "WS_METER_MAKE_TEKSAN"
|
|
26983
|
+
}, {
|
|
26984
|
+
name: "Other",
|
|
26985
|
+
code: "OTHER",
|
|
26986
|
+
i18nKey: "WS_METER_MAKE_OTHER"
|
|
26987
|
+
}];
|
|
26827
26988
|
const WSActivationDetails = _ref => {
|
|
26828
|
-
var _formData$activationD;
|
|
26989
|
+
var _formData$activationD, _formData$formDetails, _formData$connectionD, _formData$connectionD2, _formData$connectionD3, _appData$additionalDe, _appData$additionalDe2, _appData$additionalDe3, _appData$additionalDe4, _activationDetails$me, _activationDetails$me2, _activationDetails$fe, _activationDetails$fe2;
|
|
26829
26990
|
let {
|
|
26830
26991
|
t,
|
|
26831
26992
|
config,
|
|
@@ -26833,12 +26994,39 @@ const WSActivationDetails = _ref => {
|
|
|
26833
26994
|
formData,
|
|
26834
26995
|
onSelect
|
|
26835
26996
|
} = _ref;
|
|
26997
|
+
const getTrans = (key, defaultVal) => {
|
|
26998
|
+
const val = t(key);
|
|
26999
|
+
return val && val !== key ? val : defaultVal;
|
|
27000
|
+
};
|
|
26836
27001
|
const initialData = Array.isArray(formData === null || formData === void 0 ? void 0 : formData.activationDetails) ? formData === null || formData === void 0 ? void 0 : (_formData$activationD = formData.activationDetails) === null || _formData$activationD === void 0 ? void 0 : _formData$activationD[0] : (formData === null || formData === void 0 ? void 0 : formData.activationDetails) || {};
|
|
27002
|
+
const appData = (formData === null || formData === void 0 ? void 0 : (_formData$formDetails = formData.formDetails) === null || _formData$formDetails === void 0 ? void 0 : _formData$formDetails.applicationData) || (formData === null || formData === void 0 ? void 0 : (_formData$connectionD = formData.connectionDetails) === null || _formData$connectionD === void 0 ? void 0 : (_formData$connectionD2 = _formData$connectionD[0]) === null || _formData$connectionD2 === void 0 ? void 0 : (_formData$connectionD3 = _formData$connectionD2.formDetails) === null || _formData$connectionD3 === void 0 ? void 0 : _formData$connectionD3.applicationData) || {};
|
|
27003
|
+
const findMeterMake = val => {
|
|
27004
|
+
if (!val) return null;
|
|
27005
|
+
if (typeof val === "object" && val !== null && val !== void 0 && val.name) return val;
|
|
27006
|
+
return METER_MAKES.find(m => m.code === val || m.name === val) || {
|
|
27007
|
+
name: val,
|
|
27008
|
+
code: val
|
|
27009
|
+
};
|
|
27010
|
+
};
|
|
27011
|
+
const findMeterSize = val => {
|
|
27012
|
+
if (!val) return "";
|
|
27013
|
+
if (typeof val === "object") return (val === null || val === void 0 ? void 0 : val.value) || (val === null || val === void 0 ? void 0 : val.name) || (val === null || val === void 0 ? void 0 : val.code) || "";
|
|
27014
|
+
return String(val);
|
|
27015
|
+
};
|
|
27016
|
+
const findFerruleSize = val => {
|
|
27017
|
+
if (!val) return "";
|
|
27018
|
+
if (typeof val === "object") return (val === null || val === void 0 ? void 0 : val.value) || (val === null || val === void 0 ? void 0 : val.name) || (val === null || val === void 0 ? void 0 : val.code) || "";
|
|
27019
|
+
return String(val);
|
|
27020
|
+
};
|
|
26837
27021
|
const [activationDetails, setActivationDetails] = React__default.useState({
|
|
26838
|
-
|
|
26839
|
-
|
|
26840
|
-
|
|
26841
|
-
|
|
27022
|
+
meterMake: findMeterMake((initialData === null || initialData === void 0 ? void 0 : initialData.meterMake) || (appData === null || appData === void 0 ? void 0 : (_appData$additionalDe = appData.additionalDetails) === null || _appData$additionalDe === void 0 ? void 0 : _appData$additionalDe.meterMake)),
|
|
27023
|
+
meterNo: (initialData === null || initialData === void 0 ? void 0 : initialData.meterNo) || (initialData === null || initialData === void 0 ? void 0 : initialData.meterId) || (appData === null || appData === void 0 ? void 0 : appData.meterId) || "",
|
|
27024
|
+
meterId: (initialData === null || initialData === void 0 ? void 0 : initialData.meterNo) || (initialData === null || initialData === void 0 ? void 0 : initialData.meterId) || (appData === null || appData === void 0 ? void 0 : appData.meterId) || "",
|
|
27025
|
+
meterSize: findMeterSize((initialData === null || initialData === void 0 ? void 0 : initialData.meterSize) || (appData === null || appData === void 0 ? void 0 : (_appData$additionalDe2 = appData.additionalDetails) === null || _appData$additionalDe2 === void 0 ? void 0 : _appData$additionalDe2.meterSize)),
|
|
27026
|
+
ferruleSize: findFerruleSize((initialData === null || initialData === void 0 ? void 0 : initialData.ferruleSize) || (appData === null || appData === void 0 ? void 0 : (_appData$additionalDe3 = appData.additionalDetails) === null || _appData$additionalDe3 === void 0 ? void 0 : _appData$additionalDe3.ferruleSize)),
|
|
27027
|
+
meterInstallationDate: (initialData === null || initialData === void 0 ? void 0 : initialData.meterInstallationDate) || (appData === null || appData === void 0 ? void 0 : appData.meterInstallationDate) || "",
|
|
27028
|
+
meterInitialReading: (initialData === null || initialData === void 0 ? void 0 : initialData.meterInitialReading) || (appData === null || appData === void 0 ? void 0 : (_appData$additionalDe4 = appData.additionalDetails) === null || _appData$additionalDe4 === void 0 ? void 0 : _appData$additionalDe4.initialMeterReading) || "0",
|
|
27029
|
+
connectionExecutionDate: (initialData === null || initialData === void 0 ? void 0 : initialData.connectionExecutionDate) || (appData === null || appData === void 0 ? void 0 : appData.connectionExecutionDate) || ""
|
|
26842
27030
|
});
|
|
26843
27031
|
React__default.useEffect(() => {
|
|
26844
27032
|
var _formData$activationD2;
|
|
@@ -26846,12 +27034,16 @@ const WSActivationDetails = _ref => {
|
|
|
26846
27034
|
if (actData) {
|
|
26847
27035
|
setActivationDetails(prev => {
|
|
26848
27036
|
const nextState = {
|
|
26849
|
-
|
|
27037
|
+
meterMake: actData.meterMake !== undefined ? findMeterMake(actData.meterMake) : prev.meterMake,
|
|
27038
|
+
meterNo: actData.meterNo !== undefined ? actData.meterNo : actData.meterId !== undefined ? actData.meterId : prev.meterNo,
|
|
27039
|
+
meterId: actData.meterNo !== undefined ? actData.meterNo : actData.meterId !== undefined ? actData.meterId : prev.meterId,
|
|
27040
|
+
meterSize: actData.meterSize !== undefined ? findMeterSize(actData.meterSize) : prev.meterSize,
|
|
27041
|
+
ferruleSize: actData.ferruleSize !== undefined ? findFerruleSize(actData.ferruleSize) : prev.ferruleSize,
|
|
26850
27042
|
meterInstallationDate: actData.meterInstallationDate !== undefined ? actData.meterInstallationDate : prev.meterInstallationDate,
|
|
26851
|
-
meterInitialReading: "
|
|
27043
|
+
meterInitialReading: actData.meterInitialReading !== undefined && actData.meterInitialReading !== "" ? actData.meterInitialReading : prev.meterInitialReading,
|
|
26852
27044
|
connectionExecutionDate: actData.connectionExecutionDate !== undefined ? actData.connectionExecutionDate : prev.connectionExecutionDate
|
|
26853
27045
|
};
|
|
26854
|
-
if (
|
|
27046
|
+
if (lodash.isEqual(prev, nextState)) {
|
|
26855
27047
|
return prev;
|
|
26856
27048
|
}
|
|
26857
27049
|
return nextState;
|
|
@@ -26863,58 +27055,145 @@ const WSActivationDetails = _ref => {
|
|
|
26863
27055
|
onSelect(config.key, [activationDetails]);
|
|
26864
27056
|
}
|
|
26865
27057
|
}, [activationDetails]);
|
|
26866
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
26867
|
-
|
|
26868
|
-
|
|
27058
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
27059
|
+
style: {
|
|
27060
|
+
margin: 0
|
|
27061
|
+
},
|
|
27062
|
+
label: getTrans("WS_METER_MAKE_LABEL", "Meter make/brand name"),
|
|
27063
|
+
isMandatory: true,
|
|
27064
|
+
infoText: t("WS_METER_MAKE_INFO_MSG", "Select approved meter manufacturer or brand name")
|
|
27065
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
27066
|
+
className: "field"
|
|
27067
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Dropdown, {
|
|
27068
|
+
className: "form-field",
|
|
27069
|
+
selected: activationDetails.meterMake,
|
|
27070
|
+
disable: false,
|
|
27071
|
+
option: METER_MAKES,
|
|
27072
|
+
placeholder: getTrans("WS_METER_MAKE_PLACEHOLDER", "Select approved meter name"),
|
|
27073
|
+
select: val => {
|
|
27074
|
+
setActivationDetails({
|
|
27075
|
+
...activationDetails,
|
|
27076
|
+
meterMake: val
|
|
27077
|
+
});
|
|
27078
|
+
},
|
|
27079
|
+
optionKey: "name",
|
|
27080
|
+
t: t
|
|
27081
|
+
}))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
27082
|
+
style: {
|
|
27083
|
+
margin: 0
|
|
27084
|
+
},
|
|
27085
|
+
label: getTrans("WS_METER_NO_LABEL", "Meter No"),
|
|
27086
|
+
isMandatory: true,
|
|
27087
|
+
infoText: t("WS_METER_NO_INFO_MSG", "Enter Serial Number or Meter No engraved on the meter")
|
|
27088
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
26869
27089
|
className: "field"
|
|
26870
27090
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
26871
27091
|
t: t,
|
|
26872
27092
|
type: "text",
|
|
26873
|
-
|
|
26874
|
-
|
|
26875
|
-
|
|
26876
|
-
placeholder: `${t(`WS_METER_ID_PLACEHOLDER`)}`,
|
|
27093
|
+
name: "meterNo",
|
|
27094
|
+
value: activationDetails.meterNo,
|
|
27095
|
+
placeholder: getTrans("WS_METER_NO_PLACEHOLDER", "Enter Meter No"),
|
|
26877
27096
|
onChange: ev => {
|
|
27097
|
+
const val = ev.target.value;
|
|
26878
27098
|
setActivationDetails({
|
|
26879
27099
|
...activationDetails,
|
|
26880
|
-
|
|
27100
|
+
meterNo: val,
|
|
27101
|
+
meterId: val
|
|
26881
27102
|
});
|
|
26882
27103
|
}
|
|
26883
|
-
}))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
26884
|
-
|
|
26885
|
-
|
|
27104
|
+
}))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
27105
|
+
style: {
|
|
27106
|
+
margin: 0
|
|
27107
|
+
},
|
|
27108
|
+
label: getTrans("WS_METER_SIZE_LABEL", "Meter Size"),
|
|
27109
|
+
isMandatory: true,
|
|
27110
|
+
infoText: t("WS_METER_SIZE_INFO_MSG", "Enter diameter / size of the water meter")
|
|
27111
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
27112
|
+
className: "field"
|
|
27113
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
27114
|
+
t: t,
|
|
27115
|
+
type: "text",
|
|
27116
|
+
name: "meterSize",
|
|
27117
|
+
value: typeof activationDetails.meterSize === "object" ? ((_activationDetails$me = activationDetails.meterSize) === null || _activationDetails$me === void 0 ? void 0 : _activationDetails$me.name) || ((_activationDetails$me2 = activationDetails.meterSize) === null || _activationDetails$me2 === void 0 ? void 0 : _activationDetails$me2.value) || "" : activationDetails.meterSize || "",
|
|
27118
|
+
placeholder: getTrans("WS_METER_SIZE_PLACEHOLDER", "Enter Meter Size"),
|
|
27119
|
+
onChange: ev => {
|
|
27120
|
+
const val = ev.target.value;
|
|
27121
|
+
setActivationDetails({
|
|
27122
|
+
...activationDetails,
|
|
27123
|
+
meterSize: val
|
|
27124
|
+
});
|
|
27125
|
+
}
|
|
27126
|
+
}))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
27127
|
+
style: {
|
|
27128
|
+
margin: 0
|
|
27129
|
+
},
|
|
27130
|
+
label: getTrans("WS_FERRULE_SIZE_LABEL", "Ferrule Size"),
|
|
27131
|
+
isMandatory: true,
|
|
27132
|
+
infoText: t("WS_FERRULE_SIZE_INFO_MSG", "Enter size of ferrule connection")
|
|
27133
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
27134
|
+
className: "field"
|
|
27135
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
27136
|
+
t: t,
|
|
27137
|
+
type: "text",
|
|
27138
|
+
name: "ferruleSize",
|
|
27139
|
+
value: typeof activationDetails.ferruleSize === "object" ? ((_activationDetails$fe = activationDetails.ferruleSize) === null || _activationDetails$fe === void 0 ? void 0 : _activationDetails$fe.name) || ((_activationDetails$fe2 = activationDetails.ferruleSize) === null || _activationDetails$fe2 === void 0 ? void 0 : _activationDetails$fe2.value) || "" : activationDetails.ferruleSize || "",
|
|
27140
|
+
placeholder: getTrans("WS_FERRULE_SIZE_PLACEHOLDER", "Enter Ferrule Size"),
|
|
27141
|
+
onChange: ev => {
|
|
27142
|
+
const val = ev.target.value;
|
|
27143
|
+
setActivationDetails({
|
|
27144
|
+
...activationDetails,
|
|
27145
|
+
ferruleSize: val
|
|
27146
|
+
});
|
|
27147
|
+
}
|
|
27148
|
+
}))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
27149
|
+
style: {
|
|
27150
|
+
margin: 0
|
|
27151
|
+
},
|
|
27152
|
+
label: getTrans("WS_METER_INSTALLATION_DATE", "Meter Installation Date"),
|
|
27153
|
+
isMandatory: true,
|
|
27154
|
+
infoText: t("WS_METER_INSTALLATION_DATE_INFO_MSG", "Select date when the meter was physically installed")
|
|
27155
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
26886
27156
|
className: "field"
|
|
26887
27157
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.DatePicker, {
|
|
26888
27158
|
date: activationDetails.meterInstallationDate,
|
|
26889
|
-
placeholder:
|
|
27159
|
+
placeholder: getTrans("WS_METER_INSTALLATION_DATE_PLACEHOLDER", "DD/MM/YYYY"),
|
|
26890
27160
|
onChange: date => {
|
|
26891
27161
|
setActivationDetails({
|
|
26892
27162
|
...activationDetails,
|
|
26893
27163
|
meterInstallationDate: date
|
|
26894
27164
|
});
|
|
26895
27165
|
}
|
|
26896
|
-
}))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
26897
|
-
|
|
26898
|
-
|
|
27166
|
+
}))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
27167
|
+
style: {
|
|
27168
|
+
margin: 0
|
|
27169
|
+
},
|
|
27170
|
+
label: getTrans("WS_INIT_METER_READING", "Initial Meter Reading"),
|
|
27171
|
+
isMandatory: true,
|
|
27172
|
+
infoText: t("WS_INIT_METER_READING_INFO_MSG", "Enter the initial reading shown on the meter dial")
|
|
27173
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
26899
27174
|
className: "field"
|
|
26900
27175
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
26901
|
-
|
|
26902
|
-
|
|
26903
|
-
|
|
26904
|
-
placeholder: `${t(`WS_INIT_METER_READING_PLACEHOLDER`)}`,
|
|
27176
|
+
type: "text",
|
|
27177
|
+
value: activationDetails.meterInitialReading !== undefined ? activationDetails.meterInitialReading : "0",
|
|
27178
|
+
placeholder: getTrans("WS_INIT_METER_READING_PLACEHOLDER", "0"),
|
|
26905
27179
|
onChange: ev => {
|
|
26906
27180
|
setActivationDetails({
|
|
26907
27181
|
...activationDetails,
|
|
26908
|
-
meterInitialReading:
|
|
27182
|
+
meterInitialReading: ev.target.value
|
|
26909
27183
|
});
|
|
26910
27184
|
}
|
|
26911
|
-
}))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
26912
|
-
|
|
26913
|
-
|
|
27185
|
+
}))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
27186
|
+
style: {
|
|
27187
|
+
margin: 0
|
|
27188
|
+
},
|
|
27189
|
+
label: getTrans("WS_CONN_EXEC_DATE", "Connection Date"),
|
|
27190
|
+
isMandatory: true,
|
|
27191
|
+
infoText: t("WS_CONN_EXEC_DATE_INFO_MSG", "Select the date when connection was activated/executed")
|
|
27192
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
26914
27193
|
className: "field"
|
|
26915
27194
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.DatePicker, {
|
|
26916
27195
|
date: activationDetails.connectionExecutionDate,
|
|
26917
|
-
placeholder:
|
|
27196
|
+
placeholder: getTrans("WS_CONN_EXEC_DATE_PLACEHOLDER", "DD/MM/YYYY"),
|
|
26918
27197
|
onChange: date => {
|
|
26919
27198
|
setActivationDetails({
|
|
26920
27199
|
...activationDetails,
|
|
@@ -27556,9 +27835,11 @@ const ConnectionDetails = _props => {
|
|
|
27556
27835
|
defaultOpen: true
|
|
27557
27836
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
27558
27837
|
className: "formcomposer-section-grid"
|
|
27559
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
27560
|
-
|
|
27561
|
-
|
|
27838
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
27839
|
+
label: t("Service Type"),
|
|
27840
|
+
isMandatory: true,
|
|
27841
|
+
infoText: t("WS_SERVICE_TYPE_INFO_MSG", "Select Service Type")
|
|
27842
|
+
}), /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
27562
27843
|
control: control,
|
|
27563
27844
|
name: "serviceType",
|
|
27564
27845
|
defaultValue: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.serviceType) || "",
|
|
@@ -27579,9 +27860,11 @@ const ConnectionDetails = _props => {
|
|
|
27579
27860
|
onBlur: props.onBlur,
|
|
27580
27861
|
t: t
|
|
27581
27862
|
})
|
|
27582
|
-
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
27583
|
-
|
|
27584
|
-
|
|
27863
|
+
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
27864
|
+
label: t("Applicant Type"),
|
|
27865
|
+
isMandatory: true,
|
|
27866
|
+
infoText: t("WS_APPLICANT_TYPE_INFO_MSG", "Select Applicant Type")
|
|
27867
|
+
}), /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
27585
27868
|
control: control,
|
|
27586
27869
|
name: "applicantType",
|
|
27587
27870
|
defaultValue: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.applicantType) || "",
|
|
@@ -27606,9 +27889,11 @@ const ConnectionDetails = _props => {
|
|
|
27606
27889
|
placeholder: t("Select Applicant Type")
|
|
27607
27890
|
});
|
|
27608
27891
|
}
|
|
27609
|
-
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
27610
|
-
|
|
27611
|
-
|
|
27892
|
+
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
27893
|
+
label: t("WS_Billing_Address_Type"),
|
|
27894
|
+
isMandatory: true,
|
|
27895
|
+
infoText: t("WS_BILLING_ADDRESS_TYPE_INFO_MSG", "Enter or verify Billing Address")
|
|
27896
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
27612
27897
|
className: "field"
|
|
27613
27898
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
27614
27899
|
control: control,
|
|
@@ -27694,9 +27979,11 @@ const ConnectionDetails = _props => {
|
|
|
27694
27979
|
defaultOpen: true
|
|
27695
27980
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
27696
27981
|
className: "formcomposer-section-grid"
|
|
27697
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
27698
|
-
|
|
27699
|
-
|
|
27982
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
27983
|
+
label: t("Name"),
|
|
27984
|
+
isMandatory: true,
|
|
27985
|
+
infoText: t("WS_AUTH_REP_NAME_INFO_MSG", "Enter Authorized Representative Name")
|
|
27986
|
+
}), /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
27700
27987
|
control: control,
|
|
27701
27988
|
name: "authorizedRepresentativeName",
|
|
27702
27989
|
defaultValue: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.authorizedRepresentativeName) || "",
|
|
@@ -27729,9 +28016,11 @@ const ConnectionDetails = _props => {
|
|
|
27729
28016
|
}
|
|
27730
28017
|
}, errors.authorizedRepresentativeName.message));
|
|
27731
28018
|
}
|
|
27732
|
-
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
27733
|
-
|
|
27734
|
-
|
|
28019
|
+
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
28020
|
+
label: t("Designation"),
|
|
28021
|
+
isMandatory: true,
|
|
28022
|
+
infoText: t("WS_AUTH_REP_DESIGNATION_INFO_MSG", "Enter Authorized Representative Designation")
|
|
28023
|
+
}), /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
27735
28024
|
control: control,
|
|
27736
28025
|
name: "authorizedRepresentativeDesignation",
|
|
27737
28026
|
defaultValue: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.authorizedRepresentativeDesignation) || "",
|
|
@@ -27764,9 +28053,11 @@ const ConnectionDetails = _props => {
|
|
|
27764
28053
|
}
|
|
27765
28054
|
}, errors.authorizedRepresentativeDesignation.message));
|
|
27766
28055
|
}
|
|
27767
|
-
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
27768
|
-
|
|
27769
|
-
|
|
28056
|
+
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
28057
|
+
label: t("CORE_COMMON_MOBILE_NUMBER"),
|
|
28058
|
+
isMandatory: true,
|
|
28059
|
+
infoText: t("WS_AUTH_REP_MOBILE_INFO_MSG", "Enter 10-digit Mobile Number")
|
|
28060
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
27770
28061
|
className: "field"
|
|
27771
28062
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
27772
28063
|
control: control,
|
|
@@ -28670,9 +28961,11 @@ const ConnectionDetails$1 = _props => {
|
|
|
28670
28961
|
defaultOpen: true
|
|
28671
28962
|
}, !sameAsOwnerDetails ? /*#__PURE__*/React__default.createElement("div", {
|
|
28672
28963
|
className: "formcomposer-section-grid"
|
|
28673
|
-
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
28674
|
-
|
|
28675
|
-
|
|
28964
|
+
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
28965
|
+
label: t("WS_OWN_DETAIL_NAME"),
|
|
28966
|
+
isMandatory: true,
|
|
28967
|
+
infoText: t("CORE_COMMON_FIRST_NAME_INFO_MSG", "Enter First Name")
|
|
28968
|
+
}), /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
28676
28969
|
control: control,
|
|
28677
28970
|
name: "name",
|
|
28678
28971
|
defaultValue: connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.name,
|
|
@@ -28727,7 +29020,11 @@ const ConnectionDetails$1 = _props => {
|
|
|
28727
29020
|
}
|
|
28728
29021
|
})), localFormState.touched.name && (errors === null || errors === void 0 ? void 0 : (_errors$name2 = errors.name) === null || _errors$name2 === void 0 ? void 0 : _errors$name2.message) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
28729
29022
|
style: errorStyle
|
|
28730
|
-
}, errors === null || errors === void 0 ? void 0 : (_errors$name3 = errors.name) === null || _errors$name3 === void 0 ? void 0 : _errors$name3.message)), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
29023
|
+
}, errors === null || errors === void 0 ? void 0 : (_errors$name3 = errors.name) === null || _errors$name3 === void 0 ? void 0 : _errors$name3.message)), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
29024
|
+
label: t("WS_OWN_DETAIL_MIDDLE_NAME"),
|
|
29025
|
+
isMandatory: false,
|
|
29026
|
+
infoText: t("CORE_COMMON_MIDDLE_NAME_INFO_MSG", "Enter Middle Name (Optional)")
|
|
29027
|
+
}), /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
28731
29028
|
control: control,
|
|
28732
29029
|
name: "middleName",
|
|
28733
29030
|
defaultValue: connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.middleName,
|
|
@@ -28759,7 +29056,11 @@ const ConnectionDetails$1 = _props => {
|
|
|
28759
29056
|
}
|
|
28760
29057
|
})), localFormState.touched.middleName && (errors === null || errors === void 0 ? void 0 : (_errors$middleName2 = errors.middleName) === null || _errors$middleName2 === void 0 ? void 0 : _errors$middleName2.message) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
28761
29058
|
style: errorStyle
|
|
28762
|
-
}, errors === null || errors === void 0 ? void 0 : (_errors$middleName3 = errors.middleName) === null || _errors$middleName3 === void 0 ? void 0 : _errors$middleName3.message)), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
29059
|
+
}, errors === null || errors === void 0 ? void 0 : (_errors$middleName3 = errors.middleName) === null || _errors$middleName3 === void 0 ? void 0 : _errors$middleName3.message)), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
29060
|
+
label: t("WS_OWN_DETAIL_LAST_NAME"),
|
|
29061
|
+
isMandatory: false,
|
|
29062
|
+
infoText: t("CORE_COMMON_LAST_NAME_INFO_MSG", "Enter Last Name")
|
|
29063
|
+
}), /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
28763
29064
|
control: control,
|
|
28764
29065
|
name: "lastName",
|
|
28765
29066
|
defaultValue: connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.lastName,
|
|
@@ -28791,9 +29092,11 @@ const ConnectionDetails$1 = _props => {
|
|
|
28791
29092
|
}
|
|
28792
29093
|
})), localFormState.touched.lastName && (errors === null || errors === void 0 ? void 0 : (_errors$lastName2 = errors.lastName) === null || _errors$lastName2 === void 0 ? void 0 : _errors$lastName2.message) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
28793
29094
|
style: errorStyle
|
|
28794
|
-
}, errors === null || errors === void 0 ? void 0 : (_errors$lastName3 = errors.lastName) === null || _errors$lastName3 === void 0 ? void 0 : _errors$lastName3.message)), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
28795
|
-
|
|
28796
|
-
|
|
29095
|
+
}, errors === null || errors === void 0 ? void 0 : (_errors$lastName3 = errors.lastName) === null || _errors$lastName3 === void 0 ? void 0 : _errors$lastName3.message)), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
29096
|
+
label: t("WS_CONN_HOLDER_OWN_DETAIL_GENDER_LABEL"),
|
|
29097
|
+
isMandatory: true,
|
|
29098
|
+
infoText: t("WS_GENDER_INFO_MSG", "Select Gender")
|
|
29099
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
28797
29100
|
className: "field"
|
|
28798
29101
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
28799
29102
|
control: control,
|
|
@@ -28849,9 +29152,11 @@ const ConnectionDetails$1 = _props => {
|
|
|
28849
29152
|
}
|
|
28850
29153
|
}))), localFormState.touched.gender && (errors === null || errors === void 0 ? void 0 : (_errors$gender2 = errors.gender) === null || _errors$gender2 === void 0 ? void 0 : _errors$gender2.message) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
28851
29154
|
style: errorStyle
|
|
28852
|
-
}, errors === null || errors === void 0 ? void 0 : (_errors$gender3 = errors.gender) === null || _errors$gender3 === void 0 ? void 0 : _errors$gender3.message)), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
28853
|
-
|
|
28854
|
-
|
|
29155
|
+
}, errors === null || errors === void 0 ? void 0 : (_errors$gender3 = errors.gender) === null || _errors$gender3 === void 0 ? void 0 : _errors$gender3.message)), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
29156
|
+
label: t("CORE_COMMON_MOBILE_NUMBER"),
|
|
29157
|
+
isMandatory: true,
|
|
29158
|
+
infoText: t("PT_MOBILE_NUMBER_INFO_MSG", "Enter 10 digit Mobile Number")
|
|
29159
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
28855
29160
|
className: "field"
|
|
28856
29161
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
28857
29162
|
control: control,
|
|
@@ -28920,9 +29225,11 @@ const ConnectionDetails$1 = _props => {
|
|
|
28920
29225
|
}
|
|
28921
29226
|
}))), localFormState.touched.mobileNumber && (errors === null || errors === void 0 ? void 0 : (_errors$mobileNumber2 = errors.mobileNumber) === null || _errors$mobileNumber2 === void 0 ? void 0 : _errors$mobileNumber2.message) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
28922
29227
|
style: errorStyle
|
|
28923
|
-
}, errors === null || errors === void 0 ? void 0 : (_errors$mobileNumber3 = errors.mobileNumber) === null || _errors$mobileNumber3 === void 0 ? void 0 : _errors$mobileNumber3.message)), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
28924
|
-
|
|
28925
|
-
|
|
29228
|
+
}, errors === null || errors === void 0 ? void 0 : (_errors$mobileNumber3 = errors.mobileNumber) === null || _errors$mobileNumber3 === void 0 ? void 0 : _errors$mobileNumber3.message)), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
29229
|
+
label: t("CORE_COMMON_WHATSAPP_MOBILE_NUMBER"),
|
|
29230
|
+
isMandatory: true,
|
|
29231
|
+
infoText: t("WS_WHATSAPP_MOBILE_NUMBER_INFO_MSG", "Enter 10 digit WhatsApp or Alternate Mobile Number")
|
|
29232
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
28926
29233
|
className: "field"
|
|
28927
29234
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
28928
29235
|
control: control,
|
|
@@ -29025,7 +29332,11 @@ const ConnectionDetails$1 = _props => {
|
|
|
29025
29332
|
}
|
|
29026
29333
|
})))), localFormState.touched.watsAppMobileNumber && (errors === null || errors === void 0 ? void 0 : (_errors$watsAppMobile2 = errors.watsAppMobileNumber) === null || _errors$watsAppMobile2 === void 0 ? void 0 : _errors$watsAppMobile2.message) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
29027
29334
|
style: errorStyle
|
|
29028
|
-
}, errors === null || errors === void 0 ? void 0 : (_errors$watsAppMobile3 = errors.watsAppMobileNumber) === null || _errors$watsAppMobile3 === void 0 ? void 0 : _errors$watsAppMobile3.message)), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
29335
|
+
}, errors === null || errors === void 0 ? void 0 : (_errors$watsAppMobile3 = errors.watsAppMobileNumber) === null || _errors$watsAppMobile3 === void 0 ? void 0 : _errors$watsAppMobile3.message)), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
29336
|
+
label: t("WS_EMAIL_ID"),
|
|
29337
|
+
isMandatory: false,
|
|
29338
|
+
infoText: t("CORE_COMMON_EMAIL_INFO_MSG", "Enter Email Address")
|
|
29339
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
29029
29340
|
className: "field"
|
|
29030
29341
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
29031
29342
|
control: control,
|
|
@@ -29317,20 +29628,26 @@ const ConnectionDetails$2 = _props => {
|
|
|
29317
29628
|
fontSize: "12px",
|
|
29318
29629
|
marginTop: "-21px"
|
|
29319
29630
|
};
|
|
29320
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, !window.location.href.includes("by-config") && !window.location.href.includes("ws/modify-application") ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
29631
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, !window.location.href.includes("by-config") && !window.location.href.includes("ws/modify-application") ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
29321
29632
|
style: {
|
|
29322
|
-
|
|
29323
|
-
}
|
|
29324
|
-
|
|
29633
|
+
margin: 0
|
|
29634
|
+
},
|
|
29635
|
+
label: t("WS_ACK_COMMON_APP_NO_LABEL") || "Application Number",
|
|
29636
|
+
isMandatory: true,
|
|
29637
|
+
infoText: t("WS_APP_NO_INFO_MSG", "Application Number of the connection")
|
|
29638
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
29325
29639
|
className: "field"
|
|
29326
29640
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
29327
29641
|
disabled: true,
|
|
29328
29642
|
value: filters === null || filters === void 0 ? void 0 : filters.applicationNumber
|
|
29329
|
-
}))) : null, (filters === null || filters === void 0 ? void 0 : filters.service) === "WATER" ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
29643
|
+
}))) : null, (filters === null || filters === void 0 ? void 0 : filters.service) === "WATER" ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
29330
29644
|
style: {
|
|
29331
|
-
|
|
29332
|
-
}
|
|
29333
|
-
|
|
29645
|
+
margin: 0
|
|
29646
|
+
},
|
|
29647
|
+
label: t("WS_SERV_DETAIL_CONN_TYPE") || "Nature of Connection",
|
|
29648
|
+
isMandatory: true,
|
|
29649
|
+
infoText: t("WS_CONN_TYPE_INFO_MSG", "Nature / Type of Connection (Metered / Non-Metered)")
|
|
29650
|
+
}), /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
29334
29651
|
control: control,
|
|
29335
29652
|
name: "connectionType",
|
|
29336
29653
|
defaultValue: connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.connectionType,
|
|
@@ -29356,11 +29673,14 @@ const ConnectionDetails$2 = _props => {
|
|
|
29356
29673
|
}
|
|
29357
29674
|
}), localFormState.touched.connectionType && errors !== null && errors !== void 0 && (_errors$connectionTyp2 = errors.connectionType) !== null && _errors$connectionTyp2 !== void 0 && _errors$connectionTyp2.message ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
29358
29675
|
style: errorStyle
|
|
29359
|
-
}, " ", errors === null || errors === void 0 ? void 0 : (_errors$connectionTyp3 = errors.connectionType) === null || _errors$connectionTyp3 === void 0 ? void 0 : _errors$connectionTyp3.message) : null)) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
29676
|
+
}, " ", errors === null || errors === void 0 ? void 0 : (_errors$connectionTyp3 = errors.connectionType) === null || _errors$connectionTyp3 === void 0 ? void 0 : _errors$connectionTyp3.message) : null)) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
29360
29677
|
style: {
|
|
29361
|
-
|
|
29362
|
-
}
|
|
29363
|
-
|
|
29678
|
+
margin: 0
|
|
29679
|
+
},
|
|
29680
|
+
label: t("WS_NUMBER_WATER_CLOSETS_LABEL") || "Number of Water Closets",
|
|
29681
|
+
isMandatory: true,
|
|
29682
|
+
infoText: t("WS_NUMBER_WATER_CLOSETS_INFO_MSG", "Enter number of water closets")
|
|
29683
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
29364
29684
|
className: "field"
|
|
29365
29685
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
29366
29686
|
control: control,
|
|
@@ -29394,11 +29714,14 @@ const ConnectionDetails$2 = _props => {
|
|
|
29394
29714
|
}
|
|
29395
29715
|
})), localFormState.touched.noOfWaterClosets && errors !== null && errors !== void 0 && (_errors$noOfWaterClos2 = errors.noOfWaterClosets) !== null && _errors$noOfWaterClos2 !== void 0 && _errors$noOfWaterClos2.message ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
29396
29716
|
style: errorStyle
|
|
29397
|
-
}, " ", errors === null || errors === void 0 ? void 0 : (_errors$noOfWaterClos3 = errors.noOfWaterClosets) === null || _errors$noOfWaterClos3 === void 0 ? void 0 : _errors$noOfWaterClos3.message) : null), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
29717
|
+
}, " ", errors === null || errors === void 0 ? void 0 : (_errors$noOfWaterClos3 = errors.noOfWaterClosets) === null || _errors$noOfWaterClos3 === void 0 ? void 0 : _errors$noOfWaterClos3.message) : null), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
29398
29718
|
style: {
|
|
29399
|
-
|
|
29400
|
-
}
|
|
29401
|
-
|
|
29719
|
+
margin: 0
|
|
29720
|
+
},
|
|
29721
|
+
label: t("WS_SERV_DETAIL_NO_OF_TOILETS") || "Number of Toilets",
|
|
29722
|
+
isMandatory: true,
|
|
29723
|
+
infoText: t("WS_SERV_DETAIL_NO_OF_TOILETS_INFO_MSG", "Enter number of toilets")
|
|
29724
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
29402
29725
|
className: "field"
|
|
29403
29726
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
29404
29727
|
control: control,
|
|
@@ -29435,14 +29758,40 @@ const ConnectionDetails$2 = _props => {
|
|
|
29435
29758
|
}, " ", errors === null || errors === void 0 ? void 0 : (_errors$noOfToilets3 = errors.noOfToilets) === null || _errors$noOfToilets3 === void 0 ? void 0 : _errors$noOfToilets3.message) : null)));
|
|
29436
29759
|
};
|
|
29437
29760
|
|
|
29438
|
-
const
|
|
29439
|
-
|
|
29440
|
-
|
|
29441
|
-
|
|
29442
|
-
|
|
29443
|
-
|
|
29761
|
+
const options = [{
|
|
29762
|
+
name: "Self",
|
|
29763
|
+
code: "Self",
|
|
29764
|
+
i18nKey: "WS_PLUMBER_SELF"
|
|
29765
|
+
}, {
|
|
29766
|
+
name: "Delhi Jal Board",
|
|
29767
|
+
code: "DJB",
|
|
29768
|
+
i18nKey: "WS_PLUMBER_DJB"
|
|
29769
|
+
}];
|
|
29770
|
+
const getAppPlumberInfo = formData => {
|
|
29771
|
+
var _formData$formDetails, _formData$formDetails2, _formData$formDetails3, _formData$connectionD, _formData$connectionD2, _formData$connectionD3, _formData$connectionD4, _formData$connectionD5, _formData$plumberInfo;
|
|
29772
|
+
return (formData === null || formData === void 0 ? void 0 : (_formData$formDetails = formData.formDetails) === null || _formData$formDetails === void 0 ? void 0 : (_formData$formDetails2 = _formData$formDetails.applicationData) === null || _formData$formDetails2 === void 0 ? void 0 : (_formData$formDetails3 = _formData$formDetails2.plumberInfo) === null || _formData$formDetails3 === void 0 ? void 0 : _formData$formDetails3[0]) || (formData === null || formData === void 0 ? void 0 : (_formData$connectionD = formData.connectionDetails) === null || _formData$connectionD === void 0 ? void 0 : (_formData$connectionD2 = _formData$connectionD[0]) === null || _formData$connectionD2 === void 0 ? void 0 : (_formData$connectionD3 = _formData$connectionD2.formDetails) === null || _formData$connectionD3 === void 0 ? void 0 : (_formData$connectionD4 = _formData$connectionD3.applicationData) === null || _formData$connectionD4 === void 0 ? void 0 : (_formData$connectionD5 = _formData$connectionD4.plumberInfo) === null || _formData$connectionD5 === void 0 ? void 0 : _formData$connectionD5[0]) || (formData === null || formData === void 0 ? void 0 : (_formData$plumberInfo = formData.plumberInfo) === null || _formData$plumberInfo === void 0 ? void 0 : _formData$plumberInfo[0]) || null;
|
|
29773
|
+
};
|
|
29774
|
+
const createPlumberDetails = formData => {
|
|
29775
|
+
var _formData$formDetails4, _formData$formDetails5, _formData$formDetails6, _formData$additionalD, _formData$formDetails7, _formData$formDetails8, _formData$formDetails9, _formData$formDetails0, _formData$formDetails1, _formData$formDetails10;
|
|
29776
|
+
const appPlumber = getAppPlumberInfo(formData);
|
|
29777
|
+
const existingPref = (formData === null || formData === void 0 ? void 0 : (_formData$formDetails4 = formData.formDetails) === null || _formData$formDetails4 === void 0 ? void 0 : (_formData$formDetails5 = _formData$formDetails4.applicationData) === null || _formData$formDetails5 === void 0 ? void 0 : (_formData$formDetails6 = _formData$formDetails5.additionalDetails) === null || _formData$formDetails6 === void 0 ? void 0 : _formData$formDetails6.detailsProvidedBy) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD = formData.additionalDetails) === null || _formData$additionalD === void 0 ? void 0 : _formData$additionalD.detailsProvidedBy);
|
|
29778
|
+
let defaultPref = null;
|
|
29779
|
+
if (existingPref === "DJB" || existingPref === "ULB" || existingPref === "Delhi Jal Board") {
|
|
29780
|
+
defaultPref = options[1];
|
|
29781
|
+
} else if (existingPref === "Self" || appPlumber !== null && appPlumber !== void 0 && appPlumber.name) {
|
|
29782
|
+
defaultPref = options[0];
|
|
29783
|
+
}
|
|
29784
|
+
return {
|
|
29785
|
+
detailsProvidedBy: defaultPref,
|
|
29786
|
+
plumberName: (appPlumber === null || appPlumber === void 0 ? void 0 : appPlumber.name) || "",
|
|
29787
|
+
plumberMobileNo: (appPlumber === null || appPlumber === void 0 ? void 0 : appPlumber.mobileNumber) || "",
|
|
29788
|
+
plumberLicenseNo: (appPlumber === null || appPlumber === void 0 ? void 0 : appPlumber.licenseNo) || "",
|
|
29789
|
+
jeOrFirmName: (formData === null || formData === void 0 ? void 0 : (_formData$formDetails7 = formData.formDetails) === null || _formData$formDetails7 === void 0 ? void 0 : (_formData$formDetails8 = _formData$formDetails7.applicationData) === null || _formData$formDetails8 === void 0 ? void 0 : (_formData$formDetails9 = _formData$formDetails8.additionalDetails) === null || _formData$formDetails9 === void 0 ? void 0 : _formData$formDetails9.nameOfJEOrFirm) || (formData === null || formData === void 0 ? void 0 : (_formData$formDetails0 = formData.formDetails) === null || _formData$formDetails0 === void 0 ? void 0 : (_formData$formDetails1 = _formData$formDetails0.applicationData) === null || _formData$formDetails1 === void 0 ? void 0 : (_formData$formDetails10 = _formData$formDetails1.additionalDetails) === null || _formData$formDetails10 === void 0 ? void 0 : _formData$formDetails10.jeOrFirmName) || "",
|
|
29790
|
+
key: Date.now()
|
|
29791
|
+
};
|
|
29792
|
+
};
|
|
29444
29793
|
const WSActivationPlumberDetails = _ref => {
|
|
29445
|
-
var _formData$
|
|
29794
|
+
var _formData$connectionD6, _formData$connectionD7;
|
|
29446
29795
|
let {
|
|
29447
29796
|
config,
|
|
29448
29797
|
onSelect,
|
|
@@ -29456,19 +29805,18 @@ const WSActivationPlumberDetails = _ref => {
|
|
|
29456
29805
|
t
|
|
29457
29806
|
} = reactI18next.useTranslation();
|
|
29458
29807
|
const filters = getQueryStringParams(location.search);
|
|
29459
|
-
const [plumberDetails, setPlumberDetails] = React.useState((
|
|
29808
|
+
const [plumberDetails, setPlumberDetails] = React.useState(() => {
|
|
29809
|
+
var _formData$plumberDeta;
|
|
29810
|
+
if ((formData === null || formData === void 0 ? void 0 : (_formData$plumberDeta = formData.plumberDetails) === null || _formData$plumberDeta === void 0 ? void 0 : _formData$plumberDeta.length) > 0) {
|
|
29811
|
+
return formData.plumberDetails;
|
|
29812
|
+
}
|
|
29813
|
+
return [createPlumberDetails(formData)];
|
|
29814
|
+
});
|
|
29460
29815
|
const [focusIndex, setFocusIndex] = React.useState({
|
|
29461
29816
|
index: -1,
|
|
29462
29817
|
type: ""
|
|
29463
29818
|
});
|
|
29464
29819
|
const [isErrors, setIsErrors] = React.useState(true);
|
|
29465
|
-
const options = [{
|
|
29466
|
-
i18nKey: "WS_PLUMBER_ULB",
|
|
29467
|
-
code: "ULB"
|
|
29468
|
-
}, {
|
|
29469
|
-
i18nKey: "WS_PLUMBER_SELF",
|
|
29470
|
-
code: "Self"
|
|
29471
|
-
}];
|
|
29472
29820
|
React.useEffect(() => {
|
|
29473
29821
|
const data = plumberDetails.length && plumberDetails.map(e => {
|
|
29474
29822
|
return e;
|
|
@@ -29476,7 +29824,7 @@ const WSActivationPlumberDetails = _ref => {
|
|
|
29476
29824
|
if (data && !lodash.isEqual(formData === null || formData === void 0 ? void 0 : formData[config === null || config === void 0 ? void 0 : config.key], data)) {
|
|
29477
29825
|
onSelect(config === null || config === void 0 ? void 0 : config.key, data);
|
|
29478
29826
|
}
|
|
29479
|
-
}, [plumberDetails, formData === null || formData === void 0 ? void 0 : (_formData$
|
|
29827
|
+
}, [plumberDetails, formData === null || formData === void 0 ? void 0 : (_formData$connectionD6 = formData.connectionDetails) === null || _formData$connectionD6 === void 0 ? void 0 : (_formData$connectionD7 = _formData$connectionD6[0]) === null || _formData$connectionD7 === void 0 ? void 0 : _formData$connectionD7.connectionType, config === null || config === void 0 ? void 0 : config.key]);
|
|
29480
29828
|
const commonProps = {
|
|
29481
29829
|
focusIndex,
|
|
29482
29830
|
allOwners: plumberDetails,
|
|
@@ -29492,8 +29840,7 @@ const WSActivationPlumberDetails = _ref => {
|
|
|
29492
29840
|
isErrors,
|
|
29493
29841
|
plumberDetails,
|
|
29494
29842
|
filters,
|
|
29495
|
-
options
|
|
29496
|
-
setPlumberDetails
|
|
29843
|
+
options
|
|
29497
29844
|
};
|
|
29498
29845
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, (plumberDetails === null || plumberDetails === void 0 ? void 0 : plumberDetails.length) && plumberDetails.map((plumberDetail, index) => /*#__PURE__*/React__default.createElement(PlumberDetails, _extends({
|
|
29499
29846
|
key: plumberDetail.key || index,
|
|
@@ -29502,7 +29849,7 @@ const WSActivationPlumberDetails = _ref => {
|
|
|
29502
29849
|
}, commonProps))));
|
|
29503
29850
|
};
|
|
29504
29851
|
const PlumberDetails = _props => {
|
|
29505
|
-
var
|
|
29852
|
+
var _plumberDetail$detail, _plumberDetail$detail2, _plumberDetail$detail3, _plumberDetail$detail4, _formValue$detailsPro, _plumberDetail$detail5, _formValue$detailsPro2, _errors$detailsProvid2, _errors$detailsProvid3, _errors$jeOrFirmName2, _errors$jeOrFirmName3, _errors$plumberName2, _errors$plumberName3, _errors$plumberLicens2, _errors$plumberLicens3, _errors$plumberMobile2, _errors$plumberMobile3;
|
|
29506
29853
|
const {
|
|
29507
29854
|
plumberDetail,
|
|
29508
29855
|
index,
|
|
@@ -29523,6 +29870,12 @@ const PlumberDetails = _props => {
|
|
|
29523
29870
|
options,
|
|
29524
29871
|
setPlumberDetails
|
|
29525
29872
|
} = _props;
|
|
29873
|
+
const getTrans = (key, defaultVal) => {
|
|
29874
|
+
const val = t(key);
|
|
29875
|
+
return val && val !== key ? val : defaultVal;
|
|
29876
|
+
};
|
|
29877
|
+
const appPlumber = getAppPlumberInfo(formData);
|
|
29878
|
+
const initialPref = (plumberDetail === null || plumberDetail === void 0 ? void 0 : (_plumberDetail$detail = plumberDetail.detailsProvidedBy) === null || _plumberDetail$detail === void 0 ? void 0 : _plumberDetail$detail.code) === "DJB" || (plumberDetail === null || plumberDetail === void 0 ? void 0 : (_plumberDetail$detail2 = plumberDetail.detailsProvidedBy) === null || _plumberDetail$detail2 === void 0 ? void 0 : _plumberDetail$detail2.code) === "ULB" || (plumberDetail === null || plumberDetail === void 0 ? void 0 : (_plumberDetail$detail3 = plumberDetail.detailsProvidedBy) === null || _plumberDetail$detail3 === void 0 ? void 0 : _plumberDetail$detail3.name) === "Delhi Jal Board" ? options[1] : (plumberDetail === null || plumberDetail === void 0 ? void 0 : (_plumberDetail$detail4 = plumberDetail.detailsProvidedBy) === null || _plumberDetail$detail4 === void 0 ? void 0 : _plumberDetail$detail4.code) === "Self" || appPlumber !== null && appPlumber !== void 0 && appPlumber.name ? options[0] : (plumberDetail === null || plumberDetail === void 0 ? void 0 : plumberDetail.detailsProvidedBy) || null;
|
|
29526
29879
|
const {
|
|
29527
29880
|
control,
|
|
29528
29881
|
formState: localFormState,
|
|
@@ -29532,42 +29885,49 @@ const PlumberDetails = _props => {
|
|
|
29532
29885
|
setValue,
|
|
29533
29886
|
trigger,
|
|
29534
29887
|
getValues
|
|
29535
|
-
} = reactHookForm.useForm(
|
|
29888
|
+
} = reactHookForm.useForm({
|
|
29889
|
+
defaultValues: {
|
|
29890
|
+
detailsProvidedBy: initialPref,
|
|
29891
|
+
plumberName: (plumberDetail === null || plumberDetail === void 0 ? void 0 : plumberDetail.plumberName) || (appPlumber === null || appPlumber === void 0 ? void 0 : appPlumber.name) || "",
|
|
29892
|
+
plumberLicenseNo: (plumberDetail === null || plumberDetail === void 0 ? void 0 : plumberDetail.plumberLicenseNo) || (appPlumber === null || appPlumber === void 0 ? void 0 : appPlumber.licenseNo) || "",
|
|
29893
|
+
plumberMobileNo: (plumberDetail === null || plumberDetail === void 0 ? void 0 : plumberDetail.plumberMobileNo) || (appPlumber === null || appPlumber === void 0 ? void 0 : appPlumber.mobileNumber) || "",
|
|
29894
|
+
jeOrFirmName: (plumberDetail === null || plumberDetail === void 0 ? void 0 : plumberDetail.jeOrFirmName) || ""
|
|
29895
|
+
}
|
|
29896
|
+
});
|
|
29536
29897
|
const formValue = watch();
|
|
29537
29898
|
const {
|
|
29538
29899
|
errors
|
|
29539
29900
|
} = localFormState;
|
|
29540
29901
|
const isMobile = window.Digit.Utils.browser.isMobile();
|
|
29541
29902
|
let isEmployee = window.location.href.includes("/employee");
|
|
29903
|
+
const currentPref = (formValue === null || formValue === void 0 ? void 0 : (_formValue$detailsPro = formValue.detailsProvidedBy) === null || _formValue$detailsPro === void 0 ? void 0 : _formValue$detailsPro.code) || (plumberDetail === null || plumberDetail === void 0 ? void 0 : (_plumberDetail$detail5 = plumberDetail.detailsProvidedBy) === null || _plumberDetail$detail5 === void 0 ? void 0 : _plumberDetail$detail5.code);
|
|
29904
|
+
const isDJB = currentPref === "DJB" || currentPref === "ULB" || (formValue === null || formValue === void 0 ? void 0 : (_formValue$detailsPro2 = formValue.detailsProvidedBy) === null || _formValue$detailsPro2 === void 0 ? void 0 : _formValue$detailsPro2.name) === "Delhi Jal Board";
|
|
29905
|
+
const isSelf = currentPref === "Self";
|
|
29542
29906
|
React.useEffect(() => {
|
|
29543
29907
|
trigger();
|
|
29544
29908
|
}, []);
|
|
29545
29909
|
React.useEffect(() => {
|
|
29910
|
+
if (isDJB) {
|
|
29911
|
+
clearLocalErrors(["plumberName", "plumberLicenseNo", "plumberMobileNo"]);
|
|
29912
|
+
} else if (isSelf) {
|
|
29913
|
+
clearLocalErrors(["jeOrFirmName"]);
|
|
29914
|
+
}
|
|
29546
29915
|
trigger();
|
|
29547
|
-
}, [
|
|
29916
|
+
}, [currentPref]);
|
|
29548
29917
|
React.useEffect(() => {
|
|
29549
29918
|
if (Object.entries(formValue).length > 0) {
|
|
29550
29919
|
const keys = Object.keys(formValue);
|
|
29551
29920
|
const part = {};
|
|
29552
29921
|
keys.forEach(key => part[key] = plumberDetail[key]);
|
|
29553
|
-
|
|
29554
|
-
if (!lodash.isEqual(formValue, part) && plumbermobileCheck) {
|
|
29555
|
-
let isErrorsFound = true;
|
|
29556
|
-
Object.keys(formValue).map(data => {
|
|
29557
|
-
if (!formValue[data] && isErrorsFound) {
|
|
29558
|
-
isErrorsFound = false;
|
|
29559
|
-
setIsErrors(true);
|
|
29560
|
-
}
|
|
29561
|
-
});
|
|
29562
|
-
if (isErrorsFound) setIsErrors(false);
|
|
29922
|
+
if (!lodash.isEqual(formValue, part)) {
|
|
29563
29923
|
let ob = [{
|
|
29924
|
+
...plumberDetail,
|
|
29564
29925
|
...formValue
|
|
29565
29926
|
}];
|
|
29566
29927
|
setPlumberDetails(ob);
|
|
29567
|
-
trigger();
|
|
29568
29928
|
}
|
|
29569
29929
|
}
|
|
29570
|
-
}, [formValue
|
|
29930
|
+
}, [formValue]);
|
|
29571
29931
|
React.useEffect(() => {
|
|
29572
29932
|
var _formState$errors$con;
|
|
29573
29933
|
if (Object.keys(errors).length && !lodash.isEqual(((_formState$errors$con = formState.errors[config.key]) === null || _formState$errors$con === void 0 ? void 0 : _formState$errors$con.type) || {}, errors)) {
|
|
@@ -29584,102 +29944,127 @@ const PlumberDetails = _props => {
|
|
|
29584
29944
|
fontSize: "12px",
|
|
29585
29945
|
marginTop: "-21px"
|
|
29586
29946
|
};
|
|
29587
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
29947
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
29588
29948
|
style: {
|
|
29589
|
-
|
|
29590
|
-
}
|
|
29591
|
-
|
|
29949
|
+
margin: 0
|
|
29950
|
+
},
|
|
29951
|
+
label: getTrans("WS_ADDN_DETAILS_PLUMBER_PROVIDED_BY", "Plumber Provided By"),
|
|
29952
|
+
isMandatory: true,
|
|
29953
|
+
infoText: t("WS_PLUMBER_PROVIDED_BY_INFO_MSG", "Select whether plumber is Self or provided by Delhi Jal Board")
|
|
29954
|
+
}), /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
29592
29955
|
control: control,
|
|
29593
29956
|
name: "detailsProvidedBy",
|
|
29594
|
-
defaultValue:
|
|
29957
|
+
defaultValue: initialPref,
|
|
29595
29958
|
rules: {
|
|
29596
|
-
required:
|
|
29959
|
+
required: getTrans("REQUIRED_FIELD", "Required")
|
|
29597
29960
|
},
|
|
29598
29961
|
isMandatory: true,
|
|
29599
29962
|
render: props => {
|
|
29600
29963
|
var _errors$detailsProvid;
|
|
29601
29964
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Dropdown, {
|
|
29602
29965
|
className: "form-field",
|
|
29603
|
-
selected: getValues("detailsProvidedBy"),
|
|
29966
|
+
selected: props.value || getValues("detailsProvidedBy"),
|
|
29604
29967
|
disable: false,
|
|
29605
29968
|
option: options,
|
|
29606
|
-
placeholder:
|
|
29969
|
+
placeholder: getTrans("WS_ADDN_DETAILS_PLUMBER_PROVIDED_BY_PLACEHOLDER", "Select plumber provided by"),
|
|
29607
29970
|
errorStyle: localFormState.touched.detailsProvidedBy && errors !== null && errors !== void 0 && (_errors$detailsProvid = errors.detailsProvidedBy) !== null && _errors$detailsProvid !== void 0 && _errors$detailsProvid.message ? true : false,
|
|
29608
29971
|
select: e => {
|
|
29609
|
-
if (e.code
|
|
29972
|
+
if (e.code === "DJB") {
|
|
29973
|
+
setValue("plumberName", "");
|
|
29974
|
+
setValue("plumberLicenseNo", "");
|
|
29975
|
+
setValue("plumberMobileNo", "");
|
|
29976
|
+
clearLocalErrors(["plumberName", "plumberLicenseNo", "plumberMobileNo"]);
|
|
29610
29977
|
let obj = {
|
|
29611
29978
|
...(plumberDetails === null || plumberDetails === void 0 ? void 0 : plumberDetails[0]),
|
|
29612
29979
|
detailsProvidedBy: e,
|
|
29613
29980
|
plumberName: "",
|
|
29614
|
-
|
|
29615
|
-
|
|
29981
|
+
plumberLicenseNo: "",
|
|
29982
|
+
plumberMobileNo: ""
|
|
29616
29983
|
};
|
|
29617
29984
|
setPlumberDetails([obj]);
|
|
29618
|
-
} else {
|
|
29985
|
+
} else if (e.code === "Self") {
|
|
29986
|
+
setValue("jeOrFirmName", "");
|
|
29987
|
+
clearLocalErrors(["jeOrFirmName"]);
|
|
29988
|
+
const pName = (appPlumber === null || appPlumber === void 0 ? void 0 : appPlumber.name) || getValues("plumberName") || "";
|
|
29989
|
+
const pLic = (appPlumber === null || appPlumber === void 0 ? void 0 : appPlumber.licenseNo) || getValues("plumberLicenseNo") || "";
|
|
29990
|
+
const pMob = (appPlumber === null || appPlumber === void 0 ? void 0 : appPlumber.mobileNumber) || getValues("plumberMobileNo") || "";
|
|
29991
|
+
if (pName) setValue("plumberName", pName);
|
|
29992
|
+
if (pLic) setValue("plumberLicenseNo", pLic);
|
|
29993
|
+
if (pMob) setValue("plumberMobileNo", pMob);
|
|
29619
29994
|
let obj = {
|
|
29620
|
-
|
|
29995
|
+
...(plumberDetails === null || plumberDetails === void 0 ? void 0 : plumberDetails[0]),
|
|
29996
|
+
detailsProvidedBy: e,
|
|
29997
|
+
plumberName: pName,
|
|
29998
|
+
plumberLicenseNo: pLic,
|
|
29999
|
+
plumberMobileNo: pMob,
|
|
30000
|
+
jeOrFirmName: ""
|
|
29621
30001
|
};
|
|
29622
30002
|
setPlumberDetails([obj]);
|
|
29623
30003
|
}
|
|
29624
30004
|
props.onChange(e);
|
|
29625
30005
|
},
|
|
29626
|
-
optionKey: "
|
|
30006
|
+
optionKey: "name",
|
|
29627
30007
|
onBlur: props.onBlur,
|
|
29628
30008
|
t: t
|
|
29629
30009
|
});
|
|
29630
30010
|
}
|
|
29631
30011
|
}), localFormState.touched.detailsProvidedBy && errors !== null && errors !== void 0 && (_errors$detailsProvid2 = errors.detailsProvidedBy) !== null && _errors$detailsProvid2 !== void 0 && _errors$detailsProvid2.message ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
29632
30012
|
style: errorStyle
|
|
29633
|
-
}, " ", errors === null || errors === void 0 ? void 0 : (_errors$detailsProvid3 = errors.detailsProvidedBy) === null || _errors$detailsProvid3 === void 0 ? void 0 : _errors$detailsProvid3.message) : null),
|
|
30013
|
+
}, " ", errors === null || errors === void 0 ? void 0 : (_errors$detailsProvid3 = errors.detailsProvidedBy) === null || _errors$detailsProvid3 === void 0 ? void 0 : _errors$detailsProvid3.message) : null), isDJB ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
29634
30014
|
style: {
|
|
29635
|
-
|
|
29636
|
-
}
|
|
29637
|
-
|
|
30015
|
+
margin: 0
|
|
30016
|
+
},
|
|
30017
|
+
label: getTrans("WS_NAME_OF_JE_OR_FIRM", "Name of JE / Name of Firm"),
|
|
30018
|
+
isMandatory: true,
|
|
30019
|
+
infoText: t("WS_NAME_OF_JE_OR_FIRM_INFO_MSG", "Enter Name of JE or Name of Firm")
|
|
30020
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
29638
30021
|
className: "field"
|
|
29639
30022
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
29640
30023
|
control: control,
|
|
29641
|
-
name: "
|
|
29642
|
-
defaultValue: plumberDetail === null || plumberDetail === void 0 ? void 0 : plumberDetail.
|
|
30024
|
+
name: "jeOrFirmName",
|
|
30025
|
+
defaultValue: plumberDetail === null || plumberDetail === void 0 ? void 0 : plumberDetail.jeOrFirmName,
|
|
29643
30026
|
rules: {
|
|
29644
|
-
|
|
29645
|
-
required: t("REQUIRED_FIELD")
|
|
30027
|
+
required: getTrans("REQUIRED_FIELD", "Required")
|
|
29646
30028
|
},
|
|
29647
30029
|
isMandatory: true,
|
|
29648
30030
|
render: props => {
|
|
29649
|
-
var _errors$
|
|
30031
|
+
var _errors$jeOrFirmName;
|
|
29650
30032
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
29651
30033
|
value: props.value,
|
|
29652
|
-
autoFocus: focusIndex.index === (plumberDetail === null || plumberDetail === void 0 ? void 0 : plumberDetail.key) && focusIndex.type === "
|
|
29653
|
-
errorStyle: localFormState.touched.
|
|
30034
|
+
autoFocus: focusIndex.index === (plumberDetail === null || plumberDetail === void 0 ? void 0 : plumberDetail.key) && focusIndex.type === "jeOrFirmName",
|
|
30035
|
+
errorStyle: localFormState.touched.jeOrFirmName && errors !== null && errors !== void 0 && (_errors$jeOrFirmName = errors.jeOrFirmName) !== null && _errors$jeOrFirmName !== void 0 && _errors$jeOrFirmName.message ? true : false,
|
|
29654
30036
|
onChange: e => {
|
|
29655
30037
|
props.onChange(e.target.value);
|
|
29656
30038
|
setFocusIndex({
|
|
29657
30039
|
index: plumberDetail === null || plumberDetail === void 0 ? void 0 : plumberDetail.key,
|
|
29658
|
-
type: "
|
|
30040
|
+
type: "jeOrFirmName"
|
|
29659
30041
|
});
|
|
29660
30042
|
},
|
|
29661
30043
|
labelStyle: {
|
|
29662
30044
|
marginTop: "unset"
|
|
29663
30045
|
},
|
|
29664
30046
|
onBlur: props.onBlur,
|
|
29665
|
-
placeholder:
|
|
30047
|
+
placeholder: getTrans("WS_NAME_OF_JE_OR_FIRM_PLACEHOLDER", "Enter Name of JE / Name of Firm")
|
|
29666
30048
|
});
|
|
29667
30049
|
}
|
|
29668
|
-
})), localFormState.touched.
|
|
30050
|
+
})), localFormState.touched.jeOrFirmName && errors !== null && errors !== void 0 && (_errors$jeOrFirmName2 = errors.jeOrFirmName) !== null && _errors$jeOrFirmName2 !== void 0 && _errors$jeOrFirmName2.message ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
29669
30051
|
style: errorStyle
|
|
29670
|
-
}, errors === null || errors === void 0 ? void 0 : (_errors$
|
|
30052
|
+
}, " ", errors === null || errors === void 0 ? void 0 : (_errors$jeOrFirmName3 = errors.jeOrFirmName) === null || _errors$jeOrFirmName3 === void 0 ? void 0 : _errors$jeOrFirmName3.message) : null) : null, isSelf || !currentPref ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
29671
30053
|
style: {
|
|
29672
|
-
|
|
29673
|
-
}
|
|
29674
|
-
|
|
30054
|
+
margin: 0
|
|
30055
|
+
},
|
|
30056
|
+
label: getTrans("WS_ADDN_DETAILS_PLUMBER_NAME_LABEL", "Plumber Name"),
|
|
30057
|
+
isMandatory: true,
|
|
30058
|
+
infoText: t("WS_PLUMBER_NAME_INFO_MSG", "Enter Name of Plumber")
|
|
30059
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
29675
30060
|
className: "field"
|
|
29676
30061
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
29677
30062
|
control: control,
|
|
29678
30063
|
name: "plumberName",
|
|
29679
|
-
defaultValue: plumberDetail === null || plumberDetail === void 0 ? void 0 : plumberDetail.plumberName,
|
|
30064
|
+
defaultValue: (plumberDetail === null || plumberDetail === void 0 ? void 0 : plumberDetail.plumberName) || (appPlumber === null || appPlumber === void 0 ? void 0 : appPlumber.name) || "",
|
|
29680
30065
|
rules: {
|
|
29681
|
-
validate: e => !e || !e.trim() ?
|
|
29682
|
-
required:
|
|
30066
|
+
validate: e => !e || !e.trim() ? getTrans("REQUIRED_FIELD", "Required") : /^[a-zA-Z\s]{1,50}$/.test(e) ? true : getTrans("WS_NAME_ERROR_MESSAGE", "Only alphabets are allowed"),
|
|
30067
|
+
required: getTrans("REQUIRED_FIELD", "Required")
|
|
29683
30068
|
},
|
|
29684
30069
|
isMandatory: true,
|
|
29685
30070
|
render: props => {
|
|
@@ -29701,34 +30086,76 @@ const PlumberDetails = _props => {
|
|
|
29701
30086
|
marginTop: "unset"
|
|
29702
30087
|
},
|
|
29703
30088
|
onBlur: props.onBlur,
|
|
29704
|
-
placeholder:
|
|
30089
|
+
placeholder: getTrans("WS_ADDN_DETAILS_PLUMBER_NAME_PLACEHOLDER", "Enter Name of Plumber")
|
|
29705
30090
|
});
|
|
29706
30091
|
}
|
|
29707
30092
|
})), localFormState.touched.plumberName && errors !== null && errors !== void 0 && (_errors$plumberName2 = errors.plumberName) !== null && _errors$plumberName2 !== void 0 && _errors$plumberName2.message ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
29708
30093
|
style: errorStyle
|
|
29709
|
-
}, " ", errors === null || errors === void 0 ? void 0 : (_errors$plumberName3 = errors.plumberName) === null || _errors$plumberName3 === void 0 ? void 0 : _errors$plumberName3.message) : null), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
30094
|
+
}, " ", errors === null || errors === void 0 ? void 0 : (_errors$plumberName3 = errors.plumberName) === null || _errors$plumberName3 === void 0 ? void 0 : _errors$plumberName3.message) : null), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
29710
30095
|
style: {
|
|
29711
|
-
|
|
30096
|
+
margin: 0
|
|
30097
|
+
},
|
|
30098
|
+
label: getTrans("WS_PLIMBER_LICENSE_NO_LABEL", "Plumber License Number"),
|
|
30099
|
+
isMandatory: true,
|
|
30100
|
+
infoText: t("WS_PLUMBER_LICENSE_NO_INFO_MSG", "Enter Plumber License Number")
|
|
30101
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
30102
|
+
className: "field"
|
|
30103
|
+
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
30104
|
+
control: control,
|
|
30105
|
+
name: "plumberLicenseNo",
|
|
30106
|
+
defaultValue: (plumberDetail === null || plumberDetail === void 0 ? void 0 : plumberDetail.plumberLicenseNo) || (appPlumber === null || appPlumber === void 0 ? void 0 : appPlumber.licenseNo) || "",
|
|
30107
|
+
rules: {
|
|
30108
|
+
required: getTrans("REQUIRED_FIELD", "Required")
|
|
30109
|
+
},
|
|
30110
|
+
isMandatory: true,
|
|
30111
|
+
render: props => {
|
|
30112
|
+
var _errors$plumberLicens;
|
|
30113
|
+
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
30114
|
+
value: props.value,
|
|
30115
|
+
autoFocus: focusIndex.index === (plumberDetail === null || plumberDetail === void 0 ? void 0 : plumberDetail.key) && focusIndex.type === "plumberLicenseNo",
|
|
30116
|
+
errorStyle: localFormState.touched.plumberLicenseNo && errors !== null && errors !== void 0 && (_errors$plumberLicens = errors.plumberLicenseNo) !== null && _errors$plumberLicens !== void 0 && _errors$plumberLicens.message ? true : false,
|
|
30117
|
+
onChange: e => {
|
|
30118
|
+
props.onChange(e.target.value);
|
|
30119
|
+
setFocusIndex({
|
|
30120
|
+
index: plumberDetail === null || plumberDetail === void 0 ? void 0 : plumberDetail.key,
|
|
30121
|
+
type: "plumberLicenseNo"
|
|
30122
|
+
});
|
|
30123
|
+
},
|
|
30124
|
+
labelStyle: {
|
|
30125
|
+
marginTop: "unset"
|
|
30126
|
+
},
|
|
30127
|
+
onBlur: props.onBlur,
|
|
30128
|
+
placeholder: getTrans("WS_PLIMBER_LICENSE_NO_PLACEHOLDER", "Enter Plumber License Number")
|
|
30129
|
+
});
|
|
29712
30130
|
}
|
|
29713
|
-
}
|
|
30131
|
+
})), localFormState.touched.plumberLicenseNo && errors !== null && errors !== void 0 && (_errors$plumberLicens2 = errors.plumberLicenseNo) !== null && _errors$plumberLicens2 !== void 0 && _errors$plumberLicens2.message ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
30132
|
+
style: errorStyle
|
|
30133
|
+
}, errors === null || errors === void 0 ? void 0 : (_errors$plumberLicens3 = errors.plumberLicenseNo) === null || _errors$plumberLicens3 === void 0 ? void 0 : _errors$plumberLicens3.message) : null), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
30134
|
+
style: {
|
|
30135
|
+
margin: 0
|
|
30136
|
+
},
|
|
30137
|
+
label: getTrans("WS_PLUMBER_MOBILE_NO_LABEL", "Plumber Mobile Number"),
|
|
30138
|
+
isMandatory: true,
|
|
30139
|
+
infoText: t("WS_PLUMBER_MOBILE_NO_INFO_MSG", "Enter 10-digit Plumber Mobile Number")
|
|
30140
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
29714
30141
|
className: "field"
|
|
29715
30142
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
29716
30143
|
control: control,
|
|
29717
30144
|
name: "plumberMobileNo",
|
|
29718
|
-
defaultValue: plumberDetail === null || plumberDetail === void 0 ? void 0 : plumberDetail.plumberMobileNo,
|
|
30145
|
+
defaultValue: (plumberDetail === null || plumberDetail === void 0 ? void 0 : plumberDetail.plumberMobileNo) || (appPlumber === null || appPlumber === void 0 ? void 0 : appPlumber.mobileNumber) || "",
|
|
29719
30146
|
rules: {
|
|
29720
30147
|
validate: e => {
|
|
29721
|
-
if (!e || !e.trim()) return
|
|
30148
|
+
if (!e || !e.trim()) return getTrans("REQUIRED_FIELD", "Required");
|
|
29722
30149
|
if (e.includes("*")) return true;
|
|
29723
30150
|
if (/^[6-9]\d{9}$/.test(e)) return true;
|
|
29724
|
-
return
|
|
30151
|
+
return getTrans("CORE_COMMON_PHONENO_INVALID", "Please enter a valid 10-digit mobile number");
|
|
29725
30152
|
},
|
|
29726
|
-
required:
|
|
30153
|
+
required: getTrans("REQUIRED_FIELD", "Required")
|
|
29727
30154
|
},
|
|
29728
30155
|
type: "mobileNumber",
|
|
29729
30156
|
isMandatory: true,
|
|
29730
30157
|
render: props => {
|
|
29731
|
-
var _errors$plumberMobile, _props$value, _formData$
|
|
30158
|
+
var _errors$plumberMobile, _props$value, _formData$connectionD8, _formData$connectionD9, _formData$connectionD0, _formData$connectionD1, _formData$disConnecti, _formData$disConnecti2, _formData$disConnecti3, _formData$connectionD10, _formData$connectionD11, _formData$connectionD12, _formData$connectionD13, _formData$connectionD14, _formData$connectionD15, _formData$connectionD16, _formData$disConnecti4, _formData$disConnecti5, _formData$disConnecti6;
|
|
29732
30159
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
29733
30160
|
style: {
|
|
29734
30161
|
display: "flex",
|
|
@@ -29767,7 +30194,7 @@ const PlumberDetails = _props => {
|
|
|
29767
30194
|
marginTop: "unset"
|
|
29768
30195
|
},
|
|
29769
30196
|
onBlur: props.onBlur,
|
|
29770
|
-
placeholder:
|
|
30197
|
+
placeholder: getTrans("WS_PLUMBER_MOBILE_NO_PLACEHOLDER", "Enter Plumber Mobile Number")
|
|
29771
30198
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
29772
30199
|
style: isMobile && isEmployee ? {} : {
|
|
29773
30200
|
marginRight: "-50px",
|
|
@@ -29783,13 +30210,13 @@ const PlumberDetails = _props => {
|
|
|
29783
30210
|
fieldName: "plumberInfoMobileNumber",
|
|
29784
30211
|
model: "WnSConnectionPlumber",
|
|
29785
30212
|
loadData: {
|
|
29786
|
-
serviceName: (formData === null || formData === void 0 ? void 0 : (_formData$
|
|
30213
|
+
serviceName: (formData === null || formData === void 0 ? void 0 : (_formData$connectionD8 = formData.connectionDetails) === null || _formData$connectionD8 === void 0 ? void 0 : (_formData$connectionD9 = _formData$connectionD8[0]) === null || _formData$connectionD9 === void 0 ? void 0 : (_formData$connectionD0 = _formData$connectionD9.formDetails) === null || _formData$connectionD0 === void 0 ? void 0 : (_formData$connectionD1 = _formData$connectionD0.applicationData) === null || _formData$connectionD1 === void 0 ? void 0 : _formData$connectionD1.serviceType) === "WATER" || formData !== null && formData !== void 0 && (_formData$disConnecti = formData.disConnectionDetails) !== null && _formData$disConnecti !== void 0 && (_formData$disConnecti2 = _formData$disConnecti[0]) !== null && _formData$disConnecti2 !== void 0 && (_formData$disConnecti3 = _formData$disConnecti2.consumerNumber) !== null && _formData$disConnecti3 !== void 0 && _formData$disConnecti3.includes("WS") ? "/ws-services/wc/_search" : "/sw-services/swc/_search",
|
|
29787
30214
|
requestBody: {},
|
|
29788
30215
|
requestParam: {
|
|
29789
|
-
tenantId: formData === null || formData === void 0 ? void 0 : (_formData$
|
|
30216
|
+
tenantId: formData === null || formData === void 0 ? void 0 : (_formData$connectionD10 = formData.connectionDetails) === null || _formData$connectionD10 === void 0 ? void 0 : (_formData$connectionD11 = _formData$connectionD10[0]) === null || _formData$connectionD11 === void 0 ? void 0 : (_formData$connectionD12 = _formData$connectionD11.formDetails) === null || _formData$connectionD12 === void 0 ? void 0 : _formData$connectionD12.tenantId,
|
|
29790
30217
|
applicationNumber: plumberDetail === null || plumberDetail === void 0 ? void 0 : plumberDetail.applicationNo
|
|
29791
30218
|
},
|
|
29792
|
-
jsonPath: (formData === null || formData === void 0 ? void 0 : (_formData$
|
|
30219
|
+
jsonPath: (formData === null || formData === void 0 ? void 0 : (_formData$connectionD13 = formData.connectionDetails) === null || _formData$connectionD13 === void 0 ? void 0 : (_formData$connectionD14 = _formData$connectionD13[0]) === null || _formData$connectionD14 === void 0 ? void 0 : (_formData$connectionD15 = _formData$connectionD14.formDetails) === null || _formData$connectionD15 === void 0 ? void 0 : (_formData$connectionD16 = _formData$connectionD15.applicationData) === null || _formData$connectionD16 === void 0 ? void 0 : _formData$connectionD16.serviceType) === "WATER" || formData !== null && formData !== void 0 && (_formData$disConnecti4 = formData.disConnectionDetails) !== null && _formData$disConnecti4 !== void 0 && (_formData$disConnecti5 = _formData$disConnecti4[0]) !== null && _formData$disConnecti5 !== void 0 && (_formData$disConnecti6 = _formData$disConnecti5.consumerNumber) !== null && _formData$disConnecti6 !== void 0 && _formData$disConnecti6.includes("WS") ? "WaterConnection[0].plumberInfo[0].mobileNumber" : "SewerageConnections[0].plumberInfo[0].mobileNumber",
|
|
29793
30220
|
isArray: false
|
|
29794
30221
|
}
|
|
29795
30222
|
}
|
|
@@ -30115,16 +30542,21 @@ const WSActivationCommentsDetails = _ref => {
|
|
|
30115
30542
|
comments: (formData === null || formData === void 0 ? void 0 : (_formData$comments = formData.comments) === null || _formData$comments === void 0 ? void 0 : _formData$comments.comments) || ""
|
|
30116
30543
|
});
|
|
30117
30544
|
React.useEffect(() => {
|
|
30118
|
-
|
|
30119
|
-
React.useEffect(() => {
|
|
30120
|
-
if (userType === "employee") {
|
|
30545
|
+
if (onSelect && config !== null && config !== void 0 && config.key) {
|
|
30121
30546
|
onSelect(config.key, {
|
|
30122
|
-
...formData[config.key],
|
|
30547
|
+
...(formData === null || formData === void 0 ? void 0 : formData[config === null || config === void 0 ? void 0 : config.key]),
|
|
30123
30548
|
...comments
|
|
30124
30549
|
});
|
|
30125
30550
|
}
|
|
30126
30551
|
}, [comments]);
|
|
30127
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
30552
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
30553
|
+
style: {
|
|
30554
|
+
margin: 0
|
|
30555
|
+
},
|
|
30556
|
+
label: t("WF_COMMON_COMMENTS") || "Comments",
|
|
30557
|
+
isMandatory: false,
|
|
30558
|
+
infoText: t("WF_COMMON_COMMENTS_INFO_MSG", "Enter any remarks or comments")
|
|
30559
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
30128
30560
|
className: "field"
|
|
30129
30561
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
30130
30562
|
key: config.key,
|
|
@@ -30139,7 +30571,7 @@ const WSActivationCommentsDetails = _ref => {
|
|
|
30139
30571
|
};
|
|
30140
30572
|
|
|
30141
30573
|
const WSActivationSupportingDocuments = _ref => {
|
|
30142
|
-
var _formData$
|
|
30574
|
+
var _formData$plumberDeta, _formData$plumberDeta2, _formData$plumberDeta3, _formData$plumberDeta4, _formData$plumberDeta5, _formData$plumberDeta6, _formData$plumberDeta7, _formData$plumberDeta8, _formData$additionalD, _formData$supportingD, _formData$supportingD2, _existingDocs$, _formData$supportingD3, _formData$supportingD4;
|
|
30143
30575
|
let {
|
|
30144
30576
|
t,
|
|
30145
30577
|
config,
|
|
@@ -30152,28 +30584,69 @@ const WSActivationSupportingDocuments = _ref => {
|
|
|
30152
30584
|
errors: formErrors
|
|
30153
30585
|
} = _ref;
|
|
30154
30586
|
const tenantIdCode = Digit.ULBService.getCurrentTenantId();
|
|
30155
|
-
const
|
|
30156
|
-
|
|
30157
|
-
|
|
30158
|
-
|
|
30159
|
-
const [
|
|
30160
|
-
|
|
30161
|
-
|
|
30162
|
-
|
|
30163
|
-
|
|
30164
|
-
|
|
30165
|
-
|
|
30166
|
-
|
|
30587
|
+
const getTrans = (key, defaultVal) => {
|
|
30588
|
+
const val = t(key);
|
|
30589
|
+
return val && val !== key ? val : defaultVal;
|
|
30590
|
+
};
|
|
30591
|
+
const plumberPref = (formData === null || formData === void 0 ? void 0 : (_formData$plumberDeta = formData.plumberDetails) === null || _formData$plumberDeta === void 0 ? void 0 : (_formData$plumberDeta2 = _formData$plumberDeta[0]) === null || _formData$plumberDeta2 === void 0 ? void 0 : (_formData$plumberDeta3 = _formData$plumberDeta2.detailsProvidedBy) === null || _formData$plumberDeta3 === void 0 ? void 0 : _formData$plumberDeta3.code) || (formData === null || formData === void 0 ? void 0 : (_formData$plumberDeta4 = formData.plumberDetails) === null || _formData$plumberDeta4 === void 0 ? void 0 : (_formData$plumberDeta5 = _formData$plumberDeta4[0]) === null || _formData$plumberDeta5 === void 0 ? void 0 : (_formData$plumberDeta6 = _formData$plumberDeta5.detailsProvidedBy) === null || _formData$plumberDeta6 === void 0 ? void 0 : _formData$plumberDeta6.name) || (formData === null || formData === void 0 ? void 0 : (_formData$plumberDeta7 = formData.plumberDetails) === null || _formData$plumberDeta7 === void 0 ? void 0 : (_formData$plumberDeta8 = _formData$plumberDeta7[0]) === null || _formData$plumberDeta8 === void 0 ? void 0 : _formData$plumberDeta8.detailsProvidedBy) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD = formData.additionalDetails) === null || _formData$additionalD === void 0 ? void 0 : _formData$additionalD.detailsProvidedBy) || "";
|
|
30592
|
+
const isDJB = plumberPref === "DJB" || plumberPref === "ULB" || plumberPref === "Delhi Jal Board" || typeof plumberPref === "string" && plumberPref.toLowerCase().includes("djb");
|
|
30593
|
+
const isSelf = !isDJB;
|
|
30594
|
+
const existingDocs = (formData === null || formData === void 0 ? void 0 : (_formData$supportingD = formData.supportingDocuments) === null || _formData$supportingD === void 0 ? void 0 : _formData$supportingD.documents) || (Array.isArray(formData === null || formData === void 0 ? void 0 : formData.supportingDocuments) ? formData.supportingDocuments : []);
|
|
30595
|
+
const initialPhoto = (formData === null || formData === void 0 ? void 0 : (_formData$supportingD2 = formData.supportingDocuments) === null || _formData$supportingD2 === void 0 ? void 0 : _formData$supportingD2.meterPhoto) || existingDocs.find(d => (d === null || d === void 0 ? void 0 : d.documentType) === "METER_PHOTO") || ((_existingDocs$ = existingDocs[0]) !== null && _existingDocs$ !== void 0 && _existingDocs$.fileStoreId ? existingDocs[0] : null);
|
|
30596
|
+
const initialWarranty = (formData === null || formData === void 0 ? void 0 : (_formData$supportingD3 = formData.supportingDocuments) === null || _formData$supportingD3 === void 0 ? void 0 : _formData$supportingD3.meterWarranty) || existingDocs.find(d => (d === null || d === void 0 ? void 0 : d.documentType) === "METER_WARRANTY_CARD_TESTING_REPORT_INVOICE");
|
|
30597
|
+
const initialDeclaration = (formData === null || formData === void 0 ? void 0 : (_formData$supportingD4 = formData.supportingDocuments) === null || _formData$supportingD4 === void 0 ? void 0 : _formData$supportingD4.plumberDeclaration) || existingDocs.find(d => (d === null || d === void 0 ? void 0 : d.documentType) === "DECLARATION_OF_LICENSED_PLUMBER");
|
|
30598
|
+
const [meterPhoto, setMeterPhoto] = React.useState(initialPhoto || null);
|
|
30599
|
+
const [meterWarranty, setMeterWarranty] = React.useState(initialWarranty || null);
|
|
30600
|
+
const [plumberDeclaration, setPlumberDeclaration] = React.useState(initialDeclaration || null);
|
|
30601
|
+
const [errors, setErrors] = React.useState({
|
|
30602
|
+
meterPhoto: null,
|
|
30603
|
+
meterWarranty: null,
|
|
30604
|
+
plumberDeclaration: null
|
|
30605
|
+
});
|
|
30606
|
+
const [uploading, setUploading] = React.useState({
|
|
30607
|
+
meterPhoto: false,
|
|
30608
|
+
meterWarranty: false,
|
|
30609
|
+
plumberDeclaration: false
|
|
30610
|
+
});
|
|
30611
|
+
const [isDownloadingTemplate, setIsDownloadingTemplate] = React.useState(false);
|
|
30167
30612
|
React.useEffect(() => {
|
|
30168
|
-
var
|
|
30169
|
-
const
|
|
30170
|
-
if (
|
|
30171
|
-
|
|
30172
|
-
|
|
30613
|
+
var _docs$;
|
|
30614
|
+
const docs = [];
|
|
30615
|
+
if (meterPhoto !== null && meterPhoto !== void 0 && meterPhoto.fileStoreId) {
|
|
30616
|
+
docs.push({
|
|
30617
|
+
documentType: "METER_PHOTO",
|
|
30618
|
+
fileStoreId: meterPhoto.fileStoreId,
|
|
30619
|
+
fileName: meterPhoto.fileName
|
|
30620
|
+
});
|
|
30173
30621
|
}
|
|
30174
|
-
|
|
30175
|
-
|
|
30176
|
-
|
|
30622
|
+
if (meterWarranty !== null && meterWarranty !== void 0 && meterWarranty.fileStoreId) {
|
|
30623
|
+
docs.push({
|
|
30624
|
+
documentType: "METER_WARRANTY_CARD_TESTING_REPORT_INVOICE",
|
|
30625
|
+
fileStoreId: meterWarranty.fileStoreId,
|
|
30626
|
+
fileName: meterWarranty.fileName
|
|
30627
|
+
});
|
|
30628
|
+
}
|
|
30629
|
+
if (plumberDeclaration !== null && plumberDeclaration !== void 0 && plumberDeclaration.fileStoreId) {
|
|
30630
|
+
docs.push({
|
|
30631
|
+
documentType: "DECLARATION_OF_LICENSED_PLUMBER",
|
|
30632
|
+
fileStoreId: plumberDeclaration.fileStoreId,
|
|
30633
|
+
fileName: plumberDeclaration.fileName
|
|
30634
|
+
});
|
|
30635
|
+
}
|
|
30636
|
+
const payloadData = {
|
|
30637
|
+
documents: docs,
|
|
30638
|
+
meterPhoto: meterPhoto || null,
|
|
30639
|
+
meterWarranty: meterWarranty || null,
|
|
30640
|
+
plumberDeclaration: plumberDeclaration || null,
|
|
30641
|
+
fileStoreId: (meterPhoto === null || meterPhoto === void 0 ? void 0 : meterPhoto.fileStoreId) || ((_docs$ = docs[0]) === null || _docs$ === void 0 ? void 0 : _docs$.fileStoreId) || null
|
|
30642
|
+
};
|
|
30643
|
+
if (onSelect && config !== null && config !== void 0 && config.key) {
|
|
30644
|
+
onSelect(config.key, payloadData);
|
|
30645
|
+
}
|
|
30646
|
+
const isPhotoValid = !!(meterPhoto !== null && meterPhoto !== void 0 && meterPhoto.fileStoreId);
|
|
30647
|
+
const isWarrantyValid = isDJB ? true : !!(meterWarranty !== null && meterWarranty !== void 0 && meterWarranty.fileStoreId);
|
|
30648
|
+
const isDeclarationValid = true;
|
|
30649
|
+
if (isPhotoValid && isWarrantyValid && isDeclarationValid) {
|
|
30177
30650
|
if (clearFormErrors && config !== null && config !== void 0 && config.key) {
|
|
30178
30651
|
clearFormErrors(config.key);
|
|
30179
30652
|
}
|
|
@@ -30181,101 +30654,104 @@ const WSActivationSupportingDocuments = _ref => {
|
|
|
30181
30654
|
if (setFormError && config !== null && config !== void 0 && config.key) {
|
|
30182
30655
|
setFormError(config.key, {
|
|
30183
30656
|
type: "required",
|
|
30184
|
-
message:
|
|
30657
|
+
message: getTrans("CORE_COMMON_REQUIRED_ERRMSG", "Required")
|
|
30185
30658
|
});
|
|
30186
30659
|
}
|
|
30187
30660
|
}
|
|
30188
|
-
}, [
|
|
30189
|
-
|
|
30190
|
-
|
|
30191
|
-
|
|
30192
|
-
|
|
30193
|
-
|
|
30194
|
-
|
|
30195
|
-
|
|
30196
|
-
|
|
30197
|
-
|
|
30198
|
-
|
|
30199
|
-
|
|
30200
|
-
|
|
30201
|
-
|
|
30202
|
-
setError(t(`NOT_SUPPORTED_FILE_TYPE`));
|
|
30203
|
-
} else {
|
|
30204
|
-
const _temp = _catch(function () {
|
|
30205
|
-
return Promise.resolve(Digit.UploadServices.Filestorage("WS", file, tenantIdCode)).then(function (response) {
|
|
30206
|
-
var _response$data, _response$data$files;
|
|
30207
|
-
if ((response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$files = _response$data.files) === null || _response$data$files === void 0 ? void 0 : _response$data$files.length) > 0) {
|
|
30208
|
-
var _response$data2, _response$data2$files;
|
|
30209
|
-
const fsId = response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$files = _response$data2.files[0]) === null || _response$data2$files === void 0 ? void 0 : _response$data2$files.fileStoreId;
|
|
30210
|
-
setUploadedFile(fsId);
|
|
30211
|
-
setDocuments([{
|
|
30212
|
-
fileStoreId: fsId,
|
|
30213
|
-
documentUid: fsId
|
|
30214
|
-
}]);
|
|
30215
|
-
if (onSelect && config !== null && config !== void 0 && config.key) {
|
|
30216
|
-
onSelect(config.key, [{
|
|
30217
|
-
fileStoreId: fsId,
|
|
30218
|
-
documentUid: fsId
|
|
30219
|
-
}]);
|
|
30220
|
-
}
|
|
30221
|
-
if (clearFormErrors && config !== null && config !== void 0 && config.key) {
|
|
30222
|
-
clearFormErrors(config.key);
|
|
30223
|
-
}
|
|
30224
|
-
} else {
|
|
30225
|
-
setError(t("CS_FILE_UPLOAD_ERROR"));
|
|
30226
|
-
}
|
|
30227
|
-
});
|
|
30228
|
-
}, function () {
|
|
30229
|
-
setError(t("CS_FILE_UPLOAD_ERROR"));
|
|
30230
|
-
});
|
|
30231
|
-
if (_temp && _temp.then) return _temp.then(function () {});
|
|
30232
|
-
}
|
|
30233
|
-
}();
|
|
30234
|
-
if (_temp2 && _temp2.then) return _temp2.then(function () {});
|
|
30235
|
-
}
|
|
30236
|
-
}();
|
|
30237
|
-
if (_temp3 && _temp3.then) return _temp3.then(function () {});
|
|
30238
|
-
}
|
|
30239
|
-
}();
|
|
30240
|
-
return _temp4 && _temp4.then ? _temp4.then(function () {}) : void 0;
|
|
30241
|
-
} catch (e) {
|
|
30242
|
-
Promise.reject(e);
|
|
30661
|
+
}, [meterPhoto, meterWarranty, plumberDeclaration, isDJB, isSelf]);
|
|
30662
|
+
const uploadFileToServer = function (file, fieldKey, maxSizeInBytes, allowedTypesRegex, errorMsgSize, errorMsgType) {
|
|
30663
|
+
try {
|
|
30664
|
+
setErrors(prev => ({
|
|
30665
|
+
...prev,
|
|
30666
|
+
[fieldKey]: null
|
|
30667
|
+
}));
|
|
30668
|
+
if (!file) return Promise.resolve();
|
|
30669
|
+
if (file.size > maxSizeInBytes) {
|
|
30670
|
+
setErrors(prev => ({
|
|
30671
|
+
...prev,
|
|
30672
|
+
[fieldKey]: errorMsgSize
|
|
30673
|
+
}));
|
|
30674
|
+
return Promise.resolve();
|
|
30243
30675
|
}
|
|
30244
|
-
|
|
30245
|
-
|
|
30246
|
-
|
|
30247
|
-
|
|
30248
|
-
|
|
30249
|
-
|
|
30250
|
-
|
|
30251
|
-
|
|
30252
|
-
|
|
30253
|
-
|
|
30254
|
-
|
|
30255
|
-
|
|
30256
|
-
|
|
30257
|
-
|
|
30676
|
+
if (file !== null && file !== void 0 && file.type && !allowedTypesRegex.test(file === null || file === void 0 ? void 0 : file.type) && !allowedTypesRegex.test(file === null || file === void 0 ? void 0 : file.name)) {
|
|
30677
|
+
setErrors(prev => ({
|
|
30678
|
+
...prev,
|
|
30679
|
+
[fieldKey]: errorMsgType
|
|
30680
|
+
}));
|
|
30681
|
+
return Promise.resolve();
|
|
30682
|
+
}
|
|
30683
|
+
const _temp = _catch(function () {
|
|
30684
|
+
setUploading(prev => ({
|
|
30685
|
+
...prev,
|
|
30686
|
+
[fieldKey]: true
|
|
30687
|
+
}));
|
|
30688
|
+
return Promise.resolve(Digit.UploadServices.Filestorage("WS", file, tenantIdCode)).then(function (response) {
|
|
30689
|
+
var _response$data, _response$data$files;
|
|
30690
|
+
setUploading(prev => ({
|
|
30691
|
+
...prev,
|
|
30692
|
+
[fieldKey]: false
|
|
30693
|
+
}));
|
|
30694
|
+
if ((response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$files = _response$data.files) === null || _response$data$files === void 0 ? void 0 : _response$data$files.length) > 0) {
|
|
30695
|
+
var _response$data2, _response$data2$files;
|
|
30696
|
+
const fsId = response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$files = _response$data2.files[0]) === null || _response$data2$files === void 0 ? void 0 : _response$data2$files.fileStoreId;
|
|
30697
|
+
const fileObj = {
|
|
30698
|
+
fileStoreId: fsId,
|
|
30699
|
+
documentUid: fsId,
|
|
30700
|
+
fileName: file.name
|
|
30701
|
+
};
|
|
30702
|
+
if (fieldKey === "meterPhoto") setMeterPhoto(fileObj);else if (fieldKey === "meterWarranty") setMeterWarranty(fileObj);else if (fieldKey === "plumberDeclaration") setPlumberDeclaration(fileObj);
|
|
30703
|
+
} else {
|
|
30704
|
+
setErrors(prev => ({
|
|
30705
|
+
...prev,
|
|
30706
|
+
[fieldKey]: getTrans("CS_FILE_UPLOAD_ERROR", "File upload failed")
|
|
30707
|
+
}));
|
|
30708
|
+
}
|
|
30709
|
+
});
|
|
30710
|
+
}, function () {
|
|
30711
|
+
setUploading(prev => ({
|
|
30712
|
+
...prev,
|
|
30713
|
+
[fieldKey]: false
|
|
30714
|
+
}));
|
|
30715
|
+
setErrors(prev => ({
|
|
30716
|
+
...prev,
|
|
30717
|
+
[fieldKey]: getTrans("CS_FILE_UPLOAD_ERROR", "File upload failed")
|
|
30718
|
+
}));
|
|
30258
30719
|
});
|
|
30720
|
+
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
|
30721
|
+
} catch (e) {
|
|
30722
|
+
return Promise.reject(e);
|
|
30259
30723
|
}
|
|
30260
30724
|
};
|
|
30261
|
-
const hasValidationError = !uploadedFile && ((formState === null || formState === void 0 ? void 0 : (_formState$errors = formState.errors) === null || _formState$errors === void 0 ? void 0 : _formState$errors[config === null || config === void 0 ? void 0 : config.key]) || (formErrors === null || formErrors === void 0 ? void 0 : formErrors[config === null || config === void 0 ? void 0 : config.key]));
|
|
30262
30725
|
const errorStyle = {
|
|
30263
30726
|
width: "100%",
|
|
30264
30727
|
marginLeft: "0px",
|
|
30265
30728
|
fontSize: "12px",
|
|
30266
30729
|
marginTop: "4px"
|
|
30267
30730
|
};
|
|
30268
|
-
return /*#__PURE__*/React__default.createElement(
|
|
30269
|
-
|
|
30270
|
-
|
|
30731
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
30732
|
+
style: {
|
|
30733
|
+
margin: 0
|
|
30734
|
+
},
|
|
30735
|
+
label: getTrans("WS_METER_PHOTO_UPLOAD_LABEL", "Meter Photo(JPEG/PDF size up to 500KB)"),
|
|
30736
|
+
isMandatory: true,
|
|
30737
|
+
infoText: t("WS_METER_PHOTO_INFO_MSG", "Upload photo of installed water meter")
|
|
30738
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
30271
30739
|
className: "field"
|
|
30272
30740
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.UploadFile, {
|
|
30273
|
-
id: "activation-
|
|
30741
|
+
id: "activation-meter-photo",
|
|
30274
30742
|
onUpload: e => {
|
|
30275
|
-
|
|
30743
|
+
var _e$target$files;
|
|
30744
|
+
const f = (_e$target$files = e.target.files) === null || _e$target$files === void 0 ? void 0 : _e$target$files[0];
|
|
30745
|
+
uploadFileToServer(f, "meterPhoto", 500 * 1024, /(.*?)(jpg|jpeg|png|image|pdf)$/i, "File size exceeds maximum limit of 500 KB", "Only JPEG/PNG images or PDF files are allowed");
|
|
30276
30746
|
},
|
|
30277
|
-
onDelete:
|
|
30278
|
-
|
|
30747
|
+
onDelete: () => {
|
|
30748
|
+
setMeterPhoto(null);
|
|
30749
|
+
setErrors(prev => ({
|
|
30750
|
+
...prev,
|
|
30751
|
+
meterPhoto: null
|
|
30752
|
+
}));
|
|
30753
|
+
},
|
|
30754
|
+
message: uploading.meterPhoto ? "Uploading..." : meterPhoto ? meterPhoto.fileName || `1 ${getTrans("CS_ACTION_FILEUPLOADED", "File Uploaded")}` : getTrans("CS_ACTION_NO_FILEUPLOADED", "No File Uploaded"),
|
|
30279
30755
|
textStyles: {
|
|
30280
30756
|
width: "100%"
|
|
30281
30757
|
},
|
|
@@ -30284,13 +30760,47 @@ const WSActivationSupportingDocuments = _ref => {
|
|
|
30284
30760
|
},
|
|
30285
30761
|
buttonType: "button",
|
|
30286
30762
|
accept: "image/*, .pdf, .png, .jpeg, .jpg",
|
|
30287
|
-
iserror:
|
|
30763
|
+
iserror: errors.meterPhoto,
|
|
30288
30764
|
isMandatory: true
|
|
30289
|
-
}),
|
|
30765
|
+
}), errors.meterPhoto ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
30290
30766
|
style: errorStyle
|
|
30291
|
-
},
|
|
30767
|
+
}, errors.meterPhoto) : null)), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
30768
|
+
style: {
|
|
30769
|
+
margin: 0
|
|
30770
|
+
},
|
|
30771
|
+
label: getTrans("WS_METER_WARRANTY_REPORT_INVOICE_LABEL", "Meter warranty card, Meter testing report, Invoice of meter JPEG/PDF up to size 1 MB"),
|
|
30772
|
+
isMandatory: isSelf,
|
|
30773
|
+
infoText: t("WS_METER_WARRANTY_INFO_MSG", "Upload meter warranty card, testing report or invoice")
|
|
30774
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
30775
|
+
className: "field"
|
|
30776
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.UploadFile, {
|
|
30777
|
+
id: "activation-meter-warranty",
|
|
30778
|
+
onUpload: e => {
|
|
30779
|
+
var _e$target$files2;
|
|
30780
|
+
const f = (_e$target$files2 = e.target.files) === null || _e$target$files2 === void 0 ? void 0 : _e$target$files2[0];
|
|
30781
|
+
uploadFileToServer(f, "meterWarranty", 1024 * 1024, /(.*?)(jpg|jpeg|png|image|pdf)$/i, "File size exceeds maximum limit of 1 MB", "Only JPEG/PNG images or PDF files are allowed");
|
|
30782
|
+
},
|
|
30783
|
+
onDelete: () => {
|
|
30784
|
+
setMeterWarranty(null);
|
|
30785
|
+
setErrors(prev => ({
|
|
30786
|
+
...prev,
|
|
30787
|
+
meterWarranty: null
|
|
30788
|
+
}));
|
|
30789
|
+
},
|
|
30790
|
+
message: uploading.meterWarranty ? "Uploading..." : meterWarranty ? meterWarranty.fileName || `1 ${getTrans("CS_ACTION_FILEUPLOADED", "File Uploaded")}` : getTrans("CS_ACTION_NO_FILEUPLOADED", "No File Uploaded"),
|
|
30791
|
+
textStyles: {
|
|
30792
|
+
width: "100%"
|
|
30793
|
+
},
|
|
30794
|
+
inputStyles: {
|
|
30795
|
+
width: "280px"
|
|
30796
|
+
},
|
|
30797
|
+
buttonType: "button",
|
|
30798
|
+
accept: "image/*, .pdf, .png, .jpeg, .jpg",
|
|
30799
|
+
iserror: errors.meterWarranty,
|
|
30800
|
+
isMandatory: isSelf
|
|
30801
|
+
}), errors.meterWarranty ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
30292
30802
|
style: errorStyle
|
|
30293
|
-
},
|
|
30803
|
+
}, errors.meterWarranty) : null)));
|
|
30294
30804
|
};
|
|
30295
30805
|
|
|
30296
30806
|
var b = "function" === typeof Symbol && Symbol.for,
|
|
@@ -31953,7 +32463,7 @@ const getDocUploadSpecs = (doc, isApplicantPhoto) => {
|
|
|
31953
32463
|
};
|
|
31954
32464
|
};
|
|
31955
32465
|
const WSDocumentsEmployee = _ref => {
|
|
31956
|
-
var _formData$ConnectionD, _formData$ConnectionD2, _formData$ConnectionD3, _formData$application, _formData$application2, _formData$application3, _formData$connectionH, _formData$connectionH2, _formData$ConnectionH, _formData$ConnectionH2, _formData$additionalD, _formData$rainWaterHa, _formData$rainWaterHa2, _formData$rainWaterHa3, _formData$rainWaterHa4, _formData$additionalD2, _formData$additionalD3, _Digit$SessionStorage, _applicationDetailsDa, _applicationDetailsDa2, _wsDocs$wsDocsData3;
|
|
32466
|
+
var _formData$ConnectionD, _formData$ConnectionD2, _formData$ConnectionD3, _formData$application, _formData$application2, _formData$application3, _formData$connectionH, _formData$connectionH2, _formData$ConnectionH, _formData$ConnectionH2, _formData$additionalD, _formData$rainWaterHa, _formData$rainWaterHa2, _formData$rainWaterHa3, _formData$rainWaterHa4, _formData$additionalD2, _formData$additionalD3, _Digit$SessionStorage, _applicationDetailsDa, _applicationDetailsDa2, _wsDocs$wsDocsData3, _wsDocs$wsDocsData3$f;
|
|
31957
32467
|
let {
|
|
31958
32468
|
t,
|
|
31959
32469
|
config,
|
|
@@ -32123,15 +32633,18 @@ const WSDocumentsEmployee = _ref => {
|
|
|
32123
32633
|
}
|
|
32124
32634
|
};
|
|
32125
32635
|
React.useEffect(() => {
|
|
32126
|
-
var _wsDocs$wsDocsData;
|
|
32636
|
+
var _wsDocs$wsDocsData, _wsDocs$wsDocsData$fi;
|
|
32127
32637
|
let count = 0;
|
|
32128
|
-
wsDocs === null || wsDocs === void 0 ? void 0 : (_wsDocs$wsDocsData = wsDocs[wsDocsData]) === null || _wsDocs$wsDocsData === void 0 ? void 0 : _wsDocs$wsDocsData.
|
|
32638
|
+
wsDocs === null || wsDocs === void 0 ? void 0 : (_wsDocs$wsDocsData = wsDocs[wsDocsData]) === null || _wsDocs$wsDocsData === void 0 ? void 0 : (_wsDocs$wsDocsData$fi = _wsDocs$wsDocsData.filter(doc => {
|
|
32639
|
+
var _doc$code, _doc$code2;
|
|
32640
|
+
return (doc === null || doc === void 0 ? void 0 : doc.code) !== "OWNER.APPLICANTPHOTO" && !(doc !== null && doc !== void 0 && (_doc$code = doc.code) !== null && _doc$code !== void 0 && _doc$code.includes("APPLICANTPHOTO")) && !(doc !== null && doc !== void 0 && (_doc$code2 = doc.code) !== null && _doc$code2 !== void 0 && _doc$code2.includes("PHOTO"));
|
|
32641
|
+
})) === null || _wsDocs$wsDocsData$fi === void 0 ? void 0 : _wsDocs$wsDocsData$fi.map(doc => {
|
|
32129
32642
|
const isDocRequired = isOtherDocument(doc === null || doc === void 0 ? void 0 : doc.code) ? false : doc.required;
|
|
32130
32643
|
let isRequired = false;
|
|
32131
32644
|
documents.map(data => {
|
|
32132
32645
|
if (isDocRequired && data !== null && data !== void 0 && data.documentType.includes(doc.code)) {
|
|
32133
|
-
var _doc$
|
|
32134
|
-
const isIdOrOwn = doc.code === "OWNER.IDENTITYPROOF" || doc.code === "OWNER.ADDRESSPROOF" || doc.code === "OWNER.OWNERSHIPPROOF" || ((_doc$
|
|
32646
|
+
var _doc$code3, _doc$code4, _doc$code5;
|
|
32647
|
+
const isIdOrOwn = doc.code === "OWNER.IDENTITYPROOF" || doc.code === "OWNER.ADDRESSPROOF" || doc.code === "OWNER.OWNERSHIPPROOF" || ((_doc$code3 = doc.code) === null || _doc$code3 === void 0 ? void 0 : _doc$code3.includes("IDENTITY")) || ((_doc$code4 = doc.code) === null || _doc$code4 === void 0 ? void 0 : _doc$code4.includes("ADDRESS")) || ((_doc$code5 = doc.code) === null || _doc$code5 === void 0 ? void 0 : _doc$code5.includes("OWNERSHIP"));
|
|
32135
32648
|
if (isIdOrOwn) {
|
|
32136
32649
|
if (data !== null && data !== void 0 && data.fileStoreId && data !== null && data !== void 0 && data.documentUid && String(data.documentUid).trim()) {
|
|
32137
32650
|
isRequired = true;
|
|
@@ -32179,7 +32692,10 @@ const WSDocumentsEmployee = _ref => {
|
|
|
32179
32692
|
}
|
|
32180
32693
|
const innerContent = /*#__PURE__*/React__default.createElement("div", {
|
|
32181
32694
|
className: "formcomposer-section-grid ws-doc-upload"
|
|
32182
|
-
}, wsDocs === null || wsDocs === void 0 ? void 0 : (_wsDocs$wsDocsData3 = wsDocs[wsDocsData]) === null || _wsDocs$wsDocsData3 === void 0 ? void 0 : _wsDocs$wsDocsData3.
|
|
32695
|
+
}, wsDocs === null || wsDocs === void 0 ? void 0 : (_wsDocs$wsDocsData3 = wsDocs[wsDocsData]) === null || _wsDocs$wsDocsData3 === void 0 ? void 0 : (_wsDocs$wsDocsData3$f = _wsDocs$wsDocsData3.filter(document => {
|
|
32696
|
+
var _document$code, _document$code2;
|
|
32697
|
+
return (document === null || document === void 0 ? void 0 : document.code) !== "OWNER.APPLICANTPHOTO" && !(document !== null && document !== void 0 && (_document$code = document.code) !== null && _document$code !== void 0 && _document$code.includes("APPLICANTPHOTO")) && !(document !== null && document !== void 0 && (_document$code2 = document.code) !== null && _document$code2 !== void 0 && _document$code2.includes("PHOTO"));
|
|
32698
|
+
})) === null || _wsDocs$wsDocsData3$f === void 0 ? void 0 : _wsDocs$wsDocsData3$f.map((document, index) => {
|
|
32183
32699
|
let modifiedDocument = {
|
|
32184
32700
|
...document
|
|
32185
32701
|
};
|
|
@@ -32533,13 +33049,14 @@ function EmployeeIdDocumentUpload(_ref2) {
|
|
|
32533
33049
|
alignItems: "center",
|
|
32534
33050
|
justifyContent: "space-between"
|
|
32535
33051
|
}
|
|
32536
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
33052
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
32537
33053
|
style: {
|
|
32538
33054
|
margin: 0
|
|
32539
|
-
}
|
|
32540
|
-
|
|
32541
|
-
|
|
32542
|
-
|
|
33055
|
+
},
|
|
33056
|
+
label: t("WS_UPLOAD_EMPLOYEE_ID_DOC") || t("Upload Employee ID Document"),
|
|
33057
|
+
isMandatory: true,
|
|
33058
|
+
infoText: t("WS_EMPLOYEE_ID_DOC_INFO_MSG", "Upload DJB Employee ID Card")
|
|
33059
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
32543
33060
|
style: {
|
|
32544
33061
|
fontSize: "12px",
|
|
32545
33062
|
color: "#555",
|
|
@@ -32614,7 +33131,7 @@ function EmployeeIdDocumentUpload(_ref2) {
|
|
|
32614
33131
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.RemoveIcon, null)))));
|
|
32615
33132
|
}
|
|
32616
33133
|
function SelectDocument$2(_ref3) {
|
|
32617
|
-
var _doc$
|
|
33134
|
+
var _doc$code6, _doc$code7, _doc$code8, _doc$code9, _selectedDocument$cod, _selectedDocument$cod2, _selectedDocument$nam, _selectedDocument$nam2, _selectedDocument$i, _formData$ConnectionD4, _formData$ConnectionD5, _formData$ConnectionD6, _formData$application4, _formData$application5, _formData$application6, _formData$connectionH3, _formData$connectionH4, _formData$ConnectionH3, _formData$ConnectionH4, _formData$additionalD4, _formData$ConnectionD7, _doc$i18nKey, _doc$i18nKey2, _doc$i18nKey3, _doc$i18nKey4, _selectedDocument$cod4, _selectedDocument$cod5, _selectedDocument$cod6, _selectedDocument$cod7, _selectedDocument$cod8, _selectedDocument$cod9, _selectedDocument$cod0, _selectedDocument$cod1, _selectedDocument$cod10, _selectedDocument$cod11, _selectedDocument$cod12, _selectedDocument$cod13, _selectedDocument$cod14, _selectedDocument$cod15, _selectedDocument$cod16, _selectedDocument$cod17, _doc$i18nKey5, _doc$i18nKey6, _doc$i18nKey7;
|
|
32618
33135
|
let {
|
|
32619
33136
|
t,
|
|
32620
33137
|
document: doc,
|
|
@@ -32650,8 +33167,8 @@ function SelectDocument$2(_ref3) {
|
|
|
32650
33167
|
const isApplicantPhoto = (doc === null || doc === void 0 ? void 0 : doc.code) === "OWNER.APPLICANTPHOTO";
|
|
32651
33168
|
const specs = getDocUploadSpecs(doc, isApplicantPhoto);
|
|
32652
33169
|
const [fileError, setFileError] = React.useState(null);
|
|
32653
|
-
const isIdentityProof = (doc === null || doc === void 0 ? void 0 : doc.code) === "OWNER.IDENTITYPROOF" || (doc === null || doc === void 0 ? void 0 : (_doc$
|
|
32654
|
-
const isOwnershipProof = (doc === null || doc === void 0 ? void 0 : doc.code) === "OWNER.ADDRESSPROOF" || (doc === null || doc === void 0 ? void 0 : doc.code) === "OWNER.OWNERSHIPPROOF" || (doc === null || doc === void 0 ? void 0 : (_doc$
|
|
33170
|
+
const isIdentityProof = (doc === null || doc === void 0 ? void 0 : doc.code) === "OWNER.IDENTITYPROOF" || (doc === null || doc === void 0 ? void 0 : (_doc$code6 = doc.code) === null || _doc$code6 === void 0 ? void 0 : _doc$code6.includes("IDENTITYPROOF")) || (doc === null || doc === void 0 ? void 0 : (_doc$code7 = doc.code) === null || _doc$code7 === void 0 ? void 0 : _doc$code7.includes("IDENTITY"));
|
|
33171
|
+
const isOwnershipProof = (doc === null || doc === void 0 ? void 0 : doc.code) === "OWNER.ADDRESSPROOF" || (doc === null || doc === void 0 ? void 0 : doc.code) === "OWNER.OWNERSHIPPROOF" || (doc === null || doc === void 0 ? void 0 : (_doc$code8 = doc.code) === null || _doc$code8 === void 0 ? void 0 : _doc$code8.includes("ADDRESSPROOF")) || (doc === null || doc === void 0 ? void 0 : (_doc$code9 = doc.code) === null || _doc$code9 === void 0 ? void 0 : _doc$code9.includes("OWNERSHIP"));
|
|
32655
33172
|
const isDocNumberMandatory = isIdentityProof || isOwnershipProof;
|
|
32656
33173
|
const [selectedDocument, setSelectedDocument] = React.useState(() => {
|
|
32657
33174
|
var _filteredDocument$doc, _doc$dropdownData4, _doc$dropdownData5;
|
|
@@ -33157,13 +33674,14 @@ function SelectDocument$2(_ref3) {
|
|
|
33157
33674
|
flexDirection: "column",
|
|
33158
33675
|
gap: "8px"
|
|
33159
33676
|
}
|
|
33160
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
33677
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
33161
33678
|
style: {
|
|
33162
33679
|
margin: 0
|
|
33163
|
-
}
|
|
33164
|
-
|
|
33165
|
-
|
|
33166
|
-
|
|
33680
|
+
},
|
|
33681
|
+
label: t(doc === null || doc === void 0 ? void 0 : doc.i18nKey),
|
|
33682
|
+
isMandatory: (doc === null || doc === void 0 ? void 0 : doc.required) || !isTenant && isOther && (isRwhMandatory || isStpMandatory),
|
|
33683
|
+
infoText: t(`${doc === null || doc === void 0 ? void 0 : (_doc$i18nKey = doc.i18nKey) === null || _doc$i18nKey === void 0 ? void 0 : _doc$i18nKey.replaceAll(".", "_")}_INFO_MSG`, `Select ${t(doc === null || doc === void 0 ? void 0 : doc.i18nKey)}`)
|
|
33684
|
+
}), " ", !isTenant && isOther && isRwhMandatory && !hasRwhUploaded && !(uploadedFile && isRwhDocType$1(selectedDocument)) && /*#__PURE__*/React__default.createElement("div", {
|
|
33167
33685
|
style: {
|
|
33168
33686
|
fontSize: "12px",
|
|
33169
33687
|
color: "#d32f2f",
|
|
@@ -33197,13 +33715,14 @@ function SelectDocument$2(_ref3) {
|
|
|
33197
33715
|
flexDirection: "column",
|
|
33198
33716
|
gap: "8px"
|
|
33199
33717
|
}
|
|
33200
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
33718
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
33201
33719
|
style: {
|
|
33202
33720
|
margin: 0
|
|
33203
|
-
}
|
|
33204
|
-
|
|
33205
|
-
|
|
33206
|
-
|
|
33721
|
+
},
|
|
33722
|
+
label: isOtherDocumentsRemark ? !t("WS_OTHER_DOCUMENT_REMARK") || t("WS_OTHER_DOCUMENT_REMARK") === "WS_OTHER_DOCUMENT_REMARK" ? "Other Document Remark" : t("WS_OTHER_DOCUMENT_REMARK") : t(`${doc === null || doc === void 0 ? void 0 : (_doc$i18nKey2 = doc.i18nKey) === null || _doc$i18nKey2 === void 0 ? void 0 : _doc$i18nKey2.replaceAll(".", "_")}_DOCUMENT_NO`),
|
|
33723
|
+
isMandatory: isDocNumberMandatory,
|
|
33724
|
+
infoText: isOtherDocumentsRemark ? t("WS_OTHER_DOC_REMARK_INFO_MSG", "Enter Other Document Remark") : t(`${doc === null || doc === void 0 ? void 0 : (_doc$i18nKey3 = doc.i18nKey) === null || _doc$i18nKey3 === void 0 ? void 0 : _doc$i18nKey3.replaceAll(".", "_")}_DOC_NO_INFO_MSG`, `Enter ${t(`${doc === null || doc === void 0 ? void 0 : (_doc$i18nKey4 = doc.i18nKey) === null || _doc$i18nKey4 === void 0 ? void 0 : _doc$i18nKey4.replaceAll(".", "_")}_DOCUMENT_NO`)}`)
|
|
33725
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
33207
33726
|
className: "field"
|
|
33208
33727
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
33209
33728
|
type: "text",
|
|
@@ -33287,13 +33806,14 @@ function SelectDocument$2(_ref3) {
|
|
|
33287
33806
|
alignItems: "center",
|
|
33288
33807
|
justifyContent: "space-between"
|
|
33289
33808
|
}
|
|
33290
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
33809
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
33291
33810
|
style: {
|
|
33292
33811
|
margin: 0
|
|
33293
|
-
}
|
|
33294
|
-
|
|
33295
|
-
|
|
33296
|
-
|
|
33812
|
+
},
|
|
33813
|
+
label: (doc === null || doc === void 0 ? void 0 : doc.code) === "OWNER.APPLICANTPHOTO" ? !t("WS_UPLOAD_APPLICANT_PHOTO") || t("WS_UPLOAD_APPLICANT_PHOTO") === "WS_UPLOAD_APPLICANT_PHOTO" ? (doc === null || doc === void 0 ? void 0 : doc.description) || "Upload Applicant Photo" : t("WS_UPLOAD_APPLICANT_PHOTO") : t(`${doc === null || doc === void 0 ? void 0 : (_doc$i18nKey5 = doc.i18nKey) === null || _doc$i18nKey5 === void 0 ? void 0 : _doc$i18nKey5.replaceAll(".", "_")}_UPLOAD_DOCUMENT`),
|
|
33814
|
+
isMandatory: doc === null || doc === void 0 ? void 0 : doc.required,
|
|
33815
|
+
infoText: (doc === null || doc === void 0 ? void 0 : doc.code) === "OWNER.APPLICANTPHOTO" ? t("WS_UPLOAD_APPLICANT_PHOTO_INFO_MSG", "Upload recent passport size photo of applicant") : t(`${doc === null || doc === void 0 ? void 0 : (_doc$i18nKey6 = doc.i18nKey) === null || _doc$i18nKey6 === void 0 ? void 0 : _doc$i18nKey6.replaceAll(".", "_")}_UPLOAD_INFO_MSG`, `Upload ${t(`${doc === null || doc === void 0 ? void 0 : (_doc$i18nKey7 = doc.i18nKey) === null || _doc$i18nKey7 === void 0 ? void 0 : _doc$i18nKey7.replaceAll(".", "_")}_UPLOAD_DOCUMENT`)}`)
|
|
33816
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
33297
33817
|
style: {
|
|
33298
33818
|
fontSize: "12px",
|
|
33299
33819
|
color: "#555",
|
|
@@ -33495,11 +34015,14 @@ function SelectDocument$2(_ref3) {
|
|
|
33495
34015
|
gap: "8px",
|
|
33496
34016
|
gridColumn: "span 1"
|
|
33497
34017
|
}
|
|
33498
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
34018
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
33499
34019
|
style: {
|
|
33500
34020
|
margin: 0
|
|
33501
|
-
}
|
|
33502
|
-
|
|
34021
|
+
},
|
|
34022
|
+
label: !t("WS_CLICK_APPLICANT_PHOTO") || t("WS_CLICK_APPLICANT_PHOTO") === "WS_CLICK_APPLICANT_PHOTO" ? "Click Applicant Photo" : t("WS_CLICK_APPLICANT_PHOTO"),
|
|
34023
|
+
isMandatory: false,
|
|
34024
|
+
infoText: t("WS_CLICK_APPLICANT_PHOTO_INFO_MSG", "Click photo directly using device camera")
|
|
34025
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
33503
34026
|
style: {
|
|
33504
34027
|
display: "flex",
|
|
33505
34028
|
alignItems: "center",
|
|
@@ -39028,7 +39551,7 @@ const PlumberDetails$1 = _props => {
|
|
|
39028
39551
|
};
|
|
39029
39552
|
|
|
39030
39553
|
const WSBankDetails = _ref => {
|
|
39031
|
-
var _formData$WaterConnec4, _formData$WaterConnec5, _formData$WaterConnec6, _formData$WaterConnec0, _formData$WaterConnec1, _formData$WaterConnec10, _localFormState$touch, _errors$
|
|
39554
|
+
var _formData$WaterConnec4, _formData$WaterConnec5, _formData$WaterConnec6, _formData$WaterConnec0, _formData$WaterConnec1, _formData$WaterConnec10, _localFormState$touch, _errors$ifscCode, _errors$ifscCode2, _localFormState$touch2, _errors$bankName, _errors$bankName2, _localFormState$touch3, _errors$bankBranchNam, _errors$bankBranchNam2, _localFormState$touch4, _errors$accountNumber, _errors$accountNumber2;
|
|
39032
39555
|
let {
|
|
39033
39556
|
config,
|
|
39034
39557
|
onSelect,
|
|
@@ -39226,103 +39749,101 @@ const WSBankDetails = _ref => {
|
|
|
39226
39749
|
defaultOpen: true
|
|
39227
39750
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
39228
39751
|
className: "formcomposer-section-grid"
|
|
39229
|
-
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
39230
|
-
|
|
39231
|
-
|
|
39232
|
-
|
|
39233
|
-
|
|
39234
|
-
}, "*")), /*#__PURE__*/React__default.createElement("div", {
|
|
39752
|
+
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
39753
|
+
label: t("WS_IFSC_CODE"),
|
|
39754
|
+
isMandatory: true,
|
|
39755
|
+
infoText: t("WS_IFSC_CODE_INFO_MSG", "Enter 11-character IFSC code")
|
|
39756
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
39235
39757
|
className: "field"
|
|
39236
39758
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
39237
39759
|
control: control,
|
|
39238
|
-
name: "
|
|
39760
|
+
name: "ifscCode",
|
|
39239
39761
|
rules: {
|
|
39240
|
-
required: t("CORE_COMMON_REQUIRED_ERRMSG")
|
|
39762
|
+
required: t("CORE_COMMON_REQUIRED_ERRMSG"),
|
|
39763
|
+
pattern: {
|
|
39764
|
+
value: /^[A-Z]{4}0[A-Z0-9]{6}$/,
|
|
39765
|
+
message: t("ERR_INVALID_IFSC_CODE")
|
|
39766
|
+
}
|
|
39241
39767
|
},
|
|
39242
39768
|
render: props => /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
39243
39769
|
value: props.value,
|
|
39244
|
-
placeholder: t("
|
|
39770
|
+
placeholder: t("WS_IFSC_CODE_PLACEHOLDER"),
|
|
39245
39771
|
onChange: e => {
|
|
39246
|
-
|
|
39247
|
-
|
|
39772
|
+
let val = e.target.value.toUpperCase();
|
|
39773
|
+
if (val.length > 11) val = val.slice(0, 11);
|
|
39774
|
+
props.onChange(val);
|
|
39775
|
+
trigger("ifscCode");
|
|
39248
39776
|
},
|
|
39249
39777
|
onBlur: e => {
|
|
39250
39778
|
props.onBlur(e);
|
|
39251
|
-
trigger("
|
|
39779
|
+
trigger("ifscCode");
|
|
39252
39780
|
triggerParentSync();
|
|
39253
|
-
}
|
|
39781
|
+
},
|
|
39782
|
+
maxLength: 11
|
|
39254
39783
|
})
|
|
39255
|
-
}))), ((_localFormState$touch = localFormState.touched) !== null && _localFormState$touch !== void 0 && _localFormState$touch.
|
|
39784
|
+
}))), ((_localFormState$touch = localFormState.touched) !== null && _localFormState$touch !== void 0 && _localFormState$touch.ifscCode || localFormState.isSubmitted) && (errors !== null && errors !== void 0 && (_errors$ifscCode = errors.ifscCode) !== null && _errors$ifscCode !== void 0 && _errors$ifscCode.message || bankErrors !== null && bankErrors !== void 0 && bankErrors.ifscCode) ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
39256
39785
|
style: errorStyle
|
|
39257
|
-
}, " ", (errors === null || errors === void 0 ? void 0 : (_errors$
|
|
39258
|
-
|
|
39259
|
-
|
|
39260
|
-
|
|
39261
|
-
|
|
39262
|
-
}, "*")), /*#__PURE__*/React__default.createElement("div", {
|
|
39786
|
+
}, " ", (errors === null || errors === void 0 ? void 0 : (_errors$ifscCode2 = errors.ifscCode) === null || _errors$ifscCode2 === void 0 ? void 0 : _errors$ifscCode2.message) || (bankErrors === null || bankErrors === void 0 ? void 0 : bankErrors.ifscCode)) : null), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
39787
|
+
label: t("WS_NAME_OF_BANK"),
|
|
39788
|
+
isMandatory: true,
|
|
39789
|
+
infoText: t("WS_NAME_OF_BANK_INFO_MSG", "Bank Name fetched automatically from IFSC code")
|
|
39790
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
39263
39791
|
className: "field"
|
|
39264
39792
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
39265
39793
|
control: control,
|
|
39266
|
-
name: "
|
|
39794
|
+
name: "bankName",
|
|
39267
39795
|
rules: {
|
|
39268
39796
|
required: t("CORE_COMMON_REQUIRED_ERRMSG")
|
|
39269
39797
|
},
|
|
39270
39798
|
render: props => /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
39271
39799
|
value: props.value,
|
|
39272
|
-
placeholder: t("
|
|
39800
|
+
placeholder: t("WS_NAME_OF_BANK_PLACEHOLDER"),
|
|
39273
39801
|
onChange: e => {
|
|
39274
39802
|
props.onChange(e.target.value);
|
|
39275
|
-
trigger("
|
|
39803
|
+
trigger("bankName");
|
|
39276
39804
|
},
|
|
39277
39805
|
onBlur: e => {
|
|
39278
39806
|
props.onBlur(e);
|
|
39279
|
-
trigger("
|
|
39807
|
+
trigger("bankName");
|
|
39280
39808
|
triggerParentSync();
|
|
39281
|
-
}
|
|
39809
|
+
},
|
|
39810
|
+
disabled: true
|
|
39282
39811
|
})
|
|
39283
|
-
}))), ((_localFormState$touch2 = localFormState.touched) !== null && _localFormState$touch2 !== void 0 && _localFormState$touch2.
|
|
39812
|
+
}))), ((_localFormState$touch2 = localFormState.touched) !== null && _localFormState$touch2 !== void 0 && _localFormState$touch2.bankName || localFormState.isSubmitted) && (errors !== null && errors !== void 0 && (_errors$bankName = errors.bankName) !== null && _errors$bankName !== void 0 && _errors$bankName.message || bankErrors !== null && bankErrors !== void 0 && bankErrors.bankName) ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
39284
39813
|
style: errorStyle
|
|
39285
|
-
}, " ", (errors === null || errors === void 0 ? void 0 : (_errors$
|
|
39286
|
-
|
|
39287
|
-
|
|
39288
|
-
|
|
39289
|
-
|
|
39290
|
-
}, "*")), /*#__PURE__*/React__default.createElement("div", {
|
|
39814
|
+
}, " ", (errors === null || errors === void 0 ? void 0 : (_errors$bankName2 = errors.bankName) === null || _errors$bankName2 === void 0 ? void 0 : _errors$bankName2.message) || (bankErrors === null || bankErrors === void 0 ? void 0 : bankErrors.bankName)) : null), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
39815
|
+
label: t("WS_NAME_OF_BRANCH"),
|
|
39816
|
+
isMandatory: true,
|
|
39817
|
+
infoText: t("WS_NAME_OF_BRANCH_INFO_MSG", "Branch Name fetched automatically from IFSC code")
|
|
39818
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
39291
39819
|
className: "field"
|
|
39292
39820
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
39293
39821
|
control: control,
|
|
39294
|
-
name: "
|
|
39822
|
+
name: "bankBranchName",
|
|
39295
39823
|
rules: {
|
|
39296
|
-
required: t("CORE_COMMON_REQUIRED_ERRMSG")
|
|
39297
|
-
pattern: {
|
|
39298
|
-
value: /^[A-Z]{4}0[A-Z0-9]{6}$/,
|
|
39299
|
-
message: t("ERR_INVALID_IFSC_CODE")
|
|
39300
|
-
}
|
|
39824
|
+
required: t("CORE_COMMON_REQUIRED_ERRMSG")
|
|
39301
39825
|
},
|
|
39302
39826
|
render: props => /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
39303
39827
|
value: props.value,
|
|
39304
|
-
placeholder: t("
|
|
39828
|
+
placeholder: t("WS_NAME_OF_BRANCH_PLACEHOLDER"),
|
|
39305
39829
|
onChange: e => {
|
|
39306
|
-
|
|
39307
|
-
|
|
39308
|
-
props.onChange(val);
|
|
39309
|
-
trigger("ifscCode");
|
|
39830
|
+
props.onChange(e.target.value);
|
|
39831
|
+
trigger("bankBranchName");
|
|
39310
39832
|
},
|
|
39311
39833
|
onBlur: e => {
|
|
39312
39834
|
props.onBlur(e);
|
|
39313
|
-
trigger("
|
|
39835
|
+
trigger("bankBranchName");
|
|
39314
39836
|
triggerParentSync();
|
|
39315
39837
|
},
|
|
39316
|
-
|
|
39838
|
+
disabled: true
|
|
39317
39839
|
})
|
|
39318
|
-
}))), ((_localFormState$touch3 = localFormState.touched) !== null && _localFormState$touch3 !== void 0 && _localFormState$touch3.
|
|
39840
|
+
}))), ((_localFormState$touch3 = localFormState.touched) !== null && _localFormState$touch3 !== void 0 && _localFormState$touch3.bankBranchName || localFormState.isSubmitted) && (errors !== null && errors !== void 0 && (_errors$bankBranchNam = errors.bankBranchName) !== null && _errors$bankBranchNam !== void 0 && _errors$bankBranchNam.message || bankErrors !== null && bankErrors !== void 0 && bankErrors.bankBranchName) ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
39319
39841
|
style: errorStyle
|
|
39320
|
-
}, " ", (errors === null || errors === void 0 ? void 0 : (_errors$
|
|
39321
|
-
|
|
39322
|
-
|
|
39323
|
-
|
|
39324
|
-
|
|
39325
|
-
}, "*")), /*#__PURE__*/React__default.createElement("div", {
|
|
39842
|
+
}, " ", (errors === null || errors === void 0 ? void 0 : (_errors$bankBranchNam2 = errors.bankBranchName) === null || _errors$bankBranchNam2 === void 0 ? void 0 : _errors$bankBranchNam2.message) || (bankErrors === null || bankErrors === void 0 ? void 0 : bankErrors.bankBranchName)) : null), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
39843
|
+
label: t("WS_BANK_ACCOUNT_NO"),
|
|
39844
|
+
isMandatory: true,
|
|
39845
|
+
infoText: t("WS_BANK_ACCOUNT_NO_INFO_MSG", "Enter Bank Account Number")
|
|
39846
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
39326
39847
|
className: "field"
|
|
39327
39848
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
39328
39849
|
control: control,
|
|
@@ -39410,16 +39931,6 @@ const WSDeclaration = _ref => {
|
|
|
39410
39931
|
const [signatureFileStoreId, setSignatureFileStoreId] = React.useState(initialFsId);
|
|
39411
39932
|
const [localFile, setLocalFile] = React.useState(null);
|
|
39412
39933
|
const [signError, setSignError] = React.useState(null);
|
|
39413
|
-
const signSpecs = {
|
|
39414
|
-
maxSize: 50 * 1024,
|
|
39415
|
-
maxSizeText: "50KB",
|
|
39416
|
-
allowedExtensions: ["jpg", "jpeg"],
|
|
39417
|
-
allowedMimeTypes: ["image/jpeg", "image/jpg"],
|
|
39418
|
-
accept: "image/jpeg, .jpg, .jpeg",
|
|
39419
|
-
uiMessage: "Allowed format: JPEG | Max file size: 50KB",
|
|
39420
|
-
formatErrorMessage: "Only JPEG format (.jpg, .jpeg) is allowed for Signature",
|
|
39421
|
-
sizeErrorMessage: "Signature size should not exceed 50KB"
|
|
39422
|
-
};
|
|
39423
39934
|
const [signatureFile, setSignatureFile] = React.useState((formData === null || formData === void 0 ? void 0 : (_formData$declaration19 = formData.declarationData) === null || _formData$declaration19 === void 0 ? void 0 : _formData$declaration19.signatureFile) || (formData === null || formData === void 0 ? void 0 : (_formData$declaration20 = formData.declaration) === null || _formData$declaration20 === void 0 ? void 0 : _formData$declaration20.signatureFile) || (initialFsId ? {
|
|
39424
39935
|
fileStoreId: initialFsId,
|
|
39425
39936
|
fileName: initialFileName
|
|
@@ -39498,103 +40009,9 @@ const WSDeclaration = _ref => {
|
|
|
39498
40009
|
onSelect(config === null || config === void 0 ? void 0 : config.key, currentValues);
|
|
39499
40010
|
}
|
|
39500
40011
|
}, [formValue, signatureFileStoreId, signatureFile, config === null || config === void 0 ? void 0 : config.key, onSelect]);
|
|
39501
|
-
const onUploadSignature = function (e) {
|
|
39502
|
-
try {
|
|
39503
|
-
var _e$target$files;
|
|
39504
|
-
setSignError(null);
|
|
39505
|
-
const file = (_e$target$files = e.target.files) === null || _e$target$files === void 0 ? void 0 : _e$target$files[0];
|
|
39506
|
-
return Promise.resolve(function () {
|
|
39507
|
-
if (file) {
|
|
39508
|
-
const ext = (file.name || "").split(".").pop().toLowerCase();
|
|
39509
|
-
const isExtAllowed = signSpecs.allowedExtensions.includes(ext);
|
|
39510
|
-
const isMimeAllowed = signSpecs.allowedMimeTypes.includes(file.type);
|
|
39511
|
-
if (!isExtAllowed && !isMimeAllowed) {
|
|
39512
|
-
setSignError(t("WS_SIGNATURE_ONLY_JPEG") || signSpecs.formatErrorMessage);
|
|
39513
|
-
if (e.target) e.target.value = "";
|
|
39514
|
-
return;
|
|
39515
|
-
}
|
|
39516
|
-
if (file.size > signSpecs.maxSize) {
|
|
39517
|
-
setSignError(t("WS_SIGNATURE_MAX_SIZE_EXCEEDED") || signSpecs.sizeErrorMessage);
|
|
39518
|
-
if (e.target) e.target.value = "";
|
|
39519
|
-
return;
|
|
39520
|
-
}
|
|
39521
|
-
setLocalFile(file);
|
|
39522
|
-
const _temp = _catch(function () {
|
|
39523
|
-
return Promise.resolve(Digit.UploadServices.Filestorage("WS", file, Digit.ULBService.getStateId())).then(function (response) {
|
|
39524
|
-
var _response$data, _response$data$files;
|
|
39525
|
-
if ((response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$files = _response$data.files) === null || _response$data$files === void 0 ? void 0 : _response$data$files.length) > 0) {
|
|
39526
|
-
var _response$data2, _response$data2$files;
|
|
39527
|
-
const fsId = response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$files = _response$data2.files[0]) === null || _response$data2$files === void 0 ? void 0 : _response$data2$files.fileStoreId;
|
|
39528
|
-
const sigObj = {
|
|
39529
|
-
fileStoreId: fsId,
|
|
39530
|
-
fileName: file.name
|
|
39531
|
-
};
|
|
39532
|
-
setSignatureFileStoreId(fsId);
|
|
39533
|
-
setSignatureFile(sigObj);
|
|
39534
|
-
setValue("signatureFileStoreId", fsId, {
|
|
39535
|
-
shouldDirty: true,
|
|
39536
|
-
shouldValidate: true
|
|
39537
|
-
});
|
|
39538
|
-
setValue("signatureFile", sigObj, {
|
|
39539
|
-
shouldDirty: true,
|
|
39540
|
-
shouldValidate: true
|
|
39541
|
-
});
|
|
39542
|
-
setValue("signatureFileName", file.name, {
|
|
39543
|
-
shouldDirty: true,
|
|
39544
|
-
shouldValidate: true
|
|
39545
|
-
});
|
|
39546
|
-
} else {
|
|
39547
|
-
setSignError(t("CS_FILE_UPLOAD_ERROR") || "File upload failed");
|
|
39548
|
-
setLocalFile(null);
|
|
39549
|
-
}
|
|
39550
|
-
});
|
|
39551
|
-
}, function (err) {
|
|
39552
|
-
console.error("Signature upload failed", err);
|
|
39553
|
-
setSignError(t("CS_FILE_UPLOAD_ERROR") || "File upload failed");
|
|
39554
|
-
setLocalFile(null);
|
|
39555
|
-
});
|
|
39556
|
-
if (_temp && _temp.then) return _temp.then(function () {});
|
|
39557
|
-
}
|
|
39558
|
-
}());
|
|
39559
|
-
} catch (e) {
|
|
39560
|
-
return Promise.reject(e);
|
|
39561
|
-
}
|
|
39562
|
-
};
|
|
39563
40012
|
const [showDocModal, setShowDocModal] = React.useState(false);
|
|
39564
40013
|
const [docFileUrl, setDocFileUrl] = React.useState("");
|
|
39565
40014
|
const [docFileType, setDocFileType] = React.useState("");
|
|
39566
|
-
const viewDocument = function () {
|
|
39567
|
-
try {
|
|
39568
|
-
const _temp3 = function () {
|
|
39569
|
-
if (signatureFileStoreId) {
|
|
39570
|
-
const _temp2 = _catch(function () {
|
|
39571
|
-
return Promise.resolve(Digit.UploadServices.FileFetchbyid(signatureFileStoreId, Digit.ULBService.getStateId())).then(function (res) {
|
|
39572
|
-
if (res !== null && res !== void 0 && res.data) {
|
|
39573
|
-
const blob = res.data instanceof Blob ? res.data : new Blob([res.data], {
|
|
39574
|
-
type: res.headers["content-type"] || res.headers["Content-Type"] || "image/jpeg"
|
|
39575
|
-
});
|
|
39576
|
-
const fileURL = URL.createObjectURL(blob);
|
|
39577
|
-
setDocFileUrl(fileURL);
|
|
39578
|
-
const contentType = res.headers["content-type"] || res.headers["Content-Type"] || "";
|
|
39579
|
-
if (contentType.toLowerCase().includes("pdf")) {
|
|
39580
|
-
setDocFileType("pdf");
|
|
39581
|
-
} else {
|
|
39582
|
-
setDocFileType("image");
|
|
39583
|
-
}
|
|
39584
|
-
setShowDocModal(true);
|
|
39585
|
-
}
|
|
39586
|
-
});
|
|
39587
|
-
}, function (err) {
|
|
39588
|
-
console.error("Failed to fetch file URL via FileFetchbyid", err);
|
|
39589
|
-
});
|
|
39590
|
-
if (_temp2 && _temp2.then) return _temp2.then(function () {});
|
|
39591
|
-
}
|
|
39592
|
-
}();
|
|
39593
|
-
return Promise.resolve(_temp3 && _temp3.then ? _temp3.then(function () {}) : void 0);
|
|
39594
|
-
} catch (e) {
|
|
39595
|
-
return Promise.reject(e);
|
|
39596
|
-
}
|
|
39597
|
-
};
|
|
39598
40015
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CollapsibleCardPage, {
|
|
39599
40016
|
title: t("WS_DECLARATION"),
|
|
39600
40017
|
defaultOpen: true
|
|
@@ -39637,105 +40054,7 @@ const WSDeclaration = _ref => {
|
|
|
39637
40054
|
})
|
|
39638
40055
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
39639
40056
|
className: "formcomposer-section-grid"
|
|
39640
|
-
},
|
|
39641
|
-
style: {
|
|
39642
|
-
margin: 0
|
|
39643
|
-
}
|
|
39644
|
-
}, t("WS_UPLOAD_SIGNATURE_FILE") || "Upload Signature", " ", /*#__PURE__*/React__default.createElement("span", {
|
|
39645
|
-
style: {
|
|
39646
|
-
color: "red"
|
|
39647
|
-
}
|
|
39648
|
-
}, "*")), /*#__PURE__*/React__default.createElement("div", {
|
|
39649
|
-
style: {
|
|
39650
|
-
fontSize: "12px",
|
|
39651
|
-
color: "#555",
|
|
39652
|
-
marginTop: "2px",
|
|
39653
|
-
marginBottom: "4px"
|
|
39654
|
-
}
|
|
39655
|
-
}, signSpecs.uiMessage)), /*#__PURE__*/React__default.createElement("div", {
|
|
39656
|
-
className: "field",
|
|
39657
|
-
style: {
|
|
39658
|
-
display: "flex",
|
|
39659
|
-
flexDirection: "column",
|
|
39660
|
-
gap: "6px"
|
|
39661
|
-
}
|
|
39662
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
39663
|
-
style: {
|
|
39664
|
-
display: "flex",
|
|
39665
|
-
gap: "10px",
|
|
39666
|
-
alignItems: "center",
|
|
39667
|
-
width: "100%"
|
|
39668
|
-
}
|
|
39669
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
39670
|
-
style: {
|
|
39671
|
-
flex: 1
|
|
39672
|
-
}
|
|
39673
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.UploadFile, {
|
|
39674
|
-
onUpload: onUploadSignature,
|
|
39675
|
-
onDelete: () => {
|
|
39676
|
-
setLocalFile(null);
|
|
39677
|
-
setSignatureFile(null);
|
|
39678
|
-
setSignatureFileStoreId(null);
|
|
39679
|
-
setSignError(null);
|
|
39680
|
-
setValue("signatureFile", null, {
|
|
39681
|
-
shouldDirty: true,
|
|
39682
|
-
shouldValidate: true
|
|
39683
|
-
});
|
|
39684
|
-
setValue("signatureFileStoreId", null, {
|
|
39685
|
-
shouldDirty: true,
|
|
39686
|
-
shouldValidate: true
|
|
39687
|
-
});
|
|
39688
|
-
setValue("signatureFileName", "", {
|
|
39689
|
-
shouldDirty: true,
|
|
39690
|
-
shouldValidate: true
|
|
39691
|
-
});
|
|
39692
|
-
},
|
|
39693
|
-
id: "ws-declaration-signature",
|
|
39694
|
-
message: signatureFileStoreId ? `1 ${t(`CS_ACTION_FILEUPLOADED`)}` : t(`CS_ACTION_NO_FILEUPLOADED`),
|
|
39695
|
-
textStyles: {
|
|
39696
|
-
width: "100%"
|
|
39697
|
-
},
|
|
39698
|
-
buttonType: "button",
|
|
39699
|
-
accept: signSpecs.accept,
|
|
39700
|
-
uploadedFiles: signatureFileStoreId && !localFile ? [[(formValue === null || formValue === void 0 ? void 0 : formValue.signatureFileName) || (signatureFile === null || signatureFile === void 0 ? void 0 : signatureFile.fileName) || (signatureFile === null || signatureFile === void 0 ? void 0 : signatureFile.name) || "signature.jpg", {
|
|
39701
|
-
fileStoreId: signatureFileStoreId
|
|
39702
|
-
}]] : undefined,
|
|
39703
|
-
removeTargetedFile: () => {
|
|
39704
|
-
setLocalFile(null);
|
|
39705
|
-
setSignatureFile(null);
|
|
39706
|
-
setSignatureFileStoreId(null);
|
|
39707
|
-
setSignError(null);
|
|
39708
|
-
setValue("signatureFile", null, {
|
|
39709
|
-
shouldDirty: true,
|
|
39710
|
-
shouldValidate: true
|
|
39711
|
-
});
|
|
39712
|
-
setValue("signatureFileStoreId", null, {
|
|
39713
|
-
shouldDirty: true,
|
|
39714
|
-
shouldValidate: true
|
|
39715
|
-
});
|
|
39716
|
-
setValue("signatureFileName", "", {
|
|
39717
|
-
shouldDirty: true,
|
|
39718
|
-
shouldValidate: true
|
|
39719
|
-
});
|
|
39720
|
-
}
|
|
39721
|
-
})), signatureFileStoreId && /*#__PURE__*/React__default.createElement("div", {
|
|
39722
|
-
onClick: viewDocument,
|
|
39723
|
-
style: {
|
|
39724
|
-
cursor: "pointer"
|
|
39725
|
-
}
|
|
39726
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.ViewsIcon, null))), signError && /*#__PURE__*/React__default.createElement("div", {
|
|
39727
|
-
style: {
|
|
39728
|
-
fontSize: "12px",
|
|
39729
|
-
color: "#d32f2f",
|
|
39730
|
-
marginTop: "4px"
|
|
39731
|
-
}
|
|
39732
|
-
}, signError), !signatureFileStoreId && (formValue === null || formValue === void 0 ? void 0 : formValue.agree) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
39733
|
-
style: {
|
|
39734
|
-
color: "red",
|
|
39735
|
-
fontSize: "12px",
|
|
39736
|
-
marginTop: "4px"
|
|
39737
|
-
}
|
|
39738
|
-
}, t("WS_SIGNATURE_MANDATORY_ERROR") || "Signature is mandatory to submit application")))))), showDocModal && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Modal, {
|
|
40057
|
+
})), showDocModal && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Modal, {
|
|
39739
40058
|
open: showDocModal,
|
|
39740
40059
|
headerBarMain: t("WS_VIEW_DOCUMENT") || "View Document",
|
|
39741
40060
|
headerBarEnd: /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -39941,7 +40260,11 @@ const WSDjbEmployee = _ref => {
|
|
|
39941
40260
|
defaultOpen: true
|
|
39942
40261
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
39943
40262
|
className: "formcomposer-section-grid"
|
|
39944
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
40263
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
40264
|
+
label: t("Are you a DJB Employee?"),
|
|
40265
|
+
isMandatory: false,
|
|
40266
|
+
infoText: t("WS_DJB_EMPLOYEE_INFO_MSG", "Select Yes if applicant is an active or retired DJB Employee")
|
|
40267
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
39945
40268
|
className: "field"
|
|
39946
40269
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
39947
40270
|
control: control,
|
|
@@ -39974,9 +40297,11 @@ const WSDjbEmployee = _ref => {
|
|
|
39974
40297
|
})
|
|
39975
40298
|
})))), isDjbEmployee && /*#__PURE__*/React__default.createElement("div", {
|
|
39976
40299
|
className: "formcomposer-section-grid"
|
|
39977
|
-
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
39978
|
-
|
|
39979
|
-
|
|
40300
|
+
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
40301
|
+
label: t("Employee ID"),
|
|
40302
|
+
isMandatory: isDjbEmployee,
|
|
40303
|
+
infoText: t("WS_EMPLOYEE_ID_INFO_MSG", "Enter 8-digit DJB Employee ID")
|
|
40304
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
39980
40305
|
className: "field",
|
|
39981
40306
|
style: {
|
|
39982
40307
|
width: "100%"
|
|
@@ -40014,9 +40339,11 @@ const WSDjbEmployee = _ref => {
|
|
|
40014
40339
|
})
|
|
40015
40340
|
}), (localFormState === null || localFormState === void 0 ? void 0 : (_localFormState$touch = localFormState.touched) === null || _localFormState$touch === void 0 ? void 0 : _localFormState$touch.employeeId) && (localFormState !== null && localFormState !== void 0 && (_localFormState$error = localFormState.errors) !== null && _localFormState$error !== void 0 && (_localFormState$error2 = _localFormState$error.employeeId) !== null && _localFormState$error2 !== void 0 && _localFormState$error2.message || djbErrors !== null && djbErrors !== void 0 && djbErrors.employeeId ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
40016
40341
|
style: errorStyle
|
|
40017
|
-
}, (localFormState === null || localFormState === void 0 ? void 0 : (_localFormState$error3 = localFormState.errors) === null || _localFormState$error3 === void 0 ? void 0 : (_localFormState$error4 = _localFormState$error3.employeeId) === null || _localFormState$error4 === void 0 ? void 0 : _localFormState$error4.message) || (djbErrors === null || djbErrors === void 0 ? void 0 : djbErrors.employeeId)) : null)))), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
40018
|
-
|
|
40019
|
-
|
|
40342
|
+
}, (localFormState === null || localFormState === void 0 ? void 0 : (_localFormState$error3 = localFormState.errors) === null || _localFormState$error3 === void 0 ? void 0 : (_localFormState$error4 = _localFormState$error3.employeeId) === null || _localFormState$error4 === void 0 ? void 0 : _localFormState$error4.message) || (djbErrors === null || djbErrors === void 0 ? void 0 : djbErrors.employeeId)) : null)))), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
40343
|
+
label: t("Date of Retirement"),
|
|
40344
|
+
isMandatory: isDjbEmployee,
|
|
40345
|
+
infoText: t("WS_DOR_INFO_MSG", "Select Date of Retirement")
|
|
40346
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
40020
40347
|
className: "field"
|
|
40021
40348
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
40022
40349
|
control: control,
|
|
@@ -40028,9 +40355,11 @@ const WSDjbEmployee = _ref => {
|
|
|
40028
40355
|
date: props.value,
|
|
40029
40356
|
onChange: date => props.onChange(date)
|
|
40030
40357
|
})
|
|
40031
|
-
})))), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
40032
|
-
|
|
40033
|
-
|
|
40358
|
+
})))), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
40359
|
+
label: t("Employee Designation"),
|
|
40360
|
+
isMandatory: isDjbEmployee,
|
|
40361
|
+
infoText: t("WS_EMPLOYEE_DESIGNATION_INFO_MSG", "Enter Employee Designation")
|
|
40362
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
40034
40363
|
className: "field",
|
|
40035
40364
|
style: {
|
|
40036
40365
|
width: "100%"
|
|
@@ -40237,7 +40566,11 @@ const WSDivyangjan = _ref => {
|
|
|
40237
40566
|
defaultOpen: true
|
|
40238
40567
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
40239
40568
|
className: "formcomposer-section-grid"
|
|
40240
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
40569
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
40570
|
+
label: t("Are you a Divyangjan/Person with Disability?"),
|
|
40571
|
+
isMandatory: false,
|
|
40572
|
+
infoText: t("WS_DIVYANGJAN_INFO_MSG", "Select Yes if applicant is a Divyangjan / Person with Disability")
|
|
40573
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
40241
40574
|
className: "field"
|
|
40242
40575
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
40243
40576
|
control: control,
|
|
@@ -40354,7 +40687,11 @@ const WSRainWaterHarvesting = _ref => {
|
|
|
40354
40687
|
defaultOpen: true
|
|
40355
40688
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
40356
40689
|
className: "formcomposer-section-grid"
|
|
40357
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
40690
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
40691
|
+
label: t("Rain Water Harvesting Certificate"),
|
|
40692
|
+
isMandatory: false,
|
|
40693
|
+
infoText: t("WS_RWH_INFO_MSG", "Select Yes if Rain Water Harvesting Certificate is available")
|
|
40694
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
40358
40695
|
className: "field"
|
|
40359
40696
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
40360
40697
|
control: control,
|
|
@@ -40482,7 +40819,11 @@ const WSSewerTreatmentPlant = _ref => {
|
|
|
40482
40819
|
defaultOpen: true
|
|
40483
40820
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
40484
40821
|
className: "formcomposer-section-grid"
|
|
40485
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
40822
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
40823
|
+
label: t("Sewer Treatment Plant (STP)"),
|
|
40824
|
+
isMandatory: false,
|
|
40825
|
+
infoText: t("WS_STP_INFO_MSG", "Select Yes if Sewer Treatment Plant is available")
|
|
40826
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
40486
40827
|
className: "field"
|
|
40487
40828
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
40488
40829
|
control: control,
|
|
@@ -40620,8 +40961,8 @@ const PropertyWaterConnection = _ref => {
|
|
|
40620
40961
|
}
|
|
40621
40962
|
}, [showToast]);
|
|
40622
40963
|
const getPlotAreaError = () => {
|
|
40623
|
-
const trans = t("WS_PLOT_AREA_MORE_THAN_BUILT_UP_AREA");
|
|
40624
|
-
return trans && trans !== "WS_PLOT_AREA_MORE_THAN_BUILT_UP_AREA" ? trans : "Plot area should always be more than built up area.";
|
|
40964
|
+
const trans = t("WS_PLOT_AREA_MORE_THAN_OR_EQUAL_BUILT_UP_AREA") || t("WS_PLOT_AREA_MORE_THAN_BUILT_UP_AREA");
|
|
40965
|
+
return trans && trans !== "WS_PLOT_AREA_MORE_THAN_OR_EQUAL_BUILT_UP_AREA" && trans !== "WS_PLOT_AREA_MORE_THAN_BUILT_UP_AREA" ? trans : "Plot area should always be more than or equal to built up area.";
|
|
40625
40966
|
};
|
|
40626
40967
|
const getHeightErrorMessage = () => {
|
|
40627
40968
|
const trans = t("WS_HEIGHT_OF_BUILDING_NORMAL_ERROR");
|
|
@@ -40632,7 +40973,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
40632
40973
|
const plot = parseFloat(watchPlotArea);
|
|
40633
40974
|
const built = parseFloat(watchBuiltUpArea);
|
|
40634
40975
|
if (!isNaN(plot) && !isNaN(built)) {
|
|
40635
|
-
return plot
|
|
40976
|
+
return plot < built;
|
|
40636
40977
|
}
|
|
40637
40978
|
return false;
|
|
40638
40979
|
}, [watchPlotArea, watchBuiltUpArea]);
|
|
@@ -40647,7 +40988,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
40647
40988
|
const handleAreaBlur = () => {
|
|
40648
40989
|
const plot = parseFloat(watchPlotArea);
|
|
40649
40990
|
const built = parseFloat(watchBuiltUpArea);
|
|
40650
|
-
if (!isNaN(plot) && !isNaN(built) && plot
|
|
40991
|
+
if (!isNaN(plot) && !isNaN(built) && plot < built) {
|
|
40651
40992
|
setShowToast({
|
|
40652
40993
|
key: true,
|
|
40653
40994
|
label: getPlotAreaError()
|
|
@@ -41037,9 +41378,11 @@ const PropertyWaterConnection = _ref => {
|
|
|
41037
41378
|
style: props.style
|
|
41038
41379
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
41039
41380
|
className: "formcomposer-section-grid"
|
|
41040
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
41041
|
-
|
|
41042
|
-
|
|
41381
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
41382
|
+
label: t("WS_PROPERTY_TYPE"),
|
|
41383
|
+
isMandatory: true,
|
|
41384
|
+
infoText: t("WS_PROPERTY_TYPE_INFO_MSG", "Select Property Type")
|
|
41385
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
41043
41386
|
className: "form-field"
|
|
41044
41387
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
41045
41388
|
control: control,
|
|
@@ -41084,7 +41427,11 @@ const PropertyWaterConnection = _ref => {
|
|
|
41084
41427
|
placeholder: "Enter Answer",
|
|
41085
41428
|
onChange: e => handleAnswerChange(index, questionText, e.target.value)
|
|
41086
41429
|
})));
|
|
41087
|
-
}), isSchoolCollegeProperty ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
41430
|
+
}), isSchoolCollegeProperty ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
41431
|
+
label: t("WS_NUMBER_OF_STUDENTS"),
|
|
41432
|
+
isMandatory: false,
|
|
41433
|
+
infoText: t("WS_NUMBER_OF_STUDENTS_INFO_MSG", "Enter Number of Students")
|
|
41434
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
41088
41435
|
className: "form-field"
|
|
41089
41436
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
41090
41437
|
t: t,
|
|
@@ -41099,9 +41446,11 @@ const PropertyWaterConnection = _ref => {
|
|
|
41099
41446
|
placeholder: t("WS_NUMBER_OF_STUDENTS")
|
|
41100
41447
|
}))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails2 = errors.useDetails) === null || _errors$useDetails2 === void 0 ? void 0 : _errors$useDetails2.numberOfStudents) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
41101
41448
|
style: errorStyle
|
|
41102
|
-
}, errors.useDetails.numberOfStudents.message)) : null, isHotelRestaurantProperty ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
41103
|
-
|
|
41104
|
-
|
|
41449
|
+
}, errors.useDetails.numberOfStudents.message)) : null, isHotelRestaurantProperty ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
41450
|
+
label: t("WS_NUMBER_OF_ROOMS"),
|
|
41451
|
+
isMandatory: true,
|
|
41452
|
+
infoText: t("WS_NUMBER_OF_ROOMS_INFO_MSG", "Enter Number of Rooms")
|
|
41453
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
41105
41454
|
className: "form-field"
|
|
41106
41455
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
41107
41456
|
t: t,
|
|
@@ -41117,9 +41466,11 @@ const PropertyWaterConnection = _ref => {
|
|
|
41117
41466
|
placeholder: t("WS_NUMBER_OF_ROOMS")
|
|
41118
41467
|
}))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails3 = errors.useDetails) === null || _errors$useDetails3 === void 0 ? void 0 : _errors$useDetails3.NumberofRooms) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
41119
41468
|
style: errorStyle
|
|
41120
|
-
}, errors.useDetails.NumberofRooms.message)) : null, isHospitalProperty ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
41121
|
-
|
|
41122
|
-
|
|
41469
|
+
}, errors.useDetails.NumberofRooms.message)) : null, isHospitalProperty ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
41470
|
+
label: t("WS_NUMBER_OF_BEDS"),
|
|
41471
|
+
isMandatory: true,
|
|
41472
|
+
infoText: t("WS_NUMBER_OF_BEDS_INFO_MSG", "Enter Number of Beds")
|
|
41473
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
41123
41474
|
className: "form-field"
|
|
41124
41475
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
41125
41476
|
t: t,
|
|
@@ -41135,9 +41486,11 @@ const PropertyWaterConnection = _ref => {
|
|
|
41135
41486
|
placeholder: t("WS_NUMBER_OF_BEDS")
|
|
41136
41487
|
}))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails4 = errors.useDetails) === null || _errors$useDetails4 === void 0 ? void 0 : _errors$useDetails4.numberOfBeds) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
41137
41488
|
style: errorStyle
|
|
41138
|
-
}, errors.useDetails.numberOfBeds.message)) : null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
41139
|
-
|
|
41140
|
-
|
|
41489
|
+
}, errors.useDetails.numberOfBeds.message)) : null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
41490
|
+
label: t("WS_CATEGORY_TYPE"),
|
|
41491
|
+
isMandatory: true,
|
|
41492
|
+
infoText: t("WS_CATEGORY_TYPE_INFO_MSG", "Select Category Type")
|
|
41493
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
41141
41494
|
className: "form-field"
|
|
41142
41495
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
41143
41496
|
control: control,
|
|
@@ -41157,9 +41510,11 @@ const PropertyWaterConnection = _ref => {
|
|
|
41157
41510
|
})
|
|
41158
41511
|
}))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails5 = errors.useDetails) === null || _errors$useDetails5 === void 0 ? void 0 : _errors$useDetails5.categoryType) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
41159
41512
|
style: errorStyle
|
|
41160
|
-
}, errors.useDetails.categoryType.message), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
41161
|
-
|
|
41162
|
-
|
|
41513
|
+
}, errors.useDetails.categoryType.message), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
41514
|
+
label: t("WS_PROPERTY_CATEGORY"),
|
|
41515
|
+
isMandatory: true,
|
|
41516
|
+
infoText: t("WS_PROPERTY_CATEGORY_INFO_MSG", "Select Property Category")
|
|
41517
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
41163
41518
|
className: "form-field"
|
|
41164
41519
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
41165
41520
|
control: control,
|
|
@@ -41179,9 +41534,11 @@ const PropertyWaterConnection = _ref => {
|
|
|
41179
41534
|
})
|
|
41180
41535
|
}))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails6 = errors.useDetails) === null || _errors$useDetails6 === void 0 ? void 0 : _errors$useDetails6.propertyCategory) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
41181
41536
|
style: errorStyle
|
|
41182
|
-
}, errors.useDetails.propertyCategory.message), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
41183
|
-
|
|
41184
|
-
|
|
41537
|
+
}, errors.useDetails.propertyCategory.message), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
41538
|
+
label: t("WS_WATER_CONNECTION_USAGE_TYPE"),
|
|
41539
|
+
isMandatory: true,
|
|
41540
|
+
infoText: t("WS_WATER_CONNECTION_USAGE_TYPE_INFO_MSG", "Select Water Connection Usage Type")
|
|
41541
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
41185
41542
|
className: "form-field"
|
|
41186
41543
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
41187
41544
|
control: control,
|
|
@@ -41201,9 +41558,11 @@ const PropertyWaterConnection = _ref => {
|
|
|
41201
41558
|
})
|
|
41202
41559
|
}))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails7 = errors.useDetails) === null || _errors$useDetails7 === void 0 ? void 0 : _errors$useDetails7.WaterConnectionUsageType) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
41203
41560
|
style: errorStyle
|
|
41204
|
-
}, errors.useDetails.WaterConnectionUsageType.message), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
41205
|
-
|
|
41206
|
-
|
|
41561
|
+
}, errors.useDetails.WaterConnectionUsageType.message), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
41562
|
+
label: t("WS_PLOT_AREA"),
|
|
41563
|
+
isMandatory: true,
|
|
41564
|
+
infoText: t("WS_PLOT_AREA_INFO_MSG", "Enter Plot Area (sq. meter.)")
|
|
41565
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
41207
41566
|
className: "form-field"
|
|
41208
41567
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
41209
41568
|
t: t,
|
|
@@ -41235,9 +41594,11 @@ const PropertyWaterConnection = _ref => {
|
|
|
41235
41594
|
color: "#d4351c",
|
|
41236
41595
|
marginTop: "4px"
|
|
41237
41596
|
}
|
|
41238
|
-
}, errors.useDetails.plotArea.message))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
41239
|
-
|
|
41240
|
-
|
|
41597
|
+
}, errors.useDetails.plotArea.message))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
41598
|
+
label: t("WS_BUILT_UP_AREA"),
|
|
41599
|
+
isMandatory: true,
|
|
41600
|
+
infoText: t("WS_BUILT_UP_AREA_INFO_MSG", "Enter Built-up Area (sq. meter.)")
|
|
41601
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
41241
41602
|
className: "form-field"
|
|
41242
41603
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
41243
41604
|
t: t,
|
|
@@ -41275,9 +41636,11 @@ const PropertyWaterConnection = _ref => {
|
|
|
41275
41636
|
color: "#d4351c",
|
|
41276
41637
|
marginTop: "4px"
|
|
41277
41638
|
}
|
|
41278
|
-
}, getPlotAreaError()) : null)), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
41279
|
-
|
|
41280
|
-
|
|
41639
|
+
}, getPlotAreaError()) : null)), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
41640
|
+
label: t("WS_HEIGHT_OF_THE_BUILDING(meters)"),
|
|
41641
|
+
isMandatory: true,
|
|
41642
|
+
infoText: t("WS_HEIGHT_OF_THE_BUILDING_INFO_MSG", "Enter Height of The Building (meter)")
|
|
41643
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
41281
41644
|
className: "form-field"
|
|
41282
41645
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
41283
41646
|
t: t,
|
|
@@ -41316,7 +41679,11 @@ const PropertyWaterConnection = _ref => {
|
|
|
41316
41679
|
color: "#d4351c",
|
|
41317
41680
|
marginTop: "4px"
|
|
41318
41681
|
}
|
|
41319
|
-
}, getHeightErrorMessage()) : null)), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
41682
|
+
}, getHeightErrorMessage()) : null)), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
41683
|
+
label: t("WS_SELECT_YEAR_OF_CONSTRUCTION"),
|
|
41684
|
+
isMandatory: false,
|
|
41685
|
+
infoText: t("WS_SELECT_YEAR_OF_CONSTRUCTION_INFO_MSG", "Select Year of Construction")
|
|
41686
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
41320
41687
|
className: "form-field"
|
|
41321
41688
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
41322
41689
|
control: control,
|
|
@@ -41333,9 +41700,11 @@ const PropertyWaterConnection = _ref => {
|
|
|
41333
41700
|
})
|
|
41334
41701
|
}))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails1 = errors.useDetails) === null || _errors$useDetails1 === void 0 ? void 0 : _errors$useDetails1.SelectYearofConstruction) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
41335
41702
|
style: errorStyle
|
|
41336
|
-
}, errors.useDetails.SelectYearofConstruction.message), isDwellingUnit ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
41337
|
-
|
|
41338
|
-
|
|
41703
|
+
}, errors.useDetails.SelectYearofConstruction.message), isDwellingUnit ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FieldLabelWithTooltip, {
|
|
41704
|
+
label: t("WS_NUMBER_OF_DWELLING_UNITS"),
|
|
41705
|
+
isMandatory: true,
|
|
41706
|
+
infoText: t("WS_NUMBER_OF_DWELLING_UNITS_INFO_MSG", "Enter Number of Dwelling Units")
|
|
41707
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
41339
41708
|
className: "form-field"
|
|
41340
41709
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
41341
41710
|
t: t,
|
|
@@ -48991,7 +49360,23 @@ const WSApplicationDetails = () => {
|
|
|
48991
49360
|
} = Digit.Hooks.ws.useWSDetailsPage(t, tenantId, applicationNobyData, applicationNobyData !== null && applicationNobyData !== void 0 && applicationNobyData.includes("SW") ? "SEWERAGE" : "WATER", user);
|
|
48992
49361
|
const feeEstimationSection = appDetailsData === null || appDetailsData === void 0 ? void 0 : (_appDetailsData$appli = appDetailsData.applicationDetails) === null || _appDetailsData$appli === void 0 ? void 0 : _appDetailsData$appli.find(section => (section === null || section === void 0 ? void 0 : section.title) === "WS_TASK_DETAILS_FEE_ESTIMATE");
|
|
48993
49362
|
if (feeEstimationSection && feeEstimationSection.additionalDetails) {
|
|
48994
|
-
|
|
49363
|
+
var _feeEstimationSection, _feeEstimationSection2, _feeEstimationSection3, _feeEstimationSection4, _feeEstimationSection5, _feeEstimationSection6, _feeEstimationSection7;
|
|
49364
|
+
const isPropUpdated = Boolean(feeEstimationSection.additionalDetails.isPropUpdated || feeEstimationSection.additionalDetails.hasAdditionalInfraCharge || ((_feeEstimationSection = feeEstimationSection.additionalDetails.values) === null || _feeEstimationSection === void 0 ? void 0 : _feeEstimationSection.some(v => (v === null || v === void 0 ? void 0 : v.title) === "WS_ADDITIONAL_INFRASTRUCTURE_CHARGE" || (v === null || v === void 0 ? void 0 : v.taxHeadCode) === "WS_ADDITIONAL_INFRASTRUCTURE_CHARGE")) || ((_feeEstimationSection2 = feeEstimationSection.additionalDetails.data) === null || _feeEstimationSection2 === void 0 ? void 0 : (_feeEstimationSection3 = _feeEstimationSection2.taxHeadEstimates) === null || _feeEstimationSection3 === void 0 ? void 0 : _feeEstimationSection3.some(t => (t === null || t === void 0 ? void 0 : t.taxHeadCode) === "WS_ADDITIONAL_INFRASTRUCTURE_CHARGE")) || ((_feeEstimationSection4 = feeEstimationSection.additionalDetails.data) === null || _feeEstimationSection4 === void 0 ? void 0 : (_feeEstimationSection5 = _feeEstimationSection4.billDetails) === null || _feeEstimationSection5 === void 0 ? void 0 : (_feeEstimationSection6 = _feeEstimationSection5[0]) === null || _feeEstimationSection6 === void 0 ? void 0 : (_feeEstimationSection7 = _feeEstimationSection6.billAccountDetails) === null || _feeEstimationSection7 === void 0 ? void 0 : _feeEstimationSection7.some(t => (t === null || t === void 0 ? void 0 : t.taxHeadCode) === "WS_ADDITIONAL_INFRASTRUCTURE_CHARGE")));
|
|
49365
|
+
if (isPropUpdated) {
|
|
49366
|
+
var _feeEstimationSection8, _feeEstimationSection9, _feeEstimationSection0;
|
|
49367
|
+
const hasUnpaid = feeEstimationSection.additionalDetails.hasUnpaidCharge !== undefined ? feeEstimationSection.additionalDetails.hasUnpaidCharge : ((_feeEstimationSection8 = feeEstimationSection.additionalDetails.data) === null || _feeEstimationSection8 === void 0 ? void 0 : (_feeEstimationSection9 = _feeEstimationSection8.taxHeadEstimates) === null || _feeEstimationSection9 === void 0 ? void 0 : _feeEstimationSection9.some(t => {
|
|
49368
|
+
const st = String((t === null || t === void 0 ? void 0 : t.status) || "").toUpperCase();
|
|
49369
|
+
return st === "UNPAID" || (t === null || t === void 0 ? void 0 : t.taxHeadCode) === "WS_ADDITIONAL_INFRASTRUCTURE_CHARGE" && st !== "PAID";
|
|
49370
|
+
})) || ((_feeEstimationSection0 = feeEstimationSection.additionalDetails.values) === null || _feeEstimationSection0 === void 0 ? void 0 : _feeEstimationSection0.some(v => {
|
|
49371
|
+
const st = String((v === null || v === void 0 ? void 0 : v.status) || "").toUpperCase();
|
|
49372
|
+
return st === "UNPAID" || ((v === null || v === void 0 ? void 0 : v.title) === "WS_ADDITIONAL_INFRASTRUCTURE_CHARGE" || (v === null || v === void 0 ? void 0 : v.taxHeadCode) === "WS_ADDITIONAL_INFRASTRUCTURE_CHARGE") && st !== "PAID";
|
|
49373
|
+
}));
|
|
49374
|
+
feeEstimationSection.additionalDetails.isPaid = !hasUnpaid;
|
|
49375
|
+
feeEstimationSection.additionalDetails.hasUnpaidCharge = hasUnpaid;
|
|
49376
|
+
feeEstimationSection.additionalDetails.isPropUpdated = true;
|
|
49377
|
+
} else {
|
|
49378
|
+
feeEstimationSection.additionalDetails.isPaid = isPaid;
|
|
49379
|
+
}
|
|
48995
49380
|
}
|
|
48996
49381
|
if (isLoading || isAppDetailsLoading) {
|
|
48997
49382
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
|
|
@@ -55289,7 +55674,7 @@ const WSInfoPage = () => {
|
|
|
55289
55674
|
const fullAddr = getAddress$1(target.address, t, target);
|
|
55290
55675
|
const formatted = {
|
|
55291
55676
|
...target,
|
|
55292
|
-
displayName: fullAddr ? `${
|
|
55677
|
+
displayName: fullAddr ? `${fullAddr}` : ""
|
|
55293
55678
|
};
|
|
55294
55679
|
setSelectedProperty(formatted);
|
|
55295
55680
|
sessionStorage.setItem("WS_OTP_VERIFIED_PROPERTY_ID", target.propertyId);
|
|
@@ -55437,7 +55822,7 @@ const WSInfoPage = () => {
|
|
|
55437
55822
|
const fullAddr = getAddress$1(fallbackProp.address, t, fallbackProp);
|
|
55438
55823
|
const formatted = {
|
|
55439
55824
|
...fallbackProp,
|
|
55440
|
-
displayName: fullAddr ? `${
|
|
55825
|
+
displayName: fullAddr ? `${fullAddr}` : ""
|
|
55441
55826
|
};
|
|
55442
55827
|
setSelectedProperty(formatted);
|
|
55443
55828
|
sessionStorage.setItem("WS_OTP_VERIFIED_PROPERTY_ID", fallbackProp.propertyId);
|
|
@@ -55502,19 +55887,26 @@ const WSInfoPage = () => {
|
|
|
55502
55887
|
const fullAddr = getAddress$1(prop.address, t, prop);
|
|
55503
55888
|
return {
|
|
55504
55889
|
...prop,
|
|
55505
|
-
displayName: fullAddr ? `${
|
|
55890
|
+
displayName: fullAddr ? `${fullAddr}` : ""
|
|
55506
55891
|
};
|
|
55507
55892
|
});
|
|
55508
55893
|
if (selectedProperty && !list.some(p => p.propertyId === selectedProperty.propertyId)) {
|
|
55509
55894
|
const fullAddr = getAddress$1(selectedProperty.address, t, selectedProperty);
|
|
55510
55895
|
const selProp = {
|
|
55511
55896
|
...selectedProperty,
|
|
55512
|
-
displayName: fullAddr ? `${
|
|
55897
|
+
displayName: fullAddr ? `${fullAddr}` : ""
|
|
55513
55898
|
};
|
|
55514
55899
|
return [selProp, ...list];
|
|
55515
55900
|
}
|
|
55516
55901
|
return list;
|
|
55517
55902
|
}, [propertyDetails, selectedProperty, t]);
|
|
55903
|
+
const propertyAddressDisplay = React__default.useMemo(() => {
|
|
55904
|
+
var _propertyDetails$Prop, _propByIdData$Propert3;
|
|
55905
|
+
if (!isMobileVerified) return "";
|
|
55906
|
+
const prop = selectedProperty || createdPropertyId && ((propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop = propertyDetails.Properties) === null || _propertyDetails$Prop === void 0 ? void 0 : _propertyDetails$Prop.find(p => p.propertyId === createdPropertyId)) || (propByIdData === null || propByIdData === void 0 ? void 0 : (_propByIdData$Propert3 = propByIdData.Properties) === null || _propByIdData$Propert3 === void 0 ? void 0 : _propByIdData$Propert3[0])) || createdProperty;
|
|
55907
|
+
if (!prop) return "";
|
|
55908
|
+
return getAddress$1(prop === null || prop === void 0 ? void 0 : prop.address, t, prop) || (prop === null || prop === void 0 ? void 0 : prop.displayName) || "";
|
|
55909
|
+
}, [isMobileVerified, selectedProperty, createdPropertyId, propertyDetails, propByIdData, createdProperty, t]);
|
|
55518
55910
|
const handleDigiLockerLogin = function (e) {
|
|
55519
55911
|
try {
|
|
55520
55912
|
if (e && e.preventDefault) e.preventDefault();
|
|
@@ -56380,7 +56772,7 @@ const WSInfoPage = () => {
|
|
|
56380
56772
|
className: "ws-service-tag"
|
|
56381
56773
|
}, t("Apply For New Connection")), /*#__PURE__*/React__default.createElement("span", {
|
|
56382
56774
|
className: "ws-portal-tag"
|
|
56383
|
-
}, isEmployee ? t("Employee Portal") : t("Citizen Services"))), /*#__PURE__*/React__default.createElement("div", {
|
|
56775
|
+
}, isEmployee ? t("Employee Portal") : t("Citizen Services"))), (hasProperty === null || hasProperty === void 0 ? void 0 : hasProperty.code) !== "YES" && /*#__PURE__*/React__default.createElement("div", {
|
|
56384
56776
|
className: "ws-digilocker-box"
|
|
56385
56777
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
56386
56778
|
className: "ws-digilocker-content"
|
|
@@ -56406,24 +56798,20 @@ const WSInfoPage = () => {
|
|
|
56406
56798
|
}, t("RECOMMENDED"))), /*#__PURE__*/React__default.createElement("p", {
|
|
56407
56799
|
className: "ws-dl-sub"
|
|
56408
56800
|
}, t("Fetch your verified Aadhaar, Electricity Bill, and Identity documents directly without manual upload.")))), /*#__PURE__*/React__default.createElement("button", {
|
|
56801
|
+
className: "ws-btn ws-btn-primary",
|
|
56802
|
+
type: "button",
|
|
56803
|
+
onClick: handleCreateProperty
|
|
56804
|
+
}, t("Start Your Application")), /*#__PURE__*/React__default.createElement("button", {
|
|
56409
56805
|
type: "button",
|
|
56410
56806
|
className: "ws-btn ws-btn-digilocker",
|
|
56411
56807
|
onClick: handleDigiLockerLogin
|
|
56412
|
-
}, /*#__PURE__*/React__default.createElement("span", null, "\uD83D\uDD10"), /*#__PURE__*/React__default.createElement("span", null, t("DigiLocker Consent")))), /*#__PURE__*/React__default.createElement("div", {
|
|
56808
|
+
}, /*#__PURE__*/React__default.createElement("span", null, "\uD83D\uDD10"), /*#__PURE__*/React__default.createElement("span", null, t("DigiLocker Consent")))), (hasProperty === null || hasProperty === void 0 ? void 0 : hasProperty.code) === "YES" && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
56413
56809
|
className: "ws-card"
|
|
56414
56810
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
56415
|
-
className: "ws-step-header"
|
|
56416
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
56417
|
-
className: "ws-step-num-badge"
|
|
56418
|
-
}, "1"), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("h2", {
|
|
56419
|
-
className: "ws-step-title"
|
|
56420
|
-
}, t("Property Verification & Linking")), /*#__PURE__*/React__default.createElement("p", {
|
|
56421
|
-
className: "ws-step-subtitle"
|
|
56422
|
-
}, t("A Registered Property Details is required to apply for a water/sewerage connection. Linking your Details enables to apply for a New Connection.")))), (hasProperty === null || hasProperty === void 0 ? void 0 : hasProperty.code) === "YES" && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
56423
56811
|
className: "ws-prop-guide-banner"
|
|
56424
56812
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
56425
56813
|
className: "ws-guide-step-tag"
|
|
56426
|
-
}, "Step 1.1"), /*#__PURE__*/React__default.createElement("span", null, t("Enter your registered mobile number
|
|
56814
|
+
}, "Step 1.1"), /*#__PURE__*/React__default.createElement("span", null, t("Enter your registered mobile number and verify via OTP."))), /*#__PURE__*/React__default.createElement("div", {
|
|
56427
56815
|
className: "ws-prop-grid"
|
|
56428
56816
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
56429
56817
|
className: "ws-field-col"
|
|
@@ -56451,7 +56839,7 @@ const WSInfoPage = () => {
|
|
|
56451
56839
|
},
|
|
56452
56840
|
placeholder: t("Enter 10-digit mobile number"),
|
|
56453
56841
|
maxLength: 10,
|
|
56454
|
-
disabled:
|
|
56842
|
+
disabled: true
|
|
56455
56843
|
})), (searchMobileNumber === null || searchMobileNumber === void 0 ? void 0 : searchMobileNumber.length) === 10 && !isMobileVerified && !showOtpVerification && /*#__PURE__*/React__default.createElement("button", {
|
|
56456
56844
|
type: "button",
|
|
56457
56845
|
className: "ws-btn ws-btn-outline",
|
|
@@ -56465,39 +56853,18 @@ const WSInfoPage = () => {
|
|
|
56465
56853
|
style: {
|
|
56466
56854
|
padding: "12px 0"
|
|
56467
56855
|
}
|
|
56468
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null)) : /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
56469
|
-
option: propertyOptions,
|
|
56470
|
-
optionKey: "displayName",
|
|
56471
|
-
id: "propertyId",
|
|
56472
|
-
selected: selectedProperty,
|
|
56473
|
-
select: val => {
|
|
56474
|
-
const fullAddr = getAddress$1(val === null || val === void 0 ? void 0 : val.address, t, val);
|
|
56475
|
-
const formattedVal = val ? {
|
|
56476
|
-
...val,
|
|
56477
|
-
displayName: fullAddr ? `${val.propertyId} - ${fullAddr}` : val.propertyId
|
|
56478
|
-
} : null;
|
|
56479
|
-
setSelectedProperty(formattedVal);
|
|
56480
|
-
setShowOtpVerification(false);
|
|
56481
|
-
setOtp("");
|
|
56482
|
-
if (val !== null && val !== void 0 && val.propertyId) {
|
|
56483
|
-
sessionStorage.setItem("WS_OTP_VERIFIED_PROPERTY_ID", val.propertyId);
|
|
56484
|
-
}
|
|
56485
|
-
},
|
|
56856
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null)) : /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
56486
56857
|
t: t,
|
|
56487
|
-
|
|
56488
|
-
|
|
56489
|
-
|
|
56490
|
-
|
|
56491
|
-
|
|
56492
|
-
|
|
56493
|
-
|
|
56494
|
-
|
|
56495
|
-
|
|
56496
|
-
|
|
56497
|
-
strokeWidth: "2.5"
|
|
56498
|
-
}, /*#__PURE__*/React__default.createElement("polyline", {
|
|
56499
|
-
points: "20 6 9 17 4 12"
|
|
56500
|
-
})), /*#__PURE__*/React__default.createElement("span", null, t("Property details & address will be automatically populated in the application.")))))), showOtpVerification && !isMobileVerified && /*#__PURE__*/React__default.createElement("div", {
|
|
56858
|
+
type: "text",
|
|
56859
|
+
isMandatory: false,
|
|
56860
|
+
name: "propertyAddress",
|
|
56861
|
+
value: propertyAddressDisplay,
|
|
56862
|
+
placeholder: isMobileVerified ? t("Property Address") : t("Verify mobile number to view property"),
|
|
56863
|
+
disabled: true,
|
|
56864
|
+
style: {
|
|
56865
|
+
width: "100%"
|
|
56866
|
+
}
|
|
56867
|
+
})))), showOtpVerification && !isMobileVerified && /*#__PURE__*/React__default.createElement("div", {
|
|
56501
56868
|
className: "ws-otp-box"
|
|
56502
56869
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
56503
56870
|
className: "ws-otp-header"
|
|
@@ -56544,26 +56911,7 @@ const WSInfoPage = () => {
|
|
|
56544
56911
|
disabled: timeLeft > 0 || isOtpSending
|
|
56545
56912
|
}, timeLeft > 0 ? `${t("Resend OTP")} (${timeLeft < 10 ? `0${timeLeft}` : timeLeft}s)` : t("Resend OTP")))), timeLeft > 0 && /*#__PURE__*/React__default.createElement("div", {
|
|
56546
56913
|
className: "ws-otp-timer-note"
|
|
56547
|
-
}, t("Didn't receive OTP? You can resend after"), " ", timeLeft, " ", t("seconds"), ".")), isMobileVerified && /*#__PURE__*/React__default.createElement("div", {
|
|
56548
|
-
className: "ws-verified-banner"
|
|
56549
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
56550
|
-
className: "ws-verified-text"
|
|
56551
|
-
}, /*#__PURE__*/React__default.createElement("span", {
|
|
56552
|
-
className: "ws-verified-check"
|
|
56553
|
-
}, "\u2713"), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("strong", null, t("Mobile number verified successfully!")), /*#__PURE__*/React__default.createElement("div", {
|
|
56554
|
-
className: "ws-verified-sub"
|
|
56555
|
-
}, t("Properties linked to this mobile number are available in the dropdown below.")))), /*#__PURE__*/React__default.createElement("button", {
|
|
56556
|
-
type: "button",
|
|
56557
|
-
className: "ws-btn-link",
|
|
56558
|
-
onClick: () => {
|
|
56559
|
-
setIsMobileVerified(false);
|
|
56560
|
-
setSelectedProperty(null);
|
|
56561
|
-
setOtp("");
|
|
56562
|
-
setShowOtpVerification(false);
|
|
56563
|
-
sessionStorage.removeItem("WS_OTP_VERIFIED_PROPERTY_ID");
|
|
56564
|
-
hasAutoSelected.current = false;
|
|
56565
|
-
}
|
|
56566
|
-
}, t("Change Number"))), (searchMobileNumber === null || searchMobileNumber === void 0 ? void 0 : searchMobileNumber.length) === 10 && isMobileVerified && !isLoading && propertyOptions.length === 0 && /*#__PURE__*/React__default.createElement("div", {
|
|
56914
|
+
}, t("Didn't receive OTP? You can resend after"), " ", timeLeft, " ", t("seconds"), ".")), (searchMobileNumber === null || searchMobileNumber === void 0 ? void 0 : searchMobileNumber.length) === 10 && isMobileVerified && !isLoading && propertyOptions.length === 0 && /*#__PURE__*/React__default.createElement("div", {
|
|
56567
56915
|
className: "ws-no-prop-alert"
|
|
56568
56916
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
56569
56917
|
className: "ws-no-prop-icon"
|
|
@@ -56573,54 +56921,13 @@ const WSInfoPage = () => {
|
|
|
56573
56921
|
className: "ws-btn ws-btn-primary",
|
|
56574
56922
|
type: "button",
|
|
56575
56923
|
onClick: handleCreateProperty
|
|
56576
|
-
}, t("WS_Register_New_Property"))))), (hasProperty === null || hasProperty === void 0 ? void 0 : hasProperty.code) === "NO" && /*#__PURE__*/React__default.createElement("div", {
|
|
56577
|
-
className: "ws-prop-no-block"
|
|
56578
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
56579
|
-
className: "ws-no-prop-notice"
|
|
56580
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
56581
|
-
className: "ws-notice-icon-circle"
|
|
56582
|
-
}, "\u2139\uFE0F"), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("h4", null, t("Property Registration is Mandatory")), /*#__PURE__*/React__default.createElement("p", null, t("To apply for a new water or sewerage connection with Delhi Jal Board, your premises must first be registered with a Property ID. Please click below to register your property.")))), /*#__PURE__*/React__default.createElement("div", {
|
|
56583
|
-
style: {
|
|
56584
|
-
display: "flex",
|
|
56585
|
-
gap: "16px",
|
|
56586
|
-
alignItems: "center",
|
|
56587
|
-
flexWrap: "wrap",
|
|
56588
|
-
marginTop: "12px"
|
|
56589
|
-
}
|
|
56590
|
-
}, /*#__PURE__*/React__default.createElement("button", {
|
|
56591
|
-
className: "ws-btn ws-btn-primary",
|
|
56592
|
-
type: "button",
|
|
56593
|
-
onClick: handleCreateProperty
|
|
56594
56924
|
}, t("WS_Register_New_Property"))))), /*#__PURE__*/React__default.createElement("div", {
|
|
56595
56925
|
className: "ws-action-card"
|
|
56596
56926
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
56597
56927
|
className: "ws-action-content"
|
|
56598
56928
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
56599
56929
|
className: "ws-action-hint"
|
|
56600
|
-
}, !
|
|
56601
|
-
className: "ws-hint-badge ws-hint-warning"
|
|
56602
|
-
}, /*#__PURE__*/React__default.createElement("svg", {
|
|
56603
|
-
width: "18",
|
|
56604
|
-
height: "18",
|
|
56605
|
-
viewBox: "0 0 24 24",
|
|
56606
|
-
fill: "none",
|
|
56607
|
-
stroke: "currentColor",
|
|
56608
|
-
strokeWidth: "2"
|
|
56609
|
-
}, /*#__PURE__*/React__default.createElement("circle", {
|
|
56610
|
-
cx: "12",
|
|
56611
|
-
cy: "12",
|
|
56612
|
-
r: "10"
|
|
56613
|
-
}), /*#__PURE__*/React__default.createElement("line", {
|
|
56614
|
-
x1: "12",
|
|
56615
|
-
y1: "8",
|
|
56616
|
-
x2: "12",
|
|
56617
|
-
y2: "12"
|
|
56618
|
-
}), /*#__PURE__*/React__default.createElement("line", {
|
|
56619
|
-
x1: "12",
|
|
56620
|
-
y1: "16",
|
|
56621
|
-
x2: "12.01",
|
|
56622
|
-
y2: "16"
|
|
56623
|
-
})), /*#__PURE__*/React__default.createElement("span", null, t("Please select whether you have an existing property in Step 1 to continue."))) : (hasProperty === null || hasProperty === void 0 ? void 0 : hasProperty.code) === "YES" && !selectedProperty ? /*#__PURE__*/React__default.createElement("div", {
|
|
56930
|
+
}, !selectedProperty ? /*#__PURE__*/React__default.createElement("div", {
|
|
56624
56931
|
className: "ws-hint-badge ws-hint-warning"
|
|
56625
56932
|
}, /*#__PURE__*/React__default.createElement("svg", {
|
|
56626
56933
|
width: "18",
|
|
@@ -56643,30 +56950,7 @@ const WSInfoPage = () => {
|
|
|
56643
56950
|
y1: "16",
|
|
56644
56951
|
x2: "12.01",
|
|
56645
56952
|
y2: "16"
|
|
56646
|
-
})), /*#__PURE__*/React__default.createElement("span", null, t("Please verify your mobile number
|
|
56647
|
-
className: "ws-hint-badge ws-hint-info"
|
|
56648
|
-
}, /*#__PURE__*/React__default.createElement("svg", {
|
|
56649
|
-
width: "18",
|
|
56650
|
-
height: "18",
|
|
56651
|
-
viewBox: "0 0 24 24",
|
|
56652
|
-
fill: "none",
|
|
56653
|
-
stroke: "currentColor",
|
|
56654
|
-
strokeWidth: "2"
|
|
56655
|
-
}, /*#__PURE__*/React__default.createElement("circle", {
|
|
56656
|
-
cx: "12",
|
|
56657
|
-
cy: "12",
|
|
56658
|
-
r: "10"
|
|
56659
|
-
}), /*#__PURE__*/React__default.createElement("line", {
|
|
56660
|
-
x1: "12",
|
|
56661
|
-
y1: "16",
|
|
56662
|
-
x2: "12",
|
|
56663
|
-
y2: "12"
|
|
56664
|
-
}), /*#__PURE__*/React__default.createElement("line", {
|
|
56665
|
-
x1: "12",
|
|
56666
|
-
y1: "8",
|
|
56667
|
-
x2: "12.01",
|
|
56668
|
-
y2: "8"
|
|
56669
|
-
})), /*#__PURE__*/React__default.createElement("span", null, t("Please register your property using the button in Step 1 before applying."))) : /*#__PURE__*/React__default.createElement("div", {
|
|
56953
|
+
})), /*#__PURE__*/React__default.createElement("span", null, t("Please verify your mobile number via OTP to proceed."))) : /*#__PURE__*/React__default.createElement("div", {
|
|
56670
56954
|
className: "ws-hint-badge ws-hint-success"
|
|
56671
56955
|
}, /*#__PURE__*/React__default.createElement("svg", {
|
|
56672
56956
|
width: "18",
|
|
@@ -56698,7 +56982,7 @@ const WSInfoPage = () => {
|
|
|
56698
56982
|
y2: "12"
|
|
56699
56983
|
}), /*#__PURE__*/React__default.createElement("polyline", {
|
|
56700
56984
|
points: "12 5 19 12 12 19"
|
|
56701
|
-
}))))))), showToast && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
|
|
56985
|
+
})))))))), showToast && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
|
|
56702
56986
|
error: showToast.key === "error",
|
|
56703
56987
|
warning: showToast.key === "warning",
|
|
56704
56988
|
label: t(showToast.message),
|
|
@@ -58106,11 +58390,11 @@ const NewApplication = () => {
|
|
|
58106
58390
|
}
|
|
58107
58391
|
const plotAreaNum = parseFloat(data === null || data === void 0 ? void 0 : (_data$useDetails = data.useDetails) === null || _data$useDetails === void 0 ? void 0 : _data$useDetails.plotArea);
|
|
58108
58392
|
const builtUpAreaNum = parseFloat(data === null || data === void 0 ? void 0 : (_data$useDetails2 = data.useDetails) === null || _data$useDetails2 === void 0 ? void 0 : _data$useDetails2.builtUpArea);
|
|
58109
|
-
if (!isNaN(plotAreaNum) && !isNaN(builtUpAreaNum) && plotAreaNum
|
|
58110
|
-
const plotTrans = t("WS_PLOT_AREA_MORE_THAN_BUILT_UP_AREA");
|
|
58393
|
+
if (!isNaN(plotAreaNum) && !isNaN(builtUpAreaNum) && plotAreaNum < builtUpAreaNum) {
|
|
58394
|
+
const plotTrans = t("WS_PLOT_AREA_MORE_THAN_OR_EQUAL_BUILT_UP_AREA") || t("WS_PLOT_AREA_MORE_THAN_BUILT_UP_AREA");
|
|
58111
58395
|
setShowToast({
|
|
58112
58396
|
key: "error",
|
|
58113
|
-
message: plotTrans && plotTrans !== "WS_PLOT_AREA_MORE_THAN_BUILT_UP_AREA" ? plotTrans : "Plot area should always be more than built up area."
|
|
58397
|
+
message: plotTrans && plotTrans !== "WS_PLOT_AREA_MORE_THAN_OR_EQUAL_BUILT_UP_AREA" && plotTrans !== "WS_PLOT_AREA_MORE_THAN_BUILT_UP_AREA" ? plotTrans : "Plot area should always be more than or equal to built up area."
|
|
58114
58398
|
});
|
|
58115
58399
|
return Promise.resolve();
|
|
58116
58400
|
}
|
|
@@ -60955,8 +61239,53 @@ const newConfig$2 = [{
|
|
|
60955
61239
|
}]
|
|
60956
61240
|
}];
|
|
60957
61241
|
|
|
61242
|
+
const METER_MAKES$1 = [{
|
|
61243
|
+
name: "Anand Asahi",
|
|
61244
|
+
code: "ANAND_ASAHI",
|
|
61245
|
+
i18nKey: "WS_METER_MAKE_ANAND_ASAHI"
|
|
61246
|
+
}, {
|
|
61247
|
+
name: "Arad",
|
|
61248
|
+
code: "ARAD",
|
|
61249
|
+
i18nKey: "WS_METER_MAKE_ARAD"
|
|
61250
|
+
}, {
|
|
61251
|
+
name: "Baylan",
|
|
61252
|
+
code: "BAYLAN",
|
|
61253
|
+
i18nKey: "WS_METER_MAKE_BAYLAN"
|
|
61254
|
+
}, {
|
|
61255
|
+
name: "Crescent",
|
|
61256
|
+
code: "CRESCENT",
|
|
61257
|
+
i18nKey: "WS_METER_MAKE_CRESCENT"
|
|
61258
|
+
}, {
|
|
61259
|
+
name: "Dasmesh / DMB",
|
|
61260
|
+
code: "DASMESH",
|
|
61261
|
+
i18nKey: "WS_METER_MAKE_DASMESH"
|
|
61262
|
+
}, {
|
|
61263
|
+
name: "Fedrel",
|
|
61264
|
+
code: "FEDREL",
|
|
61265
|
+
i18nKey: "WS_METER_MAKE_FEDREL"
|
|
61266
|
+
}, {
|
|
61267
|
+
name: "Itron",
|
|
61268
|
+
code: "ITRON",
|
|
61269
|
+
i18nKey: "WS_METER_MAKE_ITRON"
|
|
61270
|
+
}, {
|
|
61271
|
+
name: "Konark",
|
|
61272
|
+
code: "KONARK",
|
|
61273
|
+
i18nKey: "WS_METER_MAKE_KONARK"
|
|
61274
|
+
}, {
|
|
61275
|
+
name: "Kranti",
|
|
61276
|
+
code: "KRANTI",
|
|
61277
|
+
i18nKey: "WS_METER_MAKE_KRANTI"
|
|
61278
|
+
}, {
|
|
61279
|
+
name: "Teksan",
|
|
61280
|
+
code: "TEKSAN",
|
|
61281
|
+
i18nKey: "WS_METER_MAKE_TEKSAN"
|
|
61282
|
+
}, {
|
|
61283
|
+
name: "Other",
|
|
61284
|
+
code: "OTHER",
|
|
61285
|
+
i18nKey: "WS_METER_MAKE_OTHER"
|
|
61286
|
+
}];
|
|
60958
61287
|
const ActivateConnection = () => {
|
|
60959
|
-
var _state, _state2, _state3, _Digit$SessionStorage, _details, _details2, _state6, _state6$data, _state7, _state7$data, _state8, _state8$data, _state9, _state9$data, _ref, _ref$split$, _state0, _state0$data, _state1, _state1$data, _state10, _state10$data, _state11, _state11$data, _state12, _state12$data, _state13, _state13$data, _state14, _state14$data, _state15, _state15$data, _state16, _state16$data, _state17, _state17$data, _state18, _state18$data, _state19, _state19$data, _state19$data$
|
|
61288
|
+
var _state, _state2, _state3, _Digit$SessionStorage, _details, _details2, _state6, _state6$data, _state7, _state7$data, _state8, _state8$data, _state9, _state9$data, _ref, _ref$split$, _state0, _state0$data, _state1, _state1$data, _state10, _state10$data, _state11, _state11$data, _state12, _state12$data, _state13, _state13$data, _state14, _state14$data, _state15, _state15$data, _state16, _state16$data, _state17, _state17$data, _state18, _state18$data, _state19, _state19$data, _state19$data$additio, _state20, _state20$data, _state20$data$plumber, _state20$data$plumber2, _state21, _state21$data, _state21$data$plumber, _state21$data$plumber2, _state22, _state22$data, _state22$data$additio, _state23, _state23$data, _state23$data$plumber, _state23$data$plumber2, _state24, _state24$data, _state24$data$additio, _state25, _state25$data, _state25$data$plumber, _state25$data$plumber2, _state26, _state26$data, _state26$data$additio, _state27, _state27$data, _state27$data$additio, _state28, _state28$data, _state28$data$additio, _state29, _state29$data, _state30, _state30$data, _state31, _state31$data, _state32, _state32$data, _state32$data$connect, _state33, _state33$data, _state33$data$connect, _state34, _state34$data, _state34$data$additio, _state34$data$additio2, _state35, _state35$data, _state35$data$additio, _state35$data$additio2, _state36, _state36$data, _state37, _state37$data, _state37$data$additio, _state38, _state38$data, _state39, _state39$data, _state39$data$additio, _state40, _state40$data, _state41, _state41$data, _state41$data$additio, _state42, _state42$data, _state43, _state43$data, _state43$data$additio, _state44, _state44$data, _state45, _state45$data, _state45$data$additio, _state46, _state46$data, _state47, _state47$data, _state48, _state48$data, _state48$data$additio, _state49, _state49$data, _state49$data$additio, _state50, _state50$data, _state51, _state51$data, _state52, _state52$data, _state53, _state53$data, _state56, _applicationDetails$a5, _applicationDetails$a6, _initialAppData$appli3, _details5, _details5$application, _details5$application2, _appDetails$applicati, _state57, _applicationDetails$a7, _applicationDetails$a8, _initialAppData$appli4, _details6, _details6$application, _details6$application2, _appDetails$applicati2;
|
|
60960
61289
|
const {
|
|
60961
61290
|
t
|
|
60962
61291
|
} = reactI18next.useTranslation();
|
|
@@ -61011,7 +61340,7 @@ const ActivateConnection = () => {
|
|
|
61011
61340
|
configObj.body.forEach(section => {
|
|
61012
61341
|
if (section.body && Array.isArray(section.body)) {
|
|
61013
61342
|
const mappedSectionBody = section.body.map(item => {
|
|
61014
|
-
if (item.key === "activationDetails"
|
|
61343
|
+
if (item.key === "activationDetails") {
|
|
61015
61344
|
return {
|
|
61016
61345
|
...item,
|
|
61017
61346
|
component: "WSActivationDetails"
|
|
@@ -61072,25 +61401,43 @@ const ActivateConnection = () => {
|
|
|
61072
61401
|
noOfToilets: ((_state18 = state) === null || _state18 === void 0 ? void 0 : (_state18$data = _state18.data) === null || _state18$data === void 0 ? void 0 : _state18$data.noOfToilets) || "",
|
|
61073
61402
|
formDetails: details
|
|
61074
61403
|
};
|
|
61404
|
+
const plumberPrefCode = ((_state19 = state) === null || _state19 === void 0 ? void 0 : (_state19$data = _state19.data) === null || _state19$data === void 0 ? void 0 : (_state19$data$additio = _state19$data.additionalDetails) === null || _state19$data$additio === void 0 ? void 0 : _state19$data$additio.detailsProvidedBy) || ((_state20 = state) !== null && _state20 !== void 0 && (_state20$data = _state20.data) !== null && _state20$data !== void 0 && (_state20$data$plumber = _state20$data.plumberInfo) !== null && _state20$data$plumber !== void 0 && (_state20$data$plumber2 = _state20$data$plumber[0]) !== null && _state20$data$plumber2 !== void 0 && _state20$data$plumber2.name ? "Self" : "");
|
|
61405
|
+
const defaultPlumberPref = plumberPrefCode === "DJB" || plumberPrefCode === "ULB" ? {
|
|
61406
|
+
name: "DJB",
|
|
61407
|
+
code: "DJB",
|
|
61408
|
+
i18nKey: "WS_PLUMBER_DJB"
|
|
61409
|
+
} : plumberPrefCode === "Self" ? {
|
|
61410
|
+
name: "Self",
|
|
61411
|
+
code: "Self",
|
|
61412
|
+
i18nKey: "WS_PLUMBER_SELF"
|
|
61413
|
+
} : null;
|
|
61075
61414
|
const plumberDetails = [{
|
|
61076
|
-
plumberName: ((
|
|
61077
|
-
plumberMobileNo: ((
|
|
61078
|
-
plumberLicenseNo: ((
|
|
61079
|
-
detailsProvidedBy:
|
|
61080
|
-
|
|
61081
|
-
|
|
61082
|
-
} : "",
|
|
61083
|
-
applicationNo: (_state25 = state) === null || _state25 === void 0 ? void 0 : (_state25$data = _state25.data) === null || _state25$data === void 0 ? void 0 : _state25$data.applicationNo,
|
|
61415
|
+
plumberName: ((_state21 = state) === null || _state21 === void 0 ? void 0 : (_state21$data = _state21.data) === null || _state21$data === void 0 ? void 0 : (_state21$data$plumber = _state21$data.plumberInfo) === null || _state21$data$plumber === void 0 ? void 0 : (_state21$data$plumber2 = _state21$data$plumber[0]) === null || _state21$data$plumber2 === void 0 ? void 0 : _state21$data$plumber2.name) || ((_state22 = state) === null || _state22 === void 0 ? void 0 : (_state22$data = _state22.data) === null || _state22$data === void 0 ? void 0 : (_state22$data$additio = _state22$data.additionalDetails) === null || _state22$data$additio === void 0 ? void 0 : _state22$data$additio.plumberName) || "",
|
|
61416
|
+
plumberMobileNo: ((_state23 = state) === null || _state23 === void 0 ? void 0 : (_state23$data = _state23.data) === null || _state23$data === void 0 ? void 0 : (_state23$data$plumber = _state23$data.plumberInfo) === null || _state23$data$plumber === void 0 ? void 0 : (_state23$data$plumber2 = _state23$data$plumber[0]) === null || _state23$data$plumber2 === void 0 ? void 0 : _state23$data$plumber2.mobileNumber) || ((_state24 = state) === null || _state24 === void 0 ? void 0 : (_state24$data = _state24.data) === null || _state24$data === void 0 ? void 0 : (_state24$data$additio = _state24$data.additionalDetails) === null || _state24$data$additio === void 0 ? void 0 : _state24$data$additio.plumberMobileNo) || "",
|
|
61417
|
+
plumberLicenseNo: ((_state25 = state) === null || _state25 === void 0 ? void 0 : (_state25$data = _state25.data) === null || _state25$data === void 0 ? void 0 : (_state25$data$plumber = _state25$data.plumberInfo) === null || _state25$data$plumber === void 0 ? void 0 : (_state25$data$plumber2 = _state25$data$plumber[0]) === null || _state25$data$plumber2 === void 0 ? void 0 : _state25$data$plumber2.licenseNo) || ((_state26 = state) === null || _state26 === void 0 ? void 0 : (_state26$data = _state26.data) === null || _state26$data === void 0 ? void 0 : (_state26$data$additio = _state26$data.additionalDetails) === null || _state26$data$additio === void 0 ? void 0 : _state26$data$additio.plumberLicenseNo) || "",
|
|
61418
|
+
detailsProvidedBy: defaultPlumberPref,
|
|
61419
|
+
jeOrFirmName: ((_state27 = state) === null || _state27 === void 0 ? void 0 : (_state27$data = _state27.data) === null || _state27$data === void 0 ? void 0 : (_state27$data$additio = _state27$data.additionalDetails) === null || _state27$data$additio === void 0 ? void 0 : _state27$data$additio.nameOfJEOrFirm) || ((_state28 = state) === null || _state28 === void 0 ? void 0 : (_state28$data = _state28.data) === null || _state28$data === void 0 ? void 0 : (_state28$data$additio = _state28$data.additionalDetails) === null || _state28$data$additio === void 0 ? void 0 : _state28$data$additio.jeOrFirmName) || ((_state29 = state) === null || _state29 === void 0 ? void 0 : (_state29$data = _state29.data) === null || _state29$data === void 0 ? void 0 : _state29$data.nameOfJEOrFirm) || "",
|
|
61420
|
+
applicationNo: (_state30 = state) === null || _state30 === void 0 ? void 0 : (_state30$data = _state30.data) === null || _state30$data === void 0 ? void 0 : _state30$data.applicationNo,
|
|
61084
61421
|
key: Date.now()
|
|
61085
61422
|
}];
|
|
61086
|
-
const isMeteredConn = !((
|
|
61423
|
+
const isMeteredConn = !((_state31 = state) !== null && _state31 !== void 0 && (_state31$data = _state31.data) !== null && _state31$data !== void 0 && _state31$data.connectionType) || ((_state32 = state) === null || _state32 === void 0 ? void 0 : (_state32$data = _state32.data) === null || _state32$data === void 0 ? void 0 : (_state32$data$connect = _state32$data.connectionType) === null || _state32$data$connect === void 0 ? void 0 : _state32$data$connect.toUpperCase()) === "METERED" || ((_state33 = state) === null || _state33 === void 0 ? void 0 : (_state33$data = _state33.data) === null || _state33$data === void 0 ? void 0 : (_state33$data$connect = _state33$data.connectionType) === null || _state33$data$connect === void 0 ? void 0 : _state33$data$connect.toUpperCase()) === "PERMANENT" || ((_state34 = state) === null || _state34 === void 0 ? void 0 : (_state34$data = _state34.data) === null || _state34$data === void 0 ? void 0 : (_state34$data$additio = _state34$data.additionalDetails) === null || _state34$data$additio === void 0 ? void 0 : (_state34$data$additio2 = _state34$data$additio.connectionType) === null || _state34$data$additio2 === void 0 ? void 0 : _state34$data$additio2.toUpperCase()) === "METERED" || ((_state35 = state) === null || _state35 === void 0 ? void 0 : (_state35$data = _state35.data) === null || _state35$data === void 0 ? void 0 : (_state35$data$additio = _state35$data.additionalDetails) === null || _state35$data$additio === void 0 ? void 0 : (_state35$data$additio2 = _state35$data$additio.connectionType) === null || _state35$data$additio2 === void 0 ? void 0 : _state35$data$additio2.toUpperCase()) === "PERMANENT";
|
|
61424
|
+
const defaultMeterMake = ((_state36 = state) === null || _state36 === void 0 ? void 0 : (_state36$data = _state36.data) === null || _state36$data === void 0 ? void 0 : _state36$data.meterMake) || ((_state37 = state) === null || _state37 === void 0 ? void 0 : (_state37$data = _state37.data) === null || _state37$data === void 0 ? void 0 : (_state37$data$additio = _state37$data.additionalDetails) === null || _state37$data$additio === void 0 ? void 0 : _state37$data$additio.meterMake);
|
|
61425
|
+
const defaultMeterSize = ((_state38 = state) === null || _state38 === void 0 ? void 0 : (_state38$data = _state38.data) === null || _state38$data === void 0 ? void 0 : _state38$data.meterSize) || ((_state39 = state) === null || _state39 === void 0 ? void 0 : (_state39$data = _state39.data) === null || _state39$data === void 0 ? void 0 : (_state39$data$additio = _state39$data.additionalDetails) === null || _state39$data$additio === void 0 ? void 0 : _state39$data$additio.meterSize);
|
|
61426
|
+
const defaultFerruleSize = ((_state40 = state) === null || _state40 === void 0 ? void 0 : (_state40$data = _state40.data) === null || _state40$data === void 0 ? void 0 : _state40$data.ferruleSize) || ((_state41 = state) === null || _state41 === void 0 ? void 0 : (_state41$data = _state41.data) === null || _state41$data === void 0 ? void 0 : (_state41$data$additio = _state41$data.additionalDetails) === null || _state41$data$additio === void 0 ? void 0 : _state41$data$additio.ferruleSize);
|
|
61087
61427
|
const activationDetails = isMeteredConn ? [{
|
|
61088
|
-
|
|
61089
|
-
|
|
61090
|
-
|
|
61091
|
-
|
|
61428
|
+
meterMake: defaultMeterMake ? typeof defaultMeterMake === "object" ? defaultMeterMake : METER_MAKES$1.find(m => m.code === defaultMeterMake || m.name === defaultMeterMake) || {
|
|
61429
|
+
name: defaultMeterMake,
|
|
61430
|
+
code: defaultMeterMake
|
|
61431
|
+
} : null,
|
|
61432
|
+
meterNo: ((_state42 = state) === null || _state42 === void 0 ? void 0 : (_state42$data = _state42.data) === null || _state42$data === void 0 ? void 0 : _state42$data.meterId) || ((_state43 = state) === null || _state43 === void 0 ? void 0 : (_state43$data = _state43.data) === null || _state43$data === void 0 ? void 0 : (_state43$data$additio = _state43$data.additionalDetails) === null || _state43$data$additio === void 0 ? void 0 : _state43$data$additio.meterNo) || "",
|
|
61433
|
+
meterId: ((_state44 = state) === null || _state44 === void 0 ? void 0 : (_state44$data = _state44.data) === null || _state44$data === void 0 ? void 0 : _state44$data.meterId) || ((_state45 = state) === null || _state45 === void 0 ? void 0 : (_state45$data = _state45.data) === null || _state45$data === void 0 ? void 0 : (_state45$data$additio = _state45$data.additionalDetails) === null || _state45$data$additio === void 0 ? void 0 : _state45$data$additio.meterNo) || "",
|
|
61434
|
+
meterSize: defaultMeterSize ? typeof defaultMeterSize === "object" ? (defaultMeterSize === null || defaultMeterSize === void 0 ? void 0 : defaultMeterSize.value) || (defaultMeterSize === null || defaultMeterSize === void 0 ? void 0 : defaultMeterSize.name) || (defaultMeterSize === null || defaultMeterSize === void 0 ? void 0 : defaultMeterSize.code) || "" : defaultMeterSize : "",
|
|
61435
|
+
ferruleSize: defaultFerruleSize ? typeof defaultFerruleSize === "object" ? (defaultFerruleSize === null || defaultFerruleSize === void 0 ? void 0 : defaultFerruleSize.value) || (defaultFerruleSize === null || defaultFerruleSize === void 0 ? void 0 : defaultFerruleSize.name) || (defaultFerruleSize === null || defaultFerruleSize === void 0 ? void 0 : defaultFerruleSize.code) || "" : defaultFerruleSize : "",
|
|
61436
|
+
meterInstallationDate: (_state46 = state) !== null && _state46 !== void 0 && (_state46$data = _state46.data) !== null && _state46$data !== void 0 && _state46$data.meterInstallationDate ? convertEpochToDates((_state47 = state) === null || _state47 === void 0 ? void 0 : (_state47$data = _state47.data) === null || _state47$data === void 0 ? void 0 : _state47$data.meterInstallationDate) : null,
|
|
61437
|
+
meterInitialReading: ((_state48 = state) === null || _state48 === void 0 ? void 0 : (_state48$data = _state48.data) === null || _state48$data === void 0 ? void 0 : (_state48$data$additio = _state48$data.additionalDetails) === null || _state48$data$additio === void 0 ? void 0 : _state48$data$additio.initialMeterReading) !== undefined ? (_state49 = state) === null || _state49 === void 0 ? void 0 : (_state49$data = _state49.data) === null || _state49$data === void 0 ? void 0 : (_state49$data$additio = _state49$data.additionalDetails) === null || _state49$data$additio === void 0 ? void 0 : _state49$data$additio.initialMeterReading : "0",
|
|
61438
|
+
connectionExecutionDate: (_state50 = state) !== null && _state50 !== void 0 && (_state50$data = _state50.data) !== null && _state50$data !== void 0 && _state50$data.connectionExecutionDate ? convertEpochToDates((_state51 = state) === null || _state51 === void 0 ? void 0 : (_state51$data = _state51.data) === null || _state51$data === void 0 ? void 0 : _state51$data.connectionExecutionDate) : null
|
|
61092
61439
|
}] : [{
|
|
61093
|
-
connectionExecutionDate: (
|
|
61440
|
+
connectionExecutionDate: (_state52 = state) !== null && _state52 !== void 0 && (_state52$data = _state52.data) !== null && _state52$data !== void 0 && _state52$data.connectionExecutionDate ? convertEpochToDates((_state53 = state) === null || _state53 === void 0 ? void 0 : (_state53$data = _state53.data) === null || _state53$data === void 0 ? void 0 : _state53$data.connectionExecutionDate) : null
|
|
61094
61441
|
}];
|
|
61095
61442
|
const defaultValues = {
|
|
61096
61443
|
formDetails: details,
|
|
@@ -61124,24 +61471,77 @@ const ActivateConnection = () => {
|
|
|
61124
61471
|
}, 3000);
|
|
61125
61472
|
return () => clearTimeout(timer);
|
|
61126
61473
|
}, [isAppDetailsPage]);
|
|
61127
|
-
const
|
|
61128
|
-
var _formData$
|
|
61129
|
-
const
|
|
61130
|
-
|
|
61131
|
-
|
|
61132
|
-
|
|
61133
|
-
|
|
61134
|
-
|
|
61135
|
-
|
|
61136
|
-
|
|
61137
|
-
|
|
61138
|
-
|
|
61139
|
-
|
|
61140
|
-
}
|
|
61141
|
-
|
|
61142
|
-
|
|
61143
|
-
|
|
61474
|
+
const checkCanSubmit = formData => {
|
|
61475
|
+
var _formData$plumberDeta, _formData$plumberDeta2, _formData$plumberDeta3, _formData$plumberDeta4, _formData$plumberDeta5, _formData$plumberDeta6, _formData$plumberDeta7, _formData$plumberDeta8, _formData$activationD, _act$meterMake, _act$meterMake2, _act$meterSize, _act$meterSize2, _act$ferruleSize, _act$ferruleSize2, _supDocs$meterPhoto, _docsList$find, _supDocs$;
|
|
61476
|
+
const plumberPref = (formData === null || formData === void 0 ? void 0 : (_formData$plumberDeta = formData.plumberDetails) === null || _formData$plumberDeta === void 0 ? void 0 : (_formData$plumberDeta2 = _formData$plumberDeta[0]) === null || _formData$plumberDeta2 === void 0 ? void 0 : (_formData$plumberDeta3 = _formData$plumberDeta2.detailsProvidedBy) === null || _formData$plumberDeta3 === void 0 ? void 0 : _formData$plumberDeta3.code) || (formData === null || formData === void 0 ? void 0 : (_formData$plumberDeta4 = formData.plumberDetails) === null || _formData$plumberDeta4 === void 0 ? void 0 : (_formData$plumberDeta5 = _formData$plumberDeta4[0]) === null || _formData$plumberDeta5 === void 0 ? void 0 : (_formData$plumberDeta6 = _formData$plumberDeta5.detailsProvidedBy) === null || _formData$plumberDeta6 === void 0 ? void 0 : _formData$plumberDeta6.name) || (formData === null || formData === void 0 ? void 0 : (_formData$plumberDeta7 = formData.plumberDetails) === null || _formData$plumberDeta7 === void 0 ? void 0 : (_formData$plumberDeta8 = _formData$plumberDeta7[0]) === null || _formData$plumberDeta8 === void 0 ? void 0 : _formData$plumberDeta8.detailsProvidedBy) || "";
|
|
61477
|
+
const isDJB = plumberPref === "DJB" || plumberPref === "ULB" || plumberPref === "Delhi Jal Board" || typeof plumberPref === "string" && plumberPref.toLowerCase().includes("djb");
|
|
61478
|
+
const isSelf = !isDJB;
|
|
61479
|
+
if (!plumberPref) return false;
|
|
61480
|
+
if (isSelf) {
|
|
61481
|
+
var _formData$plumberDeta9, _formData$plumberDeta0, _formData$plumberDeta1, _formData$plumberDeta10, _formData$plumberDeta11, _formData$plumberDeta12;
|
|
61482
|
+
const pName = formData === null || formData === void 0 ? void 0 : (_formData$plumberDeta9 = formData.plumberDetails) === null || _formData$plumberDeta9 === void 0 ? void 0 : (_formData$plumberDeta0 = _formData$plumberDeta9[0]) === null || _formData$plumberDeta0 === void 0 ? void 0 : _formData$plumberDeta0.plumberName;
|
|
61483
|
+
const pLic = formData === null || formData === void 0 ? void 0 : (_formData$plumberDeta1 = formData.plumberDetails) === null || _formData$plumberDeta1 === void 0 ? void 0 : (_formData$plumberDeta10 = _formData$plumberDeta1[0]) === null || _formData$plumberDeta10 === void 0 ? void 0 : _formData$plumberDeta10.plumberLicenseNo;
|
|
61484
|
+
const pMob = formData === null || formData === void 0 ? void 0 : (_formData$plumberDeta11 = formData.plumberDetails) === null || _formData$plumberDeta11 === void 0 ? void 0 : (_formData$plumberDeta12 = _formData$plumberDeta11[0]) === null || _formData$plumberDeta12 === void 0 ? void 0 : _formData$plumberDeta12.plumberMobileNo;
|
|
61485
|
+
if (!pName || !pName.trim()) return false;
|
|
61486
|
+
if (!pLic || !pLic.toString().trim()) return false;
|
|
61487
|
+
if (!pMob || !/^[6-9]\d{9}$/.test(pMob.toString().trim())) return false;
|
|
61488
|
+
} else if (isDJB) {
|
|
61489
|
+
var _formData$plumberDeta13, _formData$plumberDeta14;
|
|
61490
|
+
const jeFirm = formData === null || formData === void 0 ? void 0 : (_formData$plumberDeta13 = formData.plumberDetails) === null || _formData$plumberDeta13 === void 0 ? void 0 : (_formData$plumberDeta14 = _formData$plumberDeta13[0]) === null || _formData$plumberDeta14 === void 0 ? void 0 : _formData$plumberDeta14.jeOrFirmName;
|
|
61491
|
+
if (!jeFirm || !jeFirm.trim()) return false;
|
|
61492
|
+
} else {
|
|
61493
|
+
return false;
|
|
61494
|
+
}
|
|
61495
|
+
const act = Array.isArray(formData === null || formData === void 0 ? void 0 : formData.activationDetails) ? formData === null || formData === void 0 ? void 0 : (_formData$activationD = formData.activationDetails) === null || _formData$activationD === void 0 ? void 0 : _formData$activationD[0] : formData === null || formData === void 0 ? void 0 : formData.activationDetails;
|
|
61496
|
+
const meterMake = (act === null || act === void 0 ? void 0 : (_act$meterMake = act.meterMake) === null || _act$meterMake === void 0 ? void 0 : _act$meterMake.code) || (act === null || act === void 0 ? void 0 : (_act$meterMake2 = act.meterMake) === null || _act$meterMake2 === void 0 ? void 0 : _act$meterMake2.name) || (act === null || act === void 0 ? void 0 : act.meterMake);
|
|
61497
|
+
const meterNo = (act === null || act === void 0 ? void 0 : act.meterNo) || (act === null || act === void 0 ? void 0 : act.meterId);
|
|
61498
|
+
const meterSize = (act === null || act === void 0 ? void 0 : (_act$meterSize = act.meterSize) === null || _act$meterSize === void 0 ? void 0 : _act$meterSize.value) || (act === null || act === void 0 ? void 0 : (_act$meterSize2 = act.meterSize) === null || _act$meterSize2 === void 0 ? void 0 : _act$meterSize2.name) || (act === null || act === void 0 ? void 0 : act.meterSize);
|
|
61499
|
+
const ferruleSize = (act === null || act === void 0 ? void 0 : (_act$ferruleSize = act.ferruleSize) === null || _act$ferruleSize === void 0 ? void 0 : _act$ferruleSize.value) || (act === null || act === void 0 ? void 0 : (_act$ferruleSize2 = act.ferruleSize) === null || _act$ferruleSize2 === void 0 ? void 0 : _act$ferruleSize2.name) || (act === null || act === void 0 ? void 0 : act.ferruleSize);
|
|
61500
|
+
const meterInstDate = act === null || act === void 0 ? void 0 : act.meterInstallationDate;
|
|
61501
|
+
const connExecDate = act === null || act === void 0 ? void 0 : act.connectionExecutionDate;
|
|
61502
|
+
if (!meterMake) return false;
|
|
61503
|
+
if (!meterNo || !meterNo.toString().trim()) return false;
|
|
61504
|
+
if (!meterSize || !meterSize.toString().trim()) return false;
|
|
61505
|
+
if (!ferruleSize || !ferruleSize.toString().trim()) return false;
|
|
61506
|
+
if (!meterInstDate) return false;
|
|
61507
|
+
if (!connExecDate) return false;
|
|
61508
|
+
const supDocs = formData === null || formData === void 0 ? void 0 : formData.supportingDocuments;
|
|
61509
|
+
const docsList = Array.isArray(supDocs === null || supDocs === void 0 ? void 0 : supDocs.documents) ? supDocs.documents : Array.isArray(supDocs) ? supDocs : [];
|
|
61510
|
+
const meterPhotoId = (supDocs === null || supDocs === void 0 ? void 0 : (_supDocs$meterPhoto = supDocs.meterPhoto) === null || _supDocs$meterPhoto === void 0 ? void 0 : _supDocs$meterPhoto.fileStoreId) || ((_docsList$find = docsList.find(d => (d === null || d === void 0 ? void 0 : d.documentType) === "METER_PHOTO")) === null || _docsList$find === void 0 ? void 0 : _docsList$find.fileStoreId) || (supDocs === null || supDocs === void 0 ? void 0 : (_supDocs$ = supDocs[0]) === null || _supDocs$ === void 0 ? void 0 : _supDocs$.fileStoreId);
|
|
61511
|
+
if (!meterPhotoId) return false;
|
|
61512
|
+
if (isSelf) {
|
|
61513
|
+
var _supDocs$meterWarrant, _docsList$find2, _supDocs$plumberDecla, _docsList$find3;
|
|
61514
|
+
const meterWarrantyId = (supDocs === null || supDocs === void 0 ? void 0 : (_supDocs$meterWarrant = supDocs.meterWarranty) === null || _supDocs$meterWarrant === void 0 ? void 0 : _supDocs$meterWarrant.fileStoreId) || ((_docsList$find2 = docsList.find(d => (d === null || d === void 0 ? void 0 : d.documentType) === "METER_WARRANTY_CARD_TESTING_REPORT_INVOICE")) === null || _docsList$find2 === void 0 ? void 0 : _docsList$find2.fileStoreId);
|
|
61515
|
+
const plumberDeclId = (supDocs === null || supDocs === void 0 ? void 0 : (_supDocs$plumberDecla = supDocs.plumberDeclaration) === null || _supDocs$plumberDecla === void 0 ? void 0 : _supDocs$plumberDecla.fileStoreId) || ((_docsList$find3 = docsList.find(d => (d === null || d === void 0 ? void 0 : d.documentType) === "DECLARATION_OF_LICENSED_PLUMBER")) === null || _docsList$find3 === void 0 ? void 0 : _docsList$find3.fileStoreId);
|
|
61516
|
+
if (!meterWarrantyId) return false;
|
|
61144
61517
|
}
|
|
61518
|
+
return true;
|
|
61519
|
+
};
|
|
61520
|
+
const onFormValueChange = (setValue, formData, formState) => {
|
|
61521
|
+
const canSub = checkCanSubmit(formData);
|
|
61522
|
+
setSubmitValve(canSub);
|
|
61523
|
+
};
|
|
61524
|
+
const getConvertedDate = dateOfTime => {
|
|
61525
|
+
if (!dateOfTime) return null;
|
|
61526
|
+
if (typeof dateOfTime === "number") return dateOfTime;
|
|
61527
|
+
const str = String(dateOfTime).trim();
|
|
61528
|
+
if (/^\d+$/.test(str)) return Number(str);
|
|
61529
|
+
const ymd = str.match(/^(\d{4})[-/](\d{1,2})[-/](\d{1,2})$/);
|
|
61530
|
+
if (ymd) {
|
|
61531
|
+
const year = parseInt(ymd[1], 10);
|
|
61532
|
+
const month = parseInt(ymd[2], 10) - 1;
|
|
61533
|
+
const day = parseInt(ymd[3], 10);
|
|
61534
|
+
return new Date(year, month, day, 23, 59, 59).getTime();
|
|
61535
|
+
}
|
|
61536
|
+
const dmy = str.match(/^(\d{1,2})[-/](\d{1,2})[-/](\d{4})$/);
|
|
61537
|
+
if (dmy) {
|
|
61538
|
+
const day = parseInt(dmy[1], 10);
|
|
61539
|
+
const month = parseInt(dmy[2], 10) - 1;
|
|
61540
|
+
const year = parseInt(dmy[3], 10);
|
|
61541
|
+
return new Date(year, month, day, 23, 59, 59).getTime();
|
|
61542
|
+
}
|
|
61543
|
+
const d = new Date(str);
|
|
61544
|
+
return isNaN(d.getTime()) ? null : d.getTime();
|
|
61145
61545
|
};
|
|
61146
61546
|
const closeToast = () => {
|
|
61147
61547
|
setShowToast(null);
|
|
@@ -61151,144 +61551,250 @@ const ActivateConnection = () => {
|
|
|
61151
61551
|
};
|
|
61152
61552
|
const onSubmit = function (data) {
|
|
61153
61553
|
try {
|
|
61154
|
-
|
|
61155
|
-
|
|
61156
|
-
|
|
61157
|
-
|
|
61158
|
-
|
|
61159
|
-
|
|
61160
|
-
|
|
61554
|
+
if (!checkCanSubmit(data)) {
|
|
61555
|
+
setShowToast({
|
|
61556
|
+
warning: true,
|
|
61557
|
+
message: "PLEASE_FILL_MANDATORY_DETAILS"
|
|
61558
|
+
});
|
|
61559
|
+
setTimeout(() => {
|
|
61560
|
+
setShowToast(false);
|
|
61561
|
+
}, 3000);
|
|
61562
|
+
return Promise.resolve();
|
|
61563
|
+
} else {
|
|
61564
|
+
var _details4, _formDetails$connecti, _formDetails$connecti2, _formDetails$connecti3, _formDetails$connecti4, _formDetails$connecti5, _formDetails$connecti6, _formDetails$connecti7, _formDetails$connecti8, _formDetails$connecti9, _formDetails$connecti0, _formDetails$connecti1, _formDetails$connecti10, _formDetails$connecti11, _formDetails$connecti12, _formDetails$connecti13, _formDetails$connecti14, _formDetails$connecti15, _formDetails$connecti16, _formDetails$connecti17, _formDetails$connecti18, _formDetails$connecti19, _formDetails$connecti20, _formDetails$connecti21, _formDetails$connecti22, _formDetails$connecti23, _formDetails$connecti24, _formDetails$connecti25, _formDetails$connecti26, _formDetails$connecti27, _formDetails$connecti28, _formDetails$plumberD, _formDetails$plumberD2, _formDetails$plumberD3, _formDetails$plumberD4, _formDetails$plumberD5, _formDetails$plumberD6, _formDetails$plumberD7, _formDetails$plumberD8, _data$plumberDetails, _data$plumberDetails$, _data$plumberDetails$2, _data$plumberDetails2, _data$plumberDetails3, _data$plumberDetails4, _data$plumberDetails5, _data$plumberDetails6, _formDetails$activati, _data$activationDetai, _actObj$meterMake, _actObj$meterMake2, _actObj$meterSize, _actObj$meterSize2, _actObj$ferruleSize, _actObj$ferruleSize2, _data$supportingDocum, _data$supportingDocum2, _data$supportingDocum3, _formDetails$comments, _formDetails$comments2, _formData$application, _baseAppData$applicat, _state54, _formData$application2, _baseAppData$applicat2, _state55, _formDetails$comments3, _formData$application3, _formData$application4;
|
|
61565
|
+
const formDetails = cloneDeep_1(data);
|
|
61566
|
+
const baseAppData = (appDetails === null || appDetails === void 0 ? void 0 : appDetails.applicationData) || (appDetails !== null && appDetails !== void 0 && appDetails.applicationNo ? appDetails : null) || ((_details4 = details) === null || _details4 === void 0 ? void 0 : _details4.applicationData) || initialAppData || {};
|
|
61567
|
+
const formData = cloneDeep_1(baseAppData);
|
|
61568
|
+
if (!formData.additionalDetails) formData.additionalDetails = {};
|
|
61569
|
+
if (formDetails !== null && formDetails !== void 0 && (_formDetails$connecti = formDetails.connectionDetails) !== null && _formDetails$connecti !== void 0 && (_formDetails$connecti2 = _formDetails$connecti[0]) !== null && _formDetails$connecti2 !== void 0 && (_formDetails$connecti3 = _formDetails$connecti2.connectionType) !== null && _formDetails$connecti3 !== void 0 && _formDetails$connecti3.code) formData.connectionType = formDetails === null || formDetails === void 0 ? void 0 : (_formDetails$connecti4 = formDetails.connectionDetails) === null || _formDetails$connecti4 === void 0 ? void 0 : (_formDetails$connecti5 = _formDetails$connecti4[0]) === null || _formDetails$connecti5 === void 0 ? void 0 : (_formDetails$connecti6 = _formDetails$connecti5.connectionType) === null || _formDetails$connecti6 === void 0 ? void 0 : _formDetails$connecti6.code;
|
|
61570
|
+
if (formDetails !== null && formDetails !== void 0 && (_formDetails$connecti7 = formDetails.connectionDetails) !== null && _formDetails$connecti7 !== void 0 && (_formDetails$connecti8 = _formDetails$connecti7[0]) !== null && _formDetails$connecti8 !== void 0 && (_formDetails$connecti9 = _formDetails$connecti8.waterSource) !== null && _formDetails$connecti9 !== void 0 && _formDetails$connecti9.code) formData.waterSource = formDetails === null || formDetails === void 0 ? void 0 : (_formDetails$connecti0 = formDetails.connectionDetails) === null || _formDetails$connecti0 === void 0 ? void 0 : (_formDetails$connecti1 = _formDetails$connecti0[0]) === null || _formDetails$connecti1 === void 0 ? void 0 : (_formDetails$connecti10 = _formDetails$connecti1.sourceSubData) === null || _formDetails$connecti10 === void 0 ? void 0 : _formDetails$connecti10.code;
|
|
61571
|
+
if (formDetails !== null && formDetails !== void 0 && (_formDetails$connecti11 = formDetails.connectionDetails) !== null && _formDetails$connecti11 !== void 0 && (_formDetails$connecti12 = _formDetails$connecti11[0]) !== null && _formDetails$connecti12 !== void 0 && (_formDetails$connecti13 = _formDetails$connecti12.pipeSize) !== null && _formDetails$connecti13 !== void 0 && _formDetails$connecti13.size) formData.pipeSize = formDetails === null || formDetails === void 0 ? void 0 : (_formDetails$connecti14 = formDetails.connectionDetails) === null || _formDetails$connecti14 === void 0 ? void 0 : (_formDetails$connecti15 = _formDetails$connecti14[0]) === null || _formDetails$connecti15 === void 0 ? void 0 : (_formDetails$connecti16 = _formDetails$connecti15.pipeSize) === null || _formDetails$connecti16 === void 0 ? void 0 : _formDetails$connecti16.size;
|
|
61572
|
+
if (formDetails !== null && formDetails !== void 0 && (_formDetails$connecti17 = formDetails.connectionDetails) !== null && _formDetails$connecti17 !== void 0 && (_formDetails$connecti18 = _formDetails$connecti17[0]) !== null && _formDetails$connecti18 !== void 0 && _formDetails$connecti18.noOfTaps) formData.noOfTaps = formDetails === null || formDetails === void 0 ? void 0 : (_formDetails$connecti19 = formDetails.connectionDetails) === null || _formDetails$connecti19 === void 0 ? void 0 : (_formDetails$connecti20 = _formDetails$connecti19[0]) === null || _formDetails$connecti20 === void 0 ? void 0 : _formDetails$connecti20.noOfTaps;
|
|
61573
|
+
if (formDetails !== null && formDetails !== void 0 && (_formDetails$connecti21 = formDetails.connectionDetails) !== null && _formDetails$connecti21 !== void 0 && (_formDetails$connecti22 = _formDetails$connecti21[0]) !== null && _formDetails$connecti22 !== void 0 && _formDetails$connecti22.noOfWaterClosets) formData.noOfWaterClosets = formDetails === null || formDetails === void 0 ? void 0 : (_formDetails$connecti23 = formDetails.connectionDetails) === null || _formDetails$connecti23 === void 0 ? void 0 : (_formDetails$connecti24 = _formDetails$connecti23[0]) === null || _formDetails$connecti24 === void 0 ? void 0 : _formDetails$connecti24.noOfWaterClosets;
|
|
61574
|
+
if (formDetails !== null && formDetails !== void 0 && (_formDetails$connecti25 = formDetails.connectionDetails) !== null && _formDetails$connecti25 !== void 0 && (_formDetails$connecti26 = _formDetails$connecti25[0]) !== null && _formDetails$connecti26 !== void 0 && _formDetails$connecti26.noOfToilets) formData.noOfToilets = formDetails === null || formDetails === void 0 ? void 0 : (_formDetails$connecti27 = formDetails.connectionDetails) === null || _formDetails$connecti27 === void 0 ? void 0 : (_formDetails$connecti28 = _formDetails$connecti27[0]) === null || _formDetails$connecti28 === void 0 ? void 0 : _formDetails$connecti28.noOfToilets;
|
|
61575
|
+
const plumberPref = (formDetails === null || formDetails === void 0 ? void 0 : (_formDetails$plumberD = formDetails.plumberDetails) === null || _formDetails$plumberD === void 0 ? void 0 : (_formDetails$plumberD2 = _formDetails$plumberD[0]) === null || _formDetails$plumberD2 === void 0 ? void 0 : (_formDetails$plumberD3 = _formDetails$plumberD2.detailsProvidedBy) === null || _formDetails$plumberD3 === void 0 ? void 0 : _formDetails$plumberD3.code) || (formDetails === null || formDetails === void 0 ? void 0 : (_formDetails$plumberD4 = formDetails.plumberDetails) === null || _formDetails$plumberD4 === void 0 ? void 0 : (_formDetails$plumberD5 = _formDetails$plumberD4[0]) === null || _formDetails$plumberD5 === void 0 ? void 0 : (_formDetails$plumberD6 = _formDetails$plumberD5.detailsProvidedBy) === null || _formDetails$plumberD6 === void 0 ? void 0 : _formDetails$plumberD6.name) || (formDetails === null || formDetails === void 0 ? void 0 : (_formDetails$plumberD7 = formDetails.plumberDetails) === null || _formDetails$plumberD7 === void 0 ? void 0 : (_formDetails$plumberD8 = _formDetails$plumberD7[0]) === null || _formDetails$plumberD8 === void 0 ? void 0 : _formDetails$plumberD8.detailsProvidedBy) || (data === null || data === void 0 ? void 0 : (_data$plumberDetails = data.plumberDetails) === null || _data$plumberDetails === void 0 ? void 0 : (_data$plumberDetails$ = _data$plumberDetails[0]) === null || _data$plumberDetails$ === void 0 ? void 0 : (_data$plumberDetails$2 = _data$plumberDetails$.detailsProvidedBy) === null || _data$plumberDetails$2 === void 0 ? void 0 : _data$plumberDetails$2.code) || (data === null || data === void 0 ? void 0 : (_data$plumberDetails2 = data.plumberDetails) === null || _data$plumberDetails2 === void 0 ? void 0 : (_data$plumberDetails3 = _data$plumberDetails2[0]) === null || _data$plumberDetails3 === void 0 ? void 0 : (_data$plumberDetails4 = _data$plumberDetails3.detailsProvidedBy) === null || _data$plumberDetails4 === void 0 ? void 0 : _data$plumberDetails4.name) || (data === null || data === void 0 ? void 0 : (_data$plumberDetails5 = data.plumberDetails) === null || _data$plumberDetails5 === void 0 ? void 0 : (_data$plumberDetails6 = _data$plumberDetails5[0]) === null || _data$plumberDetails6 === void 0 ? void 0 : _data$plumberDetails6.detailsProvidedBy) || "";
|
|
61576
|
+
const isDJB = plumberPref === "DJB" || plumberPref === "ULB" || plumberPref === "Delhi Jal Board" || typeof plumberPref === "string" && plumberPref.toLowerCase().includes("djb");
|
|
61577
|
+
const isSelf = !isDJB;
|
|
61578
|
+
formData.additionalDetails.detailsProvidedBy = isDJB ? "DJB" : "Self";
|
|
61579
|
+
formData.additionalDetails.plumberProvidedBy = isDJB ? "DJB" : "Self";
|
|
61580
|
+
if (isSelf) {
|
|
61581
|
+
var _formDetails$plumberD9, _formDetails$plumberD0, _data$plumberDetails7, _data$plumberDetails8, _formDetails$plumberD1, _formDetails$plumberD10, _data$plumberDetails9, _data$plumberDetails0, _formDetails$plumberD11, _formDetails$plumberD12, _data$plumberDetails1, _data$plumberDetails10;
|
|
61582
|
+
const pName = (formDetails === null || formDetails === void 0 ? void 0 : (_formDetails$plumberD9 = formDetails.plumberDetails) === null || _formDetails$plumberD9 === void 0 ? void 0 : (_formDetails$plumberD0 = _formDetails$plumberD9[0]) === null || _formDetails$plumberD0 === void 0 ? void 0 : _formDetails$plumberD0.plumberName) || (data === null || data === void 0 ? void 0 : (_data$plumberDetails7 = data.plumberDetails) === null || _data$plumberDetails7 === void 0 ? void 0 : (_data$plumberDetails8 = _data$plumberDetails7[0]) === null || _data$plumberDetails8 === void 0 ? void 0 : _data$plumberDetails8.plumberName) || "";
|
|
61583
|
+
const pLic = (formDetails === null || formDetails === void 0 ? void 0 : (_formDetails$plumberD1 = formDetails.plumberDetails) === null || _formDetails$plumberD1 === void 0 ? void 0 : (_formDetails$plumberD10 = _formDetails$plumberD1[0]) === null || _formDetails$plumberD10 === void 0 ? void 0 : _formDetails$plumberD10.plumberLicenseNo) || (data === null || data === void 0 ? void 0 : (_data$plumberDetails9 = data.plumberDetails) === null || _data$plumberDetails9 === void 0 ? void 0 : (_data$plumberDetails0 = _data$plumberDetails9[0]) === null || _data$plumberDetails0 === void 0 ? void 0 : _data$plumberDetails0.plumberLicenseNo) || "";
|
|
61584
|
+
const pMob = (formDetails === null || formDetails === void 0 ? void 0 : (_formDetails$plumberD11 = formDetails.plumberDetails) === null || _formDetails$plumberD11 === void 0 ? void 0 : (_formDetails$plumberD12 = _formDetails$plumberD11[0]) === null || _formDetails$plumberD12 === void 0 ? void 0 : _formDetails$plumberD12.plumberMobileNo) || (data === null || data === void 0 ? void 0 : (_data$plumberDetails1 = data.plumberDetails) === null || _data$plumberDetails1 === void 0 ? void 0 : (_data$plumberDetails10 = _data$plumberDetails1[0]) === null || _data$plumberDetails10 === void 0 ? void 0 : _data$plumberDetails10.plumberMobileNo) || "";
|
|
61585
|
+
formData.plumberInfo = [{
|
|
61586
|
+
name: pName,
|
|
61587
|
+
licenseNo: pLic,
|
|
61588
|
+
mobileNumber: pMob
|
|
61589
|
+
}];
|
|
61590
|
+
formData.additionalDetails.plumberName = pName;
|
|
61591
|
+
formData.additionalDetails.plumberLicenseNo = pLic;
|
|
61592
|
+
formData.additionalDetails.plumberMobileNo = pMob;
|
|
61593
|
+
formData.additionalDetails.plumberInfo = formData.plumberInfo;
|
|
61594
|
+
} else if (isDJB) {
|
|
61595
|
+
var _formDetails$plumberD13, _formDetails$plumberD14, _data$plumberDetails11, _data$plumberDetails12;
|
|
61596
|
+
const jeFirm = (formDetails === null || formDetails === void 0 ? void 0 : (_formDetails$plumberD13 = formDetails.plumberDetails) === null || _formDetails$plumberD13 === void 0 ? void 0 : (_formDetails$plumberD14 = _formDetails$plumberD13[0]) === null || _formDetails$plumberD14 === void 0 ? void 0 : _formDetails$plumberD14.jeOrFirmName) || (data === null || data === void 0 ? void 0 : (_data$plumberDetails11 = data.plumberDetails) === null || _data$plumberDetails11 === void 0 ? void 0 : (_data$plumberDetails12 = _data$plumberDetails11[0]) === null || _data$plumberDetails12 === void 0 ? void 0 : _data$plumberDetails12.jeOrFirmName) || "";
|
|
61597
|
+
formData.plumberInfo = [{
|
|
61598
|
+
name: jeFirm,
|
|
61599
|
+
licenseNo: "",
|
|
61600
|
+
mobileNumber: ""
|
|
61601
|
+
}];
|
|
61602
|
+
formData.additionalDetails.nameOfJEOrFirm = jeFirm;
|
|
61603
|
+
formData.additionalDetails.jeOrFirmName = jeFirm;
|
|
61604
|
+
formData.nameOfJEOrFirm = jeFirm;
|
|
61605
|
+
formData.additionalDetails.plumberInfo = formData.plumberInfo;
|
|
61606
|
+
}
|
|
61607
|
+
const actObj = Array.isArray(formDetails === null || formDetails === void 0 ? void 0 : formDetails.activationDetails) ? formDetails === null || formDetails === void 0 ? void 0 : (_formDetails$activati = formDetails.activationDetails) === null || _formDetails$activati === void 0 ? void 0 : _formDetails$activati[0] : (formDetails === null || formDetails === void 0 ? void 0 : formDetails.activationDetails) || (Array.isArray(data === null || data === void 0 ? void 0 : data.activationDetails) ? data === null || data === void 0 ? void 0 : (_data$activationDetai = data.activationDetails) === null || _data$activationDetai === void 0 ? void 0 : _data$activationDetai[0] : data === null || data === void 0 ? void 0 : data.activationDetails);
|
|
61608
|
+
const meterMakeVal = (actObj === null || actObj === void 0 ? void 0 : (_actObj$meterMake = actObj.meterMake) === null || _actObj$meterMake === void 0 ? void 0 : _actObj$meterMake.name) || (actObj === null || actObj === void 0 ? void 0 : (_actObj$meterMake2 = actObj.meterMake) === null || _actObj$meterMake2 === void 0 ? void 0 : _actObj$meterMake2.code) || (actObj === null || actObj === void 0 ? void 0 : actObj.meterMake) || "";
|
|
61609
|
+
const meterNoVal = (actObj === null || actObj === void 0 ? void 0 : actObj.meterNo) || (actObj === null || actObj === void 0 ? void 0 : actObj.meterId) || "";
|
|
61610
|
+
const meterSizeVal = (actObj === null || actObj === void 0 ? void 0 : (_actObj$meterSize = actObj.meterSize) === null || _actObj$meterSize === void 0 ? void 0 : _actObj$meterSize.name) || (actObj === null || actObj === void 0 ? void 0 : (_actObj$meterSize2 = actObj.meterSize) === null || _actObj$meterSize2 === void 0 ? void 0 : _actObj$meterSize2.value) || (actObj === null || actObj === void 0 ? void 0 : actObj.meterSize) || "";
|
|
61611
|
+
const ferruleSizeVal = (actObj === null || actObj === void 0 ? void 0 : (_actObj$ferruleSize = actObj.ferruleSize) === null || _actObj$ferruleSize === void 0 ? void 0 : _actObj$ferruleSize.name) || (actObj === null || actObj === void 0 ? void 0 : (_actObj$ferruleSize2 = actObj.ferruleSize) === null || _actObj$ferruleSize2 === void 0 ? void 0 : _actObj$ferruleSize2.value) || (actObj === null || actObj === void 0 ? void 0 : actObj.ferruleSize) || "";
|
|
61612
|
+
const initialReadingVal = (actObj === null || actObj === void 0 ? void 0 : actObj.meterInitialReading) !== undefined && (actObj === null || actObj === void 0 ? void 0 : actObj.meterInitialReading) !== "" ? String(actObj.meterInitialReading) : "0";
|
|
61613
|
+
formData.meterId = meterNoVal;
|
|
61614
|
+
formData.meterNo = meterNoVal;
|
|
61615
|
+
formData.meterMake = meterMakeVal;
|
|
61616
|
+
formData.meterSize = meterSizeVal;
|
|
61617
|
+
formData.ferruleSize = ferruleSizeVal;
|
|
61618
|
+
formData.initialMeterReading = initialReadingVal;
|
|
61619
|
+
if (actObj !== null && actObj !== void 0 && actObj.meterInstallationDate) {
|
|
61620
|
+
formData.meterInstallationDate = getConvertedDate(actObj === null || actObj === void 0 ? void 0 : actObj.meterInstallationDate);
|
|
61621
|
+
}
|
|
61622
|
+
if (actObj !== null && actObj !== void 0 && actObj.connectionExecutionDate) {
|
|
61623
|
+
formData.connectionExecutionDate = getConvertedDate(actObj === null || actObj === void 0 ? void 0 : actObj.connectionExecutionDate);
|
|
61624
|
+
}
|
|
61625
|
+
formData.additionalDetails.meterMake = meterMakeVal;
|
|
61626
|
+
formData.additionalDetails.meterNo = meterNoVal;
|
|
61627
|
+
formData.additionalDetails.meterId = meterNoVal;
|
|
61628
|
+
formData.additionalDetails.meterSize = meterSizeVal;
|
|
61629
|
+
formData.additionalDetails.ferruleSize = ferruleSizeVal;
|
|
61630
|
+
formData.additionalDetails.initialMeterReading = initialReadingVal;
|
|
61631
|
+
formData.additionalDetails.meterInstallationDate = formData.meterInstallationDate;
|
|
61632
|
+
formData.additionalDetails.connectionExecutionDate = formData.connectionExecutionDate;
|
|
61633
|
+
const supDocs = (formDetails === null || formDetails === void 0 ? void 0 : formDetails.supportingDocuments) || (data === null || data === void 0 ? void 0 : data.supportingDocuments);
|
|
61634
|
+
const docsList = Array.isArray(supDocs === null || supDocs === void 0 ? void 0 : supDocs.documents) ? supDocs.documents : Array.isArray(supDocs) ? supDocs : [];
|
|
61635
|
+
const meterPhotoObj = (supDocs === null || supDocs === void 0 ? void 0 : supDocs.meterPhoto) || (data === null || data === void 0 ? void 0 : (_data$supportingDocum = data.supportingDocuments) === null || _data$supportingDocum === void 0 ? void 0 : _data$supportingDocum.meterPhoto) || docsList.find(d => (d === null || d === void 0 ? void 0 : d.documentType) === "METER_PHOTO") || (Array.isArray(supDocs) ? supDocs[0] : null);
|
|
61636
|
+
const meterWarrantyObj = (supDocs === null || supDocs === void 0 ? void 0 : supDocs.meterWarranty) || (data === null || data === void 0 ? void 0 : (_data$supportingDocum2 = data.supportingDocuments) === null || _data$supportingDocum2 === void 0 ? void 0 : _data$supportingDocum2.meterWarranty) || docsList.find(d => (d === null || d === void 0 ? void 0 : d.documentType) === "METER_WARRANTY_CARD_TESTING_REPORT_INVOICE");
|
|
61637
|
+
const plumberDeclObj = (supDocs === null || supDocs === void 0 ? void 0 : supDocs.plumberDeclaration) || (data === null || data === void 0 ? void 0 : (_data$supportingDocum3 = data.supportingDocuments) === null || _data$supportingDocum3 === void 0 ? void 0 : _data$supportingDocum3.plumberDeclaration) || docsList.find(d => (d === null || d === void 0 ? void 0 : d.documentType) === "DECLARATION_OF_LICENSED_PLUMBER");
|
|
61638
|
+
const meterPhotoId = meterPhotoObj === null || meterPhotoObj === void 0 ? void 0 : meterPhotoObj.fileStoreId;
|
|
61639
|
+
const meterWarrantyId = meterWarrantyObj === null || meterWarrantyObj === void 0 ? void 0 : meterWarrantyObj.fileStoreId;
|
|
61640
|
+
const plumberDeclId = plumberDeclObj === null || plumberDeclObj === void 0 ? void 0 : plumberDeclObj.fileStoreId;
|
|
61641
|
+
if (meterPhotoId) {
|
|
61642
|
+
formData.additionalDetails.meterPhotoFileStoreId = meterPhotoId;
|
|
61643
|
+
formData.additionalDetails.meterPhoto = {
|
|
61644
|
+
fileStoreId: meterPhotoId,
|
|
61645
|
+
documentType: "METER_PHOTO",
|
|
61646
|
+
fileName: (meterPhotoObj === null || meterPhotoObj === void 0 ? void 0 : meterPhotoObj.fileName) || "Meter_Photo"
|
|
61647
|
+
};
|
|
61648
|
+
}
|
|
61649
|
+
if (meterWarrantyId) {
|
|
61650
|
+
formData.additionalDetails.meterWarrantyFileStoreId = meterWarrantyId;
|
|
61651
|
+
formData.additionalDetails.meterWarranty = {
|
|
61652
|
+
fileStoreId: meterWarrantyId,
|
|
61653
|
+
documentType: "METER_WARRANTY_CARD_TESTING_REPORT_INVOICE",
|
|
61654
|
+
fileName: (meterWarrantyObj === null || meterWarrantyObj === void 0 ? void 0 : meterWarrantyObj.fileName) || "Meter_Warranty_Card_Testing_Report_Invoice"
|
|
61655
|
+
};
|
|
61656
|
+
}
|
|
61657
|
+
if (plumberDeclId) {
|
|
61658
|
+
formData.additionalDetails.plumberDeclarationFileStoreId = plumberDeclId;
|
|
61659
|
+
formData.additionalDetails.plumberDeclaration = {
|
|
61660
|
+
fileStoreId: plumberDeclId,
|
|
61661
|
+
documentType: "DECLARATION_OF_LICENSED_PLUMBER",
|
|
61662
|
+
fileName: (plumberDeclObj === null || plumberDeclObj === void 0 ? void 0 : plumberDeclObj.fileName) || "Declaration_Of_Licensed_Plumber"
|
|
61663
|
+
};
|
|
61664
|
+
}
|
|
61665
|
+
const wfDocs = [];
|
|
61666
|
+
if (meterPhotoId) {
|
|
61667
|
+
wfDocs.push({
|
|
61668
|
+
documentType: "METER_PHOTO",
|
|
61669
|
+
fileStoreId: meterPhotoId,
|
|
61670
|
+
fileName: (meterPhotoObj === null || meterPhotoObj === void 0 ? void 0 : meterPhotoObj.fileName) || "Meter_Photo"
|
|
61161
61671
|
});
|
|
61162
|
-
|
|
61163
|
-
|
|
61164
|
-
|
|
61165
|
-
|
|
61166
|
-
|
|
61167
|
-
|
|
61168
|
-
|
|
61169
|
-
|
|
61170
|
-
|
|
61171
|
-
|
|
61172
|
-
|
|
61173
|
-
|
|
61174
|
-
|
|
61175
|
-
|
|
61176
|
-
|
|
61177
|
-
|
|
61178
|
-
|
|
61179
|
-
|
|
61180
|
-
|
|
61181
|
-
|
|
61182
|
-
|
|
61183
|
-
|
|
61184
|
-
|
|
61185
|
-
|
|
61186
|
-
|
|
61187
|
-
|
|
61188
|
-
|
|
61189
|
-
|
|
61190
|
-
|
|
61191
|
-
|
|
61192
|
-
|
|
61193
|
-
|
|
61194
|
-
|
|
61195
|
-
|
|
61196
|
-
|
|
61197
|
-
|
|
61198
|
-
|
|
61199
|
-
|
|
61200
|
-
|
|
61201
|
-
|
|
61202
|
-
|
|
61203
|
-
|
|
61204
|
-
|
|
61205
|
-
|
|
61206
|
-
|
|
61207
|
-
|
|
61208
|
-
|
|
61209
|
-
|
|
61210
|
-
|
|
61211
|
-
|
|
61212
|
-
|
|
61213
|
-
|
|
61214
|
-
|
|
61215
|
-
|
|
61216
|
-
|
|
61217
|
-
|
|
61218
|
-
|
|
61219
|
-
|
|
61220
|
-
|
|
61221
|
-
|
|
61222
|
-
|
|
61223
|
-
|
|
61224
|
-
|
|
61225
|
-
|
|
61226
|
-
|
|
61227
|
-
|
|
61228
|
-
|
|
61229
|
-
|
|
61230
|
-
|
|
61231
|
-
|
|
61232
|
-
|
|
61233
|
-
|
|
61234
|
-
|
|
61235
|
-
|
|
61236
|
-
|
|
61237
|
-
|
|
61238
|
-
|
|
61239
|
-
|
|
61240
|
-
setShowToast({
|
|
61241
|
-
key: false,
|
|
61242
|
-
message: "WS_ACTIVATE_SUCCESS_MESSAGE_MAIN"
|
|
61243
|
-
});
|
|
61244
|
-
setIsAppDetailsPage(true);
|
|
61245
|
-
}
|
|
61246
|
-
});
|
|
61247
|
-
}
|
|
61248
|
-
}
|
|
61249
|
-
if (!formData.additionalDetails) formData.additionalDetails = {};
|
|
61250
|
-
formData.additionalDetails.initialMeterReading = (actObj === null || actObj === void 0 ? void 0 : actObj.meterInitialReading) !== undefined && (actObj === null || actObj === void 0 ? void 0 : actObj.meterInitialReading) !== "" ? actObj.meterInitialReading : "0";
|
|
61251
|
-
const _temp = function () {
|
|
61252
|
-
if (actObj !== null && actObj !== void 0 && actObj.connectionExecutionDate) return Promise.resolve(getConvertedDate(actObj === null || actObj === void 0 ? void 0 : actObj.connectionExecutionDate)).then(function (_getConvertedDate2) {
|
|
61253
|
-
formData.connectionExecutionDate = _getConvertedDate2;
|
|
61254
|
-
});
|
|
61255
|
-
}();
|
|
61256
|
-
return _temp && _temp.then ? _temp.then(_temp2) : _temp2(_temp);
|
|
61257
|
-
}
|
|
61258
|
-
const formDetails = cloneDeep_1(data);
|
|
61259
|
-
const baseAppData = (appDetails === null || appDetails === void 0 ? void 0 : appDetails.applicationData) || (appDetails !== null && appDetails !== void 0 && appDetails.applicationNo ? appDetails : null) || ((_details4 = details) === null || _details4 === void 0 ? void 0 : _details4.applicationData) || initialAppData || {};
|
|
61260
|
-
const formData = cloneDeep_1(baseAppData);
|
|
61261
|
-
if (formDetails !== null && formDetails !== void 0 && (_formDetails$connecti = formDetails.connectionDetails) !== null && _formDetails$connecti !== void 0 && (_formDetails$connecti2 = _formDetails$connecti[0]) !== null && _formDetails$connecti2 !== void 0 && (_formDetails$connecti3 = _formDetails$connecti2.connectionType) !== null && _formDetails$connecti3 !== void 0 && _formDetails$connecti3.code) formData.connectionType = formDetails === null || formDetails === void 0 ? void 0 : (_formDetails$connecti4 = formDetails.connectionDetails) === null || _formDetails$connecti4 === void 0 ? void 0 : (_formDetails$connecti5 = _formDetails$connecti4[0]) === null || _formDetails$connecti5 === void 0 ? void 0 : (_formDetails$connecti6 = _formDetails$connecti5.connectionType) === null || _formDetails$connecti6 === void 0 ? void 0 : _formDetails$connecti6.code;
|
|
61262
|
-
if (formDetails !== null && formDetails !== void 0 && (_formDetails$connecti7 = formDetails.connectionDetails) !== null && _formDetails$connecti7 !== void 0 && (_formDetails$connecti8 = _formDetails$connecti7[0]) !== null && _formDetails$connecti8 !== void 0 && (_formDetails$connecti9 = _formDetails$connecti8.waterSource) !== null && _formDetails$connecti9 !== void 0 && _formDetails$connecti9.code) formData.waterSource = formDetails === null || formDetails === void 0 ? void 0 : (_formDetails$connecti0 = formDetails.connectionDetails) === null || _formDetails$connecti0 === void 0 ? void 0 : (_formDetails$connecti1 = _formDetails$connecti0[0]) === null || _formDetails$connecti1 === void 0 ? void 0 : (_formDetails$connecti10 = _formDetails$connecti1.sourceSubData) === null || _formDetails$connecti10 === void 0 ? void 0 : _formDetails$connecti10.code;
|
|
61263
|
-
if (formDetails !== null && formDetails !== void 0 && (_formDetails$connecti11 = formDetails.connectionDetails) !== null && _formDetails$connecti11 !== void 0 && (_formDetails$connecti12 = _formDetails$connecti11[0]) !== null && _formDetails$connecti12 !== void 0 && (_formDetails$connecti13 = _formDetails$connecti12.pipeSize) !== null && _formDetails$connecti13 !== void 0 && _formDetails$connecti13.size) formData.pipeSize = formDetails === null || formDetails === void 0 ? void 0 : (_formDetails$connecti14 = formDetails.connectionDetails) === null || _formDetails$connecti14 === void 0 ? void 0 : (_formDetails$connecti15 = _formDetails$connecti14[0]) === null || _formDetails$connecti15 === void 0 ? void 0 : (_formDetails$connecti16 = _formDetails$connecti15.pipeSize) === null || _formDetails$connecti16 === void 0 ? void 0 : _formDetails$connecti16.size;
|
|
61264
|
-
if (formDetails !== null && formDetails !== void 0 && (_formDetails$connecti17 = formDetails.connectionDetails) !== null && _formDetails$connecti17 !== void 0 && (_formDetails$connecti18 = _formDetails$connecti17[0]) !== null && _formDetails$connecti18 !== void 0 && _formDetails$connecti18.noOfTaps) formData.noOfTaps = formDetails === null || formDetails === void 0 ? void 0 : (_formDetails$connecti19 = formDetails.connectionDetails) === null || _formDetails$connecti19 === void 0 ? void 0 : (_formDetails$connecti20 = _formDetails$connecti19[0]) === null || _formDetails$connecti20 === void 0 ? void 0 : _formDetails$connecti20.noOfTaps;
|
|
61265
|
-
if (formDetails !== null && formDetails !== void 0 && (_formDetails$connecti21 = formDetails.connectionDetails) !== null && _formDetails$connecti21 !== void 0 && (_formDetails$connecti22 = _formDetails$connecti21[0]) !== null && _formDetails$connecti22 !== void 0 && _formDetails$connecti22.noOfWaterClosets) formData.noOfWaterClosets = formDetails === null || formDetails === void 0 ? void 0 : (_formDetails$connecti23 = formDetails.connectionDetails) === null || _formDetails$connecti23 === void 0 ? void 0 : (_formDetails$connecti24 = _formDetails$connecti23[0]) === null || _formDetails$connecti24 === void 0 ? void 0 : _formDetails$connecti24.noOfWaterClosets;
|
|
61266
|
-
if (formDetails !== null && formDetails !== void 0 && (_formDetails$connecti25 = formDetails.connectionDetails) !== null && _formDetails$connecti25 !== void 0 && (_formDetails$connecti26 = _formDetails$connecti25[0]) !== null && _formDetails$connecti26 !== void 0 && _formDetails$connecti26.noOfToilets) formData.noOfToilets = formDetails === null || formDetails === void 0 ? void 0 : (_formDetails$connecti27 = formDetails.connectionDetails) === null || _formDetails$connecti27 === void 0 ? void 0 : (_formDetails$connecti28 = _formDetails$connecti27[0]) === null || _formDetails$connecti28 === void 0 ? void 0 : _formDetails$connecti28.noOfToilets;
|
|
61267
|
-
if (formDetails !== null && formDetails !== void 0 && (_formDetails$plumberD = formDetails.plumberDetails) !== null && _formDetails$plumberD !== void 0 && (_formDetails$plumberD2 = _formDetails$plumberD[0]) !== null && _formDetails$plumberD2 !== void 0 && (_formDetails$plumberD3 = _formDetails$plumberD2.detailsProvidedBy) !== null && _formDetails$plumberD3 !== void 0 && _formDetails$plumberD3.code) {
|
|
61268
|
-
var _formDetails$plumberD4, _formDetails$plumberD5, _formDetails$plumberD6;
|
|
61269
|
-
if (!formData.additionalDetails) formData.additionalDetails = {};
|
|
61270
|
-
formData.additionalDetails.detailsProvidedBy = formDetails === null || formDetails === void 0 ? void 0 : (_formDetails$plumberD4 = formDetails.plumberDetails) === null || _formDetails$plumberD4 === void 0 ? void 0 : (_formDetails$plumberD5 = _formDetails$plumberD4[0]) === null || _formDetails$plumberD5 === void 0 ? void 0 : (_formDetails$plumberD6 = _formDetails$plumberD5.detailsProvidedBy) === null || _formDetails$plumberD6 === void 0 ? void 0 : _formDetails$plumberD6.code;
|
|
61672
|
+
}
|
|
61673
|
+
if (meterWarrantyId) {
|
|
61674
|
+
wfDocs.push({
|
|
61675
|
+
documentType: "METER_WARRANTY_CARD_TESTING_REPORT_INVOICE",
|
|
61676
|
+
fileStoreId: meterWarrantyId,
|
|
61677
|
+
fileName: (meterWarrantyObj === null || meterWarrantyObj === void 0 ? void 0 : meterWarrantyObj.fileName) || "Meter_Warranty_Card_Testing_Report_Invoice"
|
|
61678
|
+
});
|
|
61679
|
+
}
|
|
61680
|
+
if (plumberDeclId) {
|
|
61681
|
+
wfDocs.push({
|
|
61682
|
+
documentType: "DECLARATION_OF_LICENSED_PLUMBER",
|
|
61683
|
+
fileStoreId: plumberDeclId,
|
|
61684
|
+
fileName: (plumberDeclObj === null || plumberDeclObj === void 0 ? void 0 : plumberDeclObj.fileName) || "Declaration_Of_Licensed_Plumber"
|
|
61685
|
+
});
|
|
61686
|
+
}
|
|
61687
|
+
if (wfDocs.length === 0 && meterPhotoId) {
|
|
61688
|
+
wfDocs.push({
|
|
61689
|
+
documentType: "Document - 1",
|
|
61690
|
+
fileStoreId: meterPhotoId
|
|
61691
|
+
});
|
|
61692
|
+
}
|
|
61693
|
+
formData.comment = (formDetails === null || formDetails === void 0 ? void 0 : (_formDetails$comments = formDetails.comments) === null || _formDetails$comments === void 0 ? void 0 : _formDetails$comments.comments) || "";
|
|
61694
|
+
formData.comments = (formDetails === null || formDetails === void 0 ? void 0 : (_formDetails$comments2 = formDetails.comments) === null || _formDetails$comments2 === void 0 ? void 0 : _formDetails$comments2.comments) || "";
|
|
61695
|
+
const isPendingActivation = (formData === null || formData === void 0 ? void 0 : (_formData$application = formData.applicationStatus) === null || _formData$application === void 0 ? void 0 : _formData$application.includes("PENDING_FOR_CONNECTION_ACTIVATION")) || (baseAppData === null || baseAppData === void 0 ? void 0 : (_baseAppData$applicat = baseAppData.applicationStatus) === null || _baseAppData$applicat === void 0 ? void 0 : _baseAppData$applicat.includes("PENDING_FOR_CONNECTION_ACTIVATION")) || (filters === null || filters === void 0 ? void 0 : filters.action) === "ACTIVATE_CONNECTION" || ((_state54 = state) === null || _state54 === void 0 ? void 0 : _state54.action) === "ACTIVATE_CONNECTION";
|
|
61696
|
+
const isPendingMeter = !isPendingActivation && ((formData === null || formData === void 0 ? void 0 : (_formData$application2 = formData.applicationStatus) === null || _formData$application2 === void 0 ? void 0 : _formData$application2.includes("PENDING_FOR_METER_INSTALLATION")) || (baseAppData === null || baseAppData === void 0 ? void 0 : (_baseAppData$applicat2 = baseAppData.applicationStatus) === null || _baseAppData$applicat2 === void 0 ? void 0 : _baseAppData$applicat2.includes("PENDING_FOR_METER_INSTALLATION")) || (filters === null || filters === void 0 ? void 0 : filters.action) === "ENTER_METER_DETAILS" || ((_state55 = state) === null || _state55 === void 0 ? void 0 : _state55.action) === "ENTER_METER_DETAILS");
|
|
61697
|
+
const currentAction = isPendingActivation ? "ACTIVATE_CONNECTION" : isPendingMeter ? "ENTER_METER_DETAILS" : (filters === null || filters === void 0 ? void 0 : filters.action) || "ACTIVATE_CONNECTION";
|
|
61698
|
+
formData.action = currentAction;
|
|
61699
|
+
formData.wfDocuments = wfDocs;
|
|
61700
|
+
formData.processInstance = {
|
|
61701
|
+
action: currentAction,
|
|
61702
|
+
comment: (formDetails === null || formDetails === void 0 ? void 0 : (_formDetails$comments3 = formDetails.comments) === null || _formDetails$comments3 === void 0 ? void 0 : _formDetails$comments3.comments) || "",
|
|
61703
|
+
documents: wfDocs
|
|
61704
|
+
};
|
|
61705
|
+
const existingDocs = Array.isArray(formData.documents) ? formData.documents.filter(d => !["METER_PHOTO", "METER_WARRANTY_CARD_TESTING_REPORT_INVOICE", "DECLARATION_OF_LICENSED_PLUMBER", "Document - 1"].includes(d === null || d === void 0 ? void 0 : d.documentType)) : [];
|
|
61706
|
+
formData.documents = [...existingDocs, ...wfDocs.map(d => ({
|
|
61707
|
+
documentType: d.documentType,
|
|
61708
|
+
fileStoreId: d.fileStoreId,
|
|
61709
|
+
documentUid: d.fileStoreId,
|
|
61710
|
+
fileName: d.fileName,
|
|
61711
|
+
status: "ACTIVE"
|
|
61712
|
+
}))];
|
|
61713
|
+
const isWater = filters !== null && filters !== void 0 && filters.service ? filters.service.toUpperCase() === "WATER" : (formData === null || formData === void 0 ? void 0 : formData.serviceType) === "WATER" || !(formData !== null && formData !== void 0 && formData.serviceType);
|
|
61714
|
+
const isReconnection = (formData === null || formData === void 0 ? void 0 : (_formData$application3 = formData.applicationType) === null || _formData$application3 === void 0 ? void 0 : _formData$application3.includes("RECONNECT")) || (formData === null || formData === void 0 ? void 0 : (_formData$application4 = formData.applicationNo) === null || _formData$application4 === void 0 ? void 0 : _formData$application4.includes("RC"));
|
|
61715
|
+
if (isWater) {
|
|
61716
|
+
formData.waterSource = "GROUND.WELL";
|
|
61717
|
+
formData.proposedPipeSize = 0;
|
|
61718
|
+
formData.proposedTaps = 0;
|
|
61719
|
+
formData.pipeSize = 0;
|
|
61720
|
+
formData.noOfTaps = 0;
|
|
61721
|
+
formData.connectionType = "Metered";
|
|
61722
|
+
if (!formData.additionalDetails) formData.additionalDetails = {};
|
|
61723
|
+
formData.additionalDetails.connectionType = "Permanent";
|
|
61724
|
+
}
|
|
61725
|
+
const reqDetails = isWater ? isReconnection ? {
|
|
61726
|
+
WaterConnection: formData,
|
|
61727
|
+
reconnectRequest: true,
|
|
61728
|
+
disconnectRequest: false
|
|
61729
|
+
} : {
|
|
61730
|
+
WaterConnection: formData,
|
|
61731
|
+
reconnectRequest: false,
|
|
61732
|
+
disconnectRequest: false
|
|
61733
|
+
} : isReconnection ? {
|
|
61734
|
+
SewerageConnection: formData,
|
|
61735
|
+
reconnectRequest: true,
|
|
61736
|
+
disconnectRequest: false
|
|
61737
|
+
} : {
|
|
61738
|
+
SewerageConnection: formData,
|
|
61739
|
+
reconnectRequest: false,
|
|
61740
|
+
disconnectRequest: false
|
|
61741
|
+
};
|
|
61742
|
+
const targetConn = (reqDetails === null || reqDetails === void 0 ? void 0 : reqDetails.WaterConnection) || (reqDetails === null || reqDetails === void 0 ? void 0 : reqDetails.SewerageConnection);
|
|
61743
|
+
if (targetConn) {
|
|
61744
|
+
if (isWater) {
|
|
61745
|
+
targetConn.waterSource = "GROUND.WELL";
|
|
61746
|
+
targetConn.proposedPipeSize = 0;
|
|
61747
|
+
targetConn.proposedTaps = 0;
|
|
61748
|
+
targetConn.pipeSize = 0;
|
|
61749
|
+
targetConn.noOfTaps = 0;
|
|
61271
61750
|
}
|
|
61272
|
-
|
|
61273
|
-
if (
|
|
61274
|
-
|
|
61275
|
-
|
|
61276
|
-
|
|
61277
|
-
|
|
61278
|
-
|
|
61279
|
-
|
|
61280
|
-
|
|
61281
|
-
|
|
61282
|
-
|
|
61283
|
-
|
|
61751
|
+
targetConn.connectionType = "Metered";
|
|
61752
|
+
if (!targetConn.additionalDetails) targetConn.additionalDetails = {};
|
|
61753
|
+
targetConn.additionalDetails.connectionType = "Permanent";
|
|
61754
|
+
targetConn.meterId = formData.meterId;
|
|
61755
|
+
targetConn.meterNo = formData.meterNo;
|
|
61756
|
+
targetConn.meterMake = formData.meterMake;
|
|
61757
|
+
targetConn.meterSize = formData.meterSize;
|
|
61758
|
+
targetConn.ferruleSize = formData.ferruleSize;
|
|
61759
|
+
targetConn.initialMeterReading = formData.initialMeterReading;
|
|
61760
|
+
targetConn.meterInstallationDate = formData.meterInstallationDate;
|
|
61761
|
+
targetConn.connectionExecutionDate = formData.connectionExecutionDate;
|
|
61762
|
+
targetConn.additionalDetails = {
|
|
61763
|
+
...targetConn.additionalDetails,
|
|
61764
|
+
...formData.additionalDetails
|
|
61765
|
+
};
|
|
61766
|
+
targetConn.wfDocuments = formData.wfDocuments;
|
|
61767
|
+
targetConn.documents = formData.documents;
|
|
61768
|
+
targetConn.processInstance = formData.processInstance;
|
|
61769
|
+
targetConn.plumberInfo = formData.plumberInfo;
|
|
61770
|
+
if (formData.nameOfJEOrFirm) targetConn.nameOfJEOrFirm = formData.nameOfJEOrFirm;
|
|
61771
|
+
}
|
|
61772
|
+
if (mutate) {
|
|
61773
|
+
mutate(reqDetails, {
|
|
61774
|
+
onError: (error, variables) => {
|
|
61775
|
+
setShowToast({
|
|
61776
|
+
key: "error",
|
|
61777
|
+
message: error !== null && error !== void 0 && error.message ? error.message : error
|
|
61778
|
+
});
|
|
61779
|
+
setTimeout(closeToastOfError, 5000);
|
|
61780
|
+
},
|
|
61781
|
+
onSuccess: (data, variables) => {
|
|
61782
|
+
setShowToast({
|
|
61783
|
+
key: false,
|
|
61784
|
+
message: "WS_ACTIVATE_SUCCESS_MESSAGE_MAIN"
|
|
61785
|
+
});
|
|
61786
|
+
setIsAppDetailsPage(true);
|
|
61787
|
+
}
|
|
61788
|
+
});
|
|
61284
61789
|
}
|
|
61285
|
-
}
|
|
61790
|
+
}
|
|
61791
|
+
return Promise.resolve();
|
|
61286
61792
|
} catch (e) {
|
|
61287
61793
|
return Promise.reject(e);
|
|
61288
61794
|
}
|
|
61289
61795
|
};
|
|
61290
|
-
const isPendingActivation = (filters === null || filters === void 0 ? void 0 : filters.action) === "ACTIVATE_CONNECTION" || ((
|
|
61291
|
-
const isPendingMeter = !isPendingActivation && ((filters === null || filters === void 0 ? void 0 : filters.action) === "ENTER_METER_DETAILS" || ((
|
|
61796
|
+
const isPendingActivation = (filters === null || filters === void 0 ? void 0 : filters.action) === "ACTIVATE_CONNECTION" || ((_state56 = state) === null || _state56 === void 0 ? void 0 : _state56.action) === "ACTIVATE_CONNECTION" || (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a5 = applicationDetails.applicationData) === null || _applicationDetails$a5 === void 0 ? void 0 : (_applicationDetails$a6 = _applicationDetails$a5.applicationStatus) === null || _applicationDetails$a6 === void 0 ? void 0 : _applicationDetails$a6.includes("PENDING_FOR_CONNECTION_ACTIVATION")) || (initialAppData === null || initialAppData === void 0 ? void 0 : (_initialAppData$appli3 = initialAppData.applicationStatus) === null || _initialAppData$appli3 === void 0 ? void 0 : _initialAppData$appli3.includes("PENDING_FOR_CONNECTION_ACTIVATION")) || ((_details5 = details) === null || _details5 === void 0 ? void 0 : (_details5$application = _details5.applicationData) === null || _details5$application === void 0 ? void 0 : (_details5$application2 = _details5$application.applicationStatus) === null || _details5$application2 === void 0 ? void 0 : _details5$application2.includes("PENDING_FOR_CONNECTION_ACTIVATION")) || (appDetails === null || appDetails === void 0 ? void 0 : (_appDetails$applicati = appDetails.applicationStatus) === null || _appDetails$applicati === void 0 ? void 0 : _appDetails$applicati.includes("PENDING_FOR_CONNECTION_ACTIVATION"));
|
|
61797
|
+
const isPendingMeter = !isPendingActivation && ((filters === null || filters === void 0 ? void 0 : filters.action) === "ENTER_METER_DETAILS" || ((_state57 = state) === null || _state57 === void 0 ? void 0 : _state57.action) === "ENTER_METER_DETAILS" || (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a7 = applicationDetails.applicationData) === null || _applicationDetails$a7 === void 0 ? void 0 : (_applicationDetails$a8 = _applicationDetails$a7.applicationStatus) === null || _applicationDetails$a8 === void 0 ? void 0 : _applicationDetails$a8.includes("PENDING_FOR_METER_INSTALLATION")) || (initialAppData === null || initialAppData === void 0 ? void 0 : (_initialAppData$appli4 = initialAppData.applicationStatus) === null || _initialAppData$appli4 === void 0 ? void 0 : _initialAppData$appli4.includes("PENDING_FOR_METER_INSTALLATION")) || ((_details6 = details) === null || _details6 === void 0 ? void 0 : (_details6$application = _details6.applicationData) === null || _details6$application === void 0 ? void 0 : (_details6$application2 = _details6$application.applicationStatus) === null || _details6$application2 === void 0 ? void 0 : _details6$application2.includes("PENDING_FOR_METER_INSTALLATION")) || (appDetails === null || appDetails === void 0 ? void 0 : (_appDetails$applicati2 = appDetails.applicationStatus) === null || _appDetails$applicati2 === void 0 ? void 0 : _appDetails$applicati2.includes("PENDING_FOR_METER_INSTALLATION")));
|
|
61292
61798
|
const getActionLabel = () => {
|
|
61293
61799
|
if (isPendingActivation) {
|
|
61294
61800
|
return t("WF_EMPLOYEE_NEWSW1_ACTIVATE_CONNECTION") && t("WF_EMPLOYEE_NEWSW1_ACTIVATE_CONNECTION") !== "WF_EMPLOYEE_NEWSW1_ACTIVATE_CONNECTION" ? t("WF_EMPLOYEE_NEWSW1_ACTIVATE_CONNECTION") : t("WS_ACTIVATE_CONNECTION") && t("WS_ACTIVATE_CONNECTION") !== "WS_ACTIVATE_CONNECTION" ? t("WS_ACTIVATE_CONNECTION") : "Activate Connection";
|
|
@@ -61329,6 +61835,7 @@ const ActivateConnection = () => {
|
|
|
61329
61835
|
onSubmit: onSubmit,
|
|
61330
61836
|
label: getActionLabel(),
|
|
61331
61837
|
onFormValueChange: onFormValueChange,
|
|
61838
|
+
isDisabled: !canSubmit,
|
|
61332
61839
|
noBreakLine: true,
|
|
61333
61840
|
noCard: true
|
|
61334
61841
|
}), showToast && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
|
|
@@ -68697,9 +69204,8 @@ const CheckPage$4 = _ref2 => {
|
|
|
68697
69204
|
declarationData: declarationData
|
|
68698
69205
|
},
|
|
68699
69206
|
userType: "employee"
|
|
68700
|
-
})), ((
|
|
68701
|
-
const
|
|
68702
|
-
const isSubmitDisabled = !(declarationData !== null && declarationData !== void 0 && declarationData.agree) || !hasSignature;
|
|
69207
|
+
})), (() => {
|
|
69208
|
+
const isSubmitDisabled = !(declarationData !== null && declarationData !== void 0 && declarationData.agree);
|
|
68703
69209
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.ActionBar, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
68704
69210
|
label: t("CS_COMMON_SUBMIT"),
|
|
68705
69211
|
onSubmit: () => {
|
|
@@ -69171,20 +69677,9 @@ const OLDApplication = () => {
|
|
|
69171
69677
|
return;
|
|
69172
69678
|
}
|
|
69173
69679
|
}
|
|
69174
|
-
const hasPhoto = allSubmitDocs.some(d => {
|
|
69175
|
-
var _d$documentType3;
|
|
69176
|
-
return ((d === null || d === void 0 ? void 0 : d.documentType) === "OWNER.PHOTO" || (d === null || d === void 0 ? void 0 : (_d$documentType3 = d.documentType) === null || _d$documentType3 === void 0 ? void 0 : _d$documentType3.includes("PHOTO")) || (d === null || d === void 0 ? void 0 : d.documentType) === "OWNER.APPLICANTPHOTO") && ((d === null || d === void 0 ? void 0 : d.fileStoreId) || (d === null || d === void 0 ? void 0 : d.file));
|
|
69177
|
-
});
|
|
69178
|
-
if (!hasPhoto) {
|
|
69179
|
-
setShowToast({
|
|
69180
|
-
key: "error",
|
|
69181
|
-
message: t("WS_PHOTO_MANDATORY") || "Applicant Photo is mandatory"
|
|
69182
|
-
});
|
|
69183
|
-
return;
|
|
69184
|
-
}
|
|
69185
69680
|
const hasIdentity = allSubmitDocs.some(d => {
|
|
69186
|
-
var _d$
|
|
69187
|
-
return ((d === null || d === void 0 ? void 0 : (_d$
|
|
69681
|
+
var _d$documentType3, _d$documentType4;
|
|
69682
|
+
return ((d === null || d === void 0 ? void 0 : (_d$documentType3 = d.documentType) === null || _d$documentType3 === void 0 ? void 0 : _d$documentType3.includes("IDENTITYPROOF")) || (d === null || d === void 0 ? void 0 : (_d$documentType4 = d.documentType) === null || _d$documentType4 === void 0 ? void 0 : _d$documentType4.includes("IDENTITY"))) && ((d === null || d === void 0 ? void 0 : d.fileStoreId) || (d === null || d === void 0 ? void 0 : d.file));
|
|
69188
69683
|
});
|
|
69189
69684
|
if (!hasIdentity) {
|
|
69190
69685
|
setShowToast({
|
|
@@ -69194,8 +69689,8 @@ const OLDApplication = () => {
|
|
|
69194
69689
|
return;
|
|
69195
69690
|
}
|
|
69196
69691
|
const hasOwnership = allSubmitDocs.some(d => {
|
|
69197
|
-
var _d$
|
|
69198
|
-
return ((d === null || d === void 0 ? void 0 : (_d$
|
|
69692
|
+
var _d$documentType5, _d$documentType6;
|
|
69693
|
+
return ((d === null || d === void 0 ? void 0 : (_d$documentType5 = d.documentType) === null || _d$documentType5 === void 0 ? void 0 : _d$documentType5.includes("ADDRESSPROOF")) || (d === null || d === void 0 ? void 0 : (_d$documentType6 = d.documentType) === null || _d$documentType6 === void 0 ? void 0 : _d$documentType6.includes("OWNERSHIP"))) && ((d === null || d === void 0 ? void 0 : d.fileStoreId) || (d === null || d === void 0 ? void 0 : d.file));
|
|
69199
69694
|
});
|
|
69200
69695
|
if (!hasOwnership) {
|
|
69201
69696
|
setShowToast({
|
|
@@ -69268,16 +69763,16 @@ const OLDApplication = () => {
|
|
|
69268
69763
|
var _docWithValidity$addi, _docWithValidity$addi2, _rwhDoc$additionalDet, _stpDoc$additionalDet;
|
|
69269
69764
|
const docs = data.DocumentsRequired.documents;
|
|
69270
69765
|
const identityDoc = docs.find(d => {
|
|
69271
|
-
var _d$
|
|
69272
|
-
return d === null || d === void 0 ? void 0 : (_d$
|
|
69766
|
+
var _d$documentType7;
|
|
69767
|
+
return d === null || d === void 0 ? void 0 : (_d$documentType7 = d.documentType) === null || _d$documentType7 === void 0 ? void 0 : _d$documentType7.includes("IDENTITYPROOF");
|
|
69273
69768
|
});
|
|
69274
69769
|
const ownershipDoc = docs.find(d => {
|
|
69275
|
-
var _d$
|
|
69276
|
-
return (d === null || d === void 0 ? void 0 : (_d$
|
|
69770
|
+
var _d$documentType8, _d$documentType9;
|
|
69771
|
+
return (d === null || d === void 0 ? void 0 : (_d$documentType8 = d.documentType) === null || _d$documentType8 === void 0 ? void 0 : _d$documentType8.includes("ADDRESSPROOF")) || (d === null || d === void 0 ? void 0 : (_d$documentType9 = d.documentType) === null || _d$documentType9 === void 0 ? void 0 : _d$documentType9.includes("OWNERSHIPPROOF"));
|
|
69277
69772
|
});
|
|
69278
69773
|
const otherDoc = docs.find(d => {
|
|
69279
|
-
var _d$
|
|
69280
|
-
return d === null || d === void 0 ? void 0 : (_d$
|
|
69774
|
+
var _d$documentType0;
|
|
69775
|
+
return d === null || d === void 0 ? void 0 : (_d$documentType0 = d.documentType) === null || _d$documentType0 === void 0 ? void 0 : _d$documentType0.includes("OTHERDOCUMENTS");
|
|
69281
69776
|
});
|
|
69282
69777
|
const docWithValidity = docs.find(d => {
|
|
69283
69778
|
var _d$additionalDetails, _d$additionalDetails2;
|
|
@@ -69301,11 +69796,11 @@ const OLDApplication = () => {
|
|
|
69301
69796
|
};
|
|
69302
69797
|
}
|
|
69303
69798
|
const djbDoc = (data === null || data === void 0 ? void 0 : (_data$djbEmployee = data.djbEmployee) === null || _data$djbEmployee === void 0 ? void 0 : (_data$djbEmployee$doc = _data$djbEmployee.document) === null || _data$djbEmployee$doc === void 0 ? void 0 : _data$djbEmployee$doc.fileStoreId) || typeof (data === null || data === void 0 ? void 0 : (_data$djbEmployee2 = data.djbEmployee) === null || _data$djbEmployee2 === void 0 ? void 0 : _data$djbEmployee2.document) === "string" && (data === null || data === void 0 ? void 0 : (_data$djbEmployee3 = data.djbEmployee) === null || _data$djbEmployee3 === void 0 ? void 0 : _data$djbEmployee3.document.trim()) || (data === null || data === void 0 ? void 0 : (_data$djbEmployee4 = data.djbEmployee) === null || _data$djbEmployee4 === void 0 ? void 0 : _data$djbEmployee4.document) || (data === null || data === void 0 ? void 0 : (_data$DocumentsRequir2 = data.DocumentsRequired) === null || _data$DocumentsRequir2 === void 0 ? void 0 : (_data$DocumentsRequir3 = _data$DocumentsRequir2.documents) === null || _data$DocumentsRequir3 === void 0 ? void 0 : (_data$DocumentsRequir4 = _data$DocumentsRequir3.find(d => {
|
|
69799
|
+
var _d$documentType1;
|
|
69800
|
+
return (d === null || d === void 0 ? void 0 : d.documentType) === "OWNER.DJB_EMPLOYEE_ID" || (d === null || d === void 0 ? void 0 : (_d$documentType1 = d.documentType) === null || _d$documentType1 === void 0 ? void 0 : _d$documentType1.includes("DJB_EMPLOYEE_ID"));
|
|
69801
|
+
})) === null || _data$DocumentsRequir4 === void 0 ? void 0 : _data$DocumentsRequir4.fileStoreId) || (data === null || data === void 0 ? void 0 : (_data$documents = data.documents) === null || _data$documents === void 0 ? void 0 : (_data$documents$docum = _data$documents.documents) === null || _data$documents$docum === void 0 ? void 0 : (_data$documents$docum2 = _data$documents$docum.find(d => {
|
|
69304
69802
|
var _d$documentType10;
|
|
69305
69803
|
return (d === null || d === void 0 ? void 0 : d.documentType) === "OWNER.DJB_EMPLOYEE_ID" || (d === null || d === void 0 ? void 0 : (_d$documentType10 = d.documentType) === null || _d$documentType10 === void 0 ? void 0 : _d$documentType10.includes("DJB_EMPLOYEE_ID"));
|
|
69306
|
-
})) === null || _data$DocumentsRequir4 === void 0 ? void 0 : _data$DocumentsRequir4.fileStoreId) || (data === null || data === void 0 ? void 0 : (_data$documents = data.documents) === null || _data$documents === void 0 ? void 0 : (_data$documents$docum = _data$documents.documents) === null || _data$documents$docum === void 0 ? void 0 : (_data$documents$docum2 = _data$documents$docum.find(d => {
|
|
69307
|
-
var _d$documentType11;
|
|
69308
|
-
return (d === null || d === void 0 ? void 0 : d.documentType) === "OWNER.DJB_EMPLOYEE_ID" || (d === null || d === void 0 ? void 0 : (_d$documentType11 = d.documentType) === null || _d$documentType11 === void 0 ? void 0 : _d$documentType11.includes("DJB_EMPLOYEE_ID"));
|
|
69309
69804
|
})) === null || _data$documents$docum2 === void 0 ? void 0 : _data$documents$docum2.fileStoreId);
|
|
69310
69805
|
if (djbDoc) {
|
|
69311
69806
|
if (!data.djbEmployee) data.djbEmployee = {};
|
|
@@ -69338,13 +69833,6 @@ const OLDApplication = () => {
|
|
|
69338
69833
|
var _data$declarationData, _data$declarationData2, _data$declarationData3, _data$declarationData4, _data$declarationData5, _data$declarationData6, _data$declarationData7, _data$declarationData8, _data$declarationData9, _data$declarationData0, _data$declarationData1, _data$declarationData10, _data$declarationData11, _data$declarationData12, _data$declarationData13, _data$declarationData14, _data$declarationData15;
|
|
69339
69834
|
const declarations = (_data$declarationData = data.declarationData) !== null && _data$declarationData !== void 0 && _data$declarationData.agree ? true : false;
|
|
69340
69835
|
const sigFsId = ((_data$declarationData2 = data.declarationData) === null || _data$declarationData2 === void 0 ? void 0 : _data$declarationData2.signatureFileStoreId) || ((_data$declarationData3 = data.declarationData) === null || _data$declarationData3 === void 0 ? void 0 : (_data$declarationData4 = _data$declarationData3.signatureFile) === null || _data$declarationData4 === void 0 ? void 0 : _data$declarationData4.fileStoreId) || (typeof ((_data$declarationData5 = data.declarationData) === null || _data$declarationData5 === void 0 ? void 0 : _data$declarationData5.signatureFile) === "string" ? (_data$declarationData6 = data.declarationData) === null || _data$declarationData6 === void 0 ? void 0 : _data$declarationData6.signatureFile : null) || ((_data$declarationData7 = data.declarationData) === null || _data$declarationData7 === void 0 ? void 0 : _data$declarationData7.signature) || null;
|
|
69341
|
-
if (!sigFsId) {
|
|
69342
|
-
setShowToast({
|
|
69343
|
-
key: "error",
|
|
69344
|
-
message: t("ERR_SIGNATURE_MANDATORY") || "Signature is mandatory to submit application"
|
|
69345
|
-
});
|
|
69346
|
-
return Promise.resolve();
|
|
69347
|
-
}
|
|
69348
69836
|
const sigFileName = ((_data$declarationData8 = data.declarationData) === null || _data$declarationData8 === void 0 ? void 0 : _data$declarationData8.signatureFileName) || ((_data$declarationData9 = data.declarationData) === null || _data$declarationData9 === void 0 ? void 0 : (_data$declarationData0 = _data$declarationData9.signatureFile) === null || _data$declarationData0 === void 0 ? void 0 : _data$declarationData0.name) || ((_data$declarationData1 = data.declarationData) === null || _data$declarationData1 === void 0 ? void 0 : (_data$declarationData10 = _data$declarationData1.signatureFile) === null || _data$declarationData10 === void 0 ? void 0 : _data$declarationData10.fileName) || "signature.png";
|
|
69349
69837
|
data.declaration = {
|
|
69350
69838
|
...data.declarationData,
|