@djb25/digit-ui-module-ws 1.0.77 → 1.0.78

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.
@@ -1593,19 +1593,59 @@ const convertApplicationData = function (data, serviceType, modify, editByConfig
1593
1593
  sessionStorage.setItem("WS_EDIT_APPLICATION_DETAILS", JSON.stringify(data));
1594
1594
  return payload;
1595
1595
  };
1596
+ const mapExistingDocIdsToPayload = function (uploadingDocs, existingDocs) {
1597
+ if (uploadingDocs === void 0) {
1598
+ uploadingDocs = [];
1599
+ }
1600
+ if (existingDocs === void 0) {
1601
+ existingDocs = [];
1602
+ }
1603
+ if (!Array.isArray(uploadingDocs) || uploadingDocs.length === 0) return uploadingDocs;
1604
+ if (!Array.isArray(existingDocs) || existingDocs.length === 0) return uploadingDocs;
1605
+ return uploadingDocs.map(doc => {
1606
+ if (doc !== null && doc !== void 0 && doc.id) return doc;
1607
+ const uploadType = doc === null || doc === void 0 ? void 0 : doc.documentType;
1608
+ if (!uploadType) return doc;
1609
+ const normUpload = String(uploadType).trim().toUpperCase();
1610
+ const uploadParts = normUpload.split(".");
1611
+ const uploadCode = uploadParts[uploadParts.length - 1];
1612
+ const matchedDoc = existingDocs.find(exDoc => {
1613
+ if (!(exDoc !== null && exDoc !== void 0 && exDoc.id) || !(exDoc !== null && exDoc !== void 0 && exDoc.documentType)) return false;
1614
+ const normExisting = String(exDoc.documentType).trim().toUpperCase();
1615
+ const existingParts = normExisting.split(".");
1616
+ const existingCode = existingParts[existingParts.length - 1];
1617
+ if (normExisting === normUpload) return true;
1618
+ if (existingCode === uploadCode) return true;
1619
+ if (normExisting.endsWith("." + normUpload) || normUpload.endsWith("." + normExisting)) return true;
1620
+ if (normExisting.includes(normUpload) || normUpload.includes(normExisting)) return true;
1621
+ return false;
1622
+ });
1623
+ if (matchedDoc && matchedDoc.id) {
1624
+ return _extends({}, doc, {
1625
+ id: matchedDoc.id
1626
+ });
1627
+ }
1628
+ return doc;
1629
+ });
1630
+ };
1596
1631
  const convertEditApplicationDetails = function (data, appData, actionData) {
1597
1632
  try {
1598
- var _data$cpt30, _data$cpt30$details, _data$cpt30$details$o, _data$cpt31, _data$cpt31$details, _data$ConnectionDetai3, _data$ConnectionDetai4, _data$ConnectionDetai5, _data$ConnectionDetai6, _data$ConnectionDetai7, _data$ConnectionDetai8, _data$ConnectionDetai9, _data$ConnectionDetai0, _data$ConnectionDetai1, _data$ConnectionDetai10, _data$ConnectionDetai11, _data$ConnectionDetai12, _data$ConnectionDetai13, _data$ConnectionDetai14, _data$ConnectionDetai15, _data$ConnectionDetai16, _data$ConnectionDetai17, _data$ConnectionDetai18, _data$ConnectionHolde58, _data$ConnectionHolde59, _appData$applicationD, _appData$applicationD2, _data$ConnectionHolde60, _data$ConnectionHolde61, _data$ConnectionHolde62, _data$ConnectionHolde63, _data$ConnectionHolde64, _data$ConnectionHolde65, _data$ConnectionHolde66, _data$ConnectionHolde67, _data$ConnectionHolde68, _data$ConnectionHolde69, _data$ConnectionHolde70, _data$ConnectionHolde71, _data$ConnectionHolde72, _data$ConnectionHolde73, _data$ConnectionHolde74, _data$ConnectionHolde75, _data$ConnectionHolde76, _data$ConnectionHolde77, _data$ConnectionHolde78, _data$ConnectionHolde79, _data$ConnectionHolde80, _data$ConnectionHolde81, _data$ConnectionHolde82, _data$ConnectionHolde83, _data$ConnectionHolde84, _data$ConnectionHolde85, _data$ConnectionHolde86, _data$cpt32, _data$DocumentsRequir;
1633
+ var _data$cpt30, _data$cpt30$details, _data$cpt30$details$o, _appData$applicationD, _data$DocumentsRequir, _data$cpt31, _data$cpt31$details, _data$ConnectionDetai3, _data$ConnectionDetai4, _data$ConnectionDetai5, _data$ConnectionDetai6, _data$ConnectionDetai7, _data$ConnectionDetai8, _data$ConnectionDetai9, _data$ConnectionDetai0, _data$ConnectionDetai1, _data$ConnectionDetai10, _data$ConnectionDetai11, _data$ConnectionDetai12, _data$ConnectionDetai13, _data$ConnectionDetai14, _data$ConnectionDetai15, _data$ConnectionDetai16, _data$ConnectionDetai17, _data$ConnectionDetai18, _data$ConnectionHolde58, _data$ConnectionHolde59, _appData$applicationD2, _appData$applicationD3, _data$ConnectionHolde60, _data$ConnectionHolde61, _data$ConnectionHolde62, _data$ConnectionHolde63, _data$ConnectionHolde64, _data$ConnectionHolde65, _data$ConnectionHolde66, _data$ConnectionHolde67, _data$ConnectionHolde68, _data$ConnectionHolde69, _data$ConnectionHolde70, _data$ConnectionHolde71, _data$ConnectionHolde72, _data$ConnectionHolde73, _data$ConnectionHolde74, _data$ConnectionHolde75, _data$ConnectionHolde76, _data$ConnectionHolde77, _data$ConnectionHolde78, _data$ConnectionHolde79, _data$ConnectionHolde80, _data$ConnectionHolde81, _data$ConnectionHolde82, _data$ConnectionHolde83, _data$ConnectionHolde84, _data$ConnectionHolde85, _data$ConnectionHolde86, _data$cpt32;
1599
1634
  data === null || data === void 0 ? void 0 : (_data$cpt30 = data.cpt) === null || _data$cpt30 === void 0 ? void 0 : (_data$cpt30$details = _data$cpt30.details) === null || _data$cpt30$details === void 0 ? void 0 : (_data$cpt30$details$o = _data$cpt30$details.owners) === null || _data$cpt30$details$o === void 0 ? void 0 : _data$cpt30$details$o.forEach(owner => {
1600
1635
  if (owner !== null && owner !== void 0 && owner.permanentAddress) owner.correspondenceAddress = owner === null || owner === void 0 ? void 0 : owner.permanentAddress;
1601
1636
  });
1637
+ const existingDocs = (appData === null || appData === void 0 ? void 0 : (_appData$applicationD = appData.applicationData) === null || _appData$applicationD === void 0 ? void 0 : _appData$applicationD.documents) || (appData === null || appData === void 0 ? void 0 : appData.documents) || [];
1638
+ let docs = (data === null || data === void 0 ? void 0 : (_data$DocumentsRequir = data.DocumentsRequired) === null || _data$DocumentsRequir === void 0 ? void 0 : _data$DocumentsRequir.documents) || [];
1639
+ if (docs && docs.length > 0 && existingDocs && existingDocs.length > 0) {
1640
+ docs = mapExistingDocIdsToPayload(docs, existingDocs);
1641
+ }
1602
1642
  let payload = _extends({}, appData.applicationData, {
1603
1643
  propertyId: data === null || data === void 0 ? void 0 : (_data$cpt31 = data.cpt) === null || _data$cpt31 === void 0 ? void 0 : (_data$cpt31$details = _data$cpt31.details) === null || _data$cpt31$details === void 0 ? void 0 : _data$cpt31$details.propertyId,
1604
1644
  proposedTaps: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai3 = data.ConnectionDetails) === null || _data$ConnectionDetai3 === void 0 ? void 0 : (_data$ConnectionDetai4 = _data$ConnectionDetai3[0]) === null || _data$ConnectionDetai4 === void 0 ? void 0 : _data$ConnectionDetai4.proposedTaps) && Number(data === null || data === void 0 ? void 0 : (_data$ConnectionDetai5 = data.ConnectionDetails) === null || _data$ConnectionDetai5 === void 0 ? void 0 : (_data$ConnectionDetai6 = _data$ConnectionDetai5[0]) === null || _data$ConnectionDetai6 === void 0 ? void 0 : _data$ConnectionDetai6.proposedTaps),
1605
1645
  proposedPipeSize: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai7 = data.ConnectionDetails) === null || _data$ConnectionDetai7 === void 0 ? void 0 : (_data$ConnectionDetai8 = _data$ConnectionDetai7[0]) === null || _data$ConnectionDetai8 === void 0 ? void 0 : (_data$ConnectionDetai9 = _data$ConnectionDetai8.proposedPipeSize) === null || _data$ConnectionDetai9 === void 0 ? void 0 : _data$ConnectionDetai9.size) && Number(data === null || data === void 0 ? void 0 : (_data$ConnectionDetai0 = data.ConnectionDetails) === null || _data$ConnectionDetai0 === void 0 ? void 0 : (_data$ConnectionDetai1 = _data$ConnectionDetai0[0]) === null || _data$ConnectionDetai1 === void 0 ? void 0 : (_data$ConnectionDetai10 = _data$ConnectionDetai1.proposedPipeSize) === null || _data$ConnectionDetai10 === void 0 ? void 0 : _data$ConnectionDetai10.size),
1606
1646
  proposedWaterClosets: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai11 = data.ConnectionDetails) === null || _data$ConnectionDetai11 === void 0 ? void 0 : (_data$ConnectionDetai12 = _data$ConnectionDetai11[0]) === null || _data$ConnectionDetai12 === void 0 ? void 0 : _data$ConnectionDetai12.proposedWaterClosets) && Number(data === null || data === void 0 ? void 0 : (_data$ConnectionDetai13 = data.ConnectionDetails) === null || _data$ConnectionDetai13 === void 0 ? void 0 : (_data$ConnectionDetai14 = _data$ConnectionDetai13[0]) === null || _data$ConnectionDetai14 === void 0 ? void 0 : _data$ConnectionDetai14.proposedWaterClosets),
1607
1647
  proposedToilets: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai15 = data.ConnectionDetails) === null || _data$ConnectionDetai15 === void 0 ? void 0 : (_data$ConnectionDetai16 = _data$ConnectionDetai15[0]) === null || _data$ConnectionDetai16 === void 0 ? void 0 : _data$ConnectionDetai16.proposedToilets) && Number(data === null || data === void 0 ? void 0 : (_data$ConnectionDetai17 = data.ConnectionDetails) === null || _data$ConnectionDetai17 === void 0 ? void 0 : (_data$ConnectionDetai18 = _data$ConnectionDetai17[0]) === null || _data$ConnectionDetai18 === void 0 ? void 0 : _data$ConnectionDetai18.proposedToilets),
