@djb25/digit-ui-module-vendor 1.0.11 → 1.0.13
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 +80 -96
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import React, { useEffect, useMemo, useCallback, useState, Fragment } from 'react';
|
|
1
|
+
import React, { useEffect, useMemo, useCallback, useState, Fragment as Fragment$1 } from 'react';
|
|
3
2
|
import { useTranslation } from 'react-i18next';
|
|
4
3
|
import { useParams, useLocation, Switch, Link, useHistory, useRouteMatch, Route, Redirect } from 'react-router-dom';
|
|
4
|
+
import { Header, SearchForm, SearchField, Dropdown as Dropdown$2, MobileNumber, CardLabelError, DatePicker as DatePicker$3, SubmitBar, Card, Table, Loader, Toast, AppContainer, ModuleHeader, ArrowLeft, PrivateRoute, HomeIcon, PropertyHouse, EmployeeModuleCard, Stepper, FormComposer, TickMark, FormStep, CardLabel, TextInput, LabelFieldPair, UploadFile, CardSubHeader, CardText, RadioOrSelect, ShippingTruck, CheckBox, RadioButtons, CloseSvg, Localities, RemoveableTag, ActionBar, ApplyFilterBar, AddIcon, Menu, Label, LinkLabel, ToggleSwitch, CardSectionHeader, StatusTable, Row, EditIcon, DeleteIcon, Modal, InfoIcon, CardHeader, LinkButton, Banner } from '@djb25/digit-ui-react-components';
|
|
5
5
|
import { useForm, Controller } from 'react-hook-form';
|
|
6
6
|
import { useQueryClient } from 'react-query';
|
|
7
7
|
|
|
@@ -381,54 +381,59 @@ const EmployeeApp = ({
|
|
|
381
381
|
}), "Back"),
|
|
382
382
|
onLeftClick: () => window.history.back(),
|
|
383
383
|
breadcrumbs: getDynamicBreadcrumbs()
|
|
384
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
385
|
-
className: "employee-form"
|
|
386
|
-
}, /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
387
|
-
path: `${path}/registry/new-vendor`,
|
|
388
|
-
component: () => /*#__PURE__*/React.createElement(AddVendor, {
|
|
389
|
-
parentRoute: path
|
|
390
|
-
})
|
|
391
384
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
392
385
|
path: `${path}/search-vendor`,
|
|
393
|
-
component: (
|
|
386
|
+
component: renderWithLayout(props => /*#__PURE__*/React.createElement(SearchVendor, Object.assign({}, props, {
|
|
394
387
|
parentRoute: path
|
|
395
|
-
})
|
|
388
|
+
})), layouts.normal)
|
|
396
389
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
397
390
|
path: `${path}/registry/new-driver`,
|
|
398
|
-
component: (
|
|
391
|
+
component: renderWithLayout(props => /*#__PURE__*/React.createElement(AddDriver, Object.assign({}, props, {
|
|
399
392
|
parentRoute: path
|
|
400
|
-
})
|
|
393
|
+
})), layouts.normal)
|
|
401
394
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
402
|
-
path: `${path}/registry/
|
|
403
|
-
component: (
|
|
395
|
+
path: `${path}/registry/new-vehicle`,
|
|
396
|
+
component: renderWithLayout(props => /*#__PURE__*/React.createElement(AddVehicle, Object.assign({}, props, {
|
|
404
397
|
parentRoute: path
|
|
405
|
-
})
|
|
398
|
+
})), layouts.normal)
|
|
406
399
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
407
|
-
path: `${path}/registry/
|
|
408
|
-
component: (
|
|
400
|
+
path: `${path}/registry/additionaldetails`,
|
|
401
|
+
component: renderWithLayout(props => /*#__PURE__*/React.createElement(VendorCreate, Object.assign({}, props, {
|
|
409
402
|
parentRoute: path
|
|
410
|
-
})
|
|
403
|
+
})), layouts.normal)
|
|
411
404
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
412
|
-
path: `${path}/registry/
|
|
413
|
-
component: (
|
|
405
|
+
path: `${path}/registry/driver-details/:id`,
|
|
406
|
+
component: renderWithLayout(props => /*#__PURE__*/React.createElement(DriverDetails, Object.assign({}, props, {
|
|
414
407
|
parentRoute: path
|
|
415
|
-
})
|
|
408
|
+
})), layouts.action)
|
|
416
409
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
417
|
-
path: `${path}/
|
|
418
|
-
component: (
|
|
410
|
+
path: `${path}/common-search/:id`,
|
|
411
|
+
component: renderWithLayout(props => /*#__PURE__*/React.createElement(SearchApp, Object.assign({}, props, {
|
|
419
412
|
parentRoute: path
|
|
420
|
-
})
|
|
413
|
+
})), layouts.normal)
|
|
421
414
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
422
|
-
path: `${path}/registry/
|
|
423
|
-
component: (
|
|
415
|
+
path: `${path}/registry/new-vendor`,
|
|
416
|
+
component: renderWithLayout(props => /*#__PURE__*/React.createElement(AddVendor, Object.assign({}, props, {
|
|
424
417
|
parentRoute: path
|
|
425
|
-
})
|
|
418
|
+
})), layouts.action)
|
|
426
419
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
427
|
-
path: `${path}/
|
|
428
|
-
component: props => /*#__PURE__*/React.createElement(
|
|
420
|
+
path: `${path}/registry/vendor-details/:id`,
|
|
421
|
+
component: renderWithLayout(props => /*#__PURE__*/React.createElement(EditVendorDetails, Object.assign({}, props, {
|
|
429
422
|
parentRoute: path
|
|
430
|
-
}))
|
|
431
|
-
})
|
|
423
|
+
})), layouts.action)
|
|
424
|
+
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
425
|
+
path: `${path}/registry/vehicle-details/:id`,
|
|
426
|
+
component: renderWithLayout(props => /*#__PURE__*/React.createElement(VehicleDetails, Object.assign({}, props, {
|
|
427
|
+
parentRoute: path
|
|
428
|
+
})), layouts.action)
|
|
429
|
+
})))));
|
|
430
|
+
};
|
|
431
|
+
const renderWithLayout = (Component, layoutClass) => routeProps => /*#__PURE__*/React.createElement("div", {
|
|
432
|
+
className: layoutClass
|
|
433
|
+
}, /*#__PURE__*/React.createElement(Component, routeProps));
|
|
434
|
+
const layouts = {
|
|
435
|
+
normal: "employee-form",
|
|
436
|
+
action: "employee-form employee-form-content-with-action-bar"
|
|
432
437
|
};
|
|
433
438
|
|
|
434
439
|
const VENDORCard = () => {
|
|
@@ -1024,9 +1029,6 @@ const VendorDetails = ({
|
|
|
1024
1029
|
function setcontactperson(e) {
|
|
1025
1030
|
setContactPerson(e.target.value);
|
|
1026
1031
|
}
|
|
1027
|
-
function setcompanyname(e) {
|
|
1028
|
-
setCompany(e.target.value);
|
|
1029
|
-
}
|
|
1030
1032
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
1031
1033
|
const stateId = Digit.ULBService.getStateId();
|
|
1032
1034
|
const {
|
|
@@ -1233,23 +1235,6 @@ const VendorDetails = ({
|
|
|
1233
1235
|
pattern: "^[a-zA-Z0-9/-]{1,20}$",
|
|
1234
1236
|
type: "text",
|
|
1235
1237
|
title: t("INVALID_ACCOUNT_NO_ERROR_MESSAGE")
|
|
1236
|
-
}))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("COMPANY_NAME")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
1237
|
-
t: t,
|
|
1238
|
-
type: "text",
|
|
1239
|
-
isMandatory: false,
|
|
1240
|
-
optionKey: "i18nKey",
|
|
1241
|
-
name: "Company",
|
|
1242
|
-
value: Company,
|
|
1243
|
-
onChange: setcompanyname,
|
|
1244
|
-
style: {
|
|
1245
|
-
width: "100%"
|
|
1246
|
-
},
|
|
1247
|
-
ValidationRequired: true
|
|
1248
|
-
}, validation = {
|
|
1249
|
-
isRequired: true,
|
|
1250
|
-
pattern: "^[a-zA-Z0-9/-]{1,20}$",
|
|
1251
|
-
type: "text",
|
|
1252
|
-
title: t("INVALID_ACCOUNT_NO_ERROR_MESSAGE")
|
|
1253
1238
|
}))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("PAN_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
1254
1239
|
t: t,
|
|
1255
1240
|
type: "text",
|
|
@@ -1756,9 +1741,7 @@ const VendorSelectAddress = ({
|
|
|
1756
1741
|
});
|
|
1757
1742
|
}
|
|
1758
1743
|
if (userType === "employee") {
|
|
1759
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
1760
|
-
className: "card-label-smaller"
|
|
1761
|
-
}, t("MYCITY_CODE_LABEL"), config.isMandatory ? " * " : null), /*#__PURE__*/React.createElement(Dropdown$2, {
|
|
1744
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("MYCITY_CODE_LABEL"), config.isMandatory ? " * " : null), /*#__PURE__*/React.createElement(Dropdown$2, {
|
|
1762
1745
|
className: "",
|
|
1763
1746
|
isMandatory: true,
|
|
1764
1747
|
selected: (cities === null || cities === void 0 ? void 0 : cities.length) === 1 ? cities[0] : selectedCity,
|
|
@@ -1767,9 +1750,7 @@ const VendorSelectAddress = ({
|
|
|
1767
1750
|
select: selectCity,
|
|
1768
1751
|
optionKey: "code",
|
|
1769
1752
|
t: t
|
|
1770
|
-
}), /*#__PURE__*/React.createElement(CardLabel, {
|
|
1771
|
-
className: "card-label-smaller"
|
|
1772
|
-
}, t("ES_NEW_APPLICATION_LOCATION_MOHALLA"), config.isMandatory ? " * " : null), /*#__PURE__*/React.createElement(Dropdown$2, {
|
|
1753
|
+
})), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("ES_NEW_APPLICATION_LOCATION_MOHALLA"), config.isMandatory ? " * " : null), /*#__PURE__*/React.createElement(Dropdown$2, {
|
|
1773
1754
|
className: "",
|
|
1774
1755
|
isMandatory: true,
|
|
1775
1756
|
selected: selectedLocality,
|
|
@@ -1777,7 +1758,7 @@ const VendorSelectAddress = ({
|
|
|
1777
1758
|
select: selectLocality,
|
|
1778
1759
|
optionKey: "name",
|
|
1779
1760
|
t: t
|
|
1780
|
-
}));
|
|
1761
|
+
})));
|
|
1781
1762
|
}
|
|
1782
1763
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FormStep, {
|
|
1783
1764
|
config: config,
|
|
@@ -8226,8 +8207,7 @@ const VendorInbox = props => {
|
|
|
8226
8207
|
filters: {
|
|
8227
8208
|
sortBy: "name",
|
|
8228
8209
|
sortOrder: "ASC",
|
|
8229
|
-
status: "ACTIVE"
|
|
8230
|
-
driverWithNoVendor: true
|
|
8210
|
+
status: "ACTIVE"
|
|
8231
8211
|
}
|
|
8232
8212
|
});
|
|
8233
8213
|
const {
|
|
@@ -8405,6 +8385,7 @@ const VendorInbox = props => {
|
|
|
8405
8385
|
action: "VENDOR"
|
|
8406
8386
|
});
|
|
8407
8387
|
queryClient.invalidateQueries("DSO_SEARCH");
|
|
8388
|
+
props.refetchVendor();
|
|
8408
8389
|
props.refetchData();
|
|
8409
8390
|
setTimeout(closeToast, 3000);
|
|
8410
8391
|
}
|
|
@@ -8433,7 +8414,9 @@ const VendorInbox = props => {
|
|
|
8433
8414
|
action: "VEHICLE"
|
|
8434
8415
|
});
|
|
8435
8416
|
queryClient.invalidateQueries("FSM_VEICLES_SEARCH");
|
|
8417
|
+
queryClient.invalidateQueries("DSO_SEARCH");
|
|
8436
8418
|
props.refetchData();
|
|
8419
|
+
props.refetchVendor();
|
|
8437
8420
|
setTimeout(closeToast, 3000);
|
|
8438
8421
|
}
|
|
8439
8422
|
});
|
|
@@ -8610,11 +8593,18 @@ const VendorInbox = props => {
|
|
|
8610
8593
|
row
|
|
8611
8594
|
}) => {
|
|
8612
8595
|
return /*#__PURE__*/React.createElement(Dropdown$2, {
|
|
8613
|
-
|
|
8596
|
+
className: "fsm-registry-dropdown",
|
|
8597
|
+
selected: (drivers === null || drivers === void 0 ? void 0 : drivers.find(driver => {
|
|
8598
|
+
var _row$original$driverD, _row$original$driver;
|
|
8599
|
+
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;
|
|
8600
|
+
})) || row.original.driverData || row.original.driver,
|
|
8614
8601
|
option: drivers,
|
|
8615
8602
|
select: value => onDriverSelect(row, value),
|
|
8616
8603
|
optionKey: "name",
|
|
8617
|
-
t: t
|
|
8604
|
+
t: t,
|
|
8605
|
+
style: {
|
|
8606
|
+
textAlign: "left"
|
|
8607
|
+
}
|
|
8618
8608
|
});
|
|
8619
8609
|
}
|
|
8620
8610
|
}, {
|
|
@@ -8678,9 +8668,15 @@ const VendorInbox = props => {
|
|
|
8678
8668
|
}) => {
|
|
8679
8669
|
return /*#__PURE__*/React.createElement(Dropdown$2, {
|
|
8680
8670
|
className: "fsm-registry-dropdown",
|
|
8681
|
-
selected:
|
|
8671
|
+
selected: (vendors === null || vendors === void 0 ? void 0 : vendors.find(vendor => {
|
|
8672
|
+
var _row$original$vendorD, _row$original$vendor;
|
|
8673
|
+
return (((_row$original$vendorD = row.original.vendorData) === null || _row$original$vendorD === void 0 ? void 0 : _row$original$vendorD.id) || ((_row$original$vendor = row.original.vendor) === null || _row$original$vendor === void 0 ? void 0 : _row$original$vendor.id)) === vendor.id;
|
|
8674
|
+
})) || row.original.vendorData || row.original.vendor,
|
|
8682
8675
|
option: vendors,
|
|
8683
8676
|
select: value => onVendorSelect(row, value),
|
|
8677
|
+
style: {
|
|
8678
|
+
textAlign: "left"
|
|
8679
|
+
},
|
|
8684
8680
|
optionKey: "name",
|
|
8685
8681
|
t: t
|
|
8686
8682
|
});
|
|
@@ -8960,9 +8956,12 @@ const SearchVendor = () => {
|
|
|
8960
8956
|
return (_ele$dsoDetails = ele.dsoDetails) === null || _ele$dsoDetails === void 0 ? void 0 : (_ele$dsoDetails$vehic = _ele$dsoDetails.vehicles) === null || _ele$dsoDetails$vehic === void 0 ? void 0 : _ele$dsoDetails$vehic.find(vehicle => vehicle.id === data.id);
|
|
8961
8957
|
});
|
|
8962
8958
|
if (vendor) {
|
|
8963
|
-
var _vendor$dsoDetails, _vendor$dsoDetails$ve
|
|
8959
|
+
var _vendor$dsoDetails, _vendor$dsoDetails$ve;
|
|
8964
8960
|
data.vendor = vendor.dsoDetails;
|
|
8965
|
-
|
|
8961
|
+
const vehicleInVendor = (_vendor$dsoDetails = vendor.dsoDetails) === null || _vendor$dsoDetails === void 0 ? void 0 : (_vendor$dsoDetails$ve = _vendor$dsoDetails.vehicles) === null || _vendor$dsoDetails$ve === void 0 ? void 0 : _vendor$dsoDetails$ve.find(vehicle => vehicle.id === data.id);
|
|
8962
|
+
if (vehicleInVendor) {
|
|
8963
|
+
data.driverData = vehicleInVendor.driverData || vehicleInVendor.driver || data.driverData;
|
|
8964
|
+
}
|
|
8966
8965
|
}
|
|
8967
8966
|
return data;
|
|
8968
8967
|
});
|
|
@@ -9107,7 +9106,7 @@ const SelectServiceType = ({
|
|
|
9107
9106
|
return /*#__PURE__*/React.createElement(Loader, null);
|
|
9108
9107
|
}
|
|
9109
9108
|
if (userType === "employee") {
|
|
9110
|
-
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Dropdown$2, {
|
|
9109
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, config.label), /*#__PURE__*/React.createElement(Dropdown$2, {
|
|
9111
9110
|
className: "payment-form-text-input-correction",
|
|
9112
9111
|
isMandatory: config.isMandatory,
|
|
9113
9112
|
selected: serviceTypes,
|
|
@@ -10705,18 +10704,16 @@ const CloseBtn$1 = props => {
|
|
|
10705
10704
|
const DriverDetails = props => {
|
|
10706
10705
|
var _driverData$5, _driverData$5$employe;
|
|
10707
10706
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
10708
|
-
const state = Digit.ULBService.getStateId();
|
|
10709
10707
|
const {
|
|
10710
10708
|
t
|
|
10711
10709
|
} = useTranslation();
|
|
10712
10710
|
const history = useHistory();
|
|
10713
10711
|
const queryClient = useQueryClient();
|
|
10714
|
-
|
|
10712
|
+
const {
|
|
10715
10713
|
id: dsoId
|
|
10716
10714
|
} = useParams();
|
|
10717
10715
|
const [displayMenu, setDisplayMenu] = useState(false);
|
|
10718
10716
|
const [selectedAction, setSelectedAction] = useState(null);
|
|
10719
|
-
const [config, setCurrentConfig] = useState({});
|
|
10720
10717
|
const [showModal, setShowModal] = useState(false);
|
|
10721
10718
|
const [showToast, setShowToast] = useState(null);
|
|
10722
10719
|
const [vendors, setVendors] = useState([]);
|
|
@@ -10989,14 +10986,8 @@ const DriverDetails = props => {
|
|
|
10989
10986
|
if (isLoading) {
|
|
10990
10987
|
return /*#__PURE__*/React.createElement(Loader, null);
|
|
10991
10988
|
}
|
|
10992
|
-
return
|
|
10993
|
-
|
|
10994
|
-
marginBottom: "16px"
|
|
10995
|
-
}
|
|
10996
|
-
}, t("ES_FSM_REGISTRY_DRIVER_DETAILS")), /*#__PURE__*/React.createElement("div", {
|
|
10997
|
-
style: !isMobile ? {
|
|
10998
|
-
marginLeft: "-15px"
|
|
10999
|
-
} : {}
|
|
10989
|
+
return !isLoading ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
10990
|
+
className: "employee-form-content"
|
|
11000
10991
|
}, /*#__PURE__*/React.createElement(Card, {
|
|
11001
10992
|
style: {
|
|
11002
10993
|
position: "relative"
|
|
@@ -11012,7 +11003,9 @@ const DriverDetails = props => {
|
|
|
11012
11003
|
}
|
|
11013
11004
|
}, t(detail.title)), /*#__PURE__*/React.createElement(StatusTable, null, detail === null || detail === void 0 ? void 0 : (_detail$values = detail.values) === null || _detail$values === void 0 ? void 0 : _detail$values.map((value, index) => {
|
|
11014
11005
|
var _detail$values2, _detail$values3;
|
|
11015
|
-
return (value === null || value === void 0 ? void 0 : value.type) === "custom" ? /*#__PURE__*/React.createElement(
|
|
11006
|
+
return (value === null || value === void 0 ? void 0 : value.type) === "custom" ? /*#__PURE__*/React.createElement(React.Fragment, {
|
|
11007
|
+
key: index
|
|
11008
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
11016
11009
|
className: `${index === (detail === null || detail === void 0 ? void 0 : (_detail$values2 = detail.values) === null || _detail$values2 === void 0 ? void 0 : _detail$values2.length) - 1 ? "row last" : "row"} border-none`
|
|
11017
11010
|
}, /*#__PURE__*/React.createElement("h2", null, t(value.title)), /*#__PURE__*/React.createElement("div", {
|
|
11018
11011
|
className: "value",
|
|
@@ -11087,7 +11080,7 @@ const DriverDetails = props => {
|
|
|
11087
11080
|
}) : null, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
11088
11081
|
label: t("ES_COMMON_TAKE_ACTION"),
|
|
11089
11082
|
onSubmit: () => setDisplayMenu(!displayMenu)
|
|
11090
|
-
}))) : /*#__PURE__*/React.createElement(Loader, null)
|
|
11083
|
+
}))) : /*#__PURE__*/React.createElement(Loader, null);
|
|
11091
11084
|
};
|
|
11092
11085
|
|
|
11093
11086
|
const Heading$2 = props => {
|
|
@@ -11369,7 +11362,7 @@ const VehicleDetails = props => {
|
|
|
11369
11362
|
});
|
|
11370
11363
|
}
|
|
11371
11364
|
if (selectedAction === "ADD_VENDOR") {
|
|
11372
|
-
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(CardText, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$2, {
|
|
11365
|
+
return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(CardText, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$2, {
|
|
11373
11366
|
t: t,
|
|
11374
11367
|
option: vendors,
|
|
11375
11368
|
value: selectedOption,
|
|
@@ -11379,7 +11372,7 @@ const VehicleDetails = props => {
|
|
|
11379
11372
|
}));
|
|
11380
11373
|
}
|
|
11381
11374
|
if (selectedAction === "EDIT_VENDOR") {
|
|
11382
|
-
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(CardText, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$2, {
|
|
11375
|
+
return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(CardText, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$2, {
|
|
11383
11376
|
t: t,
|
|
11384
11377
|
option: vendors,
|
|
11385
11378
|
value: selectedOption,
|
|
@@ -11389,7 +11382,6 @@ const VehicleDetails = props => {
|
|
|
11389
11382
|
}));
|
|
11390
11383
|
}
|
|
11391
11384
|
};
|
|
11392
|
-
const isMobile = window.Digit.Utils.browser.isMobile();
|
|
11393
11385
|
const modalHeading = () => {
|
|
11394
11386
|
switch (selectedAction) {
|
|
11395
11387
|
case "DELETE":
|
|
@@ -11404,15 +11396,8 @@ const VehicleDetails = props => {
|
|
|
11404
11396
|
if (isLoading) {
|
|
11405
11397
|
return /*#__PURE__*/React.createElement(Loader, null);
|
|
11406
11398
|
}
|
|
11407
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, !isLoading ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
11408
|
-
|
|
11409
|
-
marginBottom: "16px"
|
|
11410
|
-
}
|
|
11411
|
-
}, t("ES_FSM_REGISTRY_VEHICLE_DETAILS")), /*#__PURE__*/React.createElement("div", {
|
|
11412
|
-
style: !isMobile ? {
|
|
11413
|
-
marginLeft: "-15px"
|
|
11414
|
-
} : {}
|
|
11415
|
-
}, /*#__PURE__*/React.createElement(Card, {
|
|
11399
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !isLoading ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Card, {
|
|
11400
|
+
className: "vehicle-details-card",
|
|
11416
11401
|
style: {
|
|
11417
11402
|
position: "relative"
|
|
11418
11403
|
}
|
|
@@ -11427,7 +11412,7 @@ const VehicleDetails = props => {
|
|
|
11427
11412
|
}
|
|
11428
11413
|
}, t(detail.title)), /*#__PURE__*/React.createElement(StatusTable, null, detail === null || detail === void 0 ? void 0 : (_detail$values = detail.values) === null || _detail$values === void 0 ? void 0 : _detail$values.map((value, index) => {
|
|
11429
11414
|
var _detail$values2, _detail$values3;
|
|
11430
|
-
return (value === null || value === void 0 ? void 0 : value.type) === "custom" ? /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
11415
|
+
return (value === null || value === void 0 ? void 0 : value.type) === "custom" ? /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement("div", {
|
|
11431
11416
|
className: `${index === (detail === null || detail === void 0 ? void 0 : (_detail$values2 = detail.values) === null || _detail$values2 === void 0 ? void 0 : _detail$values2.length) - 1 ? "row last" : "row"} border-none`
|
|
11432
11417
|
}, /*#__PURE__*/React.createElement("h2", null, t(value.title)), /*#__PURE__*/React.createElement("div", {
|
|
11433
11418
|
className: "value",
|
|
@@ -11473,7 +11458,7 @@ const VehicleDetails = props => {
|
|
|
11473
11458
|
} : {}
|
|
11474
11459
|
});
|
|
11475
11460
|
})));
|
|
11476
|
-
}))
|
|
11461
|
+
})), showModal && /*#__PURE__*/React.createElement(Modal, {
|
|
11477
11462
|
headerBarMain: /*#__PURE__*/React.createElement(Heading$2, {
|
|
11478
11463
|
label: t(modalHeading())
|
|
11479
11464
|
}),
|
|
@@ -11521,7 +11506,6 @@ const SelectVehicleType = ({
|
|
|
11521
11506
|
data: vehicleData,
|
|
11522
11507
|
isLoading: vehicleLoading
|
|
11523
11508
|
} = Digit.Hooks.wt.useWTMDMS(stateId, "Vehicle", "VehicleMakeModel");
|
|
11524
|
-
console.log("vehicleData", vehicleData);
|
|
11525
11509
|
const {
|
|
11526
11510
|
data: serviceTypeData,
|
|
11527
11511
|
isLoading: serviceLoading
|
|
@@ -11599,7 +11583,7 @@ const SelectVehicleType = ({
|
|
|
11599
11583
|
if (!vehicleData || !serviceTypeData) {
|
|
11600
11584
|
return /*#__PURE__*/React.createElement("div", null, t("ERROR_FETCHING_DATA"));
|
|
11601
11585
|
}
|
|
11602
|
-
return /*#__PURE__*/React.createElement(
|
|
11586
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
11603
11587
|
className: "card-label-smaller"
|
|
11604
11588
|
}, t("ES_FSM_REGISTRY_VEHICLE_MODEL")), /*#__PURE__*/React.createElement(Dropdown$2, {
|
|
11605
11589
|
className: "form-field",
|