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

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.
@@ -531,7 +531,7 @@ const getFiles = function (filesArray, tenant) {
531
531
  };
532
532
  const createPayloadOfWS = function (data) {
533
533
  try {
534
- var _Digit$UserService$ge, _userInfo$roles, _data$cpt, _data$cpt$details, _data$cpt$details$own, _data$applicationSele, _data$ConnectionDetai, _data$ConnectionDetai2, _ref, _data$ConnectionHolde, _connectionHolder$gen, _data$cpt2, _data$cpt2$details, _data$cpt2$details$ow, _data$cpt2$details$ow2, _connectionHolder$own, _connectionHolder$rel, _data$propertyAddress, _data$applicant, _data$useDetails, _data$useDetails$gend, _data$contact, _data$applicant2, _data$applicant3, _data$applicant4, _data$contact2, _data$contact3, _data$applicationSele2, _data$applicationSele3, _data$contact4, _data$cpt3, _data$cpt4, _data$cpt4$details, _data$propertyAddress2, _data$propertyAddress3, _data$propertyAddress4, _data$cpt5, _data$cpt5$details, _data$cpt5$details$ad, _data$propertyAddress5, _data$cpt6, _data$cpt6$details, _data$cpt6$details$ad, _data$propertyAddress6, _data$cpt7, _data$cpt7$details, _data$cpt7$details$ad, _data$propertyAddress7, _data$cpt8, _data$cpt8$details, _data$cpt8$details$ad, _data$propertyAddress8, _data$cpt9, _data$cpt9$details, _data$cpt9$details$ad, _data$propertyAddress9, _data$cpt0, _data$cpt0$details, _data$cpt0$details$ad, _data$propertyAddress0, _data$cpt1, _data$cpt1$details, _data$cpt1$details$ad, _data$propertyAddress1, _data$cpt10, _data$cpt10$details, _data$cpt10$details$a, _data$propertyAddress10, _data$cpt11, _data$cpt11$details, _data$cpt11$details$a, _data$cpt12, _data$cpt12$details, _data$cpt12$details$a, _data$propertyAddress11, _data$cpt13, _data$cpt13$details, _data$cpt13$details$a, _data$cpt13$details$a2, _data$propertyAddress12, _data$cpt14, _data$cpt14$details, _data$cpt14$details$a, _data$cpt14$details$a2, _data$propertyAddress13, _data$cpt15, _data$cpt15$details, _data$cpt15$details$a, _data$cpt15$details$a2, _data$cpt16, _data$cpt16$details, _data$roadCuttingDeta, _data$plumberDetails, _data$zro, _data$propertyAddress14, _data$propertyAddress15, _data$cpt17, _data$cpt17$details, _data$cpt17$details$a, _data$cpt17$details$a2, _data$plumberDetails2, _data$plumberDetails3, _data$plumberDetails4, _data$plumberDetails5, _data$plumberDetails6, _data$applicationSele4, _data$applicationSele5, _data$applicationSele6, _data$applicationSele7, _connectionDetailsObj, _useDetailsObject$cat, _data$applicationSele8, _data$applicationSele9, _connectionHolder$own2, _useDetailsObject$noO, _data$applicationSele0, _data$applicationSele1, _data$applicationSele10, _data$applicationSele11, _data$applicationSele12, _data$applicationSele13, _data$applicationSele14, _data$applicationSele15, _data$applicationSele16, _data$applicationSele17, _data$applicationSele18, _data$applicationSele19, _data$applicationSele20, _data$applicationSele21, _data$applicationSele22, _data$applicationSele23, _data$applicationSele24, _data$contact5, _data$documents, _data$documents2, _data$documents3, _data$documents4, _data$documents5, _data$cpt18, _Digit, _Digit$Customizations, _Digit$Customizations2, _Digit2, _Digit2$Customization, _Digit2$Customization2;
534
+ var _Digit$UserService$ge, _userInfo$roles, _data$cpt, _data$cpt$details, _data$cpt$details$own, _data$applicationSele, _data$ConnectionDetai, _data$ConnectionDetai2, _ref, _data$ConnectionHolde, _data$documents, _data$djbEmployee, _data$governmentEmplo, _connectionHolder$gen, _data$cpt2, _data$cpt2$details, _data$cpt2$details$ow, _data$cpt2$details$ow2, _connectionHolder$own, _connectionHolder$rel, _data$propertyAddress, _data$applicant, _data$useDetails, _data$useDetails$gend, _data$contact, _data$applicant2, _data$applicant3, _data$applicant4, _data$contact2, _data$contact3, _data$applicationSele2, _data$applicationSele3, _data$contact4, _data$cpt3, _data$cpt4, _data$cpt4$details, _data$propertyAddress2, _data$propertyAddress3, _data$propertyAddress4, _data$cpt5, _data$cpt5$details, _data$cpt5$details$ad, _data$propertyAddress5, _data$cpt6, _data$cpt6$details, _data$cpt6$details$ad, _data$propertyAddress6, _data$cpt7, _data$cpt7$details, _data$cpt7$details$ad, _data$propertyAddress7, _data$cpt8, _data$cpt8$details, _data$cpt8$details$ad, _data$propertyAddress8, _data$cpt9, _data$cpt9$details, _data$cpt9$details$ad, _data$propertyAddress9, _data$cpt0, _data$cpt0$details, _data$cpt0$details$ad, _data$propertyAddress0, _data$cpt1, _data$cpt1$details, _data$cpt1$details$ad, _data$propertyAddress1, _data$cpt10, _data$cpt10$details, _data$cpt10$details$a, _data$propertyAddress10, _data$cpt11, _data$cpt11$details, _data$cpt11$details$a, _data$cpt12, _data$cpt12$details, _data$cpt12$details$a, _data$propertyAddress11, _data$cpt13, _data$cpt13$details, _data$cpt13$details$a, _data$cpt13$details$a2, _data$propertyAddress12, _data$cpt14, _data$cpt14$details, _data$cpt14$details$a, _data$cpt14$details$a2, _data$propertyAddress13, _data$cpt15, _data$cpt15$details, _data$cpt15$details$a, _data$cpt15$details$a2, _data$cpt16, _data$cpt16$details, _data$roadCuttingDeta, _data$plumberDetails, _data$djbEmployee4, _data$djbEmployee4$do, _data$djbEmployee5, _data$zro, _data$propertyAddress14, _data$propertyAddress15, _data$cpt17, _data$cpt17$details, _data$cpt17$details$a, _data$cpt17$details$a2, _data$plumberDetails2, _data$plumberDetails3, _data$plumberDetails4, _data$plumberDetails5, _data$plumberDetails6, _data$applicationSele4, _data$applicationSele5, _data$applicationSele6, _data$applicationSele7, _connectionDetailsObj, _useDetailsObject$cat, _data$applicationSele8, _data$applicationSele9, _connectionHolder$own2, _useDetailsObject$noO, _data$applicationSele0, _data$applicationSele1, _data$applicationSele10, _data$applicationSele11, _data$applicationSele12, _data$applicationSele13, _data$applicationSele14, _data$applicationSele15, _data$applicationSele16, _data$applicationSele17, _data$applicationSele18, _data$applicationSele19, _data$applicationSele20, _data$applicationSele21, _data$applicationSele22, _data$applicationSele23, _data$applicationSele24, _data$contact5, _data$documents2, _data$documents3, _data$documents4, _data$documents5, _data$cpt18, _Digit, _Digit$Customizations, _Digit$Customizations2, _Digit2, _Digit2$Customization, _Digit2$Customization2;
535
535
  const userInfo = (_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info;
536
536
  const isCitizen = (userInfo === null || userInfo === void 0 ? void 0 : userInfo.type) === "CITIZEN" || (userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$roles = userInfo.roles) === null || _userInfo$roles === void 0 ? void 0 : _userInfo$roles.some(role => role.code === "CITIZEN"));
537
537
  data === null || data === void 0 ? void 0 : (_data$cpt = data.cpt) === null || _data$cpt === void 0 ? void 0 : (_data$cpt$details = _data$cpt.details) === null || _data$cpt$details === void 0 ? void 0 : (_data$cpt$details$own = _data$cpt$details.owners) === null || _data$cpt$details$own === void 0 ? void 0 : _data$cpt$details$own.forEach(owner => {
@@ -546,6 +546,25 @@ const createPayloadOfWS = function (data) {
546
546
  const connectionDetailsObject = connectionDetail;
547
547
  const useDetailsObject = (data === null || data === void 0 ? void 0 : data.useDetails) || connectionDetailsObject || {};
548
548
  const connectionHolder = (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde = data.ConnectionHolderDetails) === null || _data$ConnectionHolde === void 0 ? void 0 : _data$ConnectionHolde[0]) || (data === null || data === void 0 ? void 0 : data.ConnectionHolderDetails);
549
+ let allDocuments = Array.isArray(data === null || data === void 0 ? void 0 : (_data$documents = data.documents) === null || _data$documents === void 0 ? void 0 : _data$documents.documents) ? [...data.documents.documents] : Array.isArray(data === null || data === void 0 ? void 0 : data.documents) ? [...data.documents] : [];
550
+ if (data !== null && data !== void 0 && (_data$djbEmployee = data.djbEmployee) !== null && _data$djbEmployee !== void 0 && _data$djbEmployee.document) {
551
+ var _data$djbEmployee2, _data$djbEmployee2$do, _data$djbEmployee3;
552
+ allDocuments.push({
553
+ documentType: "OWNER.DJB_EMPLOYEE_ID",
554
+ fileStoreId: (data === null || data === void 0 ? void 0 : (_data$djbEmployee2 = data.djbEmployee) === null || _data$djbEmployee2 === void 0 ? void 0 : (_data$djbEmployee2$do = _data$djbEmployee2.document) === null || _data$djbEmployee2$do === void 0 ? void 0 : _data$djbEmployee2$do.fileStoreId) || (data === null || data === void 0 ? void 0 : (_data$djbEmployee3 = data.djbEmployee) === null || _data$djbEmployee3 === void 0 ? void 0 : _data$djbEmployee3.document),
555
+ documentUid: "",
556
+ status: "ACTIVE"
557
+ });
558
+ }
559
+ if (data !== null && data !== void 0 && (_data$governmentEmplo = data.governmentEmployee) !== null && _data$governmentEmplo !== void 0 && _data$governmentEmplo.organizationDocument) {
560
+ var _data$governmentEmplo2, _data$governmentEmplo3, _data$governmentEmplo4;
561
+ allDocuments.push({
562
+ documentType: "OWNER.GOVERNMENT_EMPLOYEE_ID",
563
+ fileStoreId: (data === null || data === void 0 ? void 0 : (_data$governmentEmplo2 = data.governmentEmployee) === null || _data$governmentEmplo2 === void 0 ? void 0 : (_data$governmentEmplo3 = _data$governmentEmplo2.organizationDocument) === null || _data$governmentEmplo3 === void 0 ? void 0 : _data$governmentEmplo3.fileStoreId) || (data === null || data === void 0 ? void 0 : (_data$governmentEmplo4 = data.governmentEmployee) === null || _data$governmentEmplo4 === void 0 ? void 0 : _data$governmentEmplo4.organizationDocument),
564
+ documentUid: "",
565
+ status: "ACTIVE"
566
+ });
567
+ }
549
568
  let payload = {
550
569
  water: !!isWater,
551
570
  sewerage: !!isSewerage,
@@ -623,7 +642,9 @@ const createPayloadOfWS = function (data) {
623
642
  name: details === null || details === void 0 ? void 0 : details.plumberName,
624
643
  mobileNumber: details === null || details === void 0 ? void 0 : details.plumberMobileNo
625
644
  })),
626
- additionalDetails: _extends({}, useDetailsObject, data === null || data === void 0 ? void 0 : data.djbEmployee, data === null || data === void 0 ? void 0 : data.bankDetails, data === null || data === void 0 ? void 0 : data.declarationData, data === null || data === void 0 ? void 0 : data.declaration, {
645
+ additionalDetails: _extends({}, useDetailsObject, data === null || data === void 0 ? void 0 : data.djbEmployee, {
646
+ document: (data === null || data === void 0 ? void 0 : (_data$djbEmployee4 = data.djbEmployee) === null || _data$djbEmployee4 === void 0 ? void 0 : (_data$djbEmployee4$do = _data$djbEmployee4.document) === null || _data$djbEmployee4$do === void 0 ? void 0 : _data$djbEmployee4$do.fileStoreId) || (data === null || data === void 0 ? void 0 : (_data$djbEmployee5 = data.djbEmployee) === null || _data$djbEmployee5 === void 0 ? void 0 : _data$djbEmployee5.document) || undefined
647
+ }, data === null || data === void 0 ? void 0 : data.bankDetails, data === null || data === void 0 ? void 0 : data.declarationData, data === null || data === void 0 ? void 0 : data.declaration, {
627
648
  zro: (data === null || data === void 0 ? void 0 : (_data$zro = data.zro) === null || _data$zro === void 0 ? void 0 : _data$zro.code) || (data === null || data === void 0 ? void 0 : data.zro),
628
649
  locality: (data === null || data === void 0 ? void 0 : (_data$propertyAddress14 = data.propertyAddress) === null || _data$propertyAddress14 === void 0 ? void 0 : (_data$propertyAddress15 = _data$propertyAddress14.locality) === null || _data$propertyAddress15 === void 0 ? void 0 : _data$propertyAddress15.code) || (data === null || data === void 0 ? void 0 : (_data$cpt17 = data.cpt) === null || _data$cpt17 === void 0 ? void 0 : (_data$cpt17$details = _data$cpt17.details) === null || _data$cpt17$details === void 0 ? void 0 : (_data$cpt17$details$a = _data$cpt17$details.address) === null || _data$cpt17$details$a === void 0 ? void 0 : (_data$cpt17$details$a2 = _data$cpt17$details$a.locality) === null || _data$cpt17$details$a2 === void 0 ? void 0 : _data$cpt17$details$a2.code),
629
650
  detailsProvidedBy: (data === null || data === void 0 ? void 0 : (_data$plumberDetails2 = data.plumberDetails) === null || _data$plumberDetails2 === void 0 ? void 0 : (_data$plumberDetails3 = _data$plumberDetails2[0]) === null || _data$plumberDetails3 === void 0 ? void 0 : (_data$plumberDetails4 = _data$plumberDetails3.detailsProvidedBy) === null || _data$plumberDetails4 === void 0 ? void 0 : _data$plumberDetails4.code) || (data === null || data === void 0 ? void 0 : (_data$plumberDetails5 = data.plumberDetails) === null || _data$plumberDetails5 === void 0 ? void 0 : (_data$plumberDetails6 = _data$plumberDetails5[0]) === null || _data$plumberDetails6 === void 0 ? void 0 : _data$plumberDetails6.detailsProvidedBy) || "",
@@ -642,13 +663,13 @@ const createPayloadOfWS = function (data) {
642
663
  departmentType: data === null || data === void 0 ? void 0 : (_data$applicationSele23 = data.applicationSelection) === null || _data$applicationSele23 === void 0 ? void 0 : (_data$applicationSele24 = _data$applicationSele23.departmentType) === null || _data$applicationSele24 === void 0 ? void 0 : _data$applicationSele24.code,
643
664
  governmentEmployee: data === null || data === void 0 ? void 0 : data.governmentEmployee,
644
665
  whatsAppNumber: data === null || data === void 0 ? void 0 : (_data$contact5 = data.contact) === null || _data$contact5 === void 0 ? void 0 : _data$contact5.whatsAppNumber,
645
- identityProofNumber: data === null || data === void 0 ? void 0 : (_data$documents = data.documents) === null || _data$documents === void 0 ? void 0 : _data$documents.identityProofNumber,
646
- ownershipDocumentNumber: data === null || data === void 0 ? void 0 : (_data$documents2 = data.documents) === null || _data$documents2 === void 0 ? void 0 : _data$documents2.ownershipDocumentNumber,
647
- otherDocumentNumber: data === null || data === void 0 ? void 0 : (_data$documents3 = data.documents) === null || _data$documents3 === void 0 ? void 0 : _data$documents3.otherDocumentNumber,
666
+ identityProofNumber: data === null || data === void 0 ? void 0 : (_data$documents2 = data.documents) === null || _data$documents2 === void 0 ? void 0 : _data$documents2.identityProofNumber,
667
+ ownershipDocumentNumber: data === null || data === void 0 ? void 0 : (_data$documents3 = data.documents) === null || _data$documents3 === void 0 ? void 0 : _data$documents3.ownershipDocumentNumber,
668
+ otherDocumentNumber: data === null || data === void 0 ? void 0 : (_data$documents4 = data.documents) === null || _data$documents4 === void 0 ? void 0 : _data$documents4.otherDocumentNumber,
648
669
  detailsProvidedBy: "",
649
670
  channel: isCitizen ? "CITIZEN" : "CFC_COUNTER"
650
671
  }),
651
- documents: (data === null || data === void 0 ? void 0 : (_data$documents4 = data.documents) === null || _data$documents4 === void 0 ? void 0 : _data$documents4.documents) || (data === null || data === void 0 ? void 0 : data.documents) || [],
672
+ documents: allDocuments,
652
673
  tenantId: "dl.djb",
653
674
  processInstance: {
654
675
  action: "INITIATE"
@@ -1593,19 +1614,59 @@ const convertApplicationData = function (data, serviceType, modify, editByConfig
1593
1614
  sessionStorage.setItem("WS_EDIT_APPLICATION_DETAILS", JSON.stringify(data));
1594
1615
  return payload;
1595
1616
  };
1617
+ const mapExistingDocIdsToPayload = function (uploadingDocs, existingDocs) {
1618
+ if (uploadingDocs === void 0) {
1619
+ uploadingDocs = [];
1620
+ }
1621
+ if (existingDocs === void 0) {
1622
+ existingDocs = [];
1623
+ }
1624
+ if (!Array.isArray(uploadingDocs) || uploadingDocs.length === 0) return uploadingDocs;
1625
+ if (!Array.isArray(existingDocs) || existingDocs.length === 0) return uploadingDocs;
1626
+ return uploadingDocs.map(doc => {
1627
+ if (doc !== null && doc !== void 0 && doc.id) return doc;
1628
+ const uploadType = doc === null || doc === void 0 ? void 0 : doc.documentType;
1629
+ if (!uploadType) return doc;
1630
+ const normUpload = String(uploadType).trim().toUpperCase();
1631
+ const uploadParts = normUpload.split(".");
1632
+ const uploadCode = uploadParts[uploadParts.length - 1];
1633
+ const matchedDoc = existingDocs.find(exDoc => {
1634
+ if (!(exDoc !== null && exDoc !== void 0 && exDoc.id) || !(exDoc !== null && exDoc !== void 0 && exDoc.documentType)) return false;
1635
+ const normExisting = String(exDoc.documentType).trim().toUpperCase();
1636
+ const existingParts = normExisting.split(".");
1637
+ const existingCode = existingParts[existingParts.length - 1];
1638
+ if (normExisting === normUpload) return true;
1639
+ if (existingCode === uploadCode) return true;
1640
+ if (normExisting.endsWith("." + normUpload) || normUpload.endsWith("." + normExisting)) return true;
1641
+ if (normExisting.includes(normUpload) || normUpload.includes(normExisting)) return true;
1642
+ return false;
1643
+ });
1644
+ if (matchedDoc && matchedDoc.id) {
1645
+ return _extends({}, doc, {
1646
+ id: matchedDoc.id
1647
+ });
1648
+ }
1649
+ return doc;
1650
+ });
1651
+ };
1596
1652
  const convertEditApplicationDetails = function (data, appData, actionData) {
1597
1653
  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;
1654
+ 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
1655
  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
1656
  if (owner !== null && owner !== void 0 && owner.permanentAddress) owner.correspondenceAddress = owner === null || owner === void 0 ? void 0 : owner.permanentAddress;
1601
1657
  });
1658
+ 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) || [];
1659
+ let docs = (data === null || data === void 0 ? void 0 : (_data$DocumentsRequir = data.DocumentsRequired) === null || _data$DocumentsRequir === void 0 ? void 0 : _data$DocumentsRequir.documents) || [];
1660
+ if (docs && docs.length > 0 && existingDocs && existingDocs.length > 0) {
1661
+ docs = mapExistingDocIdsToPayload(docs, existingDocs);
1662
+ }
1602
1663
  let payload = _extends({}, appData.applicationData, {
1603
1664
  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
1665
  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
1666
  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
1667
  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
1668
  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], {
1669
+ 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
1670
  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
1671
  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
1672
  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 +1685,7 @@ const convertEditApplicationDetails = function (data, appData, actionData) {
1624
1685
  action: actionData ? actionData : "RESUBMIT_APPLICATION"
1625
1686
  },
1626
1687
  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
1688
+ documents: docs
1628
1689
  });
1629
1690
  return Promise.resolve(payload);
1630
1691
  } catch (e) {
@@ -1687,13 +1748,13 @@ const convertDisonnectApplicationData = function (data, serviceType, editByConfi
1687
1748
  };
1688
1749
  const convertDisonnectEditApplicationDetails = function (data, appData, actionData) {
1689
1750
  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;
1751
+ 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
1752
  const docs = sessionStorage.getItem("DISCONNECTION_EDIT_DOCS");
1692
1753
  const docsData = docs ? JSON.parse(docs) : "";
1693
1754
  const documentsData = [];
1694
1755
  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 => {
1756
+ var _appData$applicationD4, _appData$applicationD5, _doc$, _doc$2;
1757
+ 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
1758
  var _appDoc$documentType, _appDoc$documentType$, _appDoc$documentType2, _appDoc$documentType3, _data$documentType3, _data$documentType3$s, _data$documentType4, _data$documentType4$s;
1698
1759
  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
1760
  });
@@ -1711,7 +1772,7 @@ const convertDisonnectEditApplicationDetails = function (data, appData, actionDa
1711
1772
  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
1773
  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
1774
  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
1775
+ 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
1776
  }];
1716
1777
  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
1778
  _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 +1829,15 @@ const convertModifyApplicationDetails = function (data, appData, actionData) {
1768
1829
  var _data$activationDetai5, _data$activationDetai6, _data$activationDetai7, _data$activationDetai8;
1769
1830
  function _temp9() {
1770
1831
  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;
1832
+ 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
1833
  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;
1834
+ 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) || [];
1835
+ if (formData.documents && formData.documents.length > 0 && existingDocs && existingDocs.length > 0) {
1836
+ formData.documents = mapExistingDocIdsToPayload(formData.documents, existingDocs);
1837
+ }
1773
1838
  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], {
1839
+ 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;
1840
+ 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
1841
  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
1842
  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
1843
  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 +7808,7 @@ var lodash = createCommonjsModule(function (module, exports) {
7743
7808
  });
7744
7809
 
7745
7810
  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;
7811
+ 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
7812
  let application = _ref.application;
7748
7813
  const _useTranslation = useTranslation(),
7749
7814
  t = _useTranslation.t;
@@ -7774,9 +7839,10 @@ const WSApplication = _ref => {
7774
7839
  privacy: Digit.Utils.getPrivacyObject()
7775
7840
  }),
7776
7841
  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";
7842
+ const isMutation = application === null || application === void 0 ? void 0 : (_application$applicat2 = application.applicationType) === null || _application$applicat2 === void 0 ? void 0 : _application$applicat2.includes("MUTATION");
7843
+ 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
7844
  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
7845
+ 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
7846
  };
7781
7847
  if (isLoading) {
7782
7848
  return /*#__PURE__*/React.createElement(Loader, null);
@@ -7831,8 +7897,8 @@ const WSApplication = _ref => {
7831
7897
  label: t("WS_VIEW_DETAILS_LABEL")
7832
7898
  })), (application === null || application === void 0 ? void 0 : application.applicationStatus) === "PENDING_FOR_PAYMENT" ? /*#__PURE__*/React.createElement(Link, {
7833
7899
  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),
7900
+ 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, "/", "+")),
7901
+ 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
7902
  state: {}
7837
7903
  }
