@djb25/digit-ui-module-commonpt 1.0.28 → 1.0.29

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.
@@ -5941,7 +5941,7 @@ const setAddressDetailsLW = data => {
5941
5941
  assembly: (address === null || address === void 0 ? void 0 : address.assembly) || (address === null || address === void 0 ? void 0 : address.Assembly),
5942
5942
  block: address === null || address === void 0 ? void 0 : address.block,
5943
5943
  zone: address === null || address === void 0 ? void 0 : address.zone,
5944
- zroLocation: (address === null || address === void 0 ? void 0 : (_address$zro = address.zro) === null || _address$zro === void 0 ? void 0 : _address$zro.code) || (address === null || address === void 0 ? void 0 : address.zro),
5944
+ zroLocation: (address === null || address === void 0 ? void 0 : (_address$zro = address.zro) === null || _address$zro === void 0 ? void 0 : _address$zro.code) || (address === null || address === void 0 ? void 0 : address.zro) || (address === null || address === void 0 ? void 0 : address.zone),
5945
5945
  addressType: (address === null || address === void 0 ? void 0 : (_address$addressType = address.addressType) === null || _address$addressType === void 0 ? void 0 : _address$addressType.code) || (address === null || address === void 0 ? void 0 : address.addressType),
5946
5946
  subLocality: (address === null || address === void 0 ? void 0 : address.subLocality) || (address === null || address === void 0 ? void 0 : (_address$subLocality = address.subLocality) === null || _address$subLocality === void 0 ? void 0 : _address$subLocality.name) || (address === null || address === void 0 ? void 0 : address.subLocality),
5947
5947
  actualWard: (address === null || address === void 0 ? void 0 : address.actualWard) || (address === null || address === void 0 ? void 0 : (_address$actualWard = address.actualWard) === null || _address$actualWard === void 0 ? void 0 : _address$actualWard.name) || (address === null || address === void 0 ? void 0 : address.actualWard),
@@ -6356,6 +6356,14 @@ const CreatePropertyForm = _ref => {
6356
6356
  setMutationHappened(false);
6357
6357
  clearSuccessData();
6358
6358
  }, []);
6359
+ useEffect(() => {
6360
+ if (showToast) {
6361
+ const timer = setTimeout(() => {
6362
+ setShowToast(null);
6363
+ }, 5000);
6364
+ return () => clearTimeout(timer);
6365
+ }
6366
+ }, [showToast]);
6359
6367
  const currentConfig = React.useMemo(() => {
6360
6368
  const isEmployee = userType === "employee" || window.location.href.includes("/employee/");
6361
6369
  return newConfig.filter(step => {
@@ -6372,10 +6380,10 @@ const CreatePropertyForm = _ref => {
6372
6380
  try {
6373
6381
  var _formValue$owners, _formValue$owners$own, _formValue$owners2, _formValue$owners2$, _formValue$owners2$$o, _formValue$owners2$$o2, _formValue$owners3;
6374
6382
  const loc = formValue === null || formValue === void 0 ? void 0 : formValue.locationDet;
6375
- if (!(loc !== null && loc !== void 0 && loc.addressType) || !(loc !== null && loc !== void 0 && loc.city) || !(loc !== null && loc !== void 0 && loc.pincode) || !(loc !== null && loc !== void 0 && loc.locality) || !(loc !== null && loc !== void 0 && loc.buildingColonyName)) {
6383
+ if (!(loc !== null && loc !== void 0 && loc.addressType) || !(loc !== null && loc !== void 0 && loc.city) || !(loc !== null && loc !== void 0 && loc.pincode) || !(loc !== null && loc !== void 0 && loc.locality) || !(loc !== null && loc !== void 0 && loc.addressLine1) || !(loc !== null && loc !== void 0 && loc.houseNo)) {
6376
6384
  setShowToast({
6377
6385
  key: true,
6378
- label: "Please fill all the mandatory fields"
6386
+ label: t("Please fill all the mandatory fields")
6379
6387
  });
6380
6388
  return Promise.resolve();
6381
6389
  }
@@ -6501,6 +6509,7 @@ const CreatePropertyForm = _ref => {
6501
6509
  })), showToast && /*#__PURE__*/React.createElement(Toast, {
6502
6510
  error: showToast.key,
6503
6511
  label: showToast.label,
6512
+ isDleteBtn: true,
6504
6513
  onClose: () => {
6505
6514
  setShowToast(null);
6506
6515
  }
@@ -7851,7 +7860,7 @@ const PropertySearchResults = _ref => {
7851
7860
  return ((a === null || a === void 0 ? void 0 : (_a$additionalDetails = a.additionalDetails) === null || _a$additionalDetails === void 0 ? void 0 : _a$additionalDetails.ownerSequence) || 0) - ((b === null || b === void 0 ? void 0 : (_b$additionalDetails = b.additionalDetails) === null || _b$additionalDetails === void 0 ? void 0 : _b$additionalDetails.ownerSequence) || 0);
7852
7861
  })) === null || _sort === void 0 ? void 0 : (_sort$ = _sort[0]) === null || _sort$ === void 0 ? void 0 : _sort$.name,
7853
7862
  property_address: [addr.doorNo || "", addr.buildingName || "", addr.street || "", t("TENANTS_MOHALLA_" + ((_addr$locality = addr.locality) === null || _addr$locality === void 0 ? void 0 : _addr$locality.code)) !== "TENANTS_MOHALLA_" + ((_addr$locality2 = addr.locality) === null || _addr$locality2 === void 0 ? void 0 : _addr$locality2.code) ? t("TENANTS_MOHALLA_" + ((_addr$locality3 = addr.locality) === null || _addr$locality3 === void 0 ? void 0 : _addr$locality3.code)) : ((_addr$locality4 = addr.locality) === null || _addr$locality4 === void 0 ? void 0 : _addr$locality4.name) || ""].filter(a => a).join(", "),
7854
- zroLocation: (property === null || property === void 0 ? void 0 : (_property$address = property.address) === null || _property$address === void 0 ? void 0 : _property$address.zroLocation) || (property === null || property === void 0 ? void 0 : (_property$address2 = property.address) === null || _property$address2 === void 0 ? void 0 : _property$address2.zroLocation),
7863
+ zroLocation: (property === null || property === void 0 ? void 0 : (_property$address = property.address) === null || _property$address === void 0 ? void 0 : _property$address.zroLocation) || (property === null || property === void 0 ? void 0 : (_property$address2 = property.address) === null || _property$address2 === void 0 ? void 0 : _property$address2.zone) || "NA",
7855
7864
  total_due: ((_payment$property$pro = payment[property === null || property === void 0 ? void 0 : property.propertyId]) === null || _payment$property$pro === void 0 ? void 0 : _payment$property$pro.total_due) || 0,
7856
7865
  bil_due__date: ((_payment$property$pro2 = payment[property === null || property === void 0 ? void 0 : property.propertyId]) === null || _payment$property$pro2 === void 0 ? void 0 : _payment$property$pro2.bil_due__date) || t("N/A"),
7857
7866
  status: t(property.status),
@@ -20611,7 +20620,9 @@ const CommonPTModule = _ref => {
20611
20620
  url = _useRouteMatch.url;
20612
20621
  const moduleCode = ["PT", "ws"];
20613
20622
  const language = Digit.StoreData.getCurrentLanguage();
20623
+ const stateCode = Digit.ULBService.getStateId();
20614
20624
  Digit.Services.useStore({
20625
+ stateCode,
20615
20626
  moduleCode,
20616
20627
  language
20617
20628
  });