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

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.
@@ -944,13 +944,11 @@ const WTSearchApplication = ({
944
944
  marginTop: "16px"
945
945
  }
946
946
  }, /*#__PURE__*/React.createElement("span", {
947
- className: "clear-search-link",
947
+ className: "generic-button clear-search",
948
948
  onClick: handleClearSearch,
949
949
  style: {
950
- color: "#f47738",
951
950
  cursor: "pointer",
952
- alignSelf: "center",
953
- textDecoration: "underline"
951
+ alignSelf: "center"
954
952
  }
955
953
  }, t("ES_COMMON_CLEAR_ALL")), /*#__PURE__*/React.createElement("div", {
956
954
  style: {
@@ -3757,6 +3755,7 @@ const FixedPointScheduleManagement = ({
3757
3755
  const {
3758
3756
  t
3759
3757
  } = useTranslation();
3758
+ const queryClient = useQueryClient();
3760
3759
  const tenantId = Digit.ULBService.getCurrentTenantId();
3761
3760
  const [showModal, setShowModal] = useState(false);
3762
3761
  const [toast, setToast] = useState(null);
@@ -3782,8 +3781,7 @@ const FixedPointScheduleManagement = ({
3782
3781
  });
3783
3782
  const {
3784
3783
  isLoading,
3785
- data: scheduleData,
3786
- refetch: reSearch
3784
+ data: scheduleData
3787
3785
  } = Digit.Hooks.wt.useFixedPointScheduleSearch(tenantId, filters);
3788
3786
  const {
3789
3787
  data: fixedPointData,
@@ -3855,10 +3853,10 @@ const FixedPointScheduleManagement = ({
3855
3853
  document.body.removeChild(a);
3856
3854
  }
3857
3855
  };
3858
- const [data, setData] = useState([]);
3859
3856
  const mapScheduleRows = React.useCallback((rows = []) => rows.map(item => ({
3860
3857
  scheduleId: item.systemAssignedScheduleId,
3861
- fixedPoint: item.fixedPointCode,
3858
+ fixedPointName: item.fixedPointName,
3859
+ fixedPoint: item.fixedPointId,
3862
3860
  day: item.day,
3863
3861
  freq: item.tripNo,
3864
3862
  arrToFpl: item.arrivalTimeToFpl,
@@ -3871,11 +3869,9 @@ const FixedPointScheduleManagement = ({
3871
3869
  active: item.isEnable ? "Y" : "N",
3872
3870
  totalCount: item.totalCount
3873
3871
  })), []);
3874
- React.useEffect(() => {
3875
- if (scheduleData !== null && scheduleData !== void 0 && scheduleData.fixedPointTimeTableDetails) {
3876
- setData(mapScheduleRows(scheduleData.fixedPointTimeTableDetails));
3877
- }
3878
- }, [mapScheduleRows, scheduleData]);
3872
+ const data = React.useMemo(() => {
3873
+ return mapScheduleRows((scheduleData === null || scheduleData === void 0 ? void 0 : scheduleData.fixedPointTimeTableDetails) || []);
3874
+ }, [scheduleData, mapScheduleRows]);
3879
3875
  const fetchNextPage = () => {
3880
3876
  setPageOffset(prevState => prevState + pageSize);
3881
3877
  };
@@ -3906,8 +3902,11 @@ const FixedPointScheduleManagement = ({
3906
3902
  }
3907
3903
  }, [pageOffset, pageSize]);
3908
3904
  const columns = React.useMemo(() => [{
3909
- Header: t("WT_FIXED_POINT"),
3905
+ Header: t("WT_FIXED_POINT_CODE"),
3910
3906
  accessor: "fixedPoint"
3907
+ }, {
3908
+ Header: t("WT_FIXED_POINT_NAME"),
3909
+ accessor: "fixedPointName"
3911
3910
  }, {
3912
3911
  Header: t("WT_DAY"),
3913
3912
  accessor: "day"
@@ -4030,6 +4029,26 @@ const FixedPointScheduleManagement = ({
4030
4029
  accessor: "active"
4031
4030
  }], [t]);
4032
4031
  const days = ["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY"];
4032
+ const clearSearch = () => {
4033
+ setSelectedDay("all");
4034
+ setDay({
4035
+ label: "All Days",
4036
+ value: "all"
4037
+ });
4038
+ setFixedPoint({
4039
+ label: "All Fixed Points",
4040
+ value: "all"
4041
+ });
4042
+ setStatus({
4043
+ label: "All Status",
4044
+ value: "all"
4045
+ });
4046
+ setPageOffset(0);
4047
+ setFilters({
4048
+ limit: pageSize,
4049
+ offset: 0
4050
+ });
4051
+ };
4033
4052
  return /*#__PURE__*/React.createElement("div", {
4034
4053
  className: "fixed-point-schedule-management"
4035
4054
  }, /*#__PURE__*/React.createElement(Card, {
@@ -4138,11 +4157,16 @@ const FixedPointScheduleManagement = ({
4138
4157
  },
4139
4158
  placeholder: "All Status"
4140
4159
  })), /*#__PURE__*/React.createElement("div", {
4141
- className: "finance-mainlayout-col1",
4160
+ className: "finance-mainlayout-col1"
4161
+ }, /*#__PURE__*/React.createElement(Label, null, "\xA0"), /*#__PURE__*/React.createElement("span", {
4162
+ className: "generic-button clear-search",
4163
+ onClick: clearSearch,
4142
4164
  style: {
4143
- alignSelf: "flex-end"
4165
+ alignSelf: "center"
4144
4166
  }
4145
- }, /*#__PURE__*/React.createElement(SubmitBar, {
4167
+ }, t("ES_COMMON_CLEAR_SEARCH"))), /*#__PURE__*/React.createElement("div", {
4168
+ className: "finance-mainlayout-col1"
4169
+ }, /*#__PURE__*/React.createElement(Label, null, "\xA0"), /*#__PURE__*/React.createElement(SubmitBar, {
4146
4170
  label: t("ES_COMMON_SEARCH"),
4147
4171
  onSubmit: () => handleSearch()
4148
4172
  }))), /*#__PURE__*/React.createElement("div", {
@@ -4306,7 +4330,7 @@ const FixedPointScheduleManagement = ({
4306
4330
  setTimeout(closeToast, 5000);
4307
4331
  setShowModal(false);
4308
4332
  setEditingRowIndex(null);
4309
- reSearch();
4333
+ queryClient.invalidateQueries(["FIXED_POINT_SCHEDULE_SEARCH", tenantId]);
4310
4334
  }
4311
4335
  });
4312
4336
  } else {
@@ -4326,7 +4350,7 @@ const FixedPointScheduleManagement = ({
4326
4350
  setTimeout(closeToast, 5000);
4327
4351
  setShowModal(false);
4328
4352
  setEditingRowIndex(null);
4329
- reSearch();
4353
+ queryClient.invalidateQueries(["FIXED_POINT_SCHEDULE_SEARCH", tenantId]);
4330
4354
  }
4331
4355
  });
4332
4356
  }
@@ -4753,7 +4777,8 @@ const StatusBadge = ({
4753
4777
  const DriverCard = ({
4754
4778
  driver,
4755
4779
  isSelected,
4756
- onClick
4780
+ onClick,
4781
+ vendorList
4757
4782
  }) => {
4758
4783
  const [currentAddress, setCurrentAddress] = useState("Resolving area...");
4759
4784
  const [deliveryAddress, setDeliveryAddress] = useState("Resolving area...");
@@ -4797,6 +4822,21 @@ const DriverCard = ({
4797
4822
  };
4798
4823
  resolveDest();
4799
4824
  }, [driver.deliveryLat, driver.deliveryLng]);
4825
+ const vehicleNumber = useMemo(() => {
4826
+ if (!vendorList || !vendorList.length) return null;
4827
+ 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);
4832
+ });
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;
4836
+ }
4837
+ }
4838
+ return null;
4839
+ }, [vendorList, driver.driverId]);
4800
4840
  const calculateETA = () => {
4801
4841
  if (!driver.lat || !driver.lng || !driver.deliveryLat || !driver.deliveryLng) return null;
4802
4842
  const distance = calculateDistance$1(driver.lat, driver.lng, driver.deliveryLat, driver.deliveryLng);
@@ -4952,7 +4992,16 @@ const DriverCard = ({
4952
4992
  gridTemplateColumns: "1fr 1fr",
4953
4993
  gap: "4px"
4954
4994
  }
4955
- }, 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()))));
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"
5003
+ }
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()))));
4956
5005
  };
