@djb25/digit-ui-module-wt 1.0.24 → 1.0.25

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.
@@ -2299,14 +2299,12 @@ const WTCard = () => {
2299
2299
  const {
2300
2300
  t
2301
2301
  } = useTranslation();
2302
- const [total, setTotal] = useState("-");
2302
+ const tenantId = Digit.ULBService.getCurrentTenantId();
2303
2303
  const {
2304
- data,
2305
- isLoading,
2306
- isFetching,
2307
- isSuccess
2304
+ data: citizenInboxData,
2305
+ isLoading: isCitizenInboxLoading
2308
2306
  } = Digit.Hooks.useNewInboxGeneral({
2309
- tenantId: Digit.ULBService.getCurrentTenantId(),
2307
+ tenantId,
2310
2308
  ModuleCode: "WT",
2311
2309
  filters: {
2312
2310
  limit: 10,
@@ -2323,13 +2321,39 @@ const WTCard = () => {
2323
2321
  enabled: Digit.Utils.wtAccess()
2324
2322
  }
2325
2323
  });
2326
- useEffect(() => {
2327
- if (!isFetching && isSuccess) setTotal(data);
2328
- }, [isFetching]);
2324
+ const {
2325
+ data: fixedPointInboxData,
2326
+ isLoading: isFixedPointInboxLoading
2327
+ } = Digit.Hooks.useNewInboxGeneral({
2328
+ tenantId,
2329
+ ModuleCode: "WT",
2330
+ filters: {
2331
+ limit: 10,
2332
+ offset: 0,
2333
+ services: ["watertanker-fixedpoint"]
2334
+ },
2335
+ config: {
2336
+ select: data => {
2337
+ return {
2338
+ totalCount: data === null || data === void 0 ? void 0 : data.totalCount,
2339
+ nearingSlaCount: data === null || data === void 0 ? void 0 : data.nearingSlaCount
2340
+ } || "-";
2341
+ },
2342
+ enabled: Digit.Utils.wtAccess()
2343
+ }
2344
+ });
2345
+ const citizenInboxCount = isCitizenInboxLoading ? "-" : (citizenInboxData === null || citizenInboxData === void 0 ? void 0 : citizenInboxData.totalCount) ?? 0;
2346
+ const fixedPointInboxCount = isFixedPointInboxLoading ? "-" : (fixedPointInboxData === null || fixedPointInboxData === void 0 ? void 0 : fixedPointInboxData.totalCount) ?? 0;
2329
2347
  const links = [{
2330
- count: isLoading ? "-" : total === null || total === void 0 ? void 0 : total.totalCount,
2348
+ count: citizenInboxCount,
2331
2349
  label: t("ES_COMMON_INBOX"),
2350
+ subLabel: "citizen",
2332
2351
  link: `${APPLICATION_PATH}/employee/wt/inbox`
2352
+ }, {
2353
+ count: fixedPointInboxCount,
2354
+ label: t("ES_COMMON_INBOX"),
2355
+ subLabel: "Fixed Point",
2356
+ link: `${APPLICATION_PATH}/employee/wt/fixed-point/inbox`
2333
2357
  }, {
2334
2358
  label: t("ES_COMMON_APPLICATION_SEARCH"),
2335
2359
  link: `${APPLICATION_PATH}/employee/wt/my-bookings`
@@ -2354,7 +2378,7 @@ const WTCard = () => {
2354
2378
  Icon: /*#__PURE__*/React.createElement(CHBIcon, null),
2355
2379
  moduleName: t("WT_MODULE_NAME"),
2356
2380
  kpis: [{
2357
- count: total === null || total === void 0 ? void 0 : total.totalCount,
2381
+ count: citizenInboxCount,
2358
2382
  label: t("ES_TITLE_INBOX"),
2359
2383
  link: `${APPLICATION_PATH}/employee/wt/inbox`
2360
2384
  }],
@@ -3064,6 +3088,7 @@ const Inbox = ({
3064
3088
  useNewInboxAPI,
3065
3089
  parentRoute,
3066
3090
  moduleCode,
3091
+ detailRoute,
3067
3092
  initialStates: _initialStates = {},
3068
3093
  filterComponent,
3069
3094
  isInbox,
@@ -3290,6 +3315,7 @@ const Inbox = ({
3290
3315
  }
3291
3316
  }, /*#__PURE__*/React.createElement(WTDesktopInbox, {
3292
3317
  moduleCode: moduleCode,
3318
+ detailRoute: detailRoute,
3293
3319
  data: data,
3294
3320
  tableConfig: TableConfig(t)[moduleCode],
3295
3321
  isLoading: hookLoading,
@@ -4444,7 +4470,7 @@ const destinationIcon = new L.Icon({
4444
4470
  const Address = ({
4445
4471
  lat,
4446
4472
  lng,
4447
- fallback: _fallback = "Resolving area..."
4473
+ fallback: _fallback = "Resolving area"
4448
4474
  }) => {
4449
4475
  const [address, setAddress] = useState(_fallback);
4450
4476
  useEffect(() => {
@@ -4462,17 +4488,32 @@ const Address = ({
4462
4488
  };
4463
4489
  const SOCKET_URL = "https://dev-djb.nitcon.in";
4464
4490
  const MapController = ({
4465
- selectedDriver
4491
+ selectedDriver,
4492
+ mapZoom,
4493
+ mapCenter
4466
4494
  }) => {
4467
4495
  const map = useMap();
4468
4496
  useEffect(() => {
4469
4497
  if (selectedDriver !== null && selectedDriver !== void 0 && selectedDriver.lat && selectedDriver !== null && selectedDriver !== void 0 && selectedDriver.lng) {
4470
- map.setView([selectedDriver.lat, selectedDriver.lng], 15, {
4498
+ map.setView([selectedDriver.lat, selectedDriver.lng], mapZoom || 15, {
4471
4499
  animate: true,
4472
4500
  duration: 1
4473
4501
  });
4474
4502
  }
4475
4503
  }, [selectedDriver, map]);
4504
+ useEffect(() => {
4505
+ if (Array.isArray(mapCenter) && mapCenter.length === 2) {
4506
+ map.setView(mapCenter, mapZoom || 15, {
4507
+ animate: true,
4508
+ duration: 1
4509
+ });
4510
+ }
4511
+ }, [mapCenter, map]);
4512
+ useEffect(() => {
4513
+ if (mapZoom) {
4514
+ map.setZoom(mapZoom);
4515
+ }
4516
+ }, [mapZoom, map]);
4476
4517
  return null;
4477
4518
  };
4478
4519
  const useRoute = (start, end) => {
@@ -4485,7 +4526,7 @@ const useRoute = (start, end) => {
4485
4526
  setLoading(true);
4486
4527
  try {
4487
4528
  const response = await fetch(`https://router.project-osrm.org/route/v1/driving/${start.lng},${start.lat};${end.lng},${end.lat}?overview=full&geometries=geojson&steps=true`);
4488
- if (!response.ok) throw new Error("Failed to fetch route");
4529
+ if (!response.ok) throw new Error(t("FAILED_TO_FETCH_ROUTE"));
4489
4530
  const data = await response.json();
4490
4531
  if (data.routes && data.routes[0]) {
4491
4532
  const route = data.routes[0];
@@ -4498,7 +4539,7 @@ const useRoute = (start, end) => {
4498
4539
  });
4499
4540
  }
4500
4541
  } catch (err) {
4501
- console.error("Error fetching route:", err);
4542
+ console.error(t("Error fetching route:"), err);
4502
4543
  setError(err.message);
4503
4544
  } finally {
4504
4545
  setLoading(false);
@@ -4537,7 +4578,7 @@ const RouteLayer = ({
4537
4578
  boxShadow: "0 2px 4px rgba(0,0,0,0.1)",
4538
4579
  zIndex: 1000
4539
4580
  }
4540
- }, "Loading route...");
4581
+ }, t("LOADING_ROUTE"));
4541
4582
  }
4542
4583
  if (error) {
4543
4584
  return /*#__PURE__*/React.createElement("div", {
@@ -4552,7 +4593,7 @@ const RouteLayer = ({
4552
4593
  boxShadow: "0 2px 4px rgba(0,0,0,0.1)",
4553
4594
  zIndex: 1000
4554
4595
  }
4555
- }, "Error loading route: ", error);
4596
+ }, t("ERROR_LOADING_ROUTE"), error);
4556
4597
  }
4557
4598
  if (!routeData) return null;
4558
4599
  const renderRouteSegments = () => {
@@ -4644,7 +4685,7 @@ const RouteLayer = ({
4644
4685
  margin: 0,
4645
4686
  color: "#667eea"
4646
4687
  }
4647
- }, "Route Information"), /*#__PURE__*/React.createElement("button", {
4688
+ }, t("ROUTE_INFORMATION")), /*#__PURE__*/React.createElement("button", {
4648
4689
  onClick: () => setShowSteps(false),
4649
4690
  style: {
4650
4691
  background: "none",
@@ -4658,14 +4699,14 @@ const RouteLayer = ({
4658
4699
  style: {
4659
4700
  marginBottom: "12px"
4660
4701
  }
4661
- }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("strong", null, "Total Distance:"), " ", (routeData.distance / 1000).toFixed(2), " km"), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("strong", null, "Est. Time:"), " ", Math.round(routeData.duration / 60), " minutes")), selectedStep && /*#__PURE__*/React.createElement("div", {
4702
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("strong", null, t("TOTAL_DISTANCE"), ":"), " ", (routeData.distance / 1000).toFixed(2), " km"), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("strong", null, t("ESTIMATED_TIME"), ":"), " ", Math.round(routeData.duration / 60), " minutes")), selectedStep && /*#__PURE__*/React.createElement("div", {
4662
4703
  style: {
4663
4704
  padding: "8px",
4664
4705
  background: "#f5f5f5",
4665
4706
  borderRadius: "4px",
4666
4707
  marginBottom: "8px"
4667
4708
  }
4668
- }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("strong", null, "Current Step:"), " ", selectedStep.maneuver.type), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("strong", null, "Instruction:"), " ", selectedStep.maneuver.instruction || selectedStep.name), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("strong", null, "Distance:"), " ", (selectedStep.distance / 1000).toFixed(2), " km"), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("strong", null, "Duration:"), " ", Math.round(selectedStep.duration / 60), " min")), showSteps && routeData.legs && /*#__PURE__*/React.createElement("div", {
4709
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("strong", null, t("CURRENT_STEP"), ":"), " ", selectedStep.maneuver.type), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("strong", null, t("INSTRUCTION"), ":"), " ", selectedStep.maneuver.instruction || selectedStep.name), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("strong", null, t("DISTANCE"), ":"), " ", (selectedStep.distance / 1000).toFixed(2), " km"), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("strong", null, t("DURATION"), ":"), " ", Math.round(selectedStep.duration / 60), " min")), showSteps && routeData.legs && /*#__PURE__*/React.createElement("div", {
4669
4710
  style: {
4670
4711
  maxHeight: "200px",
4671
4712
  overflowY: "auto"
@@ -4675,7 +4716,7 @@ const RouteLayer = ({
4675
4716
  margin: "8px 0",
4676
4717
  color: "#666"
4677
4718
  }
4678
- }, "Turn-by-turn directions:"), routeData.legs[0].steps.map((step, idx) => /*#__PURE__*/React.createElement("div", {
4719
+ }, t("TURN_BY_TURN_DIRECTIONS"), ":"), routeData.legs[0].steps.map((step, idx) => /*#__PURE__*/React.createElement("div", {
4679
4720
  key: idx,
4680
4721
  style: {
4681
4722
  padding: "8px",
@@ -4780,6 +4821,9 @@ const DriverCard = ({
4780
4821
  onClick,
4781
4822
  vendorList
4782
4823
  }) => {
4824
+ const {
4825
+ t
4826
+ } = useTranslation();
4783
4827
  const [currentAddress, setCurrentAddress] = useState("Resolving area...");
4784
4828
  const [deliveryAddress, setDeliveryAddress] = useState("Resolving area...");
4785
4829
  const lastResolvedPos = useRef({
@@ -4822,190 +4866,128 @@ const DriverCard = ({
4822
4866
  };
4823
4867
  resolveDest();
4824
4868
  }, [driver.deliveryLat, driver.deliveryLng]);
4825
- const vehicleNumber = useMemo(() => {
4826
- if (!vendorList || !vendorList.length) return null;
4869
+ const driverDetails = useMemo(() => {
4870
+ if (!vendorList || !vendorList.length) return {
4871
+ name: "Unknown",
4872
+ vehicle: "N/A"
4873
+ };
4827
4874
  for (const vendor of vendorList) {
4828
- if (!vendor.drivers || !vendor.drivers.length) continue;
4829
- const driverMatch = vendor.drivers.find(d => {
4830
- var _d$owner, _d$owner2, _d$owner3, _d$owner4;
4831
- return ((_d$owner = d.owner) === null || _d$owner === void 0 ? void 0 : _d$owner.mobileNumber) === driver.driverId || ((_d$owner2 = d.owner) === null || _d$owner2 === void 0 ? void 0 : _d$owner2.uuid) === driver.driverId || d.id === driver.driverId || String((_d$owner3 = d.owner) === null || _d$owner3 === void 0 ? void 0 : _d$owner3.mobileNumber) === String(driver.driverId) || String((_d$owner4 = d.owner) === null || _d$owner4 === void 0 ? void 0 : _d$owner4.uuid) === String(driver.driverId);
4875
+ var _vendor$drivers;
4876
+ const match = (_vendor$drivers = vendor.drivers) === null || _vendor$drivers === void 0 ? void 0 : _vendor$drivers.find(d => {
4877
+ var _d$owner, _d$owner2;
4878
+ return d.id === driver.driverId || ((_d$owner = d.owner) === null || _d$owner === void 0 ? void 0 : _d$owner.mobileNumber) === driver.driverId || ((_d$owner2 = d.owner) === null || _d$owner2 === void 0 ? void 0 : _d$owner2.uuid) === driver.driverId;
4832
4879
  });
4833
- if (driverMatch && vendor.vehicles && vendor.vehicles.length > 0) {
4834
- var _vendor$vehicles$, _vendor$vehicles$2;
4835
- return ((_vendor$vehicles$ = vendor.vehicles[0]) === null || _vendor$vehicles$ === void 0 ? void 0 : _vendor$vehicles$.registrationNumber) || ((_vendor$vehicles$2 = vendor.vehicles[0]) === null || _vendor$vehicles$2 === void 0 ? void 0 : _vendor$vehicles$2.vehicleNo) || null;
4880
+ if (match) {
4881
+ var _match$owner, _vendor$vehicles, _vendor$vehicles$;
4882
+ return {
4883
+ name: ((_match$owner = match.owner) === null || _match$owner === void 0 ? void 0 : _match$owner.name) || "Unknown",
4884
+ vehicle: ((_vendor$vehicles = vendor.vehicles) === null || _vendor$vehicles === void 0 ? void 0 : (_vendor$vehicles$ = _vendor$vehicles[0]) === null || _vendor$vehicles$ === void 0 ? void 0 : _vendor$vehicles$.registrationNumber) || "N/A"
4885
+ };
4836
4886
  }
4837
4887
  }
4838
- return null;
4888
+ return {
4889
+ name: "Unknown",
4890
+ vehicle: "N/A"
4891
+ };
4839
4892
  }, [vendorList, driver.driverId]);
4840
- const calculateETA = () => {
4841
- if (!driver.lat || !driver.lng || !driver.deliveryLat || !driver.deliveryLng) return null;
4842
- const distance = calculateDistance$1(driver.lat, driver.lng, driver.deliveryLat, driver.deliveryLng);
4843
- const minutes = Math.round(distance / 30 * 60);
4844
- return minutes;
4845
- };
4846
- const eta = calculateETA();
4847
4893
  return /*#__PURE__*/React.createElement("div", {
4848
4894
  onClick: onClick,
4849
4895
  style: {
4850
4896
  padding: "16px",
4851
- marginBottom: "12px",
4852
4897
  borderRadius: "12px",
4853
- background: isSelected ? "#e3f2fd" : "#ffffff",
4854
- border: `2px solid ${isSelected ? "#2196f3" : "#e0e0e0"}`,
4855
- boxShadow: isSelected ? "0 4px 12px rgba(33, 150, 243, 0.2)" : "0 2px 8px rgba(0, 0, 0, 0.05)",
4898
+ background: isSelected ? "#f0f4ff" : "white",
4899
+ border: `2px solid ${isSelected ? "#667eea" : "#f0f0f0"}`,
4856
4900
  cursor: "pointer",
4857
- transition: "all 0.2s ease",
4858
4901
  position: "relative",
4859
- overflow: "hidden"
4902
+ transition: "all 0.2s ease"
4860
4903
  }
4861
4904
  }, /*#__PURE__*/React.createElement("div", {
4862
- style: {
4863
- position: "absolute",
4864
- top: 0,
4865
- left: 0,
4866
- right: 0,
4867
- height: "4px",
4868
- background: driver.isOnline ? "linear-gradient(90deg, #4caf50, #81c784)" : "linear-gradient(90deg, #f44336, #e57373)"
4869
- }
4870
- }), /*#__PURE__*/React.createElement("div", {
4871
4905
  style: {
4872
4906
  display: "flex",
4873
- alignItems: "center",
4907
+ gap: "12px",
4874
4908
  marginBottom: "12px"
4875
4909
  }
4876
4910
  }, /*#__PURE__*/React.createElement("div", {
4877
4911
  style: {
4878
4912
  width: "40px",
4879
4913
  height: "40px",
4880
- borderRadius: "50%",
4881
- background: driver.isOnline ? "linear-gradient(135deg, #4caf50, #81c784)" : "linear-gradient(135deg, #9e9e9e, #bdbdbd)",
4914
+ borderRadius: "8px",
4915
+ background: "#f0f2f5",
4882
4916
  display: "flex",
4883
4917
  alignItems: "center",
4884
4918
  justifyContent: "center",
4885
- color: "white",
4886
- fontWeight: "bold",
4887
- fontSize: "16px",
4888
- marginRight: "12px",
4889
- flexShrink: 0
4890
- }
4891
- }, driver.driverId.charAt(0).toUpperCase()), /*#__PURE__*/React.createElement("div", {
4892
- style: {
4893
- flex: 1,
4894
- minWidth: 0
4895
- }
4896
- }, /*#__PURE__*/React.createElement("div", {
4897
- style: {
4898
- fontWeight: "600",
4899
- fontSize: "16px",
4900
- color: "#667eea",
4901
- marginBottom: "4px",
4902
- overflow: "hidden",
4903
- textOverflow: "ellipsis",
4904
- whiteSpace: "nowrap"
4919
+ fontSize: "20px"
4905
4920
  }
4906
- }, "Driver #", driver.driverId.substring(0, 8), "..."), /*#__PURE__*/React.createElement(StatusBadge, {
4907
- isOnline: driver.isOnline
4908
- }))), driver.lat && driver.lng && /*#__PURE__*/React.createElement("div", {
4921
+ }, "\uD83D\uDC64"), /*#__PURE__*/React.createElement("div", {
4909
4922
  style: {
4910
- marginBottom: "8px"
4923
+ flex: 1
4911
4924
  }
4912
4925
  }, /*#__PURE__*/React.createElement("div", {
4913
4926
  style: {
4914
- fontSize: "12px",
4915
- color: "#666",
4916
- marginBottom: "4px"
4917
- }
4918
- }, "Current Location"), /*#__PURE__*/React.createElement("div", {
4919
- style: {
4920
- fontSize: "13px",
4921
- fontWeight: "500",
4922
- color: "#333",
4923
4927
  display: "flex",
4924
- alignItems: "center",
4925
- gap: "4px"
4928
+ justifyContent: "space-between",
4929
+ alignItems: "flex-start"
4926
4930
  }
4927
- }, /*#__PURE__*/React.createElement("span", {
4928
- title: `${driver.lat.toFixed(6)}, ${driver.lng.toFixed(6)}`
4929
- }, currentAddress))), driver.deliveryLat && driver.deliveryLng && /*#__PURE__*/React.createElement("div", {
4931
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
4930
4932
  style: {
4931
- marginBottom: "8px"
4933
+ fontWeight: "700",
4934
+ fontSize: "14px",
4935
+ color: "#0d47a1"
4932
4936
  }
4933
- }, /*#__PURE__*/React.createElement("div", {
4937
+ }, "DRV-", driver.driverId.substring(0, 4).toUpperCase()), /*#__PURE__*/React.createElement("div", {
4934
4938
  style: {
4935
- fontSize: "12px",
4936
- color: "#666",
4937
- marginBottom: "4px"
4939
+ fontSize: "11px",
4940
+ color: "#666"
4938
4941
  }
4939
- }, "Delivery Destination"), /*#__PURE__*/React.createElement("div", {
4942
+ }, driverDetails.name, " \u2022 ", driverDetails.vehicle)), /*#__PURE__*/React.createElement("div", {
4940
4943
  style: {
4941
- fontSize: "13px",
4942
- fontWeight: "500",
4943
- color: "#333",
4944
- display: "flex",
4945
- alignItems: "center",
4946
- gap: "4px"
4944
+ fontSize: "10px",
4945
+ fontWeight: "700",
4946
+ padding: "2px 8px",
4947
+ borderRadius: "4px",
4948
+ background: driver.isOnline ? "#e8f5e9" : "#ffebee",
4949
+ color: driver.isOnline ? "#2e7d32" : "#c62828"
4947
4950
  }
4948
- }, /*#__PURE__*/React.createElement("span", {
4949
- title: `${driver.deliveryLat.toFixed(6)}, ${driver.deliveryLng.toFixed(6)}`
4950
- }, deliveryAddress))), eta !== null && /*#__PURE__*/React.createElement("div", {
4951
+ }, driver.isOnline ? "ONLINE" : "OFFLINE")))), /*#__PURE__*/React.createElement("div", {
4951
4952
  style: {
4952
- marginTop: "8px",
4953
- padding: "8px",
4954
- background: "#f5f5f5",
4955
- borderRadius: "6px",
4956
- display: "flex",
4957
- justifyContent: "space-between",
4958
- alignItems: "center",
4959
- flexWrap: "wrap",
4960
- gap: "8px"
4953
+ display: "grid",
4954
+ gridTemplateColumns: "1fr 1fr",
4955
+ gap: "12px"
4961
4956
  }
4962
4957
  }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
4963
4958
  style: {
4964
- fontSize: "11px",
4965
- color: "#666"
4966
- }
4967
- }, "Est. Arrival"), /*#__PURE__*/React.createElement("div", {
4968
- style: {
4969
- fontSize: "14px",
4959
+ fontSize: "10px",
4970
4960
  fontWeight: "600",
4971
- color: "#667eea"
4961
+ color: "#aaa",
4962
+ marginBottom: "2px"
4972
4963
  }
4973
- }, eta, " min")), driver.speed && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
4964
+ }, t("CURRENT_LOCATION")), /*#__PURE__*/React.createElement("div", {
4974
4965
  style: {
4975
4966
  fontSize: "11px",
4976
- color: "#666"
4967
+ fontWeight: "700",
4968
+ color: "#333",
4969
+ whiteSpace: "nowrap",
4970
+ overflow: "hidden",
4971
+ textOverflow: "ellipsis"
4977
4972
  }
4978
- }, "Speed"), /*#__PURE__*/React.createElement("div", {
4973
+ }, currentAddress))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
4979
4974
  style: {
4980
- fontSize: "14px",
4975
+ fontSize: "10px",
4981
4976
  fontWeight: "600",
4982
- color: "#4caf50"
4977
+ color: "#aaa",
4978
+ marginBottom: "2px"
4983
4979
  }
4984
- }, Math.round(driver.speed * 3.6), " km/h"))), /*#__PURE__*/React.createElement("div", {
4980
+ }, t("DESTINATION")), /*#__PURE__*/React.createElement("div", {
4985
4981
  style: {
4986
- marginTop: "12px",
4987
4982
  fontSize: "11px",
4988
- color: "#999",
4989
- borderTop: "1px solid #eee",
4990
- paddingTop: "8px",
4991
- display: "grid",
4992
- gridTemplateColumns: "1fr 1fr",
4993
- gap: "4px"
4994
- }
4995
- }, vehicleNumber && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
4996
- style: {
4997
- color: "#555"
4998
- }
4999
- }, "Vehicle"), /*#__PURE__*/React.createElement("span", {
5000
- style: {
5001
- fontWeight: "600",
5002
- color: "#667eea"
4983
+ fontWeight: "700",
4984
+ color: "#333",
4985
+ whiteSpace: "nowrap",
4986
+ overflow: "hidden",
4987
+ textOverflow: "ellipsis"
5003
4988
  }
5004
- }, vehicleNumber)), driver.accuracy && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", null, "Accuracy"), /*#__PURE__*/React.createElement("span", null, Math.round(driver.accuracy), "m")), driver.heading && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", null, "Heading"), /*#__PURE__*/React.createElement("span", null, Math.round(driver.heading), "\xB0")), driver.lastSeen && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", null, "Last seen"), /*#__PURE__*/React.createElement("span", null, new Date(driver.lastSeen).toLocaleTimeString()))));
4989
+ }, deliveryAddress))));
5005
4990
  };
