1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6710],{97337:function(e,a,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/company/demonstrations",function(){return o(58234)}])},58234:function(e,a,o){"use strict";o.r(a),o.d(a,{default:function(){return Demonstrations}});var n=o(85893),s=o(67294),l=o(4023),t=o(30727),i=o(25724),d=o(42746),r=o(22920),c=o(80005),u=o(11163),v=o(33299),m=o(86799),g=o(33779);function Demonstrations(){var e,a,o,p,h,f,b,y;let x=(0,d.useTranslations)("titles"),N=(0,d.useTranslations)("sideBar"),D=(0,u.useRouter)(),{data:_}=(0,v.useSession)(),{token:j,APIURL:w,setCompanyID:S,companyID:z,setLoadError:E}=(0,l.qD)(),[P,R]=(0,s.useState)({}),k=(0,s.useMemo)(()=>new t.Z(w,j),[j,w]),[I,T]=(0,s.useState)(0),[Z,B]=(0,s.useState)(0),[C,M]=(0,s.useState)(0),[,A]=(0,s.useState)(),L=(0,s.useCallback)(()=>A({}),[]),set=(e,a)=>{R(o=>(o[e]=a,o))},getData=()=>{if(j){if(null===z){var e;k.getById(null==_?void 0:null===(e=_.user)||void 0===e?void 0:e.email,"company-registrations","company-details").then(e=>{localStorage.setItem("companyID",e.data.id),S(e.data.id)}).catch(e=>{S(""),console.log("errorDashboard",e)}).finally(()=>L())}""===z&&D.replace("/company/dashboard"),null!=z&&""!=z&&(null==k||k.getList("balance-results/demonstrations",[["companies",z]],{page:I,sort:"dateInsert,desc"}).then(e=>{set("balanceDemonstrations",e.data.content),E(!1),set("pageable",{size:e.data.totalPages}),M(e.data.totalPages),B(e.data.size)}).catch(e=>{var a,o,n,s,l,t,i,d,c;console.log(e,"session"),E(!0),r.Am.error((null===(s=e.response)||void 0===s?void 0:null===(n=s.data)||void 0===n?void 0:null===(o=n.errorsDetails)||void 0===o?void 0:null===(a=o.debugMessage[0])||void 0===a?void 0:a.message)||(null===(i=e.response)||void 0===i?void 0:null===(t=i.data)||void 0===t?void 0:null===(l=t.errorsDetails)||void 0===l?void 0:l.debugMessage)||(null===(c=e.response)||void 0===c?void 0:null===(d=c.data)||void 0===d?void 0:d.message))}).finally(()=>{L()}),k.getById(z,"company-details").then(e=>{set("profile",e.data)}).catch(e=>{console.log("errorDashboard",e)}).finally(()=>L()),null==k||k.getList("headings",[],{size:50,sort:"dateInsert,asc"}).then(e=>{set("headings",e.data.content),set("pageable",{size:e.data.totalPages})}).catch(e=>{console.error("Error fetching headings:",e)}).finally(()=>{L()}))}};return(0,s.useEffect)(()=>{getData()},[k,I,z]),(0,n.jsx)("div",{children:(0,n.jsxs)("div",{className:"table_Total",children:[(0,n.jsxs)("div",{className:"table_Title",children:[(0,n.jsx)("h1",{className:"titulo-pagina",children:N("resultReport")}),(null==P?void 0:null===(e=P.balanceDemonstrations)||void 0===e?void 0:e.length)>0&&(0,n.jsx)(g.Z,{headings:null==P?void 0:P.headings,fileName:"".concat(N("resultReport")," ").concat(null==P?void 0:null===(o=P.profile)||void 0===o?void 0:null===(a=o.companyRegistration)||void 0===a?void 0:a.companyName,".xlsx"),buttonName:"".concat(x("export")," ").concat(N("resultReport")),companyName:null==P?void 0:null===(h=P.profile)||void 0===h?void 0:null===(p=h.companyRegistration)||void 0===p?void 0:p.companyName,currentPage:I,pageSize:Z*C,url:"balance-results/demonstrations"})]}),(0,n.jsx)("hr",{className:"border-1 my-6 mt-1 "}),(0,n.jsx)("div",{className:"-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8",children:(0,n.jsx)("div",{className:"py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8",children:(0,n.jsx)("div",{className:"shadow overflow-hidden border-b border-gray-200 sm:rounded-lg",children:(null==P?void 0:P.balanceDemonstrations)?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(m.Z,{balanceBalances:null==P?void 0:P.balanceDemonstrations,orderArray:null==P?void 0:P.headings,type:"demonstration",companyName:null==P?void 0:null===(b=P.profile)||void 0===b?void 0:null===(f=b.companyRegistration)||void 0===f?void 0:f.companyName}),(0,n.jsx)(c.Z,{size:null==P?void 0:null===(y=P.pageable)||void 0===y?void 0:y.size,setPage:T,page:I})]}):(0,n.jsx)(i.Z,{})})})})]})})}}},function(e){e.O(0,[8869,3700,9774,2888,179],function(){return e(e.s=97337)}),_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.