1608
- connectionHolders: !(data !== null && data !== void 0 && (_data$ConnectionHolde58 = data.ConnectionHolderDetails) !== null && _data$ConnectionHolde58 !== void 0 && (_data$ConnectionHolde59 = _data$ConnectionHolde58[0]) !== null && _data$ConnectionHolde59 !== void 0 && _data$ConnectionHolde59.sameAsOwnerDetails) ? [_extends({}, appData === null || appData === void 0 ? void 0 : (_appData$applicationD = appData.applicationData) === null || _appData$applicationD === void 0 ? void 0 : (_appData$applicationD2 = _appData$applicationD.connectionHolders) === null || _appData$applicationD2 === void 0 ? void 0 : _appData$applicationD2[0], {
1648
+ connectionHolders: !(data !== null && data !== void 0 && (_data$ConnectionHolde58 = data.ConnectionHolderDetails) !== null && _data$ConnectionHolde58 !== void 0 && (_data$ConnectionHolde59 = _data$ConnectionHolde58[0]) !== null && _data$ConnectionHolde59 !== void 0 && _data$ConnectionHolde59.sameAsOwnerDetails) ? [_extends({}, appData === null || appData === void 0 ? void 0 : (_appData$applicationD2 = appData.applicationData) === null || _appData$applicationD2 === void 0 ? void 0 : (_appData$applicationD3 = _appData$applicationD2.connectionHolders) === null || _appData$applicationD3 === void 0 ? void 0 : _appData$applicationD3[0], {
1609
1649
  correspondenceAddress: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde60 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde60 === void 0 ? void 0 : (_data$ConnectionHolde61 = _data$ConnectionHolde60[0]) === null || _data$ConnectionHolde61 === void 0 ? void 0 : _data$ConnectionHolde61.address) || "",
1610
1650
  fatherOrHusbandName: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde62 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde62 === void 0 ? void 0 : (_data$ConnectionHolde63 = _data$ConnectionHolde62[0]) === null || _data$ConnectionHolde63 === void 0 ? void 0 : _data$ConnectionHolde63.guardian) || "",
1611
1651
  gender: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde64 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde64 === void 0 ? void 0 : (_data$ConnectionHolde65 = _data$ConnectionHolde64[0]) === null || _data$ConnectionHolde65 === void 0 ? void 0 : (_data$ConnectionHolde66 = _data$ConnectionHolde65.gender) === null || _data$ConnectionHolde66 === void 0 ? void 0 : _data$ConnectionHolde66.code) || "",
@@ -1624,7 +1664,7 @@ const convertEditApplicationDetails = function (data, appData, actionData) {
1624
1664
  action: actionData ? actionData : "RESUBMIT_APPLICATION"
1625
1665
  },
1626
1666
  action: actionData ? actionData : "RESUBMIT_APPLICATION",
1627
- documents: data === null || data === void 0 ? void 0 : (_data$DocumentsRequir = data.DocumentsRequired) === null || _data$DocumentsRequir === void 0 ? void 0 : _data$DocumentsRequir.documents
1667
+ documents: docs
1628
1668
  });
1629
1669
  return Promise.resolve(payload);
1630
1670
  } catch (e) {
@@ -1687,13 +1727,13 @@ const convertDisonnectApplicationData = function (data, serviceType, editByConfi
1687
1727
  };
1688
1728
  const convertDisonnectEditApplicationDetails = function (data, appData, actionData) {
1689
1729
  try {
1690
- var _data$plumberDetails7, _data$plumberDetails8, _data$plumberDetails9, _data$plumberDetails0, _data$plumberDetails1, _data$plumberDetails10, _appData$applicationD5, _appData$applicationD6, _appData$applicationD7, _data$disConnectionDe, _data$disConnectionDe2, _data$disConnectionDe3, _data$disConnectionDe4, _data$DocumentsRequir2, _data$disConnectionDe5, _data$disConnectionDe6;
1730
+ var _data$plumberDetails7, _data$plumberDetails8, _data$plumberDetails9, _data$plumberDetails0, _data$plumberDetails1, _data$plumberDetails10, _appData$applicationD6, _appData$applicationD7, _appData$applicationD8, _data$disConnectionDe, _data$disConnectionDe2, _data$disConnectionDe3, _data$disConnectionDe4, _data$DocumentsRequir2, _data$disConnectionDe5, _data$disConnectionDe6;
1691
1731
  const docs = sessionStorage.getItem("DISCONNECTION_EDIT_DOCS");
1692
1732
  const docsData = docs ? JSON.parse(docs) : "";
1693
1733
  const documentsData = [];
1694
1734
  docsData === null || docsData === void 0 ? void 0 : docsData.map(data => {
1695
- var _appData$applicationD3, _appData$applicationD4, _doc$, _doc$2;
1696
- const doc = appData === null || appData === void 0 ? void 0 : (_appData$applicationD3 = appData.applicationData) === null || _appData$applicationD3 === void 0 ? void 0 : (_appData$applicationD4 = _appData$applicationD3.documents) === null || _appData$applicationD4 === void 0 ? void 0 : _appData$applicationD4.filter(appDoc => {
1735
+ var _appData$applicationD4, _appData$applicationD5, _doc$, _doc$2;
1736
+ const doc = appData === null || appData === void 0 ? void 0 : (_appData$applicationD4 = appData.applicationData) === null || _appData$applicationD4 === void 0 ? void 0 : (_appData$applicationD5 = _appData$applicationD4.documents) === null || _appData$applicationD5 === void 0 ? void 0 : _appData$applicationD5.filter(appDoc => {
1697
1737
  var _appDoc$documentType, _appDoc$documentType$, _appDoc$documentType2, _appDoc$documentType3, _data$documentType3, _data$documentType3$s, _data$documentType4, _data$documentType4$s;
1698
1738
  return (appDoc === null || appDoc === void 0 ? void 0 : (_appDoc$documentType = appDoc.documentType) === null || _appDoc$documentType === void 0 ? void 0 : (_appDoc$documentType$ = _appDoc$documentType.split(".")) === null || _appDoc$documentType$ === void 0 ? void 0 : _appDoc$documentType$[0]) + "." + (appDoc === null || appDoc === void 0 ? void 0 : (_appDoc$documentType2 = appDoc.documentType) === null || _appDoc$documentType2 === void 0 ? void 0 : (_appDoc$documentType3 = _appDoc$documentType2.split(".")) === null || _appDoc$documentType3 === void 0 ? void 0 : _appDoc$documentType3[1]) == (data === null || data === void 0 ? void 0 : (_data$documentType3 = data.documentType) === null || _data$documentType3 === void 0 ? void 0 : (_data$documentType3$s = _data$documentType3.split(".")) === null || _data$documentType3$s === void 0 ? void 0 : _data$documentType3$s[0]) + "." + (data === null || data === void 0 ? void 0 : (_data$documentType4 = data.documentType) === null || _data$documentType4 === void 0 ? void 0 : (_data$documentType4$s = _data$documentType4.split(".")) === null || _data$documentType4$s === void 0 ? void 0 : _data$documentType4$s[1]);
1699
1739
  });
@@ -1711,7 +1751,7 @@ const convertDisonnectEditApplicationDetails = function (data, appData, actionDa
1711
1751
  licenseNo: data === null || data === void 0 ? void 0 : (_data$plumberDetails7 = data.plumberDetails) === null || _data$plumberDetails7 === void 0 ? void 0 : (_data$plumberDetails8 = _data$plumberDetails7[0]) === null || _data$plumberDetails8 === void 0 ? void 0 : _data$plumberDetails8.plumberLicenseNo,
1712
1752
  mobileNumber: data === null || data === void 0 ? void 0 : (_data$plumberDetails9 = data.plumberDetails) === null || _data$plumberDetails9 === void 0 ? void 0 : (_data$plumberDetails0 = _data$plumberDetails9[0]) === null || _data$plumberDetails0 === void 0 ? void 0 : _data$plumberDetails0.plumberMobileNo,
1713
1753
  name: data === null || data === void 0 ? void 0 : (_data$plumberDetails1 = data.plumberDetails) === null || _data$plumberDetails1 === void 0 ? void 0 : (_data$plumberDetails10 = _data$plumberDetails1[0]) === null || _data$plumberDetails10 === void 0 ? void 0 : _data$plumberDetails10.plumberName,
1714
- id: appData === null || appData === void 0 ? void 0 : (_appData$applicationD5 = appData.applicationData) === null || _appData$applicationD5 === void 0 ? void 0 : (_appData$applicationD6 = _appData$applicationD5.plumberInfo) === null || _appData$applicationD6 === void 0 ? void 0 : (_appData$applicationD7 = _appData$applicationD6[0]) === null || _appData$applicationD7 === void 0 ? void 0 : _appData$applicationD7.id
1754
+ id: appData === null || appData === void 0 ? void 0 : (_appData$applicationD6 = appData.applicationData) === null || _appData$applicationD6 === void 0 ? void 0 : (_appData$applicationD7 = _appData$applicationD6.plumberInfo) === null || _appData$applicationD7 === void 0 ? void 0 : (_appData$applicationD8 = _appData$applicationD7[0]) === null || _appData$applicationD8 === void 0 ? void 0 : _appData$applicationD8.id
1715
1755
  }];
1716
1756
  const _temp5 = (data === null || data === void 0 ? void 0 : (_data$disConnectionDe = data.disConnectionDetails) === null || _data$disConnectionDe === void 0 ? void 0 : (_data$disConnectionDe2 = _data$disConnectionDe[0]) === null || _data$disConnectionDe2 === void 0 ? void 0 : _data$disConnectionDe2.disConnectionReason) || "",
1717
1757
  _temp4 = (data === null || data === void 0 ? void 0 : (_data$disConnectionDe3 = data.disConnectionDetails) === null || _data$disConnectionDe3 === void 0 ? void 0 : (_data$disConnectionDe4 = _data$disConnectionDe3[0]) === null || _data$disConnectionDe4 === void 0 ? void 0 : _data$disConnectionDe4.disConnectionType) == "TEMPORARY" ? true : false,
@@ -1768,11 +1808,15 @@ const convertModifyApplicationDetails = function (data, appData, actionData) {
1768
1808
  var _data$activationDetai5, _data$activationDetai6, _data$activationDetai7, _data$activationDetai8;
1769
1809
  function _temp9() {
1770
1810
  function _temp7() {
1771
- var _data$DocumentsRequir3, _data$DocumentsRequir4, _data$DocumentsRequir5, _data$ConnectionHolde87, _data$ConnectionHolde88, _Digit$UserService$ge12, _Digit$UserService$ge13, _Digit$UserService$ge14, _data$DocumentsRequir6, _data$cpt33;
1811
+ var _data$DocumentsRequir3, _data$DocumentsRequir4, _data$DocumentsRequir5, _appData$applicationD9, _data$ConnectionHolde87, _data$ConnectionHolde88, _Digit$UserService$ge12, _Digit$UserService$ge13, _Digit$UserService$ge14, _data$DocumentsRequir6, _data$cpt33;
1772
1812
  if (data !== null && data !== void 0 && (_data$DocumentsRequir3 = data.DocumentsRequired) !== null && _data$DocumentsRequir3 !== void 0 && (_data$DocumentsRequir4 = _data$DocumentsRequir3.documents) !== null && _data$DocumentsRequir4 !== void 0 && _data$DocumentsRequir4.length) formData.documents = data === null || data === void 0 ? void 0 : (_data$DocumentsRequir5 = data.DocumentsRequired) === null || _data$DocumentsRequir5 === void 0 ? void 0 : _data$DocumentsRequir5.documents;else formData.documents = null;
1813
+ const existingDocs = (appData === null || appData === void 0 ? void 0 : (_appData$applicationD9 = appData.applicationData) === null || _appData$applicationD9 === void 0 ? void 0 : _appData$applicationD9.documents) || (appData === null || appData === void 0 ? void 0 : appData.documents) || [];
1814
+ if (formData.documents && formData.documents.length > 0 && existingDocs && existingDocs.length > 0) {
1815
+ formData.documents = mapExistingDocIdsToPayload(formData.documents, existingDocs);
1816
+ }
1773
1817
  if (!(data !== null && data !== void 0 && (_data$ConnectionHolde87 = data.ConnectionHolderDetails) !== null && _data$ConnectionHolde87 !== void 0 && (_data$ConnectionHolde88 = _data$ConnectionHolde87[0]) !== null && _data$ConnectionHolde88 !== void 0 && _data$ConnectionHolde88.sameAsOwnerDetails)) {
1774
- var _appData$applicationD8, _appData$applicationD9, _data$ConnectionHolde89, _data$ConnectionHolde90, _data$ConnectionHolde91, _data$ConnectionHolde92, _data$ConnectionHolde93, _data$ConnectionHolde94, _data$ConnectionHolde95, _data$ConnectionHolde96, _data$ConnectionHolde97, _data$ConnectionHolde98, _data$ConnectionHolde99, _data$ConnectionHolde100, _data$ConnectionHolde101, _data$ConnectionHolde102, _data$ConnectionHolde103, _data$ConnectionHolde104, _data$ConnectionHolde105, _data$ConnectionHolde106, _data$ConnectionHolde107, _data$ConnectionHolde108, _data$ConnectionHolde109, _data$ConnectionHolde110, _data$ConnectionHolde111, _data$ConnectionHolde112, _data$ConnectionHolde113, _data$ConnectionHolde114, _data$ConnectionHolde115;
1775
- formData.connectionHolders = [_extends({}, appData === null || appData === void 0 ? void 0 : (_appData$applicationD8 = appData.applicationData) === null || _appData$applicationD8 === void 0 ? void 0 : (_appData$applicationD9 = _appData$applicationD8.connectionHolders) === null || _appData$applicationD9 === void 0 ? void 0 : _appData$applicationD9[0], {
1818
+ var _appData$applicationD0, _appData$applicationD1, _data$ConnectionHolde89, _data$ConnectionHolde90, _data$ConnectionHolde91, _data$ConnectionHolde92, _data$ConnectionHolde93, _data$ConnectionHolde94, _data$ConnectionHolde95, _data$ConnectionHolde96, _data$ConnectionHolde97, _data$ConnectionHolde98, _data$ConnectionHolde99, _data$ConnectionHolde100, _data$ConnectionHolde101, _data$ConnectionHolde102, _data$ConnectionHolde103, _data$ConnectionHolde104, _data$ConnectionHolde105, _data$ConnectionHolde106, _data$ConnectionHolde107, _data$ConnectionHolde108, _data$ConnectionHolde109, _data$ConnectionHolde110, _data$ConnectionHolde111, _data$ConnectionHolde112, _data$ConnectionHolde113, _data$ConnectionHolde114, _data$ConnectionHolde115;
1819
+ formData.connectionHolders = [_extends({}, appData === null || appData === void 0 ? void 0 : (_appData$applicationD0 = appData.applicationData) === null || _appData$applicationD0 === void 0 ? void 0 : (_appData$applicationD1 = _appData$applicationD0.connectionHolders) === null || _appData$applicationD1 === void 0 ? void 0 : _appData$applicationD1[0], {
1776
1820
  correspondenceAddress: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde89 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde89 === void 0 ? void 0 : (_data$ConnectionHolde90 = _data$ConnectionHolde89[0]) === null || _data$ConnectionHolde90 === void 0 ? void 0 : _data$ConnectionHolde90.address) || "",
1777
1821
  fatherOrHusbandName: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde91 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde91 === void 0 ? void 0 : (_data$ConnectionHolde92 = _data$ConnectionHolde91[0]) === null || _data$ConnectionHolde92 === void 0 ? void 0 : _data$ConnectionHolde92.guardian) || "",
1778
1822
  gender: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde93 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde93 === void 0 ? void 0 : (_data$ConnectionHolde94 = _data$ConnectionHolde93[0]) === null || _data$ConnectionHolde94 === void 0 ? void 0 : (_data$ConnectionHolde95 = _data$ConnectionHolde94.gender) === null || _data$ConnectionHolde95 === void 0 ? void 0 : _data$ConnectionHolde95.code) || "",
@@ -7743,7 +7787,7 @@ var lodash = createCommonjsModule(function (module, exports) {
7743
7787
  });
7744
7788
 
7745
7789
  const WSApplication = _ref => {
7746
- var _user$info, _user$info$userName, _user$info2, _user$info3, _application$applicat, _application$applicat2, _application$applicat3, _application$applicat4, _application$applicat5, _application$applicat6, _application$applicat7, _application$connecti, _application$property, _application$property2, _application$property3, _application$property4, _application$property5, _application$property6, _application$applicat8, _application$connecti2, _application$connecti3, _PTData$Properties, _PTData$Properties$, _PTData$Properties$$o, _application$applicat9, _application$applicat0;
7790
+ var _user$info, _user$info$userName, _user$info2, _user$info3, _application$applicat, _application$applicat2, _application$applicat3, _application$applicat4, _application$applicat5, _application$applicat6, _application$connecti, _application$property, _application$property2, _application$property3, _application$property4, _application$property5, _application$property6, _application$applicat7, _application$connecti2, _application$connecti3, _PTData$Properties, _PTData$Properties$, _PTData$Properties$$o, _application$applicat8, _application$applicat9;
7747
7791
  let application = _ref.application;
7748
7792
  const _useTranslation = useTranslation(),
7749
7793
  t = _useTranslation.t;
@@ -7774,9 +7818,10 @@ const WSApplication = _ref => {
7774
7818
  privacy: Digit.Utils.getPrivacyObject()
7775
7819
  }),
7776
7820
  PTData = _Digit$Hooks$pt$usePr.data;
7777
- const businessService = application !== null && application !== void 0 && (_application$applicat2 = application.applicationNo) !== null && _application$applicat2 !== void 0 && _application$applicat2.includes("SW") ? application !== null && application !== void 0 && (_application$applicat3 = application.applicationNo) !== null && _application$applicat3 !== void 0 && _application$applicat3.includes("DC") ? "SW" : application !== null && application !== void 0 && (_application$applicat4 = application.applicationNo) !== null && _application$applicat4 !== void 0 && _application$applicat4.includes("MUT") ? "SW.MUTATION" : "SW.ONE_TIME_FEE" : application !== null && application !== void 0 && (_application$applicat5 = application.applicationNo) !== null && _application$applicat5 !== void 0 && _application$applicat5.includes("DC") ? "WS" : application !== null && application !== void 0 && (_application$applicat6 = application.applicationNo) !== null && _application$applicat6 !== void 0 && _application$applicat6.includes("MUT") ? "WS.MUTATION" : "WS.ONE_TIME_FEE";
7821
+ const isMutation = application === null || application === void 0 ? void 0 : (_application$applicat2 = application.applicationType) === null || _application$applicat2 === void 0 ? void 0 : _application$applicat2.includes("MUTATION");
7822
+ const businessService = application !== null && application !== void 0 && (_application$applicat3 = application.applicationNo) !== null && _application$applicat3 !== void 0 && _application$applicat3.includes("SW") ? application !== null && application !== void 0 && (_application$applicat4 = application.applicationNo) !== null && _application$applicat4 !== void 0 && _application$applicat4.includes("DC") ? "SW" : isMutation ? "SW.MUTATION" : "SW.ONE_TIME_FEE" : application !== null && application !== void 0 && (_application$applicat5 = application.applicationNo) !== null && _application$applicat5 !== void 0 && _application$applicat5.includes("DC") ? "WS" : isMutation ? "WS.MUTATION" : "WS.ONE_TIME_FEE";
7778
7823
  const fetchBillParams = {
7779
- consumerCode: application !== null && application !== void 0 && (_application$applicat7 = application.applicationNo) !== null && _application$applicat7 !== void 0 && _application$applicat7.includes("DC") ? application === null || application === void 0 ? void 0 : application.connectionNo : application === null || application === void 0 ? void 0 : application.connectionNo
7824
+ consumerCode: application !== null && application !== void 0 && (_application$applicat6 = application.applicationNo) !== null && _application$applicat6 !== void 0 && _application$applicat6.includes("DC") ? application === null || application === void 0 ? void 0 : application.connectionNo : application === null || application === void 0 ? void 0 : application.connectionNo
7780
7825
  };
7781
7826
  if (isLoading) {
7782
7827
  return /*#__PURE__*/React.createElement(Loader, null);
@@ -7831,8 +7876,8 @@ const WSApplication = _ref => {
7831
7876
  label: t("WS_VIEW_DETAILS_LABEL")
7832
7877
  })), (application === null || application === void 0 ? void 0 : application.applicationStatus) === "PENDING_FOR_PAYMENT" ? /*#__PURE__*/React.createElement(Link, {
7833
7878
  to: {
7834
- pathname: "/digit-ui/citizen/payment/my-bills/" + businessService + "/" + (application !== null && application !== void 0 && (_application$applicat8 = application.applicationNo) !== null && _application$applicat8 !== void 0 && _application$applicat8.includes("DC") ? stringReplaceAll(application === null || application === void 0 ? void 0 : application.connectionNo, "/", "+") || stringReplaceAll(application === null || application === void 0 ? void 0 : application.connectionNo, "/", "+") : stringReplaceAll(application === null || application === void 0 ? void 0 : application.applicationNo, "/", "+") || stringReplaceAll(application === null || application === void 0 ? void 0 : application.applicationNo, "/", "+")),
7835
- search: "?workflow=WNS&tenantId=" + (application === null || application === void 0 ? void 0 : application.tenantId) + "&ConsumerName=" + ((application === null || application === void 0 ? void 0 : (_application$connecti2 = application.connectionHolders) === null || _application$connecti2 === void 0 ? void 0 : _application$connecti2.map(owner => owner.name).join(",")) || (application === null || application === void 0 ? void 0 : (_application$connecti3 = application.connectionHolders) === null || _application$connecti3 === void 0 ? void 0 : _application$connecti3.map(owner => owner.name).join(",")) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties = PTData.Properties) === null || _PTData$Properties === void 0 ? void 0 : (_PTData$Properties$ = _PTData$Properties[0]) === null || _PTData$Properties$ === void 0 ? void 0 : (_PTData$Properties$$o = _PTData$Properties$.owners) === null || _PTData$Properties$$o === void 0 ? void 0 : _PTData$Properties$$o.map(owner => owner.name).join(","))) + "&isDisoconnectFlow=" + (application !== null && application !== void 0 && (_application$applicat9 = application.applicationNo) !== null && _application$applicat9 !== void 0 && _application$applicat9.includes("DC") ? true : false) + "&consumerCode=" + (application !== null && application !== void 0 && (_application$applicat0 = application.applicationNo) !== null && _application$applicat0 !== void 0 && _application$applicat0.includes("DC") ? application === null || application === void 0 ? void 0 : application.connectionNo : application === null || application === void 0 ? void 0 : application.applicationNo),
7879
+ pathname: "/digit-ui/citizen/payment/my-bills/" + businessService + "/" + (application !== null && application !== void 0 && (_application$applicat7 = application.applicationNo) !== null && _application$applicat7 !== void 0 && _application$applicat7.includes("DC") ? stringReplaceAll(application === null || application === void 0 ? void 0 : application.connectionNo, "/", "+") || stringReplaceAll(application === null || application === void 0 ? void 0 : application.connectionNo, "/", "+") : stringReplaceAll(application === null || application === void 0 ? void 0 : application.applicationNo, "/", "+") || stringReplaceAll(application === null || application === void 0 ? void 0 : application.applicationNo, "/", "+")),
7880
+ search: "?workflow=WNS&tenantId=" + (application === null || application === void 0 ? void 0 : application.tenantId) + "&ConsumerName=" + ((application === null || application === void 0 ? void 0 : (_application$connecti2 = application.connectionHolders) === null || _application$connecti2 === void 0 ? void 0 : _application$connecti2.map(owner => owner.name).join(",")) || (application === null || application === void 0 ? void 0 : (_application$connecti3 = application.connectionHolders) === null || _application$connecti3 === void 0 ? void 0 : _application$connecti3.map(owner => owner.name).join(",")) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties = PTData.Properties) === null || _PTData$Properties === void 0 ? void 0 : (_PTData$Properties$ = _PTData$Properties[0]) === null || _PTData$Properties$ === void 0 ? void 0 : (_PTData$Properties$$o = _PTData$Properties$.owners) === null || _PTData$Properties$$o === void 0 ? void 0 : _PTData$Properties$$o.map(owner => owner.name).join(","))) + "&isDisoconnectFlow=" + (application !== null && application !== void 0 && (_application$applicat8 = application.applicationNo) !== null && _application$applicat8 !== void 0 && _application$applicat8.includes("DC") ? true : false) + "&consumerCode=" + (application !== null && application !== void 0 && (_application$applicat9 = application.applicationNo) !== null && _application$applicat9 !== void 0 && _application$applicat9.includes("DC") ? application === null || application === void 0 ? void 0 : application.connectionNo : application === null || application === void 0 ? void 0 : application.applicationNo),
7836
7881
  state: {}
7837
7882
  }
7838
7883
  }, /*#__PURE__*/React.createElement("div", {
@@ -8035,15 +8080,17 @@ const WSMyApplications = () => {
8035
8080
  Header: t("MAKE_PAYMENT"),
8036
8081
  disableSortBy: true,
8037
8082
  Cell: _ref8 => {
8038
- var _application$applicat, _application$applicat2, _application$applicat3, _application$applicat4, _application$connecti, _application$connecti2, _application$property, _application$property2, _application$applicat5;
8083
+ var _application$applicat, _application$applicat2, _application$applicat3, _application$applicat4, _application$applicat5, _application$connecti, _application$property, _application$property2, _application$applicat6, _application$applicat7;
8039
8084
  let row = _ref8.row;
8040
8085
  const application = row.original;
8041
- const businessService = application !== null && application !== void 0 && (_application$applicat = application.applicationNo) !== null && _application$applicat !== void 0 && _application$applicat.includes("SW") ? application !== null && application !== void 0 && (_application$applicat2 = application.applicationNo) !== null && _application$applicat2 !== void 0 && _application$applicat2.includes("DC") ? "SW" : "SW.ONE_TIME_FEE" : application !== null && application !== void 0 && (_application$applicat3 = application.applicationNo) !== null && _application$applicat3 !== void 0 && _application$applicat3.includes("DC") ? "WS" : "WS.ONE_TIME_FEE";
8086
+ const isMutation = application === null || application === void 0 ? void 0 : (_application$applicat = application.applicationType) === null || _application$applicat === void 0 ? void 0 : _application$applicat.includes("MUTATION");
8087
+ const businessService = application !== null && application !== void 0 && (_application$applicat2 = application.applicationNo) !== null && _application$applicat2 !== void 0 && _application$applicat2.includes("SW") ? application !== null && application !== void 0 && (_application$applicat3 = application.applicationNo) !== null && _application$applicat3 !== void 0 && _application$applicat3.includes("DC") ? "SW" : isMutation ? "SW.MUTATION" : "SW.ONE_TIME_FEE" : application !== null && application !== void 0 && (_application$applicat4 = application.applicationNo) !== null && _application$applicat4 !== void 0 && _application$applicat4.includes("DC") ? "WS" : isMutation ? "WS.MUTATION" : "WS.ONE_TIME_FEE";
8042
8088
  return (application === null || application === void 0 ? void 0 : application.applicationStatus) === "PENDING_FOR_PAYMENT" ? /*#__PURE__*/React.createElement("span", {
8043
8089
  className: "link"
8044
8090
  }, /*#__PURE__*/React.createElement(Link, {
8045
8091
  to: {
8046
- pathname: "/digit-ui/citizen/payment/my-bills/" + businessService + "/" + (application !== null && application !== void 0 && (_application$applicat4 = application.applicationNo) !== null && _application$applicat4 !== void 0 && _application$applicat4.includes("DC") ? stringReplaceAll(application === null || application === void 0 ? void 0 : application.connectionNo, "/", "+") || stringReplaceAll(application === null || application === void 0 ? void 0 : application.connectionNo, "/", "+") : stringReplaceAll(application === null || application === void 0 ? void 0 : application.applicationNo, "/", "+") || stringReplaceAll(application === null || application === void 0 ? void 0 : application.applicationNo, "/", "+")) + "?workflow=WNS&tenantId=" + (application === null || application === void 0 ? void 0 : application.tenantId) + "&ConsumerName=" + ((application === null || application === void 0 ? void 0 : (_application$connecti = application.connectionHolders) === null || _application$connecti === void 0 ? void 0 : _application$connecti.map(owner => owner.name).join(",")) || (application === null || application === void 0 ? void 0 : (_application$connecti2 = application.connectionHolders) === null || _application$connecti2 === void 0 ? void 0 : _application$connecti2.map(owner => owner.name).join(",")) || (application === null || application === void 0 ? void 0 : (_application$property = application.property) === null || _application$property === void 0 ? void 0 : (_application$property2 = _application$property.owners) === null || _application$property2 === void 0 ? void 0 : _application$property2.map(owner => owner.name).join(","))) + "&isDisoconnectFlow=" + (application !== null && application !== void 0 && (_application$applicat5 = application.applicationNo) !== null && _application$applicat5 !== void 0 && _application$applicat5.includes("DC") ? true : false),
8092
+ pathname: "/digit-ui/citizen/payment/my-bills/" + businessService + "/" + (application !== null && application !== void 0 && (_application$applicat5 = application.applicationNo) !== null && _application$applicat5 !== void 0 && _application$applicat5.includes("DC") ? stringReplaceAll(application === null || application === void 0 ? void 0 : application.connectionNo, "/", "+") || stringReplaceAll(application === null || application === void 0 ? void 0 : application.connectionNo, "/", "+") : stringReplaceAll(application === null || application === void 0 ? void 0 : application.applicationNo, "/", "+") || stringReplaceAll(application === null || application === void 0 ? void 0 : application.applicationNo, "/", "+")),
8093
+ search: "?workflow=WNS&tenantId=" + (application === null || application === void 0 ? void 0 : application.tenantId) + "&ConsumerName=" + ((application === null || application === void 0 ? void 0 : (_application$connecti = application.connectionHolders) === null || _application$connecti === void 0 ? void 0 : _application$connecti.map(owner => owner.name).join(",")) || (application === null || application === void 0 ? void 0 : (_application$property = application.property) === null || _application$property === void 0 ? void 0 : (_application$property2 = _application$property.owners) === null || _application$property2 === void 0 ? void 0 : _application$property2.map(owner => owner.name).join(","))) + "&isDisoconnectFlow=" + (application !== null && application !== void 0 && (_application$applicat6 = application.applicationNo) !== null && _application$applicat6 !== void 0 && _application$applicat6.includes("DC") ? true : false) + "&consumerCode=" + (application !== null && application !== void 0 && (_application$applicat7 = application.applicationNo) !== null && _application$applicat7 !== void 0 && _application$applicat7.includes("DC") ? application === null || application === void 0 ? void 0 : application.connectionNo : application === null || application === void 0 ? void 0 : application.applicationNo),
8047
8094
  state: {
8048
8095
  fromMyApplications: true
8049
8096
  }
@@ -11268,7 +11315,9 @@ const App$1 = _ref2 => {
11268
11315
  component: WSEditApplicationByConfig
11269
11316
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
11270
11317
  path: path + "/disconnection-details",
11271
- component: WSGetDisconnectionDetails
11318
+ component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
11319
+ layoutClass: "action"
11320
+ }, /*#__PURE__*/React.createElement(WSGetDisconnectionDetails, null))
11272
11321
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
11273
11322
  path: path + "/water/bill-amendment/inbox",
11274
11323
  component: props => /*#__PURE__*/React.createElement(WSBillIAmendMentInbox, _extends({}, props, {
@@ -18198,6 +18247,7 @@ function SelectDocument(_ref2) {
18198
18247
  fileStoreId: uploadedFile,
18199
18248
  fileName: (file === null || file === void 0 ? void 0 : file.name) || (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.fileName) || "",
18200
18249
  documentUid: documentUid,
18250
+ documentNumber: documentUid,
18201
18251
  i18nKey: selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code,
18202
18252
  id: selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.id,
18203
18253
  status: "ACTIVE"
@@ -21112,22 +21162,18 @@ const WSDisconnectionForm = _ref => {
21112
21162
  config: config,
21113
21163
  onSelect: handleSubmit,
21114
21164
  onSkip: onSkip,
21115
- t: t
21116
- }, /*#__PURE__*/React.createElement("div", {
21117
- style: {
21118
- padding: "0px 10px 10px 10px"
21119
- }
21120
- }, /*#__PURE__*/React.createElement(CardHeader, null, isReSubmit ? t("RESUBMIT_DISCONNECTION_FORM") : t("WS_APPLICATION_FORM")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
21165
+ t: t,
21166
+ title: isReSubmit ? t("RESUBMIT_DISCONNECTION_FORM") : t("WS_APPLICATION_FORM")
21167
+ }, /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
21121
21168
  key: t("PDF_STATIC_LABEL_CONSUMER_NUMBER_LABEL"),
21122
21169
  label: "" + t("PDF_STATIC_LABEL_CONSUMER_NUMBER_LABEL"),
21123
21170
  text: applicationData === null || applicationData === void 0 ? void 0 : applicationData.connectionNo,
21124
21171
  className: "border-none"
21125
- })), /*#__PURE__*/React.createElement(CardLabel, {
21126
- className: "card-label-smaller",
21127
- style: {
21128
- display: "inline"
21129
- }
21130
- }, t("WS_DISCONNECTION_TYPE") + "*"), /*#__PURE__*/React.createElement(RadioButtons, {
21172
+ })), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
21173
+ className: "card-label-smaller"
21174
+ }, t("WS_DISCONNECTION_TYPE") + "*"), /*#__PURE__*/React.createElement("div", {
21175
+ className: "field"
21176
+ }, /*#__PURE__*/React.createElement(RadioButtons, {
21131
21177
  t: t,
21132
21178
  options: disconnectionTypeList,
21133
21179
  optionsKey: "i18nKey",
@@ -21142,11 +21188,8 @@ const WSDisconnectionForm = _ref => {
21142
21188
  inputStyle: isMobile ? {
21143
21189
  marginLeft: "unset"
21144
21190
  } : {}
21145
- }), /*#__PURE__*/React.createElement(CardLabel, {
21146
- className: "card-label-smaller",
21147
- style: {
21148
- display: "inline"
21149
- }
21191
+ }))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
21192
+ className: "card-label-smaller"
21150
21193
  }, t("WS_DISCONNECTION_PROPOSED_DATE") + "*", /*#__PURE__*/React.createElement("div", {
21151
21194
  className: "tooltip",
21152
21195
  style: {
@@ -21168,11 +21211,8 @@ const WSDisconnectionForm = _ref => {
21168
21211
  date: date
21169
21212
  }));
21170
21213
  }
21171
- })), ((_disconnectionData$ty4 = disconnectionData.type) === null || _disconnectionData$ty4 === void 0 ? void 0 : (_disconnectionData$ty5 = _disconnectionData$ty4.value) === null || _disconnectionData$ty5 === void 0 ? void 0 : _disconnectionData$ty5.code) === "Temporary" ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, {
21172
- className: "card-label-smaller",
21173
- style: {
21174
- display: "inline"
21175
- }
21214
+ }))), ((_disconnectionData$ty4 = disconnectionData.type) === null || _disconnectionData$ty4 === void 0 ? void 0 : (_disconnectionData$ty5 = _disconnectionData$ty4.value) === null || _disconnectionData$ty5 === void 0 ? void 0 : _disconnectionData$ty5.code) === "Temporary" ? /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
21215
+ className: "card-label-smaller"
21176
21216
  }, t("WS_DISCONNECTION_PROPOSED_END_DATE") + "*", /*#__PURE__*/React.createElement("div", {
21177
21217
  className: "tooltip",
21178
21218
  style: {
@@ -21195,11 +21235,10 @@ const WSDisconnectionForm = _ref => {
21195
21235
  }));
21196
21236
  }
21197
21237
  }))) : "", /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
21198
- className: "card-label-smaller",
21199
- style: {
21200
- display: "inline"
21201
- }
21202
- }, t("WS_DISCONNECTION_REASON") + "*"), /*#__PURE__*/React.createElement(Dropdown, {
21238
+ className: "card-label-smaller"
21239
+ }, t("WS_DISCONNECTION_REASON") + "*"), /*#__PURE__*/React.createElement("div", {
21240
+ className: "field"
21241
+ }, /*#__PURE__*/React.createElement(Dropdown, {
21203
21242
  option: disconnectionReasonList,
21204
21243
  isMandatory: false,
21205
21244
  optionKey: "i18nKey",
@@ -21212,7 +21251,14 @@ const WSDisconnectionForm = _ref => {
21212
21251
  code: "reason",
21213
21252
  value: e
21214
21253
  })
21215
- })), /*#__PURE__*/React.createElement(SubmitBar, {
21254
+ }))), /*#__PURE__*/React.createElement("div", {
21255
+ style: {
21256
+ display: "flex",
21257
+ justifyContent: "flex-end",
21258
+ width: "100%",
21259
+ gridColumn: "1 / -1"
21260
+ }
21261
+ }, /*#__PURE__*/React.createElement(SubmitBar, {
21216
21262
  label: t("CS_COMMON_NEXT"),
21217
21263
  onSubmit: () => {
21218
21264
  var _disconnectionData$ty6, _disconnectionData$ty7;
@@ -21240,11 +21286,11 @@ const WSDisconnectionForm = _ref => {
21240
21286
  }
21241
21287
  },
21242
21288
  disabled: (disconnectionData === null || disconnectionData === void 0 ? void 0 : (_disconnectionData$re5 = disconnectionData.reason) === null || _disconnectionData$re5 === void 0 ? void 0 : _disconnectionData$re5.value) === "" || (disconnectionData === null || disconnectionData === void 0 ? void 0 : disconnectionData.reason) === "" || (disconnectionData === null || disconnectionData === void 0 ? void 0 : disconnectionData.date) === "" || (disconnectionData === null || disconnectionData === void 0 ? void 0 : disconnectionData.type) === "" ? true : false
21243
- }), error && /*#__PURE__*/React.createElement(Toast, {
21289
+ })), error && /*#__PURE__*/React.createElement(Toast, {
21244
21290
  error: (error === null || error === void 0 ? void 0 : error.key) === "error" ? true : false,
21245
21291
  label: t(error === null || error === void 0 ? void 0 : error.message),
21246
21292
  onClose: () => setError(null)
21247
- })))));
21293
+ }))));
21248
21294
  }
