@djb25/digit-ui-module-ws 1.0.89 → 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 CHANGED
@@ -9,36 +9,29 @@ var reactHookForm = require('react-hook-form');
9
9
  var XLSX = require('xlsx');
10
10
  var reactQuery = require('react-query');
11
11
 
12
- // A type of promise-like that resolves synchronously and supports only one observer
13
-
14
- const _iteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator"))) : "@@iterator";
15
-
16
- const _asyncIteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.asyncIterator || (Symbol.asyncIterator = Symbol("Symbol.asyncIterator"))) : "@@asyncIterator";
17
-
18
- // Asynchronously call a function and send errors to recovery continuation
12
+ const _iteratorSymbol = /*#__PURE__*/typeof Symbol !== "undefined" ? Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator")) : "@@iterator";
13
+ const _asyncIteratorSymbol = /*#__PURE__*/typeof Symbol !== "undefined" ? Symbol.asyncIterator || (Symbol.asyncIterator = Symbol("Symbol.asyncIterator")) : "@@asyncIterator";
19
14
  function _catch(body, recover) {
20
- try {
21
- var result = body();
22
- } catch(e) {
23
- return recover(e);
24
- }
25
- if (result && result.then) {
26
- return result.then(void 0, recover);
27
- }
28
- return result;
15
+ try {
16
+ var result = body();
17
+ } catch (e) {
18
+ return recover(e);
19
+ }
20
+ if (result && result.then) {
21
+ return result.then(void 0, recover);
22
+ }
23
+ return result;
29
24
  }
30
-
31
- // Asynchronously await a promise and pass the result to a finally continuation
32
25
  function _finallyRethrows(body, finalizer) {
33
- try {
34
- var result = body();
35
- } catch (e) {
36
- return finalizer(true, e);
37
- }
38
- if (result && result.then) {
39
- return result.then(finalizer.bind(null, false), finalizer.bind(null, true));
40
- }
41
- return finalizer(false, result);
26
+ try {
27
+ var result = body();
28
+ } catch (e) {
29
+ return finalizer(true, e);
30
+ }
31
+ if (result && result.then) {
32
+ return result.then(finalizer.bind(null, false), finalizer.bind(null, true));
33
+ }
34
+ return finalizer(false, result);
42
35
  }
43
36
 
44
37
  const TestAcknowledgment = () => {
@@ -8282,8 +8275,8 @@ const WSMyApplications = () => {
8282
8275
  };
8283
8276
  });
8284
8277
  const sortedApplications = ((_applicationsList = applicationsList) === null || _applicationsList === void 0 ? void 0 : _applicationsList.length) > 0 ? applicationsList.sort((a, b) => {
8285
- var _b$auditDetails, _a$auditDetails;
8286
- 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);
8278
+ var _b$auditDetails, _b$auditDetails2, _a$auditDetails, _a$auditDetails2;
8279
+ 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);
8287
8280
  }) : [];
8288
8281
  let filteredApplications = sortedApplications;
8289
8282
  if (searchParams) {
@@ -10799,6 +10792,353 @@ const WSCalculation = _ref => {
10799
10792
  })));
10800
10793
  };
10801
10794
 
10795
+ const WSZROVerification = () => {
10796
+ const {
10797
+ t
10798
+ } = reactI18next.useTranslation();
10799
+ const tenantId = Digit.ULBService.getCurrentTenantId();
10800
+ const {
10801
+ isLoading,
10802
+ data
10803
+ } = Digit.Hooks.ws.useWSZROVerification({
10804
+ tenantId,
10805
+ filters: {
10806
+ status: "PENDING",
10807
+ offset: 0,
10808
+ limit: 20
10809
+ },
10810
+ config: {
10811
+ select: res => (res === null || res === void 0 ? void 0 : res.cases) || []
10812
+ }
10813
+ });
10814
+ const columns = React__default.useMemo(() => [{
10815
+ Header: t("WS_CONNECTION_NO_LABEL"),
10816
+ accessor: "connectionNo",
10817
+ Cell: _ref => {
10818
+ var _row$original, _row$original2;
10819
+ let {
10820
+ row
10821
+ } = _ref;
10822
+ return /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
10823
+ to: {
10824
+ pathname: `/digit-ui/employee/ws/zro-verification-details`,
10825
+ search: `?connectionNumber=${(_row$original = row.original) === null || _row$original === void 0 ? void 0 : _row$original.connectionNo}&tenantId=${tenantId}`,
10826
+ state: {
10827
+ caseData: row.original
10828
+ }
10829
+ },
10830
+ style: {
10831
+ color: "#f47738",
10832
+ textDecoration: "none"
10833
+ }
10834
+ }, ((_row$original2 = row.original) === null || _row$original2 === void 0 ? void 0 : _row$original2.connectionNo) || "NA");
10835
+ }
10836
+ }, {
10837
+ Header: t("WS_BILLING_PERIOD_LABEL"),
10838
+ Cell: _ref2 => {
10839
+ var _row$original3, _row$original4;
10840
+ let {
10841
+ row
10842
+ } = _ref2;
10843
+ const from = (_row$original3 = row.original) !== null && _row$original3 !== void 0 && _row$original3.billingPeriodFrom ? Digit.DateUtils.ConvertTimestampToDate(row.original.billingPeriodFrom) : "NA";
10844
+ const to = (_row$original4 = row.original) !== null && _row$original4 !== void 0 && _row$original4.billingPeriodTo ? Digit.DateUtils.ConvertTimestampToDate(row.original.billingPeriodTo) : "NA";
10845
+ return /*#__PURE__*/React__default.createElement("span", null, `${from} - ${to}`);
10846
+ }
10847
+ }, {
10848
+ Header: t("WS_PREVIOUS_READING_LABEL"),
10849
+ accessor: "previousReading",
10850
+ Cell: _ref3 => {
10851
+ var _row$original5;
10852
+ let {
10853
+ row
10854
+ } = _ref3;
10855
+ return ((_row$original5 = row.original) === null || _row$original5 === void 0 ? void 0 : _row$original5.previousReading) ?? "NA";
10856
+ }
10857
+ }, {
10858
+ Header: t("WS_CURRENT_READING_LABEL"),
10859
+ accessor: "currentReading",
10860
+ Cell: _ref4 => {
10861
+ var _row$original6;
10862
+ let {
10863
+ row
10864
+ } = _ref4;
10865
+ return ((_row$original6 = row.original) === null || _row$original6 === void 0 ? void 0 : _row$original6.currentReading) ?? "NA";
10866
+ }
10867
+ }, {
10868
+ Header: t("WS_CONSUMPTION_LABEL"),
10869
+ accessor: "actualConsumption",
10870
+ Cell: _ref5 => {
10871
+ var _row$original7;
10872
+ let {
10873
+ row
10874
+ } = _ref5;
10875
+ return ((_row$original7 = row.original) === null || _row$original7 === void 0 ? void 0 : _row$original7.actualConsumption) ?? "NA";
10876
+ }
10877
+ }, {
10878
+ Header: t("WS_COMMON_TABLE_COL_APP_STATUS_LABEL"),
10879
+ accessor: "verification.status",
10880
+ Cell: _ref6 => {
10881
+ var _row$original8, _row$original8$verifi;
10882
+ let {
10883
+ row
10884
+ } = _ref6;
10885
+ 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";
10886
+ }
10887
+ }], [t]);
10888
+ if (isLoading) {
10889
+ return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
10890
+ }
10891
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Table, {
10892
+ t: t,
10893
+ data: data || [],
10894
+ totalRecords: (data === null || data === void 0 ? void 0 : data.length) || 0,
10895
+ isLoading: isLoading,
10896
+ isPaginationRequired: true,
10897
+ csvExportData: data,
10898
+ columns: columns
10899
+ }));
10900
+ };
10901
+
10902
+ const Heading = props => {
10903
+ return /*#__PURE__*/React__default.createElement("h1", {
10904
+ className: "heading-m"
10905
+ }, props.label);
10906
+ };
10907
+ const Close = () => /*#__PURE__*/React__default.createElement("svg", {
10908
+ xmlns: "http://www.w3.org/2000/svg",
10909
+ viewBox: "0 0 24 24",
10910
+ fill: "#FFFFFF"
10911
+ }, /*#__PURE__*/React__default.createElement("path", {
10912
+ d: "M0 0h24v24H0V0z",
10913
+ fill: "none"
10914
+ }), /*#__PURE__*/React__default.createElement("path", {
10915
+ 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"
10916
+ }));
10917
+ const CloseBtn = props => {
10918
+ return /*#__PURE__*/React__default.createElement("div", {
10919
+ className: "icon-bg-secondary",
10920
+ onClick: props.onClick
10921
+ }, /*#__PURE__*/React__default.createElement(Close, null));
10922
+ };
10923
+ const WSZROVerificationDetails = () => {
10924
+ var _location$state;
10925
+ const {
10926
+ t
10927
+ } = reactI18next.useTranslation();
10928
+ const location = reactRouterDom.useLocation();
10929
+ const history = reactRouterDom.useHistory();
10930
+ const [displayMenu, setDisplayMenu] = React.useState(false);
10931
+ const [showModal, setShowModal] = React.useState(false);
10932
+ const [selectedAction, setSelectedAction] = React.useState(null);
10933
+ const [comments, setComments] = React.useState("");
10934
+ const [toast, setToast] = React.useState(null);
10935
+ const [isSuccess, setIsSuccess] = React.useState(false);
10936
+ const [apiResponse, setApiResponse] = React.useState(null);
10937
+ React.useEffect(() => {
10938
+ let timer;
10939
+ if (isSuccess) {
10940
+ timer = setTimeout(() => {
10941
+ history.push("/digit-ui/employee/ws/zro-application");
10942
+ }, 10000);
10943
+ }
10944
+ return () => {
10945
+ if (timer) clearTimeout(timer);
10946
+ };
10947
+ }, [isSuccess, history]);
10948
+ const caseDataFromState = (_location$state = location.state) === null || _location$state === void 0 ? void 0 : _location$state.caseData;
10949
+ const searchParams = new URLSearchParams(location.search);
10950
+ const connectionNumber = searchParams.get("connectionNumber");
10951
+ const tenantId = searchParams.get("tenantId") || Digit.ULBService.getCurrentTenantId();
10952
+ const {
10953
+ isLoading,
10954
+ data
10955
+ } = Digit.Hooks.ws.useWSZROVerification({
10956
+ tenantId,
10957
+ filters: {
10958
+ connectionNo: connectionNumber,
10959
+ status: "PENDING",
10960
+ offset: 0,
10961
+ limit: 20
10962
+ },
10963
+ config: {
10964
+ enabled: !caseDataFromState && !!connectionNumber,
10965
+ select: res => {
10966
+ var _res$cases;
10967
+ return res === null || res === void 0 ? void 0 : (_res$cases = res.cases) === null || _res$cases === void 0 ? void 0 : _res$cases[0];
10968
+ }
10969
+ }
10970
+ });
10971
+ const caseDetails = caseDataFromState || data;
10972
+ if (isLoading) {
10973
+ return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
10974
+ }
10975
+ if (!caseDetails) {
10976
+ return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, null, /*#__PURE__*/React__default.createElement("div", {
10977
+ style: {
10978
+ textAlign: "center"
10979
+ }
10980
+ }, t("CS_COMMON_NO_DATA")));
10981
+ }
10982
+ const {
10983
+ verification,
10984
+ ...billingData
10985
+ } = caseDetails;
10986
+ const formatDate = timestamp => {
10987
+ if (!timestamp) return "NA";
10988
+ return Digit.DateUtils.ConvertTimestampToDate(timestamp);
10989
+ };
10990
+ const onActionSelect = action => {
10991
+ setSelectedAction(action);
10992
+ setDisplayMenu(false);
10993
+ setShowModal(true);
10994
+ };
10995
+ const closeModal = () => {
10996
+ setShowModal(false);
10997
+ setComments("");
10998
+ setSelectedAction(null);
10999
+ };
11000
+ const submitAction = function () {
11001
+ try {
11002
+ const _temp = _catch(function () {
11003
+ const payload = {
11004
+ billingCycleId: billingData === null || billingData === void 0 ? void 0 : billingData.billingCycleId,
11005
+ action: selectedAction === "VERIFY" ? "APPROVE" : "REJECT",
11006
+ remarks: comments
11007
+ };
11008
+ return Promise.resolve(Digit.WSService.updateZROVerification(payload, tenantId)).then(function (res) {
11009
+ setApiResponse(res);
11010
+ setToast({
11011
+ key: "success",
11012
+ error: false,
11013
+ message: t("WF_ZRO_ACTION_SUCCESS")
11014
+ });
11015
+ setShowModal(false);
11016
+ setIsSuccess(true);
11017
+ });
11018
+ }, function (err) {
11019
+ var _err$response, _err$response$data, _err$response$data$Er, _err$response$data$Er2;
11020
+ console.error(err);
11021
+ setToast({
11022
+ key: "error",
11023
+ error: true,
11024
+ 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")
11025
+ });
11026
+ closeModal();
11027
+ });
11028
+ return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
11029
+ } catch (e) {
11030
+ return Promise.reject(e);
11031
+ }
11032
+ };
11033
+ if (isSuccess) {
11034
+ return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Banner, {
11035
+ message: t(selectedAction === "VERIFY" ? "WF_ZRO_VERIFY_SUCCESS" : "WF_ZRO_REJECT_SUCCESS"),
11036
+ applicationNumber: apiResponse !== null && apiResponse !== void 0 && apiResponse.connectionno ? apiResponse.connectionno : connectionNumber,
11037
+ info: apiResponse !== null && apiResponse !== void 0 && apiResponse.connectionno ? t("WS_CONNECTION_NO_LABEL") : t("WS_CONNECTION_NO_LABEL"),
11038
+ successful: selectedAction === "VERIFY"
11039
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardText, null, apiResponse !== null && apiResponse !== void 0 && apiResponse.message ? apiResponse.message : t("WF_ZRO_SUCCESS_MESSAGE_MAIN")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.ActionBar, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
11040
+ label: t("CORE_COMMON_GO_TO_HOME"),
11041
+ onSubmit: () => history.push("/digit-ui/employee/ws/zro-application")
11042
+ })));
11043
+ }
11044
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, null, t("WS_VERIFICATION_DETAILS")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
11045
+ label: t("WS_CONNECTION_NO_LABEL"),
11046
+ text: (verification === null || verification === void 0 ? void 0 : verification.connectionno) || "NA"
11047
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
11048
+ label: t("WS_VERIFICATION_STATUS"),
11049
+ text: (verification === null || verification === void 0 ? void 0 : verification.status) || "NA"
11050
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
11051
+ label: t("WS_CONSUMPTION_LABEL"),
11052
+ text: (verification === null || verification === void 0 ? void 0 : verification.consumption) ?? "NA"
11053
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
11054
+ label: t("WS_PREVIOUS_CONSUMPTION"),
11055
+ text: (verification === null || verification === void 0 ? void 0 : verification.previousconsumption) ?? "NA"
11056
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
11057
+ label: t("WS_DEVIATION_FACTOR"),
11058
+ text: verification !== null && verification !== void 0 && verification.deviationfactor ? Number(verification.deviationfactor).toFixed(2) : "NA"
11059
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
11060
+ label: t("WS_REMARKS"),
11061
+ text: (verification === null || verification === void 0 ? void 0 : verification.remarks) || "NA"
11062
+ })), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, {
11063
+ style: {
11064
+ marginTop: "32px"
11065
+ }
11066
+ }, t("WS_BILLING_AND_CONSUMPTION_DETAILS")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
11067
+ label: t("WS_BILLING_CYCLE_ID"),
11068
+ text: billingData.billingCycleId || "NA"
11069
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
11070
+ label: t("WS_BILLING_PERIOD"),
11071
+ text: `${formatDate(billingData.billingPeriodFrom)} - ${formatDate(billingData.billingPeriodTo)}`
11072
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
11073
+ label: t("WS_BILLING_DAYS"),
11074
+ text: billingData.billingDays ?? "NA"
11075
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
11076
+ label: t("WS_PREVIOUS_READING_LABEL"),
11077
+ text: billingData.previousReading ?? "NA"
11078
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
11079
+ label: t("WS_PREVIOUS_OK_READING_DATE"),
11080
+ text: formatDate(billingData.previousOkReadingDate)
11081
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
11082
+ label: t("WS_CURRENT_READING_LABEL"),
11083
+ text: billingData.currentReading ?? "NA"
11084
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
11085
+ label: t("WS_READING_QUALITY_CODE"),
11086
+ text: billingData.readingQualityCode || "NA"
11087
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
11088
+ label: t("WS_BILLING_BASIS"),
11089
+ text: billingData.billingBasis || "NA"
11090
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
11091
+ label: t("WS_ACTUAL_CONSUMPTION"),
11092
+ text: billingData.actualConsumption ?? "NA"
11093
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
11094
+ label: t("WS_MONTHLY_CONSUMPTION"),
11095
+ text: billingData.monthlyConsumption ? Number(billingData.monthlyConsumption).toFixed(2) : "NA"
11096
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
11097
+ label: t("WS_THRESHOLD_CONSUMPTION"),
11098
+ text: billingData.thresholdConsumption ? Number(billingData.thresholdConsumption).toFixed(2) : "NA"
11099
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
11100
+ label: t("WS_1_5X_FLAG"),
11101
+ text: billingData.onePointFiveXFlag ? t("CORE_COMMON_YES") : t("CORE_COMMON_NO")
11102
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
11103
+ label: t("WS_BILLING_CYCLE_STATUS"),
11104
+ text: billingData.billingCycleStatus || "NA"
11105
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
11106
+ label: t("WS_CORRECTION_STATUS"),
11107
+ text: billingData.correctionStatus || "NA"
11108
+ }))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.ActionBar, null, displayMenu ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Menu, {
11109
+ localeKeyPrefix: "WF_ZRO",
11110
+ options: ["VERIFY", "REJECT"],
11111
+ t: t,
11112
+ onSelect: onActionSelect
11113
+ }) : null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
11114
+ label: t("WF_TAKE_ACTION"),
11115
+ onSubmit: () => setDisplayMenu(!displayMenu)
11116
+ })), showModal && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Modal, {
11117
+ headerBarMain: /*#__PURE__*/React__default.createElement(Heading, {
11118
+ label: selectedAction === "VERIFY" ? t("WF_ZRO_VERIFY") : t("WF_ZRO_REJECT")
11119
+ }),
11120
+ headerBarEnd: /*#__PURE__*/React__default.createElement(CloseBtn, {
11121
+ onClick: closeModal
11122
+ }),
11123
+ actionCancelLabel: t("CS_COMMON_CANCEL"),
11124
+ actionCancelOnSubmit: closeModal,
11125
+ actionSaveLabel: selectedAction === "VERIFY" ? t("WF_ZRO_VERIFY") : t("WF_ZRO_REJECT"),
11126
+ actionSaveOnSubmit: submitAction
11127
+ }, /*#__PURE__*/React__default.createElement("div", {
11128
+ style: {
11129
+ marginBottom: "16px"
11130
+ }
11131
+ }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("WF_COMMON_COMMENTS")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextArea, {
11132
+ name: "comments",
11133
+ value: comments,
11134
+ onChange: e => setComments(e.target.value)
11135
+ }))), toast && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
11136
+ error: toast.error,
11137
+ label: toast.message,
11138
+ onClose: () => setToast(null)
11139
+ }));
11140
+ };
11141
+
10802
11142
  const BILLSBreadCrumbs = _ref => {
10803
11143
  var _applicationDetails$a, _applicationDetails$a9, _applicationDetails$a0, _applicationDetails$a1, _applicationDetails$a13, _applicationDetails$a14, _reciept_data$Payment2;
10804
11144
  const getRecieptSearch = function (tenantId, payments, consumerCodes, receiptKey) {
@@ -11248,6 +11588,10 @@ const BILLSBreadCrumbs = _ref => {
11248
11588
  path: "/digit-ui/employee/ws/water/calculation",
11249
11589
  label: t("WS_CALCULATION"),
11250
11590
  show: location.pathname.includes("/ws/water/calculation") ? true : false
11591
+ }, {
11592
+ path: "/digit-ui/employee/ws/zro-application",
11593
+ label: t("WS_ZRO_VERIFICATION"),
11594
+ show: location.pathname.includes("/ws/zro-application") ? true : false
11251
11595
  }];
11252
11596
  let lastCrumbIndex = findLastIndex(crumbs, "show", true);
11253
11597
  crumbs[lastCrumbIndex] = {
@@ -11587,6 +11931,12 @@ const App$1 = _ref2 => {
11587
11931
  component: props => /*#__PURE__*/React__default.createElement(WSCalculation, _extends({}, props, {
11588
11932
  parentRoute: path
11589
11933
  }))
11934
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
11935
+ path: `${path}/zro-application`,
11936
+ component: () => /*#__PURE__*/React__default.createElement(WSZROVerification, null)
11937
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
11938
+ path: `${path}/zro-verification-details`,
11939
+ component: () => /*#__PURE__*/React__default.createElement(WSZROVerificationDetails, null)
11590
11940
  }))))));
