{"version":3,"file":"app-d91a9049.d152cf98c45d962fa693.bundle.js","mappings":";;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AAEA;AAGA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;;;;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;;AACA;AACA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAQA;AAAA;AANA;AACA;AACA;AACA;AACA;AAGA;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;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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;AAEA;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;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;;;;;;;;;;;;;;;ACrOA;AAEA;AAKA;AAAA;AAHA;AACA;AA8BA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAGA;AACA;AACA;AACA;AAxCA;AACA;AAEA;AAEA;AAGA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAiBA;AA/CA;;;;;;;;;;;;;;;ACFA;AAEA;AAKA;AAAA;AAHA;AACA;AA8BA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAGA;AACA;AACA;AACA;AAxCA;AACA;AAEA;AAEA;AAGA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAiBA;AA/CA;;;;;;;;;;;;;;;ACFA;AAEA;AAKA;AAAA;AAHA;AACA;AA8BA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAGA;AACA;AACA;AACA;AAxCA;AACA;AAEA;AAEA;AAGA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAiBA;AA/CA;;;;;;;;;;;;;;;ACFA;AAEA;AAKA;AAAA;AAHA;AACA;AA8BA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAGA;AACA;AACA;AACA;AAxCA;AACA;AAEA;AAEA;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAiBA;AA/CA;;;;;;;;;;;ACFA;AACA;AACA;AACA;;;;;;;;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACPA;AACA;AACA;AACA","sources":["webpack://HRMSPortal/./src/authentication/auth-config.js","webpack://HRMSPortal/./src/authentication/msal-config.js","webpack://HRMSPortal/./src/components/Sidebar/sidebarcomponent.js","webpack://HRMSPortal/./src/components/alertpopup/activatealertcomponent.js","webpack://HRMSPortal/./src/components/alertpopup/alertpopupcomponent.js","webpack://HRMSPortal/./src/components/alertpopup/deactivatealertcomponent.js","webpack://HRMSPortal/./src/components/alertpopup/showpopup.js","webpack://HRMSPortal/./src/components/Sidebar/sidebarcomponent.html","webpack://HRMSPortal/./src/components/alertpopup/activatealertcomponent.html","webpack://HRMSPortal/./src/components/alertpopup/alertpopupcomponent.html","webpack://HRMSPortal/./src/components/alertpopup/deactivatealertcomponent.html","webpack://HRMSPortal/./src/components/alertpopup/showpopup.html"],"sourcesContent":["import {inject} from 'aurelia-framework';\r\nimport { Redirect } from 'aurelia-router';\r\nimport { JwtService } from '../shared/services/jwtservice';\r\n\r\n@inject(JwtService)\r\nexport class AuthorizeStep {\r\n\r\n constructor(JwtService){\r\n this.jwtService = JwtService;\r\n }\r\n\r\n run(navigationInstruction, next) {\r\n if (navigationInstruction.getAllInstructions().some(i => i.config.settings.auth)) {\r\n var isLoggedIn = this.jwtService.getToken();\r\n if (!isLoggedIn) {\r\n return next.cancel(new Redirect('/'));\r\n }\r\n }\r\n\r\n return next();\r\n }\r\n}\r\n","export const msalConfig = {\n auth: {\n clientId: 'bc3e385a-eb82-4cde-b4f9-3b8050758667',\n authority: 'https://login.microsoftonline.com/7504d69d-9f19-437d-9db0-d6c341c47dbb',\n redirectUri: 'https://hrms.kensium.com/#/dashboard', // Should match your app's configuration\n },\n cache: {\n cacheLocation: 'localStorage', // or 'sessionStorage'\n storeAuthStateInCookie: false,\n },\n};\n","import {inject } from 'aurelia-framework';\r\nimport {LoginService} from '../../shared/services/loginservice';\r\nimport {DashboardService} from '../../shared/services/dashboardservice';\r\nimport {Router} from 'aurelia-router';\r\nimport {JwtService} from '../../shared/services/jwtservice';\r\nimport Scrollbar from 'smooth-scrollbar';\r\nimport {SidebarService} from \"../../shared/services/sidebarservice\";\r\nimport {config} from \"../../shared/services/config\";\r\nimport { constants } from '../../shared/services/constants';\r\nimport { App } from '../../app';\r\nimport { MsalService } from '../../shared/services/msalService';\r\nimport {ProfileService} from \"../../shared/services/profielservice\";\r\n\r\n@inject(ProfileService,LoginService,Router,DashboardService,JwtService,SidebarService,MsalService,App)\r\nexport class Sidebarcomponent {\r\n dynamicmenu = '';\r\n LoadFavourites=[];\r\n LoadRecentItems=[];\r\n showTeamFunctions = false;\r\n showTeamFunctionsMenu = false;\r\n Permanentempclass = constants.permanentEmployeeClassID;\r\n constructor(ProfileService,loginService,router,dashboardService,jwtService,sidebarService,MsalService,App){\r\n this.loginService= loginService;\r\n this.router = router;\r\n this.dashboardService = dashboardService;\r\n this.jwtService = jwtService;\r\n this.sidebarService=sidebarService;\r\n this.msalService = MsalService\r\n this.app = App;\r\n this.employeeId = this.jwtService.getEmployeeId();\r\n this.profileService = ProfileService;\r\n }\r\n\r\n async bind(){\r\n setTimeout(()=>{\r\n Scrollbar.init(document.querySelector('.sidebar'));\r\n },100);\r\n const empid = this.jwtService.getEmployeeId();\r\n const span = await document.querySelectorAll('.close');\r\n for(let i =0; i < span.length; i++) {\r\n span[i].onclick = function () {\r\n let params=span[i].attributes[1].value;\r\n let employeeId = empid;//params.replace(/^\\D+|\\D.*$/g, \"\");\r\n let favoriteId = params.replace(/.*\\D(?=\\d)|\\D+$/g, \"\");\r\n this.removeFromFavorites(employeeId,favoriteId);\r\n span[i].parentNode.remove();\r\n };\r\n }\r\n }\r\n\r\n removeFromFavorites(employeeId,favoriteId){\r\n return this.sidebarService.DeleteFavoriteItems(this.employeeId,favoriteId).then(() =>{\r\n this.dashboardService.GetAllFavorites(this.employeeId)\r\n .then(data => { \r\n this.LoadFavourites = data;\r\n window.location.reload();\r\n });\r\n });\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.empClass = this.jwtService.getEmployeeClass();\r\n this.service = this.jwtService.getService();\r\n if(this.empClass != this.Permanentempclass){\r\n document.getElementById(\"liattend\").children[0].style.display = \"none\";\r\n document.getElementById(\"liasset\").children[0].style.display = \"none\";\r\n\r\n }else{\r\n document.getElementById(\"liattend\").children[0].style.display = \"block\";\r\n document.getElementById(\"liasset\").children[0].style.display = \"block\";\r\n }\r\n const empid = this.jwtService.getEmployeeId();\r\n this.dashboardService.GetAllFavorites(empid)\r\n .then(data => {\r\n this.LoadFavourites = data;\r\n });\r\n this.dashboardService.GetRecentItems(empid)\r\n .then(data => {\r\n this.LoadRecentItems = data;\r\n });\r\n this.profileService.EmployeeDetails(empid).then(data => {\r\n this.generalInformation=data;\r\n // Check if the role names include only \"Employee\"\r\n if (this.generalInformation.RoleNames.length <= 9) {\r\n this.showTeamFunctionsMenu = false; // Hide the \"Team Functions\" menu item\r\n } else {\r\n this.showTeamFunctionsMenu = true; // Show the \"Team Functions\" menu item\r\n }\r\n });\r\n\r\n\r\n this.getCurrentRouteURL();\r\n\r\n const tags = document.querySelectorAll('.sidebar-sub li a');\r\n const storedIndex = localStorage.getItem('activeTagIndex');\r\n if (storedIndex !== null && tags[storedIndex]) {\r\n tags[storedIndex].classList.add('active-link');\r\n }\r\n tags.forEach((tag, index) => {\r\n tag.addEventListener('click', function() {\r\n tags.forEach(t => {\r\n t.classList.remove('active-link');\r\n });\r\n this.classList.add('active-link');\r\n localStorage.setItem('activeTagIndex', index);\r\n });\r\n });\r\n const activeLink = document.querySelector(\".active-link\");\r\n if (activeLink) {\r\n const parentLi = activeLink.parentNode.parentNode.parentNode;\r\n if (parentLi && parentLi.tagName === \"LI\") {\r\n parentLi.classList.add(\"sub-active\");\r\n }\r\n }\r\n var sidebarLinks = document.querySelectorAll(\".sidebar ul li.home a, .sidebar ul li.support a, .sidebar ul li.logout a\");\r\n sidebarLinks.forEach(function(link) {\r\n link.addEventListener(\"click\", function(event) {\r\n event.preventDefault();\r\n var elementsWithSubActive = document.querySelectorAll(\".sub-active\");\r\n elementsWithSubActive.forEach(function(element) {\r\n element.classList.remove(\"sub-active\");\r\n });\r\n var elementsWithSubActive1 = document.querySelectorAll(\".active-link\");\r\n elementsWithSubActive1.forEach(function(element) {\r\n element.classList.remove(\"active-link\");\r\n });\r\n });\r\n });\r\n if (window.location.href.includes(\"/dashboard\") || window.location.href.includes(\"/myprofile\") || window.location.href.includes(\"/changepassword\") || window.location.href.includes(\"/appreciation\") || window.location.href.includes(\"/task\")) {\r\n var elementsWithSubActive = document.querySelectorAll(\".sub-active\");\r\n elementsWithSubActive.forEach(function(element) {\r\n element.classList.remove(\"sub-active\");\r\n });\r\n var globalActiveLinks = document.querySelectorAll(\".active-link\");\r\n globalActiveLinks.forEach(function(element) {\r\n element.classList.remove(\"active-link\");\r\n });\r\n }\r\n const sidebarSubLinks = document.querySelectorAll('.sidebar ul li .sidebar-sub a, .sidebar ul li.home a, .sidebar ul li.support a, .sidebar ul li.logout a');\r\n const mblOverlay = document.querySelector('.mbl-overlay');\r\n sidebarSubLinks.forEach((link) => {\r\n link.addEventListener('click', function() {\r\n mblOverlay.click();\r\n });\r\n });\r\n document.getElementById(\"orgChartLink\").onclick = function() {\r\n //window.open(\"http://183.82.120.94:6070/HRMS/OrgChart/OrgChart\", \"_blank\");\r\n window.open(config.img_url + \"HRMS/OrgChart/OrgChart\", \"_blank\");\r\n };\r\n document.getElementById(\"hierarchyChartLink\")?.addEventListener(\"click\", function(event) {\r\n event.preventDefault();\r\n var dynamicBaseUrl = window.location.origin;\r\n var targetUrl = dynamicBaseUrl + \"/#/hierarchychart\"; \r\n window.location.href = targetUrl;\r\n });\r\n\r\n\r\n }\r\n async bindDashboard(empid){\r\n return await this.dashboardService.BindDynamicMenu(empid)\r\n .then(data => {\r\n this.dynamicmenu = data;\r\n });\r\n }\r\n onMenuClick() {\r\n event.preventDefault();\r\n const parentDiv = event.target.parentNode.parentNode;\r\n if(parentDiv.classList.contains('arrow')){\r\n parentDiv.classList.toggle('sub-active');\r\n const siblings = Array.from(parentDiv.parentElement.children);\r\n siblings.forEach(sibling => {\r\n if (sibling !== parentDiv) {\r\n sibling.classList.remove('sub-active');\r\n }\r\n });\r\n }\r\n else if(parentDiv.classList.contains('userlogout')){\r\n this.loginService.purgeAuth();\r\n if(this.service === true || this.service === 'true'){\r\n this.msalService.signOut();\r\n }else{\r\n this.app.updatePropertyValue(false);\r\n sessionStorage.removeItem('activeTab');\r\n this.router.navigateToRoute('login')\r\n window.location.reload();\r\n }\r\n }\r\n else{\r\n return false;\r\n }\r\n }\r\n toggleTeamFunctions() {\r\n this.showTeamFunctions = !this.showTeamFunctions; // Toggle the flag\r\n }\r\n\r\n onClick(filterremove) {\r\n const body = document.body;\r\n body.classList.remove('open-sidebar');\r\n }\r\n navigateToPage(support) {\r\n if (\r\n (navigator.userAgent.includes('Mac') && navigator.userAgent.includes('Safari')) ||\r\n (navigator.userAgent.includes('iPhone') && navigator.userAgent.includes('Safari'))\r\n ) {\r\n setTimeout(function () {\r\n window.location.reload();\r\n //window.location.href = '/#/dashboard';\r\n }, 1000);\r\n } \r\n this.router.navigateToRoute(support);\r\n this.getCurrentRouteURL();\r\n }\r\n\r\n getCurrentRouteURL() {\r\n const currentInstruction = this.router.currentInstruction;\r\n if (currentInstruction) {\r\n const routeURL = currentInstruction.fragment;\r\n this.dashboardService.GetRecentItems(this.employeeId)\r\n .then(data => {\r\n this.LoadRecentItems = data;\r\n });\r\n return routeURL;\r\n }\r\n return '';\r\n }\r\n \r\n}\r\n","import { DialogController } from 'aurelia-dialog';\r\n\r\nexport class ActivateAlertComponent {\r\n static inject = [DialogController,Element];\r\n isDragging = false;\r\n dialog;\r\n\r\n constructor(dialogController) {\r\n this.dialogController = dialogController;\r\n this.message = \"Are You Sure Want To activate Record?\";\r\n\r\n }\r\n\r\n activate(data) {\r\n }\r\n\r\n cancel() {\r\n this.dialogController.cancel();\r\n }\r\n\r\n ok() {\r\n this.dialogController.ok();\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}","import { DialogController } from 'aurelia-dialog';\r\n\r\nexport class AlertpopupComponent {\r\n static inject = [DialogController,Element];\r\n isDragging = false;\r\n dialog;\r\n\r\n constructor(dialogController) {\r\n this.dialogController = dialogController;\r\n this.message = \"Are You Sure Want To Delete Record?\";\r\n\r\n }\r\n\r\n activate(data) {\r\n }\r\n\r\n cancel() {\r\n this.dialogController.cancel();\r\n }\r\n\r\n ok() {\r\n this.dialogController.ok();\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}","import { DialogController } from 'aurelia-dialog';\r\n\r\nexport class DeactivateAlertComponent {\r\n static inject = [DialogController,Element];\r\n isDragging = false;\r\n dialog;\r\n\r\n constructor(dialogController) {\r\n this.dialogController = dialogController;\r\n this.message = \"Are You Sure Want To Deactivate Record?\";\r\n\r\n }\r\n\r\n activate(data) {\r\n }\r\n\r\n cancel() {\r\n this.dialogController.cancel();\r\n }\r\n\r\n ok() {\r\n this.dialogController.ok();\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}","import { DialogController } from 'aurelia-dialog';\r\n\r\nexport class ShowPopup {\r\n static inject = [DialogController,Element];\r\n isDragging = false;\r\n dialog;\r\n\r\n constructor(dialogController) {\r\n this.dialogController = dialogController;\r\n this.message = \"Please select valid employee.\";\r\n\r\n }\r\n\r\n activate(data) {\r\n }\r\n\r\n // cancel() {\r\n // this.dialogController.cancel();\r\n // }\r\n\r\n ok() {\r\n this.dialogController.ok();\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}","// 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/delete-trash.svg\", import.meta.url);\n// Module\nvar ___HTML_LOADER_REPLACEMENT_0___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_0___);\nvar code = \"\";\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/delete-trash.svg\", import.meta.url);\n// Module\nvar ___HTML_LOADER_REPLACEMENT_0___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_0___);\nvar code = \"\";\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/delete-trash.svg\", import.meta.url);\n// Module\nvar ___HTML_LOADER_REPLACEMENT_0___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_0___);\nvar code = \"\";\n// Exports\nexport default code;","// Module\nvar code = \"\";\n// Exports\nexport default code;"],"names":[],"sourceRoot":""}