@djb25/digit-ui-module-wt 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 +746 -332
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TickMark, ArrowDown, MobileNumber, CardLabelError, TextInput, Dropdown, DatePicker, SubmitBar, Card, Table, Loader, Toast, AppContainer, BackButton, PrivateRoute, KeyNote, Modal, CardHeader, CardText, FormStep, CardLabel, RadioButtons, UploadFile, TextArea, CheckBox, CardSubHeader, StatusTable, Row, GenericFileIcon, LinkButton, EditIcon, Banner, CHBIcon, EmployeeModuleCard, HomeIcon, CloseSvg, Label, LinkLabel, ActionBar, DetailsCard, SearchAction, FilterAction, PopUp, ShippingTruck, LabelFieldPair,
|
|
1
|
+
import { TickMark, ArrowDown, MobileNumber, CardLabelError, TextInput, Dropdown, DatePicker, SubmitBar, Card, Table, Loader, Toast, AppContainer, BackButton, PrivateRoute, KeyNote, Modal, CardHeader, CardText, FormStep, CardLabel, RadioButtons, UploadFile, TextArea, CheckBox, CardSubHeader, StatusTable, Row, GenericFileIcon, LinkButton, EditIcon, Banner, CHBIcon, EmployeeModuleCard, HomeIcon, CloseSvg, Label, LinkLabel, ActionBar, DetailsCard, SearchAction, FilterAction, PopUp, ShippingTruck, LabelFieldPair, AddIcon, Menu, ModuleHeader, ArrowLeft, 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, useHistory, useRouteMatch, Switch, Route, Redirect, Link, useParams } from 'react-router-dom';
|
|
@@ -573,73 +573,79 @@ const treePruningPayload = data => {
|
|
|
573
573
|
return formdata;
|
|
574
574
|
};
|
|
575
575
|
const fillingPointPayload = data => {
|
|
576
|
-
var _data$owner11, _data$owner12, _data$owner13, _data$owner14, _data$owner15, _data$owner16, _data$owner17, _data$owner18, _data$owner19, _data$
|
|
577
|
-
|
|
578
|
-
|
|
576
|
+
var _Digit$UserService$ge, _Digit$UserService$ge2, _data$owner11, _data$owner12, _data$owner13, _data$owner14, _data$owner15, _data$owner16, _data$owner17, _data$owner18, _data$owner19, _data$owner20, _data$owner21, _data$address36, _data$address37, _data$address38, _data$address39, _data$address40, _data$address41, _data$address41$city, _data$address42, _data$address43, _data$address44, _data$address44$city, _data$address45, _data$address46, _data$address46$local, _data$address47, _data$address48, _data$address48$local, _data$address49, _data$address50, _data$address51;
|
|
577
|
+
return {
|
|
578
|
+
RequestInfo: {
|
|
579
|
+
userInfo: {
|
|
580
|
+
uuid: ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : (_Digit$UserService$ge2 = _Digit$UserService$ge.info) === null || _Digit$UserService$ge2 === void 0 ? void 0 : _Digit$UserService$ge2.uuid) || "user-123"
|
|
581
|
+
}
|
|
582
|
+
},
|
|
583
|
+
fillingPoints: [{
|
|
584
|
+
id: data === null || data === void 0 ? void 0 : data.id,
|
|
585
|
+
bookingId: data === null || data === void 0 ? void 0 : data.bookingId,
|
|
579
586
|
tenantId: data === null || data === void 0 ? void 0 : data.tenantId,
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
eeEmailId: data === null || data === void 0 ? void 0 : (_data$owner19 = data.owner) === null || _data$owner19 === void 0 ? void 0 : _data$owner19.eeEmailId,
|
|
592
|
-
type: "FILLING-POINT"
|
|
593
|
-
},
|
|
587
|
+
fillingPointName: data === null || data === void 0 ? void 0 : (_data$owner11 = data.owner) === null || _data$owner11 === void 0 ? void 0 : _data$owner11.fillingPointName,
|
|
588
|
+
emergencyName: data === null || data === void 0 ? void 0 : (_data$owner12 = data.owner) === null || _data$owner12 === void 0 ? void 0 : _data$owner12.emergencyName,
|
|
589
|
+
eeName: data === null || data === void 0 ? void 0 : (_data$owner13 = data.owner) === null || _data$owner13 === void 0 ? void 0 : _data$owner13.eeName,
|
|
590
|
+
eeEmail: data === null || data === void 0 ? void 0 : (_data$owner14 = data.owner) === null || _data$owner14 === void 0 ? void 0 : _data$owner14.eeEmail,
|
|
591
|
+
eeMobile: data === null || data === void 0 ? void 0 : (_data$owner15 = data.owner) === null || _data$owner15 === void 0 ? void 0 : _data$owner15.eeMobile,
|
|
592
|
+
aeName: data === null || data === void 0 ? void 0 : (_data$owner16 = data.owner) === null || _data$owner16 === void 0 ? void 0 : _data$owner16.aeName,
|
|
593
|
+
aeEmail: data === null || data === void 0 ? void 0 : (_data$owner17 = data.owner) === null || _data$owner17 === void 0 ? void 0 : _data$owner17.aeEmail,
|
|
594
|
+
aeMobile: data === null || data === void 0 ? void 0 : (_data$owner18 = data.owner) === null || _data$owner18 === void 0 ? void 0 : _data$owner18.aeMobile,
|
|
595
|
+
jeName: data === null || data === void 0 ? void 0 : (_data$owner19 = data.owner) === null || _data$owner19 === void 0 ? void 0 : _data$owner19.jeName,
|
|
596
|
+
jeEmail: data === null || data === void 0 ? void 0 : (_data$owner20 = data.owner) === null || _data$owner20 === void 0 ? void 0 : _data$owner20.jeEmail,
|
|
597
|
+
jeMobile: data === null || data === void 0 ? void 0 : (_data$owner21 = data.owner) === null || _data$owner21 === void 0 ? void 0 : _data$owner21.jeMobile,
|
|
594
598
|
address: {
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
longitude: data === null || data === void 0 ? void 0 : (_data$address54 = data.address) === null || _data$address54 === void 0 ? void 0 : _data$address54.longitude
|
|
599
|
+
houseNo: data === null || data === void 0 ? void 0 : (_data$address36 = data.address) === null || _data$address36 === void 0 ? void 0 : _data$address36.houseNo,
|
|
600
|
+
streetName: data === null || data === void 0 ? void 0 : (_data$address37 = data.address) === null || _data$address37 === void 0 ? void 0 : _data$address37.streetName,
|
|
601
|
+
addressLine1: data === null || data === void 0 ? void 0 : (_data$address38 = data.address) === null || _data$address38 === void 0 ? void 0 : _data$address38.addressLine1,
|
|
602
|
+
addressLine2: data === null || data === void 0 ? void 0 : (_data$address39 = data.address) === null || _data$address39 === void 0 ? void 0 : _data$address39.addressLine2,
|
|
603
|
+
landmark: data === null || data === void 0 ? void 0 : (_data$address40 = data.address) === null || _data$address40 === void 0 ? void 0 : _data$address40.landmark,
|
|
604
|
+
city: (data === null || data === void 0 ? void 0 : (_data$address41 = data.address) === null || _data$address41 === void 0 ? void 0 : (_data$address41$city = _data$address41.city) === null || _data$address41$city === void 0 ? void 0 : _data$address41$city.name) || (data === null || data === void 0 ? void 0 : (_data$address42 = data.address) === null || _data$address42 === void 0 ? void 0 : _data$address42.city) || "",
|
|
605
|
+
cityCode: (data === null || data === void 0 ? void 0 : (_data$address43 = data.address) === null || _data$address43 === void 0 ? void 0 : _data$address43.cityCode) || (data === null || data === void 0 ? void 0 : (_data$address44 = data.address) === null || _data$address44 === void 0 ? void 0 : (_data$address44$city = _data$address44.city) === null || _data$address44$city === void 0 ? void 0 : _data$address44$city.code) || "",
|
|
606
|
+
locality: (data === null || data === void 0 ? void 0 : (_data$address45 = data.address) === null || _data$address45 === void 0 ? void 0 : _data$address45.localityCode) || (data === null || data === void 0 ? void 0 : (_data$address46 = data.address) === null || _data$address46 === void 0 ? void 0 : (_data$address46$local = _data$address46.locality) === null || _data$address46$local === void 0 ? void 0 : _data$address46$local.code) || "",
|
|
607
|
+
localityCode: (data === null || data === void 0 ? void 0 : (_data$address47 = data.address) === null || _data$address47 === void 0 ? void 0 : _data$address47.localityCode) || (data === null || data === void 0 ? void 0 : (_data$address48 = data.address) === null || _data$address48 === void 0 ? void 0 : (_data$address48$local = _data$address48.locality) === null || _data$address48$local === void 0 ? void 0 : _data$address48$local.code) || "",
|
|
608
|
+
pincode: data === null || data === void 0 ? void 0 : (_data$address49 = data.address) === null || _data$address49 === void 0 ? void 0 : _data$address49.pincode,
|
|
609
|
+
latitude: data === null || data === void 0 ? void 0 : (_data$address50 = data.address) === null || _data$address50 === void 0 ? void 0 : _data$address50.latitude,
|
|
610
|
+
longitude: data === null || data === void 0 ? void 0 : (_data$address51 = data.address) === null || _data$address51 === void 0 ? void 0 : _data$address51.longitude,
|
|
611
|
+
type: "FILLING-POINT"
|
|
609
612
|
}
|
|
610
|
-
}
|
|
613
|
+
}]
|
|
611
614
|
};
|
|
612
|
-
return formdata;
|
|
613
615
|
};
|
|
614
616
|
const fixedPointPayload = data => {
|
|
615
|
-
var _data$
|
|
617
|
+
var _data$owner22, _data$owner23, _data$owner24, _data$owner25, _data$owner26, _data$owner27, _data$owner28, _data$address52, _data$address53, _data$address54, _data$address55, _data$address56, _data$address57, _data$address58, _data$address59, _data$address59$city, _data$address60, _data$address61, _data$address62, _data$address62$city, _data$address63, _data$address63$local, _data$address64, _data$address64$local, _data$address65, _data$address66, _data$address66$local, _data$address67, _data$address68, _data$address69, _data$address70;
|
|
616
618
|
return {
|
|
617
619
|
waterTankerBookingDetail: {
|
|
618
|
-
tenantId: data === null || data === void 0 ? void 0 : data.tenantId,
|
|
619
620
|
bookingId: (data === null || data === void 0 ? void 0 : data.bookingId) || "",
|
|
620
|
-
|
|
621
|
+
bookingNo: (data === null || data === void 0 ? void 0 : data.bookingNo) || null,
|
|
622
|
+
tenantId: data === null || data === void 0 ? void 0 : data.tenantId,
|
|
623
|
+
mobileNumber: (data === null || data === void 0 ? void 0 : (_data$owner22 = data.owner) === null || _data$owner22 === void 0 ? void 0 : _data$owner22.mobileNumber) || "",
|
|
621
624
|
applicantDetail: {
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
625
|
+
applicantId: (data === null || data === void 0 ? void 0 : (_data$owner23 = data.owner) === null || _data$owner23 === void 0 ? void 0 : _data$owner23.applicantId) || null,
|
|
626
|
+
bookingId: (data === null || data === void 0 ? void 0 : data.bookingId) || "",
|
|
627
|
+
name: (data === null || data === void 0 ? void 0 : (_data$owner24 = data.owner) === null || _data$owner24 === void 0 ? void 0 : _data$owner24.name) || (data === null || data === void 0 ? void 0 : (_data$owner25 = data.owner) === null || _data$owner25 === void 0 ? void 0 : _data$owner25.applicantName) || "",
|
|
628
|
+
mobileNumber: (data === null || data === void 0 ? void 0 : (_data$owner26 = data.owner) === null || _data$owner26 === void 0 ? void 0 : _data$owner26.mobileNumber) || "",
|
|
629
|
+
alternateNumber: (data === null || data === void 0 ? void 0 : (_data$owner27 = data.owner) === null || _data$owner27 === void 0 ? void 0 : _data$owner27.alternateNumber) || "",
|
|
630
|
+
emailId: (data === null || data === void 0 ? void 0 : (_data$owner28 = data.owner) === null || _data$owner28 === void 0 ? void 0 : _data$owner28.emailId) || "",
|
|
626
631
|
type: "FIXED-POINT"
|
|
627
632
|
},
|
|
628
633
|
address: {
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
634
|
+
addressId: (data === null || data === void 0 ? void 0 : (_data$address52 = data.address) === null || _data$address52 === void 0 ? void 0 : _data$address52.addressId) || null,
|
|
635
|
+
applicantId: (data === null || data === void 0 ? void 0 : (_data$address53 = data.address) === null || _data$address53 === void 0 ? void 0 : _data$address53.applicantId) || null,
|
|
636
|
+
houseNo: (data === null || data === void 0 ? void 0 : (_data$address54 = data.address) === null || _data$address54 === void 0 ? void 0 : _data$address54.houseNo) || "",
|
|
637
|
+
streetName: (data === null || data === void 0 ? void 0 : (_data$address55 = data.address) === null || _data$address55 === void 0 ? void 0 : _data$address55.streetName) || "",
|
|
638
|
+
addressLine1: (data === null || data === void 0 ? void 0 : (_data$address56 = data.address) === null || _data$address56 === void 0 ? void 0 : _data$address56.addressLine1) || "",
|
|
639
|
+
addressLine2: (data === null || data === void 0 ? void 0 : (_data$address57 = data.address) === null || _data$address57 === void 0 ? void 0 : _data$address57.addressLine2) || "",
|
|
640
|
+
landmark: (data === null || data === void 0 ? void 0 : (_data$address58 = data.address) === null || _data$address58 === void 0 ? void 0 : _data$address58.landmark) || "",
|
|
641
|
+
city: (data === null || data === void 0 ? void 0 : (_data$address59 = data.address) === null || _data$address59 === void 0 ? void 0 : (_data$address59$city = _data$address59.city) === null || _data$address59$city === void 0 ? void 0 : _data$address59$city.name) || (data === null || data === void 0 ? void 0 : (_data$address60 = data.address) === null || _data$address60 === void 0 ? void 0 : _data$address60.city) || "",
|
|
642
|
+
cityCode: (data === null || data === void 0 ? void 0 : (_data$address61 = data.address) === null || _data$address61 === void 0 ? void 0 : _data$address61.cityCode) || (data === null || data === void 0 ? void 0 : (_data$address62 = data.address) === null || _data$address62 === void 0 ? void 0 : (_data$address62$city = _data$address62.city) === null || _data$address62$city === void 0 ? void 0 : _data$address62$city.code) || "DJB",
|
|
643
|
+
locality: (data === null || data === void 0 ? void 0 : (_data$address63 = data.address) === null || _data$address63 === void 0 ? void 0 : (_data$address63$local = _data$address63.locality) === null || _data$address63$local === void 0 ? void 0 : _data$address63$local.label) || (data === null || data === void 0 ? void 0 : (_data$address64 = data.address) === null || _data$address64 === void 0 ? void 0 : (_data$address64$local = _data$address64.locality) === null || _data$address64$local === void 0 ? void 0 : _data$address64$local.name) || (data === null || data === void 0 ? void 0 : (_data$address65 = data.address) === null || _data$address65 === void 0 ? void 0 : _data$address65.locality) || "",
|
|
644
|
+
localityCode: (data === null || data === void 0 ? void 0 : (_data$address66 = data.address) === null || _data$address66 === void 0 ? void 0 : (_data$address66$local = _data$address66.locality) === null || _data$address66$local === void 0 ? void 0 : _data$address66$local.code) || (data === null || data === void 0 ? void 0 : (_data$address67 = data.address) === null || _data$address67 === void 0 ? void 0 : _data$address67.localityCode) || "",
|
|
645
|
+
latitude: (data === null || data === void 0 ? void 0 : (_data$address68 = data.address) === null || _data$address68 === void 0 ? void 0 : _data$address68.latitude) || "",
|
|
646
|
+
longitude: (data === null || data === void 0 ? void 0 : (_data$address69 = data.address) === null || _data$address69 === void 0 ? void 0 : _data$address69.longitude) || "",
|
|
647
|
+
pincode: (data === null || data === void 0 ? void 0 : (_data$address70 = data.address) === null || _data$address70 === void 0 ? void 0 : _data$address70.pincode) || "",
|
|
648
|
+
type: "FIXED-POINT"
|
|
643
649
|
}
|
|
644
650
|
}
|
|
645
651
|
};
|
|
@@ -850,7 +856,7 @@ const WTSearchApplication = ({
|
|
|
850
856
|
className: "wt-search-grid",
|
|
851
857
|
style: {
|
|
852
858
|
display: "grid",
|
|
853
|
-
gridTemplateColumns: "1fr 1fr",
|
|
859
|
+
gridTemplateColumns: isMobile ? "1fr" : "1fr 1fr",
|
|
854
860
|
gap: "24px"
|
|
855
861
|
}
|
|
856
862
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -942,7 +948,8 @@ const WTSearchApplication = ({
|
|
|
942
948
|
className: "wt-search-actions",
|
|
943
949
|
style: {
|
|
944
950
|
display: "flex",
|
|
945
|
-
justifyContent: "flex-end",
|
|
951
|
+
justifyContent: isMobile ? "center" : "flex-end",
|
|
952
|
+
flexDirection: isMobile ? "column-reverse" : "row",
|
|
946
953
|
gap: "24px",
|
|
947
954
|
marginTop: "16px"
|
|
948
955
|
}
|
|
@@ -957,7 +964,7 @@ const WTSearchApplication = ({
|
|
|
957
964
|
}
|
|
958
965
|
}, t("ES_COMMON_CLEAR_ALL")), /*#__PURE__*/React.createElement("div", {
|
|
959
966
|
style: {
|
|
960
|
-
minWidth: "160px"
|
|
967
|
+
minWidth: isMobile ? "100%" : "160px"
|
|
961
968
|
}
|
|
962
969
|
}, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
963
970
|
label: t("ES_COMMON_SEARCH"),
|
|
@@ -5027,17 +5034,21 @@ const AddFillingPointMetaData = ({
|
|
|
5027
5034
|
}) => {
|
|
5028
5035
|
const sectionKey = (_config === null || _config === void 0 ? void 0 : _config.key) || "metaData";
|
|
5029
5036
|
const inputs = [{
|
|
5037
|
+
label: "WT_FILLING_POINT_NAME",
|
|
5038
|
+
name: "fillingPointName",
|
|
5039
|
+
isMandatory: true
|
|
5040
|
+
}, {
|
|
5041
|
+
label: "WT_EMERGENCY_NAME",
|
|
5042
|
+
name: "emergencyName"
|
|
5043
|
+
}, {
|
|
5030
5044
|
label: "WT_AE_NAME",
|
|
5031
|
-
name: "
|
|
5032
|
-
isMandatory: true,
|
|
5045
|
+
name: "aeName",
|
|
5033
5046
|
validation: {
|
|
5034
|
-
pattern: "^[a-zA-Z]+( [a-zA-Z]+)*$"
|
|
5035
|
-
title: t("CORE_COMMON_APPLICANT_NAME_INVALID")
|
|
5047
|
+
pattern: "^[a-zA-Z]+( [a-zA-Z]+)*$"
|
|
5036
5048
|
}
|
|
5037
5049
|
}, {
|
|
5038
5050
|
label: "WT_AE_MOBILE_NUMBER",
|
|
5039
|
-
name: "
|
|
5040
|
-
isMandatory: true,
|
|
5051
|
+
name: "aeMobile",
|
|
5041
5052
|
componentInFront: /*#__PURE__*/React.createElement("div", {
|
|
5042
5053
|
className: "employee-card-input employee-card-input--front"
|
|
5043
5054
|
}, "+91"),
|
|
@@ -5048,10 +5059,9 @@ const AddFillingPointMetaData = ({
|
|
|
5048
5059
|
}
|
|
5049
5060
|
}, {
|
|
5050
5061
|
label: "WT_AE_EMAIL_ID",
|
|
5051
|
-
name: "
|
|
5062
|
+
name: "aeEmail",
|
|
5052
5063
|
validation: {
|
|
5053
|
-
pattern: "^[a-zA-Z0-9._%+-]+@[a-z.-]+\\.(com|org|in)$"
|
|
5054
|
-
title: t("CORE_COMMON_EMAIL_ID_INVALID")
|
|
5064
|
+
pattern: "^[a-zA-Z0-9._%+-]+@[a-z.-]+\\.(com|org|in)$"
|
|
5055
5065
|
}
|
|
5056
5066
|
}, {
|
|
5057
5067
|
label: "WT_JE_NAME",
|
|
@@ -5061,7 +5071,7 @@ const AddFillingPointMetaData = ({
|
|
|
5061
5071
|
}
|
|
5062
5072
|
}, {
|
|
5063
5073
|
label: "WT_JE_MOBILE_NUMBER",
|
|
5064
|
-
name: "
|
|
5074
|
+
name: "jeMobile",
|
|
5065
5075
|
componentInFront: /*#__PURE__*/React.createElement("div", {
|
|
5066
5076
|
className: "employee-card-input employee-card-input--front"
|
|
5067
5077
|
}, "+91"),
|
|
@@ -5072,7 +5082,7 @@ const AddFillingPointMetaData = ({
|
|
|
5072
5082
|
}
|
|
5073
5083
|
}, {
|
|
5074
5084
|
label: "WT_JE_EMAIL_ID",
|
|
5075
|
-
name: "
|
|
5085
|
+
name: "jeEmail",
|
|
5076
5086
|
validation: {
|
|
5077
5087
|
pattern: "^[a-zA-Z0-9._%+-]+@[a-z.-]+\\.(com|org|in)$"
|
|
5078
5088
|
}
|
|
@@ -5084,18 +5094,7 @@ const AddFillingPointMetaData = ({
|
|
|
5084
5094
|
}
|
|
5085
5095
|
}, {
|
|
5086
5096
|
label: "WT_EE_MOBILE_NUMBER",
|
|
5087
|
-
name: "
|
|
5088
|
-
componentInFront: /*#__PURE__*/React.createElement("div", {
|
|
5089
|
-
className: "employee-card-input employee-card-input--front"
|
|
5090
|
-
}, "+91"),
|
|
5091
|
-
validation: {
|
|
5092
|
-
pattern: "[6-9]{1}[0-9]{9}",
|
|
5093
|
-
type: "tel",
|
|
5094
|
-
maxLength: 10
|
|
5095
|
-
}
|
|
5096
|
-
}, {
|
|
5097
|
-
label: "WT_EE_ALT_MOBILE_NUMBER",
|
|
5098
|
-
name: "alternateNumber",
|
|
5097
|
+
name: "eeMobile",
|
|
5099
5098
|
componentInFront: /*#__PURE__*/React.createElement("div", {
|
|
5100
5099
|
className: "employee-card-input employee-card-input--front"
|
|
5101
5100
|
}, "+91"),
|
|
@@ -5106,7 +5105,7 @@ const AddFillingPointMetaData = ({
|
|
|
5106
5105
|
}
|
|
5107
5106
|
}, {
|
|
5108
5107
|
label: "WT_EE_EMAIL_ID",
|
|
5109
|
-
name: "
|
|
5108
|
+
name: "eeEmail",
|
|
5110
5109
|
validation: {
|
|
5111
5110
|
pattern: "^[a-zA-Z0-9._%+-]+@[a-z.-]+\\.(com|org|in)$"
|
|
5112
5111
|
}
|
|
@@ -5114,19 +5113,24 @@ const AddFillingPointMetaData = ({
|
|
|
5114
5113
|
const filteredInputs = _visibleFields && _visibleFields.length > 0 ? inputs.filter(input => _visibleFields.includes(input.name)) : inputs;
|
|
5115
5114
|
const handleChange = (value, name) => {
|
|
5116
5115
|
if (!onSelect) return;
|
|
5116
|
+
let newValue = value;
|
|
5117
|
+
if (["aeMobile", "jeMobile", "eeMobile", "alternateNumber"].includes(name)) {
|
|
5118
|
+
newValue = value.slice(0, 10).replace(/[^0-9]/g, "");
|
|
5119
|
+
}
|
|
5117
5120
|
onSelect(sectionKey, {
|
|
5118
5121
|
...(_formData === null || _formData === void 0 ? void 0 : _formData[sectionKey]),
|
|
5119
|
-
[name]:
|
|
5122
|
+
[name]: newValue
|
|
5120
5123
|
});
|
|
5121
5124
|
};
|
|
5125
|
+
const isMobile = window.Digit.Utils.browser.isMobile();
|
|
5122
5126
|
return /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement("div", {
|
|
5123
5127
|
style: {
|
|
5124
5128
|
display: "grid",
|
|
5125
|
-
gridTemplateColumns: "1fr 1fr",
|
|
5129
|
+
gridTemplateColumns: isMobile ? "1fr" : "1fr 1fr",
|
|
5126
5130
|
gap: "16px"
|
|
5127
5131
|
}
|
|
5128
5132
|
}, filteredInputs.map(input => {
|
|
5129
|
-
var _formData$sectionKey;
|
|
5133
|
+
var _formData$sectionKey, _input$validation;
|
|
5130
5134
|
return /*#__PURE__*/React.createElement("div", {
|
|
5131
5135
|
key: input.name
|
|
5132
5136
|
}, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
@@ -5137,131 +5141,12 @@ const AddFillingPointMetaData = ({
|
|
|
5137
5141
|
}
|
|
5138
5142
|
}, input.componentInFront || null, /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
5139
5143
|
value: (_formData === null || _formData === void 0 ? void 0 : (_formData$sectionKey = _formData[sectionKey]) === null || _formData$sectionKey === void 0 ? void 0 : _formData$sectionKey[input.name]) || "",
|
|
5140
|
-
onChange: e => handleChange(e.target.value, input.name)
|
|
5144
|
+
onChange: e => handleChange(e.target.value, input.name),
|
|
5145
|
+
maxLength: (_input$validation = input.validation) === null || _input$validation === void 0 ? void 0 : _input$validation.maxLength
|
|
5141
5146
|
}, input.validation)))));
|
|
5142
5147
|
})));
|
|
5143
5148
|
};
|
|
5144
5149
|
|
|
5145
|
-
const AddFillingPointAddress = () => {
|
|
5146
|
-
const {
|
|
5147
|
-
t
|
|
5148
|
-
} = useTranslation();
|
|
5149
|
-
const location = useLocation();
|
|
5150
|
-
const queryParams = new URLSearchParams(location.search);
|
|
5151
|
-
const editId = queryParams.get("id");
|
|
5152
|
-
const [formData, setFormData] = useState({});
|
|
5153
|
-
const [showToast, setShowToast] = useState(null);
|
|
5154
|
-
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
5155
|
-
const {
|
|
5156
|
-
isLoading: isEditLoading,
|
|
5157
|
-
data: editData
|
|
5158
|
-
} = Digit.Hooks.wt.useTankerSearchAPI({
|
|
5159
|
-
tenantId,
|
|
5160
|
-
filters: {
|
|
5161
|
-
bookingId: editId
|
|
5162
|
-
}
|
|
5163
|
-
}, {
|
|
5164
|
-
enabled: !!editId
|
|
5165
|
-
});
|
|
5166
|
-
useEffect(() => {
|
|
5167
|
-
console.log("Edit ID:", editId);
|
|
5168
|
-
console.log("Search Result:", editData);
|
|
5169
|
-
if (editId && editData !== null && editData !== void 0 && editData.waterTankerBookingDetail) {
|
|
5170
|
-
const data = editData.waterTankerBookingDetail.find(item => item.bookingId === editId);
|
|
5171
|
-
if (data) {
|
|
5172
|
-
var _data$fillingpointmet, _data$fillingpointmet2, _data$fillingpointmet3, _data$fillingpointmet4, _data$fillingpointmet5, _data$fillingpointmet6, _data$fillingpointmet7, _data$fillingpointmet8, _data$fillingpointmet9;
|
|
5173
|
-
setFormData({
|
|
5174
|
-
owner: {
|
|
5175
|
-
name: (_data$fillingpointmet = data.fillingpointmetadata) === null || _data$fillingpointmet === void 0 ? void 0 : _data$fillingpointmet.name,
|
|
5176
|
-
mobileNumber: (_data$fillingpointmet2 = data.fillingpointmetadata) === null || _data$fillingpointmet2 === void 0 ? void 0 : _data$fillingpointmet2.mobileNumber,
|
|
5177
|
-
emailId: (_data$fillingpointmet3 = data.fillingpointmetadata) === null || _data$fillingpointmet3 === void 0 ? void 0 : _data$fillingpointmet3.emailId,
|
|
5178
|
-
jeName: (_data$fillingpointmet4 = data.fillingpointmetadata) === null || _data$fillingpointmet4 === void 0 ? void 0 : _data$fillingpointmet4.jeName,
|
|
5179
|
-
jeMobileNumber: (_data$fillingpointmet5 = data.fillingpointmetadata) === null || _data$fillingpointmet5 === void 0 ? void 0 : _data$fillingpointmet5.jeMobileNumber,
|
|
5180
|
-
jeEmailId: (_data$fillingpointmet6 = data.fillingpointmetadata) === null || _data$fillingpointmet6 === void 0 ? void 0 : _data$fillingpointmet6.jeEmailId,
|
|
5181
|
-
eeName: (_data$fillingpointmet7 = data.fillingpointmetadata) === null || _data$fillingpointmet7 === void 0 ? void 0 : _data$fillingpointmet7.eeName,
|
|
5182
|
-
eeMobileNumber: (_data$fillingpointmet8 = data.fillingpointmetadata) === null || _data$fillingpointmet8 === void 0 ? void 0 : _data$fillingpointmet8.eeMobileNumber,
|
|
5183
|
-
eeEmailId: (_data$fillingpointmet9 = data.fillingpointmetadata) === null || _data$fillingpointmet9 === void 0 ? void 0 : _data$fillingpointmet9.eeEmailId
|
|
5184
|
-
},
|
|
5185
|
-
address: {
|
|
5186
|
-
...data.address
|
|
5187
|
-
},
|
|
5188
|
-
bookingId: data.bookingId,
|
|
5189
|
-
auditDetails: data.auditDetails
|
|
5190
|
-
});
|
|
5191
|
-
}
|
|
5192
|
-
}
|
|
5193
|
-
}, [editData, editId]);
|
|
5194
|
-
const onSelect = (key, data) => {
|
|
5195
|
-
setFormData(prev => ({
|
|
5196
|
-
...prev,
|
|
5197
|
-
[key]: data
|
|
5198
|
-
}));
|
|
5199
|
-
};
|
|
5200
|
-
const steps = ["WT_FILLING_POINT"];
|
|
5201
|
-
const createFillingPoint = [];
|
|
5202
|
-
const handleSubmit = e => {
|
|
5203
|
-
if (e && e.preventDefault) e.preventDefault();
|
|
5204
|
-
const payload = fillingPointPayload({
|
|
5205
|
-
...formData,
|
|
5206
|
-
tenantId
|
|
5207
|
-
});
|
|
5208
|
-
const mutation = createFillingPoint;
|
|
5209
|
-
mutation(payload, {
|
|
5210
|
-
onSuccess: () => {
|
|
5211
|
-
setShowToast({
|
|
5212
|
-
label: editId ? t("WT_FILLING_POINT_UPDATED_SUCCESS") : t("WT_FILLING_POINT_CREATED_SUCCESS")
|
|
5213
|
-
});
|
|
5214
|
-
setTimeout(() => setShowToast(null), 5000);
|
|
5215
|
-
},
|
|
5216
|
-
onError: error => {
|
|
5217
|
-
var _error$response, _error$response$data, _error$response$data$, _error$response$data$2;
|
|
5218
|
-
setShowToast({
|
|
5219
|
-
label: (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) || (editId ? t("WT_FILLING_POINT_UPDATED_ERROR") : t("WT_FILLING_POINT_CREATED_ERROR")),
|
|
5220
|
-
isError: true
|
|
5221
|
-
});
|
|
5222
|
-
setTimeout(() => setShowToast(null), 5000);
|
|
5223
|
-
}
|
|
5224
|
-
});
|
|
5225
|
-
};
|
|
5226
|
-
if (isEditLoading) return /*#__PURE__*/React.createElement(Loader, null);
|
|
5227
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
5228
|
-
style: {
|
|
5229
|
-
display: "flex",
|
|
5230
|
-
gap: "24px"
|
|
5231
|
-
}
|
|
5232
|
-
}, /*#__PURE__*/React.createElement(Timeline, {
|
|
5233
|
-
steps: steps,
|
|
5234
|
-
currentStep: 1
|
|
5235
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
5236
|
-
style: {
|
|
5237
|
-
flex: 1
|
|
5238
|
-
}
|
|
5239
|
-
}, /*#__PURE__*/React.createElement("form", {
|
|
5240
|
-
onSubmit: handleSubmit
|
|
5241
|
-
}, /*#__PURE__*/React.createElement(AddFillingPointMetaData, {
|
|
5242
|
-
t: t,
|
|
5243
|
-
config: {
|
|
5244
|
-
key: "owner"
|
|
5245
|
-
},
|
|
5246
|
-
onSelect: onSelect,
|
|
5247
|
-
formData: formData
|
|
5248
|
-
}), /*#__PURE__*/React.createElement(AddressDetails, {
|
|
5249
|
-
t: t,
|
|
5250
|
-
onSelect: (key, data) => setFormData(prev => ({
|
|
5251
|
-
...prev,
|
|
5252
|
-
[key]: data
|
|
5253
|
-
})),
|
|
5254
|
-
formData: formData
|
|
5255
|
-
}), /*#__PURE__*/React.createElement(SubmitBar, {
|
|
5256
|
-
label: editId ? t("ES_COMMON_UPDATE") : t("ES_COMMON_SAVE_NEXT"),
|
|
5257
|
-
onSubmit: handleSubmit
|
|
5258
|
-
})), showToast && /*#__PURE__*/React.createElement(Toast, {
|
|
5259
|
-
error: showToast.isError,
|
|
5260
|
-
label: showToast.label,
|
|
5261
|
-
onClose: () => setShowToast(null)
|
|
5262
|
-
})));
|
|
5263
|
-
};
|
|
5264
|
-
|
|
5265
5150
|
const allOptions = [{
|
|
5266
5151
|
name: "Correspondence",
|
|
5267
5152
|
code: "CORRESPONDENCE",
|
|
@@ -5305,21 +5190,9 @@ const AddFixFillAddress = ({
|
|
|
5305
5190
|
const [latitude, setLatitude] = useState((formData === null || formData === void 0 ? void 0 : (_formData$address0 = formData.address) === null || _formData$address0 === void 0 ? void 0 : _formData$address0.latitude) || "");
|
|
5306
5191
|
const [longitude, setLongitude] = useState((formData === null || formData === void 0 ? void 0 : (_formData$address1 = formData.address) === null || _formData$address1 === void 0 ? void 0 : _formData$address1.longitude) || "");
|
|
5307
5192
|
const [selectedAddress, setSelectedAddress] = useState("");
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
-
setCity(formData.address.city || null);
|
|
5312
|
-
setLocality(formData.address.locality || null);
|
|
5313
|
-
setHouseNo(formData.address.houseNo || "");
|
|
5314
|
-
setStreetName(formData.address.streetName || "");
|
|
5315
|
-
setLandmark(formData.address.landmark || "");
|
|
5316
|
-
setAddressLine1(formData.address.addressLine1 || "");
|
|
5317
|
-
setAddressLine2(formData.address.addressLine2 || "");
|
|
5318
|
-
setAddressType(formData.address.addressType || null);
|
|
5319
|
-
setLatitude(formData.address.latitude || "");
|
|
5320
|
-
setLongitude(formData.address.longitude || "");
|
|
5321
|
-
}
|
|
5322
|
-
}, [formData === null || formData === void 0 ? void 0 : formData.address]);
|
|
5193
|
+
const isInitialized = useRef(!isEdit);
|
|
5194
|
+
const lastSyncedAddress = useRef(null);
|
|
5195
|
+
const lastBookingId = useRef(null);
|
|
5323
5196
|
const availableAddressTypeOptions = useMemo(() => {
|
|
5324
5197
|
if (usedAddressTypes.length === 3) {
|
|
5325
5198
|
return allOptions.filter(opt => opt.code === "OTHER");
|
|
@@ -5336,6 +5209,46 @@ const AddFixFillAddress = ({
|
|
|
5336
5209
|
code: local.code,
|
|
5337
5210
|
label: local.label
|
|
5338
5211
|
}))) || [];
|
|
5212
|
+
useEffect(() => {
|
|
5213
|
+
if (formData !== null && formData !== void 0 && formData.bookingId && lastBookingId.current !== formData.bookingId) {
|
|
5214
|
+
isInitialized.current = false;
|
|
5215
|
+
lastBookingId.current = formData.bookingId;
|
|
5216
|
+
}
|
|
5217
|
+
if (formData !== null && formData !== void 0 && formData.address && !isInitialized.current && allCities) {
|
|
5218
|
+
const addressData = formData.address;
|
|
5219
|
+
console.log("AddFixFillAddress: Initialization Phase 1 - Setting basic fields", addressData);
|
|
5220
|
+
const cityObj = allCities.find(c => c.code === addressData.cityCode || c.code === addressData.city || c.name === addressData.city) || addressData.city;
|
|
5221
|
+
if (cityObj && (!city || city.code !== cityObj.code && city !== cityObj)) {
|
|
5222
|
+
setCity(cityObj || null);
|
|
5223
|
+
}
|
|
5224
|
+
setPincode(addressData.pincode || "");
|
|
5225
|
+
setHouseNo(addressData.houseNo || "");
|
|
5226
|
+
setStreetName(addressData.streetName || "");
|
|
5227
|
+
setLandmark(addressData.landmark || "");
|
|
5228
|
+
setAddressLine1(addressData.addressLine1 || "");
|
|
5229
|
+
setAddressLine2(addressData.addressLine2 || "");
|
|
5230
|
+
setAddressType(allOptions.find(a => a.code === addressData.addressType) || addressData.addressType || null);
|
|
5231
|
+
setLatitude(addressData.latitude || "");
|
|
5232
|
+
setLongitude(addressData.longitude || "");
|
|
5233
|
+
if (fetchedLocalities || !addressData.cityCode) {
|
|
5234
|
+
console.log("AddFixFillAddress: Initialization Phase 2 - Setting locality", {
|
|
5235
|
+
cityCode: addressData.cityCode,
|
|
5236
|
+
fetched: !!fetchedLocalities
|
|
5237
|
+
});
|
|
5238
|
+
if (fetchedLocalities) {
|
|
5239
|
+
const localityObj = fetchedLocalities.find(l => l.code === addressData.localityCode || l.code === addressData.locality || l.i18nkey === addressData.locality);
|
|
5240
|
+
setLocality(localityObj || addressData.locality || null);
|
|
5241
|
+
} else {
|
|
5242
|
+
setLocality(addressData.locality || null);
|
|
5243
|
+
}
|
|
5244
|
+
isInitialized.current = true;
|
|
5245
|
+
lastSyncedAddress.current = JSON.stringify(addressData);
|
|
5246
|
+
console.log("AddFixFillAddress: Fully Initialized");
|
|
5247
|
+
} else {
|
|
5248
|
+
console.log("AddFixFillAddress: Waiting for localities to load for city:", cityObj === null || cityObj === void 0 ? void 0 : cityObj.code);
|
|
5249
|
+
}
|
|
5250
|
+
}
|
|
5251
|
+
}, [formData === null || formData === void 0 ? void 0 : formData.address, city, allCities, fetchedLocalities]);
|
|
5339
5252
|
useEffect(() => {
|
|
5340
5253
|
if (!navigator.geolocation) return;
|
|
5341
5254
|
navigator.geolocation.getCurrentPosition(pos => {
|
|
@@ -5359,25 +5272,33 @@ const AddFixFillAddress = ({
|
|
|
5359
5272
|
}
|
|
5360
5273
|
}, [selectedAddress]);
|
|
5361
5274
|
useEffect(() => {
|
|
5362
|
-
if (!onSelect) return;
|
|
5363
|
-
|
|
5364
|
-
pincode,
|
|
5365
|
-
city: (city === null || city === void 0 ? void 0 : city.code) || city,
|
|
5366
|
-
locality: (locality === null || locality === void 0 ? void 0 : locality.code) || locality,
|
|
5367
|
-
houseNo,
|
|
5368
|
-
landmark,
|
|
5369
|
-
addressLine1,
|
|
5370
|
-
addressLine2,
|
|
5371
|
-
streetName,
|
|
5372
|
-
addressType: (addressType === null || addressType === void 0 ? void 0 : addressType.code) || addressType,
|
|
5373
|
-
latitude,
|
|
5374
|
-
longitude
|
|
5375
|
-
}
|
|
5275
|
+
if (!onSelect || !isInitialized.current) return;
|
|
5276
|
+
const currentAddress = {
|
|
5277
|
+
pincode: pincode || "",
|
|
5278
|
+
city: (city === null || city === void 0 ? void 0 : city.code) || city || null,
|
|
5279
|
+
locality: (locality === null || locality === void 0 ? void 0 : locality.code) || locality || null,
|
|
5280
|
+
houseNo: houseNo || "",
|
|
5281
|
+
landmark: landmark || "",
|
|
5282
|
+
addressLine1: addressLine1 || "",
|
|
5283
|
+
addressLine2: addressLine2 || "",
|
|
5284
|
+
streetName: streetName || "",
|
|
5285
|
+
addressType: (addressType === null || addressType === void 0 ? void 0 : addressType.code) || addressType || null,
|
|
5286
|
+
latitude: latitude || "",
|
|
5287
|
+
longitude: longitude || ""
|
|
5288
|
+
};
|
|
5289
|
+
const addressString = JSON.stringify(currentAddress);
|
|
5290
|
+
if (lastSyncedAddress.current !== addressString) {
|
|
5291
|
+
lastSyncedAddress.current = addressString;
|
|
5292
|
+
onSelect((config === null || config === void 0 ? void 0 : config.key) || "address", currentAddress);
|
|
5293
|
+
}
|
|
5376
5294
|
}, [pincode, city, locality, houseNo, landmark, addressLine1, addressLine2, streetName, addressType, latitude, longitude]);
|
|
5377
|
-
return /*#__PURE__*/React.createElement(
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
|
|
5295
|
+
return /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement("div", {
|
|
5296
|
+
style: {
|
|
5297
|
+
display: "grid",
|
|
5298
|
+
gridTemplateColumns: "1fr 1fr",
|
|
5299
|
+
columnGap: "32px",
|
|
5300
|
+
rowGap: "8px"
|
|
5301
|
+
}
|
|
5381
5302
|
}, (userDetails === null || userDetails === void 0 ? void 0 : (_userDetails$addresse = userDetails.addresses) === null || _userDetails$addresse === void 0 ? void 0 : _userDetails$addresse.length) > 0 && /*#__PURE__*/React.createElement("div", {
|
|
5382
5303
|
style: {
|
|
5383
5304
|
gridColumn: "span 2"
|
|
@@ -5445,10 +5366,10 @@ const AddFixFillAddress = ({
|
|
|
5445
5366
|
value: pincode,
|
|
5446
5367
|
onChange: e => setPincode(e.target.value),
|
|
5447
5368
|
maxLength: 6
|
|
5448
|
-
})));
|
|
5369
|
+
}))));
|
|
5449
5370
|
};
|
|
5450
5371
|
|
|
5451
|
-
const
|
|
5372
|
+
const AddFillingPointAddress = () => {
|
|
5452
5373
|
const {
|
|
5453
5374
|
t
|
|
5454
5375
|
} = useTranslation();
|
|
@@ -5458,10 +5379,13 @@ const AddFixPointAddress = () => {
|
|
|
5458
5379
|
const [formData, setFormData] = useState({});
|
|
5459
5380
|
const [showToast, setShowToast] = useState(null);
|
|
5460
5381
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
5382
|
+
const addressConfig = {
|
|
5383
|
+
key: "address"
|
|
5384
|
+
};
|
|
5461
5385
|
const {
|
|
5462
5386
|
isLoading: isEditLoading,
|
|
5463
5387
|
data: editData
|
|
5464
|
-
} = Digit.Hooks.wt.
|
|
5388
|
+
} = Digit.Hooks.wt.useTankerSearchAPI({
|
|
5465
5389
|
tenantId,
|
|
5466
5390
|
filters: {
|
|
5467
5391
|
bookingId: editId
|
|
@@ -5469,19 +5393,33 @@ const AddFixPointAddress = () => {
|
|
|
5469
5393
|
}, {
|
|
5470
5394
|
enabled: !!editId
|
|
5471
5395
|
});
|
|
5396
|
+
const handleSelect = (key, data) => {
|
|
5397
|
+
setFormData(prev => ({
|
|
5398
|
+
...prev,
|
|
5399
|
+
[key]: {
|
|
5400
|
+
...(prev[key] || {}),
|
|
5401
|
+
...data
|
|
5402
|
+
}
|
|
5403
|
+
}));
|
|
5404
|
+
};
|
|
5472
5405
|
useEffect(() => {
|
|
5473
|
-
console.log("Edit ID:", editId);
|
|
5474
|
-
console.log("Search Result:", editData);
|
|
5475
5406
|
if (editId && editData !== null && editData !== void 0 && editData.waterTankerBookingDetail) {
|
|
5476
5407
|
const data = editData.waterTankerBookingDetail.find(item => item.bookingId === editId);
|
|
5477
5408
|
if (data) {
|
|
5478
|
-
var _data$
|
|
5409
|
+
var _data$fillingpointmet, _data$fillingpointmet2, _data$fillingpointmet3, _data$fillingpointmet4, _data$fillingpointmet5, _data$fillingpointmet6, _data$fillingpointmet7, _data$fillingpointmet8, _data$fillingpointmet9, _data$fillingpointmet0, _data$fillingpointmet1, _data$fillingpointmet10, _data$fillingpointmet11, _data$fillingpointmet12, _data$fillingpointmet13, _data$fillingpointmet14, _data$fillingpointmet15, _data$fillingpointmet16;
|
|
5479
5410
|
setFormData({
|
|
5480
5411
|
owner: {
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5412
|
+
fillingPointName: ((_data$fillingpointmet = data.fillingpointmetadata) === null || _data$fillingpointmet === void 0 ? void 0 : _data$fillingpointmet.fillingPointName) || ((_data$fillingpointmet2 = data.fillingpointmetadata) === null || _data$fillingpointmet2 === void 0 ? void 0 : _data$fillingpointmet2.name),
|
|
5413
|
+
emergencyName: (_data$fillingpointmet3 = data.fillingpointmetadata) === null || _data$fillingpointmet3 === void 0 ? void 0 : _data$fillingpointmet3.emergencyName,
|
|
5414
|
+
aeName: (_data$fillingpointmet4 = data.fillingpointmetadata) === null || _data$fillingpointmet4 === void 0 ? void 0 : _data$fillingpointmet4.aeName,
|
|
5415
|
+
aeMobile: ((_data$fillingpointmet5 = data.fillingpointmetadata) === null || _data$fillingpointmet5 === void 0 ? void 0 : _data$fillingpointmet5.aeMobile) || ((_data$fillingpointmet6 = data.fillingpointmetadata) === null || _data$fillingpointmet6 === void 0 ? void 0 : _data$fillingpointmet6.mobileNumber),
|
|
5416
|
+
aeEmail: ((_data$fillingpointmet7 = data.fillingpointmetadata) === null || _data$fillingpointmet7 === void 0 ? void 0 : _data$fillingpointmet7.aeEmail) || ((_data$fillingpointmet8 = data.fillingpointmetadata) === null || _data$fillingpointmet8 === void 0 ? void 0 : _data$fillingpointmet8.emailId),
|
|
5417
|
+
jeName: (_data$fillingpointmet9 = data.fillingpointmetadata) === null || _data$fillingpointmet9 === void 0 ? void 0 : _data$fillingpointmet9.jeName,
|
|
5418
|
+
jeMobile: ((_data$fillingpointmet0 = data.fillingpointmetadata) === null || _data$fillingpointmet0 === void 0 ? void 0 : _data$fillingpointmet0.jeMobile) || ((_data$fillingpointmet1 = data.fillingpointmetadata) === null || _data$fillingpointmet1 === void 0 ? void 0 : _data$fillingpointmet1.jeMobileNumber),
|
|
5419
|
+
jeEmail: ((_data$fillingpointmet10 = data.fillingpointmetadata) === null || _data$fillingpointmet10 === void 0 ? void 0 : _data$fillingpointmet10.jeEmail) || ((_data$fillingpointmet11 = data.fillingpointmetadata) === null || _data$fillingpointmet11 === void 0 ? void 0 : _data$fillingpointmet11.jeEmailId),
|
|
5420
|
+
eeName: (_data$fillingpointmet12 = data.fillingpointmetadata) === null || _data$fillingpointmet12 === void 0 ? void 0 : _data$fillingpointmet12.eeName,
|
|
5421
|
+
eeMobile: ((_data$fillingpointmet13 = data.fillingpointmetadata) === null || _data$fillingpointmet13 === void 0 ? void 0 : _data$fillingpointmet13.eeMobile) || ((_data$fillingpointmet14 = data.fillingpointmetadata) === null || _data$fillingpointmet14 === void 0 ? void 0 : _data$fillingpointmet14.eeMobileNumber),
|
|
5422
|
+
eeEmail: ((_data$fillingpointmet15 = data.fillingpointmetadata) === null || _data$fillingpointmet15 === void 0 ? void 0 : _data$fillingpointmet15.eeEmail) || ((_data$fillingpointmet16 = data.fillingpointmetadata) === null || _data$fillingpointmet16 === void 0 ? void 0 : _data$fillingpointmet16.eeEmailId)
|
|
5485
5423
|
},
|
|
5486
5424
|
address: {
|
|
5487
5425
|
...data.address
|
|
@@ -5492,27 +5430,26 @@ const AddFixPointAddress = () => {
|
|
|
5492
5430
|
}
|
|
5493
5431
|
}
|
|
5494
5432
|
}, [editData, editId]);
|
|
5495
|
-
const
|
|
5496
|
-
key: "address"
|
|
5497
|
-
};
|
|
5498
|
-
const handleSelect = (key, data) => {
|
|
5433
|
+
const onSelect = (key, data) => {
|
|
5499
5434
|
setFormData(prev => ({
|
|
5500
5435
|
...prev,
|
|
5501
|
-
[key]:
|
|
5502
|
-
...(prev[key] || {}),
|
|
5503
|
-
...data
|
|
5504
|
-
}
|
|
5436
|
+
[key]: data
|
|
5505
5437
|
}));
|
|
5506
5438
|
};
|
|
5439
|
+
const steps = ["WT_FILLING_POINT"];
|
|
5507
5440
|
const {
|
|
5508
|
-
mutate:
|
|
5509
|
-
} = Digit.Hooks.wt.
|
|
5441
|
+
mutate: createFillingPoint
|
|
5442
|
+
} = Digit.Hooks.wt.useCreateFillPoint(tenantId);
|
|
5443
|
+
const {
|
|
5444
|
+
mutate: updateFillingPoint
|
|
5445
|
+
} = Digit.Hooks.wt.useUpdateFillPoint(tenantId);
|
|
5510
5446
|
const handleSubmit = e => {
|
|
5511
|
-
|
|
5447
|
+
if (e && e.preventDefault) e.preventDefault();
|
|
5448
|
+
const payload = fillingPointPayload({
|
|
5512
5449
|
...formData,
|
|
5513
5450
|
tenantId
|
|
5514
5451
|
});
|
|
5515
|
-
const mutation =
|
|
5452
|
+
const mutation = editId ? updateFillingPoint : createFillingPoint;
|
|
5516
5453
|
mutation(payload, {
|
|
5517
5454
|
onSuccess: () => {
|
|
5518
5455
|
setShowToast({
|
|
@@ -5530,27 +5467,30 @@ const AddFixPointAddress = () => {
|
|
|
5530
5467
|
}
|
|
5531
5468
|
});
|
|
5532
5469
|
};
|
|
5470
|
+
const isMobile = window.Digit.Utils.browser.isMobile();
|
|
5533
5471
|
if (isEditLoading) return /*#__PURE__*/React.createElement(Loader, null);
|
|
5534
5472
|
return /*#__PURE__*/React.createElement("div", {
|
|
5535
5473
|
style: {
|
|
5536
5474
|
display: "flex",
|
|
5537
|
-
gap: "24px"
|
|
5475
|
+
gap: "24px",
|
|
5476
|
+
flexDirection: isMobile ? "column" : "row"
|
|
5538
5477
|
}
|
|
5539
5478
|
}, /*#__PURE__*/React.createElement(Timeline, {
|
|
5540
|
-
steps:
|
|
5479
|
+
steps: steps,
|
|
5541
5480
|
currentStep: 1
|
|
5542
5481
|
}), /*#__PURE__*/React.createElement("div", {
|
|
5543
5482
|
style: {
|
|
5544
|
-
flex: 1
|
|
5483
|
+
flex: 1,
|
|
5484
|
+
marginLeft: isMobile ? "0px" : "24px"
|
|
5545
5485
|
}
|
|
5546
|
-
}, /*#__PURE__*/React.createElement(AddFillingPointMetaData, {
|
|
5486
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(AddFillingPointMetaData, {
|
|
5547
5487
|
t: t,
|
|
5548
5488
|
config: {
|
|
5549
5489
|
key: "owner"
|
|
5550
5490
|
},
|
|
5551
|
-
onSelect:
|
|
5491
|
+
onSelect: onSelect,
|
|
5552
5492
|
formData: formData,
|
|
5553
|
-
visibleFields: ["
|
|
5493
|
+
visibleFields: ["fillingPointName", "emergencyName", "aeName", "aeMobile", "aeEmail", "jeName", "jeMobile", "jeEmail", "eeName", "eeMobile", "eeEmail"]
|
|
5554
5494
|
}), /*#__PURE__*/React.createElement(AddFixFillAddress, {
|
|
5555
5495
|
t: t,
|
|
5556
5496
|
config: addressConfig,
|
|
@@ -5560,60 +5500,273 @@ const AddFixPointAddress = () => {
|
|
|
5560
5500
|
style: {
|
|
5561
5501
|
display: "flex",
|
|
5562
5502
|
marginBottom: "24px",
|
|
5563
|
-
justifyContent: "flex-end"
|
|
5503
|
+
justifyContent: isMobile ? "center" : "flex-end"
|
|
5564
5504
|
}
|
|
5565
5505
|
}, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
5566
|
-
label: editId ? t("ES_COMMON_UPDATE") : t("
|
|
5506
|
+
label: editId ? t("ES_COMMON_UPDATE") : t("ES_COMMON_SAVE_NEXT"),
|
|
5567
5507
|
onSubmit: handleSubmit
|
|
5568
5508
|
}))), showToast && /*#__PURE__*/React.createElement(Toast, {
|
|
5569
5509
|
error: showToast.isError,
|
|
5570
5510
|
label: showToast.label,
|
|
5571
5511
|
onClose: () => setShowToast(null)
|
|
5572
|
-
}));
|
|
5512
|
+
})));
|
|
5573
5513
|
};
|
|
5574
5514
|
|
|
5575
|
-
const
|
|
5515
|
+
const AddFixPointAddress = () => {
|
|
5516
|
+
var _formData$owner, _formData$owner2, _formData$owner3, _formData$owner4;
|
|
5576
5517
|
const {
|
|
5577
5518
|
t
|
|
5578
5519
|
} = useTranslation();
|
|
5520
|
+
const location = useLocation();
|
|
5579
5521
|
const history = useHistory();
|
|
5580
|
-
const
|
|
5581
|
-
const
|
|
5582
|
-
const
|
|
5583
|
-
const [
|
|
5584
|
-
const [
|
|
5585
|
-
const [searchParams, setSearchParams] = useState({});
|
|
5522
|
+
const queryClient = useQueryClient();
|
|
5523
|
+
const queryParams = new URLSearchParams(location.search);
|
|
5524
|
+
const editId = queryParams.get("id");
|
|
5525
|
+
const [formData, setFormData] = useState({});
|
|
5526
|
+
const [showToast, setShowToast] = useState(null);
|
|
5586
5527
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
5587
|
-
const {
|
|
5588
|
-
isLoading: isFixedLoading,
|
|
5589
|
-
data: fixedPointData,
|
|
5590
|
-
refetch: refetchFixed
|
|
5591
|
-
} = Digit.Hooks.wt.useFixedPointSearchAPI({
|
|
5592
|
-
tenantId,
|
|
5593
|
-
filters: searchParams
|
|
5594
|
-
}, {
|
|
5595
|
-
enabled: selectedTab === "FIXED_POINT"
|
|
5596
|
-
});
|
|
5597
|
-
const {
|
|
5598
|
-
isLoading: isFillingLoading,
|
|
5599
|
-
data: fillingPointData,
|
|
5600
|
-
refetch: refetchFilling
|
|
5601
|
-
} = Digit.Hooks.wt.useTankerSearchAPI({
|
|
5528
|
+
const searchFilters = React.useMemo(() => ({
|
|
5602
5529
|
tenantId,
|
|
5603
|
-
filters:
|
|
5604
|
-
|
|
5605
|
-
|
|
5606
|
-
});
|
|
5607
|
-
const
|
|
5608
|
-
|
|
5609
|
-
|
|
5610
|
-
|
|
5611
|
-
|
|
5612
|
-
|
|
5613
|
-
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
|
|
5530
|
+
filters: {
|
|
5531
|
+
bookingId: editId
|
|
5532
|
+
}
|
|
5533
|
+
}), [tenantId, editId]);
|
|
5534
|
+
const searchConfig = React.useMemo(() => ({
|
|
5535
|
+
enabled: !!editId
|
|
5536
|
+
}), [editId]);
|
|
5537
|
+
const {
|
|
5538
|
+
isLoading: isEditLoading,
|
|
5539
|
+
data: editData
|
|
5540
|
+
} = Digit.Hooks.wt.useFixedPointSearchAPI(searchFilters, searchConfig);
|
|
5541
|
+
const [isDataFetched, setIsDataFetched] = useState(false);
|
|
5542
|
+
useEffect(() => {
|
|
5543
|
+
if (editId && editData !== null && editData !== void 0 && editData.waterTankerBookingDetail && !isDataFetched) {
|
|
5544
|
+
const data = editData.waterTankerBookingDetail.find(item => item.bookingId === editId);
|
|
5545
|
+
if (data) {
|
|
5546
|
+
var _data$applicantDetail, _data$applicantDetail2, _data$applicantDetail3, _data$applicantDetail4, _data$applicantDetail5, _data$address, _data$address2;
|
|
5547
|
+
setFormData({
|
|
5548
|
+
owner: {
|
|
5549
|
+
name: (_data$applicantDetail = data.applicantDetail) === null || _data$applicantDetail === void 0 ? void 0 : _data$applicantDetail.name,
|
|
5550
|
+
mobileNumber: (_data$applicantDetail2 = data.applicantDetail) === null || _data$applicantDetail2 === void 0 ? void 0 : _data$applicantDetail2.mobileNumber,
|
|
5551
|
+
alternateNumber: (_data$applicantDetail3 = data.applicantDetail) === null || _data$applicantDetail3 === void 0 ? void 0 : _data$applicantDetail3.alternateNumber,
|
|
5552
|
+
emailId: (_data$applicantDetail4 = data.applicantDetail) === null || _data$applicantDetail4 === void 0 ? void 0 : _data$applicantDetail4.emailId,
|
|
5553
|
+
applicantId: (_data$applicantDetail5 = data.applicantDetail) === null || _data$applicantDetail5 === void 0 ? void 0 : _data$applicantDetail5.applicantId
|
|
5554
|
+
},
|
|
5555
|
+
address: {
|
|
5556
|
+
...data.address,
|
|
5557
|
+
addressId: (_data$address = data.address) === null || _data$address === void 0 ? void 0 : _data$address.addressId,
|
|
5558
|
+
applicantId: (_data$address2 = data.address) === null || _data$address2 === void 0 ? void 0 : _data$address2.applicantId
|
|
5559
|
+
},
|
|
5560
|
+
bookingId: data.bookingId,
|
|
5561
|
+
bookingNo: data.bookingNo,
|
|
5562
|
+
auditDetails: data.auditDetails
|
|
5563
|
+
});
|
|
5564
|
+
setIsDataFetched(true);
|
|
5565
|
+
}
|
|
5566
|
+
}
|
|
5567
|
+
}, [editData, editId, isDataFetched]);
|
|
5568
|
+
const addressConfig = React.useMemo(() => ({
|
|
5569
|
+
key: "address"
|
|
5570
|
+
}), []);
|
|
5571
|
+
const handleSelect = React.useCallback((key, data) => {
|
|
5572
|
+
setFormData(prev => ({
|
|
5573
|
+
...prev,
|
|
5574
|
+
[key]: {
|
|
5575
|
+
...(prev[key] || {}),
|
|
5576
|
+
...data
|
|
5577
|
+
}
|
|
5578
|
+
}));
|
|
5579
|
+
}, []);
|
|
5580
|
+
const {
|
|
5581
|
+
mutate: createFixedPoint
|
|
5582
|
+
} = Digit.Hooks.wt.useCreateFixedPoint(tenantId);
|
|
5583
|
+
const {
|
|
5584
|
+
mutate: updateFixedPoint
|
|
5585
|
+
} = Digit.Hooks.wt.useUpdateFixedPoint(tenantId);
|
|
5586
|
+
const handleSubmit = e => {
|
|
5587
|
+
console.log("Submitting Form Data:", formData);
|
|
5588
|
+
const payload = fixedPointPayload({
|
|
5589
|
+
...formData,
|
|
5590
|
+
tenantId
|
|
5591
|
+
});
|
|
5592
|
+
console.log("Generated Payload:", payload);
|
|
5593
|
+
const mutation = editId ? updateFixedPoint : createFixedPoint;
|
|
5594
|
+
mutation(payload, {
|
|
5595
|
+
onSuccess: () => {
|
|
5596
|
+
setShowToast({
|
|
5597
|
+
label: editId ? t("WT_FILLING_POINT_UPDATED_SUCCESS") : t("WT_FILLING_POINT_CREATED_SUCCESS")
|
|
5598
|
+
});
|
|
5599
|
+
queryClient.invalidateQueries("wtFixedPointSearchList");
|
|
5600
|
+
setTimeout(() => {
|
|
5601
|
+
setShowToast(null);
|
|
5602
|
+
history.push("/digit-ui/employee/wt/search-filling-fix-point");
|
|
5603
|
+
}, 3000);
|
|
5604
|
+
},
|
|
5605
|
+
onError: error => {
|
|
5606
|
+
var _error$response, _error$response$data, _error$response$data$, _error$response$data$2;
|
|
5607
|
+
console.error("Mutation Error:", error);
|
|
5608
|
+
setShowToast({
|
|
5609
|
+
label: (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) || (editId ? t("WT_FILLING_POINT_UPDATED_ERROR") : t("WT_FILLING_POINT_CREATED_ERROR")),
|
|
5610
|
+
isError: true
|
|
5611
|
+
});
|
|
5612
|
+
setTimeout(() => setShowToast(null), 5000);
|
|
5613
|
+
}
|
|
5614
|
+
});
|
|
5615
|
+
};
|
|
5616
|
+
const isMobile = window.Digit.Utils.browser.isMobile();
|
|
5617
|
+
if (isEditLoading) return /*#__PURE__*/React.createElement(Loader, null);
|
|
5618
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
5619
|
+
style: {
|
|
5620
|
+
display: "flex",
|
|
5621
|
+
flexDirection: isMobile ? "column" : "row"
|
|
5622
|
+
}
|
|
5623
|
+
}, /*#__PURE__*/React.createElement(Timeline, {
|
|
5624
|
+
steps: ["WT_FIXED_POINT"],
|
|
5625
|
+
currentStep: 1
|
|
5626
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
5627
|
+
style: {
|
|
5628
|
+
flex: 1,
|
|
5629
|
+
marginLeft: isMobile ? "0px" : "24px"
|
|
5630
|
+
}
|
|
5631
|
+
}, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement("div", {
|
|
5632
|
+
style: {
|
|
5633
|
+
display: "grid",
|
|
5634
|
+
gridTemplateColumns: isMobile ? "1fr" : "1fr 1fr",
|
|
5635
|
+
columnGap: "32px",
|
|
5636
|
+
rowGap: "8px"
|
|
5637
|
+
}
|
|
5638
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
5639
|
+
style: {
|
|
5640
|
+
display: "flex",
|
|
5641
|
+
flexDirection: "column"
|
|
5642
|
+
}
|
|
5643
|
+
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WT_AE_NAME")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
5644
|
+
className: "astericColor"
|
|
5645
|
+
}, "*")), /*#__PURE__*/React.createElement(TextInput, {
|
|
5646
|
+
t: t,
|
|
5647
|
+
type: "text",
|
|
5648
|
+
isMandatory: true,
|
|
5649
|
+
name: "name",
|
|
5650
|
+
value: formData === null || formData === void 0 ? void 0 : (_formData$owner = formData.owner) === null || _formData$owner === void 0 ? void 0 : _formData$owner.name,
|
|
5651
|
+
style: {
|
|
5652
|
+
width: "100%"
|
|
5653
|
+
},
|
|
5654
|
+
onChange: e => handleSelect("owner", {
|
|
5655
|
+
name: e.target.value
|
|
5656
|
+
})
|
|
5657
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
5658
|
+
style: {
|
|
5659
|
+
display: "flex",
|
|
5660
|
+
flexDirection: "column"
|
|
5661
|
+
}
|
|
5662
|
+
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WT_AE_MOBILE_NUMBER")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
5663
|
+
className: "astericColor"
|
|
5664
|
+
}, "*")), /*#__PURE__*/React.createElement(MobileNumber, {
|
|
5665
|
+
value: formData === null || formData === void 0 ? void 0 : (_formData$owner2 = formData.owner) === null || _formData$owner2 === void 0 ? void 0 : _formData$owner2.mobileNumber,
|
|
5666
|
+
name: "mobileNumber",
|
|
5667
|
+
onChange: value => handleSelect("owner", {
|
|
5668
|
+
mobileNumber: value
|
|
5669
|
+
}),
|
|
5670
|
+
style: {
|
|
5671
|
+
width: "100%"
|
|
5672
|
+
}
|
|
5673
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
5674
|
+
style: {
|
|
5675
|
+
display: "flex",
|
|
5676
|
+
flexDirection: "column"
|
|
5677
|
+
}
|
|
5678
|
+
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WT_AE_EMAIL_ID")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
5679
|
+
className: "astericColor"
|
|
5680
|
+
}, "*")), /*#__PURE__*/React.createElement(TextInput, {
|
|
5681
|
+
t: t,
|
|
5682
|
+
type: "email",
|
|
5683
|
+
isMandatory: true,
|
|
5684
|
+
name: "emailId",
|
|
5685
|
+
value: formData === null || formData === void 0 ? void 0 : (_formData$owner3 = formData.owner) === null || _formData$owner3 === void 0 ? void 0 : _formData$owner3.emailId,
|
|
5686
|
+
style: {
|
|
5687
|
+
width: "100%"
|
|
5688
|
+
},
|
|
5689
|
+
onChange: e => handleSelect("owner", {
|
|
5690
|
+
emailId: e.target.value
|
|
5691
|
+
})
|
|
5692
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
5693
|
+
style: {
|
|
5694
|
+
display: "flex",
|
|
5695
|
+
flexDirection: "column"
|
|
5696
|
+
}
|
|
5697
|
+
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WT_EE_ALT_MOBILE_NUMBER")}`), /*#__PURE__*/React.createElement(MobileNumber, {
|
|
5698
|
+
value: formData === null || formData === void 0 ? void 0 : (_formData$owner4 = formData.owner) === null || _formData$owner4 === void 0 ? void 0 : _formData$owner4.alternateNumber,
|
|
5699
|
+
name: "alternateNumber",
|
|
5700
|
+
onChange: value => handleSelect("owner", {
|
|
5701
|
+
alternateNumber: value
|
|
5702
|
+
}),
|
|
5703
|
+
style: {
|
|
5704
|
+
width: "100%"
|
|
5705
|
+
}
|
|
5706
|
+
})))), /*#__PURE__*/React.createElement(AddFixFillAddress, {
|
|
5707
|
+
t: t,
|
|
5708
|
+
config: addressConfig,
|
|
5709
|
+
onSelect: handleSelect,
|
|
5710
|
+
formData: formData,
|
|
5711
|
+
isEdit: !!editId
|
|
5712
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
5713
|
+
style: {
|
|
5714
|
+
display: "flex",
|
|
5715
|
+
marginBottom: "24px",
|
|
5716
|
+
justifyContent: isMobile ? "center" : "flex-end"
|
|
5717
|
+
}
|
|
5718
|
+
}, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
5719
|
+
label: editId ? t("ES_COMMON_UPDATE") : t("ES_COMMON_SAVE"),
|
|
5720
|
+
onSubmit: handleSubmit
|
|
5721
|
+
}))), showToast && /*#__PURE__*/React.createElement(Toast, {
|
|
5722
|
+
error: showToast.isError,
|
|
5723
|
+
label: showToast.label,
|
|
5724
|
+
onClose: () => setShowToast(null)
|
|
5725
|
+
}));
|
|
5726
|
+
};
|
|
5727
|
+
|
|
5728
|
+
const SearchFillingPointAddress = () => {
|
|
5729
|
+
const {
|
|
5730
|
+
t
|
|
5731
|
+
} = useTranslation();
|
|
5732
|
+
const history = useHistory();
|
|
5733
|
+
const [selectedTab, setSelectedTab] = useState("FIXED_POINT");
|
|
5734
|
+
const [showAddMenu, setShowAddMenu] = useState(false);
|
|
5735
|
+
const [searchValue, setSearchValue] = useState("");
|
|
5736
|
+
const [mobileNumber, setMobileNumber] = useState("");
|
|
5737
|
+
const [status, setStatus] = useState(null);
|
|
5738
|
+
const [searchParams, setSearchParams] = useState({});
|
|
5739
|
+
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
5740
|
+
const {
|
|
5741
|
+
isLoading: isFixedLoading,
|
|
5742
|
+
data: fixedPointData,
|
|
5743
|
+
refetch: refetchFixed
|
|
5744
|
+
} = Digit.Hooks.wt.useFixedPointSearchAPI({
|
|
5745
|
+
tenantId,
|
|
5746
|
+
filters: searchParams
|
|
5747
|
+
}, {
|
|
5748
|
+
enabled: selectedTab === "FIXED_POINT"
|
|
5749
|
+
});
|
|
5750
|
+
const {
|
|
5751
|
+
isLoading: isFillingLoading,
|
|
5752
|
+
data: fillingPointData,
|
|
5753
|
+
refetch: refetchFilling
|
|
5754
|
+
} = Digit.Hooks.wt.useTankerSearchAPI({
|
|
5755
|
+
tenantId,
|
|
5756
|
+
filters: searchParams
|
|
5757
|
+
}, {
|
|
5758
|
+
enabled: selectedTab === "FILLING_POINT"
|
|
5759
|
+
});
|
|
5760
|
+
const isLoading = selectedTab === "FIXED_POINT" ? isFixedLoading : isFillingLoading;
|
|
5761
|
+
const tableData = (selectedTab === "FIXED_POINT" ? fixedPointData === null || fixedPointData === void 0 ? void 0 : fixedPointData.waterTankerBookingDetail : fillingPointData === null || fillingPointData === void 0 ? void 0 : fillingPointData.waterTankerBookingDetail) || [];
|
|
5762
|
+
const searchConfig = {
|
|
5763
|
+
FIXED_POINT: {
|
|
5764
|
+
label: "WT_FIXED_POINT_NAME",
|
|
5765
|
+
placeholder: "WT_ENTER_FIXED_POINT_NAME"
|
|
5766
|
+
},
|
|
5767
|
+
FILLING_POINT: {
|
|
5768
|
+
label: "WT_FILLING_POINT_NAME",
|
|
5769
|
+
placeholder: "WT_ENTER_FILLING_POINT_NAME"
|
|
5617
5770
|
}
|
|
5618
5771
|
};
|
|
5619
5772
|
const statusOptions = [{
|
|
@@ -5733,16 +5886,30 @@ const SearchFillingPointAddress = () => {
|
|
|
5733
5886
|
}];
|
|
5734
5887
|
}
|
|
5735
5888
|
}, [selectedTab, t]);
|
|
5889
|
+
const isMobile = window.Digit.Utils.browser.isMobile();
|
|
5736
5890
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement("div", {
|
|
5737
|
-
className: "search-tabs-container"
|
|
5891
|
+
className: "search-tabs-container",
|
|
5892
|
+
style: {
|
|
5893
|
+
flexDirection: isMobile ? "column" : "row",
|
|
5894
|
+
gap: isMobile ? "16px" : "0"
|
|
5895
|
+
}
|
|
5738
5896
|
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("button", {
|
|
5739
5897
|
className: selectedTab === "FIXED_POINT" ? "search-tab-head-selected" : "search-tab-head",
|
|
5740
|
-
onClick: () => onTabChange("FIXED_POINT")
|
|
5898
|
+
onClick: () => onTabChange("FIXED_POINT"),
|
|
5899
|
+
style: {
|
|
5900
|
+
width: isMobile ? "50%" : "auto"
|
|
5901
|
+
}
|
|
5741
5902
|
}, t("WT_FIXED_POINT")), /*#__PURE__*/React.createElement("button", {
|
|
5742
5903
|
className: selectedTab === "FILLING_POINT" ? "search-tab-head-selected" : "search-tab-head",
|
|
5743
|
-
onClick: () => onTabChange("FILLING_POINT")
|
|
5904
|
+
onClick: () => onTabChange("FILLING_POINT"),
|
|
5905
|
+
style: {
|
|
5906
|
+
width: isMobile ? "50%" : "auto"
|
|
5907
|
+
}
|
|
5744
5908
|
}, t("WT_FILLING_POINT"))), /*#__PURE__*/React.createElement("div", {
|
|
5745
|
-
className: "action-bar-wrap-registry"
|
|
5909
|
+
className: "action-bar-wrap-registry",
|
|
5910
|
+
style: {
|
|
5911
|
+
alignSelf: isMobile ? "flex-end" : "auto"
|
|
5912
|
+
}
|
|
5746
5913
|
}, /*#__PURE__*/React.createElement("div", {
|
|
5747
5914
|
className: "search-add",
|
|
5748
5915
|
onClick: onAddClick
|
|
@@ -5779,16 +5946,20 @@ const SearchFillingPointAddress = () => {
|
|
|
5779
5946
|
style: {
|
|
5780
5947
|
display: "flex",
|
|
5781
5948
|
marginTop: "32px",
|
|
5782
|
-
justifyContent: "flex-end",
|
|
5949
|
+
justifyContent: isMobile ? "center" : "flex-end",
|
|
5950
|
+
flexDirection: isMobile ? "column-reverse" : "row",
|
|
5783
5951
|
gap: "16px"
|
|
5784
5952
|
}
|
|
5785
|
-
}, /*#__PURE__*/React.createElement(
|
|
5953
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
5954
|
+
className: "clear-search",
|
|
5955
|
+
onClick: clearSearch,
|
|
5956
|
+
style: {
|
|
5957
|
+
alignSelf: "center"
|
|
5958
|
+
}
|
|
5959
|
+
}, t("ES_COMMON_CLEAR_SEARCH")), /*#__PURE__*/React.createElement(SubmitBar, {
|
|
5786
5960
|
label: t("ES_COMMON_SEARCH"),
|
|
5787
5961
|
onSubmit: onSearch
|
|
5788
|
-
}), /*#__PURE__*/React.createElement(
|
|
5789
|
-
className: "clear-search",
|
|
5790
|
-
onClick: clearSearch
|
|
5791
|
-
}, t("ES_COMMON_CLEAR_SEARCH"))))), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(Table, {
|
|
5962
|
+
})))), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(Table, {
|
|
5792
5963
|
data: tableData,
|
|
5793
5964
|
columns: columns,
|
|
5794
5965
|
pageSize: 10,
|
|
@@ -5810,6 +5981,240 @@ const SearchFillingPointAddress = () => {
|
|
|
5810
5981
|
})));
|
|
5811
5982
|
};
|
|
5812
5983
|
|
|
5984
|
+
const VendorAssign = ({
|
|
5985
|
+
parentUrl,
|
|
5986
|
+
heading
|
|
5987
|
+
}) => {
|
|
5988
|
+
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
5989
|
+
const {
|
|
5990
|
+
t
|
|
5991
|
+
} = useTranslation();
|
|
5992
|
+
const [showToast, setShowToast] = useState(null);
|
|
5993
|
+
const [formData, setFormData] = useState({});
|
|
5994
|
+
const [applicantName, setApplicantName] = useState("");
|
|
5995
|
+
const [mobileNumber, setMobileNumber] = useState("");
|
|
5996
|
+
const [alternateNumber, setAlternateNumber] = useState("");
|
|
5997
|
+
const [emailId, setEmailId] = useState("");
|
|
5998
|
+
const [validFrom, setValidFrom] = useState("");
|
|
5999
|
+
const [validTo, setValidTo] = useState("");
|
|
6000
|
+
const [fillingPoint, setFillingPoint] = useState(null);
|
|
6001
|
+
const {
|
|
6002
|
+
data: fetchedOptions,
|
|
6003
|
+
isLoading: isFillingLoading
|
|
6004
|
+
} = Digit.Hooks.wt.useTankerSearchAPI({
|
|
6005
|
+
tenantId,
|
|
6006
|
+
filters: {}
|
|
6007
|
+
}, {
|
|
6008
|
+
select: data => {
|
|
6009
|
+
var _data$waterTankerBook, _data$waterTankerBook2;
|
|
6010
|
+
return data === null || data === void 0 ? void 0 : (_data$waterTankerBook = data.waterTankerBookingDetail) === null || _data$waterTankerBook === void 0 ? void 0 : (_data$waterTankerBook2 = _data$waterTankerBook.filter(fp => fp.fillingpointmetadata)) === null || _data$waterTankerBook2 === void 0 ? void 0 : _data$waterTankerBook2.map(fp => {
|
|
6011
|
+
var _fp$fillingpointmetad, _fp$fillingpointmetad2, _fp$fillingpointmetad3, _fp$fillingpointmetad4, _fp$fillingpointmetad5;
|
|
6012
|
+
return {
|
|
6013
|
+
name: ((_fp$fillingpointmetad = fp.fillingpointmetadata) === null || _fp$fillingpointmetad === void 0 ? void 0 : _fp$fillingpointmetad.fillingPointName) || ((_fp$fillingpointmetad2 = fp.fillingpointmetadata) === null || _fp$fillingpointmetad2 === void 0 ? void 0 : _fp$fillingpointmetad2.name),
|
|
6014
|
+
code: ((_fp$fillingpointmetad3 = fp.fillingpointmetadata) === null || _fp$fillingpointmetad3 === void 0 ? void 0 : _fp$fillingpointmetad3.fillingPointId) || fp.bookingId,
|
|
6015
|
+
i18nKey: ((_fp$fillingpointmetad4 = fp.fillingpointmetadata) === null || _fp$fillingpointmetad4 === void 0 ? void 0 : _fp$fillingpointmetad4.fillingPointName) || ((_fp$fillingpointmetad5 = fp.fillingpointmetadata) === null || _fp$fillingpointmetad5 === void 0 ? void 0 : _fp$fillingpointmetad5.name)
|
|
6016
|
+
};
|
|
6017
|
+
});
|
|
6018
|
+
}
|
|
6019
|
+
});
|
|
6020
|
+
const fillingPointOptions = (fetchedOptions === null || fetchedOptions === void 0 ? void 0 : fetchedOptions.length) > 0 ? fetchedOptions : [{
|
|
6021
|
+
name: "Filling Point 1",
|
|
6022
|
+
code: "FILLING_POINT_1",
|
|
6023
|
+
i18nKey: "WT_FILLING_POINT_1"
|
|
6024
|
+
}, {
|
|
6025
|
+
name: "Filling Point 2",
|
|
6026
|
+
code: "FILLING_POINT_2",
|
|
6027
|
+
i18nKey: "WT_FILLING_POINT_2"
|
|
6028
|
+
}, {
|
|
6029
|
+
name: "Filling Point 3",
|
|
6030
|
+
code: "FILLING_POINT_3",
|
|
6031
|
+
i18nKey: "WT_FILLING_POINT_3"
|
|
6032
|
+
}, {
|
|
6033
|
+
name: "Filling Point 4",
|
|
6034
|
+
code: "FILLING_POINT_4",
|
|
6035
|
+
i18nKey: "WT_FILLING_POINT_4"
|
|
6036
|
+
}];
|
|
6037
|
+
const handleSubmit = () => {
|
|
6038
|
+
if (!applicantName || !mobileNumber || !emailId || !validFrom || !validTo || !formData.address) {
|
|
6039
|
+
setShowToast({
|
|
6040
|
+
isError: true,
|
|
6041
|
+
label: t("ES_COMMON_FILL_ALL_MANDATORY_FIELDS")
|
|
6042
|
+
});
|
|
6043
|
+
return;
|
|
6044
|
+
}
|
|
6045
|
+
const payload = {
|
|
6046
|
+
vendor: {
|
|
6047
|
+
tenantId,
|
|
6048
|
+
name: applicantName,
|
|
6049
|
+
mobileNumber,
|
|
6050
|
+
alternateNumber,
|
|
6051
|
+
emailId,
|
|
6052
|
+
validFrom,
|
|
6053
|
+
validTo,
|
|
6054
|
+
fillingPoint: fillingPoint === null || fillingPoint === void 0 ? void 0 : fillingPoint.code,
|
|
6055
|
+
address: formData.address
|
|
6056
|
+
}
|
|
6057
|
+
};
|
|
6058
|
+
Digit.VendorService.createVendor(payload, tenantId).then(result => {
|
|
6059
|
+
setShowToast({
|
|
6060
|
+
isError: false,
|
|
6061
|
+
label: t("ES_COMMON_SAVE_SUCCESS")
|
|
6062
|
+
});
|
|
6063
|
+
}).catch(err => {
|
|
6064
|
+
var _err$response, _err$response$data, _err$response$data$Er, _err$response$data$Er2;
|
|
6065
|
+
setShowToast({
|
|
6066
|
+
isError: true,
|
|
6067
|
+
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("ES_COMMON_ERROR_SAVING")
|
|
6068
|
+
});
|
|
6069
|
+
});
|
|
6070
|
+
};
|
|
6071
|
+
const isMobile = window.Digit.Utils.browser.isMobile();
|
|
6072
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
6073
|
+
style: {
|
|
6074
|
+
display: "flex",
|
|
6075
|
+
flexDirection: isMobile ? "column" : "row"
|
|
6076
|
+
}
|
|
6077
|
+
}, /*#__PURE__*/React.createElement(Timeline, {
|
|
6078
|
+
steps: ["Vendor Assign"],
|
|
6079
|
+
currentStep: 1
|
|
6080
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
6081
|
+
style: {
|
|
6082
|
+
flex: 1,
|
|
6083
|
+
marginLeft: isMobile ? "0px" : "24px"
|
|
6084
|
+
}
|
|
6085
|
+
}, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement("div", {
|
|
6086
|
+
style: {
|
|
6087
|
+
display: "grid",
|
|
6088
|
+
gridTemplateColumns: isMobile ? "1fr" : "1fr 1fr",
|
|
6089
|
+
columnGap: "32px",
|
|
6090
|
+
rowGap: "8px"
|
|
6091
|
+
}
|
|
6092
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
6093
|
+
style: {
|
|
6094
|
+
display: "flex",
|
|
6095
|
+
flexDirection: "column"
|
|
6096
|
+
}
|
|
6097
|
+
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("COMMON_APPLICANT_NAME")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
6098
|
+
className: "astericColor"
|
|
6099
|
+
}, "*")), /*#__PURE__*/React.createElement(TextInput, {
|
|
6100
|
+
t: t,
|
|
6101
|
+
type: "text",
|
|
6102
|
+
isMandatory: true,
|
|
6103
|
+
name: "applicantName",
|
|
6104
|
+
value: applicantName,
|
|
6105
|
+
style: {
|
|
6106
|
+
width: "100%"
|
|
6107
|
+
},
|
|
6108
|
+
onChange: e => setApplicantName(e.target.value)
|
|
6109
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
6110
|
+
style: {
|
|
6111
|
+
display: "flex",
|
|
6112
|
+
flexDirection: "column"
|
|
6113
|
+
}
|
|
6114
|
+
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("CORE_COMMON_APPLICANT_MOBILE_NUMBER")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
6115
|
+
className: "astericColor"
|
|
6116
|
+
}, "*")), /*#__PURE__*/React.createElement(MobileNumber, {
|
|
6117
|
+
value: mobileNumber,
|
|
6118
|
+
name: "mobileNumber",
|
|
6119
|
+
onChange: value => setMobileNumber(value),
|
|
6120
|
+
style: {
|
|
6121
|
+
width: "100%"
|
|
6122
|
+
}
|
|
6123
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
6124
|
+
style: {
|
|
6125
|
+
display: "flex",
|
|
6126
|
+
flexDirection: "column"
|
|
6127
|
+
}
|
|
6128
|
+
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WT_VENDOR_ALT_MOBILE_NUMBER")}`), /*#__PURE__*/React.createElement(MobileNumber, {
|
|
6129
|
+
value: alternateNumber,
|
|
6130
|
+
name: "alternateNumber",
|
|
6131
|
+
onChange: value => setAlternateNumber(value),
|
|
6132
|
+
style: {
|
|
6133
|
+
width: "100%"
|
|
6134
|
+
}
|
|
6135
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
6136
|
+
style: {
|
|
6137
|
+
display: "flex",
|
|
6138
|
+
flexDirection: "column"
|
|
6139
|
+
}
|
|
6140
|
+
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("CORE_COMMON_APPLICANT_EMAIL_ID")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
6141
|
+
className: "astericColor"
|
|
6142
|
+
}, "*")), /*#__PURE__*/React.createElement(TextInput, {
|
|
6143
|
+
t: t,
|
|
6144
|
+
type: "email",
|
|
6145
|
+
isMandatory: true,
|
|
6146
|
+
name: "emailId",
|
|
6147
|
+
value: emailId,
|
|
6148
|
+
style: {
|
|
6149
|
+
width: "100%"
|
|
6150
|
+
},
|
|
6151
|
+
onChange: e => setEmailId(e.target.value)
|
|
6152
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
6153
|
+
style: {
|
|
6154
|
+
display: "flex",
|
|
6155
|
+
flexDirection: "column"
|
|
6156
|
+
}
|
|
6157
|
+
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("COMMON_VALID_FROM_DATE")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
6158
|
+
className: "astericColor"
|
|
6159
|
+
}, "*")), /*#__PURE__*/React.createElement(DatePicker, {
|
|
6160
|
+
date: validFrom,
|
|
6161
|
+
onChange: date => setValidFrom(date),
|
|
6162
|
+
style: {
|
|
6163
|
+
width: "100%"
|
|
6164
|
+
}
|
|
6165
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
6166
|
+
style: {
|
|
6167
|
+
display: "flex",
|
|
6168
|
+
flexDirection: "column"
|
|
6169
|
+
}
|
|
6170
|
+
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("COMMON_VALID_TO_DATE")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
6171
|
+
className: "astericColor"
|
|
6172
|
+
}, "*")), /*#__PURE__*/React.createElement(DatePicker, {
|
|
6173
|
+
date: validTo,
|
|
6174
|
+
onChange: date => setValidTo(date),
|
|
6175
|
+
style: {
|
|
6176
|
+
width: "100%"
|
|
6177
|
+
}
|
|
6178
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
6179
|
+
style: {
|
|
6180
|
+
display: "flex",
|
|
6181
|
+
flexDirection: "column"
|
|
6182
|
+
}
|
|
6183
|
+
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("COMMON_FILLING_POINT")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
6184
|
+
className: "astericColor"
|
|
6185
|
+
}, "*")), /*#__PURE__*/React.createElement(Dropdown, {
|
|
6186
|
+
className: "form-field",
|
|
6187
|
+
selected: fillingPoint,
|
|
6188
|
+
disable: isFillingLoading,
|
|
6189
|
+
select: setFillingPoint,
|
|
6190
|
+
option: fillingPointOptions,
|
|
6191
|
+
optionKey: "i18nKey",
|
|
6192
|
+
optionCardStyles: {
|
|
6193
|
+
overflowY: "auto",
|
|
6194
|
+
maxHeight: "300px"
|
|
6195
|
+
},
|
|
6196
|
+
t: t,
|
|
6197
|
+
name: "fillingPoint",
|
|
6198
|
+
placeholder: t("WT_SELECT_FILLING_POINT") || "Select Filling Point",
|
|
6199
|
+
style: {
|
|
6200
|
+
width: "100%"
|
|
6201
|
+
}
|
|
6202
|
+
})))), /*#__PURE__*/React.createElement("div", {
|
|
6203
|
+
style: {
|
|
6204
|
+
display: "flex",
|
|
6205
|
+
marginTop: "24px",
|
|
6206
|
+
justifyContent: isMobile ? "center" : "flex-end"
|
|
6207
|
+
}
|
|
6208
|
+
}, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
6209
|
+
label: t("ES_COMMON_SAVE"),
|
|
6210
|
+
onSubmit: handleSubmit
|
|
6211
|
+
}))), showToast && /*#__PURE__*/React.createElement(Toast, {
|
|
6212
|
+
error: showToast.isError,
|
|
6213
|
+
label: showToast.label,
|
|
6214
|
+
onClose: () => setShowToast(null)
|
|
6215
|
+
}));
|
|
6216
|
+
};
|
|
6217
|
+
|
|
5813
6218
|
const EmployeeApp = ({
|
|
5814
6219
|
path
|
|
5815
6220
|
}) => {
|
|
@@ -5884,6 +6289,10 @@ const EmployeeApp = ({
|
|
|
5884
6289
|
crumbs.push({
|
|
5885
6290
|
label: t("WT_SEARCH_FIX_POINT")
|
|
5886
6291
|
});
|
|
6292
|
+
} else if (pathname.includes("/vendor-assign")) {
|
|
6293
|
+
crumbs.push({
|
|
6294
|
+
label: t("WT_VENDOR_ASSIGN")
|
|
6295
|
+
});
|
|
5887
6296
|
}
|
|
5888
6297
|
return crumbs;
|
|
5889
6298
|
};
|
|
@@ -5936,7 +6345,7 @@ const EmployeeApp = ({
|
|
|
5936
6345
|
className: "employee-form-content"
|
|
5937
6346
|
}, /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
5938
6347
|
path: `${path}/inbox`,
|
|
5939
|
-
component:
|
|
6348
|
+
component: props => /*#__PURE__*/React.createElement(Inbox, Object.assign({}, props, {
|
|
5940
6349
|
useNewInboxAPI: true,
|
|
5941
6350
|
parentRoute: path,
|
|
5942
6351
|
businessService: "watertanker",
|
|
@@ -5944,10 +6353,10 @@ const EmployeeApp = ({
|
|
|
5944
6353
|
filterComponent: "WT_INBOX_FILTER",
|
|
5945
6354
|
initialStates: inboxInitialState,
|
|
5946
6355
|
isInbox: true
|
|
5947
|
-
})
|
|
6356
|
+
}))
|
|
5948
6357
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
5949
6358
|
path: `${path}/mt/inbox`,
|
|
5950
|
-
component:
|
|
6359
|
+
component: props => /*#__PURE__*/React.createElement(Inbox, Object.assign({}, props, {
|
|
5951
6360
|
useNewInboxAPI: true,
|
|
5952
6361
|
parentRoute: path,
|
|
5953
6362
|
moduleCode: "MT",
|
|
@@ -5955,10 +6364,10 @@ const EmployeeApp = ({
|
|
|
5955
6364
|
filterComponent: "WT_INBOX_FILTER",
|
|
5956
6365
|
initialStates: inboxInitialStateMt,
|
|
5957
6366
|
isInbox: true
|
|
5958
|
-
})
|
|
6367
|
+
}))
|
|
5959
6368
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
5960
6369
|
path: `${path}/tp/inbox`,
|
|
5961
|
-
component:
|
|
6370
|
+
component: props => /*#__PURE__*/React.createElement(Inbox, Object.assign({}, props, {
|
|
5962
6371
|
useNewInboxAPI: true,
|
|
5963
6372
|
parentRoute: path,
|
|
5964
6373
|
moduleCode: "TP",
|
|
@@ -5966,7 +6375,7 @@ const EmployeeApp = ({
|
|
|
5966
6375
|
filterComponent: "WT_INBOX_FILTER",
|
|
5967
6376
|
initialStates: inboxInitialStateTp,
|
|
5968
6377
|
isInbox: true
|
|
5969
|
-
})
|
|
6378
|
+
}))
|
|
5970
6379
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
5971
6380
|
path: `${path}/request-service`,
|
|
5972
6381
|
component: WTCreate
|
|
@@ -5978,14 +6387,14 @@ const EmployeeApp = ({
|
|
|
5978
6387
|
component: WTCreate
|
|
5979
6388
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
5980
6389
|
path: `${path}/booking-details/:id`,
|
|
5981
|
-
component:
|
|
6390
|
+
component: props => /*#__PURE__*/React.createElement(ApplicationDetails, Object.assign({}, props, {
|
|
5982
6391
|
parentRoute: path
|
|
5983
|
-
})
|
|
6392
|
+
}))
|
|
5984
6393
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
5985
6394
|
path: `${path}/bookingsearch/booking-details/:id`,
|
|
5986
|
-
component:
|
|
6395
|
+
component: props => /*#__PURE__*/React.createElement(ApplicationDetails, Object.assign({}, props, {
|
|
5987
6396
|
parentRoute: path
|
|
5988
|
-
})
|
|
6397
|
+
}))
|
|
5989
6398
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
5990
6399
|
path: `${path}/my-bookings`,
|
|
5991
6400
|
component: props => /*#__PURE__*/React.createElement(SearchApp, Object.assign({}, props, {
|
|
@@ -6006,19 +6415,22 @@ const EmployeeApp = ({
|
|
|
6006
6415
|
}))
|
|
6007
6416
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
6008
6417
|
path: `${path}/fixed-point-schedule`,
|
|
6009
|
-
component:
|
|
6418
|
+
component: FixedPointScheduleManagement
|
|
6010
6419
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
6011
6420
|
path: `${path}/live-tracking`,
|
|
6012
|
-
component:
|
|
6421
|
+
component: LiveTrackingSystem
|
|
6013
6422
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
6014
6423
|
path: `${path}/add-filling-point-address`,
|
|
6015
|
-
component:
|
|
6424
|
+
component: AddFillingPointAddress
|
|
6016
6425
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
6017
6426
|
path: `${path}/add-fix-point-address`,
|
|
6018
|
-
component:
|
|
6427
|
+
component: AddFixPointAddress
|
|
6019
6428
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
6020
6429
|
path: `${path}/search-filling-fix-point`,
|
|
6021
|
-
component:
|
|
6430
|
+
component: SearchFillingPointAddress
|
|
6431
|
+
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
6432
|
+
path: `${path}/vendor-assignment`,
|
|
6433
|
+
component: VendorAssign
|
|
6022
6434
|
}))))));
|
|
6023
6435
|
};
|
|
6024
6436
|
|
|
@@ -21141,6 +21553,7 @@ const ApplicationDetails$1 = () => {
|
|
|
21141
21553
|
}, [workflowDetails.data]);
|
|
21142
21554
|
const [showTimeline, setShowTimeline] = useState(true);
|
|
21143
21555
|
return /*#__PURE__*/React.createElement("div", {
|
|
21556
|
+
className: "employee-form-content-with-action-bar",
|
|
21144
21557
|
style: {
|
|
21145
21558
|
padding: (user === null || user === void 0 ? void 0 : user.type) === "CITIZEN" ? "0 15px" : ""
|
|
21146
21559
|
}
|
|
@@ -22722,7 +23135,8 @@ const componentsToRegister = {
|
|
|
22722
23135
|
AddFillingPointAddress,
|
|
22723
23136
|
AddFixPointAddress,
|
|
22724
23137
|
AddFillingPointMetaData,
|
|
22725
|
-
WTSearchPointAddress: SearchFillingPointAddress
|
|
23138
|
+
WTSearchPointAddress: SearchFillingPointAddress,
|
|
23139
|
+
VendorAssign
|
|
22726
23140
|
};
|
|
22727
23141
|
const initWTComponents = () => {
|
|
22728
23142
|
Object.entries(componentsToRegister).forEach(([key, value]) => {
|