@mseva/upyog-ui-module-ads 1.1.67 → 1.1.68

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.
@@ -40,12 +40,10 @@ function normalizeDate(d) {
40
40
  const validateSchedule = ({
41
41
  startDate,
42
42
  endDate,
43
- startTime,
44
- endTime,
45
43
  scheduleType
46
44
  }) => {
47
- if (!startDate || !endDate || !startTime || !endTime) {
48
- return "Start and end date/time are required.";
45
+ if (!startDate || !endDate) {
46
+ return "Start and end date are required.";
49
47
  }
50
48
  const start = normalizeDate(new Date(startDate));
51
49
  const end = normalizeDate(new Date(endDate));
@@ -24118,17 +24116,60 @@ const ADSCitizenDetailsNew = ({
24118
24116
  pincode: ""
24119
24117
  }
24120
24118
  });
24119
+ const debounce = (func, delay) => {
24120
+ let timer;
24121
+ return (...args) => {
24122
+ clearTimeout(timer);
24123
+ timer = setTimeout(() => func(...args), delay);
24124
+ };
24125
+ };
24126
+ const handleMobileChange = async value => {
24127
+ if (!value || value.length < 10) return;
24128
+ setIsLoading(true);
24129
+ try {
24130
+ var _userData$user;
24131
+ const userData = await Digit.UserService.userSearch(tenantId, {
24132
+ userName: value,
24133
+ mobileNumber: value,
24134
+ userType: "CITIZEN"
24135
+ }, {});
24136
+ const user = (userData === null || userData === void 0 ? void 0 : (_userData$user = userData.user) === null || _userData$user === void 0 ? void 0 : _userData$user[0]) || {};
24137
+ if (user !== null && user !== void 0 && user.name) {
24138
+ setValue("name", user.name || "", {
24139
+ shouldValidate: true
24140
+ });
24141
+ setValue("emailId", user.emailId || "", {
24142
+ shouldValidate: true
24143
+ });
24144
+ setValue("address", user.permanentAddress || (user === null || user === void 0 ? void 0 : user.correspondenceAddress) || "", {
24145
+ shouldValidate: true
24146
+ });
24147
+ setValue("pincode", user.permanentPinCode || (user === null || user === void 0 ? void 0 : user.correspondencePinCode) || "", {
24148
+ shouldValidate: true
24149
+ });
24150
+ }
24151
+ } catch (error) {
24152
+ console.error(error);
24153
+ } finally {
24154
+ setIsLoading(false);
24155
+ }
24156
+ };
24157
+ const debouncedHandleMobileChange = React.useCallback(debounce(handleMobileChange, 600), []);
24121
24158
  useEffect(() => {
24122
- if (currentStepData !== null && currentStepData !== void 0 && currentStepData.CreatedResponse) {
24123
- const created = currentStepData === null || currentStepData === void 0 ? void 0 : currentStepData.CreatedResponse;
24159
+ var _currentStepData$owne, _currentStepData$owne2;
24160
+ if (currentStepData !== null && currentStepData !== void 0 && (_currentStepData$owne = currentStepData.ownerDetails) !== null && _currentStepData$owne !== void 0 && _currentStepData$owne.applicantDetail && currentStepData !== null && currentStepData !== void 0 && (_currentStepData$owne2 = currentStepData.ownerDetails) !== null && _currentStepData$owne2 !== void 0 && _currentStepData$owne2.address || currentStepData !== null && currentStepData !== void 0 && currentStepData.CreatedResponse) {
24161
+ var _currentStepData$owne3;
24162
+ const created = currentStepData !== null && currentStepData !== void 0 && (_currentStepData$owne3 = currentStepData.ownerDetails) !== null && _currentStepData$owne3 !== void 0 && _currentStepData$owne3.applicantDetail ? currentStepData === null || currentStepData === void 0 ? void 0 : currentStepData.ownerDetails : currentStepData === null || currentStepData === void 0 ? void 0 : currentStepData.CreatedResponse;
24124
24163
  if (created !== null && created !== void 0 && created.address) {
24125
- setValue("address", created.address.addressLine1 || "");
24126
- setValue("pincode", created.address.pincode || "");
24164
+ var _currentStepData$owne4, _currentStepData$owne5, _currentStepData$owne6, _currentStepData$owne7;
24165
+ setValue("address", (currentStepData === null || currentStepData === void 0 ? void 0 : (_currentStepData$owne4 = currentStepData.ownerDetails) === null || _currentStepData$owne4 === void 0 ? void 0 : (_currentStepData$owne5 = _currentStepData$owne4.address) === null || _currentStepData$owne5 === void 0 ? void 0 : _currentStepData$owne5.addressLine1) || created.address.addressLine1 || "");
24166
+ setValue("pincode", (currentStepData === null || currentStepData === void 0 ? void 0 : (_currentStepData$owne6 = currentStepData.ownerDetails) === null || _currentStepData$owne6 === void 0 ? void 0 : (_currentStepData$owne7 = _currentStepData$owne6.address) === null || _currentStepData$owne7 === void 0 ? void 0 : _currentStepData$owne7.pincode) || created.address.pincode || "");
24127
24167
  }
24128
24168
  if (created !== null && created !== void 0 && created.applicantDetail) {
24129
- setValue("name", created.applicantDetail.applicantName || "");
24130
- setValue("emailId", created.applicantDetail.applicantEmailId || "");
24131
- setValue("mobileNumber", created.applicantDetail.applicantMobileNo || "");
24169
+ var _currentStepData$owne8, _currentStepData$owne9, _currentStepData$owne0, _currentStepData$owne1, _currentStepData$owne10, _currentStepData$owne11;
24170
+ setValue("name", (currentStepData === null || currentStepData === void 0 ? void 0 : (_currentStepData$owne8 = currentStepData.ownerDetails) === null || _currentStepData$owne8 === void 0 ? void 0 : (_currentStepData$owne9 = _currentStepData$owne8.applicantDetail) === null || _currentStepData$owne9 === void 0 ? void 0 : _currentStepData$owne9.applicantName) || created.applicantDetail.applicantName || "");
24171
+ setValue("emailId", (currentStepData === null || currentStepData === void 0 ? void 0 : (_currentStepData$owne0 = currentStepData.ownerDetails) === null || _currentStepData$owne0 === void 0 ? void 0 : (_currentStepData$owne1 = _currentStepData$owne0.applicantDetail) === null || _currentStepData$owne1 === void 0 ? void 0 : _currentStepData$owne1.applicantEmailId) || created.applicantDetail.applicantEmailId || "");
24172
+ setValue("mobileNumber", (currentStepData === null || currentStepData === void 0 ? void 0 : (_currentStepData$owne10 = currentStepData.ownerDetails) === null || _currentStepData$owne10 === void 0 ? void 0 : (_currentStepData$owne11 = _currentStepData$owne10.applicantDetail) === null || _currentStepData$owne11 === void 0 ? void 0 : _currentStepData$owne11.applicantMobileNo) || created.applicantDetail.applicantMobileNo || "");
24132
24173
  }
24133
24174
  }
24134
24175
  }, [currentStepData, setValue]);
@@ -24233,9 +24274,6 @@ const ADSCitizenDetailsNew = ({
24233
24274
  marginTop: "-18px",
24234
24275
  color: "red"
24235
24276
  };
24236
- const mandatoryStyle = {
24237
- color: "red"
24238
- };
24239
24277
  return /*#__PURE__*/React.createElement("form", {
24240
24278
  className: "card",
24241
24279
  onSubmit: handleSubmit(onSubmit)
@@ -24243,10 +24281,41 @@ const ADSCitizenDetailsNew = ({
24243
24281
  style: {
24244
24282
  maxWidth: !isCitizen && "500px"
24245
24283
  }
24246
- }, /*#__PURE__*/React.createElement(CardLabel, {
24284
+ }, /*#__PURE__*/React.createElement(CardLabel, null, t("NOC_APPLICANT_MOBILE_NO_LABEL"), /*#__PURE__*/React.createElement("span", {
24285
+ className: "mandatory-asterisk"
24286
+ }, "*")), /*#__PURE__*/React.createElement(Controller, {
24287
+ control: control,
24288
+ name: "mobileNumber",
24289
+ rules: {
24290
+ required: t("PTR_MOBILE_REQUIRED"),
24291
+ minLength: {
24292
+ value: 10,
24293
+ message: "Enter at least 10 digits"
24294
+ },
24295
+ pattern: {
24296
+ value: /^[6-9]\d{9}$/,
24297
+ message: "Must start with 9, 8, 7, or 6 and be 10 digits long"
24298
+ }
24299
+ },
24300
+ render: ({
24301
+ value,
24302
+ onChange,
24303
+ onBlur
24304
+ }) => /*#__PURE__*/React.createElement(MobileNumber, {
24305
+ value: value,
24306
+ onChange: e => {
24307
+ onChange(e);
24308
+ if (!isCitizen) debouncedHandleMobileChange(e);
24309
+ },
24310
+ onBlur: onBlur,
24311
+ t: t
24312
+ })
24313
+ }), errors.mobileNumber && /*#__PURE__*/React.createElement(CardLabelError$1, {
24314
+ style: errorStyle
24315
+ }, errors.mobileNumber.message), /*#__PURE__*/React.createElement(CardLabel, {
24247
24316
  className: "card-label-smaller"
24248
24317
  }, `${t("ES_NEW_APPLICATION_APPLICANT_NAME")}`, " ", /*#__PURE__*/React.createElement("span", {
24249
- style: mandatoryStyle
24318
+ className: "mandatory-asterisk"
24250
24319
  }, "*"), " "), /*#__PURE__*/React.createElement(Controller, {
24251
24320
  control: control,
24252
24321
  name: "name",
@@ -24281,7 +24350,7 @@ const ADSCitizenDetailsNew = ({
24281
24350
  }), (errors === null || errors === void 0 ? void 0 : errors.name) && /*#__PURE__*/React.createElement(CardLabelError$1, {
24282
24351
  style: errorStyle
24283
24352
  }, errors === null || errors === void 0 ? void 0 : (_errors$name = errors.name) === null || _errors$name === void 0 ? void 0 : _errors$name.message), /*#__PURE__*/React.createElement(CardLabel, null, t("NOC_APPLICANT_EMAIL_LABEL"), /*#__PURE__*/React.createElement("span", {
24284
- style: mandatoryStyle
24353
+ className: "mandatory-asterisk"
24285
24354
  }, "*")), /*#__PURE__*/React.createElement(Controller, {
24286
24355
  control: control,
24287
24356
  name: "emailId",
@@ -24304,40 +24373,12 @@ const ADSCitizenDetailsNew = ({
24304
24373
  })
24305
24374
  }), errors.emailId && /*#__PURE__*/React.createElement(CardLabelError$1, {
24306
24375
  style: errorStyle
24307
- }, errors.emailId.message), /*#__PURE__*/React.createElement(CardLabel, null, t("NOC_APPLICANT_MOBILE_NO_LABEL"), /*#__PURE__*/React.createElement("span", {
24308
- style: mandatoryStyle
24309
- }, "*")), /*#__PURE__*/React.createElement(Controller, {
24310
- control: control,
24311
- name: "mobileNumber",
24312
- rules: {
24313
- required: t("PTR_MOBILE_REQUIRED"),
24314
- minLength: {
24315
- value: 10,
24316
- message: "Enter at least 10 digits"
24317
- },
24318
- pattern: {
24319
- value: /^[6-9]\d{9}$/,
24320
- message: "Must start with 9, 8, 7, or 6 and be 10 digits long"
24321
- }
24322
- },
24323
- render: ({
24324
- value,
24325
- onChange,
24326
- onBlur
24327
- }) => /*#__PURE__*/React.createElement(MobileNumber, {
24328
- value: value,
24329
- onChange: onChange,
24330
- onBlur: onBlur,
24331
- t: t
24332
- })
24333
- }), errors.mobileNumber && /*#__PURE__*/React.createElement(CardLabelError$1, {
24334
- style: errorStyle
24335
- }, errors.mobileNumber.message), /*#__PURE__*/React.createElement(CardLabel, {
24376
+ }, errors.emailId.message), /*#__PURE__*/React.createElement(CardLabel, {
24336
24377
  className: "card-label-smaller"
24337
24378
  }, `${t("PT_COMMON_COL_ADDRESS")}`, /*#__PURE__*/React.createElement("span", {
24338
- style: mandatoryStyle
24379
+ className: "mandatory-asterisk"
24339
24380
  }, "*")), /*#__PURE__*/React.createElement("div", {
24340
- className: "field"
24381
+ className: "text-input"
24341
24382
  }, /*#__PURE__*/React.createElement(Controller, {
24342
24383
  control: control,
24343
24384
  name: "address",
@@ -24374,9 +24415,9 @@ const ADSCitizenDetailsNew = ({
24374
24415
  }, errors === null || errors === void 0 ? void 0 : (_errors$address = errors.address) === null || _errors$address === void 0 ? void 0 : _errors$address.message), /*#__PURE__*/React.createElement(CardLabel, {
24375
24416
  className: "card-label-smaller"
24376
24417
  }, `${t("CORE_COMMON_PINCODE")}`, /*#__PURE__*/React.createElement("span", {
24377
- style: mandatoryStyle
24418
+ className: "mandatory-asterisk"
24378
24419
  }, "*")), /*#__PURE__*/React.createElement("div", {
24379
- className: "field"
24420
+ className: "text-input"
24380
24421
  }, /*#__PURE__*/React.createElement(Controller, {
24381
24422
  control: control,
24382
24423
  name: "pincode",
@@ -24826,7 +24867,7 @@ const AdCard = ({
24826
24867
  justifyContent: "space-between",
24827
24868
  fontWeight: 600
24828
24869
  }
24829
- }, /*#__PURE__*/React.createElement("span", null, ad.name), /*#__PURE__*/React.createElement("span", {
24870
+ }, /*#__PURE__*/React.createElement("span", null, t(ad.name)), /*#__PURE__*/React.createElement("span", {
24830
24871
  style: {
24831
24872
  color: "#222"
24832
24873
  }
@@ -24835,28 +24876,32 @@ const AdCard = ({
24835
24876
  display: "flex",
24836
24877
  justifyContent: "space-between"
24837
24878
  }
24838
- }, /*#__PURE__*/React.createElement("span", null, ad === null || ad === void 0 ? void 0 : ad.locationCode), /*#__PURE__*/React.createElement("span", null, "Pole ", ad.poleNo)), /*#__PURE__*/React.createElement("div", {
24879
+ }, /*#__PURE__*/React.createElement("span", null, t(ad === null || ad === void 0 ? void 0 : ad.locationCode)), /*#__PURE__*/React.createElement("span", null, "Pole ", ad.poleNo)), /*#__PURE__*/React.createElement("div", {
24839
24880
  style: {
24840
24881
  display: "flex",
24841
24882
  justifyContent: "space-between"
24842
24883
  }
24843
- }, /*#__PURE__*/React.createElement("span", null, ad === null || ad === void 0 ? void 0 : ad.adType), /*#__PURE__*/React.createElement("span", {
24884
+ }, /*#__PURE__*/React.createElement("span", null, t(ad === null || ad === void 0 ? void 0 : ad.adType)), /*#__PURE__*/React.createElement("span", {
24844
24885
  style: {
24845
24886
  color: "green",
24846
24887
  fontWeight: 600
24847
24888
  }
24848
24889
  }, ad === null || ad === void 0 ? void 0 : ad.light))), /*#__PURE__*/React.createElement("div", {
24849
24890
  style: {
24850
- fontSize: 12,
24851
- color: "#666",
24852
- marginTop: 6
24891
+ display: "flex",
24892
+ gap: "4px",
24893
+ marginTop: "8px"
24853
24894
  }
24854
- }, t("ADS_START_DATE_TIME")), /*#__PURE__*/React.createElement("div", {
24895
+ }, /*#__PURE__*/React.createElement("div", {
24855
24896
  style: {
24856
- display: "flex",
24857
- gap: 8
24897
+ flex: 1
24858
24898
  }
24859
- }, /*#__PURE__*/React.createElement(Controller, {
24899
+ }, /*#__PURE__*/React.createElement("div", {
24900
+ style: {
24901
+ fontSize: 12,
24902
+ color: "#666"
24903
+ }
24904
+ }, t("ADS_START_DATE_TIME")), /*#__PURE__*/React.createElement(Controller, {
24860
24905
  control: control,
24861
24906
  name: `ads.${idx}.startDate`,
24862
24907
  render: props => /*#__PURE__*/React.createElement("input", {
@@ -24866,27 +24911,16 @@ const AdCard = ({
24866
24911
  onChange: e => props.onChange(e.target.value),
24867
24912
  className: "ads-card-input"
24868
24913
  })
24869
- }), /*#__PURE__*/React.createElement(Controller, {
24870
- control: control,
24871
- name: `ads.${idx}.startTime`,
24872
- render: props => /*#__PURE__*/React.createElement("input", {
24873
- type: "time",
24874
- value: props.value || "",
24875
- onChange: e => props.onChange(e.target.value),
24876
- className: "ads-input-time"
24877
- })
24878
24914
  })), /*#__PURE__*/React.createElement("div", {
24879
24915
  style: {
24880
- fontSize: 12,
24881
- color: "#666",
24882
- marginTop: 6
24916
+ flex: 1
24883
24917
  }
24884
- }, t("ADS_END_DATE_TIME")), /*#__PURE__*/React.createElement("div", {
24918
+ }, /*#__PURE__*/React.createElement("div", {
24885
24919
  style: {
24886
- display: "flex",
24887
- gap: 8
24920
+ fontSize: 12,
24921
+ color: "#666"
24888
24922
  }
24889
- }, /*#__PURE__*/React.createElement(Controller, {
24923
+ }, t("ADS_END_DATE_TIME")), /*#__PURE__*/React.createElement(Controller, {
24890
24924
  control: control,
24891
24925
  name: `ads.${idx}.endDate`,
24892
24926
  render: props => /*#__PURE__*/React.createElement("input", {
@@ -24896,16 +24930,7 @@ const AdCard = ({
24896
24930
  onChange: e => props.onChange(e.target.value),
24897
24931
  className: "ads-card-input"
24898
24932
  })
24899
- }), /*#__PURE__*/React.createElement(Controller, {
24900
- control: control,
24901
- name: `ads.${idx}.endTime`,
24902
- render: props => /*#__PURE__*/React.createElement("input", {
24903
- type: "time",
24904
- value: props.value || "",
24905
- onChange: e => props.onChange(e.target.value),
24906
- className: "ads-input-time"
24907
- })
24908
- })), /*#__PURE__*/React.createElement("div", {
24933
+ }))), /*#__PURE__*/React.createElement("div", {
24909
24934
  style: {
24910
24935
  display: "flex",
24911
24936
  gap: 8,
@@ -24915,9 +24940,7 @@ const AdCard = ({
24915
24940
  type: "button",
24916
24941
  onClick: () => _onViewAvailability(ad, {
24917
24942
  startDate: watch(`ads.${idx}.startDate`),
24918
- endDate: watch(`ads.${idx}.endDate`),
24919
- startTime: watch(`ads.${idx}.startTime`),
24920
- endTime: watch(`ads.${idx}.endTime`)
24943
+ endDate: watch(`ads.${idx}.endDate`)
24921
24944
  }),
24922
24945
  className: "ads-btn-primary"
24923
24946
  }, t("ADS_VIEW_AVAILABILITY"), "\uD83D\uDC41\uFE0F"), isAdded && /*#__PURE__*/React.createElement("button", {
@@ -25020,9 +25043,7 @@ const ADSCitizenSecond = ({
25020
25043
  useEffect(() => {
25021
25044
  const seeded = adsForLocation.map(() => ({
25022
25045
  startDate: "",
25023
- startTime: "",
25024
- endDate: "",
25025
- endTime: ""
25046
+ endDate: ""
25026
25047
  }));
25027
25048
  setValue("ads", seeded, {
25028
25049
  shouldValidate: false,
@@ -25037,15 +25058,11 @@ const ADSCitizenSecond = ({
25037
25058
  }, [showToast]);
25038
25059
  const handleViewAvailability = (ad, {
25039
25060
  startDate,
25040
- endDate,
25041
- startTime,
25042
- endTime
25061
+ endDate
25043
25062
  }) => {
25044
25063
  const err = validateSchedule({
25045
25064
  startDate,
25046
25065
  endDate,
25047
- startTime,
25048
- endTime,
25049
25066
  scheduleType
25050
25067
  });
25051
25068
  if (err) {
@@ -25064,9 +25081,7 @@ const ADSCitizenSecond = ({
25064
25081
  });
25065
25082
  setDateRange({
25066
25083
  startDate,
25067
- endDate,
25068
- startTime,
25069
- endTime
25084
+ endDate
25070
25085
  });
25071
25086
  setShowModal(true);
25072
25087
  };
@@ -25086,8 +25101,8 @@ const ADSCitizenSecond = ({
25086
25101
  ...s,
25087
25102
  bookingStartDate: s === null || s === void 0 ? void 0 : s.bookingDate,
25088
25103
  bookingEndDate: dateRange === null || dateRange === void 0 ? void 0 : dateRange.endDate,
25089
- bookingFromTime: dateRange === null || dateRange === void 0 ? void 0 : dateRange.startTime,
25090
- bookingToTime: dateRange === null || dateRange === void 0 ? void 0 : dateRange.endTime
25104
+ bookingFromTime: "06:00",
25105
+ bookingToTime: "05:59"
25091
25106
  }));
25092
25107
  const existing = prev.find(item => {
25093
25108
  var _item$ad4, _item$ad5, _item$ad6;
@@ -25150,9 +25165,6 @@ const ADSCitizenSecond = ({
25150
25165
  marginTop: "-18px",
25151
25166
  color: "red"
25152
25167
  };
25153
- const mandatoryStyle = {
25154
- color: "red"
25155
- };
25156
25168
  const guidance = getScheduleMessage(scheduleType, t);
25157
25169
  return /*#__PURE__*/React.createElement(React.Fragment, null, (cartSlots === null || cartSlots === void 0 ? void 0 : cartSlots.length) > 0 && /*#__PURE__*/React.createElement("div", {
25158
25170
  style: {
@@ -25170,7 +25182,7 @@ const ADSCitizenSecond = ({
25170
25182
  className: "card",
25171
25183
  onSubmit: handleSubmit(onSubmit)
25172
25184
  }, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("ADS_SITE_NAME_LABEL"), " ", /*#__PURE__*/React.createElement("span", {
25173
- style: mandatoryStyle
25185
+ className: "mandatory-asterisk"
25174
25186
  }, "*")), /*#__PURE__*/React.createElement("div", {
25175
25187
  className: "form-field"
25176
25188
  }, /*#__PURE__*/React.createElement(Controller, {
@@ -25667,7 +25679,7 @@ const NewADSStepFormFive = ({
25667
25679
  }
25668
25680
  const delay = ms => new Promise(resolve => setTimeout(resolve, ms));
25669
25681
  const goNext = useCallback(async (data = undefined) => {
25670
- var _data$Licenses, _wd$data, _wd$data$processInsta, _wd$data$processInsta2, _payloadState$documen, _payloadState$documen2;
25682
+ var _data$Licenses, _wd$data, _wd$data$processInsta, _wd$data$processInsta2, _payloadState$ownerDe, _payloadState$Created, _payloadState$ownerDe2, _payloadState$Created2, _payloadState$documen, _payloadState$documen2;
25671
25683
  const wd = workflowDetails === null || workflowDetails === void 0 ? void 0 : workflowDetails.data;
25672
25684
  const payloadState = lodash.merge(lodash.cloneDeep(currentStepData), data || {});
25673
25685
  const filtData = data !== null && data !== void 0 && data.action ? data : (data === null || data === void 0 ? void 0 : (_data$Licenses = data.Licenses) === null || _data$Licenses === void 0 ? void 0 : _data$Licenses[0]) || null;
@@ -25698,8 +25710,12 @@ const NewADSStepFormFive = ({
25698
25710
  }
25699
25711
  };
25700
25712
  };
25713
+ const updatedApplicant = (payloadState === null || payloadState === void 0 ? void 0 : (_payloadState$ownerDe = payloadState.ownerDetails) === null || _payloadState$ownerDe === void 0 ? void 0 : _payloadState$ownerDe.applicantDetail) || (payloadState === null || payloadState === void 0 ? void 0 : (_payloadState$Created = payloadState.CreatedResponse) === null || _payloadState$Created === void 0 ? void 0 : _payloadState$Created.applicantDetail);
25714
+ const updatedAddress = (payloadState === null || payloadState === void 0 ? void 0 : (_payloadState$ownerDe2 = payloadState.ownerDetails) === null || _payloadState$ownerDe2 === void 0 ? void 0 : _payloadState$ownerDe2.address) || (payloadState === null || payloadState === void 0 ? void 0 : (_payloadState$Created2 = payloadState.CreatedResponse) === null || _payloadState$Created2 === void 0 ? void 0 : _payloadState$Created2.address);
25701
25715
  let formData = buildFormData({
25702
25716
  ...(payloadState === null || payloadState === void 0 ? void 0 : payloadState.CreatedResponse),
25717
+ applicantDetail: updatedApplicant,
25718
+ address: updatedAddress,
25703
25719
  documents: (payloadState === null || payloadState === void 0 ? void 0 : (_payloadState$documen = payloadState.documents) === null || _payloadState$documen === void 0 ? void 0 : (_payloadState$documen2 = _payloadState$documen.documents) === null || _payloadState$documen2 === void 0 ? void 0 : _payloadState$documen2.documents) || (payloadState === null || payloadState === void 0 ? void 0 : payloadState.documents) || (payloadState === null || payloadState === void 0 ? void 0 : payloadState.Documents) || []
25704
25720
  });
25705
25721
  if (!(filtData !== null && filtData !== void 0 && filtData.assignee) && (filtData === null || filtData === void 0 ? void 0 : filtData.action) === "FORWARD") {
@@ -25714,6 +25730,8 @@ const NewADSStepFormFive = ({
25714
25730
  var _modifyRes$ResponseIn, _modifyRes$bookingApp, _modifyRes$bookingApp2, _payloadState$documen3, _payloadState$documen4;
25715
25731
  formData = buildFormData({
25716
25732
  ...(payloadState === null || payloadState === void 0 ? void 0 : payloadState.CreatedResponse),
25733
+ applicantDetail: updatedApplicant,
25734
+ address: updatedAddress,
25717
25735
  cartDetails: modifiedSlots,
25718
25736
  documents: []
25719
25737
  });
@@ -25728,6 +25746,8 @@ const NewADSStepFormFive = ({
25728
25746
  await delay(4000);
25729
25747
  const overriddenSource = {
25730
25748
  ...(payloadState === null || payloadState === void 0 ? void 0 : payloadState.CreatedResponse),
25749
+ applicantDetail: updatedApplicant,
25750
+ address: updatedAddress,
25731
25751
  cartDetails: modifyRes === null || modifyRes === void 0 ? void 0 : (_modifyRes$bookingApp = modifyRes.bookingApplication) === null || _modifyRes$bookingApp === void 0 ? void 0 : (_modifyRes$bookingApp2 = _modifyRes$bookingApp[0]) === null || _modifyRes$bookingApp2 === void 0 ? void 0 : _modifyRes$bookingApp2.cartDetails,
25732
25752
  documents: (payloadState === null || payloadState === void 0 ? void 0 : (_payloadState$documen3 = payloadState.documents) === null || _payloadState$documen3 === void 0 ? void 0 : (_payloadState$documen4 = _payloadState$documen3.documents) === null || _payloadState$documen4 === void 0 ? void 0 : _payloadState$documen4.documents) || (payloadState === null || payloadState === void 0 ? void 0 : payloadState.documents) || (payloadState === null || payloadState === void 0 ? void 0 : payloadState.Documents) || []
25733
25753
  };
@@ -25967,9 +25987,7 @@ const ADSSiteMaster = ({
25967
25987
  if (!ad) return;
25968
25988
  reset({
25969
25989
  ...initialFormDefaults,
25970
- ...ad,
25971
- bookingFromTime: ad.bookingFromTime || nowHM,
25972
- bookingToTime: ad.bookingToTime || nowHM
25990
+ ...ad
25973
25991
  });
25974
25992
  setEditingIndex(idx);
25975
25993
  setPlaceNameState(((_ad$geoLocation = ad.geoLocation) === null || _ad$geoLocation === void 0 ? void 0 : _ad$geoLocation.formattedAddress) || "");
@@ -25986,9 +26004,7 @@ const ADSSiteMaster = ({
25986
26004
  setAdsList(prev => [...prev, data]);
25987
26005
  }
25988
26006
  reset({
25989
- ...initialFormDefaults,
25990
- bookingFromTime: nowHM,
25991
- bookingToTime: nowHM
26007
+ ...initialFormDefaults
25992
26008
  });
25993
26009
  setPlaceNameState("");
25994
26010
  });
@@ -25997,9 +26013,7 @@ const ADSSiteMaster = ({
25997
26013
  if (editingIndex === idx) {
25998
26014
  setEditingIndex(null);
25999
26015
  reset({
26000
- ...initialFormDefaults,
26001
- bookingFromTime: nowHM,
26002
- bookingToTime: nowHM
26016
+ ...initialFormDefaults
26003
26017
  });
26004
26018
  setPlaceNameState("");
26005
26019
  } else if (editingIndex !== null && editingIndex > idx) {
@@ -26042,8 +26056,8 @@ const ADSSiteMaster = ({
26042
26056
  addType: ((_d$advertisementType = d.advertisementType) === null || _d$advertisementType === void 0 ? void 0 : _d$advertisementType.code) || d.advertisementType,
26043
26057
  bookingDate: d.startDate,
26044
26058
  endDate: d.endDate,
26045
- bookingFromTime: d.bookingFromTime,
26046
- bookingToTime: d.bookingToTime,
26059
+ bookingFromTime: "06:00",
26060
+ bookingToTime: "05:59",
26047
26061
  advertisementId: d.siteId || "",
26048
26062
  cartId: d.siteId || "",
26049
26063
  cartAddress: d.cartAddress || "",
@@ -26069,8 +26083,6 @@ const ADSSiteMaster = ({
26069
26083
  dispatch(UPDATE_ADSNewApplication_FORM("siteDetails", data));
26070
26084
  dispatch(UPDATE_ADSNewApplication_FORM("siteId", data.siteId));
26071
26085
  dispatch(UPDATE_ADSNewApplication_FORM("siteName", data.siteName));
26072
- dispatch(UPDATE_ADSNewApplication_FORM("bookingFromTime", data.bookingFromTime));
26073
- dispatch(UPDATE_ADSNewApplication_FORM("bookingToTime", data.bookingToTime));
26074
26086
  const fallbackData = {
26075
26087
  draft: true,
26076
26088
  bookingApplication: formData
@@ -26089,9 +26101,7 @@ const ADSSiteMaster = ({
26089
26101
  setAdsList([]);
26090
26102
  setEditingIndex(null);
26091
26103
  reset({
26092
- ...initialFormDefaults,
26093
- bookingFromTime: nowHM,
26094
- bookingToTime: nowHM
26104
+ ...initialFormDefaults
26095
26105
  });
26096
26106
  goNext(response);
26097
26107
  } else {
@@ -26123,8 +26133,6 @@ const ADSSiteMaster = ({
26123
26133
  Object.entries(formattedData).forEach(([key, value]) => {
26124
26134
  setValue(key, value);
26125
26135
  });
26126
- if (!formattedData.bookingFromTime) setValue("bookingFromTime", nowHM);
26127
- if (!formattedData.bookingToTime) setValue("bookingToTime", nowHM);
26128
26136
  }
26129
26137
  }, [currentStepData, setValue]);
26130
26138
  useEffect(() => {
@@ -27254,7 +27262,7 @@ function ADSSelectDocument$1({
27254
27262
  function ADSSummary({
27255
27263
  t
27256
27264
  }) {
27257
- var _formData$CreatedResp, _formData$ownerDetail, _formData$CreatedResp2, _formData$documents, _formData$documents$d, _formData$documents2, _formData$documents2$, _formData$documents3;
27265
+ var _formData$ownerDetail, _formData$CreatedResp, _formData$ownerDetail2, _formData$CreatedResp2, _formData$documents, _formData$documents$d, _formData$documents2, _formData$documents2$, _formData$documents3;
27258
27266
  const dispatch = useDispatch();
27259
27267
  const TT = key => t ? t(key) : key;
27260
27268
  const rawFormData = useSelector(state => {
@@ -27262,8 +27270,8 @@ function ADSSummary({
27262
27270
  return state === null || state === void 0 ? void 0 : (_state$ads = state.ads) === null || _state$ads === void 0 ? void 0 : (_state$ads$ADSNewAppl = _state$ads.ADSNewApplicationFormReducer) === null || _state$ads$ADSNewAppl === void 0 ? void 0 : _state$ads$ADSNewAppl.formData;
27263
27271
  });
27264
27272
  const formData = React.useMemo(() => rawFormData || {}, [rawFormData]);
27265
- const applicant = (formData === null || formData === void 0 ? void 0 : (_formData$CreatedResp = formData.CreatedResponse) === null || _formData$CreatedResp === void 0 ? void 0 : _formData$CreatedResp.applicantDetail) || {};
27266
- const address = (formData === null || formData === void 0 ? void 0 : (_formData$ownerDetail = formData.ownerDetails) === null || _formData$ownerDetail === void 0 ? void 0 : _formData$ownerDetail.address) || (formData === null || formData === void 0 ? void 0 : (_formData$CreatedResp2 = formData.CreatedResponse) === null || _formData$CreatedResp2 === void 0 ? void 0 : _formData$CreatedResp2.address) || {};
27273
+ const applicant = (formData === null || formData === void 0 ? void 0 : (_formData$ownerDetail = formData.ownerDetails) === null || _formData$ownerDetail === void 0 ? void 0 : _formData$ownerDetail.applicantDetail) || (formData === null || formData === void 0 ? void 0 : (_formData$CreatedResp = formData.CreatedResponse) === null || _formData$CreatedResp === void 0 ? void 0 : _formData$CreatedResp.applicantDetail) || {};
27274
+ const address = (formData === null || formData === void 0 ? void 0 : (_formData$ownerDetail2 = formData.ownerDetails) === null || _formData$ownerDetail2 === void 0 ? void 0 : _formData$ownerDetail2.address) || (formData === null || formData === void 0 ? void 0 : (_formData$CreatedResp2 = formData.CreatedResponse) === null || _formData$CreatedResp2 === void 0 ? void 0 : _formData$CreatedResp2.address) || {};
27267
27275
  const docs = Array.isArray(formData === null || formData === void 0 ? void 0 : (_formData$documents = formData.documents) === null || _formData$documents === void 0 ? void 0 : (_formData$documents$d = _formData$documents.documents) === null || _formData$documents$d === void 0 ? void 0 : _formData$documents$d.documents) ? formData === null || formData === void 0 ? void 0 : (_formData$documents2 = formData.documents) === null || _formData$documents2 === void 0 ? void 0 : (_formData$documents2$ = _formData$documents2.documents) === null || _formData$documents2$ === void 0 ? void 0 : _formData$documents2$.documents : Array.isArray((_formData$documents3 = formData.documents) === null || _formData$documents3 === void 0 ? void 0 : _formData$documents3.documents) ? formData.documents.documents : Array.isArray(formData.documents) ? formData.documents : [];
27268
27276
  const cartDetails = formData === null || formData === void 0 ? void 0 : formData.ads;
27269
27277
  const renderRow = (label, value) => /*#__PURE__*/React.createElement("div", {