tabexseriescomponents 0.2.826 → 0.2.828

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -4712,7 +4712,7 @@ var Product_itemtype = function Product_itemtype(props) {
4712
4712
  function ownKeys$2z(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4713
4713
  function _objectSpread$2z(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2z(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2z(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4714
4714
  var Serviceinfotabs = function Serviceinfotabs(props) {
4715
- var _fetchProductInfoQuer10, _fetchProductInfoQuer11, _fetchProductInfoQuer12, _fetchProductInfoQuer13, _fetchProductInfoQuer16, _fetchProductInfoQuer17, _fetchProductInfoQuer20, _fetchProductInfoQuer21;
4715
+ var _fetchProductInfoQuer12, _fetchProductInfoQuer13, _fetchProductInfoQuer14, _fetchProductInfoQuer15, _fetchProductInfoQuer16, _fetchProductInfoQuer17, _fetchProductInfoQuer20, _fetchProductInfoQuer21, _fetchProductInfoQuer24, _fetchProductInfoQuer25;
4716
4716
  var langdetect = props.actions.langdetect;
4717
4717
  var lang = props.actions.lang;
4718
4718
  var sectionproperties = props.actions.sectionproperties;
@@ -4766,6 +4766,10 @@ var Serviceinfotabs = function Serviceinfotabs(props) {
4766
4766
  _useState12 = _slicedToArray__default["default"](_useState11, 2),
4767
4767
  disableddates = _useState12[0],
4768
4768
  setdisableddates = _useState12[1];
4769
+ var _useState13 = React.useState([]),
4770
+ _useState14 = _slicedToArray__default["default"](_useState13, 2),
4771
+ minutes_Active_days_array = _useState14[0],
4772
+ setminutes_Active_days_array = _useState14[1];
4769
4773
  React.useEffect(function () {
4770
4774
  setaddtocardpayloadobj(_objectSpread$2z(_objectSpread$2z({}, addtocardpayloadobj), {}, {
4771
4775
  item_type: 'service'
@@ -4801,7 +4805,7 @@ var Serviceinfotabs = function Serviceinfotabs(props) {
4801
4805
  }
4802
4806
  }, [addtocardpayloadobj.from, addtocardpayloadobj.to]);
4803
4807
  React.useEffect(function () {
4804
- var _fetchProductInfoQuer;
4808
+ var _fetchProductInfoQuer, _fetchProductInfoQuer6;
4805
4809
  if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer === void 0 || (_fetchProductInfoQuer = _fetchProductInfoQuer.data) === null || _fetchProductInfoQuer === void 0 || (_fetchProductInfoQuer = _fetchProductInfoQuer.productinfo) === null || _fetchProductInfoQuer === void 0 || (_fetchProductInfoQuer = _fetchProductInfoQuer.serviceinfo) === null || _fetchProductInfoQuer === void 0 ? void 0 : _fetchProductInfoQuer.scheduletype) == 'days') {
4806
4810
  var _fetchProductInfoQuer2, _fetchProductInfoQuer3;
4807
4811
  if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer2 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer2 === void 0 || (_fetchProductInfoQuer2 = _fetchProductInfoQuer2.data) === null || _fetchProductInfoQuer2 === void 0 || (_fetchProductInfoQuer2 = _fetchProductInfoQuer2.productinfo) === null || _fetchProductInfoQuer2 === void 0 ? void 0 : _fetchProductInfoQuer2.disabled_dates) != undefined && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer3 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer3 === void 0 || (_fetchProductInfoQuer3 = _fetchProductInfoQuer3.data) === null || _fetchProductInfoQuer3 === void 0 || (_fetchProductInfoQuer3 = _fetchProductInfoQuer3.productinfo) === null || _fetchProductInfoQuer3 === void 0 ? void 0 : _fetchProductInfoQuer3.disabled_dates) != null) {
@@ -4817,7 +4821,40 @@ var Serviceinfotabs = function Serviceinfotabs(props) {
4817
4821
  }
4818
4822
  }
4819
4823
  }
4824
+ if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer6 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer6 === void 0 || (_fetchProductInfoQuer6 = _fetchProductInfoQuer6.data) === null || _fetchProductInfoQuer6 === void 0 || (_fetchProductInfoQuer6 = _fetchProductInfoQuer6.productinfo) === null || _fetchProductInfoQuer6 === void 0 || (_fetchProductInfoQuer6 = _fetchProductInfoQuer6.serviceinfo) === null || _fetchProductInfoQuer6 === void 0 ? void 0 : _fetchProductInfoQuer6.scheduletype) == 'minutes') {
4825
+ var _fetchProductInfoQuer7;
4826
+ var serviceDays = fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer7 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer7 === void 0 || (_fetchProductInfoQuer7 = _fetchProductInfoQuer7.data) === null || _fetchProductInfoQuer7 === void 0 || (_fetchProductInfoQuer7 = _fetchProductInfoQuer7.productinfo) === null || _fetchProductInfoQuer7 === void 0 || (_fetchProductInfoQuer7 = _fetchProductInfoQuer7.serviceinfo) === null || _fetchProductInfoQuer7 === void 0 ? void 0 : _fetchProductInfoQuer7.servicedays;
4827
+ if (Array.isArray(serviceDays) && serviceDays.length > 0) {
4828
+ var uniqueDayNames = _toConsumableArray__default["default"](new Set(serviceDays.map(function (day) {
4829
+ return day === null || day === void 0 ? void 0 : day.dayname;
4830
+ }).filter(function (dayname) {
4831
+ return typeof dayname === 'string' && dayname.trim() !== '';
4832
+ })));
4833
+ setminutes_Active_days_array(uniqueDayNames);
4834
+ } else {
4835
+ // Optionally reset the state if serviceDays is undefined, null, or empty
4836
+ setminutes_Active_days_array([]);
4837
+ }
4838
+ }
4820
4839
  }, [addtocardpayloadobj.from, addtocardpayloadobj.to]);
4840
+ var isAllowedDay = function isAllowedDay(date) {
4841
+ if (minutes_Active_days_array != undefined && minutes_Active_days_array != null && minutes_Active_days_array.length != 0) {
4842
+ var dayNameToNumber = {
4843
+ Sun: 0,
4844
+ Mond: 1,
4845
+ Tues: 2,
4846
+ Wednes: 3,
4847
+ Thurs: 4,
4848
+ Fri: 5,
4849
+ Sat: 6
4850
+ };
4851
+ var dayNumber = date.getDay(); // 0 = Sunday ... 6 = Saturday
4852
+ var allowedDays = minutes_Active_days_array.map(function (day) {
4853
+ return dayNameToNumber[day];
4854
+ });
4855
+ return allowedDays.includes(dayNumber);
4856
+ }
4857
+ };
4821
4858
  var TabsStyles = {
4822
4859
  sidebar_item: glamor.css({
4823
4860
  background: sectionproperties.tabcontainerbgcolor,
@@ -4934,16 +4971,16 @@ var Serviceinfotabs = function Serviceinfotabs(props) {
4934
4971
  return lastChoosedIndex;
4935
4972
  }
4936
4973
  var chooseitemslot = function chooseitemslot(slot, index) {
4937
- var _fetchProductInfoQuer6, _fetchProductInfoQuer7, _fetchProductInfoQuer8, _fetchProductInfoQuer9;
4974
+ var _fetchProductInfoQuer8, _fetchProductInfoQuer9, _fetchProductInfoQuer10, _fetchProductInfoQuer11;
4938
4975
  var reservedslottobetaken = null;
4939
4976
  var reservedslotArrtobetaken = [];
4940
4977
  var slotschooosedcounter_tobe_usedonly_in_merge = 0;
4941
4978
  var is_multi_slots = false;
4942
4979
  var is_slots_must_be_adjacent = false;
4943
- if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer6 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer6 === void 0 || (_fetchProductInfoQuer6 = _fetchProductInfoQuer6.data) === null || _fetchProductInfoQuer6 === void 0 || (_fetchProductInfoQuer6 = _fetchProductInfoQuer6.productinfo) === null || _fetchProductInfoQuer6 === void 0 || (_fetchProductInfoQuer6 = _fetchProductInfoQuer6.serviceinfo) === null || _fetchProductInfoQuer6 === void 0 ? void 0 : _fetchProductInfoQuer6.is_slots_adjacent) != undefined && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer7 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer7 === void 0 || (_fetchProductInfoQuer7 = _fetchProductInfoQuer7.data) === null || _fetchProductInfoQuer7 === void 0 || (_fetchProductInfoQuer7 = _fetchProductInfoQuer7.productinfo) === null || _fetchProductInfoQuer7 === void 0 || (_fetchProductInfoQuer7 = _fetchProductInfoQuer7.serviceinfo) === null || _fetchProductInfoQuer7 === void 0 ? void 0 : _fetchProductInfoQuer7.is_slots_adjacent) == 1) {
4980
+ if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer8 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer8 === void 0 || (_fetchProductInfoQuer8 = _fetchProductInfoQuer8.data) === null || _fetchProductInfoQuer8 === void 0 || (_fetchProductInfoQuer8 = _fetchProductInfoQuer8.productinfo) === null || _fetchProductInfoQuer8 === void 0 || (_fetchProductInfoQuer8 = _fetchProductInfoQuer8.serviceinfo) === null || _fetchProductInfoQuer8 === void 0 ? void 0 : _fetchProductInfoQuer8.is_slots_adjacent) != undefined && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer9 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer9 === void 0 || (_fetchProductInfoQuer9 = _fetchProductInfoQuer9.data) === null || _fetchProductInfoQuer9 === void 0 || (_fetchProductInfoQuer9 = _fetchProductInfoQuer9.productinfo) === null || _fetchProductInfoQuer9 === void 0 || (_fetchProductInfoQuer9 = _fetchProductInfoQuer9.serviceinfo) === null || _fetchProductInfoQuer9 === void 0 ? void 0 : _fetchProductInfoQuer9.is_slots_adjacent) == 1) {
4944
4981
  is_slots_must_be_adjacent = true;
4945
4982
  }
4946
- if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer8 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer8 === void 0 || (_fetchProductInfoQuer8 = _fetchProductInfoQuer8.data) === null || _fetchProductInfoQuer8 === void 0 || (_fetchProductInfoQuer8 = _fetchProductInfoQuer8.productinfo) === null || _fetchProductInfoQuer8 === void 0 || (_fetchProductInfoQuer8 = _fetchProductInfoQuer8.serviceinfo) === null || _fetchProductInfoQuer8 === void 0 ? void 0 : _fetchProductInfoQuer8.is_slots_multi) != undefined && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer9 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer9 === void 0 || (_fetchProductInfoQuer9 = _fetchProductInfoQuer9.data) === null || _fetchProductInfoQuer9 === void 0 || (_fetchProductInfoQuer9 = _fetchProductInfoQuer9.productinfo) === null || _fetchProductInfoQuer9 === void 0 || (_fetchProductInfoQuer9 = _fetchProductInfoQuer9.serviceinfo) === null || _fetchProductInfoQuer9 === void 0 ? void 0 : _fetchProductInfoQuer9.is_slots_multi) == 1) {
4983
+ if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer10 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer10 === void 0 || (_fetchProductInfoQuer10 = _fetchProductInfoQuer10.data) === null || _fetchProductInfoQuer10 === void 0 || (_fetchProductInfoQuer10 = _fetchProductInfoQuer10.productinfo) === null || _fetchProductInfoQuer10 === void 0 || (_fetchProductInfoQuer10 = _fetchProductInfoQuer10.serviceinfo) === null || _fetchProductInfoQuer10 === void 0 ? void 0 : _fetchProductInfoQuer10.is_slots_multi) != undefined && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer11 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer11 === void 0 || (_fetchProductInfoQuer11 = _fetchProductInfoQuer11.data) === null || _fetchProductInfoQuer11 === void 0 || (_fetchProductInfoQuer11 = _fetchProductInfoQuer11.productinfo) === null || _fetchProductInfoQuer11 === void 0 || (_fetchProductInfoQuer11 = _fetchProductInfoQuer11.serviceinfo) === null || _fetchProductInfoQuer11 === void 0 ? void 0 : _fetchProductInfoQuer11.is_slots_multi) == 1) {
4947
4984
  is_multi_slots = true;
4948
4985
  }
4949
4986
  var tempslots = _toConsumableArray__default["default"](slots);
@@ -5065,10 +5102,10 @@ var Serviceinfotabs = function Serviceinfotabs(props) {
5065
5102
  // }
5066
5103
  // };
5067
5104
  return /*#__PURE__*/React__default["default"].createElement("div", {
5068
- className: (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer10 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer10 === void 0 || (_fetchProductInfoQuer10 = _fetchProductInfoQuer10.data) === null || _fetchProductInfoQuer10 === void 0 || (_fetchProductInfoQuer10 = _fetchProductInfoQuer10.productinfo) === null || _fetchProductInfoQuer10 === void 0 || (_fetchProductInfoQuer10 = _fetchProductInfoQuer10.serviceinfo) === null || _fetchProductInfoQuer10 === void 0 ? void 0 : _fetchProductInfoQuer10.scheduletype) == 'minutes' ? 'col-lg-12 mt-3 p-0' : 'col-lg-10 mt-3 p-0'
5105
+ className: (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer12 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer12 === void 0 || (_fetchProductInfoQuer12 = _fetchProductInfoQuer12.data) === null || _fetchProductInfoQuer12 === void 0 || (_fetchProductInfoQuer12 = _fetchProductInfoQuer12.productinfo) === null || _fetchProductInfoQuer12 === void 0 || (_fetchProductInfoQuer12 = _fetchProductInfoQuer12.serviceinfo) === null || _fetchProductInfoQuer12 === void 0 ? void 0 : _fetchProductInfoQuer12.scheduletype) == 'minutes' ? 'col-lg-12 mt-3 p-0' : 'col-lg-10 mt-3 p-0'
5069
5106
  }, /*#__PURE__*/React__default["default"].createElement("div", {
5070
5107
  "class": "row m-0 w-100"
5071
- }, (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer11 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer11 === void 0 || (_fetchProductInfoQuer11 = _fetchProductInfoQuer11.data) === null || _fetchProductInfoQuer11 === void 0 || (_fetchProductInfoQuer11 = _fetchProductInfoQuer11.productinfo) === null || _fetchProductInfoQuer11 === void 0 || (_fetchProductInfoQuer11 = _fetchProductInfoQuer11.serviceinfo) === null || _fetchProductInfoQuer11 === void 0 ? void 0 : _fetchProductInfoQuer11.scheduletype) == 'days' && /*#__PURE__*/React__default["default"].createElement("div", {
5108
+ }, (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer13 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer13 === void 0 || (_fetchProductInfoQuer13 = _fetchProductInfoQuer13.data) === null || _fetchProductInfoQuer13 === void 0 || (_fetchProductInfoQuer13 = _fetchProductInfoQuer13.productinfo) === null || _fetchProductInfoQuer13 === void 0 || (_fetchProductInfoQuer13 = _fetchProductInfoQuer13.serviceinfo) === null || _fetchProductInfoQuer13 === void 0 ? void 0 : _fetchProductInfoQuer13.scheduletype) == 'days' && /*#__PURE__*/React__default["default"].createElement("div", {
5072
5109
  "class": "row m-0 w-100"
5073
5110
  }, /*#__PURE__*/React__default["default"].createElement("div", {
5074
5111
  "class": "col-lg-6 col-md-12 col-sm-12 mb-2 pl-1 pr-1"
@@ -5112,7 +5149,7 @@ var Serviceinfotabs = function Serviceinfotabs(props) {
5112
5149
  }));
5113
5150
  setselectedtodate(date);
5114
5151
  }
5115
- })))))), (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer12 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer12 === void 0 || (_fetchProductInfoQuer12 = _fetchProductInfoQuer12.data) === null || _fetchProductInfoQuer12 === void 0 || (_fetchProductInfoQuer12 = _fetchProductInfoQuer12.productinfo) === null || _fetchProductInfoQuer12 === void 0 || (_fetchProductInfoQuer12 = _fetchProductInfoQuer12.serviceinfo) === null || _fetchProductInfoQuer12 === void 0 ? void 0 : _fetchProductInfoQuer12.scheduletype) == 'minutes' && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
5152
+ })))))), (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer14 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer14 === void 0 || (_fetchProductInfoQuer14 = _fetchProductInfoQuer14.data) === null || _fetchProductInfoQuer14 === void 0 || (_fetchProductInfoQuer14 = _fetchProductInfoQuer14.productinfo) === null || _fetchProductInfoQuer14 === void 0 || (_fetchProductInfoQuer14 = _fetchProductInfoQuer14.serviceinfo) === null || _fetchProductInfoQuer14 === void 0 ? void 0 : _fetchProductInfoQuer14.scheduletype) == 'minutes' && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
5116
5153
  "class": "col-lg-12 col-md-12 col-sm-12 mb-2"
