@djb25/digit-ui-module-ws 1.0.37 → 1.0.38

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.
@@ -1,7 +1,7 @@
1
1
  import React, { useState, useEffect, useRef, useMemo, Fragment as Fragment$1, useReducer, useCallback } from 'react';
2
2
  import { useTranslation } from 'react-i18next';
3
3
  import { Link, useHistory, useLocation, Switch, Route, useRouteMatch, Redirect, useParams } from 'react-router-dom';
4
- import { Loader, Card, KeyNote, SubmitBar, InfoBannerIcon, Header, Banner, CardText, ActionBar, AppContainer, ModuleHeader, ArrowLeft, PrivateRoute, LayoutWrapper, HomeIcon, PrintBtnCommon, MultiLink, LinkButton, Toast, TickMark, FormStep, CardLabel, TextInput, RadioOrSelect, CardHeader, CitizenInfoLabel, CardSubHeader, LabelFieldPair, DatePicker, CollapsibleCardPage, Dropdown, RadioButtons, UploadFile, ViewsIcon, Modal, DeleteIcon, CardLabelError, WrapUnMaskComponent, MobileNumber, CheckBox, StatusTable, Row, CardSectionHeader, InfoIcon, TextArea, SearchField, FilterFormField, RemoveableTag, MultiSelectDropdown, InboxComposer, DropIcon, WSICon, EmployeeModuleCard, SearchAction, PopUp, DetailsCard, SearchForm, CloseSvg, Table, Localities, DownloadBtnCommon, CollectionIcon, ResponseComposer, TelePhone, DisplayPhotos, CheckPoint, ConnectingCheckPoints, ActionLinks, PDFSvg, GenericFileIcon, EditIcon, Label, AddressDetails, CardSectionSubText, DownloadIcon, CardLabelDesc, VerticalTimeline, FormComposer, MultiUploadWrapper, Close as Close$e, BreakLine, Menu, ButtonSelector, CitizenHomeCard } from '@djb25/digit-ui-react-components';
4
+ import { Loader, Card, KeyNote, SubmitBar, InfoBannerIcon, Header, Banner, CardText, ActionBar, HomeIcon, AppContainer, ModuleHeader, ArrowLeft, PrivateRoute, LayoutWrapper, PrintBtnCommon, MultiLink, LinkButton, Toast, TickMark, FormStep, CardLabel, TextInput, RadioOrSelect, CardHeader, CitizenInfoLabel, CardSubHeader, LabelFieldPair, DatePicker, CollapsibleCardPage, Dropdown, RadioButtons, UploadFile, ViewsIcon, Modal, DeleteIcon, CardLabelError, WrapUnMaskComponent, MobileNumber, CheckBox, StatusTable, Row, CardSectionHeader, InfoIcon, TextArea, SearchField, FilterFormField, RemoveableTag, MultiSelectDropdown, InboxComposer, DropIcon, WSICon, EmployeeModuleCard, SearchAction, PopUp, DetailsCard, SearchForm, CloseSvg, Table, Localities, DownloadBtnCommon, CollectionIcon, ResponseComposer, TelePhone, DisplayPhotos, CheckPoint, ConnectingCheckPoints, ActionLinks, PDFSvg, GenericFileIcon, EditIcon, Label, AddressDetails, CardSectionSubText, DownloadIcon, CardLabelDesc, VerticalTimeline, FormComposer, MultiUploadWrapper, Close as Close$e, BreakLine, Menu, ButtonSelector, CitizenHomeCard } from '@djb25/digit-ui-react-components';
5
5
  import { useForm, Controller, useWatch, useFormContext } from 'react-hook-form';
6
6
  import { read, utils as utils$1 } from 'xlsx';
7
7
  import { useQueryClient } from 'react-query';
@@ -1748,11 +1748,8 @@ const ifUserRoleExists = role => {
1748
1748
  return true;
1749
1749
  } else return false;
1750
1750
  };
