@mseva/upyog-ui-module-chb 1.1.61 → 1.1.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +579 -489
- package/dist/index.modern.js.map +1 -1
- package/package.json +2 -2
package/dist/index.modern.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TickMark, CardSubHeader, Modal as Modal$1, CardLabelDesc, CardLabel, CardText, Card, FormStep, Dropdown, TextArea, Loader as Loader$1, TextInput, MobileNumber, Toast, LabelFieldPair, UploadFile, Table, KeyNote, SubmitBar, CardHeader, InfoIcon, Calender,
|
|
2
|
-
import React, { useState, useEffect, useRef, Fragment as Fragment$1,
|
|
1
|
+
import { TickMark, CardSubHeader, Modal as Modal$1, CardLabelDesc, CardLabel, CardText, Card, FormStep, Dropdown, TextArea, Loader as Loader$1, TextInput, MobileNumber, Toast, LabelFieldPair, UploadFile, Table, KeyNote, SubmitBar, CardHeader, InfoIcon, Calender, CheckPoint, ConnectingCheckPoints, AppContainer, BackButton, PrivateRoute, PDFSvg as PDFSvg$2, StatusTable, Row, CardSectionHeader, CheckBox, LinkButton, Banner, Header, MultiLink, TelePhone, DisplayPhotos, SearchField, FilterFormField, RadioButtons, ComplaintIcon, InboxComposer, SearchForm, CardLabelError, DatePicker, EmployeeModuleCard, CloseSvg, Localities, RemoveableTag, FormComposer, ActionBar, Menu, OTPInput, Rating, CitizenHomeCard } from '@mseva/digit-ui-react-components';
|
|
2
|
+
import React, { useState, useEffect, useRef, useMemo, useCallback, Fragment as Fragment$1, useReducer } from 'react';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
import { useLocation, useRouteMatch, useHistory, Switch, Route, Redirect, Link, useParams } from 'react-router-dom';
|
|
5
5
|
import { useForm, Controller, useFormContext } from 'react-hook-form';
|
|
@@ -542,10 +542,6 @@ function createCommonjsModule(fn, module) {
|
|
|
542
542
|
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
|
543
543
|
}
|
|
544
544
|
|
|
545
|
-
function getCjsExportFromNamespace (n) {
|
|
546
|
-
return n && n['default'] || n;
|
|
547
|
-
}
|
|
548
|
-
|
|
549
545
|
var jquery = createCommonjsModule(function (module) {
|
|
550
546
|
(function (global, factory) {
|
|
551
547
|
|
|
@@ -14391,8 +14387,6 @@ var accessibility = createCommonjsModule(function (module, exports) {
|
|
|
14391
14387
|
});
|
|
14392
14388
|
unwrapExports(accessibility);
|
|
14393
14389
|
|
|
14394
|
-
var _shallowEqual = getCjsExportFromNamespace(index_esm);
|
|
14395
|
-
|
|
14396
14390
|
var Calendar_1 = createCommonjsModule(function (module, exports) {
|
|
14397
14391
|
|
|
14398
14392
|
function _typeof(obj) {
|
|
@@ -15047,7 +15041,7 @@ var Calendar_1 = createCommonjsModule(function (module, exports) {
|
|
|
15047
15041
|
monthNames: this.getMonthNames()
|
|
15048
15042
|
});
|
|
15049
15043
|
}
|
|
15050
|
-
if (!(0,
|
|
15044
|
+
if (!(0, index_esm.shallowEqualObjects)(prevProps.scroll, this.props.scroll)) {
|
|
15051
15045
|
this.setState({
|
|
15052
15046
|
scrollArea: this.calcScrollArea(this.props)
|
|
15053
15047
|
});
|
|
@@ -17661,44 +17655,267 @@ const CommunityHallSearch = ({
|
|
|
17661
17655
|
}));
|
|
17662
17656
|
};
|
|
17663
17657
|
|
|
17664
|
-
const
|
|
17665
|
-
|
|
17666
|
-
|
|
17667
|
-
|
|
17668
|
-
|
|
17669
|
-
|
|
17658
|
+
const getTimelineAcknowledgementData = (workflowDetails, tenantInfo, t) => {
|
|
17659
|
+
var _workflowDetails$data, _workflowDetails$data2, _processInstances$, _processInstances$2, _processInstances$3, _timeline$, _timeline$2, _timeline$3, _timeline$4;
|
|
17660
|
+
const timeline = (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : _workflowDetails$data.timeline) || (workflowDetails === null || workflowDetails === void 0 ? void 0 : workflowDetails.timeline) || [];
|
|
17661
|
+
const processInstances = (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data2 = workflowDetails.data) === null || _workflowDetails$data2 === void 0 ? void 0 : _workflowDetails$data2.processInstances) || (workflowDetails === null || workflowDetails === void 0 ? void 0 : workflowDetails.processInstances) || [];
|
|
17662
|
+
const businessId = (processInstances === null || processInstances === void 0 ? void 0 : (_processInstances$ = processInstances[0]) === null || _processInstances$ === void 0 ? void 0 : _processInstances$.businessId) || "N/A";
|
|
17663
|
+
const businessService = (processInstances === null || processInstances === void 0 ? void 0 : (_processInstances$2 = processInstances[0]) === null || _processInstances$2 === void 0 ? void 0 : _processInstances$2.businessService) || "N/A";
|
|
17664
|
+
const moduleName = (processInstances === null || processInstances === void 0 ? void 0 : (_processInstances$3 = processInstances[0]) === null || _processInstances$3 === void 0 ? void 0 : _processInstances$3.moduleName) || "N/A";
|
|
17665
|
+
const timelineRows = timeline.map((item, index) => {
|
|
17666
|
+
var _item$auditDetails, _item$auditDetails2, _item$assigner, _item$assigner2, _item$assigner3, _item$wfComment;
|
|
17667
|
+
const createdDate = (item === null || item === void 0 ? void 0 : (_item$auditDetails = item.auditDetails) === null || _item$auditDetails === void 0 ? void 0 : _item$auditDetails.created) || "N/A";
|
|
17668
|
+
const timing = (item === null || item === void 0 ? void 0 : (_item$auditDetails2 = item.auditDetails) === null || _item$auditDetails2 === void 0 ? void 0 : _item$auditDetails2.timing) || "N/A";
|
|
17669
|
+
const assignerName = (item === null || item === void 0 ? void 0 : (_item$assigner = item.assigner) === null || _item$assigner === void 0 ? void 0 : _item$assigner.name) || "N/A";
|
|
17670
|
+
const assignerType = (item === null || item === void 0 ? void 0 : (_item$assigner2 = item.assigner) === null || _item$assigner2 === void 0 ? void 0 : _item$assigner2.type) || "N/A";
|
|
17671
|
+
const mobileNumber = (item === null || item === void 0 ? void 0 : (_item$assigner3 = item.assigner) === null || _item$assigner3 === void 0 ? void 0 : _item$assigner3.mobileNumber) || "N/A";
|
|
17672
|
+
const action = (item === null || item === void 0 ? void 0 : item.performedAction) || "N/A";
|
|
17673
|
+
const status = (item === null || item === void 0 ? void 0 : item.status) || (item === null || item === void 0 ? void 0 : item.state) || "N/A";
|
|
17674
|
+
const comment = (item === null || item === void 0 ? void 0 : (_item$wfComment = item.wfComment) === null || _item$wfComment === void 0 ? void 0 : _item$wfComment[0]) || "-";
|
|
17675
|
+
const documents = (item === null || item === void 0 ? void 0 : item.wfDocuments) || [];
|
|
17676
|
+
return {
|
|
17677
|
+
sNo: index + 1,
|
|
17678
|
+
action: t ? t(action) : action,
|
|
17679
|
+
status: t ? t(status) : status,
|
|
17680
|
+
assignerName,
|
|
17681
|
+
assignerType,
|
|
17682
|
+
mobileNumber,
|
|
17683
|
+
designation: assignerType,
|
|
17684
|
+
date: createdDate,
|
|
17685
|
+
time: timing,
|
|
17686
|
+
dateTime: `${createdDate} ${timing !== "N/A" ? timing : ""}`.trim(),
|
|
17687
|
+
comment,
|
|
17688
|
+
documents: documents.map(doc => ({
|
|
17689
|
+
name: (doc === null || doc === void 0 ? void 0 : doc.fileName) || (doc === null || doc === void 0 ? void 0 : doc.documentType) || "Document",
|
|
17690
|
+
type: (doc === null || doc === void 0 ? void 0 : doc.documentType) || "Document",
|
|
17691
|
+
fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId
|
|
17692
|
+
})),
|
|
17693
|
+
hasDocuments: documents.length > 0
|
|
17694
|
+
};
|
|
17695
|
+
});
|
|
17696
|
+
return {
|
|
17697
|
+
t,
|
|
17698
|
+
tenantId: (tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.code) || "",
|
|
17699
|
+
tenantName: (tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.name) || (tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.i18nKey) || "Government Department",
|
|
17700
|
+
name: t ? t("TIMELINE_PDF_TITLE") : "Application Timeline",
|
|
17701
|
+
heading: t ? t("TIMELINE_PDF_HEADING") : "File Movement Report",
|
|
17702
|
+
businessId,
|
|
17703
|
+
businessService: t ? t(`CS_COMMON_${businessService === null || businessService === void 0 ? void 0 : businessService.toUpperCase()}`) : businessService,
|
|
17704
|
+
moduleName,
|
|
17705
|
+
currentStatus: t ? t((timeline === null || timeline === void 0 ? void 0 : (_timeline$ = timeline[0]) === null || _timeline$ === void 0 ? void 0 : _timeline$.status) || (timeline === null || timeline === void 0 ? void 0 : (_timeline$2 = timeline[0]) === null || _timeline$2 === void 0 ? void 0 : _timeline$2.state) || "N/A") : (timeline === null || timeline === void 0 ? void 0 : (_timeline$3 = timeline[0]) === null || _timeline$3 === void 0 ? void 0 : _timeline$3.status) || (timeline === null || timeline === void 0 ? void 0 : (_timeline$4 = timeline[0]) === null || _timeline$4 === void 0 ? void 0 : _timeline$4.state) || "N/A",
|
|
17706
|
+
generatedDate: new Date().toLocaleDateString("en-IN", {
|
|
17707
|
+
day: "2-digit",
|
|
17708
|
+
month: "long",
|
|
17709
|
+
year: "numeric"
|
|
17710
|
+
}),
|
|
17711
|
+
generatedDateTime: new Date().toLocaleString("en-IN", {
|
|
17712
|
+
day: "2-digit",
|
|
17713
|
+
month: "2-digit",
|
|
17714
|
+
year: "numeric",
|
|
17715
|
+
hour: "2-digit",
|
|
17716
|
+
minute: "2-digit",
|
|
17717
|
+
hour12: true
|
|
17718
|
+
}),
|
|
17719
|
+
timelineRows,
|
|
17720
|
+
totalSteps: timelineRows.length
|
|
17721
|
+
};
|
|
17722
|
+
};
|
|
17670
17723
|
|
|
17671
|
-
const
|
|
17672
|
-
|
|
17673
|
-
|
|
17724
|
+
const parseDate = dateStr => {
|
|
17725
|
+
if (!dateStr || dateStr === "N/A") return null;
|
|
17726
|
+
if (typeof dateStr === "string" && dateStr !== null && dateStr !== void 0 && dateStr.includes("/")) {
|
|
17727
|
+
const [day, month, year] = dateStr === null || dateStr === void 0 ? void 0 : dateStr.split("/");
|
|
17728
|
+
return new Date(year, month - 1, day);
|
|
17729
|
+
}
|
|
17730
|
+
return new Date(dateStr);
|
|
17731
|
+
};
|
|
17732
|
+
const calculateDays = (start, end) => {
|
|
17733
|
+
if (!start || !end) return "N/A";
|
|
17734
|
+
const startDate = parseDate(start);
|
|
17735
|
+
const endDate = parseDate(end);
|
|
17736
|
+
if (!startDate || !endDate || isNaN(startDate === null || startDate === void 0 ? void 0 : startDate.getTime()) || isNaN(endDate === null || endDate === void 0 ? void 0 : endDate.getTime())) {
|
|
17737
|
+
return "N/A";
|
|
17738
|
+
}
|
|
17739
|
+
const diffDays = Math.floor((endDate - startDate) / 86400000);
|
|
17740
|
+
return diffDays < 0 ? "N/A" : diffDays === 0 ? "0 Days" : `${diffDays} Days`;
|
|
17741
|
+
};
|
|
17742
|
+
const PDFSvg = React.memo(({
|
|
17743
|
+
width: _width = 85,
|
|
17744
|
+
height: _height = 100,
|
|
17745
|
+
style
|
|
17746
|
+
}) => /*#__PURE__*/React.createElement("svg", {
|
|
17747
|
+
style: style,
|
|
17748
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
17749
|
+
width: _width,
|
|
17750
|
+
height: _height,
|
|
17751
|
+
viewBox: "0 0 20 20",
|
|
17752
|
+
fill: "gray"
|
|
17753
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
17754
|
+
d: "M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-8.5 7.5c0 .83-.67 1.5-1.5 1.5H9v2H7.5V7H10c.83 0 1.5.67 1.5 1.5v1zm5 2c0 .83-.67 1.5-1.5 1.5h-2.5V7H15c.83 0 1.5.67 1.5 1.5v3zm4-3H19v1h1.5V11H19v2h-1.5V7h3v1.5zM9 9.5h1v-1H9v1zM4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm10 5.5h1v-3h-1v3z"
|
|
17755
|
+
})));
|
|
17756
|
+
const pdfDownloadLink = (documents, fileStoreId) => {
|
|
17757
|
+
var _downloadLink$split;
|
|
17758
|
+
const downloadLink = (documents === null || documents === void 0 ? void 0 : documents[fileStoreId]) || "";
|
|
17759
|
+
const formats = (downloadLink === null || downloadLink === void 0 ? void 0 : (_downloadLink$split = downloadLink.split(",")) === null || _downloadLink$split === void 0 ? void 0 : _downloadLink$split.filter(Boolean)) || [];
|
|
17760
|
+
return (formats === null || formats === void 0 ? void 0 : formats.find(link => !(link !== null && link !== void 0 && link.includes("large")) && !(link !== null && link !== void 0 && link.includes("medium")) && !(link !== null && link !== void 0 && link.includes("small")))) || (formats === null || formats === void 0 ? void 0 : formats[0]) || "";
|
|
17761
|
+
};
|
|
17762
|
+
const TimelineDocument = React.memo(({
|
|
17763
|
+
value,
|
|
17764
|
+
Code,
|
|
17765
|
+
index
|
|
17674
17766
|
}) => {
|
|
17675
|
-
var _data$wfComment, _data$thumbnailsToSho, _data$thumbnailsToSho2;
|
|
17676
17767
|
const {
|
|
17677
|
-
|
|
17678
|
-
|
|
17679
|
-
|
|
17680
|
-
|
|
17681
|
-
}
|
|
17682
|
-
|
|
17683
|
-
|
|
17684
|
-
|
|
17685
|
-
|
|
17686
|
-
|
|
17687
|
-
|
|
17688
|
-
|
|
17689
|
-
|
|
17690
|
-
|
|
17691
|
-
className: "
|
|
17692
|
-
},
|
|
17693
|
-
|
|
17694
|
-
|
|
17695
|
-
|
|
17696
|
-
|
|
17697
|
-
|
|
17768
|
+
isLoading,
|
|
17769
|
+
data
|
|
17770
|
+
} = Digit.Hooks.ads.useADSDocumentSearch({
|
|
17771
|
+
value
|
|
17772
|
+
}, {
|
|
17773
|
+
value
|
|
17774
|
+
}, Code, index);
|
|
17775
|
+
const documents = useMemo(() => {
|
|
17776
|
+
var _value$documents;
|
|
17777
|
+
const docs = value !== null && value !== void 0 && value.documents ? value === null || value === void 0 ? void 0 : (_value$documents = value.documents) === null || _value$documents === void 0 ? void 0 : _value$documents.documents : value;
|
|
17778
|
+
return (docs === null || docs === void 0 ? void 0 : docs.filter(doc => (doc === null || doc === void 0 ? void 0 : doc.documentType) === Code)) || [];
|
|
17779
|
+
}, [value, Code]);
|
|
17780
|
+
if (isLoading) return /*#__PURE__*/React.createElement(Loader$1, null);
|
|
17781
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
17782
|
+
className: "timeline-docs-wrapper"
|
|
17783
|
+
}, documents === null || documents === void 0 ? void 0 : documents.map((document, idx) => {
|
|
17784
|
+
const documentLink = pdfDownloadLink(data === null || data === void 0 ? void 0 : data.pdfFiles, document === null || document === void 0 ? void 0 : document.fileStoreId);
|
|
17785
|
+
if (!documentLink) return null;
|
|
17786
|
+
return /*#__PURE__*/React.createElement("a", {
|
|
17787
|
+
key: idx,
|
|
17788
|
+
target: "_blank",
|
|
17789
|
+
rel: "noopener noreferrer",
|
|
17790
|
+
href: documentLink,
|
|
17791
|
+
className: "timeline-doc-link"
|
|
17792
|
+
}, /*#__PURE__*/React.createElement(PDFSvg, {
|
|
17793
|
+
className: "timeline-doc-icon"
|
|
17794
|
+
}));
|
|
17795
|
+
}));
|
|
17796
|
+
});
|
|
17797
|
+
const normalizeTimeline = workflowDetails => {
|
|
17798
|
+
var _workflowDetails$data;
|
|
17799
|
+
const rawTimeline = workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : _workflowDetails$data.timeline;
|
|
17800
|
+
if (!rawTimeline || !Array.isArray(rawTimeline)) return [];
|
|
17801
|
+
return rawTimeline === null || rawTimeline === void 0 ? void 0 : rawTimeline.map((item, index) => {
|
|
17802
|
+
var _item$auditDetails, _item$auditDetails2, _item$assigner, _item$wfComment;
|
|
17803
|
+
const createdDate = (item === null || item === void 0 ? void 0 : (_item$auditDetails = item.auditDetails) === null || _item$auditDetails === void 0 ? void 0 : _item$auditDetails.created) || "N/A";
|
|
17804
|
+
const lastModified = (item === null || item === void 0 ? void 0 : (_item$auditDetails2 = item.auditDetails) === null || _item$auditDetails2 === void 0 ? void 0 : _item$auditDetails2.lastModified) || "N/A";
|
|
17805
|
+
return {
|
|
17806
|
+
id: index,
|
|
17807
|
+
state: item === null || item === void 0 ? void 0 : item.state,
|
|
17808
|
+
assignerName: (item === null || item === void 0 ? void 0 : (_item$assigner = item.assigner) === null || _item$assigner === void 0 ? void 0 : _item$assigner.name) || "N/A",
|
|
17809
|
+
performedAction: item === null || item === void 0 ? void 0 : item.performedAction,
|
|
17810
|
+
comment: (item === null || item === void 0 ? void 0 : (_item$wfComment = item.wfComment) === null || _item$wfComment === void 0 ? void 0 : _item$wfComment[0]) || "",
|
|
17811
|
+
documents: (item === null || item === void 0 ? void 0 : item.wfDocuments) || [],
|
|
17812
|
+
createdDate,
|
|
17813
|
+
lastModified,
|
|
17814
|
+
noOfDays: calculateDays(createdDate, lastModified)
|
|
17815
|
+
};
|
|
17816
|
+
});
|
|
17817
|
+
};
|
|
17818
|
+
const HEADER_FIELDS = [{
|
|
17819
|
+
label: "CM_TIMELINE_NAME",
|
|
17820
|
+
key: "assignerName"
|
|
17821
|
+
}, {
|
|
17822
|
+
label: "CM_TIMELINE_ACTION_TAKEN",
|
|
17823
|
+
key: "performedAction"
|
|
17824
|
+
}, {
|
|
17825
|
+
label: "CM_TIMELINE_ACTION_TAKEN_ON",
|
|
17826
|
+
key: "lastModified"
|
|
17827
|
+
}, {
|
|
17828
|
+
label: "CM_TIMELINE_DATE_RECEIVED",
|
|
17829
|
+
key: "createdDate"
|
|
17830
|
+
}, {
|
|
17831
|
+
label: "CM_TIMELINE_NO_OF_DAYS",
|
|
17832
|
+
key: "noOfDays"
|
|
17833
|
+
}];
|
|
17834
|
+
const TimelineCaption = React.memo(({
|
|
17835
|
+
checkpoint,
|
|
17836
|
+
t,
|
|
17837
|
+
onDownloadPDF
|
|
17838
|
+
}) => {
|
|
17839
|
+
var _checkpoint$documents, _checkpoint$documents2;
|
|
17840
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
17841
|
+
className: "timeline-card"
|
|
17842
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
17843
|
+
className: "timeline-header"
|
|
17844
|
+
}, HEADER_FIELDS === null || HEADER_FIELDS === void 0 ? void 0 : HEADER_FIELDS.map(({
|
|
17845
|
+
label,
|
|
17846
|
+
key
|
|
17847
|
+
}) => /*#__PURE__*/React.createElement("div", {
|
|
17848
|
+
key: key,
|
|
17849
|
+
className: "timeline-header-item"
|
|
17850
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
17851
|
+
className: "timeline-label"
|
|
17852
|
+
}, t(label), ":"), /*#__PURE__*/React.createElement("span", {
|
|
17853
|
+
className: "timeline-value"
|
|
17854
|
+
}, t(checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint[key]) || "N/A")))), /*#__PURE__*/React.createElement("div", {
|
|
17855
|
+
className: "timeline-note"
|
|
17856
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
17857
|
+
className: "timeline-label"
|
|
17858
|
+
}, t("CM_TIMELINE_NOTE"), ":"), /*#__PURE__*/React.createElement("div", {
|
|
17859
|
+
className: "note-box"
|
|
17860
|
+
}, (checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.comment) || t("CM_TIMELINE_NO_COMMENTS"))), (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$documents = checkpoint.documents) === null || _checkpoint$documents === void 0 ? void 0 : _checkpoint$documents.length) > 0 && /*#__PURE__*/React.createElement("div", {
|
|
17861
|
+
className: "timeline-docs"
|
|
17862
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
17863
|
+
className: "timeline-label"
|
|
17864
|
+
}, t("CM_TIMELINE_DOCUMENT_ATTACHED"), ":"), checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$documents2 = checkpoint.documents) === null || _checkpoint$documents2 === void 0 ? void 0 : _checkpoint$documents2.map((doc, index) => /*#__PURE__*/React.createElement(TimelineDocument, {
|
|
17865
|
+
key: `${doc === null || doc === void 0 ? void 0 : doc.documentType}-${index}`,
|
|
17866
|
+
value: checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.documents,
|
|
17867
|
+
Code: doc === null || doc === void 0 ? void 0 : doc.documentType,
|
|
17868
|
+
index: index
|
|
17869
|
+
}))));
|
|
17870
|
+
});
|
|
17871
|
+
const ApplicationTimeline = ({
|
|
17872
|
+
workflowDetails,
|
|
17873
|
+
t
|
|
17874
|
+
}) => {
|
|
17875
|
+
var _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _timeline$;
|
|
17876
|
+
const details = (workflowDetails === null || workflowDetails === void 0 ? void 0 : workflowDetails.data) || workflowDetails;
|
|
17877
|
+
const timeline = useMemo(() => normalizeTimeline({
|
|
17878
|
+
data: details
|
|
17879
|
+
}), [details]);
|
|
17880
|
+
const currentState = workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data2 = workflowDetails.data) === null || _workflowDetails$data2 === void 0 ? void 0 : (_workflowDetails$data3 = _workflowDetails$data2.timeline) === null || _workflowDetails$data3 === void 0 ? void 0 : (_workflowDetails$data4 = _workflowDetails$data3[0]) === null || _workflowDetails$data4 === void 0 ? void 0 : _workflowDetails$data4.state;
|
|
17881
|
+
const handleDownloadPDF = useCallback(() => {
|
|
17882
|
+
const tenantInfo = Digit.SessionStorage.get("CITIZEN.COMMON.HOME.CITY") || {};
|
|
17883
|
+
const acknowledgementData = getTimelineAcknowledgementData(workflowDetails, tenantInfo, t);
|
|
17884
|
+
Digit.Utils.pdf.generateTimelinePDF(acknowledgementData);
|
|
17885
|
+
}, [workflowDetails, t]);
|
|
17886
|
+
if (!(timeline !== null && timeline !== void 0 && timeline.length)) return null;
|
|
17887
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
17888
|
+
className: "timeline-hoc-container"
|
|
17889
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
17890
|
+
className: "timeline-header-wrapper"
|
|
17891
|
+
}, /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
17892
|
+
className: "timeline-subheader"
|
|
17893
|
+
}, t("CS_APPLICATION_DETAILS_APPLICATION_TIMELINE")), /*#__PURE__*/React.createElement("span", {
|
|
17894
|
+
onClick: handleDownloadPDF,
|
|
17895
|
+
className: "download-button"
|
|
17896
|
+
}, t("CS_COMMON_DOWNLOAD"))), (timeline === null || timeline === void 0 ? void 0 : timeline.length) === 1 ? /*#__PURE__*/React.createElement(CheckPoint, {
|
|
17897
|
+
isCompleted: true,
|
|
17898
|
+
label: t(timeline === null || timeline === void 0 ? void 0 : (_timeline$ = timeline[0]) === null || _timeline$ === void 0 ? void 0 : _timeline$.state),
|
|
17899
|
+
customChild: /*#__PURE__*/React.createElement(TimelineCaption, {
|
|
17900
|
+
checkpoint: timeline === null || timeline === void 0 ? void 0 : timeline[0],
|
|
17901
|
+
t: t,
|
|
17902
|
+
onDownloadPDF: handleDownloadPDF
|
|
17903
|
+
})
|
|
17904
|
+
}) : /*#__PURE__*/React.createElement(ConnectingCheckPoints, null, timeline === null || timeline === void 0 ? void 0 : timeline.map(checkpoint => /*#__PURE__*/React.createElement(CheckPoint, {
|
|
17905
|
+
key: checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.id,
|
|
17906
|
+
keyValue: checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.id,
|
|
17907
|
+
isCompleted: (checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.state) === currentState,
|
|
17908
|
+
label: t(checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.state),
|
|
17909
|
+
customChild: /*#__PURE__*/React.createElement(TimelineCaption, {
|
|
17910
|
+
checkpoint: checkpoint,
|
|
17911
|
+
t: t,
|
|
17912
|
+
onDownloadPDF: handleDownloadPDF
|
|
17913
|
+
})
|
|
17914
|
+
}))));
|
|
17698
17915
|
};
|
|
17699
17916
|
|
|
17700
17917
|
const CHBWFApplicationTimeline = props => {
|
|
17701
|
-
var _props$application, _props$application$wo, _props$application2, _props$application3
|
|
17918
|
+
var _props$application, _props$application$wo, _props$application2, _props$application3;
|
|
17702
17919
|
const {
|
|
17703
17920
|
t
|
|
17704
17921
|
} = useTranslation();
|
|
@@ -17711,48 +17928,8 @@ const CHBWFApplicationTimeline = props => {
|
|
|
17711
17928
|
id: (_props$application3 = props.application) === null || _props$application3 === void 0 ? void 0 : _props$application3.bookingNo,
|
|
17712
17929
|
moduleCode: businessService
|
|
17713
17930
|
});
|
|
17714
|
-
function OpenImage(imageSource, index, thumbnailsToShow) {
|
|
17715
|
-
var _thumbnailsToShow$ful;
|
|
17716
|
-
window.open(thumbnailsToShow === null || thumbnailsToShow === void 0 ? void 0 : (_thumbnailsToShow$ful = thumbnailsToShow.fullImage) === null || _thumbnailsToShow$ful === void 0 ? void 0 : _thumbnailsToShow$ful[0], "_blank");
|
|
17717
|
-
}
|
|
17718
|
-
const getTimelineCaptions = checkpoint => {
|
|
17719
|
-
if (checkpoint.state === "OPEN") {
|
|
17720
|
-
var _checkpoint$auditDeta, _props$application4;
|
|
17721
|
-
const caption = {
|
|
17722
|
-
date: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$auditDeta = checkpoint.auditDetails) === null || _checkpoint$auditDeta === void 0 ? void 0 : _checkpoint$auditDeta.lastModified,
|
|
17723
|
-
source: ((_props$application4 = props.application) === null || _props$application4 === void 0 ? void 0 : _props$application4.channel) || ""
|
|
17724
|
-
};
|
|
17725
|
-
return /*#__PURE__*/React.createElement(CHBWFCaption, {
|
|
17726
|
-
data: caption
|
|
17727
|
-
});
|
|
17728
|
-
} else if (checkpoint.state) {
|
|
17729
|
-
var _checkpoint$auditDeta2, _checkpoint$assignes, _checkpoint$assignes$, _checkpoint$assignes2, _checkpoint$assignes3;
|
|
17730
|
-
const caption = {
|
|
17731
|
-
date: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$auditDeta2 = checkpoint.auditDetails) === null || _checkpoint$auditDeta2 === void 0 ? void 0 : _checkpoint$auditDeta2.lastModified,
|
|
17732
|
-
name: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assignes = checkpoint.assignes) === null || _checkpoint$assignes === void 0 ? void 0 : (_checkpoint$assignes$ = _checkpoint$assignes[0]) === null || _checkpoint$assignes$ === void 0 ? void 0 : _checkpoint$assignes$.name,
|
|
17733
|
-
mobileNumber: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assignes2 = checkpoint.assignes) === null || _checkpoint$assignes2 === void 0 ? void 0 : (_checkpoint$assignes3 = _checkpoint$assignes2[0]) === null || _checkpoint$assignes3 === void 0 ? void 0 : _checkpoint$assignes3.mobileNumber,
|
|
17734
|
-
comment: t(checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.comment),
|
|
17735
|
-
wfComment: checkpoint.wfComment,
|
|
17736
|
-
thumbnailsToShow: checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.thumbnailsToShow
|
|
17737
|
-
};
|
|
17738
|
-
return /*#__PURE__*/React.createElement(CHBWFCaption, {
|
|
17739
|
-
data: caption,
|
|
17740
|
-
OpenImage: OpenImage
|
|
17741
|
-
});
|
|
17742
|
-
} else {
|
|
17743
|
-
var _props$application5, _checkpoint$assigner;
|
|
17744
|
-
const caption = {
|
|
17745
|
-
date: Digit.DateUtils.ConvertTimestampToDate((_props$application5 = props.application) === null || _props$application5 === void 0 ? void 0 : _props$application5.auditDetails.lastModified),
|
|
17746
|
-
name: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assigner = checkpoint.assigner) === null || _checkpoint$assigner === void 0 ? void 0 : _checkpoint$assigner.name,
|
|
17747
|
-
comment: t(checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.comment)
|
|
17748
|
-
};
|
|
17749
|
-
return /*#__PURE__*/React.createElement(CHBWFCaption, {
|
|
17750
|
-
data: caption
|
|
17751
|
-
});
|
|
17752
|
-
}
|
|
17753
|
-
};
|
|
17754
17931
|
const showNextActions = nextActions => {
|
|
17755
|
-
var _nextAction, _props$
|
|
17932
|
+
var _nextAction, _props$application4, _props$application5;
|
|
17756
17933
|
let nextAction = nextActions[0];
|
|
17757
17934
|
const next = nextActions.map(action => action.action);
|
|
17758
17935
|
if (next.includes("PAY") || next.includes("EDIT")) {
|
|
@@ -17771,10 +17948,10 @@ const CHBWFApplicationTimeline = props => {
|
|
|
17771
17948
|
}
|
|
17772
17949
|
}, /*#__PURE__*/React.createElement(Link, {
|
|
17773
17950
|
to: {
|
|
17774
|
-
pathname: `/digit-ui/citizen/payment/my-bills/${businessService}/${props === null || props === void 0 ? void 0 : (_props$
|
|
17951
|
+
pathname: `/digit-ui/citizen/payment/my-bills/${businessService}/${props === null || props === void 0 ? void 0 : (_props$application4 = props.application) === null || _props$application4 === void 0 ? void 0 : _props$application4.bookingNo}`,
|
|
17775
17952
|
state: {
|
|
17776
17953
|
tenantId: props.application.tenantId,
|
|
17777
|
-
bookingNo: props === null || props === void 0 ? void 0 : (_props$
|
|
17954
|
+
bookingNo: props === null || props === void 0 ? void 0 : (_props$application5 = props.application) === null || _props$application5 === void 0 ? void 0 : _props$application5.bookingNo
|
|
17778
17955
|
}
|
|
17779
17956
|
}
|
|
17780
17957
|
}, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
@@ -17797,31 +17974,10 @@ const CHBWFApplicationTimeline = props => {
|
|
|
17797
17974
|
if (isLoading) {
|
|
17798
17975
|
return /*#__PURE__*/React.createElement(Loader$1, null);
|
|
17799
17976
|
}
|
|
17800
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, !isLoading && /*#__PURE__*/React.createElement(Fragment$1, null,
|
|
17801
|
-
|
|
17802
|
-
|
|
17803
|
-
|
|
17804
|
-
}
|
|
17805
|
-
}, t("CS_APPLICATION_DETAILS_APPLICATION_TIMELINE")), data !== null && data !== void 0 && data.timeline && (data === null || data === void 0 ? void 0 : (_data$timeline2 = data.timeline) === null || _data$timeline2 === void 0 ? void 0 : _data$timeline2.length) === 1 ? /*#__PURE__*/React.createElement(CheckPoint, {
|
|
17806
|
-
isCompleted: true,
|
|
17807
|
-
label: t((data === null || data === void 0 ? void 0 : (_data$timeline$ = data.timeline[0]) === null || _data$timeline$ === void 0 ? void 0 : _data$timeline$.state) && `WF_${businessService}_${data.timeline[0].state}` || "NA"),
|
|
17808
|
-
customChild: getTimelineCaptions(data === null || data === void 0 ? void 0 : data.timeline[0])
|
|
17809
|
-
}) : /*#__PURE__*/React.createElement(ConnectingCheckPoints, null, (data === null || data === void 0 ? void 0 : data.timeline) && (data === null || data === void 0 ? void 0 : data.timeline.map((checkpoint, index, arr) => {
|
|
17810
|
-
var _data$processInstance;
|
|
17811
|
-
let timelineStatusPostfix = "";
|
|
17812
|
-
if (window.location.href.includes("/obps/")) {
|
|
17813
|
-
var _workflowDetails, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _workflowDetails2, _workflowDetails2$dat, _workflowDetails2$dat2, _workflowDetails2$dat3;
|
|
17814
|
-
if ((_workflowDetails = workflowDetails) !== null && _workflowDetails !== void 0 && (_workflowDetails$data = _workflowDetails.data) !== null && _workflowDetails$data !== void 0 && (_workflowDetails$data2 = _workflowDetails$data.timeline[index - 1]) !== null && _workflowDetails$data2 !== void 0 && (_workflowDetails$data3 = _workflowDetails$data2.state) !== null && _workflowDetails$data3 !== void 0 && _workflowDetails$data3.includes("BACK_FROM") || (_workflowDetails2 = workflowDetails) !== null && _workflowDetails2 !== void 0 && (_workflowDetails2$dat = _workflowDetails2.data) !== null && _workflowDetails2$dat !== void 0 && (_workflowDetails2$dat2 = _workflowDetails2$dat.timeline[index - 1]) !== null && _workflowDetails2$dat2 !== void 0 && (_workflowDetails2$dat3 = _workflowDetails2$dat2.state) !== null && _workflowDetails2$dat3 !== void 0 && _workflowDetails2$dat3.includes("SEND_TO_CITIZEN")) timelineStatusPostfix = `_NOT_DONE`;else if ((checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.performedAction) === "SEND_TO_ARCHITECT") timelineStatusPostfix = `_BY_ARCHITECT_DONE`;else timelineStatusPostfix = index == 0 ? "" : `_DONE`;
|
|
17815
|
-
}
|
|
17816
|
-
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
17817
|
-
key: index
|
|
17818
|
-
}, /*#__PURE__*/React.createElement(CheckPoint, {
|
|
17819
|
-
keyValue: index,
|
|
17820
|
-
isCompleted: index === 0,
|
|
17821
|
-
label: t(`ES_PTR_COMMON_STATUS_${data === null || data === void 0 ? void 0 : (_data$processInstance = data.processInstances[index].state) === null || _data$processInstance === void 0 ? void 0 : _data$processInstance["state"]}${timelineStatusPostfix}`),
|
|
17822
|
-
customChild: getTimelineCaptions(checkpoint)
|
|
17823
|
-
}));
|
|
17824
|
-
})))), data && showNextActions(data === null || data === void 0 ? void 0 : data.nextActions));
|
|
17977
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !isLoading && /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(ApplicationTimeline, {
|
|
17978
|
+
workflowDetails: data,
|
|
17979
|
+
t: t
|
|
17980
|
+
})), data && showNextActions(data === null || data === void 0 ? void 0 : data.nextActions));
|
|
17825
17981
|
};
|
|
17826
17982
|
|
|
17827
17983
|
const checkForNotNull = (value = "") => {
|
|
@@ -17989,7 +18145,7 @@ const CHBDataConvert = data => {
|
|
|
17989
18145
|
const checkForNA = (value = "") => {
|
|
17990
18146
|
return checkForNotNull(value) ? value : "CS_NA";
|
|
17991
18147
|
};
|
|
17992
|
-
const pdfDownloadLink = (documents = {}, fileStoreId = "", format = "") => {
|
|
18148
|
+
const pdfDownloadLink$1 = (documents = {}, fileStoreId = "", format = "") => {
|
|
17993
18149
|
let downloadLink = documents[fileStoreId] || "";
|
|
17994
18150
|
let differentFormats = (downloadLink === null || downloadLink === void 0 ? void 0 : downloadLink.split(",")) || [];
|
|
17995
18151
|
let fileURL = "";
|
|
@@ -18091,7 +18247,7 @@ function CHBDocument({
|
|
|
18091
18247
|
flexWrap: "wrap"
|
|
18092
18248
|
}
|
|
18093
18249
|
}, documents.map((document, index) => {
|
|
18094
|
-
let documentLink = pdfDownloadLink(data.pdfFiles, document.fileStoreId);
|
|
18250
|
+
let documentLink = pdfDownloadLink$1(data.pdfFiles, document.fileStoreId);
|
|
18095
18251
|
return /*#__PURE__*/React.createElement("a", {
|
|
18096
18252
|
target: "_",
|
|
18097
18253
|
href: documentLink,
|
|
@@ -18517,10 +18673,62 @@ const CHBAcknowledgement = ({
|
|
|
18517
18673
|
}));
|
|
18518
18674
|
};
|
|
18519
18675
|
|
|
18676
|
+
const Loader = ({
|
|
18677
|
+
page: _page = false
|
|
18678
|
+
}) => {
|
|
18679
|
+
const baseStyle = {
|
|
18680
|
+
display: "flex",
|
|
18681
|
+
justifyContent: "center",
|
|
18682
|
+
alignItems: "center"
|
|
18683
|
+
};
|
|
18684
|
+
const pageStyle = {
|
|
18685
|
+
...baseStyle,
|
|
18686
|
+
position: "fixed",
|
|
18687
|
+
top: 0,
|
|
18688
|
+
left: 0,
|
|
18689
|
+
width: "100vw",
|
|
18690
|
+
height: "100vh",
|
|
18691
|
+
background: "rgba(255,255,255,0.6)",
|
|
18692
|
+
backdropFilter: "blur(4px)",
|
|
18693
|
+
zIndex: 9999
|
|
18694
|
+
};
|
|
18695
|
+
const moduleStyle = {
|
|
18696
|
+
...baseStyle,
|
|
18697
|
+
minHeight: "100px",
|
|
18698
|
+
width: "100%",
|
|
18699
|
+
position: "relative"
|
|
18700
|
+
};
|
|
18701
|
+
const spinnerStyle = {
|
|
18702
|
+
width: "64px",
|
|
18703
|
+
height: "64px",
|
|
18704
|
+
border: "8px solid #1976d2",
|
|
18705
|
+
borderTop: "8px solid transparent",
|
|
18706
|
+
borderRadius: "50%",
|
|
18707
|
+
animation: "spin 1.2s linear infinite"
|
|
18708
|
+
};
|
|
18709
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
18710
|
+
style: _page ? pageStyle : moduleStyle
|
|
18711
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
18712
|
+
style: spinnerStyle
|
|
18713
|
+
}), /*#__PURE__*/React.createElement("style", null, `
|
|
18714
|
+
@keyframes spin {
|
|
18715
|
+
0% { transform: rotate(0deg); }
|
|
18716
|
+
100% { transform: rotate(360deg); }
|
|
18717
|
+
}
|
|
18718
|
+
`));
|
|
18719
|
+
};
|
|
18720
|
+
Loader.propTypes = {
|
|
18721
|
+
page: propTypes.bool
|
|
18722
|
+
};
|
|
18723
|
+
Loader.defaultProps = {
|
|
18724
|
+
page: false
|
|
18725
|
+
};
|
|
18726
|
+
|
|
18520
18727
|
const ChbApplication = ({
|
|
18521
18728
|
application,
|
|
18522
18729
|
tenantId,
|
|
18523
|
-
buttonLabel
|
|
18730
|
+
buttonLabel,
|
|
18731
|
+
refetch
|
|
18524
18732
|
}) => {
|
|
18525
18733
|
var _application$applican;
|
|
18526
18734
|
const {
|
|
@@ -18528,7 +18736,7 @@ const ChbApplication = ({
|
|
|
18528
18736
|
} = useTranslation();
|
|
18529
18737
|
const history = useHistory();
|
|
18530
18738
|
const [showToast, setShowToast] = useState(null);
|
|
18531
|
-
|
|
18739
|
+
const [loader, setLoader] = useState(false);
|
|
18532
18740
|
const getBookingDateRange = bookingSlotDetails => {
|
|
18533
18741
|
var _bookingSlotDetails$, _bookingSlotDetails;
|
|
18534
18742
|
if (!bookingSlotDetails || bookingSlotDetails.length === 0) {
|
|
@@ -18545,6 +18753,28 @@ const ChbApplication = ({
|
|
|
18545
18753
|
const handleMakePayment = async () => {
|
|
18546
18754
|
history.push(`/digit-ui/citizen/payment/collect/chb-services/${application === null || application === void 0 ? void 0 : application.bookingNo}/${tenantId}?tenantId=${tenantId}`);
|
|
18547
18755
|
};
|
|
18756
|
+
const handleCancel = async () => {
|
|
18757
|
+
setLoader(true);
|
|
18758
|
+
const finalPayload = {
|
|
18759
|
+
hallsBookingApplication: {
|
|
18760
|
+
...application,
|
|
18761
|
+
workflow: {
|
|
18762
|
+
action: "CANCEL"
|
|
18763
|
+
}
|
|
18764
|
+
}
|
|
18765
|
+
};
|
|
18766
|
+
try {
|
|
18767
|
+
const response = await Digit.CHBServices.update({
|
|
18768
|
+
tenantId,
|
|
18769
|
+
...finalPayload
|
|
18770
|
+
});
|
|
18771
|
+
refetch();
|
|
18772
|
+
setLoader(false);
|
|
18773
|
+
} catch (err) {
|
|
18774
|
+
setLoader(false);
|
|
18775
|
+
return err;
|
|
18776
|
+
}
|
|
18777
|
+
};
|
|
18548
18778
|
useEffect(() => {
|
|
18549
18779
|
if (showToast) {
|
|
18550
18780
|
const timer = setTimeout(() => {
|
|
@@ -18577,6 +18807,9 @@ const ChbApplication = ({
|
|
|
18577
18807
|
})), application.bookingStatus === "PENDING_FOR_PAYMENT" && /*#__PURE__*/React.createElement(SubmitBar, {
|
|
18578
18808
|
label: t("CS_APPLICATION_DETAILS_MAKE_PAYMENT"),
|
|
18579
18809
|
onSubmit: handleMakePayment
|
|
18810
|
+
}), application.bookingStatus === "BOOKED" && /*#__PURE__*/React.createElement(SubmitBar, {
|
|
18811
|
+
label: t("WF_EMPLOYEE_NDC_CANCEL"),
|
|
18812
|
+
onSubmit: handleCancel
|
|
18580
18813
|
})), showToast && /*#__PURE__*/React.createElement(Toast, {
|
|
18581
18814
|
error: showToast.error,
|
|
18582
18815
|
warning: showToast.warning,
|
|
@@ -18584,6 +18817,8 @@ const ChbApplication = ({
|
|
|
18584
18817
|
onClose: () => {
|
|
18585
18818
|
setShowToast(null);
|
|
18586
18819
|
}
|
|
18820
|
+
}), loader && /*#__PURE__*/React.createElement(Loader, {
|
|
18821
|
+
page: true
|
|
18587
18822
|
}));
|
|
18588
18823
|
};
|
|
18589
18824
|
|
|
@@ -18634,13 +18869,11 @@ const CHBMyApplications = () => {
|
|
|
18634
18869
|
useEffect(() => {
|
|
18635
18870
|
refetch();
|
|
18636
18871
|
}, []);
|
|
18637
|
-
if (isLoading) {
|
|
18638
|
-
return /*#__PURE__*/React.createElement(Loader$1, null);
|
|
18639
|
-
}
|
|
18640
18872
|
const filteredApplications = (data === null || data === void 0 ? void 0 : data.hallsBookingApplication) || [];
|
|
18641
18873
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Header, null, `${t("CHB_MY_APPLICATION_HEADER")} (${filteredApplications.length})`), /*#__PURE__*/React.createElement("div", null, (filteredApplications === null || filteredApplications === void 0 ? void 0 : filteredApplications.length) > 0 && (filteredApplications === null || filteredApplications === void 0 ? void 0 : filteredApplications.map((application, index) => /*#__PURE__*/React.createElement("div", {
|
|
18642
18874
|
key: index
|
|
18643
18875
|
}, /*#__PURE__*/React.createElement(ChbApplication, {
|
|
18876
|
+
refetch: refetch,
|
|
18644
18877
|
application: application,
|
|
18645
18878
|
tenantId: tenantId,
|
|
18646
18879
|
buttonLabel: t("CHB_SUMMARY")
|
|
@@ -18661,82 +18894,11 @@ const CHBMyApplications = () => {
|
|
|
18661
18894
|
color: "#007bff"
|
|
18662
18895
|
},
|
|
18663
18896
|
onClick: handleLoadMore
|
|
18664
|
-
}, t("CHB_LOAD_MORE_MSG")))
|
|
18897
|
+
}, t("CHB_LOAD_MORE_MSG"))), isLoading && /*#__PURE__*/React.createElement(Loader, {
|
|
18898
|
+
page: true
|
|
18899
|
+
})));
|
|
18665
18900
|
};
|
|
18666
18901
|
|
|
18667
|
-
const PDFSvg = ({
|
|
18668
|
-
width: _width = 20,
|
|
18669
|
-
height: _height = 20,
|
|
18670
|
-
style
|
|
18671
|
-
}) => /*#__PURE__*/React.createElement("svg", {
|
|
18672
|
-
style: style,
|
|
18673
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
18674
|
-
width: _width,
|
|
18675
|
-
height: _height,
|
|
18676
|
-
viewBox: "0 0 20 20",
|
|
18677
|
-
fill: "gray"
|
|
18678
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
18679
|
-
d: "M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-8.5 7.5c0 .83-.67 1.5-1.5 1.5H9v2H7.5V7H10c.83 0 1.5.67 1.5 1.5v1zm5 2c0 .83-.67 1.5-1.5 1.5h-2.5V7H15c.83 0 1.5.67 1.5 1.5v3zm4-3H19v1h1.5V11H19v2h-1.5V7h3v1.5zM9 9.5h1v-1H9v1zM4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm10 5.5h1v-3h-1v3z"
|
|
18680
|
-
}));
|
|
18681
|
-
function NDCDocument({
|
|
18682
|
-
value = {},
|
|
18683
|
-
Code,
|
|
18684
|
-
index
|
|
18685
|
-
}) {
|
|
18686
|
-
const {
|
|
18687
|
-
t
|
|
18688
|
-
} = useTranslation();
|
|
18689
|
-
const {
|
|
18690
|
-
isLoading,
|
|
18691
|
-
isError,
|
|
18692
|
-
error,
|
|
18693
|
-
data
|
|
18694
|
-
} = Digit.Hooks.ads.useADSDocumentSearch({
|
|
18695
|
-
value
|
|
18696
|
-
}, {
|
|
18697
|
-
value
|
|
18698
|
-
}, Code, index);
|
|
18699
|
-
console.log("dataInNDCDocument", data);
|
|
18700
|
-
const documents = value !== null && value !== void 0 && value.documents ? value.documents.documents.filter(doc => doc.documentType === Code).map(doc => ({
|
|
18701
|
-
...doc,
|
|
18702
|
-
documentType: doc.documentType.replace(/\./g, "_")
|
|
18703
|
-
})) : value.filter(doc => doc.documentType === Code).map(doc => ({
|
|
18704
|
-
...doc,
|
|
18705
|
-
documentType: doc.documentType.replace(/\./g, "_")
|
|
18706
|
-
}));
|
|
18707
|
-
if (isLoading) {
|
|
18708
|
-
return /*#__PURE__*/React.createElement(Loader$1, null);
|
|
18709
|
-
}
|
|
18710
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
18711
|
-
style: {
|
|
18712
|
-
marginTop: "19px"
|
|
18713
|
-
}
|
|
18714
|
-
}, /*#__PURE__*/React.createElement(React.Fragment, null, (data === null || data === void 0 ? void 0 : data.pdfFiles) && /*#__PURE__*/React.createElement("div", {
|
|
18715
|
-
style: {
|
|
18716
|
-
display: "flex",
|
|
18717
|
-
flexWrap: "wrap"
|
|
18718
|
-
}
|
|
18719
|
-
}, documents === null || documents === void 0 ? void 0 : documents.map((document, index) => {
|
|
18720
|
-
let documentLink = pdfDownloadLink(data.pdfFiles, document === null || document === void 0 ? void 0 : document.fileStoreId);
|
|
18721
|
-
return /*#__PURE__*/React.createElement("a", {
|
|
18722
|
-
target: "_",
|
|
18723
|
-
href: documentLink,
|
|
18724
|
-
style: {
|
|
18725
|
-
minWidth: "100px",
|
|
18726
|
-
marginRight: "10px"
|
|
18727
|
-
},
|
|
18728
|
-
key: index
|
|
18729
|
-
}, /*#__PURE__*/React.createElement(PDFSvg, {
|
|
18730
|
-
width: 85,
|
|
18731
|
-
height: 100,
|
|
18732
|
-
style: {
|
|
18733
|
-
background: "#f6f6f6",
|
|
18734
|
-
padding: "8px"
|
|
18735
|
-
}
|
|
18736
|
-
}));
|
|
18737
|
-
}))));
|
|
18738
|
-
}
|
|
18739
|
-
|
|
18740
18902
|
const capitalize = text => text.substr(0, 1).toUpperCase() + text.substr(1);
|
|
18741
18903
|
const ulbCamel = ulb => ulb.toLowerCase().split(" ").map(capitalize).join(" ");
|
|
18742
18904
|
const getChbAcknowledgementData = async (application, tenantInfo, t) => {
|
|
@@ -41625,45 +41787,8 @@ var standalone = createCommonjsModule(function (module, exports) {
|
|
|
41625
41787
|
});
|
|
41626
41788
|
unwrapExports(standalone);
|
|
41627
41789
|
|
|
41628
|
-
const getTimelineCaptions = (checkpoint, index, arr, t) => {
|
|
41629
|
-
var _checkpoint$auditDeta, _checkpoint$assigner, _checkpoint$assigner2, _thumbnailsToShow$thu;
|
|
41630
|
-
const {
|
|
41631
|
-
wfComment: comment,
|
|
41632
|
-
thumbnailsToShow,
|
|
41633
|
-
wfDocuments
|
|
41634
|
-
} = checkpoint;
|
|
41635
|
-
const caption = {
|
|
41636
|
-
date: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$auditDeta = checkpoint.auditDetails) === null || _checkpoint$auditDeta === void 0 ? void 0 : _checkpoint$auditDeta.lastModified,
|
|
41637
|
-
name: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assigner = checkpoint.assigner) === null || _checkpoint$assigner === void 0 ? void 0 : _checkpoint$assigner.name,
|
|
41638
|
-
source: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assigner2 = checkpoint.assigner) === null || _checkpoint$assigner2 === void 0 ? void 0 : _checkpoint$assigner2.source
|
|
41639
|
-
};
|
|
41640
|
-
return /*#__PURE__*/React.createElement("div", null, (comment === null || comment === void 0 ? void 0 : comment.length) > 0 && /*#__PURE__*/React.createElement("div", {
|
|
41641
|
-
className: "TLComments"
|
|
41642
|
-
}, /*#__PURE__*/React.createElement("h3", null, t("WF_COMMON_COMMENTS")), /*#__PURE__*/React.createElement("p", {
|
|
41643
|
-
style: {
|
|
41644
|
-
overflowX: "scroll"
|
|
41645
|
-
}
|
|
41646
|
-
}, comment)), (thumbnailsToShow === null || thumbnailsToShow === void 0 ? void 0 : (_thumbnailsToShow$thu = thumbnailsToShow.thumbs) === null || _thumbnailsToShow$thu === void 0 ? void 0 : _thumbnailsToShow$thu.length) > 0 && /*#__PURE__*/React.createElement(DisplayPhotos, {
|
|
41647
|
-
srcs: thumbnailsToShow.thumbs,
|
|
41648
|
-
onClick: (src, idx) => {
|
|
41649
|
-
var _thumbnailsToShow$ful;
|
|
41650
|
-
let fullImage = ((_thumbnailsToShow$ful = thumbnailsToShow.fullImage) === null || _thumbnailsToShow$ful === void 0 ? void 0 : _thumbnailsToShow$ful[idx]) || src;
|
|
41651
|
-
Digit.Utils.zoomImage(fullImage);
|
|
41652
|
-
}
|
|
41653
|
-
}), (wfDocuments === null || wfDocuments === void 0 ? void 0 : wfDocuments.length) > 0 && /*#__PURE__*/React.createElement("div", null, wfDocuments === null || wfDocuments === void 0 ? void 0 : wfDocuments.map((doc, index) => /*#__PURE__*/React.createElement("div", {
|
|
41654
|
-
key: index
|
|
41655
|
-
}, /*#__PURE__*/React.createElement(NDCDocument, {
|
|
41656
|
-
value: wfDocuments,
|
|
41657
|
-
Code: doc === null || doc === void 0 ? void 0 : doc.documentType,
|
|
41658
|
-
index: index
|
|
41659
|
-
})))), /*#__PURE__*/React.createElement("div", {
|
|
41660
|
-
style: {
|
|
41661
|
-
marginTop: "8px"
|
|
41662
|
-
}
|
|
41663
|
-
}, caption.date && /*#__PURE__*/React.createElement("p", null, caption.date), caption.name && /*#__PURE__*/React.createElement("p", null, caption.name), caption.source && /*#__PURE__*/React.createElement("p", null, t("ES_COMMON_FILED_VIA_" + caption.source.toUpperCase()))));
|
|
41664
|
-
};
|
|
41665
41790
|
const CHBApplicationDetails = () => {
|
|
41666
|
-
var _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _chb_details$addition, _chb_details$bookingS, _chb_details$applican, _chb_details$applican2, _chb_details$applican3, _chb_details$specialC, _chb_details$purpose, _docs, _docs2
|
|
41791
|
+
var _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _chb_details$addition, _chb_details$bookingS, _chb_details$applican, _chb_details$applican2, _chb_details$applican3, _chb_details$specialC, _chb_details$purpose, _docs, _docs2;
|
|
41667
41792
|
const {
|
|
41668
41793
|
t
|
|
41669
41794
|
} = useTranslation();
|
|
@@ -41760,13 +41885,20 @@ const CHBApplicationDetails = () => {
|
|
|
41760
41885
|
return /*#__PURE__*/React.createElement(Loader$1, null);
|
|
41761
41886
|
}
|
|
41762
41887
|
const getChbAcknowledgement = async () => {
|
|
41763
|
-
|
|
41764
|
-
|
|
41765
|
-
|
|
41766
|
-
|
|
41767
|
-
|
|
41768
|
-
|
|
41769
|
-
|
|
41888
|
+
try {
|
|
41889
|
+
setLoading(true);
|
|
41890
|
+
const applications = application || {};
|
|
41891
|
+
console.log("applications for chbb", applications);
|
|
41892
|
+
const tenantInfo = tenants.find(tenant => tenant.code === applications.tenantId);
|
|
41893
|
+
const acknowldgementDataAPI = await getChbAcknowledgementData({
|
|
41894
|
+
...applications
|
|
41895
|
+
}, tenantInfo, t);
|
|
41896
|
+
Digit.Utils.pdf.generate(acknowldgementDataAPI);
|
|
41897
|
+
} catch (err) {
|
|
41898
|
+
console.error(err);
|
|
41899
|
+
} finally {
|
|
41900
|
+
setLoading(false);
|
|
41901
|
+
}
|
|
41770
41902
|
};
|
|
41771
41903
|
let documentDate = t("CS_NA");
|
|
41772
41904
|
if (chb_details !== null && chb_details !== void 0 && (_chb_details$addition = chb_details.additionalDetails) !== null && _chb_details$addition !== void 0 && _chb_details$addition.documentDate) {
|
|
@@ -41780,64 +41912,78 @@ const CHBApplicationDetails = () => {
|
|
|
41780
41912
|
payments,
|
|
41781
41913
|
...params
|
|
41782
41914
|
}) {
|
|
41783
|
-
|
|
41784
|
-
|
|
41785
|
-
|
|
41786
|
-
|
|
41787
|
-
|
|
41788
|
-
|
|
41789
|
-
|
|
41790
|
-
|
|
41791
|
-
|
|
41792
|
-
|
|
41793
|
-
|
|
41794
|
-
|
|
41795
|
-
|
|
41796
|
-
|
|
41797
|
-
|
|
41798
|
-
|
|
41799
|
-
|
|
41800
|
-
|
|
41801
|
-
|
|
41802
|
-
|
|
41915
|
+
try {
|
|
41916
|
+
var _data$hallsBookingApp;
|
|
41917
|
+
setLoading(true);
|
|
41918
|
+
let application = data === null || data === void 0 ? void 0 : (_data$hallsBookingApp = data.hallsBookingApplication) === null || _data$hallsBookingApp === void 0 ? void 0 : _data$hallsBookingApp[0];
|
|
41919
|
+
let fileStoreId = application === null || application === void 0 ? void 0 : application.paymentReceiptFilestoreId;
|
|
41920
|
+
if (!fileStoreId) {
|
|
41921
|
+
var _response, _response2;
|
|
41922
|
+
let response = {
|
|
41923
|
+
filestoreIds: [payments === null || payments === void 0 ? void 0 : payments.fileStoreId]
|
|
41924
|
+
};
|
|
41925
|
+
response = await Digit.PaymentService.generatePdf(tenantId, {
|
|
41926
|
+
Payments: [{
|
|
41927
|
+
...payments,
|
|
41928
|
+
...application
|
|
41929
|
+
}]
|
|
41930
|
+
}, "chbservice-receipt");
|
|
41931
|
+
const updatedApplication = {
|
|
41932
|
+
...application,
|
|
41933
|
+
paymentReceiptFilestoreId: (_response = response) === null || _response === void 0 ? void 0 : _response.filestoreIds[0]
|
|
41934
|
+
};
|
|
41935
|
+
await mutation.mutateAsync({
|
|
41936
|
+
hallsBookingApplication: updatedApplication
|
|
41937
|
+
});
|
|
41938
|
+
fileStoreId = (_response2 = response) === null || _response2 === void 0 ? void 0 : _response2.filestoreIds[0];
|
|
41939
|
+
refetch();
|
|
41940
|
+
}
|
|
41941
|
+
const fileStore = await Digit.PaymentService.printReciept(tenantId, {
|
|
41942
|
+
fileStoreIds: fileStoreId
|
|
41803
41943
|
});
|
|
41804
|
-
fileStoreId
|
|
41805
|
-
|
|
41944
|
+
window.open(fileStore[fileStoreId], "_blank");
|
|
41945
|
+
} catch (error) {
|
|
41946
|
+
console.error("Sanction Letter download error:", error);
|
|
41947
|
+
} finally {
|
|
41948
|
+
setLoading(false);
|
|
41806
41949
|
}
|
|
41807
|
-
const fileStore = await Digit.PaymentService.printReciept(tenantId, {
|
|
41808
|
-
fileStoreIds: fileStoreId
|
|
41809
|
-
});
|
|
41810
|
-
window.open(fileStore[fileStoreId], "_blank");
|
|
41811
41950
|
}
|
|
41812
41951
|
async function getPermissionLetter({
|
|
41813
41952
|
tenantId,
|
|
41814
41953
|
payments,
|
|
41815
41954
|
...params
|
|
41816
41955
|
}) {
|
|
41817
|
-
|
|
41818
|
-
|
|
41819
|
-
|
|
41820
|
-
|
|
41821
|
-
|
|
41822
|
-
|
|
41823
|
-
|
|
41824
|
-
|
|
41825
|
-
|
|
41826
|
-
|
|
41827
|
-
|
|
41828
|
-
|
|
41829
|
-
|
|
41830
|
-
|
|
41831
|
-
|
|
41832
|
-
|
|
41833
|
-
|
|
41834
|
-
|
|
41835
|
-
|
|
41956
|
+
try {
|
|
41957
|
+
setLoading(true);
|
|
41958
|
+
let application = {
|
|
41959
|
+
hallsBookingApplication: ((data === null || data === void 0 ? void 0 : data.hallsBookingApplication) || []).map(app => {
|
|
41960
|
+
return {
|
|
41961
|
+
...app,
|
|
41962
|
+
bookingSlotDetails: [...(app.bookingSlotDetails || [])].sort((a, b) => {
|
|
41963
|
+
return new Date(a.bookingDate) - new Date(b.bookingDate);
|
|
41964
|
+
})
|
|
41965
|
+
};
|
|
41966
|
+
})
|
|
41967
|
+
};
|
|
41968
|
+
let fileStoreId = payments === null || payments === void 0 ? void 0 : payments.fileStoreId;
|
|
41969
|
+
if (!fileStoreId) {
|
|
41970
|
+
const response = await Digit.PaymentService.generatePdf(tenantId, {
|
|
41971
|
+
Payments: [{
|
|
41972
|
+
...payments,
|
|
41973
|
+
...application
|
|
41974
|
+
}]
|
|
41975
|
+
}, "chb-permissionletter");
|
|
41976
|
+
fileStoreId = response === null || response === void 0 ? void 0 : response.filestoreIds[0];
|
|
41977
|
+
}
|
|
41978
|
+
const fileStore = await Digit.PaymentService.printReciept(tenantId, {
|
|
41979
|
+
fileStoreIds: fileStoreId
|
|
41980
|
+
});
|
|
41981
|
+
window.open(fileStore[fileStoreId], "_blank");
|
|
41982
|
+
} catch (error) {
|
|
41983
|
+
console.error("Sanction Letter download error:", error);
|
|
41984
|
+
} finally {
|
|
41985
|
+
setLoading(false);
|
|
41836
41986
|
}
|
|
41837
|
-
const fileStore = await Digit.PaymentService.printReciept(tenantId, {
|
|
41838
|
-
fileStoreIds: fileStoreId
|
|
41839
|
-
});
|
|
41840
|
-
window.open(fileStore[fileStoreId], "_blank");
|
|
41841
41987
|
}
|
|
41842
41988
|
let dowloadOptions = [];
|
|
41843
41989
|
dowloadOptions.push({
|
|
@@ -41899,7 +42045,7 @@ const CHBApplicationDetails = () => {
|
|
|
41899
42045
|
styles: {
|
|
41900
42046
|
fontSize: "32px"
|
|
41901
42047
|
}
|
|
41902
|
-
}, t("CHB_BOOKING_DETAILS")), dowloadOptions && dowloadOptions.length > 0 && /*#__PURE__*/React.createElement(MultiLink, {
|
|
42048
|
+
}, t("CHB_BOOKING_DETAILS")), loading && /*#__PURE__*/React.createElement(Loader$1, null), dowloadOptions && dowloadOptions.length > 0 && /*#__PURE__*/React.createElement(MultiLink, {
|
|
41903
42049
|
className: "multilinkWrapper",
|
|
41904
42050
|
onHeadClick: () => setShowOptions(!showOptions),
|
|
41905
42051
|
displayOptions: showOptions,
|
|
@@ -41981,23 +42127,50 @@ const CHBApplicationDetails = () => {
|
|
|
41981
42127
|
marginTop: "10px",
|
|
41982
42128
|
fontSize: "15px"
|
|
41983
42129
|
}
|
|
41984
|
-
}, t(doc === null || doc === void 0 ? void 0 : doc.documentType))))) : /*#__PURE__*/React.createElement("h5", null, t("CS_NO_DOCUMENTS_UPLOADED"))))),
|
|
42130
|
+
}, t(doc === null || doc === void 0 ? void 0 : doc.documentType))))) : /*#__PURE__*/React.createElement("h5", null, t("CS_NO_DOCUMENTS_UPLOADED"))))), /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
41985
42131
|
style: {
|
|
41986
|
-
|
|
42132
|
+
fontSize: "24px"
|
|
41987
42133
|
}
|
|
41988
|
-
}, /*#__PURE__*/React.createElement(
|
|
42134
|
+
}, t("CS_APPLICATION_DETAILS_APPLICATION_TIMELINE")), /*#__PURE__*/React.createElement(ApplicationTimeline, {
|
|
42135
|
+
workflowDetails: workflowDetails,
|
|
42136
|
+
t: t
|
|
42137
|
+
})));
|
|
42138
|
+
};
|
|
42139
|
+
|
|
42140
|
+
const CHBWFReason = ({
|
|
42141
|
+
headComment,
|
|
42142
|
+
otherComment
|
|
42143
|
+
}) => /*#__PURE__*/React.createElement("div", {
|
|
42144
|
+
className: "checkpoint-comments-wrap"
|
|
42145
|
+
}, /*#__PURE__*/React.createElement("h4", null, headComment), /*#__PURE__*/React.createElement("p", null, otherComment));
|
|
42146
|
+
|
|
42147
|
+
const CHBWFCaption = ({
|
|
42148
|
+
data,
|
|
42149
|
+
OpenImage
|
|
42150
|
+
}) => {
|
|
42151
|
+
var _data$wfComment, _data$thumbnailsToSho, _data$thumbnailsToSho2;
|
|
42152
|
+
const {
|
|
42153
|
+
t
|
|
42154
|
+
} = useTranslation();
|
|
42155
|
+
return /*#__PURE__*/React.createElement("div", null, data.date && /*#__PURE__*/React.createElement("p", null, data.date), /*#__PURE__*/React.createElement("p", null, data.name), data.mobileNumber && /*#__PURE__*/React.createElement(TelePhone, {
|
|
42156
|
+
mobile: data.mobileNumber
|
|
42157
|
+
}), data.source && /*#__PURE__*/React.createElement("p", null, t("ES_APPLICATION_DETAILS_APPLICATION_CHANNEL_" + data.source.toUpperCase())), data.comment && /*#__PURE__*/React.createElement(Reason, {
|
|
42158
|
+
otherComment: data === null || data === void 0 ? void 0 : data.otherComment,
|
|
42159
|
+
headComment: data === null || data === void 0 ? void 0 : data.comment
|
|
42160
|
+
}), data !== null && data !== void 0 && data.wfComment ? /*#__PURE__*/React.createElement("div", null, data === null || data === void 0 ? void 0 : (_data$wfComment = data.wfComment) === null || _data$wfComment === void 0 ? void 0 : _data$wfComment.map(e => /*#__PURE__*/React.createElement("div", {
|
|
42161
|
+
className: "TLComments"
|
|
42162
|
+
}, /*#__PURE__*/React.createElement("h3", null, t("WF_COMMON_COMMENTS")), /*#__PURE__*/React.createElement("p", {
|
|
41989
42163
|
style: {
|
|
41990
|
-
|
|
42164
|
+
overflowX: "scroll"
|
|
41991
42165
|
}
|
|
41992
|
-
},
|
|
41993
|
-
|
|
41994
|
-
|
|
41995
|
-
|
|
41996
|
-
|
|
41997
|
-
|
|
41998
|
-
|
|
41999
|
-
|
|
42000
|
-
}))))));
|
|
42166
|
+
}, e)))) : null, (data === null || data === void 0 ? void 0 : (_data$thumbnailsToSho = data.thumbnailsToShow) === null || _data$thumbnailsToSho === void 0 ? void 0 : (_data$thumbnailsToSho2 = _data$thumbnailsToSho.thumbs) === null || _data$thumbnailsToSho2 === void 0 ? void 0 : _data$thumbnailsToSho2.length) > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
42167
|
+
className: "TLComments"
|
|
42168
|
+
}, /*#__PURE__*/React.createElement("h3", null, t("CS_COMMON_ATTACHMENTS")), /*#__PURE__*/React.createElement(DisplayPhotos, {
|
|
42169
|
+
srcs: data === null || data === void 0 ? void 0 : data.thumbnailsToShow.thumbs,
|
|
42170
|
+
onClick: (src, index) => {
|
|
42171
|
+
OpenImage(src, index, data === null || data === void 0 ? void 0 : data.thumbnailsToShow);
|
|
42172
|
+
}
|
|
42173
|
+
})) : null);
|
|
42001
42174
|
};
|
|
42002
42175
|
|
|
42003
42176
|
function _extends() {
|
|
@@ -43505,57 +43678,6 @@ const TableConfig = t => ({
|
|
|
43505
43678
|
}
|
|
43506
43679
|
});
|
|
43507
43680
|
|
|
43508
|
-
const Loader = ({
|
|
43509
|
-
page: _page = false
|
|
43510
|
-
}) => {
|
|
43511
|
-
const baseStyle = {
|
|
43512
|
-
display: "flex",
|
|
43513
|
-
justifyContent: "center",
|
|
43514
|
-
alignItems: "center"
|
|
43515
|
-
};
|
|
43516
|
-
const pageStyle = {
|
|
43517
|
-
...baseStyle,
|
|
43518
|
-
position: "fixed",
|
|
43519
|
-
top: 0,
|
|
43520
|
-
left: 0,
|
|
43521
|
-
width: "100vw",
|
|
43522
|
-
height: "100vh",
|
|
43523
|
-
background: "rgba(255,255,255,0.6)",
|
|
43524
|
-
backdropFilter: "blur(4px)",
|
|
43525
|
-
zIndex: 9999
|
|
43526
|
-
};
|
|
43527
|
-
const moduleStyle = {
|
|
43528
|
-
...baseStyle,
|
|
43529
|
-
minHeight: "100px",
|
|
43530
|
-
width: "100%",
|
|
43531
|
-
position: "relative"
|
|
43532
|
-
};
|
|
43533
|
-
const spinnerStyle = {
|
|
43534
|
-
width: "64px",
|
|
43535
|
-
height: "64px",
|
|
43536
|
-
border: "8px solid #1976d2",
|
|
43537
|
-
borderTop: "8px solid transparent",
|
|
43538
|
-
borderRadius: "50%",
|
|
43539
|
-
animation: "spin 1.2s linear infinite"
|
|
43540
|
-
};
|
|
43541
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
43542
|
-
style: _page ? pageStyle : moduleStyle
|
|
43543
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
43544
|
-
style: spinnerStyle
|
|
43545
|
-
}), /*#__PURE__*/React.createElement("style", null, `
|
|
43546
|
-
@keyframes spin {
|
|
43547
|
-
0% { transform: rotate(0deg); }
|
|
43548
|
-
100% { transform: rotate(360deg); }
|
|
43549
|
-
}
|
|
43550
|
-
`));
|
|
43551
|
-
};
|
|
43552
|
-
Loader.propTypes = {
|
|
43553
|
-
page: propTypes.bool
|
|
43554
|
-
};
|
|
43555
|
-
Loader.defaultProps = {
|
|
43556
|
-
page: false
|
|
43557
|
-
};
|
|
43558
|
-
|
|
43559
43681
|
const ModalConfig = ({
|
|
43560
43682
|
t,
|
|
43561
43683
|
action,
|
|
@@ -43717,7 +43839,7 @@ const NDCModal = ({
|
|
|
43717
43839
|
};
|
|
43718
43840
|
}));
|
|
43719
43841
|
}
|
|
43720
|
-
}, [approverData]);
|
|
43842
|
+
}, [approverData, EmployeeStatusData]);
|
|
43721
43843
|
function selectFile(e) {
|
|
43722
43844
|
setFile(e.target.files[0]);
|
|
43723
43845
|
}
|
|
@@ -43810,45 +43932,8 @@ const NDCModal = ({
|
|
|
43810
43932
|
}));
|
|
43811
43933
|
};
|
|
43812
43934
|
|
|
43813
|
-
const getTimelineCaptions$1 = (checkpoint, index, arr, t) => {
|
|
43814
|
-
var _checkpoint$auditDeta, _checkpoint$assigner, _checkpoint$assigner2, _thumbnailsToShow$thu;
|
|
43815
|
-
const {
|
|
43816
|
-
wfComment: comment,
|
|
43817
|
-
thumbnailsToShow,
|
|
43818
|
-
wfDocuments
|
|
43819
|
-
} = checkpoint;
|
|
43820
|
-
const caption = {
|
|
43821
|
-
date: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$auditDeta = checkpoint.auditDetails) === null || _checkpoint$auditDeta === void 0 ? void 0 : _checkpoint$auditDeta.lastModified,
|
|
43822
|
-
name: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assigner = checkpoint.assigner) === null || _checkpoint$assigner === void 0 ? void 0 : _checkpoint$assigner.name,
|
|
43823
|
-
source: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assigner2 = checkpoint.assigner) === null || _checkpoint$assigner2 === void 0 ? void 0 : _checkpoint$assigner2.source
|
|
43824
|
-
};
|
|
43825
|
-
return /*#__PURE__*/React.createElement("div", null, (comment === null || comment === void 0 ? void 0 : comment.length) > 0 && /*#__PURE__*/React.createElement("div", {
|
|
43826
|
-
className: "TLComments"
|
|
43827
|
-
}, /*#__PURE__*/React.createElement("h3", null, t("WF_COMMON_COMMENTS")), /*#__PURE__*/React.createElement("p", {
|
|
43828
|
-
style: {
|
|
43829
|
-
overflowX: "scroll"
|
|
43830
|
-
}
|
|
43831
|
-
}, comment)), (thumbnailsToShow === null || thumbnailsToShow === void 0 ? void 0 : (_thumbnailsToShow$thu = thumbnailsToShow.thumbs) === null || _thumbnailsToShow$thu === void 0 ? void 0 : _thumbnailsToShow$thu.length) > 0 && /*#__PURE__*/React.createElement(DisplayPhotos, {
|
|
43832
|
-
srcs: thumbnailsToShow.thumbs,
|
|
43833
|
-
onClick: (src, idx) => {
|
|
43834
|
-
var _thumbnailsToShow$ful;
|
|
43835
|
-
let fullImage = ((_thumbnailsToShow$ful = thumbnailsToShow.fullImage) === null || _thumbnailsToShow$ful === void 0 ? void 0 : _thumbnailsToShow$ful[idx]) || src;
|
|
43836
|
-
Digit.Utils.zoomImage(fullImage);
|
|
43837
|
-
}
|
|
43838
|
-
}), (wfDocuments === null || wfDocuments === void 0 ? void 0 : wfDocuments.length) > 0 && /*#__PURE__*/React.createElement("div", null, wfDocuments === null || wfDocuments === void 0 ? void 0 : wfDocuments.map((doc, index) => /*#__PURE__*/React.createElement("div", {
|
|
43839
|
-
key: index
|
|
43840
|
-
}, /*#__PURE__*/React.createElement(NDCDocument, {
|
|
43841
|
-
value: wfDocuments,
|
|
43842
|
-
Code: doc === null || doc === void 0 ? void 0 : doc.documentType,
|
|
43843
|
-
index: index
|
|
43844
|
-
})))), /*#__PURE__*/React.createElement("div", {
|
|
43845
|
-
style: {
|
|
43846
|
-
marginTop: "8px"
|
|
43847
|
-
}
|
|
43848
|
-
}, caption.date && /*#__PURE__*/React.createElement("p", null, caption.date), caption.name && /*#__PURE__*/React.createElement("p", null, caption.name), caption.source && /*#__PURE__*/React.createElement("p", null, t("ES_COMMON_FILED_VIA_" + caption.source.toUpperCase()))));
|
|
43849
|
-
};
|
|
43850
43935
|
const CHBApplicationDetails$1 = () => {
|
|
43851
|
-
var _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _user$info, _user$info$roles, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetailsTemp$, _workflowDetailsTemp$2, _chb_details$addition, _chb_details$bookingS, _chb_details$applican, _chb_details$applican2, _chb_details$applican3, _chb_details$specialC, _chb_details$purpose, _docs, _docs2, _workflowDetails$data9, _workflowDetails$data0, _workflowDetails$data1, _workflowDetails$data10
|
|
43936
|
+
var _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _user$info, _user$info$roles, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetailsTemp$, _workflowDetailsTemp$2, _chb_details$addition, _chb_details$bookingS, _chb_details$applican, _chb_details$applican2, _chb_details$applican3, _chb_details$specialC, _chb_details$purpose, _docs, _docs2, _workflowDetails$data9, _workflowDetails$data0, _workflowDetails$data1, _workflowDetails$data10;
|
|
43852
43937
|
const {
|
|
43853
43938
|
t
|
|
43854
43939
|
} = useTranslation();
|
|
@@ -44034,11 +44119,40 @@ const CHBApplicationDetails$1 = () => {
|
|
|
44034
44119
|
history.push(`/digit-ui/employee/payment/collect/chb-services/${appNo}/${tenantId}?tenantId=${tenantId}`);
|
|
44035
44120
|
} else if ((action === null || action === void 0 ? void 0 : action.action) == "EDIT") {
|
|
44036
44121
|
history.push(`/digit-ui/employee/ndc/create/${appNo}`);
|
|
44122
|
+
} else if ((action === null || action === void 0 ? void 0 : action.action) == "CANCEL") {
|
|
44123
|
+
handleCancel();
|
|
44037
44124
|
} else {
|
|
44038
44125
|
setShowModal(true);
|
|
44039
44126
|
setSelectedAction(action);
|
|
44040
44127
|
}
|
|
44041
44128
|
}
|
|
44129
|
+
const handleCancel = async () => {
|
|
44130
|
+
console.log("displayData?.applicantData", data === null || data === void 0 ? void 0 : data.hallsBookingApplication);
|
|
44131
|
+
setLoader(true);
|
|
44132
|
+
const finalPayload = {
|
|
44133
|
+
hallsBookingApplication: {
|
|
44134
|
+
...application,
|
|
44135
|
+
workflow: {
|
|
44136
|
+
action: "CANCEL"
|
|
44137
|
+
}
|
|
44138
|
+
}
|
|
44139
|
+
};
|
|
44140
|
+
try {
|
|
44141
|
+
const response = await Digit.CHBServices.update({
|
|
44142
|
+
tenantId,
|
|
44143
|
+
...finalPayload
|
|
44144
|
+
});
|
|
44145
|
+
workflowDetails.revalidate();
|
|
44146
|
+
setTimeout(() => {
|
|
44147
|
+
history.push("/digit-ui/employee/chb/inbox");
|
|
44148
|
+
window.location.reload();
|
|
44149
|
+
}, 2000);
|
|
44150
|
+
setLoader(false);
|
|
44151
|
+
} catch (err) {
|
|
44152
|
+
setLoader(false);
|
|
44153
|
+
return err;
|
|
44154
|
+
}
|
|
44155
|
+
};
|
|
44042
44156
|
const fetchBillData = async () => {
|
|
44043
44157
|
setLoading(true);
|
|
44044
44158
|
const result = await Digit.PaymentService.fetchBill(tenantId, {
|
|
@@ -44337,19 +44451,10 @@ const CHBApplicationDetails$1 = () => {
|
|
|
44337
44451
|
marginTop: "10px",
|
|
44338
44452
|
fontSize: "15px"
|
|
44339
44453
|
}
|
|
44340
|
-
}, t(doc === null || doc === void 0 ? void 0 : doc.documentType))))) : /*#__PURE__*/React.createElement("h5", null, t("CS_NO_DOCUMENTS_UPLOADED"))))), (
|
|
44341
|
-
|
|
44342
|
-
|
|
44343
|
-
|
|
44344
|
-
}, /*#__PURE__*/React.createElement(CardSubHeader, null, t("CS_APPLICATION_DETAILS_APPLICATION_TIMELINE")), (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data0 = workflowDetails.data) === null || _workflowDetails$data0 === void 0 ? void 0 : _workflowDetails$data0.timeline.length) === 1 ? /*#__PURE__*/React.createElement(CheckPoint, {
|
|
44345
|
-
isCompleted: true,
|
|
44346
|
-
label: t(workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data1 = workflowDetails.data) === null || _workflowDetails$data1 === void 0 ? void 0 : (_workflowDetails$data10 = _workflowDetails$data1.timeline[0]) === null || _workflowDetails$data10 === void 0 ? void 0 : _workflowDetails$data10.status)
|
|
44347
|
-
}) : /*#__PURE__*/React.createElement(ConnectingCheckPoints, null, workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data11 = workflowDetails.data) === null || _workflowDetails$data11 === void 0 ? void 0 : _workflowDetails$data11.timeline.map((checkpoint, index, arr) => /*#__PURE__*/React.createElement(CheckPoint, {
|
|
44348
|
-
keyValue: index,
|
|
44349
|
-
isCompleted: index === 0,
|
|
44350
|
-
label: t(checkpoint.status),
|
|
44351
|
-
customChild: getTimelineCaptions$1(checkpoint, index, arr, t)
|
|
44352
|
-
})))), actions && actions.length > 0 && !actions.some(a => a.action === "SUBMIT") && /*#__PURE__*/React.createElement(ActionBar, null, displayMenu && (workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data12 = workflowDetails.data) !== null && _workflowDetails$data12 !== void 0 && (_workflowDetails$data13 = _workflowDetails$data12.actionState) !== null && _workflowDetails$data13 !== void 0 && _workflowDetails$data13.nextActions || workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data14 = workflowDetails.data) !== null && _workflowDetails$data14 !== void 0 && _workflowDetails$data14.nextActions) ? /*#__PURE__*/React.createElement(Menu, {
|
|
44454
|
+
}, t(doc === null || doc === void 0 ? void 0 : doc.documentType))))) : /*#__PURE__*/React.createElement("h5", null, t("CS_NO_DOCUMENTS_UPLOADED"))))), /*#__PURE__*/React.createElement(CardSubHeader, null, t("CS_APPLICATION_DETAILS_APPLICATION_TIMELINE")), /*#__PURE__*/React.createElement(ApplicationTimeline, {
|
|
44455
|
+
workflowDetails: workflowDetails,
|
|
44456
|
+
t: t
|
|
44457
|
+
}), actions && actions.length > 0 && !actions.some(a => a.action === "SUBMIT") && /*#__PURE__*/React.createElement(ActionBar, null, displayMenu && (workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data9 = workflowDetails.data) !== null && _workflowDetails$data9 !== void 0 && (_workflowDetails$data0 = _workflowDetails$data9.actionState) !== null && _workflowDetails$data0 !== void 0 && _workflowDetails$data0.nextActions || workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data1 = workflowDetails.data) !== null && _workflowDetails$data1 !== void 0 && _workflowDetails$data1.nextActions) ? /*#__PURE__*/React.createElement(Menu, {
|
|
44353
44458
|
localeKeyPrefix: `WF_EDITRENEWAL`,
|
|
44354
44459
|
options: filteredActions,
|
|
44355
44460
|
optionKey: "action",
|
|
@@ -44369,7 +44474,7 @@ const CHBApplicationDetails$1 = () => {
|
|
|
44369
44474
|
applicationData: data,
|
|
44370
44475
|
closeModal: closeModal,
|
|
44371
44476
|
submitAction: submitAction,
|
|
44372
|
-
actionData: workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$
|
|
44477
|
+
actionData: workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data10 = workflowDetails.data) === null || _workflowDetails$data10 === void 0 ? void 0 : _workflowDetails$data10.timeline,
|
|
44373
44478
|
workflowDetails: workflowDetails,
|
|
44374
44479
|
showToast: showToast,
|
|
44375
44480
|
getEmployees: getEmployees,
|
|
@@ -44383,7 +44488,7 @@ const CHBApplicationDetails$1 = () => {
|
|
|
44383
44488
|
label: error,
|
|
44384
44489
|
isDleteBtn: true,
|
|
44385
44490
|
onClose: closeToast
|
|
44386
|
-
}), (isLoading || auditDataLoading || getLoader) && /*#__PURE__*/React.createElement(Loader, {
|
|
44491
|
+
}), (isLoading || auditDataLoading || getLoader || workflowDetails.isLoading || recieptDataLoading) && /*#__PURE__*/React.createElement(Loader, {
|
|
44387
44492
|
page: true
|
|
44388
44493
|
})));
|
|
44389
44494
|
};
|
|
@@ -45292,6 +45397,7 @@ const CHBCitizenSecond = ({
|
|
|
45292
45397
|
const [loader, setLoader] = useState(false);
|
|
45293
45398
|
const [showInfo, setShowInfo] = useState(false);
|
|
45294
45399
|
const [error, setError] = useState(null);
|
|
45400
|
+
console.log("tenantId", tenantId);
|
|
45295
45401
|
const {
|
|
45296
45402
|
control,
|
|
45297
45403
|
handleSubmit,
|
|
@@ -47098,8 +47204,6 @@ var reactLifecyclesCompat_es = {
|
|
|
47098
47204
|
polyfill: polyfill
|
|
47099
47205
|
};
|
|
47100
47206
|
|
|
47101
|
-
var _reactLifecyclesCompat = getCjsExportFromNamespace(reactLifecyclesCompat_es);
|
|
47102
|
-
|
|
47103
47207
|
var Modal_1 = createCommonjsModule(function (module, exports) {
|
|
47104
47208
|
|
|
47105
47209
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -47388,7 +47492,7 @@ var Modal_1 = createCommonjsModule(function (module, exports) {
|
|
|
47388
47492
|
padding: "20px"
|
|
47389
47493
|
}
|
|
47390
47494
|
};
|
|
47391
|
-
(0,
|
|
47495
|
+
(0, reactLifecyclesCompat_es.polyfill)(Modal);
|
|
47392
47496
|
if (process.env.NODE_ENV !== "production") {
|
|
47393
47497
|
Modal.setCreateHTMLElement = function (fn) {
|
|
47394
47498
|
return createHTMLElement = fn;
|
|
@@ -47418,7 +47522,9 @@ const CitizenConsent = ({
|
|
|
47418
47522
|
showTermsPopupOwner,
|
|
47419
47523
|
setShowTermsPopupOwner,
|
|
47420
47524
|
otpVerifiedTimestamp,
|
|
47421
|
-
getModalData
|
|
47525
|
+
getModalData,
|
|
47526
|
+
getUser,
|
|
47527
|
+
getShowOtp
|
|
47422
47528
|
}) => {
|
|
47423
47529
|
var _user$info, _getModalData$purpose;
|
|
47424
47530
|
const {
|
|
@@ -47443,7 +47549,6 @@ const CitizenConsent = ({
|
|
|
47443
47549
|
const [userSelected, setUser] = useState(null);
|
|
47444
47550
|
const [setOtpLoading, setSetOtpLoading] = useState(false);
|
|
47445
47551
|
const stateCode = Digit.ULBService.getStateId();
|
|
47446
|
-
console.log("getModalData", getModalData);
|
|
47447
47552
|
const [isUploading, setIsUploading] = useState(false);
|
|
47448
47553
|
const [isFileUploaded, setIsFileUploaded] = useState(false);
|
|
47449
47554
|
const isCitizenDeclared = sessionStorage.getItem("CitizenConsentdocFilestoreidCHB");
|
|
@@ -47546,12 +47651,11 @@ const CitizenConsent = ({
|
|
|
47546
47651
|
setShowTermsPopupOwner(false);
|
|
47547
47652
|
};
|
|
47548
47653
|
const handleVerifyOTPClick = async () => {
|
|
47549
|
-
var _user$info3, _user$info4;
|
|
47550
47654
|
const requestData = {
|
|
47551
47655
|
username: getModalData === null || getModalData === void 0 ? void 0 : getModalData.mobileNumber,
|
|
47552
47656
|
password: otp,
|
|
47553
|
-
tenantId:
|
|
47554
|
-
userType:
|
|
47657
|
+
tenantId: "pb",
|
|
47658
|
+
userType: "citizen"
|
|
47555
47659
|
};
|
|
47556
47660
|
try {
|
|
47557
47661
|
setSetOtpLoading(true);
|
|
@@ -47580,10 +47684,6 @@ const CitizenConsent = ({
|
|
|
47580
47684
|
const formatted = `${map.day} ${map.month} ${map.year} ${map.weekday} ${map.hour}:${map.minute}:${map.second} ${map.dayPeriod} ${map.timeZoneName}`;
|
|
47581
47685
|
setOTPVerifiedTimestamp(formatted);
|
|
47582
47686
|
sessionStorage.setItem("otpVerifiedTimestampcitizen", formatted);
|
|
47583
|
-
setUser({
|
|
47584
|
-
info,
|
|
47585
|
-
...tokens
|
|
47586
|
-
});
|
|
47587
47687
|
setSetOtpLoading(false);
|
|
47588
47688
|
setShowOTPInput(false);
|
|
47589
47689
|
setIsOTPVerified(true);
|
|
@@ -47594,7 +47694,30 @@ const CitizenConsent = ({
|
|
|
47594
47694
|
return "";
|
|
47595
47695
|
}
|
|
47596
47696
|
} catch (error) {
|
|
47597
|
-
|
|
47697
|
+
setOTPError(t("Error verifying OTP"));
|
|
47698
|
+
setSetOtpLoading(false);
|
|
47699
|
+
return "";
|
|
47700
|
+
}
|
|
47701
|
+
};
|
|
47702
|
+
const handleVerifyOTPClickNew = async () => {
|
|
47703
|
+
setSetOtpLoading(true);
|
|
47704
|
+
const stateCode = "pb";
|
|
47705
|
+
const requestData = {
|
|
47706
|
+
name: getModalData === null || getModalData === void 0 ? void 0 : getModalData.name,
|
|
47707
|
+
emailId: getModalData === null || getModalData === void 0 ? void 0 : getModalData.emailId,
|
|
47708
|
+
username: getModalData === null || getModalData === void 0 ? void 0 : getModalData.mobileNumber,
|
|
47709
|
+
otpReference: otp,
|
|
47710
|
+
tenantId: "pb"
|
|
47711
|
+
};
|
|
47712
|
+
try {
|
|
47713
|
+
const {
|
|
47714
|
+
ResponseInfo,
|
|
47715
|
+
UserRequest: info,
|
|
47716
|
+
...tokens
|
|
47717
|
+
} = await Digit.UserService.registerUser(requestData, stateCode);
|
|
47718
|
+
setSetOtpLoading(false);
|
|
47719
|
+
setIsOTPVerified(true);
|
|
47720
|
+
} catch (error) {
|
|
47598
47721
|
setOTPError(t("Error verifying OTP"));
|
|
47599
47722
|
setSetOtpLoading(false);
|
|
47600
47723
|
return "";
|
|
@@ -47603,17 +47726,15 @@ const CitizenConsent = ({
|
|
|
47603
47726
|
const handleGetOTPClick = async () => {
|
|
47604
47727
|
setLoader(true);
|
|
47605
47728
|
try {
|
|
47606
|
-
var _user$info5;
|
|
47607
47729
|
const response = await Digit.UserService.sendOtp({
|
|
47608
47730
|
otp: {
|
|
47609
47731
|
mobileNumber: getModalData === null || getModalData === void 0 ? void 0 : getModalData.mobileNumber,
|
|
47610
|
-
tenantId:
|
|
47611
|
-
userType: "
|
|
47732
|
+
tenantId: "pb",
|
|
47733
|
+
userType: "citizen",
|
|
47612
47734
|
type: "login"
|
|
47613
47735
|
}
|
|
47614
47736
|
});
|
|
47615
47737
|
setLoader(false);
|
|
47616
|
-
console.log(" Full OTP send response:", JSON.stringify(response, null, 2));
|
|
47617
47738
|
if (response !== null && response !== void 0 && response.error) {
|
|
47618
47739
|
if (response.error.fields && Array.isArray(response.error.fields)) {
|
|
47619
47740
|
const hasUnknownCredential = response.error.fields.some(field => {
|
|
@@ -47762,7 +47883,7 @@ const CitizenConsent = ({
|
|
|
47762
47883
|
}, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
47763
47884
|
label: t("BPA_CLOSE"),
|
|
47764
47885
|
onSubmit: closeModal
|
|
47765
|
-
})), /*#__PURE__*/React.createElement("br", null), !isCitizenDeclared && !isOTPVerified && /*#__PURE__*/React.createElement("div", {
|
|
47886
|
+
})), /*#__PURE__*/React.createElement("br", null), !isCitizenDeclared && !isOTPVerified && !getShowOtp && /*#__PURE__*/React.createElement("div", {
|
|
47766
47887
|
style: {
|
|
47767
47888
|
display: "flex",
|
|
47768
47889
|
justifyContent: "flex-end"
|
|
@@ -47771,12 +47892,12 @@ const CitizenConsent = ({
|
|
|
47771
47892
|
label: t("BPA_UPLOAD"),
|
|
47772
47893
|
onSubmit: handleGetOTPClick,
|
|
47773
47894
|
disabled: !isValidMobileNumber
|
|
47774
|
-
})), showOTPInput && !isCitizenDeclared && !isOTPVerified && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(CardLabel, null, t("
|
|
47895
|
+
})), showOTPInput && !isCitizenDeclared && !isOTPVerified && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(CardLabel, null, t("CHB_OTP")), /*#__PURE__*/React.createElement(OTPInput, {
|
|
47775
47896
|
length: 6,
|
|
47776
47897
|
onChange: value => setOTP(value),
|
|
47777
47898
|
value: otp
|
|
47778
47899
|
}), /*#__PURE__*/React.createElement(SubmitBar, {
|
|
47779
|
-
label: t("
|
|
47900
|
+
label: t("CHB_VERIFY_OTP"),
|
|
47780
47901
|
onSubmit: handleVerifyOTPClick
|
|
47781
47902
|
}), otpError && /*#__PURE__*/React.createElement(CardLabel, {
|
|
47782
47903
|
style: {
|
|
@@ -47786,7 +47907,14 @@ const CitizenConsent = ({
|
|
|
47786
47907
|
style: {
|
|
47787
47908
|
color: "green"
|
|
47788
47909
|
}
|
|
47789
|
-
}, t(otpSuccess))), isOTPVerified && !isCitizenDeclared && /*#__PURE__*/React.createElement("
|
|
47910
|
+
}, t(otpSuccess))), getShowOtp && !isOTPVerified && !isCitizenDeclared && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(CardLabel, null, t("CHB_OTP")), /*#__PURE__*/React.createElement(OTPInput, {
|
|
47911
|
+
length: 6,
|
|
47912
|
+
onChange: value => setOTP(value),
|
|
47913
|
+
value: otp
|
|
47914
|
+
}), /*#__PURE__*/React.createElement(SubmitBar, {
|
|
47915
|
+
label: t("CHB_VERIFY_OTP"),
|
|
47916
|
+
onSubmit: handleVerifyOTPClickNew
|
|
47917
|
+
})), isOTPVerified && !isCitizenDeclared && /*#__PURE__*/React.createElement("div", {
|
|
47790
47918
|
style: {
|
|
47791
47919
|
display: "flex",
|
|
47792
47920
|
justifyContent: "flex-end"
|
|
@@ -47805,7 +47933,7 @@ const CHBCitizenDetailsNew = ({
|
|
|
47805
47933
|
currentStepData,
|
|
47806
47934
|
onGoBack
|
|
47807
47935
|
}) => {
|
|
47808
|
-
var _user$info, _user$info2, _user$info3;
|
|
47936
|
+
var _user$info, _user$info2, _user$info3, _user$info4;
|
|
47809
47937
|
const tenantId = window.location.href.includes("citizen") ? window.localStorage.getItem("CITIZEN.CITY") : window.localStorage.getItem("Employee.tenant-id");
|
|
47810
47938
|
const isCitizen = window.location.href.includes("citizen");
|
|
47811
47939
|
const stateId = Digit.ULBService.getStateId();
|
|
@@ -47819,6 +47947,7 @@ const CHBCitizenDetailsNew = ({
|
|
|
47819
47947
|
email: false,
|
|
47820
47948
|
address: false
|
|
47821
47949
|
});
|
|
47950
|
+
const [getShowOtp, setShowOtp] = useState(false);
|
|
47822
47951
|
const {
|
|
47823
47952
|
control,
|
|
47824
47953
|
handleSubmit,
|
|
@@ -47829,11 +47958,13 @@ const CHBCitizenDetailsNew = ({
|
|
|
47829
47958
|
getValues,
|
|
47830
47959
|
watch
|
|
47831
47960
|
} = useForm({
|
|
47961
|
+
mode: "onChange",
|
|
47962
|
+
reValidateMode: "onChange",
|
|
47832
47963
|
defaultValues: {
|
|
47833
47964
|
name: isCitizen && (user === null || user === void 0 ? void 0 : (_user$info = user.info) === null || _user$info === void 0 ? void 0 : _user$info.name) || "",
|
|
47834
47965
|
emailId: isCitizen && (user === null || user === void 0 ? void 0 : (_user$info2 = user.info) === null || _user$info2 === void 0 ? void 0 : _user$info2.emailId) || "",
|
|
47835
47966
|
mobileNumber: isCitizen && (user === null || user === void 0 ? void 0 : (_user$info3 = user.info) === null || _user$info3 === void 0 ? void 0 : _user$info3.mobileNumber) || "",
|
|
47836
|
-
address: ""
|
|
47967
|
+
address: isCitizen && (user === null || user === void 0 ? void 0 : (_user$info4 = user.info) === null || _user$info4 === void 0 ? void 0 : _user$info4.permanentCity) || ""
|
|
47837
47968
|
}
|
|
47838
47969
|
});
|
|
47839
47970
|
const onSubmit = async data => {
|
|
@@ -47842,19 +47973,18 @@ const CHBCitizenDetailsNew = ({
|
|
|
47842
47973
|
if (currentStepData !== null && currentStepData !== void 0 && (_currentStepData$venu = currentStepData.venueDetails) !== null && _currentStepData$venu !== void 0 && (_currentStepData$venu2 = _currentStepData$venu[0]) !== null && _currentStepData$venu2 !== void 0 && _currentStepData$venu2.bookingNo) {
|
|
47843
47974
|
goNext(currentStepData === null || currentStepData === void 0 ? void 0 : currentStepData.venueDetails);
|
|
47844
47975
|
} else {
|
|
47845
|
-
var _currentStepData$owne, _user$
|
|
47976
|
+
var _currentStepData$owne, _user$info5, _baseApplication$purp, _baseApplication$purp2;
|
|
47846
47977
|
const baseApplication = (currentStepData === null || currentStepData === void 0 ? void 0 : (_currentStepData$owne = currentStepData.ownerDetails) === null || _currentStepData$owne === void 0 ? void 0 : _currentStepData$owne.hallsBookingApplication) || {};
|
|
47847
47978
|
if (!isCitizenDeclared) {
|
|
47848
47979
|
alert("Please upload Self Certificate");
|
|
47849
47980
|
return;
|
|
47850
47981
|
}
|
|
47851
|
-
console.log("baseApplication", baseApplication);
|
|
47852
47982
|
const applicantDetail = {
|
|
47853
47983
|
tenantId: tenantId,
|
|
47854
47984
|
applicantName: data === null || data === void 0 ? void 0 : data.name,
|
|
47855
47985
|
applicantMobileNo: data === null || data === void 0 ? void 0 : data.mobileNumber,
|
|
47856
47986
|
applicantEmailId: data === null || data === void 0 ? void 0 : data.emailId,
|
|
47857
|
-
type: user === null || user === void 0 ? void 0 : (_user$
|
|
47987
|
+
type: user === null || user === void 0 ? void 0 : (_user$info5 = user.info) === null || _user$info5 === void 0 ? void 0 : _user$info5.type
|
|
47858
47988
|
};
|
|
47859
47989
|
const additionalDetails = {
|
|
47860
47990
|
...(baseApplication === null || baseApplication === void 0 ? void 0 : baseApplication.additionalDetails),
|
|
@@ -47881,7 +48011,6 @@ const CHBCitizenDetailsNew = ({
|
|
|
47881
48011
|
additionalDetails
|
|
47882
48012
|
}
|
|
47883
48013
|
};
|
|
47884
|
-
console.log("checkpayload", payload);
|
|
47885
48014
|
setLoader(true);
|
|
47886
48015
|
try {
|
|
47887
48016
|
const response = await Digit.CHBServices.create(payload);
|
|
@@ -47906,70 +48035,27 @@ const CHBCitizenDetailsNew = ({
|
|
|
47906
48035
|
const updateUser = async () => {
|
|
47907
48036
|
const checkData = getValues();
|
|
47908
48037
|
setLoader(true);
|
|
47909
|
-
|
|
48038
|
+
const tenantId = "pb";
|
|
47910
48039
|
const payload = {
|
|
47911
|
-
|
|
47912
|
-
|
|
47913
|
-
|
|
47914
|
-
|
|
47915
|
-
|
|
47916
|
-
|
|
47917
|
-
|
|
47918
|
-
permanentCity: (checkData === null || checkData === void 0 ? void 0 : checkData.permanentCity) || null,
|
|
47919
|
-
correspondenceCity: (checkData === null || checkData === void 0 ? void 0 : checkData.correspondenceCity) || null,
|
|
47920
|
-
permanentDistrict: (checkData === null || checkData === void 0 ? void 0 : checkData.permanentDistrict) || null,
|
|
47921
|
-
permanentState: (checkData === null || checkData === void 0 ? void 0 : checkData.permanentState) || null,
|
|
47922
|
-
correspondenceState: (checkData === null || checkData === void 0 ? void 0 : checkData.correspondenceState) || null,
|
|
47923
|
-
correspondenceDistrict: (checkData === null || checkData === void 0 ? void 0 : checkData.correspondenceDistrict) || null,
|
|
47924
|
-
type: "CITIZEN",
|
|
47925
|
-
isPrimaryOwner: true,
|
|
47926
|
-
ownerType: "NONE",
|
|
47927
|
-
status: true,
|
|
47928
|
-
active: true,
|
|
47929
|
-
accountLocked: false,
|
|
47930
|
-
correspondenceAddress: null,
|
|
47931
|
-
permanentAddress: null,
|
|
47932
|
-
permanentPinCode: null,
|
|
47933
|
-
correspondencePinCode: null,
|
|
47934
|
-
ownerId: null,
|
|
47935
|
-
ownerShipPercentage: null,
|
|
47936
|
-
institutionId: null,
|
|
47937
|
-
documents: null,
|
|
47938
|
-
relationship: null,
|
|
47939
|
-
pan: null,
|
|
47940
|
-
aadhaarNumber: null,
|
|
47941
|
-
dob: null,
|
|
47942
|
-
pwdExpiryDate: null,
|
|
47943
|
-
locale: null,
|
|
47944
|
-
signature: null,
|
|
47945
|
-
bloodGroup: null,
|
|
47946
|
-
identificationMark: null,
|
|
47947
|
-
photo: null,
|
|
47948
|
-
roles: [{
|
|
47949
|
-
code: "CITIZEN",
|
|
47950
|
-
name: "CITIZEN",
|
|
47951
|
-
tenantId: "pb"
|
|
47952
|
-
}],
|
|
47953
|
-
createdBy: "0",
|
|
47954
|
-
lastModifiedBy: "0",
|
|
47955
|
-
createdDate: null,
|
|
47956
|
-
lastModifiedDate: null,
|
|
47957
|
-
otpReference: null
|
|
48040
|
+
otp: {
|
|
48041
|
+
tenantId,
|
|
48042
|
+
mobileNumber: (checkData === null || checkData === void 0 ? void 0 : checkData.mobileNumber) || null,
|
|
48043
|
+
name: (checkData === null || checkData === void 0 ? void 0 : checkData.name) || null,
|
|
48044
|
+
emailId: (checkData === null || checkData === void 0 ? void 0 : checkData.emailId) || null,
|
|
48045
|
+
type: "register"
|
|
48046
|
+
}
|
|
47958
48047
|
};
|
|
47959
48048
|
try {
|
|
47960
|
-
const response = await Digit.UserService.
|
|
48049
|
+
const response = await Digit.UserService.sendOtp(payload, tenantId);
|
|
47961
48050
|
setLoader(false);
|
|
47962
|
-
|
|
48051
|
+
setShowOtp(true);
|
|
47963
48052
|
} catch (err) {
|
|
47964
48053
|
setLoader(false);
|
|
47965
|
-
console.log(err);
|
|
47966
48054
|
}
|
|
47967
48055
|
};
|
|
47968
48056
|
const handleModalData = e => {
|
|
47969
48057
|
var _currentStepData$owne2, _getValues, _getValues2, _getValues3, _getValues4, _mapData$purpose, _mapData$bookingSlotD, _mapData$bookingSlotD2, _mapData$bookingSlotD3, _mapData$bookingSlotD4, _mapData$bookingSlotD5;
|
|
47970
|
-
|
|
47971
|
-
console.log("getvalues", getValues());
|
|
47972
|
-
if (!getUser) {
|
|
48058
|
+
if (!getUser && !isCitizen) {
|
|
47973
48059
|
updateUser();
|
|
47974
48060
|
}
|
|
47975
48061
|
const mapData = currentStepData === null || currentStepData === void 0 ? void 0 : (_currentStepData$owne2 = currentStepData.ownerDetails) === null || _currentStepData$owne2 === void 0 ? void 0 : _currentStepData$owne2.hallsBookingApplication;
|
|
@@ -47987,7 +48073,6 @@ const CHBCitizenDetailsNew = ({
|
|
|
47987
48073
|
security: 5000,
|
|
47988
48074
|
rent: mapData === null || mapData === void 0 ? void 0 : mapData.amount
|
|
47989
48075
|
};
|
|
47990
|
-
console.log("payload", payload);
|
|
47991
48076
|
setModalData(payload);
|
|
47992
48077
|
if (e.target.checked) setShowTermsPopup(true);
|
|
47993
48078
|
};
|
|
@@ -48000,13 +48085,13 @@ const CHBCitizenDetailsNew = ({
|
|
|
48000
48085
|
mobileNumber: value,
|
|
48001
48086
|
userType: "CITIZEN"
|
|
48002
48087
|
}, {});
|
|
48003
|
-
|
|
48088
|
+
sessionStorage.removeItem("CitizenConsentdocFilestoreidCHB");
|
|
48004
48089
|
setUser(userData === null || userData === void 0 ? void 0 : (_userData$user = userData.user) === null || _userData$user === void 0 ? void 0 : _userData$user[0]);
|
|
48005
48090
|
if (userData !== null && userData !== void 0 && (_userData$user2 = userData.user) !== null && _userData$user2 !== void 0 && _userData$user2[0]) {
|
|
48006
48091
|
setValue("name", userData.user[0].name);
|
|
48007
48092
|
setValue("emailId", userData.user[0].emailId);
|
|
48008
48093
|
setValue("address", userData.user[0].permanentAddress);
|
|
48009
|
-
clearErrors(["name", "emailId"]);
|
|
48094
|
+
clearErrors(["name", "emailId", "address"]);
|
|
48010
48095
|
}
|
|
48011
48096
|
setLoader(false);
|
|
48012
48097
|
} catch (error) {
|
|
@@ -48043,10 +48128,12 @@ const CHBCitizenDetailsNew = ({
|
|
|
48043
48128
|
},
|
|
48044
48129
|
value: props.value,
|
|
48045
48130
|
onChange: e => {
|
|
48046
|
-
console.log("eee", e);
|
|
48047
48131
|
props.onChange(e);
|
|
48048
48132
|
setValue("name", "");
|
|
48049
48133
|
setValue("emailId", "");
|
|
48134
|
+
setValue("address", "");
|
|
48135
|
+
setUser("");
|
|
48136
|
+
setShowOtp(false);
|
|
48050
48137
|
if (e.length === 10) {
|
|
48051
48138
|
handleMobileChange(e);
|
|
48052
48139
|
}
|
|
@@ -48226,6 +48313,8 @@ const CHBCitizenDetailsNew = ({
|
|
|
48226
48313
|
showTermsPopupOwner: showTermsPopup,
|
|
48227
48314
|
setShowTermsPopupOwner: setShowTermsPopup,
|
|
48228
48315
|
getModalData: getModalData,
|
|
48316
|
+
getUser: getUser,
|
|
48317
|
+
getShowOtp: getShowOtp,
|
|
48229
48318
|
tenantId: tenantId
|
|
48230
48319
|
}), loader && /*#__PURE__*/React.createElement(Loader, {
|
|
48231
48320
|
page: true
|
|
@@ -48402,7 +48491,7 @@ function CHBDocument$1({
|
|
|
48402
48491
|
flexWrap: "wrap"
|
|
48403
48492
|
}
|
|
48404
48493
|
}, documents === null || documents === void 0 ? void 0 : documents.map((document, index) => {
|
|
48405
|
-
let documentLink = pdfDownloadLink(data.pdfFiles, document === null || document === void 0 ? void 0 : document.fileStoreId);
|
|
48494
|
+
let documentLink = pdfDownloadLink$1(data.pdfFiles, document === null || document === void 0 ? void 0 : document.fileStoreId);
|
|
48406
48495
|
return /*#__PURE__*/React.createElement("a", {
|
|
48407
48496
|
target: "_",
|
|
48408
48497
|
href: documentLink,
|
|
@@ -48731,6 +48820,7 @@ const CHBSelectProofIdentity = ({
|
|
|
48731
48820
|
const [enableSubmit, setEnableSubmit] = useState(true);
|
|
48732
48821
|
const [checkRequiredFields, setCheckRequiredFields] = useState(false);
|
|
48733
48822
|
const tenantId = window.location.href.includes("employee") ? Digit.ULBService.getCurrentPermanentCity() : localStorage.getItem("CITIZEN.CITY");
|
|
48823
|
+
console.log("tenantId", tenantId);
|
|
48734
48824
|
const {
|
|
48735
48825
|
data,
|
|
48736
48826
|
isLoading
|