4957
5006
  function calculateDistance$1(lat1, lon1, lat2, lon2) {
4958
5007
  return calculateDistance(lat1, lon1, lat2, lon2);
@@ -4996,8 +5045,33 @@ function LiveTrackingSystem() {
4996
5045
  select: data => (data === null || data === void 0 ? void 0 : data.vendor) || []
4997
5046
  }
4998
5047
  });
5048
+ const filteredVendorOptions = useMemo(() => {
5049
+ if (!vendorOptions || !vendorOptions.length) return [];
5050
+ if (!selectedFillingPoint) return vendorOptions;
5051
+ return vendorOptions.filter(vendor => {
5052
+ var _vendor$fillingPoint;
5053
+ return (vendor === null || vendor === void 0 ? void 0 : (_vendor$fillingPoint = vendor.fillingPoint) === null || _vendor$fillingPoint === void 0 ? void 0 : _vendor$fillingPoint.id) === (selectedFillingPoint === null || selectedFillingPoint === void 0 ? void 0 : selectedFillingPoint.id);
5054
+ });
5055
+ }, [vendorOptions, selectedFillingPoint]);
5056
+ useEffect(() => {
5057
+ if (vendorOptions !== null && vendorOptions !== void 0 && vendorOptions.length && Object.keys(drivers).length) {
5058
+ var _vendorOptions$, _vendorOptions$2, _vendorOptions$2$driv;
5059
+ console.log("=== VENDOR DEBUG ===");
5060
+ console.log("Vendor[0] vehicles:", (_vendorOptions$ = vendorOptions[0]) === null || _vendorOptions$ === void 0 ? void 0 : _vendorOptions$.vehicles);
5061
+ 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;
5063
+ return {
5064
+ 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
5067
+ };
5068
+ }));
5069
+ console.log("Socket driverId example:", Object.keys(drivers)[0]);
5070
+ }
5071
+ }, [vendorOptions, drivers]);
4999
5072
  const handleFillingPointSelect = value => {
5000
5073
  setSelectedFillingPoint(value);
5074
+ setSelectedVendor(null);
5001
5075
  };