5006
- function calculateDistance$1(lat1, lon1, lat2, lon2) {
5007
- return calculateDistance(lat1, lon1, lat2, lon2);
5008
- }
5009
4991
  function LiveTrackingSystem() {
5010
4992
  const {
5011
4993
  t
@@ -5059,11 +5041,11 @@ function LiveTrackingSystem() {
5059
5041
  console.log("=== VENDOR DEBUG ===");
5060
5042
  console.log("Vendor[0] vehicles:", (_vendorOptions$ = vendorOptions[0]) === null || _vendorOptions$ === void 0 ? void 0 : _vendorOptions$.vehicles);
5061
5043
  console.log("Vendor[0] drivers:", (_vendorOptions$2 = vendorOptions[0]) === null || _vendorOptions$2 === void 0 ? void 0 : (_vendorOptions$2$driv = _vendorOptions$2.drivers) === null || _vendorOptions$2$driv === void 0 ? void 0 : _vendorOptions$2$driv.map(d => {
5062
- var _d$owner5, _d$owner6;
5044
+ var _d$owner3, _d$owner4;
5063
5045
  return {
5064
5046
  id: d.id,
5065
- mobile: (_d$owner5 = d.owner) === null || _d$owner5 === void 0 ? void 0 : _d$owner5.mobileNumber,
5066
- uuid: (_d$owner6 = d.owner) === null || _d$owner6 === void 0 ? void 0 : _d$owner6.uuid
5047
+ mobile: (_d$owner3 = d.owner) === null || _d$owner3 === void 0 ? void 0 : _d$owner3.mobileNumber,
5048
+ uuid: (_d$owner4 = d.owner) === null || _d$owner4 === void 0 ? void 0 : _d$owner4.uuid
5067
5049
  };
5068
5050
  }));
5069
5051
  console.log("Socket driverId example:", Object.keys(drivers)[0]);
@@ -5161,18 +5143,18 @@ function LiveTrackingSystem() {
5161
5143
  const matchesFillingPoint = !selectedFillingPoint || (() => {
5162
5144
  if (!vendorOptions || !vendorOptions.length) return false;
5163
5145
  return vendorOptions.some(vendor => {
5164
- var _vendor$fillingPoint2, _vendor$drivers;
5146
+ var _vendor$fillingPoint2, _vendor$drivers2;
5165
5147
  if ((vendor === null || vendor === void 0 ? void 0 : (_vendor$fillingPoint2 = vendor.fillingPoint) === null || _vendor$fillingPoint2 === void 0 ? void 0 : _vendor$fillingPoint2.id) !== (selectedFillingPoint === null || selectedFillingPoint === void 0 ? void 0 : selectedFillingPoint.id)) return false;
5166
- return (_vendor$drivers = vendor.drivers) === null || _vendor$drivers === void 0 ? void 0 : _vendor$drivers.some(d => {
5167
- var _d$owner7, _d$owner8, _d$owner9, _d$owner0;
5168
- return ((_d$owner7 = d.owner) === null || _d$owner7 === void 0 ? void 0 : _d$owner7.mobileNumber) === driver.driverId || ((_d$owner8 = d.owner) === null || _d$owner8 === void 0 ? void 0 : _d$owner8.uuid) === driver.driverId || d.id === driver.driverId || String((_d$owner9 = d.owner) === null || _d$owner9 === void 0 ? void 0 : _d$owner9.mobileNumber) === String(driver.driverId) || String((_d$owner0 = d.owner) === null || _d$owner0 === void 0 ? void 0 : _d$owner0.uuid) === String(driver.driverId);
5148
+ return (_vendor$drivers2 = vendor.drivers) === null || _vendor$drivers2 === void 0 ? void 0 : _vendor$drivers2.some(d => {
5149
+ var _d$owner5, _d$owner6, _d$owner7, _d$owner8;
5150
+ return ((_d$owner5 = d.owner) === null || _d$owner5 === void 0 ? void 0 : _d$owner5.mobileNumber) === driver.driverId || ((_d$owner6 = d.owner) === null || _d$owner6 === void 0 ? void 0 : _d$owner6.uuid) === driver.driverId || d.id === driver.driverId || String((_d$owner7 = d.owner) === null || _d$owner7 === void 0 ? void 0 : _d$owner7.mobileNumber) === String(driver.driverId) || String((_d$owner8 = d.owner) === null || _d$owner8 === void 0 ? void 0 : _d$owner8.uuid) === String(driver.driverId);
5169
5151
  });
5170
5152
  });
5171
5153
  })();
5172
5154
  const matchesVendor = !selectedVendor || (_selectedVendor$drive => {
5173
5155
  const vendorDriverIds = ((_selectedVendor$drive = selectedVendor.drivers) === null || _selectedVendor$drive === void 0 ? void 0 : _selectedVendor$drive.map(d => {
5174
- var _d$owner1, _d$owner10, _d$owner11, _d$owner12;
5175
- return [(_d$owner1 = d.owner) === null || _d$owner1 === void 0 ? void 0 : _d$owner1.mobileNumber, (_d$owner10 = d.owner) === null || _d$owner10 === void 0 ? void 0 : _d$owner10.uuid, d.id, String((_d$owner11 = d.owner) === null || _d$owner11 === void 0 ? void 0 : _d$owner11.mobileNumber), String((_d$owner12 = d.owner) === null || _d$owner12 === void 0 ? void 0 : _d$owner12.uuid)];
5156
+ var _d$owner9, _d$owner0, _d$owner1, _d$owner10;
5157
+ return [(_d$owner9 = d.owner) === null || _d$owner9 === void 0 ? void 0 : _d$owner9.mobileNumber, (_d$owner0 = d.owner) === null || _d$owner0 === void 0 ? void 0 : _d$owner0.uuid, d.id, String((_d$owner1 = d.owner) === null || _d$owner1 === void 0 ? void 0 : _d$owner1.mobileNumber), String((_d$owner10 = d.owner) === null || _d$owner10 === void 0 ? void 0 : _d$owner10.uuid)];
5176
5158
  }).flat().filter(Boolean)) || [];
5177
5159
  return vendorDriverIds.some(id => driver.driverId === id);
5178
5160
  })();
@@ -5187,188 +5169,218 @@ function LiveTrackingSystem() {
5187
5169
  return /*#__PURE__*/React.createElement("div", {
5188
5170
  style: {
5189
5171
  display: "flex",
5172
+ flexDirection: "column",
5190
5173
  height: "100vh",
5191
5174
  width: "100%",
5192
5175
  fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, sans-serif",
5193
- position: "relative",
5194
- overflow: "hidden"
5176
+ background: "#f0f2f5",
5177
+ padding: "16px",
5178
+ boxSizing: "border-box"
5195
5179
  }
5196
- }, isMobile && /*#__PURE__*/React.createElement("button", {
5197
- onClick: toggleSidebar,
5180
+ }, /*#__PURE__*/React.createElement("div", {
5198
5181
  style: {
5199
- position: "absolute",
5200
- top: "10px",
5201
- left: "10px",
5202
- zIndex: 2000,
5203
- background: "#667eea",
5204
- color: "white",
5205
- border: "none",
5206
- borderRadius: "8px",
5207
- padding: "10px 16px",
5208
- fontSize: "14px",
5209
- fontWeight: "500",
5210
- cursor: "pointer",
5211
- boxShadow: "0 2px 8px rgba(0,0,0,0.2)",
5212
5182
  display: "flex",
5183
+ justifyContent: "space-between",
5213
5184
  alignItems: "center",
5214
- gap: "8px"
5215
- }
5216
- }, /*#__PURE__*/React.createElement("span", {
5217
- style: {
5218
- fontSize: "20px"
5185
+ marginBottom: "16px",
5186
+ background: "white",
5187
+ padding: "16px 24px",
5188
+ borderRadius: "12px",
5189
+ boxShadow: "0 2px 8px rgba(0,0,0,0.05)",
5190
+ border: "2px solid #667eea44"
5219
5191
  }
5220
- }, "\u2630"), showSidebar ? "Hide List" : "Show Drivers"), /*#__PURE__*/React.createElement("div", {
5192
+ }, /*#__PURE__*/React.createElement("div", {
5221
5193
  style: {
5222
- width: isMobile ? showSidebar ? "100%" : "0" : "380px",
5223
- height: "100%",
5224
- borderRight: isMobile ? "none" : "1px solid #e0e0e0",
5225
5194
  display: "flex",
5226
- flexDirection: "column",
5227
- background: "#ffffff",
5228
- boxShadow: isMobile ? showSidebar ? "0 0 20px rgba(0,0,0,0.2)" : "none" : "2px 0 8px rgba(0, 0, 0, 0.05)",
5229
- position: isMobile ? "absolute" : "relative",
5230
- top: 0,
5231
- left: 0,
5232
- zIndex: 1500,
5233
- transition: "all 0.3s ease-in-out",
5234
- overflow: showSidebar ? "visible" : "hidden",
5235
- ...(isMobile && !showSidebar && {
5236
- width: "0",
5237
- opacity: 0,
5238
- pointerEvents: "none"
5239
- })
5240
- }
5241
- }, showSidebar && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
5242
- style: {
5243
- padding: isMobile ? "16px" : "24px",
5244
- background: "linear-gradient(135deg, #667eea, #0d47a1)",
5245
- color: "white"
5195
+ flexDirection: "column"
5246
5196
  }
5247
- }, isMobile && /*#__PURE__*/React.createElement("button", {
5248
- onClick: toggleSidebar,
5197
+ }, /*#__PURE__*/React.createElement("div", {
5249
5198
  style: {
5250
- position: "absolute",
5251
- top: "10px",
5252
- right: "10px",
5253
- background: "rgba(255,255,255,0.2)",
5254
- border: "none",
5255
- color: "white",
5256
- fontSize: "20px",
5257
- cursor: "pointer",
5258
- width: "30px",
5259
- height: "30px",
5260
- borderRadius: "4px",
5261
5199
  display: "flex",
5262
5200
  alignItems: "center",
5263
- justifyContent: "center"
5201
+ gap: "12px"
5264
5202
  }
5265
- }, "\u2715"), /*#__PURE__*/React.createElement("h2", {
5203
+ }, /*#__PURE__*/React.createElement("h1", {
5266
5204
  style: {
5267
- margin: "0 0 8px 0",
5268
- fontSize: isMobile ? "20px" : "24px",
5269
- fontWeight: "600",
5270
- letterSpacing: "-0.5px"
5205
+ margin: 0,
5206
+ fontSize: "24px",
5207
+ fontWeight: "700",
5208
+ color: "#0d47a1"
5271
5209
  }
5272
- }, "Live Driver Tracking"), /*#__PURE__*/React.createElement("div", {
5210
+ }, t("WT_LIVE_DRIVER_TRACKING")), /*#__PURE__*/React.createElement("div", {
5273
5211
  style: {
5274
5212
  display: "flex",
5275
5213
  alignItems: "center",
5276
- gap: "8px",
5277
- fontSize: "14px",
5278
- opacity: 0.9
5214
+ gap: "6px",
5215
+ background: "#e8f5e9",
5216
+ color: "#2e7d32",
5217
+ padding: "4px 12px",
5218
+ borderRadius: "20px",
5219
+ fontSize: "12px",
5220
+ fontWeight: "700",
5221
+ border: "1px solid #c8e6c9"
5279
5222
  }
5280
5223
  }, /*#__PURE__*/React.createElement("span", {
5281
5224
  style: {
5282
- display: "inline-block",
5283
- width: "10px",
5284
- height: "10px",
5225
+ width: "8px",
5226
+ height: "8px",
5285
5227
  borderRadius: "50%",
5286
5228
  backgroundColor: isConnected ? "#4caf50" : "#f44336",
5287
- animation: isConnected ? "pulse 2s infinite" : "none"
5229
+ boxShadow: isConnected ? "0 0 8px #4caf50" : "none"
5288
5230
  }
5289
- }), /*#__PURE__*/React.createElement("span", null, isConnected ? "Connected to server" : "Disconnected"))), /*#__PURE__*/React.createElement("div", {
5231
+ }), isConnected ? "CONNECTED" : "DISCONNECTED")), /*#__PURE__*/React.createElement("p", {
5290
5232
  style: {
5291
- display: "grid",
5292
- gridTemplateColumns: "1fr 1fr 1fr 1fr",
5293
- gap: isMobile ? "4px" : "8px",
5294
- padding: isMobile ? "12px" : "16px",
5295
- background: "#f5f5f5",
5296
- borderBottom: "1px solid #e0e0e0"
5297
- }
5298
- }, /*#__PURE__*/React.createElement("div", {
5299
- style: {
5300
- textAlign: "center"
5301
- }
5302
- }, /*#__PURE__*/React.createElement("div", {
5303
- style: {
5304
- fontSize: isMobile ? "10px" : "11px",
5233
+ margin: "4px 0 0 0",
5234
+ fontSize: "14px",
5305
5235
  color: "#666"
5306
5236
  }
5307
- }, "Total"), /*#__PURE__*/React.createElement("div", {
5237
+ }, t("REAL_TIME_TELEMETRY_AND_FLEET_COORDINATION"))), /*#__PURE__*/React.createElement("div", {
5308
5238
  style: {
5309
- fontSize: isMobile ? "16px" : "20px",
5310
- fontWeight: "bold",
5311
- color: "#667eea"
5239
+ display: "flex",
5240
+ gap: "12px"
5312
5241
  }
5313
- }, Object.keys(drivers).length)), /*#__PURE__*/React.createElement("div", {
5242
+ }, [{
5243
+ label: t("TOTAL_FLEET"),
5244
+ value: Object.keys(drivers).length,
5245
+ color: "#0d47a1"
5246
+ }, {
5247
+ label: t("ONLINE"),
5248
+ value: onlineCount,
5249
+ color: "#2e7d32"
5250
+ }, {
5251
+ label: t("OFFLINE"),
5252
+ value: offlineCount,
5253
+ color: "#c62828"
5254
+ }, {
5255
+ label: t("ACTIVE"),
5256
+ value: activeDeliveries,
5257
+ color: "#0d47a1"
5258
+ }].map((stat, idx) => /*#__PURE__*/React.createElement("div", {
5259
+ key: idx,
5314
5260
  style: {
5315
- textAlign: "center"
5261
+ background: "#f8f9fa",
5262
+ padding: "8px 16px",
5263
+ borderRadius: "8px",
5264
+ minWidth: "100px",
5265
+ display: "flex",
5266
+ flexDirection: "column",
5267
+ border: "1px solid #e0e0e0"
5316
5268
  }
5317
5269
  }, /*#__PURE__*/React.createElement("div", {
5318
5270
  style: {
5319
- fontSize: isMobile ? "10px" : "11px",
5320
- color: "#666"
5271
+ fontSize: "10px",
5272
+ fontWeight: "600",
5273
+ color: "#888",
5274
+ marginBottom: "4px"
5321
5275
  }
5322
- }, "Online"), /*#__PURE__*/React.createElement("div", {
5276
+ }, stat.label), /*#__PURE__*/React.createElement("div", {
5323
5277
  style: {
5324
- fontSize: isMobile ? "16px" : "20px",
5325
- fontWeight: "bold",
5326
- color: "#4caf50"
5278
+ fontSize: "20px",
5279
+ fontWeight: "700",
5280
+ color: stat.color
5327
5281
  }
5328
- }, onlineCount)), /*#__PURE__*/React.createElement("div", {
5282
+ }, stat.value))))), /*#__PURE__*/React.createElement("div", {
5329
5283
  style: {
5330
- textAlign: "center"
5284
+ display: "flex",
5285
+ flex: 1,
5286
+ gap: "16px",
5287
+ overflow: "hidden"
5331
5288
  }
5332
- }, /*#__PURE__*/React.createElement("div", {
5289
+ }, isMobile && /*#__PURE__*/React.createElement("button", {
5290
+ onClick: toggleSidebar,
5333
5291
  style: {
5334
- fontSize: isMobile ? "10px" : "11px",
5335
- color: "#666"
5292
+ position: "absolute",
5293
+ top: "80px",
5294
+ left: "20px",
5295
+ zIndex: 2000,
5296
+ background: "#667eea",
5297
+ color: "white",
5298
+ border: "none",
5299
+ borderRadius: "8px",
5300
+ padding: "8px 12px",
5301
+ fontSize: "12px",
5302
+ cursor: "pointer",
5303
+ boxShadow: "0 2px 8px rgba(0,0,0,0.2)"
5336
5304
  }
5337
- }, "Offline"), /*#__PURE__*/React.createElement("div", {
5305
+ }, showSidebar ? "Close" : "Menu"), /*#__PURE__*/React.createElement("div", {
5338
5306
  style: {
5339
- fontSize: isMobile ? "16px" : "20px",
5340
- fontWeight: "bold",
5341
- color: "#f44336"
5307
+ width: isMobile ? showSidebar ? "100%" : "0" : "360px",
5308
+ height: "100%",
5309
+ display: "flex",
5310
+ flexDirection: "column",
5311
+ background: "transparent",
5312
+ position: isMobile ? "absolute" : "relative",
5313
+ top: 0,
5314
+ left: 0,
5315
+ zIndex: 1500,
5316
+ transition: "all 0.3s ease-in-out",
5317
+ ...(isMobile && !showSidebar && {
5318
+ width: "0",
5319
+ opacity: 0,
5320
+ pointerEvents: "none"
5321
+ })
5342
5322
  }
5343
- }, offlineCount)), /*#__PURE__*/React.createElement("div", {
5323
+ }, showSidebar && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
5344
5324
  style: {
5345
- textAlign: "center"
5325
+ padding: "20px",
5326
+ background: "white",
5327
+ borderRadius: "12px",
5328
+ display: "flex",
5329
+ flexDirection: "column",
5330
+ height: "100%",
5331
+ boxShadow: "0 2px 8px rgba(0,0,0,0.05)",
5332
+ border: "1px solid #e0e0e0"
5346
5333
  }
5347
5334
  }, /*#__PURE__*/React.createElement("div", {
5348
5335
  style: {
5349
- fontSize: isMobile ? "10px" : "11px",
5350
- color: "#666"
5336
+ display: "flex",
5337
+ justifyContent: "space-between",
5338
+ alignItems: "center",
5339
+ marginBottom: "16px"
5351
5340
  }
5352
- }, "Active"), /*#__PURE__*/React.createElement("div", {
5341
+ }, /*#__PURE__*/React.createElement("h3", {
5353
5342
  style: {
5354
- fontSize: isMobile ? "16px" : "20px",
5355
- fontWeight: "bold",
5356
- color: "#ff9800"
5343
+ margin: 0,
5344
+ fontSize: "14px",
5345
+ fontWeight: "700",
5346
+ color: "#888",
5347
+ letterSpacing: "1px"
5357
5348
  }
5358
- }, activeDeliveries))), /*#__PURE__*/React.createElement("div", {
5349
+ }, t("WT_FILTER_FLEET")), /*#__PURE__*/React.createElement("button", {
5350
+ onClick: () => {
5351
+ setSelectedFillingPoint(null);
5352
+ setSelectedVendor(null);
5353
+ setSearchTerm("");
5354
+ setFilterOnline("all");
5355
+ },
5359
5356
  style: {
5360
- padding: isMobile ? "12px" : "16px",
5361
- borderBottom: "1px solid #e0e0e0",
5362
- background: "#fafafa"
5357
+ background: "none",
5358
+ border: "none",
5359
+ color: "#667eea",
5360
+ fontSize: "12px",
5361
+ fontWeight: "700",
5362
+ cursor: "pointer"
5363
+ }
5364
+ }, t("WT_RESET_ALL"))), /*#__PURE__*/React.createElement("div", {
5365
+ style: {
5366
+ display: "flex",
5367
+ flexDirection: "column",
5368
+ gap: "16px",
5369
+ marginBottom: "20px"
5363
5370
  }
5364
5371
  }, /*#__PURE__*/React.createElement("div", {
5365
5372
  style: {
5366
5373
  display: "flex",
5367
5374
  flexDirection: "column",
5368
- gap: "8px",
5369
- marginBottom: "12px"
5375
+ gap: "6px"
5370
5376
  }
5371
- }, /*#__PURE__*/React.createElement(Dropdown, {
5377
+ }, /*#__PURE__*/React.createElement("label", {
5378
+ style: {
5379
+ fontSize: "12px",
5380
+ fontWeight: "700",
5381
+ color: "#888"
5382
+ }
5383
+ }, t("WT_SELECT_FILLING_POINT")), /*#__PURE__*/React.createElement(Dropdown, {
5372
5384
  t: t,
5373
5385
  option: fillingPointOptions,
5374
5386
  optionKey: "fillingPointName",
@@ -5377,10 +5389,21 @@ function LiveTrackingSystem() {
5377
5389
  placeholder: t("WT_SELECT_FILLING_POINT"),
5378
5390
  style: {
5379
5391
  width: "100%",
5380
- margin: 0,
5381
- padding: 0
5392
+ margin: 0
5382
5393
  }
5383
- }), /*#__PURE__*/React.createElement(Dropdown, {
5394
+ })), /*#__PURE__*/React.createElement("div", {
5395
+ style: {
5396
+ display: "flex",
5397
+ flexDirection: "column",
5398
+ gap: "6px"
5399
+ }
5400
+ }, /*#__PURE__*/React.createElement("label", {
5401
+ style: {
5402
+ fontSize: "12px",
5403
+ fontWeight: "700",
5404
+ color: "#888"
5405
+ }
5406
+ }, t("WT_SELECT_VENDOR")), /*#__PURE__*/React.createElement(Dropdown, {
5384
5407
  t: t,
5385
5408
  option: filteredVendorOptions,
5386
5409
  optionKey: "name",
@@ -5389,55 +5412,78 @@ function LiveTrackingSystem() {
5389
5412
  placeholder: t("WT_SELECT_VENDOR"),
5390
5413
  style: {
5391
5414
  width: "100%",
5392
- margin: 0,
5393
- padding: 0
5415
+ margin: 0
5416
+ }
5417
+ })), /*#__PURE__*/React.createElement("div", {
5418
+ style: {
5419
+ display: "flex",
5420
+ flexDirection: "column",
5421
+ gap: "6px"
5394
5422
  }
5395
- })), /*#__PURE__*/React.createElement("input", {
5423
+ }, /*#__PURE__*/React.createElement("label", {
5424
+ style: {
5425
+ fontSize: "10px",
5426
+ fontWeight: "700",
5427
+ color: "#888"
5428
+ }
5429
+ }, t("WT_SEARCH_DRIVER_BY_ID")), /*#__PURE__*/React.createElement("div", {
5430
+ style: {
5431
+ position: "relative"
5432
+ }
5433
+ }, /*#__PURE__*/React.createElement("span", {
5434
+ style: {
5435
+ position: "absolute",
5436
+ left: "12px",
5437
+ top: "50%",
5438
+ transform: "translateY(-50%)",
5439
+ color: "#888"
5440
+ }
5441
+ }, "\uD83D\uDD0D"), /*#__PURE__*/React.createElement("input", {
5396
5442
  type: "text",
5397
- placeholder: "Search by driver ID...",
5443
+ placeholder: t("WT_SEARCH_DRIVER_BY_ID"),
5398
5444
  value: searchTerm,
5399
5445
  onChange: e => setSearchTerm(e.target.value),
5400
5446
  style: {
5401
5447
  width: "100%",
5402
- padding: isMobile ? "10px" : "12px",
5448
+ padding: "10px 10px 10px 36px",
5403
5449
  border: "1px solid #e0e0e0",
5404
5450
  borderRadius: "8px",
5405
- fontSize: isMobile ? "14px" : "14px",
5406
- marginBottom: "12px",
5451
+ fontSize: "12px",
5407
5452
  outline: "none",
5408
- transition: "border-color 0.2s",
5453
+ background: "#f8f9fa",
5409
5454
  boxSizing: "border-box"
5410
- },
5411
- onFocus: e => e.target.style.borderColor = "#667eea",
5412
- onBlur: e => e.target.style.borderColor = "#e0e0e0"
5413
- }), /*#__PURE__*/React.createElement("div", {
5455
+ }
5456
+ })))), /*#__PURE__*/React.createElement("div", {
5414
5457
  style: {
5415
5458
  display: "flex",
5416
- gap: "8px",
5417
- marginBottom: "8px"
5459
+ justifyContent: "space-between",
5460
+ alignItems: "center",
5461
+ marginBottom: "12px"
5462
+ }
5463
+ }, /*#__PURE__*/React.createElement("div", {
5464
+ style: {
5465
+ display: "flex",
5466
+ gap: "8px"
5418
5467
  }
5419
5468
  }, ["all", "online", "offline"].map(filter => /*#__PURE__*/React.createElement("button", {
5420
5469
  key: filter,
5421
5470
  onClick: () => setFilterOnline(filter),
5422
5471
  style: {
5423
- flex: 1,
5424
- padding: isMobile ? "6px" : "8px",
5425
- border: "1px solid #e0e0e0",
5426
- borderRadius: "6px",
5427
- background: filterOnline === filter ? "#667eea" : "white",
5428
- color: filterOnline === filter ? "white" : "#333",
5472
+ padding: "4px 12px",
5473
+ borderRadius: "4px",
5474
+ background: filterOnline === filter ? "#667eea" : "transparent",
5475
+ color: filterOnline === filter ? "white" : "#666",
5476
+ border: filterOnline === filter ? "none" : "1px solid #e0e0e0",
5429
5477
  cursor: "pointer",
5430
- fontSize: isMobile ? "11px" : "12px",
5431
- fontWeight: "500",
5432
- textTransform: "capitalize",
5433
- transition: "all 0.2s"
5478
+ fontSize: "12px",
5479
+ fontWeight: "600",
5480
+ textTransform: "capitalize"
5434
5481
  }
5435
5482
  }, filter))), /*#__PURE__*/React.createElement("div", {
5436
5483
  style: {
5437
5484
  display: "flex",
5438
5485
  alignItems: "center",
5439
- gap: "8px",
5440
- marginTop: "8px"
5486
+ gap: "6px"
5441
5487
  }
5442
5488
  }, /*#__PURE__*/React.createElement("input", {
5443
5489
  type: "checkbox",
@@ -5445,59 +5491,49 @@ function LiveTrackingSystem() {
5445
5491
  checked: showRoutes,
5446
5492
  onChange: e => setShowRoutes(e.target.checked),
5447
5493
  style: {
5448
- cursor: "pointer",
5449
- width: "16px",
5450
- height: "16px"
5494
+ cursor: "pointer"
5451
5495
  }
5452
5496
  }), /*#__PURE__*/React.createElement("label", {
5453
5497
  htmlFor: "showRoutes",
5454
5498
  style: {
5455
- fontSize: isMobile ? "12px" : "13px",
5456
- color: "#333",
5499
+ fontSize: "12px",
5500
+ color: "#666",
5457
5501
  cursor: "pointer"
5458
5502
  }
5459
- }, "Show delivery routes"))), /*#__PURE__*/React.createElement("div", {
5503
+ }, "Routes"))), /*#__PURE__*/React.createElement("div", {
5460
5504
  style: {
5461
5505
  flex: 1,
5462
5506
  overflowY: "auto",
5463
- padding: isMobile ? "12px" : "16px",
5464
- background: "#f5f5f5"
5507
+ padding: "4px",
5508
+ marginTop: "8px",
5509
+ display: "flex",
5510
+ flexDirection: "column",
5511
+ gap: "12px"
5465
5512
  }
5466
5513
  }, filteredDrivers.length === 0 ? /*#__PURE__*/React.createElement("div", {
5467
5514
  style: {
5468
5515
  textAlign: "center",
5469
- padding: isMobile ? "20px" : "40px 20px",
5470
- color: "#999",
5471
- background: "white",
5472
- borderRadius: "12px"
5516
+ padding: "40px 20px",
5517
+ color: "#999"
5473
5518
  }
5474
- }, /*#__PURE__*/React.createElement("div", {
5475
- style: {
5476
- fontSize: isMobile ? "36px" : "48px",
5477
- marginBottom: "16px"
5478
- }
5479
- }, "\uD83D\uDE97"), /*#__PURE__*/React.createElement("p", {
5480
- style: {
5481
- fontSize: isMobile ? "14px" : "16px",
5482
- margin: 0
5483
- }
5484
- }, Object.keys(drivers).length === 0 ? "No drivers available" : "No drivers match your filters")) : filteredDrivers.map(driver => /*#__PURE__*/React.createElement(DriverCard, {
5519
+ }, /*#__PURE__*/React.createElement("p", null, t("WT_NO_DRIVERS_FOUND"))) : filteredDrivers.map(driver => /*#__PURE__*/React.createElement(DriverCard, {
5485
5520
  key: driver.driverId,
5486
5521
  driver: driver,
5487
5522
  isSelected: (selectedDriver === null || selectedDriver === void 0 ? void 0 : selectedDriver.driverId) === driver.driverId,
5488
5523
  vendorList: vendorOptions,
5489
5524
  onClick: () => {
5490
5525
  setSelectedDriver(driver);
5491
- if (isMobile) {
5492
- setShowSidebar(false);
5493
- }
5526
+ if (isMobile) setShowSidebar(false);
5494
5527
  }
5495
- }))))), /*#__PURE__*/React.createElement("div", {
5528
+ })))))), /*#__PURE__*/React.createElement("div", {
5496
5529
  style: {
5497
5530
  flex: 1,
5498
5531
  position: "relative",
5499
- width: isMobile ? "100%" : "calc(100% - 380px)",
5500
- height: "100%"
5532
+ background: "white",
5533
+ borderRadius: "12px",
5534
+ overflow: "hidden",
5535
+ boxShadow: "0 2px 8px rgba(0,0,0,0.05)",
5536
+ border: "1px solid #e0e0e0"
5501
5537
  }
5502
5538
  }, /*#__PURE__*/React.createElement(MapContainer, {
5503
5539
  center: mapCenter,
@@ -5511,8 +5547,19 @@ function LiveTrackingSystem() {
5511
5547
  url: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
5512
5548
  attribution: "\xA9 <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a>"
5513
5549
  }), /*#__PURE__*/React.createElement(MapController, {
5514
- selectedDriver: selectedDriver
5515
- }), selectedDriver && selectedDriver.lat != null && selectedDriver.lng != null && /*#__PURE__*/React.createElement(Marker, {
5550
+ selectedDriver: selectedDriver,
5551
+ mapZoom: mapZoom,
5552
+ mapCenter: mapCenter
5553
+ }), filteredDrivers.filter(d => d.driverId !== (selectedDriver === null || selectedDriver === void 0 ? void 0 : selectedDriver.driverId)).map(driver => /*#__PURE__*/React.createElement(Marker, {
5554
+ key: driver.driverId,
5555
+ position: [Number(driver.lat), Number(driver.lng)],
5556
+ icon: driver.isOnline ? onlineIcon : offlineIcon,
5557
+ eventHandlers: {
5558
+ click: () => {
5559
+ setSelectedDriver(driver);
5560
+ }
5561
+ }
5562
+ })), selectedDriver && selectedDriver.lat != null && selectedDriver.lng != null && /*#__PURE__*/React.createElement(Marker, {
5516
5563
  key: selectedDriver.driverId,
5517
5564
  position: [Number(selectedDriver.lat), Number(selectedDriver.lng)],
5518
5565
  icon: selectedDriver.isOnline ? onlineIcon : offlineIcon
@@ -5544,14 +5591,14 @@ function LiveTrackingSystem() {
5544
5591
  style: {
5545
5592
  marginBottom: "8px"
5546
5593
  }
5547
- }, /*#__PURE__*/React.createElement("strong", null, "\uD83D\uDCCD Current Location"), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Address, {
5594
+ }, /*#__PURE__*/React.createElement("strong", null, "Current Location"), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Address, {
5548
5595
  lat: selectedDriver.lat,
5549
5596
  lng: selectedDriver.lng
5550
5597
  }))), selectedDriver.deliveryLat && selectedDriver.deliveryLng && /*#__PURE__*/React.createElement("div", {
5551
5598
  style: {
5552
5599
  marginBottom: "8px"
5553
5600
  }
5554
- }, /*#__PURE__*/React.createElement("strong", null, "\uD83C\uDFAF Delivery Destination"), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Address, {
5601
+ }, /*#__PURE__*/React.createElement("strong", null, t("DELIVERY_DESTINATION")), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Address, {
5555
5602
  lat: selectedDriver.deliveryLat,
5556
5603
  lng: selectedDriver.deliveryLng
5557
5604
  }))), /*#__PURE__*/React.createElement("div", {
@@ -5564,26 +5611,17 @@ function LiveTrackingSystem() {
5564
5611
  borderRadius: "4px",
5565
5612
  marginTop: "8px"
5566
5613
  }
5567
- }, selectedDriver.speed && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", null, "Speed:"), /*#__PURE__*/React.createElement("span", null, (selectedDriver.speed * 3.6).toFixed(1), " km/h")), selectedDriver.heading && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", null, "Heading:"), /*#__PURE__*/React.createElement("span", null, Math.round(selectedDriver.heading), "\xB0")), selectedDriver.accuracy && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", null, "Accuracy:"), /*#__PURE__*/React.createElement("span", null, Math.round(selectedDriver.accuracy), "m"))), selectedDriver.lastUpdate && /*#__PURE__*/React.createElement("div", {
5614
+ }, selectedDriver.speed && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", null, t("WT_SPEED"), ":"), /*#__PURE__*/React.createElement("span", null, (selectedDriver.speed * 3.6).toFixed(1), " ", t("WT_KM_PER_HOUR"))), selectedDriver.heading && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", null, t("WT_HEADING"), ":"), /*#__PURE__*/React.createElement("span", null, Math.round(selectedDriver.heading), "\xB0")), selectedDriver.accuracy && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", null, t("WT_ACCURACY"), ":"), /*#__PURE__*/React.createElement("span", null, Math.round(selectedDriver.accuracy), "m"))), selectedDriver.lastUpdate && /*#__PURE__*/React.createElement("div", {
5568
5615
  style: {
5569
5616
  marginTop: "8px",
5570
5617
  color: "#666",
5571
5618
  fontSize: "10px"
5572
5619
  }
