@djb25/digit-ui-module-ws 1.0.62 → 1.0.63

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, useMemo, useEffect, useRef, 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, SearchForm, SearchField, Dropdown, TextInput, Table, Banner, CardText, ActionBar, HomeIcon, AppContainer, ModuleHeader, ArrowLeft, PrivateRoute, VerticalTimeline, CollapsibleCardPage, LabelFieldPair, CardLabel, CardLabelError, CheckBox, LayoutWrapper, PrintBtnCommon, MultiLink, LinkButton, Toast, TickMark, FormStep, RadioOrSelect, CardHeader, CitizenInfoLabel, CardSubHeader, DatePicker, RadioButtons, UploadFile, ViewsIcon, Modal, DeleteIcon, WrapUnMaskComponent, MobileNumber, StatusTable, Row, Header, CardSectionHeader, InfoIcon, TextArea, FilterFormField, RemoveableTag, MultiSelectDropdown, InboxComposer, DropIcon, WSICon, EmployeeModuleCard, SearchAction, PopUp, DetailsCard, CloseSvg, Localities, DownloadBtnCommon, CollectionIcon, ResponseComposer, TelePhone, DisplayPhotos, PDFSvg, GenericFileIcon, EditIcon, Label, CardSectionSubText, DownloadIcon, CardLabelDesc, FormComposer, MultiUploadWrapper, Close as Close$e, BreakLine, AddIcon, CheckPoint, ConnectingCheckPoints, Menu, ButtonSelector, CitizenHomeCard } from '@djb25/digit-ui-react-components';
4
+ import { Loader, Card, KeyNote, SubmitBar, InfoBannerIcon, SearchForm, SearchField, Dropdown, TextInput, Table, Banner, CardText, ActionBar, HomeIcon, AppContainer, ModuleHeader, ArrowLeft, PrivateRoute, VerticalTimeline, CollapsibleCardPage, LabelFieldPair, CardLabel, CardLabelError, CheckBox, LayoutWrapper, PrintBtnCommon, MultiLink, LinkButton, Toast, TickMark, FormStep, RadioOrSelect, CardHeader, CitizenInfoLabel, CardSubHeader, DatePicker, RadioButtons, UploadFile, ViewsIcon, Modal, DeleteIcon, WrapUnMaskComponent, MobileNumber, StatusTable, Row, CardSectionHeader, InfoIcon, TextArea, Header, FilterFormField, RemoveableTag, MultiSelectDropdown, InboxComposer, DropIcon, WSICon, EmployeeModuleCard, SearchAction, PopUp, DetailsCard, CloseSvg, Localities, DownloadBtnCommon, CollectionIcon, ResponseComposer, TelePhone, DisplayPhotos, PDFSvg, GenericFileIcon, EditIcon, Label, CardSectionSubText, DownloadIcon, CardLabelDesc, FormComposer, MultiUploadWrapper, Close as Close$e, BreakLine, AddIcon, CheckPoint, ConnectingCheckPoints, 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';
@@ -17387,16 +17387,7 @@ const WSDisconnectionDocsRequired = _ref => {
17387
17387
  }
17388
17388
  })));
17389
17389
  }
