"use strict";(self.webpackChunkkns_reports=self.webpackChunkkns_reports||[]).push([[70226],{70226:(e,s,a)=>{a.r(s),a.d(s,{default:()=>h});var l=a(65043),i=a(96446),n=a(68903),d=a(81637),r=a(12110),o=a(11906),t=a(85865),c=a(14556),m=a(73216),v=a(35475),f=(a(34198),a(2448)),u=a(11852),x=a(70579);const h=()=>{var e,s;const{LoginuserId:a}=(0,m.g)(),h=(0,c.wA)(),j=(0,m.Zp)(),[p,A]=(0,l.useState)(0),[y]=(0,l.useState)(10),g=(0,c.d4)((e=>e.bd.getProjectTaskPlanPending));(0,l.useEffect)((()=>{const e={userID:a,taskOwnerID:a,iDisplayStart:0,iDisplayLength:-1};h((0,u.__$)(e))}),[h,a]);const b=null===g||void 0===g||null===(e=g.data)||void 0===e?void 0:e.slice(0,(p+1)*y);return(0,x.jsx)(i.A,{sx:{height:"100%",width:"100%",overflow:"auto"},children:(0,x.jsxs)("div",{className:"component-list",children:[(0,x.jsx)(n.Ay,{container:!0,className:"d-flex justify-content-between align-items-center",py:1,children:(0,x.jsx)(n.Ay,{item:!0,className:"common-header-label",children:"BD Pending Task"})}),(0,x.jsxs)(i.A,{sx:{flexGrow:1},children:[(0,x.jsx)(n.Ay,{container:!0,spacing:2,columns:12,sx:{padding:1},children:null!==g&&void 0!==g&&g.loading?(0,x.jsx)(d.A,{}):b&&b.length>0?b.map(((e,s)=>(0,x.jsx)(n.Ay,{item:!0,xs:12,sm:6,md:3,lg:3,children:(0,x.jsxs)(r.A,{className:"card",style:{backgroundColor:"#ffffff",padding:10,borderRadius:10},children:[(0,x.jsxs)(n.Ay,{display:"flex",mt:2,children:[(0,x.jsx)("div",{className:"form-label",children:"Project Name :"}),(0,x.jsxs)("div",{className:"form-value",children:["\xa0 ",null===e||void 0===e?void 0:e.project_name]})]}),(0,x.jsxs)(n.Ay,{display:"flex",mt:2,children:[(0,x.jsx)("div",{className:"form-label",children:"Task Name :"}),(0,x.jsxs)("div",{className:"form-value",children:["\xa0 ",null===e||void 0===e?void 0:e.task_name]})]}),(0,x.jsxs)(n.Ay,{display:"flex",mt:2,children:[(0,x.jsx)("div",{className:"form-label",children:"Planned End Date :"}),(0,x.jsxs)("div",{className:"form-value",children:["\xa0 ",(0,f.i$)(null===e||void 0===e?void 0:e.planned_end_date)]})]}),(0,x.jsxs)(n.Ay,{display:"flex",mt:2,children:[(0,x.jsx)("div",{className:"form-label",children:"Status :"}),(0,x.jsxs)("div",{className:"form-value",children:["\xa0 ",null===e||void 0===e?void 0:e.status_name]})]}),(0,x.jsx)(n.Ay,{style:{justifyContent:"start"},mr:2,mt:2,children:(0,x.jsxs)(n.Ay,{className:"card-content",children:[(0,x.jsx)(o.A,{style:{backgroundColor:"#765ae8",color:"#ffffff",width:"-webkit-fill-available",marginBottom:"6px",borderRadius:"10px"},variant:"contained",onClick:()=>{return s=null===e||void 0===e?void 0:e.id,void j(`/bd-pending-task-detail/${a}/${s}`);var s},children:"View Details"}),(0,x.jsx)(v.N_,{to:{pathname:"/business-development/task-plan/view"},state:null===e||void 0===e?void 0:e.id,children:(0,x.jsx)(o.A,{style:{backgroundColor:"#765ae8",color:"#ffffff",width:"-webkit-fill-available",marginBottom:"6px",borderRadius:"10px"},variant:"contained",children:"KNS Connect"})})]})})]})},s))):(0,x.jsx)(t.A,{sx:{display:"flex",padding:5},children:"No Pending Tasks Available"})}),(null===g||void 0===g||null===(s=g.data)||void 0===s?void 0:s.length)>(null===b||void 0===b?void 0:b.length)&&(0,x.jsx)(i.A,{sx:{display:"flex",justifyContent:"center",mt:3},children:(0,x.jsx)(o.A,{variant:"contained",onClick:()=>{A((e=>e+1))},children:"Load More"})})]})]})})}},12110:(e,s,a)=>{a.d(s,{A:()=>j});var l=a(58168),i=a(98587),n=a(65043),d=a(58387),r=a(98610),o=a(34535),t=a(6431),c=a(63336),m=a(92532),v=a(72372);function f(e){return(0,v.Ay)("MuiCard",e)}(0,m.A)("MuiCard",["root"]);var u=a(70579);const x=["className","raised"],h=(0,o.Ay)(c.A,{name:"MuiCard",slot:"Root",overridesResolver:(e,s)=>s.root})((()=>({overflow:"hidden"}))),j=n.forwardRef((function(e,s){const a=(0,t.b)({props:e,name:"MuiCard"}),{className:n,raised:o=!1}=a,c=(0,i.A)(a,x),m=(0,l.A)({},a,{raised:o}),v=(e=>{const{classes:s}=e;return(0,r.A)({root:["root"]},f,s)})(m);return(0,u.jsx)(h,(0,l.A)({className:(0,d.A)(v.root,n),elevation:o?8:void 0,ref:s,ownerState:m},c))}))},34198:()=>{}}]);
//# sourceMappingURL=70226.64c7e365.chunk.js.map