7838
7904
  }, /*#__PURE__*/React.createElement("div", {
@@ -8035,15 +8101,17 @@ const WSMyApplications = () => {
8035
8101
  Header: t("MAKE_PAYMENT"),
8036
8102
  disableSortBy: true,
8037
8103
  Cell: _ref8 => {
8038
- var _application$applicat, _application$applicat2, _application$applicat3, _application$applicat4, _application$connecti, _application$connecti2, _application$property, _application$property2, _application$applicat5;
8104
+ var _application$applicat, _application$applicat2, _application$applicat3, _application$applicat4, _application$applicat5, _application$connecti, _application$property, _application$property2, _application$applicat6, _application$applicat7;
8039
8105
  let row = _ref8.row;
8040
8106
  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";
8107
+ const isMutation = application === null || application === void 0 ? void 0 : (_application$applicat = application.applicationType) === null || _application$applicat === void 0 ? void 0 : _application$applicat.includes("MUTATION");
8108
+ 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
8109
  return (application === null || application === void 0 ? void 0 : application.applicationStatus) === "PENDING_FOR_PAYMENT" ? /*#__PURE__*/React.createElement("span", {
8043
8110
  className: "link"
8044
8111
  }, /*#__PURE__*/React.createElement(Link, {
8045
8112
  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),
8113
+ 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, "/", "+")),
8114
+ 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
8115
  state: {
8048
8116
  fromMyApplications: true
8049
8117
  }
@@ -11268,7 +11336,9 @@ const App$1 = _ref2 => {
11268
11336
  component: WSEditApplicationByConfig
11269
11337
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
11270
11338
  path: path + "/disconnection-details",
11271
- component: WSGetDisconnectionDetails
11339
+ component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
11340
+ layoutClass: "action"
11341
+ }, /*#__PURE__*/React.createElement(WSGetDisconnectionDetails, null))
11272
11342
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
11273
11343
  path: path + "/water/bill-amendment/inbox",
11274
11344
  component: props => /*#__PURE__*/React.createElement(WSBillIAmendMentInbox, _extends({}, props, {
@@ -18198,6 +18268,7 @@ function SelectDocument(_ref2) {
18198
18268
  fileStoreId: uploadedFile,
18199
18269
  fileName: (file === null || file === void 0 ? void 0 : file.name) || (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.fileName) || "",
18200
18270
  documentUid: documentUid,
18271
+ documentNumber: documentUid,
18201
18272
  i18nKey: selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code,
18202
18273
  id: selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.id,
18203
18274
  status: "ACTIVE"
@@ -21112,22 +21183,18 @@ const WSDisconnectionForm = _ref => {
21112
21183
  config: config,
21113
21184
  onSelect: handleSubmit,
21114
21185
  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, {
21186
+ t: t,
21187
+ title: isReSubmit ? t("RESUBMIT_DISCONNECTION_FORM") : t("WS_APPLICATION_FORM")
21188
+ }, /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
21121
21189
  key: t("PDF_STATIC_LABEL_CONSUMER_NUMBER_LABEL"),
21122
21190
  label: "" + t("PDF_STATIC_LABEL_CONSUMER_NUMBER_LABEL"),
21123
21191
  text: applicationData === null || applicationData === void 0 ? void 0 : applicationData.connectionNo,
21124
21192
  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, {
21193
+ })), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
21194
+ className: "card-label-smaller"
21195
+ }, t("WS_DISCONNECTION_TYPE") + "*"), /*#__PURE__*/React.createElement("div", {
21196
+ className: "field"
21197
+ }, /*#__PURE__*/React.createElement(RadioButtons, {
21131
21198
  t: t,
21132
21199
  options: disconnectionTypeList,
21133
21200
  optionsKey: "i18nKey",
@@ -21142,11 +21209,8 @@ const WSDisconnectionForm = _ref => {
21142
21209
  inputStyle: isMobile ? {
21143
21210
  marginLeft: "unset"
21144
21211
  } : {}
21145
- }), /*#__PURE__*/React.createElement(CardLabel, {
21146
- className: "card-label-smaller",
21147
- style: {
21148
- display: "inline"
21149
- }
21212
+ }))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
21213
+ className: "card-label-smaller"
21150
21214
  }, t("WS_DISCONNECTION_PROPOSED_DATE") + "*", /*#__PURE__*/React.createElement("div", {
21151
21215
  className: "tooltip",
21152
21216
  style: {
@@ -21168,11 +21232,8 @@ const WSDisconnectionForm = _ref => {
21168
21232
  date: date
21169
21233
  }));
21170
21234
  }
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
- }
21235
+ }))), ((_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, {
21236
+ className: "card-label-smaller"
21176
21237
  }, t("WS_DISCONNECTION_PROPOSED_END_DATE") + "*", /*#__PURE__*/React.createElement("div", {
21177
21238
  className: "tooltip",
21178
21239
  style: {
@@ -21195,11 +21256,10 @@ const WSDisconnectionForm = _ref => {
21195
21256
  }));
21196
21257
  }
21197
21258
  }))) : "", /*#__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, {
21259
+ className: "card-label-smaller"
21260
+ }, t("WS_DISCONNECTION_REASON") + "*"), /*#__PURE__*/React.createElement("div", {
21261
+ className: "field"
21262
+ }, /*#__PURE__*/React.createElement(Dropdown, {
21203
21263
  option: disconnectionReasonList,
21204
21264
  isMandatory: false,
21205
21265
  optionKey: "i18nKey",
@@ -21212,7 +21272,14 @@ const WSDisconnectionForm = _ref => {
21212
21272
  code: "reason",
21213
21273
  value: e
21214
21274
  })
21215
- })), /*#__PURE__*/React.createElement(SubmitBar, {
21275
+ }))), /*#__PURE__*/React.createElement("div", {
21276
+ style: {
21277
+ display: "flex",
21278
+ justifyContent: "flex-end",
21279
+ width: "100%",
21280
+ gridColumn: "1 / -1"
21281
+ }
21282
+ }, /*#__PURE__*/React.createElement(SubmitBar, {
21216
21283
  label: t("CS_COMMON_NEXT"),
21217
21284
  onSubmit: () => {
21218
21285
  var _disconnectionData$ty6, _disconnectionData$ty7;
@@ -21240,11 +21307,11 @@ const WSDisconnectionForm = _ref => {
21240
21307
  }
21241
21308
  },
21242
21309
  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, {
21310
+ })), error && /*#__PURE__*/React.createElement(Toast, {
21244
21311
  error: (error === null || error === void 0 ? void 0 : error.key) === "error" ? true : false,
21245
21312
  label: t(error === null || error === void 0 ? void 0 : error.message),
21246
21313
  onClose: () => setError(null)
21247
- })))));
21314
+ }))));
21248
21315
  }
