@mseva/digit-ui-module-ndc 1.0.72-dev.1.1 → 1.0.72-dev.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
- import { Card, Banner, ActionBar, SubmitBar as SubmitBar$1, PrivateRoute, BreadCrumb, AppContainer, Dropdown, UploadFile, Modal, FormComposer, Toast, Loader as Loader$1, LinkButton, CardSubHeader, StatusTable, Row, TextInput, CardLabel, FilterFormField, RadioButtons, Menu, EmployeeModuleCard, SearchField, ComplaintIcon, InboxComposer, FilterForm, Table, MobileNumber, CardLabelError, SearchAction, PopUp, DetailsCard, SearchForm, CloseSvg, CardHeader, LabelFieldPair, DeleteIcon, Header, KeyNote } from '@mseva/digit-ui-react-components';
1
+ import { Card, Banner, ActionBar, SubmitBar as SubmitBar$1, PrivateRoute, BreadCrumb, AppContainer, Dropdown, UploadFile, Modal, FormComposer, Toast, Loader as Loader$1, MultiLink, CardSubHeader, StatusTable, Row, TextInput, CardLabel, FilterFormField, RadioButtons, Menu, EmployeeModuleCard, SearchField, CheckBox, ComplaintIcon, Header, InboxComposer, MobileNumber, CardLabelError, SearchAction, PopUp, DetailsCard, SearchForm, CloseSvg, Table, CardHeader, LabelFieldPair, DeleteIcon, KeyNote } from '@mseva/digit-ui-react-components';
2
2
  import React, { Fragment as Fragment$1, useState, useEffect, useMemo, useRef, useReducer, useCallback, forwardRef } from 'react';
3
3
  import { useHistory, useLocation, Switch, Route, useRouteMatch, useParams, Link } from 'react-router-dom';
4
4
  import { useTranslation } from 'react-i18next';
5
5
  import { useDispatch, useSelector } from 'react-redux';
6
- import { useForm, Controller, useController, useFormContext, FormProvider, useFieldArray } from 'react-hook-form';
6
+ import { useForm, Controller, useFormContext, FormProvider, useFieldArray } from 'react-hook-form';
7
7
  import 'react-query';
8
8
  import { combineReducers } from 'redux';
9
9
 
