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

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