21249
21316
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(FormStep, {
21250
21317
  config: config,
@@ -22005,7 +22072,7 @@ function WSDisconnectionDocumentsForm(_ref) {
22005
22072
  t: t,
22006
22073
  config: config,
22007
22074
  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) => {
22075
+ }, wsDocs === null || wsDocs === void 0 ? void 0 : (_wsDocs$Disconnection = wsDocs.DisconnectionDocuments) === null || _wsDocs$Disconnection === void 0 ? void 0 : _wsDocs$Disconnection.map((document, index) => {
22009
22076
  return /*#__PURE__*/React.createElement(SelectDocument$2, {
22010
22077
  key: index,
22011
22078
  document: document,
@@ -22016,20 +22083,28 @@ function WSDisconnectionDocumentsForm(_ref) {
22016
22083
  documents: documents,
22017
22084
  setCheckRequiredFields: setCheckRequiredFields
22018
22085
  });
22019
- }), /*#__PURE__*/React.createElement(SubmitBar, {
22086
+ }), /*#__PURE__*/React.createElement("div", {
22087
+ style: {
22088
+ display: "flex",
22089
+ justifyContent: "flex-end",
22090
+ width: "100%",
22091
+ gridColumn: "1 / -1",
22092
+ marginTop: "1rem"
22093
+ }
22094
+ }, /*#__PURE__*/React.createElement(SubmitBar, {
22020
22095
  label: t("CS_COMMON_NEXT"),
22021
22096
  onSubmit: () => {
22022
22097
  history.push(match.path.replace("documents-upload", "check"));
22023
22098
  },
22024
22099
  disabled: documents.length < 2 ? true : false
22025
- }), error && /*#__PURE__*/React.createElement(Toast, {
22100
+ })), error && /*#__PURE__*/React.createElement(Toast, {
22026
22101
  error: (error === null || error === void 0 ? void 0 : error.key) === "error" ? true : false,
22027
22102
  label: t(error === null || error === void 0 ? void 0 : error.message),
22028
22103
  onClose: () => setError(null)
22029
22104
  })));
22030
22105
  }
22031
22106
  function SelectDocument$2(_ref2) {
22032
- var _doc$dropdownData;
22107
+ 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
22108
  let t = _ref2.t,
22034
22109
  key = _ref2.key,
22035
22110
  doc = _ref2.document,
@@ -22056,6 +22131,32 @@ function SelectDocument$2(_ref2) {
22056
22131
  const _useState6 = useState(() => (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.fileStoreId) || null),
22057
22132
  uploadedFile = _useState6[0],
22058
22133
  setUploadedFile = _useState6[1];
22134
+ 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 : ""),
22135
+ documentNumber = _useState7[0],
22136
+ setDocumentNumber = _useState7[1];
22137
+ const _useState8 = useState(null),
22138
+ docNumberError = _useState8[0],
22139
+ setDocNumberError = _useState8[1];
22140
+ const validateDocumentNumber = (value, docTypeCode, isReq, hasFile) => {
22141
+ if (!isReq && !hasFile && (!value || !value.trim())) return null;
22142
+ if (!value || !value.trim()) return t("WS_DOCUMENT_NUMBER_REQUIRED") || "Document number is required";
22143
+ const trimmed = value.trim();
22144
+ const upperCode = (docTypeCode || "").toUpperCase();
22145
+ if (upperCode.includes("AADHAAR") || upperCode.includes("AADHAR")) {
22146
+ if (!/^\d{12}$/.test(trimmed)) return t("WS_AADHAAR_VALIDATION_ERROR") || "Aadhaar number must be exactly 12 digits";
22147
+ } else if (upperCode.includes("PAN")) {
22148
+ 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";
22149
+ } else if (upperCode.includes("VOTER") || upperCode.includes("VOTERID")) {
22150
+ if (!/^[A-Z]{3}\d{7}$/.test(trimmed.toUpperCase())) return t("WS_VOTERID_VALIDATION_ERROR") || "Voter ID must be in format ABC1234567";
22151
+ } else if (upperCode.includes("DRIVING") || upperCode.includes("DRVLC")) {
22152
+ 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)";
22153
+ } else if (upperCode.includes("PASSPORT")) {
22154
+ if (!/^[A-Z]{1}\d{7}$/.test(trimmed.toUpperCase())) return t("WS_PASSPORT_VALIDATION_ERROR") || "Passport must be 8 characters (e.g. A1234567)";
22155
+ } else {
22156
+ if (trimmed.length < 3) return t("WS_DOC_NO_MIN_LENGTH") || "Document number must be at least 3 characters";
22157
+ }
22158
+ return null;
22159
+ };
22059
22160
  const handleSelectDocument = value => setSelectedDocument(value);
22060
22161
  function selectfile(e) {
22061
22162
  setFile(e.target.files[0]);
@@ -22066,18 +22167,24 @@ function SelectDocument$2(_ref2) {
22066
22167
  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
22168
  if ((uploadedFile === null || uploadedFile === void 0 ? void 0 : uploadedFile.length) === 0 || uploadedFile === null) return filteredDocumentsByDocumentType;
22068
22169
  const filteredDocumentsByFileStoreId = filteredDocumentsByDocumentType === null || filteredDocumentsByDocumentType === void 0 ? void 0 : filteredDocumentsByDocumentType.filter(item => (item === null || item === void 0 ? void 0 : item.fileStoreId) !== uploadedFile);
22170
+ const err = validateDocumentNumber(documentNumber, selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code, true, !!uploadedFile);
22171
+ setDocNumberError(err);
22172
+ if (err) {
22173
+ return filteredDocumentsByFileStoreId;
22174
+ }
22069
22175
  return [...filteredDocumentsByFileStoreId, {
22070
22176
  documentType: selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code,
22071
22177
  fileStoreId: uploadedFile,
22072
22178
  id: selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.id,
22073
22179
  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,
22180
+ documentUid: documentNumber ? documentNumber : selectedDocument !== null && selectedDocument !== void 0 && selectedDocument.documentUid ? selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.documentUid : uploadedFile,
22181
+ documentNumber: documentNumber ? documentNumber : selectedDocument !== null && selectedDocument !== void 0 && selectedDocument.documentNumber ? selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.documentNumber : "",
22075
22182
  fileName: (file === null || file === void 0 ? void 0 : file.name) || "",
22076
22183
  status: "ACTIVE"
22077
22184
  }];
22078
22185
  });
22079
22186
  }
22080
- }, [uploadedFile, selectedDocument]);
22187
+ }, [uploadedFile, selectedDocument, documentNumber]);
22081
22188
  useEffect(() => {
22082
22189
  (function () {
22083
22190
  try {
@@ -22125,27 +22232,109 @@ function SelectDocument$2(_ref2) {
22125
22232
  }, [file]);
22126
22233
  return /*#__PURE__*/React.createElement("div", {
22127
22234
  style: {
22128
- marginBottom: "24px"
22235
+ gridColumn: "span 2",
22236
+ display: "grid",
22237
+ gridTemplateColumns: "repeat(2, minmax(0, 1fr))",
22238
+ gap: "20px",
22239
+ width: "100%",
22240
+ marginBottom: "20px"
22241
+ }
22242
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, {
22243
+ className: "card-label-smaller",
22244
+ style: {
22245
+ marginBottom: "8px"
22129
22246
  }
22130
- }, /*#__PURE__*/React.createElement(CardLabel, null, t(doc === null || doc === void 0 ? void 0 : doc.i18nKey) + "*"), /*#__PURE__*/React.createElement(Dropdown, {
22247
+ }, t(doc === null || doc === void 0 ? void 0 : doc.i18nKey) + "*"), /*#__PURE__*/React.createElement(Dropdown, {
22131
22248
  t: t,
22132
22249
  isMandatory: false,
22133
22250
  option: doc === null || doc === void 0 ? void 0 : doc.dropdownData,
22134
22251
  selected: selectedDocument,
22135
22252
  optionKey: "i18nKey",
22136
22253
  select: handleSelectDocument
22137
- }), /*#__PURE__*/React.createElement(UploadFile, {
22254
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, {
22255
+ className: "card-label-smaller",
22256
+ style: {
22257
+ marginBottom: "8px"
22258
+ }
22259
+ }, t(doc === null || doc === void 0 ? void 0 : doc.i18nKey) + " Document Number"), /*#__PURE__*/React.createElement(TextInput, {
22260
+ type: "text",
22261
+ value: documentNumber,
22262
+ onChange: e => {
22263
+ var _selectedDocument$cod;
22264
+ let val = e.target.value;
22265
+ const upperCode = (selectedDocument === null || selectedDocument === void 0 ? void 0 : (_selectedDocument$cod = selectedDocument.code) === null || _selectedDocument$cod === void 0 ? void 0 : _selectedDocument$cod.toUpperCase()) || "";
22266
+ 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;
22267
+ if (val.length > maxLen) {
22268
+ val = val.substring(0, maxLen);
22269
+ }
22270
+ setDocumentNumber(val);
22271
+ setDocNumberError(null);
22272
+ },
22273
+ onBlur: () => {
22274
+ setDocNumberError(validateDocumentNumber(documentNumber, selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code, true, !!uploadedFile));
22275
+ },
22276
+ placeholder: t("WS_DOCUMENT_NO_PLACEHOLDER") || "Enter Document Number",
22277
+ style: docNumberError ? {
22278
+ border: "1px solid #d32f2f"
22279
+ } : {},
22280
+ 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
22281
+ }), docNumberError && /*#__PURE__*/React.createElement("div", {
22282
+ style: {
22283
+ fontSize: "12px",
22284
+ color: "#d32f2f",
22285
+ marginTop: "4px"
22286
+ }
22287
+ }, 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", {
22288
+ style: {
22289
+ fontSize: "11px",
22290
+ color: "#000000",
22291
+ marginTop: "4px"
22292
+ }
22293
+ }, 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", {
22294
+ style: {
22295
+ fontSize: "11px",
22296
+ color: "#000000",
22297
+ marginTop: "4px"
22298
+ }
22299
+ }, 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", {
22300
+ style: {
22301
+ fontSize: "11px",
22302
+ color: "#000000",
22303
+ marginTop: "4px"
22304
+ }
22305
+ }, 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", {
22306
+ style: {
22307
+ fontSize: "11px",
22308
+ color: "#000000",
22309
+ marginTop: "4px"
22310
+ }
22311
+ }, 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", {
22312
+ style: {
22313
+ fontSize: "11px",
22314
+ color: "#000000",
22315
+ marginTop: "4px"
22316
+ }
22317
+ }, t("WS_PASSPORT_VALIDATION_ERROR") || "Format: A1234567")), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, {
22318
+ className: "card-label-smaller",
22319
+ style: {
22320
+ marginBottom: "8px"
22321
+ }
22322
+ }, "Upload " + t(doc === null || doc === void 0 ? void 0 : doc.i18nKey) + " Document*"), /*#__PURE__*/React.createElement(UploadFile, {
22138
22323
  id: "noc-doc-" + key,
22139
22324
  extraStyleName: "propertyCreate",
22140
22325
  accept: "image/*, .pdf, .png, .jpeg, .jpg",
22141
22326
  onUpload: selectfile,
22142
22327
  onDelete: () => {
22328
+ var _doc$dropdownData2;
22143
22329
  setUploadedFile(null);
22330
+ setFile(null);
22331
+ setDocumentNumber("");
22332
+ 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
22333
  setCheckRequiredFields(true);
22145
22334
  },
22146
22335
  message: uploadedFile ? "1 " + t("CS_ACTION_FILEUPLOADED") : t("ES_NO_FILE_SELECTED_LABEL"),
22147
22336
  error: error
22148
- }));
22337
+ })));
22149
22338
  }
22150
22339
 
22151
22340
  const BannerPicker = props => {
@@ -23033,7 +23222,7 @@ const WSDeclaration = _ref => {
23033
23222
  };
23034
23223
 
23035
23224
  const WSDjbEmployee = _ref => {
23036
- var _formData$djbEmployee, _formData$additionalD, _formData$djbEmployee2, _formData$additionalD2, _formData$djbEmployee3, _formData$additionalD3, _formData$djbEmployee4, _formData$additionalD4;
23225
+ var _formData$djbEmployee, _formData$additionalD, _formData$djbEmployee2, _formData$additionalD2, _formData$djbEmployee3, _formData$additionalD3, _formData$djbEmployee4, _formData$additionalD4, _formData$djbEmployee5, _formData$additionalD5;
23037
23226
  let config = _ref.config,
23038
23227
  onSelect = _ref.onSelect,
23039
23228
  userType = _ref.userType,
@@ -23048,7 +23237,8 @@ const WSDjbEmployee = _ref => {
23048
23237
  isDjbEmployee: String(formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee = formData.djbEmployee) === null || _formData$djbEmployee === void 0 ? void 0 : _formData$djbEmployee.isDjbEmployee) === "true" || String(formData === null || formData === void 0 ? void 0 : (_formData$additionalD = formData.additionalDetails) === null || _formData$additionalD === void 0 ? void 0 : _formData$additionalD.isDjbEmployee) === "true" || false,
23049
23238
  employeeId: (formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee2 = formData.djbEmployee) === null || _formData$djbEmployee2 === void 0 ? void 0 : _formData$djbEmployee2.employeeId) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD2 = formData.additionalDetails) === null || _formData$additionalD2 === void 0 ? void 0 : _formData$additionalD2.employeeId) || "",
23050
23239
  dor: (formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee3 = formData.djbEmployee) === null || _formData$djbEmployee3 === void 0 ? void 0 : _formData$djbEmployee3.dor) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD3 = formData.additionalDetails) === null || _formData$additionalD3 === void 0 ? void 0 : _formData$additionalD3.dor) || "",
23051
- designation: (formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee4 = formData.djbEmployee) === null || _formData$djbEmployee4 === void 0 ? void 0 : _formData$djbEmployee4.designation) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD4 = formData.additionalDetails) === null || _formData$additionalD4 === void 0 ? void 0 : _formData$additionalD4.designation) || ""
23240
+ designation: (formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee4 = formData.djbEmployee) === null || _formData$djbEmployee4 === void 0 ? void 0 : _formData$djbEmployee4.designation) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD4 = formData.additionalDetails) === null || _formData$additionalD4 === void 0 ? void 0 : _formData$additionalD4.designation) || "",
23241
+ document: (formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee5 = formData.djbEmployee) === null || _formData$djbEmployee5 === void 0 ? void 0 : _formData$djbEmployee5.document) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD5 = formData.additionalDetails) === null || _formData$additionalD5 === void 0 ? void 0 : _formData$additionalD5.document) || ""
23052
23242
  }
23053
23243
  }),
23054
23244
  control = _useForm.control,