@@ -2153,7 +2153,9 @@ function NewApplicationTimeline({
2153
2153
  workflowDetails,
2154
2154
  t,
2155
2155
  tenantId = Digit.ULBService.getCurrentTenantId(),
2156
- timeObj
2156
+ timeObj,
2157
+ empUserName = null,
2158
+ handleSetEmpDesignation = () => {}
2157
2159
  }) {
2158
2160
  var _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _employeeData$data, _employeeData$data$Em;
2159
2161
  const {
@@ -2228,6 +2230,9 @@ function NewApplicationTimeline({
2228
2230
  const translationKey = `COMMON_MASTERS_DESIGNATION_${assignment === null || assignment === void 0 ? void 0 : assignment.designation}`;
2229
2231
  deptMap[emp === null || emp === void 0 ? void 0 : emp.code] = translationKey;
2230
2232
  });
2233
+ if (employeeData && empUserName) {
2234
+ handleSetEmpDesignation(t(deptMap[empUserName]));
2235
+ }
2231
2236
  if (isLoading) return /*#__PURE__*/React.createElement(Loader$1, null);
2232
2237
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
2233
2238
  className: "custom-timeline-container"
@@ -2258,7 +2263,7 @@ function NewApplicationTimeline({
2258
2263
  }))), /*#__PURE__*/React.createElement("div", {
2259
2264
  className: "custom-timeline-entries"
2260
2265
  }, sortedData === null || sortedData === void 0 ? void 0 : sortedData.map((item, index) => {
2261
- var _item$auditDetails, _item$auditDetails2, _item$assigner2, _item$assigner3, _item$assigner4, _item$assigner5, _item$assigner6, _item$wfComment, _item$wfComment2, _item$wfComment3, _item$assignes, _item$assignes$, _item$assignes$2, _item$assignes$3, _item$wfDocuments, _item$wfDocuments2;
2266
+ var _item$auditDetails, _item$auditDetails2, _item$assigner2, _item$assigner3, _item$assigner4, _item$wfComment, _item$wfComment2, _item$wfComment3, _item$assignes, _item$assignes$, _item$assignes$2, _item$assignes$3, _item$wfDocuments, _item$wfDocuments2;
2262
2267
  return /*#__PURE__*/React.createElement("div", {
2263
2268
  key: index,
2264
2269
  className: "custom-timeline-entry"
@@ -2295,13 +2300,9 @@ function NewApplicationTimeline({
2295
2300
  className: "custom-officer-info"
2296
2301
  }, /*#__PURE__*/React.createElement("div", {
2297
2302
  className: "custom-officer-name"
2298
- }, (item === null || item === void 0 ? void 0 : (_item$assigner2 = item.assigner) === null || _item$assigner2 === void 0 ? void 0 : _item$assigner2.name) || t("CS_COMMON_NA"), deptMap[item === null || item === void 0 ? void 0 : (_item$assigner3 = item.assigner) === null || _item$assigner3 === void 0 ? void 0 : _item$assigner3.userName] && /*#__PURE__*/React.createElement("span", {
2303
+ }, (item === null || item === void 0 ? void 0 : (_item$assigner2 = item.assigner) === null || _item$assigner2 === void 0 ? void 0 : _item$assigner2.name) || t("CS_COMMON_NA")), deptMap[item === null || item === void 0 ? void 0 : (_item$assigner3 = item.assigner) === null || _item$assigner3 === void 0 ? void 0 : _item$assigner3.userName] && /*#__PURE__*/React.createElement("div", {
2299
2304
  className: "custom-officer-name"
2300
- }, "- ", t(deptMap[item === null || item === void 0 ? void 0 : (_item$assigner4 = item.assigner) === null || _item$assigner4 === void 0 ? void 0 : _item$assigner4.userName]))), (item === null || item === void 0 ? void 0 : (_item$assigner5 = item.assigner) === null || _item$assigner5 === void 0 ? void 0 : _item$assigner5.emailId) && /*#__PURE__*/React.createElement("div", {
2301
- className: "custom-officer-email"
2302
- }, /*#__PURE__*/React.createElement("span", {
2303
- className: "custom-email-label"
2304
- }, t("Email")), " ", item === null || item === void 0 ? void 0 : (_item$assigner6 = item.assigner) === null || _item$assigner6 === void 0 ? void 0 : _item$assigner6.emailId))), /*#__PURE__*/React.createElement("div", {
2305
+ }, t(deptMap[item === null || item === void 0 ? void 0 : (_item$assigner4 = item.assigner) === null || _item$assigner4 === void 0 ? void 0 : _item$assigner4.userName])))), /*#__PURE__*/React.createElement("div", {
2305
2306
  className: "custom-card-column custom-card-column-mid"
2306
2307
  }, (item === null || item === void 0 ? void 0 : item.sla) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("h3", {
2307
2308
  className: "custom-action-title"
@@ -2369,7 +2370,7 @@ const getReadableCity = (tenantId = "") => {
2369
2370
  return cityMap[key] || capitalize(key);
2370
2371
  };
2371
2372
  const capitalize = text => (text === null || text === void 0 ? void 0 : text.charAt(0).toUpperCase()) + (text === null || text === void 0 ? void 0 : text.slice(1));
2372
- const getAcknowledgementData = async (application, formattedAddress, tenantInfo, t, approver, ulbType, empData) => {
2373
+ const getAcknowledgementData = async (application, formattedAddress, tenantInfo, t, approver, ulbType, empData, approverStatement) => {
2373
2374
  var _application$Applicat, _appData$owners, _appData$NdcDetails, _appData$auditDetails, _appData$auditDetails2, _empData$officer, _appData$NdcDetails2, _appData$NdcDetails3, _appData$NdcDetails3$, _appData$NdcDetails3$2, _appData$NdcDetails4, _appData$NdcDetails4$, _appData$NdcDetails4$2, _appData$owners2, _appData$owners2$;
2374
2375
  const appData = (application === null || application === void 0 ? void 0 : (_application$Applicat = application.Applications) === null || _application$Applicat === void 0 ? void 0 : _application$Applicat[0]) || {};
2375
2376
  const owner = (appData === null || appData === void 0 ? void 0 : (_appData$owners = appData.owners) === null || _appData$owners === void 0 ? void 0 : _appData$owners[0]) || {};
@@ -2530,6 +2531,7 @@ const getAcknowledgementData = async (application, formattedAddress, tenantInfo,
2530
2531
  approvalDate,
2531
2532
  approver,
2532
2533
  designation,
2534
+ approverStatement,
2533
2535
  ulbType,
2534
2536
  tenantId: appData === null || appData === void 0 ? void 0 : appData.tenantId,
2535
2537
  name: ` No Dues Certificate `,
@@ -2551,7 +2553,7 @@ const availableOptions = [{
2551
2553
  name: "No"
2552
2554
  }];
2553
2555
  const ApplicationOverview = () => {
2554
- var _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _user, _user$info, _user$info$roles, _user2, _user2$info, _user2$info$roles$fin, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetailsTemp$, _workflowDetailsTemp$2, _applicationDetails$A5, _applicationDetails$A6, _propertyDetailsFetch3, _applicationDetails$A7, _applicationDetails$A8, _Object$entries, _displayData$NdcDetai2, _displayData$Document, _applicationDetails$A21, _applicationDetails$A22, _workflowDetails$data1, _workflowDetails$data10, _workflowDetails$data11, _applicationDetails$A23, _applicationDetails$A24, _workflowDetails$data12;
2556
+ var _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _applicationDetails$A2, _applicationDetails$A3, _applicationDetails$A4, _applicationDetails$A5, _user, _user$info, _user$info$roles, _user2, _user2$info, _user2$info$roles$fin, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetailsTemp$, _workflowDetailsTemp$2, _applicationDetails$A10, _applicationDetails$A11, _propertyDetailsFetch3, _Object$entries, _displayData$NdcDetai2, _displayData$Document, _applicationDetails$A26, _applicationDetails$A27, _workflowDetails$data1, _workflowDetails$data10, _workflowDetails$data11, _applicationDetails$A28, _applicationDetails$A29, _workflowDetails$data12;
2555
2557
  const {
2556
2558
  id
2557
2559
  } = useParams();
@@ -2584,6 +2586,8 @@ const ApplicationOverview = () => {
2584
2586
  const [showModal, setShowModal] = useState(false);
2585
2587
  const [getPropertyId, setPropertyId] = useState(null);
2586
2588
  const [approver, setApprover] = useState(null);
2589
+ const [approverStatement, setApproverStatement] = useState(null);
2590
+ const [showOptions, setShowOptions] = useState(false);
2587
2591
  const handleMarkPending = (consumerCode, value, index) => {
2588
2592
  setMarkedPending(prev => {
2589
2593
  const updated = {
@@ -2662,6 +2666,68 @@ const ApplicationOverview = () => {
2662
2666
  const empData = EmployeeData(tenantId, approver);
2663
2667
  console.log("approver for ndc", approver);
2664
2668
  console.log("officerData", empData);
2669
+ const {
2670
+ data: reciept_data,
2671
+ isLoading: recieptDataLoading
2672
+ } = Digit.Hooks.useRecieptSearch({
2673
+ tenantId: tenantId,
2674
+ businessService: "NDC",
2675
+ consumerCodes: id,
2676
+ isEmployee: false
2677
+ }, {
2678
+ enabled: id ? true : false
2679
+ });
2680
+ async function getRecieptSearch({
2681
+ tenantId,
2682
+ payments,
2683
+ ...params
2684
+ }) {
2685
+ setLoader(true);
2686
+ try {
2687
+ var _applicationDetails$A, _response;
2688
+ let response = null;
2689
+ let application = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A = applicationDetails.Applications) === null || _applicationDetails$A === void 0 ? void 0 : _applicationDetails$A[0];
2690
+ if (payments !== null && payments !== void 0 && payments.fileStoreId) {
2691
+ response = {
2692
+ filestoreIds: [payments === null || payments === void 0 ? void 0 : payments.fileStoreId]
2693
+ };
2694
+ } else {
2695
+ response = await Digit.PaymentService.generatePdf(tenantId, {
2696
+ Payments: [{
2697
+ ...(payments || {}),
2698
+ ...application
2699
+ }]
2700
+ }, "ndc-receipt");
2701
+ }
2702
+ const fileStore = await Digit.PaymentService.printReciept(tenantId, {
2703
+ fileStoreIds: response.filestoreIds[0]
2704
+ });
2705
+ window.open(fileStore[(_response = response) === null || _response === void 0 ? void 0 : _response.filestoreIds[0]], "_blank");
2706
+ setLoader(false);
2707
+ } catch (error) {
2708
+ console.error(error);
2709
+ setLoader(false);
2710
+ }
2711
+ }
2712
+ const dowloadOptions = [];
2713
+ if ((applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A2 = applicationDetails.Applications) === null || _applicationDetails$A2 === void 0 ? void 0 : (_applicationDetails$A3 = _applicationDetails$A2[0]) === null || _applicationDetails$A3 === void 0 ? void 0 : _applicationDetails$A3.applicationStatus) === "APPROVED" || (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A4 = applicationDetails.Applications) === null || _applicationDetails$A4 === void 0 ? void 0 : (_applicationDetails$A5 = _applicationDetails$A4[0]) === null || _applicationDetails$A5 === void 0 ? void 0 : _applicationDetails$A5.applicationStatus) === "REJECTED") {
2714
+ dowloadOptions.push({
2715
+ label: t("DOWNLOAD_CERTIFICATE"),
2716
+ onClick: () => handleDownloadPdf()
2717
+ });
2718
+ if (reciept_data && (reciept_data === null || reciept_data === void 0 ? void 0 : reciept_data.Payments.length) > 0 && !recieptDataLoading) {
2719
+ dowloadOptions.push({
2720
+ label: t("PTR_FEE_RECIEPT"),
2721
+ onClick: () => {
2722
+ var _reciept_data$Payment;
2723
+ return getRecieptSearch({
2724
+ tenantId: reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment = reciept_data.Payments[0]) === null || _reciept_data$Payment === void 0 ? void 0 : _reciept_data$Payment.tenantId,
2725
+ payments: reciept_data === null || reciept_data === void 0 ? void 0 : reciept_data.Payments[0]
2726
+ });
2727
+ }
2728
+ });
2729
+ }
2730
+ }
2665
2731
  let user = Digit.UserService.getUser();
2666
2732
  const menuRef = useRef();
2667
2733
  if (window.location.href.includes("/obps") || window.location.href.includes("/noc")) {
@@ -2704,8 +2770,8 @@ const ApplicationOverview = () => {
2704
2770
  });
2705
2771
  };
2706
2772
  useEffect(() => {
2707
- var _applicationDetails$A;
2708
- const ndcObject = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A = applicationDetails.Applications) === null || _applicationDetails$A === void 0 ? void 0 : _applicationDetails$A[0];
2773
+ var _applicationDetails$A6;
2774
+ const ndcObject = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A6 = applicationDetails.Applications) === null || _applicationDetails$A6 === void 0 ? void 0 : _applicationDetails$A6[0];
2709
2775
  if (ndcObject) {
2710
2776
  var _ndcObject$owners, _ndcObject$owners$, _ndcObject$owners2, _ndcObject$owners2$, _ndcObject$owners3, _ndcObject$owners3$, _ndcObject$NdcDetails, _ndcObject$NdcDetails2, _ndcObject$NdcDetails3, _removeDuplicatesByUU;
2711
2777
  const applicantData = {
@@ -2757,7 +2823,7 @@ const ApplicationOverview = () => {
2757
2823
  const ulbType = tenantInfo === null || tenantInfo === void 0 ? void 0 : (_tenantInfo$city = tenantInfo.city) === null || _tenantInfo$city === void 0 ? void 0 : _tenantInfo$city.ulbType;
2758
2824
  let acknowledgementData;
2759
2825
  if (empData) {
2760
- acknowledgementData = await getAcknowledgementData(Property, formattedAddress, tenantInfo, t, approver, ulbType, empData);
2826
+ acknowledgementData = await getAcknowledgementData(Property, formattedAddress, tenantInfo, t, approver, ulbType, empData, approverStatement);
2761
2827
  }
2762
2828
  console.log("acknowledgementData", acknowledgementData);
2763
2829
  setTimeout(() => {
@@ -2770,18 +2836,18 @@ const ApplicationOverview = () => {
2770
2836
  }
2771
2837
  };
2772
2838
  function onActionSelect(action) {
2773
- var _action$state, _applicationDetails$A3, _applicationDetails$A4, _action$state2, _action$state2$action, _filterNexState$, _filterRoles$, _displayData$applican;
2774
- console.log("action====???", action === null || action === void 0 ? void 0 : (_action$state = action.state) === null || _action$state === void 0 ? void 0 : _action$state.actions);
2775
- const ndcDetails = (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A3 = applicationDetails.Applications) === null || _applicationDetails$A3 === void 0 ? void 0 : (_applicationDetails$A4 = _applicationDetails$A3[0]) === null || _applicationDetails$A4 === void 0 ? void 0 : _applicationDetails$A4.NdcDetails) || [];
2839
+ var _action$state, _applicationDetails$A8, _applicationDetails$A9, _action$state2, _action$state2$action, _filterNexState$, _filterRoles$, _displayData$applican;
2840
+ console.log("action====||?", action === null || action === void 0 ? void 0 : (_action$state = action.state) === null || _action$state === void 0 ? void 0 : _action$state.actions);
2841
+ const ndcDetails = (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A8 = applicationDetails.Applications) === null || _applicationDetails$A8 === void 0 ? void 0 : (_applicationDetails$A9 = _applicationDetails$A8[0]) === null || _applicationDetails$A9 === void 0 ? void 0 : _applicationDetails$A9.NdcDetails) || [];
2776
2842
  const hasDuePending = ndcDetails === null || ndcDetails === void 0 ? void 0 : ndcDetails.some(item => item.isDuePending === true);
2777
2843
  console.log("hasDuePending", hasDuePending);
2778
2844
  const filterNexState = action === null || action === void 0 ? void 0 : (_action$state2 = action.state) === null || _action$state2 === void 0 ? void 0 : (_action$state2$action = _action$state2.actions) === null || _action$state2$action === void 0 ? void 0 : _action$state2$action.filter(item => item.action == (action === null || action === void 0 ? void 0 : action.action));
2779
- console.log("filterNexState====???", (_filterNexState$ = filterNexState[0]) === null || _filterNexState$ === void 0 ? void 0 : _filterNexState$.nextState);
2845
+ console.log("filterNexState====||?", (_filterNexState$ = filterNexState[0]) === null || _filterNexState$ === void 0 ? void 0 : _filterNexState$.nextState);
2780
2846
  const filterRoles = getWorkflowService === null || getWorkflowService === void 0 ? void 0 : getWorkflowService.filter(item => {
2781
2847
  var _filterNexState$2;
2782
2848
  return (item === null || item === void 0 ? void 0 : item.uuid) == ((_filterNexState$2 = filterNexState[0]) === null || _filterNexState$2 === void 0 ? void 0 : _filterNexState$2.nextState);
2783
2849
  });
2784
- console.log("filterRoles====???", filterRoles);
2850
+ console.log("filterRoles====||?", filterRoles);
2785
2851
  console.log("action test", action === null || action === void 0 ? void 0 : action.action);
2786
2852
  const checkactionApp = (action === null || action === void 0 ? void 0 : action.action) == "APPROVE";
2787
2853
  console.log("filterRoles && checkactionApp", filterRoles && checkactionApp, checkactionApp, filterRoles);
@@ -2817,7 +2883,7 @@ const ApplicationOverview = () => {
2817
2883
  const isPending = markedPending[detail.consumerCode];
2818
2884
  return {
2819
2885
  ...detail,
2820
- isDuePending: isPending ?? detail.isDuePending ?? false,
2886
+ isDuePending: isPending || detail.isDuePending || false,
2821
2887
  dueAmount: isPending === false ? 0 : (amounts === null || amounts === void 0 ? void 0 : amounts[detail.consumerCode]) !== undefined ? Number(amounts[detail.consumerCode]) : (detail === null || detail === void 0 ? void 0 : detail.dueAmount) || 0
2822
2888
  };
2823
2889
  }),
@@ -2873,10 +2939,11 @@ const ApplicationOverview = () => {
2873
2939
  };
2874
2940
  useEffect(() => {
2875
2941
  if (workflowDetails) {
2876
- var _workflowDetails$data9, _workflowDetails$data0, _approveInstance$assi;
2877
- console.log("workflowDetails here", workflowDetails);
2878
- const approveInstance = workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data9 = workflowDetails.data) === null || _workflowDetails$data9 === void 0 ? void 0 : (_workflowDetails$data0 = _workflowDetails$data9.processInstances) === null || _workflowDetails$data0 === void 0 ? void 0 : _workflowDetails$data0.find(pi => (pi === null || pi === void 0 ? void 0 : pi.action) === "APPROVE");
2942
+ var _workflowDetails$data9, _workflowDetails$data0, _approveInstance$assi, _applicationDetails$A0, _applicationDetails$A1;
2943
+ const approveInstance = workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data9 = workflowDetails.data) === null || _workflowDetails$data9 === void 0 ? void 0 : (_workflowDetails$data0 = _workflowDetails$data9.processInstances) === null || _workflowDetails$data0 === void 0 ? void 0 : _workflowDetails$data0.find(pi => (pi === null || pi === void 0 ? void 0 : pi.action) === "APPROVE" || (pi === null || pi === void 0 ? void 0 : pi.action) === "REJECT");
2879
2944
  const name = (approveInstance === null || approveInstance === void 0 ? void 0 : (_approveInstance$assi = approveInstance.assigner) === null || _approveInstance$assi === void 0 ? void 0 : _approveInstance$assi.name) || "NA";
2945
+ const status = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A0 = applicationDetails.Applications) === null || _applicationDetails$A0 === void 0 ? void 0 : (_applicationDetails$A1 = _applicationDetails$A0[0]) === null || _applicationDetails$A1 === void 0 ? void 0 : _applicationDetails$A1.applicationStatus;
2946
+ setApproverStatement(status ? `${t(status)} By` : "");
2880
2947
  setApprover(name);
2881
2948
  }
2882
2949
  }, [workflowDetails]);
@@ -2911,7 +2978,7 @@ const ApplicationOverview = () => {
2911
2978
  enabled: getPropertyId ? true : false,
2912
2979
  privacy: Digit.Utils.getPrivacyObject()
2913
2980
  });
2914
- console.log("applicationDetails", applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A5 = applicationDetails.Applications) === null || _applicationDetails$A5 === void 0 ? void 0 : (_applicationDetails$A6 = _applicationDetails$A5[0]) === null || _applicationDetails$A6 === void 0 ? void 0 : _applicationDetails$A6.NdcDetails);
2981
+ console.log("applicationDetails", applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A10 = applicationDetails.Applications) === null || _applicationDetails$A10 === void 0 ? void 0 : (_applicationDetails$A11 = _applicationDetails$A10[0]) === null || _applicationDetails$A11 === void 0 ? void 0 : _applicationDetails$A11.NdcDetails);
2915
2982
  useEffect(() => {
2916
2983
  const handleClickOutside = event => {
2917
2984
  if (toastRef.current && !toastRef.current.contains(event.target)) {
@@ -2931,7 +2998,7 @@ const ApplicationOverview = () => {
2931
2998
  address = propertyDetailsFetch.Properties[0].address;
2932
2999
  formattedAddress = [(_address = address) === null || _address === void 0 ? void 0 : _address.doorNo, (_address2 = address) === null || _address2 === void 0 ? void 0 : _address2.buildingName, (_address3 = address) === null || _address3 === void 0 ? void 0 : _address3.street, (_address4 = address) === null || _address4 === void 0 ? void 0 : (_address4$locality = _address4.locality) === null || _address4$locality === void 0 ? void 0 : _address4$locality.name, (_address5 = address) === null || _address5 === void 0 ? void 0 : _address5.city].filter(Boolean).join(", ");
2933
3000
  }
2934
- if (isLoading || isDetailsLoading) {
3001
+ if (isLoading || isDetailsLoading || recieptDataLoading) {
2935
3002
  return /*#__PURE__*/React.createElement(Loader, null);
2936
3003
  }
2937
3004
  return /*#__PURE__*/React.createElement("div", {
@@ -2943,16 +3010,19 @@ const ApplicationOverview = () => {
2943
3010
  alignItems: "center",
2944
3011
  padding: "16px"
2945
3012
  }
2946
- }, isCemp && (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A7 = applicationDetails.Applications) === null || _applicationDetails$A7 === void 0 ? void 0 : (_applicationDetails$A8 = _applicationDetails$A7[0]) === null || _applicationDetails$A8 === void 0 ? void 0 : _applicationDetails$A8.applicationStatus) === "APPROVED" && /*#__PURE__*/React.createElement(LinkButton, {
2947
- className: "downLoadButton",
2948
- label: t("DOWNLOAD_CERTIFICATE"),
2949
- onClick: handleDownloadPdf
2950
- })), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("NDC_APPLICATION_DETAILS_OVERVIEW")), /*#__PURE__*/React.createElement(StatusTable, null, (displayData === null || displayData === void 0 ? void 0 : displayData.applicantData) && ((_Object$entries = Object.entries(displayData === null || displayData === void 0 ? void 0 : displayData.applicantData)) === null || _Object$entries === void 0 ? void 0 : _Object$entries.map(([key, value]) => /*#__PURE__*/React.createElement(Row, {
3013
+ }, isCemp && /*#__PURE__*/React.createElement("div", {
3014
+ className: "cardHeaderWithOptions ral-app-details-header"
3015
+ }, getLoader && /*#__PURE__*/React.createElement(Loader, null), dowloadOptions && dowloadOptions.length > 0 && /*#__PURE__*/React.createElement(MultiLink, {
3016
+ className: "multilinkWrapper",
3017
+ onHeadClick: () => setShowOptions(!showOptions),
3018
+ displayOptions: showOptions,
3019
+ options: dowloadOptions
3020
+ }))), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("NDC_APPLICATION_DETAILS_OVERVIEW")), /*#__PURE__*/React.createElement(StatusTable, null, (displayData === null || displayData === void 0 ? void 0 : displayData.applicantData) && ((_Object$entries = Object.entries(displayData === null || displayData === void 0 ? void 0 : displayData.applicantData)) === null || _Object$entries === void 0 ? void 0 : _Object$entries.map(([key, value]) => /*#__PURE__*/React.createElement(Row, {
2951
3021
  key: key,
2952
3022
  label: t(`${key === null || key === void 0 ? void 0 : key.toUpperCase()}`),
2953
3023
  text: Array.isArray(value) ? value.map(item => typeof item === "object" ? t((item === null || item === void 0 ? void 0 : item.code) || "N/A") : t(item || "N/A")).join(", ") : typeof value === "object" ? t((value === null || value === void 0 ? void 0 : value.code) || "N/A") : t(value || "N/A")
2954
3024
  }))))), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("NDC_APPLICATION_NDC_DETAILS_OVERVIEW")), displayData === null || displayData === void 0 ? void 0 : (_displayData$NdcDetai2 = displayData.NdcDetails) === null || _displayData$NdcDetai2 === void 0 ? void 0 : _displayData$NdcDetai2.map((detail, index) => {
2955
- var _applicationDetails$A9, _applicationDetails$A0, _applicationDetails$A1, _applicationDetails$A10, _applicationDetails$A11, _applicationDetails$A12, _applicationDetails$A13, _applicationDetails$A14, _applicationDetails$A15, _propertyDetailsFetch4, _propertyDetailsFetch5, _propertyDetailsFetch6, _propertyDetailsFetch7, _propertyDetailsFetch8, _propertyDetailsFetch9, _propertyDetailsFetch0, _propertyDetailsFetch1, _propertyDetailsFetch10, _propertyDetailsFetch11, _propertyDetailsFetch12, _propertyDetailsFetch13, _propertyDetailsFetch14, _propertyDetailsFetch15, _propertyDetailsFetch16, _propertyDetailsFetch17, _propertyDetailsFetch18, _propertyDetailsFetch19, _propertyDetailsFetch20, _propertyDetailsFetch21, _applicationDetails$A16, _applicationDetails$A17, _applicationDetails$A18, _applicationDetails$A19, _applicationDetails$A20;
3025
+ var _applicationDetails$A12, _applicationDetails$A13, _applicationDetails$A14, _applicationDetails$A15, _applicationDetails$A16, _applicationDetails$A17, _applicationDetails$A18, _applicationDetails$A19, _applicationDetails$A20, _propertyDetailsFetch4, _propertyDetailsFetch5, _propertyDetailsFetch6, _propertyDetailsFetch7, _propertyDetailsFetch8, _propertyDetailsFetch9, _propertyDetailsFetch0, _propertyDetailsFetch1, _propertyDetailsFetch10, _propertyDetailsFetch11, _propertyDetailsFetch12, _propertyDetailsFetch13, _propertyDetailsFetch14, _propertyDetailsFetch15, _propertyDetailsFetch16, _propertyDetailsFetch17, _propertyDetailsFetch18, _propertyDetailsFetch19, _propertyDetailsFetch20, _propertyDetailsFetch21, _applicationDetails$A21, _applicationDetails$A22, _applicationDetails$A23, _applicationDetails$A24, _applicationDetails$A25;
2956
3026
  const isPT = (detail === null || detail === void 0 ? void 0 : detail.businessService) === "NDC_PROPERTY_TAX";
2957
3027
  const isSW = (detail === null || detail === void 0 ? void 0 : detail.businessService) === "NDC_SEWERAGE_SERVICE_CONNECTION";
2958
3028
  const isWS = (detail === null || detail === void 0 ? void 0 : detail.businessService) === "NDC_WATER_SERVICE_CONNECTION";
@@ -2980,14 +3050,14 @@ const ApplicationOverview = () => {
2980
3050
  backgroundColor: isRed ? "red" : "none"
2981
3051
  },
2982
3052
  label: t("NDC_DUE_AMOUNT"),
2983
- text: (markedPending[detail.consumerCode] === false ? "0" : (amounts === null || amounts === void 0 ? void 0 : amounts[detail.consumerCode]) ?? (detail === null || detail === void 0 ? void 0 : detail.dueAmount) ?? 0).toString()
3053
+ text: (markedPending[detail.consumerCode] === false ? "0" : (amounts === null || amounts === void 0 ? void 0 : amounts[detail.consumerCode]) || (detail === null || detail === void 0 ? void 0 : detail.dueAmount) || 0).toString()
2984
3054
  })), canRaiseFlag && isMarked && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Row, {
2985
3055
  label: "Due Amount",
2986
3056
  text: /*#__PURE__*/React.createElement(Controller, {
2987
3057
  key: index,
2988
3058
  control: control,
2989
3059
  name: `amount[${index}]`,
2990
- defaultValue: markedPending[detail.consumerCode] === false ? 0 : (amounts === null || amounts === void 0 ? void 0 : amounts[detail.consumerCode]) ?? (detail === null || detail === void 0 ? void 0 : detail.dueAmount) ?? 0,
3060
+ defaultValue: markedPending[detail.consumerCode] === false ? 0 : (amounts === null || amounts === void 0 ? void 0 : amounts[detail.consumerCode]) || (detail === null || detail === void 0 ? void 0 : detail.dueAmount) || 0,
2991
3061
  render: props => /*#__PURE__*/React.createElement(TextInput, {
2992
3062
  type: "number",
2993
3063
  value: props.value,
@@ -3011,7 +3081,7 @@ const ApplicationOverview = () => {
3011
3081
  text: t(detail.propertyType) || detail.propertyType
3012
3082
  }), isPT && (propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : propertyDetailsFetch.Properties) && /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(Row, {
3013
3083
  label: t("CHB_DISCOUNT_REASON"),
3014
- text: t(`${(applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A9 = applicationDetails.Applications) === null || _applicationDetails$A9 === void 0 ? void 0 : (_applicationDetails$A0 = _applicationDetails$A9[0]) === null || _applicationDetails$A0 === void 0 ? void 0 : _applicationDetails$A0.reason) == "OTHERS" ? applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A1 = applicationDetails.Applications) === null || _applicationDetails$A1 === void 0 ? void 0 : (_applicationDetails$A10 = _applicationDetails$A1[0]) === null || _applicationDetails$A10 === void 0 ? void 0 : (_applicationDetails$A11 = _applicationDetails$A10.NdcDetails) === null || _applicationDetails$A11 === void 0 ? void 0 : (_applicationDetails$A12 = _applicationDetails$A11.find(item => (item === null || item === void 0 ? void 0 : item.businessService) === "PT")) === null || _applicationDetails$A12 === void 0 ? void 0 : (_applicationDetails$A13 = _applicationDetails$A12.additionalDetails) === null || _applicationDetails$A13 === void 0 ? void 0 : _applicationDetails$A13.reason : applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A14 = applicationDetails.Applications) === null || _applicationDetails$A14 === void 0 ? void 0 : (_applicationDetails$A15 = _applicationDetails$A14[0]) === null || _applicationDetails$A15 === void 0 ? void 0 : _applicationDetails$A15.reason}`)
3084
+ text: t(`${(applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A12 = applicationDetails.Applications) === null || _applicationDetails$A12 === void 0 ? void 0 : (_applicationDetails$A13 = _applicationDetails$A12[0]) === null || _applicationDetails$A13 === void 0 ? void 0 : _applicationDetails$A13.reason) == "OTHERS" ? applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A14 = applicationDetails.Applications) === null || _applicationDetails$A14 === void 0 ? void 0 : (_applicationDetails$A15 = _applicationDetails$A14[0]) === null || _applicationDetails$A15 === void 0 ? void 0 : (_applicationDetails$A16 = _applicationDetails$A15.NdcDetails) === null || _applicationDetails$A16 === void 0 ? void 0 : (_applicationDetails$A17 = _applicationDetails$A16.find(item => (item === null || item === void 0 ? void 0 : item.businessService) === "PT")) === null || _applicationDetails$A17 === void 0 ? void 0 : (_applicationDetails$A18 = _applicationDetails$A17.additionalDetails) === null || _applicationDetails$A18 === void 0 ? void 0 : _applicationDetails$A18.reason : applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A19 = applicationDetails.Applications) === null || _applicationDetails$A19 === void 0 ? void 0 : (_applicationDetails$A20 = _applicationDetails$A19[0]) === null || _applicationDetails$A20 === void 0 ? void 0 : _applicationDetails$A20.reason}`)
3015
3085
  }), /*#__PURE__*/React.createElement(Row, {
3016
3086
  label: t("City"),
3017
3087
  text: propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : (_propertyDetailsFetch4 = propertyDetailsFetch.Properties) === null || _propertyDetailsFetch4 === void 0 ? void 0 : (_propertyDetailsFetch5 = _propertyDetailsFetch4[0]) === null || _propertyDetailsFetch5 === void 0 ? void 0 : (_propertyDetailsFetch6 = _propertyDetailsFetch5.address) === null || _propertyDetailsFetch6 === void 0 ? void 0 : _propertyDetailsFetch6.city
@@ -3035,7 +3105,7 @@ const ApplicationOverview = () => {
3035
3105
  text: propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : (_propertyDetailsFetch19 = propertyDetailsFetch.Properties) === null || _propertyDetailsFetch19 === void 0 ? void 0 : (_propertyDetailsFetch20 = _propertyDetailsFetch19[0]) === null || _propertyDetailsFetch20 === void 0 ? void 0 : (_propertyDetailsFetch21 = _propertyDetailsFetch20.additionalDetails) === null || _propertyDetailsFetch21 === void 0 ? void 0 : _propertyDetailsFetch21.yearConstruction
3036
3106
  }), /*#__PURE__*/React.createElement(Row, {
3037
3107
  label: t("Remarks"),
3038
- text: (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A16 = applicationDetails.Applications) === null || _applicationDetails$A16 === void 0 ? void 0 : (_applicationDetails$A17 = _applicationDetails$A16[0]) === null || _applicationDetails$A17 === void 0 ? void 0 : (_applicationDetails$A18 = _applicationDetails$A17.NdcDetails) === null || _applicationDetails$A18 === void 0 ? void 0 : (_applicationDetails$A19 = _applicationDetails$A18.find(item => (item === null || item === void 0 ? void 0 : item.businessService) === "PT")) === null || _applicationDetails$A19 === void 0 ? void 0 : (_applicationDetails$A20 = _applicationDetails$A19.additionalDetails) === null || _applicationDetails$A20 === void 0 ? void 0 : _applicationDetails$A20.remarks) || "N/A"
3108
+ text: (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A21 = applicationDetails.Applications) === null || _applicationDetails$A21 === void 0 ? void 0 : (_applicationDetails$A22 = _applicationDetails$A21[0]) === null || _applicationDetails$A22 === void 0 ? void 0 : (_applicationDetails$A23 = _applicationDetails$A22.NdcDetails) === null || _applicationDetails$A23 === void 0 ? void 0 : (_applicationDetails$A24 = _applicationDetails$A23.find(item => (item === null || item === void 0 ? void 0 : item.businessService) === "PT")) === null || _applicationDetails$A24 === void 0 ? void 0 : (_applicationDetails$A25 = _applicationDetails$A24.additionalDetails) === null || _applicationDetails$A25 === void 0 ? void 0 : _applicationDetails$A25.remarks) || "N/A"
3039
3109
  }))), canRaiseFlag && /*#__PURE__*/React.createElement("div", {
3040
3110
  className: "mychallan-custom"
3041
3111
  }, /*#__PURE__*/React.createElement(CardLabel, {
@@ -3063,7 +3133,7 @@ const ApplicationOverview = () => {
3063
3133
  }) : /*#__PURE__*/React.createElement("div", null, t("TL_NO_DOCUMENTS_MSG")))), /*#__PURE__*/React.createElement(NewApplicationTimeline, {
3064
3134
  workflowDetails: workflowDetails,
3065
3135
  t: t
3066
- }), (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A21 = applicationDetails.Applications) === null || _applicationDetails$A21 === void 0 ? void 0 : (_applicationDetails$A22 = _applicationDetails$A21[0]) === null || _applicationDetails$A22 === void 0 ? void 0 : _applicationDetails$A22.applicationStatus) !== "INITIATED" && (actions === null || actions === void 0 ? void 0 : actions.length) > 0 && /*#__PURE__*/React.createElement(ActionBar, null, displayMenu && (workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data1 = workflowDetails.data) !== null && _workflowDetails$data1 !== void 0 && (_workflowDetails$data10 = _workflowDetails$data1.actionState) !== null && _workflowDetails$data10 !== void 0 && _workflowDetails$data10.nextActions || workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data11 = workflowDetails.data) !== null && _workflowDetails$data11 !== void 0 && _workflowDetails$data11.nextActions) ? /*#__PURE__*/React.createElement(Menu, {
3136
+ }), (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A26 = applicationDetails.Applications) === null || _applicationDetails$A26 === void 0 ? void 0 : (_applicationDetails$A27 = _applicationDetails$A26[0]) === null || _applicationDetails$A27 === void 0 ? void 0 : _applicationDetails$A27.applicationStatus) !== "INITIATED" && (actions === null || actions === void 0 ? void 0 : actions.length) > 0 && /*#__PURE__*/React.createElement(ActionBar, null, displayMenu && (workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data1 = workflowDetails.data) !== null && _workflowDetails$data1 !== void 0 && (_workflowDetails$data10 = _workflowDetails$data1.actionState) !== null && _workflowDetails$data10 !== void 0 && _workflowDetails$data10.nextActions || workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data11 = workflowDetails.data) !== null && _workflowDetails$data11 !== void 0 && _workflowDetails$data11.nextActions) ? /*#__PURE__*/React.createElement(Menu, {
3067
3137
  localeKeyPrefix: `WF_EDITRENEWAL`,
3068
3138
  options: actions,
3069
3139
  optionKey: "action",
@@ -3073,11 +3143,11 @@ const ApplicationOverview = () => {
3073
3143
  ref: menuRef,
3074
3144
  label: t("WF_TAKE_ACTION"),
3075
3145
  onSubmit: () => setDisplayMenu(!displayMenu)
3076
- })), (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A23 = applicationDetails.Applications) === null || _applicationDetails$A23 === void 0 ? void 0 : (_applicationDetails$A24 = _applicationDetails$A23[0]) === null || _applicationDetails$A24 === void 0 ? void 0 : _applicationDetails$A24.applicationStatus) == "INITIATED" && /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar$1, {
3146
+ })), (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A28 = applicationDetails.Applications) === null || _applicationDetails$A28 === void 0 ? void 0 : (_applicationDetails$A29 = _applicationDetails$A28[0]) === null || _applicationDetails$A29 === void 0 ? void 0 : _applicationDetails$A29.applicationStatus) == "INITIATED" && /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar$1, {
3077
3147
  label: t("COMMON_EDIT"),
3078
3148
  onSubmit: () => {
3079
- var _applicationDetails$A25, _applicationDetails$A26;
3080
- const id = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A25 = applicationDetails.Applications) === null || _applicationDetails$A25 === void 0 ? void 0 : (_applicationDetails$A26 = _applicationDetails$A25[0]) === null || _applicationDetails$A26 === void 0 ? void 0 : _applicationDetails$A26.applicationNo;
3149
+ var _applicationDetails$A30, _applicationDetails$A31;
3150
+ const id = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A30 = applicationDetails.Applications) === null || _applicationDetails$A30 === void 0 ? void 0 : (_applicationDetails$A31 = _applicationDetails$A30[0]) === null || _applicationDetails$A31 === void 0 ? void 0 : _applicationDetails$A31.applicationNo;
3081
3151
  history.push(`/digit-ui/employee/ndc/create/${id}`);
3082
3152
  }
