@djb25/digit-ui-module-wt 1.0.60 → 1.0.62

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.
@@ -2786,11 +2786,12 @@ const WTCard = () => {
2786
2786
  link: `${APPLICATION_PATH}/employee/wt/vendor-assignment`
2787
2787
  }];
2788
2788
  const WT_CEMP = Digit.UserService.hasAccess(["WT_CEMP"]) || false;
2789
+ const totalInboxCount = isCitizenInboxLoading || isFixedPointInboxLoading ? "-" : citizenInboxCount + fixedPointInboxCount;
2789
2790
  const propsForModuleCard = {
2790
2791
  Icon: /*#__PURE__*/React.createElement(CHBIcon, null),
2791
2792
  moduleName: t("WT_MODULE_NAME"),
2792
2793
  kpis: [{
2793
- count: citizenInboxCount,
2794
+ count: totalInboxCount,
2794
2795
  label: t("ES_TITLE_INBOX"),
2795
2796
  link: `${APPLICATION_PATH}/employee/wt/inbox`
2796
2797
  }],
@@ -3319,7 +3320,7 @@ const WTDesktopInbox = ({
3319
3320
  const [clearSearchCalled, setClearSearchCalled] = useState(false);
3320
3321
  const columns = React.useMemo(() => props.isSearch ? tableConfig.searchColumns(props) : tableConfig.inboxColumns(props) || [], []);
3321
3322
  const inboxCsvColumns = React.useMemo(() => {
3322
- var _columns$, _columns$2, _columns$3, _columns$4, _columns$find2;
3323
+ var _columns$, _columns$2, _columns$3, _columns$4, _columns$find3;
3323
3324
  const csvColumns = [{
3324
3325
  Header: (columns === null || columns === void 0 ? void 0 : (_columns$ = columns[0]) === null || _columns$ === void 0 ? void 0 : _columns$.Header) || t("WT_BOOKING_NO"),
3325
3326
  exportAccessor: row => {
@@ -3348,20 +3349,67 @@ const WTDesktopInbox = ({
3348
3349
  return t(`${prefix}_REVENUE_${row.searchData.localityCode}`);
3349
3350
  }
3350
3351
  }];
3351
- if (columns !== null && columns !== void 0 && columns.some(column => (column === null || column === void 0 ? void 0 : column.id) === "createdTime")) {
3352
+ if (columns !== null && columns !== void 0 && columns.some(column => (column === null || column === void 0 ? void 0 : column.id) === "fillingPoint")) {
3352
3353
  var _columns$find;
3353
3354
  csvColumns.push({
3354
- Header: (columns === null || columns === void 0 ? void 0 : (_columns$find = columns.find(column => (column === null || column === void 0 ? void 0 : column.id) === "createdTime")) === null || _columns$find === void 0 ? void 0 : _columns$find.Header) || t("CREATED_AT"),
3355
+ Header: (columns === null || columns === void 0 ? void 0 : (_columns$find = columns.find(column => (column === null || column === void 0 ? void 0 : column.id) === "fillingPoint")) === null || _columns$find === void 0 ? void 0 : _columns$find.Header) || t("Filling Point"),
3356
+ exportAccessor: row => {
3357
+ var _row$searchData7, _row$searchData7$fill, _row$searchData8;
3358
+ 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) || "-";
3359
+ }
3360
+ });
3361
+ }
3362
+ if (columns !== null && columns !== void 0 && columns.some(column => (column === null || column === void 0 ? void 0 : column.id) === "createdTime")) {
3363
+ var _columns$find2;
3364
+ csvColumns.push({
3365
+ Header: (columns === null || columns === void 0 ? void 0 : (_columns$find2 = columns.find(column => (column === null || column === void 0 ? void 0 : column.id) === "createdTime")) === null || _columns$find2 === void 0 ? void 0 : _columns$find2.Header) || t("CREATED_AT"),
3355
3366
  exportAccessor: row => getCreatedAtValue(row)
3356
3367
  });
3357
3368
  }
3358
3369
  csvColumns.push({
3359
- Header: (columns === null || columns === void 0 ? void 0 : (_columns$find2 = columns.find(column => (column === null || column === void 0 ? void 0 : column.id) === "applicationStatus")) === null || _columns$find2 === void 0 ? void 0 : _columns$find2.Header) || t("WT_STATUS"),
3370
+ Header: (columns === null || columns === void 0 ? void 0 : (_columns$find3 = columns.find(column => (column === null || column === void 0 ? void 0 : column.id) === "applicationStatus")) === null || _columns$find3 === void 0 ? void 0 : _columns$find3.Header) || t("WT_STATUS"),
3360
3371
  exportAccessor: row => {
3361
3372
  var _row$workflowData2, _row$workflowData2$st;
3362
3373
  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) : "";
3363
3374
  }
3364
3375
  });
3376
+ if (columns !== null && columns !== void 0 && columns.some(column => (column === null || column === void 0 ? void 0 : column.id) === "vendorName")) {
3377
+ var _columns$find4;
3378
+ csvColumns.push({
3379
+ 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"),
3380
+ exportAccessor: row => {
3381
+ var _row$searchData9, _row$searchData9$vend, _row$searchData0;
3382
+ 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) || "-";
3383
+ }
3384
+ });
3385
+ }
3386
+ if (columns !== null && columns !== void 0 && columns.some(column => (column === null || column === void 0 ? void 0 : column.id) === "vehicleNumber")) {
3387
+ var _columns$find5;
3388
+ csvColumns.push({
3389
+ 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"),
3390
+ exportAccessor: row => {
3391
+ var _searchData$vendor, _searchData$vendor$ve;
3392
+ const searchData = row === null || row === void 0 ? void 0 : row.searchData;
3393
+ const mappedVehicle = (searchData === null || searchData === void 0 ? void 0 : searchData.vehicle) || (searchData === null || searchData === void 0 ? void 0 : (_searchData$vendor = searchData.vendor) === null || _searchData$vendor === void 0 ? void 0 : (_searchData$vendor$ve = _searchData$vendor.vehicles) === null || _searchData$vendor$ve === void 0 ? void 0 : _searchData$vendor$ve.find(vehicle => (vehicle === null || vehicle === void 0 ? void 0 : vehicle.id) === (searchData === null || searchData === void 0 ? void 0 : searchData.vehicleId)));
3394
+ return (mappedVehicle === null || mappedVehicle === void 0 ? void 0 : mappedVehicle.registrationNumber) || (mappedVehicle === null || mappedVehicle === void 0 ? void 0 : mappedVehicle.name) || (mappedVehicle === null || mappedVehicle === void 0 ? void 0 : mappedVehicle.type) || (searchData === null || searchData === void 0 ? void 0 : searchData.vehicleName) || (searchData === null || searchData === void 0 ? void 0 : searchData.vehicleRegistrationNo) || "-";
3395
+ }
3396
+ });
3397
+ }
3398
+ if (columns !== null && columns !== void 0 && columns.some(column => (column === null || column === void 0 ? void 0 : column.id) === "driverName")) {
3399
+ var _columns$find6;
3400
+ csvColumns.push({
3401
+ 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"),
3402
+ exportAccessor: row => {
3403
+ var _searchData$vendor2, _searchData$vendor2$d, _mappedDriver$owner;
3404
+ const searchData = row === null || row === void 0 ? void 0 : row.searchData;
3405
+ const mappedDriver = (searchData === null || searchData === void 0 ? void 0 : searchData.driver) || (searchData === null || searchData === void 0 ? void 0 : (_searchData$vendor2 = searchData.vendor) === null || _searchData$vendor2 === void 0 ? void 0 : (_searchData$vendor2$d = _searchData$vendor2.drivers) === null || _searchData$vendor2$d === void 0 ? void 0 : _searchData$vendor2$d.find(driver => {
3406
+ var _driver$owner;
3407
+ return (driver === null || driver === void 0 ? void 0 : driver.id) === (searchData === null || searchData === void 0 ? void 0 : searchData.driverId) || (driver === null || driver === void 0 ? void 0 : driver.ownerId) === (searchData === null || searchData === void 0 ? void 0 : searchData.driverId) || (driver === null || driver === void 0 ? void 0 : (_driver$owner = driver.owner) === null || _driver$owner === void 0 ? void 0 : _driver$owner.uuid) === (searchData === null || searchData === void 0 ? void 0 : searchData.driverId);
3408
+ }));
3409
+ return (mappedDriver === null || mappedDriver === void 0 ? void 0 : mappedDriver.name) || (mappedDriver === null || mappedDriver === void 0 ? void 0 : (_mappedDriver$owner = mappedDriver.owner) === null || _mappedDriver$owner === void 0 ? void 0 : _mappedDriver$owner.name) || (searchData === null || searchData === void 0 ? void 0 : searchData.driverName) || "-";
3410
+ }
3411
+ });
3412
+ }
3365
3413
  return csvColumns;
3366
3414
  }, [columns, getCreatedAtValue, t]);
3367
3415
  let result;
@@ -10143,7 +10191,7 @@ const EmployeeApp = ({
10143
10191
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
10144
10192
  path: `${path}/booking-details/:id`,
10145
10193
  component: props => /*#__PURE__*/React.createElement(LayoutWrapper, {
10146
- layoutClass: "normal"
10194
+ layoutClass: "action"
10147
10195
  }, /*#__PURE__*/React.createElement(ApplicationDetails, Object.assign({}, props, {
10148
10196
  parentRoute: path
10149
10197
  })))
@@ -17661,6 +17709,7 @@ const Filter = ({
17661
17709
  status: null,
17662
17710
  applicationStatus: null,
17663
17711
  fromDate: "",
17712
+ toDate: "",
17664
17713
  fillingPointId: null,
17665
17714
  fillingPoint: null
17666
17715
  };
@@ -17745,11 +17794,56 @@ const Filter = ({
17745
17794
  style: {
17746
17795
  marginTop: "16px"
17747
17796
  }
17748
- }, /*#__PURE__*/React.createElement("label", null, t("DATE")), /*#__PURE__*/React.createElement(DatePicker, {
17749
- date: _searchParams === null || _searchParams === void 0 ? void 0 : _searchParams.fromDate,
17750
- onChange: date => localParamChange({
17751
- fromDate: date
17752
- }),
17797
+ }, /*#__PURE__*/React.createElement("label", null, t("FROM_DATE")), /*#__PURE__*/React.createElement(DatePicker, {
17798
+ date: typeof (_searchParams === null || _searchParams === void 0 ? void 0 : _searchParams.fromDate) === "number" ? (() => {
17799
+ const d = new Date(_searchParams.fromDate);
17800
+ const y = d.getFullYear();
17801
+ const m = String(d.getMonth() + 1).padStart(2, "0");
17802
+ const day = String(d.getDate()).padStart(2, "0");
17803
+ return `${y}-${m}-${day}`;
17804
+ })() : _searchParams === null || _searchParams === void 0 ? void 0 : _searchParams.fromDate,
17805
+ onChange: date => {
17806
+ if (date) {
17807
+ const dateParts = date.split("-");
17808
+ const fromDateObj = new Date(dateParts[0], dateParts[1] - 1, dateParts[2]);
17809
+ fromDateObj.setHours(0, 0, 0, 0);
17810
+ localParamChange({
17811
+ fromDate: fromDateObj.getTime()
17812
+ });
17813
+ } else {
17814
+ localParamChange({
17815
+ fromDate: ""
17816
+ });
17817
+ }
17818
+ },
17819
+ max: new Date().toISOString().split("T")[0]
17820
+ })), /*#__PURE__*/React.createElement("div", {
17821
+ className: "search-field-wrapper",
17822
+ style: {
17823
+ marginTop: "16px"
17824
+ }
17825
+ }, /*#__PURE__*/React.createElement("label", null, t("TO_DATE")), /*#__PURE__*/React.createElement(DatePicker, {
17826
+ date: typeof (_searchParams === null || _searchParams === void 0 ? void 0 : _searchParams.toDate) === "number" ? (() => {
17827
+ const d = new Date(_searchParams.toDate);
17828
+ const y = d.getFullYear();
17829
+ const m = String(d.getMonth() + 1).padStart(2, "0");
17830
+ const day = String(d.getDate()).padStart(2, "0");
17831
+ return `${y}-${m}-${day}`;
17832
+ })() : _searchParams === null || _searchParams === void 0 ? void 0 : _searchParams.toDate,
17833
+ onChange: date => {
17834
+ if (date) {
17835
+ const dateParts = date.split("-");
17836
+ const toDateObj = new Date(dateParts[0], dateParts[1] - 1, dateParts[2]);
17837
+ toDateObj.setHours(23, 59, 59, 999);
17838
+ localParamChange({
17839
+ toDate: toDateObj.getTime()
17840
+ });
17841
+ } else {
17842
+ localParamChange({
17843
+ toDate: ""
17844
+ });
17845
+ }
17846
+ },
17753
17847
  max: new Date().toISOString().split("T")[0]
17754
17848
  })), /*#__PURE__*/React.createElement("div", {
17755
17849
  className: "tag-container hide-x-scrollbar"
@@ -25245,6 +25339,122 @@ const RenewPopup = ({
25245
25339
  })))));
25246
25340
  };
25247
25341
 
25342
+ const DueVerification = () => {
25343
+ const {
25344
+ t
25345
+ } = useTranslation();
25346
+ const [kno, setKno] = useState("");
25347
+ const [tableData, setTableData] = useState([]);
25348
+ const columns = useMemo(() => [{
25349
+ Header: t("K No."),
25350
+ accessor: "kno"
25351
+ }, {
25352
+ Header: t("Full Name"),
25353
+ accessor: "fullName"
25354
+ }, {
25355
+ Header: t("Full Address"),
25356
+ accessor: "fullAddress"
25357
+ }, {
25358
+ Header: t("Due Amount"),
25359
+ accessor: "dueAmount"
25360
+ }, {
25361
+ Header: t("Total Amount"),
25362
+ accessor: "totalAmount"
25363
+ }], [t]);
25364
+ const handleAdd = () => {
25365
+ if (kno) {
25366
+ const mockData = {
25367
+ kno: kno,
25368
+ fullName: "John Doe",
25369
+ fullAddress: "123 Main St, New Delhi, Delhi 110001",
25370
+ dueAmount: "1500",
25371
+ totalAmount: "1500"
25372
+ };
25373
+ setTableData([...tableData, mockData]);
25374
+ setKno("");
25375
+ }
25376
+ };
25377
+ return /*#__PURE__*/React.createElement("div", {
25378
+ style: {
25379
+ marginBottom: "20px"
25380
+ }
25381
+ }, /*#__PURE__*/React.createElement("h2", {
25382
+ style: {
25383
+ fontSize: "24px",
25384
+ fontWeight: "bold",
25385
+ color: "#4f6cfc",
25386
+ marginBottom: "16px"
25387
+ }
25388
+ }, t("Due Verification")), /*#__PURE__*/React.createElement("div", {
25389
+ style: {
25390
+ display: "flex",
25391
+ alignItems: "flex-end",
25392
+ gap: "20px",
25393
+ marginBottom: "20px"
25394
+ }
25395
+ }, /*#__PURE__*/React.createElement("div", {
25396
+ style: {
25397
+ flex: 1
25398
+ }
25399
+ }, /*#__PURE__*/React.createElement("span", {
25400
+ style: {
25401
+ fontSize: "16px",
25402
+ color: "#0B0C0C",
25403
+ marginBottom: "8px",
25404
+ display: "inline-block"
25405
+ }
25406
+ }, t("K No.(Existing KNo of same property)"), " ", /*#__PURE__*/React.createElement("span", {
25407
+ style: {
25408
+ color: "red"
25409
+ }
25410
+ }, "*")), /*#__PURE__*/React.createElement(TextInput, {
25411
+ type: "number",
25412
+ value: kno,
25413
+ onChange: e => setKno(e.target.value),
25414
+ style: {
25415
+ width: "100%",
25416
+ marginBottom: "0"
25417
+ }
25418
+ })), /*#__PURE__*/React.createElement("div", {
25419
+ style: {
25420
+ flex: 1,
25421
+ paddingBottom: "2px"
25422
+ }
25423
+ }, /*#__PURE__*/React.createElement("button", {
25424
+ type: "button",
25425
+ onClick: handleAdd,
25426
+ style: {
25427
+ backgroundColor: "#4f6cfc",
25428
+ color: "white",
25429
+ padding: "8px 24px",
25430
+ borderRadius: "4px",
25431
+ border: "none",
25432
+ cursor: "pointer"
25433
+ }
25434
+ }, t("Add")))), tableData.length > 0 && /*#__PURE__*/React.createElement("div", {
25435
+ style: {
25436
+ marginTop: "30px",
25437
+ overflowX: "auto"
25438
+ }
25439
+ }, /*#__PURE__*/React.createElement(Table, {
25440
+ className: "customTable table-fixed-first-column table-border-style",
25441
+ t: t,
25442
+ disableSort: false,
25443
+ autoSort: true,
25444
+ manualPagination: false,
25445
+ isPaginationRequired: false,
25446
+ data: tableData,
25447
+ columns: columns,
25448
+ getCellProps: cellInfo => {
25449
+ return {
25450
+ style: {
25451
+ padding: "12px"
25452
+ }
25453
+ };
25454
+ }
25455
+ })));
25456
+ };
25457
+
25248
25458
  function ApplicationDetailsContent({
25249
25459
  applicationDetails,
25250
25460
  workflowDetails,
@@ -25743,7 +25953,7 @@ function ApplicationDetailsContent({
25743
25953
  }), (detail === null || detail === void 0 ? void 0 : detail.isWaterConnectionDetails) && /*#__PURE__*/React.createElement(WSAdditonalDetails, {
25744
25954
  wsAdditionalDetails: detail,
25745
25955
  oldValue: oldValue
25746
- }), (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, {
25956
+ }), (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, {
25747
25957
  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
25748
25958
  }, /*#__PURE__*/React.createElement("span", {
25749
25959
  className: "add-details-link hover-button"