5002
5076
  useEffect(() => {
5003
5077
  const handleResize = () => {
@@ -5084,8 +5158,24 @@ function LiveTrackingSystem() {
5084
5158
  const filteredDrivers = Object.values(drivers).filter(driver => {
5085
5159
  const matchesSearch = driver.driverId.toLowerCase().includes(searchTerm.toLowerCase());
5086
5160
  const matchesStatus = filterOnline === "all" || filterOnline === "online" && driver.isOnline || filterOnline === "offline" && !driver.isOnline;
5087
- const matchesFillingPoint = !selectedFillingPoint || driver.fillingPointId === selectedFillingPoint.id;
5088
- const matchesVendor = !selectedVendor || driver.vendorId === (selectedVendor.id || selectedVendor.code);
5161
+ const matchesFillingPoint = !selectedFillingPoint || (() => {
5162
+ if (!vendorOptions || !vendorOptions.length) return false;
5163
+ return vendorOptions.some(vendor => {
5164
+ var _vendor$fillingPoint2, _vendor$drivers;
5165
+ 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);
5169
+ });
5170
+ });
5171
+ })();
5172
+ const matchesVendor = !selectedVendor || (_selectedVendor$drive => {
5173
+ 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)];
5176
+ }).flat().filter(Boolean)) || [];
5177
+ return vendorDriverIds.some(id => driver.driverId === id);
5178
+ })();
5089
5179
  return matchesSearch && matchesStatus && matchesFillingPoint && matchesVendor;
5090
5180
  });
5091
5181
  const onlineCount = Object.values(drivers).filter(d => d.isOnline).length;
@@ -5292,7 +5382,7 @@ function LiveTrackingSystem() {
5292
5382
  }