21249
21295
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(FormStep, {
21250
21296
  config: config,
@@ -22005,7 +22051,7 @@ function WSDisconnectionDocumentsForm(_ref) {
22005
22051
  t: t,
22006
22052
  config: config,
22007
22053
  onSelect: handleSubmit
22008
- }, /*#__PURE__*/React.createElement(CardHeader, null, t("WS_DISCONNECTION_UPLOAD_DOCUMENTS")), wsDocs === null || wsDocs === void 0 ? void 0 : (_wsDocs$Disconnection = wsDocs.DisconnectionDocuments) === null || _wsDocs$Disconnection === void 0 ? void 0 : _wsDocs$Disconnection.map((document, index) => {
22054
+ }, wsDocs === null || wsDocs === void 0 ? void 0 : (_wsDocs$Disconnection = wsDocs.DisconnectionDocuments) === null || _wsDocs$Disconnection === void 0 ? void 0 : _wsDocs$Disconnection.map((document, index) => {
22009
22055
  return /*#__PURE__*/React.createElement(SelectDocument$2, {
22010
22056
  key: index,
22011
22057
  document: document,
@@ -22016,20 +22062,28 @@ function WSDisconnectionDocumentsForm(_ref) {
22016
22062
  documents: documents,
22017
22063
  setCheckRequiredFields: setCheckRequiredFields
22018
22064
  });
22019
- }), /*#__PURE__*/React.createElement(SubmitBar, {
22065
+ }), /*#__PURE__*/React.createElement("div", {
22066
+ style: {
22067
+ display: "flex",
22068
+ justifyContent: "flex-end",
22069
+ width: "100%",
22070
+ gridColumn: "1 / -1",
22071
+ marginTop: "1rem"
22072
+ }
22073
+ }, /*#__PURE__*/React.createElement(SubmitBar, {
22020
22074
  label: t("CS_COMMON_NEXT"),
22021
22075
  onSubmit: () => {
22022
22076
  history.push(match.path.replace("documents-upload", "check"));
22023
22077
  },
22024
22078
  disabled: documents.length < 2 ? true : false
22025
- }), error && /*#__PURE__*/React.createElement(Toast, {
22079
+ })), error && /*#__PURE__*/React.createElement(Toast, {
22026
22080
  error: (error === null || error === void 0 ? void 0 : error.key) === "error" ? true : false,
22027
22081
  label: t(error === null || error === void 0 ? void 0 : error.message),
22028
22082
  onClose: () => setError(null)
22029
22083
  })));
22030
22084
  }
22031
22085
  function SelectDocument$2(_ref2) {
22032
- var _doc$dropdownData;
22086
+ var _doc$dropdownData, _selectedDocument$cod2, _selectedDocument$cod3, _selectedDocument$cod4, _selectedDocument$cod5, _selectedDocument$cod6, _selectedDocument$cod7, _selectedDocument$cod8, _selectedDocument$cod9, _selectedDocument$cod0, _selectedDocument$cod1, _selectedDocument$cod10, _selectedDocument$cod11, _selectedDocument$cod12, _selectedDocument$cod13, _selectedDocument$cod14, _selectedDocument$cod15;
22033
22087
  let t = _ref2.t,
22034
22088
  key = _ref2.key,
22035
22089
  doc = _ref2.document,
@@ -22056,6 +22110,32 @@ function SelectDocument$2(_ref2) {
22056
22110
  const _useState6 = useState(() => (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.fileStoreId) || null),
22057
22111
  uploadedFile = _useState6[0],
22058
22112
  setUploadedFile = _useState6[1];
22113
+ const _useState7 = useState(() => filteredDocument !== null && filteredDocument !== void 0 && filteredDocument.documentUid && (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.documentUid) !== (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.fileStoreId) ? filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.documentUid : ""),
22114
+ documentNumber = _useState7[0],
22115
+ setDocumentNumber = _useState7[1];
22116
+ const _useState8 = useState(null),
22117
+ docNumberError = _useState8[0],
22118
+ setDocNumberError = _useState8[1];
22119
+ const validateDocumentNumber = (value, docTypeCode, isReq, hasFile) => {
22120
+ if (!isReq && !hasFile && (!value || !value.trim())) return null;
22121
+ if (!value || !value.trim()) return t("WS_DOCUMENT_NUMBER_REQUIRED") || "Document number is required";
22122
+ const trimmed = value.trim();
22123
+ const upperCode = (docTypeCode || "").toUpperCase();
22124
+ if (upperCode.includes("AADHAAR") || upperCode.includes("AADHAR")) {
22125
+ if (!/^\d{12}$/.test(trimmed)) return t("WS_AADHAAR_VALIDATION_ERROR") || "Aadhaar number must be exactly 12 digits";
22126
+ } else if (upperCode.includes("PAN")) {
22127
+ if (!/^[A-Z]{5}[0-9]{4}[A-Z]{1}$/.test(trimmed.toUpperCase())) return t("WS_PAN_VALIDATION_ERROR") || "PAN must be in format ABCDE1234F";
22128
+ } else if (upperCode.includes("VOTER") || upperCode.includes("VOTERID")) {
22129
+ if (!/^[A-Z]{3}\d{7}$/.test(trimmed.toUpperCase())) return t("WS_VOTERID_VALIDATION_ERROR") || "Voter ID must be in format ABC1234567";
22130
+ } else if (upperCode.includes("DRIVING") || upperCode.includes("DRVLC")) {
22131
+ if (!/^[A-Z]{2}\d{13}$/.test(trimmed.toUpperCase())) return t("WS_DRIVING_LICENSE_VALIDATION_ERROR") || "Driving License must be 15 characters (e.g. MH1420110012345)";
22132
+ } else if (upperCode.includes("PASSPORT")) {
22133
+ if (!/^[A-Z]{1}\d{7}$/.test(trimmed.toUpperCase())) return t("WS_PASSPORT_VALIDATION_ERROR") || "Passport must be 8 characters (e.g. A1234567)";
22134
+ } else {
22135
+ if (trimmed.length < 3) return t("WS_DOC_NO_MIN_LENGTH") || "Document number must be at least 3 characters";
22136
+ }
22137
+ return null;
22138
+ };
22059
22139
  const handleSelectDocument = value => setSelectedDocument(value);
22060
22140
  function selectfile(e) {
22061
22141
  setFile(e.target.files[0]);
@@ -22066,18 +22146,24 @@ function SelectDocument$2(_ref2) {
22066
22146
  const filteredDocumentsByDocumentType = prev === null || prev === void 0 ? void 0 : prev.filter(item => (item === null || item === void 0 ? void 0 : item.documentType) !== (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code));
22067
22147
  if ((uploadedFile === null || uploadedFile === void 0 ? void 0 : uploadedFile.length) === 0 || uploadedFile === null) return filteredDocumentsByDocumentType;
22068
22148
  const filteredDocumentsByFileStoreId = filteredDocumentsByDocumentType === null || filteredDocumentsByDocumentType === void 0 ? void 0 : filteredDocumentsByDocumentType.filter(item => (item === null || item === void 0 ? void 0 : item.fileStoreId) !== uploadedFile);
22149
+ const err = validateDocumentNumber(documentNumber, selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code, true, !!uploadedFile);
22150
+ setDocNumberError(err);
22151
+ if (err) {
22152
+ return filteredDocumentsByFileStoreId;
22153
+ }
22069
22154
  return [...filteredDocumentsByFileStoreId, {
22070
22155
  documentType: selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code,
22071
22156
  fileStoreId: uploadedFile,
22072
22157
  id: selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.id,
22073
22158
  i18nKey: selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code,
22074
- documentUid: selectedDocument !== null && selectedDocument !== void 0 && selectedDocument.documentUid ? selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.documentUid : uploadedFile,
22159
+ documentUid: documentNumber ? documentNumber : selectedDocument !== null && selectedDocument !== void 0 && selectedDocument.documentUid ? selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.documentUid : uploadedFile,
22160
+ documentNumber: documentNumber ? documentNumber : selectedDocument !== null && selectedDocument !== void 0 && selectedDocument.documentNumber ? selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.documentNumber : "",
22075
22161
  fileName: (file === null || file === void 0 ? void 0 : file.name) || "",
22076
22162
  status: "ACTIVE"
22077
22163
  }];
22078
22164
  });
22079
22165
  }
22080
- }, [uploadedFile, selectedDocument]);
22166
+ }, [uploadedFile, selectedDocument, documentNumber]);
22081
22167
  useEffect(() => {
22082
22168
  (function () {
22083
22169
  try {
@@ -22125,27 +22211,109 @@ function SelectDocument$2(_ref2) {
22125
22211
  }, [file]);
22126
22212
  return /*#__PURE__*/React.createElement("div", {
22127
22213
  style: {
22128
- marginBottom: "24px"
22214
+ gridColumn: "span 2",
22215
+ display: "grid",
22216
+ gridTemplateColumns: "repeat(2, minmax(0, 1fr))",
22217
+ gap: "20px",
22218
+ width: "100%",
22219
+ marginBottom: "20px"
22129
22220
  }
22130
- }, /*#__PURE__*/React.createElement(CardLabel, null, t(doc === null || doc === void 0 ? void 0 : doc.i18nKey) + "*"), /*#__PURE__*/React.createElement(Dropdown, {
22221
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, {
22222
+ className: "card-label-smaller",
22223
+ style: {
22224
+ marginBottom: "8px"
22225
+ }
22226
+ }, t(doc === null || doc === void 0 ? void 0 : doc.i18nKey) + "*"), /*#__PURE__*/React.createElement(Dropdown, {
22131
22227
  t: t,
22132
22228
  isMandatory: false,
22133
22229
  option: doc === null || doc === void 0 ? void 0 : doc.dropdownData,
22134
22230
  selected: selectedDocument,
22135
22231
  optionKey: "i18nKey",
22136
22232
  select: handleSelectDocument
22137
- }), /*#__PURE__*/React.createElement(UploadFile, {
22233
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, {
22234
+ className: "card-label-smaller",
22235
+ style: {
22236
+ marginBottom: "8px"
22237
+ }
22238
+ }, t(doc === null || doc === void 0 ? void 0 : doc.i18nKey) + " Document Number"), /*#__PURE__*/React.createElement(TextInput, {
22239
+ type: "text",
22240
+ value: documentNumber,
22241
+ onChange: e => {
22242
+ var _selectedDocument$cod;
22243
+ let val = e.target.value;
22244
+ const upperCode = (selectedDocument === null || selectedDocument === void 0 ? void 0 : (_selectedDocument$cod = selectedDocument.code) === null || _selectedDocument$cod === void 0 ? void 0 : _selectedDocument$cod.toUpperCase()) || "";
22245
+ const maxLen = upperCode.includes("AADHAAR") || upperCode.includes("AADHAR") ? 12 : upperCode.includes("PAN") ? 10 : upperCode.includes("VOTER") || upperCode.includes("VOTERID") ? 10 : upperCode.includes("DRIVING") || upperCode.includes("DRVLC") ? 15 : upperCode.includes("PASSPORT") ? 8 : 64;
22246
+ if (val.length > maxLen) {
22247
+ val = val.substring(0, maxLen);
22248
+ }
22249
+ setDocumentNumber(val);
22250
+ setDocNumberError(null);
22251
+ },
22252
+ onBlur: () => {
22253
+ setDocNumberError(validateDocumentNumber(documentNumber, selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code, true, !!uploadedFile));
22254
+ },
22255
+ placeholder: t("WS_DOCUMENT_NO_PLACEHOLDER") || "Enter Document Number",
22256
+ style: docNumberError ? {
22257
+ border: "1px solid #d32f2f"
22258
+ } : {},
22259
+ maxLength: selectedDocument !== null && selectedDocument !== void 0 && (_selectedDocument$cod2 = selectedDocument.code) !== null && _selectedDocument$cod2 !== void 0 && _selectedDocument$cod2.toUpperCase().includes("AADHAAR") || selectedDocument !== null && selectedDocument !== void 0 && (_selectedDocument$cod3 = selectedDocument.code) !== null && _selectedDocument$cod3 !== void 0 && _selectedDocument$cod3.toUpperCase().includes("AADHAR") ? 12 : selectedDocument !== null && selectedDocument !== void 0 && (_selectedDocument$cod4 = selectedDocument.code) !== null && _selectedDocument$cod4 !== void 0 && _selectedDocument$cod4.toUpperCase().includes("PAN") ? 10 : selectedDocument !== null && selectedDocument !== void 0 && (_selectedDocument$cod5 = selectedDocument.code) !== null && _selectedDocument$cod5 !== void 0 && _selectedDocument$cod5.toUpperCase().includes("VOTER") || selectedDocument !== null && selectedDocument !== void 0 && (_selectedDocument$cod6 = selectedDocument.code) !== null && _selectedDocument$cod6 !== void 0 && _selectedDocument$cod6.toUpperCase().includes("VOTERID") ? 10 : selectedDocument !== null && selectedDocument !== void 0 && (_selectedDocument$cod7 = selectedDocument.code) !== null && _selectedDocument$cod7 !== void 0 && _selectedDocument$cod7.toUpperCase().includes("DRIVING") || selectedDocument !== null && selectedDocument !== void 0 && (_selectedDocument$cod8 = selectedDocument.code) !== null && _selectedDocument$cod8 !== void 0 && _selectedDocument$cod8.toUpperCase().includes("DRVLC") ? 15 : selectedDocument !== null && selectedDocument !== void 0 && (_selectedDocument$cod9 = selectedDocument.code) !== null && _selectedDocument$cod9 !== void 0 && _selectedDocument$cod9.toUpperCase().includes("PASSPORT") ? 8 : 64
22260
+ }), docNumberError && /*#__PURE__*/React.createElement("div", {
22261
+ style: {
22262
+ fontSize: "12px",
22263
+ color: "#d32f2f",
22264
+ marginTop: "4px"
22265
+ }
22266
+ }, docNumberError), ((selectedDocument === null || selectedDocument === void 0 ? void 0 : (_selectedDocument$cod0 = selectedDocument.code) === null || _selectedDocument$cod0 === void 0 ? void 0 : _selectedDocument$cod0.toUpperCase().includes("AADHAAR")) || (selectedDocument === null || selectedDocument === void 0 ? void 0 : (_selectedDocument$cod1 = selectedDocument.code) === null || _selectedDocument$cod1 === void 0 ? void 0 : _selectedDocument$cod1.toUpperCase().includes("AADHAR"))) && !docNumberError && /*#__PURE__*/React.createElement("div", {
22267
+ style: {
22268
+ fontSize: "11px",
22269
+ color: "#000000",
22270
+ marginTop: "4px"
22271
+ }
22272
+ }, t("WS_AADHAAR_VALIDATION_ERROR") || "Format: 12-digit numeric (e.g. 123456789012)"), (selectedDocument === null || selectedDocument === void 0 ? void 0 : (_selectedDocument$cod10 = selectedDocument.code) === null || _selectedDocument$cod10 === void 0 ? void 0 : _selectedDocument$cod10.toUpperCase().includes("PAN")) && !docNumberError && /*#__PURE__*/React.createElement("div", {
22273
+ style: {
22274
+ fontSize: "11px",
22275
+ color: "#000000",
22276
+ marginTop: "4px"
22277
+ }
22278
+ }, t("WS_PAN_VALIDATION_ERROR") || "Format: ABCDE1234F"), ((selectedDocument === null || selectedDocument === void 0 ? void 0 : (_selectedDocument$cod11 = selectedDocument.code) === null || _selectedDocument$cod11 === void 0 ? void 0 : _selectedDocument$cod11.toUpperCase().includes("VOTER")) || (selectedDocument === null || selectedDocument === void 0 ? void 0 : (_selectedDocument$cod12 = selectedDocument.code) === null || _selectedDocument$cod12 === void 0 ? void 0 : _selectedDocument$cod12.toUpperCase().includes("VOTERID"))) && !docNumberError && /*#__PURE__*/React.createElement("div", {
22279
+ style: {
22280
+ fontSize: "11px",
22281
+ color: "#000000",
22282
+ marginTop: "4px"
22283
+ }
22284
+ }, t("WS_VOTERID_VALIDATION_ERROR") || "Format: ABC1234567"), ((selectedDocument === null || selectedDocument === void 0 ? void 0 : (_selectedDocument$cod13 = selectedDocument.code) === null || _selectedDocument$cod13 === void 0 ? void 0 : _selectedDocument$cod13.toUpperCase().includes("DRIVING")) || (selectedDocument === null || selectedDocument === void 0 ? void 0 : (_selectedDocument$cod14 = selectedDocument.code) === null || _selectedDocument$cod14 === void 0 ? void 0 : _selectedDocument$cod14.toUpperCase().includes("DRVLC"))) && !docNumberError && /*#__PURE__*/React.createElement("div", {
22285
+ style: {
22286
+ fontSize: "11px",
22287
+ color: "#000000",
22288
+ marginTop: "4px"
22289
+ }
22290
+ }, t("WS_DRIVING_LICENSE_VALIDATION_ERROR") || "Format: MH1420110012345"), (selectedDocument === null || selectedDocument === void 0 ? void 0 : (_selectedDocument$cod15 = selectedDocument.code) === null || _selectedDocument$cod15 === void 0 ? void 0 : _selectedDocument$cod15.toUpperCase().includes("PASSPORT")) && !docNumberError && /*#__PURE__*/React.createElement("div", {
22291
+ style: {
22292
+ fontSize: "11px",
22293
+ color: "#000000",
22294
+ marginTop: "4px"
22295
+ }
22296
+ }, t("WS_PASSPORT_VALIDATION_ERROR") || "Format: A1234567")), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, {
22297
+ className: "card-label-smaller",
22298
+ style: {
22299
+ marginBottom: "8px"
22300
+ }
22301
+ }, "Upload " + t(doc === null || doc === void 0 ? void 0 : doc.i18nKey) + " Document*"), /*#__PURE__*/React.createElement(UploadFile, {
22138
22302
  id: "noc-doc-" + key,
22139
22303
  extraStyleName: "propertyCreate",
22140
22304
  accept: "image/*, .pdf, .png, .jpeg, .jpg",
22141
22305
  onUpload: selectfile,
22142
22306
  onDelete: () => {
22307
+ var _doc$dropdownData2;
22143
22308
  setUploadedFile(null);
22309
+ setFile(null);
22310
+ setDocumentNumber("");
22311
+ setSelectedDocument((doc === null || doc === void 0 ? void 0 : (_doc$dropdownData2 = doc.dropdownData) === null || _doc$dropdownData2 === void 0 ? void 0 : _doc$dropdownData2.length) === 1 ? doc === null || doc === void 0 ? void 0 : doc.dropdownData[0] : {});
22144
22312
  setCheckRequiredFields(true);
22145
22313
  },
22146
22314
  message: uploadedFile ? "1 " + t("CS_ACTION_FILEUPLOADED") : t("ES_NO_FILE_SELECTED_LABEL"),
22147
22315
  error: error
22148
- }));
22316
+ })));
22149
22317
  }
