@djb25/digit-ui-module-vendor 1.0.16 → 1.0.17

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.
@@ -1,4 +1,4 @@
1
- import React, { useEffect, useMemo, useCallback, useState, Fragment as Fragment$1 } from 'react';
1
+ import React, { useEffect, useMemo, useCallback, useState, Fragment } from 'react';
2
2
  import { useTranslation } from 'react-i18next';
3
3
  import { useParams, useLocation, Switch, Link, useHistory, 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, CardLabel, Tooltip, TextInput, LabelFieldPair, UploadFile, CardSubHeader, CardText, RadioOrSelect, ShippingTruck, CheckBox, RadioButtons, CloseSvg, Localities, RemoveableTag, ActionBar, ApplyFilterBar, AddIcon, Menu, Label, LinkLabel, ToggleSwitch, CardSectionHeader, Row, EditIcon, DeleteIcon, Modal, InfoIcon, CardHeader, StatusTable, LinkButton, Banner } from '@djb25/digit-ui-react-components';
@@ -404,18 +404,18 @@ const EmployeeApp = ({
404
404
  })))
405
405
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
406
406
  path: `${path}/registry/additionaldetails`,
407
- component: renderWithLayout(props => /*#__PURE__*/React.createElement(LayoutWrapper, {
407
+ component: props => /*#__PURE__*/React.createElement(LayoutWrapper, {
408
408
  layoutClass: "normal"
409
409
  }, /*#__PURE__*/React.createElement(VendorCreate, Object.assign({}, props, {
410
410
  parentRoute: path
411
- }))), layouts.action)
411
+ })))
412
412
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
413
413
  path: `${path}/registry/driver-details/:id`,
414
- component: renderWithLayout(props => /*#__PURE__*/React.createElement(LayoutWrapper, {
414
+ component: props => /*#__PURE__*/React.createElement(LayoutWrapper, {
415
415
  layoutClass: "action"
416
416
  }, /*#__PURE__*/React.createElement(DriverDetails, Object.assign({}, props, {
417
417
  parentRoute: path
418
- }))).layouts.action)
418
+ })))
419
419
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
420
420
  path: `${path}/common-search/:id`,
421
421
  component: props => /*#__PURE__*/React.createElement(LayoutWrapper, {
@@ -446,13 +446,6 @@ const EmployeeApp = ({
446
446
  })))
447
447
  })))));
448
448
  };
449
- const renderWithLayout = (Component, layoutClass) => routeProps => /*#__PURE__*/React.createElement("div", {
450
- className: layoutClass
451
- }, /*#__PURE__*/React.createElement(Component, routeProps));
452
- const layouts = {
453
- normal: "employee-form",
454
- action: "employee-form employee-form-content-with-action-bar"
455
- };
456
449
 
457
450
  const VENDORCard = () => {
458
451
  const {
@@ -9946,9 +9939,7 @@ const EditVendorDetails = props => {
9946
9939
  marginBottom: "16px",
9947
9940
  marginTop: "32px"
9948
9941
  }
9949
- }, t(detail.title)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
9950
- className: "formcomposer-section-grid"
9951
- }, detail === null || detail === void 0 ? void 0 : (_detail$values = detail.values) === null || _detail$values === void 0 ? void 0 : _detail$values.map((value, index) => {
9942
+ }, t(detail.title)), /*#__PURE__*/React.createElement("div", null, detail === null || detail === void 0 ? void 0 : (_detail$values = detail.values) === null || _detail$values === void 0 ? void 0 : _detail$values.map((value, index) => {
9952
9943
  var _detail$values2;
9953
9944
  if (value.title === "ES_FSM_REGISTRY_DETAILS_ADDITIONAL_DETAILS") {
9954
9945
  var _vendorAdditionalData, _vendorAdditionalData2;
@@ -10058,7 +10049,7 @@ const EditVendorDetails = props => {
10058
10049
  marginLeft: "16px"
10059
10050
  },
10060
10051
  onClick: () => onActionSelect(detail.type === "ES_FSM_REGISTRY_DETAILS_TYPE_DRIVER" ? "ADD_DRIVER" : "ADD_VEHICLE")
10061
- }, t(`${detail.type}_ADD`)))));
10052
+ }, t(`${detail.type}_ADD`))));
10062
10053
  })), showModal && /*#__PURE__*/React.createElement(Modal, {
10063
10054
  headerBarMain: /*#__PURE__*/React.createElement(Heading, {
10064
10055
  label: t(selectedAction === "DELETE" ? "ES_FSM_REGISTRY_DELETE_POPUP_HEADER" : selectedAction === "ADD_VEHICLE" ? "ES_FSM_REGISTRY_ADD_VEHICLE_POPUP_HEADER" : "ES_FSM_REGISTRY_ADD_DRIVER_POPUP_HEADER")
@@ -11213,7 +11204,7 @@ const DriverDetails = props => {
11213
11204
  });
11214
11205
  }
11215
11206
  if (selectedAction === "ADD_VENDOR") {
11216
- return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(CardText, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$2, {
11207
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardText, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$2, {
11217
11208
  t: t,
11218
11209
  option: vendors,
11219
11210
  value: selectedOption,
@@ -11223,7 +11214,7 @@ const DriverDetails = props => {
11223
11214
  }));
11224
11215
  }
11225
11216
  if (selectedAction === "EDIT_VENDOR") {
11226
- return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(CardText, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$2, {
11217
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardText, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$2, {
11227
11218
  t: t,
11228
11219
  option: vendors,
11229
11220
  value: selectedOption,
@@ -11613,7 +11604,7 @@ const VehicleDetails = props => {
11613
11604
  });
11614
11605
  }
11615
11606
  if (selectedAction === "ADD_VENDOR") {
11616
- return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(CardText, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$2, {
11607
+ return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(CardText, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$2, {
11617
11608
  t: t,
11618
11609
  option: vendors,
11619
11610
  value: selectedOption,
@@ -11623,7 +11614,7 @@ const VehicleDetails = props => {
11623
11614
  }));
11624
11615
  }
11625
11616
  if (selectedAction === "EDIT_VENDOR") {
11626
- return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(CardText, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$2, {
11617
+ return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(CardText, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$2, {
11627
11618
  t: t,
11628
11619
  option: vendors,
11629
11620
  value: selectedOption,
@@ -11665,7 +11656,7 @@ const VehicleDetails = props => {
11665
11656
  }
11666
11657
  }, 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) => {
11667
11658
  var _detail$values2, _detail$values3;
11668
- return (value === null || value === void 0 ? void 0 : value.type) === "custom" ? /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement("div", {
11659
+ return (value === null || value === void 0 ? void 0 : value.type) === "custom" ? /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
11669
11660
  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`
11670
11661
  }, /*#__PURE__*/React.createElement("h2", null, t(value.title)), /*#__PURE__*/React.createElement("div", {
11671
11662
  className: "value",