@djb25/digit-ui-module-wt 1.0.66 → 1.0.68

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.
@@ -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;
@@ -17239,6 +17257,18 @@ const getFormattedCreatedAt = row => {
17239
17257
  if (!createdTime) return "";
17240
17258
  return `${Digit.DateUtils.ConvertEpochToDate(createdTime)} ${Digit.DateUtils.ConvertEpochToTimeInHours(createdTime)}`;
17241
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
+ };
17242
17272
  const GetMobCell = value => /*#__PURE__*/React.createElement("span", {
17243
17273
  className: "sla-cell"
17244
17274
  }, value);
@@ -17271,8 +17301,8 @@ const TableConfig = t => ({
17271
17301
  Header: t("WT_BOOKING_NO"),
17272
17302
  id: "bookingNo",
17273
17303
  accessor: row => {
17274
- var _row$searchData2;
17275
- 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"]) || "";
17276
17306
  },
17277
17307
  Cell: ({
17278
17308
  row
@@ -17292,8 +17322,8 @@ const TableConfig = t => ({
17292
17322
  Header: window.location.href.includes("fixed-point") ? t("WT_FIXED_POINT_NAME") : t("WT_APPLICANT_NAME"),
17293
17323
  id: "applicantName",
17294
17324
  accessor: row => {
17295
- var _row$searchData3, _row$searchData3$appl;
17296
- 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"]) || "";
17297
17327
  },
17298
17328
  Cell: row => {
17299
17329
  var _row$cell, _row$cell$row, _row$cell$row$origina, _row$cell$row$origina2, _row$cell$row$origina3;
@@ -17307,8 +17337,8 @@ const TableConfig = t => ({
17307
17337
  Header: t("WT_MOBILE_NUMBER"),
17308
17338
  id: "mobileNumber",
17309
17339
  accessor: row => {
17310
- var _row$searchData4, _row$searchData4$appl;
17311
- 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"]) || "";
17312
17342
  },
17313
17343
  Cell: row => {
17314
17344
  var _row$cell2, _row$cell2$row, _row$cell2$row$origin, _row$cell2$row$origin2, _row$cell2$row$origin3;
@@ -17322,8 +17352,8 @@ const TableConfig = t => ({
17322
17352
  Header: t("LOCALITY"),
17323
17353
  id: "localityCode",
17324
17354
  accessor: row => {
17325
- var _row$searchData5;
17326
- 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"]) || "";
17327
17357
  },
17328
17358
  Cell: ({
17329
17359
  row
@@ -17339,8 +17369,8 @@ const TableConfig = t => ({
17339
17369
  Header: t("Filling Point"),
17340
17370
  id: "fillingPoint",
17341
17371
  accessor: row => {
17342
- var _row$searchData6, _row$searchData6$fill, _row$searchData7;
17343
- 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) || "-";
17344
17374
  },
17345
17375
  Cell: ({
17346
17376
  row
@@ -17381,6 +17411,14 @@ const TableConfig = t => ({
17381
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"]}`));
17382
17412
  }
17383
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
+ }, {
17384
17422
  Header: t("WT_VENDOR_NAME"),
17385
17423
  id: "vendorName",
17386
17424
  accessor: row => getVendorNameFromSearchData(row === null || row === void 0 ? void 0 : row.searchData),
@@ -17424,8 +17462,8 @@ const TableConfig = t => ({
17424
17462
  Header: t("MT_BOOKING_NO"),
17425
17463
  id: "bookingNo",
17426
17464
  accessor: row => {
17427
- var _row$searchData8;
17428
- 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"]) || "";
17429
17467
  },
17430
17468
  Cell: ({
17431
17469
  row
@@ -17445,8 +17483,8 @@ const TableConfig = t => ({
17445
17483
  Header: t("MT_APPLICANT_NAME"),
17446
17484
  id: "applicantName",
17447
17485
  accessor: row => {
17448
- var _row$searchData9, _row$searchData9$appl;
17449
- 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"]) || "";
17450
17488
  },
17451
17489
  Cell: row => {
17452
17490
  var _row$cell3, _row$cell3$row, _row$cell3$row$origin, _row$cell3$row$origin2, _row$cell3$row$origin3;
@@ -17460,8 +17498,8 @@ const TableConfig = t => ({
17460
17498
  Header: t("MT_MOBILE_NUMBER"),
17461
17499
  id: "mobileNumber",
17462
17500
  accessor: row => {
17463
- var _row$searchData0, _row$searchData0$appl;
17464
- 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"]) || "";
17465
17503
  },
17466
17504
  Cell: row => {
17467
17505
  var _row$cell4, _row$cell4$row, _row$cell4$row$origin, _row$cell4$row$origin2, _row$cell4$row$origin3;
@@ -17475,8 +17513,8 @@ const TableConfig = t => ({
17475
17513
  Header: t("LOCALITY"),
17476
17514
  id: "localityCode",
17477
17515
  accessor: row => {
17478
- var _row$searchData1;
17479
- 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"]) || "";
17480
17518
  },
17481
17519
  Cell: ({
17482
17520
  row
@@ -17516,8 +17554,8 @@ const TableConfig = t => ({
17516
17554
  Header: t("MT_BOOKING_NO"),
17517
17555
  id: "bookingNo",
17518
17556
  accessor: row => {
17519
- var _row$searchData10;
17520
- 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"]) || "";
17521
17559
  },
17522
17560
  Cell: ({
17523
17561
  row
@@ -17537,8 +17575,8 @@ const TableConfig = t => ({
17537
17575
  Header: t("MT_APPLICANT_NAME"),
17538
17576
  id: "applicantName",
17539
17577
  accessor: row => {
17540
- var _row$searchData11, _row$searchData11$app;
17541
- 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"]) || "";
17542
17580
  },
17543
17581
  Cell: row => {
17544
17582
  var _row$cell5, _row$cell5$row, _row$cell5$row$origin, _row$cell5$row$origin2, _row$cell5$row$origin3;
@@ -17552,8 +17590,8 @@ const TableConfig = t => ({
17552
17590
  Header: t("MT_MOBILE_NUMBER"),
17553
17591
  id: "mobileNumber",
17554
17592
  accessor: row => {
17555
- var _row$searchData12, _row$searchData12$app;
17556
- 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"]) || "";
17557
17595
  },
17558
17596
  Cell: row => {
17559
17597
  var _row$cell6, _row$cell6$row, _row$cell6$row$origin, _row$cell6$row$origin2, _row$cell6$row$origin3;
@@ -17567,8 +17605,8 @@ const TableConfig = t => ({
17567
17605
  Header: t("LOCALITY"),
17568
17606
  id: "localityCode",
17569
17607
  accessor: row => {
17570
- var _row$searchData13;
17571
- 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"]) || "";
17572
17610
  },
17573
17611
  Cell: ({
17574
17612
  row
@@ -21545,6 +21583,14 @@ const ActionModal$5 = ({
21545
21583
  if (parsedAdhocRebateData !== null && parsedAdhocRebateData !== void 0 && (_parsedAdhocRebateDat7 = parsedAdhocRebateData.value) !== null && _parsedAdhocRebateDat7 !== void 0 && _parsedAdhocRebateDat7.adhocRebate) applicationData.additionalDetails.adhocRebate = parseInt(parsedAdhocRebateData === null || parsedAdhocRebateData === void 0 ? void 0 : (_parsedAdhocRebateDat8 = parsedAdhocRebateData.value) === null || _parsedAdhocRebateDat8 === void 0 ? void 0 : _parsedAdhocRebateDat8.adhocRebate) || "";
21546
21584
  if (parsedAdhocRebateData !== null && parsedAdhocRebateData !== void 0 && (_parsedAdhocRebateDat9 = parsedAdhocRebateData.value) !== null && _parsedAdhocRebateDat9 !== void 0 && _parsedAdhocRebateDat9.adhocRebateComment) applicationData.additionalDetails.adhocRebateComment = (parsedAdhocRebateData === null || parsedAdhocRebateData === void 0 ? void 0 : (_parsedAdhocRebateDat0 = parsedAdhocRebateData.value) === null || _parsedAdhocRebateDat0 === void 0 ? void 0 : _parsedAdhocRebateDat0.adhocRebateComment) || "";
21547
21585
  if (parsedAdhocRebateData !== null && parsedAdhocRebateData !== void 0 && (_parsedAdhocRebateDat1 = parsedAdhocRebateData.value) !== null && _parsedAdhocRebateDat1 !== void 0 && _parsedAdhocRebateDat1.adhocRebateReason) applicationData.additionalDetails.adhocRebateReason = (parsedAdhocRebateData === null || parsedAdhocRebateData === void 0 ? void 0 : (_parsedAdhocRebateDat10 = parsedAdhocRebateData.value) === null || _parsedAdhocRebateDat10 === void 0 ? void 0 : _parsedAdhocRebateDat10.adhocRebateReason) || "";
21586
+ const dueVerificationData = sessionStorage.getItem("Digit.DUE_VERIFICATION_DATA");
21587
+ if (dueVerificationData) {
21588
+ try {
21589
+ applicationData.dueVerification = JSON.parse(dueVerificationData);
21590
+ } catch (e) {
21591
+ console.error("Error parsing due verification data", e);
21592
+ }
21593
+ }
21548
21594
  ((_applicationData12 = applicationData) === null || _applicationData12 === void 0 ? void 0 : _applicationData12.serviceType) == "WATER" ? submitAction({
21549
21595
  WaterConnection: applicationData,
21550
21596
  disconnectRequest: false,
@@ -23503,7 +23549,8 @@ const PermissionCheck = ({
23503
23549
  function PropertyDocuments({
23504
23550
  documents,
23505
23551
  svgStyles = {},
23506
- isSendBackFlow = false
23552
+ isSendBackFlow = false,
23553
+ applicationStatus
23507
23554
  }) {
23508
23555
  const {
23509
23556
  t
@@ -23512,6 +23559,31 @@ function PropertyDocuments({
23512
23559
  const tenantId = Digit.ULBService.getCurrentTenantId();
23513
23560
  const [pdfFiles, setPdfFiles] = useState({});
23514
23561
  const [modalFile, setModalFile] = useState(null);
23562
+ const [checkedMap, setCheckedMap] = useState({});
23563
+ useEffect(() => {
23564
+ let requiredDocsCount = 0;
23565
+ let checkedCount = 0;
23566
+ documents === null || documents === void 0 ? void 0 : documents.forEach(document => {
23567
+ var _document$values;
23568
+ document === null || document === void 0 ? void 0 : (_document$values = document.values) === null || _document$values === void 0 ? void 0 : _document$values.forEach(value => {
23569
+ if (!value.isPhoto) {
23570
+ var _value$originalDoc, _value$originalDoc2;
23571
+ requiredDocsCount++;
23572
+ 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;
23573
+ if (isChecked) {
23574
+ checkedCount++;
23575
+ }
23576
+ }
23577
+ });
23578
+ });
23579
+ const allChecked = requiredDocsCount === 0 || checkedCount === requiredDocsCount;
23580
+ const isDocVerifState = !applicationStatus || applicationStatus === "PENDING_FOR_DOCUMENT_VERIFICATION";
23581
+ const finalVerified = isDocVerifState ? allChecked : true;
23582
+ window.isDocumentsVerified = finalVerified;
23583
+ window.dispatchEvent(new CustomEvent("DOCUMENTS_VERIFIED", {
23584
+ detail: finalVerified
23585
+ }));
23586
+ }, [checkedMap, documents, applicationStatus]);
23515
23587
  useEffect(() => {
23516
23588
  var _acc;
23517
23589
  let acc = [];
@@ -23541,6 +23613,32 @@ function PropertyDocuments({
23541
23613
  const last = parts[parts.length - 1] || "";
23542
23614
  return last.replace(/_/g, " ").replace(/\b\w/g, c => c.toUpperCase());
23543
23615
  };
23616
+ const forceDownload = async (url, fileName) => {
23617
+ try {
23618
+ const response = await fetch(url);
23619
+ if (!response.ok) {
23620
+ throw new Error(`HTTP error! status: ${response.status}`);
23621
+ }
23622
+ const blob = await response.blob();
23623
+ const contentType = response.headers.get("content-type") || blob.type;
23624
+ const blobUrl = window.URL.createObjectURL(blob);
23625
+ const baseFileName = fileName.replace(/\.[^/.]+$/, "");
23626
+ let extension = "pdf";
23627
+ if (contentType) {
23628
+ 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";
23629
+ }
23630
+ const link = document.createElement("a");
23631
+ link.href = blobUrl;
23632
+ link.setAttribute("download", `${baseFileName}.${extension}`);
23633
+ document.body.appendChild(link);
23634
+ link.click();
23635
+ link.parentNode.removeChild(link);
23636
+ setTimeout(() => window.URL.revokeObjectURL(blobUrl), 100);
23637
+ } catch (err) {
23638
+ console.error("Error downloading file", err);
23639
+ window.open(url, "_blank");
23640
+ }
23641
+ };
23544
23642
  const renderModal = () => {
23545
23643
  if (!modalFile) return null;
23546
23644
  const isPdf = modalFile.toLowerCase().includes(".pdf") || modalFile.toLowerCase().includes("pdf");
@@ -23549,11 +23647,47 @@ function PropertyDocuments({
23549
23647
  className: "heading-m"
23550
23648
  }, "Document Preview"),
23551
23649
  headerBarEnd: /*#__PURE__*/React.createElement("div", {
23650
+ style: {
23651
+ display: "flex",
23652
+ gap: "15px",
23653
+ alignItems: "center",
23654
+ paddingRight: "10px"
23655
+ }
23656
+ }, /*#__PURE__*/React.createElement("div", {
23657
+ onClick: () => {
23658
+ forceDownload(modalFile, "Document.pdf");
23659
+ },
23660
+ style: {
23661
+ cursor: "pointer",
23662
+ display: "flex",
23663
+ alignItems: "center"
23664
+ },
23665
+ title: "Download Document"
23666
+ }, /*#__PURE__*/React.createElement("svg", {
23667
+ xmlns: "http://www.w3.org/2000/svg",
23668
+ width: "20",
23669
+ height: "20",
23670
+ viewBox: "0 0 24 24",
23671
+ fill: "none",
23672
+ stroke: "currentColor",
23673
+ strokeWidth: "2",
23674
+ strokeLinecap: "round",
23675
+ strokeLinejoin: "round"
23676
+ }, /*#__PURE__*/React.createElement("path", {
23677
+ d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"
23678
+ }), /*#__PURE__*/React.createElement("polyline", {
23679
+ points: "7 10 12 15 17 10"
23680
+ }), /*#__PURE__*/React.createElement("line", {
23681
+ x1: "12",
23682
+ y1: "15",
23683
+ x2: "12",
23684
+ y2: "3"
23685
+ }))), /*#__PURE__*/React.createElement("div", {
23552
23686
  onClick: () => setModalFile(null),
23553
23687
  style: {
23554
23688
  cursor: "pointer",
23555
- padding: "5px",
23556
- marginTop: "-5px"
23689
+ display: "flex",
23690
+ alignItems: "center"
23557
23691
  }
23558
23692
  }, /*#__PURE__*/React.createElement("svg", {
23559
23693
  xmlns: "http://www.w3.org/2000/svg",
@@ -23566,7 +23700,7 @@ function PropertyDocuments({
23566
23700
  fill: "none"
23567
23701
  }), /*#__PURE__*/React.createElement("path", {
23568
23702
  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"
23569
- }))),
23703
+ })))),
23570
23704
  hideSubmit: true,
23571
23705
  popupStyles: {
23572
23706
  maxWidth: "80vw",
@@ -23600,7 +23734,7 @@ function PropertyDocuments({
23600
23734
  }));
23601
23735
  };
23602
23736
  const renderDocumentRow = (value, index) => {
23603
- var _pdfFiles$value$fileS, _value$originalDoc, _value$originalDoc2, _value$originalDoc3;
23737
+ var _pdfFiles$value$fileS;
23604
23738
  const fileUrl = (_pdfFiles$value$fileS = pdfFiles[value.fileStoreId]) === null || _pdfFiles$value$fileS === void 0 ? void 0 : _pdfFiles$value$fileS.split(",")[0];
23605
23739
  const docSubType = getDocSubType(value === null || value === void 0 ? void 0 : value.documentType);
23606
23740
  const docUid = (value === null || value === void 0 ? void 0 : value.documentUid) || "";
@@ -23673,30 +23807,74 @@ function PropertyDocuments({
23673
23807
  style: {
23674
23808
  cursor: "pointer"
23675
23809
  }
23676
- }, /*#__PURE__*/React.createElement(ViewsIcon, null)), !isPhoto && /*#__PURE__*/React.createElement("label", {
23677
- style: {
23678
- display: "flex",
23679
- alignItems: "center",
23680
- gap: "8px",
23681
- fontSize: "14px",
23682
- color: "#0B0C0C",
23683
- margin: 0
23684
- }
23685
- }, /*#__PURE__*/React.createElement("input", {
23686
- key: `chk-${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}`,
23687
- type: "checkbox",
23688
- style: {
23689
- width: "18px",
23690
- height: "18px",
23691
- accentColor: "#F47738"
23692
- },
23693
- defaultChecked: value === null || value === void 0 ? void 0 : (_value$originalDoc3 = value.originalDoc) === null || _value$originalDoc3 === void 0 ? void 0 : _value$originalDoc3.isVerified,
23694
- onChange: e => {
23695
- if (value !== null && value !== void 0 && value.originalDoc) {
23696
- value.originalDoc.isVerified = e.target.checked;
23810
+ }, /*#__PURE__*/React.createElement(ViewsIcon, null)), !isPhoto && ((_value$originalDoc3, _value$originalDoc4, _value$originalDoc5, _value$originalDoc6, _value$originalDoc7) => {
23811
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
23812
+ onClick: () => {
23813
+ if (fileUrl) {
23814
+ forceDownload(fileUrl, `${docSubType || "Document"}.pdf`);
23815
+ }
23816
+ },
23817
+ title: "Download Document",
23818
+ style: {
23819
+ cursor: "pointer",
23820
+ display: "flex",
23821
+ alignItems: "center"
23697
23822
  }
23698
- }
23699
- }), "Check Verified"))
23823
+ }, /*#__PURE__*/React.createElement("svg", {
23824
+ xmlns: "http://www.w3.org/2000/svg",
23825
+ width: "24",
23826
+ height: "24",
23827
+ viewBox: "0 0 24 24",
23828
+ fill: "none",
23829
+ stroke: "currentColor",
23830
+ strokeWidth: "2",
23831
+ strokeLinecap: "round",
23832
+ strokeLinejoin: "round"
23833
+ }, /*#__PURE__*/React.createElement("path", {
23834
+ d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"
23835
+ }), /*#__PURE__*/React.createElement("polyline", {
23836
+ points: "7 10 12 15 17 10"
23837
+ }), /*#__PURE__*/React.createElement("line", {
23838
+ x1: "12",
23839
+ y1: "15",
23840
+ x2: "12",
23841
+ y2: "3"
23842
+ }))), /*#__PURE__*/React.createElement("label", {
23843
+ style: {
23844
+ display: "flex",
23845
+ alignItems: "center",
23846
+ gap: "8px",
23847
+ fontSize: "14px",
23848
+ color: "#0B0C0C",
23849
+ margin: 0
23850
+ }
23851
+ }, /*#__PURE__*/React.createElement("input", {
23852
+ 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}`,
23853
+ type: "checkbox",
23854
+ className: "verify-doc-checkbox",
23855
+ style: {
23856
+ width: "18px",
23857
+ height: "18px",
23858
+ accentColor: "#F47738",
23859
+ cursor: applicationStatus && applicationStatus !== "PENDING_FOR_DOCUMENT_VERIFICATION" ? "not-allowed" : "pointer"
23860
+ },
23861
+ disabled: applicationStatus && applicationStatus !== "PENDING_FOR_DOCUMENT_VERIFICATION",
23862
+ defaultChecked: value === null || value === void 0 ? void 0 : (_value$originalDoc7 = value.originalDoc) === null || _value$originalDoc7 === void 0 ? void 0 : _value$originalDoc7.isVerified,
23863
+ onChange: e => {
23864
+ var _value$originalDoc8;
23865
+ const checked = e.target.checked;
23866
+ if (value !== null && value !== void 0 && value.originalDoc) {
23867
+ value.originalDoc.isVerified = checked;
23868
+ }
23869
+ if (value !== null && value !== void 0 && (_value$originalDoc8 = value.originalDoc) !== null && _value$originalDoc8 !== void 0 && _value$originalDoc8.id) {
23870
+ setCheckedMap(prev => ({
23871
+ ...prev,
23872
+ [value.originalDoc.id]: checked
23873
+ }));
23874
+ }
23875
+ }
23876
+ }), "Check Verified"));
23877
+ })())
23700
23878
  })));
23701
23879
  };
23702
23880
  return /*#__PURE__*/React.createElement("div", {
@@ -23704,7 +23882,7 @@ function PropertyDocuments({
23704
23882
  marginTop: "19px"
23705
23883
  }
23706
23884
  }, renderModal(), !isStakeholderApplication && (documents === null || documents === void 0 ? void 0 : documents.map((document, index) => {
23707
- var _document$values;
23885
+ var _document$values2;
23708
23886
  return /*#__PURE__*/React.createElement(React.Fragment, {
23709
23887
  key: index
23710
23888
  }, document !== null && document !== void 0 && document.title ? /*#__PURE__*/React.createElement(CardSubHeader, {
@@ -23730,7 +23908,7 @@ function PropertyDocuments({
23730
23908
  flexWrap: "wrap",
23731
23909
  justifyContent: "flex-start"
23732
23910
  }
23733
- }, 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) => {
23911
+ }, 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) => {
23734
23912
  var _pdfFiles$value$fileS2, _value$documentType;
23735
23913
  return /*#__PURE__*/React.createElement("a", {
23736
23914
  target: "_",
@@ -23770,7 +23948,7 @@ function PropertyDocuments({
23770
23948
  }, t(value === null || value === void 0 ? void 0 : value.documentType)) : "");
23771
23949
  }) : !window.location.href.includes("citizen") && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, t("BPA_NO_DOCUMENTS_UPLOADED_LABEL")))));
23772
23950
  })), isStakeholderApplication && (documents === null || documents === void 0 ? void 0 : documents.map((document, index) => {
23773
- var _document$values2;
23951
+ var _document$values3;
23774
23952
  return /*#__PURE__*/React.createElement(React.Fragment, {
23775
23953
  key: index
23776
23954
  }, document !== null && document !== void 0 && document.title ? /*#__PURE__*/React.createElement(CardSubHeader, {
@@ -23780,7 +23958,7 @@ function PropertyDocuments({
23780
23958
  color: "#505A5F",
23781
23959
  fontSize: "24px"
23782
23960
  }
23783
- }, 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) => {
23961
+ }, 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) => {
23784
23962
  var _pdfFiles$value$fileS3;
23785
23963
  return /*#__PURE__*/React.createElement("a", {
23786
23964
  target: "_",
@@ -23949,131 +24127,6 @@ function PropertyFloors({
23949
24127
  }));
23950
24128
  }
23951
24129
 
23952
- function PropertyOwners({
23953
- owners
23954
- }) {
23955
- let ownerSequences = {};
23956
- if (window.location.href.includes("/employee/pt/")) {
23957
- ownerSequences = owners.slice().reverse();
23958
- } else {
23959
- ownerSequences = owners;
23960
- }
23961
- const {
23962
- t
23963
- } = useTranslation();
23964
- const checkOwnerLength = (owners === null || owners === void 0 ? void 0 : owners.length) || 1;
23965
- let cardStyles = {
23966
- marginTop: "19px"
23967
- };
23968
- let statusTableStyles = {
23969
- position: "relative",
23970
- padding: "8px"
23971
- };
23972
- let rowContainerStyle = {
23973
- justifyContent: "space-between",
23974
- fontSize: "16px",
23975
- lineHeight: "19px",
23976
- color: "#0B0C0C"
23977
- };
23978
- if ( Number(checkOwnerLength) > 1) {
23979
- cardStyles = {
23980
- marginTop: "19px",
23981
- background: "#FAFAFA",
23982
- border: "1px solid #D6D5D4",
23983
- borderRadius: "4px",
23984
- padding: "8px",
23985
- lineHeight: "19px",
23986
- maxWidth: "600px",
23987
- minWidth: "280px"
23988
- };
23989
- } else if ( !(Number(checkOwnerLength) > 1)) {
23990
- cardStyles = {
23991
- marginTop: "19px",
23992
- lineHeight: "19px",
23993
- maxWidth: "600px",
23994
- minWidth: "280px"
23995
- };
23996
- statusTableStyles = {
23997
- position: "relative",
23998
- marginTop: "19px"
23999
- };
24000
- }
24001
- if (window.location.href.includes("obps")) {
24002
- cardStyles = {
24003
- ...cardStyles,
24004
- maxWidth: "950px"
24005
- };
24006
- cardStyles = {
24007
- ...cardStyles,
24008
- maxWidth: "950px"
24009
- };
24010
- rowContainerStyle = {};
24011
- }
24012
- let owners1 = owners.sort((item, item2) => {
24013
- var _item$additionalDetai, _item2$additionalDeta;
24014
- 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);
24015
- });
24016
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
24017
- className: "owner-details"
24018
- }, ownerSequences.map((owner, index) => {
24019
- var _owner$values;
24020
- return /*#__PURE__*/React.createElement("div", {
24021
- key: t(owner === null || owner === void 0 ? void 0 : owner.title),
24022
- style: cardStyles,
24023
- className: "owner-details-child"
24024
- }, /*#__PURE__*/React.createElement(CardSubHeader, {
24025
- style: Number(checkOwnerLength) > 1 ? {
24026
- marginBottom: "8px",
24027
- paddingBottom: "9px",
24028
- color: "#0B0C0C",
24029
- fontSize: "16px",
24030
- lineHeight: "19px"
24031
- } : {
24032
- marginBottom: "8px",
24033
- color: "#505A5F",
24034
- fontSize: "24px"
24035
- }
24036
- }, 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, {
24037
- key: index
24038
- }, /*#__PURE__*/React.createElement(StatusTable, {
24039
- style: statusTableStyles
24040
- }, /*#__PURE__*/React.createElement("div", {
24041
- style: {
24042
- maxWidth: "640px",
24043
- top: 0,
24044
- left: 0,
24045
- bottom: 0,
24046
- right: 0,
24047
- width: "auto"
24048
- }
24049
- }), owner === null || owner === void 0 ? void 0 : (_owner$values = owner.values) === null || _owner$values === void 0 ? void 0 : _owner$values.map((value, index) => {
24050
- var _value$values;
24051
- if (value.map === true && value.value !== "N/A") {
24052
- return /*#__PURE__*/React.createElement(Row, {
24053
- key: t(value.title),
24054
- label: t(value.title),
24055
- text: /*#__PURE__*/React.createElement("img", {
24056
- src: t(value.value),
24057
- alt: "",
24058
- privacy: value === null || value === void 0 ? void 0 : value.privacy
24059
- })
24060
- });
24061
- }
24062
- return /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Row, {
24063
- key: t(value.title),
24064
- label: `${t(value.title)}`,
24065
- text: t(value.value) || "N/A",
24066
- last: index === (value === null || value === void 0 ? void 0 : (_value$values = value.values) === null || _value$values === void 0 ? void 0 : _value$values.length) - 1,
24067
- caption: value.caption,
24068
- className: "border-none",
24069
- textStyle: value.textStyle,
24070
- privacy: value === null || value === void 0 ? void 0 : value.privacy,
24071
- rowContainerStyle: rowContainerStyle
24072
- }));
24073
- }))));
24074
- })));
24075
- }
24076
-
24077
24130
  const ScruntinyDetails = ({
24078
24131
  scrutinyDetails,
24079
24132
  paymentsList: _paymentsList = []
@@ -25498,7 +25551,9 @@ const RenewPopup = ({
25498
25551
  })))));
25499
25552
  };
25500
25553
 
25501
- const DueVerification = () => {
25554
+ const DueVerification = ({
25555
+ applicationData
25556
+ }) => {
25502
25557
  const {
25503
25558
  t
25504
25559
  } = useTranslation();
@@ -25520,6 +25575,19 @@ const DueVerification = () => {
25520
25575
  Header: t("Total Amount"),
25521
25576
  accessor: "totalAmount"
25522
25577
  }], [t]);
25578
+ useEffect(() => {
25579
+ const savedData = sessionStorage.getItem("Digit.DUE_VERIFICATION_DATA");
25580
+ if (savedData) {
25581
+ try {
25582
+ setTableData(JSON.parse(savedData));
25583
+ } catch (e) {
25584
+ console.error("Error parsing due verification data", e);
25585
+ }
25586
+ } else if (applicationData !== null && applicationData !== void 0 && applicationData.dueVerification && Array.isArray(applicationData.dueVerification)) {
25587
+ setTableData(applicationData.dueVerification);
25588
+ sessionStorage.setItem("Digit.DUE_VERIFICATION_DATA", JSON.stringify(applicationData.dueVerification));
25589
+ }
25590
+ }, [applicationData]);
25523
25591
  const handleAdd = () => {
25524
25592
  if (kno) {
25525
25593
  const mockData = {
@@ -25529,7 +25597,9 @@ const DueVerification = () => {
25529
25597
  dueAmount: "1500",
25530
25598
  totalAmount: "1500"
25531
25599
  };
25532
- setTableData([...tableData, mockData]);
25600
+ const newTableData = [...tableData, mockData];
25601
+ setTableData(newTableData);
25602
+ sessionStorage.setItem("Digit.DUE_VERIFICATION_DATA", JSON.stringify(newTableData));
25533
25603
  setKno("");
25534
25604
  }
25535
25605
  };
@@ -25541,7 +25611,6 @@ const DueVerification = () => {
25541
25611
  style: {
25542
25612
  fontSize: "24px",
25543
25613
  fontWeight: "bold",
25544
- color: "#4f6cfc",
25545
25614
  marginBottom: "16px"
25546
25615
  }
25547
25616
  }, t("Due Verification")), /*#__PURE__*/React.createElement("div", {
@@ -25583,14 +25652,13 @@ const DueVerification = () => {
25583
25652
  type: "button",
25584
25653
  onClick: handleAdd,
25585
25654
  style: {
25586
- backgroundColor: "#4f6cfc",
25587
- color: "white",
25655
+ background: "linear-gradient(135deg, #1f5fa8, #0b2e5b)",
25588
25656
  padding: "8px 24px",
25589
25657
  borderRadius: "4px",
25590
25658
  border: "none",
25591
25659
  cursor: "pointer"
25592
25660
  }
25593
- }, t("Add")))), tableData.length > 0 && /*#__PURE__*/React.createElement("div", {
25661
+ }, /*#__PURE__*/React.createElement(AddIcon, null)))), tableData.length > 0 && /*#__PURE__*/React.createElement("div", {
25594
25662
  style: {
25595
25663
  marginTop: "30px",
25596
25664
  overflowX: "auto"
@@ -25614,6 +25682,112 @@ const DueVerification = () => {
25614
25682
  })));
25615
25683
  };
25616
25684
 
25685
+ const InspectionInformation = () => {
25686
+ const {
25687
+ t
25688
+ } = useTranslation();
25689
+ const [inspectionType, setInspectionType] = useState(null);
25690
+ const [inspectionDate, setInspectionDate] = useState("");
25691
+ const [inspectorName, setInspectorName] = useState("");
25692
+ const inspectionTypeOptions = [{
25693
+ name: "Select",
25694
+ code: ""
25695
+ }];
25696
+ return /*#__PURE__*/React.createElement("div", {
25697
+ style: {
25698
+ marginBottom: "20px"
25699
+ }
25700
+ }, /*#__PURE__*/React.createElement("h2", {
25701
+ style: {
25702
+ fontSize: "24px",
25703
+ fontWeight: "bold",
25704
+ marginBottom: "16px"
25705
+ }
25706
+ }, t("Inspection Information")), /*#__PURE__*/React.createElement("div", {
25707
+ style: {
25708
+ display: "flex",
25709
+ gap: "20px",
25710
+ marginBottom: "20px",
25711
+ flexWrap: "wrap"
25712
+ }
25713
+ }, /*#__PURE__*/React.createElement("div", {
25714
+ style: {
25715
+ flex: "1"
25716
+ }
25717
+ }, /*#__PURE__*/React.createElement("span", {
25718
+ style: {
25719
+ fontSize: "16px",
25720
+ color: "#0B0C0C",
25721
+ marginBottom: "8px",
25722
+ display: "inline-block"
25723
+ }
25724
+ }, t("Inspection Type"), " ", /*#__PURE__*/React.createElement("span", {
25725
+ style: {
25726
+ color: "red"
25727
+ }
25728
+ }, "*")), /*#__PURE__*/React.createElement(Dropdown, {
25729
+ option: inspectionTypeOptions,
25730
+ optionKey: "name",
25731
+ id: "inspectionType",
25732
+ selected: inspectionType,
25733
+ select: setInspectionType,
25734
+ t: t,
25735
+ style: {
25736
+ width: "100%"
25737
+ }
25738
+ })), /*#__PURE__*/React.createElement("div", {
25739
+ style: {
25740
+ flex: "1"
25741
+ }
25742
+ }, /*#__PURE__*/React.createElement("span", {
25743
+ style: {
25744
+ fontSize: "16px",
25745
+ color: "#0B0C0C",
25746
+ marginBottom: "8px",
25747
+ display: "inline-block"
25748
+ }
25749
+ }, t("Inspection Date"), " ", /*#__PURE__*/React.createElement("span", {
25750
+ style: {
25751
+ color: "red"
25752
+ }
25753
+ }, "*")), /*#__PURE__*/React.createElement(DatePicker, {
25754
+ date: inspectionDate,
25755
+ onChange: setInspectionDate,
25756
+ style: {
25757
+ width: "100%"
25758
+ }
25759
+ }))), /*#__PURE__*/React.createElement("div", {
25760
+ style: {
25761
+ display: "flex",
25762
+ gap: "20px",
25763
+ marginBottom: "20px",
25764
+ flexWrap: "wrap"
25765
+ }
25766
+ }, /*#__PURE__*/React.createElement("div", {
25767
+ style: {
25768
+ flex: "1"
25769
+ }
25770
+ }, /*#__PURE__*/React.createElement("span", {
25771
+ style: {
25772
+ fontSize: "16px",
25773
+ color: "#0B0C0C",
25774
+ marginBottom: "8px",
25775
+ display: "inline-block"
25776
+ }
25777
+ }, t("Inspector Name"), " ", /*#__PURE__*/React.createElement("span", {
25778
+ style: {
25779
+ color: "red"
25780
+ }
25781
+ }, "*")), /*#__PURE__*/React.createElement(TextInput, {
25782
+ value: inspectorName,
25783
+ onChange: e => setInspectorName(e.target.value),
25784
+ style: {
25785
+ width: "50%",
25786
+ marginBottom: "0"
25787
+ }
25788
+ }))));
25789
+ };
25790
+
25617
25791
  function ApplicationDetailsContent({
25618
25792
  applicationDetails,
25619
25793
  workflowDetails,
@@ -25875,7 +26049,7 @@ function ApplicationDetailsContent({
25875
26049
  infoClickInfoLabel: getClickInfoDetails(),
25876
26050
  infoClickInfoLabel1: getClickInfoDetails1()
25877
26051
  }) : null, applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a = applicationDetails.applicationDetails) === null || _applicationDetails$a === void 0 ? void 0 : _applicationDetails$a.map((detail, index) => {
25878
- 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;
26052
+ 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, _detail$additionalDet28, _detail$additionalDet29;
25879
26053
  return /*#__PURE__*/React.createElement(React.Fragment, {
25880
26054
  key: index
25881
26055
  }, /*#__PURE__*/React.createElement("div", {
@@ -26073,46 +26247,47 @@ function ApplicationDetailsContent({
26073
26247
  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
26074
26248
  }), (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, {
26075
26249
  floors: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet4 = detail.additionalDetails) === null || _detail$additionalDet4 === void 0 ? void 0 : _detail$additionalDet4.floors
26076
- }), (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, {
26077
- owners: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet6 = detail.additionalDetails) === null || _detail$additionalDet6 === void 0 ? void 0 : _detail$additionalDet6.owners
26078
- }), (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, {
26079
- units: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet8 = detail.additionalDetails) === null || _detail$additionalDet8 === void 0 ? void 0 : _detail$additionalDet8.units
26080
- }), (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, {
26081
- units: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet0 = detail.additionalDetails) === null || _detail$additionalDet0 === void 0 ? void 0 : _detail$additionalDet0.accessories
26082
- }), (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, {
26250
+ }), (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, {
26251
+ units: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet6 = detail.additionalDetails) === null || _detail$additionalDet6 === void 0 ? void 0 : _detail$additionalDet6.units
26252
+ }), (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, {
26253
+ units: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet8 = detail.additionalDetails) === null || _detail$additionalDet8 === void 0 ? void 0 : _detail$additionalDet8.accessories
26254
+ }), (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, {
26083
26255
  applicationData: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData,
26084
26256
  t: t,
26085
- permissions: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet10 = detail.additionalDetails) === null || _detail$additionalDet10 === void 0 ? void 0 : _detail$additionalDet10.permissions
26086
- }), (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, {
26257
+ permissions: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet0 = detail.additionalDetails) === null || _detail$additionalDet0 === void 0 ? void 0 : _detail$additionalDet0.permissions
26258
+ }), (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, {
26087
26259
  t: t,
26088
26260
  applicationData: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData,
26089
26261
  docs: detail.additionalDetails.obpsDocuments,
26090
26262
  bpaActionsDetails: workflowDetails
26091
- }), (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, {
26263
+ }), (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, {
26092
26264
  t: t,
26093
26265
  isNoc: true,
26094
26266
  NOCdata: detail.values,
26095
26267
  applicationData: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData,
26096
26268
  docs: detail.additionalDetails.noc,
26097
- noc: (_detail$additionalDet13 = detail.additionalDetails) === null || _detail$additionalDet13 === void 0 ? void 0 : _detail$additionalDet13.data,
26269
+ noc: (_detail$additionalDet11 = detail.additionalDetails) === null || _detail$additionalDet11 === void 0 ? void 0 : _detail$additionalDet11.data,
26098
26270
  bpaActionsDetails: workflowDetails
26099
- }), (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, {
26271
+ }), (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, {
26100
26272
  scrutinyDetails: detail === null || detail === void 0 ? void 0 : detail.additionalDetails
26101
- }), (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, {
26273
+ }), (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, {
26102
26274
  scrutinyDetails: detail === null || detail === void 0 ? void 0 : detail.additionalDetails
26103
- }), (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, {
26275
+ }), (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, {
26104
26276
  edcrDetails: detail === null || detail === void 0 ? void 0 : detail.additionalDetails,
26105
26277
  applicationData: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData
26106
- }), (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, {
26107
- documents: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet18 = detail.additionalDetails) === null || _detail$additionalDet18 === void 0 ? void 0 : _detail$additionalDet18.documentsWithUrl
26108
- }), (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, {
26109
- documents: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet20 = detail.additionalDetails) === null || _detail$additionalDet20 === void 0 ? void 0 : _detail$additionalDet20.documents
26110
- }), (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, {
26278
+ }), (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, {
26279
+ documents: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet16 = detail.additionalDetails) === null || _detail$additionalDet16 === void 0 ? void 0 : _detail$additionalDet16.documentsWithUrl
26280
+ }), (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, {
26281
+ documents: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet18 = detail.additionalDetails) === null || _detail$additionalDet18 === void 0 ? void 0 : _detail$additionalDet18.documents,
26282
+ applicationStatus: applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus
26283
+ }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet19 = detail.additionalDetails) === null || _detail$additionalDet19 === void 0 ? void 0 : _detail$additionalDet19.documents) && ((applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) === "PENDING_FOR_FIELD_INSPECTION" || (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) === "PENDING_APPROVAL_FOR_CONNECTION") && /*#__PURE__*/React.createElement(DueVerification, {
26284
+ applicationData: applicationData
26285
+ }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet20 = detail.additionalDetails) === null || _detail$additionalDet20 === void 0 ? void 0 : _detail$additionalDet20.documents) && (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) === "PENDING_APPROVAL_FOR_CONNECTION" && /*#__PURE__*/React.createElement(InspectionInformation, null), (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, {
26111
26286
  taxHeadEstimatesCalculation: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet22 = detail.additionalDetails) === null || _detail$additionalDet22 === void 0 ? void 0 : _detail$additionalDet22.taxHeadEstimatesCalculation
26112
26287
  }), (detail === null || detail === void 0 ? void 0 : detail.isWaterConnectionDetails) && /*#__PURE__*/React.createElement(WSAdditonalDetails, {
26113
26288
  wsAdditionalDetails: detail,
26114
26289
  oldValue: oldValue
26115
- }), (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, {
26290
+ }), (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, {
26116
26291
  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
26117
26292
  }, /*#__PURE__*/React.createElement("span", {
26118
26293
  className: "add-details-link hover-button"
@@ -26268,7 +26443,25 @@ function ApplicationDetailsActionBar({
26268
26443
  t
26269
26444
  } = useTranslation();
26270
26445
  let user = Digit.UserService.getUser();
26271
- const menuRef = useRef();
26446
+ const menuRef = React.useRef();
26447
+ const [isSubmitDisabled, setIsSubmitDisabled] = React.useState(() => {
26448
+ if (typeof window !== "undefined" && typeof window.isDocumentsVerified !== "undefined") {
26449
+ return !window.isDocumentsVerified;
26450
+ }
26451
+ return false;
26452
+ });
26453
+ React.useEffect(() => {
26454
+ if (typeof window !== "undefined" && typeof window.isDocumentsVerified !== "undefined") {
26455
+ setIsSubmitDisabled(!window.isDocumentsVerified);
26456
+ }
26457
+ const handleDocVerification = e => {
26458
+ setIsSubmitDisabled(!e.detail);
26459
+ };
26460
+ if (typeof window !== "undefined") {
26461
+ window.addEventListener("DOCUMENTS_VERIFIED", handleDocVerification);
26462
+ return () => window.removeEventListener("DOCUMENTS_VERIFIED", handleDocVerification);
26463
+ }
26464
+ }, []);
26272
26465
  if (window.location.href.includes("/obps") || window.location.href.includes("/noc")) {
26273
26466
  const userInfos = sessionStorage.getItem("Digit.citizen.userRequestObject");
26274
26467
  const userInfo = userInfos ? JSON.parse(userInfos) : {};
@@ -26316,7 +26509,8 @@ function ApplicationDetailsActionBar({
26316
26509
  }) : null, businessService === "ewst" ? modified === uuid || modified == null ? /*#__PURE__*/React.createElement(SubmitBar, {
26317
26510
  ref: menuRef,
26318
26511
  label: t("WF_TAKE_ACTION"),
26319
- onSubmit: () => setDisplayMenu(!displayMenu)
26512
+ onSubmit: () => setDisplayMenu(!displayMenu),
26513
+ disabled: isSubmitDisabled
26320
26514
  }) : /*#__PURE__*/React.createElement(CardLabel, {
26321
26515
  style: {
26322
26516
  color: "red",
@@ -26326,7 +26520,8 @@ function ApplicationDetailsActionBar({
26326
26520
  }, `${t("EW_ALERT_ANOTHER_VENDOR")}`) : /*#__PURE__*/React.createElement(SubmitBar, {
26327
26521
  ref: menuRef,
26328
26522
  label: t("WF_TAKE_ACTION"),
26329
- onSubmit: () => setDisplayMenu(!displayMenu)
26523
+ onSubmit: () => setDisplayMenu(!displayMenu),
26524
+ disabled: isSubmitDisabled
26330
26525
  })), !(workflowDetails !== null && workflowDetails !== void 0 && workflowDetails.isLoading) && !isMenuBotton && isSingleButton && !isAction && /*#__PURE__*/React.createElement(ActionBar, {
26331
26526
  style: {
26332
26527
  ...ActionBarStyle