5573
- }, "Last update: ", new Date(selectedDriver.lastUpdate).toLocaleString()))))), selectedDriver && selectedDriver.deliveryLat != null && selectedDriver.deliveryLng != null && /*#__PURE__*/React.createElement(Marker, {
5620
+ }, t("WT_LAST_UPDATE"), ": ", new Date(selectedDriver.lastUpdate).toLocaleString()))))), selectedDriver && selectedDriver.deliveryLat != null && selectedDriver.deliveryLng != null && /*#__PURE__*/React.createElement(Marker, {
5574
5621
  key: `dest-${selectedDriver.driverId}`,
5575
5622
  position: [Number(selectedDriver.deliveryLat), Number(selectedDriver.deliveryLng)],
5576
5623
  icon: destinationIcon
5577
- }, /*#__PURE__*/React.createElement(Popup, null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("strong", null, "Delivery Destination"), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Address, {
5578
- lat: selectedDriver.deliveryLat,
5579
- lng: selectedDriver.deliveryLng
5580
- })), /*#__PURE__*/React.createElement("div", {
5581
- style: {
5582
- fontSize: "11px",
5583
- color: "#666",
5584
- marginTop: "4px"
5585
- }
5586
- }, "Driver: #", selectedDriver.driverId.substring(0, 8), "...")))), showRoutes && selectedDriver && selectedDriver.lat && selectedDriver.lng && selectedDriver.deliveryLat && selectedDriver.deliveryLng && /*#__PURE__*/React.createElement(RouteLayer, {
5624
+ }), showRoutes && selectedDriver && selectedDriver.lat && selectedDriver.lng && selectedDriver.deliveryLat && selectedDriver.deliveryLng && /*#__PURE__*/React.createElement(RouteLayer, {
5587
5625
  start: {
5588
5626
  lat: selectedDriver.lat,
5589
5627
  lng: selectedDriver.lng
@@ -5611,7 +5649,8 @@ function LiveTrackingSystem() {
5611
5649
  }, selectedDriver && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("button", {
5612
5650
  onClick: () => {
5613
5651
  if (selectedDriver !== null && selectedDriver !== void 0 && selectedDriver.lat && selectedDriver !== null && selectedDriver !== void 0 && selectedDriver.lng) {
5614
- setMapCenter([selectedDriver.lat, selectedDriver.lng]);
5652
+ const center = [Number(selectedDriver.lat), Number(selectedDriver.lng)];
5653
+ setMapCenter(center);
5615
5654
  setMapZoom(15);
5616
5655
  }
5617
5656
  },
@@ -5626,7 +5665,7 @@ function LiveTrackingSystem() {
5626
5665
  fontWeight: "500",
5627
5666
  whiteSpace: "nowrap"
5628
5667
  }
5629
- }, "Center"), /*#__PURE__*/React.createElement("button", {
5668
+ }, t("WT_CENTER")), /*#__PURE__*/React.createElement("button", {
5630
5669
  onClick: () => setSelectedDriver(null),
5631
5670
  style: {
5632
5671
  padding: isMobile ? "10px 12px" : "8px 16px",
@@ -5639,7 +5678,7 @@ function LiveTrackingSystem() {
5639
5678
  fontWeight: "500",
5640
5679
  whiteSpace: "nowrap"
5641
5680
  }
5642
- }, "Clear")), !selectedDriver && /*#__PURE__*/React.createElement("div", {
5681
+ }, t("WT_CLEAR"))), !selectedDriver && /*#__PURE__*/React.createElement("div", {
5643
5682
  style: {
5644
5683
  padding: isMobile ? "10px 12px" : "8px 16px",
5645
5684
  background: "#f5f5f5",
@@ -5674,23 +5713,61 @@ function LiveTrackingSystem() {
5674
5713
  color: "#667eea",
5675
5714
  fontSize: isMobile ? "14px" : "16px"
5676
5715
  }
5677
- }, "Selected Driver"), /*#__PURE__*/React.createElement("span", {
5678
- style: {
5679
- background: selectedDriver.isOnline ? "#4caf50" : "#f44336",
5680
- color: "white",
5681
- padding: "2px 8px",
5682
- borderRadius: "12px",
5683
- fontSize: isMobile ? "10px" : "11px",
5684
- fontWeight: "bold"
5685
- }
5686
- }, selectedDriver.isOnline ? "ONLINE" : "OFFLINE")), /*#__PURE__*/React.createElement("div", {
5716
+ }, t("WT_SELECTED_DRIVER")), /*#__PURE__*/React.createElement(StatusBadge, {
5717
+ isOnline: selectedDriver.isOnline
5718
+ })), /*#__PURE__*/React.createElement("div", {
5687
5719
  style: {
5688
5720
  fontSize: isMobile ? "12px" : "13px"
5689
5721
  }
5690
- }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("strong", null, "ID:"), " ", selectedDriver.driverId.substring(0, 12), "..."), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("strong", null, "Location:"), " ", /*#__PURE__*/React.createElement(Address, {
5722
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("strong", null, t("WT_ID"), ":"), " ", selectedDriver.driverId.substring(0, 6).toUpperCase(), "..."), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("strong", null, t("WT_LOCATION"), ":"), " ", /*#__PURE__*/React.createElement(Address, {
5691
5723
  lat: selectedDriver.lat,
5692
5724
  lng: selectedDriver.lng
5693
- })), selectedDriver.speed && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("strong", null, "Speed:"), " ", Math.round(selectedDriver.speed * 3.6), " km/h"), selectedDriver.lastSeen && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("strong", null, "Last seen:"), " ", new Date(selectedDriver.lastSeen).toLocaleTimeString())))));
5725
+ })), selectedDriver.speed && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("strong", null, t("WT_SPEED"), ":"), " ", Math.round(selectedDriver.speed * 3.6), " ", t("km/h")), selectedDriver.lastSeen && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("strong", null, t("WT_LAST_SEEN"), ":"), " ", new Date(selectedDriver.lastSeen).toLocaleTimeString()))), /*#__PURE__*/React.createElement("div", {
5726
+ style: {
5727
+ position: "absolute",
5728
+ top: "20px",
5729
+ left: "20px",
5730
+ zIndex: 1000,
5731
+ display: "flex",
5732
+ flexDirection: "column",
5733
+ gap: "8px"
5734
+ }
5735
+ }, /*#__PURE__*/React.createElement("button", {
5736
+ onClick: () => setMapZoom(prev => prev + 1),
5737
+ style: {
5738
+ width: "32px",
5739
+ height: "32px",
5740
+ background: "white",
5741
+ border: "1px solid #e0e0e0",
5742
+ borderRadius: "4px",
5743
+ fontSize: "18px",
5744
+ fontWeight: "700",
5745
+ cursor: "pointer",
5746
+ boxShadow: "0 2px 4px rgba(0,0,0,0.1)"
5747
+ }
5748
+ }, "+"), /*#__PURE__*/React.createElement("button", {
5749
+ onClick: () => setMapZoom(prev => prev - 1),
5750
+ style: {
5751
+ width: "32px",
5752
+ height: "32px",
5753
+ background: "white",
5754
+ border: "1px solid #e0e0e0",
5755
+ borderRadius: "4px",
5756
+ fontSize: "18px",
5757
+ fontWeight: "700",
5758
+ cursor: "pointer",
5759
+ boxShadow: "0 2px 4px rgba(0,0,0,0.1)"
5760
+ }
5761
+ }, "\u2212")), /*#__PURE__*/React.createElement("div", {
5762
+ style: {
5763
+ position: "absolute",
5764
+ top: "20px",
5765
+ right: "20px",
5766
+ zIndex: 1000,
5767
+ display: "flex",
5768
+ gap: "12px"
5769
+ }
5770
+ }))));
5694
5771
  }
