File: /mnt/data/smarthr-co-in/demo/angular/template/chunk-U26KJEZ2.js
import{a as U}from"./chunk-JKERXUEK.js";import{a as q,b as G,c as J}from"./chunk-NXA7GLYB.js";import{a as K,b as Q}from"./chunk-PWMQ74RC.js";import{a as H}from"./chunk-PDL2MCPW.js";import{a as B}from"./chunk-YKW35LPN.js";import"./chunk-JAZSQYD7.js";import{a as F}from"./chunk-RFJHVWQO.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-33OPMCTI.js";import"./chunk-OH3XPIE7.js";import"./chunk-D5XKRYC7.js";import"./chunk-PYXABXFS.js";import"./chunk-RAVHNKJU.js";import"./chunk-3NNWUWWG.js";import"./chunk-4FNTF56S.js";import{b as T,d as A,h as N,m as R,q as I,r as L,s as j,y as W}from"./chunk-7PPOABPU.js";import{a as V}from"./chunk-ILLDEPHH.js";import{d as O,e as z}from"./chunk-K3YFDFGL.js";import"./chunk-WA2UGD5L.js";import"./chunk-BT37DHWM.js";import{Ac as b,Fc as P,Hd as k,Mb as y,Nb as _,Pb as x,Qb as E,Rb as M,Sb as p,Tb as e,Ub as t,Vb as s,ac as C,cc as c,ec as f,fb as m,pa as g,qa as v,sb as S,tc as a,uc as D,yb as w,yc as u,zc as h}from"./chunk-AQ27DSQO.js";import"./chunk-EQDQRRRY.js";var Z=()=>({standalone:!0});function $(d,o){if(d&1){let n=C();e(0,"select",41),b("ngModelChange",function(l){g(n);let r=f();return h(r.pageSize,l)||(r.pageSize=l),v(l)}),c("ngModelChange",function(){g(n);let l=f();return v(l.changePageSize(l.pageSize))}),e(1,"option",42),a(2,"10"),t(),e(3,"option",43),a(4,"25"),t(),e(5,"option",44),a(6,"50"),t(),e(7,"option",45),a(8,"100"),t()()}if(d&2){let n=f();u("ngModel",n.pageSize)}}function ee(d,o){if(d&1){let n=C();e(0,"tr")(1,"td")(2,"div",46)(3,"input",47),b("ngModelChange",function(l){let r=g(n).$implicit;return h(r.isSelected,l)||(r.isSelected=l),v(l)}),t()()(),e(4,"td")(5,"h6",48)(6,"a",49),a(7),t()()(),e(8,"td"),a(9),t(),e(10,"td")(11,"div",50)(12,"a",51),s(13,"i",52),t(),e(14,"a",53),s(15,"i",54),t()()()()}if(d&2){let n=o.$implicit;m(3),u("ngModel",n.isSelected),m(4),D(n==null?null:n.Name),m(2),D(n.Rate)}}function te(d,o){d&1&&(e(0,"tr")(1,"td",55)(2,"h5",56),a(3,"No matching records found"),t()()())}var X=class d{constructor(o,n,i){this.data=o;this.router=n;this.pagination=i;this.breadCrumbItems=[{label:"HR"},{label:"Payroll Items",active:!0}],this.data.getpayrollOvertime().subscribe(l=>{this.actualData=l.data,this.pagination.tablePageSize.subscribe(r=>{this.router.url==this.routes.payrollOvertime&&(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=V;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;getTableData(o){this.data.getpayrollOvertime().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 K(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],Y=l[o.active];return(r<Y?-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})}static \u0275fac=function(n){return new(n||d)(S(F),S(O),S(Q))};static \u0275cmp=w({type:d,selectors:[["app-payroll-overtime"]],decls:99,vars:10,consts:[[1,"content"],[1,"d-md-flex","d-block","align-items-center","justify-content-between","mb-3"],["title","Payroll Items",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,"d-flex","flex-wrap","gy-2","justify-content-between","my-4"],[1,"payroll-btns"],[1,"btn","btn-white","border","me-2",3,"routerLink"],[1,"btn","btn-white","active","border","me-2",3,"routerLink"],[1,"btn","btn-white","border",3,"routerLink"],[1,"mb-2"],["href","javascript:void(0);","data-bs-toggle","modal","data-bs-target","#add_overtime",1,"btn","btn-primary","d-flex","align-items-center"],[1,"ti","ti-circle-plus","me-2"],[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,"dropdown","me-3"],[1,"card-body","p-0"],[1,"custom-datatable-filter"],[1,"dataTables_wrapper","dt-bootstrap5","no-footer"],[1,"row"],[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","Rate"],[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,"fw-medium"],["href","javascript:void(0);"],[1,"action-icon","d-inline-flex"],["href","javascript:void(0);","data-bs-toggle","modal","data-bs-target","#edit_overtime",1,"me-2"],[1,"ti","ti-edit"],["href","javascript:void(0);","data-bs-toggle","modal","data-bs-target","#delete_modal"],[1,"ti","ti-trash"],["colspan","8"],[1,"no-record"]],template:function(n,i){n&1&&(e(0,"div",0)(1,"div",1),s(2,"app-breadcrumbs",2),e(3,"div",3)(4,"div",4)(5,"div",5)(6,"a",6),s(7,"i",7),a(8,"Export "),t(),e(9,"ul",8)(10,"li")(11,"a",9),s(12,"i",10),a(13,"Export as PDF"),t()(),e(14,"li")(15,"a",9),s(16,"i",11),a(17,"Export as Excel "),t()()()()(),s(18,"app-collapse-header"),t()(),e(19,"div",12)(20,"div",13)(21,"a",14),a(22,"Additions"),t(),e(23,"a",15),a(24,"Overtime"),t(),e(25,"a",16),a(26,"Deductions"),t()(),e(27,"div",17)(28,"a",18),s(29,"i",19),a(30,"Add Overtime"),t()()(),e(31,"div",20)(32,"div",21)(33,"h5"),a(34,"Additions List"),t(),e(35,"div",22)(36,"div",23)(37,"a",6),a(38," Category "),t(),e(39,"ul",8)(40,"li")(41,"a",9),a(42,"Monthly Remuneration"),t()(),e(43,"li")(44,"a",9),a(45,"Additional Remuneration"),t()(),e(46,"li")(47,"a",9),a(48,"Monthly Remuneration"),t()()()(),e(49,"div",5)(50,"a",6),a(51," Sort By : Last 7 Days "),t(),e(52,"ul",8)(53,"li")(54,"a",9),a(55,"Recently Added"),t()(),e(56,"li")(57,"a",9),a(58,"Ascending"),t()(),e(59,"li")(60,"a",9),a(61,"Desending"),t()(),e(62,"li")(63,"a",9),a(64,"Last Month"),t()(),e(65,"li")(66,"a",9),a(67,"Last 7 Days"),t()()()()()(),e(68,"div",24)(69,"div",25)(70,"div",26)(71,"div",27)(72,"div",28)(73,"div",29)(74,"label"),a(75," Row Per Page "),y(76,$,9,1,"select",30),a(77," Entries "),t()()(),e(78,"div",28)(79,"div",31)(80,"label")(81,"input",32),b("ngModelChange",function(r){return h(i.searchDataValue,r)||(i.searchDataValue=r),r}),c("ngModelChange",function(){return i.searchData(i.searchDataValue)}),t()()()()(),e(82,"div",33)(83,"table",34),c("matSortChange",function(r){return i.sortData(r)}),e(84,"thead",35)(85,"tr")(86,"th",36)(87,"div",37),c("click",function(){return i.selectAll(i.initChecked)})("keydown.enter",function(){return i.selectAll(i.initChecked)}),e(88,"input",38),b("ngModelChange",function(r){return h(i.initChecked,r)||(i.initChecked=r),r}),t()()(),e(89,"th",39),a(90,"Name"),t(),e(91,"th",40),a(92,"Rate"),t(),s(93,"th"),t()(),e(94,"tbody"),E(95,ee,16,3,"tr",null,x),y(97,te,4,0,"tr"),t()()(),s(98,"app-custom-pagination"),t()()()()()),n&2&&(m(2),p("breadcrumbItems",i.breadCrumbItems),m(19),p("routerLink",i.routes.payrollAddition),m(2),p("routerLink",i.routes.payrollOvertime),m(2),p("routerLink",i.routes.payrollDeduction),m(51),_(i.tableData.length>0?76:-1),m(5),u("ngModel",i.searchDataValue),p("ngModelOptions",P(9,Z)),m(7),u("ngModel",i.initChecked),m(7),M(i.tableData),m(2),_(i.tableData.length===0?97:-1))},dependencies:[k,W,L,j,A,T,I,N,R,J,q,G,z,B,H,U],encapsulation:2})};export{X as PayrollOvertimeComponent};