5117
5154
  }, /*#__PURE__*/React__default["default"].createElement("div", {
5118
5155
  "class": "row m-0 w-100"
@@ -5133,39 +5170,40 @@ var Serviceinfotabs = function Serviceinfotabs(props) {
5133
5170
  }
5134
5171
  }, /*#__PURE__*/React__default["default"].createElement("div", {
5135
5172
  "class": "w-100 px-2 h-100 allcentered"
5136
- }, /*#__PURE__*/React__default["default"].createElement("input", {
5137
- type: "date",
5138
- "class": ' w-100 allcentered pl-1 pr-1 ',
5139
- style: {
5140
- background: 'transparent',
5141
- borderWidth: 0,
5142
- height: '100%',
5143
- zIndex: 2,
5144
- color: sectionproperties.inputfieldcolor
5145
- },
5146
- min: fetchProductInfoQueryContext.data.data.productinfo.serviceinfo.reservationstarts,
5147
- max: fetchProductInfoQueryContext.data.data.productinfo.serviceinfo.reservationends,
5148
- onChange: function onChange(event) {
5149
- // setaddtocardpayloadobj({ ...addtocardpayloadobj, date: event.target.value });
5150
- setaddtocardpayloadobj(_objectSpread$2z(_objectSpread$2z({}, addtocardpayloadobj), {}, {
5151
- date: event.target.value,
5152
- time: '',
5153
- reservedslotArrtobetaken: [],
5154
- quantity: 1
5155
- }));
5156
- setslots([]);
5157
- setcurrentmutatestate('/fetchserviceslots');
5158
- GeneralAPIMutationContext.mutate({
5159
- endpointurl: '/fetchserviceslots',
5160
- productid: fetchProductInfoQueryContext.data.data.productinfo.productid,
5161
- reqdate: event.target.value,
5162
- mutateSuccesscallback: function mutateSuccesscallback(data, variables) {
5163
- setslots(data.data.slots);
5164
- if (!data.data.slots || data.data.slots.length === 0) {
5165
- NotificationManager.warning('', 'Please choose another date');
5173
+ }, /*#__PURE__*/React__default["default"].createElement(DatePicker__default["default"], {
5174
+ minDate: fetchProductInfoQueryContext !== null && fetchProductInfoQueryContext !== void 0 && (_fetchProductInfoQuer15 = fetchProductInfoQueryContext.data) !== null && _fetchProductInfoQuer15 !== void 0 && (_fetchProductInfoQuer15 = _fetchProductInfoQuer15.data) !== null && _fetchProductInfoQuer15 !== void 0 && (_fetchProductInfoQuer15 = _fetchProductInfoQuer15.productinfo) !== null && _fetchProductInfoQuer15 !== void 0 && (_fetchProductInfoQuer15 = _fetchProductInfoQuer15.serviceinfo) !== null && _fetchProductInfoQuer15 !== void 0 && _fetchProductInfoQuer15.reservationstarts ? new Date(fetchProductInfoQueryContext.data.data.productinfo.serviceinfo.reservationstarts) : null,
5175
+ maxDate: fetchProductInfoQueryContext !== null && fetchProductInfoQueryContext !== void 0 && (_fetchProductInfoQuer16 = fetchProductInfoQueryContext.data) !== null && _fetchProductInfoQuer16 !== void 0 && (_fetchProductInfoQuer16 = _fetchProductInfoQuer16.data) !== null && _fetchProductInfoQuer16 !== void 0 && (_fetchProductInfoQuer16 = _fetchProductInfoQuer16.productinfo) !== null && _fetchProductInfoQuer16 !== void 0 && (_fetchProductInfoQuer16 = _fetchProductInfoQuer16.serviceinfo) !== null && _fetchProductInfoQuer16 !== void 0 && _fetchProductInfoQuer16.reservationends ? new Date(fetchProductInfoQueryContext.data.data.productinfo.serviceinfo.reservationends) : null,
5176
+ filterDate: isAllowedDay,
5177
+ selected: selectedfromdate,
5178
+ excludeDates: disableddates,
5179
+ onChange: function onChange(date) {
5180
+ // setaddtocardpayloadobj({ ...addtocardpayloadobj, from: date });
5181
+ if (date) {
5182
+ var _year = date.getFullYear();
5183
+ var _month = String(date.getMonth() + 1).padStart(2, '0'); // Months are 0-based
5184
+ var _day = String(date.getDate()).padStart(2, '0');
5185
+ var formattedDate = "".concat(_year, "-").concat(_month, "-").concat(_day);
5186
+ setaddtocardpayloadobj(_objectSpread$2z(_objectSpread$2z({}, addtocardpayloadobj), {}, {
5187
+ date: formattedDate,
5188
+ time: '',
5189
+ reservedslotArrtobetaken: [],
5190
+ quantity: 1
5191
+ }));
5192
+ setslots([]);
5193
+ setcurrentmutatestate('/fetchserviceslots');
5194
+ GeneralAPIMutationContext.mutate({
5195
+ endpointurl: '/fetchserviceslots',
5196
+ productid: fetchProductInfoQueryContext.data.data.productinfo.productid,
5197
+ reqdate: formattedDate,
5198
+ mutateSuccesscallback: function mutateSuccesscallback(data, variables) {
5199
+ setslots(data.data.slots);
5200
+ if (!data.data.slots || data.data.slots.length === 0) {
5201
+ NotificationManager.warning('', 'Please choose another date');
5202
+ }
5166
5203
  }
5167
- }
5168
- });
5204
+ });
5205
+ setselectedfromdate(date);
5206
+ }
5169
5207
  }
5170
5208
  }), /*#__PURE__*/React__default["default"].createElement("div", {
5171
5209
  "class": "h-100 allcentered",
@@ -5352,7 +5390,7 @@ var Serviceinfotabs = function Serviceinfotabs(props) {
5352
5390
  className: "col-lg-12 p-0 mb-3"
5353
5391
  }, /*#__PURE__*/React__default["default"].createElement("div", {
5354
5392
  className: "row m-0 w-100"
5355
- }, (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer13 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer13 === void 0 || (_fetchProductInfoQuer13 = _fetchProductInfoQuer13.data) === null || _fetchProductInfoQuer13 === void 0 || (_fetchProductInfoQuer13 = _fetchProductInfoQuer13.productinfo) === null || _fetchProductInfoQuer13 === void 0 || (_fetchProductInfoQuer13 = _fetchProductInfoQuer13.serviceinfo) === null || _fetchProductInfoQuer13 === void 0 ? void 0 : _fetchProductInfoQuer13.scheduletype) == 'days' && /*#__PURE__*/React__default["default"].createElement("div", {
5393
+ }, (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer17 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer17 === void 0 || (_fetchProductInfoQuer17 = _fetchProductInfoQuer17.data) === null || _fetchProductInfoQuer17 === void 0 || (_fetchProductInfoQuer17 = _fetchProductInfoQuer17.productinfo) === null || _fetchProductInfoQuer17 === void 0 || (_fetchProductInfoQuer17 = _fetchProductInfoQuer17.serviceinfo) === null || _fetchProductInfoQuer17 === void 0 ? void 0 : _fetchProductInfoQuer17.scheduletype) == 'days' && /*#__PURE__*/React__default["default"].createElement("div", {
5356
5394
  className: "col-lg-12 p-0"
5357
5395
  }, /*#__PURE__*/React__default["default"].createElement("div", {
5358
5396
  className: "row m-0 w-100"
@@ -5416,15 +5454,15 @@ var Serviceinfotabs = function Serviceinfotabs(props) {
5416
5454
  }, /*#__PURE__*/React__default["default"].createElement("button", {
5417
5455
  className: "".concat(productinfo_cssstyles.cart_btn, " ") + ' d-flex align-items-center justify-content-center ml-sm-auto mr-sm-auto mb-sm-2 ',
5418
5456
  onClick: function onClick() {
5419
- var _fetchProductInfoQuer14, _fetchProductInfoQuer15;
5420
- if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer14 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer14 === void 0 || (_fetchProductInfoQuer14 = _fetchProductInfoQuer14.data) === null || _fetchProductInfoQuer14 === void 0 || (_fetchProductInfoQuer14 = _fetchProductInfoQuer14.productinfo) === null || _fetchProductInfoQuer14 === void 0 || (_fetchProductInfoQuer14 = _fetchProductInfoQuer14.serviceinfo) === null || _fetchProductInfoQuer14 === void 0 ? void 0 : _fetchProductInfoQuer14.scheduletype) == 'days') {
5457
+ var _fetchProductInfoQuer18, _fetchProductInfoQuer19;
5458
+ if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer18 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer18 === void 0 || (_fetchProductInfoQuer18 = _fetchProductInfoQuer18.data) === null || _fetchProductInfoQuer18 === void 0 || (_fetchProductInfoQuer18 = _fetchProductInfoQuer18.productinfo) === null || _fetchProductInfoQuer18 === void 0 || (_fetchProductInfoQuer18 = _fetchProductInfoQuer18.serviceinfo) === null || _fetchProductInfoQuer18 === void 0 ? void 0 : _fetchProductInfoQuer18.scheduletype) == 'days') {
5421
5459
  if (addtocardpayloadobj.from.length != 0 && addtocardpayloadobj.to.length != 0 && addtocardpayloadobj.quantity != 0) {
5422
5460
  addtocartfunc();
5423
5461
  // if (sectionproperties.cartbtntype == 'Goes to checkout') {
5424
5462
  // routingcountext(StaticPagesLinksContext.Checkout);
5425
5463
  // }
5426
5464
  }
5427
- } else if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer15 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer15 === void 0 || (_fetchProductInfoQuer15 = _fetchProductInfoQuer15.data) === null || _fetchProductInfoQuer15 === void 0 || (_fetchProductInfoQuer15 = _fetchProductInfoQuer15.productinfo) === null || _fetchProductInfoQuer15 === void 0 || (_fetchProductInfoQuer15 = _fetchProductInfoQuer15.serviceinfo) === null || _fetchProductInfoQuer15 === void 0 ? void 0 : _fetchProductInfoQuer15.scheduletype) == 'minutes') {
5465
+ } else if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer19 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer19 === void 0 || (_fetchProductInfoQuer19 = _fetchProductInfoQuer19.data) === null || _fetchProductInfoQuer19 === void 0 || (_fetchProductInfoQuer19 = _fetchProductInfoQuer19.productinfo) === null || _fetchProductInfoQuer19 === void 0 || (_fetchProductInfoQuer19 = _fetchProductInfoQuer19.serviceinfo) === null || _fetchProductInfoQuer19 === void 0 ? void 0 : _fetchProductInfoQuer19.scheduletype) == 'minutes') {
5428
5466
  if (addtocardpayloadobj.date.length != 0 && addtocardpayloadobj.time.length != 0) {
5429
5467
  addtocartfunc();
5430
5468
  // if (sectionproperties.cartbtntype == 'Goes to checkout') {
@@ -5457,7 +5495,7 @@ var Serviceinfotabs = function Serviceinfotabs(props) {
5457
5495
  size: sectionproperties.cartBtn_iconFontSize
5458
5496
  }), sectionproperties.carticonstyle == 'Shopping cart 2' && /*#__PURE__*/React__default["default"].createElement(MdAddShoppingCart.MdAddShoppingCart, {
5459
5497
  size: sectionproperties.cartBtn_iconFontSize
5460
- })), sectionproperties.overwritecertbtntext == 'Yes' ? langdetect == 'en' ? sectionproperties.cartBtnContentenglish : sectionproperties.cartBtnContentarabic : langdetect == 'en' ? fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer16 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer16 === void 0 || (_fetchProductInfoQuer16 = _fetchProductInfoQuer16.data) === null || _fetchProductInfoQuer16 === void 0 || (_fetchProductInfoQuer16 = _fetchProductInfoQuer16.productinfo) === null || _fetchProductInfoQuer16 === void 0 ? void 0 : _fetchProductInfoQuer16.productactionbuttontext_en : fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer17 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer17 === void 0 || (_fetchProductInfoQuer17 = _fetchProductInfoQuer17.data) === null || _fetchProductInfoQuer17 === void 0 || (_fetchProductInfoQuer17 = _fetchProductInfoQuer17.productinfo) === null || _fetchProductInfoQuer17 === void 0 ? void 0 : _fetchProductInfoQuer17.productactionbuttontext_ar), AddtoCartMutationContext.isLoading && /*#__PURE__*/React__default["default"].createElement("div", {
5498
+ })), sectionproperties.overwritecertbtntext == 'Yes' ? langdetect == 'en' ? sectionproperties.cartBtnContentenglish : sectionproperties.cartBtnContentarabic : langdetect == 'en' ? fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer20 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer20 === void 0 || (_fetchProductInfoQuer20 = _fetchProductInfoQuer20.data) === null || _fetchProductInfoQuer20 === void 0 || (_fetchProductInfoQuer20 = _fetchProductInfoQuer20.productinfo) === null || _fetchProductInfoQuer20 === void 0 ? void 0 : _fetchProductInfoQuer20.productactionbuttontext_en : fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer21 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer21 === void 0 || (_fetchProductInfoQuer21 = _fetchProductInfoQuer21.data) === null || _fetchProductInfoQuer21 === void 0 || (_fetchProductInfoQuer21 = _fetchProductInfoQuer21.productinfo) === null || _fetchProductInfoQuer21 === void 0 ? void 0 : _fetchProductInfoQuer21.productactionbuttontext_ar), AddtoCartMutationContext.isLoading && /*#__PURE__*/React__default["default"].createElement("div", {
5461
5499
  className: ' d-flex align-items-center justify-content-center '
5462
5500
  }, /*#__PURE__*/React__default["default"].createElement(reactCssfxLoading.CircularProgress, {
5463
5501
  color: "white",
@@ -5499,15 +5537,15 @@ var Serviceinfotabs = function Serviceinfotabs(props) {
5499
5537
  }, /*#__PURE__*/React__default["default"].createElement("button", {
5500
5538
  className: "".concat(productinfo_cssstyles.cart_btn) + ' w-100 d-flex align-items-center justify-content-center ',
5501
5539
  onClick: function onClick() {
5502
- var _fetchProductInfoQuer18, _fetchProductInfoQuer19;
5503
- if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer18 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer18 === void 0 || (_fetchProductInfoQuer18 = _fetchProductInfoQuer18.data) === null || _fetchProductInfoQuer18 === void 0 || (_fetchProductInfoQuer18 = _fetchProductInfoQuer18.productinfo) === null || _fetchProductInfoQuer18 === void 0 || (_fetchProductInfoQuer18 = _fetchProductInfoQuer18.serviceinfo) === null || _fetchProductInfoQuer18 === void 0 ? void 0 : _fetchProductInfoQuer18.scheduletype) == 'days') {
5540
+ var _fetchProductInfoQuer22, _fetchProductInfoQuer23;
5541
+ if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer22 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer22 === void 0 || (_fetchProductInfoQuer22 = _fetchProductInfoQuer22.data) === null || _fetchProductInfoQuer22 === void 0 || (_fetchProductInfoQuer22 = _fetchProductInfoQuer22.productinfo) === null || _fetchProductInfoQuer22 === void 0 || (_fetchProductInfoQuer22 = _fetchProductInfoQuer22.serviceinfo) === null || _fetchProductInfoQuer22 === void 0 ? void 0 : _fetchProductInfoQuer22.scheduletype) == 'days') {
5504
5542
  if (addtocardpayloadobj.from.length != 0 && addtocardpayloadobj.to.length != 0 && addtocardpayloadobj.quantity != 0) {
5505
5543
  addtocartfunc();
5506
5544
  if (sectionproperties.cartbtntype == 'Goes to checkout') {
5507
5545
  routingcountext(StaticPagesLinksContext.Checkout);
5508
5546
  }
5509
5547
  }
5510
- } else if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer19 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer19 === void 0 || (_fetchProductInfoQuer19 = _fetchProductInfoQuer19.data) === null || _fetchProductInfoQuer19 === void 0 || (_fetchProductInfoQuer19 = _fetchProductInfoQuer19.productinfo) === null || _fetchProductInfoQuer19 === void 0 || (_fetchProductInfoQuer19 = _fetchProductInfoQuer19.serviceinfo) === null || _fetchProductInfoQuer19 === void 0 ? void 0 : _fetchProductInfoQuer19.scheduletype) == 'minutes') {
5548
+ } else if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer23 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer23 === void 0 || (_fetchProductInfoQuer23 = _fetchProductInfoQuer23.data) === null || _fetchProductInfoQuer23 === void 0 || (_fetchProductInfoQuer23 = _fetchProductInfoQuer23.productinfo) === null || _fetchProductInfoQuer23 === void 0 || (_fetchProductInfoQuer23 = _fetchProductInfoQuer23.serviceinfo) === null || _fetchProductInfoQuer23 === void 0 ? void 0 : _fetchProductInfoQuer23.scheduletype) == 'minutes') {
5511
5549
  if (addtocardpayloadobj.date.length != 0 && addtocardpayloadobj.time.length != 0) {
5512
5550
  addtocartfunc();
5513
5551
  if (sectionproperties.cartbtntype == 'Goes to checkout') {
@@ -5540,7 +5578,7 @@ var Serviceinfotabs = function Serviceinfotabs(props) {
5540
5578
  size: sectionproperties.cartBtn_iconFontSize
5541
5579
  }), sectionproperties.carticonstyle == 'Shopping cart 2' && /*#__PURE__*/React__default["default"].createElement(MdAddShoppingCart.MdAddShoppingCart, {
5542
5580
  size: sectionproperties.cartBtn_iconFontSize
5543
- })), sectionproperties.overwritecertbtntext == 'Yes' ? langdetect == 'en' ? sectionproperties.cartBtnContentenglish : sectionproperties.cartBtnContentarabic : langdetect == 'en' ? fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer20 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer20 === void 0 || (_fetchProductInfoQuer20 = _fetchProductInfoQuer20.data) === null || _fetchProductInfoQuer20 === void 0 || (_fetchProductInfoQuer20 = _fetchProductInfoQuer20.productinfo) === null || _fetchProductInfoQuer20 === void 0 ? void 0 : _fetchProductInfoQuer20.productactionbuttontext_en : fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer21 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer21 === void 0 || (_fetchProductInfoQuer21 = _fetchProductInfoQuer21.data) === null || _fetchProductInfoQuer21 === void 0 || (_fetchProductInfoQuer21 = _fetchProductInfoQuer21.productinfo) === null || _fetchProductInfoQuer21 === void 0 ? void 0 : _fetchProductInfoQuer21.productactionbuttontext_ar), AddtoCartMutationContext.isLoading && /*#__PURE__*/React__default["default"].createElement("div", {
5581
+ })), sectionproperties.overwritecertbtntext == 'Yes' ? langdetect == 'en' ? sectionproperties.cartBtnContentenglish : sectionproperties.cartBtnContentarabic : langdetect == 'en' ? fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer24 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer24 === void 0 || (_fetchProductInfoQuer24 = _fetchProductInfoQuer24.data) === null || _fetchProductInfoQuer24 === void 0 || (_fetchProductInfoQuer24 = _fetchProductInfoQuer24.productinfo) === null || _fetchProductInfoQuer24 === void 0 ? void 0 : _fetchProductInfoQuer24.productactionbuttontext_en : fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer25 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer25 === void 0 || (_fetchProductInfoQuer25 = _fetchProductInfoQuer25.data) === null || _fetchProductInfoQuer25 === void 0 || (_fetchProductInfoQuer25 = _fetchProductInfoQuer25.productinfo) === null || _fetchProductInfoQuer25 === void 0 ? void 0 : _fetchProductInfoQuer25.productactionbuttontext_ar), AddtoCartMutationContext.isLoading && /*#__PURE__*/React__default["default"].createElement("div", {
5544
5582
  className: ' d-flex align-items-center justify-content-center '
5545
5583
  }, /*#__PURE__*/React__default["default"].createElement(reactCssfxLoading.CircularProgress, {
5546
5584
  color: "white",
@@ -5584,13 +5622,13 @@ var Serviceinfotabs = function Serviceinfotabs(props) {
5584
5622
  }, /*#__PURE__*/React__default["default"].createElement("button", {
5585
5623
  className: "".concat(productinfo_cssstyles.checkoutbtn, " ") + ' d-flex align-items-center justify-content-center ml-sm-auto mr-sm-auto mb-sm-2 ',
5586
5624
  onClick: function onClick() {
5587
- var _fetchProductInfoQuer22, _fetchProductInfoQuer23;
5588
- if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer22 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer22 === void 0 || (_fetchProductInfoQuer22 = _fetchProductInfoQuer22.data) === null || _fetchProductInfoQuer22 === void 0 || (_fetchProductInfoQuer22 = _fetchProductInfoQuer22.productinfo) === null || _fetchProductInfoQuer22 === void 0 || (_fetchProductInfoQuer22 = _fetchProductInfoQuer22.serviceinfo) === null || _fetchProductInfoQuer22 === void 0 ? void 0 : _fetchProductInfoQuer22.scheduletype) == 'days') {
5625
+ var _fetchProductInfoQuer26, _fetchProductInfoQuer27;
5626
+ if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer26 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer26 === void 0 || (_fetchProductInfoQuer26 = _fetchProductInfoQuer26.data) === null || _fetchProductInfoQuer26 === void 0 || (_fetchProductInfoQuer26 = _fetchProductInfoQuer26.productinfo) === null || _fetchProductInfoQuer26 === void 0 || (_fetchProductInfoQuer26 = _fetchProductInfoQuer26.serviceinfo) === null || _fetchProductInfoQuer26 === void 0 ? void 0 : _fetchProductInfoQuer26.scheduletype) == 'days') {
5589
5627
  if (addtocardpayloadobj.from.length != 0 && addtocardpayloadobj.to.length != 0 && addtocardpayloadobj.quantity != 0) {
5590
5628
  addtocartfunc();
5591
5629
  routingcountext(StaticPagesLinksContext.Checkout);
5592
5630
  }
5593
- } else if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer23 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer23 === void 0 || (_fetchProductInfoQuer23 = _fetchProductInfoQuer23.data) === null || _fetchProductInfoQuer23 === void 0 || (_fetchProductInfoQuer23 = _fetchProductInfoQuer23.productinfo) === null || _fetchProductInfoQuer23 === void 0 || (_fetchProductInfoQuer23 = _fetchProductInfoQuer23.serviceinfo) === null || _fetchProductInfoQuer23 === void 0 ? void 0 : _fetchProductInfoQuer23.scheduletype) == 'minutes') {
5631
+ } else if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer27 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer27 === void 0 || (_fetchProductInfoQuer27 = _fetchProductInfoQuer27.data) === null || _fetchProductInfoQuer27 === void 0 || (_fetchProductInfoQuer27 = _fetchProductInfoQuer27.productinfo) === null || _fetchProductInfoQuer27 === void 0 || (_fetchProductInfoQuer27 = _fetchProductInfoQuer27.serviceinfo) === null || _fetchProductInfoQuer27 === void 0 ? void 0 : _fetchProductInfoQuer27.scheduletype) == 'minutes') {
5594
5632
  if (addtocardpayloadobj.date.length != 0 && addtocardpayloadobj.time.length != 0) {
5595
5633
  addtocartfunc();
5596
5634
  routingcountext(StaticPagesLinksContext.Checkout);
package/dist/index.esm.js CHANGED
@@ -4664,7 +4664,7 @@ var Product_itemtype = function Product_itemtype(props) {
4664
4664
  function ownKeys$2z(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4665
4665
  function _objectSpread$2z(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2z(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2z(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4666
4666
  var Serviceinfotabs = function Serviceinfotabs(props) {
4667
- var _fetchProductInfoQuer10, _fetchProductInfoQuer11, _fetchProductInfoQuer12, _fetchProductInfoQuer13, _fetchProductInfoQuer16, _fetchProductInfoQuer17, _fetchProductInfoQuer20, _fetchProductInfoQuer21;
4667
+ var _fetchProductInfoQuer12, _fetchProductInfoQuer13, _fetchProductInfoQuer14, _fetchProductInfoQuer15, _fetchProductInfoQuer16, _fetchProductInfoQuer17, _fetchProductInfoQuer20, _fetchProductInfoQuer21, _fetchProductInfoQuer24, _fetchProductInfoQuer25;
4668
4668
  var langdetect = props.actions.langdetect;
4669
4669
  var lang = props.actions.lang;
4670
4670
  var sectionproperties = props.actions.sectionproperties;
@@ -4718,6 +4718,10 @@ var Serviceinfotabs = function Serviceinfotabs(props) {
4718
4718
  _useState12 = _slicedToArray(_useState11, 2),
4719
4719
  disableddates = _useState12[0],
4720
4720
  setdisableddates = _useState12[1];
4721
+ var _useState13 = useState([]),
4722
+ _useState14 = _slicedToArray(_useState13, 2),
4723
+ minutes_Active_days_array = _useState14[0],
4724
+ setminutes_Active_days_array = _useState14[1];
4721
4725
  useEffect(function () {
4722
4726
  setaddtocardpayloadobj(_objectSpread$2z(_objectSpread$2z({}, addtocardpayloadobj), {}, {
4723
4727
  item_type: 'service'
@@ -4753,7 +4757,7 @@ var Serviceinfotabs = function Serviceinfotabs(props) {
4753
4757
  }
4754
4758
  }, [addtocardpayloadobj.from, addtocardpayloadobj.to]);
4755
4759
  useEffect(function () {
4756
- var _fetchProductInfoQuer;
4760
+ var _fetchProductInfoQuer, _fetchProductInfoQuer6;
4757
4761
  if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer === void 0 || (_fetchProductInfoQuer = _fetchProductInfoQuer.data) === null || _fetchProductInfoQuer === void 0 || (_fetchProductInfoQuer = _fetchProductInfoQuer.productinfo) === null || _fetchProductInfoQuer === void 0 || (_fetchProductInfoQuer = _fetchProductInfoQuer.serviceinfo) === null || _fetchProductInfoQuer === void 0 ? void 0 : _fetchProductInfoQuer.scheduletype) == 'days') {
4758
4762
  var _fetchProductInfoQuer2, _fetchProductInfoQuer3;
4759
4763
  if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer2 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer2 === void 0 || (_fetchProductInfoQuer2 = _fetchProductInfoQuer2.data) === null || _fetchProductInfoQuer2 === void 0 || (_fetchProductInfoQuer2 = _fetchProductInfoQuer2.productinfo) === null || _fetchProductInfoQuer2 === void 0 ? void 0 : _fetchProductInfoQuer2.disabled_dates) != undefined && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer3 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer3 === void 0 || (_fetchProductInfoQuer3 = _fetchProductInfoQuer3.data) === null || _fetchProductInfoQuer3 === void 0 || (_fetchProductInfoQuer3 = _fetchProductInfoQuer3.productinfo) === null || _fetchProductInfoQuer3 === void 0 ? void 0 : _fetchProductInfoQuer3.disabled_dates) != null) {
@@ -4769,7 +4773,40 @@ var Serviceinfotabs = function Serviceinfotabs(props) {
4769
4773
  }
4770
4774
  }
4771
4775
  }
4776
+ if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer6 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer6 === void 0 || (_fetchProductInfoQuer6 = _fetchProductInfoQuer6.data) === null || _fetchProductInfoQuer6 === void 0 || (_fetchProductInfoQuer6 = _fetchProductInfoQuer6.productinfo) === null || _fetchProductInfoQuer6 === void 0 || (_fetchProductInfoQuer6 = _fetchProductInfoQuer6.serviceinfo) === null || _fetchProductInfoQuer6 === void 0 ? void 0 : _fetchProductInfoQuer6.scheduletype) == 'minutes') {
4777
+ var _fetchProductInfoQuer7;
4778
+ var serviceDays = fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer7 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer7 === void 0 || (_fetchProductInfoQuer7 = _fetchProductInfoQuer7.data) === null || _fetchProductInfoQuer7 === void 0 || (_fetchProductInfoQuer7 = _fetchProductInfoQuer7.productinfo) === null || _fetchProductInfoQuer7 === void 0 || (_fetchProductInfoQuer7 = _fetchProductInfoQuer7.serviceinfo) === null || _fetchProductInfoQuer7 === void 0 ? void 0 : _fetchProductInfoQuer7.servicedays;
4779
+ if (Array.isArray(serviceDays) && serviceDays.length > 0) {
4780
+ var uniqueDayNames = _toConsumableArray(new Set(serviceDays.map(function (day) {
4781
+ return day === null || day === void 0 ? void 0 : day.dayname;
4782
+ }).filter(function (dayname) {
4783
+ return typeof dayname === 'string' && dayname.trim() !== '';
4784
+ })));
4785
+ setminutes_Active_days_array(uniqueDayNames);
4786
+ } else {
4787
+ // Optionally reset the state if serviceDays is undefined, null, or empty
4788
+ setminutes_Active_days_array([]);
4789
+ }
4790
+ }
4772
4791
  }, [addtocardpayloadobj.from, addtocardpayloadobj.to]);
4792
+ var isAllowedDay = function isAllowedDay(date) {
4793
+ if (minutes_Active_days_array != undefined && minutes_Active_days_array != null && minutes_Active_days_array.length != 0) {
4794
+ var dayNameToNumber = {
4795
+ Sun: 0,
4796
+ Mond: 1,
4797
+ Tues: 2,
4798
+ Wednes: 3,
4799
+ Thurs: 4,
4800
+ Fri: 5,
4801
+ Sat: 6
4802
+ };
4803
+ var dayNumber = date.getDay(); // 0 = Sunday ... 6 = Saturday
4804
+ var allowedDays = minutes_Active_days_array.map(function (day) {
4805
+ return dayNameToNumber[day];
4806
+ });
4807
+ return allowedDays.includes(dayNumber);
4808
+ }
4809
+ };
4773
4810
  var TabsStyles = {
4774
4811
  sidebar_item: css({
4775
4812
  background: sectionproperties.tabcontainerbgcolor,
@@ -4886,16 +4923,16 @@ var Serviceinfotabs = function Serviceinfotabs(props) {
4886
4923
  return lastChoosedIndex;
4887
4924
  }
4888
4925
  var chooseitemslot = function chooseitemslot(slot, index) {
4889
- var _fetchProductInfoQuer6, _fetchProductInfoQuer7, _fetchProductInfoQuer8, _fetchProductInfoQuer9;
4926
+ var _fetchProductInfoQuer8, _fetchProductInfoQuer9, _fetchProductInfoQuer10, _fetchProductInfoQuer11;
4890
4927
  var reservedslottobetaken = null;
4891
4928
  var reservedslotArrtobetaken = [];
4892
4929
  var slotschooosedcounter_tobe_usedonly_in_merge = 0;
4893
4930
  var is_multi_slots = false;
4894
4931
  var is_slots_must_be_adjacent = false;
4895
- if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer6 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer6 === void 0 || (_fetchProductInfoQuer6 = _fetchProductInfoQuer6.data) === null || _fetchProductInfoQuer6 === void 0 || (_fetchProductInfoQuer6 = _fetchProductInfoQuer6.productinfo) === null || _fetchProductInfoQuer6 === void 0 || (_fetchProductInfoQuer6 = _fetchProductInfoQuer6.serviceinfo) === null || _fetchProductInfoQuer6 === void 0 ? void 0 : _fetchProductInfoQuer6.is_slots_adjacent) != undefined && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer7 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer7 === void 0 || (_fetchProductInfoQuer7 = _fetchProductInfoQuer7.data) === null || _fetchProductInfoQuer7 === void 0 || (_fetchProductInfoQuer7 = _fetchProductInfoQuer7.productinfo) === null || _fetchProductInfoQuer7 === void 0 || (_fetchProductInfoQuer7 = _fetchProductInfoQuer7.serviceinfo) === null || _fetchProductInfoQuer7 === void 0 ? void 0 : _fetchProductInfoQuer7.is_slots_adjacent) == 1) {
4932
+ if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer8 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer8 === void 0 || (_fetchProductInfoQuer8 = _fetchProductInfoQuer8.data) === null || _fetchProductInfoQuer8 === void 0 || (_fetchProductInfoQuer8 = _fetchProductInfoQuer8.productinfo) === null || _fetchProductInfoQuer8 === void 0 || (_fetchProductInfoQuer8 = _fetchProductInfoQuer8.serviceinfo) === null || _fetchProductInfoQuer8 === void 0 ? void 0 : _fetchProductInfoQuer8.is_slots_adjacent) != undefined && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer9 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer9 === void 0 || (_fetchProductInfoQuer9 = _fetchProductInfoQuer9.data) === null || _fetchProductInfoQuer9 === void 0 || (_fetchProductInfoQuer9 = _fetchProductInfoQuer9.productinfo) === null || _fetchProductInfoQuer9 === void 0 || (_fetchProductInfoQuer9 = _fetchProductInfoQuer9.serviceinfo) === null || _fetchProductInfoQuer9 === void 0 ? void 0 : _fetchProductInfoQuer9.is_slots_adjacent) == 1) {
4896
4933
  is_slots_must_be_adjacent = true;
4897
4934
  }
4898
- if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer8 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer8 === void 0 || (_fetchProductInfoQuer8 = _fetchProductInfoQuer8.data) === null || _fetchProductInfoQuer8 === void 0 || (_fetchProductInfoQuer8 = _fetchProductInfoQuer8.productinfo) === null || _fetchProductInfoQuer8 === void 0 || (_fetchProductInfoQuer8 = _fetchProductInfoQuer8.serviceinfo) === null || _fetchProductInfoQuer8 === void 0 ? void 0 : _fetchProductInfoQuer8.is_slots_multi) != undefined && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer9 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer9 === void 0 || (_fetchProductInfoQuer9 = _fetchProductInfoQuer9.data) === null || _fetchProductInfoQuer9 === void 0 || (_fetchProductInfoQuer9 = _fetchProductInfoQuer9.productinfo) === null || _fetchProductInfoQuer9 === void 0 || (_fetchProductInfoQuer9 = _fetchProductInfoQuer9.serviceinfo) === null || _fetchProductInfoQuer9 === void 0 ? void 0 : _fetchProductInfoQuer9.is_slots_multi) == 1) {
4935
+ if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer10 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer10 === void 0 || (_fetchProductInfoQuer10 = _fetchProductInfoQuer10.data) === null || _fetchProductInfoQuer10 === void 0 || (_fetchProductInfoQuer10 = _fetchProductInfoQuer10.productinfo) === null || _fetchProductInfoQuer10 === void 0 || (_fetchProductInfoQuer10 = _fetchProductInfoQuer10.serviceinfo) === null || _fetchProductInfoQuer10 === void 0 ? void 0 : _fetchProductInfoQuer10.is_slots_multi) != undefined && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer11 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer11 === void 0 || (_fetchProductInfoQuer11 = _fetchProductInfoQuer11.data) === null || _fetchProductInfoQuer11 === void 0 || (_fetchProductInfoQuer11 = _fetchProductInfoQuer11.productinfo) === null || _fetchProductInfoQuer11 === void 0 || (_fetchProductInfoQuer11 = _fetchProductInfoQuer11.serviceinfo) === null || _fetchProductInfoQuer11 === void 0 ? void 0 : _fetchProductInfoQuer11.is_slots_multi) == 1) {
4899
4936
  is_multi_slots = true;
4900
4937
  }
