1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6034],{12051:function(e,r,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/customers/my-bid-limit",function(){return s(41998)}])},41998:function(e,r,s){"use strict";s.r(r),s.d(r,{default:function(){return b}});var t=s(85893),i=s(28646),n=s(59417),l=s(99603),o=s(88446),c=s(41664),d=s.n(c),a=s(67294),u=s(86501),m=s(11163),x=s(48583),h=s(94543),f=s(9008),g=s.n(f),v=s(88754),p=function(){var e;let r=(0,m.useRouter)(),s=(0,a.useRef)(null),i=(0,x.Dv)(h.ZP),c=null==i?void 0:null===(e=i.userDetails)||void 0===e?void 0:e.status,[f,p]=(0,a.useState)({id:-1,limit:0,current_limit:0}),[b,_]=(0,a.useState)(0),[j,N]=(0,a.useState)(""),[y,w]=(0,a.useState)(""),[L,E]=(0,a.useState)({loading:!1,success:"",error:""}),[S,Z]=(0,a.useState)({loading:!1,success:"",error:""}),[P,B]=(0,a.useState)({id:-1,refer_person_1:"",refer_person_2:"",refer_person_3:"",email_v:-1,mobile_v:-1}),C=async()=>{try{let s=await o.Z.get("/user/viewuser");if((null==s?void 0:s.status)===200){var e;if(p(null==s?void 0:s.data),B(null==s?void 0:s.data),1!==s.data.email_v&&(null==s?void 0:null===(e=s.data)||void 0===e?void 0:e.mobile_v)!==2){u.ZP.error("You need to verify your email and mobile",{duration:3e3,icon:(0,t.jsx)(l.G,{icon:n.FU$})}),r.push("/customers/profile");return}}E({loading:!1,success:"success",error:""})}catch(e){console.error(e),E({loading:!1,success:"error",error:""})}},k=async()=>{try{let e=await o.Z.get("/bid_limit/getIpAddress");w(e.data.ipAddress),E({loading:!1,success:"success",error:""})}catch(e){console.error(e),E({loading:!1,success:"error",error:""})}},D=async()=>{try{let e=!1,r={desire_bid_limit:""};if(r.desire_bid_limit="","number"!=typeof b&&(e=!0,r.desire_bid_limit="Not a Number"),0===b&&(e=!0,r.desire_bid_limit="required"),N(r.desire_bid_limit),e)return!0;return!1}catch(e){console.error(e)}},G=async()=>{try{let e=await D();if(e){Z({loading:!1,success:"",error:"Enter A Valid Input"});return}Z({loading:!0,success:"",error:""});let r={userid:f.id,desire_bid_limit:b,ip:y};await o.Z.post("/bid_limit/insertbid_limit_client",{...r}).then(e=>{200===e.status?(u.ZP.success("Your Desire Bid Limit request successfully send to admin."),_(0),(null==s?void 0:s.current)&&(s.current.value=""),Z({loading:!1,success:"successfully updated bidlimit",error:""})):(u.ZP.error("Something went wrong"),Z({loading:!1,success:"",error:"something went wrong"}))}).catch(e=>{u.ZP.error("Internal Server Error"),console.error(e),Z({loading:!1,success:"",error:"Internal server error"})})}catch(e){console.error(e),E({loading:!1,success:"error",error:""})}};return(0,a.useEffect)(()=>{C(),k()},[]),(0,t.jsxs)("div",{className:"lg:mx-28",children:[(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(g(),{children:(0,t.jsx)("title",{children:"My Bid Limit"})})}),c.split(",").includes("1")&&c.split(",").includes("2")?c.split(",").includes("4")||c.split(",").includes("8")?(0,t.jsxs)("div",{className:"container mx-auto",children:[(0,t.jsxs)("div",{className:"container mx-auto bg-gray-200 h-10 lg:my-3 rounded-md p-2 text-gray-500",children:[(0,t.jsx)(d(),{className:"hover:text-red-700",href:"/",children:"Home"}),"\xa0/\xa0",(0,t.jsx)(d(),{className:"hover:text-red-700",href:"/customers",children:"Dashboard"}),"\xa0/\xa0",(0,t.jsx)(d(),{className:"hover:text-red-700",href:"/customers/my-bid-limit",children:"My Bid Limit"})]}),(0,t.jsxs)("div",{className:"flex flex-col space-y-5 lg:space-y-0 lg:flex-row justify-between p-5",children:[(0,t.jsxs)("div",{className:"text-2xl flex space-x-2",children:[(0,t.jsx)("h1",{children:"Alloted Bid Limit:"}),(0,t.jsx)(l.G,{className:"mt-1",icon:n.H0g}),(0,t.jsxs)("h1",{className:"text-red-500 ",children:[" ",(0,v.b)(null==f?void 0:f.limit)]})]}),(0,t.jsxs)("div",{className:"text-2xl flex space-x-2",children:[(0,t.jsx)("h1",{children:"Current Bid Limit:"}),(0,t.jsx)(l.G,{className:"mt-1",icon:n.H0g}),(0,t.jsxs)("h1",{className:"text-red-500 ",children:[" ",(0,v.b)(null==f?void 0:f.current_limit)]})]}),(0,t.jsxs)("div",{className:"text-2xl flex space-x-2",children:[(0,t.jsx)("h1",{children:"Consumed Limit:"}),(0,t.jsx)(l.G,{className:"mt-1",icon:n.H0g}),(0,t.jsxs)("h1",{className:"text-red-500 ",children:[" ",(0,v.b)((null==f?void 0:f.limit)-(null==f?void 0:f.current_limit))]})]})]}),(0,t.jsxs)("div",{className:"flex flex-col text-center items-center w-full ",children:[(0,t.jsx)("h1",{children:"Enter Your Desire Bid Limit"}),""!==j&&(0,t.jsx)("span",{children:j}),(0,t.jsxs)("div",{className:"max-w-min flex py-5",children:[(0,t.jsx)("div",{className:"border p-2 bg-gray-500 rounded-md rounded-r-none",children:(0,t.jsx)(l.G,{icon:n.H0g})}),(0,t.jsx)("input",{className:" border outline-none rounded-md rounded-l-none rounded-r-none ",type:"number",ref:s,step:1e3,onChange:e=>{_(Number(e.target.value))}}),(0,t.jsxs)("button",{disabled:null==S?void 0:S.loading,onClick:()=>G(),className:"border bg-blue-600 w-36 rounded-md rounded-l-none",children:["Send Request",(null==S?void 0:S.loading)&&(0,t.jsx)(l.G,{className:"px-1",icon:n.LM3,spin:!0})]})]})]})]}):(0,t.jsx)("h1",{className:"text-center text-xl",children:"Bidder registration is required to view this content."}):(0,t.jsx)("h1",{className:"text-center text-xl",children:"You need to Verify your email and mobile"})]})},b=()=>{let e=(0,x.Dv)(h.ZP);return e.loading?(0,t.jsx)("p",{className:"md:mx-28 text-center p-5",children:"Loading..."}):e.isLoggedIn?(0,t.jsx)(p,{}):(0,t.jsx)(i.Z,{})}},28646:function(e,r,s){"use strict";var t=s(85893),i=s(41664),n=s.n(i),l=s(11163);s(67294),r.Z=()=>{let e=(0,l.useRouter)(),r=e.asPath;return(0,t.jsxs)("div",{className:"md:mx-28 text-center text-red-500 p-10 bg-gray-100 text-xl",children:["Your are not Logged in to use this functionality .......! ",(0,t.jsx)("br",{}),(0,t.jsx)(n(),{className:"text-blue-500",href:"/login?re_url=".concat(r),children:"Click here to Login"})]})}},88754:function(e,r,s){"use strict";s.d(r,{b:function(){return t}});let t=e=>{try{let r="";if("number"==typeof e?r=e.toString():"string"==typeof e&&(r=e),r.includes("-")){let[e,s]=r.split("-");return i(e)+"-"+i(s)}return i(r)}catch(e){return console.error("Error formatting number:",e),"-"}},i=e=>{try{let r="",s=0,[t,i]=e.split(".");for(let e=t.length-1;e>=0;e--)r=t[e]+r,s++,3===s&&e>0?r=","+r:s>3&&(s-3)%2==0&&e>0&&(r=","+r);return i&&(r+="."+i),r}catch(e){return console.error("Error formatting part of the number:",e),"-"}}},9008:function(e,r,s){e.exports=s(42636)}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=12051)}),_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.