@@ -23058,16 +23248,79 @@ const WSDjbEmployee = _ref => {
23058
23248
  const formValue = watch();
23059
23249
  const isDjbEmployee = watch("isDjbEmployee");
23060
23250
  useEffect(() => {
23061
- var _formData$djbEmployee5, _formData$additionalD5;
23062
- const isEmp = String(formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee5 = formData.djbEmployee) === null || _formData$djbEmployee5 === void 0 ? void 0 : _formData$djbEmployee5.isDjbEmployee) === "true" || String(formData === null || formData === void 0 ? void 0 : (_formData$additionalD5 = formData.additionalDetails) === null || _formData$additionalD5 === void 0 ? void 0 : _formData$additionalD5.isDjbEmployee) === "true";
23251
+ var _formData$djbEmployee6, _formData$additionalD6;
23252
+ const isEmp = String(formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee6 = formData.djbEmployee) === null || _formData$djbEmployee6 === void 0 ? void 0 : _formData$djbEmployee6.isDjbEmployee) === "true" || String(formData === null || formData === void 0 ? void 0 : (_formData$additionalD6 = formData.additionalDetails) === null || _formData$additionalD6 === void 0 ? void 0 : _formData$additionalD6.isDjbEmployee) === "true";
23063
23253
  if (isEmp !== undefined && isEmp !== null) {
23064
- var _formData$djbEmployee6, _formData$additionalD6, _formData$djbEmployee7, _formData$additionalD7, _formData$djbEmployee8, _formData$additionalD8;
23254
+ var _formData$djbEmployee7, _formData$additionalD7, _formData$djbEmployee8, _formData$additionalD8, _formData$djbEmployee9, _formData$additionalD9, _formData$djbEmployee0, _formData$additionalD0;
23065
23255
  setValue("isDjbEmployee", isEmp);
23066
- setValue("employeeId", (formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee6 = formData.djbEmployee) === null || _formData$djbEmployee6 === void 0 ? void 0 : _formData$djbEmployee6.employeeId) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD6 = formData.additionalDetails) === null || _formData$additionalD6 === void 0 ? void 0 : _formData$additionalD6.employeeId) || "");
23067
- setValue("dor", (formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee7 = formData.djbEmployee) === null || _formData$djbEmployee7 === void 0 ? void 0 : _formData$djbEmployee7.dor) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD7 = formData.additionalDetails) === null || _formData$additionalD7 === void 0 ? void 0 : _formData$additionalD7.dor) || "");
23068
- setValue("designation", (formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee8 = formData.djbEmployee) === null || _formData$djbEmployee8 === void 0 ? void 0 : _formData$djbEmployee8.designation) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD8 = formData.additionalDetails) === null || _formData$additionalD8 === void 0 ? void 0 : _formData$additionalD8.designation) || "");
23256
+ setValue("employeeId", (formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee7 = formData.djbEmployee) === null || _formData$djbEmployee7 === void 0 ? void 0 : _formData$djbEmployee7.employeeId) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD7 = formData.additionalDetails) === null || _formData$additionalD7 === void 0 ? void 0 : _formData$additionalD7.employeeId) || "");
23257
+ setValue("dor", (formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee8 = formData.djbEmployee) === null || _formData$djbEmployee8 === void 0 ? void 0 : _formData$djbEmployee8.dor) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD8 = formData.additionalDetails) === null || _formData$additionalD8 === void 0 ? void 0 : _formData$additionalD8.dor) || "");
23258
+ setValue("designation", (formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee9 = formData.djbEmployee) === null || _formData$djbEmployee9 === void 0 ? void 0 : _formData$djbEmployee9.designation) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD9 = formData.additionalDetails) === null || _formData$additionalD9 === void 0 ? void 0 : _formData$additionalD9.designation) || "");
23259
+ setValue("document", (formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee0 = formData.djbEmployee) === null || _formData$djbEmployee0 === void 0 ? void 0 : _formData$djbEmployee0.document) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD0 = formData.additionalDetails) === null || _formData$additionalD0 === void 0 ? void 0 : _formData$additionalD0.document) || "");
23069
23260
  }
23070
23261
  }, [formData === null || formData === void 0 ? void 0 : formData.djbEmployee, formData === null || formData === void 0 ? void 0 : formData.additionalDetails, setValue]);
23262
+ const tenantId = Digit.ULBService.getCurrentTenantId();
23263
+ const _useState = useState(null),
23264
+ file = _useState[0],
23265
+ setFile = _useState[1];
23266
+ const _useState2 = useState(() => {
23267
+ var _formData$djbEmployee1, _formData$additionalD1;
23268
+ return (formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee1 = formData.djbEmployee) === null || _formData$djbEmployee1 === void 0 ? void 0 : _formData$djbEmployee1.document) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD1 = formData.additionalDetails) === null || _formData$additionalD1 === void 0 ? void 0 : _formData$additionalD1.document) || null;
23269
+ }),
23270
+ uploadedFile = _useState2[0],
23271
+ setUploadedFile = _useState2[1];
23272
+ const _useState3 = useState(null),
23273
+ errorUpload = _useState3[0],
23274
+ setErrorUpload = _useState3[1];
23275
+ useEffect(() => {
23276
+ (function () {
23277
+ try {
23278
+ setErrorUpload(null);
23279
+ const _temp3 = function () {
23280
+ if (file) {
23281
+ const _temp2 = function () {
23282
+ if (file.size >= 5242880) {
23283
+ setErrorUpload({
23284
+ key: "error",
23285
+ message: "CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"
23286
+ });
23287
+ } else {
23288
+ const _temp = _catch(function () {
23289
+ setUploadedFile(null);
23290
+ return Promise.resolve(Digit.UploadServices.Filestorage("WS", file, tenantId === null || tenantId === void 0 ? void 0 : tenantId.split(".")[0])).then(function (response) {
23291
+ var _response$data, _response$data$files;
23292
+ if ((response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$files = _response$data.files) === null || _response$data$files === void 0 ? void 0 : _response$data$files.length) > 0) {
23293
+ var _response$data2, _response$data2$files, _response$data3, _response$data3$files;
23294
+ setUploadedFile(response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$files = _response$data2.files[0]) === null || _response$data2$files === void 0 ? void 0 : _response$data2$files.fileStoreId);
23295
+ setValue("document", response === null || response === void 0 ? void 0 : (_response$data3 = response.data) === null || _response$data3 === void 0 ? void 0 : (_response$data3$files = _response$data3.files[0]) === null || _response$data3$files === void 0 ? void 0 : _response$data3$files.fileStoreId);
23296
+ } else {
23297
+ setErrorUpload({
23298
+ key: "error",
23299
+ message: "CS_FILE_UPLOAD_ERROR"
23300
+ });
23301
+ }
23302
+ });
23303
+ }, function () {
23304
+ setErrorUpload({
23305
+ key: "error",
23306
+ message: "CS_FILE_UPLOAD_ERROR"
23307
+ });
23308
+ });
23309
+ if (_temp && _temp.then) return _temp.then(function () {});
23310
+ }
23311
+ }();
23312
+ if (_temp2 && _temp2.then) return _temp2.then(function () {});
23313
+ }
23314
+ }();
23315
+ return _temp3 && _temp3.then ? _temp3.then(function () {}) : void 0;
23316
+ } catch (e) {
23317
+ Promise.reject(e);
23318
+ }
23319
+ })();
23320
+ }, [file]);
23321
+ function selectfile(e) {
23322
+ setFile(e.target.files[0]);
23323
+ }
23071
23324
  useEffect(() => {
23072
23325
  if (userType === "employee") {
23073
23326
  const isDifferent = !lodash.isEqual(formData === null || formData === void 0 ? void 0 : formData.djbEmployee, formValue);
@@ -23096,11 +23349,7 @@ const WSDjbEmployee = _ref => {
23096
23349
  const FormContent = /*#__PURE__*/React.createElement(CollapsibleCardPage, {
23097
23350
  title: t("WS_DJB_EMPLOYEE"),
23098
23351
  defaultOpen: true
23099
- }, /*#__PURE__*/React.createElement("div", {
23100
- style: {
23101
- marginBottom: "24px"
23102
- }
23103
- }, /*#__PURE__*/React.createElement(Controller, {
23352
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Controller, {
23104
23353
  control: control,
23105
23354
  name: "isDjbEmployee",
23106
23355
  render: props => /*#__PURE__*/React.createElement(CheckBox, {
@@ -23146,6 +23395,29 @@ const WSDjbEmployee = _ref => {
23146
23395
  onChange: e => props.onChange(e.target.value),
23147
23396
  onBlur: props.onBlur
23148
23397
  })
23398
+ })))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_UPLOAD_EMPLOYEE_ID_DOC") + " *"), /*#__PURE__*/React.createElement("div", {
23399
+ className: "field"
23400
+ }, /*#__PURE__*/React.createElement(Controller, {
23401
+ control: control,
23402
+ name: "document",
23403
+ rules: {
23404
+ required: isDjbEmployee ? t("CORE_COMMON_REQUIRED_ERRMSG") : false
23405
+ },
23406
+ render: props => /*#__PURE__*/React.createElement(UploadFile, {
23407
+ id: "employee-doc",
23408
+ extraStyleName: "propertyCreate",
23409
+ accept: "image/*, .pdf, .png, .jpeg, .jpg",
23410
+ onUpload: e => {
23411
+ selectfile(e);
23412
+ },
23413
+ onDelete: () => {
23414
+ setUploadedFile(null);
23415
+ setFile(null);
23416
+ props.onChange("");
23417
+ },
23418
+ message: uploadedFile ? "1 " + t("CS_ACTION_FILEUPLOADED") : t("ES_NO_FILE_SELECTED_LABEL"),
23419
+ error: errorUpload
23420
+ })
23149
23421
  }))))));
23150
23422
  if (userType === "citizen") {
23151
23423
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Timeline, {
@@ -31052,7 +31324,11 @@ function WSDocument(_ref) {
31052
31324
  style: {
31053
31325
  marginTop: "8px"
31054
31326
  }
31055
- }, t(Code === null || Code === void 0 ? void 0 : Code.split('.').slice(0, 3).join('_'))) : null);
31327
+ }, 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", {
31328
+ style: {
31329
+ marginTop: "8px"
31330
+ }
31331
+ }, document === null || document === void 0 ? void 0 : document.documentNumber) : "N/A");
31056
31332
  }))));
31057
31333
  }
31058
31334
 
@@ -32737,6 +33013,18 @@ const WSApplicationDetails = () => {
32737
33013
  }), /*#__PURE__*/React.createElement(Row, {
32738
33014
  label: t("WS_EMPLOYEE_DESIGNATION"),
32739
33015
  text: "" + t(checkForNA$1(djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.designation))
33016
+ }), (djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.document) && /*#__PURE__*/React.createElement(Row, {
33017
+ label: t("WS_UPLOAD_EMPLOYEE_ID_DOC"),
33018
+ text: /*#__PURE__*/React.createElement("span", {
33019
+ style: {
33020
+ display: "flex",
33021
+ alignItems: "center",
33022
+ gap: "8px",
33023
+ cursor: "pointer",
33024
+ color: "#f47738"
33025
+ },
33026
+ onClick: () => getFiles([djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.document], tenantId)
33027
+ }, /*#__PURE__*/React.createElement(GenericFileIcon, null), " ", t("CS_COMMON_VIEW"))
32740
33028
  }))), !isMutation && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardHeader, {
32741
33029
  styles: {
32742
33030
  fontSize: "28px"
@@ -34738,7 +35026,16 @@ const CheckPage = _ref => {
34738
35026
  const checkForNA = val => val ? val : "CS_NA";
34739
35027
  const onEdit = () => {};
34740
35028
  const ActionButton = () => null;
34741
- const openFilePDF = () => {};
35029
+ const openFilePDF = function (fileStoreId) {
35030
+ try {
35031
+ if (fileStoreId) {
35032
+ getFiles([fileStoreId], (value === null || value === void 0 ? void 0 : value.tenantId) || Digit.ULBService.getStateId());
35033
+ }
35034
+ return Promise.resolve();
35035
+ } catch (e) {
35036
+ return Promise.reject(e);
35037
+ }
35038
+ };
34742
35039
  let propAddArr = [];
34743
35040
  if (cpt && cpt !== null && cpt !== void 0 && cpt.details && Object.keys(cpt === null || cpt === void 0 ? void 0 : cpt.details).length > 0) {
34744
35041
  var _cpt$details, _cpt$details$address, _cpt$details3, _cpt$details3$address, _cpt$details5, _cpt$details5$address, _cpt$details7, _cpt$details7$address, _cpt$details7$address2, _cpt$details0, _cpt$details10, _cpt$details10$addres;
@@ -34859,7 +35156,7 @@ const CheckPage = _ref => {
34859
35156
  cursor: "pointer",
34860
35157
  color: "#f47738"
34861
35158
  },
34862
- onClick: () => openFilePDF()
35159
+ onClick: () => openFilePDF(connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails.orgDeptDocument)
34863
35160
  }, /*#__PURE__*/React.createElement(GenericFileIcon, null), " ", t("CS_COMMON_VIEW"))
34864
35161
  }))), /*#__PURE__*/React.createElement(CardHeader, {
34865
35162
  styles: {
@@ -35019,6 +35316,18 @@ const CheckPage = _ref => {
35019
35316
  }), /*#__PURE__*/React.createElement(Row, {
35020
35317
  label: t("WS_EMPLOYEE_DESIGNATION"),
35021
35318
  text: "" + t(checkForNA(djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.designation))
35319
+ }), (djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.document) && /*#__PURE__*/React.createElement(Row, {
35320
+ label: t("WS_UPLOAD_EMPLOYEE_ID_DOC"),
35321
+ text: /*#__PURE__*/React.createElement("span", {
35322
+ style: {
35323
+ display: "flex",
35324
+ alignItems: "center",
35325
+ gap: "8px",
35326
+ cursor: "pointer",
35327
+ color: "#f47738"
35328
+ },
35329
+ onClick: () => openFilePDF(djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.document)
35330
+ }, /*#__PURE__*/React.createElement(GenericFileIcon, null), " ", t("CS_COMMON_VIEW"))
35022
35331
  }))), /*#__PURE__*/React.createElement(CardSubHeader, null, t("WS_BANK_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, {
35023
35332
  style: {
35024
35333
  marginTop: "10px",
@@ -35785,19 +36094,7 @@ const CheckPage$1 = () => {
35785
36094
  style: {
35786
36095
  width: "100%"
35787
36096
  }
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, {
36097
+ }, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardHeader, {
35801
36098
  styles: {
35802
36099
  fontSize: "28px"
35803
36100
  }
@@ -35815,7 +36112,7 @@ const CheckPage$1 = () => {
35815
36112
  display: "inline"
35816
36113
  },
35817
36114
  onClick: () => routeTo(routeLink + "/application-form")
35818
- })), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
36115
+ }), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
35819
36116
  className: "border-none",
35820
36117
  label: t("WS_DISCONNECTION_CONSUMER_NUMBER"),
35821
36118
  text: value.connectionNo