17390
- return /*#__PURE__*/React.createElement("div", {
17391
- style: {
17392
- margin: "16px"
17393
- }
17394
- }, /*#__PURE__*/React.createElement(Header, {
17395
- styles: {
17396
- fontSize: "32px",
17397
- marginLeft: "18px"
17398
- }
17399
- }, t("WS_WATER_AND_SEWERAGE_DISCONNECTION")), /*#__PURE__*/React.createElement(Card, null, wsDocsLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement("div", {
17390
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Card, null, wsDocsLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement("div", {
17400
17391
  id: "documents-div"
17401
17392
  }, wsDocs === null || wsDocs === void 0 ? void 0 : (_wsDocs$Disconnection2 = wsDocs.DisconnectionDocuments) === null || _wsDocs$Disconnection2 === void 0 ? void 0 : _wsDocs$Disconnection2.map((doc, index) => {
17402
17393
  var _doc$dropdownData3;
@@ -19009,17 +19000,20 @@ const WSDisconnectionForm = _ref => {
19009
19000
  const _useState3 = useState(null),
19010
19001
  error = _useState3[0],
19011
19002
  setError = _useState3[1];
19012
- const _useState4 = useState([]),
19013
- disconnectionTypeList = _useState4[0],
19014
- setDisconnectionTypeList = _useState4[1];
19003
+ const _useState4 = useState(null),
19004
+ docError = _useState4[0],
19005
+ setDocError = _useState4[1];
19015
19006
  const _useState5 = useState([]),
19016
- disconnectionReasonList = _useState5[0],
19017
- setDisconnectionReasonList = _useState5[1];
19018
- const _useState6 = useState(false),
19019
- setCheckRequiredFields = _useState6[1];
19007
+ disconnectionTypeList = _useState5[0],
19008
+ setDisconnectionTypeList = _useState5[1];
19009
+ const _useState6 = useState([]),
19010
+ disconnectionReasonList = _useState6[0],
19011
+ setDisconnectionReasonList = _useState6[1];
19020
19012
  const _useState7 = useState(false),
19021
- isEnableLoader = _useState7[0],
19022
- setIsEnableLoader = _useState7[1];
19013
+ setCheckRequiredFields = _useState7[1];
19014
+ const _useState8 = useState(false),
19015
+ isEnableLoader = _useState8[0],
19016
+ setIsEnableLoader = _useState8[1];
19023
19017
  const _Digit$Hooks$ws$useMD = Digit.Hooks.ws.useMDMS(stateCode, "ws-services-masters", ["disconnectionType"]),
19024
19018
  isMdmsLoading = _Digit$Hooks$ws$useMD.isMdmsLoading,
19025
19019
  mdmsData = _Digit$Hooks$ws$useMD.data;
@@ -19047,7 +19041,7 @@ const WSDisconnectionForm = _ref => {
19047
19041
  };
19048
19042
  useEffect(() => {
19049
19043
  const oldData = _extends({}, disconnectionData);
19050
- oldData['documents'] = documents;
19044
+ oldData["documents"] = documents;
19051
19045
  setDisconnectionData(oldData);
19052
19046
  }, [documents]);
19053
19047
  useEffect(() => {
@@ -19092,25 +19086,29 @@ const WSDisconnectionForm = _ref => {
19092
19086
  const onSubmit = function (data) {
19093
19087
  try {
19094
19088
  const appDate = new Date();
19095
- const proposedDate = format(addDays(appDate, slaData === null || slaData === void 0 ? void 0 : slaData.slaDays), 'yyyy-MM-dd').toString();
19089
+ const slaDays = (slaData === null || slaData === void 0 ? void 0 : slaData.slaDays) || 0;
19090
+ const proposedDate = format(addDays(appDate, slaDays), "yyyy-MM-dd").toString();
19091
+ const selectedDateEpoch = data !== null && data !== void 0 && data.date ? convertDateToEpoch(data.date) : null;
19092
+ const proposedDateEpoch = convertDateToEpoch(proposedDate);
19093
+ const selectedDateIsInvalid = !(data !== null && data !== void 0 && data.date) || typeof selectedDateEpoch !== "number" || selectedDateEpoch < proposedDateEpoch;
19096
19094
  const _temp7 = function () {
19097
- if (convertDateToEpoch(data === null || data === void 0 ? void 0 : data.date) <= convertDateToEpoch(proposedDate)) {
19095
+ if (selectedDateIsInvalid) {
19098
19096
  setError({
19099
19097
  key: "error",
19100
19098
  message: "PROPOSED_DISCONNECTION_INVALID_DATE"
19101
19099
  });
19102
19100
  setTimeout(() => {
19103
- setError(false);
19101
+ setError(null);
19104
19102
  }, 3000);
19105
19103
  } else {
19106
19104
  const _temp6 = function (_data$type, _data$type$value) {
19107
- if ((data === null || data === void 0 ? void 0 : (_data$type = data.type) === null || _data$type === void 0 ? void 0 : (_data$type$value = _data$type.value) === null || _data$type$value === void 0 ? void 0 : _data$type$value.name) == "Temporary" && convertDateToEpoch(data === null || data === void 0 ? void 0 : data.endDate) <= convertDateToEpoch(data === null || data === void 0 ? void 0 : data.date)) {
19105
+ if ((data === null || data === void 0 ? void 0 : (_data$type = data.type) === null || _data$type === void 0 ? void 0 : (_data$type$value = _data$type.value) === null || _data$type$value === void 0 ? void 0 : _data$type$value.code) === "Temporary" && convertDateToEpoch(data === null || data === void 0 ? void 0 : data.endDate) <= convertDateToEpoch(data === null || data === void 0 ? void 0 : data.date)) {
19108
19106
  setError({
19109
19107
  key: "error",
19110
19108
  message: "PROPOSED_DISCONNECTION_INVALID_END_DATE"
19111
19109
  });
19112
19110
  setTimeout(() => {
19113
- setError(false);
19111
+ setError(null);
19114
19112
  }, 3000);
19115
19113
  } else {
19116
19114
  const _temp5 = function (_disconnectionData$re) {
@@ -19120,7 +19118,7 @@ const WSDisconnectionForm = _ref => {
19120
19118
  message: "PLEASE_FILL_MANDATORY_DETAILS"
19121
19119
  });
19122
19120
  setTimeout(() => {
19123
- setError(false);
19121
+ setError(null);
19124
19122
  }, 3000);
19125
19123
  } else {
19126
19124
  var _applicationData$appl;
@@ -19251,7 +19249,7 @@ const WSDisconnectionForm = _ref => {
19251
19249
  }
19252
19250
  };
19253
19251
  if (isMdmsLoading || wsDocsLoading || isEnableLoader || slaLoading) return /*#__PURE__*/React.createElement(Loader, null);
19254
- if (userType === 'citizen') {
19252
+ if (userType === "citizen") {
19255
19253
  var _disconnectionData$ty, _disconnectionData$ty2, _disconnectionData$ty3, _disconnectionData$ty4, _disconnectionData$ty5, _disconnectionData$re2, _disconnectionData$re3, _disconnectionData$re4, _disconnectionData$re5;
19256
19254
  return /*#__PURE__*/React.createElement("div", null, userType === "citizen" && /*#__PURE__*/React.createElement(DisconnectTimeline, {
19257
19255
  currentStep: 1
@@ -19364,8 +19362,8 @@ const WSDisconnectionForm = _ref => {
19364
19362
  onSubmit: () => {
19365
19363
  var _disconnectionData$ty6, _disconnectionData$ty7;
19366
19364
  const appDate = new Date();
19367
- const proposedDate = format(addDays(appDate, slaData === null || slaData === void 0 ? void 0 : slaData.slaDays), 'yyyy-MM-dd').toString();
19368
- if (convertDateToEpoch(disconnectionData === null || disconnectionData === void 0 ? void 0 : disconnectionData.date) <= convertDateToEpoch(proposedDate)) {
19365
+ const proposedDate = format(addDays(appDate, slaData === null || slaData === void 0 ? void 0 : slaData.slaDays), "yyyy-MM-dd").toString();
19366
+ if (convertDateToEpoch(disconnectionData === null || disconnectionData === void 0 ? void 0 : disconnectionData.date) < convertDateToEpoch(proposedDate)) {
19369
19367
  setError({
19370
19368
  key: "error",
19371
19369
  message: "PROPOSED_DISCONNECTION_INVALID_DATE"
@@ -19402,26 +19400,11 @@ const WSDisconnectionForm = _ref => {
19402
19400
  info: t("CS_COMMON_INFO")
19403
19401
  }));
19404
19402
  }
19405
- return /*#__PURE__*/React.createElement("div", {
19406
- style: {
19407
- margin: "16px"
19408
- }
19409
- }, /*#__PURE__*/React.createElement(Header, {
19410
- styles: {
19411
- fontSize: "32px",
19412
- marginLeft: "18px"
19413
- }
19414
- }, t("WS_WATER_AND_SEWERAGE_DISCONNECTION")), /*#__PURE__*/React.createElement(FormStep, {
19403
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(FormStep, {
19415
19404
  config: config,
19416
19405
  onSelect: handleEmployeeSubmit,
19417
19406
  onSkip: onSkip,
19418
19407
  t: t
19419
- }, /*#__PURE__*/React.createElement("div", {
19420
- style: {
19421
- padding: "10px",
19422
- paddingTop: "20px",
19423
- marginTop: "10px"
19424
- }
19425
19408
  }, /*#__PURE__*/React.createElement(CardSectionHeader, null, t("CS_TITLE_APPLICATION_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
19426
19409
  key: t("PDF_STATIC_LABEL_CONSUMER_NUMBER_LABEL"),
19427
19410
  label: "" + t("PDF_STATIC_LABEL_CONSUMER_NUMBER_LABEL"),
@@ -19545,18 +19528,23 @@ const WSDisconnectionForm = _ref => {
19545
19528
  key: index,
19546
19529
  document: document,
19547
19530
  t: t,
19548
- error: error,
19549
- setError: setError,
19531
+ error: docError,
19532
+ setError: setDocError,
19550
19533
  setDocuments: setDocuments,
19551
19534
  documents: documents,
19552
19535
  setCheckRequiredFields: setCheckRequiredFields
19553
19536
  });
19537
+ }), docError && /*#__PURE__*/React.createElement(Toast, {
19538
+ error: (docError === null || docError === void 0 ? void 0 : docError.key) === "error" ? true : false,
19539
+ label: t(docError === null || docError === void 0 ? void 0 : docError.message),
19540
+ warning: docError === null || docError === void 0 ? void 0 : docError.warning,
19541
+ onClose: () => setDocError(null)
19554
19542
  }), error && /*#__PURE__*/React.createElement(Toast, {
19555
19543
  error: (error === null || error === void 0 ? void 0 : error.key) === "error" ? true : false,
19556
19544
  label: t(error === null || error === void 0 ? void 0 : error.message),
19557
19545
  warning: error === null || error === void 0 ? void 0 : error.warning,
19558
19546
  onClose: () => setError(null)
19559
- }))), /*#__PURE__*/React.createElement(ActionBar, {
19547
+ })), /*#__PURE__*/React.createElement(ActionBar, {
19560
19548
  style: {
19561
19549
  display: "flex",
19562
19550
  justifyContent: "flex-end",
@@ -19576,7 +19564,6 @@ function SelectDocument$1(_ref2) {
19576
19564
  key = _ref2.key,
19577
19565
  doc = _ref2.document,
19578
19566
  setDocuments = _ref2.setDocuments,
19579
- error = _ref2.error,
19580
19567
  setError = _ref2.setError,
19581
19568
  documents = _ref2.documents,
19582
19569
  setCheckRequiredFields = _ref2.setCheckRequiredFields;
@@ -19585,19 +19572,19 @@ function SelectDocument$1(_ref2) {
19585
19572
  return item === null || item === void 0 ? void 0 : (_item$documentType = item.documentType) === null || _item$documentType === void 0 ? void 0 : _item$documentType.includes(doc === null || doc === void 0 ? void 0 : doc.code);
19586
19573
  })[0];
19587
19574
  const tenantId = Digit.ULBService.getCurrentTenantId();
19588
- const _useState8 = useState(filteredDocument ? _extends({}, filteredDocument, {
19575
+ const _useState9 = useState(filteredDocument ? _extends({}, filteredDocument, {
19589
19576
  active: true,
19590
19577
  code: filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.documentType,
19591
19578
  i18nKey: filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.documentType
19592
19579
  }) : (doc === null || doc === void 0 ? void 0 : (_doc$dropdownData = doc.dropdownData) === null || _doc$dropdownData === void 0 ? void 0 : _doc$dropdownData.length) === 1 ? doc === null || doc === void 0 ? void 0 : doc.dropdownData[0] : {}),
19593
- selectedDocument = _useState8[0],
19594
- setSelectedDocument = _useState8[1];
19595
- const _useState9 = useState(null),
19596
- file = _useState9[0],
19597
- setFile = _useState9[1];
19598
- const _useState0 = useState(() => (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.fileStoreId) || null),
19599
- uploadedFile = _useState0[0],
19600
- setUploadedFile = _useState0[1];
19580
+ selectedDocument = _useState9[0],
19581
+ setSelectedDocument = _useState9[1];
19582
+ const _useState0 = useState(null),
19583
+ file = _useState0[0],
19584
+ setFile = _useState0[1];
19585
+ const _useState1 = useState(() => (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.fileStoreId) || null),
19586
+ uploadedFile = _useState1[0],
19587
+ setUploadedFile = _useState1[1];
19601
19588
  const handleSelectDocument = value => setSelectedDocument(value);
19602
19589
  function selectfile(e) {
19603
19590
  setFile(e.target.files[0]);
@@ -19620,9 +19607,9 @@ function SelectDocument$1(_ref2) {
19620
19607
  useEffect(() => {
19621
19608
  (function () {
19622
19609
  try {
19623
- setError(null);
19624
19610
  const _temp0 = function () {
19625
19611
  if (file) {
19612
+ setError(null);
19626
19613
  const _temp9 = function () {
19627
19614
  if (file.size >= 5242880) {
19628
19615
  setError({
@@ -19691,8 +19678,7 @@ function SelectDocument$1(_ref2) {
19691
19678
  setUploadedFile(null);
19692
19679
  setCheckRequiredFields(true);
19693
19680
  },
19694
- message: uploadedFile ? "1 " + t("CS_ACTION_FILEUPLOADED") : t("ES_NO_FILE_SELECTED_LABEL"),
19695
- error: error
19681
+ message: uploadedFile ? "1 " + t("CS_ACTION_FILEUPLOADED") : t("ES_NO_FILE_SELECTED_LABEL")
19696
19682
  }))));
19697
19683
  }
19698
19684
 
@@ -43176,9 +43162,9 @@ function PropertyDocuments(_ref) {
43176
43162
  var _document$values;
43177
43163
  document === null || document === void 0 ? void 0 : (_document$values = document.values) === null || _document$values === void 0 ? void 0 : _document$values.forEach(value => {
43178
43164
  if (!value.isPhoto) {
43179
- var _ref2, _checkedMap$value$ori, _value$originalDoc, _value$originalDoc2;
43165
+ var _ref2, _checkedMap$value$fil, _value$originalDoc;
43180
43166
  requiredDocsCount++;
43181
- const isChecked = (_ref2 = (_checkedMap$value$ori = checkedMap[value === null || value === void 0 ? void 0 : (_value$originalDoc = value.originalDoc) === null || _value$originalDoc === void 0 ? void 0 : _value$originalDoc.id]) != null ? _checkedMap$value$ori : value === null || value === void 0 ? void 0 : (_value$originalDoc2 = value.originalDoc) === null || _value$originalDoc2 === void 0 ? void 0 : _value$originalDoc2.isVerified) != null ? _ref2 : false;
43167
+ const isChecked = (_ref2 = (_checkedMap$value$fil = checkedMap[value === null || value === void 0 ? void 0 : value.fileStoreId]) != null ? _checkedMap$value$fil : value === null || value === void 0 ? void 0 : (_value$originalDoc = value.originalDoc) === null || _value$originalDoc === void 0 ? void 0 : _value$originalDoc.isVerified) != null ? _ref2 : false;
43182
43168
  if (isChecked) {
43183
43169
  checkedCount++;
43184
43170
  }
@@ -43422,7 +43408,7 @@ function PropertyDocuments(_ref) {
43422
43408
  style: {
43423
43409
  cursor: "pointer"
43424
43410
  }
43425
- }, /*#__PURE__*/React.createElement(ViewsIcon, null)), !isPhoto && ((_ref3, _checkedMap$value$ori2, _value$originalDoc3, _value$originalDoc4, _value$originalDoc5, _value$originalDoc6, _value$originalDoc7) => {
43411
+ }, /*#__PURE__*/React.createElement(ViewsIcon, null)), !isPhoto && ((_ref3, _checkedMap$value$ori, _value$originalDoc2, _value$originalDoc3, _value$originalDoc4, _value$originalDoc5) => {
43426
43412
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
43427
43413
  onClick: () => {
43428
43414
  if (fileUrl) {
@@ -43464,7 +43450,7 @@ function PropertyDocuments(_ref) {
43464
43450
  margin: 0
43465
43451
  }
43466
43452
  }, /*#__PURE__*/React.createElement("input", {
43467
- key: "chk-" + (value === null || value === void 0 ? void 0 : (_value$originalDoc5 = value.originalDoc) === null || _value$originalDoc5 === void 0 ? void 0 : _value$originalDoc5.id) + "-" + (value === null || value === void 0 ? void 0 : (_value$originalDoc6 = value.originalDoc) === null || _value$originalDoc6 === void 0 ? void 0 : _value$originalDoc6.isVerified),
43453
+ key: "chk-" + (value === null || value === void 0 ? void 0 : value.fileStoreId) + "-" + (value === null || value === void 0 ? void 0 : (_value$originalDoc4 = value.originalDoc) === null || _value$originalDoc4 === void 0 ? void 0 : _value$originalDoc4.isVerified),
43468
43454
  type: "checkbox",
43469
43455
  className: "verify-doc-checkbox",
43470
43456
  style: {
@@ -43474,16 +43460,15 @@ function PropertyDocuments(_ref) {
43474
43460
  cursor: applicationStatus && applicationStatus !== "PENDING_FOR_DOCUMENT_VERIFICATION" ? "not-allowed" : "pointer"
43475
43461
  },
43476
43462
  disabled: applicationStatus && applicationStatus !== "PENDING_FOR_DOCUMENT_VERIFICATION",
43477
- defaultChecked: value === null || value === void 0 ? void 0 : (_value$originalDoc7 = value.originalDoc) === null || _value$originalDoc7 === void 0 ? void 0 : _value$originalDoc7.isVerified,
43463
+ defaultChecked: value === null || value === void 0 ? void 0 : (_value$originalDoc5 = value.originalDoc) === null || _value$originalDoc5 === void 0 ? void 0 : _value$originalDoc5.isVerified,
43478
43464
  onChange: e => {
43479
- var _value$originalDoc8;
43480
43465
  const checked = e.target.checked;
43481
43466
  if (value !== null && value !== void 0 && value.originalDoc) {
43482
43467
  value.originalDoc.isVerified = checked;
43483
43468
  }
43484
- if (value !== null && value !== void 0 && (_value$originalDoc8 = value.originalDoc) !== null && _value$originalDoc8 !== void 0 && _value$originalDoc8.id) {
43469
+ if (value !== null && value !== void 0 && value.fileStoreId) {
43485
43470
  setCheckedMap(prev => _extends({}, prev, {
43486
- [value.originalDoc.id]: checked
43471
+ [value.fileStoreId]: checked
43487
43472
  }));
43488
43473
  }
43489
43474
  }
@@ -45534,7 +45519,7 @@ function ApplicationDetailsActionBar(_ref) {
45534
45519
  if (typeof window !== "undefined" && typeof window.isDocumentsVerified !== "undefined") {
45535
45520
  return !window.isDocumentsVerified;
45536
45521
  }
45537
- return false;
45522
+ return true;
45538
45523
  }),
45539
45524
  isSubmitDisabled = _React$useState[0],
45540
45525
  setIsSubmitDisabled = _React$useState[1];
@@ -45547,7 +45532,10 @@ function ApplicationDetailsActionBar(_ref) {
45547
45532
  };
45548
45533
  if (typeof window !== "undefined") {
45549
45534
  window.addEventListener("DOCUMENTS_VERIFIED", handleDocVerification);
45550
- return () => window.removeEventListener("DOCUMENTS_VERIFIED", handleDocVerification);
45535
+ return () => {
45536
+ window.removeEventListener("DOCUMENTS_VERIFIED", handleDocVerification);
45537
+ delete window.isDocumentsVerified;
45538
+ };
45551
45539
  }
45552
45540
  }, []);
45553
45541
  if (window.location.href.includes("/obps") || window.location.href.includes("/noc")) {
@@ -46788,19 +46776,15 @@ const GetConnectionDetails = () => {
46788
46776
  onClick: props.onClick
46789
46777
  }, /*#__PURE__*/React.createElement(Close, null));
46790
46778
  };
46791
- return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
46792
- className: "employee-application-details",
46793
- style: {
46794
- marginBottom: "15px"
46795
- }
46796
- }, /*#__PURE__*/React.createElement("style", null, ".multilinkWrapper employee-mulitlink-main-divNew { max-width:100%; maegin-top:-20px}"), /*#__PURE__*/React.createElement("div", {
46779
+ return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement("div", {
46797
46780
  style: {
46798
- display: "flex"
46781
+ position: "relative"
46799
46782
  }
46800
46783
  }, dowloadOptions && dowloadOptions.length > 0 && /*#__PURE__*/React.createElement("div", {
46801
46784
  style: {
46802
- maxWidth: "100% !imnportant",
46803
- zIndex: "10"
46785
+ position: "absolute",
46786
+ right: "24px",
46787
+ zIndex: 11
46804
46788
  }
46805
46789
  }, /*#__PURE__*/React.createElement(MultiLink, {
46806
46790
  className: "multilinkWrapper employee-mulitlink-main-divNew",
@@ -46809,11 +46793,8 @@ const GetConnectionDetails = () => {
46809
46793
  options: dowloadOptions,
46810
46794
  downloadBtnClassName: "employee-download-btn-className",
46811
46795
  optionsClassName: "employee-options-btn-className",
46812
- ref: menuRef,
46813
- style: {
46814
- maxWidth: "100%"
46815
- }
46816
- })))), /*#__PURE__*/React.createElement(ApplicationDetails, {
46796
+ ref: menuRef
46797
+ })), /*#__PURE__*/React.createElement(ApplicationDetails, {
46817
46798
  applicationDetails: applicationDetails,
46818
46799
  isLoading: isLoading,
46819
46800
  isDataLoading: isLoading,
@@ -46828,7 +46809,7 @@ const GetConnectionDetails = () => {
46828
46809
  labelComponent: /*#__PURE__*/React.createElement(WSInfoLabel, {
46829
46810
  t: t
46830
46811
  })
46831
- }), ifUserRoleExists("WS_CEMP") && checkApplicationStatus && !(applicationDetails !== null && applicationDetails !== void 0 && applicationDetails.isDisconnectionDone) ? /*#__PURE__*/React.createElement(ActionBar, null, displayMenu ? /*#__PURE__*/React.createElement(Menu, {
46812
+ })), ifUserRoleExists("WS_CEMP") && checkApplicationStatus && !(applicationDetails !== null && applicationDetails !== void 0 && applicationDetails.isDisconnectionDone) ? /*#__PURE__*/React.createElement(ActionBar, null, displayMenu ? /*#__PURE__*/React.createElement(Menu, {
46832
46813
  options: showAction,
46833
46814
  localeKeyPrefix: "WS",
46834
46815
  t: t,
@@ -46897,7 +46878,7 @@ const GetConnectionDetails = () => {
46897
46878
  error: showActionToast.key,
46898
46879
  label: t("" + showActionToast.label),
46899
46880
  onClose: closeBillToast
46900
- })));
46881
+ }));
46901
46882
  };
46902
46883
 
46903
46884
  const ActivateConnection = () => {
@@ -49783,6 +49764,9 @@ const GetDisconnectionDetails = () => {
49783
49764
  const _useState2 = useState(null),
49784
49765
  showToast = _useState2[0],
49785
49766
  setShowToast = _useState2[1];
49767
+ const _React$useState = React.useState(typeof window !== "undefined" ? window.innerWidth < 768 : false),
49768
+ hideTimeline = _React$useState[0],
49769
+ setHideTimeline = _React$useState[1];
49786
49770
  const tenantId = Digit.ULBService.getCurrentTenantId();
49787
49771
  const applicationNumber = filters === null || filters === void 0 ? void 0 : filters.applicationNumber;
49788
49772
  const serviceType = filters === null || filters === void 0 ? void 0 : filters.service;
@@ -49919,23 +49903,34 @@ const GetDisconnectionDetails = () => {
49919
49903
  dowloadOptions.sort(function (a, b) {
49920
49904
  return a.order - b.order;
49921
49905
  });
49922
- return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
49923
- className: "employee-application-details",
49906
+ return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement("div", {
49907
+ className: "employee-main-application-details",
49924
49908
  style: {
49925
- marginBottom: "15px"
49909
+ display: "flex",
49910
+ gap: "20px"
49926
49911
  }
49927
49912
  }, /*#__PURE__*/React.createElement("div", {
49913
+ className: "workflow-timeline-wrapper no-scrollbar " + (hideTimeline ? "hide-workflow" : ""),
49928
49914
  style: {
49929
- display: "flex"
49915
+ flex: "1 1 300px",
49916
+ maxWidth: hideTimeline ? "fit-content" : "400px",
49917
+ transition: "max-width 0.3s"
49930
49918
  }
49931
- }, /*#__PURE__*/React.createElement("div", {
49919
+ }, /*#__PURE__*/React.createElement(WorkflowTimeline, {
49920
+ workflowDetails: workflowDetails,
49921
+ hideTimeline: hideTimeline,
49922
+ setHideTimeline: setHideTimeline
49923
+ })), /*#__PURE__*/React.createElement("div", {
49932
49924
  style: {
49933
- width: "70%"
49925
+ flex: "2 1 500px",
49926
+ minWidth: "300px",
49927
+ position: "relative"
49934
49928
  }
49935
- }, /*#__PURE__*/React.createElement(Header, null, t("WS_APPLICATION_DETAILS"), " ")), /*#__PURE__*/React.createElement("div", {
49929
+ }, /*#__PURE__*/React.createElement("div", {
49936
49930
  style: {
49937
- width: "30%",
49938
- zIndex: "10"
49931
+ position: "absolute",
49932
+ right: "24px",
49933
+ zIndex: 11
49939
49934
  }
49940
49935
  }, /*#__PURE__*/React.createElement(MultiLink, {
49941
49936
  className: "multilinkWrapper employee-mulitlink-main-divNew",
@@ -49945,7 +49940,7 @@ const GetDisconnectionDetails = () => {
49945
49940
  downloadBtnClassName: "employee-download-btn-className",
49946
49941
  optionsClassName: "employee-options-btn-className",
49947
49942
  ref: menuRef
49948
- })))), /*#__PURE__*/React.createElement(ApplicationDetails, {
49943
+ })), /*#__PURE__*/React.createElement(ApplicationDetails, {
49949
49944
  applicationDetails: applicationDetails,
49950
49945
  isLoading: isLoading || isServicesMasterLoading,
49951
49946
  isDataLoading: isLoading || isServicesMasterLoading,
@@ -49958,8 +49953,9 @@ const GetDisconnectionDetails = () => {
49958
49953
  setShowToast: setShowToast,
49959
49954
  closeToast: closeToast,
49960
49955
  timelineStatusPrefix: "WF_" + (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$p8 = applicationDetails.processInstancesDetails) === null || _applicationDetails$p8 === void 0 ? void 0 : (_applicationDetails$p9 = _applicationDetails$p8[0]) === null || _applicationDetails$p9 === void 0 ? void 0 : (_applicationDetails$p0 = _applicationDetails$p9.businessService) === null || _applicationDetails$p0 === void 0 ? void 0 : _applicationDetails$p0.toUpperCase()) + "_",
49961
- isInfoLabel: sessionStorage.getItem("isPrivacyEnabled") === "true" ? true : false
49962
- })));
49956
+ isInfoLabel: sessionStorage.getItem("isPrivacyEnabled") === "true" ? true : false,
49957
+ showTimeLine: false
49958
+ }))));
49963
49959
  };
49964
49960
 
49965
49961
  const ModifyApplicationDetails = () => {