11591
11941
  };
11592
11942
 
@@ -16759,31 +17109,6 @@ const WSActivationSupportingDocuments = _ref => {
16759
17109
  }))));
16760
17110
  };
16761
17111
 
16762
- const _iteratorSymbol$1 = /*#__PURE__*/typeof Symbol !== "undefined" ? Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator")) : "@@iterator";
16763
- const _asyncIteratorSymbol$1 = /*#__PURE__*/typeof Symbol !== "undefined" ? Symbol.asyncIterator || (Symbol.asyncIterator = Symbol("Symbol.asyncIterator")) : "@@asyncIterator";
16764
- function _catch$1(body, recover) {
16765
- try {
16766
- var result = body();
16767
- } catch (e) {
16768
- return recover(e);
16769
- }
16770
- if (result && result.then) {
16771
- return result.then(void 0, recover);
16772
- }
16773
- return result;
16774
- }
16775
- function _finallyRethrows$1(body, finalizer) {
16776
- try {
16777
- var result = body();
16778
- } catch (e) {
16779
- return finalizer(true, e);
16780
- }
16781
- if (result && result.then) {
16782
- return result.then(finalizer.bind(null, false), finalizer.bind(null, true));
16783
- }
16784
- return finalizer(false, result);
16785
- }
16786
-
16787
17112
  var b = "function" === typeof Symbol && Symbol.for,
16788
17113
  c = b ? Symbol.for("react.element") : 60103,
16789
17114
  d = b ? Symbol.for("react.portal") : 60106,
@@ -17704,7 +18029,7 @@ ButtonSelector.defaultProps = {
17704
18029
  onSubmit: undefined
17705
18030
  };
17706
18031
 