5293
5383
  }), /*#__PURE__*/React.createElement(Dropdown, {
5294
5384
  t: t,
5295
- option: vendorOptions,
5385
+ option: filteredVendorOptions,
5296
5386
  optionKey: "name",
5297
5387
  select: setSelectedVendor,
5298
5388
  selected: selectedVendor,
@@ -5395,6 +5485,7 @@ function LiveTrackingSystem() {
5395
5485
  key: driver.driverId,
5396
5486
  driver: driver,
5397
5487
  isSelected: (selectedDriver === null || selectedDriver === void 0 ? void 0 : selectedDriver.driverId) === driver.driverId,
5488
+ vendorList: vendorOptions,
5398
5489
  onClick: () => {
5399
5490
  setSelectedDriver(driver);
5400
5491
  if (isMobile) {
@@ -6630,7 +6721,7 @@ const SearchFillingPointAddress = () => {
6630
6721
  placeholder: "WT_ENTER_FIXED_POINT_NAME"
6631
6722
  },
6632
6723
  FILLING_POINT: {
6633
- label: "WT_FILLING_POINT_CODE",
6724
+ label: "WT_FILLING_POINT_NAME",
6634
6725
  placeholder: "WT_ENTER_FILLING_POINT_NAME"
6635
6726
  }
6636
6727
  };
@@ -6761,10 +6852,17 @@ const SearchFillingPointAddress = () => {
6761
6852
  const columns = React.useMemo(() => {
6762
6853
  if (selectedTab === "FIXED_POINT") {
6763
6854
  return [{
6764
- Header: t("WT_FIXING_POINT_APPLICANT_DETAILS"),
6855
+ Header: t("WT_FIXED_POINT_CODE"),
6765
6856
  accessor: row => {
6766
6857
  var _row$applicantDetail;
6767
- return (row === null || row === void 0 ? void 0 : (_row$applicantDetail = row.applicantDetail) === null || _row$applicantDetail === void 0 ? void 0 : _row$applicantDetail.name) || "NA";
6858
+ return (row === null || row === void 0 ? void 0 : (_row$applicantDetail = row.applicantDetail) === null || _row$applicantDetail === void 0 ? void 0 : _row$applicantDetail.fixedPointId) || "NA";
6859
+ },
6860
+ id: "fixedPointId"
6861
+ }, {
6862
+ Header: t("WT_FIXING_POINT_APPLICANT_DETAILS"),
6863
+ accessor: row => {
6864
+ var _row$applicantDetail2;
6865
+ return (row === null || row === void 0 ? void 0 : (_row$applicantDetail2 = row.applicantDetail) === null || _row$applicantDetail2 === void 0 ? void 0 : _row$applicantDetail2.name) || "NA";
6768
6866
  },
6769
6867
  id: "applicantName",
6770
6868
  Cell: ({
@@ -6780,8 +6878,8 @@ const SearchFillingPointAddress = () => {
6780
6878
  }, {
6781
6879
  Header: t("WT_MOBILE_NUMBER"),
6782
6880
  accessor: row => {
6783
- var _row$applicantDetail2;
6784
- return (row === null || row === void 0 ? void 0 : (_row$applicantDetail2 = row.applicantDetail) === null || _row$applicantDetail2 === void 0 ? void 0 : _row$applicantDetail2.mobileNumber) || "NA";
6881
+ var _row$applicantDetail3;
6882
+ return (row === null || row === void 0 ? void 0 : (_row$applicantDetail3 = row.applicantDetail) === null || _row$applicantDetail3 === void 0 ? void 0 : _row$applicantDetail3.mobileNumber) || "NA";
6785
6883
  },
6786
6884
  id: "mobileNumber"
6787
6885
  }, {
@@ -6824,6 +6922,10 @@ const SearchFillingPointAddress = () => {
6824
6922
  } else {
6825
6923
  return [{
6826
6924
  Header: t("WT_FILLING_POINT_CODE"),
6925
+ accessor: row => (row === null || row === void 0 ? void 0 : row.fillingPointId) || "NA",
6926
+ id: "fillingPointId"
6927
+ }, {
6928
+ Header: t("WT_FILLING_POINT_NAME"),
6827
6929
  accessor: row => (row === null || row === void 0 ? void 0 : row.fillingPointName) || "NA",
6828
6930
  id: "fillingPointName",
6829
6931
  Cell: ({
@@ -6975,14 +7077,14 @@ const SearchFillingPointAddress = () => {
6975
7077
  return [{
6976
7078
  Header: t("WT_APPLICANT_NAME"),
6977
7079
  exportAccessor: row => {
6978
- var _row$applicantDetail3;
6979
- return (row === null || row === void 0 ? void 0 : (_row$applicantDetail3 = row.applicantDetail) === null || _row$applicantDetail3 === void 0 ? void 0 : _row$applicantDetail3.name) || "NA";
7080
+ var _row$applicantDetail4;
7081
+ return (row === null || row === void 0 ? void 0 : (_row$applicantDetail4 = row.applicantDetail) === null || _row$applicantDetail4 === void 0 ? void 0 : _row$applicantDetail4.name) || "NA";
6980
7082
  }
6981
7083
  }, {
6982
7084
  Header: t("WT_MOBILE_NUMBER"),
6983
7085
  exportAccessor: row => {
6984
- var _row$applicantDetail4;
6985
- return (row === null || row === void 0 ? void 0 : (_row$applicantDetail4 = row.applicantDetail) === null || _row$applicantDetail4 === void 0 ? void 0 : _row$applicantDetail4.mobileNumber) || "NA";
7086
+ var _row$applicantDetail5;
7087
+ return (row === null || row === void 0 ? void 0 : (_row$applicantDetail5 = row.applicantDetail) === null || _row$applicantDetail5 === void 0 ? void 0 : _row$applicantDetail5.mobileNumber) || "NA";
6986
7088
  }
6987
7089
  }, {
6988
7090
  Header: t("WT_LOCALITY"),
@@ -7085,20 +7187,16 @@ const SearchFillingPointAddress = () => {
7085
7187
  select: setStatus,
7086
7188
  t: t
7087
7189
  })), /*#__PURE__*/React.createElement("div", {
7088
- style: {
7089
- display: "flex",
7090
- marginTop: "32px",
7091
- justifyContent: isMobile ? "center" : "flex-end",
7092
- flexDirection: isMobile ? "column-reverse" : "row",
7093
- gap: "16px"
7094
- }
7095
- }, /*#__PURE__*/React.createElement("span", {
7096
- className: "clear-search",
7190
+ className: "finance-mainlayout-col1"
7191
+ }, /*#__PURE__*/React.createElement(Label, null, "\xA0"), /*#__PURE__*/React.createElement("span", {
7192
+ className: "generic-button clear-search",
7097
7193
  onClick: clearSearch,
7098
7194
  style: {
7099
7195
  alignSelf: "center"
7100
7196
  }
7101
- }, t("ES_COMMON_CLEAR_SEARCH")), /*#__PURE__*/React.createElement(SubmitBar, {
7197
+ }, t("ES_COMMON_CLEAR_SEARCH"))), /*#__PURE__*/React.createElement("div", {
7198
+ className: "finance-mainlayout-col1"
7199
+ }, /*#__PURE__*/React.createElement(Label, null, "\xA0"), /*#__PURE__*/React.createElement(SubmitBar, {
7102
7200
  label: t("ES_COMMON_SEARCH"),
7103
7201
  onSubmit: onSearch
7104
7202
  })))), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(ApplicationTable, {
@@ -7223,6 +7321,7 @@ const VendorAssign = ({
7223
7321
  const {
7224
7322
  t
7225
7323
  } = useTranslation();
7324
+ const history = useHistory();
7226
7325
  const [showToast, setShowToast] = useState(null);
7227
7326
  const [vendor, setVendor] = useState(null);
7228
7327
  const [validFrom, setValidFrom] = useState("");
@@ -7289,6 +7388,9 @@ const VendorAssign = ({
7289
7388
  isError: false,
7290
7389
  label: t("ES_COMMON_SAVE_SUCCESS")
7291
7390
  });
7391
+ setTimeout(() => {
7392
+ history.push("/digit-ui/employee/vendor/search-vendor");
7393
+ }, 3000);
7292
7394
  },
7293
7395
  onError: err => {
7294
7396
  var _err$response, _err$response$data, _err$response$data$Er, _err$response$data$Er2;