@djb25/digit-ui-module-ws 1.0.88 → 1.0.90
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 +862 -424
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +864 -426
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useState, useMemo, useEffect, useRef, Fragment as Fragment$1, useReducer, useCallback } from 'react';
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
3
|
import { Link, useHistory, useLocation, Switch, Route, useRouteMatch, Redirect, useParams } from 'react-router-dom';
|
|
4
|
-
import { Loader, Card, KeyNote, SubmitBar, InfoBannerIcon, SearchForm, SearchField, Dropdown, TextInput, Table, Banner, CardText, ActionBar, HomeIcon, AppContainer, ModuleHeader, ArrowLeft, PrivateRoute, LayoutWrapper, VerticalTimeline, CollapsibleCardPage, LabelFieldPair, CardLabel, CardLabelError, CheckBox, PrintBtnCommon, MultiLink, LinkButton,
|
|
4
|
+
import { Loader, Card, KeyNote, SubmitBar, InfoBannerIcon, SearchForm, SearchField, Dropdown, TextInput, Table, Banner, CardText, ActionBar, HomeIcon, AppContainer, ModuleHeader, ArrowLeft, PrivateRoute, LayoutWrapper, VerticalTimeline, CollapsibleCardPage, LabelFieldPair, CardLabel, CardLabelError, CheckBox, CardSubHeader, StatusTable, Row, Menu, Modal, TextArea, Toast, PrintBtnCommon, MultiLink, LinkButton, TickMark, FormStep, RadioOrSelect, CardHeader, CitizenInfoLabel, DatePicker, RadioButtons, UploadFile, ViewsIcon, DeleteIcon, WrapUnMaskComponent, MobileNumber, RemoveIcon, CardSectionHeader, InfoIcon, Header, FilterFormField, RemoveableTag as RemoveableTag$1, MultiSelectDropdown, InboxComposer, DropIcon, WSICon, EmployeeModuleCard, SearchAction, PopUp, DetailsCard, CloseSvg, Localities, DownloadBtnCommon, CollectionIcon, ResponseComposer, TelePhone, DisplayPhotos, PDFSvg, GenericFileIcon, EditIcon, Label, OTPInput, CardSectionSubText, DownloadIcon, CardLabelDesc, FormComposer, MultiUploadWrapper, Close as Close$g, BreakLine, CheckPoint, ConnectingCheckPoints, ButtonSelector as ButtonSelector$1, CitizenHomeCard } from '@djb25/digit-ui-react-components';
|
|
5
5
|
import { useForm, Controller, useWatch, useFormContext } from 'react-hook-form';
|
|
6
6
|
import { read, utils as utils$1 } from 'xlsx';
|
|
7
7
|
import { useQueryClient, useQuery } from 'react-query';
|
|
@@ -8272,8 +8272,8 @@ const WSMyApplications = () => {
|
|
|
8272
8272
|
};
|
|
8273
8273
|
});
|
|
8274
8274
|
const sortedApplications = ((_applicationsList = applicationsList) === null || _applicationsList === void 0 ? void 0 : _applicationsList.length) > 0 ? applicationsList.sort((a, b) => {
|
|
8275
|
-
var _b$auditDetails, _a$auditDetails;
|
|
8276
|
-
return ((_b$auditDetails = b.auditDetails) === null || _b$auditDetails === void 0 ? void 0 : _b$auditDetails.lastModifiedTime) - ((_a$auditDetails = a.auditDetails) === null || _a$auditDetails === void 0 ? void 0 : _a$auditDetails.lastModifiedTime);
|
|
8275
|
+
var _b$auditDetails, _b$auditDetails2, _a$auditDetails, _a$auditDetails2;
|
|
8276
|
+
return (((_b$auditDetails = b.auditDetails) === null || _b$auditDetails === void 0 ? void 0 : _b$auditDetails.createdTime) || ((_b$auditDetails2 = b.auditDetails) === null || _b$auditDetails2 === void 0 ? void 0 : _b$auditDetails2.lastModifiedTime) || 0) - (((_a$auditDetails = a.auditDetails) === null || _a$auditDetails === void 0 ? void 0 : _a$auditDetails.createdTime) || ((_a$auditDetails2 = a.auditDetails) === null || _a$auditDetails2 === void 0 ? void 0 : _a$auditDetails2.lastModifiedTime) || 0);
|
|
8277
8277
|
}) : [];
|
|
8278
8278
|
let filteredApplications = sortedApplications;
|
|
8279
8279
|
if (searchParams) {
|
|
@@ -10789,6 +10789,353 @@ const WSCalculation = _ref => {
|
|
|
10789
10789
|
})));
|
|
10790
10790
|
};
|
|
10791
10791
|
|
|
10792
|
+
const WSZROVerification = () => {
|
|
10793
|
+
const {
|
|
10794
|
+
t
|
|
10795
|
+
} = useTranslation();
|
|
10796
|
+
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
10797
|
+
const {
|
|
10798
|
+
isLoading,
|
|
10799
|
+
data
|
|
10800
|
+
} = Digit.Hooks.ws.useWSZROVerification({
|
|
10801
|
+
tenantId,
|
|
10802
|
+
filters: {
|
|
10803
|
+
status: "PENDING",
|
|
10804
|
+
offset: 0,
|
|
10805
|
+
limit: 20
|
|
10806
|
+
},
|
|
10807
|
+
config: {
|
|
10808
|
+
select: res => (res === null || res === void 0 ? void 0 : res.cases) || []
|
|
10809
|
+
}
|
|
10810
|
+
});
|
|
10811
|
+
const columns = React.useMemo(() => [{
|
|
10812
|
+
Header: t("WS_CONNECTION_NO_LABEL"),
|
|
10813
|
+
accessor: "connectionNo",
|
|
10814
|
+
Cell: _ref => {
|
|
10815
|
+
var _row$original, _row$original2;
|
|
10816
|
+
let {
|
|
10817
|
+
row
|
|
10818
|
+
} = _ref;
|
|
10819
|
+
return /*#__PURE__*/React.createElement(Link, {
|
|
10820
|
+
to: {
|
|
10821
|
+
pathname: `/digit-ui/employee/ws/zro-verification-details`,
|
|
10822
|
+
search: `?connectionNumber=${(_row$original = row.original) === null || _row$original === void 0 ? void 0 : _row$original.connectionNo}&tenantId=${tenantId}`,
|
|
10823
|
+
state: {
|
|
10824
|
+
caseData: row.original
|
|
10825
|
+
}
|
|
10826
|
+
},
|
|
10827
|
+
style: {
|
|
10828
|
+
color: "#f47738",
|
|
10829
|
+
textDecoration: "none"
|
|
10830
|
+
}
|
|
10831
|
+
}, ((_row$original2 = row.original) === null || _row$original2 === void 0 ? void 0 : _row$original2.connectionNo) || "NA");
|
|
10832
|
+
}
|
|
10833
|
+
}, {
|
|
10834
|
+
Header: t("WS_BILLING_PERIOD_LABEL"),
|
|
10835
|
+
Cell: _ref2 => {
|
|
10836
|
+
var _row$original3, _row$original4;
|
|
10837
|
+
let {
|
|
10838
|
+
row
|
|
10839
|
+
} = _ref2;
|
|
10840
|
+
const from = (_row$original3 = row.original) !== null && _row$original3 !== void 0 && _row$original3.billingPeriodFrom ? Digit.DateUtils.ConvertTimestampToDate(row.original.billingPeriodFrom) : "NA";
|
|
10841
|
+
const to = (_row$original4 = row.original) !== null && _row$original4 !== void 0 && _row$original4.billingPeriodTo ? Digit.DateUtils.ConvertTimestampToDate(row.original.billingPeriodTo) : "NA";
|
|
10842
|
+
return /*#__PURE__*/React.createElement("span", null, `${from} - ${to}`);
|
|
10843
|
+
}
|
|
10844
|
+
}, {
|
|
10845
|
+
Header: t("WS_PREVIOUS_READING_LABEL"),
|
|
10846
|
+
accessor: "previousReading",
|
|
10847
|
+
Cell: _ref3 => {
|
|
10848
|
+
var _row$original5;
|
|
10849
|
+
let {
|
|
10850
|
+
row
|
|
10851
|
+
} = _ref3;
|
|
10852
|
+
return ((_row$original5 = row.original) === null || _row$original5 === void 0 ? void 0 : _row$original5.previousReading) ?? "NA";
|
|
10853
|
+
}
|
|
10854
|
+
}, {
|
|
10855
|
+
Header: t("WS_CURRENT_READING_LABEL"),
|
|
10856
|
+
accessor: "currentReading",
|
|
10857
|
+
Cell: _ref4 => {
|
|
10858
|
+
var _row$original6;
|
|
10859
|
+
let {
|
|
10860
|
+
row
|
|
10861
|
+
} = _ref4;
|
|
10862
|
+
return ((_row$original6 = row.original) === null || _row$original6 === void 0 ? void 0 : _row$original6.currentReading) ?? "NA";
|
|
10863
|
+
}
|
|
10864
|
+
}, {
|
|
10865
|
+
Header: t("WS_CONSUMPTION_LABEL"),
|
|
10866
|
+
accessor: "actualConsumption",
|
|
10867
|
+
Cell: _ref5 => {
|
|
10868
|
+
var _row$original7;
|
|
10869
|
+
let {
|
|
10870
|
+
row
|
|
10871
|
+
} = _ref5;
|
|
10872
|
+
return ((_row$original7 = row.original) === null || _row$original7 === void 0 ? void 0 : _row$original7.actualConsumption) ?? "NA";
|
|
10873
|
+
}
|
|
10874
|
+
}, {
|
|
10875
|
+
Header: t("WS_COMMON_TABLE_COL_APP_STATUS_LABEL"),
|
|
10876
|
+
accessor: "verification.status",
|
|
10877
|
+
Cell: _ref6 => {
|
|
10878
|
+
var _row$original8, _row$original8$verifi;
|
|
10879
|
+
let {
|
|
10880
|
+
row
|
|
10881
|
+
} = _ref6;
|
|
10882
|
+
return (_row$original8 = row.original) !== null && _row$original8 !== void 0 && (_row$original8$verifi = _row$original8.verification) !== null && _row$original8$verifi !== void 0 && _row$original8$verifi.status ? t(`WS_ZRO_STATUS_${row.original.verification.status}`) : "NA";
|
|
10883
|
+
}
|
|
10884
|
+
}], [t]);
|
|
10885
|
+
if (isLoading) {
|
|
10886
|
+
return /*#__PURE__*/React.createElement(Loader, null);
|
|
10887
|
+
}
|
|
10888
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Table, {
|
|
10889
|
+
t: t,
|
|
10890
|
+
data: data || [],
|
|
10891
|
+
totalRecords: (data === null || data === void 0 ? void 0 : data.length) || 0,
|
|
10892
|
+
isLoading: isLoading,
|
|
10893
|
+
isPaginationRequired: true,
|
|
10894
|
+
csvExportData: data,
|
|
10895
|
+
columns: columns
|
|
10896
|
+
}));
|
|
10897
|
+
};
|
|
10898
|
+
|
|
10899
|
+
const Heading = props => {
|
|
10900
|
+
return /*#__PURE__*/React.createElement("h1", {
|
|
10901
|
+
className: "heading-m"
|
|
10902
|
+
}, props.label);
|
|
10903
|
+
};
|
|
10904
|
+
const Close = () => /*#__PURE__*/React.createElement("svg", {
|
|
10905
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10906
|
+
viewBox: "0 0 24 24",
|
|
10907
|
+
fill: "#FFFFFF"
|
|
10908
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
10909
|
+
d: "M0 0h24v24H0V0z",
|
|
10910
|
+
fill: "none"
|
|
10911
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
10912
|
+
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
|
|
10913
|
+
}));
|
|
10914
|
+
const CloseBtn = props => {
|
|
10915
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
10916
|
+
className: "icon-bg-secondary",
|
|
10917
|
+
onClick: props.onClick
|
|
10918
|
+
}, /*#__PURE__*/React.createElement(Close, null));
|
|
10919
|
+
};
|
|
10920
|
+
const WSZROVerificationDetails = () => {
|
|
10921
|
+
var _location$state;
|
|
10922
|
+
const {
|
|
10923
|
+
t
|
|
10924
|
+
} = useTranslation();
|
|
10925
|
+
const location = useLocation();
|
|
10926
|
+
const history = useHistory();
|
|
10927
|
+
const [displayMenu, setDisplayMenu] = useState(false);
|
|
10928
|
+
const [showModal, setShowModal] = useState(false);
|
|
10929
|
+
const [selectedAction, setSelectedAction] = useState(null);
|
|
10930
|
+
const [comments, setComments] = useState("");
|
|
10931
|
+
const [toast, setToast] = useState(null);
|
|
10932
|
+
const [isSuccess, setIsSuccess] = useState(false);
|
|
10933
|
+
const [apiResponse, setApiResponse] = useState(null);
|
|
10934
|
+
useEffect(() => {
|
|
10935
|
+
let timer;
|
|
10936
|
+
if (isSuccess) {
|
|
10937
|
+
timer = setTimeout(() => {
|
|
10938
|
+
history.push("/digit-ui/employee/ws/zro-application");
|
|
10939
|
+
}, 10000);
|
|
10940
|
+
}
|
|
10941
|
+
return () => {
|
|
10942
|
+
if (timer) clearTimeout(timer);
|
|
10943
|
+
};
|
|
10944
|
+
}, [isSuccess, history]);
|
|
10945
|
+
const caseDataFromState = (_location$state = location.state) === null || _location$state === void 0 ? void 0 : _location$state.caseData;
|
|
10946
|
+
const searchParams = new URLSearchParams(location.search);
|
|
10947
|
+
const connectionNumber = searchParams.get("connectionNumber");
|
|
10948
|
+
const tenantId = searchParams.get("tenantId") || Digit.ULBService.getCurrentTenantId();
|
|
10949
|
+
const {
|
|
10950
|
+
isLoading,
|
|
10951
|
+
data
|
|
10952
|
+
} = Digit.Hooks.ws.useWSZROVerification({
|
|
10953
|
+
tenantId,
|
|
10954
|
+
filters: {
|
|
10955
|
+
connectionNo: connectionNumber,
|
|
10956
|
+
status: "PENDING",
|
|
10957
|
+
offset: 0,
|
|
10958
|
+
limit: 20
|
|
10959
|
+
},
|
|
10960
|
+
config: {
|
|
10961
|
+
enabled: !caseDataFromState && !!connectionNumber,
|
|
10962
|
+
select: res => {
|
|
10963
|
+
var _res$cases;
|
|
10964
|
+
return res === null || res === void 0 ? void 0 : (_res$cases = res.cases) === null || _res$cases === void 0 ? void 0 : _res$cases[0];
|
|
10965
|
+
}
|
|
10966
|
+
}
|
|
10967
|
+
});
|
|
10968
|
+
const caseDetails = caseDataFromState || data;
|
|
10969
|
+
if (isLoading) {
|
|
10970
|
+
return /*#__PURE__*/React.createElement(Loader, null);
|
|
10971
|
+
}
|
|
10972
|
+
if (!caseDetails) {
|
|
10973
|
+
return /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement("div", {
|
|
10974
|
+
style: {
|
|
10975
|
+
textAlign: "center"
|
|
10976
|
+
}
|
|
10977
|
+
}, t("CS_COMMON_NO_DATA")));
|
|
10978
|
+
}
|
|
10979
|
+
const {
|
|
10980
|
+
verification,
|
|
10981
|
+
...billingData
|
|
10982
|
+
} = caseDetails;
|
|
10983
|
+
const formatDate = timestamp => {
|
|
10984
|
+
if (!timestamp) return "NA";
|
|
10985
|
+
return Digit.DateUtils.ConvertTimestampToDate(timestamp);
|
|
10986
|
+
};
|
|
10987
|
+
const onActionSelect = action => {
|
|
10988
|
+
setSelectedAction(action);
|
|
10989
|
+
setDisplayMenu(false);
|
|
10990
|
+
setShowModal(true);
|
|
10991
|
+
};
|
|
10992
|
+
const closeModal = () => {
|
|
10993
|
+
setShowModal(false);
|
|
10994
|
+
setComments("");
|
|
10995
|
+
setSelectedAction(null);
|
|
10996
|
+
};
|
|
10997
|
+
const submitAction = function () {
|
|
10998
|
+
try {
|
|
10999
|
+
const _temp = _catch(function () {
|
|
11000
|
+
const payload = {
|
|
11001
|
+
billingCycleId: billingData === null || billingData === void 0 ? void 0 : billingData.billingCycleId,
|
|
11002
|
+
action: selectedAction === "VERIFY" ? "APPROVE" : "REJECT",
|
|
11003
|
+
remarks: comments
|
|
11004
|
+
};
|
|
11005
|
+
return Promise.resolve(Digit.WSService.updateZROVerification(payload, tenantId)).then(function (res) {
|
|
11006
|
+
setApiResponse(res);
|
|
11007
|
+
setToast({
|
|
11008
|
+
key: "success",
|
|
11009
|
+
error: false,
|
|
11010
|
+
message: t("WF_ZRO_ACTION_SUCCESS")
|
|
11011
|
+
});
|
|
11012
|
+
setShowModal(false);
|
|
11013
|
+
setIsSuccess(true);
|
|
11014
|
+
});
|
|
11015
|
+
}, function (err) {
|
|
11016
|
+
var _err$response, _err$response$data, _err$response$data$Er, _err$response$data$Er2;
|
|
11017
|
+
console.error(err);
|
|
11018
|
+
setToast({
|
|
11019
|
+
key: "error",
|
|
11020
|
+
error: true,
|
|
11021
|
+
message: (err === null || err === void 0 ? void 0 : (_err$response = err.response) === null || _err$response === void 0 ? void 0 : (_err$response$data = _err$response.data) === null || _err$response$data === void 0 ? void 0 : (_err$response$data$Er = _err$response$data.Errors) === null || _err$response$data$Er === void 0 ? void 0 : (_err$response$data$Er2 = _err$response$data$Er[0]) === null || _err$response$data$Er2 === void 0 ? void 0 : _err$response$data$Er2.message) || t("CS_ACTION_ERROR")
|
|
11022
|
+
});
|
|
11023
|
+
closeModal();
|
|
11024
|
+
});
|
|
11025
|
+
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
|
11026
|
+
} catch (e) {
|
|
11027
|
+
return Promise.reject(e);
|
|
11028
|
+
}
|
|
11029
|
+
};
|
|
11030
|
+
if (isSuccess) {
|
|
11031
|
+
return /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(Banner, {
|
|
11032
|
+
message: t(selectedAction === "VERIFY" ? "WF_ZRO_VERIFY_SUCCESS" : "WF_ZRO_REJECT_SUCCESS"),
|
|
11033
|
+
applicationNumber: apiResponse !== null && apiResponse !== void 0 && apiResponse.connectionno ? apiResponse.connectionno : connectionNumber,
|
|
11034
|
+
info: apiResponse !== null && apiResponse !== void 0 && apiResponse.connectionno ? t("WS_CONNECTION_NO_LABEL") : t("WS_CONNECTION_NO_LABEL"),
|
|
11035
|
+
successful: selectedAction === "VERIFY"
|
|
11036
|
+
}), /*#__PURE__*/React.createElement(CardText, null, apiResponse !== null && apiResponse !== void 0 && apiResponse.message ? apiResponse.message : t("WF_ZRO_SUCCESS_MESSAGE_MAIN")), /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
11037
|
+
label: t("CORE_COMMON_GO_TO_HOME"),
|
|
11038
|
+
onSubmit: () => history.push("/digit-ui/employee/ws/zro-application")
|
|
11039
|
+
})));
|
|
11040
|
+
}
|
|
11041
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("WS_VERIFICATION_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
|
|
11042
|
+
label: t("WS_CONNECTION_NO_LABEL"),
|
|
11043
|
+
text: (verification === null || verification === void 0 ? void 0 : verification.connectionno) || "NA"
|
|
11044
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
11045
|
+
label: t("WS_VERIFICATION_STATUS"),
|
|
11046
|
+
text: (verification === null || verification === void 0 ? void 0 : verification.status) || "NA"
|
|
11047
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
11048
|
+
label: t("WS_CONSUMPTION_LABEL"),
|
|
11049
|
+
text: (verification === null || verification === void 0 ? void 0 : verification.consumption) ?? "NA"
|
|
11050
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
11051
|
+
label: t("WS_PREVIOUS_CONSUMPTION"),
|
|
11052
|
+
text: (verification === null || verification === void 0 ? void 0 : verification.previousconsumption) ?? "NA"
|
|
11053
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
11054
|
+
label: t("WS_DEVIATION_FACTOR"),
|
|
11055
|
+
text: verification !== null && verification !== void 0 && verification.deviationfactor ? Number(verification.deviationfactor).toFixed(2) : "NA"
|
|
11056
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
11057
|
+
label: t("WS_REMARKS"),
|
|
11058
|
+
text: (verification === null || verification === void 0 ? void 0 : verification.remarks) || "NA"
|
|
11059
|
+
})), /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
11060
|
+
style: {
|
|
11061
|
+
marginTop: "32px"
|
|
11062
|
+
}
|
|
11063
|
+
}, t("WS_BILLING_AND_CONSUMPTION_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
|
|
11064
|
+
label: t("WS_BILLING_CYCLE_ID"),
|
|
11065
|
+
text: billingData.billingCycleId || "NA"
|
|
11066
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
11067
|
+
label: t("WS_BILLING_PERIOD"),
|
|
11068
|
+
text: `${formatDate(billingData.billingPeriodFrom)} - ${formatDate(billingData.billingPeriodTo)}`
|
|
11069
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
11070
|
+
label: t("WS_BILLING_DAYS"),
|
|
11071
|
+
text: billingData.billingDays ?? "NA"
|
|
11072
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
11073
|
+
label: t("WS_PREVIOUS_READING_LABEL"),
|
|
11074
|
+
text: billingData.previousReading ?? "NA"
|
|
11075
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
11076
|
+
label: t("WS_PREVIOUS_OK_READING_DATE"),
|
|
11077
|
+
text: formatDate(billingData.previousOkReadingDate)
|
|
11078
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
11079
|
+
label: t("WS_CURRENT_READING_LABEL"),
|
|
11080
|
+
text: billingData.currentReading ?? "NA"
|
|
11081
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
11082
|
+
label: t("WS_READING_QUALITY_CODE"),
|
|
11083
|
+
text: billingData.readingQualityCode || "NA"
|
|
11084
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
11085
|
+
label: t("WS_BILLING_BASIS"),
|
|
11086
|
+
text: billingData.billingBasis || "NA"
|
|
11087
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
11088
|
+
label: t("WS_ACTUAL_CONSUMPTION"),
|
|
11089
|
+
text: billingData.actualConsumption ?? "NA"
|
|
11090
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
11091
|
+
label: t("WS_MONTHLY_CONSUMPTION"),
|
|
11092
|
+
text: billingData.monthlyConsumption ? Number(billingData.monthlyConsumption).toFixed(2) : "NA"
|
|
11093
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
11094
|
+
label: t("WS_THRESHOLD_CONSUMPTION"),
|
|
11095
|
+
text: billingData.thresholdConsumption ? Number(billingData.thresholdConsumption).toFixed(2) : "NA"
|
|
11096
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
11097
|
+
label: t("WS_1_5X_FLAG"),
|
|
11098
|
+
text: billingData.onePointFiveXFlag ? t("CORE_COMMON_YES") : t("CORE_COMMON_NO")
|
|
11099
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
11100
|
+
label: t("WS_BILLING_CYCLE_STATUS"),
|
|
11101
|
+
text: billingData.billingCycleStatus || "NA"
|
|
11102
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
11103
|
+
label: t("WS_CORRECTION_STATUS"),
|
|
11104
|
+
text: billingData.correctionStatus || "NA"
|
|
11105
|
+
}))), /*#__PURE__*/React.createElement(ActionBar, null, displayMenu ? /*#__PURE__*/React.createElement(Menu, {
|
|
11106
|
+
localeKeyPrefix: "WF_ZRO",
|
|
11107
|
+
options: ["VERIFY", "REJECT"],
|
|
11108
|
+
t: t,
|
|
11109
|
+
onSelect: onActionSelect
|
|
11110
|
+
}) : null, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
11111
|
+
label: t("WF_TAKE_ACTION"),
|
|
11112
|
+
onSubmit: () => setDisplayMenu(!displayMenu)
|
|
11113
|
+
})), showModal && /*#__PURE__*/React.createElement(Modal, {
|
|
11114
|
+
headerBarMain: /*#__PURE__*/React.createElement(Heading, {
|
|
11115
|
+
label: selectedAction === "VERIFY" ? t("WF_ZRO_VERIFY") : t("WF_ZRO_REJECT")
|
|
11116
|
+
}),
|
|
11117
|
+
headerBarEnd: /*#__PURE__*/React.createElement(CloseBtn, {
|
|
11118
|
+
onClick: closeModal
|
|
11119
|
+
}),
|
|
11120
|
+
actionCancelLabel: t("CS_COMMON_CANCEL"),
|
|
11121
|
+
actionCancelOnSubmit: closeModal,
|
|
11122
|
+
actionSaveLabel: selectedAction === "VERIFY" ? t("WF_ZRO_VERIFY") : t("WF_ZRO_REJECT"),
|
|
11123
|
+
actionSaveOnSubmit: submitAction
|
|
11124
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
11125
|
+
style: {
|
|
11126
|
+
marginBottom: "16px"
|
|
11127
|
+
}
|
|
11128
|
+
}, /*#__PURE__*/React.createElement(CardLabel, null, t("WF_COMMON_COMMENTS")), /*#__PURE__*/React.createElement(TextArea, {
|
|
11129
|
+
name: "comments",
|
|
11130
|
+
value: comments,
|
|
11131
|
+
onChange: e => setComments(e.target.value)
|
|
11132
|
+
}))), toast && /*#__PURE__*/React.createElement(Toast, {
|
|
11133
|
+
error: toast.error,
|
|
11134
|
+
label: toast.message,
|
|
11135
|
+
onClose: () => setToast(null)
|
|
11136
|
+
}));
|
|
11137
|
+
};
|
|
11138
|
+
|
|
10792
11139
|
const BILLSBreadCrumbs = _ref => {
|
|
10793
11140
|
var _applicationDetails$a, _applicationDetails$a9, _applicationDetails$a0, _applicationDetails$a1, _applicationDetails$a13, _applicationDetails$a14, _reciept_data$Payment2;
|
|
10794
11141
|
const getRecieptSearch = function (tenantId, payments, consumerCodes, receiptKey) {
|
|
@@ -11238,6 +11585,10 @@ const BILLSBreadCrumbs = _ref => {
|
|
|
11238
11585
|
path: "/digit-ui/employee/ws/water/calculation",
|
|
11239
11586
|
label: t("WS_CALCULATION"),
|
|
11240
11587
|
show: location.pathname.includes("/ws/water/calculation") ? true : false
|
|
11588
|
+
}, {
|
|
11589
|
+
path: "/digit-ui/employee/ws/zro-application",
|
|
11590
|
+
label: t("WS_ZRO_VERIFICATION"),
|
|
11591
|
+
show: location.pathname.includes("/ws/zro-application") ? true : false
|
|
11241
11592
|
}];
|
|
11242
11593
|
let lastCrumbIndex = findLastIndex(crumbs, "show", true);
|
|
11243
11594
|
crumbs[lastCrumbIndex] = {
|
|
@@ -11577,6 +11928,12 @@ const App$1 = _ref2 => {
|
|
|
11577
11928
|
component: props => /*#__PURE__*/React.createElement(WSCalculation, _extends({}, props, {
|
|
11578
11929
|
parentRoute: path
|
|
11579
11930
|
}))
|
|
11931
|
+
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
11932
|
+
path: `${path}/zro-application`,
|
|
11933
|
+
component: () => /*#__PURE__*/React.createElement(WSZROVerification, null)
|
|
11934
|
+
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
11935
|
+
path: `${path}/zro-verification-details`,
|
|
11936
|
+
component: () => /*#__PURE__*/React.createElement(WSZROVerificationDetails, null)
|
|
11580
11937
|
}))))));
|
|
11581
11938
|
};
|
|
11582
11939
|
|
|
@@ -17669,7 +18026,7 @@ ButtonSelector.defaultProps = {
|
|
|
17669
18026
|
onSubmit: undefined
|
|
17670
18027
|
};
|
|
17671
18028
|
|
|
17672
|
-
const Close = _ref23 => {
|
|
18029
|
+
const Close$1 = _ref23 => {
|
|
17673
18030
|
let {
|
|
17674
18031
|
className,
|
|
17675
18032
|
style
|
|
@@ -17705,7 +18062,7 @@ const RemoveableTag = _ref => {
|
|
|
17705
18062
|
style: extraStyles ? extraStyles === null || extraStyles === void 0 ? void 0 : extraStyles.textStyles : {}
|
|
17706
18063
|
}, text), /*#__PURE__*/React.createElement("span", {
|
|
17707
18064
|
onClick: disabled ? null : onClick
|
|
17708
|
-
}, /*#__PURE__*/React.createElement(Close, {
|
|
18065
|
+
}, /*#__PURE__*/React.createElement(Close$1, {
|
|
17709
18066
|
className: "close",
|
|
17710
18067
|
style: extraStyles ? extraStyles === null || extraStyles === void 0 ? void 0 : extraStyles.closeIconStyles : {}
|
|
17711
18068
|
})));
|
|
@@ -27487,7 +27844,11 @@ const WSCard = () => {
|
|
|
27487
27844
|
label: t("WS_APPLY_MUTATION"),
|
|
27488
27845
|
link: `/digit-ui/employee/ws/mutation-application`,
|
|
27489
27846
|
roles: ["WS_CEMP", "WS_APPROVER", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER", "WS_CLERK", "SW_CEMP", "SW_APPROVER", "SW_FIELD_INSPECTOR", "SW_DOC_VERIFIER", "SW_CLERK"]
|
|
27490
|
-
}
|
|
27847
|
+
}, {
|
|
27848
|
+
label: t("WS_ZRO_VERIFICATION"),
|
|
27849
|
+
link: `/digit-ui/employee/ws/zro-application`,
|
|
27850
|
+
roles: ["WS_CEMP", "WS_APPROVER", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER", "WS_CLERK", "SW_CEMP", "SW_APPROVER", "SW_FIELD_INSPECTOR", "SW_DOC_VERIFIER", "SW_CLERK"]
|
|
27851
|
+
}].filter(link => link.roles ? checkForEmployee(link.roles) : true)
|
|
27491
27852
|
};
|
|
27492
27853
|
return /*#__PURE__*/React.createElement(EmployeeModuleCard, propsForModuleCard);
|
|
27493
27854
|
};
|
|
@@ -37739,6 +38100,15 @@ const WSInfoPage = () => {
|
|
|
37739
38100
|
const [isOtpSending, setIsOtpSending] = useState(false);
|
|
37740
38101
|
const [isOtpVerifying, setIsOtpVerifying] = useState(false);
|
|
37741
38102
|
const [showToast, setShowToast] = useState(null);
|
|
38103
|
+
const [isMobileVerified, setIsMobileVerified] = useState(false);
|
|
38104
|
+
const [timeLeft, setTimeLeft] = useState(0);
|
|
38105
|
+
useEffect(() => {
|
|
38106
|
+
let timer;
|
|
38107
|
+
if (timeLeft > 0) {
|
|
38108
|
+
timer = setTimeout(() => setTimeLeft(timeLeft - 1), 1000);
|
|
38109
|
+
}
|
|
38110
|
+
return () => clearTimeout(timer);
|
|
38111
|
+
}, [timeLeft]);
|
|
37742
38112
|
useEffect(() => {
|
|
37743
38113
|
sessionStorage.removeItem("WS_OTP_VERIFIED_PROPERTY_ID");
|
|
37744
38114
|
}, []);
|
|
@@ -37757,7 +38127,7 @@ const WSInfoPage = () => {
|
|
|
37757
38127
|
mobileNumber: mobileNumberToSearch
|
|
37758
38128
|
},
|
|
37759
38129
|
tenantId: tenantId,
|
|
37760
|
-
enabled: (hasProperty === null || hasProperty === void 0 ? void 0 : hasProperty.code) === "YES" && (mobileNumberToSearch === null || mobileNumberToSearch === void 0 ? void 0 : mobileNumberToSearch.length) === 10 ? true : false
|
|
38130
|
+
enabled: (hasProperty === null || hasProperty === void 0 ? void 0 : hasProperty.code) === "YES" && (mobileNumberToSearch === null || mobileNumberToSearch === void 0 ? void 0 : mobileNumberToSearch.length) === 10 && isMobileVerified ? true : false
|
|
37761
38131
|
});
|
|
37762
38132
|
const radioOptions = [{
|
|
37763
38133
|
code: "YES",
|
|
@@ -37808,7 +38178,7 @@ const WSInfoPage = () => {
|
|
|
37808
38178
|
setIsOtpSending(false);
|
|
37809
38179
|
setShowToast({
|
|
37810
38180
|
key: "error",
|
|
37811
|
-
message: (errObj === null || errObj === void 0 ? void 0 : (_errObj$fields = errObj.fields) === null || _errObj$fields === void 0 ? void 0 : (_errObj$fields$ = _errObj$fields[0]) === null || _errObj$fields$ === void 0 ? void 0 : _errObj$fields$.message) || (errObj === null || errObj === void 0 ? void 0 : errObj.message) || "Failed to send OTP"
|
|
38181
|
+
message: (errObj === null || errObj === void 0 ? void 0 : (_errObj$fields = errObj.fields) === null || _errObj$fields === void 0 ? void 0 : (_errObj$fields$ = _errObj$fields[0]) === null || _errObj$fields$ === void 0 ? void 0 : _errObj$fields$.message) || (errObj === null || errObj === void 0 ? void 0 : errObj.message) || t("WS_FAILED_TO_SEND_OTP") || "Failed to send OTP"
|
|
37812
38182
|
});
|
|
37813
38183
|
return;
|
|
37814
38184
|
}
|
|
@@ -37818,21 +38188,22 @@ const WSInfoPage = () => {
|
|
|
37818
38188
|
setIsOtpSending(false);
|
|
37819
38189
|
setShowToast({
|
|
37820
38190
|
key: "error",
|
|
37821
|
-
message: (errObj === null || errObj === void 0 ? void 0 : (_errObj$ = errObj[0]) === null || _errObj$ === void 0 ? void 0 : _errObj$.message) || "Failed to send OTP"
|
|
38191
|
+
message: (errObj === null || errObj === void 0 ? void 0 : (_errObj$ = errObj[0]) === null || _errObj$ === void 0 ? void 0 : _errObj$.message) || t("WS_FAILED_TO_SEND_OTP") || "Failed to send OTP"
|
|
37822
38192
|
});
|
|
37823
38193
|
return;
|
|
37824
38194
|
}
|
|
37825
38195
|
setIsOtpSending(false);
|
|
37826
38196
|
setShowOtpVerification(true);
|
|
38197
|
+
setTimeLeft(30);
|
|
37827
38198
|
setShowToast({
|
|
37828
38199
|
key: "success",
|
|
37829
|
-
message: "OTP sent successfully!"
|
|
38200
|
+
message: t("PT_SEC_OTP_SENT_SUCEESS") || "OTP sent successfully!"
|
|
37830
38201
|
});
|
|
37831
38202
|
});
|
|
37832
38203
|
}, function (err) {
|
|
37833
38204
|
var _err$response, _err$response$data, _err$response2, _err$response2$data;
|
|
37834
38205
|
setIsOtpSending(false);
|
|
37835
|
-
let errMsg = "Failed to send OTP";
|
|
38206
|
+
let errMsg = t("WS_FAILED_TO_SEND_OTP") || "Failed to send OTP";
|
|
37836
38207
|
if (err !== null && err !== void 0 && (_err$response = err.response) !== null && _err$response !== void 0 && (_err$response$data = _err$response.data) !== null && _err$response$data !== void 0 && _err$response$data.error) {
|
|
37837
38208
|
var _err$response$data$er, _err$response$data$er2, _err$response$data$er3, _err$response$data$er4;
|
|
37838
38209
|
errMsg = ((_err$response$data$er = err.response.data.error) === null || _err$response$data$er === void 0 ? void 0 : (_err$response$data$er2 = _err$response$data$er.fields) === null || _err$response$data$er2 === void 0 ? void 0 : (_err$response$data$er3 = _err$response$data$er2[0]) === null || _err$response$data$er3 === void 0 ? void 0 : _err$response$data$er3.message) || ((_err$response$data$er4 = err.response.data.error) === null || _err$response$data$er4 === void 0 ? void 0 : _err$response$data$er4.message) || errMsg;
|
|
@@ -37860,7 +38231,7 @@ const WSInfoPage = () => {
|
|
|
37860
38231
|
if (!otp || otp.length < 6) {
|
|
37861
38232
|
setShowToast({
|
|
37862
38233
|
key: "warning",
|
|
37863
|
-
message: "Please enter a valid 6-digit OTP"
|
|
38234
|
+
message: t("WS_PLEASE_ENTER_VALID_OTP") || "Please enter a valid 6-digit OTP"
|
|
37864
38235
|
});
|
|
37865
38236
|
return Promise.resolve();
|
|
37866
38237
|
}
|
|
@@ -37891,14 +38262,15 @@ const WSInfoPage = () => {
|
|
|
37891
38262
|
setIsOtpVerifying(false);
|
|
37892
38263
|
setShowToast({
|
|
37893
38264
|
key: "success",
|
|
37894
|
-
message: "OTP verified successfully!"
|
|
38265
|
+
message: t("WS_OTP_VERIFIED_SUCCESSFULLY") || "OTP verified successfully!"
|
|
37895
38266
|
});
|
|
37896
|
-
|
|
38267
|
+
setShowOtpVerification(false);
|
|
38268
|
+
setIsMobileVerified(true);
|
|
37897
38269
|
});
|
|
37898
38270
|
}, function (err) {
|
|
37899
38271
|
var _err$response3, _err$response3$data, _err$response4, _err$response4$data;
|
|
37900
38272
|
setIsOtpVerifying(false);
|
|
37901
|
-
let errMsg = err.message || "Failed to verify OTP";
|
|
38273
|
+
let errMsg = err.message || t("WS_FAILED_TO_VERIFY_OTP") || "Failed to verify OTP";
|
|
37902
38274
|
if (err !== null && err !== void 0 && (_err$response3 = err.response) !== null && _err$response3 !== void 0 && (_err$response3$data = _err$response3.data) !== null && _err$response3$data !== void 0 && _err$response3$data.error) {
|
|
37903
38275
|
var _err$response$data$er5, _err$response$data$er6, _err$response$data$er7, _err$response$data$er8;
|
|
37904
38276
|
errMsg = ((_err$response$data$er5 = err.response.data.error) === null || _err$response$data$er5 === void 0 ? void 0 : (_err$response$data$er6 = _err$response$data$er5.fields) === null || _err$response$data$er6 === void 0 ? void 0 : (_err$response$data$er7 = _err$response$data$er6[0]) === null || _err$response$data$er7 === void 0 ? void 0 : _err$response$data$er7.message) || ((_err$response$data$er8 = err.response.data.error) === null || _err$response$data$er8 === void 0 ? void 0 : _err$response$data$er8.message) || errMsg;
|
|
@@ -37923,7 +38295,14 @@ const WSInfoPage = () => {
|
|
|
37923
38295
|
if (e.stopPropagation) e.stopPropagation();
|
|
37924
38296
|
}
|
|
37925
38297
|
if ((hasProperty === null || hasProperty === void 0 ? void 0 : hasProperty.code) === "YES" && selectedProperty) {
|
|
37926
|
-
|
|
38298
|
+
if (!isMobileVerified) {
|
|
38299
|
+
setShowToast({
|
|
38300
|
+
key: "warning",
|
|
38301
|
+
message: t("WS_PLEASE_VERIFY_MOBILE_NUMBER") || "Please verify mobile number first"
|
|
38302
|
+
});
|
|
38303
|
+
return;
|
|
38304
|
+
}
|
|
38305
|
+
proceedToNext();
|
|
37927
38306
|
} else if ((hasProperty === null || hasProperty === void 0 ? void 0 : hasProperty.code) === "YES" && !selectedProperty) {
|
|
37928
38307
|
return;
|
|
37929
38308
|
} else {
|
|
@@ -37938,72 +38317,6 @@ const WSInfoPage = () => {
|
|
|
37938
38317
|
...prop,
|
|
37939
38318
|
displayName: `${prop.propertyId} - ${getAddress$1(prop.address, t)}`
|
|
37940
38319
|
}))) || [];
|
|
37941
|
-
if (showOtpVerification) {
|
|
37942
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement("form", {
|
|
37943
|
-
onSubmit: handleVerifyOtp
|
|
37944
|
-
}, /*#__PURE__*/React.createElement(CardHeader, null, t("WS_VERIFY_OTP_HEADER") || "Verify OTP"), /*#__PURE__*/React.createElement("div", {
|
|
37945
|
-
style: {
|
|
37946
|
-
marginBottom: "24px"
|
|
37947
|
-
}
|
|
37948
|
-
}, /*#__PURE__*/React.createElement(Label, null, t("WS_ENTER_OTP_SENT_TO") || "Enter OTP sent to", " +91 ", getMaskedPhone(mobileNumberToSearch), " *"), /*#__PURE__*/React.createElement(TextInput, {
|
|
37949
|
-
t: t,
|
|
37950
|
-
type: "text",
|
|
37951
|
-
inputMode: "numeric",
|
|
37952
|
-
pattern: "[0-9]*",
|
|
37953
|
-
isMandatory: false,
|
|
37954
|
-
value: otp,
|
|
37955
|
-
maxLength: 6,
|
|
37956
|
-
onChange: e => setOtp(e.target.value.replace(/\D/g, "").slice(0, 6)),
|
|
37957
|
-
onKeyDown: e => {
|
|
37958
|
-
if (["-", "+", "e", "E", "."].includes(e.key)) e.preventDefault();
|
|
37959
|
-
},
|
|
37960
|
-
placeholder: t("WS_ENTER_6_DIGIT_OTP") || "Enter 6-digit OTP",
|
|
37961
|
-
style: {
|
|
37962
|
-
width: "100%",
|
|
37963
|
-
maxWidth: "300px"
|
|
37964
|
-
}
|
|
37965
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
37966
|
-
style: {
|
|
37967
|
-
display: "flex",
|
|
37968
|
-
gap: "16px",
|
|
37969
|
-
marginBottom: "24px"
|
|
37970
|
-
}
|
|
37971
|
-
}, /*#__PURE__*/React.createElement("button", {
|
|
37972
|
-
type: "button",
|
|
37973
|
-
onClick: handleSendOtp,
|
|
37974
|
-
disabled: isOtpSending,
|
|
37975
|
-
style: {
|
|
37976
|
-
color: "#f47738",
|
|
37977
|
-
background: "none",
|
|
37978
|
-
border: "none",
|
|
37979
|
-
cursor: "pointer",
|
|
37980
|
-
fontWeight: "bold",
|
|
37981
|
-
textDecoration: "underline"
|
|
37982
|
-
}
|
|
37983
|
-
}, isOtpSending ? t("WS_SENDING_OTP") || "Sending..." : t("WS_RESEND_OTP") || "Resend OTP"), /*#__PURE__*/React.createElement("button", {
|
|
37984
|
-
type: "button",
|
|
37985
|
-
onClick: () => setShowOtpVerification(false),
|
|
37986
|
-
style: {
|
|
37987
|
-
color: "#f47738",
|
|
37988
|
-
background: "none",
|
|
37989
|
-
border: "none",
|
|
37990
|
-
cursor: "pointer",
|
|
37991
|
-
fontWeight: "bold",
|
|
37992
|
-
textDecoration: "underline"
|
|
37993
|
-
}
|
|
37994
|
-
}, t("CS_COMMON_CANCEL") || "Cancel")), /*#__PURE__*/React.createElement(SubmitBar, {
|
|
37995
|
-
label: t("WS_VERIFY_OTP_AND_PROCEED") || "Verify & Proceed",
|
|
37996
|
-
onSubmit: handleVerifyOtp,
|
|
37997
|
-
disabled: otp.length < 6 || isOtpVerifying,
|
|
37998
|
-
submit: true
|
|
37999
|
-
}))), showToast && /*#__PURE__*/React.createElement(Toast, {
|
|
38000
|
-
error: showToast.key === "error",
|
|
38001
|
-
warning: showToast.key === "warning",
|
|
38002
|
-
label: t(showToast.message),
|
|
38003
|
-
onClose: () => setShowToast(null),
|
|
38004
|
-
isDleteBtn: true
|
|
38005
|
-
}));
|
|
38006
|
-
}
|
|
38007
38320
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardHeader, null, t("WS_COMMON_APPL_NEW_CONNECTION")), /*#__PURE__*/React.createElement(CitizenInfoLabel, {
|
|
38008
38321
|
style: {
|
|
38009
38322
|
margin: "0px",
|
|
@@ -38035,30 +38348,7 @@ const WSInfoPage = () => {
|
|
|
38035
38348
|
display: "flex",
|
|
38036
38349
|
gap: "24px"
|
|
38037
38350
|
}
|
|
38038
|
-
})), (hasProperty === null || hasProperty === void 0 ? void 0 : hasProperty.code) === "YES" && /*#__PURE__*/React.createElement("div", {
|
|
38039
|
-
style: {
|
|
38040
|
-
marginBottom: "24px"
|
|
38041
|
-
}
|
|
38042
|
-
}, !isEmployee && /*#__PURE__*/React.createElement("div", {
|
|
38043
|
-
style: {
|
|
38044
|
-
marginBottom: "16px"
|
|
38045
|
-
}
|
|
38046
|
-
}, /*#__PURE__*/React.createElement(Label, null, t("CORE_COMMON_MOBILE_NUMBER")), /*#__PURE__*/React.createElement(TextInput, {
|
|
38047
|
-
t: t,
|
|
38048
|
-
type: "number",
|
|
38049
|
-
isMandatory: false,
|
|
38050
|
-
name: "mobileNumber",
|
|
38051
|
-
value: searchMobileNumber,
|
|
38052
|
-
onChange: e => {
|
|
38053
|
-
const val = e.target.value.replace(/\D/g, "").slice(0, 10);
|
|
38054
|
-
setSearchMobileNumber(val);
|
|
38055
|
-
setSelectedProperty(null);
|
|
38056
|
-
setShowOtpVerification(false);
|
|
38057
|
-
setOtp("");
|
|
38058
|
-
},
|
|
38059
|
-
placeholder: t("Enter mobile number"),
|
|
38060
|
-
maxLength: 10
|
|
38061
|
-
})), isEmployee && /*#__PURE__*/React.createElement("div", {
|
|
38351
|
+
})), (hasProperty === null || hasProperty === void 0 ? void 0 : hasProperty.code) === "YES" && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
38062
38352
|
style: {
|
|
38063
38353
|
display: "flex",
|
|
38064
38354
|
flexDirection: "column",
|
|
@@ -38067,39 +38357,59 @@ const WSInfoPage = () => {
|
|
|
38067
38357
|
}
|
|
38068
38358
|
}, /*#__PURE__*/React.createElement("div", {
|
|
38069
38359
|
style: {
|
|
38070
|
-
display: "
|
|
38360
|
+
display: "grid",
|
|
38361
|
+
gridTemplateColumns: "1fr 1fr",
|
|
38071
38362
|
gap: "24px",
|
|
38072
|
-
alignItems: "
|
|
38363
|
+
alignItems: "start"
|
|
38364
|
+
}
|
|
38365
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Label, null, t("CORE_COMMON_MOBILE_NUMBER")), /*#__PURE__*/React.createElement("div", {
|
|
38366
|
+
style: {
|
|
38367
|
+
display: "flex",
|
|
38368
|
+
gap: "16px",
|
|
38369
|
+
alignItems: "center"
|
|
38073
38370
|
}
|
|
38074
38371
|
}, /*#__PURE__*/React.createElement("div", {
|
|
38075
38372
|
style: {
|
|
38076
38373
|
flex: 1
|
|
38077
38374
|
}
|
|
38078
|
-
}, /*#__PURE__*/React.createElement(
|
|
38375
|
+
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
38079
38376
|
t: t,
|
|
38080
38377
|
type: "number",
|
|
38081
38378
|
isMandatory: false,
|
|
38082
38379
|
name: "mobileNumber",
|
|
38083
38380
|
value: searchMobileNumber,
|
|
38084
38381
|
onChange: e => {
|
|
38085
|
-
const val = e.target.value;
|
|
38086
|
-
|
|
38087
|
-
|
|
38088
|
-
|
|
38089
|
-
|
|
38090
|
-
|
|
38091
|
-
}
|
|
38382
|
+
const val = e.target.value.replace(/\D/g, "").slice(0, 10);
|
|
38383
|
+
setSearchMobileNumber(val);
|
|
38384
|
+
setSelectedProperty(null);
|
|
38385
|
+
setShowOtpVerification(false);
|
|
38386
|
+
setOtp("");
|
|
38387
|
+
setIsMobileVerified(false);
|
|
38092
38388
|
},
|
|
38093
|
-
placeholder: t("Enter mobile number"
|
|
38094
|
-
maxLength: 10
|
|
38095
|
-
|
|
38389
|
+
placeholder: t("WS_ENTER_MOBILE_NUMBER") || "Enter mobile number",
|
|
38390
|
+
maxLength: 10,
|
|
38391
|
+
disabled: isMobileVerified
|
|
38392
|
+
})), (searchMobileNumber === null || searchMobileNumber === void 0 ? void 0 : searchMobileNumber.length) === 10 && !isMobileVerified && !showOtpVerification && /*#__PURE__*/React.createElement("button", {
|
|
38393
|
+
type: "button",
|
|
38394
|
+
onClick: handleSendOtp,
|
|
38395
|
+
disabled: isOtpSending,
|
|
38096
38396
|
style: {
|
|
38097
|
-
|
|
38397
|
+
padding: "8px 16px",
|
|
38398
|
+
border: "1px solid #1a67a3",
|
|
38399
|
+
background: "white",
|
|
38400
|
+
color: "#1a67a3",
|
|
38401
|
+
borderRadius: "4px",
|
|
38402
|
+
cursor: "pointer",
|
|
38403
|
+
fontWeight: "bold",
|
|
38404
|
+
whiteSpace: "nowrap"
|
|
38405
|
+
}
|
|
38406
|
+
}, isOtpSending ? t("WS_SENDING_OTP") || "Sending..." : t("PTUPNO_SENDOTP") || "Send OTP"))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Label, null, t("WS_SELECT_EXISTING_PROPERTY")), isLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement("div", {
|
|
38407
|
+
style: {
|
|
38408
|
+
display: "flex",
|
|
38409
|
+
flexDirection: "column",
|
|
38410
|
+
gap: "8px"
|
|
38098
38411
|
}
|
|
38099
|
-
}, /*#__PURE__*/React.createElement(Label, null, t("WS_SELECT_EXISTING_PROPERTY")), /*#__PURE__*/React.createElement("div", {
|
|
38100
|
-
className: "field"
|
|
38101
38412
|
}, /*#__PURE__*/React.createElement(Dropdown, {
|
|
38102
|
-
className: "form-field",
|
|
38103
38413
|
option: propertyOptions,
|
|
38104
38414
|
optionKey: "displayName",
|
|
38105
38415
|
id: "propertyId",
|
|
@@ -38111,51 +38421,125 @@ const WSInfoPage = () => {
|
|
|
38111
38421
|
},
|
|
38112
38422
|
t: t,
|
|
38113
38423
|
placeholder: t("PT_SELECT_PROPERTY"),
|
|
38114
|
-
disable:
|
|
38115
|
-
})
|
|
38424
|
+
disable: !isMobileVerified || propertyOptions.length === 0
|
|
38425
|
+
}), propertyOptions.length > 0 && /*#__PURE__*/React.createElement("span", {
|
|
38426
|
+
style: {
|
|
38427
|
+
fontSize: "14px",
|
|
38428
|
+
color: "#505A5F"
|
|
38429
|
+
}
|
|
38430
|
+
}, t("WS_PROPERTY_AUTOFILL_MSG"))))), showOtpVerification && !isMobileVerified && /*#__PURE__*/React.createElement("div", {
|
|
38431
|
+
style: {
|
|
38432
|
+
border: "1px solid #d6d5d4",
|
|
38433
|
+
borderRadius: "4px",
|
|
38434
|
+
background: "#f8f9fa",
|
|
38435
|
+
padding: "12px"
|
|
38436
|
+
}
|
|
38437
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
38438
|
+
style: {
|
|
38439
|
+
fontWeight: "bold",
|
|
38440
|
+
fontSize: "18px",
|
|
38441
|
+
marginBottom: "8px"
|
|
38442
|
+
}
|
|
38443
|
+
}, t("WS_VERIFY_OTP_HEADER") || "OTP Verification"), /*#__PURE__*/React.createElement("div", {
|
|
38444
|
+
style: {
|
|
38445
|
+
color: "#505A5F",
|
|
38446
|
+
marginBottom: "16px"
|
|
38447
|
+
}
|
|
38448
|
+
}, t("WS_ENTER_OTP_SENT_TO") || "Enter the 6-digit OTP sent to", " ", getMaskedPhone(searchMobileNumber)), /*#__PURE__*/React.createElement("div", {
|
|
38116
38449
|
style: {
|
|
38117
38450
|
display: "flex",
|
|
38118
|
-
|
|
38119
|
-
gap: "
|
|
38451
|
+
flexWrap: "wrap",
|
|
38452
|
+
gap: "15px",
|
|
38453
|
+
alignItems: "center"
|
|
38120
38454
|
}
|
|
38121
|
-
}, /*#__PURE__*/React.createElement(
|
|
38455
|
+
}, /*#__PURE__*/React.createElement(OTPInput, {
|
|
38122
38456
|
style: {
|
|
38123
|
-
|
|
38457
|
+
marginBottom: "0px"
|
|
38458
|
+
},
|
|
38459
|
+
length: 6,
|
|
38460
|
+
onChange: setOtp,
|
|
38461
|
+
value: otp
|
|
38462
|
+
}), /*#__PURE__*/React.createElement("button", {
|
|
38463
|
+
type: "button",
|
|
38464
|
+
onClick: handleVerifyOtp,
|
|
38465
|
+
disabled: otp.length < 6 || isOtpVerifying,
|
|
38466
|
+
style: {
|
|
38467
|
+
padding: "6px 20px",
|
|
38468
|
+
background: otp.length < 6 || isOtpVerifying ? "#ccc" : "#1a67a3",
|
|
38469
|
+
color: "white",
|
|
38470
|
+
border: "none",
|
|
38471
|
+
borderRadius: "4px",
|
|
38472
|
+
cursor: otp.length < 6 || isOtpVerifying ? "not-allowed" : "pointer",
|
|
38124
38473
|
fontWeight: "bold"
|
|
38125
38474
|
}
|
|
38126
|
-
}, t("
|
|
38127
|
-
onClick: handleCreateProperty
|
|
38128
|
-
}, /*#__PURE__*/React.createElement("button", {
|
|
38129
|
-
className: "submit-bar",
|
|
38475
|
+
}, isOtpVerifying ? t("WS_VERIFYING_OTP") || "Verifying..." : t("WS_VERIFY_OTP_AND_PROCEED") || "Verify OTP"), /*#__PURE__*/React.createElement("button", {
|
|
38130
38476
|
type: "button",
|
|
38477
|
+
onClick: handleSendOtp,
|
|
38478
|
+
disabled: timeLeft > 0 || isOtpSending,
|
|
38131
38479
|
style: {
|
|
38132
|
-
|
|
38133
|
-
|
|
38480
|
+
padding: "6px 20px",
|
|
38481
|
+
background: "white",
|
|
38482
|
+
color: timeLeft > 0 || isOtpSending ? "#ccc" : "#1a67a3",
|
|
38483
|
+
border: `1px solid ${timeLeft > 0 || isOtpSending ? "#ccc" : "#1a67a3"}`,
|
|
38484
|
+
borderRadius: "4px",
|
|
38485
|
+
cursor: timeLeft > 0 || isOtpSending ? "not-allowed" : "pointer",
|
|
38486
|
+
fontWeight: "bold"
|
|
38134
38487
|
}
|
|
38135
|
-
}, t("
|
|
38488
|
+
}, timeLeft > 0 ? `${t("WS_RESEND_OTP") || "Resend OTP"} (00:${timeLeft < 10 ? `0${timeLeft}` : timeLeft})` : t("WS_RESEND_OTP") || "Resend OTP")), timeLeft > 0 && /*#__PURE__*/React.createElement("div", {
|
|
38489
|
+
style: {
|
|
38490
|
+
marginTop: "12px",
|
|
38491
|
+
color: "#505A5F",
|
|
38492
|
+
fontSize: "14px"
|
|
38493
|
+
}
|
|
38494
|
+
}, t("WS_DIDNT_RECEIVE_OTP_RESEND") || "Didn't receive OTP? You can resend after", " ", timeLeft, " ", t("WS_SECONDS") || "seconds", ".")), isMobileVerified && /*#__PURE__*/React.createElement("div", {
|
|
38136
38495
|
style: {
|
|
38137
38496
|
display: "flex",
|
|
38138
|
-
|
|
38497
|
+
justifyContent: "space-between",
|
|
38498
|
+
alignItems: "center",
|
|
38499
|
+
background: "#d4edda",
|
|
38500
|
+
border: "1px solid #c3e6cb",
|
|
38501
|
+
color: "#155724",
|
|
38502
|
+
padding: "12px 16px",
|
|
38503
|
+
borderRadius: "4px"
|
|
38504
|
+
}
|
|
38505
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
38506
|
+
style: {
|
|
38507
|
+
display: "flex",
|
|
38508
|
+
alignItems: "center",
|
|
38139
38509
|
gap: "8px"
|
|
38140
38510
|
}
|
|
38141
|
-
}, /*#__PURE__*/React.createElement(
|
|
38142
|
-
|
|
38143
|
-
|
|
38144
|
-
|
|
38145
|
-
|
|
38146
|
-
|
|
38147
|
-
|
|
38148
|
-
|
|
38511
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
38512
|
+
style: {
|
|
38513
|
+
background: "#28a745",
|
|
38514
|
+
color: "white",
|
|
38515
|
+
borderRadius: "50%",
|
|
38516
|
+
width: "24px",
|
|
38517
|
+
height: "24px",
|
|
38518
|
+
display: "inline-flex",
|
|
38519
|
+
justifyContent: "center",
|
|
38520
|
+
alignItems: "center",
|
|
38521
|
+
fontWeight: "bold"
|
|
38522
|
+
}
|
|
38523
|
+
}, "\u2713"), /*#__PURE__*/React.createElement("span", {
|
|
38524
|
+
style: {
|
|
38525
|
+
fontWeight: "bold"
|
|
38526
|
+
}
|
|
38527
|
+
}, t("WS_MOBILE_VERIFIED_SUCCESSFULLY") || "Mobile number verified successfully!")), /*#__PURE__*/React.createElement("button", {
|
|
38528
|
+
type: "button",
|
|
38529
|
+
onClick: () => {
|
|
38530
|
+
setIsMobileVerified(false);
|
|
38149
38531
|
setOtp("");
|
|
38532
|
+
setShowOtpVerification(false);
|
|
38150
38533
|
},
|
|
38151
|
-
t: t,
|
|
38152
|
-
placeholder: t("PT_SELECT_PROPERTY")
|
|
38153
|
-
}), /*#__PURE__*/React.createElement("span", {
|
|
38154
38534
|
style: {
|
|
38155
|
-
|
|
38156
|
-
|
|
38535
|
+
color: "#1a67a3",
|
|
38536
|
+
background: "none",
|
|
38537
|
+
border: "none",
|
|
38538
|
+
cursor: "pointer",
|
|
38539
|
+
fontWeight: "bold",
|
|
38540
|
+
textDecoration: "underline"
|
|
38157
38541
|
}
|
|
38158
|
-
}, t("
|
|
38542
|
+
}, t("WS_CHANGE_NUMBER") || "Change Number")), (searchMobileNumber === null || searchMobileNumber === void 0 ? void 0 : searchMobileNumber.length) === 10 && isMobileVerified && !isLoading && propertyOptions.length === 0 && /*#__PURE__*/React.createElement("div", {
|
|
38159
38543
|
style: {
|
|
38160
38544
|
display: "flex",
|
|
38161
38545
|
flexDirection: "column",
|
|
@@ -38176,7 +38560,7 @@ const WSInfoPage = () => {
|
|
|
38176
38560
|
color: "white",
|
|
38177
38561
|
margin: 0
|
|
38178
38562
|
}
|
|
38179
|
-
}, t("CPT_CREATE_PROPERTY"))))
|
|
38563
|
+
}, t("CPT_CREATE_PROPERTY")))))), (hasProperty === null || hasProperty === void 0 ? void 0 : hasProperty.code) === "NO" && /*#__PURE__*/React.createElement("div", {
|
|
38180
38564
|
style: {
|
|
38181
38565
|
marginBottom: "24px",
|
|
38182
38566
|
display: "flex",
|
|
@@ -38192,7 +38576,7 @@ const WSInfoPage = () => {
|
|
|
38192
38576
|
color: "white",
|
|
38193
38577
|
margin: 0
|
|
38194
38578
|
}
|
|
38195
|
-
}, t("CPT_CREATE_PROPERTY")))), /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
38579
|
+
}, t("CPT_CREATE_PROPERTY")))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
38196
38580
|
style: {
|
|
38197
38581
|
marginTop: "0",
|
|
38198
38582
|
marginBottom: "0"
|
|
@@ -38284,7 +38668,7 @@ const WSInfoPage = () => {
|
|
|
38284
38668
|
marginBottom: "24px",
|
|
38285
38669
|
lineHeight: "2"
|
|
38286
38670
|
}
|
|
38287
|
-
}, /*#__PURE__*/React.createElement("li", null, t("WS_DOC_IDENTITY_PROOF")), /*#__PURE__*/React.createElement("li", null, t("WS_DOC_ADDRESS_PROOF")), /*#__PURE__*/React.createElement("li", null, t("WS_DOC_ELECTRICITY_BILL")), /*#__PURE__*/React.createElement("li", null, t("WS_DOC_PLUMBER_REPORT")), /*#__PURE__*/React.createElement("li", null, t("WS_DOC_BUILDING_PLAN")), /*#__PURE__*/React.createElement("li", null, t("WS_DOC_PROPERTY_TAX_RECEIPT")), /*#__PURE__*/React.createElement("li", null, t("WS_DOC_APPLICANT_PHOTOGRAPH"))), !hasProperty || (hasProperty === null || hasProperty === void 0 ? void 0 : hasProperty.code) === "YES" && !selectedProperty ? /*#__PURE__*/React.createElement(SubmitBar, {
|
|
38671
|
+
}, /*#__PURE__*/React.createElement("li", null, t("WS_DOC_IDENTITY_PROOF")), /*#__PURE__*/React.createElement("li", null, t("WS_DOC_ADDRESS_PROOF")), /*#__PURE__*/React.createElement("li", null, t("WS_DOC_ELECTRICITY_BILL")), /*#__PURE__*/React.createElement("li", null, t("WS_DOC_PLUMBER_REPORT")), /*#__PURE__*/React.createElement("li", null, t("WS_DOC_BUILDING_PLAN")), /*#__PURE__*/React.createElement("li", null, t("WS_DOC_PROPERTY_TAX_RECEIPT")), /*#__PURE__*/React.createElement("li", null, t("WS_DOC_APPLICANT_PHOTOGRAPH")))), !hasProperty || (hasProperty === null || hasProperty === void 0 ? void 0 : hasProperty.code) === "YES" && !selectedProperty ? /*#__PURE__*/React.createElement(SubmitBar, {
|
|
38288
38672
|
label: t("CS_COMMON_NEXT"),
|
|
38289
38673
|
onSubmit: () => {},
|
|
38290
38674
|
disabled: true
|
|
@@ -43335,12 +43719,12 @@ const configSVApproverApplication = _ref => {
|
|
|
43335
43719
|
};
|
|
43336
43720
|
};
|
|
43337
43721
|
|
|
43338
|
-
const Heading = props => {
|
|
43722
|
+
const Heading$1 = props => {
|
|
43339
43723
|
return /*#__PURE__*/React.createElement("h1", {
|
|
43340
43724
|
className: "heading-m"
|
|
43341
43725
|
}, props.label);
|
|
43342
43726
|
};
|
|
43343
|
-
const Close$
|
|
43727
|
+
const Close$2 = () => /*#__PURE__*/React.createElement("svg", {
|
|
43344
43728
|
xmlns: "http://www.w3.org/2000/svg",
|
|
43345
43729
|
viewBox: "0 0 24 24",
|
|
43346
43730
|
fill: "#FFFFFF"
|
|
@@ -43350,11 +43734,11 @@ const Close$1 = () => /*#__PURE__*/React.createElement("svg", {
|
|
|
43350
43734
|
}), /*#__PURE__*/React.createElement("path", {
|
|
43351
43735
|
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
|
|
43352
43736
|
}));
|
|
43353
|
-
const CloseBtn = props => {
|
|
43737
|
+
const CloseBtn$1 = props => {
|
|
43354
43738
|
return /*#__PURE__*/React.createElement("div", {
|
|
43355
43739
|
className: "icon-bg-secondary",
|
|
43356
43740
|
onClick: props.onClick
|
|
43357
|
-
}, /*#__PURE__*/React.createElement(Close$
|
|
43741
|
+
}, /*#__PURE__*/React.createElement(Close$2, null));
|
|
43358
43742
|
};
|
|
43359
43743
|
const ActionModal = _ref => {
|
|
43360
43744
|
var _action$assigneeRoles, _action$assigneeRoles2;
|
|
@@ -43536,10 +43920,10 @@ const ActionModal = _ref => {
|
|
|
43536
43920
|
}
|
|
43537
43921
|
}, [action, approvers, financialYears, selectedFinancialYear, uploadedFile]);
|
|
43538
43922
|
return action && config.form ? /*#__PURE__*/React.createElement(Modal, {
|
|
43539
|
-
headerBarMain: /*#__PURE__*/React.createElement(Heading, {
|
|
43923
|
+
headerBarMain: /*#__PURE__*/React.createElement(Heading$1, {
|
|
43540
43924
|
label: t(config.label.heading)
|
|
43541
43925
|
}),
|
|
43542
|
-
headerBarEnd: /*#__PURE__*/React.createElement(CloseBtn, {
|
|
43926
|
+
headerBarEnd: /*#__PURE__*/React.createElement(CloseBtn$1, {
|
|
43543
43927
|
onClick: closeModal
|
|
43544
43928
|
}),
|
|
43545
43929
|
actionCancelLabel: t(config.label.cancel),
|
|
@@ -43559,12 +43943,12 @@ const ActionModal = _ref => {
|
|
|
43559
43943
|
})) : /*#__PURE__*/React.createElement(Loader, null);
|
|
43560
43944
|
};
|
|
43561
43945
|
|
|
43562
|
-
const Heading$
|
|
43946
|
+
const Heading$2 = props => {
|
|
43563
43947
|
return /*#__PURE__*/React.createElement("h1", {
|
|
43564
43948
|
className: "heading-m"
|
|
43565
43949
|
}, props.label);
|
|
43566
43950
|
};
|
|
43567
|
-
const Close$
|
|
43951
|
+
const Close$3 = () => /*#__PURE__*/React.createElement("svg", {
|
|
43568
43952
|
xmlns: "http://www.w3.org/2000/svg",
|
|
43569
43953
|
viewBox: "0 0 24 24",
|
|
43570
43954
|
fill: "#FFFFFF"
|
|
@@ -43574,11 +43958,11 @@ const Close$2 = () => /*#__PURE__*/React.createElement("svg", {
|
|
|
43574
43958
|
}), /*#__PURE__*/React.createElement("path", {
|
|
43575
43959
|
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
|
|
43576
43960
|
}));
|
|
43577
|
-
const CloseBtn$
|
|
43961
|
+
const CloseBtn$2 = props => {
|
|
43578
43962
|
return /*#__PURE__*/React.createElement("div", {
|
|
43579
43963
|
className: "icon-bg-secondary",
|
|
43580
43964
|
onClick: props.onClick
|
|
43581
|
-
}, /*#__PURE__*/React.createElement(Close$
|
|
43965
|
+
}, /*#__PURE__*/React.createElement(Close$3, null));
|
|
43582
43966
|
};
|
|
43583
43967
|
const ActionModal$1 = _ref => {
|
|
43584
43968
|
var _action$assigneeRoles, _action$assigneeRoles2;
|
|
@@ -43716,10 +44100,10 @@ const ActionModal$1 = _ref => {
|
|
|
43716
44100
|
}
|
|
43717
44101
|
}, [action, approvers, financialYears, selectedFinancialYear, uploadedFile]);
|
|
43718
44102
|
return action && config.form ? /*#__PURE__*/React.createElement(Modal, {
|
|
43719
|
-
headerBarMain: /*#__PURE__*/React.createElement(Heading$
|
|
44103
|
+
headerBarMain: /*#__PURE__*/React.createElement(Heading$2, {
|
|
43720
44104
|
label: t(config.label.heading)
|
|
43721
44105
|
}),
|
|
43722
|
-
headerBarEnd: /*#__PURE__*/React.createElement(CloseBtn$
|
|
44106
|
+
headerBarEnd: /*#__PURE__*/React.createElement(CloseBtn$2, {
|
|
43723
44107
|
onClick: closeModal
|
|
43724
44108
|
}),
|
|
43725
44109
|
actionCancelLabel: t(config.label.cancel),
|
|
@@ -43738,7 +44122,7 @@ const ActionModal$1 = _ref => {
|
|
|
43738
44122
|
})) : /*#__PURE__*/React.createElement(Loader, null);
|
|
43739
44123
|
};
|
|
43740
44124
|
|
|
43741
|
-
const Heading$
|
|
44125
|
+
const Heading$3 = props => {
|
|
43742
44126
|
return /*#__PURE__*/React.createElement("h1", {
|
|
43743
44127
|
style: {
|
|
43744
44128
|
marginLeft: "22px"
|
|
@@ -43746,7 +44130,7 @@ const Heading$2 = props => {
|
|
|
43746
44130
|
className: "heading-m BPAheading-m"
|
|
43747
44131
|
}, props.label);
|
|
43748
44132
|
};
|
|
43749
|
-
const Close$
|
|
44133
|
+
const Close$4 = () => /*#__PURE__*/React.createElement("svg", {
|
|
43750
44134
|
xmlns: "http://www.w3.org/2000/svg",
|
|
43751
44135
|
viewBox: "0 0 24 24",
|
|
43752
44136
|
fill: "#FFFFFF"
|
|
@@ -43756,11 +44140,11 @@ const Close$3 = () => /*#__PURE__*/React.createElement("svg", {
|
|
|
43756
44140
|
}), /*#__PURE__*/React.createElement("path", {
|
|
43757
44141
|
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
|
|
43758
44142
|
}));
|
|
43759
|
-
const CloseBtn$
|
|
44143
|
+
const CloseBtn$3 = props => {
|
|
43760
44144
|
return /*#__PURE__*/React.createElement("div", {
|
|
43761
44145
|
className: "icon-bg-secondary",
|
|
43762
44146
|
onClick: props.onClick
|
|
43763
|
-
}, /*#__PURE__*/React.createElement(Close$
|
|
44147
|
+
}, /*#__PURE__*/React.createElement(Close$4, null));
|
|
43764
44148
|
};
|
|
43765
44149
|
const ActionModal$2 = _ref => {
|
|
43766
44150
|
var _action$assigneeRoles, _action$assigneeRoles2;
|
|
@@ -43888,10 +44272,10 @@ const ActionModal$2 = _ref => {
|
|
|
43888
44272
|
}
|
|
43889
44273
|
}, [action, approvers, uploadedFile, error]);
|
|
43890
44274
|
return action && config.form ? /*#__PURE__*/React.createElement(Modal, {
|
|
43891
|
-
headerBarMain: /*#__PURE__*/React.createElement(Heading$
|
|
44275
|
+
headerBarMain: /*#__PURE__*/React.createElement(Heading$3, {
|
|
43892
44276
|
label: t(config.label.heading)
|
|
43893
44277
|
}),
|
|
43894
|
-
headerBarEnd: /*#__PURE__*/React.createElement(CloseBtn$
|
|
44278
|
+
headerBarEnd: /*#__PURE__*/React.createElement(CloseBtn$3, {
|
|
43895
44279
|
onClick: closeModal
|
|
43896
44280
|
}),
|
|
43897
44281
|
actionCancelLabel: t(config.label.cancel),
|
|
@@ -43932,7 +44316,7 @@ const ActionModal$2 = _ref => {
|
|
|
43932
44316
|
})) : /*#__PURE__*/React.createElement(Loader, null);
|
|
43933
44317
|
};
|
|
43934
44318
|
|
|
43935
|
-
const Heading$
|
|
44319
|
+
const Heading$4 = props => {
|
|
43936
44320
|
return /*#__PURE__*/React.createElement("h1", {
|
|
43937
44321
|
style: {
|
|
43938
44322
|
marginLeft: "22px"
|
|
@@ -43940,7 +44324,7 @@ const Heading$3 = props => {
|
|
|
43940
44324
|
className: "heading-m BPAheading-m"
|
|
43941
44325
|
}, props.label);
|
|
43942
44326
|
};
|
|
43943
|
-
const Close$
|
|
44327
|
+
const Close$5 = () => /*#__PURE__*/React.createElement("svg", {
|
|
43944
44328
|
xmlns: "http://www.w3.org/2000/svg",
|
|
43945
44329
|
viewBox: "0 0 24 24",
|
|
43946
44330
|
fill: "#FFFFFF"
|
|
@@ -43950,11 +44334,11 @@ const Close$4 = () => /*#__PURE__*/React.createElement("svg", {
|
|
|
43950
44334
|
}), /*#__PURE__*/React.createElement("path", {
|
|
43951
44335
|
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
|
|
43952
44336
|
}));
|
|
43953
|
-
const CloseBtn$
|
|
44337
|
+
const CloseBtn$4 = props => {
|
|
43954
44338
|
return /*#__PURE__*/React.createElement("div", {
|
|
43955
44339
|
className: "icon-bg-secondary",
|
|
43956
44340
|
onClick: props.onClick
|
|
43957
|
-
}, /*#__PURE__*/React.createElement(Close$
|
|
44341
|
+
}, /*#__PURE__*/React.createElement(Close$5, null));
|
|
43958
44342
|
};
|
|
43959
44343
|
const ActionModal$3 = _ref => {
|
|
43960
44344
|
var _applicationData, _applicationData$land, _applicationData$land2, _applicationData2, _applicationData2$lan, _applicationData2$lan2, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5, _workflowDetails$data6;
|
|
@@ -44221,10 +44605,10 @@ const ActionModal$3 = _ref => {
|
|
|
44221
44605
|
}
|
|
44222
44606
|
}, [action, approvers, selectedFinancialYear, uploadedFile, error]);
|
|
44223
44607
|
return action && config.form ? /*#__PURE__*/React.createElement(Modal, {
|
|
44224
|
-
headerBarMain: /*#__PURE__*/React.createElement(Heading$
|
|
44608
|
+
headerBarMain: /*#__PURE__*/React.createElement(Heading$4, {
|
|
44225
44609
|
label: t(config.label.heading)
|
|
44226
44610
|
}),
|
|
44227
|
-
headerBarEnd: /*#__PURE__*/React.createElement(CloseBtn$
|
|
44611
|
+
headerBarEnd: /*#__PURE__*/React.createElement(CloseBtn$4, {
|
|
44228
44612
|
onClick: closeModal
|
|
44229
44613
|
}),
|
|
44230
44614
|
actionCancelLabel: t(config.label.cancel),
|
|
@@ -44267,7 +44651,7 @@ const ActionModal$3 = _ref => {
|
|
|
44267
44651
|
})) : /*#__PURE__*/React.createElement(Loader, null);
|
|
44268
44652
|
};
|
|
44269
44653
|
|
|
44270
|
-
const Heading$
|
|
44654
|
+
const Heading$5 = props => {
|
|
44271
44655
|
return /*#__PURE__*/React.createElement("h1", {
|
|
44272
44656
|
style: {
|
|
44273
44657
|
marginLeft: "22px"
|
|
@@ -44275,7 +44659,7 @@ const Heading$4 = props => {
|
|
|
44275
44659
|
className: "heading-m BPAheading-m"
|
|
44276
44660
|
}, props.label);
|
|
44277
44661
|
};
|
|
44278
|
-
const Close$
|
|
44662
|
+
const Close$6 = () => /*#__PURE__*/React.createElement("svg", {
|
|
44279
44663
|
xmlns: "http://www.w3.org/2000/svg",
|
|
44280
44664
|
viewBox: "0 0 24 24",
|
|
44281
44665
|
fill: "#FFFFFF"
|
|
@@ -44285,11 +44669,11 @@ const Close$5 = () => /*#__PURE__*/React.createElement("svg", {
|
|
|
44285
44669
|
}), /*#__PURE__*/React.createElement("path", {
|
|
44286
44670
|
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
|
|
44287
44671
|
}));
|
|
44288
|
-
const CloseBtn$
|
|
44672
|
+
const CloseBtn$5 = props => {
|
|
44289
44673
|
return /*#__PURE__*/React.createElement("div", {
|
|
44290
44674
|
className: "icon-bg-secondary",
|
|
44291
44675
|
onClick: props.onClick
|
|
44292
|
-
}, /*#__PURE__*/React.createElement(Close$
|
|
44676
|
+
}, /*#__PURE__*/React.createElement(Close$6, null));
|
|
44293
44677
|
};
|
|
44294
44678
|
const ActionModal$4 = _ref => {
|
|
44295
44679
|
var _action$assigneeRoles, _action$assigneeRoles2;
|
|
@@ -44428,10 +44812,10 @@ const ActionModal$4 = _ref => {
|
|
|
44428
44812
|
}
|
|
44429
44813
|
}, [action, approvers, uploadedFile, error]);
|
|
44430
44814
|
return action && config.form ? /*#__PURE__*/React.createElement(Modal, {
|
|
44431
|
-
headerBarMain: /*#__PURE__*/React.createElement(Heading$
|
|
44815
|
+
headerBarMain: /*#__PURE__*/React.createElement(Heading$5, {
|
|
44432
44816
|
label: t(config.label.heading)
|
|
44433
44817
|
}),
|
|
44434
|
-
headerBarEnd: /*#__PURE__*/React.createElement(CloseBtn$
|
|
44818
|
+
headerBarEnd: /*#__PURE__*/React.createElement(CloseBtn$5, {
|
|
44435
44819
|
onClick: closeModal
|
|
44436
44820
|
}),
|
|
44437
44821
|
actionCancelLabel: t(config.label.cancel),
|
|
@@ -44472,12 +44856,12 @@ const ActionModal$4 = _ref => {
|
|
|
44472
44856
|
})) : /*#__PURE__*/React.createElement(Loader, null);
|
|
44473
44857
|
};
|
|
44474
44858
|
|
|
44475
|
-
const Heading$
|
|
44859
|
+
const Heading$6 = props => {
|
|
44476
44860
|
return /*#__PURE__*/React.createElement("h1", {
|
|
44477
44861
|
className: "heading-m"
|
|
44478
44862
|
}, props.label);
|
|
44479
44863
|
};
|
|
44480
|
-
const Close$
|
|
44864
|
+
const Close$7 = () => /*#__PURE__*/React.createElement("svg", {
|
|
44481
44865
|
xmlns: "http://www.w3.org/2000/svg",
|
|
44482
44866
|
viewBox: "0 0 24 24",
|
|
44483
44867
|
fill: "#FFFFFF"
|
|
@@ -44487,11 +44871,11 @@ const Close$6 = () => /*#__PURE__*/React.createElement("svg", {
|
|
|
44487
44871
|
}), /*#__PURE__*/React.createElement("path", {
|
|
44488
44872
|
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
|
|
44489
44873
|
}));
|
|
44490
|
-
const CloseBtn$
|
|
44874
|
+
const CloseBtn$6 = props => {
|
|
44491
44875
|
return /*#__PURE__*/React.createElement("div", {
|
|
44492
44876
|
className: "icon-bg-secondary",
|
|
44493
44877
|
onClick: props.onClick
|
|
44494
|
-
}, /*#__PURE__*/React.createElement(Close$
|
|
44878
|
+
}, /*#__PURE__*/React.createElement(Close$7, null));
|
|
44495
44879
|
};
|
|
44496
44880
|
const convertDateToEpochNew$1 = function (dateString, dayStartOrEnd) {
|
|
44497
44881
|
if (dayStartOrEnd === void 0) {
|
|
@@ -44804,10 +45188,10 @@ const ActionModal$5 = _ref => {
|
|
|
44804
45188
|
}
|
|
44805
45189
|
}, [action, approvers, uploadedFile, error, isReasonRequiredAction, selectedReason, otherReasonText, showApprovalChecklist, approvalChecklist, applicationData]);
|
|
44806
45190
|
return action && config.form ? /*#__PURE__*/React.createElement(Modal, {
|
|
44807
|
-
headerBarMain: /*#__PURE__*/React.createElement(Heading$
|
|
45191
|
+
headerBarMain: /*#__PURE__*/React.createElement(Heading$6, {
|
|
44808
45192
|
label: t(config.label.heading)
|
|
44809
45193
|
}),
|
|
44810
|
-
headerBarEnd: /*#__PURE__*/React.createElement(CloseBtn$
|
|
45194
|
+
headerBarEnd: /*#__PURE__*/React.createElement(CloseBtn$6, {
|
|
44811
45195
|
onClick: closeModal
|
|
44812
45196
|
}),
|
|
44813
45197
|
actionCancelLabel: t(config.label.cancel),
|
|
@@ -44840,167 +45224,6 @@ const ActionModal$5 = _ref => {
|
|
|
44840
45224
|
}))) : /*#__PURE__*/React.createElement(Loader, null);
|
|
44841
45225
|
};
|
|
44842
45226
|
|
|
44843
|
-
const Heading$6 = props => {
|
|
44844
|
-
return /*#__PURE__*/React.createElement("h1", {
|
|
44845
|
-
className: "heading-m"
|
|
44846
|
-
}, props.label);
|
|
44847
|
-
};
|
|
44848
|
-
const Close$7 = () => /*#__PURE__*/React.createElement("svg", {
|
|
44849
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
44850
|
-
viewBox: "0 0 24 24",
|
|
44851
|
-
fill: "#FFFFFF"
|
|
44852
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
44853
|
-
d: "M0 0h24v24H0V0z",
|
|
44854
|
-
fill: "none"
|
|
44855
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
44856
|
-
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
|
|
44857
|
-
}));
|
|
44858
|
-
const CloseBtn$6 = props => {
|
|
44859
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
44860
|
-
className: "icon-bg-secondary",
|
|
44861
|
-
onClick: props.onClick
|
|
44862
|
-
}, /*#__PURE__*/React.createElement(Close$7, null));
|
|
44863
|
-
};
|
|
44864
|
-
const ActionModal$6 = _ref => {
|
|
44865
|
-
var _action$assigneeRoles, _action$assigneeRoles2;
|
|
44866
|
-
let {
|
|
44867
|
-
t,
|
|
44868
|
-
action,
|
|
44869
|
-
tenantId,
|
|
44870
|
-
state,
|
|
44871
|
-
id,
|
|
44872
|
-
closeModal,
|
|
44873
|
-
submitAction,
|
|
44874
|
-
actionData,
|
|
44875
|
-
applicationData,
|
|
44876
|
-
businessService,
|
|
44877
|
-
moduleCode
|
|
44878
|
-
} = _ref;
|
|
44879
|
-
console.log("applicationData", applicationData);
|
|
44880
|
-
const {
|
|
44881
|
-
data: approverData,
|
|
44882
|
-
isLoading: PTALoading
|
|
44883
|
-
} = Digit.Hooks.useEmployeeSearch(tenantId, {
|
|
44884
|
-
roles: action === null || action === void 0 ? void 0 : (_action$assigneeRoles = action.assigneeRoles) === null || _action$assigneeRoles === void 0 ? void 0 : (_action$assigneeRoles2 = _action$assigneeRoles.map) === null || _action$assigneeRoles2 === void 0 ? void 0 : _action$assigneeRoles2.call(_action$assigneeRoles, e => ({
|
|
44885
|
-
code: e
|
|
44886
|
-
})),
|
|
44887
|
-
isActive: true
|
|
44888
|
-
}, {
|
|
44889
|
-
enabled: !(action !== null && action !== void 0 && action.isTerminateState)
|
|
44890
|
-
});
|
|
44891
|
-
const [config, setConfig] = useState({});
|
|
44892
|
-
const [defaultValues, setDefaultValues] = useState({});
|
|
44893
|
-
const [approvers, setApprovers] = useState([]);
|
|
44894
|
-
const [selectedApprover, setSelectedApprover] = useState(null);
|
|
44895
|
-
const [file, setFile] = useState(null);
|
|
44896
|
-
const [uploadedFile, setUploadedFile] = useState(null);
|
|
44897
|
-
const [error, setError] = useState(null);
|
|
44898
|
-
const [disableActionSubmit, setDisableActionSubmit] = useState(false);
|
|
44899
|
-
useEffect(() => {
|
|
44900
|
-
var _approverData$Employe;
|
|
44901
|
-
setApprovers(approverData === null || approverData === void 0 ? void 0 : (_approverData$Employe = approverData.Employees) === null || _approverData$Employe === void 0 ? void 0 : _approverData$Employe.map(employee => {
|
|
44902
|
-
var _employee$user;
|
|
44903
|
-
return {
|
|
44904
|
-
uuid: employee === null || employee === void 0 ? void 0 : employee.uuid,
|
|
44905
|
-
name: employee === null || employee === void 0 ? void 0 : (_employee$user = employee.user) === null || _employee$user === void 0 ? void 0 : _employee$user.name
|
|
44906
|
-
};
|
|
44907
|
-
}));
|
|
44908
|
-
}, [approverData]);
|
|
44909
|
-
function selectFile(e) {
|
|
44910
|
-
setFile(e.target.files[0]);
|
|
44911
|
-
}
|
|
44912
|
-
useEffect(() => {
|
|
44913
|
-
(function () {
|
|
44914
|
-
try {
|
|
44915
|
-
setError(null);
|
|
44916
|
-
const _temp3 = function () {
|
|
44917
|
-
if (file) {
|
|
44918
|
-
const _temp2 = function () {
|
|
44919
|
-
if (file.size >= 5242880) {
|
|
44920
|
-
setError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));
|
|
44921
|
-
} else {
|
|
44922
|
-
const _temp = _catch(function () {
|
|
44923
|
-
return Promise.resolve(Digit.UploadServices.Filestorage("PTR", file, Digit.ULBService.getStateId())).then(function (response) {
|
|
44924
|
-
var _response$data, _response$data$files;
|
|
44925
|
-
if ((response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$files = _response$data.files) === null || _response$data$files === void 0 ? void 0 : _response$data$files.length) > 0) {
|
|
44926
|
-
var _response$data2, _response$data2$files;
|
|
44927
|
-
setUploadedFile(response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$files = _response$data2.files[0]) === null || _response$data2$files === void 0 ? void 0 : _response$data2$files.fileStoreId);
|
|
44928
|
-
} else {
|
|
44929
|
-
setError(t("CS_FILE_UPLOAD_ERROR"));
|
|
44930
|
-
}
|
|
44931
|
-
});
|
|
44932
|
-
}, function () {
|
|
44933
|
-
setError(t("CS_FILE_UPLOAD_ERROR"));
|
|
44934
|
-
});
|
|
44935
|
-
if (_temp && _temp.then) return _temp.then(function () {});
|
|
44936
|
-
}
|
|
44937
|
-
}();
|
|
44938
|
-
if (_temp2 && _temp2.then) return _temp2.then(function () {});
|
|
44939
|
-
}
|
|
44940
|
-
}();
|
|
44941
|
-
return _temp3 && _temp3.then ? _temp3.then(function () {}) : void 0;
|
|
44942
|
-
} catch (e) {
|
|
44943
|
-
Promise.reject(e);
|
|
44944
|
-
}
|
|
44945
|
-
})();
|
|
44946
|
-
}, [file]);
|
|
44947
|
-
function submit(data) {
|
|
44948
|
-
let workflow = {
|
|
44949
|
-
action: action === null || action === void 0 ? void 0 : action.action,
|
|
44950
|
-
comments: data === null || data === void 0 ? void 0 : data.comments,
|
|
44951
|
-
businessService,
|
|
44952
|
-
moduleName: moduleCode
|
|
44953
|
-
};
|
|
44954
|
-
if (uploadedFile) workflow["documents"] = [{
|
|
44955
|
-
documentType: (action === null || action === void 0 ? void 0 : action.action) + " DOC",
|
|
44956
|
-
fileName: file === null || file === void 0 ? void 0 : file.name,
|
|
44957
|
-
filestoreId: uploadedFile
|
|
44958
|
-
}];
|
|
44959
|
-
submitAction({
|
|
44960
|
-
PetRegistrationApplications: [{
|
|
44961
|
-
...applicationData,
|
|
44962
|
-
workflow
|
|
44963
|
-
}]
|
|
44964
|
-
});
|
|
44965
|
-
}
|
|
44966
|
-
useEffect(() => {
|
|
44967
|
-
if (action) {
|
|
44968
|
-
setConfig(configPTRApproverApplication({
|
|
44969
|
-
t,
|
|
44970
|
-
action,
|
|
44971
|
-
approvers,
|
|
44972
|
-
selectedApprover,
|
|
44973
|
-
setSelectedApprover,
|
|
44974
|
-
selectFile,
|
|
44975
|
-
uploadedFile,
|
|
44976
|
-
setUploadedFile,
|
|
44977
|
-
businessService
|
|
44978
|
-
}));
|
|
44979
|
-
}
|
|
44980
|
-
}, [action, approvers, uploadedFile]);
|
|
44981
|
-
return action && config.form ? /*#__PURE__*/React.createElement(Modal, {
|
|
44982
|
-
headerBarMain: /*#__PURE__*/React.createElement(Heading$6, {
|
|
44983
|
-
label: t(config.label.heading)
|
|
44984
|
-
}),
|
|
44985
|
-
headerBarEnd: /*#__PURE__*/React.createElement(CloseBtn$6, {
|
|
44986
|
-
onClick: closeModal
|
|
44987
|
-
}),
|
|
44988
|
-
actionCancelLabel: t(config.label.cancel),
|
|
44989
|
-
actionCancelOnSubmit: closeModal,
|
|
44990
|
-
actionSaveLabel: t(config.label.submit),
|
|
44991
|
-
actionSaveOnSubmit: () => {},
|
|
44992
|
-
formId: "modal-action"
|
|
44993
|
-
}, /*#__PURE__*/React.createElement(FormComposer, {
|
|
44994
|
-
config: config.form,
|
|
44995
|
-
noBoxShadow: true,
|
|
44996
|
-
inline: true,
|
|
44997
|
-
childrenAtTheBottom: true,
|
|
44998
|
-
onSubmit: submit,
|
|
44999
|
-
defaultValues: defaultValues,
|
|
45000
|
-
formId: "modal-action"
|
|
45001
|
-
})) : /*#__PURE__*/React.createElement(Loader, null);
|
|
45002
|
-
};
|
|
45003
|
-
|
|
45004
45227
|
const Heading$7 = props => {
|
|
45005
45228
|
return /*#__PURE__*/React.createElement("h1", {
|
|
45006
45229
|
className: "heading-m"
|
|
@@ -45022,6 +45245,167 @@ const CloseBtn$7 = props => {
|
|
|
45022
45245
|
onClick: props.onClick
|
|
45023
45246
|
}, /*#__PURE__*/React.createElement(Close$8, null));
|
|
45024
45247
|
};
|
|
45248
|
+
const ActionModal$6 = _ref => {
|
|
45249
|
+
var _action$assigneeRoles, _action$assigneeRoles2;
|
|
45250
|
+
let {
|
|
45251
|
+
t,
|
|
45252
|
+
action,
|
|
45253
|
+
tenantId,
|
|
45254
|
+
state,
|
|
45255
|
+
id,
|
|
45256
|
+
closeModal,
|
|
45257
|
+
submitAction,
|
|
45258
|
+
actionData,
|
|
45259
|
+
applicationData,
|
|
45260
|
+
businessService,
|
|
45261
|
+
moduleCode
|
|
45262
|
+
} = _ref;
|
|
45263
|
+
console.log("applicationData", applicationData);
|
|
45264
|
+
const {
|
|
45265
|
+
data: approverData,
|
|
45266
|
+
isLoading: PTALoading
|
|
45267
|
+
} = Digit.Hooks.useEmployeeSearch(tenantId, {
|
|
45268
|
+
roles: action === null || action === void 0 ? void 0 : (_action$assigneeRoles = action.assigneeRoles) === null || _action$assigneeRoles === void 0 ? void 0 : (_action$assigneeRoles2 = _action$assigneeRoles.map) === null || _action$assigneeRoles2 === void 0 ? void 0 : _action$assigneeRoles2.call(_action$assigneeRoles, e => ({
|
|
45269
|
+
code: e
|
|
45270
|
+
})),
|
|
45271
|
+
isActive: true
|
|
45272
|
+
}, {
|
|
45273
|
+
enabled: !(action !== null && action !== void 0 && action.isTerminateState)
|
|
45274
|
+
});
|
|
45275
|
+
const [config, setConfig] = useState({});
|
|
45276
|
+
const [defaultValues, setDefaultValues] = useState({});
|
|
45277
|
+
const [approvers, setApprovers] = useState([]);
|
|
45278
|
+
const [selectedApprover, setSelectedApprover] = useState(null);
|
|
45279
|
+
const [file, setFile] = useState(null);
|
|
45280
|
+
const [uploadedFile, setUploadedFile] = useState(null);
|
|
45281
|
+
const [error, setError] = useState(null);
|
|
45282
|
+
const [disableActionSubmit, setDisableActionSubmit] = useState(false);
|
|
45283
|
+
useEffect(() => {
|
|
45284
|
+
var _approverData$Employe;
|
|
45285
|
+
setApprovers(approverData === null || approverData === void 0 ? void 0 : (_approverData$Employe = approverData.Employees) === null || _approverData$Employe === void 0 ? void 0 : _approverData$Employe.map(employee => {
|
|
45286
|
+
var _employee$user;
|
|
45287
|
+
return {
|
|
45288
|
+
uuid: employee === null || employee === void 0 ? void 0 : employee.uuid,
|
|
45289
|
+
name: employee === null || employee === void 0 ? void 0 : (_employee$user = employee.user) === null || _employee$user === void 0 ? void 0 : _employee$user.name
|
|
45290
|
+
};
|
|
45291
|
+
}));
|
|
45292
|
+
}, [approverData]);
|
|
45293
|
+
function selectFile(e) {
|
|
45294
|
+
setFile(e.target.files[0]);
|
|
45295
|
+
}
|
|
45296
|
+
useEffect(() => {
|
|
45297
|
+
(function () {
|
|
45298
|
+
try {
|
|
45299
|
+
setError(null);
|
|
45300
|
+
const _temp3 = function () {
|
|
45301
|
+
if (file) {
|
|
45302
|
+
const _temp2 = function () {
|
|
45303
|
+
if (file.size >= 5242880) {
|
|
45304
|
+
setError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));
|
|
45305
|
+
} else {
|
|
45306
|
+
const _temp = _catch(function () {
|
|
45307
|
+
return Promise.resolve(Digit.UploadServices.Filestorage("PTR", file, Digit.ULBService.getStateId())).then(function (response) {
|
|
45308
|
+
var _response$data, _response$data$files;
|
|
45309
|
+
if ((response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$files = _response$data.files) === null || _response$data$files === void 0 ? void 0 : _response$data$files.length) > 0) {
|
|
45310
|
+
var _response$data2, _response$data2$files;
|
|
45311
|
+
setUploadedFile(response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$files = _response$data2.files[0]) === null || _response$data2$files === void 0 ? void 0 : _response$data2$files.fileStoreId);
|
|
45312
|
+
} else {
|
|
45313
|
+
setError(t("CS_FILE_UPLOAD_ERROR"));
|
|
45314
|
+
}
|
|
45315
|
+
});
|
|
45316
|
+
}, function () {
|
|
45317
|
+
setError(t("CS_FILE_UPLOAD_ERROR"));
|
|
45318
|
+
});
|
|
45319
|
+
if (_temp && _temp.then) return _temp.then(function () {});
|
|
45320
|
+
}
|
|
45321
|
+
}();
|
|
45322
|
+
if (_temp2 && _temp2.then) return _temp2.then(function () {});
|
|
45323
|
+
}
|
|
45324
|
+
}();
|
|
45325
|
+
return _temp3 && _temp3.then ? _temp3.then(function () {}) : void 0;
|
|
45326
|
+
} catch (e) {
|
|
45327
|
+
Promise.reject(e);
|
|
45328
|
+
}
|
|
45329
|
+
})();
|
|
45330
|
+
}, [file]);
|
|
45331
|
+
function submit(data) {
|
|
45332
|
+
let workflow = {
|
|
45333
|
+
action: action === null || action === void 0 ? void 0 : action.action,
|
|
45334
|
+
comments: data === null || data === void 0 ? void 0 : data.comments,
|
|
45335
|
+
businessService,
|
|
45336
|
+
moduleName: moduleCode
|
|
45337
|
+
};
|
|
45338
|
+
if (uploadedFile) workflow["documents"] = [{
|
|
45339
|
+
documentType: (action === null || action === void 0 ? void 0 : action.action) + " DOC",
|
|
45340
|
+
fileName: file === null || file === void 0 ? void 0 : file.name,
|
|
45341
|
+
filestoreId: uploadedFile
|
|
45342
|
+
}];
|
|
45343
|
+
submitAction({
|
|
45344
|
+
PetRegistrationApplications: [{
|
|
45345
|
+
...applicationData,
|
|
45346
|
+
workflow
|
|
45347
|
+
}]
|
|
45348
|
+
});
|
|
45349
|
+
}
|
|
45350
|
+
useEffect(() => {
|
|
45351
|
+
if (action) {
|
|
45352
|
+
setConfig(configPTRApproverApplication({
|
|
45353
|
+
t,
|
|
45354
|
+
action,
|
|
45355
|
+
approvers,
|
|
45356
|
+
selectedApprover,
|
|
45357
|
+
setSelectedApprover,
|
|
45358
|
+
selectFile,
|
|
45359
|
+
uploadedFile,
|
|
45360
|
+
setUploadedFile,
|
|
45361
|
+
businessService
|
|
45362
|
+
}));
|
|
45363
|
+
}
|
|
45364
|
+
}, [action, approvers, uploadedFile]);
|
|
45365
|
+
return action && config.form ? /*#__PURE__*/React.createElement(Modal, {
|
|
45366
|
+
headerBarMain: /*#__PURE__*/React.createElement(Heading$7, {
|
|
45367
|
+
label: t(config.label.heading)
|
|
45368
|
+
}),
|
|
45369
|
+
headerBarEnd: /*#__PURE__*/React.createElement(CloseBtn$7, {
|
|
45370
|
+
onClick: closeModal
|
|
45371
|
+
}),
|
|
45372
|
+
actionCancelLabel: t(config.label.cancel),
|
|
45373
|
+
actionCancelOnSubmit: closeModal,
|
|
45374
|
+
actionSaveLabel: t(config.label.submit),
|
|
45375
|
+
actionSaveOnSubmit: () => {},
|
|
45376
|
+
formId: "modal-action"
|
|
45377
|
+
}, /*#__PURE__*/React.createElement(FormComposer, {
|
|
45378
|
+
config: config.form,
|
|
45379
|
+
noBoxShadow: true,
|
|
45380
|
+
inline: true,
|
|
45381
|
+
childrenAtTheBottom: true,
|
|
45382
|
+
onSubmit: submit,
|
|
45383
|
+
defaultValues: defaultValues,
|
|
45384
|
+
formId: "modal-action"
|
|
45385
|
+
})) : /*#__PURE__*/React.createElement(Loader, null);
|
|
45386
|
+
};
|
|
45387
|
+
|
|
45388
|
+
const Heading$8 = props => {
|
|
45389
|
+
return /*#__PURE__*/React.createElement("h1", {
|
|
45390
|
+
className: "heading-m"
|
|
45391
|
+
}, props.label);
|
|
45392
|
+
};
|
|
45393
|
+
const Close$9 = () => /*#__PURE__*/React.createElement("svg", {
|
|
45394
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
45395
|
+
viewBox: "0 0 24 24",
|
|
45396
|
+
fill: "#FFFFFF"
|
|
45397
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
45398
|
+
d: "M0 0h24v24H0V0z",
|
|
45399
|
+
fill: "none"
|
|
45400
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
45401
|
+
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
|
|
45402
|
+
}));
|
|
45403
|
+
const CloseBtn$8 = props => {
|
|
45404
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
45405
|
+
className: "icon-bg-secondary",
|
|
45406
|
+
onClick: props.onClick
|
|
45407
|
+
}, /*#__PURE__*/React.createElement(Close$9, null));
|
|
45408
|
+
};
|
|
45025
45409
|
const ActionModal$7 = _ref => {
|
|
45026
45410
|
var _action$roles, _action$roles$, _action$roles$$map;
|
|
45027
45411
|
let {
|
|
@@ -45100,10 +45484,10 @@ const ActionModal$7 = _ref => {
|
|
|
45100
45484
|
}
|
|
45101
45485
|
}, [action, approvers, uploadedFile]);
|
|
45102
45486
|
return action && config.form ? /*#__PURE__*/React.createElement(Modal, {
|
|
45103
|
-
headerBarMain: /*#__PURE__*/React.createElement(Heading$
|
|
45487
|
+
headerBarMain: /*#__PURE__*/React.createElement(Heading$8, {
|
|
45104
45488
|
label: t(config.label.heading)
|
|
45105
45489
|
}),
|
|
45106
|
-
headerBarEnd: /*#__PURE__*/React.createElement(CloseBtn$
|
|
45490
|
+
headerBarEnd: /*#__PURE__*/React.createElement(CloseBtn$8, {
|
|
45107
45491
|
onClick: closeModal
|
|
45108
45492
|
}),
|
|
45109
45493
|
actionCancelLabel: t(config.label.cancel),
|
|
@@ -45126,12 +45510,12 @@ const ActionModal$7 = _ref => {
|
|
|
45126
45510
|
})) : /*#__PURE__*/React.createElement(Loader, null);
|
|
45127
45511
|
};
|
|
45128
45512
|
|
|
45129
|
-
const Heading$
|
|
45513
|
+
const Heading$9 = props => {
|
|
45130
45514
|
return /*#__PURE__*/React.createElement("h1", {
|
|
45131
45515
|
className: "heading-m"
|
|
45132
45516
|
}, props.label);
|
|
45133
45517
|
};
|
|
45134
|
-
const Close$
|
|
45518
|
+
const Close$a = () => /*#__PURE__*/React.createElement("svg", {
|
|
45135
45519
|
xmlns: "http://www.w3.org/2000/svg",
|
|
45136
45520
|
viewBox: "0 0 24 24",
|
|
45137
45521
|
fill: "#FFFFFF"
|
|
@@ -45141,11 +45525,11 @@ const Close$9 = () => /*#__PURE__*/React.createElement("svg", {
|
|
|
45141
45525
|
}), /*#__PURE__*/React.createElement("path", {
|
|
45142
45526
|
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
|
|
45143
45527
|
}));
|
|
45144
|
-
const CloseBtn$
|
|
45528
|
+
const CloseBtn$9 = props => {
|
|
45145
45529
|
return /*#__PURE__*/React.createElement("div", {
|
|
45146
45530
|
className: "icon-bg-secondary",
|
|
45147
45531
|
onClick: props.onClick
|
|
45148
|
-
}, /*#__PURE__*/React.createElement(Close$
|
|
45532
|
+
}, /*#__PURE__*/React.createElement(Close$a, null));
|
|
45149
45533
|
};
|
|
45150
45534
|
const ActionModal$8 = _ref => {
|
|
45151
45535
|
var _action$assigneeRoles, _action$assigneeRoles2;
|
|
@@ -45264,10 +45648,10 @@ const ActionModal$8 = _ref => {
|
|
|
45264
45648
|
}
|
|
45265
45649
|
}, [action, approvers, uploadedFile]);
|
|
45266
45650
|
return action && config.form ? /*#__PURE__*/React.createElement(Modal, {
|
|
45267
|
-
headerBarMain: /*#__PURE__*/React.createElement(Heading$
|
|
45651
|
+
headerBarMain: /*#__PURE__*/React.createElement(Heading$9, {
|
|
45268
45652
|
label: t(config.label.heading)
|
|
45269
45653
|
}),
|
|
45270
|
-
headerBarEnd: /*#__PURE__*/React.createElement(CloseBtn$
|
|
45654
|
+
headerBarEnd: /*#__PURE__*/React.createElement(CloseBtn$9, {
|
|
45271
45655
|
onClick: closeModal
|
|
45272
45656
|
}),
|
|
45273
45657
|
actionCancelLabel: t(config.label.cancel),
|
|
@@ -45286,12 +45670,12 @@ const ActionModal$8 = _ref => {
|
|
|
45286
45670
|
})) : /*#__PURE__*/React.createElement(Loader, null);
|
|
45287
45671
|
};
|
|
45288
45672
|
|
|
45289
|
-
const Heading$
|
|
45673
|
+
const Heading$a = props => {
|
|
45290
45674
|
return /*#__PURE__*/React.createElement("h1", {
|
|
45291
45675
|
className: "heading-m"
|
|
45292
45676
|
}, props.label);
|
|
45293
45677
|
};
|
|
45294
|
-
const Close$
|
|
45678
|
+
const Close$b = () => /*#__PURE__*/React.createElement("svg", {
|
|
45295
45679
|
xmlns: "http://www.w3.org/2000/svg",
|
|
45296
45680
|
viewBox: "0 0 24 24",
|
|
45297
45681
|
fill: "#FFFFFF"
|
|
@@ -45301,11 +45685,11 @@ const Close$a = () => /*#__PURE__*/React.createElement("svg", {
|
|
|
45301
45685
|
}), /*#__PURE__*/React.createElement("path", {
|
|
45302
45686
|
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
|
|
45303
45687
|
}));
|
|
45304
|
-
const CloseBtn$
|
|
45688
|
+
const CloseBtn$a = props => {
|
|
45305
45689
|
return /*#__PURE__*/React.createElement("div", {
|
|
45306
45690
|
className: "icon-bg-secondary",
|
|
45307
45691
|
onClick: props.onClick
|
|
45308
|
-
}, /*#__PURE__*/React.createElement(Close$
|
|
45692
|
+
}, /*#__PURE__*/React.createElement(Close$b, null));
|
|
45309
45693
|
};
|
|
45310
45694
|
const ActionModal$9 = _ref => {
|
|
45311
45695
|
var _action$assigneeRoles, _action$assigneeRoles2;
|
|
@@ -45431,10 +45815,10 @@ const ActionModal$9 = _ref => {
|
|
|
45431
45815
|
}, [action, approvers, uploadedFile]);
|
|
45432
45816
|
console.log("conggg", config);
|
|
45433
45817
|
return action && config.form ? /*#__PURE__*/React.createElement(Modal, {
|
|
45434
|
-
headerBarMain: /*#__PURE__*/React.createElement(Heading$
|
|
45818
|
+
headerBarMain: /*#__PURE__*/React.createElement(Heading$a, {
|
|
45435
45819
|
label: t(config.label.heading)
|
|
45436
45820
|
}),
|
|
45437
|
-
headerBarEnd: /*#__PURE__*/React.createElement(CloseBtn$
|
|
45821
|
+
headerBarEnd: /*#__PURE__*/React.createElement(CloseBtn$a, {
|
|
45438
45822
|
onClick: closeModal
|
|
45439
45823
|
}),
|
|
45440
45824
|
actionCancelLabel: t(config.label.cancel),
|
|
@@ -45453,12 +45837,12 @@ const ActionModal$9 = _ref => {
|
|
|
45453
45837
|
})) : /*#__PURE__*/React.createElement(Loader, null);
|
|
45454
45838
|
};
|
|
45455
45839
|
|
|
45456
|
-
const Heading$
|
|
45840
|
+
const Heading$b = props => {
|
|
45457
45841
|
return /*#__PURE__*/React.createElement("h1", {
|
|
45458
45842
|
className: "heading-m"
|
|
45459
45843
|
}, props.label);
|
|
45460
45844
|
};
|
|
45461
|
-
const Close$
|
|
45845
|
+
const Close$c = () => /*#__PURE__*/React.createElement("svg", {
|
|
45462
45846
|
xmlns: "http://www.w3.org/2000/svg",
|
|
45463
45847
|
viewBox: "0 0 24 24",
|
|
45464
45848
|
fill: "#FFFFFF"
|
|
@@ -45468,11 +45852,11 @@ const Close$b = () => /*#__PURE__*/React.createElement("svg", {
|
|
|
45468
45852
|
}), /*#__PURE__*/React.createElement("path", {
|
|
45469
45853
|
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
|
|
45470
45854
|
}));
|
|
45471
|
-
const CloseBtn$
|
|
45855
|
+
const CloseBtn$b = props => {
|
|
45472
45856
|
return /*#__PURE__*/React.createElement("div", {
|
|
45473
45857
|
className: "icon-bg-secondary",
|
|
45474
45858
|
onClick: props.onClick
|
|
45475
|
-
}, /*#__PURE__*/React.createElement(Close$
|
|
45859
|
+
}, /*#__PURE__*/React.createElement(Close$c, null));
|
|
45476
45860
|
};
|
|
45477
45861
|
const ActionModal$a = _ref => {
|
|
45478
45862
|
var _action$assigneeRoles, _action$assigneeRoles2;
|
|
@@ -45600,10 +45984,10 @@ const ActionModal$a = _ref => {
|
|
|
45600
45984
|
}));
|
|
45601
45985
|
}, [action, approvers, uploadedFile]);
|
|
45602
45986
|
return action && config.form ? /*#__PURE__*/React.createElement(Modal, {
|
|
45603
|
-
headerBarMain: /*#__PURE__*/React.createElement(Heading$
|
|
45987
|
+
headerBarMain: /*#__PURE__*/React.createElement(Heading$b, {
|
|
45604
45988
|
label: t(config.label.heading)
|
|
45605
45989
|
}),
|
|
45606
|
-
headerBarEnd: /*#__PURE__*/React.createElement(CloseBtn$
|
|
45990
|
+
headerBarEnd: /*#__PURE__*/React.createElement(CloseBtn$b, {
|
|
45607
45991
|
onClick: closeModal
|
|
45608
45992
|
}),
|
|
45609
45993
|
actionCancelLabel: t(config.label.cancel),
|
|
@@ -45687,12 +46071,12 @@ const configWTApproverApplication = _ref => {
|
|
|
45687
46071
|
};
|
|
45688
46072
|
};
|
|
45689
46073
|
|
|
45690
|
-
const Heading$
|
|
46074
|
+
const Heading$c = props => {
|
|
45691
46075
|
return /*#__PURE__*/React.createElement("h1", {
|
|
45692
46076
|
className: "heading-m"
|
|
45693
46077
|
}, props.label);
|
|
45694
46078
|
};
|
|
45695
|
-
const Close$
|
|
46079
|
+
const Close$d = () => /*#__PURE__*/React.createElement("svg", {
|
|
45696
46080
|
xmlns: "http://www.w3.org/2000/svg",
|
|
45697
46081
|
viewBox: "0 0 24 24",
|
|
45698
46082
|
fill: "#FFFFFF"
|
|
@@ -45702,11 +46086,11 @@ const Close$c = () => /*#__PURE__*/React.createElement("svg", {
|
|
|
45702
46086
|
}), /*#__PURE__*/React.createElement("path", {
|
|
45703
46087
|
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
|
|
45704
46088
|
}));
|
|
45705
|
-
const CloseBtn$
|
|
46089
|
+
const CloseBtn$c = props => {
|
|
45706
46090
|
return /*#__PURE__*/React.createElement("div", {
|
|
45707
46091
|
className: "icon-bg-secondary",
|
|
45708
46092
|
onClick: props.onClick
|
|
45709
|
-
}, /*#__PURE__*/React.createElement(Close$
|
|
46093
|
+
}, /*#__PURE__*/React.createElement(Close$d, null));
|
|
45710
46094
|
};
|
|
45711
46095
|
const ActionModal$b = _ref => {
|
|
45712
46096
|
var _action$assigneeRoles, _action$assigneeRoles2, _dsoData$vendor, _vehicleData$vehicle, _vehicleData$vehicle$;
|
|
@@ -45904,10 +46288,10 @@ const ActionModal$b = _ref => {
|
|
|
45904
46288
|
}
|
|
45905
46289
|
}, [action, approvers, uploadedFile, dsoData, selectVehicle, vehicleData]);
|
|
45906
46290
|
return action && config.form ? /*#__PURE__*/React.createElement(Modal, {
|
|
45907
|
-
headerBarMain: /*#__PURE__*/React.createElement(Heading$
|
|
46291
|
+
headerBarMain: /*#__PURE__*/React.createElement(Heading$c, {
|
|
45908
46292
|
label: t(config.label.heading)
|
|
45909
46293
|
}),
|
|
45910
|
-
headerBarEnd: /*#__PURE__*/React.createElement(CloseBtn$
|
|
46294
|
+
headerBarEnd: /*#__PURE__*/React.createElement(CloseBtn$c, {
|
|
45911
46295
|
onClick: closeModal
|
|
45912
46296
|
}),
|
|
45913
46297
|
actionCancelLabel: t(config.label.cancel),
|
|
@@ -46794,7 +47178,7 @@ const PermissionCheck = _ref => {
|
|
|
46794
47178
|
} : {},
|
|
46795
47179
|
placeholder: t("BPA_ENTER_PERMIT_CONDITIONS_LABEL")
|
|
46796
47180
|
}), /*#__PURE__*/React.createElement(LinkButton, {
|
|
46797
|
-
label: /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Close$
|
|
47181
|
+
label: /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Close$g, {
|
|
46798
47182
|
style: {
|
|
46799
47183
|
float: "right",
|
|
46800
47184
|
position: "relative",
|
|
@@ -48198,7 +48582,7 @@ const ArrearSummary = _ref => {
|
|
|
48198
48582
|
}, t("CS_HIDE_CARD"))));
|
|
48199
48583
|
};
|
|
48200
48584
|
|
|
48201
|
-
const Close$
|
|
48585
|
+
const Close$e = () => /*#__PURE__*/React.createElement("svg", {
|
|
48202
48586
|
xmlns: "http://www.w3.org/2000/svg",
|
|
48203
48587
|
viewBox: "0 0 24 24",
|
|
48204
48588
|
fill: "#FFFFFF"
|
|
@@ -48208,11 +48592,11 @@ const Close$d = () => /*#__PURE__*/React.createElement("svg", {
|
|
|
48208
48592
|
}), /*#__PURE__*/React.createElement("path", {
|
|
48209
48593
|
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
|
|
48210
48594
|
}));
|
|
48211
|
-
const CloseBtn$
|
|
48595
|
+
const CloseBtn$d = props => {
|
|
48212
48596
|
return /*#__PURE__*/React.createElement("div", {
|
|
48213
48597
|
className: "icon-bg-secondary",
|
|
48214
48598
|
onClick: props.onClick
|
|
48215
|
-
}, /*#__PURE__*/React.createElement(Close$
|
|
48599
|
+
}, /*#__PURE__*/React.createElement(Close$e, null));
|
|
48216
48600
|
};
|
|
48217
48601
|
const RenewPopup = _ref => {
|
|
48218
48602
|
let {
|
|
@@ -48240,7 +48624,7 @@ const RenewPopup = _ref => {
|
|
|
48240
48624
|
headerBarMain: /*#__PURE__*/React.createElement(Heading, {
|
|
48241
48625
|
label: "SV_WANT_TO_EDIT"
|
|
48242
48626
|
}),
|
|
48243
|
-
headerBarEnd: /*#__PURE__*/React.createElement(CloseBtn$
|
|
48627
|
+
headerBarEnd: /*#__PURE__*/React.createElement(CloseBtn$d, {
|
|
48244
48628
|
onClick: closeModal
|
|
48245
48629
|
}),
|
|
48246
48630
|
actionCancelLabel: t("CS_COMMON_BACK"),
|
|
@@ -49474,7 +49858,7 @@ function ApplicationDetailsActionBar(_ref) {
|
|
|
49474
49858
|
}, t(`${forcedActionPrefix || `WF_EMPLOYEE_${businessService === null || businessService === void 0 ? void 0 : businessService.toUpperCase()}`}_${actions === null || actions === void 0 ? void 0 : (_actions$4 = actions[0]) === null || _actions$4 === void 0 ? void 0 : _actions$4.action}`))));
|
|
49475
49859
|
}
|
|
49476
49860
|
|
|
49477
|
-
const Close$
|
|
49861
|
+
const Close$f = () => /*#__PURE__*/React.createElement("svg", {
|
|
49478
49862
|
xmlns: "http://www.w3.org/2000/svg",
|
|
49479
49863
|
viewBox: "0 0 24 24",
|
|
49480
49864
|
fill: "#FFFFFF"
|
|
@@ -49484,11 +49868,11 @@ const Close$e = () => /*#__PURE__*/React.createElement("svg", {
|
|
|
49484
49868
|
}), /*#__PURE__*/React.createElement("path", {
|
|
49485
49869
|
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
|
|
49486
49870
|
}));
|
|
49487
|
-
const CloseBtn$
|
|
49871
|
+
const CloseBtn$e = props => {
|
|
49488
49872
|
return /*#__PURE__*/React.createElement("div", {
|
|
49489
49873
|
className: "icon-bg-secondary",
|
|
49490
49874
|
onClick: props.onClick
|
|
49491
|
-
}, /*#__PURE__*/React.createElement(Close$
|
|
49875
|
+
}, /*#__PURE__*/React.createElement(Close$f, null));
|
|
49492
49876
|
};
|
|
49493
49877
|
function ApplicationDetailsWarningPopup(_ref) {
|
|
49494
49878
|
let {
|
|
@@ -49506,7 +49890,7 @@ function ApplicationDetailsWarningPopup(_ref) {
|
|
|
49506
49890
|
headerBarMain: /*#__PURE__*/React.createElement("h1", {
|
|
49507
49891
|
className: "heading-m"
|
|
49508
49892
|
}, t("PT_DUES_ARE_PENDING")),
|
|
49509
|
-
headerBarEnd: /*#__PURE__*/React.createElement(CloseBtn$
|
|
49893
|
+
headerBarEnd: /*#__PURE__*/React.createElement(CloseBtn$e, {
|
|
49510
49894
|
onClick: () => {
|
|
49511
49895
|
closeWarningPopup();
|
|
49512
49896
|
}
|
|
@@ -53109,56 +53493,110 @@ const Step1_SearchConnection = _ref => {
|
|
|
53109
53493
|
businessService: "WS"
|
|
53110
53494
|
}).catch(() => null)).then(function (wsResponse) {
|
|
53111
53495
|
var _wsResponse$WaterConn;
|
|
53112
|
-
function
|
|
53113
|
-
|
|
53114
|
-
|
|
53115
|
-
|
|
53116
|
-
|
|
53117
|
-
|
|
53118
|
-
|
|
53496
|
+
function _temp5() {
|
|
53497
|
+
let _exit = false;
|
|
53498
|
+
function _temp3(_result5) {
|
|
53499
|
+
var _connection, _connection$connectio, _connection$connectio2, _connection2;
|
|
53500
|
+
if (_exit) return _result5;
|
|
53501
|
+
const fetchedMobileNumber = ((_connection = connection) === null || _connection === void 0 ? void 0 : (_connection$connectio = _connection.connectionHolders) === null || _connection$connectio === void 0 ? void 0 : (_connection$connectio2 = _connection$connectio[0]) === null || _connection$connectio2 === void 0 ? void 0 : _connection$connectio2.mobileNumber) || ((_connection2 = connection) === null || _connection2 === void 0 ? void 0 : _connection2.mobileNumber);
|
|
53502
|
+
if (!fetchedMobileNumber || fetchedMobileNumber.length !== 10) {
|
|
53503
|
+
setIsLoading(false);
|
|
53504
|
+
setShowToast({
|
|
53505
|
+
key: "error",
|
|
53506
|
+
message: "No valid registered mobile number found for this connection"
|
|
53507
|
+
});
|
|
53508
|
+
return;
|
|
53509
|
+
}
|
|
53510
|
+
if (isEditFlow) {
|
|
53511
|
+
setIsLoading(false);
|
|
53512
|
+
onNext({
|
|
53513
|
+
kNumber,
|
|
53514
|
+
mobileNumber: fetchedMobileNumber,
|
|
53515
|
+
serviceType: detectedServiceType,
|
|
53516
|
+
activeConnection: connection
|
|
53517
|
+
});
|
|
53518
|
+
return;
|
|
53519
|
+
}
|
|
53520
|
+
const userType = Digit.UserService.getType().toUpperCase();
|
|
53521
|
+
const payload = {
|
|
53522
|
+
otp: {
|
|
53523
|
+
mobileNumber: fetchedMobileNumber,
|
|
53524
|
+
tenantId: "dl",
|
|
53525
|
+
type: "register",
|
|
53526
|
+
userType: userType
|
|
53527
|
+
}
|
|
53528
|
+
};
|
|
53529
|
+
return Promise.resolve(Digit.UserService.sendOtp(payload, "dl")).then(function () {
|
|
53530
|
+
setIsLoading(false);
|
|
53531
|
+
onNext({
|
|
53532
|
+
kNumber,
|
|
53533
|
+
mobileNumber: fetchedMobileNumber,
|
|
53534
|
+
serviceType: detectedServiceType,
|
|
53535
|
+
activeConnection: connection
|
|
53536
|
+
});
|
|
53119
53537
|
});
|
|
53120
|
-
return;
|
|
53121
53538
|
}
|
|
53122
|
-
|
|
53123
|
-
if (!fetchedMobileNumber || fetchedMobileNumber.length !== 10) {
|
|
53539
|
+
if (!connection) {
|
|
53124
53540
|
setIsLoading(false);
|
|
53125
53541
|
setShowToast({
|
|
53126
53542
|
key: "error",
|
|
53127
|
-
message: "
|
|
53128
|
-
});
|
|
53129
|
-
return;
|
|
53130
|
-
}
|
|
53131
|
-
if (isEditFlow) {
|
|
53132
|
-
setIsLoading(false);
|
|
53133
|
-
onNext({
|
|
53134
|
-
kNumber,
|
|
53135
|
-
mobileNumber: fetchedMobileNumber,
|
|
53136
|
-
serviceType: detectedServiceType,
|
|
53137
|
-
activeConnection: connection
|
|
53543
|
+
message: "Active connection not found for the given K Number"
|
|
53138
53544
|
});
|
|
53139
53545
|
return;
|
|
53140
53546
|
}
|
|
53141
|
-
const
|
|
53142
|
-
|
|
53143
|
-
|
|
53144
|
-
|
|
53145
|
-
|
|
53146
|
-
|
|
53147
|
-
|
|
53547
|
+
const _temp2 = function () {
|
|
53548
|
+
if (detectedServiceType === "WATER") {
|
|
53549
|
+
const allConnections = (wsResponse === null || wsResponse === void 0 ? void 0 : wsResponse.WaterConnection) || [];
|
|
53550
|
+
const terminalStatuses = ["CONNECTION_ACTIVATED", "APPROVED", "REJECTED", "DISAPPROVED", "CANCELLED", "TERMINATED", "DISCONNECTION_EXECUTED", "CONNECTION_DISCONNECTED"];
|
|
53551
|
+
const pendingStatusApp = allConnections.find(c => c.applicationNo && c.applicationStatus && !terminalStatuses.includes(c.applicationStatus));
|
|
53552
|
+
if (pendingStatusApp) {
|
|
53553
|
+
var _connection3;
|
|
53554
|
+
setIsLoading(false);
|
|
53555
|
+
setShowToast({
|
|
53556
|
+
key: "error",
|
|
53557
|
+
message: `Application (${pendingStatusApp.applicationNo}) already exists in Workflow for Connection No. ${((_connection3 = connection) === null || _connection3 === void 0 ? void 0 : _connection3.connectionNo) || kNumber}. Cannot modify connection.`
|
|
53558
|
+
});
|
|
53559
|
+
_exit = true;
|
|
53560
|
+
return;
|
|
53561
|
+
}
|
|
53562
|
+
const appsToCheck = allConnections.filter(c => c.applicationNo && !terminalStatuses.includes(c.applicationStatus)).map(c => c.applicationNo);
|
|
53563
|
+
return function (_Digit, _Digit$WorkflowServic) {
|
|
53564
|
+
if (appsToCheck.length > 0 && (_Digit = Digit) !== null && _Digit !== void 0 && (_Digit$WorkflowServic = _Digit.WorkflowService) !== null && _Digit$WorkflowServic !== void 0 && _Digit$WorkflowServic.getByBusinessId) {
|
|
53565
|
+
return _catch(function () {
|
|
53566
|
+
var _connection4;
|
|
53567
|
+
return Promise.resolve(Digit.WorkflowService.getByBusinessId(((_connection4 = connection) === null || _connection4 === void 0 ? void 0 : _connection4.tenantId) || tenantId, appsToCheck.join(","), {}, false)).then(function (wfRes) {
|
|
53568
|
+
const latestProcessMap = {};
|
|
53569
|
+
((wfRes === null || wfRes === void 0 ? void 0 : wfRes.ProcessInstances) || []).forEach(pi => {
|
|
53570
|
+
if (pi !== null && pi !== void 0 && pi.businessId) {
|
|
53571
|
+
var _pi$auditDetails, _existing$auditDetail;
|
|
53572
|
+
const existing = latestProcessMap[pi.businessId];
|
|
53573
|
+
if (!existing || (((_pi$auditDetails = pi.auditDetails) === null || _pi$auditDetails === void 0 ? void 0 : _pi$auditDetails.lastModifiedTime) || 0) > (((_existing$auditDetail = existing.auditDetails) === null || _existing$auditDetail === void 0 ? void 0 : _existing$auditDetail.lastModifiedTime) || 0)) {
|
|
53574
|
+
latestProcessMap[pi.businessId] = pi;
|
|
53575
|
+
}
|
|
53576
|
+
}
|
|
53577
|
+
});
|
|
53578
|
+
const activeProcess = Object.values(latestProcessMap).find(pi => (pi === null || pi === void 0 ? void 0 : pi.state) && !pi.state.isTerminateState && !terminalStatuses.includes(pi.state.state) && !terminalStatuses.includes(pi.state.applicationStatus));
|
|
53579
|
+
if (activeProcess) {
|
|
53580
|
+
var _connection5;
|
|
53581
|
+
setIsLoading(false);
|
|
53582
|
+
setShowToast({
|
|
53583
|
+
key: "error",
|
|
53584
|
+
message: `Application (${activeProcess.businessId}) already exists in Workflow for Connection No. ${((_connection5 = connection) === null || _connection5 === void 0 ? void 0 : _connection5.connectionNo) || kNumber}. Cannot modify connection.`
|
|
53585
|
+
});
|
|
53586
|
+
_exit = true;
|
|
53587
|
+
}
|
|
53588
|
+
});
|
|
53589
|
+
}, function (wfErr) {
|
|
53590
|
+
console.error("Workflow check error:", wfErr);
|
|
53591
|
+
});
|
|
53592
|
+
}
|
|
53593
|
+
}();
|
|
53148
53594
|
}
|
|
53149
|
-
};
|
|
53150
|
-
return
|
|
53151
|
-
setIsLoading(false);
|
|
53152
|
-
onNext({
|
|
53153
|
-
kNumber,
|
|
53154
|
-
mobileNumber: fetchedMobileNumber,
|
|
53155
|
-
serviceType: detectedServiceType,
|
|
53156
|
-
activeConnection: connection
|
|
53157
|
-
});
|
|
53158
|
-
});
|
|
53595
|
+
}();
|
|
53596
|
+
return _temp2 && _temp2.then ? _temp2.then(_temp3) : _temp3(_temp2);
|
|
53159
53597
|
}
|
|
53160
53598
|
let connection = wsResponse === null || wsResponse === void 0 ? void 0 : (_wsResponse$WaterConn = wsResponse.WaterConnection) === null || _wsResponse$WaterConn === void 0 ? void 0 : _wsResponse$WaterConn.find(c => c.applicationStatus === 'CONNECTION_ACTIVATED');
|
|
53161
|
-
const
|
|
53599
|
+
const _temp4 = function () {
|
|
53162
53600
|
if (!connection) {
|
|
53163
53601
|
return Promise.resolve(Digit.WSService.search({
|
|
53164
53602
|
tenantId,
|
|
@@ -53171,7 +53609,7 @@ const Step1_SearchConnection = _ref => {
|
|
|
53171
53609
|
});
|
|
53172
53610
|
}
|
|
53173
53611
|
}();
|
|
53174
|
-
return
|
|
53612
|
+
return _temp4 && _temp4.then ? _temp4.then(_temp5) : _temp5(_temp4);
|
|
53175
53613
|
});
|
|
53176
53614
|
}, function (err) {
|
|
53177
53615
|
var _err$response2, _err$response2$data, _err$response2$data$E, _err$response2$data$E2;
|