17707
- const Close = _ref23 => {
18032
+ const Close$1 = _ref23 => {
17708
18033
  let {
17709
18034
  className,
17710
18035
  style
@@ -17740,7 +18065,7 @@ const RemoveableTag = _ref => {
17740
18065
  style: extraStyles ? extraStyles === null || extraStyles === void 0 ? void 0 : extraStyles.textStyles : {}
17741
18066
  }, text), /*#__PURE__*/React__default.createElement("span", {
17742
18067
  onClick: disabled ? null : onClick
17743
- }, /*#__PURE__*/React__default.createElement(Close, {
18068
+ }, /*#__PURE__*/React__default.createElement(Close$1, {
17744
18069
  className: "close",
17745
18070
  style: extraStyles ? extraStyles === null || extraStyles === void 0 ? void 0 : extraStyles.closeIconStyles : {}
17746
18071
  })));
@@ -17936,7 +18261,7 @@ const UploadFileDigiLocker = props => {
17936
18261
  try {
17937
18262
  let _exit = false;
17938
18263
  e.preventDefault();
17939
- return Promise.resolve(_catch$1(function () {
18264
+ return Promise.resolve(_catch(function () {
17940
18265
  function _temp13(_result) {
17941
18266
  if (_exit) return _result;
17942
18267
  let TokenReq = {
@@ -18147,7 +18472,7 @@ const UploadFileDigiLocker = props => {
18147
18472
  function _temp2() {
18148
18473
  _exit = true;
18149
18474
  }
18150
- const _temp = _catch$1(function () {
18475
+ const _temp = _catch(function () {
18151
18476
  const tenantId = Digit.ULBService.getCurrentTenantId() || "dl.djb";
18152
18477
  return Promise.resolve(Digit.DigiLockerService.authorization({
18153
18478
  module: "WS",
@@ -27522,7 +27847,11 @@ const WSCard = () => {
27522
27847
  label: t("WS_APPLY_MUTATION"),
27523
27848
  link: `/digit-ui/employee/ws/mutation-application`,
27524
27849
  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"]
27525
- }]
27850
+ }, {
27851
+ label: t("WS_ZRO_VERIFICATION"),
27852
+ link: `/digit-ui/employee/ws/zro-application`,
27853
+ 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"]
27854
+ }].filter(link => link.roles ? checkForEmployee(link.roles) : true)
27526
27855
  };
27527
27856
  return /*#__PURE__*/React__default.createElement(digitUiReactComponents.EmployeeModuleCard, propsForModuleCard);
27528
27857
  };
@@ -29392,1101 +29721,6 @@ const config = [{
29392
29721
  }]
29393
29722
  }];
29394
29723
 
29395
- /** @license React v16.13.1
29396
- * react-is.production.min.js
29397
- *
29398
- * Copyright (c) Facebook, Inc. and its affiliates.
29399
- *
29400
- * This source code is licensed under the MIT license found in the
29401
- * LICENSE file in the root directory of this source tree.
29402
- */
29403
- var b$1="function"===typeof Symbol&&Symbol.for,c$1=b$1?Symbol.for("react.element"):60103,d$1=b$1?Symbol.for("react.portal"):60106,e$1=b$1?Symbol.for("react.fragment"):60107,f$1=b$1?Symbol.for("react.strict_mode"):60108,g$1=b$1?Symbol.for("react.profiler"):60114,h$1=b$1?Symbol.for("react.provider"):60109,k$1=b$1?Symbol.for("react.context"):60110,l$1=b$1?Symbol.for("react.async_mode"):60111,m$1=b$1?Symbol.for("react.concurrent_mode"):60111,n$1=b$1?Symbol.for("react.forward_ref"):60112,p$1=b$1?Symbol.for("react.suspense"):60113,q$1=b$1?
29404
- Symbol.for("react.suspense_list"):60120,r$1=b$1?Symbol.for("react.memo"):60115,t$1=b$1?Symbol.for("react.lazy"):60116,v$1=b$1?Symbol.for("react.block"):60121,w$1=b$1?Symbol.for("react.fundamental"):60117,x$1=b$1?Symbol.for("react.responder"):60118,y$1=b$1?Symbol.for("react.scope"):60119;
29405
- function z$1(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c$1:switch(a=a.type,a){case l$1:case m$1:case e$1:case g$1:case f$1:case p$1:return a;default:switch(a=a&&a.$$typeof,a){case k$1:case n$1:case t$1:case r$1:case h$1:return a;default:return u}}case d$1:return u}}}function A$1(a){return z$1(a)===m$1}var AsyncMode$1=l$1;var ConcurrentMode$1=m$1;var ContextConsumer$1=k$1;var ContextProvider$1=h$1;var Element$1=c$1;var ForwardRef$1=n$1;var Fragment$1=e$1;var Lazy$1=t$1;var Memo$1=r$1;var Portal$1=d$1;
29406
- var Profiler$1=g$1;var StrictMode$1=f$1;var Suspense$1=p$1;var isAsyncMode$1=function(a){return A$1(a)||z$1(a)===l$1};var isConcurrentMode$1=A$1;var isContextConsumer$1=function(a){return z$1(a)===k$1};var isContextProvider$1=function(a){return z$1(a)===h$1};var isElement$1=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c$1};var isForwardRef$1=function(a){return z$1(a)===n$1};var isFragment$1=function(a){return z$1(a)===e$1};var isLazy$1=function(a){return z$1(a)===t$1};
29407
- var isMemo$1=function(a){return z$1(a)===r$1};var isPortal$1=function(a){return z$1(a)===d$1};var isProfiler$1=function(a){return z$1(a)===g$1};var isStrictMode$1=function(a){return z$1(a)===f$1};var isSuspense$1=function(a){return z$1(a)===p$1};
29408
- var isValidElementType$1=function(a){return "string"===typeof a||"function"===typeof a||a===e$1||a===m$1||a===g$1||a===f$1||a===p$1||a===q$1||"object"===typeof a&&null!==a&&(a.$$typeof===t$1||a.$$typeof===r$1||a.$$typeof===h$1||a.$$typeof===k$1||a.$$typeof===n$1||a.$$typeof===w$1||a.$$typeof===x$1||a.$$typeof===y$1||a.$$typeof===v$1)};var typeOf$1=z$1;
29409
-
29410
- var reactIs_production_min$1 = {
29411
- AsyncMode: AsyncMode$1,
29412
- ConcurrentMode: ConcurrentMode$1,
29413
- ContextConsumer: ContextConsumer$1,
29414
- ContextProvider: ContextProvider$1,
29415
- Element: Element$1,
29416
- ForwardRef: ForwardRef$1,
29417
- Fragment: Fragment$1,
29418
- Lazy: Lazy$1,
29419
- Memo: Memo$1,
29420
- Portal: Portal$1,
29421
- Profiler: Profiler$1,
29422
- StrictMode: StrictMode$1,
29423
- Suspense: Suspense$1,
29424
- isAsyncMode: isAsyncMode$1,
29425
- isConcurrentMode: isConcurrentMode$1,
29426
- isContextConsumer: isContextConsumer$1,
29427
- isContextProvider: isContextProvider$1,
29428
- isElement: isElement$1,
29429
- isForwardRef: isForwardRef$1,
29430
- isFragment: isFragment$1,
29431
- isLazy: isLazy$1,
29432
- isMemo: isMemo$1,
29433
- isPortal: isPortal$1,
29434
- isProfiler: isProfiler$1,
29435
- isStrictMode: isStrictMode$1,
29436
- isSuspense: isSuspense$1,
29437
- isValidElementType: isValidElementType$1,
29438
- typeOf: typeOf$1
29439
- };
29440
-
29441
- var reactIs_development$1 = createCommonjsModule(function (module, exports) {
29442
-
29443
-
29444
-
29445
- if (process.env.NODE_ENV !== "production") {
29446
- (function() {
29447
-
29448
- // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
29449
- // nor polyfill, then a plain number is used for performance.
29450
- var hasSymbol = typeof Symbol === 'function' && Symbol.for;
29451
- var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
29452
- var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
29453
- var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
29454
- var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
29455
- var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
29456
- var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
29457
- var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
29458
- // (unstable) APIs that have been removed. Can we remove the symbols?
29459
-
29460
- var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
29461
- var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
29462
- var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
29463
- var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
29464
- var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
29465
- var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
29466
- var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
29467
- var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
29468
- var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
29469
- var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
29470
- var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
29471
-
29472
- function isValidElementType(type) {
29473
- return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
29474
- type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
29475
- }
29476
-
29477
- function typeOf(object) {
29478
- if (typeof object === 'object' && object !== null) {
29479
- var $$typeof = object.$$typeof;
29480
-
29481
- switch ($$typeof) {
29482
- case REACT_ELEMENT_TYPE:
29483
- var type = object.type;
29484
-
29485
- switch (type) {
29486
- case REACT_ASYNC_MODE_TYPE:
29487
- case REACT_CONCURRENT_MODE_TYPE:
29488
- case REACT_FRAGMENT_TYPE:
29489
- case REACT_PROFILER_TYPE:
29490
- case REACT_STRICT_MODE_TYPE:
29491
- case REACT_SUSPENSE_TYPE:
29492
- return type;
29493
-
29494
- default:
29495
- var $$typeofType = type && type.$$typeof;
29496
-
29497
- switch ($$typeofType) {
29498
- case REACT_CONTEXT_TYPE:
29499
- case REACT_FORWARD_REF_TYPE:
29500
- case REACT_LAZY_TYPE:
29501
- case REACT_MEMO_TYPE:
29502
- case REACT_PROVIDER_TYPE:
29503
- return $$typeofType;
29504
-
29505
- default:
29506
- return $$typeof;
29507
- }
29508
-
29509
- }
29510
-
29511
- case REACT_PORTAL_TYPE:
29512
- return $$typeof;
29513
- }
29514
- }
29515
-
29516
- return undefined;
29517
- } // AsyncMode is deprecated along with isAsyncMode
29518
-
29519
- var AsyncMode = REACT_ASYNC_MODE_TYPE;
29520
- var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
29521
- var ContextConsumer = REACT_CONTEXT_TYPE;
29522
- var ContextProvider = REACT_PROVIDER_TYPE;
29523
- var Element = REACT_ELEMENT_TYPE;
29524
- var ForwardRef = REACT_FORWARD_REF_TYPE;
29525
- var Fragment = REACT_FRAGMENT_TYPE;
29526
- var Lazy = REACT_LAZY_TYPE;
29527
- var Memo = REACT_MEMO_TYPE;
29528
- var Portal = REACT_PORTAL_TYPE;
29529
- var Profiler = REACT_PROFILER_TYPE;
29530
- var StrictMode = REACT_STRICT_MODE_TYPE;
29531
- var Suspense = REACT_SUSPENSE_TYPE;
29532
- var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
29533
-
29534
- function isAsyncMode(object) {
29535
- {
29536
- if (!hasWarnedAboutDeprecatedIsAsyncMode) {
29537
- hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
29538
-
29539
- console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
29540
- }
29541
- }
29542
-
29543
- return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
29544
- }
29545
- function isConcurrentMode(object) {
29546
- return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
29547
- }
29548
- function isContextConsumer(object) {
29549
- return typeOf(object) === REACT_CONTEXT_TYPE;
29550
- }
29551
- function isContextProvider(object) {
29552
- return typeOf(object) === REACT_PROVIDER_TYPE;
29553
- }
29554
- function isElement(object) {
29555
- return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
29556
- }
29557
- function isForwardRef(object) {
29558
- return typeOf(object) === REACT_FORWARD_REF_TYPE;
29559
- }
29560
- function isFragment(object) {
29561
- return typeOf(object) === REACT_FRAGMENT_TYPE;
29562
- }
29563
- function isLazy(object) {
29564
- return typeOf(object) === REACT_LAZY_TYPE;
29565
- }
29566
- function isMemo(object) {
29567
- return typeOf(object) === REACT_MEMO_TYPE;
29568
- }
29569
- function isPortal(object) {
29570
- return typeOf(object) === REACT_PORTAL_TYPE;
29571
- }
29572
- function isProfiler(object) {
29573
- return typeOf(object) === REACT_PROFILER_TYPE;
29574
- }
29575
- function isStrictMode(object) {
29576
- return typeOf(object) === REACT_STRICT_MODE_TYPE;
29577
- }
29578
- function isSuspense(object) {
29579
- return typeOf(object) === REACT_SUSPENSE_TYPE;
29580
- }
29581
-
29582
- exports.AsyncMode = AsyncMode;
29583
- exports.ConcurrentMode = ConcurrentMode;
29584
- exports.ContextConsumer = ContextConsumer;
29585
- exports.ContextProvider = ContextProvider;
29586
- exports.Element = Element;
29587
- exports.ForwardRef = ForwardRef;
29588
- exports.Fragment = Fragment;
29589
- exports.Lazy = Lazy;
29590
- exports.Memo = Memo;
29591
- exports.Portal = Portal;
29592
- exports.Profiler = Profiler;
29593
- exports.StrictMode = StrictMode;
29594
- exports.Suspense = Suspense;
29595
- exports.isAsyncMode = isAsyncMode;
29596
- exports.isConcurrentMode = isConcurrentMode;
29597
- exports.isContextConsumer = isContextConsumer;
29598
- exports.isContextProvider = isContextProvider;
29599
- exports.isElement = isElement;
29600
- exports.isForwardRef = isForwardRef;
29601
- exports.isFragment = isFragment;
29602
- exports.isLazy = isLazy;
29603
- exports.isMemo = isMemo;
29604
- exports.isPortal = isPortal;
29605
- exports.isProfiler = isProfiler;
29606
- exports.isStrictMode = isStrictMode;
29607
- exports.isSuspense = isSuspense;
29608
- exports.isValidElementType = isValidElementType;
29609
- exports.typeOf = typeOf;
29610
- })();
29611
- }
29612
- });
29613
-
29614
- var reactIs$1 = createCommonjsModule(function (module) {
29615
-
29616
- if (process.env.NODE_ENV === 'production') {
29617
- module.exports = reactIs_production_min$1;
29618
- } else {
29619
- module.exports = reactIs_development$1;
29620
- }
29621
- });
29622
-
29623
- /*
29624
- object-assign
29625
- (c) Sindre Sorhus
29626
- @license MIT
29627
- */
29628
- /* eslint-disable no-unused-vars */
29629
- var getOwnPropertySymbols$1 = Object.getOwnPropertySymbols;
29630
- var hasOwnProperty$b = Object.prototype.hasOwnProperty;
29631
- var propIsEnumerable$1 = Object.prototype.propertyIsEnumerable;
29632
-
29633
- function toObject$1(val) {
29634
- if (val === null || val === undefined) {
29635
- throw new TypeError('Object.assign cannot be called with null or undefined');
29636
- }
29637
-
29638
- return Object(val);
29639
- }
29640
-
29641
- function shouldUseNative$1() {
29642
- try {
29643
- if (!Object.assign) {
29644
- return false;
29645
- }
29646
-
29647
- // Detect buggy property enumeration order in older V8 versions.
29648
-
29649
- // https://bugs.chromium.org/p/v8/issues/detail?id=4118
29650
- var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
29651
- test1[5] = 'de';
29652
- if (Object.getOwnPropertyNames(test1)[0] === '5') {
29653
- return false;
29654
- }
29655
-
29656
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
29657
- var test2 = {};
29658
- for (var i = 0; i < 10; i++) {
29659
- test2['_' + String.fromCharCode(i)] = i;
29660
- }
29661
- var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
29662
- return test2[n];
29663
- });
29664
- if (order2.join('') !== '0123456789') {
29665
- return false;
29666
- }
29667
-
29668
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
29669
- var test3 = {};
29670
- 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
29671
- test3[letter] = letter;
29672
- });
29673
- if (Object.keys(Object.assign({}, test3)).join('') !==
29674
- 'abcdefghijklmnopqrst') {
29675
- return false;
29676
- }
29677
-
29678
- return true;
29679
- } catch (err) {
29680
- // We don't expect any of the above to throw, but better to be safe.
29681
- return false;
29682
- }
29683
- }
29684
-
29685
- var objectAssign$1 = shouldUseNative$1() ? Object.assign : function (target, source) {
29686
- var from;
29687
- var to = toObject$1(target);
29688
- var symbols;
29689
-
29690
- for (var s = 1; s < arguments.length; s++) {
29691
- from = Object(arguments[s]);
29692
-
29693
- for (var key in from) {
29694
- if (hasOwnProperty$b.call(from, key)) {
29695
- to[key] = from[key];
29696
- }
29697
- }
29698
-
29699
- if (getOwnPropertySymbols$1) {
29700
- symbols = getOwnPropertySymbols$1(from);
29701
- for (var i = 0; i < symbols.length; i++) {
29702
- if (propIsEnumerable$1.call(from, symbols[i])) {
29703
- to[symbols[i]] = from[symbols[i]];
29704
- }
29705
- }
29706
- }
29707
- }
29708
-
29709
- return to;
29710
- };
29711
-
29712
- /**
29713
- * Copyright (c) 2013-present, Facebook, Inc.
29714
- *
29715
- * This source code is licensed under the MIT license found in the
29716
- * LICENSE file in the root directory of this source tree.
29717
- */
29718
-
29719
- var ReactPropTypesSecret$2 = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
29720
-
29721
- var ReactPropTypesSecret_1$1 = ReactPropTypesSecret$2;
29722
-
29723
- var has$2 = Function.call.bind(Object.prototype.hasOwnProperty);
29724
-
29725
- var printWarning$2 = function() {};
29726
-
29727
- if (process.env.NODE_ENV !== 'production') {
29728
- var ReactPropTypesSecret$3 = ReactPropTypesSecret_1$1;
29729
- var loggedTypeFailures$1 = {};
29730
- var has$3 = has$2;
29731
-
29732
- printWarning$2 = function(text) {
29733
- var message = 'Warning: ' + text;
29734
- if (typeof console !== 'undefined') {
29735
- console.error(message);
29736
- }
29737
- try {
29738
- // --- Welcome to debugging React ---
29739
- // This error was thrown as a convenience so that you can use this stack
29740
- // to find the callsite that caused this warning to fire.
29741
- throw new Error(message);
29742
- } catch (x) { /**/ }
29743
- };
29744
- }
29745
-
29746
- /**
29747
- * Assert that the values match with the type specs.
29748
- * Error messages are memorized and will only be shown once.
29749
- *
29750
- * @param {object} typeSpecs Map of name to a ReactPropType
29751
- * @param {object} values Runtime values that need to be type-checked
29752
- * @param {string} location e.g. "prop", "context", "child context"
29753
- * @param {string} componentName Name of the component for error messages.
29754
- * @param {?Function} getStack Returns the component stack.
29755
- * @private
29756
- */
29757
- function checkPropTypes$1(typeSpecs, values, location, componentName, getStack) {
29758
- if (process.env.NODE_ENV !== 'production') {
29759
- for (var typeSpecName in typeSpecs) {
29760
- if (has$3(typeSpecs, typeSpecName)) {
29761
- var error;
29762
- // Prop type validation may throw. In case they do, we don't want to
29763
- // fail the render phase where it didn't fail before. So we log it.
29764
- // After these have been cleaned up, we'll let them throw.
29765
- try {
29766
- // This is intentionally an invariant that gets caught. It's the same
29767
- // behavior as without this statement except with a better message.
29768
- if (typeof typeSpecs[typeSpecName] !== 'function') {
29769
- var err = Error(
29770
- (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
29771
- 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
29772
- 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
29773
- );
29774
- err.name = 'Invariant Violation';
29775
- throw err;
29776
- }
29777
- error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret$3);
29778
- } catch (ex) {
29779
- error = ex;
29780
- }
29781
- if (error && !(error instanceof Error)) {
29782
- printWarning$2(
29783
- (componentName || 'React class') + ': type specification of ' +
29784
- location + ' `' + typeSpecName + '` is invalid; the type checker ' +
29785
- 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
29786
- 'You may have forgotten to pass an argument to the type checker ' +
29787
- 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
29788
- 'shape all require an argument).'
29789
- );
29790
- }
29791
- if (error instanceof Error && !(error.message in loggedTypeFailures$1)) {
29792
- // Only monitor this failure once because there tends to be a lot of the
29793
- // same error.
29794
- loggedTypeFailures$1[error.message] = true;
29795
-
29796
- var stack = getStack ? getStack() : '';
29797
-
29798
- printWarning$2(
29799
- 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
29800
- );
29801
- }
29802
- }
29803
- }
29804
- }
29805
- }
29806
-
29807
- /**
29808
- * Resets warning cache when testing.
29809
- *
29810
- * @private
29811
- */
29812
- checkPropTypes$1.resetWarningCache = function() {
29813
- if (process.env.NODE_ENV !== 'production') {
29814
- loggedTypeFailures$1 = {};
29815
- }
29816
- };
29817
-
29818
- var checkPropTypes_1$1 = checkPropTypes$1;
29819
-
29820
- var printWarning$3 = function() {};
29821
-
29822
- if (process.env.NODE_ENV !== 'production') {
29823
- printWarning$3 = function(text) {
29824
- var message = 'Warning: ' + text;
29825
- if (typeof console !== 'undefined') {
29826
- console.error(message);
29827
- }
29828
- try {
29829
- // --- Welcome to debugging React ---
29830
- // This error was thrown as a convenience so that you can use this stack
29831
- // to find the callsite that caused this warning to fire.
29832
- throw new Error(message);
29833
- } catch (x) {}
29834
- };
29835
- }
29836
-
29837
- function emptyFunctionThatReturnsNull$1() {
29838
- return null;
29839
- }
29840
-
29841
- var factoryWithTypeCheckers$1 = function(isValidElement, throwOnDirectAccess) {
29842
- /* global Symbol */
29843
- var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
29844
- var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
29845
-
29846
- /**
29847
- * Returns the iterator method function contained on the iterable object.
29848
- *
29849
- * Be sure to invoke the function with the iterable as context:
29850
- *
29851
- * var iteratorFn = getIteratorFn(myIterable);
29852
- * if (iteratorFn) {
29853
- * var iterator = iteratorFn.call(myIterable);
29854
- * ...
29855
- * }
29856
- *
29857
- * @param {?object} maybeIterable
29858
- * @return {?function}
29859
- */
29860
- function getIteratorFn(maybeIterable) {
29861
- var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
29862
- if (typeof iteratorFn === 'function') {
29863
- return iteratorFn;
29864
- }
29865
- }
29866
-
29867
- /**
29868
- * Collection of methods that allow declaration and validation of props that are
29869
- * supplied to React components. Example usage:
29870
- *
29871
- * var Props = require('ReactPropTypes');
29872
- * var MyArticle = React.createClass({
29873
- * propTypes: {
29874
- * // An optional string prop named "description".
29875
- * description: Props.string,
29876
- *
29877
- * // A required enum prop named "category".
29878
- * category: Props.oneOf(['News','Photos']).isRequired,
29879
- *
29880
- * // A prop named "dialog" that requires an instance of Dialog.
29881
- * dialog: Props.instanceOf(Dialog).isRequired
29882
- * },
29883
- * render: function() { ... }
29884
- * });
29885
- *
29886
- * A more formal specification of how these methods are used:
29887
- *
29888
- * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
29889
- * decl := ReactPropTypes.{type}(.isRequired)?
29890
- *
29891
- * Each and every declaration produces a function with the same signature. This
29892
- * allows the creation of custom validation functions. For example:
29893
- *
29894
- * var MyLink = React.createClass({
29895
- * propTypes: {
29896
- * // An optional string or URI prop named "href".
29897
- * href: function(props, propName, componentName) {
29898
- * var propValue = props[propName];
29899
- * if (propValue != null && typeof propValue !== 'string' &&
29900
- * !(propValue instanceof URI)) {
29901
- * return new Error(
29902
- * 'Expected a string or an URI for ' + propName + ' in ' +
29903
- * componentName
29904
- * );
29905
- * }
29906
- * }
29907
- * },
29908
- * render: function() {...}
29909
- * });
29910
- *
29911
- * @internal
29912
- */
29913
-
29914
- var ANONYMOUS = '<<anonymous>>';
29915
-
29916
- // Important!
29917
- // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
29918
- var ReactPropTypes = {
29919
- array: createPrimitiveTypeChecker('array'),
29920
- bigint: createPrimitiveTypeChecker('bigint'),
29921
- bool: createPrimitiveTypeChecker('boolean'),
29922
- func: createPrimitiveTypeChecker('function'),
29923
- number: createPrimitiveTypeChecker('number'),
29924
- object: createPrimitiveTypeChecker('object'),
29925
- string: createPrimitiveTypeChecker('string'),
29926
- symbol: createPrimitiveTypeChecker('symbol'),
29927
-
29928
- any: createAnyTypeChecker(),
29929
- arrayOf: createArrayOfTypeChecker,
29930
- element: createElementTypeChecker(),
29931
- elementType: createElementTypeTypeChecker(),
29932
- instanceOf: createInstanceTypeChecker,
29933
- node: createNodeChecker(),
29934
- objectOf: createObjectOfTypeChecker,
29935
- oneOf: createEnumTypeChecker,
29936
- oneOfType: createUnionTypeChecker,
29937
- shape: createShapeTypeChecker,
29938
- exact: createStrictShapeTypeChecker,
29939
- };
29940
-
29941
- /**
29942
- * inlined Object.is polyfill to avoid requiring consumers ship their own
29943
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
29944
- */
29945
- /*eslint-disable no-self-compare*/
29946
- function is(x, y) {
29947
- // SameValue algorithm
29948
- if (x === y) {
29949
- // Steps 1-5, 7-10
29950
- // Steps 6.b-6.e: +0 != -0
29951
- return x !== 0 || 1 / x === 1 / y;
29952
- } else {
29953
- // Step 6.a: NaN == NaN
29954
- return x !== x && y !== y;
29955
- }
29956
- }
29957
- /*eslint-enable no-self-compare*/
29958
-
29959
- /**
29960
- * We use an Error-like object for backward compatibility as people may call
29961
- * PropTypes directly and inspect their output. However, we don't use real
29962
- * Errors anymore. We don't inspect their stack anyway, and creating them
29963
- * is prohibitively expensive if they are created too often, such as what
29964
- * happens in oneOfType() for any type before the one that matched.
29965
- */
29966
- function PropTypeError(message, data) {
29967
- this.message = message;
29968
- this.data = data && typeof data === 'object' ? data: {};
29969
- this.stack = '';
29970
- }
29971
- // Make `instanceof Error` still work for returned errors.
29972
- PropTypeError.prototype = Error.prototype;
29973
-
29974
- function createChainableTypeChecker(validate) {
29975
- if (process.env.NODE_ENV !== 'production') {
29976
- var manualPropTypeCallCache = {};
29977
- var manualPropTypeWarningCount = 0;
29978
- }
29979
- function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
29980
- componentName = componentName || ANONYMOUS;
29981
- propFullName = propFullName || propName;
29982
-
29983
- if (secret !== ReactPropTypesSecret_1$1) {
29984
- if (throwOnDirectAccess) {
29985
- // New behavior only for users of `prop-types` package
29986
- var err = new Error(
29987
- 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
29988
- 'Use `PropTypes.checkPropTypes()` to call them. ' +
29989
- 'Read more at http://fb.me/use-check-prop-types'
29990
- );
29991
- err.name = 'Invariant Violation';
29992
- throw err;
29993
- } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
29994
- // Old behavior for people using React.PropTypes
29995
- var cacheKey = componentName + ':' + propName;
29996
- if (
29997
- !manualPropTypeCallCache[cacheKey] &&
29998
- // Avoid spamming the console because they are often not actionable except for lib authors
29999
- manualPropTypeWarningCount < 3
30000
- ) {
30001
- printWarning$3(
30002
- 'You are manually calling a React.PropTypes validation ' +
30003
- 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
30004
- 'and will throw in the standalone `prop-types` package. ' +
30005
- 'You may be seeing this warning due to a third-party PropTypes ' +
30006
- 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
30007
- );
30008
- manualPropTypeCallCache[cacheKey] = true;
30009
- manualPropTypeWarningCount++;
30010
- }
30011
- }
30012
- }
30013
- if (props[propName] == null) {
30014
- if (isRequired) {
30015
- if (props[propName] === null) {
30016
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
30017
- }
30018
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
30019
- }
30020
- return null;
30021
- } else {
30022
- return validate(props, propName, componentName, location, propFullName);
30023
- }
30024
- }
30025
-
30026
- var chainedCheckType = checkType.bind(null, false);
30027
- chainedCheckType.isRequired = checkType.bind(null, true);
30028
-
30029
- return chainedCheckType;
30030
- }
30031
-
30032
- function createPrimitiveTypeChecker(expectedType) {
30033
- function validate(props, propName, componentName, location, propFullName, secret) {
30034
- var propValue = props[propName];
30035
- var propType = getPropType(propValue);
30036
- if (propType !== expectedType) {
30037
- // `propValue` being instance of, say, date/regexp, pass the 'object'
30038
- // check, but we can offer a more precise error message here rather than
30039
- // 'of type `object`'.
30040
- var preciseType = getPreciseType(propValue);
30041
-
30042
- return new PropTypeError(
30043
- 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
30044
- {expectedType: expectedType}
30045
- );
30046
- }
30047
- return null;
30048
- }
30049
- return createChainableTypeChecker(validate);
30050
- }
30051
-
30052
- function createAnyTypeChecker() {
30053
- return createChainableTypeChecker(emptyFunctionThatReturnsNull$1);
30054
- }
30055
-
30056
- function createArrayOfTypeChecker(typeChecker) {
30057
- function validate(props, propName, componentName, location, propFullName) {
30058
- if (typeof typeChecker !== 'function') {
30059
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
30060
- }
30061
- var propValue = props[propName];
30062
- if (!Array.isArray(propValue)) {
30063
- var propType = getPropType(propValue);
30064
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
30065
- }
30066
- for (var i = 0; i < propValue.length; i++) {
30067
- var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret_1$1);
30068
- if (error instanceof Error) {
30069
- return error;
30070
- }
30071
- }
30072
- return null;
30073
- }
30074
- return createChainableTypeChecker(validate);
30075
- }
30076
-
30077
- function createElementTypeChecker() {
30078
- function validate(props, propName, componentName, location, propFullName) {
30079
- var propValue = props[propName];
30080
- if (!isValidElement(propValue)) {
30081
- var propType = getPropType(propValue);
30082
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
30083
- }
30084
- return null;
30085
- }
30086
- return createChainableTypeChecker(validate);
30087
- }
30088
-
30089
- function createElementTypeTypeChecker() {
30090
- function validate(props, propName, componentName, location, propFullName) {
30091
- var propValue = props[propName];
30092
- if (!reactIs$1.isValidElementType(propValue)) {
30093
- var propType = getPropType(propValue);
30094
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
30095
- }
30096
- return null;
30097
- }
30098
- return createChainableTypeChecker(validate);
30099
- }
30100
-
30101
- function createInstanceTypeChecker(expectedClass) {
30102
- function validate(props, propName, componentName, location, propFullName) {
30103
- if (!(props[propName] instanceof expectedClass)) {
30104
- var expectedClassName = expectedClass.name || ANONYMOUS;
30105
- var actualClassName = getClassName(props[propName]);
30106
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
30107
- }
30108
- return null;
30109
- }
30110
- return createChainableTypeChecker(validate);
30111
- }
30112
-
30113
- function createEnumTypeChecker(expectedValues) {
30114
- if (!Array.isArray(expectedValues)) {
30115
- if (process.env.NODE_ENV !== 'production') {
30116
- if (arguments.length > 1) {
30117
- printWarning$3(
30118
- 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
30119
- 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
30120
- );
30121
- } else {
30122
- printWarning$3('Invalid argument supplied to oneOf, expected an array.');
30123
- }
30124
- }
30125
- return emptyFunctionThatReturnsNull$1;
30126
- }
30127
-
30128
- function validate(props, propName, componentName, location, propFullName) {
30129
- var propValue = props[propName];
30130
- for (var i = 0; i < expectedValues.length; i++) {
30131
- if (is(propValue, expectedValues[i])) {
30132
- return null;
30133
- }
30134
- }
30135
-
30136
- var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
30137
- var type = getPreciseType(value);
30138
- if (type === 'symbol') {
30139
- return String(value);
30140
- }
30141
- return value;
30142
- });
30143
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
30144
- }
30145
- return createChainableTypeChecker(validate);
30146
- }
30147
-
30148
- function createObjectOfTypeChecker(typeChecker) {
30149
- function validate(props, propName, componentName, location, propFullName) {
30150
- if (typeof typeChecker !== 'function') {
30151
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
30152
- }
30153
- var propValue = props[propName];
30154
- var propType = getPropType(propValue);
30155
- if (propType !== 'object') {
30156
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
30157
- }
30158
- for (var key in propValue) {
30159
- if (has$2(propValue, key)) {
30160
- var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1$1);
30161
- if (error instanceof Error) {
30162
- return error;
30163
- }
30164
- }
30165
- }
30166
- return null;
30167
- }
30168
- return createChainableTypeChecker(validate);
30169
- }
30170
-
30171
- function createUnionTypeChecker(arrayOfTypeCheckers) {
30172
- if (!Array.isArray(arrayOfTypeCheckers)) {
30173
- process.env.NODE_ENV !== 'production' ? printWarning$3('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
30174
- return emptyFunctionThatReturnsNull$1;
30175
- }
30176
-
30177
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
30178
- var checker = arrayOfTypeCheckers[i];
30179
- if (typeof checker !== 'function') {
30180
- printWarning$3(
30181
- 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
30182
- 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
30183
- );
30184
- return emptyFunctionThatReturnsNull$1;
30185
- }
30186
- }
30187
-
30188
- function validate(props, propName, componentName, location, propFullName) {
30189
- var expectedTypes = [];
30190
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
30191
- var checker = arrayOfTypeCheckers[i];
30192
- var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret_1$1);
30193
- if (checkerResult == null) {
30194
- return null;
30195
- }
30196
- if (checkerResult.data && has$2(checkerResult.data, 'expectedType')) {
30197
- expectedTypes.push(checkerResult.data.expectedType);
30198
- }
30199
- }
30200
- var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
30201
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
30202
- }
30203
- return createChainableTypeChecker(validate);
30204
- }
30205
-
30206
- function createNodeChecker() {
30207
- function validate(props, propName, componentName, location, propFullName) {
30208
- if (!isNode(props[propName])) {
30209
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
30210
- }
30211
- return null;
30212
- }
30213
- return createChainableTypeChecker(validate);
30214
- }
30215
-
30216
- function invalidValidatorError(componentName, location, propFullName, key, type) {
30217
- return new PropTypeError(
30218
- (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
30219
- 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
30220
- );
30221
- }
30222
-
30223
- function createShapeTypeChecker(shapeTypes) {
30224
- function validate(props, propName, componentName, location, propFullName) {
30225
- var propValue = props[propName];
30226
- var propType = getPropType(propValue);
30227
- if (propType !== 'object') {
30228
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
30229
- }
30230
- for (var key in shapeTypes) {
30231
- var checker = shapeTypes[key];
30232
- if (typeof checker !== 'function') {
30233
- return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
30234
- }
30235
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1$1);
30236
- if (error) {
30237
- return error;
30238
- }
30239
- }
30240
- return null;
30241
- }
30242
- return createChainableTypeChecker(validate);
30243
- }
30244
-
30245
- function createStrictShapeTypeChecker(shapeTypes) {
30246
- function validate(props, propName, componentName, location, propFullName) {
30247
- var propValue = props[propName];
30248
- var propType = getPropType(propValue);
30249
- if (propType !== 'object') {
30250
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
30251
- }
30252
- // We need to check all keys in case some are required but missing from props.
30253
- var allKeys = objectAssign$1({}, props[propName], shapeTypes);
30254
- for (var key in allKeys) {
30255
- var checker = shapeTypes[key];
30256
- if (has$2(shapeTypes, key) && typeof checker !== 'function') {
30257
- return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
30258
- }
30259
- if (!checker) {
30260
- return new PropTypeError(
30261
- 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
30262
- '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
30263
- '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
30264
- );
30265
- }
30266
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1$1);
30267
- if (error) {
30268
- return error;
30269
- }
30270
- }
30271
- return null;
30272
- }
30273
-
30274
- return createChainableTypeChecker(validate);
30275
- }
30276
-
30277
- function isNode(propValue) {
30278
- switch (typeof propValue) {
30279
- case 'number':
30280
- case 'string':
30281
- case 'undefined':
30282
- return true;
30283
- case 'boolean':
30284
- return !propValue;
30285
- case 'object':
30286
- if (Array.isArray(propValue)) {
30287
- return propValue.every(isNode);
30288
- }
30289
- if (propValue === null || isValidElement(propValue)) {
30290
- return true;
30291
- }
30292
-
30293
- var iteratorFn = getIteratorFn(propValue);
30294
- if (iteratorFn) {
30295
- var iterator = iteratorFn.call(propValue);
30296
- var step;
30297
- if (iteratorFn !== propValue.entries) {
30298
- while (!(step = iterator.next()).done) {
30299
- if (!isNode(step.value)) {
30300
- return false;
30301
- }
30302
- }
30303
- } else {
30304
- // Iterator will provide entry [k,v] tuples rather than values.
30305
- while (!(step = iterator.next()).done) {
30306
- var entry = step.value;
30307
- if (entry) {
30308
- if (!isNode(entry[1])) {
30309
- return false;
30310
- }
30311
- }
30312
- }
30313
- }
30314
- } else {
30315
- return false;
30316
- }
30317
-
30318
- return true;
30319
- default:
30320
- return false;
30321
- }
30322
- }
30323
-
30324
- function isSymbol(propType, propValue) {
30325
- // Native Symbol.
30326
- if (propType === 'symbol') {
30327
- return true;
30328
- }
30329
-
30330
- // falsy value can't be a Symbol
30331
- if (!propValue) {
30332
- return false;
30333
- }
30334
-
30335
- // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
30336
- if (propValue['@@toStringTag'] === 'Symbol') {
30337
- return true;
30338
- }
30339
-
30340
- // Fallback for non-spec compliant Symbols which are polyfilled.
30341
- if (typeof Symbol === 'function' && propValue instanceof Symbol) {
30342
- return true;
30343
- }
30344
-
30345
- return false;
30346
- }
30347
-
30348
- // Equivalent of `typeof` but with special handling for array and regexp.
30349
- function getPropType(propValue) {
30350
- var propType = typeof propValue;
30351
- if (Array.isArray(propValue)) {
30352
- return 'array';
30353
- }
30354
- if (propValue instanceof RegExp) {
30355
- // Old webkits (at least until Android 4.0) return 'function' rather than
30356
- // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
30357
- // passes PropTypes.object.
30358
- return 'object';
30359
- }
30360
- if (isSymbol(propType, propValue)) {
30361
- return 'symbol';
30362
- }
30363
- return propType;
30364
- }
30365
-
30366
- // This handles more types than `getPropType`. Only used for error messages.
30367
- // See `createPrimitiveTypeChecker`.
30368
- function getPreciseType(propValue) {
30369
- if (typeof propValue === 'undefined' || propValue === null) {
30370
- return '' + propValue;
30371
- }
30372
- var propType = getPropType(propValue);
30373
- if (propType === 'object') {
30374
- if (propValue instanceof Date) {
30375
- return 'date';
30376
- } else if (propValue instanceof RegExp) {
30377
- return 'regexp';
30378
- }
30379
- }
30380
- return propType;
30381
- }
30382
-
30383
- // Returns a string that is postfixed to a warning about an invalid type.
30384
- // For example, "undefined" or "of type array"
30385
- function getPostfixForTypeWarning(value) {
30386
- var type = getPreciseType(value);
30387
- switch (type) {
30388
- case 'array':
30389
- case 'object':
30390
- return 'an ' + type;
30391
- case 'boolean':
30392
- case 'date':
30393
- case 'regexp':
30394
- return 'a ' + type;
30395
- default:
30396
- return type;
30397
- }
30398
- }
30399
-
30400
- // Returns class name of the object, if any.
30401
- function getClassName(propValue) {
30402
- if (!propValue.constructor || !propValue.constructor.name) {
30403
- return ANONYMOUS;
30404
- }
30405
- return propValue.constructor.name;
30406
- }
30407
-
30408
- ReactPropTypes.checkPropTypes = checkPropTypes_1$1;
30409
- ReactPropTypes.resetWarningCache = checkPropTypes_1$1.resetWarningCache;
30410
- ReactPropTypes.PropTypes = ReactPropTypes;
30411
-
30412
- return ReactPropTypes;
30413
- };
30414
-
30415
- function emptyFunction$1() {}
30416
- function emptyFunctionWithReset$1() {}
30417
- emptyFunctionWithReset$1.resetWarningCache = emptyFunction$1;
30418
-
30419
- var factoryWithThrowingShims$1 = function() {
30420
- function shim(props, propName, componentName, location, propFullName, secret) {
30421
- if (secret === ReactPropTypesSecret_1$1) {
30422
- // It is still safe when called from React.
30423
- return;
30424
- }
30425
- var err = new Error(
30426
- 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
30427
- 'Use PropTypes.checkPropTypes() to call them. ' +
30428
- 'Read more at http://fb.me/use-check-prop-types'
30429
- );
30430
- err.name = 'Invariant Violation';
30431
- throw err;
30432
- } shim.isRequired = shim;
30433
- function getShim() {
30434
- return shim;
30435
- } // Important!
30436
- // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
30437
- var ReactPropTypes = {
30438
- array: shim,
30439
- bigint: shim,
30440
- bool: shim,
30441
- func: shim,
30442
- number: shim,
30443
- object: shim,
30444
- string: shim,
30445
- symbol: shim,
30446
-
30447
- any: shim,
30448
- arrayOf: getShim,
30449
- element: shim,
30450
- elementType: shim,
30451
- instanceOf: getShim,
30452
- node: shim,
30453
- objectOf: getShim,
30454
- oneOf: getShim,
30455
- oneOfType: getShim,
30456
- shape: getShim,
30457
- exact: getShim,
30458
-
30459
- checkPropTypes: emptyFunctionWithReset$1,
30460
- resetWarningCache: emptyFunction$1
30461
- };
30462
-
30463
- ReactPropTypes.PropTypes = ReactPropTypes;
30464
-
30465
- return ReactPropTypes;
30466
- };
30467
-
30468
- var propTypes$1 = createCommonjsModule(function (module) {
30469
- /**
30470
- * Copyright (c) 2013-present, Facebook, Inc.
30471
- *
30472
- * This source code is licensed under the MIT license found in the
30473
- * LICENSE file in the root directory of this source tree.
30474
- */
30475
-
30476
- if (process.env.NODE_ENV !== 'production') {
30477
- var ReactIs = reactIs$1;
30478
-
30479
- // By explicitly using `prop-types` you are opting into new development behavior.
30480
- // http://fb.me/prop-types-in-prod
30481
- var throwOnDirectAccess = true;
30482
- module.exports = factoryWithTypeCheckers$1(ReactIs.isElement, throwOnDirectAccess);
30483
- } else {
30484
- // By explicitly using `prop-types` you are opting into new production behavior.
30485
- // http://fb.me/prop-types-in-prod
30486
- module.exports = factoryWithThrowingShims$1();
30487
- }
30488
- });
30489
-
30490
29724
  const SearchConnection = _ref => {
30491
29725
  var _Digit$Hooks$ws$usews;
30492
29726
  let {
@@ -30888,7 +30122,7 @@ const SearchConnection = _ref => {
30888
30122
  }));