1751
- const checkForNotNull = (value = "") => {
1752
- return value && value != null && value != undefined && value != "" ? true : false;
1753
- };
1754
1751
  const checkForNA = (value = "") => {
1755
- return checkForNotNull(value) ? value : "CS_NA";
1752
+ return value && value != null && value !== undefined && value !== "" && value !== "Image" ? value : " NA";
1756
1753
  };
1757
1754
 
1758
1755
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
@@ -8431,17 +8428,21 @@ const App = ({
8431
8428
  const {
8432
8429
  t
8433
8430
  } = useTranslation();
8431
+ let isMobile = window.Digit.Utils.browser.isMobile();
8434
8432
  let isCommonPTPropertyScreen = window.location.href.includes("/ws/create-application/property-details");
8435
8433
  let isAcknowledgement = window.location.href.includes("/acknowledgement") || window.location.href.includes("/disconnect-acknowledge");
8436
8434
  const WSDisconnectAcknowledgement = (_Digit = Digit) === null || _Digit === void 0 ? void 0 : (_Digit$ComponentRegis = _Digit.ComponentRegistryService) === null || _Digit$ComponentRegis === void 0 ? void 0 : _Digit$ComponentRegis.getComponent("WSDisconnectAcknowledgement");
8437
8435
  const WSRestorationAcknowledgement = (_Digit2 = Digit) === null || _Digit2 === void 0 ? void 0 : (_Digit2$ComponentRegi = _Digit2.ComponentRegistryService) === null || _Digit2$ComponentRegi === void 0 ? void 0 : _Digit2$ComponentRegi.getComponent("WSRestorationAcknowledgement");
8438
8436
  const crumbs = [{
8439
- path: "/digit-ui/citizen",
8440
- label: t("CS_COMMON_HOME"),
8441
- show: true
8437
+ path: "/digit-ui/employee",
8438
+ show: true,
8439
+ style: isMobile ? {
8440
+ width: "20%"
8441
+ } : {},
8442
+ icon: HomeIcon
8442
8443
  }, {
8443
8444
  path: "/digit-ui/citizen/ws/create-application",
8444
- label: t("CS_WS_CREATE_APPLICATION"),
8445
+ label: t("WS_COMMON_APPL_NEW_CONNECTION"),
8445
8446
  show: location.pathname.includes("/create-application") || location.pathname.includes("/info")
8446
8447
  }, {
8447
8448
  path: "/digit-ui/citizen/ws/search",
@@ -8449,7 +8450,7 @@ const App = ({
8449
8450
  show: location.pathname.includes("/search")
8450
8451
  }, {
8451
8452
  path: "/digit-ui/citizen/ws/my-applications",
8452
- label: t("CS_WS_MY_APPLICATIONS"),
8453
+ label: t("CS_HOME_MY_APPLICATIONS"),
8453
8454
  show: location.pathname.includes("/my-applications")
8454
8455
  }, {
8455
8456
  path: "/digit-ui/citizen/ws/my-connections",
@@ -8465,7 +8466,7 @@ const App = ({
8465
8466
  show: location.pathname.includes("/my-payments")
8466
8467
  }, {
8467
8468
  path: "/digit-ui/citizen/ws/old-application",
8468
- label: t("WS_OLD_APPLICATION"),
8469
+ label: t("WS_COMMON_APPL_NEW_CONNECTION"),
8469
8470
  show: location.pathname.includes("/old-application")
8470
8471
  }];
8471
8472
  const getDynamicBreadcrumbs = () => {
@@ -10834,7 +10835,8 @@ const ConnectionDetails = _props => {
10834
10835
  },
10835
10836
  institutionName: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.institutionName) || "",
10836
10837
  natureOfWork: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.natureOfWork) || "",
10837
- orgDeptDocument: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.orgDeptDocument) || ""
10838
+ orgDeptDocument: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.orgDeptDocument) || "",
10839
+ orgDeptDocumentName: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.orgDeptDocumentName) || ""
10838
10840
  }
10839
10841
  });
10840
10842
  const formValue = watch();
