{"version":3,"file":"app-46dd862c.d152cf98c45d962fa693.bundle.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AAIA;AACA;;AAiBA;AAAA;AApBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAkDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAUA;AACA;AACA;AACA;AACA;;AAEA;AACA;AAEA;AAEA;AACA;;AAEA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;;AAEA;AAEA;AACA;AACA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAAA;AAAA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAGA;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;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;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;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;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;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;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AAEA;AAEA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAGA;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;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;;AAEA;AAEA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AAEA;AAEA;AAAA;AAAA;AAAA;AACA;AAEA;AAEA;AAAA;AAAA;AAAA;AACA;AAEA;AAEA;AAAA;AAAA;AAAA;AACA;AAIA;AAEA;AAEA;AACA;AAEA;AACA;AAEA;AAEA;;;;;;;;;;;;;;;;;;;;;;;AC5jBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAGA;AAAA;AAUA;AACA;AACA;AACA;AACA;AACA;AAdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAGA;AACA;AAEA;AACA;AAEA;AAEA;AACA;AACA;AACA;AAAA;AAAA;AAAA;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;AAEA;AACA;AAAA;AAAA;AAAA;AAKA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;;;;;;;;;;;;;;;;;;;;;;;ACtGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAGA;AAAA;AAUA;AACA;AACA;AACA;AACA;AAbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AAEA;AAEA;;AAEA;AAEA;AAEA;;AAEA;AAEA;AACA;AACA;AAIA;;;;;;;;;;;;;;;;;;ACxEA;AACA;AACA;AAKA;AAIA;AAAA;AAMA;AACA;AACA;AA+BA;AAAA;AAAA;AAtCA;AACA;AAEA;AAQA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AAEA;;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAOA;;;;;;;;;;;;;;;;;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAOA;AAAA;AALA;AACA;AACA;AACA;AAWA;AA+CA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAGA;AACA;AACA;AACA;AApEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AACA;AACA;AACA;AACA;AACA;AAAA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAkBA;;;;;;;;;;;;;;;;;;ACvFA;AACA;AACA;AAKA;AAKA;AAAA;AAMA;AACA;AACA;AA4BA;AAAA;AAAA;AAnCA;AACA;AAEA;AAQA;AAEA;AACA;AACA;AAEA;AACA;AAEA;AAEA;;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAMA;;;;;;;;;;;;;;;;;;;;;;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAGA;AAAA;AAUA;AACA;AACA;AACA;AACA;AAbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;;;;;;;;;;;;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACPA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA","sources":["webpack://HRMSPortal/./src/components/appreciation/appreciationcomponent.js","webpack://HRMSPortal/./src/components/appreciation/appreciationsprovidedbymecomponent.js","webpack://HRMSPortal/./src/components/appreciation/myappreciationcomponent.js","webpack://HRMSPortal/./src/components/appreciation/showpoints/showpointscomponent.js","webpack://HRMSPortal/./src/components/appreciation/showprofile/showprofilecomponent.js","webpack://HRMSPortal/./src/components/appreciation/showtopperformancedetails/showdetailscomponent.js","webpack://HRMSPortal/./src/components/appreciation/topperformancepreviewcomponent.js","webpack://HRMSPortal/./src/components/appreciation/appreciationcomponent.html","webpack://HRMSPortal/./src/components/appreciation/appreciationsprovidedbymecomponent.html","webpack://HRMSPortal/./src/components/appreciation/myappreciationcomponent.html","webpack://HRMSPortal/./src/components/appreciation/showpoints/showpointscomponent.html","webpack://HRMSPortal/./src/components/appreciation/showprofile/showprofilecomponent.html","webpack://HRMSPortal/./src/components/appreciation/showtopperformancedetails/showdetailscomponent.html","webpack://HRMSPortal/./src/components/appreciation/topperformancepreviewcomponent.html"],"sourcesContent":["import {inject } from 'aurelia-framework';\r\nimport {HttpClient, json} from 'aurelia-fetch-client';\r\nimport {Router,activationStrategy} from 'aurelia-router';\r\nimport { AppreciationService } from '../../shared/services/appreciationservice';\r\nimport {SharedState} from '../../shared/state/sharedstate';\r\nimport {config} from '../../shared/services/config';\r\nimport {ValidationControllerFactory, ValidationRules} from 'aurelia-validation';\r\nimport { DialogService } from 'aurelia-dialog';\r\nimport { ShowDetailsComponent } from './showtopperformancedetails/showdetailscomponent';\r\nimport { ShowProfileComponent } from './showprofile/showprofilecomponent';\r\nimport { ShowPointsComponent } from './showpoints/showpointscomponent';\r\nimport $ from 'jquery'; \r\nimport slick from 'slick-carousel';\r\nimport { ShowPopup } from '../alertpopup/showpopup';\r\nimport {LoginService} from \"../../shared/services/loginservice\";\r\nimport {JwtService} from \"../../shared/services/jwtservice\";\r\n\r\n\r\n@inject(AppreciationService, SharedState, Router, HttpClient, Element, ValidationControllerFactory,DialogService,LoginService,JwtService)\r\nexport class Appreciation {\r\n selectedAppreciationType;\r\n showsearchEmpDropdown = false;\r\n pageSize = 5; //Appreciations Given\r\n pageSize1=5; //Appreciations Received\r\n Feedback='';\r\n CategoryID='';\r\n selectedCategory='';\r\n AppreciationCategoryConfigID='';\r\n selectedCategoryId;\r\n CategoryIDArray=[];\r\n selectedEmployeeName = '';\r\n selectedsearchEmployee = [];\r\n selectedsearchEmployeeName = [];\r\n selectedRadio = '1';\r\n selectedEmployees = [];\r\n EmployeeListIDs = [];\r\n showEmpDropdown = false;\r\n notifyemails = [];\r\n dropdownOptions = [];\r\n isFormSubmitted = false;\r\n constructor(appreciationService, sharedState, router, httpClient, element, controllerFactory,dialogService,loginservice,JwtService) {\r\n this.appreciationService = appreciationService;\r\n this.sharedState = sharedState;\r\n this.router = router;\r\n this.httpClient = httpClient;\r\n this.element = element;\r\n this.dialogService = dialogService;\r\n this.controllerFactory = controllerFactory.createForCurrentScope();\r\n this.searchQuery = '';\r\n this.searchText = '';\r\n this.dropdownOptions = [];\r\n this.dropdownsearchOptions = [];\r\n this.selectedEmployees = [];\r\n this.selectedEmployee = null;\r\n this.filterEmpOption = '';\r\n this.ShowDetails = [];\r\n this.selectedEmployees = [];\r\n this.selectedCategory = null;\r\n this.loginservice = loginservice;\r\n this.jwtService = JwtService;\r\n ValidationRules\r\n .ensure('Feedback').required().withMessage('Feedback field is required.')\r\n .ensure('searchText')\r\n .required()\r\n .withMessage('Employee name is required')\r\n .ensure('selectedCategory')\r\n .required()\r\n .withMessage('Please select atleast one appreciation category.')\r\n .on(this);\r\n }\r\n validateEmails() {\r\n if (this.emails && this.emails.trim() !== '') {\r\n const emails = this.emails.split(',');\r\n const emailRegex = /^[^\\s@]+@[^\\s@]+\\.(com|co|in|org|cc|net)$/;\r\n const invalidEmails = [];\r\n for (const email of emails) {\r\n const trimmedEmail = email.trim();\r\n if (!emailRegex.test(trimmedEmail)) {\r\n invalidEmails.push(trimmedEmail);\r\n }\r\n }\r\n if (invalidEmails.length > 0 || (emails.length > 1 && this.emails.indexOf(',') === -1)) {\r\n this.specifyemailerror = 'Invalid email address and Email(s) should be separated by commas';\r\n return false;\r\n }\r\n }\r\n this.specifyemailerror = '';\r\n return true;\r\n }\r\n getAppreciations=[]; //Appreciation type\r\n MyAppreciationSummay=[];\r\n AppreciationsProvidedList=[]; //Total Appreciations Given\r\n AppreciationDetails=[]; // Total Appreciations Received\r\n TopPerformancePreviewDetails=[];\r\n previousYear = this.getPreviousYear();\r\n configimgurl=config.img_url;\r\n Configurl=config.api_img_url;\r\n\r\n attached(){\r\n // if(this.jwtService.getToken() === undefined){\r\n // this.loginservice.purgeAuth();\r\n // this.router.navigateToRoute('login')\r\n // }\r\n\r\n // Get Total Appreciations Given\r\n this.LoginempId=window.localStorage['EmployeeID'];\r\n \r\n this.appreciationService.GetAppreciationsProvidedList(this.LoginempId)\r\n .then(AppreciationsProvidedList =>{\r\n this.AppreciationsProvidedList = AppreciationsProvidedList; \r\n });\r\n\r\n // Get Total Appreciations Received\r\n this.appreciationService.getMyAppreciationDetails(this.LoginempId,this.previousYear)\r\n .then(AppreciationDetails =>{\r\n this.AppreciationDetails = AppreciationDetails; \r\n this.selectedCategoryDetails=this.AppreciationDetails;\r\n });\r\n this.appreciationService.getMyAppreciationSummary(this.LoginempId,this.previousYear)\r\n .then(MyAppreciationSummay =>{\r\n this.MyAppreciationSummay = MyAppreciationSummay.EmployeeAppreciationModelList; \r\n });\r\n //Top performance preview\r\n this.appreciationService.GetTopPerformanceList(this.previousYear)\r\n .then(reviewDetails =>{\r\n this.TopPerformancePreviewDetails = reviewDetails.EmployeeAppreciationModelList; \r\n });\r\n //Appreciation types\r\n\r\n this.appreciationService.GetAppreciations()\r\n .then(getAppreciations => {\r\n this.getAppreciations=getAppreciations;\r\n // console.log(getAppreciations);\r\n })\r\n setTimeout(()=>{\r\n const tabTriggerBtns = document.querySelectorAll('.appreciation-type ul li');\r\n tabTriggerBtns.forEach(function(tabTriggerBtn, index){\r\n tabTriggerBtn.addEventListener('click', function(){\r\n const currentTabData = document.querySelector('.appreciation-tab-content[data-tab-content=\"' + this.dataset.tabTrigger + '\"]');\r\n document.querySelector('.appreciation-tab-content.is-active').classList.remove('is-active');\r\n document.querySelector('.appreciation-type ul li.active').classList.remove('active');\r\n currentTabData.classList.add('is-active');\r\n this.classList.add('active');\r\n });\r\n });\r\n\r\n $('.performance-slider').slick({\r\n dots: false, \r\n infinite: false, \r\n arrows: true, \r\n slidesToShow: 5,\r\n slidesToScroll: 1,\r\n responsive: [\r\n {\r\n breakpoint: 1200,\r\n settings: {\r\n slidesToShow: 3,\r\n }\r\n },\r\n {\r\n breakpoint: 1024,\r\n settings: {\r\n slidesToShow: 4,\r\n }\r\n },\r\n {\r\n breakpoint: 767,\r\n settings: {\r\n slidesToShow: 3,\r\n }\r\n },\r\n {\r\n breakpoint: 666,\r\n settings: {\r\n slidesToShow: 1,\r\n }\r\n }\r\n ]\r\n })\r\n },5000)\r\n }\r\n onToggleClick() {\r\n event.preventDefault();\r\n const parentTr = event.target.closest('tr');\r\n if (parentTr) {\r\n parentTr.classList.toggle('open-comment');\r\n }\r\n }\r\n getPreviousYear() {\r\n const myDate = new Date();\r\n myDate.setFullYear(myDate.getFullYear()-1 ); // -1\r\n return myDate.getFullYear();\r\n }\r\n async onsearchEmployeeSelected() {\r\n this.selectedCategoryErrors=[];\r\n const trimmedSearchText = this.searchText.trim(); // Remove leading and trailing spaces\r\n this.searchedtext = this.searchText;\r\n if (trimmedSearchText.length > 0) {\r\n // Non-empty input, proceed to open the dropdown and perform filtering\r\n this.showsearchEmpDropdown = true;\r\n this.noEmployeeFoundMessage = null;\r\n try {\r\n const response = await this.appreciationService.GetEmployeeNames(this.searchedtext);\r\n const data = await response;\r\n const filterOption = trimmedSearchText.toLowerCase();\r\n this.dropdownsearchOptions = data.filter(options => options.EmployeeName.toLowerCase().includes(filterOption));\r\n\r\n // Assuming this.LoginempId is a string, convert it to a number\r\n const loginEmpId = parseInt(this.LoginempId, 10);\r\n\r\n this.dropdownsearchOptions = this.dropdownsearchOptions.filter(option => option.EmployeeID !== loginEmpId);\r\n\r\n if (this.dropdownsearchOptions.length === 0) {\r\n this.noEmployeeFoundMessage = \"No records found\";\r\n }else {\r\n this.noEmployeeFoundMessage = \"\";\r\n }\r\n } catch (error) {\r\n //console.error(error);\r\n }\r\n } else {\r\n this.showsearchEmpDropdown = false;\r\n this.dropdownsearchOptions = [];\r\n this.noEmployeeFoundMessage = null;\r\n \r\n }\r\n }\r\n selectsearchEmployee(EmpOption) {\r\n const modifiedOption = { ...EmpOption, ID: EmpOption.EmployeeID };\r\n this.searchText = modifiedOption.EmployeeName;\r\n this.showsearchEmpDropdown = false;\r\n this.selectedsearchEmployee = modifiedOption;\r\n this.selectedsearchEmployeeName=this.searchText;\r\n\r\n }\r\n async toggleNotifyFields(checked) {\r\n this.showNotifyFields = checked;\r\n this. selectedRadio = '1';\r\n }\r\n onEmailSelected() {\r\n this.selectedRadio = '2';\r\n this.searchQuery = '';\r\n this.employenameerror = '';\r\n this.employenameerror = '';\r\n }\r\n async onEmployeeSelected() {\r\n this.selectedRadio = '1';\r\n this.emails = '';\r\n this.specifyemailerror = '';\r\n if (this.searchQuery) {\r\n this.showEmpDropdown = true;\r\n\r\n try {\r\n const response = await this.appreciationService.GetEmployeeNames(this.searchQuery);\r\n const data = await response;\r\n const filterOption = this.searchQuery.toLowerCase();\r\n this.dropdownOptions = data.filter(option => option.EmployeeName.toLowerCase().includes(filterOption));\r\n this.empid = this.jwtService.getEmployeeId(); // Assuming this.empid is a string\r\n this.dropdownOptions = this.dropdownOptions.filter(option => option.EmployeeID !== parseInt(this.empid, 10));\r\n if (this.dropdownOptions.length === 0) {\r\n const errorInfo = {\r\n error: {\r\n message: \"No records found\"\r\n }\r\n };\r\n this.NameError = [errorInfo];\r\n } else {\r\n this.NameError = [];\r\n }\r\n } catch (error) {\r\n }\r\n } else {\r\n this.showEmpDropdown = false;\r\n this.dropdownOptions = [];\r\n \r\n \r\n }\r\n }\r\n selectEmployee(EmpOption) {\r\n const modifiedOption = {\r\n ...EmpOption,\r\n ID: EmpOption.EmployeeID\r\n };\r\n this.searchQuery = modifiedOption.EmployeeName;\r\n this.showEmpDropdown = false;\r\n this.selectedEmployee = modifiedOption;\r\n return false;\r\n }\r\n addToSelectedOptions(id) {\r\n // this.NameError=null;\r\n // if (this.selectedEmployee===null) {\r\n // this.dialogService.open({viewModel: ShowPopup, model:\"\"});\r\n // //alert(\"Please select valid employee.\");\r\n // }\r\n let emails = this.emails || '';\r\n if (this.selectedRadio === '1') {\r\n if (!this.searchQuery || this.searchQuery.trim() === '') {\r\n this.employenameerror = \"Employee name is required\";\r\n return;\r\n }\r\n else if (this.selectedEmployee===null) {\r\n this.employenameerror=null;\r\n this.dialogService.open({viewModel: ShowPopup, model:\"\"});\r\n //alert(\"Please select valid employee.\");\r\n }\r\n this.appreciationService.GetEmployeeNamesForGrid(id).then(data => {\r\n this.Ids = data.EmployeeID;\r\n this.empmail = data.EmailID;\r\n this.EName = data.EmployeeName;\r\n let employeeemail = {\r\n EmailIds: this.empmail,\r\n PersonID: this.Ids,\r\n EmployeeName: this.EName,\r\n };\r\n const existingEmployee = this.selectedEmployees.find(emp => emp.PersonID === id);\r\n if (existingEmployee) {\r\n this.employenameerror = \"Employee name already exists\";\r\n return;\r\n }\r\n this.EmployeeListIDs.push(employeeemail);\r\n this.selectedEmployees.push(employeeemail);\r\n this.searchQuery = '';\r\n this.employenameerror = '';\r\n });\r\n } else if (this.selectedRadio === '2') {\r\n if (this.validateEmails()) {\r\n // Check if the email already exists\r\n const existingEmail = this.selectedEmployees.find(emp => emp.EmailIds === emails);\r\n if (existingEmail) {\r\n this.specifyemailerror = \"Email id already exists\";\r\n return;\r\n }\r\n if (emails.trim() !== '') {\r\n const emailEntry = {\r\n PersonID: -1,\r\n EmailIds: emails\r\n };\r\n this.newmail = emailEntry;\r\n this.notifyemails.push(this.newmail);\r\n this.EmployeeListIDs.push(...this.notifyemails);\r\n this.selectedEmployees.push(emailEntry);\r\n this.emails = '';\r\n } else {\r\n this.specifyemailerror = \"Specify email is required\";\r\n return;\r\n }\r\n this.employenameerror = '';\r\n this.specifyemailerror = '';\r\n this.validatemessage = '';\r\n }\r\n }\r\n }\r\n\r\n deleteEmployee(emp) {\r\n const index = this.selectedEmployees.indexOf(emp);\r\n if (index !== -1) {\r\n this.selectedEmployees.splice(index, 1);\r\n this.EmployeeListIDs.splice(index, 1);\r\n }\r\n const deletedIds = emp.EmployeeID;\r\n this.EmployeeListIDs = this.EmployeeListIDs.filter(id => id !== deletedIds);\r\n this.Ids = this.EmployeeListIDs;\r\n }\r\n\r\n Submit() {\r\n this.controllerFactory.validate()\r\n .then(result => {\r\n if (result.valid) {\r\n console.log(this.catid)\r\n if(this.catid === undefined || this.catid === null)\r\n {\r\n this.catagoryerror = 'Please select appreciation type';\r\n const errorElement = document.querySelector(\".error-messages\");\r\n if (errorElement) {\r\n errorElement.scrollIntoView();\r\n }\r\n }else{\r\n\r\n if( this.notifyind === true && this.EmployeeListIDs.length === 0 && this.notifyemails.length === 0) {\r\n this.validatemessage = \"Atleast one peer is required\";\r\n const errorElement = document.querySelector(\".error-messages\");\r\n if (errorElement) {\r\n errorElement.scrollIntoView();\r\n }\r\n }else {\r\n this.validatemessage = \"\";\r\n let data = {};\r\n data.ReceivedEmployeeID = this.selectedsearchEmployee.EmployeeID;\r\n data.Feedback = this.Feedback;\r\n data.ProvidedEmployeeID = this.LoginempId;\r\n data.CategoryID = this.catid;\r\n data.NotifyEmployeeList = this.EmployeeListIDs;\r\n data.NotifyPeersIND = this.notifyind;\r\n data.MessageToPeers = this.comments;\r\n this.isFormSubmitted = true;\r\n this.appreciationService.SaveAppreciation(data)\r\n .then(() => {\r\n this.successMessage = 'Appreciation submitted successfully';\r\n setTimeout(() => {\r\n this.successMessage = null;\r\n }, 5000);\r\n const errorElement = document.querySelector(\".success-message\");\r\n if (errorElement) {\r\n errorElement.scrollIntoView();\r\n }\r\n this.selectedEmployee = null;\r\n this.searchQuery = null;\r\n this.searchText = null;\r\n this.CategoryID = null;\r\n this.Feedback = '';\r\n this.errorMessage = '';\r\n this.selectedCategory = null;\r\n this.EmployeeListIDs = [];\r\n this.notifyind = '';\r\n this.selectedEmployees = [];\r\n this.notifyemails = [];\r\n this.searchQuery = '';\r\n this.employenameerror = '';\r\n this.showNotifyFields = false;\r\n this.comments = '';\r\n this.catagoryerror = '';\r\n this.validatemessage = '';\r\n this.selectedCategory = '';\r\n this.appreciationtype='';\r\n this.catid =null;\r\n this.isFormSubmitted = false;\r\n\r\n const liElements = document.querySelectorAll('.appreciation-type li');\r\n const activeLi = document.querySelector('.appreciation-type li.active');\r\n if (activeLi) {\r\n activeLi.classList.remove('active');\r\n liElements[0].classList.remove('active'); //add instaed of remove after click on reset active move to first\r\n }\r\n \r\n const tabContentElements = document.querySelectorAll('.appreciation-tab-content');\r\n const activeTabContent = document.querySelector('.appreciation-tab-content.is-active');\r\n if (activeTabContent) {\r\n activeTabContent.classList.remove('is-active');\r\n tabContentElements[0].classList.remove('is-active'); //add instaed of remove after click on reset active move to first\r\n }\r\n\r\n this.LoginempId = window.localStorage['EmployeeID'];\r\n\r\n this.appreciationService.GetAppreciationsProvidedList(this.LoginempId)\r\n .then(AppreciationsProvidedList => {\r\n this.AppreciationsProvidedList = AppreciationsProvidedList;\r\n });\r\n\r\n })\r\n .catch((error) => {\r\n this.successMessage = '';\r\n this.errorMessage = 'Error submitting appreciation: ' + error;\r\n const errorElement = document.querySelector(\".error-messages\");\r\n if (errorElement) {\r\n errorElement.scrollIntoView();\r\n }\r\n });\r\n }\r\n }\r\n }else {\r\n const errorElement = document.querySelector(\".error-messages\");\r\n if (errorElement) {\r\n errorElement.classList.add(\"scroll-to-error\");\r\n errorElement.scrollIntoView({ behavior: \"auto\" });\r\n }\r\n }\r\n });\r\n \r\n\r\n }\r\n\r\n ResetForm(){\r\n this.selectedEmployee = null;\r\n this.searchQuery = null;\r\n this.searchText = null;\r\n this.CategoryID = null;\r\n this.Feedback = null;\r\n this.errorMessage = '';\r\n this.selectedCategory = null;\r\n this.EmployeeListIDs = [];\r\n this.notifyind = '';\r\n this.selectedEmployees = [];\r\n this.notifyemails = [];\r\n this.searchQuery = '';\r\n this.employenameerror = '';\r\n this.showNotifyFields = false;\r\n this.comments = '';\r\n //this.NameError='';\r\n this.employenameerror = '';\r\n this.specifyemailerror='';\r\n this.searchTextError = [];\r\n this.FeedbackErrors = [];\r\n this.NameError=null;\r\n this.showEmpDropdown=null;\r\n this.noEmployeeFoundMessage='';\r\n this.catagoryerror = '';\r\n this.validatemessage = '';\r\n this.catid =null;\r\n\r\n const liElements = document.querySelectorAll('.appreciation-type li');\r\n const activeLi = document.querySelector('.appreciation-type li.active');\r\n if (activeLi) {\r\n activeLi.classList.remove('active');\r\n liElements[0].classList.remove('active'); //add instaed of remove after click on reset active move to first\r\n }\r\n\r\n const tabContentElements = document.querySelectorAll('.appreciation-tab-content');\r\n const activeTabContent = document.querySelector('.appreciation-tab-content.is-active');\r\n if (activeTabContent) {\r\n activeTabContent.classList.remove('is-active');\r\n tabContentElements[0].classList.remove('is-active'); //add instaed of remove after click on reset active move to first\r\n }\r\n\r\n }\r\n\r\n handleClick(appreciationtype) {\r\n\r\n const selectedCategoryId = appreciationtype.AppreciationCategoryConfigID;\r\n const listItems = document.querySelectorAll('.appreciation-type li');\r\n listItems.forEach((item) => {\r\n item.classList.remove('active');\r\n this.catagoryerror='';\r\n \r\n });\r\n \r\n const selectedListItem = document.querySelector(`[data-tab-trigger=\"${appreciationtype.AppreciationCategoryConfigID}\"]`);\r\n selectedListItem.classList.add('active');\r\n const appreciationContents = document.querySelectorAll('.appreciation-tab-content');\r\n appreciationContents.forEach((content) => {\r\n content.classList.remove('is-active');\r\n });\r\n \r\n const selectedContent = document.querySelector(`[data-tab-content=\"${appreciationtype.AppreciationCategoryConfigID}\"]`);\r\n selectedContent.classList.add('is-active');\r\n \r\n this.Tabdata={\r\n categoryId:selectedCategoryId,\r\n \r\n };\r\n this.catid = this.Tabdata.categoryId;\r\n \r\n }\r\n \r\n showPopupGrid(performance) {\r\n \r\n this.dialogService.open({viewModel: ShowDetailsComponent, model: performance});\r\n }\r\n\r\n showProfile(performance){\r\n \r\n this.dialogService.open({viewModel: ShowProfileComponent, model: performance})\r\n }\r\n\r\n showScore(performance)\r\n {\r\n this.dialogService.open({viewModel: ShowPointsComponent, model: performance})\r\n }\r\n \r\n selectedCategoryDetails = [];\r\n\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 }\r\n","import {inject } from 'aurelia-framework';\r\nimport {HttpClient, json} from 'aurelia-fetch-client';\r\nimport {Router,activationStrategy} from 'aurelia-router';\r\nimport { AppreciationService } from '../../shared/services/appreciationservice';\r\nimport {SharedState} from '../../shared/state/sharedstate';\r\nimport {config} from '../../shared/services/config';\r\nimport {LoginService} from \"../../shared/services/loginservice\";\r\nimport {JwtService} from \"../../shared/services/jwtservice\";\r\n\r\n@inject(AppreciationService, SharedState, Router, HttpClient,LoginService,JwtService, Element)\r\nexport class AppreciationsProvidedByMe{\r\n\r\n constructor(appreciationService, sharedState, router, httpClient,JwtService,loginservice, element) {\r\n this.appreciationService = appreciationService;\r\n this.sharedState = sharedState;\r\n this.router = router;\r\n this.httpClient = httpClient;\r\n this.element = element;\r\n this.loginservice = loginservice;\r\n this.jwtService = JwtService;\r\n }\r\n \r\n AppreciationsProvidedList=[];\r\n pageNumber = 1;\r\n itemsPerPage = 5;\r\n totalItems=0;\r\n displayedItems = [];\r\n startIndex;\r\n endIndex;\r\n \r\n attached() {\r\n this.updateDisplayedItems();\r\n // if(this.jwtService.getToken() === undefined){\r\n // this.loginservice.purgeAuth();\r\n // this.router.navigateToRoute('login')\r\n // }\r\n this.LoginempId=window.localStorage['EmployeeID'];\r\n this.appreciationService.GetAppreciationsProvidedList(this.LoginempId)\r\n .then(AppreciationsProvidedList =>{\r\n this.AppreciationsProvidedList = AppreciationsProvidedList;\r\n this.totalItems = AppreciationsProvidedList.length;\r\n\r\n\r\n });\r\n }\r\n \r\n getTotalPages() {\r\n return Math.ceil(this.totalItems / this.itemsPerPage);\r\n \r\n }\r\n \r\n getPageRange(pageNumber, itemsPerPage, totalItems) {\r\n const startIndex = (pageNumber - 1) * itemsPerPage + 1;\r\n const endIndex = Math.min(startIndex + itemsPerPage - 1, totalItems);\r\n return { startIndex, endIndex };\r\n }\r\n \r\n goToFirstPage() {\r\n if (this.pageNumber > 1) {\r\n this.pageNumber = 1;\r\n this.updateDisplayedItems();\r\n }\r\n }\r\n \r\n goToPreviousPage() {\r\n if (this.pageNumber > 1) {\r\n this.pageNumber--;\r\n this.updateDisplayedItems();\r\n }\r\n }\r\n \r\n goToNextPage() {\r\n if (this.pageNumber < this.getTotalPages()) {\r\n this.pageNumber++;\r\n this.updateDisplayedItems();\r\n }\r\n }\r\n \r\n goToLastPage() {\r\n if (this.pageNumber < this.getTotalPages()) {\r\n this.pageNumber = this.getTotalPages();\r\n this.updateDisplayedItems();\r\n }\r\n }\r\n \r\n updateDisplayedItems() {\r\n const { startIndex, endIndex } = this.getPageRange(\r\n this.pageNumber,\r\n this.itemsPerPage,\r\n this.totalItems\r\n );\r\n this.startIndex = startIndex;\r\n this.endIndex = endIndex;\r\n this.displayedItems = this.getItemsForCurrentPage();\r\n }\r\n \r\n getItemsForCurrentPage() {\r\n const start = (this.pageNumber - 1) * this.itemsPerPage;\r\n const end = start + this.itemsPerPage;\r\n return this.AppreciationsProvidedList.slice(start, end);\r\n }\r\n\r\n}","import {inject } from 'aurelia-framework';\r\nimport {HttpClient, json} from 'aurelia-fetch-client';\r\nimport {Router,activationStrategy} from 'aurelia-router';\r\nimport { AppreciationService } from '../../shared/services/appreciationservice';\r\nimport {SharedState} from '../../shared/state/sharedstate';\r\nimport {config} from '../../shared/services/config';\r\nimport {LoginService} from \"../../shared/services/loginservice\";\r\nimport {JwtService} from \"../../shared/services/jwtservice\";\r\n\r\n@inject(AppreciationService, SharedState, Router, HttpClient,LoginService,JwtService, Element)\r\nexport class MyAppreciation{\r\n\r\n constructor(appreciationService, sharedState, router, httpClient,loginservice,JwtService, element) {\r\n this.appreciationService = appreciationService;\r\n this.sharedState = sharedState;\r\n this.router = router;\r\n this.httpClient = httpClient;\r\n this.element = element;\r\n this.loginservice = loginservice;\r\n this.jwtService = JwtService;\r\n }\r\n \r\n previousYear = this.getPreviousYear();\r\n AppreciationYearList=[];\r\n selectedYear=this.previousYear;\r\n LoginempId='';\r\n AppreciationDetails=[];\r\n \r\n configurl=config.img_url;\r\n\r\n attached(){\r\n // if(this.jwtService.getToken() === undefined){\r\n // this.loginservice.purgeAuth();\r\n // this.router.navigateToRoute('login')\r\n // }\r\n this.LoginempId=window.localStorage['EmployeeID'];\r\n this.appreciationService.GetAppreciationYearList(this.LoginempId)\r\n .then(AppreciationYearList =>{\r\n this.AppreciationYearList = AppreciationYearList; \r\n });\r\n this.appreciationService.getMyAppreciationDetails(this.LoginempId, this.previousYear)\r\n .then(AppreciationDetails =>{\r\n this.AppreciationDetails = AppreciationDetails; \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 Search(){\r\n \r\n this.appreciationService.getMyAppreciationDetails(this.LoginempId, this.selectedYear)\r\n .then(AppreciationDetails =>{\r\n this.AppreciationDetails = AppreciationDetails; \r\n \r\n // console.log(this.AppreciationDetails);\r\n \r\n });\r\n\r\n }\r\n\r\n Reset(){\r\n\r\n this.selectedYear=\"\";\r\n window.location.reload(this.selectedYear);\r\n }\r\n\r\n\r\n \r\n}","import {inject } from 'aurelia-framework';\r\nimport { DialogController } from 'aurelia-dialog';\r\nimport { AppreciationService } from '../../../shared/services/appreciationservice';\r\n\r\n\r\n\r\n\r\n@inject(DialogController,AppreciationService)\r\nexport class ShowPointsComponent {\r\n \r\n \r\n constructor(controller,appreciationService) {\r\n this.controller = controller;\r\n this.appreciationService = appreciationService;\r\n\r\n }\r\n \r\n AppreciationsList=[];\r\n pageSize=5;\r\n previousYear = this.getPreviousYear();\r\n \r\n \r\n\r\n async activate(performance)\r\n {\r\n this.EmployeeName=performance.EmployeeName;\r\n this.Category=performance.CategoryName;\r\n this.Department=performance.DepartmentName;\r\n //console.log(performance.EmployeeID);\r\n this.appreciationService.GetEmployeeAppreciationsByID(this.previousYear,performance.CategoryID,performance.EmployeeID)\r\n .then(AppreciationsList =>{\r\n this.AppreciationsList = AppreciationsList; \r\n //console.log(this.AppreciationsList);\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 cancel() {\r\n this.controller.cancel();\r\n }\r\n\r\n \r\n filters = [\r\n {value: '', keys: ['ProvidedEmployeeName','AppreciationDateText','Score']},\r\n ];\r\n \r\n}","import {inject } from 'aurelia-framework';\r\nimport { DialogController } from 'aurelia-dialog';\r\nimport { AppreciationService } from '../../../shared/services/appreciationservice';\r\nimport { ProfileService } from '../../../shared/services/profielservice';\r\nimport {JwtService} from '../../../shared/services/jwtservice';\r\nimport {config} from '../../../shared/services/config';\r\nimport {LoginService} from \"../../../shared/services/loginservice\";\r\nimport {Router} from 'aurelia-router';\r\n\r\n@inject(DialogController,AppreciationService,ProfileService,JwtService,LoginService,Router)\r\nexport class ShowProfileComponent {\r\n configimgurl=config.img_url;\r\n Configurl=config.api_img_url;\r\n isDragging = false;\r\n dialog;\r\n static inject = [Element];\r\n constructor(controller,appreciationService,ProfileService,JwtService,loginservice,router) {\r\n this.controller = controller;\r\n this.appreciationService = appreciationService;\r\n this.profileService=ProfileService;\r\n this.jwtService = JwtService;\r\n this.router = router;\r\n this.loginservice = loginservice;\r\n this.empid = this.jwtService.getEmployeeId();\r\n }\r\n EmployeeCode='';\r\n async activate(data)\r\n {\r\n const generalInformationData = await this.profileService.EmployeeDetails(data.EmployeeID)\r\n this.generalInformation = generalInformationData;\r\n \r\n // this.empdata={\r\n // Employeecode:generalInformationData.EmployeeCode,\r\n // RM:generalInformationData.ReportingManagerName,\r\n // };\r\n // console.log(this.generalInformation);\r\n\r\n this.employeeDetails = data;\r\n this.EmployeeId = data.EmployeeID;\r\n this.Photopath=data.PhotoPath;\r\n this.EmployeeName=data.EmployeeName;\r\n this.Designation=this.generalInformation.Designation;\r\n this.DepartmentName=data.DepartmentName;\r\n this.ReportingManagerName=this.generalInformation.ReportingManagerName;\r\n this.EmployeeCode=this.generalInformation.EmployeeCode;\r\n this.EmployeeClassText=this.generalInformation.EmployeeClassText;\r\n\r\n // console.log(this.EmployeeCode);\r\n // console.log(data.PhotoPath);\r\n }\r\n attached(){\r\n // if(this.jwtService.getToken() === undefined){\r\n // this.loginservice.purgeAuth();\r\n // this.router.navigateToRoute('login')\r\n // }\r\n }\r\n \r\n cancel() {\r\n this.controller.cancel();\r\n }\r\n startDragging(event) {\r\n if (event.button === 0) {\r\n this.isDragging = true;\r\n this.offsetX = event.clientX - this.dialogElement.getBoundingClientRect().left;\r\n this.offsetY = event.clientY - this.dialogElement.getBoundingClientRect().top;\r\n\r\n window.addEventListener('mousemove', this.drag);\r\n window.addEventListener('mouseup', this.stopDragging);\r\n }\r\n }\r\n\r\n drag = (event) => {\r\n if (this.isDragging) {\r\n const x = event.clientX - this.offsetX;\r\n const y = event.clientY - this.offsetY;\r\n\r\n this.dialogElement.style.left = `${x}px`;\r\n this.dialogElement.style.top = `${y}px`;\r\n }\r\n };\r\n\r\n stopDragging = () => {\r\n this.isDragging = false;\r\n window.removeEventListener('mousemove', this.drag);\r\n window.removeEventListener('mouseup', this.stopDragging);\r\n }\r\n \r\n}\r\n\r\n","import {inject } from 'aurelia-framework';\r\nimport { DialogController } from 'aurelia-dialog';\r\nimport { AppreciationService } from '../../../shared/services/appreciationservice';\r\n\r\n\r\n\r\n\r\n@inject(DialogController,AppreciationService)\r\nexport class ShowDetailsComponent {\r\n \r\n \r\n\r\n constructor(controller,appreciationService) {\r\n this.controller = controller;\r\n this.appreciationService = appreciationService;\r\n \r\n }\r\n \r\n CategoryList=[];\r\n pageSize=10;\r\n previousYear = this.getPreviousYear();\r\n \r\n \r\n\r\n async activate(performance)\r\n {\r\n this.appreciationcategory= performance.CategoryName;\r\n // console.log(performance.CategoryID);\r\n this.appreciationService.GetTopPerformanceListByCategory(this.previousYear,performance.CategoryID)\r\n .then(CategoryList =>{\r\n this.CategoryList = CategoryList; \r\n // console.log(this.CategoryList);\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 cancel() {\r\n this.controller.cancel();\r\n }\r\n\r\n filters = [\r\n {value: '', keys: ['EmployeeName','DepartmentName','Score']},\r\n ];\r\n \r\n}","import {inject } from 'aurelia-framework';\r\nimport {HttpClient, json} from 'aurelia-fetch-client';\r\nimport {Router,activationStrategy} from 'aurelia-router';\r\nimport { AppreciationService } from '../../shared/services/appreciationservice';\r\nimport {SharedState} from '../../shared/state/sharedstate';\r\nimport {config} from '../../shared/services/config';\r\nimport {LoginService} from \"../../shared/services/loginservice\";\r\nimport {JwtService} from \"../../shared/services/jwtservice\";\r\n\r\n@inject(AppreciationService, SharedState, Router, HttpClient,LoginService,JwtService, Element)\r\nexport class TopPerformancePreview{\r\n\r\n constructor(appreciationService, sharedState, router, httpClient,loginservice,JwtService, element) {\r\n this.appreciationService = appreciationService;\r\n this.sharedState = sharedState;\r\n this.router = router;\r\n this.httpClient = httpClient;\r\n this.element = element;\r\n this.loginservice = loginservice;\r\n this.jwtService = JwtService;\r\n }\r\n \r\n previousYear = this.getPreviousYear();\r\n TopPerformanceYearList=[];\r\n selectedYear=this.previousYear;\r\n LoginempId='';\r\n TopPerformancePreviewDetails=[];\r\n configurl=config.img_url;\r\n\r\n attached(){\r\n // if(this.jwtService.getToken() === undefined){\r\n // this.loginservice.purgeAuth();\r\n // this.router.navigateToRoute('login')\r\n // }\r\n this.LoginempId=window.localStorage['EmployeeID'];\r\n this.appreciationService.GetAppreciationYearList(this.LoginempId)\r\n .then(TopPerformanceYearList =>{\r\n this.TopPerformanceYearList = TopPerformanceYearList; \r\n });\r\n this.appreciationService.GetTopPerformanceList(this.previousYear)\r\n .then(TopPerformancePreviewDetails =>{\r\n this.TopPerformancePreviewDetails = TopPerformancePreviewDetails; \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 Search()\r\n {\r\n this.appreciationService.GetTopPerformanceList(this.selectedYear)\r\n .then(TopPerformancePreviewDetails =>{\r\n this.TopPerformancePreviewDetails = TopPerformancePreviewDetails;\r\n });\r\n }\r\n Reset()\r\n {\r\n this.selectedYear=\"\";\r\n window.location.reload();\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/party-popper.svg\", import.meta.url);\n// Module\nvar ___HTML_LOADER_REPLACEMENT_0___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_0___);\nvar code = \"