{"version":3,"file":"app-909a0efe.d152cf98c45d962fa693.bundle.js","mappings":";;;;;;;;;;;;;;;AAAA;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AAUA;AAAA;AAPA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAKA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAKA;AACA;AACA;;;;;;;;;;;;;;;;;;ACxFA;AACA;AACA;AACA;AAEA;AAGA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AASA;AACA;;AAEA;AACA;;AAGA;AAAA;AAdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;AAEA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AAEA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAGA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAGA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;ACxYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAYA;AAAA;AAVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AAGA;AAEA;AAEA;AACA;AAEA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;AACA;AAAA;AAAA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;;;;;;;;;;;;;;;;;;;ACnKA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AAQA;AAAA;AANA;AAEA;AACA;AAIA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAIA;;;;;;;;;;;;;;;;;;AC3CA;AACA;AACA;AACA;AAEA;AAGA;AACA;AACA;AACA;AACA;AAEA;;;;;;;;;;;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AAQA;AAAA;AANA;AAEA;AACA;AAIA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AAGA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AAqBA;AAAA;AAnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AA4GA;AAAA;AAAA;AAxGA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAEA;AACA;AACA;AAEA;AAEA;AACA;AAGA;AACA;AAMA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AAEA;AAEA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AAEA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AAGA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAEA;AAGA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACnXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACXA;AACA;AACA;AACA;;;;;;;;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACPA;AACA;AACA;AACA;;;;;;;;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sources":["webpack://HRMSPortal/./src/components/recordingtime/dateformat.js","webpack://HRMSPortal/./src/components/recordingtime/recordingtime.js","webpack://HRMSPortal/./src/components/resignation/resignationcomponent.js","webpack://HRMSPortal/./src/components/resignationform/resignationformcomponent.js","webpack://HRMSPortal/./src/components/salaryrevision/employeesalary/employeesalarycomponent.js","webpack://HRMSPortal/./src/components/salaryrevision/otheremployeesinsameposition/otheremployeesinsameposition.js","webpack://HRMSPortal/./src/components/salaryrevision/promotionletter/promotionlettercomponent.js","webpack://HRMSPortal/./src/components/salaryrevision/questionnairePopup/questionnairePopup.js","webpack://HRMSPortal/./src/components/salaryrevision/salaryrevisioncomponent.js","webpack://HRMSPortal/./src/components/recordingtime/recordingtime.html","webpack://HRMSPortal/./src/components/resignation/resignationcomponent.html","webpack://HRMSPortal/./src/components/resignationform/resignationformcomponent.html","webpack://HRMSPortal/./src/components/salaryrevision/employeesalary/employeesalarycomponent.html","webpack://HRMSPortal/./src/components/salaryrevision/otheremployeesinsameposition/otheremployeesinsameposition.html","webpack://HRMSPortal/./src/components/salaryrevision/promotionletter/promotionlettercomponent.html","webpack://HRMSPortal/./src/components/salaryrevision/questionnairePopup/questionnairePopup.html","webpack://HRMSPortal/./src/components/salaryrevision/salaryrevisioncomponent.html"],"sourcesContent":["import moment from 'moment';\r\n\r\nexport class DateFormatValueConverter {\r\n toView(value, format) {\r\n return moment(value).format(format);\r\n }\r\n}","import {inject } from 'aurelia-framework';\r\nimport {DashboardService} from '../../shared/services/dashboardservice';\r\nimport {Router} from 'aurelia-router';\r\nimport {JwtService} from '../../shared/services/jwtservice';\r\nimport {HeaderService} from '../../shared/services/headerservice';\r\nimport {AttendanceService} from '../../shared/services/attendanceservice';\r\nimport {LoginService} from \"../../shared/services/loginservice\";\r\n\r\n\r\n@inject(Router,DashboardService,JwtService,HeaderService,AttendanceService,LoginService)\r\nexport class RecordingTime {\r\n\r\n time='';\r\n comments='';\r\n attendanceDetails=[];\r\n inTime='';\r\n outTime='';\r\n record=[];\r\n message='';\r\n constructor(router,DashboardService,jwtService,headerservice,attendanceservice,loginService){\r\n this.update();\r\n this.jwtService = JwtService;\r\n this.headerservice = headerservice;\r\n this.attendanceService=attendanceservice;\r\n setInterval(() => this.update(), 1000);\r\n this.router = router;\r\n this.jwtService = jwtService;\r\n this.loginService = loginService;\r\n }\r\n\r\n attached(){\r\n this.isLoading = true;\r\n // if(this.jwtService.getToken() === undefined){\r\n // this.loginService.purgeAuth();\r\n // this.router.navigateToRoute('login')\r\n // }\r\n setTimeout(() => {\r\n this.isLoading = false;\r\n }, 1000);\r\n this.getAttendanceDetails();\r\n }\r\n\r\n /**\r\n * To update the current time on every minute\r\n */\r\n update(){\r\n this.currentDate=new Date();\r\n }\r\n\r\n /**\r\n * Function to get the attendance details of a employee\r\n */\r\n getAttendanceDetails(){\r\n this.empid = this.jwtService.getEmployeeId();\r\n this.attendanceService.GetAttendanceDetails(this.empid)\r\n .then(data => {\r\n this.attendanceDetails= data;\r\n this.inTime = this.attendanceDetails.length !==0 ? this.attendanceDetails[this.attendanceDetails.length - 1].InTime: null;\r\n this.outTime = this.attendanceDetails.length !==0 ? this.attendanceDetails[this.attendanceDetails.length - 1].OutTime : null;\r\n this.attendanceId=this.attendanceDetails.length !==0 ? this.attendanceDetails[this.attendanceDetails.length - 1].AttendanceID : null;\r\n });\r\n };\r\n\r\n /**\r\n * Function for Punch In and Punch Out.\r\n *\r\n * calling getAttendanceDetails function to reload the punch In/punch Out section.\r\n */\r\n saveTime(){\r\n event.preventDefault();\r\n if(this.inTime !== null && this.outTime === null){\r\n let inAndOut={AttendanceID:this.attendanceId,OutTime:this.record.Time, OutTimeComment:this.record.Comments,EmployeeID:this.record.EmployeeID};\r\n const sendAttendanceDate = this.attendanceService.SaveAttendance(inAndOut);\r\n sendAttendanceDate.then(\r\n async () => await this.getAttendanceDetails(),\r\n this.message=\"Successfully punched out\",\r\n this.record.Comments=''\r\n ).catch(e => console.error(e))\r\n }else {\r\n let inAndOut={InTime:this.record.Time,InTimeComment:this.record.Comments,EmployeeID:this.record.EmployeeID};\r\n const sendAttendanceDate = this.attendanceService.SaveAttendance(inAndOut);\r\n sendAttendanceDate.then(\r\n async () => await this.getAttendanceDetails(),\r\n this.message=\"Successfully punched in\",\r\n this.record.Comments=''\r\n ).catch(e => console.error(e))\r\n }\r\n }\r\n}\r\n","import {inject} from 'aurelia-framework';\r\nimport {JwtService} from '../../shared/services/jwtservice';\r\nimport {DialogController } from 'aurelia-dialog';\r\nimport {DialogService} from 'aurelia-dialog';\r\n\r\n@inject(DialogController,JwtService,DialogService)\r\nexport class Resignation {\r\n \r\n constructor(controller,JwtService,DialogService){\r\n this.controller = controller;\r\n this.jwtService= JwtService;\r\n this.dialogService = DialogService;\r\n }\r\n\r\n filterClick() {\r\n event.preventDefault();\r\n const clickedDiv = event.target.parentNode.parentNode;\r\n clickedDiv.classList.toggle('filter-open');\r\n const divs = document.querySelectorAll('.filter-open');\r\n divs.forEach((div) => {\r\n if (div !== clickedDiv) {\r\n div.classList.remove('filter-open');\r\n }\r\n });\r\n const handleOutsideClick = (event) => {\r\n if (!clickedDiv.contains(event.target)) {\r\n divs.forEach((div) => {\r\n div.classList.remove('filter-open');\r\n });\r\n document.removeEventListener('click', handleOutsideClick);\r\n }\r\n };\r\n if (clickedDiv.classList.contains('filter-open')) {\r\n document.addEventListener('click', handleOutsideClick);\r\n } else {\r\n document.removeEventListener('click', handleOutsideClick);\r\n }\r\n }\r\n\r\n}\r\n","import {inject} from 'aurelia-dependency-injection';\r\nimport {EmployeeService} from '../../shared/services/employeeservice';\r\nimport {Router} from 'aurelia-router';\r\nimport {ValidationControllerFactory, ValidationRules} from 'aurelia-validation';\r\nimport Scrollbar from 'smooth-scrollbar';\r\nimport {JwtService} from '../../shared/services/jwtservice';\r\nimport {DialogController} from 'aurelia-dialog';\r\nimport {DialogService} from 'aurelia-dialog';\r\nimport {LoginService} from \"../../shared/services/loginservice\";\r\nimport flatpickr from 'flatpickr';\r\nimport 'flatpickr/dist/flatpickr.min.css';\r\nimport {OrganizationComponent} from '../organization/organizationcomponent';\r\nimport {ApproveCompOff} from \"../attendancetracking/compoff/approve/approve\";\r\n\r\n\r\n@inject(EmployeeService, Router, ValidationControllerFactory, JwtService, DialogController, DialogService, LoginService)\r\nexport class ResignationFormComponent {\r\n questionError = false;\r\n ApprovalsValidation = false;\r\n isLoading = false;\r\n questionError = false;\r\n prevPass;\r\n questionlist = [];\r\n Reasonemployee = '';\r\n RevokeWithdrawExitID = 0; // Assuming this is a property in your view-model\r\n Statustext = ''; // Assuming this is a property in your view-model\r\n\r\n selectedOptions = {}; // Object to hold selected radio options\r\n textAreaValues = {}; // Object to hold values of text areas\r\n\r\n\r\n constructor(employeeServices, router, controllerFactory, jwtService, loginservice) {\r\n this.employeeServices = employeeServices;\r\n this.router = router;\r\n this.controller = controllerFactory.createForCurrentScope();\r\n this.jwtService = jwtService;\r\n this.empid = this.jwtService.getEmployeeId();\r\n this.dialogService = DialogService;\r\n this.loginservice = loginservice;\r\n this.policy;\r\n ValidationRules\r\n .ensure('comment').displayName(\"Comments\").required()\r\n .ensure('resdate').displayName(\"Resignation date\").required()\r\n .ensure('DateOfBirth').displayName(\"Requested last working day\").required()\r\n .ensure('Reasonemployee').displayName(\"Reason\").required()\r\n .ensure('Reasonforwithdraw').displayName(\"Reason for withdraw\").required()\r\n .on(this);\r\n }\r\n\r\n async attached() {\r\n this.employeeServices.GetApproversValidation(this.empid).then(data => {\r\n this.Apprvol = data;\r\n\r\n });\r\n\r\n this.isLoading = true;\r\n const exit = await this.employeeServices.GetEmployeeExitDetails(this.empid);\r\n this.isLoading = false;\r\n this.PolicyLWD = exit.PolicyLWD;\r\n this.currentDate = new Date();\r\n this.ResignationDate = this.formatDate(this.currentDate);\r\n this.Reason = exit.ReasonToEnableExit;\r\n this.status = exit.StatusCode;\r\n this.personId = exit.PersonID;\r\n this.enableexitID = exit.ExitID;\r\n this.exitTypeID = exit.ExitTypeID;\r\n this.PageFrom = \"ResignationForm\";\r\n this.StatusCode = exit.StatusCode;\r\n this.Statustext = exit.StatusCode;\r\n this.Reasonemployees = exit.ReasonforResignation;\r\n this.Reasonforwithdraw = exit.ReasonforWithdraw;\r\n this.EmployeeName = exit.EmployeeName;\r\n this.Designation = exit.DepartmentName;\r\n this.photopath = exit.PhotoPath;\r\n this.DeptPositionPositionLevelName = exit.DeptPositionPositionLevelName;\r\n this.dateofjoining = exit.DateOfJoining;\r\n this.Rmname = exit.ReportingMangerName;\r\n this.resdates = exit.ResignationDate;\r\n this.DateOfBirths = exit.RequestedLWDtxt;\r\n this.Employeecode = exit.EmployeeCode;\r\n this.StatusCodetxt = exit.StatusCodetxt;\r\n this.VisibleToHr = exit.HRComments;\r\n this.RevokeWithdrawExitID = exit.RevokeWithdrawExitID;\r\n if (this.StatusCode === 'ENB') {\r\n this.apply = 'Submit';\r\n this.Submit = 'ACT';\r\n this.StatusCode = 'ACT';\r\n } else if (this.StatusCode === 'PEA') {\r\n this.apply = 'Withdraw';\r\n this.Withdraw = 'WIT';\r\n this.StatusCode = 'PEA';\r\n }\r\n\r\n\r\n flatpickr(this.datePicker, {\r\n dateFormat: 'd-m-Y',\r\n minDate: new Date(),\r\n maxDate: null,\r\n defaultDate: null,\r\n enableTime: false,\r\n enableSeconds: false,\r\n time_24hr: false,\r\n minuteIncrement: 1,\r\n hourIncrement: 1,\r\n timeFormat: 'h:i K',\r\n clickOpens: false,\r\n onClose: function (selectedDates, dateStr, instance) {\r\n }\r\n });\r\n this.calendarIcon.addEventListener('click', () => {\r\n this.datePicker._flatpickr.open();\r\n });\r\n\r\n flatpickr(this.FromdatePicker, {\r\n closeOnSelect: true,\r\n dateFormat: 'd-m-Y',\r\n minDate: new Date(Date.now() - 15 * 24 * 60 * 60 * 1000),\r\n maxDate: null,\r\n defaultDate: null,\r\n enableTime: false,\r\n enableSeconds: false,\r\n time_24hr: false,\r\n minuteIncrement: 1,\r\n hourIncrement: 1,\r\n timeFormat: 'h:i K',\r\n clickOpens: false,\r\n onClose: (selectedDates, dateStr, instance) => {\r\n this.FromDate = dateStr;\r\n if (this.ToDate && new Date(this.ToDate) < new Date(dateStr)) {\r\n this.ToDate = dateStr;\r\n this.ToCalendar.setDate(dateStr);\r\n }\r\n\r\n }\r\n });\r\n this.FromcalendarIcon.addEventListener('click', () => {\r\n this.FromdatePicker._flatpickr.open();\r\n });\r\n\r\n this.isLoading = true;\r\n const exitQuestions = await this.employeeServices.GetExitQuestions(this.empid, this.enableexitID, this.exitTypeID, this.PageFrom);\r\n this.questionlist = exitQuestions.ListQuestion;\r\n this.questionData = exitQuestions;\r\n this.isLoading = false;\r\n }\r\n\r\n formatDate(date) {\r\n const day = date.getDate().toString().padStart(2, '0');\r\n const month = (date.getMonth() + 1).toString().padStart(2, '0'); // Month is zero-based\r\n const year = date.getFullYear();\r\n return `${day}-${month}-${year}`;\r\n }\r\n\r\n handleFileSelect(files) {\r\n const file = files[0];\r\n this.file = file;\r\n let reader = new FileReader();\r\n reader.readAsDataURL(file);\r\n this.DocumentName = file.name;\r\n reader.onload = () => {\r\n this.file = reader.result;\r\n };\r\n }\r\n\r\n openFileDialog() {\r\n document.getElementById('attachments').click();\r\n }\r\n\r\n removeFile() {\r\n this.file = null;\r\n this.DocumentName = '';\r\n const fileInput = document.getElementById('attachments');\r\n if (fileInput) {\r\n fileInput.value = '';\r\n }\r\n }\r\n\r\n cancel() {\r\n this.router.navigateToRoute('dashboard');\r\n }\r\n\r\n formatDate(dateString) {\r\n const date = new Date(dateString);\r\n const day = date.getDate().toString().padStart(2, '0');\r\n const month = (date.getMonth() + 1).toString().padStart(2, '0'); // Months are zero-based\r\n const year = date.getFullYear();\r\n return `${day}-${month}-${year}`;\r\n }\r\n\r\n handleDateSelection() {\r\n\r\n this.handleSearch();\r\n }\r\n\r\n async handleSearch() {\r\n this.policydte = this.resdate;\r\n this.employeeServices.GetNoticePeriodByPositionId(this.policydte, this.empid)\r\n .then(response => {\r\n this.isLoading = true;\r\n this.policydate = response;\r\n this.isLoading = false;\r\n });\r\n }\r\n\r\n\r\n save(questionlist) {\r\n event.preventDefault();\r\n const formData = [];\r\n\r\n this.controller.validate()\r\n .then(result => {\r\n if (result.valid) {\r\n if (this.StatusCode === \"PEA\" || this.StatusCode === \"APP\") {\r\n\r\n let data = {\r\n RequestedLWD: this.DateOfBirth,\r\n ExitID: this.enableexitID,\r\n DocumentName: this.DocumentName,\r\n Actions: this.StatusCode,\r\n DocumentPath: this.file,\r\n LogginEmployeeID: this.empid,\r\n //Actions:this.Actions,\r\n ReasonforResignation: this.Reasonemployee,\r\n ReasonforWithdraw: this.Reasonforwithdraw,\r\n HRComments: this.comment,\r\n PolicyLWD: this.policydatetxt,\r\n ResignationDate: this.resdate,\r\n };\r\n this.isLoading = true;\r\n this.employeeServices.PostResignationWithdraw(data)\r\n .then(() => {\r\n this.isLoading = false;\r\n this.message = \"Resignation withdrawn submitted \";\r\n this.attached();\r\n setTimeout(() => {\r\n this.message = \"\";\r\n }, 3000);\r\n });\r\n this.comment = '';\r\n this.DocumentName = '';\r\n this.file = '';\r\n this.hrcomment = '';\r\n\r\n this.Reasonemployee = '';\r\n // dashboard\r\n const errorElement = document.querySelector(\".scrolltoerrorsuccess\");\r\n if (errorElement) {\r\n errorElement.scrollIntoView({behavior: \"auto\", block: \"start\", inline: \"nearest\"});\r\n window.scrollBy(0, -200);\r\n }\r\n }\r\n else\r\n {\r\n const mandatoryRadioQuestions = questionlist.filter(question => question.FieldTypeName === 'Radio Option' && question.IsManditory === true);\r\n // Iterate through questionlist\r\n for (const question of questionlist) {\r\n\r\n // Check if the question is a Radio Option type\r\n if (question.FieldTypeName === 'Radio Option') {\r\n // Check if an option is selected\r\n if (this.selectedOptions[question.Seqno]) {\r\n const selectedOptionId = Number(this.selectedOptions[question.Seqno]);\r\n const selectedOption = question.ListofOptions.find(option => option.PreExitQuestionOptionID === selectedOptionId);\r\n formData.push({\r\n ExitQuestionID: question.PreExitQuestionID,\r\n // Response: this.selectedOptions[question.Seqno],\r\n Response: selectedOption.Option,\r\n FieldTypeName: question.FieldTypeName,\r\n Option: selectedOption.Option\r\n\r\n });\r\n }\r\n } else if (question.FieldTypeName === 'TextBox Option') {\r\n // Check if Statustext is not 'PEA' or 'APP'\r\n if (this.Statustext !== 'PEA' && this.Statustext !== 'APP') {\r\n formData.push({\r\n ExitQuestionID: question.PreExitQuestionID,\r\n Response: this.textAreaValues[question.Seqno],\r\n FieldTypeName: question.FieldTypeName,\r\n Option: question.Option\r\n });\r\n }\r\n }\r\n }\r\n for (const question of mandatoryRadioQuestions) {\r\n // Check if there is no selected option for this question\r\n if (!this.selectedOptions[question.Seqno]) {\r\n // Throw an error and prevent form submission\r\n this.questionError = true;\r\n const errorElement = document.querySelector(\".scrolltoerrorsuccess\");\r\n if (errorElement) {\r\n errorElement.scrollIntoView({behavior: \"auto\", block: \"start\", inline: \"nearest\"});\r\n window.scrollBy(0, -200);\r\n }\r\n this.dynamicQuestionFormError = `Error: Mandatory question ${question.PreExitQuestionID} has no option selected.`;\r\n return; // Stop further processing\r\n }\r\n }\r\n const refreshEvent = new CustomEvent('refreshAddSkill');\r\n if (this.StatusCode != \"PEA\" && this.StatusCode != \"APP\") {\r\n let data = {\r\n RequestedLWD: this.DateOfBirth,\r\n ExitID: this.enableexitID,\r\n DocumentName: this.DocumentName,\r\n Actions: this.StatusCode,\r\n DocumentPath: this.file,\r\n LogginEmployeeID: this.empid,\r\n HRComments: this.comment,\r\n PolicyLWD: this.policydate.policydatetxt,\r\n PersonID: this.empid,\r\n ResignationDate: this.resdate,\r\n ReasonforResignation: this.Reasonemployee,\r\n HRComment: this.hrcomment,\r\n ListResponses: formData\r\n };\r\n\r\n const mandatoryQuestionsArray = this.questionData.MandatoryQueText.split(\",\").map(Number);\r\n const mandatoryobjectiveArray = this.questionData.MandatoryQueRadio.split(\",\").map(Number);\r\n const radioOptionQuestions = this.questionlist.filter(question => question.FieldTypeName === \"Radio Option\" && question.IsManditory === true);\r\n\r\n // Extract PreExitQuestionID from filtered items\r\n const preExitQuestionIDs = radioOptionQuestions.map(question => question.PreExitQuestionID);\r\n\r\n const emptyResponses = data.ListResponses.filter(question => mandatoryQuestionsArray.includes(question.ExitQuestionID) && (!question.Response || question.Response.trim() === \"\"));\r\n const radioEmptyResponses = data.ListResponses.filter(question => mandatoryobjectiveArray.includes(question.PreExitQuestionID) && (!question.Response || question.Response.trim() === \"\"));\r\n if (emptyResponses.length > 0) {\r\n\r\n this.questionError = true;\r\n const errorElement = document.querySelector(\".scrolltoerrorsuccess\");\r\n if (errorElement) {\r\n errorElement.scrollIntoView({behavior: \"auto\", block: \"start\", inline: \"nearest\"});\r\n window.scrollBy(0, -200);\r\n }\r\n this.dynamicQuestionFormError = `Error: Mandatory question ${emptyResponses.map(q => q.ExitQuestionID).join(', ')} has null or empty response.`\r\n // Handle error, display message or prevent form submission\r\n return;\r\n } else {\r\n if (this.Apprvol === true) {\r\n this.ApprovalsValidation = true;\r\n const errorElement = document.querySelector(\".scrolltoerrorsuccess\");\r\n if (errorElement) {\r\n errorElement.scrollIntoView({behavior: \"auto\", block: \"start\", inline: \"nearest\"});\r\n window.scrollBy(0, -200);\r\n }\r\n } else {\r\n // No empty responses, proceed with form submission\r\n this.isLoading = true;\r\n this.questionError = false;\r\n this.employeeServices.PostResignationRequest(data)\r\n .then(() => {\r\n this.isLoading = false;\r\n this.message = \"Resignation form submitted successfully. \";\r\n this.attached();\r\n setTimeout(() => {\r\n this.message = \"\";\r\n }, 10000);\r\n });\r\n this.comment = '';\r\n this.DocumentName = '';\r\n this.file = '';\r\n this.hrcomment = '';\r\n this.DateOfBirth = '';\r\n this.resdate = '';\r\n this.Reasonemployee = '';\r\n this.selectedOptions = {};\r\n this.textAreaValues = {};\r\n }\r\n\r\n }\r\n }\r\n \r\n }\r\n }\r\n });\r\n\r\n\r\n }\r\n\r\n findTextarea(seqno) {\r\n // Helper function to find the corresponding textarea based on seqno\r\n const textareas = document.querySelectorAll('textarea');\r\n for (const textarea of textareas) {\r\n if (textarea.previousElementSibling.textContent.includes(`${seqno}.`)) {\r\n return textarea;\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n organization(user) {\r\n this.dialogService.open({viewModel: OrganizationComponent, model: user})\r\n }\r\n}\r\n","import {inject} from 'aurelia-framework';\r\nimport {JwtService} from '../../../shared/services/jwtservice';\r\nimport {DialogController} from 'aurelia-dialog';\r\nimport {DialogService} from 'aurelia-dialog';\r\nimport {SalaryRevisionService} from '../../../shared/services/salaryrevisionservice';\r\nimport {QuestionnairePopup} from \"../questionnairePopup/questionnairePopup\";\r\nimport {OtherEmployeesInSamePosition} from \"../otheremployeesinsameposition/otheremployeesinsameposition\"\r\nimport {config} from \"../../../shared/services/config\";\r\nimport { AppreciationService } from '../../../shared/services/appreciationservice';\r\n\r\n@inject(DialogController, JwtService, DialogService, SalaryRevisionService,AppreciationService)\r\nexport class PromotionLetter {\r\n ToDate = '14-12-2023';\r\n FromDate = '11-01-2023';\r\n pageSize1 = config.salaryGrid_PazeSize;\r\n pageSize = config.salaryGrid_PazeSize;\r\n pageSize2 = config.salaryGrid_PazeSize;\r\n MyAppreciationSummay=[];\r\n AppreciationDetails=[];\r\n configimgurl=config.img_url;\r\n previousYear = this.getPreviousYear();\r\n\r\n constructor(controller, JwtService, DialogService, SalaryRevisionService,appreciationService) {\r\n this.controller = controller;\r\n this.jwtService = JwtService;\r\n this.empid = this.jwtService.getEmployeeId();\r\n\r\n this.dialogService = DialogService;\r\n this.salaryRevisionService = SalaryRevisionService;\r\n this.appreciationService=appreciationService;\r\n }\r\n\r\n activate(salaryData) {\r\n this.params = salaryData;\r\n this.SalaryRevisionID = this.params.SalaryRevisionID;\r\n this.SelectedEmployeeID = this.params.selectedEmployeeID;\r\n this.EmployeeID=this.params.EmployeeID;\r\n }\r\n\r\n attached() {\r\n this.salaryRevisionService.getEmployeeDetails(this.SalaryRevisionID).then(data => {\r\n this.getdetails = data;\r\n console.log(data);\r\n this.ActionName=this.getdetails.ActionName;\r\n this.SalaryRevisionID=this.getdetails.SalaryRevisionID;\r\n this.PersonId = this.getdetails.PersonId;\r\n this.startdate = this.getdetails.RevisionPeriodFrom;\r\n this.enddate = this.getdetails.RevisionPeriodTo;\r\n this.Position = this.getdetails.Position;\r\n this.LevelName = this.getdetails.LevelName;\r\n this.DepartmentName=this.getdetails.DepartmentName;\r\n this.WorkexperinceText=this.getdetails.WorkexperinceText;\r\n this.EmployeeID=this.getdetails.EmployeeID;\r\n\r\n this.salaryRevisionService.GetTimeoffSummaryByPersonID(this.getdetails.PersonId, this.getdetails.RevisionPeriodFrom, this.getdetails.RevisionPeriodTo).then(data => {\r\n this.TimeoffSummary = data.List;\r\n\r\n });\r\n this.salaryRevisionService.AppreciationByEmployeeID(this.getdetails.EmployeeID,this.getdetails.RevisionPeriodFrom, this.getdetails.RevisionPeriodTo).then(data => {\r\n this.appreciation = data;\r\n // console.log('hii');\r\n // console.log(this.appreciation);\r\n });\r\n\r\n this.salaryRevisionService.GetCertificationsByPersonID(this.PersonId,this.getdetails.RevisionPeriodFrom, this.getdetails.RevisionPeriodTo).then(data => {\r\n this.certification = data;\r\n console.log('hii');\r\n console.log(this.certification);\r\n });\r\n\r\n this.appreciationService.getMyAppreciationSummary(this.EmployeeID,this.previousYear)\r\n .then(MyAppreciationSummay =>{\r\n this.MyAppreciationSummay = MyAppreciationSummay.EmployeeAppreciationModelList; \r\n console.log(this.MyAppreciationSummay);\r\n });\r\n\r\n this.appreciationService.getMyAppreciationDetails(this.EmployeeID,this.previousYear)\r\n .then(AppreciationDetails =>{\r\n this.AppreciationDetails = AppreciationDetails; \r\n this.selectedCategoryDetails=this.AppreciationDetails;\r\n });\r\n });\r\n\r\n }\r\n\r\n getPreviousYear() {\r\n const myDate = new Date();\r\n myDate.setFullYear(myDate.getFullYear() ); // -1\r\n return myDate.getFullYear();\r\n }\r\n\r\n selectedCategoryDetails = [];\r\n show(option)\r\n {\r\n if(option != '')\r\n {\r\n this.selectedCategoryDetails = this.AppreciationDetails.filter((getappreciation) => getappreciation.CategoryName === option.CategoryName);\r\n }\r\n else{\r\n this.selectedCategoryDetails=this.AppreciationDetails;\r\n }\r\n \r\n }\r\n\r\n performanceClick() {\r\n event.preventDefault();\r\n const parentDiv = event.target.parentNode;\r\n parentDiv.classList.toggle('performance-open');\r\n }\r\n\r\n QuestionnairePopup() {\r\n const data = {\r\n SalRevisionID: this.SalaryRevisionID,\r\n EmployeeID: this.empid\r\n //this.SelectedEmployeeID\r\n };\r\n this.dialogService.open({viewModel: QuestionnairePopup, model: data});\r\n\r\n }\r\n OtherEmployeesInSamePosition(){\r\n const otherEmployee={\r\n PersonId:this.PersonId,\r\n Position:this.Position,\r\n LevelName:this.LevelName,\r\n DepartmentName:this.DepartmentName,\r\n }\r\n this.dialogService.open({viewModel:OtherEmployeesInSamePosition, model:otherEmployee })\r\n }\r\n openFileDialog() {\r\n document.getElementById('attachments').click();\r\n }\r\n\r\n handleFileSelect(files) {\r\n const file = files[0];\r\n const maxSize = 2.5 * 1024 * 1024;\r\n if (file.size > maxSize) {\r\n this.fileMessage = 'File size should be less than 2.5 MB.';\r\n setTimeout(() => {\r\n this.fileMessage = null;\r\n }, 4000);\r\n this.removeFile();\r\n return;\r\n }\r\n else if (file.size <= maxSize) {\r\n this.files = file;\r\n let reader = new FileReader();\r\n reader.readAsDataURL(file);\r\n this.DocumentNames = file.name;\r\n reader.onload = () => {\r\n this.files = reader.result;\r\n };\r\n }\r\n }\r\n\r\n removeFile() {\r\n this.files = null;\r\n this.DocumentNames = '';\r\n const fileInput = document.getElementById('attachments');\r\n if (fileInput) {\r\n fileInput.value = '';\r\n }\r\n }\r\n\r\n}\r\n","import {inject} from 'aurelia-framework';\r\nimport {JwtService} from '../../../shared/services/jwtservice';\r\nimport {DialogController} from 'aurelia-dialog';\r\nimport {DialogService} from 'aurelia-dialog';\r\nimport {config} from \"../../../shared/services/config\";\r\nimport {SalaryRevisionService} from '../../../shared/services/salaryrevisionservice';\r\n\r\nimport flatpickr from \"flatpickr\";\r\n\r\n@inject(DialogController, JwtService, DialogService, SalaryRevisionService)\r\nexport class OtherEmployeesInSamePosition {\r\n isLoading = false;\r\n static inject = [DialogController, Element];\r\n isDragging = false;\r\n dialog;\r\n pageSize = config.kra_PazeSize;\r\n\r\n constructor(controller, JwtService, DialogService, SalaryRevisionService) {\r\n this.controller = controller;\r\n this.jwtService = JwtService;\r\n this.dialogService = DialogService;\r\n this.empid = this.jwtService.getEmployeeId();\r\n this.salaryRevisionService = SalaryRevisionService\r\n\r\n }\r\n\r\n activate(data) {\r\n console.log(data);\r\n this.params = data;\r\n this.LevelName = this.params.LevelName;\r\n this.PersonId = this.params.PersonId;\r\n this.Position = this.params.Position;\r\n this.DepartmentName=this.params.DepartmentName;\r\n }\r\n\r\n attached() {\r\n this.salaryRevisionService.GetOtherPositionDetails(this.Position, this.LevelName,this.DepartmentName,this.PersonId, this.empid).then(data => {\r\n this.question = data;\r\n })\r\n }\r\n\r\n\r\n\r\n}\r\n","import {inject} from 'aurelia-framework';\r\nimport {JwtService} from '../../../shared/services/jwtservice';\r\nimport {DialogController } from 'aurelia-dialog';\r\nimport {DialogService} from 'aurelia-dialog';\r\n\r\n@inject(DialogController,JwtService,DialogService)\r\nexport class PromotionLetter {\r\n \r\n constructor(controller,JwtService,DialogService){\r\n this.controller = controller;\r\n this.jwtService= JwtService;\r\n this.dialogService = DialogService;\r\n }\r\n\r\n}\r\n","import {inject} from 'aurelia-framework';\r\nimport {JwtService} from '../../../shared/services/jwtservice';\r\nimport {DialogController} from 'aurelia-dialog';\r\nimport {DialogService} from 'aurelia-dialog';\r\nimport {config} from \"../../../shared/services/config\";\r\nimport {SalaryRevisionService} from '../../../shared/services/salaryrevisionservice';\r\n\r\nimport flatpickr from \"flatpickr\";\r\n\r\n@inject(DialogController, JwtService, DialogService, SalaryRevisionService)\r\nexport class QuestionnairePopup {\r\n isLoading = false;\r\n static inject = [DialogController, Element];\r\n isDragging = false;\r\n dialog;\r\n pageSize = config.kra_PazeSize;\r\n\r\n constructor(controller, JwtService, DialogService, SalaryRevisionService) {\r\n this.controller = controller;\r\n this.jwtService = JwtService;\r\n this.dialogService = DialogService;\r\n this.empid = this.jwtService.getEmployeeId();\r\n this.salaryRevisionService = SalaryRevisionService\r\n\r\n }\r\n\r\n activate(data) {\r\n this.params = data;\r\n this.EmployeeID = this.params.EmployeeID;\r\n this.SalRevisionID = this.params.SalRevisionID;\r\n\r\n\r\n }\r\n\r\n attached() {\r\n this.salaryRevisionService.Questionlist(this.SalRevisionID, this.EmployeeID).then(data => {\r\n this.question = data;\r\n })\r\n }\r\n\r\n openFileDialog() {\r\n document.getElementById('attachments').click();\r\n }\r\n\r\n handleFileSelect(files) {\r\n const file = files[0];\r\n const maxSize = 2.5 * 1024 * 1024;\r\n if (file.size > maxSize) {\r\n this.fileMessage = 'File size should be less than 2.5 MB.';\r\n setTimeout(() => {\r\n this.fileMessage = null;\r\n }, 4000);\r\n this.removeFile();\r\n return;\r\n }\r\n else if (file.size <= maxSize) {\r\n this.files = file;\r\n let reader = new FileReader();\r\n reader.readAsDataURL(file);\r\n this.DocumentNames = file.name;\r\n reader.onload = () => {\r\n this.files = reader.result;\r\n };\r\n }\r\n }\r\n\r\n removeFile() {\r\n this.files = null;\r\n this.DocumentNames = '';\r\n const fileInput = document.getElementById('attachments');\r\n if (fileInput) {\r\n fileInput.value = '';\r\n }\r\n }\r\n\r\n\r\n}\r\n","import {inject} from 'aurelia-framework';\r\nimport {JwtService} from '../../shared/services/jwtservice';\r\nimport {DialogController} from 'aurelia-dialog';\r\nimport {DialogService} from 'aurelia-dialog';\r\nimport {SalaryRevisionService} from '../../shared/services/salaryrevisionservice';\r\nimport flatpickr from \"flatpickr\";\r\nimport {constants} from '../../shared/services/constants';\r\nimport {config} from '../../shared/services/config';\r\nimport * as XLSX from 'xlsx';\r\nimport {LeavemanagementService} from \"../../shared/services/leavemanagementservice\";\r\nimport { PromotionLetter } from './employeesalary/employeesalarycomponent';\r\nimport { Router } from 'aurelia-router';\r\n\r\n\r\n@inject(DialogController, JwtService, DialogService, SalaryRevisionService, LeavemanagementService,Router)\r\nexport class SalaryRevision {\r\n EmployeeSalaryRevisionList = [];\r\n FromDate = '';\r\n ToDate = '';\r\n isDropdownOpen = false;\r\n selectedStatus = 'ACT';\r\n defaultToDate;\r\n defaultFromDate;\r\n showEmployeeDropdown = false;\r\n FavoritesExist = false;\r\n sitemapId = constants.employeesalaryrevisionlistsitemapid;\r\n pageSize = config.grid_PazeSize;\r\n statusOptions = [\r\n {label: 'All', value: 'All', checked: false},\r\n {label: 'Pending submission', value: 'ACT', checked: true},\r\n {label: 'Pending approval', value: 'PEA', checked: true},\r\n {label: 'Need clarification', value: 'NED', checked: false},\r\n {label: 'Approved', value: 'APP', checked: false}\r\n ];\r\n\r\n constructor(controller, JwtService, DialogService, SalaryRevisionService, LeavemanagementService,router) {\r\n\r\n this.controller = controller;\r\n this.jwtService = JwtService;\r\n this.empid = this.jwtService.getEmployeeId();\r\n this.salaryrevisionService = SalaryRevisionService;\r\n this.leavemanagementService = LeavemanagementService;\r\n this.dialogService = DialogService;\r\n this.router = router;\r\n\r\n }\r\n\r\n attached() {\r\n \r\n \r\n this.LoginempId = window.localStorage['EmployeeID'];\r\n const fromDate = new Date();\r\n fromDate.setMonth(fromDate.getMonth() - 1);\r\n this.FDate = fromDate.toLocaleDateString().replace(/\\//g, '-');\r\n this.From = this.FDate;\r\n const toDate = new Date();\r\n toDate.setMonth(toDate.getMonth() + 1);\r\n this.TDate = toDate.toLocaleDateString().replace(/\\//g, '-');\r\n this.To = this.TDate;\r\n flatpickr(this.FromdatePicker, {\r\n closeOnSelect: true,\r\n dateFormat: 'd-m-Y',\r\n minDate: null,\r\n maxDate: null,\r\n defaultDate: fromDate,\r\n enableTime: false,\r\n enableSeconds: false,\r\n time_24hr: false,\r\n minuteIncrement: 1,\r\n hourIncrement: 1,\r\n timeFormat: 'h:i K',\r\n clickOpens: false,\r\n onClose: function (selectedDates, dateStr, instance) {\r\n this.FromDate = dateStr;\r\n }\r\n });\r\n this.FromcalendarIcon.addEventListener('click', () => {\r\n this.FromdatePicker._flatpickr.open();\r\n });\r\n flatpickr(this.TodatePicker, {\r\n closeOnSelect: true,\r\n dateFormat: 'd-m-Y',\r\n minDate: null,\r\n maxDate: null,\r\n defaultDate: toDate,\r\n enableTime: false,\r\n enableSeconds: false,\r\n time_24hr: false,\r\n minuteIncrement: 1,\r\n hourIncrement: 1,\r\n timeFormat: 'h:i K',\r\n clickOpens: false,\r\n onClose: function (selectedDates, dateStr, instance) {\r\n this.default = dateStr;\r\n }\r\n });\r\n this.TocalendarIcon.addEventListener('click', () => {\r\n this.TodatePicker._flatpickr.open();\r\n });\r\n this.leavemanagementService.GetPersonFavoriteItems(this.empid, this.sitemapId)\r\n .then(data => {\r\n this.FavoritesExist = data;\r\n });\r\n this.addToRecentItems();\r\n this.LoginempId = window.localStorage['EmployeeID'];\r\n this.salaryrevisionService.DepartmentDropdown(this.LoginempId, 'ACT')\r\n .then(data => {\r\n this.departments = data;\r\n });\r\n const selectedStatusList = this.statusOptions\r\n .filter(status => status.checked)\r\n .map(status => status.value);\r\n const listData = {\r\n FromDateText: this.From,\r\n ToDateText: this.To,\r\n Status: selectedStatusList.join(\",\"),\r\n EmployeeID: this.empid,\r\n }\r\n this.isLoading = true;\r\n this.salaryrevisionService.getEmployeeSalaryRevision(this.FromDateText,this.ToDateText,this.Status,this.EmployeeID)\r\n .then(data =>{\r\n this.EmployeeSalaryRevisionList = data; \r\n console.log(data); \r\n });\r\n\r\n this.salaryrevisionService.PostEmployeeSalaryRevision(listData)\r\n .then(data => {\r\n this.EmployeeSalaryRevisionList = data;\r\n this.isLoading = false;\r\n });\r\n\r\n this.salaryrevisionService.GetPersonFavoriteItems(this.LoginempId, this.sitemapId)\r\n .then(data => {\r\n this.FavoritesExist = data;\r\n });\r\n\r\n \r\n this.addToRecentItems();\r\n }\r\n\r\n filters = [\r\n {value: '', keys: ['EmployeeName', 'PositionlevelName', 'RevisionPeriod', 'NextRevisionDueDate']},\r\n ];\r\n\r\n addToFavourites() {\r\n this.salaryrevisionService.AddToFavourites(this.LoginempId, this.sitemapId).then(data => {\r\n this.FavoritesExist = data;\r\n window.location.reload();\r\n\r\n });\r\n }\r\n\r\n filterClick() {\r\n event.preventDefault();\r\n const clickedDiv = event.target.parentNode;\r\n clickedDiv.classList.toggle('filter-open');\r\n const divs = document.querySelectorAll('.filter-open');\r\n divs.forEach((div) => {\r\n if (div !== clickedDiv) {\r\n div.classList.remove('filter-open');\r\n }\r\n });\r\n const handleOutsideClick = (event) => {\r\n if (!clickedDiv.contains(event.target)) {\r\n divs.forEach((div) => {\r\n div.classList.remove('filter-open');\r\n });\r\n document.removeEventListener('click', handleOutsideClick);\r\n }\r\n };\r\n if (clickedDiv.classList.contains('filter-open')) {\r\n document.addEventListener('click', handleOutsideClick);\r\n } else {\r\n document.removeEventListener('click', handleOutsideClick);\r\n }\r\n }\r\n\r\n async displayEmployeess(event) {\r\n this.showEmployeeDropdown = true;\r\n const statusVal = event.target.value;\r\n this.salaryrevisionService.DepartmentDropdown(this.LoginempId, statusVal)\r\n .then(data => {\r\n this.departments = data;\r\n });\r\n\r\n }\r\n\r\n selectEmployees(empOptions) {\r\n const modifiedOption = {...empOptions, ID: empOptions.EmployeeID};\r\n this.eName = modifiedOption.EmployeeName;\r\n this.eNameID = modifiedOption.EmployeeID;\r\n this.showEmployeeDropdown = false;\r\n this.selectedEmployee = modifiedOption;\r\n const finalToDate = this.ToDate ? this.ToDate : this.defaultToDate;\r\n const finalFromDate = this.FromDate ? this.FromDate : this.defaultFromDate;\r\n const timeoff = {\r\n Fromdate: finalFromDate,\r\n Todate: finalToDate,\r\n EmployeeId: this.eNameID,\r\n };\r\n }\r\n\r\n ApproveShowDialog(SalaryRevisionID, EmployeeID) {\r\n const salaryData = {\r\n SalaryRevisionID: SalaryRevisionID,\r\n selectedEmployeeID: EmployeeID,\r\n };\r\n const queryString = new URLSearchParams(salaryData).toString();\r\n const salaryURL = `/#/employeesalary?${queryString}`;\r\n window.location.href = salaryURL;\r\n }\r\n\r\n Search() {\r\n const filterOpenElements = document.querySelectorAll('.filter-open');\r\n filterOpenElements.forEach(element => element.classList.remove('filter-open'));\r\n const selectedStatusLists = this.selectedStatuses.map(status => status.value);\r\n const selectedStatusList = this.statusOptions\r\n .filter(status => status.checked)\r\n .map(status => status.value);\r\n\r\n const finalToDate = this.ToDate ? this.ToDate : this.defaultToDate;\r\n const finalFromDate = this.FromDate ? this.FromDate : this.defaultFromDate;\r\n const selectedRadio = document.querySelector('input[name=\"employees\"]:checked');\r\n this.selectedValue = selectedRadio ? selectedRadio.value : '';\r\n const listData = {\r\n FromDateText: finalFromDate,\r\n ToDateText: finalToDate,\r\n EmployeeStatus: this.selectedValue,\r\n Status: selectedStatusList.includes('All') ? ['All'] : selectedStatusList.filter(status => status !== 'All').join(\",\"),\r\n DepartmentID: this.department,\r\n EmployeeID: this.empid,\r\n LoggedInEmployeeId: this.LoginempId,\r\n };\r\n //this.isLoading = true;\r\n\r\n this.salaryrevisionService.PostEmployeeSalaryRevision(listData)\r\n .then(data => {\r\n this.EmployeeSalaryRevisionList = data;\r\n\r\n });\r\n }\r\n\r\n selectAllChanged(event) {\r\n const isChecked = this.statusOptions[0].checked;\r\n this.statusOptions.forEach((status, index) => {\r\n if (index !== 0) {\r\n status.checked = isChecked;\r\n }\r\n });\r\n }\r\n\r\n handleCheckboxChange(event, status) {\r\n if (status.value === 'All') {\r\n this.statusOptions.forEach((statusOption, index) => {\r\n if (index !== 0) {\r\n statusOption.checked = false;\r\n }\r\n });\r\n } else {\r\n const allChecked = this.statusOptions.slice(1).every(statusOption => statusOption.checked);\r\n this.statusOptions[0].checked = allChecked;\r\n }\r\n\r\n //status.checked = event.target.checked;\r\n }\r\n\r\n resetDepartmentDropdown() {\r\n this.department = ''; // Reset the selected department to empty value\r\n }\r\n\r\n resetStatusDropdown() {\r\n this.statusOptions.forEach((status, index) => {\r\n if (index === 1 || index === 2) {\r\n status.checked = true; // Select 'Pending approval' and 'Pending with me'\r\n } else {\r\n status.checked = false; // Deselect other statuses\r\n }\r\n });\r\n // Update the selectedStatusList if needed\r\n this.selectedStatusList = this.statusOptions.filter(status => status.checked);\r\n }\r\n\r\n exportData() {\r\n const data = this.EmployeeSalaryRevisionList;\r\n const filename = 'EmployeeSalaryRevision';\r\n this.exportToExcel(data, filename);\r\n }\r\n\r\n exportToExcel(data, filename) {\r\n const headers = {\r\n Employeename: 'Employee name',\r\n Department: 'Department',\r\n Position: 'Position',\r\n Revisionperiod: 'Revision period',\r\n Revisionduedate: 'Revision due date',\r\n Status: 'Status',\r\n };\r\n const filteredData = data.map(revision => {\r\n return {\r\n Employeename: revision.EmployeeName,\r\n Department: revision.DepartmentName,\r\n Position: revision.PositionlevelName,\r\n Revisionperiod: revision.RevisionPeriod,\r\n Revisionduedate: revision.NextRevisionDueDate,\r\n Status: revision.StatusCode,\r\n\r\n };\r\n });\r\n const headerRow = Object.values(headers);\r\n const dataRows = filteredData.map(leave => Object.values(leave));\r\n const worksheet = XLSX.utils.aoa_to_sheet([headerRow, ...dataRows]);\r\n const workbook = XLSX.utils.book_new();\r\n XLSX.utils.book_append_sheet(workbook, worksheet, 'Sheet 1');\r\n XLSX.writeFile(workbook, `${filename}.xlsx`);\r\n }\r\n\r\n // addToFavourites() {\r\n // this.leavemanagementService.AddToFavourites(this.empid, this.sitemapId).then(data => {\r\n // window.location.reload();\r\n // });\r\n // }\r\n\r\n addToRecentItems() {\r\n this.leavemanagementService.AddToRecentItems(this.empid, this.sitemapId).then(data => {\r\n\r\n });\r\n }\r\n\r\n resetPage() {\r\n this.attached();\r\n this.selectedStatus = 'ACT';\r\n }\r\n\r\n Reset() {\r\n this.attached();\r\n }\r\n\r\n get selectedStatuses() {\r\n\r\n return this.statusOptions\r\n .filter(status => status.checked);\r\n\r\n }\r\n\r\n removeFilter(Allstatus, status) {\r\n if (status.label === 'All') {\r\n this.statusOptions.forEach(option => {\r\n option.checked = false;\r\n });\r\n } else {\r\n status.checked = false;\r\n }\r\n }\r\n\r\n // showDialog(){\r\n // this.dialogService.open({viewModel: PromotionLetter, model: \"\"});\r\n // }\r\n\r\n ViewSalaryRevision(){\r\n this.router.navigate('employeesalary');\r\n }\r\n\r\n ViewEmployeeSalary(ActionName,SalaryRevisionID) {\r\n const approveData = {\r\n ActionName: ActionName,\r\n SalaryRevisionID:SalaryRevisionID\r\n };\r\n const queryString = new URLSearchParams(approveData).toString();\r\n const performancereviewURL = `/#/employeesalary?${queryString}`;\r\n window.location.href = performancereviewURL;\r\n }\r\n}\r\n","// Imports\nimport ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \"../../../node_modules/html-loader/dist/runtime/getUrl.js\";\nvar ___HTML_LOADER_IMPORT_0___ = new URL(\"../../images/loader.gif\", import.meta.url);\n// Module\nvar ___HTML_LOADER_REPLACEMENT_0___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_0___);\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Imports\nimport ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \"../../../node_modules/html-loader/dist/runtime/getUrl.js\";\nvar ___HTML_LOADER_IMPORT_0___ = new URL(\"../../images/resignation-icon.svg\", import.meta.url);\nvar ___HTML_LOADER_IMPORT_1___ = new URL(\"../../images/datepicker.svg\", import.meta.url);\nvar ___HTML_LOADER_IMPORT_2___ = new URL(\"../../images/view-icon.svg\", import.meta.url);\n// Module\nvar ___HTML_LOADER_REPLACEMENT_0___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_0___);\nvar ___HTML_LOADER_REPLACEMENT_1___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_1___);\nvar ___HTML_LOADER_REPLACEMENT_2___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_2___);\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Imports\nimport ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \"../../../node_modules/html-loader/dist/runtime/getUrl.js\";\nvar ___HTML_LOADER_IMPORT_0___ = new URL(\"../../images/resignation-icon.svg\", import.meta.url);\nvar ___HTML_LOADER_IMPORT_1___ = new URL(\"../../images/loader.gif\", import.meta.url);\nvar ___HTML_LOADER_IMPORT_2___ = new URL(\"../../images/datepicker.svg\", import.meta.url);\n// Module\nvar ___HTML_LOADER_REPLACEMENT_0___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_0___);\nvar ___HTML_LOADER_REPLACEMENT_1___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_1___);\nvar ___HTML_LOADER_REPLACEMENT_2___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_2___);\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Imports\nimport ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \"../../../../node_modules/html-loader/dist/runtime/getUrl.js\";\nvar ___HTML_LOADER_IMPORT_0___ = new URL(\"../../../images/salary-icon.svg\", import.meta.url);\nvar ___HTML_LOADER_IMPORT_1___ = new URL(\"../../../images/trophy.svg\", import.meta.url);\nvar ___HTML_LOADER_IMPORT_2___ = new URL(\"../../../images/gift.svg\", import.meta.url);\n// Module\nvar ___HTML_LOADER_REPLACEMENT_0___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_0___);\nvar ___HTML_LOADER_REPLACEMENT_1___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_1___);\nvar ___HTML_LOADER_REPLACEMENT_2___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_2___);\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Imports\nimport ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \"../../../../node_modules/html-loader/dist/runtime/getUrl.js\";\nvar ___HTML_LOADER_IMPORT_0___ = new URL(\"../../../images/salary-icon.svg\", import.meta.url);\n// Module\nvar ___HTML_LOADER_REPLACEMENT_0___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_0___);\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Imports\nimport ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \"../../../node_modules/html-loader/dist/runtime/getUrl.js\";\nvar ___HTML_LOADER_IMPORT_0___ = new URL(\"../../images/loader.gif\", import.meta.url);\nvar ___HTML_LOADER_IMPORT_1___ = new URL(\"../../images/salary-icon.svg\", import.meta.url);\nvar ___HTML_LOADER_IMPORT_2___ = new URL(\"../../images/favourite.svg\", import.meta.url);\nvar ___HTML_LOADER_IMPORT_3___ = new URL(\"../../images/leave-calendar-days.svg\", import.meta.url);\n// Module\nvar ___HTML_LOADER_REPLACEMENT_0___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_0___);\nvar ___HTML_LOADER_REPLACEMENT_1___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_1___);\nvar ___HTML_LOADER_REPLACEMENT_2___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_2___);\nvar ___HTML_LOADER_REPLACEMENT_3___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_3___);\nvar code = \"\\r\\n\";\n// Exports\nexport default code;"],"names":[],"sourceRoot":""}