@@ -10870,6 +10872,7 @@ const ConnectionDetails = _props => {
10870
10872
  const fsId = 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;
10871
10873
  setUploadedFile(fsId);
10872
10874
  setValue("orgDeptDocument", fsId);
10875
+ setValue("orgDeptDocumentName", file.name);
10873
10876
  } else {
10874
10877
  setFileUploadError(t("CS_FILE_UPLOAD_ERROR") || "File Upload Error");
10875
10878
  }
@@ -11252,7 +11255,15 @@ const ConnectionDetails = _props => {
11252
11255
  props.onChange(null);
11253
11256
  },
11254
11257
  message: uploadedFile ? `1 ${t("WS_ACTION_FILEUPLOADED")}` : t("WS_ACTION_NO_FILEUPLOADED"),
11255
- accept: "image/*, .pdf"
11258
+ accept: "image/*, .pdf",
11259
+ uploadedFiles: uploadedFile && !file ? [[(connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.orgDeptDocumentName) || "Document", {
11260
+ fileStoreId: uploadedFile
11261
+ }]] : undefined,
11262
+ removeTargetedFile: () => {
11263
+ setUploadedFile(null);
11264
+ setFile(null);
11265
+ props.onChange(null);
11266
+ }
11256
11267
  })
11257
11268
  })), uploadedFile && /*#__PURE__*/React.createElement("div", {
11258
11269
  onClick: viewDocument,
@@ -15268,6 +15279,7 @@ function SelectDocument({
15268
15279
  const data = [...filteredDocumentsByFileStoreId, {
15269
15280
  documentType: selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code,
15270
15281
  fileStoreId: uploadedFile,
15282
+ fileName: (file === null || file === void 0 ? void 0 : file.name) || (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.fileName) || "",
15271
15283
  documentUid: documentUid,
15272
15284
  i18nKey: selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code,
15273
15285
  id: selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.id,
@@ -15378,7 +15390,7 @@ function SelectDocument({
15378
15390
  buttonType: "button",
15379
15391
  error: !uploadedFile,
15380
15392
  accept: (doc === null || doc === void 0 ? void 0 : doc.code) === "OWNER.APPLICANTPHOTO" ? "image/jpeg, image/png, .jpg, .jpeg, .png" : "image/*, .pdf, .png, .jpeg, .jpg",
15381
- uploadedFiles: uploadedFile && file && isCameraFile ? [[(file === null || file === void 0 ? void 0 : file.name) || "applicant_photo.jpg", {
15393
+ uploadedFiles: uploadedFile && !file ? [[(filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.fileName) || (file === null || file === void 0 ? void 0 : file.name) || t("CS_COMMON_DOCUMENT"), {
15382
15394
  fileStoreId: uploadedFile
15383
15395
  }]] : undefined,
15384
15396
  removeTargetedFile: () => {
@@ -19637,7 +19649,7 @@ const WSDeclaration = ({
19637
19649
  clearErrors,
19638
19650
  tenantId
19639
19651
  }) => {
19640
- var _formData$declaration, _formData$declaration2, _formData$declaration3, _formData$declaration4, _formData$declaration5, _formData$declaration6, _formData$declaration7, _formData$declaration8, _formData$declaration0;
19652
+ var _formData$declaration, _formData$declaration2, _formData$declaration3, _formData$declaration4, _formData$declaration5, _formData$declaration6, _formData$declaration7, _formData$declaration8, _formData$declaration9, _formData$declaration1;
19641
19653
  const {
19642
19654
  t
19643
19655
  } = useTranslation();
@@ -19659,7 +19671,8 @@ const WSDeclaration = ({
19659
19671
  },
19660
19672
  signatureFile: (formData === null || formData === void 0 ? void 0 : (_formData$declaration5 = formData.declarationData) === null || _formData$declaration5 === void 0 ? void 0 : _formData$declaration5.signatureFile) || null,
19661
19673
  signatureFileStoreId: (formData === null || formData === void 0 ? void 0 : (_formData$declaration6 = formData.declarationData) === null || _formData$declaration6 === void 0 ? void 0 : _formData$declaration6.signatureFileStoreId) || null,
19662
- declarations: (formData === null || formData === void 0 ? void 0 : (_formData$declaration7 = formData.declarationData) === null || _formData$declaration7 === void 0 ? void 0 : _formData$declaration7.declarations) || Array(9).fill((formData === null || formData === void 0 ? void 0 : (_formData$declaration8 = formData.declarationData) === null || _formData$declaration8 === void 0 ? void 0 : _formData$declaration8.agree) || false)
19674
+ signatureFileName: (formData === null || formData === void 0 ? void 0 : (_formData$declaration7 = formData.declarationData) === null || _formData$declaration7 === void 0 ? void 0 : _formData$declaration7.signatureFileName) || "",
19675
+ declarations: (formData === null || formData === void 0 ? void 0 : (_formData$declaration8 = formData.declarationData) === null || _formData$declaration8 === void 0 ? void 0 : _formData$declaration8.declarations) || Array(9).fill((formData === null || formData === void 0 ? void 0 : (_formData$declaration9 = formData.declarationData) === null || _formData$declaration9 === void 0 ? void 0 : _formData$declaration9.agree) || false)
19663
19676
  }
19664
19677
  });
19665
19678
  const formValue = watch();
@@ -19679,14 +19692,14 @@ const WSDeclaration = ({
19679
19692
  i18nKey: "WS_SUBMITTED_BY_SELF"
19680
19693
  }];
19681
19694
  useEffect(() => {
19682
- var _formData$declaration9;
19683
- const fsId = (formData === null || formData === void 0 ? void 0 : (_formData$declaration9 = formData.declarationData) === null || _formData$declaration9 === void 0 ? void 0 : _formData$declaration9.signatureFileStoreId) || null;
19695
+ var _formData$declaration0;
19696
+ const fsId = (formData === null || formData === void 0 ? void 0 : (_formData$declaration0 = formData.declarationData) === null || _formData$declaration0 === void 0 ? void 0 : _formData$declaration0.signatureFileStoreId) || null;
19684
19697
  const currentFsId = signatureFileStoreId || null;
19685
19698
  if (fsId !== currentFsId) {
19686
19699
  setSignatureFileStoreId(fsId);
19687
19700
  setValue("signatureFileStoreId", fsId);
19688
19701
  }
19689
- }, [formData === null || formData === void 0 ? void 0 : (_formData$declaration0 = formData.declarationData) === null || _formData$declaration0 === void 0 ? void 0 : _formData$declaration0.signatureFileStoreId]);
19702
+ }, [formData === null || formData === void 0 ? void 0 : (_formData$declaration1 = formData.declarationData) === null || _formData$declaration1 === void 0 ? void 0 : _formData$declaration1.signatureFileStoreId]);
19690
19703
  const lastSentValue = React.useRef((formData === null || formData === void 0 ? void 0 : formData.declarationData) || null);
19691
19704
  useEffect(() => {
19692
19705
  const currentValues = {
@@ -19695,8 +19708,8 @@ const WSDeclaration = ({
19695
19708
  signatureFile
19696
19709
  };
19697
19710
  if (!lodash.isEqual(lastSentValue.current, currentValues)) {
19698
- lastSentValue.current = currentValues;
19699
19711
  const timer = setTimeout(() => {
19712
+ lastSentValue.current = currentValues;
19700
19713
  onSelect(config === null || config === void 0 ? void 0 : config.key, currentValues);
19701
19714
  }, 200);
19702
19715
  return () => clearTimeout(timer);
@@ -19717,6 +19730,7 @@ const WSDeclaration = ({
19717
19730
  setSignatureFile(file);
19718
19731
  setValue("signatureFileStoreId", fsId);
19719
19732
  setValue("signatureFile", file);
19733
+ setValue("signatureFileName", file.name);
19720
19734
  }
19721
19735
  } catch (err) {
19722
19736
  console.error("Signature upload failed", err);
@@ -19829,7 +19843,17 @@ const WSDeclaration = ({
19829
19843
  width: "100%"
19830
19844
  },
19831
19845
  buttonType: "button",
19832
- accept: "image/*, .pdf, .png, .jpeg, .jpg"
19846
+ accept: "image/*, .pdf, .png, .jpeg, .jpg",
19847
+ uploadedFiles: signatureFileStoreId && !signatureFile ? [[(formValue === null || formValue === void 0 ? void 0 : formValue.signatureFileName) || "Document", {
19848
+ fileStoreId: signatureFileStoreId
19849
+ }]] : undefined,
19850
+ removeTargetedFile: () => {
19851
+ setSignatureFile(null);
19852
+ setSignatureFileStoreId(null);
19853
+ setValue("signatureFile", null);
19854
+ setValue("signatureFileStoreId", null);
19855
+ setValue("signatureFileName", "");
19856
+ }
19833
19857
  })), signatureFileStoreId && /*#__PURE__*/React.createElement("div", {
19834
19858
  onClick: viewDocument,
19835
19859
  style: {
@@ -31999,8 +32023,11 @@ const WSInfoPage = () => {
31999
32023
  name: "mobileNumber",
32000
32024
  value: searchMobileNumber,
32001
32025
  onChange: e => {
32002
- setSearchMobileNumber(e.target.value);
32003
- setSelectedProperty(null);
32026
+ const val = e.target.value;
32027
+ if (val.length <= 10) {
32028
+ setSearchMobileNumber(val);
32029
+ setSelectedProperty(null);
32030
+ }
32004
32031
  },
32005
32032
  placeholder: t("Enter mobile number"),
32006
32033
  maxLength: 10
@@ -47752,13 +47779,47 @@ const CheckPage$4 = ({
47752
47779
  onSubmit,
47753
47780
  onEdit
47754
47781
  }) => {
47755
- var _data$cpt, _data$ConnectionDetai, _data$connectionDetai, _data$ConnectionHolde, _data$connectionHolde, _data$useDetails, _data$bankDetails, _data$DocumentsRequir, _data$documents, _data$djbEmployee, _connectionDetails, _connectionDetails$se, _connectionDetails2, _connectionDetails2$s, _connectionDetails3, _connectionDetails4, _connectionDetails4$c, _connectionDetails5, _connectionDetails5$c, _connectionDetails6, _connectionDetails7, _connectionDetails7$w, _connectionDetails8, _connectionDetails8$w, _connectionDetails9, _connectionDetails0, _connectionDetails0$a, _connectionDetails1, _connectionDetails1$a, _connectionDetails10, _connectionDetails11, _connectionDetails11$, _connectionDetails12, _connectionDetails12$, _connectionDetails13, _connectionDetails14, _connectionDetails14$, _connectionDetails15, _connectionDetails15$, _connectionDetails16, _connectionDetails16$, _connectionDetails17, _connectionDetails18, _connectionDetails19, _connectionDetails20, _holderDetails, _holderDetails2, _holderDetails3, _holderDetails4, _holderDetails4$gende, _holderDetails5, _holderDetails5$gende, _holderDetails6, _holderDetails7, _holderDetails8, _holderDetails8$relat, _holderDetails9, _holderDetails9$relat, _holderDetails0, _holderDetails1, _holderDetails10, _holderDetails11, _propertyAddress, _propertyAddress$zro, _propertyAddress2, _propertyAddress3, _propertyAddress4, _propertyAddress4$add, _propertyAddress5, _propertyAddress5$add, _propertyAddress6, _propertyAddress6$add, _propertyAddress7, _propertyAddress8, _propertyAddress8$cit, _propertyAddress9, _propertyAddress9$cit, _propertyAddress0, _propertyAddress1, _propertyAddress10, _propertyAddress11, _propertyAddress11$lo, _propertyAddress12, _propertyAddress12$lo, _propertyAddress13, _propertyAddress14, _propertyAddress14$su, _propertyAddress15, _propertyAddress15$su, _propertyAddress16, _propertyAddress17, _propertyAddress18, _propertyAddress19, _propertyAddress20, _propertyAddress21, _propertyAddress22, _propertyAddress23, _propertyAddress24, _propertyAddress25, _propertyAddress26, _propertyAddress26$as, _propertyAddress27, _propertyAddress27$as, _propertyAddress28, _propertyAddress29, _propertyAddress29$bl, _propertyAddress30, _propertyAddress30$bl, _propertyAddress31, _propertyAddress32, _propertyAddress32$wa, _propertyAddress33, _propertyAddress33$wa, _propertyAddress34, _propertyAddress35, _propertyAddress35$zo, _propertyAddress36, _propertyAddress36$zo, _propertyAddress37, _propertyAddress38, _propertyAddress39, _propertyAddress40, _propertyAddress41, _useDetails$categoryT, _useDetails$categoryT2, _useDetails$propertyC, _useDetails$propertyC2, _useDetails$propertyT, _useDetails$propertyT2, _useDetails$WaterConn, _useDetails$WaterConn2, _useDetails$waterConn, _useDetails$waterConn2, _useDetails$noOfFloor, _useDetails$noOfFloor2, _useDetails$SelectYea, _useDetails$SelectYea2, _useDetails$SelectYea3, _useDetails$construct, _useDetails$construct2;
47782
+ var _data$cpt, _data$ConnectionDetai, _data$connectionDetai, _data$ConnectionHolde, _data$connectionHolde, _data$useDetails, _data$bankDetails, _data$DocumentsRequir, _data$documents, _data$djbEmployee, _connectionDetails, _connectionDetails$se, _connectionDetails2, _connectionDetails2$s, _connectionDetails3, _connectionDetails4, _connectionDetails4$c, _connectionDetails5, _connectionDetails5$c, _connectionDetails6, _connectionDetails7, _connectionDetails7$w, _connectionDetails8, _connectionDetails8$w, _connectionDetails9, _connectionDetails0, _connectionDetails0$a, _connectionDetails1, _connectionDetails1$a, _connectionDetails10, _connectionDetails11, _connectionDetails11$, _connectionDetails12, _connectionDetails12$, _connectionDetails13, _connectionDetails14, _connectionDetails14$, _connectionDetails15, _connectionDetails15$, _connectionDetails16, _connectionDetails16$, _connectionDetails17, _connectionDetails18, _connectionDetails19, _connectionDetails20, _holderDetails, _holderDetails2, _holderDetails3, _holderDetails4, _holderDetails4$gende, _holderDetails5, _holderDetails5$gende, _holderDetails6, _holderDetails7, _holderDetails8, _holderDetails8$relat, _holderDetails9, _holderDetails9$relat, _holderDetails0, _holderDetails1, _holderDetails10, _holderDetails11, _propertyAddress, _propertyAddress$zro, _propertyAddress2, _propertyAddress3, _propertyAddress4, _propertyAddress4$add, _propertyAddress5, _propertyAddress5$add, _propertyAddress6, _propertyAddress6$add, _propertyAddress7, _propertyAddress8, _propertyAddress8$cit, _propertyAddress9, _propertyAddress9$cit, _propertyAddress0, _propertyAddress1, _propertyAddress10, _propertyAddress11, _propertyAddress11$lo, _propertyAddress12, _propertyAddress12$lo, _propertyAddress13, _propertyAddress14, _propertyAddress14$su, _propertyAddress15, _propertyAddress15$su, _propertyAddress16, _propertyAddress17, _propertyAddress18, _propertyAddress19, _propertyAddress20, _propertyAddress21, _propertyAddress22, _propertyAddress23, _propertyAddress24, _propertyAddress25, _propertyAddress26, _propertyAddress26$as, _propertyAddress27, _propertyAddress27$as, _propertyAddress28, _propertyAddress29, _propertyAddress29$bl, _propertyAddress30, _propertyAddress30$bl, _propertyAddress31, _propertyAddress32, _propertyAddress32$wa, _propertyAddress33, _propertyAddress33$wa, _propertyAddress34, _propertyAddress35, _propertyAddress35$zo, _propertyAddress36, _propertyAddress36$zo, _propertyAddress37, _propertyAddress38, _propertyAddress39, _propertyAddress40, _propertyAddress41, _useDetails$categoryT, _useDetails$categoryT2, _useDetails$propertyC, _useDetails$propertyC2, _useDetails$propertyT, _useDetails$propertyT2, _useDetails$WaterConn, _useDetails$WaterConn2, _useDetails$waterConn, _useDetails$waterConn2, _useDetails$noOfFloor, _useDetails$noOfFloor2, _useDetails$SelectYea, _useDetails$SelectYea2, _useDetails$SelectYea3, _useDetails$construct, _useDetails$construct2, _declaration$submitte, _declaration$submitte2, _declaration$signatur;
47756
47783
  const {
47757
47784
  t
47758
47785
  } = useTranslation();
47759
47786
  const [showDocModal, setShowDocModal] = useState(false);
47760
47787
  const [docFileUrl, setDocFileUrl] = useState("");
47761
47788
  const [docFileType, setDocFileType] = useState("");
47789
+ const handleViewDocument = async fileStoreId => {
47790
+ if (fileStoreId) {
47791
+ if (typeof fileStoreId === "object" && fileStoreId.type) {
47792
+ const fileURL = URL.createObjectURL(fileStoreId);
47793
+ setDocFileUrl(fileURL);
47794
+ if (fileStoreId.type.includes("pdf")) {
47795
+ setDocFileType("pdf");
47796
+ } else {
47797
+ setDocFileType("image");
47798
+ }
47799
+ setShowDocModal(true);
47800
+ } else {
47801
+ try {
47802
+ const res = await Digit.UploadServices.FileFetchbyid(fileStoreId, Digit.ULBService.getStateId());
47803
+ if (res !== null && res !== void 0 && res.data) {
47804
+ const blob = res.data instanceof Blob ? res.data : new Blob([res.data], {
47805
+ type: res.headers["content-type"] || res.headers["Content-Type"] || "image/jpeg"
47806
+ });
47807
+ const fileURL = URL.createObjectURL(blob);
47808
+ setDocFileUrl(fileURL);
47809
+ const contentType = res.headers["content-type"] || res.headers["Content-Type"] || "";
47810
+ if (contentType.toLowerCase().includes("pdf")) {
47811
+ setDocFileType("pdf");
47812
+ } else {
47813
+ setDocFileType("image");
47814
+ }
47815
+ setShowDocModal(true);
47816
+ }
47817
+ } catch (err) {
47818
+ console.error("Failed to fetch file URL via FileFetchbyid", err);
47819
+ }
47820
+ }
47821
+ }
47822
+ };
47762
47823
  const cpt = (data === null || data === void 0 ? void 0 : (_data$cpt = data.cpt) === null || _data$cpt === void 0 ? void 0 : _data$cpt.details) || {};
47763
47824
  let propertyAddress = (data === null || data === void 0 ? void 0 : data.propertyAddress) || {};
47764
47825
  if (Object.keys(propertyAddress).length === 0) {
@@ -47776,6 +47837,7 @@ const CheckPage$4 = ({
47776
47837
  const useDetails = (data === null || data === void 0 ? void 0 : (_data$useDetails = data.useDetails) === null || _data$useDetails === void 0 ? void 0 : _data$useDetails.useDetails) || (data === null || data === void 0 ? void 0 : data.useDetails) || {};
47777
47838
  const bankDetails = (data === null || data === void 0 ? void 0 : (_data$bankDetails = data.bankDetails) === null || _data$bankDetails === void 0 ? void 0 : _data$bankDetails.bankDetails) || (data === null || data === void 0 ? void 0 : data.bankDetails) || {};
47778
47839
  const documents = (data === null || data === void 0 ? void 0 : (_data$DocumentsRequir = data.DocumentsRequired) === null || _data$DocumentsRequir === void 0 ? void 0 : _data$DocumentsRequir.documents) || (data === null || data === void 0 ? void 0 : (_data$documents = data.documents) === null || _data$documents === void 0 ? void 0 : _data$documents.documents) || [];
47840
+ const declaration = (data === null || data === void 0 ? void 0 : data.declarationData) || (data === null || data === void 0 ? void 0 : data.declaration) || {};
47779
47841
  const djbEmployee = (data === null || data === void 0 ? void 0 : (_data$djbEmployee = data.djbEmployee) === null || _data$djbEmployee === void 0 ? void 0 : _data$djbEmployee.djbEmployee) || (data === null || data === void 0 ? void 0 : data.djbEmployee) || {};
47780
47842
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Card, {
47781
47843
  className: "overflow-y-scroll"
@@ -48039,6 +48101,34 @@ const CheckPage$4 = ({
48039
48101
  onClick: () => openFilePDF((doc === null || doc === void 0 ? void 0 : doc.fileStoreId) || (doc === null || doc === void 0 ? void 0 : doc.documentUid))
48040
48102
  }, /*#__PURE__*/React.createElement(GenericFileIcon, null), " ", t("CS_COMMON_VIEW"))
48041
48103
  }));
48104
+ })), /*#__PURE__*/React.createElement(CardSubHeader, null, t("WS_DECLARATION")), /*#__PURE__*/React.createElement(StatusTable, {
48105
+ style: {
48106
+ marginTop: "10px",
48107
+ marginBottom: "30px"
48108
+ }
48109
+ }, /*#__PURE__*/React.createElement(Row, {
48110
+ label: t("WS_SUBMITTED_BY"),
48111
+ text: `${t((declaration === null || declaration === void 0 ? void 0 : (_declaration$submitte = declaration.submittedBy) === null || _declaration$submitte === void 0 ? void 0 : _declaration$submitte.name) || (declaration === null || declaration === void 0 ? void 0 : (_declaration$submitte2 = declaration.submittedBy) === null || _declaration$submitte2 === void 0 ? void 0 : _declaration$submitte2.code) || (declaration === null || declaration === void 0 ? void 0 : declaration.submittedBy))}`,
48112
+ actionButton: /*#__PURE__*/React.createElement(ActionButton, {
48113
+ onClick: onEdit
48114
+ })
48115
+ }), ((declaration === null || declaration === void 0 ? void 0 : declaration.signatureFileStoreId) || (declaration === null || declaration === void 0 ? void 0 : declaration.signatureFile)) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
48116
+ label: t("WS_UPLOAD_SIGNATURE_FILE"),
48117
+ text: (declaration === null || declaration === void 0 ? void 0 : declaration.signatureFileName) || (declaration === null || declaration === void 0 ? void 0 : (_declaration$signatur = declaration.signatureFile) === null || _declaration$signatur === void 0 ? void 0 : _declaration$signatur.name) || "Document"
48118
+ }), /*#__PURE__*/React.createElement(Row, {
48119
+ text: /*#__PURE__*/React.createElement("span", {
48120
+ style: {
48121
+ display: "flex",
48122
+ alignItems: "center",
48123
+ gap: "8px",
48124
+ cursor: "pointer",
48125
+ color: "#f47738"
48126
+ },
48127
+ onClick: () => handleViewDocument((declaration === null || declaration === void 0 ? void 0 : declaration.signatureFileStoreId) || (declaration === null || declaration === void 0 ? void 0 : declaration.signatureFile))
48128
+ }, /*#__PURE__*/React.createElement(GenericFileIcon, null), " ", t("CS_COMMON_VIEW"))
48129
+ })), /*#__PURE__*/React.createElement(Row, {
48130
+ label: t("WS_I_AGREE_TO_ALL_DECLARATIONS"),
48131
+ text: declaration !== null && declaration !== void 0 && declaration.agree ? t("Yes") : t("No")
48042
48132
  }))), /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
48043
48133
  label: t("CS_COMMON_SUBMIT"),
48044
48134
  onSubmit: onSubmit,
@@ -48684,7 +48774,7 @@ const OLDApplication = () => {
48684
48774
  className: "employee-form-section-wrapper"
48685
48775
  }, /*#__PURE__*/React.createElement(VerticalTimeline, {
48686
48776
  config: timelineConfig,
48687
- currentActiveIndex: 4,
48777
+ currentActiveIndex: 9,
48688
48778
  showFinalStep: false
48689
48779
  }), /*#__PURE__*/React.createElement(CheckPage$4, {
48690
48780
  data: sessionFormData,