30889
30123
  };
30890
30124
  SearchConnection.propTypes = {
30891
- loginParams: propTypes$1.any
30125
+ loginParams: propTypes.any
30892
30126
  };
30893
30127
  SearchConnection.defaultProps = {
30894
30128
  loginParams: null
@@ -31864,9 +31098,9 @@ const ChallanSearchResults = _ref => {
31864
31098
  }, t("WS_CLICK_HERE_TO_APPLY"))))));
31865
31099
  };
31866
31100
  ChallanSearchResults.propTypes = {
31867
- template: propTypes$1.any,
31868
- header: propTypes$1.string,
31869
- actionButtonLabel: propTypes$1.string
31101
+ template: propTypes.any,
31102
+ header: propTypes.string,
31103
+ actionButtonLabel: propTypes.string
31870
31104
  };
31871
31105
  ChallanSearchResults.defaultProps = {
31872
31106
  template: [],
@@ -38805,9 +38039,9 @@ const WNSMyBills = _ref => {
38805
38039
  }, t("CS_BILLS_TEXT_NO_BILLS_FOUND")));
38806
38040
  };
38807
38041
  WNSMyBills.propTypes = {
38808
- template: propTypes$1.any,
38809
- header: propTypes$1.string,
38810
- actionButtonLabel: propTypes$1.string
38042
+ template: propTypes.any,
38043
+ header: propTypes.string,
38044
+ actionButtonLabel: propTypes.string
38811
38045
  };
38812
38046
  WNSMyBills.defaultProps = {
38813
38047
  template: [],
@@ -38869,6 +38103,15 @@ const WSInfoPage = () => {
38869
38103
  const [isOtpSending, setIsOtpSending] = React.useState(false);
38870
38104
  const [isOtpVerifying, setIsOtpVerifying] = React.useState(false);
38871
38105
  const [showToast, setShowToast] = React.useState(null);
38106
+ const [isMobileVerified, setIsMobileVerified] = React.useState(false);
38107
+ const [timeLeft, setTimeLeft] = React.useState(0);
38108
+ React.useEffect(() => {
38109
+ let timer;
38110
+ if (timeLeft > 0) {
38111
+ timer = setTimeout(() => setTimeLeft(timeLeft - 1), 1000);
38112
+ }
38113
+ return () => clearTimeout(timer);
38114
+ }, [timeLeft]);
38872
38115
  React.useEffect(() => {
38873
38116
  sessionStorage.removeItem("WS_OTP_VERIFIED_PROPERTY_ID");
38874
38117
  }, []);
@@ -38887,7 +38130,7 @@ const WSInfoPage = () => {
38887
38130
  mobileNumber: mobileNumberToSearch
38888
38131
  },
38889
38132
  tenantId: tenantId,
38890
- enabled: (hasProperty === null || hasProperty === void 0 ? void 0 : hasProperty.code) === "YES" && (mobileNumberToSearch === null || mobileNumberToSearch === void 0 ? void 0 : mobileNumberToSearch.length) === 10 ? true : false
38133
+ enabled: (hasProperty === null || hasProperty === void 0 ? void 0 : hasProperty.code) === "YES" && (mobileNumberToSearch === null || mobileNumberToSearch === void 0 ? void 0 : mobileNumberToSearch.length) === 10 && isMobileVerified ? true : false
38891
38134
  });
38892
38135
  const radioOptions = [{
38893
38136
  code: "YES",
@@ -38938,7 +38181,7 @@ const WSInfoPage = () => {
38938
38181
  setIsOtpSending(false);
38939
38182
  setShowToast({
38940
38183
  key: "error",
38941
- 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"
38184
+ 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"
38942
38185
  });
38943
38186
  return;
38944
38187
  }
@@ -38948,21 +38191,22 @@ const WSInfoPage = () => {
38948
38191
  setIsOtpSending(false);
38949
38192
  setShowToast({
38950
38193
  key: "error",
38951
- message: (errObj === null || errObj === void 0 ? void 0 : (_errObj$ = errObj[0]) === null || _errObj$ === void 0 ? void 0 : _errObj$.message) || "Failed to send OTP"
38194
+ 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"
38952
38195
  });
38953
38196
  return;
38954
38197
  }
38955
38198
  setIsOtpSending(false);
38956
38199
  setShowOtpVerification(true);
38200
+ setTimeLeft(30);
38957
38201
  setShowToast({
38958
38202
  key: "success",
38959
- message: "OTP sent successfully!"
38203
+ message: t("PT_SEC_OTP_SENT_SUCEESS") || "OTP sent successfully!"
38960
38204
  });
38961
38205
  });
38962
38206
  }, function (err) {
38963
38207
  var _err$response, _err$response$data, _err$response2, _err$response2$data;
38964
38208
  setIsOtpSending(false);
38965
- let errMsg = "Failed to send OTP";
38209
+ let errMsg = t("WS_FAILED_TO_SEND_OTP") || "Failed to send OTP";
38966
38210
  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) {
38967
38211
  var _err$response$data$er, _err$response$data$er2, _err$response$data$er3, _err$response$data$er4;
38968
38212
  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;
@@ -38990,7 +38234,7 @@ const WSInfoPage = () => {
38990
38234
  if (!otp || otp.length < 6) {
38991
38235
  setShowToast({
38992
38236
  key: "warning",
38993
- message: "Please enter a valid 6-digit OTP"
38237
+ message: t("WS_PLEASE_ENTER_VALID_OTP") || "Please enter a valid 6-digit OTP"
38994
38238
  });
38995
38239
  return Promise.resolve();
38996
38240
  }
@@ -39021,14 +38265,15 @@ const WSInfoPage = () => {
39021
38265
  setIsOtpVerifying(false);
39022
38266
  setShowToast({
39023
38267
  key: "success",
39024
- message: "OTP verified successfully!"
38268
+ message: t("WS_OTP_VERIFIED_SUCCESSFULLY") || "OTP verified successfully!"
39025
38269
  });
39026
- proceedToNext();
38270
+ setShowOtpVerification(false);
38271
+ setIsMobileVerified(true);
39027
38272
  });
39028
38273
  }, function (err) {
39029
38274
  var _err$response3, _err$response3$data, _err$response4, _err$response4$data;
39030
38275
  setIsOtpVerifying(false);
39031
- let errMsg = err.message || "Failed to verify OTP";
38276
+ let errMsg = err.message || t("WS_FAILED_TO_VERIFY_OTP") || "Failed to verify OTP";
39032
38277
  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) {
39033
38278
  var _err$response$data$er5, _err$response$data$er6, _err$response$data$er7, _err$response$data$er8;
39034
38279
  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;
@@ -39053,7 +38298,14 @@ const WSInfoPage = () => {
39053
38298
  if (e.stopPropagation) e.stopPropagation();
39054
38299
  }
39055
38300
  if ((hasProperty === null || hasProperty === void 0 ? void 0 : hasProperty.code) === "YES" && selectedProperty) {
39056
- handleSendOtp(e);
38301
+ if (!isMobileVerified) {
38302
+ setShowToast({
38303
+ key: "warning",
38304
+ message: t("WS_PLEASE_VERIFY_MOBILE_NUMBER") || "Please verify mobile number first"
38305
+ });
38306
+ return;
38307
+ }
38308
+ proceedToNext();
39057
38309
  } else if ((hasProperty === null || hasProperty === void 0 ? void 0 : hasProperty.code) === "YES" && !selectedProperty) {
39058
38310
  return;
39059
38311
  } else {
@@ -39068,72 +38320,6 @@ const WSInfoPage = () => {
39068
38320
  ...prop,
39069
38321
  displayName: `${prop.propertyId} - ${getAddress$1(prop.address, t)}`
39070
38322
  }))) || [];
