"use strict";(self.webpackChunkkns_reports=self.webpackChunkkns_reports||[]).push([[15461],{15461:(e,s,l)=>{l.r(s),l.d(s,{default:()=>h});var a=l(65043),i=l(96446),d=l(68903),n=l(81637),o=l(12110),r=l(85865),t=l(14556),c=l(73216),m=l(35475),v=(l(68733),l(80884)),u=l(2448),f=l(11906),x=l(70579);const h=()=>{var e,s;const{LoginuserId:l}=(0,c.g)(),h=(0,t.wA)(),j=(0,c.Zp)(),[y,A]=(0,a.useState)(0),[p]=(0,a.useState)(10),g=(0,t.d4)((e=>e.hr.getPendingToDo)),[b,N]=(0,a.useState)(!0);(0,a.useEffect)((()=>{const e={userID:l,assignedToID:l,iDisplayStart:0,iDisplayLength:-1};h((0,v.pYT)(e)).finally((()=>{N(!1)}))}),[h,l]);const _=null===g||void 0===g||null===(e=g.data)||void 0===e?void 0:e.slice(0,(y+1)*p);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)(d.Ay,{container:!0,className:"d-flex justify-content-between align-items-center",py:1,children:(0,x.jsx)(d.Ay,{item:!0,className:"common-header-label",children:"Pending Todo"})}),(0,x.jsxs)(i.A,{sx:{flexGrow:1},children:[(0,x.jsx)(d.Ay,{container:!0,spacing:2,columns:12,sx:{padding:1},children:b?(0,x.jsx)(n.A,{}):_&&_.length>0?_.map(((e,s)=>(0,x.jsx)(d.Ay,{item:!0,xs:12,sm:6,md:3,lg:3,children:(0,x.jsxs)(o.A,{className:"card",style:{backgroundColor:"#ffffff",padding:10,borderRadius:10},children:[(0,x.jsxs)(d.Ay,{display:"flex",mt:2,children:[(0,x.jsx)("div",{className:"form-label",children:"Title :"}),(0,x.jsxs)("div",{className:"form-value",children:["\xa0 ",null===e||void 0===e?void 0:e.task_title]})]}),(0,x.jsxs)(d.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"," ",0==(null===e||void 0===e?void 0:e.project_id)?"General":null===e||void 0===e?void 0:e.project_name]})]}),(0,x.jsxs)(d.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,u.i$)(null===e||void 0===e?void 0:e.planned_end_date)]})]}),(0,x.jsxs)(d.Ay,{display:"flex",mt:2,children:[(0,x.jsx)("div",{className:"form-label",children:"Assigned To :"}),(0,x.jsxs)("div",{className:"form-value",children:["\xa0 ",null===e||void 0===e?void 0:e.assigned_to_usere_name]})]}),(0,x.jsxs)(d.Ay,{display:"flex",mt:2,children:[(0,x.jsx)("div",{className:"form-label",children:"Accountable :"}),(0,x.jsxs)("div",{className:"form-value",children:["\xa0 ",null===e||void 0===e?void 0:e.accountable_by_usere_name]})]}),(0,x.jsxs)(d.Ay,{display:"flex",mt:2,children:[(0,x.jsx)("div",{className:"form-label",children:"Assigned By :"}),(0,x.jsxs)("div",{className:"form-value",children:["\xa0 ",null===e||void 0===e?void 0:e.assigned_by_usere_name]})]}),(0,x.jsxs)(d.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.task_status_name]})]}),(0,x.jsx)(d.Ay,{style:{justifyContent:"start"},mr:2,mt:2,children:(0,x.jsxs)(d.Ay,{className:"card-content",children:[(0,x.jsx)(f.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(`/todo-pending-detail/${l}/${s}`);var s},children:"View Details"}),(0,x.jsx)(m.N_,{to:{pathname:"/hr/task/view"},state:null===e||void 0===e?void 0:e.id,children:(0,x.jsx)(f.A,{style:{backgroundColor:"#765ae8",color:"#ffffff",width:"-webkit-fill-available",marginBottom:"6px",borderRadius:"10px"},variant:"contained",children:"KNS Connect"})})]})})]})},s))):(0,x.jsx)(r.A,{sx:{display:"flex",padding:5},children:"No Pending Todo Available"})}),(null===g||void 0===g||null===(s=g.data)||void 0===s?void 0:s.length)>(null===_||void 0===_?void 0:_.length)&&(0,x.jsx)(i.A,{sx:{display:"flex",justifyContent:"center",mt:3},children:(0,x.jsx)(f.A,{variant:"contained",onClick:()=>{A((e=>e+1))},children:"Load More"})})]})]})})}},12110:(e,s,l)=>{l.d(s,{A:()=>j});var a=l(58168),i=l(98587),d=l(65043),n=l(58387),o=l(98610),r=l(34535),t=l(6431),c=l(63336),m=l(92532),v=l(72372);function u(e){return(0,v.Ay)("MuiCard",e)}(0,m.A)("MuiCard",["root"]);var f=l(70579);const x=["className","raised"],h=(0,r.Ay)(c.A,{name:"MuiCard",slot:"Root",overridesResolver:(e,s)=>s.root})((()=>({overflow:"hidden"}))),j=d.forwardRef((function(e,s){const l=(0,t.b)({props:e,name:"MuiCard"}),{className:d,raised:r=!1}=l,c=(0,i.A)(l,x),m=(0,a.A)({},l,{raised:r}),v=(e=>{const{classes:s}=e;return(0,o.A)({root:["root"]},u,s)})(m);return(0,f.jsx)(h,(0,a.A)({className:(0,n.A)(v.root,d),elevation:r?8:void 0,ref:s,ownerState:m},c))}))},68733:()=>{}}]);
//# sourceMappingURL=15461.402a9894.chunk.js.map