@djb25/digit-ui-module-wt 1.0.50 → 1.0.52
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 +352 -229
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -342,6 +342,7 @@ const WTCreate = () => {
|
|
|
342
342
|
}
|
|
343
343
|
});
|
|
344
344
|
}
|
|
345
|
+
if (data !== null && data !== void 0 && data.silent) return;
|
|
345
346
|
goNext(skipStep, index, isAddMultiple, key);
|
|
346
347
|
}
|
|
347
348
|
const onSuccess = () => {
|
|
@@ -506,8 +507,8 @@ const waterTankerPayload = data => {
|
|
|
506
507
|
address: {
|
|
507
508
|
addressType: data === null || data === void 0 ? void 0 : (_data$address2 = data.address) === null || _data$address2 === void 0 ? void 0 : (_data$address2$addres = _data$address2.addressType) === null || _data$address2$addres === void 0 ? void 0 : _data$address2$addres.code,
|
|
508
509
|
pincode: data === null || data === void 0 ? void 0 : (_data$address3 = data.address) === null || _data$address3 === void 0 ? void 0 : _data$address3.pincode,
|
|
509
|
-
city: data === null || data === void 0 ? void 0 : (_data$address4 = data.address) === null || _data$address4 === void 0 ? void 0 : (_data$address4$city = _data$address4.city) === null || _data$address4$city === void 0 ? void 0 : (_data$address4$city$c = _data$address4$city.city) === null || _data$address4$city$c === void 0 ? void 0 : _data$address4$city$c.name,
|
|
510
|
-
cityCode: data === null || data === void 0 ? void 0 : (_data$address5 = data.address) === null || _data$address5 === void 0 ? void 0 : (_data$address5$city = _data$address5.city) === null || _data$address5$city === void 0 ? void 0 : (_data$address5$city$c = _data$address5$city.city) === null || _data$address5$city$c === void 0 ? void 0 : _data$address5$city$c.code,
|
|
510
|
+
city: (data === null || data === void 0 ? void 0 : (_data$address4 = data.address) === null || _data$address4 === void 0 ? void 0 : (_data$address4$city = _data$address4.city) === null || _data$address4$city === void 0 ? void 0 : (_data$address4$city$c = _data$address4$city.city) === null || _data$address4$city$c === void 0 ? void 0 : _data$address4$city$c.name) || "DJB",
|
|
511
|
+
cityCode: (data === null || data === void 0 ? void 0 : (_data$address5 = data.address) === null || _data$address5 === void 0 ? void 0 : (_data$address5$city = _data$address5.city) === null || _data$address5$city === void 0 ? void 0 : (_data$address5$city$c = _data$address5$city.city) === null || _data$address5$city$c === void 0 ? void 0 : _data$address5$city$c.code) || "DJB",
|
|
511
512
|
addressLine1: data === null || data === void 0 ? void 0 : (_data$address6 = data.address) === null || _data$address6 === void 0 ? void 0 : _data$address6.addressLine1,
|
|
512
513
|
addressLine2: data === null || data === void 0 ? void 0 : (_data$address7 = data.address) === null || _data$address7 === void 0 ? void 0 : _data$address7.addressLine2,
|
|
513
514
|
locality: data === null || data === void 0 ? void 0 : (_data$address8 = data.address) === null || _data$address8 === void 0 ? void 0 : (_data$address8$locali = _data$address8.locality) === null || _data$address8$locali === void 0 ? void 0 : _data$address8$locali.i18nKey,
|
|
@@ -551,8 +552,8 @@ const mobileToiletPayload = data => {
|
|
|
551
552
|
address: {
|
|
552
553
|
addressType: data === null || data === void 0 ? void 0 : (_data$address14 = data.address) === null || _data$address14 === void 0 ? void 0 : (_data$address14$addre = _data$address14.addressType) === null || _data$address14$addre === void 0 ? void 0 : _data$address14$addre.code,
|
|
553
554
|
pincode: data === null || data === void 0 ? void 0 : (_data$address15 = data.address) === null || _data$address15 === void 0 ? void 0 : _data$address15.pincode,
|
|
554
|
-
city: data === null || data === void 0 ? void 0 : (_data$address16 = data.address) === null || _data$address16 === void 0 ? void 0 : (_data$address16$city = _data$address16.city) === null || _data$address16$city === void 0 ? void 0 : (_data$address16$city$ = _data$address16$city.city) === null || _data$address16$city$ === void 0 ? void 0 : _data$address16$city$.name,
|
|
555
|
-
cityCode: data === null || data === void 0 ? void 0 : (_data$address17 = data.address) === null || _data$address17 === void 0 ? void 0 : (_data$address17$city = _data$address17.city) === null || _data$address17$city === void 0 ? void 0 : (_data$address17$city$ = _data$address17$city.city) === null || _data$address17$city$ === void 0 ? void 0 : _data$address17$city$.code,
|
|
555
|
+
city: (data === null || data === void 0 ? void 0 : (_data$address16 = data.address) === null || _data$address16 === void 0 ? void 0 : (_data$address16$city = _data$address16.city) === null || _data$address16$city === void 0 ? void 0 : (_data$address16$city$ = _data$address16$city.city) === null || _data$address16$city$ === void 0 ? void 0 : _data$address16$city$.name) || "DJB",
|
|
556
|
+
cityCode: (data === null || data === void 0 ? void 0 : (_data$address17 = data.address) === null || _data$address17 === void 0 ? void 0 : (_data$address17$city = _data$address17.city) === null || _data$address17$city === void 0 ? void 0 : (_data$address17$city$ = _data$address17$city.city) === null || _data$address17$city$ === void 0 ? void 0 : _data$address17$city$.code) || "DJB",
|
|
556
557
|
addressLine1: data === null || data === void 0 ? void 0 : (_data$address18 = data.address) === null || _data$address18 === void 0 ? void 0 : _data$address18.addressLine1,
|
|
557
558
|
addressLine2: data === null || data === void 0 ? void 0 : (_data$address19 = data.address) === null || _data$address19 === void 0 ? void 0 : _data$address19.addressLine2,
|
|
558
559
|
locality: data === null || data === void 0 ? void 0 : (_data$address20 = data.address) === null || _data$address20 === void 0 ? void 0 : (_data$address20$local = _data$address20.locality) === null || _data$address20$local === void 0 ? void 0 : _data$address20$local.i18nKey,
|
|
@@ -593,8 +594,8 @@ const treePruningPayload = data => {
|
|
|
593
594
|
address: {
|
|
594
595
|
addressType: data === null || data === void 0 ? void 0 : (_data$address25 = data.address) === null || _data$address25 === void 0 ? void 0 : (_data$address25$addre = _data$address25.addressType) === null || _data$address25$addre === void 0 ? void 0 : _data$address25$addre.code,
|
|
595
596
|
pincode: data === null || data === void 0 ? void 0 : (_data$address26 = data.address) === null || _data$address26 === void 0 ? void 0 : _data$address26.pincode,
|
|
596
|
-
city: data === null || data === void 0 ? void 0 : (_data$address27 = data.address) === null || _data$address27 === void 0 ? void 0 : (_data$address27$city = _data$address27.city) === null || _data$address27$city === void 0 ? void 0 : (_data$address27$city$ = _data$address27$city.city) === null || _data$address27$city$ === void 0 ? void 0 : _data$address27$city$.name,
|
|
597
|
-
cityCode: data === null || data === void 0 ? void 0 : (_data$address28 = data.address) === null || _data$address28 === void 0 ? void 0 : (_data$address28$city = _data$address28.city) === null || _data$address28$city === void 0 ? void 0 : (_data$address28$city$ = _data$address28$city.city) === null || _data$address28$city$ === void 0 ? void 0 : _data$address28$city$.code,
|
|
597
|
+
city: (data === null || data === void 0 ? void 0 : (_data$address27 = data.address) === null || _data$address27 === void 0 ? void 0 : (_data$address27$city = _data$address27.city) === null || _data$address27$city === void 0 ? void 0 : (_data$address27$city$ = _data$address27$city.city) === null || _data$address27$city$ === void 0 ? void 0 : _data$address27$city$.name) || "DJB",
|
|
598
|
+
cityCode: (data === null || data === void 0 ? void 0 : (_data$address28 = data.address) === null || _data$address28 === void 0 ? void 0 : (_data$address28$city = _data$address28.city) === null || _data$address28$city === void 0 ? void 0 : (_data$address28$city$ = _data$address28$city.city) === null || _data$address28$city$ === void 0 ? void 0 : _data$address28$city$.code) || "DJB",
|
|
598
599
|
addressLine1: data === null || data === void 0 ? void 0 : (_data$address29 = data.address) === null || _data$address29 === void 0 ? void 0 : _data$address29.addressLine1,
|
|
599
600
|
addressLine2: data === null || data === void 0 ? void 0 : (_data$address30 = data.address) === null || _data$address30 === void 0 ? void 0 : _data$address30.addressLine2,
|
|
600
601
|
locality: data === null || data === void 0 ? void 0 : (_data$address31 = data.address) === null || _data$address31 === void 0 ? void 0 : (_data$address31$local = _data$address31.locality) === null || _data$address31$local === void 0 ? void 0 : _data$address31$local.i18nKey,
|
|
@@ -643,7 +644,7 @@ const fillingPointPayload = data => {
|
|
|
643
644
|
addressLine1: data === null || data === void 0 ? void 0 : (_data$address38 = data.address) === null || _data$address38 === void 0 ? void 0 : _data$address38.addressLine1,
|
|
644
645
|
addressLine2: data === null || data === void 0 ? void 0 : (_data$address39 = data.address) === null || _data$address39 === void 0 ? void 0 : _data$address39.addressLine2,
|
|
645
646
|
landmark: data === null || data === void 0 ? void 0 : (_data$address40 = data.address) === null || _data$address40 === void 0 ? void 0 : _data$address40.landmark,
|
|
646
|
-
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) || "",
|
|
647
|
+
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) || "DJB",
|
|
647
648
|
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) || "DJB",
|
|
648
649
|
locality: (data === null || data === void 0 ? void 0 : (_data$address45 = data.address) === null || _data$address45 === void 0 ? void 0 : (_data$address45$local = _data$address45.locality) === null || _data$address45$local === void 0 ? void 0 : _data$address45$local.label) || (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.name) || (data === null || data === void 0 ? void 0 : (_data$address47 = data.address) === null || _data$address47 === void 0 ? void 0 : _data$address47.locality) || "",
|
|
649
650
|
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) || (data === null || data === void 0 ? void 0 : (_data$address49 = data.address) === null || _data$address49 === void 0 ? void 0 : _data$address49.localityCode) || "",
|
|
@@ -683,7 +684,7 @@ const fixedPointPayload = data => {
|
|
|
683
684
|
addressLine1: (data === null || data === void 0 ? void 0 : (_data$address62 = data.address) === null || _data$address62 === void 0 ? void 0 : _data$address62.addressLine1) || "",
|
|
684
685
|
addressLine2: (data === null || data === void 0 ? void 0 : (_data$address63 = data.address) === null || _data$address63 === void 0 ? void 0 : _data$address63.addressLine2) || "",
|
|
685
686
|
landmark: (data === null || data === void 0 ? void 0 : (_data$address64 = data.address) === null || _data$address64 === void 0 ? void 0 : _data$address64.landmark) || "",
|
|
686
|
-
city: (data === null || data === void 0 ? void 0 : (_data$address65 = data.address) === null || _data$address65 === void 0 ? void 0 : (_data$address65$city = _data$address65.city) === null || _data$address65$city === void 0 ? void 0 : _data$address65$city.name) || (data === null || data === void 0 ? void 0 : (_data$address66 = data.address) === null || _data$address66 === void 0 ? void 0 : _data$address66.city) || "",
|
|
687
|
+
city: (data === null || data === void 0 ? void 0 : (_data$address65 = data.address) === null || _data$address65 === void 0 ? void 0 : (_data$address65$city = _data$address65.city) === null || _data$address65$city === void 0 ? void 0 : _data$address65$city.name) || (data === null || data === void 0 ? void 0 : (_data$address66 = data.address) === null || _data$address66 === void 0 ? void 0 : _data$address66.city) || "DJB",
|
|
687
688
|
cityCode: (data === null || data === void 0 ? void 0 : (_data$address67 = data.address) === null || _data$address67 === void 0 ? void 0 : _data$address67.cityCode) || (data === null || data === void 0 ? void 0 : (_data$address68 = data.address) === null || _data$address68 === void 0 ? void 0 : (_data$address68$city = _data$address68.city) === null || _data$address68$city === void 0 ? void 0 : _data$address68$city.code) || "DJB",
|
|
688
689
|
locality: (data === null || data === void 0 ? void 0 : (_data$address69 = data.address) === null || _data$address69 === void 0 ? void 0 : (_data$address69$local = _data$address69.locality) === null || _data$address69$local === void 0 ? void 0 : _data$address69$local.label) || (data === null || data === void 0 ? void 0 : (_data$address70 = data.address) === null || _data$address70 === void 0 ? void 0 : (_data$address70$local = _data$address70.locality) === null || _data$address70$local === void 0 ? void 0 : _data$address70$local.name) || (data === null || data === void 0 ? void 0 : (_data$address71 = data.address) === null || _data$address71 === void 0 ? void 0 : _data$address71.locality) || "",
|
|
689
690
|
localityCode: (data === null || data === void 0 ? void 0 : (_data$address72 = data.address) === null || _data$address72 === void 0 ? void 0 : (_data$address72$local = _data$address72.locality) === null || _data$address72$local === void 0 ? void 0 : _data$address72$local.code) || (data === null || data === void 0 ? void 0 : (_data$address73 = data.address) === null || _data$address73 === void 0 ? void 0 : _data$address73.localityCode) || "",
|
|
@@ -741,7 +742,7 @@ const emergencyWaterTankerPayload = data => {
|
|
|
741
742
|
addressType: (data === null || data === void 0 ? void 0 : (_data$address84 = data.address) === null || _data$address84 === void 0 ? void 0 : (_data$address84$addre = _data$address84.addressType) === null || _data$address84$addre === void 0 ? void 0 : _data$address84$addre.code) || (data === null || data === void 0 ? void 0 : (_data$address85 = data.address) === null || _data$address85 === void 0 ? void 0 : _data$address85.addressType) || "CORRESPONDENCE",
|
|
742
743
|
pincode: (data === null || data === void 0 ? void 0 : (_data$address86 = data.address) === null || _data$address86 === void 0 ? void 0 : _data$address86.pincode) || (addressFromFP === null || addressFromFP === void 0 ? void 0 : addressFromFP.pincode) || "",
|
|
743
744
|
city: (data === null || data === void 0 ? void 0 : (_data$address87 = data.address) === null || _data$address87 === void 0 ? void 0 : (_data$address87$city = _data$address87.city) === null || _data$address87$city === void 0 ? void 0 : (_data$address87$city$ = _data$address87$city.city) === null || _data$address87$city$ === void 0 ? void 0 : _data$address87$city$.name) || (data === null || data === void 0 ? void 0 : (_data$address88 = data.address) === null || _data$address88 === void 0 ? void 0 : (_data$address88$city = _data$address88.city) === null || _data$address88$city === void 0 ? void 0 : _data$address88$city.name) || (data === null || data === void 0 ? void 0 : (_data$address89 = data.address) === null || _data$address89 === void 0 ? void 0 : _data$address89.city) || (addressFromFP === null || addressFromFP === void 0 ? void 0 : addressFromFP.city) || "",
|
|
744
|
-
cityCode: (data === null || data === void 0 ? void 0 : (_data$address90 = data.address) === null || _data$address90 === void 0 ? void 0 : (_data$address90$city = _data$address90.city) === null || _data$address90$city === void 0 ? void 0 : (_data$address90$city$ = _data$address90$city.city) === null || _data$address90$city$ === void 0 ? void 0 : _data$address90$city$.code) || (data === null || data === void 0 ? void 0 : (_data$address91 = data.address) === null || _data$address91 === void 0 ? void 0 : _data$address91.cityCode) || (addressFromFP === null || addressFromFP === void 0 ? void 0 : addressFromFP.cityCode) || "
|
|
745
|
+
cityCode: (data === null || data === void 0 ? void 0 : (_data$address90 = data.address) === null || _data$address90 === void 0 ? void 0 : (_data$address90$city = _data$address90.city) === null || _data$address90$city === void 0 ? void 0 : (_data$address90$city$ = _data$address90$city.city) === null || _data$address90$city$ === void 0 ? void 0 : _data$address90$city$.code) || (data === null || data === void 0 ? void 0 : (_data$address91 = data.address) === null || _data$address91 === void 0 ? void 0 : _data$address91.cityCode) || (addressFromFP === null || addressFromFP === void 0 ? void 0 : addressFromFP.cityCode) || "DJB",
|
|
745
746
|
addressLine1: (data === null || data === void 0 ? void 0 : (_data$address92 = data.address) === null || _data$address92 === void 0 ? void 0 : _data$address92.addressLine1) || (addressFromFP === null || addressFromFP === void 0 ? void 0 : addressFromFP.addressLine1) || "",
|
|
746
747
|
addressLine2: (data === null || data === void 0 ? void 0 : (_data$address93 = data.address) === null || _data$address93 === void 0 ? void 0 : _data$address93.addressLine2) || (addressFromFP === null || addressFromFP === void 0 ? void 0 : addressFromFP.addressLine2) || "",
|
|
747
748
|
locality: (data === null || data === void 0 ? void 0 : (_data$address94 = data.address) === null || _data$address94 === void 0 ? void 0 : (_data$address94$local = _data$address94.locality) === null || _data$address94$local === void 0 ? void 0 : _data$address94$local.i18nKey) || (data === null || data === void 0 ? void 0 : (_data$address95 = data.address) === null || _data$address95 === void 0 ? void 0 : (_data$address95$local = _data$address95.locality) === null || _data$address95$local === void 0 ? void 0 : _data$address95$local.name) || (data === null || data === void 0 ? void 0 : (_data$address96 = data.address) === null || _data$address96 === void 0 ? void 0 : _data$address96.locality) || (addressFromFP === null || addressFromFP === void 0 ? void 0 : addressFromFP.locality) || "",
|
|
@@ -3805,7 +3806,7 @@ const AddTripModal = ({
|
|
|
3805
3806
|
});
|
|
3806
3807
|
const fillingPointOptions = fillingPoints.map(fp => ({
|
|
3807
3808
|
displayLabel: (fp === null || fp === void 0 ? void 0 : fp.fillingPointName) || "NA",
|
|
3808
|
-
value: fp === null || fp === void 0 ? void 0 : fp.id,
|
|
3809
|
+
value: (fp === null || fp === void 0 ? void 0 : fp.fillingPointId) || (fp === null || fp === void 0 ? void 0 : fp.id),
|
|
3809
3810
|
eeName: (fp === null || fp === void 0 ? void 0 : fp.eeName) || "NA",
|
|
3810
3811
|
aeName: (fp === null || fp === void 0 ? void 0 : fp.aeName) || "NA"
|
|
3811
3812
|
}));
|
|
@@ -3847,7 +3848,7 @@ const AddTripModal = ({
|
|
|
3847
3848
|
className: "custom-modal-overlay",
|
|
3848
3849
|
style: {
|
|
3849
3850
|
position: "fixed",
|
|
3850
|
-
top:
|
|
3851
|
+
top: 30,
|
|
3851
3852
|
left: 0,
|
|
3852
3853
|
width: "100%",
|
|
3853
3854
|
height: "100%",
|
|
@@ -4238,6 +4239,29 @@ const AddTripModal = ({
|
|
|
4238
4239
|
}, initialValues ? t("WT_UPDATE") : t("CS_COMMON_SAVE")))));
|
|
4239
4240
|
};
|
|
4240
4241
|
|
|
4242
|
+
const convertTo12Hour = time24 => {
|
|
4243
|
+
if (!time24) return time24;
|
|
4244
|
+
if (time24.includes("AM") || time24.includes("PM")) return time24;
|
|
4245
|
+
const parts = time24.split(":");
|
|
4246
|
+
if (parts.length < 2) return time24;
|
|
4247
|
+
let h = parseInt(parts[0], 10);
|
|
4248
|
+
const m = parts[1];
|
|
4249
|
+
const ampm = h >= 12 ? "PM" : "AM";
|
|
4250
|
+
h = h % 12 || 12;
|
|
4251
|
+
const strHours = h < 10 ? `0${h}` : h;
|
|
4252
|
+
return `${strHours}:${m} ${ampm}`;
|
|
4253
|
+
};
|
|
4254
|
+
const convertTo24Hour = time12 => {
|
|
4255
|
+
if (!time12) return time12;
|
|
4256
|
+
const match = time12.match(/^(\d{2}):(\d{2})\s?(AM|PM)$/i);
|
|
4257
|
+
if (!match) return time12;
|
|
4258
|
+
let [_, hours, minutes, ampm] = match;
|
|
4259
|
+
hours = parseInt(hours, 10);
|
|
4260
|
+
if (ampm.toUpperCase() === "PM" && hours < 12) hours += 12;
|
|
4261
|
+
if (ampm.toUpperCase() === "AM" && hours === 12) hours = 0;
|
|
4262
|
+
const strHours = hours < 10 ? `0${hours}` : hours;
|
|
4263
|
+
return `${strHours}:${minutes}`;
|
|
4264
|
+
};
|
|
4241
4265
|
const FixedPointScheduleManagement = ({
|
|
4242
4266
|
...props
|
|
4243
4267
|
}) => {
|
|
@@ -4360,19 +4384,54 @@ const FixedPointScheduleManagement = ({
|
|
|
4360
4384
|
volume: item.volumeWaterTobeDelivery,
|
|
4361
4385
|
vehicle: item.vehicleId,
|
|
4362
4386
|
active: item.isEnable ? "Y" : "N",
|
|
4363
|
-
totalCount: item.totalCount
|
|
4387
|
+
totalCount: item.totalCount,
|
|
4388
|
+
fillingPointId: item.fillingPointId
|
|
4364
4389
|
})), []);
|
|
4390
|
+
const dayOrder = React.useMemo(() => ({
|
|
4391
|
+
MONDAY: 1,
|
|
4392
|
+
TUESDAY: 2,
|
|
4393
|
+
WEDNESDAY: 3,
|
|
4394
|
+
THURSDAY: 4,
|
|
4395
|
+
FRIDAY: 5,
|
|
4396
|
+
SATURDAY: 6,
|
|
4397
|
+
SUNDAY: 7
|
|
4398
|
+
}), []);
|
|
4365
4399
|
const data = React.useMemo(() => {
|
|
4366
|
-
|
|
4367
|
-
|
|
4400
|
+
const rows = mapScheduleRows((scheduleData === null || scheduleData === void 0 ? void 0 : scheduleData.fixedPointTimeTableDetails) || []);
|
|
4401
|
+
return rows.sort((a, b) => {
|
|
4402
|
+
var _a$day, _b$day;
|
|
4403
|
+
const fixedPointCompare = (a.fixedPoint || "").localeCompare(b.fixedPoint || "");
|
|
4404
|
+
if (fixedPointCompare !== 0) return fixedPointCompare;
|
|
4405
|
+
const dayA = dayOrder[(_a$day = a.day) === null || _a$day === void 0 ? void 0 : _a$day.toUpperCase()] || 8;
|
|
4406
|
+
const dayB = dayOrder[(_b$day = b.day) === null || _b$day === void 0 ? void 0 : _b$day.toUpperCase()] || 8;
|
|
4407
|
+
return dayA - dayB;
|
|
4408
|
+
});
|
|
4409
|
+
}, [scheduleData, mapScheduleRows, dayOrder]);
|
|
4368
4410
|
const fetchNextPage = () => {
|
|
4369
|
-
|
|
4411
|
+
const newOffset = pageOffset + pageSize;
|
|
4412
|
+
setPageOffset(newOffset);
|
|
4413
|
+
setFilters(prev => ({
|
|
4414
|
+
...prev,
|
|
4415
|
+
offset: newOffset
|
|
4416
|
+
}));
|
|
4370
4417
|
};
|
|
4371
4418
|
const fetchPrevPage = () => {
|
|
4372
|
-
|
|
4419
|
+
const newOffset = Math.max(0, pageOffset - pageSize);
|
|
4420
|
+
setPageOffset(newOffset);
|
|
4421
|
+
setFilters(prev => ({
|
|
4422
|
+
...prev,
|
|
4423
|
+
offset: newOffset
|
|
4424
|
+
}));
|
|
4373
4425
|
};
|
|
4374
4426
|
const handlePageSizeChange = e => {
|
|
4375
|
-
|
|
4427
|
+
const newPageSize = Number(e.target.value);
|
|
4428
|
+
setPageSize(newPageSize);
|
|
4429
|
+
setPageOffset(0);
|
|
4430
|
+
setFilters(prev => ({
|
|
4431
|
+
...prev,
|
|
4432
|
+
limit: newPageSize,
|
|
4433
|
+
offset: 0
|
|
4434
|
+
}));
|
|
4376
4435
|
};
|
|
4377
4436
|
const handleSearch = (customFilters = null, offset = null) => {
|
|
4378
4437
|
var _day$value;
|
|
@@ -4383,17 +4442,12 @@ const FixedPointScheduleManagement = ({
|
|
|
4383
4442
|
};
|
|
4384
4443
|
const newOffset = offset !== null ? offset : 0;
|
|
4385
4444
|
if (offset === null) setPageOffset(0);
|
|
4386
|
-
setFilters({
|
|
4445
|
+
setFilters(prev => ({
|
|
4387
4446
|
...searchFilters,
|
|
4388
|
-
limit:
|
|
4447
|
+
limit: prev.limit,
|
|
4389
4448
|
offset: newOffset
|
|
4390
|
-
});
|
|
4449
|
+
}));
|
|
4391
4450
|
};
|
|
4392
|
-
React.useEffect(() => {
|
|
4393
|
-
if (pageOffset !== 0) {
|
|
4394
|
-
handleSearch(null, pageOffset);
|
|
4395
|
-
}
|
|
4396
|
-
}, [pageOffset, pageSize]);
|
|
4397
4451
|
const columns = React.useMemo(() => [{
|
|
4398
4452
|
Header: t("WT_FIXED_POINT_CODE"),
|
|
4399
4453
|
accessor: "fixedPoint"
|
|
@@ -4732,7 +4786,7 @@ const FixedPointScheduleManagement = ({
|
|
|
4732
4786
|
onPrevPage: fetchPrevPage,
|
|
4733
4787
|
pageSizeLimit: pageSize,
|
|
4734
4788
|
onSort: props.onSort,
|
|
4735
|
-
disableSort:
|
|
4789
|
+
disableSort: true,
|
|
4736
4790
|
sortParams: props.sortParams,
|
|
4737
4791
|
totalRecords: (scheduleData === null || scheduleData === void 0 ? void 0 : scheduleData.count) || (scheduleData === null || scheduleData === void 0 ? void 0 : scheduleData.totalCount) || (data === null || data === void 0 ? void 0 : (_data$ = data[0]) === null || _data$ === void 0 ? void 0 : _data$.totalCount),
|
|
4738
4792
|
showCSVExport: true,
|
|
@@ -4749,16 +4803,17 @@ const FixedPointScheduleManagement = ({
|
|
|
4749
4803
|
scheduleId: data[editingRowIndex].scheduleId,
|
|
4750
4804
|
fixedPointCode: data[editingRowIndex].fixedPoint,
|
|
4751
4805
|
fixedPointId: data[editingRowIndex].fixedPointId,
|
|
4806
|
+
fillingPointCode: data[editingRowIndex].fillingPointId,
|
|
4752
4807
|
day: [{
|
|
4753
4808
|
label: t(data[editingRowIndex].day),
|
|
4754
4809
|
value: data[editingRowIndex].day
|
|
4755
4810
|
}],
|
|
4756
4811
|
frequencyNo: data[editingRowIndex].freq,
|
|
4757
|
-
arrivalTimeFpl: data[editingRowIndex].arrToFpl,
|
|
4758
|
-
departureTimeFpl: data[editingRowIndex].depFromFpl,
|
|
4759
|
-
arrivalFixedPoint: data[editingRowIndex].arrAtFixedPoint,
|
|
4760
|
-
departureFixedPoint: data[editingRowIndex].depAtFixedPoint,
|
|
4761
|
-
returnFpl: data[editingRowIndex].returnToFpl,
|
|
4812
|
+
arrivalTimeFpl: convertTo24Hour(data[editingRowIndex].arrToFpl),
|
|
4813
|
+
departureTimeFpl: convertTo24Hour(data[editingRowIndex].depFromFpl),
|
|
4814
|
+
arrivalFixedPoint: convertTo24Hour(data[editingRowIndex].arrAtFixedPoint),
|
|
4815
|
+
departureFixedPoint: convertTo24Hour(data[editingRowIndex].depAtFixedPoint),
|
|
4816
|
+
returnFpl: convertTo24Hour(data[editingRowIndex].returnToFpl),
|
|
4762
4817
|
volume: data[editingRowIndex].volume,
|
|
4763
4818
|
vehicleId: data[editingRowIndex].vehicle,
|
|
4764
4819
|
active: {
|
|
@@ -4784,14 +4839,14 @@ const FixedPointScheduleManagement = ({
|
|
|
4784
4839
|
const fixedPointDetails = {
|
|
4785
4840
|
system_assigned_schedule_id: formData.scheduleId || existingData.scheduleId || null,
|
|
4786
4841
|
fixed_point_code: formData.fixedPointId || formData.fixedPointCode || "",
|
|
4787
|
-
fillingPointId: formData.fillingPointCode || null,
|
|
4842
|
+
fillingPointId: formData.fillingPointCode || formData.fillingPointId || null,
|
|
4788
4843
|
day: daysArr.map(d => d.toUpperCase()),
|
|
4789
4844
|
trip_no: Number(formData.frequencyNo) || 1,
|
|
4790
|
-
arrival_time_to_fpl: formData.arrivalTimeFpl,
|
|
4791
|
-
departure_time_from_fpl: formData.departureTimeFpl,
|
|
4792
|
-
arrival_time_delivery_point: formData.arrivalFixedPoint,
|
|
4793
|
-
departure_time_delivery_point: formData.departureFixedPoint,
|
|
4794
|
-
time_of_arriving_back_fpl_after_delivery: formData.returnFpl,
|
|
4845
|
+
arrival_time_to_fpl: convertTo12Hour(formData.arrivalTimeFpl),
|
|
4846
|
+
departure_time_from_fpl: convertTo12Hour(formData.departureTimeFpl),
|
|
4847
|
+
arrival_time_delivery_point: convertTo12Hour(formData.arrivalFixedPoint),
|
|
4848
|
+
departure_time_delivery_point: convertTo12Hour(formData.departureFixedPoint),
|
|
4849
|
+
time_of_arriving_back_fpl_after_delivery: convertTo12Hour(formData.returnFpl),
|
|
4795
4850
|
volume_water_tobe_delivery: formData.volume,
|
|
4796
4851
|
active: finalActiveStatus,
|
|
4797
4852
|
is_enable: finalActiveStatus,
|
|
@@ -4809,20 +4864,32 @@ const FixedPointScheduleManagement = ({
|
|
|
4809
4864
|
};
|
|
4810
4865
|
const mutationOptions = {
|
|
4811
4866
|
onError: error => {
|
|
4812
|
-
var _error$response, _error$response$data, _error$response$data$, _error$
|
|
4867
|
+
var _error$response, _error$response$data, _error$response$data$, _error$response2, _error$response2$data, _error$response2$data2, _error$response2$data3;
|
|
4868
|
+
const errMsg = (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.error) === null || _error$response$data$ === void 0 ? void 0 : _error$response$data$.message) || (error === null || error === void 0 ? void 0 : (_error$response2 = error.response) === null || _error$response2 === void 0 ? void 0 : (_error$response2$data = _error$response2.data) === null || _error$response2$data === void 0 ? void 0 : (_error$response2$data2 = _error$response2$data.Errors) === null || _error$response2$data2 === void 0 ? void 0 : (_error$response2$data3 = _error$response2$data2[0]) === null || _error$response2$data3 === void 0 ? void 0 : _error$response2$data3.message) || (error === null || error === void 0 ? void 0 : error.message) || "Operation Failed";
|
|
4813
4869
|
setToast({
|
|
4814
4870
|
key: "error",
|
|
4815
|
-
label:
|
|
4871
|
+
label: errMsg
|
|
4816
4872
|
});
|
|
4817
4873
|
setTimeout(closeToast, 5000);
|
|
4818
4874
|
},
|
|
4819
|
-
onSuccess:
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4875
|
+
onSuccess: response => {
|
|
4876
|
+
var _response$data;
|
|
4877
|
+
if (response !== null && response !== void 0 && response.error || response !== null && response !== void 0 && (_response$data = response.data) !== null && _response$data !== void 0 && _response$data.error) {
|
|
4878
|
+
var _response$error, _response$data2, _response$data2$error;
|
|
4879
|
+
const errMsg = (response === null || response === void 0 ? void 0 : (_response$error = response.error) === null || _response$error === void 0 ? void 0 : _response$error.message) || (response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$error = _response$data2.error) === null || _response$data2$error === void 0 ? void 0 : _response$data2$error.message) || "Operation Failed";
|
|
4880
|
+
setToast({
|
|
4881
|
+
key: "error",
|
|
4882
|
+
label: errMsg
|
|
4883
|
+
});
|
|
4884
|
+
setTimeout(closeToast, 5000);
|
|
4885
|
+
} else {
|
|
4886
|
+
setToast({
|
|
4887
|
+
label: editingRowIndex !== null ? t("WT_SCHEDULE_UPDATE_SUCCESS") : t("WT_SCHEDULE_CREATE_SUCCESS")
|
|
4888
|
+
});
|
|
4889
|
+
setShowModal(false);
|
|
4890
|
+
setEditingRowIndex(null);
|
|
4891
|
+
queryClient.invalidateQueries(["FIXED_POINT_SCHEDULE_SEARCH", tenantId]);
|
|
4892
|
+
}
|
|
4826
4893
|
}
|
|
4827
4894
|
};
|
|
4828
4895
|
if (editingRowIndex !== null) {
|
|
@@ -4831,11 +4898,16 @@ const FixedPointScheduleManagement = ({
|
|
|
4831
4898
|
createSchedule(payload, mutationOptions);
|
|
4832
4899
|
}
|
|
4833
4900
|
}
|
|
4834
|
-
}), toast && /*#__PURE__*/React.createElement(
|
|
4901
|
+
}), toast && /*#__PURE__*/React.createElement("div", {
|
|
4902
|
+
style: {
|
|
4903
|
+
position: "fixed",
|
|
4904
|
+
zIndex: 300000
|
|
4905
|
+
}
|
|
4906
|
+
}, /*#__PURE__*/React.createElement(Toast, {
|
|
4835
4907
|
error: toast.key === "error",
|
|
4836
4908
|
label: toast.label,
|
|
4837
4909
|
onClose: closeToast
|
|
4838
|
-
}));
|
|
4910
|
+
})));
|
|
4839
4911
|
};
|
|
4840
4912
|
|
|
4841
4913
|
const locationCache = new Map();
|
|
@@ -4914,13 +4986,46 @@ L.Icon.Default.mergeOptions({
|
|
|
4914
4986
|
iconUrl: "https://unpkg.com/leaflet@1.9.4/dist/images/marker-icon.png",
|
|
4915
4987
|
shadowUrl: "https://unpkg.com/leaflet@1.9.4/dist/images/marker-shadow.png"
|
|
4916
4988
|
});
|
|
4917
|
-
const onlineIcon =
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4989
|
+
const onlineIcon = L.divIcon({
|
|
4990
|
+
className: "blinking-green-dot",
|
|
4991
|
+
html: `
|
|
4992
|
+
<div style="position: relative;">
|
|
4993
|
+
<div style="
|
|
4994
|
+
width: 14px;
|
|
4995
|
+
height: 14px;
|
|
4996
|
+
background: #4caf50;
|
|
4997
|
+
border: 2px solid white;
|
|
4998
|
+
border-radius: 50%;
|
|
4999
|
+
box-shadow: 0 0 10px rgba(76, 175, 80, 0.8);
|
|
5000
|
+
z-index: 2;
|
|
5001
|
+
position: relative;
|
|
5002
|
+
animation: blink 1s infinite ease-in-out;
|
|
5003
|
+
"></div>
|
|
5004
|
+
<div style="
|
|
5005
|
+
position: absolute;
|
|
5006
|
+
top: -6px;
|
|
5007
|
+
left: -6px;
|
|
5008
|
+
width: 26px;
|
|
5009
|
+
height: 26px;
|
|
5010
|
+
background: rgba(76, 175, 80, 0.3);
|
|
5011
|
+
border-radius: 50%;
|
|
5012
|
+
animation: pulse 2s infinite;
|
|
5013
|
+
z-index: 1;
|
|
5014
|
+
"></div>
|
|
5015
|
+
<style>
|
|
5016
|
+
@keyframes blink {
|
|
5017
|
+
0%, 100% { opacity: 1; }
|
|
5018
|
+
50% { opacity: 0.6; }
|
|
5019
|
+
}
|
|
5020
|
+
@keyframes pulse {
|
|
5021
|
+
0% { transform: scale(0.6); opacity: 1; }
|
|
5022
|
+
100% { transform: scale(2); opacity: 0; }
|
|
5023
|
+
}
|
|
5024
|
+
</style>
|
|
5025
|
+
</div>
|
|
5026
|
+
`,
|
|
5027
|
+
iconSize: [14, 14],
|
|
5028
|
+
iconAnchor: [7, 7]
|
|
4924
5029
|
});
|
|
4925
5030
|
const offlineIcon = new L.Icon({
|
|
4926
5031
|
iconUrl: "https://raw.githubusercontent.com/pointhi/leaflet-color-markers/master/img/marker-icon-2x-red.png",
|
|
@@ -5073,68 +5178,13 @@ const RouteLayer = ({
|
|
|
5073
5178
|
}, t("ERROR_LOADING_ROUTE"), error);
|
|
5074
5179
|
}
|
|
5075
5180
|
if (!routeData) return null;
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
if (step.maneuver.type === "turn") {
|
|
5084
|
-
segmentColor = "#ff9800";
|
|
5085
|
-
} else if (step.maneuver.type === "straight") {
|
|
5086
|
-
segmentColor = "#4caf50";
|
|
5087
|
-
} else if (step.maneuver.type === "arrive") {
|
|
5088
|
-
segmentColor = "#f44336";
|
|
5089
|
-
}
|
|
5090
|
-
segments.push(/*#__PURE__*/React.createElement(React.Fragment, {
|
|
5091
|
-
key: `${legIndex}-${stepIndex}`
|
|
5092
|
-
}, /*#__PURE__*/React.createElement(Polyline, {
|
|
5093
|
-
positions: stepCoordinates,
|
|
5094
|
-
color: segmentColor,
|
|
5095
|
-
weight: _weight + 2,
|
|
5096
|
-
opacity: 0.3,
|
|
5097
|
-
lineCap: "round"
|
|
5098
|
-
}), /*#__PURE__*/React.createElement(Polyline, {
|
|
5099
|
-
positions: stepCoordinates,
|
|
5100
|
-
color: segmentColor,
|
|
5101
|
-
weight: _weight,
|
|
5102
|
-
opacity: 0.9,
|
|
5103
|
-
lineCap: "round",
|
|
5104
|
-
eventHandlers: {
|
|
5105
|
-
mouseover: () => setSelectedStep(step),
|
|
5106
|
-
mouseout: () => setSelectedStep(null),
|
|
5107
|
-
click: () => setShowSteps(!showSteps)
|
|
5108
|
-
}
|
|
5109
|
-
}), stepCoordinates.map((coord, idx) => {
|
|
5110
|
-
if (idx % 5 === 0 && idx < stepCoordinates.length - 1) {
|
|
5111
|
-
const nextCoord = stepCoordinates[idx + 1];
|
|
5112
|
-
const angle = Math.atan2(nextCoord[0] - coord[0], nextCoord[1] - coord[1]) * 180 / Math.PI;
|
|
5113
|
-
return /*#__PURE__*/React.createElement(Marker, {
|
|
5114
|
-
key: `dot-${legIndex}-${stepIndex}-${idx}`,
|
|
5115
|
-
position: coord,
|
|
5116
|
-
icon: L.divIcon({
|
|
5117
|
-
className: "direction-dot",
|
|
5118
|
-
html: `<div style="
|
|
5119
|
-
width: 6px;
|
|
5120
|
-
height: 6px;
|
|
5121
|
-
background: white;
|
|
5122
|
-
border: 2px solid ${segmentColor};
|
|
5123
|
-
border-radius: 50%;
|
|
5124
|
-
transform: rotate(${angle}deg);
|
|
5125
|
-
"></div>`,
|
|
5126
|
-
iconSize: [10, 10],
|
|
5127
|
-
iconAnchor: [5, 5]
|
|
5128
|
-
})
|
|
5129
|
-
});
|
|
5130
|
-
}
|
|
5131
|
-
return null;
|
|
5132
|
-
})));
|
|
5133
|
-
});
|
|
5134
|
-
});
|
|
5135
|
-
return segments;
|
|
5136
|
-
};
|
|
5137
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, renderRouteSegments(), (selectedStep || showSteps) && /*#__PURE__*/React.createElement("div", {
|
|
5181
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Polyline, {
|
|
5182
|
+
positions: routeData.coordinates,
|
|
5183
|
+
color: "#1F5FA8",
|
|
5184
|
+
weight: 5,
|
|
5185
|
+
opacity: 0.8,
|
|
5186
|
+
lineJoin: "round"
|
|
5187
|
+
}), (selectedStep || showSteps) && /*#__PURE__*/React.createElement("div", {
|
|
5138
5188
|
style: {
|
|
5139
5189
|
position: "absolute",
|
|
5140
5190
|
bottom: "80px",
|
|
@@ -5231,43 +5281,7 @@ const RouteLayer = ({
|
|
|
5231
5281
|
style: {
|
|
5232
5282
|
color: "#666"
|
|
5233
5283
|
}
|
|
5234
|
-
}, (step.distance / 1000).toFixed(2), " km \xB7 ", Math.round(step.duration / 60), " min")))))))
|
|
5235
|
-
coordinates: routeData.coordinates,
|
|
5236
|
-
totalDistance: routeData.distance
|
|
5237
|
-
}));
|
|
5238
|
-
};
|
|
5239
|
-
const RouteMarkers = ({
|
|
5240
|
-
coordinates,
|
|
5241
|
-
totalDistance
|
|
5242
|
-
}) => {
|
|
5243
|
-
const markers = [];
|
|
5244
|
-
const interval = 1000;
|
|
5245
|
-
for (let i = interval; i < totalDistance; i += interval) {
|
|
5246
|
-
const fraction = i / totalDistance;
|
|
5247
|
-
const index = Math.floor(coordinates.length * fraction);
|
|
5248
|
-
if (index < coordinates.length) {
|
|
5249
|
-
markers.push(/*#__PURE__*/React.createElement(Marker, {
|
|
5250
|
-
key: `dist-${i}`,
|
|
5251
|
-
position: coordinates[index],
|
|
5252
|
-
icon: L.divIcon({
|
|
5253
|
-
className: "distance-marker",
|
|
5254
|
-
html: `<div style="
|
|
5255
|
-
background: white;
|
|
5256
|
-
border: 2px solid #1F5FA8;
|
|
5257
|
-
border-radius: 12px;
|
|
5258
|
-
padding: 2px 6px;
|
|
5259
|
-
font-size: 10px;
|
|
5260
|
-
font-weight: bold;
|
|
5261
|
-
color: #1F5FA8;
|
|
5262
|
-
white-space: nowrap;
|
|
5263
|
-
">${(i / 1000).toFixed(0)} km</div>`,
|
|
5264
|
-
iconSize: [40, 20],
|
|
5265
|
-
iconAnchor: [20, 10]
|
|
5266
|
-
})
|
|
5267
|
-
}));
|
|
5268
|
-
}
|
|
5269
|
-
}
|
|
5270
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, markers);
|
|
5284
|
+
}, (step.distance / 1000).toFixed(2), " km \xB7 ", Math.round(step.duration / 60), " min"))))))));
|
|
5271
5285
|
};
|
|
5272
5286
|
const StatusBadge = ({
|
|
5273
5287
|
isOnline
|
|
@@ -5370,8 +5384,8 @@ const DriverCard = ({
|
|
|
5370
5384
|
return /*#__PURE__*/React.createElement("div", {
|
|
5371
5385
|
onClick: onClick,
|
|
5372
5386
|
style: {
|
|
5373
|
-
padding: "
|
|
5374
|
-
borderRadius: "
|
|
5387
|
+
padding: "10px",
|
|
5388
|
+
borderRadius: "8px",
|
|
5375
5389
|
background: isSelected ? "#f0f4ff" : "white",
|
|
5376
5390
|
border: `2px solid ${isSelected ? "#1F5FA8" : "#f0f0f0"}`,
|
|
5377
5391
|
cursor: "pointer",
|
|
@@ -5382,7 +5396,7 @@ const DriverCard = ({
|
|
|
5382
5396
|
style: {
|
|
5383
5397
|
display: "flex",
|
|
5384
5398
|
gap: "12px",
|
|
5385
|
-
marginBottom: "
|
|
5399
|
+
marginBottom: "8px"
|
|
5386
5400
|
}
|
|
5387
5401
|
}, /*#__PURE__*/React.createElement("div", {
|
|
5388
5402
|
style: {
|
|
@@ -5429,7 +5443,7 @@ const DriverCard = ({
|
|
|
5429
5443
|
style: {
|
|
5430
5444
|
display: "grid",
|
|
5431
5445
|
gridTemplateColumns: "1fr 1fr",
|
|
5432
|
-
gap: "
|
|
5446
|
+
gap: "8px"
|
|
5433
5447
|
}
|
|
5434
5448
|
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
5435
5449
|
style: {
|
|
@@ -5657,9 +5671,9 @@ function LiveTrackingSystem() {
|
|
|
5657
5671
|
display: "flex",
|
|
5658
5672
|
justifyContent: "space-between",
|
|
5659
5673
|
alignItems: "center",
|
|
5660
|
-
marginBottom: "
|
|
5674
|
+
marginBottom: "12px",
|
|
5661
5675
|
background: "white",
|
|
5662
|
-
padding: "
|
|
5676
|
+
padding: "12px 24px",
|
|
5663
5677
|
borderRadius: "12px",
|
|
5664
5678
|
boxShadow: "0 2px 8px rgba(0,0,0,0.05)",
|
|
5665
5679
|
border: "2px solid #1F5FA844"
|
|
@@ -5689,7 +5703,6 @@ function LiveTrackingSystem() {
|
|
|
5689
5703
|
gap: "6px",
|
|
5690
5704
|
background: "#e8f5e9",
|
|
5691
5705
|
color: "#2e7d32",
|
|
5692
|
-
padding: "4px 12px",
|
|
5693
5706
|
borderRadius: "20px",
|
|
5694
5707
|
fontSize: "12px",
|
|
5695
5708
|
fontWeight: "700",
|
|
@@ -5797,7 +5810,7 @@ function LiveTrackingSystem() {
|
|
|
5797
5810
|
}
|
|
5798
5811
|
}, showSidebar && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
5799
5812
|
style: {
|
|
5800
|
-
padding: "
|
|
5813
|
+
padding: "12px",
|
|
5801
5814
|
background: "white",
|
|
5802
5815
|
borderRadius: "12px",
|
|
5803
5816
|
display: "flex",
|
|
@@ -5811,7 +5824,7 @@ function LiveTrackingSystem() {
|
|
|
5811
5824
|
display: "flex",
|
|
5812
5825
|
justifyContent: "space-between",
|
|
5813
5826
|
alignItems: "center",
|
|
5814
|
-
marginBottom: "
|
|
5827
|
+
marginBottom: "8px"
|
|
5815
5828
|
}
|
|
5816
5829
|
}, /*#__PURE__*/React.createElement("h3", {
|
|
5817
5830
|
style: {
|
|
@@ -5840,8 +5853,8 @@ function LiveTrackingSystem() {
|
|
|
5840
5853
|
style: {
|
|
5841
5854
|
display: "flex",
|
|
5842
5855
|
flexDirection: "column",
|
|
5843
|
-
gap: "
|
|
5844
|
-
marginBottom: "
|
|
5856
|
+
gap: "8px",
|
|
5857
|
+
marginBottom: "12px"
|
|
5845
5858
|
}
|
|
5846
5859
|
}, /*#__PURE__*/React.createElement("div", {
|
|
5847
5860
|
style: {
|
|
@@ -5933,7 +5946,7 @@ function LiveTrackingSystem() {
|
|
|
5933
5946
|
display: "flex",
|
|
5934
5947
|
justifyContent: "space-between",
|
|
5935
5948
|
alignItems: "center",
|
|
5936
|
-
marginBottom: "
|
|
5949
|
+
marginBottom: "8px"
|
|
5937
5950
|
}
|
|
5938
5951
|
}, /*#__PURE__*/React.createElement("div", {
|
|
5939
5952
|
style: {
|
|
@@ -6021,7 +6034,7 @@ function LiveTrackingSystem() {
|
|
|
6021
6034
|
},
|
|
6022
6035
|
zoomControl: false
|
|
6023
6036
|
}, /*#__PURE__*/React.createElement(TileLayer, {
|
|
6024
|
-
url: "https://{s}.
|
|
6037
|
+
url: "https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png",
|
|
6025
6038
|
attribution: "\xA9 <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a>"
|
|
6026
6039
|
}), /*#__PURE__*/React.createElement(MapController, {
|
|
6027
6040
|
selectedDriver: selectedDriver,
|
|
@@ -6391,7 +6404,7 @@ const AddFixFillAddress = ({
|
|
|
6391
6404
|
isEdit,
|
|
6392
6405
|
userDetails
|
|
6393
6406
|
}) => {
|
|
6394
|
-
var _location$state, _formData$address, _formData$address2, _formData$address3, _formData$address4, _formData$address5, _formData$address6, _formData$address7, _formData$address8, _formData$address9, _formData$address0, _formData$address1, _formData$address10, _formData$address11, _formData$address12
|
|
6407
|
+
var _location$state, _formData$address, _formData$address2, _formData$address3, _formData$address4, _formData$address5, _formData$address6, _formData$address7, _formData$address8, _formData$address9, _formData$address0, _formData$address1, _formData$address10, _formData$address11, _formData$address12;
|
|
6395
6408
|
const {
|
|
6396
6409
|
data: allCities
|
|
6397
6410
|
} = Digit.Hooks.useTenants();
|
|
@@ -6640,32 +6653,7 @@ const AddFixFillAddress = ({
|
|
|
6640
6653
|
defaultOpen: true
|
|
6641
6654
|
}, /*#__PURE__*/React.createElement("div", {
|
|
6642
6655
|
className: "formcomposer-section-grid"
|
|
6643
|
-
},
|
|
6644
|
-
selected: selectedAddress,
|
|
6645
|
-
select: setSelectedAddress,
|
|
6646
|
-
option: userDetails.addresses || [],
|
|
6647
|
-
optionKey: "address",
|
|
6648
|
-
t: t,
|
|
6649
|
-
style: {
|
|
6650
|
-
width: "100%"
|
|
6651
|
-
}
|
|
6652
|
-
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("COMMON_ADDRESS_TYPE")), /*#__PURE__*/React.createElement(Dropdown, {
|
|
6653
|
-
selected: addressType,
|
|
6654
|
-
select: setAddressType,
|
|
6655
|
-
option: availableAddressTypeOptions || [],
|
|
6656
|
-
optionKey: "i18nKey",
|
|
6657
|
-
t: t,
|
|
6658
|
-
style: {
|
|
6659
|
-
width: "100%"
|
|
6660
|
-
}
|
|
6661
|
-
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("CITY")), /*#__PURE__*/React.createElement(Dropdown, {
|
|
6662
|
-
selected: city,
|
|
6663
|
-
select: setCity,
|
|
6664
|
-
option: allCities || [],
|
|
6665
|
-
optionKey: "i18nKey",
|
|
6666
|
-
t: t,
|
|
6667
|
-
disable: true
|
|
6668
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
6656
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
6669
6657
|
style: {
|
|
6670
6658
|
position: "relative"
|
|
6671
6659
|
}
|
|
@@ -7421,11 +7409,13 @@ const PointAddressMap = ({
|
|
|
7421
7409
|
t
|
|
7422
7410
|
}) => {
|
|
7423
7411
|
var _selectedFillingPoint;
|
|
7412
|
+
const history = useHistory();
|
|
7424
7413
|
const [selectedFillingPoint, setSelectedFillingPoint] = useState(null);
|
|
7425
7414
|
const [selectedFixedPoint, setSelectedFixedPoint] = useState(null);
|
|
7426
7415
|
const [hoveredFixedPointId, setHoveredFixedPointId] = useState(null);
|
|
7427
7416
|
const [mapCenter, setMapCenter] = useState(null);
|
|
7428
7417
|
const [mapZoom, setMapZoom] = useState(11);
|
|
7418
|
+
const markerRefs = useRef({});
|
|
7429
7419
|
const defaultCenter = [28.6139, 77.209];
|
|
7430
7420
|
const getFpId = fp => {
|
|
7431
7421
|
var _fp$fillingpointmetad;
|
|
@@ -7460,17 +7450,21 @@ const PointAddressMap = ({
|
|
|
7460
7450
|
})) || [];
|
|
7461
7451
|
}, [_fillingPoints, selectedFillingPoint]);
|
|
7462
7452
|
const displayFixedPoints = useMemo(() => {
|
|
7463
|
-
if (selectedFixedPoint) {
|
|
7464
|
-
return [selectedFixedPoint].filter(fx => {
|
|
7465
|
-
var _fx$address, _fx$address2;
|
|
7466
|
-
return ((_fx$address = fx.address) === null || _fx$address === void 0 ? void 0 : _fx$address.latitude) && ((_fx$address2 = fx.address) === null || _fx$address2 === void 0 ? void 0 : _fx$address2.longitude);
|
|
7467
|
-
});
|
|
7468
|
-
}
|
|
7469
7453
|
return relatedFixedPoints.filter(fx => {
|
|
7470
|
-
var _fx$
|
|
7471
|
-
return ((_fx$
|
|
7454
|
+
var _fx$address, _fx$address2;
|
|
7455
|
+
return ((_fx$address = fx.address) === null || _fx$address === void 0 ? void 0 : _fx$address.latitude) && ((_fx$address2 = fx.address) === null || _fx$address2 === void 0 ? void 0 : _fx$address2.longitude);
|
|
7472
7456
|
});
|
|
7473
|
-
}, [relatedFixedPoints
|
|
7457
|
+
}, [relatedFixedPoints]);
|
|
7458
|
+
useEffect(() => {
|
|
7459
|
+
if (selectedFixedPoint) {
|
|
7460
|
+
var _selectedFixedPoint$a;
|
|
7461
|
+
const fxId = selectedFixedPoint.id || ((_selectedFixedPoint$a = selectedFixedPoint.applicantDetail) === null || _selectedFixedPoint$a === void 0 ? void 0 : _selectedFixedPoint$a.applicantId);
|
|
7462
|
+
const marker = markerRefs.current[fxId];
|
|
7463
|
+
if (marker) {
|
|
7464
|
+
marker.openPopup();
|
|
7465
|
+
}
|
|
7466
|
+
}
|
|
7467
|
+
}, [selectedFixedPoint]);
|
|
7474
7468
|
const bounds = useMemo(() => {
|
|
7475
7469
|
const allPoints = [...displayFillingPoints.map(p => [parseFloat(p.address.latitude), parseFloat(p.address.longitude)]), ...displayFixedPoints.map(p => [parseFloat(p.address.latitude), parseFloat(p.address.longitude)])];
|
|
7476
7470
|
if (allPoints.length === 0) return null;
|
|
@@ -7482,11 +7476,24 @@ const PointAddressMap = ({
|
|
|
7482
7476
|
setMapCenter(null);
|
|
7483
7477
|
};
|
|
7484
7478
|
const handleFixedPointSelect = val => {
|
|
7485
|
-
var _val$
|
|
7486
|
-
|
|
7487
|
-
|
|
7488
|
-
|
|
7489
|
-
|
|
7479
|
+
var _selectedFixedPoint$a2, _selectedFixedPoint$a3, _val$applicantDetail, _val$applicantDetail2;
|
|
7480
|
+
const currentId = (selectedFixedPoint === null || selectedFixedPoint === void 0 ? void 0 : (_selectedFixedPoint$a2 = selectedFixedPoint.applicantDetail) === null || _selectedFixedPoint$a2 === void 0 ? void 0 : _selectedFixedPoint$a2.fixedPointId) || (selectedFixedPoint === null || selectedFixedPoint === void 0 ? void 0 : selectedFixedPoint.id) || (selectedFixedPoint === null || selectedFixedPoint === void 0 ? void 0 : (_selectedFixedPoint$a3 = selectedFixedPoint.applicantDetail) === null || _selectedFixedPoint$a3 === void 0 ? void 0 : _selectedFixedPoint$a3.applicantId);
|
|
7481
|
+
const incomingId = (val === null || val === void 0 ? void 0 : (_val$applicantDetail = val.applicantDetail) === null || _val$applicantDetail === void 0 ? void 0 : _val$applicantDetail.fixedPointId) || (val === null || val === void 0 ? void 0 : val.id) || (val === null || val === void 0 ? void 0 : (_val$applicantDetail2 = val.applicantDetail) === null || _val$applicantDetail2 === void 0 ? void 0 : _val$applicantDetail2.applicantId);
|
|
7482
|
+
if (selectedFixedPoint && currentId === incomingId) {
|
|
7483
|
+
var _val$applicantDetail3;
|
|
7484
|
+
setSelectedFixedPoint(null);
|
|
7485
|
+
const markerId = val.id || ((_val$applicantDetail3 = val.applicantDetail) === null || _val$applicantDetail3 === void 0 ? void 0 : _val$applicantDetail3.applicantId);
|
|
7486
|
+
const marker = markerRefs.current[markerId];
|
|
7487
|
+
if (marker) {
|
|
7488
|
+
marker.closePopup();
|
|
7489
|
+
}
|
|
7490
|
+
} else {
|
|
7491
|
+
var _val$address, _val$address2;
|
|
7492
|
+
setSelectedFixedPoint(val);
|
|
7493
|
+
if (val !== null && val !== void 0 && (_val$address = val.address) !== null && _val$address !== void 0 && _val$address.latitude && val !== null && val !== void 0 && (_val$address2 = val.address) !== null && _val$address2 !== void 0 && _val$address2.longitude) {
|
|
7494
|
+
setMapCenter([parseFloat(val.address.latitude), parseFloat(val.address.longitude)]);
|
|
7495
|
+
setMapZoom(16);
|
|
7496
|
+
}
|
|
7490
7497
|
}
|
|
7491
7498
|
};
|
|
7492
7499
|
const fixedPointOptions = useMemo(() => {
|
|
@@ -7527,7 +7534,8 @@ const PointAddressMap = ({
|
|
|
7527
7534
|
flexDirection: "column",
|
|
7528
7535
|
gap: "20px",
|
|
7529
7536
|
background: "#f9f9f9",
|
|
7530
|
-
zIndex: 10
|
|
7537
|
+
zIndex: 10,
|
|
7538
|
+
overflowY: "auto"
|
|
7531
7539
|
}
|
|
7532
7540
|
}, /*#__PURE__*/React.createElement("h3", {
|
|
7533
7541
|
style: {
|
|
@@ -7578,15 +7586,18 @@ const PointAddressMap = ({
|
|
|
7578
7586
|
gap: "8px"
|
|
7579
7587
|
}
|
|
7580
7588
|
}, relatedFixedPoints.length > 0 ? relatedFixedPoints.map((fx, idx) => {
|
|
7581
|
-
var _fx$applicantDetail2, _selectedFixedPoint$
|
|
7582
|
-
const
|
|
7589
|
+
var _fx$applicantDetail2, _fx$applicantDetail3, _selectedFixedPoint$a4, _selectedFixedPoint$a5, _fx$applicantDetail4, _fx$applicantDetail5, _fx$applicantDetail6, _fx$applicantDetail7, _fx$address5, _fx$applicantDetail8, _fx$applicantDetail9, _fx$address6, _fx$address7, _fx$address8, _fx$address9;
|
|
7590
|
+
const currentFxId = (fx === null || fx === void 0 ? void 0 : (_fx$applicantDetail2 = fx.applicantDetail) === null || _fx$applicantDetail2 === void 0 ? void 0 : _fx$applicantDetail2.fixedPointId) || (fx === null || fx === void 0 ? void 0 : fx.id) || (fx === null || fx === void 0 ? void 0 : (_fx$applicantDetail3 = fx.applicantDetail) === null || _fx$applicantDetail3 === void 0 ? void 0 : _fx$applicantDetail3.applicantId) || idx;
|
|
7591
|
+
const selectedFxId = (selectedFixedPoint === null || selectedFixedPoint === void 0 ? void 0 : (_selectedFixedPoint$a4 = selectedFixedPoint.applicantDetail) === null || _selectedFixedPoint$a4 === void 0 ? void 0 : _selectedFixedPoint$a4.fixedPointId) || (selectedFixedPoint === null || selectedFixedPoint === void 0 ? void 0 : selectedFixedPoint.id) || (selectedFixedPoint === null || selectedFixedPoint === void 0 ? void 0 : (_selectedFixedPoint$a5 = selectedFixedPoint.applicantDetail) === null || _selectedFixedPoint$a5 === void 0 ? void 0 : _selectedFixedPoint$a5.applicantId);
|
|
7592
|
+
const isSelected = selectedFixedPoint && currentFxId === selectedFxId;
|
|
7593
|
+
const hoverOrMarkerId = fx.id || ((_fx$applicantDetail4 = fx.applicantDetail) === null || _fx$applicantDetail4 === void 0 ? void 0 : _fx$applicantDetail4.applicantId) || idx;
|
|
7583
7594
|
return /*#__PURE__*/React.createElement("div", {
|
|
7584
7595
|
key: idx,
|
|
7585
7596
|
onClick: () => handleFixedPointSelect(fx),
|
|
7586
7597
|
onMouseEnter: () => {
|
|
7587
|
-
var _fx$
|
|
7588
|
-
setHoveredFixedPointId(
|
|
7589
|
-
if (fx !== null && fx !== void 0 && (_fx$
|
|
7598
|
+
var _fx$address3, _fx$address4;
|
|
7599
|
+
setHoveredFixedPointId(hoverOrMarkerId);
|
|
7600
|
+
if (fx !== null && fx !== void 0 && (_fx$address3 = fx.address) !== null && _fx$address3 !== void 0 && _fx$address3.latitude && fx !== null && fx !== void 0 && (_fx$address4 = fx.address) !== null && _fx$address4 !== void 0 && _fx$address4.longitude) {
|
|
7590
7601
|
setMapCenter([parseFloat(fx.address.latitude), parseFloat(fx.address.longitude)]);
|
|
7591
7602
|
setMapZoom(16);
|
|
7592
7603
|
}
|
|
@@ -7603,10 +7614,10 @@ const PointAddressMap = ({
|
|
|
7603
7614
|
color: isSelected ? "#1D4E7F" : "#333",
|
|
7604
7615
|
fontWeight: isSelected ? "600" : "400",
|
|
7605
7616
|
display: "flex",
|
|
7606
|
-
alignItems: "
|
|
7617
|
+
alignItems: "flex-start",
|
|
7607
7618
|
gap: "10px",
|
|
7608
|
-
boxShadow: isSelected ? "0 2px 8px rgba(29, 78, 127, 0.15)" : hoveredFixedPointId ===
|
|
7609
|
-
transform: hoveredFixedPointId ===
|
|
7619
|
+
boxShadow: isSelected ? "0 2px 8px rgba(29, 78, 127, 0.15)" : hoveredFixedPointId === hoverOrMarkerId ? "0 4px 12px rgba(0,0,0,0.1)" : "none",
|
|
7620
|
+
transform: hoveredFixedPointId === hoverOrMarkerId ? "translateX(4px)" : "none"
|
|
7610
7621
|
}
|
|
7611
7622
|
}, /*#__PURE__*/React.createElement("div", {
|
|
7612
7623
|
style: {
|
|
@@ -7614,20 +7625,77 @@ const PointAddressMap = ({
|
|
|
7614
7625
|
height: "10px",
|
|
7615
7626
|
borderRadius: "50%",
|
|
7616
7627
|
background: "#417505",
|
|
7617
|
-
boxShadow: "0 0 4px rgba(65, 117, 5, 0.4)"
|
|
7628
|
+
boxShadow: "0 0 4px rgba(65, 117, 5, 0.4)",
|
|
7629
|
+
marginTop: "5px",
|
|
7630
|
+
flexShrink: 0
|
|
7618
7631
|
}
|
|
7619
7632
|
}), /*#__PURE__*/React.createElement("div", {
|
|
7633
|
+
style: {
|
|
7634
|
+
display: "flex",
|
|
7635
|
+
flexDirection: "column",
|
|
7636
|
+
flex: 1
|
|
7637
|
+
}
|
|
7638
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
7639
|
+
style: {
|
|
7640
|
+
display: "flex",
|
|
7641
|
+
justifyContent: "space-between",
|
|
7642
|
+
alignItems: "flex-start"
|
|
7643
|
+
}
|
|
7644
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
7620
7645
|
style: {
|
|
7621
7646
|
display: "flex",
|
|
7622
7647
|
flexDirection: "column"
|
|
7623
7648
|
}
|
|
7624
|
-
}, /*#__PURE__*/React.createElement("span",
|
|
7649
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
7650
|
+
style: {
|
|
7651
|
+
fontWeight: "700"
|
|
7652
|
+
}
|
|
7653
|
+
}, (fx === null || fx === void 0 ? void 0 : (_fx$applicantDetail5 = fx.applicantDetail) === null || _fx$applicantDetail5 === void 0 ? void 0 : _fx$applicantDetail5.fixedPointId) || "NA"), /*#__PURE__*/React.createElement("span", {
|
|
7625
7654
|
style: {
|
|
7626
7655
|
fontSize: "11px",
|
|
7627
7656
|
color: "#888",
|
|
7628
7657
|
fontWeight: "400"
|
|
7629
7658
|
}
|
|
7630
|
-
}, fx === null || fx === void 0 ? void 0 : (_fx$
|
|
7659
|
+
}, (fx === null || fx === void 0 ? void 0 : (_fx$applicantDetail6 = fx.applicantDetail) === null || _fx$applicantDetail6 === void 0 ? void 0 : _fx$applicantDetail6.name) || (fx === null || fx === void 0 ? void 0 : fx.name) || "NA")), /*#__PURE__*/React.createElement("div", {
|
|
7660
|
+
style: {
|
|
7661
|
+
color: "#1D4E7F",
|
|
7662
|
+
fontSize: "10px",
|
|
7663
|
+
paddingTop: "4px"
|
|
7664
|
+
}
|
|
7665
|
+
}, isSelected ? "▲" : "▼")), isSelected && /*#__PURE__*/React.createElement("div", {
|
|
7666
|
+
style: {
|
|
7667
|
+
marginTop: "8px",
|
|
7668
|
+
paddingTop: "8px",
|
|
7669
|
+
borderTop: "1px solid #eee",
|
|
7670
|
+
fontSize: "12px",
|
|
7671
|
+
color: "#555",
|
|
7672
|
+
display: "flex",
|
|
7673
|
+
flexDirection: "column",
|
|
7674
|
+
gap: "4px"
|
|
7675
|
+
}
|
|
7676
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("strong", null, t("WT_MOBILE_NUMBER"), ":"), " ", (fx === null || fx === void 0 ? void 0 : (_fx$applicantDetail7 = fx.applicantDetail) === null || _fx$applicantDetail7 === void 0 ? void 0 : _fx$applicantDetail7.mobileNumber) || "NA"), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("strong", null, t("WT_LOCALITY"), ":"), " ", (fx === null || fx === void 0 ? void 0 : (_fx$address5 = fx.address) === null || _fx$address5 === void 0 ? void 0 : _fx$address5.locality) || "NA"), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("strong", null, "Email:"), " ", (fx === null || fx === void 0 ? void 0 : (_fx$applicantDetail8 = fx.applicantDetail) === null || _fx$applicantDetail8 === void 0 ? void 0 : _fx$applicantDetail8.emailId) || "NA"), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("strong", null, "Alt Mobile:"), " ", (fx === null || fx === void 0 ? void 0 : (_fx$applicantDetail9 = fx.applicantDetail) === null || _fx$applicantDetail9 === void 0 ? void 0 : _fx$applicantDetail9.alternateNumber) || "NA"), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("strong", null, "Address:"), " ", [fx === null || fx === void 0 ? void 0 : (_fx$address6 = fx.address) === null || _fx$address6 === void 0 ? void 0 : _fx$address6.houseNo, fx === null || fx === void 0 ? void 0 : (_fx$address7 = fx.address) === null || _fx$address7 === void 0 ? void 0 : _fx$address7.streetName, fx === null || fx === void 0 ? void 0 : (_fx$address8 = fx.address) === null || _fx$address8 === void 0 ? void 0 : _fx$address8.city, fx === null || fx === void 0 ? void 0 : (_fx$address9 = fx.address) === null || _fx$address9 === void 0 ? void 0 : _fx$address9.pincode].filter(Boolean).join(", ") || "NA"), /*#__PURE__*/React.createElement("button", {
|
|
7677
|
+
onClick: e => {
|
|
7678
|
+
var _fx$applicantDetail0;
|
|
7679
|
+
e.stopPropagation();
|
|
7680
|
+
const idToEdit = (fx === null || fx === void 0 ? void 0 : fx.id) || (fx === null || fx === void 0 ? void 0 : (_fx$applicantDetail0 = fx.applicantDetail) === null || _fx$applicantDetail0 === void 0 ? void 0 : _fx$applicantDetail0.applicantId);
|
|
7681
|
+
history.push(`/digit-ui/employee/wt/add-fix-point-address?id=${idToEdit}`);
|
|
7682
|
+
},
|
|
7683
|
+
style: {
|
|
7684
|
+
marginTop: "8px",
|
|
7685
|
+
padding: "6px 12px",
|
|
7686
|
+
background: "#F47738",
|
|
7687
|
+
color: "#fff",
|
|
7688
|
+
border: "none",
|
|
7689
|
+
borderRadius: "4px",
|
|
7690
|
+
cursor: "pointer",
|
|
7691
|
+
fontSize: "12px",
|
|
7692
|
+
fontWeight: "bold",
|
|
7693
|
+
alignSelf: "flex-start",
|
|
7694
|
+
transition: "background 0.2s"
|
|
7695
|
+
},
|
|
7696
|
+
onMouseEnter: e => e.target.style.background = "#D6662E",
|
|
7697
|
+
onMouseLeave: e => e.target.style.background = "#F47738"
|
|
7698
|
+
}, "Edit Fixed Point"))));
|
|
7631
7699
|
}) : /*#__PURE__*/React.createElement("div", {
|
|
7632
7700
|
style: {
|
|
7633
7701
|
textAlign: "center",
|
|
@@ -7728,7 +7796,7 @@ const PointAddressMap = ({
|
|
|
7728
7796
|
center: mapCenter,
|
|
7729
7797
|
zoom: mapZoom
|
|
7730
7798
|
}), displayFillingPoints.map((fp, index) => {
|
|
7731
|
-
var _fp$address5;
|
|
7799
|
+
var _fp$address5, _fp$address6, _fp$address7;
|
|
7732
7800
|
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
7733
7801
|
key: `fp-group-${fp.id || index}`
|
|
7734
7802
|
}, /*#__PURE__*/React.createElement(Circle, {
|
|
@@ -7775,6 +7843,31 @@ const PointAddressMap = ({
|
|
|
7775
7843
|
fontSize: "12px"
|
|
7776
7844
|
}
|
|
7777
7845
|
}, /*#__PURE__*/React.createElement("strong", null, t("WT_LOCALITY"), ":"), " ", ((_fp$address5 = fp.address) === null || _fp$address5 === void 0 ? void 0 : _fp$address5.locality) || "NA"), /*#__PURE__*/React.createElement("p", {
|
|
7846
|
+
style: {
|
|
7847
|
+
margin: 0,
|
|
7848
|
+
fontSize: "12px"
|
|
7849
|
+
}
|
|
7850
|
+
}, /*#__PURE__*/React.createElement("strong", null, t("WT_AE_NAME"), ":"), " ", (fp === null || fp === void 0 ? void 0 : fp.aeName) || "NA", " (", (fp === null || fp === void 0 ? void 0 : fp.aeMobile) || "NA", ")"), /*#__PURE__*/React.createElement("p", {
|
|
7851
|
+
style: {
|
|
7852
|
+
margin: 0,
|
|
7853
|
+
fontSize: "12px"
|
|
7854
|
+
}
|
|
7855
|
+
}, /*#__PURE__*/React.createElement("strong", null, t("WT_JE_NAME"), ":"), " ", (fp === null || fp === void 0 ? void 0 : fp.jeName) || "NA", " (", (fp === null || fp === void 0 ? void 0 : fp.jeMobile) || "NA", ")"), /*#__PURE__*/React.createElement("p", {
|
|
7856
|
+
style: {
|
|
7857
|
+
margin: 0,
|
|
7858
|
+
fontSize: "12px"
|
|
7859
|
+
}
|
|
7860
|
+
}, /*#__PURE__*/React.createElement("strong", null, t("WT_EE_NAME"), ":"), " ", (fp === null || fp === void 0 ? void 0 : fp.eeName) || "NA", " (", (fp === null || fp === void 0 ? void 0 : fp.eeMobile) || "NA", ")"), /*#__PURE__*/React.createElement("p", {
|
|
7861
|
+
style: {
|
|
7862
|
+
margin: 0,
|
|
7863
|
+
fontSize: "12px"
|
|
7864
|
+
}
|
|
7865
|
+
}, /*#__PURE__*/React.createElement("strong", null, "Latitude:"), " ", ((_fp$address6 = fp.address) === null || _fp$address6 === void 0 ? void 0 : _fp$address6.latitude) || "NA"), /*#__PURE__*/React.createElement("p", {
|
|
7866
|
+
style: {
|
|
7867
|
+
margin: 0,
|
|
7868
|
+
fontSize: "12px"
|
|
7869
|
+
}
|
|
7870
|
+
}, /*#__PURE__*/React.createElement("strong", null, "Longitude:"), " ", ((_fp$address7 = fp.address) === null || _fp$address7 === void 0 ? void 0 : _fp$address7.longitude) || "NA"), /*#__PURE__*/React.createElement("p", {
|
|
7778
7871
|
style: {
|
|
7779
7872
|
margin: 0,
|
|
7780
7873
|
fontSize: "12px",
|
|
@@ -7782,14 +7875,18 @@ const PointAddressMap = ({
|
|
|
7782
7875
|
}
|
|
7783
7876
|
}, /*#__PURE__*/React.createElement("strong", null, "Coverage:"), " 5 KM Radius"))))));
|
|
7784
7877
|
}), displayFixedPoints.map((fx, index) => {
|
|
7785
|
-
var _fx$
|
|
7786
|
-
const fxId = fx.id || ((_fx$
|
|
7878
|
+
var _fx$applicantDetail1, _fx$applicantDetail10, _fx$applicantDetail11, _selectedFixedPoint$a6, _selectedFixedPoint$a7, _fx$applicantDetail12, _fx$applicantDetail13, _fx$applicantDetail14, _fx$address0, _fx$applicantDetail15, _fx$applicantDetail16, _fx$address1, _fx$address10, _fx$address11, _fx$address12, _fx$address13, _fx$address14;
|
|
7879
|
+
const fxId = fx.id || ((_fx$applicantDetail1 = fx.applicantDetail) === null || _fx$applicantDetail1 === void 0 ? void 0 : _fx$applicantDetail1.applicantId) || index;
|
|
7787
7880
|
const isHovered = hoveredFixedPointId === fxId;
|
|
7881
|
+
const currentFxId = (fx === null || fx === void 0 ? void 0 : (_fx$applicantDetail10 = fx.applicantDetail) === null || _fx$applicantDetail10 === void 0 ? void 0 : _fx$applicantDetail10.fixedPointId) || (fx === null || fx === void 0 ? void 0 : fx.id) || (fx === null || fx === void 0 ? void 0 : (_fx$applicantDetail11 = fx.applicantDetail) === null || _fx$applicantDetail11 === void 0 ? void 0 : _fx$applicantDetail11.applicantId) || index;
|
|
7882
|
+
const selectedFxId = (selectedFixedPoint === null || selectedFixedPoint === void 0 ? void 0 : (_selectedFixedPoint$a6 = selectedFixedPoint.applicantDetail) === null || _selectedFixedPoint$a6 === void 0 ? void 0 : _selectedFixedPoint$a6.fixedPointId) || (selectedFixedPoint === null || selectedFixedPoint === void 0 ? void 0 : selectedFixedPoint.id) || (selectedFixedPoint === null || selectedFixedPoint === void 0 ? void 0 : (_selectedFixedPoint$a7 = selectedFixedPoint.applicantDetail) === null || _selectedFixedPoint$a7 === void 0 ? void 0 : _selectedFixedPoint$a7.applicantId);
|
|
7883
|
+
const isSelected = selectedFixedPoint && currentFxId === selectedFxId;
|
|
7788
7884
|
return /*#__PURE__*/React.createElement(Marker, {
|
|
7789
7885
|
key: `fx-${fxId}`,
|
|
7790
7886
|
position: [parseFloat(fx.address.latitude), parseFloat(fx.address.longitude)],
|
|
7791
|
-
icon: isHovered ? enlargedFixedPointIcon : fixedPointIcon,
|
|
7792
|
-
zIndexOffset: isHovered ? 1000 : 0
|
|
7887
|
+
icon: isHovered || isSelected ? enlargedFixedPointIcon : fixedPointIcon,
|
|
7888
|
+
zIndexOffset: isHovered || isSelected ? 1000 : 0,
|
|
7889
|
+
ref: r => markerRefs.current[fxId] = r
|
|
7793
7890
|
}, /*#__PURE__*/React.createElement(Popup, null, /*#__PURE__*/React.createElement("div", {
|
|
7794
7891
|
style: {
|
|
7795
7892
|
padding: "8px",
|
|
@@ -7803,7 +7900,7 @@ const PointAddressMap = ({
|
|
|
7803
7900
|
borderBottom: "1px solid #eee",
|
|
7804
7901
|
paddingBottom: "4px"
|
|
7805
7902
|
}
|
|
7806
|
-
}, (fx === null || fx === void 0 ? void 0 : (_fx$
|
|
7903
|
+
}, (fx === null || fx === void 0 ? void 0 : (_fx$applicantDetail12 = fx.applicantDetail) === null || _fx$applicantDetail12 === void 0 ? void 0 : _fx$applicantDetail12.name) || (fx === null || fx === void 0 ? void 0 : fx.name) || "NA", " (Fixed Point)"), /*#__PURE__*/React.createElement("div", {
|
|
7807
7904
|
style: {
|
|
7808
7905
|
display: "flex",
|
|
7809
7906
|
flexDirection: "column",
|
|
@@ -7814,17 +7911,42 @@ const PointAddressMap = ({
|
|
|
7814
7911
|
margin: 0,
|
|
7815
7912
|
fontSize: "12px"
|
|
7816
7913
|
}
|
|
7817
|
-
}, /*#__PURE__*/React.createElement("strong", null, t("WT_FIXED_POINT_CODE"), ":"), " ", (fx === null || fx === void 0 ? void 0 : (_fx$
|
|
7914
|
+
}, /*#__PURE__*/React.createElement("strong", null, t("WT_FIXED_POINT_CODE"), ":"), " ", (fx === null || fx === void 0 ? void 0 : (_fx$applicantDetail13 = fx.applicantDetail) === null || _fx$applicantDetail13 === void 0 ? void 0 : _fx$applicantDetail13.fixedPointId) || "NA"), /*#__PURE__*/React.createElement("p", {
|
|
7915
|
+
style: {
|
|
7916
|
+
margin: 0,
|
|
7917
|
+
fontSize: "12px"
|
|
7918
|
+
}
|
|
7919
|
+
}, /*#__PURE__*/React.createElement("strong", null, t("WT_MOBILE_NUMBER"), ":"), " ", (fx === null || fx === void 0 ? void 0 : (_fx$applicantDetail14 = fx.applicantDetail) === null || _fx$applicantDetail14 === void 0 ? void 0 : _fx$applicantDetail14.mobileNumber) || "NA"), /*#__PURE__*/React.createElement("p", {
|
|
7920
|
+
style: {
|
|
7921
|
+
margin: 0,
|
|
7922
|
+
fontSize: "12px"
|
|
7923
|
+
}
|
|
7924
|
+
}, /*#__PURE__*/React.createElement("strong", null, t("WT_LOCALITY"), ":"), " ", (fx === null || fx === void 0 ? void 0 : (_fx$address0 = fx.address) === null || _fx$address0 === void 0 ? void 0 : _fx$address0.locality) || "NA"), /*#__PURE__*/React.createElement("p", {
|
|
7925
|
+
style: {
|
|
7926
|
+
margin: 0,
|
|
7927
|
+
fontSize: "12px"
|
|
7928
|
+
}
|
|
7929
|
+
}, /*#__PURE__*/React.createElement("strong", null, "Email:"), " ", (fx === null || fx === void 0 ? void 0 : (_fx$applicantDetail15 = fx.applicantDetail) === null || _fx$applicantDetail15 === void 0 ? void 0 : _fx$applicantDetail15.emailId) || "NA"), /*#__PURE__*/React.createElement("p", {
|
|
7930
|
+
style: {
|
|
7931
|
+
margin: 0,
|
|
7932
|
+
fontSize: "12px"
|
|
7933
|
+
}
|
|
7934
|
+
}, /*#__PURE__*/React.createElement("strong", null, "Alt Mobile:"), " ", (fx === null || fx === void 0 ? void 0 : (_fx$applicantDetail16 = fx.applicantDetail) === null || _fx$applicantDetail16 === void 0 ? void 0 : _fx$applicantDetail16.alternateNumber) || "NA"), /*#__PURE__*/React.createElement("p", {
|
|
7935
|
+
style: {
|
|
7936
|
+
margin: 0,
|
|
7937
|
+
fontSize: "12px"
|
|
7938
|
+
}
|
|
7939
|
+
}, /*#__PURE__*/React.createElement("strong", null, "Address:"), " ", [fx === null || fx === void 0 ? void 0 : (_fx$address1 = fx.address) === null || _fx$address1 === void 0 ? void 0 : _fx$address1.houseNo, fx === null || fx === void 0 ? void 0 : (_fx$address10 = fx.address) === null || _fx$address10 === void 0 ? void 0 : _fx$address10.streetName, fx === null || fx === void 0 ? void 0 : (_fx$address11 = fx.address) === null || _fx$address11 === void 0 ? void 0 : _fx$address11.city, fx === null || fx === void 0 ? void 0 : (_fx$address12 = fx.address) === null || _fx$address12 === void 0 ? void 0 : _fx$address12.pincode].filter(Boolean).join(", ") || "NA"), /*#__PURE__*/React.createElement("p", {
|
|
7818
7940
|
style: {
|
|
7819
7941
|
margin: 0,
|
|
7820
7942
|
fontSize: "12px"
|
|
7821
7943
|
}
|
|
7822
|
-
}, /*#__PURE__*/React.createElement("strong", null,
|
|
7944
|
+
}, /*#__PURE__*/React.createElement("strong", null, "Latitude:"), " ", (fx === null || fx === void 0 ? void 0 : (_fx$address13 = fx.address) === null || _fx$address13 === void 0 ? void 0 : _fx$address13.latitude) || "NA"), /*#__PURE__*/React.createElement("p", {
|
|
7823
7945
|
style: {
|
|
7824
7946
|
margin: 0,
|
|
7825
7947
|
fontSize: "12px"
|
|
7826
7948
|
}
|
|
7827
|
-
}, /*#__PURE__*/React.createElement("strong", null,
|
|
7949
|
+
}, /*#__PURE__*/React.createElement("strong", null, "Longitude:"), " ", (fx === null || fx === void 0 ? void 0 : (_fx$address14 = fx.address) === null || _fx$address14 === void 0 ? void 0 : _fx$address14.longitude) || "NA")))));
|
|
7828
7950
|
}))));
|
|
7829
7951
|
};
|
|
7830
7952
|
|
|
@@ -28102,6 +28224,7 @@ const WTEmergencyFixedPointCreate = () => {
|
|
|
28102
28224
|
}
|
|
28103
28225
|
});
|
|
28104
28226
|
}
|
|
28227
|
+
if (data !== null && data !== void 0 && data.silent) return;
|
|
28105
28228
|
goNext(skipStep, index, isAddMultiple, key);
|
|
28106
28229
|
}
|
|
28107
28230
|
const onSuccess = () => {
|