39071
- if (showOtpVerification) {
39072
- return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, null, /*#__PURE__*/React__default.createElement("form", {
39073
- onSubmit: handleVerifyOtp
39074
- }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardHeader, null, t("WS_VERIFY_OTP_HEADER") || "Verify OTP"), /*#__PURE__*/React__default.createElement("div", {
39075
- style: {
39076
- marginBottom: "24px"
39077
- }
39078
- }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Label, null, t("WS_ENTER_OTP_SENT_TO") || "Enter OTP sent to", " +91 ", getMaskedPhone(mobileNumberToSearch), " *"), /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
39079
- t: t,
39080
- type: "text",
39081
- inputMode: "numeric",
39082
- pattern: "[0-9]*",
39083
- isMandatory: false,
39084
- value: otp,
39085
- maxLength: 6,
39086
- onChange: e => setOtp(e.target.value.replace(/\D/g, "").slice(0, 6)),
39087
- onKeyDown: e => {
39088
- if (["-", "+", "e", "E", "."].includes(e.key)) e.preventDefault();
39089
- },
39090
- placeholder: t("WS_ENTER_6_DIGIT_OTP") || "Enter 6-digit OTP",
39091
- style: {
39092
- width: "100%",
39093
- maxWidth: "300px"
39094
- }
39095
- })), /*#__PURE__*/React__default.createElement("div", {
39096
- style: {
39097
- display: "flex",
39098
- gap: "16px",
39099
- marginBottom: "24px"
39100
- }
39101
- }, /*#__PURE__*/React__default.createElement("button", {
39102
- type: "button",
39103
- onClick: handleSendOtp,
39104
- disabled: isOtpSending,
39105
- style: {
39106
- color: "#f47738",
39107
- background: "none",
39108
- border: "none",
39109
- cursor: "pointer",
39110
- fontWeight: "bold",
39111
- textDecoration: "underline"
39112
- }
39113
- }, isOtpSending ? t("WS_SENDING_OTP") || "Sending..." : t("WS_RESEND_OTP") || "Resend OTP"), /*#__PURE__*/React__default.createElement("button", {
39114
- type: "button",
39115
- onClick: () => setShowOtpVerification(false),
39116
- style: {
39117
- color: "#f47738",
39118
- background: "none",
39119
- border: "none",
39120
- cursor: "pointer",
39121
- fontWeight: "bold",
39122
- textDecoration: "underline"
39123
- }
39124
- }, t("CS_COMMON_CANCEL") || "Cancel")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
39125
- label: t("WS_VERIFY_OTP_AND_PROCEED") || "Verify & Proceed",
39126
- onSubmit: handleVerifyOtp,
39127
- disabled: otp.length < 6 || isOtpVerifying,
39128
- submit: true
39129
- }))), showToast && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
39130
- error: showToast.key === "error",
39131
- warning: showToast.key === "warning",
39132
- label: t(showToast.message),
39133
- onClose: () => setShowToast(null),
39134
- isDleteBtn: true
39135
- }));
39136
- }
39137
38323
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardHeader, null, t("WS_COMMON_APPL_NEW_CONNECTION")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CitizenInfoLabel, {
39138
38324
  style: {
39139
38325
  margin: "0px",
@@ -39165,30 +38351,7 @@ const WSInfoPage = () => {
39165
38351
  display: "flex",
39166
38352
  gap: "24px"
39167
38353
  }
39168
- })), (hasProperty === null || hasProperty === void 0 ? void 0 : hasProperty.code) === "YES" && /*#__PURE__*/React__default.createElement("div", {
39169
- style: {
39170
- marginBottom: "24px"
39171
- }
39172
- }, !isEmployee && /*#__PURE__*/React__default.createElement("div", {
39173
- style: {
39174
- marginBottom: "16px"
39175
- }
39176
- }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Label, null, t("CORE_COMMON_MOBILE_NUMBER")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
39177
- t: t,
39178
- type: "number",
39179
- isMandatory: false,
39180
- name: "mobileNumber",
39181
- value: searchMobileNumber,
39182
- onChange: e => {
39183
- const val = e.target.value.replace(/\D/g, "").slice(0, 10);
39184
- setSearchMobileNumber(val);
39185
- setSelectedProperty(null);
39186
- setShowOtpVerification(false);
39187
- setOtp("");
39188
- },
39189
- placeholder: t("Enter mobile number"),
39190
- maxLength: 10
39191
- })), isEmployee && /*#__PURE__*/React__default.createElement("div", {
38354
+ })), (hasProperty === null || hasProperty === void 0 ? void 0 : hasProperty.code) === "YES" && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
39192
38355
  style: {
39193
38356
  display: "flex",
39194
38357
  flexDirection: "column",
@@ -39197,39 +38360,59 @@ const WSInfoPage = () => {
39197
38360
  }
39198
38361
  }, /*#__PURE__*/React__default.createElement("div", {
39199
38362
  style: {
39200
- display: "flex",
38363
+ display: "grid",
38364
+ gridTemplateColumns: "1fr 1fr",
39201
38365
  gap: "24px",
39202
- alignItems: "flex-end"
38366
+ alignItems: "start"
38367
+ }
38368
+ }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Label, null, t("CORE_COMMON_MOBILE_NUMBER")), /*#__PURE__*/React__default.createElement("div", {
38369
+ style: {
38370
+ display: "flex",
38371
+ gap: "16px",
38372
+ alignItems: "center"
39203
38373
  }
39204
38374
  }, /*#__PURE__*/React__default.createElement("div", {
39205
38375
  style: {
39206
38376
  flex: 1
39207
38377
  }
39208
- }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Label, null, t("CORE_COMMON_MOBILE_NUMBER")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
38378
+ }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
39209
38379
  t: t,
39210
38380
  type: "number",
39211
38381
  isMandatory: false,
39212
38382
  name: "mobileNumber",
39213
38383
  value: searchMobileNumber,
39214
38384
  onChange: e => {
39215
- const val = e.target.value;
39216
- if (val.length <= 10) {
39217
- setSearchMobileNumber(val);
39218
- setSelectedProperty(null);
39219
- setShowOtpVerification(false);
39220
- setOtp("");
39221
- }
38385
+ const val = e.target.value.replace(/\D/g, "").slice(0, 10);
38386
+ setSearchMobileNumber(val);
38387
+ setSelectedProperty(null);
38388
+ setShowOtpVerification(false);
38389
+ setOtp("");
38390
+ setIsMobileVerified(false);
39222
38391
  },
39223
- placeholder: t("Enter mobile number"),
39224
- maxLength: 10
39225
- })), /*#__PURE__*/React__default.createElement("div", {
38392
+ placeholder: t("WS_ENTER_MOBILE_NUMBER") || "Enter mobile number",
38393
+ maxLength: 10,
38394
+ disabled: isMobileVerified
38395
+ })), (searchMobileNumber === null || searchMobileNumber === void 0 ? void 0 : searchMobileNumber.length) === 10 && !isMobileVerified && !showOtpVerification && /*#__PURE__*/React__default.createElement("button", {
38396
+ type: "button",
38397
+ onClick: handleSendOtp,
38398
+ disabled: isOtpSending,
39226
38399
  style: {
39227
- flex: 1
38400
+ padding: "8px 16px",
38401
+ border: "1px solid #1a67a3",
38402
+ background: "white",
38403
+ color: "#1a67a3",
38404
+ borderRadius: "4px",
38405
+ cursor: "pointer",
38406
+ fontWeight: "bold",
38407
+ whiteSpace: "nowrap"
38408
+ }
38409
+ }, isOtpSending ? t("WS_SENDING_OTP") || "Sending..." : t("PTUPNO_SENDOTP") || "Send OTP"))), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Label, null, t("WS_SELECT_EXISTING_PROPERTY")), isLoading ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null) : /*#__PURE__*/React__default.createElement("div", {
38410
+ style: {
38411
+ display: "flex",
38412
+ flexDirection: "column",
38413
+ gap: "8px"
39228
38414
  }
39229
- }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Label, null, t("WS_SELECT_EXISTING_PROPERTY")), /*#__PURE__*/React__default.createElement("div", {
39230
- className: "field"
39231
38415
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Dropdown, {
39232
- className: "form-field",
39233
38416
  option: propertyOptions,
39234
38417
  optionKey: "displayName",
39235
38418
  id: "propertyId",
@@ -39241,51 +38424,125 @@ const WSInfoPage = () => {
39241
38424
  },
39242
38425
  t: t,
39243
38426
  placeholder: t("PT_SELECT_PROPERTY"),
39244
- disable: isLoading || propertyOptions.length === 0
39245
- })))), (searchMobileNumber === null || searchMobileNumber === void 0 ? void 0 : searchMobileNumber.length) === 10 && !isLoading && propertyOptions.length === 0 && /*#__PURE__*/React__default.createElement("div", {
38427
+ disable: !isMobileVerified || propertyOptions.length === 0
38428
+ }), propertyOptions.length > 0 && /*#__PURE__*/React__default.createElement("span", {
38429
+ style: {
38430
+ fontSize: "14px",
38431
+ color: "#505A5F"
38432
+ }
38433
+ }, t("WS_PROPERTY_AUTOFILL_MSG"))))), showOtpVerification && !isMobileVerified && /*#__PURE__*/React__default.createElement("div", {
38434
+ style: {
38435
+ border: "1px solid #d6d5d4",
38436
+ borderRadius: "4px",
38437
+ background: "#f8f9fa",
38438
+ padding: "12px"
38439
+ }
38440
+ }, /*#__PURE__*/React__default.createElement("div", {
38441
+ style: {
38442
+ fontWeight: "bold",
38443
+ fontSize: "18px",
38444
+ marginBottom: "8px"
38445
+ }
38446
+ }, t("WS_VERIFY_OTP_HEADER") || "OTP Verification"), /*#__PURE__*/React__default.createElement("div", {
38447
+ style: {
38448
+ color: "#505A5F",
38449
+ marginBottom: "16px"
38450
+ }
38451
+ }, t("WS_ENTER_OTP_SENT_TO") || "Enter the 6-digit OTP sent to", " ", getMaskedPhone(searchMobileNumber)), /*#__PURE__*/React__default.createElement("div", {
39246
38452
  style: {
39247
38453
  display: "flex",
39248
- flexDirection: "column",
39249
- gap: "16px"
38454
+ flexWrap: "wrap",
38455
+ gap: "15px",
38456
+ alignItems: "center"
39250
38457
  }
39251
- }, /*#__PURE__*/React__default.createElement("span", {
38458
+ }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.OTPInput, {
39252
38459
  style: {
39253
- color: "#d63031",
38460
+ marginBottom: "0px"
38461
+ },
38462
+ length: 6,
38463
+ onChange: setOtp,
38464
+ value: otp
38465
+ }), /*#__PURE__*/React__default.createElement("button", {
38466
+ type: "button",
38467
+ onClick: handleVerifyOtp,
38468
+ disabled: otp.length < 6 || isOtpVerifying,
38469
+ style: {
38470
+ padding: "6px 20px",
38471
+ background: otp.length < 6 || isOtpVerifying ? "#ccc" : "#1a67a3",
38472
+ color: "white",
38473
+ border: "none",
38474
+ borderRadius: "4px",
38475
+ cursor: otp.length < 6 || isOtpVerifying ? "not-allowed" : "pointer",
39254
38476
  fontWeight: "bold"
39255
38477
  }
39256
- }, t("WS_NO_PROPERTY_FOUND_ON_THIS_NUMBER") || "No property found on this number, please create the property first."), /*#__PURE__*/React__default.createElement("span", {
39257
- onClick: handleCreateProperty
39258
- }, /*#__PURE__*/React__default.createElement("button", {
39259
- className: "submit-bar",
38478
+ }, isOtpVerifying ? t("WS_VERIFYING_OTP") || "Verifying..." : t("WS_VERIFY_OTP_AND_PROCEED") || "Verify OTP"), /*#__PURE__*/React__default.createElement("button", {
39260
38479
  type: "button",
38480
+ onClick: handleSendOtp,
38481
+ disabled: timeLeft > 0 || isOtpSending,
39261
38482
  style: {
39262
- color: "white",
39263
- margin: 0
38483
+ padding: "6px 20px",
38484
+ background: "white",
38485
+ color: timeLeft > 0 || isOtpSending ? "#ccc" : "#1a67a3",
38486
+ border: `1px solid ${timeLeft > 0 || isOtpSending ? "#ccc" : "#1a67a3"}`,
38487
+ borderRadius: "4px",
38488
+ cursor: timeLeft > 0 || isOtpSending ? "not-allowed" : "pointer",
38489
+ fontWeight: "bold"
39264
38490
  }
39265
- }, t("CPT_CREATE_PROPERTY"))))), !isEmployee && (isLoading || propertyOptions.length > 0) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Label, null, t("WS_SELECT_EXISTING_PROPERTY")), isLoading && !isEmployee ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null) : !isEmployee ? propertyOptions.length > 0 ? /*#__PURE__*/React__default.createElement("div", {
38491
+ }, timeLeft > 0 ? `${t("WS_RESEND_OTP") || "Resend OTP"} (00:${timeLeft < 10 ? `0${timeLeft}` : timeLeft})` : t("WS_RESEND_OTP") || "Resend OTP")), timeLeft > 0 && /*#__PURE__*/React__default.createElement("div", {
38492
+ style: {
38493
+ marginTop: "12px",
38494
+ color: "#505A5F",
38495
+ fontSize: "14px"
38496
+ }
38497
+ }, t("WS_DIDNT_RECEIVE_OTP_RESEND") || "Didn't receive OTP? You can resend after", " ", timeLeft, " ", t("WS_SECONDS") || "seconds", ".")), isMobileVerified && /*#__PURE__*/React__default.createElement("div", {
39266
38498
  style: {
39267
38499
  display: "flex",
39268
- flexDirection: "column",
38500
+ justifyContent: "space-between",
38501
+ alignItems: "center",
38502
+ background: "#d4edda",
38503
+ border: "1px solid #c3e6cb",
38504
+ color: "#155724",
38505
+ padding: "12px 16px",
38506
+ borderRadius: "4px"
38507
+ }
38508
+ }, /*#__PURE__*/React__default.createElement("div", {
38509
+ style: {
38510
+ display: "flex",
38511
+ alignItems: "center",
39269
38512
  gap: "8px"
39270
38513
  }
39271
- }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Dropdown, {
39272
- option: propertyOptions,
39273
- optionKey: "displayName",
39274
- id: "propertyId",
39275
- selected: selectedProperty,
39276
- select: val => {
39277
- setSelectedProperty(val);
39278
- setShowOtpVerification(false);
38514
+ }, /*#__PURE__*/React__default.createElement("span", {
38515
+ style: {
38516
+ background: "#28a745",
38517
+ color: "white",
38518
+ borderRadius: "50%",
38519
+ width: "24px",
38520
+ height: "24px",
38521
+ display: "inline-flex",
38522
+ justifyContent: "center",
38523
+ alignItems: "center",
38524
+ fontWeight: "bold"
38525
+ }
38526
+ }, "\u2713"), /*#__PURE__*/React__default.createElement("span", {
38527
+ style: {
38528
+ fontWeight: "bold"
38529
+ }
38530
+ }, t("WS_MOBILE_VERIFIED_SUCCESSFULLY") || "Mobile number verified successfully!")), /*#__PURE__*/React__default.createElement("button", {
38531
+ type: "button",
38532
+ onClick: () => {
38533
+ setIsMobileVerified(false);
39279
38534
  setOtp("");
38535
+ setShowOtpVerification(false);
39280
38536
  },
39281
- t: t,
39282
- placeholder: t("PT_SELECT_PROPERTY")
39283
- }), /*#__PURE__*/React__default.createElement("span", {
39284
38537
  style: {
39285
- fontSize: "14px",
39286
- color: "#505A5F"
38538
+ color: "#1a67a3",
38539
+ background: "none",
38540
+ border: "none",
38541
+ cursor: "pointer",
38542
+ fontWeight: "bold",
38543
+ textDecoration: "underline"
39287
38544
  }
39288
- }, t("WS_PROPERTY_AUTOFILL_MSG"))) : /*#__PURE__*/React__default.createElement("div", {
38545
+ }, t("WS_CHANGE_NUMBER") || "Change Number")), (searchMobileNumber === null || searchMobileNumber === void 0 ? void 0 : searchMobileNumber.length) === 10 && isMobileVerified && !isLoading && propertyOptions.length === 0 && /*#__PURE__*/React__default.createElement("div", {
39289
38546
  style: {
39290
38547
  display: "flex",
39291
38548
  flexDirection: "column",
@@ -39306,7 +38563,7 @@ const WSInfoPage = () => {
39306
38563
  color: "white",
39307
38564
  margin: 0
39308
38565
  }
39309
- }, t("CPT_CREATE_PROPERTY")))) : null), (hasProperty === null || hasProperty === void 0 ? void 0 : hasProperty.code) === "NO" && /*#__PURE__*/React__default.createElement("div", {
38566
+ }, t("CPT_CREATE_PROPERTY")))))), (hasProperty === null || hasProperty === void 0 ? void 0 : hasProperty.code) === "NO" && /*#__PURE__*/React__default.createElement("div", {
39310
38567
  style: {
39311
38568
  marginBottom: "24px",
39312
38569
  display: "flex",
@@ -39322,7 +38579,7 @@ const WSInfoPage = () => {
39322
38579
  color: "white",
39323
38580
  margin: 0
39324
38581
  }
39325
- }, t("CPT_CREATE_PROPERTY")))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, {
38582
+ }, t("CPT_CREATE_PROPERTY")))), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, {
39326
38583
  style: {
39327
38584
  marginTop: "0",
39328
38585
  marginBottom: "0"
@@ -39414,7 +38671,7 @@ const WSInfoPage = () => {
39414
38671
  marginBottom: "24px",
39415
38672
  lineHeight: "2"
39416
38673
  }
39417
- }, /*#__PURE__*/React__default.createElement("li", null, t("WS_DOC_IDENTITY_PROOF")), /*#__PURE__*/React__default.createElement("li", null, t("WS_DOC_ADDRESS_PROOF")), /*#__PURE__*/React__default.createElement("li", null, t("WS_DOC_ELECTRICITY_BILL")), /*#__PURE__*/React__default.createElement("li", null, t("WS_DOC_PLUMBER_REPORT")), /*#__PURE__*/React__default.createElement("li", null, t("WS_DOC_BUILDING_PLAN")), /*#__PURE__*/React__default.createElement("li", null, t("WS_DOC_PROPERTY_TAX_RECEIPT")), /*#__PURE__*/React__default.createElement("li", null, t("WS_DOC_APPLICANT_PHOTOGRAPH"))), !hasProperty || (hasProperty === null || hasProperty === void 0 ? void 0 : hasProperty.code) === "YES" && !selectedProperty ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
38674
+ }, /*#__PURE__*/React__default.createElement("li", null, t("WS_DOC_IDENTITY_PROOF")), /*#__PURE__*/React__default.createElement("li", null, t("WS_DOC_ADDRESS_PROOF")), /*#__PURE__*/React__default.createElement("li", null, t("WS_DOC_ELECTRICITY_BILL")), /*#__PURE__*/React__default.createElement("li", null, t("WS_DOC_PLUMBER_REPORT")), /*#__PURE__*/React__default.createElement("li", null, t("WS_DOC_BUILDING_PLAN")), /*#__PURE__*/React__default.createElement("li", null, t("WS_DOC_PROPERTY_TAX_RECEIPT")), /*#__PURE__*/React__default.createElement("li", null, t("WS_DOC_APPLICANT_PHOTOGRAPH")))), !hasProperty || (hasProperty === null || hasProperty === void 0 ? void 0 : hasProperty.code) === "YES" && !selectedProperty ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
39418
38675
  label: t("CS_COMMON_NEXT"),
39419
38676
  onSubmit: () => {},
39420
38677
  disabled: true
@@ -44465,12 +43722,12 @@ const configSVApproverApplication = _ref => {
44465
43722
  };
44466
43723
  };
44467
43724
 
