1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1838],{53946:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/profile/customizedEnquiry",function(){return s(44992)}])},8946:function(e,t){"use strict";t.Z={src:"/_next/static/media/profile.3f0160b4.jpeg",height:600,width:600,blurDataURL:"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAoKCgoKCgsMDAsPEA4QDxYUExMUFiIYGhgaGCIzICUgICUgMy03LCksNy1RQDg4QFFeT0pPXnFlZXGPiI+7u/sBCgoKCgoKCwwMCw8QDhAPFhQTExQWIhgaGBoYIjMgJSAgJSAzLTcsKSw3LVFAODhAUV5PSk9ecWVlcY+Ij7u7+//CABEIAAgACAMBIgACEQEDEQH/xAAoAAEBAAAAAAAAAAAAAAAAAAAABwEBAQAAAAAAAAAAAAAAAAAAAQL/2gAMAwEAAhADEAAAAKUJf//EAB4QAAAEBwAAAAAAAAAAAAAAAAACEhMEERUkMjOx/9oACAEBAAE/AFx1RS1Zs5TLs6P/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oACAECAQE/AH//xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oACAEDAQE/AH//2Q==",blurWidth:8,blurHeight:8}},73658:function(e,t,s){"use strict";var l=s(85893),a=s(67294),i=s(733),r=s.n(i),n=s(37351),o=s(25675),d=s.n(o);let c=()=>{let e=(0,a.useContext)(n.ThemeContext),[t,s]=(0,a.useState)("");return((0,a.useEffect)(()=>{e.splashLogo&&""!==e.splashLogo&&s(e.splashLogo)},[e]),t)?(0,l.jsx)("div",{className:"flex justify-center items-center py-40",children:(0,l.jsx)(d(),{width:144,height:144,src:t,alt:"Loading",className:"w-36 h-36 object-contain"})}):(0,l.jsx)("div",{className:"w-full h-full flex justify-center items-center py-40",children:(0,l.jsx)(r(),{type:"spinningBubbles",color:"#000000",height:"10%",width:"10%"})})};t.Z=c},66506:function(e,t,s){"use strict";var l=s(85893),a=s(67294),i=s(8193),r=s(51526),n=s(43495);let o=e=>{let{isOpen:t,onClose:s,onConfirm:o}=e,d=(0,a.useRef)();return(0,a.useEffect)(()=>{let e=e=>{d.current&&!d.current.contains(e.target)&&s()};return t?document.addEventListener("mousedown",e):document.removeEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[t,s]),(0,l.jsx)(r.M,{children:t&&(0,l.jsx)(n.E.div,{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},children:(0,l.jsx)(n.E.div,{className:"bg-white rounded-lg shadow-lg p-8 w-full max-w-lg border-t-4 border-primary md:max-w-md",initial:{y:50,opacity:0},animate:{y:0,opacity:1},exit:{y:50,opacity:0},transition:{type:"tween",ease:"easeInOut",duration:.4},ref:d,children:(0,l.jsxs)("div",{className:"flex flex-col items-center",children:[(0,l.jsx)(i.sQg,{className:"text-red-500 text-6xl mb-4"}),(0,l.jsx)("h2",{className:"text-2xl font-semibold mb-4",children:"Are you sure?"}),(0,l.jsx)("p",{className:"text-gray-600 mb-6 text-center",children:"Do you want to logout?"}),(0,l.jsxs)("div",{className:"flex flex-wrap justify-center space-x-4 space-y-2 md:space-y-0",children:[(0,l.jsx)("button",{onClick:o,className:"bg-blue-500 text-white px-6 py-2 rounded-full shadow-md hover:bg-blue-600 transition-all duration-300 transform hover:scale-105",children:"Yes, logout!"}),(0,l.jsx)("button",{onClick:s,className:"bg-red-500 text-white px-6 py-2 rounded-full shadow-md hover:bg-red-600 transition-all duration-300 transform hover:scale-105",children:"Cancel"})]})]})})})})};t.Z=o},15788:function(e,t,s){"use strict";var l=s(85893),a=s(41664),i=s.n(a);let r=e=>{let{label:t}=e;return(0,l.jsx)("div",{className:"xl:container px-4 py-4 flex justify-between",children:(0,l.jsxs)("div",{className:"flex gap-3 items-center",children:[(0,l.jsx)(i(),{href:"/",className:"text-primary text-base",children:(0,l.jsx)("i",{className:"fas fa-home"})}),(0,l.jsxs)("div",{className:"flex gap-3 items-center mt-1",children:[(0,l.jsx)("span",{className:"text-sm text-gray-500",children:(0,l.jsx)("i",{className:"fas fa-chevron-right"})}),(0,l.jsx)("p",{className:"text-gray-500 font-medium uppercase",children:t})]})]})})};t.Z=r},71846:function(e,t,s){"use strict";var l=s(85893),a=s(41664),i=s.n(a),r=s(25675),n=s.n(r),o=s(68015),d=s(85574),c=s(67294);let u=e=>{let{user:t,userDetails:s,goldPlanEnable:a,buySellEnable:r,websiteStatus:u,theme:m,handleLogout:x,applySiteStatus:h,selectedPage:f}=e,{jboId:p}=(0,o.useJobId)(),{menuJsonApp:A}=(0,c.useContext)(d.UserContext);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"lg:hidden",children:[(0,l.jsx)("div",{className:"bg-gray-50 p-4 flex items-center justify-center shadow rounded-t-lg",children:(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)(n(),{src:t,alt:"User",className:"rounded-full w-14 h-14 border border-gray-300"}),(0,l.jsxs)("div",{className:"ml-3",children:[(0,l.jsx)("p",{className:"text-gray-600",children:"Hello.."}),(0,l.jsxs)("h4",{className:"text-gray-800 font-semibold capitalize",children:[null==s?void 0:s.name,".."]})]})]})}),(0,l.jsx)("div",{className:"flex flex-wrap justify-between p-4 bg-gray-50 shadow rounded-b-lg",children:[{href:"/profile/User",label:"Manage Account"},{href:"/profile/Address",label:"Manage Address"},{href:"/profile/ChangePassword",label:"Change Password"},{href:"/profile/orders",label:"My Order History"},1==A.customized_status&&{href:"/profile/customizedEnquiry",label:"Customized Order"},a&&{href:"/profile/GoldPlans",label:"Gold Plans"},r&&{href:"/profile/Wallet",label:"Wallet"},((null==s?void 0:s.user_type)>=2||3==u)&&{href:"/profile/BidAsk",label:"Bid & Ask",className:"border-2 border-primary"},{href:"/profile/Wishlist",label:"My Wishlist"},233==p&&{href:"/profile/TryEarRing",label:"Try Ear Ring"},,{href:"#",label:"Logout",onClick:x}].filter(Boolean).map((e,t)=>(0,l.jsx)("div",{className:"w-1/2 p-2",children:(0,l.jsx)("a",{href:e.href,onClick:e.onClick,className:"flex flex-col items-center bg-white rounded-lg shadow py-3 hover:text-primary ".concat(e.href===f?"text-primary text-base font-semibold":""," ").concat(e.className||""),children:(0,l.jsx)("span",{className:"text-xs text-center",children:e.label})})},t))})]}),(!h||0!==m.siteStatus)&&(0,l.jsxs)("div",{className:"col-span-3 hidden lg:block",children:[(0,l.jsxs)("div",{className:"px-4 py-3 shadow flex bg-gray-100 items-center gap-4",children:[(0,l.jsx)("div",{className:"flex-shrink-0",children:(0,l.jsx)(n(),{src:t,className:"rounded-full w-14 h-14 p-1 border border-gray-200 object-cover"})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"text-gray-600",children:"Hello.."}),(0,l.jsxs)("h4",{className:"text-gray-800 capitalize font-semibold",children:[null==s?void 0:s.name,".."]})]})]}),(0,l.jsx)("div",{className:"mt-6 bg-gray-100 shadow rounded p-4 divide-y divide-gray-200 space-y-4 text-gray-600",children:[{href:"/profile/User",label:"Manage Account",icon:"fas fa-address-card"},{href:"/profile/Address",label:"Manage Address",icon:"fas fa-map-marker-alt"},{href:"/profile/ChangePassword",label:"Change Password",icon:"fas fa-key"},{href:"/profile/orders",label:"My Order History",icon:"fas fa-gift"},1==A.customized_status&&{href:"/profile/customizedEnquiry",label:"Customized Order",icon:"fas fa-pen-ruler"},a&&{href:"/profile/GoldPlans",label:"Gold Plans",icon:"fas fa-crown"},r&&{href:"/profile/Wallet",label:"Wallet",icon:"fas fa-wallet"},(null==s?void 0:s.user_type)>=2&&{href:"/profile/BidAsk",label:"Bid & Ask",icon:"fas fa-gavel",className:"text-primary"},{href:"/profile/Wishlist",label:"My Wishlist",icon:"fas fa-heart"},233==p&&{href:"/profile/TryEarRing",label:"Try Ear Ring",icon:"fas fa-ring",iconClass:"transform rotate-90"},{href:"#",label:"Logout",icon:"fas fa-sign-out-alt",onClick:x}
1].filter(Boolean).map((e,t)=>(0,l.jsx)("div",{className:"space-y-1 pl-8 pt-4",children:(0,l.jsxs)(i(),{href:e.href,onClick:e.onClick,className:"relative text-base font-medium capitalize hover:text-primary transition block ".concat(e.href===f?"text-primary text-base font-semibold":""," ").concat(e.className||""),children:[e.label,e.icon&&(0,l.jsx)("span",{className:"absolute -left-8 top-0 text-base ".concat(e.iconClass||""),children:(0,l.jsx)("i",{className:e.icon})})]})},t))})]})]})};t.Z=u},44992:function(e,t,s){"use strict";s.r(t),s.d(t,{__N_SSP:function(){return N}});var l=s(85893),a=s(67294),i=s(25675),r=s.n(i),n=s(11163),o=s(15788),d=s(71846),c=s(73658),u=s(66506),m=s(88776),x=s(46059),h=s(82940),f=s(68015),p=s(85574),A=s(8946);let g=e=>{if(!e)return"";let t=new Date(e);return Number.isNaN(t.getTime())?String(e):t.toLocaleDateString("en-US",{month:"short",day:"2-digit",year:"numeric"})},b=e=>e?Array.isArray(e)?e.filter(Boolean):"string"==typeof e&&e?[e]:[]:[],y=e=>{let t=b(null==e?void 0:e.image),s=t.find(e=>"string"==typeof e&&(e.startsWith("http://")||e.startsWith("https://")));return s||"/images/no-product-found.png"},v=e=>{let t=Number(e);return 1===t?{label:"Approved",badgeClass:"border border-[#ABEFC6] bg-[#ECFDF3] text-[#027A48]",canEdit:!1}:2===t?{label:"Rejected",badgeClass:"border border-[#FECDCA] bg-[#FEF3F2] text-[#B42318]",canEdit:!1}:{label:"Pending",badgeClass:"border border-[#FEF3C7] bg-[#FFFBEB] text-[#C14D00]",canEdit:!0}},w=e=>{let{item:t,onEdit:s}=e,[i,n]=(0,a.useState)(!1),[o,d]=(0,a.useState)(!1),c=(0,a.useRef)(null),u=t.requirement||"No requirement details available.",m=Boolean(t.requirement&&t.requirement.trim()),x=v(t.statusCode),h={display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical"};return(0,a.useEffect)(()=>{let e=c.current;if(!e)return;let t=()=>{let t=e.style.display,s=e.style.webkitLineClamp,l=e.style.webkitBoxOrient;e.style.display=h.display,e.style.webkitLineClamp=String(h.WebkitLineClamp),e.style.webkitBoxOrient=h.WebkitBoxOrient,d(e.scrollHeight>e.clientHeight+1),e.style.display=t,e.style.webkitLineClamp=s,e.style.webkitBoxOrient=l};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[u]),(0,l.jsxs)("div",{className:"flex h-full flex-col rounded-xl border border-[#DFE5E1] bg-white p-4 shadow-sm",children:[(0,l.jsxs)("div",{className:"flex gap-4",children:[(0,l.jsx)("div",{className:"h-[120px] w-[120px] shrink-0 overflow-hidden rounded-lg bg-[#F7F7F7]",children:(0,l.jsx)(r(),{src:t.image,alt:t.id,width:120,height:120,unoptimized:!0,className:"h-full w-full object-cover"})}),(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsx)("p",{className:"text-[12px] font-medium uppercase tracking-[0.08em] text-[#99A1AF]",children:"Enquiry ID"}),(0,l.jsx)("h3",{className:"mt-2 text-[18px] font-semibold leading-5 text-[#163526]",children:t.id}),(0,l.jsx)("p",{className:"mt-2 text-[12px] font-medium text-[#99A1AF]",children:t.date||"-"}),(0,l.jsx)("span",{className:"mt-3 inline-flex w-max items-center rounded-full px-2.5 py-1 text-[12px] font-semibold ".concat(x.badgeClass),children:x.label})]})]}),(0,l.jsxs)("div",{className:"mt-4 space-y-3 border-t border-[#E8E8E8] pt-4",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between gap-3 text-[15px] font-medium",children:[(0,l.jsx)("p",{className:"text-[#7A7A7A]",children:"Weight"}),(0,l.jsx)("p",{className:"text-right text-[#1D1D1D]",children:t.weight})]}),(0,l.jsxs)("div",{className:"flex items-center justify-between gap-3 text-[15px] font-medium",children:[(0,l.jsx)("p",{className:"text-[#7A7A7A]",children:"Metal"}),(0,l.jsx)("p",{className:"text-right text-[#1D1D1D]",children:t.metal})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"text-[15px] font-semibold text-[#1F2937]",children:"Requirement"}),(0,l.jsx)("p",{ref:c,className:"mt-1 overflow-hidden text-[14px] leading-6 text-[#6B7280]",style:i?void 0:h,children:u}),m&&o?(0,l.jsx)("button",{type:"button",onClick:()=>n(e=>!e),className:"mt-1 text-[13px] font-semibold text-[#2E7A57]",children:i?"View less":"View more"}):null]})]}),x.canEdit?(0,l.jsx)("button",{type:"button",onClick:()=>s(t.enquiryId),className:"mt-5 rounded-lg bg-[#2E7A57] px-4 py-2.5 text-[13px] font-semibold text-white transition hover:bg-[#256547]",children:"Edit Details"}):null]})},j=()=>{var e;let t=(0,n.useRouter)(),s=(0,h.b)(),{jboId:i}=(0,f.useJobId)(),{clearUser:r,userDetails:b,goldPlanEnable:v,buySellEnable:j,websiteStatus:N,userId:E}=(0,a.useContext)(p.UserContext),[C,k]=(0,a.useState)([]),[B,F]=(0,a.useState)(!0),[q,S]=(0,a.useState)(""),[_,D]=(0,a.useState)(0),[L,z]=(0,a.useState)(!1),[M,O]=(0,a.useState)(!1),[P,Q]=(0,a.useState)(!1),[W,R]=(0,a.useState)(!1),[U,I]=(0,a.useState)(""),[Z,H]=(0,a.useState)(null),T=(0,a.useRef)(s),G=(0,a.useRef)(""),Y=(0,a.useRef)(!1),J=(0,a.useRef)(null);(0,a.useEffect)(()=>{T.current=s},[s]);let K=(0,a.useMemo)(()=>"https://".concat(window.location.hostname),[]),V=()=>{z(!0)},X=()=>{r(),z(!1),window.location.href="/"},$=()=>{let e="/profile/customizedEnquiry";if(window.matchMedia("(max-width: 768px)").matches){window.location.href=e;return}t.replace(e)},ee=()=>{O(!1);let e={...t.query};delete e.openForm,t.replace({pathname:t.pathname,query:e},void 0,{shallow:!0})};(0,a.useEffect)(()=>{var e;t.isReady&&"1"===String((null===(e=t.query)||void 0===e?void 0:e.openForm)||"")&&O(!0)},[t.isReady,null===(e=t.query)||void 0===e?void 0:e.openForm]),(0,a.useEffect)(()=>{let e=async()=>{var e,t,s,l,a,r;let n="".concat(i||233,"-").concat(E||"","-").concat(_);try{if(!E){F(!1),S("User not found. Please login again.");return}if(!K){F(!1),S("Unable to resolve API host.");return}if(Y.current||G.current===n)return;Y.current=!0,G.current=n,F(!0),S("");let o=await T.current.post("".concat(K,"/api/settings/reportCustomerOrderEnquiry"),{jbo_id:i||233,user_id:E}
1);if((null==o?void 0:null===(e=o.data)||void 0===e?void 0:e.status)!==1)throw Error((null==o?void 0:null===(s=o.data)||void 0===s?void 0:s.msg)||"Failed to load enquiries.");let d=null==o?void 0:null===(t=o.data)||void 0===t?void 0:t.data,c=Array.isArray(d)?d:d?[d]:[];k(c.map(e=>({enquiryId:(null==e?void 0:e.enquiry_id)||null,id:(null==e?void 0:e.enquiry_id)?"EQY-".concat(e.enquiry_id):"EQY-",date:g(null==e?void 0:e.created_at),statusCode:Number(null!==(l=null==e?void 0:e.status)&&void 0!==l?l:0),weight:(null==e?void 0:e.weight)?"".concat(e.weight," gram"):"-",metal:(null==e?void 0:e.metal_category_name)||"-",requirement:(null==e?void 0:e.ref_content)||(null==e?void 0:e.reference_content)||"",image:y(e)})))}catch(m){let u=(null==m?void 0:null===(a=m.response)||void 0===a?void 0:null===(r=a.data)||void 0===r?void 0:r.msg)||(null==m?void 0:m.message)||"Unable to load enquiries right now.";S(u),k([])}finally{Y.current=!1,F(!1)}};e()},[K,i,E,_]);let et=async e=>{var t,s,l,a,r;if(e&&J.current!==e)try{J.current=e,Q(!0),R(!0),I(""),H(null);let n=await T.current.post("".concat(K,"/api/settings/viewCustomerOrderEnquiry"),{jbo_id:i||233,enquiry_id:e});if((null==n?void 0:null===(t=n.data)||void 0===t?void 0:t.status)!==1)throw Error((null==n?void 0:null===(l=n.data)||void 0===l?void 0:l.msg)||"Failed to load enquiry details.");H((null==n?void 0:null===(s=n.data)||void 0===s?void 0:s.data)||null)}catch(o){I((null==o?void 0:null===(a=o.response)||void 0===a?void 0:null===(r=a.data)||void 0===r?void 0:r.msg)||(null==o?void 0:o.message)||"Unable to load enquiry details.")}finally{J.current=null,R(!1)}};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.Z,{label:"Customized Order"}),(0,l.jsxs)("div",{className:"block xl:container px-4 lg:grid grid-cols-12 items-start gap-6 pt-4 pb-16",children:[(0,l.jsx)(d.Z,{user:A.Z,userDetails:b,goldPlanEnable:v,buySellEnable:j,websiteStatus:N,handleLogout:V,applySiteStatus:!1,selectedPage:"/profile/customizedEnquiry"}),(0,l.jsxs)("div",{className:"col-span-9 mt-6 space-y-6 lg:mt-0",children:[(0,l.jsx)("h1",{className:"sr-only",children:"Customized Order Enquiry"}),B?(0,l.jsx)(c.Z,{}):null,!B&&q?(0,l.jsxs)("div",{className:"flex flex-col items-center justify-center rounded-2xl border border-dashed border-[#C8D6CE] bg-gradient-to-b from-[#F7FBF9] to-white px-6 py-16 text-center shadow-sm",children:[(0,l.jsx)("div",{className:"mb-5 flex h-20 w-20 items-center justify-center rounded-full bg-[#E6F4ED] shadow-inner",children:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-10 w-10 text-[#2E7A57]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12h6m-3-3v6m-7 4h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})})}),(0,l.jsx)("h2",{className:"text-[20px] font-bold tracking-tight text-[#163526]",children:"No customized enquiries yet"}),(0,l.jsx)("div",{className:"mx-auto mt-3 h-[2px] w-12 rounded-full bg-[#A7D2BB]"}),(0,l.jsx)("p",{className:"mx-auto mt-4 max-w-sm text-[14px] leading-relaxed text-[#6B7280]",children:"Start a new enquiry to share your design idea, preferred metal, and reference images. Our team will get back to you shortly."}),(0,l.jsxs)("button",{type:"button",onClick:()=>O(!0),className:"mt-7 inline-flex items-center gap-2 rounded-xl bg-[#2E7A57] px-6 py-3 text-sm font-semibold text-white shadow-md transition-all duration-200 hover:bg-[#256547] hover:shadow-lg active:scale-95",children:[(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"})}),"Create Enquiry"]})]}):null,B||q||!(C.length>0)?null:(0,l.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3",children:C.map(e=>(0,l.jsx)(w,{item:e,onEdit:et},e.id))})]})]}),(0,l.jsx)(m.Z,{open:M,handleClose:ee,title:"Customized Order Enquiry",maxWidth:"sm",content:(0,l.jsx)(x.Z,{onClose:ee,onSuccess:$})}),(0,l.jsx)(m.Z,{open:P,handleClose:()=>{Q(!1),I(""),H(null)},title:"Edit Customized Order Enquiry",maxWidth:"sm",content:W?(0,l.jsx)("div",{className:"py-8 text-center text-sm text-[#666]",children:"Loading enquiry details..."}):U?(0,l.jsx)("div",{className:"py-8 text-center text-sm text-red-500",children:U}):(0,l.jsx)(x.Z,{onClose:()=>{Q(!1),H(null)},onSuccess:()=>D(e=>e+1),initialData:Z})}),(0,l.jsx)(u.Z,{isOpen:L,onClose:()=>z(!1),onConfirm:X})]})};var N=!0;t.default=j}},function(e){e.O(0,[4617,7066,3495,5675,1664,733,9395,7681,6664,4300,5685,7536,8784,6583,17,2940,458,9774,2888,179],function(){return e(e.s=53946)}),_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.