3083
3153
  })), showModal ? /*#__PURE__*/React.createElement(NDCModal, {
@@ -10420,7 +10490,7 @@ var lodash = createCommonjsModule(function (module, exports) {
10420
10490
  });
10421
10491
 
10422
10492
  const CitizenApplicationOverview = () => {
10423
- var _user, _user$info, _user$info$roles, _propertyDetailsFetch3, _propertyDetailsFetch4, _propertyDetailsFetch5, _ownerForName$map, _ownerForName$map$fil, _applicationDetails$A3, _applicationDetails$A4, _applicationDetails$A5, _applicationDetails$A6, _applicationDetails$A7, _applicationDetails$A8, _applicationDetails$A9, _Object$entries, _Object$entries$filte, _displayData$NdcDetai2, _displayData$Document;
10493
+ var _applicationDetails$A4, _applicationDetails$A5, _applicationDetails$A6, _applicationDetails$A7, _user, _user$info, _user$info$roles, _propertyDetailsFetch3, _propertyDetailsFetch4, _propertyDetailsFetch5, _ownerForName$map, _ownerForName$map$fil, _applicationDetails$A0, _applicationDetails$A1, _applicationDetails$A10, _applicationDetails$A11, _applicationDetails$A12, _Object$entries, _Object$entries$filte, _displayData$NdcDetai2, _displayData$Document;
10424
10494
  const {
10425
10495
  id
10426
10496
  } = useParams();
@@ -10433,6 +10503,8 @@ const CitizenApplicationOverview = () => {
10433
10503
  const [appDetails, setAppDetails] = useState({});
10434
10504
  const [showToast, setShowToast] = useState(null);
10435
10505
  const [approver, setApprover] = useState(null);
10506
+ const [approverStatement, setApproverStatement] = useState(null);
10507
+ const [showOptions, setShowOptions] = useState(false);
10436
10508
  const [ndcDatils, setNdcDetails] = useState([]);
10437
10509
  const [displayData, setDisplayData] = useState({});
10438
10510
  const [getLoader, setLoader] = useState(false);
@@ -10455,10 +10527,11 @@ const CitizenApplicationOverview = () => {
10455
10527
  });
10456
10528
  useEffect(() => {
10457
10529
  if (workflowDetails) {
10458
- var _workflowDetails$data, _workflowDetails$data2, _approveInstance$assi;
10459
- console.log("workflowDetails here", workflowDetails);
10460
- const approveInstance = workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : (_workflowDetails$data2 = _workflowDetails$data.processInstances) === null || _workflowDetails$data2 === void 0 ? void 0 : _workflowDetails$data2.find(pi => (pi === null || pi === void 0 ? void 0 : pi.action) === "APPROVE");
10530
+ var _workflowDetails$data, _workflowDetails$data2, _approveInstance$assi, _applicationDetails$A, _applicationDetails$A2;
10531
+ const approveInstance = workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : (_workflowDetails$data2 = _workflowDetails$data.processInstances) === null || _workflowDetails$data2 === void 0 ? void 0 : _workflowDetails$data2.find(pi => (pi === null || pi === void 0 ? void 0 : pi.action) === "APPROVE" || (pi === null || pi === void 0 ? void 0 : pi.action) === "REJECT");
10461
10532
  const name = (approveInstance === null || approveInstance === void 0 ? void 0 : (_approveInstance$assi = approveInstance.assigner) === null || _approveInstance$assi === void 0 ? void 0 : _approveInstance$assi.name) || "NA";
10533
+ const status = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A = applicationDetails.Applications) === null || _applicationDetails$A === void 0 ? void 0 : (_applicationDetails$A2 = _applicationDetails$A[0]) === null || _applicationDetails$A2 === void 0 ? void 0 : _applicationDetails$A2.applicationStatus;
10534
+ setApproverStatement(status ? `${t(status)} By` : "");
10462
10535
  setApprover(name);
10463
10536
  }
10464
10537
  }, [workflowDetails]);
@@ -10478,6 +10551,68 @@ const CitizenApplicationOverview = () => {
10478
10551
  const userInfo = userInfos ? JSON.parse(userInfos) : {};
10479
10552
  user = userInfo === null || userInfo === void 0 ? void 0 : userInfo.value;
10480
10553
  }
10554
+ const {
10555
+ data: reciept_data,
10556
+ isLoading: recieptDataLoading
10557
+ } = Digit.Hooks.useRecieptSearch({
10558
+ tenantId: tenantId,
10559
+ businessService: "NDC",
10560
+ consumerCodes: id,
10561
+ isEmployee: false
10562
+ }, {
10563
+ enabled: id ? true : false
10564
+ });
10565
+ async function getRecieptSearch({
10566
+ tenantId,
10567
+ payments,
10568
+ ...params
10569
+ }) {
10570
+ setLoader(true);
10571
+ try {
10572
+ var _applicationDetails$A3, _response;
10573
+ let response = null;
10574
+ let application = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A3 = applicationDetails.Applications) === null || _applicationDetails$A3 === void 0 ? void 0 : _applicationDetails$A3[0];
10575
+ if (payments !== null && payments !== void 0 && payments.fileStoreId) {
10576
+ response = {
10577
+ filestoreIds: [payments === null || payments === void 0 ? void 0 : payments.fileStoreId]
10578
+ };
10579
+ } else {
10580
+ response = await Digit.PaymentService.generatePdf(tenantId, {
10581
+ Payments: [{
10582
+ ...(payments || {}),
10583
+ ...application
10584
+ }]
10585
+ }, "ndc-receipt");
10586
+ }
10587
+ const fileStore = await Digit.PaymentService.printReciept(tenantId, {
10588
+ fileStoreIds: response.filestoreIds[0]
10589
+ });
10590
+ window.open(fileStore[(_response = response) === null || _response === void 0 ? void 0 : _response.filestoreIds[0]], "_blank");
10591
+ setLoader(false);
10592
+ } catch (error) {
10593
+ console.error(error);
10594
+ setLoader(false);
10595
+ }
10596
+ }
10597
+ const dowloadOptions = [];
10598
+ if ((applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A4 = applicationDetails.Applications) === null || _applicationDetails$A4 === void 0 ? void 0 : (_applicationDetails$A5 = _applicationDetails$A4[0]) === null || _applicationDetails$A5 === void 0 ? void 0 : _applicationDetails$A5.applicationStatus) === "APPROVED" || (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A6 = applicationDetails.Applications) === null || _applicationDetails$A6 === void 0 ? void 0 : (_applicationDetails$A7 = _applicationDetails$A6[0]) === null || _applicationDetails$A7 === void 0 ? void 0 : _applicationDetails$A7.applicationStatus) === "REJECTED") {
10599
+ dowloadOptions.push({
10600
+ label: t("DOWNLOAD_CERTIFICATE"),
10601
+ onClick: () => handleDownloadPdf()
10602
+ });
10603
+ }
10604
+ if (reciept_data && (reciept_data === null || reciept_data === void 0 ? void 0 : reciept_data.Payments.length) > 0 && !recieptDataLoading) {
10605
+ dowloadOptions.push({
10606
+ label: t("PTR_FEE_RECIEPT"),
10607
+ onClick: () => {
10608
+ var _reciept_data$Payment;
10609
+ return getRecieptSearch({
10610
+ tenantId: reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment = reciept_data.Payments[0]) === null || _reciept_data$Payment === void 0 ? void 0 : _reciept_data$Payment.tenantId,
10611
+ payments: reciept_data === null || reciept_data === void 0 ? void 0 : reciept_data.Payments[0]
10612
+ });
10613
+ }
10614
+ });
10615
+ }
10481
10616
  const userRoles = (_user = user) === null || _user === void 0 ? void 0 : (_user$info = _user.info) === null || _user$info === void 0 ? void 0 : (_user$info$roles = _user$info.roles) === null || _user$info$roles === void 0 ? void 0 : _user$info$roles.map(e => e.code);
10482
10617
  const removeDuplicatesByUUID = arr => {
10483
10618
  const seen = new Set();
@@ -10491,8 +10626,8 @@ const CitizenApplicationOverview = () => {
10491
10626
  });
10492
10627
  };
10493
10628
  useEffect(() => {
10494
- var _applicationDetails$A;
10495
- const ndcObject = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A = applicationDetails.Applications) === null || _applicationDetails$A === void 0 ? void 0 : _applicationDetails$A[0];
10629
+ var _applicationDetails$A8;
10630
+ const ndcObject = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A8 = applicationDetails.Applications) === null || _applicationDetails$A8 === void 0 ? void 0 : _applicationDetails$A8[0];
10496
10631
  console.log("ndcObject", ndcObject);
10497
10632
  if (ndcObject) {
10498
10633
  var _ndcObject$owners, _ndcObject$owners2, _removeDuplicatesByUU;
@@ -10551,7 +10686,7 @@ const CitizenApplicationOverview = () => {
10551
10686
  const ulbType = tenantInfo === null || tenantInfo === void 0 ? void 0 : (_tenantInfo$city = tenantInfo.city) === null || _tenantInfo$city === void 0 ? void 0 : _tenantInfo$city.ulbType;
10552
10687
  let acknowledgementData;
10553
10688
  if (empData) {
10554
- acknowledgementData = await getAcknowledgementData(Property, formattedAddress, tenantInfo, t, approver, ulbType, empData);
10689
+ acknowledgementData = await getAcknowledgementData(Property, formattedAddress, tenantInfo, t, approver, ulbType, empData, approverStatement);
10555
10690
  }
10556
10691
  console.log("acknowledgementData", acknowledgementData);
10557
10692
  setTimeout(() => {
@@ -10597,14 +10732,14 @@ const CitizenApplicationOverview = () => {
10597
10732
  address = propertyDetailsFetch.Properties[0].address;
10598
10733
  formattedAddress = [(_address = address) === null || _address === void 0 ? void 0 : _address.doorNo, (_address2 = address) === null || _address2 === void 0 ? void 0 : _address2.buildingName, (_address3 = address) === null || _address3 === void 0 ? void 0 : _address3.street, (_address4 = address) === null || _address4 === void 0 ? void 0 : (_address4$locality = _address4.locality) === null || _address4$locality === void 0 ? void 0 : _address4$locality.name, (_address5 = address) === null || _address5 === void 0 ? void 0 : _address5.city].filter(Boolean).join(", ");
10599
10734
  }
10600
- if (isLoading || isDetailsLoading) {
10735
+ if (isLoading || isDetailsLoading || recieptDataLoading) {
10601
10736
  return /*#__PURE__*/React.createElement(Loader, null);
10602
10737
  }
10603
10738
  console.log("propertyDetailsFetch", propertyDetailsFetch);
10604
10739
  console.log("displayData?.applicantData", displayData);
10605
10740
  const ownerForName = (propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : (_propertyDetailsFetch4 = propertyDetailsFetch.Properties) === null || _propertyDetailsFetch4 === void 0 ? void 0 : (_propertyDetailsFetch5 = _propertyDetailsFetch4[0]) === null || _propertyDetailsFetch5 === void 0 ? void 0 : _propertyDetailsFetch5.owners) || [];
10606
10741
  const ownerNames = ownerForName === null || ownerForName === void 0 ? void 0 : (_ownerForName$map = ownerForName.map(owner => owner === null || owner === void 0 ? void 0 : owner.name)) === null || _ownerForName$map === void 0 ? void 0 : (_ownerForName$map$fil = _ownerForName$map.filter(Boolean)) === null || _ownerForName$map$fil === void 0 ? void 0 : _ownerForName$map$fil.join(", ");
10607
- console.log("applicationDetails?.[0]", applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A3 = applicationDetails.Applications) === null || _applicationDetails$A3 === void 0 ? void 0 : _applicationDetails$A3[0]);
10742
+ console.log("applicationDetails?.[0]", applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A0 = applicationDetails.Applications) === null || _applicationDetails$A0 === void 0 ? void 0 : _applicationDetails$A0[0]);
10608
10743
  return /*#__PURE__*/React.createElement("div", {
10609
10744
  className: "employee-main-application-details"
10610
10745
  }, /*#__PURE__*/React.createElement("div", {
@@ -10616,15 +10751,18 @@ const CitizenApplicationOverview = () => {
10616
10751
  alignItems: "center",
10617
10752
  padding: "16px"
10618
10753
  }
10619
- }, (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A4 = applicationDetails.Applications) === null || _applicationDetails$A4 === void 0 ? void 0 : (_applicationDetails$A5 = _applicationDetails$A4[0]) === null || _applicationDetails$A5 === void 0 ? void 0 : _applicationDetails$A5.applicationStatus) === "APPROVED" && /*#__PURE__*/React.createElement(LinkButton, {
10620
- className: "downLoadButton",
10621
- label: t("DOWNLOAD_CERTIFICATE"),
10622
- onClick: handleDownloadPdf
10623
- })), ((applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A6 = applicationDetails.Applications) === null || _applicationDetails$A6 === void 0 ? void 0 : (_applicationDetails$A7 = _applicationDetails$A6[0]) === null || _applicationDetails$A7 === void 0 ? void 0 : _applicationDetails$A7.applicationStatus) == "INITIATED" || (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A8 = applicationDetails.Applications) === null || _applicationDetails$A8 === void 0 ? void 0 : (_applicationDetails$A9 = _applicationDetails$A8[0]) === null || _applicationDetails$A9 === void 0 ? void 0 : _applicationDetails$A9.applicationStatus) == "CITIZENACTIONREQUIRED") && /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar$1, {
10754
+ }, /*#__PURE__*/React.createElement("div", {
10755
+ className: "cardHeaderWithOptions ral-app-details-header"
10756
+ }, getLoader && /*#__PURE__*/React.createElement(Loader, null), dowloadOptions && dowloadOptions.length > 0 && /*#__PURE__*/React.createElement(MultiLink, {
10757
+ className: "multilinkWrapper",
10758
+ onHeadClick: () => setShowOptions(!showOptions),
10759
+ displayOptions: showOptions,
10760
+ options: dowloadOptions
10761
+ }))), ((applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A1 = applicationDetails.Applications) === null || _applicationDetails$A1 === void 0 ? void 0 : (_applicationDetails$A10 = _applicationDetails$A1[0]) === null || _applicationDetails$A10 === void 0 ? void 0 : _applicationDetails$A10.applicationStatus) == "INITIATED" || (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A11 = applicationDetails.Applications) === null || _applicationDetails$A11 === void 0 ? void 0 : (_applicationDetails$A12 = _applicationDetails$A11[0]) === null || _applicationDetails$A12 === void 0 ? void 0 : _applicationDetails$A12.applicationStatus) == "CITIZENACTIONREQUIRED") && /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar$1, {
10624
10762
  label: t("COMMON_EDIT"),
10625
10763
  onSubmit: () => {
10626
- var _applicationDetails$A0, _applicationDetails$A1;
10627
- const id = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A0 = applicationDetails.Applications) === null || _applicationDetails$A0 === void 0 ? void 0 : (_applicationDetails$A1 = _applicationDetails$A0[0]) === null || _applicationDetails$A1 === void 0 ? void 0 : _applicationDetails$A1.applicationNo;
10764
+ var _applicationDetails$A13, _applicationDetails$A14;
10765
+ const id = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A13 = applicationDetails.Applications) === null || _applicationDetails$A13 === void 0 ? void 0 : (_applicationDetails$A14 = _applicationDetails$A13[0]) === null || _applicationDetails$A14 === void 0 ? void 0 : _applicationDetails$A14.applicationNo;
10628
10766
  history.push(`/digit-ui/citizen/ndc/new-application/${id}`);
10629
10767
  }
