@mseva/digit-ui-module-ndc 1.0.74 → 1.0.76

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.
@@ -2448,7 +2448,7 @@ const getAcknowledgementData = async (application, formattedAddress, tenantInfo,
2448
2448
  bold: true,
2449
2449
  fontSize: 9
2450
2450
  }, {
2451
- text: " (s/o, d/o) ",
2451
+ text: " (s/o, d/o, w/o) ",
2452
2452
  bold: false,
2453
2453
  fontSize: 9
2454
2454
  }, {
@@ -2740,9 +2740,7 @@ const ApplicationOverview = () => {
2740
2740
  user = userInfo === null || userInfo === void 0 ? void 0 : userInfo.value;
2741
2741
  }
2742
2742
  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);
2743
- console.log('userRoles', userRoles);
2744
- const isCemp = (_user2 = user) === null || _user2 === void 0 ? void 0 : (_user2$info = _user2.info) === null || _user2$info === void 0 ? void 0 : (_user2$info$roles$fin = _user2$info.roles.find(role => role.code === "CEMP")) === null || _user2$info$roles$fin === void 0 ? void 0 : _user2$info$roles$fin.code;
2745
- console.log('isCemp', isCemp);
2743
+ const isCemp = (_user2 = user) === null || _user2 === void 0 ? void 0 : (_user2$info = _user2.info) === null || _user2$info === void 0 ? void 0 : (_user2$info$roles$fin = _user2$info.roles.find(role => role.code === "NDCCEMP")) === null || _user2$info$roles$fin === void 0 ? void 0 : _user2$info$roles$fin.code;
2746
2744
  let actions = (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data6 = workflowDetails.data) === null || _workflowDetails$data6 === void 0 ? void 0 : (_workflowDetails$data7 = _workflowDetails$data6.actionState) === null || _workflowDetails$data7 === void 0 ? void 0 : (_workflowDetails$data8 = _workflowDetails$data7.nextActions) === null || _workflowDetails$data8 === void 0 ? void 0 : _workflowDetails$data8.filter(e => {
2747
2745
  return (userRoles === null || userRoles === void 0 ? void 0 : userRoles.some(role => {
2748
2746
  var _e$roles;
@@ -2831,6 +2829,7 @@ const ApplicationOverview = () => {
2831
2829
  if (empData) {
2832
2830
  acknowledgementData = await getAcknowledgementData(Property, formattedAddress, tenantInfo, t, approver, ulbType, empData, approverStatement);
2833
2831
  }
2832
+ console.log("acknowledgementData", acknowledgementData);
2834
2833
  setTimeout(() => {
2835
2834
  Digit.Utils.pdf.generateNDC(acknowledgementData);
2836
2835
  setLoader(false);
@@ -2842,17 +2841,17 @@ const ApplicationOverview = () => {
2842
2841
  };
2843
2842
  function onActionSelect(action) {
2844
2843
  var _action$state, _applicationDetails$A8, _applicationDetails$A9, _action$state2, _action$state2$action, _filterNexState$, _filterRoles$, _displayData$applican;
2845
- console.log("action====???", action === null || action === void 0 ? void 0 : (_action$state = action.state) === null || _action$state === void 0 ? void 0 : _action$state.actions);
2844
+ console.log("action====||?", action === null || action === void 0 ? void 0 : (_action$state = action.state) === null || _action$state === void 0 ? void 0 : _action$state.actions);
2846
2845
  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) || [];
2847
2846
  const hasDuePending = ndcDetails === null || ndcDetails === void 0 ? void 0 : ndcDetails.some(item => item.isDuePending === true);
2848
2847
  console.log("hasDuePending", hasDuePending);
2849
2848
  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));
2850
- console.log("filterNexState====???", (_filterNexState$ = filterNexState[0]) === null || _filterNexState$ === void 0 ? void 0 : _filterNexState$.nextState);
2849
+ console.log("filterNexState====||?", (_filterNexState$ = filterNexState[0]) === null || _filterNexState$ === void 0 ? void 0 : _filterNexState$.nextState);
2851
2850
  const filterRoles = getWorkflowService === null || getWorkflowService === void 0 ? void 0 : getWorkflowService.filter(item => {
2852
2851
  var _filterNexState$2;
2853
2852
  return (item === null || item === void 0 ? void 0 : item.uuid) == ((_filterNexState$2 = filterNexState[0]) === null || _filterNexState$2 === void 0 ? void 0 : _filterNexState$2.nextState);
2854
2853
  });
2855
- console.log("filterRoles====???", filterRoles);
2854
+ console.log("filterRoles====||?", filterRoles);
2856
2855
  console.log("action test", action === null || action === void 0 ? void 0 : action.action);
2857
2856
  const checkactionApp = (action === null || action === void 0 ? void 0 : action.action) == "APPROVE";
2858
2857
  console.log("filterRoles && checkactionApp", filterRoles && checkactionApp, checkactionApp, filterRoles);
@@ -2888,7 +2887,7 @@ const ApplicationOverview = () => {
2888
2887
  const isPending = markedPending[detail.consumerCode];
2889
2888
  return {
2890
2889
  ...detail,
2891
- isDuePending: isPending ?? detail.isDuePending ?? false,
2890
+ isDuePending: isPending || detail.isDuePending || false,
2892
2891
  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
2893
2892
  };
2894
2893
  }),
@@ -3055,14 +3054,14 @@ const ApplicationOverview = () => {
3055
3054
  backgroundColor: isRed ? "red" : "none"
3056
3055
  },
3057
3056
  label: t("NDC_DUE_AMOUNT"),
3058
- 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()
3057
+ 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()
3059
3058
  })), canRaiseFlag && isMarked && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Row, {
3060
3059
  label: "Due Amount",
3061
3060
  text: /*#__PURE__*/React.createElement(Controller, {
3062
3061
  key: index,
3063
3062
  control: control,
3064
3063
  name: `amount[${index}]`,
3065
- 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,
3064
+ 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,
3066
3065
  render: props => /*#__PURE__*/React.createElement(TextInput, {
3067
3066
  type: "number",
3068
3067
  value: props.value,
@@ -10693,6 +10692,7 @@ const CitizenApplicationOverview = () => {
10693
10692
  if (empData) {
10694
10693
  acknowledgementData = await getAcknowledgementData(Property, formattedAddress, tenantInfo, t, approver, ulbType, empData, approverStatement);
10695
10694
  }
10695
+ console.log("acknowledgementData", acknowledgementData);
10696
10696
  setTimeout(() => {
10697
10697
  Digit.Utils.pdf.generateNDC(acknowledgementData);
10698
10698
  }, 0);
@@ -12502,27 +12502,23 @@ const NewNDCStepFormOne = ({
12502
12502
  } else createApplication(data);
12503
12503
  }
12504
12504
  const createApplication = async data => {
12505
- var _Digit$UserService$ge, _data$cpt, _data$cpt$details, _ref, _data$PropertyDetails5, _ref2, _data$PropertyDetails7, _data$PropertyDetails9, _data$PropertyDetails0, _data$NDCReason2;
12505
+ var _Digit$UserService$ge, _ref, _data$cpt, _data$cpt$details, _ref2, _data$PropertyDetails5, _ref3, _data$PropertyDetails7, _data$PropertyDetails9, _data$PropertyDetails0, _data$NDCReason2;
12506
12506
  const applicant = ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info) || {};
12507
12507
  const applicantId = applicant === null || applicant === void 0 ? void 0 : applicant.uuid;
12508
- 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(({
12509
- status,
12510
- ...rest
12511
- }) => {
12512
- var _rest$name, _rest$name$trim, _data$PropertyDetails, _data$PropertyDetails2, _data$PropertyDetails3;
12513
- 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())) {
12508
+ const owners = (_ref = (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) || []) === null || _ref === void 0 ? void 0 : _ref.map(owner => {
12509
+ var _newOwner$name, _newOwner$name$trim, _data$PropertyDetails, _data$PropertyDetails2, _data$PropertyDetails3;
12510
+ const newOwner = JSON.parse(JSON.stringify(owner));
12511
+ delete newOwner.status;
12512
+ 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())) {
12514
12513
  var _data$PropertyDetails4;
12515
- return {
12516
- ...rest,
12517
- emailId: data === null || data === void 0 ? void 0 : (_data$PropertyDetails4 = data.PropertyDetails) === null || _data$PropertyDetails4 === void 0 ? void 0 : _data$PropertyDetails4.email,
12518
- isPrimaryOwner: true
12519
- };
12514
+ newOwner.emailId = data === null || data === void 0 ? void 0 : (_data$PropertyDetails4 = data.PropertyDetails) === null || _data$PropertyDetails4 === void 0 ? void 0 : _data$PropertyDetails4.email;
12515
+ newOwner.isPrimaryOwner = true;
12520
12516
  }
12521
- return rest;
12517
+ return newOwner;
12522
12518
  });
12523
12519
  console.log("checkData==", data);
12524
12520
  const ndcDetails = [];
12525
- (_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 => {
12521
+ (_ref2 = (data === null || data === void 0 ? void 0 : (_data$PropertyDetails5 = data.PropertyDetails) === null || _data$PropertyDetails5 === void 0 ? void 0 : _data$PropertyDetails5.waterConnection) || []) === null || _ref2 === void 0 ? void 0 : _ref2.forEach(wc => {
12526
12522
  var _wc$billData, _data$PropertyDetails6, _data$cpt2, _data$cpt2$details, _wc$billData2, _wc$billData3;
12527
12523
  ndcDetails.push({
12528
12524
  uuid: wc === null || wc === void 0 ? void 0 : (_wc$billData = wc.billData) === null || _wc$billData === void 0 ? void 0 : _wc$billData.id,
@@ -12537,7 +12533,7 @@ const NewNDCStepFormOne = ({
12537
12533
  status: wc === null || wc === void 0 ? void 0 : (_wc$billData3 = wc.billData) === null || _wc$billData3 === void 0 ? void 0 : _wc$billData3.status
12538
12534
  });
12539
12535
  });
12540
- (_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 => {
12536
+ (_ref3 = (data === null || data === void 0 ? void 0 : (_data$PropertyDetails7 = data.PropertyDetails) === null || _data$PropertyDetails7 === void 0 ? void 0 : _data$PropertyDetails7.sewerageConnection) || []) === null || _ref3 === void 0 ? void 0 : _ref3.forEach(sc => {
12541
12537
  var _sc$billData, _data$PropertyDetails8, _data$cpt3, _data$cpt3$details, _sc$billData2, _sc$billData3;
12542
12538
  ndcDetails.push({
12543
12539
  uuid: sc === null || sc === void 0 ? void 0 : (_sc$billData = sc.billData) === null || _sc$billData === void 0 ? void 0 : _sc$billData.id,
@@ -12617,8 +12613,8 @@ const NewNDCStepFormOne = ({
12617
12613
  if ((checkFormData === null || checkFormData === void 0 ? void 0 : (_checkFormData$respon5 = checkFormData.responseData) === null || _checkFormData$respon5 === void 0 ? void 0 : (_checkFormData$respon6 = _checkFormData$respon5[0]) === null || _checkFormData$respon6 === void 0 ? void 0 : (_checkFormData$respon7 = _checkFormData$respon6.NdcDetails) === null || _checkFormData$respon7 === void 0 ? void 0 : _checkFormData$respon7.length) > 0) {
12618
12614
  ndcDetails = checkFormData.responseData[0].NdcDetails;
12619
12615
  } else {
12620
- var _ref3, _data$PropertyDetails13, _ref4, _data$PropertyDetails15, _data$PropertyDetails17, _data$PropertyDetails18;
12621
- (_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 => {
12616
+ var _ref4, _data$PropertyDetails13, _ref5, _data$PropertyDetails15, _data$PropertyDetails17, _data$PropertyDetails18;
12617
+ (_ref4 = (data === null || data === void 0 ? void 0 : (_data$PropertyDetails13 = data.PropertyDetails) === null || _data$PropertyDetails13 === void 0 ? void 0 : _data$PropertyDetails13.waterConnection) || []) === null || _ref4 === void 0 ? void 0 : _ref4.forEach(wc => {
12622
12618
  var _wc$billData4, _data$PropertyDetails14, _data$cpt7, _data$cpt7$details, _wc$billData5, _wc$billData6;
12623
12619
  ndcDetails.push({
12624
12620
  uuid: wc === null || wc === void 0 ? void 0 : (_wc$billData4 = wc.billData) === null || _wc$billData4 === void 0 ? void 0 : _wc$billData4.id,
@@ -12633,7 +12629,7 @@ const NewNDCStepFormOne = ({
12633
12629
  status: wc === null || wc === void 0 ? void 0 : (_wc$billData6 = wc.billData) === null || _wc$billData6 === void 0 ? void 0 : _wc$billData6.status
12634
12630
  });
12635
12631
  });
12636
- (_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 => {
12632
+ (_ref5 = (data === null || data === void 0 ? void 0 : (_data$PropertyDetails15 = data.PropertyDetails) === null || _data$PropertyDetails15 === void 0 ? void 0 : _data$PropertyDetails15.sewerageConnection) || []) === null || _ref5 === void 0 ? void 0 : _ref5.forEach(sc => {
12637
12633
  var _sc$billData4, _data$PropertyDetails16, _data$cpt8, _data$cpt8$details, _sc$billData5, _sc$billData6;
12638
12634
  ndcDetails.push({
12639
12635
  uuid: sc === null || sc === void 0 ? void 0 : (_sc$billData4 = sc.billData) === null || _sc$billData4 === void 0 ? void 0 : _sc$billData4.id,
@@ -12948,7 +12944,7 @@ const PropertyDetailsForm$1 = ({
12948
12944
  const [propertyDetails, setPropertyDetails] = useState((formData === null || formData === void 0 ? void 0 : formData.PropertyDetails) || {});
12949
12945
  const [selectedRow, setSelectedRow] = useState(null);
12950
12946
  console.log("apiDataCheck", apiDataCheck);
12951
- console.log("formData==?/??", formData);
12947
+ console.log("formData==?/||", formData);
12952
12948
  console.log("checkApiDataCheck====", checkApiDataCheck === null || checkApiDataCheck === void 0 ? void 0 : (_checkApiDataCheck$Ap = checkApiDataCheck.Applications) === null || _checkApiDataCheck$Ap === void 0 ? void 0 : _checkApiDataCheck$Ap[0]);
12953
12949
  const {
12954
12950
  isLoading: waterConnectionLoading,
@@ -14339,8 +14335,8 @@ const NewNDCStepFormTwo = ({
14339
14335
  const updateApplication = async data => {
14340
14336
  var _Digit$UserService$ge, _user$info, _user$info2, _checkFormData$NDCDet, _checkFormData$NDCDet2, _user$info3, _user$info4, _checkFormData$respon, _ref, _data$documents, _response$ResponseInf;
14341
14337
  const applicant = ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info) || {};
14342
- console.log("final data===?????", data);
14343
- console.log("checkFormData???====", checkFormData);
14338
+ console.log("final data===||||?", data);
14339
+ console.log("checkFormData||?====", checkFormData);
14344
14340
  const owners = [{
14345
14341
  name: user === null || user === void 0 ? void 0 : (_user$info = user.info) === null || _user$info === void 0 ? void 0 : _user$info.name,
14346
14342
  mobileNumber: user === null || user === void 0 ? void 0 : (_user$info2 = user.info) === null || _user$info2 === void 0 ? void 0 : _user$info2.mobileNumber,
@@ -14667,10 +14663,11 @@ const NDCNewFormSummaryStepThreeCitizen = ({
14667
14663
  var _Digit$UserService$ge, _ref, _inputData$apiData, _inputData$apiData$Ap, _inputData$apiData$Ap2, _formData$responseDat, _formData$apiData, _formData$apiData$App, _inputData$DocummentD, _inputData$DocummentD2;
14668
14664
  const applicant = ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info) || {};
14669
14665
  console.log("inputData", inputData);
14670
- 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(({
14671
- status,
14672
- ...rest
14673
- }) => rest);
14666
+ 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 => {
14667
+ const obj = JSON.parse(JSON.stringify(item));
14668
+ delete obj.status;
14669
+ return obj;
14670
+ });
14674
14671
  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]) || {};
14675
14672
  console.log("baseApplication", baseApplication);
14676
14673
  const updatedApplication = {
@@ -15090,24 +15087,20 @@ const NewNDCStepFormOne$1 = ({
15090
15087
  onGoNext();
15091
15088
  }
15092
15089
  const createApplication = async data => {
15093
- var _Digit$UserService$ge, _data$cpt2, _data$cpt2$details, _data$PropertyDetails5, _data$PropertyDetails7, _data$PropertyDetails9, _data$PropertyDetails1, _data$PropertyDetails10, _data$NDCReason2;
15090
+ var _Digit$UserService$ge, _ref, _data$cpt2, _data$cpt2$details, _data$PropertyDetails5, _data$PropertyDetails7, _data$PropertyDetails9, _data$PropertyDetails1, _data$PropertyDetails10, _data$NDCReason2;
15094
15091
  setLoader(true);
15095
15092
  const applicant = ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info) || {};
15096
15093
  const applicantId = applicant === null || applicant === void 0 ? void 0 : applicant.uuid;
15097
- 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(({
15098
- status,
15099
- ...rest
15100
- }) => {
15101
- var _rest$name, _rest$name$trim, _data$PropertyDetails, _data$PropertyDetails2, _data$PropertyDetails3;
15102
- 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())) {
15094
+ const owners = (_ref = (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) || []) === null || _ref === void 0 ? void 0 : _ref.map(owner => {
15095
+ var _newOwner$name, _newOwner$name$trim, _data$PropertyDetails, _data$PropertyDetails2, _data$PropertyDetails3;
15096
+ const newOwner = JSON.parse(JSON.stringify(owner));
15097
+ delete newOwner.status;
15098
+ 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())) {
15103
15099
  var _data$PropertyDetails4;
15104
- return {
15105
- ...rest,
15106
- emailId: data === null || data === void 0 ? void 0 : (_data$PropertyDetails4 = data.PropertyDetails) === null || _data$PropertyDetails4 === void 0 ? void 0 : _data$PropertyDetails4.email,
15107
- isPrimaryOwner: true
15108
- };
15100
+ newOwner.emailId = data === null || data === void 0 ? void 0 : (_data$PropertyDetails4 = data.PropertyDetails) === null || _data$PropertyDetails4 === void 0 ? void 0 : _data$PropertyDetails4.email;
15101
+ newOwner.isPrimaryOwner = true;
15109
15102
  }
15110
- return rest;
15103
+ return newOwner;
15111
15104
  });
15112
15105
  const ndcDetails = [];
15113
15106
  ((data === null || data === void 0 ? void 0 : (_data$PropertyDetails5 = data.PropertyDetails) === null || _data$PropertyDetails5 === void 0 ? void 0 : _data$PropertyDetails5.waterConnection) || []).forEach(wc => {
@@ -15384,10 +15377,11 @@ const NDCNewFormSummaryStepThreeEmployee = ({
15384
15377
  var _Digit$UserService$ge, _ref, _inputData$apiData, _inputData$apiData$Ap, _inputData$apiData$Ap2, _formData$responseDat, _formData$apiData, _formData$apiData$App, _inputData$DocummentD, _inputData$DocummentD2;
15385
15378
  const applicant = ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info) || {};
15386
15379
  console.log("checkFormData", formData);
15387
- 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(({
15388
- status,
15389
- ...rest
15390
- }) => rest);
15380
+ 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 => {
15381
+ const obj = JSON.parse(JSON.stringify(item));
15382
+ delete obj.status;
15383
+ return obj;
15384
+ });
15391
15385
  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]) || {};
15392
15386
  const updatedApplication = {
15393
15387
  ...baseApplication,