22150
22318
 
22151
22319
  const BannerPicker = props => {
@@ -31052,7 +31220,11 @@ function WSDocument(_ref) {
31052
31220
  style: {
31053
31221
  marginTop: "8px"
31054
31222
  }
31055
- }, t(Code === null || Code === void 0 ? void 0 : Code.split('.').slice(0, 3).join('_'))) : null);
31223
+ }, t(Code === null || Code === void 0 ? void 0 : Code.split('.').slice(0, 3).join('_'))) : null, document !== null && document !== void 0 && document.documentNumber ? /*#__PURE__*/React.createElement("p", {
31224
+ style: {
31225
+ marginTop: "8px"
31226
+ }
31227
+ }, document === null || document === void 0 ? void 0 : document.documentNumber) : "N/A");
31056
31228
  }))));
31057
31229
  }
31058
31230
 
@@ -35785,19 +35957,7 @@ const CheckPage$1 = () => {
35785
35957
  style: {
35786
35958
  width: "100%"
35787
35959
  }
35788
- }, /*#__PURE__*/React.createElement(Header, {
35789
- styles: {
35790
- fontSize: "32px"
35791
- }
35792
- }, t("WS_COMMON_SUMMARY")), /*#__PURE__*/React.createElement(Card, {
35793
- style: {
35794
- paddingRight: "16px"
35795
- }
35796
- }, /*#__PURE__*/React.createElement("div", {
35797
- style: {
35798
- display: "inline"
35799
- }
35800
- }, /*#__PURE__*/React.createElement(CardHeader, {
35960
+ }, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardHeader, {
35801
35961
  styles: {
35802
35962
  fontSize: "28px"
35803
35963
  }
@@ -35815,7 +35975,7 @@ const CheckPage$1 = () => {
35815
35975
  display: "inline"
35816
35976
  },
35817
35977
  onClick: () => routeTo(routeLink + "/application-form")
35818
- })), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
35978
+ }), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
35819
35979
  className: "border-none",
35820
35980
  label: t("WS_DISCONNECTION_CONSUMER_NUMBER"),
35821
35981
  text: value.connectionNo