10630
10768
  }))), /*#__PURE__*/React.createElement(Card, {
@@ -10643,7 +10781,7 @@ const CitizenApplicationOverview = () => {
10643
10781
  }, /*#__PURE__*/React.createElement(CardSubHeader, {
10644
10782
  className: "ndc_label"
10645
10783
  }, t("NDC_APPLICATION_NDC_DETAILS_OVERVIEW")), displayData === null || displayData === void 0 ? void 0 : (_displayData$NdcDetai2 = displayData.NdcDetails) === null || _displayData$NdcDetai2 === void 0 ? void 0 : _displayData$NdcDetai2.map((detail, index) => {
10646
- var _detail$dueAmount, _applicationDetails$A10, _applicationDetails$A11, _applicationDetails$A12, _applicationDetails$A13, _applicationDetails$A14, _applicationDetails$A15, _applicationDetails$A16, _applicationDetails$A17, _applicationDetails$A18, _propertyDetailsFetch6, _propertyDetailsFetch7, _propertyDetailsFetch8, _propertyDetailsFetch9, _propertyDetailsFetch0, _propertyDetailsFetch1, _propertyDetailsFetch10, _propertyDetailsFetch11, _propertyDetailsFetch12, _propertyDetailsFetch13, _propertyDetailsFetch14, _propertyDetailsFetch15, _propertyDetailsFetch16, _propertyDetailsFetch17, _propertyDetailsFetch18, _propertyDetailsFetch19, _propertyDetailsFetch20, _propertyDetailsFetch21, _propertyDetailsFetch22, _propertyDetailsFetch23, _applicationDetails$A19, _applicationDetails$A20, _applicationDetails$A21, _applicationDetails$A22, _applicationDetails$A23;
10784
+ var _detail$dueAmount, _applicationDetails$A15, _applicationDetails$A16, _applicationDetails$A17, _applicationDetails$A18, _applicationDetails$A19, _applicationDetails$A20, _applicationDetails$A21, _applicationDetails$A22, _applicationDetails$A23, _propertyDetailsFetch6, _propertyDetailsFetch7, _propertyDetailsFetch8, _propertyDetailsFetch9, _propertyDetailsFetch0, _propertyDetailsFetch1, _propertyDetailsFetch10, _propertyDetailsFetch11, _propertyDetailsFetch12, _propertyDetailsFetch13, _propertyDetailsFetch14, _propertyDetailsFetch15, _propertyDetailsFetch16, _propertyDetailsFetch17, _propertyDetailsFetch18, _propertyDetailsFetch19, _propertyDetailsFetch20, _propertyDetailsFetch21, _propertyDetailsFetch22, _propertyDetailsFetch23, _applicationDetails$A24, _applicationDetails$A25, _applicationDetails$A26, _applicationDetails$A27, _applicationDetails$A28;
10647
10785
  console.log("detail", detail);
10648
10786
  const isRed = detail.dueAmount > 0;
10649
10787
  return /*#__PURE__*/React.createElement("div", {
@@ -10673,7 +10811,7 @@ const CitizenApplicationOverview = () => {
10673
10811
  text: t(detail.propertyType) || detail.propertyType
10674
10812
  }), (detail === null || detail === void 0 ? void 0 : detail.businessService) == "NDC_PROPERTY_TAX" && (propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : propertyDetailsFetch.Properties) && /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(Row, {
10675
10813
  label: t("CHB_DISCOUNT_REASON"),
10676
- text: t(`${(applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A10 = applicationDetails.Applications) === null || _applicationDetails$A10 === void 0 ? void 0 : (_applicationDetails$A11 = _applicationDetails$A10[0]) === null || _applicationDetails$A11 === void 0 ? void 0 : _applicationDetails$A11.reason) === "OTHERS" ? applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A12 = applicationDetails.Applications) === null || _applicationDetails$A12 === void 0 ? void 0 : (_applicationDetails$A13 = _applicationDetails$A12[0]) === null || _applicationDetails$A13 === void 0 ? void 0 : (_applicationDetails$A14 = _applicationDetails$A13.NdcDetails) === null || _applicationDetails$A14 === void 0 ? void 0 : (_applicationDetails$A15 = _applicationDetails$A14.find(item => (item === null || item === void 0 ? void 0 : item.businessService) === "PT")) === null || _applicationDetails$A15 === void 0 ? void 0 : (_applicationDetails$A16 = _applicationDetails$A15.additionalDetails) === null || _applicationDetails$A16 === void 0 ? void 0 : _applicationDetails$A16.reason : applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A17 = applicationDetails.Applications) === null || _applicationDetails$A17 === void 0 ? void 0 : (_applicationDetails$A18 = _applicationDetails$A17[0]) === null || _applicationDetails$A18 === void 0 ? void 0 : _applicationDetails$A18.reason}`)
10814
+ text: t(`${(applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A15 = applicationDetails.Applications) === null || _applicationDetails$A15 === void 0 ? void 0 : (_applicationDetails$A16 = _applicationDetails$A15[0]) === null || _applicationDetails$A16 === void 0 ? void 0 : _applicationDetails$A16.reason) === "OTHERS" ? applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A17 = applicationDetails.Applications) === null || _applicationDetails$A17 === void 0 ? void 0 : (_applicationDetails$A18 = _applicationDetails$A17[0]) === null || _applicationDetails$A18 === void 0 ? void 0 : (_applicationDetails$A19 = _applicationDetails$A18.NdcDetails) === null || _applicationDetails$A19 === void 0 ? void 0 : (_applicationDetails$A20 = _applicationDetails$A19.find(item => (item === null || item === void 0 ? void 0 : item.businessService) === "PT")) === null || _applicationDetails$A20 === void 0 ? void 0 : (_applicationDetails$A21 = _applicationDetails$A20.additionalDetails) === null || _applicationDetails$A21 === void 0 ? void 0 : _applicationDetails$A21.reason : applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A22 = applicationDetails.Applications) === null || _applicationDetails$A22 === void 0 ? void 0 : (_applicationDetails$A23 = _applicationDetails$A22[0]) === null || _applicationDetails$A23 === void 0 ? void 0 : _applicationDetails$A23.reason}`)
10677
10815
  }), /*#__PURE__*/React.createElement(Row, {
10678
10816
  label: t("City"),
10679
10817
  text: (propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : (_propertyDetailsFetch6 = propertyDetailsFetch.Properties) === null || _propertyDetailsFetch6 === void 0 ? void 0 : (_propertyDetailsFetch7 = _propertyDetailsFetch6[0]) === null || _propertyDetailsFetch7 === void 0 ? void 0 : (_propertyDetailsFetch8 = _propertyDetailsFetch7.address) === null || _propertyDetailsFetch8 === void 0 ? void 0 : _propertyDetailsFetch8.city) || "N/A"
@@ -10697,7 +10835,7 @@ const CitizenApplicationOverview = () => {
10697
10835
  text: propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : (_propertyDetailsFetch21 = propertyDetailsFetch.Properties) === null || _propertyDetailsFetch21 === void 0 ? void 0 : (_propertyDetailsFetch22 = _propertyDetailsFetch21[0]) === null || _propertyDetailsFetch22 === void 0 ? void 0 : (_propertyDetailsFetch23 = _propertyDetailsFetch22.additionalDetails) === null || _propertyDetailsFetch23 === void 0 ? void 0 : _propertyDetailsFetch23.yearConstruction
10698
10836
  }), /*#__PURE__*/React.createElement(Row, {
10699
10837
  label: t("Remarks"),
10700
- text: (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A19 = applicationDetails.Applications) === null || _applicationDetails$A19 === void 0 ? void 0 : (_applicationDetails$A20 = _applicationDetails$A19[0]) === null || _applicationDetails$A20 === void 0 ? void 0 : (_applicationDetails$A21 = _applicationDetails$A20.NdcDetails) === null || _applicationDetails$A21 === void 0 ? void 0 : (_applicationDetails$A22 = _applicationDetails$A21.find(item => (item === null || item === void 0 ? void 0 : item.businessService) === "PT")) === null || _applicationDetails$A22 === void 0 ? void 0 : (_applicationDetails$A23 = _applicationDetails$A22.additionalDetails) === null || _applicationDetails$A23 === void 0 ? void 0 : _applicationDetails$A23.remarks) || "N/A"
10838
+ text: (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A24 = applicationDetails.Applications) === null || _applicationDetails$A24 === void 0 ? void 0 : (_applicationDetails$A25 = _applicationDetails$A24[0]) === null || _applicationDetails$A25 === void 0 ? void 0 : (_applicationDetails$A26 = _applicationDetails$A25.NdcDetails) === null || _applicationDetails$A26 === void 0 ? void 0 : (_applicationDetails$A27 = _applicationDetails$A26.find(item => (item === null || item === void 0 ? void 0 : item.businessService) === "PT")) === null || _applicationDetails$A27 === void 0 ? void 0 : (_applicationDetails$A28 = _applicationDetails$A27.additionalDetails) === null || _applicationDetails$A28 === void 0 ? void 0 : _applicationDetails$A28.remarks) || "N/A"
10701
10839
  }))));
10702
10840
  })), /*#__PURE__*/React.createElement(Card, {
10703
10841
  className: "ndc_card_main"
@@ -10808,7 +10946,7 @@ function _extends() {
10808
10946
  }, _extends.apply(null, arguments);
10809
10947
  }
10810
10948
 
10811
- const NewSearchFormFieldsComponent = ({
10949
+ const SearchFormFieldsComponents = ({
10812
10950
  registerRef,
10813
10951
  searchFormState,
10814
10952
  searchFieldComponents
@@ -10817,6 +10955,7 @@ const NewSearchFormFieldsComponent = ({
10817
10955
  t
10818
10956
  } = useTranslation();
10819
10957
  const isMobile = window.Digit.Utils.browser.isMobile();
10958
+ console.log("searchFieldComponents", searchFieldComponents);
10820
10959
  if (!isMobile) {
10821
10960
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
10822
10961
  className: "search-container ndc-search-container-custom"
@@ -10834,7 +10973,7 @@ const NewSearchFormFieldsComponent = ({
10834
10973
  className: "search-action-wrapper ndc-search-action-wrapper"
10835
10974
  }, searchFieldComponents)))));
10836
10975
  }
10837
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SearchField, null, /*#__PURE__*/React.createElement("label", null, t("NOC_HOME_SEARCH_RESULTS_APP_NO_LABEL")), /*#__PURE__*/React.createElement(TextInput, {
10976
+ return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(SearchField, null, /*#__PURE__*/React.createElement("label", null, t("NOC_HOME_SEARCH_RESULTS_APP_NO_LABEL")), /*#__PURE__*/React.createElement(TextInput, {
10838
10977
  name: "applicationNo",
10839
10978
  inputRef: registerRef({})
10840
10979
  })), /*#__PURE__*/React.createElement(SearchField, null, /*#__PURE__*/React.createElement("label", null, t("CORE_COMMON_PHONE_NUMBER")), /*#__PURE__*/React.createElement(TextInput, {
@@ -10843,7 +10982,7 @@ const NewSearchFormFieldsComponent = ({
10843
10982
  })));
10844
10983
  };
10845
10984
 
10846
- const NewFilterFormFieldsComponent = ({
10985
+ const FilterFormFieldsComponent = ({
10847
10986
  statuses,
10848
10987
  controlFilterForm,
10849
10988
  applicationTypesOfBPA,
@@ -10852,7 +10991,15 @@ const NewFilterFormFieldsComponent = ({
10852
10991
  const {
10853
10992
  t
10854
10993
  } = useTranslation();
10855
- const [showAllStatuses, setShowAllStatuses] = useState(false);
10994
+ const tenantId = Digit.ULBService.getStateId();
10995
+ const [tlfilters, setTLFilters] = useState({
10996
+ applicationStatus: []
10997
+ });
10998
+ useEffect(() => {
10999
+ if (tlfilters) {
11000
+ handleFilter(tlfilters);
11001
+ }
11002
+ }, [tlfilters]);
10856
11003
  const availableOptions = [{
10857
11004
  code: "ASSIGNED_TO_ME",
10858
11005
  name: `${t("ES_INBOX_ASSIGNED_TO_ME")}`
@@ -10864,128 +11011,43 @@ const NewFilterFormFieldsComponent = ({
10864
11011
  type.name = t(`WF_BPA_${type.code}`);
10865
11012
  type.i18nKey = t(`WF_BPA_${type.code}`);
10866
11013
  });
10867
- const getVariantFromCode = code => {
10868
- const value = String(code || "").toLowerCase();
10869
- if (value.includes("approved")) return "success";
10870
- if (value.includes("rejected")) return "danger";
10871
- if (value.includes("pending")) return "warning";
10872
- if (value.includes("inbox")) return "primary";
10873
- if (value.includes("assigned")) return "primary";
10874
- return "info";
10875
- };
10876
- const colorVariants = ["primary", "success", "warning", "danger", "info", "indigo", "teal", "pink", "amber", "slate"];
10877
- const getVariantByIndex = (index, fallback) => colorVariants[index % colorVariants.length] || fallback;
10878
- const {
10879
- field: assigneeField
10880
- } = useController({
11014
+ return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(FilterFormField, null, /*#__PURE__*/React.createElement(Controller, {
10881
11015
  name: "assignee",
10882
- control: controlFilterForm
10883
- });
10884
- const {
10885
- field: statusField
10886
- } = useController({
11016
+ control: controlFilterForm,
11017
+ render: props => /*#__PURE__*/React.createElement(RadioButtons, {
11018
+ onSelect: e => {
11019
+ props.onChange(e.code);
11020
+ },
11021
+ selectedOption: availableOptions.filter(option => option.code === props.value)[0],
11022
+ optionsKey: "name",
11023
+ options: availableOptions
11024
+ })
11025
+ })), /*#__PURE__*/React.createElement(FilterFormField, null, /*#__PURE__*/React.createElement(Controller, {
10887
11026
  name: "applicationStatus",
10888
11027
  control: controlFilterForm,
10889
- defaultValue: []
10890
- });
10891
- const statusValues = Array.isArray(statusField.value) ? statusField.value : [];
10892
- const toggleStatus = statusCode => {
10893
- let newStatusValues;
10894
- if (statusValues.includes(statusCode)) {
10895
- newStatusValues = statusValues.filter(code => code !== statusCode);
10896
- } else {
10897
- newStatusValues = [...statusValues, statusCode];
10898
- }
10899
- statusField.onChange(newStatusValues);
10900
- if (typeof handleFilter === "function") {
10901
- handleFilter({
10902
- applicationStatus: newStatusValues.map(code => ({
10903
- code
10904
- }))
10905
- });
10906
- }
10907
- };
10908
- const cards = [...availableOptions.map(option => ({
10909
- key: option.code,
10910
- type: "assignee",
10911
- label: option.name,
10912
- subtitle: t("ES_INBOX_ASSIGNED"),
10913
- count: null,
10914
- code: option.code,
10915
- icon: "⌂"
10916
- })), ...(statuses || []).map(status => ({
10917
- key: status.applicationstatus,
10918
- type: "status",
10919
- label: t(status.applicationstatus),
10920
- subtitle: null,
10921
- count: status.totalCount ?? status.count ?? status.noOfRecords ?? status.totalRecords ?? status.applicationCount ?? 0,
10922
- code: status.applicationstatus,
10923
- icon: "◎"
10924
- }))];
10925
- const visibleCards = showAllStatuses ? cards : cards.slice(0, 6);
10926
- return /*#__PURE__*/React.createElement("div", {
10927
- className: "ndc-new-inbox-filter-card",
10928
- style: {
10929
- marginTop: 16,
10930
- marginBottom: 16
10931
- }
10932
- }, /*#__PURE__*/React.createElement(FilterFormField, null, /*#__PURE__*/React.createElement("div", {
10933
- className: "ndc-new-filter-status-wrapper"
10934
- }, /*#__PURE__*/React.createElement("div", {
10935
- className: "ndc-new-filter-status-grid ndc-new-filter-card-grid"
10936
- }, visibleCards.map((card, index) => {
10937
- const isActive = card.type === "assignee" ? assigneeField.value === card.code : statusValues.includes(card.code);
10938
- const variant = getVariantByIndex(index, getVariantFromCode(card.code));
10939
- return /*#__PURE__*/React.createElement("button", {
10940
- key: card.key,
10941
- type: "button",
10942
- className: `ndc-new-filter-status-card ndc-new-filter-option-card ndc-new-filter-card ${variant} ${isActive ? "active" : ""}`,
10943
- onClick: () => {
10944
- if (card.type === "assignee") {
10945
- assigneeField.onChange(card.code);
10946
- if (typeof handleFilter === "function") {
10947
- handleFilter({
10948
- assignee: card.code,
10949
- applicationStatus: statusValues.map(code => ({
10950
- code
10951
- }))
10952
- });
10953
- }
11028
+ defaultValue: [],
11029
+ render: props => {
11030
+ const toggleStatus = statusCode => {
11031
+ console.log(statusCode, "statusCode");
11032
+ if (props.value.includes(statusCode)) {
11033
+ props.onChange(props.value.filter(code => code !== statusCode));
10954
11034
  } else {
10955
- toggleStatus(card.code);
10956
- }
10957
- }
10958
- }, isActive ? /*#__PURE__*/React.createElement("span", {
10959
- className: "ndc-new-filter-card-check",
10960
- "aria-hidden": "true"
10961
- }, "\u2713") : null, /*#__PURE__*/React.createElement("div", {
10962
- className: "ndc-new-filter-status-title ndc-new-filter-option-title"
10963
- }, card.label), card.subtitle ? /*#__PURE__*/React.createElement("div", {
10964
- className: "ndc-new-filter-option-subtitle"
10965
- }, card.subtitle) : /*#__PURE__*/React.createElement("div", {
10966
- className: "ndc-new-filter-status-count"
10967
- }, card.count !== null && card.count !== undefined ? card.count : ""), /*#__PURE__*/React.createElement("span", {
10968
- className: "ndc-new-filter-card-icon",
10969
- "aria-hidden": "true"
10970
- }, /*#__PURE__*/React.createElement("span", null, card.icon)));
10971
- })), cards.length > 6 ? /*#__PURE__*/React.createElement("div", {
10972
- style: {
10973
- display: "flex",
10974
- justifyContent: "center",
10975
- marginTop: 8
11035
+ props.onChange([...props.value, statusCode]);
11036
+ }
11037
+ };
11038
+ return /*#__PURE__*/React.createElement(Fragment$1, null, statuses === null || statuses === void 0 ? void 0 : statuses.map((status, index) => /*#__PURE__*/React.createElement(CheckBox, {
11039
+ key: status.applicationstatus,
11040
+ label: `${t(status.applicationstatus)} - ${status.count}`,
11041
+ value: status.applicationstatus,
11042
+ checked: props.value.includes(status.applicationstatus),
11043
+ onChange: () => toggleStatus(status.applicationstatus),
11044
+ index: index
11045
+ })));
10976
11046
  }
10977
- }, /*#__PURE__*/React.createElement("button", {
10978
- type: "button",
10979
- className: "ndc-new-filter-show-more",
10980
- onClick: () => setShowAllStatuses(prev => !prev),
10981
- "aria-label": showAllStatuses ? t("ES_COMMON_SHOW_LESS") : t("ES_COMMON_SHOW_MORE")
10982
- }, /*#__PURE__*/React.createElement("span", {
10983
- className: "ndc-new-filter-show-more-icon",
10984
- "aria-hidden": "true"
10985
- }, showAllStatuses ? "▲" : "▼"))) : null)));
11047
+ })));
10986
11048
  };
10987
11049
 
10988
- const useNewInboxTableConfig = ({
11050
+ const useInboxTableConfig = ({
10989
11051
  parentRoute,
10990
11052
  onPageSizeChange,
10991
11053
  formState,
@@ -10998,87 +11060,33 @@ const useNewInboxTableConfig = ({
10998
11060
  const {
10999
11061
  t
11000
11062
  } = useTranslation();
11001
- const getStatusClass = status => {
11002
- const value = String(status || "").toLowerCase();
11003
- if (value.includes("approved")) return "approved";
11004
- if (value.includes("rejected")) return "rejected";
11005
- if (value.includes("forward")) return "forwarded";
11006
- if (value.includes("process")) return "in-progress";
11007
- if (value.includes("pending")) return "pending";
11008
- if (value.includes("new")) return "new";
11009
- return "default";
11010
- };
11011
- const renderStatusIcon = statusClass => {
11012
- switch (statusClass) {
11013
- case "approved":
11014
- return /*#__PURE__*/React.createElement("svg", {
11015
- viewBox: "0 0 24 24",
11016
- width: "14",
11017
- height: "14",
11018
- fill: "none",
11019
- stroke: "currentColor",
11020
- strokeWidth: "2"
11021
- }, /*#__PURE__*/React.createElement("path", {
11022
- d: "M20 6L9 17l-5-5"
11023
- }));
11024
- case "rejected":
11025
- return /*#__PURE__*/React.createElement("svg", {
11026
- viewBox: "0 0 24 24",
11027
- width: "14",
11028
- height: "14",
11029
- fill: "none",
11030
- stroke: "currentColor",
11031
- strokeWidth: "2"
11032
- }, /*#__PURE__*/React.createElement("path", {
11033
- d: "M18 6L6 18"
11034
- }), /*#__PURE__*/React.createElement("path", {
11035
- d: "M6 6l12 12"
11036
- }));
11037
- case "forwarded":
11038
- return /*#__PURE__*/React.createElement("svg", {
11039
- viewBox: "0 0 24 24",
11040
- width: "14",
11041
- height: "14",
11042
- fill: "none",
11043
- stroke: "currentColor",
11044
- strokeWidth: "2"
11045
- }, /*#__PURE__*/React.createElement("path", {
11046
- d: "M5 12h14"
11047
- }), /*#__PURE__*/React.createElement("path", {
11048
- d: "M13 5l7 7-7 7"
11049
- }));
11050
- default:
11051
- return null;
11052
- }
11053
- };
11063
+ const GetCell = value => /*#__PURE__*/React.createElement("span", {
11064
+ className: "cell-text styled-cell"
11065
+ }, value);
11054
11066
  const tableColumnConfig = useMemo(() => {
11055
11067
  return [{
11056
11068
  Header: t("NOC_HOME_SEARCH_RESULTS_APP_NO_LABEL"),
11057
- accessor: "applicationId",
11069
+ accessor: "uuid",
11058
11070
  disableSortBy: true,
11059
- className: "ndc-new-table-app",
11060
11071
  Cell: ({
11061
11072
  row
11062
11073
  }) => {
11063
- var _row$original, _row$original2, _row$original3, _row$original4, _row$original5;
11064
- return /*#__PURE__*/React.createElement("div", {
11065
- className: "ndc-new-cell-stack"
11066
- }, /*#__PURE__*/React.createElement(Link, {
11067
- to: `${parentRoute}/inbox/application-overview/${(_row$original = row.original) === null || _row$original === void 0 ? void 0 : _row$original.applicationId}`,
11068
- className: "ndc-new-app-link"
11069
- }, ((_row$original2 = row.original) === null || _row$original2 === void 0 ? void 0 : _row$original2.applicationId) || ((_row$original3 = row.original) === null || _row$original3 === void 0 ? void 0 : _row$original3.applicationNo) || "-"), (_row$original4 = row.original) !== null && _row$original4 !== void 0 && _row$original4.locality ? /*#__PURE__*/React.createElement("div", {
11070
- className: "ndc-new-cell-secondary"
11071
- }, (_row$original5 = row.original) === null || _row$original5 === void 0 ? void 0 : _row$original5.locality) : null);
11074
+ var _row$original, _row$original2;
11075
+ console.log("row", row);
11076
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Link, {
11077
+ to: `${parentRoute}/inbox/application-overview/${(_row$original = row.original) === null || _row$original === void 0 ? void 0 : _row$original.applicationId}`
11078
+ }, /*#__PURE__*/React.createElement("span", {
11079
+ className: "link"
11080
+ }, (_row$original2 = row.original) === null || _row$original2 === void 0 ? void 0 : _row$original2.applicationId)));
11072
11081
  }
11073
11082
  }, {
11074
11083
  Header: t("TL_COMMON_TABLE_COL_APP_DATE"),
11075
- accessor: "date",
11084
+ accessor: "createdtime",
11076
11085
  Cell: ({
11077
11086
  row
11078
11087
  }) => {
11079
- var _row$original6, _row$original7;
11080
- const dateValue = ((_row$original6 = row.original) === null || _row$original6 === void 0 ? void 0 : _row$original6.date) || ((_row$original7 = row.original) === null || _row$original7 === void 0 ? void 0 : _row$original7.createdTime);
11081
- return dateValue ? format(new Date(dateValue), "dd/MM/yyyy") : "-";
11088
+ var _row$original3, _row$original4;
11089
+ return (_row$original3 = row.original) !== null && _row$original3 !== void 0 && _row$original3.date ? GetCell(format(new Date((_row$original4 = row.original) === null || _row$original4 === void 0 ? void 0 : _row$original4.date), "dd/MM/yyyy")) : "";
11082
11090
  }
11083
11091
  }, {
11084
11092
  Header: t("PT_COMMON_TABLE_COL_STATUS_LABEL"),
@@ -11086,56 +11094,18 @@ const useNewInboxTableConfig = ({
11086
11094
  Cell: ({
11087
11095
  row
11088
11096
  }) => {
11089
- var _row$original8, _row$original9;
11090
- const statusValue = ((_row$original8 = row.original) === null || _row$original8 === void 0 ? void 0 : _row$original8.status) || ((_row$original9 = row.original) === null || _row$original9 === void 0 ? void 0 : _row$original9.applicationStatus) || "-";
11091
- const statusClass = getStatusClass(statusValue);
11092
- return /*#__PURE__*/React.createElement("span", {
11093
- className: `ndc-new-status-pill ${statusClass}`
11094
- }, renderStatusIcon(statusClass), /*#__PURE__*/React.createElement("span", null, String(statusValue || "-").toLowerCase()));
11095
- }
11096
- }, {
11097
- Header: t("CS_COMMON_ACTION"),
11098
- accessor: "action",
11099
- disableSortBy: true,
11100
- className: "ndc-new-table-action",
11101
- Cell: ({
11102
- row
11103
- }) => {
11104
- var _row$original0;
11105
- return /*#__PURE__*/React.createElement("span", {
11106
- className: "ndc-new-action-group"
11107
- }, /*#__PURE__*/React.createElement(Link, {
11108
- to: `${parentRoute}/inbox/application-overview/${(_row$original0 = row.original) === null || _row$original0 === void 0 ? void 0 : _row$original0.applicationId}`,
11109
- className: "ndc-new-icon ndc-new-icon-link",
11110
- "aria-label": t("ES_COMMON_VIEW")
11111
- }, /*#__PURE__*/React.createElement("svg", {
11112
- viewBox: "0 0 24 24",
11113
- width: "18",
11114
- height: "18",
11115
- fill: "none",
11116
- stroke: "currentColor",
11117
- strokeWidth: "2"
11118
- }, /*#__PURE__*/React.createElement("path", {
11119
- d: "M1 12s4-7 11-7 11 7 11 7-4 7-11 7S1 12 1 12z"
11120
- }), /*#__PURE__*/React.createElement("circle", {
11121
- cx: "12",
11122
- cy: "12",
11123
- r: "3"
11124
- }))));
11097
+ var _row$original5;
11098
+ return t((_row$original5 = row.original) === null || _row$original5 === void 0 ? void 0 : _row$original5.status);
11125
11099
  }
11126
11100
  }];
11127
- }, [parentRoute, t]);
11101
+ });
11128
11102
  return {
11129
- getCellProps: () => ({
11130
- style: {
11131
- padding: "16px 20px",
11132
- fontSize: "14px"
11133
- }
11134
- }),
11135
- getRowProps: row => {
11136
- var _row$original1, _row$original10;
11103
+ getCellProps: cellInfo => {
11137
11104
  return {
11138
- className: `ndc-new-row ${getStatusClass((row === null || row === void 0 ? void 0 : (_row$original1 = row.original) === null || _row$original1 === void 0 ? void 0 : _row$original1.status) || (row === null || row === void 0 ? void 0 : (_row$original10 = row.original) === null || _row$original10 === void 0 ? void 0 : _row$original10.applicationStatus))}`
11105
+ style: {
11106
+ padding: "20px 18px",
11107
+ fontSize: "16px"
11108
+ }
11139
11109
  };
11140
11110
  },
11141
11111
  disableSort: false,
@@ -11190,7 +11160,7 @@ const useNewInboxTableConfig = ({
11190
11160
  };
11191
11161
  };
11192
11162
 
11193
- const useNewInboxMobileCardsData = ({
11163
+ const useInboxMobileCardsData = ({
11194
11164
  parentRoute,
11195
11165
  table
11196
11166
  }) => {
@@ -11240,37 +11210,33 @@ const useNewInboxMobileCardsData = ({
11240
11210
  };
11241
11211
  };
11242
11212
 
11243
- const NewNDCInbox = ({
11244
- parentRoute,
11245
- tableColumns
11213
+ const Inbox = ({
11214
+ parentRoute
11246
11215
  }) => {
11247
- var _formState$filterForm3, _formState$filterForm4, _formState$filterForm5, _formState$tableForm5, _formState$tableForm6, _formState$tableForm7, _formState$tableForm8, _formState$tableForm9, _formState$tableForm0, _formState$tableForm1;
11248
11216
  const {
11249
11217
  t
11250
11218
  } = useTranslation();
11251
11219
  const tenantId = window.localStorage.getItem("Employee.tenant-id");
11252
- const [activeStatusTab, setActiveStatusTab] = useState("ALL");
11253
- const [topBarSearch, setTopBarSearch] = useState("");
11254
- const businessServices = useMemo(() => businessServiceList(true) || [], []);
11255
- const searchFormDefaultValues = useMemo(() => ({}), []);
11256
- const filterFormDefaultValues = useMemo(() => ({
11220
+ const [getFilter, setFilter] = useState();
11221
+ const searchFormDefaultValues = {};
11222
+ const filterFormDefaultValues = {
11257
11223
  moduleName: "ndc-services",
11258
11224
  applicationStatus: [],
11259
11225
  businessService: null,
11260
11226
  locality: [],
11261
11227
  assignee: "ASSIGNED_TO_ALL",
11262
- businessServiceArray: businessServices
11263
- }), [businessServices]);
11264
- const tableOrderFormDefaultValues = useMemo(() => ({
11228
+ businessServiceArray: businessServiceList(true) || []
11229
+ };
11230
+ const tableOrderFormDefaultValues = {
11265
11231
  sortBy: "",
11266
11232
  limit: window.Digit.Utils.browser.isMobile() ? 50 : 10,
11267
11233
  offset: 0,
11268
11234
  sortOrder: "DESC"
11269
- }), []);
11235
+ };
11270
11236
  function formReducer(state, payload) {
11271
11237
  switch (payload.action) {
11272
11238
  case "mutateSearchForm":
11273
- Digit.SessionStorage.set("NDC.NEW_INBOX", {
11239
+ Digit.SessionStorage.set("NDC.INBOX", {
11274
11240
  ...state,
11275
11241
  searchForm: payload.data
11276
11242
  });
@@ -11279,7 +11245,7 @@ const NewNDCInbox = ({
11279
11245
  searchForm: payload.data
11280
11246
  };
11281
11247
  case "mutateFilterForm":
11282
- Digit.SessionStorage.set("NDC.NEW_INBOX", {
11248
+ Digit.SessionStorage.set("NDC.INBOX", {
11283
11249
  ...state,
11284
11250
  filterForm: payload.data
11285
11251
  });
@@ -11288,7 +11254,7 @@ const NewNDCInbox = ({
11288
11254
  filterForm: payload.data
11289
11255
  };
11290
11256
  case "mutateTableForm":
11291
- Digit.SessionStorage.set("NDC.NEW_INBOX", {
11257
+ Digit.SessionStorage.set("NDC.INBOX", {
11292
11258
  ...state,
11293
11259
  tableForm: payload.data
11294
11260
  });
@@ -11298,7 +11264,7 @@ const NewNDCInbox = ({
11298
11264
  };
11299
11265
  }
11300
11266
  }
11301
- const InboxObjectInSessionStorage = Digit.SessionStorage.get("NDC.NEW_INBOX");
11267
+ const InboxObjectInSessionStorage = Digit.SessionStorage.get("NDC.INBOX");
11302
11268
  const onSearchFormReset = setSearchFormValue => {
11303
11269
  setSearchFormValue("sourceRefId", null);
11304
11270
  setSearchFormValue("applicationNo", null);
@@ -11309,8 +11275,8 @@ const NewNDCInbox = ({
11309
11275
  });
11310
11276
  };
11311
11277
  const onFilterFormReset = setFilterFormValue => {
11312
- setFilterFormValue("moduleName", "ndc-services");
11313
- setFilterFormValue("applicationStatus", []);
11278
+ setFilterFormValue("moduleName", "bpa-services");
11279
+ setFilterFormValue("applicationStatus", "");
11314
11280
  setFilterFormValue("locality", []);
11315
11281
  setFilterFormValue("assignee", "ASSIGNED_TO_ALL");
11316
11282
  setFilterFormValue("applicationType", []);
@@ -11343,26 +11309,6 @@ const NewNDCInbox = ({
11343
11309
  }
11344
11310
  });
11345
11311
  };
11346
- const onNextPage = () => {
11347
- var _formState$tableForm, _formState$tableForm2;
11348
- return dispatch({
11349
- action: "mutateTableForm",
11350
- data: {
11351
- ...formState.tableForm,
11352
- offset: parseInt((_formState$tableForm = formState.tableForm) === null || _formState$tableForm === void 0 ? void 0 : _formState$tableForm.offset) + parseInt((_formState$tableForm2 = formState.tableForm) === null || _formState$tableForm2 === void 0 ? void 0 : _formState$tableForm2.limit)
11353
- }
11354
- });
11355
- };
11356
- const onPrevPage = () => {
11357
- var _formState$tableForm3, _formState$tableForm4;
11358
- return dispatch({
11359
- action: "mutateTableForm",
11360
- data: {
11361
- ...formState.tableForm,
11362
- offset: parseInt((_formState$tableForm3 = formState.tableForm) === null || _formState$tableForm3 === void 0 ? void 0 : _formState$tableForm3.offset) - parseInt((_formState$tableForm4 = formState.tableForm) === null || _formState$tableForm4 === void 0 ? void 0 : _formState$tableForm4.limit)
11363
- }
11364
- });
11365
- };
11366
11312
  const onSortingByData = e => {
11367
11313
  if (e.length > 0) {
11368
11314
  const [{
@@ -11399,54 +11345,17 @@ const NewNDCInbox = ({
11399
11345
  data: localitiesForEmployeesCurrentTenant,
11400
11346
  isLoading: loadingLocalitiesForEmployeesCurrentTenant
11401
11347
  } = Digit.Hooks.useBoundaryLocalities(tenantId, "revenue", {}, t);
11402
- const {
11403
- register: registerFilterFormField,
11404
- control: controlFilterForm,
11405
- handleSubmit: handleFilterFormSubmit,
11406
- setValue: setFilterFormValue,
11407
- getValues: getFilterFormValue,
11408
- reset: resetFilterForm
11409
- } = useForm({
11410
- defaultValues: {
11411
- ...filterFormDefaultValues
11412
- }
11413
- });
11414
- const handleFilter = useCallback(filterData => {
11415
- var _filterData$applicati, _formState$filterForm, _formState$filterForm2;
11416
- if (filterData.applicationStatus) {
11417
- setFilterFormValue("applicationStatus", filterData.applicationStatus.map(item => item.code || item));
11418
- }
11419
- if (filterData.assignee) {
11420
- setFilterFormValue("assignee", filterData.assignee);
11421
- }
11422
- dispatch({
11423
- action: "mutateFilterForm",
11424
- data: {
11425
- ...(formState === null || formState === void 0 ? void 0 : formState.filterForm),
11426
- applicationStatus: ((_filterData$applicati = filterData.applicationStatus) === null || _filterData$applicati === void 0 ? void 0 : _filterData$applicati.map(item => item.code || item)) || (formState === null || formState === void 0 ? void 0 : (_formState$filterForm = formState.filterForm) === null || _formState$filterForm === void 0 ? void 0 : _formState$filterForm.applicationStatus) || [],
11427
- assignee: filterData.assignee || (formState === null || formState === void 0 ? void 0 : (_formState$filterForm2 = formState.filterForm) === null || _formState$filterForm2 === void 0 ? void 0 : _formState$filterForm2.assignee) || "ASSIGNED_TO_ALL"
11428
- }
11429
- });
11430
- }, [formState === null || formState === void 0 ? void 0 : formState.filterForm, setFilterFormValue]);
11431
- const prevFilterRef = useRef("");
11432
- const searchDebounceRef = useRef(null);
11433
- const hasInitializedFilterForm = useRef(false);
11434
- useEffect(() => {
11435
- if (formState !== null && formState !== void 0 && formState.filterForm) {
11436
- setFilterFormValue("assignee", formState.filterForm.assignee || "ASSIGNED_TO_ALL");
11437
- setFilterFormValue("applicationStatus", formState.filterForm.applicationStatus || []);
11438
- setFilterFormValue("moduleName", formState.filterForm.moduleName || "ndc-services");
11439
- }
11440
- }, [formState === null || formState === void 0 ? void 0 : (_formState$filterForm3 = formState.filterForm) === null || _formState$filterForm3 === void 0 ? void 0 : _formState$filterForm3.assignee, formState === null || formState === void 0 ? void 0 : (_formState$filterForm4 = formState.filterForm) === null || _formState$filterForm4 === void 0 ? void 0 : _formState$filterForm4.applicationStatus, formState === null || formState === void 0 ? void 0 : (_formState$filterForm5 = formState.filterForm) === null || _formState$filterForm5 === void 0 ? void 0 : _formState$filterForm5.moduleName, setFilterFormValue]);
11348
+ const handleFilter = filterStatus => {
11349
+ setFilter(filterStatus);
11350
+ };
11441
11351
  const {
11442
11352
  isLoading: isInboxLoading,
11443
11353
  data
11444
11354
  } = Digit.Hooks.ndc.useInbox({
11445
11355
  tenantId,
11446
11356
  filters: {
11447
- filterForm: (formState === null || formState === void 0 ? void 0 : formState.filterForm) || filterFormDefaultValues,
11448
- searchForm: (formState === null || formState === void 0 ? void 0 : formState.searchForm) || searchFormDefaultValues,
11449
- tableForm: (formState === null || formState === void 0 ? void 0 : formState.tableForm) || tableOrderFormDefaultValues
11357
+ ...formState,
11358
+ getFilter
11450
11359
  }
11451
11360
  });
11452
11361
  const [table, setTable] = useState([]);
@@ -11472,7 +11381,7 @@ const NewNDCInbox = ({
11472
11381
  registerRef,
11473
11382
  searchFormState,
11474
11383
  searchFieldComponents
11475
- }) => /*#__PURE__*/React.createElement(NewSearchFormFieldsComponent, {
11384
+ }) => /*#__PURE__*/React.createElement(SearchFormFieldsComponents, {
11476
11385
  registerRef,
11477
11386
  searchFormState,
11478
11387
  searchFieldComponents
@@ -11482,7 +11391,7 @@ const NewNDCInbox = ({
11482
11391
  controlFilterForm,
11483
11392
  setFilterFormValue,
11484
11393
  getFilterFormValue
11485
- }) => /*#__PURE__*/React.createElement(NewFilterFormFieldsComponent, Object.assign({}, {
11394
+ }) => /*#__PURE__*/React.createElement(FilterFormFieldsComponent, Object.assign({}, {
11486
11395
  statuses,
11487
11396
  isInboxLoading,
11488
11397
  registerRef,
@@ -11535,7 +11444,7 @@ const NewNDCInbox = ({
11535
11444
  resetFilterFormDefaultValues: filterFormDefaultValues,
11536
11445
  onFilterFormReset
11537
11446
  };
11538
- const propsForInboxTable = useNewInboxTableConfig({
11447
+ const propsForInboxTable = useInboxTableConfig({
11539
11448
  ...{
11540
11449
  parentRoute,
11541
11450
  onPageSizeChange,
@@ -11546,7 +11455,7 @@ const NewNDCInbox = ({
11546
11455
  onSortingByData
11547
11456
  }
11548
11457
  });
11549
- const propsForInboxMobileCards = useNewInboxMobileCardsData({
11458
+ const propsForInboxMobileCards = useInboxMobileCardsData({
11550
11459
  parentRoute,
11551
11460
  table
11552
11461
  });
@@ -11555,689 +11464,18 @@ const NewNDCInbox = ({
11555
11464
  sortFormDefaultValues: formState === null || formState === void 0 ? void 0 : formState.tableForm,
11556
11465
  onSortFormReset
11557
11466
  };
11558
- const resolvedTableColumns = tableColumns || (propsForInboxTable === null || propsForInboxTable === void 0 ? void 0 : propsForInboxTable.columns);
11559
- useEffect(() => {
11560
- const serialized = JSON.stringify((formState === null || formState === void 0 ? void 0 : formState.filterForm) || {});
11561
- if (prevFilterRef.current === serialized) return;
11562
- prevFilterRef.current = serialized;
11563
- }, [formState]);
11564
- useEffect(() => {
11565
- if (searchDebounceRef.current) clearTimeout(searchDebounceRef.current);
11566
- searchDebounceRef.current = setTimeout(() => {
11567
- const value = String(topBarSearch || "").trim();
11568
- const nextSearchForm = value ? {
11569
- applicationNo: value
11570
- } : {};
11571
- dispatch({
11572
- action: "mutateTableForm",
11573
- data: {
11574
- ...tableOrderFormDefaultValues
11575
- }
11576
- });
11577
- dispatch({
11578
- action: "mutateSearchForm",
11579
- data: nextSearchForm
11580
- });
11581
- }, 400);
11582
- return () => clearTimeout(searchDebounceRef.current);
11583
- }, [topBarSearch, tableOrderFormDefaultValues]);
11584
- const onResetFilterForm = () => {
11585
- onFilterFormReset(setFilterFormValue);
11586
- };
11587
- const normalizeStatus = useCallback(value => String(value || "").replace(/[\s-_]+/g, "").toUpperCase(), []);
11588
- const onStatusTabClick = useCallback((label, statusCode) => {
11589
- setActiveStatusTab(statusCode || label);
11590
- if (label === "CLEAR") {
11591
- setTopBarSearch("");
11592
- return;
11593
- }
11594
- if (label === "ALL") {
11595
- setFilterFormValue("applicationStatus", [], {
11596
- shouldDirty: true,
11597
- shouldTouch: true
11598
- });
11599
- handleFilterFormSubmit(onFilterFormSubmit)();
11600
- return;
11601
- }
11602
- const resolvedCode = statusCode || label;
11603
- setFilterFormValue("applicationStatus", [resolvedCode], {
11604
- shouldDirty: true,
11605
- shouldTouch: true
11606
- });
11607
- handleFilterFormSubmit(onFilterFormSubmit)();
11608
- }, [handleFilterFormSubmit, onFilterFormSubmit, setFilterFormValue]);
11609
- useEffect(() => {
11610
- if (hasInitializedFilterForm.current) return;
11611
- if (resetFilterForm && formState) {
11612
- resetFilterForm(formState === null || formState === void 0 ? void 0 : formState.filterForm);
11613
- hasInitializedFilterForm.current = true;
11614
- }
11615
- }, [formState, resetFilterForm]);
11616
- const isMobile = window.Digit.Utils.browser.isMobile();
11617
- if (isMobile) {
11618
- return /*#__PURE__*/React.createElement("div", {
11619
- className: "ndc-new-inbox"
11620
- }, /*#__PURE__*/React.createElement(InboxComposer, _extends({
11621
- isInboxLoading,
11622
- PropsForInboxLinks
11623
- }, propsForSearchForm, propsForFilterForm, propsForMobileSortForm, {
11624
- propsForInboxTable,
11625
- propsForInboxMobileCards,
11626
- formState
11627
- })));
11628
- }
11629
- return /*#__PURE__*/React.createElement("div", {
11630
- className: "ndc-new-inbox"
11631
- }, /*#__PURE__*/React.createElement("style", null, `
11632
- .ndc-new-inbox {
11633
- margin-top: 32px;
11634
- padding: 20px;
11635
- background: #f8fafc;
11636
- border-radius: 12px;
11637
- }
11638
- .ndc-new-inbox .ndc-new-header {
11639
- display: flex;
11640
- align-items: center;
11641
- gap: 10px;
11642
- font-size: 24px;
11643
- font-weight: 700;
11644
- margin-bottom: 12px;
11645
- }
11646
- .ndc-new-inbox .ndc-new-count-pill {
11647
- display: inline-flex;
11648
- align-items: center;
11649
- justify-content: center;
11650
- min-width: 28px;
11651
- height: 28px;
11652
- padding: 0 8px;
11653
- border-radius: 999px;
11654
- background: #2563eb;
11655
- color: #ffffff;
11656
- font-size: 12px;
11657
- font-weight: 700;
11658
- }
11659
-
11660
- .ndc-new-inbox .ndc-new-filter-card-grid {
11661
- display: grid;
11662
- grid-template-columns: repeat(6, 1fr);
11663
- gap: 14px;
11664
- }
11665
- .ndc-new-inbox .ndc-new-filter-option-card {
11666
- background: #f8fafc;
11667
- border: 1px solid #e5e7eb;
11668
- border-radius: 12px;
11669
- padding: 16px;
11670
- min-height: 88px;
11671
- text-align: left;
11672
- cursor: pointer;
11673
- transition: all 0.2s ease;
11674
- position: relative;
11675
- overflow: hidden;
11676
- }
11677
- .ndc-new-inbox .ndc-new-filter-option-card.active {
11678
- background: #e0f2fe;
11679
- border-color: #38bdf8;
11680
- box-shadow: 0 4px 12px rgba(2, 132, 199, 0.18);
11681
- }
11682
- .ndc-new-inbox .ndc-new-filter-option-title {
11683
- font-weight: 700;
11684
- font-size: 14px;
11685
- }
11686
- .ndc-new-inbox .ndc-new-filter-option-subtitle {
11687
- font-size: 12px;
11688
- margin-top: 6px;
11689
- color: white;
11690
- }
11691
- .ndc-new-inbox .ndc-new-filter-status-grid {
11692
- display: grid;
11693
- grid-template-columns: repeat(6, 1fr);
11694
- gap: 14px;
11695
- }
11696
- .ndc-new-inbox .ndc-new-filter-status-card {
11697
- background: #ffffff;
11698
- border: 1px solid #e5e7eb;
11699
- border-radius: 12px;
11700
- padding: 16px;
11701
- min-height: 88px;
11702
- text-align: left;
11703
- cursor: pointer;
11704
- transition: all 0.2s ease;
11705
- width: 100%;
11706
- box-sizing: border-box;
11707
- position: relative;
11708
- overflow: hidden;
11709
- }
11710
- .ndc-new-inbox .ndc-new-filter-status-card.active {
11711
- background: #e0f2fe;
11712
- border-color: #38bdf8;
11713
- box-shadow: 0 4px 12px rgba(2, 132, 199, 0.18);
11714
- }
11715
- .ndc-new-inbox .ndc-new-filter-status-title {
11716
- font-weight: 700;
11717
- font-size: 14px;
11718
- }
11719
- .ndc-new-inbox .ndc-new-filter-status-count {
11720
- font-size: 22px;
11721
- font-weight: 700;
11722
- margin-top: 8px;
11723
- color: inherit;
11724
- }
11725
- .ndc-new-inbox .ndc-new-filter-card-icon {
11726
- position: absolute;
11727
- top: 12px;
11728
- right: 12px;
11729
- width: 36px;
11730
- height: 36px;
11731
- border-radius: 999px;
11732
- background: rgba(255, 255, 255, 0.2);
11733
- display: inline-flex;
11734
- align-items: center;
11735
- justify-content: center;
11736
- color: #ffffff;
11737
- font-size: 16px;
11738
- }
11739
- .ndc-new-inbox .ndc-new-filter-card-check {
11740
- position: absolute;
11741
- top: 10px;
11742
- left: 12px;
11743
- width: 22px;
11744
- height: 22px;
11745
- border-radius: 999px;
11746
- display: inline-flex;
11747
- align-items: center;
11748
- justify-content: center;
11749
- font-size: 12px;
11750
- font-weight: 700;
11751
- background: rgba(255, 255, 255, 0.9);
11752
- color: #111827;
11753
- box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
11754
- }
11755
- .ndc-new-inbox .ndc-new-filter-card {
11756
- color: #ffffff;
11757
- border-color: transparent;
11758
- }
11759
- .ndc-new-inbox .ndc-new-filter-card.primary {
11760
- background: #2563eb;
11761
- }
11762
- .ndc-new-inbox .ndc-new-filter-card.success {
11763
- background: #16a34a;
11764
- }
11765
- .ndc-new-inbox .ndc-new-filter-card.warning {
11766
- background: #ea580c;
11767
- }
11768
- .ndc-new-inbox .ndc-new-filter-card.info {
11769
- background: #7c3aed;
11770
- }
11771
- .ndc-new-inbox .ndc-new-filter-card.danger {
11772
- background: #dc2626;
11773
- }
11774
- .ndc-new-inbox .ndc-new-filter-card.indigo {
11775
- background: #4f46e5;
11776
- }
11777
- .ndc-new-inbox .ndc-new-filter-card.teal {
11778
- background: #0f766e;
11779
- }
11780
- .ndc-new-inbox .ndc-new-filter-card.pink {
11781
- background: #db2777;
11782
- }
11783
- .ndc-new-inbox .ndc-new-filter-card.amber {
11784
- background: #d97706;
11785
- }
11786
- .ndc-new-inbox .ndc-new-filter-card.slate {
11787
- background: #475569;
11788
- }
11789
- .ndc-new-inbox .ndc-new-filter-card.active {
11790
- box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
11791
- transform: translateY(-1px);
11792
- }
11793
- .ndc-new-inbox .ndc-new-filter-show-more {
11794
- margin-top: 12px;
11795
- cursor: pointer;
11796
- font-weight: 600;
11797
- font-size: 12px;
11798
- color: #2563eb;
11799
- display: inline-flex;
11800
- align-items: center;
11801
- gap: 6px;
11802
- transition: all 0.2s ease;
11803
- }
11804
- .ndc-new-inbox .ndc-new-filter-show-more-icon {
11805
- width: 28px;
11806
- height: 28px;
11807
- border-radius: 999px;
11808
- display: inline-flex;
11809
- align-items: center;
11810
- justify-content: center;
11811
- font-size: 12px;
11812
- color: #457fff;
11813
- background: #eff6ff;
11814
- }
11815
- .ndc-new-inbox .ndc-new-filter-show-more:hover {
11816
- background: #eff6ff;
11817
- border-color: #bfdbfe;
11818
- }
11819
- .ndc-new-inbox .ndc-new-layout {
11820
- display: block;
11821
- }
11822
- .ndc-new-inbox .filter-card .heading {
11823
- display: none;
11824
- }
11825
- .ndc-new-inbox .filter-card .submit-bar,
11826
- .ndc-new-inbox .filter-card button[type="submit"] {
11827
- display: none;
11828
- }
11829
- .ndc-new-inbox .ndc-new-top-filters {
11830
- margin: 12px 0 16px;
11831
- background: #ffffff;
11832
- border: 1px solid #e2e8f0;
11833
- border-radius: 16px;
11834
- padding: 18px;
11835
- box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
11836
- }
11837
- .ndc-new-inbox .ndc-new-inbox-filter-card {
11838
- margin: 0;
11839
- }
11840
- .ndc-new-inbox .ndc-new-filter-card-grid {
11841
- grid-template-columns: repeat(6, 1fr);
11842
- }
11843
- .ndc-new-inbox .ndc-new-filter-status-grid {
11844
- grid-template-columns: repeat(6, 1fr);
11845
- }
11846
- @media (max-width: 1400px) {
11847
- .ndc-new-inbox .ndc-new-filter-card-grid,
11848
- .ndc-new-inbox .ndc-new-filter-status-grid {
11849
- grid-template-columns: repeat(4, minmax(140px, 1fr));
11850
- }
11851
- }
11852
- @media (max-width: 1100px) {
11853
- .ndc-new-inbox .ndc-new-filter-card-grid,
11854
- .ndc-new-inbox .ndc-new-filter-status-grid {
11855
- grid-template-columns: repeat(3, minmax(140px, 1fr));
11856
- }
11857
- }
11858
- @media (max-width: 900px) {
11859
- .ndc-new-inbox .ndc-new-filter-card-grid,
11860
- .ndc-new-inbox .ndc-new-filter-status-grid {
11861
- grid-template-columns: repeat(2, minmax(140px, 1fr));
11862
- }
11863
- }
11864
- @media (max-width: 640px) {
11865
- .ndc-new-inbox .ndc-new-filter-card-grid,
11866
- .ndc-new-inbox .ndc-new-filter-status-grid {
11867
- grid-template-columns: 1fr;
11868
- }
11869
- }
11870
- .ndc-new-inbox .ndc-new-table-card {
11871
- margin-top: 16px;
11872
- background: #ffffff;
11873
- border: 1px solid #e2e8f0;
11874
- border-radius: 16px;
11875
- box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
11876
- overflow: hidden;
11877
- }
11878
- .ndc-new-inbox .ndc-new-table-topbar {
11879
- display: flex;
11880
- align-items: center;
11881
- justify-content: space-between;
11882
- gap: 16px;
11883
- padding: 16px;
11884
- border-radius: 16px;
11885
- border: 1px solid #e2e8f0;
11886
- background: #ffffff;
11887
- box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
11888
- }
11889
- .ndc-new-inbox .ndc-new-tabs {
11890
- display: flex;
11891
- gap: 8px;
11892
- flex-wrap: nowrap;
11893
- overflow-x: auto;
11894
- max-width: calc(100% - 280px);
11895
- padding-bottom: 4px;
11896
- scrollbar-width: none;
11897
- }
11898
- .ndc-new-inbox .ndc-new-tabs::-webkit-scrollbar {
11899
- width: 0;
11900
- height: 0;
11901
- }
11902
- .ndc-new-inbox .ndc-new-tab {
11903
- padding: 6px 10px;
11904
- border-radius: 999px;
11905
- border: 1px solid #e5e7eb;
11906
- background: #f8fafc;
11907
- font-weight: 600;
11908
- font-size: 11px;
11909
- cursor: pointer;
11910
- white-space: nowrap;
11911
- }
11912
- .ndc-new-inbox .ndc-new-tab.active {
11913
- background: #2563eb;
11914
- color: #ffffff;
11915
- border-color: #2563eb;
11916
- box-shadow: 0 6px 14px rgba(37, 99, 235, 0.25);
11917
- }
11918
- .ndc-new-inbox .ndc-new-search {
11919
- display: flex;
11920
- align-items: center;
11921
- gap: 8px;
11922
- padding: 10px 14px;
11923
- border: 1px solid #e2e8f0;
11924
- border-radius: 10px;
11925
- min-width: 260px;
11926
- background: #f8fafc;
11927
- color: #6b7280;
11928
- font-size: 12px;
11929
- }
11930
- .ndc-new-inbox .ndc-new-search input {
11931
- border: none;
11932
- outline: none;
11933
- background: transparent;
11934
- width: 100%;
11935
- font-size: 12px;
11936
- color: #111827;
11937
- }
11938
- .ndc-new-inbox .ndc-new-table-header {
11939
- padding: 18px 20px;
11940
- font-size: 18px;
11941
- font-weight: 700;
11942
- border-bottom: 1px solid #e2e8f0;
11943
- }
11944
- .ndc-new-inbox .ndc-new-table-wrapper {
11945
- display: block;
11946
- overflow-x: auto;
11947
- }
11948
- .ndc-new-inbox .ndc-new-table {
11949
- width: 100%;
11950
- border-collapse: collapse;
11951
- }
11952
- .ndc-new-inbox .ndc-new-table th {
11953
- text-align: left;
11954
- font-size: 12px;
11955
- letter-spacing: 0.08em;
11956
- color: #6b7280;
11957
- padding: 14px 20px;
11958
- background: #f8fafc;
11959
- border-bottom: 1px solid #e2e8f0;
11960
- }
11961
- .ndc-new-inbox .ndc-new-table td {
11962
- padding: 16px 20px;
11963
- border-bottom: 1px solid #eef2f7;
11964
- font-size: 14px;
11965
- color: #334155;
11966
- }
11967
- .ndc-new-inbox .ndc-new-cell-stack {
11968
- display: flex;
11969
- flex-direction: column;
11970
- gap: 4px;
11971
- }
11972
- .ndc-new-inbox .ndc-new-cell-primary {
11973
- font-weight: 600;
11974
- color: #111827;
11975
- }
11976
- .ndc-new-inbox .ndc-new-cell-secondary {
11977
- font-size: 12px;
11978
- color: #64748b;
11979
- }
11980
- .ndc-new-inbox .ndc-new-row.pending {
11981
- background: #fff7ed;
11982
- }
11983
- .ndc-new-inbox .ndc-new-row.rejected {
11984
- background: #fef2f2;
11985
- }
11986
- .ndc-new-inbox .ndc-new-row.approved {
11987
- background: #f0fdf4;
11988
- }
11989
- .ndc-new-inbox .ndc-new-table-app {
11990
- font-weight: 600;
11991
- color: #111827;
11992
- }
11993
- .ndc-new-inbox .ndc-new-table-action {
11994
- text-align: left;
11995
- white-space: nowrap;
11996
- }
11997
- .ndc-new-inbox .ndc-new-status-pill {
11998
- display: inline-flex;
11999
- align-items: center;
12000
- gap: 6px;
12001
- padding: 4px 10px;
12002
- border-radius: 999px;
12003
- font-size: 12px;
12004
- font-weight: 600;
12005
- background: #e2e8f0;
12006
- color: #111827;
12007
- border: 1px solid transparent;
12008
- }
12009
- .ndc-new-inbox .ndc-new-status-pill.approved {
12010
- background: #f0fdf4;
12011
- color: #15803d;
12012
- border-color: #86efac;
12013
- }
12014
- .ndc-new-inbox .ndc-new-status-pill.rejected {
12015
- background: #fef2f2;
12016
- color: #b91c1c;
12017
- border-color: #fecaca;
12018
- }
12019
- .ndc-new-inbox .ndc-new-status-pill.forwarded {
12020
- background: #eff6ff;
12021
- color: #1d4ed8;
12022
- border-color: #bfdbfe;
12023
- }
12024
- .ndc-new-inbox .ndc-new-status-pill.in-progress {
12025
- background: #dbeafe;
12026
- color: #1d4ed8;
12027
- }
12028
- .ndc-new-inbox .ndc-new-status-pill.pending {
12029
- background: #ffedd5;
12030
- color: #c2410c;
12031
- }
12032
- .ndc-new-inbox .ndc-new-status-pill.new {
12033
- background: #f3f4f6;
12034
- color: #111827;
12035
- }
12036
- .ndc-new-inbox .ndc-new-icon {
12037
- display: inline-flex;
12038
- align-items: center;
12039
- justify-content: center;
12040
- width: 28px;
12041
- height: 28px;
12042
- margin-left: 8px;
12043
- border-radius: 50%;
12044
- border: 1px solid #e5e7eb;
12045
- color: #94a3b8;
12046
- }
12047
- .ndc-new-inbox .ndc-new-action-group {
12048
- display: inline-flex;
12049
- align-items: center;
12050
- gap: 8px;
12051
- }
12052
- .ndc-new-inbox .ndc-new-icon-link {
12053
- text-decoration: none;
12054
- }
12055
- .ndc-new-inbox .ndc-new-app-link {
12056
- color: #2563eb;
12057
- text-decoration: none;
12058
- }
12059
- .ndc-new-inbox .ndc-new-app-link:hover {
12060
- text-decoration: underline;
12061
- }
12062
- .ndc-new-inbox .ndc-new-pagination {
12063
- display: flex;
12064
- align-items: center;
12065
- justify-content: flex-end;
12066
- gap: 12px;
12067
- padding: 12px 20px 18px;
12068
- border-top: 1px solid #eef2f7;
12069
- font-size: 12px;
12070
- color: #6b7280;
12071
- }
12072
- .ndc-new-inbox .ndc-new-pagination button {
12073
- border: 1px solid #e5e7eb;
12074
- background: #ffffff;
12075
- border-radius: 8px;
12076
- padding: 4px 8px;
12077
- cursor: pointer;
12078
- }
12079
- .ndc-new-inbox .ndc-new-pagination button:disabled {
12080
- opacity: 0.5;
12081
- cursor: not-allowed;
12082
- }
12083
- .ndc-new-inbox .ndc-new-pagination select {
12084
- border: 1px solid #e5e7eb;
12085
- border-radius: 8px;
12086
- padding: 4px 8px;
12087
- background: #ffffff;
12088
- }
12089
- @media (max-width: 768px) {
12090
- .ndc-new-inbox .ndc-new-top-filters {
12091
- padding: 0;
12092
- }
12093
- .ndc-new-inbox .ndc-new-table-topbar {
12094
- flex-wrap: wrap;
12095
- }
12096
- .ndc-new-inbox .ndc-new-tabs {
12097
- max-width: 100%;
12098
- overflow-x: visible;
12099
- flex-wrap: wrap;
12100
- }
12101
- .ndc-new-inbox .ndc-new-search {
12102
- width: 100%;
12103
- min-width: 0;
12104
- }
12105
- .ndc-new-inbox .ndc-new-table-header {
12106
- font-size: 16px;
12107
- padding: 14px 16px;
12108
- }
12109
- .ndc-new-inbox .ndc-new-table th,
12110
- .ndc-new-inbox .ndc-new-table td {
12111
- padding: 12px 14px;
12112
- font-size: 12px;
12113
- }
12114
- .ndc-new-inbox .ndc-new-status-pill {
12115
- font-size: 11px;
12116
- padding: 3px 8px;
12117
- }
12118
- }
12119
- .ndc-new-inbox .ndc-new-tab-count {
12120
- margin-left: 6px;
12121
- padding: 2px 6px;
12122
- border-radius: 999px;
12123
- background: #e2e8f0;
12124
- color: #475569;
12125
- font-size: 11px;
12126
- font-weight: 700;
12127
- }
12128
- .ndc-new-inbox .ndc-new-tab.active .ndc-new-tab-count {
12129
- background: rgba(255, 255, 255, 0.2);
12130
- color: #ffffff;
12131
- }
12132
- `), /*#__PURE__*/React.createElement("div", {
12133
- className: "ndc-new-header"
12134
- }, /*#__PURE__*/React.createElement("span", null, t("NDC Inbox")), totalCount ? /*#__PURE__*/React.createElement("span", {
12135
- className: "ndc-new-count-pill"
11467
+ return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(Header, null, t("ES_COMMON_INBOX"), totalCount ? /*#__PURE__*/React.createElement("p", {
11468
+ className: "inbox-count"
12136
11469
  }, totalCount) : null), /*#__PURE__*/React.createElement("div", {
12137
- className: "ndc-new-layout"
12138
- }, /*#__PURE__*/React.createElement("div", {
12139
- className: "ndc-new-top-filters"
12140
- }, /*#__PURE__*/React.createElement(FilterForm, {
12141
- onSubmit: onFilterFormSubmit,
12142
- handleSubmit: handleFilterFormSubmit,
12143
- id: "filter-form",
12144
- onResetFilterForm: onResetFilterForm
12145
- }, /*#__PURE__*/React.createElement(NewFilterFormFieldsComponent, Object.assign({
12146
- registerRef: registerFilterFormField
12147
- }, {
12148
- controlFilterForm,
12149
- handleFilterFormSubmit,
12150
- setFilterFormValue,
12151
- getFilterFormValue,
12152
- statuses
12153
- }, {
12154
- handleFilter: handleFilter
12155
- })))), /*#__PURE__*/React.createElement("div", {
12156
- className: "ndc-new-table-topbar"
12157
- }, /*#__PURE__*/React.createElement("div", {
12158
- className: "ndc-new-tabs"
12159
- }, /*#__PURE__*/React.createElement("button", {
12160
- type: "button",
12161
- className: `ndc-new-tab ${activeStatusTab === "ALL" ? "active" : ""}`,
12162
- onClick: () => onStatusTabClick("ALL")
12163
- }, t("ALL"), /*#__PURE__*/React.createElement("span", {
12164
- className: "ndc-new-tab-count"
12165
- }, totalCount || 0)), (statuses || []).map(status => /*#__PURE__*/React.createElement("button", {
12166
- key: status === null || status === void 0 ? void 0 : status.applicationstatus,
12167
- type: "button",
12168
- className: `ndc-new-tab ${activeStatusTab === (status === null || status === void 0 ? void 0 : status.applicationstatus) ? "active" : ""}`,
12169
- onClick: () => onStatusTabClick(status === null || status === void 0 ? void 0 : status.applicationstatus, status === null || status === void 0 ? void 0 : status.applicationstatus)
12170
- }, t(status === null || status === void 0 ? void 0 : status.applicationstatus), /*#__PURE__*/React.createElement("span", {
12171
- className: "ndc-new-tab-count"
12172
- }, (status === null || status === void 0 ? void 0 : status.count) ?? 0))), /*#__PURE__*/React.createElement("button", {
12173
- type: "button",
12174
- className: `ndc-new-tab ${activeStatusTab === "CLEAR" ? "active" : ""}`,
12175
- onClick: () => onStatusTabClick("CLEAR")
12176
- }, t("CLEAR"))), /*#__PURE__*/React.createElement("div", {
12177
- className: "ndc-new-search"
12178
- }, /*#__PURE__*/React.createElement("span", {
12179
- "aria-hidden": "true"
12180
- }, /*#__PURE__*/React.createElement("svg", {
12181
- width: "16",
12182
- height: "16",
12183
- viewBox: "0 0 24 24",
12184
- fill: "none",
12185
- xmlns: "http://www.w3.org/2000/svg"
12186
- }, /*#__PURE__*/React.createElement("circle", {
12187
- cx: "11",
12188
- cy: "11",
12189
- r: "7",
12190
- stroke: "#6B7280",
12191
- strokeWidth: "2"
12192
- }), /*#__PURE__*/React.createElement("line", {
12193
- x1: "16.65",
12194
- y1: "16.65",
12195
- x2: "21",
12196
- y2: "21",
12197
- stroke: "#6B7280",
12198
- strokeWidth: "2",
12199
- strokeLinecap: "round"
12200
- }))), /*#__PURE__*/React.createElement("input", {
12201
- type: "text",
12202
- value: topBarSearch,
12203
- onChange: e => setTopBarSearch(e.target.value),
12204
- placeholder: "Search by application no..."
12205
- }))), isInboxLoading ? /*#__PURE__*/React.createElement(Loader$1, null) : (table === null || table === void 0 ? void 0 : table.length) < 1 ? /*#__PURE__*/React.createElement(Card, {
12206
- className: "margin-unset text-align-center"
12207
- }, t("CS_MYAPPLICATIONS_NO_APPLICATION")) : /*#__PURE__*/React.createElement("div", {
12208
- className: "ndc-new-table-card"
12209
- }, /*#__PURE__*/React.createElement("div", {
12210
- className: "ndc-new-table-header"
12211
- }, t("Assigned Applications")), /*#__PURE__*/React.createElement(Table, Object.assign({
12212
- className: "ndc-new-table",
12213
- customTableWrapperClassName: "ndc-new-table-wrapper",
12214
- isPaginationRequired: false
12215
- }, propsForInboxTable, {
12216
- columns: resolvedTableColumns,
12217
- getRowProps: propsForInboxTable === null || propsForInboxTable === void 0 ? void 0 : propsForInboxTable.getRowProps
12218
- }))), totalCount > 0 ? /*#__PURE__*/React.createElement("div", {
12219
- className: "ndc-new-pagination"
12220
- }, t("CS_COMMON_ROWS_PER_PAGE"), ":", /*#__PURE__*/React.createElement("select", {
12221
- value: (_formState$tableForm5 = formState.tableForm) === null || _formState$tableForm5 === void 0 ? void 0 : _formState$tableForm5.limit,
12222
- onChange: onPageSizeChange
12223
- }, [10, 20, 30, 40, 50].map(pageSize => /*#__PURE__*/React.createElement("option", {
12224
- key: pageSize,
12225
- value: pageSize
12226
- }, pageSize))), /*#__PURE__*/React.createElement("span", null, ((_formState$tableForm6 = formState.tableForm) === null || _formState$tableForm6 === void 0 ? void 0 : _formState$tableForm6.offset) + 1, "-", Math.min(((_formState$tableForm7 = formState.tableForm) === null || _formState$tableForm7 === void 0 ? void 0 : _formState$tableForm7.offset) + ((_formState$tableForm8 = formState.tableForm) === null || _formState$tableForm8 === void 0 ? void 0 : _formState$tableForm8.limit), totalCount), " of ", totalCount), /*#__PURE__*/React.createElement("button", {
12227
- onClick: onPrevPage,
12228
- disabled: ((_formState$tableForm9 = formState.tableForm) === null || _formState$tableForm9 === void 0 ? void 0 : _formState$tableForm9.offset) <= 0
12229
- }, "\u2039"), /*#__PURE__*/React.createElement("button", {
12230
- onClick: onNextPage,
12231
- disabled: ((_formState$tableForm0 = formState.tableForm) === null || _formState$tableForm0 === void 0 ? void 0 : _formState$tableForm0.offset) + ((_formState$tableForm1 = formState.tableForm) === null || _formState$tableForm1 === void 0 ? void 0 : _formState$tableForm1.limit) >= totalCount
12232
- }, "\u203A")) : null));
12233
- };
12234
-
12235
- const Inbox = ({
12236
- parentRoute
12237
- }) => {
12238
- return /*#__PURE__*/React.createElement(NewNDCInbox, {
12239
- parentRoute: parentRoute
12240
- });
11470
+ className: "NDCSection"
11471
+ }, /*#__PURE__*/React.createElement(InboxComposer, _extends({
11472
+ isInboxLoading,
11473
+ PropsForInboxLinks
11474
+ }, propsForSearchForm, propsForFilterForm, propsForMobileSortForm, {
11475
+ propsForInboxTable,
11476
+ propsForInboxMobileCards,
11477
+ formState
11478
+ }))));
12241
11479
  };
12242
11480
 
12243
11481
  const SearchFormFieldsComponent = props => {
@@ -13260,28 +12498,26 @@ const NewNDCStepFormOne = ({
13260
12498
  } else createApplication(data);
13261
12499
  }
13262
12500
  const createApplication = async data => {
13263
- var _Digit$UserService$ge, _data$cpt, _data$cpt$details, _ref, _data$PropertyDetails5, _ref2, _data$PropertyDetails7, _data$PropertyDetails9, _data$PropertyDetails0, _data$NDCReason2;
12501
+ var _Digit$UserService$ge, _data$cpt, _data$cpt$details, _data$cpt2, _data$cpt2$details, _ref, _data$PropertyDetails5, _ref2, _data$PropertyDetails7, _data$PropertyDetails9, _data$PropertyDetails0, _data$NDCReason2;
13264
12502
  const applicant = ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info) || {};
13265
12503
  const applicantId = applicant === null || applicant === void 0 ? void 0 : applicant.uuid;
13266
- const owners = ((data === null || data === void 0 ? void 0 : (_data$cpt = data.cpt) === null || _data$cpt === void 0 ? void 0 : (_data$cpt$details = _data$cpt.details) === null || _data$cpt$details === void 0 ? void 0 : _data$cpt$details.owners) || []).map(({
13267
- status,
13268
- ...rest
13269
- }) => {
13270
- var _rest$name, _rest$name$trim, _data$PropertyDetails, _data$PropertyDetails2, _data$PropertyDetails3;
13271
- if ((rest === null || rest === void 0 ? void 0 : (_rest$name = rest.name) === null || _rest$name === void 0 ? void 0 : (_rest$name$trim = _rest$name.trim()) === null || _rest$name$trim === void 0 ? void 0 : _rest$name$trim.toLowerCase()) === (data === null || data === void 0 ? void 0 : (_data$PropertyDetails = data.PropertyDetails) === null || _data$PropertyDetails === void 0 ? void 0 : (_data$PropertyDetails2 = _data$PropertyDetails.firstName) === null || _data$PropertyDetails2 === void 0 ? void 0 : (_data$PropertyDetails3 = _data$PropertyDetails2.trim()) === null || _data$PropertyDetails3 === void 0 ? void 0 : _data$PropertyDetails3.toLowerCase())) {
12504
+ console.log("data?.cpt?.details?.owners", data === null || data === void 0 ? void 0 : (_data$cpt = data.cpt) === null || _data$cpt === void 0 ? void 0 : (_data$cpt$details = _data$cpt.details) === null || _data$cpt$details === void 0 ? void 0 : _data$cpt$details.owners);
12505
+ const owners = ((data === null || data === void 0 ? void 0 : (_data$cpt2 = data.cpt) === null || _data$cpt2 === void 0 ? void 0 : (_data$cpt2$details = _data$cpt2.details) === null || _data$cpt2$details === void 0 ? void 0 : _data$cpt2$details.owners) || []).map(owner => {
12506
+ var _newOwner$name, _newOwner$name$trim, _data$PropertyDetails, _data$PropertyDetails2, _data$PropertyDetails3;
12507
+ const newOwner = JSON.parse(JSON.stringify(owner));
12508
+ delete newOwner.status;
12509
+ if ((newOwner === null || newOwner === void 0 ? void 0 : (_newOwner$name = newOwner.name) === null || _newOwner$name === void 0 ? void 0 : (_newOwner$name$trim = _newOwner$name.trim()) === null || _newOwner$name$trim === void 0 ? void 0 : _newOwner$name$trim.toLowerCase()) === (data === null || data === void 0 ? void 0 : (_data$PropertyDetails = data.PropertyDetails) === null || _data$PropertyDetails === void 0 ? void 0 : (_data$PropertyDetails2 = _data$PropertyDetails.firstName) === null || _data$PropertyDetails2 === void 0 ? void 0 : (_data$PropertyDetails3 = _data$PropertyDetails2.trim()) === null || _data$PropertyDetails3 === void 0 ? void 0 : _data$PropertyDetails3.toLowerCase())) {
13272
12510
  var _data$PropertyDetails4;
13273
- return {
13274
- ...rest,
13275
- emailId: data === null || data === void 0 ? void 0 : (_data$PropertyDetails4 = data.PropertyDetails) === null || _data$PropertyDetails4 === void 0 ? void 0 : _data$PropertyDetails4.email,
13276
- isPrimaryOwner: true
13277
- };
12511
+ newOwner.emailId = data === null || data === void 0 ? void 0 : (_data$PropertyDetails4 = data.PropertyDetails) === null || _data$PropertyDetails4 === void 0 ? void 0 : _data$PropertyDetails4.email;
12512
+ newOwner.isPrimaryOwner = true;
13278
12513
  }
13279
- return rest;
12514
+ return newOwner;
13280
12515
  });
12516
+ console.log("owners??==", owners);
13281
12517
  console.log("checkData==", data);
13282
12518
  const ndcDetails = [];
13283
12519
  (_ref = (data === null || data === void 0 ? void 0 : (_data$PropertyDetails5 = data.PropertyDetails) === null || _data$PropertyDetails5 === void 0 ? void 0 : _data$PropertyDetails5.waterConnection) || []) === null || _ref === void 0 ? void 0 : _ref.forEach(wc => {
13284
- var _wc$billData, _data$PropertyDetails6, _data$cpt2, _data$cpt2$details, _wc$billData2, _wc$billData3;
12520
+ var _wc$billData, _data$PropertyDetails6, _data$cpt3, _data$cpt3$details, _wc$billData2, _wc$billData3;
13285
12521
  ndcDetails.push({
13286
12522
  uuid: wc === null || wc === void 0 ? void 0 : (_wc$billData = wc.billData) === null || _wc$billData === void 0 ? void 0 : _wc$billData.id,
13287
12523
  applicantId: applicantId,
@@ -13289,14 +12525,14 @@ const NewNDCStepFormOne = ({
13289
12525
  consumerCode: wc === null || wc === void 0 ? void 0 : wc.connectionNo,
13290
12526
  additionalDetails: {
13291
12527
  propertyAddress: data === null || data === void 0 ? void 0 : (_data$PropertyDetails6 = data.PropertyDetails) === null || _data$PropertyDetails6 === void 0 ? void 0 : _data$PropertyDetails6.address,
13292
- propertyType: data === null || data === void 0 ? void 0 : (_data$cpt2 = data.cpt) === null || _data$cpt2 === void 0 ? void 0 : (_data$cpt2$details = _data$cpt2.details) === null || _data$cpt2$details === void 0 ? void 0 : _data$cpt2$details.usageCategory
12528
+ propertyType: data === null || data === void 0 ? void 0 : (_data$cpt3 = data.cpt) === null || _data$cpt3 === void 0 ? void 0 : (_data$cpt3$details = _data$cpt3.details) === null || _data$cpt3$details === void 0 ? void 0 : _data$cpt3$details.usageCategory
13293
12529
  },
13294
12530
  dueAmount: (wc === null || wc === void 0 ? void 0 : (_wc$billData2 = wc.billData) === null || _wc$billData2 === void 0 ? void 0 : _wc$billData2.totalAmount) || 0,
13295
12531
  status: wc === null || wc === void 0 ? void 0 : (_wc$billData3 = wc.billData) === null || _wc$billData3 === void 0 ? void 0 : _wc$billData3.status
13296
12532
  });
13297
12533
  });
13298
12534
  (_ref2 = (data === null || data === void 0 ? void 0 : (_data$PropertyDetails7 = data.PropertyDetails) === null || _data$PropertyDetails7 === void 0 ? void 0 : _data$PropertyDetails7.sewerageConnection) || []) === null || _ref2 === void 0 ? void 0 : _ref2.forEach(sc => {
13299
- var _sc$billData, _data$PropertyDetails8, _data$cpt3, _data$cpt3$details, _sc$billData2, _sc$billData3;
12535
+ var _sc$billData, _data$PropertyDetails8, _data$cpt4, _data$cpt4$details, _sc$billData2, _sc$billData3;
13300
12536
  ndcDetails.push({
13301
12537
  uuid: sc === null || sc === void 0 ? void 0 : (_sc$billData = sc.billData) === null || _sc$billData === void 0 ? void 0 : _sc$billData.id,
13302
12538
  applicantId: applicantId,
@@ -13304,23 +12540,23 @@ const NewNDCStepFormOne = ({
13304
12540
  consumerCode: sc === null || sc === void 0 ? void 0 : sc.connectionNo,
13305
12541
  additionalDetails: {
13306
12542
  propertyAddress: data === null || data === void 0 ? void 0 : (_data$PropertyDetails8 = data.PropertyDetails) === null || _data$PropertyDetails8 === void 0 ? void 0 : _data$PropertyDetails8.address,
13307
- propertyType: data === null || data === void 0 ? void 0 : (_data$cpt3 = data.cpt) === null || _data$cpt3 === void 0 ? void 0 : (_data$cpt3$details = _data$cpt3.details) === null || _data$cpt3$details === void 0 ? void 0 : _data$cpt3$details.usageCategory
12543
+ propertyType: data === null || data === void 0 ? void 0 : (_data$cpt4 = data.cpt) === null || _data$cpt4 === void 0 ? void 0 : (_data$cpt4$details = _data$cpt4.details) === null || _data$cpt4$details === void 0 ? void 0 : _data$cpt4$details.usageCategory
13308
12544
  },
13309
12545
  dueAmount: (sc === null || sc === void 0 ? void 0 : (_sc$billData2 = sc.billData) === null || _sc$billData2 === void 0 ? void 0 : _sc$billData2.totalAmount) || 0,
13310
12546
  status: sc === null || sc === void 0 ? void 0 : (_sc$billData3 = sc.billData) === null || _sc$billData3 === void 0 ? void 0 : _sc$billData3.status
13311
12547
  });
13312
12548
  });
13313
12549
  if (data !== null && data !== void 0 && (_data$PropertyDetails9 = data.PropertyDetails) !== null && _data$PropertyDetails9 !== void 0 && (_data$PropertyDetails0 = _data$PropertyDetails9.propertyBillData) !== null && _data$PropertyDetails0 !== void 0 && _data$PropertyDetails0.billData) {
13314
- var _data$PropertyDetails1, _data$PropertyDetails10, _data$cpt4, _data$PropertyDetails11, _data$cpt5, _data$cpt5$details, _data$NDCReason, _data$PropertyDetails12;
12550
+ var _data$PropertyDetails1, _data$PropertyDetails10, _data$cpt5, _data$PropertyDetails11, _data$cpt6, _data$cpt6$details, _data$NDCReason, _data$PropertyDetails12;
13315
12551
  const billData = data === null || data === void 0 ? void 0 : (_data$PropertyDetails1 = data.PropertyDetails) === null || _data$PropertyDetails1 === void 0 ? void 0 : (_data$PropertyDetails10 = _data$PropertyDetails1.propertyBillData) === null || _data$PropertyDetails10 === void 0 ? void 0 : _data$PropertyDetails10.billData;
13316
12552
  ndcDetails.push({
13317
12553
  uuid: billData === null || billData === void 0 ? void 0 : billData.id,
13318
12554
  applicantId: applicantId,
13319
12555
  businessService: "PT",
13320
- consumerCode: data === null || data === void 0 ? void 0 : (_data$cpt4 = data.cpt) === null || _data$cpt4 === void 0 ? void 0 : _data$cpt4.id,
12556
+ consumerCode: data === null || data === void 0 ? void 0 : (_data$cpt5 = data.cpt) === null || _data$cpt5 === void 0 ? void 0 : _data$cpt5.id,
13321
12557
  additionalDetails: {
13322
12558
  propertyAddress: data === null || data === void 0 ? void 0 : (_data$PropertyDetails11 = data.PropertyDetails) === null || _data$PropertyDetails11 === void 0 ? void 0 : _data$PropertyDetails11.address,
13323
- propertyType: data === null || data === void 0 ? void 0 : (_data$cpt5 = data.cpt) === null || _data$cpt5 === void 0 ? void 0 : (_data$cpt5$details = _data$cpt5.details) === null || _data$cpt5$details === void 0 ? void 0 : _data$cpt5$details.usageCategory,
12559
+ propertyType: data === null || data === void 0 ? void 0 : (_data$cpt6 = data.cpt) === null || _data$cpt6 === void 0 ? void 0 : (_data$cpt6$details = _data$cpt6.details) === null || _data$cpt6$details === void 0 ? void 0 : _data$cpt6$details.usageCategory,
13324
12560
  reason: data === null || data === void 0 ? void 0 : (_data$NDCReason = data.NDCReason) === null || _data$NDCReason === void 0 ? void 0 : _data$NDCReason.reason,
13325
12561
  remarks: data === null || data === void 0 ? void 0 : (_data$PropertyDetails12 = data.PropertyDetails) === null || _data$PropertyDetails12 === void 0 ? void 0 : _data$PropertyDetails12.remarks
13326
12562
  },
@@ -13367,7 +12603,7 @@ const NewNDCStepFormOne = ({
13367
12603
  }
13368
12604
  };
13369
12605
  const updateApplication = async data => {
13370
- var _Digit$UserService$ge2, _checkApiDataCheck$Ap, _checkApiDataCheck$Ap2, _checkFormData$respon3, _checkFormData$respon4, _checkFormData$respon5, _checkFormData$respon6, _checkFormData$respon7, _checkApiDataCheck$Ap3, _checkApiDataCheck$Ap4, _checkFormData$respon8, _checkFormData$respon9, _checkApiDataCheck$Ap5, _checkApiDataCheck$Ap6, _checkFormData$respon0, _checkFormData$respon1, _data$NDCReason3, _data$cpt1, _data$cpt1$details, _response$ResponseInf2;
12606
+ var _Digit$UserService$ge2, _checkApiDataCheck$Ap, _checkApiDataCheck$Ap2, _checkFormData$respon3, _checkFormData$respon4, _checkFormData$respon5, _checkFormData$respon6, _checkFormData$respon7, _checkApiDataCheck$Ap3, _checkApiDataCheck$Ap4, _checkFormData$respon8, _checkFormData$respon9, _checkApiDataCheck$Ap5, _checkApiDataCheck$Ap6, _checkFormData$respon0, _checkFormData$respon1, _data$NDCReason3, _data$cpt10, _data$cpt10$details, _response$ResponseInf2;
13371
12607
  const applicant = ((_Digit$UserService$ge2 = Digit.UserService.getUser()) === null || _Digit$UserService$ge2 === void 0 ? void 0 : _Digit$UserService$ge2.info) || {};
13372
12608
  const applicantId = applicant === null || applicant === void 0 ? void 0 : applicant.uuid;
13373
12609
  const owners = (checkApiDataCheck === null || checkApiDataCheck === void 0 ? void 0 : (_checkApiDataCheck$Ap = checkApiDataCheck.Applications) === null || _checkApiDataCheck$Ap === void 0 ? void 0 : (_checkApiDataCheck$Ap2 = _checkApiDataCheck$Ap[0]) === null || _checkApiDataCheck$Ap2 === void 0 ? void 0 : _checkApiDataCheck$Ap2.owners) || (checkFormData === null || checkFormData === void 0 ? void 0 : (_checkFormData$respon3 = checkFormData.responseData) === null || _checkFormData$respon3 === void 0 ? void 0 : (_checkFormData$respon4 = _checkFormData$respon3[0]) === null || _checkFormData$respon4 === void 0 ? void 0 : _checkFormData$respon4.owners);
@@ -13377,7 +12613,7 @@ const NewNDCStepFormOne = ({
13377
12613
  } else {
13378
12614
  var _ref3, _data$PropertyDetails13, _ref4, _data$PropertyDetails15, _data$PropertyDetails17, _data$PropertyDetails18;
13379
12615
  (_ref3 = (data === null || data === void 0 ? void 0 : (_data$PropertyDetails13 = data.PropertyDetails) === null || _data$PropertyDetails13 === void 0 ? void 0 : _data$PropertyDetails13.waterConnection) || []) === null || _ref3 === void 0 ? void 0 : _ref3.forEach(wc => {
13380
- var _wc$billData4, _data$PropertyDetails14, _data$cpt7, _data$cpt7$details, _wc$billData5, _wc$billData6;
12616
+ var _wc$billData4, _data$PropertyDetails14, _data$cpt8, _data$cpt8$details, _wc$billData5, _wc$billData6;
13381
12617
  ndcDetails.push({
13382
12618
  uuid: wc === null || wc === void 0 ? void 0 : (_wc$billData4 = wc.billData) === null || _wc$billData4 === void 0 ? void 0 : _wc$billData4.id,
13383
12619
  applicantId: applicantId,
@@ -13385,14 +12621,14 @@ const NewNDCStepFormOne = ({
13385
12621
  consumerCode: wc === null || wc === void 0 ? void 0 : wc.connectionNo,
13386
12622
  additionalDetails: {
13387
12623
  propertyAddress: data === null || data === void 0 ? void 0 : (_data$PropertyDetails14 = data.PropertyDetails) === null || _data$PropertyDetails14 === void 0 ? void 0 : _data$PropertyDetails14.address,
13388
- propertyType: data === null || data === void 0 ? void 0 : (_data$cpt7 = data.cpt) === null || _data$cpt7 === void 0 ? void 0 : (_data$cpt7$details = _data$cpt7.details) === null || _data$cpt7$details === void 0 ? void 0 : _data$cpt7$details.usageCategory
12624
+ propertyType: data === null || data === void 0 ? void 0 : (_data$cpt8 = data.cpt) === null || _data$cpt8 === void 0 ? void 0 : (_data$cpt8$details = _data$cpt8.details) === null || _data$cpt8$details === void 0 ? void 0 : _data$cpt8$details.usageCategory
13389
12625
  },
13390
12626
  dueAmount: (wc === null || wc === void 0 ? void 0 : (_wc$billData5 = wc.billData) === null || _wc$billData5 === void 0 ? void 0 : _wc$billData5.totalAmount) || 0,
13391
12627
  status: wc === null || wc === void 0 ? void 0 : (_wc$billData6 = wc.billData) === null || _wc$billData6 === void 0 ? void 0 : _wc$billData6.status
13392
12628
  });
13393
12629
  });
13394
12630
  (_ref4 = (data === null || data === void 0 ? void 0 : (_data$PropertyDetails15 = data.PropertyDetails) === null || _data$PropertyDetails15 === void 0 ? void 0 : _data$PropertyDetails15.sewerageConnection) || []) === null || _ref4 === void 0 ? void 0 : _ref4.forEach(sc => {
13395
- var _sc$billData4, _data$PropertyDetails16, _data$cpt8, _data$cpt8$details, _sc$billData5, _sc$billData6;
12631
+ var _sc$billData4, _data$PropertyDetails16, _data$cpt9, _data$cpt9$details, _sc$billData5, _sc$billData6;
13396
12632
  ndcDetails.push({
13397
12633
  uuid: sc === null || sc === void 0 ? void 0 : (_sc$billData4 = sc.billData) === null || _sc$billData4 === void 0 ? void 0 : _sc$billData4.id,
13398
12634
  applicantId: applicantId,
@@ -13400,23 +12636,23 @@ const NewNDCStepFormOne = ({
13400
12636
  consumerCode: sc === null || sc === void 0 ? void 0 : sc.connectionNo,
13401
12637
  additionalDetails: {
13402
12638
  propertyAddress: data === null || data === void 0 ? void 0 : (_data$PropertyDetails16 = data.PropertyDetails) === null || _data$PropertyDetails16 === void 0 ? void 0 : _data$PropertyDetails16.address,
13403
- propertyType: data === null || data === void 0 ? void 0 : (_data$cpt8 = data.cpt) === null || _data$cpt8 === void 0 ? void 0 : (_data$cpt8$details = _data$cpt8.details) === null || _data$cpt8$details === void 0 ? void 0 : _data$cpt8$details.usageCategory
12639
+ propertyType: data === null || data === void 0 ? void 0 : (_data$cpt9 = data.cpt) === null || _data$cpt9 === void 0 ? void 0 : (_data$cpt9$details = _data$cpt9.details) === null || _data$cpt9$details === void 0 ? void 0 : _data$cpt9$details.usageCategory
13404
12640
  },
13405
12641
  dueAmount: (sc === null || sc === void 0 ? void 0 : (_sc$billData5 = sc.billData) === null || _sc$billData5 === void 0 ? void 0 : _sc$billData5.totalAmount) || 0,
13406
12642
  status: sc === null || sc === void 0 ? void 0 : (_sc$billData6 = sc.billData) === null || _sc$billData6 === void 0 ? void 0 : _sc$billData6.status
13407
12643
  });
13408
12644
  });
13409
12645
  if (data !== null && data !== void 0 && (_data$PropertyDetails17 = data.PropertyDetails) !== null && _data$PropertyDetails17 !== void 0 && (_data$PropertyDetails18 = _data$PropertyDetails17.propertyBillData) !== null && _data$PropertyDetails18 !== void 0 && _data$PropertyDetails18.billData) {
13410
- var _data$PropertyDetails19, _data$PropertyDetails20, _data$cpt9, _data$PropertyDetails21, _data$cpt0, _data$cpt0$details;
12646
+ var _data$PropertyDetails19, _data$PropertyDetails20, _data$cpt0, _data$PropertyDetails21, _data$cpt1, _data$cpt1$details;
13411
12647
  const billData = data === null || data === void 0 ? void 0 : (_data$PropertyDetails19 = data.PropertyDetails) === null || _data$PropertyDetails19 === void 0 ? void 0 : (_data$PropertyDetails20 = _data$PropertyDetails19.propertyBillData) === null || _data$PropertyDetails20 === void 0 ? void 0 : _data$PropertyDetails20.billData;
13412
12648
  ndcDetails.push({
13413
12649
  uuid: billData === null || billData === void 0 ? void 0 : billData.id,
13414
12650
  applicantId: applicantId,
13415
12651
  businessService: "PT",
13416
- consumerCode: data === null || data === void 0 ? void 0 : (_data$cpt9 = data.cpt) === null || _data$cpt9 === void 0 ? void 0 : _data$cpt9.id,
12652
+ consumerCode: data === null || data === void 0 ? void 0 : (_data$cpt0 = data.cpt) === null || _data$cpt0 === void 0 ? void 0 : _data$cpt0.id,
13417
12653
  additionalDetails: {
13418
12654
  propertyAddress: data === null || data === void 0 ? void 0 : (_data$PropertyDetails21 = data.PropertyDetails) === null || _data$PropertyDetails21 === void 0 ? void 0 : _data$PropertyDetails21.address,
13419
- propertyType: data === null || data === void 0 ? void 0 : (_data$cpt0 = data.cpt) === null || _data$cpt0 === void 0 ? void 0 : (_data$cpt0$details = _data$cpt0.details) === null || _data$cpt0$details === void 0 ? void 0 : _data$cpt0$details.usageCategory
12655
+ propertyType: data === null || data === void 0 ? void 0 : (_data$cpt1 = data.cpt) === null || _data$cpt1 === void 0 ? void 0 : (_data$cpt1$details = _data$cpt1.details) === null || _data$cpt1$details === void 0 ? void 0 : _data$cpt1$details.usageCategory
13420
12656
  },
13421
12657
  dueAmount: (billData === null || billData === void 0 ? void 0 : billData.totalAmount) || 0,
13422
12658
  status: billData === null || billData === void 0 ? void 0 : billData.status
@@ -13433,7 +12669,7 @@ const NewNDCStepFormOne = ({
13433
12669
  Documents: [],
13434
12670
  active: true,
13435
12671
  reason: data === null || data === void 0 ? void 0 : (_data$NDCReason3 = data.NDCReason) === null || _data$NDCReason3 === void 0 ? void 0 : _data$NDCReason3.code,
13436
- auditDetails: data === null || data === void 0 ? void 0 : (_data$cpt1 = data.cpt) === null || _data$cpt1 === void 0 ? void 0 : (_data$cpt1$details = _data$cpt1.details) === null || _data$cpt1$details === void 0 ? void 0 : _data$cpt1$details.auditDetails,
12672
+ auditDetails: data === null || data === void 0 ? void 0 : (_data$cpt10 = data.cpt) === null || _data$cpt10 === void 0 ? void 0 : (_data$cpt10$details = _data$cpt10.details) === null || _data$cpt10$details === void 0 ? void 0 : _data$cpt10$details.auditDetails,
13437
12673
  applicationNo: appNumber,
13438
12674
  uuid: apUUid,
13439
12675
  workflow: {
@@ -13461,17 +12697,17 @@ const NewNDCStepFormOne = ({
13461
12697
  }
13462
12698
  };
13463
12699
  function validateStepData(data) {
13464
- var _data$cpt10, _data$cpt11, _data$cpt11$dues, _propertyDetails$wate, _propertyDetails$sewe;
12700
+ var _data$cpt11, _data$cpt12, _data$cpt12$dues, _propertyDetails$wate, _propertyDetails$sewe;
13465
12701
  const missingFields = [];
13466
12702
  const invalidFields = [];
13467
12703
  const cpt = (data === null || data === void 0 ? void 0 : data.cpt) || {};
13468
12704
  const cptDetails = (cpt === null || cpt === void 0 ? void 0 : cpt.details) || {};
13469
12705
  const propertyDetails = (data === null || data === void 0 ? void 0 : data.PropertyDetails) || {};
13470
12706
  const NDCReason = (data === null || data === void 0 ? void 0 : data.NDCReason) || {};
13471
- if (!(data !== null && data !== void 0 && (_data$cpt10 = data.cpt) !== null && _data$cpt10 !== void 0 && _data$cpt10.dues)) {
12707
+ if (!(data !== null && data !== void 0 && (_data$cpt11 = data.cpt) !== null && _data$cpt11 !== void 0 && _data$cpt11.dues)) {
13472
12708
  missingFields.push(`${t("NDC_MESSAGE_PLEASE_CHECK_STATUS_OF_PROPERTY_TAX")} ${cpt === null || cpt === void 0 ? void 0 : cpt.id}`);
13473
12709
  }
13474
- if ((data === null || data === void 0 ? void 0 : (_data$cpt11 = data.cpt) === null || _data$cpt11 === void 0 ? void 0 : (_data$cpt11$dues = _data$cpt11.dues) === null || _data$cpt11$dues === void 0 ? void 0 : _data$cpt11$dues.totalAmount) > 0) {
12710
+ if ((data === null || data === void 0 ? void 0 : (_data$cpt12 = data.cpt) === null || _data$cpt12 === void 0 ? void 0 : (_data$cpt12$dues = _data$cpt12.dues) === null || _data$cpt12$dues === void 0 ? void 0 : _data$cpt12$dues.totalAmount) > 0) {
13475
12711
  missingFields.push(`${t("NDC_MESSAGE_PLEASE_PAY_DUES_OF_PROPERTY_TAX")} ${cpt === null || cpt === void 0 ? void 0 : cpt.id}`);
13476
12712
  }
13477
12713
  if ((propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$wate = propertyDetails.waterConnection) === null || _propertyDetails$wate === void 0 ? void 0 : _propertyDetails$wate.length) > 0) {
@@ -13717,7 +12953,7 @@ const PropertyDetailsForm$1 = ({
13717
12953
  const [propertyDetails, setPropertyDetails] = useState((formData === null || formData === void 0 ? void 0 : formData.PropertyDetails) || {});
13718
12954
  const [selectedRow, setSelectedRow] = useState(null);
13719
12955
  console.log("apiDataCheck", apiDataCheck);
13720
- console.log("formData==?/??", formData);
12956
+ console.log("formData==?/||", formData);
13721
12957
  console.log("checkApiDataCheck====", checkApiDataCheck === null || checkApiDataCheck === void 0 ? void 0 : (_checkApiDataCheck$Ap = checkApiDataCheck.Applications) === null || _checkApiDataCheck$Ap === void 0 ? void 0 : _checkApiDataCheck$Ap[0]);
13722
12958
  const {
13723
12959
  isLoading: waterConnectionLoading,
@@ -13917,15 +13153,15 @@ const PropertyDetailsForm$1 = ({
13917
13153
  }));
13918
13154
  }
13919
13155
  try {
13920
- var _result$Bill;
13156
+ var _result$Bill$, _result$Bill;
13921
13157
  const result = await Digit.PaymentService.fetchBill(tenantId, {
13922
13158
  businessService: bussinessService,
13923
13159
  consumerCode: consumercodes
13924
13160
  });
13925
13161
  setPropertyLoader(false);
13162
+ const amount = (result === null || result === void 0 ? void 0 : (_result$Bill$ = result.Bill[0]) === null || _result$Bill$ === void 0 ? void 0 : _result$Bill$.totalAmount) || 0;
13926
13163
  if ((result === null || result === void 0 ? void 0 : (_result$Bill = result.Bill) === null || _result$Bill === void 0 ? void 0 : _result$Bill.length) > 0) {
13927
- var _result$Bill$;
13928
- if ((result === null || result === void 0 ? void 0 : (_result$Bill$ = result.Bill[0]) === null || _result$Bill$ === void 0 ? void 0 : _result$Bill$.totalAmount) > 0) {
13164
+ if (amount > 0) {
13929
13165
  setShowToast({
13930
13166
  error: true,
13931
13167
  label: t("NDC_MESSAGE_DUES_FOUND_PLEASE_PAY")
@@ -15112,8 +14348,8 @@ const NewNDCStepFormTwo = ({
15112
14348
  const updateApplication = async data => {
15113
14349
  var _Digit$UserService$ge, _user$info, _user$info2, _checkFormData$NDCDet, _checkFormData$NDCDet2, _user$info3, _user$info4, _checkFormData$respon, _ref, _data$documents, _response$ResponseInf;
15114
14350
  const applicant = ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info) || {};
15115
- console.log("final data===?????", data);
15116
- console.log("checkFormData???====", checkFormData);
14351
+ console.log("final data===||||?", data);
14352
+ console.log("checkFormData||?====", checkFormData);
15117
14353
  const owners = [{
15118
14354
  name: user === null || user === void 0 ? void 0 : (_user$info = user.info) === null || _user$info === void 0 ? void 0 : _user$info.name,
15119
14355
  mobileNumber: user === null || user === void 0 ? void 0 : (_user$info2 = user.info) === null || _user$info2 === void 0 ? void 0 : _user$info2.mobileNumber,
@@ -15437,13 +14673,14 @@ const NDCNewFormSummaryStepThreeCitizen = ({
15437
14673
  }
15438
14674
  };
15439
14675
  function mapToNDCPayload(inputData, actionStatus) {
15440
- var _Digit$UserService$ge, _ref, _inputData$apiData, _inputData$apiData$Ap, _inputData$apiData$Ap2, _formData$responseDat, _formData$apiData, _formData$apiData$App, _inputData$DocummentD, _inputData$DocummentD2;
14676
+ var _Digit$UserService$ge, _inputData$apiData, _inputData$apiData$Ap, _inputData$apiData$Ap2, _formData$responseDat, _formData$apiData, _formData$apiData$App, _inputData$DocummentD, _inputData$DocummentD2;
15441
14677
  const applicant = ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info) || {};
15442
14678
  console.log("inputData", inputData);
15443
- const owners = (_ref = (inputData === null || inputData === void 0 ? void 0 : (_inputData$apiData = inputData.apiData) === null || _inputData$apiData === void 0 ? void 0 : (_inputData$apiData$Ap = _inputData$apiData.Applications) === null || _inputData$apiData$Ap === void 0 ? void 0 : (_inputData$apiData$Ap2 = _inputData$apiData$Ap[0]) === null || _inputData$apiData$Ap2 === void 0 ? void 0 : _inputData$apiData$Ap2.owners) || []) === null || _ref === void 0 ? void 0 : _ref.map(({
15444
- status,
15445
- ...rest
15446
- }) => rest);
14679
+ const owners = ((inputData === null || inputData === void 0 ? void 0 : (_inputData$apiData = inputData.apiData) === null || _inputData$apiData === void 0 ? void 0 : (_inputData$apiData$Ap = _inputData$apiData.Applications) === null || _inputData$apiData$Ap === void 0 ? void 0 : (_inputData$apiData$Ap2 = _inputData$apiData$Ap[0]) === null || _inputData$apiData$Ap2 === void 0 ? void 0 : _inputData$apiData$Ap2.owners) || []).map(item => {
14680
+ const obj = JSON.parse(JSON.stringify(item));
14681
+ delete obj.status;
14682
+ return obj;
14683
+ });
15447
14684
  const baseApplication = (formData === null || formData === void 0 ? void 0 : (_formData$responseDat = formData.responseData) === null || _formData$responseDat === void 0 ? void 0 : _formData$responseDat[0]) || (formData === null || formData === void 0 ? void 0 : (_formData$apiData = formData.apiData) === null || _formData$apiData === void 0 ? void 0 : (_formData$apiData$App = _formData$apiData.Applications) === null || _formData$apiData$App === void 0 ? void 0 : _formData$apiData$App[0]) || {};
15448
14685
  console.log("baseApplication", baseApplication);
15449
14686
  const updatedApplication = {
@@ -15867,20 +15104,16 @@ const NewNDCStepFormOne$1 = ({
15867
15104
  setLoader(true);
15868
15105
  const applicant = ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info) || {};
15869
15106
  const applicantId = applicant === null || applicant === void 0 ? void 0 : applicant.uuid;
15870
- const owners = ((data === null || data === void 0 ? void 0 : (_data$cpt2 = data.cpt) === null || _data$cpt2 === void 0 ? void 0 : (_data$cpt2$details = _data$cpt2.details) === null || _data$cpt2$details === void 0 ? void 0 : _data$cpt2$details.owners) || []).map(({
15871
- status,
15872
- ...rest
15873
- }) => {
15874
- var _rest$name, _rest$name$trim, _data$PropertyDetails, _data$PropertyDetails2, _data$PropertyDetails3;
15875
- if ((rest === null || rest === void 0 ? void 0 : (_rest$name = rest.name) === null || _rest$name === void 0 ? void 0 : (_rest$name$trim = _rest$name.trim()) === null || _rest$name$trim === void 0 ? void 0 : _rest$name$trim.toLowerCase()) === (data === null || data === void 0 ? void 0 : (_data$PropertyDetails = data.PropertyDetails) === null || _data$PropertyDetails === void 0 ? void 0 : (_data$PropertyDetails2 = _data$PropertyDetails.firstName) === null || _data$PropertyDetails2 === void 0 ? void 0 : (_data$PropertyDetails3 = _data$PropertyDetails2.trim()) === null || _data$PropertyDetails3 === void 0 ? void 0 : _data$PropertyDetails3.toLowerCase())) {
15107
+ const owners = ((data === null || data === void 0 ? void 0 : (_data$cpt2 = data.cpt) === null || _data$cpt2 === void 0 ? void 0 : (_data$cpt2$details = _data$cpt2.details) === null || _data$cpt2$details === void 0 ? void 0 : _data$cpt2$details.owners) || []).map(owner => {
15108
+ var _newOwner$name, _newOwner$name$trim, _data$PropertyDetails, _data$PropertyDetails2, _data$PropertyDetails3;
15109
+ const newOwner = JSON.parse(JSON.stringify(owner));
15110
+ delete newOwner.status;
15111
+ if ((newOwner === null || newOwner === void 0 ? void 0 : (_newOwner$name = newOwner.name) === null || _newOwner$name === void 0 ? void 0 : (_newOwner$name$trim = _newOwner$name.trim()) === null || _newOwner$name$trim === void 0 ? void 0 : _newOwner$name$trim.toLowerCase()) === (data === null || data === void 0 ? void 0 : (_data$PropertyDetails = data.PropertyDetails) === null || _data$PropertyDetails === void 0 ? void 0 : (_data$PropertyDetails2 = _data$PropertyDetails.firstName) === null || _data$PropertyDetails2 === void 0 ? void 0 : (_data$PropertyDetails3 = _data$PropertyDetails2.trim()) === null || _data$PropertyDetails3 === void 0 ? void 0 : _data$PropertyDetails3.toLowerCase())) {
15876
15112
  var _data$PropertyDetails4;
15877
- return {
15878
- ...rest,
15879
- emailId: data === null || data === void 0 ? void 0 : (_data$PropertyDetails4 = data.PropertyDetails) === null || _data$PropertyDetails4 === void 0 ? void 0 : _data$PropertyDetails4.email,
15880
- isPrimaryOwner: true
15881
- };
15113
+ newOwner.emailId = data === null || data === void 0 ? void 0 : (_data$PropertyDetails4 = data.PropertyDetails) === null || _data$PropertyDetails4 === void 0 ? void 0 : _data$PropertyDetails4.email;
15114
+ newOwner.isPrimaryOwner = true;
15882
15115
  }
15883
- return rest;
15116
+ return newOwner;
15884
15117
  });
15885
15118
  const ndcDetails = [];
15886
15119
  ((data === null || data === void 0 ? void 0 : (_data$PropertyDetails5 = data.PropertyDetails) === null || _data$PropertyDetails5 === void 0 ? void 0 : _data$PropertyDetails5.waterConnection) || []).forEach(wc => {
@@ -16157,10 +15390,11 @@ const NDCNewFormSummaryStepThreeEmployee = ({
16157
15390
  var _Digit$UserService$ge, _ref, _inputData$apiData, _inputData$apiData$Ap, _inputData$apiData$Ap2, _formData$responseDat, _formData$apiData, _formData$apiData$App, _baseApplication$NdcD, _formData$NDCDetails4, _formData$NDCDetails5, _inputData$DocummentD, _inputData$DocummentD2;
16158
15391
  const applicant = ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info) || {};
16159
15392
  console.log("checkFormData", formData);
16160
- const owners = (_ref = (inputData === null || inputData === void 0 ? void 0 : (_inputData$apiData = inputData.apiData) === null || _inputData$apiData === void 0 ? void 0 : (_inputData$apiData$Ap = _inputData$apiData.Applications) === null || _inputData$apiData$Ap === void 0 ? void 0 : (_inputData$apiData$Ap2 = _inputData$apiData$Ap[0]) === null || _inputData$apiData$Ap2 === void 0 ? void 0 : _inputData$apiData$Ap2.owners) || []) === null || _ref === void 0 ? void 0 : _ref.map(({
16161
- status,
16162
- ...rest
16163
- }) => rest);
15393
+ const owners = (_ref = (inputData === null || inputData === void 0 ? void 0 : (_inputData$apiData = inputData.apiData) === null || _inputData$apiData === void 0 ? void 0 : (_inputData$apiData$Ap = _inputData$apiData.Applications) === null || _inputData$apiData$Ap === void 0 ? void 0 : (_inputData$apiData$Ap2 = _inputData$apiData$Ap[0]) === null || _inputData$apiData$Ap2 === void 0 ? void 0 : _inputData$apiData$Ap2.owners) || []) === null || _ref === void 0 ? void 0 : _ref.map(item => {
15394
+ const obj = JSON.parse(JSON.stringify(item));
15395
+ delete obj.status;
15396
+ return obj;
15397
+ });
16164
15398
  const baseApplication = (formData === null || formData === void 0 ? void 0 : (_formData$responseDat = formData.responseData) === null || _formData$responseDat === void 0 ? void 0 : _formData$responseDat[0]) || (formData === null || formData === void 0 ? void 0 : (_formData$apiData = formData.apiData) === null || _formData$apiData === void 0 ? void 0 : (_formData$apiData$App = _formData$apiData.Applications) === null || _formData$apiData$App === void 0 ? void 0 : _formData$apiData$App[0]) || {};
16165
15399
  const updatedApplication = {
16166
15400
  ...baseApplication,