{"version":3,"file":"app-81714686.d152cf98c45d962fa693.bundle.js","mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AAGA;AAQA;AAAA;AANA;AACA;AACA;AAEA;AACA;AA8EA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAGA;AACA;AACA;AACA;AAzFA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AAGA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAkBA;;;;;;;;;;;;;;;;;;;;;;;;AC5GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAMA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAGA;AACA;AACA;AAEA;AACA;AAGA;AAEA;AACA;AACA;AACA;AAGA;AAEA;AACA;AAAA;AAAA;AAAA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;ACxEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AAAA;AAcA;AAAA;AAAA;AAAA;AAZA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAuGA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAGA;AACA;AACA;AACA;AAlHA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAMA;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;AAEA;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;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAiBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAxLA;AAAA;AAAA;AAAA;AAAA;AARA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AAAA;AAWA;AAAA;AAAA;AAVA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAiJA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAGA;AACA;AACA;AACA;AA5JA;AACA;AACA;AACA;AACA;AACA;AAOA;AAEA;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;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;AACA;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAiBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AAEA;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;AAAA;AAAA;AACA;AAEA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAhPA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAOA;AAAA;AALA;AACA;AAEA;AACA;AAoEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAGA;AACA;AACA;AACA;AA/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;AACA;AAEA;AAEA;AAAA;AAAA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAiBA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAGA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;;;;;;;;;;;;;;;;;;ACzIA;AACA;AACA;AACA;AACA;AAEA;AAOA;AAAA;AALA;AACA;AAEA;AACA;AA8CA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAGA;AACA;AACA;AACA;AAzDA;AACA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAiBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAaA;AAAA;AAXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAsJA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA/LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;;AA8CA;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;AAEA;AACA;AACA;AACA;AACA;AAEA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;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;AACA;AACA;AACA;AACA;AACA;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;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;AAEA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;;;;;;;;;;;;;;;;;;;;;;;ACncA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAkBA;AAAA;AAhBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAuSA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAGA;AACA;AACA;AACA;AAlTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AAGA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AAEA;AAYA;AACA;AAGA;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;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;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAGA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;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;AAEA;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;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;AAiBA;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;AAGA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;AC5YA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAiBA;AAAA;AAfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAmUA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAGA;AACA;AACA;AACA;AA9UA;AACA;AACA;AACA;AACA;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;AAGA;AACA;AAEA;AAGA;AACA;AACA;AACA;AACA;AACA;AAGA;AAUA;AACA;AAKA;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;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;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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;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;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;AAiBA;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;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC7fA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAMA;AAAA;AAJA;AACA;AACA;AA6DA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAwBA;;;;;;;;;;;ACtGA;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;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sources":["webpack://HRMSPortal/./src/components/myprofile/orientation/editorientation/editorientation.js","webpack://HRMSPortal/./src/components/myprofile/orientation/orientation.js","webpack://HRMSPortal/./src/components/myprofile/personaldetails/family/addnewfamily/addfamilycomponent.js","webpack://HRMSPortal/./src/components/myprofile/personaldetails/family/editfamily/editfamilycomponent.js","webpack://HRMSPortal/./src/components/myprofile/personaldetails/language/addnewlanguage/addnewlanguagecomponent.js","webpack://HRMSPortal/./src/components/myprofile/personaldetails/language/editlanguage/editlanguagecomponent.js","webpack://HRMSPortal/./src/components/myprofile/personaldetails/personaldetails.js","webpack://HRMSPortal/./src/components/myprofile/skills/addemployeeskills/addskillcomponent.js","webpack://HRMSPortal/./src/components/myprofile/skills/editemployeeskills/editskillcomponent.js","webpack://HRMSPortal/./src/components/myprofile/skills/skills.js","webpack://HRMSPortal/./src/components/myprofile/orientation/editorientation/editorientation.html","webpack://HRMSPortal/./src/components/myprofile/orientation/orientation.html","webpack://HRMSPortal/./src/components/myprofile/personaldetails/family/addnewfamily/addfamilycomponent.html","webpack://HRMSPortal/./src/components/myprofile/personaldetails/family/editfamily/editfamilycomponent.html","webpack://HRMSPortal/./src/components/myprofile/personaldetails/language/addnewlanguage/addnewlanguagecomponent.html","webpack://HRMSPortal/./src/components/myprofile/personaldetails/language/editlanguage/editlanguagecomponent.html","webpack://HRMSPortal/./src/components/myprofile/personaldetails/personaldetails.html","webpack://HRMSPortal/./src/components/myprofile/skills/addemployeeskills/addskillcomponent.html","webpack://HRMSPortal/./src/components/myprofile/skills/editemployeeskills/editskillcomponent.html","webpack://HRMSPortal/./src/components/myprofile/skills/skills.html"],"sourcesContent":["import {inject } from 'aurelia-framework';\r\nimport { DialogController } from 'aurelia-dialog';\r\nimport { ProfileService } from '../../../../shared/services/profielservice';\r\nimport { JwtService } from '../../../../shared/services/jwtservice';\r\nimport Scrollbar from 'smooth-scrollbar';\r\nimport {config} from \"../../../../shared/services/config\";\r\n\r\n\r\n@inject(DialogController,ProfileService,JwtService)\r\nexport class Editorientation {\r\n pageSize = config.grid_PazeSize;\r\n topicsPageSize=10;\r\n OnlineTopic = [];\r\n static inject = [Element];\r\n isDragging = false;\r\n dialog;\r\n constructor(controller, ProfileService, JwtService) {\r\n this.controller = controller;\r\n this.profileService = ProfileService;\r\n this.jwtService = JwtService;\r\n }\r\n\r\n activate(viewData){\r\n console.log( viewData);\r\n this.orientation = viewData;\r\n this.Title=viewData.Title;\r\n this.Mode=viewData.Mode;\r\n this.ScheduleDateTime=viewData.ScheduleDateTime;\r\n this.Venue=viewData.Venue;\r\n this.ConferenceType=viewData.ConferenceType;\r\n this.WebMeetingVenue=viewData.WebMeetingVenue;\r\n this.programListID = viewData.InductionProgramListId;\r\n }\r\n\r\n\r\n async bind() {\r\n setTimeout(()=>{\r\n Scrollbar.init(document.querySelector('.orientaion-pop-scrollbar'));\r\n },1000)\r\n }\r\n\r\n\r\n\r\n dateSort(a, b, sortOrder) {\r\n let date1 = new Date(a.registered);\r\n let date2 = new Date(b.registered);\r\n\r\n if (date1 === date2) {\r\n return 0;\r\n }\r\n\r\n if (date1 > date2) {\r\n return 1 * sortOrder;\r\n }\r\n\r\n return -1 * sortOrder;\r\n }\r\n\r\n nameLength(row) {\r\n return row.Topic.length;\r\n }\r\n\r\n async attached(){\r\n const ProgramListData = await this.profileService.OrientationViewData(this.programListID);\r\n this.programList = await ProgramListData;\r\n this.OnlineTopic=this.programList.OnlineTopics;\r\n console.log(this.OnlineTopic.Topic);\r\n this.programListGrid = this.programList.InPersonTopics;\r\n //this.ScheduleDateTime=this.programList.ScheduleDateTime\r\n\r\n\r\n const LocationData= await this.profileService.OrientationLocation(this.programListID);\r\n this.Location= await LocationData;\r\n console.log(this.Location);\r\n\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","import {inject } from 'aurelia-framework';\r\nimport { ProfileService } from '../../../shared/services/profielservice';\r\nimport { JwtService } from '../../../shared/services/jwtservice';\r\nimport {DialogService} from 'aurelia-dialog';\r\nimport {Editorientation} from \"./editorientation/editorientation\";\r\nimport Scrollbar from 'smooth-scrollbar';\r\nimport { Router } from 'aurelia-router';\r\nimport {config} from \"../../../shared/services/config\";\r\nimport {LoginService} from \"../../../shared/services/loginservice\";\r\n\r\n@inject(ProfileService,JwtService,DialogService,Router,LoginService)\r\n\r\nexport class Orientation {\r\n pageSize = config.grid_PazeSize;\r\n\r\n\r\n constructor(ProfileService,JwtService,DialogService,router,loginService) {\r\n this.profileService = ProfileService;\r\n this.jwtService = JwtService;\r\n this.dialogService = DialogService;\r\n this.router = router;\r\n this.loginService = loginService;\r\n this.empid = this.jwtService.getEmployeeId();\r\n }\r\n\r\n async bind() {\r\n setTimeout(()=>{ \r\n Scrollbar.init(document.querySelector('.orientation-scrollbar'));\r\n },1000)\r\n }\r\n nameLength(row) {\r\n return row.Title.length;\r\n }\r\n\r\n dateSort(a, b, sortOrder) {\r\n let date1 = new Date(a.registered);\r\n let date2 = new Date(b.registered);\r\n\r\n if (date1 === date2) {\r\n return 0;\r\n }\r\n\r\n if (date1 > date2) {\r\n return 1 * sortOrder;\r\n }\r\n\r\n return -1 * sortOrder;\r\n }\r\n async attached(params){\r\n\r\n \r\n const id = this.router.currentInstruction.queryParams.id;\r\n //console.log(id);\r\n if(id != null && id !='' && id !=undefined)\r\n {\r\n this.empid=id;\r\n }\r\n else{\r\n\r\n this.empid=this.jwtService.getEmployeeId();\r\n\r\n }\r\n const orientation = await this.profileService.Orientationtabledata(this.empid);\r\n console.log( orientation);\r\n this.orientation = orientation;\r\n\r\n\r\n }\r\n\r\n popupEditOrientation(Editdata){\r\n this.dialogService.open({viewModel : Editorientation, model: Editdata});\r\n }\r\n}\r\n","import {inject,bindable, bindingMode} from 'aurelia-framework';\r\nimport { DialogController } from 'aurelia-dialog';\r\nimport flatpickr from 'flatpickr';\r\nimport { ProfileService } from '../../../../../shared/services/profielservice';\r\nimport { JwtService } from '../../../../../shared/services/jwtservice';\r\nimport {ValidationControllerFactory, ValidationRules} from 'aurelia-validation';\r\nimport {LoginService} from \"../../../../../shared/services/loginservice\";\r\nimport { Router } from 'aurelia-router';\r\n\r\n@inject(DialogController,ProfileService,JwtService,ValidationControllerFactory,Router,LoginService)\r\nexport class Addfamilycomponent {\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) dateValue;\r\n @bindable employee;\r\n options=[];\r\n lifetypes=[];\r\n isSearchActive = false;\r\n results = [];\r\n searchQuery = '';\r\n dropdownOptions = [];\r\n showEmpDropdown = true;\r\n static inject = [Element];\r\n isDragging = false;\r\n dialog;\r\n offsetX = 0;\r\n offsetY = 0;\r\n constructor(controller,ProfileService,JwtService,controllerFactory,router,loginService) {\r\n this.controller = controller;\r\n this.profileService=ProfileService;\r\n this.jwtService= JwtService;\r\n this.dropdownOptions = [];\r\n this.router = router;\r\n this.loginService = loginService;\r\n\r\n this.controllerFactory = controllerFactory.createForCurrentScope();\r\n ValidationRules\r\n .ensure('Name').required()\r\n .ensure('Relationship').required()\r\n .ensure('LifeEvent').required().withMessage(\"Life event is required\")\r\n .ensure('DateofBirth').required().withMessage(\"Date of birth is required\")\r\n .on(this);\r\n }\r\n attached() {\r\n\r\n flatpickr(this.datePicker, {\r\n closeOnSelect:true,\r\n dateFormat: 'd-m-Y',\r\n minDate: null,\r\n maxDate: null,\r\n defaultDate: this.dateValue,\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.DateofBirth=dateStr;\r\n }\r\n });\r\n this.calendarIcon.addEventListener('click', () => {\r\n this.datePicker._flatpickr.open();\r\n });\r\n this.isLoading = true;\r\n setTimeout(() => {\r\n this.isLoading = false;\r\n }, 3000);\r\n this.profileService.EmployeeFamilyRelationship()\r\n .then(data => {\r\n this.options= data;\r\n });\r\n this.profileService.EmployeeFamilyLifeeventtypes()\r\n .then(data => {\r\n this.lifetypes= data;\r\n });\r\n }\r\n toggleSearchBar() {\r\n this.isSearchActive = !this.isSearchActive;\r\n }\r\n async onEmployeeSelected() {\r\n if (this.searchQuery) {\r\n this.showEmpDropdown = true;\r\n try {\r\n const response = await this.profileService.EmployeeNamesForDropdown(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 if (this.dropdownOptions.length === 0) {\r\n const errorInfo = {\r\n error: {\r\n message: \"Please select valid employee\"\r\n }\r\n };\r\n this.NameError = [errorInfo];\r\n } else {\r\n this.NameError = [];\r\n }\r\n } catch (error) {\r\n console.error(error);\r\n }\r\n } else {\r\n this.showEmpDropdown = false;\r\n this.dropdownOptions = [];\r\n }\r\n }\r\n selectEmployee(EmpOption) {\r\n const modifiedOption = { ...EmpOption, ID: EmpOption.EmployeeID };\r\n this.employeeName = EmpOption.EmployeeID;\r\n this.searchQuery = modifiedOption.EmployeeName;\r\n this.showEmpDropdown = false;\r\n this.selectedEmployee = modifiedOption;\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 async save() {\r\n const refreshEvent = new CustomEvent('refreshFamily');\r\n event.preventDefault();\r\n let checkedorganization = false;\r\n let checkeddpendent = false;\r\n let lifeeventdate = \"0001-00-00\";\r\n let PersonDependantID = \"0\";\r\n let EmployeeName;\r\n let EmployeeID;\r\n if (this.organization === true) {\r\n EmployeeID = this.employeeName;\r\n checkeddpendent = true;\r\n await this.profileService.GetEmployeeNamesForGrid(EmployeeID)\r\n .then(data => {\r\n this.EmployeeName = data.EmployeeName;\r\n });\r\n } else {\r\n this.EmployeeName = this.Name;\r\n }\r\n if (this.LifeEventTypeDate) {\r\n lifeeventdate = true;\r\n }\r\n if (this.PersonDependantID) {\r\n PersonDependantID = true;\r\n }\r\n this.controllerFactory.validate()\r\n .then(result => {\r\n if (result.valid) {\r\n const empid = this.jwtService.getEmployeeId();\r\n let data = {\r\n EmployeeID: empid,\r\n Name: this.EmployeeName,\r\n EmployeeDependentConfigID: this.Relationship,\r\n DateofBirth: this.DateofBirth,\r\n LifeEventType: this.LifeEvent,\r\n LifeEventTypeDate: lifeeventdate,\r\n SameOrganizationIND: this.organization,\r\n DependentIND: this.dependent,\r\n PersonDependantID: PersonDependantID,\r\n };\r\n const EmployeeFamilyValidatecheck={\r\n EmployeeID:empid,\r\n Name:this.EmployeeName,\r\n };\r\n this.profileService.EmployeeNameAvoidDuplicate(EmployeeFamilyValidatecheck).then(employeeName => {\r\n if (employeeName === 1) {\r\n this.errorMessage=true;\r\n this.errorMessage = 'Name already exists.';\r\n setTimeout(()=>{this.errorMessage=null},5000);\r\n } else {\r\n this.profileService.EmployeeFamilyMemberSave(data).then(() => {\r\n this.controller.cancel();\r\n this.profileService.GetFamilyMember(empid)\r\n .then(data => {\r\n this.employeefamily = data;\r\n document.dispatchEvent(refreshEvent); // Trigger the custom event\r\n });\r\n });\r\n }\r\n });\r\n }\r\n });\r\n }\r\n}\r\n","import {inject,bindable, bindingMode} from 'aurelia-framework';\r\nimport { DialogController } from 'aurelia-dialog';\r\nimport flatpickr from 'flatpickr';\r\nimport { ProfileService } from '../../../../../shared/services/profielservice';\r\nimport { JwtService } from '../../../../../shared/services/jwtservice';\r\nimport {ValidationControllerFactory, ValidationRules} from 'aurelia-validation';\r\n\r\n@inject(DialogController,ProfileService,JwtService,ValidationControllerFactory)\r\nexport class Editfamilycomponent {\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) dateValue;\r\n options=[];\r\n lifetypes=[];\r\n isSearchActive = false;\r\n searchQuery = '';\r\n dropdownOptions = [];\r\n showEmpDropdown = true;\r\n organization = false;\r\n static inject = [Element];\r\n isDragging = false;\r\n dialog;\r\n constructor(controller,ProfileService,JwtService,controllerFactory) {\r\n this.controller = controller;\r\n this.profileService=ProfileService;\r\n this.jwtService= JwtService;\r\n this.dropdownOptions = [];\r\n this.controllerFactory = controllerFactory.createForCurrentScope();\r\n ValidationRules\r\n .ensure('Name').required()\r\n .ensure('searchQuery').required()\r\n .ensure('Relationship').required()\r\n .ensure('LifeEventType').required().withMessage(\"Life event is required\")\r\n .ensure('DateofBirth').required().withMessage(\"Date of birth is required\")\r\n .on(this);\r\n }\r\n \r\n activate(data){\r\n this.employeelife = data;\r\n this.Relationship= this.employeelife.EmployeeDependentConfigID;\r\n this.Name = this.employeelife.Name;\r\n this.DependentPersonID =this.employeelife.DependentPersonID;\r\n this.LifeEventType = this.employeelife.LifeEventType;\r\n this.DateofBirth = this.employeelife.DateofBirth;\r\n this.dependent = this.employeelife.DependentIND;\r\n this.organization = this.employeelife.SameOrganizationIND;\r\n if(this.organization === true){\r\n this.toggleSearchBar();\r\n }\r\n this.personID = data.PersonDependantID;\r\n const date = new Date(data.DateofBirth);\r\n const day = date.getDate().toString().padStart(2, '0');\r\n const month = (date.getMonth() + 1).toString().padStart(2, '0');\r\n const year = date.getFullYear();\r\n this.dateValue=`${day}-${month}-${year}`;\r\n }\r\n attached() {\r\n const dialog = document.querySelector(\"ai-dialog\");\r\n\r\n dialog.addEventListener(\"mousedown\", (event) => {\r\n if (event.target.classList.contains(\"modal-popup\")) {\r\n event.preventDefault();\r\n dialog.classList.add(\"dragging\");\r\n }\r\n });\r\n flatpickr(this.datePicker, {\r\n closeOnSelect:true,\r\n dateFormat: 'd-m-Y',\r\n minDate: null,\r\n maxDate: null,\r\n defaultDate:this.DateofBirth,\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.DateofBirth = dateStr;\r\n }\r\n });\r\n this.calendarIcon.addEventListener('click', () => {\r\n this.datePicker._flatpickr.open();\r\n });\r\n this.isLoading = true;\r\n setTimeout(() => {\r\n this.isLoading = false;\r\n }, 3000);\r\n this.profileService.EmployeeFamilyRelationship()\r\n .then(data => {\r\n this.options= data;\r\n });\r\n this.profileService.EmployeeFamilyLifeeventtypes()\r\n .then(data => {\r\n this.lifetypes= data;\r\n });\r\n this.toggleSearchBar();\r\n\r\n }\r\n EditFamilyMember(id) {\r\n const empid = this.jwtService.getEmployeeId();\r\n this.profileService.GetFamilyMember(empid).then(data=>{\r\n this.employeefamily=data;\r\n this.Name = this.employeefamily.Name;\r\n data.forEach(item=> {\r\n });\r\n });\r\n }\r\n toggleSearchBar(checked) {\r\n if(this.organization === true){\r\n this.isSearchActive = true;\r\n this.searchQuery = this.Name;\r\n }else if(this.organization === false){\r\n this.isSearchActive = false;\r\n this.Name= this.employeelife.Name;\r\n }\r\n }\r\n async onEmployeeSelected() {\r\n if (this.searchQuery) {\r\n this.showEmpDropdown = true;\r\n try {\r\n const response = await this.profileService.EmployeeNamesForDropdown(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 if (this.dropdownOptions.length === 0) {\r\n const errorInfo = {\r\n error: {\r\n message: \"Please select valid employee\"\r\n }\r\n };\r\n this.NameError = [errorInfo];\r\n } else {\r\n this.NameError = [];\r\n }\r\n } catch (error) {\r\n console.error(error);\r\n }\r\n } else {\r\n this.showEmpDropdown = false;\r\n this.dropdownOptions = [];\r\n }\r\n }\r\n selectEmployee(EmpOption) {\r\n const modifiedOption = { ...EmpOption, ID: EmpOption.EmployeeID };\r\n this.employeeName = EmpOption.EmployeeID;\r\n this.searchQuery = modifiedOption.EmployeeName;\r\n this.showEmpDropdown = false;\r\n this.selectedEmployee = modifiedOption;\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 async save(){\r\n const refreshEvent = new CustomEvent('refreshEditFamily');\r\n event.preventDefault();\r\n const DateOfBirth = document.getElementById('dob').value;\r\n let checkedorganization = false;\r\n let checkeddpendent = false;\r\n let lifeeventdate = \"00-00-0001\";\r\n let EmployeeName;\r\n let EmployeeID;\r\n if( this.organization === true) {\r\n EmployeeID = this.employeeName;\r\n if(EmployeeID ==null)\r\n {\r\n this.EmployeeName = this.Name;\r\n }\r\n else{\r\n checkeddpendent = true;\r\n await this.profileService.GetEmployeeNamesForGrid(EmployeeID)\r\n .then(data => {\r\n this.EmployeeName = data.EmployeeName;\r\n });\r\n }\r\n }\r\n else{\r\n this.EmployeeName = this.Name;\r\n }\r\n if(this.employeelife.dependent=== true){\r\n let checkeddpendent = true\r\n }\r\n if(this.employeelife.LifeEventTypeDate){\r\n let lifeeventdate = true\r\n }\r\n const empid = this.jwtService.getEmployeeId();\r\n // var dateParts = this.DateofBirth.split(\"-\");\r\n // var formattedDate = dateParts[1] + \"-\" + dateParts[0] + \"-\" + dateParts[2];\r\n // console.log(this.DateofBirth); \r\n // console.log(formattedDate);\r\n this.controllerFactory.validate()\r\n .then(result => {\r\n if (result.valid) {\r\n let data = {\r\n EmployeeID:empid,\r\n Name:this.EmployeeName,\r\n EmployeeDependentConfigID:this.Relationship,\r\n DateofBirth:this.DateofBirth,\r\n LifeEventType:this.LifeEventType,\r\n LifeEventTypeDate:lifeeventdate,\r\n SameOrganizationIND:this.organization,\r\n DependentIND:checkeddpendent,\r\n PersonDependantID:this.employeelife.PersonDependantID,\r\n Relationship:this.employeelife.Relationship,\r\n };\r\n const EmployeeFamilyValidatecheck={\r\n EmployeeID:empid,\r\n Name:this.EmployeeName,\r\n PersonDependantID:this.employeelife.PersonDependantID,\r\n };\r\n this.profileService.EmployeeNameAvoidDuplicate(EmployeeFamilyValidatecheck).then(employeeName => {\r\n if (employeeName === 1) {\r\n this.errorMessage=true;\r\n this.errorMessage = 'Name already exists.';\r\n setTimeout(()=>{this.errorMessage=null},5000);\r\n }\r\n else{\r\n this.profileService.EmployeeFamilyMemberSave(data)\r\n .then(() => {\r\n this.controller.cancel();\r\n this.profileService.GetFamilyMember(empid)\r\n .then(data => {\r\n this.employeefamily = data;\r\n document.dispatchEvent(refreshEvent); // Trigger the custom event\r\n });\r\n });\r\n }\r\n });\r\n }\r\n });\r\n\r\n }\r\n}\r\n","import {inject } from 'aurelia-framework';\r\nimport { DialogController } from 'aurelia-dialog';\r\nimport { ProfileService } from '../../../../../shared/services/profielservice';\r\nimport { JwtService } from '../../../../../shared/services/jwtservice';\r\nimport {ValidationControllerFactory, ValidationRules} from 'aurelia-validation';\r\nimport {LoginService} from \"../../../../../shared/services/loginservice\";\r\nimport { Router } from 'aurelia-router';\r\n\r\n@inject(DialogController,ProfileService,JwtService,ValidationControllerFactory,Router,LoginService)\r\nexport class AddNewLanguage {\r\n options = [];\r\n languagevalidError = false;\r\n static inject = [Element];\r\n isDragging = false;\r\n dialog;\r\n constructor(controller,ProfileService,JwtService,controllerFactory,router,loginService) {\r\n this.controller = controller;\r\n this.profileService=ProfileService;\r\n this.jwtService = JwtService;\r\n this.router = router;\r\n this.loginService = loginService;\r\n this.controllerFactory = controllerFactory.createForCurrentScope();\r\n this.empid = this.jwtService.getEmployeeId();\r\n ValidationRules\r\n .ensure('Language').required()\r\n .ensure('Read').required()\r\n .ensure('Speak').required()\r\n .ensure('Write').required()\r\n .on(this);\r\n }\r\n async attached() {\r\n\r\n this.profileService.EmployeePersonalDetailsLanguage()\r\n .then(data => {\r\n this.options= Object.entries(data).map(([key, value])=>({value, key}));\r\n });\r\n }\r\n cancel() {\r\n this.controller.cancel();\r\n }\r\n validateLanguage(event) {\r\n const inputElement = event.target;\r\n const inputValue = inputElement.value;\r\n const onlyCharactersRegex = /^[A-Za-z\\s]*$/;\r\n if (!onlyCharactersRegex.test(inputValue)) {\r\n this.languagevalidError = true;\r\n } else {\r\n this.languagevalidError = false;\r\n }\r\n }\r\n async checkExistingLanguage() {\r\n const desiredLanguage = this.Language;\r\n try {\r\n const employeeLanguageData = await this.profileService.GetEmployeeLanguage(this.empid);\r\n this.employeelanguage = employeeLanguageData;\r\n const existingLanguage = this.employeelanguage.some(lang => lang.Language === desiredLanguage);\r\n if (existingLanguage) {\r\n const errorInfo = {\r\n error: {\r\n message: \"Language already exists.\"\r\n }\r\n };\r\n this.LanguageError = [errorInfo];\r\n } else {\r\n this.LanguageError = [];\r\n }\r\n } catch (error) {\r\n console.error(error);\r\n }\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 save() {\r\n const refreshEvent = new CustomEvent('refreshLanguage');\r\n event.preventDefault();\r\n this.controllerFactory.validate()\r\n .then(result => {\r\n if (result.valid && !this.languagevalidError) {\r\n const empid = this.jwtService.getEmployeeId();\r\n let data = {\r\n EmployeeID: empid,\r\n Language: this.Language,\r\n ReadCompetency: this.Read,\r\n SpeakCompetency: this.Speak,\r\n WriteCompetency: this.Write,\r\n };\r\n const LanguageNameValidatecheck={\r\n EmployeeID: empid,\r\n Language: this.Language,\r\n };\r\n this.profileService.LanguageNameAvoidDuplicate(LanguageNameValidatecheck).then(languagename => {\r\n if (languagename === 1) {\r\n this.errorMessage=true;\r\n this.errorMessage = 'Language already exists.';\r\n setTimeout(()=>{this.errorMessage=null},5000);\r\n }\r\n\r\n else {\r\n this.profileService.EmployeeLanguageSave(data)\r\n .then(() => {\r\n this.controller.cancel();\r\n this.profileService.GetEmployeeLanguage(empid)\r\n .then(data => {\r\n this.employeelanguage = data;\r\n document.dispatchEvent(refreshEvent); // Trigger the custom event\r\n });\r\n });\r\n }\r\n });\r\n }\r\n });\r\n }\r\n\r\n}\r\n\r\n","import {inject } from 'aurelia-framework';\r\nimport { DialogController } from 'aurelia-dialog';\r\nimport { ProfileService } from '../../../../../shared/services/profielservice';\r\nimport { JwtService } from '../../../../../shared/services/jwtservice';\r\nimport {ValidationControllerFactory, ValidationRules} from 'aurelia-validation';\r\n\r\n@inject(DialogController,ProfileService,JwtService,ValidationControllerFactory)\r\nexport class Editlanguagecomponent {\r\n options = [];\r\n PersonID = \"\";\r\n static inject = [Element];\r\n isDragging = false;\r\n dialog;\r\n constructor(controller,ProfileService,JwtService,controllerFactory) {\r\n this.controller = controller;\r\n this.profileService=ProfileService;\r\n this.jwtService= JwtService;\r\n this.controllerFactory = controllerFactory.createForCurrentScope();\r\n ValidationRules\r\n .ensure('Language').required()\r\n .matches(/^[A-Za-z]+$/)\r\n .withMessage('Please enter characters only.')\r\n .ensure('Read').required()\r\n .ensure('Speak').required()\r\n .ensure('Write').required()\r\n .on(this);\r\n }\r\n attached() {\r\n const empid = this.jwtService.getEmployeeId();\r\n this.profileService.EmployeePersonalDetailsLanguage()\r\n .then(data => {\r\n this.options= Object.entries(data).map(([key, value])=>({value, key}));\r\n });\r\n this.profileService.UpdatePersonalDetailsLanguage(empid,this.personID)\r\n .then(data => {\r\n this.employeesss = data;\r\n this.Language = this.employeesss.Language;\r\n this.Write = this.employeesss.WriteCompetency;\r\n });\r\n }\r\n cancel() {\r\n this.controller.cancel();\r\n }\r\n activate(data){\r\n this.personID = data.PersonLanguageID;\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 save(){\r\n const refreshEvent = new CustomEvent('refreshEditLanguage');\r\n event.preventDefault();\r\n const empid = this.jwtService.getEmployeeId();\r\n const Language = document.getElementById(\"LanguageName\").value;\r\n const ReadCompetency = document.getElementById(\"readdata\").value;\r\n const SpeakCompetency = document.getElementById(\"speakData\").value;\r\n const WriteCompetency = document.getElementById(\"writeData\").value;\r\n this.controllerFactory.validate()\r\n .then(result => {\r\n if (result.valid ) {\r\n let data = {\r\n EmployeeID: empid,\r\n Language: Language,\r\n ReadCompetency: ReadCompetency,\r\n SpeakCompetency: SpeakCompetency,\r\n WriteCompetency: WriteCompetency,\r\n PersonLanguageID: this.personID,\r\n };\r\n this.profileService.EmployeeLanguageSave(data)\r\n .then(() => {\r\n this.controller.cancel();\r\n this.profileService.GetEmployeeLanguage(empid)\r\n .then(data => {\r\n this.employeelanguage = data;\r\n document.dispatchEvent(refreshEvent); // Trigger the custom event\r\n });\r\n });\r\n\r\n }\r\n\r\n });\r\n }\r\n}\r\n\r\n","import {inject } from 'aurelia-framework';\r\nimport { ProfileService } from '../../../shared/services/profielservice';\r\nimport { JwtService } from '../../../shared/services/jwtservice';\r\nimport flatpickr from 'flatpickr';\r\nimport 'flatpickr/dist/flatpickr.min.css';\r\nimport {DialogService} from 'aurelia-dialog';\r\nimport {ValidationControllerFactory, ValidationRules} from 'aurelia-validation';\r\nimport { Editfamilycomponent } from './family/editfamily/editfamilycomponent';\r\nimport { Editlanguagecomponent } from './language/editlanguage/editlanguagecomponent';\r\nimport { AddNewLanguage } from './language/addnewlanguage/addnewlanguagecomponent';\r\nimport { Addfamilycomponent } from './family/addnewfamily/addfamilycomponent';\r\nimport { AlertpopupComponent } from '../../alertpopup/alertpopupcomponent';\r\nimport Scrollbar from 'smooth-scrollbar';\r\nimport { DialogController } from 'aurelia-dialog';\r\nimport { Router } from 'aurelia-router';\r\nimport {config} from '../../../shared/services/config';\r\n\r\n@inject(DialogController,ProfileService,JwtService,ValidationControllerFactory,DialogService,Router)\r\nexport class Personaldetails {\r\n detailsmessage=false;\r\n MaritalStatus=[];\r\n personalInformation;\r\n pageSize = config.grid_PazeSize;\r\n topicsPageSize = 10;\r\n birthPlaceError = false;\r\n ssnUidError = false;\r\n uanError=false;\r\n panNumberError = false;\r\n LinkedinValidationMessage = false;\r\n twitterValidationMessage=false;\r\n constructor(controller,ProfileService,JwtService,ValidationControllerFactory,dialogService,router) {\r\n this.controller = controller;\r\n this.profileService = ProfileService;\r\n this.jwtService = JwtService;\r\n this.dialogService = dialogService;\r\n this.router = router;\r\n this.controllerFactory = ValidationControllerFactory.createForCurrentScope();\r\n this.empid = this.jwtService.getEmployeeId();\r\n ValidationRules.customRule(\r\n 'dateError',\r\n () =>\r\n '${$displayName}.required'\r\n );\r\n ValidationRules\r\n .ensure('SSNUID').displayName(\"SSN / UID / Aadhar\").required()\r\n .ensure('DateOfBirth').displayName(\"Date of birth\").required()\r\n .ensure('bloodGroup').displayName(\"Blood group\").required()\r\n .on(this);\r\n }\r\n async bind() {\r\n setTimeout(()=>{\r\n Scrollbar.init(document.querySelector('.language-scrollbar'));\r\n Scrollbar.init(document.querySelector('.family-scrollbar'));\r\n },1000);\r\n this.isLoading = true;\r\n }\r\n\r\n activate(){\r\n this.employeelanguage = this.GetEmployeeLanguageData();\r\n this.employeelanguage = this.GetEmployeeEditLanguageData();\r\n this.employeefamily = this.GetEmployeeFamilyData();\r\n this.employeefamily = this.GetEmployeeEditFamilyData();\r\n }\r\n async attached(params) {\r\n const id = this.router.currentInstruction.queryParams.id;\r\n if(id != null && id !='')\r\n {\r\n this.empid=id;\r\n } else{\r\n this.empid=this.jwtService.getEmployeeId();\r\n }\r\n \r\n flatpickr(this.datePickers, {\r\n dateFormat: 'd-m-Y',\r\n minDate: null,\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 onClose: function(selectedDates, dateStr, instance) {\r\n }\r\n });\r\n this.calendarIcons.addEventListener('click', () => {\r\n this.datePickers._flatpickr.open();\r\n });\r\n const bloodgroupdropdown = await this.profileService.EmployeePersonalDetailsGetBloodGroupsForDropdown();\r\n this.BloodGroup = bloodgroupdropdown;\r\n const martialStatus = await this.profileService.EmployeePersonalDetailsGetMaritalStatusForDropdown();\r\n this.MaritalStatus = martialStatus;\r\n const ethinicdropdown = await this.profileService.EmployeePersonalDetailsGetEthinicRacesForDropdown();\r\n this.EthinicRaces = ethinicdropdown;\r\n const nationalityDropdown = await this.profileService.EmployeePersonalDetailsGetNationalitiesForDropdown();\r\n this.Nationalities = nationalityDropdown;\r\n const employeePersonalDetails = await this.profileService.EmployeePersonalDetails(this.empid);\r\n this.personalInformation = employeePersonalDetails;\r\n this.PanNumber = this.personalInformation.PANNumber;\r\n this.SSNUID = this.personalInformation.SSNUID;\r\n this.DateOfBirth=this.personalInformation.DateofBirth;\r\n this.bloodGroup = this.personalInformation.BloodGroup;\r\n this.LinkedinLink=this.personalInformation.LinkedinLink;\r\n this.TwitterLink=this.personalInformation.TwitterLink;\r\n this.nationalities=this.personalInformation.Nationality;\r\n this.maritalStatus=this.personalInformation.MaritalStatus;\r\n this.marriageDate=this.personalInformation.MarriageDate;\r\n this.MilitaryService= this.personalInformation.MilitaryService;\r\n this.ethnicRace=this.personalInformation.EthnicRace;\r\n this.BirthPlace = this.personalInformation.BirthPlace;\r\n this.OtherID=this.personalInformation.OtherID;\r\n const employeeLanguageData = await this.profileService.GetEmployeeLanguage(this.empid);\r\n this.employeelanguage = employeeLanguageData;\r\n document.addEventListener('refreshLanguage', this.GetEmployeeLanguageData);\r\n document.addEventListener('refreshEditLanguage', this.GetEmployeeEditLanguageData);\r\n const employeFamilyData = await this.profileService.GetFamilyMember(this.empid);\r\n this.employeefamily = employeFamilyData;\r\n document.addEventListener('refreshFamily', this.GetEmployeeFamilyData);\r\n document.addEventListener('refreshEditFamily', this.GetEmployeeEditFamilyData);\r\n flatpickr(this.datePicker, {\r\n dateFormat: 'd-m-Y',\r\n minDate: null,\r\n maxDate: null,\r\n defaultDate:this.DateofBirth,\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 /* getOriginalData(){\r\n this.profileService.EmployeePersonalDetails(this.empid)\r\n .then(data => {\r\n this.PanNumber = data.PANNumber;\r\n this.SSNUID = data.SSNUID;\r\n this.LinkedinLink=data.LinkedinLink;\r\n this.DateOfBirth=data.DateofBirth;\r\n this.bloodGroup = data.BloodGroup;\r\n this.TwitterLink=data.TwitterLink;\r\n this.OtherID=data.OtherID;\r\n this.nationalities=data.Nationality;\r\n this.maritalStatus=data.MaritalStatus;\r\n this.ethnicRace=data.EthnicRace;\r\n this.marriageDate=data.MarriageDate;\r\n this.MilitaryService=data.MilitaryService;\r\n this.BirthPlace=data.BirthPlace;\r\n });\r\n this.personalInformation.LinkedinLink=this.LinkedinLink;\r\n this.personalInformation.TwitterLink=this.TwitterLink;\r\n this.personalInformation.OtherID=this.OtherID;\r\n this.personalInformation.MilitaryService=this.MilitaryService;\r\n this.personalInformation.BirthPlace=this.BirthPlace;\r\n }*/\r\n openPopupaddlanguage(user) {\r\n this.dialogService.open({viewModel: AddNewLanguage, model: user});\r\n }\r\n openPopupeditlanguage(data) {\r\n this.dialogService.open({viewModel: Editlanguagecomponent, model: data});\r\n }\r\n showPopupaddfamily(user) {\r\n this.dialogService.open({viewModel: Addfamilycomponent, model: user});\r\n }\r\n showPopupeditfamily(data) {\r\n this.dialogService.open({viewModel: Editfamilycomponent, model: data});\r\n }\r\n cancelpersonal(){\r\n location.reload();\r\n //this.controller.cancel();\r\n }\r\n GetEmployeeLanguageData = () => {\r\n this.profileService.GetEmployeeLanguage(this.empid)\r\n .then(data => {\r\n this.employeelanguage = data;\r\n this.Languagesucess = \"Language added successfully\";\r\n this.languagemessage = true;\r\n setTimeout(() =>{\r\n this.Languagesucess = null;\r\n },3000)\r\n });\r\n };\r\n GetEmployeeEditLanguageData = () => {\r\n this.profileService.GetEmployeeLanguage(this.empid)\r\n .then(data => {\r\n this.employeelanguage = data;\r\n this.Languagesucess = \"Language updated successfully\";\r\n this.languagemessage = true;\r\n setTimeout(() =>{\r\n this.Languagesucess = null;\r\n },3000)\r\n\r\n });\r\n };\r\n GetEmployeeFamilyData = () => {\r\n this.profileService.GetFamilyMember(this.empid)\r\n .then(data => {\r\n this.employeefamily = data;\r\n this.Familysucess = \"Family member added successfully \";\r\n this.familymessage = true;\r\n setTimeout(() =>{\r\n this.Familysucess = null;\r\n },3000)\r\n });\r\n };\r\n GetEmployeeEditFamilyData = () => {\r\n this.profileService.GetFamilyMember(this.empid)\r\n .then(data => {\r\n this.employeefamily = data;\r\n this.Familysucess = \"Family member updated successfully \";\r\n this.familymessage = true;\r\n setTimeout(() =>{\r\n this.Familysucess = null;\r\n },3000)\r\n });\r\n };\r\n validateBirthplace(event) {\r\n const inputElement = event.target;\r\n const inputValue = inputElement.value;\r\n const onlyCharactersRegex = /^[A-Za-z\\s]*$/;\r\n if (!onlyCharactersRegex.test(inputValue)) {\r\n this.birthPlaceError = true;\r\n } else {\r\n this.birthPlaceError = false;\r\n }\r\n }\r\n validatePanNumberInput(event) {\r\n const inputElement = event.target;\r\n const inputValue = inputElement.value;\r\n const alphanumericRegex =/^[A-Z]{5}\\d{4}[A-Z]$/;\r\n ///^[A-Za-z0-9]{10}$/;\r\n\r\n if (!alphanumericRegex.test(inputValue)) {\r\n if (inputValue){\r\n this.panNumberError = true;\r\n }else {\r\n this.panNumberError = false;\r\n }\r\n } else {\r\n //this.PanNumberErrors = [];\r\n this.panNumberError = false;\r\n }\r\n }\r\n validateLinkedInURL(event) {\r\n // const entervalue = event.target\r\n // const inputValue = entervalue.value;\r\n // const enterurl=includes('linkedin.com');\r\n // if (!enterurl.test(inputValue)) {\r\n const inputElement = event.target;\r\n const inputValue=inputElement.value;\r\n const enterurl = /linkedin\\.com/;\r\n\r\n if (!enterurl.test(inputValue)) {\r\n if (inputValue){\r\n this.LinkedinValidationMessage = true;\r\n } else {\r\n this.LinkedinValidationMessage = false;\r\n\r\n }\r\n } else {\r\n this.LinkedinValidationMessage = false;\r\n }\r\n }\r\n validatetwitterInURL(event) {\r\n //const enteredURL = event.target.value;\r\n const inputElement = event.target;\r\n const inputValue=inputElement.value;\r\n const enterurl = /twitter\\.com/;\r\n\r\n if (!enterurl.test(inputValue)) {\r\n if (inputValue) {\r\n this.twitterValidationMessage = true;\r\n }else {\r\n this.twitterValidationMessage = false;\r\n }\r\n } else {\r\n this.twitterValidationMessage = false;\r\n }\r\n }\r\n // validateSSNUIDInput(event) {\r\n // const inputElement = event.target;\r\n // const inputValue = inputElement.value;\r\n // const onlyNumbersRegex = /^[0-9]*$/;\r\n // if (!onlyNumbersRegex.test(inputValue)) {\r\n //\r\n // this.ssnUidError = true;\r\n // } else {\r\n // this.SSNUIDErrors = [];\r\n // this.ssnUidError = false;\r\n // }\r\n // }\r\n validateSSNUIDInput(event) {\r\n const inputElement = event.target;\r\n const inputValue = inputElement.value;\r\n const onlyNumbersRegex = /^[0-9]*$/;\r\n if (!onlyNumbersRegex.test(inputValue)) {\r\n this.ssnUidError = true;\r\n } else {\r\n this.SSNUIDErrors = [];\r\n this.ssnUidError = false;\r\n }\r\n }\r\n validateUANInput(event) {\r\n const inputElement = event.target;\r\n const inputValue = inputElement.value;\r\n const onlyNumbersRegex = /^[0-9]*$/;\r\n if (!onlyNumbersRegex.test(inputValue)) {\r\n this.uanError = true;\r\n } else {\r\n this.uanErrors = [];\r\n this.uanError = false;\r\n }\r\n }\r\n\r\n save() {\r\n const refreshEvent = new CustomEvent('refreshData');\r\n event.preventDefault();\r\n this.errors = null;\r\n this.controllerFactory.validate()\r\n .then(result => {\r\n if (result.valid && !this.panNumberError && !this.birthPlaceError && !this.ssnUidError && !this.LinkedinValidationMessage && !this.twitterValidationMessage) {\r\n this.errors = null;\r\n /* const dateParts = this.DateOfBirth.split('-');\r\n const day = parseInt(dateParts[0]);\r\n const month = parseInt(dateParts[1]) - 1; // Month is 0-based in JavaScript\r\n const year = parseInt(dateParts[2]);\r\n\r\n const selectedDateOfBirth = new Date(year, month, day);\r\n const today = new Date();\r\n console.log(selectedDateOfBirth);\r\n console.log(today);\r\n\r\n // Calculate the minimum allowed date (18 years ago from the selected date)\r\n const minAllowedYear = year + 18;\r\n const minAllowedDate = new Date(minAllowedYear, month, day);\r\n\r\n if (today < minAllowedDate) {\r\n // Show validation message because age requirement is not met\r\n this.DateofBirthErrors = [{ error: { message: 'You must be at least 18 years old.' } }];\r\n // this.selectedDateIsLessThan18 = true; // Show validation message\r\n }else {*/\r\n let data = {\r\n EmployeeID: this.empid,\r\n DateofBirth: this.DateOfBirth,\r\n BirthPlace: this.personalInformation.BirthPlace,\r\n PANNumber: this.PanNumber,\r\n OtherID: this.personalInformation.OtherID,\r\n EthnicRace: this.ethnicRace,\r\n Nationality: this.nationalities,\r\n MaritalStatus: this.maritalStatus,\r\n MarriageDate: this.marriageDate,\r\n BloodGroup: this.bloodGroup,\r\n MilitaryService: this.personalInformation.MilitaryService,\r\n SSNUID: this.SSNUID,\r\n LinkedinLink: this.personalInformation.LinkedinLink,\r\n TwitterLink: this.personalInformation.TwitterLink,\r\n PersonID: this.personalInformation.PersonID,\r\n };\r\n const hasValidData = Object.values(data).some(value => value !== \"--\");\r\n if (hasValidData ) {\r\n this.profileService.SavePostPersonInformation(data)\r\n .then(data => {\r\n if (this.personalInformation.PersonID === 0) {\r\n this.personaldetailsmessage = \" Personal details saved successfully\";\r\n this.detailsmessage = true;\r\n this.profileService.EmployeePersonalDetails(this.empid)\r\n .then(data => {\r\n this.personalInformation = data;\r\n // console.log(data);\r\n document.dispatchEvent(refreshEvent);\r\n });\r\n }\r\n if (this.personalInformation.PersonID > 0) {\r\n this.personaldetailsmessage = \" Personal details updated successfully\";\r\n this.detailsmessage = true;\r\n this.profileService.EmployeePersonalDetails(this.empid)\r\n .then(data => {\r\n //console.log(data);\r\n this.personalInformation = data;\r\n document.dispatchEvent(refreshEvent);\r\n });\r\n\r\n }\r\n });\r\n }\r\n }\r\n //}\r\n });\r\n\r\n setTimeout(() => {\r\n this.personaldetailsmessage = null;\r\n }, 3000);\r\n }\r\n async deleteLanguage(data) {\r\n const personID = data.PersonLanguageID;\r\n const result = await this.dialogService.open({\r\n viewModel: AlertpopupComponent,\r\n model: \"\",\r\n }).whenClosed(response => response);\r\n if (result.wasCancelled) {\r\n return;\r\n }\r\n await this.profileService.DeleteEmployeeLanguage(personID, this.empid);\r\n const employeelanguage = await this.profileService.GetEmployeeLanguage(this.empid);\r\n this.employeelanguage = employeelanguage;\r\n this.Deletesucess = \"Language deleted successfully \";\r\n this.deletemessage = true;\r\n setTimeout(() =>{\r\n this.Deletesucess = null;\r\n },3000)\r\n }\r\n async deleteFamily(data) {\r\n this.personID = data.PersonDependantID;\r\n const result = await this.dialogService.open({\r\n viewModel: AlertpopupComponent,\r\n model: \"\",\r\n }).whenClosed(response => response);\r\n\r\n if (result.wasCancelled) {\r\n return;\r\n }\r\n await this.profileService.DeleteEmployeeFamily(this.personID,this.empid);\r\n const employeefamily= await this.profileService.GetFamilyMember(this.empid);\r\n this.employeefamily=employeefamily;\r\n\r\n this.DeleteFamilysucess = \"Family member deleted successfully\";\r\n this.deletefamilymessage = true;\r\n setTimeout(() =>{\r\n this.DeleteFamilysucess = null;\r\n },3000)\r\n\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 resetPage() {\r\n location.reload();\r\n }\r\n\r\n}\r\n","import {inject } from 'aurelia-framework';\r\nimport { ProfileService } from '../../../../shared/services/profielservice';\r\nimport { JwtService } from '../../../../shared/services/jwtservice';\r\nimport { DialogController } from 'aurelia-dialog';\r\nimport flatpickr from \"flatpickr\";\r\nimport {ValidationControllerFactory, ValidationRules} from 'aurelia-validation';\r\n//import Scrollbar from 'smooth-scrollbar';\r\nimport {LoginService} from \"../../../../shared/services/loginservice\";\r\nimport { Router } from 'aurelia-router';\r\n\r\n@inject(DialogController,ProfileService,JwtService,ValidationControllerFactory,Router,LoginService)\r\nexport class Addskillcomponent {\r\n showCertificationFields = false;\r\n showRenivalFields = false;\r\n showOtherFields = false;\r\n options = [];\r\n optionss = [];\r\n Skill = '';\r\n SkillError = [];\r\n CertificationName = '';\r\n selectedOption = null;\r\n certification = [];\r\n selectedCertification = null;\r\n DocumentName='';\r\n controllerFactory;\r\n static inject = [Element];\r\n isDragging = false;\r\n dialog;\r\n constructor(controller,ProfileService,JwtService,controllerFactory,router,loginService) {\r\n this.controller = controller;\r\n this.profileService=ProfileService;\r\n this.jwtService= JwtService;\r\n this.Skill = '';\r\n this.CertificationName = '';\r\n this.router = router;\r\n this.loginService = loginService;\r\n this.controllerFactory = controllerFactory.createForCurrentScope();\r\n ValidationRules.customRule(\r\n 'dateError',\r\n () =>{\r\n if(this.differenceError === true){\r\n return false;\r\n }else{\r\n return true;\r\n }\r\n },\r\n 'Valid from should be less than valid to'\r\n );\r\n ValidationRules.customRule(\r\n 'validEmails',\r\n (value, obj) => {\r\n if (typeof value !== 'string') {\r\n return false;\r\n }\r\n const emails = value.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) {\r\n obj.emailsErrors = ['Invalid email address(es)'];\r\n return false;\r\n }\r\n if (emails.length > 1 && value.indexOf(',') === -1) {\r\n obj.emailsErrors = ['Email(s) should be separated by commas'];\r\n return false;\r\n }\r\n obj.emailsErrors = [];\r\n return true;\r\n },\r\n '${$displayName} is invalid.',\r\n (obj) => ({\r\n obj\r\n })\r\n );\r\n ValidationRules\r\n .ensure('Skill').required().withMessage(\"Skill is required\")\r\n .ensure('Ratings').required().withMessage(\"Rating is required\")\r\n .ensure('SkillAcquiredDate').required().withMessage('Skill acquired date is required')\r\n .ensure('CertificationName').required().withMessage(\"Certification name is required\")\r\n .ensure('ValidFrom').required().withMessage(\"Valid from is required\")\r\n .ensure('ValidTo')\r\n .satisfiesRule('dateError')\r\n .ensure('EmailIDs').required().withMessage('Email id(s) field is required')\r\n .satisfiesRule('validEmails').withMessage('Invalid email address(es) and Email(s) should be separated by commas')\r\n .ensure('notifyEmp')\r\n .satisfies((value, object) => {\r\n return value || object.notifyHR || object.notifyRM || object.notifyOther;\r\n })\r\n .withMessage('Please select at least one notify field.')\r\n .on(this);\r\n }\r\n async bind() {\r\n setTimeout(()=>{ \r\n Scrollbar.init(document.querySelector('.addskill-scrollbar'));\r\n },100)\r\n }\r\n attached(){\r\n\r\n flatpickr(this.LatDatePicker, {\r\n closeOnSelect:true,\r\n dateFormat: 'd-m-Y',\r\n minDate: null,\r\n maxDate: null,\r\n defaultDate: this.dateValue,\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.LastDate=dateStr;\r\n }\r\n });\r\n this.lastdateIcon.addEventListener('click', () => {\r\n this.LatDatePicker._flatpickr.open();\r\n });\r\n flatpickr(this.AcquireddatePicker, {\r\n closeOnSelect:true,\r\n dateFormat: 'd-m-Y',\r\n minDate: null,\r\n maxDate: null,\r\n defaultDate: this.dateValue,\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.AcquiredDate=dateStr;\r\n }\r\n });\r\n this.acquiredIcon.addEventListener('click', () => {\r\n this.AcquireddatePicker._flatpickr.open();\r\n });\r\n this.profileService.GetSkillsRatingDropdown()\r\n .then(data => {\r\n this.options= data;\r\n });\r\n }\r\n cancel() {\r\n this.controller.cancel();\r\n }\r\n handleKeyDown(event) {\r\n if (event.key === 'Enter') {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n async onSkillsSelected() {\r\n const trimmedSkill = this.Skill.trim(); // Remove leading and trailing spaces\r\n this.searcheddata = this.Skill;\r\n if (trimmedSkill.length > 0) {\r\n // Non-empty input, proceed to open the dropdown and perform filtering\r\n this.showEmpDropdown = true;\r\n try {\r\n const response = await this.profileService.GetSkillsDropdown(this.searcheddata);\r\n const data = await response;\r\n this.optionss = Object.entries(data).map(([key, value]) => ({ value, key }));\r\n const searchValue = trimmedSkill.toLowerCase();\r\n this.filteredOptions = this.optionss.filter(option => {\r\n const optionValue = option.value.toLowerCase();\r\n return optionValue.includes(searchValue);\r\n });\r\n } catch (error) {\r\n }\r\n } else {\r\n // Empty input or only spaces, don't open the dropdown\r\n this.showEmpDropdown = false;\r\n this.filteredOptions = [];\r\n }\r\n }\r\n\r\n\r\n selectSkill(feedback) {\r\n\r\n this.Skill = feedback.value;\r\n this.selectedOption = feedback;\r\n this.showEmpDropdown = false;\r\n }\r\n async onCerticationSelected() {\r\n if (this.CertificationName) {\r\n this.showcertificationDropdown = true;\r\n try {\r\n const response = await this.profileService.GetCertificationDropdown(this.CertificationName);\r\n const data = await response;\r\n this.certification = Object.entries(data).map(([key, value]) => ({ value, key }));\r\n this.filteredOptions = this.certification.filter(option => {\r\n const searchValue = this.CertificationName.toLowerCase();\r\n return option.value.toLowerCase().includes(searchValue);\r\n });\r\n\r\n } catch (error) {\r\n }\r\n } else {\r\n this.showcertificationDropdown = false;\r\n this.filteredOptions = [];\r\n }\r\n }\r\n selectCertification(option) {\r\n this.selectedCertification = option;\r\n this.CertificationName = option.value;\r\n this.showcertificationDropdown = false; // Hide the dropdown\r\n }\r\n async toggleCertificationFields(checked) {\r\n this.showCertificationFields = checked;\r\n setTimeout(()=>{\r\n flatpickr(this.ValidFromDatePicker, {\r\n closeOnSelect:true,\r\n dateFormat: 'd-m-Y',\r\n minDate: null,\r\n maxDate: null,\r\n defaultDate: this.dateValue,\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.ValidFromDate=dateStr;\r\n }\r\n });\r\n\r\n this.validfromIcon.addEventListener('click', () => {\r\n this.ValidFromDatePicker._flatpickr.open();\r\n });\r\n\r\n flatpickr(this.ValidToDatePicker, {\r\n closeOnSelect:true,\r\n dateFormat: 'd-m-Y',\r\n minDate: null,\r\n maxDate: null,\r\n defaultDate: this.dateValue,\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.ValidToDate=dateStr;\r\n }\r\n });\r\n this.validtoIcon.addEventListener('click', () => {\r\n this.ValidToDatePicker._flatpickr.open();\r\n },1000);\r\n })\r\n }\r\n toggleRenivalFields(checked) {\r\n this.showRenivalFields = checked;\r\n }\r\n toggleOtherFields(checked){\r\n this.showOtherFields = checked;\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 openFileDialog() {\r\n document.getElementById('attachments').click();\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 calculateDateDifference() {\r\n if (this.ValidFrom && this.ValidTo) {\r\n const fromParts = this.ValidFrom.split('-');\r\n const toParts = this.ValidTo.split('-');\r\n const fromDate = new Date(fromParts[2], fromParts[1] - 1, fromParts[0]);\r\n const toDate = new Date(toParts[2], toParts[1] - 1, toParts[0]);\r\n const differenceInTime = toDate.getTime() - fromDate.getTime();\r\n const differenceInDays = Math.ceil(differenceInTime / (1000 * 3600 * 24));\r\n const years = Math.floor(differenceInDays / 365);\r\n const months = Math.floor((differenceInDays % 365) / 30);\r\n const days = differenceInDays % 30;\r\n const formattedYears = years > 0 ? `${years} Year(s)` : '';\r\n const formattedMonths = months > 0 ? `${months} Month(s)` : '';\r\n const formattedDays = days > 0 ? `${days} Day(s)` : '';\r\n this.dateDifference = `${formattedYears} ${formattedMonths} ${formattedDays}`;\r\n if (differenceInDays < 1) {\r\n this.differenceError = true;\r\n }else{\r\n this.differenceError = false;\r\n }\r\n }\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 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 save() {\r\n const refreshEvent = new CustomEvent('refreshAddSkill');\r\n this.controllerFactory.validate()\r\n .then(result => {\r\n if (result.valid) {\r\n const empid = this.jwtService.getEmployeeId();\r\n let data = {\r\n EmployeeID: empid,\r\n Skill: this.Skill,\r\n SkillRating: this.Ratings,\r\n YearofExperience: this.Experience,\r\n CertificationName: this.CertificationName,\r\n Comments:this.comments,\r\n CertificationIND:this.havecertification,\r\n IsCertificationRenewable:this.isRenewable,\r\n UploadDocuments:this.file,\r\n DocumentName:this.DocumentName,\r\n SkillAcquired:this.SkillAcquiredDate,\r\n SkillLastUsed:this.SkillLastUsed,\r\n DocumentPath:this.DocumentPath,\r\n NotifyEmpInd:this.notifyEmp,\r\n NotifyOtherInd:this.notifyOther,\r\n NotifyHRInd:this.notifyHR,\r\n NotifyRMInd:this.notifyRM,\r\n NotifyOtherEmailIDs:this.EmailIDs,\r\n PersonSkillId:this.personskillId,\r\n ValidFrom:this.ValidFrom,\r\n ValidTo:this.ValidTo,\r\n RemidDaysBeforeExpiryDate:this.remaindBefore,\r\n\r\n\r\n };\r\n this.profileService.GetEmployeeSkills(empid)\r\n .then(existingSkills => {\r\n if (existingSkills.some(skill => skill.Skill === this.Skill)) {\r\n this.errorMessage = 'Skill already exists.';\r\n const errorMessages = document.querySelectorAll(\".error-messages\");\r\n if (errorMessages.length > 0) {\r\n errorMessages[0].scrollIntoView({ behavior: \"smooth\" });\r\n }\r\n } else {\r\n this.profileService.SaveEmployeeSkills(data)\r\n .then(() => {\r\n this.controller.cancel();\r\n this.profileService.GetEmployeeSkills(empid)\r\n .then(data => {\r\n this.employeeskills = data;\r\n document.dispatchEvent(refreshEvent); // Trigger the custom event\r\n });\r\n });\r\n }\r\n });\r\n }\r\n else{\r\n const errorMessages = document.querySelectorAll(\".error-messages\");\r\n if (errorMessages.length > 0) {\r\n errorMessages[0].scrollIntoView({ behavior: \"smooth\" });\r\n }}\r\n });\r\n }\r\n}\r\n","import {inject } from 'aurelia-framework';\r\nimport { ProfileService } from '../../../../shared/services/profielservice';\r\nimport { JwtService } from '../../../../shared/services/jwtservice';\r\nimport { DialogController } from 'aurelia-dialog';\r\nimport flatpickr from \"flatpickr\";\r\nimport {ValidationControllerFactory, ValidationRules} from 'aurelia-validation';\r\n//import Scrollbar from 'smooth-scrollbar';\r\nimport {config} from \"../../../../shared/services/config\";\r\n\r\n@inject(DialogController,ProfileService,JwtService,ValidationControllerFactory)\r\nexport class Editskillcomponent {\r\n showCertificationFields = false;\r\n showRenivalFields = false;\r\n showOtherFields = false;\r\n options = [];\r\n optionss = [];\r\n Skill = '';\r\n CertificationName = '';\r\n selectedOption = null;\r\n certification = [];\r\n selectedCertification = null;\r\n DocumentName='';\r\n viewfile = true;\r\n static inject = [Element];\r\n isDragging = false;\r\n dialog;\r\n constructor(controller,ProfileService,JwtService,controllerFactory) {\r\n this.controller = controller;\r\n this.profileService=ProfileService;\r\n this.jwtService= JwtService;\r\n this.Skill = '';\r\n this.CertificationName = '';\r\n this.controllerFactory = controllerFactory.createForCurrentScope();\r\n ValidationRules.customRule(\r\n 'validEmails',\r\n (value, obj) => {\r\n if (typeof value !== 'string') {\r\n return false;\r\n }\r\n const emails = value.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) {\r\n obj.emailsErrors = ['Invalid email address(es)'];\r\n return false;\r\n }\r\n if (emails.length > 1 && value.indexOf(',') === -1) {\r\n obj.emailsErrors = ['Email(s) should be separated by commas'];\r\n return false;\r\n }\r\n obj.emailsErrors = [];\r\n return true;\r\n },\r\n '${$displayName} is invalid.',\r\n (obj) => ({\r\n obj\r\n })\r\n );\r\n ValidationRules.customRule(\r\n 'dateError',\r\n () =>{\r\n if(this.differenceError === true){\r\n return false;\r\n }else{\r\n return true;\r\n }\r\n },\r\n 'Valid from should be less than valid to'\r\n );\r\n ValidationRules\r\n .ensure('Skill').required().withMessage(\"Skill is required\")\r\n .ensure('SkillRating').required().withMessage(\"Rating is required\")\r\n .ensure('SkillAcquiredDate').required().withMessage(\"Skill acquired date is required\")\r\n .ensure('CertificationName').required().withMessage(\"Certification name is required\")\r\n .ensure('ValidFrom').required().withMessage(\"Valid from date is required\")\r\n .ensure('ValidTo')\r\n .satisfiesRule('dateError')\r\n .ensure('NotifyEmployee')\r\n .satisfies((value, object) => {\r\n return value || object.NotifyHR || object.NotifyRM || object.NotifyOther;\r\n })\r\n .withMessage('Please select at least one notify field.')\r\n .ensure('EmailIDs').required().withMessage('Email id(s) field is required')\r\n .satisfiesRule('validEmails').withMessage('Invalid email address(es) and Email(s) should be separated by commas')\r\n .on(this);\r\n }\r\n async bind() {\r\n setTimeout(()=>{ \r\n Scrollbar.init(document.querySelector('.editskill-scrollbar'));\r\n },100)\r\n }\r\n activate(data){\r\n this.employeeskills =data;\r\n this.PersonSkillId = this.employeeskills.PersonSkillId;\r\n this.Skill = this.employeeskills.Skill;\r\n this.Experience = this.employeeskills.YearofExperience;\r\n this.SkillRating = this.employeeskills.SkillRating;\r\n this.SkillAcquiredDate = this.employeeskills.SkillAcquired;\r\n this.SkillLastUsed = this.employeeskills.SkillLastUsed;\r\n this.havecertification = this.employeeskills.CertificationIND;\r\n if( this.havecertification === true){\r\n this.showCertificationFields = true;\r\n }else if(this.havecertification === false){\r\n this.showCertificationFields = false;\r\n }\r\n this.CertificationName = this.employeeskills.CertificationName;\r\n this.ValidFrom = this.employeeskills.ValidFrom;\r\n this.ValidTo = this.employeeskills.ValidTo;\r\n this.IsCertificationRenewable = this.employeeskills.IsCertificationRenewable;\r\n if(this.IsCertificationRenewable === true){\r\n this.showRenivalFields = true;\r\n }else if(this.IsCertificationRenewable === false){\r\n this.showRenivalFields = false;\r\n }\r\n this.RemidDaysBeforeExpiryDate = this.employeeskills.RemidDaysBeforeExpiryDate;\r\n this.NotifyEmployee = this.employeeskills.NotifyEmpInd;\r\n this.NotifyHR = this.employeeskills.NotifyHRInd;\r\n this.NotifyRM = this.employeeskills.NotifyRMInd;\r\n this.NotifyOther = this.employeeskills.NotifyOtherInd;\r\n if(this.NotifyOther === true){\r\n this.showOtherFields = true;\r\n }else if(this.NotifyOther === false){\r\n this.showOtherFields = false;\r\n }\r\n this.EmailIDs = this.employeeskills.NotifyOtherEmailIDs;\r\n this.uploadfile = this.employeeskills.UploadDocuments;\r\n if (this.employeeskills.UploadDocuments) {\r\n this.file = this.employeeskills.UploadDocuments;\r\n this.DocumentName = this.employeeskills.UploadDocuments; // Set the desired file name\r\n this.DocumentNameDisplay = this.employeeskills.DocumentNameDisplay; // Set the desired file name\r\n }\r\n this.comments = this.employeeskills.Comments;\r\n }\r\n attached(){\r\n this.ValidFromToflatpicker();\r\n flatpickr(this.LatDatePicker, {\r\n closeOnSelect:true,\r\n dateFormat: 'd-m-Y',\r\n minDate: null,\r\n maxDate: null,\r\n defaultDate: this.dateValue,\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.SkillLastUsed=dateStr;\r\n }\r\n });\r\n\r\n this.lastdateIcon.addEventListener('click', () => {\r\n this.LatDatePicker._flatpickr.open();\r\n });\r\n flatpickr(this.AcquireddatePicker, {\r\n closeOnSelect:true,\r\n dateFormat: 'd-m-Y',\r\n minDate: null,\r\n maxDate: null,\r\n defaultDate: this.dateValue,\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.SkillAcquiredDate=dateStr;\r\n }\r\n });\r\n\r\n this.acquiredIcon.addEventListener('click', () => {\r\n this.AcquireddatePicker._flatpickr.open();\r\n });\r\n this.profileService.GetSkillsRatingDropdown()\r\n .then(data => {\r\n this.options= data;\r\n });\r\n }\r\n cancel() {\r\n this.controller.cancel();\r\n }\r\n handleKeyDown(event) {\r\n if (event.key === 'Enter') {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n async onSkillsSelected() {\r\n const trimmedSkill = this.Skill.trim(); // Remove leading and trailing spaces\r\n this.searchedskill = this.Skill;\r\n if (trimmedSkill.length > 0) {\r\n // Non-empty input, proceed to open the dropdown and perform filtering\r\n this.showEmpDropdown = true;\r\n try {\r\n const response = await this.profileService.GetSkillsDropdown(this.searchedskill);\r\n const data = await response;\r\n this.optionss = Object.entries(data).map(([key, value]) => ({ value, key }));\r\n const searchValue = trimmedSkill.toLowerCase();\r\n this.filteredOptions = this.optionss.filter(option => {\r\n const optionValue = option.value.toLowerCase();\r\n return optionValue.includes(searchValue);\r\n });\r\n } catch (error) {\r\n // Handle errors\r\n }\r\n } else {\r\n // Empty input or only spaces, don't open the dropdown\r\n this.showEmpDropdown = false;\r\n this.filteredOptions = [];\r\n }\r\n }\r\n selectSkill(option) {\r\n this.selectedOption = option;\r\n this.Skill = option.value;\r\n this.showEmpDropdown = false;\r\n }\r\n async onCerticationSelected() {\r\n if (this.CertificationName) {\r\n this.showcertificationDropdown = true;\r\n try {\r\n const response = await this.profileService.GetCertificationDropdown(this.CertificationName);\r\n const data = await response;\r\n this.certification = Object.entries(data).map(([key, value]) => ({ value, key }));\r\n this.filteredOptions = this.certification.filter(option => {\r\n const searchValue = this.CertificationName.toLowerCase();\r\n return option.value.toLowerCase().includes(searchValue);\r\n });\r\n } catch (error) {\r\n }\r\n } else {\r\n this.showcertificationDropdown = false;\r\n this.filteredOptions = [];\r\n }\r\n }\r\n selectCertification(option) {\r\n this.selectedCertification = option;\r\n this.CertificationName = option.value;\r\n this.showcertificationDropdown = false;\r\n }\r\n async toggleCertificationFields(checked) {\r\n this.showCertificationFields = checked;\r\n this.ValidFromToflatpicker();\r\n }\r\n ValidFromToflatpicker(){\r\n flatpickr(this.ValidFromDatePicker, {\r\n closeOnSelect: true,\r\n dateFormat: 'd-m-Y',\r\n minDate: null,\r\n maxDate: null,\r\n defaultDate: this.dateValue,\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.ValidFrom = dateStr;\r\n }\r\n });\r\n\r\n this.validfromIcon.addEventListener('click', () => {\r\n this.ValidFromDatePicker._flatpickr.open();\r\n });\r\n flatpickr(this.ValidToDatePicker, {\r\n closeOnSelect: true,\r\n dateFormat: 'd-m-Y',\r\n minDate: null,\r\n maxDate: null,\r\n defaultDate: this.dateValue,\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.ValidTo = dateStr;\r\n }\r\n });\r\n this.validtoIcon.addEventListener('click', () => {\r\n this.ValidToDatePicker._flatpickr.open();\r\n });\r\n }\r\n\r\n toggleRenivalFields(checked) {\r\n this.showRenivalFields = checked;\r\n }\r\n toggleOtherFields(checked){\r\n this.showOtherFields = checked;\r\n }\r\n handleFileSelect(files) {\r\n this.viewfile=false;\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 downloadFile(viewPath) {\r\n const downloadUrl = config.api_img_url + viewPath;\r\n const link = document.createElement('a');\r\n link.href = downloadUrl;\r\n link.target = '_blank';\r\n link.download = downloadUrl;\r\n link.click();\r\n }\r\n openFileDialog() {\r\n document.getElementById('attachments').click();\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 = ''; // Clear the file input value\r\n }\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 calculateDateDifference() {\r\n if (this.ValidFrom && this.ValidTo) {\r\n const fromParts = this.ValidFrom.split('-');\r\n const toParts = this.ValidTo.split('-');\r\n const fromDate = new Date(fromParts[2], fromParts[1] - 1, fromParts[0]);\r\n const toDate = new Date(toParts[2], toParts[1] - 1, toParts[0]);\r\n const differenceInTime = toDate.getTime() - fromDate.getTime();\r\n const differenceInDays = Math.ceil(differenceInTime / (1000 * 3600 * 24));\r\n const years = Math.floor(differenceInDays / 365);\r\n const months = Math.floor((differenceInDays % 365) / 30);\r\n const days = differenceInDays % 30;\r\n const formattedYears = years > 0 ? `${years} Year(s)` : '';\r\n const formattedMonths = months > 0 ? `${months} Month(s)` : '';\r\n const formattedDays = days > 0 ? `${days} Day(s)` : '';\r\n this.dateDifference = `${formattedYears} ${formattedMonths} ${formattedDays}`;\r\n if (differenceInDays < 1) {\r\n this.differenceError = true;\r\n }else{\r\n this.differenceError = false;\r\n }\r\n }\r\n }\r\n save() {\r\n const refreshEvent = new CustomEvent('refreshEditSkill');\r\n const SkillRating = document.getElementById(\"ratings\").value;\r\n let NotifyEmployee = false;\r\n let NotifyHR = false;\r\n let NotifyRM = false;\r\n let NotifyOther = false;\r\n let havecertification = false;\r\n let IsCertificationRenewable = false;\r\n if(this.employeeskills.NotifyEmpInd === true){\r\n NotifyEmployee = true;\r\n }\r\n if(this.employeeskills.NotifyHRInd === true){\r\n NotifyHR = true;\r\n }\r\n if(this.employeeskills.NotifyOtherInd === true){\r\n NotifyOther = true;\r\n }\r\n if(this.employeeskills.CertificationIND === true){\r\n havecertification = true;\r\n }\r\n if(this.employeeskills.IsCertificationRenewable === true){\r\n IsCertificationRenewable = true;\r\n }\r\n if(this.employeeskills.NotifyRMInd){\r\n NotifyRM = true;\r\n }\r\n\r\n this.controllerFactory.validate()\r\n .then(result => {\r\n if (result.valid) {\r\n const empid = this.jwtService.getEmployeeId();\r\n if (this.havecertification === true) {\r\n if (this.CertificationName === '' || this.CertificationName.length < 0) {\r\n this.certificatenameerror = 'Certification name is required';\r\n const errorMessages = document.querySelectorAll(\".error-messages\");\r\n if (errorMessages.length > 0) {\r\n errorMessages[0].scrollIntoView({ behavior: \"smooth\" });\r\n }\r\n }\r\n if (this.ValidFrom == null || this.ValidFrom === '' || this.CertificationName === '' || this.CertificationName.length < 1) {\r\n if (this.ValidFrom == null || this.ValidFrom === '') {\r\n this.validfromerror = 'Valid from date is required';\r\n const errorMessages = document.querySelectorAll(\".error-messages\");\r\n if (errorMessages.length > 0) {\r\n errorMessages[0].scrollIntoView({ behavior: \"smooth\" });\r\n }\r\n }else {\r\n this.validfromerror = \"\";\r\n }\r\n if (this.CertificationName === '' || this.CertificationName.length < 0) {\r\n this.certificatenameerror = 'Certification name is required';\r\n const errorMessages = document.querySelectorAll(\".error-messages\");\r\n if (errorMessages.length > 0) {\r\n errorMessages[0].scrollIntoView({ behavior: \"smooth\" });\r\n }\r\n\r\n }else{\r\n this.certificatenameerror = \"\";\r\n }\r\n return;\r\n }\r\n }\r\n let data = {\r\n EmployeeID: empid,\r\n Skill: this.Skill,\r\n SkillRating: SkillRating,\r\n YearofExperience: this.Experience,\r\n CertificationName: this.CertificationName,\r\n Comments: this.comments,\r\n CertificationIND: this.havecertification,\r\n IsCertificationRenewable: this.IsCertificationRenewable,\r\n UploadDocuments: this.file,\r\n DocumentName: this.DocumentName,\r\n SkillAcquired: this.SkillAcquiredDate,\r\n SkillLastUsed: this.SkillLastUsed,\r\n DocumentPath: this.DocumentPath,\r\n NotifyEmpInd: this.NotifyEmployee,\r\n NotifyOtherInd: this.NotifyOther,\r\n NotifyHRInd: this.NotifyHR,\r\n NotifyRMInd: this.NotifyRM,\r\n NotifyOtherEmailIDs: this.EmailIDs,\r\n PersonSkillId: this.PersonSkillId,\r\n ValidFrom: this.ValidFrom,\r\n ValidTo: this.ValidTo,\r\n RemidDaysBeforeExpiryDate: this.RemidDaysBeforeExpiryDate,\r\n };\r\n const SkillValidatecheck = {\r\n EmployeeID: empid,\r\n Skill: this.Skill,\r\n PersonSkillId: this.PersonSkillId,\r\n };\r\n this.profileService.SkillAvoidDuplicate(SkillValidatecheck).then(skill => {\r\n if (skill === 1) {\r\n this.errorMessage = true;\r\n this.errorMessage = 'Skill already exists.';\r\n const errorMessages = document.querySelectorAll(\".error-messages\");\r\n if (errorMessages.length > 0) {\r\n errorMessages[0].scrollIntoView({ behavior: \"smooth\" });\r\n }\r\n setTimeout(() => {\r\n this.errorMessage = null\r\n }, 5000);\r\n }\r\n else {\r\n this.profileService.SaveEmployeeSkills(data)\r\n .then(() => {\r\n this.controller.cancel();\r\n this.profileService.GetEmployeeSkills(empid)\r\n .then(data => {\r\n this.employeeskills = data;\r\n document.dispatchEvent(refreshEvent); // Trigger the custom event\r\n });\r\n });\r\n }\r\n\r\n });\r\n\r\n } else{\r\n const errorMessages = document.querySelectorAll(\".error-messages\");\r\n if (errorMessages.length > 0) {\r\n errorMessages[0].scrollIntoView({ behavior: \"smooth\" });\r\n }}\r\n });\r\n }\r\n}\r\n","import {inject } from 'aurelia-framework';\r\nimport { ProfileService } from '../../../shared/services/profielservice';\r\nimport { JwtService } from '../../../shared/services/jwtservice';\r\nimport flatpickr from 'flatpickr';\r\nimport 'flatpickr/dist/flatpickr.min.css';\r\nimport {DialogService} from 'aurelia-dialog';\r\nimport {ValidationControllerFactory, ValidationRules} from 'aurelia-validation';\r\nimport { AlertpopupComponent } from '../../alertpopup/alertpopupcomponent';\r\nimport { Addskillcomponent } from './addemployeeskills/addskillcomponent';\r\nimport { Editskillcomponent } from './editemployeeskills/editskillcomponent';\r\nimport Scrollbar from 'smooth-scrollbar';\r\nimport { Router } from 'aurelia-router';\r\nimport {config} from '../../../shared/services/config';\r\nimport {LoginService} from \"../../../shared/services/loginservice\";\r\n\r\n@inject(ProfileService,JwtService,DialogService,ValidationControllerFactory,Router,LoginService)\r\nexport class Skills {\r\n pageSize = config.grid_PazeSize;\r\n skillmessage = false;\r\n deletemessage = false;\r\n\r\n constructor(profileService,jwtService,dialogService,controllerFactory,router,loginService) {\r\n this.profileService = profileService;\r\n this.jwtService = jwtService;\r\n this.dialogService = dialogService;\r\n this.controller = controllerFactory.createForCurrentScope();\r\n this.router = router;\r\n this.loginService = loginService;\r\n this.empid = this.jwtService.getEmployeeId();\r\n }\r\n async bind() {\r\n setTimeout(()=>{ \r\n Scrollbar.init(document.querySelector('.skills-scrollbar'));\r\n },100)\r\n }\r\nactivate(){\r\n this.employeeskills = this.GetEmployeeSkillsDataADD();\r\n this.employeeskills = this.GetEmployeeSkillsDataEDIT();\r\n}\r\n async attached(params) {\r\n\r\n const id = this.router.currentInstruction.queryParams.id;\r\n if(id != null && id !='' && id !=undefined)\r\n {\r\n this.empid=id;\r\n }\r\n else{\r\n this.empid=this.jwtService.getEmployeeId();\r\n }\r\n\r\n const employeeSkillsData = await this.profileService.GetEmployeeSkills(this.empid);\r\n this.employeeskills = employeeSkillsData;\r\n document.addEventListener('refreshAddSkill', this.GetEmployeeSkillsDataADD);\r\n document.addEventListener('refreshEditSkill', this.GetEmployeeSkillsDataEDIT);\r\n }\r\n AddnewskillPopup(data) {\r\n this.dialogService.open({viewModel: Addskillcomponent, model: data});\r\n}\r\nEditskillPopup(data) {\r\n this.dialogService.open({viewModel: Editskillcomponent, model: data});\r\n}\r\nasync deleteEmployeeSkills(data) {\r\n const SkillId = data.PersonSkillId;\r\n const result = await this.dialogService.open({\r\n viewModel: AlertpopupComponent,\r\n model: \"\",\r\n }).whenClosed(response => response);\r\n if (result.wasCancelled) {\r\n return;\r\n }\r\n await this.profileService.DeleteEmployeeSkills(SkillId, this.empid);\r\n const employeeSkills = await this.profileService.GetEmployeeSkills(this.empid);\r\n this.employeeskills = employeeSkills;\r\n this.Deletesucess = \"Skills deleted successfully\";\r\n this.deletemessage = true;\r\n setTimeout(() =>{\r\n this.Deletesucess = null;\r\n },3000)\r\n}\r\nGetEmployeeSkillsDataADD = () => {\r\n this.profileService.GetEmployeeSkills(this.empid)\r\n .then(data => {\r\n this.employeeskills = data;\r\n this.Skillsucess = \"Skills added successfully\";\r\n this.skillmessage = true;\r\n setTimeout(() =>{\r\n this.Skillsucess = null;\r\n },3000)\r\n });\r\n };\r\n GetEmployeeSkillsDataEDIT = () => {\r\n this.profileService.GetEmployeeSkills(this.empid)\r\n .then(data => {\r\n this.employeeskills = data;\r\n this.Skillsucess = \"Skills updated successfully\";\r\n this.skillmessage = true;\r\n setTimeout(() =>{\r\n this.Skillsucess = null;\r\n },3000)\r\n });\r\n };\r\n\r\n}\r\n","// Module\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/password-show.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;","// 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/datepicker.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;","// 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/datepicker.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;","// 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/datepicker.svg\", import.meta.url);\nvar ___HTML_LOADER_IMPORT_1___ = new URL(\"../../../images/edit.svg\", import.meta.url);\nvar ___HTML_LOADER_IMPORT_2___ = new URL(\"../../../images/x-square.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/datepicker.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;","// 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//datepicker.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;","// 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/edit.svg\", import.meta.url);\nvar ___HTML_LOADER_IMPORT_1___ = new URL(\"../../../images/x-square.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 code = \"\\r\\n\";\n// Exports\nexport default code;"],"names":[],"sourceRoot":""}