@djb25/digit-ui-module-wt 1.0.20 → 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.
@@ -1,4 +1,4 @@
1
- import { TickMark, ArrowDown, MobileNumber, CardLabelError, TextInput, Dropdown, DatePicker, SubmitBar, Card, Table, Loader, Toast, AppContainer, ModuleHeader, ArrowLeft, PrivateRoute, HomeIcon, KeyNote, Modal, CardHeader, CardText, FormStep, CardLabel, RadioButtons, UploadFile, TextArea, CheckBox, CardSubHeader, StatusTable, Row, GenericFileIcon, LinkButton, EditIcon, Banner, CHBIcon, EmployeeModuleCard, CloseSvg, Label, LinkLabel, ActionBar, DetailsCard, SearchAction, FilterAction, PopUp, ShippingTruck, CustomNameDropdown, MultiSelectDropdown, LabelFieldPair, AddIcon, Menu, Header, TelePhone, DisplayPhotos, CardSectionHeader, CheckPoint, ConnectingCheckPoints, MultiLink, Localities, RemoveableTag, FormComposer, PDFSvg, MultiUploadWrapper, Close as Close$g, BreakLine, InfoBannerIcon, ViewsIcon, ButtonSelector, LocationIcon, CitizenHomeCard, PTIcon, ApplicantDetails, AddressDetails } from '@djb25/digit-ui-react-components';
1
+ import { TickMark, ArrowDown, MobileNumber, CardLabelError, TextInput, Dropdown, DatePicker, SubmitBar, Card, Table, Loader, Toast, AppContainer, ModuleHeader, ArrowLeft, PrivateRoute, HomeIcon, KeyNote, Modal, CardHeader, FormStep, CardLabel, RadioButtons, UploadFile, TextArea, CheckBox, CardSubHeader, StatusTable, Row, GenericFileIcon, LinkButton, EditIcon, Banner, CHBIcon, EmployeeModuleCard, CloseSvg, Label, LinkLabel, ActionBar, DetailsCard, SearchAction, FilterAction, PopUp, ShippingTruck, CustomNameDropdown, MultiSelectDropdown, LabelFieldPair, AddIcon, Menu, Header, TelePhone, DisplayPhotos, CardSectionHeader, CheckPoint, ConnectingCheckPoints, MultiLink, Localities, RemoveableTag, FormComposer, PDFSvg, MultiUploadWrapper, Close as Close$g, BreakLine, InfoBannerIcon, ViewsIcon, ButtonSelector, LocationIcon, CitizenHomeCard, PTIcon, ApplicantDetails, AddressDetails } from '@djb25/digit-ui-react-components';
2
2
  import React, { useState, useMemo, useCallback, useEffect, Fragment, useRef } from 'react';
3
3
  import { useTranslation } from 'react-i18next';
4
4
  import { useLocation, useRouteMatch, useHistory, Switch, Route, Redirect, Link, useParams } from 'react-router-dom';
