@djb25/digit-ui-module-ws 1.0.105 → 1.0.106
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 +293 -74
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +293 -74
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -9610,7 +9610,7 @@ const getWSAcknowledgementData$2 = function (amendment, tenantInfo, t, tableData
|
|
|
9610
9610
|
};
|
|
9611
9611
|
|
|
9612
9612
|
const Response = () => {
|
|
9613
|
-
var _state$Amendment, _data$Amendments, _data$Amendments$, _data$Amendments2, _data$Amendments2$, _data$Amendments3, _data$Amendments3$;
|
|
9613
|
+
var _state$Amendment, _data$Amendments, _data$Amendments$, _data$Amendments2, _data$Amendments2$, _data$Amendments3, _data$Amendments3$, _data$Amendments4, _data$Amendments4$;
|
|
9614
9614
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
9615
9615
|
const {
|
|
9616
9616
|
state
|
|
@@ -9685,7 +9685,16 @@ const Response = () => {
|
|
|
9685
9685
|
justifyContent: "flex-end",
|
|
9686
9686
|
alignItems: "baseline"
|
|
9687
9687
|
}
|
|
9688
|
-
}, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
9688
|
+
}, (data === null || data === void 0 ? void 0 : (_data$Amendments4 = data.Amendments) === null || _data$Amendments4 === void 0 ? void 0 : (_data$Amendments4$ = _data$Amendments4[0]) === null || _data$Amendments4$ === void 0 ? void 0 : _data$Amendments4$.amendmentId) && /*#__PURE__*/React.createElement(SubmitBar, {
|
|
9689
|
+
label: t("CS_TITLE_GENERATE_NOTE"),
|
|
9690
|
+
onSubmit: () => {
|
|
9691
|
+
var _data$Amendments5, _data$Amendments5$;
|
|
9692
|
+
return history.push(`/digit-ui/employee/ws/generate-note-bill-amendment?applicationNumber=${data === null || data === void 0 ? void 0 : (_data$Amendments5 = data.Amendments) === null || _data$Amendments5 === void 0 ? void 0 : (_data$Amendments5$ = _data$Amendments5[0]) === null || _data$Amendments5$ === void 0 ? void 0 : _data$Amendments5$.amendmentId}`);
|
|
9693
|
+
},
|
|
9694
|
+
style: {
|
|
9695
|
+
marginRight: "1rem"
|
|
9696
|
+
}
|
|
9697
|
+
}), /*#__PURE__*/React.createElement(SubmitBar, {
|
|
9689
9698
|
label: t("CORE_COMMON_GO_TO_HOME"),
|
|
9690
9699
|
onSubmit: () => history.push(`/digit-ui/employee`),
|
|
9691
9700
|
style: {
|
|
@@ -11660,6 +11669,10 @@ const BILLSBreadCrumbs = _ref => {
|
|
|
11660
11669
|
path: "/digit-ui/employee/ws/water/bill-amendment/inbox",
|
|
11661
11670
|
label: t("ES_COMMON_BILL_AMEND_WATER_INBOX_LABEL"),
|
|
11662
11671
|
show: location.pathname.includes("/water/bill-amendment/inbox") ? true : false
|
|
11672
|
+
}, {
|
|
11673
|
+
path: "/digit-ui/employee/ws/water/bill-amendment/search-application",
|
|
11674
|
+
label: t("WS_BILL_AMENDMENT_SEARCH_APPLICATION", "Search Bill Amendment"),
|
|
11675
|
+
show: location.pathname.includes("/bill-amendment/search-application") ? true : false
|
|
11663
11676
|
}, {
|
|
11664
11677
|
path: "/digit-ui/employee/ws/sewerage/bill-amendment/inbox",
|
|
11665
11678
|
label: t("ES_COMMON_BILL_AMEND_SEWERAGE_INBOX_LABEL"),
|
|
@@ -11912,7 +11925,7 @@ const BILLSBreadCrumbs = _ref => {
|
|
|
11912
11925
|
}));
|
|
11913
11926
|
};
|
|
11914
11927
|
const App$1 = _ref2 => {
|
|
11915
|
-
var _Digit, _Digit$ComponentRegis, _Digit2, _Digit2$ComponentRegi, _Digit3, _Digit3$ComponentRegi, _Digit4, _Digit4$ComponentRegi, _Digit5, _Digit5$ComponentRegi, _Digit6, _Digit6$ComponentRegi, _Digit7, _Digit7$ComponentRegi, _Digit8, _Digit8$ComponentRegi, _Digit9, _Digit9$ComponentRegi, _Digit0, _Digit0$ComponentRegi, _Digit1, _Digit1$ComponentRegi, _Digit10, _Digit10$ComponentReg, _Digit11, _Digit11$ComponentReg, _Digit12, _Digit12$ComponentReg, _Digit13, _Digit13$ComponentReg, _Digit14, _Digit14$ComponentReg, _Digit15, _Digit15$ComponentReg, _Digit16, _Digit16$ComponentReg, _Digit17, _Digit17$ComponentReg, _Digit18, _Digit18$ComponentReg, _Digit19, _Digit19$ComponentReg, _Digit20, _Digit20$ComponentReg, _Digit21, _Digit21$ComponentReg, _Digit22, _Digit22$ComponentReg, _Digit23, _Digit23$ComponentReg, _Digit24, _Digit24$ComponentReg, _Digit25, _Digit25$ComponentReg, _Digit26, _Digit26$ComponentReg, _Digit27, _Digit27$ComponentReg, _Digit28, _Digit28$ComponentReg, _Digit29, _Digit29$ComponentReg, _Digit30, _Digit30$ComponentReg, _Digit31, _Digit31$ComponentReg;
|
|
11928
|
+
var _Digit, _Digit$ComponentRegis, _Digit2, _Digit2$ComponentRegi, _Digit3, _Digit3$ComponentRegi, _Digit4, _Digit4$ComponentRegi, _Digit5, _Digit5$ComponentRegi, _Digit6, _Digit6$ComponentRegi, _Digit7, _Digit7$ComponentRegi, _Digit8, _Digit8$ComponentRegi, _Digit9, _Digit9$ComponentRegi, _Digit0, _Digit0$ComponentRegi, _Digit1, _Digit1$ComponentRegi, _Digit10, _Digit10$ComponentReg, _Digit11, _Digit11$ComponentReg, _Digit12, _Digit12$ComponentReg, _Digit13, _Digit13$ComponentReg, _Digit14, _Digit14$ComponentReg, _Digit15, _Digit15$ComponentReg, _Digit16, _Digit16$ComponentReg, _Digit17, _Digit17$ComponentReg, _Digit18, _Digit18$ComponentReg, _Digit19, _Digit19$ComponentReg, _Digit20, _Digit20$ComponentReg, _Digit21, _Digit21$ComponentReg, _Digit22, _Digit22$ComponentReg, _Digit23, _Digit23$ComponentReg, _Digit24, _Digit24$ComponentReg, _Digit25, _Digit25$ComponentReg, _Digit26, _Digit26$ComponentReg, _Digit27, _Digit27$ComponentReg, _Digit28, _Digit28$ComponentReg, _Digit29, _Digit29$ComponentReg, _Digit30, _Digit30$ComponentReg, _Digit31, _Digit31$ComponentReg, _Digit32, _Digit32$ComponentReg;
|
|
11916
11929
|
let {
|
|
11917
11930
|
path
|
|
11918
11931
|
} = _ref2;
|
|
@@ -11991,6 +12004,7 @@ const App$1 = _ref2 => {
|
|
|
11991
12004
|
const CPTAcknowledgement = (_Digit29 = Digit) === null || _Digit29 === void 0 ? void 0 : (_Digit29$ComponentReg = _Digit29.ComponentRegistryService) === null || _Digit29$ComponentReg === void 0 ? void 0 : _Digit29$ComponentReg.getComponent("CPTAcknowledgement");
|
|
11992
12005
|
const WSInfoPage = (_Digit30 = Digit) === null || _Digit30 === void 0 ? void 0 : (_Digit30$ComponentReg = _Digit30.ComponentRegistryService) === null || _Digit30$ComponentReg === void 0 ? void 0 : _Digit30$ComponentReg.getComponent("WSInfoPage");
|
|
11993
12006
|
const WSExecuteDisconnection = (_Digit31 = Digit) === null || _Digit31 === void 0 ? void 0 : (_Digit31$ComponentReg = _Digit31.ComponentRegistryService) === null || _Digit31$ComponentReg === void 0 ? void 0 : _Digit31$ComponentReg.getComponent("WSExecuteDisconnection");
|
|
12007
|
+
const WSSearchBillAmendment = (_Digit32 = Digit) === null || _Digit32 === void 0 ? void 0 : (_Digit32$ComponentReg = _Digit32.ComponentRegistryService) === null || _Digit32$ComponentReg === void 0 ? void 0 : _Digit32$ComponentReg.getComponent("WSSearchBillAmendment");
|
|
11994
12008
|
const locationCheck = window.location.href.includes("/employee/ws/new-application") || window.location.href.includes("/employee/ws/modify-application") || window.location.href.includes("/employee/ws/mutation-application") || window.location.href.includes("/employee/ws/edit-application") || window.location.href.includes("/employee/ws/activate-connection") || window.location.href.includes("/employee/ws/application-details") || window.location.href.includes("/employee/ws/modify-details") || window.location.href.includes("/employee/ws/ws-response") || window.location.href.includes("/employee/ws/new-disconnection/application-form") || window.location.href.includes("/employee/ws/new-disconnection/k-number") || window.location.href.includes("/employee/ws/new-disconnection/consumer-details") || window.location.href.includes("/employee/ws/ws-disconnection-response") || window.location.href.includes("/employee/ws/consumption-details") || window.location.href.includes("/employee/ws/edit-disconnection-application") || window.location.href.includes("/employee/ws/config-by-disconnection-application") || window.location.href.includes("/employee/ws/resubmit-disconnection-application") || window.location.href.includes("/employee/ws/execute-disconnection") || window.location.href.includes("/employee/ws/water/bulk-bill");
|
|
11995
12009
|
const locationCheckReqDocs = window.location.href.includes("/employee/ws/create-application") || window.location.href.includes("/employee/ws/new-disconnection/docsrequired");
|
|
11996
12010
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -12087,6 +12101,11 @@ const App$1 = _ref2 => {
|
|
|
12087
12101
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
12088
12102
|
path: `${path}/activate-connection`,
|
|
12089
12103
|
component: WSActivateConnection
|
|
12104
|
+
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
12105
|
+
path: `${path}/water/bill-amendment/search-application`,
|
|
12106
|
+
component: props => /*#__PURE__*/React.createElement(WSSearchBillAmendment, _extends({}, props, {
|
|
12107
|
+
parentRoute: path
|
|
12108
|
+
}))
|
|
12090
12109
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
12091
12110
|
path: `${path}/water/search-application`,
|
|
12092
12111
|
component: props => /*#__PURE__*/React.createElement(WSSearch, _extends({}, props, {
|
|
@@ -25764,7 +25783,7 @@ const DECIMAL_PATTERN$1 = /^\d+(\.\d{1,2})?$/;
|
|
|
25764
25783
|
const normalizeCode = value => String(value || "").replace(/[._\s-]/g, "").toUpperCase();
|
|
25765
25784
|
const getCode = value => typeof value === "object" ? (value === null || value === void 0 ? void 0 : value.code) || (value === null || value === void 0 ? void 0 : value.value) : value;
|
|
25766
25785
|
const PropertyWaterConnection = _ref => {
|
|
25767
|
-
var _Digit$ULBService$get, _Digit$ULBService, _formData$cpt3, _errors$useDetails, _errors$useDetails2, _errors$useDetails3, _errors$useDetails4, _errors$useDetails5, _errors$useDetails6, _errors$useDetails7, _errors$useDetails8, _errors$useDetails9, _errors$useDetails0, _errors$useDetails1, _errors$useDetails10
|
|
25786
|
+
var _Digit$ULBService$get, _Digit$ULBService, _formData$cpt3, _errors$useDetails, _errors$useDetails2, _errors$useDetails3, _errors$useDetails4, _errors$useDetails5, _errors$useDetails6, _errors$useDetails7, _errors$useDetails8, _errors$useDetails9, _errors$useDetails0, _errors$useDetails1, _errors$useDetails10;
|
|
25768
25787
|
let {
|
|
25769
25788
|
t,
|
|
25770
25789
|
config,
|
|
@@ -25790,7 +25809,6 @@ const PropertyWaterConnection = _ref => {
|
|
|
25790
25809
|
propertyCategory: null,
|
|
25791
25810
|
propertyType: null,
|
|
25792
25811
|
WaterConnectionUsageType: null,
|
|
25793
|
-
noOfFloors: null,
|
|
25794
25812
|
plotArea: "",
|
|
25795
25813
|
builtUpArea: "",
|
|
25796
25814
|
farArea: "",
|
|
@@ -26017,19 +26035,12 @@ const PropertyWaterConnection = _ref => {
|
|
|
26017
26035
|
autoFillFromPropertyType(watchPropertyType);
|
|
26018
26036
|
}
|
|
26019
26037
|
}, [watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code, autoFillFromPropertyType]);
|
|
26020
|
-
const floorOptions = useMemo(() => {
|
|
26021
|
-
var _ptServicesMastersDat7, _ptServicesMastersDat8;
|
|
26022
|
-
return ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat7 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat7 === void 0 ? void 0 : (_ptServicesMastersDat8 = _ptServicesMastersDat7.NoOfFloors) === null || _ptServicesMastersDat8 === void 0 ? void 0 : _ptServicesMastersDat8.filter(item => item.active).map(item => ({
|
|
26023
|
-
code: item.code,
|
|
26024
|
-
name: item.name
|
|
26025
|
-
}));
|
|
26026
|
-
}, [ptServicesMastersData]);
|
|
26027
26038
|
const activeQuestions = useMemo(() => {
|
|
26028
26039
|
if (!(watchPropertyType !== null && watchPropertyType !== void 0 && watchPropertyType.code)) return [];
|
|
26029
26040
|
let qList = watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.questions;
|
|
26030
26041
|
if (!qList || !Array.isArray(qList)) {
|
|
26031
|
-
var
|
|
26032
|
-
const list = (propertyType2List === null || propertyType2List === void 0 ? void 0 : propertyType2List.length) > 0 ? propertyType2List : (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (
|
|
26042
|
+
var _ptServicesMastersDat7;
|
|
26043
|
+
const list = (propertyType2List === null || propertyType2List === void 0 ? void 0 : propertyType2List.length) > 0 ? propertyType2List : (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat7 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat7 === void 0 ? void 0 : _ptServicesMastersDat7.PropertyType) || [];
|
|
26033
26044
|
const matched = list.find(item => normalizeCode(item.code) === normalizeCode(watchPropertyType.code));
|
|
26034
26045
|
qList = matched === null || matched === void 0 ? void 0 : matched.questions;
|
|
26035
26046
|
}
|
|
@@ -26098,13 +26109,13 @@ const PropertyWaterConnection = _ref => {
|
|
|
26098
26109
|
if (propertyDetailsInitialized.current || !(formData !== null && formData !== void 0 && (_formData$cpt = formData.cpt) !== null && _formData$cpt !== void 0 && _formData$cpt.details)) return;
|
|
26099
26110
|
if (!categoryTypeList.length || !ptServicesMastersData) return;
|
|
26100
26111
|
if (formData !== null && formData !== void 0 && (_formData$cpt2 = formData.cpt) !== null && _formData$cpt2 !== void 0 && _formData$cpt2.details) {
|
|
26101
|
-
var
|
|
26112
|
+
var _ptServicesMastersDat8, _ptServicesMastersDat9, _ptServicesMastersDat0, _details$landArea, _details$superBuiltUp, _details$heightOfTheB, _details$farArea, _details$servantQuart, _details$numberOfBeds, _details$numberOfStud;
|
|
26102
26113
|
const details = formData.cpt.details;
|
|
26103
26114
|
const additionalDetails = (details === null || details === void 0 ? void 0 : details.additionalDetails) || {};
|
|
26104
26115
|
const usageCategory = getCode(additionalDetails.propertyCategory || additionalDetails.usageCategory || details.usageCategory);
|
|
26105
26116
|
const catType = getCode(additionalDetails.categoryType) || (String(usageCategory).includes("RESIDENTIAL") ? "DOMESTIC" : "NON_DOMESTIC");
|
|
26106
26117
|
setValue("useDetails.categoryType", (categoryTypeList === null || categoryTypeList === void 0 ? void 0 : categoryTypeList.find(o => normalizeCode(o.code) === normalizeCode(catType))) || null);
|
|
26107
|
-
const propCategoryMatch = (categoryOptions === null || categoryOptions === void 0 ? void 0 : categoryOptions.find(o => normalizeCode(o.code) === normalizeCode(usageCategory) || normalizeCode(o.name) === normalizeCode(usageCategory))) || (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (
|
|
26118
|
+
const propCategoryMatch = (categoryOptions === null || categoryOptions === void 0 ? void 0 : categoryOptions.find(o => normalizeCode(o.code) === normalizeCode(usageCategory) || normalizeCode(o.name) === normalizeCode(usageCategory))) || (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat8 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat8 === void 0 ? void 0 : (_ptServicesMastersDat9 = _ptServicesMastersDat8.PropertyCategory) === null || _ptServicesMastersDat9 === void 0 ? void 0 : _ptServicesMastersDat9.find(o => normalizeCode(o.code) === normalizeCode(usageCategory)));
|
|
26108
26119
|
setValue("useDetails.propertyCategory", propCategoryMatch ? {
|
|
26109
26120
|
code: propCategoryMatch.code,
|
|
26110
26121
|
name: propCategoryMatch.name
|
|
@@ -26112,7 +26123,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
26112
26123
|
code: usageCategory,
|
|
26113
26124
|
name: usageCategory
|
|
26114
26125
|
} : null);
|
|
26115
|
-
const propTypeList = (propertyType2List === null || propertyType2List === void 0 ? void 0 : propertyType2List.length) > 0 ? propertyType2List : (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (
|
|
26126
|
+
const propTypeList = (propertyType2List === null || propertyType2List === void 0 ? void 0 : propertyType2List.length) > 0 ? propertyType2List : (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat0 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat0 === void 0 ? void 0 : _ptServicesMastersDat0.PropertyType) || [];
|
|
26116
26127
|
const propTypeMatch = propTypeList.find(o => normalizeCode(o.code) === normalizeCode(getCode(additionalDetails.propertyType || details.propertyType)));
|
|
26117
26128
|
setValue("useDetails.propertyType", propTypeMatch ? {
|
|
26118
26129
|
code: propTypeMatch.code,
|
|
@@ -26122,13 +26133,6 @@ const PropertyWaterConnection = _ref => {
|
|
|
26122
26133
|
const usageVal = getCode(additionalDetails.waterConnectionUsageType || additionalDetails.WaterConnectionUsageType);
|
|
26123
26134
|
const usageTypeMatch = usageTypeOptions.find(o => normalizeCode(o.code) === normalizeCode(usageVal) || normalizeCode(o.name) === normalizeCode(usageVal));
|
|
26124
26135
|
setValue("useDetails.WaterConnectionUsageType", usageTypeMatch || null);
|
|
26125
|
-
setValue("useDetails.noOfFloors", (floorOptions === null || floorOptions === void 0 ? void 0 : floorOptions.find(o => {
|
|
26126
|
-
var _details$noOfFloors;
|
|
26127
|
-
const val1 = getCode(additionalDetails.numberOfFloors);
|
|
26128
|
-
const val2 = getCode(additionalDetails.noOfFloors);
|
|
26129
|
-
const val3 = (_details$noOfFloors = details.noOfFloors) === null || _details$noOfFloors === void 0 ? void 0 : _details$noOfFloors.toString();
|
|
26130
|
-
return normalizeCode(o.code) === normalizeCode(val1) || normalizeCode(o.code) === normalizeCode(val2) || normalizeCode(o.code) === normalizeCode(val3) || val3 && normalizeCode(o.code) === normalizeCode(`${val3}_FLOOR`);
|
|
26131
|
-
})) || null);
|
|
26132
26136
|
setValue("useDetails.plotArea", additionalDetails.plotArea || (details === null || details === void 0 ? void 0 : (_details$landArea = details.landArea) === null || _details$landArea === void 0 ? void 0 : _details$landArea.toString()) || "");
|
|
26133
26137
|
setValue("useDetails.builtUpArea", additionalDetails.builtUpArea || (details === null || details === void 0 ? void 0 : (_details$superBuiltUp = details.superBuiltUpArea) === null || _details$superBuiltUp === void 0 ? void 0 : _details$superBuiltUp.toString()) || "");
|
|
26134
26138
|
setValue("useDetails.heightOfTheBuilding", additionalDetails.heightOfTheBuilding || (details === null || details === void 0 ? void 0 : (_details$heightOfTheB = details.heightOfTheBuilding) === null || _details$heightOfTheB === void 0 ? void 0 : _details$heightOfTheB.toString()) || "");
|
|
@@ -26149,7 +26153,6 @@ const PropertyWaterConnection = _ref => {
|
|
|
26149
26153
|
setValue("useDetails.propertyCategory", null);
|
|
26150
26154
|
setValue("useDetails.propertyType", null);
|
|
26151
26155
|
setValue("useDetails.WaterConnectionUsageType", null);
|
|
26152
|
-
setValue("useDetails.noOfFloors", null);
|
|
26153
26156
|
setValue("useDetails.plotArea", "");
|
|
26154
26157
|
setValue("useDetails.builtUpArea", "");
|
|
26155
26158
|
setValue("useDetails.farArea", "");
|
|
@@ -26164,7 +26167,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
26164
26167
|
setValue("useDetails.questions", []);
|
|
26165
26168
|
}
|
|
26166
26169
|
propertyDetailsInitialized.current = true;
|
|
26167
|
-
}, [formData === null || formData === void 0 ? void 0 : (_formData$cpt3 = formData.cpt) === null || _formData$cpt3 === void 0 ? void 0 : _formData$cpt3.details, formData === null || formData === void 0 ? void 0 : formData.cpt, categoryOptions, propertyTypeOptions, usageTypeOptions,
|
|
26170
|
+
}, [formData === null || formData === void 0 ? void 0 : (_formData$cpt3 = formData.cpt) === null || _formData$cpt3 === void 0 ? void 0 : _formData$cpt3.details, formData === null || formData === void 0 ? void 0 : formData.cpt, categoryOptions, propertyTypeOptions, usageTypeOptions, yearOptions, categoryTypeList, setValue]);
|
|
26168
26171
|
const lastErrorState = React.useRef(null);
|
|
26169
26172
|
useEffect(() => {
|
|
26170
26173
|
const hasErrors = Object.keys(errors).length > 0;
|
|
@@ -26257,7 +26260,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
26257
26260
|
select: props.onChange,
|
|
26258
26261
|
t: t,
|
|
26259
26262
|
onBlur: props.onBlur,
|
|
26260
|
-
disable:
|
|
26263
|
+
disable: true,
|
|
26261
26264
|
placeholder: t("WS_PROPERTY_CATEGORY")
|
|
26262
26265
|
})
|
|
26263
26266
|
}))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails3 = errors.useDetails) === null || _errors$useDetails3 === void 0 ? void 0 : _errors$useDetails3.propertyCategory) && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
@@ -26279,7 +26282,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
26279
26282
|
select: props.onChange,
|
|
26280
26283
|
t: t,
|
|
26281
26284
|
onBlur: props.onBlur,
|
|
26282
|
-
disable:
|
|
26285
|
+
disable: true,
|
|
26283
26286
|
placeholder: t("WS_WATER_CONNECTION_USAGE_TYPE")
|
|
26284
26287
|
})
|
|
26285
26288
|
}))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails4 = errors.useDetails) === null || _errors$useDetails4 === void 0 ? void 0 : _errors$useDetails4.WaterConnectionUsageType) && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
@@ -26304,29 +26307,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
26304
26307
|
placeholder: "Enter Answer",
|
|
26305
26308
|
onChange: e => handleAnswerChange(index, questionText, e.target.value)
|
|
26306
26309
|
})));
|
|
26307
|
-
}), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("
|
|
26308
|
-
className: "check-page-link-button"
|
|
26309
|
-
}, "*")), /*#__PURE__*/React.createElement("div", {
|
|
26310
|
-
className: "form-field"
|
|
26311
|
-
}, /*#__PURE__*/React.createElement(Controller, {
|
|
26312
|
-
control: control,
|
|
26313
|
-
name: "useDetails.noOfFloors",
|
|
26314
|
-
rules: {
|
|
26315
|
-
required: t("REQUIRED_FIELD")
|
|
26316
|
-
},
|
|
26317
|
-
render: props => /*#__PURE__*/React.createElement(Dropdown, {
|
|
26318
|
-
option: floorOptions,
|
|
26319
|
-
optionKey: "name",
|
|
26320
|
-
selected: props.value,
|
|
26321
|
-
select: props.onChange,
|
|
26322
|
-
t: t,
|
|
26323
|
-
onBlur: props.onBlur,
|
|
26324
|
-
disable: isPropertyFound,
|
|
26325
|
-
placeholder: t("WS_NUMBER_OF_FLOORS")
|
|
26326
|
-
})
|
|
26327
|
-
}))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails5 = errors.useDetails) === null || _errors$useDetails5 === void 0 ? void 0 : _errors$useDetails5.noOfFloors) && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
26328
|
-
style: errorStyle
|
|
26329
|
-
}, errors.useDetails.noOfFloors.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_PLOT_AREA")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
26310
|
+
}), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_PLOT_AREA")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
26330
26311
|
className: "check-page-link-button"
|
|
26331
26312
|
}, "*")), /*#__PURE__*/React.createElement("div", {
|
|
26332
26313
|
className: "form-field"
|
|
@@ -26344,7 +26325,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
26344
26325
|
name: "useDetails.plotArea",
|
|
26345
26326
|
disabled: isPropertyFound,
|
|
26346
26327
|
placeholder: t("WS_PLOT_AREA")
|
|
26347
|
-
}))), (errors === null || errors === void 0 ? void 0 : (_errors$
|
|
26328
|
+
}))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails5 = errors.useDetails) === null || _errors$useDetails5 === void 0 ? void 0 : _errors$useDetails5.plotArea) && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
26348
26329
|
style: errorStyle
|
|
26349
26330
|
}, errors.useDetails.plotArea.message), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_BUILT_UP_AREA")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
26350
26331
|
className: "check-page-link-button"
|
|
@@ -26365,7 +26346,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
26365
26346
|
},
|
|
26366
26347
|
disabled: isPropertyFound,
|
|
26367
26348
|
placeholder: t("WS_BUILT_UP_AREA")
|
|
26368
|
-
}))), (errors === null || errors === void 0 ? void 0 : (_errors$
|
|
26349
|
+
}))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails6 = errors.useDetails) === null || _errors$useDetails6 === void 0 ? void 0 : _errors$useDetails6.builtUpArea) && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
26369
26350
|
style: errorStyle
|
|
26370
26351
|
}, errors.useDetails.builtUpArea.message)), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_HEIGHT_OF_THE_BUILDING(meters)")}`, /*#__PURE__*/React.createElement("span", {
|
|
26371
26352
|
className: "check-page-link-button"
|
|
@@ -26386,7 +26367,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
26386
26367
|
},
|
|
26387
26368
|
disabled: isPropertyFound,
|
|
26388
26369
|
placeholder: t("WS_HEIGHT_OF_THE_BUILDING")
|
|
26389
|
-
})), (errors === null || errors === void 0 ? void 0 : (_errors$
|
|
26370
|
+
})), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails7 = errors.useDetails) === null || _errors$useDetails7 === void 0 ? void 0 : _errors$useDetails7.heightOfTheBuilding) && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
26390
26371
|
style: errorStyle
|
|
26391
26372
|
}, errors.useDetails.heightOfTheBuilding.message)), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_SELECT_YEAR_OF_CONSTRUCTION")}`), /*#__PURE__*/React.createElement("div", {
|
|
26392
26373
|
className: "form-field"
|
|
@@ -26403,7 +26384,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
26403
26384
|
disable: isPropertyFound,
|
|
26404
26385
|
placeholder: t("WS_SELECT_YEAR_OF_CONSTRUCTION")
|
|
26405
26386
|
})
|
|
26406
|
-
}))), (errors === null || errors === void 0 ? void 0 : (_errors$
|
|
26387
|
+
}))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails8 = errors.useDetails) === null || _errors$useDetails8 === void 0 ? void 0 : _errors$useDetails8.SelectYearofConstruction) && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
26407
26388
|
style: errorStyle
|
|
26408
26389
|
}, errors.useDetails.SelectYearofConstruction.message), isDwellingUnit ? /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_NUMBER_OF_DWELLING_UNITS")}`, /*#__PURE__*/React.createElement("span", {
|
|
26409
26390
|
className: "check-page-link-button"
|
|
@@ -26424,7 +26405,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
26424
26405
|
required: t("REQUIRED_FIELD")
|
|
26425
26406
|
},
|
|
26426
26407
|
placeholder: t("WS_NUMBER_OF_DWELLING_UNITS")
|
|
26427
|
-
}))) : null, isDwellingUnit && (errors === null || errors === void 0 ? void 0 : (_errors$
|
|
26408
|
+
}))) : null, isDwellingUnit && (errors === null || errors === void 0 ? void 0 : (_errors$useDetails9 = errors.useDetails) === null || _errors$useDetails9 === void 0 ? void 0 : _errors$useDetails9.NumberofDwellingUnits) && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
26428
26409
|
style: errorStyle
|
|
26429
26410
|
}, errors.useDetails.NumberofDwellingUnits.message), isHotelRestaurantProperty ? /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_NUMBER_OF_ROOMS")}`, /*#__PURE__*/React.createElement("span", {
|
|
26430
26411
|
className: "check-page-link-button"
|
|
@@ -26442,7 +26423,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
26442
26423
|
name: "useDetails.NumberofRooms",
|
|
26443
26424
|
disabled: isPropertyFound,
|
|
26444
26425
|
placeholder: t("WS_NUMBER_OF_ROOMS")
|
|
26445
|
-
}))) : null, isHotelRestaurantProperty && (errors === null || errors === void 0 ? void 0 : (_errors$
|
|
26426
|
+
}))) : null, isHotelRestaurantProperty && (errors === null || errors === void 0 ? void 0 : (_errors$useDetails0 = errors.useDetails) === null || _errors$useDetails0 === void 0 ? void 0 : _errors$useDetails0.NumberofRooms) && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
26446
26427
|
style: errorStyle
|
|
26447
26428
|
}, errors.useDetails.NumberofRooms.message), isHospitalProperty ? /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_NUMBER_OF_BEDS")}`, /*#__PURE__*/React.createElement("span", {
|
|
26448
26429
|
className: "check-page-link-button"
|
|
@@ -26460,7 +26441,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
26460
26441
|
name: "useDetails.numberOfBeds",
|
|
26461
26442
|
disabled: isPropertyFound,
|
|
26462
26443
|
placeholder: t("WS_NUMBER_OF_BEDS")
|
|
26463
|
-
}))) : null, isHospitalProperty && (errors === null || errors === void 0 ? void 0 : (_errors$
|
|
26444
|
+
}))) : null, isHospitalProperty && (errors === null || errors === void 0 ? void 0 : (_errors$useDetails1 = errors.useDetails) === null || _errors$useDetails1 === void 0 ? void 0 : _errors$useDetails1.numberOfBeds) && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
26464
26445
|
style: errorStyle
|
|
26465
26446
|
}, errors.useDetails.numberOfBeds.message), isSchoolCollegeProperty ? /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_NUMBER_OF_STUDENTS")}`), /*#__PURE__*/React.createElement("div", {
|
|
26466
26447
|
className: "form-field"
|
|
@@ -26475,7 +26456,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
26475
26456
|
name: "useDetails.numberOfStudents",
|
|
26476
26457
|
disabled: isPropertyFound,
|
|
26477
26458
|
placeholder: t("WS_NUMBER_OF_STUDENTS")
|
|
26478
|
-
}))) : null, isSchoolCollegeProperty && (errors === null || errors === void 0 ? void 0 : (_errors$
|
|
26459
|
+
}))) : null, isSchoolCollegeProperty && (errors === null || errors === void 0 ? void 0 : (_errors$useDetails10 = errors.useDetails) === null || _errors$useDetails10 === void 0 ? void 0 : _errors$useDetails10.numberOfStudents) && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
26479
26460
|
style: errorStyle
|
|
26480
26461
|
}, errors.useDetails.numberOfStudents.message)));
|
|
26481
26462
|
};
|
|
@@ -27368,6 +27349,10 @@ const BillAmendmentCard = () => {
|
|
|
27368
27349
|
label: t("SW_WATER_INBOX"),
|
|
27369
27350
|
link: `/digit-ui/employee/ws/sewerage/bill-amendment/inbox`,
|
|
27370
27351
|
roles: ["WS_CEMP", "WS_APPROVER", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER", "WS_CLERK"]
|
|
27352
|
+
}, {
|
|
27353
|
+
label: t("WS_BILL_AMENDMENT_APPLICATION_SEARCH", "Search Application"),
|
|
27354
|
+
link: `/digit-ui/employee/ws/water/bill-amendment/search-application`,
|
|
27355
|
+
roles: ["WS_CEMP", "WS_APPROVER", "EE", "WS_DEALING_CLERK", "WS_CLERK", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER"]
|
|
27371
27356
|
}]
|
|
27372
27357
|
}), [isBillAMDInboxLoading, billData, totalCount]);
|
|
27373
27358
|
return /*#__PURE__*/React.createElement(EmployeeModuleCard, propsForModuleCard);
|
|
@@ -29378,6 +29363,10 @@ const WSCard = () => {
|
|
|
29378
29363
|
label: t("WS_BILL_AMENDMENT_INBOX", "Bill Amendment Inbox"),
|
|
29379
29364
|
link: `/digit-ui/employee/ws/water/bill-amendment/inbox`,
|
|
29380
29365
|
roles: ["WS_CEMP", "WS_APPROVER", "EE", "WS_DEALING_CLERK", "WS_CLERK", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER"]
|
|
29366
|
+
}, {
|
|
29367
|
+
label: t("WS_BILL_AMENDMENT_APPLICATION_SEARCH", "Search Bill Amendment Application"),
|
|
29368
|
+
link: `/digit-ui/employee/ws/water/bill-amendment/search-application`,
|
|
29369
|
+
roles: ["WS_CEMP", "WS_APPROVER", "EE", "WS_DEALING_CLERK", "WS_CLERK", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER"]
|
|
29381
29370
|
}, ...links, {
|
|
29382
29371
|
label: t("WS_WATER_CONNECTION_SEARCH_LABEL"),
|
|
29383
29372
|
link: `/digit-ui/employee/ws/water/search-connection`,
|
|
@@ -30180,6 +30169,224 @@ const Inbox = _ref => {
|
|
|
30180
30169
|
})));
|
|
30181
30170
|
};
|
|
30182
30171
|
|
|
30172
|
+
const SearchBillAmendment = () => {
|
|
30173
|
+
const {
|
|
30174
|
+
t
|
|
30175
|
+
} = useTranslation();
|
|
30176
|
+
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
30177
|
+
const [searchResult, setSearchResult] = useState(null);
|
|
30178
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
30179
|
+
const [showToast, setShowToast] = useState(null);
|
|
30180
|
+
const {
|
|
30181
|
+
register,
|
|
30182
|
+
handleSubmit,
|
|
30183
|
+
reset
|
|
30184
|
+
} = useForm({
|
|
30185
|
+
defaultValues: {
|
|
30186
|
+
amendmentId: "",
|
|
30187
|
+
consumerCode: ""
|
|
30188
|
+
}
|
|
30189
|
+
});
|
|
30190
|
+
const convertEpochToDate = epoch => {
|
|
30191
|
+
if (!epoch) return "NA";
|
|
30192
|
+
const d = new Date(epoch);
|
|
30193
|
+
const day = String(d.getDate()).padStart(2, "0");
|
|
30194
|
+
const month = String(d.getMonth() + 1).padStart(2, "0");
|
|
30195
|
+
const year = d.getFullYear();
|
|
30196
|
+
return `${day}/${month}/${year}`;
|
|
30197
|
+
};
|
|
30198
|
+
const onSubmit = function (formData) {
|
|
30199
|
+
try {
|
|
30200
|
+
var _formData$amendmentId, _formData$consumerCod;
|
|
30201
|
+
const amendmentId = formData === null || formData === void 0 ? void 0 : (_formData$amendmentId = formData.amendmentId) === null || _formData$amendmentId === void 0 ? void 0 : _formData$amendmentId.trim();
|
|
30202
|
+
const consumerCode = formData === null || formData === void 0 ? void 0 : (_formData$consumerCod = formData.consumerCode) === null || _formData$consumerCod === void 0 ? void 0 : _formData$consumerCod.trim();
|
|
30203
|
+
if (!amendmentId && !consumerCode) {
|
|
30204
|
+
setShowToast({
|
|
30205
|
+
error: true,
|
|
30206
|
+
label: t("WS_FILL_ATLEAST_ONE_FIELD", "Please fill at least one field to search")
|
|
30207
|
+
});
|
|
30208
|
+
setTimeout(() => setShowToast(null), 3000);
|
|
30209
|
+
return Promise.resolve();
|
|
30210
|
+
}
|
|
30211
|
+
const _temp = _finallyRethrows(function () {
|
|
30212
|
+
return _catch(function () {
|
|
30213
|
+
setIsLoading(true);
|
|
30214
|
+
const params = {
|
|
30215
|
+
businessService: "WS"
|
|
30216
|
+
};
|
|
30217
|
+
if (amendmentId) params.amendmentId = amendmentId;
|
|
30218
|
+
if (consumerCode) params.consumerCode = consumerCode;
|
|
30219
|
+
return Promise.resolve(Digit.PaymentService.searchAmendment(tenantId, params)).then(function (res) {
|
|
30220
|
+
setSearchResult((res === null || res === void 0 ? void 0 : res.Amendments) || []);
|
|
30221
|
+
});
|
|
30222
|
+
}, function (err) {
|
|
30223
|
+
var _err$response, _err$response$data, _err$response$data$Er, _err$response$data$Er2;
|
|
30224
|
+
console.error("Error searching bill amendment:", err);
|
|
30225
|
+
setSearchResult([]);
|
|
30226
|
+
setShowToast({
|
|
30227
|
+
error: true,
|
|
30228
|
+
label: (err === null || err === void 0 ? void 0 : (_err$response = err.response) === null || _err$response === void 0 ? void 0 : (_err$response$data = _err$response.data) === null || _err$response$data === void 0 ? void 0 : (_err$response$data$Er = _err$response$data.Errors) === null || _err$response$data$Er === void 0 ? void 0 : (_err$response$data$Er2 = _err$response$data$Er[0]) === null || _err$response$data$Er2 === void 0 ? void 0 : _err$response$data$Er2.message) || t("CS_WATER_SEARCH_FAILED", "Search failed")
|
|
30229
|
+
});
|
|
30230
|
+
setTimeout(() => setShowToast(null), 5000);
|
|
30231
|
+
});
|
|
30232
|
+
}, function (_wasThrown, _result) {
|
|
30233
|
+
setIsLoading(false);
|
|
30234
|
+
if (_wasThrown) throw _result;
|
|
30235
|
+
return _result;
|
|
30236
|
+
});
|
|
30237
|
+
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
|
30238
|
+
} catch (e) {
|
|
30239
|
+
return Promise.reject(e);
|
|
30240
|
+
}
|
|
30241
|
+
};
|
|
30242
|
+
const onReset = () => {
|
|
30243
|
+
reset({
|
|
30244
|
+
amendmentId: "",
|
|
30245
|
+
consumerCode: ""
|
|
30246
|
+
});
|
|
30247
|
+
setSearchResult(null);
|
|
30248
|
+
};
|
|
30249
|
+
const columns = useMemo(() => [{
|
|
30250
|
+
Header: t("WS_ACK_COMMON_APP_NO_LABEL", "Application No"),
|
|
30251
|
+
accessor: "amendmentId",
|
|
30252
|
+
Cell: _ref => {
|
|
30253
|
+
let {
|
|
30254
|
+
row
|
|
30255
|
+
} = _ref;
|
|
30256
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
30257
|
+
className: "link"
|
|
30258
|
+
}, /*#__PURE__*/React.createElement(Link, {
|
|
30259
|
+
to: `/digit-ui/employee/ws/generate-note-bill-amendment?applicationNumber=${row.original.amendmentId}`
|
|
30260
|
+
}, row.original.amendmentId));
|
|
30261
|
+
}
|
|
30262
|
+
}, {
|
|
30263
|
+
Header: t("WS_MYCONNECTIONS_CONSUMER_NO", "Consumer No"),
|
|
30264
|
+
accessor: "consumerCode",
|
|
30265
|
+
Cell: _ref2 => {
|
|
30266
|
+
let {
|
|
30267
|
+
row
|
|
30268
|
+
} = _ref2;
|
|
30269
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
30270
|
+
className: "link"
|
|
30271
|
+
}, /*#__PURE__*/React.createElement(Link, {
|
|
30272
|
+
to: `/digit-ui/employee/ws/connection-details?applicationNumber=${row.original.consumerCode}&tenantId=${tenantId}&service=WATER`
|
|
30273
|
+
}, row.original.consumerCode));
|
|
30274
|
+
}
|
|
30275
|
+
}, {
|
|
30276
|
+
Header: t("WS_AMENDMENT_REASON", "Amendment Reason"),
|
|
30277
|
+
accessor: row => t((row === null || row === void 0 ? void 0 : row.amendmentReason) || "NA")
|
|
30278
|
+
}, {
|
|
30279
|
+
Header: t("WS_COMMON_TABLE_COL_APPLICATION_STATUS", "Status"),
|
|
30280
|
+
accessor: row => t((row === null || row === void 0 ? void 0 : row.status) || "NA")
|
|
30281
|
+
}, {
|
|
30282
|
+
Header: t("WS_COMMON_TABLE_COL_APPLICATION_DATE", "Application Date"),
|
|
30283
|
+
accessor: row => {
|
|
30284
|
+
var _row$auditDetails;
|
|
30285
|
+
return convertEpochToDate(row === null || row === void 0 ? void 0 : (_row$auditDetails = row.auditDetails) === null || _row$auditDetails === void 0 ? void 0 : _row$auditDetails.createdTime);
|
|
30286
|
+
}
|
|
30287
|
+
}, {
|
|
30288
|
+
Header: t("WS_COMMON_TABLE_COL_ACTION", "Action"),
|
|
30289
|
+
Cell: _ref3 => {
|
|
30290
|
+
let {
|
|
30291
|
+
row
|
|
30292
|
+
} = _ref3;
|
|
30293
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
30294
|
+
className: "link"
|
|
30295
|
+
}, /*#__PURE__*/React.createElement(Link, {
|
|
30296
|
+
to: `/digit-ui/employee/ws/generate-note-bill-amendment?applicationNumber=${row.original.amendmentId}`
|
|
30297
|
+
}, t("ES_COMMON_VIEW", "View")));
|
|
30298
|
+
}
|
|
30299
|
+
}], [t, tenantId]);
|
|
30300
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
30301
|
+
className: "employee-wrapper",
|
|
30302
|
+
style: {
|
|
30303
|
+
padding: "16px"
|
|
30304
|
+
}
|
|
30305
|
+
}, /*#__PURE__*/React.createElement(Header, {
|
|
30306
|
+
styles: {
|
|
30307
|
+
fontSize: "32px",
|
|
30308
|
+
marginBottom: "16px"
|
|
30309
|
+
}
|
|
30310
|
+
}, t("WS_SEARCH_BILL_AMENDMENT_APPLICATION", "Search Bill Amendment Application")), /*#__PURE__*/React.createElement(Card, {
|
|
30311
|
+
style: {
|
|
30312
|
+
padding: "24px",
|
|
30313
|
+
marginBottom: "24px"
|
|
30314
|
+
}
|
|
30315
|
+
}, /*#__PURE__*/React.createElement("form", {
|
|
30316
|
+
onSubmit: handleSubmit(onSubmit)
|
|
30317
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
30318
|
+
style: {
|
|
30319
|
+
display: "grid",
|
|
30320
|
+
gridTemplateColumns: "1fr 1fr",
|
|
30321
|
+
gap: "24px",
|
|
30322
|
+
marginBottom: "24px"
|
|
30323
|
+
}
|
|
30324
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
30325
|
+
style: {
|
|
30326
|
+
fontWeight: "600",
|
|
30327
|
+
marginBottom: "8px"
|
|
30328
|
+
}
|
|
30329
|
+
}, t("WS_ACK_COMMON_APP_NO_LABEL", "Application No")), /*#__PURE__*/React.createElement(TextInput, {
|
|
30330
|
+
name: "amendmentId",
|
|
30331
|
+
inputRef: register(),
|
|
30332
|
+
placeholder: t("WS_SEARCH_APP_NO_PLACEHOLDER", "Enter Bill Amendment Application No")
|
|
30333
|
+
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
30334
|
+
style: {
|
|
30335
|
+
fontWeight: "600",
|
|
30336
|
+
marginBottom: "8px"
|
|
30337
|
+
}
|
|
30338
|
+
}, t("WS_MYCONNECTIONS_CONSUMER_NO", "Consumer No")), /*#__PURE__*/React.createElement(TextInput, {
|
|
30339
|
+
name: "consumerCode",
|
|
30340
|
+
inputRef: register(),
|
|
30341
|
+
placeholder: t("WS_SEARCH_CONSUMER_NO_PLACEHOLDER", "Enter Consumer / Connection No")
|
|
30342
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
30343
|
+
style: {
|
|
30344
|
+
display: "flex",
|
|
30345
|
+
gap: "16px",
|
|
30346
|
+
alignItems: "center"
|
|
30347
|
+
}
|
|
30348
|
+
}, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
30349
|
+
label: t("ES_COMMON_SEARCH", "Search"),
|
|
30350
|
+
submit: true
|
|
30351
|
+
}), /*#__PURE__*/React.createElement("button", {
|
|
30352
|
+
type: "button",
|
|
30353
|
+
className: "clear-search generic-button",
|
|
30354
|
+
onClick: onReset,
|
|
30355
|
+
style: {
|
|
30356
|
+
background: "transparent",
|
|
30357
|
+
border: "none",
|
|
30358
|
+
color: "#a82227",
|
|
30359
|
+
cursor: "pointer",
|
|
30360
|
+
fontWeight: "600",
|
|
30361
|
+
fontSize: "16px"
|
|
30362
|
+
}
|
|
30363
|
+
}, t("ES_COMMON_CLEAR_SEARCH", "Clear Search"))))), isLoading && /*#__PURE__*/React.createElement(Loader, null), !isLoading && searchResult && /*#__PURE__*/React.createElement(Card, {
|
|
30364
|
+
style: {
|
|
30365
|
+
padding: "16px"
|
|
30366
|
+
}
|
|
30367
|
+
}, searchResult.length > 0 ? /*#__PURE__*/React.createElement(Table, {
|
|
30368
|
+
t: t,
|
|
30369
|
+
data: searchResult,
|
|
30370
|
+
columns: columns,
|
|
30371
|
+
getCellProps: () => ({
|
|
30372
|
+
style: {
|
|
30373
|
+
minWidth: "140px",
|
|
30374
|
+
padding: "16px 14px",
|
|
30375
|
+
fontSize: "14px"
|
|
30376
|
+
}
|
|
30377
|
+
})
|
|
30378
|
+
}) : /*#__PURE__*/React.createElement(CardText, {
|
|
30379
|
+
style: {
|
|
30380
|
+
textAlign: "center",
|
|
30381
|
+
padding: "24px"
|
|
30382
|
+
}
|
|
30383
|
+
}, t("ES_COMMON_NO_DATA", "No applications found"))), showToast && /*#__PURE__*/React.createElement(Toast, {
|
|
30384
|
+
error: showToast.error,
|
|
30385
|
+
label: showToast.label,
|
|
30386
|
+
onClose: () => setShowToast(null)
|
|
30387
|
+
}));
|
|
30388
|
+
};
|
|
30389
|
+
|
|
30183
30390
|
const newConfig = [{
|
|
30184
30391
|
head: "",
|
|
30185
30392
|
body: [{
|
|
@@ -51999,7 +52206,16 @@ function ApplicationDetailsContent(_ref) {
|
|
|
51999
52206
|
if (index === void 0) {
|
|
52000
52207
|
index = 0;
|
|
52001
52208
|
}
|
|
52002
|
-
|
|
52209
|
+
let actualIndex = 0;
|
|
52210
|
+
let actualTimeline = [];
|
|
52211
|
+
if (Array.isArray(index)) {
|
|
52212
|
+
actualTimeline = index;
|
|
52213
|
+
actualIndex = 0;
|
|
52214
|
+
} else {
|
|
52215
|
+
actualIndex = typeof index === "number" ? index : 0;
|
|
52216
|
+
actualTimeline = Array.isArray(timeline) ? timeline : [];
|
|
52217
|
+
}
|
|
52218
|
+
if ((checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.state) === "OPEN" || (checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.status) === "INITIATED" && !window.location.href.includes("/obps/")) {
|
|
52003
52219
|
var _applicationData$audi;
|
|
52004
52220
|
const caption = {
|
|
52005
52221
|
date: convertEpochToDateDMY(applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$audi = applicationData.auditDetails) === null || _applicationData$audi === void 0 ? void 0 : _applicationData$audi.createdTime),
|
|
@@ -52009,7 +52225,7 @@ function ApplicationDetailsContent(_ref) {
|
|
|
52009
52225
|
data: caption
|
|
52010
52226
|
});
|
|
52011
52227
|
} else if (window.location.href.includes("/obps/") || window.location.href.includes("/noc/") || window.location.href.includes("/ws/")) {
|
|
52012
|
-
var _checkpoint$assignes, _checkpoint$assignes$, _checkpoint$auditDeta, _checkpoint$assignes2, _checkpoint$assignes3, _applicationData$proc, _applicationData$proc2, _applicationData$proc3, _checkpoint$assignes4, _checkpoint$assignes5, _applicationData$proc4, _applicationData$proc5, _applicationData$proc6, _applicationData$proc7, _applicationData$proc8, _applicationData$proc9, _checkpoint$assignes6, _checkpoint$assignes7;
|
|
52228
|
+
var _checkpoint$assignes, _checkpoint$assignes$, _actualTimeline, _checkpoint$auditDeta, _checkpoint$assignes2, _checkpoint$assignes3, _applicationData$proc, _applicationData$proc2, _applicationData$proc3, _checkpoint$assignes4, _checkpoint$assignes5, _applicationData$proc4, _applicationData$proc5, _applicationData$proc6, _applicationData$proc7, _applicationData$proc8, _applicationData$proc9, _checkpoint$assignes6, _checkpoint$assignes7;
|
|
52013
52229
|
const privacy = {
|
|
52014
52230
|
uuid: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assignes = checkpoint.assignes) === null || _checkpoint$assignes === void 0 ? void 0 : (_checkpoint$assignes$ = _checkpoint$assignes[0]) === null || _checkpoint$assignes$ === void 0 ? void 0 : _checkpoint$assignes$.uuid,
|
|
52015
52231
|
fieldName: "mobileNumber",
|
|
@@ -52027,12 +52243,12 @@ function ApplicationDetailsContent(_ref) {
|
|
|
52027
52243
|
isArray: false,
|
|
52028
52244
|
d: res => {
|
|
52029
52245
|
let resultstring = "";
|
|
52030
|
-
resultstring = `+91 ${_.get(res, `ProcessInstances[${
|
|
52246
|
+
resultstring = `+91 ${_.get(res, `ProcessInstances[${actualIndex}].assignes[0].mobileNumber`)}`;
|
|
52031
52247
|
return resultstring;
|
|
52032
52248
|
}
|
|
52033
52249
|
}
|
|
52034
52250
|
};
|
|
52035
|
-
const previousCheckpoint =
|
|
52251
|
+
const previousCheckpoint = (_actualTimeline = actualTimeline) === null || _actualTimeline === void 0 ? void 0 : _actualTimeline[actualIndex - 1];
|
|
52036
52252
|
const caption = {
|
|
52037
52253
|
date: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$auditDeta = checkpoint.auditDetails) === null || _checkpoint$auditDeta === void 0 ? void 0 : _checkpoint$auditDeta.lastModified,
|
|
52038
52254
|
name: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assignes2 = checkpoint.assignes) === null || _checkpoint$assignes2 === void 0 ? void 0 : (_checkpoint$assignes3 = _checkpoint$assignes2[0]) === null || _checkpoint$assignes3 === void 0 ? void 0 : _checkpoint$assignes3.name,
|
|
@@ -52447,7 +52663,7 @@ function ApplicationDetailsContent(_ref) {
|
|
|
52447
52663
|
}, t("ES_APPLICATION_DETAILS_APPLICATION_TIMELINE")), workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data13 = workflowDetails.data) !== null && _workflowDetails$data13 !== void 0 && _workflowDetails$data13.timeline && (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data14 = workflowDetails.data) === null || _workflowDetails$data14 === void 0 ? void 0 : (_workflowDetails$data15 = _workflowDetails$data14.timeline) === null || _workflowDetails$data15 === void 0 ? void 0 : _workflowDetails$data15.length) === 1 ? /*#__PURE__*/React.createElement(CheckPoint, {
|
|
52448
52664
|
isCompleted: true,
|
|
52449
52665
|
label: t(`${timelineStatusPrefix}${workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data16 = workflowDetails.data) === null || _workflowDetails$data16 === void 0 ? void 0 : (_workflowDetails$data17 = _workflowDetails$data16.timeline[0]) === null || _workflowDetails$data17 === void 0 ? void 0 : _workflowDetails$data17.state}`),
|
|
52450
|
-
customChild: getTimelineCaptions(workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data18 = workflowDetails.data) === null || _workflowDetails$data18 === void 0 ? void 0 : _workflowDetails$data18.timeline[0], workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data19 = workflowDetails.data) === null || _workflowDetails$data19 === void 0 ? void 0 : _workflowDetails$data19.timeline)
|
|
52666
|
+
customChild: getTimelineCaptions(workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data18 = workflowDetails.data) === null || _workflowDetails$data18 === void 0 ? void 0 : _workflowDetails$data18.timeline[0], 0, workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data19 = workflowDetails.data) === null || _workflowDetails$data19 === void 0 ? void 0 : _workflowDetails$data19.timeline)
|
|
52451
52667
|
}) : /*#__PURE__*/React.createElement(ConnectingCheckPoints, null, (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data20 = workflowDetails.data) === null || _workflowDetails$data20 === void 0 ? void 0 : _workflowDetails$data20.timeline) && (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data21 = workflowDetails.data) === null || _workflowDetails$data21 === void 0 ? void 0 : _workflowDetails$data21.timeline.slice(0, showAllTimeline ? workflowDetails === null || workflowDetails === void 0 ? void 0 : workflowDetails.data.timeline.length : 2).map((checkpoint, index, arr) => {
|
|
52452
52668
|
var _workflowDetails$data28;
|
|
52453
52669
|
let timelineStatusPostfix = "";
|
|
@@ -54451,29 +54667,31 @@ const ActivateConnection = () => {
|
|
|
54451
54667
|
};
|
|
54452
54668
|
|
|
54453
54669
|
const ApplicationDetailsBillAmendment = () => {
|
|
54454
|
-
var _applicationDetails$p, _applicationDetails$p2,
|
|
54455
|
-
const
|
|
54456
|
-
|
|
54457
|
-
} = Digit.Hooks.useQueryParams();
|
|
54670
|
+
var _applicationDetails$p, _applicationDetails$p2, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _applicationDetails$a2;
|
|
54671
|
+
const queryParams = Digit.Hooks.useQueryParams();
|
|
54672
|
+
const applicationNumber = (queryParams === null || queryParams === void 0 ? void 0 : queryParams.applicationNumber) || (queryParams === null || queryParams === void 0 ? void 0 : queryParams.applicationNo);
|
|
54458
54673
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
54459
54674
|
const {
|
|
54460
54675
|
t
|
|
54461
54676
|
} = useTranslation();
|
|
54462
54677
|
let serviceType = "WATER";
|
|
54463
|
-
if (applicationNumber.includes("SW")) serviceType = "SEWERAGE";
|
|
54678
|
+
if (applicationNumber !== null && applicationNumber !== void 0 && applicationNumber.includes("SW")) serviceType = "SEWERAGE";
|
|
54464
54679
|
const [showToast, setShowToast] = useState(false);
|
|
54465
54680
|
const {
|
|
54466
54681
|
isLoading,
|
|
54467
54682
|
isError,
|
|
54468
54683
|
data: applicationDetails,
|
|
54469
54684
|
error
|
|
54470
|
-
} = Digit.Hooks.ws.useWSApplicationDetailsBillAmendment(t, tenantId, applicationNumber, serviceType
|
|
54685
|
+
} = Digit.Hooks.ws.useWSApplicationDetailsBillAmendment(t, tenantId, applicationNumber, serviceType, {
|
|
54686
|
+
enabled: !!applicationNumber
|
|
54687
|
+
});
|
|
54688
|
+
const businessService = (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$p = applicationDetails.processInstancesDetails) === null || _applicationDetails$p === void 0 ? void 0 : (_applicationDetails$p2 = _applicationDetails$p[0]) === null || _applicationDetails$p2 === void 0 ? void 0 : _applicationDetails$p2.businessService) || (serviceType === "WATER" ? "WS.AMENDMENT" : "SW.AMENDMENT");
|
|
54471
54689
|
const workflowDetails = Digit.Hooks.useWorkflowDetails({
|
|
54472
54690
|
tenantId,
|
|
54473
54691
|
id: applicationNumber,
|
|
54474
|
-
moduleCode:
|
|
54692
|
+
moduleCode: businessService,
|
|
54475
54693
|
config: {
|
|
54476
|
-
enabled:
|
|
54694
|
+
enabled: !!applicationNumber
|
|
54477
54695
|
}
|
|
54478
54696
|
});
|
|
54479
54697
|
workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : (_workflowDetails$data2 = _workflowDetails$data.actionState) === null || _workflowDetails$data2 === void 0 ? void 0 : (_workflowDetails$data3 = _workflowDetails$data2.nextActions) === null || _workflowDetails$data3 === void 0 ? void 0 : _workflowDetails$data3.forEach(action => {
|
|
@@ -54549,12 +54767,12 @@ const ApplicationDetailsBillAmendment = () => {
|
|
|
54549
54767
|
applicationData: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData,
|
|
54550
54768
|
mutate: mutate,
|
|
54551
54769
|
workflowDetails: workflowDetails,
|
|
54552
|
-
businessService:
|
|
54770
|
+
businessService: businessService,
|
|
54553
54771
|
moduleCode: "WS",
|
|
54554
54772
|
showToast: showToast,
|
|
54555
54773
|
setShowToast: setShowToast,
|
|
54556
54774
|
closeToast: () => setShowToast(null),
|
|
54557
|
-
timelineStatusPrefix: `WF_${
|
|
54775
|
+
timelineStatusPrefix: `WF_${businessService === null || businessService === void 0 ? void 0 : businessService.toUpperCase()}_`
|
|
54558
54776
|
})), showToast ? /*#__PURE__*/React.createElement(Toast, {
|
|
54559
54777
|
isDleteBtn: true,
|
|
54560
54778
|
error: updateApplicationError ? "WS_APPLICATION_UPDATE_ERROR" : null,
|
|
@@ -63011,6 +63229,7 @@ const componentsToRegister = {
|
|
|
63011
63229
|
WSCard,
|
|
63012
63230
|
SWCard,
|
|
63013
63231
|
WSBillIAmendMentInbox: Inbox,
|
|
63232
|
+
WSSearchBillAmendment: SearchBillAmendment,
|
|
63014
63233
|
WSCreate: WSCreate,
|
|
63015
63234
|
WSDisconnection: WSDisconnection,
|
|
63016
63235
|
WSRestoration: WSDisconnection$1,
|