5695
5772
 
5696
5773
  const AddFillingPointMetaData = ({
@@ -6226,7 +6303,7 @@ const AddFixPointAddress = () => {
6226
6303
  const searchFilters = React.useMemo(() => ({
6227
6304
  tenantId,
6228
6305
  filters: {
6229
- bookingId: editId
6306
+ id: editId
6230
6307
  }
6231
6308
  }), [tenantId, editId]);
6232
6309
  const searchConfig = React.useMemo(() => ({
@@ -6239,7 +6316,10 @@ const AddFixPointAddress = () => {
6239
6316
  const [isDataFetched, setIsDataFetched] = useState(false);
6240
6317
  useEffect(() => {
6241
6318
  if (editId && editData !== null && editData !== void 0 && editData.waterTankerBookingDetail && !isDataFetched) {
6242
- const data = editData.waterTankerBookingDetail.find(item => item.bookingId === editId);
6319
+ const data = editData.waterTankerBookingDetail.find(item => {
6320
+ var _item$applicantDetail;
6321
+ return ((_item$applicantDetail = item.applicantDetail) === null || _item$applicantDetail === void 0 ? void 0 : _item$applicantDetail.applicantId) === editId;
6322
+ });
6243
6323
  if (data) {
6244
6324
  var _data$applicantDetail, _data$applicantDetail2, _data$applicantDetail3, _data$applicantDetail4, _data$applicantDetail5, _data$address, _data$address2;
6245
6325
  setFormData({
@@ -6635,7 +6715,6 @@ const LocalityModal = ({
6635
6715
  };
6636
6716
 
6637
6717
  const SearchFillingPointAddress = () => {
6638
- var _fixedPointData$water, _fillingPointData$fil;
6639
6718
  const {
6640
6719
  t
6641
6720
  } = useTranslation();
@@ -6652,7 +6731,7 @@ const SearchFillingPointAddress = () => {
6652
6731
  const [showLocalityModal, setShowLocalityModal] = useState(false);
6653
6732
  const [selectedLocalityRow, setSelectedLocalityRow] = useState(null);
6654
6733
  const [modalMode, setModalMode] = useState("ADD");
6655
- const [pageSize, setPageSize] = useState(10);
6734
+ const [pageSize, setPageSize] = useState(50);
6656
6735
  const [pageOffset, setPageOffset] = useState(0);
6657
6736
  const tenantId = Digit.ULBService.getCurrentTenantId();
6658
6737
  const closeToast = () => {
@@ -6868,12 +6947,12 @@ const SearchFillingPointAddress = () => {
6868
6947
  Cell: ({
6869
6948
  row
6870
6949
  }) => {
6871
- var _row$original$applica2;
6950
+ var _row$original$applica2, _row$original$applica3;
6872
6951
  return /*#__PURE__*/React.createElement("span", {
6873
6952
  className: "link"
6874
6953
  }, /*#__PURE__*/React.createElement(Link, {
6875
- to: `/digit-ui/employee/wt/add-fix-point-address?id=${row.original.bookingId}`
6876
- }, ((_row$original$applica2 = row.original.applicantDetail) === null || _row$original$applica2 === void 0 ? void 0 : _row$original$applica2.name) || "NA"));
6954
+ to: `/digit-ui/employee/wt/add-fix-point-address?id=${(_row$original$applica2 = row.original.applicantDetail) === null || _row$original$applica2 === void 0 ? void 0 : _row$original$applica2.applicantId}`
6955
+ }, ((_row$original$applica3 = row.original.applicantDetail) === null || _row$original$applica3 === void 0 ? void 0 : _row$original$applica3.name) || "NA"));
6877
6956
  }
6878
6957
  }, {
6879
6958
  Header: t("WT_MOBILE_NUMBER"),
@@ -7028,8 +7107,7 @@ const SearchFillingPointAddress = () => {
7028
7107
  const handlePageSizeChange = e => {
7029
7108
  setPageSize(Number(e.target.value));
7030
7109
  };
7031
- const fixedLength = (fixedPointData === null || fixedPointData === void 0 ? void 0 : (_fixedPointData$water = fixedPointData.waterTankerBookingDetail) === null || _fixedPointData$water === void 0 ? void 0 : _fixedPointData$water.length) || 0;
7032
- const fillingLength = (fillingPointData === null || fillingPointData === void 0 ? void 0 : (_fillingPointData$fil = fillingPointData.fillingPoints) === null || _fillingPointData$fil === void 0 ? void 0 : _fillingPointData$fil.length) || 0;
7110
+ const totalCount = Number(selectedTab === "FIXED_POINT" ? (fixedPointData === null || fixedPointData === void 0 ? void 0 : fixedPointData.Count) ?? (fixedPointData === null || fixedPointData === void 0 ? void 0 : fixedPointData.count) ?? (fixedPointData === null || fixedPointData === void 0 ? void 0 : fixedPointData.totalCount) ?? 0 : (fillingPointData === null || fillingPointData === void 0 ? void 0 : fillingPointData.Count) ?? (fillingPointData === null || fillingPointData === void 0 ? void 0 : fillingPointData.count) ?? (fillingPointData === null || fillingPointData === void 0 ? void 0 : fillingPointData.totalCount) ?? 0);
7033
7111
  const applyFixedPointMappedFilter = React.useCallback((rows = []) => {
7034
7112
  if (selectedTab !== "FIXED_POINT" || !(appliedFixedPointStatus !== null && appliedFixedPointStatus !== void 0 && appliedFixedPointStatus.code)) return rows;
7035
7113
  return rows.filter(item => {
@@ -7223,7 +7301,8 @@ const SearchFillingPointAddress = () => {
7223
7301
  onNextPage: fetchNextPage,
7224
7302
  onPrevPage: fetchPrevPage,
7225
7303
  pageSizeLimit: pageSize,
7226
- totalRecords: fixedLength + fillingLength,
7304
+ totalRecords: totalCount,
7305
+ isPaginationRequired: true,
7227
7306
  showPagination: true,
7228
7307
  showPageSizeOptions: true,
7229
7308
  isSearchRequired: false,
@@ -7299,7 +7378,7 @@ const SelectServiceType = ({
7299
7378
  return /*#__PURE__*/React.createElement(Loader, null);
7300
7379
  }
7301
7380
  if ((userType === null || userType === void 0 ? void 0 : userType.toLowerCase()) === "employee") {
7302
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, config.label), /*#__PURE__*/React.createElement(Dropdown, {
7381
+ return /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, config.label), /*#__PURE__*/React.createElement(Dropdown, {
7303
7382
  className: "payment-form-text-input-correction",
7304
7383
  isMandatory: config.isMandatory,
7305
7384
  selected: serviceTypes,
@@ -7521,6 +7600,7 @@ const EmployeeApp = ({
7521
7600
  t
7522
7601
  } = useTranslation();
7523
7602
  const location = useLocation();
7603
+ const fixedPointInboxLabel = t("WT_FIXED_POINT") !== "WT_FIXED_POINT" ? `${t("WT_FIXED_POINT")} ${t("ES_COMMON_INBOX")}` : "Fixed Point Inbox";
7524
7604
  sessionStorage.removeItem("revalidateddone");
7525
7605
  const getDynamicBreadcrumbs = () => {
7526
7606
  const pathname = location.pathname;
@@ -7534,7 +7614,11 @@ const EmployeeApp = ({
7534
7614
  label: t("WT_MODULE_NAME"),
7535
7615
  path: `/digit-ui/employee/module/details?moduleName=${moduleName}`
7536
7616
  }];
7537
- if (pathname.includes("/inbox")) {
7617
+ if (pathname.includes("/fixed-point/inbox")) {
7618
+ crumbs.push({
7619
+ label: fixedPointInboxLabel
7620
+ });
7621
+ } else if (pathname.includes("/inbox")) {
7538
7622
  let label = "ES_COMMON_INBOX";
7539
7623
  if (pathname.includes("/tp/inbox")) label = "TP_INBOX";
7540
7624
  crumbs.push({
@@ -7551,6 +7635,14 @@ const EmployeeApp = ({
7551
7635
  crumbs.push({
7552
7636
  label: t("WT_REQUEST_SERVICE")
7553
7637
  });
7638
+ } else if (pathname.includes("/fixed-point/booking-details")) {
7639
+ crumbs.push({
7640
+ label: fixedPointInboxLabel,
7641
+ path: `${path}/fixed-point/inbox`
7642
+ });
7643
+ crumbs.push({
7644
+ label: t("WT_BOOKING_DETAILS")
7645
+ });
7554
7646
  } else if (pathname.includes("/booking-details") || pathname.includes("/bookingsearch/booking-details")) {
7555
7647
  const isSearch = pathname.includes("/bookingsearch");
7556
7648
  if (isSearch) {
@@ -7627,6 +7719,17 @@ const EmployeeApp = ({
7627
7719
  locality: []
7628
7720
  }
7629
7721
  };
7722
+ const inboxInitialStateFixedPoint = {
7723
+ searchParams: {
7724
+ uuid: {
7725
+ code: "ASSIGNED_TO_ALL",
7726
+ name: "ES_INBOX_ASSIGNED_TO_ALL"
7727
+ },
7728
+ services: ["watertanker-fixedpoint"],
7729
+ applicationStatus: [],
7730
+ locality: []
7731
+ }
7732
+ };
7630
7733
  const ApplicationDetails = (_Digit = Digit) === null || _Digit === void 0 ? void 0 : (_Digit$ComponentRegis = _Digit.ComponentRegistryService) === null || _Digit$ComponentRegis === void 0 ? void 0 : _Digit$ComponentRegis.getComponent("ApplicationDetails");
7631
7734
  const WTCreate = (_Digit2 = Digit) === null || _Digit2 === void 0 ? void 0 : (_Digit2$ComponentRegi = _Digit2.ComponentRegistryService) === null || _Digit2$ComponentRegi === void 0 ? void 0 : _Digit2$ComponentRegi.getComponent("WTCreate");
7632
7735
  return /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(AppContainer, null, /*#__PURE__*/React.createElement("div", {
@@ -7652,6 +7755,18 @@ const EmployeeApp = ({
7652
7755
  initialStates: inboxInitialState,
7653
7756
  isInbox: true
7654
7757
  }))
7758
+ }), /*#__PURE__*/React.createElement(PrivateRoute, {
7759
+ path: `${path}/fixed-point/inbox`,
7760
+ component: props => /*#__PURE__*/React.createElement(Inbox, Object.assign({}, props, {
7761
+ useNewInboxAPI: true,
7762
+ parentRoute: path,
7763
+ businessService: "watertanker-fixedpoint",
7764
+ detailRoute: `${path}/fixed-point/booking-details`,
7765
+ moduleCode: "WT",
7766
+ filterComponent: "WT_INBOX_FILTER",
7767
+ initialStates: inboxInitialStateFixedPoint,
7768
+ isInbox: true
7769
+ }))
7655
7770
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
7656
7771
  path: `${path}/mt/inbox`,
7657
7772
  component: props => /*#__PURE__*/React.createElement(Inbox, Object.assign({}, props, {
@@ -7683,6 +7798,11 @@ const EmployeeApp = ({
7683
7798
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
7684
7799
  path: `${path}/tp/request-service`,
7685
7800
  component: WTCreate
7801
+ }), /*#__PURE__*/React.createElement(PrivateRoute, {
7802
+ path: `${path}/fixed-point/booking-details/:id`,
7803
+ component: props => /*#__PURE__*/React.createElement(ApplicationDetails, Object.assign({}, props, {
7804
+ parentRoute: path
7805
+ }))
7686
7806
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
7687
7807
  path: `${path}/booking-details/:id`,
7688
7808
  component: props => /*#__PURE__*/React.createElement(ApplicationDetails, Object.assign({}, props, {
@@ -14725,7 +14845,7 @@ const TableConfig = t => ({
14725
14845
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
14726
14846
  className: "link"
14727
14847
  }, /*#__PURE__*/React.createElement(Link, {
14728
- to: `${props.parentRoute}/booking-details/` + `${row === null || row === void 0 ? void 0 : (_row$original = row.original) === null || _row$original === void 0 ? void 0 : (_row$original$searchD = _row$original.searchData) === null || _row$original$searchD === void 0 ? void 0 : _row$original$searchD["bookingNo"]}`
14848
+ to: `${props.detailRoute || `${props.parentRoute}/booking-details`}/${row === null || row === void 0 ? void 0 : (_row$original = row.original) === null || _row$original === void 0 ? void 0 : (_row$original$searchD = _row$original.searchData) === null || _row$original$searchD === void 0 ? void 0 : _row$original$searchD["bookingNo"]}`
14729
14849
  }, (_row$original2 = row.original) === null || _row$original2 === void 0 ? void 0 : (_row$original2$search = _row$original2.searchData) === null || _row$original2$search === void 0 ? void 0 : _row$original2$search["bookingNo"])));
14730
14850
  },
14731
14851
  mobileCell: original => {