4901
4938
  var tempslots = _toConsumableArray(slots);
@@ -5017,10 +5054,10 @@ var Serviceinfotabs = function Serviceinfotabs(props) {
5017
5054
  // }
5018
5055
  // };
5019
5056
  return /*#__PURE__*/React.createElement("div", {
5020
- className: (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer10 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer10 === void 0 || (_fetchProductInfoQuer10 = _fetchProductInfoQuer10.data) === null || _fetchProductInfoQuer10 === void 0 || (_fetchProductInfoQuer10 = _fetchProductInfoQuer10.productinfo) === null || _fetchProductInfoQuer10 === void 0 || (_fetchProductInfoQuer10 = _fetchProductInfoQuer10.serviceinfo) === null || _fetchProductInfoQuer10 === void 0 ? void 0 : _fetchProductInfoQuer10.scheduletype) == 'minutes' ? 'col-lg-12 mt-3 p-0' : 'col-lg-10 mt-3 p-0'
5057
+ className: (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer12 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer12 === void 0 || (_fetchProductInfoQuer12 = _fetchProductInfoQuer12.data) === null || _fetchProductInfoQuer12 === void 0 || (_fetchProductInfoQuer12 = _fetchProductInfoQuer12.productinfo) === null || _fetchProductInfoQuer12 === void 0 || (_fetchProductInfoQuer12 = _fetchProductInfoQuer12.serviceinfo) === null || _fetchProductInfoQuer12 === void 0 ? void 0 : _fetchProductInfoQuer12.scheduletype) == 'minutes' ? 'col-lg-12 mt-3 p-0' : 'col-lg-10 mt-3 p-0'
5021
5058
  }, /*#__PURE__*/React.createElement("div", {
5022
5059
  "class": "row m-0 w-100"
5023
- }, (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer11 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer11 === void 0 || (_fetchProductInfoQuer11 = _fetchProductInfoQuer11.data) === null || _fetchProductInfoQuer11 === void 0 || (_fetchProductInfoQuer11 = _fetchProductInfoQuer11.productinfo) === null || _fetchProductInfoQuer11 === void 0 || (_fetchProductInfoQuer11 = _fetchProductInfoQuer11.serviceinfo) === null || _fetchProductInfoQuer11 === void 0 ? void 0 : _fetchProductInfoQuer11.scheduletype) == 'days' && /*#__PURE__*/React.createElement("div", {
5060
+ }, (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer13 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer13 === void 0 || (_fetchProductInfoQuer13 = _fetchProductInfoQuer13.data) === null || _fetchProductInfoQuer13 === void 0 || (_fetchProductInfoQuer13 = _fetchProductInfoQuer13.productinfo) === null || _fetchProductInfoQuer13 === void 0 || (_fetchProductInfoQuer13 = _fetchProductInfoQuer13.serviceinfo) === null || _fetchProductInfoQuer13 === void 0 ? void 0 : _fetchProductInfoQuer13.scheduletype) == 'days' && /*#__PURE__*/React.createElement("div", {
5024
5061
  "class": "row m-0 w-100"
5025
5062
  }, /*#__PURE__*/React.createElement("div", {
5026
5063
  "class": "col-lg-6 col-md-12 col-sm-12 mb-2 pl-1 pr-1"
@@ -5064,7 +5101,7 @@ var Serviceinfotabs = function Serviceinfotabs(props) {
5064
5101
  }));
5065
5102
  setselectedtodate(date);
5066
5103
  }
5067
- })))))), (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer12 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer12 === void 0 || (_fetchProductInfoQuer12 = _fetchProductInfoQuer12.data) === null || _fetchProductInfoQuer12 === void 0 || (_fetchProductInfoQuer12 = _fetchProductInfoQuer12.productinfo) === null || _fetchProductInfoQuer12 === void 0 || (_fetchProductInfoQuer12 = _fetchProductInfoQuer12.serviceinfo) === null || _fetchProductInfoQuer12 === void 0 ? void 0 : _fetchProductInfoQuer12.scheduletype) == 'minutes' && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
5104
+ })))))), (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer14 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer14 === void 0 || (_fetchProductInfoQuer14 = _fetchProductInfoQuer14.data) === null || _fetchProductInfoQuer14 === void 0 || (_fetchProductInfoQuer14 = _fetchProductInfoQuer14.productinfo) === null || _fetchProductInfoQuer14 === void 0 || (_fetchProductInfoQuer14 = _fetchProductInfoQuer14.serviceinfo) === null || _fetchProductInfoQuer14 === void 0 ? void 0 : _fetchProductInfoQuer14.scheduletype) == 'minutes' && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
5068
5105
  "class": "col-lg-12 col-md-12 col-sm-12 mb-2"
