File: /mnt/data/smarthr-co-in/demo/angular/template/chunk-UB6M3DDQ.js
import{a as de}from"./chunk-JKERXUEK.js";import{a as ne,b as le,c as re}from"./chunk-NXA7GLYB.js";import{a as oe,b as se}from"./chunk-PWMQ74RC.js";import{a as ee,b as te}from"./chunk-U5MFMN2C.js";import{a as K,b as U}from"./chunk-OPRQFVPE.js";import{a as ie}from"./chunk-PDL2MCPW.js";import{a as ae}from"./chunk-YKW35LPN.js";import"./chunk-JAZSQYD7.js";import{a as q}from"./chunk-RFJHVWQO.js";import{f as J}from"./chunk-QTTEMGWW.js";import"./chunk-VZSYGL77.js";import"./chunk-KT3425N4.js";import"./chunk-L5US5TIY.js";import"./chunk-KLR3GVJ4.js";import"./chunk-ROUB2DV5.js";import"./chunk-ZRYDU45O.js";import"./chunk-D2NXOKOR.js";import"./chunk-3OLHRZ2P.js";import"./chunk-2OYBQGHU.js";import"./chunk-33OPMCTI.js";import"./chunk-OH3XPIE7.js";import"./chunk-D5XKRYC7.js";import"./chunk-PYXABXFS.js";import"./chunk-RAVHNKJU.js";import{f as Y,g as Z,h as $}from"./chunk-WT44ZQWY.js";import"./chunk-GZFJ7A3T.js";import"./chunk-3NNWUWWG.js";import"./chunk-4FNTF56S.js";import{b as N,d as W,h as j,m as B,q as H,r as Q,s as G,y as X}from"./chunk-7PPOABPU.js";import{a as I}from"./chunk-ILLDEPHH.js";import{d as V}from"./chunk-K3YFDFGL.js";import"./chunk-WA2UGD5L.js";import"./chunk-BT37DHWM.js";import{Ac as g,Fc as _,Hd as F,Ic as O,Jc as L,Mb as C,Nb as y,Pb as E,Qb as T,Rb as M,Sb as p,Tb as e,Ub as a,Vb as d,ac as w,cc as u,ec as k,fb as s,ic as P,jc as R,kc as A,pa as f,qa as S,sb as v,tc as i,uc as b,ud as z,vc as x,yb as D,yc as c,zc as h}from"./chunk-AQ27DSQO.js";import"./chunk-EQDQRRRY.js";var ce=["chart"],he=()=>({adaptivePosition:!0}),ge=()=>({standalone:!0}),ue=(m,o,n)=>({"badge-soft-success":m,"badge-soft-warning":o,"badge-soft-danger":n}),be=(m,o,n,t)=>({"badge-success":m,"badge-warning":o,"badge-purple":n,"badge-skyblue":t});function fe(m,o){if(m&1){let n=w();e(0,"select",76),g("ngModelChange",function(r){f(n);let l=k();return h(l.pageSize,r)||(l.pageSize=r),S(r)}),u("ngModelChange",function(){f(n);let r=k();return S(r.changePageSize(r.pageSize))}),e(1,"option",77),i(2,"10"),a(),e(3,"option",78),i(4,"25"),a(),e(5,"option",79),i(6,"50"),a(),e(7,"option",80),i(8,"100"),a()()}if(m&2){let n=k();c("ngModel",n.pageSize)}}function Se(m,o){if(m&1){let n=w();e(0,"tr")(1,"td")(2,"div",81)(3,"input",82),g("ngModelChange",function(r){let l=f(n).$implicit;return h(l.isSelected,r)||(l.isSelected=r),S(r)}),a()()(),e(4,"td")(5,"div",83)(6,"h6",84)(7,"a",85),i(8),a()()()(),e(9,"td"),i(10),a(),e(11,"td"),i(12),a(),e(13,"td"),i(14),a(),e(15,"td")(16,"span",86),d(17,"i",87),i(18),a()(),e(19,"td")(20,"span",86),d(21,"i",87),i(22),a()()()}if(m&2){let n=o.$implicit;s(3),c("ngModel",n.isSelected),s(5),b(n.TaskName),s(2),b(n.ProjectName),s(2),b(n.CreatedDate),s(2),b(n.DueDate),s(2),p("ngClass",O(9,ue,n.Priority==="Low",n.Priority==="Medium",n.Priority==="High")),s(2),x("",n.Priority," "),s(2),p("ngClass",L(13,be,n.Status==="Completed",n.Status==="On Hold",n.Status==="Inprogress",n.Status==="Pending")),s(2),x("",n.Status," ")}}function ve(m,o){m&1&&(e(0,"tr")(1,"td",88)(2,"h5",89),i(3,"No matching records found"),a()()())}ee.register(...te);var me=class m{constructor(o,n,t){this.data=o;this.router=n;this.pagination=t;this.breadCrumbItems=[{label:"HR"},{label:"Task Report",active:!0}],this.data.gettaskReport().subscribe(r=>{this.actualData=r.data,this.pagination.tablePageSize.subscribe(l=>{this.router.url==this.routes.taskreport&&(this.getTableData({skip:l.skip,limit:l.limit}),this.pageSize=l.pageSize)})}),this.maxDate.setDate(this.maxDate.getDate()+7),this.bsRangeValue=[this.bsValue,this.maxDate]}routes=I;initChecked=!1;pageSize=10;tableData=[];tableDataCopy=[];actualData=[];currentPage=1;skip=0;limit=this.pageSize;serialNumberArray=[];totalData=0;showFilter=!1;pageSelection=[];dataSource;searchDataValue="";breadCrumbItems=[];bsValue=new Date;bsRangeValue;maxDate=new Date;task_chart;smalltask1;smalltask2;smalltask3;smalltask4;chart;getTableData(o){this.data.gettaskReport().subscribe(n=>{this.tableData=[],this.tableDataCopy=[],this.serialNumberArray=[],this.totalData=n.totalData,n.data.map((t,r)=>{let l=r+1;r>=o.skip&&l<=o.limit&&(t.sNo=l,this.tableData.push(t),this.tableDataCopy.push(t),this.serialNumberArray.push(l))}),this.dataSource=new oe(this.actualData),this.pagination.calculatePageSize.next({totalData:this.totalData,pageSize:this.pageSize,tableData:this.tableData,tableDataCopy:this.tableDataCopy,serialNumberArray:this.serialNumberArray})})}row=!0;searchData(o){this.searchDataValue=o.trim().toLowerCase(),this.dataSource.filter=this.searchDataValue,this.tableData=this.dataSource.filteredData,this.row=this.tableData.length>0,this.searchDataValue!==""?this.pagination.calculatePageSize.next({totalData:this.tableData.length,pageSize:this.pageSize,tableData:this.tableData,serialNumberArray:this.tableData.map((n,t)=>t+1)}):this.pagination.calculatePageSize.next({totalData:this.totalData,pageSize:this.pageSize,tableData:this.tableData,serialNumberArray:this.serialNumberArray})}sortData(o){let n=this.tableData.slice();!o.active||o.direction===""?this.tableData=n:this.tableData=n.sort((t,r)=>{let l=t[o.active],pe=r[o.active];return(l<pe?-1:1)*(o.direction==="asc"?1:-1)})}changePageSize(o){this.pageSelection=[],this.limit=o,this.skip=0,this.currentPage=1,this.pagination.tablePageSize.next({skip:this.skip,limit:this.limit,pageSize:this.pageSize})}selectAll(o){o?this.tableData.forEach(n=>{n.isSelected=!1}):this.tableData.forEach(n=>{n.isSelected=!0})}ngOnInit(){this.task_chart={chart:{width:220,type:"donut",toolbar:{show:!1}},plotOptions:{pie:{startAngle:-90,endAngle:270,stroke:{show:!0,width:10,colors:["#FFFFFF"]},donut:{size:"80%"}}},dataLabels:{enabled:!1},series:[40,30,20,10],colors:["#03C95A","#0DCAF0","#FFC107","#AB47BC"],labels:["Completed ","Pending","Inprogress ","On Hold "],responsive:[{breakpoint:480,options:{chart:{width:200},legend:{show:!1}}}],legend:{show:!1},annotations:{position:"front",style:{fontSize:"24px",fontWeight:"bold",color:"#000000"},text:{text:"+14%",background:{enabled:!0,foreColor:"#FFFFFF",border:"#000000",borderWidth:1,borderRadius:2,opacity:.7}},x:"50%",y:"50%"}},this.smalltask1={chart:{width:180,height:100,type:"donut",toolbar:{show:!1}},plotOptions:{pie:{donut:{size:"30%"}}},dataLabels:{enabled:!1},series:[90,10],colors:["#F26522","rgba(67, 87, 133, .09)"],responsive:[{breakpoint:480,options:{chart:{width:200},legend:{show:!1}}}],legend:{show:!1},labels:{show:!1}},this.smalltask2={chart:{width:180,height:100,type:"donut",toolbar:{show:!1}},plotOptions:{pie:{donut:{size:"30%"}}},dataLabels:{enabled:!1},series:[60,40],colors:["#03C95A","rgba(67, 87, 133, .09)"],responsive:[{breakpoint:480,options:{chart:{width:200},legend:{show:!1}}}],legend:{show:!1}},this.smalltask3={chart:{width:180,height:100,type:"donut",toolbar:{show:!1}},plotOptions:{pie:{donut:{size:"30%"}}},dataLabels:{enabled:!1},series:[30,70],colors:["#FD3995","rgba(67, 87, 133, .09)"],responsive:[{breakpoint:480,options:{chart:{width:200},legend:{show:!1}}}],legend:{show:!1}},this.smalltask4={chart:{width:180,height:100,type:"donut",toolbar:{show:!1}},plotOptions:{pie:{donut:{size:"30%"}}},dataLabels:{enabled:!1},series:[20,80],colors:["#0DCAF0","rgba(67, 87, 133, .09)"],responsive:[{breakpoint:480,options:{chart:{width:200},legend:{show:!1}}}],legend:{show:!1}}}static \u0275fac=function(n){return new(n||m)(v(q),v(V),v(se))};static \u0275cmp=D({type:m,selectors:[["app-task-report"]],viewQuery:function(n,t){if(n&1&&P(ce,5),n&2){let r;R(r=A())&&(t.chart=r.first)}},decls:232,vars:47,consts:[[1,"content"],[1,"d-md-flex","d-block","align-items-center","justify-content-between","mb-3"],["title","Task Report",3,"breadcrumbItems"],[1,"d-flex","my-xl-auto","right-content","align-items-center","flex-wrap"],[1,"me-2","mb-2"],[1,"dropdown"],["href","javascript:void(0);","data-bs-toggle","dropdown",1,"dropdown-toggle","btn","btn-white","d-inline-flex","align-items-center"],[1,"ti","ti-file-export","me-1"],[1,"dropdown-menu","dropdown-menu-end","p-3"],["href","javascript:void(0);",1,"dropdown-item","rounded-1"],[1,"ti","ti-file-type-pdf","me-1"],[1,"ti","ti-file-type-xls","me-1"],[1,"row"],[1,"col-lg-6","col-md-6","d-flex"],[1,"row","flex-fill","no-tooltip"],[1,"card","flex-fill"],[1,"card-body"],[1,"row","align-items-center"],[1,"col-8"],[1,"fs-14","fw-normal","text-truncate","mb-1"],[1,"col-4"],[1,"data-attribute"],[1,"task-chart",3,"series","chart","colors","dataLabels","plotOptions","legend","responsive"],[1,"card-header","border-0"],[1,"d-flex","flex-wrap","justify-content-between","align-items-center"],[1,"d-flex","align-items-center"],[1,"me-2"],[1,"ti","ti-chart-pie","text-danger"],["href","javascript:void(0);","data-bs-toggle","dropdown",1,"dropdown-toggle","btn","btn-sm","fs-12","btn-white","d-inline-flex","align-items-center"],[1,"dropdown-menu","dropdown-menu-end","p-2"],[1,"card-body","pt-0"],[1,"col-md-6","d-flex","align-items-center","justify-content-center"],[1,"position-relative","payment-total"],["id","task-reports"],[3,"series","labels","chart","colors","dataLabels","plotOptions","grid","legend","responsive"],[1,"task-total-content"],[1,"fs-16","fw-normal","mb-0"],[1,"display-3","fs-24","fw-bold","text-skyblue"],[1,"col-md-6"],[1,"row","gy-4"],[1,"d-flex","task-report-icons"],[1,"ti","ti-arrow-badge-right-filled","text-success"],[1,"fs-16"],[1,"fs-14","fw-normal"],[1,"ti","ti-arrow-badge-right-filled","text-skyblue"],[1,"ti","ti-arrow-badge-right-filled","text-warning"],[1,"ti","ti-arrow-badge-right-filled","text-purple"],[1,"card"],[1,"card-header","d-flex","align-items-center","justify-content-between","flex-wrap","row-gap-3"],[1,"d-flex","my-xl-auto","right-content","align-items-center","flex-wrap","row-gap-3"],[1,"me-3"],[1,"input-icon","position-relative"],[1,"input-icon-addon"],[1,"ti","ti-calendar","text-gray-9"],["type","text","bsDaterangepicker","","placeholder","dd/mm/yyyy - dd/mm/yyyy",1,"form-control","date-range","bookingrange",3,"ngModelChange","ngModel","bsConfig"],[1,"dropdown","me-3"],[1,"card-body","p-0"],[1,"custom-datatable-filter"],[1,"dataTables_wrapper","dt-bootstrap5","no-footer"],[1,"col-sm-12","col-md-6"],[1,"dataTables_length"],[1,"form-select","form-select-sm",3,"ngModel"],["id","DataTables_Table_0_filter",1,"dataTables_filter"],["type","search","placeholder","Search...",1,"form-control","form-control-sm",3,"ngModelChange","ngModel","ngModelOptions"],[1,"table-responsive"],["matSort","",1,"mat-sort","table","datanew","table-center","datatable","dataTable","mb-0",3,"matSortChange"],[1,"thead-light"],[1,"no-sort"],["tabindex","0",1,"form-check","form-check-md",3,"click","keydown.enter"],["type","checkbox","id","select-all",1,"form-check-input",3,"ngModelChange","ngModel"],["mat-sort-header","TaskName"],["mat-sort-header","ProjectName"],["mat-sort-header","CreatedDate"],["mat-sort-header","DueDate"],["mat-sort-header","Priority"],["mat-sort-header","Status"],[1,"form-select","form-select-sm",3,"ngModelChange","ngModel"],["value","10"],["value","25"],["value","50"],["value","100"],[1,"form-check","form-check-md"],["type","checkbox",1,"form-check-input",3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","file-name-icon"],[1,"fw-medium"],["href","javascript:void(0);"],[1,"badge","d-inline-flex","align-items-center","badge-xs",3,"ngClass"],[1,"ti","ti-point-filled","me-1"],["colspan","8"],[1,"no-record"]],template:function(n,t){n&1&&(e(0,"div",0)(1,"div",1),d(2,"app-breadcrumbs",2),e(3,"div",3)(4,"div",4)(5,"div",5)(6,"a",6),d(7,"i",7),i(8,"Export "),a(),e(9,"ul",8)(10,"li")(11,"a",9),d(12,"i",10),i(13,"Export as PDF"),a()(),e(14,"li")(15,"a",9),d(16,"i",11),i(17,"Export as Excel "),a()()()()(),d(18,"app-collapse-header"),a()(),e(19,"div",12)(20,"div",13)(21,"div",14)(22,"div",13)(23,"div",15)(24,"div",16)(25,"div",17)(26,"div",18)(27,"div")(28,"span",19),i(29,"Total Tasks"),a(),e(30,"h5"),i(31,"800"),a()()(),e(32,"div",20)(33,"div",21),d(34,"apx-chart",22),a()()()()()(),e(35,"div",13)(36,"div",15)(37,"div",16)(38,"div",17)(39,"div",18)(40,"div")(41,"span",19),i(42,"Total Tasks"),a(),e(43,"h5"),i(44,"800"),a()()(),e(45,"div",20)(46,"div",21),d(47,"apx-chart",22),a()()()()()(),e(48,"div",13)(49,"div",15)(50,"div",16)(51,"div",17)(52,"div",18)(53,"div")(54,"span",19),i(55,"Total Tasks"),a(),e(56,"h5"),i(57,"800"),a()()(),e(58,"div",20)(59,"div",21),d(60,"apx-chart",22),a()()()()()(),e(61,"div",13)(62,"div",15)(63,"div",16)(64,"div",17)(65,"div",18)(66,"div")(67,"span",19),i(68,"Total Tasks"),a(),e(69,"h5"),i(70,"800"),a()()(),e(71,"div",20)(72,"div",21),d(73,"apx-chart",22),a()()()()()()()(),e(74,"div",13)(75,"div",15)(76,"div",23)(77,"div",24)(78,"div",25)(79,"span",26),d(80,"i",27),a(),e(81,"h5"),i(82,"Tasks"),a()(),e(83,"div",5)(84,"a",28),i(85," Office Management App "),a(),e(86,"ul",29)(87,"li")(88,"a",9),i(89,"PRO-001"),a()(),e(90,"li")(91,"a",9),i(92,"PRO-002"),a()(),e(93,"li")(94,"a",9),i(95,"PRO-004"),a()()()()()(),e(96,"div",30)(97,"div",17)(98,"div",31)(99,"div",32),d(100,"div",33)(101,"apx-chart",34),e(102,"div",35)(103,"p",36),i(104,"Pending"),a(),e(105,"span",37),i(106,"30%"),a()()()(),e(107,"div",38)(108,"div",39)(109,"div",38)(110,"div",40)(111,"span",26),d(112,"i",41),a(),e(113,"h6",42),i(114,"Completed "),e(115,"span",43),i(116,"40%"),a()()()(),e(117,"div",38)(118,"div",40)(119,"span",26),d(120,"i",44),a(),e(121,"h6",42),i(122,"Pending "),e(123,"span",43),i(124,"30 %"),a()()()(),e(125,"div",38)(126,"div",40)(127,"span",26),d(128,"i",45),a(),e(129,"h6",42),i(130,"Inprogress "),e(131,"span",43),i(132,"20 %"),a()()()(),e(133,"div",38)(134,"div",40)(135,"span",26),d(136,"i",46),a(),e(137,"h6",42),i(138,"On Hold "),e(139,"span",43),i(140,"10 %"),a()()()()()()()()()()(),e(141,"div",47)(142,"div",48)(143,"h5"),i(144,"Tasks List"),a(),e(145,"div",49)(146,"div",50)(147,"div",51)(148,"span",52),d(149,"i",53),a(),e(150,"input",54),g("ngModelChange",function(l){return h(t.bsRangeValue,l)||(t.bsRangeValue=l),l}),a()()(),e(151,"div",55)(152,"a",6),i(153," Select Priority "),a(),e(154,"ul",8)(155,"li")(156,"a",9),i(157,"Low"),a()(),e(158,"li")(159,"a",9),i(160,"Medium"),a()(),e(161,"li")(162,"a",9),i(163,"High"),a()()()(),e(164,"div",55)(165,"a",6),i(166," Select Status "),a(),e(167,"ul",8)(168,"li")(169,"a",9),i(170,"Active"),a()(),e(171,"li")(172,"a",9),i(173,"Inactive"),a()()()(),e(174,"div",5)(175,"a",6),i(176," Sort By : Last 7 Days "),a(),e(177,"ul",8)(178,"li")(179,"a",9),i(180,"Recently Added"),a()(),e(181,"li")(182,"a",9),i(183,"Ascending"),a()(),e(184,"li")(185,"a",9),i(186,"Desending"),a()(),e(187,"li")(188,"a",9),i(189,"Last Month"),a()(),e(190,"li")(191,"a",9),i(192,"Last 7 Days"),a()()()()()(),e(193,"div",56)(194,"div",57)(195,"div",58)(196,"div",12)(197,"div",59)(198,"div",60)(199,"label"),i(200," Row Per Page "),C(201,fe,9,1,"select",61),i(202," Entries "),a()()(),e(203,"div",59)(204,"div",62)(205,"label")(206,"input",63),g("ngModelChange",function(l){return h(t.searchDataValue,l)||(t.searchDataValue=l),l}),u("ngModelChange",function(){return t.searchData(t.searchDataValue)}),a()()()()(),e(207,"div",64)(208,"table",65),u("matSortChange",function(l){return t.sortData(l)}),e(209,"thead",66)(210,"tr")(211,"th",67)(212,"div",68),u("click",function(){return t.selectAll(t.initChecked)})("keydown.enter",function(){return t.selectAll(t.initChecked)}),e(213,"input",69),g("ngModelChange",function(l){return h(t.initChecked,l)||(t.initChecked=l),l}),a()()(),e(214,"th",70),i(215,"Task Name"),a(),e(216,"th",71),i(217,"Project Name"),a(),e(218,"th",72),i(219,"Created Date"),a(),e(220,"th",73),i(221,"Due Date"),a(),e(222,"th",74),i(223,"Priority"),a(),e(224,"th",75),i(225,"Status"),a(),d(226,"th"),a()(),e(227,"tbody"),T(228,Se,23,18,"tr",null,E),C(230,ve,4,0,"tr"),a()()(),d(231,"app-custom-pagination"),a()()()()()),n&2&&(s(2),p("breadcrumbItems",t.breadCrumbItems),s(32),p("series",t.smalltask1.series)("chart",t.smalltask1.chart)("colors",t.smalltask1.colors)("dataLabels",t.smalltask1.dataLabels)("plotOptions",t.smalltask1.plotOptions)("legend",t.smalltask1.legend)("responsive",t.smalltask1.responsive),s(13),p("series",t.smalltask2.series)("chart",t.smalltask2.chart)("colors",t.smalltask2.colors)("dataLabels",t.smalltask2.dataLabels)("plotOptions",t.smalltask2.plotOptions)("legend",t.smalltask2.legend)("responsive",t.smalltask2.responsive),s(13),p("series",t.smalltask3.series)("chart",t.smalltask3.chart)("colors",t.smalltask3.colors)("dataLabels",t.smalltask3.dataLabels)("plotOptions",t.smalltask3.plotOptions)("legend",t.smalltask3.legend)("responsive",t.smalltask3.responsive),s(13),p("series",t.smalltask4.series)("chart",t.smalltask4.chart)("colors",t.smalltask4.colors)("dataLabels",t.smalltask4.dataLabels)("plotOptions",t.smalltask4.plotOptions)("legend",t.smalltask4.legend)("responsive",t.smalltask4.responsive),s(28),p("series",t.task_chart.series)("labels",t.task_chart.labels)("chart",t.task_chart.chart)("colors",t.task_chart.colors)("dataLabels",t.task_chart.dataLabels)("plotOptions",t.task_chart.plotOptions)("grid",t.task_chart.grid)("legend",t.task_chart.legend)("responsive",t.task_chart.responsive),s(49),c("ngModel",t.bsRangeValue),p("bsConfig",_(45,he)),s(51),y(t.tableData.length>0?201:-1),s(5),c("ngModel",t.searchDataValue),p("ngModelOptions",_(46,ge)),s(7),c("ngModel",t.initChecked),s(15),M(t.tableData),s(2),y(t.tableData.length===0?230:-1))},dependencies:[F,z,X,Q,G,W,N,H,j,B,re,ne,le,ae,ie,de,J,U,K,$,Y,Z],styles:[".task-charts[_ngcontent-%COMP%]{position:relative}.task-charts[_ngcontent-%COMP%] .task-chart1[_ngcontent-%COMP%]{position:absolute;top:-100px}"]})};export{me as TaskReportComponent};