@@ -35835,15 +36132,7 @@ const CheckPage$1 = () => {
35835
36132
  className: "border-none",
35836
36133
  label: t("WS_DISCONNECTION_REASON"),
35837
36134
  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, {
36135
+ })), /*#__PURE__*/React.createElement(CardHeader, {
35847
36136
  styles: {
35848
36137
  fontSize: "28px"
35849
36138
  }
@@ -35861,11 +36150,15 @@ const CheckPage$1 = () => {
35861
36150
  display: "inline"
35862
36151
  },
35863
36152
  onClick: () => routeTo(routeLink + "/documents-upload")
35864
- })), documents && (documents === null || documents === void 0 ? void 0 : documents.map((doc, index) => {
36153
+ }), documents && (documents === null || documents === void 0 ? void 0 : documents.map((doc, index) => {
35865
36154
  var _doc$documentType;
35866
36155
  return /*#__PURE__*/React.createElement("div", {
35867
36156
  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, {
36157
+ }, /*#__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, {
36158
+ className: "border-none",
36159
+ label: t("WS_DOCUMENT_NUMBER"),
36160
+ text: (doc === null || doc === void 0 ? void 0 : doc.documentNumber) || (doc === null || doc === void 0 ? void 0 : doc.documentUid) || t("NA")
36161
+ }), /*#__PURE__*/React.createElement(WSDocument, {
35869
36162
  value: {
35870
36163
  documents: value.WSDisconnectionForm
35871
36164
  },
@@ -35881,10 +36174,17 @@ const CheckPage$1 = () => {
35881
36174
  marginBottom: "20px"
35882
36175
  }
35883
36176
  }) : null)));
35884
- })), /*#__PURE__*/React.createElement(SubmitBar, {
36177
+ })), /*#__PURE__*/React.createElement("div", {
36178
+ style: {
36179
+ display: "flex",
36180
+ justifyContent: "flex-end",
36181
+ width: "100%",
36182
+ gridColumn: "1 / -1"
36183
+ }
36184
+ }, /*#__PURE__*/React.createElement(SubmitBar, {
35885
36185
  label: t("CS_COMMON_SUBMIT"),
35886
36186
  onSubmit: () => onSubmit(value === null || value === void 0 ? void 0 : value.WSDisconnectionForm)
35887
- })))));
36187
+ }))))));
35888
36188
  };
35889
36189
 
35890
36190
  const CheckPage$2 = () => {
@@ -45294,7 +45594,7 @@ function PropertyDocuments(_ref) {
45294
45594
  var _pdfFiles$value$fileS;
45295
45595
  const fileUrl = (_pdfFiles$value$fileS = pdfFiles[value.fileStoreId]) === null || _pdfFiles$value$fileS === void 0 ? void 0 : _pdfFiles$value$fileS.split(",")[0];
45296
45596
  const docSubType = getDocSubType(value === null || value === void 0 ? void 0 : value.documentType);
45297
- const docUid = (value === null || value === void 0 ? void 0 : value.documentUid) || "";
45597
+ const docUid = (value === null || value === void 0 ? void 0 : value.documentNumber) || (value === null || value === void 0 ? void 0 : value.documentUid) || "";
45298
45598
  const isPhoto = value === null || value === void 0 ? void 0 : value.isPhoto;
45299
45599
  let typeLabel = "";
45300
45600
  let numLabel = "";
@@ -46490,6 +46790,7 @@ const RenewPopup = _ref => {
46490
46790
  };
46491
46791
 
46492
46792
  const DueVerification = _ref => {
46793
+ var _window, _window$Digit, _window$Digit$ULBServ, _window2, _window2$Digit, _window2$Digit$Hooks, _window2$Digit$Hooks$;
46493
46794
  let applicationData = _ref.applicationData;
46494
46795
  const _useTranslation = useTranslation(),
46495
46796
  t = _useTranslation.t;
@@ -46558,23 +46859,67 @@ const DueVerification = _ref => {
46558
46859
  setTableData(applicationData.dueVerification);
46559
46860
  }
46560
46861
  }, [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("");
46862
+ 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";
46863
+ 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),
46864
+ checkDueVerification = _window$Digit$Hooks$w.mutateAsync;
46865
+ const _useState4 = useState(null),
46866
+ showToast = _useState4[0],
46867
+ setShowToast = _useState4[1];
46868
+ const handleAdd = function () {
46869
+ try {
46870
+ return Promise.resolve(function () {
46871
+ if (kno) {
46872
+ return _catch(function () {
46873
+ return Promise.resolve(checkDueVerification({
46874
+ DueVerification: {
46875
+ kno: kno
46876
+ }
46877
+ })).then(function (response) {
46878
+ var _response$response, _response$response$da, _response$response2, _response$response2$d, _response$response2$d2;
46879
+ 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) {
46880
+ setShowToast({
46881
+ isError: true,
46882
+ message: response.response.data.Errors[0].message || t("CS_SOMETHING_WENT_WRONG")
46883
+ });
46884
+ return;
46885
+ }
46886
+ 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) || [];
46887
+ if (dueVerifications && dueVerifications.length > 0) {
46888
+ const newEntries = dueVerifications.map(dueVerificationData => ({
46889
+ kno: dueVerificationData.kno || kno,
46890
+ fullName: dueVerificationData.fullName || "NA",
46891
+ fullAddress: dueVerificationData.fullAddress || "NA",
46892
+ dueAmount: dueVerificationData.dueAmount || "0",
46893
+ totalAmount: dueVerificationData.totalAmount || "0",
46894
+ remarks: dueVerificationData.remarks || remarks
46895
+ }));
46896
+ const newTableData = [...tableData, ...newEntries];
46897
+ setTableData(newTableData);
46898
+ if (applicationData) {
46899
+ applicationData.dueVerification = newTableData;
46900
+ }
46901
+ setKno("");
46902
+ setRemarks("");
46903
+ } else {
46904
+ var _response$Errors, _response$Errors$;
46905
+ setShowToast({
46906
+ isError: true,
46907
+ 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."
46908
+ });
46909
+ }
46910
+ });
46911
+ }, function (error) {
46912
+ var _error$response, _error$response$data, _error$response$data$, _error$response$data$2;
46913
+ console.error("Error fetching due verification data:", error);
46914
+ setShowToast({
46915
+ isError: true,
46916
+ 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."
46917
+ });
46918
+ });
46919
+ }
46920
+ }());
46921
+ } catch (e) {
46922
+ return Promise.reject(e);
46578
46923
  }
46579
46924
  };
46580
46925
  return /*#__PURE__*/React.createElement("div", {
@@ -46610,7 +46955,7 @@ const DueVerification = _ref => {
46610
46955
  color: "red"
46611
46956
  }
46612
46957
  }, "*")), /*#__PURE__*/React.createElement(TextInput, {
46613
- type: "number",
46958
+ type: "text",
46614
46959
  value: kno,
46615
46960
  onChange: e => setKno(e.target.value),
46616
46961
  style: {
@@ -46647,7 +46992,12 @@ const DueVerification = _ref => {
46647
46992
  isPaginationRequired: true,
46648
46993
  data: tableData,
46649
46994
  columns: columns
46650
- })));
46995
+ })), showToast && /*#__PURE__*/React.createElement(Toast, {
46996
+ error: showToast.isError,
46997
+ label: showToast.message,
46998
+ onClose: () => setShowToast(null),
46999
+ isDleteBtn: true
47000
+ }));
46651
47001
  };
46652
47002
 
46653
47003
  const InspectionInformation = _ref => {
@@ -50698,9 +51048,11 @@ const Step1_SearchConnection = _ref => {
50698
51048
  return Promise.reject(e);
50699
51049
  }
50700
51050
  };