5069
5106
  }, /*#__PURE__*/React.createElement("div", {
5070
5107
  "class": "row m-0 w-100"
@@ -5085,39 +5122,40 @@ var Serviceinfotabs = function Serviceinfotabs(props) {
5085
5122
  }
5086
5123
  }, /*#__PURE__*/React.createElement("div", {
5087
5124
  "class": "w-100 px-2 h-100 allcentered"
5088
- }, /*#__PURE__*/React.createElement("input", {
5089
- type: "date",
5090
- "class": ' w-100 allcentered pl-1 pr-1 ',
5091
- style: {
5092
- background: 'transparent',
5093
- borderWidth: 0,
5094
- height: '100%',
5095
- zIndex: 2,
5096
- color: sectionproperties.inputfieldcolor
5097
- },
5098
- min: fetchProductInfoQueryContext.data.data.productinfo.serviceinfo.reservationstarts,
5099
- max: fetchProductInfoQueryContext.data.data.productinfo.serviceinfo.reservationends,
5100
- onChange: function onChange(event) {
5101
- // setaddtocardpayloadobj({ ...addtocardpayloadobj, date: event.target.value });
5102
- setaddtocardpayloadobj(_objectSpread$2z(_objectSpread$2z({}, addtocardpayloadobj), {}, {
5103
- date: event.target.value,
5104
- time: '',
5105
- reservedslotArrtobetaken: [],
5106
- quantity: 1
5107
- }));
5108
- setslots([]);
5109
- setcurrentmutatestate('/fetchserviceslots');
5110
- GeneralAPIMutationContext.mutate({
5111
- endpointurl: '/fetchserviceslots',
5112
- productid: fetchProductInfoQueryContext.data.data.productinfo.productid,
5113
- reqdate: event.target.value,
5114
- mutateSuccesscallback: function mutateSuccesscallback(data, variables) {
5115
- setslots(data.data.slots);
5116
- if (!data.data.slots || data.data.slots.length === 0) {
5117
- NotificationManager.warning('', 'Please choose another date');
5125
+ }, /*#__PURE__*/React.createElement(DatePicker, {
5126
+ minDate: fetchProductInfoQueryContext !== null && fetchProductInfoQueryContext !== void 0 && (_fetchProductInfoQuer15 = fetchProductInfoQueryContext.data) !== null && _fetchProductInfoQuer15 !== void 0 && (_fetchProductInfoQuer15 = _fetchProductInfoQuer15.data) !== null && _fetchProductInfoQuer15 !== void 0 && (_fetchProductInfoQuer15 = _fetchProductInfoQuer15.productinfo) !== null && _fetchProductInfoQuer15 !== void 0 && (_fetchProductInfoQuer15 = _fetchProductInfoQuer15.serviceinfo) !== null && _fetchProductInfoQuer15 !== void 0 && _fetchProductInfoQuer15.reservationstarts ? new Date(fetchProductInfoQueryContext.data.data.productinfo.serviceinfo.reservationstarts) : null,
5127
+ maxDate: fetchProductInfoQueryContext !== null && fetchProductInfoQueryContext !== void 0 && (_fetchProductInfoQuer16 = fetchProductInfoQueryContext.data) !== null && _fetchProductInfoQuer16 !== void 0 && (_fetchProductInfoQuer16 = _fetchProductInfoQuer16.data) !== null && _fetchProductInfoQuer16 !== void 0 && (_fetchProductInfoQuer16 = _fetchProductInfoQuer16.productinfo) !== null && _fetchProductInfoQuer16 !== void 0 && (_fetchProductInfoQuer16 = _fetchProductInfoQuer16.serviceinfo) !== null && _fetchProductInfoQuer16 !== void 0 && _fetchProductInfoQuer16.reservationends ? new Date(fetchProductInfoQueryContext.data.data.productinfo.serviceinfo.reservationends) : null,
5128
+ filterDate: isAllowedDay,
5129
+ selected: selectedfromdate,
5130
+ excludeDates: disableddates,
5131
+ onChange: function onChange(date) {
5132
+ // setaddtocardpayloadobj({ ...addtocardpayloadobj, from: date });
5133
+ if (date) {
5134
+ var _year = date.getFullYear();
5135
+ var _month = String(date.getMonth() + 1).padStart(2, '0'); // Months are 0-based
5136
+ var _day = String(date.getDate()).padStart(2, '0');
5137
+ var formattedDate = "".concat(_year, "-").concat(_month, "-").concat(_day);
5138
+ setaddtocardpayloadobj(_objectSpread$2z(_objectSpread$2z({}, addtocardpayloadobj), {}, {
5139
+ date: formattedDate,
5140
+ time: '',
5141
+ reservedslotArrtobetaken: [],
5142
+ quantity: 1
5143
+ }));
5144
+ setslots([]);
5145
+ setcurrentmutatestate('/fetchserviceslots');
5146
+ GeneralAPIMutationContext.mutate({
5147
+ endpointurl: '/fetchserviceslots',
5148
+ productid: fetchProductInfoQueryContext.data.data.productinfo.productid,
5149
+ reqdate: formattedDate,
5150
+ mutateSuccesscallback: function mutateSuccesscallback(data, variables) {
5151
+ setslots(data.data.slots);
5152
+ if (!data.data.slots || data.data.slots.length === 0) {
5153
+ NotificationManager.warning('', 'Please choose another date');
5154
+ }
5118
5155
  }
5119
- }
5120
- });
5156
+ });
5157
+ setselectedfromdate(date);
5158
+ }
5121
5159
  }
5122
5160
  }), /*#__PURE__*/React.createElement("div", {
5123
5161
  "class": "h-100 allcentered",
@@ -5304,7 +5342,7 @@ var Serviceinfotabs = function Serviceinfotabs(props) {
5304
5342
  className: "col-lg-12 p-0 mb-3"
5305
5343
  }, /*#__PURE__*/React.createElement("div", {
5306
5344
  className: "row m-0 w-100"
5307
- }, (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer13 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer13 === void 0 || (_fetchProductInfoQuer13 = _fetchProductInfoQuer13.data) === null || _fetchProductInfoQuer13 === void 0 || (_fetchProductInfoQuer13 = _fetchProductInfoQuer13.productinfo) === null || _fetchProductInfoQuer13 === void 0 || (_fetchProductInfoQuer13 = _fetchProductInfoQuer13.serviceinfo) === null || _fetchProductInfoQuer13 === void 0 ? void 0 : _fetchProductInfoQuer13.scheduletype) == 'days' && /*#__PURE__*/React.createElement("div", {
5345
+ }, (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer17 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer17 === void 0 || (_fetchProductInfoQuer17 = _fetchProductInfoQuer17.data) === null || _fetchProductInfoQuer17 === void 0 || (_fetchProductInfoQuer17 = _fetchProductInfoQuer17.productinfo) === null || _fetchProductInfoQuer17 === void 0 || (_fetchProductInfoQuer17 = _fetchProductInfoQuer17.serviceinfo) === null || _fetchProductInfoQuer17 === void 0 ? void 0 : _fetchProductInfoQuer17.scheduletype) == 'days' && /*#__PURE__*/React.createElement("div", {
5308
5346
  className: "col-lg-12 p-0"
5309
5347
  }, /*#__PURE__*/React.createElement("div", {
5310
5348
  className: "row m-0 w-100"
@@ -5368,15 +5406,15 @@ var Serviceinfotabs = function Serviceinfotabs(props) {
5368
5406
  }, /*#__PURE__*/React.createElement("button", {
5369
5407
  className: "".concat(productinfo_cssstyles.cart_btn, " ") + ' d-flex align-items-center justify-content-center ml-sm-auto mr-sm-auto mb-sm-2 ',
5370
5408
  onClick: function onClick() {
5371
- var _fetchProductInfoQuer14, _fetchProductInfoQuer15;
5372
- if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer14 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer14 === void 0 || (_fetchProductInfoQuer14 = _fetchProductInfoQuer14.data) === null || _fetchProductInfoQuer14 === void 0 || (_fetchProductInfoQuer14 = _fetchProductInfoQuer14.productinfo) === null || _fetchProductInfoQuer14 === void 0 || (_fetchProductInfoQuer14 = _fetchProductInfoQuer14.serviceinfo) === null || _fetchProductInfoQuer14 === void 0 ? void 0 : _fetchProductInfoQuer14.scheduletype) == 'days') {
5409
+ var _fetchProductInfoQuer18, _fetchProductInfoQuer19;
5410
+ if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer18 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer18 === void 0 || (_fetchProductInfoQuer18 = _fetchProductInfoQuer18.data) === null || _fetchProductInfoQuer18 === void 0 || (_fetchProductInfoQuer18 = _fetchProductInfoQuer18.productinfo) === null || _fetchProductInfoQuer18 === void 0 || (_fetchProductInfoQuer18 = _fetchProductInfoQuer18.serviceinfo) === null || _fetchProductInfoQuer18 === void 0 ? void 0 : _fetchProductInfoQuer18.scheduletype) == 'days') {
5373
5411
  if (addtocardpayloadobj.from.length != 0 && addtocardpayloadobj.to.length != 0 && addtocardpayloadobj.quantity != 0) {
5374
5412
  addtocartfunc();
5375
5413
  // if (sectionproperties.cartbtntype == 'Goes to checkout') {
5376
5414
  // routingcountext(StaticPagesLinksContext.Checkout);
5377
5415
  // }
5378
5416
  }
5379
- } else if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer15 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer15 === void 0 || (_fetchProductInfoQuer15 = _fetchProductInfoQuer15.data) === null || _fetchProductInfoQuer15 === void 0 || (_fetchProductInfoQuer15 = _fetchProductInfoQuer15.productinfo) === null || _fetchProductInfoQuer15 === void 0 || (_fetchProductInfoQuer15 = _fetchProductInfoQuer15.serviceinfo) === null || _fetchProductInfoQuer15 === void 0 ? void 0 : _fetchProductInfoQuer15.scheduletype) == 'minutes') {
5417
+ } else if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer19 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer19 === void 0 || (_fetchProductInfoQuer19 = _fetchProductInfoQuer19.data) === null || _fetchProductInfoQuer19 === void 0 || (_fetchProductInfoQuer19 = _fetchProductInfoQuer19.productinfo) === null || _fetchProductInfoQuer19 === void 0 || (_fetchProductInfoQuer19 = _fetchProductInfoQuer19.serviceinfo) === null || _fetchProductInfoQuer19 === void 0 ? void 0 : _fetchProductInfoQuer19.scheduletype) == 'minutes') {
5380
5418
  if (addtocardpayloadobj.date.length != 0 && addtocardpayloadobj.time.length != 0) {
5381
5419
  addtocartfunc();
5382
5420
  // if (sectionproperties.cartbtntype == 'Goes to checkout') {
@@ -5409,7 +5447,7 @@ var Serviceinfotabs = function Serviceinfotabs(props) {
5409
5447
  size: sectionproperties.cartBtn_iconFontSize
5410
5448
  }), sectionproperties.carticonstyle == 'Shopping cart 2' && /*#__PURE__*/React.createElement(MdAddShoppingCart, {
5411
5449
  size: sectionproperties.cartBtn_iconFontSize
5412
- })), sectionproperties.overwritecertbtntext == 'Yes' ? langdetect == 'en' ? sectionproperties.cartBtnContentenglish : sectionproperties.cartBtnContentarabic : langdetect == 'en' ? fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer16 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer16 === void 0 || (_fetchProductInfoQuer16 = _fetchProductInfoQuer16.data) === null || _fetchProductInfoQuer16 === void 0 || (_fetchProductInfoQuer16 = _fetchProductInfoQuer16.productinfo) === null || _fetchProductInfoQuer16 === void 0 ? void 0 : _fetchProductInfoQuer16.productactionbuttontext_en : fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer17 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer17 === void 0 || (_fetchProductInfoQuer17 = _fetchProductInfoQuer17.data) === null || _fetchProductInfoQuer17 === void 0 || (_fetchProductInfoQuer17 = _fetchProductInfoQuer17.productinfo) === null || _fetchProductInfoQuer17 === void 0 ? void 0 : _fetchProductInfoQuer17.productactionbuttontext_ar), AddtoCartMutationContext.isLoading && /*#__PURE__*/React.createElement("div", {
5450
+ })), sectionproperties.overwritecertbtntext == 'Yes' ? langdetect == 'en' ? sectionproperties.cartBtnContentenglish : sectionproperties.cartBtnContentarabic : langdetect == 'en' ? fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer20 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer20 === void 0 || (_fetchProductInfoQuer20 = _fetchProductInfoQuer20.data) === null || _fetchProductInfoQuer20 === void 0 || (_fetchProductInfoQuer20 = _fetchProductInfoQuer20.productinfo) === null || _fetchProductInfoQuer20 === void 0 ? void 0 : _fetchProductInfoQuer20.productactionbuttontext_en : fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer21 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer21 === void 0 || (_fetchProductInfoQuer21 = _fetchProductInfoQuer21.data) === null || _fetchProductInfoQuer21 === void 0 || (_fetchProductInfoQuer21 = _fetchProductInfoQuer21.productinfo) === null || _fetchProductInfoQuer21 === void 0 ? void 0 : _fetchProductInfoQuer21.productactionbuttontext_ar), AddtoCartMutationContext.isLoading && /*#__PURE__*/React.createElement("div", {
5413
5451
  className: ' d-flex align-items-center justify-content-center '
5414
5452
  }, /*#__PURE__*/React.createElement(CircularProgress, {
5415
5453
  color: "white",
@@ -5451,15 +5489,15 @@ var Serviceinfotabs = function Serviceinfotabs(props) {
5451
5489
  }, /*#__PURE__*/React.createElement("button", {
5452
5490
  className: "".concat(productinfo_cssstyles.cart_btn) + ' w-100 d-flex align-items-center justify-content-center ',
5453
5491
  onClick: function onClick() {
5454
- var _fetchProductInfoQuer18, _fetchProductInfoQuer19;
5455
- if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer18 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer18 === void 0 || (_fetchProductInfoQuer18 = _fetchProductInfoQuer18.data) === null || _fetchProductInfoQuer18 === void 0 || (_fetchProductInfoQuer18 = _fetchProductInfoQuer18.productinfo) === null || _fetchProductInfoQuer18 === void 0 || (_fetchProductInfoQuer18 = _fetchProductInfoQuer18.serviceinfo) === null || _fetchProductInfoQuer18 === void 0 ? void 0 : _fetchProductInfoQuer18.scheduletype) == 'days') {
5492
+ var _fetchProductInfoQuer22, _fetchProductInfoQuer23;
5493
+ if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer22 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer22 === void 0 || (_fetchProductInfoQuer22 = _fetchProductInfoQuer22.data) === null || _fetchProductInfoQuer22 === void 0 || (_fetchProductInfoQuer22 = _fetchProductInfoQuer22.productinfo) === null || _fetchProductInfoQuer22 === void 0 || (_fetchProductInfoQuer22 = _fetchProductInfoQuer22.serviceinfo) === null || _fetchProductInfoQuer22 === void 0 ? void 0 : _fetchProductInfoQuer22.scheduletype) == 'days') {
5456
5494
  if (addtocardpayloadobj.from.length != 0 && addtocardpayloadobj.to.length != 0 && addtocardpayloadobj.quantity != 0) {
5457
5495
  addtocartfunc();
5458
5496
  if (sectionproperties.cartbtntype == 'Goes to checkout') {
5459
5497
  routingcountext(StaticPagesLinksContext.Checkout);
5460
5498
  }
5461
5499
  }
5462
- } else if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer19 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer19 === void 0 || (_fetchProductInfoQuer19 = _fetchProductInfoQuer19.data) === null || _fetchProductInfoQuer19 === void 0 || (_fetchProductInfoQuer19 = _fetchProductInfoQuer19.productinfo) === null || _fetchProductInfoQuer19 === void 0 || (_fetchProductInfoQuer19 = _fetchProductInfoQuer19.serviceinfo) === null || _fetchProductInfoQuer19 === void 0 ? void 0 : _fetchProductInfoQuer19.scheduletype) == 'minutes') {
5500
+ } else if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer23 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer23 === void 0 || (_fetchProductInfoQuer23 = _fetchProductInfoQuer23.data) === null || _fetchProductInfoQuer23 === void 0 || (_fetchProductInfoQuer23 = _fetchProductInfoQuer23.productinfo) === null || _fetchProductInfoQuer23 === void 0 || (_fetchProductInfoQuer23 = _fetchProductInfoQuer23.serviceinfo) === null || _fetchProductInfoQuer23 === void 0 ? void 0 : _fetchProductInfoQuer23.scheduletype) == 'minutes') {
5463
5501
  if (addtocardpayloadobj.date.length != 0 && addtocardpayloadobj.time.length != 0) {
5464
5502
  addtocartfunc();
5465
5503
  if (sectionproperties.cartbtntype == 'Goes to checkout') {
@@ -5492,7 +5530,7 @@ var Serviceinfotabs = function Serviceinfotabs(props) {
5492
5530
  size: sectionproperties.cartBtn_iconFontSize
5493
5531
  }), sectionproperties.carticonstyle == 'Shopping cart 2' && /*#__PURE__*/React.createElement(MdAddShoppingCart, {
5494
5532
  size: sectionproperties.cartBtn_iconFontSize
5495
- })), sectionproperties.overwritecertbtntext == 'Yes' ? langdetect == 'en' ? sectionproperties.cartBtnContentenglish : sectionproperties.cartBtnContentarabic : langdetect == 'en' ? fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer20 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer20 === void 0 || (_fetchProductInfoQuer20 = _fetchProductInfoQuer20.data) === null || _fetchProductInfoQuer20 === void 0 || (_fetchProductInfoQuer20 = _fetchProductInfoQuer20.productinfo) === null || _fetchProductInfoQuer20 === void 0 ? void 0 : _fetchProductInfoQuer20.productactionbuttontext_en : fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer21 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer21 === void 0 || (_fetchProductInfoQuer21 = _fetchProductInfoQuer21.data) === null || _fetchProductInfoQuer21 === void 0 || (_fetchProductInfoQuer21 = _fetchProductInfoQuer21.productinfo) === null || _fetchProductInfoQuer21 === void 0 ? void 0 : _fetchProductInfoQuer21.productactionbuttontext_ar), AddtoCartMutationContext.isLoading && /*#__PURE__*/React.createElement("div", {
5533
+ })), sectionproperties.overwritecertbtntext == 'Yes' ? langdetect == 'en' ? sectionproperties.cartBtnContentenglish : sectionproperties.cartBtnContentarabic : langdetect == 'en' ? fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer24 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer24 === void 0 || (_fetchProductInfoQuer24 = _fetchProductInfoQuer24.data) === null || _fetchProductInfoQuer24 === void 0 || (_fetchProductInfoQuer24 = _fetchProductInfoQuer24.productinfo) === null || _fetchProductInfoQuer24 === void 0 ? void 0 : _fetchProductInfoQuer24.productactionbuttontext_en : fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer25 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer25 === void 0 || (_fetchProductInfoQuer25 = _fetchProductInfoQuer25.data) === null || _fetchProductInfoQuer25 === void 0 || (_fetchProductInfoQuer25 = _fetchProductInfoQuer25.productinfo) === null || _fetchProductInfoQuer25 === void 0 ? void 0 : _fetchProductInfoQuer25.productactionbuttontext_ar), AddtoCartMutationContext.isLoading && /*#__PURE__*/React.createElement("div", {
5496
5534
  className: ' d-flex align-items-center justify-content-center '
5497
5535
  }, /*#__PURE__*/React.createElement(CircularProgress, {
5498
5536
  color: "white",
@@ -5536,13 +5574,13 @@ var Serviceinfotabs = function Serviceinfotabs(props) {
5536
5574
  }, /*#__PURE__*/React.createElement("button", {
5537
5575
  className: "".concat(productinfo_cssstyles.checkoutbtn, " ") + ' d-flex align-items-center justify-content-center ml-sm-auto mr-sm-auto mb-sm-2 ',
5538
5576
  onClick: function onClick() {
5539
- var _fetchProductInfoQuer22, _fetchProductInfoQuer23;
5540
- if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer22 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer22 === void 0 || (_fetchProductInfoQuer22 = _fetchProductInfoQuer22.data) === null || _fetchProductInfoQuer22 === void 0 || (_fetchProductInfoQuer22 = _fetchProductInfoQuer22.productinfo) === null || _fetchProductInfoQuer22 === void 0 || (_fetchProductInfoQuer22 = _fetchProductInfoQuer22.serviceinfo) === null || _fetchProductInfoQuer22 === void 0 ? void 0 : _fetchProductInfoQuer22.scheduletype) == 'days') {
5577
+ var _fetchProductInfoQuer26, _fetchProductInfoQuer27;
5578
+ if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer26 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer26 === void 0 || (_fetchProductInfoQuer26 = _fetchProductInfoQuer26.data) === null || _fetchProductInfoQuer26 === void 0 || (_fetchProductInfoQuer26 = _fetchProductInfoQuer26.productinfo) === null || _fetchProductInfoQuer26 === void 0 || (_fetchProductInfoQuer26 = _fetchProductInfoQuer26.serviceinfo) === null || _fetchProductInfoQuer26 === void 0 ? void 0 : _fetchProductInfoQuer26.scheduletype) == 'days') {
5541
5579
  if (addtocardpayloadobj.from.length != 0 && addtocardpayloadobj.to.length != 0 && addtocardpayloadobj.quantity != 0) {
5542
5580
  addtocartfunc();
5543
5581
  routingcountext(StaticPagesLinksContext.Checkout);
5544
5582
  }
5545
- } else if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer23 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer23 === void 0 || (_fetchProductInfoQuer23 = _fetchProductInfoQuer23.data) === null || _fetchProductInfoQuer23 === void 0 || (_fetchProductInfoQuer23 = _fetchProductInfoQuer23.productinfo) === null || _fetchProductInfoQuer23 === void 0 || (_fetchProductInfoQuer23 = _fetchProductInfoQuer23.serviceinfo) === null || _fetchProductInfoQuer23 === void 0 ? void 0 : _fetchProductInfoQuer23.scheduletype) == 'minutes') {
5583
+ } else if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer27 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer27 === void 0 || (_fetchProductInfoQuer27 = _fetchProductInfoQuer27.data) === null || _fetchProductInfoQuer27 === void 0 || (_fetchProductInfoQuer27 = _fetchProductInfoQuer27.productinfo) === null || _fetchProductInfoQuer27 === void 0 || (_fetchProductInfoQuer27 = _fetchProductInfoQuer27.serviceinfo) === null || _fetchProductInfoQuer27 === void 0 ? void 0 : _fetchProductInfoQuer27.scheduletype) == 'minutes') {
5546
5584
  if (addtocardpayloadobj.date.length != 0 && addtocardpayloadobj.time.length != 0) {
5547
5585
  addtocartfunc();
5548
5586
  routingcountext(StaticPagesLinksContext.Checkout);
package/dist/index.umd.js CHANGED
@@ -4525,7 +4525,7 @@
4525
4525
  function ownKeys$2z(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4526
4526
  function _objectSpread$2z(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2z(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2z(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4527
4527
  var Serviceinfotabs = function Serviceinfotabs(props) {
4528
- var _fetchProductInfoQuer10, _fetchProductInfoQuer11, _fetchProductInfoQuer12, _fetchProductInfoQuer13, _fetchProductInfoQuer16, _fetchProductInfoQuer17, _fetchProductInfoQuer20, _fetchProductInfoQuer21;
4528
+ var _fetchProductInfoQuer12, _fetchProductInfoQuer13, _fetchProductInfoQuer14, _fetchProductInfoQuer15, _fetchProductInfoQuer16, _fetchProductInfoQuer17, _fetchProductInfoQuer20, _fetchProductInfoQuer21, _fetchProductInfoQuer24, _fetchProductInfoQuer25;
4529
4529
  var langdetect = props.actions.langdetect;
4530
4530
  var lang = props.actions.lang;
4531
4531
  var sectionproperties = props.actions.sectionproperties;
@@ -4579,6 +4579,10 @@
4579
4579
  _useState12 = _slicedToArray__default["default"](_useState11, 2),
4580
4580
  disableddates = _useState12[0],
4581
4581
  setdisableddates = _useState12[1];
4582
+ var _useState13 = React.useState([]),
4583
+ _useState14 = _slicedToArray__default["default"](_useState13, 2),
4584
+ minutes_Active_days_array = _useState14[0],
4585
+ setminutes_Active_days_array = _useState14[1];
4582
4586
  React.useEffect(function () {
4583
4587
  setaddtocardpayloadobj(_objectSpread$2z(_objectSpread$2z({}, addtocardpayloadobj), {}, {
4584
4588
  item_type: 'service'
@@ -4614,7 +4618,7 @@
4614
4618
  }
4615
4619
  }, [addtocardpayloadobj.from, addtocardpayloadobj.to]);
4616
4620
  React.useEffect(function () {
4617
- var _fetchProductInfoQuer;
4621
+ var _fetchProductInfoQuer, _fetchProductInfoQuer6;
4618
4622
  if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer === void 0 || (_fetchProductInfoQuer = _fetchProductInfoQuer.data) === null || _fetchProductInfoQuer === void 0 || (_fetchProductInfoQuer = _fetchProductInfoQuer.productinfo) === null || _fetchProductInfoQuer === void 0 || (_fetchProductInfoQuer = _fetchProductInfoQuer.serviceinfo) === null || _fetchProductInfoQuer === void 0 ? void 0 : _fetchProductInfoQuer.scheduletype) == 'days') {
4619
4623
  var _fetchProductInfoQuer2, _fetchProductInfoQuer3;
4620
4624
  if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer2 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer2 === void 0 || (_fetchProductInfoQuer2 = _fetchProductInfoQuer2.data) === null || _fetchProductInfoQuer2 === void 0 || (_fetchProductInfoQuer2 = _fetchProductInfoQuer2.productinfo) === null || _fetchProductInfoQuer2 === void 0 ? void 0 : _fetchProductInfoQuer2.disabled_dates) != undefined && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer3 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer3 === void 0 || (_fetchProductInfoQuer3 = _fetchProductInfoQuer3.data) === null || _fetchProductInfoQuer3 === void 0 || (_fetchProductInfoQuer3 = _fetchProductInfoQuer3.productinfo) === null || _fetchProductInfoQuer3 === void 0 ? void 0 : _fetchProductInfoQuer3.disabled_dates) != null) {
@@ -4630,7 +4634,40 @@
4630
4634
  }
4631
4635
  }
4632
4636
  }
4637
+ if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer6 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer6 === void 0 || (_fetchProductInfoQuer6 = _fetchProductInfoQuer6.data) === null || _fetchProductInfoQuer6 === void 0 || (_fetchProductInfoQuer6 = _fetchProductInfoQuer6.productinfo) === null || _fetchProductInfoQuer6 === void 0 || (_fetchProductInfoQuer6 = _fetchProductInfoQuer6.serviceinfo) === null || _fetchProductInfoQuer6 === void 0 ? void 0 : _fetchProductInfoQuer6.scheduletype) == 'minutes') {
4638
+ var _fetchProductInfoQuer7;
4639
+ var serviceDays = fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer7 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer7 === void 0 || (_fetchProductInfoQuer7 = _fetchProductInfoQuer7.data) === null || _fetchProductInfoQuer7 === void 0 || (_fetchProductInfoQuer7 = _fetchProductInfoQuer7.productinfo) === null || _fetchProductInfoQuer7 === void 0 || (_fetchProductInfoQuer7 = _fetchProductInfoQuer7.serviceinfo) === null || _fetchProductInfoQuer7 === void 0 ? void 0 : _fetchProductInfoQuer7.servicedays;
4640
+ if (Array.isArray(serviceDays) && serviceDays.length > 0) {
4641
+ var uniqueDayNames = _toConsumableArray__default["default"](new Set(serviceDays.map(function (day) {
4642
+ return day === null || day === void 0 ? void 0 : day.dayname;
4643
+ }).filter(function (dayname) {
4644
+ return typeof dayname === 'string' && dayname.trim() !== '';
4645
+ })));
4646
+ setminutes_Active_days_array(uniqueDayNames);
4647
+ } else {
4648
+ // Optionally reset the state if serviceDays is undefined, null, or empty
4649
+ setminutes_Active_days_array([]);
4650
+ }
4651
+ }
4633
4652
  }, [addtocardpayloadobj.from, addtocardpayloadobj.to]);
4653
+ var isAllowedDay = function isAllowedDay(date) {
4654
+ if (minutes_Active_days_array != undefined && minutes_Active_days_array != null && minutes_Active_days_array.length != 0) {
4655
+ var dayNameToNumber = {
4656
+ Sun: 0,
4657
+ Mond: 1,
4658
+ Tues: 2,
4659
+ Wednes: 3,
4660
+ Thurs: 4,
4661
+ Fri: 5,
4662
+ Sat: 6
4663
+ };
4664
+ var dayNumber = date.getDay(); // 0 = Sunday ... 6 = Saturday
4665
+ var allowedDays = minutes_Active_days_array.map(function (day) {
4666
+ return dayNameToNumber[day];
4667
+ });
4668
+ return allowedDays.includes(dayNumber);
4669
+ }
4670
+ };
4634
4671
  var TabsStyles = {
4635
4672
  sidebar_item: glamor.css({
4636
4673
  background: sectionproperties.tabcontainerbgcolor,
@@ -4747,16 +4784,16 @@
4747
4784
  return lastChoosedIndex;
4748
4785
  }
4749
4786
  var chooseitemslot = function chooseitemslot(slot, index) {
4750
- var _fetchProductInfoQuer6, _fetchProductInfoQuer7, _fetchProductInfoQuer8, _fetchProductInfoQuer9;
4787
+ var _fetchProductInfoQuer8, _fetchProductInfoQuer9, _fetchProductInfoQuer10, _fetchProductInfoQuer11;
4751
4788
  var reservedslottobetaken = null;
4752
4789
  var reservedslotArrtobetaken = [];
4753
4790
  var slotschooosedcounter_tobe_usedonly_in_merge = 0;
4754
4791
  var is_multi_slots = false;
4755
4792
  var is_slots_must_be_adjacent = false;
4756
- if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer6 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer6 === void 0 || (_fetchProductInfoQuer6 = _fetchProductInfoQuer6.data) === null || _fetchProductInfoQuer6 === void 0 || (_fetchProductInfoQuer6 = _fetchProductInfoQuer6.productinfo) === null || _fetchProductInfoQuer6 === void 0 || (_fetchProductInfoQuer6 = _fetchProductInfoQuer6.serviceinfo) === null || _fetchProductInfoQuer6 === void 0 ? void 0 : _fetchProductInfoQuer6.is_slots_adjacent) != undefined && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer7 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer7 === void 0 || (_fetchProductInfoQuer7 = _fetchProductInfoQuer7.data) === null || _fetchProductInfoQuer7 === void 0 || (_fetchProductInfoQuer7 = _fetchProductInfoQuer7.productinfo) === null || _fetchProductInfoQuer7 === void 0 || (_fetchProductInfoQuer7 = _fetchProductInfoQuer7.serviceinfo) === null || _fetchProductInfoQuer7 === void 0 ? void 0 : _fetchProductInfoQuer7.is_slots_adjacent) == 1) {
4793
+ if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer8 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer8 === void 0 || (_fetchProductInfoQuer8 = _fetchProductInfoQuer8.data) === null || _fetchProductInfoQuer8 === void 0 || (_fetchProductInfoQuer8 = _fetchProductInfoQuer8.productinfo) === null || _fetchProductInfoQuer8 === void 0 || (_fetchProductInfoQuer8 = _fetchProductInfoQuer8.serviceinfo) === null || _fetchProductInfoQuer8 === void 0 ? void 0 : _fetchProductInfoQuer8.is_slots_adjacent) != undefined && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer9 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer9 === void 0 || (_fetchProductInfoQuer9 = _fetchProductInfoQuer9.data) === null || _fetchProductInfoQuer9 === void 0 || (_fetchProductInfoQuer9 = _fetchProductInfoQuer9.productinfo) === null || _fetchProductInfoQuer9 === void 0 || (_fetchProductInfoQuer9 = _fetchProductInfoQuer9.serviceinfo) === null || _fetchProductInfoQuer9 === void 0 ? void 0 : _fetchProductInfoQuer9.is_slots_adjacent) == 1) {
4757
4794
  is_slots_must_be_adjacent = true;
4758
4795
  }
