@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 CHANGED
@@ -9613,7 +9613,7 @@ const getWSAcknowledgementData$2 = function (amendment, tenantInfo, t, tableData
9613
9613
  };
9614
9614
 
9615
9615
  const Response = () => {
9616
- var _state$Amendment, _data$Amendments, _data$Amendments$, _data$Amendments2, _data$Amendments2$, _data$Amendments3, _data$Amendments3$;
9616
+ var _state$Amendment, _data$Amendments, _data$Amendments$, _data$Amendments2, _data$Amendments2$, _data$Amendments3, _data$Amendments3$, _data$Amendments4, _data$Amendments4$;
9617
9617
  const tenantId = Digit.ULBService.getCurrentTenantId();
9618
9618
  const {
9619
9619
  state
@@ -9688,7 +9688,16 @@ const Response = () => {
9688
9688
  justifyContent: "flex-end",
9689
9689
  alignItems: "baseline"
9690
9690
  }
9691
- }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
9691
+ }, (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__default.createElement(digitUiReactComponents.SubmitBar, {
9692
+ label: t("CS_TITLE_GENERATE_NOTE"),
9693
+ onSubmit: () => {
9694
+ var _data$Amendments5, _data$Amendments5$;
9695
+ 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}`);
9696
+ },
9697
+ style: {
9698
+ marginRight: "1rem"
9699
+ }
9700
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
9692
9701
  label: t("CORE_COMMON_GO_TO_HOME"),
9693
9702
  onSubmit: () => history.push(`/digit-ui/employee`),
9694
9703
  style: {
@@ -11663,6 +11672,10 @@ const BILLSBreadCrumbs = _ref => {
11663
11672
  path: "/digit-ui/employee/ws/water/bill-amendment/inbox",
11664
11673
  label: t("ES_COMMON_BILL_AMEND_WATER_INBOX_LABEL"),
11665
11674
  show: location.pathname.includes("/water/bill-amendment/inbox") ? true : false
11675
+ }, {
11676
+ path: "/digit-ui/employee/ws/water/bill-amendment/search-application",
11677
+ label: t("WS_BILL_AMENDMENT_SEARCH_APPLICATION", "Search Bill Amendment"),
11678
+ show: location.pathname.includes("/bill-amendment/search-application") ? true : false
11666
11679
  }, {
11667
11680
  path: "/digit-ui/employee/ws/sewerage/bill-amendment/inbox",
11668
11681
  label: t("ES_COMMON_BILL_AMEND_SEWERAGE_INBOX_LABEL"),
@@ -11915,7 +11928,7 @@ const BILLSBreadCrumbs = _ref => {
11915
11928
  }));
11916
11929
  };
11917
11930
  const App$1 = _ref2 => {
11918
- 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;
11931
+ 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;
11919
11932
  let {
11920
11933
  path
11921
11934
  } = _ref2;
@@ -11994,6 +12007,7 @@ const App$1 = _ref2 => {
11994
12007
  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");
11995
12008
  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");
11996
12009
  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");
12010
+ 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");
11997
12011
  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");
11998
12012
  const locationCheckReqDocs = window.location.href.includes("/employee/ws/create-application") || window.location.href.includes("/employee/ws/new-disconnection/docsrequired");
11999
12013
  return /*#__PURE__*/React__default.createElement("div", {
@@ -12090,6 +12104,11 @@ const App$1 = _ref2 => {
12090
12104
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
12091
12105
  path: `${path}/activate-connection`,
12092
12106
  component: WSActivateConnection
12107
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
12108
+ path: `${path}/water/bill-amendment/search-application`,
12109
+ component: props => /*#__PURE__*/React__default.createElement(WSSearchBillAmendment, _extends({}, props, {
12110
+ parentRoute: path
12111
+ }))
12093
12112
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
12094
12113
  path: `${path}/water/search-application`,
12095
12114
  component: props => /*#__PURE__*/React__default.createElement(WSSearch, _extends({}, props, {
@@ -25767,7 +25786,7 @@ const DECIMAL_PATTERN$1 = /^\d+(\.\d{1,2})?$/;
25767
25786
  const normalizeCode = value => String(value || "").replace(/[._\s-]/g, "").toUpperCase();
25768
25787
  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;
25769
25788
  const PropertyWaterConnection = _ref => {
25770
- 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, _errors$useDetails11;
25789
+ 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;
25771
25790
  let {
25772
25791
  t,
25773
25792
  config,
@@ -25793,7 +25812,6 @@ const PropertyWaterConnection = _ref => {
25793
25812
  propertyCategory: null,
25794
25813
  propertyType: null,
25795
25814
  WaterConnectionUsageType: null,
25796
- noOfFloors: null,
25797
25815
  plotArea: "",
25798
25816
  builtUpArea: "",
25799
25817
  farArea: "",
@@ -26020,19 +26038,12 @@ const PropertyWaterConnection = _ref => {
26020
26038
  autoFillFromPropertyType(watchPropertyType);
26021
26039
  }
26022
26040
  }, [watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code, autoFillFromPropertyType]);
26023
- const floorOptions = React.useMemo(() => {
26024
- var _ptServicesMastersDat7, _ptServicesMastersDat8;
26025
- 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 => ({
26026
- code: item.code,
26027
- name: item.name
26028
- }));
26029
- }, [ptServicesMastersData]);
26030
26041
  const activeQuestions = React.useMemo(() => {
26031
26042
  if (!(watchPropertyType !== null && watchPropertyType !== void 0 && watchPropertyType.code)) return [];
26032
26043
  let qList = watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.questions;
26033
26044
  if (!qList || !Array.isArray(qList)) {
26034
- var _ptServicesMastersDat9;
26035
- const list = (propertyType2List === null || propertyType2List === void 0 ? void 0 : propertyType2List.length) > 0 ? propertyType2List : (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat9 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat9 === void 0 ? void 0 : _ptServicesMastersDat9.PropertyType) || [];
26045
+ var _ptServicesMastersDat7;
26046
+ 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) || [];
26036
26047
  const matched = list.find(item => normalizeCode(item.code) === normalizeCode(watchPropertyType.code));
26037
26048
  qList = matched === null || matched === void 0 ? void 0 : matched.questions;
26038
26049
  }
@@ -26101,13 +26112,13 @@ const PropertyWaterConnection = _ref => {
26101
26112
  if (propertyDetailsInitialized.current || !(formData !== null && formData !== void 0 && (_formData$cpt = formData.cpt) !== null && _formData$cpt !== void 0 && _formData$cpt.details)) return;
26102
26113
  if (!categoryTypeList.length || !ptServicesMastersData) return;
26103
26114
  if (formData !== null && formData !== void 0 && (_formData$cpt2 = formData.cpt) !== null && _formData$cpt2 !== void 0 && _formData$cpt2.details) {
26104
- var _ptServicesMastersDat0, _ptServicesMastersDat1, _ptServicesMastersDat10, _details$landArea, _details$superBuiltUp, _details$heightOfTheB, _details$farArea, _details$servantQuart, _details$numberOfBeds, _details$numberOfStud;
26115
+ var _ptServicesMastersDat8, _ptServicesMastersDat9, _ptServicesMastersDat0, _details$landArea, _details$superBuiltUp, _details$heightOfTheB, _details$farArea, _details$servantQuart, _details$numberOfBeds, _details$numberOfStud;
26105
26116
  const details = formData.cpt.details;
26106
26117
  const additionalDetails = (details === null || details === void 0 ? void 0 : details.additionalDetails) || {};
26107
26118
  const usageCategory = getCode(additionalDetails.propertyCategory || additionalDetails.usageCategory || details.usageCategory);
26108
26119
  const catType = getCode(additionalDetails.categoryType) || (String(usageCategory).includes("RESIDENTIAL") ? "DOMESTIC" : "NON_DOMESTIC");
26109
26120
  setValue("useDetails.categoryType", (categoryTypeList === null || categoryTypeList === void 0 ? void 0 : categoryTypeList.find(o => normalizeCode(o.code) === normalizeCode(catType))) || null);
26110
- 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 : (_ptServicesMastersDat0 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat0 === void 0 ? void 0 : (_ptServicesMastersDat1 = _ptServicesMastersDat0.PropertyCategory) === null || _ptServicesMastersDat1 === void 0 ? void 0 : _ptServicesMastersDat1.find(o => normalizeCode(o.code) === normalizeCode(usageCategory)));
26121
+ 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)));
26111
26122
  setValue("useDetails.propertyCategory", propCategoryMatch ? {
26112
26123
  code: propCategoryMatch.code,
26113
26124
  name: propCategoryMatch.name
@@ -26115,7 +26126,7 @@ const PropertyWaterConnection = _ref => {
26115
26126
  code: usageCategory,
26116
26127
  name: usageCategory
26117
26128
  } : null);
26118
- const propTypeList = (propertyType2List === null || propertyType2List === void 0 ? void 0 : propertyType2List.length) > 0 ? propertyType2List : (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat10 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat10 === void 0 ? void 0 : _ptServicesMastersDat10.PropertyType) || [];
26129
+ 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) || [];
26119
26130
  const propTypeMatch = propTypeList.find(o => normalizeCode(o.code) === normalizeCode(getCode(additionalDetails.propertyType || details.propertyType)));
26120
26131
  setValue("useDetails.propertyType", propTypeMatch ? {
26121
26132
  code: propTypeMatch.code,
@@ -26125,13 +26136,6 @@ const PropertyWaterConnection = _ref => {
26125
26136
  const usageVal = getCode(additionalDetails.waterConnectionUsageType || additionalDetails.WaterConnectionUsageType);
26126
26137
  const usageTypeMatch = usageTypeOptions.find(o => normalizeCode(o.code) === normalizeCode(usageVal) || normalizeCode(o.name) === normalizeCode(usageVal));
26127
26138
  setValue("useDetails.WaterConnectionUsageType", usageTypeMatch || null);
26128
- setValue("useDetails.noOfFloors", (floorOptions === null || floorOptions === void 0 ? void 0 : floorOptions.find(o => {
26129
- var _details$noOfFloors;
26130
- const val1 = getCode(additionalDetails.numberOfFloors);
26131
- const val2 = getCode(additionalDetails.noOfFloors);
26132
- const val3 = (_details$noOfFloors = details.noOfFloors) === null || _details$noOfFloors === void 0 ? void 0 : _details$noOfFloors.toString();
26133
- return normalizeCode(o.code) === normalizeCode(val1) || normalizeCode(o.code) === normalizeCode(val2) || normalizeCode(o.code) === normalizeCode(val3) || val3 && normalizeCode(o.code) === normalizeCode(`${val3}_FLOOR`);
26134
- })) || null);
26135
26139
  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()) || "");
26136
26140
  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()) || "");
26137
26141
  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()) || "");
@@ -26152,7 +26156,6 @@ const PropertyWaterConnection = _ref => {
26152
26156
  setValue("useDetails.propertyCategory", null);
26153
26157
  setValue("useDetails.propertyType", null);
26154
26158
  setValue("useDetails.WaterConnectionUsageType", null);
26155
- setValue("useDetails.noOfFloors", null);
26156
26159
  setValue("useDetails.plotArea", "");
26157
26160
  setValue("useDetails.builtUpArea", "");
26158
26161
  setValue("useDetails.farArea", "");
@@ -26167,7 +26170,7 @@ const PropertyWaterConnection = _ref => {
26167
26170
  setValue("useDetails.questions", []);
26168
26171
  }
26169
26172
  propertyDetailsInitialized.current = true;
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, floorOptions, yearOptions, categoryTypeList, setValue]);
26173
+ }, [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]);
26171
26174
  const lastErrorState = React__default.useRef(null);
26172
26175
  React.useEffect(() => {
26173
26176
  const hasErrors = Object.keys(errors).length > 0;
@@ -26260,7 +26263,7 @@ const PropertyWaterConnection = _ref => {
26260
26263
  select: props.onChange,
26261
26264
  t: t,
26262
26265
  onBlur: props.onBlur,
26263
- disable: isPropertyFound,
26266
+ disable: true,
26264
26267
  placeholder: t("WS_PROPERTY_CATEGORY")
26265
26268
  })
26266
26269
  }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails3 = errors.useDetails) === null || _errors$useDetails3 === void 0 ? void 0 : _errors$useDetails3.propertyCategory) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
@@ -26282,7 +26285,7 @@ const PropertyWaterConnection = _ref => {
26282
26285
  select: props.onChange,
26283
26286
  t: t,
26284
26287
  onBlur: props.onBlur,
26285
- disable: isPropertyFound,
26288
+ disable: true,
26286
26289
  placeholder: t("WS_WATER_CONNECTION_USAGE_TYPE")
26287
26290
  })
26288
26291
  }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails4 = errors.useDetails) === null || _errors$useDetails4 === void 0 ? void 0 : _errors$useDetails4.WaterConnectionUsageType) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
@@ -26307,29 +26310,7 @@ const PropertyWaterConnection = _ref => {
26307
26310
  placeholder: "Enter Answer",
26308
26311
  onChange: e => handleAnswerChange(index, questionText, e.target.value)
26309
26312
  })));
26310
- }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, `${t("WS_NUMBER_OF_FLOORS")}`, " ", /*#__PURE__*/React__default.createElement("span", {
26311
- className: "check-page-link-button"
26312
- }, "*")), /*#__PURE__*/React__default.createElement("div", {
26313
- className: "form-field"
26314
- }, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
26315
- control: control,
26316
- name: "useDetails.noOfFloors",
26317
- rules: {
26318
- required: t("REQUIRED_FIELD")
26319
- },
26320
- render: props => /*#__PURE__*/React__default.createElement(digitUiReactComponents.Dropdown, {
26321
- option: floorOptions,
26322
- optionKey: "name",
26323
- selected: props.value,
26324
- select: props.onChange,
26325
- t: t,
26326
- onBlur: props.onBlur,
26327
- disable: isPropertyFound,
26328
- placeholder: t("WS_NUMBER_OF_FLOORS")
26329
- })
26330
- }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails5 = errors.useDetails) === null || _errors$useDetails5 === void 0 ? void 0 : _errors$useDetails5.noOfFloors) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
26331
- style: errorStyle
26332
- }, errors.useDetails.noOfFloors.message), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, `${t("WS_PLOT_AREA")}`, " ", /*#__PURE__*/React__default.createElement("span", {
26313
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, `${t("WS_PLOT_AREA")}`, " ", /*#__PURE__*/React__default.createElement("span", {
26333
26314
  className: "check-page-link-button"
26334
26315
  }, "*")), /*#__PURE__*/React__default.createElement("div", {
26335
26316
  className: "form-field"
@@ -26347,7 +26328,7 @@ const PropertyWaterConnection = _ref => {
26347
26328
  name: "useDetails.plotArea",
26348
26329
  disabled: isPropertyFound,
26349
26330
  placeholder: t("WS_PLOT_AREA")
26350
- }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails6 = errors.useDetails) === null || _errors$useDetails6 === void 0 ? void 0 : _errors$useDetails6.plotArea) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
26331
+ }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails5 = errors.useDetails) === null || _errors$useDetails5 === void 0 ? void 0 : _errors$useDetails5.plotArea) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
26351
26332
  style: errorStyle
26352
26333
  }, errors.useDetails.plotArea.message), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, `${t("WS_BUILT_UP_AREA")}`, " ", /*#__PURE__*/React__default.createElement("span", {
26353
26334
  className: "check-page-link-button"
@@ -26368,7 +26349,7 @@ const PropertyWaterConnection = _ref => {
26368
26349
  },
26369
26350
  disabled: isPropertyFound,
26370
26351
  placeholder: t("WS_BUILT_UP_AREA")
26371
- }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails7 = errors.useDetails) === null || _errors$useDetails7 === void 0 ? void 0 : _errors$useDetails7.builtUpArea) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
26352
+ }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails6 = errors.useDetails) === null || _errors$useDetails6 === void 0 ? void 0 : _errors$useDetails6.builtUpArea) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
26372
26353
  style: errorStyle
26373
26354
  }, errors.useDetails.builtUpArea.message)), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, `${t("WS_HEIGHT_OF_THE_BUILDING(meters)")}`, /*#__PURE__*/React__default.createElement("span", {
26374
26355
  className: "check-page-link-button"
@@ -26389,7 +26370,7 @@ const PropertyWaterConnection = _ref => {
26389
26370
  },
26390
26371
  disabled: isPropertyFound,
26391
26372
  placeholder: t("WS_HEIGHT_OF_THE_BUILDING")
26392
- })), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails8 = errors.useDetails) === null || _errors$useDetails8 === void 0 ? void 0 : _errors$useDetails8.heightOfTheBuilding) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
26373
+ })), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails7 = errors.useDetails) === null || _errors$useDetails7 === void 0 ? void 0 : _errors$useDetails7.heightOfTheBuilding) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
26393
26374
  style: errorStyle
26394
26375
  }, errors.useDetails.heightOfTheBuilding.message)), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, `${t("WS_SELECT_YEAR_OF_CONSTRUCTION")}`), /*#__PURE__*/React__default.createElement("div", {
26395
26376
  className: "form-field"
@@ -26406,7 +26387,7 @@ const PropertyWaterConnection = _ref => {
26406
26387
  disable: isPropertyFound,
26407
26388
  placeholder: t("WS_SELECT_YEAR_OF_CONSTRUCTION")
26408
26389
  })
26409
- }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails9 = errors.useDetails) === null || _errors$useDetails9 === void 0 ? void 0 : _errors$useDetails9.SelectYearofConstruction) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
26390
+ }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails8 = errors.useDetails) === null || _errors$useDetails8 === void 0 ? void 0 : _errors$useDetails8.SelectYearofConstruction) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
26410
26391
  style: errorStyle
26411
26392
  }, errors.useDetails.SelectYearofConstruction.message), isDwellingUnit ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, `${t("WS_NUMBER_OF_DWELLING_UNITS")}`, /*#__PURE__*/React__default.createElement("span", {
26412
26393
  className: "check-page-link-button"
@@ -26427,7 +26408,7 @@ const PropertyWaterConnection = _ref => {
26427
26408
  required: t("REQUIRED_FIELD")
26428
26409
  },
26429
26410
  placeholder: t("WS_NUMBER_OF_DWELLING_UNITS")
26430
- }))) : null, isDwellingUnit && (errors === null || errors === void 0 ? void 0 : (_errors$useDetails0 = errors.useDetails) === null || _errors$useDetails0 === void 0 ? void 0 : _errors$useDetails0.NumberofDwellingUnits) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
26411
+ }))) : 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__default.createElement(digitUiReactComponents.CardLabelError, {
26431
26412
  style: errorStyle
26432
26413
  }, errors.useDetails.NumberofDwellingUnits.message), isHotelRestaurantProperty ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, `${t("WS_NUMBER_OF_ROOMS")}`, /*#__PURE__*/React__default.createElement("span", {
26433
26414
  className: "check-page-link-button"
@@ -26445,7 +26426,7 @@ const PropertyWaterConnection = _ref => {
26445
26426
  name: "useDetails.NumberofRooms",
26446
26427
  disabled: isPropertyFound,
26447
26428
  placeholder: t("WS_NUMBER_OF_ROOMS")
26448
- }))) : null, isHotelRestaurantProperty && (errors === null || errors === void 0 ? void 0 : (_errors$useDetails1 = errors.useDetails) === null || _errors$useDetails1 === void 0 ? void 0 : _errors$useDetails1.NumberofRooms) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
26429
+ }))) : 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__default.createElement(digitUiReactComponents.CardLabelError, {
26449
26430
  style: errorStyle
26450
26431
  }, errors.useDetails.NumberofRooms.message), isHospitalProperty ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, `${t("WS_NUMBER_OF_BEDS")}`, /*#__PURE__*/React__default.createElement("span", {
26451
26432
  className: "check-page-link-button"
@@ -26463,7 +26444,7 @@ const PropertyWaterConnection = _ref => {
26463
26444
  name: "useDetails.numberOfBeds",
26464
26445
  disabled: isPropertyFound,
26465
26446
  placeholder: t("WS_NUMBER_OF_BEDS")
26466
- }))) : null, isHospitalProperty && (errors === null || errors === void 0 ? void 0 : (_errors$useDetails10 = errors.useDetails) === null || _errors$useDetails10 === void 0 ? void 0 : _errors$useDetails10.numberOfBeds) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
26447
+ }))) : 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__default.createElement(digitUiReactComponents.CardLabelError, {
26467
26448
  style: errorStyle
26468
26449
  }, errors.useDetails.numberOfBeds.message), isSchoolCollegeProperty ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, `${t("WS_NUMBER_OF_STUDENTS")}`), /*#__PURE__*/React__default.createElement("div", {
26469
26450
  className: "form-field"
@@ -26478,7 +26459,7 @@ const PropertyWaterConnection = _ref => {
26478
26459
  name: "useDetails.numberOfStudents",
26479
26460
  disabled: isPropertyFound,
26480
26461
  placeholder: t("WS_NUMBER_OF_STUDENTS")
26481
- }))) : null, isSchoolCollegeProperty && (errors === null || errors === void 0 ? void 0 : (_errors$useDetails11 = errors.useDetails) === null || _errors$useDetails11 === void 0 ? void 0 : _errors$useDetails11.numberOfStudents) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
26462
+ }))) : 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__default.createElement(digitUiReactComponents.CardLabelError, {
26482
26463
  style: errorStyle
26483
26464
  }, errors.useDetails.numberOfStudents.message)));
26484
26465
  };
@@ -27371,6 +27352,10 @@ const BillAmendmentCard = () => {
27371
27352
  label: t("SW_WATER_INBOX"),
27372
27353
  link: `/digit-ui/employee/ws/sewerage/bill-amendment/inbox`,
27373
27354
  roles: ["WS_CEMP", "WS_APPROVER", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER", "WS_CLERK"]
27355
+ }, {
27356
+ label: t("WS_BILL_AMENDMENT_APPLICATION_SEARCH", "Search Application"),
27357
+ link: `/digit-ui/employee/ws/water/bill-amendment/search-application`,
27358
+ roles: ["WS_CEMP", "WS_APPROVER", "EE", "WS_DEALING_CLERK", "WS_CLERK", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER"]
27374
27359
  }]
27375
27360
  }), [isBillAMDInboxLoading, billData, totalCount]);
27376
27361
  return /*#__PURE__*/React__default.createElement(digitUiReactComponents.EmployeeModuleCard, propsForModuleCard);
@@ -29381,6 +29366,10 @@ const WSCard = () => {
29381
29366
  label: t("WS_BILL_AMENDMENT_INBOX", "Bill Amendment Inbox"),
29382
29367
  link: `/digit-ui/employee/ws/water/bill-amendment/inbox`,
29383
29368
  roles: ["WS_CEMP", "WS_APPROVER", "EE", "WS_DEALING_CLERK", "WS_CLERK", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER"]
29369
+ }, {
29370
+ label: t("WS_BILL_AMENDMENT_APPLICATION_SEARCH", "Search Bill Amendment Application"),
29371
+ link: `/digit-ui/employee/ws/water/bill-amendment/search-application`,
29372
+ roles: ["WS_CEMP", "WS_APPROVER", "EE", "WS_DEALING_CLERK", "WS_CLERK", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER"]
29384
29373
  }, ...links, {
29385
29374
  label: t("WS_WATER_CONNECTION_SEARCH_LABEL"),
29386
29375
  link: `/digit-ui/employee/ws/water/search-connection`,
@@ -30183,6 +30172,224 @@ const Inbox = _ref => {
30183
30172
  })));
30184
30173
  };
30185
30174
 
30175
+ const SearchBillAmendment = () => {
30176
+ const {
30177
+ t
30178
+ } = reactI18next.useTranslation();
30179
+ const tenantId = Digit.ULBService.getCurrentTenantId();
30180
+ const [searchResult, setSearchResult] = React.useState(null);
30181
+ const [isLoading, setIsLoading] = React.useState(false);
30182
+ const [showToast, setShowToast] = React.useState(null);
30183
+ const {
30184
+ register,
30185
+ handleSubmit,
30186
+ reset
30187
+ } = reactHookForm.useForm({
30188
+ defaultValues: {
30189
+ amendmentId: "",
30190
+ consumerCode: ""
30191
+ }
30192
+ });
30193
+ const convertEpochToDate = epoch => {
30194
+ if (!epoch) return "NA";
30195
+ const d = new Date(epoch);
30196
+ const day = String(d.getDate()).padStart(2, "0");
30197
+ const month = String(d.getMonth() + 1).padStart(2, "0");
30198
+ const year = d.getFullYear();
30199
+ return `${day}/${month}/${year}`;
30200
+ };
30201
+ const onSubmit = function (formData) {
30202
+ try {
30203
+ var _formData$amendmentId, _formData$consumerCod;
30204
+ const amendmentId = formData === null || formData === void 0 ? void 0 : (_formData$amendmentId = formData.amendmentId) === null || _formData$amendmentId === void 0 ? void 0 : _formData$amendmentId.trim();
30205
+ const consumerCode = formData === null || formData === void 0 ? void 0 : (_formData$consumerCod = formData.consumerCode) === null || _formData$consumerCod === void 0 ? void 0 : _formData$consumerCod.trim();
30206
+ if (!amendmentId && !consumerCode) {
30207
+ setShowToast({
30208
+ error: true,
30209
+ label: t("WS_FILL_ATLEAST_ONE_FIELD", "Please fill at least one field to search")
30210
+ });
30211
+ setTimeout(() => setShowToast(null), 3000);
30212
+ return Promise.resolve();
30213
+ }
30214
+ const _temp = _finallyRethrows(function () {
30215
+ return _catch(function () {
30216
+ setIsLoading(true);
30217
+ const params = {
30218
+ businessService: "WS"
30219
+ };
30220
+ if (amendmentId) params.amendmentId = amendmentId;
30221
+ if (consumerCode) params.consumerCode = consumerCode;
30222
+ return Promise.resolve(Digit.PaymentService.searchAmendment(tenantId, params)).then(function (res) {
30223
+ setSearchResult((res === null || res === void 0 ? void 0 : res.Amendments) || []);
30224
+ });
30225
+ }, function (err) {
30226
+ var _err$response, _err$response$data, _err$response$data$Er, _err$response$data$Er2;
30227
+ console.error("Error searching bill amendment:", err);
30228
+ setSearchResult([]);
30229
+ setShowToast({
30230
+ error: true,
30231
+ 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")
30232
+ });
30233
+ setTimeout(() => setShowToast(null), 5000);
30234
+ });
30235
+ }, function (_wasThrown, _result) {
30236
+ setIsLoading(false);
30237
+ if (_wasThrown) throw _result;
30238
+ return _result;
30239
+ });
30240
+ return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
30241
+ } catch (e) {
30242
+ return Promise.reject(e);
30243
+ }
30244
+ };
30245
+ const onReset = () => {
30246
+ reset({
30247
+ amendmentId: "",
30248
+ consumerCode: ""
30249
+ });
30250
+ setSearchResult(null);
30251
+ };
30252
+ const columns = React.useMemo(() => [{
30253
+ Header: t("WS_ACK_COMMON_APP_NO_LABEL", "Application No"),
30254
+ accessor: "amendmentId",
30255
+ Cell: _ref => {
30256
+ let {
30257
+ row
30258
+ } = _ref;
30259
+ return /*#__PURE__*/React__default.createElement("span", {
30260
+ className: "link"
30261
+ }, /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
30262
+ to: `/digit-ui/employee/ws/generate-note-bill-amendment?applicationNumber=${row.original.amendmentId}`
30263
+ }, row.original.amendmentId));
30264
+ }
30265
+ }, {
30266
+ Header: t("WS_MYCONNECTIONS_CONSUMER_NO", "Consumer No"),
30267
+ accessor: "consumerCode",
30268
+ Cell: _ref2 => {
30269
+ let {
30270
+ row
30271
+ } = _ref2;
30272
+ return /*#__PURE__*/React__default.createElement("span", {
30273
+ className: "link"
30274
+ }, /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
30275
+ to: `/digit-ui/employee/ws/connection-details?applicationNumber=${row.original.consumerCode}&tenantId=${tenantId}&service=WATER`
30276
+ }, row.original.consumerCode));
30277
+ }
30278
+ }, {
30279
+ Header: t("WS_AMENDMENT_REASON", "Amendment Reason"),
30280
+ accessor: row => t((row === null || row === void 0 ? void 0 : row.amendmentReason) || "NA")
30281
+ }, {
30282
+ Header: t("WS_COMMON_TABLE_COL_APPLICATION_STATUS", "Status"),
30283
+ accessor: row => t((row === null || row === void 0 ? void 0 : row.status) || "NA")
30284
+ }, {
30285
+ Header: t("WS_COMMON_TABLE_COL_APPLICATION_DATE", "Application Date"),
30286
+ accessor: row => {
30287
+ var _row$auditDetails;
30288
+ return convertEpochToDate(row === null || row === void 0 ? void 0 : (_row$auditDetails = row.auditDetails) === null || _row$auditDetails === void 0 ? void 0 : _row$auditDetails.createdTime);
30289
+ }
30290
+ }, {
30291
+ Header: t("WS_COMMON_TABLE_COL_ACTION", "Action"),
30292
+ Cell: _ref3 => {
30293
+ let {
30294
+ row
30295
+ } = _ref3;
30296
+ return /*#__PURE__*/React__default.createElement("span", {
30297
+ className: "link"
30298
+ }, /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
30299
+ to: `/digit-ui/employee/ws/generate-note-bill-amendment?applicationNumber=${row.original.amendmentId}`
30300
+ }, t("ES_COMMON_VIEW", "View")));
30301
+ }
30302
+ }], [t, tenantId]);
30303
+ return /*#__PURE__*/React__default.createElement("div", {
30304
+ className: "employee-wrapper",
30305
+ style: {
30306
+ padding: "16px"
30307
+ }
30308
+ }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Header, {
30309
+ styles: {
30310
+ fontSize: "32px",
30311
+ marginBottom: "16px"
30312
+ }
30313
+ }, t("WS_SEARCH_BILL_AMENDMENT_APPLICATION", "Search Bill Amendment Application")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
30314
+ style: {
30315
+ padding: "24px",
30316
+ marginBottom: "24px"
30317
+ }
30318
+ }, /*#__PURE__*/React__default.createElement("form", {
30319
+ onSubmit: handleSubmit(onSubmit)
30320
+ }, /*#__PURE__*/React__default.createElement("div", {
30321
+ style: {
30322
+ display: "grid",
30323
+ gridTemplateColumns: "1fr 1fr",
30324
+ gap: "24px",
30325
+ marginBottom: "24px"
30326
+ }
30327
+ }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
30328
+ style: {
30329
+ fontWeight: "600",
30330
+ marginBottom: "8px"
30331
+ }
30332
+ }, t("WS_ACK_COMMON_APP_NO_LABEL", "Application No")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
30333
+ name: "amendmentId",
30334
+ inputRef: register(),
30335
+ placeholder: t("WS_SEARCH_APP_NO_PLACEHOLDER", "Enter Bill Amendment Application No")
30336
+ })), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
30337
+ style: {
30338
+ fontWeight: "600",
30339
+ marginBottom: "8px"
30340
+ }
30341
+ }, t("WS_MYCONNECTIONS_CONSUMER_NO", "Consumer No")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
30342
+ name: "consumerCode",
30343
+ inputRef: register(),
30344
+ placeholder: t("WS_SEARCH_CONSUMER_NO_PLACEHOLDER", "Enter Consumer / Connection No")
30345
+ }))), /*#__PURE__*/React__default.createElement("div", {
30346
+ style: {
30347
+ display: "flex",
30348
+ gap: "16px",
30349
+ alignItems: "center"
30350
+ }
30351
+ }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
30352
+ label: t("ES_COMMON_SEARCH", "Search"),
30353
+ submit: true
30354
+ }), /*#__PURE__*/React__default.createElement("button", {
30355
+ type: "button",
30356
+ className: "clear-search generic-button",
30357
+ onClick: onReset,
30358
+ style: {
30359
+ background: "transparent",
30360
+ border: "none",
30361
+ color: "#a82227",
30362
+ cursor: "pointer",
30363
+ fontWeight: "600",
30364
+ fontSize: "16px"
30365
+ }
30366
+ }, t("ES_COMMON_CLEAR_SEARCH", "Clear Search"))))), isLoading && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null), !isLoading && searchResult && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
30367
+ style: {
30368
+ padding: "16px"
30369
+ }
30370
+ }, searchResult.length > 0 ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Table, {
30371
+ t: t,
30372
+ data: searchResult,
30373
+ columns: columns,
30374
+ getCellProps: () => ({
30375
+ style: {
30376
+ minWidth: "140px",
30377
+ padding: "16px 14px",
30378
+ fontSize: "14px"
30379
+ }
30380
+ })
30381
+ }) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardText, {
30382
+ style: {
30383
+ textAlign: "center",
30384
+ padding: "24px"
30385
+ }
30386
+ }, t("ES_COMMON_NO_DATA", "No applications found"))), showToast && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
30387
+ error: showToast.error,
30388
+ label: showToast.label,
30389
+ onClose: () => setShowToast(null)
30390
+ }));
30391
+ };
30392
+
30186
30393
  const newConfig = [{
30187
30394
  head: "",
30188
30395
  body: [{
@@ -52002,7 +52209,16 @@ function ApplicationDetailsContent(_ref) {
52002
52209
  if (index === void 0) {
52003
52210
  index = 0;
52004
52211
  }
52005
- if (checkpoint.state === "OPEN" || checkpoint.status === "INITIATED" && !window.location.href.includes("/obps/")) {
52212
+ let actualIndex = 0;
52213
+ let actualTimeline = [];
52214
+ if (Array.isArray(index)) {
52215
+ actualTimeline = index;
52216
+ actualIndex = 0;
52217
+ } else {
52218
+ actualIndex = typeof index === "number" ? index : 0;
52219
+ actualTimeline = Array.isArray(timeline) ? timeline : [];
52220
+ }
52221
+ 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/")) {
52006
52222
  var _applicationData$audi;
52007
52223
  const caption = {
52008
52224
  date: convertEpochToDateDMY(applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$audi = applicationData.auditDetails) === null || _applicationData$audi === void 0 ? void 0 : _applicationData$audi.createdTime),
@@ -52012,7 +52228,7 @@ function ApplicationDetailsContent(_ref) {
52012
52228
  data: caption
52013
52229
  });
52014
52230
  } else if (window.location.href.includes("/obps/") || window.location.href.includes("/noc/") || window.location.href.includes("/ws/")) {
52015
- 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;
52231
+ 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;
52016
52232
  const privacy = {
52017
52233
  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,
52018
52234
  fieldName: "mobileNumber",
@@ -52030,12 +52246,12 @@ function ApplicationDetailsContent(_ref) {
52030
52246
  isArray: false,
52031
52247
  d: res => {
52032
52248
  let resultstring = "";
52033
- resultstring = `+91 ${_.get(res, `ProcessInstances[${index}].assignes[0].mobileNumber`)}`;
52249
+ resultstring = `+91 ${_.get(res, `ProcessInstances[${actualIndex}].assignes[0].mobileNumber`)}`;
52034
52250
  return resultstring;
52035
52251
  }
52036
52252
  }
52037
52253
  };
52038
- const previousCheckpoint = timeline[index - 1];
52254
+ const previousCheckpoint = (_actualTimeline = actualTimeline) === null || _actualTimeline === void 0 ? void 0 : _actualTimeline[actualIndex - 1];
52039
52255
  const caption = {
52040
52256
  date: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$auditDeta = checkpoint.auditDetails) === null || _checkpoint$auditDeta === void 0 ? void 0 : _checkpoint$auditDeta.lastModified,
52041
52257
  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,
@@ -52450,7 +52666,7 @@ function ApplicationDetailsContent(_ref) {
52450
52666
  }, 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__default.createElement(digitUiReactComponents.CheckPoint, {
52451
52667
  isCompleted: true,
52452
52668
  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}`),
52453
- 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)
52669
+ 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)
52454
52670
  }) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.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) => {
52455
52671
  var _workflowDetails$data28;
52456
52672
  let timelineStatusPostfix = "";
@@ -54454,29 +54670,31 @@ const ActivateConnection = () => {
54454
54670
  };
54455
54671
 
54456
54672
  const ApplicationDetailsBillAmendment = () => {
54457
- var _applicationDetails$p, _applicationDetails$p2, _applicationDetails$p3, _applicationDetails$p4, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _applicationDetails$a2, _applicationDetails$p5, _applicationDetails$p6, _applicationDetails$p7, _applicationDetails$p8, _applicationDetails$p9;
54458
- const {
54459
- applicationNumber
54460
- } = Digit.Hooks.useQueryParams();
54673
+ var _applicationDetails$p, _applicationDetails$p2, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _applicationDetails$a2;
54674
+ const queryParams = Digit.Hooks.useQueryParams();
54675
+ const applicationNumber = (queryParams === null || queryParams === void 0 ? void 0 : queryParams.applicationNumber) || (queryParams === null || queryParams === void 0 ? void 0 : queryParams.applicationNo);
54461
54676
  const tenantId = Digit.ULBService.getCurrentTenantId();
54462
54677
  const {
54463
54678
  t
54464
54679
  } = reactI18next.useTranslation();
54465
54680
  let serviceType = "WATER";
54466
- if (applicationNumber.includes("SW")) serviceType = "SEWERAGE";
54681
+ if (applicationNumber !== null && applicationNumber !== void 0 && applicationNumber.includes("SW")) serviceType = "SEWERAGE";
54467
54682
  const [showToast, setShowToast] = React.useState(false);
54468
54683
  const {
54469
54684
  isLoading,
54470
54685
  isError,
54471
54686
  data: applicationDetails,
54472
54687
  error
54473
- } = Digit.Hooks.ws.useWSApplicationDetailsBillAmendment(t, tenantId, applicationNumber, serviceType);
54688
+ } = Digit.Hooks.ws.useWSApplicationDetailsBillAmendment(t, tenantId, applicationNumber, serviceType, {
54689
+ enabled: !!applicationNumber
54690
+ });
54691
+ 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");
54474
54692
  const workflowDetails = Digit.Hooks.useWorkflowDetails({
54475
54693
  tenantId,
54476
54694
  id: applicationNumber,
54477
- moduleCode: 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,
54695
+ moduleCode: businessService,
54478
54696
  config: {
54479
- enabled: applicationDetails !== null && applicationDetails !== void 0 && (_applicationDetails$p3 = applicationDetails.processInstancesDetails) !== null && _applicationDetails$p3 !== void 0 && (_applicationDetails$p4 = _applicationDetails$p3[0]) !== null && _applicationDetails$p4 !== void 0 && _applicationDetails$p4.businessService ? true : false
54697
+ enabled: !!applicationNumber
54480
54698
  }
54481
54699
  });
54482
54700
  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 => {
@@ -54552,12 +54770,12 @@ const ApplicationDetailsBillAmendment = () => {
54552
54770
  applicationData: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData,
54553
54771
  mutate: mutate,
54554
54772
  workflowDetails: workflowDetails,
54555
- businessService: applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$p5 = applicationDetails.processInstancesDetails) === null || _applicationDetails$p5 === void 0 ? void 0 : (_applicationDetails$p6 = _applicationDetails$p5[0]) === null || _applicationDetails$p6 === void 0 ? void 0 : _applicationDetails$p6.businessService,
54773
+ businessService: businessService,
54556
54774
  moduleCode: "WS",
54557
54775
  showToast: showToast,
54558
54776
  setShowToast: setShowToast,
54559
54777
  closeToast: () => setShowToast(null),
54560
- timelineStatusPrefix: `WF_${applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$p7 = applicationDetails.processInstancesDetails) === null || _applicationDetails$p7 === void 0 ? void 0 : (_applicationDetails$p8 = _applicationDetails$p7[0]) === null || _applicationDetails$p8 === void 0 ? void 0 : (_applicationDetails$p9 = _applicationDetails$p8.businessService) === null || _applicationDetails$p9 === void 0 ? void 0 : _applicationDetails$p9.toUpperCase()}_`
54778
+ timelineStatusPrefix: `WF_${businessService === null || businessService === void 0 ? void 0 : businessService.toUpperCase()}_`
54561
54779
  })), showToast ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
54562
54780
  isDleteBtn: true,
54563
54781
  error: updateApplicationError ? "WS_APPLICATION_UPDATE_ERROR" : null,
@@ -63014,6 +63232,7 @@ const componentsToRegister = {
63014
63232
  WSCard,
63015
63233
  SWCard,
63016
63234
  WSBillIAmendMentInbox: Inbox,
63235
+ WSSearchBillAmendment: SearchBillAmendment,
63017
63236
  WSCreate: WSCreate,
63018
63237
  WSDisconnection: WSDisconnection,
63019
63238
  WSRestoration: WSDisconnection$1,