@@ -35835,15 +35995,7 @@ const CheckPage$1 = () => {
35835
35995
  className: "border-none",
35836
35996
  label: t("WS_DISCONNECTION_REASON"),
35837
35997
  text: t(value.WSDisconnectionForm.reason.value.i18nKey)
35838
- }))), /*#__PURE__*/React.createElement(Card, {
35839
- style: {
35840
- paddingRight: "16px"
35841
- }
35842
- }, /*#__PURE__*/React.createElement("div", {
35843
- style: {
35844
- display: "inline"
35845
- }
35846
- }, /*#__PURE__*/React.createElement(CardHeader, {
35998
+ })), /*#__PURE__*/React.createElement(CardHeader, {
35847
35999
  styles: {
35848
36000
  fontSize: "28px"
35849
36001
  }
@@ -35861,11 +36013,15 @@ const CheckPage$1 = () => {
35861
36013
  display: "inline"
35862
36014
  },
35863
36015
  onClick: () => routeTo(routeLink + "/documents-upload")
35864
- })), documents && (documents === null || documents === void 0 ? void 0 : documents.map((doc, index) => {
36016
+ }), documents && (documents === null || documents === void 0 ? void 0 : documents.map((doc, index) => {
35865
36017
  var _doc$documentType;
35866
36018
  return /*#__PURE__*/React.createElement("div", {
35867
36019
  key: "doc-" + index
35868
- }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardSectionHeader, null, t(doc === null || doc === void 0 ? void 0 : (_doc$documentType = doc.documentType) === null || _doc$documentType === void 0 ? void 0 : _doc$documentType.split('.').slice(0, 2).join('_'))), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(WSDocument, {
36020
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardSectionHeader, null, t(doc === null || doc === void 0 ? void 0 : (_doc$documentType = doc.documentType) === null || _doc$documentType === void 0 ? void 0 : _doc$documentType.split('.').slice(0, 2).join('_'))), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
36021
+ className: "border-none",
36022
+ label: t("WS_DOCUMENT_NUMBER"),
36023
+ text: (doc === null || doc === void 0 ? void 0 : doc.documentNumber) || (doc === null || doc === void 0 ? void 0 : doc.documentUid) || t("NA")
36024
+ }), /*#__PURE__*/React.createElement(WSDocument, {
35869
36025
  value: {
35870
36026
  documents: value.WSDisconnectionForm
35871
36027
  },
@@ -35881,10 +36037,17 @@ const CheckPage$1 = () => {
35881
36037
  marginBottom: "20px"
35882
36038
  }
35883
36039
  }) : null)));
35884
- })), /*#__PURE__*/React.createElement(SubmitBar, {
36040
+ })), /*#__PURE__*/React.createElement("div", {
36041
+ style: {
36042
+ display: "flex",
36043
+ justifyContent: "flex-end",
36044
+ width: "100%",
36045
+ gridColumn: "1 / -1"
36046
+ }
36047
+ }, /*#__PURE__*/React.createElement(SubmitBar, {
35885
36048
  label: t("CS_COMMON_SUBMIT"),
35886
36049
  onSubmit: () => onSubmit(value === null || value === void 0 ? void 0 : value.WSDisconnectionForm)
35887
- })))));
36050
+ }))))));
35888
36051
  };
35889
36052
 
35890
36053
  const CheckPage$2 = () => {
@@ -45294,7 +45457,7 @@ function PropertyDocuments(_ref) {
45294
45457
  var _pdfFiles$value$fileS;
45295
45458
  const fileUrl = (_pdfFiles$value$fileS = pdfFiles[value.fileStoreId]) === null || _pdfFiles$value$fileS === void 0 ? void 0 : _pdfFiles$value$fileS.split(",")[0];
45296
45459
  const docSubType = getDocSubType(value === null || value === void 0 ? void 0 : value.documentType);
45297
- const docUid = (value === null || value === void 0 ? void 0 : value.documentUid) || "";
45460
+ const docUid = (value === null || value === void 0 ? void 0 : value.documentNumber) || (value === null || value === void 0 ? void 0 : value.documentUid) || "";
45298
45461
  const isPhoto = value === null || value === void 0 ? void 0 : value.isPhoto;
45299
45462
  let typeLabel = "";
45300
45463
  let numLabel = "";
@@ -46490,6 +46653,7 @@ const RenewPopup = _ref => {
46490
46653
  };
46491
46654
 
46492
46655
  const DueVerification = _ref => {
46656
+ var _window, _window$Digit, _window$Digit$ULBServ, _window2, _window2$Digit, _window2$Digit$Hooks, _window2$Digit$Hooks$;
46493
46657
  let applicationData = _ref.applicationData;
46494
46658
  const _useTranslation = useTranslation(),
46495
46659
  t = _useTranslation.t;
@@ -46558,23 +46722,67 @@ const DueVerification = _ref => {
46558
46722
  setTableData(applicationData.dueVerification);
46559
46723
  }
46560
46724
  }, [applicationData]);
46561
- const handleAdd = () => {
46562
- if (kno) {
46563
- const mockData = {
46564
- kno: kno,
46565
- fullName: "John Doe",
46566
- fullAddress: "123 Main St, New Delhi, Delhi 110001",
46567
- dueAmount: "1500",
46568
- totalAmount: "1500",
46569
- remarks: remarks
46570
- };
46571
- const newTableData = [...tableData, mockData];
46572
- setTableData(newTableData);
46573
- if (applicationData) {
46574
- applicationData.dueVerification = newTableData;
46575
- }
46576
- setKno("");
46577
- setRemarks("");
46725
+ const tenantId = ((_window = window) === null || _window === void 0 ? void 0 : (_window$Digit = _window.Digit) === null || _window$Digit === void 0 ? void 0 : (_window$Digit$ULBServ = _window$Digit.ULBService) === null || _window$Digit$ULBServ === void 0 ? void 0 : _window$Digit$ULBServ.getCurrentTenantId()) || "dl.djb";
46726
+ const _window$Digit$Hooks$w = (_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$Digit = _window2.Digit) === null || _window2$Digit === void 0 ? void 0 : (_window2$Digit$Hooks = _window2$Digit.Hooks) === null || _window2$Digit$Hooks === void 0 ? void 0 : (_window2$Digit$Hooks$ = _window2$Digit$Hooks.ws) === null || _window2$Digit$Hooks$ === void 0 ? void 0 : _window2$Digit$Hooks$.useDueVerification(tenantId),
46727
+ checkDueVerification = _window$Digit$Hooks$w.mutateAsync;
46728
+ const _useState4 = useState(null),
46729
+ showToast = _useState4[0],
46730
+ setShowToast = _useState4[1];
46731
+ const handleAdd = function () {
46732
+ try {
46733
+ return Promise.resolve(function () {
46734
+ if (kno) {
46735
+ return _catch(function () {
46736
+ return Promise.resolve(checkDueVerification({
46737
+ DueVerification: {
46738
+ kno: kno
46739
+ }
46740
+ })).then(function (response) {
46741
+ var _response$response, _response$response$da, _response$response2, _response$response2$d, _response$response2$d2;
46742
+ if (response !== null && response !== void 0 && (_response$response = response.response) !== null && _response$response !== void 0 && (_response$response$da = _response$response.data) !== null && _response$response$da !== void 0 && _response$response$da.Errors && (response === null || response === void 0 ? void 0 : (_response$response2 = response.response) === null || _response$response2 === void 0 ? void 0 : (_response$response2$d = _response$response2.data) === null || _response$response2$d === void 0 ? void 0 : (_response$response2$d2 = _response$response2$d.Errors) === null || _response$response2$d2 === void 0 ? void 0 : _response$response2$d2.length) > 0) {
46743
+ setShowToast({
46744
+ isError: true,
46745
+ message: response.response.data.Errors[0].message || t("CS_SOMETHING_WENT_WRONG")
46746
+ });
46747
+ return;
46748
+ }
46749
+ const dueVerifications = Array.isArray(response) ? response : (response === null || response === void 0 ? void 0 : response.DueVerifications) || (response === null || response === void 0 ? void 0 : response.dueVerifications) || (response === null || response === void 0 ? void 0 : response.dueVerification) || [];
46750
+ if (dueVerifications && dueVerifications.length > 0) {
46751
+ const newEntries = dueVerifications.map(dueVerificationData => ({
46752
+ kno: dueVerificationData.kno || kno,
46753
+ fullName: dueVerificationData.fullName || "NA",
46754
+ fullAddress: dueVerificationData.fullAddress || "NA",
46755
+ dueAmount: dueVerificationData.dueAmount || "0",
46756
+ totalAmount: dueVerificationData.totalAmount || "0",
46757
+ remarks: dueVerificationData.remarks || remarks
46758
+ }));
46759
+ const newTableData = [...tableData, ...newEntries];
46760
+ setTableData(newTableData);
46761
+ if (applicationData) {
46762
+ applicationData.dueVerification = newTableData;
46763
+ }
46764
+ setKno("");
46765
+ setRemarks("");
46766
+ } else {
46767
+ var _response$Errors, _response$Errors$;
46768
+ setShowToast({
46769
+ isError: true,
46770
+ message: (response === null || response === void 0 ? void 0 : (_response$Errors = response.Errors) === null || _response$Errors === void 0 ? void 0 : (_response$Errors$ = _response$Errors[0]) === null || _response$Errors$ === void 0 ? void 0 : _response$Errors$.message) || t("CS_NO_DATA_FOUND") || "No data found for this K No."
46771
+ });
46772
+ }
46773
+ });
46774
+ }, function (error) {
46775
+ var _error$response, _error$response$data, _error$response$data$, _error$response$data$2;
46776
+ console.error("Error fetching due verification data:", error);
46777
+ setShowToast({
46778
+ isError: true,
46779
+ message: (error === null || error === void 0 ? void 0 : (_error$response = error.response) === null || _error$response === void 0 ? void 0 : (_error$response$data = _error$response.data) === null || _error$response$data === void 0 ? void 0 : (_error$response$data$ = _error$response$data.Errors) === null || _error$response$data$ === void 0 ? void 0 : (_error$response$data$2 = _error$response$data$[0]) === null || _error$response$data$2 === void 0 ? void 0 : _error$response$data$2.message) || (error === null || error === void 0 ? void 0 : error.message) || t("CS_SOMETHING_WENT_WRONG") || "Something went wrong."
46780
+ });
46781
+ });
46782
+ }
46783
+ }());
46784
+ } catch (e) {
46785
+ return Promise.reject(e);
46578
46786
  }
46579
46787
  };
46580
46788
  return /*#__PURE__*/React.createElement("div", {
@@ -46610,7 +46818,7 @@ const DueVerification = _ref => {
46610
46818
  color: "red"
46611
46819
  }
46612
46820
  }, "*")), /*#__PURE__*/React.createElement(TextInput, {
46613
- type: "number",
46821
+ type: "text",
46614
46822
  value: kno,
46615
46823
  onChange: e => setKno(e.target.value),
46616
46824
  style: {
@@ -46647,7 +46855,12 @@ const DueVerification = _ref => {
46647
46855
  isPaginationRequired: true,
46648
46856
  data: tableData,
46649
46857
  columns: columns
46650
- })));
46858
+ })), showToast && /*#__PURE__*/React.createElement(Toast, {
46859
+ error: showToast.isError,
46860
+ label: showToast.message,
46861
+ onClose: () => setShowToast(null),
46862
+ isDleteBtn: true
46863
+ }));
46651
46864
  };
46652
46865
 
46653
46866
  const InspectionInformation = _ref => {
@@ -50698,9 +50911,11 @@ const Step1_SearchConnection = _ref => {
50698
50911
  return Promise.reject(e);
50699
50912
  }
50700
50913
  };