4759
- if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer8 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer8 === void 0 || (_fetchProductInfoQuer8 = _fetchProductInfoQuer8.data) === null || _fetchProductInfoQuer8 === void 0 || (_fetchProductInfoQuer8 = _fetchProductInfoQuer8.productinfo) === null || _fetchProductInfoQuer8 === void 0 || (_fetchProductInfoQuer8 = _fetchProductInfoQuer8.serviceinfo) === null || _fetchProductInfoQuer8 === void 0 ? void 0 : _fetchProductInfoQuer8.is_slots_multi) != undefined && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer9 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer9 === void 0 || (_fetchProductInfoQuer9 = _fetchProductInfoQuer9.data) === null || _fetchProductInfoQuer9 === void 0 || (_fetchProductInfoQuer9 = _fetchProductInfoQuer9.productinfo) === null || _fetchProductInfoQuer9 === void 0 || (_fetchProductInfoQuer9 = _fetchProductInfoQuer9.serviceinfo) === null || _fetchProductInfoQuer9 === void 0 ? void 0 : _fetchProductInfoQuer9.is_slots_multi) == 1) {
4796
+ if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer10 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer10 === void 0 || (_fetchProductInfoQuer10 = _fetchProductInfoQuer10.data) === null || _fetchProductInfoQuer10 === void 0 || (_fetchProductInfoQuer10 = _fetchProductInfoQuer10.productinfo) === null || _fetchProductInfoQuer10 === void 0 || (_fetchProductInfoQuer10 = _fetchProductInfoQuer10.serviceinfo) === null || _fetchProductInfoQuer10 === void 0 ? void 0 : _fetchProductInfoQuer10.is_slots_multi) != undefined && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer11 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer11 === void 0 || (_fetchProductInfoQuer11 = _fetchProductInfoQuer11.data) === null || _fetchProductInfoQuer11 === void 0 || (_fetchProductInfoQuer11 = _fetchProductInfoQuer11.productinfo) === null || _fetchProductInfoQuer11 === void 0 || (_fetchProductInfoQuer11 = _fetchProductInfoQuer11.serviceinfo) === null || _fetchProductInfoQuer11 === void 0 ? void 0 : _fetchProductInfoQuer11.is_slots_multi) == 1) {
4760
4797
  is_multi_slots = true;
4761
4798
  }
