@mseva/digit-ui-module-engagement 1.1.20 → 1.1.22
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 +33196 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +284 -177
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SurveyIconSolid, PMBIconSolid, EventsIconSolid, DocumentIconSolid, EmployeeModuleCard, LabelFieldPair as LabelFieldPair$1, CardLabel as CardLabel$1, Dropdown, RemoveableTag, TextInput as TextInput$1, TextArea as TextArea$1, CardLabelError as CardLabelError$2, UploadFile, Loader, Header, FormComposer as FormComposer$1, Card as Card$1, CardText as CardText$1, ActionBar as ActionBar$1, SubmitBar as SubmitBar$1, Banner, Table, CloseSvg, Label, LinkLabel, EventCalendar, DocumentIcon, CheckBox, RefreshIcon, DateRange, DetailsCard, SearchAction, FilterAction, PopUp, PMBIcon, RadioButtons, DatePicker, Modal, CardSubHeader as CardSubHeader$1, PDFSvg, MultiUploadWrapper, CardHeader, CardSectionHeader as CardSectionHeader$1, StatusTable, Row, LinkButton as LinkButton$1, Close as Close$f, BreakLine as BreakLine$1, TelePhone, DisplayPhotos, Toast as Toast$1, InfoBannerIcon, CheckPoint, ConnectingCheckPoints, Menu, ButtonSelector, GenericFileIcon, PrivateRoute, LocationSearch, OnGroundEventCard, WhatsNewCard, CardCaption, SearchIconSvg, ViewsIcon, ExternalLinkIcon, DownloadImgIcon, AppContainer, PrevIcon, BackButton, MapMarker, Clock, FilterFormField,
|
|
1
|
+
import { SurveyIconSolid, PMBIconSolid, EventsIconSolid, DocumentIconSolid, EmployeeModuleCard, LabelFieldPair as LabelFieldPair$1, CardLabel as CardLabel$1, Dropdown, RemoveableTag, TextInput as TextInput$1, TextArea as TextArea$1, CardLabelError as CardLabelError$2, UploadFile, Loader, Header, FormComposer as FormComposer$1, Card as Card$1, CardText as CardText$1, ActionBar as ActionBar$1, SubmitBar as SubmitBar$1, Banner, Table, CloseSvg, Label, LinkLabel, EventCalendar, DocumentIcon, CheckBox, RefreshIcon, DateRange, DetailsCard, SearchAction, FilterAction, PopUp, PMBIcon, RadioButtons, DatePicker, Modal, CardSubHeader as CardSubHeader$1, PDFSvg, MultiUploadWrapper, CardHeader, CardSectionHeader as CardSectionHeader$1, StatusTable, Row, LinkButton as LinkButton$1, Close as Close$f, BreakLine as BreakLine$1, TelePhone, DisplayPhotos, Toast as Toast$1, InfoBannerIcon, CheckPoint, ConnectingCheckPoints, Menu, ButtonSelector, GenericFileIcon, PrivateRoute, LocationSearch, OnGroundEventCard, WhatsNewCard, CardCaption, SearchIconSvg, ViewsIcon, ExternalLinkIcon, DownloadImgIcon, AppContainer, PrevIcon, SearchField, BackButton, MapMarker, Clock, FilterFormField, EditIcon, InboxComposer, InfoIcon, DustbinIcon, MultiLink, BreadCrumb } from '@mseva/digit-ui-react-components';
|
|
2
2
|
import React, { useEffect, useMemo, Fragment as Fragment$1, useState, useCallback, useRef, useReducer, forwardRef } from 'react';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
import { useLocation, useHistory, useParams, Link, Switch, Redirect as Redirect$1, Route, useRouteMatch } from 'react-router-dom';
|
|
@@ -6077,7 +6077,7 @@ const ActionModal$3 = ({
|
|
|
6077
6077
|
return result;
|
|
6078
6078
|
};
|
|
6079
6079
|
async function submit(data) {
|
|
6080
|
-
var _applicationData3, _data$comments, _data$comments2, _workflowDetails$data7, _workflowDetails$data8, _workflowDetails$data9, _workflowDetails$
|
|
6080
|
+
var _applicationData3, _data$comments, _data$comments2, _workflowDetails$data7, _workflowDetails$data8, _workflowDetails$data9, _workflowDetails$data10, _workflowDetails$data11, _workflowDetails$data12, _workflowDetails$data13, _workflowDetails$data14, _workflowDetails$data15, _workflowDetails$data16, _workflowDetails$data17, _workflowDetails$data18, _workflowDetails$data19, _workflowDetails$data20, _workflowDetails$data21, _workflowDetails$data22, _workflowDetails$data23, _workflowDetails$data24, _workflowDetails$data25, _workflowDetails$data26, _workflowDetails$data27, _workflowDetails$data28, _workflowDetails$data29, _workflowDetails$data30, _applicationData4, _applicationData4$add, _applicationData4$add2, _applicationData5, _applicationData5$add, _applicationData5$add2, _applicationData6, _applicationData6$add, _applicationData6$add2, _applicationData7, _applicationData7$add, _applicationData7$add2;
|
|
6081
6081
|
applicationData = {
|
|
6082
6082
|
...applicationData,
|
|
6083
6083
|
documents: getDocuments(),
|
|
@@ -6091,8 +6091,8 @@ const ActionModal$3 = ({
|
|
|
6091
6091
|
action: action === null || action === void 0 ? void 0 : action.action,
|
|
6092
6092
|
comment: (data === null || data === void 0 ? void 0 : (_data$comments = data.comments) === null || _data$comments === void 0 ? void 0 : _data$comments.length) > 0 ? data === null || data === void 0 ? void 0 : data.comments : null,
|
|
6093
6093
|
comments: (data === null || data === void 0 ? void 0 : (_data$comments2 = data.comments) === null || _data$comments2 === void 0 ? void 0 : _data$comments2.length) > 0 ? data === null || data === void 0 ? void 0 : data.comments : null,
|
|
6094
|
-
assignee: (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data7 = workflowDetails.data) === null || _workflowDetails$data7 === void 0 ? void 0 : (_workflowDetails$data8 = _workflowDetails$data7.processInstances) === null || _workflowDetails$data8 === void 0 ? void 0 : (_workflowDetails$data9 = _workflowDetails$data8[0]) === null || _workflowDetails$data9 === void 0 ? void 0 : (_workflowDetails$
|
|
6095
|
-
assignes: (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$
|
|
6094
|
+
assignee: (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data7 = workflowDetails.data) === null || _workflowDetails$data7 === void 0 ? void 0 : (_workflowDetails$data8 = _workflowDetails$data7.processInstances) === null || _workflowDetails$data8 === void 0 ? void 0 : (_workflowDetails$data9 = _workflowDetails$data8[0]) === null || _workflowDetails$data9 === void 0 ? void 0 : (_workflowDetails$data10 = _workflowDetails$data9.state) === null || _workflowDetails$data10 === void 0 ? void 0 : _workflowDetails$data10.applicationStatus) === "FIELDINSPECTION_INPROGRESS" ? [workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data11 = workflowDetails.data) === null || _workflowDetails$data11 === void 0 ? void 0 : (_workflowDetails$data12 = _workflowDetails$data11.processInstances) === null || _workflowDetails$data12 === void 0 ? void 0 : (_workflowDetails$data13 = _workflowDetails$data12[0]) === null || _workflowDetails$data13 === void 0 ? void 0 : (_workflowDetails$data14 = _workflowDetails$data13.assigner) === null || _workflowDetails$data14 === void 0 ? void 0 : _workflowDetails$data14.uuid] : !(selectedApprover !== null && selectedApprover !== void 0 && selectedApprover.uuid) ? null : [selectedApprover === null || selectedApprover === void 0 ? void 0 : selectedApprover.uuid],
|
|
6095
|
+
assignes: (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data15 = workflowDetails.data) === null || _workflowDetails$data15 === void 0 ? void 0 : (_workflowDetails$data16 = _workflowDetails$data15.processInstances) === null || _workflowDetails$data16 === void 0 ? void 0 : (_workflowDetails$data17 = _workflowDetails$data16[0]) === null || _workflowDetails$data17 === void 0 ? void 0 : (_workflowDetails$data18 = _workflowDetails$data17.state) === null || _workflowDetails$data18 === void 0 ? void 0 : _workflowDetails$data18.applicationStatus) === "FIELDINSPECTION_INPROGRESS" ? [workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data19 = workflowDetails.data) === null || _workflowDetails$data19 === void 0 ? void 0 : (_workflowDetails$data20 = _workflowDetails$data19.processInstances) === null || _workflowDetails$data20 === void 0 ? void 0 : (_workflowDetails$data21 = _workflowDetails$data20[0]) === null || _workflowDetails$data21 === void 0 ? void 0 : (_workflowDetails$data22 = _workflowDetails$data21.assigner) === null || _workflowDetails$data22 === void 0 ? void 0 : _workflowDetails$data22.uuid] : !(selectedApprover !== null && selectedApprover !== void 0 && selectedApprover.uuid) ? null : [selectedApprover === null || selectedApprover === void 0 ? void 0 : selectedApprover.uuid],
|
|
6096
6096
|
varificationDocuments: uploadedFile ? [{
|
|
6097
6097
|
documentType: (action === null || action === void 0 ? void 0 : action.action) + " DOC",
|
|
6098
6098
|
fileName: file === null || file === void 0 ? void 0 : file.name,
|
|
@@ -6101,7 +6101,7 @@ const ActionModal$3 = ({
|
|
|
6101
6101
|
},
|
|
6102
6102
|
action: action === null || action === void 0 ? void 0 : action.action,
|
|
6103
6103
|
comment: data === null || data === void 0 ? void 0 : data.comments,
|
|
6104
|
-
assignee: (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$
|
|
6104
|
+
assignee: (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data23 = workflowDetails.data) === null || _workflowDetails$data23 === void 0 ? void 0 : (_workflowDetails$data24 = _workflowDetails$data23.processInstances) === null || _workflowDetails$data24 === void 0 ? void 0 : (_workflowDetails$data25 = _workflowDetails$data24[0]) === null || _workflowDetails$data25 === void 0 ? void 0 : (_workflowDetails$data26 = _workflowDetails$data25.state) === null || _workflowDetails$data26 === void 0 ? void 0 : _workflowDetails$data26.applicationStatus) === "FIELDINSPECTION_INPROGRESS" ? [workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data27 = workflowDetails.data) === null || _workflowDetails$data27 === void 0 ? void 0 : (_workflowDetails$data28 = _workflowDetails$data27.processInstances) === null || _workflowDetails$data28 === void 0 ? void 0 : (_workflowDetails$data29 = _workflowDetails$data28[0]) === null || _workflowDetails$data29 === void 0 ? void 0 : (_workflowDetails$data30 = _workflowDetails$data29.assigner) === null || _workflowDetails$data30 === void 0 ? void 0 : _workflowDetails$data30.uuid] : !(selectedApprover !== null && selectedApprover !== void 0 && selectedApprover.uuid) ? null : [selectedApprover === null || selectedApprover === void 0 ? void 0 : selectedApprover.uuid],
|
|
6105
6105
|
wfDocuments: uploadedFile ? [{
|
|
6106
6106
|
documentType: (action === null || action === void 0 ? void 0 : action.action) + " DOC",
|
|
6107
6107
|
fileName: file === null || file === void 0 ? void 0 : file.name,
|
|
@@ -7645,7 +7645,7 @@ const ActionModal$5 = ({
|
|
|
7645
7645
|
})();
|
|
7646
7646
|
}, [file]);
|
|
7647
7647
|
function submit(data) {
|
|
7648
|
-
var _applicationData, _applicationData7, _applicationData8, _applicationData8$app, _applicationData9, _applicationData9$pro,
|
|
7648
|
+
var _applicationData, _applicationData7, _applicationData8, _applicationData8$app, _applicationData9, _applicationData9$pro, _applicationData10, _applicationData10$pr, _applicationData12, _applicationData13;
|
|
7649
7649
|
if ((_applicationData = applicationData) !== null && _applicationData !== void 0 && _applicationData.isBillAmend) {
|
|
7650
7650
|
var _applicationData2, _applicationData2$bil, _applicationData3, _applicationData4, _applicationData4$bil, _applicationData5, _applicationData5$app, _applicationData6, _applicationData6$app;
|
|
7651
7651
|
const comments = data !== null && data !== void 0 && data.comments ? data.comments : null;
|
|
@@ -7730,38 +7730,38 @@ const ActionModal$5 = ({
|
|
|
7730
7730
|
const connectionExecutionDate = cloneDeep_1(data === null || data === void 0 ? void 0 : data.date);
|
|
7731
7731
|
applicationData.connectionExecutionDate = convertDateToEpochNew(connectionExecutionDate);
|
|
7732
7732
|
}
|
|
7733
|
-
if (((_applicationData9 = applicationData) === null || _applicationData9 === void 0 ? void 0 : (_applicationData9$pro = _applicationData9.processInstance) === null || _applicationData9$pro === void 0 ? void 0 : _applicationData9$pro.businessService) == "DisconnectWSConnection" || ((
|
|
7734
|
-
var
|
|
7735
|
-
((
|
|
7733
|
+
if (((_applicationData9 = applicationData) === null || _applicationData9 === void 0 ? void 0 : (_applicationData9$pro = _applicationData9.processInstance) === null || _applicationData9$pro === void 0 ? void 0 : _applicationData9$pro.businessService) == "DisconnectWSConnection" || ((_applicationData10 = applicationData) === null || _applicationData10 === void 0 ? void 0 : (_applicationData10$pr = _applicationData10.processInstance) === null || _applicationData10$pr === void 0 ? void 0 : _applicationData10$pr.businessService) == "DisconnectSWConnection" || window.location.href.includes("disconnection")) {
|
|
7734
|
+
var _applicationData11;
|
|
7735
|
+
((_applicationData11 = applicationData) === null || _applicationData11 === void 0 ? void 0 : _applicationData11.serviceType) == "WATER" ? submitAction({
|
|
7736
7736
|
WaterConnection: applicationData,
|
|
7737
7737
|
disconnectRequest: true
|
|
7738
7738
|
}) : submitAction({
|
|
7739
7739
|
SewerageConnection: applicationData,
|
|
7740
7740
|
disconnectRequest: true
|
|
7741
7741
|
});
|
|
7742
|
-
} else if (((
|
|
7742
|
+
} else if (((_applicationData12 = applicationData) === null || _applicationData12 === void 0 ? void 0 : _applicationData12.applicationType) == "SEWERAGE_RECONNECTION") {
|
|
7743
7743
|
submitAction({
|
|
7744
7744
|
SewerageConnection: applicationData,
|
|
7745
7745
|
disconnectRequest: false,
|
|
7746
7746
|
reconnectRequest: true
|
|
7747
7747
|
});
|
|
7748
|
-
} else if (((
|
|
7748
|
+
} else if (((_applicationData13 = applicationData) === null || _applicationData13 === void 0 ? void 0 : _applicationData13.applicationType) == "WATER_RECONNECTION") {
|
|
7749
7749
|
submitAction({
|
|
7750
7750
|
WaterConnection: applicationData,
|
|
7751
7751
|
disconnectRequest: false,
|
|
7752
7752
|
reconnectRequest: true
|
|
7753
7753
|
});
|
|
7754
7754
|
} else {
|
|
7755
|
-
var _parsedAdhocRebateDat, _parsedAdhocRebateDat2, _parsedAdhocRebateDat3, _parsedAdhocRebateDat4, _parsedAdhocRebateDat5, _parsedAdhocRebateDat6, _parsedAdhocRebateDat7, _parsedAdhocRebateDat8, _parsedAdhocRebateDat9,
|
|
7755
|
+
var _parsedAdhocRebateDat, _parsedAdhocRebateDat2, _parsedAdhocRebateDat3, _parsedAdhocRebateDat4, _parsedAdhocRebateDat5, _parsedAdhocRebateDat6, _parsedAdhocRebateDat7, _parsedAdhocRebateDat8, _parsedAdhocRebateDat9, _parsedAdhocRebateDat10, _parsedAdhocRebateDat11, _parsedAdhocRebateDat12, _applicationData14;
|
|
7756
7756
|
const adhocRebateData = sessionStorage.getItem("Digit.ADHOC_ADD_REBATE_DATA");
|
|
7757
7757
|
const parsedAdhocRebateData = adhocRebateData ? JSON.parse(adhocRebateData) : "";
|
|
7758
7758
|
if (parsedAdhocRebateData !== null && parsedAdhocRebateData !== void 0 && (_parsedAdhocRebateDat = parsedAdhocRebateData.value) !== null && _parsedAdhocRebateDat !== void 0 && _parsedAdhocRebateDat.adhocPenalty) applicationData.additionalDetails.adhocPenalty = parseInt(parsedAdhocRebateData === null || parsedAdhocRebateData === void 0 ? void 0 : (_parsedAdhocRebateDat2 = parsedAdhocRebateData.value) === null || _parsedAdhocRebateDat2 === void 0 ? void 0 : _parsedAdhocRebateDat2.adhocPenalty) || "";
|
|
7759
7759
|
if (parsedAdhocRebateData !== null && parsedAdhocRebateData !== void 0 && (_parsedAdhocRebateDat3 = parsedAdhocRebateData.value) !== null && _parsedAdhocRebateDat3 !== void 0 && _parsedAdhocRebateDat3.adhocPenaltyComment) applicationData.additionalDetails.adhocPenaltyComment = (parsedAdhocRebateData === null || parsedAdhocRebateData === void 0 ? void 0 : (_parsedAdhocRebateDat4 = parsedAdhocRebateData.value) === null || _parsedAdhocRebateDat4 === void 0 ? void 0 : _parsedAdhocRebateDat4.adhocPenaltyComment) || "";
|
|
7760
7760
|
if (parsedAdhocRebateData !== null && parsedAdhocRebateData !== void 0 && (_parsedAdhocRebateDat5 = parsedAdhocRebateData.value) !== null && _parsedAdhocRebateDat5 !== void 0 && _parsedAdhocRebateDat5.adhocPenaltyReason) applicationData.additionalDetails.adhocPenaltyReason = (parsedAdhocRebateData === null || parsedAdhocRebateData === void 0 ? void 0 : (_parsedAdhocRebateDat6 = parsedAdhocRebateData.value) === null || _parsedAdhocRebateDat6 === void 0 ? void 0 : _parsedAdhocRebateDat6.adhocPenaltyReason) || "";
|
|
7761
7761
|
if (parsedAdhocRebateData !== null && parsedAdhocRebateData !== void 0 && (_parsedAdhocRebateDat7 = parsedAdhocRebateData.value) !== null && _parsedAdhocRebateDat7 !== void 0 && _parsedAdhocRebateDat7.adhocRebate) applicationData.additionalDetails.adhocRebate = parseInt(parsedAdhocRebateData === null || parsedAdhocRebateData === void 0 ? void 0 : (_parsedAdhocRebateDat8 = parsedAdhocRebateData.value) === null || _parsedAdhocRebateDat8 === void 0 ? void 0 : _parsedAdhocRebateDat8.adhocRebate) || "";
|
|
7762
|
-
if (parsedAdhocRebateData !== null && parsedAdhocRebateData !== void 0 && (_parsedAdhocRebateDat9 = parsedAdhocRebateData.value) !== null && _parsedAdhocRebateDat9 !== void 0 && _parsedAdhocRebateDat9.adhocRebateComment) applicationData.additionalDetails.adhocRebateComment = (parsedAdhocRebateData === null || parsedAdhocRebateData === void 0 ? void 0 : (
|
|
7763
|
-
if (parsedAdhocRebateData !== null && parsedAdhocRebateData !== void 0 && (
|
|
7764
|
-
((
|
|
7762
|
+
if (parsedAdhocRebateData !== null && parsedAdhocRebateData !== void 0 && (_parsedAdhocRebateDat9 = parsedAdhocRebateData.value) !== null && _parsedAdhocRebateDat9 !== void 0 && _parsedAdhocRebateDat9.adhocRebateComment) applicationData.additionalDetails.adhocRebateComment = (parsedAdhocRebateData === null || parsedAdhocRebateData === void 0 ? void 0 : (_parsedAdhocRebateDat10 = parsedAdhocRebateData.value) === null || _parsedAdhocRebateDat10 === void 0 ? void 0 : _parsedAdhocRebateDat10.adhocRebateComment) || "";
|
|
7763
|
+
if (parsedAdhocRebateData !== null && parsedAdhocRebateData !== void 0 && (_parsedAdhocRebateDat11 = parsedAdhocRebateData.value) !== null && _parsedAdhocRebateDat11 !== void 0 && _parsedAdhocRebateDat11.adhocRebateReason) applicationData.additionalDetails.adhocRebateReason = (parsedAdhocRebateData === null || parsedAdhocRebateData === void 0 ? void 0 : (_parsedAdhocRebateDat12 = parsedAdhocRebateData.value) === null || _parsedAdhocRebateDat12 === void 0 ? void 0 : _parsedAdhocRebateDat12.adhocRebateReason) || "";
|
|
7764
|
+
((_applicationData14 = applicationData) === null || _applicationData14 === void 0 ? void 0 : _applicationData14.serviceType) == "WATER" ? submitAction({
|
|
7765
7765
|
WaterConnection: applicationData,
|
|
7766
7766
|
disconnectRequest: false,
|
|
7767
7767
|
reconnectRequest: false
|
|
@@ -7773,8 +7773,8 @@ const ActionModal$5 = ({
|
|
|
7773
7773
|
}
|
|
7774
7774
|
}
|
|
7775
7775
|
useEffect(() => {
|
|
7776
|
-
var
|
|
7777
|
-
if (((
|
|
7776
|
+
var _applicationData15, _applicationData15$pr, _applicationData16, _applicationData16$pr;
|
|
7777
|
+
if (((_applicationData15 = applicationData) === null || _applicationData15 === void 0 ? void 0 : (_applicationData15$pr = _applicationData15.processInstance) === null || _applicationData15$pr === void 0 ? void 0 : _applicationData15$pr.businessService) == "DisconnectWSConnection" || ((_applicationData16 = applicationData) === null || _applicationData16 === void 0 ? void 0 : (_applicationData16$pr = _applicationData16.processInstance) === null || _applicationData16$pr === void 0 ? void 0 : _applicationData16$pr.businessService) == "DisconnectSWConnection") {
|
|
7778
7778
|
if (action) {
|
|
7779
7779
|
setConfig(configWSDisConnectApplication({
|
|
7780
7780
|
t,
|
|
@@ -15683,7 +15683,7 @@ const ScruntinyDetails = ({
|
|
|
15683
15683
|
additionalDetails,
|
|
15684
15684
|
applicationData
|
|
15685
15685
|
}) => {
|
|
15686
|
-
var _scrutinyDetails$valu, _scrutinyDetails$perm, _scrutinyDetails$valu2, _scrutinyDetails$valu3, _additionalDetails$
|
|
15686
|
+
var _scrutinyDetails$valu, _scrutinyDetails$perm, _scrutinyDetails$valu2, _scrutinyDetails$valu3, _additionalDetails$se11, _additionalDetails$se12, _additionalDetails$se13, _additionalDetails$se14, _additionalDetails$se15, _additionalDetails$se16, _additionalDetails$se17, _additionalDetails$se18, _docLessAdjustment$fi, _additionalDetails$se19, _docLessAdjustment$fi2, _additionalDetails$se20, _docLessAdjustment$fi3, _docLessAdjustment$fi4, _additionalDetails$se21, _additionalDetails$se22, _additionalDetails$se23, _additionalDetails$se24, _scrutinyDetails$scru;
|
|
15687
15687
|
const isEditApplication = (window.location.href.includes("editApplication") || (applicationData === null || applicationData === void 0 ? void 0 : applicationData.status) == "FIELDINSPECTION_INPROGRESS") && window.location.href.includes("bpa");
|
|
15688
15688
|
const [development, setDevelopment] = useState();
|
|
15689
15689
|
const [otherCharges, setOtherCharges] = useState();
|
|
@@ -15786,8 +15786,8 @@ const ScruntinyDetails = ({
|
|
|
15786
15786
|
}
|
|
15787
15787
|
function setLessAdjusmentVal(value) {
|
|
15788
15788
|
if (/^[0-9]*$/.test(value)) {
|
|
15789
|
-
var _additionalDetails$se7, _additionalDetails$se8, _additionalDetails$se9, _additionalDetails$
|
|
15790
|
-
if (parseFloat(value) > (parseFloat(development) ? parseFloat(development) : 0) + parseFloat(otherCharges ? parseFloat(otherCharges) : 0) + parseFloat(additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$se7 = additionalDetails.selfCertificationCharges) === null || _additionalDetails$se7 === void 0 ? void 0 : _additionalDetails$se7.BPA_MALBA_CHARGES) + parseFloat(additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$se8 = additionalDetails.selfCertificationCharges) === null || _additionalDetails$se8 === void 0 ? void 0 : _additionalDetails$se8.BPA_LABOUR_CESS) + parseFloat(additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$se9 = additionalDetails.selfCertificationCharges) === null || _additionalDetails$se9 === void 0 ? void 0 : _additionalDetails$se9.BPA_WATER_CHARGES) + parseFloat(additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$
|
|
15789
|
+
var _additionalDetails$se7, _additionalDetails$se8, _additionalDetails$se9, _additionalDetails$se10;
|
|
15790
|
+
if (parseFloat(value) > (parseFloat(development) ? parseFloat(development) : 0) + parseFloat(otherCharges ? parseFloat(otherCharges) : 0) + parseFloat(additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$se7 = additionalDetails.selfCertificationCharges) === null || _additionalDetails$se7 === void 0 ? void 0 : _additionalDetails$se7.BPA_MALBA_CHARGES) + parseFloat(additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$se8 = additionalDetails.selfCertificationCharges) === null || _additionalDetails$se8 === void 0 ? void 0 : _additionalDetails$se8.BPA_LABOUR_CESS) + parseFloat(additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$se9 = additionalDetails.selfCertificationCharges) === null || _additionalDetails$se9 === void 0 ? void 0 : _additionalDetails$se9.BPA_WATER_CHARGES) + parseFloat(additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$se10 = additionalDetails.selfCertificationCharges) === null || _additionalDetails$se10 === void 0 ? void 0 : _additionalDetails$se10.BPA_GAUSHALA_CHARGES_CESS)) {
|
|
15791
15791
|
alert("Less adjustment fees cannot be grater than Total of other P2 fees");
|
|
15792
15792
|
} else {
|
|
15793
15793
|
setLessAdjusment(value);
|
|
@@ -15901,26 +15901,26 @@ const ScruntinyDetails = ({
|
|
|
15901
15901
|
}, t("HIDE_P2_FEES_DETAILS"))), showSanctionFee && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardSubHeader$1, null, t("BPA_P2_SUMMARY_FEE_EST")), /*#__PURE__*/React.createElement(Row, {
|
|
15902
15902
|
className: "border-none",
|
|
15903
15903
|
label: t(`BPA_COMMON_MALBA_AMT`),
|
|
15904
|
-
text: `₹ ${additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$
|
|
15904
|
+
text: `₹ ${additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$se11 = additionalDetails.selfCertificationCharges) === null || _additionalDetails$se11 === void 0 ? void 0 : _additionalDetails$se11.BPA_MALBA_CHARGES}`
|
|
15905
15905
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
15906
15906
|
className: "border-none",
|
|
15907
15907
|
label: t(`BPA_COMMON_LABOUR_AMT`),
|
|
15908
|
-
text: `₹ ${additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$
|
|
15908
|
+
text: `₹ ${additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$se12 = additionalDetails.selfCertificationCharges) === null || _additionalDetails$se12 === void 0 ? void 0 : _additionalDetails$se12.BPA_LABOUR_CESS}`
|
|
15909
15909
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
15910
15910
|
className: "border-none",
|
|
15911
15911
|
label: t(`BPA_COMMON_WATER_AMT`),
|
|
15912
|
-
text: `₹ ${additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$
|
|
15912
|
+
text: `₹ ${additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$se13 = additionalDetails.selfCertificationCharges) === null || _additionalDetails$se13 === void 0 ? void 0 : _additionalDetails$se13.BPA_WATER_CHARGES}`
|
|
15913
15913
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
15914
15914
|
className: "border-none",
|
|
15915
15915
|
label: t(`BPA_COMMON_GAUSHALA_AMT`),
|
|
15916
|
-
text: `₹ ${additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$
|
|
15916
|
+
text: `₹ ${additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$se14 = additionalDetails.selfCertificationCharges) === null || _additionalDetails$se14 === void 0 ? void 0 : _additionalDetails$se14.BPA_GAUSHALA_CHARGES_CESS}`
|
|
15917
15917
|
}), /*#__PURE__*/React.createElement(CardSubHeader$1, null, t("BPA_P2_SUMMARY_FEE_EST_MANUAL")), /*#__PURE__*/React.createElement(CardLabel$1, null, t("BPA_COMMON_DEVELOPMENT_AMT")), /*#__PURE__*/React.createElement(TextInput$1, Object.assign({
|
|
15918
15918
|
t: t,
|
|
15919
15919
|
type: "text",
|
|
15920
15920
|
isMandatory: false,
|
|
15921
15921
|
optionKey: "i18nKey",
|
|
15922
15922
|
name: "development",
|
|
15923
|
-
defaultValue: (additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$
|
|
15923
|
+
defaultValue: (additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$se15 = additionalDetails.selfCertificationCharges) === null || _additionalDetails$se15 === void 0 ? void 0 : _additionalDetails$se15.BPA_DEVELOPMENT_CHARGES) || 0,
|
|
15924
15924
|
value: development,
|
|
15925
15925
|
disabled: !isEditApplication,
|
|
15926
15926
|
onChange: e => {
|
|
@@ -15936,7 +15936,7 @@ const ScruntinyDetails = ({
|
|
|
15936
15936
|
isMandatory: false,
|
|
15937
15937
|
optionKey: "i18nKey",
|
|
15938
15938
|
name: "otherCharges",
|
|
15939
|
-
defaultValue: (additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$
|
|
15939
|
+
defaultValue: (additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$se16 = additionalDetails.selfCertificationCharges) === null || _additionalDetails$se16 === void 0 ? void 0 : _additionalDetails$se16.BPA_OTHER_CHARGES) || 0,
|
|
15940
15940
|
value: otherCharges,
|
|
15941
15941
|
disabled: !isEditApplication,
|
|
15942
15942
|
onChange: e => {
|
|
@@ -15950,7 +15950,7 @@ const ScruntinyDetails = ({
|
|
|
15950
15950
|
t: t,
|
|
15951
15951
|
type: "text",
|
|
15952
15952
|
name: "otherChargesDiscription",
|
|
15953
|
-
defaultValue: additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$
|
|
15953
|
+
defaultValue: additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$se17 = additionalDetails.selfCertificationCharges) === null || _additionalDetails$se17 === void 0 ? void 0 : _additionalDetails$se17.BPA_COMMON_OTHER_AMT_DISCRIPTION,
|
|
15954
15954
|
value: otherChargesDisc,
|
|
15955
15955
|
disabled: !isEditApplication,
|
|
15956
15956
|
onChange: e => {
|
|
@@ -15964,7 +15964,7 @@ const ScruntinyDetails = ({
|
|
|
15964
15964
|
isMandatory: false,
|
|
15965
15965
|
optionKey: "i18nKey",
|
|
15966
15966
|
name: "lessAdjusment",
|
|
15967
|
-
defaultValue: (additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$
|
|
15967
|
+
defaultValue: (additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$se18 = additionalDetails.selfCertificationCharges) === null || _additionalDetails$se18 === void 0 ? void 0 : _additionalDetails$se18.BPA_LESS_ADJUSMENT_PLOT) || "",
|
|
15968
15968
|
value: lessAdjusment,
|
|
15969
15969
|
disabled: !isEditApplication,
|
|
15970
15970
|
onChange: e => {
|
|
@@ -15988,11 +15988,11 @@ const ScruntinyDetails = ({
|
|
|
15988
15988
|
message: uploadedFile ? `1 ${t(`FILEUPLOADED`)}` : t(`ES_NO_FILE_SELECTED_LABEL`),
|
|
15989
15989
|
error: errorFile,
|
|
15990
15990
|
uploadMessage: uploadMessage
|
|
15991
|
-
})) : null, (docLessAdjustment === null || docLessAdjustment === void 0 ? void 0 : (_docLessAdjustment$fi = docLessAdjustment.fileStoreIds) === null || _docLessAdjustment$fi === void 0 ? void 0 : _docLessAdjustment$fi.length) && parseInt(additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$
|
|
15991
|
+
})) : null, (docLessAdjustment === null || docLessAdjustment === void 0 ? void 0 : (_docLessAdjustment$fi = docLessAdjustment.fileStoreIds) === null || _docLessAdjustment$fi === void 0 ? void 0 : _docLessAdjustment$fi.length) && parseInt(additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$se19 = additionalDetails.selfCertificationCharges) === null || _additionalDetails$se19 === void 0 ? void 0 : _additionalDetails$se19.BPA_LESS_ADJUSMENT_PLOT) > 0 && /*#__PURE__*/React.createElement(CardLabel$1, {
|
|
15992
15992
|
style: {
|
|
15993
15993
|
marginTop: "15px"
|
|
15994
15994
|
}
|
|
15995
|
-
}, t("BPA_COMMON_LESS_AMT_PREVIOUS_FILE")), (docLessAdjustment === null || docLessAdjustment === void 0 ? void 0 : (_docLessAdjustment$fi2 = docLessAdjustment.fileStoreIds) === null || _docLessAdjustment$fi2 === void 0 ? void 0 : _docLessAdjustment$fi2.length) && parseInt(additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$
|
|
15995
|
+
}, t("BPA_COMMON_LESS_AMT_PREVIOUS_FILE")), (docLessAdjustment === null || docLessAdjustment === void 0 ? void 0 : (_docLessAdjustment$fi2 = docLessAdjustment.fileStoreIds) === null || _docLessAdjustment$fi2 === void 0 ? void 0 : _docLessAdjustment$fi2.length) && parseInt(additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$se20 = additionalDetails.selfCertificationCharges) === null || _additionalDetails$se20 === void 0 ? void 0 : _additionalDetails$se20.BPA_LESS_ADJUSMENT_PLOT) > 0 && /*#__PURE__*/React.createElement("a", {
|
|
15996
15996
|
target: "_blank",
|
|
15997
15997
|
href: docLessAdjustment === null || docLessAdjustment === void 0 ? void 0 : (_docLessAdjustment$fi3 = docLessAdjustment.fileStoreIds[(docLessAdjustment === null || docLessAdjustment === void 0 ? void 0 : (_docLessAdjustment$fi4 = docLessAdjustment.fileStoreIds) === null || _docLessAdjustment$fi4 === void 0 ? void 0 : _docLessAdjustment$fi4.length) - 1]) === null || _docLessAdjustment$fi3 === void 0 ? void 0 : _docLessAdjustment$fi3.url
|
|
15998
15998
|
}, /*#__PURE__*/React.createElement(PDFSvg, null)), /*#__PURE__*/React.createElement(Row, {
|
|
@@ -16000,7 +16000,7 @@ const ScruntinyDetails = ({
|
|
|
16000
16000
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
16001
16001
|
className: "border-none",
|
|
16002
16002
|
label: t(`BPA_P2_TOTAL_FEE`),
|
|
16003
|
-
text: `₹ ${(parseFloat(development) ? parseFloat(development) : 0) + parseFloat(otherCharges ? parseFloat(otherCharges) : 0) + parseFloat(additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$
|
|
16003
|
+
text: `₹ ${(parseFloat(development) ? parseFloat(development) : 0) + parseFloat(otherCharges ? parseFloat(otherCharges) : 0) + parseFloat(additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$se21 = additionalDetails.selfCertificationCharges) === null || _additionalDetails$se21 === void 0 ? void 0 : _additionalDetails$se21.BPA_MALBA_CHARGES) + parseFloat(additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$se22 = additionalDetails.selfCertificationCharges) === null || _additionalDetails$se22 === void 0 ? void 0 : _additionalDetails$se22.BPA_LABOUR_CESS) + parseFloat(additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$se23 = additionalDetails.selfCertificationCharges) === null || _additionalDetails$se23 === void 0 ? void 0 : _additionalDetails$se23.BPA_WATER_CHARGES) + parseFloat(additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$se24 = additionalDetails.selfCertificationCharges) === null || _additionalDetails$se24 === void 0 ? void 0 : _additionalDetails$se24.BPA_GAUSHALA_CHARGES_CESS) - (parseFloat(lessAdjusment) ? parseFloat(lessAdjusment) : 0)}`
|
|
16004
16004
|
}))), /*#__PURE__*/React.createElement("div", null, scrutinyDetails === null || scrutinyDetails === void 0 ? void 0 : (_scrutinyDetails$scru = scrutinyDetails.scruntinyDetails) === null || _scrutinyDetails$scru === void 0 ? void 0 : _scrutinyDetails$scru.map((report, index) => {
|
|
16005
16005
|
return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(Row, {
|
|
16006
16006
|
className: "border-none",
|
|
@@ -16542,7 +16542,7 @@ const WSFeeEstimation = ({
|
|
|
16542
16542
|
wsAdditionalDetails,
|
|
16543
16543
|
workflowDetails
|
|
16544
16544
|
}) => {
|
|
16545
|
-
var _wsAdditionalDetails$, _wsAdditionalDetails$
|
|
16545
|
+
var _wsAdditionalDetails$, _wsAdditionalDetails$20, _fields$adhocPenaltyR, _fields$adhocRebateRe;
|
|
16546
16546
|
const {
|
|
16547
16547
|
t
|
|
16548
16548
|
} = useTranslation();
|
|
@@ -16622,16 +16622,16 @@ const WSFeeEstimation = ({
|
|
|
16622
16622
|
message: t("ERR_WS_REBATE_GREATER_THAN_AMOUNT")
|
|
16623
16623
|
});
|
|
16624
16624
|
} else {
|
|
16625
|
-
var _wsAdditionalDetails$
|
|
16626
|
-
const applicationNo = wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$
|
|
16627
|
-
const tenantId = wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$
|
|
16625
|
+
var _wsAdditionalDetails$10, _wsAdditionalDetails$11, _wsAdditionalDetails$12, _wsAdditionalDetails$13, _wsAdditionalDetails$14, _wsAdditionalDetails$15, _wsAdditionalDetails$16, _wsAdditionalDetails$17, _wsAdditionalDetails$18, _wsAdditionalDetails$19;
|
|
16626
|
+
const applicationNo = wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$10 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$10 === void 0 ? void 0 : (_wsAdditionalDetails$11 = _wsAdditionalDetails$10.appDetails) === null || _wsAdditionalDetails$11 === void 0 ? void 0 : _wsAdditionalDetails$11.applicationNo;
|
|
16627
|
+
const tenantId = wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$12 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$12 === void 0 ? void 0 : (_wsAdditionalDetails$13 = _wsAdditionalDetails$12.appDetails) === null || _wsAdditionalDetails$13 === void 0 ? void 0 : _wsAdditionalDetails$13.tenantId;
|
|
16628
16628
|
const appAdditionalDetails = {
|
|
16629
|
-
...(wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$
|
|
16629
|
+
...(wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$14 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$14 === void 0 ? void 0 : (_wsAdditionalDetails$15 = _wsAdditionalDetails$14.appDetails) === null || _wsAdditionalDetails$15 === void 0 ? void 0 : _wsAdditionalDetails$15.additionalDetails),
|
|
16630
16630
|
...fields
|
|
16631
16631
|
};
|
|
16632
16632
|
wsAdditionalDetails.additionalDetails.appDetails.additionalDetails = appAdditionalDetails;
|
|
16633
16633
|
const data = {
|
|
16634
|
-
CalculationCriteria: (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$
|
|
16634
|
+
CalculationCriteria: (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$16 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$16 === void 0 ? void 0 : (_wsAdditionalDetails$17 = _wsAdditionalDetails$16.appDetails) === null || _wsAdditionalDetails$17 === void 0 ? void 0 : _wsAdditionalDetails$17.service) == "WATER" ? [{
|
|
16635
16635
|
applicationNo: applicationNo,
|
|
16636
16636
|
tenantId: tenantId,
|
|
16637
16637
|
waterConnection: wsAdditionalDetails.additionalDetails.appDetails
|
|
@@ -16642,7 +16642,7 @@ const WSFeeEstimation = ({
|
|
|
16642
16642
|
}],
|
|
16643
16643
|
isconnectionCalculation: false
|
|
16644
16644
|
};
|
|
16645
|
-
let businessService = (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$
|
|
16645
|
+
let businessService = (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$18 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$18 === void 0 ? void 0 : (_wsAdditionalDetails$19 = _wsAdditionalDetails$18.appDetails) === null || _wsAdditionalDetails$19 === void 0 ? void 0 : _wsAdditionalDetails$19.service) == "WATER" ? "WS" : "SW";
|
|
16646
16646
|
Digit.WSService.wsCalculationEstimate(data, businessService).then((result, err) => {
|
|
16647
16647
|
var _result$Calculation, _result$Calculation$, _result$Calculation$$, _result$Calculation3, _result$Calculation3$, _result$Calculation4, _result$Calculation4$, _result$Calculation5, _result$Calculation5$, _result$Calculation6, _result$Calculation6$, _result$Calculation7;
|
|
16648
16648
|
if ((result === null || result === void 0 ? void 0 : (_result$Calculation = result.Calculation) === null || _result$Calculation === void 0 ? void 0 : (_result$Calculation$ = _result$Calculation[0]) === null || _result$Calculation$ === void 0 ? void 0 : (_result$Calculation$$ = _result$Calculation$.taxHeadEstimates) === null || _result$Calculation$$ === void 0 ? void 0 : _result$Calculation$$.length) > 0) {
|
|
@@ -16745,7 +16745,7 @@ const WSFeeEstimation = ({
|
|
|
16745
16745
|
} : {
|
|
16746
16746
|
color: "#00703C"
|
|
16747
16747
|
}
|
|
16748
|
-
}))), wsAdditionalDetails !== null && wsAdditionalDetails !== void 0 && (_wsAdditionalDetails$
|
|
16748
|
+
}))), wsAdditionalDetails !== null && wsAdditionalDetails !== void 0 && (_wsAdditionalDetails$20 = wsAdditionalDetails.additionalDetails) !== null && _wsAdditionalDetails$20 !== void 0 && _wsAdditionalDetails$20.isAdhocRebate ? /*#__PURE__*/React.createElement("div", {
|
|
16749
16749
|
onClick: e => {
|
|
16750
16750
|
showPopUp(true);
|
|
16751
16751
|
}
|
|
@@ -17382,7 +17382,7 @@ function ApplicationDetailsContent({
|
|
|
17382
17382
|
oldValue,
|
|
17383
17383
|
isInfoLabel = false
|
|
17384
17384
|
}) {
|
|
17385
|
-
var _applicationDetails$a2, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetails$data9, _workflowDetails$
|
|
17385
|
+
var _applicationDetails$a2, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetails$data9, _workflowDetails$data10, _workflowDetails$data11, _workflowDetails$data12, _workflowDetails$data13, _workflowDetails$data21, _workflowDetails$data22;
|
|
17386
17386
|
const {
|
|
17387
17387
|
t
|
|
17388
17388
|
} = useTranslation();
|
|
@@ -17496,12 +17496,12 @@ function ApplicationDetailsContent({
|
|
|
17496
17496
|
privacy: privacy
|
|
17497
17497
|
});
|
|
17498
17498
|
} else {
|
|
17499
|
-
var _applicationData$audi2, _checkpoint$assignes8, _checkpoint$assignes9, _checkpoint$
|
|
17499
|
+
var _applicationData$audi2, _checkpoint$assignes8, _checkpoint$assignes9, _checkpoint$assignes10, _checkpoint$assignes11;
|
|
17500
17500
|
const caption = {
|
|
17501
17501
|
date: convertEpochToDateDMY(applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$audi2 = applicationData.auditDetails) === null || _applicationData$audi2 === void 0 ? void 0 : _applicationData$audi2.lastModifiedTime),
|
|
17502
17502
|
name: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assignes8 = checkpoint.assignes) === null || _checkpoint$assignes8 === void 0 ? void 0 : (_checkpoint$assignes9 = _checkpoint$assignes8[0]) === null || _checkpoint$assignes9 === void 0 ? void 0 : _checkpoint$assignes9.name,
|
|
17503
17503
|
wfComment: checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.wfComment,
|
|
17504
|
-
mobileNumber: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$
|
|
17504
|
+
mobileNumber: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assignes10 = checkpoint.assignes) === null || _checkpoint$assignes10 === void 0 ? void 0 : (_checkpoint$assignes11 = _checkpoint$assignes10[0]) === null || _checkpoint$assignes11 === void 0 ? void 0 : _checkpoint$assignes11.mobileNumber
|
|
17505
17505
|
};
|
|
17506
17506
|
return /*#__PURE__*/React.createElement(TLCaption, {
|
|
17507
17507
|
data: caption
|
|
@@ -17630,7 +17630,7 @@ function ApplicationDetailsContent({
|
|
|
17630
17630
|
infoClickInfoLabel: getClickInfoDetails(),
|
|
17631
17631
|
infoClickInfoLabel1: getClickInfoDetails1()
|
|
17632
17632
|
}) : null, applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a2 = applicationDetails.applicationDetails) === null || _applicationDetails$a2 === void 0 ? void 0 : _applicationDetails$a2.map((detail, index) => {
|
|
17633
|
-
var _detail$values, _detail$additionalDet, _applicationDetails$a3, _applicationDetails$a4, _applicationDetails$a5, _applicationDetails$a6, _detail$additionalDet2, _applicationDetails$a7, _applicationDetails$a8, _detail$additionalDet3, _detail$additionalDet4, _detail$additionalDet5, _detail$additionalDet6, _detail$additionalDet7, _detail$additionalDet8, _detail$additionalDet9, _detail$
|
|
17633
|
+
var _detail$values, _detail$additionalDet, _applicationDetails$a3, _applicationDetails$a4, _applicationDetails$a5, _applicationDetails$a6, _detail$additionalDet2, _applicationDetails$a7, _applicationDetails$a8, _detail$additionalDet3, _detail$additionalDet4, _detail$additionalDet5, _detail$additionalDet6, _detail$additionalDet7, _detail$additionalDet8, _detail$additionalDet9, _detail$additionalDet10, _detail$additionalDet11, _workflowDetails$data, _workflowDetails$data2, _detail$additionalDet12, _detail$additionalDet13, _detail$additionalDet14, _detail$additionalDet15, _detail$additionalDet16, _detail$additionalDet17, _detail$additionalDet18, _detail$additionalDet19, _detail$additionalDet20, _detail$additionalDet21, _detail$additionalDet22, _detail$additionalDet23, _detail$additionalDet24, _detail$additionalDet25, _detail$additionalDet26, _detail$additionalDet27, _detail$additionalDet28, _detail$additionalDet29, _detail$additionalDet30, _detail$additionalDet31;
|
|
17634
17634
|
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
17635
17635
|
key: index
|
|
17636
17636
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -17785,12 +17785,12 @@ function ApplicationDetailsContent({
|
|
|
17785
17785
|
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet7 = detail.additionalDetails) === null || _detail$additionalDet7 === void 0 ? void 0 : _detail$additionalDet7.units) && /*#__PURE__*/React.createElement(TLTradeUnits, {
|
|
17786
17786
|
units: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet8 = detail.additionalDetails) === null || _detail$additionalDet8 === void 0 ? void 0 : _detail$additionalDet8.units
|
|
17787
17787
|
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet9 = detail.additionalDetails) === null || _detail$additionalDet9 === void 0 ? void 0 : _detail$additionalDet9.accessories) && /*#__PURE__*/React.createElement(TLTradeAccessories, {
|
|
17788
|
-
units: detail === null || detail === void 0 ? void 0 : (_detail$
|
|
17789
|
-
}), !isEditApplication && (detail === null || detail === void 0 ? void 0 : (_detail$
|
|
17788
|
+
units: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet10 = detail.additionalDetails) === null || _detail$additionalDet10 === void 0 ? void 0 : _detail$additionalDet10.accessories
|
|
17789
|
+
}), !isEditApplication && (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet11 = detail.additionalDetails) === null || _detail$additionalDet11 === void 0 ? void 0 : _detail$additionalDet11.permissions) && (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : (_workflowDetails$data2 = _workflowDetails$data.nextActions) === null || _workflowDetails$data2 === void 0 ? void 0 : _workflowDetails$data2.length) > 0 && /*#__PURE__*/React.createElement(PermissionCheck, {
|
|
17790
17790
|
applicationData: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData,
|
|
17791
17791
|
t: t,
|
|
17792
|
-
permissions: detail === null || detail === void 0 ? void 0 : (_detail$
|
|
17793
|
-
}), (detail === null || detail === void 0 ? void 0 : (_detail$
|
|
17792
|
+
permissions: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet12 = detail.additionalDetails) === null || _detail$additionalDet12 === void 0 ? void 0 : _detail$additionalDet12.permissions
|
|
17793
|
+
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet13 = detail.additionalDetails) === null || _detail$additionalDet13 === void 0 ? void 0 : _detail$additionalDet13.obpsDocuments) && /*#__PURE__*/React.createElement("div", {
|
|
17794
17794
|
style: {
|
|
17795
17795
|
display: "flex"
|
|
17796
17796
|
}
|
|
@@ -17799,31 +17799,31 @@ function ApplicationDetailsContent({
|
|
|
17799
17799
|
applicationData: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData,
|
|
17800
17800
|
docs: detail.additionalDetails.obpsDocuments,
|
|
17801
17801
|
bpaActionsDetails: workflowDetails
|
|
17802
|
-
})), (detail === null || detail === void 0 ? void 0 : (_detail$
|
|
17802
|
+
})), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet14 = detail.additionalDetails) === null || _detail$additionalDet14 === void 0 ? void 0 : _detail$additionalDet14.noc) && /*#__PURE__*/React.createElement(NOCDocuments, {
|
|
17803
17803
|
t: t,
|
|
17804
17804
|
isNoc: true,
|
|
17805
17805
|
NOCdata: detail.values,
|
|
17806
17806
|
applicationData: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData,
|
|
17807
17807
|
docs: detail.additionalDetails.noc,
|
|
17808
|
-
noc: (_detail$
|
|
17808
|
+
noc: (_detail$additionalDet15 = detail.additionalDetails) === null || _detail$additionalDet15 === void 0 ? void 0 : _detail$additionalDet15.data,
|
|
17809
17809
|
bpaActionsDetails: workflowDetails
|
|
17810
|
-
}), (detail === null || detail === void 0 ? void 0 : (_detail$
|
|
17810
|
+
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet16 = detail.additionalDetails) === null || _detail$additionalDet16 === void 0 ? void 0 : _detail$additionalDet16.scruntinyDetails) && /*#__PURE__*/React.createElement(ScruntinyDetails, {
|
|
17811
17811
|
scrutinyDetails: detail === null || detail === void 0 ? void 0 : detail.additionalDetails
|
|
17812
|
-
}), (detail === null || detail === void 0 ? void 0 : (_detail$
|
|
17812
|
+
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet17 = detail.additionalDetails) === null || _detail$additionalDet17 === void 0 ? void 0 : _detail$additionalDet17.buildingExtractionDetails) && /*#__PURE__*/React.createElement(ScruntinyDetails, {
|
|
17813
17813
|
scrutinyDetails: detail === null || detail === void 0 ? void 0 : detail.additionalDetails
|
|
17814
|
-
}), (detail === null || detail === void 0 ? void 0 : (_detail$
|
|
17814
|
+
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet18 = detail.additionalDetails) === null || _detail$additionalDet18 === void 0 ? void 0 : _detail$additionalDet18.subOccupancyTableDetails) && /*#__PURE__*/React.createElement(SubOccupancyTable, {
|
|
17815
17815
|
edcrDetails: detail === null || detail === void 0 ? void 0 : detail.additionalDetails,
|
|
17816
17816
|
applicationData: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData
|
|
17817
|
-
}), (detail === null || detail === void 0 ? void 0 : (_detail$
|
|
17818
|
-
documents: detail === null || detail === void 0 ? void 0 : (_detail$
|
|
17819
|
-
}), (detail === null || detail === void 0 ? void 0 : (_detail$
|
|
17820
|
-
documents: detail === null || detail === void 0 ? void 0 : (_detail$
|
|
17821
|
-
}), (detail === null || detail === void 0 ? void 0 : (_detail$
|
|
17822
|
-
taxHeadEstimatesCalculation: detail === null || detail === void 0 ? void 0 : (_detail$
|
|
17817
|
+
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet19 = detail.additionalDetails) === null || _detail$additionalDet19 === void 0 ? void 0 : _detail$additionalDet19.documentsWithUrl) && /*#__PURE__*/React.createElement(DocumentsPreview, {
|
|
17818
|
+
documents: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet20 = detail.additionalDetails) === null || _detail$additionalDet20 === void 0 ? void 0 : _detail$additionalDet20.documentsWithUrl
|
|
17819
|
+
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet21 = detail.additionalDetails) === null || _detail$additionalDet21 === void 0 ? void 0 : _detail$additionalDet21.documents) && /*#__PURE__*/React.createElement(PropertyDocuments, {
|
|
17820
|
+
documents: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet22 = detail.additionalDetails) === null || _detail$additionalDet22 === void 0 ? void 0 : _detail$additionalDet22.documents
|
|
17821
|
+
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet23 = detail.additionalDetails) === null || _detail$additionalDet23 === void 0 ? void 0 : _detail$additionalDet23.taxHeadEstimatesCalculation) && /*#__PURE__*/React.createElement(PropertyEstimates, {
|
|
17822
|
+
taxHeadEstimatesCalculation: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet24 = detail.additionalDetails) === null || _detail$additionalDet24 === void 0 ? void 0 : _detail$additionalDet24.taxHeadEstimatesCalculation
|
|
17823
17823
|
}), (detail === null || detail === void 0 ? void 0 : detail.isWaterConnectionDetails) && /*#__PURE__*/React.createElement(WSAdditonalDetails, {
|
|
17824
17824
|
wsAdditionalDetails: detail,
|
|
17825
17825
|
oldValue: oldValue
|
|
17826
|
-
}), (detail === null || detail === void 0 ? void 0 : (_detail$
|
|
17826
|
+
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet25 = detail.additionalDetails) === null || _detail$additionalDet25 === void 0 ? void 0 : _detail$additionalDet25.redirectUrl) && /*#__PURE__*/React.createElement("div", {
|
|
17827
17827
|
style: {
|
|
17828
17828
|
fontSize: "16px",
|
|
17829
17829
|
lineHeight: "24px",
|
|
@@ -17831,16 +17831,16 @@ function ApplicationDetailsContent({
|
|
|
17831
17831
|
padding: "10px 0px"
|
|
17832
17832
|
}
|
|
17833
17833
|
}, /*#__PURE__*/React.createElement(Link, {
|
|
17834
|
-
to: detail === null || detail === void 0 ? void 0 : (_detail$
|
|
17834
|
+
to: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet26 = detail.additionalDetails) === null || _detail$additionalDet26 === void 0 ? void 0 : (_detail$additionalDet27 = _detail$additionalDet26.redirectUrl) === null || _detail$additionalDet27 === void 0 ? void 0 : _detail$additionalDet27.url
|
|
17835
17835
|
}, /*#__PURE__*/React.createElement("span", {
|
|
17836
17836
|
className: "link",
|
|
17837
17837
|
style: {
|
|
17838
17838
|
color: "#a82227"
|
|
17839
17839
|
}
|
|
17840
|
-
}, detail === null || detail === void 0 ? void 0 : (_detail$
|
|
17840
|
+
}, detail === null || detail === void 0 ? void 0 : (_detail$additionalDet28 = detail.additionalDetails) === null || _detail$additionalDet28 === void 0 ? void 0 : (_detail$additionalDet29 = _detail$additionalDet28.redirectUrl) === null || _detail$additionalDet29 === void 0 ? void 0 : _detail$additionalDet29.title))), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet30 = detail.additionalDetails) === null || _detail$additionalDet30 === void 0 ? void 0 : _detail$additionalDet30.estimationDetails) && /*#__PURE__*/React.createElement(WSFeeEstimation, {
|
|
17841
17841
|
wsAdditionalDetails: detail,
|
|
17842
17842
|
workflowDetails: workflowDetails
|
|
17843
|
-
}), (detail === null || detail === void 0 ? void 0 : (_detail$
|
|
17843
|
+
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet31 = detail.additionalDetails) === null || _detail$additionalDet31 === void 0 ? void 0 : _detail$additionalDet31.estimationDetails) && /*#__PURE__*/React.createElement(ViewBreakup, {
|
|
17844
17844
|
wsAdditionalDetails: detail,
|
|
17845
17845
|
workflowDetails: workflowDetails
|
|
17846
17846
|
}));
|
|
@@ -17854,13 +17854,13 @@ function ApplicationDetailsContent({
|
|
|
17854
17854
|
}, t("ES_APPLICATION_DETAILS_APPLICATION_TIMELINE")), workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data5 = workflowDetails.data) !== null && _workflowDetails$data5 !== void 0 && _workflowDetails$data5.timeline && (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data6 = workflowDetails.data) === null || _workflowDetails$data6 === void 0 ? void 0 : (_workflowDetails$data7 = _workflowDetails$data6.timeline) === null || _workflowDetails$data7 === void 0 ? void 0 : _workflowDetails$data7.length) === 1 ? /*#__PURE__*/React.createElement(CheckPoint, {
|
|
17855
17855
|
isCompleted: true,
|
|
17856
17856
|
label: t(`${timelineStatusPrefix}${workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data8 = workflowDetails.data) === null || _workflowDetails$data8 === void 0 ? void 0 : (_workflowDetails$data9 = _workflowDetails$data8.timeline[0]) === null || _workflowDetails$data9 === void 0 ? void 0 : _workflowDetails$data9.state}`),
|
|
17857
|
-
customChild: getTimelineCaptions(workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$
|
|
17858
|
-
}) : /*#__PURE__*/React.createElement(ConnectingCheckPoints, null, (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$
|
|
17859
|
-
var _workflowDetails$
|
|
17857
|
+
customChild: getTimelineCaptions(workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data10 = workflowDetails.data) === null || _workflowDetails$data10 === void 0 ? void 0 : _workflowDetails$data10.timeline[0], workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data11 = workflowDetails.data) === null || _workflowDetails$data11 === void 0 ? void 0 : _workflowDetails$data11.timeline)
|
|
17858
|
+
}) : /*#__PURE__*/React.createElement(ConnectingCheckPoints, null, (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data12 = workflowDetails.data) === null || _workflowDetails$data12 === void 0 ? void 0 : _workflowDetails$data12.timeline) && (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data13 = workflowDetails.data) === null || _workflowDetails$data13 === void 0 ? void 0 : _workflowDetails$data13.timeline.slice(0, showAllTimeline ? workflowDetails === null || workflowDetails === void 0 ? void 0 : workflowDetails.data.timeline.length : 2).map((checkpoint, index, arr) => {
|
|
17859
|
+
var _workflowDetails$data20;
|
|
17860
17860
|
let timelineStatusPostfix = "";
|
|
17861
17861
|
if (window.location.href.includes("/obps/")) {
|
|
17862
|
-
var _workflowDetails$
|
|
17863
|
-
if (workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$
|
|
17862
|
+
var _workflowDetails$data14, _workflowDetails$data15, _workflowDetails$data16, _workflowDetails$data17, _workflowDetails$data18, _workflowDetails$data19;
|
|
17863
|
+
if (workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data14 = workflowDetails.data) !== null && _workflowDetails$data14 !== void 0 && (_workflowDetails$data15 = _workflowDetails$data14.timeline[index - 1]) !== null && _workflowDetails$data15 !== void 0 && (_workflowDetails$data16 = _workflowDetails$data15.state) !== null && _workflowDetails$data16 !== void 0 && _workflowDetails$data16.includes("BACK_FROM") || workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data17 = workflowDetails.data) !== null && _workflowDetails$data17 !== void 0 && (_workflowDetails$data18 = _workflowDetails$data17.timeline[index - 1]) !== null && _workflowDetails$data18 !== void 0 && (_workflowDetails$data19 = _workflowDetails$data18.state) !== null && _workflowDetails$data19 !== void 0 && _workflowDetails$data19.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`;
|
|
17864
17864
|
}
|
|
17865
17865
|
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
17866
17866
|
key: index
|
|
@@ -17869,9 +17869,9 @@ function ApplicationDetailsContent({
|
|
|
17869
17869
|
isCompleted: index === 0,
|
|
17870
17870
|
info: checkpoint.comment,
|
|
17871
17871
|
label: t(`${timelineStatusPrefix}${(checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.performedAction) === "REOPEN" ? checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.performedAction : checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint[statusAttribute]}${timelineStatusPostfix}`),
|
|
17872
|
-
customChild: getTimelineCaptions(checkpoint, index, workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$
|
|
17872
|
+
customChild: getTimelineCaptions(checkpoint, index, workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data20 = workflowDetails.data) === null || _workflowDetails$data20 === void 0 ? void 0 : _workflowDetails$data20.timeline)
|
|
17873
17873
|
}));
|
|
17874
|
-
}))), (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$
|
|
17874
|
+
}))), (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data21 = workflowDetails.data) === null || _workflowDetails$data21 === void 0 ? void 0 : (_workflowDetails$data22 = _workflowDetails$data21.timeline) === null || _workflowDetails$data22 === void 0 ? void 0 : _workflowDetails$data22.length) > 2 && /*#__PURE__*/React.createElement(LinkButton$1, {
|
|
17875
17875
|
label: showAllTimeline ? t("COLLAPSE") : t("VIEW_TIMELINE"),
|
|
17876
17876
|
onClick: toggleTimeline
|
|
17877
17877
|
})))), /*#__PURE__*/React.createElement(CardSectionHeader$1, {
|
|
@@ -18011,7 +18011,7 @@ function ApplicationDetailsToast({
|
|
|
18011
18011
|
closeToast,
|
|
18012
18012
|
businessService
|
|
18013
18013
|
}) {
|
|
18014
|
-
var _showToast$error, _showToast$error2, _showToast$error3, _showToast$error4, _showToast$error5, _showToast$error6, _showToast$error7, _showToast$error8, _showToast$action2, _showToast$error9, _showToast$
|
|
18014
|
+
var _showToast$error, _showToast$error2, _showToast$error3, _showToast$error4, _showToast$error5, _showToast$error6, _showToast$error7, _showToast$error8, _showToast$action2, _showToast$error9, _showToast$error10, _showToast$error11, _showToast$error12, _showToast$error13, _showToast$error14, _showToast$error15, _showToast$error16, _showToast$action4;
|
|
18015
18015
|
if (businessService !== null && businessService !== void 0 && businessService.includes("NewTL") || businessService !== null && businessService !== void 0 && businessService.includes("TL") || businessService !== null && businessService !== void 0 && businessService.includes("EDITRENEWAL")) {
|
|
18016
18016
|
var _showToast$action;
|
|
18017
18017
|
let label = "";
|
|
@@ -18058,26 +18058,26 @@ function ApplicationDetailsToast({
|
|
|
18058
18058
|
label = (showToast === null || showToast === void 0 ? void 0 : showToast.key) === "error" ? showToast === null || showToast === void 0 ? void 0 : (_showToast$error9 = showToast.error) === null || _showToast$error9 === void 0 ? void 0 : _showToast$error9.message : getMessage(["BPA_APPROVAL_REVOCATED_MESSAGE_HEAD", "BPA_APPROVAL_OC_REVOCATED_MESSAGE_HEAD"]);
|
|
18059
18059
|
break;
|
|
18060
18060
|
case "VERIFY_AND_FORWARD":
|
|
18061
|
-
label = (showToast === null || showToast === void 0 ? void 0 : showToast.key) === "error" ? showToast === null || showToast === void 0 ? void 0 : (_showToast$
|
|
18061
|
+
label = (showToast === null || showToast === void 0 ? void 0 : showToast.key) === "error" ? showToast === null || showToast === void 0 ? void 0 : (_showToast$error10 = showToast.error) === null || _showToast$error10 === void 0 ? void 0 : _showToast$error10.message : getMessage(["BPA_FORWARD_SUCCESS_MESSAGE_MAIN"]);
|
|
18062
18062
|
break;
|
|
18063
18063
|
case "SEND_BACK_TO_CITIZEN":
|
|
18064
|
-
label = (showToast === null || showToast === void 0 ? void 0 : showToast.key) === "error" ? showToast === null || showToast === void 0 ? void 0 : (_showToast$
|
|
18064
|
+
label = (showToast === null || showToast === void 0 ? void 0 : showToast.key) === "error" ? showToast === null || showToast === void 0 ? void 0 : (_showToast$error11 = showToast.error) === null || _showToast$error11 === void 0 ? void 0 : _showToast$error11.message : getMessage(["BPA_SENDBACK_SUCCESS_MESSAGE_MAIN"]);
|
|
18065
18065
|
break;
|
|
18066
18066
|
case "APPROVE":
|
|
18067
|
-
label = (showToast === null || showToast === void 0 ? void 0 : showToast.key) === "error" ? showToast === null || showToast === void 0 ? void 0 : (_showToast$
|
|
18067
|
+
label = (showToast === null || showToast === void 0 ? void 0 : showToast.key) === "error" ? showToast === null || showToast === void 0 ? void 0 : (_showToast$error12 = showToast.error) === null || _showToast$error12 === void 0 ? void 0 : _showToast$error12.message : getMessage(["BPA_APPROVAL_CHECKLIST_MESSAGE_HEAD"]);
|
|
18068
18068
|
break;
|
|
18069
18069
|
case "REJECT":
|
|
18070
|
-
label = (showToast === null || showToast === void 0 ? void 0 : showToast.key) === "error" ? showToast === null || showToast === void 0 ? void 0 : (_showToast$
|
|
18070
|
+
label = (showToast === null || showToast === void 0 ? void 0 : showToast.key) === "error" ? showToast === null || showToast === void 0 ? void 0 : (_showToast$error13 = showToast.error) === null || _showToast$error13 === void 0 ? void 0 : _showToast$error13.message : getMessage(["BPA_APPROVAL_REJECTED_MESSAGE_HEAD", "BPA_OC_APPROVAL_REJECTED_MESSAGE_HEAD"]);
|
|
18071
18071
|
break;
|
|
18072
18072
|
case "FORWARD":
|
|
18073
|
-
label = (showToast === null || showToast === void 0 ? void 0 : showToast.key) === "error" ? showToast === null || showToast === void 0 ? void 0 : (_showToast$
|
|
18073
|
+
label = (showToast === null || showToast === void 0 ? void 0 : showToast.key) === "error" ? showToast === null || showToast === void 0 ? void 0 : (_showToast$error14 = showToast.error) === null || _showToast$error14 === void 0 ? void 0 : _showToast$error14.message : getMessage(["BPA_FORWARD_SUCCESS_MESSAGE_MAIN"]);
|
|
18074
18074
|
break;
|
|
18075
18075
|
case "SEND_BACK_FOR_DOCUMENT_VERIFICATION":
|
|
18076
18076
|
case "SEND_BACK_FOR_FIELD_INSPECTION":
|
|
18077
|
-
label = (showToast === null || showToast === void 0 ? void 0 : showToast.key) === "error" ? showToast === null || showToast === void 0 ? void 0 : (_showToast$
|
|
18077
|
+
label = (showToast === null || showToast === void 0 ? void 0 : showToast.key) === "error" ? showToast === null || showToast === void 0 ? void 0 : (_showToast$error15 = showToast.error) === null || _showToast$error15 === void 0 ? void 0 : _showToast$error15.message : getMessage(["BPA_SENDBACK_SUCCESS_MESSAGE_MAIN"]);
|
|
18078
18078
|
break;
|
|
18079
18079
|
default:
|
|
18080
|
-
label = (showToast === null || showToast === void 0 ? void 0 : showToast.key) === "error" ? showToast === null || showToast === void 0 ? void 0 : (_showToast$
|
|
18080
|
+
label = (showToast === null || showToast === void 0 ? void 0 : showToast.key) === "error" ? showToast === null || showToast === void 0 ? void 0 : (_showToast$error16 = showToast.error) === null || _showToast$error16 === void 0 ? void 0 : _showToast$error16.message : t(`ES_${businessService}_${showToast === null || showToast === void 0 ? void 0 : (_showToast$action4 = showToast.action) === null || _showToast$action4 === void 0 ? void 0 : _showToast$action4.action}_UPDATE_SUCCESS`);
|
|
18081
18081
|
}
|
|
18082
18082
|
return /*#__PURE__*/React.createElement(React.Fragment, null, showToast && /*#__PURE__*/React.createElement(Toast$1, {
|
|
18083
18083
|
error: showToast.key === "error",
|
|
@@ -18085,8 +18085,8 @@ function ApplicationDetailsToast({
|
|
|
18085
18085
|
onClose: closeToast
|
|
18086
18086
|
}));
|
|
18087
18087
|
} else {
|
|
18088
|
-
var _showToast$
|
|
18089
|
-
const label = (showToast === null || showToast === void 0 ? void 0 : showToast.key) === "error" ? showToast === null || showToast === void 0 ? void 0 : (_showToast$
|
|
18088
|
+
var _showToast$error17, _showToast$action5;
|
|
18089
|
+
const label = (showToast === null || showToast === void 0 ? void 0 : showToast.key) === "error" ? showToast === null || showToast === void 0 ? void 0 : (_showToast$error17 = showToast.error) === null || _showToast$error17 === void 0 ? void 0 : _showToast$error17.message : `ES_${businessService}_${showToast === null || showToast === void 0 ? void 0 : (_showToast$action5 = showToast.action) === null || _showToast$action5 === void 0 ? void 0 : _showToast$action5.action}_UPDATE_SUCCESS`;
|
|
18090
18090
|
return /*#__PURE__*/React.createElement(React.Fragment, null, showToast && /*#__PURE__*/React.createElement(Toast$1, {
|
|
18091
18091
|
error: showToast.key === "error",
|
|
18092
18092
|
label: t(label),
|
|
@@ -18322,7 +18322,7 @@ const ApplicationDetails = props => {
|
|
|
18322
18322
|
}, [showToast]);
|
|
18323
18323
|
function onActionSelect(action) {
|
|
18324
18324
|
if (action) {
|
|
18325
|
-
var _action$redirectionUr8, _action$redirectionUr9, _action$
|
|
18325
|
+
var _action$redirectionUr8, _action$redirectionUr9, _action$redirectionUr10;
|
|
18326
18326
|
if ((action === null || action === void 0 ? void 0 : action.action) == "EDIT PAY 2" && window.location.href.includes("bpa")) {
|
|
18327
18327
|
window.location.assign(window.location.href.split("bpa")[0] + "editApplication/bpa" + window.location.href.split("bpa")[1]);
|
|
18328
18328
|
}
|
|
@@ -18355,15 +18355,15 @@ const ApplicationDetails = props => {
|
|
|
18355
18355
|
}
|
|
18356
18356
|
} else if (!(action !== null && action !== void 0 && action.redirectionUrl) && (action === null || action === void 0 ? void 0 : action.action) != "EDIT PAY 2") {
|
|
18357
18357
|
setShowModal(true);
|
|
18358
|
-
} else if ((action === null || action === void 0 ? void 0 : (_action$redirectionUr8 = action.redirectionUrl) === null || _action$redirectionUr8 === void 0 ? void 0 : (_action$redirectionUr9 = _action$redirectionUr8.state) === null || _action$redirectionUr9 === void 0 ? void 0 : (_action$
|
|
18358
|
+
} else if ((action === null || action === void 0 ? void 0 : (_action$redirectionUr8 = action.redirectionUrl) === null || _action$redirectionUr8 === void 0 ? void 0 : (_action$redirectionUr9 = _action$redirectionUr8.state) === null || _action$redirectionUr9 === void 0 ? void 0 : (_action$redirectionUr10 = _action$redirectionUr9.applicationData) === null || _action$redirectionUr10 === void 0 ? void 0 : _action$redirectionUr10.workflowCode) === "DIRECTRENEWAL") {
|
|
18359
18359
|
console.log("Got Inside Direct");
|
|
18360
18360
|
setShowModal(true);
|
|
18361
18361
|
} else {
|
|
18362
|
-
var _action$
|
|
18362
|
+
var _action$redirectionUr11, _action$redirectionUr12;
|
|
18363
18363
|
history.push({
|
|
18364
|
-
pathname: (_action$
|
|
18364
|
+
pathname: (_action$redirectionUr11 = action.redirectionUrl) === null || _action$redirectionUr11 === void 0 ? void 0 : _action$redirectionUr11.pathname,
|
|
18365
18365
|
state: {
|
|
18366
|
-
...((_action$
|
|
18366
|
+
...((_action$redirectionUr12 = action.redirectionUrl) === null || _action$redirectionUr12 === void 0 ? void 0 : _action$redirectionUr12.state)
|
|
18367
18367
|
}
|
|
18368
18368
|
});
|
|
18369
18369
|
}
|
|
@@ -18685,7 +18685,7 @@ const getUlbName = tenantId => {
|
|
|
18685
18685
|
return ulbName;
|
|
18686
18686
|
};
|
|
18687
18687
|
const DocumentDetails = () => {
|
|
18688
|
-
var _data$applicationData, _data$applicationData2, _data$applicationData3, _data$applicationData4, _data$applicationData5, _data$applicationData6, _data$applicationData7, _data$applicationData8, _data$applicationData9, _data$
|
|
18688
|
+
var _data$applicationData, _data$applicationData2, _data$applicationData3, _data$applicationData4, _data$applicationData5, _data$applicationData6, _data$applicationData7, _data$applicationData8, _data$applicationData9, _data$applicationData10, _data$applicationData11, _data$applicationData12, _data$applicationData13, _data$applicationData14, _data$applicationData15, _data$applicationData16, _data$applicationData17, _data$applicationData18;
|
|
18689
18689
|
let isMobile = window.Digit.Utils.browser.isMobile();
|
|
18690
18690
|
const {
|
|
18691
18691
|
id
|
|
@@ -18774,9 +18774,9 @@ const DocumentDetails = () => {
|
|
|
18774
18774
|
className: "documentDetails_row_items"
|
|
18775
18775
|
}, /*#__PURE__*/React.createElement("p", {
|
|
18776
18776
|
className: "documentDetails_title"
|
|
18777
|
-
}, `${t("EVENTS_TO_DATE_LABEL")}:`), " ", /*#__PURE__*/React.createElement("p", null, data !== null && data !== void 0 && (_data$
|
|
18777
|
+
}, `${t("EVENTS_TO_DATE_LABEL")}:`), " ", /*#__PURE__*/React.createElement("p", null, data !== null && data !== void 0 && (_data$applicationData10 = data.applicationData) !== null && _data$applicationData10 !== void 0 && (_data$applicationData11 = _data$applicationData10.eventDetails) !== null && _data$applicationData11 !== void 0 && _data$applicationData11.toDate ? format(new Date(data === null || data === void 0 ? void 0 : (_data$applicationData12 = data.applicationData) === null || _data$applicationData12 === void 0 ? void 0 : (_data$applicationData13 = _data$applicationData12.eventDetails) === null || _data$applicationData13 === void 0 ? void 0 : _data$applicationData13.toDate), 'dd/MM/yyyy') : null), " "), /*#__PURE__*/React.createElement("span", {
|
|
18778
18778
|
className: "documentDetails_subheader"
|
|
18779
|
-
}, `${t('CS_COMMON_DOCUMENTS')}`), data !== null && data !== void 0 && (_data$
|
|
18779
|
+
}, `${t('CS_COMMON_DOCUMENTS')}`), data !== null && data !== void 0 && (_data$applicationData14 = data.applicationData) !== null && _data$applicationData14 !== void 0 && (_data$applicationData15 = _data$applicationData14.eventDetails) !== null && _data$applicationData15 !== void 0 && (_data$applicationData16 = _data$applicationData15.documents) !== null && _data$applicationData16 !== void 0 && _data$applicationData16.length ? renderMultipleDocuments(data === null || data === void 0 ? void 0 : (_data$applicationData17 = data.applicationData) === null || _data$applicationData17 === void 0 ? void 0 : (_data$applicationData18 = _data$applicationData17.eventDetails) === null || _data$applicationData18 === void 0 ? void 0 : _data$applicationData18.documents) : "NA")), /*#__PURE__*/React.createElement(ActionBar$1, null, displayMenu ? /*#__PURE__*/React.createElement(Menu, {
|
|
18780
18780
|
style: {
|
|
18781
18781
|
width: isMobile ? 'full' : '240px'
|
|
18782
18782
|
},
|
|
@@ -19913,6 +19913,7 @@ const Acknowledgement = props => {
|
|
|
19913
19913
|
};
|
|
19914
19914
|
|
|
19915
19915
|
const ActiveAndOpenSurveys = props => {
|
|
19916
|
+
var _userUlbs, _userUlbs2, _userUlbs3;
|
|
19916
19917
|
const {
|
|
19917
19918
|
userType
|
|
19918
19919
|
} = props;
|
|
@@ -19920,10 +19921,49 @@ const ActiveAndOpenSurveys = props => {
|
|
|
19920
19921
|
const {
|
|
19921
19922
|
t
|
|
19922
19923
|
} = useTranslation();
|
|
19924
|
+
const userInfo = Digit.UserService.getUser().info;
|
|
19925
|
+
console.log("userinfo", userInfo);
|
|
19926
|
+
const ulbs = Digit.SessionStorage.get("ENGAGEMENT_TENANTS");
|
|
19927
|
+
let userUlbs = ulbs.filter(ulb => {
|
|
19928
|
+
var _userInfo$roles;
|
|
19929
|
+
return userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$roles = userInfo.roles) === null || _userInfo$roles === void 0 ? void 0 : _userInfo$roles.some(role => (role === null || role === void 0 ? void 0 : role.tenantId) === (ulb === null || ulb === void 0 ? void 0 : ulb.code));
|
|
19930
|
+
});
|
|
19923
19931
|
const tenantId = userType.toLowerCase() === "employee" ? Digit.ULBService.getCurrentPermanentCity() : localStorage.getItem("CITIZEN.CITY");
|
|
19932
|
+
if (((_userUlbs = userUlbs) === null || _userUlbs === void 0 ? void 0 : _userUlbs.length) === 0 || tenantId === "pb.punjab") {
|
|
19933
|
+
let adduserUlbs = {
|
|
19934
|
+
i18nKey: `TENANT_TENANTS_${tenantId.replace(".", "_").toUpperCase()}`,
|
|
19935
|
+
code: `${tenantId}`
|
|
19936
|
+
};
|
|
19937
|
+
if (tenantId === "pb.punjab") {
|
|
19938
|
+
userUlbs = [adduserUlbs, ...ulbs];
|
|
19939
|
+
} else {
|
|
19940
|
+
userUlbs = [adduserUlbs];
|
|
19941
|
+
}
|
|
19942
|
+
}
|
|
19924
19943
|
const [loading, setLoading] = useState(false);
|
|
19925
19944
|
const [count, setCount] = useState(null);
|
|
19926
19945
|
const [data, setData] = useState([]);
|
|
19946
|
+
const searchFormDefaultValues = {
|
|
19947
|
+
city: (_userUlbs2 = userUlbs) === null || _userUlbs2 === void 0 ? void 0 : _userUlbs2[0],
|
|
19948
|
+
offset: 0,
|
|
19949
|
+
limit: 10,
|
|
19950
|
+
sortOrder: "DESC"
|
|
19951
|
+
};
|
|
19952
|
+
const {
|
|
19953
|
+
register,
|
|
19954
|
+
control,
|
|
19955
|
+
handleSubmit,
|
|
19956
|
+
setValue,
|
|
19957
|
+
getValues,
|
|
19958
|
+
reset,
|
|
19959
|
+
formState: {
|
|
19960
|
+
errors
|
|
19961
|
+
},
|
|
19962
|
+
watch
|
|
19963
|
+
} = useForm({
|
|
19964
|
+
defaultValues: searchFormDefaultValues
|
|
19965
|
+
});
|
|
19966
|
+
const formValues = watch();
|
|
19927
19967
|
const GetCell = value => /*#__PURE__*/React.createElement("span", {
|
|
19928
19968
|
className: "cell-text styled-cell"
|
|
19929
19969
|
}, value);
|
|
@@ -19974,11 +20014,12 @@ const ActiveAndOpenSurveys = props => {
|
|
|
19974
20014
|
});
|
|
19975
20015
|
useEffect(() => {
|
|
19976
20016
|
fetchActiveAndOpenSurveys();
|
|
19977
|
-
}, [
|
|
20017
|
+
}, []);
|
|
19978
20018
|
function fetchActiveAndOpenSurveys() {
|
|
20019
|
+
var _formValues$city;
|
|
19979
20020
|
setLoading(true);
|
|
19980
20021
|
const payload = {
|
|
19981
|
-
tenantId:
|
|
20022
|
+
tenantId: formValues === null || formValues === void 0 ? void 0 : (_formValues$city = formValues.city) === null || _formValues$city === void 0 ? void 0 : _formValues$city.code,
|
|
19982
20023
|
active: true,
|
|
19983
20024
|
openSurveyFlag: true
|
|
19984
20025
|
};
|
|
@@ -19993,7 +20034,6 @@ const ActiveAndOpenSurveys = props => {
|
|
|
19993
20034
|
console.error("Failed to fetch surveys", error);
|
|
19994
20035
|
});
|
|
19995
20036
|
}
|
|
19996
|
-
const userInfo = Digit.UserService.getUser().info;
|
|
19997
20037
|
console.log("userinfo", userInfo);
|
|
19998
20038
|
const handleStartSurvey = surveyDetails => {
|
|
19999
20039
|
console.log("Survey Details: ", surveyDetails);
|
|
@@ -20011,7 +20051,61 @@ const ActiveAndOpenSurveys = props => {
|
|
|
20011
20051
|
}
|
|
20012
20052
|
});
|
|
20013
20053
|
};
|
|
20014
|
-
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(
|
|
20054
|
+
return /*#__PURE__*/React.createElement("div", null, tenantId === "pb.punjab" && window.location.href.includes("/employee") ? /*#__PURE__*/React.createElement(Card$1, {
|
|
20055
|
+
style: {
|
|
20056
|
+
marginTop: "16px",
|
|
20057
|
+
marginBottom: "16px",
|
|
20058
|
+
backgroundColor: "white",
|
|
20059
|
+
maxWidth: "99%"
|
|
20060
|
+
}
|
|
20061
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
20062
|
+
style: {
|
|
20063
|
+
display: "flex",
|
|
20064
|
+
justifyContent: "space-between",
|
|
20065
|
+
alignItems: "center"
|
|
20066
|
+
}
|
|
20067
|
+
}, /*#__PURE__*/React.createElement("h1", {
|
|
20068
|
+
style: {
|
|
20069
|
+
fontSize: "20px"
|
|
20070
|
+
}
|
|
20071
|
+
}, " Search Surveys ")), /*#__PURE__*/React.createElement("hr", {
|
|
20072
|
+
style: {
|
|
20073
|
+
marginTop: "10px"
|
|
20074
|
+
}
|
|
20075
|
+
}), /*#__PURE__*/React.createElement("form", {
|
|
20076
|
+
className: "search-form-wrapper rm-mb form-field-flex-one",
|
|
20077
|
+
onSubmit: handleSubmit(fetchActiveAndOpenSurveys)
|
|
20078
|
+
}, /*#__PURE__*/React.createElement(SearchField, null, /*#__PURE__*/React.createElement("label", null, t("City"), " ", /*#__PURE__*/React.createElement("span", {
|
|
20079
|
+
style: {
|
|
20080
|
+
color: "red"
|
|
20081
|
+
}
|
|
20082
|
+
}, "*")), /*#__PURE__*/React.createElement(Controller, Object.assign({
|
|
20083
|
+
rules: {
|
|
20084
|
+
required: t("REQUIRED_FIELD")
|
|
20085
|
+
}
|
|
20086
|
+
}, register("city"), {
|
|
20087
|
+
render: props => /*#__PURE__*/React.createElement(Dropdown, {
|
|
20088
|
+
option: userUlbs,
|
|
20089
|
+
optionKey: "i18nKey",
|
|
20090
|
+
selected: formValues === null || formValues === void 0 ? void 0 : formValues.city,
|
|
20091
|
+
select: e => {
|
|
20092
|
+
props.onChange(e);
|
|
20093
|
+
},
|
|
20094
|
+
t: t
|
|
20095
|
+
}),
|
|
20096
|
+
name: "city",
|
|
20097
|
+
control: control,
|
|
20098
|
+
defaultValue: (_userUlbs3 = userUlbs) === null || _userUlbs3 === void 0 ? void 0 : _userUlbs3[0]
|
|
20099
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
20100
|
+
className: `form-field`,
|
|
20101
|
+
style: {
|
|
20102
|
+
marginTop: "40px"
|
|
20103
|
+
}
|
|
20104
|
+
}, " ", /*#__PURE__*/React.createElement(SubmitBar$1, {
|
|
20105
|
+
label: "Search",
|
|
20106
|
+
submit: "submit",
|
|
20107
|
+
onSubmit: fetchActiveAndOpenSurveys
|
|
20108
|
+
})))) : null, /*#__PURE__*/React.createElement(Table, {
|
|
20015
20109
|
t: t,
|
|
20016
20110
|
data: data,
|
|
20017
20111
|
totalRecords: count,
|
|
@@ -20199,6 +20293,7 @@ const FillQuestions = props => {
|
|
|
20199
20293
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
20200
20294
|
const prevProps = props.location.state;
|
|
20201
20295
|
const [hasCitizenDetails, setHasCitizenDetails] = useState(null);
|
|
20296
|
+
console.log("city", localStorage.getItem("CITIZEN.CITY"));
|
|
20202
20297
|
useEffect(() => {
|
|
20203
20298
|
(async () => {
|
|
20204
20299
|
setLoading(true);
|
|
@@ -20297,10 +20392,12 @@ const FillQuestions = props => {
|
|
|
20297
20392
|
}))
|
|
20298
20393
|
};
|
|
20299
20394
|
const fetchAnswer = async status => {
|
|
20395
|
+
var _prevProps$citizenDat2, _prevProps$citizenDat3;
|
|
20300
20396
|
setLoading(true);
|
|
20301
20397
|
let payload = {
|
|
20302
20398
|
surveyUuid: data.uuid,
|
|
20303
|
-
citizenId: prevProps.userInfo.uuid
|
|
20399
|
+
citizenId: prevProps.userInfo.uuid,
|
|
20400
|
+
tenantId: city === null ? window.location.href.includes("/employee") ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$citizenDat2 = prevProps.citizenData) === null || _prevProps$citizenDat2 === void 0 ? void 0 : (_prevProps$citizenDat3 = _prevProps$citizenDat2.city) === null || _prevProps$citizenDat3 === void 0 ? void 0 : _prevProps$citizenDat3.code : city : city
|
|
20304
20401
|
};
|
|
20305
20402
|
try {
|
|
20306
20403
|
Digit.Surveys.getAnswers(payload).then(response => {
|
|
@@ -20338,10 +20435,12 @@ const FillQuestions = props => {
|
|
|
20338
20435
|
}
|
|
20339
20436
|
};
|
|
20340
20437
|
const fetchSurveyAnswers = async () => {
|
|
20438
|
+
var _prevProps$citizenDat4, _prevProps$citizenDat5;
|
|
20341
20439
|
setLoading(true);
|
|
20342
20440
|
let payload = {
|
|
20343
20441
|
surveyUuid: data.uuid,
|
|
20344
|
-
citizenId: prevProps.userInfo.uuid
|
|
20442
|
+
citizenId: prevProps.userInfo.uuid,
|
|
20443
|
+
tenantId: city === null || city === undefined ? window.location.href.includes("/employee") ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$citizenDat4 = prevProps.citizenData) === null || _prevProps$citizenDat4 === void 0 ? void 0 : (_prevProps$citizenDat5 = _prevProps$citizenDat4.city) === null || _prevProps$citizenDat5 === void 0 ? void 0 : _prevProps$citizenDat5.code : localStorage.getItem("CITIZEN.CITY") : city
|
|
20345
20444
|
};
|
|
20346
20445
|
try {
|
|
20347
20446
|
Digit.Surveys.getAnswers(payload).then(response => {
|
|
@@ -20503,7 +20602,7 @@ const FillQuestions = props => {
|
|
|
20503
20602
|
return () => clearInterval(interval);
|
|
20504
20603
|
}, [formData]);
|
|
20505
20604
|
const handleAutoSave = async () => {
|
|
20506
|
-
var _prevProps$
|
|
20605
|
+
var _prevProps$citizenDat6, _prevProps$citizenDat7, _prevProps$citizenDat8, _prevProps$citizenDat9, _prevProps$citizenDat10, _prevProps$citizenDat11, _prevProps$citizenDat12, _prevProps$citizenDat13, _prevProps$citizenDat14;
|
|
20507
20606
|
setLoading(true);
|
|
20508
20607
|
let answerArr = [];
|
|
20509
20608
|
for (const sectionId in formData) {
|
|
@@ -20527,14 +20626,16 @@ const FillQuestions = props => {
|
|
|
20527
20626
|
User: {
|
|
20528
20627
|
type: prevProps.userInfo.type,
|
|
20529
20628
|
uuid: prevProps.userInfo.uuid,
|
|
20530
|
-
gender: (prevProps === null || prevProps === void 0 ? void 0 : prevProps.userType).toUpperCase() === "EMPLOYEE" ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$
|
|
20531
|
-
emailId: (prevProps === null || prevProps === void 0 ? void 0 : prevProps.userType).toUpperCase() === "EMPLOYEE" ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$
|
|
20532
|
-
dob: (prevProps === null || prevProps === void 0 ? void 0 : prevProps.userType).toUpperCase() === "EMPLOYEE" ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$
|
|
20629
|
+
gender: (prevProps === null || prevProps === void 0 ? void 0 : prevProps.userType).toUpperCase() === "EMPLOYEE" ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$citizenDat6 = prevProps.citizenData) === null || _prevProps$citizenDat6 === void 0 ? void 0 : _prevProps$citizenDat6.gender : prevProps.userInfo.gender,
|
|
20630
|
+
emailId: (prevProps === null || prevProps === void 0 ? void 0 : prevProps.userType).toUpperCase() === "EMPLOYEE" ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$citizenDat7 = prevProps.citizenData) === null || _prevProps$citizenDat7 === void 0 ? void 0 : _prevProps$citizenDat7.email : prevProps.userInfo.emailId,
|
|
20631
|
+
dob: (prevProps === null || prevProps === void 0 ? void 0 : prevProps.userType).toUpperCase() === "EMPLOYEE" ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$citizenDat8 = prevProps.citizenData) === null || _prevProps$citizenDat8 === void 0 ? void 0 : _prevProps$citizenDat8.dob : prevProps.userInfo.dob
|
|
20533
20632
|
},
|
|
20534
20633
|
SurveyResponse: {
|
|
20535
20634
|
surveyUuid: data.uuid,
|
|
20635
|
+
tenantId: city === null ? window.location.href.includes("/employee") ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$citizenDat9 = prevProps.citizenData) === null || _prevProps$citizenDat9 === void 0 ? void 0 : (_prevProps$citizenDat10 = _prevProps$citizenDat9.city) === null || _prevProps$citizenDat10 === void 0 ? void 0 : _prevProps$citizenDat10.code : localStorage.getItem("CITIZEN.CITY") : city,
|
|
20636
|
+
city: city === null ? window.location.href.includes("/employee") ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$citizenDat11 = prevProps.citizenData) === null || _prevProps$citizenDat11 === void 0 ? void 0 : (_prevProps$citizenDat12 = _prevProps$citizenDat11.city) === null || _prevProps$citizenDat12 === void 0 ? void 0 : _prevProps$citizenDat12.code : localStorage.getItem("CITIZEN.CITY") : city,
|
|
20536
20637
|
locality: locality,
|
|
20537
|
-
tenantId: city === null ? window.location.href.includes("/employee") ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$
|
|
20638
|
+
tenantId: city === null ? window.location.href.includes("/employee") ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$citizenDat13 = prevProps.citizenData) === null || _prevProps$citizenDat13 === void 0 ? void 0 : (_prevProps$citizenDat14 = _prevProps$citizenDat13.city) === null || _prevProps$citizenDat14 === void 0 ? void 0 : _prevProps$citizenDat14.code : localStorage.getItem("CITIZEN.CITY") : city,
|
|
20538
20639
|
status: "Draft",
|
|
20539
20640
|
coordinates: `${geoLocation.latitude},${geoLocation.longitude}`,
|
|
20540
20641
|
answers: answerArr
|
|
@@ -20609,19 +20710,19 @@ const FillQuestions = props => {
|
|
|
20609
20710
|
return Object.keys(newErrors).length === 0;
|
|
20610
20711
|
};
|
|
20611
20712
|
const handleSubmitSurvey = () => {
|
|
20612
|
-
var _prevProps$
|
|
20713
|
+
var _prevProps$citizenDat17, _prevProps$citizenDat18, _prevProps$citizenDat19, _prevProps$citizenDat20, _prevProps$citizenDat21, _prevProps$citizenDat22, _prevProps$citizenDat23;
|
|
20613
20714
|
setLoading(true);
|
|
20614
20715
|
let answerArr = [];
|
|
20615
20716
|
for (const sectionId in formData) {
|
|
20616
20717
|
for (const questionId in formData[sectionId]) {
|
|
20617
|
-
var _formData$sectionId$q2, _prevProps$
|
|
20718
|
+
var _formData$sectionId$q2, _prevProps$citizenDat15, _prevProps$citizenDat16;
|
|
20618
20719
|
answerArr.push({
|
|
20619
20720
|
uuid: formData[sectionId][questionId].answerUuid,
|
|
20620
20721
|
surveyUuid: data.uuid,
|
|
20621
20722
|
questionUuid: questionId,
|
|
20622
20723
|
sectionUuid: sectionId,
|
|
20623
20724
|
comments: ((_formData$sectionId$q2 = formData[sectionId][questionId]) === null || _formData$sectionId$q2 === void 0 ? void 0 : _formData$sectionId$q2.comments) || "",
|
|
20624
|
-
tenantId: window.location.href.includes("/employee") ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$
|
|
20725
|
+
tenantId: window.location.href.includes("/employee") ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$citizenDat15 = prevProps.citizenData) === null || _prevProps$citizenDat15 === void 0 ? void 0 : (_prevProps$citizenDat16 = _prevProps$citizenDat15.city) === null || _prevProps$citizenDat16 === void 0 ? void 0 : _prevProps$citizenDat16.code : localStorage.getItem("CITIZEN.CITY"),
|
|
20625
20726
|
answerDetails: [{
|
|
20626
20727
|
answerType: formData[sectionId][questionId].answerType,
|
|
20627
20728
|
answerContent: formData[sectionId][questionId].answerType === "CHECKBOX_ANSWER_TYPE" ? formData[sectionId][questionId].answer.join(",") : formData[sectionId][questionId].answer,
|
|
@@ -20634,16 +20735,17 @@ const FillQuestions = props => {
|
|
|
20634
20735
|
User: {
|
|
20635
20736
|
type: prevProps.userInfo.type,
|
|
20636
20737
|
uuid: prevProps.userInfo.uuid,
|
|
20637
|
-
gender: (prevProps === null || prevProps === void 0 ? void 0 : prevProps.userType).toUpperCase() === "EMPLOYEE" ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$
|
|
20638
|
-
emailId: (prevProps === null || prevProps === void 0 ? void 0 : prevProps.userType).toUpperCase() === "EMPLOYEE" ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$
|
|
20639
|
-
dob: (prevProps === null || prevProps === void 0 ? void 0 : prevProps.userType).toUpperCase() === "EMPLOYEE" ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$
|
|
20738
|
+
gender: (prevProps === null || prevProps === void 0 ? void 0 : prevProps.userType).toUpperCase() === "EMPLOYEE" ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$citizenDat17 = prevProps.citizenData) === null || _prevProps$citizenDat17 === void 0 ? void 0 : _prevProps$citizenDat17.gender : prevProps.userInfo.gender,
|
|
20739
|
+
emailId: (prevProps === null || prevProps === void 0 ? void 0 : prevProps.userType).toUpperCase() === "EMPLOYEE" ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$citizenDat18 = prevProps.citizenData) === null || _prevProps$citizenDat18 === void 0 ? void 0 : _prevProps$citizenDat18.email : prevProps.userInfo.emailId,
|
|
20740
|
+
dob: (prevProps === null || prevProps === void 0 ? void 0 : prevProps.userType).toUpperCase() === "EMPLOYEE" ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$citizenDat19 = prevProps.citizenData) === null || _prevProps$citizenDat19 === void 0 ? void 0 : _prevProps$citizenDat19.dob : prevProps.userInfo.dob
|
|
20640
20741
|
},
|
|
20641
20742
|
SurveyResponse: {
|
|
20642
20743
|
surveyUuid: data.uuid,
|
|
20643
|
-
tenantId: city === null ? window.location.href.includes("/employee") ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$citizenDat10 = prevProps.citizenData) === null || _prevProps$citizenDat10 === void 0 ? void 0 : (_prevProps$citizenDat11 = _prevProps$citizenDat10.city) === null || _prevProps$citizenDat11 === void 0 ? void 0 : _prevProps$citizenDat11.code : localStorage.getItem("CITIZEN.CITY") : city,
|
|
20644
20744
|
status: "Submit",
|
|
20645
20745
|
locality: locality,
|
|
20646
20746
|
coordinates: `${geoLocation.latitude},${geoLocation.longitude}`,
|
|
20747
|
+
tenantId: city === null ? window.location.href.includes("/employee") ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$citizenDat20 = prevProps.citizenData) === null || _prevProps$citizenDat20 === void 0 ? void 0 : (_prevProps$citizenDat21 = _prevProps$citizenDat20.city) === null || _prevProps$citizenDat21 === void 0 ? void 0 : _prevProps$citizenDat21.code : localStorage.getItem("CITIZEN.CITY") : city,
|
|
20748
|
+
city: city === null ? window.location.href.includes("/employee") ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$citizenDat22 = prevProps.citizenData) === null || _prevProps$citizenDat22 === void 0 ? void 0 : (_prevProps$citizenDat23 = _prevProps$citizenDat22.city) === null || _prevProps$citizenDat23 === void 0 ? void 0 : _prevProps$citizenDat23.code : localStorage.getItem("CITIZEN.CITY") : city,
|
|
20647
20749
|
answers: answerArr
|
|
20648
20750
|
}
|
|
20649
20751
|
};
|
|
@@ -20691,7 +20793,7 @@ const FillQuestions = props => {
|
|
|
20691
20793
|
}
|
|
20692
20794
|
};
|
|
20693
20795
|
const displayAnswerField = (answerType, question, section) => {
|
|
20694
|
-
var _formData$section$uui2, _formData$section$uui3, _errors$section$uuid, _errors$section$uuid$, _errors$section$uuid2, _errors$section$uuid3, _errors$section$uuid4, _errors$section$uuid5, _errors$section$uuid6, _errors$section$uuid7, _formData$section$uui6, _formData$section$uui7, _errors$section$uuid8, _errors$section$uuid9, _errors$section$
|
|
20796
|
+
var _formData$section$uui2, _formData$section$uui3, _errors$section$uuid, _errors$section$uuid$, _errors$section$uuid2, _errors$section$uuid3, _errors$section$uuid4, _errors$section$uuid5, _errors$section$uuid6, _errors$section$uuid7, _formData$section$uui6, _formData$section$uui7, _errors$section$uuid8, _errors$section$uuid9, _errors$section$uuid10, _errors$section$uuid11, _formData$section$uui8, _formData$section$uui9, _errors$section$uuid12, _errors$section$uuid13, _errors$section$uuid14, _errors$section$uuid15, _errors$section$uuid16, _errors$section$uuid17, _errors$section$uuid18, _errors$section$uuid19, _formData$section$uui12, _formData$section$uui13, _errors$section$uuid20, _errors$section$uuid21, _errors$section$uuid22, _errors$section$uuid23, _formData$section$uui14, _formData$section$uui15, _errors$section$uuid24, _errors$section$uuid25, _errors$section$uuid26, _errors$section$uuid27, _errors$section$uuid28, _errors$section$uuid29, _errors$section$uuid30, _errors$section$uuid31, _formData$section$uui18, _formData$section$uui19, _errors$section$uuid32, _errors$section$uuid33, _errors$section$uuid34, _errors$section$uuid35, _errors$section$uuid36, _errors$section$uuid37, _errors$section$uuid38, _errors$section$uuid39, _errors$section$uuid40, _errors$section$uuid41, _errors$section$uuid42, _errors$section$uuid43, _formData$section$uui24, _formData$section$uui25, _errors$section$uuid44, _errors$section$uuid45, _errors$section$uuid46, _errors$section$uuid47, _errors$section$uuid48, _errors$section$uuid49, _errors$section$uuid50, _errors$section$uuid51, _errors$section$uuid52, _errors$section$uuid53, _errors$section$uuid54, _errors$section$uuid55, _formData$section$uui30, _formData$section$uui31, _errors$section$uuid56, _errors$section$uuid57, _errors$section$uuid58, _errors$section$uuid59, _formData$section$uui32, _formData$section$uui33, _errors$section$uuid60, _errors$section$uuid61, _errors$section$uuid62, _errors$section$uuid63, _errors$section$uuid64, _errors$section$uuid65, _errors$section$uuid66, _errors$section$uuid67, _formData$section$uui36, _formData$section$uui37, _errors$section$uuid68, _errors$section$uuid69, _errors$section$uuid70, _errors$section$uuid71, _formData$section$uui38, _formData$section$uui39, _errors$section$uuid72, _errors$section$uuid73, _errors$section$uuid74, _errors$section$uuid75, _errors$section$uuid76, _errors$section$uuid77, _errors$section$uuid78, _errors$section$uuid79, _formData$section$uui42, _formData$section$uui43, _errors$section$uuid80, _errors$section$uuid81, _errors$section$uuid82, _errors$section$uuid83;
|
|
20695
20797
|
switch (answerType) {
|
|
20696
20798
|
case "SHORT_ANSWER_TYPE":
|
|
20697
20799
|
return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(TextInput$1, {
|
|
@@ -20748,7 +20850,7 @@ const FillQuestions = props => {
|
|
|
20748
20850
|
color: "red",
|
|
20749
20851
|
fontWeight: "500"
|
|
20750
20852
|
}
|
|
20751
|
-
}, errors === null || errors === void 0 ? void 0 : (_errors$section$
|
|
20853
|
+
}, errors === null || errors === void 0 ? void 0 : (_errors$section$uuid10 = errors[section.uuid]) === null || _errors$section$uuid10 === void 0 ? void 0 : (_errors$section$uuid11 = _errors$section$uuid10[question.uuid]) === null || _errors$section$uuid11 === void 0 ? void 0 : _errors$section$uuid11.commentsLength));
|
|
20752
20854
|
case "LONG_ANSWER_TYPE":
|
|
20753
20855
|
return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(TextArea$1, {
|
|
20754
20856
|
name: question.uuid,
|
|
@@ -20757,8 +20859,8 @@ const FillQuestions = props => {
|
|
|
20757
20859
|
},
|
|
20758
20860
|
value: (_formData$section$uui8 = formData[section.uuid]) === null || _formData$section$uui8 === void 0 ? void 0 : (_formData$section$uui9 = _formData$section$uui8[question.uuid]) === null || _formData$section$uui9 === void 0 ? void 0 : _formData$section$uui9.answer,
|
|
20759
20861
|
onChange: e => {
|
|
20760
|
-
var _formData$section$
|
|
20761
|
-
return handleInputChange(section.uuid, question.uuid, question.type, null, e.target.value, (_formData$section$
|
|
20862
|
+
var _formData$section$uui10, _formData$section$uui11;
|
|
20863
|
+
return handleInputChange(section.uuid, question.uuid, question.type, null, e.target.value, (_formData$section$uui10 = formData[section.uuid]) === null || _formData$section$uui10 === void 0 ? void 0 : (_formData$section$uui11 = _formData$section$uui10[question.uuid]) === null || _formData$section$uui11 === void 0 ? void 0 : _formData$section$uui11.answerUuid);
|
|
20762
20864
|
},
|
|
20763
20865
|
inputRef: register({
|
|
20764
20866
|
maxLength: {
|
|
@@ -20767,23 +20869,23 @@ const FillQuestions = props => {
|
|
|
20767
20869
|
},
|
|
20768
20870
|
required: question.required
|
|
20769
20871
|
})
|
|
20770
|
-
}), errors && (errors === null || errors === void 0 ? void 0 : errors[section.uuid]) && (errors === null || errors === void 0 ? void 0 : (_errors$section$
|
|
20872
|
+
}), errors && (errors === null || errors === void 0 ? void 0 : errors[section.uuid]) && (errors === null || errors === void 0 ? void 0 : (_errors$section$uuid12 = errors[section.uuid]) === null || _errors$section$uuid12 === void 0 ? void 0 : (_errors$section$uuid13 = _errors$section$uuid12[question.uuid]) === null || _errors$section$uuid13 === void 0 ? void 0 : _errors$section$uuid13.answerRequired) && /*#__PURE__*/React.createElement(CardLabelError$2, {
|
|
20771
20873
|
style: {
|
|
20772
20874
|
marginTop: "0px",
|
|
20773
20875
|
marginBottom: "0px",
|
|
20774
20876
|
color: "red",
|
|
20775
20877
|
fontWeight: "500"
|
|
20776
20878
|
}
|
|
20777
|
-
}, errors === null || errors === void 0 ? void 0 : (_errors$section$
|
|
20879
|
+
}, errors === null || errors === void 0 ? void 0 : (_errors$section$uuid14 = errors[section.uuid]) === null || _errors$section$uuid14 === void 0 ? void 0 : (_errors$section$uuid15 = _errors$section$uuid14[question.uuid]) === null || _errors$section$uuid15 === void 0 ? void 0 : _errors$section$uuid15.answerRequired), errors && (errors === null || errors === void 0 ? void 0 : errors[section.uuid]) && (errors === null || errors === void 0 ? void 0 : (_errors$section$uuid16 = errors[section.uuid]) === null || _errors$section$uuid16 === void 0 ? void 0 : (_errors$section$uuid17 = _errors$section$uuid16[question.uuid]) === null || _errors$section$uuid17 === void 0 ? void 0 : _errors$section$uuid17.answerLength) && /*#__PURE__*/React.createElement(CardLabelError$2, {
|
|
20778
20880
|
style: {
|
|
20779
20881
|
marginTop: "0px",
|
|
20780
20882
|
marginBottom: "0px",
|
|
20781
20883
|
color: "red",
|
|
20782
20884
|
fontWeight: "500"
|
|
20783
20885
|
}
|
|
20784
|
-
}, errors === null || errors === void 0 ? void 0 : (_errors$section$
|
|
20886
|
+
}, errors === null || errors === void 0 ? void 0 : (_errors$section$uuid18 = errors[section.uuid]) === null || _errors$section$uuid18 === void 0 ? void 0 : (_errors$section$uuid19 = _errors$section$uuid18[question.uuid]) === null || _errors$section$uuid19 === void 0 ? void 0 : _errors$section$uuid19.answerLength), /*#__PURE__*/React.createElement("div", null, " ", "Add Suggestions/Comments"), /*#__PURE__*/React.createElement(TextArea$1, {
|
|
20785
20887
|
name: question.uuid,
|
|
20786
|
-
value: (_formData$section$
|
|
20888
|
+
value: (_formData$section$uui12 = formData[section.uuid]) === null || _formData$section$uui12 === void 0 ? void 0 : (_formData$section$uui13 = _formData$section$uui12[question.uuid]) === null || _formData$section$uui13 === void 0 ? void 0 : _formData$section$uui13.comments,
|
|
20787
20889
|
maxLength: 500,
|
|
20788
20890
|
style: {
|
|
20789
20891
|
maxWidth: "none",
|
|
@@ -20796,46 +20898,46 @@ const FillQuestions = props => {
|
|
|
20796
20898
|
message: t("EXCEEDS_500_CHAR_LIMIT")
|
|
20797
20899
|
}
|
|
20798
20900
|
})
|
|
20799
|
-
}), errors && (errors === null || errors === void 0 ? void 0 : errors[section.uuid]) && (errors === null || errors === void 0 ? void 0 : (_errors$section$
|
|
20901
|
+
}), errors && (errors === null || errors === void 0 ? void 0 : errors[section.uuid]) && (errors === null || errors === void 0 ? void 0 : (_errors$section$uuid20 = errors[section.uuid]) === null || _errors$section$uuid20 === void 0 ? void 0 : (_errors$section$uuid21 = _errors$section$uuid20[question.uuid]) === null || _errors$section$uuid21 === void 0 ? void 0 : _errors$section$uuid21.commentsLength) && /*#__PURE__*/React.createElement(CardLabelError$2, {
|
|
20800
20902
|
style: {
|
|
20801
20903
|
marginTop: "0px",
|
|
20802
20904
|
marginBottom: "0px",
|
|
20803
20905
|
color: "red",
|
|
20804
20906
|
fontWeight: "500"
|
|
20805
20907
|
}
|
|
20806
|
-
}, errors === null || errors === void 0 ? void 0 : (_errors$section$
|
|
20908
|
+
}, errors === null || errors === void 0 ? void 0 : (_errors$section$uuid22 = errors[section.uuid]) === null || _errors$section$uuid22 === void 0 ? void 0 : (_errors$section$uuid23 = _errors$section$uuid22[question.uuid]) === null || _errors$section$uuid23 === void 0 ? void 0 : _errors$section$uuid23.commentsLength));
|
|
20807
20909
|
case "DROP_DOWN_MENU_ANSWER_TYPE":
|
|
20808
20910
|
return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement("select", {
|
|
20809
20911
|
id: "dropdown",
|
|
20810
|
-
value: (_formData$section$
|
|
20912
|
+
value: (_formData$section$uui14 = formData[section.uuid]) === null || _formData$section$uui14 === void 0 ? void 0 : (_formData$section$uui15 = _formData$section$uui14[question.uuid]) === null || _formData$section$uui15 === void 0 ? void 0 : _formData$section$uui15.answer,
|
|
20811
20913
|
onChange: e => {
|
|
20812
|
-
var _formData$section$
|
|
20914
|
+
var _formData$section$uui16, _formData$section$uui17;
|
|
20813
20915
|
const selectedOption = question.options.find(option => option.optionText === e.target.value);
|
|
20814
20916
|
const optionWeightage = (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.weightage) || 0;
|
|
20815
|
-
handleInputChange(section.uuid, question.uuid, question.type, optionWeightage, e.target.value, (_formData$section$
|
|
20917
|
+
handleInputChange(section.uuid, question.uuid, question.type, optionWeightage, e.target.value, (_formData$section$uui16 = formData[section.uuid]) === null || _formData$section$uui16 === void 0 ? void 0 : (_formData$section$uui17 = _formData$section$uui16[question.uuid]) === null || _formData$section$uui17 === void 0 ? void 0 : _formData$section$uui17.answerUuid);
|
|
20816
20918
|
}
|
|
20817
20919
|
}, /*#__PURE__*/React.createElement("option", {
|
|
20818
20920
|
value: ""
|
|
20819
20921
|
}, "--Please choose an option--"), question.options.map((option, index) => /*#__PURE__*/React.createElement("option", {
|
|
20820
20922
|
key: index,
|
|
20821
20923
|
value: option === null || option === void 0 ? void 0 : option.optionText
|
|
20822
|
-
}, option === null || option === void 0 ? void 0 : option.optionText))), errors && (errors === null || errors === void 0 ? void 0 : errors[section.uuid]) && (errors === null || errors === void 0 ? void 0 : (_errors$section$
|
|
20924
|
+
}, option === null || option === void 0 ? void 0 : option.optionText))), errors && (errors === null || errors === void 0 ? void 0 : errors[section.uuid]) && (errors === null || errors === void 0 ? void 0 : (_errors$section$uuid24 = errors[section.uuid]) === null || _errors$section$uuid24 === void 0 ? void 0 : (_errors$section$uuid25 = _errors$section$uuid24[question.uuid]) === null || _errors$section$uuid25 === void 0 ? void 0 : _errors$section$uuid25.answerRequired) && /*#__PURE__*/React.createElement(CardLabelError$2, {
|
|
20823
20925
|
style: {
|
|
20824
20926
|
marginTop: "0px",
|
|
20825
20927
|
marginBottom: "0px",
|
|
20826
20928
|
color: "red",
|
|
20827
20929
|
fontWeight: "500"
|
|
20828
20930
|
}
|
|
20829
|
-
}, errors === null || errors === void 0 ? void 0 : (_errors$section$
|
|
20931
|
+
}, errors === null || errors === void 0 ? void 0 : (_errors$section$uuid26 = errors[section.uuid]) === null || _errors$section$uuid26 === void 0 ? void 0 : (_errors$section$uuid27 = _errors$section$uuid26[question.uuid]) === null || _errors$section$uuid27 === void 0 ? void 0 : _errors$section$uuid27.answerRequired), errors && (errors === null || errors === void 0 ? void 0 : errors[section.uuid]) && (errors === null || errors === void 0 ? void 0 : (_errors$section$uuid28 = errors[section.uuid]) === null || _errors$section$uuid28 === void 0 ? void 0 : (_errors$section$uuid29 = _errors$section$uuid28[question.uuid]) === null || _errors$section$uuid29 === void 0 ? void 0 : _errors$section$uuid29.answerLength) && /*#__PURE__*/React.createElement(CardLabelError$2, {
|
|
20830
20932
|
style: {
|
|
20831
20933
|
marginTop: "0px",
|
|
20832
20934
|
marginBottom: "0px",
|
|
20833
20935
|
color: "red",
|
|
20834
20936
|
fontWeight: "500"
|
|
20835
20937
|
}
|
|
20836
|
-
}, errors === null || errors === void 0 ? void 0 : (_errors$section$
|
|
20938
|
+
}, errors === null || errors === void 0 ? void 0 : (_errors$section$uuid30 = errors[section.uuid]) === null || _errors$section$uuid30 === void 0 ? void 0 : (_errors$section$uuid31 = _errors$section$uuid30[question.uuid]) === null || _errors$section$uuid31 === void 0 ? void 0 : _errors$section$uuid31.answerLength), /*#__PURE__*/React.createElement("div", null, " ", "Add Suggestions/Comments"), /*#__PURE__*/React.createElement(TextArea$1, {
|
|
20837
20939
|
name: question.uuid,
|
|
20838
|
-
value: (_formData$section$
|
|
20940
|
+
value: (_formData$section$uui18 = formData[section.uuid]) === null || _formData$section$uui18 === void 0 ? void 0 : (_formData$section$uui19 = _formData$section$uui18[question.uuid]) === null || _formData$section$uui19 === void 0 ? void 0 : _formData$section$uui19.comments,
|
|
20839
20941
|
maxLength: 500,
|
|
20840
20942
|
style: {
|
|
20841
20943
|
maxWidth: "none",
|
|
@@ -20848,14 +20950,14 @@ const FillQuestions = props => {
|
|
|
20848
20950
|
message: t("EXCEEDS_500_CHAR_LIMIT")
|
|
20849
20951
|
}
|
|
20850
20952
|
})
|
|
20851
|
-
}), errors && (errors === null || errors === void 0 ? void 0 : errors[section.uuid]) && (errors === null || errors === void 0 ? void 0 : (_errors$section$
|
|
20953
|
+
}), errors && (errors === null || errors === void 0 ? void 0 : errors[section.uuid]) && (errors === null || errors === void 0 ? void 0 : (_errors$section$uuid32 = errors[section.uuid]) === null || _errors$section$uuid32 === void 0 ? void 0 : (_errors$section$uuid33 = _errors$section$uuid32[question.uuid]) === null || _errors$section$uuid33 === void 0 ? void 0 : _errors$section$uuid33.commentsLength) && /*#__PURE__*/React.createElement(CardLabelError$2, {
|
|
20852
20954
|
style: {
|
|
20853
20955
|
marginTop: "0px",
|
|
20854
20956
|
marginBottom: "0px",
|
|
20855
20957
|
color: "red",
|
|
20856
20958
|
fontWeight: "500"
|
|
20857
20959
|
}
|
|
20858
|
-
}, errors === null || errors === void 0 ? void 0 : (_errors$section$
|
|
20960
|
+
}, errors === null || errors === void 0 ? void 0 : (_errors$section$uuid34 = errors[section.uuid]) === null || _errors$section$uuid34 === void 0 ? void 0 : (_errors$section$uuid35 = _errors$section$uuid34[question.uuid]) === null || _errors$section$uuid35 === void 0 ? void 0 : _errors$section$uuid35.commentsLength));
|
|
20859
20961
|
case "MULTIPLE_ANSWER_TYPE":
|
|
20860
20962
|
return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement("div", {
|
|
20861
20963
|
style: {
|
|
@@ -20863,7 +20965,7 @@ const FillQuestions = props => {
|
|
|
20863
20965
|
flexDirection: "column"
|
|
20864
20966
|
}
|
|
20865
20967
|
}, question.options.map(option => {
|
|
20866
|
-
var _formData$section$
|
|
20968
|
+
var _formData$section$uui20, _formData$section$uui21;
|
|
20867
20969
|
return /*#__PURE__*/React.createElement("h4", {
|
|
20868
20970
|
key: option === null || option === void 0 ? void 0 : option.uuid,
|
|
20869
20971
|
style: {
|
|
@@ -20876,10 +20978,10 @@ const FillQuestions = props => {
|
|
|
20876
20978
|
type: "radio",
|
|
20877
20979
|
name: question.uuid,
|
|
20878
20980
|
value: option === null || option === void 0 ? void 0 : option.optionText,
|
|
20879
|
-
checked: ((_formData$section$
|
|
20981
|
+
checked: ((_formData$section$uui20 = formData[section.uuid]) === null || _formData$section$uui20 === void 0 ? void 0 : (_formData$section$uui21 = _formData$section$uui20[question.uuid]) === null || _formData$section$uui21 === void 0 ? void 0 : _formData$section$uui21.answer) === option.optionText,
|
|
20880
20982
|
onChange: e => {
|
|
20881
|
-
var _formData$section$
|
|
20882
|
-
return handleInputChange(section.uuid, question.uuid, question.type, option.weightage, e.target.value, (_formData$section$
|
|
20983
|
+
var _formData$section$uui22, _formData$section$uui23;
|
|
20984
|
+
return handleInputChange(section.uuid, question.uuid, question.type, option.weightage, e.target.value, (_formData$section$uui22 = formData[section.uuid]) === null || _formData$section$uui22 === void 0 ? void 0 : (_formData$section$uui23 = _formData$section$uui22[question.uuid]) === null || _formData$section$uui23 === void 0 ? void 0 : _formData$section$uui23.answerUuid);
|
|
20883
20985
|
},
|
|
20884
20986
|
required: true,
|
|
20885
20987
|
style: {
|
|
@@ -20888,23 +20990,23 @@ const FillQuestions = props => {
|
|
|
20888
20990
|
height: "25px"
|
|
20889
20991
|
}
|
|
20890
20992
|
}), option === null || option === void 0 ? void 0 : option.optionText);
|
|
20891
|
-
})), errors && (errors === null || errors === void 0 ? void 0 : errors[section.uuid]) && (errors === null || errors === void 0 ? void 0 : (_errors$section$
|
|
20993
|
+
})), errors && (errors === null || errors === void 0 ? void 0 : errors[section.uuid]) && (errors === null || errors === void 0 ? void 0 : (_errors$section$uuid36 = errors[section.uuid]) === null || _errors$section$uuid36 === void 0 ? void 0 : (_errors$section$uuid37 = _errors$section$uuid36[question.uuid]) === null || _errors$section$uuid37 === void 0 ? void 0 : _errors$section$uuid37.answerRequired) && /*#__PURE__*/React.createElement(CardLabelError$2, {
|
|
20892
20994
|
style: {
|
|
20893
20995
|
marginTop: "0px",
|
|
20894
20996
|
marginBottom: "0px",
|
|
20895
20997
|
color: "red",
|
|
20896
20998
|
fontWeight: "500"
|
|
20897
20999
|
}
|
|
20898
|
-
}, errors === null || errors === void 0 ? void 0 : (_errors$section$
|
|
21000
|
+
}, errors === null || errors === void 0 ? void 0 : (_errors$section$uuid38 = errors[section.uuid]) === null || _errors$section$uuid38 === void 0 ? void 0 : (_errors$section$uuid39 = _errors$section$uuid38[question.uuid]) === null || _errors$section$uuid39 === void 0 ? void 0 : _errors$section$uuid39.answerRequired), errors && (errors === null || errors === void 0 ? void 0 : errors[section.uuid]) && (errors === null || errors === void 0 ? void 0 : (_errors$section$uuid40 = errors[section.uuid]) === null || _errors$section$uuid40 === void 0 ? void 0 : (_errors$section$uuid41 = _errors$section$uuid40[question.uuid]) === null || _errors$section$uuid41 === void 0 ? void 0 : _errors$section$uuid41.answerLength) && /*#__PURE__*/React.createElement(CardLabelError$2, {
|
|
20899
21001
|
style: {
|
|
20900
21002
|
marginTop: "0px",
|
|
20901
21003
|
marginBottom: "0px",
|
|
20902
21004
|
color: "red",
|
|
20903
21005
|
fontWeight: "500"
|
|
20904
21006
|
}
|
|
20905
|
-
}, errors === null || errors === void 0 ? void 0 : (_errors$section$
|
|
21007
|
+
}, errors === null || errors === void 0 ? void 0 : (_errors$section$uuid42 = errors[section.uuid]) === null || _errors$section$uuid42 === void 0 ? void 0 : (_errors$section$uuid43 = _errors$section$uuid42[question.uuid]) === null || _errors$section$uuid43 === void 0 ? void 0 : _errors$section$uuid43.answerLength), /*#__PURE__*/React.createElement("div", null, " ", "Add Suggestions/Comments"), /*#__PURE__*/React.createElement(TextArea$1, {
|
|
20906
21008
|
name: question.uuid,
|
|
20907
|
-
value: (_formData$section$
|
|
21009
|
+
value: (_formData$section$uui24 = formData[section.uuid]) === null || _formData$section$uui24 === void 0 ? void 0 : (_formData$section$uui25 = _formData$section$uui24[question.uuid]) === null || _formData$section$uui25 === void 0 ? void 0 : _formData$section$uui25.comments,
|
|
20908
21010
|
maxLength: 500,
|
|
20909
21011
|
style: {
|
|
20910
21012
|
maxWidth: "none",
|
|
@@ -20917,14 +21019,14 @@ const FillQuestions = props => {
|
|
|
20917
21019
|
message: t("EXCEEDS_500_CHAR_LIMIT")
|
|
20918
21020
|
}
|
|
20919
21021
|
})
|
|
20920
|
-
}), errors && (errors === null || errors === void 0 ? void 0 : errors[section.uuid]) && (errors === null || errors === void 0 ? void 0 : (_errors$section$
|
|
21022
|
+
}), errors && (errors === null || errors === void 0 ? void 0 : errors[section.uuid]) && (errors === null || errors === void 0 ? void 0 : (_errors$section$uuid44 = errors[section.uuid]) === null || _errors$section$uuid44 === void 0 ? void 0 : (_errors$section$uuid45 = _errors$section$uuid44[question.uuid]) === null || _errors$section$uuid45 === void 0 ? void 0 : _errors$section$uuid45.commentsLength) && /*#__PURE__*/React.createElement(CardLabelError$2, {
|
|
20921
21023
|
style: {
|
|
20922
21024
|
marginTop: "0px",
|
|
20923
21025
|
marginBottom: "0px",
|
|
20924
21026
|
color: "red",
|
|
20925
21027
|
fontWeight: "500"
|
|
20926
21028
|
}
|
|
20927
|
-
}, errors === null || errors === void 0 ? void 0 : (_errors$section$
|
|
21029
|
+
}, errors === null || errors === void 0 ? void 0 : (_errors$section$uuid46 = errors[section.uuid]) === null || _errors$section$uuid46 === void 0 ? void 0 : (_errors$section$uuid47 = _errors$section$uuid46[question.uuid]) === null || _errors$section$uuid47 === void 0 ? void 0 : _errors$section$uuid47.commentsLength));
|
|
20928
21030
|
case "CHECKBOX_ANSWER_TYPE":
|
|
20929
21031
|
return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement("div", {
|
|
20930
21032
|
style: {
|
|
@@ -20932,7 +21034,7 @@ const FillQuestions = props => {
|
|
|
20932
21034
|
flexDirection: "column"
|
|
20933
21035
|
}
|
|
20934
21036
|
}, question.options.map(option => {
|
|
20935
|
-
var _formData$section$
|
|
21037
|
+
var _formData$section$uui26, _formData$section$uui27;
|
|
20936
21038
|
return /*#__PURE__*/React.createElement("h4", {
|
|
20937
21039
|
key: option === null || option === void 0 ? void 0 : option.uuid,
|
|
20938
21040
|
style: {
|
|
@@ -20949,12 +21051,12 @@ const FillQuestions = props => {
|
|
|
20949
21051
|
},
|
|
20950
21052
|
type: "checkbox",
|
|
20951
21053
|
value: option === null || option === void 0 ? void 0 : option.optionText,
|
|
20952
|
-
checked: ((_formData$section$
|
|
21054
|
+
checked: ((_formData$section$uui26 = formData[section.uuid]) === null || _formData$section$uui26 === void 0 ? void 0 : (_formData$section$uui27 = _formData$section$uui26[question.uuid]) === null || _formData$section$uui27 === void 0 ? void 0 : _formData$section$uui27.answer.includes(option.optionText)) || false,
|
|
20953
21055
|
onChange: e => {
|
|
20954
21056
|
const value = e.target.value;
|
|
20955
21057
|
const checked = e.target.checked;
|
|
20956
21058
|
setFormData(prevData => {
|
|
20957
|
-
var _prevData$section$uui, _prevData$section$uui2, _prevData$section$uui3, _prevData$section$uui4, _formData$section$
|
|
21059
|
+
var _prevData$section$uui, _prevData$section$uui2, _prevData$section$uui3, _prevData$section$uui4, _formData$section$uui28, _formData$section$uui29;
|
|
20958
21060
|
const newValues = checked ? [...(((_prevData$section$uui = prevData[section.uuid]) === null || _prevData$section$uui === void 0 ? void 0 : (_prevData$section$uui2 = _prevData$section$uui[question.uuid]) === null || _prevData$section$uui2 === void 0 ? void 0 : _prevData$section$uui2.answer) || ""), value] : (((_prevData$section$uui3 = prevData[section.uuid]) === null || _prevData$section$uui3 === void 0 ? void 0 : (_prevData$section$uui4 = _prevData$section$uui3[question.uuid]) === null || _prevData$section$uui4 === void 0 ? void 0 : _prevData$section$uui4.answer) || "").filter(item => item !== value);
|
|
20959
21061
|
return {
|
|
20960
21062
|
...prevData,
|
|
@@ -20962,7 +21064,7 @@ const FillQuestions = props => {
|
|
|
20962
21064
|
...prevData[section.uuid],
|
|
20963
21065
|
[question.uuid]: {
|
|
20964
21066
|
answer: newValues,
|
|
20965
|
-
answerUuid: (_formData$section$
|
|
21067
|
+
answerUuid: (_formData$section$uui28 = formData[section.uuid]) === null || _formData$section$uui28 === void 0 ? void 0 : (_formData$section$uui29 = _formData$section$uui28[question.uuid]) === null || _formData$section$uui29 === void 0 ? void 0 : _formData$section$uui29.answerUuid,
|
|
20966
21068
|
answerType: question.type,
|
|
20967
21069
|
weightage: option.weightage
|
|
20968
21070
|
}
|
|
@@ -20971,23 +21073,23 @@ const FillQuestions = props => {
|
|
|
20971
21073
|
});
|
|
20972
21074
|
}
|
|
20973
21075
|
}), option.optionText);
|
|
20974
|
-
})), errors && (errors === null || errors === void 0 ? void 0 : errors[section.uuid]) && (errors === null || errors === void 0 ? void 0 : (_errors$section$
|
|
21076
|
+
})), errors && (errors === null || errors === void 0 ? void 0 : errors[section.uuid]) && (errors === null || errors === void 0 ? void 0 : (_errors$section$uuid48 = errors[section.uuid]) === null || _errors$section$uuid48 === void 0 ? void 0 : (_errors$section$uuid49 = _errors$section$uuid48[question.uuid]) === null || _errors$section$uuid49 === void 0 ? void 0 : _errors$section$uuid49.answerRequired) && /*#__PURE__*/React.createElement(CardLabelError$2, {
|
|
20975
21077
|
style: {
|
|
20976
21078
|
marginTop: "0px",
|
|
20977
21079
|
marginBottom: "0px",
|
|
20978
21080
|
color: "red",
|
|
20979
21081
|
fontWeight: "500"
|
|
20980
21082
|
}
|
|
20981
|
-
}, errors === null || errors === void 0 ? void 0 : (_errors$section$
|
|
21083
|
+
}, errors === null || errors === void 0 ? void 0 : (_errors$section$uuid50 = errors[section.uuid]) === null || _errors$section$uuid50 === void 0 ? void 0 : (_errors$section$uuid51 = _errors$section$uuid50[question.uuid]) === null || _errors$section$uuid51 === void 0 ? void 0 : _errors$section$uuid51.answerRequired), errors && (errors === null || errors === void 0 ? void 0 : errors[section.uuid]) && (errors === null || errors === void 0 ? void 0 : (_errors$section$uuid52 = errors[section.uuid]) === null || _errors$section$uuid52 === void 0 ? void 0 : (_errors$section$uuid53 = _errors$section$uuid52[question.uuid]) === null || _errors$section$uuid53 === void 0 ? void 0 : _errors$section$uuid53.answerLength) && /*#__PURE__*/React.createElement(CardLabelError$2, {
|
|
20982
21084
|
style: {
|
|
20983
21085
|
marginTop: "0px",
|
|
20984
21086
|
marginBottom: "0px",
|
|
20985
21087
|
color: "red",
|
|
20986
21088
|
fontWeight: "500"
|
|
20987
21089
|
}
|
|
20988
|
-
}, errors === null || errors === void 0 ? void 0 : (_errors$section$
|
|
21090
|
+
}, errors === null || errors === void 0 ? void 0 : (_errors$section$uuid54 = errors[section.uuid]) === null || _errors$section$uuid54 === void 0 ? void 0 : (_errors$section$uuid55 = _errors$section$uuid54[question.uuid]) === null || _errors$section$uuid55 === void 0 ? void 0 : _errors$section$uuid55.answerLength), /*#__PURE__*/React.createElement("div", null, " ", "Add Suggestions/Comments"), /*#__PURE__*/React.createElement(TextArea$1, {
|
|
20989
21091
|
name: question.uuid,
|
|
20990
|
-
value: (_formData$section$
|
|
21092
|
+
value: (_formData$section$uui30 = formData[section.uuid]) === null || _formData$section$uui30 === void 0 ? void 0 : (_formData$section$uui31 = _formData$section$uui30[question.uuid]) === null || _formData$section$uui31 === void 0 ? void 0 : _formData$section$uui31.comments,
|
|
20991
21093
|
maxLength: 500,
|
|
20992
21094
|
style: {
|
|
20993
21095
|
maxWidth: "none",
|
|
@@ -21000,42 +21102,42 @@ const FillQuestions = props => {
|
|
|
21000
21102
|
message: t("EXCEEDS_500_CHAR_LIMIT")
|
|
21001
21103
|
}
|
|
21002
21104
|
})
|
|
21003
|
-
}), errors && (errors === null || errors === void 0 ? void 0 : errors[section.uuid]) && (errors === null || errors === void 0 ? void 0 : (_errors$section$
|
|
21105
|
+
}), errors && (errors === null || errors === void 0 ? void 0 : errors[section.uuid]) && (errors === null || errors === void 0 ? void 0 : (_errors$section$uuid56 = errors[section.uuid]) === null || _errors$section$uuid56 === void 0 ? void 0 : (_errors$section$uuid57 = _errors$section$uuid56[question.uuid]) === null || _errors$section$uuid57 === void 0 ? void 0 : _errors$section$uuid57.commentsLength) && /*#__PURE__*/React.createElement(CardLabelError$2, {
|
|
21004
21106
|
style: {
|
|
21005
21107
|
marginTop: "0px",
|
|
21006
21108
|
marginBottom: "0px",
|
|
21007
21109
|
color: "red",
|
|
21008
21110
|
fontWeight: "500"
|
|
21009
21111
|
}
|
|
21010
|
-
}, errors === null || errors === void 0 ? void 0 : (_errors$section$
|
|
21112
|
+
}, errors === null || errors === void 0 ? void 0 : (_errors$section$uuid58 = errors[section.uuid]) === null || _errors$section$uuid58 === void 0 ? void 0 : (_errors$section$uuid59 = _errors$section$uuid58[question.uuid]) === null || _errors$section$uuid59 === void 0 ? void 0 : _errors$section$uuid59.commentsLength));
|
|
21011
21113
|
case "DATE_ANSWER_TYPE":
|
|
21012
21114
|
return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(TextInput$1, {
|
|
21013
21115
|
type: "date",
|
|
21014
21116
|
textInputStyle: {
|
|
21015
21117
|
maxWidth: "none"
|
|
21016
21118
|
},
|
|
21017
|
-
value: (_formData$section$
|
|
21119
|
+
value: (_formData$section$uui32 = formData[section.uuid]) === null || _formData$section$uui32 === void 0 ? void 0 : (_formData$section$uui33 = _formData$section$uui32[question.uuid]) === null || _formData$section$uui33 === void 0 ? void 0 : _formData$section$uui33.answer,
|
|
21018
21120
|
onChange: e => {
|
|
21019
|
-
var _formData$section$
|
|
21020
|
-
return handleInputChange(section.uuid, question.uuid, question.type, null, e.target.value, (_formData$section$
|
|
21121
|
+
var _formData$section$uui34, _formData$section$uui35;
|
|
21122
|
+
return handleInputChange(section.uuid, question.uuid, question.type, null, e.target.value, (_formData$section$uui34 = formData[section.uuid]) === null || _formData$section$uui34 === void 0 ? void 0 : (_formData$section$uui35 = _formData$section$uui34[question.uuid]) === null || _formData$section$uui35 === void 0 ? void 0 : _formData$section$uui35.answerUuid);
|
|
21021
21123
|
}
|
|
21022
|
-
}), errors && (errors === null || errors === void 0 ? void 0 : errors[section.uuid]) && (errors === null || errors === void 0 ? void 0 : (_errors$section$
|
|
21124
|
+
}), errors && (errors === null || errors === void 0 ? void 0 : errors[section.uuid]) && (errors === null || errors === void 0 ? void 0 : (_errors$section$uuid60 = errors[section.uuid]) === null || _errors$section$uuid60 === void 0 ? void 0 : (_errors$section$uuid61 = _errors$section$uuid60[question.uuid]) === null || _errors$section$uuid61 === void 0 ? void 0 : _errors$section$uuid61.answerRequired) && /*#__PURE__*/React.createElement(CardLabelError$2, {
|
|
21023
21125
|
style: {
|
|
21024
21126
|
marginTop: "0px",
|
|
21025
21127
|
marginBottom: "0px",
|
|
21026
21128
|
color: "red",
|
|
21027
21129
|
fontWeight: "500"
|
|
21028
21130
|
}
|
|
21029
|
-
}, errors === null || errors === void 0 ? void 0 : (_errors$section$
|
|
21131
|
+
}, errors === null || errors === void 0 ? void 0 : (_errors$section$uuid62 = errors[section.uuid]) === null || _errors$section$uuid62 === void 0 ? void 0 : (_errors$section$uuid63 = _errors$section$uuid62[question.uuid]) === null || _errors$section$uuid63 === void 0 ? void 0 : _errors$section$uuid63.answerRequired), errors && (errors === null || errors === void 0 ? void 0 : errors[section.uuid]) && (errors === null || errors === void 0 ? void 0 : (_errors$section$uuid64 = errors[section.uuid]) === null || _errors$section$uuid64 === void 0 ? void 0 : (_errors$section$uuid65 = _errors$section$uuid64[question.uuid]) === null || _errors$section$uuid65 === void 0 ? void 0 : _errors$section$uuid65.answerLength) && /*#__PURE__*/React.createElement(CardLabelError$2, {
|
|
21030
21132
|
style: {
|
|
21031
21133
|
marginTop: "0px",
|
|
21032
21134
|
marginBottom: "0px",
|
|
21033
21135
|
color: "red",
|
|
21034
21136
|
fontWeight: "500"
|
|
21035
21137
|
}
|
|
21036
|
-
}, errors === null || errors === void 0 ? void 0 : (_errors$section$
|
|
21138
|
+
}, errors === null || errors === void 0 ? void 0 : (_errors$section$uuid66 = errors[section.uuid]) === null || _errors$section$uuid66 === void 0 ? void 0 : (_errors$section$uuid67 = _errors$section$uuid66[question.uuid]) === null || _errors$section$uuid67 === void 0 ? void 0 : _errors$section$uuid67.answerLength), /*#__PURE__*/React.createElement("div", null, " ", "Add Suggestions/Comments"), /*#__PURE__*/React.createElement(TextArea$1, {
|
|
21037
21139
|
name: question.uuid,
|
|
21038
|
-
value: (_formData$section$
|
|
21140
|
+
value: (_formData$section$uui36 = formData[section.uuid]) === null || _formData$section$uui36 === void 0 ? void 0 : (_formData$section$uui37 = _formData$section$uui36[question.uuid]) === null || _formData$section$uui37 === void 0 ? void 0 : _formData$section$uui37.comments,
|
|
21039
21141
|
maxLength: 500,
|
|
21040
21142
|
style: {
|
|
21041
21143
|
maxWidth: "none",
|
|
@@ -21048,42 +21150,42 @@ const FillQuestions = props => {
|
|
|
21048
21150
|
message: t("EXCEEDS_500_CHAR_LIMIT")
|
|
21049
21151
|
}
|
|
21050
21152
|
})
|
|
21051
|
-
}), errors && (errors === null || errors === void 0 ? void 0 : errors[section.uuid]) && (errors === null || errors === void 0 ? void 0 : (_errors$section$
|
|
21153
|
+
}), errors && (errors === null || errors === void 0 ? void 0 : errors[section.uuid]) && (errors === null || errors === void 0 ? void 0 : (_errors$section$uuid68 = errors[section.uuid]) === null || _errors$section$uuid68 === void 0 ? void 0 : (_errors$section$uuid69 = _errors$section$uuid68[question.uuid]) === null || _errors$section$uuid69 === void 0 ? void 0 : _errors$section$uuid69.commentsLength) && /*#__PURE__*/React.createElement(CardLabelError$2, {
|
|
21052
21154
|
style: {
|
|
21053
21155
|
marginTop: "0px",
|
|
21054
21156
|
marginBottom: "0px",
|
|
21055
21157
|
color: "red",
|
|
21056
21158
|
fontWeight: "500"
|
|
21057
21159
|
}
|
|
21058
|
-
}, errors === null || errors === void 0 ? void 0 : (_errors$section$
|
|
21160
|
+
}, errors === null || errors === void 0 ? void 0 : (_errors$section$uuid70 = errors[section.uuid]) === null || _errors$section$uuid70 === void 0 ? void 0 : (_errors$section$uuid71 = _errors$section$uuid70[question.uuid]) === null || _errors$section$uuid71 === void 0 ? void 0 : _errors$section$uuid71.commentsLength));
|
|
21059
21161
|
case "TIME_ANSWER_TYPE":
|
|
21060
21162
|
return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(TextInput$1, {
|
|
21061
21163
|
type: "time",
|
|
21062
21164
|
textInputStyle: {
|
|
21063
21165
|
maxWidth: "none"
|
|
21064
21166
|
},
|
|
21065
|
-
value: (_formData$section$
|
|
21167
|
+
value: (_formData$section$uui38 = formData[section.uuid]) === null || _formData$section$uui38 === void 0 ? void 0 : (_formData$section$uui39 = _formData$section$uui38[question.uuid]) === null || _formData$section$uui39 === void 0 ? void 0 : _formData$section$uui39.answer,
|
|
21066
21168
|
onChange: e => {
|
|
21067
|
-
var _formData$section$
|
|
21068
|
-
return handleInputChange(section.uuid, question.uuid, question.type, null, e.target.value, (_formData$section$
|
|
21169
|
+
var _formData$section$uui40, _formData$section$uui41;
|
|
21170
|
+
return handleInputChange(section.uuid, question.uuid, question.type, null, e.target.value, (_formData$section$uui40 = formData[section.uuid]) === null || _formData$section$uui40 === void 0 ? void 0 : (_formData$section$uui41 = _formData$section$uui40[question.uuid]) === null || _formData$section$uui41 === void 0 ? void 0 : _formData$section$uui41.answerUuid);
|
|
21069
21171
|
}
|
|
21070
|
-
}), errors && (errors === null || errors === void 0 ? void 0 : errors[section.uuid]) && (errors === null || errors === void 0 ? void 0 : (_errors$section$
|
|
21172
|
+
}), errors && (errors === null || errors === void 0 ? void 0 : errors[section.uuid]) && (errors === null || errors === void 0 ? void 0 : (_errors$section$uuid72 = errors[section.uuid]) === null || _errors$section$uuid72 === void 0 ? void 0 : (_errors$section$uuid73 = _errors$section$uuid72[question.uuid]) === null || _errors$section$uuid73 === void 0 ? void 0 : _errors$section$uuid73.answerRequired) && /*#__PURE__*/React.createElement(CardLabelError$2, {
|
|
21071
21173
|
style: {
|
|
21072
21174
|
marginTop: "0px",
|
|
21073
21175
|
marginBottom: "0px",
|
|
21074
21176
|
color: "red",
|
|
21075
21177
|
fontWeight: "500"
|
|
21076
21178
|
}
|
|
21077
|
-
}, errors === null || errors === void 0 ? void 0 : (_errors$section$
|
|
21179
|
+
}, errors === null || errors === void 0 ? void 0 : (_errors$section$uuid74 = errors[section.uuid]) === null || _errors$section$uuid74 === void 0 ? void 0 : (_errors$section$uuid75 = _errors$section$uuid74[question.uuid]) === null || _errors$section$uuid75 === void 0 ? void 0 : _errors$section$uuid75.answerRequired), errors && (errors === null || errors === void 0 ? void 0 : errors[section.uuid]) && (errors === null || errors === void 0 ? void 0 : (_errors$section$uuid76 = errors[section.uuid]) === null || _errors$section$uuid76 === void 0 ? void 0 : (_errors$section$uuid77 = _errors$section$uuid76[question.uuid]) === null || _errors$section$uuid77 === void 0 ? void 0 : _errors$section$uuid77.answerLength) && /*#__PURE__*/React.createElement(CardLabelError$2, {
|
|
21078
21180
|
style: {
|
|
21079
21181
|
marginTop: "0px",
|
|
21080
21182
|
marginBottom: "0px",
|
|
21081
21183
|
color: "red",
|
|
21082
21184
|
fontWeight: "500"
|
|
21083
21185
|
}
|
|
21084
|
-
}, errors === null || errors === void 0 ? void 0 : (_errors$section$
|
|
21186
|
+
}, errors === null || errors === void 0 ? void 0 : (_errors$section$uuid78 = errors[section.uuid]) === null || _errors$section$uuid78 === void 0 ? void 0 : (_errors$section$uuid79 = _errors$section$uuid78[question.uuid]) === null || _errors$section$uuid79 === void 0 ? void 0 : _errors$section$uuid79.answerLength), /*#__PURE__*/React.createElement("div", null, " ", "Add Suggestions/Comments"), /*#__PURE__*/React.createElement(TextArea$1, {
|
|
21085
21187
|
name: question.uuid,
|
|
21086
|
-
value: (_formData$section$
|
|
21188
|
+
value: (_formData$section$uui42 = formData[section.uuid]) === null || _formData$section$uui42 === void 0 ? void 0 : (_formData$section$uui43 = _formData$section$uui42[question.uuid]) === null || _formData$section$uui43 === void 0 ? void 0 : _formData$section$uui43.comments,
|
|
21087
21189
|
maxLength: 500,
|
|
21088
21190
|
style: {
|
|
21089
21191
|
maxWidth: "none",
|
|
@@ -21096,14 +21198,14 @@ const FillQuestions = props => {
|
|
|
21096
21198
|
message: t("EXCEEDS_500_CHAR_LIMIT")
|
|
21097
21199
|
}
|
|
21098
21200
|
})
|
|
21099
|
-
}), errors && (errors === null || errors === void 0 ? void 0 : errors[section.uuid]) && (errors === null || errors === void 0 ? void 0 : (_errors$section$
|
|
21201
|
+
}), errors && (errors === null || errors === void 0 ? void 0 : errors[section.uuid]) && (errors === null || errors === void 0 ? void 0 : (_errors$section$uuid80 = errors[section.uuid]) === null || _errors$section$uuid80 === void 0 ? void 0 : (_errors$section$uuid81 = _errors$section$uuid80[question.uuid]) === null || _errors$section$uuid81 === void 0 ? void 0 : _errors$section$uuid81.commentsLength) && /*#__PURE__*/React.createElement(CardLabelError$2, {
|
|
21100
21202
|
style: {
|
|
21101
21203
|
marginTop: "0px",
|
|
21102
21204
|
marginBottom: "0px",
|
|
21103
21205
|
color: "red",
|
|
21104
21206
|
fontWeight: "500"
|
|
21105
21207
|
}
|
|
21106
|
-
}, errors === null || errors === void 0 ? void 0 : (_errors$section$
|
|
21208
|
+
}, errors === null || errors === void 0 ? void 0 : (_errors$section$uuid82 = errors[section.uuid]) === null || _errors$section$uuid82 === void 0 ? void 0 : (_errors$section$uuid83 = _errors$section$uuid82[question.uuid]) === null || _errors$section$uuid83 === void 0 ? void 0 : _errors$section$uuid83.commentsLength));
|
|
21107
21209
|
default:
|
|
21108
21210
|
return /*#__PURE__*/React.createElement(TextInput$1, {
|
|
21109
21211
|
name: question.uuid,
|
|
@@ -21138,6 +21240,7 @@ const FillQuestions = props => {
|
|
|
21138
21240
|
}
|
|
21139
21241
|
}
|
|
21140
21242
|
}, [getFetchAnswers]);
|
|
21243
|
+
console.log("city", city);
|
|
21141
21244
|
const handleLocalityChangeCitizen = e => {
|
|
21142
21245
|
setLocality(e.target.value);
|
|
21143
21246
|
};
|
|
@@ -22789,19 +22892,23 @@ const SearchFormFieldsComponents = ({
|
|
|
22789
22892
|
isLoading
|
|
22790
22893
|
} = Digit.Hooks.useTenants();
|
|
22791
22894
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
22792
|
-
const userInfo = Digit.
|
|
22895
|
+
const userInfo = Digit.UserService.getUser().info;
|
|
22793
22896
|
let isTenantFound = true;
|
|
22794
22897
|
let userUlbs = ulbs.filter(ulb => {
|
|
22795
22898
|
var _userInfo$info, _userInfo$info$roles;
|
|
22796
22899
|
return userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info = userInfo.info) === null || _userInfo$info === void 0 ? void 0 : (_userInfo$info$roles = _userInfo$info.roles) === null || _userInfo$info$roles === void 0 ? void 0 : _userInfo$info$roles.some(role => (role === null || role === void 0 ? void 0 : role.tenantId) === (ulb === null || ulb === void 0 ? void 0 : ulb.code));
|
|
22797
22900
|
}).sort(alphabeticalSortFunctionForTenantsBasedOnName);
|
|
22798
|
-
if (((_userUlbs = userUlbs) === null || _userUlbs === void 0 ? void 0 : _userUlbs.length) === 0) {
|
|
22799
|
-
var _userInfo$info2;
|
|
22901
|
+
if (((_userUlbs = userUlbs) === null || _userUlbs === void 0 ? void 0 : _userUlbs.length) === 0 || tenantId === "pb.punjab") {
|
|
22800
22902
|
isTenantFound = false;
|
|
22801
|
-
|
|
22802
|
-
i18nKey: `TENANT_TENANTS_${userInfo === null || userInfo === void 0 ? void 0 :
|
|
22803
|
-
code: `${userInfo === null || userInfo === void 0 ? void 0 : userInfo.
|
|
22804
|
-
}
|
|
22903
|
+
let adduserUlbs = {
|
|
22904
|
+
i18nKey: `TENANT_TENANTS_${userInfo === null || userInfo === void 0 ? void 0 : userInfo.tenantId.replace(".", "_").toUpperCase()}`,
|
|
22905
|
+
code: `${userInfo === null || userInfo === void 0 ? void 0 : userInfo.tenantId}`
|
|
22906
|
+
};
|
|
22907
|
+
if (tenantId === "pb.punjab") {
|
|
22908
|
+
userUlbs = [adduserUlbs, ...ulbs];
|
|
22909
|
+
} else {
|
|
22910
|
+
userUlbs = [adduserUlbs];
|
|
22911
|
+
}
|
|
22805
22912
|
}
|
|
22806
22913
|
const selectedTenat = useMemo(() => {
|
|
22807
22914
|
var _userUlbs2;
|
|
@@ -22941,8 +23048,8 @@ const useInboxTableConfig = ({
|
|
|
22941
23048
|
Cell: ({
|
|
22942
23049
|
row
|
|
22943
23050
|
}) => {
|
|
22944
|
-
var _row$
|
|
22945
|
-
return (_row$
|
|
23051
|
+
var _row$original10, _row$original10$audit, _row$original11, _row$original11$audit;
|
|
23052
|
+
return (_row$original10 = row.original) !== null && _row$original10 !== void 0 && (_row$original10$audit = _row$original10.auditDetails) !== null && _row$original10$audit !== void 0 && _row$original10$audit.createdTime ? GetCell(format(new Date((_row$original11 = row.original) === null || _row$original11 === void 0 ? void 0 : (_row$original11$audit = _row$original11.auditDetails) === null || _row$original11$audit === void 0 ? void 0 : _row$original11$audit.createdTime), "dd/MM/yyyy")) : "";
|
|
22946
23053
|
}
|
|
22947
23054
|
}, {
|
|
22948
23055
|
Header: t("Last Updated On"),
|
|
@@ -22950,8 +23057,8 @@ const useInboxTableConfig = ({
|
|
|
22950
23057
|
Cell: ({
|
|
22951
23058
|
row
|
|
22952
23059
|
}) => {
|
|
22953
|
-
var _row$
|
|
22954
|
-
return (_row$
|
|
23060
|
+
var _row$original12, _row$original12$audit, _row$original13, _row$original13$audit;
|
|
23061
|
+
return (_row$original12 = row.original) !== null && _row$original12 !== void 0 && (_row$original12$audit = _row$original12.auditDetails) !== null && _row$original12$audit !== void 0 && _row$original12$audit.lastModifiedTime ? GetCell(format(new Date((_row$original13 = row.original) === null || _row$original13 === void 0 ? void 0 : (_row$original13$audit = _row$original13.auditDetails) === null || _row$original13$audit === void 0 ? void 0 : _row$original13$audit.lastModifiedTime), "dd/MM/yyyy")) : "";
|
|
22955
23062
|
}
|
|
22956
23063
|
}, {
|
|
22957
23064
|
Header: t("Update Survey Status"),
|
|
@@ -22959,8 +23066,8 @@ const useInboxTableConfig = ({
|
|
|
22959
23066
|
Cell: ({
|
|
22960
23067
|
row
|
|
22961
23068
|
}) => {
|
|
22962
|
-
var _row$
|
|
22963
|
-
return (row === null || row === void 0 ? void 0 : (_row$
|
|
23069
|
+
var _row$original14, _userInfo$info;
|
|
23070
|
+
return (row === null || row === void 0 ? void 0 : (_row$original14 = row.original) === null || _row$original14 === void 0 ? void 0 : _row$original14.tenantId) === (userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info = userInfo.info) === null || _userInfo$info === void 0 ? void 0 : _userInfo$info.tenantId) ? /*#__PURE__*/React.createElement("div", {
|
|
22964
23071
|
className: "tooltip"
|
|
22965
23072
|
}, /*#__PURE__*/React.createElement("div", {
|
|
22966
23073
|
style: {
|
|
@@ -25598,8 +25705,8 @@ const useQuestionsInboxTableConfig = ({
|
|
|
25598
25705
|
Cell: ({
|
|
25599
25706
|
row
|
|
25600
25707
|
}) => {
|
|
25601
|
-
var _row$original9, _row$original9$auditD, _row$
|
|
25602
|
-
return (_row$original9 = row.original) !== null && _row$original9 !== void 0 && (_row$original9$auditD = _row$original9.auditDetails) !== null && _row$original9$auditD !== void 0 && _row$original9$auditD.lastModifiedTime ? GetCell(format(new Date((_row$
|
|
25708
|
+
var _row$original9, _row$original9$auditD, _row$original10, _row$original10$audit;
|
|
25709
|
+
return (_row$original9 = row.original) !== null && _row$original9 !== void 0 && (_row$original9$auditD = _row$original9.auditDetails) !== null && _row$original9$auditD !== void 0 && _row$original9$auditD.lastModifiedTime ? GetCell(format(new Date((_row$original10 = row.original) === null || _row$original10 === void 0 ? void 0 : (_row$original10$audit = _row$original10.auditDetails) === null || _row$original10$audit === void 0 ? void 0 : _row$original10$audit.lastModifiedTime), "dd/MM/yyyy")) : "";
|
|
25603
25710
|
}
|
|
25604
25711
|
}, {
|
|
25605
25712
|
Header: t("Update Question Status"),
|