@djb25/digit-ui-module-wt 1.0.28 → 1.0.30

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.
@@ -692,6 +692,53 @@ const fixedPointPayload = data => {
692
692
  }
693
693
  };
694
694
  };
695
+ const EmergencyFixedPointInfoPage = data => {
696
+ var _data$requestDetails11, _data$requestDetails12, _data$requestDetails13, _data$requestDetails14, _data$requestDetails15, _data$requestDetails16, _data$requestDetails17, _data$requestDetails18, _data$requestDetails19, _data$requestDetails20, _data$requestDetails21, _data$requestDetails22, _data$address71, _data$owner29, _data$owner30, _data$owner31, _data$owner32, _data$address72, _data$address72$addre, _data$address73, _data$address74, _data$address74$city, _data$address74$city$, _data$address75, _data$address75$city, _data$address75$city$, _data$address76, _data$address77, _data$address78, _data$address78$local, _data$address79, _data$address79$local, _data$address80, _data$address81, _data$address82, _data$address83, _data$address84, _data$requestDetails23;
697
+ const formdata = {
698
+ waterTankerBookingDetail: {
699
+ tenantId: data === null || data === void 0 ? void 0 : data.tenantId,
700
+ tankerType: data === null || data === void 0 ? void 0 : (_data$requestDetails11 = data.requestDetails) === null || _data$requestDetails11 === void 0 ? void 0 : (_data$requestDetails12 = _data$requestDetails11.tankerType) === null || _data$requestDetails12 === void 0 ? void 0 : _data$requestDetails12.code,
701
+ waterType: data === null || data === void 0 ? void 0 : (_data$requestDetails13 = data.requestDetails) === null || _data$requestDetails13 === void 0 ? void 0 : (_data$requestDetails14 = _data$requestDetails13.waterType) === null || _data$requestDetails14 === void 0 ? void 0 : _data$requestDetails14.code,
702
+ tankerQuantity: data === null || data === void 0 ? void 0 : (_data$requestDetails15 = data.requestDetails) === null || _data$requestDetails15 === void 0 ? void 0 : (_data$requestDetails16 = _data$requestDetails15.tankerQuantity) === null || _data$requestDetails16 === void 0 ? void 0 : _data$requestDetails16.code,
703
+ waterQuantity: data === null || data === void 0 ? void 0 : (_data$requestDetails17 = data.requestDetails) === null || _data$requestDetails17 === void 0 ? void 0 : (_data$requestDetails18 = _data$requestDetails17.waterQuantity) === null || _data$requestDetails18 === void 0 ? void 0 : _data$requestDetails18.code,
704
+ description: data === null || data === void 0 ? void 0 : (_data$requestDetails19 = data.requestDetails) === null || _data$requestDetails19 === void 0 ? void 0 : _data$requestDetails19.description,
705
+ deliveryDate: data === null || data === void 0 ? void 0 : (_data$requestDetails20 = data.requestDetails) === null || _data$requestDetails20 === void 0 ? void 0 : _data$requestDetails20.deliveryDate,
706
+ deliveryTime: data === null || data === void 0 ? void 0 : (_data$requestDetails21 = data.requestDetails) === null || _data$requestDetails21 === void 0 ? void 0 : _data$requestDetails21.deliveryTime,
707
+ extraCharge: data !== null && data !== void 0 && (_data$requestDetails22 = data.requestDetails) !== null && _data$requestDetails22 !== void 0 && _data$requestDetails22.extraCharge ? "Y" : "N",
708
+ addressDetailId: (data === null || data === void 0 ? void 0 : (_data$address71 = data.address) === null || _data$address71 === void 0 ? void 0 : _data$address71.addressDetailId) || "",
709
+ applicantDetail: {
710
+ name: data === null || data === void 0 ? void 0 : (_data$owner29 = data.owner) === null || _data$owner29 === void 0 ? void 0 : _data$owner29.applicantName,
711
+ mobileNumber: data === null || data === void 0 ? void 0 : (_data$owner30 = data.owner) === null || _data$owner30 === void 0 ? void 0 : _data$owner30.mobileNumber,
712
+ alternateNumber: data === null || data === void 0 ? void 0 : (_data$owner31 = data.owner) === null || _data$owner31 === void 0 ? void 0 : _data$owner31.alternateNumber,
713
+ emailId: data === null || data === void 0 ? void 0 : (_data$owner32 = data.owner) === null || _data$owner32 === void 0 ? void 0 : _data$owner32.emailId
714
+ },
715
+ address: {
716
+ addressType: data === null || data === void 0 ? void 0 : (_data$address72 = data.address) === null || _data$address72 === void 0 ? void 0 : (_data$address72$addre = _data$address72.addressType) === null || _data$address72$addre === void 0 ? void 0 : _data$address72$addre.code,
717
+ pincode: data === null || data === void 0 ? void 0 : (_data$address73 = data.address) === null || _data$address73 === void 0 ? void 0 : _data$address73.pincode,
718
+ city: data === null || data === void 0 ? void 0 : (_data$address74 = data.address) === null || _data$address74 === void 0 ? void 0 : (_data$address74$city = _data$address74.city) === null || _data$address74$city === void 0 ? void 0 : (_data$address74$city$ = _data$address74$city.city) === null || _data$address74$city$ === void 0 ? void 0 : _data$address74$city$.name,
719
+ cityCode: data === null || data === void 0 ? void 0 : (_data$address75 = data.address) === null || _data$address75 === void 0 ? void 0 : (_data$address75$city = _data$address75.city) === null || _data$address75$city === void 0 ? void 0 : (_data$address75$city$ = _data$address75$city.city) === null || _data$address75$city$ === void 0 ? void 0 : _data$address75$city$.code,
720
+ addressLine1: data === null || data === void 0 ? void 0 : (_data$address76 = data.address) === null || _data$address76 === void 0 ? void 0 : _data$address76.addressLine1,
721
+ addressLine2: data === null || data === void 0 ? void 0 : (_data$address77 = data.address) === null || _data$address77 === void 0 ? void 0 : _data$address77.addressLine2,
722
+ locality: data === null || data === void 0 ? void 0 : (_data$address78 = data.address) === null || _data$address78 === void 0 ? void 0 : (_data$address78$local = _data$address78.locality) === null || _data$address78$local === void 0 ? void 0 : _data$address78$local.i18nKey,
723
+ localityCode: data === null || data === void 0 ? void 0 : (_data$address79 = data.address) === null || _data$address79 === void 0 ? void 0 : (_data$address79$local = _data$address79.locality) === null || _data$address79$local === void 0 ? void 0 : _data$address79$local.code,
724
+ streetName: data === null || data === void 0 ? void 0 : (_data$address80 = data.address) === null || _data$address80 === void 0 ? void 0 : _data$address80.streetName,
725
+ houseNo: data === null || data === void 0 ? void 0 : (_data$address81 = data.address) === null || _data$address81 === void 0 ? void 0 : _data$address81.houseNo,
726
+ landmark: data === null || data === void 0 ? void 0 : (_data$address82 = data.address) === null || _data$address82 === void 0 ? void 0 : _data$address82.landmark,
727
+ latitude: data === null || data === void 0 ? void 0 : (_data$address83 = data.address) === null || _data$address83 === void 0 ? void 0 : _data$address83.latitude,
728
+ longitude: data === null || data === void 0 ? void 0 : (_data$address84 = data.address) === null || _data$address84 === void 0 ? void 0 : _data$address84.longitude
729
+ },
730
+ WTfileStoreId: data === null || data === void 0 ? void 0 : (_data$requestDetails23 = data.requestDetails) === null || _data$requestDetails23 === void 0 ? void 0 : _data$requestDetails23.fileStoreId,
731
+ bookingStatus: "BOOKING_CREATED",
732
+ workflow: {
733
+ action: "APPLY",
734
+ comments: "",
735
+ businessService: "watertanker",
736
+ moduleName: "request-service.water_tanker"
737
+ }
738
+ }
739
+ };
740
+ return formdata;
741
+ };
695
742
 
