PageSourceSearch

https://balajitourpackage.in/Scripts/JS/Feedback.jsx

js balajitourpackage.in collected 2026-10-02 01:02:39 UTC 16,966 bytes, 580 lines download raw bytes

1// @hash v3-7BF056B0B7660FB4FCCED9055747F32364E160A7
2// Automatically generated by ReactJS.NET. Do not edit, your changes will be overridden.
3// Version: 5.2.12 (build 29c76c8) with Babel 7.8.7
4// Generated at: 10/2/2026 6:32:39 AM
5///////////////////////////////////////////////////////////////////////////////
6function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
7
8function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
9
10function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
11
12function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
13
14const {
15  useEffect,
16  useState
17} = React;
18const {
19  TextField,
20  Autocomplete,
21  Box,
22  Snackbar,
23  Alert
24} = MaterialUI;
25const ErrorLog = React.lazy(() => import('/Scripts/JS/ErrorLog.jsx'));
26export default function Feedback(props) {
27  let [feedbackObj, setFeedbackObj] = useState({
28    Type: {
29      value: 0,
30      label: 'Select Type'
31    },
32    Subject: {
33      value: 0,
34      label: 'Select Subject'
35    },
36    Email: "",
37    ContactPerson: "",
38    CustPhone: "",
39    Comment: "",
40    captcha: "",
41    captchaurl: "Captcha/CImage.aspx"
42  });
43  useEffect(() => {
44    (async function () {})();
45  }, []);
46  let TypeObj = [{
47    value: 0,
48    label: 'Select Type'
49  }, {
50    value: 1,
51    label: 'Suggestions'
52  }, {
53    value: 2,
54    label: 'Complaints'
55  }, {
56    value: 3,
57    label: 'Inquiry'
58  }, {
59    value: 4,
60    label: 'Compliments'
61  }];
62  let SubjectObj = [{
63    value: 0,
64    label: 'Select Subject'
65  }, {
66    value: 1,
67    label: 'Bus Service'
68  }, {
69    value: 2,
70    label: 'Web Site'
71  }, {
72    value: 3,
73    label: 'Schedule'
74  }];
75
76  const ddlChange = (e, n, name) => {
77    try {
78      feedbackObj[name] = n;
79      setFeedbackObj(feedbackObj => _objectSpread({}, feedbackObj));
80    } catch (error) {
81      insertError(error, "Ruturajsinh Jadeja");
82    }
83  }; //For Popup Msg
84
85
86  let [dlgMsg, setdlMsg] = useState({
87    open: false,
88    msg: '',
89    type: 0
90  }); //Close Event For Alert Box
91
92  const handleClose = () => {
93    try {
94      setdlMsg({
95        open: false,
96        msg: '',
97        type: 0
98      });
99    } catch (error) {
100      insertError(error, "Ruturajsinh Jadeja");
101    }
102  }; //Alert Box
103
104
105  const alertBox = (mesage, type) => {
106    try {
107      setdlMsg({
108        open: true,
109        msg: mesage,
110        type: type
111      });
112    } catch (error) {
113      insertError(error, "Ruturajsinh Jadeja");
114    }
115  };
116
117  const InsertFeedBackData = async () => {
118    try {
119      $(".isLoader").show();
120
121      const obj = _.cloneDeep(feedbackObj);
122
123      let flag = validation(obj);
124
125      if (flag) {
126        const data = {
127          Type: obj.Type.value,
128          Subject: obj.Subject.value,
129          CustEmail: obj.Email.trim(),
130          CustName: obj.ContactPerson.trim(),
131          CustPhone: obj.CustPhone.trim(),
132          Observation: obj.Comment.trim(),
133          captcha: obj.captcha,
134          captchaurl: "Captcha/CImage.aspx"
135        };
136        await axios.post('/Web_Methods/OtherWebMethod.aspx/SubmitFeedBack', {
137          Feedback: data
138        }).then(async response => {
139          let data = await JSON.parse(response.data.d.data);
140
141          if (data.status == 2) {
142            //$("#spanValidCaptcha").show();
143            CapchaImageRefresh();
144            alertBox("Enter Valid Captcha");
145          } else {
146            if (data.status == 1) {
147              setFeedbackObj({
148                Type: {
149                  value: 0,
150                  label: 'Select Type'
151                },
152                Subject: {
153                  value: 0,
154                  label: 'Select Subject'
155                },
156                Email: "",
157                ContactPerson: "",
158                CustPhone: "",
159                Comment: "",
160                captcha: "",
161                captchaurl: "Captcha/CImage.aspx"
162              });
163              alertBox(data.msg);
164            } else {
165              if (data.status == 0) {
166                alertBox(data.msg);
167              }
168            }
169          }
170        }).catch(function (error) {
171          console.log(error);
172        });
173      }
174    } catch (error) {
175      insertError(error, "Ruturajsinh Jadeja");
176    } finally {
177      $(".isLoader").hide();
178    }
179  };
180
181  const feedbackDetailsChange = (e, cheackRegx) => {
182    let flag = true;
183
184    if (cheackRegx == 1) {
185      const re = /^[0-9\b]+$/;
186
187      if (e.target.value === '' || re.test(e.target.value)) {
188        flag = true;
189      } else {
190        flag = false;
191      }
192    }
193
194    if (flag) {
195      feedbackObj[e.target.name] = e.target.value;
196      setFeedbackObj(feedbackObj => _objectSpread({}, feedbackObj));
197    }
198  };
199
200  const isValidEmailAddress = emailAddress => {
201    try {
202      let pattern = new RegExp(/^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i);
203      return pattern.test(emailAddress);
204    } catch (error) {
205      insertError(error, "Ruturajsinh Jadeja");
206    }
207  };
208
209  const CapchaImageRefresh = async () => {
210    try {
211      $(".isLoader").show();
212      await axios.post('/DataBinding.aspx/ChangeCapchaImage', {}).then(async response => {
213        let data = await response.data.d;
214        feedbackObj.captchaurl = data.toString();
215        setFeedbackObj(feedbackObj => _objectSpread({}, feedbackObj));
216      }).catch(function (error) {
217        console.log(error);
218      });
219    } catch (error) {
220      insertError(error, "Ruturajsinh Jadeja");
221    } finally {
222      $(".isLoader").hide();
223    }
224  };
225
226  const validation = data => {
227    let isFlag = true;
228
229    try {
230      if (data.Type.value > 0) {
231        $("#spnType").hide();
232      } else {
233        $("#spnType").show();
234        $("#Type").focus();
235        isFlag = false;
236      }
237
238      if (data.Subject.value > 0) {
239        $("#spnSubject").hide();
240      } else {
241        $("#spnSubject").show();
242        $("#Subject").focus();
243        isFlag = false;
244      }
245
246      if (data.Email.trim() != "" && data.Email != undefined) {
247        $("#spnEmail").hide();
248        $("#spanValidEmail").hide();
249
250        if (isValidEmailAddress(data.Email.trim())) {
251          $("#spanValidEmail").hide();
252        } else {
253          isFlag = false;
254          $("#spanValidEmail").show();
255          $("#txtEmail").focus();
256        }
257      } else {
258        $("#spnEmail").show();
259        $("#spanValidEmail").hide();
260        $("#txtEmail").focus();
261        isFlag = false;
262      }
263
264      if (data.ContactPerson != "" && data.ContactPerson != undefined) {
265        $("#spnContactPerson").hide();
266      } else {
267        $("#spnContactPerson").show();
268        $("#txtContactPerson").focus();
269        isFlag = false;
270      }
271
272      if (data.CustPhone.trim() != "" && data.CustPhone != undefined) {
273        $("#spnCustPhone").hide();
274
275        if (data.CustPhone.match(/^[6-9]\d{9}$/)) {
276          $("#spanValidspnCustPhone").hide();
277        } else {
278          isFlag = false;
279          $("#spanValidspnCustPhone").show();
280          $("#txtCustPhone").focus();
281        }
282      } else {
283        $("#spnCustPhone").show();
284        $("#spanValidspnCustPhone").hide();
285        $("#txtCustPhone").focus();
286        isFlag = false;
287      }
288
289      if (data.ContactPerson.trim() != "" && data.ContactPerson != undefined) {
290        $("#spnContactPerson").hide();
291      } else {
292        $("#spnContactPerson").show();
293        $("#txtContactPerson").focus();
294        isFlag = false;
295      }
296
297      if (data.Comment.trim() != "" && data.Comment != undefined) {
298        $("#spnComment").hide();
299      } else {
300        $("#spnComment").show();
301        $("#txtComment").focus();
302        isFlag = false;
303      }
304
305      if (data.captcha.trim() != "" && data.captcha != undefined) {
306        $("#spanCaptcha").hide();
307      } else {
308        $("#spanCaptcha").show();
309        $("#txtcaptcha").focus();
310        isFlag = false;
311      }
312
313      $("#spanValidCaptcha").hide();
314    } catch (error) {
315      insertError(error, "Ruturajsinh Jadeja");
316    } finally {
317      return isFlag;
318    }
319  };
320
321  const insertError = (error, dev_Name) => {
322    const id = CreateNewDiv();
323    const root1 = ReactDOM.createRoot(document.getElementById(id));
324    root1.render(React.createElement(Suspense, null, React.createElement(ErrorLog, {
325      CustomErrorObj: {
326        errorObj: error,
327        developerName: dev_Name
328      }
329    })));
330    RemoveDiv(id);
331  };
332
333  return React.createElement(React.Fragment, null, React.createElement("div", {
334    id: "wrapper"
335  }, React.createElement("div", {
336    className: "fix_contentwidth"
337  }, React.createElement("div", {
338    className: "feedback_wrapper"
339  }, React.createElement("div", {
340    className: "panel panel-primary"
341  }, React.createElement("div", {
342    className: "panel-heading"
343  }, "Feedback"), React.createElement("div", {
344    className: "panel-body"
345  }, React.createElement("div", {
346    className: "feedbkformgroup"
347  }, React.createElement("div", {
348    className: "feedbkinput"
349  }, React.createElement("div", {
350    className: "col-lg-6 col-md-6 col-sm-12 col-xs-12 mrgbtm"
351  }, React.createElement("label", null, "Feedback Type"), React.createElement(Autocomplete, {
352    id: "Type",
353    name: "Type",
354    autoHighlight: true,
355    value: feedbackObj.Type,
356    options: TypeObj,
357    onChange: (e, n) => {
358      ddlChange(e, n, 'Type');
359    },
360    error: "true",
361    renderOption: (props, option) => React.createElement(Box, _extends({
362      component: "li"
363    }, props, {
364      key: option.value
365    }), option.label),
366    renderInput: params => React.createElement(TextField, _extends({}, params, {
367      label: "",
368      variant: "standard"
369    }))
370  }), React.createElement("span", {
371    className: "redclr",
372    id: "spnType",
373    style: {
374      display: 'none',
375      color: 'red'
376    }
377  }, "Please Enter Feedback Type")), React.createElement("div", {
378    className: "col-lg-6 col-md-6 col-sm-12 col-xs-12 mrgbtm"
379  }, React.createElement("label", null, "Subject"), React.createElement(Autocomplete, {
380    id: "Subject",
381    name: "Subject",
382    autoHighlight: true,
383    value: feedbackObj.Subject,
384    options: SubjectObj,
385    onChange: (e, n) => {
386      ddlChange(e, n, 'Subject');
387    },
388    error: "true",
389    renderOption: (props, option) => React.createElement(Box, _extends({
390      component: "li"
391    }, props, {
392      key: option.value
393    }), option.label),
394    renderInput: params => React.createElement(TextField, _extends({}, params, {
395      label: "",
396      variant: "standard"
397    }))
398  }), React.createElement("span", {
399    className: "redclr",
400    id: "spnSubject",
401    style: {
402      display: 'none',
403      color: 'red'
404    }
405  }, "Please Enter Subject")), React.createElement("div", {
406    className: "col-lg-6 col-md-6 col-sm-12 col-xs-12 mrgbtm"
407  }, React.createElement("label", null, "Email"), React.createElement("input", {
408    type: "text",
409    className: "form-control",
410    placeholder: "Email",
411    name: "Email",
412    id: "txtEmail",
413    maxLength: "100",
414    value: feedbackObj.Email,
415    onChange: e => {
416      feedbackDetailsChange(e, 0);
417    },
418    autoComplete: "off"
419  }), React.createElement("span", {
420    className: "redclr",
421    id: "spnEmail",
422    style: {
423      display: 'none',
424      color: 'red'
425    }
426  }, "Please Enter Email"), React.createElement("span", {
427    className: "redclr",
428    id: "spanValidEmail",
429    style: {
430      display: 'none',
431      color: 'red'
432    }
433  }, "Please Enter Valid Email")), React.createElement("div", {
434    className: "col-lg-6 col-md-6 col-sm-12 col-xs-12 mrgbtm"
435  }, React.createElement("label", null, "Contact person"), React.createElement("input", {
436    type: "text",
437    className: "form-control",
438    placeholder: "Contact person",
439    name: "ContactPerson",
440    id: "txtContactPerson",
441    value: feedbackObj.ContactPerson,
442    onChange: e => {
443      feedbackDetailsChange(e, 0);
444    },
445    autoComplete: "off"
446  }), React.createElement("span", {
447    className: "redclr",
448    id: "spnContactPerson",
449    style: {
450      display: 'none',
451      color: 'red'
452    }
453  }, "Please Enter Contact Person")), React.createElement("div", {
454    className: "col-lg-6 col-md-6 col-sm-12 col-xs-12 mrgbtm"
455  }, React.createElement("label", null, "Phone No."), React.createElement("input", {
456    type: "text",
457    maxLength: "10",
458    className: "form-control",
459    placeholder: "Phone No.",
460    name: "CustPhone",
461    id: "txtCustPhone",
462    value: feedbackObj.CustPhone,
463    onChange: e => {
464      feedbackDetailsChange(e, 1);
465    },
466    autoComplete: "off"
467  }), React.createElement("span", {
468    className: "redclr",
469    id: "spnCustPhone",
470    style: {
471      display: 'none',
472      color: 'red'
473    }
474  }, "Please Enter Phone No."), React.createElement("span", {
475    className: "redclr",
476    id: "spanValidspnCustPhone",
477    style: {
478      display: 'none',
479      color: 'red'
480    }
481  }, "Please Enter Valid Phone No.")), React.createElement("div", {
482    className: "col-lg-6 col-md-6 col-sm-12 col-xs-12 mrgbtm"
483  }, React.createElement("label", null, "Comment"), React.createElement("textarea", {
484    name: "Comment",
485    id: "txtComment",
486    className: "form-control",
487    placeholder: "Comment",
488    spellCheck: "false",
489    value: feedbackObj.Comment,
490    onChange: e => {
491      feedbackDetailsChange(e, 0);
492    }
493  }), React.createElement("span", {
494    className: "redclr",
495    id: "spnComment",
496    style: {
497      display: 'none',
498      color: 'red'
499    }
500  }, "Please Enter Comment"))), React.createElement("div", {
501    className: "agntpgcaptcha"
502  }, React.createElement("div", {
503    className: "col-lg-12 col-md-12 col-sm-12 col-xs-12 mrgbtm"
504  }, React.createElement("label", null, "Retype the characters from the picture:"), React.createElement("div", {
505    className: "captchin"
506  }, React.createElement("img", {
507    id: "ctl00_content_imgcaptcha",
508    src: feedbackObj.captchaurl,
509    style: {
510      Width: '200px',
511      borderWidth: '0'
512    }
513  }), React.createElement("a", {
514    onClick: CapchaImageRefresh,
515    className: "captcharefresh"
516  }, React.createElement("i", {
517    className: "fa fa-refresh"
518  })))), React.createElement("div", {
519    className: "col-lg-6 col-md-6 col-sm-12 col-xs-12 mrgbtm"
520  }, React.createElement("input", {
521    type: "text",
522    maxLength: "40",
523    className: "form-control cldr-inp",
524    name: "captcha",
525    id: "txtcaptcha",
526    value: feedbackObj.captcha,
527    onChange: e => {
528      feedbackDetailsChange(e, 0);
529    }
530  }), React.createElement("span", {
531    className: "redclr",
532    id: "spanCaptcha",
533    style: {
534      display: 'none',
535      color: 'red'
536    }
537  }, "Please Enter Captcha"), React.createElement("span", {
538    className: "redclr",
539    id: "spanValidCaptcha",
540    style: {
541      display: 'none',
542      color: 'red'
543    }
544  }, "Please Enter Valid Captcha")), React.createElement("div", {
545    className: "col-lg-12 col-md-12 col-sm-12 col-xs-12 mrgbtm"
546  }, React.createElement("input", {
547    type: "button",
548    name: "",
549    value: "Submit",
550    id: "",
551    className: "btn btn-default btn-primary",
552    onClick: InsertFeedBackData
553  }))))))))), React.createElement("div", null, dlgMsg.open && React.createElement(Message, {
554    Msg: dlgMsg,
555    close: handleClose
556  })));
557}
558
559const Message = props => {
560  const {
561    Msg,
562    close
563  } = props;
564  return React.createElement(React.Fragment, null, React.createElement(Snackbar, {
565    open: Msg.open,
566    autoHideDuration: 4500,
567    onClose: close,
568    className: "feedback_popup_main",
569    anchorOrigin: {
570      horizontal: "center",
571      vertical: "top"
572    }
573  }, React.createElement(Alert, {
574    onClose: close,
575    severity: "error",
576    sx: {
577      width: '100%'
578    }
579  }, Msg.msg)));
580};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.