@djb25/digit-ui-module-wt 1.0.25 → 1.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,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, useEffect, Fragment, useRef } from 'react';
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';
@@ -267,9 +267,11 @@ const WTCreate = () => {
267
267
  if (!isNaN(lastchar)) {
268
268
  isMultiple = true;
269
269
  }
270
+ let routeObj = config.find(routeObj => key ? routeObj.key === key : routeObj.route === currentPath);
271
+ if (!routeObj) routeObj = config.find(routeObj => routeObj.route === currentPath);
270
272
  let {
271
273
  nextStep = {}
272
- } = config.find(routeObj => routeObj.route === currentPath);
274
+ } = routeObj || {};
273
275
  let redirectWithHistory = history.push;
274
276
  if (skipStep) {
275
277
  redirectWithHistory = history.replace;
@@ -355,6 +357,20 @@ const WTCreate = () => {
355
357
  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
358
  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
359
  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");
360
+ const formStepRoutes = ["applicant-details", "address-details", "request-details", "toiletRequest-details", "treePruningRequest-details"];
361
+ const isFormStep = formStepRoutes.some(route => pathname.includes(route));
362
+ const sectionRefs = useRef({});
363
+ useEffect(() => {
364
+ if (isFormStep) {
365
+ const currentRoute = pathname.split("/").pop();
366
+ if (sectionRefs.current[currentRoute]) {
367
+ sectionRefs.current[currentRoute].scrollIntoView({
368
+ behavior: "smooth",
369
+ block: "start"
370
+ });
371
+ }
372
+ }
373
+ }, [pathname, isFormStep]);
358
374
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
359
375
  className: "employee-form-section-wrapper"
360
376
  }, !pathname.includes("/info") && /*#__PURE__*/React.createElement(VerticalTimeline, {
@@ -362,32 +378,7 @@ const WTCreate = () => {
362
378
  showFinalStep: true
363
379
  }), /*#__PURE__*/React.createElement("div", {
364
380
  className: "employee-form-section"
365
- }, /*#__PURE__*/React.createElement(Switch, null, config.map((routeObj, index) => {
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, {
381
+ }, /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(Route, {
391
382
  path: `${match.path}/check`
392
383
  }, /*#__PURE__*/React.createElement(CheckPage, {
393
384
  onSubmit: wt_create,
@@ -407,7 +398,68 @@ const WTCreate = () => {
407
398
  }, /*#__PURE__*/React.createElement(TPAcknowledgement, {
408
399
  data: params,
409
400
  onSuccess: onSuccess
410
- })), /*#__PURE__*/React.createElement(Route, null, /*#__PURE__*/React.createElement(Redirect, {
401
+ })), config.map((routeObj, index) => {
402
+ if (!formStepRoutes.includes(routeObj.route)) {
403
+ var _userDetails$user;
404
+ const {
405
+ component,
406
+ texts,
407
+ inputs,
408
+ key,
409
+ additionaFields
410
+ } = routeObj;
411
+ const Component = typeof component === "string" ? Digit.ComponentRegistryService.getComponent(component) : component;
412
+ return /*#__PURE__*/React.createElement(Route, {
413
+ path: `${match.path}/${routeObj.route}`,
414
+ key: index
415
+ }, /*#__PURE__*/React.createElement(Component, {
416
+ config: {
417
+ texts,
418
+ inputs,
419
+ key,
420
+ additionaFields
421
+ },
422
+ onSelect: handleSelect,
423
+ t: t,
424
+ formData: params,
425
+ userDetails: userDetails === null || userDetails === void 0 ? void 0 : (_userDetails$user = userDetails.user) === null || _userDetails$user === void 0 ? void 0 : _userDetails$user[0]
426
+ }));
427
+ }
428
+ return null;
429
+ }), /*#__PURE__*/React.createElement(Route, {
430
+ path: formStepRoutes.map(route => `${match.path}/${route}`)
431
+ }, /*#__PURE__*/React.createElement("div", {
432
+ className: "single-page-form-container"
433
+ }, config.filter(routeObj => formStepRoutes.includes(routeObj.route)).map((routeObj, index) => {
434
+ var _params$serviceType5, _params$serviceType5$, _userDetails$user2;
435
+ const {
436
+ component,
437
+ texts,
438
+ inputs,
439
+ key,
440
+ additionaFields
441
+ } = routeObj;
442
+ const Component = typeof component === "string" ? Digit.ComponentRegistryService.getComponent(component) : component;
443
+ 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;
444
+ if (routeObj.route === "request-details" && code !== "WT") return null;
445
+ if (routeObj.route === "toiletRequest-details" && code !== "MobileToilet") return null;
446
+ if (routeObj.route === "treePruningRequest-details" && code !== "TREE_PRUNING") return null;
447
+ return /*#__PURE__*/React.createElement("div", {
448
+ key: index,
449
+ ref: el => sectionRefs.current[routeObj.route] = el,
450
+ className: "form-section-unit"
451
+ }, /*#__PURE__*/React.createElement(Component, {
452
+ config: {
453
+ ...routeObj,
454
+ isCollapsible: true,
455
+ defaultOpen: true
456
+ },
457
+ onSelect: handleSelect,
458
+ t: t,
459
+ formData: params,
460
+ userDetails: userDetails === null || userDetails === void 0 ? void 0 : (_userDetails$user2 = userDetails.user) === null || _userDetails$user2 === void 0 ? void 0 : _userDetails$user2[0]
461
+ }));
462
+ }))), /*#__PURE__*/React.createElement(Route, null, /*#__PURE__*/React.createElement(Redirect, {
411
463
  to: `${match.path}/${config.indexRoute}`
412
464
  }))))));
413
465
  };
@@ -1931,6 +1983,9 @@ const WTCheckPage = ({
1931
1983
  const {
1932
1984
  t
1933
1985
  } = useTranslation();
1986
+ const {
1987
+ pathname
1988
+ } = useLocation();
1934
1989
  const {
1935
1990
  owner,
1936
1991
  requestDetails,
@@ -1942,6 +1997,7 @@ const WTCheckPage = ({
1942
1997
  const [agree, setAgree] = useState(false);
1943
1998
  const immediateRequired = requestDetails !== null && requestDetails !== void 0 && requestDetails.extraCharge ? "YES" : "NO";
1944
1999
  const [fileUrl, setFileUrl] = useState(null);
2000
+ const baseUrl = pathname.includes("citizen") ? `${APPLICATION_PATH}/citizen/wt/request-service` : `${APPLICATION_PATH}/employee/wt/request-service`;
1945
2001
  const setdeclarationhandler = () => {
1946
2002
  setAgree(!agree);
1947
2003
  };
@@ -1965,7 +2021,7 @@ const WTCheckPage = ({
1965
2021
  label: t("COMMON_APPLICANT_NAME"),
1966
2022
  text: `${t(checkForNA(owner === null || owner === void 0 ? void 0 : owner.applicantName))}`,
1967
2023
  actionButton: /*#__PURE__*/React.createElement(ActionButton, {
1968
- jumpTo: `${APPLICATION_PATH}/citizen/wt/request-service/applicant-details`
2024
+ jumpTo: `${baseUrl}/applicant-details`
1969
2025
  })
1970
2026
  }), /*#__PURE__*/React.createElement(Row, {
1971
2027
  label: t("COMMON_MOBILE_NUMBER"),
@@ -1985,7 +2041,7 @@ const WTCheckPage = ({
1985
2041
  label: t("HOUSE_NO"),
1986
2042
  text: `${t(checkForNA(address === null || address === void 0 ? void 0 : address.houseNo))}`,
1987
2043
  actionButton: /*#__PURE__*/React.createElement(ActionButton, {
1988
- jumpTo: `${APPLICATION_PATH}/citizen/wt/request-service/address-details`
2044
+ jumpTo: `${baseUrl}/address-details`
1989
2045
  })
1990
2046
  }), /*#__PURE__*/React.createElement(Row, {
1991
2047
  label: t("ADDRESS_LINE1"),
@@ -2017,7 +2073,7 @@ const WTCheckPage = ({
2017
2073
  label: t("WT_TANKER_TYPE"),
2018
2074
  text: `${t(checkForNA(requestDetails === null || requestDetails === void 0 ? void 0 : (_requestDetails$tanke = requestDetails.tankerType) === null || _requestDetails$tanke === void 0 ? void 0 : _requestDetails$tanke.value))}`,
2019
2075
  actionButton: /*#__PURE__*/React.createElement(ActionButton, {
2020
- jumpTo: `${APPLICATION_PATH}/citizen/wt/request-service/request-details`
2076
+ jumpTo: `${baseUrl}/request-details`
2021
2077
  })
2022
2078
  }), /*#__PURE__*/React.createElement(Row, {
2023
2079
  label: t("WT_WATER_TYPE"),
@@ -2060,7 +2116,7 @@ const WTCheckPage = ({
2060
2116
  label: t("MT_NUMBER_OF_MOBILE_TOILETS"),
2061
2117
  text: `${t(checkForNA(toiletRequestDetails === null || toiletRequestDetails === void 0 ? void 0 : (_toiletRequestDetails = toiletRequestDetails.mobileToilet) === null || _toiletRequestDetails === void 0 ? void 0 : _toiletRequestDetails.code))}`,
2062
2118
  actionButton: /*#__PURE__*/React.createElement(ActionButton, {
2063
- jumpTo: `${APPLICATION_PATH}/citizen/wt/request-service/toiletRequest-details`
2119
+ jumpTo: `${baseUrl}/toiletRequest-details`
2064
2120
  })
2065
2121
  }), /*#__PURE__*/React.createElement(Row, {
2066
2122
  label: t("MT_DELIVERY_FROM_DATE"),
@@ -2086,7 +2142,7 @@ const WTCheckPage = ({
2086
2142
  label: t("REASON_FOR_PRUNING"),
2087
2143
  text: `${t(checkForNA(treePruningRequestDetails === null || treePruningRequestDetails === void 0 ? void 0 : (_treePruningRequestDe = treePruningRequestDetails.reasonOfPruning) === null || _treePruningRequestDe === void 0 ? void 0 : _treePruningRequestDe.code))}`,
2088
2144
  actionButton: /*#__PURE__*/React.createElement(ActionButton, {
2089
- jumpTo: `${APPLICATION_PATH}/citizen/wt/request-service/treePruningRequest-details`
2145
+ jumpTo: `${baseUrl}/treePruningRequest-details`
2090
2146
  })
2091
2147
  }), /*#__PURE__*/React.createElement(Row, {
2092
2148
  label: t("LOCATION_GEOTAG"),
@@ -2347,12 +2403,12 @@ const WTCard = () => {
2347
2403
  const links = [{
2348
2404
  count: citizenInboxCount,
2349
2405
  label: t("ES_COMMON_INBOX"),
2350
- subLabel: "citizen",
2406
+ subLabel: t("CITIZEN"),
2351
2407
  link: `${APPLICATION_PATH}/employee/wt/inbox`
2352
2408
  }, {
2353
2409
  count: fixedPointInboxCount,
2354
2410
  label: t("ES_COMMON_INBOX"),
2355
- subLabel: "Fixed Point",
2411
+ subLabel: t("FIXED_POINT"),
2356
2412
  link: `${APPLICATION_PATH}/employee/wt/fixed-point/inbox`
2357
2413
  }, {
2358
2414
  label: t("ES_COMMON_APPLICATION_SEARCH"),
@@ -3361,13 +3417,24 @@ const AddTripModal = ({
3361
3417
  departureFixedPoint: initialValues.departureFixedPoint || currentTime,
3362
3418
  returnFpl: initialValues.returnFpl || currentTime,
3363
3419
  frequencyNo: initialValues.frequencyNo,
3364
- vehicleId: initialValues.vehicleId
3420
+ vehicleId: initialValues.vehicleId,
3421
+ fixedPointCode: initialValues.fixedPointCode,
3422
+ day: initialValues.day || [],
3423
+ volume: initialValues.volume || "",
3424
+ active: initialValues.active || null,
3425
+ remarks: initialValues.remarks || ""
3365
3426
  } : {
3427
+ fixedPointCode: "",
3428
+ day: [],
3366
3429
  arrivalTimeFpl: currentTime,
3367
3430
  departureTimeFpl: currentTime,
3368
3431
  arrivalFixedPoint: currentTime,
3369
3432
  departureFixedPoint: currentTime,
3370
- returnFpl: currentTime
3433
+ returnFpl: currentTime,
3434
+ volume: "",
3435
+ active: null,
3436
+ remarks: "",
3437
+ frequencyNo: 1
3371
3438
  };
3372
3439
  const {
3373
3440
  register,
@@ -3393,13 +3460,13 @@ const AddTripModal = ({
3393
3460
  });
3394
3461
  const fixedPoints = (fixedPointsData === null || fixedPointsData === void 0 ? void 0 : fixedPointsData.waterTankerBookingDetail) || [];
3395
3462
  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;
3463
+ var _fp$applicantDetail, _fp$applicantDetail2, _fp$address, _fp$applicantDetail3, _fp$applicantDetail4, _fp$address2, _fp$applicantDetail5, _fp$address3, _fp$address4, _fp$address5, _fp$address6;
3397
3464
  return {
3398
3465
  name: (fp === null || fp === void 0 ? void 0 : (_fp$applicantDetail = fp.applicantDetail) === null || _fp$applicantDetail === void 0 ? void 0 : _fp$applicantDetail.name) || "NA",
3399
3466
  mobileNumber: (fp === null || fp === void 0 ? void 0 : (_fp$applicantDetail2 = fp.applicantDetail) === null || _fp$applicantDetail2 === void 0 ? void 0 : _fp$applicantDetail2.mobileNumber) || "NA",
3400
3467
  locality: (fp === null || fp === void 0 ? void 0 : (_fp$address = fp.address) === null || _fp$address === void 0 ? void 0 : _fp$address.locality) || "NA",
3401
3468
  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,
3469
+ 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
3470
  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
3471
  };
3405
3472
  });
@@ -3435,9 +3502,8 @@ const AddTripModal = ({
3435
3502
  value: "No"
3436
3503
  }];
3437
3504
  const formData = watch();
3438
- const isFormDisabled = !(formData !== null && formData !== void 0 && formData.fixedPointCode) || !(formData !== null && formData !== 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 && formData.arrivalTimeFpl) || !(formData !== null && formData !== void 0 && formData.departureTimeFpl) || !(formData !== null && formData !== void 0 && formData.arrivalFixedPoint) || !(formData !== null && formData !== void 0 && formData.departureFixedPoint) || !(formData !== null && formData !== void 0 && formData.returnFpl) || !(formData !== null && formData !== void 0 && formData.volume) || !(formData !== null && formData !== void 0 && formData.active);
3505
+ 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
3506
  const onFormSubmit = data => {
3440
- if (isFormDisabled) return;
3441
3507
  onSubmit({
3442
3508
  ...initialValues,
3443
3509
  ...data
@@ -3558,6 +3624,7 @@ const AddTripModal = ({
3558
3624
  }, t("WT_FIXED_POINT_CODE")), isFixedPointLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement(Controller, {
3559
3625
  control: control,
3560
3626
  name: "fixedPointCode",
3627
+ defaultValue: defaultValues.fixedPointCode,
3561
3628
  render: props => /*#__PURE__*/React.createElement(CustomNameDropdown, {
3562
3629
  option: fixedPointOptions,
3563
3630
  optionKey: "displayLabel",
@@ -3616,7 +3683,7 @@ const AddTripModal = ({
3616
3683
  render: props => /*#__PURE__*/React.createElement(TextInput, {
3617
3684
  type: "time",
3618
3685
  value: props.value,
3619
- onChange: props.onChange,
3686
+ onChange: e => props.onChange(e.target.value),
3620
3687
  onBlur: props.onBlur
3621
3688
  })
3622
3689
  })), /*#__PURE__*/React.createElement("div", {
@@ -3633,7 +3700,7 @@ const AddTripModal = ({
3633
3700
  render: props => /*#__PURE__*/React.createElement(TextInput, {
3634
3701
  type: "time",
3635
3702
  value: props.value,
3636
- onChange: props.onChange,
3703
+ onChange: e => props.onChange(e.target.value),
3637
3704
  onBlur: props.onBlur
3638
3705
  })
3639
3706
  })), /*#__PURE__*/React.createElement("div", {
@@ -3650,7 +3717,7 @@ const AddTripModal = ({
3650
3717
  render: props => /*#__PURE__*/React.createElement(TextInput, {
3651
3718
  type: "time",
3652
3719
  value: props.value,
3653
- onChange: props.onChange,
3720
+ onChange: e => props.onChange(e.target.value),
3654
3721
  onBlur: props.onBlur
3655
3722
  })
3656
3723
  })), /*#__PURE__*/React.createElement("div", {
@@ -3667,7 +3734,7 @@ const AddTripModal = ({
3667
3734
  render: props => /*#__PURE__*/React.createElement(TextInput, {
3668
3735
  type: "time",
3669
3736
  value: props.value,
3670
- onChange: props.onChange,
3737
+ onChange: e => props.onChange(e.target.value),
3671
3738
  onBlur: props.onBlur
3672
3739
  })
3673
3740
  })), /*#__PURE__*/React.createElement("div", {
@@ -3684,7 +3751,7 @@ const AddTripModal = ({
3684
3751
  render: props => /*#__PURE__*/React.createElement(TextInput, {
3685
3752
  type: "time",
3686
3753
  value: props.value,
3687
- onChange: props.onChange,
3754
+ onChange: e => props.onChange(e.target.value),
3688
3755
  onBlur: props.onBlur
3689
3756
  })
3690
3757
  })), /*#__PURE__*/React.createElement("div", {
@@ -3700,7 +3767,7 @@ const AddTripModal = ({
3700
3767
  defaultValue: defaultValues.volume,
3701
3768
  render: props => /*#__PURE__*/React.createElement(TextInput, {
3702
3769
  value: props.value,
3703
- onChange: props.onChange,
3770
+ onChange: e => props.onChange(e.target.value),
3704
3771
  onBlur: props.onBlur
3705
3772
  })
3706
3773
  })), /*#__PURE__*/React.createElement("div", {
@@ -3736,7 +3803,7 @@ const AddTripModal = ({
3736
3803
  defaultValue: defaultValues.remarks,
3737
3804
  render: props => /*#__PURE__*/React.createElement(TextInput, {
3738
3805
  value: props.value,
3739
- onChange: props.onChange,
3806
+ onChange: e => props.onChange(e.target.value),
3740
3807
  onBlur: props.onBlur
3741
3808
  })
3742
3809
  })))), /*#__PURE__*/React.createElement("div", {
@@ -3760,16 +3827,16 @@ const AddTripModal = ({
3760
3827
  }
3761
3828
  }, t("CS_COMMON_CANCEL")), /*#__PURE__*/React.createElement("button", {
3762
3829
  className: "button-save",
3763
- disabled: isFormDisabled,
3830
+ disabled: !isFormValid,
3764
3831
  onClick: handleSubmit(onFormSubmit),
3765
3832
  style: {
3766
3833
  padding: "8px 20px",
3767
- background: isFormDisabled ? "#ccc" : "#1D4E7F",
3834
+ background: !isFormValid ? "#ccc" : "#1D4E7F",
3768
3835
  color: "#fff",
3769
3836
  border: "none",
3770
3837
  borderRadius: "4px",
3771
- cursor: isFormDisabled ? "not-allowed" : "pointer",
3772
- opacity: isFormDisabled ? 0.7 : 1
3838
+ cursor: !isFormValid ? "not-allowed" : "pointer",
3839
+ opacity: !isFormValid ? 0.7 : 1
3773
3840
  }
3774
3841
  }, initialValues ? t("WT_UPDATE") : t("CS_COMMON_SAVE")))));
3775
3842
  };
@@ -3832,10 +3899,10 @@ const FixedPointScheduleManagement = ({
3832
3899
  const fromScheduleApi = (allSchedulesData === null || allSchedulesData === void 0 ? void 0 : allSchedulesData.fixedPointTimeTableDetails) || [];
3833
3900
  const combinedData = [...fromFpApi, ...fromScheduleApi];
3834
3901
  const points = combinedData.map(fp => {
3835
- var _fp$applicantDetail;
3902
+ var _fp$applicantDetail, _fp$applicantDetail2, _fp$applicantDetail3;
3836
3903
  return {
3837
- label: fp.fixedPointCode || fp.name || ((_fp$applicantDetail = fp.applicantDetail) === null || _fp$applicantDetail === void 0 ? void 0 : _fp$applicantDetail.name) || fp.bookingId,
3838
- value: fp.fixedPointCode || fp.bookingId
3904
+ 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,
3905
+ value: fp.fixedPointCode || ((_fp$applicantDetail3 = fp.applicantDetail) === null || _fp$applicantDetail3 === void 0 ? void 0 : _fp$applicantDetail3.fixedPointId) || fp.bookingId
3839
3906
  };
3840
3907
  }).filter(p => p.label && p.value);
3841
3908
  const uniquePoints = points.filter((v, i, a) => a.findIndex(t => t.value === v.value) === i);
@@ -3844,6 +3911,8 @@ const FixedPointScheduleManagement = ({
3844
3911
  value: "all"
3845
3912
  }, ...uniquePoints];
3846
3913
  }, [fixedPointData, allSchedulesData, t]);
3914
+ console.log(fixedPoints, "fixedPoints");
3915
+ console.log(fixedPointData, "fixedPointData");
3847
3916
  const {
3848
3917
  mutate: createSchedule
3849
3918
  } = Digit.Hooks.wt.useCreateFixedPointSchedule(tenantId);
@@ -3882,7 +3951,7 @@ const FixedPointScheduleManagement = ({
3882
3951
  const mapScheduleRows = React.useCallback((rows = []) => rows.map(item => ({
3883
3952
  scheduleId: item.systemAssignedScheduleId,
3884
3953
  fixedPointName: item.fixedPointName,
3885
- fixedPoint: item.fixedPointId,
3954
+ fixedPoint: item.fixedPointCode || item.fixedPointId,
3886
3955
  day: item.day,
3887
3956
  freq: item.tripNo,
3888
3957
  arrToFpl: item.arrivalTimeToFpl,
@@ -4322,13 +4391,13 @@ const FixedPointScheduleManagement = ({
4322
4391
  var _d$toUpperCase;
4323
4392
  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
4393
  }),
4325
- trip_no: Number(formData.frequencyNo),
4394
+ trip_no: Number(formData.frequencyNo) || Number(formData.tripNo) || 1,
4326
4395
  arrival_time_to_fpl: formData.arrivalTimeFpl,
4327
4396
  departure_time_from_fpl: formData.departureTimeFpl,
4328
4397
  arrival_time_delivery_point: formData.arrivalFixedPoint,
4329
4398
  departure_time_delivery_point: formData.departureFixedPoint,
4330
4399
  time_of_arriving_back_fpl_after_delivery: formData.returnFpl,
4331
- volume_water_tobe_delivery: formData.volume,
4400
+ volume_water_tobe_delivery: formData.volume || "0",
4332
4401
  active: ((_formData$active = formData.active) === null || _formData$active === void 0 ? void 0 : _formData$active.value) === "Yes" || formData.active === "Yes",
4333
4402
  is_enable: ((_formData$active2 = formData.active) === null || _formData$active2 === void 0 ? void 0 : _formData$active2.value) === "Yes" || formData.active === "Yes",
4334
4403
  remarks: formData.remarks,
@@ -4683,7 +4752,7 @@ const RouteLayer = ({
4683
4752
  }, /*#__PURE__*/React.createElement("h4", {
4684
4753
  style: {
4685
4754
  margin: 0,
4686
- color: "#667eea"
4755
+ color: "#1F5FA8"
4687
4756
  }
4688
4757
  }, t("ROUTE_INFORMATION")), /*#__PURE__*/React.createElement("button", {
4689
4758
  onClick: () => setShowSteps(false),
@@ -4738,7 +4807,7 @@ const RouteLayer = ({
4738
4807
  width: "20px",
4739
4808
  height: "20px",
4740
4809
  borderRadius: "50%",
4741
- background: "#667eea",
4810
+ background: "#1F5FA8",
4742
4811
  color: "white",
4743
4812
  display: "flex",
4744
4813
  alignItems: "center",
@@ -4776,12 +4845,12 @@ const RouteMarkers = ({
4776
4845
  className: "distance-marker",
4777
4846
  html: `<div style="
4778
4847
  background: white;
4779
- border: 2px solid #667eea;
4848
+ border: 2px solid #1F5FA8;
4780
4849
  border-radius: 12px;
4781
4850
  padding: 2px 6px;
4782
4851
  font-size: 10px;
4783
4852
  font-weight: bold;
4784
- color: #667eea;
4853
+ color: #1F5FA8;
4785
4854
  white-space: nowrap;
4786
4855
  ">${(i / 1000).toFixed(0)} km</div>`,
4787
4856
  iconSize: [40, 20],
@@ -4896,7 +4965,7 @@ const DriverCard = ({
4896
4965
  padding: "16px",
4897
4966
  borderRadius: "12px",
4898
4967
  background: isSelected ? "#f0f4ff" : "white",
4899
- border: `2px solid ${isSelected ? "#667eea" : "#f0f0f0"}`,
4968
+ border: `2px solid ${isSelected ? "#1F5FA8" : "#f0f0f0"}`,
4900
4969
  cursor: "pointer",
4901
4970
  position: "relative",
4902
4971
  transition: "all 0.2s ease"
@@ -5187,7 +5256,7 @@ function LiveTrackingSystem() {
5187
5256
  padding: "16px 24px",
5188
5257
  borderRadius: "12px",
5189
5258
  boxShadow: "0 2px 8px rgba(0,0,0,0.05)",
5190
- border: "2px solid #667eea44"
5259
+ border: "2px solid #1F5FA844"
5191
5260
  }
5192
5261
  }, /*#__PURE__*/React.createElement("div", {
5193
5262
  style: {
@@ -5293,7 +5362,7 @@ function LiveTrackingSystem() {
5293
5362
  top: "80px",
5294
5363
  left: "20px",
5295
5364
  zIndex: 2000,
5296
- background: "#667eea",
5365
+ background: "#1F5FA8",
5297
5366
  color: "white",
5298
5367
  border: "none",
5299
5368
  borderRadius: "8px",
@@ -5356,7 +5425,7 @@ function LiveTrackingSystem() {
5356
5425
  style: {
5357
5426
  background: "none",
5358
5427
  border: "none",
5359
- color: "#667eea",
5428
+ color: "#1F5FA8",
5360
5429
  fontSize: "12px",
5361
5430
  fontWeight: "700",
5362
5431
  cursor: "pointer"
@@ -5471,7 +5540,7 @@ function LiveTrackingSystem() {
5471
5540
  style: {
5472
5541
  padding: "4px 12px",
5473
5542
  borderRadius: "4px",
5474
- background: filterOnline === filter ? "#667eea" : "transparent",
5543
+ background: filterOnline === filter ? "#1F5FA8" : "transparent",
5475
5544
  color: filterOnline === filter ? "white" : "#666",
5476
5545
  border: filterOnline === filter ? "none" : "1px solid #e0e0e0",
5477
5546
  cursor: "pointer",
@@ -5572,7 +5641,7 @@ function LiveTrackingSystem() {
5572
5641
  style: {
5573
5642
  fontWeight: "bold",
5574
5643
  fontSize: isMobile ? "14px" : "16px",
5575
- color: "#667eea",
5644
+ color: "#1F5FA8",
5576
5645
  marginBottom: "8px",
5577
5646
  borderBottom: "1px solid #eee",
5578
5647
  paddingBottom: "4px"
@@ -5656,7 +5725,7 @@ function LiveTrackingSystem() {
5656
5725
  },
5657
5726
  style: {
5658
5727
  padding: isMobile ? "10px 12px" : "8px 16px",
5659
- background: "#667eea",
5728
+ background: "#1F5FA8",
5660
5729
  color: "white",
5661
5730
  border: "none",
5662
5731
  borderRadius: "4px",
@@ -5710,7 +5779,7 @@ function LiveTrackingSystem() {
5710
5779
  }, /*#__PURE__*/React.createElement("h4", {
5711
5780
  style: {
5712
5781
  margin: 0,
5713
- color: "#667eea",
5782
+ color: "#1F5FA8",
5714
5783
  fontSize: isMobile ? "14px" : "16px"
5715
5784
  }
5716
5785
  }, t("WT_SELECTED_DRIVER")), /*#__PURE__*/React.createElement(StatusBadge, {
@@ -5873,15 +5942,12 @@ const AddFillingPointMetaData = ({
5873
5942
  [name]: newValue
5874
5943
  });
5875
5944
  };
5876
- const isMobile = window.Digit.Utils.browser.isMobile();
5877
- return /*#__PURE__*/React.createElement(Card, {
5945
+ return /*#__PURE__*/React.createElement(CollapsibleCardPage$1, {
5946
+ title: t("WT_FILLING_POINT_APPLICANT_DETAILS"),
5947
+ defaultOpen: true
5948
+ }, /*#__PURE__*/React.createElement("div", {
5878
5949
  className: "formcomposer-section-grid"
5879
- }, /*#__PURE__*/React.createElement(CardSubHeader, {
5880
- style: {
5881
- gridColumn: "span 2",
5882
- marginBottom: isMobile ? "0px" : "10px"
5883
- }
5884
- }, t("WT_FILLING_POINT_APPLICANT_DETAILS")), filteredInputs.map(input => {
5950
+ }, filteredInputs.map(input => {
5885
5951
  var _formData$sectionKey, _input$validation;
5886
5952
  return /*#__PURE__*/React.createElement("div", {
5887
5953
  key: input.name
@@ -5896,7 +5962,7 @@ const AddFillingPointMetaData = ({
5896
5962
  onChange: e => handleChange(e.target.value, input.name),
5897
5963
  maxLength: (_input$validation = input.validation) === null || _input$validation === void 0 ? void 0 : _input$validation.maxLength
5898
5964
  }, input.validation)))));
5899
- }));
5965
+ })));
5900
5966
  };
5901
5967
 
5902
5968
  const allOptions = [{
@@ -5920,14 +5986,12 @@ const AddFixFillAddress = ({
5920
5986
  isEdit,
5921
5987
  userDetails
5922
5988
  }) => {
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;
5989
+ 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
5990
  const {
5925
5991
  data: allCities
5926
5992
  } = Digit.Hooks.useTenants();
5927
- const {
5928
- control
5929
- } = useForm();
5930
5993
  const location = useLocation();
5994
+ const tenantId = Digit.ULBService.getCurrentTenantId();
5931
5995
  const usedAddressTypes = ((_location$state = location.state) === null || _location$state === void 0 ? void 0 : _location$state.usedAddressTypes) || [];
5932
5996
  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
5997
  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 +6002,10 @@ const AddFixFillAddress = ({
5938
6002
  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
6003
  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
6004
  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 [latitude, setLatitude] = useState((formData === null || formData === void 0 ? void 0 : (_formData$address0 = formData.address) === null || _formData$address0 === void 0 ? void 0 : _formData$address0.latitude) || "");
5942
- const [longitude, setLongitude] = useState((formData === null || formData === void 0 ? void 0 : (_formData$address1 = formData.address) === null || _formData$address1 === void 0 ? void 0 : _formData$address1.longitude) || "");
6005
+ 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) || "");
6006
+ 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) || "");
6007
+ 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) || "");
6008
+ 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
6009
  const [selectedAddress, setSelectedAddress] = useState("");
5944
6010
  const isInitialized = useRef(!isEdit);
5945
6011
  const lastSyncedAddress = useRef(null);
@@ -5951,68 +6017,148 @@ const AddFixFillAddress = ({
5951
6017
  return allOptions.filter(opt => !usedAddressTypes.includes(opt.code));
5952
6018
  }, [usedAddressTypes]);
5953
6019
  const {
5954
- data: fetchedLocalities
5955
- } = Digit.Hooks.useBoundaryLocalities(city === null || city === void 0 ? void 0 : city.code, "revenue", {
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
- }))) || [];
6020
+ data: egovLocationData
6021
+ } = Digit.Hooks.useCommonMDMS(tenantId, "egov-location", ["TenantBoundary"]);
5963
6022
  useEffect(() => {
5964
- var _formData$address10;
5965
- 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$address10 = formData.address) === null || _formData$address10 === void 0 ? void 0 : _formData$address10.id);
6023
+ if (!city && allCities && allCities.length > 0) {
6024
+ const defaultCity = allCities.find(c => c.code === tenantId) || allCities[0];
6025
+ setCity(defaultCity);
6026
+ }
6027
+ }, [allCities, city, tenantId]);
6028
+ const boundaryData = useMemo(() => {
6029
+ var _egovLocationData$ego;
6030
+ const tenantBoundary = (egovLocationData === null || egovLocationData === void 0 ? void 0 : (_egovLocationData$ego = egovLocationData["egov-location"]) === null || _egovLocationData$ego === void 0 ? void 0 : _egovLocationData$ego.TenantBoundary) || [];
6031
+ const revenueData = tenantBoundary.find(item => {
6032
+ var _item$hierarchyType;
6033
+ return (item === null || item === void 0 ? void 0 : (_item$hierarchyType = item.hierarchyType) === null || _item$hierarchyType === void 0 ? void 0 : _item$hierarchyType.code) === "REVENUE";
6034
+ });
6035
+ const boundary = (revenueData === null || revenueData === void 0 ? void 0 : revenueData.boundary) || [];
6036
+ return Array.isArray(boundary) ? boundary : [boundary];
6037
+ }, [egovLocationData]);
6038
+ const structuredLocality = useMemo(() => {
6039
+ let localities = [];
6040
+ const boundaries = Array.isArray(boundaryData) ? boundaryData : boundaryData ? [boundaryData] : [];
6041
+ const extractLocalities = (node, zone = null, ward = null) => {
6042
+ if (!node) return;
6043
+ let currentZone = zone;
6044
+ let currentWard = ward;
6045
+ if (node.label === "Zone" || node.label === "ZONE") {
6046
+ currentZone = node.localname || node.code || node.name;
6047
+ }
6048
+ if (node.label === "Ward" || node.label === "WARD" || node.label === "Block" || node.label === "BLOCK") {
6049
+ currentWard = node.code || node.localname || node.name;
6050
+ }
6051
+ if (node.label === "Locality" || node.label === "LOCALITY") {
6052
+ localities.push({
6053
+ ...node,
6054
+ name: node.localname || node.name || node.code,
6055
+ i18nkey: node.i18nkey || `${tenantId.replace(".", "_")}_REVENUE_${node.code}`.toUpperCase(),
6056
+ zone: currentZone,
6057
+ ward: currentWard
6058
+ });
6059
+ }
6060
+ if (node.children && node.children.length > 0) {
6061
+ node.children.forEach(child => extractLocalities(child, currentZone, currentWard));
6062
+ }
6063
+ };
6064
+ boundaries.forEach(rootNode => extractLocalities(rootNode));
6065
+ return localities;
6066
+ }, [boundaryData, tenantId]);
6067
+ const fetchedPincodes = useMemo(() => {
6068
+ const pinSet = new Set();
6069
+ structuredLocality.forEach(loc => {
6070
+ if (loc.pincode) {
6071
+ const pins = Array.isArray(loc.pincode) ? loc.pincode : [loc.pincode];
6072
+ pins.forEach(p => {
6073
+ if (p) {
6074
+ const sanitizedPin = p.toString().split(".")[0];
6075
+ pinSet.add(sanitizedPin);
6076
+ }
6077
+ });
6078
+ }
6079
+ });
6080
+ if (pinSet.size === 0 && city !== null && city !== void 0 && city.pincode) {
6081
+ const pins = Array.isArray(city.pincode) ? city.pincode : [city.pincode];
6082
+ pins.forEach(p => {
6083
+ if (p) {
6084
+ const sanitizedPin = p.toString().split(".")[0];
6085
+ pinSet.add(sanitizedPin);
6086
+ }
6087
+ });
6088
+ }
6089
+ return Array.from(pinSet).sort().map(pin => ({
6090
+ code: pin,
6091
+ name: pin,
6092
+ i18nKey: pin
6093
+ }));
6094
+ }, [structuredLocality, city]);
6095
+ const filteredLocalities = useMemo(() => {
6096
+ if (!pincode) return structuredLocality;
6097
+ return structuredLocality.filter(loc => {
6098
+ if (!loc.pincode) return false;
6099
+ const pins = Array.isArray(loc.pincode) ? loc.pincode : [loc.pincode];
6100
+ return pins.some(p => p.toString() === pincode);
6101
+ });
6102
+ }, [structuredLocality, pincode]);
6103
+ useEffect(() => {
6104
+ var _formData$address12;
6105
+ 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
6106
  if (currentId && lastBookingId.current !== currentId) {
5967
6107
  isInitialized.current = false;
5968
6108
  lastBookingId.current = currentId;
5969
6109
  }
5970
6110
  if (formData !== null && formData !== void 0 && formData.address && !isInitialized.current && allCities) {
6111
+ var _addressData$pincode;
5971
6112
  const addressData = formData.address;
5972
6113
  const cityObj = allCities.find(c => c.code === addressData.cityCode || c.code === addressData.city || c.name === addressData.city) || addressData.city;
5973
6114
  if (cityObj && (!city || city.code !== cityObj.code && city !== cityObj)) {
5974
6115
  setCity(cityObj || null);
5975
6116
  }
5976
- setPincode(addressData.pincode || "");
6117
+ setPincode(((_addressData$pincode = addressData.pincode) === null || _addressData$pincode === void 0 ? void 0 : _addressData$pincode.toString().split(".")[0]) || "");
5977
6118
  setHouseNo(addressData.houseNo || "");
5978
6119
  setStreetName(addressData.streetName || "");
5979
6120
  setLandmark(addressData.landmark || "");
5980
6121
  setAddressLine1(addressData.addressLine1 || "");
5981
6122
  setAddressLine2(addressData.addressLine2 || "");
5982
6123
  setAddressType(allOptions.find(a => a.code === addressData.addressType) || addressData.addressType || null);
6124
+ setZone(addressData.zone || "");
6125
+ setBlock(addressData.block || "");
5983
6126
  setLatitude(addressData.latitude || "");
5984
6127
  setLongitude(addressData.longitude || "");
5985
- if (fetchedLocalities || !addressData.cityCode) {
5986
- if (fetchedLocalities) {
5987
- const localityObj = fetchedLocalities.find(l => l.code === addressData.localityCode || l.code === addressData.locality || l.i18nkey === addressData.locality);
6128
+ if (boundaryData || !addressData.cityCode) {
6129
+ if (Array.isArray(boundaryData)) {
6130
+ const localityObj = boundaryData.find(l => l.code === addressData.localityCode || l.code === addressData.locality || l.i18nkey === addressData.locality);
5988
6131
  setLocality(localityObj || addressData.locality || null);
6132
+ } else if (boundaryData && typeof boundaryData === "object") {
6133
+ const match = boundaryData.code === addressData.localityCode || boundaryData.code === addressData.locality || boundaryData.i18nkey === addressData.locality;
6134
+ setLocality(match ? boundaryData : addressData.locality || null);
5989
6135
  } else {
5990
6136
  setLocality(addressData.locality || null);
5991
6137
  }
5992
6138
  isInitialized.current = true;
5993
6139
  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
6140
  }
5997
6141
  }
5998
- }, [formData === null || formData === void 0 ? void 0 : formData.address, city, allCities, fetchedLocalities]);
6142
+ }, [formData === null || formData === void 0 ? void 0 : formData.address, city, allCities, boundaryData]);
5999
6143
  useEffect(() => {
6000
6144
  if (!navigator.geolocation) return;
6001
6145
  navigator.geolocation.getCurrentPosition(pos => {
6002
6146
  setLatitude(pos.coords.latitude);
6003
6147
  setLongitude(pos.coords.longitude);
6004
- }, () => console.log("Location blocked"));
6148
+ }, () => {});
6005
6149
  }, []);
6006
6150
  useEffect(() => {
6007
6151
  if (selectedAddress && Object.keys(selectedAddress).length) {
6008
6152
  setPincode(selectedAddress.pinCode);
6009
6153
  setCity(allCities === null || allCities === void 0 ? void 0 : allCities.find(c => c.name === selectedAddress.city));
6010
- setLocality(fetchedLocalities === null || fetchedLocalities === void 0 ? void 0 : fetchedLocalities.find(l => l.i18nkey === selectedAddress.locality));
6154
+ setLocality(Array.isArray(boundaryData) ? boundaryData.find(l => l.i18nkey === selectedAddress.locality) : null);
6011
6155
  setHouseNo(selectedAddress.houseNumber);
6012
6156
  setStreetName(selectedAddress.streetName);
6013
6157
  setLandmark(selectedAddress.landmark);
6014
6158
  setAddressLine1(selectedAddress.address);
6015
6159
  setAddressLine2(selectedAddress.address2);
6160
+ setZone(selectedAddress.zone);
6161
+ setBlock(selectedAddress.block);
6016
6162
  setLatitude(selectedAddress.latitude);
6017
6163
  setLongitude(selectedAddress.longitude);
6018
6164
  setAddressType(allOptions.find(a => a.code === selectedAddress.addressType));
@@ -6030,6 +6176,8 @@ const AddFixFillAddress = ({
6030
6176
  addressLine2: addressLine2 || "",
6031
6177
  streetName: streetName || "",
6032
6178
  addressType: (addressType === null || addressType === void 0 ? void 0 : addressType.code) || addressType || null,
6179
+ zone: zone || "",
6180
+ block: block || "",
6033
6181
  latitude: latitude || "",
6034
6182
  longitude: longitude || ""
6035
6183
  };
@@ -6038,23 +6186,16 @@ const AddFixFillAddress = ({
6038
6186
  lastSyncedAddress.current = addressString;
6039
6187
  onSelect((config === null || config === void 0 ? void 0 : config.key) || "address", currentAddress);
6040
6188
  }
6041
- }, [pincode, city, locality, houseNo, landmark, addressLine1, addressLine2, streetName, addressType, latitude, longitude]);
6042
- const isMobile = window.Digit.Utils.browser.isMobile();
6043
- return /*#__PURE__*/React.createElement(Card, {
6189
+ }, [pincode, city, locality, houseNo, landmark, addressLine1, addressLine2, streetName, addressType, zone, block, latitude, longitude]);
6190
+ return /*#__PURE__*/React.createElement(CollapsibleCardPage$1, {
6191
+ title: t("WT_ADDRESS_DETAILS"),
6192
+ defaultOpen: true
6193
+ }, /*#__PURE__*/React.createElement("div", {
6044
6194
  className: "formcomposer-section-grid"
6045
- }, /*#__PURE__*/React.createElement(CardSubHeader, {
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, {
6195
+ }, (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
6196
  selected: selectedAddress,
6056
6197
  select: setSelectedAddress,
6057
- option: userDetails.addresses,
6198
+ option: userDetails.addresses || [],
6058
6199
  optionKey: "address",
6059
6200
  t: t,
6060
6201
  style: {
@@ -6063,76 +6204,149 @@ const AddFixFillAddress = ({
6063
6204
  })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("COMMON_ADDRESS_TYPE")), /*#__PURE__*/React.createElement(Dropdown, {
6064
6205
  selected: addressType,
6065
6206
  select: setAddressType,
6066
- option: availableAddressTypeOptions,
6207
+ option: availableAddressTypeOptions || [],
6067
6208
  optionKey: "i18nKey",
6068
6209
  t: t,
6069
6210
  style: {
6070
6211
  width: "100%"
6071
6212
  }
6213
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("CITY"), " ", /*#__PURE__*/React.createElement("span", {
6214
+ className: "astericColor"
6215
+ }, "*")), /*#__PURE__*/React.createElement(Dropdown, {
6216
+ selected: city,
6217
+ select: setCity,
6218
+ option: allCities || [],
6219
+ optionKey: "i18nKey",
6220
+ t: t,
6221
+ disable: true
6222
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("PINCODE"), " ", /*#__PURE__*/React.createElement("span", {
6223
+ className: "astericColor"
6224
+ }, "*")), /*#__PURE__*/React.createElement(Dropdown, {
6225
+ selected: (fetchedPincodes === null || fetchedPincodes === void 0 ? void 0 : fetchedPincodes.find(p => p.code === pincode)) || (pincode ? {
6226
+ code: pincode,
6227
+ name: pincode,
6228
+ i18nKey: pincode
6229
+ } : null),
6230
+ select: val => {
6231
+ const newPin = val === null || val === void 0 ? void 0 : val.code;
6232
+ if (newPin !== pincode) {
6233
+ setLocality(null);
6234
+ setZone("");
6235
+ setBlock("");
6236
+ setLatitude("");
6237
+ setLongitude("");
6238
+ setAddressLine1("");
6239
+ setAddressLine2("");
6240
+ }
6241
+ setPincode(newPin);
6242
+ },
6243
+ option: fetchedPincodes || [],
6244
+ optionKey: "i18nKey",
6245
+ t: t,
6246
+ style: {
6247
+ width: "100%"
6248
+ }
6249
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("LOCALITY"), " ", /*#__PURE__*/React.createElement("span", {
6250
+ className: "astericColor"
6251
+ }, "*")), /*#__PURE__*/React.createElement(Dropdown, {
6252
+ selected: locality,
6253
+ select: val => {
6254
+ setLocality(val);
6255
+ if (val !== null && val !== void 0 && val.latitude) setLatitude(val.latitude);
6256
+ if (val !== null && val !== void 0 && val.longitude) setLongitude(val.longitude);
6257
+ if (val !== null && val !== void 0 && val.localname) setAddressLine1(val.localname);
6258
+ if (val !== null && val !== void 0 && val.name) setAddressLine2(val.name);
6259
+ if (val !== null && val !== void 0 && val.zone) setZone(val.zone);
6260
+ if (val !== null && val !== void 0 && val.ward) setBlock(val.ward);
6261
+ if (val !== null && val !== void 0 && val.pincode) {
6262
+ const p = Array.isArray(val.pincode) ? val.pincode[0] : val.pincode;
6263
+ if (p) {
6264
+ const sanitizedPin = p.toString().split(".")[0];
6265
+ setPincode(sanitizedPin);
6266
+ }
6267
+ }
6268
+ },
6269
+ option: filteredLocalities,
6270
+ optionKey: "i18nkey",
6271
+ t: t,
6272
+ style: {
6273
+ width: "100%"
6274
+ }
6072
6275
  })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("HOUSE_NO"), /*#__PURE__*/React.createElement("span", {
6073
- className: "check-page-link-button"
6276
+ className: "astericColor"
6074
6277
  }, "*")), /*#__PURE__*/React.createElement(TextInput, {
6075
6278
  value: houseNo,
6076
- onChange: e => setHouseNo(e.target.value)
6279
+ onChange: e => setHouseNo(e.target.value),
6280
+ style: {
6281
+ width: "100%"
6282
+ }
6077
6283
  })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("STREET_NAME"), " ", /*#__PURE__*/React.createElement("span", {
6078
- className: "check-page-link-button"
6284
+ className: "astericColor"
6079
6285
  }, "*")), /*#__PURE__*/React.createElement(TextInput, {
6080
6286
  value: streetName,
6081
- onChange: e => setStreetName(e.target.value)
6287
+ onChange: e => setStreetName(e.target.value),
6288
+ style: {
6289
+ width: "100%"
6290
+ }
6082
6291
  })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("ADDRESS_LINE1"), " ", /*#__PURE__*/React.createElement("span", {
6083
- className: "check-page-link-button"
6292
+ className: "astericColor"
6084
6293
  }, "*")), /*#__PURE__*/React.createElement(TextInput, {
6085
6294
  value: addressLine1,
6086
- onChange: e => setAddressLine1(e.target.value)
6295
+ onChange: e => setAddressLine1(e.target.value),
6296
+ style: {
6297
+ width: "100%"
6298
+ }
6087
6299
  })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("ADDRESS_LINE2"), " ", /*#__PURE__*/React.createElement("span", {
6088
- className: "check-page-link-button"
6300
+ className: "astericColor"
6089
6301
  }, "*")), /*#__PURE__*/React.createElement(TextInput, {
6090
6302
  value: addressLine2,
6091
- onChange: e => setAddressLine2(e.target.value)
6092
- })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("LANDMARK")), /*#__PURE__*/React.createElement(TextInput, {
6093
- value: landmark,
6094
- onChange: e => setLandmark(e.target.value)
6095
- })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("CITY"), " ", /*#__PURE__*/React.createElement("span", {
6096
- className: "check-page-link-button"
6097
- }, "*")), /*#__PURE__*/React.createElement(Controller, {
6098
- control: control,
6099
- name: "city",
6100
- render: () => /*#__PURE__*/React.createElement(Dropdown, {
6101
- selected: city,
6102
- select: setCity,
6103
- option: allCities,
6104
- optionKey: "i18nKey",
6105
- t: t
6106
- })
6107
- })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("LOCALITY"), " ", /*#__PURE__*/React.createElement("span", {
6108
- className: "check-page-link-button"
6109
- }, "*")), /*#__PURE__*/React.createElement(Controller, {
6110
- control: control,
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
- })
6303
+ onChange: e => setAddressLine2(e.target.value),
6304
+ style: {
6305
+ width: "100%"
6306
+ }
6307
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("BLOCK"), " ", /*#__PURE__*/React.createElement("span", {
6308
+ className: "astericColor"
6309
+ }, "*")), /*#__PURE__*/React.createElement(TextInput, {
6310
+ value: block,
6311
+ onChange: e => setBlock(e.target.value),
6312
+ style: {
6313
+ width: "100%"
6314
+ }
6315
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("ZONE"), " ", /*#__PURE__*/React.createElement("span", {
6316
+ className: "astericColor"
6317
+ }, "*")), /*#__PURE__*/React.createElement(TextInput, {
6318
+ value: zone,
6319
+ onChange: e => setZone(e.target.value),
6320
+ style: {
6321
+ width: "100%"
6322
+ }
6119
6323
  })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("LATITUDE"), " ", /*#__PURE__*/React.createElement("span", {
6120
- className: "check-page-link-button"
6324
+ className: "astericColor"
6121
6325
  }, "*")), /*#__PURE__*/React.createElement(TextInput, {
6122
6326
  value: latitude,
6123
- onChange: e => setLatitude(e.target.value)
6327
+ onChange: e => setLatitude(e.target.value),
6328
+ style: {
6329
+ width: "100%"
6330
+ }
6124
6331
  })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("LONGITUDE"), " ", /*#__PURE__*/React.createElement("span", {
6125
- className: "check-page-link-button"
6332
+ className: "astericColor"
6126
6333
  }, "*")), /*#__PURE__*/React.createElement(TextInput, {
6127
6334
  value: longitude,
6128
- onChange: e => setLongitude(e.target.value)
6129
- })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("PINCODE"), " ", /*#__PURE__*/React.createElement("span", {
6130
- className: "check-page-link-button"
6131
- }, "*")), /*#__PURE__*/React.createElement(TextInput, {
6132
- value: pincode,
6133
- onChange: e => setPincode(e.target.value),
6134
- maxLength: 6
6135
- })));
6335
+ onChange: e => setLongitude(e.target.value),
6336
+ style: {
6337
+ width: "100%"
6338
+ }
6339
+ })), /*#__PURE__*/React.createElement("div", {
6340
+ style: {
6341
+ gridColumn: "span 2"
6342
+ }
6343
+ }, /*#__PURE__*/React.createElement(CardLabel, null, t("LANDMARK")), /*#__PURE__*/React.createElement(TextInput, {
6344
+ value: landmark,
6345
+ onChange: e => setLandmark(e.target.value),
6346
+ style: {
6347
+ width: "100%"
6348
+ }
6349
+ }))));
6136
6350
  };
6137
6351
 
6138
6352
  const AddFillingPointAddress = () => {
@@ -6362,12 +6576,10 @@ const AddFixPointAddress = () => {
6362
6576
  mutate: updateFixedPoint
6363
6577
  } = Digit.Hooks.wt.useUpdateFixedPoint(tenantId);
6364
6578
  const handleSubmit = e => {
6365
- console.log("Submitting Form Data:", formData);
6366
6579
  const payload = fixedPointPayload({
6367
6580
  ...formData,
6368
6581
  tenantId
6369
6582
  });
6370
- console.log("Generated Payload:", payload);
6371
6583
  const mutation = editId ? updateFixedPoint : createFixedPoint;
6372
6584
  mutation(payload, {
6373
6585
  onSuccess: () => {
@@ -6382,7 +6594,6 @@ const AddFixPointAddress = () => {
6382
6594
  },
6383
6595
  onError: error => {
6384
6596
  var _error$response, _error$response$data, _error$response$data$, _error$response$data$2;
6385
- console.error("Mutation Error:", error);
6386
6597
  setShowToast({
6387
6598
  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
6599
  isError: true
@@ -6411,14 +6622,12 @@ const AddFixPointAddress = () => {
6411
6622
  flexDirection: "column",
6412
6623
  gap: "16px"
6413
6624
  }
6414
- }, /*#__PURE__*/React.createElement(Card, {
6625
+ }, /*#__PURE__*/React.createElement(CollapsibleCardPage$1, {
6626
+ title: t("WT_FIXING_POINT_APPLICANT_DETAILS"),
6627
+ defaultOpen: true
6628
+ }, /*#__PURE__*/React.createElement("div", {
6415
6629
  className: "formcomposer-section-grid"
6416
- }, /*#__PURE__*/React.createElement(CardSubHeader, {
6417
- style: {
6418
- gridColumn: "span 2",
6419
- marginBottom: isMobile ? "0px" : "10px"
6420
- }
6421
- }, t("WT_FIXING_POINT_APPLICANT_DETAILS")), /*#__PURE__*/React.createElement("div", {
6630
+ }, /*#__PURE__*/React.createElement("div", {
6422
6631
  style: {
6423
6632
  display: "flex",
6424
6633
  flexDirection: "column"
@@ -6484,7 +6693,7 @@ const AddFixPointAddress = () => {
6484
6693
  style: {
6485
6694
  width: "100%"
6486
6695
  }
6487
- }))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(AddFixFillAddress, {
6696
+ })))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(AddFixFillAddress, {
6488
6697
  t: t,
6489
6698
  config: addressConfig,
6490
6699
  onSelect: handleSelect,
@@ -6523,7 +6732,7 @@ const LocalityModal = ({
6523
6732
  data: mdmsData,
6524
6733
  isLoading: isMdmsLoading
6525
6734
  } = Digit.Hooks.hrms.useHrmsMDMS(tenantId, "egov-location", "HRMSRolesandDesignation");
6526
- const gethierarchylistdata = () => {
6735
+ const hierarchyOptions = useMemo(() => {
6527
6736
  var _ref, _ref$egovLocation;
6528
6737
  const tenantBoundary = ((_ref = (mdmsData === null || mdmsData === void 0 ? void 0 : mdmsData.MdmsRes) || mdmsData) === null || _ref === void 0 ? void 0 : (_ref$egovLocation = _ref["egov-location"]) === null || _ref$egovLocation === void 0 ? void 0 : _ref$egovLocation["TenantBoundary"]) || [];
6529
6738
  return tenantBoundary.map(ele => ({
@@ -6531,8 +6740,7 @@ const LocalityModal = ({
6531
6740
  code: ele.hierarchyType.code || ele.hierarchyType,
6532
6741
  boundary: ele.boundary
6533
6742
  }));
6534
- };
6535
- const hierarchyOptions = gethierarchylistdata();
6743
+ }, [mdmsData]);
6536
6744
  React.useEffect(() => {
6537
6745
  if (hierarchyOptions.length > 0 && !selectedHierarchy) {
6538
6746
  setSelectedHierarchy(hierarchyOptions[0]);
@@ -6558,17 +6766,19 @@ const LocalityModal = ({
6558
6766
  }, [selectedHierarchy]);
6559
6767
  React.useEffect(() => {
6560
6768
  var _initialValues$fillin, _initialValues$addres;
6561
- if (structuredLocalities.length > 0 && ((initialValues === null || initialValues === void 0 ? void 0 : (_initialValues$fillin = initialValues.fillingPointLocalityCodes) === null || _initialValues$fillin === void 0 ? void 0 : _initialValues$fillin.length) > 0 || initialValues !== null && initialValues !== void 0 && (_initialValues$addres = initialValues.address) !== null && _initialValues$addres !== void 0 && _initialValues$addres.locality) && (isView || isUpdate)) {
6769
+ if (structuredLocalities.length > 0 && selectedLocality.length === 0 && ((initialValues === null || initialValues === void 0 ? void 0 : (_initialValues$fillin = initialValues.fillingPointLocalityCodes) === null || _initialValues$fillin === void 0 ? void 0 : _initialValues$fillin.length) > 0 || initialValues !== null && initialValues !== void 0 && (_initialValues$addres = initialValues.address) !== null && _initialValues$addres !== void 0 && _initialValues$addres.locality) && (isView || isUpdate)) {
6562
6770
  var _initialValues$fillin2;
6563
- const currentLocalityCodes = (initialValues === null || initialValues === void 0 ? void 0 : (_initialValues$fillin2 = initialValues.fillingPointLocalityCodes) === null || _initialValues$fillin2 === void 0 ? void 0 : _initialValues$fillin2.length) > 0 ? initialValues.fillingPointLocalityCodes : initialValues.address.locality.split(",").map(s => s.trim());
6564
- const preSelected = structuredLocalities.filter(loc => currentLocalityCodes.includes(loc.code)).map(loc => [loc.i18nKey, loc]);
6565
- setSelectedLocality(preSelected);
6771
+ const currentLocalityCodes = (initialValues === null || initialValues === void 0 ? void 0 : (_initialValues$fillin2 = initialValues.fillingPointLocalityCodes) === null || _initialValues$fillin2 === void 0 ? void 0 : _initialValues$fillin2.length) > 0 ? initialValues.fillingPointLocalityCodes : typeof initialValues.address.locality === "string" ? initialValues.address.locality.split(",").map(s => s.trim()) : [];
6772
+ const preSelected = structuredLocalities.filter(loc => currentLocalityCodes.some(c => c === loc.code || c.toLowerCase() === (loc.name || "").toLowerCase()));
6773
+ if (preSelected.length > 0) {
6774
+ setSelectedLocality(preSelected);
6775
+ }
6566
6776
  }
6567
- }, [structuredLocalities, initialValues, isView, isUpdate]);
6777
+ }, [structuredLocalities, initialValues, isView, isUpdate, selectedLocality]);
6568
6778
  const onFormSubmit = () => {
6569
6779
  onSubmit({
6570
6780
  hierarchyType: selectedHierarchy,
6571
- locality: selectedLocality.map(l => l[1])
6781
+ locality: selectedLocality
6572
6782
  });
6573
6783
  };
6574
6784
  if (isMdmsLoading) return /*#__PURE__*/React.createElement(Loader, null);
@@ -6643,7 +6853,7 @@ const LocalityModal = ({
6643
6853
  fontWeight: "600",
6644
6854
  marginBottom: "8px"
6645
6855
  }
6646
- }, (initialValues === null || initialValues === void 0 ? void 0 : (_initialValues$fillin3 = initialValues.fillingPointLocalityCodes) === null || _initialValues$fillin3 === void 0 ? void 0 : _initialValues$fillin3.length) > 0 ? initialValues.fillingPointLocalityCodes.join(", ") : (initialValues === null || initialValues === void 0 ? void 0 : (_initialValues$addres2 = initialValues.address) === null || _initialValues$addres2 === void 0 ? void 0 : _initialValues$addres2.locality) || "NA")), !isView ? /*#__PURE__*/React.createElement("div", {
6856
+ }, (initialValues === null || initialValues === void 0 ? void 0 : (_initialValues$fillin3 = initialValues.fillingPointLocalityCodes) === null || _initialValues$fillin3 === void 0 ? void 0 : _initialValues$fillin3.length) > 0 ? initialValues.fillingPointLocalityCodes.join(", ") : (initialValues === null || initialValues === void 0 ? void 0 : (_initialValues$addres2 = initialValues.address) === null || _initialValues$addres2 === void 0 ? void 0 : _initialValues$addres2.locality) || "NA")), !isView && /*#__PURE__*/React.createElement("div", {
6647
6857
  style: {
6648
6858
  marginBottom: "16px"
6649
6859
  }
@@ -6652,7 +6862,10 @@ const LocalityModal = ({
6652
6862
  optionsKey: "i18nKey",
6653
6863
  selected: selectedLocality,
6654
6864
  onSelect: val => {
6655
- if (!isView) setSelectedLocality(val);
6865
+ if (!isView) {
6866
+ const unwrappedSelections = val.map(v => v[1]);
6867
+ setSelectedLocality(unwrappedSelections);
6868
+ }
6656
6869
  },
6657
6870
  t: t,
6658
6871
  disabled: !selectedHierarchy || isView
@@ -6662,28 +6875,7 @@ const LocalityModal = ({
6662
6875
  fontSize: "14px",
6663
6876
  color: "#666"
6664
6877
  }
6665
- }, /*#__PURE__*/React.createElement("strong", null, t("WT_LOCALITY_CODES"), ":"), " ", selectedLocality.map(l => l[1].code).join(", "))) : /*#__PURE__*/React.createElement("div", {
6666
- style: {
6667
- marginBottom: "16px"
6668
- }
6669
- }, /*#__PURE__*/React.createElement(CardLabel, null, t("WT_SELECTED_LOCALITIES")), /*#__PURE__*/React.createElement("div", {
6670
- style: {
6671
- display: "flex",
6672
- flexWrap: "wrap",
6673
- gap: "8px",
6674
- marginTop: "8px"
6675
- }
6676
- }, (selectedLocality === null || selectedLocality === void 0 ? void 0 : selectedLocality.length) > 0 ? selectedLocality.map((l, index) => /*#__PURE__*/React.createElement("span", {
6677
- key: index,
6678
- style: {
6679
- background: "#f4f4f4",
6680
- border: "1px solid #ddd",
6681
- borderRadius: "20px",
6682
- padding: "4px 12px",
6683
- fontSize: "14px",
6684
- color: "#333"
6685
- }
6686
- }, t(l[1].i18nKey), " (", l[1].code, ")")) : null))), /*#__PURE__*/React.createElement("div", {
6878
+ }, /*#__PURE__*/React.createElement("strong", null, t("WT_LOCALITY_CODES"), ":"), " ", selectedLocality.map(l => l.code).join(", ")))), /*#__PURE__*/React.createElement("div", {
6687
6879
  className: "custom-modal-footer",
6688
6880
  style: {
6689
6881
  padding: "16px 24px",
@@ -6903,7 +7095,7 @@ const SearchFillingPointAddress = () => {
6903
7095
  } = Digit.Hooks.wt.useUpdateFillingPointLocality(tenantId);
6904
7096
  const onLocalityModalSubmit = data => {
6905
7097
  const payload = {
6906
- FillingPointLocality: data.locality.map(loc => ({
7098
+ FillingPointLocality: data.locality.filter(loc => loc.code).map(loc => ({
6907
7099
  fillingPointId: selectedLocalityRow.bookingId || selectedLocalityRow.id,
6908
7100
  localityCode: loc.code
6909
7101
  }))
@@ -7501,14 +7693,12 @@ const VendorAssign = ({
7501
7693
  style: {
7502
7694
  flex: 1
7503
7695
  }
7504
- }, /*#__PURE__*/React.createElement(Card, {
7696
+ }, /*#__PURE__*/React.createElement(CollapsibleCardPage$1, {
7697
+ title: t("WT_VENDOR_ASSIGN"),
7698
+ defaultOpen: true
7699
+ }, /*#__PURE__*/React.createElement("div", {
7505
7700
  className: "formcomposer-section-grid"
7506
- }, /*#__PURE__*/React.createElement(CardSubHeader, {
7507
- style: {
7508
- marginBottom: "10px",
7509
- gridColumn: "span 2"
7510
- }
7511
- }, t("WT_VENDOR_ASSIGN")), /*#__PURE__*/React.createElement("div", {
7701
+ }, /*#__PURE__*/React.createElement("div", {
7512
7702
  style: {
7513
7703
  display: "flex",
7514
7704
  flexDirection: "column"
@@ -7575,7 +7765,7 @@ const VendorAssign = ({
7575
7765
  formData: {
7576
7766
  serviceType: selectedServiceType
7577
7767
  }
7578
- })), /*#__PURE__*/React.createElement("div", {
7768
+ }))), /*#__PURE__*/React.createElement("div", {
7579
7769
  style: {
7580
7770
  display: "flex",
7581
7771
  marginTop: "24px",
@@ -17442,8 +17632,8 @@ var _DataView = DataView;
17442
17632
  var Promise$1 = _getNative(_root, 'Promise');
17443
17633
  var _Promise = Promise$1;
17444
17634
 
17445
- var Set = _getNative(_root, 'Set');
17446
- var _Set = Set;
17635
+ var Set$1 = _getNative(_root, 'Set');
17636
+ var _Set = Set$1;
17447
17637
 
17448
17638
  var WeakMap = _getNative(_root, 'WeakMap');
17449
17639
  var _WeakMap = WeakMap;
@@ -19750,7 +19940,7 @@ const NOCDocuments = ({
19750
19940
  }
19751
19941
  }, [nocDocs, commonDocMaping]);
19752
19942
  useEffect(() => {
19753
- if (bpaApplicationStatus === 'NOC_VERIFICATION_INPROGRESS' && (actions === null || actions === void 0 ? void 0 : actions.length) > 0) setCheckEnablingDocs(true);else setCheckEnablingDocs(false);
19943
+ if (bpaApplicationStatus === "NOC_VERIFICATION_INPROGRESS" && (actions === null || actions === void 0 ? void 0 : actions.length) > 0) setCheckEnablingDocs(true);else setCheckEnablingDocs(false);
19754
19944
  }, [applicationData, bpaActionsDetails]);
19755
19945
  return /*#__PURE__*/React.createElement("div", {
19756
19946
  style: {
@@ -19775,9 +19965,9 @@ const NOCDocuments = ({
19775
19965
  label: isEmployee ? `${t(noc === null || noc === void 0 ? void 0 : noc.title)}` : t(noc === null || noc === void 0 ? void 0 : noc.title),
19776
19966
  text: noc !== null && noc !== void 0 && noc.value ? t(noc === null || noc === void 0 ? void 0 : noc.value) : t("CS_NA"),
19777
19967
  textStyle: (noc === null || noc === void 0 ? void 0 : noc.value) == "APPROVED" || (noc === null || noc === void 0 ? void 0 : noc.value) == "AUTO_APPROVED" ? {
19778
- color: "#00703C"
19968
+ color: "#2E9E8F"
19779
19969
  } : {
19780
- color: "#D4351C"
19970
+ color: "#D83A2F"
19781
19971
  }
19782
19972
  });
19783
19973
  } else {
@@ -20329,7 +20519,7 @@ const ScruntinyDetails = ({
20329
20519
  const getTextValues = data => {
20330
20520
  if (data !== null && data !== void 0 && data.value && data !== null && data !== void 0 && data.isTransLate) return /*#__PURE__*/React.createElement("span", {
20331
20521
  style: {
20332
- color: "#00703C"
20522
+ color: "#2E9E8F"
20333
20523
  }
20334
20524
  }, 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
20525
  };
@@ -21009,7 +21199,7 @@ const WSFeeEstimation = ({
21009
21199
  var _result$Calculation2, _result$Calculation2$, _result$Calculation2$2;
21010
21200
  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
21201
  }
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, 'category');
21202
+ 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
21203
  const values = [{
21014
21204
  title: "WS_APPLICATION_FEE_HEADER",
21015
21205
  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 +21245,7 @@ const WSFeeEstimation = ({
21055
21245
  if (targetValueSign == 1) {
21056
21246
  values[value] = e.target.value;
21057
21247
  } else {
21058
- values[value] = '';
21248
+ values[value] = "";
21059
21249
  }
21060
21250
  } else if (isDropDownValue) {
21061
21251
  values[`${value}_data`] = e;
@@ -21070,7 +21260,7 @@ const WSFeeEstimation = ({
21070
21260
  return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
21071
21261
  style: {
21072
21262
  lineHeight: "19px",
21073
- maxWidth: "950px",
21263
+ maxWidth: "100%",
21074
21264
  minWidth: "280px"
21075
21265
  }
21076
21266
  }, values && /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement("div", null, values === null || values === void 0 ? void 0 : values.map((value, index) => {
@@ -21101,15 +21291,16 @@ const WSFeeEstimation = ({
21101
21291
  label: `${t(`CS_INBOX_STATUS_FILTER`)}`,
21102
21292
  text: isPaid ? t("WS_COMMON_PAID_LABEL") : t("WS_COMMON_NOT_PAID"),
21103
21293
  textStyle: !isPaid ? {
21104
- color: "#D4351C"
21294
+ color: "#D83A2F"
21105
21295
  } : {
21106
- color: "#00703C"
21296
+ color: "#2E9E8F"
21107
21297
  }
21108
21298
  }))), wsAdditionalDetails !== null && wsAdditionalDetails !== void 0 && (_wsAdditionalDetails$18 = wsAdditionalDetails.additionalDetails) !== null && _wsAdditionalDetails$18 !== void 0 && _wsAdditionalDetails$18.isAdhocRebate ? /*#__PURE__*/React.createElement("div", {
21109
21299
  onClick: e => {
21110
21300
  showPopUp(true);
21111
21301
  }
21112
21302
  }, /*#__PURE__*/React.createElement("span", {
21303
+ className: "add-details-link hover-button",
21113
21304
  style: {
21114
21305
  cursor: "pointer",
21115
21306
  color: "#a82227"
@@ -21133,14 +21324,16 @@ const WSFeeEstimation = ({
21133
21324
  actionSaveOnSubmit: e => addAdhocRebatePenality(),
21134
21325
  hideSubmit: false,
21135
21326
  popupStyles: {
21136
- overflowY: "auto"
21327
+ overflowY: "auto",
21328
+ background: "#f0f3f7"
21137
21329
  }
21138
- }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Card, {
21330
+ }, /*#__PURE__*/React.createElement("div", {
21139
21331
  style: {
21140
- padding: "10px 10px 1px 10px",
21141
- margin: "0px 0px 15px 0px"
21332
+ display: "flex",
21333
+ flexDirection: "column",
21334
+ gap: "16px"
21142
21335
  }
21143
- }, /*#__PURE__*/React.createElement(CardSectionHeader, {
21336
+ }, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSectionHeader, {
21144
21337
  style: {
21145
21338
  fontSize: "16px",
21146
21339
  fontWeight: "700",
@@ -21148,7 +21341,7 @@ const WSFeeEstimation = ({
21148
21341
  padding: "0px",
21149
21342
  margin: "0px 0px 10px 0px"
21150
21343
  }
21151
- }, t("PT_AD_PENALTY")), /*#__PURE__*/React.createElement(CardLabel, null, t("PT_TX_HEADS")), /*#__PURE__*/React.createElement("div", {
21344
+ }, t("PT_AD_PENALTY")), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("PT_TX_HEADS")), /*#__PURE__*/React.createElement("div", {
21152
21345
  className: "field"
21153
21346
  }, /*#__PURE__*/React.createElement(Dropdown, {
21154
21347
  isMandatory: true,
@@ -21159,9 +21352,7 @@ const WSFeeEstimation = ({
21159
21352
  isPropertyAssess: true,
21160
21353
  name: "adhocPenaltyReason_data",
21161
21354
  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", {
21355
+ }))), (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
21356
  className: "field"
21166
21357
  }, /*#__PURE__*/React.createElement(TextInput, Object.assign({
21167
21358
  style: {
@@ -21178,7 +21369,7 @@ const WSFeeEstimation = ({
21178
21369
  pattern: "^[a-zA-Z ]*$",
21179
21370
  type: "text",
21180
21371
  title: t("TL_NAME_ERROR_MESSAGE")
21181
- })))), /*#__PURE__*/React.createElement(CardLabel, null, t("PT_HEAD_AMT")), /*#__PURE__*/React.createElement("div", {
21372
+ })))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("PT_HEAD_AMT")), /*#__PURE__*/React.createElement("div", {
21182
21373
  className: "field"
21183
21374
  }, /*#__PURE__*/React.createElement(TextInput, Object.assign({
21184
21375
  style: {
@@ -21194,12 +21385,7 @@ const WSFeeEstimation = ({
21194
21385
  isRequired: true,
21195
21386
  pattern: "^[1-9]+[0-9]*$",
21196
21387
  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, {
21388
+ }))))), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSectionHeader, {
21203
21389
  style: {
21204
21390
  fontSize: "16px",
21205
21391
  fontWeight: "700",
@@ -21207,7 +21393,7 @@ const WSFeeEstimation = ({
21207
21393
  padding: "0px",
21208
21394
  margin: "0px 0px 10px 0px"
21209
21395
  }
21210
- }, t("PT_AD_REBATE")), /*#__PURE__*/React.createElement(CardLabel, null, t("PT_TX_HEADS")), /*#__PURE__*/React.createElement("div", {
21396
+ }, t("PT_AD_REBATE")), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("PT_TX_HEADS")), /*#__PURE__*/React.createElement("div", {
21211
21397
  className: "field"
21212
21398
  }, /*#__PURE__*/React.createElement(Dropdown, {
21213
21399
  isMandatory: true,
@@ -21218,9 +21404,7 @@ const WSFeeEstimation = ({
21218
21404
  name: "adhocRebateReason_data",
21219
21405
  isPropertyAssess: true,
21220
21406
  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("div", {
21222
- className: "field"
21223
- }, /*#__PURE__*/React.createElement(CardLabel, null, t("PT_REASON")), /*#__PURE__*/React.createElement(TextInput, Object.assign({
21407
+ }))), (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
21408
  style: {
21225
21409
  background: "#FAFAFA"
21226
21410
  },
@@ -21235,7 +21419,7 @@ const WSFeeEstimation = ({
21235
21419
  pattern: "^[a-zA-Z ]*$",
21236
21420
  type: "text",
21237
21421
  title: t("TL_NAME_ERROR_MESSAGE")
21238
- }))), /*#__PURE__*/React.createElement(CardLabel, null, t("PT_HEAD_AMT")), /*#__PURE__*/React.createElement("div", {
21422
+ }))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("PT_HEAD_AMT")), /*#__PURE__*/React.createElement("div", {
21239
21423
  className: "field"
21240
21424
  }, /*#__PURE__*/React.createElement(TextInput, Object.assign({
21241
21425
  style: {
@@ -21251,7 +21435,7 @@ const WSFeeEstimation = ({
21251
21435
  isRequired: true,
21252
21436
  pattern: "^[1-9]+[0-9]*$",
21253
21437
  title: t("ERR_DEFAULT_INPUT_FIELD_MSG")
21254
- }))))), " "), showToast && /*#__PURE__*/React.createElement(Toast, {
21438
+ }))))))), showToast && /*#__PURE__*/React.createElement(Toast, {
21255
21439
  style: {
21256
21440
  zIndex: "10000"
21257
21441
  },
@@ -21365,10 +21549,7 @@ const ViewBreakup = ({
21365
21549
  marginTop: "12px"
21366
21550
  }
21367
21551
  }, /*#__PURE__*/React.createElement("span", {
21368
- style: {
21369
- cursor: "pointer",
21370
- color: "#a82227"
21371
- }
21552
+ className: "add-details-link hover-button"
21372
21553
  }, t("WS_PAYMENT_VIEW_BREAKUP"))) : null, popup && /*#__PURE__*/React.createElement(Modal, {
21373
21554
  headerBarMain: /*#__PURE__*/React.createElement(Heading, {
21374
21555
  label: t("WS_CALCULATION_BREAKUP")
@@ -21810,15 +21991,11 @@ function ApplicationDetailsContent({
21810
21991
  oldValue,
21811
21992
  isInfoLabel = false
21812
21993
  }) {
21813
- var _applicationDetails$a2, _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;
21994
+ 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
21995
  const {
21815
21996
  t
21816
21997
  } = useTranslation();
21817
- const history = useHistory();
21818
- const location = useLocation();
21819
21998
  const [showPopup, setShowPopup] = useState(false);
21820
- const [selectedData, setSelectedData] = useState(null);
21821
- const searchParams = new URLSearchParams(location.search);
21822
21999
  let {
21823
22000
  id: applicationNo
21824
22001
  } = useParams();
@@ -21854,7 +22031,7 @@ function ApplicationDetailsContent({
21854
22031
  loaded: false,
21855
22032
  canLoad: false
21856
22033
  });
21857
- if ((applicationData === null || applicationData === void 0 ? void 0 : applicationData.status) == "ACTIVE" && !billData.loading && !billData.loaded && !billData.canLoad) {
22034
+ if ((applicationData === null || applicationData === void 0 ? void 0 : applicationData.status) === "ACTIVE" && !billData.loading && !billData.loaded && !billData.canLoad) {
21858
22035
  updateCanFetchBillData({
21859
22036
  loading: false,
21860
22037
  loaded: false,
@@ -21870,7 +22047,7 @@ function ApplicationDetailsContent({
21870
22047
  setBillData((applicationData === null || applicationData === void 0 ? void 0 : applicationData.tenantId) || tenantId, applicationData === null || applicationData === void 0 ? void 0 : applicationData.propertyId, updatefetchBillData, updateCanFetchBillData);
21871
22048
  }
21872
22049
  const convertEpochToDateDMY = dateEpoch => {
21873
- if (dateEpoch == null || dateEpoch == undefined || dateEpoch == "") {
22050
+ if (dateEpoch == null || dateEpoch === undefined || dateEpoch === "") {
21874
22051
  return "NA";
21875
22052
  }
21876
22053
  const dateFromApi = new Date(dateEpoch);
@@ -21954,7 +22131,6 @@ function ApplicationDetailsContent({
21954
22131
  const checkLocation = window.location.href.includes("employee/tl") || window.location.href.includes("employee/obps") || window.location.href.includes("employee/noc");
21955
22132
  const isNocLocation = window.location.href.includes("employee/noc");
21956
22133
  const isBPALocation = window.location.href.includes("employee/obps");
21957
- const isWS = window.location.href.includes("employee/ws");
21958
22134
  const getRowStyles = () => {
21959
22135
  if (window.location.href.includes("employee/obps") || window.location.href.includes("employee/noc")) {
21960
22136
  return {
@@ -21993,13 +22169,13 @@ function ApplicationDetailsContent({
21993
22169
  if (window.location.href.includes("employee/obps") || window.location.href.includes("employee/noc") || window.location.href.includes("employee/ws")) {
21994
22170
  return {
21995
22171
  lineHeight: "19px",
21996
- maxWidth: "950px",
22172
+ maxWidth: "100%",
21997
22173
  minWidth: "280px"
21998
22174
  };
21999
22175
  } else if (checkLocation) {
22000
22176
  return {
22001
22177
  lineHeight: "19px",
22002
- maxWidth: "600px",
22178
+ maxWidth: "100%",
22003
22179
  minWidth: "280px"
22004
22180
  };
22005
22181
  } else {
@@ -22047,7 +22223,6 @@ function ApplicationDetailsContent({
22047
22223
  });
22048
22224
  };
22049
22225
  const handleViewClick = data => {
22050
- setSelectedData(data);
22051
22226
  setShowPopup(true);
22052
22227
  };
22053
22228
  return /*#__PURE__*/React.createElement(Card, {
@@ -22062,8 +22237,8 @@ function ApplicationDetailsContent({
22062
22237
  infoClickLable: "WS_CLICK_ON_LABEL",
22063
22238
  infoClickInfoLabel: getClickInfoDetails(),
22064
22239
  infoClickInfoLabel1: getClickInfoDetails1()
22065
- }) : null, applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a2 = applicationDetails.applicationDetails) === null || _applicationDetails$a2 === void 0 ? void 0 : _applicationDetails$a2.map((detail, index) => {
22066
- var _detail$title, _detail$values, _detail$additionalDet, _applicationDetails$a3, _applicationDetails$a4, _applicationDetails$a5, _detail$additionalDet2, _applicationDetails$a6, _applicationDetails$a7, _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;
22240
+ }) : null, applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a = applicationDetails.applicationDetails) === null || _applicationDetails$a === void 0 ? void 0 : _applicationDetails$a.map((detail, index) => {
22241
+ 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
22242
  return /*#__PURE__*/React.createElement(React.Fragment, {
22068
22243
  key: index
22069
22244
  }, /*#__PURE__*/React.createElement("div", {
@@ -22156,7 +22331,7 @@ function ApplicationDetailsContent({
22156
22331
  }
22157
22332
  }, /*#__PURE__*/React.createElement("button", null, " ", /*#__PURE__*/React.createElement(EditIcon, null), " ")), /*#__PURE__*/React.createElement("div", {
22158
22333
  key: index,
22159
- onClick: () => handleViewClick(element.data),
22334
+ onClick: () => handleViewClick(),
22160
22335
  style: {
22161
22336
  cursor: "pointer"
22162
22337
  }
@@ -22257,8 +22432,8 @@ function ApplicationDetailsContent({
22257
22432
  })))), (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
22433
  scrutinyDetails: detail === null || detail === void 0 ? void 0 : detail.additionalDetails,
22259
22434
  paymentsList: paymentsList
22260
- }), (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a3 = applicationDetails.applicationData) === null || _applicationDetails$a3 === void 0 ? void 0 : (_applicationDetails$a4 = _applicationDetails$a3.additionalDetails) === null || _applicationDetails$a4 === void 0 ? void 0 : (_applicationDetails$a5 = _applicationDetails$a4.fieldinspection_pending) === null || _applicationDetails$a5 === void 0 ? void 0 : _applicationDetails$a5.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, {
22261
- fiReport: applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a6 = applicationDetails.applicationData) === null || _applicationDetails$a6 === void 0 ? void 0 : (_applicationDetails$a7 = _applicationDetails$a6.additionalDetails) === null || _applicationDetails$a7 === void 0 ? void 0 : _applicationDetails$a7.fieldinspection_pending
22435
+ }), (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, {
22436
+ 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
22437
  }), (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
22438
  floors: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet4 = detail.additionalDetails) === null || _detail$additionalDet4 === void 0 ? void 0 : _detail$additionalDet4.floors
22264
22439
  }), (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 +22475,11 @@ function ApplicationDetailsContent({
22300
22475
  }), (detail === null || detail === void 0 ? void 0 : detail.isWaterConnectionDetails) && /*#__PURE__*/React.createElement(WSAdditonalDetails, {
22301
22476
  wsAdditionalDetails: detail,
22302
22477
  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("div", {
22304
- style: {
22305
- fontSize: "16px",
22306
- lineHeight: "24px",
22307
- fontWeight: "400",
22308
- padding: "10px 0px"
22309
- }
22310
- }, /*#__PURE__*/React.createElement(Link, {
22478
+ }), (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
22479
  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
22480
  }, /*#__PURE__*/React.createElement("span", {
22313
- className: "link",
22314
- style: {
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, {
22481
+ className: "add-details-link hover-button"
22482
+ }, 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
22483
  wsAdditionalDetails: detail,
22319
22484
  workflowDetails: workflowDetails
22320
22485
  }), (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, {