1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8986],{49461:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/home/[[...slug]]",function(){return n(72024)}])},91837:function(e,t,n){"use strict";var r=n(35083),a=n(24246);t.Z=(0,r.Z)((0,a.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1z"}),"Lock")},18264:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(7034),a=n(82888),s=n(27378),i=n(40624),l=n(46753),o=n(67278),c=n(79584),d=n(73562),u=n(86159);function h(e){return(0,u.ZP)("MuiCardActions",e)}(0,d.Z)("MuiCardActions",["root","spacing"]);var x=n(24246);let p=["disableSpacing","className"],m=e=>{let{classes:t,disableSpacing:n}=e;return(0,l.Z)({root:["root",!n&&"spacing"]},h,t)},g=(0,o.ZP)("div",{name:"MuiCardActions",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})(e=>{let{ownerState:t}=e;return(0,a.Z)({display:"flex",alignItems:"center",padding:8},!t.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})});var f=s.forwardRef(function(e,t){let n=(0,c.Z)({props:e,name:"MuiCardActions"}),{disableSpacing:s=!1,className:l}=n,o=(0,r.Z)(n,p),d=(0,a.Z)({},n,{disableSpacing:s}),u=m(d);return(0,x.jsx)(g,(0,a.Z)({className:(0,i.Z)(u.root,l),ownerState:d,ref:t},o))})},72024:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return A}});var r=n(24246),a=n(27378),s=n(3862),i=n(96970),l=n(75392),o=n(20243),c=n(36977),d=n(3157),u=n(91137),h=n(27833),x=n(91837),p=n(21416),m=n(86677),g=n(44713);let f=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var w=e=>{let t=e.noBalances,n=(0,m.useRouter)(),l=(0,c.Z)(),o=a.useRef(null),[w,j]=a.useState(!1),Z=a.useRef(),{data:b}=(0,g.a)({queryKey:["trialBalanceDates",e.tenantId],queryFn:async()=>(await h.Z.post("/api/trialbalances/getDates",{tenantId:e.tenantId})).data.dates,onError:e=>{var t;(null==e?void 0:null===(t=e.response)||void 0===t?void 0:t.status)===401&&n.push("/")},staleTime:3e4}),y=a.useMemo(()=>{if(!b)return[];if(0===b.length)return t(),[];let e=new Date,n=new Date(e.getFullYear()+1,e.getMonth()+1,1),r=b.filter(e=>{let t=new Date(e.start);return t.getFullYear()<n.getFullYear()||n.getFullYear()===t.getFullYear()&&n.getMonth()>t.getMonth()}),a=new Map;return r.forEach(e=>{(!a.has(e.id)||new Date(e.end)>new Date(a.get(e.id).end))&&a.set(e.id,e)}),Array.from(a.values())},[b,t]);if(a.useEffect(()=>{if(0===y.length)return;let t=y.filter(e=>new Date(e.end).getTime()<new Date().getTime()).sort((e,t)=>new Date(t.end).getTime()-new Date(e.end).getTime()),n=t.length>0?t[0]:y[0];if(null!==e.selectedPeriod.start&&null!==e.selectedPeriod.end){let t=new Date(e.selectedPeriod.start),r=new Date(e.selectedPeriod.end);void 0===y.find(e=>{let n=new Date(e.start),a=new Date(e.end);return t.getMonth()===n.getMonth()&&t.getFullYear()===n.getFullYear()&&t.getDate()===n.getDate()&&r.getMonth()===a.getMonth()&&r.getFullYear()===a.getFullYear()&&r.getDate()===a.getDate()})&&e.onBalanceSheetSelect(n)}else e.onBalanceSheetSelect(n)},[y]),0===y.length)return(0,r.jsx)(s.Z,{sx:{width:148}});let v=(0,r.jsx)(d.Z,{styles:{".nav-scroll::-webkit-scrollbar":{width:4},".nav-scroll::-webkit-scrollbar-track":{background:"transparent"},".nav-scroll::-webkit-scrollbar-thumb":{background:"transparent",borderRadius:2},".nav-scroll.scrolling::-webkit-scrollbar-thumb":{background:"#d0d0d0"},".nav-scroll:hover::-webkit-scrollbar-thumb":{background:"#d0d0d0"}}}),D=y.reduce(function(e,t){return void 0===e[new Date(t.start).getFullYear()]&&(e[new Date(t.start).getFullYear()]=[]),e[new Date(t.start).getFullYear()].push(t),e},{}),k=e.selectedPeriod.start?new Date(e.selectedPeriod.start):null;return(0,r.jsxs)(r.Fragment,{children:[v,(0,r.jsx)(s.Z,{ref:o,className:"nav-scroll".concat(w?" scrolling":""),onScroll:()=>{j(!0),clearTimeout(Z.current),Z.current=setTimeout(()=>j(!1),800)},sx:{width:148,height:"90vh",overflowY:"auto",pr:1},children:Object.keys(D).sort((e,t)=>
1parseInt(t)-parseInt(e)).map(t=>{let n=D[t].sort((e,t)=>new Date(t.start).getTime()-new Date(e.start).getTime());return(0,r.jsxs)(s.Z,{sx:{mb:1.5},children:[(0,r.jsxs)(s.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:.5,px:1},children:[(0,r.jsx)(i.Z,{sx:{fontSize:11,fontWeight:700,letterSpacing:"0.08em",color:"text.disabled",textTransform:"uppercase",lineHeight:1,whiteSpace:"nowrap"},children:t}),(0,r.jsx)(s.Z,{sx:{flex:1,height:"1px",bgcolor:"divider"}})]}),n.map(t=>{let n=new Date(t.start),a=k&&k.getMonth()===n.getMonth()&&k.getFullYear()===n.getFullYear()&&k.getDate()===n.getDate(),o=e.lockDate&&n.getTime()<=new Date(e.lockDate).getTime(),c=t.name||f[n.getMonth()];return(0,r.jsxs)(s.Z,{onClick:()=>e.onBalanceSheetSelect(t),sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:1.5,py:.6,mx:.5,mb:.25,borderRadius:"6px",cursor:"pointer",borderLeft:a?"3px solid":"3px solid transparent",borderLeftColor:a?"primary.main":"transparent",bgcolor:a?"primary.main":"transparent",transition:"all 0.15s ease","&:hover":{bgcolor:a?"primary.main":"action.hover"}},children:[(0,r.jsx)(i.Z,{sx:{fontSize:13,fontWeight:a?700:400,color:a?"dark"===l.palette.mode?"#000 !important":"primary.contrastText":"text.primary",lineHeight:1.4},children:c}),(0,r.jsx)(u.Z,{title:o?"Period locked in Xero":"Period unlocked in Xero",children:o?(0,r.jsx)(x.Z,{sx:{fontSize:12,color:a?"dark"===l.palette.mode?"#000 !important":"primary.contrastText":"text.disabled",opacity:.7}}):(0,r.jsx)(p.Z,{sx:{fontSize:12,color:a?"dark"===l.palette.mode?"#000 !important":"primary.contrastText":"text.disabled",opacity:.4,transform:"scaleX(-1)"}})})]},n.getTime())})]},t)})})]})},j=n(27669),Z=n(88038),b=n.n(Z),y=n(73285),v=n(57734),D=n(59225),k=n(73598),S=n(18264),T=n(96711),I=n(79894),F=n.n(I),M=e=>{let[t,n]=(0,a.useState)(!1);return(0,r.jsxs)(s.Z,{mt:12,sx:{width:"100%"},display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center",children:[(0,r.jsx)(b(),{children:(0,r.jsx)("title",{children:"Sync company"})}),(0,r.jsx)(i.Z,{variant:"h3",textAlign:"center",children:"Sync in progress"}),(0,r.jsx)(i.Z,{variant:"h3",textAlign:"center",sx:{mt:2},children:"\uD83D\uDC3E"}),(0,r.jsx)(s.Z,{mt:5,sx:{width:"50%"},children:(0,r.jsx)(T.Z,{onSyncDone:()=>n(!0),tenantId:e.tenantId})}),t?(0,r.jsx)(s.Z,{mt:2,children:(0,r.jsx)(l.Z,{variant:"contained",onClick:()=>window.location.reload(),children:"Get started"})}):void 0,(0,r.jsxs)(s.Z,{sx:{mt:5,width:"50%"},children:[(0,r.jsx)(i.Z,{sx:{mb:2,textAlign:"center"},children:"Please note: the syncing process may take some time on the initial setup (this is because we need to pull every journal ever produced in your company!). Larger companies this may take up to a few hours to complete."}),(0,r.jsx)(i.Z,{sx:{mb:2,textAlign:"center"},children:"You can leave this page and return any time, the sync will not be interrupted. While you wait consider learning about RecHound and how it can help you with the below resources."}),(0,r.jsxs)(y.ZP,{container:!0,spacing:2,children:[(0,r.jsx)(y.ZP,{item:!0,xs:12,children:(0,r.jsxs)(v.Z,{children:[(0,r.jsx)(D.Z,{title:"Video Overview"}),(0,r.jsx)(k.Z,{children:(0,r.jsx)(s.Z,{display:"flex",flexDirection:"row",justifyContent:"center",children:(0,r.jsx)("iframe",{width:"560",height:"315",src:"https://www.youtube.com/embed/wmWGjvMzFyY",title:"YouTube video player",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowFullScreen:!0})})})]})}),(0,r.jsx)(y.ZP,{item:!0,xs:12,children:(0,r.jsxs)(v.Z,{children:[(0,r.jsx)(D.Z,{title:"Where to get started"}),(0,r.jsx)(k.Z,{children:(0,r.jsx)(i.Z,{children:"We understand that getting started with a new tool can be daunting, so we've curated a collection of online resources to help you learn and master RecHound. Our knowledge base is packed with articles, tutorials, and step-by-step guides."})}),(0,r.jsx)(S.Z,{children:(0,r.jsx)(F(),{href:"https://www.rechound.com/resources",target:"_blank",children:(0,r.jsx)(l.Z,{children:"Resources"})})})]})}),(0,r.jsx)(y.ZP,{item:!0,xs:12,children:(0,r.jsxs)(v.Z,{children:[(0,r.jsx)(D.Z,{title:"Fast support"}),(0,r.jsx)(k.Z,{children:(0,r.jsx)(i.Z,{children:"Join our vibrant and supportive community on Slack! It's the perfect place to connect with like-minded individuals, exchange ideas, share best practices, and seek advice. Our community members are passionate about RecHound, balance sheet reconciliation and accounting. Join us today for direct support from the founders and other members of the RecHound community."})}),(0,r.jsx)(S.Z,{children:(0,r.jsx)(F(),{href:"https://join.slack.com/t/rechound/shared_invite/zt-1vaeokvx1-ehizHe3rpg0FkrOOHZoV6g",target:"_blank",children:(0,r.jsx)(l.Z,{children:"Join Slack"})})})]})})]})]})]})},P=n(64601),Y=e=>{let t=(0,m.useRouter)(),[n,c]=(0,a.useState)({start:e.periodStart,end:e.periodEnd,name:e.periodName,id:""}),[d,u]=(0,a.useState)(!1);if(d)return(0,r.jsx)(M,{tenantId:e.rechoundTenant.xeroTenantDetails.tenantId});let h=null===n.start?new Date:new Date(n.start);return(0,r.jsxs)(s.Z,{sx:{display:"flex",flexDirection:"row"},children:[(0,r.jsx)(b(),{children:(0,r.jsxs)("title",{children:[e.periodName?e.periodName:"".concat((0,j.ZY)(h.getMonth()),"-").concat(h.getFullYear())," - RecHound"]})}),(0,r.jsx)(s.Z,{children:(0,r.jsx)(w,{noBalances:()=>{u(!0)},onBalanceSheetSelect:e=>{c(e),t.push({pathname:"/home/".concat(e.start,"/").concat(e.end,"/").concat(encodeURIComponent(e.name||""))})},tenantId:e.rechoundTenant.xeroTenantDetails.tenantId,selectedPeriod:n,lockDate:e.lockDate})}),(0,r.jsxs)(s.Z,{sx:{flexGrow:1,minWidth:0},display:"flex",flexDirection:"column",height:"90vh",justifyContent:"flex-start",children:[(0,r.jsxs)(s.Z,{p:2,display:"flex",justifyContent:"space-between",children:[(0,r.jsxs)(i.Z,{variant:"h4",fontWeight:700,children:[n.name?n.name:(0,j.ZY)(h.getMonth())," Reconciliation Summary",n.start&&n.end?(0,r.jsxs)(i.Z,{children:[(0,j.DN)(new Date(n.start))," - ",(0,j.DN)(new Date(n.end))]}):null]}),(0,r.jsx)(F(),{href:"/audit/".concat(n.start,"/").concat(n.end),target:"_blank",children:(0,r.jsx)(l.Z,{variant:"outlined",size:"small",endIcon:(0,r.jsx)(o.Z,{sx:{fontSize:14}}),sx:{textTransform:"none",fontWeight:600,borderRadius:"8px"},children:"Audit report"})})]}),(0,r.jsx)(P.Z,{tenantId:e.rechoundTenant.xeroTenantDetails.tenantId,periodStart:n.start||"",periodEnd:n.end||"",userName:e.username,tenants:e.tenants})]})]})},R=n(13719),C=n(60289),N=n(73868);let _=e=>{var t;let n=(0,m.useRouter)(),a=null,s=null,i=null,l=(0,N.useSession)(),o=null===(t=l.data)||void 0===t?void 0:t.tenants;if(e.slug){if(-1!==e.slug[0].indexOf("-"))a=e.slug[0],s=e.slug[1],i=e.slug[2];else{let t=parseInt(e.slug[0]),n=parseInt(e.slug[1]),r=new Date(t,n,1),i=new Date(t,n+1,0);a=(0,j.DP)(r),s=(0,j.DP)(i)}}let c=n.query.tenantId;return(0,r.jsx)(R.Z,{overrideTenantId:c,children:(0,r.jsx)(C.Z.Consumer,{children:e=>e?(0,r.jsx)(Y,{periodStart:a,periodEnd:s,periodName:i,rechoundTenant:e,username:l.data.user.n
1ame,lockDate:e.recHoundTenantDetails.lockDate,tenants:o||[]}):null})})};_.getInitialProps=e=>e.query;var A=_}},function(e){e.O(0,[1279,498,9719,8009,4111,9894,2370,5701,3601,4713,4169,5313,5417,753,7791,3285,2306,3719,1,8983,7281,3369,2888,9774,179],function(){return e(e.s=49461)}),_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.