@djb25/digit-ui-module-wt 1.0.65 → 1.0.67

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.
@@ -3083,7 +3083,7 @@ const SearchApplication = ({
3083
3083
  return /*#__PURE__*/React.createElement("form", {
3084
3084
  id: "search-form",
3085
3085
  onSubmit: handleSubmit(onSubmitInput),
3086
- className: "search-form-wrapper search-complaint-container"
3086
+ className: " search-complaint-container"
3087
3087
  }, /*#__PURE__*/React.createElement(React.Fragment, null, (type === "mobile" || mobileView) && /*#__PURE__*/React.createElement("div", {
3088
3088
  className: "complaint-header"
3089
3089
  }, /*#__PURE__*/React.createElement("h2", null, t("ES_COMMON_SEARCH_BY")), /*#__PURE__*/React.createElement("span", {
@@ -3376,20 +3376,38 @@ const WTDesktopInbox = ({
3376
3376
  return row !== null && row !== void 0 && (_row$workflowData2 = row.workflowData) !== null && _row$workflowData2 !== void 0 && (_row$workflowData2$st = _row$workflowData2.state) !== null && _row$workflowData2$st !== void 0 && _row$workflowData2$st.applicationStatus ? t(row.workflowData.state.applicationStatus) : "";
3377
3377
  }
3378
3378
  });
3379
- if (columns !== null && columns !== void 0 && columns.some(column => (column === null || column === void 0 ? void 0 : column.id) === "vendorName")) {
3379
+ if (columns !== null && columns !== void 0 && columns.some(column => (column === null || column === void 0 ? void 0 : column.id) === "deliveryDateTime")) {
3380
3380
  var _columns$find4;
3381
3381
  csvColumns.push({
3382
- Header: (columns === null || columns === void 0 ? void 0 : (_columns$find4 = columns.find(column => (column === null || column === void 0 ? void 0 : column.id) === "vendorName")) === null || _columns$find4 === void 0 ? void 0 : _columns$find4.Header) || t("WT_VENDOR_NAME"),
3382
+ Header: (columns === null || columns === void 0 ? void 0 : (_columns$find4 = columns.find(column => (column === null || column === void 0 ? void 0 : column.id) === "deliveryDateTime")) === null || _columns$find4 === void 0 ? void 0 : _columns$find4.Header) || t("WT_DELIVERY_DATE_TIME"),
3383
3383
  exportAccessor: row => {
3384
- var _row$searchData9, _row$searchData9$vend, _row$searchData0;
3385
- return (row === null || row === void 0 ? void 0 : (_row$searchData9 = row.searchData) === null || _row$searchData9 === void 0 ? void 0 : (_row$searchData9$vend = _row$searchData9.vendor) === null || _row$searchData9$vend === void 0 ? void 0 : _row$searchData9$vend.name) || (row === null || row === void 0 ? void 0 : (_row$searchData0 = row.searchData) === null || _row$searchData0 === void 0 ? void 0 : _row$searchData0.vendorName) || "-";
3384
+ var _row$searchData9;
3385
+ const driverTripReport = row === null || row === void 0 ? void 0 : (_row$searchData9 = row.searchData) === null || _row$searchData9 === void 0 ? void 0 : _row$searchData9.driverTripReport;
3386
+ if (Array.isArray(driverTripReport) && driverTripReport.length > 0) {
3387
+ var _driverTripReport$, _driverTripReport$$au;
3388
+ const lastModifiedTime = (_driverTripReport$ = driverTripReport[0]) === null || _driverTripReport$ === void 0 ? void 0 : (_driverTripReport$$au = _driverTripReport$.auditDetails) === null || _driverTripReport$$au === void 0 ? void 0 : _driverTripReport$$au.lastModifiedTime;
3389
+ if (lastModifiedTime) {
3390
+ return `${Digit.DateUtils.ConvertEpochToDate(lastModifiedTime)} ${Digit.DateUtils.ConvertEpochToTimeInHours(lastModifiedTime)}`;
3391
+ }
3392
+ }
3393
+ return "-";
3386
3394
  }
3387
3395
  });
3388
3396
  }
3389
- if (columns !== null && columns !== void 0 && columns.some(column => (column === null || column === void 0 ? void 0 : column.id) === "vehicleNumber")) {
3397
+ if (columns !== null && columns !== void 0 && columns.some(column => (column === null || column === void 0 ? void 0 : column.id) === "vendorName")) {
3390
3398
  var _columns$find5;
3391
3399
  csvColumns.push({
3392
- Header: (columns === null || columns === void 0 ? void 0 : (_columns$find5 = columns.find(column => (column === null || column === void 0 ? void 0 : column.id) === "vehicleNumber")) === null || _columns$find5 === void 0 ? void 0 : _columns$find5.Header) || t("WT_VEHICLE_NO"),
3400
+ Header: (columns === null || columns === void 0 ? void 0 : (_columns$find5 = columns.find(column => (column === null || column === void 0 ? void 0 : column.id) === "vendorName")) === null || _columns$find5 === void 0 ? void 0 : _columns$find5.Header) || t("WT_VENDOR_NAME"),
3401
+ exportAccessor: row => {
3402
+ var _row$searchData0, _row$searchData0$vend, _row$searchData1;
3403
+ return (row === null || row === void 0 ? void 0 : (_row$searchData0 = row.searchData) === null || _row$searchData0 === void 0 ? void 0 : (_row$searchData0$vend = _row$searchData0.vendor) === null || _row$searchData0$vend === void 0 ? void 0 : _row$searchData0$vend.name) || (row === null || row === void 0 ? void 0 : (_row$searchData1 = row.searchData) === null || _row$searchData1 === void 0 ? void 0 : _row$searchData1.vendorName) || "-";
3404
+ }
3405
+ });
3406
+ }
3407
+ if (columns !== null && columns !== void 0 && columns.some(column => (column === null || column === void 0 ? void 0 : column.id) === "vehicleNumber")) {
3408
+ var _columns$find6;
3409
+ csvColumns.push({
3410
+ Header: (columns === null || columns === void 0 ? void 0 : (_columns$find6 = columns.find(column => (column === null || column === void 0 ? void 0 : column.id) === "vehicleNumber")) === null || _columns$find6 === void 0 ? void 0 : _columns$find6.Header) || t("WT_VEHICLE_NO"),
3393
3411
  exportAccessor: row => {
3394
3412
  var _searchData$vendor, _searchData$vendor$ve;
3395
3413
  const searchData = row === null || row === void 0 ? void 0 : row.searchData;
@@ -3399,9 +3417,9 @@ const WTDesktopInbox = ({
3399
3417
  });
3400
3418
  }
3401
3419
  if (columns !== null && columns !== void 0 && columns.some(column => (column === null || column === void 0 ? void 0 : column.id) === "driverName")) {
3402
- var _columns$find6;
3420
+ var _columns$find7;
3403
3421
  csvColumns.push({
3404
- Header: (columns === null || columns === void 0 ? void 0 : (_columns$find6 = columns.find(column => (column === null || column === void 0 ? void 0 : column.id) === "driverName")) === null || _columns$find6 === void 0 ? void 0 : _columns$find6.Header) || t("WT_DRIVER_NAME"),
3422
+ Header: (columns === null || columns === void 0 ? void 0 : (_columns$find7 = columns.find(column => (column === null || column === void 0 ? void 0 : column.id) === "driverName")) === null || _columns$find7 === void 0 ? void 0 : _columns$find7.Header) || t("WT_DRIVER_NAME"),
3405
3423
  exportAccessor: row => {
3406
3424
  var _searchData$vendor2, _searchData$vendor2$d, _mappedDriver$owner;
3407
3425
  const searchData = row === null || row === void 0 ? void 0 : row.searchData;
@@ -8699,6 +8717,12 @@ const SearchFillingPointAddress = () => {
8699
8717
  }
8700
8718
  });
8701
8719
  };
8720
+ const getLocalityTranslation = (localityCode, tenantId, t) => {
8721
+ if (!localityCode) return "";
8722
+ const tenant = tenantId || Digit.ULBService.getCurrentTenantId() || "djb";
8723
+ const prefix = tenant.replace(".", "_").toUpperCase();
8724
+ return t(`${prefix}_REVENUE_${localityCode}`);
8725
+ };
8702
8726
  const columns = React.useMemo(() => {
8703
8727
  if (selectedTab === "FIXED_POINT") {
8704
8728
  return [{
@@ -8736,7 +8760,7 @@ const SearchFillingPointAddress = () => {
8736
8760
  Header: t("WT_LOCALITY"),
8737
8761
  accessor: row => {
8738
8762
  var _row$address;
8739
- return (row === null || row === void 0 ? void 0 : (_row$address = row.address) === null || _row$address === void 0 ? void 0 : _row$address.locality) || "NA";
8763
+ return getLocalityTranslation(row === null || row === void 0 ? void 0 : (_row$address = row.address) === null || _row$address === void 0 ? void 0 : _row$address.locality, tenantId, t) || "NA";
8740
8764
  },
8741
8765
  id: "locality"
8742
8766
  }, {
@@ -8820,14 +8844,15 @@ const SearchFillingPointAddress = () => {
8820
8844
  row
8821
8845
  }) => {
8822
8846
  var _row$original, _row$original$filling5, _row$original2, _row$original2$addres;
8823
- const localities = ((_row$original = row.original) === null || _row$original === void 0 ? void 0 : (_row$original$filling5 = _row$original.fillingPointLocalityCodes) === null || _row$original$filling5 === void 0 ? void 0 : _row$original$filling5.length) > 0 ? row.original.fillingPointLocalityCodes.join(", ") : ((_row$original2 = row.original) === null || _row$original2 === void 0 ? void 0 : (_row$original2$addres = _row$original2.address) === null || _row$original2$addres === void 0 ? void 0 : _row$original2$addres.locality) || "NA";
8847
+ const codes = ((_row$original = row.original) === null || _row$original === void 0 ? void 0 : (_row$original$filling5 = _row$original.fillingPointLocalityCodes) === null || _row$original$filling5 === void 0 ? void 0 : _row$original$filling5.length) > 0 ? row.original.fillingPointLocalityCodes : (_row$original2 = row.original) !== null && _row$original2 !== void 0 && (_row$original2$addres = _row$original2.address) !== null && _row$original2$addres !== void 0 && _row$original2$addres.locality ? [row.original.address.locality] : [];
8848
+ const translated = codes.length > 0 ? codes.map(code => getLocalityTranslation(code, tenantId, t)).join(", ") : "NA";
8824
8849
  return /*#__PURE__*/React.createElement("div", {
8825
8850
  style: {
8826
8851
  display: "flex",
8827
8852
  alignItems: "center",
8828
8853
  gap: "8px"
8829
8854
  }
8830
- }, /*#__PURE__*/React.createElement("span", null, localities));
8855
+ }, /*#__PURE__*/React.createElement("span", null, translated));
8831
8856
  }
8832
8857
  }, {
8833
8858
  Header: t("WT_ADD_LOCALITY"),
@@ -8962,7 +8987,7 @@ const SearchFillingPointAddress = () => {
8962
8987
  Header: t("WT_LOCALITY"),
8963
8988
  exportAccessor: row => {
8964
8989
  var _row$address4;
8965
- return (row === null || row === void 0 ? void 0 : (_row$address4 = row.address) === null || _row$address4 === void 0 ? void 0 : _row$address4.locality) || "NA";
8990
+ return getLocalityTranslation(row === null || row === void 0 ? void 0 : (_row$address4 = row.address) === null || _row$address4 === void 0 ? void 0 : _row$address4.locality, tenantId, t) || "NA";
8966
8991
  }
8967
8992
  }, {
8968
8993
  Header: t("WT_LATITUDE"),
@@ -9028,7 +9053,8 @@ const SearchFillingPointAddress = () => {
9028
9053
  Header: t("WT_LOCALITY"),
9029
9054
  exportAccessor: row => {
9030
9055
  var _row$fillingPointLoca, _row$address7;
9031
- return (row === null || row === void 0 ? void 0 : (_row$fillingPointLoca = row.fillingPointLocalityCodes) === null || _row$fillingPointLoca === void 0 ? void 0 : _row$fillingPointLoca.length) > 0 ? row.fillingPointLocalityCodes.join(", ") : (row === null || row === void 0 ? void 0 : (_row$address7 = row.address) === null || _row$address7 === void 0 ? void 0 : _row$address7.locality) || "NA";
9056
+ const codes = (row === null || row === void 0 ? void 0 : (_row$fillingPointLoca = row.fillingPointLocalityCodes) === null || _row$fillingPointLoca === void 0 ? void 0 : _row$fillingPointLoca.length) > 0 ? row.fillingPointLocalityCodes : row !== null && row !== void 0 && (_row$address7 = row.address) !== null && _row$address7 !== void 0 && _row$address7.locality ? [row.address.locality] : [];
9057
+ return codes.length > 0 ? codes.map(code => getLocalityTranslation(code, tenantId, t)).join(", ") : "NA";
9032
9058
  }
9033
9059
  }];
9034
9060
  }, [selectedTab, t]);
@@ -17231,6 +17257,18 @@ const getFormattedCreatedAt = row => {
17231
17257
  if (!createdTime) return "";
17232
17258
  return `${Digit.DateUtils.ConvertEpochToDate(createdTime)} ${Digit.DateUtils.ConvertEpochToTimeInHours(createdTime)}`;
17233
17259
  };
17260
+ const getDeliveryDateTime = row => {
17261
+ var _row$searchData2;
17262
+ const driverTripReport = row === null || row === void 0 ? void 0 : (_row$searchData2 = row.searchData) === null || _row$searchData2 === void 0 ? void 0 : _row$searchData2.driverTripReport;
17263
+ if (Array.isArray(driverTripReport) && driverTripReport.length > 0) {
17264
+ var _driverTripReport$, _driverTripReport$$au;
17265
+ const lastModifiedTime = (_driverTripReport$ = driverTripReport[0]) === null || _driverTripReport$ === void 0 ? void 0 : (_driverTripReport$$au = _driverTripReport$.auditDetails) === null || _driverTripReport$$au === void 0 ? void 0 : _driverTripReport$$au.lastModifiedTime;
17266
+ if (lastModifiedTime) {
17267
+ return `${Digit.DateUtils.ConvertEpochToDate(lastModifiedTime)} ${Digit.DateUtils.ConvertEpochToTimeInHours(lastModifiedTime)}`;
17268
+ }
17269
+ }
17270
+ return "-";
17271
+ };
17234
17272
  const GetMobCell = value => /*#__PURE__*/React.createElement("span", {
17235
17273
  className: "sla-cell"
17236
17274
  }, value);
@@ -17263,8 +17301,8 @@ const TableConfig = t => ({
17263
17301
  Header: t("WT_BOOKING_NO"),
17264
17302
  id: "bookingNo",
17265
17303
  accessor: row => {
17266
- var _row$searchData2;
17267
- return (row === null || row === void 0 ? void 0 : (_row$searchData2 = row.searchData) === null || _row$searchData2 === void 0 ? void 0 : _row$searchData2["bookingNo"]) || "";
17304
+ var _row$searchData3;
17305
+ return (row === null || row === void 0 ? void 0 : (_row$searchData3 = row.searchData) === null || _row$searchData3 === void 0 ? void 0 : _row$searchData3["bookingNo"]) || "";
17268
17306
  },
17269
17307
  Cell: ({
17270
17308
  row
@@ -17284,8 +17322,8 @@ const TableConfig = t => ({
17284
17322
  Header: window.location.href.includes("fixed-point") ? t("WT_FIXED_POINT_NAME") : t("WT_APPLICANT_NAME"),
17285
17323
  id: "applicantName",
17286
17324
  accessor: row => {
17287
- var _row$searchData3, _row$searchData3$appl;
17288
- return (row === null || row === void 0 ? void 0 : (_row$searchData3 = row.searchData) === null || _row$searchData3 === void 0 ? void 0 : (_row$searchData3$appl = _row$searchData3.applicantDetail) === null || _row$searchData3$appl === void 0 ? void 0 : _row$searchData3$appl["name"]) || "";
17325
+ var _row$searchData4, _row$searchData4$appl;
17326
+ return (row === null || row === void 0 ? void 0 : (_row$searchData4 = row.searchData) === null || _row$searchData4 === void 0 ? void 0 : (_row$searchData4$appl = _row$searchData4.applicantDetail) === null || _row$searchData4$appl === void 0 ? void 0 : _row$searchData4$appl["name"]) || "";
17289
17327
  },
17290
17328
  Cell: row => {
17291
17329
  var _row$cell, _row$cell$row, _row$cell$row$origina, _row$cell$row$origina2, _row$cell$row$origina3;
@@ -17299,8 +17337,8 @@ const TableConfig = t => ({
17299
17337
  Header: t("WT_MOBILE_NUMBER"),
17300
17338
  id: "mobileNumber",
17301
17339
  accessor: row => {
17302
- var _row$searchData4, _row$searchData4$appl;
17303
- return (row === null || row === void 0 ? void 0 : (_row$searchData4 = row.searchData) === null || _row$searchData4 === void 0 ? void 0 : (_row$searchData4$appl = _row$searchData4.applicantDetail) === null || _row$searchData4$appl === void 0 ? void 0 : _row$searchData4$appl["mobileNumber"]) || "";
17340
+ var _row$searchData5, _row$searchData5$appl;
17341
+ return (row === null || row === void 0 ? void 0 : (_row$searchData5 = row.searchData) === null || _row$searchData5 === void 0 ? void 0 : (_row$searchData5$appl = _row$searchData5.applicantDetail) === null || _row$searchData5$appl === void 0 ? void 0 : _row$searchData5$appl["mobileNumber"]) || "";
17304
17342
  },
17305
17343
  Cell: row => {
17306
17344
  var _row$cell2, _row$cell2$row, _row$cell2$row$origin, _row$cell2$row$origin2, _row$cell2$row$origin3;
@@ -17314,8 +17352,8 @@ const TableConfig = t => ({
17314
17352
  Header: t("LOCALITY"),
17315
17353
  id: "localityCode",
17316
17354
  accessor: row => {
17317
- var _row$searchData5;
17318
- return (row === null || row === void 0 ? void 0 : (_row$searchData5 = row.searchData) === null || _row$searchData5 === void 0 ? void 0 : _row$searchData5["localityCode"]) || "";
17355
+ var _row$searchData6;
17356
+ return (row === null || row === void 0 ? void 0 : (_row$searchData6 = row.searchData) === null || _row$searchData6 === void 0 ? void 0 : _row$searchData6["localityCode"]) || "";
17319
17357
  },
17320
17358
  Cell: ({
17321
17359
  row
@@ -17331,8 +17369,8 @@ const TableConfig = t => ({
17331
17369
  Header: t("Filling Point"),
17332
17370
  id: "fillingPoint",
17333
17371
  accessor: row => {
17334
- var _row$searchData6, _row$searchData6$fill, _row$searchData7;
17335
- return (row === null || row === void 0 ? void 0 : (_row$searchData6 = row.searchData) === null || _row$searchData6 === void 0 ? void 0 : (_row$searchData6$fill = _row$searchData6.fillingPointMetadata) === null || _row$searchData6$fill === void 0 ? void 0 : _row$searchData6$fill.name) || (row === null || row === void 0 ? void 0 : (_row$searchData7 = row.searchData) === null || _row$searchData7 === void 0 ? void 0 : _row$searchData7.fillingPointName) || "-";
17372
+ var _row$searchData7, _row$searchData7$fill, _row$searchData8;
17373
+ return (row === null || row === void 0 ? void 0 : (_row$searchData7 = row.searchData) === null || _row$searchData7 === void 0 ? void 0 : (_row$searchData7$fill = _row$searchData7.fillingPointMetadata) === null || _row$searchData7$fill === void 0 ? void 0 : _row$searchData7$fill.name) || (row === null || row === void 0 ? void 0 : (_row$searchData8 = row.searchData) === null || _row$searchData8 === void 0 ? void 0 : _row$searchData8.fillingPointName) || "-";
17336
17374
  },
17337
17375
  Cell: ({
17338
17376
  row
@@ -17373,6 +17411,14 @@ const TableConfig = t => ({
17373
17411
  return GetMobCell(t(`ES_WT_COMMON_STATUS_${original === null || original === void 0 ? void 0 : (_original$workflowDat = original.workflowData) === null || _original$workflowDat === void 0 ? void 0 : (_original$workflowDat2 = _original$workflowDat.state) === null || _original$workflowDat2 === void 0 ? void 0 : _original$workflowDat2["applicationStatus"]}`));
17374
17412
  }
17375
17413
  }, ...(window.location.href.includes("fixed-point") ? [{
17414
+ Header: t("WT_DELIVERY_DATE_TIME"),
17415
+ id: "deliveryDateTime",
17416
+ accessor: row => getDeliveryDateTime(row),
17417
+ Cell: ({
17418
+ row
17419
+ }) => GetCell(getDeliveryDateTime(row === null || row === void 0 ? void 0 : row.original)),
17420
+ mobileCell: original => GetMobCell(getDeliveryDateTime(original))
17421
+ }, {
17376
17422
  Header: t("WT_VENDOR_NAME"),
17377
17423
  id: "vendorName",
17378
17424
  accessor: row => getVendorNameFromSearchData(row === null || row === void 0 ? void 0 : row.searchData),
@@ -17416,8 +17462,8 @@ const TableConfig = t => ({
17416
17462
  Header: t("MT_BOOKING_NO"),
17417
17463
  id: "bookingNo",
17418
17464
  accessor: row => {
17419
- var _row$searchData8;
17420
- return (row === null || row === void 0 ? void 0 : (_row$searchData8 = row.searchData) === null || _row$searchData8 === void 0 ? void 0 : _row$searchData8["bookingNo"]) || "";
17465
+ var _row$searchData9;
17466
+ return (row === null || row === void 0 ? void 0 : (_row$searchData9 = row.searchData) === null || _row$searchData9 === void 0 ? void 0 : _row$searchData9["bookingNo"]) || "";
17421
17467
  },
17422
17468
  Cell: ({
17423
17469
  row
@@ -17437,8 +17483,8 @@ const TableConfig = t => ({
17437
17483
  Header: t("MT_APPLICANT_NAME"),
17438
17484
  id: "applicantName",
17439
17485
  accessor: row => {
17440
- var _row$searchData9, _row$searchData9$appl;
17441
- return (row === null || row === void 0 ? void 0 : (_row$searchData9 = row.searchData) === null || _row$searchData9 === void 0 ? void 0 : (_row$searchData9$appl = _row$searchData9.applicantDetail) === null || _row$searchData9$appl === void 0 ? void 0 : _row$searchData9$appl["name"]) || "";
17486
+ var _row$searchData0, _row$searchData0$appl;
17487
+ return (row === null || row === void 0 ? void 0 : (_row$searchData0 = row.searchData) === null || _row$searchData0 === void 0 ? void 0 : (_row$searchData0$appl = _row$searchData0.applicantDetail) === null || _row$searchData0$appl === void 0 ? void 0 : _row$searchData0$appl["name"]) || "";
17442
17488
  },
17443
17489
  Cell: row => {
17444
17490
  var _row$cell3, _row$cell3$row, _row$cell3$row$origin, _row$cell3$row$origin2, _row$cell3$row$origin3;
@@ -17452,8 +17498,8 @@ const TableConfig = t => ({
17452
17498
  Header: t("MT_MOBILE_NUMBER"),
17453
17499
  id: "mobileNumber",
17454
17500
  accessor: row => {
17455
- var _row$searchData0, _row$searchData0$appl;
17456
- return (row === null || row === void 0 ? void 0 : (_row$searchData0 = row.searchData) === null || _row$searchData0 === void 0 ? void 0 : (_row$searchData0$appl = _row$searchData0.applicantDetail) === null || _row$searchData0$appl === void 0 ? void 0 : _row$searchData0$appl["mobileNumber"]) || "";
17501
+ var _row$searchData1, _row$searchData1$appl;
17502
+ return (row === null || row === void 0 ? void 0 : (_row$searchData1 = row.searchData) === null || _row$searchData1 === void 0 ? void 0 : (_row$searchData1$appl = _row$searchData1.applicantDetail) === null || _row$searchData1$appl === void 0 ? void 0 : _row$searchData1$appl["mobileNumber"]) || "";
17457
17503
  },
17458
17504
  Cell: row => {
17459
17505
  var _row$cell4, _row$cell4$row, _row$cell4$row$origin, _row$cell4$row$origin2, _row$cell4$row$origin3;
@@ -17467,8 +17513,8 @@ const TableConfig = t => ({
17467
17513
  Header: t("LOCALITY"),
17468
17514
  id: "localityCode",
17469
17515
  accessor: row => {
17470
- var _row$searchData1;
17471
- return (row === null || row === void 0 ? void 0 : (_row$searchData1 = row.searchData) === null || _row$searchData1 === void 0 ? void 0 : _row$searchData1["localityCode"]) || "";
17516
+ var _row$searchData10;
17517
+ return (row === null || row === void 0 ? void 0 : (_row$searchData10 = row.searchData) === null || _row$searchData10 === void 0 ? void 0 : _row$searchData10["localityCode"]) || "";
17472
17518
  },
17473
17519
  Cell: ({
17474
17520
  row
@@ -17508,8 +17554,8 @@ const TableConfig = t => ({
17508
17554
  Header: t("MT_BOOKING_NO"),
17509
17555
  id: "bookingNo",
17510
17556
  accessor: row => {
17511
- var _row$searchData10;
17512
- return (row === null || row === void 0 ? void 0 : (_row$searchData10 = row.searchData) === null || _row$searchData10 === void 0 ? void 0 : _row$searchData10["bookingNo"]) || "";
17557
+ var _row$searchData11;
17558
+ return (row === null || row === void 0 ? void 0 : (_row$searchData11 = row.searchData) === null || _row$searchData11 === void 0 ? void 0 : _row$searchData11["bookingNo"]) || "";
17513
17559
  },
17514
17560
  Cell: ({
17515
17561
  row
@@ -17529,8 +17575,8 @@ const TableConfig = t => ({
17529
17575
  Header: t("MT_APPLICANT_NAME"),
17530
17576
  id: "applicantName",
17531
17577
  accessor: row => {
17532
- var _row$searchData11, _row$searchData11$app;
17533
- return (row === null || row === void 0 ? void 0 : (_row$searchData11 = row.searchData) === null || _row$searchData11 === void 0 ? void 0 : (_row$searchData11$app = _row$searchData11.applicantDetail) === null || _row$searchData11$app === void 0 ? void 0 : _row$searchData11$app["name"]) || "";
17578
+ var _row$searchData12, _row$searchData12$app;
17579
+ return (row === null || row === void 0 ? void 0 : (_row$searchData12 = row.searchData) === null || _row$searchData12 === void 0 ? void 0 : (_row$searchData12$app = _row$searchData12.applicantDetail) === null || _row$searchData12$app === void 0 ? void 0 : _row$searchData12$app["name"]) || "";
17534
17580
  },
17535
17581
  Cell: row => {
17536
17582
  var _row$cell5, _row$cell5$row, _row$cell5$row$origin, _row$cell5$row$origin2, _row$cell5$row$origin3;
@@ -17544,8 +17590,8 @@ const TableConfig = t => ({
17544
17590
  Header: t("MT_MOBILE_NUMBER"),
17545
17591
  id: "mobileNumber",
17546
17592
  accessor: row => {
17547
- var _row$searchData12, _row$searchData12$app;
17548
- return (row === null || row === void 0 ? void 0 : (_row$searchData12 = row.searchData) === null || _row$searchData12 === void 0 ? void 0 : (_row$searchData12$app = _row$searchData12.applicantDetail) === null || _row$searchData12$app === void 0 ? void 0 : _row$searchData12$app["mobileNumber"]) || "";
17593
+ var _row$searchData13, _row$searchData13$app;
17594
+ return (row === null || row === void 0 ? void 0 : (_row$searchData13 = row.searchData) === null || _row$searchData13 === void 0 ? void 0 : (_row$searchData13$app = _row$searchData13.applicantDetail) === null || _row$searchData13$app === void 0 ? void 0 : _row$searchData13$app["mobileNumber"]) || "";
17549
17595
  },
17550
17596
  Cell: row => {
17551
17597
  var _row$cell6, _row$cell6$row, _row$cell6$row$origin, _row$cell6$row$origin2, _row$cell6$row$origin3;
@@ -17559,8 +17605,8 @@ const TableConfig = t => ({
17559
17605
  Header: t("LOCALITY"),
17560
17606
  id: "localityCode",
17561
17607
  accessor: row => {
17562
- var _row$searchData13;
17563
- return (row === null || row === void 0 ? void 0 : (_row$searchData13 = row.searchData) === null || _row$searchData13 === void 0 ? void 0 : _row$searchData13["localityCode"]) || "";
17608
+ var _row$searchData14;
17609
+ return (row === null || row === void 0 ? void 0 : (_row$searchData14 = row.searchData) === null || _row$searchData14 === void 0 ? void 0 : _row$searchData14["localityCode"]) || "";
17564
17610
  },
17565
17611
  Cell: ({
17566
17612
  row
@@ -23495,7 +23541,8 @@ const PermissionCheck = ({
23495
23541
  function PropertyDocuments({
23496
23542
  documents,
23497
23543
  svgStyles = {},
23498
- isSendBackFlow = false
23544
+ isSendBackFlow = false,
23545
+ applicationStatus
23499
23546
  }) {
23500
23547
  const {
23501
23548
  t
@@ -23504,6 +23551,29 @@ function PropertyDocuments({
23504
23551
  const tenantId = Digit.ULBService.getCurrentTenantId();
23505
23552
  const [pdfFiles, setPdfFiles] = useState({});
23506
23553
  const [modalFile, setModalFile] = useState(null);
23554
+ const [checkedMap, setCheckedMap] = useState({});
23555
+ useEffect(() => {
23556
+ let requiredDocsCount = 0;
23557
+ let checkedCount = 0;
23558
+ documents === null || documents === void 0 ? void 0 : documents.forEach(document => {
23559
+ var _document$values;
23560
+ document === null || document === void 0 ? void 0 : (_document$values = document.values) === null || _document$values === void 0 ? void 0 : _document$values.forEach(value => {
23561
+ if (!value.isPhoto) {
23562
+ var _value$originalDoc, _value$originalDoc2;
23563
+ requiredDocsCount++;
23564
+ const isChecked = checkedMap[value === null || value === void 0 ? void 0 : (_value$originalDoc = value.originalDoc) === null || _value$originalDoc === void 0 ? void 0 : _value$originalDoc.id] ?? (value === null || value === void 0 ? void 0 : (_value$originalDoc2 = value.originalDoc) === null || _value$originalDoc2 === void 0 ? void 0 : _value$originalDoc2.isVerified) ?? false;
23565
+ if (isChecked) {
23566
+ checkedCount++;
23567
+ }
23568
+ }
23569
+ });
23570
+ });
23571
+ const allChecked = requiredDocsCount === 0 || checkedCount === requiredDocsCount;
23572
+ window.isDocumentsVerified = allChecked;
23573
+ window.dispatchEvent(new CustomEvent("DOCUMENTS_VERIFIED", {
23574
+ detail: allChecked
23575
+ }));
23576
+ }, [checkedMap, documents]);
23507
23577
  useEffect(() => {
23508
23578
  var _acc;
23509
23579
  let acc = [];
@@ -23533,6 +23603,32 @@ function PropertyDocuments({
23533
23603
  const last = parts[parts.length - 1] || "";
23534
23604
  return last.replace(/_/g, " ").replace(/\b\w/g, c => c.toUpperCase());
23535
23605
  };
23606
+ const forceDownload = async (url, fileName) => {
23607
+ try {
23608
+ const response = await fetch(url);
23609
+ if (!response.ok) {
23610
+ throw new Error(`HTTP error! status: ${response.status}`);
23611
+ }
23612
+ const blob = await response.blob();
23613
+ const contentType = response.headers.get("content-type") || blob.type;
23614
+ const blobUrl = window.URL.createObjectURL(blob);
23615
+ const baseFileName = fileName.replace(/\.[^/.]+$/, "");
23616
+ let extension = "pdf";
23617
+ if (contentType) {
23618
+ if (contentType.includes("image/jpeg")) extension = "jpg";else if (contentType.includes("image/png")) extension = "png";else if (contentType.includes("image/webp")) extension = "webp";else if (contentType.includes("application/pdf")) extension = "pdf";else if (contentType.includes("text/plain")) extension = "txt";
23619
+ }
23620
+ const link = document.createElement("a");
23621
+ link.href = blobUrl;
23622
+ link.setAttribute("download", `${baseFileName}.${extension}`);
23623
+ document.body.appendChild(link);
23624
+ link.click();
23625
+ link.parentNode.removeChild(link);
23626
+ setTimeout(() => window.URL.revokeObjectURL(blobUrl), 100);
23627
+ } catch (err) {
23628
+ console.error("Error downloading file", err);
23629
+ window.open(url, "_blank");
23630
+ }
23631
+ };
23536
23632
  const renderModal = () => {
23537
23633
  if (!modalFile) return null;
23538
23634
  const isPdf = modalFile.toLowerCase().includes(".pdf") || modalFile.toLowerCase().includes("pdf");
@@ -23541,11 +23637,47 @@ function PropertyDocuments({
23541
23637
  className: "heading-m"
23542
23638
  }, "Document Preview"),
23543
23639
  headerBarEnd: /*#__PURE__*/React.createElement("div", {
23640
+ style: {
23641
+ display: "flex",
23642
+ gap: "15px",
23643
+ alignItems: "center",
23644
+ paddingRight: "10px"
23645
+ }
23646
+ }, /*#__PURE__*/React.createElement("div", {
23647
+ onClick: () => {
23648
+ forceDownload(modalFile, "Document.pdf");
23649
+ },
23650
+ style: {
23651
+ cursor: "pointer",
23652
+ display: "flex",
23653
+ alignItems: "center"
23654
+ },
23655
+ title: "Download Document"
23656
+ }, /*#__PURE__*/React.createElement("svg", {
23657
+ xmlns: "http://www.w3.org/2000/svg",
23658
+ width: "20",
23659
+ height: "20",
23660
+ viewBox: "0 0 24 24",
23661
+ fill: "none",
23662
+ stroke: "currentColor",
23663
+ strokeWidth: "2",
23664
+ strokeLinecap: "round",
23665
+ strokeLinejoin: "round"
23666
+ }, /*#__PURE__*/React.createElement("path", {
23667
+ d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"
23668
+ }), /*#__PURE__*/React.createElement("polyline", {
23669
+ points: "7 10 12 15 17 10"
23670
+ }), /*#__PURE__*/React.createElement("line", {
23671
+ x1: "12",
23672
+ y1: "15",
23673
+ x2: "12",
23674
+ y2: "3"
23675
+ }))), /*#__PURE__*/React.createElement("div", {
23544
23676
  onClick: () => setModalFile(null),
23545
23677
  style: {
23546
23678
  cursor: "pointer",
23547
- padding: "5px",
23548
- marginTop: "-5px"
23679
+ display: "flex",
23680
+ alignItems: "center"
23549
23681
  }
23550
23682
  }, /*#__PURE__*/React.createElement("svg", {
23551
23683
  xmlns: "http://www.w3.org/2000/svg",
@@ -23558,7 +23690,7 @@ function PropertyDocuments({
23558
23690
  fill: "none"
23559
23691
  }), /*#__PURE__*/React.createElement("path", {
23560
23692
  d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
23561
- }))),
23693
+ })))),
23562
23694
  hideSubmit: true,
23563
23695
  popupStyles: {
23564
23696
  maxWidth: "80vw",
@@ -23592,7 +23724,7 @@ function PropertyDocuments({
23592
23724
  }));
23593
23725
  };
23594
23726
  const renderDocumentRow = (value, index) => {
23595
- var _pdfFiles$value$fileS, _value$originalDoc, _value$originalDoc$ad;
23727
+ var _pdfFiles$value$fileS;
23596
23728
  const fileUrl = (_pdfFiles$value$fileS = pdfFiles[value.fileStoreId]) === null || _pdfFiles$value$fileS === void 0 ? void 0 : _pdfFiles$value$fileS.split(",")[0];
23597
23729
  const docSubType = getDocSubType(value === null || value === void 0 ? void 0 : value.documentType);
23598
23730
  const docUid = (value === null || value === void 0 ? void 0 : value.documentUid) || "";
@@ -23665,32 +23797,74 @@ function PropertyDocuments({
23665
23797
  style: {
23666
23798
  cursor: "pointer"
23667
23799
  }
23668
- }, /*#__PURE__*/React.createElement(ViewsIcon, null)), !isPhoto && /*#__PURE__*/React.createElement("label", {
23669
- style: {
23670
- display: "flex",
23671
- alignItems: "center",
23672
- gap: "8px",
23673
- fontSize: "14px",
23674
- color: "#0B0C0C",
23675
- margin: 0
23676
- }
23677
- }, /*#__PURE__*/React.createElement("input", {
23678
- type: "checkbox",
23679
- style: {
23680
- width: "18px",
23681
- height: "18px",
23682
- accentColor: "#F47738"
23683
- },
23684
- defaultChecked: value === null || value === void 0 ? void 0 : (_value$originalDoc = value.originalDoc) === null || _value$originalDoc === void 0 ? void 0 : (_value$originalDoc$ad = _value$originalDoc.additionalDetails) === null || _value$originalDoc$ad === void 0 ? void 0 : _value$originalDoc$ad.isDocumentVerified,
23685
- onChange: e => {
23686
- if (value !== null && value !== void 0 && value.originalDoc) {
23687
- if (!value.originalDoc.additionalDetails) {
23688
- value.originalDoc.additionalDetails = {};
23800
+ }, /*#__PURE__*/React.createElement(ViewsIcon, null)), !isPhoto && ((_value$originalDoc3, _value$originalDoc4, _value$originalDoc5, _value$originalDoc6, _value$originalDoc7) => {
23801
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
23802
+ onClick: () => {
23803
+ if (fileUrl) {
23804
+ forceDownload(fileUrl, `${docSubType || "Document"}.pdf`);
23689
23805
  }
23690
- value.originalDoc.additionalDetails.isDocumentVerified = e.target.checked;
23806
+ },
23807
+ title: "Download Document",
23808
+ style: {
23809
+ cursor: "pointer",
23810
+ display: "flex",
23811
+ alignItems: "center"
23691
23812
  }
23692
- }
23693
- }), "Check Verified"))
23813
+ }, /*#__PURE__*/React.createElement("svg", {
23814
+ xmlns: "http://www.w3.org/2000/svg",
23815
+ width: "24",
23816
+ height: "24",
23817
+ viewBox: "0 0 24 24",
23818
+ fill: "none",
23819
+ stroke: "currentColor",
23820
+ strokeWidth: "2",
23821
+ strokeLinecap: "round",
23822
+ strokeLinejoin: "round"
23823
+ }, /*#__PURE__*/React.createElement("path", {
23824
+ d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"
23825
+ }), /*#__PURE__*/React.createElement("polyline", {
23826
+ points: "7 10 12 15 17 10"
23827
+ }), /*#__PURE__*/React.createElement("line", {
23828
+ x1: "12",
23829
+ y1: "15",
23830
+ x2: "12",
23831
+ y2: "3"
23832
+ }))), /*#__PURE__*/React.createElement("label", {
23833
+ style: {
23834
+ display: "flex",
23835
+ alignItems: "center",
23836
+ gap: "8px",
23837
+ fontSize: "14px",
23838
+ color: "#0B0C0C",
23839
+ margin: 0
23840
+ }
23841
+ }, /*#__PURE__*/React.createElement("input", {
23842
+ key: `chk-${value === null || value === void 0 ? void 0 : (_value$originalDoc5 = value.originalDoc) === null || _value$originalDoc5 === void 0 ? void 0 : _value$originalDoc5.id}-${value === null || value === void 0 ? void 0 : (_value$originalDoc6 = value.originalDoc) === null || _value$originalDoc6 === void 0 ? void 0 : _value$originalDoc6.isVerified}`,
23843
+ type: "checkbox",
23844
+ className: "verify-doc-checkbox",
23845
+ style: {
23846
+ width: "18px",
23847
+ height: "18px",
23848
+ accentColor: "#F47738",
23849
+ cursor: applicationStatus && applicationStatus !== "PENDING_FOR_DOCUMENT_VERIFICATION" ? "not-allowed" : "pointer"
23850
+ },
23851
+ disabled: applicationStatus && applicationStatus !== "PENDING_FOR_DOCUMENT_VERIFICATION",
23852
+ defaultChecked: value === null || value === void 0 ? void 0 : (_value$originalDoc7 = value.originalDoc) === null || _value$originalDoc7 === void 0 ? void 0 : _value$originalDoc7.isVerified,
23853
+ onChange: e => {
23854
+ var _value$originalDoc8;
23855
+ const checked = e.target.checked;
23856
+ if (value !== null && value !== void 0 && value.originalDoc) {
23857
+ value.originalDoc.isVerified = checked;
23858
+ }
23859
+ if (value !== null && value !== void 0 && (_value$originalDoc8 = value.originalDoc) !== null && _value$originalDoc8 !== void 0 && _value$originalDoc8.id) {
23860
+ setCheckedMap(prev => ({
23861
+ ...prev,
23862
+ [value.originalDoc.id]: checked
23863
+ }));
23864
+ }
23865
+ }
23866
+ }), "Check Verified"));
23867
+ })())
23694
23868
  })));
23695
23869
  };
23696
23870
  return /*#__PURE__*/React.createElement("div", {
@@ -23698,7 +23872,7 @@ function PropertyDocuments({
23698
23872
  marginTop: "19px"
23699
23873
  }
23700
23874
  }, renderModal(), !isStakeholderApplication && (documents === null || documents === void 0 ? void 0 : documents.map((document, index) => {
23701
- var _document$values;
23875
+ var _document$values2;
23702
23876
  return /*#__PURE__*/React.createElement(React.Fragment, {
23703
23877
  key: index
23704
23878
  }, document !== null && document !== void 0 && document.title ? /*#__PURE__*/React.createElement(CardSubHeader, {
@@ -23724,7 +23898,7 @@ function PropertyDocuments({
23724
23898
  flexWrap: "wrap",
23725
23899
  justifyContent: "flex-start"
23726
23900
  }
23727
- }, document !== null && document !== void 0 && document.values && (document === null || document === void 0 ? void 0 : document.values.length) > 0 ? document === null || document === void 0 ? void 0 : (_document$values = document.values) === null || _document$values === void 0 ? void 0 : _document$values.map((value, index) => {
23901
+ }, document !== null && document !== void 0 && document.values && (document === null || document === void 0 ? void 0 : document.values.length) > 0 ? document === null || document === void 0 ? void 0 : (_document$values2 = document.values) === null || _document$values2 === void 0 ? void 0 : _document$values2.map((value, index) => {
23728
23902
  var _pdfFiles$value$fileS2, _value$documentType;
23729
23903
  return /*#__PURE__*/React.createElement("a", {
23730
23904
  target: "_",
@@ -23764,7 +23938,7 @@ function PropertyDocuments({
23764
23938
  }, t(value === null || value === void 0 ? void 0 : value.documentType)) : "");
23765
23939
  }) : !window.location.href.includes("citizen") && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, t("BPA_NO_DOCUMENTS_UPLOADED_LABEL")))));
23766
23940
  })), isStakeholderApplication && (documents === null || documents === void 0 ? void 0 : documents.map((document, index) => {
23767
- var _document$values2;
23941
+ var _document$values3;
23768
23942
  return /*#__PURE__*/React.createElement(React.Fragment, {
23769
23943
  key: index
23770
23944
  }, document !== null && document !== void 0 && document.title ? /*#__PURE__*/React.createElement(CardSubHeader, {
@@ -23774,7 +23948,7 @@ function PropertyDocuments({
23774
23948
  color: "#505A5F",
23775
23949
  fontSize: "24px"
23776
23950
  }
23777
- }, t(document === null || document === void 0 ? void 0 : document.title)) : null, /*#__PURE__*/React.createElement("div", null, document !== null && document !== void 0 && document.values && (document === null || document === void 0 ? void 0 : document.values.length) > 0 ? document === null || document === void 0 ? void 0 : (_document$values2 = document.values) === null || _document$values2 === void 0 ? void 0 : _document$values2.map((value, index) => {
23951
+ }, t(document === null || document === void 0 ? void 0 : document.title)) : null, /*#__PURE__*/React.createElement("div", null, document !== null && document !== void 0 && document.values && (document === null || document === void 0 ? void 0 : document.values.length) > 0 ? document === null || document === void 0 ? void 0 : (_document$values3 = document.values) === null || _document$values3 === void 0 ? void 0 : _document$values3.map((value, index) => {
23778
23952
  var _pdfFiles$value$fileS3;
23779
23953
  return /*#__PURE__*/React.createElement("a", {
23780
23954
  target: "_",
@@ -23943,131 +24117,6 @@ function PropertyFloors({
23943
24117
  }));
23944
24118
  }
23945
24119
 
23946
- function PropertyOwners({
23947
- owners
23948
- }) {
23949
- let ownerSequences = {};
23950
- if (window.location.href.includes("/employee/pt/")) {
23951
- ownerSequences = owners.slice().reverse();
23952
- } else {
23953
- ownerSequences = owners;
23954
- }
23955
- const {
23956
- t
23957
- } = useTranslation();
23958
- const checkOwnerLength = (owners === null || owners === void 0 ? void 0 : owners.length) || 1;
23959
- let cardStyles = {
23960
- marginTop: "19px"
23961
- };
23962
- let statusTableStyles = {
23963
- position: "relative",
23964
- padding: "8px"
23965
- };
23966
- let rowContainerStyle = {
23967
- justifyContent: "space-between",
23968
- fontSize: "16px",
23969
- lineHeight: "19px",
23970
- color: "#0B0C0C"
23971
- };
23972
- if ( Number(checkOwnerLength) > 1) {
23973
- cardStyles = {
23974
- marginTop: "19px",
23975
- background: "#FAFAFA",
23976
- border: "1px solid #D6D5D4",
23977
- borderRadius: "4px",
23978
- padding: "8px",
23979
- lineHeight: "19px",
23980
- maxWidth: "600px",
23981
- minWidth: "280px"
23982
- };
23983
- } else if ( !(Number(checkOwnerLength) > 1)) {
23984
- cardStyles = {
23985
- marginTop: "19px",
23986
- lineHeight: "19px",
23987
- maxWidth: "600px",
23988
- minWidth: "280px"
23989
- };
23990
- statusTableStyles = {
23991
- position: "relative",
23992
- marginTop: "19px"
23993
- };
23994
- }
23995
- if (window.location.href.includes("obps")) {
23996
- cardStyles = {
23997
- ...cardStyles,
23998
- maxWidth: "950px"
23999
- };
24000
- cardStyles = {
24001
- ...cardStyles,
24002
- maxWidth: "950px"
24003
- };
24004
- rowContainerStyle = {};
24005
- }
24006
- let owners1 = owners.sort((item, item2) => {
24007
- var _item$additionalDetai, _item2$additionalDeta;
24008
- return (item === null || item === void 0 ? void 0 : (_item$additionalDetai = item.additionalDetails) === null || _item$additionalDetai === void 0 ? void 0 : _item$additionalDetai.ownerSequence) - (item2 === null || item2 === void 0 ? void 0 : (_item2$additionalDeta = item2.additionalDetails) === null || _item2$additionalDeta === void 0 ? void 0 : _item2$additionalDeta.ownerSequence);
24009
- });
24010
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
24011
- className: "owner-details"
24012
- }, ownerSequences.map((owner, index) => {
24013
- var _owner$values;
24014
- return /*#__PURE__*/React.createElement("div", {
24015
- key: t(owner === null || owner === void 0 ? void 0 : owner.title),
24016
- style: cardStyles,
24017
- className: "owner-details-child"
24018
- }, /*#__PURE__*/React.createElement(CardSubHeader, {
24019
- style: Number(checkOwnerLength) > 1 ? {
24020
- marginBottom: "8px",
24021
- paddingBottom: "9px",
24022
- color: "#0B0C0C",
24023
- fontSize: "16px",
24024
- lineHeight: "19px"
24025
- } : {
24026
- marginBottom: "8px",
24027
- color: "#505A5F",
24028
- fontSize: "24px"
24029
- }
24030
- }, Number(checkOwnerLength) > 1 ? `${t(owner === null || owner === void 0 ? void 0 : owner.title)} ${index + 1}` : t(owner === null || owner === void 0 ? void 0 : owner.title)), /*#__PURE__*/React.createElement(React.Fragment, {
24031
- key: index
24032
- }, /*#__PURE__*/React.createElement(StatusTable, {
24033
- style: statusTableStyles
24034
- }, /*#__PURE__*/React.createElement("div", {
24035
- style: {
24036
- maxWidth: "640px",
24037
- top: 0,
24038
- left: 0,
24039
- bottom: 0,
24040
- right: 0,
24041
- width: "auto"
24042
- }
24043
- }), owner === null || owner === void 0 ? void 0 : (_owner$values = owner.values) === null || _owner$values === void 0 ? void 0 : _owner$values.map((value, index) => {
24044
- var _value$values;
24045
- if (value.map === true && value.value !== "N/A") {
24046
- return /*#__PURE__*/React.createElement(Row, {
24047
- key: t(value.title),
24048
- label: t(value.title),
24049
- text: /*#__PURE__*/React.createElement("img", {
24050
- src: t(value.value),
24051
- alt: "",
24052
- privacy: value === null || value === void 0 ? void 0 : value.privacy
24053
- })
24054
- });
24055
- }
24056
- return /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Row, {
24057
- key: t(value.title),
24058
- label: `${t(value.title)}`,
24059
- text: t(value.value) || "N/A",
24060
- last: index === (value === null || value === void 0 ? void 0 : (_value$values = value.values) === null || _value$values === void 0 ? void 0 : _value$values.length) - 1,
24061
- caption: value.caption,
24062
- className: "border-none",
24063
- textStyle: value.textStyle,
24064
- privacy: value === null || value === void 0 ? void 0 : value.privacy,
24065
- rowContainerStyle: rowContainerStyle
24066
- }));
24067
- }))));
24068
- })));
24069
- }
24070
-
24071
24120
  const ScruntinyDetails = ({
24072
24121
  scrutinyDetails,
24073
24122
  paymentsList: _paymentsList = []
@@ -25869,7 +25918,7 @@ function ApplicationDetailsContent({
25869
25918
  infoClickInfoLabel: getClickInfoDetails(),
25870
25919
  infoClickInfoLabel1: getClickInfoDetails1()
25871
25920
  }) : null, applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a = applicationDetails.applicationDetails) === null || _applicationDetails$a === void 0 ? void 0 : _applicationDetails$a.map((detail, index) => {
25872
- var _detail$title, _detail$values, _detail$additionalDet, _applicationDetails$a2, _applicationDetails$a3, _applicationDetails$a4, _detail$additionalDet2, _applicationDetails$a5, _applicationDetails$a6, _detail$additionalDet3, _detail$additionalDet4, _detail$additionalDet5, _detail$additionalDet6, _detail$additionalDet7, _detail$additionalDet8, _detail$additionalDet9, _detail$additionalDet0, _detail$additionalDet1, _workflowDetails$data, _workflowDetails$data2, _detail$additionalDet10, _detail$additionalDet11, _detail$additionalDet12, _detail$additionalDet13, _detail$additionalDet14, _detail$additionalDet15, _detail$additionalDet16, _detail$additionalDet17, _detail$additionalDet18, _detail$additionalDet19, _detail$additionalDet20, _detail$additionalDet21, _detail$additionalDet22, _detail$additionalDet23, _detail$additionalDet24, _detail$additionalDet25, _detail$additionalDet26, _detail$additionalDet27, _detail$additionalDet28, _detail$additionalDet29;
25921
+ var _detail$title, _detail$values, _detail$additionalDet, _applicationDetails$a2, _applicationDetails$a3, _applicationDetails$a4, _detail$additionalDet2, _applicationDetails$a5, _applicationDetails$a6, _detail$additionalDet3, _detail$additionalDet4, _detail$additionalDet5, _detail$additionalDet6, _detail$additionalDet7, _detail$additionalDet8, _detail$additionalDet9, _workflowDetails$data, _workflowDetails$data2, _detail$additionalDet0, _detail$additionalDet1, _detail$additionalDet10, _detail$additionalDet11, _detail$additionalDet12, _detail$additionalDet13, _detail$additionalDet14, _detail$additionalDet15, _detail$additionalDet16, _detail$additionalDet17, _detail$additionalDet18, _detail$additionalDet19, _detail$additionalDet20, _detail$additionalDet21, _detail$additionalDet22, _detail$additionalDet23, _detail$additionalDet24, _detail$additionalDet25, _detail$additionalDet26, _detail$additionalDet27;
25873
25922
  return /*#__PURE__*/React.createElement(React.Fragment, {
25874
25923
  key: index
25875
25924
  }, /*#__PURE__*/React.createElement("div", {
@@ -26067,53 +26116,52 @@ function ApplicationDetailsContent({
26067
26116
  fiReport: applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a5 = applicationDetails.applicationData) === null || _applicationDetails$a5 === void 0 ? void 0 : (_applicationDetails$a6 = _applicationDetails$a5.additionalDetails) === null || _applicationDetails$a6 === void 0 ? void 0 : _applicationDetails$a6.fieldinspection_pending
26068
26117
  }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet3 = detail.additionalDetails) === null || _detail$additionalDet3 === void 0 ? void 0 : _detail$additionalDet3.floors) && /*#__PURE__*/React.createElement(PropertyFloors, {
26069
26118
  floors: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet4 = detail.additionalDetails) === null || _detail$additionalDet4 === void 0 ? void 0 : _detail$additionalDet4.floors
26070
- }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet5 = detail.additionalDetails) === null || _detail$additionalDet5 === void 0 ? void 0 : _detail$additionalDet5.owners) && /*#__PURE__*/React.createElement(PropertyOwners, {
26071
- owners: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet6 = detail.additionalDetails) === null || _detail$additionalDet6 === void 0 ? void 0 : _detail$additionalDet6.owners
26072
- }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet7 = detail.additionalDetails) === null || _detail$additionalDet7 === void 0 ? void 0 : _detail$additionalDet7.units) && /*#__PURE__*/React.createElement(TLTradeUnits, {
26073
- units: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet8 = detail.additionalDetails) === null || _detail$additionalDet8 === void 0 ? void 0 : _detail$additionalDet8.units
26074
- }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet9 = detail.additionalDetails) === null || _detail$additionalDet9 === void 0 ? void 0 : _detail$additionalDet9.accessories) && /*#__PURE__*/React.createElement(TLTradeAccessories, {
26075
- units: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet0 = detail.additionalDetails) === null || _detail$additionalDet0 === void 0 ? void 0 : _detail$additionalDet0.accessories
26076
- }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet1 = detail.additionalDetails) === null || _detail$additionalDet1 === void 0 ? void 0 : _detail$additionalDet1.permissions) && (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : (_workflowDetails$data2 = _workflowDetails$data.nextActions) === null || _workflowDetails$data2 === void 0 ? void 0 : _workflowDetails$data2.length) > 0 && /*#__PURE__*/React.createElement(PermissionCheck, {
26119
+ }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet5 = detail.additionalDetails) === null || _detail$additionalDet5 === void 0 ? void 0 : _detail$additionalDet5.units) && /*#__PURE__*/React.createElement(TLTradeUnits, {
26120
+ units: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet6 = detail.additionalDetails) === null || _detail$additionalDet6 === void 0 ? void 0 : _detail$additionalDet6.units
26121
+ }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet7 = detail.additionalDetails) === null || _detail$additionalDet7 === void 0 ? void 0 : _detail$additionalDet7.accessories) && /*#__PURE__*/React.createElement(TLTradeAccessories, {
26122
+ units: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet8 = detail.additionalDetails) === null || _detail$additionalDet8 === void 0 ? void 0 : _detail$additionalDet8.accessories
26123
+ }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet9 = detail.additionalDetails) === null || _detail$additionalDet9 === void 0 ? void 0 : _detail$additionalDet9.permissions) && (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : (_workflowDetails$data2 = _workflowDetails$data.nextActions) === null || _workflowDetails$data2 === void 0 ? void 0 : _workflowDetails$data2.length) > 0 && /*#__PURE__*/React.createElement(PermissionCheck, {
26077
26124
  applicationData: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData,
26078
26125
  t: t,
26079
- permissions: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet10 = detail.additionalDetails) === null || _detail$additionalDet10 === void 0 ? void 0 : _detail$additionalDet10.permissions
26080
- }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet11 = detail.additionalDetails) === null || _detail$additionalDet11 === void 0 ? void 0 : _detail$additionalDet11.obpsDocuments) && /*#__PURE__*/React.createElement(BPADocuments, {
26126
+ permissions: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet0 = detail.additionalDetails) === null || _detail$additionalDet0 === void 0 ? void 0 : _detail$additionalDet0.permissions
26127
+ }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet1 = detail.additionalDetails) === null || _detail$additionalDet1 === void 0 ? void 0 : _detail$additionalDet1.obpsDocuments) && /*#__PURE__*/React.createElement(BPADocuments, {
26081
26128
  t: t,
26082
26129
  applicationData: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData,
26083
26130
  docs: detail.additionalDetails.obpsDocuments,
26084
26131
  bpaActionsDetails: workflowDetails
26085
- }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet12 = detail.additionalDetails) === null || _detail$additionalDet12 === void 0 ? void 0 : _detail$additionalDet12.noc) && /*#__PURE__*/React.createElement(NOCDocuments, {
26132
+ }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet10 = detail.additionalDetails) === null || _detail$additionalDet10 === void 0 ? void 0 : _detail$additionalDet10.noc) && /*#__PURE__*/React.createElement(NOCDocuments, {
26086
26133
  t: t,
26087
26134
  isNoc: true,
26088
26135
  NOCdata: detail.values,
26089
26136
  applicationData: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData,
26090
26137
  docs: detail.additionalDetails.noc,
26091
- noc: (_detail$additionalDet13 = detail.additionalDetails) === null || _detail$additionalDet13 === void 0 ? void 0 : _detail$additionalDet13.data,
26138
+ noc: (_detail$additionalDet11 = detail.additionalDetails) === null || _detail$additionalDet11 === void 0 ? void 0 : _detail$additionalDet11.data,
26092
26139
  bpaActionsDetails: workflowDetails
26093
- }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet14 = detail.additionalDetails) === null || _detail$additionalDet14 === void 0 ? void 0 : _detail$additionalDet14.scruntinyDetails) && /*#__PURE__*/React.createElement(ScruntinyDetails, {
26140
+ }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet12 = detail.additionalDetails) === null || _detail$additionalDet12 === void 0 ? void 0 : _detail$additionalDet12.scruntinyDetails) && /*#__PURE__*/React.createElement(ScruntinyDetails, {
26094
26141
  scrutinyDetails: detail === null || detail === void 0 ? void 0 : detail.additionalDetails
26095
- }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet15 = detail.additionalDetails) === null || _detail$additionalDet15 === void 0 ? void 0 : _detail$additionalDet15.buildingExtractionDetails) && /*#__PURE__*/React.createElement(ScruntinyDetails, {
26142
+ }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet13 = detail.additionalDetails) === null || _detail$additionalDet13 === void 0 ? void 0 : _detail$additionalDet13.buildingExtractionDetails) && /*#__PURE__*/React.createElement(ScruntinyDetails, {
26096
26143
  scrutinyDetails: detail === null || detail === void 0 ? void 0 : detail.additionalDetails
26097
- }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet16 = detail.additionalDetails) === null || _detail$additionalDet16 === void 0 ? void 0 : _detail$additionalDet16.subOccupancyTableDetails) && /*#__PURE__*/React.createElement(SubOccupancyTable, {
26144
+ }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet14 = detail.additionalDetails) === null || _detail$additionalDet14 === void 0 ? void 0 : _detail$additionalDet14.subOccupancyTableDetails) && /*#__PURE__*/React.createElement(SubOccupancyTable, {
26098
26145
  edcrDetails: detail === null || detail === void 0 ? void 0 : detail.additionalDetails,
26099
26146
  applicationData: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData
26100
- }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet17 = detail.additionalDetails) === null || _detail$additionalDet17 === void 0 ? void 0 : _detail$additionalDet17.documentsWithUrl) && /*#__PURE__*/React.createElement(DocumentsPreview, {
26101
- documents: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet18 = detail.additionalDetails) === null || _detail$additionalDet18 === void 0 ? void 0 : _detail$additionalDet18.documentsWithUrl
26102
- }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet19 = detail.additionalDetails) === null || _detail$additionalDet19 === void 0 ? void 0 : _detail$additionalDet19.documents) && /*#__PURE__*/React.createElement(PropertyDocuments, {
26103
- documents: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet20 = detail.additionalDetails) === null || _detail$additionalDet20 === void 0 ? void 0 : _detail$additionalDet20.documents
26104
- }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet21 = detail.additionalDetails) === null || _detail$additionalDet21 === void 0 ? void 0 : _detail$additionalDet21.taxHeadEstimatesCalculation) && /*#__PURE__*/React.createElement(PropertyEstimates, {
26105
- taxHeadEstimatesCalculation: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet22 = detail.additionalDetails) === null || _detail$additionalDet22 === void 0 ? void 0 : _detail$additionalDet22.taxHeadEstimatesCalculation
26147
+ }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet15 = detail.additionalDetails) === null || _detail$additionalDet15 === void 0 ? void 0 : _detail$additionalDet15.documentsWithUrl) && /*#__PURE__*/React.createElement(DocumentsPreview, {
26148
+ documents: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet16 = detail.additionalDetails) === null || _detail$additionalDet16 === void 0 ? void 0 : _detail$additionalDet16.documentsWithUrl
26149
+ }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet17 = detail.additionalDetails) === null || _detail$additionalDet17 === void 0 ? void 0 : _detail$additionalDet17.documents) && /*#__PURE__*/React.createElement(PropertyDocuments, {
26150
+ documents: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet18 = detail.additionalDetails) === null || _detail$additionalDet18 === void 0 ? void 0 : _detail$additionalDet18.documents,
26151
+ applicationStatus: applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus
26152
+ }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet19 = detail.additionalDetails) === null || _detail$additionalDet19 === void 0 ? void 0 : _detail$additionalDet19.taxHeadEstimatesCalculation) && /*#__PURE__*/React.createElement(PropertyEstimates, {
26153
+ taxHeadEstimatesCalculation: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet20 = detail.additionalDetails) === null || _detail$additionalDet20 === void 0 ? void 0 : _detail$additionalDet20.taxHeadEstimatesCalculation
26106
26154
  }), (detail === null || detail === void 0 ? void 0 : detail.isWaterConnectionDetails) && /*#__PURE__*/React.createElement(WSAdditonalDetails, {
26107
26155
  wsAdditionalDetails: detail,
26108
26156
  oldValue: oldValue
26109
- }), (detail === null || detail === void 0 ? void 0 : detail.isDueVerification) && (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) === "PENDING_FOR_FIELD_INSPECTION" && /*#__PURE__*/React.createElement(DueVerification, null), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet23 = detail.additionalDetails) === null || _detail$additionalDet23 === void 0 ? void 0 : _detail$additionalDet23.redirectUrl) && /*#__PURE__*/React.createElement(Link, {
26110
- to: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet24 = detail.additionalDetails) === null || _detail$additionalDet24 === void 0 ? void 0 : (_detail$additionalDet25 = _detail$additionalDet24.redirectUrl) === null || _detail$additionalDet25 === void 0 ? void 0 : _detail$additionalDet25.url
26157
+ }), (detail === null || detail === void 0 ? void 0 : detail.isDueVerification) && (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) === "PENDING_FOR_FIELD_INSPECTION" && /*#__PURE__*/React.createElement(DueVerification, null), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet21 = detail.additionalDetails) === null || _detail$additionalDet21 === void 0 ? void 0 : _detail$additionalDet21.redirectUrl) && /*#__PURE__*/React.createElement(Link, {
26158
+ to: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet22 = detail.additionalDetails) === null || _detail$additionalDet22 === void 0 ? void 0 : (_detail$additionalDet23 = _detail$additionalDet22.redirectUrl) === null || _detail$additionalDet23 === void 0 ? void 0 : _detail$additionalDet23.url
26111
26159
  }, /*#__PURE__*/React.createElement("span", {
26112
26160
  className: "add-details-link hover-button"
26113
- }, detail === null || detail === void 0 ? void 0 : (_detail$additionalDet26 = detail.additionalDetails) === null || _detail$additionalDet26 === void 0 ? void 0 : (_detail$additionalDet27 = _detail$additionalDet26.redirectUrl) === null || _detail$additionalDet27 === void 0 ? void 0 : _detail$additionalDet27.title)), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet28 = detail.additionalDetails) === null || _detail$additionalDet28 === void 0 ? void 0 : _detail$additionalDet28.estimationDetails) && /*#__PURE__*/React.createElement(WSFeeEstimation, {
26161
+ }, detail === null || detail === void 0 ? void 0 : (_detail$additionalDet24 = detail.additionalDetails) === null || _detail$additionalDet24 === void 0 ? void 0 : (_detail$additionalDet25 = _detail$additionalDet24.redirectUrl) === null || _detail$additionalDet25 === void 0 ? void 0 : _detail$additionalDet25.title)), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet26 = detail.additionalDetails) === null || _detail$additionalDet26 === void 0 ? void 0 : _detail$additionalDet26.estimationDetails) && /*#__PURE__*/React.createElement(WSFeeEstimation, {
26114
26162
  wsAdditionalDetails: detail,
26115
26163
  workflowDetails: workflowDetails
26116
- }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet29 = detail.additionalDetails) === null || _detail$additionalDet29 === void 0 ? void 0 : _detail$additionalDet29.estimationDetails) && /*#__PURE__*/React.createElement(ViewBreakup, {
26164
+ }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet27 = detail.additionalDetails) === null || _detail$additionalDet27 === void 0 ? void 0 : _detail$additionalDet27.estimationDetails) && /*#__PURE__*/React.createElement(ViewBreakup, {
26117
26165
  wsAdditionalDetails: detail,
26118
26166
  workflowDetails: workflowDetails
26119
26167
  }));
@@ -26262,7 +26310,22 @@ function ApplicationDetailsActionBar({
26262
26310
  t
26263
26311
  } = useTranslation();
26264
26312
  let user = Digit.UserService.getUser();
26265
- const menuRef = useRef();
26313
+ const menuRef = React.useRef();
26314
+ const [isSubmitDisabled, setIsSubmitDisabled] = React.useState(() => {
26315
+ if (typeof window !== "undefined" && typeof window.isDocumentsVerified !== "undefined") {
26316
+ return !window.isDocumentsVerified;
26317
+ }
26318
+ return false;
26319
+ });
26320
+ React.useEffect(() => {
26321
+ const handleDocVerification = e => {
26322
+ setIsSubmitDisabled(!e.detail);
26323
+ };
26324
+ if (typeof window !== "undefined") {
26325
+ window.addEventListener("DOCUMENTS_VERIFIED", handleDocVerification);
26326
+ return () => window.removeEventListener("DOCUMENTS_VERIFIED", handleDocVerification);
26327
+ }
26328
+ }, []);
26266
26329
  if (window.location.href.includes("/obps") || window.location.href.includes("/noc")) {
26267
26330
  const userInfos = sessionStorage.getItem("Digit.citizen.userRequestObject");
26268
26331
  const userInfo = userInfos ? JSON.parse(userInfos) : {};
@@ -26310,7 +26373,8 @@ function ApplicationDetailsActionBar({
26310
26373
  }) : null, businessService === "ewst" ? modified === uuid || modified == null ? /*#__PURE__*/React.createElement(SubmitBar, {
26311
26374
  ref: menuRef,
26312
26375
  label: t("WF_TAKE_ACTION"),
26313
- onSubmit: () => setDisplayMenu(!displayMenu)
26376
+ onSubmit: () => setDisplayMenu(!displayMenu),
26377
+ disabled: isSubmitDisabled
26314
26378
  }) : /*#__PURE__*/React.createElement(CardLabel, {
26315
26379
  style: {
26316
26380
  color: "red",
@@ -26320,7 +26384,8 @@ function ApplicationDetailsActionBar({
26320
26384
  }, `${t("EW_ALERT_ANOTHER_VENDOR")}`) : /*#__PURE__*/React.createElement(SubmitBar, {
26321
26385
  ref: menuRef,
26322
26386
  label: t("WF_TAKE_ACTION"),
26323
- onSubmit: () => setDisplayMenu(!displayMenu)
26387
+ onSubmit: () => setDisplayMenu(!displayMenu),
26388
+ disabled: isSubmitDisabled
26324
26389
  })), !(workflowDetails !== null && workflowDetails !== void 0 && workflowDetails.isLoading) && !isMenuBotton && isSingleButton && !isAction && /*#__PURE__*/React.createElement(ActionBar, {
26325
26390
  style: {
26326
26391
  ...ActionBarStyle