@@ -355,12 +355,12 @@ const WTCreate = () => {
355
355
  const WTAcknowledgement = (_Digit2 = Digit) === null || _Digit2 === void 0 ? void 0 : (_Digit2$ComponentRegi = _Digit2.ComponentRegistryService) === null || _Digit2$ComponentRegi === void 0 ? void 0 : _Digit2$ComponentRegi.getComponent("WTAcknowledgement");
356
356
  const MTAcknowledgement = (_Digit3 = Digit) === null || _Digit3 === void 0 ? void 0 : (_Digit3$ComponentRegi = _Digit3.ComponentRegistryService) === null || _Digit3$ComponentRegi === void 0 ? void 0 : _Digit3$ComponentRegi.getComponent("MTAcknowledgement");
357
357
  const TPAcknowledgement = (_Digit4 = Digit) === null || _Digit4 === void 0 ? void 0 : (_Digit4$ComponentRegi = _Digit4.ComponentRegistryService) === null || _Digit4$ComponentRegi === void 0 ? void 0 : _Digit4$ComponentRegi.getComponent("TPAcknowledgement");
358
- console.log(config);
359
358
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
360
359
  className: "employee-form-section-wrapper"
361
- }, !pathname.includes("/info") && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(VerticalTimeline, {
362
- config: config
363
- })), /*#__PURE__*/React.createElement("div", {
360
+ }, !pathname.includes("/info") && /*#__PURE__*/React.createElement(VerticalTimeline, {
361
+ config: config,
362
+ showFinalStep: true
363
+ }), /*#__PURE__*/React.createElement("div", {
364
364
  className: "employee-form-section"
365
365
  }, /*#__PURE__*/React.createElement(Switch, null, config.map((routeObj, index) => {
366
366
  var _userDetails$user;
@@ -1555,13 +1555,14 @@ const InfoPage = ({
1555
1555
  className: "search-form-wrapper",
1556
1556
  style: {
1557
1557
  flexDirection: "column",
1558
- gap: "12px"
1558
+ gap: "12px",
1559
+ justifyContent: "flex-start"
1559
1560
  }
1560
- }, moduleKey && /*#__PURE__*/React.createElement(CardHeader, null, t(moduleKey)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardText, {
1561
+ }, moduleKey && /*#__PURE__*/React.createElement(CardHeader, null, t(moduleKey)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", {
1561
1562
  className: "primaryColor"
1562
- }, t("SV_DOC_REQ_SCREEN_SUB_HEADER")), /*#__PURE__*/React.createElement(CardText, {
1563
+ }, t("SV_DOC_REQ_SCREEN_SUB_HEADER")), /*#__PURE__*/React.createElement("p", {
1563
1564
  className: "primaryColor"
1564
- }, t("SV_DOC_REQ_SCREEN_TEXT")), /*#__PURE__*/React.createElement(CardText, {
1565
+ }, t("SV_DOC_REQ_SCREEN_TEXT")), /*#__PURE__*/React.createElement("p", {
1565
1566
  className: "primaryColor"
1566
1567
  }, t("SV_DOC_REQ_SCREEN_SUB_TEXT"))), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(SubmitBar, {
1567
1568
  label: t("COMMON_NEXT"),
@@ -1605,7 +1606,7 @@ const RequestDetails = ({
1605
1606
  const [error, setError] = useState(null);
1606
1607
  const tenantId = Digit.ULBService.getStateId();
1607
1608
  const inputStyles = {
1608
- width: user.type === "EMPLOYEE" ? "100%" : "100%"
1609
+ width: user.type === "EMPcommonConfigLOYEE" ? "100%" : "100%"
1609
1610
  };
1610
1611
  const {
1611
1612
  data: VehicleType
@@ -1767,8 +1768,9 @@ const RequestDetails = ({
1767
1768
  config: config,
1768
1769
  onSelect: goNext,
1769
1770
  t: t,
1770
- isDisabled: !tankerType || !deliveryDate || !tankerQuantity || !waterQuantity || !deliveryTime || !description || !waterType
1771
- }, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WT_TANKER_TYPE")}`, " ", /*#__PURE__*/React.createElement("span", {
1771
+ isDisabled: !tankerType || !deliveryDate || !tankerQuantity || !waterQuantity || !deliveryTime || !description || !waterType,
1772
+ className: "card-form-container"
1773
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WT_TANKER_TYPE")}`, " ", /*#__PURE__*/React.createElement("span", {
1772
1774
  className: "astericColor"
1773
1775
  }, "*")), /*#__PURE__*/React.createElement(RadioButtons, {
1774
1776
  t: t,
@@ -1788,7 +1790,7 @@ const RequestDetails = ({
1788
1790
  onSelect: settankerType,
1789
1791
  labelKey: "i18nKey",
1790
1792
  isPTFlow: true
1791
- }), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WT_WATER_TYPE")}`, " ", /*#__PURE__*/React.createElement("span", {
1793
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WT_WATER_TYPE")}`, " ", /*#__PURE__*/React.createElement("span", {
1792
1794
  className: "astericColor"
1793
1795
  }, "*")), /*#__PURE__*/React.createElement(Dropdown, {
1794
1796
  className: "form-field",
@@ -2267,7 +2269,9 @@ const WTAcknowledgement = ({
2267
2269
  }, tenantInfo, t);
2268
2270
  Digit.Utils.pdf.generate(data);
2269
2271
  };
2270
- return mutation.isLoading || mutation.isIdle ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(BannerPicker, {
2272
+ return mutation.isLoading || mutation.isIdle ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement(Card, {
2273
+ className: "vehicle-details-card"
2274
+ }, /*#__PURE__*/React.createElement(BannerPicker, {
2271
2275
  t: t,
2272
2276
  data: mutation.data,
2273
2277
  isSuccess: mutation.isSuccess,
@@ -11766,7 +11770,7 @@ const LocalityModal = ({
11766
11770
  tenantId,
11767
11771
  modalMode
11768
11772
  }) => {
11769
- var _initialValues$addres2;
11773
+ var _initialValues$fillin3, _initialValues$addres2;
11770
11774
  const isView = modalMode === "VIEW";
11771
11775
  const isUpdate = modalMode === "UPDATE";
11772
11776
  const [selectedHierarchy, setSelectedHierarchy] = useState(null);
@@ -11809,9 +11813,10 @@ const LocalityModal = ({
11809
11813
  return flattenLocalities(selectedHierarchy.boundary);
11810
11814
  }, [selectedHierarchy]);
11811
11815
  React.useEffect(() => {
11812
- var _initialValues$addres;
11813
- if (structuredLocalities.length > 0 && initialValues !== null && initialValues !== void 0 && (_initialValues$addres = initialValues.address) !== null && _initialValues$addres !== void 0 && _initialValues$addres.locality && (isView || isUpdate)) {
11814
- const currentLocalityCodes = initialValues.address.locality.split(",").map(s => s.trim());
11816
+ var _initialValues$fillin, _initialValues$addres;
11817
+ if (structuredLocalities.length > 0 && ((initialValues === null || initialValues === void 0 ? void 0 : (_initialValues$fillin = initialValues.fillingPointLocalityCodes) === null || _initialValues$fillin === void 0 ? void 0 : _initialValues$fillin.length) > 0 || initialValues !== null && initialValues !== void 0 && (_initialValues$addres = initialValues.address) !== null && _initialValues$addres !== void 0 && _initialValues$addres.locality) && (isView || isUpdate)) {
11818
+ var _initialValues$fillin2;
11819
+ const currentLocalityCodes = (initialValues === null || initialValues === void 0 ? void 0 : (_initialValues$fillin2 = initialValues.fillingPointLocalityCodes) === null || _initialValues$fillin2 === void 0 ? void 0 : _initialValues$fillin2.length) > 0 ? initialValues.fillingPointLocalityCodes : initialValues.address.locality.split(",").map(s => s.trim());
11815
11820
  const preSelected = structuredLocalities.filter(loc => currentLocalityCodes.includes(loc.code)).map(loc => [loc.i18nKey, loc]);
11816
11821
  setSelectedLocality(preSelected);
11817
11822
  }
@@ -11896,7 +11901,7 @@ const LocalityModal = ({
11896
11901
  fontWeight: "600",
11897
11902
  marginBottom: "8px"
11898
11903
  }
11899
- }, (initialValues === null || initialValues === void 0 ? void 0 : (_initialValues$addres2 = initialValues.address) === null || _initialValues$addres2 === void 0 ? void 0 : _initialValues$addres2.locality) || "NA")), !isView ? /*#__PURE__*/React.createElement("div", {
11904
+ }, (initialValues === null || initialValues === void 0 ? void 0 : (_initialValues$fillin3 = initialValues.fillingPointLocalityCodes) === null || _initialValues$fillin3 === void 0 ? void 0 : _initialValues$fillin3.length) > 0 ? initialValues.fillingPointLocalityCodes.join(", ") : (initialValues === null || initialValues === void 0 ? void 0 : (_initialValues$addres2 = initialValues.address) === null || _initialValues$addres2 === void 0 ? void 0 : _initialValues$addres2.locality) || "NA")), !isView ? /*#__PURE__*/React.createElement("div", {
11900
11905
  style: {
11901
11906
  marginBottom: "16px"
11902
11907
  }
@@ -12277,26 +12282,26 @@ const SearchFillingPointAddress = () => {
12277
12282
  id: "eeName"
12278
12283
  }, {
12279
12284
  Header: t("WT_LOCALITY"),
12280
- id: "locality",
12281
12285
  Cell: ({
12282
12286
  row
12283
12287
  }) => {
12284
- var _row$original, _row$original$address;
12288
+ var _row$original, _row$original$filling5, _row$original2, _row$original2$addres;
12289
+ const localities = ((_row$original = row.original) === null || _row$original === void 0 ? void 0 : (_row$original$filling5 = _row$original.fillingPointLocalityCodes) === null || _row$original$filling5 === void 0 ? void 0 : _row$original$filling5.length) > 0 ? row.original.fillingPointLocalityCodes.join(", ") : ((_row$original2 = row.original) === null || _row$original2 === void 0 ? void 0 : (_row$original2$addres = _row$original2.address) === null || _row$original2$addres === void 0 ? void 0 : _row$original2$addres.locality) || "NA";
12285
12290
  return /*#__PURE__*/React.createElement("div", {
12286
12291
  style: {
12287
12292
  display: "flex",
12288
12293
  alignItems: "center",
12289
12294
  gap: "8px"
12290
12295
  }
12291
- }, /*#__PURE__*/React.createElement("span", null, ((_row$original = row.original) === null || _row$original === void 0 ? void 0 : (_row$original$address = _row$original.address) === null || _row$original$address === void 0 ? void 0 : _row$original$address.locality) || "NA"));
12296
+ }, /*#__PURE__*/React.createElement("span", null, localities));
12292
12297
  }
12293
12298
  }, {
12294
12299
  Header: t("WT_ADD_LOCALITY"),
12295
12300
  Cell: ({
12296
12301
  row
12297
12302
  }) => {
12298
- var _row$original2, _row$original2$addres, _row$original3, _row$original3$addres;
12299
- const hasLocality = ((_row$original2 = row.original) === null || _row$original2 === void 0 ? void 0 : (_row$original2$addres = _row$original2.address) === null || _row$original2$addres === void 0 ? void 0 : _row$original2$addres.locality) && ((_row$original3 = row.original) === null || _row$original3 === void 0 ? void 0 : (_row$original3$addres = _row$original3.address) === null || _row$original3$addres === void 0 ? void 0 : _row$original3$addres.locality) !== "NA";
12303
+ var _row$original3, _row$original3$fillin, _row$original4, _row$original4$addres, _row$original5, _row$original5$addres;
12304
+ const hasLocality = ((_row$original3 = row.original) === null || _row$original3 === void 0 ? void 0 : (_row$original3$fillin = _row$original3.fillingPointLocalityCodes) === null || _row$original3$fillin === void 0 ? void 0 : _row$original3$fillin.length) > 0 || ((_row$original4 = row.original) === null || _row$original4 === void 0 ? void 0 : (_row$original4$addres = _row$original4.address) === null || _row$original4$addres === void 0 ? void 0 : _row$original4$addres.locality) && ((_row$original5 = row.original) === null || _row$original5 === void 0 ? void 0 : (_row$original5$addres = _row$original5.address) === null || _row$original5$addres === void 0 ? void 0 : _row$original5$addres.locality) !== "NA";
12300
12305
  return /*#__PURE__*/React.createElement("div", {
12301
12306
  style: {
12302
12307
  display: "flex",