696
743
  const CollapsibleCardPage = ({
697
744
  number,
@@ -2402,13 +2449,11 @@ const WTCard = () => {
2402
2449
  const fixedPointInboxCount = isFixedPointInboxLoading ? "-" : (fixedPointInboxData === null || fixedPointInboxData === void 0 ? void 0 : fixedPointInboxData.totalCount) ?? 0;
2403
2450
  const links = [{
2404
2451
  count: citizenInboxCount,
2405
- label: t("ES_COMMON_INBOX"),
2406
- subLabel: t("CITIZEN"),
2452
+ label: t("ES_COMMON_INBOX_CITIZEN"),
2407
2453
  link: `${APPLICATION_PATH}/employee/wt/inbox`
2408
2454
  }, {
2409
2455
  count: fixedPointInboxCount,
2410
- label: t("ES_COMMON_INBOX"),
2411
- subLabel: t("FIXED_POINT"),
2456
+ label: t("ES_COMMON_INBOX_FIXED_POINT"),
2412
2457
  link: `${APPLICATION_PATH}/employee/wt/fixed-point/inbox`
2413
2458
  }, {
2414
2459
  label: t("ES_COMMON_APPLICATION_SEARCH"),
@@ -7178,6 +7223,7 @@ const SearchFillingPointAddress = () => {
7178
7223
  return (row === null || row === void 0 ? void 0 : row.fillingPointId) || (row === null || row === void 0 ? void 0 : (_row$fillingpointmeta = row.fillingpointmetadata) === null || _row$fillingpointmeta === void 0 ? void 0 : _row$fillingpointmeta.fillingPointId) || (row === null || row === void 0 ? void 0 : row.fillingPtName) || (row === null || row === void 0 ? void 0 : row.filling_pt_name) || (row === null || row === void 0 ? void 0 : row.fillingPoint) || "NA";
7179
7224
  },
7180
7225
  id: "fillingPoint",
7226
+ minWidth: 250,
7181
7227
  Cell: ({
7182
7228
  row
7183
7229
  }) => {
@@ -7194,7 +7240,9 @@ const SearchFillingPointAddress = () => {
7194
7240
  option: allFillingPoints,
7195
7241
  select: value => onFillingPointSelect(row, value),
7196
7242
  style: {
7197
- textAlign: "left"
7243
+ textAlign: "left",
7244
+ width: "100%",
7245
+ minWidth: "250px"
7198
7246
  },
7199
7247
  optionKey: "fillingPointName",
7200
7248
  t: t
@@ -7796,7 +7844,7 @@ const VendorAssign = ({
7796
7844
  const EmployeeApp = ({
7797
7845
  path
7798
7846
  }) => {
7799
- var _Digit, _Digit$ComponentRegis, _Digit2, _Digit2$ComponentRegi;
7847
+ var _Digit, _Digit$ComponentRegis, _Digit2, _Digit2$ComponentRegi, _Digit3, _Digit3$ComponentRegi;
7800
7848
  const {
7801
7849
  t
7802
7850
  } = useTranslation();
@@ -7832,6 +7880,10 @@ const EmployeeApp = ({
7832
7880
  crumbs.push({
7833
7881
  label: t(label)
7834
7882
  });
7883
+ } else if (pathname.includes("/fixed-point/request-service")) {
7884
+ crumbs.push({
7885
+ label: t("WT_APPLICATION_CREATE_FIXED_POINT")
7886
+ });
7835
7887
  } else if (pathname.includes("/request-service")) {
7836
7888
  crumbs.push({
7837
7889
  label: t("WT_REQUEST_SERVICE")
@@ -7933,6 +7985,7 @@ const EmployeeApp = ({
7933
7985
  };
7934
7986
  const ApplicationDetails = (_Digit = Digit) === null || _Digit === void 0 ? void 0 : (_Digit$ComponentRegis = _Digit.ComponentRegistryService) === null || _Digit$ComponentRegis === void 0 ? void 0 : _Digit$ComponentRegis.getComponent("ApplicationDetails");
7935
7987
  const WTCreate = (_Digit2 = Digit) === null || _Digit2 === void 0 ? void 0 : (_Digit2$ComponentRegi = _Digit2.ComponentRegistryService) === null || _Digit2$ComponentRegi === void 0 ? void 0 : _Digit2$ComponentRegi.getComponent("WTCreate");
7988
+ const WTEmergencyFixedPointCreate = (_Digit3 = Digit) === null || _Digit3 === void 0 ? void 0 : (_Digit3$ComponentRegi = _Digit3.ComponentRegistryService) === null || _Digit3$ComponentRegi === void 0 ? void 0 : _Digit3$ComponentRegi.getComponent("WTEmergencyFixedPointCreate");
7936
7989
  return /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(AppContainer, null, /*#__PURE__*/React.createElement("div", {
7937
7990
  className: "ground-container employee-app-container form-container"
7938
7991
  }, /*#__PURE__*/React.createElement(ModuleHeader, {
@@ -7999,6 +8052,9 @@ const EmployeeApp = ({
7999
8052
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
8000
8053
  path: `${path}/tp/request-service`,
8001
8054
  component: WTCreate
8055
+ }), /*#__PURE__*/React.createElement(PrivateRoute, {
8056
+ path: `${path}/fixed-point/request-service`,
8057
+ component: WTEmergencyFixedPointCreate
8002
8058
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
8003
8059
  path: `${path}/fixed-point/booking-details/:id`,
8004
8060
  component: props => /*#__PURE__*/React.createElement(ApplicationDetails, Object.assign({}, props, {
@@ -24741,6 +24797,1143 @@ const MTCitizenCard = () => {
24741
24797
  return /*#__PURE__*/React.createElement(EmployeeModuleCard, propsForModuleCard);
24742
24798
  };
24743
24799
 
24800
+ const EmergencyFixedPointInfoPage$1 = ({
24801
+ t,
24802
+ onSelect,
24803
+ formData,
24804
+ config,
24805
+ userType
24806
+ }) => {
24807
+ var _formData$serviceType, _formData$serviceType2;
24808
+ const [existingDataSet, setExistingDataSet] = useState("");
24809
+ const [showModal, setShowModal] = useState(false);
24810
+ const [isExistingPopupRequired, setIsExistingPopupRequired] = useState(false);
24811
+ const moduleMap = {
24812
+ MobileToilet: "MT_MODULE",
24813
+ WT: "WT_MODULE",
24814
+ TREE_PRUNING: "TREE_PRUNING"
24815
+ };
24816
+ const code = formData === null || formData === void 0 ? void 0 : (_formData$serviceType = formData.serviceType) === null || _formData$serviceType === void 0 ? void 0 : (_formData$serviceType2 = _formData$serviceType.serviceType) === null || _formData$serviceType2 === void 0 ? void 0 : _formData$serviceType2.code;
24817
+ const moduleKey = moduleMap[code];
24818
+ const handleOpenModal = () => {
24819
+ isExistingPopupRequired ? setShowModal(true) : goNext();
24820
+ };
24821
+ const goNext = () => {
24822
+ const owner = formData.infodetails || {};
24823
+ const ownerStep = {
24824
+ ...owner,
24825
+ existingDataSet
24826
+ };
24827
+ onSelect(config.key, {
24828
+ ...formData[config.key],
24829
+ ...ownerStep
24830
+ });
24831
+ };
24832
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Card, {
24833
+ className: "search-form-wrapper",
24834
+ style: {
24835
+ flexDirection: "column",
24836
+ gap: "12px",
24837
+ justifyContent: "flex-start"
24838
+ }
24839
+ }, moduleKey && /*#__PURE__*/React.createElement(CardHeader, null, t(moduleKey)), /*#__PURE__*/React.createElement(CardHeader, null, t("WT_APPLICATION_CREATE_FIXED_POINT")), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", {
24840
+ className: "primaryColor"
24841
+ }, t("SV_DOC_REQ_SCREEN_SUB_HEADER")), /*#__PURE__*/React.createElement("p", {
24842
+ className: "primaryColor"
24843
+ }, t("SV_DOC_REQ_SCREEN_TEXT")), /*#__PURE__*/React.createElement("p", {
24844
+ className: "primaryColor"
24845
+ }, t("SV_DOC_REQ_SCREEN_SUB_TEXT"))), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(SubmitBar, {
24846
+ label: t("COMMON_NEXT"),
24847
+ onSubmit: handleOpenModal
24848
+ }))), showModal && /*#__PURE__*/React.createElement(BookingPopup, {
24849
+ t: t,
24850
+ closeModal: () => setShowModal(false),
24851
+ actionCancelOnSubmit: () => setShowModal(false),
24852
+ onSubmit: () => {
24853
+ goNext();
24854
+ setShowModal(false);
24855
+ },
24856
+ setExistingDataSet: setExistingDataSet
24857
+ }));
24858
+ };
24859
+
24860
+ const EmergencyFixedPointRequestDetails = ({
24861
+ t,
24862
+ config,
24863
+ onSelect,
24864
+ userType,
24865
+ formData
24866
+ }) => {
24867
+ var _formData$requestDeta, _formData$requestDeta2, _formData$requestDeta3, _formData$requestDeta4, _formData$requestDeta5, _formData$requestDeta6, _formData$requestDeta7, _formData$requestDeta8, _formData$requestDeta9;
24868
+ const user = Digit.UserService.getUser().info;
24869
+ let validation = {};
24870
+ const [tankerType, settankerType] = useState((formData === null || formData === void 0 ? void 0 : (_formData$requestDeta = formData.requestDetails) === null || _formData$requestDeta === void 0 ? void 0 : _formData$requestDeta.tankerType) || "");
24871
+ const [tankerQuantity, settankerQuantity] = useState((formData === null || formData === void 0 ? void 0 : (_formData$requestDeta2 = formData.requestDetails) === null || _formData$requestDeta2 === void 0 ? void 0 : _formData$requestDeta2.tankerQuantity) || {
24872
+ i18nKey: "1",
24873
+ code: "1",
24874
+ value: "1"
24875
+ });
24876
+ const [waterQuantity, setwaterQuantity] = useState((formData === null || formData === void 0 ? void 0 : (_formData$requestDeta3 = formData.requestDetails) === null || _formData$requestDeta3 === void 0 ? void 0 : _formData$requestDeta3.waterQuantity) || "");
24877
+ const [waterType, setWaterType] = useState((formData === null || formData === void 0 ? void 0 : (_formData$requestDeta4 = formData.requestDetails) === null || _formData$requestDeta4 === void 0 ? void 0 : _formData$requestDeta4.waterType) || "");
24878
+ const [deliveryDate, setdeliveryDate] = useState((formData === null || formData === void 0 ? void 0 : (_formData$requestDeta5 = formData.requestDetails) === null || _formData$requestDeta5 === void 0 ? void 0 : _formData$requestDeta5.deliveryDate) || "");
24879
+ const [description, setdescription] = useState((formData === null || formData === void 0 ? void 0 : (_formData$requestDeta6 = formData.requestDetails) === null || _formData$requestDeta6 === void 0 ? void 0 : _formData$requestDeta6.description) || "");
24880
+ const [deliveryTime, setdeliveryTime] = useState((formData === null || formData === void 0 ? void 0 : (_formData$requestDeta7 = formData.requestDetails) === null || _formData$requestDeta7 === void 0 ? void 0 : _formData$requestDeta7.deliveryTime) || "");
24881
+ const [extraCharge, setextraCharge] = useState((formData === null || formData === void 0 ? void 0 : (_formData$requestDeta8 = formData.requestDetails) === null || _formData$requestDeta8 === void 0 ? void 0 : _formData$requestDeta8.extraCharge) || false);
24882
+ const [uploadedFile, setUploadedFile] = useState((formData === null || formData === void 0 ? void 0 : (_formData$requestDeta9 = formData.requestDetails) === null || _formData$requestDeta9 === void 0 ? void 0 : _formData$requestDeta9.fileStoreId) || null);
24883
+ const [file, setFile] = useState(null);
24884
+ const [error, setError] = useState(null);
24885
+ const tenantId = Digit.ULBService.getStateId();
24886
+ const inputStyles = {
24887
+ width: user.type === "EMPcommonConfigLOYEE" ? "100%" : "100%"
24888
+ };
24889
+ const {
24890
+ data: VehicleType
24891
+ } = Digit.Hooks.useCustomMDMS(tenantId, "request-service", [{
24892
+ name: "VehicleType"
24893
+ }], {
24894
+ select: data => {
24895
+ var _data$requestService;
24896
+ const formattedData = data === null || data === void 0 ? void 0 : (_data$requestService = data["request-service"]) === null || _data$requestService === void 0 ? void 0 : _data$requestService["VehicleType"];
24897
+ return formattedData;
24898
+ }
24899
+ });
24900
+ const {
24901
+ data: TankerType
24902
+ } = Digit.Hooks.useCustomMDMS(tenantId, "request-service", [{
24903
+ name: "TankerType"
24904
+ }], {
24905
+ select: data => {
24906
+ var _data$requestService2;
24907
+ const formattedData = data === null || data === void 0 ? void 0 : (_data$requestService2 = data["request-service"]) === null || _data$requestService2 === void 0 ? void 0 : _data$requestService2["TankerType"];
24908
+ return formattedData;
24909
+ }
24910
+ });
24911
+ const {
24912
+ data: TankerDetails
24913
+ } = Digit.Hooks.useCustomMDMS(tenantId, "request-service", [{
24914
+ name: "TankerQuantity"
24915
+ }], {
24916
+ select: data => {
24917
+ var _data$requestService3;
24918
+ const formattedData = data === null || data === void 0 ? void 0 : (_data$requestService3 = data["request-service"]) === null || _data$requestService3 === void 0 ? void 0 : _data$requestService3["TankerQuantity"];
24919
+ return formattedData;
24920
+ }
24921
+ });
24922
+ const {
24923
+ data: WaterTypeData
24924
+ } = Digit.Hooks.useCustomMDMS(tenantId, "Request-service", [{
24925
+ name: "WaterType"
24926
+ }], {
24927
+ select: data => {
24928
+ var _data$RequestService;
24929
+ const formattedData = data === null || data === void 0 ? void 0 : (_data$RequestService = data["Request-service"]) === null || _data$RequestService === void 0 ? void 0 : _data$RequestService["WaterType"];
24930
+ return formattedData;
24931
+ }
24932
+ });
24933
+ let Vehicle = [];
24934
+ let tankerDetails = [];
24935
+ let tankerTypeDetails = [];
24936
+ let WaterType = [];
24937
+ WaterTypeData && WaterTypeData.map(data => {
24938
+ WaterType.push({
24939
+ i18nKey: `${data.code}`,
24940
+ code: `${data.code}`,
24941
+ value: `${data.code}`
24942
+ });
24943
+ });
24944
+ TankerDetails && TankerDetails.map(data => {
24945
+ tankerDetails.push({
24946
+ i18nKey: `${data.code}`,
24947
+ code: `${data.code}`,
24948
+ value: `${data.code}`
24949
+ });
24950
+ });
24951
+ VehicleType && VehicleType.map(data => {
24952
+ Vehicle.push({
24953
+ i18nKey: `${data.capacity}`,
24954
+ code: `${data.capacity}`,
24955
+ value: `${data.capacity}`,
24956
+ vehicleType: data.vehicleType,
24957
+ capacityName: data.capacityName
24958
+ });
24959
+ });
24960
+ TankerType && TankerType.map(data => {
24961
+ tankerTypeDetails.push({
24962
+ i18nKey: `${data.i18nKey}`,
24963
+ code: `${data.code}`,
24964
+ value: `${data.value}`
24965
+ });
24966
+ });
24967
+ const VehicleDetails = Vehicle.map(data => {
24968
+ if (tankerType.code === data.vehicleType) {
24969
+ return {
24970
+ i18nKey: data.capacityName,
24971
+ code: data.code,
24972
+ value: data.capacityName
24973
+ };
24974
+ }
24975
+ }).filter(item => item !== undefined);
24976
+ const TimeInput = () => {
24977
+ return /*#__PURE__*/React.createElement("div", {
24978
+ className: "flex items-center"
24979
+ }, /*#__PURE__*/React.createElement(TextInput, {
24980
+ type: "time",
24981
+ value: deliveryTime,
24982
+ style: inputStyles,
24983
+ onChange: e => setdeliveryTime(e.target.value),
24984
+ min: "06:00",
24985
+ max: "23:59"
24986
+ }));
24987
+ };
24988
+ const setextrachargeHandler = () => {
24989
+ setextraCharge(!extraCharge);
24990
+ };
24991
+ function setDescription(e) {
24992
+ setdescription(e.target.value);
24993
+ }
24994
+ function setDeliveryDate(e) {
24995
+ setdeliveryDate(e.target.value);
24996
+ }
24997
+ function selectfile(e) {
24998
+ setUploadedFile(null);
24999
+ setFile(e.target.files[0]);
25000
+ }
25001
+ useEffect(() => {
25002
+ (async () => {
25003
+ setError(null);
25004
+ if (file) {
25005
+ if (file.size >= 2000000) {
25006
+ setError(t("WT_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));
25007
+ } else {
25008
+ try {
25009
+ var _response$data, _response$data$files;
25010
+ const response = await Digit.UploadServices.Filestorage("wt", file, Digit.ULBService.getStateId());
25011
+ if ((response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$files = _response$data.files) === null || _response$data$files === void 0 ? void 0 : _response$data$files.length) > 0) {
25012
+ var _response$data2, _response$data2$files;
25013
+ setUploadedFile(response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$files = _response$data2.files[0]) === null || _response$data2$files === void 0 ? void 0 : _response$data2$files.fileStoreId);
25014
+ } else {
25015
+ setError(t("WT_FILE_UPLOAD_ERROR"));
25016
+ }
25017
+ } catch (err) {
25018
+ setError(t("WT_FILE_UPLOAD_ERROR"));
25019
+ }
25020
+ }
25021
+ }
25022
+ })();
25023
+ }, [file]);
25024
+ const goNext = () => {
25025
+ let requestDetails = formData.requestDetails;
25026
+ let request = {
25027
+ ...requestDetails,
25028
+ tankerType,
25029
+ deliveryDate,
25030
+ tankerQuantity,
25031
+ waterType,
25032
+ waterQuantity,
25033
+ deliveryTime,
25034
+ description,
25035
+ extraCharge,
25036
+ fileStoreId: uploadedFile
25037
+ };
25038
+ onSelect(config.key, request, false);
25039
+ };
25040
+ useEffect(() => {
25041
+ if (!tankerType && tankerTypeDetails !== null && tankerTypeDetails !== void 0 && tankerTypeDetails.length) {
25042
+ settankerType(tankerTypeDetails[0]);
25043
+ }
25044
+ }, [tankerTypeDetails]);
25045
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FormStep, {
25046
+ config: config,
25047
+ onSelect: goNext,
25048
+ t: t,
25049
+ isDisabled: !tankerType || !deliveryDate || !tankerQuantity || !waterQuantity || !deliveryTime || !description || !waterType,
25050
+ className: "card-form-container"
25051
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WT_TANKER_TYPE")}`, " ", /*#__PURE__*/React.createElement("span", {
25052
+ className: "astericColor"
25053
+ }, "*")), /*#__PURE__*/React.createElement(RadioButtons, {
25054
+ t: t,
25055
+ options: tankerTypeDetails,
25056
+ style: {
25057
+ display: "flex",
25058
+ flexWrap: "wrap",
25059
+ maxHeight: "30px"
25060
+ },
25061
+ innerStyles: {
25062
+ minWidth: "24%"
25063
+ },
25064
+ optionsKey: "i18nKey",
25065
+ name: `tankerType`,
25066
+ value: tankerType,
25067
+ selectedOption: tankerType,
25068
+ onSelect: settankerType,
25069
+ labelKey: "i18nKey",
25070
+ isPTFlow: true
25071
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WT_WATER_TYPE")}`, " ", /*#__PURE__*/React.createElement("span", {
25072
+ className: "astericColor"
25073
+ }, "*")), /*#__PURE__*/React.createElement(Dropdown, {
25074
+ className: "form-field",
25075
+ selected: waterType,
25076
+ placeholder: t("WT_SELECT_WATER_TYPE"),
25077
+ select: setWaterType,
25078
+ option: WaterType,
25079
+ style: inputStyles,
25080
+ optionKey: "i18nKey",
25081
+ t: t
25082
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WT_WATER_QUANTITY")}`, " ", /*#__PURE__*/React.createElement("span", {
25083
+ className: "astericColor"
25084
+ }, "*")), /*#__PURE__*/React.createElement(Dropdown, {
25085
+ className: "form-field",
25086
+ selected: waterQuantity,
25087
+ placeholder: "Select Water Quantity",
25088
+ select: setwaterQuantity,
25089
+ option: VehicleDetails,
25090
+ style: inputStyles,
25091
+ optionKey: "i18nKey",
25092
+ t: t
25093
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WT_TANKER_QUANTITY")}`, " ", /*#__PURE__*/React.createElement("span", {
25094
+ className: "astericColor"
25095
+ }, "*")), /*#__PURE__*/React.createElement(Dropdown, {
25096
+ className: "form-field",
25097
+ selected: tankerQuantity,
25098
+ placeholder: "Select Tanker Quantity",
25099
+ select: settankerQuantity,
25100
+ option: tankerDetails,
25101
+ style: inputStyles,
25102
+ optionKey: "i18nKey",
25103
+ t: t
25104
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WT_DELIVERY_DATE")}`, " ", /*#__PURE__*/React.createElement("span", {
25105
+ className: "astericColor"
25106
+ }, "*")), /*#__PURE__*/React.createElement(TextInput, {
25107
+ t: t,
25108
+ type: "date",
25109
+ isMandatory: false,
25110
+ optionKey: "i18nKey",
25111
+ name: "deliveryDate",
25112
+ style: inputStyles,
25113
+ value: deliveryDate,
25114
+ onChange: setDeliveryDate,
25115
+ min: new Date().toISOString().split("T")[0],
25116
+ rules: {
25117
+ required: t("CORE_COMMON_REQUIRED_ERRMSG"),
25118
+ validDate: val => /^\d{4}-\d{2}-\d{2}$/.test(val) ? true : t("ERR_DEFAULT_INPUT_FIELD_MSG")
25119
+ }
25120
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WT_DELIVERY_TIME")}`, " ", /*#__PURE__*/React.createElement("span", {
25121
+ className: "astericColor"
25122
+ }, "*")), /*#__PURE__*/React.createElement(TimeInput, null)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WT_UPLOAD_DOCUMENT")}`), /*#__PURE__*/React.createElement(UploadFile, {
25123
+ id: "wt-doc",
25124
+ extraStyleName: "propertyCreate",
25125
+ accept: ".jpg,.png,.pdf,.jpeg",
25126
+ onUpload: selectfile,
25127
+ onDelete: () => {
25128
+ setUploadedFile(null);
25129
+ },
25130
+ message: uploadedFile ? `1 ${t(`WT_ACTION_FILEUPLOADED`)}` : t(`WT_ACTION_NO_FILEUPLOADED`),
25131
+ error: error
25132
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WT_DESCRIPTION")}`, " ", /*#__PURE__*/React.createElement("span", {
25133
+ className: "astericColor"
25134
+ }, "*")), /*#__PURE__*/React.createElement(TextArea, Object.assign({
25135
+ t: t,
25136
+ type: "text",
25137
+ isMandatory: false,
25138
+ optionKey: "i18nKey",
25139
+ name: "description",
25140
+ value: description,
25141
+ onChange: setDescription,
25142
+ style: inputStyles,
25143
+ ValidationRequired: true
25144
+ }, validation = {
25145
+ isRequired: true,
25146
+ pattern: "^[a-zA-Z ]+$",
25147
+ type: "tel",
25148
+ title: t("PT_NAME_ERROR_MESSAGE")
25149
+ }))), error ? /*#__PURE__*/React.createElement("div", {
25150
+ style: {
25151
+ height: "20px",
25152
+ width: "100%",
25153
+ fontSize: "20px",
25154
+ color: "red",
25155
+ marginTop: "5px"
25156
+ }
25157
+ }, error) : "", /*#__PURE__*/React.createElement(CheckBox, {
25158
+ label: t("WT_IMMEDIATE"),
25159
+ onChange: setextrachargeHandler,
25160
+ checked: extraCharge
25161
+ })));
25162
+ };
25163
+
25164
+ const ActionButton$1 = ({
25165
+ jumpTo
25166
+ }) => {
25167
+ const {
25168
+ t
25169
+ } = useTranslation();
25170
+ const history = useHistory();
25171
+ function routeTo() {
25172
+ history.push(jumpTo);
25173
+ }
25174
+ return /*#__PURE__*/React.createElement(LinkButton, {
25175
+ label: /*#__PURE__*/React.createElement(EditIcon, {
25176
+ style: {
25177
+ marginTop: "-30px",
25178
+ float: "right",
25179
+ position: "relative",
25180
+ bottom: "32px"
25181
+ }
25182
+ }),
25183
+ className: "check-page-link-button",
25184
+ onClick: routeTo
25185
+ });
25186
+ };
25187
+ const openFilePDF$1 = fileId => {
25188
+ Digit.UploadServices.Filefetch([fileId], Digit.ULBService.getStateId()).then(res => {
25189
+ var _res$data, _res$data$fileStoreId, _res$data$fileStoreId2;
25190
+ const concatenatedUrls = res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : (_res$data$fileStoreId = _res$data.fileStoreIds) === null || _res$data$fileStoreId === void 0 ? void 0 : (_res$data$fileStoreId2 = _res$data$fileStoreId[0]) === null || _res$data$fileStoreId2 === void 0 ? void 0 : _res$data$fileStoreId2.url;
25191
+ if (concatenatedUrls) {
25192
+ const urlArray = concatenatedUrls.split(",");
25193
+ const fileUrl = urlArray[0];
25194
+ if (fileUrl) {
25195
+ window.open(fileUrl, "_blank");
25196
+ } else {
25197
+ console.error("No valid URL found to open!");
25198
+ }
25199
+ } else {
25200
+ console.error("URL is missing in the response!");
25201
+ }
25202
+ }).catch(error => {
25203
+ console.error("Error fetching file:", error);
25204
+ });
25205
+ };
25206
+ const WTEmergencyFixedPointCheckPage = ({
25207
+ onSubmit,
25208
+ value: _value = {}
25209
+ }) => {
25210
+ var _address$city, _address$city$city, _address$locality, _serviceType$serviceT, _requestDetails$tanke, _requestDetails$water, _requestDetails$tanke2, _requestDetails$water2, _serviceType$serviceT2, _toiletRequestDetails, _serviceType$serviceT3, _treePruningRequestDe;
25211
+ const {
25212
+ t
25213
+ } = useTranslation();
25214
+ const {
25215
+ pathname
25216
+ } = useLocation();
25217
+ const {
25218
+ owner,
25219
+ requestDetails,
25220
+ address,
25221
+ serviceType,
25222
+ toiletRequestDetails,
25223
+ treePruningRequestDetails
25224
+ } = _value;
25225
+ const [agree, setAgree] = useState(false);
25226
+ const immediateRequired = requestDetails !== null && requestDetails !== void 0 && requestDetails.extraCharge ? "YES" : "NO";
25227
+ const [fileUrl, setFileUrl] = useState(null);
25228
+ const baseUrl = pathname.includes("citizen") ? `${APPLICATION_PATH}/citizen/wt/fixed-point/request-service` : `${APPLICATION_PATH}/employee/wt/fixed-point/request-service`;
25229
+ const setdeclarationhandler = () => {
25230
+ setAgree(!agree);
25231
+ };
25232
+ React.useEffect(() => {
25233
+ if (requestDetails !== null && requestDetails !== void 0 && requestDetails.fileStoreId) {
25234
+ Digit.UploadServices.Filefetch([requestDetails === null || requestDetails === void 0 ? void 0 : requestDetails.fileStoreId], Digit.ULBService.getStateId()).then(res => {
25235
+ var _res$data2, _res$data2$fileStoreI, _res$data2$fileStoreI2, _res$data2$fileStoreI3;
25236
+ const url = res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : (_res$data2$fileStoreI = _res$data2.fileStoreIds) === null || _res$data2$fileStoreI === void 0 ? void 0 : (_res$data2$fileStoreI2 = _res$data2$fileStoreI[0]) === null || _res$data2$fileStoreI2 === void 0 ? void 0 : (_res$data2$fileStoreI3 = _res$data2$fileStoreI2.url) === null || _res$data2$fileStoreI3 === void 0 ? void 0 : _res$data2$fileStoreI3.split(",")[0];
25237
+ setFileUrl(url);
25238
+ });
25239
+ }
25240
+ }, [requestDetails === null || requestDetails === void 0 ? void 0 : requestDetails.fileStoreId]);
25241
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Card, {
25242
+ className: "overflow-y-scroll"
25243
+ }, /*#__PURE__*/React.createElement(CardHeader, null, t("WT_SUMMARY_PAGE")), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("ES_TITILE_OWNER_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, {
25244
+ style: {
25245
+ marginTop: "30px",
25246
+ marginBottom: "30px"
25247
+ }
25248
+ }, /*#__PURE__*/React.createElement(Row, {
25249
+ label: t("COMMON_APPLICANT_NAME"),
25250
+ text: `${t(checkForNA(owner === null || owner === void 0 ? void 0 : owner.applicantName))}`,
25251
+ actionButton: /*#__PURE__*/React.createElement(ActionButton$1, {
25252
+ jumpTo: `${baseUrl}/fp-applicant-details`
25253
+ })
25254
+ }), /*#__PURE__*/React.createElement(Row, {
25255
+ label: t("COMMON_MOBILE_NUMBER"),
25256
+ text: `${t(checkForNA(owner === null || owner === void 0 ? void 0 : owner.mobileNumber))}`
25257
+ }), /*#__PURE__*/React.createElement(Row, {
25258
+ label: t("COMMON_ALT_MOBILE_NUMBER"),
25259
+ text: `${t(checkForNA(owner === null || owner === void 0 ? void 0 : owner.alternateNumber))}`
25260
+ }), /*#__PURE__*/React.createElement(Row, {
25261
+ label: t("COMMON_EMAIL_ID"),
25262
+ text: `${t(checkForNA(owner === null || owner === void 0 ? void 0 : owner.emailId))}`
25263
+ })), /*#__PURE__*/React.createElement(CardSubHeader, null, t("ES_TITLE_ADDRESS_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, {
25264
+ style: {
25265
+ marginTop: "30px",
25266
+ marginBottom: "30px"
25267
+ }
25268
+ }, /*#__PURE__*/React.createElement(Row, {
25269
+ label: t("HOUSE_NO"),
25270
+ text: `${t(checkForNA(address === null || address === void 0 ? void 0 : address.houseNo))}`,
25271
+ actionButton: /*#__PURE__*/React.createElement(ActionButton$1, {
25272
+ jumpTo: `${baseUrl}/fp-address-details`
25273
+ })
25274
+ }), /*#__PURE__*/React.createElement(Row, {
25275
+ label: t("ADDRESS_LINE1"),
25276
+ text: `${t(checkForNA(address === null || address === void 0 ? void 0 : address.addressLine1))}`
25277
+ }), /*#__PURE__*/React.createElement(Row, {
25278
+ label: t("ADDRESS_LINE2"),
25279
+ text: `${t(checkForNA(address === null || address === void 0 ? void 0 : address.addressLine2))}`
25280
+ }), /*#__PURE__*/React.createElement(Row, {
25281
+ label: t("CITY"),
25282
+ text: `${t(checkForNA(address === null || address === void 0 ? void 0 : (_address$city = address.city) === null || _address$city === void 0 ? void 0 : (_address$city$city = _address$city.city) === null || _address$city$city === void 0 ? void 0 : _address$city$city.name))}`
25283
+ }), /*#__PURE__*/React.createElement(Row, {
25284
+ label: t("LOCALITY"),
25285
+ text: `${t(checkForNA(address === null || address === void 0 ? void 0 : (_address$locality = address.locality) === null || _address$locality === void 0 ? void 0 : _address$locality.i18nKey))}`
25286
+ }), /*#__PURE__*/React.createElement(Row, {
25287
+ label: t("PINCODE"),
25288
+ text: `${t(checkForNA(address === null || address === void 0 ? void 0 : address.pincode))}`
25289
+ }), /*#__PURE__*/React.createElement(Row, {
25290
+ label: t("LANDMARK"),
25291
+ text: `${t(checkForNA(address === null || address === void 0 ? void 0 : address.landmark))}`
25292
+ }), /*#__PURE__*/React.createElement(Row, {
25293
+ label: t("STREET_NAME"),
25294
+ text: `${t(checkForNA(address === null || address === void 0 ? void 0 : address.streetName))}`
25295
+ })), (serviceType === null || serviceType === void 0 ? void 0 : (_serviceType$serviceT = serviceType.serviceType) === null || _serviceType$serviceT === void 0 ? void 0 : _serviceType$serviceT.code) === "WT" && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("WT_REQUEST_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, {
25296
+ style: {
25297
+ marginTop: "30px",
25298
+ marginBottom: "30px"
25299
+ }
25300
+ }, /*#__PURE__*/React.createElement(Row, {
25301
+ label: t("WT_TANKER_TYPE"),
25302
+ text: `${t(checkForNA(requestDetails === null || requestDetails === void 0 ? void 0 : (_requestDetails$tanke = requestDetails.tankerType) === null || _requestDetails$tanke === void 0 ? void 0 : _requestDetails$tanke.value))}`,
25303
+ actionButton: /*#__PURE__*/React.createElement(ActionButton$1, {
25304
+ jumpTo: `${baseUrl}/fp-request-details`
25305
+ })
25306
+ }), /*#__PURE__*/React.createElement(Row, {
25307
+ label: t("WT_WATER_TYPE"),
25308
+ text: `${t(checkForNA(requestDetails === null || requestDetails === void 0 ? void 0 : (_requestDetails$water = requestDetails.waterType) === null || _requestDetails$water === void 0 ? void 0 : _requestDetails$water.code))}`
25309
+ }), /*#__PURE__*/React.createElement(Row, {
25310
+ label: t("WT_TANKER_QUANTITY"),
25311
+ text: `${t(checkForNA(requestDetails === null || requestDetails === void 0 ? void 0 : (_requestDetails$tanke2 = requestDetails.tankerQuantity) === null || _requestDetails$tanke2 === void 0 ? void 0 : _requestDetails$tanke2.code))}`
25312
+ }), /*#__PURE__*/React.createElement(Row, {
25313
+ label: t("WT_WATER_QUANTITY"),
25314
+ text: `${t(checkForNA(requestDetails === null || requestDetails === void 0 ? void 0 : (_requestDetails$water2 = requestDetails.waterQuantity) === null || _requestDetails$water2 === void 0 ? void 0 : _requestDetails$water2.value))}`
25315
+ }), /*#__PURE__*/React.createElement(Row, {
25316
+ label: t("WT_DELIVERY_DATE"),
25317
+ text: `${t(checkForNA(formatDate(requestDetails === null || requestDetails === void 0 ? void 0 : requestDetails.deliveryDate)))}`
25318
+ }), /*#__PURE__*/React.createElement(Row, {
25319
+ label: t("WT_DELIVERY_TIME"),
25320
+ text: `${checkForNA(convertTo12HourFormat(requestDetails === null || requestDetails === void 0 ? void 0 : requestDetails.deliveryTime))}`
25321
+ }), /*#__PURE__*/React.createElement(Row, {
25322
+ label: t("WT_DESCRIPTION"),
25323
+ text: `${t(checkForNA(requestDetails === null || requestDetails === void 0 ? void 0 : requestDetails.description))}`
25324
+ }), (requestDetails === null || requestDetails === void 0 ? void 0 : requestDetails.fileStoreId) && /*#__PURE__*/React.createElement(Row, {
25325
+ label: t("WT_UPLOAD_DOCUMENT"),
25326
+ text: /*#__PURE__*/React.createElement("span", {
25327
+ style: {
25328
+ display: "flex",
25329
+ alignItems: "center",
25330
+ gap: "8px",
25331
+ cursor: "pointer"
25332
+ },
25333
+ onClick: () => openFilePDF$1(requestDetails === null || requestDetails === void 0 ? void 0 : requestDetails.fileStoreId)
25334
+ }, /*#__PURE__*/React.createElement(GenericFileIcon, null))
25335
+ }), /*#__PURE__*/React.createElement(Row, {
25336
+ label: t("WT_IMMEDIATE"),
25337
+ text: `${t(checkForNA(immediateRequired))}`
25338
+ }))), (serviceType === null || serviceType === void 0 ? void 0 : (_serviceType$serviceT2 = serviceType.serviceType) === null || _serviceType$serviceT2 === void 0 ? void 0 : _serviceType$serviceT2.code) === "MobileToilet" && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("ES_REQUEST_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, {
25339
+ style: {
25340
+ marginTop: "30px",
25341
+ marginBottom: "30px"
25342
+ }
25343
+ }, /*#__PURE__*/React.createElement(Row, {
25344
+ label: t("MT_NUMBER_OF_MOBILE_TOILETS"),
25345
+ text: `${t(checkForNA(toiletRequestDetails === null || toiletRequestDetails === void 0 ? void 0 : (_toiletRequestDetails = toiletRequestDetails.mobileToilet) === null || _toiletRequestDetails === void 0 ? void 0 : _toiletRequestDetails.code))}`,
25346
+ actionButton: /*#__PURE__*/React.createElement(ActionButton$1, {
25347
+ jumpTo: `${baseUrl}/fp-request-details`
25348
+ })
25349
+ }), /*#__PURE__*/React.createElement(Row, {
25350
+ label: t("MT_DELIVERY_FROM_DATE"),
25351
+ text: `${t(checkForNA(formatDate(toiletRequestDetails === null || toiletRequestDetails === void 0 ? void 0 : toiletRequestDetails.deliveryfromDate)))}`
25352
+ }), /*#__PURE__*/React.createElement(Row, {
25353
+ label: t("MT_DELIVERY_TO_DATE"),
25354
+ text: `${t(formatDate(checkForNA(toiletRequestDetails === null || toiletRequestDetails === void 0 ? void 0 : toiletRequestDetails.deliverytoDate)))}`
25355
+ }), /*#__PURE__*/React.createElement(Row, {
25356
+ label: t("MT_REQUIREMNENT_FROM_TIME"),
25357
+ text: checkForNA(convertTo12HourFormat(toiletRequestDetails === null || toiletRequestDetails === void 0 ? void 0 : toiletRequestDetails.deliveryfromTime))
25358
+ }), /*#__PURE__*/React.createElement(Row, {
25359
+ label: t("MT_REQUIREMNENT_TO_TIME"),
25360
+ text: checkForNA(convertTo12HourFormat(toiletRequestDetails === null || toiletRequestDetails === void 0 ? void 0 : toiletRequestDetails.deliverytoTime))
25361
+ }), /*#__PURE__*/React.createElement(Row, {
25362
+ label: t("MT_SPECIAL_REQUEST"),
25363
+ text: `${t(checkForNA(toiletRequestDetails === null || toiletRequestDetails === void 0 ? void 0 : toiletRequestDetails.specialRequest))}`
25364
+ }))), (serviceType === null || serviceType === void 0 ? void 0 : (_serviceType$serviceT3 = serviceType.serviceType) === null || _serviceType$serviceT3 === void 0 ? void 0 : _serviceType$serviceT3.code) === "TREE_PRUNING" && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("TP_REQUEST_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, {
25365
+ style: {
25366
+ marginTop: "30px",
25367
+ marginBottom: "30px"
25368
+ }
25369
+ }, /*#__PURE__*/React.createElement(Row, {
25370
+ label: t("REASON_FOR_PRUNING"),
25371
+ text: `${t(checkForNA(treePruningRequestDetails === null || treePruningRequestDetails === void 0 ? void 0 : (_treePruningRequestDe = treePruningRequestDetails.reasonOfPruning) === null || _treePruningRequestDe === void 0 ? void 0 : _treePruningRequestDe.code))}`,
25372
+ actionButton: /*#__PURE__*/React.createElement(ActionButton$1, {
25373
+ jumpTo: `${baseUrl}/fp-request-details`
25374
+ })
25375
+ }), /*#__PURE__*/React.createElement(Row, {
25376
+ label: t("LOCATION_GEOTAG"),
25377
+ text: `${t(checkForNA(treePruningRequestDetails === null || treePruningRequestDetails === void 0 ? void 0 : treePruningRequestDetails.geoTagLocation))}`
25378
+ }), /*#__PURE__*/React.createElement(Row, {
25379
+ label: t("UPLOAD_THE_SITE_PHOTOGRAPH"),
25380
+ text: /*#__PURE__*/React.createElement("span", {
25381
+ style: {
25382
+ display: "flex",
25383
+ alignItems: "center",
25384
+ gap: "8px",
25385
+ cursor: "pointer"
25386
+ },
25387
+ onClick: () => openFilePDF$1(treePruningRequestDetails === null || treePruningRequestDetails === void 0 ? void 0 : treePruningRequestDetails.supportingDocumentFile)
25388
+ }, /*#__PURE__*/React.createElement(GenericFileIcon, null))
25389
+ }))), /*#__PURE__*/React.createElement(CheckBox, {
25390
+ label: t("FINAL_DECLARATION_MESSAGE"),
25391
+ onChange: setdeclarationhandler,
25392
+ checked: agree
25393
+ })), /*#__PURE__*/React.createElement(SubmitBar, {
25394
+ label: t("COMMON_BUTTON_SUBMIT"),
25395
+ onSubmit: onSubmit,
25396
+ disabled: !agree
25397
+ })));
25398
+ };
25399
+
25400
+ const GetActionMessage$3 = props => {
25401
+ const {
25402
+ t
25403
+ } = useTranslation();
25404
+ if (props.isSuccess) {
25405
+ return t("WT_SUBMIT_SUCCESSFULL");
25406
+ } else if (props.isLoading) {
25407
+ return t("WT_APPLICATION_PENDING");
25408
+ } else if (!props.isSuccess) return t("WT_APPLICATION_FAILED");
25409
+ };
25410
+ const rowContainerStyle$3 = {
25411
+ padding: "4px 0px",
25412
+ justifyContent: "space-between"
25413
+ };
25414
+ const BannerPicker$3 = props => {
25415
+ var _props$data, _props$data$waterTank;
25416
+ return /*#__PURE__*/React.createElement(Banner, {
25417
+ message: GetActionMessage$3(props),
25418
+ applicationNumber: (_props$data = props.data) === null || _props$data === void 0 ? void 0 : (_props$data$waterTank = _props$data.waterTankerBookingDetail) === null || _props$data$waterTank === void 0 ? void 0 : _props$data$waterTank.bookingNo,
25419
+ info: props.isSuccess ? props.t("WT_BOOKING_NO") : "",
25420
+ successful: props.isSuccess,
25421
+ style: {
25422
+ width: "100%"
25423
+ }
25424
+ });
25425
+ };
25426
+ const WTEmergencyFixedPointAcknowledgement = ({
25427
+ data,
25428
+ onSuccess
25429
+ }) => {
25430
+ const {
25431
+ t
25432
+ } = useTranslation();
25433
+ const tenantId = Digit.ULBService.getCitizenCurrentTenant(true) || Digit.ULBService.getCurrentTenantId();
25434
+ const mutation = Digit.Hooks.wt.useTankerCreateAPI(tenantId);
25435
+ const user = Digit.UserService.getUser().info;
25436
+ const {
25437
+ data: storeData
25438
+ } = Digit.Hooks.useStore.getInitData();
25439
+ const {
25440
+ tenants
25441
+ } = storeData || {};
25442
+ const {
25443
+ isLoading,
25444
+ data: workflow
25445
+ } = Digit.Hooks.useWorkflowDetails({
25446
+ tenantId: tenantId,
25447
+ moduleCode: "watertanker-fixedpoint"
25448
+ });
25449
+ console.log(workflow, "wt");
25450
+ useEffect(() => {
25451
+ try {
25452
+ data.tenantId = tenantId;
25453
+ let formdata = EmergencyFixedPointInfoPage(data);
25454
+ mutation.mutate(formdata, {
25455
+ onSuccess
25456
+ });
25457
+ } catch (err) {}
25458
+ }, []);
25459
+ Digit.Hooks.useCustomBackNavigation({
25460
+ redirectPath: "${APPLICATION_PATH}/citizen"
25461
+ });
25462
+ const handleDownloadPdf = async () => {
25463
+ var _mutation$data;
25464
+ let waterTankerDetail = (_mutation$data = mutation.data) === null || _mutation$data === void 0 ? void 0 : _mutation$data.waterTankerBookingDetail;
25465
+ const tenantInfo = tenants.find(tenant => tenant.code === waterTankerDetail.tenantId);
25466
+ const data = await getWTAcknowledgementData({
25467
+ ...waterTankerDetail
25468
+ }, tenantInfo, t);
25469
+ Digit.Utils.pdf.generate(data);
25470
+ };
25471
+ return mutation.isLoading || mutation.isIdle ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement(Card, {
25472
+ className: "vehicle-details-card"
25473
+ }, /*#__PURE__*/React.createElement(BannerPicker$3, {
25474
+ t: t,
25475
+ data: mutation.data,
25476
+ isSuccess: mutation.isSuccess,
25477
+ isLoading: mutation.isIdle || mutation.isLoading
25478
+ }), /*#__PURE__*/React.createElement(StatusTable, null, mutation.isSuccess && /*#__PURE__*/React.createElement(Row, {
25479
+ rowContainerStyle: rowContainerStyle$3,
25480
+ last: true,
25481
+ textStyle: {
25482
+ whiteSpace: "pre",
25483
+ width: "60%"
25484
+ }
25485
+ })), mutation.isSuccess && /*#__PURE__*/React.createElement(SubmitBar, {
25486
+ label: t("WT_DOWNLOAD_ACKNOWLEDGEMENT"),
25487
+ onSubmit: handleDownloadPdf
25488
+ }), (user === null || user === void 0 ? void 0 : user.type) === "CITIZEN" ? /*#__PURE__*/React.createElement(Link, {
25489
+ to: `${APPLICATION_PATH}/citizen`
25490
+ }, /*#__PURE__*/React.createElement(LinkButton, {
25491
+ label: t("CORE_COMMON_GO_TO_HOME")
25492
+ })) : /*#__PURE__*/React.createElement(Link, {
25493
+ to: `${APPLICATION_PATH}/employee`
25494
+ }, /*#__PURE__*/React.createElement(LinkButton, {
25495
+ label: t("CORE_COMMON_GO_TO_HOME")
25496
+ })));
25497
+ };
25498
+
25499
+ const GetActionMessage$4 = props => {
25500
+ console.log("GetActionMessage", props);
25501
+ const {
25502
+ t
25503
+ } = useTranslation();
25504
+ if (props.isSuccess) {
25505
+ return t("MT_SUBMIT_SUCCESSFULL");
25506
+ } else if (props.isLoading) {
25507
+ return t("MT_APPLICATION_PENDING");
25508
+ } else if (!props.isSuccess) return t("MT_APPLICATION_FAILED");
25509
+ };
25510
+ const rowContainerStyle$4 = {
25511
+ padding: "4px 0px",
25512
+ justifyContent: "space-between"
25513
+ };
25514
+ const BannerPicker$4 = props => {
25515
+ var _props$data, _props$data$mobileToi;
25516
+ console.log("BannerPicker", props);
25517
+ return /*#__PURE__*/React.createElement(Banner, {
25518
+ message: GetActionMessage$4(props),
25519
+ applicationNumber: (_props$data = props.data) === null || _props$data === void 0 ? void 0 : (_props$data$mobileToi = _props$data.mobileToiletBookingDetail) === null || _props$data$mobileToi === void 0 ? void 0 : _props$data$mobileToi.bookingNo,
25520
+ info: props.isSuccess ? props.t("MT_BOOKING_NO") : "",
25521
+ successful: props.isSuccess,
25522
+ style: {
25523
+ width: "100%"
25524
+ }
25525
+ });
25526
+ };
25527
+ const MTEmergencyFixedPointAcknowledgement = ({
25528
+ data,
25529
+ onSuccess
25530
+ }) => {
25531
+ const {
25532
+ t
25533
+ } = useTranslation();
25534
+ const tenantId = Digit.ULBService.getCitizenCurrentTenant(true) || Digit.ULBService.getCurrentTenantId();
25535
+ const mutation = Digit.Hooks.wt.useMobileToiletCreateAPI(tenantId);
25536
+ const user = Digit.UserService.getUser().info;
25537
+ const {
25538
+ data: storeData
25539
+ } = Digit.Hooks.useStore.getInitData();
25540
+ const {
25541
+ tenants
25542
+ } = storeData || {};
25543
+ useEffect(() => {
25544
+ try {
25545
+ data.tenantId = tenantId;
25546
+ let formdata = mobileToiletPayload(data);
25547
+ mutation.mutate(formdata, {
25548
+ onSuccess
25549
+ });
25550
+ } catch (err) {}
25551
+ }, []);
25552
+ Digit.Hooks.useCustomBackNavigation({
25553
+ redirectPath: '${APPLICATION_PATH}/citizen'
25554
+ });
25555
+ const handleDownloadPdf = async () => {
25556
+ var _mutation$data;
25557
+ let mobileToiletDetail = (_mutation$data = mutation.data) === null || _mutation$data === void 0 ? void 0 : _mutation$data.mobileToiletBookingDetail;
25558
+ const tenantInfo = tenants.find(tenant => tenant.code === mobileToiletDetail.tenantId);
25559
+ const data = await getMTAcknowledgementData({
25560
+ ...mobileToiletDetail
25561
+ }, tenantInfo, t);
25562
+ Digit.Utils.pdf.generate(data);
25563
+ };
25564
+ return mutation.isLoading || mutation.isIdle ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(BannerPicker$4, {
25565
+ t: t,
25566
+ data: mutation.data,
25567
+ isSuccess: mutation.isSuccess,
25568
+ isLoading: mutation.isIdle || mutation.isLoading
25569
+ }), /*#__PURE__*/React.createElement(StatusTable, null, mutation.isSuccess && /*#__PURE__*/React.createElement(Row, {
25570
+ rowContainerStyle: rowContainerStyle$4,
25571
+ last: true,
25572
+ textStyle: {
25573
+ whiteSpace: "pre",
25574
+ width: "60%"
25575
+ }
25576
+ })), mutation.isSuccess && /*#__PURE__*/React.createElement(SubmitBar, {
25577
+ label: t("MT_DOWNLOAD_ACKNOWLEDGEMENT"),
25578
+ onSubmit: handleDownloadPdf
25579
+ }), (user === null || user === void 0 ? void 0 : user.type) === "CITIZEN" ? /*#__PURE__*/React.createElement(Link, {
25580
+ to: `${APPLICATION_PATH}/citizen`
25581
+ }, /*#__PURE__*/React.createElement(LinkButton, {
25582
+ label: t("CORE_COMMON_GO_TO_HOME")
25583
+ })) : /*#__PURE__*/React.createElement(Link, {
25584
+ to: `${APPLICATION_PATH}/employee`
25585
+ }, /*#__PURE__*/React.createElement(LinkButton, {
25586
+ label: t("CORE_COMMON_GO_TO_HOME")
25587
+ })));
25588
+ };
25589
+
25590
+ const GetActionMessage$5 = props => {
25591
+ const {
25592
+ t
25593
+ } = useTranslation();
25594
+ if (props.isSuccess) {
25595
+ return t("TP_SUBMIT_SUCCESSFULL");
25596
+ } else if (props.isLoading) {
25597
+ return t("TP_APPLICATION_PENDING");
25598
+ } else if (!props.isSuccess) return t("TP_APPLICATION_FAILED");
25599
+ };
25600
+ const rowContainerStyle$5 = {
25601
+ padding: "4px 0px",
25602
+ justifyContent: "space-between"
25603
+ };
25604
+ const BannerPicker$5 = props => {
25605
+ var _props$data, _props$data$treePruni;
25606
+ console.log("BannerPicker", props);
25607
+ return /*#__PURE__*/React.createElement(Banner, {
25608
+ message: GetActionMessage$5(props),
25609
+ applicationNumber: (_props$data = props.data) === null || _props$data === void 0 ? void 0 : (_props$data$treePruni = _props$data.treePruningBookingDetail) === null || _props$data$treePruni === void 0 ? void 0 : _props$data$treePruni.bookingNo,
25610
+ info: props.isSuccess ? props.t("TP_BOOKING_NO") : "",
25611
+ successful: props.isSuccess,
25612
+ style: {
25613
+ width: "100%"
25614
+ }
25615
+ });
25616
+ };
25617
+ const EmergencyFixedPointTPAcknowledgement = ({
25618
+ data,
25619
+ onSuccess
25620
+ }) => {
25621
+ const {
25622
+ t
25623
+ } = useTranslation();
25624
+ const tenantId = Digit.ULBService.getCitizenCurrentTenant(true) || Digit.ULBService.getCurrentTenantId();
25625
+ const mutation = Digit.Hooks.wt.useTreePruningCreateAPI(tenantId);
25626
+ const user = Digit.UserService.getUser().info;
25627
+ const {
25628
+ data: storeData
25629
+ } = Digit.Hooks.useStore.getInitData();
25630
+ const {
25631
+ tenants
25632
+ } = storeData || {};
25633
+ useEffect(() => {
25634
+ try {
25635
+ data.tenantId = tenantId;
25636
+ let formdata = treePruningPayload(data);
25637
+ mutation.mutate(formdata, {
25638
+ onSuccess
25639
+ });
25640
+ } catch (err) {}
25641
+ }, []);
25642
+ Digit.Hooks.useCustomBackNavigation({
25643
+ redirectPath: '${APPLICATION_PATH}/citizen'
25644
+ });
25645
+ const handleDownloadPdf = async () => {
25646
+ var _mutation$data;
25647
+ let treePruningDetail = (_mutation$data = mutation.data) === null || _mutation$data === void 0 ? void 0 : _mutation$data.treePruningBookingDetail;
25648
+ const tenantInfo = tenants.find(tenant => tenant.code === treePruningDetail.tenantId);
25649
+ const data = await getTPAcknowledgementData({
25650
+ ...treePruningDetail
25651
+ }, tenantInfo, t);
25652
+ Digit.Utils.pdf.generate(data);
25653
+ };
25654
+ return mutation.isLoading || mutation.isIdle ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(BannerPicker$5, {
25655
+ t: t,
25656
+ data: mutation.data,
25657
+ isSuccess: mutation.isSuccess,
25658
+ isLoading: mutation.isIdle || mutation.isLoading
25659
+ }), /*#__PURE__*/React.createElement(StatusTable, null, mutation.isSuccess && /*#__PURE__*/React.createElement(Row, {
25660
+ rowContainerStyle: rowContainerStyle$5,
25661
+ last: true,
25662
+ textStyle: {
25663
+ whiteSpace: "pre",
25664
+ width: "60%"
25665
+ }
25666
+ })), mutation.isSuccess && /*#__PURE__*/React.createElement(SubmitBar, {
25667
+ label: t("TP_DOWNLOAD_ACKNOWLEDGEMENT"),
25668
+ onSubmit: handleDownloadPdf
25669
+ }), (user === null || user === void 0 ? void 0 : user.type) === "CITIZEN" ? /*#__PURE__*/React.createElement(Link, {
25670
+ to: `${APPLICATION_PATH}/citizen`
25671
+ }, /*#__PURE__*/React.createElement(LinkButton, {
25672
+ label: t("CORE_COMMON_GO_TO_HOME")
25673
+ })) : /*#__PURE__*/React.createElement(Link, {
25674
+ to: `${APPLICATION_PATH}/employee`
25675
+ }, /*#__PURE__*/React.createElement(LinkButton, {
25676
+ label: t("CORE_COMMON_GO_TO_HOME")
25677
+ })));
25678
+ };
25679
+
25680
+ const fixedPointConfig = [{
25681
+ head: "FP_INFO",
25682
+ body: [{
25683
+ route: "fp-info",
25684
+ component: "EmergencyFixedPointInfoPage",
25685
+ nextStep: "fp-applicant-details",
25686
+ key: "fpInfoDetails"
25687
+ }]
25688
+ }, {
25689
+ head: "ES_TITILE_OWNER_DETAILS",
25690
+ body: [{
25691
+ route: "fp-applicant-details",
25692
+ component: "ApplicantDetails",
25693
+ withoutLabel: true,
25694
+ key: "owner",
25695
+ type: "component",
25696
+ nextStep: "fp-address-details",
25697
+ isMandatory: true,
25698
+ texts: {
25699
+ submitBarLabel: "COMMON_SAVE_NEXT",
25700
+ header: "ES_APPLICANT_DETAILS"
25701
+ },
25702
+ timeLine: [{
25703
+ currentStep: 1,
25704
+ actions: "ES_APPLICANT_DETAILS"
25705
+ }]
25706
+ }]
25707
+ }, {
25708
+ head: "ES_TITLE_ADDRESS_DETAILS",
25709
+ body: [{
25710
+ route: "fp-address-details",
25711
+ component: "AddressDetails",
25712
+ withoutLabel: true,
25713
+ key: "address",
25714
+ type: "component",
25715
+ isMandatory: true,
25716
+ nextStep: "fp-request-details",
25717
+ texts: {
25718
+ submitBarLabel: "COMMON_SAVE_NEXT",
25719
+ header: "ES_ADDRESS_DETAILS"
25720
+ },
25721
+ timeLine: [{
25722
+ currentStep: 2,
25723
+ actions: "ES_ADDRESS_DETAILS"
25724
+ }]
25725
+ }]
25726
+ }, {
25727
+ head: "FP_REQUEST_DETAILS",
25728
+ body: [{
25729
+ route: "fp-request-details",
25730
+ component: "EmergencyFixedPointRequestDetails",
25731
+ withoutLabel: true,
25732
+ key: "requestDetails",
25733
+ type: "component",
25734
+ isMandatory: true,
25735
+ nextStep: null,
25736
+ texts: {
25737
+ submitBarLabel: "COMMON_SAVE_NEXT",
25738
+ header: "FP_REQUEST_DETAILS"
25739
+ },
25740
+ timeLine: [{
25741
+ currentStep: 3,
25742
+ actions: "FP_REQUEST_DETAILS"
25743
+ }]
25744
+ }]
25745
+ }];
25746
+
25747
+ const WTEmergencyFixedPointCreate = () => {
25748
+ var _userInfo$info, _Digit, _Digit$ComponentRegis, _Digit2, _Digit2$ComponentRegi;
25749
+ const queryClient = useQueryClient();
25750
+ const match = useRouteMatch();
25751
+ const {
25752
+ t
25753
+ } = useTranslation();
25754
+ const {
25755
+ pathname
25756
+ } = useLocation();
25757
+ const history = useHistory();
25758
+ const [params, setParams, clearParams] = Digit.Hooks.useSessionStorage("FP_Create", {});
25759
+ const userInfo = Digit.UserService.getUser();
25760
+ const tenantId = Digit.ULBService.getCurrentTenantId();
25761
+ const uuid = userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info = userInfo.info) === null || _userInfo$info === void 0 ? void 0 : _userInfo$info.uuid;
25762
+ const {
25763
+ data: userDetails
25764
+ } = Digit.Hooks.useUserSearch(tenantId, {
25765
+ uuid: [uuid]
25766
+ }, {}, {
25767
+ enabled: uuid ? true : false
25768
+ });
25769
+ let config = [];
25770
+ fixedPointConfig.forEach(obj => {
25771
+ config = config.concat(obj.body);
25772
+ });
25773
+ config.indexRoute = "fp-info";
25774
+ if (params && Object.keys(params).length > 0 && window.location.href.includes("/fp-info") && sessionStorage.getItem("docReqScreenByBack") !== "true") {
25775
+ clearParams();
25776
+ queryClient.invalidateQueries("FP_Create");
25777
+ }
25778
+ const goNext = (skipStep, index, isAddMultiple, key) => {
25779
+ let currentPath = pathname.split("/").pop();
25780
+ let isMultiple = false;
25781
+ let nextPage;
25782
+ const lastchar = currentPath.charAt(currentPath.length - 1);
25783
+ if (Number(parseInt(currentPath)) || currentPath === "0" || currentPath === "-1") {
25784
+ if (currentPath === "-1" || currentPath === "-2") {
25785
+ currentPath = pathname.slice(0, -3).split("/").pop();
25786
+ } else {
25787
+ currentPath = pathname.slice(0, -2).split("/").pop();
25788
+ }
25789
+ isMultiple = true;
25790
+ } else {
25791
+ isMultiple = false;
25792
+ }
25793
+ if (!isNaN(lastchar)) isMultiple = true;
25794
+ let routeObj = config.find(r => key ? r.key === key : r.route === currentPath);
25795
+ if (!routeObj) routeObj = config.find(r => r.route === currentPath);
25796
+ let {
25797
+ nextStep = {}
25798
+ } = routeObj || {};
25799
+ let redirectWithHistory = skipStep ? history.replace : history.push;
25800
+ if (isAddMultiple) nextStep = key;
25801
+ if (nextStep === null) {
25802
+ return redirectWithHistory(`${match.path}/fp-check`);
25803
+ }
25804
+ if (!isNaN(nextStep.split("/").pop())) {
25805
+ nextPage = `${match.path}/${nextStep}`;
25806
+ } else {
25807
+ nextPage = isMultiple && nextStep !== "map" ? `${match.path}/${nextStep}/${index}` : `${match.path}/${nextStep}`;
25808
+ }
25809
+ redirectWithHistory(nextPage);
25810
+ };
25811
+ const wt_create = async () => {
25812
+ history.push(`${match.path}/fp-wt-acknowledgement`);
25813
+ };
25814
+ function handleSelect(key, data, skipStep, index, isAddMultiple = false) {
25815
+ if (key === "owners") {
25816
+ let owners = params.owners || [];
25817
+ owners[index] = data;
25818
+ setParams({
25819
+ ...params,
25820
+ [key]: [...owners]
25821
+ });
25822
+ } else if (key === "units") {
25823
+ setParams({
25824
+ ...params,
25825
+ units: data
25826
+ });
25827
+ } else {
25828
+ setParams({
25829
+ ...params,
25830
+ [key]: {
25831
+ ...params[key],
25832
+ ...data
25833
+ }
25834
+ });
25835
+ }
25836
+ goNext(skipStep, index, isAddMultiple, key);
25837
+ }
25838
+ const onSuccess = () => {
25839
+ clearParams();
25840
+ queryClient.invalidateQueries("FP_Create");
25841
+ };
25842
+ const formStepRoutes = ["fp-applicant-details", "fp-address-details", "fp-request-details"];
25843
+ const isFormStep = formStepRoutes.some(route => pathname.includes(route));
25844
+ const sectionRefs = useRef({});
25845
+ useEffect(() => {
25846
+ if (isFormStep) {
25847
+ const currentRoute = pathname.split("/").pop();
25848
+ if (sectionRefs.current[currentRoute]) {
25849
+ sectionRefs.current[currentRoute].scrollIntoView({
25850
+ behavior: "smooth",
25851
+ block: "start"
25852
+ });
25853
+ }
25854
+ }
25855
+ }, [pathname, isFormStep]);
25856
+ const CheckPage = (_Digit = Digit) === null || _Digit === void 0 ? void 0 : (_Digit$ComponentRegis = _Digit.ComponentRegistryService) === null || _Digit$ComponentRegis === void 0 ? void 0 : _Digit$ComponentRegis.getComponent("EmergencyFixedPointCheckPage");
25857
+ const WTAcknowledgement = (_Digit2 = Digit) === null || _Digit2 === void 0 ? void 0 : (_Digit2$ComponentRegi = _Digit2.ComponentRegistryService) === null || _Digit2$ComponentRegi === void 0 ? void 0 : _Digit2$ComponentRegi.getComponent("WTEmergencyFixedPointAcknowledgement");
25858
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
25859
+ className: "employee-form-section-wrapper"
25860
+ }, !pathname.includes("/fp-info") && /*#__PURE__*/React.createElement(VerticalTimeline, {
25861
+ config: config,
25862
+ showFinalStep: true
25863
+ }), /*#__PURE__*/React.createElement("div", {
25864
+ className: "employee-form-section"
25865
+ }, /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(Route, {
25866
+ path: `${match.path}/fp-check`
25867
+ }, /*#__PURE__*/React.createElement(CheckPage, {
25868
+ onSubmit: wt_create,
25869
+ value: params
25870
+ })), /*#__PURE__*/React.createElement(Route, {
25871
+ path: `${match.path}/fp-wt-acknowledgement`
25872
+ }, /*#__PURE__*/React.createElement(WTAcknowledgement, {
25873
+ data: params,
25874
+ onSuccess: onSuccess
25875
+ })), config.map((routeObj, index) => {
25876
+ if (!formStepRoutes.includes(routeObj.route)) {
25877
+ var _userDetails$user;
25878
+ const {
25879
+ component,
25880
+ texts,
25881
+ inputs,
25882
+ key,
25883
+ additionaFields
25884
+ } = routeObj;
25885
+ const Component = typeof component === "string" ? Digit.ComponentRegistryService.getComponent(component) : component;
25886
+ return /*#__PURE__*/React.createElement(Route, {
25887
+ path: `${match.path}/${routeObj.route}`,
25888
+ key: index
25889
+ }, /*#__PURE__*/React.createElement(Component, {
25890
+ config: {
25891
+ texts,
25892
+ inputs,
25893
+ key,
25894
+ additionaFields
25895
+ },
25896
+ onSelect: handleSelect,
25897
+ t: t,
25898
+ formData: params,
25899
+ userDetails: userDetails === null || userDetails === void 0 ? void 0 : (_userDetails$user = userDetails.user) === null || _userDetails$user === void 0 ? void 0 : _userDetails$user[0]
25900
+ }));
25901
+ }
25902
+ return null;
25903
+ }), /*#__PURE__*/React.createElement(Route, {
25904
+ path: formStepRoutes.map(route => `${match.path}/${route}`)
25905
+ }, /*#__PURE__*/React.createElement("div", {
25906
+ className: "single-page-form-container"
25907
+ }, config.filter(routeObj => formStepRoutes.includes(routeObj.route)).map((routeObj, index) => {
25908
+ var _userDetails$user2;
25909
+ const {
25910
+ component,
25911
+ texts,
25912
+ inputs,
25913
+ key,
25914
+ additionaFields
25915
+ } = routeObj;
25916
+ const Component = typeof component === "string" ? Digit.ComponentRegistryService.getComponent(component) : component;
25917
+ return /*#__PURE__*/React.createElement("div", {
25918
+ key: index,
25919
+ ref: el => sectionRefs.current[routeObj.route] = el,
25920
+ className: "form-section-unit"
25921
+ }, /*#__PURE__*/React.createElement(Component, {
25922
+ config: {
25923
+ ...routeObj,
25924
+ isCollapsible: true,
25925
+ defaultOpen: true
25926
+ },
25927
+ onSelect: handleSelect,
25928
+ t: t,
25929
+ formData: params,
25930
+ userDetails: userDetails === null || userDetails === void 0 ? void 0 : (_userDetails$user2 = userDetails.user) === null || _userDetails$user2 === void 0 ? void 0 : _userDetails$user2[0]
25931
+ }));
25932
+ }))), /*#__PURE__*/React.createElement(Route, null, /*#__PURE__*/React.createElement(Redirect, {
25933
+ to: `${match.path}/${config.indexRoute}`
25934
+ }))))));
25935
+ };
25936
+
24744
25937
  const WTModule = ({
24745
25938
  stateCode,
24746
25939
  userType,
@@ -24842,7 +26035,14 @@ const componentsToRegister = {
24842
26035
  AddFixPointAddress,
24843
26036
  AddFillingPointMetaData,
24844
26037
  WTSearchPointAddress: SearchFillingPointAddress,
24845
- VendorAssign
26038
+ VendorAssign,
26039
+ EmergencyFixedPointInfoPage: EmergencyFixedPointInfoPage$1,
26040
+ EmergencyFixedPointRequestDetails,
26041
+ EmergencyFixedPointCheckPage: WTEmergencyFixedPointCheckPage,
26042
+ WTEmergencyFixedPointAcknowledgement,
26043
+ MTEmergencyFixedPointAcknowledgement,
26044
+ EmergencyFixedPointTPAcknowledgement,
26045
+ WTEmergencyFixedPointCreate
24846
26046
  };
24847
26047
  const initWTComponents = () => {
24848
26048
  Object.entries(componentsToRegister).forEach(([key, value]) => {