File: /mnt/data/smarthr-co-in/demo/angular/template/chunk-VFEFFG2G.js
import{a as oe}from"./chunk-JKERXUEK.js";import{a as ie,b as ae,c as ne}from"./chunk-NXA7GLYB.js";import{a as re,b as le}from"./chunk-PWMQ74RC.js";import{a as U,b as Y}from"./chunk-OPRQFVPE.js";import{a as te}from"./chunk-PDL2MCPW.js";import{a as ee}from"./chunk-YKW35LPN.js";import"./chunk-JAZSQYD7.js";import{a as X}from"./chunk-RFJHVWQO.js";import{f as G}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 K,g as Z,h as $}from"./chunk-WT44ZQWY.js";import"./chunk-GZFJ7A3T.js";import"./chunk-3NNWUWWG.js";import"./chunk-4FNTF56S.js";import{b as W,d as F,h as B,m as O,q as Q,r as q,s as H,y as J}from"./chunk-7PPOABPU.js";import{a as j}from"./chunk-ILLDEPHH.js";import{d as L}from"./chunk-K3YFDFGL.js";import"./chunk-WA2UGD5L.js";import"./chunk-BT37DHWM.js";import{Ac as g,Cc as z,Fc as _,Hd as I,Mb as x,Nb as D,Pb as M,Qb as k,Rb as A,Sb as p,Tb as e,Ub as t,Vb as d,ab as w,ac as C,cc as h,ec as v,fb as s,ic as R,jc as P,kc as T,pa as f,qa as y,sb as S,tc as a,uc as b,ud as N,vc as V,yb as E,yc as c,zc as u}from"./chunk-AQ27DSQO.js";import"./chunk-EQDQRRRY.js";var me=["chart"],pe=()=>({adaptivePosition:!0}),ce=()=>({standalone:!0});function ue(m,o){if(m&1){let n=C();e(0,"select",71),g("ngModelChange",function(l){f(n);let r=v();return u(r.pageSize,l)||(r.pageSize=l),y(l)}),h("ngModelChange",function(){f(n);let l=v();return y(l.changePageSize(l.pageSize))}),e(1,"option",72),a(2,"10"),t(),e(3,"option",73),a(4,"25"),t(),e(5,"option",74),a(6,"50"),t(),e(7,"option",75),a(8,"100"),t()()}if(m&2){let n=v();c("ngModel",n.pageSize)}}function ge(m,o){if(m&1){let n=C();e(0,"tr")(1,"td")(2,"div",76)(3,"input",77),g("ngModelChange",function(l){let r=f(n).$implicit;return u(r.isSelected,l)||(r.isSelected=l),y(l)}),t()()(),e(4,"td")(5,"div",78)(6,"a",79),d(7,"img",80),t(),e(8,"div",81)(9,"h6",82)(10,"a",21),a(11),t()(),e(12,"span",83),a(13),t()()()(),e(14,"td"),a(15),t(),e(16,"td"),a(17),t(),e(18,"td")(19,"span",84),d(20,"i",85),a(21),t()()()}if(m&2){let n=o.$implicit;s(3),c("ngModel",n.isSelected),s(4),p("src",z("assets/img/users/",n==null?null:n.Image),w),s(4),b(n.Name),s(2),b(n.Role),s(2),b(n.Date),s(2),b(n.Department),s(2),p("ngClass",n.Status==="Present"?"badge-soft-success":"badge-soft-danger"),s(2),V("",n.Status," ")}}function he(m,o){m&1&&(e(0,"tr")(1,"td",86)(2,"h5",87),a(3,"No matching records found"),t()()())}var de=class m{constructor(o,n,i){this.data=o;this.router=n;this.pagination=i;this.breadCrumbItems=[{label:"HR"},{label:"Daily Report",active:!0}],this.data.getdailyReport().subscribe(l=>{this.actualData=l.data,this.pagination.tablePageSize.subscribe(r=>{this.router.url==this.routes.dailyreport&&(this.getTableData({skip:r.skip,limit:r.limit}),this.pageSize=r.pageSize)})}),this.maxDate.setDate(this.maxDate.getDate()+7),this.bsRangeValue=[this.bsValue,this.maxDate]}routes=j;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;daily_chart;chart;getTableData(o){this.data.getdailyReport().subscribe(n=>{this.tableData=[],this.tableDataCopy=[],this.serialNumberArray=[],this.totalData=n.totalData,n.data.map((i,l)=>{let r=l+1;l>=o.skip&&r<=o.limit&&(i.sNo=r,this.tableData.push(i),this.tableDataCopy.push(i),this.serialNumberArray.push(r))}),this.dataSource=new re(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,i)=>i+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((i,l)=>{let r=i[o.active],se=l[o.active];return(r<se?-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.daily_chart={series:[{name:"Present",data:[60,40,30,20,70]},{name:"Absent",data:[20,60,45,60,80]}],chart:{height:130,type:"line",zoom:{enabled:!1}},dataLabels:{enabled:!1},legend:{show:!1},stroke:{curve:"smooth"},grid:{row:{colors:["#f3f3f3","transparent"],opacity:.5}},xaxis:{categories:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep"]},yaxis:{labels:{offsetX:-15}},colors:["#4CAF50","#F44336"]}}static \u0275fac=function(n){return new(n||m)(S(X),S(L),S(le))};static \u0275cmp=E({type:m,selectors:[["app-daily-report"]],viewQuery:function(n,i){if(n&1&&R(me,5),n&2){let l;P(l=T())&&(i.chart=l.first)}},decls:180,vars:23,consts:[[1,"content"],[1,"d-md-flex","d-block","align-items-center","justify-content-between","mb-3"],["title","Daily 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-xl-6","d-flex"],[1,"row","flex-fill"],[1,"col-lg-6","col-md-6","d-flex"],[1,"card","flex-fill"],[1,"card-body"],[1,"d-flex","align-items-center","justify-content-between"],[1,"fs-12","fw-normal","mb-1","text-truncate"],[1,"leave-report-icon"],["href","javascript:void(0);"],[1,"p-2","border","border-primary","bg-transparent-primary","rounded-circle","d-flex","align-items-center","justify-content-center"],[1,"ti","ti-user-check","text-primary"],[1,"p-2","border","border-success","bg-transparent-success","rounded-circle","d-flex","align-items-center","justify-content-center"],[1,"ti","ti-subtask","text-success"],[1,"p-2","border","border-danger","bg-transparent-danger","rounded-circle","d-flex","align-items-center","justify-content-center"],[1,"ti","ti-user-x","text-danger"],[1,"p-2","border","border-skyblue","bg-transparent-skyblue","rounded-circle","d-flex","align-items-center","justify-content-center"],[1,"ti","ti-user-x","text-skyblue"],[1,"card-header","border-0","pb-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-bar","text-danger"],[1,"d-inline-flex","align-items-center","me-2","mb-0"],[1,"ti","ti-square-filled","fs-12","text-success","me-2"],[1,"d-inline-flex","align-items-center","mb-0","me-2"],[1,"ti","ti-square-filled","fs-12","text-danger","me-2"],["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","py-0"],["id","daily-report"],[3,"series","chart","colors","stroke","fill","xaxis","yaxis","responsive","tooltip","dataLabels","plotOptions","grid","legend"],[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","Name"],["mat-sort-header","Date"],["mat-sort-header","Department"],["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"],["href","javascript:void(0);",1,"avatar","avatar-md","avatar-rounded"],["alt","img",1,"img-fluid",3,"src"],[1,"ms-2"],[1,"fw-medium"],[1,"fs-12"],[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,i){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),a(8,"Export "),t(),e(9,"ul",8)(10,"li")(11,"a",9),d(12,"i",10),a(13,"Export as PDF"),t()(),e(14,"li")(15,"a",9),d(16,"i",11),a(17,"Export as Excel "),t()()()()(),d(18,"app-collapse-header"),t()(),e(19,"div",12)(20,"div",13)(21,"div",14)(22,"div",15)(23,"div",16)(24,"div",17)(25,"div",18)(26,"div")(27,"p",19),a(28,"Total Present"),t(),e(29,"h4"),a(30,"300"),t()(),e(31,"div",20)(32,"a",21)(33,"span",22),d(34,"i",23),t()()()()()()(),e(35,"div",15)(36,"div",16)(37,"div",17)(38,"div",18)(39,"div")(40,"p",19),a(41,"Completed Tasks"),t(),e(42,"h4"),a(43,"100"),t()(),e(44,"div",20)(45,"a",21)(46,"span",24),d(47,"i",25),t()()()()()()(),e(48,"div",15)(49,"div",16)(50,"div",17)(51,"div",18)(52,"div")(53,"p",19),a(54,"Total Absent"),t(),e(55,"h4"),a(56,"15"),t()(),e(57,"div",20)(58,"a",21)(59,"span",26),d(60,"i",27),t()()()()()()(),e(61,"div",15)(62,"div",16)(63,"div",17)(64,"div",18)(65,"div")(66,"p",19),a(67,"Pending Tasks"),t(),e(68,"h4"),a(69,"125"),t()(),e(70,"div",20)(71,"a",21)(72,"span",28),d(73,"i",29),t()()()()()()()()(),e(74,"div",13)(75,"div",16)(76,"div",30)(77,"div",31)(78,"div",32)(79,"span",33),d(80,"i",34),t(),e(81,"h5"),a(82,"Daily Attendance"),t()(),e(83,"div",32)(84,"p",35),d(85,"i",36),a(86," Present "),t(),e(87,"p",37),d(88,"i",38),a(89," Absent "),t()(),e(90,"div",5)(91,"a",39),a(92," This Year "),t(),e(93,"ul",40)(94,"li")(95,"a",9),a(96,"2024"),t()(),e(97,"li")(98,"a",9),a(99,"2023"),t()(),e(100,"li")(101,"a",9),a(102,"2022"),t()()()()()(),e(103,"div",41),d(104,"div",42)(105,"apx-chart",43),t()()()(),e(106,"div",44)(107,"div",45)(108,"h5"),a(109,"Daily Attendance List"),t(),e(110,"div",46)(111,"div",47)(112,"div",48)(113,"span",49),d(114,"i",50),t(),e(115,"input",51),g("ngModelChange",function(r){return u(i.bsRangeValue,r)||(i.bsRangeValue=r),r}),t()()(),e(116,"div",52)(117,"a",6),a(118," Select Status "),t(),e(119,"ul",8)(120,"li")(121,"a",9),a(122,"Present"),t()(),e(123,"li")(124,"a",9),a(125,"Absent"),t()()()(),e(126,"div",5)(127,"a",6),a(128," Sort By : Last 7 Days "),t(),e(129,"ul",8)(130,"li")(131,"a",9),a(132,"Recently Added"),t()(),e(133,"li")(134,"a",9),a(135,"Ascending"),t()(),e(136,"li")(137,"a",9),a(138,"Desending"),t()(),e(139,"li")(140,"a",9),a(141,"Last Month"),t()(),e(142,"li")(143,"a",9),a(144,"Last 7 Days"),t()()()()()(),e(145,"div",53)(146,"div",54)(147,"div",55)(148,"div",12)(149,"div",56)(150,"div",57)(151,"label"),a(152," Row Per Page "),x(153,ue,9,1,"select",58),a(154," Entries "),t()()(),e(155,"div",56)(156,"div",59)(157,"label")(158,"input",60),g("ngModelChange",function(r){return u(i.searchDataValue,r)||(i.searchDataValue=r),r}),h("ngModelChange",function(){return i.searchData(i.searchDataValue)}),t()()()()(),e(159,"div",61)(160,"table",62),h("matSortChange",function(r){return i.sortData(r)}),e(161,"thead",63)(162,"tr")(163,"th",64)(164,"div",65),h("click",function(){return i.selectAll(i.initChecked)})("keydown.enter",function(){return i.selectAll(i.initChecked)}),e(165,"input",66),g("ngModelChange",function(r){return u(i.initChecked,r)||(i.initChecked=r),r}),t()()(),e(166,"th",67),a(167,"Name"),t(),e(168,"th",68),a(169,"Date"),t(),e(170,"th",69),a(171,"Department"),t(),e(172,"th",70),a(173,"Status"),t(),d(174,"th"),t()(),e(175,"tbody"),k(176,ge,22,9,"tr",null,M),x(178,he,4,0,"tr"),t()()(),d(179,"app-custom-pagination"),t()()()()()),n&2&&(s(2),p("breadcrumbItems",i.breadCrumbItems),s(103),p("series",i.daily_chart.series)("chart",i.daily_chart.chart)("colors",i.daily_chart.colors)("stroke",i.daily_chart.stroke)("fill",i.daily_chart.fill)("xaxis",i.daily_chart.xaxis)("yaxis",i.daily_chart.yaxis)("responsive",i.daily_chart.responsive)("tooltip",i.daily_chart.tooltip)("dataLabels",i.daily_chart.dataLabels)("plotOptions",i.daily_chart.plotOptions)("grid",i.daily_chart.grid)("legend",i.daily_chart.legend),s(10),c("ngModel",i.bsRangeValue),p("bsConfig",_(21,pe)),s(38),D(i.tableData.length>0?153:-1),s(5),c("ngModel",i.searchDataValue),p("ngModelOptions",_(22,ce)),s(7),c("ngModel",i.initChecked),s(11),A(i.tableData),s(2),D(i.tableData.length===0?178:-1))},dependencies:[I,N,J,q,H,F,W,Q,B,O,ne,ie,ae,ee,te,oe,G,Y,U,$,K,Z],encapsulation:2})};export{de as DailyReportComponent};