@mseva/digit-ui-module-rentandlease 1.0.6 → 1.0.8

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,4 +1,4 @@
1
- import { CheckBox, Loader as Loader$2, CloseSvg, RefreshSVG, RadioButtons, Dropdown, SubmitBar, PTIcon, EmployeeModuleCard, Modal, FormComposer as FormComposer$1, Header, MultiLink, Card, StatusTable, Row, Toast, ActionBar, Menu, CardLabelError, LabelFieldPair, CardLabel, TextInput, CardSectionHeader, MobileNumber, DatePicker, TextArea, CardSubHeader, CheckPoint, ConnectingCheckPoints, AppContainer, BackButton, PrivateRoute, KeyNote, FormStep, RadioOrSelect, ResponseComposer, Table, Label, LinkLabel, DetailsCard, SearchAction, FilterAction, PopUp, ShippingTruck, UploadFile, BreakLine, Banner, CardText, LinkButton, CardHeader, CitizenHomeCard } from '@mseva/digit-ui-react-components';
1
+ import { CheckBox, Loader as Loader$2, CloseSvg, RefreshSVG, RadioButtons, SubmitBar, PTIcon, EmployeeModuleCard, Modal, FormComposer as FormComposer$1, Header, MultiLink, Card, StatusTable, Row, Toast, ActionBar, Menu, CardLabelError, LabelFieldPair, CardLabel, TextInput, Dropdown, CardSectionHeader, MobileNumber, DatePicker, TextArea, CardSubHeader, CheckPoint, ConnectingCheckPoints, AppContainer, BackButton, PrivateRoute, KeyNote, FormStep, RadioOrSelect, ResponseComposer, Table, Label, LinkLabel, DetailsCard, SearchAction, FilterAction, PopUp, ShippingTruck, UploadFile, BreakLine, Banner, CardText, LinkButton, CardHeader, CitizenHomeCard } from '@mseva/digit-ui-react-components';
2
2
  import React, { useState, useEffect, useMemo, useCallback, useRef as useRef$1 } from 'react';
3
3
  import { useTranslation } from 'react-i18next';
4
4
  import { useParams, useHistory, useRouteMatch, useLocation, Switch, Link, Route } from 'react-router-dom';
@@ -5946,21 +5946,11 @@ const Filter = ({
5946
5946
  t
5947
5947
  } = useTranslation();
5948
5948
  const client = useQueryClient();
5949
- const tenantId = Digit.ULBService.getCurrentTenantId();
5950
5949
  const [_searchParams, setSearchParams] = useState(() => ({
5951
5950
  ...searchParams,
5952
5951
  applicationStatus: (searchParams === null || searchParams === void 0 ? void 0 : searchParams.applicationStatus) || []
5953
5952
  }));
5954
5953
  const [clearCheck, setclearCheck] = useState(false);
5955
- const AllotmentTypeMenu = [{
5956
- name: t("ON_RENT"),
5957
- code: "rent",
5958
- value: "rent"
5959
- }, {
5960
- name: t("ON_LEASE"),
5961
- code: "lease",
5962
- value: "lease"
5963
- }];
5964
5954
  const localParamChange = filterParam => {
5965
5955
  setclearCheck(false);
5966
5956
  let keys_to_delete = filterParam.delete;
@@ -6072,21 +6062,6 @@ const Filter = ({
6072
6062
  });
6073
6063
  }
6074
6064
  }
