(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[532],{21019:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/sectordashboard",function(){return r(85397)}])},85397:function(e,t,r){"use strict";r.r(t);var i=r(35944),n=r(67294),a=r(9008),o=r.n(a),s=r(36612),c=r.n(s),l=r(15861),u=r(67720),d=r(45258),y=r(28358),f=r(3702),h=r(5077),m=r(86886),p=r(11163),Z=r(45398),g=r(77606),j=r(55675),N=r(45675),P=r(2140),b=r(51047),q=r(5152);r.n(q)()(()=>r.e(40).then(r.bind(r,68040)),{loadableGenerated:{webpack:()=>[68040]},ssr:!1});let Sectorprojectlist=()=>{let e=(0,p.useRouter)(),[t,r]=n.useState(!1),[a,s]=n.useState(""),{data:h,isLoading:q,isSuccess:S,isError:_}=(0,Z.zf)(e.query.sectorId),{data:E,isLoading:v,isSuccess:k,isError:w}=(0,P.KK)(),{data:B,isLoading:X,isSuccess:C,isError:D}=(0,b.$b)(),[L,T]=n.useState([]);return(0,n.useEffect)(()=>{if(!0===q&&(r(!0),s("Please wait. Loading the projects...")),!0===S){let e;r(!1),s(),e=[];try{for(let t=0;t<h.length;t++)null!==h[t].latitude&&(e.push({id:h[t].id,position:[h[t].latitude,h[t].longitude],projectName:h[t].projectName,startDate:h[t].startDate,endDate:h[t].endDate,budgetAllocation:h[t].budgetAllocation,projectLocation:h[t].projectLocation,projectDescription:h[t].projectDescription}),T(e))}catch(e){console.error("The problem : ",e)}}!0===_&&(r(!1),s())},[q,S,_]),(0,i.BX)("div",{className:c().container,style:{backgroundColor:"#fff"},children:[(0,i.BX)(o(),{children:[(0,i.tZ)("title",{children:"IPMS Home"}),(0,i.tZ)("meta",{name:"IPMS",content:"Performance Management System"}),(0,i.tZ)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,i.tZ)(d.Z,{position:"static",className:c().mainPageBar,children:(0,i.tZ)(y.Z,{className:c().mainPageTitles,children:(0,i.tZ)(f.Z,{})})}),(0,i.tZ)("main",{className:c().main,children:(0,i.tZ)("div",{className:c().main,style:{height:"100%"},children:(0,i.tZ)("div",{className:c().containerFluid,children:(0,i.tZ)(m.ZP,{container:!0,spacing:2,children:(0,i.BX)(m.ZP,{item:!0,xs:12,sm:12,md:12,lg:12,children:["0"===e.query.fyid&&(0,i.BX)(l.Z,{variant:"h5",component:"div",children:[e.query.sectorName," : ",e.query.fyn," Years : ",e.query.statusType," Projects"]}),e.query.fyid>"0"&&(0,i.BX)(l.Z,{variant:"h5",component:"div",children:[e.query.sectorName," : ",e.query.fyn," : ",e.query.statusType," Projects"]}),(0,i.tZ)(u.Z,{style:{height:"5px",backgroundColor:"#EFBF04"}}),(0,i.tZ)(g.Z,{getProjects:h,fy:e.query.fyn}),(0,i.tZ)(j.Z,{getProjects:h,getSubCounties:E,fyid:e.query.fyid,fyn:e.query.fyn}),(0,i.tZ)(N.Z,{getProjects:h,getSubCounties:E,getWards:B,fyid:e.query.fyid,fyn:e.query.fyn})]})})})})})]})};Sectorprojectlist.layout=h.Z,t.default=Sectorprojectlist}},function(e){e.O(0,[976,938,362,957,674,565,451,935,533,603,909,202,774,888,179],function(){return e(e.s=21019)}),_N_E=e.O()}]);