@djb25/digit-ui-module-ws 1.0.107 → 1.0.109

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
@@ -13253,7 +13253,7 @@ const WSConnectionDetails = _ref => {
13253
13253
  if ((formData === null || formData === void 0 ? void 0 : (_formData$ConnectionD2 = formData.ConnectionDetails) === null || _formData$ConnectionD2 === void 0 ? void 0 : _formData$ConnectionD2.length) > 0) {
13254
13254
  const incoming = formData.ConnectionDetails[0];
13255
13255
  const current = connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails[0];
13256
- if (!(current !== null && current !== void 0 && current.addressType) && incoming !== null && incoming !== void 0 && incoming.addressType || !(current !== null && current !== void 0 && current.completeAddress) && incoming !== null && incoming !== void 0 && incoming.completeAddress || !lodash.isEqual(current, incoming)) {
13256
+ if (!lodash.isEqual(current, incoming)) {
13257
13257
  setConnectionDetails([incoming]);
13258
13258
  }
13259
13259
  }
@@ -13326,9 +13326,6 @@ const WSConnectionDetails = _ref => {
13326
13326
  }, [commonMastersData]);
13327
13327
  React.useEffect(() => {
13328
13328
  var _connectionDetails$, _connectionDetails$2;
13329
- if (userType === "employee") {
13330
- onSelect(config.key, connectionDetails);
13331
- }
13332
13329
  if (connectionDetails !== null && connectionDetails !== void 0 && (_connectionDetails$ = connectionDetails[0]) !== null && _connectionDetails$ !== void 0 && _connectionDetails$.water) setWaterSewarageSelection({
13333
13330
  water: true,
13334
13331
  sewerage: false
@@ -13339,7 +13336,7 @@ const WSConnectionDetails = _ref => {
13339
13336
  });
13340
13337
  }, [connectionDetails]);
13341
13338
  React.useEffect(() => {
13342
- if (!(formData !== null && formData !== void 0 && formData.ConnectionDetails)) {
13339
+ if (!(formData !== null && formData !== void 0 && formData.ConnectionDetails) && (connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails.length) === 0) {
13343
13340
  setConnectionDetails([createConnectionDetails()]);
13344
13341
  }
13345
13342
  }, [formData === null || formData === void 0 ? void 0 : formData.ConnectionDetails]);
@@ -13895,8 +13892,10 @@ const WSRoadCuttingDetails = _ref => {
13895
13892
  })) : setRoadCuttingDetails(prev => prev.filter(o => o.key != roadCutt.key));
13896
13893
  };
13897
13894
  React.useEffect(() => {
13898
- onSelect(config === null || config === void 0 ? void 0 : config.key, roadCuttingDetails);
13899
- }, [roadCuttingDetails]);
13895
+ if (!lodash.isEqual(formData === null || formData === void 0 ? void 0 : formData[config === null || config === void 0 ? void 0 : config.key], roadCuttingDetails)) {
13896
+ onSelect(config === null || config === void 0 ? void 0 : config.key, roadCuttingDetails);
13897
+ }
13898
+ }, [roadCuttingDetails, config === null || config === void 0 ? void 0 : config.key]);
13900
13899
  const commonProps = {
13901
13900
  focusIndex,
13902
13901
  allRoadCuttingDetails: roadCuttingDetails,
@@ -14318,18 +14317,11 @@ const WSConnectionHolderDetails = _ref => {
14318
14317
  const data = connectionHolderDetails.map(e => {
14319
14318
  return e;
14320
14319
  });
14321
- onSelect(config === null || config === void 0 ? void 0 : config.key, data);
14322
- }
14323
- }, [connectionHolderDetails]);
14324
- React.useEffect(() => {
14325
- if (userType === "employee") {
14326
- var _formData$config$key;
14327
- onSelect(config.key, [{
14328
- ...((_formData$config$key = formData[config.key]) === null || _formData$config$key === void 0 ? void 0 : _formData$config$key[0]),
14329
- ...(connectionHolderDetails === null || connectionHolderDetails === void 0 ? void 0 : connectionHolderDetails[0])
14330
- }]);
14320
+ if (!lodash.isEqual(formData === null || formData === void 0 ? void 0 : formData[config === null || config === void 0 ? void 0 : config.key], data)) {
14321
+ onSelect(config === null || config === void 0 ? void 0 : config.key, data);
14322
+ }
14331
14323
  }
14332
- }, [connectionHolderDetails]);
14324
+ }, [connectionHolderDetails, config === null || config === void 0 ? void 0 : config.key]);
14333
14325
  function ispagereloadingenabled(eyeclick) {
14334
14326
  var _Object$values, _formData$ConnectionH2;
14335
14327
  if ((window.location.href.includes("edit") || window.location.href.includes("modify")) && formData !== null && formData !== void 0 && formData.ConnectionHolderDetails && ((_Object$values = Object.values(formData === null || formData === void 0 ? void 0 : (_formData$ConnectionH2 = formData.ConnectionHolderDetails) === null || _formData$ConnectionH2 === void 0 ? void 0 : _formData$ConnectionH2[0])) === null || _Object$values === void 0 ? void 0 : _Object$values.length) > 1) {
@@ -16463,8 +16455,10 @@ const WSActivationPlumberDetails = _ref => {
16463
16455
  const data = plumberDetails.length && plumberDetails.map(e => {
16464
16456
  return e;
16465
16457
  });
16466
- onSelect(config === null || config === void 0 ? void 0 : config.key, data);
16467
- }, [plumberDetails, formData === null || formData === void 0 ? void 0 : (_formData$connectionD = formData.connectionDetails) === null || _formData$connectionD === void 0 ? void 0 : (_formData$connectionD2 = _formData$connectionD[0]) === null || _formData$connectionD2 === void 0 ? void 0 : _formData$connectionD2.connectionType]);
16458
+ if (data && !lodash.isEqual(formData === null || formData === void 0 ? void 0 : formData[config === null || config === void 0 ? void 0 : config.key], data)) {
16459
+ onSelect(config === null || config === void 0 ? void 0 : config.key, data);
16460
+ }
16461
+ }, [plumberDetails, formData === null || formData === void 0 ? void 0 : (_formData$connectionD = formData.connectionDetails) === null || _formData$connectionD === void 0 ? void 0 : (_formData$connectionD2 = _formData$connectionD[0]) === null || _formData$connectionD2 === void 0 ? void 0 : _formData$connectionD2.connectionType, config === null || config === void 0 ? void 0 : config.key]);
16468
16462
  const commonProps = {
16469
16463
  focusIndex,
16470
16464
  allOwners: plumberDetails,
@@ -18914,9 +18908,12 @@ const WSDocumentsEmployee = _ref => {
18914
18908
  };
18915
18909
  onSelect(config.key, documentStep);
18916
18910
  } else {
18917
- onSelect(config.key, {
18911
+ const docPayload = {
18918
18912
  documents: removeDuplicateOtherDocuments(documents)
18919
- });
18913
+ };
18914
+ if (!lodash.isEqual(formData === null || formData === void 0 ? void 0 : formData[config.key], docPayload)) {
18915
+ onSelect(config.key, docPayload);
18916
+ }
18920
18917
  }
18921
18918
  };
18922
18919
  const downloadDocument = function () {
@@ -25857,7 +25854,7 @@ const WSDjbEmployee = _ref => {
25857
25854
  };
25858
25855
 
25859
25856
  const WSDivyangjan = _ref => {
25860
- var _formData$disability, _formData$additionalD;
25857
+ var _formData$disability, _formData$additionalD, _formData$config$key2;
25861
25858
  let {
25862
25859
  config,
25863
25860
  onSelect,
@@ -25886,11 +25883,16 @@ const WSDivyangjan = _ref => {
25886
25883
  }, [onSelect]);
25887
25884
  React.useEffect(() => {
25888
25885
  if (userType === "employee") {
25889
- onSelectRef.current(config.key, {
25890
- isDivyangjan: !!formValue.isDivyangjan
25891
- });
25886
+ var _formData$config$key;
25887
+ const currentVal = formData === null || formData === void 0 ? void 0 : (_formData$config$key = formData[config.key]) === null || _formData$config$key === void 0 ? void 0 : _formData$config$key.isDivyangjan;
25888
+ const newVal = !!formValue.isDivyangjan;
25889
+ if (currentVal !== newVal) {
25890
+ onSelectRef.current(config.key, {
25891
+ isDivyangjan: newVal
25892
+ });
25893
+ }
25892
25894
  }
25893
- }, [config.key, formValue.isDivyangjan, userType]);
25895
+ }, [config.key, formValue.isDivyangjan, userType, formData === null || formData === void 0 ? void 0 : (_formData$config$key2 = formData[config.key]) === null || _formData$config$key2 === void 0 ? void 0 : _formData$config$key2.isDivyangjan]);
25894
25896
  const content = /*#__PURE__*/React__default.createElement(digitUiReactComponents.CollapsibleCardPage, {
25895
25897
  title: t("Are you a Divyangjan/Person with Disability?"),
25896
25898
  defaultOpen: true
@@ -29494,11 +29496,7 @@ const WSCard = () => {
29494
29496
  setTotalCount(waterCount);
29495
29497
  }
29496
29498
  }, [wsData]);
29497
- let links = [{
29498
- label: t("WS_APPLY_NEW_CONNECTION_HOME_CARD_LABEL"),
29499
- link: `/digit-ui/employee/ws/info`,
29500
- roles: ["WS_CEMP", "SW_CEMP"]
29501
- }];
29499
+ let links = [];
29502
29500
  links = links.filter(link => link.roles ? checkForEmployee(link.roles) : true);