6075
- })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
6076
- className: "filter-label",
6077
- style: {
6078
- fontWeight: "normal"
6079
- }
6080
- }, t("RENT_LEASE_PROPERTY_TYPE")), /*#__PURE__*/React.createElement(Dropdown, {
6081
- option: AllotmentTypeMenu,
6082
- selected: _searchParams === null || _searchParams === void 0 ? void 0 : _searchParams.allotmentType,
6083
- optionKey: "name",
6084
- select: value => {
6085
- localParamChange({
6086
- allotmentType: value
6087
- });
6088
- },
6089
- t: t
6090
6065
  })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(SubmitBar, {
6091
6066
  disabled: lodash.isEqual(_searchParams, searchParams),
6092
6067
  onSubmit: () => onFilterChange(_searchParams),
@@ -15641,7 +15616,6 @@ const RentAndLeaseCitizenDetails = ({
15641
15616
  onBlur
15642
15617
  }) => /*#__PURE__*/React.createElement(TextInput, {
15643
15618
  value: value,
15644
- disabled: Boolean(value),
15645
15619
  onChange: e => onChange(e.target.value),
15646
15620
  onBlur: e => {
15647
15621
  onBlur(e);
@@ -15670,7 +15644,6 @@ const RentAndLeaseCitizenDetails = ({
15670
15644
  }) => /*#__PURE__*/React.createElement(TextInput, {
15671
15645
  value: value,
15672
15646
  onChange: e => onChange(e.target.value),
15673
- disabled: Boolean(value),
15674
15647
  onBlur: e => {
15675
15648
  onBlur(e);
15676
15649
  trigger(`applicants.${index}.emailId`);
@@ -15697,7 +15670,6 @@ const RentAndLeaseCitizenDetails = ({
15697
15670
  onBlur
15698
15671
  }) => /*#__PURE__*/React.createElement(TextArea, {
15699
15672
  value: value,
15700
- disabled: Boolean(value),
15701
15673
  onChange: e => onChange(e.target.value),
15702
15674
  onBlur: e => {
15703
15675
  onBlur(e);
@@ -15729,7 +15701,6 @@ const RentAndLeaseCitizenDetails = ({
15729
15701
  onBlur
15730
15702
  }) => /*#__PURE__*/React.createElement(TextInput, {
15731
15703
  value: value,
15732
- disabled: Boolean(value),
15733
15704
  maxlength: 6,
15734
15705
  onChange: e => onChange(e.target.value.replace(/\D/g, "")),
15735
15706
  onBlur: e => {
@@ -15970,7 +15941,7 @@ const NewRentAndLeaseStepFormFour = ({
15970
15941
  } = CreatedResponse || {};
15971
15942
  let formData = {};
15972
15943
  if (id) {
15973
- var _CreatedResponse$Allo, _CreatedResponse$Allo2, _updatedPropertyDetai, _updatedPropertyDetai2, _updatedPropertyDetai3, _CreatedResponse$Allo3, _CreatedResponse$Allo4, _CreatedResponse$Allo5, _CreatedResponse$Allo6;
15944
+ var _CreatedResponse$Allo, _CreatedResponse$Allo2, _updatedPropertyDetai, _updatedPropertyDetai2, _updatedPropertyDetai3, _CreatedResponse$Allo3, _CreatedResponse$Allo4, _CreatedResponse$Allo5, _CreatedResponse$Allo6, _updatedPropertyDetai4;
15974
15945
  const originalOwners = (CreatedResponse === null || CreatedResponse === void 0 ? void 0 : (_CreatedResponse$Allo = CreatedResponse.AllotmentDetails) === null || _CreatedResponse$Allo === void 0 ? void 0 : _CreatedResponse$Allo.OwnerInfo) || [];
15975
15946
  const updatedApplicants = (updatedApplicantDetails === null || updatedApplicantDetails === void 0 ? void 0 : updatedApplicantDetails.applicants) || [];
15976
15947
  const mergedOwnerInfo = updatedApplicants.map((applicant, index) => {
@@ -16010,6 +15981,7 @@ const NewRentAndLeaseStepFormFour = ({
16010
15981
  penaltyType: (updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : updatedPropertyDetails.penaltyType) || (CreatedResponse === null || CreatedResponse === void 0 ? void 0 : (_CreatedResponse$Allo6 = CreatedResponse.AllotmentDetails) === null || _CreatedResponse$Allo6 === void 0 ? void 0 : _CreatedResponse$Allo6.penaltyType),
16011
15982
  OwnerInfo: mergedOwnerInfo,
16012
15983
  additionalDetails: mergedAdditionalDetails,
15984
+ propertyId: (updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : updatedPropertyDetails.propertyId) || (updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : (_updatedPropertyDetai4 = updatedPropertyDetails.selectedProperty) === null || _updatedPropertyDetai4 === void 0 ? void 0 : _updatedPropertyDetai4.propertyId),
16013
15985
  Document: updatedDocuments.map(doc => {
16014
15986
  var _ref, _CreatedResponse$Allo7;
16015
15987
  const originalDoc = ((_ref = (CreatedResponse === null || CreatedResponse === void 0 ? void 0 : (_CreatedResponse$Allo7 = CreatedResponse.AllotmentDetails) === null || _CreatedResponse$Allo7 === void 0 ? void 0 : _CreatedResponse$Allo7.Document) || []) === null || _ref === void 0 ? void 0 : _ref.find(d => d.documentUid === (doc === null || doc === void 0 ? void 0 : doc.documentUid) || d.fileStoreId === (doc === null || doc === void 0 ? void 0 : doc.fileStoreId) || d.documentType === (doc === null || doc === void 0 ? void 0 : doc.documentType))) || {};
@@ -18293,10 +18265,11 @@ const RentAndLeaseModule = ({
18293
18265
  useEffect(() => {
18294
18266
  initRentAndLeaseComponents();
18295
18267
  }, []);
18296
- useEffect(() => userType === "employee" && Digit.LocalizationService.getLocale({
18297
- modules: [`rainmaker-${Digit.ULBService.getCurrentTenantId()}`],
18268
+ const stateId = Digit.ULBService.getStateId();
18269
+ useEffect(() => Digit.LocalizationService.getLocale({
18270
+ modules: [`rainmaker-rentAndLease`],
18298
18271
  locale: Digit.StoreData.getCurrentLanguage(),
18299
- tenantId: Digit.ULBService.getCurrentTenantId()
18272
+ tenantId: stateId
18300
18273
  }), []);
18301
18274
  if (isLoading) {
18302
18275
  return /*#__PURE__*/React.createElement(Loader$2, null);