1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5579],{8935:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/raisecomplaint",function(){return s(9649)}])},9649:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return pages_raisecomplaint}});var a=s(5893),r=s(7159),i=s(7294),n=s(5675),d=s.n(n),l=s(1163),o=s(4360),m=s(7536),c=s(9669),u=s.n(c),RaiseComplaint=()=>{var e;let[t,s]=(0,i.useState)(!1),[r,n]=(0,i.useState)(""),[c,p]=(0,i.useState)(!0),[x,h]=(0,i.useState)(!0),[b,g]=(0,i.useState)(!0),[f,_]=(0,i.useState)(!1),[w,j]=(0,i.useState)(!1),[v,N]=(0,i.useState)(!1),[S,y]=(0,i.useState)(!1),[C,q]=(0,i.useState)([]),[R,T]=(0,i.useState)("Bank Statement"),[O,k]=(0,i.useState)(""),[E,I]=(0,i.useState)(0),[P,L]=(0,i.useState)({selectedValue:""}),[F,A]=(0,i.useState)({selectedType:""}),B=(0,l.useRouter)(),{mobileNumber:Z}=B.query,[D,U]=(0,i.useState)(null),fetchReason=async()=>{await u().post("".concat(o.fw,"/support/getComplaintReasons"),{}).then(e=>{let t=[];"SUC5001"==e.data.status&&(e.data.resultObj.map(e=>{t.push({id:e.id,reason:e.reason})}),q(t))})},{handleSubmit:V,register:M,formState:{errors:X},reset:$,resetField:J,setValue:W}=(0,m.cI)({mode:"onChange",defaultValues:{mobile:"",email:"",reason:"",transactionId:"",message:""}}),onSubmitFn=async e=>{var t;s(!0),n("");let a=null==e?void 0:null===(t=e.message)||void 0===t?void 0:t.trim(),r=await fetch("".concat(o.Uj,"/api/translate"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:a})}),i=await r.json(),d="";d=r.ok?i.translatedText:a;let l={mobileNumber:e.mobile||Z,emailId:e.email,reason:e.reason,trxnId:e.transactionId.trim(),description:d,requestFrom:Z?"APP":"WEB"};u().post("".concat(o.fw,"/support/raiseComplaint"),l).then(e=>{s(!1),"SUC5001"==e.data.status?(p(!1),k(e.data.message)):(n(e.data.message),p(!0))})};return(0,i.useEffect)(()=>{fetchReason()},[]),(0,a.jsx)("div",{children:(0,a.jsx)("section",{className:"md:pt-[9em] md:pb-[4em] ".concat((null==Z?void 0:Z.length)!==10?"pt-[7.5em] pb-[3em]":"pt-[0.8em] pb-[0em] h-100vh"),children:(0,a.jsxs)("div",{className:"container-wide",children:[(null==Z?void 0:Z.length)!==10&&(0,a.jsx)("h1",{className:"text-center text-white md:text-[48px] font-medium md:leading-[72px] text-[20px] leading-[20px] mb-0",children:"Raise a Complaint"}),(0,a.jsx)("div",{className:"md:pt-[3em] md:pb-[3em] pt-[2em] pb-[2em]",children:(0,a.jsx)("div",{className:"md:border border-primary-omni rounded-[20px] md:p-2 bg-transparent ",children:(0,a.jsx)("div",{className:"p-[1em_0.8em] md:p-[3em_2em] bg-white rounded-[10px] md:rounded-[20px] md:shadow-[0_4px_10px_0_rgba(0,0,0,0.15)]",children:t?(0,a.jsx)("div",{className:"text-center",children:(0,a.jsx)("div",{className:"loader spinner-border animate-spin text-red-600 w-8 h-8 border-4 border-red-300 rounded-full mx-auto"})}):(0,a.jsx)(a.Fragment,{children:c?(0,a.jsxs)("form",{onSubmit:V(onSubmitFn),className:"space-y-6",children:[(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-3 gap-6",children:[(null==Z?void 0:Z.length)!==10&&(0,a.jsxs)("div",{className:"w-full",children:[(0,a.jsx)("input",{...M("mobile",{required:!0,minLength:10,maxLength:10,pattern:/^[6-9]\d{9}$/i}),maxLength:10,type:"text",placeholder:"Registered Mobile Number*",className:"w-full text-[13px] px-4 py-2 focus:outline-none focus:ring-2 focus:ring-red-500 rounded-[5px] border md:border-[#eee] border-[#bebebe] bg-white md:shadow-[0_2px_6px_0_rgba(0,0,0,0.15)]"}),(null==X?void 0:X.mobile)&&(0,a.jsxs)("p",{className:"text-red-600 text-sm mt-1",children:["required"===X.mobile.type&&"This field is required","pattern"===X.mobile.type&&"Please enter a valid Phone number"]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("input",{...M("email",{required:!0,pattern:/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i}),type:"email",placeholder:"Registered Email ID*",className:"w-full text-[13px] px-4 py-2 focus:outline-none focus:ring-2 focus:ring-red-500 rounded-[5px] border md:border-[#eee] border-[#bebebe] bg-white md:shadow-[0_2px_6px_0_rgba(0,0,0,0.15)]"}),(null==X?void 0:X.email)&&(0,a.jsxs)("p",{className:"text-red-600 text-sm mt-1",children:["required"===X.email.type&&"This field is required","pattern"===X.email.type&&"Please enter a valid Email address"]})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("select",{...M("reason",{required:!0}),className:"w-full text-[13px] px-4 py-2 focus:outline-none focus:ring-2 focus:ring-red-500 rounded-[5px] border md:border-[#eee] border-[#bebebe] bg-white md:shadow-[0_2px_6px_0_rgba(0,0,0,0.15)]",children:[(0,a.jsx)("option",{value:"",hidden:!0,disabled:!0,children:"Select Reason*"}),C.map(e=>(0,a.jsx)("option",{value:e.id,children:e.reason},e.id))]}),(null==X?void 0:null===(e=X.reason)||void 0===e?void 0:e.type)==="required"&&(0,a.jsx)("p",{className:"text-red-600 text-sm mt-1",children:"This field is required"})]}),(0,a.jsx)("div",{children:(0,a.jsx)("input",{...M("transactionId"),t
1ype:"text",placeholder:"Transaction ID",maxLength:25,onBlur:e=>{let t=e.target.value.trim();W("transactionId",t)},className:"w-full text-[13px] px-4 py-2 focus:outline-none focus:ring-2 focus:ring-red-500 rounded-[5px] border md:border-[#eee] border-[#bebebe] bg-white md:shadow-[0_2px_6px_0_rgba(0,0,0,0.15)]"})}),(0,a.jsxs)("div",{className:"",children:[(0,a.jsx)("textarea",{...M("message",{required:!0,maxLength:500}),placeholder:"Description*",maxLength:500,onBlur:e=>{let t=e.target.value.trim();W("message",t)},rows:1,className:"w-full text-[13px] px-4 py-2 focus:outline-none focus:ring-2 focus:ring-red-500 rounded-[5px] border md:border-[#eee] border-[#bebebe] bg-white md:shadow-[0_2px_6px_0_rgba(0,0,0,0.15)]"}),(null==X?void 0:X.message)&&(0,a.jsxs)("p",{className:"text-red-600 text-sm mt-1",children:["required"===X.message.type&&"This field is required","maxLength"===X.message.type&&"Max 500 characters allowed"]})]})]}),r&&(0,a.jsx)("p",{className:"text-red-500 mt-4",children:r}),(0,a.jsx)("div",{className:"text-center",children:(0,a.jsx)("button",{type:"submit",className:"text-white transition md:w-[282px] w-[222px] h-[40px] rounded-full border-0 text-white text-[16px] font-medium text-center ".concat((null==Z?void 0:Z.length)===10?"cursor-not-allowed border-none w-[96%] text-white bg-[#262948] absolute bottom-2 left-0 right-0 rounded-[30px] h-[40px] mt-12 mx-auto":"bg-red-500 hover:bg-red-600 bg-[linear-gradient(129deg,_#ee3c32_21.55%,_#fd988d_53.38%,_#ee3c32_86.15%)] hover:bg-[linear-gradient(129deg,_#fd988d_21.55%,_#ee3c32_53.38%,_#ee3c32_86.15%)] transition-all duration-300"),disabled:t,children:t?(0,a.jsx)("div",{className:"flex items-center justify-center",children:(0,a.jsx)("div",{className:"loader spinner-border animate-spin text-white w-5 h-5 border-4 border-red-300 rounded-full"})}):(0,a.jsx)("span",{children:"Submit"})})})]}):(0,a.jsxs)("div",{className:"text-center space-y-4",children:[(0,a.jsx)(d(),{src:"/assets/image/support/success.svg",alt:"success",width:80,height:80,className:"mx-auto"}),(0,a.jsx)("p",{className:"text-lg text-green-600",children:O})]})})})})})]})})})},pages_raisecomplaint=()=>(0,a.jsxs)("div",{children:[(0,a.jsx)(r.Z,{title:"Raise a Complaint â OmniCard",description:"Submit details to raise a complaint with OmniCard and get assistance for quick resolution.",keywords:"OmniCard, complaint form, grievance, customer support",og_title:"Raise a Complaint â OmniCard",og_description:"Submit details to raise a complaint with OmniCard and get assistance for quick resolution.",canonical_url:"https://omnicard.in/raisecomplaint"}),(0,a.jsx)(RaiseComplaint,{})]})}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=8935)}),_N_E=e.O()}]);
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.