29503
29501
  const propsForModuleCard = {
29504
29502
  Icon: /*#__PURE__*/React__default.createElement(digitUiReactComponents.WSICon, null),
@@ -29516,43 +29514,43 @@ const WSCard = () => {
29516
29514
  count: isWSInboxLoading ? "-" : wsData === null || wsData === void 0 ? void 0 : wsData.totalCount,
29517
29515
  label: t("WATER_INBOX"),
29518
29516
  link: `/digit-ui/employee/ws/water/inbox`,
29519
- roles: ["WS_CEMP", "WS_APPROVER", "EE", "WS_DEALING_CLERK", "WS_CLERK"]
29517
+ roles: ["WS_CEMP", "WS_ZRO", "EE"]
29520
29518
  }, {
29521
29519
  label: t("WS_BILL_AMENDMENT_INBOX", "Bill Amendment Inbox"),
29522
29520
  link: `/digit-ui/employee/ws/water/bill-amendment/inbox`,
29523
- roles: ["WS_CEMP", "WS_APPROVER", "EE", "WS_DEALING_CLERK", "WS_CLERK", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER"]
29521
+ roles: ["WS_CEMP", "WS_ZRO", "EE"]
29524
29522
  }, {
29525
29523
  label: t("WS_BILL_AMENDMENT_APPLICATION_SEARCH", "Search Bill Amendment Application"),
29526
29524
  link: `/digit-ui/employee/ws/water/bill-amendment/search-application`,
29527
- roles: ["WS_CEMP", "WS_APPROVER", "EE", "WS_DEALING_CLERK", "WS_CLERK", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER"]
29525
+ roles: ["WS_CEMP", "WS_ZRO", "EE"]
29528
29526
  }, ...links, {
29529
29527
  label: t("WS_WATER_CONNECTION_SEARCH_LABEL"),
29530
29528
  link: `/digit-ui/employee/ws/water/search-connection`,
29531
- roles: ["WS_CEMP", "WS_APPROVER", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER", "WS_CLERK"]
29529
+ roles: ["WS_CEMP", "WS_ZRO", "EE"]
29532
29530
  }, {
29533
29531
  label: t("WS_WATER_APPLICATION_SEARCH"),
29534
29532
  link: `/digit-ui/employee/ws/water/search-application`,
29535
- roles: ["WS_CEMP", "WS_APPROVER", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER", "WS_CLERK"]
29533
+ roles: ["WS_CEMP", "WS_ZRO", "EE"]
29536
29534
  }, {
29537
29535
  label: t("WS_CALCULATION"),
29538
29536
  link: `/digit-ui/employee/ws/water/calculation`,
29539
- roles: ["WS_CEMP", "WS_APPROVER", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER", "WS_CLERK"]
29537
+ roles: ["WS_CEMP", "WS_ZRO"]
29540
29538
  }, {
29541
29539
  label: t("WS_APPLY_MUTATION"),
29542
29540
  link: `/digit-ui/employee/ws/mutation-application`,
29543
- roles: ["WS_CEMP", "WS_APPROVER", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER", "WS_CLERK", "SW_CEMP", "SW_APPROVER", "SW_FIELD_INSPECTOR", "SW_DOC_VERIFIER", "SW_CLERK"]
29541
+ roles: []
29544
29542
  }, {
29545
29543
  label: t("WS_ZRO_VERIFICATION"),
29546
29544
  link: `/digit-ui/employee/ws/zro-application`,
29547
- roles: ["WS_CEMP", "WS_APPROVER", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER", "WS_CLERK", "SW_CEMP", "SW_APPROVER", "SW_FIELD_INSPECTOR", "SW_DOC_VERIFIER", "SW_CLERK"]
29545
+ roles: ["WS_CEMP", "WS_ZRO"]
29548
29546
  }, {
29549
29547
  label: t("WS_DISCONNECTION"),
29550
29548
  link: `/digit-ui/employee/ws/new-disconnection`,
29551
- roles: ["WS_CEMP", "WS_APPROVER", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER", "WS_CLERK", "SW_CEMP", "SW_APPROVER", "SW_FIELD_INSPECTOR", "SW_DOC_VERIFIER", "SW_CLERK"]
29549
+ roles: []
29552
29550
  }, {
29553
29551
  label: t("WS_RECONNECTION"),
29554
29552
  link: `/digit-ui/employee/ws/new-restoration`,
29555
- roles: ["WS_CEMP", "WS_APPROVER", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER", "WS_CLERK", "SW_CEMP", "SW_APPROVER", "SW_FIELD_INSPECTOR", "SW_DOC_VERIFIER", "SW_CLERK"]
29553
+ roles: []
29556
29554
  }].filter(link => link.roles ? checkForEmployee(link.roles) : true)
29557
29555
  };
29558
29556
  return /*#__PURE__*/React__default.createElement(digitUiReactComponents.EmployeeModuleCard, propsForModuleCard);
@@ -29601,11 +29599,7 @@ const SWCard = () => {
29601
29599
  setTotalCount(sewerageCount);
29602
29600
  }
29603
29601
  }, [swData]);
29604
- let links = [{
29605
- label: t("WS_APPLY_NEW_CONNECTION_HOME_CARD_LABEL"),
29606
- link: `/digit-ui/employee/ws/create-application`,
29607
- roles: ["WS_CEMP", "SW_CEMP"]
29608
- }];
29602
+ let links = [];
29609
29603
  links = links.filter(link => link.roles ? checkForEmployee(link.roles) : true);
29610
29604
  const propsForModuleCard = {
29611
29605
  Icon: /*#__PURE__*/React__default.createElement(digitUiReactComponents.WSICon, null),
@@ -36976,10 +36970,122 @@ const ConsumptionDetails = _ref => {
36976
36970
  });
36977
36971
  };
36978
36972
  const consumption = (currentReading, lastReading) => {
36979
- if (currentReading && lastReading) {
36973
+ if (currentReading !== null && currentReading !== undefined && lastReading !== null && lastReading !== undefined && currentReading !== "" && lastReading !== "") {
36980
36974
  return Number(currentReading - lastReading);
36981
36975
  } else return t("NA");
36982
36976
  };
36977
+ const columns = React.useMemo(() => [{
36978
+ Header: t("WS_MYCONNECTIONS_CONSUMER_NO"),
36979
+ accessor: "connectionNo",
36980
+ disableSortBy: true,
36981
+ Cell: _ref2 => {
36982
+ var _row$original;
36983
+ let {
36984
+ row
36985
+ } = _ref2;
36986
+ return /*#__PURE__*/React__default.createElement("span", null, ((_row$original = row.original) === null || _row$original === void 0 ? void 0 : _row$original.connectionNo) || t("NA"));
36987
+ }
36988
+ }, {
36989
+ Header: t("WS_VIEW_BILL_BILLING_PERIOD_LABEL"),
36990
+ accessor: "billingPeriod",
36991
+ disableSortBy: true,
36992
+ Cell: _ref3 => {
36993
+ var _row$original2;
36994
+ let {
36995
+ row
36996
+ } = _ref3;
36997
+ return /*#__PURE__*/React__default.createElement("span", null, ((_row$original2 = row.original) === null || _row$original2 === void 0 ? void 0 : _row$original2.billingPeriod) || t("NA"));
36998
+ }
36999
+ }, {
37000
+ Header: t("WS_READING_QUALITY_CODE"),
37001
+ accessor: "readingQualityCode",
37002
+ disableSortBy: true,
37003
+ Cell: _ref4 => {
37004
+ var _row$original3;
37005
+ let {
37006
+ row
37007
+ } = _ref4;
37008
+ return /*#__PURE__*/React__default.createElement("span", null, ((_row$original3 = row.original) === null || _row$original3 === void 0 ? void 0 : _row$original3.readingQualityCode) || t("NA"));
37009
+ }
37010
+ }, {
37011
+ Header: t("WS_CONSUMPTION_DETAILS_LAST_READING_LABEL"),
37012
+ accessor: "lastReading",
37013
+ disableSortBy: true,
37014
+ Cell: _ref5 => {
37015
+ var _row$original4, _row$original5, _row$original6;
37016
+ let {
37017
+ row
37018
+ } = _ref5;
37019
+ return /*#__PURE__*/React__default.createElement("span", null, ((_row$original4 = row.original) === null || _row$original4 === void 0 ? void 0 : _row$original4.lastReading) !== undefined && ((_row$original5 = row.original) === null || _row$original5 === void 0 ? void 0 : _row$original5.lastReading) !== null ? (_row$original6 = row.original) === null || _row$original6 === void 0 ? void 0 : _row$original6.lastReading : t("NA"));
37020
+ }
37021
+ }, {
37022
+ Header: t("WS_CONSUMPTION_DETAILS_LAST_READING_DATE_LABEL"),
37023
+ accessor: "lastReadingDate",
37024
+ disableSortBy: true,
37025
+ Cell: _ref6 => {
37026
+ var _row$original7, _row$original8;
37027
+ let {
37028
+ row
37029
+ } = _ref6;
37030
+ return /*#__PURE__*/React__default.createElement("span", null, (_row$original7 = row.original) !== null && _row$original7 !== void 0 && _row$original7.lastReadingDate ? Digit.DateUtils.ConvertEpochToDate((_row$original8 = row.original) === null || _row$original8 === void 0 ? void 0 : _row$original8.lastReadingDate) : t("NA"));
37031
+ }
37032
+ }, {
37033
+ Header: t("WS_SERV_DETAIL_CUR_METER_READ"),
37034
+ accessor: "currentReading",
37035
+ disableSortBy: true,
37036
+ Cell: _ref7 => {
37037
+ var _row$original9, _row$original0, _row$original1;
37038
+ let {
37039
+ row
37040
+ } = _ref7;
37041
+ return /*#__PURE__*/React__default.createElement("span", null, ((_row$original9 = row.original) === null || _row$original9 === void 0 ? void 0 : _row$original9.currentReading) !== undefined && ((_row$original0 = row.original) === null || _row$original0 === void 0 ? void 0 : _row$original0.currentReading) !== null ? (_row$original1 = row.original) === null || _row$original1 === void 0 ? void 0 : _row$original1.currentReading : t("NA"));
37042
+ }
37043
+ }, {
37044
+ Header: t("WS_CONSUMPTION_DETAILS_CURRENT_READING_DATE_LABEL"),
37045
+ accessor: "currentReadingDate",
37046
+ disableSortBy: true,
37047
+ Cell: _ref8 => {
37048
+ var _row$original10, _row$original11;
37049
+ let {
37050
+ row
37051
+ } = _ref8;
37052
+ return /*#__PURE__*/React__default.createElement("span", null, (_row$original10 = row.original) !== null && _row$original10 !== void 0 && _row$original10.currentReadingDate ? Digit.DateUtils.ConvertEpochToDate((_row$original11 = row.original) === null || _row$original11 === void 0 ? void 0 : _row$original11.currentReadingDate) : t("NA"));
37053
+ }
37054
+ }, {
37055
+ Header: t("WS_CONSUMPTION_DETAILS_CONSUMPTION_LABEL"),
37056
+ id: "consumption",
37057
+ disableSortBy: true,
37058
+ Cell: _ref9 => {
37059
+ var _row$original12, _row$original13;
37060
+ let {
37061
+ row
37062
+ } = _ref9;
37063
+ return /*#__PURE__*/React__default.createElement("span", null, consumption((_row$original12 = row.original) === null || _row$original12 === void 0 ? void 0 : _row$original12.currentReading, (_row$original13 = row.original) === null || _row$original13 === void 0 ? void 0 : _row$original13.lastReading));
37064
+ }
37065
+ }, {
37066
+ Header: t("WS_COMMON_TABLE_COL_ACTION_LABEL"),
37067
+ id: "action",
37068
+ disableSortBy: true,
37069
+ Cell: _ref0 => {
37070
+ let {
37071
+ row
37072
+ } = _ref0;
37073
+ return /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
37074
+ style: {
37075
+ backgroundColor: "#0A4275",
37076
+ color: "#FFFFFF",
37077
+ minWidth: "auto",
37078
+ padding: "6px 14px",
37079
+ fontSize: "12px",
37080
+ height: "auto",
37081
+ margin: "0px",
37082
+ whiteSpace: "nowrap"
37083
+ },
37084
+ label: t("VIEW_METER_READING_DETAILS"),
37085
+ onSubmit: () => handleViewMeterReadingDetails(row.original)
37086
+ });
37087
+ }
37088
+ }], [t]);
36983
37089
  if (isLoading) {
36984
37090
  return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
36985
37091
  }
@@ -36987,90 +37093,32 @@ const ConsumptionDetails = _ref => {
36987
37093
  meterReadings
36988
37094
  } = data || {};
36989
37095
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
36990
- className: "employee-form-section-wrapper",
36991
- style: {
36992
- display: "flex",
36993
- gap: "16px",
36994
- width: "100%"
36995
- }
36996
- }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.VerticalTimeline, {
36997
- config: [{
36998
- timeLine: [{
36999
- actions: "WS_VIEW_CONSUMPTION",
37000
- currentStep: 1
37001
- }]
37002
- }],
37003
- showFinalStep: false
37004
- }), /*#__PURE__*/React__default.createElement("div", {
37005
37096
  style: {
37006
37097
  flex: 1,
37007
37098
  display: "flex",
37008
37099
  flexDirection: "column",
37009
- gap: "16px"
37010
- }
37011
- }, (meterReadings === null || meterReadings === void 0 ? void 0 : meterReadings.length) > 0 && meterReadings.map((application, index) => /*#__PURE__*/React__default.createElement("div", {
37012
- key: index
37013
- }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, null, /*#__PURE__*/React__default.createElement("div", {
37014
- style: {
37015
- display: "flex",
37016
- justifyContent: "flex-end",
37017
- marginBottom: "16px",
37018
- marginTop: "8px",
37019
- marginRight: "8px"
37100
+ gap: "16px",
37101
+ minWidth: 0,
37102
+ overflowX: "auto"
37020
37103
  }
37021
- }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
37022
- style: {
37023
- backgroundColor: "#0A4275",
37024
- color: "#FFFFFF"
37025
- },
37026
- label: t("VIEW_METER_READING_DETAILS"),
37027
- onSubmit: () => handleViewMeterReadingDetails(application)
37028
- })), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
37029
- key: t("WS_MYCONNECTIONS_CONSUMER_NO"),
37030
- label: `${t("WS_MYCONNECTIONS_CONSUMER_NO")}`,
37031
- text: (application === null || application === void 0 ? void 0 : application.connectionNo) || t("NA"),
37032
- className: "border-none"
37033
- }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
37034
- key: t("WS_VIEW_BILL_BILLING_PERIOD_LABEL"),
37035
- label: `${t("WS_VIEW_BILL_BILLING_PERIOD_LABEL")}`,
37036
- text: (application === null || application === void 0 ? void 0 : application.billingPeriod) || t("NA"),
37037
- className: "border-none"
37038
- }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
37039
- key: t("WS_CONSUMPTION_DETAILS_METER_STATUS_LABEL"),
37040
- label: `${t("WS_CONSUMPTION_DETAILS_METER_STATUS_LABEL")}`,
37041
- text: (application === null || application === void 0 ? void 0 : application.meterStatus) || t("NA"),
37042
- className: "border-none"
37043
- }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
37044
- key: t("WS_READING_QUALITY_CODE"),
37045
- label: `${t("WS_READING_QUALITY_CODE")}`,
37046
- text: (application === null || application === void 0 ? void 0 : application.readingQualityCode) || t("NA"),
37047
- className: "border-none"
37048
- }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
37049
- key: t("WS_CONSUMPTION_DETAILS_LAST_READING_LABEL"),
37050
- label: `${t("WS_CONSUMPTION_DETAILS_LAST_READING_LABEL")}`,
37051
- text: (application === null || application === void 0 ? void 0 : application.lastReading) || t("NA"),
37052
- className: "border-none"
37053
- }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
37054
- key: t("WS_CONSUMPTION_DETAILS_LAST_READING_DATE_LABEL"),
37055
- label: `${t("WS_CONSUMPTION_DETAILS_LAST_READING_DATE_LABEL")}`,
37056
- text: application !== null && application !== void 0 && application.lastReadingDate ? Digit.DateUtils.ConvertEpochToDate(application === null || application === void 0 ? void 0 : application.lastReadingDate) : t("NA"),
37057
- className: "border-none"
37058
- }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
37059
- key: t("WS_SERV_DETAIL_CUR_METER_READ"),
37060
- label: `${t("WS_SERV_DETAIL_CUR_METER_READ")}`,
37061
- text: (application === null || application === void 0 ? void 0 : application.currentReading) || t("NA"),
37062
- className: "border-none"
37063
- }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
37064
- key: t("WS_CONSUMPTION_DETAILS_CURRENT_READING_DATE_LABEL"),
37065
- label: `${t("WS_CONSUMPTION_DETAILS_CURRENT_READING_DATE_LABEL")}`,
37066
- text: application !== null && application !== void 0 && application.currentReadingDate ? Digit.DateUtils.ConvertEpochToDate(application === null || application === void 0 ? void 0 : application.currentReadingDate) : t("NA"),
37067
- className: "border-none"
37068
- }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
37069
- key: t("WS_CONSUMPTION_DETAILS_CONSUMPTION_LABEL"),
37070
- label: `${t("WS_CONSUMPTION_DETAILS_CONSUMPTION_LABEL")}`,
37071
- text: consumption(application === null || application === void 0 ? void 0 : application.currentReading, application === null || application === void 0 ? void 0 : application.lastReading),
37072
- className: "border-none"
37073
- }))))), !(meterReadings !== null && meterReadings !== void 0 && meterReadings.length) > 0 && /*#__PURE__*/React__default.createElement("p", {
37104
+ }, (meterReadings === null || meterReadings === void 0 ? void 0 : meterReadings.length) > 0 ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Table, {
37105
+ t: t,
37106
+ data: meterReadings,
37107
+ columns: columns,
37108
+ totalRecords: meterReadings === null || meterReadings === void 0 ? void 0 : meterReadings.length,
37109
+ manualPagination: false,
37110
+ isPaginationRequired: true,
37111
+ pageSizeLimit: 10,
37112
+ disableSort: true,
37113
+ autoSort: false,
37114
+ getCellProps: () => ({
37115
+ style: {
37116
+ whiteSpace: "nowrap",
37117
+ padding: "16px 14px",
37118
+ fontSize: "14px"
37119
+ }
37120
+ })
37121
+ }) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, null, /*#__PURE__*/React__default.createElement("p", {
37074
37122
  style: {
37075
37123
  marginLeft: "16px",
37076
37124
  marginTop: "16px"
@@ -40212,7 +40260,7 @@ const config$2 = [{
40212
40260
  }];
40213
40261
 
40214
40262
  const WNSMyBills = _ref => {
40215
- var _Digit$UserService$ge, _Digit$SessionStorage, _Digit$UserService$ge2, _Digit$UserService$ge3, _location$state, _Digit$UserService$ge4, _userInfo$userName, _searchResults, _searchResults2, _searchResults3;
40263
+ var _location$state, _Digit$SessionStorage, _Digit$UserService$ge, _Digit$UserService$ge2, _Digit$UserService$ge3, _Digit$UserService$ge4, _location$state2, _Digit$UserService$ge5, _userInfo$userName, _searchResults, _searchResults2, _searchResults3;
40216
40264
  let {
40217
40265
  template,
40218
40266
  header,
@@ -40226,25 +40274,26 @@ const WNSMyBills = _ref => {
40226
40274
  const {
40227
40275
  tenantId: _tenantId
40228
40276
  } = Digit.Hooks.useQueryParams();
40229
- let {
40230
- tenantId
40231
- } = ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info) || (location === null || location === void 0 ? void 0 : location.state) || {
40232
- tenantId: _tenantId
40233
- } || {};
40234
- tenantId = ((_Digit$SessionStorage = Digit.SessionStorage.get("CITIZEN.COMMON.HOME.CITY")) === null || _Digit$SessionStorage === void 0 ? void 0 : _Digit$SessionStorage.code) || ((_Digit$UserService$ge2 = Digit.UserService.getUser()) === null || _Digit$UserService$ge2 === void 0 ? void 0 : (_Digit$UserService$ge3 = _Digit$UserService$ge2.info) === null || _Digit$UserService$ge3 === void 0 ? void 0 : _Digit$UserService$ge3.permanentCity) || tenantId;
40235
- if (!tenantId && !(location !== null && location !== void 0 && (_location$state = location.state) !== null && _location$state !== void 0 && _location$state.fromSearchResults)) {
40277
+ const queryTenantId = _tenantId || (location === null || location === void 0 ? void 0 : (_location$state = location.state) === null || _location$state === void 0 ? void 0 : _location$state.tenantId);
40278
+ let tenantId = queryTenantId || ((_Digit$SessionStorage = Digit.SessionStorage.get("CITIZEN.COMMON.HOME.CITY")) === null || _Digit$SessionStorage === void 0 ? void 0 : _Digit$SessionStorage.code) || ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : (_Digit$UserService$ge2 = _Digit$UserService$ge.info) === null || _Digit$UserService$ge2 === void 0 ? void 0 : _Digit$UserService$ge2.permanentCity) || ((_Digit$UserService$ge3 = Digit.UserService.getUser()) === null || _Digit$UserService$ge3 === void 0 ? void 0 : (_Digit$UserService$ge4 = _Digit$UserService$ge3.info) === null || _Digit$UserService$ge4 === void 0 ? void 0 : _Digit$UserService$ge4.tenantId) || Digit.ULBService.getCurrentTenantId();
40279
+ if (!tenantId || tenantId === "dl") {
40280
+ tenantId = "dl.djb";
40281
+ }
40282
+ if (!tenantId && !(location !== null && location !== void 0 && (_location$state2 = location.state) !== null && _location$state2 !== void 0 && _location$state2.fromSearchResults)) {
40236
40283
  history.replace(`/digit-ui/citizen/login`, {
40237
- from: url
40284
+ from: location.pathname
40238
40285
  });
40239
40286
  }
40240
40287
  let filters = {};
40241
- const userInfo = ((_Digit$UserService$ge4 = Digit.UserService.getUser()) === null || _Digit$UserService$ge4 === void 0 ? void 0 : _Digit$UserService$ge4.info) || {};
40288
+ const userInfo = ((_Digit$UserService$ge5 = Digit.UserService.getUser()) === null || _Digit$UserService$ge5 === void 0 ? void 0 : _Digit$UserService$ge5.info) || {};
40242
40289
  const mobileNumber = userInfo !== null && userInfo !== void 0 && (_userInfo$userName = userInfo.userName) !== null && _userInfo$userName !== void 0 && _userInfo$userName.match(/^[0-9]{10}$/) ? userInfo === null || userInfo === void 0 ? void 0 : userInfo.userName : userInfo === null || userInfo === void 0 ? void 0 : userInfo.mobileNumber;
40243
40290
  filters = {
40244
40291
  ...filters,
40245
- searchType: "CONNECTION"
40292
+ searchType: "CONNECTION",
40293
+ tenantId
40246
40294
  };
40247
40295
  const params = {
40296
+ tenantId,
40248
40297
  mobileNumber,
40249
40298
  ...filters
40250
40299
  };
@@ -40274,8 +40323,8 @@ const WNSMyBills = _ref => {
40274
40323
  const onSubmit = data => {
40275
40324
  history.push(`/digit-ui/citizen/payment/my-bills/${data === null || data === void 0 ? void 0 : data.ConsumerNumber.split("/")[0]}/${stringReplaceAll(data === null || data === void 0 ? void 0 : data.ConsumerNumber, "/", "+")}?workflow=WNS&tenantId=${tenantId}&ConsumerName=${data === null || data === void 0 ? void 0 : data.ConsumerName}`);
40276
40325
  };
40277
- let searchResults = Waterresult && Sewarageresult ? Waterresult.concat(Sewarageresult) : [];
40278
- searchResults = (_searchResults = searchResults) === null || _searchResults === void 0 ? void 0 : _searchResults.filter(ob => (ob === null || ob === void 0 ? void 0 : ob.AmountDue) && (ob === null || ob === void 0 ? void 0 : ob.AmountDue) !== "0");
40326
+ let searchResults = (Waterresult || []).concat(Sewarageresult || []);
40327
+ searchResults = (_searchResults = searchResults) === null || _searchResults === void 0 ? void 0 : _searchResults.filter(ob => (ob === null || ob === void 0 ? void 0 : ob.ConsumerNumber) && (ob === null || ob === void 0 ? void 0 : ob.hasBill) !== false);
40279
40328
  return /*#__PURE__*/React__default.createElement("div", {
40280
40329
  style: {
40281
40330
  marginTop: "16px"
@@ -40614,7 +40663,6 @@ const WSInfoPage = () => {
40614
40663
  className: "ws-info-container"
40615
40664
  }, /*#__PURE__*/React__default.createElement("style", null, `
40616
40665
  .ws-info-container {
40617
- margin: 0 auto;
40618
40666
  padding: 8px 4px 32px 4px;
40619
40667
  color: #0b0c0c;
40620
40668
  box-sizing: border-box;
@@ -40635,27 +40683,27 @@ const WSInfoPage = () => {
40635
40683
  flex-wrap: wrap;
40636
40684
  gap: 10px;
40637
40685
  align-items: center;
40638
- margin-bottom: 12px;
40686
+ margin-bottom: 20px;
40639
40687
  }
40640
40688
  .ws-service-tag {
40641
- background: #e8f3fa;
40642
- color: #0b4d82;
40643
- font-size: 12px;
40689
+ background: #e0f2fe;
40690
+ color: #0369a1;
40691
+ font-size: 11.5px;
40644
40692
  font-weight: 700;
40645
40693
  text-transform: uppercase;
40646
40694
  letter-spacing: 0.5px;
40647
- padding: 4px 12px;
40648
- border-radius: 14px;
40649
- border: 1px solid #c9e0f5;
40695
+ padding: 5px 14px;
40696
+ border-radius: 20px;
40697
+ border: 1px solid #bae6fd;
40650
40698
  }
40651
40699
  .ws-portal-tag {
40652
- background: #f4f5f7;
40653
- color: #505a5f;
40654
- font-size: 12px;
40700
+ background: #f1f5f9;
40701
+ color: #475569;
40702
+ font-size: 11.5px;
40655
40703
  font-weight: 600;
40656
- padding: 4px 12px;
40657
- border-radius: 14px;
40658
- border: 1px solid #e1e4e8;
40704
+ padding: 5px 14px;
40705
+ border-radius: 20px;
40706
+ border: 1px solid #e2e8f0;
40659
40707
  }
40660
40708
  .ws-page-title {
40661
40709
  font-size: 26px;
@@ -40718,57 +40766,61 @@ const WSInfoPage = () => {
40718
40766
  }
40719
40767
  .ws-card {
40720
40768
  background: #ffffff;
40721
- border: 1px solid #dce4ec;
40769
+ border: 1px solid #e2e8f0;
40722
40770
  border-radius: 12px;
40723
- padding: 24px;
40724
- margin-bottom: 24px;
40725
- box-shadow: 0 2px 10px rgba(11, 77, 130, 0.04);
40771
+ padding: 24px 28px;
40772
+ margin-bottom: 20px;
40773
+ box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
40726
40774
  }
40727
40775
  .ws-step-header {
40728
40776
  display: flex;
40729
40777
  align-items: flex-start;
40730
- gap: 14px;
40731
- margin-bottom: 18px;
40732
- padding-bottom: 16px;
40733
- border-bottom: 1px solid #eef2f5;
40778
+ gap: 16px;
40779
+ margin-bottom: 20px;
40780
+ padding-bottom: 18px;
40781
+ border-bottom: 1px solid #f1f5f9;
40734
40782
  }
40735
40783
  .ws-step-num-badge {
40736
- background: #1a67a3;
40784
+ background: linear-gradient(135deg, #1a67a3 0%, #0c4a79 100%);
40737
40785
  color: #ffffff;
40738
- font-size: 16px;
40786
+ font-size: 15px;
40739
40787
  font-weight: 700;
40740
- width: 32px;
40741
- height: 32px;
40788
+ width: 34px;
40789
+ height: 34px;
40742
40790
  border-radius: 50%;
40743
40791
  display: flex;
40744
40792
  align-items: center;
40745
40793
  justify-content: center;
40746
40794
  flex-shrink: 0;
40747
- box-shadow: 0 2px 4px rgba(26, 103, 163, 0.25);
40795
+ box-shadow: 0 2px 6px rgba(26, 103, 163, 0.25);
40748
40796
  }
40749
40797
  .ws-step-title {
40750
- font-size: 19px;
40798
+ font-size: 18px;
40751
40799
  font-weight: 700;
40752
- color: #0b0c0c;
40800
+ color: #0f172a;
40753
40801
  margin: 0 0 4px 0;
40754
40802
  }
40755
40803
  .ws-step-subtitle {
40756
- font-size: 14px;
40757
- color: #505a5f;
40804
+ font-size: 13.5px;
40805
+ color: #475569;
40758
40806
  margin: 0;
40759
40807
  line-height: 1.5;
40760
40808
  }
40761
40809
  .ws-question-container {
40762
40810
  background: #f8fafc;
40763
40811
  border: 1px solid #e2e8f0;
40764
- border-radius: 8px;
40765
- padding: 18px 20px;
40812
+ border-radius: 10px;
40813
+ padding: 18px 22px;
40766
40814
  margin-bottom: 20px;
40815
+ transition: border-color 0.2s ease;
40816
+ }
40817
+ .ws-question-container:hover {
40818
+ border-color: #cbd5e1;
40767
40819
  }
40768
40820
  .ws-question-label {
40769
- font-size: 15.5px;
40821
+ font-size: 15px;
40770
40822
  font-weight: 700;
40771
- color: #0b0c0c;
40823
+ color: #0f172a;
40772
40824
  display: block;
40773
40825
  margin-bottom: 12px;
40774
40826
  }
@@ -41146,39 +41198,67 @@ const WSInfoPage = () => {
41146
41198
  white-space: nowrap;
41147
41199
  }
41148
41200
  .ws-digilocker-box {
41201
+ display: flex;
41202
+ align-items: center;
41203
+ justify-content: space-between;
41204
+ gap: 20px;
41205
+ flex-wrap: wrap;
41149
41206
  background: linear-gradient(135deg, #f0f7ff 0%, #e0f2fe 100%);
41150
41207
  border: 1px solid #bae6fd;
41151
- border-radius: 10px;
41152
- padding: 18px;
41153
- margin-top: 16px;
41208
+ border-radius: 12px;
41209
+ padding: 18px 24px;
41210
+ margin-bottom: 20px;
41211
+ box-shadow: 0 2px 8px rgba(3, 105, 161, 0.06);
41154
41212
  }
41155
- .ws-digilocker-header {
41213
+ .ws-digilocker-content {
41156
41214
  display: flex;
41157
- gap: 12px;
41158
- align-items: flex-start;
41159
- margin-bottom: 14px;
41215
+ align-items: center;
41216
+ gap: 14px;
41217
+ flex: 1;
41218
+ min-width: 280px;
41160
41219
  }
41161
41220
  .ws-dl-icon-circle {
41162
- width: 36px;
41163
- height: 36px;
41221
+ width: 44px;
41222
+ height: 44px;
41164
41223
  background: #ffffff;
41224
+ border: 1px solid #bae6fd;
41165
41225
  border-radius: 50%;
41166
41226
  display: flex;
41167
41227
  align-items: center;
41168
41228
  justify-content: center;
41169
41229
  flex-shrink: 0;
41170
- box-shadow: 0 1px 3px rgba(0,0,0,0.06);
41230
+ box-shadow: 0 2px 4px rgba(3, 105, 161, 0.1);
41231
+ }
41232
+ .ws-dl-info {
41233
+ display: flex;
41234
+ flex-direction: column;
41235
+ gap: 3px;
41236
+ }
41237
+ .ws-dl-title-wrap {
41238
+ display: flex;
41239
+ align-items: center;
41240
+ gap: 10px;
41171
41241
  }
41172
41242
  .ws-dl-title {
41173
- font-size: 15px;
41243
+ font-size: 15.5px;
41174
41244
  font-weight: 700;
41175
41245
  color: #0369a1;
41176
- margin-bottom: 2px;
41246
+ margin: 0;
41247
+ }
41248
+ .ws-dl-pill {
41249
+ background: #0284c7;
41250
+ color: #ffffff;
41251
+ font-size: 10px;
41252
+ font-weight: 700;
41253
+ letter-spacing: 0.5px;
41254
+ padding: 2px 8px;
41255
+ border-radius: 10px;
41177
41256
  }
41178
41257
  .ws-dl-sub {
41179
- font-size: 12.5px;
41258
+ font-size: 13px;
41180
41259
  color: #334155;
41181
41260
  line-height: 1.45;
41261
+ margin: 0;
41182
41262
  }
41183
41263
  .ws-btn {
41184
41264
  display: inline-flex;
@@ -41220,10 +41300,26 @@ const WSInfoPage = () => {
41220
41300
  .ws-btn-digilocker {
41221
41301
  background: #003366;
41222
41302
  color: #ffffff;
41223
- width: 100%;
41303
+ width: auto;
41304
+ padding: 11px 22px;
41305
+ border-radius: 8px;
41306
+ font-size: 14px;
41307
+ font-weight: 600;
41308
+ display: inline-flex;
41309
+ align-items: center;
41310
+ justify-content: center;
41311
+ gap: 8px;
41312
+ cursor: pointer;
41313
+ white-space: nowrap;
41314
+ box-shadow: 0 2px 6px rgba(0, 51, 102, 0.2);
41315
+ transition: all 0.2s ease;
41316
+ flex-shrink: 0;
41317
+ border: none;
41224
41318
  }
41225
41319
  .ws-btn-digilocker:hover {
41226
41320
  background: #002244;
41321
+ transform: translateY(-1px);
41322
+ box-shadow: 0 4px 10px rgba(0, 51, 102, 0.3);
41227
41323
  }
41228
41324
  .ws-btn:disabled {
41229
41325
  opacity: 0.55;
@@ -41231,11 +41327,11 @@ const WSInfoPage = () => {
41231
41327
  }
41232
41328
  .ws-action-card {
41233
41329
  background: #ffffff;
41234
- border: 1px solid #dce4ec;
41330
+ border: 1px solid #e2e8f0;
41235
41331
  border-radius: 12px;
41236
41332
  padding: 18px 24px;
41237
41333
  margin-top: 10px;
41238
- box-shadow: 0 4px 12px rgba(11, 77, 130, 0.08);
41334
+ box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
41239
41335
  }
41240
41336
  .ws-action-content {
41241
41337
  display: flex;
@@ -41246,34 +41342,75 @@ const WSInfoPage = () => {
41246
41342
  }
41247
41343
  .ws-action-hint {
41248
41344
  flex: 1;
41249
- min-width: 250px;
41345
+ min-width: 280px;
41250
41346
  }
41251
- .ws-hint-text {
41252
- font-size: 14px;
41253
- font-weight: 600;
41347
+ .ws-hint-badge {
41348
+ display: inline-flex;
41349
+ align-items: center;
41350
+ gap: 10px;
41351
+ font-size: 13.5px;
41352
+ font-weight: 500;
41353
+ padding: 9px 16px;
41354
+ border-radius: 8px;
41355
+ line-height: 1.4;
41254
41356
  }
41255
41357
  .ws-hint-warning {
41256
- color: #b45309;
41358
+ background: #fffbeb;
41359
+ color: #92400e;
41360
+ border: 1px solid #fde68a;
41361
+ }
41362
+ .ws-hint-warning svg {
41363
+ color: #d97706;
41364
+ flex-shrink: 0;
41365
+ }
41366
+ .ws-hint-info {
41367
+ background: #eff6ff;
41368
+ color: #1e40af;
41369
+ border: 1px solid #bfdbfe;
41370
+ }
41371
+ .ws-hint-info svg {
41372
+ color: #2563eb;
41373
+ flex-shrink: 0;
41257
41374
  }
41258
41375
  .ws-hint-success {
41259
- color: #047857;
41376
+ background: #f0fdf4;
41377
+ color: #166534;
41378
+ border: 1px solid #bbf7d0;
41379
+ }
41380
+ .ws-hint-success svg {
41381
+ color: #16a34a;
41382
+ flex-shrink: 0;
41260
41383
  }
41261
41384
  .ws-btn-next {
41262
- background: #00703c;
41385
+ display: inline-flex;
41386
+ align-items: center;
41387
+ gap: 8px;
41388
+ padding: 12px 26px;
41389
+ font-size: 14.5px;
41390
+ font-weight: 600;
41391
+ border-radius: 8px;
41392
+ border: none;
41393
+ cursor: pointer;
41394
+ white-space: nowrap;
41395
+ transition: all 0.2s ease;
41396
+ }
41397
+ .ws-btn-next:not(:disabled) {
41398
+ background: linear-gradient(135deg, #1a67a3 0%, #0d4a75 100%);
41263
41399
  color: #ffffff;
41264
- font-size: 15px;
41265
- padding: 12px 28px;
41266
- border-radius: 6px;
41267
- box-shadow: 0 2px 4px rgba(0, 112, 60, 0.2);
41400
+ box-shadow: 0 4px 12px rgba(26, 103, 163, 0.25);
41268
41401
  }
41269
- .ws-btn-next:hover:not(:disabled) {
41270
- background: #005a30;
41402
+ .ws-btn-next:not(:disabled):hover {
41403
+ background: linear-gradient(135deg, #155587 0%, #09375a 100%);
41404
+ box-shadow: 0 6px 16px rgba(26, 103, 163, 0.35);
41405
+ transform: translateY(-1px);
41271
41406
  }
41272
41407
  .ws-btn-disabled {
41273
- background: #94a3b8 !important;
41274
- color: #f1f5f9 !important;
41408
+ background: #e2e8f0 !important;
41409
+ color: #94a3b8 !important;
41275
41410
  cursor: not-allowed !important;
41276
41411
  box-shadow: none !important;
41412
+ border: 1px solid #cbd5e1 !important;
41413
+ transform: none !important;
41277
41414
  }
41278
41415
  @media (max-width: 900px) {
41279
41416
  .ws-checklist-grid {
@@ -41543,314 +41680,121 @@ const WSInfoPage = () => {
41543
41680
  type: "button",
41544
41681
  onClick: handleCreateProperty
41545
41682
  }, t("Register New Property")))), /*#__PURE__*/React__default.createElement("div", {
41546
- className: "ws-card"
41547
- }, /*#__PURE__*/React__default.createElement("div", {
41548
- className: "ws-checklist-header"
41683
+ className: "ws-digilocker-box"
41549
41684
  }, /*#__PURE__*/React__default.createElement("div", {
41550
- className: "ws-checklist-title-row"
41551
- }, /*#__PURE__*/React__default.createElement("span", {
41552
- className: "ws-section-badge"
41553
- }, t("Application Checklist")), /*#__PURE__*/React__default.createElement("h2", {
41554
- className: "ws-checklist-title"
41555
- }, t("What You Will Need During The Application"))), /*#__PURE__*/React__default.createElement("div", {
41556
- className: "ws-confused-user-explainer"
41685
+ className: "ws-digilocker-content"
41557
41686
  }, /*#__PURE__*/React__default.createElement("div", {
41558
- className: "ws-explainer-icon"
41687
+ className: "ws-dl-icon-circle"
41559
41688
  }, /*#__PURE__*/React__default.createElement("svg", {
41560
41689
  width: "22",
41561
41690
  height: "22",
41562
41691
  viewBox: "0 0 24 24",
41563
41692
  fill: "none",
41564
- stroke: "#16a34a",
41565
- strokeWidth: "2",
41566
- strokeLinecap: "round",
41567
- strokeLinejoin: "round"
41568
- }, /*#__PURE__*/React__default.createElement("circle", {
41569
- cx: "12",
41570
- cy: "12",
41571
- r: "10"
41572
- }), /*#__PURE__*/React__default.createElement("path", {
41573
- d: "M12 16v-4"
41574
- }), /*#__PURE__*/React__default.createElement("path", {
41575
- d: "M12 8h.01"
41576
- }))), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("p", {
41577
- className: "ws-explainer-desc"
41578
- }, t("The items below outline the exact information you will enter and the supporting documents you will upload in the upcoming application screens. You do NOT need to fill them in on this screen—this checklist helps you gather all details and keep scanned copies ready in advance for a fast, hassle-free submission."))))), /*#__PURE__*/React__default.createElement("div", {
41579
- className: "ws-checklist-grid"
41693
+ stroke: "#003366",
41694
+ strokeWidth: "2"
41695
+ }, /*#__PURE__*/React__default.createElement("path", {
41696
+ d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"
41697
+ }))), /*#__PURE__*/React__default.createElement("div", {
41698
+ className: "ws-dl-info"
41580
41699
  }, /*#__PURE__*/React__default.createElement("div", {
41581
- className: "ws-checklist-column"
41700
+ className: "ws-dl-title-wrap"
41701
+ }, /*#__PURE__*/React__default.createElement("span", {
41702
+ className: "ws-dl-title"
41703
+ }, t("Fast-Track with DigiLocker")), /*#__PURE__*/React__default.createElement("span", {
41704
+ className: "ws-dl-pill"
41705
+ }, t("RECOMMENDED"))), /*#__PURE__*/React__default.createElement("p", {
41706
+ className: "ws-dl-sub"
41707
+ }, t("Fetch your verified Aadhaar, Electricity Bill, and Identity documents directly without manual upload.")))), /*#__PURE__*/React__default.createElement("button", {
41708
+ type: "button",
41709
+ className: "ws-btn ws-btn-digilocker",
41710
+ onClick: handleDigiLockerLogin
41711
+ }, /*#__PURE__*/React__default.createElement("span", null, "\uD83D\uDD10"), /*#__PURE__*/React__default.createElement("span", null, t("DigiLocker Consent")))), /*#__PURE__*/React__default.createElement("div", {
41712
+ className: "ws-action-card"
41582
41713
  }, /*#__PURE__*/React__default.createElement("div", {
41583
- className: "ws-col-header"
41714
+ className: "ws-action-content"
41584
41715
  }, /*#__PURE__*/React__default.createElement("div", {
41585
- className: "ws-col-icon-wrap",
41586
- style: {
41587
- background: "#e0f2fe",
41588
- color: "#0369a1"
41589
- }
41716
+ className: "ws-action-hint"
41717
+ }, !hasProperty ? /*#__PURE__*/React__default.createElement("div", {
41718
+ className: "ws-hint-badge ws-hint-warning"
41590
41719
  }, /*#__PURE__*/React__default.createElement("svg", {
41591
- width: "20",
41592
- height: "20",
41720
+ width: "18",
41721
+ height: "18",
41593
41722
  viewBox: "0 0 24 24",
41594
41723
  fill: "none",
41595
41724
  stroke: "currentColor",
41596
41725
  strokeWidth: "2"
41597
- }, /*#__PURE__*/React__default.createElement("path", {
41598
- d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"
41599
- }), /*#__PURE__*/React__default.createElement("path", {
41600
- d: "M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"
41601
- }))), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("h3", {
41602
- className: "ws-col-title"
41603
- }, t("1. Information You Will Fill In")), /*#__PURE__*/React__default.createElement("p", {
41604
- className: "ws-col-subtitle"
41605
- }, t("Fields asked across the application stages")))), /*#__PURE__*/React__default.createElement("div", {
41606
- className: "ws-group-cards-list"
41607
- }, /*#__PURE__*/React__default.createElement("div", {
41608
- className: "ws-group-card"
41609
- }, /*#__PURE__*/React__default.createElement("div", {
41610
- className: "ws-group-title"
41611
- }, /*#__PURE__*/React__default.createElement("span", null, "\uD83D\uDCA7"), /*#__PURE__*/React__default.createElement("span", null, t("Connection Details"))), /*#__PURE__*/React__default.createElement("div", {
41612
- className: "ws-tag-grid"
41613
- }, /*#__PURE__*/React__default.createElement("span", {
41614
- className: "ws-tag-item"
41615
- }, t("Request Type")), /*#__PURE__*/React__default.createElement("span", {
41616
- className: "ws-tag-item"
41617
- }, t("Applicant Type")), /*#__PURE__*/React__default.createElement("span", {
41618
- className: "ws-tag-item"
41619
- }, t("Is Divyangjan / Person with Disability?")))), /*#__PURE__*/React__default.createElement("div", {
41620
- className: "ws-group-card"
41621
- }, /*#__PURE__*/React__default.createElement("div", {
41622
- className: "ws-group-title"
41623
- }, /*#__PURE__*/React__default.createElement("span", null, "\uD83D\uDC64"), /*#__PURE__*/React__default.createElement("span", null, t("Connection Holder Details"))), /*#__PURE__*/React__default.createElement("div", {
41624
- className: "ws-tag-grid"
41625
- }, /*#__PURE__*/React__default.createElement("span", {
41626
- className: "ws-tag-item"
41627
- }, t("Name")), /*#__PURE__*/React__default.createElement("span", {
41628
- className: "ws-tag-item"
41629
- }, t("Middle Name")), /*#__PURE__*/React__default.createElement("span", {
41630
- className: "ws-tag-item"
41631
- }, t("Last Name")), /*#__PURE__*/React__default.createElement("span", {
41632
- className: "ws-tag-item"
41633
- }, t("Gender")), /*#__PURE__*/React__default.createElement("span", {
41634
- className: "ws-tag-item"
41635
- }, t("Mobile Number")), /*#__PURE__*/React__default.createElement("span", {
41636
- className: "ws-tag-item"
41637
- }, t("Email ID")))), /*#__PURE__*/React__default.createElement("div", {
41638
- className: "ws-group-card"
41639
- }, /*#__PURE__*/React__default.createElement("div", {
41640
- className: "ws-group-title"
41641
- }, /*#__PURE__*/React__default.createElement("span", null, "\uD83D\uDCCD"), /*#__PURE__*/React__default.createElement("span", null, t("Property Address & Location"))), /*#__PURE__*/React__default.createElement("div", {
41642
- className: "ws-tag-grid"
41643
- }, /*#__PURE__*/React__default.createElement("span", {
41644
- className: "ws-tag-item"
41645
- }, t("Address Type")), /*#__PURE__*/React__default.createElement("span", {
41646
- className: "ws-tag-item"
41647
- }, t("City")), /*#__PURE__*/React__default.createElement("span", {
41648
- className: "ws-tag-item"
41649
- }, t("Pincode")), /*#__PURE__*/React__default.createElement("span", {
41650
- className: "ws-tag-item"
41651
- }, t("Locality")), /*#__PURE__*/React__default.createElement("span", {
41652
- className: "ws-tag-item"
41653
- }, t("Sub-Locality")), /*#__PURE__*/React__default.createElement("span", {
41654
- className: "ws-tag-item"
41655
- }, t("Street Name / Gali")), /*#__PURE__*/React__default.createElement("span", {
41656
- className: "ws-tag-item"
41657
- }, t("Address Line 1")), /*#__PURE__*/React__default.createElement("span", {
41658
- className: "ws-tag-item"
41659
- }, t("Address Line 2")), /*#__PURE__*/React__default.createElement("span", {
41660
- className: "ws-tag-item"
41661
- }, t("House No.")), /*#__PURE__*/React__default.createElement("span", {
41662
- className: "ws-tag-item"
41663
- }, t("Latitude")), /*#__PURE__*/React__default.createElement("span", {
41664
- className: "ws-tag-item"
41665
- }, t("Longitude")), /*#__PURE__*/React__default.createElement("span", {
41666
- className: "ws-tag-item"
41667
- }, t("Assembly")), /*#__PURE__*/React__default.createElement("span", {
41668
- className: "ws-tag-item"
41669
- }, t("Ward")), /*#__PURE__*/React__default.createElement("span", {
41670
- className: "ws-tag-item"
41671
- }, t("Zone")), /*#__PURE__*/React__default.createElement("span", {
41672
- className: "ws-tag-item"
41673
- }, t("Landmark")))), /*#__PURE__*/React__default.createElement("div", {
41674
- className: "ws-group-card"
41675
- }, /*#__PURE__*/React__default.createElement("div", {
41676
- className: "ws-group-title"
41677
- }, /*#__PURE__*/React__default.createElement("span", null, "\uD83C\uDFE2"), /*#__PURE__*/React__default.createElement("span", null, t("Property & Connection Usage"))), /*#__PURE__*/React__default.createElement("div", {
41678
- className: "ws-tag-grid"
41679
- }, /*#__PURE__*/React__default.createElement("span", {
41680
- className: "ws-tag-item"
41681
- }, t("Category Type")), /*#__PURE__*/React__default.createElement("span", {
41682
- className: "ws-tag-item"
41683
- }, t("Property Category")), /*#__PURE__*/React__default.createElement("span", {
41684
- className: "ws-tag-item"
41685
- }, t("Property Type")), /*#__PURE__*/React__default.createElement("span", {
41686
- className: "ws-tag-item"
41687
- }, t("Water Usage Type")), /*#__PURE__*/React__default.createElement("span", {
41688
- className: "ws-tag-item"
41689
- }, t("Number of Floors")), /*#__PURE__*/React__default.createElement("span", {
41690
- className: "ws-tag-item"
41691
- }, t("Plot Area")), /*#__PURE__*/React__default.createElement("span", {
41692
- className: "ws-tag-item"
41693
- }, t("Built-up Area")), /*#__PURE__*/React__default.createElement("span", {
41694
- className: "ws-tag-item"
41695
- }, t("Year of Construction")), /*#__PURE__*/React__default.createElement("span", {
41696
- className: "ws-tag-item"
41697
- }, t("Dwelling Units")))), /*#__PURE__*/React__default.createElement("div", {
41698
- className: "ws-group-card"
41699
- }, /*#__PURE__*/React__default.createElement("div", {
41700
- className: "ws-group-title"
41701
- }, /*#__PURE__*/React__default.createElement("span", null, "\uD83C\uDFDB\uFE0F"), /*#__PURE__*/React__default.createElement("span", null, t("DJB Employee Details (if applicable)"))), /*#__PURE__*/React__default.createElement("div", {
41702
- className: "ws-tag-grid"
41703
- }, /*#__PURE__*/React__default.createElement("span", {
41704
- className: "ws-tag-item"
41705
- }, t("Employee ID")), /*#__PURE__*/React__default.createElement("span", {
41706
- className: "ws-tag-item"
41707
- }, t("Employee Designation")))))), /*#__PURE__*/React__default.createElement("div", {
41708
- className: "ws-checklist-column"
41709
- }, /*#__PURE__*/React__default.createElement("div", {
41710
- className: "ws-col-header"
41711
- }, /*#__PURE__*/React__default.createElement("div", {
41712
- className: "ws-col-icon-wrap",
41713
- style: {
41714
- background: "#fef3c7",
41715
- color: "#b45309"
41716
- }
41726
+ }, /*#__PURE__*/React__default.createElement("circle", {
41727
+ cx: "12",
41728
+ cy: "12",
41729
+ r: "10"
41730
+ }), /*#__PURE__*/React__default.createElement("line", {
41731
+ x1: "12",
41732
+ y1: "8",
41733
+ x2: "12",
41734
+ y2: "12"
41735
+ }), /*#__PURE__*/React__default.createElement("line", {
41736
+ x1: "12",
41737
+ y1: "16",
41738
+ x2: "12.01",
41739
+ y2: "16"
41740
+ })), /*#__PURE__*/React__default.createElement("span", null, t("Please select whether you have an existing property in Step 1 to continue."))) : (hasProperty === null || hasProperty === void 0 ? void 0 : hasProperty.code) === "YES" && !selectedProperty ? /*#__PURE__*/React__default.createElement("div", {
41741
+ className: "ws-hint-badge ws-hint-warning"
41717
41742
  }, /*#__PURE__*/React__default.createElement("svg", {
41718
- width: "20",
41719
- height: "20",
41743
+ width: "18",
41744
+ height: "18",
41720
41745
  viewBox: "0 0 24 24",
41721
41746
  fill: "none",
41722
41747
  stroke: "currentColor",
41723
41748
  strokeWidth: "2"
41724
- }, /*#__PURE__*/React__default.createElement("path", {
41725
- d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"
41726
- }), /*#__PURE__*/React__default.createElement("polyline", {
41727
- points: "14 2 14 8 20 8"
41749
+ }, /*#__PURE__*/React__default.createElement("circle", {
41750
+ cx: "12",
41751
+ cy: "12",
41752
+ r: "10"
41728
41753
  }), /*#__PURE__*/React__default.createElement("line", {
41729
- x1: "16",
41730
- y1: "13",
41731
- x2: "8",
41732
- y2: "13"
41754
+ x1: "12",
41755
+ y1: "8",
41756
+ x2: "12",
41757
+ y2: "12"
41733
41758
  }), /*#__PURE__*/React__default.createElement("line", {
41734
- x1: "16",
41735
- y1: "17",
41736
- x2: "8",
41737
- y2: "17"
41738
- }))), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("h3", {
41739
- className: "ws-col-title"
41740
- }, t("2. Documents to Upload")), /*#__PURE__*/React__default.createElement("p", {
41741
- className: "ws-col-subtitle"
41742
- }, t("Keep clear scanned files ready (PDF/JPG/PNG, ≤ 5MB)")))), /*#__PURE__*/React__default.createElement("div", {
41743
- className: "ws-docs-cards-list"
41744
- }, /*#__PURE__*/React__default.createElement("div", {
41745
- className: "ws-doc-item-card"
41746
- }, /*#__PURE__*/React__default.createElement("div", {
41747
- className: "ws-doc-badge"
41748
- }, "\uD83E\uDEAA"), /*#__PURE__*/React__default.createElement("div", {
41749
- className: "ws-doc-info"
41750
- }, /*#__PURE__*/React__default.createElement("div", {
41751
- className: "ws-doc-name"
41752
- }, t("Proof of Identity")), /*#__PURE__*/React__default.createElement("div", {
41753
- className: "ws-doc-desc"
41754
- }, t("Aadhaar Card, Voter ID, PAN Card, or Passport"))), /*#__PURE__*/React__default.createElement("span", {
41755
- className: "ws-req-pill"
41756
- }, t("Mandatory"))), /*#__PURE__*/React__default.createElement("div", {
41757
- className: "ws-doc-item-card"
41758
- }, /*#__PURE__*/React__default.createElement("div", {
41759
- className: "ws-doc-badge"
41760
- }, "\uD83C\uDFE0"), /*#__PURE__*/React__default.createElement("div", {
41761
- className: "ws-doc-info"
41762
- }, /*#__PURE__*/React__default.createElement("div", {
41763
- className: "ws-doc-name"
41764
- }, t("Proof of Address / Ownership")), /*#__PURE__*/React__default.createElement("div", {
41765
- className: "ws-doc-desc"
41766
- }, t("Registered Sale Deed, Conveyance Deed, or Allotment Letter"))), /*#__PURE__*/React__default.createElement("span", {
41767
- className: "ws-req-pill"
41768
- }, t("Mandatory"))), /*#__PURE__*/React__default.createElement("div", {
41769
- className: "ws-doc-item-card"
41770
- }, /*#__PURE__*/React__default.createElement("div", {
41771
- className: "ws-doc-badge"
41772
- }, "\u26A1"), /*#__PURE__*/React__default.createElement("div", {
41773
- className: "ws-doc-info"
41774
- }, /*#__PURE__*/React__default.createElement("div", {
41775
- className: "ws-doc-name"
41776
- }, t("Electricity Bill")), /*#__PURE__*/React__default.createElement("div", {
41777
- className: "ws-doc-desc"
41778
- }, t("Latest paid electricity bill of the premises"))), /*#__PURE__*/React__default.createElement("span", {
41779
- className: "ws-req-pill"
41780
- }, t("Mandatory"))), /*#__PURE__*/React__default.createElement("div", {
41781
- className: "ws-doc-item-card"
41782
- }, /*#__PURE__*/React__default.createElement("div", {
41783
- className: "ws-doc-badge"
41784
- }, "\uD83D\uDD27"), /*#__PURE__*/React__default.createElement("div", {
41785
- className: "ws-doc-info"
41786
- }, /*#__PURE__*/React__default.createElement("div", {
41787
- className: "ws-doc-name"
41788
- }, t("Plumber Report")), /*#__PURE__*/React__default.createElement("div", {
41789
- className: "ws-doc-desc"
41790
- }, t("Completion certificate from a licensed plumber"))), /*#__PURE__*/React__default.createElement("span", {
41791
- className: "ws-opt-pill"
41792
- }, t("As Applicable"))), /*#__PURE__*/React__default.createElement("div", {
41793
- className: "ws-doc-item-card"
41794
- }, /*#__PURE__*/React__default.createElement("div", {
41795
- className: "ws-doc-badge"
41796
- }, "\uD83D\uDCD0"), /*#__PURE__*/React__default.createElement("div", {
41797
- className: "ws-doc-info"
41798
- }, /*#__PURE__*/React__default.createElement("div", {
41799
- className: "ws-doc-name"
41800
- }, t("Building Plan")), /*#__PURE__*/React__default.createElement("div", {
41801
- className: "ws-doc-desc"
41802
- }, t("Sanctioned / approved layout plan of the structure"))), /*#__PURE__*/React__default.createElement("span", {
41803
- className: "ws-opt-pill"
41804
- }, t("As Applicable"))), /*#__PURE__*/React__default.createElement("div", {
41805
- className: "ws-doc-item-card"
41806
- }, /*#__PURE__*/React__default.createElement("div", {
41807
- className: "ws-doc-badge"
41808
- }, "\uD83E\uDDFE"), /*#__PURE__*/React__default.createElement("div", {
41809
- className: "ws-doc-info"
41810
- }, /*#__PURE__*/React__default.createElement("div", {
41811
- className: "ws-doc-name"
41812
- }, t("Property Tax Receipt")), /*#__PURE__*/React__default.createElement("div", {
41813
- className: "ws-doc-desc"
41814
- }, t("Latest property tax receipt / assessment notice"))), /*#__PURE__*/React__default.createElement("span", {
41815
- className: "ws-opt-pill"
41816
- }, t("As Applicable")))), /*#__PURE__*/React__default.createElement("div", {
41817
- className: "ws-digilocker-box"
41818
- }, /*#__PURE__*/React__default.createElement("div", {
41819
- className: "ws-digilocker-header"
41820
- }, /*#__PURE__*/React__default.createElement("div", {
41821
- className: "ws-dl-icon-circle"
41759
+ x1: "12",
41760
+ y1: "16",
41761
+ x2: "12.01",
41762
+ y2: "16"
41763
+ })), /*#__PURE__*/React__default.createElement("span", null, t("Please verify your mobile number and select a property from the dropdown to proceed."))) : (hasProperty === null || hasProperty === void 0 ? void 0 : hasProperty.code) === "NO" ? /*#__PURE__*/React__default.createElement("div", {
41764
+ className: "ws-hint-badge ws-hint-info"
41822
41765
  }, /*#__PURE__*/React__default.createElement("svg", {
41823
- width: "22",
41824
- height: "22",
41766
+ width: "18",
41767
+ height: "18",
41825
41768
  viewBox: "0 0 24 24",
41826
41769
  fill: "none",
41827
- stroke: "#003366",
41770
+ stroke: "currentColor",
41828
41771
  strokeWidth: "2"
41829
- }, /*#__PURE__*/React__default.createElement("path", {
41830
- d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"
41831
- }))), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
41832
- className: "ws-dl-title"
41833
- }, t("Fast-Track with DigiLocker")), /*#__PURE__*/React__default.createElement("div", {
41834
- className: "ws-dl-sub"
41835
- }, t("Fetch your verified Aadhaar, Electricity Bill, and Identity documents directly without manual upload.")))), /*#__PURE__*/React__default.createElement("button", {
41836
- type: "button",
41837
- className: "ws-btn ws-btn-digilocker",
41838
- onClick: handleDigiLockerLogin
41839
- }, /*#__PURE__*/React__default.createElement("span", null, "\uD83D\uDD10"), /*#__PURE__*/React__default.createElement("span", null, t("DigiLocker Consent"))))))), /*#__PURE__*/React__default.createElement("div", {
41840
- className: "ws-action-card"
41841
- }, /*#__PURE__*/React__default.createElement("div", {
41842
- className: "ws-action-content"
41843
- }, /*#__PURE__*/React__default.createElement("div", {
41844
- className: "ws-action-hint"
41845
- }, !hasProperty ? /*#__PURE__*/React__default.createElement("span", {
41846
- className: "ws-hint-text ws-hint-warning"
41847
- }, "\u26A0\uFE0F ", t("Please select whether you have an existing property in Step 1 to continue.")) : (hasProperty === null || hasProperty === void 0 ? void 0 : hasProperty.code) === "YES" && !selectedProperty ? /*#__PURE__*/React__default.createElement("span", {
41848
- className: "ws-hint-text ws-hint-warning"
41849
- }, "\u26A0\uFE0F ", t("Please verify your mobile number and select a property from the dropdown to proceed.")) : (hasProperty === null || hasProperty === void 0 ? void 0 : hasProperty.code) === "NO" ? /*#__PURE__*/React__default.createElement("span", {
41850
- className: "ws-hint-text ws-hint-warning"
41851
- }, "\u2139\uFE0F ", t("Please register your property using the button in Step 1 before applying.")) : /*#__PURE__*/React__default.createElement("span", {
41852
- className: "ws-hint-text ws-hint-success"
41853
- }, "\u2713 ", t("All prerequisites verified! You are ready to start the application form."))), /*#__PURE__*/React__default.createElement("div", {
41772
+ }, /*#__PURE__*/React__default.createElement("circle", {
41773
+ cx: "12",
41774
+ cy: "12",
41775
+ r: "10"
41776
+ }), /*#__PURE__*/React__default.createElement("line", {
41777
+ x1: "12",
41778
+ y1: "16",
41779
+ x2: "12",
41780
+ y2: "12"
41781
+ }), /*#__PURE__*/React__default.createElement("line", {
41782
+ x1: "12",
41783
+ y1: "8",
41784
+ x2: "12.01",
41785
+ y2: "8"
41786
+ })), /*#__PURE__*/React__default.createElement("span", null, t("Please register your property using the button in Step 1 before applying."))) : /*#__PURE__*/React__default.createElement("div", {
41787
+ className: "ws-hint-badge ws-hint-success"
41788
+ }, /*#__PURE__*/React__default.createElement("svg", {
41789
+ width: "18",
41790
+ height: "18",
41791
+ viewBox: "0 0 24 24",
41792
+ fill: "none",
41793
+ stroke: "currentColor",
41794
+ strokeWidth: "2.5"
41795
+ }, /*#__PURE__*/React__default.createElement("polyline", {
41796
+ points: "20 6 9 17 4 12"
41797
+ })), /*#__PURE__*/React__default.createElement("span", null, t("All prerequisites verified! You are ready to start the application form.")))), /*#__PURE__*/React__default.createElement("div", {
41854
41798
  className: "ws-action-buttons"
41855
41799
  }, /*#__PURE__*/React__default.createElement("button", {
41856
41800
  type: "button",
@@ -55574,7 +55518,7 @@ const EditApplication$1 = () => {
55574
55518
  };
55575
55519
 
55576
55520
  const ConsumptionDetails$1 = _ref => {
55577
- var _user$info, _mdmsBillingPeriod$Md, _mdmsBillingPeriod$Md2, _mdmsBillingPeriod$Md3, _mdmsMeterStatus$Mdms, _mdmsMeterStatus$Mdms2, _mdmsMeterStatus$Mdms3, _DJBReadingQualityCod, _DJBReadingQualityCod2, _DJBReadingQualityCod3, _details$4, _details$5, _meterReadingDetailsD, _meterReadingDetailsD2, _meterReadingDetailsD3, _meterReadingDetailsD4, _meterReadingDetailsD5, _meterReadingDetailsD6, _meterReadingDetailsD7, _meterReadingDetailsD8, _meterReadingDetailsD9, _meterReadingDetailsD0, _meterReadingDetailsD1, _meterReadingDetailsD10, _meterReadingDetailsD11, _meterReadingDetailsD12, _meterReadingDetailsD13, _meterReadingDetailsD14, _meterReadingDetailsD15, _meterReadingDetailsD16, _meterReadingDetailsD17, _meterReadingDetailsD18, _meterReadingDetailsD19, _meterReadingDetailsD20, _meterReadingDetailsD21, _meterReadingDetailsD22, _meterReadingDetailsD23, _meterReadingDetailsD24, _meterReadingDetailsD25, _meterReadingDetailsD26, _meterReadingDetailsD27, _meterReadingDetailsD28, _meterReadingDetailsD29, _meterReadingDetailsD30, _meterReadingDetailsD31, _meterReadingDetailsD32, _meterReadingDetailsD33, _meterReadingDetailsD34, _meterReadingDetailsD35, _meterReadingDetailsD36, _meterReadingDetailsD37, _meterReadingDetailsD38, _meterReadingDetailsD39, _meterReadingDetailsD40, _meterReadingDetailsD41, _meterReadingDetailsD42, _meterReadingDetailsD43, _meterReadingDetailsD44, _meterReadingDetailsD45, _meterReadingDetailsD46, _meterReadingDetailsD47, _meterReadingDetailsD48, _meterReadingDetailsD49, _meterReadingDetailsD50, _meterReadingDetailsD51, _meterReadingDetailsD52, _meterReadingDetailsD53, _meterReadingDetailsD54, _meterReadingDetailsD55, _meterReadingDetailsD56, _meterReadingDetailsD57, _meterReadingDetailsD58, _meterReadingDetailsD59, _meterReadingDetailsD60, _meterReadingDetailsD61, _meterReadingDetailsD62, _meterReadingDetailsD63, _meterReadingDetailsD64, _meterReadingDetailsD65, _meterReadingDetailsD66, _meterReadingDetailsD67, _meterReadingDetailsD68, _meterReadingDetailsD69, _meterReadingDetailsD70, _meterReadingDetailsD71, _meterReadingDetailsD72, _meterReadingDetailsD73, _meterReadingDetailsD74, _meterReadingDetailsD75, _meterReadingDetailsD76, _meterReadingDetailsD77, _meterReadingDetailsD78, _meterReadingDetailsD79, _meterReadingDetailsD80, _meterReadingDetailsD81, _meterReadingDetailsD82;
55521
+ var _user$info, _mdmsBillingPeriod$Md, _mdmsBillingPeriod$Md2, _mdmsBillingPeriod$Md3, _details$4, _details$5, _meterReadingDetailsD, _meterReadingDetailsD2, _meterReadingDetailsD3, _meterReadingDetailsD4, _meterReadingDetailsD5, _meterReadingDetailsD6, _meterReadingDetailsD7, _meterReadingDetailsD8, _meterReadingDetailsD9, _meterReadingDetailsD0, _meterReadingDetailsD1, _meterReadingDetailsD10, _meterReadingDetailsD11, _meterReadingDetailsD12, _meterReadingDetailsD13, _meterReadingDetailsD14, _meterReadingDetailsD15, _meterReadingDetailsD16, _meterReadingDetailsD17, _meterReadingDetailsD18, _meterReadingDetailsD19, _meterReadingDetailsD20, _meterReadingDetailsD21, _meterReadingDetailsD22, _meterReadingDetailsD23, _meterReadingDetailsD24, _meterReadingDetailsD25, _meterReadingDetailsD26, _meterReadingDetailsD27, _meterReadingDetailsD28, _meterReadingDetailsD29, _meterReadingDetailsD30, _meterReadingDetailsD31, _meterReadingDetailsD32, _meterReadingDetailsD33, _meterReadingDetailsD34, _meterReadingDetailsD35, _meterReadingDetailsD36, _meterReadingDetailsD37, _meterReadingDetailsD38, _meterReadingDetailsD39, _meterReadingDetailsD40, _meterReadingDetailsD41, _meterReadingDetailsD42, _meterReadingDetailsD43, _meterReadingDetailsD44, _meterReadingDetailsD45, _meterReadingDetailsD46, _meterReadingDetailsD47, _meterReadingDetailsD48, _meterReadingDetailsD49, _meterReadingDetailsD50, _meterReadingDetailsD51, _meterReadingDetailsD52, _meterReadingDetailsD53, _meterReadingDetailsD54, _meterReadingDetailsD55, _meterReadingDetailsD56, _meterReadingDetailsD57, _meterReadingDetailsD58, _meterReadingDetailsD59, _meterReadingDetailsD60, _meterReadingDetailsD61, _meterReadingDetailsD62, _meterReadingDetailsD63, _meterReadingDetailsD64, _meterReadingDetailsD65, _meterReadingDetailsD66, _meterReadingDetailsD67, _meterReadingDetailsD68, _meterReadingDetailsD69, _meterReadingDetailsD70, _meterReadingDetailsD71, _meterReadingDetailsD72, _meterReadingDetailsD73, _meterReadingDetailsD74, _meterReadingDetailsD75, _meterReadingDetailsD76, _meterReadingDetailsD77, _meterReadingDetailsD78, _meterReadingDetailsD79, _meterReadingDetailsD80, _meterReadingDetailsD81, _meterReadingDetailsD82;
55578
55522
  const {
55579
55523
  t
55580
55524
  } = reactI18next.useTranslation();
@@ -55711,17 +55655,30 @@ const ConsumptionDetails$1 = _ref => {
55711
55655
  };
55712
55656
  const getBillingPeriodFromMdms = mdmsBillingPeriod === null || mdmsBillingPeriod === void 0 ? void 0 : (_mdmsBillingPeriod$Md = mdmsBillingPeriod.MdmsRes) === null || _mdmsBillingPeriod$Md === void 0 ? void 0 : (_mdmsBillingPeriod$Md2 = _mdmsBillingPeriod$Md["ws-services-masters"]) === null || _mdmsBillingPeriod$Md2 === void 0 ? void 0 : (_mdmsBillingPeriod$Md3 = _mdmsBillingPeriod$Md2.billingPeriod) === null || _mdmsBillingPeriod$Md3 === void 0 ? void 0 : _mdmsBillingPeriod$Md3.filter(e => e.connectionType === "Metered");
55713
55657
  const popUp = () => {
55714
- var _response$meterReadin, _response$meterReadin2;
55658
+ var _response$meterReadin;
55715
55659
  setOpenModal(true);
55716
- setMeterDetails(response === null || response === void 0 ? void 0 : response.meterReadings[0]);
55717
- setSelectMeterStatus({
55718
- code: response === null || response === void 0 ? void 0 : (_response$meterReadin = response.meterReadings[0]) === null || _response$meterReadin === void 0 ? void 0 : _response$meterReadin.meterStatus,
55719
- i18nKey: `WS_SERVICES_CALCULATION_METERSTATUS_${Digit.Utils.locale.getTransformedLocale(response === null || response === void 0 ? void 0 : (_response$meterReadin2 = response.meterReadings[0]) === null || _response$meterReadin2 === void 0 ? void 0 : _response$meterReadin2.meterStatus)}`
55720
- });
55721
- setBillingPeriod(`${getDate(meterDetails === null || meterDetails === void 0 ? void 0 : meterDetails.currentReadingDate)} - ${getDate(convertDateToEpoch(Digit.Utils.date.getDate()))}`);
55660
+ const firstReading = response === null || response === void 0 ? void 0 : (_response$meterReadin = response.meterReadings) === null || _response$meterReadin === void 0 ? void 0 : _response$meterReadin[0];
55661
+ setMeterDetails(firstReading);
55662
+ const initialStatus = firstReading !== null && firstReading !== void 0 && firstReading.meterStatus ? {
55663
+ code: firstReading === null || firstReading === void 0 ? void 0 : firstReading.meterStatus,
55664
+ i18nKey: `WS_SERVICES_CALCULATION_METERSTATUS_${Digit.Utils.locale.getTransformedLocale(firstReading === null || firstReading === void 0 ? void 0 : firstReading.meterStatus)}`
55665
+ } : "";
55666
+ setSelectMeterStatus(initialStatus);
55667
+ setBillingPeriod(`${getDate(firstReading === null || firstReading === void 0 ? void 0 : firstReading.currentReadingDate)} - ${getDate(convertDateToEpoch(Digit.Utils.date.getDate()))}`);
55668
+ if (((initialStatus === null || initialStatus === void 0 ? void 0 : initialStatus.code) || "").toLowerCase() === "working") {
55669
+ const okOption = ReadingQualityCodeList === null || ReadingQualityCodeList === void 0 ? void 0 : ReadingQualityCodeList.find(item => ((item === null || item === void 0 ? void 0 : item.code) || "").toLowerCase() === "ok");
55670
+ setSelectReadingQualityCode(okOption || {
55671
+ code: "OK",
55672
+ i18nKey: `WS_SERVICES_CALCULATION_DJBREADINGQUALITYCODE_${Digit.Utils.locale.getTransformedLocale("OK")}`
55673
+ });
55674
+ } else {
55675
+ setSelectReadingQualityCode("");
55676
+ }
55722
55677
  };
55723
55678
  const closeModal = () => {
55724
55679
  setOpenModal(false);
55680
+ setSelectMeterStatus("");
55681
+ setSelectReadingQualityCode("");
55725
55682
  };
55726
55683
  const closeToast = () => {
55727
55684
  setShowToast(false);
@@ -55732,7 +55689,16 @@ const ConsumptionDetails$1 = _ref => {
55732
55689
  let fromDate = parseInt(meterDetails === null || meterDetails === void 0 ? void 0 : meterDetails.currentReadingDate);
55733
55690
  let selectedDate = parseInt(convertDateToEpoch(data === null || data === void 0 ? void 0 : data.currentReadingDate));
55734
55691
  let toDate = parseInt(convertDateToEpoch(Digit.Utils.date.getDate()));
55735
- if ((selectMeterStatus === null || selectMeterStatus === void 0 ? void 0 : selectMeterStatus.code) === "Working") {
55692
+ if (!(selectReadingQualityCode !== null && selectReadingQualityCode !== void 0 && selectReadingQualityCode.code)) {
55693
+ setShowToast({
55694
+ key: "error",
55695
+ message: t("ERR_READING_QUALITY_CODE_REQUIRED")
55696
+ });
55697
+ setError(t("ERR_READING_QUALITY_CODE_REQUIRED"));
55698
+ setTimeout(closeToast, 5000);
55699
+ return Promise.resolve();
55700
+ }
55701
+ if (isWorkingMeter) {
55736
55702
  var _details$;
55737
55703
  if (!(data !== null && data !== void 0 && data.currentReading) || (data === null || data === void 0 ? void 0 : data.currentReading) == null || (data === null || data === void 0 ? void 0 : data.currentReading) === "") {
55738
55704
  setShowToast({
@@ -55816,19 +55782,52 @@ const ConsumptionDetails$1 = _ref => {
55816
55782
  return Promise.reject(e);
55817
55783
  }
55818
55784
  };
55819
- let optionsList = mdmsMeterStatus === null || mdmsMeterStatus === void 0 ? void 0 : (_mdmsMeterStatus$Mdms = mdmsMeterStatus.MdmsRes) === null || _mdmsMeterStatus$Mdms === void 0 ? void 0 : (_mdmsMeterStatus$Mdms2 = _mdmsMeterStatus$Mdms["ws-services-calculation"]) === null || _mdmsMeterStatus$Mdms2 === void 0 ? void 0 : (_mdmsMeterStatus$Mdms3 = _mdmsMeterStatus$Mdms2.MeterStatus) === null || _mdmsMeterStatus$Mdms3 === void 0 ? void 0 : _mdmsMeterStatus$Mdms3.map(status => ({
55820
- code: status,
55821
- i18nKey: `WS_SERVICES_CALCULATION_METERSTATUS_${Digit.Utils.locale.getTransformedLocale(status)}`
55822
- }));
55823
- const ReadingQualityCodeList = DJBReadingQualityCode === null || DJBReadingQualityCode === void 0 ? void 0 : (_DJBReadingQualityCod = DJBReadingQualityCode.MdmsRes) === null || _DJBReadingQualityCod === void 0 ? void 0 : (_DJBReadingQualityCod2 = _DJBReadingQualityCod["ws-services-calculation"]) === null || _DJBReadingQualityCod2 === void 0 ? void 0 : (_DJBReadingQualityCod3 = _DJBReadingQualityCod2.DJBReadingQualityCode) === null || _DJBReadingQualityCod3 === void 0 ? void 0 : _DJBReadingQualityCod3.map(status => {
55824
- const statusCode = typeof status === "object" ? status.code : status;
55825
- return {
55826
- code: statusCode,
55827
- i18nKey: `WS_SERVICES_CALCULATION_DJBREADINGQUALITYCODE_${Digit.Utils.locale.getTransformedLocale(statusCode)}`
55828
- };
55829
- });
55785
+ const isWorkingMeter = ((selectMeterStatus === null || selectMeterStatus === void 0 ? void 0 : selectMeterStatus.code) || "").toLowerCase() === "working";
55786
+ const optionsList = React.useMemo(() => {
55787
+ var _mdmsMeterStatus$Mdms, _mdmsMeterStatus$Mdms2, _mdmsMeterStatus$Mdms3, _mdmsMeterStatus$Mdms4;
55788
+ return (mdmsMeterStatus === null || mdmsMeterStatus === void 0 ? void 0 : (_mdmsMeterStatus$Mdms = mdmsMeterStatus.MdmsRes) === null || _mdmsMeterStatus$Mdms === void 0 ? void 0 : (_mdmsMeterStatus$Mdms2 = _mdmsMeterStatus$Mdms["ws-services-calculation"]) === null || _mdmsMeterStatus$Mdms2 === void 0 ? void 0 : (_mdmsMeterStatus$Mdms3 = _mdmsMeterStatus$Mdms2.MeterStatus) === null || _mdmsMeterStatus$Mdms3 === void 0 ? void 0 : (_mdmsMeterStatus$Mdms4 = _mdmsMeterStatus$Mdms3.filter(status => typeof status === "object" ? (status === null || status === void 0 ? void 0 : status.active) === true || (status === null || status === void 0 ? void 0 : status.active) === "true" : true)) === null || _mdmsMeterStatus$Mdms4 === void 0 ? void 0 : _mdmsMeterStatus$Mdms4.map(status => {
55789
+ const statusCode = typeof status === "object" ? status.name || status.code : status;
55790
+ return {
55791
+ code: statusCode,
55792
+ i18nKey: `WS_SERVICES_CALCULATION_METERSTATUS_${Digit.Utils.locale.getTransformedLocale(statusCode)}`
55793
+ };
55794
+ })) || [];
55795
+ }, [mdmsMeterStatus]);
55796
+ const ReadingQualityCodeList = React.useMemo(() => {
55797
+ var _DJBReadingQualityCod, _DJBReadingQualityCod2, _DJBReadingQualityCod3, _DJBReadingQualityCod4;
55798
+ return (DJBReadingQualityCode === null || DJBReadingQualityCode === void 0 ? void 0 : (_DJBReadingQualityCod = DJBReadingQualityCode.MdmsRes) === null || _DJBReadingQualityCod === void 0 ? void 0 : (_DJBReadingQualityCod2 = _DJBReadingQualityCod["ws-services-calculation"]) === null || _DJBReadingQualityCod2 === void 0 ? void 0 : (_DJBReadingQualityCod3 = _DJBReadingQualityCod2.DJBReadingQualityCode) === null || _DJBReadingQualityCod3 === void 0 ? void 0 : (_DJBReadingQualityCod4 = _DJBReadingQualityCod3.filter(status => typeof status === "object" ? (status === null || status === void 0 ? void 0 : status.active) === true || (status === null || status === void 0 ? void 0 : status.active) === "true" : true)) === null || _DJBReadingQualityCod4 === void 0 ? void 0 : _DJBReadingQualityCod4.map(status => {
55799
+ const statusCode = typeof status === "object" ? status.code || status.name : status;
55800
+ return {
55801
+ code: statusCode,
55802
+ i18nKey: `WS_SERVICES_CALCULATION_DJBREADINGQUALITYCODE_${Digit.Utils.locale.getTransformedLocale(statusCode)}`
55803
+ };
55804
+ })) || [];
55805
+ }, [DJBReadingQualityCode]);
55806
+ const filteredReadingQualityCodeList = React.useMemo(() => {
55807
+ if (!ReadingQualityCodeList || ReadingQualityCodeList.length === 0) return [];
55808
+ if (isWorkingMeter) {
55809
+ return ReadingQualityCodeList.filter(item => ((item === null || item === void 0 ? void 0 : item.code) || "").toLowerCase() === "ok");
55810
+ }
55811
+ if (selectMeterStatus !== null && selectMeterStatus !== void 0 && selectMeterStatus.code) {
55812
+ return ReadingQualityCodeList.filter(item => ((item === null || item === void 0 ? void 0 : item.code) || "").toLowerCase() !== "ok");
55813
+ }
55814
+ return ReadingQualityCodeList;
55815
+ }, [ReadingQualityCodeList, isWorkingMeter, selectMeterStatus === null || selectMeterStatus === void 0 ? void 0 : selectMeterStatus.code]);
55816
+ React.useEffect(() => {
55817
+ if (!openModal) return;
55818
+ if (isWorkingMeter) {
55819
+ const okOption = ReadingQualityCodeList === null || ReadingQualityCodeList === void 0 ? void 0 : ReadingQualityCodeList.find(item => ((item === null || item === void 0 ? void 0 : item.code) || "").toLowerCase() === "ok");
55820
+ if (okOption && ((selectReadingQualityCode === null || selectReadingQualityCode === void 0 ? void 0 : selectReadingQualityCode.code) || "").toLowerCase() !== "ok") {
55821
+ setSelectReadingQualityCode(okOption);
55822
+ }
55823
+ } else if (selectMeterStatus !== null && selectMeterStatus !== void 0 && selectMeterStatus.code) {
55824
+ if (((selectReadingQualityCode === null || selectReadingQualityCode === void 0 ? void 0 : selectReadingQualityCode.code) || "").toLowerCase() === "ok") {
55825
+ setSelectReadingQualityCode("");
55826
+ }
55827
+ }
55828
+ }, [openModal, isWorkingMeter, selectMeterStatus === null || selectMeterStatus === void 0 ? void 0 : selectMeterStatus.code, ReadingQualityCodeList]);
55830
55829
  const onFormValueChange = (setValue, formData, formState) => {
55831
- if ((selectMeterStatus === null || selectMeterStatus === void 0 ? void 0 : selectMeterStatus.code) === "Working") {
55830
+ if (isWorkingMeter) {
55832
55831
  var _details$2;
55833
55832
  setCurrentReading(formData === null || formData === void 0 ? void 0 : formData.currentReading);
55834
55833
  setBillingPeriod(`${getDate(meterDetails === null || meterDetails === void 0 ? void 0 : meterDetails.currentReadingDate)} - ${getDate(formData === null || formData === void 0 ? void 0 : formData.currentReadingDate)}`);
@@ -55876,6 +55875,15 @@ const ConsumptionDetails$1 = _ref => {
55876
55875
  select: e => {
55877
55876
  setSelectMeterStatus(e);
55878
55877
  setConsumption("");
55878
+ if (((e === null || e === void 0 ? void 0 : e.code) || "").toLowerCase() === "working") {
55879
+ const okOption = ReadingQualityCodeList === null || ReadingQualityCodeList === void 0 ? void 0 : ReadingQualityCodeList.find(item => ((item === null || item === void 0 ? void 0 : item.code) || "").toLowerCase() === "ok");
55880
+ setSelectReadingQualityCode(okOption || {
55881
+ code: "OK",
55882
+ i18nKey: `WS_SERVICES_CALCULATION_DJBREADINGQUALITYCODE_${Digit.Utils.locale.getTransformedLocale("OK")}`
55883
+ });
55884
+ } else {
55885
+ setSelectReadingQualityCode("");
55886
+ }
55879
55887
  },
55880
55888
  selected: selectMeterStatus,
55881
55889
  t: t
@@ -55896,24 +55904,24 @@ const ConsumptionDetails$1 = _ref => {
55896
55904
  }))
55897
55905
  }, {
55898
55906
  label: t("WS_CONSUMPTION_DETAILS_CURRENT_READING_LABEL"),
55899
- isMandatory: selectMeterStatus.code === "Working" ? true : false,
55900
- disable: selectMeterStatus.code === "Working" ? false : true,
55907
+ isMandatory: isWorkingMeter ? true : false,
55908
+ disable: isWorkingMeter ? false : true,
55901
55909
  type: "number",
55902
55910
  populators: {
55903
55911
  name: "currentReading",
55904
- ...(tempObj = selectMeterStatus.code === "Working" ? {} : {
55912
+ ...(tempObj = isWorkingMeter ? {} : {
55905
55913
  value: ""
55906
55914
  })
55907
55915
  }
55908
55916
  }, {
55909
55917
  label: t("WS_CONSUMPTION_DETAILS_CURRENT_READING_DATE_LABEL"),
55910
- isMandatory: selectMeterStatus.code === "Working" ? true : false,
55911
- disable: selectMeterStatus.code === "Working" ? false : true,
55918
+ isMandatory: isWorkingMeter ? true : false,
55919
+ disable: isWorkingMeter ? false : true,
55912
55920
  type: "custom",
55913
55921
  populators: {
55914
55922
  name: "currentReadingDate",
55915
55923
  validation: {
55916
- required: selectMeterStatus.code === "Working" ? true : false
55924
+ required: isWorkingMeter ? true : false
55917
55925
  },
55918
55926
  customProps: {},
55919
55927
  defaultValue: Digit.Utils.date.getDate(),
@@ -55921,7 +55929,7 @@ const ConsumptionDetails$1 = _ref => {
55921
55929
  onChange: props.onChange,
55922
55930
  date: props.value
55923
55931
  }, customProps, {
55924
- disabled: selectMeterStatus.code === "Working" ? false : true
55932
+ disabled: isWorkingMeter ? false : true
55925
55933
  }))
55926
55934
  }
55927
55935
  }, {
@@ -55929,7 +55937,7 @@ const ConsumptionDetails$1 = _ref => {
55929
55937
  isMandatory: true,
55930
55938
  type: "dropdown",
55931
55939
  populators: /*#__PURE__*/React__default.createElement(digitUiReactComponents.Dropdown, {
55932
- option: ReadingQualityCodeList,
55940
+ option: filteredReadingQualityCodeList,
55933
55941
  autoComplete: "off",
55934
55942
  optionKey: "i18nKey",
55935
55943
  id: "readingQualityCode",
@@ -55943,9 +55951,9 @@ const ConsumptionDetails$1 = _ref => {
55943
55951
  label: t("WS_SERV_DETAIL_CONSUMP"),
55944
55952
  isMandatory: false,
55945
55953
  type: "number",
55946
- disable: selectMeterStatus.code === "Working" ? true : false,
55954
+ disable: isWorkingMeter ? true : false,
55947
55955
  populators: {
55948
- ...(tempObj1 = selectMeterStatus.code === "Working" ? {
55956
+ ...(tempObj1 = isWorkingMeter ? {
55949
55957
  name: "consumption",
55950
55958
  value: selectedConsumtion
55951
55959
  } : {
@@ -55977,10 +55985,122 @@ const ConsumptionDetails$1 = _ref => {
55977
55985
  }, /*#__PURE__*/React__default.createElement(Close, null));
55978
55986
  };
55979
55987
  const consumption = (currentReading, lastReading) => {
55980
- if (currentReading && lastReading) {
55988
+ if (currentReading !== null && currentReading !== undefined && lastReading !== null && lastReading !== undefined && currentReading !== "" && lastReading !== "") {
55981
55989
  return Number(currentReading - lastReading);
55982
55990
  } else return t("NA");
55983
55991
  };
55992
+ const columns = React.useMemo(() => [{
55993
+ Header: t("WS_MYCONNECTIONS_CONSUMER_NO"),
55994
+ accessor: "connectionNo",
55995
+ disableSortBy: true,
55996
+ Cell: _ref2 => {
55997
+ var _row$original;
55998
+ let {
55999
+ row
56000
+ } = _ref2;
56001
+ return /*#__PURE__*/React__default.createElement("span", null, ((_row$original = row.original) === null || _row$original === void 0 ? void 0 : _row$original.connectionNo) || t("NA"));
56002
+ }
56003
+ }, {
56004
+ Header: t("WS_VIEW_BILL_BILLING_PERIOD_LABEL"),
56005
+ accessor: "billingPeriod",
56006
+ disableSortBy: true,
56007
+ Cell: _ref3 => {
56008
+ var _row$original2;
56009
+ let {
56010
+ row
56011
+ } = _ref3;
56012
+ return /*#__PURE__*/React__default.createElement("span", null, ((_row$original2 = row.original) === null || _row$original2 === void 0 ? void 0 : _row$original2.billingPeriod) || t("NA"));
56013
+ }
56014
+ }, {
56015
+ Header: t("WS_READING_QUALITY_CODE"),
56016
+ accessor: "readingQualityCode",
56017
+ disableSortBy: true,
56018
+ Cell: _ref4 => {
56019
+ var _row$original3;
56020
+ let {
56021
+ row
56022
+ } = _ref4;
56023
+ return /*#__PURE__*/React__default.createElement("span", null, ((_row$original3 = row.original) === null || _row$original3 === void 0 ? void 0 : _row$original3.readingQualityCode) || t("NA"));
56024
+ }
56025
+ }, {
56026
+ Header: t("WS_CONSUMPTION_DETAILS_LAST_READING_LABEL"),
56027
+ accessor: "lastReading",
56028
+ disableSortBy: true,
56029
+ Cell: _ref5 => {
56030
+ var _row$original4, _row$original5, _row$original6;
56031
+ let {
56032
+ row
56033
+ } = _ref5;
56034
+ return /*#__PURE__*/React__default.createElement("span", null, ((_row$original4 = row.original) === null || _row$original4 === void 0 ? void 0 : _row$original4.lastReading) !== undefined && ((_row$original5 = row.original) === null || _row$original5 === void 0 ? void 0 : _row$original5.lastReading) !== null ? (_row$original6 = row.original) === null || _row$original6 === void 0 ? void 0 : _row$original6.lastReading : t("NA"));
56035
+ }
56036
+ }, {
56037
+ Header: t("WS_CONSUMPTION_DETAILS_LAST_READING_DATE_LABEL"),
56038
+ accessor: "lastReadingDate",
56039
+ disableSortBy: true,
56040
+ Cell: _ref6 => {
56041
+ var _row$original7, _row$original8;
56042
+ let {
56043
+ row
56044
+ } = _ref6;
56045
+ return /*#__PURE__*/React__default.createElement("span", null, (_row$original7 = row.original) !== null && _row$original7 !== void 0 && _row$original7.lastReadingDate ? Digit.DateUtils.ConvertEpochToDate((_row$original8 = row.original) === null || _row$original8 === void 0 ? void 0 : _row$original8.lastReadingDate) : t("NA"));
56046
+ }
56047
+ }, {
56048
+ Header: t("WS_SERV_DETAIL_CUR_METER_READ"),
56049
+ accessor: "currentReading",
56050
+ disableSortBy: true,
56051
+ Cell: _ref7 => {
56052
+ var _row$original9, _row$original0, _row$original1;
56053
+ let {
56054
+ row
56055
+ } = _ref7;
56056
+ return /*#__PURE__*/React__default.createElement("span", null, ((_row$original9 = row.original) === null || _row$original9 === void 0 ? void 0 : _row$original9.currentReading) !== undefined && ((_row$original0 = row.original) === null || _row$original0 === void 0 ? void 0 : _row$original0.currentReading) !== null ? (_row$original1 = row.original) === null || _row$original1 === void 0 ? void 0 : _row$original1.currentReading : t("NA"));
56057
+ }
56058
+ }, {
56059
+ Header: t("WS_CONSUMPTION_DETAILS_CURRENT_READING_DATE_LABEL"),
56060
+ accessor: "currentReadingDate",
56061
+ disableSortBy: true,
56062
+ Cell: _ref8 => {
56063
+ var _row$original10, _row$original11;
56064
+ let {
56065
+ row
56066
+ } = _ref8;
56067
+ return /*#__PURE__*/React__default.createElement("span", null, (_row$original10 = row.original) !== null && _row$original10 !== void 0 && _row$original10.currentReadingDate ? Digit.DateUtils.ConvertEpochToDate((_row$original11 = row.original) === null || _row$original11 === void 0 ? void 0 : _row$original11.currentReadingDate) : t("NA"));
56068
+ }
56069
+ }, {
56070
+ Header: t("WS_CONSUMPTION_DETAILS_CONSUMPTION_LABEL"),
56071
+ id: "consumption",
56072
+ disableSortBy: true,
56073
+ Cell: _ref9 => {
56074
+ var _row$original12, _row$original13;
56075
+ let {
56076
+ row
56077
+ } = _ref9;
56078
+ return /*#__PURE__*/React__default.createElement("span", null, consumption((_row$original12 = row.original) === null || _row$original12 === void 0 ? void 0 : _row$original12.currentReading, (_row$original13 = row.original) === null || _row$original13 === void 0 ? void 0 : _row$original13.lastReading));
56079
+ }
56080
+ }, {
56081
+ Header: t("WS_COMMON_TABLE_COL_ACTION_LABEL"),
56082
+ id: "action",
56083
+ disableSortBy: true,
56084
+ Cell: _ref0 => {
56085
+ let {
56086
+ row
56087
+ } = _ref0;
56088
+ return /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
56089
+ style: {
56090
+ backgroundColor: "#0A4275",
56091
+ color: "#FFFFFF",
56092
+ minWidth: "auto",
56093
+ padding: "6px 14px",
56094
+ fontSize: "12px",
56095
+ height: "auto",
56096
+ margin: "0px",
56097
+ whiteSpace: "nowrap"
56098
+ },
56099
+ label: t("VIEW_METER_READING_DETAILS"),
56100
+ onSubmit: () => handleViewMeterReadingDetails(row.original)
56101
+ });
56102
+ }
56103
+ }], [t]);
55984
56104
  if (isLoading || isConnectionDetailsLoading) {
55985
56105
  return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
55986
56106
  }
@@ -55988,89 +56108,40 @@ const ConsumptionDetails$1 = _ref => {
55988
56108
  meterReadings
55989
56109
  } = response || {};
55990
56110
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
55991
- className: "employee-form-section-wrapper"
55992
- }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.VerticalTimeline, {
55993
- config: [{
55994
- timeLine: [{
55995
- actions: "WS_VIEW_CONSUMPTION",
55996
- currentStep: 1
55997
- }]
55998
- }],
55999
- showFinalStep: false
56000
- }), /*#__PURE__*/React__default.createElement("div", {
56001
56111
  style: {
56002
56112
  flex: 1,
56003
56113
  display: "flex",
56004
56114
  flexDirection: "column",
56005
- gap: "16px"
56006
- }
56007
- }, (meterReadings === null || meterReadings === void 0 ? void 0 : meterReadings.length) > 0 && meterReadings.map((application, index) => /*#__PURE__*/React__default.createElement("div", {
56008
- key: index
56009
- }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, null, /*#__PURE__*/React__default.createElement("div", {
56010
- style: {
56011
- display: "flex",
56012
- justifyContent: "flex-end",
56013
- marginBottom: "16px",
56014
- marginTop: "8px",
56015
- marginRight: "8px"
56115
+ gap: "16px",
56116
+ minWidth: 0,
56117
+ overflowX: "auto"
56016
56118
  }
56017
- }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
56018
- label: t("VIEW_METER_READING_DETAILS"),
56019
- onSubmit: () => handleViewMeterReadingDetails(application)
56020
- })), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
56021
- key: t("WS_MYCONNECTIONS_CONSUMER_NO"),
56022
- label: `${t("WS_MYCONNECTIONS_CONSUMER_NO")}`,
56023
- text: (application === null || application === void 0 ? void 0 : application.connectionNo) || t("NA"),
56024
- className: "border-none"
56025
- }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
56026
- key: t("WS_VIEW_BILL_BILLING_PERIOD_LABEL"),
56027
- label: `${t("WS_VIEW_BILL_BILLING_PERIOD_LABEL")}`,
56028
- text: (application === null || application === void 0 ? void 0 : application.billingPeriod) || t("NA"),
56029
- className: "border-none"
56030
- }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
56031
- key: t("WS_CONSUMPTION_DETAILS_METER_STATUS_LABEL"),
56032
- label: `${t("WS_CONSUMPTION_DETAILS_METER_STATUS_LABEL")}`,
56033
- text: (application === null || application === void 0 ? void 0 : application.meterStatus) || t("NA"),
56034
- className: "border-none"
56035
- }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
56036
- key: t("WS_READING_QUALITY_CODE"),
56037
- label: `${t("WS_READING_QUALITY_CODE")}`,
56038
- text: (application === null || application === void 0 ? void 0 : application.readingQualityCode) || t("NA"),
56039
- className: "border-none"
56040
- }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
56041
- key: t("WS_CONSUMPTION_DETAILS_LAST_READING_LABEL"),
56042
- label: `${t("WS_CONSUMPTION_DETAILS_LAST_READING_LABEL")}`,
56043
- text: (application === null || application === void 0 ? void 0 : application.lastReading) || t("NA"),
56044
- className: "border-none"
56045
- }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
56046
- key: t("WS_CONSUMPTION_DETAILS_LAST_READING_DATE_LABEL"),
56047
- label: `${t("WS_CONSUMPTION_DETAILS_LAST_READING_DATE_LABEL")}`,
56048
- text: application !== null && application !== void 0 && application.lastReadingDate ? Digit.DateUtils.ConvertEpochToDate(application === null || application === void 0 ? void 0 : application.lastReadingDate) : t("NA"),
56049
- className: "border-none"
56050
- }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
56051
- key: t("WS_SERV_DETAIL_CUR_METER_READ"),
56052
- label: `${t("WS_SERV_DETAIL_CUR_METER_READ")}`,
56053
- text: (application === null || application === void 0 ? void 0 : application.currentReading) || t("NA"),
56054
- className: "border-none"
56055
- }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
56056
- key: t("WS_CONSUMPTION_DETAILS_CURRENT_READING_DATE_LABEL"),
56057
- label: `${t("WS_CONSUMPTION_DETAILS_CURRENT_READING_DATE_LABEL")}`,
56058
- text: application !== null && application !== void 0 && application.currentReadingDate ? Digit.DateUtils.ConvertEpochToDate(application === null || application === void 0 ? void 0 : application.currentReadingDate) : t("NA"),
56059
- className: "border-none"
56060
- }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
56061
- key: t("WS_CONSUMPTION_DETAILS_CONSUMPTION_LABEL"),
56062
- label: `${t("WS_CONSUMPTION_DETAILS_CONSUMPTION_LABEL")}`,
56063
- text: consumption(application === null || application === void 0 ? void 0 : application.currentReading, application === null || application === void 0 ? void 0 : application.lastReading),
56064
- className: "border-none"
56065
- }))))), !(meterReadings !== null && meterReadings !== void 0 && meterReadings.length) > 0 && /*#__PURE__*/React__default.createElement("p", {
56119
+ }, (meterReadings === null || meterReadings === void 0 ? void 0 : meterReadings.length) > 0 ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Table, {
56120
+ t: t,
56121
+ data: meterReadings,
56122
+ columns: columns,
56123
+ totalRecords: meterReadings === null || meterReadings === void 0 ? void 0 : meterReadings.length,
56124
+ manualPagination: false,
56125
+ isPaginationRequired: true,
56126
+ pageSizeLimit: 10,
56127
+ disableSort: true,
56128
+ autoSort: false,
56129
+ getCellProps: () => ({
56130
+ style: {
56131
+ whiteSpace: "nowrap",
56132
+ padding: "16px 14px",
56133
+ fontSize: "14px"
56134
+ }
56135
+ })
56136
+ }) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, null, /*#__PURE__*/React__default.createElement("p", {
56066
56137
  style: {
56067
56138
  marginLeft: "16px",
56068
56139
  marginTop: "16px"
56069
56140
  }
56070
- }, t("WS_NO_CONSUMPTION_FOUND"))), isLoading || meterStatusLoading || billingPeriodLoading || !isUserAllowedToAddMeterReading ? null : /*#__PURE__*/React__default.createElement("div", null, isAddMeterReadingButtonEnable && /*#__PURE__*/React__default.createElement(digitUiReactComponents.ActionBar, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
56141
+ }, t("WS_NO_CONSUMPTION_FOUND")))), isLoading || meterStatusLoading || billingPeriodLoading || !isUserAllowedToAddMeterReading ? null : /*#__PURE__*/React__default.createElement("div", null, isAddMeterReadingButtonEnable && /*#__PURE__*/React__default.createElement(digitUiReactComponents.ActionBar, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
56071
56142
  label: t("WS_CONSUMPTION_BUTTON_METER_READING_LABEL"),
56072
56143
  onSubmit: popUp
56073
- })))), openModal && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Modal, {
56144
+ }))), openModal && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Modal, {
56074
56145
  headerBarMain: /*#__PURE__*/React__default.createElement(Heading, {
56075
56146
  label: t(config.label.heading)
56076
56147
  }),
@@ -62350,9 +62421,6 @@ const OLDApplication = () => {
62350
62421
  const [canSubmit, setSubmitValve] = React.useState(false);
62351
62422
  const [isEnableLoader, setIsEnableLoader] = React.useState(false);
62352
62423
  const [showToast, setShowToast] = React.useState(null);
62353
- const [config, setConfig] = React.useState({
62354
- body: []
62355
- });
62356
62424
  const [showCheckPage, setShowCheckPage] = React.useState(false);
62357
62425
  const isCitizen = ((_Digit$UserService$ge = Digit.UserService.getType()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.toUpperCase()) === "CITIZEN";
62358
62426
  const timelineConfig = [{
@@ -62386,15 +62454,21 @@ const OLDApplication = () => {
62386
62454
  tenantId = (_Digit$SessionStorage = Digit.SessionStorage.get("CITIZEN.COMMON.HOME.CITY")) === null || _Digit$SessionStorage === void 0 ? void 0 : _Digit$SessionStorage.code;
62387
62455
  }
62388
62456
  const stateId = Digit.ULBService.getStateId();
62457
+ const mdmsOptions = React.useMemo(() => ({}), []);
62389
62458
  let {
62390
- data: newConfig,
62459
+ data: newConfig$1,
62391
62460
  isLoading
62392
- } = Digit.Hooks.ws.useWSConfigMDMS.WSCreateConfig(stateId, {});
62461
+ } = Digit.Hooks.ws.useWSConfigMDMS.WSCreateConfig(stateId, mdmsOptions);
62393
62462
  const requestedPropertyId = new URLSearchParams(location.search).get("propertyId");
62394
62463
  const [propertyId, setPropertyId] = React.useState(requestedPropertyId);
62395
62464
  const initialPropertyId = React.useRef(requestedPropertyId);
62396
62465
  const verifiedPropertyId = React.useRef(sessionStorage.getItem("WS_OTP_VERIFIED_PROPERTY_ID"));
62397
62466
  const [sessionFormData, setSessionFormData, clearSessionFormData] = Digit.Hooks.useSessionStorage("PT_CREATE_EMP_WS_NEW_FORM", {});
62467
+ const formDataRef = React.useRef(sessionFormData || {});
62468
+ const sessionSaveTimeoutRef = React.useRef(null);
62469
+ const defaultValues = React.useMemo(() => {
62470
+ return sessionFormData && Object.keys(sessionFormData).length > 0 ? sessionFormData : Digit.SessionStorage.get("PT_CREATE_EMP_WS_NEW_FORM") || {};
62471
+ }, []);
62398
62472
  const {
62399
62473
  data: propertyDetails
62400
62474
  } = Digit.Hooks.pt.usePropertySearch({
@@ -62419,102 +62493,106 @@ const OLDApplication = () => {
62419
62493
  React.useEffect(() => {
62420
62494
  sessionStorage.removeItem("FORMSTATE_ERRORS");
62421
62495
  }, []);
62422
- React.useEffect(() => {
62423
- if (!isLoading && newConfig) {
62424
- const config = newConfig.find(conf => conf.hideInCitizen && conf.isCreate);
62425
- if (config) {
62426
- var _config$body;
62427
- const allCreateSections = (config === null || config === void 0 ? void 0 : (_config$body = config.body) === null || _config$body === void 0 ? void 0 : _config$body.filter(section => section === null || section === void 0 ? void 0 : section.isCreateConnection)) || [];
62428
- const desiredComponentOrder = ["CPTPropertySearchNSummary", "WSConnectionDetails", "WSConnectionHolderDetails", "WSDivyangjan", "WSDjbEmployee", "WSPropertyLocationDetails", "PropertyWaterConnection", "WSActivationPlumberDetails", "WSRoadCuttingDetails", "WSDocumentsEmployee"];
62429
- const reorderedBody = [];
62430
- desiredComponentOrder.forEach(compName => {
62431
- const section = allCreateSections.find(s => {
62432
- var _s$body, _s$body$;
62433
- const bodyComp = (_s$body = s.body) === null || _s$body === void 0 ? void 0 : (_s$body$ = _s$body[0]) === null || _s$body$ === void 0 ? void 0 : _s$body$.component;
62434
- return bodyComp === compName || compName === "WSConnectionDetails" && bodyComp === "WSConnectionDetails";
62435
- });
62436
- if (section) {
62437
- reorderedBody.push(section);
62438
- } else if (compName === "WSPropertyLocationDetails") {
62439
- reorderedBody.push({
62440
- isCreateConnection: true,
62441
- body: [{
62442
- type: "component",
62443
- key: "propertyAddress",
62444
- component: "WSPropertyLocationDetails",
62445
- withoutLabel: true,
62446
- isAutomaticFill: true,
62447
- texts: {
62448
- header: `${t("PT_LOCATION_DETAILS_AUTOMATIC_FILL_BY_PROPERTY")}`
62449
- },
62450
- defaultOpen: false
62451
- }]
62452
- });
62453
- } else if (compName === "PropertyWaterConnection") {
62454
- reorderedBody.push({
62455
- isCreateConnection: true,
62456
- body: [{
62457
- type: "component",
62458
- key: "useDetails",
62459
- component: "PropertyWaterConnection",
62460
- withoutLabel: true,
62461
- isAutomaticFill: true
62462
- }]
62463
- });
62464
- } else if (compName === "WSDeclaration") {
62465
- reorderedBody.push({
62466
- isCreateConnection: true,
62467
- body: [{
62468
- type: "component",
62469
- key: "declarationData",
62470
- component: "WSDeclaration",
62471
- withoutLabel: true
62472
- }]
62473
- });
62474
- } else if (compName === "WSDjbEmployee") {
62475
- reorderedBody.push({
62476
- isCreateConnection: true,
62477
- body: [{
62478
- type: "component",
62479
- key: "djbEmployee",
62480
- component: "WSDjbEmployee",
62481
- withoutLabel: true
62482
- }]
62483
- });
62484
- } else if (compName === "WSDivyangjan") {
62485
- reorderedBody.push({
62486
- isCreateConnection: true,
62487
- body: [{
62488
- type: "component",
62489
- key: "disability",
62490
- component: "WSDivyangjan",
62491
- withoutLabel: true,
62492
- texts: {
62493
- header: "Divyangjan/Person with Disability?"
62494
- }
62495
- }]
62496
- });
62497
- }
62496
+ const config = React.useMemo(() => {
62497
+ var _configCopy$body;
62498
+ const rawConfigs = newConfig$1 && Array.isArray(newConfig$1) && newConfig$1.length > 0 ? newConfig$1 : newConfig;
62499
+ const foundConfig = rawConfigs === null || rawConfigs === void 0 ? void 0 : rawConfigs.find(conf => conf.hideInCitizen && conf.isCreate);
62500
+ if (!foundConfig) return {
62501
+ body: []
62502
+ };
62503
+ const configCopy = cloneDeep_1(foundConfig);
62504
+ const allCreateSections = (configCopy === null || configCopy === void 0 ? void 0 : (_configCopy$body = configCopy.body) === null || _configCopy$body === void 0 ? void 0 : _configCopy$body.filter(section => section === null || section === void 0 ? void 0 : section.isCreateConnection)) || [];
62505
+ const desiredComponentOrder = ["CPTPropertySearchNSummary", "WSConnectionDetails", "WSConnectionHolderDetails", "WSDivyangjan", "WSDjbEmployee", "WSPropertyLocationDetails", "PropertyWaterConnection", "WSActivationPlumberDetails", "WSRoadCuttingDetails", "WSDocumentsEmployee"];
62506
+ const reorderedBody = [];
62507
+ desiredComponentOrder.forEach(compName => {
62508
+ const section = allCreateSections.find(s => {
62509
+ var _s$body, _s$body$;
62510
+ const bodyComp = (_s$body = s.body) === null || _s$body === void 0 ? void 0 : (_s$body$ = _s$body[0]) === null || _s$body$ === void 0 ? void 0 : _s$body$.component;
62511
+ return bodyComp === compName || compName === "WSConnectionDetails" && bodyComp === "WSConnectionDetails";
62512
+ });
62513
+ if (section) {
62514
+ reorderedBody.push(section);
62515
+ } else if (compName === "WSPropertyLocationDetails") {
62516
+ reorderedBody.push({
62517
+ isCreateConnection: true,
62518
+ body: [{
62519
+ type: "component",
62520
+ key: "propertyAddress",
62521
+ component: "WSPropertyLocationDetails",
62522
+ withoutLabel: true,
62523
+ isAutomaticFill: true,
62524
+ texts: {
62525
+ header: `${t("PT_LOCATION_DETAILS_AUTOMATIC_FILL_BY_PROPERTY")}`
62526
+ },
62527
+ defaultOpen: false
62528
+ }]
62498
62529
  });
62499
- allCreateSections.forEach(section => {
62500
- var _section$body, _section$body$;
62501
- const bodyComp = (_section$body = section.body) === null || _section$body === void 0 ? void 0 : (_section$body$ = _section$body[0]) === null || _section$body$ === void 0 ? void 0 : _section$body$.component;
62502
- if (bodyComp !== "CPTPropertySearchNSummary" && !reorderedBody.find(r => {
62503
- var _r$body, _r$body$;
62504
- return ((_r$body = r.body) === null || _r$body === void 0 ? void 0 : (_r$body$ = _r$body[0]) === null || _r$body$ === void 0 ? void 0 : _r$body$.component) === bodyComp;
62505
- })) {
62506
- reorderedBody.push(section);
62507
- }
62530
+ } else if (compName === "PropertyWaterConnection") {
62531
+ reorderedBody.push({
62532
+ isCreateConnection: true,
62533
+ body: [{
62534
+ type: "component",
62535
+ key: "useDetails",
62536
+ component: "PropertyWaterConnection",
62537
+ withoutLabel: true,
62538
+ isAutomaticFill: true
62539
+ }]
62540
+ });
62541
+ } else if (compName === "WSDeclaration") {
62542
+ reorderedBody.push({
62543
+ isCreateConnection: true,
62544
+ body: [{
62545
+ type: "component",
62546
+ key: "declarationData",
62547
+ component: "WSDeclaration",
62548
+ withoutLabel: true
62549
+ }]
62550
+ });
62551
+ } else if (compName === "WSDjbEmployee") {
62552
+ reorderedBody.push({
62553
+ isCreateConnection: true,
62554
+ body: [{
62555
+ type: "component",
62556
+ key: "djbEmployee",
62557
+ component: "WSDjbEmployee",
62558
+ withoutLabel: true
62559
+ }]
62560
+ });
62561
+ } else if (compName === "WSDivyangjan") {
62562
+ reorderedBody.push({
62563
+ isCreateConnection: true,
62564
+ body: [{
62565
+ type: "component",
62566
+ key: "disability",
62567
+ component: "WSDivyangjan",
62568
+ withoutLabel: true,
62569
+ texts: {
62570
+ header: "Divyangjan/Person with Disability?"
62571
+ }
62572
+ }]
62508
62573
  });
62509
- config.body = reorderedBody;
62510
- setConfig(config);
62511
62574
  }
62512
- }
62513
- }, [newConfig, isLoading]);
62575
+ });
62576
+ allCreateSections.forEach(section => {
62577
+ var _section$body, _section$body$;
62578
+ const bodyComp = (_section$body = section.body) === null || _section$body === void 0 ? void 0 : (_section$body$ = _section$body[0]) === null || _section$body$ === void 0 ? void 0 : _section$body$.component;
62579
+ if (bodyComp !== "CPTPropertySearchNSummary" && !reorderedBody.find(r => {
62580
+ var _r$body, _r$body$;
62581
+ return ((_r$body = r.body) === null || _r$body === void 0 ? void 0 : (_r$body$ = _r$body[0]) === null || _r$body$ === void 0 ? void 0 : _r$body$.component) === bodyComp;
62582
+ })) {
62583
+ reorderedBody.push(section);
62584
+ }
62585
+ });
62586
+ configCopy.body = reorderedBody;
62587
+ return configCopy;
62588
+ }, [newConfig$1, t]);
62514
62589
  React.useEffect(() => {
62515
- var _sessionFormData$cpt, _sessionFormData$cpt$, _sessionFormData$cpt2, _sessionFormData$cpt3;
62516
- !propertyId && (sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$cpt = sessionFormData.cpt) === null || _sessionFormData$cpt === void 0 ? void 0 : (_sessionFormData$cpt$ = _sessionFormData$cpt.details) === null || _sessionFormData$cpt$ === void 0 ? void 0 : _sessionFormData$cpt$.propertyId) && setPropertyId(sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$cpt2 = sessionFormData.cpt) === null || _sessionFormData$cpt2 === void 0 ? void 0 : (_sessionFormData$cpt3 = _sessionFormData$cpt2.details) === null || _sessionFormData$cpt3 === void 0 ? void 0 : _sessionFormData$cpt3.propertyId);
62517
- }, [sessionFormData === null || sessionFormData === void 0 ? void 0 : sessionFormData.cpt]);
62590
+ var _sessionFormData$cpt, _sessionFormData$cpt$, _Digit$SessionStorage2, _Digit$SessionStorage3, _Digit$SessionStorage4;
62591
+ const cptId = (sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$cpt = sessionFormData.cpt) === null || _sessionFormData$cpt === void 0 ? void 0 : (_sessionFormData$cpt$ = _sessionFormData$cpt.details) === null || _sessionFormData$cpt$ === void 0 ? void 0 : _sessionFormData$cpt$.propertyId) || ((_Digit$SessionStorage2 = Digit.SessionStorage.get("PT_CREATE_EMP_WS_NEW_FORM")) === null || _Digit$SessionStorage2 === void 0 ? void 0 : (_Digit$SessionStorage3 = _Digit$SessionStorage2.cpt) === null || _Digit$SessionStorage3 === void 0 ? void 0 : (_Digit$SessionStorage4 = _Digit$SessionStorage3.details) === null || _Digit$SessionStorage4 === void 0 ? void 0 : _Digit$SessionStorage4.propertyId);
62592
+ if (!propertyId && cptId) {
62593
+ setPropertyId(cptId);
62594
+ }
62595
+ }, [sessionFormData === null || sessionFormData === void 0 ? void 0 : sessionFormData.cpt, propertyId]);
62518
62596
  const {
62519
62597
  isLoading: creatingWaterApplicationLoading,
62520
62598
  mutate: waterMutation
@@ -62532,29 +62610,42 @@ const OLDApplication = () => {
62532
62610
  mutate: sewerageUpdateMutation
62533
62611
  } = Digit.Hooks.ws.useWSApplicationActions("SEWERAGE");
62534
62612
  const onFormValueChange = (setValue, formData, formState) => {
62535
- var _djbData$document, _updatedFormData$cpt, _updatedFormData$cpt$, _propertyDetails$Prop, _propertyDetails$Prop2;
62536
- const updatedFormData = {
62537
- ...sessionFormData,
62613
+ var _formData$cpt, _formData$cpt$details, _formDataRef$current, _formDataRef$current2, _djbData$document, _formDataRef$current3, _formDataRef$current4, _formDataRef$current5, _propertyDetails$Prop, _propertyDetails$Prop2;
62614
+ formDataRef.current = {
62615
+ ...formDataRef.current,
62538
62616
  ...formData
62539
62617
  };
62540
- const cleanedFormData = JSON.parse(JSON.stringify(updatedFormData));
62541
- if (!lodash.isEqual(sessionFormData, cleanedFormData)) {
62542
- setSessionFormData(cleanedFormData);
62618
+ if (sessionSaveTimeoutRef.current) {
62619
+ clearTimeout(sessionSaveTimeoutRef.current);
62543
62620
  }
62621
+ sessionSaveTimeoutRef.current = setTimeout(() => {
62622
+ Digit.SessionStorage.set("PT_CREATE_EMP_WS_NEW_FORM", formDataRef.current);
62623
+ }, 300);
62544
62624
  sessionStorage.setItem("FORMSTATE_ERRORS", JSON.stringify((formState === null || formState === void 0 ? void 0 : formState.errors) || {}));
62545
- const djbData = (updatedFormData === null || updatedFormData === void 0 ? void 0 : updatedFormData.djbEmployee) || (updatedFormData === null || updatedFormData === void 0 ? void 0 : updatedFormData.additionalDetails);
62625
+ const cptPropId = formData === null || formData === void 0 ? void 0 : (_formData$cpt = formData.cpt) === null || _formData$cpt === void 0 ? void 0 : (_formData$cpt$details = _formData$cpt.details) === null || _formData$cpt$details === void 0 ? void 0 : _formData$cpt$details.propertyId;
62626
+ if (!propertyId && cptPropId) {
62627
+ setPropertyId(cptPropId);
62628
+ }
62629
+ const djbData = ((_formDataRef$current = formDataRef.current) === null || _formDataRef$current === void 0 ? void 0 : _formDataRef$current.djbEmployee) || ((_formDataRef$current2 = formDataRef.current) === null || _formDataRef$current2 === void 0 ? void 0 : _formDataRef$current2.additionalDetails);
62546
62630
  const isDjbEmp = (djbData === null || djbData === void 0 ? void 0 : djbData.isDjbEmployee) === true || String(djbData === null || djbData === void 0 ? void 0 : djbData.isDjbEmployee) === "true";
62547
62631
  const isDjbEmpInvalid = isDjbEmp && (!(djbData !== null && djbData !== void 0 && djbData.employeeId) || !String(djbData === null || djbData === void 0 ? void 0 : djbData.employeeId).trim() || !(djbData !== null && djbData !== void 0 && djbData.designation) || !String(djbData === null || djbData === void 0 ? void 0 : djbData.designation).trim() || !(djbData !== null && djbData !== void 0 && (_djbData$document = djbData.document) !== null && _djbData$document !== void 0 && _djbData$document.fileStoreId || typeof (djbData === null || djbData === void 0 ? void 0 : djbData.document) === "string" && djbData !== null && djbData !== void 0 && djbData.document.trim() || djbData !== null && djbData !== void 0 && djbData.document));
62548
62632
  const hasErrors = Object.keys((formState === null || formState === void 0 ? void 0 : formState.errors) || {}).length > 0 || isDjbEmpInvalid;
62549
- const hasProperty = (updatedFormData === null || updatedFormData === void 0 ? void 0 : (_updatedFormData$cpt = updatedFormData.cpt) === null || _updatedFormData$cpt === void 0 ? void 0 : (_updatedFormData$cpt$ = _updatedFormData$cpt.details) === null || _updatedFormData$cpt$ === void 0 ? void 0 : _updatedFormData$cpt$.propertyId) || sessionStorage.getItem("WS_OTP_VERIFIED_PROPERTY_ID") || propertyId || (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop = propertyDetails.Properties) === null || _propertyDetails$Prop === void 0 ? void 0 : (_propertyDetails$Prop2 = _propertyDetails$Prop[0]) === null || _propertyDetails$Prop2 === void 0 ? void 0 : _propertyDetails$Prop2.propertyId);
62550
- setSubmitValve(!hasErrors && !!hasProperty);
62633
+ const hasProperty = ((_formDataRef$current3 = formDataRef.current) === null || _formDataRef$current3 === void 0 ? void 0 : (_formDataRef$current4 = _formDataRef$current3.cpt) === null || _formDataRef$current4 === void 0 ? void 0 : (_formDataRef$current5 = _formDataRef$current4.details) === null || _formDataRef$current5 === void 0 ? void 0 : _formDataRef$current5.propertyId) || sessionStorage.getItem("WS_OTP_VERIFIED_PROPERTY_ID") || propertyId || (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop = propertyDetails.Properties) === null || _propertyDetails$Prop === void 0 ? void 0 : (_propertyDetails$Prop2 = _propertyDetails$Prop[0]) === null || _propertyDetails$Prop2 === void 0 ? void 0 : _propertyDetails$Prop2.propertyId);
62634
+ const canSubmitNow = !hasErrors && !!hasProperty;
62635
+ setSubmitValve(prev => prev !== canSubmitNow ? canSubmitNow : prev);
62551
62636
  };
62552
62637
  const onFormSubmit = data => {
62553
- var _data$cpt, _data$cpt$details, _propertyDetails$Prop3, _propertyDetails$Prop4, _data$cpt2, _propertyDetails$Prop5, _djbData$document2;
62554
- const hasProperty = (data === null || data === void 0 ? void 0 : (_data$cpt = data.cpt) === null || _data$cpt === void 0 ? void 0 : (_data$cpt$details = _data$cpt.details) === null || _data$cpt$details === void 0 ? void 0 : _data$cpt$details.propertyId) || sessionStorage.getItem("WS_OTP_VERIFIED_PROPERTY_ID") || propertyId || (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop3 = propertyDetails.Properties) === null || _propertyDetails$Prop3 === void 0 ? void 0 : (_propertyDetails$Prop4 = _propertyDetails$Prop3[0]) === null || _propertyDetails$Prop4 === void 0 ? void 0 : _propertyDetails$Prop4.propertyId);
62638
+ var _combinedData$cpt, _combinedData$cpt$det, _propertyDetails$Prop3, _propertyDetails$Prop4, _combinedData$cpt2, _propertyDetails$Prop5, _djbData$document2;
62639
+ const combinedData = {
62640
+ ...formDataRef.current,
62641
+ ...data
62642
+ };
62643
+ formDataRef.current = combinedData;
62644
+ Digit.SessionStorage.set("PT_CREATE_EMP_WS_NEW_FORM", combinedData);
62645
+ const hasProperty = (combinedData === null || combinedData === void 0 ? void 0 : (_combinedData$cpt = combinedData.cpt) === null || _combinedData$cpt === void 0 ? void 0 : (_combinedData$cpt$det = _combinedData$cpt.details) === null || _combinedData$cpt$det === void 0 ? void 0 : _combinedData$cpt$det.propertyId) || sessionStorage.getItem("WS_OTP_VERIFIED_PROPERTY_ID") || propertyId || (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop3 = propertyDetails.Properties) === null || _propertyDetails$Prop3 === void 0 ? void 0 : (_propertyDetails$Prop4 = _propertyDetails$Prop3[0]) === null || _propertyDetails$Prop4 === void 0 ? void 0 : _propertyDetails$Prop4.propertyId);
62555
62646
  if (!hasProperty) {
62556
62647
  console.warn("[WS] onSubmit EXIT: invalid property", {
62557
- cpt: data === null || data === void 0 ? void 0 : data.cpt,
62648
+ cpt: combinedData === null || combinedData === void 0 ? void 0 : combinedData.cpt,
62558
62649
  propertyDetails
62559
62650
  });
62560
62651
  setShowToast({
@@ -62563,11 +62654,11 @@ const OLDApplication = () => {
62563
62654
  });
62564
62655
  return;
62565
62656
  }
62566
- if (!(data !== null && data !== void 0 && (_data$cpt2 = data.cpt) !== null && _data$cpt2 !== void 0 && _data$cpt2.id) && !(propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop5 = propertyDetails.Properties) !== null && _propertyDetails$Prop5 !== void 0 && _propertyDetails$Prop5[0])) {
62567
- var _data$cpt3;
62568
- if (!(data !== null && data !== void 0 && (_data$cpt3 = data.cpt) !== null && _data$cpt3 !== void 0 && _data$cpt3.details) || !propertyDetails) {
62657
+ if (!(combinedData !== null && combinedData !== void 0 && (_combinedData$cpt2 = combinedData.cpt) !== null && _combinedData$cpt2 !== void 0 && _combinedData$cpt2.id) && !(propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop5 = propertyDetails.Properties) !== null && _propertyDetails$Prop5 !== void 0 && _propertyDetails$Prop5[0])) {
62658
+ var _combinedData$cpt3;
62659
+ if (!(combinedData !== null && combinedData !== void 0 && (_combinedData$cpt3 = combinedData.cpt) !== null && _combinedData$cpt3 !== void 0 && _combinedData$cpt3.details) || !propertyDetails) {
62569
62660
  console.warn("[WS] onSubmit EXIT: invalid property", {
62570
- cpt: data === null || data === void 0 ? void 0 : data.cpt,
62661
+ cpt: combinedData === null || combinedData === void 0 ? void 0 : combinedData.cpt,
62571
62662
  propertyDetails
62572
62663
  });
62573
62664
  setShowToast({
@@ -62577,7 +62668,7 @@ const OLDApplication = () => {
62577
62668
  return;
62578
62669
  }
62579
62670
  }
62580
- const djbData = (data === null || data === void 0 ? void 0 : data.djbEmployee) || (data === null || data === void 0 ? void 0 : data.additionalDetails);
62671
+ const djbData = (combinedData === null || combinedData === void 0 ? void 0 : combinedData.djbEmployee) || (combinedData === null || combinedData === void 0 ? void 0 : combinedData.additionalDetails);
62581
62672
  const isDjbEmp = (djbData === null || djbData === void 0 ? void 0 : djbData.isDjbEmployee) === true || String(djbData === null || djbData === void 0 ? void 0 : djbData.isDjbEmployee) === "true";
62582
62673
  const isDjbEmpInvalid = isDjbEmp && (!(djbData !== null && djbData !== void 0 && djbData.employeeId) || !String(djbData === null || djbData === void 0 ? void 0 : djbData.employeeId).trim() || !(djbData !== null && djbData !== void 0 && djbData.designation) || !String(djbData === null || djbData === void 0 ? void 0 : djbData.designation).trim() || !(djbData !== null && djbData !== void 0 && (_djbData$document2 = djbData.document) !== null && _djbData$document2 !== void 0 && _djbData$document2.fileStoreId || typeof (djbData === null || djbData === void 0 ? void 0 : djbData.document) === "string" && djbData !== null && djbData !== void 0 && djbData.document.trim() || djbData !== null && djbData !== void 0 && djbData.document));
62583
62674
  if (isDjbEmpInvalid) {
@@ -62591,7 +62682,7 @@ const OLDApplication = () => {
62591
62682
  };
62592
62683
  const processSubmission = function (data) {
62593
62684
  try {
62594
- var _data$useDetails, _data$ConnectionDetai, _data$ConnectionDetai2, _data$DocumentsRequir, _data$cpt4, _Digit$UserService$ge2, _data$ConnectionHolde, _data$ConnectionHolde2, _data$ConnectionHolde3, _data$ConnectionHolde4, _data$ConnectionHolde5, _propertyDetails$Prop7, _propertyDetails$Prop8, _propertyDetails$Prop9, _propertyDetails$Prop0, _data$ConnectionHolde6, _data$ConnectionHolde7, _data$cpt5, _data$cpt5$details, _data$cpt5$details$ow, _data$cpt5$details$ow2;
62685
+ var _data$useDetails, _data$ConnectionDetai, _data$ConnectionDetai2, _data$DocumentsRequir, _data$cpt, _Digit$UserService$ge2, _data$ConnectionHolde, _data$ConnectionHolde2, _data$ConnectionHolde3, _data$ConnectionHolde4, _data$ConnectionHolde5, _propertyDetails$Prop7, _propertyDetails$Prop8, _propertyDetails$Prop9, _propertyDetails$Prop0, _data$ConnectionHolde6, _data$ConnectionHolde7, _data$cpt2, _data$cpt2$details, _data$cpt2$details$ow, _data$cpt2$details$ow2;
62595
62686
  const basePath = window.location.href.includes("/employee") ? "/digit-ui/employee/ws" : "/digit-ui/citizen/ws";
62596
62687
  if (data !== null && data !== void 0 && (_data$useDetails = data.useDetails) !== null && _data$useDetails !== void 0 && _data$useDetails.useDetails) {
62597
62688
  data.useDetails = {
@@ -62688,7 +62779,7 @@ const OLDApplication = () => {
62688
62779
  data.declarationData.agree = data.declaration.agree;
62689
62780
  data.declarationData.declarations = data.declaration.declarations;
62690
62781
  }
62691
- if (!(data !== null && data !== void 0 && (_data$cpt4 = data.cpt) !== null && _data$cpt4 !== void 0 && _data$cpt4.details)) {
62782
+ if (!(data !== null && data !== void 0 && (_data$cpt = data.cpt) !== null && _data$cpt !== void 0 && _data$cpt.details)) {
62692
62783
  var _propertyDetails$Prop6;
62693
62784
  data.cpt = {
62694
62785
  details: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop6 = propertyDetails.Properties) === null || _propertyDetails$Prop6 === void 0 ? void 0 : _propertyDetails$Prop6[0]
@@ -62713,7 +62804,7 @@ const OLDApplication = () => {
62713
62804
  departmentType: connDetail === null || connDetail === void 0 ? void 0 : connDetail.departmentType,
62714
62805
  temporaryConnection: connDetail === null || connDetail === void 0 ? void 0 : connDetail.temporaryType,
62715
62806
  waterDemandType: connDetail === null || connDetail === void 0 ? void 0 : connDetail.waterDemandType,
62716
- ownerContactNumber: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde6 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde6 === void 0 ? void 0 : (_data$ConnectionHolde7 = _data$ConnectionHolde6[0]) === null || _data$ConnectionHolde7 === void 0 ? void 0 : _data$ConnectionHolde7.mobileNumber) || (data === null || data === void 0 ? void 0 : (_data$cpt5 = data.cpt) === null || _data$cpt5 === void 0 ? void 0 : (_data$cpt5$details = _data$cpt5.details) === null || _data$cpt5$details === void 0 ? void 0 : (_data$cpt5$details$ow = _data$cpt5$details.owners) === null || _data$cpt5$details$ow === void 0 ? void 0 : (_data$cpt5$details$ow2 = _data$cpt5$details$ow[0]) === null || _data$cpt5$details$ow2 === void 0 ? void 0 : _data$cpt5$details$ow2.mobileNumber)
62807
+ ownerContactNumber: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde6 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde6 === void 0 ? void 0 : (_data$ConnectionHolde7 = _data$ConnectionHolde6[0]) === null || _data$ConnectionHolde7 === void 0 ? void 0 : _data$ConnectionHolde7.mobileNumber) || (data === null || data === void 0 ? void 0 : (_data$cpt2 = data.cpt) === null || _data$cpt2 === void 0 ? void 0 : (_data$cpt2$details = _data$cpt2.details) === null || _data$cpt2$details === void 0 ? void 0 : (_data$cpt2$details$ow = _data$cpt2$details.owners) === null || _data$cpt2$details$ow === void 0 ? void 0 : (_data$cpt2$details$ow2 = _data$cpt2$details$ow[0]) === null || _data$cpt2$details$ow2 === void 0 ? void 0 : _data$cpt2$details$ow2.mobileNumber)
62717
62808
  };
62718
62809
  return Promise.resolve(createPayloadOfWS(data)).then(function (payload) {
62719
62810
  if (!(payload !== null && payload !== void 0 && payload.water) && !(payload !== null && payload !== void 0 && payload.sewerage)) {
@@ -62960,8 +63051,8 @@ const OLDApplication = () => {
62960
63051
  currentActiveIndex: 9,
62961
63052
  showFinalStep: false
62962
63053
  }), /*#__PURE__*/React__default.createElement(CheckPage$4, {
62963
- data: sessionFormData,
62964
- onSubmit: finalData => processSubmission(finalData || sessionFormData),
63054
+ data: formDataRef.current || sessionFormData,
63055
+ onSubmit: finalData => processSubmission(finalData || formDataRef.current || sessionFormData),
62965
63056
  onEdit: () => setShowCheckPage(false)
62966
63057
  })));
62967
63058
  }
@@ -62978,7 +63069,7 @@ const OLDApplication = () => {
62978
63069
  isDisabled: !canSubmit,
62979
63070
  label: creatingWaterApplicationLoading || creatingSewerageApplicationLoading || updatingWaterApplicationLoading || updatingSewerageApplicationLoading ? t("CS_COMMON_SUBMITTING") : t("CS_COMMON_NEXT"),
62980
63071
  onSubmit: onFormSubmit,
62981
- defaultValues: sessionFormData,
63072
+ defaultValues: defaultValues,
62982
63073
  noCard: true,
62983
63074
  noBreakLine: true,
62984
63075
  cardFormWrapperClassName: "new-application-card"
@@ -63067,19 +63158,26 @@ const FitterSandbox = _ref => {
63067
63158
  status: "ACTIVE",
63068
63159
  isVerified: false
63069
63160
  }];
63070
- payload.connectionExecutionDate = Date.now();
63071
- payload.disconnectionExecutionDate = Date.now();
63161
+ const currentDate = Date.now();
63162
+ const actionToExecute = (action === null || action === void 0 ? void 0 : action.action) || (typeof action === "string" ? action : "EXECUTE_DISCONNECTION");
63163
+ payload.connectionExecutionDate = currentDate;
63164
+ payload.disconnectionExecutionDate = currentDate;
63165
+ payload.action = actionToExecute;
63072
63166
  payload.wfDocuments = docArray;
63073
63167
  payload.documents = [...(payload.documents || []), ...docArray];
63074
63168
  payload.additionalDetails = {
63075
63169
  ...payload.additionalDetails,
63076
63170
  finalMeterReading: meterReading,
63171
+ disconnectionExecutionDate: currentDate,
63077
63172
  disconnectionGpsLocation: gpsLocation.replace(/<[^>]*>?/gm, ""),
63078
63173
  disconnectionTimestamp: timestamp.replace(/<[^>]*>?/gm, "")
63079
63174
  };
63175
+ if (Array.isArray(payload.disConnectionDetails) && payload.disConnectionDetails.length > 0) {
63176
+ payload.disConnectionDetails[0].disconnectionExecutionDate = currentDate;
63177
+ }
63080
63178
  payload.processInstance = {
63081
63179
  ...payload.processInstance,
63082
- action: action === null || action === void 0 ? void 0 : action.action,
63180
+ action: actionToExecute,
63083
63181
  comment: `Meter Reading: ${meterReading} m3`,
63084
63182
  documents: docArray
63085
63183
  };