4762
4799
  var tempslots = _toConsumableArray__default["default"](slots);
@@ -4878,10 +4915,10 @@
4878
4915
  // }
4879
4916
  // };
4880
4917
  return /*#__PURE__*/React__default["default"].createElement("div", {
4881
- className: (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer10 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer10 === void 0 || (_fetchProductInfoQuer10 = _fetchProductInfoQuer10.data) === null || _fetchProductInfoQuer10 === void 0 || (_fetchProductInfoQuer10 = _fetchProductInfoQuer10.productinfo) === null || _fetchProductInfoQuer10 === void 0 || (_fetchProductInfoQuer10 = _fetchProductInfoQuer10.serviceinfo) === null || _fetchProductInfoQuer10 === void 0 ? void 0 : _fetchProductInfoQuer10.scheduletype) == 'minutes' ? 'col-lg-12 mt-3 p-0' : 'col-lg-10 mt-3 p-0'
4918
+ className: (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer12 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer12 === void 0 || (_fetchProductInfoQuer12 = _fetchProductInfoQuer12.data) === null || _fetchProductInfoQuer12 === void 0 || (_fetchProductInfoQuer12 = _fetchProductInfoQuer12.productinfo) === null || _fetchProductInfoQuer12 === void 0 || (_fetchProductInfoQuer12 = _fetchProductInfoQuer12.serviceinfo) === null || _fetchProductInfoQuer12 === void 0 ? void 0 : _fetchProductInfoQuer12.scheduletype) == 'minutes' ? 'col-lg-12 mt-3 p-0' : 'col-lg-10 mt-3 p-0'
4882
4919
  }, /*#__PURE__*/React__default["default"].createElement("div", {
4883
4920
  "class": "row m-0 w-100"
4884
- }, (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer11 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer11 === void 0 || (_fetchProductInfoQuer11 = _fetchProductInfoQuer11.data) === null || _fetchProductInfoQuer11 === void 0 || (_fetchProductInfoQuer11 = _fetchProductInfoQuer11.productinfo) === null || _fetchProductInfoQuer11 === void 0 || (_fetchProductInfoQuer11 = _fetchProductInfoQuer11.serviceinfo) === null || _fetchProductInfoQuer11 === void 0 ? void 0 : _fetchProductInfoQuer11.scheduletype) == 'days' && /*#__PURE__*/React__default["default"].createElement("div", {
4921
+ }, (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer13 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer13 === void 0 || (_fetchProductInfoQuer13 = _fetchProductInfoQuer13.data) === null || _fetchProductInfoQuer13 === void 0 || (_fetchProductInfoQuer13 = _fetchProductInfoQuer13.productinfo) === null || _fetchProductInfoQuer13 === void 0 || (_fetchProductInfoQuer13 = _fetchProductInfoQuer13.serviceinfo) === null || _fetchProductInfoQuer13 === void 0 ? void 0 : _fetchProductInfoQuer13.scheduletype) == 'days' && /*#__PURE__*/React__default["default"].createElement("div", {
4885
4922
  "class": "row m-0 w-100"
4886
4923
  }, /*#__PURE__*/React__default["default"].createElement("div", {
4887
4924
  "class": "col-lg-6 col-md-12 col-sm-12 mb-2 pl-1 pr-1"
@@ -4925,7 +4962,7 @@
4925
4962
  }));
4926
4963
  setselectedtodate(date);
4927
4964
  }
4928
- })))))), (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer12 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer12 === void 0 || (_fetchProductInfoQuer12 = _fetchProductInfoQuer12.data) === null || _fetchProductInfoQuer12 === void 0 || (_fetchProductInfoQuer12 = _fetchProductInfoQuer12.productinfo) === null || _fetchProductInfoQuer12 === void 0 || (_fetchProductInfoQuer12 = _fetchProductInfoQuer12.serviceinfo) === null || _fetchProductInfoQuer12 === void 0 ? void 0 : _fetchProductInfoQuer12.scheduletype) == 'minutes' && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
4965
+ })))))), (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer14 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer14 === void 0 || (_fetchProductInfoQuer14 = _fetchProductInfoQuer14.data) === null || _fetchProductInfoQuer14 === void 0 || (_fetchProductInfoQuer14 = _fetchProductInfoQuer14.productinfo) === null || _fetchProductInfoQuer14 === void 0 || (_fetchProductInfoQuer14 = _fetchProductInfoQuer14.serviceinfo) === null || _fetchProductInfoQuer14 === void 0 ? void 0 : _fetchProductInfoQuer14.scheduletype) == 'minutes' && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
4929
4966
  "class": "col-lg-12 col-md-12 col-sm-12 mb-2"
