@djb25/digit-ui-module-wt 1.0.25 → 1.0.26
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 +404 -246
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TickMark, ArrowDown, MobileNumber, CardLabelError, TextInput, Dropdown, DatePicker, SubmitBar, Card, Table, Loader, Toast, AppContainer, ModuleHeader, ArrowLeft, PrivateRoute, HomeIcon, KeyNote, Modal, CardHeader, FormStep, CardLabel, RadioButtons, UploadFile, TextArea, CheckBox, CardSubHeader, StatusTable, Row, GenericFileIcon, LinkButton, EditIcon, Banner, CHBIcon, EmployeeModuleCard, CloseSvg, Label, LinkLabel, ActionBar, DetailsCard, SearchAction, FilterAction, PopUp, ShippingTruck, CustomNameDropdown, MultiSelectDropdown, LabelFieldPair, AddIcon, Menu, Header, TelePhone, DisplayPhotos, CardSectionHeader, CheckPoint, ConnectingCheckPoints, MultiLink, Localities, RemoveableTag, FormComposer, PDFSvg, MultiUploadWrapper, Close as Close$g, BreakLine, InfoBannerIcon, ViewsIcon, ButtonSelector, LocationIcon, CitizenHomeCard, PTIcon, ApplicantDetails, AddressDetails } from '@djb25/digit-ui-react-components';
|
|
2
|
-
import React, { useState, useMemo, useCallback,
|
|
1
|
+
import { TickMark, ArrowDown, MobileNumber, CardLabelError, TextInput, Dropdown, DatePicker, SubmitBar, Card, Table, Loader, Toast, AppContainer, ModuleHeader, ArrowLeft, PrivateRoute, HomeIcon, KeyNote, Modal, CardHeader, FormStep, CardLabel, RadioButtons, UploadFile, TextArea, CheckBox, CardSubHeader, StatusTable, Row, GenericFileIcon, LinkButton, EditIcon, Banner, CHBIcon, EmployeeModuleCard, CloseSvg, Label, LinkLabel, ActionBar, DetailsCard, SearchAction, FilterAction, PopUp, ShippingTruck, CustomNameDropdown, MultiSelectDropdown, CollapsibleCardPage as CollapsibleCardPage$1, LabelFieldPair, AddIcon, Menu, Header, TelePhone, DisplayPhotos, CardSectionHeader, CheckPoint, ConnectingCheckPoints, MultiLink, Localities, RemoveableTag, FormComposer, PDFSvg, MultiUploadWrapper, Close as Close$g, BreakLine, InfoBannerIcon, ViewsIcon, ButtonSelector, LocationIcon, CitizenHomeCard, PTIcon, ApplicantDetails, AddressDetails } from '@djb25/digit-ui-react-components';
|
|
2
|
+
import React, { useRef, useEffect, useState, useMemo, useCallback, Fragment } from 'react';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
import { useLocation, useRouteMatch, useHistory, Switch, Route, Redirect, Link, useParams } from 'react-router-dom';
|
|
5
5
|
import { useQueryClient } from 'react-query';
|
|
@@ -355,6 +355,20 @@ const WTCreate = () => {
|
|
|
355
355
|
const WTAcknowledgement = (_Digit2 = Digit) === null || _Digit2 === void 0 ? void 0 : (_Digit2$ComponentRegi = _Digit2.ComponentRegistryService) === null || _Digit2$ComponentRegi === void 0 ? void 0 : _Digit2$ComponentRegi.getComponent("WTAcknowledgement");
|
|
356
356
|
const MTAcknowledgement = (_Digit3 = Digit) === null || _Digit3 === void 0 ? void 0 : (_Digit3$ComponentRegi = _Digit3.ComponentRegistryService) === null || _Digit3$ComponentRegi === void 0 ? void 0 : _Digit3$ComponentRegi.getComponent("MTAcknowledgement");
|
|
357
357
|
const TPAcknowledgement = (_Digit4 = Digit) === null || _Digit4 === void 0 ? void 0 : (_Digit4$ComponentRegi = _Digit4.ComponentRegistryService) === null || _Digit4$ComponentRegi === void 0 ? void 0 : _Digit4$ComponentRegi.getComponent("TPAcknowledgement");
|
|
358
|
+
const formStepRoutes = ["applicant-details", "address-details", "request-details", "toiletRequest-details", "treePruningRequest-details"];
|
|
359
|
+
const isFormStep = formStepRoutes.some(route => pathname.includes(route));
|
|
360
|
+
const sectionRefs = useRef({});
|
|
361
|
+
useEffect(() => {
|
|
362
|
+
if (isFormStep) {
|
|
363
|
+
const currentRoute = pathname.split("/").pop();
|
|
364
|
+
if (sectionRefs.current[currentRoute]) {
|
|
365
|
+
sectionRefs.current[currentRoute].scrollIntoView({
|
|
366
|
+
behavior: "smooth",
|
|
367
|
+
block: "start"
|
|
368
|
+
});
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
}, [pathname, isFormStep]);
|
|
358
372
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
359
373
|
className: "employee-form-section-wrapper"
|
|
360
374
|
}, !pathname.includes("/info") && /*#__PURE__*/React.createElement(VerticalTimeline, {
|
|
@@ -362,32 +376,7 @@ const WTCreate = () => {
|
|
|
362
376
|
showFinalStep: true
|
|
363
377
|
}), /*#__PURE__*/React.createElement("div", {
|
|
364
378
|
className: "employee-form-section"
|
|
365
|
-
}, /*#__PURE__*/React.createElement(Switch, null,
|
|
366
|
-
var _userDetails$user;
|
|
367
|
-
const {
|
|
368
|
-
component,
|
|
369
|
-
texts,
|
|
370
|
-
inputs,
|
|
371
|
-
key,
|
|
372
|
-
additionaFields
|
|
373
|
-
} = routeObj;
|
|
374
|
-
const Component = typeof component === "string" ? Digit.ComponentRegistryService.getComponent(component) : component;
|
|
375
|
-
return /*#__PURE__*/React.createElement(Route, {
|
|
376
|
-
path: `${match.path}/${routeObj.route}`,
|
|
377
|
-
key: index
|
|
378
|
-
}, /*#__PURE__*/React.createElement(Component, {
|
|
379
|
-
config: {
|
|
380
|
-
texts,
|
|
381
|
-
inputs,
|
|
382
|
-
key,
|
|
383
|
-
additionaFields
|
|
384
|
-
},
|
|
385
|
-
onSelect: handleSelect,
|
|
386
|
-
t: t,
|
|
387
|
-
formData: params,
|
|
388
|
-
userDetails: userDetails === null || userDetails === void 0 ? void 0 : (_userDetails$user = userDetails.user) === null || _userDetails$user === void 0 ? void 0 : _userDetails$user[0]
|
|
389
|
-
}));
|
|
390
|
-
}), /*#__PURE__*/React.createElement(Route, {
|
|
379
|
+
}, /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(Route, {
|
|
391
380
|
path: `${match.path}/check`
|
|
392
381
|
}, /*#__PURE__*/React.createElement(CheckPage, {
|
|
393
382
|
onSubmit: wt_create,
|
|
@@ -407,7 +396,68 @@ const WTCreate = () => {
|
|
|
407
396
|
}, /*#__PURE__*/React.createElement(TPAcknowledgement, {
|
|
408
397
|
data: params,
|
|
409
398
|
onSuccess: onSuccess
|
|
410
|
-
})),
|
|
399
|
+
})), config.map((routeObj, index) => {
|
|
400
|
+
if (!formStepRoutes.includes(routeObj.route)) {
|
|
401
|
+
var _userDetails$user;
|
|
402
|
+
const {
|
|
403
|
+
component,
|
|
404
|
+
texts,
|
|
405
|
+
inputs,
|
|
406
|
+
key,
|
|
407
|
+
additionaFields
|
|
408
|
+
} = routeObj;
|
|
409
|
+
const Component = typeof component === "string" ? Digit.ComponentRegistryService.getComponent(component) : component;
|
|
410
|
+
return /*#__PURE__*/React.createElement(Route, {
|
|
411
|
+
path: `${match.path}/${routeObj.route}`,
|
|
412
|
+
key: index
|
|
413
|
+
}, /*#__PURE__*/React.createElement(Component, {
|
|
414
|
+
config: {
|
|
415
|
+
texts,
|
|
416
|
+
inputs,
|
|
417
|
+
key,
|
|
418
|
+
additionaFields
|
|
419
|
+
},
|
|
420
|
+
onSelect: handleSelect,
|
|
421
|
+
t: t,
|
|
422
|
+
formData: params,
|
|
423
|
+
userDetails: userDetails === null || userDetails === void 0 ? void 0 : (_userDetails$user = userDetails.user) === null || _userDetails$user === void 0 ? void 0 : _userDetails$user[0]
|
|
424
|
+
}));
|
|
425
|
+
}
|
|
426
|
+
return null;
|
|
427
|
+
}), /*#__PURE__*/React.createElement(Route, {
|
|
428
|
+
path: formStepRoutes.map(route => `${match.path}/${route}`)
|
|
429
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
430
|
+
className: "single-page-form-container"
|
|
431
|
+
}, config.filter(routeObj => formStepRoutes.includes(routeObj.route)).map((routeObj, index) => {
|
|
432
|
+
var _params$serviceType5, _params$serviceType5$, _userDetails$user2;
|
|
433
|
+
const {
|
|
434
|
+
component,
|
|
435
|
+
texts,
|
|
436
|
+
inputs,
|
|
437
|
+
key,
|
|
438
|
+
additionaFields
|
|
439
|
+
} = routeObj;
|
|
440
|
+
const Component = typeof component === "string" ? Digit.ComponentRegistryService.getComponent(component) : component;
|
|
441
|
+
const code = params === null || params === void 0 ? void 0 : (_params$serviceType5 = params.serviceType) === null || _params$serviceType5 === void 0 ? void 0 : (_params$serviceType5$ = _params$serviceType5.serviceType) === null || _params$serviceType5$ === void 0 ? void 0 : _params$serviceType5$.code;
|
|
442
|
+
if (routeObj.route === "request-details" && code !== "WT") return null;
|
|
443
|
+
if (routeObj.route === "toiletRequest-details" && code !== "MobileToilet") return null;
|
|
444
|
+
if (routeObj.route === "treePruningRequest-details" && code !== "TREE_PRUNING") return null;
|
|
445
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
446
|
+
key: index,
|
|
447
|
+
ref: el => sectionRefs.current[routeObj.route] = el,
|
|
448
|
+
className: "form-section-unit"
|
|
449
|
+
}, /*#__PURE__*/React.createElement(Component, {
|
|
450
|
+
config: {
|
|
451
|
+
...routeObj,
|
|
452
|
+
isCollapsible: true,
|
|
453
|
+
defaultOpen: true
|
|
454
|
+
},
|
|
455
|
+
onSelect: handleSelect,
|
|
456
|
+
t: t,
|
|
457
|
+
formData: params,
|
|
458
|
+
userDetails: userDetails === null || userDetails === void 0 ? void 0 : (_userDetails$user2 = userDetails.user) === null || _userDetails$user2 === void 0 ? void 0 : _userDetails$user2[0]
|
|
459
|
+
}));
|
|
460
|
+
}))), /*#__PURE__*/React.createElement(Route, null, /*#__PURE__*/React.createElement(Redirect, {
|
|
411
461
|
to: `${match.path}/${config.indexRoute}`
|
|
412
462
|
}))))));
|
|
413
463
|
};
|
|
@@ -2347,12 +2397,12 @@ const WTCard = () => {
|
|
|
2347
2397
|
const links = [{
|
|
2348
2398
|
count: citizenInboxCount,
|
|
2349
2399
|
label: t("ES_COMMON_INBOX"),
|
|
2350
|
-
subLabel: "
|
|
2400
|
+
subLabel: t("CITIZEN"),
|
|
2351
2401
|
link: `${APPLICATION_PATH}/employee/wt/inbox`
|
|
2352
2402
|
}, {
|
|
2353
2403
|
count: fixedPointInboxCount,
|
|
2354
2404
|
label: t("ES_COMMON_INBOX"),
|
|
2355
|
-
subLabel: "
|
|
2405
|
+
subLabel: t("FIXED_POINT"),
|
|
2356
2406
|
link: `${APPLICATION_PATH}/employee/wt/fixed-point/inbox`
|
|
2357
2407
|
}, {
|
|
2358
2408
|
label: t("ES_COMMON_APPLICATION_SEARCH"),
|
|
@@ -3361,13 +3411,24 @@ const AddTripModal = ({
|
|
|
3361
3411
|
departureFixedPoint: initialValues.departureFixedPoint || currentTime,
|
|
3362
3412
|
returnFpl: initialValues.returnFpl || currentTime,
|
|
3363
3413
|
frequencyNo: initialValues.frequencyNo,
|
|
3364
|
-
vehicleId: initialValues.vehicleId
|
|
3414
|
+
vehicleId: initialValues.vehicleId,
|
|
3415
|
+
fixedPointCode: initialValues.fixedPointCode,
|
|
3416
|
+
day: initialValues.day || [],
|
|
3417
|
+
volume: initialValues.volume || "",
|
|
3418
|
+
active: initialValues.active || null,
|
|
3419
|
+
remarks: initialValues.remarks || ""
|
|
3365
3420
|
} : {
|
|
3421
|
+
fixedPointCode: "",
|
|
3422
|
+
day: [],
|
|
3366
3423
|
arrivalTimeFpl: currentTime,
|
|
3367
3424
|
departureTimeFpl: currentTime,
|
|
3368
3425
|
arrivalFixedPoint: currentTime,
|
|
3369
3426
|
departureFixedPoint: currentTime,
|
|
3370
|
-
returnFpl: currentTime
|
|
3427
|
+
returnFpl: currentTime,
|
|
3428
|
+
volume: "",
|
|
3429
|
+
active: null,
|
|
3430
|
+
remarks: "",
|
|
3431
|
+
frequencyNo: 1
|
|
3371
3432
|
};
|
|
3372
3433
|
const {
|
|
3373
3434
|
register,
|
|
@@ -3393,13 +3454,13 @@ const AddTripModal = ({
|
|
|
3393
3454
|
});
|
|
3394
3455
|
const fixedPoints = (fixedPointsData === null || fixedPointsData === void 0 ? void 0 : fixedPointsData.waterTankerBookingDetail) || [];
|
|
3395
3456
|
const fixedPointOptions = fixedPoints.map(fp => {
|
|
3396
|
-
var _fp$applicantDetail, _fp$applicantDetail2, _fp$address, _fp$applicantDetail3, _fp$applicantDetail4, _fp$address2, _fp$address3, _fp$address4, _fp$address5, _fp$address6;
|
|
3457
|
+
var _fp$applicantDetail, _fp$applicantDetail2, _fp$address, _fp$applicantDetail3, _fp$applicantDetail4, _fp$address2, _fp$applicantDetail5, _fp$address3, _fp$address4, _fp$address5, _fp$address6;
|
|
3397
3458
|
return {
|
|
3398
3459
|
name: (fp === null || fp === void 0 ? void 0 : (_fp$applicantDetail = fp.applicantDetail) === null || _fp$applicantDetail === void 0 ? void 0 : _fp$applicantDetail.name) || "NA",
|
|
3399
3460
|
mobileNumber: (fp === null || fp === void 0 ? void 0 : (_fp$applicantDetail2 = fp.applicantDetail) === null || _fp$applicantDetail2 === void 0 ? void 0 : _fp$applicantDetail2.mobileNumber) || "NA",
|
|
3400
3461
|
locality: (fp === null || fp === void 0 ? void 0 : (_fp$address = fp.address) === null || _fp$address === void 0 ? void 0 : _fp$address.locality) || "NA",
|
|
3401
3462
|
displayLabel: `${(fp === null || fp === void 0 ? void 0 : (_fp$applicantDetail3 = fp.applicantDetail) === null || _fp$applicantDetail3 === void 0 ? void 0 : _fp$applicantDetail3.name) || "NA"} | ${(fp === null || fp === void 0 ? void 0 : (_fp$applicantDetail4 = fp.applicantDetail) === null || _fp$applicantDetail4 === void 0 ? void 0 : _fp$applicantDetail4.mobileNumber) || "NA"} | ${(fp === null || fp === void 0 ? void 0 : (_fp$address2 = fp.address) === null || _fp$address2 === void 0 ? void 0 : _fp$address2.locality) || "NA"}`,
|
|
3402
|
-
value: fp.bookingId,
|
|
3463
|
+
value: fp.fixedPointCode || (fp === null || fp === void 0 ? void 0 : (_fp$applicantDetail5 = fp.applicantDetail) === null || _fp$applicantDetail5 === void 0 ? void 0 : _fp$applicantDetail5.fixedPointId) || fp.bookingId,
|
|
3403
3464
|
fullAddress: [(fp === null || fp === void 0 ? void 0 : (_fp$address3 = fp.address) === null || _fp$address3 === void 0 ? void 0 : _fp$address3.houseNo) && `${t("WT_HOUSE_NO")} = ${fp.address.houseNo}`, (fp === null || fp === void 0 ? void 0 : (_fp$address4 = fp.address) === null || _fp$address4 === void 0 ? void 0 : _fp$address4.streetName) && `${t("WT_STREET_NAME")} = ${fp.address.streetName}`, (fp === null || fp === void 0 ? void 0 : (_fp$address5 = fp.address) === null || _fp$address5 === void 0 ? void 0 : _fp$address5.landmark) && `${t("WT_LANDMARK")} = ${fp.address.landmark}`, (fp === null || fp === void 0 ? void 0 : (_fp$address6 = fp.address) === null || _fp$address6 === void 0 ? void 0 : _fp$address6.locality) && `${t("WT_LOCALITY")} = ${fp.address.locality}`].filter(Boolean).join(", ")
|
|
3404
3465
|
};
|
|
3405
3466
|
});
|
|
@@ -3435,9 +3496,8 @@ const AddTripModal = ({
|
|
|
3435
3496
|
value: "No"
|
|
3436
3497
|
}];
|
|
3437
3498
|
const formData = watch();
|
|
3438
|
-
const
|
|
3499
|
+
const isFormValid = (formData === null || formData === void 0 ? void 0 : formData.fixedPointCode) && (formData === null || formData === void 0 ? void 0 : formData.day) && Array.isArray(formData === null || formData === void 0 ? void 0 : formData.day) && (formData === null || formData === void 0 ? void 0 : (_formData$day = formData.day) === null || _formData$day === void 0 ? void 0 : _formData$day.length) > 0 && (formData === null || formData === void 0 ? void 0 : formData.arrivalTimeFpl) && (formData === null || formData === void 0 ? void 0 : formData.departureTimeFpl) && (formData === null || formData === void 0 ? void 0 : formData.arrivalFixedPoint) && (formData === null || formData === void 0 ? void 0 : formData.departureFixedPoint) && (formData === null || formData === void 0 ? void 0 : formData.returnFpl) && (formData === null || formData === void 0 ? void 0 : formData.volume) !== "" && (formData === null || formData === void 0 ? void 0 : formData.volume) !== undefined && (formData === null || formData === void 0 ? void 0 : formData.volume) !== null && (formData === null || formData === void 0 ? void 0 : formData.active);
|
|
3439
3500
|
const onFormSubmit = data => {
|
|
3440
|
-
if (isFormDisabled) return;
|
|
3441
3501
|
onSubmit({
|
|
3442
3502
|
...initialValues,
|
|
3443
3503
|
...data
|
|
@@ -3558,6 +3618,7 @@ const AddTripModal = ({
|
|
|
3558
3618
|
}, t("WT_FIXED_POINT_CODE")), isFixedPointLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement(Controller, {
|
|
3559
3619
|
control: control,
|
|
3560
3620
|
name: "fixedPointCode",
|
|
3621
|
+
defaultValue: defaultValues.fixedPointCode,
|
|
3561
3622
|
render: props => /*#__PURE__*/React.createElement(CustomNameDropdown, {
|
|
3562
3623
|
option: fixedPointOptions,
|
|
3563
3624
|
optionKey: "displayLabel",
|
|
@@ -3616,7 +3677,7 @@ const AddTripModal = ({
|
|
|
3616
3677
|
render: props => /*#__PURE__*/React.createElement(TextInput, {
|
|
3617
3678
|
type: "time",
|
|
3618
3679
|
value: props.value,
|
|
3619
|
-
onChange: props.onChange,
|
|
3680
|
+
onChange: e => props.onChange(e.target.value),
|
|
3620
3681
|
onBlur: props.onBlur
|
|
3621
3682
|
})
|
|
3622
3683
|
})), /*#__PURE__*/React.createElement("div", {
|
|
@@ -3633,7 +3694,7 @@ const AddTripModal = ({
|
|
|
3633
3694
|
render: props => /*#__PURE__*/React.createElement(TextInput, {
|
|
3634
3695
|
type: "time",
|
|
3635
3696
|
value: props.value,
|
|
3636
|
-
onChange: props.onChange,
|
|
3697
|
+
onChange: e => props.onChange(e.target.value),
|
|
3637
3698
|
onBlur: props.onBlur
|
|
3638
3699
|
})
|
|
3639
3700
|
})), /*#__PURE__*/React.createElement("div", {
|
|
@@ -3650,7 +3711,7 @@ const AddTripModal = ({
|
|
|
3650
3711
|
render: props => /*#__PURE__*/React.createElement(TextInput, {
|
|
3651
3712
|
type: "time",
|
|
3652
3713
|
value: props.value,
|
|
3653
|
-
onChange: props.onChange,
|
|
3714
|
+
onChange: e => props.onChange(e.target.value),
|
|
3654
3715
|
onBlur: props.onBlur
|
|
3655
3716
|
})
|
|
3656
3717
|
})), /*#__PURE__*/React.createElement("div", {
|
|
@@ -3667,7 +3728,7 @@ const AddTripModal = ({
|
|
|
3667
3728
|
render: props => /*#__PURE__*/React.createElement(TextInput, {
|
|
3668
3729
|
type: "time",
|
|
3669
3730
|
value: props.value,
|
|
3670
|
-
onChange: props.onChange,
|
|
3731
|
+
onChange: e => props.onChange(e.target.value),
|
|
3671
3732
|
onBlur: props.onBlur
|
|
3672
3733
|
})
|
|
3673
3734
|
})), /*#__PURE__*/React.createElement("div", {
|
|
@@ -3684,7 +3745,7 @@ const AddTripModal = ({
|
|
|
3684
3745
|
render: props => /*#__PURE__*/React.createElement(TextInput, {
|
|
3685
3746
|
type: "time",
|
|
3686
3747
|
value: props.value,
|
|
3687
|
-
onChange: props.onChange,
|
|
3748
|
+
onChange: e => props.onChange(e.target.value),
|
|
3688
3749
|
onBlur: props.onBlur
|
|
3689
3750
|
})
|
|
3690
3751
|
})), /*#__PURE__*/React.createElement("div", {
|
|
@@ -3700,7 +3761,7 @@ const AddTripModal = ({
|
|
|
3700
3761
|
defaultValue: defaultValues.volume,
|
|
3701
3762
|
render: props => /*#__PURE__*/React.createElement(TextInput, {
|
|
3702
3763
|
value: props.value,
|
|
3703
|
-
onChange: props.onChange,
|
|
3764
|
+
onChange: e => props.onChange(e.target.value),
|
|
3704
3765
|
onBlur: props.onBlur
|
|
3705
3766
|
})
|
|
3706
3767
|
})), /*#__PURE__*/React.createElement("div", {
|
|
@@ -3736,7 +3797,7 @@ const AddTripModal = ({
|
|
|
3736
3797
|
defaultValue: defaultValues.remarks,
|
|
3737
3798
|
render: props => /*#__PURE__*/React.createElement(TextInput, {
|
|
3738
3799
|
value: props.value,
|
|
3739
|
-
onChange: props.onChange,
|
|
3800
|
+
onChange: e => props.onChange(e.target.value),
|
|
3740
3801
|
onBlur: props.onBlur
|
|
3741
3802
|
})
|
|
3742
3803
|
})))), /*#__PURE__*/React.createElement("div", {
|
|
@@ -3760,16 +3821,16 @@ const AddTripModal = ({
|
|
|
3760
3821
|
}
|
|
3761
3822
|
}, t("CS_COMMON_CANCEL")), /*#__PURE__*/React.createElement("button", {
|
|
3762
3823
|
className: "button-save",
|
|
3763
|
-
disabled:
|
|
3824
|
+
disabled: !isFormValid,
|
|
3764
3825
|
onClick: handleSubmit(onFormSubmit),
|
|
3765
3826
|
style: {
|
|
3766
3827
|
padding: "8px 20px",
|
|
3767
|
-
background:
|
|
3828
|
+
background: !isFormValid ? "#ccc" : "#1D4E7F",
|
|
3768
3829
|
color: "#fff",
|
|
3769
3830
|
border: "none",
|
|
3770
3831
|
borderRadius: "4px",
|
|
3771
|
-
cursor:
|
|
3772
|
-
opacity:
|
|
3832
|
+
cursor: !isFormValid ? "not-allowed" : "pointer",
|
|
3833
|
+
opacity: !isFormValid ? 0.7 : 1
|
|
3773
3834
|
}
|
|
3774
3835
|
}, initialValues ? t("WT_UPDATE") : t("CS_COMMON_SAVE")))));
|
|
3775
3836
|
};
|
|
@@ -3832,10 +3893,10 @@ const FixedPointScheduleManagement = ({
|
|
|
3832
3893
|
const fromScheduleApi = (allSchedulesData === null || allSchedulesData === void 0 ? void 0 : allSchedulesData.fixedPointTimeTableDetails) || [];
|
|
3833
3894
|
const combinedData = [...fromFpApi, ...fromScheduleApi];
|
|
3834
3895
|
const points = combinedData.map(fp => {
|
|
3835
|
-
var _fp$applicantDetail;
|
|
3896
|
+
var _fp$applicantDetail, _fp$applicantDetail2, _fp$applicantDetail3;
|
|
3836
3897
|
return {
|
|
3837
|
-
label: fp.fixedPointCode || fp.name || ((_fp$
|
|
3838
|
-
value: fp.fixedPointCode || fp.bookingId
|
|
3898
|
+
label: fp.fixedPointCode || ((_fp$applicantDetail = fp.applicantDetail) === null || _fp$applicantDetail === void 0 ? void 0 : _fp$applicantDetail.fixedPointId) || fp.name || ((_fp$applicantDetail2 = fp.applicantDetail) === null || _fp$applicantDetail2 === void 0 ? void 0 : _fp$applicantDetail2.name) || fp.bookingId,
|
|
3899
|
+
value: fp.fixedPointCode || ((_fp$applicantDetail3 = fp.applicantDetail) === null || _fp$applicantDetail3 === void 0 ? void 0 : _fp$applicantDetail3.fixedPointId) || fp.bookingId
|
|
3839
3900
|
};
|
|
3840
3901
|
}).filter(p => p.label && p.value);
|
|
3841
3902
|
const uniquePoints = points.filter((v, i, a) => a.findIndex(t => t.value === v.value) === i);
|
|
@@ -3844,6 +3905,8 @@ const FixedPointScheduleManagement = ({
|
|
|
3844
3905
|
value: "all"
|
|
3845
3906
|
}, ...uniquePoints];
|
|
3846
3907
|
}, [fixedPointData, allSchedulesData, t]);
|
|
3908
|
+
console.log(fixedPoints, "fixedPoints");
|
|
3909
|
+
console.log(fixedPointData, "fixedPointData");
|
|
3847
3910
|
const {
|
|
3848
3911
|
mutate: createSchedule
|
|
3849
3912
|
} = Digit.Hooks.wt.useCreateFixedPointSchedule(tenantId);
|
|
@@ -3882,7 +3945,7 @@ const FixedPointScheduleManagement = ({
|
|
|
3882
3945
|
const mapScheduleRows = React.useCallback((rows = []) => rows.map(item => ({
|
|
3883
3946
|
scheduleId: item.systemAssignedScheduleId,
|
|
3884
3947
|
fixedPointName: item.fixedPointName,
|
|
3885
|
-
fixedPoint: item.fixedPointId,
|
|
3948
|
+
fixedPoint: item.fixedPointCode || item.fixedPointId,
|
|
3886
3949
|
day: item.day,
|
|
3887
3950
|
freq: item.tripNo,
|
|
3888
3951
|
arrToFpl: item.arrivalTimeToFpl,
|
|
@@ -4322,13 +4385,13 @@ const FixedPointScheduleManagement = ({
|
|
|
4322
4385
|
var _d$toUpperCase;
|
|
4323
4386
|
return (d === null || d === void 0 ? void 0 : (_d$toUpperCase = d.toUpperCase) === null || _d$toUpperCase === void 0 ? void 0 : _d$toUpperCase.call(d)) || d;
|
|
4324
4387
|
}),
|
|
4325
|
-
trip_no: Number(formData.frequencyNo),
|
|
4388
|
+
trip_no: Number(formData.frequencyNo) || Number(formData.tripNo) || 1,
|
|
4326
4389
|
arrival_time_to_fpl: formData.arrivalTimeFpl,
|
|
4327
4390
|
departure_time_from_fpl: formData.departureTimeFpl,
|
|
4328
4391
|
arrival_time_delivery_point: formData.arrivalFixedPoint,
|
|
4329
4392
|
departure_time_delivery_point: formData.departureFixedPoint,
|
|
4330
4393
|
time_of_arriving_back_fpl_after_delivery: formData.returnFpl,
|
|
4331
|
-
volume_water_tobe_delivery: formData.volume,
|
|
4394
|
+
volume_water_tobe_delivery: formData.volume || "0",
|
|
4332
4395
|
active: ((_formData$active = formData.active) === null || _formData$active === void 0 ? void 0 : _formData$active.value) === "Yes" || formData.active === "Yes",
|
|
4333
4396
|
is_enable: ((_formData$active2 = formData.active) === null || _formData$active2 === void 0 ? void 0 : _formData$active2.value) === "Yes" || formData.active === "Yes",
|
|
4334
4397
|
remarks: formData.remarks,
|
|
@@ -4683,7 +4746,7 @@ const RouteLayer = ({
|
|
|
4683
4746
|
}, /*#__PURE__*/React.createElement("h4", {
|
|
4684
4747
|
style: {
|
|
4685
4748
|
margin: 0,
|
|
4686
|
-
color: "#
|
|
4749
|
+
color: "#1F5FA8"
|
|
4687
4750
|
}
|
|
4688
4751
|
}, t("ROUTE_INFORMATION")), /*#__PURE__*/React.createElement("button", {
|
|
4689
4752
|
onClick: () => setShowSteps(false),
|
|
@@ -4738,7 +4801,7 @@ const RouteLayer = ({
|
|
|
4738
4801
|
width: "20px",
|
|
4739
4802
|
height: "20px",
|
|
4740
4803
|
borderRadius: "50%",
|
|
4741
|
-
background: "#
|
|
4804
|
+
background: "#1F5FA8",
|
|
4742
4805
|
color: "white",
|
|
4743
4806
|
display: "flex",
|
|
4744
4807
|
alignItems: "center",
|
|
@@ -4776,12 +4839,12 @@ const RouteMarkers = ({
|
|
|
4776
4839
|
className: "distance-marker",
|
|
4777
4840
|
html: `<div style="
|
|
4778
4841
|
background: white;
|
|
4779
|
-
border: 2px solid #
|
|
4842
|
+
border: 2px solid #1F5FA8;
|
|
4780
4843
|
border-radius: 12px;
|
|
4781
4844
|
padding: 2px 6px;
|
|
4782
4845
|
font-size: 10px;
|
|
4783
4846
|
font-weight: bold;
|
|
4784
|
-
color: #
|
|
4847
|
+
color: #1F5FA8;
|
|
4785
4848
|
white-space: nowrap;
|
|
4786
4849
|
">${(i / 1000).toFixed(0)} km</div>`,
|
|
4787
4850
|
iconSize: [40, 20],
|
|
@@ -4896,7 +4959,7 @@ const DriverCard = ({
|
|
|
4896
4959
|
padding: "16px",
|
|
4897
4960
|
borderRadius: "12px",
|
|
4898
4961
|
background: isSelected ? "#f0f4ff" : "white",
|
|
4899
|
-
border: `2px solid ${isSelected ? "#
|
|
4962
|
+
border: `2px solid ${isSelected ? "#1F5FA8" : "#f0f0f0"}`,
|
|
4900
4963
|
cursor: "pointer",
|
|
4901
4964
|
position: "relative",
|
|
4902
4965
|
transition: "all 0.2s ease"
|
|
@@ -5187,7 +5250,7 @@ function LiveTrackingSystem() {
|
|
|
5187
5250
|
padding: "16px 24px",
|
|
5188
5251
|
borderRadius: "12px",
|
|
5189
5252
|
boxShadow: "0 2px 8px rgba(0,0,0,0.05)",
|
|
5190
|
-
border: "2px solid #
|
|
5253
|
+
border: "2px solid #1F5FA844"
|
|
5191
5254
|
}
|
|
5192
5255
|
}, /*#__PURE__*/React.createElement("div", {
|
|
5193
5256
|
style: {
|
|
@@ -5293,7 +5356,7 @@ function LiveTrackingSystem() {
|
|
|
5293
5356
|
top: "80px",
|
|
5294
5357
|
left: "20px",
|
|
5295
5358
|
zIndex: 2000,
|
|
5296
|
-
background: "#
|
|
5359
|
+
background: "#1F5FA8",
|
|
5297
5360
|
color: "white",
|
|
5298
5361
|
border: "none",
|
|
5299
5362
|
borderRadius: "8px",
|
|
@@ -5356,7 +5419,7 @@ function LiveTrackingSystem() {
|
|
|
5356
5419
|
style: {
|
|
5357
5420
|
background: "none",
|
|
5358
5421
|
border: "none",
|
|
5359
|
-
color: "#
|
|
5422
|
+
color: "#1F5FA8",
|
|
5360
5423
|
fontSize: "12px",
|
|
5361
5424
|
fontWeight: "700",
|
|
5362
5425
|
cursor: "pointer"
|
|
@@ -5471,7 +5534,7 @@ function LiveTrackingSystem() {
|
|
|
5471
5534
|
style: {
|
|
5472
5535
|
padding: "4px 12px",
|
|
5473
5536
|
borderRadius: "4px",
|
|
5474
|
-
background: filterOnline === filter ? "#
|
|
5537
|
+
background: filterOnline === filter ? "#1F5FA8" : "transparent",
|
|
5475
5538
|
color: filterOnline === filter ? "white" : "#666",
|
|
5476
5539
|
border: filterOnline === filter ? "none" : "1px solid #e0e0e0",
|
|
5477
5540
|
cursor: "pointer",
|
|
@@ -5572,7 +5635,7 @@ function LiveTrackingSystem() {
|
|
|
5572
5635
|
style: {
|
|
5573
5636
|
fontWeight: "bold",
|
|
5574
5637
|
fontSize: isMobile ? "14px" : "16px",
|
|
5575
|
-
color: "#
|
|
5638
|
+
color: "#1F5FA8",
|
|
5576
5639
|
marginBottom: "8px",
|
|
5577
5640
|
borderBottom: "1px solid #eee",
|
|
5578
5641
|
paddingBottom: "4px"
|
|
@@ -5656,7 +5719,7 @@ function LiveTrackingSystem() {
|
|
|
5656
5719
|
},
|
|
5657
5720
|
style: {
|
|
5658
5721
|
padding: isMobile ? "10px 12px" : "8px 16px",
|
|
5659
|
-
background: "#
|
|
5722
|
+
background: "#1F5FA8",
|
|
5660
5723
|
color: "white",
|
|
5661
5724
|
border: "none",
|
|
5662
5725
|
borderRadius: "4px",
|
|
@@ -5710,7 +5773,7 @@ function LiveTrackingSystem() {
|
|
|
5710
5773
|
}, /*#__PURE__*/React.createElement("h4", {
|
|
5711
5774
|
style: {
|
|
5712
5775
|
margin: 0,
|
|
5713
|
-
color: "#
|
|
5776
|
+
color: "#1F5FA8",
|
|
5714
5777
|
fontSize: isMobile ? "14px" : "16px"
|
|
5715
5778
|
}
|
|
5716
5779
|
}, t("WT_SELECTED_DRIVER")), /*#__PURE__*/React.createElement(StatusBadge, {
|
|
@@ -5873,15 +5936,12 @@ const AddFillingPointMetaData = ({
|
|
|
5873
5936
|
[name]: newValue
|
|
5874
5937
|
});
|
|
5875
5938
|
};
|
|
5876
|
-
|
|
5877
|
-
|
|
5939
|
+
return /*#__PURE__*/React.createElement(CollapsibleCardPage$1, {
|
|
5940
|
+
title: t("WT_FILLING_POINT_APPLICANT_DETAILS"),
|
|
5941
|
+
defaultOpen: true
|
|
5942
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
5878
5943
|
className: "formcomposer-section-grid"
|
|
5879
|
-
},
|
|
5880
|
-
style: {
|
|
5881
|
-
gridColumn: "span 2",
|
|
5882
|
-
marginBottom: isMobile ? "0px" : "10px"
|
|
5883
|
-
}
|
|
5884
|
-
}, t("WT_FILLING_POINT_APPLICANT_DETAILS")), filteredInputs.map(input => {
|
|
5944
|
+
}, filteredInputs.map(input => {
|
|
5885
5945
|
var _formData$sectionKey, _input$validation;
|
|
5886
5946
|
return /*#__PURE__*/React.createElement("div", {
|
|
5887
5947
|
key: input.name
|
|
@@ -5896,7 +5956,7 @@ const AddFillingPointMetaData = ({
|
|
|
5896
5956
|
onChange: e => handleChange(e.target.value, input.name),
|
|
5897
5957
|
maxLength: (_input$validation = input.validation) === null || _input$validation === void 0 ? void 0 : _input$validation.maxLength
|
|
5898
5958
|
}, input.validation)))));
|
|
5899
|
-
}));
|
|
5959
|
+
})));
|
|
5900
5960
|
};
|
|
5901
5961
|
|
|
5902
5962
|
const allOptions = [{
|
|
@@ -5920,14 +5980,12 @@ const AddFixFillAddress = ({
|
|
|
5920
5980
|
isEdit,
|
|
5921
5981
|
userDetails
|
|
5922
5982
|
}) => {
|
|
5923
|
-
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, _userDetails$addresse;
|
|
5983
|
+
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, _userDetails$addresse;
|
|
5924
5984
|
const {
|
|
5925
5985
|
data: allCities
|
|
5926
5986
|
} = Digit.Hooks.useTenants();
|
|
5927
|
-
const {
|
|
5928
|
-
control
|
|
5929
|
-
} = useForm();
|
|
5930
5987
|
const location = useLocation();
|
|
5988
|
+
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
5931
5989
|
const usedAddressTypes = ((_location$state = location.state) === null || _location$state === void 0 ? void 0 : _location$state.usedAddressTypes) || [];
|
|
5932
5990
|
const [pincode, setPincode] = useState((formData === null || formData === void 0 ? void 0 : (_formData$address = formData.address) === null || _formData$address === void 0 ? void 0 : _formData$address.pincode) || "");
|
|
5933
5991
|
const [city, setCity] = useState((formData === null || formData === void 0 ? void 0 : (_formData$address2 = formData.address) === null || _formData$address2 === void 0 ? void 0 : _formData$address2.city) || null);
|
|
@@ -5938,8 +5996,10 @@ const AddFixFillAddress = ({
|
|
|
5938
5996
|
const [addressLine1, setAddressLine1] = useState((formData === null || formData === void 0 ? void 0 : (_formData$address7 = formData.address) === null || _formData$address7 === void 0 ? void 0 : _formData$address7.addressLine1) || "");
|
|
5939
5997
|
const [addressLine2, setAddressLine2] = useState((formData === null || formData === void 0 ? void 0 : (_formData$address8 = formData.address) === null || _formData$address8 === void 0 ? void 0 : _formData$address8.addressLine2) || "");
|
|
5940
5998
|
const [addressType, setAddressType] = useState((formData === null || formData === void 0 ? void 0 : (_formData$address9 = formData.address) === null || _formData$address9 === void 0 ? void 0 : _formData$address9.addressType) || null);
|
|
5941
|
-
const [
|
|
5942
|
-
const [
|
|
5999
|
+
const [zone, setZone] = useState((formData === null || formData === void 0 ? void 0 : (_formData$address0 = formData.address) === null || _formData$address0 === void 0 ? void 0 : _formData$address0.zone) || "");
|
|
6000
|
+
const [block, setBlock] = useState((formData === null || formData === void 0 ? void 0 : (_formData$address1 = formData.address) === null || _formData$address1 === void 0 ? void 0 : _formData$address1.block) || "");
|
|
6001
|
+
const [latitude, setLatitude] = useState((formData === null || formData === void 0 ? void 0 : (_formData$address10 = formData.address) === null || _formData$address10 === void 0 ? void 0 : _formData$address10.latitude) || "");
|
|
6002
|
+
const [longitude, setLongitude] = useState((formData === null || formData === void 0 ? void 0 : (_formData$address11 = formData.address) === null || _formData$address11 === void 0 ? void 0 : _formData$address11.longitude) || "");
|
|
5943
6003
|
const [selectedAddress, setSelectedAddress] = useState("");
|
|
5944
6004
|
const isInitialized = useRef(!isEdit);
|
|
5945
6005
|
const lastSyncedAddress = useRef(null);
|
|
@@ -5951,18 +6011,81 @@ const AddFixFillAddress = ({
|
|
|
5951
6011
|
return allOptions.filter(opt => !usedAddressTypes.includes(opt.code));
|
|
5952
6012
|
}, [usedAddressTypes]);
|
|
5953
6013
|
const {
|
|
5954
|
-
data:
|
|
5955
|
-
} = Digit.Hooks.
|
|
5956
|
-
enabled: !!city
|
|
5957
|
-
}, t);
|
|
5958
|
-
const structuredLocality = (fetchedLocalities === null || fetchedLocalities === void 0 ? void 0 : fetchedLocalities.map(local => ({
|
|
5959
|
-
i18nKey: local.i18nkey,
|
|
5960
|
-
code: local.code,
|
|
5961
|
-
label: local.label
|
|
5962
|
-
}))) || [];
|
|
6014
|
+
data: egovLocationData
|
|
6015
|
+
} = Digit.Hooks.useCommonMDMS(tenantId, "egov-location", ["TenantBoundary"]);
|
|
5963
6016
|
useEffect(() => {
|
|
5964
|
-
|
|
5965
|
-
|
|
6017
|
+
if (!city && allCities && allCities.length > 0) {
|
|
6018
|
+
const defaultCity = allCities.find(c => c.code === tenantId) || allCities[0];
|
|
6019
|
+
setCity(defaultCity);
|
|
6020
|
+
}
|
|
6021
|
+
}, [allCities, city, tenantId]);
|
|
6022
|
+
const boundaryData = useMemo(() => {
|
|
6023
|
+
var _egovLocationData$ego;
|
|
6024
|
+
const tenantBoundary = (egovLocationData === null || egovLocationData === void 0 ? void 0 : (_egovLocationData$ego = egovLocationData["egov-location"]) === null || _egovLocationData$ego === void 0 ? void 0 : _egovLocationData$ego.TenantBoundary) || [];
|
|
6025
|
+
const revenueData = tenantBoundary.find(item => {
|
|
6026
|
+
var _item$hierarchyType;
|
|
6027
|
+
return (item === null || item === void 0 ? void 0 : (_item$hierarchyType = item.hierarchyType) === null || _item$hierarchyType === void 0 ? void 0 : _item$hierarchyType.code) === "REVENUE";
|
|
6028
|
+
});
|
|
6029
|
+
return (revenueData === null || revenueData === void 0 ? void 0 : revenueData.boundary) || [];
|
|
6030
|
+
}, [egovLocationData]);
|
|
6031
|
+
const structuredLocality = useMemo(() => {
|
|
6032
|
+
let localities = [];
|
|
6033
|
+
const boundaries = Array.isArray(boundaryData) ? boundaryData : boundaryData ? [boundaryData] : [];
|
|
6034
|
+
const extractLocalities = (node, zone = null, ward = null) => {
|
|
6035
|
+
if (!node) return;
|
|
6036
|
+
let currentZone = zone;
|
|
6037
|
+
let currentWard = ward;
|
|
6038
|
+
if (node.label === "Zone" || node.label === "ZONE") {
|
|
6039
|
+
currentZone = node.localname || node.code || node.name;
|
|
6040
|
+
}
|
|
6041
|
+
if (node.label === "Ward" || node.label === "WARD" || node.label === "Block" || node.label === "BLOCK") {
|
|
6042
|
+
currentWard = node.code || node.localname || node.name;
|
|
6043
|
+
}
|
|
6044
|
+
if (node.label === "Locality" || node.label === "LOCALITY") {
|
|
6045
|
+
localities.push({
|
|
6046
|
+
...node,
|
|
6047
|
+
name: node.localname || node.name || node.code,
|
|
6048
|
+
i18nkey: node.i18nkey || `${tenantId.replace(".", "_")}_REVENUE_${node.code}`.toUpperCase(),
|
|
6049
|
+
zone: currentZone,
|
|
6050
|
+
ward: currentWard
|
|
6051
|
+
});
|
|
6052
|
+
}
|
|
6053
|
+
if (node.children && node.children.length > 0) {
|
|
6054
|
+
node.children.forEach(child => extractLocalities(child, currentZone, currentWard));
|
|
6055
|
+
}
|
|
6056
|
+
};
|
|
6057
|
+
boundaries.forEach(rootNode => extractLocalities(rootNode));
|
|
6058
|
+
return localities;
|
|
6059
|
+
}, [boundaryData, tenantId]);
|
|
6060
|
+
const fetchedPincodes = useMemo(() => {
|
|
6061
|
+
const pinSet = new Set();
|
|
6062
|
+
structuredLocality.forEach(loc => {
|
|
6063
|
+
if (loc.pincode) {
|
|
6064
|
+
const pins = Array.isArray(loc.pincode) ? loc.pincode : [loc.pincode];
|
|
6065
|
+
pins.forEach(p => pinSet.add(p.toString()));
|
|
6066
|
+
}
|
|
6067
|
+
});
|
|
6068
|
+
if (pinSet.size === 0 && city !== null && city !== void 0 && city.pincode) {
|
|
6069
|
+
const pins = Array.isArray(city.pincode) ? city.pincode : [city.pincode];
|
|
6070
|
+
pins.forEach(p => pinSet.add(p.toString()));
|
|
6071
|
+
}
|
|
6072
|
+
return Array.from(pinSet).sort().map(pin => ({
|
|
6073
|
+
code: pin,
|
|
6074
|
+
name: pin,
|
|
6075
|
+
i18nKey: pin
|
|
6076
|
+
}));
|
|
6077
|
+
}, [structuredLocality, city]);
|
|
6078
|
+
const filteredLocalities = useMemo(() => {
|
|
6079
|
+
if (!pincode) return structuredLocality;
|
|
6080
|
+
return structuredLocality.filter(loc => {
|
|
6081
|
+
if (!loc.pincode) return false;
|
|
6082
|
+
const pins = Array.isArray(loc.pincode) ? loc.pincode : [loc.pincode];
|
|
6083
|
+
return pins.some(p => p.toString() === pincode);
|
|
6084
|
+
});
|
|
6085
|
+
}, [structuredLocality, pincode]);
|
|
6086
|
+
useEffect(() => {
|
|
6087
|
+
var _formData$address12;
|
|
6088
|
+
const currentId = (formData === null || formData === void 0 ? void 0 : formData.id) || (formData === null || formData === void 0 ? void 0 : formData.bookingId) || (formData === null || formData === void 0 ? void 0 : (_formData$address12 = formData.address) === null || _formData$address12 === void 0 ? void 0 : _formData$address12.id);
|
|
5966
6089
|
if (currentId && lastBookingId.current !== currentId) {
|
|
5967
6090
|
isInitialized.current = false;
|
|
5968
6091
|
lastBookingId.current = currentId;
|
|
@@ -5980,39 +6103,41 @@ const AddFixFillAddress = ({
|
|
|
5980
6103
|
setAddressLine1(addressData.addressLine1 || "");
|
|
5981
6104
|
setAddressLine2(addressData.addressLine2 || "");
|
|
5982
6105
|
setAddressType(allOptions.find(a => a.code === addressData.addressType) || addressData.addressType || null);
|
|
6106
|
+
setZone(addressData.zone || "");
|
|
6107
|
+
setBlock(addressData.block || "");
|
|
5983
6108
|
setLatitude(addressData.latitude || "");
|
|
5984
6109
|
setLongitude(addressData.longitude || "");
|
|
5985
|
-
if (
|
|
5986
|
-
if (
|
|
5987
|
-
const localityObj =
|
|
6110
|
+
if (boundaryData || !addressData.cityCode) {
|
|
6111
|
+
if (boundaryData) {
|
|
6112
|
+
const localityObj = boundaryData.find(l => l.code === addressData.localityCode || l.code === addressData.locality || l.i18nkey === addressData.locality);
|
|
5988
6113
|
setLocality(localityObj || addressData.locality || null);
|
|
5989
6114
|
} else {
|
|
5990
6115
|
setLocality(addressData.locality || null);
|
|
5991
6116
|
}
|
|
5992
6117
|
isInitialized.current = true;
|
|
5993
6118
|
lastSyncedAddress.current = JSON.stringify(addressData);
|
|
5994
|
-
} else {
|
|
5995
|
-
console.log("AddFixFillAddress: Waiting for localities to load for city:", cityObj === null || cityObj === void 0 ? void 0 : cityObj.code);
|
|
5996
6119
|
}
|
|
5997
6120
|
}
|
|
5998
|
-
}, [formData === null || formData === void 0 ? void 0 : formData.address, city, allCities,
|
|
6121
|
+
}, [formData === null || formData === void 0 ? void 0 : formData.address, city, allCities, boundaryData]);
|
|
5999
6122
|
useEffect(() => {
|
|
6000
6123
|
if (!navigator.geolocation) return;
|
|
6001
6124
|
navigator.geolocation.getCurrentPosition(pos => {
|
|
6002
6125
|
setLatitude(pos.coords.latitude);
|
|
6003
6126
|
setLongitude(pos.coords.longitude);
|
|
6004
|
-
}, () =>
|
|
6127
|
+
}, () => {});
|
|
6005
6128
|
}, []);
|
|
6006
6129
|
useEffect(() => {
|
|
6007
6130
|
if (selectedAddress && Object.keys(selectedAddress).length) {
|
|
6008
6131
|
setPincode(selectedAddress.pinCode);
|
|
6009
6132
|
setCity(allCities === null || allCities === void 0 ? void 0 : allCities.find(c => c.name === selectedAddress.city));
|
|
6010
|
-
setLocality(
|
|
6133
|
+
setLocality(boundaryData === null || boundaryData === void 0 ? void 0 : boundaryData.find(l => l.i18nkey === selectedAddress.locality));
|
|
6011
6134
|
setHouseNo(selectedAddress.houseNumber);
|
|
6012
6135
|
setStreetName(selectedAddress.streetName);
|
|
6013
6136
|
setLandmark(selectedAddress.landmark);
|
|
6014
6137
|
setAddressLine1(selectedAddress.address);
|
|
6015
6138
|
setAddressLine2(selectedAddress.address2);
|
|
6139
|
+
setZone(selectedAddress.zone);
|
|
6140
|
+
setBlock(selectedAddress.block);
|
|
6016
6141
|
setLatitude(selectedAddress.latitude);
|
|
6017
6142
|
setLongitude(selectedAddress.longitude);
|
|
6018
6143
|
setAddressType(allOptions.find(a => a.code === selectedAddress.addressType));
|
|
@@ -6030,6 +6155,8 @@ const AddFixFillAddress = ({
|
|
|
6030
6155
|
addressLine2: addressLine2 || "",
|
|
6031
6156
|
streetName: streetName || "",
|
|
6032
6157
|
addressType: (addressType === null || addressType === void 0 ? void 0 : addressType.code) || addressType || null,
|
|
6158
|
+
zone: zone || "",
|
|
6159
|
+
block: block || "",
|
|
6033
6160
|
latitude: latitude || "",
|
|
6034
6161
|
longitude: longitude || ""
|
|
6035
6162
|
};
|
|
@@ -6038,23 +6165,16 @@ const AddFixFillAddress = ({
|
|
|
6038
6165
|
lastSyncedAddress.current = addressString;
|
|
6039
6166
|
onSelect((config === null || config === void 0 ? void 0 : config.key) || "address", currentAddress);
|
|
6040
6167
|
}
|
|
6041
|
-
}, [pincode, city, locality, houseNo, landmark, addressLine1, addressLine2, streetName, addressType, latitude, longitude]);
|
|
6042
|
-
|
|
6043
|
-
|
|
6168
|
+
}, [pincode, city, locality, houseNo, landmark, addressLine1, addressLine2, streetName, addressType, zone, block, latitude, longitude]);
|
|
6169
|
+
return /*#__PURE__*/React.createElement(CollapsibleCardPage$1, {
|
|
6170
|
+
title: t("WT_ADDRESS_DETAILS"),
|
|
6171
|
+
defaultOpen: true
|
|
6172
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
6044
6173
|
className: "formcomposer-section-grid"
|
|
6045
|
-
}, /*#__PURE__*/React.createElement(
|
|
6046
|
-
style: {
|
|
6047
|
-
gridColumn: "span 2",
|
|
6048
|
-
marginBottom: isMobile ? "0px" : "10px"
|
|
6049
|
-
}
|
|
6050
|
-
}, t("WT_ADDRESS_DETAILS")), (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", {
|
|
6051
|
-
style: {
|
|
6052
|
-
gridColumn: "span 2"
|
|
6053
|
-
}
|
|
6054
|
-
}, /*#__PURE__*/React.createElement(CardLabel, null, t("COMMON_ADDRESS_TYPE")), /*#__PURE__*/React.createElement(Dropdown, {
|
|
6174
|
+
}, (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", null, /*#__PURE__*/React.createElement(CardLabel, null, t("COMMON_ADDRESS_TYPE")), /*#__PURE__*/React.createElement(Dropdown, {
|
|
6055
6175
|
selected: selectedAddress,
|
|
6056
6176
|
select: setSelectedAddress,
|
|
6057
|
-
option: userDetails.addresses,
|
|
6177
|
+
option: userDetails.addresses || [],
|
|
6058
6178
|
optionKey: "address",
|
|
6059
6179
|
t: t,
|
|
6060
6180
|
style: {
|
|
@@ -6063,76 +6183,146 @@ const AddFixFillAddress = ({
|
|
|
6063
6183
|
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("COMMON_ADDRESS_TYPE")), /*#__PURE__*/React.createElement(Dropdown, {
|
|
6064
6184
|
selected: addressType,
|
|
6065
6185
|
select: setAddressType,
|
|
6066
|
-
option: availableAddressTypeOptions,
|
|
6186
|
+
option: availableAddressTypeOptions || [],
|
|
6187
|
+
optionKey: "i18nKey",
|
|
6188
|
+
t: t,
|
|
6189
|
+
style: {
|
|
6190
|
+
width: "100%"
|
|
6191
|
+
}
|
|
6192
|
+
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("CITY"), " ", /*#__PURE__*/React.createElement("span", {
|
|
6193
|
+
className: "astericColor"
|
|
6194
|
+
}, "*")), /*#__PURE__*/React.createElement(Dropdown, {
|
|
6195
|
+
selected: city,
|
|
6196
|
+
select: setCity,
|
|
6197
|
+
option: allCities || [],
|
|
6067
6198
|
optionKey: "i18nKey",
|
|
6068
6199
|
t: t,
|
|
6200
|
+
disable: true
|
|
6201
|
+
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("PINCODE"), " ", /*#__PURE__*/React.createElement("span", {
|
|
6202
|
+
className: "astericColor"
|
|
6203
|
+
}, "*")), /*#__PURE__*/React.createElement(Dropdown, {
|
|
6204
|
+
selected: (fetchedPincodes === null || fetchedPincodes === void 0 ? void 0 : fetchedPincodes.find(p => p.code === pincode)) || (pincode ? {
|
|
6205
|
+
code: pincode,
|
|
6206
|
+
name: pincode,
|
|
6207
|
+
i18nKey: pincode
|
|
6208
|
+
} : null),
|
|
6209
|
+
select: val => {
|
|
6210
|
+
const newPin = val === null || val === void 0 ? void 0 : val.code;
|
|
6211
|
+
if (newPin !== pincode) {
|
|
6212
|
+
setLocality(null);
|
|
6213
|
+
setZone("");
|
|
6214
|
+
setBlock("");
|
|
6215
|
+
setLatitude("");
|
|
6216
|
+
setLongitude("");
|
|
6217
|
+
setAddressLine1("");
|
|
6218
|
+
setAddressLine2("");
|
|
6219
|
+
}
|
|
6220
|
+
setPincode(newPin);
|
|
6221
|
+
},
|
|
6222
|
+
option: fetchedPincodes || [],
|
|
6223
|
+
optionKey: "i18nKey",
|
|
6224
|
+
t: t,
|
|
6225
|
+
style: {
|
|
6226
|
+
width: "100%"
|
|
6227
|
+
}
|
|
6228
|
+
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("LOCALITY"), " ", /*#__PURE__*/React.createElement("span", {
|
|
6229
|
+
className: "astericColor"
|
|
6230
|
+
}, "*")), /*#__PURE__*/React.createElement(Dropdown, {
|
|
6231
|
+
selected: locality,
|
|
6232
|
+
select: val => {
|
|
6233
|
+
setLocality(val);
|
|
6234
|
+
if (val !== null && val !== void 0 && val.latitude) setLatitude(val.latitude);
|
|
6235
|
+
if (val !== null && val !== void 0 && val.longitude) setLongitude(val.longitude);
|
|
6236
|
+
if (val !== null && val !== void 0 && val.localname) setAddressLine1(val.localname);
|
|
6237
|
+
if (val !== null && val !== void 0 && val.name) setAddressLine2(val.name);
|
|
6238
|
+
if (val !== null && val !== void 0 && val.zone) setZone(val.zone);
|
|
6239
|
+
if (val !== null && val !== void 0 && val.ward) setBlock(val.ward);
|
|
6240
|
+
if (val !== null && val !== void 0 && val.pincode) {
|
|
6241
|
+
const p = Array.isArray(val.pincode) ? val.pincode[0] : val.pincode;
|
|
6242
|
+
if (p) setPincode(p.toString());
|
|
6243
|
+
}
|
|
6244
|
+
},
|
|
6245
|
+
option: filteredLocalities,
|
|
6246
|
+
optionKey: "i18nkey",
|
|
6247
|
+
t: t,
|
|
6069
6248
|
style: {
|
|
6070
6249
|
width: "100%"
|
|
6071
6250
|
}
|
|
6072
6251
|
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("HOUSE_NO"), /*#__PURE__*/React.createElement("span", {
|
|
6073
|
-
className: "
|
|
6252
|
+
className: "astericColor"
|
|
6074
6253
|
}, "*")), /*#__PURE__*/React.createElement(TextInput, {
|
|
6075
6254
|
value: houseNo,
|
|
6076
|
-
onChange: e => setHouseNo(e.target.value)
|
|
6255
|
+
onChange: e => setHouseNo(e.target.value),
|
|
6256
|
+
style: {
|
|
6257
|
+
width: "100%"
|
|
6258
|
+
}
|
|
6077
6259
|
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("STREET_NAME"), " ", /*#__PURE__*/React.createElement("span", {
|
|
6078
|
-
className: "
|
|
6260
|
+
className: "astericColor"
|
|
6079
6261
|
}, "*")), /*#__PURE__*/React.createElement(TextInput, {
|
|
6080
6262
|
value: streetName,
|
|
6081
|
-
onChange: e => setStreetName(e.target.value)
|
|
6263
|
+
onChange: e => setStreetName(e.target.value),
|
|
6264
|
+
style: {
|
|
6265
|
+
width: "100%"
|
|
6266
|
+
}
|
|
6082
6267
|
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("ADDRESS_LINE1"), " ", /*#__PURE__*/React.createElement("span", {
|
|
6083
|
-
className: "
|
|
6268
|
+
className: "astericColor"
|
|
6084
6269
|
}, "*")), /*#__PURE__*/React.createElement(TextInput, {
|
|
6085
6270
|
value: addressLine1,
|
|
6086
|
-
onChange: e => setAddressLine1(e.target.value)
|
|
6271
|
+
onChange: e => setAddressLine1(e.target.value),
|
|
6272
|
+
style: {
|
|
6273
|
+
width: "100%"
|
|
6274
|
+
}
|
|
6087
6275
|
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("ADDRESS_LINE2"), " ", /*#__PURE__*/React.createElement("span", {
|
|
6088
|
-
className: "
|
|
6276
|
+
className: "astericColor"
|
|
6089
6277
|
}, "*")), /*#__PURE__*/React.createElement(TextInput, {
|
|
6090
6278
|
value: addressLine2,
|
|
6091
|
-
onChange: e => setAddressLine2(e.target.value)
|
|
6092
|
-
|
|
6093
|
-
|
|
6094
|
-
|
|
6095
|
-
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("
|
|
6096
|
-
className: "
|
|
6097
|
-
}, "*")), /*#__PURE__*/React.createElement(
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
|
|
6101
|
-
|
|
6102
|
-
|
|
6103
|
-
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
-
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
name: "locality",
|
|
6112
|
-
render: () => /*#__PURE__*/React.createElement(Dropdown, {
|
|
6113
|
-
selected: locality,
|
|
6114
|
-
select: setLocality,
|
|
6115
|
-
option: structuredLocality,
|
|
6116
|
-
optionKey: "i18nKey",
|
|
6117
|
-
t: t
|
|
6118
|
-
})
|
|
6279
|
+
onChange: e => setAddressLine2(e.target.value),
|
|
6280
|
+
style: {
|
|
6281
|
+
width: "100%"
|
|
6282
|
+
}
|
|
6283
|
+
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("BLOCK"), " ", /*#__PURE__*/React.createElement("span", {
|
|
6284
|
+
className: "astericColor"
|
|
6285
|
+
}, "*")), /*#__PURE__*/React.createElement(TextInput, {
|
|
6286
|
+
value: block,
|
|
6287
|
+
onChange: e => setBlock(e.target.value),
|
|
6288
|
+
style: {
|
|
6289
|
+
width: "100%"
|
|
6290
|
+
}
|
|
6291
|
+
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("ZONE"), " ", /*#__PURE__*/React.createElement("span", {
|
|
6292
|
+
className: "astericColor"
|
|
6293
|
+
}, "*")), /*#__PURE__*/React.createElement(TextInput, {
|
|
6294
|
+
value: zone,
|
|
6295
|
+
onChange: e => setZone(e.target.value),
|
|
6296
|
+
style: {
|
|
6297
|
+
width: "100%"
|
|
6298
|
+
}
|
|
6119
6299
|
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("LATITUDE"), " ", /*#__PURE__*/React.createElement("span", {
|
|
6120
|
-
className: "
|
|
6300
|
+
className: "astericColor"
|
|
6121
6301
|
}, "*")), /*#__PURE__*/React.createElement(TextInput, {
|
|
6122
6302
|
value: latitude,
|
|
6123
|
-
onChange: e => setLatitude(e.target.value)
|
|
6303
|
+
onChange: e => setLatitude(e.target.value),
|
|
6304
|
+
style: {
|
|
6305
|
+
width: "100%"
|
|
6306
|
+
}
|
|
6124
6307
|
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("LONGITUDE"), " ", /*#__PURE__*/React.createElement("span", {
|
|
6125
|
-
className: "
|
|
6308
|
+
className: "astericColor"
|
|
6126
6309
|
}, "*")), /*#__PURE__*/React.createElement(TextInput, {
|
|
6127
6310
|
value: longitude,
|
|
6128
|
-
onChange: e => setLongitude(e.target.value)
|
|
6129
|
-
|
|
6130
|
-
|
|
6131
|
-
|
|
6132
|
-
|
|
6133
|
-
|
|
6134
|
-
|
|
6135
|
-
|
|
6311
|
+
onChange: e => setLongitude(e.target.value),
|
|
6312
|
+
style: {
|
|
6313
|
+
width: "100%"
|
|
6314
|
+
}
|
|
6315
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
6316
|
+
style: {
|
|
6317
|
+
gridColumn: "span 2"
|
|
6318
|
+
}
|
|
6319
|
+
}, /*#__PURE__*/React.createElement(CardLabel, null, t("LANDMARK")), /*#__PURE__*/React.createElement(TextInput, {
|
|
6320
|
+
value: landmark,
|
|
6321
|
+
onChange: e => setLandmark(e.target.value),
|
|
6322
|
+
style: {
|
|
6323
|
+
width: "100%"
|
|
6324
|
+
}
|
|
6325
|
+
}))));
|
|
6136
6326
|
};
|
|
6137
6327
|
|
|
6138
6328
|
const AddFillingPointAddress = () => {
|
|
@@ -6362,12 +6552,10 @@ const AddFixPointAddress = () => {
|
|
|
6362
6552
|
mutate: updateFixedPoint
|
|
6363
6553
|
} = Digit.Hooks.wt.useUpdateFixedPoint(tenantId);
|
|
6364
6554
|
const handleSubmit = e => {
|
|
6365
|
-
console.log("Submitting Form Data:", formData);
|
|
6366
6555
|
const payload = fixedPointPayload({
|
|
6367
6556
|
...formData,
|
|
6368
6557
|
tenantId
|
|
6369
6558
|
});
|
|
6370
|
-
console.log("Generated Payload:", payload);
|
|
6371
6559
|
const mutation = editId ? updateFixedPoint : createFixedPoint;
|
|
6372
6560
|
mutation(payload, {
|
|
6373
6561
|
onSuccess: () => {
|
|
@@ -6382,7 +6570,6 @@ const AddFixPointAddress = () => {
|
|
|
6382
6570
|
},
|
|
6383
6571
|
onError: error => {
|
|
6384
6572
|
var _error$response, _error$response$data, _error$response$data$, _error$response$data$2;
|
|
6385
|
-
console.error("Mutation Error:", error);
|
|
6386
6573
|
setShowToast({
|
|
6387
6574
|
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")),
|
|
6388
6575
|
isError: true
|
|
@@ -6411,14 +6598,12 @@ const AddFixPointAddress = () => {
|
|
|
6411
6598
|
flexDirection: "column",
|
|
6412
6599
|
gap: "16px"
|
|
6413
6600
|
}
|
|
6414
|
-
}, /*#__PURE__*/React.createElement(
|
|
6601
|
+
}, /*#__PURE__*/React.createElement(CollapsibleCardPage$1, {
|
|
6602
|
+
title: t("WT_FIXING_POINT_APPLICANT_DETAILS"),
|
|
6603
|
+
defaultOpen: true
|
|
6604
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
6415
6605
|
className: "formcomposer-section-grid"
|
|
6416
|
-
}, /*#__PURE__*/React.createElement(
|
|
6417
|
-
style: {
|
|
6418
|
-
gridColumn: "span 2",
|
|
6419
|
-
marginBottom: isMobile ? "0px" : "10px"
|
|
6420
|
-
}
|
|
6421
|
-
}, t("WT_FIXING_POINT_APPLICANT_DETAILS")), /*#__PURE__*/React.createElement("div", {
|
|
6606
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
6422
6607
|
style: {
|
|
6423
6608
|
display: "flex",
|
|
6424
6609
|
flexDirection: "column"
|
|
@@ -6484,7 +6669,7 @@ const AddFixPointAddress = () => {
|
|
|
6484
6669
|
style: {
|
|
6485
6670
|
width: "100%"
|
|
6486
6671
|
}
|
|
6487
|
-
}))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(AddFixFillAddress, {
|
|
6672
|
+
})))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(AddFixFillAddress, {
|
|
6488
6673
|
t: t,
|
|
6489
6674
|
config: addressConfig,
|
|
6490
6675
|
onSelect: handleSelect,
|
|
@@ -7501,14 +7686,12 @@ const VendorAssign = ({
|
|
|
7501
7686
|
style: {
|
|
7502
7687
|
flex: 1
|
|
7503
7688
|
}
|
|
7504
|
-
}, /*#__PURE__*/React.createElement(
|
|
7689
|
+
}, /*#__PURE__*/React.createElement(CollapsibleCardPage$1, {
|
|
7690
|
+
title: t("WT_VENDOR_ASSIGN"),
|
|
7691
|
+
defaultOpen: true
|
|
7692
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
7505
7693
|
className: "formcomposer-section-grid"
|
|
7506
|
-
}, /*#__PURE__*/React.createElement(
|
|
7507
|
-
style: {
|
|
7508
|
-
marginBottom: "10px",
|
|
7509
|
-
gridColumn: "span 2"
|
|
7510
|
-
}
|
|
7511
|
-
}, t("WT_VENDOR_ASSIGN")), /*#__PURE__*/React.createElement("div", {
|
|
7694
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
7512
7695
|
style: {
|
|
7513
7696
|
display: "flex",
|
|
7514
7697
|
flexDirection: "column"
|
|
@@ -7575,7 +7758,7 @@ const VendorAssign = ({
|
|
|
7575
7758
|
formData: {
|
|
7576
7759
|
serviceType: selectedServiceType
|
|
7577
7760
|
}
|
|
7578
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
7761
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
7579
7762
|
style: {
|
|
7580
7763
|
display: "flex",
|
|
7581
7764
|
marginTop: "24px",
|
|
@@ -17442,8 +17625,8 @@ var _DataView = DataView;
|
|
|
17442
17625
|
var Promise$1 = _getNative(_root, 'Promise');
|
|
17443
17626
|
var _Promise = Promise$1;
|
|
17444
17627
|
|
|
17445
|
-
var Set = _getNative(_root, 'Set');
|
|
17446
|
-
var _Set = Set;
|
|
17628
|
+
var Set$1 = _getNative(_root, 'Set');
|
|
17629
|
+
var _Set = Set$1;
|
|
17447
17630
|
|
|
17448
17631
|
var WeakMap = _getNative(_root, 'WeakMap');
|
|
17449
17632
|
var _WeakMap = WeakMap;
|
|
@@ -19750,7 +19933,7 @@ const NOCDocuments = ({
|
|
|
19750
19933
|
}
|
|
19751
19934
|
}, [nocDocs, commonDocMaping]);
|
|
19752
19935
|
useEffect(() => {
|
|
19753
|
-
if (bpaApplicationStatus ===
|
|
19936
|
+
if (bpaApplicationStatus === "NOC_VERIFICATION_INPROGRESS" && (actions === null || actions === void 0 ? void 0 : actions.length) > 0) setCheckEnablingDocs(true);else setCheckEnablingDocs(false);
|
|
19754
19937
|
}, [applicationData, bpaActionsDetails]);
|
|
19755
19938
|
return /*#__PURE__*/React.createElement("div", {
|
|
19756
19939
|
style: {
|
|
@@ -19775,9 +19958,9 @@ const NOCDocuments = ({
|
|
|
19775
19958
|
label: isEmployee ? `${t(noc === null || noc === void 0 ? void 0 : noc.title)}` : t(noc === null || noc === void 0 ? void 0 : noc.title),
|
|
19776
19959
|
text: noc !== null && noc !== void 0 && noc.value ? t(noc === null || noc === void 0 ? void 0 : noc.value) : t("CS_NA"),
|
|
19777
19960
|
textStyle: (noc === null || noc === void 0 ? void 0 : noc.value) == "APPROVED" || (noc === null || noc === void 0 ? void 0 : noc.value) == "AUTO_APPROVED" ? {
|
|
19778
|
-
color: "#
|
|
19961
|
+
color: "#2E9E8F"
|
|
19779
19962
|
} : {
|
|
19780
|
-
color: "#
|
|
19963
|
+
color: "#D83A2F"
|
|
19781
19964
|
}
|
|
19782
19965
|
});
|
|
19783
19966
|
} else {
|
|
@@ -20329,7 +20512,7 @@ const ScruntinyDetails = ({
|
|
|
20329
20512
|
const getTextValues = data => {
|
|
20330
20513
|
if (data !== null && data !== void 0 && data.value && data !== null && data !== void 0 && data.isTransLate) return /*#__PURE__*/React.createElement("span", {
|
|
20331
20514
|
style: {
|
|
20332
|
-
color: "#
|
|
20515
|
+
color: "#2E9E8F"
|
|
20333
20516
|
}
|
|
20334
20517
|
}, t(data === null || data === void 0 ? void 0 : data.value));else if (data !== null && data !== void 0 && data.value && data !== null && data !== void 0 && data.isTransLate) return t(data === null || data === void 0 ? void 0 : data.value);else if (data !== null && data !== void 0 && data.value) return data === null || data === void 0 ? void 0 : data.value;else t("NA");
|
|
20335
20518
|
};
|
|
@@ -21009,7 +21192,7 @@ const WSFeeEstimation = ({
|
|
|
21009
21192
|
var _result$Calculation2, _result$Calculation2$, _result$Calculation2$2;
|
|
21010
21193
|
result === null || result === void 0 ? void 0 : (_result$Calculation2 = result.Calculation) === null || _result$Calculation2 === void 0 ? void 0 : (_result$Calculation2$ = _result$Calculation2[0]) === null || _result$Calculation2$ === void 0 ? void 0 : (_result$Calculation2$2 = _result$Calculation2$.taxHeadEstimates) === null || _result$Calculation2$2 === void 0 ? void 0 : _result$Calculation2$2.forEach(data => data.amount = data.estimateAmount);
|
|
21011
21194
|
}
|
|
21012
|
-
result.Calculation[0].billSlabData = _.groupBy(result === null || result === void 0 ? void 0 : (_result$Calculation3 = result.Calculation) === null || _result$Calculation3 === void 0 ? void 0 : (_result$Calculation3$ = _result$Calculation3[0]) === null || _result$Calculation3$ === void 0 ? void 0 : _result$Calculation3$.taxHeadEstimates,
|
|
21195
|
+
result.Calculation[0].billSlabData = _.groupBy(result === null || result === void 0 ? void 0 : (_result$Calculation3 = result.Calculation) === null || _result$Calculation3 === void 0 ? void 0 : (_result$Calculation3$ = _result$Calculation3[0]) === null || _result$Calculation3$ === void 0 ? void 0 : _result$Calculation3$.taxHeadEstimates, "category");
|
|
21013
21196
|
const values = [{
|
|
21014
21197
|
title: "WS_APPLICATION_FEE_HEADER",
|
|
21015
21198
|
value: (_result$Calculation4 = result.Calculation) === null || _result$Calculation4 === void 0 ? void 0 : (_result$Calculation4$ = _result$Calculation4[0]) === null || _result$Calculation4$ === void 0 ? void 0 : _result$Calculation4$.fee
|
|
@@ -21055,7 +21238,7 @@ const WSFeeEstimation = ({
|
|
|
21055
21238
|
if (targetValueSign == 1) {
|
|
21056
21239
|
values[value] = e.target.value;
|
|
21057
21240
|
} else {
|
|
21058
|
-
values[value] =
|
|
21241
|
+
values[value] = "";
|
|
21059
21242
|
}
|
|
21060
21243
|
} else if (isDropDownValue) {
|
|
21061
21244
|
values[`${value}_data`] = e;
|
|
@@ -21070,7 +21253,7 @@ const WSFeeEstimation = ({
|
|
|
21070
21253
|
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
21071
21254
|
style: {
|
|
21072
21255
|
lineHeight: "19px",
|
|
21073
|
-
maxWidth: "
|
|
21256
|
+
maxWidth: "100%",
|
|
21074
21257
|
minWidth: "280px"
|
|
21075
21258
|
}
|
|
21076
21259
|
}, values && /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement("div", null, values === null || values === void 0 ? void 0 : values.map((value, index) => {
|
|
@@ -21101,15 +21284,16 @@ const WSFeeEstimation = ({
|
|
|
21101
21284
|
label: `${t(`CS_INBOX_STATUS_FILTER`)}`,
|
|
21102
21285
|
text: isPaid ? t("WS_COMMON_PAID_LABEL") : t("WS_COMMON_NOT_PAID"),
|
|
21103
21286
|
textStyle: !isPaid ? {
|
|
21104
|
-
color: "#
|
|
21287
|
+
color: "#D83A2F"
|
|
21105
21288
|
} : {
|
|
21106
|
-
color: "#
|
|
21289
|
+
color: "#2E9E8F"
|
|
21107
21290
|
}
|
|
21108
21291
|
}))), wsAdditionalDetails !== null && wsAdditionalDetails !== void 0 && (_wsAdditionalDetails$18 = wsAdditionalDetails.additionalDetails) !== null && _wsAdditionalDetails$18 !== void 0 && _wsAdditionalDetails$18.isAdhocRebate ? /*#__PURE__*/React.createElement("div", {
|
|
21109
21292
|
onClick: e => {
|
|
21110
21293
|
showPopUp(true);
|
|
21111
21294
|
}
|
|
21112
21295
|
}, /*#__PURE__*/React.createElement("span", {
|
|
21296
|
+
className: "add-details-link hover-button",
|
|
21113
21297
|
style: {
|
|
21114
21298
|
cursor: "pointer",
|
|
21115
21299
|
color: "#a82227"
|
|
@@ -21133,14 +21317,16 @@ const WSFeeEstimation = ({
|
|
|
21133
21317
|
actionSaveOnSubmit: e => addAdhocRebatePenality(),
|
|
21134
21318
|
hideSubmit: false,
|
|
21135
21319
|
popupStyles: {
|
|
21136
|
-
overflowY: "auto"
|
|
21320
|
+
overflowY: "auto",
|
|
21321
|
+
background: "#f0f3f7"
|
|
21137
21322
|
}
|
|
21138
|
-
}, /*#__PURE__*/React.createElement("div",
|
|
21323
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
21139
21324
|
style: {
|
|
21140
|
-
|
|
21141
|
-
|
|
21325
|
+
display: "flex",
|
|
21326
|
+
flexDirection: "column",
|
|
21327
|
+
gap: "16px"
|
|
21142
21328
|
}
|
|
21143
|
-
}, /*#__PURE__*/React.createElement(CardSectionHeader, {
|
|
21329
|
+
}, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSectionHeader, {
|
|
21144
21330
|
style: {
|
|
21145
21331
|
fontSize: "16px",
|
|
21146
21332
|
fontWeight: "700",
|
|
@@ -21148,7 +21334,7 @@ const WSFeeEstimation = ({
|
|
|
21148
21334
|
padding: "0px",
|
|
21149
21335
|
margin: "0px 0px 10px 0px"
|
|
21150
21336
|
}
|
|
21151
|
-
}, t("PT_AD_PENALTY")), /*#__PURE__*/React.createElement(CardLabel, null, t("PT_TX_HEADS")), /*#__PURE__*/React.createElement("div", {
|
|
21337
|
+
}, t("PT_AD_PENALTY")), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("PT_TX_HEADS")), /*#__PURE__*/React.createElement("div", {
|
|
21152
21338
|
className: "field"
|
|
21153
21339
|
}, /*#__PURE__*/React.createElement(Dropdown, {
|
|
21154
21340
|
isMandatory: true,
|
|
@@ -21159,9 +21345,7 @@ const WSFeeEstimation = ({
|
|
|
21159
21345
|
isPropertyAssess: true,
|
|
21160
21346
|
name: "adhocPenaltyReason_data",
|
|
21161
21347
|
t: t
|
|
21162
|
-
})), (fields === null || fields === void 0 ? void 0 : (_fields$adhocPenaltyR = fields.adhocPenaltyReason_data) === null || _fields$adhocPenaltyR === void 0 ? void 0 : _fields$adhocPenaltyR.title) === "PT_OTHERS" && /*#__PURE__*/React.createElement("div", {
|
|
21163
|
-
className: "field"
|
|
21164
|
-
}, /*#__PURE__*/React.createElement(CardLabel, null, t("PT_REASON")), /*#__PURE__*/React.createElement("div", {
|
|
21348
|
+
}))), (fields === null || fields === void 0 ? void 0 : (_fields$adhocPenaltyR = fields.adhocPenaltyReason_data) === null || _fields$adhocPenaltyR === void 0 ? void 0 : _fields$adhocPenaltyR.title) === "PT_OTHERS" && /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("PT_REASON")), /*#__PURE__*/React.createElement("div", {
|
|
21165
21349
|
className: "field"
|
|
21166
21350
|
}, /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
21167
21351
|
style: {
|
|
@@ -21178,7 +21362,7 @@ const WSFeeEstimation = ({
|
|
|
21178
21362
|
pattern: "^[a-zA-Z ]*$",
|
|
21179
21363
|
type: "text",
|
|
21180
21364
|
title: t("TL_NAME_ERROR_MESSAGE")
|
|
21181
|
-
})))), /*#__PURE__*/React.createElement(CardLabel, null, t("PT_HEAD_AMT")), /*#__PURE__*/React.createElement("div", {
|
|
21365
|
+
})))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("PT_HEAD_AMT")), /*#__PURE__*/React.createElement("div", {
|
|
21182
21366
|
className: "field"
|
|
21183
21367
|
}, /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
21184
21368
|
style: {
|
|
@@ -21194,12 +21378,7 @@ const WSFeeEstimation = ({
|
|
|
21194
21378
|
isRequired: true,
|
|
21195
21379
|
pattern: "^[1-9]+[0-9]*$",
|
|
21196
21380
|
title: t("ERR_DEFAULT_INPUT_FIELD_MSG")
|
|
21197
|
-
})))), /*#__PURE__*/React.createElement(Card, {
|
|
21198
|
-
style: {
|
|
21199
|
-
padding: "10px 10px 1px 10px",
|
|
21200
|
-
margin: "0px 0px 15px 0px"
|
|
21201
|
-
}
|
|
21202
|
-
}, /*#__PURE__*/React.createElement(CardSectionHeader, {
|
|
21381
|
+
}))))), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSectionHeader, {
|
|
21203
21382
|
style: {
|
|
21204
21383
|
fontSize: "16px",
|
|
21205
21384
|
fontWeight: "700",
|
|
@@ -21207,7 +21386,7 @@ const WSFeeEstimation = ({
|
|
|
21207
21386
|
padding: "0px",
|
|
21208
21387
|
margin: "0px 0px 10px 0px"
|
|
21209
21388
|
}
|
|
21210
|
-
}, t("PT_AD_REBATE")), /*#__PURE__*/React.createElement(CardLabel, null, t("PT_TX_HEADS")), /*#__PURE__*/React.createElement("div", {
|
|
21389
|
+
}, t("PT_AD_REBATE")), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("PT_TX_HEADS")), /*#__PURE__*/React.createElement("div", {
|
|
21211
21390
|
className: "field"
|
|
21212
21391
|
}, /*#__PURE__*/React.createElement(Dropdown, {
|
|
21213
21392
|
isMandatory: true,
|
|
@@ -21218,9 +21397,7 @@ const WSFeeEstimation = ({
|
|
|
21218
21397
|
name: "adhocRebateReason_data",
|
|
21219
21398
|
isPropertyAssess: true,
|
|
21220
21399
|
t: t
|
|
21221
|
-
})), (fields === null || fields === void 0 ? void 0 : (_fields$adhocRebateRe = fields.adhocRebateReason_data) === null || _fields$adhocRebateRe === void 0 ? void 0 : _fields$adhocRebateRe.title) === "PT_OTHERS" && /*#__PURE__*/React.createElement("
|
|
21222
|
-
className: "field"
|
|
21223
|
-
}, /*#__PURE__*/React.createElement(CardLabel, null, t("PT_REASON")), /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
21400
|
+
}))), (fields === null || fields === void 0 ? void 0 : (_fields$adhocRebateRe = fields.adhocRebateReason_data) === null || _fields$adhocRebateRe === void 0 ? void 0 : _fields$adhocRebateRe.title) === "PT_OTHERS" && /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("PT_REASON")), /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
21224
21401
|
style: {
|
|
21225
21402
|
background: "#FAFAFA"
|
|
21226
21403
|
},
|
|
@@ -21235,7 +21412,7 @@ const WSFeeEstimation = ({
|
|
|
21235
21412
|
pattern: "^[a-zA-Z ]*$",
|
|
21236
21413
|
type: "text",
|
|
21237
21414
|
title: t("TL_NAME_ERROR_MESSAGE")
|
|
21238
|
-
}))), /*#__PURE__*/React.createElement(CardLabel, null, t("PT_HEAD_AMT")), /*#__PURE__*/React.createElement("div", {
|
|
21415
|
+
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("PT_HEAD_AMT")), /*#__PURE__*/React.createElement("div", {
|
|
21239
21416
|
className: "field"
|
|
21240
21417
|
}, /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
21241
21418
|
style: {
|
|
@@ -21251,7 +21428,7 @@ const WSFeeEstimation = ({
|
|
|
21251
21428
|
isRequired: true,
|
|
21252
21429
|
pattern: "^[1-9]+[0-9]*$",
|
|
21253
21430
|
title: t("ERR_DEFAULT_INPUT_FIELD_MSG")
|
|
21254
|
-
})))))
|
|
21431
|
+
}))))))), showToast && /*#__PURE__*/React.createElement(Toast, {
|
|
21255
21432
|
style: {
|
|
21256
21433
|
zIndex: "10000"
|
|
21257
21434
|
},
|
|
@@ -21365,10 +21542,7 @@ const ViewBreakup = ({
|
|
|
21365
21542
|
marginTop: "12px"
|
|
21366
21543
|
}
|
|
21367
21544
|
}, /*#__PURE__*/React.createElement("span", {
|
|
21368
|
-
|
|
21369
|
-
cursor: "pointer",
|
|
21370
|
-
color: "#a82227"
|
|
21371
|
-
}
|
|
21545
|
+
className: "add-details-link hover-button"
|
|
21372
21546
|
}, t("WS_PAYMENT_VIEW_BREAKUP"))) : null, popup && /*#__PURE__*/React.createElement(Modal, {
|
|
21373
21547
|
headerBarMain: /*#__PURE__*/React.createElement(Heading, {
|
|
21374
21548
|
label: t("WS_CALCULATION_BREAKUP")
|
|
@@ -21810,15 +21984,11 @@ function ApplicationDetailsContent({
|
|
|
21810
21984
|
oldValue,
|
|
21811
21985
|
isInfoLabel = false
|
|
21812
21986
|
}) {
|
|
21813
|
-
var _applicationDetails$
|
|
21987
|
+
var _applicationDetails$a, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetails$data9, _workflowDetails$data0, _workflowDetails$data1, _workflowDetails$data10, _workflowDetails$data11, _workflowDetails$data19, _workflowDetails$data20;
|
|
21814
21988
|
const {
|
|
21815
21989
|
t
|
|
21816
21990
|
} = useTranslation();
|
|
21817
|
-
const history = useHistory();
|
|
21818
|
-
const location = useLocation();
|
|
21819
21991
|
const [showPopup, setShowPopup] = useState(false);
|
|
21820
|
-
const [selectedData, setSelectedData] = useState(null);
|
|
21821
|
-
const searchParams = new URLSearchParams(location.search);
|
|
21822
21992
|
let {
|
|
21823
21993
|
id: applicationNo
|
|
21824
21994
|
} = useParams();
|
|
@@ -21854,7 +22024,7 @@ function ApplicationDetailsContent({
|
|
|
21854
22024
|
loaded: false,
|
|
21855
22025
|
canLoad: false
|
|
21856
22026
|
});
|
|
21857
|
-
if ((applicationData === null || applicationData === void 0 ? void 0 : applicationData.status)
|
|
22027
|
+
if ((applicationData === null || applicationData === void 0 ? void 0 : applicationData.status) === "ACTIVE" && !billData.loading && !billData.loaded && !billData.canLoad) {
|
|
21858
22028
|
updateCanFetchBillData({
|
|
21859
22029
|
loading: false,
|
|
21860
22030
|
loaded: false,
|
|
@@ -21870,7 +22040,7 @@ function ApplicationDetailsContent({
|
|
|
21870
22040
|
setBillData((applicationData === null || applicationData === void 0 ? void 0 : applicationData.tenantId) || tenantId, applicationData === null || applicationData === void 0 ? void 0 : applicationData.propertyId, updatefetchBillData, updateCanFetchBillData);
|
|
21871
22041
|
}
|
|
21872
22042
|
const convertEpochToDateDMY = dateEpoch => {
|
|
21873
|
-
if (dateEpoch == null || dateEpoch
|
|
22043
|
+
if (dateEpoch == null || dateEpoch === undefined || dateEpoch === "") {
|
|
21874
22044
|
return "NA";
|
|
21875
22045
|
}
|
|
21876
22046
|
const dateFromApi = new Date(dateEpoch);
|
|
@@ -21954,7 +22124,6 @@ function ApplicationDetailsContent({
|
|
|
21954
22124
|
const checkLocation = window.location.href.includes("employee/tl") || window.location.href.includes("employee/obps") || window.location.href.includes("employee/noc");
|
|
21955
22125
|
const isNocLocation = window.location.href.includes("employee/noc");
|
|
21956
22126
|
const isBPALocation = window.location.href.includes("employee/obps");
|
|
21957
|
-
const isWS = window.location.href.includes("employee/ws");
|
|
21958
22127
|
const getRowStyles = () => {
|
|
21959
22128
|
if (window.location.href.includes("employee/obps") || window.location.href.includes("employee/noc")) {
|
|
21960
22129
|
return {
|
|
@@ -21993,13 +22162,13 @@ function ApplicationDetailsContent({
|
|
|
21993
22162
|
if (window.location.href.includes("employee/obps") || window.location.href.includes("employee/noc") || window.location.href.includes("employee/ws")) {
|
|
21994
22163
|
return {
|
|
21995
22164
|
lineHeight: "19px",
|
|
21996
|
-
maxWidth: "
|
|
22165
|
+
maxWidth: "100%",
|
|
21997
22166
|
minWidth: "280px"
|
|
21998
22167
|
};
|
|
21999
22168
|
} else if (checkLocation) {
|
|
22000
22169
|
return {
|
|
22001
22170
|
lineHeight: "19px",
|
|
22002
|
-
maxWidth: "
|
|
22171
|
+
maxWidth: "100%",
|
|
22003
22172
|
minWidth: "280px"
|
|
22004
22173
|
};
|
|
22005
22174
|
} else {
|
|
@@ -22047,7 +22216,6 @@ function ApplicationDetailsContent({
|
|
|
22047
22216
|
});
|
|
22048
22217
|
};
|
|
22049
22218
|
const handleViewClick = data => {
|
|
22050
|
-
setSelectedData(data);
|
|
22051
22219
|
setShowPopup(true);
|
|
22052
22220
|
};
|
|
22053
22221
|
return /*#__PURE__*/React.createElement(Card, {
|
|
@@ -22062,8 +22230,8 @@ function ApplicationDetailsContent({
|
|
|
22062
22230
|
infoClickLable: "WS_CLICK_ON_LABEL",
|
|
22063
22231
|
infoClickInfoLabel: getClickInfoDetails(),
|
|
22064
22232
|
infoClickInfoLabel1: getClickInfoDetails1()
|
|
22065
|
-
}) : null, applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
22066
|
-
var _detail$title, _detail$values, _detail$additionalDet, _applicationDetails$
|
|
22233
|
+
}) : null, applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a = applicationDetails.applicationDetails) === null || _applicationDetails$a === void 0 ? void 0 : _applicationDetails$a.map((detail, index) => {
|
|
22234
|
+
var _detail$title, _detail$values, _detail$additionalDet, _applicationDetails$a2, _applicationDetails$a3, _applicationDetails$a4, _detail$additionalDet2, _applicationDetails$a5, _applicationDetails$a6, _detail$additionalDet3, _detail$additionalDet4, _detail$additionalDet5, _detail$additionalDet6, _detail$additionalDet7, _detail$additionalDet8, _detail$additionalDet9, _detail$additionalDet0, _detail$additionalDet1, _workflowDetails$data, _workflowDetails$data2, _detail$additionalDet10, _detail$additionalDet11, _detail$additionalDet12, _detail$additionalDet13, _detail$additionalDet14, _detail$additionalDet15, _detail$additionalDet16, _detail$additionalDet17, _detail$additionalDet18, _detail$additionalDet19, _detail$additionalDet20, _detail$additionalDet21, _detail$additionalDet22, _detail$additionalDet23, _detail$additionalDet24, _detail$additionalDet25, _detail$additionalDet26, _detail$additionalDet27, _detail$additionalDet28, _detail$additionalDet29;
|
|
22067
22235
|
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
22068
22236
|
key: index
|
|
22069
22237
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -22156,7 +22324,7 @@ function ApplicationDetailsContent({
|
|
|
22156
22324
|
}
|
|
22157
22325
|
}, /*#__PURE__*/React.createElement("button", null, " ", /*#__PURE__*/React.createElement(EditIcon, null), " ")), /*#__PURE__*/React.createElement("div", {
|
|
22158
22326
|
key: index,
|
|
22159
|
-
onClick: () => handleViewClick(
|
|
22327
|
+
onClick: () => handleViewClick(),
|
|
22160
22328
|
style: {
|
|
22161
22329
|
cursor: "pointer"
|
|
22162
22330
|
}
|
|
@@ -22257,8 +22425,8 @@ function ApplicationDetailsContent({
|
|
|
22257
22425
|
})))), (detail === null || detail === void 0 ? void 0 : detail.belowComponent) && /*#__PURE__*/React.createElement(detail.belowComponent, null), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet = detail.additionalDetails) === null || _detail$additionalDet === void 0 ? void 0 : _detail$additionalDet.inspectionReport) && /*#__PURE__*/React.createElement(ScruntinyDetails, {
|
|
22258
22426
|
scrutinyDetails: detail === null || detail === void 0 ? void 0 : detail.additionalDetails,
|
|
22259
22427
|
paymentsList: paymentsList
|
|
22260
|
-
}), (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
22261
|
-
fiReport: applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
22428
|
+
}), (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a2 = applicationDetails.applicationData) === null || _applicationDetails$a2 === void 0 ? void 0 : (_applicationDetails$a3 = _applicationDetails$a2.additionalDetails) === null || _applicationDetails$a3 === void 0 ? void 0 : (_applicationDetails$a4 = _applicationDetails$a3.fieldinspection_pending) === null || _applicationDetails$a4 === void 0 ? void 0 : _applicationDetails$a4.length) > 0 && (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet2 = detail.additionalDetails) === null || _detail$additionalDet2 === void 0 ? void 0 : _detail$additionalDet2.fiReport) && /*#__PURE__*/React.createElement(InspectionReport, {
|
|
22429
|
+
fiReport: applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a5 = applicationDetails.applicationData) === null || _applicationDetails$a5 === void 0 ? void 0 : (_applicationDetails$a6 = _applicationDetails$a5.additionalDetails) === null || _applicationDetails$a6 === void 0 ? void 0 : _applicationDetails$a6.fieldinspection_pending
|
|
22262
22430
|
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet3 = detail.additionalDetails) === null || _detail$additionalDet3 === void 0 ? void 0 : _detail$additionalDet3.floors) && /*#__PURE__*/React.createElement(PropertyFloors, {
|
|
22263
22431
|
floors: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet4 = detail.additionalDetails) === null || _detail$additionalDet4 === void 0 ? void 0 : _detail$additionalDet4.floors
|
|
22264
22432
|
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet5 = detail.additionalDetails) === null || _detail$additionalDet5 === void 0 ? void 0 : _detail$additionalDet5.owners) && /*#__PURE__*/React.createElement(PropertyOwners, {
|
|
@@ -22300,21 +22468,11 @@ function ApplicationDetailsContent({
|
|
|
22300
22468
|
}), (detail === null || detail === void 0 ? void 0 : detail.isWaterConnectionDetails) && /*#__PURE__*/React.createElement(WSAdditonalDetails, {
|
|
22301
22469
|
wsAdditionalDetails: detail,
|
|
22302
22470
|
oldValue: oldValue
|
|
22303
|
-
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet23 = detail.additionalDetails) === null || _detail$additionalDet23 === void 0 ? void 0 : _detail$additionalDet23.redirectUrl) && /*#__PURE__*/React.createElement(
|
|
22304
|
-
style: {
|
|
22305
|
-
fontSize: "16px",
|
|
22306
|
-
lineHeight: "24px",
|
|
22307
|
-
fontWeight: "400",
|
|
22308
|
-
padding: "10px 0px"
|
|
22309
|
-
}
|
|
22310
|
-
}, /*#__PURE__*/React.createElement(Link, {
|
|
22471
|
+
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet23 = detail.additionalDetails) === null || _detail$additionalDet23 === void 0 ? void 0 : _detail$additionalDet23.redirectUrl) && /*#__PURE__*/React.createElement(Link, {
|
|
22311
22472
|
to: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet24 = detail.additionalDetails) === null || _detail$additionalDet24 === void 0 ? void 0 : (_detail$additionalDet25 = _detail$additionalDet24.redirectUrl) === null || _detail$additionalDet25 === void 0 ? void 0 : _detail$additionalDet25.url
|
|
22312
22473
|
}, /*#__PURE__*/React.createElement("span", {
|
|
22313
|
-
className: "link"
|
|
22314
|
-
|
|
22315
|
-
color: "#a82227"
|
|
22316
|
-
}
|
|
22317
|
-
}, detail === null || detail === void 0 ? void 0 : (_detail$additionalDet26 = detail.additionalDetails) === null || _detail$additionalDet26 === void 0 ? void 0 : (_detail$additionalDet27 = _detail$additionalDet26.redirectUrl) === null || _detail$additionalDet27 === void 0 ? void 0 : _detail$additionalDet27.title))), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet28 = detail.additionalDetails) === null || _detail$additionalDet28 === void 0 ? void 0 : _detail$additionalDet28.estimationDetails) && /*#__PURE__*/React.createElement(WSFeeEstimation, {
|
|
22474
|
+
className: "add-details-link hover-button"
|
|
22475
|
+
}, detail === null || detail === void 0 ? void 0 : (_detail$additionalDet26 = detail.additionalDetails) === null || _detail$additionalDet26 === void 0 ? void 0 : (_detail$additionalDet27 = _detail$additionalDet26.redirectUrl) === null || _detail$additionalDet27 === void 0 ? void 0 : _detail$additionalDet27.title)), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet28 = detail.additionalDetails) === null || _detail$additionalDet28 === void 0 ? void 0 : _detail$additionalDet28.estimationDetails) && /*#__PURE__*/React.createElement(WSFeeEstimation, {
|
|
22318
22476
|
wsAdditionalDetails: detail,
|
|
22319
22477
|
workflowDetails: workflowDetails
|
|
22320
22478
|
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet29 = detail.additionalDetails) === null || _detail$additionalDet29 === void 0 ? void 0 : _detail$additionalDet29.estimationDetails) && /*#__PURE__*/React.createElement(ViewBreakup, {
|