@mseva/digit-ui-module-ptr 1.3.4-UAT.11 → 1.3.4-UAT.13

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.
@@ -7721,7 +7721,7 @@ const PTRCitizenPet = ({
7721
7721
  return new Date(dateStr).getTime();
7722
7722
  }
7723
7723
  const onSubmit = async data => {
7724
- var _currentStepData$Crea, _currentStepData$appl, _data$petType, _data$breedType, _data$petGender, _apiDataCheck$4, _apiDataCheck$4$addre, _apiDataCheck$5, _apiDataCheck$5$addre, _currentStepData$owne, _currentStepData$resp;
7724
+ var _currentStepData$Crea, _currentStepData$appl, _data$petType, _data$breedType, _data$petGender, _currentStepData$owne, _currentStepData$resp;
7725
7725
  if (validateStep) {
7726
7726
  const validationErrors = validateStep(data);
7727
7727
  if (Object.keys(validationErrors).length > 0) return;
@@ -7759,7 +7759,7 @@ const PTRCitizenPet = ({
7759
7759
  },
7760
7760
  address: {
7761
7761
  pincode,
7762
- addressId: apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$4 = apiDataCheck[0]) !== null && _apiDataCheck$4 !== void 0 && (_apiDataCheck$4$addre = _apiDataCheck$4.address) !== null && _apiDataCheck$4$addre !== void 0 && _apiDataCheck$4$addre.addressId ? apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$5 = apiDataCheck[0]) === null || _apiDataCheck$5 === void 0 ? void 0 : (_apiDataCheck$5$addre = _apiDataCheck$5.address) === null || _apiDataCheck$5$addre === void 0 ? void 0 : _apiDataCheck$5$addre.addressId : currentStepData === null || currentStepData === void 0 ? void 0 : (_currentStepData$owne = currentStepData.ownerDetails) === null || _currentStepData$owne === void 0 ? void 0 : _currentStepData$owne.address
7762
+ addressLine1: currentStepData === null || currentStepData === void 0 ? void 0 : (_currentStepData$owne = currentStepData.ownerDetails) === null || _currentStepData$owne === void 0 ? void 0 : _currentStepData$owne.address
7763
7763
  },
7764
7764
  previousApplicationNumber: id ? id : null,
7765
7765
  applicationType: checkForRenew ? "RENEWAPPLICATION" : "NEWAPPLICATION",
@@ -7772,8 +7772,6 @@ const PTRCitizenPet = ({
7772
7772
  status: "INITIATED"
7773
7773
  }
7774
7774
  };
7775
- console.log("formData", formData);
7776
- console.log("apiDataCheck check", apiDataCheck);
7777
7775
  const pick = (newV, oldV) => newV !== undefined && newV !== null && newV !== "" ? newV : oldV;
7778
7776
  const existing = (apiDataCheck === null || apiDataCheck === void 0 ? void 0 : apiDataCheck[0]) || (currentStepData === null || currentStepData === void 0 ? void 0 : (_currentStepData$resp = currentStepData.responseData) === null || _currentStepData$resp === void 0 ? void 0 : _currentStepData$resp[0]) || {};
7779
7777
  if (existing !== null && existing !== void 0 && existing.applicationNumber && !checkForRenew) {
@@ -7790,7 +7788,7 @@ const PTRCitizenPet = ({
7790
7788
  address: {
7791
7789
  ...existing.address,
7792
7790
  pincode: pick(pincode, (_existing$address = existing.address) === null || _existing$address === void 0 ? void 0 : _existing$address.pincode),
7793
- addressId: pick(currentStepData.ownerDetails.address, (_existing$address2 = existing.address) === null || _existing$address2 === void 0 ? void 0 : _existing$address2.addressId),
7791
+ addressLine1: pick(currentStepData.ownerDetails.address, (_existing$address2 = existing.address) === null || _existing$address2 === void 0 ? void 0 : _existing$address2.addressLine1),
7794
7792
  tenantId
7795
7793
  },
7796
7794
  petDetails: {
@@ -7850,11 +7848,11 @@ const PTRCitizenPet = ({
7850
7848
  }
7851
7849
  };
7852
7850
  useEffect(() => {
7853
- var _apiDataCheck$6;
7854
- if (apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$6 = apiDataCheck[0]) !== null && _apiDataCheck$6 !== void 0 && _apiDataCheck$6.petDetails) {
7855
- var _apiDataCheck$7, _apiDataCheck$7$audit;
7851
+ var _apiDataCheck$4;
7852
+ if (apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$4 = apiDataCheck[0]) !== null && _apiDataCheck$4 !== void 0 && _apiDataCheck$4.petDetails) {
7853
+ var _apiDataCheck$5, _apiDataCheck$5$audit;
7856
7854
  console.log("apiDataCheck?.[0]?.petDetails", apiDataCheck === null || apiDataCheck === void 0 ? void 0 : apiDataCheck[0]);
7857
- const createdTime = apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$7 = apiDataCheck[0]) === null || _apiDataCheck$7 === void 0 ? void 0 : (_apiDataCheck$7$audit = _apiDataCheck$7.auditDetails) === null || _apiDataCheck$7$audit === void 0 ? void 0 : _apiDataCheck$7$audit.createdTime;
7855
+ const createdTime = apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$5 = apiDataCheck[0]) === null || _apiDataCheck$5 === void 0 ? void 0 : (_apiDataCheck$5$audit = _apiDataCheck$5.auditDetails) === null || _apiDataCheck$5$audit === void 0 ? void 0 : _apiDataCheck$5$audit.createdTime;
7858
7856
  const createdDate = new Date(Number(createdTime));
7859
7857
  const currentDate = new Date();
7860
7858
  const monthsDiff = (currentDate.getFullYear() - createdDate.getFullYear()) * 12 + (currentDate.getMonth() - createdDate.getMonth());
@@ -17043,7 +17041,7 @@ function NewApplicationTimeline({
17043
17041
  }))), /*#__PURE__*/React.createElement("div", {
17044
17042
  className: "custom-timeline-entries"
17045
17043
  }, sortedData === null || sortedData === void 0 ? void 0 : sortedData.map((item, index) => {
17046
- 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;
17044
+ 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;
17047
17045
  return /*#__PURE__*/React.createElement("div", {
17048
17046
  key: index,
17049
17047
  className: "custom-timeline-entry"
@@ -17080,9 +17078,13 @@ function NewApplicationTimeline({
17080
17078
  className: "custom-officer-info"
17081
17079
  }, /*#__PURE__*/React.createElement("div", {
17082
17080
  className: "custom-officer-name"
17083
- }, (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", {
17081
+ }, (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", {
17084
17082
  className: "custom-officer-name"
17085
- }, 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", {
17083
+ }, "- ", 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", {
17084
+ className: "custom-officer-email"
17085
+ }, /*#__PURE__*/React.createElement("span", {
17086
+ className: "custom-email-label"
17087
+ }, 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", {
17086
17088
  className: "custom-card-column custom-card-column-mid"
17087
17089
  }, (item === null || item === void 0 ? void 0 : item.sla) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("h3", {
17088
17090
  className: "custom-action-title"
@@ -17136,7 +17138,7 @@ function NewApplicationTimeline({
17136
17138
  }
17137
17139
 
17138
17140
  const PTRWFApplicationTimeline = props => {
17139
- var _props$application2, _props$application3, _props$application4, _data$PetService, _data$PetService$Appl, _checkRenewTime$, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _user$info, _user$info$roles, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetails$data9, _workflowDetails$data0, _props$application0, _props$application1, _props$application10, _props$application11, _props$application12, _actions$, _props$application13, _props$application14, _props$application16, _props$application18, _workflowDetails$data1, _workflowDetails$data10, _workflowDetails$data11;
17141
+ var _props$application2, _props$application3, _props$application4, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _user$info, _user$info$roles, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetails$data9, _workflowDetails$data0, _data$PetService, _data$PetService$Appl, _checkRenewTime$, _props$application0, _props$application1, _props$application10, _props$application11, _props$application12, _actions$, _props$application13, _props$application14, _props$application16, _props$application18, _workflowDetails$data1, _workflowDetails$data10, _workflowDetails$data11;
17140
17142
  const {
17141
17143
  t
17142
17144
  } = useTranslation();
@@ -17156,14 +17158,6 @@ const PTRWFApplicationTimeline = props => {
17156
17158
  role: "EMPLOYEE"
17157
17159
  });
17158
17160
  console.log("workflowDetails", workflowDetails);
17159
- const {
17160
- data,
17161
- isLoading: isMDMSLoading
17162
- } = Digit.Hooks.useCustomMDMS(tenantId, "PetService", [{
17163
- name: "ApplicationType"
17164
- }]);
17165
- const checkRenewTime = data === null || data === void 0 ? void 0 : (_data$PetService = data.PetService) === null || _data$PetService === void 0 ? void 0 : (_data$PetService$Appl = _data$PetService.ApplicationType) === null || _data$PetService$Appl === void 0 ? void 0 : _data$PetService$Appl.filter(item => item.code == "RENEWAPPLICATION");
17166
- const checkTimeRenew = (checkRenewTime === null || checkRenewTime === void 0 ? void 0 : (_checkRenewTime$ = checkRenewTime[0]) === null || _checkRenewTime$ === void 0 ? void 0 : _checkRenewTime$.renewalPeriod) * 1000;
17167
17161
  if (workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data = workflowDetails.data) !== null && _workflowDetails$data !== void 0 && (_workflowDetails$data2 = _workflowDetails$data.actionState) !== null && _workflowDetails$data2 !== void 0 && _workflowDetails$data2.nextActions && !workflowDetails.isLoading) workflowDetails.data.actionState.nextActions = [...(workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data3 = workflowDetails.data) === null || _workflowDetails$data3 === void 0 ? void 0 : _workflowDetails$data3.nextActions)];
17168
17162
  if (workflowDetails && workflowDetails.data && !workflowDetails.isLoading) {
17169
17163
  var _workflowDetails$data4, _workflowDetails$data5;
@@ -17334,6 +17328,13 @@ const PTRWFApplicationTimeline = props => {
17334
17328
  fetchWorkflowService();
17335
17329
  }
17336
17330
  }, [tenantId]);
17331
+ const {
17332
+ data
17333
+ } = Digit.Hooks.useCustomMDMS(tenantId, "PetService", [{
17334
+ name: "ApplicationType"
17335
+ }]);
17336
+ const checkRenewTime = data === null || data === void 0 ? void 0 : (_data$PetService = data.PetService) === null || _data$PetService === void 0 ? void 0 : (_data$PetService$Appl = _data$PetService.ApplicationType) === null || _data$PetService$Appl === void 0 ? void 0 : _data$PetService$Appl.filter(item => item.code == "RENEWAPPLICATION");
17337
+ const checkTimeRenew = (checkRenewTime === null || checkRenewTime === void 0 ? void 0 : (_checkRenewTime$ = checkRenewTime[0]) === null || _checkRenewTime$ === void 0 ? void 0 : _checkRenewTime$.renewalPeriod) * 1000;
17337
17338
  const validToObj = (_props$application0 = props.application) === null || _props$application0 === void 0 ? void 0 : _props$application0.validityDate;
17338
17339
  const validToMillis = validToObj ? validToObj * 1000 : null;
17339
17340
  const currentDateObj = Date.now();
@@ -20891,7 +20892,7 @@ const PTRApplicationDetails = () => {
20891
20892
  }, t("WS_COMMON_TABLE_COL_ADDRESS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
20892
20893
  className: "border-none",
20893
20894
  label: t("PTR_ADDRESS"),
20894
- text: (pet_details === null || pet_details === void 0 ? void 0 : (_pet_details$address = pet_details.address) === null || _pet_details$address === void 0 ? void 0 : _pet_details$address.addressId) || t("CS_NA")
20895
+ text: (pet_details === null || pet_details === void 0 ? void 0 : (_pet_details$address = pet_details.address) === null || _pet_details$address === void 0 ? void 0 : _pet_details$address.addressLine1) || t("CS_NA")
20895
20896
  }), /*#__PURE__*/React.createElement(Row, {
20896
20897
  className: "border-none",
20897
20898
  label: t("PTR_PINCODE"),
@@ -22702,7 +22703,7 @@ const NewApplication = () => {
22702
22703
  };
22703
22704
 
22704
22705
  const ApplicationDetails = () => {
22705
- var _tenantInfo$city, _tenantInfo$city2, _pet_details$addition, _user$info, _user$info$roles$find, _reciept_data$Payment7, _reciept_data$Payment8, _reciept_data$Payment1, _reciept_data$Payment10, _pet_details$owner, _pet_details$owner2, _pet_details$owner3, _pet_details$owner4, _pet_details$owner5, _pet_details$address, _pet_details$address2, _pet_details$petDetai, _pet_details$petDetai2, _pet_details$petDetai3, _pet_details$petDetai4, _pet_details$petDetai5, _pet_details$petDetai6, _pet_details$petDetai8, _pet_details$petDetai9, _pet_details$petDetai0;
22706
+ var _tenantInfo$city, _tenantInfo$city2, _pet_details$addition, _user$info, _reciept_data$Payment7, _reciept_data$Payment8, _pet_details$owner, _pet_details$owner2, _pet_details$owner3, _pet_details$owner4, _pet_details$owner5, _pet_details$address, _pet_details$address2, _pet_details$petDetai, _pet_details$petDetai2, _pet_details$petDetai3, _pet_details$petDetai4, _pet_details$petDetai5, _pet_details$petDetai6, _pet_details$petDetai8, _pet_details$petDetai9, _pet_details$petDetai0;
22706
22707
  const {
22707
22708
  t
22708
22709
  } = useTranslation();
@@ -23419,7 +23420,7 @@ const ApplicationDetails = () => {
23419
23420
  }
23420
23421
  let dowloadOptions = [];
23421
23422
  let user = Digit.UserService.getUser();
23422
- const isCemp = user === null || user === void 0 ? void 0 : (_user$info = user.info) === null || _user$info === void 0 ? void 0 : (_user$info$roles$find = _user$info.roles.find(role => role.code === "PET_REG_EMPLOYEE")) === null || _user$info$roles$find === void 0 ? void 0 : _user$info$roles$find.code;
23423
+ const isCemp = user === null || user === void 0 ? void 0 : (_user$info = user.info) === null || _user$info === void 0 ? void 0 : _user$info.roles.filter(role => role.code === "CEMP");
23423
23424
  dowloadOptions.push({
23424
23425
  label: t("PTR_PET_DOWNLOAD_ACK_FORM"),
23425
23426
  onClick: () => downloadAcknowledgement()
@@ -23478,7 +23479,7 @@ const ApplicationDetails = () => {
23478
23479
  styles: {
23479
23480
  fontSize: "32px"
23480
23481
  }
23481
- }, t("CS_APPLICATION_DETAILS")), isCemp && ((reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment1 = reciept_data.Payments[0]) === null || _reciept_data$Payment1 === void 0 ? void 0 : _reciept_data$Payment1.paymentStatus) === "NEW" || (reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment10 = reciept_data.Payments[0]) === null || _reciept_data$Payment10 === void 0 ? void 0 : _reciept_data$Payment10.paymentStatus) === "DEPOSITED") && dowloadOptions && dowloadOptions.length > 0 && /*#__PURE__*/React.createElement(MultiLink, {
23482
+ }, t("CS_APPLICATION_DETAILS")), isCemp && dowloadOptions && dowloadOptions.length > 0 && /*#__PURE__*/React.createElement(MultiLink, {
23482
23483
  className: "multilinkWrapper",
23483
23484
  onHeadClick: () => setShowOptions(!showOptions),
23484
23485
  displayOptions: showOptions,
@@ -23514,7 +23515,7 @@ const ApplicationDetails = () => {
23514
23515
  }, t("WS_COMMON_TABLE_COL_ADDRESS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
23515
23516
  className: "border-none",
23516
23517
  label: t("PTR_ADDRESS"),
23517
- text: (pet_details === null || pet_details === void 0 ? void 0 : (_pet_details$address = pet_details.address) === null || _pet_details$address === void 0 ? void 0 : _pet_details$address.addressId) || t("CS_NA")
23518
+ text: (pet_details === null || pet_details === void 0 ? void 0 : (_pet_details$address = pet_details.address) === null || _pet_details$address === void 0 ? void 0 : _pet_details$address.addressLine1) || t("CS_NA")
23518
23519
  }), /*#__PURE__*/React.createElement(Row, {
23519
23520
  className: "border-none",
23520
23521
  label: t("PTR_PINCODE"),