4930
4967
  }, /*#__PURE__*/React__default["default"].createElement("div", {
4931
4968
  "class": "row m-0 w-100"
@@ -4946,39 +4983,40 @@
4946
4983
  }
4947
4984
  }, /*#__PURE__*/React__default["default"].createElement("div", {
4948
4985
  "class": "w-100 px-2 h-100 allcentered"
4949
- }, /*#__PURE__*/React__default["default"].createElement("input", {
4950
- type: "date",
4951
- "class": ' w-100 allcentered pl-1 pr-1 ',
4952
- style: {
4953
- background: 'transparent',
4954
- borderWidth: 0,
4955
- height: '100%',
4956
- zIndex: 2,
4957
- color: sectionproperties.inputfieldcolor
4958
- },
4959
- min: fetchProductInfoQueryContext.data.data.productinfo.serviceinfo.reservationstarts,
4960
- max: fetchProductInfoQueryContext.data.data.productinfo.serviceinfo.reservationends,
4961
- onChange: function onChange(event) {
4962
- // setaddtocardpayloadobj({ ...addtocardpayloadobj, date: event.target.value });
4963
- setaddtocardpayloadobj(_objectSpread$2z(_objectSpread$2z({}, addtocardpayloadobj), {}, {
4964
- date: event.target.value,
4965
- time: '',
4966
- reservedslotArrtobetaken: [],
4967
- quantity: 1
4968
- }));
4969
- setslots([]);
4970
- setcurrentmutatestate('/fetchserviceslots');
4971
- GeneralAPIMutationContext.mutate({
4972
- endpointurl: '/fetchserviceslots',
4973
- productid: fetchProductInfoQueryContext.data.data.productinfo.productid,
4974
- reqdate: event.target.value,
4975
- mutateSuccesscallback: function mutateSuccesscallback(data, variables) {
4976
- setslots(data.data.slots);
4977
- if (!data.data.slots || data.data.slots.length === 0) {
4978
- NotificationManager.warning('', 'Please choose another date');
4986
+ }, /*#__PURE__*/React__default["default"].createElement(DatePicker__default["default"], {
4987
+ minDate: fetchProductInfoQueryContext !== null && fetchProductInfoQueryContext !== void 0 && (_fetchProductInfoQuer15 = fetchProductInfoQueryContext.data) !== null && _fetchProductInfoQuer15 !== void 0 && (_fetchProductInfoQuer15 = _fetchProductInfoQuer15.data) !== null && _fetchProductInfoQuer15 !== void 0 && (_fetchProductInfoQuer15 = _fetchProductInfoQuer15.productinfo) !== null && _fetchProductInfoQuer15 !== void 0 && (_fetchProductInfoQuer15 = _fetchProductInfoQuer15.serviceinfo) !== null && _fetchProductInfoQuer15 !== void 0 && _fetchProductInfoQuer15.reservationstarts ? new Date(fetchProductInfoQueryContext.data.data.productinfo.serviceinfo.reservationstarts) : null,
4988
+ maxDate: fetchProductInfoQueryContext !== null && fetchProductInfoQueryContext !== void 0 && (_fetchProductInfoQuer16 = fetchProductInfoQueryContext.data) !== null && _fetchProductInfoQuer16 !== void 0 && (_fetchProductInfoQuer16 = _fetchProductInfoQuer16.data) !== null && _fetchProductInfoQuer16 !== void 0 && (_fetchProductInfoQuer16 = _fetchProductInfoQuer16.productinfo) !== null && _fetchProductInfoQuer16 !== void 0 && (_fetchProductInfoQuer16 = _fetchProductInfoQuer16.serviceinfo) !== null && _fetchProductInfoQuer16 !== void 0 && _fetchProductInfoQuer16.reservationends ? new Date(fetchProductInfoQueryContext.data.data.productinfo.serviceinfo.reservationends) : null,
4989
+ filterDate: isAllowedDay,
4990
+ selected: selectedfromdate,
4991
+ excludeDates: disableddates,
4992
+ onChange: function onChange(date) {
4993
+ // setaddtocardpayloadobj({ ...addtocardpayloadobj, from: date });
4994
+ if (date) {
4995
+ var _year = date.getFullYear();
4996
+ var _month = String(date.getMonth() + 1).padStart(2, '0'); // Months are 0-based
4997
+ var _day = String(date.getDate()).padStart(2, '0');
4998
+ var formattedDate = "".concat(_year, "-").concat(_month, "-").concat(_day);
4999
+ setaddtocardpayloadobj(_objectSpread$2z(_objectSpread$2z({}, addtocardpayloadobj), {}, {
5000
+ date: formattedDate,
5001
+ time: '',
5002
+ reservedslotArrtobetaken: [],
5003
+ quantity: 1
5004
+ }));
5005
+ setslots([]);
5006
+ setcurrentmutatestate('/fetchserviceslots');
5007
+ GeneralAPIMutationContext.mutate({
5008
+ endpointurl: '/fetchserviceslots',
5009
+ productid: fetchProductInfoQueryContext.data.data.productinfo.productid,
5010
+ reqdate: formattedDate,
5011
+ mutateSuccesscallback: function mutateSuccesscallback(data, variables) {
5012
+ setslots(data.data.slots);
5013
+ if (!data.data.slots || data.data.slots.length === 0) {
5014
+ NotificationManager.warning('', 'Please choose another date');
5015
+ }
4979
5016
  }
4980
- }
4981
- });
5017
+ });
5018
+ setselectedfromdate(date);
5019
+ }
4982
5020
  }
4983
5021
  }), /*#__PURE__*/React__default["default"].createElement("div", {
4984
5022
  "class": "h-100 allcentered",
@@ -5165,7 +5203,7 @@
5165
5203
  className: "col-lg-12 p-0 mb-3"
5166
5204
  }, /*#__PURE__*/React__default["default"].createElement("div", {
5167
5205
  className: "row m-0 w-100"
5168
- }, (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer13 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer13 === void 0 || (_fetchProductInfoQuer13 = _fetchProductInfoQuer13.data) === null || _fetchProductInfoQuer13 === void 0 || (_fetchProductInfoQuer13 = _fetchProductInfoQuer13.productinfo) === null || _fetchProductInfoQuer13 === void 0 || (_fetchProductInfoQuer13 = _fetchProductInfoQuer13.serviceinfo) === null || _fetchProductInfoQuer13 === void 0 ? void 0 : _fetchProductInfoQuer13.scheduletype) == 'days' && /*#__PURE__*/React__default["default"].createElement("div", {
5206
+ }, (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer17 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer17 === void 0 || (_fetchProductInfoQuer17 = _fetchProductInfoQuer17.data) === null || _fetchProductInfoQuer17 === void 0 || (_fetchProductInfoQuer17 = _fetchProductInfoQuer17.productinfo) === null || _fetchProductInfoQuer17 === void 0 || (_fetchProductInfoQuer17 = _fetchProductInfoQuer17.serviceinfo) === null || _fetchProductInfoQuer17 === void 0 ? void 0 : _fetchProductInfoQuer17.scheduletype) == 'days' && /*#__PURE__*/React__default["default"].createElement("div", {
5169
5207
  className: "col-lg-12 p-0"
5170
5208
  }, /*#__PURE__*/React__default["default"].createElement("div", {
5171
5209
  className: "row m-0 w-100"
@@ -5229,15 +5267,15 @@
5229
5267
  }, /*#__PURE__*/React__default["default"].createElement("button", {
5230
5268
  className: "".concat(productinfo_cssstyles.cart_btn, " ") + ' d-flex align-items-center justify-content-center ml-sm-auto mr-sm-auto mb-sm-2 ',
5231
5269
  onClick: function onClick() {
5232
- var _fetchProductInfoQuer14, _fetchProductInfoQuer15;
5233
- if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer14 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer14 === void 0 || (_fetchProductInfoQuer14 = _fetchProductInfoQuer14.data) === null || _fetchProductInfoQuer14 === void 0 || (_fetchProductInfoQuer14 = _fetchProductInfoQuer14.productinfo) === null || _fetchProductInfoQuer14 === void 0 || (_fetchProductInfoQuer14 = _fetchProductInfoQuer14.serviceinfo) === null || _fetchProductInfoQuer14 === void 0 ? void 0 : _fetchProductInfoQuer14.scheduletype) == 'days') {
5270
+ var _fetchProductInfoQuer18, _fetchProductInfoQuer19;
5271
+ if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer18 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer18 === void 0 || (_fetchProductInfoQuer18 = _fetchProductInfoQuer18.data) === null || _fetchProductInfoQuer18 === void 0 || (_fetchProductInfoQuer18 = _fetchProductInfoQuer18.productinfo) === null || _fetchProductInfoQuer18 === void 0 || (_fetchProductInfoQuer18 = _fetchProductInfoQuer18.serviceinfo) === null || _fetchProductInfoQuer18 === void 0 ? void 0 : _fetchProductInfoQuer18.scheduletype) == 'days') {
5234
5272
  if (addtocardpayloadobj.from.length != 0 && addtocardpayloadobj.to.length != 0 && addtocardpayloadobj.quantity != 0) {
5235
5273
  addtocartfunc();
5236
5274
  // if (sectionproperties.cartbtntype == 'Goes to checkout') {
5237
5275
  // routingcountext(StaticPagesLinksContext.Checkout);
5238
5276
  // }
5239
5277
  }
5240
- } else if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer15 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer15 === void 0 || (_fetchProductInfoQuer15 = _fetchProductInfoQuer15.data) === null || _fetchProductInfoQuer15 === void 0 || (_fetchProductInfoQuer15 = _fetchProductInfoQuer15.productinfo) === null || _fetchProductInfoQuer15 === void 0 || (_fetchProductInfoQuer15 = _fetchProductInfoQuer15.serviceinfo) === null || _fetchProductInfoQuer15 === void 0 ? void 0 : _fetchProductInfoQuer15.scheduletype) == 'minutes') {
5278
+ } else if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer19 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer19 === void 0 || (_fetchProductInfoQuer19 = _fetchProductInfoQuer19.data) === null || _fetchProductInfoQuer19 === void 0 || (_fetchProductInfoQuer19 = _fetchProductInfoQuer19.productinfo) === null || _fetchProductInfoQuer19 === void 0 || (_fetchProductInfoQuer19 = _fetchProductInfoQuer19.serviceinfo) === null || _fetchProductInfoQuer19 === void 0 ? void 0 : _fetchProductInfoQuer19.scheduletype) == 'minutes') {
5241
5279
  if (addtocardpayloadobj.date.length != 0 && addtocardpayloadobj.time.length != 0) {
5242
5280
  addtocartfunc();
5243
5281
  // if (sectionproperties.cartbtntype == 'Goes to checkout') {
@@ -5270,7 +5308,7 @@
5270
5308
  size: sectionproperties.cartBtn_iconFontSize
5271
5309
  }), sectionproperties.carticonstyle == 'Shopping cart 2' && /*#__PURE__*/React__default["default"].createElement(MdAddShoppingCart.MdAddShoppingCart, {
5272
5310
  size: sectionproperties.cartBtn_iconFontSize
5273
- })), sectionproperties.overwritecertbtntext == 'Yes' ? langdetect == 'en' ? sectionproperties.cartBtnContentenglish : sectionproperties.cartBtnContentarabic : langdetect == 'en' ? fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer16 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer16 === void 0 || (_fetchProductInfoQuer16 = _fetchProductInfoQuer16.data) === null || _fetchProductInfoQuer16 === void 0 || (_fetchProductInfoQuer16 = _fetchProductInfoQuer16.productinfo) === null || _fetchProductInfoQuer16 === void 0 ? void 0 : _fetchProductInfoQuer16.productactionbuttontext_en : fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer17 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer17 === void 0 || (_fetchProductInfoQuer17 = _fetchProductInfoQuer17.data) === null || _fetchProductInfoQuer17 === void 0 || (_fetchProductInfoQuer17 = _fetchProductInfoQuer17.productinfo) === null || _fetchProductInfoQuer17 === void 0 ? void 0 : _fetchProductInfoQuer17.productactionbuttontext_ar), AddtoCartMutationContext.isLoading && /*#__PURE__*/React__default["default"].createElement("div", {
5311
+ })), sectionproperties.overwritecertbtntext == 'Yes' ? langdetect == 'en' ? sectionproperties.cartBtnContentenglish : sectionproperties.cartBtnContentarabic : langdetect == 'en' ? fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer20 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer20 === void 0 || (_fetchProductInfoQuer20 = _fetchProductInfoQuer20.data) === null || _fetchProductInfoQuer20 === void 0 || (_fetchProductInfoQuer20 = _fetchProductInfoQuer20.productinfo) === null || _fetchProductInfoQuer20 === void 0 ? void 0 : _fetchProductInfoQuer20.productactionbuttontext_en : fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer21 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer21 === void 0 || (_fetchProductInfoQuer21 = _fetchProductInfoQuer21.data) === null || _fetchProductInfoQuer21 === void 0 || (_fetchProductInfoQuer21 = _fetchProductInfoQuer21.productinfo) === null || _fetchProductInfoQuer21 === void 0 ? void 0 : _fetchProductInfoQuer21.productactionbuttontext_ar), AddtoCartMutationContext.isLoading && /*#__PURE__*/React__default["default"].createElement("div", {
5274
5312
  className: ' d-flex align-items-center justify-content-center '
5275
5313
  }, /*#__PURE__*/React__default["default"].createElement(reactCssfxLoading.CircularProgress, {
5276
5314
  color: "white",
@@ -5312,15 +5350,15 @@
5312
5350
  }, /*#__PURE__*/React__default["default"].createElement("button", {
5313
5351
  className: "".concat(productinfo_cssstyles.cart_btn) + ' w-100 d-flex align-items-center justify-content-center ',
5314
5352
  onClick: function onClick() {
5315
- var _fetchProductInfoQuer18, _fetchProductInfoQuer19;
5316
- if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer18 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer18 === void 0 || (_fetchProductInfoQuer18 = _fetchProductInfoQuer18.data) === null || _fetchProductInfoQuer18 === void 0 || (_fetchProductInfoQuer18 = _fetchProductInfoQuer18.productinfo) === null || _fetchProductInfoQuer18 === void 0 || (_fetchProductInfoQuer18 = _fetchProductInfoQuer18.serviceinfo) === null || _fetchProductInfoQuer18 === void 0 ? void 0 : _fetchProductInfoQuer18.scheduletype) == 'days') {
5353
+ var _fetchProductInfoQuer22, _fetchProductInfoQuer23;
5354
+ if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer22 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer22 === void 0 || (_fetchProductInfoQuer22 = _fetchProductInfoQuer22.data) === null || _fetchProductInfoQuer22 === void 0 || (_fetchProductInfoQuer22 = _fetchProductInfoQuer22.productinfo) === null || _fetchProductInfoQuer22 === void 0 || (_fetchProductInfoQuer22 = _fetchProductInfoQuer22.serviceinfo) === null || _fetchProductInfoQuer22 === void 0 ? void 0 : _fetchProductInfoQuer22.scheduletype) == 'days') {
5317
5355
  if (addtocardpayloadobj.from.length != 0 && addtocardpayloadobj.to.length != 0 && addtocardpayloadobj.quantity != 0) {
5318
5356
  addtocartfunc();
5319
5357
  if (sectionproperties.cartbtntype == 'Goes to checkout') {
5320
5358
  routingcountext(StaticPagesLinksContext.Checkout);
5321
5359
  }
5322
5360
  }
5323
- } else if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer19 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer19 === void 0 || (_fetchProductInfoQuer19 = _fetchProductInfoQuer19.data) === null || _fetchProductInfoQuer19 === void 0 || (_fetchProductInfoQuer19 = _fetchProductInfoQuer19.productinfo) === null || _fetchProductInfoQuer19 === void 0 || (_fetchProductInfoQuer19 = _fetchProductInfoQuer19.serviceinfo) === null || _fetchProductInfoQuer19 === void 0 ? void 0 : _fetchProductInfoQuer19.scheduletype) == 'minutes') {
5361
+ } else if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer23 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer23 === void 0 || (_fetchProductInfoQuer23 = _fetchProductInfoQuer23.data) === null || _fetchProductInfoQuer23 === void 0 || (_fetchProductInfoQuer23 = _fetchProductInfoQuer23.productinfo) === null || _fetchProductInfoQuer23 === void 0 || (_fetchProductInfoQuer23 = _fetchProductInfoQuer23.serviceinfo) === null || _fetchProductInfoQuer23 === void 0 ? void 0 : _fetchProductInfoQuer23.scheduletype) == 'minutes') {
5324
5362
  if (addtocardpayloadobj.date.length != 0 && addtocardpayloadobj.time.length != 0) {
5325
5363
  addtocartfunc();
5326
5364
  if (sectionproperties.cartbtntype == 'Goes to checkout') {
@@ -5353,7 +5391,7 @@
5353
5391
  size: sectionproperties.cartBtn_iconFontSize
5354
5392
  }), sectionproperties.carticonstyle == 'Shopping cart 2' && /*#__PURE__*/React__default["default"].createElement(MdAddShoppingCart.MdAddShoppingCart, {
5355
5393
  size: sectionproperties.cartBtn_iconFontSize
5356
- })), sectionproperties.overwritecertbtntext == 'Yes' ? langdetect == 'en' ? sectionproperties.cartBtnContentenglish : sectionproperties.cartBtnContentarabic : langdetect == 'en' ? fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer20 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer20 === void 0 || (_fetchProductInfoQuer20 = _fetchProductInfoQuer20.data) === null || _fetchProductInfoQuer20 === void 0 || (_fetchProductInfoQuer20 = _fetchProductInfoQuer20.productinfo) === null || _fetchProductInfoQuer20 === void 0 ? void 0 : _fetchProductInfoQuer20.productactionbuttontext_en : fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer21 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer21 === void 0 || (_fetchProductInfoQuer21 = _fetchProductInfoQuer21.data) === null || _fetchProductInfoQuer21 === void 0 || (_fetchProductInfoQuer21 = _fetchProductInfoQuer21.productinfo) === null || _fetchProductInfoQuer21 === void 0 ? void 0 : _fetchProductInfoQuer21.productactionbuttontext_ar), AddtoCartMutationContext.isLoading && /*#__PURE__*/React__default["default"].createElement("div", {
5394
+ })), sectionproperties.overwritecertbtntext == 'Yes' ? langdetect == 'en' ? sectionproperties.cartBtnContentenglish : sectionproperties.cartBtnContentarabic : langdetect == 'en' ? fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer24 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer24 === void 0 || (_fetchProductInfoQuer24 = _fetchProductInfoQuer24.data) === null || _fetchProductInfoQuer24 === void 0 || (_fetchProductInfoQuer24 = _fetchProductInfoQuer24.productinfo) === null || _fetchProductInfoQuer24 === void 0 ? void 0 : _fetchProductInfoQuer24.productactionbuttontext_en : fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer25 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer25 === void 0 || (_fetchProductInfoQuer25 = _fetchProductInfoQuer25.data) === null || _fetchProductInfoQuer25 === void 0 || (_fetchProductInfoQuer25 = _fetchProductInfoQuer25.productinfo) === null || _fetchProductInfoQuer25 === void 0 ? void 0 : _fetchProductInfoQuer25.productactionbuttontext_ar), AddtoCartMutationContext.isLoading && /*#__PURE__*/React__default["default"].createElement("div", {
5357
5395
  className: ' d-flex align-items-center justify-content-center '
5358
5396
  }, /*#__PURE__*/React__default["default"].createElement(reactCssfxLoading.CircularProgress, {
5359
5397
  color: "white",
@@ -5397,13 +5435,13 @@
5397
5435
  }, /*#__PURE__*/React__default["default"].createElement("button", {
5398
5436
  className: "".concat(productinfo_cssstyles.checkoutbtn, " ") + ' d-flex align-items-center justify-content-center ml-sm-auto mr-sm-auto mb-sm-2 ',
5399
5437
  onClick: function onClick() {
5400
- var _fetchProductInfoQuer22, _fetchProductInfoQuer23;
5401
- if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer22 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer22 === void 0 || (_fetchProductInfoQuer22 = _fetchProductInfoQuer22.data) === null || _fetchProductInfoQuer22 === void 0 || (_fetchProductInfoQuer22 = _fetchProductInfoQuer22.productinfo) === null || _fetchProductInfoQuer22 === void 0 || (_fetchProductInfoQuer22 = _fetchProductInfoQuer22.serviceinfo) === null || _fetchProductInfoQuer22 === void 0 ? void 0 : _fetchProductInfoQuer22.scheduletype) == 'days') {
5438
+ var _fetchProductInfoQuer26, _fetchProductInfoQuer27;
5439
+ if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer26 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer26 === void 0 || (_fetchProductInfoQuer26 = _fetchProductInfoQuer26.data) === null || _fetchProductInfoQuer26 === void 0 || (_fetchProductInfoQuer26 = _fetchProductInfoQuer26.productinfo) === null || _fetchProductInfoQuer26 === void 0 || (_fetchProductInfoQuer26 = _fetchProductInfoQuer26.serviceinfo) === null || _fetchProductInfoQuer26 === void 0 ? void 0 : _fetchProductInfoQuer26.scheduletype) == 'days') {
5402
5440
  if (addtocardpayloadobj.from.length != 0 && addtocardpayloadobj.to.length != 0 && addtocardpayloadobj.quantity != 0) {
5403
5441
  addtocartfunc();
5404
5442
  routingcountext(StaticPagesLinksContext.Checkout);
5405
5443
  }
5406
- } else if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer23 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer23 === void 0 || (_fetchProductInfoQuer23 = _fetchProductInfoQuer23.data) === null || _fetchProductInfoQuer23 === void 0 || (_fetchProductInfoQuer23 = _fetchProductInfoQuer23.productinfo) === null || _fetchProductInfoQuer23 === void 0 || (_fetchProductInfoQuer23 = _fetchProductInfoQuer23.serviceinfo) === null || _fetchProductInfoQuer23 === void 0 ? void 0 : _fetchProductInfoQuer23.scheduletype) == 'minutes') {
5444
+ } else if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer27 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer27 === void 0 || (_fetchProductInfoQuer27 = _fetchProductInfoQuer27.data) === null || _fetchProductInfoQuer27 === void 0 || (_fetchProductInfoQuer27 = _fetchProductInfoQuer27.productinfo) === null || _fetchProductInfoQuer27 === void 0 || (_fetchProductInfoQuer27 = _fetchProductInfoQuer27.serviceinfo) === null || _fetchProductInfoQuer27 === void 0 ? void 0 : _fetchProductInfoQuer27.scheduletype) == 'minutes') {
5407
5445
  if (addtocardpayloadobj.date.length != 0 && addtocardpayloadobj.time.length != 0) {
5408
5446
  addtocartfunc();
5409
5447
  routingcountext(StaticPagesLinksContext.Checkout);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tabexseriescomponents",
3
- "version": "0.2.826",
3
+ "version": "0.2.828",
4
4
  "type": "module",
5
5
  "description": "your description",
6
6
  "main": "dist/index.cjs.js",