PageSourceSearch

https://ripplemind.com/_next/static/chunks/pages/customers/my-e-store-invoices-2c7c58b3dbf2b9f9.js

js ripplemind.com collected 2026-10-06 13:15:44 UTC 5,893 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9927],{4813:function(e,r,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/customers/my-e-store-invoices",function(){return s(27672)}])},27672:function(e,r,s){"use strict";s.r(r),s.d(r,{default:function(){return b}});var t=s(85893),n=s(28646),a=s(29552),o=s(88446),l=s(41664),c=s.n(l),i=s(67294),d=s(86501),u=s(99603),h=s(59417),x=s(11163),v=s(48583),m=s(94543),g=s(9008),j=s.n(g),f=function(){var e;let r=(0,x.useRouter)(),[s,n]=(0,i.useState)([]),[l,g]=(0,i.useState)(-1),f=(0,v.Dv)(m.ZP),b=null==f?void 0:null===(e=f.userDetails)||void 0===e?void 0:e.status,[N,p]=(0,i.useState)({loading:!1,success:"",error:""}),[_,y]=(0,i.useState)({id:-1,refer_person_1:"",refer_person_2:"",refer_person_3:"",email_v:-1,mobile_v:-1}),S=async()=>{try{p({loading:!0,success:"",error:""});let n=await o.Z.get("/user/viewuser");if(200===n.status){var e,s;if(g(null==n?void 0:null===(e=n.data)||void 0===e?void 0:e.id),y(null==n?void 0:n.data),1!==n.data.email_v&&(null==n?void 0:null===(s=n.data)||void 0===s?void 0:s.mobile_v)!==2){d.ZP.error("You need to verify your email and mobile",{duration:3e3,icon:(0,t.jsx)(u.G,{icon:h.FU$})}),r.push("/customers/profile");return}}p({loading:!1,success:"success",error:""})}catch(e){console.error(e),p({loading:!1,success:"",error:"something went wrong"})}},w=async()=>{try{var e,r;p({loading:!0,success:"",error:""});let s=await o.Z.post("/estore-inovices/get-estore-invoices",{id:l});Array.isArray(null==s?void 0:null===(e=s.data)||void 0===e?void 0:e.data)&&(n(null==s?void 0:null===(r=s.data)||void 0===r?void 0:r.data),p({loading:!1,success:"success",error:""}))}catch(e){console.error(e),p({loading:!1,success:"",error:"something went wrong"})}};return(0,i.useEffect)(()=>{S()},[]),(0,i.useEffect)(()=>{w()},[l]),(0,t.jsxs)("div",{className:"lg:mx-28",children:[(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(j(),{children:(0,t.jsx)("title",{children:" e-Store Invoices"})})}),(null==b?void 0:b.split(",").includes("1"))&&(null==b?void 0:b.split(",").includes("2"))?(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)(c(),{className:"hover:text-red-700",href:"/",children:"Home"}),"\xa0/\xa0",(0,t.jsx)(c(),{className:"hover:text-red-700",href:"/customers",children:"Dashboard"}),"\xa0/\xa0",(0,t.jsx)(c(),{className:"hover:text-red-700",href:"/customers/my-e-store-invoices",children:"e-Store Invoice"})]}),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h1",{className:"text-2xl mt-3",children:"My e Store Invoices"}),(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"w-full table-auto overflow-scroll border mb-5",children:[(0,t.jsx)("thead",{className:"h-14",children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{className:"border",children:"Order ID"}),(0,t.jsx)("th",{className:"border",children:"Order Date/Time"}),(0,t.jsx)("th",{className:"border",children:"Grand Total"}),(0,t.jsx)("th",{className:"border",children:"Order Status"}),(0,t.jsx)("th",{className:"border",children:"Action"})]})}),(0,t.jsx)("tbody",{className:" text-center ",children:0!==s.length?s.map((e,r)=>{var s,n;let o,c,i,d,u,h,x,v;return(0,t.jsxs)("tr",{className:"h-10",children:[(0,t.jsx)("td",{className:"border ",children:e.id}),(0,t.jsx)("td",{className:"border",children:(null==e?void 0:null===(s=e.invoice_date)||void 0===s?void 0:s.length)>0?(n=null==e?void 0:e.invoice_date,c=(o=new Date(n)).getDate(),i=o.getMonth(),d=o.getFullYear(),u=o.getHours().toString().padStart(2,"0"),h=o.getMinutes().toString().padStart(2,"0"),x=o.getSeconds().toString().padStart(2,"0"),v=c<=3?["th","st","nd","rd"][Math.floor(c%10)]:"th",(0,t.jsxs)(t.Fragment,{children:[" ".concat(c).concat(v," ").concat(["January","February","March","April","May","June","July","August","September","October","November","December"][i],", ").concat(d)," ",(0,t.jsx)("br",{})," ","".concat(u,":").concat(h,":").concat(x)]})):(0,t.jsx)("h1",{children:"null"})}),(0,t.jsx)("td",{className:"border",children:null==e?void 0:e.grand_total}),(0,t.jsxs)("td",{className:"border ",children:[(null==e?void 0:e.status)===0?"pending":(null==e?void 0:e.status)===1?"processing":(null==e?void 0:e.status)===2?"complete":(null==e?void 0:e.status)===11?"Invoice Generated":(null==e?void 0:e.status)===4?"cancel":(null==e?void 0:e.status)===5?"refund":""," "]}),(0,t.jsx)("td",{className:"border ",children:(0,t.jsx)("a",{className:"text-cyan-600",target:"_blank",rel:"noreferrer",href:"".concat(a.Z.CDN_URL_PUBLIC,"/users/eShopInvoices/").concat(l,"/").concat(e.invoice_number),children:e.invoice_number})})]},r)}):(0,t.jsx)("tr",{children:(0,t.jsx)("th",{colSpan:5,className:" bg-gray-200 p-3",children:N.loading?(0,t.jsx)("h1",{children:"Please Wait Data is Loading.!"}):(0,t.jsxs)("h1",{className:"font-thin ",children:["Sorry, you have no previous order. click here to"," ",(0,t.jsxs)(c(),{className:"hover:text-blue-500",href:"/",children:[" ","shopping now"]})]})})})})]})})]})]}):(0,t.jsx)("h1",{className:"text-center text-xl",children:"You need to Verify your email and mobile"})]})},b=()=>{let e=(0,v.Dv)(m.ZP);return e.loading?(0,t.jsx)("p",{className:"md:mx-28 text-center p-5",children:"Loading..."}):e.isLoggedIn?(0,t.jsx)(f,{}):(0,t.jsx)(n.Z,{})}},28646:function(e,r,s){"use strict";var t=s(85893),n=s(41664),a=s.n(n),o=s(11163);s(67294),r.Z=()=>{let e=(0,o.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)(a(),{className:"text-blue-500",href:"/login?re_url=".concat(r),children:"Click here to Login"})]})}},9008:function(e,r,s){e.exports=s(42636)}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=4813)}),_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.