@djb25/digit-ui-module-vendor 1.0.12 → 1.0.14
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 +215 -124
- 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 = () => {
|
|
@@ -1736,9 +1741,7 @@ const VendorSelectAddress = ({
|
|
|
1736
1741
|
});
|
|
1737
1742
|
}
|
|
1738
1743
|
if (userType === "employee") {
|
|
1739
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
1740
|
-
className: "card-label-smaller"
|
|
1741
|
-
}, 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, {
|
|
1742
1745
|
className: "",
|
|
1743
1746
|
isMandatory: true,
|
|
1744
1747
|
selected: (cities === null || cities === void 0 ? void 0 : cities.length) === 1 ? cities[0] : selectedCity,
|
|
@@ -1747,9 +1750,7 @@ const VendorSelectAddress = ({
|
|
|
1747
1750
|
select: selectCity,
|
|
1748
1751
|
optionKey: "code",
|
|
1749
1752
|
t: t
|
|
1750
|
-
}), /*#__PURE__*/React.createElement(CardLabel, {
|
|
1751
|
-
className: "card-label-smaller"
|
|
1752
|
-
}, 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, {
|
|
1753
1754
|
className: "",
|
|
1754
1755
|
isMandatory: true,
|
|
1755
1756
|
selected: selectedLocality,
|
|
@@ -1757,7 +1758,7 @@ const VendorSelectAddress = ({
|
|
|
1757
1758
|
select: selectLocality,
|
|
1758
1759
|
optionKey: "name",
|
|
1759
1760
|
t: t
|
|
1760
|
-
}));
|
|
1761
|
+
})));
|
|
1761
1762
|
}
|
|
1762
1763
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FormStep, {
|
|
1763
1764
|
config: config,
|
|
@@ -8184,7 +8185,7 @@ const VendorInbox = props => {
|
|
|
8184
8185
|
const [vendors, setVendors] = useState([]);
|
|
8185
8186
|
const [drivers, setDrivers] = useState([]);
|
|
8186
8187
|
const queryClient = useQueryClient();
|
|
8187
|
-
const [
|
|
8188
|
+
const [toast, setToast] = useState(null);
|
|
8188
8189
|
const {
|
|
8189
8190
|
data: vendorData,
|
|
8190
8191
|
isLoading: isVendorLoading,
|
|
@@ -8450,12 +8451,51 @@ const VendorInbox = props => {
|
|
|
8450
8451
|
}, {
|
|
8451
8452
|
enabled: (vendorIds === null || vendorIds === void 0 ? void 0 : vendorIds.length) > 0
|
|
8452
8453
|
});
|
|
8454
|
+
const {
|
|
8455
|
+
data: allFillingPointsData
|
|
8456
|
+
} = Digit.Hooks.wt.useFillPointSearch({
|
|
8457
|
+
tenantId,
|
|
8458
|
+
filters: {
|
|
8459
|
+
limit: 1000
|
|
8460
|
+
}
|
|
8461
|
+
}, {
|
|
8462
|
+
enabled: true
|
|
8463
|
+
});
|
|
8464
|
+
const allFillingPoints = (allFillingPointsData === null || allFillingPointsData === void 0 ? void 0 : allFillingPointsData.fillingPoints) || [];
|
|
8465
|
+
const {
|
|
8466
|
+
mutate: mapFixedFilling
|
|
8467
|
+
} = Digit.Hooks.wt.useVendorFillingMap(tenantId);
|
|
8468
|
+
const onFillingPointSelect = (row, value) => {
|
|
8469
|
+
const payload = {
|
|
8470
|
+
mappings: [{
|
|
8471
|
+
tenantId: tenantId,
|
|
8472
|
+
fillingPointId: (value === null || value === void 0 ? void 0 : value.id) || (value === null || value === void 0 ? void 0 : value.bookingId) || (value === null || value === void 0 ? void 0 : value.fillingPointId),
|
|
8473
|
+
vendorId: row.original.id
|
|
8474
|
+
}]
|
|
8475
|
+
};
|
|
8476
|
+
mapFixedFilling(payload, {
|
|
8477
|
+
onSuccess: () => {
|
|
8478
|
+
setToast({
|
|
8479
|
+
label: t("WT_FIXED_FILLING_MAPPING_SUCCESS")
|
|
8480
|
+
});
|
|
8481
|
+
setTimeout(closeToast, 5000);
|
|
8482
|
+
},
|
|
8483
|
+
onError: err => {
|
|
8484
|
+
var _err$response, _err$response$data, _err$response$data$Er, _err$response$data$Er2;
|
|
8485
|
+
setToast({
|
|
8486
|
+
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) || t("WT_FIXED_FILLING_MAPPING_FAIL"),
|
|
8487
|
+
error: true
|
|
8488
|
+
});
|
|
8489
|
+
setTimeout(closeToast, 5000);
|
|
8490
|
+
}
|
|
8491
|
+
});
|
|
8492
|
+
};
|
|
8453
8493
|
const columns = React.useMemo(() => {
|
|
8454
8494
|
switch (props.selectedTab) {
|
|
8455
8495
|
case "VENDOR":
|
|
8456
8496
|
return [{
|
|
8457
8497
|
Header: t("ES_VENDOR_INBOX_VENDOR_NAME"),
|
|
8458
|
-
|
|
8498
|
+
accessor: "name",
|
|
8459
8499
|
Cell: ({
|
|
8460
8500
|
row
|
|
8461
8501
|
}) => {
|
|
@@ -8463,7 +8503,7 @@ const VendorInbox = props => {
|
|
|
8463
8503
|
className: "link"
|
|
8464
8504
|
}, /*#__PURE__*/React.createElement(Link, {
|
|
8465
8505
|
to: "/digit-ui/employee/vendor/registry/vendor-details/" + row.original["id"]
|
|
8466
|
-
}, /*#__PURE__*/React.createElement("div", null, row.original.name
|
|
8506
|
+
}, /*#__PURE__*/React.createElement("div", null, row.original.name))));
|
|
8467
8507
|
}
|
|
8468
8508
|
}, {
|
|
8469
8509
|
Header: t("ES_VENDOR_INBOX_DATE_VENDOR_CREATION"),
|
|
@@ -8474,13 +8514,52 @@ const VendorInbox = props => {
|
|
|
8474
8514
|
var _row$original, _row$original$auditDe, _row$original2, _row$original2$auditD;
|
|
8475
8515
|
return GetCell((_row$original = row.original) !== null && _row$original !== void 0 && (_row$original$auditDe = _row$original.auditDetails) !== null && _row$original$auditDe !== void 0 && _row$original$auditDe.createdTime ? Digit.DateUtils.ConvertEpochToDate((_row$original2 = row.original) === null || _row$original2 === void 0 ? void 0 : (_row$original2$auditD = _row$original2.auditDetails) === null || _row$original2$auditD === void 0 ? void 0 : _row$original2$auditD.createdTime) : "");
|
|
8476
8516
|
}
|
|
8517
|
+
}, {
|
|
8518
|
+
Header: t("WT_FILLING_POINT"),
|
|
8519
|
+
accessor: row => {
|
|
8520
|
+
var _row$fillingpointmeta;
|
|
8521
|
+
return (row === null || row === void 0 ? void 0 : row.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.filling_pt_name) || (row === null || row === void 0 ? void 0 : row.fillingPoint) || "NA";
|
|
8522
|
+
},
|
|
8523
|
+
id: "fillingPoint",
|
|
8524
|
+
Cell: ({
|
|
8525
|
+
row
|
|
8526
|
+
}) => {
|
|
8527
|
+
return /*#__PURE__*/React.createElement(Dropdown$2, {
|
|
8528
|
+
className: "fsm-registry-dropdown",
|
|
8529
|
+
selected: allFillingPoints === null || allFillingPoints === void 0 ? void 0 : allFillingPoints.find(fp => {
|
|
8530
|
+
var _fp$fillingpointmetad, _row$original$filling, _row$original$filling2, _row$original$filling3;
|
|
8531
|
+
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));
|
|
8532
|
+
const rowFpId = String(row.original.fillingPointId || ((_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 || ((_row$original$filling2 = row.original.fillingPointDetail) === null || _row$original$filling2 === void 0 ? void 0 : _row$original$filling2.id) || ((_row$original$filling3 = row.original.fillingPointDetail) === null || _row$original$filling3 === void 0 ? void 0 : _row$original$filling3.bookingId));
|
|
8533
|
+
return fpId === rowFpId && rowFpId !== "undefined" && rowFpId !== "null";
|
|
8534
|
+
}),
|
|
8535
|
+
option: allFillingPoints,
|
|
8536
|
+
select: value => onFillingPointSelect(row, value),
|
|
8537
|
+
style: {
|
|
8538
|
+
textAlign: "left"
|
|
8539
|
+
},
|
|
8540
|
+
optionKey: "fillingPointName",
|
|
8541
|
+
t: t
|
|
8542
|
+
});
|
|
8543
|
+
}
|
|
8477
8544
|
}, {
|
|
8478
8545
|
Header: t("ES_VENDOR_INBOX_SERVICE_TYPE"),
|
|
8479
|
-
|
|
8546
|
+
id: "serviceType",
|
|
8547
|
+
accessor: row => {
|
|
8548
|
+
var _row$dsoDetails, _additionalDetails;
|
|
8549
|
+
let additionalDetails = (_row$dsoDetails = row.dsoDetails) === null || _row$dsoDetails === void 0 ? void 0 : _row$dsoDetails.additionalDetails;
|
|
8550
|
+
if (typeof additionalDetails === "string") {
|
|
8551
|
+
try {
|
|
8552
|
+
additionalDetails = JSON.parse(additionalDetails);
|
|
8553
|
+
} catch (error) {
|
|
8554
|
+
additionalDetails = {};
|
|
8555
|
+
}
|
|
8556
|
+
}
|
|
8557
|
+
return ((_additionalDetails = additionalDetails) === null || _additionalDetails === void 0 ? void 0 : _additionalDetails.serviceType) || "N/A";
|
|
8558
|
+
},
|
|
8480
8559
|
Cell: ({
|
|
8481
8560
|
row
|
|
8482
8561
|
}) => {
|
|
8483
|
-
var _row$original$dsoDeta,
|
|
8562
|
+
var _row$original$dsoDeta, _additionalDetails2;
|
|
8484
8563
|
let additionalDetails = (_row$original$dsoDeta = row.original.dsoDetails) === null || _row$original$dsoDeta === void 0 ? void 0 : _row$original$dsoDeta.additionalDetails;
|
|
8485
8564
|
if (typeof additionalDetails === "string") {
|
|
8486
8565
|
try {
|
|
@@ -8490,12 +8569,16 @@ const VendorInbox = props => {
|
|
|
8490
8569
|
additionalDetails = {};
|
|
8491
8570
|
}
|
|
8492
8571
|
}
|
|
8493
|
-
const serviceType = ((
|
|
8572
|
+
const serviceType = ((_additionalDetails2 = additionalDetails) === null || _additionalDetails2 === void 0 ? void 0 : _additionalDetails2.serviceType) || "N/A";
|
|
8494
8573
|
return /*#__PURE__*/React.createElement("div", null, serviceType);
|
|
8495
8574
|
}
|
|
8496
8575
|
}, {
|
|
8497
8576
|
Header: t("ES_VENDOR_REGISTRY_INBOX_ENABLED"),
|
|
8498
|
-
|
|
8577
|
+
id: "status",
|
|
8578
|
+
accessor: row => {
|
|
8579
|
+
var _row$dsoDetails2;
|
|
8580
|
+
return ((_row$dsoDetails2 = row.dsoDetails) === null || _row$dsoDetails2 === void 0 ? void 0 : _row$dsoDetails2.status) || "";
|
|
8581
|
+
},
|
|
8499
8582
|
Cell: ({
|
|
8500
8583
|
row
|
|
8501
8584
|
}) => {
|
|
@@ -8539,7 +8622,7 @@ const VendorInbox = props => {
|
|
|
8539
8622
|
case "VEHICLE":
|
|
8540
8623
|
return [{
|
|
8541
8624
|
Header: t("ES_FSM_REGISTRY_INBOX_VEHICLE_NAME"),
|
|
8542
|
-
|
|
8625
|
+
accessor: "registrationNumber",
|
|
8543
8626
|
Cell: ({
|
|
8544
8627
|
row
|
|
8545
8628
|
}) => {
|
|
@@ -8547,7 +8630,7 @@ const VendorInbox = props => {
|
|
|
8547
8630
|
className: "link"
|
|
8548
8631
|
}, /*#__PURE__*/React.createElement(Link, {
|
|
8549
8632
|
to: "/digit-ui/employee/vendor/registry/vehicle-details/" + row.original["registrationNumber"]
|
|
8550
|
-
}, /*#__PURE__*/React.createElement("div", null, row.original.registrationNumber
|
|
8633
|
+
}, /*#__PURE__*/React.createElement("div", null, row.original.registrationNumber))));
|
|
8551
8634
|
}
|
|
8552
8635
|
}, {
|
|
8553
8636
|
Header: t("ES_FSM_REGISTRY_INBOX_DATE_VEHICLE_CREATION"),
|
|
@@ -8560,7 +8643,11 @@ const VendorInbox = props => {
|
|
|
8560
8643
|
}
|
|
8561
8644
|
}, {
|
|
8562
8645
|
Header: t("ES_FSM_REGISTRY_INBOX_VENDOR_NAME"),
|
|
8563
|
-
|
|
8646
|
+
id: "vendorName",
|
|
8647
|
+
accessor: row => {
|
|
8648
|
+
var _row$vendor;
|
|
8649
|
+
return ((_row$vendor = row.vendor) === null || _row$vendor === void 0 ? void 0 : _row$vendor.name) || "NA";
|
|
8650
|
+
},
|
|
8564
8651
|
Cell: ({
|
|
8565
8652
|
row
|
|
8566
8653
|
}) => {
|
|
@@ -8569,11 +8656,23 @@ const VendorInbox = props => {
|
|
|
8569
8656
|
}
|
|
8570
8657
|
}, {
|
|
8571
8658
|
Header: t("ES_VENDOR_INBOX_SERVICE_TYPE"),
|
|
8572
|
-
|
|
8659
|
+
id: "serviceType",
|
|
8660
|
+
accessor: row => {
|
|
8661
|
+
var _additionalDetail;
|
|
8662
|
+
let additionalDetail = row.additionalDetails;
|
|
8663
|
+
if (typeof additionalDetail === "string") {
|
|
8664
|
+
try {
|
|
8665
|
+
additionalDetail = JSON.parse(additionalDetail);
|
|
8666
|
+
} catch (error) {
|
|
8667
|
+
additionalDetail = {};
|
|
8668
|
+
}
|
|
8669
|
+
}
|
|
8670
|
+
return ((_additionalDetail = additionalDetail) === null || _additionalDetail === void 0 ? void 0 : _additionalDetail.serviceType) || "N/A";
|
|
8671
|
+
},
|
|
8573
8672
|
Cell: ({
|
|
8574
8673
|
row
|
|
8575
8674
|
}) => {
|
|
8576
|
-
var
|
|
8675
|
+
var _additionalDetail2;
|
|
8577
8676
|
let additionalDetail = row.original.additionalDetails;
|
|
8578
8677
|
if (typeof additionalDetail === "string") {
|
|
8579
8678
|
try {
|
|
@@ -8583,11 +8682,16 @@ const VendorInbox = props => {
|
|
|
8583
8682
|
additionalDetail = {};
|
|
8584
8683
|
}
|
|
8585
8684
|
}
|
|
8586
|
-
const serviceType = ((
|
|
8685
|
+
const serviceType = ((_additionalDetail2 = additionalDetail) === null || _additionalDetail2 === void 0 ? void 0 : _additionalDetail2.serviceType) || "N/A";
|
|
8587
8686
|
return /*#__PURE__*/React.createElement("div", null, serviceType);
|
|
8588
8687
|
}
|
|
8589
8688
|
}, {
|
|
8590
8689
|
Header: t("ES_FSM_REGISTRY_SELECT_DRIVER"),
|
|
8690
|
+
id: "driver",
|
|
8691
|
+
accessor: row => {
|
|
8692
|
+
var _row$driverData, _row$driver;
|
|
8693
|
+
return ((_row$driverData = row.driverData) === null || _row$driverData === void 0 ? void 0 : _row$driverData.name) || ((_row$driver = row.driver) === null || _row$driver === void 0 ? void 0 : _row$driver.name) || "NA";
|
|
8694
|
+
},
|
|
8591
8695
|
Cell: ({
|
|
8592
8696
|
row
|
|
8593
8697
|
}) => {
|
|
@@ -8608,7 +8712,8 @@ const VendorInbox = props => {
|
|
|
8608
8712
|
}
|
|
8609
8713
|
}, {
|
|
8610
8714
|
Header: t("ES_FSM_REGISTRY_INBOX_ENABLED"),
|
|
8611
|
-
|
|
8715
|
+
id: "status",
|
|
8716
|
+
accessor: row => row.status || "",
|
|
8612
8717
|
Cell: ({
|
|
8613
8718
|
row
|
|
8614
8719
|
}) => {
|
|
@@ -8627,7 +8732,11 @@ const VendorInbox = props => {
|
|
|
8627
8732
|
case "DRIVER":
|
|
8628
8733
|
return [{
|
|
8629
8734
|
Header: t("ES_FSM_REGISTRY_INBOX_USERNAME"),
|
|
8630
|
-
|
|
8735
|
+
id: "userName",
|
|
8736
|
+
accessor: row => {
|
|
8737
|
+
var _row$owner;
|
|
8738
|
+
return ((_row$owner = row.owner) === null || _row$owner === void 0 ? void 0 : _row$owner.userName) || "NA";
|
|
8739
|
+
},
|
|
8631
8740
|
Cell: ({
|
|
8632
8741
|
row
|
|
8633
8742
|
}) => {
|
|
@@ -8636,12 +8745,11 @@ const VendorInbox = props => {
|
|
|
8636
8745
|
className: "link"
|
|
8637
8746
|
}, /*#__PURE__*/React.createElement(Link, {
|
|
8638
8747
|
to: "/digit-ui/employee/vendor/registry/driver-details/" + row.original["id"]
|
|
8639
|
-
}, /*#__PURE__*/React.createElement("div", null, ((_row$original$owner = row.original.owner) === null || _row$original$owner === void 0 ? void 0 : _row$original$owner.userName) || "NA"
|
|
8748
|
+
}, /*#__PURE__*/React.createElement("div", null, ((_row$original$owner = row.original.owner) === null || _row$original$owner === void 0 ? void 0 : _row$original$owner.userName) || "NA"))));
|
|
8640
8749
|
}
|
|
8641
8750
|
}, {
|
|
8642
8751
|
Header: t("ES_FSM_REGISTRY_INBOX_DRIVER_NAME"),
|
|
8643
|
-
|
|
8644
|
-
accessor: "tripDetails",
|
|
8752
|
+
accessor: "name",
|
|
8645
8753
|
Cell: ({
|
|
8646
8754
|
row
|
|
8647
8755
|
}) => {
|
|
@@ -8649,7 +8757,7 @@ const VendorInbox = props => {
|
|
|
8649
8757
|
className: "link"
|
|
8650
8758
|
}, /*#__PURE__*/React.createElement(Link, {
|
|
8651
8759
|
to: "/digit-ui/employee/vendor/registry/driver-details/" + row.original["id"]
|
|
8652
|
-
}, /*#__PURE__*/React.createElement("div", null, row.original.name
|
|
8760
|
+
}, /*#__PURE__*/React.createElement("div", null, row.original.name))));
|
|
8653
8761
|
}
|
|
8654
8762
|
}, {
|
|
8655
8763
|
Header: t("ES_FSM_REGISTRY_INBOX_DATE_DRIVER_CREATION"),
|
|
@@ -8662,6 +8770,11 @@ const VendorInbox = props => {
|
|
|
8662
8770
|
}
|
|
8663
8771
|
}, {
|
|
8664
8772
|
Header: t("ES_FSM_REGISTRY_INBOX_VENDOR_NAME"),
|
|
8773
|
+
id: "vendorName",
|
|
8774
|
+
accessor: row => {
|
|
8775
|
+
var _row$vendorData, _row$vendor2;
|
|
8776
|
+
return ((_row$vendorData = row.vendorData) === null || _row$vendorData === void 0 ? void 0 : _row$vendorData.name) || ((_row$vendor2 = row.vendor) === null || _row$vendor2 === void 0 ? void 0 : _row$vendor2.name) || "NA";
|
|
8777
|
+
},
|
|
8665
8778
|
Cell: ({
|
|
8666
8779
|
row
|
|
8667
8780
|
}) => {
|
|
@@ -8682,7 +8795,8 @@ const VendorInbox = props => {
|
|
|
8682
8795
|
}
|
|
8683
8796
|
}, {
|
|
8684
8797
|
Header: t("ES_FSM_REGISTRY_INBOX_ENABLED"),
|
|
8685
|
-
|
|
8798
|
+
id: "status",
|
|
8799
|
+
accessor: row => row.status || "",
|
|
8686
8800
|
Cell: ({
|
|
8687
8801
|
row
|
|
8688
8802
|
}) => {
|
|
@@ -8749,9 +8863,8 @@ const VendorInbox = props => {
|
|
|
8749
8863
|
getCellProps: cellInfo => {
|
|
8750
8864
|
return {
|
|
8751
8865
|
style: {
|
|
8752
|
-
|
|
8753
|
-
|
|
8754
|
-
fontSize: "16px"
|
|
8866
|
+
padding: "8px 12px",
|
|
8867
|
+
fontSize: "13.5px"
|
|
8755
8868
|
}
|
|
8756
8869
|
};
|
|
8757
8870
|
},
|
|
@@ -9105,7 +9218,7 @@ const SelectServiceType = ({
|
|
|
9105
9218
|
return /*#__PURE__*/React.createElement(Loader, null);
|
|
9106
9219
|
}
|
|
9107
9220
|
if (userType === "employee") {
|
|
9108
|
-
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Dropdown$2, {
|
|
9221
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t(config.label)), /*#__PURE__*/React.createElement(Dropdown$2, {
|
|
9109
9222
|
className: "payment-form-text-input-correction",
|
|
9110
9223
|
isMandatory: config.isMandatory,
|
|
9111
9224
|
selected: serviceTypes,
|
|
@@ -9872,24 +9985,26 @@ const VehicleConfig = (t, disabled = false) => {
|
|
|
9872
9985
|
title: t("ES_FSM_VEHICLE_FORMAT_TIP")
|
|
9873
9986
|
},
|
|
9874
9987
|
error: t("FSM_REGISTRY_INVALID_REGISTRATION_NUMBER"),
|
|
9875
|
-
defaultValue: ""
|
|
9876
|
-
className: "payment-form-text-input-correction"
|
|
9988
|
+
defaultValue: ""
|
|
9877
9989
|
}
|
|
9878
9990
|
}, {
|
|
9879
9991
|
label: "ES_VENDOR_REGISTRY_SERVICE_TYPE",
|
|
9880
9992
|
isMandatory: true,
|
|
9881
9993
|
type: "component",
|
|
9882
|
-
|
|
9883
|
-
hideInEmployee: false,
|
|
9884
|
-
key: "additionalDetails",
|
|
9994
|
+
key: "serviceType",
|
|
9885
9995
|
component: "SelectServiceType",
|
|
9886
9996
|
disable: disabled,
|
|
9997
|
+
populators: {
|
|
9998
|
+
name: "serviceType",
|
|
9999
|
+
defaultValue: {
|
|
10000
|
+
code: "WT",
|
|
10001
|
+
name: "WT",
|
|
10002
|
+
i18nKey: "WT"
|
|
10003
|
+
}
|
|
10004
|
+
},
|
|
9887
10005
|
texts: {
|
|
9888
|
-
|
|
9889
|
-
|
|
9890
|
-
cardText: "CS_COMMON_SELECT_SERVICE",
|
|
9891
|
-
submitBarLabel: "CS_COMMON_NEXT",
|
|
9892
|
-
skipText: "CORE_COMMON_SKIP_CONTINUE"
|
|
10006
|
+
header: "CS_COMMON_CHOOSE_SERVICE_TYPE",
|
|
10007
|
+
submitBarLabel: "CS_COMMON_NEXT"
|
|
9893
10008
|
}
|
|
9894
10009
|
}, {
|
|
9895
10010
|
route: "vehicle",
|
|
@@ -9970,8 +10085,7 @@ const VehicleConfig = (t, disabled = false) => {
|
|
|
9970
10085
|
pattern: /^[A-Za-z]/
|
|
9971
10086
|
},
|
|
9972
10087
|
error: t("FSM_REGISTRY_INVALID_NAME"),
|
|
9973
|
-
defaultValue: ""
|
|
9974
|
-
className: "payment-form-text-input-correction"
|
|
10088
|
+
defaultValue: ""
|
|
9975
10089
|
}
|
|
9976
10090
|
}, {
|
|
9977
10091
|
label: "ES_FSM_REGISTRY_NEW_VEHICLE_OWNER_PHONE",
|
|
@@ -9986,12 +10100,7 @@ const VehicleConfig = (t, disabled = false) => {
|
|
|
9986
10100
|
pattern: /^[6-9]\d{9}$/
|
|
9987
10101
|
},
|
|
9988
10102
|
error: t("FSM_REGISTRY_INVALID_PHONE"),
|
|
9989
|
-
defaultValue: ""
|
|
9990
|
-
className: "payment-form-text-input-correction",
|
|
9991
|
-
labelStyle: {
|
|
9992
|
-
border: "1px solid black",
|
|
9993
|
-
borderRight: "none"
|
|
9994
|
-
}
|
|
10103
|
+
defaultValue: ""
|
|
9995
10104
|
}
|
|
9996
10105
|
}, {
|
|
9997
10106
|
label: "ES_FSM_REGISTRY_NEW_GENDER",
|
|
@@ -10030,8 +10139,7 @@ const VehicleConfig = (t, disabled = false) => {
|
|
|
10030
10139
|
pattern: /^[a-zA-Z0-9+_.-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9.-]+$/
|
|
10031
10140
|
},
|
|
10032
10141
|
error: t("FSM_REGISTRY_INVALID_EMAIL"),
|
|
10033
|
-
defaultValue: ""
|
|
10034
|
-
className: "payment-form-text-input-correction"
|
|
10142
|
+
defaultValue: ""
|
|
10035
10143
|
}
|
|
10036
10144
|
}]
|
|
10037
10145
|
}];
|
|
@@ -10087,6 +10195,11 @@ const AddVehicle = ({
|
|
|
10087
10195
|
});
|
|
10088
10196
|
const [canSubmit, setSubmitValve] = useState(false);
|
|
10089
10197
|
const defaultValues = {
|
|
10198
|
+
serviceType: {
|
|
10199
|
+
code: "WT",
|
|
10200
|
+
name: "WT",
|
|
10201
|
+
i18nKey: "WT"
|
|
10202
|
+
},
|
|
10090
10203
|
tripData: {
|
|
10091
10204
|
noOfTrips: 1,
|
|
10092
10205
|
amountPerTrip: null,
|
|
@@ -10114,7 +10227,7 @@ const AddVehicle = ({
|
|
|
10114
10227
|
setShowToast(null);
|
|
10115
10228
|
};
|
|
10116
10229
|
const onSubmit = data => {
|
|
10117
|
-
var _data$vehicle, _data$vehicle$type, _data$vehicle2, _data$vehicle2$modal, _data$vehicle3, _data$vehicle3$type, _data$
|
|
10230
|
+
var _data$vehicle, _data$vehicle$type, _data$vehicle2, _data$vehicle2$modal, _data$vehicle3, _data$vehicle3$type, _data$serviceType, _data$selectGender;
|
|
10118
10231
|
const registrationNumber = data === null || data === void 0 ? void 0 : data.registrationNumber;
|
|
10119
10232
|
const vehicleType = data === null || data === void 0 ? void 0 : (_data$vehicle = data.vehicle) === null || _data$vehicle === void 0 ? void 0 : (_data$vehicle$type = _data$vehicle.type) === null || _data$vehicle$type === void 0 ? void 0 : _data$vehicle$type.code;
|
|
10120
10233
|
const vehicleModal = data === null || data === void 0 ? void 0 : (_data$vehicle2 = data.vehicle) === null || _data$vehicle2 === void 0 ? void 0 : (_data$vehicle2$modal = _data$vehicle2.modal) === null || _data$vehicle2$modal === void 0 ? void 0 : _data$vehicle2$modal.code;
|
|
@@ -10125,7 +10238,7 @@ const AddVehicle = ({
|
|
|
10125
10238
|
const fitnessValidity = new Date(`${data === null || data === void 0 ? void 0 : data.fitnessValidity}`).getTime();
|
|
10126
10239
|
const ownerName = data === null || data === void 0 ? void 0 : data.ownerName;
|
|
10127
10240
|
const phone = data === null || data === void 0 ? void 0 : data.phone;
|
|
10128
|
-
const additionalDetails = data === null || data === void 0 ? void 0 : (_data$
|
|
10241
|
+
const additionalDetails = data === null || data === void 0 ? void 0 : (_data$serviceType = data.serviceType) === null || _data$serviceType === void 0 ? void 0 : _data$serviceType.code;
|
|
10129
10242
|
const gender = data === null || data === void 0 ? void 0 : (_data$selectGender = data.selectGender) === null || _data$selectGender === void 0 ? void 0 : _data$selectGender.code;
|
|
10130
10243
|
const emailId = data === null || data === void 0 ? void 0 : data.emailId;
|
|
10131
10244
|
const dob = new Date(`${data.dob}`).getTime() || new Date(`1/1/1970`).getTime();
|
|
@@ -10355,7 +10468,6 @@ const VENDORCreate = ({
|
|
|
10355
10468
|
const onSuccess = () => {
|
|
10356
10469
|
clearParams();
|
|
10357
10470
|
queryClient.invalidateQueries("VENDOR_CREATE");
|
|
10358
|
-
queryClient.invalidateQueries("EMP_VENDOR_COMMON_SEARCH");
|
|
10359
10471
|
};
|
|
10360
10472
|
let commonFields = createConfig;
|
|
10361
10473
|
commonFields.forEach(obj => {
|
|
@@ -10703,18 +10815,16 @@ const CloseBtn$1 = props => {
|
|
|
10703
10815
|
const DriverDetails = props => {
|
|
10704
10816
|
var _driverData$5, _driverData$5$employe;
|
|
10705
10817
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
10706
|
-
const state = Digit.ULBService.getStateId();
|
|
10707
10818
|
const {
|
|
10708
10819
|
t
|
|
10709
10820
|
} = useTranslation();
|
|
10710
10821
|
const history = useHistory();
|
|
10711
10822
|
const queryClient = useQueryClient();
|
|
10712
|
-
|
|
10823
|
+
const {
|
|
10713
10824
|
id: dsoId
|
|
10714
10825
|
} = useParams();
|
|
10715
10826
|
const [displayMenu, setDisplayMenu] = useState(false);
|
|
10716
10827
|
const [selectedAction, setSelectedAction] = useState(null);
|
|
10717
|
-
const [config, setCurrentConfig] = useState({});
|
|
10718
10828
|
const [showModal, setShowModal] = useState(false);
|
|
10719
10829
|
const [showToast, setShowToast] = useState(null);
|
|
10720
10830
|
const [vendors, setVendors] = useState([]);
|
|
@@ -10987,14 +11097,8 @@ const DriverDetails = props => {
|
|
|
10987
11097
|
if (isLoading) {
|
|
10988
11098
|
return /*#__PURE__*/React.createElement(Loader, null);
|
|
10989
11099
|
}
|
|
10990
|
-
return
|
|
10991
|
-
|
|
10992
|
-
marginBottom: "16px"
|
|
10993
|
-
}
|
|
10994
|
-
}, t("ES_FSM_REGISTRY_DRIVER_DETAILS")), /*#__PURE__*/React.createElement("div", {
|
|
10995
|
-
style: !isMobile ? {
|
|
10996
|
-
marginLeft: "-15px"
|
|
10997
|
-
} : {}
|
|
11100
|
+
return !isLoading ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
11101
|
+
className: "employee-form-content"
|
|
10998
11102
|
}, /*#__PURE__*/React.createElement(Card, {
|
|
10999
11103
|
style: {
|
|
11000
11104
|
position: "relative"
|
|
@@ -11010,7 +11114,9 @@ const DriverDetails = props => {
|
|
|
11010
11114
|
}
|
|
11011
11115
|
}, 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) => {
|
|
11012
11116
|
var _detail$values2, _detail$values3;
|
|
11013
|
-
return (value === null || value === void 0 ? void 0 : value.type) === "custom" ? /*#__PURE__*/React.createElement(
|
|
11117
|
+
return (value === null || value === void 0 ? void 0 : value.type) === "custom" ? /*#__PURE__*/React.createElement(React.Fragment, {
|
|
11118
|
+
key: index
|
|
11119
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
11014
11120
|
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`
|
|
11015
11121
|
}, /*#__PURE__*/React.createElement("h2", null, t(value.title)), /*#__PURE__*/React.createElement("div", {
|
|
11016
11122
|
className: "value",
|
|
@@ -11085,7 +11191,7 @@ const DriverDetails = props => {
|
|
|
11085
11191
|
}) : null, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
11086
11192
|
label: t("ES_COMMON_TAKE_ACTION"),
|
|
11087
11193
|
onSubmit: () => setDisplayMenu(!displayMenu)
|
|
11088
|
-
}))) : /*#__PURE__*/React.createElement(Loader, null)
|
|
11194
|
+
}))) : /*#__PURE__*/React.createElement(Loader, null);
|
|
11089
11195
|
};
|
|
11090
11196
|
|
|
11091
11197
|
const Heading$2 = props => {
|
|
@@ -11367,7 +11473,7 @@ const VehicleDetails = props => {
|
|
|
11367
11473
|
});
|
|
11368
11474
|
}
|
|
11369
11475
|
if (selectedAction === "ADD_VENDOR") {
|
|
11370
|
-
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(CardText, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$2, {
|
|
11476
|
+
return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(CardText, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$2, {
|
|
11371
11477
|
t: t,
|
|
11372
11478
|
option: vendors,
|
|
11373
11479
|
value: selectedOption,
|
|
@@ -11377,7 +11483,7 @@ const VehicleDetails = props => {
|
|
|
11377
11483
|
}));
|
|
11378
11484
|
}
|
|
11379
11485
|
if (selectedAction === "EDIT_VENDOR") {
|
|
11380
|
-
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(CardText, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$2, {
|
|
11486
|
+
return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(CardText, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$2, {
|
|
11381
11487
|
t: t,
|
|
11382
11488
|
option: vendors,
|
|
11383
11489
|
value: selectedOption,
|
|
@@ -11387,7 +11493,6 @@ const VehicleDetails = props => {
|
|
|
11387
11493
|
}));
|
|
11388
11494
|
}
|
|
11389
11495
|
};
|
|
11390
|
-
const isMobile = window.Digit.Utils.browser.isMobile();
|
|
11391
11496
|
const modalHeading = () => {
|
|
11392
11497
|
switch (selectedAction) {
|
|
11393
11498
|
case "DELETE":
|
|
@@ -11402,15 +11507,8 @@ const VehicleDetails = props => {
|
|
|
11402
11507
|
if (isLoading) {
|
|
11403
11508
|
return /*#__PURE__*/React.createElement(Loader, null);
|
|
11404
11509
|
}
|
|
11405
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, !isLoading ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
11406
|
-
|
|
11407
|
-
marginBottom: "16px"
|
|
11408
|
-
}
|
|
11409
|
-
}, t("ES_FSM_REGISTRY_VEHICLE_DETAILS")), /*#__PURE__*/React.createElement("div", {
|
|
11410
|
-
style: !isMobile ? {
|
|
11411
|
-
marginLeft: "-15px"
|
|
11412
|
-
} : {}
|
|
11413
|
-
}, /*#__PURE__*/React.createElement(Card, {
|
|
11510
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !isLoading ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Card, {
|
|
11511
|
+
className: "vehicle-details-card",
|
|
11414
11512
|
style: {
|
|
11415
11513
|
position: "relative"
|
|
11416
11514
|
}
|
|
@@ -11425,7 +11523,7 @@ const VehicleDetails = props => {
|
|
|
11425
11523
|
}
|
|
11426
11524
|
}, 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) => {
|
|
11427
11525
|
var _detail$values2, _detail$values3;
|
|
11428
|
-
return (value === null || value === void 0 ? void 0 : value.type) === "custom" ? /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
11526
|
+
return (value === null || value === void 0 ? void 0 : value.type) === "custom" ? /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement("div", {
|
|
11429
11527
|
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`
|
|
11430
11528
|
}, /*#__PURE__*/React.createElement("h2", null, t(value.title)), /*#__PURE__*/React.createElement("div", {
|
|
11431
11529
|
className: "value",
|
|
@@ -11471,7 +11569,7 @@ const VehicleDetails = props => {
|
|
|
11471
11569
|
} : {}
|
|
11472
11570
|
});
|
|
11473
11571
|
})));
|
|
11474
|
-
}))
|
|
11572
|
+
})), showModal && /*#__PURE__*/React.createElement(Modal, {
|
|
11475
11573
|
headerBarMain: /*#__PURE__*/React.createElement(Heading$2, {
|
|
11476
11574
|
label: t(modalHeading())
|
|
11477
11575
|
}),
|
|
@@ -11519,7 +11617,6 @@ const SelectVehicleType = ({
|
|
|
11519
11617
|
data: vehicleData,
|
|
11520
11618
|
isLoading: vehicleLoading
|
|
11521
11619
|
} = Digit.Hooks.wt.useWTMDMS(stateId, "Vehicle", "VehicleMakeModel");
|
|
11522
|
-
console.log("vehicleData", vehicleData);
|
|
11523
11620
|
const {
|
|
11524
11621
|
data: serviceTypeData,
|
|
11525
11622
|
isLoading: serviceLoading
|
|
@@ -11597,30 +11694,24 @@ const SelectVehicleType = ({
|
|
|
11597
11694
|
if (!vehicleData || !serviceTypeData) {
|
|
11598
11695
|
return /*#__PURE__*/React.createElement("div", null, t("ERROR_FETCHING_DATA"));
|
|
11599
11696
|
}
|
|
11600
|
-
return /*#__PURE__*/React.createElement(
|
|
11601
|
-
className: "card-label-smaller"
|
|
11602
|
-
}, t("ES_FSM_REGISTRY_VEHICLE_MODEL")), /*#__PURE__*/React.createElement(Dropdown$2, {
|
|
11697
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("ES_FSM_REGISTRY_VEHICLE_MODEL")), /*#__PURE__*/React.createElement(Dropdown$2, {
|
|
11603
11698
|
className: "form-field",
|
|
11604
11699
|
selected: selectedModal,
|
|
11605
11700
|
option: modals,
|
|
11606
11701
|
select: selectModal,
|
|
11607
11702
|
optionKey: "name",
|
|
11608
11703
|
t: t
|
|
11609
|
-
})), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
11610
|
-
className: "card-label-smaller"
|
|
11611
|
-
}, t("ES_FSM_REGISTRY_VEHICLE_TYPE")), /*#__PURE__*/React.createElement(Dropdown$2, {
|
|
11704
|
+
})), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("ES_FSM_REGISTRY_VEHICLE_TYPE")), /*#__PURE__*/React.createElement(Dropdown$2, {
|
|
11612
11705
|
className: "form-field",
|
|
11613
11706
|
selected: selectedType,
|
|
11614
11707
|
option: types,
|
|
11615
11708
|
select: selectType,
|
|
11616
11709
|
optionKey: "name",
|
|
11617
11710
|
t: t
|
|
11618
|
-
})), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
11619
|
-
className: "card-label-smaller"
|
|
11620
|
-
}, t("ES_FSM_REGISTRY_VEHICLE_CAPACITY")), /*#__PURE__*/React.createElement(TextInput, {
|
|
11711
|
+
})), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("ES_FSM_REGISTRY_VEHICLE_CAPACITY")), /*#__PURE__*/React.createElement(TextInput, {
|
|
11621
11712
|
className: "",
|
|
11622
11713
|
textInputStyle: {
|
|
11623
|
-
width: "
|
|
11714
|
+
width: "100%"
|
|
11624
11715
|
},
|
|
11625
11716
|
value: selectedCapacity,
|
|
11626
11717
|
disable: true
|