@djb25/digit-ui-module-vendor 1.0.19 → 1.0.21
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 +207 -109
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useMemo, useCallback, useState } from 'react';
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
|
-
import { useParams, useLocation, Switch,
|
|
3
|
+
import { useParams, useLocation, Switch, useHistory, Link, useRouteMatch, Route, Redirect } from 'react-router-dom';
|
|
4
4
|
import { Header, SearchForm, SearchField, Dropdown as Dropdown$2, MobileNumber, CardLabelError, DatePicker as DatePicker$3, SubmitBar, Card, Table, Loader, Toast, AppContainer, ModuleHeader, ArrowLeft, PrivateRoute, LayoutWrapper, HomeIcon, PropertyHouse, EmployeeModuleCard, VerticalTimeline, FormComposer, FormStep, LabelFieldPair, CardLabel, Tooltip, TextInput, UploadFile, CardSubHeader, CardText, RadioOrSelect, ShippingTruck, CheckBox, RadioButtons, CloseSvg, Localities, RemoveableTag, ActionBar, ApplyFilterBar, AddIcon, Menu, LinkLabel, ToggleSwitch, CardSectionHeader, Row, EditIcon, DeleteIcon, Modal, InfoIcon, CardHeader, StatusTable, LinkButton, Banner } from '@djb25/digit-ui-react-components';
|
|
5
5
|
import { useForm, Controller } from 'react-hook-form';
|
|
6
6
|
import { useQueryClient } from 'react-query';
|
|
@@ -606,7 +606,7 @@ const VendorConfig = (t, disabled = false) => {
|
|
|
606
606
|
}, {
|
|
607
607
|
head: "ES_FSM_REGISTRY_NEW_ADDRESS_DETAILS",
|
|
608
608
|
body: [{
|
|
609
|
-
label: "
|
|
609
|
+
label: "HOUSE_NO",
|
|
610
610
|
isMandatory: false,
|
|
611
611
|
type: "text",
|
|
612
612
|
key: "doorNo",
|
|
@@ -696,10 +696,10 @@ const AddVendor = ({
|
|
|
696
696
|
const {
|
|
697
697
|
t
|
|
698
698
|
} = useTranslation();
|
|
699
|
+
const history = useHistory();
|
|
699
700
|
const [currentStep, setCurrentStep] = useState(1);
|
|
700
701
|
const [showToast, setShowToast] = useState(null);
|
|
701
702
|
const [canSubmit, setCanSubmit] = useState(false);
|
|
702
|
-
const [step1Data, setStep1Data] = useState({});
|
|
703
703
|
const [mutationHappened, setMutationHappened, clear] = Digit.Hooks.useSessionStorage("FSM_MUTATION_HAPPENED", false);
|
|
704
704
|
const [errorInfo, setErrorInfo, clearError] = Digit.Hooks.useSessionStorage("FSM_ERROR_DATA", false);
|
|
705
705
|
const [successData, setsuccessData, clearSuccessData] = Digit.Hooks.useSessionStorage("FSM_MUTATION_SUCCESS_DATA", false);
|
|
@@ -728,30 +728,51 @@ const AddVendor = ({
|
|
|
728
728
|
amount: null
|
|
729
729
|
}
|
|
730
730
|
};
|
|
731
|
-
const vendorStepConfig = Config.filter(config => config.head === "ES_VRNDOR_NEW_VENDOR_DETAILS");
|
|
732
|
-
const addressStepConfig = Config.filter(config => config.head === "ES_FSM_REGISTRY_NEW_ADDRESS_DETAILS");
|
|
733
731
|
const onFormValueChange = (setValue, formData) => {
|
|
734
|
-
var _formData$serviceType;
|
|
735
|
-
|
|
732
|
+
var _formData$serviceType, _formData$address, _formData$address2;
|
|
733
|
+
const isVendorDetailsFilled = (formData === null || formData === void 0 ? void 0 : formData.vendorName) && (formData === null || formData === void 0 ? void 0 : formData.phone) && (formData === null || formData === void 0 ? void 0 : (_formData$serviceType = formData.serviceType) === null || _formData$serviceType === void 0 ? void 0 : _formData$serviceType.code);
|
|
734
|
+
const isAddressFilled = (formData === null || formData === void 0 ? void 0 : (_formData$address = formData.address) === null || _formData$address === void 0 ? void 0 : _formData$address.city) && (formData === null || formData === void 0 ? void 0 : (_formData$address2 = formData.address) === null || _formData$address2 === void 0 ? void 0 : _formData$address2.locality);
|
|
735
|
+
if (isVendorDetailsFilled && isAddressFilled) {
|
|
736
736
|
setCanSubmit(true);
|
|
737
737
|
} else {
|
|
738
738
|
setCanSubmit(false);
|
|
739
739
|
}
|
|
740
|
+
if (isVendorDetailsFilled) {
|
|
741
|
+
if (currentStep === 1) {
|
|
742
|
+
setCurrentStep(2);
|
|
743
|
+
setTimeout(() => {
|
|
744
|
+
const headers = Array.from(document.querySelectorAll(".collapsible-card-title"));
|
|
745
|
+
const addressHeader = headers.find(h => h.textContent.includes(t("ES_FSM_REGISTRY_NEW_ADDRESS_DETAILS")));
|
|
746
|
+
if (addressHeader) {
|
|
747
|
+
addressHeader.scrollIntoView({
|
|
748
|
+
behavior: "smooth",
|
|
749
|
+
block: "start"
|
|
750
|
+
});
|
|
751
|
+
}
|
|
752
|
+
}, 100);
|
|
753
|
+
}
|
|
754
|
+
} else {
|
|
755
|
+
if (currentStep === 2) {
|
|
756
|
+
setCurrentStep(1);
|
|
757
|
+
setTimeout(() => {
|
|
758
|
+
const headers = Array.from(document.querySelectorAll(".collapsible-card-title"));
|
|
759
|
+
const vendorHeader = headers.find(h => h.textContent.includes(t("ES_VRNDOR_NEW_VENDOR_DETAILS")));
|
|
760
|
+
if (vendorHeader) {
|
|
761
|
+
vendorHeader.scrollIntoView({
|
|
762
|
+
behavior: "smooth",
|
|
763
|
+
block: "start"
|
|
764
|
+
});
|
|
765
|
+
}
|
|
766
|
+
}, 100);
|
|
767
|
+
}
|
|
768
|
+
}
|
|
740
769
|
};
|
|
741
770
|
const closeToast = () => {
|
|
742
771
|
setShowToast(null);
|
|
743
772
|
};
|
|
744
773
|
const onSubmit = data => {
|
|
745
774
|
var _mergedData$street, _mergedData$doorNo, _mergedData$plotNo, _mergedData$landmark, _mergedData$address, _mergedData$address$c, _mergedData$address2, _mergedData$address2$, _mergedData$address3, _mergedData$address3$, _mergedData$address4, _mergedData$address4$, _mergedData$buildingN, _mergedData$address5, _mergedData$address5$, _mergedData$address6, _mergedData$address6$, _mergedData$address7, _mergedData$address7$, _mergedData$serviceTy, _mergedData$address8, _mergedData$address9;
|
|
746
|
-
|
|
747
|
-
setStep1Data(data);
|
|
748
|
-
setCurrentStep(2);
|
|
749
|
-
return;
|
|
750
|
-
}
|
|
751
|
-
const mergedData = {
|
|
752
|
-
...step1Data,
|
|
753
|
-
...data
|
|
754
|
-
};
|
|
775
|
+
const mergedData = data;
|
|
755
776
|
const name = mergedData === null || mergedData === void 0 ? void 0 : mergedData.vendorName;
|
|
756
777
|
const pincode = mergedData === null || mergedData === void 0 ? void 0 : mergedData.pincode;
|
|
757
778
|
const street = mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$street = mergedData.street) === null || _mergedData$street === void 0 ? void 0 : _mergedData$street.trim();
|
|
@@ -832,7 +853,10 @@ const AddVendor = ({
|
|
|
832
853
|
key: "success",
|
|
833
854
|
action: "ADD_VENDOR"
|
|
834
855
|
});
|
|
835
|
-
setTimeout(
|
|
856
|
+
setTimeout(() => {
|
|
857
|
+
closeToast();
|
|
858
|
+
history.push("/digit-ui/employee/vendor/search-vendor");
|
|
859
|
+
}, 2000);
|
|
836
860
|
}
|
|
837
861
|
});
|
|
838
862
|
};
|
|
@@ -857,34 +881,20 @@ const AddVendor = ({
|
|
|
857
881
|
flex: "1",
|
|
858
882
|
overflowY: "auto"
|
|
859
883
|
}
|
|
860
|
-
},
|
|
861
|
-
key: "step1",
|
|
862
|
-
isDisabled: !canSubmit,
|
|
863
|
-
label: t("CS_COMMON_NEXT"),
|
|
864
|
-
config: vendorStepConfig.filter(i => !i.hideInEmployee).map(config => ({
|
|
865
|
-
...config,
|
|
866
|
-
body: config.body.filter(a => !a.hideInEmployee)
|
|
867
|
-
})),
|
|
868
|
-
onSubmit: onSubmit,
|
|
869
|
-
defaultValues: {
|
|
870
|
-
...defaultValues,
|
|
871
|
-
...step1Data
|
|
872
|
-
},
|
|
873
|
-
onFormValueChange: onFormValueChange,
|
|
874
|
-
noBreakLine: true
|
|
875
|
-
}), currentStep === 2 && /*#__PURE__*/React.createElement(FormComposer, {
|
|
876
|
-
key: "step2",
|
|
884
|
+
}, /*#__PURE__*/React.createElement(FormComposer, {
|
|
877
885
|
label: t("ES_COMMON_APPLICATION_SUBMIT"),
|
|
878
|
-
config:
|
|
886
|
+
config: Config.filter(i => !i.hideInEmployee).map(config => ({
|
|
879
887
|
...config,
|
|
888
|
+
isCollapsible: true,
|
|
889
|
+
isDefaultOpen: true,
|
|
880
890
|
body: config.body.filter(a => !a.hideInEmployee)
|
|
881
891
|
})),
|
|
882
892
|
onSubmit: onSubmit,
|
|
883
|
-
defaultValues:
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
893
|
+
defaultValues: defaultValues,
|
|
894
|
+
onFormValueChange: onFormValueChange,
|
|
895
|
+
noBreakLine: true,
|
|
896
|
+
noCard: true,
|
|
897
|
+
isDisabled: !canSubmit
|
|
888
898
|
}), showToast && /*#__PURE__*/React.createElement(Toast, {
|
|
889
899
|
error: showToast.key === "error",
|
|
890
900
|
label: t(showToast.key === "success" ? `ES_FSM_REGISTRY_${showToast.action}_SUCCESS` : showToast.action),
|
|
@@ -8134,7 +8144,7 @@ const SearchApplication = ({
|
|
|
8134
8144
|
}
|
|
8135
8145
|
}, searchFields === null || searchFields === void 0 ? void 0 : searchFields.map((input, index) => /*#__PURE__*/React.createElement("span", {
|
|
8136
8146
|
key: index,
|
|
8137
|
-
className: index === 0 ? "finance-mainlayout-
|
|
8147
|
+
className: index === 0 ? "finance-mainlayout-col1 complaint-input" : "finance-mainlayout-col1 mobile-input"
|
|
8138
8148
|
}, getFields(input))), /*#__PURE__*/React.createElement("div", {
|
|
8139
8149
|
style: {
|
|
8140
8150
|
display: "flex",
|
|
@@ -8163,6 +8173,36 @@ const parseAdditionalDetails = additionalDetails => {
|
|
|
8163
8173
|
return {};
|
|
8164
8174
|
}
|
|
8165
8175
|
};
|
|
8176
|
+
const getFillingPointIdentifiers = fillingPoint => {
|
|
8177
|
+
var _fillingPoint$filling;
|
|
8178
|
+
if (!fillingPoint) return [];
|
|
8179
|
+
if (typeof fillingPoint === "string" || typeof fillingPoint === "number") return [String(fillingPoint)];
|
|
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
|
+
};
|
|
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)]));
|
|
8185
|
+
};
|
|
8186
|
+
const getSelectedFillingPointOption = (row, fillingPoints = []) => {
|
|
8187
|
+
const rowFillingPointIdentifiers = getRowFillingPointIdentifiers(row);
|
|
8188
|
+
if (!rowFillingPointIdentifiers.length) return null;
|
|
8189
|
+
return fillingPoints.find(fillingPoint => getFillingPointIdentifiers(fillingPoint).some(identifier => rowFillingPointIdentifiers.includes(identifier))) || null;
|
|
8190
|
+
};
|
|
8191
|
+
const getFillingPointDisplayValue = (row = {}) => {
|
|
8192
|
+
var _row$fillingPoint, _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$fillingPoint = row.fillingPoint) === null || _row$fillingPoint === void 0 ? void 0 : _row$fillingPoint.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 normalizeFillingPointForVehicleUpdate = fillingPoint => {
|
|
8196
|
+
if (!fillingPoint || typeof fillingPoint !== "object") return fillingPoint;
|
|
8197
|
+
const {
|
|
8198
|
+
id,
|
|
8199
|
+
...rest
|
|
8200
|
+
} = fillingPoint;
|
|
8201
|
+
return {
|
|
8202
|
+
...rest,
|
|
8203
|
+
fillingStationId: (fillingPoint === null || fillingPoint === void 0 ? void 0 : fillingPoint.fillingStationId) || id || (fillingPoint === null || fillingPoint === void 0 ? void 0 : fillingPoint.bookingId) || (fillingPoint === null || fillingPoint === void 0 ? void 0 : fillingPoint.uuid) || (fillingPoint === null || fillingPoint === void 0 ? void 0 : fillingPoint.fillingPointId)
|
|
8204
|
+
};
|
|
8205
|
+
};
|
|
8166
8206
|
const VendorInbox = props => {
|
|
8167
8207
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
8168
8208
|
const {
|
|
@@ -8179,7 +8219,6 @@ const VendorInbox = props => {
|
|
|
8179
8219
|
const [vendors, setVendors] = useState([]);
|
|
8180
8220
|
const [drivers, setDrivers] = useState([]);
|
|
8181
8221
|
const queryClient = useQueryClient();
|
|
8182
|
-
const [toast, setToast] = useState(null);
|
|
8183
8222
|
const {
|
|
8184
8223
|
data: vendorData,
|
|
8185
8224
|
isLoading: isVendorLoading,
|
|
@@ -8249,6 +8288,20 @@ const VendorInbox = props => {
|
|
|
8249
8288
|
const closeToast = () => {
|
|
8250
8289
|
setShowToast(null);
|
|
8251
8290
|
};
|
|
8291
|
+
const getVehicleUpdatePayload = (vehicle, overrides = {}) => {
|
|
8292
|
+
const normalizedVehicle = {
|
|
8293
|
+
...vehicle,
|
|
8294
|
+
...overrides,
|
|
8295
|
+
driverData: (overrides === null || overrides === void 0 ? void 0 : overrides.driverData) || (vehicle === null || vehicle === void 0 ? void 0 : vehicle.driverData) || (vehicle === null || vehicle === void 0 ? void 0 : vehicle.driver),
|
|
8296
|
+
fillingPoint: normalizeFillingPointForVehicleUpdate(Object.prototype.hasOwnProperty.call(overrides, "fillingPoint") ? overrides.fillingPoint : vehicle === null || vehicle === void 0 ? void 0 : vehicle.fillingPoint)
|
|
8297
|
+
};
|
|
8298
|
+
delete normalizedVehicle.vendor;
|
|
8299
|
+
delete normalizedVehicle.popup;
|
|
8300
|
+
delete normalizedVehicle.driver;
|
|
8301
|
+
return {
|
|
8302
|
+
vehicle: normalizedVehicle
|
|
8303
|
+
};
|
|
8304
|
+
};
|
|
8252
8305
|
const onVendorUpdate = row => {
|
|
8253
8306
|
var _formDetails$owner, _formDetails$owner2, _formDetails$owner3, _formDetails$owner4;
|
|
8254
8307
|
let formDetails = row.original.dsoDetails;
|
|
@@ -8285,14 +8338,10 @@ const VendorInbox = props => {
|
|
|
8285
8338
|
});
|
|
8286
8339
|
};
|
|
8287
8340
|
const onVehicleUpdate = row => {
|
|
8288
|
-
|
|
8289
|
-
|
|
8290
|
-
|
|
8291
|
-
|
|
8292
|
-
...formDetails,
|
|
8293
|
-
status: (formDetails === null || formDetails === void 0 ? void 0 : formDetails.status) === "ACTIVE" ? "DISABLED" : "ACTIVE"
|
|
8294
|
-
}
|
|
8295
|
-
};
|
|
8341
|
+
var _row$original;
|
|
8342
|
+
const formData = getVehicleUpdatePayload(row.original, {
|
|
8343
|
+
status: ((_row$original = row.original) === null || _row$original === void 0 ? void 0 : _row$original.status) === "ACTIVE" ? "DISABLED" : "ACTIVE"
|
|
8344
|
+
});
|
|
8296
8345
|
mutateVehicle(formData, {
|
|
8297
8346
|
onError: (error, variables) => {
|
|
8298
8347
|
setShowToast({
|
|
@@ -8386,14 +8435,9 @@ const VendorInbox = props => {
|
|
|
8386
8435
|
});
|
|
8387
8436
|
};
|
|
8388
8437
|
const onDriverSelect = (row, selectedOption) => {
|
|
8389
|
-
|
|
8390
|
-
|
|
8391
|
-
|
|
8392
|
-
vehicle: {
|
|
8393
|
-
...vehicleData,
|
|
8394
|
-
driverData: selectedDriver
|
|
8395
|
-
}
|
|
8396
|
-
};
|
|
8438
|
+
const formData = getVehicleUpdatePayload(row.original, {
|
|
8439
|
+
driverData: selectedOption
|
|
8440
|
+
});
|
|
8397
8441
|
mutateVehicle(formData, {
|
|
8398
8442
|
onError: (error, variables) => {
|
|
8399
8443
|
setShowToast({
|
|
@@ -8415,6 +8459,42 @@ const VendorInbox = props => {
|
|
|
8415
8459
|
}
|
|
8416
8460
|
});
|
|
8417
8461
|
};
|
|
8462
|
+
const onVehicleFillingPointSelect = (row, selectedOption) => {
|
|
8463
|
+
const formData = getVehicleUpdatePayload(row.original, {
|
|
8464
|
+
fillingPoint: selectedOption
|
|
8465
|
+
});
|
|
8466
|
+
mutateVehicle(formData, {
|
|
8467
|
+
onError: error => {
|
|
8468
|
+
var _error$response, _error$response$data, _error$response$data$, _error$response$data$2;
|
|
8469
|
+
setShowToast({
|
|
8470
|
+
key: "error",
|
|
8471
|
+
label: (error === null || error === void 0 ? void 0 : error.message) || (error === null || error === void 0 ? void 0 : (_error$response = error.response) === null || _error$response === void 0 ? void 0 : (_error$response$data = _error$response.data) === null || _error$response$data === void 0 ? void 0 : (_error$response$data$ = _error$response$data.Errors) === null || _error$response$data$ === void 0 ? void 0 : (_error$response$data$2 = _error$response$data$[0]) === null || _error$response$data$2 === void 0 ? void 0 : _error$response$data$2.message) || "Failed to map filling point"
|
|
8472
|
+
});
|
|
8473
|
+
setTimeout(closeToast, 5000);
|
|
8474
|
+
},
|
|
8475
|
+
onSuccess: () => {
|
|
8476
|
+
setTableData(currentTableData => currentTableData.map(vehicle => {
|
|
8477
|
+
var _row$original2;
|
|
8478
|
+
return (vehicle === null || vehicle === void 0 ? void 0 : vehicle.id) === ((_row$original2 = row.original) === null || _row$original2 === void 0 ? void 0 : _row$original2.id) ? {
|
|
8479
|
+
...vehicle,
|
|
8480
|
+
fillingPoint: {
|
|
8481
|
+
...selectedOption,
|
|
8482
|
+
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)
|
|
8483
|
+
}
|
|
8484
|
+
} : vehicle;
|
|
8485
|
+
}));
|
|
8486
|
+
setShowToast({
|
|
8487
|
+
key: "success",
|
|
8488
|
+
label: "Filling point mapped successfully"
|
|
8489
|
+
});
|
|
8490
|
+
queryClient.invalidateQueries("FSM_VEICLES_SEARCH");
|
|
8491
|
+
queryClient.invalidateQueries("DSO_SEARCH");
|
|
8492
|
+
props.refetchData();
|
|
8493
|
+
props.refetchVendor && props.refetchVendor();
|
|
8494
|
+
setTimeout(closeToast, 3000);
|
|
8495
|
+
}
|
|
8496
|
+
});
|
|
8497
|
+
};
|
|
8418
8498
|
const onSelectAdd = () => {
|
|
8419
8499
|
switch (props.selectedTab) {
|
|
8420
8500
|
case "VENDOR":
|
|
@@ -8470,8 +8550,9 @@ const VendorInbox = props => {
|
|
|
8470
8550
|
};
|
|
8471
8551
|
mapFixedFilling(payload, {
|
|
8472
8552
|
onSuccess: () => {
|
|
8473
|
-
|
|
8474
|
-
|
|
8553
|
+
setShowToast({
|
|
8554
|
+
key: "success",
|
|
8555
|
+
label: "WT_FIXED_FILLING_MAPPING_SUCCESS"
|
|
8475
8556
|
});
|
|
8476
8557
|
props.refetchData();
|
|
8477
8558
|
props.refetchVendor && props.refetchVendor();
|
|
@@ -8479,9 +8560,9 @@ const VendorInbox = props => {
|
|
|
8479
8560
|
},
|
|
8480
8561
|
onError: err => {
|
|
8481
8562
|
var _err$response, _err$response$data, _err$response$data$Er, _err$response$data$Er2;
|
|
8482
|
-
|
|
8483
|
-
|
|
8484
|
-
|
|
8563
|
+
setShowToast({
|
|
8564
|
+
key: "error",
|
|
8565
|
+
label: (err === null || err === void 0 ? void 0 : (_err$response = err.response) === null || _err$response === void 0 ? void 0 : (_err$response$data = _err$response.data) === null || _err$response$data === void 0 ? void 0 : (_err$response$data$Er = _err$response$data.Errors) === null || _err$response$data$Er === void 0 ? void 0 : (_err$response$data$Er2 = _err$response$data$Er[0]) === null || _err$response$data$Er2 === void 0 ? void 0 : _err$response$data$Er2.message) || "WT_FIXED_FILLING_MAPPING_FAIL"
|
|
8485
8566
|
});
|
|
8486
8567
|
setTimeout(closeToast, 5000);
|
|
8487
8568
|
}
|
|
@@ -8508,27 +8589,19 @@ const VendorInbox = props => {
|
|
|
8508
8589
|
Cell: ({
|
|
8509
8590
|
row
|
|
8510
8591
|
}) => {
|
|
8511
|
-
var _row$
|
|
8512
|
-
return GetCell((_row$
|
|
8592
|
+
var _row$original3, _row$original3$auditD, _row$original4, _row$original4$auditD;
|
|
8593
|
+
return GetCell((_row$original3 = row.original) !== null && _row$original3 !== void 0 && (_row$original3$auditD = _row$original3.auditDetails) !== null && _row$original3$auditD !== void 0 && _row$original3$auditD.createdTime ? Digit.DateUtils.ConvertEpochToDate((_row$original4 = row.original) === null || _row$original4 === void 0 ? void 0 : (_row$original4$auditD = _row$original4.auditDetails) === null || _row$original4$auditD === void 0 ? void 0 : _row$original4$auditD.createdTime) : "");
|
|
8513
8594
|
}
|
|
8514
8595
|
}, {
|
|
8515
8596
|
Header: t("WT_FILLING_POINT"),
|
|
8516
|
-
accessor: row =>
|
|
8517
|
-
var _row$dsoDetails, _row$dsoDetails2, _row$dsoDetails$filli, _row$dsoDetails3, _row$fillingpointmeta;
|
|
8518
|
-
return (row === null || row === void 0 ? void 0 : row.fillingPointId) || ((_row$dsoDetails = row.dsoDetails) === null || _row$dsoDetails === void 0 ? void 0 : _row$dsoDetails.fillingPointId) || ((_row$dsoDetails2 = row.dsoDetails) !== null && _row$dsoDetails2 !== void 0 && _row$dsoDetails2.fillingPoint && typeof row.dsoDetails.fillingPoint === "object" ? (_row$dsoDetails$filli = row.dsoDetails.fillingPoint) === null || _row$dsoDetails$filli === void 0 ? void 0 : _row$dsoDetails$filli.fillingPointName : (_row$dsoDetails3 = row.dsoDetails) === null || _row$dsoDetails3 === void 0 ? void 0 : _row$dsoDetails3.fillingPoint) || (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.filling_pt_name) || (row === null || row === void 0 ? void 0 : row.fillingPoint) || "NA";
|
|
8519
|
-
},
|
|
8597
|
+
accessor: row => getFillingPointDisplayValue(row),
|
|
8520
8598
|
id: "fillingPoint",
|
|
8521
8599
|
Cell: ({
|
|
8522
8600
|
row
|
|
8523
8601
|
}) => {
|
|
8524
8602
|
return /*#__PURE__*/React.createElement(Dropdown$2, {
|
|
8525
8603
|
className: "fsm-registry-dropdown",
|
|
8526
|
-
selected:
|
|
8527
|
-
var _fp$fillingpointmetad, _row$original$dsoDeta, _row$original$dsoDeta2, _row$original$dsoDeta3, _row$original$filling, _row$original$filling2, _row$original$filling3, _row$original$filling4;
|
|
8528
|
-
const fpId = String(fp.id || fp.bookingId || fp.fillingPointId || fp.uuid || ((_fp$fillingpointmetad = fp.fillingpointmetadata) === null || _fp$fillingpointmetad === void 0 ? void 0 : _fp$fillingpointmetad.fillingPointId));
|
|
8529
|
-
const rowFpId = String(row.original.fillingPointId || ((_row$original$dsoDeta = row.original.dsoDetails) === null || _row$original$dsoDeta === void 0 ? void 0 : _row$original$dsoDeta.fillingPointId) || ((_row$original$dsoDeta2 = row.original.dsoDetails) === null || _row$original$dsoDeta2 === void 0 ? void 0 : (_row$original$dsoDeta3 = _row$original$dsoDeta2.fillingPoint) === null || _row$original$dsoDeta3 === void 0 ? void 0 : _row$original$dsoDeta3.id) || ((_row$original$filling = row.original.fillingpointmetadata) === null || _row$original$filling === void 0 ? void 0 : _row$original$filling.fillingPointId) || row.original.filling_pt_name || (row.original.fillingPoint && typeof row.original.fillingPoint === "object" ? (_row$original$filling2 = row.original.fillingPoint) === null || _row$original$filling2 === void 0 ? void 0 : _row$original$filling2.id : row.original.fillingPoint) || ((_row$original$filling3 = row.original.fillingPointDetail) === null || _row$original$filling3 === void 0 ? void 0 : _row$original$filling3.id) || ((_row$original$filling4 = row.original.fillingPointDetail) === null || _row$original$filling4 === void 0 ? void 0 : _row$original$filling4.bookingId) || "");
|
|
8530
|
-
return fpId === rowFpId && rowFpId !== "undefined" && rowFpId !== "null" && rowFpId !== "";
|
|
8531
|
-
}),
|
|
8604
|
+
selected: getSelectedFillingPointOption(row.original, allFillingPoints),
|
|
8532
8605
|
option: allFillingPoints,
|
|
8533
8606
|
select: value => onFillingPointSelect(row, value),
|
|
8534
8607
|
style: {
|
|
@@ -8542,8 +8615,8 @@ const VendorInbox = props => {
|
|
|
8542
8615
|
Header: t("ES_VENDOR_INBOX_SERVICE_TYPE"),
|
|
8543
8616
|
id: "serviceType",
|
|
8544
8617
|
accessor: row => {
|
|
8545
|
-
var _row$
|
|
8546
|
-
let additionalDetails = (_row$
|
|
8618
|
+
var _row$dsoDetails8, _additionalDetails;
|
|
8619
|
+
let additionalDetails = (_row$dsoDetails8 = row.dsoDetails) === null || _row$dsoDetails8 === void 0 ? void 0 : _row$dsoDetails8.additionalDetails;
|
|
8547
8620
|
if (typeof additionalDetails === "string") {
|
|
8548
8621
|
try {
|
|
8549
8622
|
additionalDetails = JSON.parse(additionalDetails);
|
|
@@ -8556,8 +8629,8 @@ const VendorInbox = props => {
|
|
|
8556
8629
|
Cell: ({
|
|
8557
8630
|
row
|
|
8558
8631
|
}) => {
|
|
8559
|
-
var _row$original$
|
|
8560
|
-
let additionalDetails = (_row$original$
|
|
8632
|
+
var _row$original$dsoDeta, _additionalDetails2;
|
|
8633
|
+
let additionalDetails = (_row$original$dsoDeta = row.original.dsoDetails) === null || _row$original$dsoDeta === void 0 ? void 0 : _row$original$dsoDeta.additionalDetails;
|
|
8561
8634
|
if (typeof additionalDetails === "string") {
|
|
8562
8635
|
try {
|
|
8563
8636
|
additionalDetails = JSON.parse(additionalDetails);
|
|
@@ -8573,19 +8646,19 @@ const VendorInbox = props => {
|
|
|
8573
8646
|
Header: t("ES_VENDOR_REGISTRY_INBOX_ENABLED"),
|
|
8574
8647
|
id: "status",
|
|
8575
8648
|
accessor: row => {
|
|
8576
|
-
var _row$
|
|
8577
|
-
return ((_row$
|
|
8649
|
+
var _row$dsoDetails9;
|
|
8650
|
+
return ((_row$dsoDetails9 = row.dsoDetails) === null || _row$dsoDetails9 === void 0 ? void 0 : _row$dsoDetails9.status) || "";
|
|
8578
8651
|
},
|
|
8579
8652
|
Cell: ({
|
|
8580
8653
|
row
|
|
8581
8654
|
}) => {
|
|
8582
|
-
var _row$
|
|
8655
|
+
var _row$original5, _row$original5$dsoDet;
|
|
8583
8656
|
return /*#__PURE__*/React.createElement(ToggleSwitch, {
|
|
8584
8657
|
style: {
|
|
8585
8658
|
display: "flex",
|
|
8586
8659
|
justifyContent: "left"
|
|
8587
8660
|
},
|
|
8588
|
-
value: ((_row$
|
|
8661
|
+
value: ((_row$original5 = row.original) === null || _row$original5 === void 0 ? void 0 : (_row$original5$dsoDet = _row$original5.dsoDetails) === null || _row$original5$dsoDet === void 0 ? void 0 : _row$original5$dsoDet.status) === "DISABLED" ? false : true,
|
|
8589
8662
|
onChange: () => onVendorUpdate(row),
|
|
8590
8663
|
name: `switch-${row.id}`
|
|
8591
8664
|
});
|
|
@@ -8596,8 +8669,8 @@ const VendorInbox = props => {
|
|
|
8596
8669
|
Cell: ({
|
|
8597
8670
|
row
|
|
8598
8671
|
}) => {
|
|
8599
|
-
var _row$
|
|
8600
|
-
const vendorId = (_row$
|
|
8672
|
+
var _row$original6, _additionalVendorData;
|
|
8673
|
+
const vendorId = (_row$original6 = row.original) === null || _row$original6 === void 0 ? void 0 : _row$original6.id;
|
|
8601
8674
|
if (!additionalVendorData) {
|
|
8602
8675
|
return /*#__PURE__*/React.createElement("span", null, "Loading...");
|
|
8603
8676
|
}
|
|
@@ -8610,7 +8683,7 @@ const VendorInbox = props => {
|
|
|
8610
8683
|
}, /*#__PURE__*/React.createElement("button", {
|
|
8611
8684
|
className: "submit-bar",
|
|
8612
8685
|
style: {
|
|
8613
|
-
backgroundColor: hasDetails ? "#417505" : "#
|
|
8686
|
+
backgroundColor: hasDetails ? "#417505" : "#3A8DCC",
|
|
8614
8687
|
color: "white"
|
|
8615
8688
|
}
|
|
8616
8689
|
}, hasDetails ? "View Details" : "Add Details"));
|
|
@@ -8635,8 +8708,8 @@ const VendorInbox = props => {
|
|
|
8635
8708
|
Cell: ({
|
|
8636
8709
|
row
|
|
8637
8710
|
}) => {
|
|
8638
|
-
var _row$
|
|
8639
|
-
return GetCell((_row$
|
|
8711
|
+
var _row$original7, _row$original7$auditD, _row$original8, _row$original8$auditD;
|
|
8712
|
+
return GetCell((_row$original7 = row.original) !== null && _row$original7 !== void 0 && (_row$original7$auditD = _row$original7.auditDetails) !== null && _row$original7$auditD !== void 0 && _row$original7$auditD.createdTime ? Digit.DateUtils.ConvertEpochToDate((_row$original8 = row.original) === null || _row$original8 === void 0 ? void 0 : (_row$original8$auditD = _row$original8.auditDetails) === null || _row$original8$auditD === void 0 ? void 0 : _row$original8$auditD.createdTime) : "");
|
|
8640
8713
|
}
|
|
8641
8714
|
}, {
|
|
8642
8715
|
Header: t("ES_FSM_REGISTRY_INBOX_VENDOR_NAME"),
|
|
@@ -8648,8 +8721,8 @@ const VendorInbox = props => {
|
|
|
8648
8721
|
Cell: ({
|
|
8649
8722
|
row
|
|
8650
8723
|
}) => {
|
|
8651
|
-
var _row$
|
|
8652
|
-
return GetCell(((_row$
|
|
8724
|
+
var _row$original9, _row$original9$vendor;
|
|
8725
|
+
return GetCell(((_row$original9 = row.original) === null || _row$original9 === void 0 ? void 0 : (_row$original9$vendor = _row$original9.vendor) === null || _row$original9$vendor === void 0 ? void 0 : _row$original9$vendor.name) || "NA");
|
|
8653
8726
|
}
|
|
8654
8727
|
}, {
|
|
8655
8728
|
Header: t("ES_VENDOR_INBOX_SERVICE_TYPE"),
|
|
@@ -8682,6 +8755,25 @@ const VendorInbox = props => {
|
|
|
8682
8755
|
const serviceType = ((_additionalDetail2 = additionalDetail) === null || _additionalDetail2 === void 0 ? void 0 : _additionalDetail2.serviceType) || "N/A";
|
|
8683
8756
|
return /*#__PURE__*/React.createElement("div", null, serviceType);
|
|
8684
8757
|
}
|
|
8758
|
+
}, {
|
|
8759
|
+
Header: t("WT_FILLING_POINT"),
|
|
8760
|
+
accessor: row => getFillingPointDisplayValue(row),
|
|
8761
|
+
id: "fillingPoint",
|
|
8762
|
+
Cell: ({
|
|
8763
|
+
row
|
|
8764
|
+
}) => {
|
|
8765
|
+
return /*#__PURE__*/React.createElement(Dropdown$2, {
|
|
8766
|
+
className: "fsm-registry-dropdown",
|
|
8767
|
+
selected: getSelectedFillingPointOption(row.original, allFillingPoints),
|
|
8768
|
+
option: allFillingPoints,
|
|
8769
|
+
select: value => onVehicleFillingPointSelect(row, value),
|
|
8770
|
+
style: {
|
|
8771
|
+
textAlign: "left"
|
|
8772
|
+
},
|
|
8773
|
+
optionKey: "fillingPointName",
|
|
8774
|
+
t: t
|
|
8775
|
+
});
|
|
8776
|
+
}
|
|
8685
8777
|
}, {
|
|
8686
8778
|
Header: t("ES_FSM_REGISTRY_SELECT_DRIVER"),
|
|
8687
8779
|
id: "driver",
|
|
@@ -8714,13 +8806,13 @@ const VendorInbox = props => {
|
|
|
8714
8806
|
Cell: ({
|
|
8715
8807
|
row
|
|
8716
8808
|
}) => {
|
|
8717
|
-
var _row$
|
|
8809
|
+
var _row$original0;
|
|
8718
8810
|
return /*#__PURE__*/React.createElement(ToggleSwitch, {
|
|
8719
8811
|
style: {
|
|
8720
8812
|
display: "flex",
|
|
8721
8813
|
justifyContent: "left"
|
|
8722
8814
|
},
|
|
8723
|
-
value: ((_row$
|
|
8815
|
+
value: ((_row$original0 = row.original) === null || _row$original0 === void 0 ? void 0 : _row$original0.status) === "DISABLED" ? false : true,
|
|
8724
8816
|
onChange: () => onVehicleUpdate(row),
|
|
8725
8817
|
name: `switch-${row.id}`
|
|
8726
8818
|
});
|
|
@@ -8762,8 +8854,8 @@ const VendorInbox = props => {
|
|
|
8762
8854
|
Cell: ({
|
|
8763
8855
|
row
|
|
8764
8856
|
}) => {
|
|
8765
|
-
var _row$
|
|
8766
|
-
return GetCell((_row$
|
|
8857
|
+
var _row$original1, _row$original1$auditD, _row$original10, _row$original10$audit;
|
|
8858
|
+
return GetCell((_row$original1 = row.original) !== null && _row$original1 !== void 0 && (_row$original1$auditD = _row$original1.auditDetails) !== null && _row$original1$auditD !== void 0 && _row$original1$auditD.createdTime ? Digit.DateUtils.ConvertEpochToDate((_row$original10 = row.original) === null || _row$original10 === void 0 ? void 0 : (_row$original10$audit = _row$original10.auditDetails) === null || _row$original10$audit === void 0 ? void 0 : _row$original10$audit.createdTime) : "");
|
|
8767
8859
|
}
|
|
8768
8860
|
}, {
|
|
8769
8861
|
Header: t("ES_FSM_REGISTRY_INBOX_VENDOR_NAME"),
|
|
@@ -8797,13 +8889,13 @@ const VendorInbox = props => {
|
|
|
8797
8889
|
Cell: ({
|
|
8798
8890
|
row
|
|
8799
8891
|
}) => {
|
|
8800
|
-
var _row$
|
|
8892
|
+
var _row$original11;
|
|
8801
8893
|
return /*#__PURE__*/React.createElement(ToggleSwitch, {
|
|
8802
8894
|
style: {
|
|
8803
8895
|
display: "flex",
|
|
8804
8896
|
justifyContent: "left"
|
|
8805
8897
|
},
|
|
8806
|
-
value: ((_row$
|
|
8898
|
+
value: ((_row$original11 = row.original) === null || _row$original11 === void 0 ? void 0 : _row$original11.status) === "DISABLED" ? false : true,
|
|
8807
8899
|
onChange: () => onDriverUpdate(row),
|
|
8808
8900
|
name: `switch-${row.id}`
|
|
8809
8901
|
});
|
|
@@ -8819,8 +8911,8 @@ const VendorInbox = props => {
|
|
|
8819
8911
|
return [{
|
|
8820
8912
|
Header: t("ES_VENDOR_INBOX_VENDOR_NAME"),
|
|
8821
8913
|
exportAccessor: row => {
|
|
8822
|
-
var _row$
|
|
8823
|
-
return (row === null || row === void 0 ? void 0 : row.name) || (row === null || row === void 0 ? void 0 : (_row$
|
|
8914
|
+
var _row$dsoDetails0;
|
|
8915
|
+
return (row === null || row === void 0 ? void 0 : row.name) || (row === null || row === void 0 ? void 0 : (_row$dsoDetails0 = row.dsoDetails) === null || _row$dsoDetails0 === void 0 ? void 0 : _row$dsoDetails0.name) || "NA";
|
|
8824
8916
|
}
|
|
8825
8917
|
}, {
|
|
8826
8918
|
Header: t("ES_VENDOR_INBOX_DATE_VENDOR_CREATION"),
|
|
@@ -8830,21 +8922,18 @@ const VendorInbox = props => {
|
|
|
8830
8922
|
}
|
|
8831
8923
|
}, {
|
|
8832
8924
|
Header: t("WT_FILLING_POINT"),
|
|
8833
|
-
exportAccessor: row =>
|
|
8834
|
-
var _row$dsoDetails7, _row$dsoDetails7$fill, _row$dsoDetails8, _row$dsoDetails9;
|
|
8835
|
-
return (row === null || row === void 0 ? void 0 : (_row$dsoDetails7 = row.dsoDetails) === null || _row$dsoDetails7 === void 0 ? void 0 : (_row$dsoDetails7$fill = _row$dsoDetails7.fillingPoint) === null || _row$dsoDetails7$fill === void 0 ? void 0 : _row$dsoDetails7$fill.fillingPointName) || (row === null || row === void 0 ? void 0 : (_row$dsoDetails8 = row.dsoDetails) === null || _row$dsoDetails8 === void 0 ? void 0 : _row$dsoDetails8.fillingPoint) || (row === null || row === void 0 ? void 0 : row.fillingPoint) || (row === null || row === void 0 ? void 0 : (_row$dsoDetails9 = row.dsoDetails) === null || _row$dsoDetails9 === void 0 ? void 0 : _row$dsoDetails9.fillingPointId) || (row === null || row === void 0 ? void 0 : row.fillingPointId) || "NA";
|
|
8836
|
-
}
|
|
8925
|
+
exportAccessor: row => getFillingPointDisplayValue(row)
|
|
8837
8926
|
}, {
|
|
8838
8927
|
Header: t("ES_VENDOR_INBOX_SERVICE_TYPE"),
|
|
8839
8928
|
exportAccessor: row => {
|
|
8840
|
-
var _parseAdditionalDetai, _row$
|
|
8841
|
-
return ((_parseAdditionalDetai = parseAdditionalDetails(row === null || row === void 0 ? void 0 : (_row$
|
|
8929
|
+
var _parseAdditionalDetai, _row$dsoDetails1;
|
|
8930
|
+
return ((_parseAdditionalDetai = parseAdditionalDetails(row === null || row === void 0 ? void 0 : (_row$dsoDetails1 = row.dsoDetails) === null || _row$dsoDetails1 === void 0 ? void 0 : _row$dsoDetails1.additionalDetails)) === null || _parseAdditionalDetai === void 0 ? void 0 : _parseAdditionalDetai.serviceType) || "N/A";
|
|
8842
8931
|
}
|
|
8843
8932
|
}, {
|
|
8844
8933
|
Header: t("ES_VENDOR_REGISTRY_INBOX_ENABLED"),
|
|
8845
8934
|
exportAccessor: row => {
|
|
8846
|
-
var _row$
|
|
8847
|
-
return (row === null || row === void 0 ? void 0 : (_row$
|
|
8935
|
+
var _row$dsoDetails10;
|
|
8936
|
+
return (row === null || row === void 0 ? void 0 : (_row$dsoDetails10 = row.dsoDetails) === null || _row$dsoDetails10 === void 0 ? void 0 : _row$dsoDetails10.status) || "NA";
|
|
8848
8937
|
}
|
|
8849
8938
|
}];
|
|
8850
8939
|
case "VEHICLE":
|
|
@@ -8869,6 +8958,9 @@ const VendorInbox = props => {
|
|
|
8869
8958
|
var _parseAdditionalDetai2;
|
|
8870
8959
|
return ((_parseAdditionalDetai2 = parseAdditionalDetails(row === null || row === void 0 ? void 0 : row.additionalDetails)) === null || _parseAdditionalDetai2 === void 0 ? void 0 : _parseAdditionalDetai2.serviceType) || "N/A";
|
|
8871
8960
|
}
|
|
8961
|
+
}, {
|
|
8962
|
+
Header: t("WT_FILLING_POINT"),
|
|
8963
|
+
exportAccessor: row => getFillingPointDisplayValue(row)
|
|
8872
8964
|
}, {
|
|
8873
8965
|
Header: t("ES_FSM_REGISTRY_SELECT_DRIVER"),
|
|
8874
8966
|
exportAccessor: row => {
|
|
@@ -9015,7 +9107,7 @@ const VendorInbox = props => {
|
|
|
9015
9107
|
}
|
|
9016
9108
|
}, result)), showToast && /*#__PURE__*/React.createElement(Toast, {
|
|
9017
9109
|
error: showToast.key === "error" ? true : false,
|
|
9018
|
-
label: t(showToast.key === "success" ? `ES_FSM_REGISTRY_${showToast.action}_DISABLE_SUCCESS` : showToast.action),
|
|
9110
|
+
label: showToast.label ? t(showToast.label) : t(showToast.key === "success" ? `ES_FSM_REGISTRY_${showToast.action}_DISABLE_SUCCESS` : showToast.action),
|
|
9019
9111
|
onClose: closeToast
|
|
9020
9112
|
}));
|
|
9021
9113
|
};
|
|
@@ -9598,6 +9690,8 @@ const AddDriver = ({
|
|
|
9598
9690
|
config: Config.filter(i => !i.hideInEmployee).map(config => {
|
|
9599
9691
|
return {
|
|
9600
9692
|
...config,
|
|
9693
|
+
isCollapsible: true,
|
|
9694
|
+
isDefaultOpen: true,
|
|
9601
9695
|
body: config.body.filter(a => !a.hideInEmployee)
|
|
9602
9696
|
};
|
|
9603
9697
|
}),
|
|
@@ -9608,7 +9702,8 @@ const AddDriver = ({
|
|
|
9608
9702
|
defaultValues: defaultValues,
|
|
9609
9703
|
onFormValueChange: onFormValueChange,
|
|
9610
9704
|
noBreakLine: true,
|
|
9611
|
-
mode: "onChange"
|
|
9705
|
+
mode: "onChange",
|
|
9706
|
+
noCard: true
|
|
9612
9707
|
}), showToast && /*#__PURE__*/React.createElement(Toast, {
|
|
9613
9708
|
error: showToast.key === "error" ? true : false,
|
|
9614
9709
|
label: t(showToast.key === "success" ? `ES_FSM_${showToast.action}_SUCCESS` : showToast.action),
|
|
@@ -10424,6 +10519,8 @@ const AddVehicle = ({
|
|
|
10424
10519
|
config: Config.filter(i => !i.hideInEmployee).map(config => {
|
|
10425
10520
|
return {
|
|
10426
10521
|
...config,
|
|
10522
|
+
isCollapsible: true,
|
|
10523
|
+
isDefaultOpen: true,
|
|
10427
10524
|
body: config.body.filter(a => !a.hideInEmployee)
|
|
10428
10525
|
};
|
|
10429
10526
|
}),
|
|
@@ -10434,7 +10531,8 @@ const AddVehicle = ({
|
|
|
10434
10531
|
defaultValues: defaultValues,
|
|
10435
10532
|
onFormValueChange: onFormValueChange,
|
|
10436
10533
|
noBreakLine: true,
|
|
10437
|
-
mode: "onChange"
|
|
10534
|
+
mode: "onChange",
|
|
10535
|
+
noCard: true
|
|
10438
10536
|
}), showToast && /*#__PURE__*/React.createElement(Toast, {
|
|
10439
10537
|
error: showToast.key === "error" ? true : false,
|
|
10440
10538
|
label: t(showToast.key === "success" ? `ES_FSM_REGISTRY_${showToast.action}_SUCCESS` : showToast.action),
|