44468
- const Heading = props => {
43725
+ const Heading$1 = props => {
44469
43726
  return /*#__PURE__*/React__default.createElement("h1", {
44470
43727
  className: "heading-m"
44471
43728
  }, props.label);
44472
43729
  };
44473
- const Close$1 = () => /*#__PURE__*/React__default.createElement("svg", {
43730
+ const Close$2 = () => /*#__PURE__*/React__default.createElement("svg", {
44474
43731
  xmlns: "http://www.w3.org/2000/svg",
44475
43732
  viewBox: "0 0 24 24",
44476
43733
  fill: "#FFFFFF"
@@ -44480,11 +43737,11 @@ const Close$1 = () => /*#__PURE__*/React__default.createElement("svg", {
44480
43737
  }), /*#__PURE__*/React__default.createElement("path", {
44481
43738
  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"
44482
43739
  }));
44483
- const CloseBtn = props => {
43740
+ const CloseBtn$1 = props => {
44484
43741
  return /*#__PURE__*/React__default.createElement("div", {
44485
43742
  className: "icon-bg-secondary",
44486
43743
  onClick: props.onClick
44487
- }, /*#__PURE__*/React__default.createElement(Close$1, null));
43744
+ }, /*#__PURE__*/React__default.createElement(Close$2, null));
44488
43745
  };
44489
43746
  const ActionModal = _ref => {
44490
43747
  var _action$assigneeRoles, _action$assigneeRoles2;
@@ -44566,7 +43823,7 @@ const ActionModal = _ref => {
44566
43823
  if (file.size >= 5242880) {
44567
43824
  setError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));
44568
43825
  } else {
44569
- const _temp = _catch$1(function () {
43826
+ const _temp = _catch(function () {
44570
43827
  return Promise.resolve(Digit.UploadServices.Filestorage("PT", file, Digit.ULBService.getStateId())).then(function (response) {
44571
43828
  var _response$data, _response$data$files;
44572
43829
  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) {
@@ -44666,10 +43923,10 @@ const ActionModal = _ref => {
44666
43923
  }
44667
43924
  }, [action, approvers, financialYears, selectedFinancialYear, uploadedFile]);
44668
43925
  return action && config.form ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Modal, {
44669
- headerBarMain: /*#__PURE__*/React__default.createElement(Heading, {
43926
+ headerBarMain: /*#__PURE__*/React__default.createElement(Heading$1, {
44670
43927
  label: t(config.label.heading)
44671
43928
  }),
44672
- headerBarEnd: /*#__PURE__*/React__default.createElement(CloseBtn, {
43929
+ headerBarEnd: /*#__PURE__*/React__default.createElement(CloseBtn$1, {
44673
43930
  onClick: closeModal
44674
43931
  }),
44675
43932
  actionCancelLabel: t(config.label.cancel),
@@ -44689,12 +43946,12 @@ const ActionModal = _ref => {
44689
43946
  })) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
44690
43947
  };
44691
43948
 
44692
- const Heading$1 = props => {
43949
+ const Heading$2 = props => {
44693
43950
  return /*#__PURE__*/React__default.createElement("h1", {
44694
43951
  className: "heading-m"
44695
43952
  }, props.label);
44696
43953
  };
44697
- const Close$2 = () => /*#__PURE__*/React__default.createElement("svg", {
43954
+ const Close$3 = () => /*#__PURE__*/React__default.createElement("svg", {
44698
43955
  xmlns: "http://www.w3.org/2000/svg",
44699
43956
  viewBox: "0 0 24 24",
44700
43957
  fill: "#FFFFFF"
@@ -44704,11 +43961,11 @@ const Close$2 = () => /*#__PURE__*/React__default.createElement("svg", {
44704
43961
  }), /*#__PURE__*/React__default.createElement("path", {
44705
43962
  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"
44706
43963
  }));
44707
- const CloseBtn$1 = props => {
43964
+ const CloseBtn$2 = props => {
44708
43965
  return /*#__PURE__*/React__default.createElement("div", {
44709
43966
  className: "icon-bg-secondary",
44710
43967
  onClick: props.onClick
44711
- }, /*#__PURE__*/React__default.createElement(Close$2, null));
43968
+ }, /*#__PURE__*/React__default.createElement(Close$3, null));
44712
43969
  };
44713
43970
  const ActionModal$1 = _ref => {
44714
43971
  var _action$assigneeRoles, _action$assigneeRoles2;
@@ -44789,7 +44046,7 @@ const ActionModal$1 = _ref => {
44789
44046
  if (file.size >= 5242880) {
44790
44047
  setError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));
44791
44048
  } else {
44792
- const _temp = _catch$1(function () {
44049
+ const _temp = _catch(function () {
44793
44050
  return Promise.resolve(Digit.UploadServices.Filestorage("PT", file, Digit.ULBService.getStateId())).then(function (response) {
44794
44051
  var _response$data, _response$data$files;
44795
44052
  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) {
@@ -44846,10 +44103,10 @@ const ActionModal$1 = _ref => {
44846
44103
  }
44847
44104
  }, [action, approvers, financialYears, selectedFinancialYear, uploadedFile]);
44848
44105
  return action && config.form ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Modal, {
44849
- headerBarMain: /*#__PURE__*/React__default.createElement(Heading$1, {
44106
+ headerBarMain: /*#__PURE__*/React__default.createElement(Heading$2, {
44850
44107
  label: t(config.label.heading)
44851
44108
  }),
44852
- headerBarEnd: /*#__PURE__*/React__default.createElement(CloseBtn$1, {
44109
+ headerBarEnd: /*#__PURE__*/React__default.createElement(CloseBtn$2, {
44853
44110
  onClick: closeModal
44854
44111
  }),
44855
44112
  actionCancelLabel: t(config.label.cancel),
@@ -44868,7 +44125,7 @@ const ActionModal$1 = _ref => {
44868
44125
  })) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
44869
44126
  };
44870
44127
 
44871
- const Heading$2 = props => {
44128
+ const Heading$3 = props => {
44872
44129
  return /*#__PURE__*/React__default.createElement("h1", {
44873
44130
  style: {
44874
44131
  marginLeft: "22px"
@@ -44876,7 +44133,7 @@ const Heading$2 = props => {
44876
44133
  className: "heading-m BPAheading-m"
44877
44134
  }, props.label);
44878
44135
  };
44879
- const Close$3 = () => /*#__PURE__*/React__default.createElement("svg", {
44136
+ const Close$4 = () => /*#__PURE__*/React__default.createElement("svg", {
44880
44137
  xmlns: "http://www.w3.org/2000/svg",
44881
44138
  viewBox: "0 0 24 24",
44882
44139
  fill: "#FFFFFF"
@@ -44886,11 +44143,11 @@ const Close$3 = () => /*#__PURE__*/React__default.createElement("svg", {
44886
44143
  }), /*#__PURE__*/React__default.createElement("path", {
44887
44144
  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"
44888
44145
  }));
44889
- const CloseBtn$2 = props => {
44146
+ const CloseBtn$3 = props => {
44890
44147
  return /*#__PURE__*/React__default.createElement("div", {
44891
44148
  className: "icon-bg-secondary",
44892
44149
  onClick: props.onClick
44893
- }, /*#__PURE__*/React__default.createElement(Close$3, null));
44150
+ }, /*#__PURE__*/React__default.createElement(Close$4, null));
44894
44151
  };
44895
44152
  const ActionModal$2 = _ref => {
44896
44153
  var _action$assigneeRoles, _action$assigneeRoles2;
@@ -44954,7 +44211,7 @@ const ActionModal$2 = _ref => {
44954
44211
  if (file !== null && file !== void 0 && file.type && !allowedFileTypesRegex.test(file === null || file === void 0 ? void 0 : file.type)) {
44955
44212
  setError(t(`NOT_SUPPORTED_FILE_TYPE`));
44956
44213
  } else {
44957
- const _temp = _catch$1(function () {
44214
+ const _temp = _catch(function () {
44958
44215
  return Promise.resolve(Digit.UploadServices.Filestorage("OBPS", file, Digit.ULBService.getStateId() || (tenantId === null || tenantId === void 0 ? void 0 : tenantId.split(".")[0]))).then(function (response) {
44959
44216
  var _response$data, _response$data$files;
44960
44217
  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) {
@@ -45018,10 +44275,10 @@ const ActionModal$2 = _ref => {
45018
44275
  }
45019
44276
  }, [action, approvers, uploadedFile, error]);
45020
44277
  return action && config.form ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Modal, {
45021
- headerBarMain: /*#__PURE__*/React__default.createElement(Heading$2, {
44278
+ headerBarMain: /*#__PURE__*/React__default.createElement(Heading$3, {
45022
44279
  label: t(config.label.heading)
45023
44280
  }),
45024
- headerBarEnd: /*#__PURE__*/React__default.createElement(CloseBtn$2, {
44281
+ headerBarEnd: /*#__PURE__*/React__default.createElement(CloseBtn$3, {
45025
44282
  onClick: closeModal
45026
44283
  }),
45027
44284
  actionCancelLabel: t(config.label.cancel),
@@ -45062,7 +44319,7 @@ const ActionModal$2 = _ref => {
45062
44319
  })) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
45063
44320
  };
45064
44321
 
45065
- const Heading$3 = props => {
44322
+ const Heading$4 = props => {
45066
44323
  return /*#__PURE__*/React__default.createElement("h1", {
45067
44324
  style: {
45068
44325
  marginLeft: "22px"
@@ -45070,7 +44327,7 @@ const Heading$3 = props => {
45070
44327
  className: "heading-m BPAheading-m"
45071
44328
  }, props.label);
45072
44329
  };
45073
- const Close$4 = () => /*#__PURE__*/React__default.createElement("svg", {
44330
+ const Close$5 = () => /*#__PURE__*/React__default.createElement("svg", {
45074
44331
  xmlns: "http://www.w3.org/2000/svg",
45075
44332
  viewBox: "0 0 24 24",
45076
44333
  fill: "#FFFFFF"
@@ -45080,11 +44337,11 @@ const Close$4 = () => /*#__PURE__*/React__default.createElement("svg", {
45080
44337
  }), /*#__PURE__*/React__default.createElement("path", {
45081
44338
  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"
45082
44339
  }));
45083
- const CloseBtn$3 = props => {
44340
+ const CloseBtn$4 = props => {
45084
44341
  return /*#__PURE__*/React__default.createElement("div", {
45085
44342
  className: "icon-bg-secondary",
45086
44343
  onClick: props.onClick
45087
- }, /*#__PURE__*/React__default.createElement(Close$4, null));
44344
+ }, /*#__PURE__*/React__default.createElement(Close$5, null));
45088
44345
  };
45089
44346
  const ActionModal$3 = _ref => {
45090
44347
  var _applicationData, _applicationData$land, _applicationData$land2, _applicationData2, _applicationData2$lan, _applicationData2$lan2, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5, _workflowDetails$data6;
@@ -45233,7 +44490,7 @@ const ActionModal$3 = _ref => {
45233
44490
  if (file !== null && file !== void 0 && file.type && !allowedFileTypesRegex.test(file === null || file === void 0 ? void 0 : file.type)) {
45234
44491
  setError(t(`NOT_SUPPORTED_FILE_TYPE`));
45235
44492
  } else {
45236
- const _temp = _catch$1(function () {
44493
+ const _temp = _catch(function () {
45237
44494
  return Promise.resolve(Digit.UploadServices.Filestorage("OBPS", file, Digit.ULBService.getStateId() || (tenantId === null || tenantId === void 0 ? void 0 : tenantId.split(".")[0]))).then(function (response) {
45238
44495
  var _response$data, _response$data$files;
45239
44496
  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) {
@@ -45351,10 +44608,10 @@ const ActionModal$3 = _ref => {
45351
44608
  }
45352
44609
  }, [action, approvers, selectedFinancialYear, uploadedFile, error]);
45353
44610
  return action && config.form ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Modal, {
45354
- headerBarMain: /*#__PURE__*/React__default.createElement(Heading$3, {
44611
+ headerBarMain: /*#__PURE__*/React__default.createElement(Heading$4, {
45355
44612
  label: t(config.label.heading)
45356
44613
  }),
45357
- headerBarEnd: /*#__PURE__*/React__default.createElement(CloseBtn$3, {
44614
+ headerBarEnd: /*#__PURE__*/React__default.createElement(CloseBtn$4, {
45358
44615
  onClick: closeModal
45359
44616
  }),
45360
44617
  actionCancelLabel: t(config.label.cancel),
@@ -45397,214 +44654,12 @@ const ActionModal$3 = _ref => {
45397
44654
  })) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
45398
44655
  };
45399
44656
 
45400
- const Heading$4 = props => {
45401
- return /*#__PURE__*/React__default.createElement("h1", {
45402
- style: {
45403
- marginLeft: "22px"
45404
- },
45405
- className: "heading-m BPAheading-m"
45406
- }, props.label);
45407
- };
45408
- const Close$5 = () => /*#__PURE__*/React__default.createElement("svg", {
45409
- xmlns: "http://www.w3.org/2000/svg",
45410
- viewBox: "0 0 24 24",
45411
- fill: "#FFFFFF"
45412
- }, /*#__PURE__*/React__default.createElement("path", {
45413
- d: "M0 0h24v24H0V0z",
45414
- fill: "none"
45415
- }), /*#__PURE__*/React__default.createElement("path", {
45416
- 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"
45417
- }));
45418
- const CloseBtn$4 = props => {
45419
- return /*#__PURE__*/React__default.createElement("div", {
45420
- className: "icon-bg-secondary",
45421
- onClick: props.onClick
45422
- }, /*#__PURE__*/React__default.createElement(Close$5, null));
45423
- };
45424
- const ActionModal$4 = _ref => {
45425
- var _action$assigneeRoles, _action$assigneeRoles2;
45426
- let {
45427
- t,
45428
- action,
45429
- tenantId,
45430
- state,
45431
- id,
45432
- closeModal,
45433
- submitAction,
45434
- actionData,
45435
- applicationData,
45436
- businessService,
45437
- moduleCode
45438
- } = _ref;
45439
- const {
45440
- data: approverData,
45441
- isLoading: PTALoading
45442
- } = Digit.Hooks.useEmployeeSearch(tenantId, {
45443
- 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 => ({
45444
- code: e
45445
- })),
45446
- isActive: true
45447
- }, {
45448
- enabled: !(action !== null && action !== void 0 && action.isTerminateState)
45449
- });
45450
- const queryClient = reactQuery.useQueryClient();
45451
- const [config, setConfig] = React.useState({});
45452
- const [defaultValues, setDefaultValues] = React.useState({});
45453
- const [approvers, setApprovers] = React.useState([]);
45454
- const [selectedApprover, setSelectedApprover] = React.useState({});
45455
- const [file, setFile] = React.useState(null);
45456
- const [uploadedFile, setUploadedFile] = React.useState(null);
45457
- const [error, setError] = React.useState(null);
45458
- const mobileView = Digit.Utils.browser.isMobile() ? true : false;
45459
- const history = reactRouterDom.useHistory();
45460
- React.useEffect(() => {
45461
- var _approverData$Employe;
45462
- setApprovers(approverData === null || approverData === void 0 ? void 0 : (_approverData$Employe = approverData.Employees) === null || _approverData$Employe === void 0 ? void 0 : _approverData$Employe.map(employee => {
45463
- var _employee$user;
45464
- return {
45465
- uuid: employee === null || employee === void 0 ? void 0 : employee.uuid,
45466
- name: employee === null || employee === void 0 ? void 0 : (_employee$user = employee.user) === null || _employee$user === void 0 ? void 0 : _employee$user.name
45467
- };
45468
- }));
45469
- }, [approverData]);
45470
- function selectFile(e) {
45471
- setFile(e.target.files[0]);
45472
- }
45473
- React.useEffect(() => {
45474
- (function () {
45475
- try {
45476
- setError(null);
45477
- const _temp4 = function () {
45478
- if (file) {
45479
- const allowedFileTypesRegex = /(.*?)(jpg|jpeg|png|image|pdf)$/i;
45480
- const _temp3 = function () {
45481
- if (file.size >= 5242880) {
45482
- setError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));
45483
- } else {
45484
- const _temp2 = function () {
45485
- if (file !== null && file !== void 0 && file.type && !allowedFileTypesRegex.test(file === null || file === void 0 ? void 0 : file.type)) {
45486
- setError(t(`NOT_SUPPORTED_FILE_TYPE`));
45487
- } else {
45488
- const _temp = _catch$1(function () {
45489
- return Promise.resolve(Digit.UploadServices.Filestorage("NOC", file, Digit.ULBService.getStateId() || (tenantId === null || tenantId === void 0 ? void 0 : tenantId.split(".")[0]))).then(function (response) {
45490
- var _response$data, _response$data$files;
45491
- 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) {
45492
- var _response$data2, _response$data2$files;
45493
- 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);
45494
- } else {
45495
- setError(t("CS_FILE_UPLOAD_ERROR"));
45496
- }
45497
- });
45498
- }, function () {
45499
- setError(t("CS_FILE_UPLOAD_ERROR"));
45500
- });
45501
- if (_temp && _temp.then) return _temp.then(function () {});
45502
- }
45503
- }();
45504
- if (_temp2 && _temp2.then) return _temp2.then(function () {});
45505
- }
45506
- }();
45507
- if (_temp3 && _temp3.then) return _temp3.then(function () {});
45508
- }
45509
- }();
45510
- return _temp4 && _temp4.then ? _temp4.then(function () {}) : void 0;
45511
- } catch (e) {
45512
- Promise.reject(e);
45513
- }
45514
- })();
45515
- }, [file]);
45516
- function submit(data) {
45517
- var _applicationData, _applicationData$docu, _applicationData2;
45518
- let enteredDocs = JSON.parse(sessionStorage.getItem("NewNOCDocs"));
45519
- let newDocs = ((_applicationData = applicationData) === null || _applicationData === void 0 ? void 0 : (_applicationData$docu = _applicationData.documents) === null || _applicationData$docu === void 0 ? void 0 : _applicationData$docu.length) > 0 ? [...((_applicationData2 = applicationData) === null || _applicationData2 === void 0 ? void 0 : _applicationData2.documents)] : [];
45520
- enteredDocs.map((d, index) => {
45521
- newDocs.push(d);
45522
- });
45523
- applicationData = {
45524
- ...applicationData,
45525
- workflow: {
45526
- action: action === null || action === void 0 ? void 0 : action.action,
45527
- comment: data !== null && data !== void 0 && data.comments ? data === null || data === void 0 ? void 0 : data.comments : null,
45528
- assignee: !(selectedApprover !== null && selectedApprover !== void 0 && selectedApprover.uuid) ? null : [selectedApprover === null || selectedApprover === void 0 ? void 0 : selectedApprover.uuid],
45529
- documents: uploadedFile ? [{
45530
- documentType: (action === null || action === void 0 ? void 0 : action.action) + " DOC",
45531
- fileName: file === null || file === void 0 ? void 0 : file.name,
45532
- fileStoreId: uploadedFile
45533
- }] : null
45534
- },
45535
- documents: newDocs
45536
- };
45537
- submitAction({
45538
- Noc: applicationData
45539
- }, false, {
45540
- isNoc: true
45541
- });
45542
- }
45543
- React.useEffect(() => {
45544
- if (action) {
45545
- setConfig(configNOCApproverApplication({
45546
- t,
45547
- action,
45548
- approvers,
45549
- selectedApprover,
45550
- setSelectedApprover,
45551
- selectFile,
45552
- uploadedFile,
45553
- setUploadedFile,
45554
- businessService,
45555
- assigneeLabel: "WF_ASSIGNEE_NAME_LABEL",
45556
- error
45557
- }));
45558
- }
45559
- }, [action, approvers, uploadedFile, error]);
45560
- return action && config.form ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Modal, {
45561
- headerBarMain: /*#__PURE__*/React__default.createElement(Heading$4, {
45562
- label: t(config.label.heading)
45563
- }),
45564
- headerBarEnd: /*#__PURE__*/React__default.createElement(CloseBtn$4, {
45565
- onClick: closeModal
45566
- }),
45567
- actionCancelLabel: t(config.label.cancel),
45568
- actionCancelOnSubmit: closeModal,
45569
- actionSaveLabel: t(config.label.submit),
45570
- actionSaveOnSubmit: () => {},
45571
- formId: "modal-action",
45572
- isOBPSFlow: true,
45573
- popupStyles: mobileView ? {
45574
- width: "720px"
45575
- } : {},
45576
- style: !mobileView ? {
45577
- height: "45px",
45578
- width: "107px",
45579
- paddingLeft: "0px",
45580
- paddingRight: "0px"
45581
- } : {
45582
- height: "45px",
45583
- width: "44%"
45584
- },
45585
- popupModuleMianStyles: mobileView ? {
45586
- paddingLeft: "5px"
45587
- } : {}
45588
- }, PTALoading ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.FormComposer, {
45589
- config: config.form,
45590
- cardStyle: {
45591
- marginLeft: "0px",
45592
- marginRight: "0px",
45593
- marginTop: "-25px"
45594
- },
45595
- className: "BPAemployeeCard",
45596
- noBoxShadow: true,
45597
- inline: true,
45598
- childrenAtTheBottom: true,
45599
- onSubmit: submit,
45600
- defaultValues: defaultValues,
45601
- formId: "modal-action"
45602
- })) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
45603
- };
45604
-
45605
44657
  const Heading$5 = props => {
45606
44658
  return /*#__PURE__*/React__default.createElement("h1", {
45607
- className: "heading-m"
44659
+ style: {
44660
+ marginLeft: "22px"
44661
+ },
44662
+ className: "heading-m BPAheading-m"
45608
44663
  }, props.label);
45609
44664
  };
45610
44665
  const Close$6 = () => /*#__PURE__*/React__default.createElement("svg", {
@@ -45623,6 +44678,208 @@ const CloseBtn$5 = props => {
45623
44678
  onClick: props.onClick
45624
44679
  }, /*#__PURE__*/React__default.createElement(Close$6, null));
45625
44680
  };
44681
+ const ActionModal$4 = _ref => {
44682
+ var _action$assigneeRoles, _action$assigneeRoles2;
44683
+ let {
44684
+ t,
44685
+ action,
44686
+ tenantId,
44687
+ state,
44688
+ id,
44689
+ closeModal,
44690
+ submitAction,
44691
+ actionData,
44692
+ applicationData,
44693
+ businessService,
44694
+ moduleCode
44695
+ } = _ref;
44696
+ const {
44697
+ data: approverData,
44698
+ isLoading: PTALoading
44699
+ } = Digit.Hooks.useEmployeeSearch(tenantId, {
44700
+ 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 => ({
44701
+ code: e
44702
+ })),
44703
+ isActive: true
44704
+ }, {
44705
+ enabled: !(action !== null && action !== void 0 && action.isTerminateState)
44706
+ });
44707
+ const queryClient = reactQuery.useQueryClient();
44708
+ const [config, setConfig] = React.useState({});
44709
+ const [defaultValues, setDefaultValues] = React.useState({});
44710
+ const [approvers, setApprovers] = React.useState([]);
44711
+ const [selectedApprover, setSelectedApprover] = React.useState({});
44712
+ const [file, setFile] = React.useState(null);
44713
+ const [uploadedFile, setUploadedFile] = React.useState(null);
44714
+ const [error, setError] = React.useState(null);
44715
+ const mobileView = Digit.Utils.browser.isMobile() ? true : false;
44716
+ const history = reactRouterDom.useHistory();
44717
+ React.useEffect(() => {
44718
+ var _approverData$Employe;
44719
+ setApprovers(approverData === null || approverData === void 0 ? void 0 : (_approverData$Employe = approverData.Employees) === null || _approverData$Employe === void 0 ? void 0 : _approverData$Employe.map(employee => {
44720
+ var _employee$user;
44721
+ return {
44722
+ uuid: employee === null || employee === void 0 ? void 0 : employee.uuid,
44723
+ name: employee === null || employee === void 0 ? void 0 : (_employee$user = employee.user) === null || _employee$user === void 0 ? void 0 : _employee$user.name
44724
+ };
44725
+ }));
44726
+ }, [approverData]);
44727
+ function selectFile(e) {
44728
+ setFile(e.target.files[0]);
44729
+ }
44730
+ React.useEffect(() => {
44731
+ (function () {
44732
+ try {
44733
+ setError(null);
44734
+ const _temp4 = function () {
44735
+ if (file) {
44736
+ const allowedFileTypesRegex = /(.*?)(jpg|jpeg|png|image|pdf)$/i;
44737
+ const _temp3 = function () {
44738
+ if (file.size >= 5242880) {
44739
+ setError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));
44740
+ } else {
44741
+ const _temp2 = function () {
44742
+ if (file !== null && file !== void 0 && file.type && !allowedFileTypesRegex.test(file === null || file === void 0 ? void 0 : file.type)) {
44743
+ setError(t(`NOT_SUPPORTED_FILE_TYPE`));
44744
+ } else {
44745
+ const _temp = _catch(function () {
44746
+ return Promise.resolve(Digit.UploadServices.Filestorage("NOC", file, Digit.ULBService.getStateId() || (tenantId === null || tenantId === void 0 ? void 0 : tenantId.split(".")[0]))).then(function (response) {
44747
+ var _response$data, _response$data$files;
44748
+ 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) {
44749
+ var _response$data2, _response$data2$files;
44750
+ 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);
44751
+ } else {
44752
+ setError(t("CS_FILE_UPLOAD_ERROR"));
44753
+ }
44754
+ });
44755
+ }, function () {
44756
+ setError(t("CS_FILE_UPLOAD_ERROR"));
44757
+ });
44758
+ if (_temp && _temp.then) return _temp.then(function () {});
44759
+ }
44760
+ }();
44761
+ if (_temp2 && _temp2.then) return _temp2.then(function () {});
44762
+ }
44763
+ }();
44764
+ if (_temp3 && _temp3.then) return _temp3.then(function () {});
44765
+ }
44766
+ }();
44767
+ return _temp4 && _temp4.then ? _temp4.then(function () {}) : void 0;
44768
+ } catch (e) {
44769
+ Promise.reject(e);
44770
+ }
44771
+ })();
44772
+ }, [file]);
44773
+ function submit(data) {
44774
+ var _applicationData, _applicationData$docu, _applicationData2;
44775
+ let enteredDocs = JSON.parse(sessionStorage.getItem("NewNOCDocs"));
44776
+ let newDocs = ((_applicationData = applicationData) === null || _applicationData === void 0 ? void 0 : (_applicationData$docu = _applicationData.documents) === null || _applicationData$docu === void 0 ? void 0 : _applicationData$docu.length) > 0 ? [...((_applicationData2 = applicationData) === null || _applicationData2 === void 0 ? void 0 : _applicationData2.documents)] : [];
44777
+ enteredDocs.map((d, index) => {
44778
+ newDocs.push(d);
44779
+ });
44780
+ applicationData = {
44781
+ ...applicationData,
44782
+ workflow: {
44783
+ action: action === null || action === void 0 ? void 0 : action.action,
44784
+ comment: data !== null && data !== void 0 && data.comments ? data === null || data === void 0 ? void 0 : data.comments : null,
44785
+ assignee: !(selectedApprover !== null && selectedApprover !== void 0 && selectedApprover.uuid) ? null : [selectedApprover === null || selectedApprover === void 0 ? void 0 : selectedApprover.uuid],
44786
+ documents: uploadedFile ? [{
44787
+ documentType: (action === null || action === void 0 ? void 0 : action.action) + " DOC",
44788
+ fileName: file === null || file === void 0 ? void 0 : file.name,
44789
+ fileStoreId: uploadedFile
44790
+ }] : null
44791
+ },
44792
+ documents: newDocs
44793
+ };
44794
+ submitAction({
44795
+ Noc: applicationData
44796
+ }, false, {
44797
+ isNoc: true
44798
+ });
44799
+ }
44800
+ React.useEffect(() => {
44801
+ if (action) {
44802
+ setConfig(configNOCApproverApplication({
44803
+ t,
44804
+ action,
44805
+ approvers,
44806
+ selectedApprover,
44807
+ setSelectedApprover,
44808
+ selectFile,
44809
+ uploadedFile,
44810
+ setUploadedFile,
44811
+ businessService,
44812
+ assigneeLabel: "WF_ASSIGNEE_NAME_LABEL",
44813
+ error
44814
+ }));
44815
+ }
44816
+ }, [action, approvers, uploadedFile, error]);
44817
+ return action && config.form ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Modal, {
44818
+ headerBarMain: /*#__PURE__*/React__default.createElement(Heading$5, {
44819
+ label: t(config.label.heading)
44820
+ }),
44821
+ headerBarEnd: /*#__PURE__*/React__default.createElement(CloseBtn$5, {
44822
+ onClick: closeModal
44823
+ }),
44824
+ actionCancelLabel: t(config.label.cancel),
44825
+ actionCancelOnSubmit: closeModal,
44826
+ actionSaveLabel: t(config.label.submit),
44827
+ actionSaveOnSubmit: () => {},
44828
+ formId: "modal-action",
44829
+ isOBPSFlow: true,
44830
+ popupStyles: mobileView ? {
44831
+ width: "720px"
44832
+ } : {},
44833
+ style: !mobileView ? {
44834
+ height: "45px",
44835
+ width: "107px",
44836
+ paddingLeft: "0px",
44837
+ paddingRight: "0px"
44838
+ } : {
44839
+ height: "45px",
44840
+ width: "44%"
44841
+ },
44842
+ popupModuleMianStyles: mobileView ? {
44843
+ paddingLeft: "5px"
44844
+ } : {}
44845
+ }, PTALoading ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.FormComposer, {
44846
+ config: config.form,
44847
+ cardStyle: {
44848
+ marginLeft: "0px",
44849
+ marginRight: "0px",
44850
+ marginTop: "-25px"
44851
+ },
44852
+ className: "BPAemployeeCard",
44853
+ noBoxShadow: true,
44854
+ inline: true,
44855
+ childrenAtTheBottom: true,
44856
+ onSubmit: submit,
44857
+ defaultValues: defaultValues,
44858
+ formId: "modal-action"
44859
+ })) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
44860
+ };
44861
+
44862
+ const Heading$6 = props => {
44863
+ return /*#__PURE__*/React__default.createElement("h1", {
44864
+ className: "heading-m"
44865
+ }, props.label);
44866
+ };
44867
+ const Close$7 = () => /*#__PURE__*/React__default.createElement("svg", {
44868
+ xmlns: "http://www.w3.org/2000/svg",
44869
+ viewBox: "0 0 24 24",
44870
+ fill: "#FFFFFF"
44871
+ }, /*#__PURE__*/React__default.createElement("path", {
44872
+ d: "M0 0h24v24H0V0z",
44873
+ fill: "none"
44874
+ }), /*#__PURE__*/React__default.createElement("path", {
44875
+ 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"
44876
+ }));
44877
+ const CloseBtn$6 = props => {
44878
+ return /*#__PURE__*/React__default.createElement("div", {
44879
+ className: "icon-bg-secondary",
44880
+ onClick: props.onClick
44881
+ }, /*#__PURE__*/React__default.createElement(Close$7, null));
44882
+ };
45626
44883
  const convertDateToEpochNew$1 = function (dateString, dayStartOrEnd) {
45627
44884
  if (dayStartOrEnd === void 0) {
45628
44885
  dayStartOrEnd = "dayend";
@@ -45713,7 +44970,7 @@ const ActionModal$5 = _ref => {
45713
44970
  if (file !== null && file !== void 0 && file.type && !allowedFileTypesRegex.test(file === null || file === void 0 ? void 0 : file.type)) {
45714
44971
  setError(t(`NOT_SUPPORTED_FILE_TYPE`));
45715
44972
  } else {
45716
- const _temp = _catch$1(function () {
44973
+ const _temp = _catch(function () {
45717
44974
  return Promise.resolve(Digit.UploadServices.Filestorage("WS", file, Digit.ULBService.getCurrentTenantId())).then(function (response) {
45718
44975
  var _response$data, _response$data$files;
45719
44976
  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) {
@@ -45934,10 +45191,10 @@ const ActionModal$5 = _ref => {
45934
45191
  }
45935
45192
  }, [action, approvers, uploadedFile, error, isReasonRequiredAction, selectedReason, otherReasonText, showApprovalChecklist, approvalChecklist, applicationData]);
45936
45193
  return action && config.form ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Modal, {
45937
- headerBarMain: /*#__PURE__*/React__default.createElement(Heading$5, {
45194
+ headerBarMain: /*#__PURE__*/React__default.createElement(Heading$6, {
45938
45195
  label: t(config.label.heading)
45939
45196
  }),
45940
- headerBarEnd: /*#__PURE__*/React__default.createElement(CloseBtn$5, {
45197
+ headerBarEnd: /*#__PURE__*/React__default.createElement(CloseBtn$6, {
45941
45198
  onClick: closeModal
45942
45199
  }),
45943
45200
  actionCancelLabel: t(config.label.cancel),
@@ -45970,12 +45227,12 @@ const ActionModal$5 = _ref => {
45970
45227
  }))) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
45971
45228
  };
45972
45229
 
45973
- const Heading$6 = props => {
45230
+ const Heading$7 = props => {
45974
45231
  return /*#__PURE__*/React__default.createElement("h1", {
45975
45232
  className: "heading-m"
45976
45233
  }, props.label);
45977
45234
  };
45978
- const Close$7 = () => /*#__PURE__*/React__default.createElement("svg", {
45235
+ const Close$8 = () => /*#__PURE__*/React__default.createElement("svg", {
45979
45236
  xmlns: "http://www.w3.org/2000/svg",
45980
45237
  viewBox: "0 0 24 24",
45981
45238
  fill: "#FFFFFF"
@@ -45985,11 +45242,11 @@ const Close$7 = () => /*#__PURE__*/React__default.createElement("svg", {
45985
45242
  }), /*#__PURE__*/React__default.createElement("path", {
45986
45243
  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"
45987
45244
  }));
45988
- const CloseBtn$6 = props => {
45245
+ const CloseBtn$7 = props => {
45989
45246
  return /*#__PURE__*/React__default.createElement("div", {
45990
45247
  className: "icon-bg-secondary",
45991
45248
  onClick: props.onClick
45992
- }, /*#__PURE__*/React__default.createElement(Close$7, null));
45249
+ }, /*#__PURE__*/React__default.createElement(Close$8, null));
45993
45250
  };
45994
45251
  const ActionModal$6 = _ref => {
45995
45252
  var _action$assigneeRoles, _action$assigneeRoles2;
@@ -46049,7 +45306,7 @@ const ActionModal$6 = _ref => {
46049
45306
  if (file.size >= 5242880) {
46050
45307
  setError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));
46051
45308
  } else {
46052
- const _temp = _catch$1(function () {
45309
+ const _temp = _catch(function () {
46053
45310
  return Promise.resolve(Digit.UploadServices.Filestorage("PTR", file, Digit.ULBService.getStateId())).then(function (response) {
46054
45311
  var _response$data, _response$data$files;
46055
45312
  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) {
@@ -46109,10 +45366,10 @@ const ActionModal$6 = _ref => {
46109
45366
  }
46110
45367
  }, [action, approvers, uploadedFile]);
46111
45368
  return action && config.form ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Modal, {
46112
- headerBarMain: /*#__PURE__*/React__default.createElement(Heading$6, {
45369
+ headerBarMain: /*#__PURE__*/React__default.createElement(Heading$7, {
46113
45370
  label: t(config.label.heading)
46114
45371
  }),
46115
- headerBarEnd: /*#__PURE__*/React__default.createElement(CloseBtn$6, {
45372
+ headerBarEnd: /*#__PURE__*/React__default.createElement(CloseBtn$7, {
46116
45373
  onClick: closeModal
46117
45374
  }),
46118
45375
  actionCancelLabel: t(config.label.cancel),
@@ -46131,12 +45388,12 @@ const ActionModal$6 = _ref => {
46131
45388
  })) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
46132
45389
  };
46133
45390
 
46134
- const Heading$7 = props => {
45391
+ const Heading$8 = props => {
46135
45392
  return /*#__PURE__*/React__default.createElement("h1", {
46136
45393
  className: "heading-m"
46137
45394
  }, props.label);
46138
45395
  };
46139
- const Close$8 = () => /*#__PURE__*/React__default.createElement("svg", {
45396
+ const Close$9 = () => /*#__PURE__*/React__default.createElement("svg", {
46140
45397
  xmlns: "http://www.w3.org/2000/svg",
46141
45398
  viewBox: "0 0 24 24",
46142
45399
  fill: "#FFFFFF"
@@ -46146,11 +45403,11 @@ const Close$8 = () => /*#__PURE__*/React__default.createElement("svg", {
46146
45403
  }), /*#__PURE__*/React__default.createElement("path", {
46147
45404
  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"
46148
45405
  }));
46149
- const CloseBtn$7 = props => {
45406
+ const CloseBtn$8 = props => {
46150
45407
  return /*#__PURE__*/React__default.createElement("div", {
46151
45408
  className: "icon-bg-secondary",
46152
45409
  onClick: props.onClick
46153
- }, /*#__PURE__*/React__default.createElement(Close$8, null));
45410
+ }, /*#__PURE__*/React__default.createElement(Close$9, null));
46154
45411
  };
46155
45412
  const ActionModal$7 = _ref => {
46156
45413
  var _action$roles, _action$roles$, _action$roles$$map;
@@ -46230,10 +45487,10 @@ const ActionModal$7 = _ref => {
46230
45487
  }
46231
45488
  }, [action, approvers, uploadedFile]);
46232
45489
  return action && config.form ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Modal, {
46233
- headerBarMain: /*#__PURE__*/React__default.createElement(Heading$7, {
45490
+ headerBarMain: /*#__PURE__*/React__default.createElement(Heading$8, {
46234
45491
  label: t(config.label.heading)
46235
45492
  }),
46236
- headerBarEnd: /*#__PURE__*/React__default.createElement(CloseBtn$7, {
45493
+ headerBarEnd: /*#__PURE__*/React__default.createElement(CloseBtn$8, {
46237
45494
  onClick: closeModal
46238
45495
  }),
46239
45496
  actionCancelLabel: t(config.label.cancel),
@@ -46256,12 +45513,12 @@ const ActionModal$7 = _ref => {
46256
45513
  })) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
46257
45514
  };
46258
45515
 
46259
- const Heading$8 = props => {
45516
+ const Heading$9 = props => {
46260
45517
  return /*#__PURE__*/React__default.createElement("h1", {
46261
45518
  className: "heading-m"
46262
45519
  }, props.label);
46263
45520
  };
46264
- const Close$9 = () => /*#__PURE__*/React__default.createElement("svg", {
45521
+ const Close$a = () => /*#__PURE__*/React__default.createElement("svg", {
46265
45522
  xmlns: "http://www.w3.org/2000/svg",
46266
45523
  viewBox: "0 0 24 24",
46267
45524
  fill: "#FFFFFF"
@@ -46271,11 +45528,11 @@ const Close$9 = () => /*#__PURE__*/React__default.createElement("svg", {
46271
45528
  }), /*#__PURE__*/React__default.createElement("path", {
46272
45529
  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"
46273
45530
  }));
46274
- const CloseBtn$8 = props => {
45531
+ const CloseBtn$9 = props => {
46275
45532
  return /*#__PURE__*/React__default.createElement("div", {
46276
45533
  className: "icon-bg-secondary",
46277
45534
  onClick: props.onClick
46278
- }, /*#__PURE__*/React__default.createElement(Close$9, null));
45535
+ }, /*#__PURE__*/React__default.createElement(Close$a, null));
46279
45536
  };
46280
45537
  const ActionModal$8 = _ref => {
46281
45538
  var _action$assigneeRoles, _action$assigneeRoles2;
@@ -46334,7 +45591,7 @@ const ActionModal$8 = _ref => {
46334
45591
  if (file.size >= 5242880) {
46335
45592
  setError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));
46336
45593
  } else {
46337
- const _temp = _catch$1(function () {
45594
+ const _temp = _catch(function () {
46338
45595
  return Promise.resolve(Digit.UploadServices.Filestorage("CHB", file, tenantId)).then(function (response) {
46339
45596
  var _response$data, _response$data$files;
46340
45597
  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) {
@@ -46394,10 +45651,10 @@ const ActionModal$8 = _ref => {
46394
45651
  }
46395
45652
  }, [action, approvers, uploadedFile]);
46396
45653
  return action && config.form ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Modal, {
46397
- headerBarMain: /*#__PURE__*/React__default.createElement(Heading$8, {
45654
+ headerBarMain: /*#__PURE__*/React__default.createElement(Heading$9, {
46398
45655
  label: t(config.label.heading)
46399
45656
  }),
46400
- headerBarEnd: /*#__PURE__*/React__default.createElement(CloseBtn$8, {
45657
+ headerBarEnd: /*#__PURE__*/React__default.createElement(CloseBtn$9, {
46401
45658
  onClick: closeModal
46402
45659
  }),
46403
45660
  actionCancelLabel: t(config.label.cancel),
@@ -46416,12 +45673,12 @@ const ActionModal$8 = _ref => {
46416
45673
  })) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
46417
45674
  };
46418
45675
 
46419
- const Heading$9 = props => {
45676
+ const Heading$a = props => {
46420
45677
  return /*#__PURE__*/React__default.createElement("h1", {
46421
45678
  className: "heading-m"
46422
45679
  }, props.label);
46423
45680
  };
46424
- const Close$a = () => /*#__PURE__*/React__default.createElement("svg", {
45681
+ const Close$b = () => /*#__PURE__*/React__default.createElement("svg", {
46425
45682
  xmlns: "http://www.w3.org/2000/svg",
46426
45683
  viewBox: "0 0 24 24",
46427
45684
  fill: "#FFFFFF"
@@ -46431,11 +45688,11 @@ const Close$a = () => /*#__PURE__*/React__default.createElement("svg", {
46431
45688
  }), /*#__PURE__*/React__default.createElement("path", {
46432
45689
  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"
46433
45690
  }));
46434
- const CloseBtn$9 = props => {
45691
+ const CloseBtn$a = props => {
46435
45692
  return /*#__PURE__*/React__default.createElement("div", {
46436
45693
  className: "icon-bg-secondary",
46437
45694
  onClick: props.onClick
46438
- }, /*#__PURE__*/React__default.createElement(Close$a, null));
45695
+ }, /*#__PURE__*/React__default.createElement(Close$b, null));
46439
45696
  };
46440
45697
  const ActionModal$9 = _ref => {
46441
45698
  var _action$assigneeRoles, _action$assigneeRoles2;
@@ -46496,7 +45753,7 @@ const ActionModal$9 = _ref => {
46496
45753
  if (file.size >= 5242880) {
46497
45754
  setError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));
46498
45755
  } else {
46499
- const _temp = _catch$1(function () {
45756
+ const _temp = _catch(function () {
46500
45757
  return Promise.resolve(Digit.UploadServices.Filestorage("PTR", file, Digit.ULBService.getStateId())).then(function (response) {
46501
45758
  var _response$data, _response$data$files;
46502
45759
  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) {
@@ -46561,10 +45818,10 @@ const ActionModal$9 = _ref => {
46561
45818
  }, [action, approvers, uploadedFile]);
46562
45819
  console.log("conggg", config);
46563
45820
  return action && config.form ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Modal, {
46564
- headerBarMain: /*#__PURE__*/React__default.createElement(Heading$9, {
45821
+ headerBarMain: /*#__PURE__*/React__default.createElement(Heading$a, {
46565
45822
  label: t(config.label.heading)
46566
45823
  }),
46567
- headerBarEnd: /*#__PURE__*/React__default.createElement(CloseBtn$9, {
45824
+ headerBarEnd: /*#__PURE__*/React__default.createElement(CloseBtn$a, {
46568
45825
  onClick: closeModal
46569
45826
  }),
46570
45827
  actionCancelLabel: t(config.label.cancel),
@@ -46583,12 +45840,12 @@ const ActionModal$9 = _ref => {
46583
45840
  })) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
46584
45841
  };
46585
45842
 
46586
- const Heading$a = props => {
45843
+ const Heading$b = props => {
46587
45844
  return /*#__PURE__*/React__default.createElement("h1", {
46588
45845
  className: "heading-m"
46589
45846
  }, props.label);
46590
45847
  };
46591
- const Close$b = () => /*#__PURE__*/React__default.createElement("svg", {
45848
+ const Close$c = () => /*#__PURE__*/React__default.createElement("svg", {
46592
45849
  xmlns: "http://www.w3.org/2000/svg",
46593
45850
  viewBox: "0 0 24 24",
46594
45851
  fill: "#FFFFFF"
@@ -46598,11 +45855,11 @@ const Close$b = () => /*#__PURE__*/React__default.createElement("svg", {
46598
45855
  }), /*#__PURE__*/React__default.createElement("path", {
46599
45856
  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"
46600
45857
  }));
46601
- const CloseBtn$a = props => {
45858
+ const CloseBtn$b = props => {
46602
45859
  return /*#__PURE__*/React__default.createElement("div", {
46603
45860
  className: "icon-bg-secondary",
46604
45861
  onClick: props.onClick
46605
- }, /*#__PURE__*/React__default.createElement(Close$b, null));
45862
+ }, /*#__PURE__*/React__default.createElement(Close$c, null));
46606
45863
  };
46607
45864
  const ActionModal$a = _ref => {
46608
45865
  var _action$assigneeRoles, _action$assigneeRoles2;
@@ -46662,8 +45919,8 @@ const ActionModal$a = _ref => {
46662
45919
  if (file.size >= 5242880) {
46663
45920
  setError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));
46664
45921
  } else {
46665
- const _temp = _finallyRethrows$1(function () {
46666
- return _catch$1(function () {
45922
+ const _temp = _finallyRethrows(function () {
45923
+ return _catch(function () {
46667
45924
  return Promise.resolve(Digit.UploadServices.Filestorage("StreetVending", file, tenantId)).then(function (response) {
46668
45925
  var _response$data, _response$data$files;
46669
45926
  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) {
@@ -46730,10 +45987,10 @@ const ActionModal$a = _ref => {
46730
45987
  }));
46731
45988
  }, [action, approvers, uploadedFile]);
46732
45989
  return action && config.form ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Modal, {
46733
- headerBarMain: /*#__PURE__*/React__default.createElement(Heading$a, {
45990
+ headerBarMain: /*#__PURE__*/React__default.createElement(Heading$b, {
46734
45991
  label: t(config.label.heading)
46735
45992
  }),
46736
- headerBarEnd: /*#__PURE__*/React__default.createElement(CloseBtn$a, {
45993
+ headerBarEnd: /*#__PURE__*/React__default.createElement(CloseBtn$b, {
46737
45994
  onClick: closeModal
46738
45995
  }),
46739
45996
  actionCancelLabel: t(config.label.cancel),
@@ -46817,12 +46074,12 @@ const configWTApproverApplication = _ref => {
46817
46074
  };
46818
46075
  };
46819
46076
 
46820
- const Heading$b = props => {
46077
+ const Heading$c = props => {
46821
46078
  return /*#__PURE__*/React__default.createElement("h1", {
46822
46079
  className: "heading-m"
46823
46080
  }, props.label);
46824
46081
  };
46825
- const Close$c = () => /*#__PURE__*/React__default.createElement("svg", {
46082
+ const Close$d = () => /*#__PURE__*/React__default.createElement("svg", {
46826
46083
  xmlns: "http://www.w3.org/2000/svg",
46827
46084
  viewBox: "0 0 24 24",
46828
46085
  fill: "#FFFFFF"
@@ -46832,11 +46089,11 @@ const Close$c = () => /*#__PURE__*/React__default.createElement("svg", {
46832
46089
  }), /*#__PURE__*/React__default.createElement("path", {
46833
46090
  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"
46834
46091
  }));
46835
- const CloseBtn$b = props => {
46092
+ const CloseBtn$c = props => {
46836
46093
  return /*#__PURE__*/React__default.createElement("div", {
46837
46094
  className: "icon-bg-secondary",
46838
46095
  onClick: props.onClick
46839
- }, /*#__PURE__*/React__default.createElement(Close$c, null));
46096
+ }, /*#__PURE__*/React__default.createElement(Close$d, null));
46840
46097
  };
46841
46098
  const ActionModal$b = _ref => {
46842
46099
  var _action$assigneeRoles, _action$assigneeRoles2, _dsoData$vendor, _vehicleData$vehicle, _vehicleData$vehicle$;
@@ -46952,7 +46209,7 @@ const ActionModal$b = _ref => {
46952
46209
  if (file.size >= 5242880) {
46953
46210
  setError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));
46954
46211
  } else {
46955
- const _temp = _catch$1(function () {
46212
+ const _temp = _catch(function () {
46956
46213
  return Promise.resolve(Digit.UploadServices.Filestorage("WT", file, tenantId)).then(function (response) {
46957
46214
  var _response$data, _response$data$files;
46958
46215
  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) {
@@ -47034,10 +46291,10 @@ const ActionModal$b = _ref => {
47034
46291
  }
47035
46292
  }, [action, approvers, uploadedFile, dsoData, selectVehicle, vehicleData]);
47036
46293
  return action && config.form ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Modal, {
47037
- headerBarMain: /*#__PURE__*/React__default.createElement(Heading$b, {
46294
+ headerBarMain: /*#__PURE__*/React__default.createElement(Heading$c, {
47038
46295
  label: t(config.label.heading)
47039
46296
  }),
47040
- headerBarEnd: /*#__PURE__*/React__default.createElement(CloseBtn$b, {
46297
+ headerBarEnd: /*#__PURE__*/React__default.createElement(CloseBtn$c, {
47041
46298
  onClick: closeModal
47042
46299
  }),
47043
46300
  actionCancelLabel: t(config.label.cancel),
@@ -47636,7 +46893,7 @@ function SelectDocument$4(_ref) {
47636
46893
  if (file !== null && file !== void 0 && file.type && !allowedFileTypesRegex.test(file === null || file === void 0 ? void 0 : file.type)) {
47637
46894
  setError(t(`NOT_SUPPORTED_FILE_TYPE`));
47638
46895
  } else {
47639
- const _temp = _catch$1(function () {
46896
+ const _temp = _catch(function () {
47640
46897
  setUploadedFile(null);
47641
46898
  return Promise.resolve(Digit.UploadServices.Filestorage("PT", file, Digit.ULBService.getStateId())).then(function (response) {
47642
46899
  var _response$data, _response$data$files;
@@ -48017,7 +47274,7 @@ function PropertyDocuments(_ref) {
48017
47274
  };
48018
47275
  const forceDownload = function (url, fileName) {
48019
47276
  try {
48020
- return Promise.resolve(_catch$1(function () {
47277
+ return Promise.resolve(_catch(function () {
48021
47278
  return Promise.resolve(fetch(url)).then(function (response) {
48022
47279
  if (!response.ok) {
48023
47280
  throw new Error(`HTTP error! status: ${response.status}`);
@@ -49328,7 +48585,7 @@ const ArrearSummary = _ref => {
49328
48585
  }, t("CS_HIDE_CARD"))));
49329
48586
  };
49330
48587
 
49331
- const Close$d = () => /*#__PURE__*/React__default.createElement("svg", {
48588
+ const Close$e = () => /*#__PURE__*/React__default.createElement("svg", {
49332
48589
  xmlns: "http://www.w3.org/2000/svg",
49333
48590
  viewBox: "0 0 24 24",
49334
48591
  fill: "#FFFFFF"
@@ -49338,11 +48595,11 @@ const Close$d = () => /*#__PURE__*/React__default.createElement("svg", {
49338
48595
  }), /*#__PURE__*/React__default.createElement("path", {
49339
48596
  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"
49340
48597
  }));
49341
- const CloseBtn$c = props => {
48598
+ const CloseBtn$d = props => {
49342
48599
  return /*#__PURE__*/React__default.createElement("div", {
49343
48600
  className: "icon-bg-secondary",
49344
48601
  onClick: props.onClick
49345
- }, /*#__PURE__*/React__default.createElement(Close$d, null));
48602
+ }, /*#__PURE__*/React__default.createElement(Close$e, null));
49346
48603
  };
49347
48604
  const RenewPopup = _ref => {
49348
48605
  let {
@@ -49370,7 +48627,7 @@ const RenewPopup = _ref => {
49370
48627
  headerBarMain: /*#__PURE__*/React__default.createElement(Heading, {
49371
48628
  label: "SV_WANT_TO_EDIT"
49372
48629
  }),
49373
- headerBarEnd: /*#__PURE__*/React__default.createElement(CloseBtn$c, {
48630
+ headerBarEnd: /*#__PURE__*/React__default.createElement(CloseBtn$d, {
49374
48631
  onClick: closeModal
49375
48632
  }),
49376
48633
  actionCancelLabel: t("CS_COMMON_BACK"),
@@ -49515,7 +48772,7 @@ const DueVerification = _ref => {
49515
48772
  try {
49516
48773
  return Promise.resolve(function () {
49517
48774
  if (isZROApproval && applicationData !== null && applicationData !== void 0 && applicationData.applicationNo) {
49518
- return _catch$1(function () {
48775
+ return _catch(function () {
49519
48776
  return Promise.resolve(checkDueVerification({
49520
48777
  DueVerification: {
49521
48778
  applicationNo: applicationData.applicationNo
@@ -49559,7 +48816,7 @@ const DueVerification = _ref => {
49559
48816
  });
49560
48817
  return;
49561
48818
  }
49562
- return _catch$1(function () {
48819
+ return _catch(function () {
49563
48820
  return Promise.resolve(checkDueVerification({
49564
48821
  DueVerification: {
49565
48822
  kno: kno
@@ -50604,7 +49861,7 @@ function ApplicationDetailsActionBar(_ref) {
50604
49861
  }, 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}`))));
50605
49862
  }
50606
49863
 
50607
- const Close$e = () => /*#__PURE__*/React__default.createElement("svg", {
49864
+ const Close$f = () => /*#__PURE__*/React__default.createElement("svg", {
50608
49865
  xmlns: "http://www.w3.org/2000/svg",
50609
49866
  viewBox: "0 0 24 24",
50610
49867
  fill: "#FFFFFF"
@@ -50614,11 +49871,11 @@ const Close$e = () => /*#__PURE__*/React__default.createElement("svg", {
50614
49871
  }), /*#__PURE__*/React__default.createElement("path", {
50615
49872
  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"
50616
49873
  }));
50617
- const CloseBtn$d = props => {
49874
+ const CloseBtn$e = props => {
50618
49875
  return /*#__PURE__*/React__default.createElement("div", {
50619
49876
  className: "icon-bg-secondary",
50620
49877
  onClick: props.onClick
50621
- }, /*#__PURE__*/React__default.createElement(Close$e, null));
49878
+ }, /*#__PURE__*/React__default.createElement(Close$f, null));
50622
49879
  };
50623
49880
  function ApplicationDetailsWarningPopup(_ref) {
50624
49881
  let {
@@ -50636,7 +49893,7 @@ function ApplicationDetailsWarningPopup(_ref) {
50636
49893
  headerBarMain: /*#__PURE__*/React__default.createElement("h1", {
50637
49894
  className: "heading-m"
50638
49895
  }, t("PT_DUES_ARE_PENDING")),
50639
- headerBarEnd: /*#__PURE__*/React__default.createElement(CloseBtn$d, {
49896
+ headerBarEnd: /*#__PURE__*/React__default.createElement(CloseBtn$e, {
50640
49897
  onClick: () => {
50641
49898
  closeWarningPopup();
50642
49899
  }
@@ -50921,7 +50178,7 @@ const ApplicationDetails = props => {
50921
50178
  const nocPrmomises = (_nocData = nocData) === null || _nocData === void 0 ? void 0 : _nocData.map(noc => {
50922
50179
  return nocMutation === null || nocMutation === void 0 ? void 0 : nocMutation.mutateAsync(noc);
50923
50180
  });
50924
- const _temp = _catch$1(function () {
50181
+ const _temp = _catch(function () {
50925
50182
  setIsEnableLoader(true);
50926
50183
  return Promise.resolve(Promise.all(nocPrmomises)).then(function (values) {
50927
50184
  values && values.map(ob => {