@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.
package/dist/index.js CHANGED
@@ -5944,7 +5944,7 @@ const setAddressDetailsLW = data => {
5944
5944
  assembly: (address === null || address === void 0 ? void 0 : address.assembly) || (address === null || address === void 0 ? void 0 : address.Assembly),
5945
5945
  block: address === null || address === void 0 ? void 0 : address.block,
5946
5946
  zone: address === null || address === void 0 ? void 0 : address.zone,
5947
- 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),
5947
+ 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),
5948
5948
  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),
5949
5949
  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),
5950
5950
  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),
@@ -6359,6 +6359,14 @@ const CreatePropertyForm = _ref => {
6359
6359
  setMutationHappened(false);
6360
6360
  clearSuccessData();
6361
6361
  }, []);
6362
+ React.useEffect(() => {
6363
+ if (showToast) {
6364
+ const timer = setTimeout(() => {
6365
+ setShowToast(null);
6366
+ }, 5000);
6367
+ return () => clearTimeout(timer);
6368
+ }
6369
+ }, [showToast]);
6362
6370
  const currentConfig = React__default.useMemo(() => {
6363
6371
  const isEmployee = userType === "employee" || window.location.href.includes("/employee/");
6364
6372
  return newConfig.filter(step => {
@@ -6375,10 +6383,10 @@ const CreatePropertyForm = _ref => {
6375
6383
  try {
6376
6384
  var _formValue$owners, _formValue$owners$own, _formValue$owners2, _formValue$owners2$, _formValue$owners2$$o, _formValue$owners2$$o2, _formValue$owners3;
6377
6385
  const loc = formValue === null || formValue === void 0 ? void 0 : formValue.locationDet;
6378
- 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)) {
6386
+ 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)) {
6379
6387
  setShowToast({
6380
6388
  key: true,
6381
- label: "Please fill all the mandatory fields"
6389
+ label: t("Please fill all the mandatory fields")
6382
6390
  });
6383
6391
  return Promise.resolve();
6384
6392
  }
@@ -6504,6 +6512,7 @@ const CreatePropertyForm = _ref => {
6504
6512
  })), showToast && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
6505
6513
  error: showToast.key,
6506
6514
  label: showToast.label,
6515
+ isDleteBtn: true,
6507
6516
  onClose: () => {
6508
6517
  setShowToast(null);
6509
6518
  }
@@ -7854,7 +7863,7 @@ const PropertySearchResults = _ref => {
7854
7863
  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);
7855
7864
  })) === null || _sort === void 0 ? void 0 : (_sort$ = _sort[0]) === null || _sort$ === void 0 ? void 0 : _sort$.name,
7856
7865
  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(", "),
7857
- 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),
7866
+ 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",
7858
7867
  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,
7859
7868
  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"),
7860
7869
  status: t(property.status),
@@ -20614,7 +20623,9 @@ const CommonPTModule = _ref => {
20614
20623
  url = _useRouteMatch.url;
20615
20624
  const moduleCode = ["PT", "ws"];
20616
20625
  const language = Digit.StoreData.getCurrentLanguage();
20626
+ const stateCode = Digit.ULBService.getStateId();
20617
20627
  Digit.Services.useStore({
20628
+ stateCode,
20618
20629
  moduleCode,
20619
20630
  language
20620
20631
  });