51051
+ const isMobileView = window.innerWidth < 768;
50701
51052
  return /*#__PURE__*/React.createElement(Card, {
50702
51053
  style: {
50703
- marginBottom: "20px"
51054
+ marginBottom: "20px",
51055
+ padding: isMobileView ? "12px" : undefined
50704
51056
  }
50705
51057
  }, /*#__PURE__*/React.createElement("div", {
50706
51058
  style: {
@@ -50712,19 +51064,23 @@ const Step1_SearchConnection = _ref => {
50712
51064
  }
50713
51065
  }, /*#__PURE__*/React.createElement("span", {
50714
51066
  style: {
50715
- fontSize: "24px"
51067
+ fontSize: isMobileView ? "20px" : "24px"
50716
51068
  }
50717
51069
  }, "\uD83D\uDD0D"), /*#__PURE__*/React.createElement("h2", {
50718
51070
  style: {
50719
- fontSize: "18px",
51071
+ fontSize: isMobileView ? "16px" : "18px",
50720
51072
  fontWeight: "700",
50721
51073
  margin: 0
50722
51074
  }
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", {
51075
+ }, "1. Connection Authentication")), /*#__PURE__*/React.createElement(CardText, {
51076
+ style: {
51077
+ fontSize: isMobileView ? "13px" : undefined
51078
+ }
51079
+ }, "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
51080
  style: {
50725
51081
  marginBottom: "24px",
50726
51082
  marginTop: "16px",
50727
- padding: "16px",
51083
+ padding: isMobileView ? "12px" : "16px",
50728
51084
  backgroundColor: "#f9f9f9",
50729
51085
  borderRadius: "8px",
50730
51086
  borderLeft: "4px solid #00497e"
@@ -50736,26 +51092,26 @@ const Step1_SearchConnection = _ref => {
50736
51092
  }, /*#__PURE__*/React.createElement("div", {
50737
51093
  style: {
50738
51094
  fontWeight: "bold",
50739
- marginBottom: "8px"
51095
+ marginBottom: "8px",
51096
+ fontSize: isMobileView ? "14px" : undefined
50740
51097
  }
50741
51098
  }, "K Number / Connection ID *"), /*#__PURE__*/React.createElement(TextInput, {
50742
51099
  value: kNumber,
50743
51100
  onChange: e => setKNumber(e.target.value),
50744
51101
  placeholder: "Enter K Number",
50745
51102
  style: {
50746
- width: "100%",
50747
- maxWidth: "400px"
51103
+ width: "100%"
50748
51104
  }
50749
51105
  })), /*#__PURE__*/React.createElement("div", {
50750
51106
  style: {
50751
51107
  display: "flex",
50752
- justifyContent: "flex-end"
51108
+ justifyContent: isMobileView ? "center" : "flex-end"
50753
51109
  }
50754
51110
  }, /*#__PURE__*/React.createElement("button", {
50755
51111
  onClick: handleSendOtp,
50756
51112
  disabled: isLoading,
50757
51113
  style: {
50758
- padding: "10px 20px",
51114
+ padding: isMobileView ? "12px 16px" : "10px 20px",
50759
51115
  backgroundColor: "#00497e",
50760
51116
  color: "white",
50761
51117
  border: "none",
@@ -50763,8 +51119,9 @@ const Step1_SearchConnection = _ref => {
50763
51119
  cursor: "pointer",
50764
51120
  fontWeight: "bold",
50765
51121
  opacity: isLoading ? 0.7 : 1,
50766
- width: "100%",
50767
- maxWidth: "200px"
51122
+ width: isMobileView ? "100%" : "auto",
51123
+ maxWidth: isMobileView ? "100%" : "200px",
51124
+ fontSize: isMobileView ? "14px" : undefined
50768
51125
  }
50769
51126
  }, isLoading ? "Sending OTP..." : "Send OTP →"))), showToast && /*#__PURE__*/React.createElement(Toast, {
50770
51127
  error: showToast.key === "error",
@@ -50860,6 +51217,7 @@ const Step1_ExistingConnection = _ref => {
50860
51217
  return Promise.reject(e);
50861
51218
  }
50862
51219
  };
51220
+ const isMobileView = window.innerWidth < 768;
50863
51221
  const infoItemStyle = {
50864
51222
  display: "flex",
50865
51223
  flexDirection: "column",
@@ -50867,11 +51225,12 @@ const Step1_ExistingConnection = _ref => {
50867
51225
  };
50868
51226
  return /*#__PURE__*/React.createElement(Card, {
50869
51227
  style: {
50870
- marginBottom: "20px"
51228
+ marginBottom: "20px",
51229
+ padding: isMobileView ? "12px" : undefined
50871
51230
  }
50872
51231
  }, /*#__PURE__*/React.createElement("div", {
50873
51232
  style: {
50874
- padding: "12px 16px",
51233
+ padding: isMobileView ? "10px 12px" : "12px 16px",
50875
51234
  backgroundColor: "#fff3cd",
50876
51235
  color: "#856404",
50877
51236
  borderRadius: "8px",
@@ -50883,17 +51242,18 @@ const Step1_ExistingConnection = _ref => {
50883
51242
  }
50884
51243
  }, /*#__PURE__*/React.createElement("span", {
50885
51244
  style: {
50886
- fontSize: "18px",
51245
+ fontSize: isMobileView ? "16px" : "18px",
50887
51246
  flexShrink: 0
50888
51247
  }
50889
51248
  }, "\u2139\uFE0F"), /*#__PURE__*/React.createElement("span", {
50890
51249
  style: {
50891
51250
  fontWeight: "500",
50892
- fontSize: "14px"
51251
+ fontSize: isMobileView ? "12px" : "14px",
51252
+ lineHeight: "1.4"
50893
51253
  }
50894
51254
  }, "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
51255
  style: {
50896
- padding: "12px 16px",
51256
+ padding: isMobileView ? "10px 12px" : "12px 16px",
50897
51257
  backgroundColor: "#fdecea",
50898
51258
  color: "#611a15",
50899
51259
  borderRadius: "8px",
@@ -50911,7 +51271,7 @@ const Step1_ExistingConnection = _ref => {
50911
51271
  }, "\u26A0\uFE0F"), /*#__PURE__*/React.createElement("span", {
50912
51272
  style: {
50913
51273
  fontWeight: "500",
50914
- fontSize: "14px"
51274
+ fontSize: isMobileView ? "12px" : "14px"
50915
51275
  }
50916
51276
  }, "Note: Some connection details are missing (", missingFields.join(", "), "). You may need to update them during the mutation process.")), /*#__PURE__*/React.createElement("div", {
50917
51277
  style: {
@@ -50923,17 +51283,17 @@ const Step1_ExistingConnection = _ref => {
50923
51283
  }
50924
51284
  }, /*#__PURE__*/React.createElement("span", {
50925
51285
  style: {
50926
- fontSize: "22px"
51286
+ fontSize: isMobileView ? "20px" : "22px"
50927
51287
  }
50928
51288
  }, "\uD83C\uDFE2"), /*#__PURE__*/React.createElement("h2", {
50929
51289
  style: {
50930
- fontSize: "18px",
51290
+ fontSize: isMobileView ? "16px" : "18px",
50931
51291
  fontWeight: "700",
50932
51292
  margin: 0
50933
51293
  }
50934
51294
  }, "2. Existing Consumer Details")), /*#__PURE__*/React.createElement("div", {
50935
51295
  style: {
50936
- padding: "16px",
51296
+ padding: isMobileView ? "12px" : "16px",
50937
51297
  backgroundColor: "#f9f9f9",
50938
51298
  borderRadius: "8px",
50939
51299
  borderLeft: "4px solid #00497e"
@@ -50941,95 +51301,103 @@ const Step1_ExistingConnection = _ref => {
50941
51301
  }, /*#__PURE__*/React.createElement("div", {
50942
51302
  style: {
50943
51303
  display: "grid",
50944
- gridTemplateColumns: "repeat(auto-fill, minmax(150px, 1fr))",
50945
- gap: "16px"
51304
+ gridTemplateColumns: isMobileView ? "1fr 1fr" : "repeat(auto-fill, minmax(150px, 1fr))",
51305
+ gap: isMobileView ? "12px" : "16px"
50946
51306
  }
50947
51307
  }, /*#__PURE__*/React.createElement("div", {
50948
51308
  style: infoItemStyle
50949
51309
  }, /*#__PURE__*/React.createElement("div", {
50950
51310
  style: {
50951
51311
  color: "#555",
50952
- fontSize: "13px",
51312
+ fontSize: isMobileView ? "11px" : "13px",
50953
51313
  marginBottom: "4px"
50954
51314
  }
50955
51315
  }, "Connection Number"), /*#__PURE__*/React.createElement("div", {
50956
51316
  style: {
50957
51317
  fontWeight: "bold",
50958
- wordBreak: "break-all"
51318
+ wordBreak: "break-all",
51319
+ fontSize: isMobileView ? "13px" : undefined
50959
51320
  }
50960
51321
  }, connectionNo)), /*#__PURE__*/React.createElement("div", {
50961
51322
  style: infoItemStyle
50962
51323
  }, /*#__PURE__*/React.createElement("div", {
50963
51324
  style: {
50964
51325
  color: "#555",
50965
- fontSize: "13px",
51326
+ fontSize: isMobileView ? "11px" : "13px",
50966
51327
  marginBottom: "4px"
50967
51328
  }
50968
51329
  }, "Current Owner Name"), /*#__PURE__*/React.createElement("div", {
50969
51330
  style: {
50970
51331
  fontWeight: "bold",
50971
- wordBreak: "break-word"
51332
+ wordBreak: "break-word",
51333
+ fontSize: isMobileView ? "13px" : undefined
50972
51334
  }
50973
51335
  }, registeredName)), /*#__PURE__*/React.createElement("div", {
50974
- style: infoItemStyle
51336
+ style: _extends({}, infoItemStyle, {
51337
+ gridColumn: isMobileView ? "1 / -1" : undefined
51338
+ })
50975
51339
  }, /*#__PURE__*/React.createElement("div", {
50976
51340
  style: {
50977
51341
  color: "#555",
50978
- fontSize: "13px",
51342
+ fontSize: isMobileView ? "11px" : "13px",
50979
51343
  marginBottom: "4px"
50980
51344
  }
50981
51345
  }, "Property Address"), /*#__PURE__*/React.createElement("div", {
50982
51346
  style: {
50983
51347
  fontWeight: "bold",
50984
- wordBreak: "break-word"
51348
+ wordBreak: "break-word",
51349
+ fontSize: isMobileView ? "13px" : undefined
50985
51350
  }
50986
51351
  }, formattedAddress)), /*#__PURE__*/React.createElement("div", {
50987
51352
  style: infoItemStyle
50988
51353
  }, /*#__PURE__*/React.createElement("div", {
50989
51354
  style: {
50990
51355
  color: "#555",
50991
- fontSize: "13px",
51356
+ fontSize: isMobileView ? "11px" : "13px",
50992
51357
  marginBottom: "4px"
50993
51358
  }
50994
51359
  }, "Connection Status"), /*#__PURE__*/React.createElement("div", {
50995
51360
  style: {
50996
51361
  fontWeight: "bold",
50997
- color: (connectionStatus === null || connectionStatus === void 0 ? void 0 : connectionStatus.toLowerCase()) === "active" ? "#28a745" : "#dc3545"
51362
+ color: (connectionStatus === null || connectionStatus === void 0 ? void 0 : connectionStatus.toLowerCase()) === "active" ? "#28a745" : "#dc3545",
51363
+ fontSize: isMobileView ? "13px" : undefined
50998
51364
  }
50999
51365
  }, connectionStatus)), /*#__PURE__*/React.createElement("div", {
51000
51366
  style: infoItemStyle
51001
51367
  }, /*#__PURE__*/React.createElement("div", {
51002
51368
  style: {
51003
51369
  color: "#555",
51004
- fontSize: "13px",
51370
+ fontSize: isMobileView ? "11px" : "13px",
51005
51371
  marginBottom: "4px"
51006
51372
  }
51007
51373
  }, "Meter Number"), /*#__PURE__*/React.createElement("div", {
51008
51374
  style: {
51009
51375
  fontWeight: "bold",
51010
- wordBreak: "break-all"
51376
+ wordBreak: "break-all",
51377
+ fontSize: isMobileView ? "13px" : undefined
51011
51378
  }
51012
51379
  }, meterId)), /*#__PURE__*/React.createElement("div", {
51013
51380
  style: infoItemStyle
51014
51381
  }, /*#__PURE__*/React.createElement("div", {
51015
51382
  style: {
51016
51383
  color: "#555",
51017
- fontSize: "13px",
51384
+ fontSize: isMobileView ? "11px" : "13px",
51018
51385
  marginBottom: "4px"
51019
51386
  }
51020
51387
  }, "Mobile Number"), /*#__PURE__*/React.createElement("div", {
51021
51388
  style: {
51022
- fontWeight: "bold"
51389
+ fontWeight: "bold",
51390
+ fontSize: isMobileView ? "13px" : undefined
51023
51391
  }
51024
51392
  }, registeredPhone)))), /*#__PURE__*/React.createElement("div", {
51025
51393
  style: {
51026
- marginTop: "24px",
51394
+ marginTop: isMobileView ? "16px" : "24px",
51027
51395
  borderTop: "1px solid #e0e0e0",
51028
51396
  paddingTop: "16px"
51029
51397
  }
51030
51398
  }, /*#__PURE__*/React.createElement("h3", {
51031
51399
  style: {
51032
- fontSize: "16px",
51400
+ fontSize: isMobileView ? "14px" : "16px",
51033
51401
  fontWeight: "bold",
51034
51402
  marginBottom: "16px"
51035
51403
  }
@@ -51038,29 +51406,31 @@ const Step1_ExistingConnection = _ref => {
51038
51406
  display: "flex",
51039
51407
  flexDirection: "column",
51040
51408
  gap: "8px",
51041
- maxWidth: "400px",
51042
51409
  marginBottom: "16px"
51043
51410
  }
51044
51411
  }, /*#__PURE__*/React.createElement("label", {
51045
51412
  style: {
51046
51413
  fontWeight: "500",
51047
- fontSize: "14px"
51414
+ fontSize: isMobileView ? "13px" : "14px"
51048
51415
  }
51049
51416
  }, "Enter OTP sent to +91 ", getMaskedPhone(mobileNumber), " *"), /*#__PURE__*/React.createElement(TextInput, {
51050
51417
  value: otp,
51051
51418
  onChange: e => setOtp(e.target.value.replace(/\D/g, '').slice(0, 6)),
51052
51419
  placeholder: "Enter 6-digit OTP",
51053
- maxLength: 6
51420
+ maxLength: 6,
51421
+ style: {
51422
+ width: "100%"
51423
+ }
51054
51424
  })), /*#__PURE__*/React.createElement("div", {
51055
51425
  style: {
51056
51426
  display: "flex",
51057
- justifyContent: "flex-end"
51427
+ justifyContent: isMobileView ? "center" : "flex-end"
51058
51428
  }
51059
51429
  }, /*#__PURE__*/React.createElement("button", {
51060
51430
  onClick: handleVerifyOtp,
51061
51431
  disabled: isLoading || otp.length < 6,
51062
51432
  style: {
51063
- padding: "10px 20px",
51433
+ padding: isMobileView ? "12px 16px" : "10px 20px",
51064
51434
  backgroundColor: "#00497e",
51065
51435
  color: "white",
51066
51436
  border: "none",
@@ -51068,8 +51438,9 @@ const Step1_ExistingConnection = _ref => {
51068
51438
  cursor: isLoading || otp.length < 6 ? "not-allowed" : "pointer",
51069
51439
  fontWeight: "bold",
51070
51440
  opacity: isLoading || otp.length < 6 ? 0.5 : 1,
51071
- width: "100%",
51072
- maxWidth: "200px"
51441
+ width: isMobileView ? "100%" : "auto",
51442
+ maxWidth: isMobileView ? "100%" : "200px",
51443
+ fontSize: isMobileView ? "14px" : undefined
51073
51444
  }
51074
51445
  }, isLoading ? "Verifying..." : "Verify & Proceed →"))), showToast && /*#__PURE__*/React.createElement(Toast, {
51075
51446
  error: (showToast === null || showToast === void 0 ? void 0 : showToast.key) === "error",
@@ -51138,6 +51509,7 @@ const Step2_NewConsumerDetails = _ref => {
51138
51509
  code: "OTHER",
51139
51510
  i18nKey: "Other"
51140
51511
  }];
51512
+ const isMobileView = window.innerWidth < 768;
51141
51513
  const errorStyle = {
51142
51514
  width: "100%",
51143
51515
  marginLeft: "0px",
@@ -51186,7 +51558,8 @@ const Step2_NewConsumerDetails = _ref => {
51186
51558
  }, "*");
51187
51559
  return /*#__PURE__*/React.createElement(Card, {
51188
51560
  style: {
51189
- marginBottom: "20px"
51561
+ marginBottom: "20px",
51562
+ padding: isMobileView ? "12px" : undefined
51190
51563
  }
51191
51564
  }, /*#__PURE__*/React.createElement("div", {
51192
51565
  style: {
@@ -51198,17 +51571,17 @@ const Step2_NewConsumerDetails = _ref => {
51198
51571
  }
51199
51572
  }, /*#__PURE__*/React.createElement("span", {
51200
51573
  style: {
51201
- fontSize: "22px"
51574
+ fontSize: isMobileView ? "20px" : "22px"
51202
51575
  }
51203
51576
  }, "\uD83D\uDC64"), /*#__PURE__*/React.createElement("h2", {
51204
51577
  style: {
51205
- fontSize: "18px",
51578
+ fontSize: isMobileView ? "16px" : "18px",
51206
51579
  fontWeight: "700",
51207
51580
  margin: 0
51208
51581
  }
51209
51582
  }, "2. New Consumer Details.")), Object.keys(errors).length > 0 && /*#__PURE__*/React.createElement("div", {
51210
51583
  style: {
51211
- padding: "12px 16px",
51584
+ padding: isMobileView ? "10px 12px" : "12px 16px",
51212
51585
  backgroundColor: "#fdecea",
51213
51586
  color: "#611a15",
51214
51587
  borderRadius: "8px",
@@ -51226,7 +51599,7 @@ const Step2_NewConsumerDetails = _ref => {
51226
51599
  }, "\u26A0\uFE0F"), /*#__PURE__*/React.createElement("span", {
51227
51600
  style: {
51228
51601
  fontWeight: "500",
51229
- fontSize: "14px"
51602
+ fontSize: isMobileView ? "12px" : "14px"
51230
51603
  }
51231
51604
  }, "Please fill in all required fields marked with ", /*#__PURE__*/React.createElement("span", {
51232
51605
  style: {
@@ -51238,8 +51611,8 @@ const Step2_NewConsumerDetails = _ref => {
51238
51611
  }, /*#__PURE__*/React.createElement("div", {
51239
51612
  style: {
51240
51613
  display: "grid",
51241
- gridTemplateColumns: "repeat(auto-fill, minmax(240px, 1fr))",
51242
- gap: "20px",
51614
+ gridTemplateColumns: isMobileView ? "1fr" : "repeat(auto-fill, minmax(240px, 1fr))",
51615
+ gap: isMobileView ? "16px" : "20px",
51243
51616
  padding: "8px 0 16px"
51244
51617
  }
51245
51618
  }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, {
@@ -51435,13 +51808,13 @@ const Step2_NewConsumerDetails = _ref => {
51435
51808
  }, 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
51809
  style: {
51437
51810
  display: "flex",
51811
+ flexDirection: isMobileView ? "column" : "row",
51438
51812
  justifyContent: "space-between",
51439
- alignItems: "center",
51813
+ alignItems: isMobileView ? "stretch" : "center",
51440
51814
  marginTop: "24px",
51441
- flexWrap: "wrap",
51442
51815
  gap: "12px"
51443
51816
  }
51444
- }, /*#__PURE__*/React.createElement("button", {
51817
+ }, !isMobileView && /*#__PURE__*/React.createElement("button", {
51445
51818
  type: "button",
51446
51819
  onClick: onBack,
51447
51820
  style: {
@@ -51455,14 +51828,15 @@ const Step2_NewConsumerDetails = _ref => {
51455
51828
  }, "\u2190 Back"), /*#__PURE__*/React.createElement("div", {
51456
51829
  style: {
51457
51830
  display: "flex",
51458
- alignItems: "center",
51459
- gap: "12px",
51460
- flexWrap: "wrap"
51831
+ flexDirection: isMobileView ? "column" : "row",
51832
+ alignItems: isMobileView ? "stretch" : "center",
51833
+ gap: "12px"
51461
51834
  }
51462
51835
  }, /*#__PURE__*/React.createElement("span", {
51463
51836
  style: {
51464
51837
  fontSize: "12px",
51465
- color: "#999"
51838
+ color: "#999",
51839
+ textAlign: isMobileView ? "center" : undefined
51466
51840
  }
51467
51841
  }, "Fields marked with ", /*#__PURE__*/React.createElement("span", {
51468
51842
  style: {
@@ -51471,15 +51845,30 @@ const Step2_NewConsumerDetails = _ref => {
51471
51845
  }, "*"), " are mandatory"), /*#__PURE__*/React.createElement("button", {
51472
51846
  type: "submit",
51473
51847
  style: {
51474
- padding: "10px 20px",
51848
+ padding: isMobileView ? "14px 20px" : "10px 20px",
51475
51849
  backgroundColor: "#00497e",
51476
51850
  color: "white",
51477
51851
  border: "none",
51478
51852
  borderRadius: "4px",
51479
51853
  cursor: "pointer",
51480
- fontWeight: "bold"
51854
+ fontWeight: "bold",
51855
+ width: isMobileView ? "100%" : "auto",
51856
+ fontSize: isMobileView ? "14px" : undefined
51481
51857
  }
51482
- }, "Save & Proceed to Documents \u2192")))), showToast && /*#__PURE__*/React.createElement(Toast, {
51858
+ }, "Save & Proceed to Documents \u2192")), isMobileView && /*#__PURE__*/React.createElement("button", {
51859
+ type: "button",
51860
+ onClick: onBack,
51861
+ style: {
51862
+ padding: "12px 20px",
51863
+ backgroundColor: "#e0e0e0",
51864
+ border: "none",
51865
+ borderRadius: "4px",
51866
+ cursor: "pointer",
51867
+ fontWeight: "bold",
51868
+ width: "100%",
51869
+ fontSize: "14px"
51870
+ }
51871
+ }, "\u2190 Back"))), showToast && /*#__PURE__*/React.createElement(Toast, {
51483
51872
  error: showToast.key === "error",
51484
51873
  warning: showToast.key === "warning",
51485
51874
  label: t(showToast.message),
@@ -51763,6 +52152,7 @@ const Step3_UploadDocuments = _ref => {
51763
52152
  marginTop: "8px",
51764
52153
  transition: "all 0.2s ease"
51765
52154
  });
52155
+ const isMobileView = window.innerWidth < 768;
51766
52156
  const errorTextStyle = {
51767
52157
  fontSize: "12px",
51768
52158
  color: "#d32f2f",
@@ -51783,7 +52173,8 @@ const Step3_UploadDocuments = _ref => {
51783
52173
  const errorCount = Object.keys(fieldErrors).length;
51784
52174
  return /*#__PURE__*/React.createElement(Card, {
51785
52175
  style: {
51786
- marginBottom: "20px"
52176
+ marginBottom: "20px",
52177
+ padding: isMobileView ? "12px" : undefined
51787
52178
  }
51788
52179
  }, /*#__PURE__*/React.createElement("div", {
51789
52180
  style: {
@@ -51793,23 +52184,24 @@ const Step3_UploadDocuments = _ref => {
51793
52184
  }
51794
52185
  }, /*#__PURE__*/React.createElement("span", {
51795
52186
  style: {
51796
- fontSize: "24px",
52187
+ fontSize: isMobileView ? "20px" : "24px",
51797
52188
  marginRight: "8px"
51798
52189
  }
51799
52190
  }, "\uD83D\uDCC4"), /*#__PURE__*/React.createElement("h2", {
51800
52191
  style: {
51801
- fontSize: "20px",
52192
+ fontSize: isMobileView ? "16px" : "20px",
51802
52193
  fontWeight: "700",
51803
52194
  margin: 0
51804
52195
  }
51805
52196
  }, "3. Upload Verification Documents")), /*#__PURE__*/React.createElement("p", {
51806
52197
  style: {
51807
52198
  color: "#666",
51808
- marginBottom: "20px"
52199
+ marginBottom: "20px",
52200
+ fontSize: isMobileView ? "12px" : undefined
51809
52201
  }
51810
52202
  }, "Please upload legible scanned copies or photos (PDF, PNG, JPEG - Max 5MB)."), hasAttemptedSubmit && errorCount > 0 && /*#__PURE__*/React.createElement("div", {
51811
52203
  style: {
51812
- padding: "12px 16px",
52204
+ padding: isMobileView ? "10px 12px" : "12px 16px",
51813
52205
  backgroundColor: "#fdecea",
51814
52206
  color: "#611a15",
51815
52207
  borderRadius: "8px",
@@ -51827,13 +52219,13 @@ const Step3_UploadDocuments = _ref => {
51827
52219
  }, "\u26A0\uFE0F"), /*#__PURE__*/React.createElement("span", {
51828
52220
  style: {
51829
52221
  fontWeight: "500",
51830
- fontSize: "14px"
52222
+ fontSize: isMobileView ? "12px" : "14px"
51831
52223
  }
51832
52224
  }, errorCount, " required item", errorCount > 1 ? "s" : "", " still need", errorCount === 1 ? "s" : "", " your attention before proceeding.")), /*#__PURE__*/React.createElement("div", {
51833
52225
  style: {
51834
52226
  display: "grid",
51835
- gridTemplateColumns: "repeat(auto-fill, minmax(280px, 1fr))",
51836
- gap: "24px"
52227
+ gridTemplateColumns: isMobileView ? "1fr" : "repeat(auto-fill, minmax(280px, 1fr))",
52228
+ gap: isMobileView ? "20px" : "24px"
51837
52229
  }
51838
52230
  }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, {
51839
52231
  style: {
@@ -52008,13 +52400,13 @@ const Step3_UploadDocuments = _ref => {
52008
52400
  }, "\uD83D\uDCC4"), " View ", mutationFileName)))), /*#__PURE__*/React.createElement("div", {
52009
52401
  style: {
52010
52402
  display: "flex",
52403
+ flexDirection: isMobileView ? "column" : "row",
52011
52404
  justifyContent: "space-between",
52012
- alignItems: "center",
52013
- marginTop: "32px",
52014
- flexWrap: "wrap",
52405
+ alignItems: isMobileView ? "stretch" : "center",
52406
+ marginTop: isMobileView ? "24px" : "32px",
52015
52407
  gap: "12px"
52016
52408
  }
52017
- }, /*#__PURE__*/React.createElement("button", {
52409
+ }, !isMobileView && /*#__PURE__*/React.createElement("button", {
52018
52410
  type: "button",
52019
52411
  onClick: onBack,
52020
52412
  style: {
@@ -52028,29 +52420,45 @@ const Step3_UploadDocuments = _ref => {
52028
52420
  }, "\u2190 Back"), /*#__PURE__*/React.createElement("div", {
52029
52421
  style: {
52030
52422
  display: "flex",
52031
- alignItems: "center",
52032
- gap: "12px",
52033
- flexWrap: "wrap"
52423
+ flexDirection: isMobileView ? "column" : "row",
52424
+ alignItems: isMobileView ? "stretch" : "center",
52425
+ gap: "12px"
52034
52426
  }
52035
52427
  }, /*#__PURE__*/React.createElement("span", {
52036
52428
  style: {
52037
52429
  fontSize: "12px",
52038
- color: "#999"
52430
+ color: "#999",
52431
+ textAlign: isMobileView ? "center" : undefined
52039
52432
  }
52040
52433
  }, "All documents are mandatory"), /*#__PURE__*/React.createElement("button", {
52041
52434
  type: "button",
52042
52435
  onClick: onProceed,
52043
52436
  disabled: isUploading,
52044
52437
  style: {
52045
- padding: "10px 20px",
52438
+ padding: isMobileView ? "14px 20px" : "10px 20px",
52046
52439
  backgroundColor: isUploading ? "#ccc" : "#00497e",
52047
52440
  color: "white",
52048
52441
  border: "none",
52049
52442
  borderRadius: "4px",
52050
52443
  cursor: isUploading ? "not-allowed" : "pointer",
52051
- fontWeight: "bold"
52444
+ fontWeight: "bold",
52445
+ width: isMobileView ? "100%" : "auto",
52446
+ fontSize: isMobileView ? "14px" : undefined
52052
52447
  }
52053
- }, isUploading ? "Uploading..." : "Proceed to Application Preview →"))), showToast && /*#__PURE__*/React.createElement(Toast, {
52448
+ }, isUploading ? "Uploading..." : "Proceed to Preview →")), isMobileView && /*#__PURE__*/React.createElement("button", {
52449
+ type: "button",
52450
+ onClick: onBack,
52451
+ style: {
52452
+ padding: "12px 20px",
52453
+ backgroundColor: "#e0e0e0",
52454
+ border: "none",
52455
+ borderRadius: "4px",
52456
+ cursor: "pointer",
52457
+ fontWeight: "bold",
52458
+ width: "100%",
52459
+ fontSize: "14px"
52460
+ }
52461
+ }, "\u2190 Back")), showToast && /*#__PURE__*/React.createElement(Toast, {
52054
52462
  error: showToast.key === "error",
52055
52463
  warning: showToast.key === "warning",
52056
52464
  success: showToast.key === "success",
@@ -52181,24 +52589,25 @@ const Step4_Preview = _ref => {
52181
52589
  };
52182
52590
  calculateStaticFee();
52183
52591
  }, [formData]);
52592
+ const isMobileView = window.innerWidth < 768;
52184
52593
  const sectionStyle = {
52185
52594
  border: "1px solid #e0e0e0",
52186
52595
  borderRadius: "8px",
52187
- padding: "16px",
52596
+ padding: isMobileView ? "12px" : "16px",
52188
52597
  marginBottom: "16px"
52189
52598
  };
52190
52599
  const labelStyle = {
52191
52600
  color: "#666",
52192
- fontSize: "13px",
52601
+ fontSize: isMobileView ? "11px" : "13px",
52193
52602
  marginBottom: "4px"
52194
52603
  };
52195
52604
  const valueStyle = {
52196
52605
  fontWeight: "bold",
52197
- fontSize: "15px",
52606
+ fontSize: isMobileView ? "13px" : "15px",
52198
52607
  wordBreak: "break-word"
52199
52608
  };
52200
52609
  const uploadDocStatusStyle = {
52201
- fontSize: "14px",
52610
+ fontSize: isMobileView ? "12px" : "14px",
52202
52611
  fontWeight: "bold"
52203
52612
  };
52204
52613
  const infoItem = (label, value) => /*#__PURE__*/React.createElement("div", {
@@ -52212,7 +52621,8 @@ const Step4_Preview = _ref => {
52212
52621
  }, value));
52213
52622
  return /*#__PURE__*/React.createElement(Card, {
52214
52623
  style: {
52215
- marginBottom: "20px"
52624
+ marginBottom: "20px",
52625
+ padding: isMobileView ? "12px" : undefined
52216
52626
  }
52217
52627
  }, /*#__PURE__*/React.createElement("div", {
52218
52628
  style: {
@@ -52224,11 +52634,11 @@ const Step4_Preview = _ref => {
52224
52634
  }
52225
52635
  }, /*#__PURE__*/React.createElement("span", {
52226
52636
  style: {
52227
- fontSize: "22px"
52637
+ fontSize: isMobileView ? "20px" : "22px"
52228
52638
  }
52229
52639
  }, "\uD83D\uDCCB"), /*#__PURE__*/React.createElement("h2", {
52230
52640
  style: {
52231
- fontSize: "18px",
52641
+ fontSize: isMobileView ? "15px" : "18px",
52232
52642
  fontWeight: "700",
52233
52643
  margin: 0
52234
52644
  }
@@ -52238,7 +52648,7 @@ const Step4_Preview = _ref => {
52238
52648
  })
52239
52649
  }, /*#__PURE__*/React.createElement("h3", {
52240
52650
  style: {
52241
- fontSize: "15px",
52651
+ fontSize: isMobileView ? "13px" : "15px",
52242
52652
  fontWeight: "bold",
52243
52653
  color: "#00497e",
52244
52654
  marginBottom: "12px"
@@ -52246,8 +52656,8 @@ const Step4_Preview = _ref => {
52246
52656
  }, "Property & Connection Summary"), /*#__PURE__*/React.createElement("div", {
52247
52657
  style: {
52248
52658
  display: "grid",
52249
- gridTemplateColumns: "repeat(auto-fill, minmax(150px, 1fr))",
52250
- gap: "16px"
52659
+ gridTemplateColumns: isMobileView ? "1fr 1fr" : "repeat(auto-fill, minmax(150px, 1fr))",
52660
+ gap: isMobileView ? "12px" : "16px"
52251
52661
  }
52252
52662
  }, infoItem("Connection No", connectionNo), infoItem("Meter Number", meterId), infoItem("Property ID", propertyId))), /*#__PURE__*/React.createElement("div", {
52253
52663
  style: _extends({}, sectionStyle, {
@@ -52255,16 +52665,16 @@ const Step4_Preview = _ref => {
52255
52665
  })
52256
52666
  }, /*#__PURE__*/React.createElement("h3", {
52257
52667
  style: {
52258
- fontSize: "15px",
52668
+ fontSize: isMobileView ? "13px" : "15px",
52259
52669
  fontWeight: "bold",
52260
52670
  color: "#f29c1f",
52261
52671
  marginBottom: "12px"
52262
52672
  }
52263
- }, "\uD83D\uDD12 Existing / Previous Owner Details (Masked Information)"), /*#__PURE__*/React.createElement("div", {
52673
+ }, "\uD83D\uDD12 Existing / Previous Owner Details (Masked)"), /*#__PURE__*/React.createElement("div", {
52264
52674
  style: {
52265
52675
  display: "grid",
52266
- gridTemplateColumns: "repeat(auto-fill, minmax(150px, 1fr))",
52267
- gap: "16px",
52676
+ gridTemplateColumns: isMobileView ? "1fr" : "repeat(auto-fill, minmax(150px, 1fr))",
52677
+ gap: isMobileView ? "12px" : "16px",
52268
52678
  marginBottom: "12px"
52269
52679
  }
52270
52680
  }, infoItem("Registered Name:", oldName), infoItem("Registered Phone:", oldPhone)), infoItem("Registered Address:", oldAddress)), /*#__PURE__*/React.createElement("div", {
@@ -52273,7 +52683,7 @@ const Step4_Preview = _ref => {
52273
52683
  })
52274
52684
  }, /*#__PURE__*/React.createElement("h3", {
52275
52685
  style: {
52276
- fontSize: "15px",
52686
+ fontSize: isMobileView ? "13px" : "15px",
52277
52687
  fontWeight: "bold",
52278
52688
  color: "#00497e",
52279
52689
  marginBottom: "12px"
@@ -52281,8 +52691,8 @@ const Step4_Preview = _ref => {
52281
52691
  }, "\uD83D\uDC64 Transferee (New Owner) Summary"), /*#__PURE__*/React.createElement("div", {
52282
52692
  style: {
52283
52693
  display: "grid",
52284
- gridTemplateColumns: "repeat(auto-fill, minmax(150px, 1fr))",
52285
- gap: "16px"
52694
+ gridTemplateColumns: isMobileView ? "1fr 1fr" : "repeat(auto-fill, minmax(150px, 1fr))",
52695
+ gap: isMobileView ? "12px" : "16px"
52286
52696
  }
52287
52697
  }, infoItem("New Owner Name", proposedNewConsumerName), infoItem("Mobile Number", newOwnerMobileNumber), infoItem("Relation Type", getRelationshipName(relationshipWithExistingConsumer)), infoItem("Transfer Reason", getReasonName(reasonForNameChange)))), /*#__PURE__*/React.createElement("div", {
52288
52698
  style: _extends({}, sectionStyle, {
@@ -52290,7 +52700,7 @@ const Step4_Preview = _ref => {
52290
52700
  })
52291
52701
  }, /*#__PURE__*/React.createElement("h3", {
52292
52702
  style: {
52293
- fontSize: "15px",
52703
+ fontSize: isMobileView ? "13px" : "15px",
52294
52704
  fontWeight: "bold",
52295
52705
  color: "#17a2b8",
52296
52706
  marginBottom: "12px"
@@ -52298,8 +52708,8 @@ const Step4_Preview = _ref => {
52298
52708
  }, "Uploaded Documents"), /*#__PURE__*/React.createElement("div", {
52299
52709
  style: {
52300
52710
  display: "grid",
52301
- gridTemplateColumns: "repeat(auto-fill, minmax(150px, 1fr))",
52302
- gap: "16px"
52711
+ gridTemplateColumns: isMobileView ? "1fr" : "repeat(auto-fill, minmax(150px, 1fr))",
52712
+ gap: isMobileView ? "12px" : "16px"
52303
52713
  }
52304
52714
  }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
52305
52715
  style: labelStyle
@@ -52321,7 +52731,7 @@ const Step4_Preview = _ref => {
52321
52731
  border: "none",
52322
52732
  textDecoration: "underline",
52323
52733
  cursor: "pointer",
52324
- fontSize: "14px",
52734
+ fontSize: isMobileView ? "12px" : "14px",
52325
52735
  fontWeight: "bold",
52326
52736
  padding: 0
52327
52737
  }
@@ -52349,7 +52759,7 @@ const Step4_Preview = _ref => {
52349
52759
  border: "none",
52350
52760
  textDecoration: "underline",
52351
52761
  cursor: "pointer",
52352
- fontSize: "14px",
52762
+ fontSize: isMobileView ? "12px" : "14px",
52353
52763
  fontWeight: "bold",
52354
52764
  padding: 0
52355
52765
  }
@@ -52361,7 +52771,7 @@ const Step4_Preview = _ref => {
52361
52771
  })
52362
52772
  }, /*#__PURE__*/React.createElement("h3", {
52363
52773
  style: {
52364
- fontSize: "15px",
52774
+ fontSize: isMobileView ? "13px" : "15px",
52365
52775
  fontWeight: "bold",
52366
52776
  color: "#28a745",
52367
52777
  marginBottom: "12px"
@@ -52376,7 +52786,7 @@ const Step4_Preview = _ref => {
52376
52786
  display: "flex",
52377
52787
  justifyContent: "space-between",
52378
52788
  marginBottom: "8px",
52379
- maxWidth: "400px"
52789
+ maxWidth: isMobileView ? "100%" : "400px"
52380
52790
  }
52381
52791
  }, /*#__PURE__*/React.createElement("div", {
52382
52792
  style: labelStyle
@@ -52386,13 +52796,13 @@ const Step4_Preview = _ref => {
52386
52796
  style: {
52387
52797
  borderTop: "1px solid #c3e6cb",
52388
52798
  margin: "12px 0",
52389
- maxWidth: "400px"
52799
+ maxWidth: isMobileView ? "100%" : "400px"
52390
52800
  }
52391
52801
  })), /*#__PURE__*/React.createElement("div", {
52392
52802
  style: {
52393
52803
  display: "flex",
52394
52804
  justifyContent: "space-between",
52395
- maxWidth: "400px",
52805
+ maxWidth: isMobileView ? "100%" : "400px",
52396
52806
  flexWrap: "wrap",
52397
52807
  gap: "8px"
52398
52808
  }
@@ -52401,7 +52811,7 @@ const Step4_Preview = _ref => {
52401
52811
  }, "Total Amount Payable:"), /*#__PURE__*/React.createElement("div", {
52402
52812
  style: _extends({}, valueStyle, {
52403
52813
  color: "#28a745",
52404
- fontSize: "20px"
52814
+ fontSize: isMobileView ? "18px" : "20px"
52405
52815
  })
52406
52816
  }, "\u20B9 ", fee, ".00")), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
52407
52817
  style: labelStyle
@@ -52411,14 +52821,14 @@ const Step4_Preview = _ref => {
52411
52821
  backgroundColor: "#d1ecf1",
52412
52822
  color: "#0c5460",
52413
52823
  borderRadius: "16px",
52414
- fontSize: "12px",
52824
+ fontSize: isMobileView ? "10px" : "12px",
52415
52825
  fontWeight: "bold",
52416
52826
  display: "inline-block",
52417
52827
  marginTop: "4px"
52418
52828
  }
52419
52829
  }, "PAYABLE POST VERIFICATION")))), /*#__PURE__*/React.createElement("div", {
52420
52830
  style: {
52421
- padding: "16px",
52831
+ padding: isMobileView ? "12px" : "16px",
52422
52832
  backgroundColor: "#fffbeb",
52423
52833
  border: "1px solid #ffeeba",
52424
52834
  borderRadius: "8px",
@@ -52427,8 +52837,47 @@ const Step4_Preview = _ref => {
52427
52837
  }, /*#__PURE__*/React.createElement(CheckBox, {
52428
52838
  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
52839
  onChange: e => setAgreed(e.target.checked),
52430
- checked: agreed
52431
- })), /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement("button", {
52840
+ checked: agreed,
52841
+ style: isMobileView ? {
52842
+ fontSize: "12px"
52843
+ } : undefined
52844
+ })), isMobileView ? /*#__PURE__*/React.createElement("div", {
52845
+ style: {
52846
+ display: "flex",
52847
+ flexDirection: "column",
52848
+ gap: "12px",
52849
+ marginBottom: "16px"
52850
+ }
52851
+ }, /*#__PURE__*/React.createElement("button", {
52852
+ type: "button",
52853
+ onClick: onSubmit,
52854
+ disabled: !agreed || isLoading,
52855
+ style: {
52856
+ padding: "14px 20px",
52857
+ backgroundColor: !agreed || isLoading ? "#ccc" : "#00497e",
52858
+ color: "white",
52859
+ border: "none",
52860
+ borderRadius: "4px",
52861
+ cursor: !agreed || isLoading ? "not-allowed" : "pointer",
52862
+ fontWeight: "bold",
52863
+ fontSize: "15px",
52864
+ width: "100%",
52865
+ opacity: !agreed || isLoading ? 0.6 : 1
52866
+ }
52867
+ }, isLoading ? "Submitting..." : "Submit Mutation Application"), /*#__PURE__*/React.createElement("button", {
52868
+ type: "button",
52869
+ onClick: onBack,
52870
+ style: {
52871
+ padding: "12px 20px",
52872
+ backgroundColor: "#e0e0e0",
52873
+ border: "none",
52874
+ borderRadius: "4px",
52875
+ cursor: "pointer",
52876
+ fontWeight: "bold",
52877
+ width: "100%",
52878
+ fontSize: "14px"
52879
+ }
52880
+ }, "\u2190 Edit Information")) : /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement("button", {
52432
52881
  type: "button",
52433
52882
  onClick: onBack,
52434
52883
  style: {
@@ -52460,9 +52909,10 @@ const Step5_Submission = _ref => {
52460
52909
  const goHome = () => {
52461
52910
  history.push("/digit-ui/employee");
52462
52911
  };
52912
+ const isMobileView = window.innerWidth < 768;
52463
52913
  return /*#__PURE__*/React.createElement("div", {
52464
52914
  style: {
52465
- padding: "16px 0"
52915
+ padding: isMobileView ? "8px 0" : "16px 0"
52466
52916
  }
52467
52917
  }, /*#__PURE__*/React.createElement("div", {
52468
52918
  style: {
@@ -52470,18 +52920,18 @@ const Step5_Submission = _ref => {
52470
52920
  border: "1px solid #d4edda",
52471
52921
  borderTop: "4px solid #28a745",
52472
52922
  borderRadius: "8px",
52473
- padding: "20px",
52923
+ padding: isMobileView ? "16px" : "20px",
52474
52924
  display: "flex",
52925
+ flexDirection: isMobileView ? "column" : "row",
52475
52926
  justifyContent: "space-between",
52476
- alignItems: "flex-start",
52477
- flexWrap: "wrap",
52927
+ alignItems: isMobileView ? "stretch" : "flex-start",
52478
52928
  gap: "12px",
52479
52929
  marginBottom: "20px"
52480
52930
  }
52481
52931
  }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h2", {
52482
52932
  style: {
52483
52933
  color: "#28a745",
52484
- fontSize: "18px",
52934
+ fontSize: isMobileView ? "15px" : "18px",
52485
52935
  fontWeight: "bold",
52486
52936
  margin: "0 0 4px",
52487
52937
  display: "flex",
@@ -52489,24 +52939,28 @@ const Step5_Submission = _ref => {
52489
52939
  flexWrap: "wrap",
52490
52940
  gap: "6px"
52491
52941
  }
52492
- }, /*#__PURE__*/React.createElement("span", null, "\u2705"), " Your application has been submitted successfully to the respective Zonal Officer !"), /*#__PURE__*/React.createElement("div", {
52942
+ }, /*#__PURE__*/React.createElement("span", null, "\u2705"), " Your application has been submitted successfully to the respective Zonal Officer!"), /*#__PURE__*/React.createElement("div", {
52493
52943
  style: {
52494
52944
  color: "#666",
52495
52945
  marginTop: "4px",
52496
- fontSize: "14px",
52946
+ fontSize: isMobileView ? "13px" : "14px",
52497
52947
  wordBreak: "break-all"
52498
52948
  }
52499
52949
  }, "Your SRN Reference No. is: ", /*#__PURE__*/React.createElement("strong", {
52500
52950
  style: {
52501
52951
  color: "#00497e"
52502
52952
  }
52503
- }, applicationNumber))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
52953
+ }, applicationNumber))), /*#__PURE__*/React.createElement("div", {
52954
+ style: {
52955
+ alignSelf: isMobileView ? "flex-start" : undefined
52956
+ }
52957
+ }, /*#__PURE__*/React.createElement("span", {
52504
52958
  style: {
52505
52959
  padding: "6px 12px",
52506
52960
  backgroundColor: "#fff3cd",
52507
52961
  color: "#856404",
52508
52962
  borderRadius: "16px",
52509
- fontSize: "12px",
52963
+ fontSize: isMobileView ? "11px" : "12px",
52510
52964
  fontWeight: "bold",
52511
52965
  whiteSpace: "nowrap"
52512
52966
  }
@@ -52518,7 +52972,7 @@ const Step5_Submission = _ref => {
52518
52972
  }, /*#__PURE__*/React.createElement("button", {
52519
52973
  onClick: goHome,
52520
52974
  style: {
52521
- padding: "12px 28px",
52975
+ padding: isMobileView ? "14px 28px" : "12px 28px",
52522
52976
  backgroundColor: "#00497e",
52523
52977
  color: "white",
52524
52978
  border: "none",
@@ -52526,7 +52980,7 @@ const Step5_Submission = _ref => {
52526
52980
  cursor: "pointer",
52527
52981
  fontWeight: "bold",
52528
52982
  fontSize: "15px",
52529
- width: "100%",
52983
+ width: isMobileView ? "100%" : "auto",
52530
52984
  maxWidth: "280px"
52531
52985
  }
52532
52986
  }, "Go to Home")), showToast && /*#__PURE__*/React.createElement(Toast, {
@@ -52538,7 +52992,7 @@ const Step5_Submission = _ref => {
52538
52992
  };
52539
52993
 
52540
52994
  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;
52995
+ 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
52996
  const _useTranslation = useTranslation(),
52543
52997
  t = _useTranslation.t;
52544
52998
  let _useLocation = useLocation(),
@@ -52790,7 +53244,7 @@ const MutationApplication = () => {
52790
53244
  try {
52791
53245
  setIsSubmitting(true);
52792
53246
  return Promise.resolve(_catch(function () {
52793
- var _finalData$cpt;
53247
+ var _finalData$cpt, _applicationDetails$a5, _applicationDetails$W, _applicationDetails$W2, _applicationDetails$S, _applicationDetails$S2, _details$applicationD2;
52794
53248
  let finalData = _extends({}, sessionFormData);
52795
53249
  if (!(finalData !== null && finalData !== void 0 && (_finalData$cpt = finalData.cpt) !== null && _finalData$cpt !== void 0 && _finalData$cpt.details)) {
52796
53250
  var _propertyDetails$Prop3;
@@ -52821,7 +53275,9 @@ const MutationApplication = () => {
52821
53275
  })];
52822
53276
  }
52823
53277
  const sessionDetails = sessionStorage.getItem("WS_EDIT_APPLICATION_DETAILS") ? JSON.parse(sessionStorage.getItem("WS_EDIT_APPLICATION_DETAILS")) : {};
53278
+ 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
53279
  return Promise.resolve(convertModifyApplicationDetails(finalData, sessionDetails, "INITIATE")).then(function (convertAppData) {
53280
+ var _convertAppData$docum;
52825
53281
  if (!convertAppData.dateEffectiveFrom) {
52826
53282
  convertAppData.dateEffectiveFrom = Date.now() + 86400000;
52827
53283
  }
@@ -52862,16 +53318,22 @@ const MutationApplication = () => {
52862
53318
  convertAppData.additionalDetails.identityProofDocumentId = mutDetails.identityProofDocumentId || "";
52863
53319
  }
52864
53320
  }
53321
+ 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) {
53322
+ convertAppData.documents = mapExistingDocIdsToPayload(convertAppData.documents, existingDocs);
53323
+ }
52865
53324
  convertAppData.applicationType = resolvedServiceType === "WATER" ? "MUTATION_WATER_CONNECTION" : "MUTATION_SEWERAGE_CONNECTION";
52866
53325
  if (isEditFlow) {
52867
- var _applicationDetails$a5, _applicationDetails$a6, _Digit, _Digit$Customizations, _Digit$Customizations2;
53326
+ var _applicationDetails$a6, _applicationDetails$a7, _updatePayload, _updatePayload$docume, _Digit, _Digit$Customizations, _Digit$Customizations2;
52868
53327
  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,
53328
+ id: applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a6 = applicationDetails.applicationData) === null || _applicationDetails$a6 === void 0 ? void 0 : _applicationDetails$a6.id,
52870
53329
  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, {
53330
+ 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
53331
  action: "RESUBMIT_APPLICATION"
52873
53332
  })
52874
53333
  });
53334
+ 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) {
53335
+ updatePayload.documents = mapExistingDocIdsToPayload(updatePayload.documents, existingDocs);
53336
+ }
52875
53337
  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
53338
  updatePayload = Digit.Customizations.WS.customiseUpdatePayloadOfWS((applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData) || {}, updatePayload, resolvedServiceType);
52877
53339
  }
@@ -52961,7 +53423,7 @@ const MutationApplication = () => {
52961
53423
  message: data.Errors[0].message || "Failed to submit application"
52962
53424
  });
52963
53425
  } else {
52964
- var _data$WaterConnection, _data$SewerageConnect, _Digit2, _Digit2$Customization, _Digit2$Customization2;
53426
+ var _data$WaterConnection, _data$SewerageConnect, _updatePayload2, _updatePayload2$docum, _Digit2, _Digit2$Customization, _Digit2$Customization2;
52965
53427
  const updateMutation = resolvedServiceType === "WATER" ? waterUpdateMutation : sewerageUpdateMutation;
52966
53428
  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
53429
  let updatePayload = _extends({}, createdConnection, {
@@ -52970,6 +53432,10 @@ const MutationApplication = () => {
52970
53432
  action: "APPLY_MUTATION"
52971
53433
  })
52972
53434
  });
53435
+ const combinedExistingDocs = [...existingDocs, ...((createdConnection === null || createdConnection === void 0 ? void 0 : createdConnection.documents) || [])];
53436
+ 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) {
53437
+ updatePayload.documents = mapExistingDocIdsToPayload(updatePayload.documents, combinedExistingDocs);
53438
+ }
52973
53439
  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
53440
  updatePayload = Digit.Customizations.WS.customiseUpdatePayloadOfWS(createdConnection, updatePayload, resolvedServiceType);
52975
53441
  }
@@ -53091,7 +53557,7 @@ const MutationApplication = () => {
53091
53557
  }
53092
53558
  }, currentStep === 1 && /*#__PURE__*/React.createElement(Step1_SearchConnection, {
53093
53559
  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 : "",
53560
+ defaultKNumber: isEditFlow ? applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a8 = applicationDetails.applicationData) === null || _applicationDetails$a8 === void 0 ? void 0 : _applicationDetails$a8.connectionNo : "",
53095
53561
  onNext: _ref => {
53096
53562
  let kNumber = _ref.kNumber,
53097
53563
  mobileNumber = _ref.mobileNumber,
@@ -53105,7 +53571,7 @@ const MutationApplication = () => {
53105
53571
  }), currentStep === 2 && /*#__PURE__*/React.createElement(Fragment$2, null, /*#__PURE__*/React.createElement(Step1_ExistingConnection, {
53106
53572
  t: t,
53107
53573
  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,
53574
+ propertyId: applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a9 = applicationDetails.applicationData) === null || _applicationDetails$a9 === void 0 ? void 0 : _applicationDetails$a9.propertyId,
53109
53575
  mobileNumber: authMobileNumber,
53110
53576
  onVerify: () => {
53111
53577
  setCompletedSteps(prev => new Set([...prev, 2]));
@@ -55212,6 +55678,18 @@ const CheckPage$4 = _ref2 => {
55212
55678
  }), /*#__PURE__*/React.createElement(Row, {
55213
55679
  label: t("WS_EMPLOYEE_DESIGNATION"),
55214
55680
  text: "" + t(checkForNA(djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.designation))
55681
+ }), (djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.document) && /*#__PURE__*/React.createElement(Row, {
55682
+ label: t("WS_UPLOAD_EMPLOYEE_ID_DOC"),
55683
+ text: /*#__PURE__*/React.createElement("span", {
55684
+ style: {
55685
+ display: "flex",
55686
+ alignItems: "center",
55687
+ gap: "8px",
55688
+ cursor: "pointer",
55689
+ color: "#f47738"
55690
+ },
55691
+ onClick: () => openFilePDF(djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.document)
55692
+ }, /*#__PURE__*/React.createElement(GenericFileIcon, null), " ", t("CS_COMMON_VIEW"))
55215
55693
  }))), /*#__PURE__*/React.createElement(CardSubHeader, null, t("WS_BANK_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, {
55216
55694
  style: {
55217
55695
  marginTop: "10px",