@djb25/digit-ui-module-vendor 1.0.21 → 1.0.23
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.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +249 -78
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -8180,8 +8180,8 @@ const getFillingPointIdentifiers = fillingPoint => {
|
|
|
8180
8180
|
return [fillingPoint === null || fillingPoint === void 0 ? void 0 : fillingPoint.id, fillingPoint === null || fillingPoint === void 0 ? void 0 : fillingPoint.fillingStationId, fillingPoint === null || fillingPoint === void 0 ? void 0 : fillingPoint.bookingId, fillingPoint === null || fillingPoint === void 0 ? void 0 : fillingPoint.fillingPointId, fillingPoint === null || fillingPoint === void 0 ? void 0 : fillingPoint.uuid, fillingPoint === null || fillingPoint === void 0 ? void 0 : (_fillingPoint$filling = fillingPoint.fillingpointmetadata) === null || _fillingPoint$filling === void 0 ? void 0 : _fillingPoint$filling.fillingPointId].filter(value => value !== undefined && value !== null && value !== "").map(String);
|
|
8181
8181
|
};
|
|
8182
8182
|
const getRowFillingPointIdentifiers = (row = {}) => {
|
|
8183
|
-
var _row$dsoDetails, _row$fillingpointmeta, _row$dsoDetails2;
|
|
8184
|
-
return Array.from(new Set([...[row === null || row === void 0 ? void 0 : row.fillingPointId, row === null || row === void 0 ? void 0 : (_row$dsoDetails = row.dsoDetails) === null || _row$dsoDetails === void 0 ? void 0 : _row$dsoDetails.fillingPointId, row === null || row === void 0 ? void 0 : (_row$fillingpointmeta = row.fillingpointmetadata) === null || _row$fillingpointmeta === void 0 ? void 0 : _row$fillingpointmeta.fillingPointId, row === null || row === void 0 ? void 0 : row.fillingPtName, row === null || row === void 0 ? void 0 : row.filling_pt_name].filter(value => value !== undefined && value !== null && value !== "").map(String), ...getFillingPointIdentifiers(row === null || row === void 0 ? void 0 : row.fillingPoint), ...getFillingPointIdentifiers(row === null || row === void 0 ? void 0 : (_row$dsoDetails2 = row.dsoDetails) === null || _row$dsoDetails2 === void 0 ? void 0 : _row$dsoDetails2.fillingPoint), ...getFillingPointIdentifiers(row === null || row === void 0 ? void 0 : row.fillingPointDetail)]));
|
|
8183
|
+
var _row$dsoDetails, _row$fillingpointmeta, _row$fillingPoint, _row$fillingPoint2, _row$dsoDetails2;
|
|
8184
|
+
return Array.from(new Set([...[row === null || row === void 0 ? void 0 : row.fillingPointId, row === null || row === void 0 ? void 0 : (_row$dsoDetails = row.dsoDetails) === null || _row$dsoDetails === void 0 ? void 0 : _row$dsoDetails.fillingPointId, row === null || row === void 0 ? void 0 : (_row$fillingpointmeta = row.fillingpointmetadata) === null || _row$fillingpointmeta === void 0 ? void 0 : _row$fillingpointmeta.fillingPointId, row === null || row === void 0 ? void 0 : row.fillingPtName, row === null || row === void 0 ? void 0 : row.filling_pt_name, row === null || row === void 0 ? void 0 : (_row$fillingPoint = row.fillingPoint) === null || _row$fillingPoint === void 0 ? void 0 : _row$fillingPoint.fillingPointId].filter(value => value !== undefined && value !== null && value !== "").map(String), ...getFillingPointIdentifiers(row === null || row === void 0 ? void 0 : row.fillingPoint), ...getFillingPointIdentifiers(row !== null && row !== void 0 && (_row$fillingPoint2 = row.fillingPoint) !== null && _row$fillingPoint2 !== void 0 && _row$fillingPoint2.length ? row.fillingPoint[0] : row.fillingPoint), ...getFillingPointIdentifiers(row === null || row === void 0 ? void 0 : (_row$dsoDetails2 = row.dsoDetails) === null || _row$dsoDetails2 === void 0 ? void 0 : _row$dsoDetails2.fillingPoint), ...getFillingPointIdentifiers(row === null || row === void 0 ? void 0 : row.fillingPointDetail)]));
|
|
8185
8185
|
};
|
|
8186
8186
|
const getSelectedFillingPointOption = (row, fillingPoints = []) => {
|
|
8187
8187
|
const rowFillingPointIdentifiers = getRowFillingPointIdentifiers(row);
|
|
@@ -8189,8 +8189,45 @@ const getSelectedFillingPointOption = (row, fillingPoints = []) => {
|
|
|
8189
8189
|
return fillingPoints.find(fillingPoint => getFillingPointIdentifiers(fillingPoint).some(identifier => rowFillingPointIdentifiers.includes(identifier))) || null;
|
|
8190
8190
|
};
|
|
8191
8191
|
const getFillingPointDisplayValue = (row = {}) => {
|
|
8192
|
-
var _row$
|
|
8193
|
-
return (row === null || row === void 0 ? void 0 : (_row$
|
|
8192
|
+
var _row$fillingPoint3, _row$dsoDetails3, _row$dsoDetails3$fill, _row$dsoDetails4, _row$dsoDetails5, _row$dsoDetails6, _row$dsoDetails7, _row$fillingpointmeta2;
|
|
8193
|
+
return (row === null || row === void 0 ? void 0 : (_row$fillingPoint3 = row.fillingPoint) === null || _row$fillingPoint3 === void 0 ? void 0 : _row$fillingPoint3.fillingPointName) || (row === null || row === void 0 ? void 0 : (_row$dsoDetails3 = row.dsoDetails) === null || _row$dsoDetails3 === void 0 ? void 0 : (_row$dsoDetails3$fill = _row$dsoDetails3.fillingPoint) === null || _row$dsoDetails3$fill === void 0 ? void 0 : _row$dsoDetails3$fill.fillingPointName) || (row === null || row === void 0 ? void 0 : row.fillingPointName) || (row === null || row === void 0 ? void 0 : (_row$dsoDetails4 = row.dsoDetails) === null || _row$dsoDetails4 === void 0 ? void 0 : _row$dsoDetails4.fillingPointName) || (row === null || row === void 0 ? void 0 : row.fillingPointId) || (row === null || row === void 0 ? void 0 : (_row$dsoDetails5 = row.dsoDetails) === null || _row$dsoDetails5 === void 0 ? void 0 : _row$dsoDetails5.fillingPointId) || (typeof (row === null || row === void 0 ? void 0 : row.fillingPoint) === "string" ? row === null || row === void 0 ? void 0 : row.fillingPoint : null) || (typeof (row === null || row === void 0 ? void 0 : (_row$dsoDetails6 = row.dsoDetails) === null || _row$dsoDetails6 === void 0 ? void 0 : _row$dsoDetails6.fillingPoint) === "string" ? row === null || row === void 0 ? void 0 : (_row$dsoDetails7 = row.dsoDetails) === null || _row$dsoDetails7 === void 0 ? void 0 : _row$dsoDetails7.fillingPoint : null) || (row === null || row === void 0 ? void 0 : (_row$fillingpointmeta2 = row.fillingpointmetadata) === null || _row$fillingpointmeta2 === void 0 ? void 0 : _row$fillingpointmeta2.fillingPointId) || (row === null || row === void 0 ? void 0 : row.filling_pt_name) || (row === null || row === void 0 ? void 0 : row.fillingPtName) || "NA";
|
|
8194
|
+
};
|
|
8195
|
+
const getSelectedVendorOption = (row = {}, vendors = []) => {
|
|
8196
|
+
var _row$vendor, _row$vendorData;
|
|
8197
|
+
const selectedVendorId = (row === null || row === void 0 ? void 0 : (_row$vendor = row.vendor) === null || _row$vendor === void 0 ? void 0 : _row$vendor.id) || (row === null || row === void 0 ? void 0 : (_row$vendorData = row.vendorData) === null || _row$vendorData === void 0 ? void 0 : _row$vendorData.id) || (row === null || row === void 0 ? void 0 : row.vendorId);
|
|
8198
|
+
if (!selectedVendorId) return null;
|
|
8199
|
+
return vendors.find(vendor => (vendor === null || vendor === void 0 ? void 0 : vendor.id) === selectedVendorId) || (row === null || row === void 0 ? void 0 : row.vendor) || (row === null || row === void 0 ? void 0 : row.vendorData) || null;
|
|
8200
|
+
};
|
|
8201
|
+
const getVendorFillingPoints = (vendor = {}) => {
|
|
8202
|
+
const fillingPointOptions = [vendor === null || vendor === void 0 ? void 0 : vendor.fillingPoint, ...(Array.isArray(vendor === null || vendor === void 0 ? void 0 : vendor.fillingPoints) ? vendor.fillingPoints : [])].filter(Boolean);
|
|
8203
|
+
const uniqueFillingPoints = new Map();
|
|
8204
|
+
fillingPointOptions.forEach(fillingPoint => {
|
|
8205
|
+
const identifier = getFillingPointIdentifiers(fillingPoint)[0] || (fillingPoint === null || fillingPoint === void 0 ? void 0 : fillingPoint.fillingPointName) || (fillingPoint === null || fillingPoint === void 0 ? void 0 : fillingPoint.id);
|
|
8206
|
+
if (identifier && !uniqueFillingPoints.has(identifier)) {
|
|
8207
|
+
uniqueFillingPoints.set(identifier, fillingPoint);
|
|
8208
|
+
}
|
|
8209
|
+
});
|
|
8210
|
+
return Array.from(uniqueFillingPoints.values());
|
|
8211
|
+
};
|
|
8212
|
+
const getDriverFillingPointIdentifiers = (driver = {}) => {
|
|
8213
|
+
var _driver$additionalDet, _driver$additionalDet2, _driver$fillingpointm;
|
|
8214
|
+
return Array.from(new Set([driver === null || driver === void 0 ? void 0 : driver.fillingPointId, driver === null || driver === void 0 ? void 0 : driver.fillingStationId, driver === null || driver === void 0 ? void 0 : (_driver$additionalDet = driver.additionalDetails) === null || _driver$additionalDet === void 0 ? void 0 : _driver$additionalDet.fillingPointId, driver === null || driver === void 0 ? void 0 : (_driver$additionalDet2 = driver.additionalDetails) === null || _driver$additionalDet2 === void 0 ? void 0 : _driver$additionalDet2.fillingStationId, driver === null || driver === void 0 ? void 0 : (_driver$fillingpointm = driver.fillingpointmetadata) === null || _driver$fillingpointm === void 0 ? void 0 : _driver$fillingpointm.fillingPointId].filter(value => value !== undefined && value !== null && value !== "").map(String).concat(getFillingPointIdentifiers(driver === null || driver === void 0 ? void 0 : driver.fillingPoint), getFillingPointIdentifiers(driver === null || driver === void 0 ? void 0 : driver.fillingPointDetail), getFillingPointIdentifiers(driver === null || driver === void 0 ? void 0 : driver.fillingPointDetails))));
|
|
8215
|
+
};
|
|
8216
|
+
const getVendorDriversForFillingPoint = (vendor, fillingPoint) => {
|
|
8217
|
+
const vendorDrivers = Array.isArray(vendor === null || vendor === void 0 ? void 0 : vendor.drivers) ? vendor.drivers.filter(Boolean) : [];
|
|
8218
|
+
if (!fillingPoint) return [];
|
|
8219
|
+
const selectedFillingPointIdentifiers = getFillingPointIdentifiers(fillingPoint);
|
|
8220
|
+
if (!selectedFillingPointIdentifiers.length) return vendorDrivers;
|
|
8221
|
+
return vendorDrivers.filter(driver => {
|
|
8222
|
+
const driverFillingPointIdentifiers = getDriverFillingPointIdentifiers(driver);
|
|
8223
|
+
return !driverFillingPointIdentifiers.length || driverFillingPointIdentifiers.some(identifier => selectedFillingPointIdentifiers.includes(identifier));
|
|
8224
|
+
});
|
|
8225
|
+
};
|
|
8226
|
+
const getSelectedDriverOption = (row = {}, drivers = []) => {
|
|
8227
|
+
var _row$driverData, _row$driver;
|
|
8228
|
+
const selectedDriverId = (row === null || row === void 0 ? void 0 : (_row$driverData = row.driverData) === null || _row$driverData === void 0 ? void 0 : _row$driverData.id) || (row === null || row === void 0 ? void 0 : (_row$driver = row.driver) === null || _row$driver === void 0 ? void 0 : _row$driver.id);
|
|
8229
|
+
if (!selectedDriverId) return null;
|
|
8230
|
+
return drivers.find(driver => (driver === null || driver === void 0 ? void 0 : driver.id) === selectedDriverId) || null;
|
|
8194
8231
|
};
|
|
8195
8232
|
const normalizeFillingPointForVehicleUpdate = fillingPoint => {
|
|
8196
8233
|
if (!fillingPoint || typeof fillingPoint !== "object") return fillingPoint;
|
|
@@ -8209,7 +8246,6 @@ const VendorInbox = props => {
|
|
|
8209
8246
|
t
|
|
8210
8247
|
} = useTranslation();
|
|
8211
8248
|
const history = useHistory();
|
|
8212
|
-
const DSO = Digit.UserService.hasAccess(["FSM_DSO"]) || false;
|
|
8213
8249
|
const GetCell = value => /*#__PURE__*/React.createElement("span", {
|
|
8214
8250
|
className: "cell-text"
|
|
8215
8251
|
}, value);
|
|
@@ -8288,6 +8324,12 @@ const VendorInbox = props => {
|
|
|
8288
8324
|
const closeToast = () => {
|
|
8289
8325
|
setShowToast(null);
|
|
8290
8326
|
};
|
|
8327
|
+
const updateVehicleRowState = (vehicleId, updates) => {
|
|
8328
|
+
setTableData(currentTableData => currentTableData.map(vehicle => (vehicle === null || vehicle === void 0 ? void 0 : vehicle.id) === vehicleId ? {
|
|
8329
|
+
...vehicle,
|
|
8330
|
+
...updates
|
|
8331
|
+
} : vehicle));
|
|
8332
|
+
};
|
|
8291
8333
|
const getVehicleUpdatePayload = (vehicle, overrides = {}) => {
|
|
8292
8334
|
const normalizedVehicle = {
|
|
8293
8335
|
...vehicle,
|
|
@@ -8302,6 +8344,19 @@ const VendorInbox = props => {
|
|
|
8302
8344
|
vehicle: normalizedVehicle
|
|
8303
8345
|
};
|
|
8304
8346
|
};
|
|
8347
|
+
const getVendorPayloadForVehicle = (vendor, vehicles) => {
|
|
8348
|
+
var _vendor$owner;
|
|
8349
|
+
return {
|
|
8350
|
+
vendor: {
|
|
8351
|
+
...vendor,
|
|
8352
|
+
owner: {
|
|
8353
|
+
...(vendor === null || vendor === void 0 ? void 0 : vendor.owner),
|
|
8354
|
+
gender: (vendor === null || vendor === void 0 ? void 0 : (_vendor$owner = vendor.owner) === null || _vendor$owner === void 0 ? void 0 : _vendor$owner.gender) || "OTHERS"
|
|
8355
|
+
},
|
|
8356
|
+
vehicles
|
|
8357
|
+
}
|
|
8358
|
+
};
|
|
8359
|
+
};
|
|
8305
8360
|
const onVendorUpdate = row => {
|
|
8306
8361
|
var _formDetails$owner, _formDetails$owner2, _formDetails$owner3, _formDetails$owner4;
|
|
8307
8362
|
let formDetails = row.original.dsoDetails;
|
|
@@ -8434,6 +8489,84 @@ const VendorInbox = props => {
|
|
|
8434
8489
|
}
|
|
8435
8490
|
});
|
|
8436
8491
|
};
|
|
8492
|
+
const onVehicleVendorSelect = (row, selectedVendor) => {
|
|
8493
|
+
const currentVehicle = row.original;
|
|
8494
|
+
const existingVendor = currentVehicle === null || currentVehicle === void 0 ? void 0 : currentVehicle.vendor;
|
|
8495
|
+
if (!(selectedVendor !== null && selectedVendor !== void 0 && selectedVendor.id) || (existingVendor === null || existingVendor === void 0 ? void 0 : existingVendor.id) === (selectedVendor === null || selectedVendor === void 0 ? void 0 : selectedVendor.id)) {
|
|
8496
|
+
return;
|
|
8497
|
+
}
|
|
8498
|
+
const vehicleForVendorMapping = {
|
|
8499
|
+
...currentVehicle,
|
|
8500
|
+
vendorVehicleStatus: "ACTIVE",
|
|
8501
|
+
fillingPoint: null,
|
|
8502
|
+
driverData: null,
|
|
8503
|
+
driver: null
|
|
8504
|
+
};
|
|
8505
|
+
delete vehicleForVendorMapping.vendor;
|
|
8506
|
+
delete vehicleForVendorMapping.popup;
|
|
8507
|
+
delete vehicleForVendorMapping.driver;
|
|
8508
|
+
const addVehicleToSelectedVendor = () => {
|
|
8509
|
+
const selectedVendorVehicles = Array.isArray(selectedVendor === null || selectedVendor === void 0 ? void 0 : selectedVendor.vehicles) ? [...selectedVendor.vehicles] : [];
|
|
8510
|
+
const existingVehicleIndex = selectedVendorVehicles.findIndex(vehicle => (vehicle === null || vehicle === void 0 ? void 0 : vehicle.id) === (currentVehicle === null || currentVehicle === void 0 ? void 0 : currentVehicle.id));
|
|
8511
|
+
if (existingVehicleIndex > -1) {
|
|
8512
|
+
selectedVendorVehicles[existingVehicleIndex] = {
|
|
8513
|
+
...selectedVendorVehicles[existingVehicleIndex],
|
|
8514
|
+
...vehicleForVendorMapping,
|
|
8515
|
+
vendorVehicleStatus: "ACTIVE"
|
|
8516
|
+
};
|
|
8517
|
+
} else {
|
|
8518
|
+
selectedVendorVehicles.push(vehicleForVendorMapping);
|
|
8519
|
+
}
|
|
8520
|
+
const updatedSelectedVendor = {
|
|
8521
|
+
...selectedVendor,
|
|
8522
|
+
vehicles: selectedVendorVehicles
|
|
8523
|
+
};
|
|
8524
|
+
mutateVendor(getVendorPayloadForVehicle(selectedVendor, selectedVendorVehicles), {
|
|
8525
|
+
onError: error => {
|
|
8526
|
+
setShowToast({
|
|
8527
|
+
key: "error",
|
|
8528
|
+
action: error
|
|
8529
|
+
});
|
|
8530
|
+
setTimeout(closeToast, 5000);
|
|
8531
|
+
},
|
|
8532
|
+
onSuccess: () => {
|
|
8533
|
+
updateVehicleRowState(currentVehicle === null || currentVehicle === void 0 ? void 0 : currentVehicle.id, {
|
|
8534
|
+
vendor: updatedSelectedVendor,
|
|
8535
|
+
fillingPoint: null,
|
|
8536
|
+
driverData: null,
|
|
8537
|
+
driver: null
|
|
8538
|
+
});
|
|
8539
|
+
setShowToast({
|
|
8540
|
+
key: "success",
|
|
8541
|
+
action: "VEHICLE"
|
|
8542
|
+
});
|
|
8543
|
+
queryClient.invalidateQueries("DSO_SEARCH");
|
|
8544
|
+
queryClient.invalidateQueries("FSM_VEICLES_SEARCH");
|
|
8545
|
+
props.refetchData();
|
|
8546
|
+
props.refetchVendor && props.refetchVendor();
|
|
8547
|
+
setTimeout(closeToast, 3000);
|
|
8548
|
+
}
|
|
8549
|
+
});
|
|
8550
|
+
};
|
|
8551
|
+
if (existingVendor !== null && existingVendor !== void 0 && existingVendor.id) {
|
|
8552
|
+
const existingVendorVehicles = Array.isArray(existingVendor === null || existingVendor === void 0 ? void 0 : existingVendor.vehicles) ? existingVendor.vehicles.map(vehicle => (vehicle === null || vehicle === void 0 ? void 0 : vehicle.id) === (currentVehicle === null || currentVehicle === void 0 ? void 0 : currentVehicle.id) ? {
|
|
8553
|
+
...vehicle,
|
|
8554
|
+
vendorVehicleStatus: "INACTIVE"
|
|
8555
|
+
} : vehicle) : [];
|
|
8556
|
+
mutateVendor(getVendorPayloadForVehicle(existingVendor, existingVendorVehicles), {
|
|
8557
|
+
onError: error => {
|
|
8558
|
+
setShowToast({
|
|
8559
|
+
key: "error",
|
|
8560
|
+
action: error
|
|
8561
|
+
});
|
|
8562
|
+
setTimeout(closeToast, 5000);
|
|
8563
|
+
},
|
|
8564
|
+
onSuccess: addVehicleToSelectedVendor
|
|
8565
|
+
});
|
|
8566
|
+
return;
|
|
8567
|
+
}
|
|
8568
|
+
addVehicleToSelectedVendor();
|
|
8569
|
+
};
|
|
8437
8570
|
const onDriverSelect = (row, selectedOption) => {
|
|
8438
8571
|
const formData = getVehicleUpdatePayload(row.original, {
|
|
8439
8572
|
driverData: selectedOption
|
|
@@ -8447,6 +8580,10 @@ const VendorInbox = props => {
|
|
|
8447
8580
|
setTimeout(closeToast, 5000);
|
|
8448
8581
|
},
|
|
8449
8582
|
onSuccess: (data, variables) => {
|
|
8583
|
+
var _row$original2;
|
|
8584
|
+
updateVehicleRowState((_row$original2 = row.original) === null || _row$original2 === void 0 ? void 0 : _row$original2.id, {
|
|
8585
|
+
driverData: selectedOption
|
|
8586
|
+
});
|
|
8450
8587
|
setShowToast({
|
|
8451
8588
|
key: "success",
|
|
8452
8589
|
action: "VEHICLE"
|
|
@@ -8473,16 +8610,20 @@ const VendorInbox = props => {
|
|
|
8473
8610
|
setTimeout(closeToast, 5000);
|
|
8474
8611
|
},
|
|
8475
8612
|
onSuccess: () => {
|
|
8476
|
-
|
|
8477
|
-
|
|
8478
|
-
|
|
8479
|
-
|
|
8480
|
-
|
|
8481
|
-
|
|
8482
|
-
|
|
8483
|
-
|
|
8484
|
-
}
|
|
8485
|
-
|
|
8613
|
+
var _row$original3;
|
|
8614
|
+
const mappedVendor = getSelectedVendorOption(row.original, vendors);
|
|
8615
|
+
const vendorDrivers = getVendorDriversForFillingPoint(mappedVendor, selectedOption);
|
|
8616
|
+
const selectedDriver = getSelectedDriverOption(row.original, vendorDrivers);
|
|
8617
|
+
updateVehicleRowState((_row$original3 = row.original) === null || _row$original3 === void 0 ? void 0 : _row$original3.id, {
|
|
8618
|
+
fillingPoint: {
|
|
8619
|
+
...selectedOption,
|
|
8620
|
+
fillingStationId: (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.fillingStationId) || (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.id) || (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.bookingId) || (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.uuid) || (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.fillingPointId)
|
|
8621
|
+
},
|
|
8622
|
+
...(selectedDriver ? {} : {
|
|
8623
|
+
driverData: null,
|
|
8624
|
+
driver: null
|
|
8625
|
+
})
|
|
8626
|
+
});
|
|
8486
8627
|
setShowToast({
|
|
8487
8628
|
key: "success",
|
|
8488
8629
|
label: "Filling point mapped successfully"
|
|
@@ -8589,13 +8730,14 @@ const VendorInbox = props => {
|
|
|
8589
8730
|
Cell: ({
|
|
8590
8731
|
row
|
|
8591
8732
|
}) => {
|
|
8592
|
-
var _row$
|
|
8593
|
-
return GetCell((_row$
|
|
8733
|
+
var _row$original4, _row$original4$auditD, _row$original5, _row$original5$auditD;
|
|
8734
|
+
return GetCell((_row$original4 = row.original) !== null && _row$original4 !== void 0 && (_row$original4$auditD = _row$original4.auditDetails) !== null && _row$original4$auditD !== void 0 && _row$original4$auditD.createdTime ? Digit.DateUtils.ConvertEpochToDate((_row$original5 = row.original) === null || _row$original5 === void 0 ? void 0 : (_row$original5$auditD = _row$original5.auditDetails) === null || _row$original5$auditD === void 0 ? void 0 : _row$original5$auditD.createdTime) : "");
|
|
8594
8735
|
}
|
|
8595
8736
|
}, {
|
|
8596
8737
|
Header: t("WT_FILLING_POINT"),
|
|
8597
8738
|
accessor: row => getFillingPointDisplayValue(row),
|
|
8598
8739
|
id: "fillingPoint",
|
|
8740
|
+
minWidth: 250,
|
|
8599
8741
|
Cell: ({
|
|
8600
8742
|
row
|
|
8601
8743
|
}) => {
|
|
@@ -8605,7 +8747,9 @@ const VendorInbox = props => {
|
|
|
8605
8747
|
option: allFillingPoints,
|
|
8606
8748
|
select: value => onFillingPointSelect(row, value),
|
|
8607
8749
|
style: {
|
|
8608
|
-
textAlign: "left"
|
|
8750
|
+
textAlign: "left",
|
|
8751
|
+
width: "100%",
|
|
8752
|
+
minWidth: "250px"
|
|
8609
8753
|
},
|
|
8610
8754
|
optionKey: "fillingPointName",
|
|
8611
8755
|
t: t
|
|
@@ -8652,13 +8796,13 @@ const VendorInbox = props => {
|
|
|
8652
8796
|
Cell: ({
|
|
8653
8797
|
row
|
|
8654
8798
|
}) => {
|
|
8655
|
-
var _row$
|
|
8799
|
+
var _row$original6, _row$original6$dsoDet;
|
|
8656
8800
|
return /*#__PURE__*/React.createElement(ToggleSwitch, {
|
|
8657
8801
|
style: {
|
|
8658
8802
|
display: "flex",
|
|
8659
8803
|
justifyContent: "left"
|
|
8660
8804
|
},
|
|
8661
|
-
value: ((_row$
|
|
8805
|
+
value: ((_row$original6 = row.original) === null || _row$original6 === void 0 ? void 0 : (_row$original6$dsoDet = _row$original6.dsoDetails) === null || _row$original6$dsoDet === void 0 ? void 0 : _row$original6$dsoDet.status) === "DISABLED" ? false : true,
|
|
8662
8806
|
onChange: () => onVendorUpdate(row),
|
|
8663
8807
|
name: `switch-${row.id}`
|
|
8664
8808
|
});
|
|
@@ -8669,15 +8813,12 @@ const VendorInbox = props => {
|
|
|
8669
8813
|
Cell: ({
|
|
8670
8814
|
row
|
|
8671
8815
|
}) => {
|
|
8672
|
-
var _row$
|
|
8673
|
-
const vendorId = (_row$
|
|
8816
|
+
var _row$original7, _row$original8;
|
|
8817
|
+
const vendorId = (_row$original7 = row.original) === null || _row$original7 === void 0 ? void 0 : _row$original7.id;
|
|
8674
8818
|
if (!additionalVendorData) {
|
|
8675
8819
|
return /*#__PURE__*/React.createElement("span", null, "Loading...");
|
|
8676
8820
|
}
|
|
8677
|
-
const hasDetails =
|
|
8678
|
-
var _item$vendorAdditiona;
|
|
8679
|
-
return (item === null || item === void 0 ? void 0 : (_item$vendorAdditiona = item.vendorAdditionalDetails) === null || _item$vendorAdditiona === void 0 ? void 0 : _item$vendorAdditiona.vendorId) === vendorId;
|
|
8680
|
-
});
|
|
8821
|
+
const hasDetails = ((_row$original8 = row.original) === null || _row$original8 === void 0 ? void 0 : _row$original8.vendorAdditionalDetails) !== null;
|
|
8681
8822
|
return /*#__PURE__*/React.createElement(Link, {
|
|
8682
8823
|
to: hasDetails ? "/digit-ui/employee/vendor/registry/additionaldetails/info?vendorId=" + vendorId : "/digit-ui/employee/vendor/registry/additionaldetails/vendor-details?vendorId=" + vendorId
|
|
8683
8824
|
}, /*#__PURE__*/React.createElement("button", {
|
|
@@ -8708,21 +8849,30 @@ const VendorInbox = props => {
|
|
|
8708
8849
|
Cell: ({
|
|
8709
8850
|
row
|
|
8710
8851
|
}) => {
|
|
8711
|
-
var _row$
|
|
8712
|
-
return GetCell((_row$
|
|
8852
|
+
var _row$original9, _row$original9$auditD, _row$original0, _row$original0$auditD;
|
|
8853
|
+
return GetCell((_row$original9 = row.original) !== null && _row$original9 !== void 0 && (_row$original9$auditD = _row$original9.auditDetails) !== null && _row$original9$auditD !== void 0 && _row$original9$auditD.createdTime ? Digit.DateUtils.ConvertEpochToDate((_row$original0 = row.original) === null || _row$original0 === void 0 ? void 0 : (_row$original0$auditD = _row$original0.auditDetails) === null || _row$original0$auditD === void 0 ? void 0 : _row$original0$auditD.createdTime) : "");
|
|
8713
8854
|
}
|
|
8714
8855
|
}, {
|
|
8715
|
-
Header:
|
|
8716
|
-
id: "
|
|
8856
|
+
Header: "Map Vendor",
|
|
8857
|
+
id: "mapVendor",
|
|
8717
8858
|
accessor: row => {
|
|
8718
|
-
var _row$
|
|
8719
|
-
return ((_row$
|
|
8859
|
+
var _row$vendor2, _row$vendorData2;
|
|
8860
|
+
return ((_row$vendor2 = row.vendor) === null || _row$vendor2 === void 0 ? void 0 : _row$vendor2.name) || ((_row$vendorData2 = row.vendorData) === null || _row$vendorData2 === void 0 ? void 0 : _row$vendorData2.name) || "NA";
|
|
8720
8861
|
},
|
|
8721
8862
|
Cell: ({
|
|
8722
8863
|
row
|
|
8723
8864
|
}) => {
|
|
8724
|
-
|
|
8725
|
-
|
|
8865
|
+
return /*#__PURE__*/React.createElement(Dropdown$2, {
|
|
8866
|
+
className: "fsm-registry-dropdown",
|
|
8867
|
+
selected: getSelectedVendorOption(row.original, vendors),
|
|
8868
|
+
option: vendors,
|
|
8869
|
+
select: value => onVehicleVendorSelect(row, value),
|
|
8870
|
+
style: {
|
|
8871
|
+
textAlign: "left"
|
|
8872
|
+
},
|
|
8873
|
+
optionKey: "name",
|
|
8874
|
+
t: t
|
|
8875
|
+
});
|
|
8726
8876
|
}
|
|
8727
8877
|
}, {
|
|
8728
8878
|
Header: t("ES_VENDOR_INBOX_SERVICE_TYPE"),
|
|
@@ -8759,44 +8909,54 @@ const VendorInbox = props => {
|
|
|
8759
8909
|
Header: t("WT_FILLING_POINT"),
|
|
8760
8910
|
accessor: row => getFillingPointDisplayValue(row),
|
|
8761
8911
|
id: "fillingPoint",
|
|
8912
|
+
minWidth: 250,
|
|
8762
8913
|
Cell: ({
|
|
8763
8914
|
row
|
|
8764
8915
|
}) => {
|
|
8916
|
+
const selectedVendor = getSelectedVendorOption(row.original, vendors);
|
|
8917
|
+
const vendorFillingPoints = getVendorFillingPoints(selectedVendor);
|
|
8765
8918
|
return /*#__PURE__*/React.createElement(Dropdown$2, {
|
|
8766
8919
|
className: "fsm-registry-dropdown",
|
|
8767
|
-
selected: getSelectedFillingPointOption(row.original,
|
|
8768
|
-
option:
|
|
8920
|
+
selected: getSelectedFillingPointOption(row.original, vendorFillingPoints),
|
|
8921
|
+
option: vendorFillingPoints,
|
|
8769
8922
|
select: value => onVehicleFillingPointSelect(row, value),
|
|
8770
8923
|
style: {
|
|
8771
|
-
textAlign: "left"
|
|
8924
|
+
textAlign: "left",
|
|
8925
|
+
width: "100%",
|
|
8926
|
+
minWidth: "250px"
|
|
8772
8927
|
},
|
|
8773
8928
|
optionKey: "fillingPointName",
|
|
8774
|
-
t: t
|
|
8929
|
+
t: t,
|
|
8930
|
+
disable: !selectedVendor || !vendorFillingPoints.length
|
|
8775
8931
|
});
|
|
8776
8932
|
}
|
|
8777
8933
|
}, {
|
|
8778
8934
|
Header: t("ES_FSM_REGISTRY_SELECT_DRIVER"),
|
|
8779
8935
|
id: "driver",
|
|
8780
8936
|
accessor: row => {
|
|
8781
|
-
var _row$
|
|
8782
|
-
return ((_row$
|
|
8937
|
+
var _row$driverData2, _row$driver2;
|
|
8938
|
+
return ((_row$driverData2 = row.driverData) === null || _row$driverData2 === void 0 ? void 0 : _row$driverData2.name) || ((_row$driver2 = row.driver) === null || _row$driver2 === void 0 ? void 0 : _row$driver2.name) || "NA";
|
|
8783
8939
|
},
|
|
8940
|
+
minWidth: 250,
|
|
8784
8941
|
Cell: ({
|
|
8785
8942
|
row
|
|
8786
8943
|
}) => {
|
|
8944
|
+
const selectedVendor = getSelectedVendorOption(row.original, vendors);
|
|
8945
|
+
const selectedFillingPoint = getSelectedFillingPointOption(row.original, getVendorFillingPoints(selectedVendor));
|
|
8946
|
+
const availableDrivers = getVendorDriversForFillingPoint(selectedVendor, selectedFillingPoint);
|
|
8787
8947
|
return /*#__PURE__*/React.createElement(Dropdown$2, {
|
|
8788
8948
|
className: "fsm-registry-dropdown",
|
|
8789
|
-
selected: (
|
|
8790
|
-
|
|
8791
|
-
return (((_row$original$driverD = row.original.driverData) === null || _row$original$driverD === void 0 ? void 0 : _row$original$driverD.id) || ((_row$original$driver = row.original.driver) === null || _row$original$driver === void 0 ? void 0 : _row$original$driver.id)) === driver.id;
|
|
8792
|
-
})) || row.original.driverData || row.original.driver,
|
|
8793
|
-
option: drivers,
|
|
8949
|
+
selected: getSelectedDriverOption(row.original, availableDrivers),
|
|
8950
|
+
option: availableDrivers,
|
|
8794
8951
|
select: value => onDriverSelect(row, value),
|
|
8795
8952
|
optionKey: "name",
|
|
8796
8953
|
t: t,
|
|
8797
8954
|
style: {
|
|
8798
|
-
textAlign: "left"
|
|
8799
|
-
|
|
8955
|
+
textAlign: "left",
|
|
8956
|
+
width: "100%",
|
|
8957
|
+
minWidth: "250px"
|
|
8958
|
+
},
|
|
8959
|
+
disable: !selectedFillingPoint || !availableDrivers.length
|
|
8800
8960
|
});
|
|
8801
8961
|
}
|
|
8802
8962
|
}, {
|
|
@@ -8806,13 +8966,13 @@ const VendorInbox = props => {
|
|
|
8806
8966
|
Cell: ({
|
|
8807
8967
|
row
|
|
8808
8968
|
}) => {
|
|
8809
|
-
var _row$
|
|
8969
|
+
var _row$original1;
|
|
8810
8970
|
return /*#__PURE__*/React.createElement(ToggleSwitch, {
|
|
8811
8971
|
style: {
|
|
8812
8972
|
display: "flex",
|
|
8813
8973
|
justifyContent: "left"
|
|
8814
8974
|
},
|
|
8815
|
-
value: ((_row$
|
|
8975
|
+
value: ((_row$original1 = row.original) === null || _row$original1 === void 0 ? void 0 : _row$original1.status) === "DISABLED" ? false : true,
|
|
8816
8976
|
onChange: () => onVehicleUpdate(row),
|
|
8817
8977
|
name: `switch-${row.id}`
|
|
8818
8978
|
});
|
|
@@ -8854,16 +9014,17 @@ const VendorInbox = props => {
|
|
|
8854
9014
|
Cell: ({
|
|
8855
9015
|
row
|
|
8856
9016
|
}) => {
|
|
8857
|
-
var _row$
|
|
8858
|
-
return GetCell((_row$
|
|
9017
|
+
var _row$original10, _row$original10$audit, _row$original11, _row$original11$audit;
|
|
9018
|
+
return GetCell((_row$original10 = row.original) !== null && _row$original10 !== void 0 && (_row$original10$audit = _row$original10.auditDetails) !== null && _row$original10$audit !== void 0 && _row$original10$audit.createdTime ? Digit.DateUtils.ConvertEpochToDate((_row$original11 = row.original) === null || _row$original11 === void 0 ? void 0 : (_row$original11$audit = _row$original11.auditDetails) === null || _row$original11$audit === void 0 ? void 0 : _row$original11$audit.createdTime) : "");
|
|
8859
9019
|
}
|
|
8860
9020
|
}, {
|
|
8861
9021
|
Header: t("ES_FSM_REGISTRY_INBOX_VENDOR_NAME"),
|
|
8862
9022
|
id: "vendorName",
|
|
8863
9023
|
accessor: row => {
|
|
8864
|
-
var _row$
|
|
8865
|
-
return ((_row$
|
|
9024
|
+
var _row$vendorData3, _row$vendor3;
|
|
9025
|
+
return ((_row$vendorData3 = row.vendorData) === null || _row$vendorData3 === void 0 ? void 0 : _row$vendorData3.name) || ((_row$vendor3 = row.vendor) === null || _row$vendor3 === void 0 ? void 0 : _row$vendor3.name) || "NA";
|
|
8866
9026
|
},
|
|
9027
|
+
minWidth: 250,
|
|
8867
9028
|
Cell: ({
|
|
8868
9029
|
row
|
|
8869
9030
|
}) => {
|
|
@@ -8876,7 +9037,9 @@ const VendorInbox = props => {
|
|
|
8876
9037
|
option: vendors,
|
|
8877
9038
|
select: value => onVendorSelect(row, value),
|
|
8878
9039
|
style: {
|
|
8879
|
-
textAlign: "left"
|
|
9040
|
+
textAlign: "left",
|
|
9041
|
+
width: "100%",
|
|
9042
|
+
minWidth: "250px"
|
|
8880
9043
|
},
|
|
8881
9044
|
optionKey: "name",
|
|
8882
9045
|
t: t
|
|
@@ -8889,13 +9052,13 @@ const VendorInbox = props => {
|
|
|
8889
9052
|
Cell: ({
|
|
8890
9053
|
row
|
|
8891
9054
|
}) => {
|
|
8892
|
-
var _row$
|
|
9055
|
+
var _row$original12;
|
|
8893
9056
|
return /*#__PURE__*/React.createElement(ToggleSwitch, {
|
|
8894
9057
|
style: {
|
|
8895
9058
|
display: "flex",
|
|
8896
9059
|
justifyContent: "left"
|
|
8897
9060
|
},
|
|
8898
|
-
value: ((_row$
|
|
9061
|
+
value: ((_row$original12 = row.original) === null || _row$original12 === void 0 ? void 0 : _row$original12.status) === "DISABLED" ? false : true,
|
|
8899
9062
|
onChange: () => onDriverUpdate(row),
|
|
8900
9063
|
name: `switch-${row.id}`
|
|
8901
9064
|
});
|
|
@@ -8947,10 +9110,10 @@ const VendorInbox = props => {
|
|
|
8947
9110
|
return row !== null && row !== void 0 && (_row$auditDetails3 = row.auditDetails) !== null && _row$auditDetails3 !== void 0 && _row$auditDetails3.createdTime ? Digit.DateUtils.ConvertEpochToDate(row === null || row === void 0 ? void 0 : (_row$auditDetails4 = row.auditDetails) === null || _row$auditDetails4 === void 0 ? void 0 : _row$auditDetails4.createdTime) : "";
|
|
8948
9111
|
}
|
|
8949
9112
|
}, {
|
|
8950
|
-
Header:
|
|
9113
|
+
Header: "Map Vendor",
|
|
8951
9114
|
exportAccessor: row => {
|
|
8952
|
-
var _row$
|
|
8953
|
-
return (row === null || row === void 0 ? void 0 : (_row$
|
|
9115
|
+
var _row$vendor4, _row$vendorData4;
|
|
9116
|
+
return (row === null || row === void 0 ? void 0 : (_row$vendor4 = row.vendor) === null || _row$vendor4 === void 0 ? void 0 : _row$vendor4.name) || (row === null || row === void 0 ? void 0 : (_row$vendorData4 = row.vendorData) === null || _row$vendorData4 === void 0 ? void 0 : _row$vendorData4.name) || "NA";
|
|
8954
9117
|
}
|
|
8955
9118
|
}, {
|
|
8956
9119
|
Header: t("ES_VENDOR_INBOX_SERVICE_TYPE"),
|
|
@@ -8964,8 +9127,8 @@ const VendorInbox = props => {
|
|
|
8964
9127
|
}, {
|
|
8965
9128
|
Header: t("ES_FSM_REGISTRY_SELECT_DRIVER"),
|
|
8966
9129
|
exportAccessor: row => {
|
|
8967
|
-
var _row$
|
|
8968
|
-
return (row === null || row === void 0 ? void 0 : (_row$
|
|
9130
|
+
var _row$driverData3, _row$driver3;
|
|
9131
|
+
return (row === null || row === void 0 ? void 0 : (_row$driverData3 = row.driverData) === null || _row$driverData3 === void 0 ? void 0 : _row$driverData3.name) || (row === null || row === void 0 ? void 0 : (_row$driver3 = row.driver) === null || _row$driver3 === void 0 ? void 0 : _row$driver3.name) || "NA";
|
|
8969
9132
|
}
|
|
8970
9133
|
}, {
|
|
8971
9134
|
Header: t("ES_FSM_REGISTRY_INBOX_ENABLED"),
|
|
@@ -8990,8 +9153,8 @@ const VendorInbox = props => {
|
|
|
8990
9153
|
}, {
|
|
8991
9154
|
Header: t("ES_FSM_REGISTRY_INBOX_VENDOR_NAME"),
|
|
8992
9155
|
exportAccessor: row => {
|
|
8993
|
-
var _row$
|
|
8994
|
-
return (row === null || row === void 0 ? void 0 : (_row$
|
|
9156
|
+
var _row$vendorData5, _row$vendor5;
|
|
9157
|
+
return (row === null || row === void 0 ? void 0 : (_row$vendorData5 = row.vendorData) === null || _row$vendorData5 === void 0 ? void 0 : _row$vendorData5.name) || (row === null || row === void 0 ? void 0 : (_row$vendor5 = row.vendor) === null || _row$vendor5 === void 0 ? void 0 : _row$vendor5.name) || "NA";
|
|
8995
9158
|
}
|
|
8996
9159
|
}, {
|
|
8997
9160
|
Header: t("ES_FSM_REGISTRY_INBOX_ENABLED"),
|
|
@@ -9004,7 +9167,21 @@ const VendorInbox = props => {
|
|
|
9004
9167
|
const getCSVExportData = React.useCallback(async () => tableData, [tableData]);
|
|
9005
9168
|
let result;
|
|
9006
9169
|
if (props.isLoading || isAllFillingPointsLoading) {
|
|
9007
|
-
result = /*#__PURE__*/React.createElement(
|
|
9170
|
+
result = /*#__PURE__*/React.createElement("div", {
|
|
9171
|
+
style: {
|
|
9172
|
+
zIndex: 10,
|
|
9173
|
+
position: "relative",
|
|
9174
|
+
padding: "10px",
|
|
9175
|
+
backgroundColor: "#fff",
|
|
9176
|
+
width: "75px",
|
|
9177
|
+
height: "75px",
|
|
9178
|
+
borderRadius: "12px",
|
|
9179
|
+
display: "flex",
|
|
9180
|
+
justifyContent: "center",
|
|
9181
|
+
alignItems: "center",
|
|
9182
|
+
margin: "auto"
|
|
9183
|
+
}
|
|
9184
|
+
}, /*#__PURE__*/React.createElement(Loader, null));
|
|
9008
9185
|
} else if (tableData.length === 0) {
|
|
9009
9186
|
let emptyCardText = "";
|
|
9010
9187
|
let emptyButtonText = "";
|
|
@@ -9132,7 +9309,6 @@ const SearchVendor = () => {
|
|
|
9132
9309
|
const [vehicleIds, setVehicleIds] = useState("");
|
|
9133
9310
|
const [driverIds, setDriverIds] = useState("");
|
|
9134
9311
|
const [tableData, setTableData] = useState([]);
|
|
9135
|
-
const userInfo = Digit.UserService.getUser();
|
|
9136
9312
|
let paginationParms = {
|
|
9137
9313
|
limit: pageSize,
|
|
9138
9314
|
offset: pageOffset,
|
|
@@ -9141,9 +9317,9 @@ const SearchVendor = () => {
|
|
|
9141
9317
|
};
|
|
9142
9318
|
const {
|
|
9143
9319
|
data: dsoData,
|
|
9144
|
-
isLoading
|
|
9145
|
-
isSuccess
|
|
9146
|
-
error
|
|
9320
|
+
isLoading,
|
|
9321
|
+
isSuccess,
|
|
9322
|
+
error,
|
|
9147
9323
|
refetch
|
|
9148
9324
|
} = tab === "VEHICLE" ? Digit.Hooks.fsm.useVehiclesSearch({
|
|
9149
9325
|
tenantId,
|
|
@@ -9203,6 +9379,7 @@ const SearchVendor = () => {
|
|
|
9203
9379
|
const inboxTotalCount = (dsoData === null || dsoData === void 0 ? void 0 : dsoData.totalCount) || 50;
|
|
9204
9380
|
useEffect(() => {
|
|
9205
9381
|
refetch();
|
|
9382
|
+
refetchVendor();
|
|
9206
9383
|
}, []);
|
|
9207
9384
|
useEffect(() => {
|
|
9208
9385
|
refetch();
|
|
@@ -9210,17 +9387,13 @@ const SearchVendor = () => {
|
|
|
9210
9387
|
useEffect(() => {
|
|
9211
9388
|
if (dsoData !== null && dsoData !== void 0 && dsoData.vehicle && tab === "VEHICLE") {
|
|
9212
9389
|
let vehicleIds = "";
|
|
9213
|
-
dsoData.vehicle.map(data => {
|
|
9214
|
-
vehicleIds += `${data.id},`;
|
|
9215
|
-
});
|
|
9390
|
+
dsoData.vehicle.map(data => vehicleIds += `${data.id},`);
|
|
9216
9391
|
setVehicleIds(vehicleIds);
|
|
9217
9392
|
setTableData(dsoData.vehicle);
|
|
9218
9393
|
}
|
|
9219
9394
|
if (dsoData !== null && dsoData !== void 0 && dsoData.driver && tab === "DRIVER") {
|
|
9220
9395
|
let driverIds = "";
|
|
9221
|
-
dsoData.driver.map(data => {
|
|
9222
|
-
driverIds += `${data.id},`;
|
|
9223
|
-
});
|
|
9396
|
+
dsoData.driver.map(data => driverIds += `${data.id},`);
|
|
9224
9397
|
setDriverIds(driverIds);
|
|
9225
9398
|
setTableData(dsoData === null || dsoData === void 0 ? void 0 : dsoData.driver);
|
|
9226
9399
|
}
|
|
@@ -9236,6 +9409,8 @@ const SearchVendor = () => {
|
|
|
9236
9409
|
activeDrivers: (_dso$drivers = dso.drivers) === null || _dso$drivers === void 0 ? void 0 : _dso$drivers.filter(driver => driver.status === "ACTIVE"),
|
|
9237
9410
|
allVehicles: dso.vehicles,
|
|
9238
9411
|
dsoDetails: dso,
|
|
9412
|
+
vendorAdditionalDetails: dso.vendorAdditionalDetails,
|
|
9413
|
+
fillingPoint: dso.fillingPoint,
|
|
9239
9414
|
vehicles: (_dso$vehicles = dso.vehicles) === null || _dso$vehicles === void 0 ? void 0 : (_dso$vehicles$filter = _dso$vehicles.filter(vehicle => vehicle.status === "ACTIVE")) === null || _dso$vehicles$filter === void 0 ? void 0 : _dso$vehicles$filter.map(vehicle => ({
|
|
9240
9415
|
id: vehicle.id,
|
|
9241
9416
|
registrationNumber: vehicle === null || vehicle === void 0 ? void 0 : vehicle.registrationNumber,
|
|
@@ -9330,10 +9505,6 @@ const SearchVendor = () => {
|
|
|
9330
9505
|
const refetchVendorData = () => {
|
|
9331
9506
|
refetchVendor();
|
|
9332
9507
|
};
|
|
9333
|
-
useEffect(() => {
|
|
9334
|
-
refetch();
|
|
9335
|
-
refetchVendor();
|
|
9336
|
-
}, []);
|
|
9337
9508
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
9338
9509
|
className: "employee-form-content"
|
|
9339
9510
|
}, /*#__PURE__*/React.createElement(VendorInbox, {
|