50914
+ const isMobileView = window.innerWidth < 768;
50701
50915
  return /*#__PURE__*/React.createElement(Card, {
50702
50916
  style: {
50703
- marginBottom: "20px"
50917
+ marginBottom: "20px",
50918
+ padding: isMobileView ? "12px" : undefined
50704
50919
  }
50705
50920
  }, /*#__PURE__*/React.createElement("div", {
50706
50921
  style: {
@@ -50712,19 +50927,23 @@ const Step1_SearchConnection = _ref => {
50712
50927
  }
50713
50928
  }, /*#__PURE__*/React.createElement("span", {
50714
50929
  style: {
50715
- fontSize: "24px"
50930
+ fontSize: isMobileView ? "20px" : "24px"
50716
50931
  }
50717
50932
  }, "\uD83D\uDD0D"), /*#__PURE__*/React.createElement("h2", {
50718
50933
  style: {
50719
- fontSize: "18px",
50934
+ fontSize: isMobileView ? "16px" : "18px",
50720
50935
  fontWeight: "700",
50721
50936
  margin: 0
50722
50937
  }
50723
- }, "1. Connection Authentication")), /*#__PURE__*/React.createElement(CardText, null, "Please enter your K Number to proceed with the mutation application. An OTP will be sent to the registered mobile number."), /*#__PURE__*/React.createElement("div", {
50938
+ }, "1. Connection Authentication")), /*#__PURE__*/React.createElement(CardText, {
50939
+ style: {
50940
+ fontSize: isMobileView ? "13px" : undefined
50941
+ }
50942
+ }, "Please enter your K Number to proceed with the mutation application. An OTP will be sent to the registered mobile number."), /*#__PURE__*/React.createElement("div", {
50724
50943
  style: {
50725
50944
  marginBottom: "24px",
50726
50945
  marginTop: "16px",
50727
- padding: "16px",
50946
+ padding: isMobileView ? "12px" : "16px",
50728
50947
  backgroundColor: "#f9f9f9",
50729
50948
  borderRadius: "8px",
50730
50949
  borderLeft: "4px solid #00497e"
@@ -50736,26 +50955,26 @@ const Step1_SearchConnection = _ref => {
50736
50955
  }, /*#__PURE__*/React.createElement("div", {
50737
50956
  style: {
50738
50957
  fontWeight: "bold",
50739
- marginBottom: "8px"
50958
+ marginBottom: "8px",
50959
+ fontSize: isMobileView ? "14px" : undefined
50740
50960
  }
50741
50961
  }, "K Number / Connection ID *"), /*#__PURE__*/React.createElement(TextInput, {
50742
50962
  value: kNumber,
50743
50963
  onChange: e => setKNumber(e.target.value),
50744
50964
  placeholder: "Enter K Number",
50745
50965
  style: {
50746
- width: "100%",
50747
- maxWidth: "400px"
50966
+ width: "100%"
50748
50967
  }
50749
50968
  })), /*#__PURE__*/React.createElement("div", {
50750
50969
  style: {
50751
50970
  display: "flex",
50752
- justifyContent: "flex-end"
50971
+ justifyContent: isMobileView ? "center" : "flex-end"
50753
50972
  }
50754
50973
  }, /*#__PURE__*/React.createElement("button", {
50755
50974
  onClick: handleSendOtp,
50756
50975
  disabled: isLoading,
50757
50976
  style: {
50758
- padding: "10px 20px",
50977
+ padding: isMobileView ? "12px 16px" : "10px 20px",
50759
50978
  backgroundColor: "#00497e",
50760
50979
  color: "white",
50761
50980
  border: "none",
@@ -50763,8 +50982,9 @@ const Step1_SearchConnection = _ref => {
50763
50982
  cursor: "pointer",
50764
50983
  fontWeight: "bold",
50765
50984
  opacity: isLoading ? 0.7 : 1,
50766
- width: "100%",
50767
- maxWidth: "200px"
50985
+ width: isMobileView ? "100%" : "auto",
50986
+ maxWidth: isMobileView ? "100%" : "200px",
50987
+ fontSize: isMobileView ? "14px" : undefined
50768
50988
  }
50769
50989
  }, isLoading ? "Sending OTP..." : "Send OTP →"))), showToast && /*#__PURE__*/React.createElement(Toast, {
50770
50990
  error: showToast.key === "error",
@@ -50860,6 +51080,7 @@ const Step1_ExistingConnection = _ref => {
50860
51080
  return Promise.reject(e);
50861
51081
  }
50862
51082
  };
51083
+ const isMobileView = window.innerWidth < 768;
50863
51084
  const infoItemStyle = {
50864
51085
  display: "flex",
50865
51086
  flexDirection: "column",
@@ -50867,11 +51088,12 @@ const Step1_ExistingConnection = _ref => {
50867
51088
  };
50868
51089
  return /*#__PURE__*/React.createElement(Card, {
50869
51090
  style: {
50870
- marginBottom: "20px"
51091
+ marginBottom: "20px",
51092
+ padding: isMobileView ? "12px" : undefined
50871
51093
  }
50872
51094
  }, /*#__PURE__*/React.createElement("div", {
50873
51095
  style: {
50874
- padding: "12px 16px",
51096
+ padding: isMobileView ? "10px 12px" : "12px 16px",
50875
51097
  backgroundColor: "#fff3cd",
50876
51098
  color: "#856404",
50877
51099
  borderRadius: "8px",
@@ -50883,17 +51105,18 @@ const Step1_ExistingConnection = _ref => {
50883
51105
  }
50884
51106
  }, /*#__PURE__*/React.createElement("span", {
50885
51107
  style: {
50886
- fontSize: "18px",
51108
+ fontSize: isMobileView ? "16px" : "18px",
50887
51109
  flexShrink: 0
50888
51110
  }
50889
51111
  }, "\u2139\uFE0F"), /*#__PURE__*/React.createElement("span", {
50890
51112
  style: {
50891
51113
  fontWeight: "500",
50892
- fontSize: "14px"
51114
+ fontSize: isMobileView ? "12px" : "14px",
51115
+ lineHeight: "1.4"
50893
51116
  }
50894
51117
  }, "Name Change / Mutation is limited to changing the name of the consumer/account holder on the existing water connection. It does not constitute or imply transfer of property ownership.")), missingFields.length > 0 && /*#__PURE__*/React.createElement("div", {
50895
51118
  style: {
50896
- padding: "12px 16px",
51119
+ padding: isMobileView ? "10px 12px" : "12px 16px",
50897
51120
  backgroundColor: "#fdecea",
50898
51121
  color: "#611a15",
50899
51122
  borderRadius: "8px",
@@ -50911,7 +51134,7 @@ const Step1_ExistingConnection = _ref => {
50911
51134
  }, "\u26A0\uFE0F"), /*#__PURE__*/React.createElement("span", {
50912
51135
  style: {
50913
51136
  fontWeight: "500",
50914
- fontSize: "14px"
51137
+ fontSize: isMobileView ? "12px" : "14px"
50915
51138
  }
50916
51139
  }, "Note: Some connection details are missing (", missingFields.join(", "), "). You may need to update them during the mutation process.")), /*#__PURE__*/React.createElement("div", {
50917
51140
  style: {
@@ -50923,17 +51146,17 @@ const Step1_ExistingConnection = _ref => {
50923
51146
  }
50924
51147
  }, /*#__PURE__*/React.createElement("span", {
50925
51148
  style: {
50926
- fontSize: "22px"
51149
+ fontSize: isMobileView ? "20px" : "22px"
50927
51150
  }
50928
51151
  }, "\uD83C\uDFE2"), /*#__PURE__*/React.createElement("h2", {
50929
51152
  style: {
50930
- fontSize: "18px",
51153
+ fontSize: isMobileView ? "16px" : "18px",
50931
51154
  fontWeight: "700",
50932
51155
  margin: 0
50933
51156
  }
50934
51157
  }, "2. Existing Consumer Details")), /*#__PURE__*/React.createElement("div", {
50935
51158
  style: {
50936
- padding: "16px",
51159
+ padding: isMobileView ? "12px" : "16px",
50937
51160
  backgroundColor: "#f9f9f9",
50938
51161
  borderRadius: "8px",
50939
51162
  borderLeft: "4px solid #00497e"
@@ -50941,95 +51164,103 @@ const Step1_ExistingConnection = _ref => {
50941
51164
  }, /*#__PURE__*/React.createElement("div", {
50942
51165
  style: {
50943
51166
  display: "grid",
50944
- gridTemplateColumns: "repeat(auto-fill, minmax(150px, 1fr))",
50945
- gap: "16px"
51167
+ gridTemplateColumns: isMobileView ? "1fr 1fr" : "repeat(auto-fill, minmax(150px, 1fr))",
51168
+ gap: isMobileView ? "12px" : "16px"
50946
51169
  }
50947
51170
  }, /*#__PURE__*/React.createElement("div", {
50948
51171
  style: infoItemStyle
50949
51172
  }, /*#__PURE__*/React.createElement("div", {
50950
51173
  style: {
50951
51174
  color: "#555",
50952
- fontSize: "13px",
51175
+ fontSize: isMobileView ? "11px" : "13px",
50953
51176
  marginBottom: "4px"
50954
51177
  }
50955
51178
  }, "Connection Number"), /*#__PURE__*/React.createElement("div", {
50956
51179
  style: {
50957
51180
  fontWeight: "bold",
50958
- wordBreak: "break-all"
51181
+ wordBreak: "break-all",
51182
+ fontSize: isMobileView ? "13px" : undefined
50959
51183
  }
50960
51184
  }, connectionNo)), /*#__PURE__*/React.createElement("div", {
50961
51185
  style: infoItemStyle
50962
51186
  }, /*#__PURE__*/React.createElement("div", {
50963
51187
  style: {
50964
51188
  color: "#555",
50965
- fontSize: "13px",
51189
+ fontSize: isMobileView ? "11px" : "13px",
50966
51190
  marginBottom: "4px"
50967
51191
  }
50968
51192
  }, "Current Owner Name"), /*#__PURE__*/React.createElement("div", {
50969
51193
  style: {
50970
51194
  fontWeight: "bold",
50971
- wordBreak: "break-word"
51195
+ wordBreak: "break-word",
51196
+ fontSize: isMobileView ? "13px" : undefined
50972
51197
  }
50973
51198
  }, registeredName)), /*#__PURE__*/React.createElement("div", {
50974
- style: infoItemStyle
51199
+ style: _extends({}, infoItemStyle, {
51200
+ gridColumn: isMobileView ? "1 / -1" : undefined
51201
+ })
50975
51202
  }, /*#__PURE__*/React.createElement("div", {
50976
51203
  style: {
50977
51204
  color: "#555",
50978
- fontSize: "13px",
51205
+ fontSize: isMobileView ? "11px" : "13px",
50979
51206
  marginBottom: "4px"
50980
51207
  }
50981
51208
  }, "Property Address"), /*#__PURE__*/React.createElement("div", {
50982
51209
  style: {
50983
51210
  fontWeight: "bold",
50984
- wordBreak: "break-word"
51211
+ wordBreak: "break-word",
51212
+ fontSize: isMobileView ? "13px" : undefined
50985
51213
  }
50986
51214
  }, formattedAddress)), /*#__PURE__*/React.createElement("div", {
50987
51215
  style: infoItemStyle
50988
51216
  }, /*#__PURE__*/React.createElement("div", {
50989
51217
  style: {
50990
51218
  color: "#555",
50991
- fontSize: "13px",
51219
+ fontSize: isMobileView ? "11px" : "13px",
50992
51220
  marginBottom: "4px"
50993
51221
  }
50994
51222
  }, "Connection Status"), /*#__PURE__*/React.createElement("div", {
50995
51223
  style: {
50996
51224
  fontWeight: "bold",
50997
- color: (connectionStatus === null || connectionStatus === void 0 ? void 0 : connectionStatus.toLowerCase()) === "active" ? "#28a745" : "#dc3545"
51225
+ color: (connectionStatus === null || connectionStatus === void 0 ? void 0 : connectionStatus.toLowerCase()) === "active" ? "#28a745" : "#dc3545",
51226
+ fontSize: isMobileView ? "13px" : undefined
50998
51227
  }
50999
51228
  }, connectionStatus)), /*#__PURE__*/React.createElement("div", {
51000
51229
  style: infoItemStyle
51001
51230
  }, /*#__PURE__*/React.createElement("div", {
51002
51231
  style: {
51003
51232
  color: "#555",
51004
- fontSize: "13px",
51233
+ fontSize: isMobileView ? "11px" : "13px",
51005
51234
  marginBottom: "4px"
51006
51235
  }
51007
51236
  }, "Meter Number"), /*#__PURE__*/React.createElement("div", {
51008
51237
  style: {
51009
51238
  fontWeight: "bold",
51010
- wordBreak: "break-all"
51239
+ wordBreak: "break-all",
51240
+ fontSize: isMobileView ? "13px" : undefined
51011
51241
  }
51012
51242
  }, meterId)), /*#__PURE__*/React.createElement("div", {
51013
51243
  style: infoItemStyle
51014
51244
  }, /*#__PURE__*/React.createElement("div", {
51015
51245
  style: {
51016
51246
  color: "#555",
51017
- fontSize: "13px",
51247
+ fontSize: isMobileView ? "11px" : "13px",
51018
51248
  marginBottom: "4px"
51019
51249
  }
51020
51250
  }, "Mobile Number"), /*#__PURE__*/React.createElement("div", {
51021
51251
  style: {
51022
- fontWeight: "bold"
51252
+ fontWeight: "bold",
51253
+ fontSize: isMobileView ? "13px" : undefined
51023
51254
  }
51024
51255
  }, registeredPhone)))), /*#__PURE__*/React.createElement("div", {
51025
51256
  style: {
51026
- marginTop: "24px",
51257
+ marginTop: isMobileView ? "16px" : "24px",
51027
51258
  borderTop: "1px solid #e0e0e0",
51028
51259
  paddingTop: "16px"
51029
51260
  }
51030
51261
  }, /*#__PURE__*/React.createElement("h3", {
51031
51262
  style: {
51032
- fontSize: "16px",
51263
+ fontSize: isMobileView ? "14px" : "16px",
51033
51264
  fontWeight: "bold",
51034
51265
  marginBottom: "16px"
51035
51266
  }
@@ -51038,29 +51269,31 @@ const Step1_ExistingConnection = _ref => {
51038
51269
  display: "flex",
51039
51270
  flexDirection: "column",
51040
51271
  gap: "8px",
51041
- maxWidth: "400px",
51042
51272
  marginBottom: "16px"
51043
51273
  }
51044
51274
  }, /*#__PURE__*/React.createElement("label", {
51045
51275
  style: {
51046
51276
  fontWeight: "500",
51047
- fontSize: "14px"
51277
+ fontSize: isMobileView ? "13px" : "14px"
51048
51278
  }
51049
51279
  }, "Enter OTP sent to +91 ", getMaskedPhone(mobileNumber), " *"), /*#__PURE__*/React.createElement(TextInput, {
51050
51280
  value: otp,
51051
51281
  onChange: e => setOtp(e.target.value.replace(/\D/g, '').slice(0, 6)),
51052
51282
  placeholder: "Enter 6-digit OTP",
51053
- maxLength: 6
51283
+ maxLength: 6,
51284
+ style: {
51285
+ width: "100%"
51286
+ }
51054
51287
  })), /*#__PURE__*/React.createElement("div", {
51055
51288
  style: {
51056
51289
  display: "flex",
51057
- justifyContent: "flex-end"
51290
+ justifyContent: isMobileView ? "center" : "flex-end"
51058
51291
  }
51059
51292
  }, /*#__PURE__*/React.createElement("button", {
51060
51293
  onClick: handleVerifyOtp,
51061
51294
  disabled: isLoading || otp.length < 6,
51062
51295
  style: {
51063
- padding: "10px 20px",
51296
+ padding: isMobileView ? "12px 16px" : "10px 20px",
51064
51297
  backgroundColor: "#00497e",
51065
51298
  color: "white",
51066
51299
  border: "none",
@@ -51068,8 +51301,9 @@ const Step1_ExistingConnection = _ref => {
51068
51301
  cursor: isLoading || otp.length < 6 ? "not-allowed" : "pointer",
51069
51302
  fontWeight: "bold",
51070
51303
  opacity: isLoading || otp.length < 6 ? 0.5 : 1,
51071
- width: "100%",
51072
- maxWidth: "200px"
51304
+ width: isMobileView ? "100%" : "auto",
51305
+ maxWidth: isMobileView ? "100%" : "200px",
51306
+ fontSize: isMobileView ? "14px" : undefined
51073
51307
  }
51074
51308
  }, isLoading ? "Verifying..." : "Verify & Proceed →"))), showToast && /*#__PURE__*/React.createElement(Toast, {
51075
51309
  error: (showToast === null || showToast === void 0 ? void 0 : showToast.key) === "error",
@@ -51138,6 +51372,7 @@ const Step2_NewConsumerDetails = _ref => {
51138
51372
  code: "OTHER",
51139
51373
  i18nKey: "Other"
51140
51374
  }];
51375
+ const isMobileView = window.innerWidth < 768;
51141
51376
  const errorStyle = {
51142
51377
  width: "100%",
51143
51378
  marginLeft: "0px",
@@ -51186,7 +51421,8 @@ const Step2_NewConsumerDetails = _ref => {
51186
51421
  }, "*");
51187
51422
  return /*#__PURE__*/React.createElement(Card, {
51188
51423
  style: {
51189
- marginBottom: "20px"
51424
+ marginBottom: "20px",
51425
+ padding: isMobileView ? "12px" : undefined
51190
51426
  }
51191
51427
  }, /*#__PURE__*/React.createElement("div", {
51192
51428
  style: {
@@ -51198,17 +51434,17 @@ const Step2_NewConsumerDetails = _ref => {
51198
51434
  }
51199
51435
  }, /*#__PURE__*/React.createElement("span", {
51200
51436
  style: {
51201
- fontSize: "22px"
51437
+ fontSize: isMobileView ? "20px" : "22px"
51202
51438
  }
51203
51439
  }, "\uD83D\uDC64"), /*#__PURE__*/React.createElement("h2", {
51204
51440
  style: {
51205
- fontSize: "18px",
51441
+ fontSize: isMobileView ? "16px" : "18px",
51206
51442
  fontWeight: "700",
51207
51443
  margin: 0
51208
51444
  }
51209
51445
  }, "2. New Consumer Details.")), Object.keys(errors).length > 0 && /*#__PURE__*/React.createElement("div", {
51210
51446
  style: {
51211
- padding: "12px 16px",
51447
+ padding: isMobileView ? "10px 12px" : "12px 16px",
51212
51448
  backgroundColor: "#fdecea",
51213
51449
  color: "#611a15",
51214
51450
  borderRadius: "8px",
@@ -51226,7 +51462,7 @@ const Step2_NewConsumerDetails = _ref => {
51226
51462
  }, "\u26A0\uFE0F"), /*#__PURE__*/React.createElement("span", {
51227
51463
  style: {
51228
51464
  fontWeight: "500",
51229
- fontSize: "14px"
51465
+ fontSize: isMobileView ? "12px" : "14px"
51230
51466
  }
51231
51467
  }, "Please fill in all required fields marked with ", /*#__PURE__*/React.createElement("span", {
51232
51468
  style: {
@@ -51238,8 +51474,8 @@ const Step2_NewConsumerDetails = _ref => {
51238
51474
  }, /*#__PURE__*/React.createElement("div", {
51239
51475
  style: {
51240
51476
  display: "grid",
51241
- gridTemplateColumns: "repeat(auto-fill, minmax(240px, 1fr))",
51242
- gap: "20px",
51477
+ gridTemplateColumns: isMobileView ? "1fr" : "repeat(auto-fill, minmax(240px, 1fr))",
51478
+ gap: isMobileView ? "16px" : "20px",
51243
51479
  padding: "8px 0 16px"
51244
51480
  }
51245
51481
  }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, {
@@ -51435,13 +51671,13 @@ const Step2_NewConsumerDetails = _ref => {
51435
51671
  }, errors === null || errors === void 0 ? void 0 : (_errors$relationshipW = errors.relationshipWithExistingConsumer) === null || _errors$relationshipW === void 0 ? void 0 : _errors$relationshipW.message))), /*#__PURE__*/React.createElement("div", {
51436
51672
  style: {
51437
51673
  display: "flex",
51674
+ flexDirection: isMobileView ? "column" : "row",
51438
51675
  justifyContent: "space-between",
51439
- alignItems: "center",
51676
+ alignItems: isMobileView ? "stretch" : "center",
51440
51677
  marginTop: "24px",
51441
- flexWrap: "wrap",
51442
51678
  gap: "12px"
51443
51679
  }
51444
- }, /*#__PURE__*/React.createElement("button", {
51680
+ }, !isMobileView && /*#__PURE__*/React.createElement("button", {
51445
51681
  type: "button",
51446
51682
  onClick: onBack,
51447
51683
  style: {
@@ -51455,14 +51691,15 @@ const Step2_NewConsumerDetails = _ref => {
51455
51691
  }, "\u2190 Back"), /*#__PURE__*/React.createElement("div", {
51456
51692
  style: {
51457
51693
  display: "flex",
51458
- alignItems: "center",
51459
- gap: "12px",
51460
- flexWrap: "wrap"
51694
+ flexDirection: isMobileView ? "column" : "row",
51695
+ alignItems: isMobileView ? "stretch" : "center",
51696
+ gap: "12px"
51461
51697
  }
51462
51698
  }, /*#__PURE__*/React.createElement("span", {
51463
51699
  style: {
51464
51700
  fontSize: "12px",
51465
- color: "#999"
51701
+ color: "#999",
51702
+ textAlign: isMobileView ? "center" : undefined
51466
51703
  }
51467
51704
  }, "Fields marked with ", /*#__PURE__*/React.createElement("span", {
51468
51705
  style: {
@@ -51471,15 +51708,30 @@ const Step2_NewConsumerDetails = _ref => {
51471
51708
  }, "*"), " are mandatory"), /*#__PURE__*/React.createElement("button", {
51472
51709
  type: "submit",
51473
51710
  style: {
51474
- padding: "10px 20px",
51711
+ padding: isMobileView ? "14px 20px" : "10px 20px",
51475
51712
  backgroundColor: "#00497e",
51476
51713
  color: "white",
51477
51714
  border: "none",
51478
51715
  borderRadius: "4px",
51479
51716
  cursor: "pointer",
51480
- fontWeight: "bold"
51717
+ fontWeight: "bold",
51718
+ width: isMobileView ? "100%" : "auto",
51719
+ fontSize: isMobileView ? "14px" : undefined
51720
+ }
51721
+ }, "Save & Proceed to Documents \u2192")), isMobileView && /*#__PURE__*/React.createElement("button", {
51722
+ type: "button",
51723
+ onClick: onBack,
51724
+ style: {
51725
+ padding: "12px 20px",
51726
+ backgroundColor: "#e0e0e0",
51727
+ border: "none",
51728
+ borderRadius: "4px",
51729
+ cursor: "pointer",
51730
+ fontWeight: "bold",
51731
+ width: "100%",
51732
+ fontSize: "14px"
51481
51733
  }
51482
- }, "Save & Proceed to Documents \u2192")))), showToast && /*#__PURE__*/React.createElement(Toast, {
51734
+ }, "\u2190 Back"))), showToast && /*#__PURE__*/React.createElement(Toast, {
51483
51735
  error: showToast.key === "error",
51484
51736
  warning: showToast.key === "warning",
51485
51737
  label: t(showToast.message),
@@ -51763,6 +52015,7 @@ const Step3_UploadDocuments = _ref => {
51763
52015
  marginTop: "8px",
51764
52016
  transition: "all 0.2s ease"
51765
52017
  });
52018
+ const isMobileView = window.innerWidth < 768;
51766
52019
  const errorTextStyle = {
51767
52020
  fontSize: "12px",
51768
52021
  color: "#d32f2f",
@@ -51783,7 +52036,8 @@ const Step3_UploadDocuments = _ref => {
51783
52036
  const errorCount = Object.keys(fieldErrors).length;
51784
52037
  return /*#__PURE__*/React.createElement(Card, {
51785
52038
  style: {
51786
- marginBottom: "20px"
52039
+ marginBottom: "20px",
52040
+ padding: isMobileView ? "12px" : undefined
51787
52041
  }
51788
52042
  }, /*#__PURE__*/React.createElement("div", {
51789
52043
  style: {
@@ -51793,23 +52047,24 @@ const Step3_UploadDocuments = _ref => {
51793
52047
  }
51794
52048
  }, /*#__PURE__*/React.createElement("span", {
51795
52049
  style: {
51796
- fontSize: "24px",
52050
+ fontSize: isMobileView ? "20px" : "24px",
51797
52051
  marginRight: "8px"
51798
52052
  }
51799
52053
  }, "\uD83D\uDCC4"), /*#__PURE__*/React.createElement("h2", {
51800
52054
  style: {
51801
- fontSize: "20px",
52055
+ fontSize: isMobileView ? "16px" : "20px",
51802
52056
  fontWeight: "700",
51803
52057
  margin: 0
51804
52058
  }
51805
52059
  }, "3. Upload Verification Documents")), /*#__PURE__*/React.createElement("p", {
51806
52060
  style: {
51807
52061
  color: "#666",
51808
- marginBottom: "20px"
52062
+ marginBottom: "20px",
52063
+ fontSize: isMobileView ? "12px" : undefined
51809
52064
  }
51810
52065
  }, "Please upload legible scanned copies or photos (PDF, PNG, JPEG - Max 5MB)."), hasAttemptedSubmit && errorCount > 0 && /*#__PURE__*/React.createElement("div", {
51811
52066
  style: {
51812
- padding: "12px 16px",
52067
+ padding: isMobileView ? "10px 12px" : "12px 16px",
51813
52068
  backgroundColor: "#fdecea",
51814
52069
  color: "#611a15",
51815
52070
  borderRadius: "8px",
@@ -51827,13 +52082,13 @@ const Step3_UploadDocuments = _ref => {
51827
52082
  }, "\u26A0\uFE0F"), /*#__PURE__*/React.createElement("span", {
51828
52083
  style: {
51829
52084
  fontWeight: "500",
51830
- fontSize: "14px"
52085
+ fontSize: isMobileView ? "12px" : "14px"
51831
52086
  }
51832
52087
  }, errorCount, " required item", errorCount > 1 ? "s" : "", " still need", errorCount === 1 ? "s" : "", " your attention before proceeding.")), /*#__PURE__*/React.createElement("div", {
51833
52088
  style: {
51834
52089
  display: "grid",
51835
- gridTemplateColumns: "repeat(auto-fill, minmax(280px, 1fr))",
51836
- gap: "24px"
52090
+ gridTemplateColumns: isMobileView ? "1fr" : "repeat(auto-fill, minmax(280px, 1fr))",
52091
+ gap: isMobileView ? "20px" : "24px"
51837
52092
  }
51838
52093
  }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, {
51839
52094
  style: {
@@ -52008,13 +52263,13 @@ const Step3_UploadDocuments = _ref => {
52008
52263
  }, "\uD83D\uDCC4"), " View ", mutationFileName)))), /*#__PURE__*/React.createElement("div", {
52009
52264
  style: {
52010
52265
  display: "flex",
52266
+ flexDirection: isMobileView ? "column" : "row",
52011
52267
  justifyContent: "space-between",
52012
- alignItems: "center",
52013
- marginTop: "32px",
52014
- flexWrap: "wrap",
52268
+ alignItems: isMobileView ? "stretch" : "center",
52269
+ marginTop: isMobileView ? "24px" : "32px",
52015
52270
  gap: "12px"
52016
52271
  }
52017
- }, /*#__PURE__*/React.createElement("button", {
52272
+ }, !isMobileView && /*#__PURE__*/React.createElement("button", {
52018
52273
  type: "button",
52019
52274
  onClick: onBack,
52020
52275
  style: {
@@ -52028,29 +52283,45 @@ const Step3_UploadDocuments = _ref => {
52028
52283
  }, "\u2190 Back"), /*#__PURE__*/React.createElement("div", {
52029
52284
  style: {
52030
52285
  display: "flex",
52031
- alignItems: "center",
52032
- gap: "12px",
52033
- flexWrap: "wrap"
52286
+ flexDirection: isMobileView ? "column" : "row",
52287
+ alignItems: isMobileView ? "stretch" : "center",
52288
+ gap: "12px"
52034
52289
  }
52035
52290
  }, /*#__PURE__*/React.createElement("span", {
52036
52291
  style: {
52037
52292
  fontSize: "12px",
52038
- color: "#999"
52293
+ color: "#999",
52294
+ textAlign: isMobileView ? "center" : undefined
52039
52295
  }
52040
52296
  }, "All documents are mandatory"), /*#__PURE__*/React.createElement("button", {
52041
52297
  type: "button",
52042
52298
  onClick: onProceed,
52043
52299
  disabled: isUploading,
52044
52300
  style: {
52045
- padding: "10px 20px",
52301
+ padding: isMobileView ? "14px 20px" : "10px 20px",
52046
52302
  backgroundColor: isUploading ? "#ccc" : "#00497e",
52047
52303
  color: "white",
52048
52304
  border: "none",
52049
52305
  borderRadius: "4px",
52050
52306
  cursor: isUploading ? "not-allowed" : "pointer",
52051
- fontWeight: "bold"
52307
+ fontWeight: "bold",
52308
+ width: isMobileView ? "100%" : "auto",
52309
+ fontSize: isMobileView ? "14px" : undefined
52310
+ }
52311
+ }, isUploading ? "Uploading..." : "Proceed to Preview →")), isMobileView && /*#__PURE__*/React.createElement("button", {
52312
+ type: "button",
52313
+ onClick: onBack,
52314
+ style: {
52315
+ padding: "12px 20px",
52316
+ backgroundColor: "#e0e0e0",
52317
+ border: "none",
52318
+ borderRadius: "4px",
52319
+ cursor: "pointer",
52320
+ fontWeight: "bold",
52321
+ width: "100%",
52322
+ fontSize: "14px"
52052
52323
  }
52053
- }, isUploading ? "Uploading..." : "Proceed to Application Preview →"))), showToast && /*#__PURE__*/React.createElement(Toast, {
52324
+ }, "\u2190 Back")), showToast && /*#__PURE__*/React.createElement(Toast, {
52054
52325
  error: showToast.key === "error",
52055
52326
  warning: showToast.key === "warning",
52056
52327
  success: showToast.key === "success",
@@ -52181,24 +52452,25 @@ const Step4_Preview = _ref => {
52181
52452
  };
52182
52453
  calculateStaticFee();
52183
52454
  }, [formData]);
52455
+ const isMobileView = window.innerWidth < 768;
52184
52456
  const sectionStyle = {
52185
52457
  border: "1px solid #e0e0e0",
52186
52458
  borderRadius: "8px",
52187
- padding: "16px",
52459
+ padding: isMobileView ? "12px" : "16px",
52188
52460
  marginBottom: "16px"
52189
52461
  };
52190
52462
  const labelStyle = {
52191
52463
  color: "#666",
52192
- fontSize: "13px",
52464
+ fontSize: isMobileView ? "11px" : "13px",
52193
52465
  marginBottom: "4px"
52194
52466
  };
52195
52467
  const valueStyle = {
52196
52468
  fontWeight: "bold",
52197
- fontSize: "15px",
52469
+ fontSize: isMobileView ? "13px" : "15px",
52198
52470
  wordBreak: "break-word"
52199
52471
  };
52200
52472
  const uploadDocStatusStyle = {
52201
- fontSize: "14px",
52473
+ fontSize: isMobileView ? "12px" : "14px",
52202
52474
  fontWeight: "bold"
52203
52475
  };
52204
52476
  const infoItem = (label, value) => /*#__PURE__*/React.createElement("div", {
@@ -52212,7 +52484,8 @@ const Step4_Preview = _ref => {
52212
52484
  }, value));
52213
52485
  return /*#__PURE__*/React.createElement(Card, {
52214
52486
  style: {
52215
- marginBottom: "20px"
52487
+ marginBottom: "20px",
52488
+ padding: isMobileView ? "12px" : undefined
52216
52489
  }
52217
52490
  }, /*#__PURE__*/React.createElement("div", {
52218
52491
  style: {
@@ -52224,11 +52497,11 @@ const Step4_Preview = _ref => {
52224
52497
  }
52225
52498
  }, /*#__PURE__*/React.createElement("span", {
52226
52499
  style: {
52227
- fontSize: "22px"
52500
+ fontSize: isMobileView ? "20px" : "22px"
52228
52501
  }
52229
52502
  }, "\uD83D\uDCCB"), /*#__PURE__*/React.createElement("h2", {
52230
52503
  style: {
52231
- fontSize: "18px",
52504
+ fontSize: isMobileView ? "15px" : "18px",
52232
52505
  fontWeight: "700",
52233
52506
  margin: 0
52234
52507
  }
@@ -52238,7 +52511,7 @@ const Step4_Preview = _ref => {
52238
52511
  })
52239
52512
  }, /*#__PURE__*/React.createElement("h3", {
52240
52513
  style: {
52241
- fontSize: "15px",
52514
+ fontSize: isMobileView ? "13px" : "15px",
52242
52515
  fontWeight: "bold",
52243
52516
  color: "#00497e",
52244
52517
  marginBottom: "12px"
@@ -52246,8 +52519,8 @@ const Step4_Preview = _ref => {
52246
52519
  }, "Property & Connection Summary"), /*#__PURE__*/React.createElement("div", {
52247
52520
  style: {
52248
52521
  display: "grid",
52249
- gridTemplateColumns: "repeat(auto-fill, minmax(150px, 1fr))",
52250
- gap: "16px"
52522
+ gridTemplateColumns: isMobileView ? "1fr 1fr" : "repeat(auto-fill, minmax(150px, 1fr))",
52523
+ gap: isMobileView ? "12px" : "16px"
52251
52524
  }
52252
52525
  }, infoItem("Connection No", connectionNo), infoItem("Meter Number", meterId), infoItem("Property ID", propertyId))), /*#__PURE__*/React.createElement("div", {
52253
52526
  style: _extends({}, sectionStyle, {
@@ -52255,16 +52528,16 @@ const Step4_Preview = _ref => {
52255
52528
  })
52256
52529
  }, /*#__PURE__*/React.createElement("h3", {
52257
52530
  style: {
52258
- fontSize: "15px",
52531
+ fontSize: isMobileView ? "13px" : "15px",
52259
52532
  fontWeight: "bold",
52260
52533
  color: "#f29c1f",
52261
52534
  marginBottom: "12px"
52262
52535
  }
52263
- }, "\uD83D\uDD12 Existing / Previous Owner Details (Masked Information)"), /*#__PURE__*/React.createElement("div", {
52536
+ }, "\uD83D\uDD12 Existing / Previous Owner Details (Masked)"), /*#__PURE__*/React.createElement("div", {
52264
52537
  style: {
52265
52538
  display: "grid",
52266
- gridTemplateColumns: "repeat(auto-fill, minmax(150px, 1fr))",
52267
- gap: "16px",
52539
+ gridTemplateColumns: isMobileView ? "1fr" : "repeat(auto-fill, minmax(150px, 1fr))",
52540
+ gap: isMobileView ? "12px" : "16px",
52268
52541
  marginBottom: "12px"
52269
52542
  }
52270
52543
  }, infoItem("Registered Name:", oldName), infoItem("Registered Phone:", oldPhone)), infoItem("Registered Address:", oldAddress)), /*#__PURE__*/React.createElement("div", {
@@ -52273,7 +52546,7 @@ const Step4_Preview = _ref => {
52273
52546
  })
52274
52547
  }, /*#__PURE__*/React.createElement("h3", {
52275
52548
  style: {
52276
- fontSize: "15px",
52549
+ fontSize: isMobileView ? "13px" : "15px",
52277
52550
  fontWeight: "bold",
52278
52551
  color: "#00497e",
52279
52552
  marginBottom: "12px"
@@ -52281,8 +52554,8 @@ const Step4_Preview = _ref => {
52281
52554
  }, "\uD83D\uDC64 Transferee (New Owner) Summary"), /*#__PURE__*/React.createElement("div", {
52282
52555
  style: {
52283
52556
  display: "grid",
52284
- gridTemplateColumns: "repeat(auto-fill, minmax(150px, 1fr))",
52285
- gap: "16px"
52557
+ gridTemplateColumns: isMobileView ? "1fr 1fr" : "repeat(auto-fill, minmax(150px, 1fr))",
52558
+ gap: isMobileView ? "12px" : "16px"
52286
52559
  }
52287
52560
  }, infoItem("New Owner Name", proposedNewConsumerName), infoItem("Mobile Number", newOwnerMobileNumber), infoItem("Relation Type", getRelationshipName(relationshipWithExistingConsumer)), infoItem("Transfer Reason", getReasonName(reasonForNameChange)))), /*#__PURE__*/React.createElement("div", {
52288
52561
  style: _extends({}, sectionStyle, {
@@ -52290,7 +52563,7 @@ const Step4_Preview = _ref => {
52290
52563
  })
52291
52564
  }, /*#__PURE__*/React.createElement("h3", {
52292
52565
  style: {
52293
- fontSize: "15px",
52566
+ fontSize: isMobileView ? "13px" : "15px",
52294
52567
  fontWeight: "bold",
52295
52568
  color: "#17a2b8",
52296
52569
  marginBottom: "12px"
@@ -52298,8 +52571,8 @@ const Step4_Preview = _ref => {
52298
52571
  }, "Uploaded Documents"), /*#__PURE__*/React.createElement("div", {
52299
52572
  style: {
52300
52573
  display: "grid",
52301
- gridTemplateColumns: "repeat(auto-fill, minmax(150px, 1fr))",
52302
- gap: "16px"
52574
+ gridTemplateColumns: isMobileView ? "1fr" : "repeat(auto-fill, minmax(150px, 1fr))",
52575
+ gap: isMobileView ? "12px" : "16px"
52303
52576
  }
52304
52577
  }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
52305
52578
  style: labelStyle
@@ -52321,7 +52594,7 @@ const Step4_Preview = _ref => {
52321
52594
  border: "none",
52322
52595
  textDecoration: "underline",
52323
52596
  cursor: "pointer",
52324
- fontSize: "14px",
52597
+ fontSize: isMobileView ? "12px" : "14px",
52325
52598
  fontWeight: "bold",
52326
52599
  padding: 0
52327
52600
  }
@@ -52349,7 +52622,7 @@ const Step4_Preview = _ref => {
52349
52622
  border: "none",
52350
52623
  textDecoration: "underline",
52351
52624
  cursor: "pointer",
52352
- fontSize: "14px",
52625
+ fontSize: isMobileView ? "12px" : "14px",
52353
52626
  fontWeight: "bold",
52354
52627
  padding: 0
52355
52628
  }
@@ -52361,7 +52634,7 @@ const Step4_Preview = _ref => {
52361
52634
  })
52362
52635
  }, /*#__PURE__*/React.createElement("h3", {
52363
52636
  style: {
52364
- fontSize: "15px",
52637
+ fontSize: isMobileView ? "13px" : "15px",
52365
52638
  fontWeight: "bold",
52366
52639
  color: "#28a745",
52367
52640
  marginBottom: "12px"
@@ -52376,7 +52649,7 @@ const Step4_Preview = _ref => {
52376
52649
  display: "flex",
52377
52650
  justifyContent: "space-between",
52378
52651
  marginBottom: "8px",
52379
- maxWidth: "400px"
52652
+ maxWidth: isMobileView ? "100%" : "400px"
52380
52653
  }
52381
52654
  }, /*#__PURE__*/React.createElement("div", {
52382
52655
  style: labelStyle
@@ -52386,13 +52659,13 @@ const Step4_Preview = _ref => {
52386
52659
  style: {
52387
52660
  borderTop: "1px solid #c3e6cb",
52388
52661
  margin: "12px 0",
52389
- maxWidth: "400px"
52662
+ maxWidth: isMobileView ? "100%" : "400px"
52390
52663
  }
52391
52664
  })), /*#__PURE__*/React.createElement("div", {
52392
52665
  style: {
52393
52666
  display: "flex",
52394
52667
  justifyContent: "space-between",
52395
- maxWidth: "400px",
52668
+ maxWidth: isMobileView ? "100%" : "400px",
52396
52669
  flexWrap: "wrap",
52397
52670
  gap: "8px"
52398
52671
  }
@@ -52401,7 +52674,7 @@ const Step4_Preview = _ref => {
52401
52674
  }, "Total Amount Payable:"), /*#__PURE__*/React.createElement("div", {
52402
52675
  style: _extends({}, valueStyle, {
52403
52676
  color: "#28a745",
52404
- fontSize: "20px"
52677
+ fontSize: isMobileView ? "18px" : "20px"
52405
52678
  })
52406
52679
  }, "\u20B9 ", fee, ".00")), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
52407
52680
  style: labelStyle
@@ -52411,14 +52684,14 @@ const Step4_Preview = _ref => {
52411
52684
  backgroundColor: "#d1ecf1",
52412
52685
  color: "#0c5460",
52413
52686
  borderRadius: "16px",
52414
- fontSize: "12px",
52687
+ fontSize: isMobileView ? "10px" : "12px",
52415
52688
  fontWeight: "bold",
52416
52689
  display: "inline-block",
52417
52690
  marginTop: "4px"
52418
52691
  }
52419
52692
  }, "PAYABLE POST VERIFICATION")))), /*#__PURE__*/React.createElement("div", {
52420
52693
  style: {
52421
- padding: "16px",
52694
+ padding: isMobileView ? "12px" : "16px",
52422
52695
  backgroundColor: "#fffbeb",
52423
52696
  border: "1px solid #ffeeba",
52424
52697
  borderRadius: "8px",
@@ -52427,8 +52700,47 @@ const Step4_Preview = _ref => {
52427
52700
  }, /*#__PURE__*/React.createElement(CheckBox, {
52428
52701
  label: "I want to go ahead with submitting this application. I confirm that the details and information provided by me are true and correct to the best of my knowledge.",
52429
52702
  onChange: e => setAgreed(e.target.checked),
52430
- checked: agreed
52431
- })), /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement("button", {
52703
+ checked: agreed,
52704
+ style: isMobileView ? {
52705
+ fontSize: "12px"
52706
+ } : undefined
52707
+ })), isMobileView ? /*#__PURE__*/React.createElement("div", {
52708
+ style: {
52709
+ display: "flex",
52710
+ flexDirection: "column",
52711
+ gap: "12px",
52712
+ marginBottom: "16px"
52713
+ }
52714
+ }, /*#__PURE__*/React.createElement("button", {
52715
+ type: "button",
52716
+ onClick: onSubmit,
52717
+ disabled: !agreed || isLoading,
52718
+ style: {
52719
+ padding: "14px 20px",
52720
+ backgroundColor: !agreed || isLoading ? "#ccc" : "#00497e",
52721
+ color: "white",
52722
+ border: "none",
52723
+ borderRadius: "4px",
52724
+ cursor: !agreed || isLoading ? "not-allowed" : "pointer",
52725
+ fontWeight: "bold",
52726
+ fontSize: "15px",
52727
+ width: "100%",
52728
+ opacity: !agreed || isLoading ? 0.6 : 1
52729
+ }
52730
+ }, isLoading ? "Submitting..." : "Submit Mutation Application"), /*#__PURE__*/React.createElement("button", {
52731
+ type: "button",
52732
+ onClick: onBack,
52733
+ style: {
52734
+ padding: "12px 20px",
52735
+ backgroundColor: "#e0e0e0",
52736
+ border: "none",
52737
+ borderRadius: "4px",
52738
+ cursor: "pointer",
52739
+ fontWeight: "bold",
52740
+ width: "100%",
52741
+ fontSize: "14px"
52742
+ }
52743
+ }, "\u2190 Edit Information")) : /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement("button", {
52432
52744
  type: "button",
52433
52745
  onClick: onBack,
52434
52746
  style: {
@@ -52460,9 +52772,10 @@ const Step5_Submission = _ref => {
52460
52772
  const goHome = () => {
52461
52773
  history.push("/digit-ui/employee");
52462
52774
  };
52775
+ const isMobileView = window.innerWidth < 768;
52463
52776
  return /*#__PURE__*/React.createElement("div", {
52464
52777
  style: {
52465
- padding: "16px 0"
52778
+ padding: isMobileView ? "8px 0" : "16px 0"
52466
52779
  }
52467
52780
  }, /*#__PURE__*/React.createElement("div", {
52468
52781
  style: {
@@ -52470,18 +52783,18 @@ const Step5_Submission = _ref => {
52470
52783
  border: "1px solid #d4edda",
52471
52784
  borderTop: "4px solid #28a745",
52472
52785
  borderRadius: "8px",
52473
- padding: "20px",
52786
+ padding: isMobileView ? "16px" : "20px",
52474
52787
  display: "flex",
52788
+ flexDirection: isMobileView ? "column" : "row",
52475
52789
  justifyContent: "space-between",
52476
- alignItems: "flex-start",
52477
- flexWrap: "wrap",
52790
+ alignItems: isMobileView ? "stretch" : "flex-start",
52478
52791
  gap: "12px",
52479
52792
  marginBottom: "20px"
52480
52793
  }
52481
52794
  }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h2", {
52482
52795
  style: {
52483
52796
  color: "#28a745",
52484
- fontSize: "18px",
52797
+ fontSize: isMobileView ? "15px" : "18px",
52485
52798
  fontWeight: "bold",
52486
52799
  margin: "0 0 4px",
52487
52800
  display: "flex",
@@ -52489,24 +52802,28 @@ const Step5_Submission = _ref => {
52489
52802
  flexWrap: "wrap",
52490
52803
  gap: "6px"
52491
52804
  }
52492
- }, /*#__PURE__*/React.createElement("span", null, "\u2705"), " Your application has been submitted successfully to the respective Zonal Officer !"), /*#__PURE__*/React.createElement("div", {
52805
+ }, /*#__PURE__*/React.createElement("span", null, "\u2705"), " Your application has been submitted successfully to the respective Zonal Officer!"), /*#__PURE__*/React.createElement("div", {
52493
52806
  style: {
52494
52807
  color: "#666",
52495
52808
  marginTop: "4px",
52496
- fontSize: "14px",
52809
+ fontSize: isMobileView ? "13px" : "14px",
52497
52810
  wordBreak: "break-all"
52498
52811
  }
52499
52812
  }, "Your SRN Reference No. is: ", /*#__PURE__*/React.createElement("strong", {
52500
52813
  style: {
52501
52814
  color: "#00497e"
52502
52815
  }
52503
- }, applicationNumber))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
52816
+ }, applicationNumber))), /*#__PURE__*/React.createElement("div", {
52817
+ style: {
52818
+ alignSelf: isMobileView ? "flex-start" : undefined
52819
+ }
52820
+ }, /*#__PURE__*/React.createElement("span", {
52504
52821
  style: {
52505
52822
  padding: "6px 12px",
52506
52823
  backgroundColor: "#fff3cd",
52507
52824
  color: "#856404",
52508
52825
  borderRadius: "16px",
52509
- fontSize: "12px",
52826
+ fontSize: isMobileView ? "11px" : "12px",
52510
52827
  fontWeight: "bold",
52511
52828
  whiteSpace: "nowrap"
52512
52829
  }
@@ -52518,7 +52835,7 @@ const Step5_Submission = _ref => {
52518
52835
  }, /*#__PURE__*/React.createElement("button", {
52519
52836
  onClick: goHome,
52520
52837
  style: {
52521
- padding: "12px 28px",
52838
+ padding: isMobileView ? "14px 28px" : "12px 28px",
52522
52839
  backgroundColor: "#00497e",
52523
52840
  color: "white",
52524
52841
  border: "none",
@@ -52526,7 +52843,7 @@ const Step5_Submission = _ref => {
52526
52843
  cursor: "pointer",
52527
52844
  fontWeight: "bold",
52528
52845
  fontSize: "15px",
52529
- width: "100%",
52846
+ width: isMobileView ? "100%" : "auto",
52530
52847
  maxWidth: "280px"
52531
52848
  }
52532
52849
  }, "Go to Home")), showToast && /*#__PURE__*/React.createElement(Toast, {
@@ -52538,7 +52855,7 @@ const Step5_Submission = _ref => {
52538
52855
  };
52539
52856
 
52540
52857
  const MutationApplication = () => {
52541
- var _Digit$SessionStorage, _user$info, _state, _user$info2, _user$info2$userName, _user$info3, _user$info4, _details$applicationD, _applicationDetails$a, _applicationDetails$a2, _applicationDetails$a4, _applicationDetails$a7, _applicationDetails$a8;
52858
+ var _Digit$SessionStorage, _user$info, _state, _user$info2, _user$info2$userName, _user$info3, _user$info4, _details$applicationD, _applicationDetails$a, _applicationDetails$a2, _applicationDetails$a4, _applicationDetails$a8, _applicationDetails$a9;
52542
52859
  const _useTranslation = useTranslation(),
52543
52860
  t = _useTranslation.t;
52544
52861
  let _useLocation = useLocation(),
@@ -52790,7 +53107,7 @@ const MutationApplication = () => {
52790
53107
  try {
52791
53108
  setIsSubmitting(true);
52792
53109
  return Promise.resolve(_catch(function () {
52793
- var _finalData$cpt;
53110
+ var _finalData$cpt, _applicationDetails$a5, _applicationDetails$W, _applicationDetails$W2, _applicationDetails$S, _applicationDetails$S2, _details$applicationD2;
52794
53111
  let finalData = _extends({}, sessionFormData);
52795
53112
  if (!(finalData !== null && finalData !== void 0 && (_finalData$cpt = finalData.cpt) !== null && _finalData$cpt !== void 0 && _finalData$cpt.details)) {
52796
53113
  var _propertyDetails$Prop3;
@@ -52821,7 +53138,9 @@ const MutationApplication = () => {
52821
53138
  })];
52822
53139
  }
52823
53140
  const sessionDetails = sessionStorage.getItem("WS_EDIT_APPLICATION_DETAILS") ? JSON.parse(sessionStorage.getItem("WS_EDIT_APPLICATION_DETAILS")) : {};
53141
+ const existingDocs = (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a5 = applicationDetails.applicationData) === null || _applicationDetails$a5 === void 0 ? void 0 : _applicationDetails$a5.documents) || (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$W = applicationDetails.WaterConnection) === null || _applicationDetails$W === void 0 ? void 0 : (_applicationDetails$W2 = _applicationDetails$W[0]) === null || _applicationDetails$W2 === void 0 ? void 0 : _applicationDetails$W2.documents) || (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$S = applicationDetails.SewerageConnections) === null || _applicationDetails$S === void 0 ? void 0 : (_applicationDetails$S2 = _applicationDetails$S[0]) === null || _applicationDetails$S2 === void 0 ? void 0 : _applicationDetails$S2.documents) || (applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.documents) || (details === null || details === void 0 ? void 0 : (_details$applicationD2 = details.applicationData) === null || _details$applicationD2 === void 0 ? void 0 : _details$applicationD2.documents) || (details === null || details === void 0 ? void 0 : details.documents) || [];
52824
53142
  return Promise.resolve(convertModifyApplicationDetails(finalData, sessionDetails, "INITIATE")).then(function (convertAppData) {
53143
+ var _convertAppData$docum;
52825
53144
  if (!convertAppData.dateEffectiveFrom) {
52826
53145
  convertAppData.dateEffectiveFrom = Date.now() + 86400000;
52827
53146
  }
@@ -52862,16 +53181,22 @@ const MutationApplication = () => {
52862
53181
  convertAppData.additionalDetails.identityProofDocumentId = mutDetails.identityProofDocumentId || "";
52863
53182
  }
52864
53183
  }
53184
+ if ((convertAppData === null || convertAppData === void 0 ? void 0 : (_convertAppData$docum = convertAppData.documents) === null || _convertAppData$docum === void 0 ? void 0 : _convertAppData$docum.length) > 0 && existingDocs.length > 0) {
53185
+ convertAppData.documents = mapExistingDocIdsToPayload(convertAppData.documents, existingDocs);
53186
+ }
52865
53187
  convertAppData.applicationType = resolvedServiceType === "WATER" ? "MUTATION_WATER_CONNECTION" : "MUTATION_SEWERAGE_CONNECTION";
52866
53188
  if (isEditFlow) {
52867
- var _applicationDetails$a5, _applicationDetails$a6, _Digit, _Digit$Customizations, _Digit$Customizations2;
53189
+ var _applicationDetails$a6, _applicationDetails$a7, _updatePayload, _updatePayload$docume, _Digit, _Digit$Customizations, _Digit$Customizations2;
52868
53190
  let updatePayload = _extends({}, convertAppData, {
52869
- id: applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a5 = applicationDetails.applicationData) === null || _applicationDetails$a5 === void 0 ? void 0 : _applicationDetails$a5.id,
53191
+ id: applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a6 = applicationDetails.applicationData) === null || _applicationDetails$a6 === void 0 ? void 0 : _applicationDetails$a6.id,
52870
53192
  applicationNo: editApplicationNumber,
52871
- processInstance: _extends({}, applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a6 = applicationDetails.applicationData) === null || _applicationDetails$a6 === void 0 ? void 0 : _applicationDetails$a6.processInstance, convertAppData === null || convertAppData === void 0 ? void 0 : convertAppData.processInstance, {
53193
+ processInstance: _extends({}, applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a7 = applicationDetails.applicationData) === null || _applicationDetails$a7 === void 0 ? void 0 : _applicationDetails$a7.processInstance, convertAppData === null || convertAppData === void 0 ? void 0 : convertAppData.processInstance, {
52872
53194
  action: "RESUBMIT_APPLICATION"
52873
53195
  })
52874
53196
  });
53197
+ if (((_updatePayload = updatePayload) === null || _updatePayload === void 0 ? void 0 : (_updatePayload$docume = _updatePayload.documents) === null || _updatePayload$docume === void 0 ? void 0 : _updatePayload$docume.length) > 0 && existingDocs.length > 0) {
53198
+ updatePayload.documents = mapExistingDocIdsToPayload(updatePayload.documents, existingDocs);
53199
+ }
52875
53200
  if ((_Digit = Digit) !== null && _Digit !== void 0 && (_Digit$Customizations = _Digit.Customizations) !== null && _Digit$Customizations !== void 0 && (_Digit$Customizations2 = _Digit$Customizations.WS) !== null && _Digit$Customizations2 !== void 0 && _Digit$Customizations2.customiseUpdatePayloadOfWS) {
52876
53201
  updatePayload = Digit.Customizations.WS.customiseUpdatePayloadOfWS((applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData) || {}, updatePayload, resolvedServiceType);
52877
53202
  }
@@ -52961,7 +53286,7 @@ const MutationApplication = () => {
52961
53286
  message: data.Errors[0].message || "Failed to submit application"
52962
53287
  });
52963
53288
  } else {
52964
- var _data$WaterConnection, _data$SewerageConnect, _Digit2, _Digit2$Customization, _Digit2$Customization2;
53289
+ var _data$WaterConnection, _data$SewerageConnect, _updatePayload2, _updatePayload2$docum, _Digit2, _Digit2$Customization, _Digit2$Customization2;
52965
53290
  const updateMutation = resolvedServiceType === "WATER" ? waterUpdateMutation : sewerageUpdateMutation;
52966
53291
  const createdConnection = resolvedServiceType === "WATER" ? data === null || data === void 0 ? void 0 : (_data$WaterConnection = data.WaterConnection) === null || _data$WaterConnection === void 0 ? void 0 : _data$WaterConnection[0] : data === null || data === void 0 ? void 0 : (_data$SewerageConnect = data.SewerageConnections) === null || _data$SewerageConnect === void 0 ? void 0 : _data$SewerageConnect[0];
52967
53292
  let updatePayload = _extends({}, createdConnection, {
@@ -52970,6 +53295,10 @@ const MutationApplication = () => {
52970
53295
  action: "APPLY_MUTATION"
52971
53296
  })
52972
53297
  });
53298
+ const combinedExistingDocs = [...existingDocs, ...((createdConnection === null || createdConnection === void 0 ? void 0 : createdConnection.documents) || [])];
53299
+ if (((_updatePayload2 = updatePayload) === null || _updatePayload2 === void 0 ? void 0 : (_updatePayload2$docum = _updatePayload2.documents) === null || _updatePayload2$docum === void 0 ? void 0 : _updatePayload2$docum.length) > 0 && combinedExistingDocs.length > 0) {
53300
+ updatePayload.documents = mapExistingDocIdsToPayload(updatePayload.documents, combinedExistingDocs);
53301
+ }
52973
53302
  if ((_Digit2 = Digit) !== null && _Digit2 !== void 0 && (_Digit2$Customization = _Digit2.Customizations) !== null && _Digit2$Customization !== void 0 && (_Digit2$Customization2 = _Digit2$Customization.WS) !== null && _Digit2$Customization2 !== void 0 && _Digit2$Customization2.customiseUpdatePayloadOfWS) {
52974
53303
  updatePayload = Digit.Customizations.WS.customiseUpdatePayloadOfWS(createdConnection, updatePayload, resolvedServiceType);
52975
53304
  }
@@ -53091,7 +53420,7 @@ const MutationApplication = () => {
53091
53420
  }
53092
53421
  }, currentStep === 1 && /*#__PURE__*/React.createElement(Step1_SearchConnection, {
53093
53422
  t: t,
53094
- defaultKNumber: isEditFlow ? applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a7 = applicationDetails.applicationData) === null || _applicationDetails$a7 === void 0 ? void 0 : _applicationDetails$a7.connectionNo : "",
53423
+ defaultKNumber: isEditFlow ? applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a8 = applicationDetails.applicationData) === null || _applicationDetails$a8 === void 0 ? void 0 : _applicationDetails$a8.connectionNo : "",
53095
53424
  onNext: _ref => {
53096
53425
  let kNumber = _ref.kNumber,
53097
53426
  mobileNumber = _ref.mobileNumber,
@@ -53105,7 +53434,7 @@ const MutationApplication = () => {
53105
53434
  }), currentStep === 2 && /*#__PURE__*/React.createElement(Fragment$2, null, /*#__PURE__*/React.createElement(Step1_ExistingConnection, {
53106
53435
  t: t,
53107
53436
  applicationDetails: applicationDetails,
53108
- propertyId: applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a8 = applicationDetails.applicationData) === null || _applicationDetails$a8 === void 0 ? void 0 : _applicationDetails$a8.propertyId,
53437
+ propertyId: applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a9 = applicationDetails.applicationData) === null || _applicationDetails$a9 === void 0 ? void 0 : _applicationDetails$a9.propertyId,
53109
53438
  mobileNumber: authMobileNumber,
53110
53439
  onVerify: () => {
53111
53440
  setCompletedSteps(prev => new Set([...prev, 2]));