UPDATE EMV_RECRUIT

parent 9f24b952
...@@ -102,14 +102,16 @@ ...@@ -102,14 +102,16 @@
<MENU group="EM05A21" code="EM05A21" ename="Follow UP Evaluation" tname="แบบติดตามประสิทธิผลการฝึกอบรม" link="TRN_FOLLOWUP_BOSS.jsp" target="" page="EMPVIEW/TRN_FOLLOWUP_BOSS,EMPVIEW/TRN_FOLLOWUP_FORM" activepermis="1" edit="0" save="0" delete="0" icon="fa-book"/> <MENU group="EM05A21" code="EM05A21" ename="Follow UP Evaluation" tname="แบบติดตามประสิทธิผลการฝึกอบรม" link="TRN_FOLLOWUP_BOSS.jsp" target="" page="EMPVIEW/TRN_FOLLOWUP_BOSS,EMPVIEW/TRN_FOLLOWUP_FORM" activepermis="1" edit="0" save="0" delete="0" icon="fa-book"/>
</MENU> </MENU>
<MENU group="EMP05A05" code="EMP05A05" ename="Recruitment" tname="การสรรหาพนักงาน" link="javascript:;" icon="fa-users"> <MENU group="EMP05A05" code="EMP05A05" ename="Recruitment" tname="การสรรหาพนักงาน" link="javascript:;" icon="fa-users">
<MENU group="EM05A04" code="EM05A04" ename="Manpower Report " tname="รายงานอัตรากำลังพล" link="EMV023.jsp" target="" page="EMPVIEW/EMV023,EMPVIEW/EMV007" activepermis="1" edit="0" save="0" delete="0" icon="fa-users"/> <MENU group="EM05A01" code="EM05A01" ename="Applicant" tname="รายชื่อผู้สมัครงาน" link="REC_APPLICANT.jsp" target="" page="REC_APPLICANT.jsp" activepermis="1" edit="0" save="0" delete="0" icon="fa-users"/>
<MENU group="EM05A13" code="EM05A13" ename="Interview Schedule" tname="ตารางสัมภาษณ์งาน" link="REV004.jsp" target="" page="EMPVIEW/REV004,EMPVIEW/REV001" activepermis="1" edit="0" save="0" delete="0" icon="fa-calendar"/> <MENU group="EM05A02" code="EM05A02" ename="Candidate" tname="รายชื่อผู้ผ่านการคัดเลือก" link="REC_CANDIDATE.jsp" target="" page="REC_CANDIDATE.jsp" activepermis="1" edit="0" save="0" delete="0" icon="fa-users"/>
<!-- <MENU group="EM05A04" code="EM05A04" ename="Manpower Report " tname="รายงานอัตรากำลังพล" link="EMV023.jsp" target="" page="EMPVIEW/EMV023,EMPVIEW/EMV007" activepermis="1" edit="0" save="0" delete="0" icon="fa-users"/>
<MENU group="EM05A13" code="EM05A13" ename="Interview Schedule" tname="ต ารางสัมภาษณ์งาน" link="REV004.jsp" target="" page="EMPVIEW/REV004,EMPVIEW/REV001" activepermis="1" edit="0" save="0" delete="0" icon="fa-calendar"/>
<MENU group="EM05A14" code="EM05A14" ename="Input Interview Score" tname="บันทึกคะแนนสัมภาษณ์" link="REV005.jsp" target="" page="EMPVIEW/REV005,EMPVIEW/REV006" activepermis="1" edit="0" save="0" delete="0" icon="fa-pencil-square-o"/> <MENU group="EM05A14" code="EM05A14" ename="Input Interview Score" tname="บันทึกคะแนนสัมภาษณ์" link="REV005.jsp" target="" page="EMPVIEW/REV005,EMPVIEW/REV006" activepermis="1" edit="0" save="0" delete="0" icon="fa-pencil-square-o"/>
<MENU group="EM05A16" code="EM05A16" ename="Conclusion of Recruitment" tname="สรุปผลการสรรหา" link="REV010.jsp" target="" page="EMPVIEW/REV010,EMPVIEW/REV011" activepermis="1" edit="0" save="0" delete="0" icon="fa-file-text-o"/> <MENU group="EM05A16" code="EM05A16" ename="Conclusion of Recruitment" tname="สรุปผลการสรรหา" link="REV010.jsp" target="" page="EMPVIEW/REV010,EMPVIEW/REV011" activepermis="1" edit="0" save="0" delete="0" icon="fa-file-text-o"/>
<MENU group="EM05A12" code="EM05A12" ename="Target Applicant" tname="รายชื่อกลุ่มเป้าหมายผู้สมัคร" link="REV003.jsp" target="" page="EMPVIEW/REV003,EMPVIEW/REV001" activepermis="1" edit="0" save="0" delete="0" icon="fa-users"/> <MENU group="EM05A12" code="EM05A12" ename="Target Applicant" tname="รายชื่อกลุ่มเป้าหมายผู้สมัคร" link="REV003.jsp" target="" page="EMPVIEW/REV003,EMPVIEW/REV001" activepermis="1" edit="0" save="0" delete="0" icon="fa-users"/>
<MENU group="EM05A15" code="EM05A15" ename="Interview Score Report" tname="รายงานคะแนนสัมภาษณ์" link="REV007.jsp" target="" page="EMPVIEW/REV007,EMPVIEW/REV001,EMPVIEW/REV009,EMPVIEW/REV008" activepermis="1" edit="0" save="0" delete="0" icon="fa-file-text-o"/> <MENU group="EM05A15" code="EM05A15" ename="Interview Score Report" tname="รายงานคะแนนสัมภาษณ์" link="REV007.jsp" target="" page="EMPVIEW/REV007,EMPVIEW/REV001,EMPVIEW/REV009,EMPVIEW/REV008" activepermis="1" edit="0" save="0" delete="0" icon="fa-file-text-o"/>
<MENU group="EM05A20" code="EM05A20" ename="Interview Appraisal" tname="ประเมินสัมภาษณ์งาน" link="APS_EMV006.jsp" target="" page="EMPVIEW/APS_EMV006,EMPVIEW/APS_EMV704" activepermis="1" edit="0" save="0" delete="0" icon="fa-pencil-square-o"/> <MENU group="EM05A20" code="EM05A20" ename="Interview Appraisal" tname="ประเมินสัมภาษณ์งาน" link="APS_EMV006.jsp" target="" page="EMPVIEW/APS_EMV006,EMPVIEW/APS_EMV704" activepermis="1" edit="0" save="0" delete="0" icon="fa-pencil-square-o"/>
<MENU group="EM05A19" code="EM05A19" ename="Candidate" tname="รายชื่อผู้สมัคร" link="EMV_REC611.jsp" target="" page="EMPVIEW/EMV_REC611,EMPVIEW/EMV_REC612" activepermis="1" edit="0" save="0" delete="0" icon="fa-list"/> <MENU group="EM05A19" code="EM05A19" ename="Candidate" tname="รายชื่อผู้สมัคร" link="EMV_REC611.jsp" target="" page="EMPVIEW/EMV_REC611,EMPVIEW/EMV_REC612" activepermis="1" edit="0" save="0" delete="0" icon="fa-list"/> -->
</MENU> </MENU>
<MENU group="EMP05A07" code="EMP05A07" ename="Appraisal" tname="ประเมินผล" link="javascript:;" icon="fa-users"> <MENU group="EMP05A07" code="EMP05A07" ename="Appraisal" tname="ประเมินผล" link="javascript:;" icon="fa-users">
<MENU code="EM05A22" group="EM05A22" tname="Objective Individuals" ename="Objective Individuals" link="APS_JET_OBJLIST.jsp" target="" page="EMPVIEW/APS_JET_OBJLIST,EMPVIEW/APS_JET_OBJ" activepermis="1" edit="0" save="0" delete="0" icon="fa-pencil-square-o"/> <MENU code="EM05A22" group="EM05A22" tname="Objective Individuals" ename="Objective Individuals" link="APS_JET_OBJLIST.jsp" target="" page="EMPVIEW/APS_JET_OBJLIST,EMPVIEW/APS_JET_OBJ" activepermis="1" edit="0" save="0" delete="0" icon="fa-pencil-square-o"/>
......
'use strict'
angular.module('APPLICANTFORM').controller('listapplicantctrl', function($scope, $http, $sce, ApplicantFormCtrl){
$scope.lang = $('input[name="lang"]').val()
$scope.listApplicant = []
$scope.listCandidate = []
ApplicantFormCtrl.managelistapplicant.query().$promise.then(function(data){
$scope.listApplicant = data.listApplicantData;
$scope.listCandidate = data.listCandidateData;
// console.log(data);
$('.loading-page').css('display', 'none')
})
$scope.goPage = function(id, type){
let cscForm = document.cscform
$('form[name="cscform"]').attr('target','myform');
if(type == 'candidate'){
cscForm.__candidateid.value = id
}else{
cscForm.__applicantid.value = id
}
$('form[name="cscform"]').attr('action','../RECRUIT/FillFormApplicant.jsp');
var winopen = window.open('','myform','left=150,top=150,width=2000,height=2000,toolbar=no,status=yes,scrollbars=yes,resizable=yes');
if (winopen){
$('form[name="cscform"]').submit();
winopen.focus();
}
}
})
angular.module('APPLICANTFORM', [
'myHR'
,'ngResource'
]);
'use strict'
var services = angular.module('APPLICANTFORM');
services.factory('ApplicantFormCtrl', function($resource){
return {
managelistapplicant: $resource('/hr/api/empview/emv_applicant/ListApplicant',{},{
query: {
method: 'GET'
}
}),
};
});
class ApsSwLang {
constructor(lang, site) {
this.lang = lang
this.site = site
this.langData = {}
}
async setLangData(){
var data_lang
await $.getJSON(`JSON/${this.site}/SWLANG_APS.json`, function(result){
data_lang = result
});
this.langData = data_lang
}
translate() {
let jsdata = this.langData[lang]
$("[langcode]").each (function (index)
{
var strTr = jsdata [$(this).attr ('langcode')]
$(this).html (strTr)
});
}
getLangDataObj() {
return this.langData
}
}
angular.module('RECRUIT', [
'ngMaterial',
'ngAnimate',
'ngAria',
'ngMessages',
'myHR',
'ngResource',
'ngSanitize'
]);
angular.module('RECRUIT').config(function($mdThemingProvider) {
var csc = $mdThemingProvider.extendPalette('blue', {
'500' : '0072C6',
'A200' : '0072C6'
});
$mdThemingProvider.definePalette('csc', csc);
$mdThemingProvider.theme('cscTheme')
.primaryPalette('csc')
.accentPalette('csc');
$mdThemingProvider.setDefaultTheme('cscTheme');
});
\ No newline at end of file
/**
* Created by PPMaj on 11/24/2016.
*/
'use strict'
recModule.controller('REC_APPLICANT', ['$scope', '$mdDialog', 'RecService', 'SwapLang', function ($scope, $mdDialog, RecService) {
$scope.isReady = false
$scope.swlang = new swaplang()
$scope.lang = getLang();
$scope.now = ''
$scope.userJobid = ''
$scope.userBu3 = ''
$scope.userBu2 = ''
$scope.isActPosition = ''
$scope.employeeid = ''
$scope.applicants = []
$scope.jobs = []
$scope.basicConfig = {}
$scope.propertyNameIn = ''
$scope.reverseIn = true
$scope.propertyNameEx = ''
$scope.reverseEx = true
$scope.openReqs = []
$scope.buFilter = {}
let cscForm = document.cscform
RecService.RestMrequest.getManPowerRequest().$promise.then(function (data) {
$scope.openReqs = data.result.filter((item) => {
return item.requestStatus === "2"
})
})
let jobSetOne = ['S1001', 'S2001', 'O1001', 'O2001', 'O3001', 'O4001', 'E1001',' M1002']
let jobSetTwo = ['M2002', 'M1003', 'M2001', 'E2001', 'M2003']
let jobSetThree = ['T1001', 'T1002']
$scope.filterDirector = ($item) => {
if (jobSetOne.includes($item.jobid)) {
if ($scope.userJobid === 'M1003' || $scope.userJobid === 'M2002' || $scope.userJobid === 'M2001') {
return $item.bu3.idFromMreq === $scope.userBu3
} else {
return false
}
} else if (jobSetTwo.includes($item.jobid)) {
return $scope.isActPosition === '1'
} else if (jobSetThree.includes($item.jobid)) {
return $scope.userJobid === 'V0001'
} else {
return false
}
}
// $scope.$watch('user', ($res) => {
// if ($res !== '') {
// RecService.RestEmpCenter.getQuery({usernameid: $res}).$promise.then(function ($data) {
// if ($data.result.length > 0) {
// let data = $data.result[0]
// for (let i = 1; i <= 4; i++) {
// $scope.buFilter.viewAll = data.isviewall == '1'
// let currentBu = $scope.buFilter['bu'+i] = {}
// currentBu.active = data['isbu'+i] == '1'
// currentBu.show = data['bu'+i+'status'] == '1'
// currentBu.list = (data['bu'+i+'list'] != '') ? data['bu'+i+'list'].split(',') : []
// }
// }
// })
// }
// })
// $scope.filterBu = ($item) => {
// let chkBu = ($index) => {
// if ($index && !angular.equals($scope.buFilter, {})) {
// if ($scope.buFilter['bu'+$index].active) {
// if ($scope.buFilter['bu'+$index].list.length > 0) {
// if ($scope.buFilter['bu'+$index].show) {
// return $scope.buFilter['bu'+$index].list.includes($item['bu'+$index].id)
// } else {
// return !$scope.buFilter['bu'+$index].list.includes($item['bu'+$index].id)
// }
// } else {
// return true
// }
// } else {
// return true
// }
// }
// }
// if ($scope.buFilter.viewAll) {
// return true
// } else {
// return chkBu(1) && chkBu(2) && chkBu(3) && chkBu(4) && chkBu(5)
// }
// }
$scope.goPages = (appid) => {
cscForm.action = "../RECRUIT/FillFormApplicant.jsp"
cscForm.__applicantid.value = appid
cscForm.target = "_blank"
cscForm.submit()
}
$scope.sortByIn = function(propertyName) {
$scope.reverseIn = ($scope.propertyNameIn === propertyName) ? !$scope.reverseIn : false;
$scope.propertyNameIn = propertyName;
}
$scope.sortByEx = function(propertyName) {
$scope.reverseEx = ($scope.propertyNameEx === propertyName) ? !$scope.reverseEx : false;
$scope.propertyNameEx = propertyName;
}
$scope.availableRequest = ($app) => {
let result = false
const exist = $scope.openReqs.find(($item) => {
return $app.requestid === $item.requestid
})
if (exist) {
let today = new Date($scope.now);
let endDate = new Date(exist.lastDate)
result = daysBetween(today, endDate) >= 0
}
return result
}
RecService.RestMapplicant.getQuery().$promise.then(function ($res) {
$scope.applicants = $res.result
console.log($res.result);
$scope.isReady = true
})
RecService.ManageConfig.query({cname: 'BASIC'}).$promise.then(function (data) {
$scope.basicConfig = data.result.object
})
// $scope.updateWantInterview = ($applicantid, $event) => {
// RecService.RestMapplicant.updateWantInterview({applicantid: $applicantid, wantinterview: $event.target.value}).$promise.then(function ($res) {
// })
// }
$scope.updateWantInterview = ($applicantid, $event ,p_app) => {
if($event.target.value==1){
if (confirm(" ยืนยันข้อมูลการเรียกสัมภาษณ์ ? ")) {
RecService.RestMapplicant.updateWantInterview({applicantid: $applicantid, wantinterview: $event.target.value}).$promise.then(function ($res) {
})
// transfer data to mcandidate
RecService.RestMapplicant.candidate({appid: p_app.applicantid}).$promise.then(() => {
$scope.removeObject(p_app)
//location.reload();
}, (error) => {
alert("เกิดข้อผิดพลาด");
})
//--
}else{
location.reload();
}
}//endif 1
}
$scope.removeObject = (p_app) => {
$scope.applicants.splice($scope.applicants.indexOf(p_app), 1)
}
$scope.filterConditions = ($app) => {
return $app.applicantid === $scope.conditions.filter.applicantid &&
($app.personal.fname === $scope.conditions.filter.name || $app.personal.fname == $scope.conditions.filter.name) &&
$app.jobid === $scope.conditions.filter.jobid &&
$app.wantinterview === $scope.conditions.filter.wantinterview
}
$scope.filterInternal = ($app) => {
return $app.internal == '1'
}
$scope.filterExternal = ($app) => {
return $app.internal == '0'
}
// Jquery
}
])
\ No newline at end of file
angular.module('RECRUIT', [
'ngMaterial',
'ngAnimate',
'ngAria',
'ngMessages',
'myHR',
'ngResource',
'ngSanitize'
]);
angular.module('RECRUIT').config(function($mdThemingProvider) {
var csc = $mdThemingProvider.extendPalette('blue', {
'500' : '0072C6',
'A200' : '0072C6'
});
$mdThemingProvider.definePalette('csc', csc);
$mdThemingProvider.theme('cscTheme')
.primaryPalette('csc')
.accentPalette('csc');
$mdThemingProvider.setDefaultTheme('cscTheme');
});
\ No newline at end of file
/**
* Created by PPMaj on 11/24/2016.
*/
'use strict'
recModule.controller('REC_CANDIDATE', ['$scope', '$mdDialog', 'RecService', 'SwapLang', function ($scope, $mdDialog, RecService) {
$scope.isReady = false
$scope.swlang = new swaplang()
$scope.lang = getLang();
$scope.now = ''
$scope.userJobid = ''
$scope.userBu3 = ''
$scope.userBu2 = ''
$scope.isActPosition = ''
$scope.employeeid = ''
$scope.applicants = []
$scope.jobs = []
$scope.basicConfig = {}
$scope.propertyNameIn = ''
$scope.reverseIn = true
$scope.propertyNameEx = ''
$scope.reverseEx = true
$scope.openReqs = []
$scope.buFilter = {}
let cscForm = document.cscform
RecService.RestMrequest.getManPowerRequest().$promise.then(function (data) {
$scope.openReqs = data.result.filter((item) => {
return item.requestStatus === "2"
})
})
let jobSetOne = ['S1001', 'S2001', 'O1001', 'O2001', 'O3001', 'O4001', 'E1001',' M1002']
let jobSetTwo = ['M2002', 'M1003', 'M2001', 'E2001', 'M2003']
let jobSetThree = ['T1001', 'T1002']
$scope.filterDirector = ($item) => {
if (jobSetOne.includes($item.jobid)) {
if ($scope.userJobid === 'M1003' || $scope.userJobid === 'M2002' || $scope.userJobid === 'M2001') {
return $item.bu3.idFromMreq === $scope.userBu3
} else {
return false
}
} else if (jobSetTwo.includes($item.jobid)) {
return $scope.isActPosition === '1'
} else if (jobSetThree.includes($item.jobid)) {
return $scope.userJobid === 'V0001'
} else {
return false
}
}
// $scope.$watch('user', ($res) => {
// if ($res !== '') {
// RecService.RestEmpCenter.getQuery({usernameid: $res}).$promise.then(function ($data) {
// if ($data.result.length > 0) {
// let data = $data.result[0]
// for (let i = 1; i <= 4; i++) {
// $scope.buFilter.viewAll = data.isviewall == '1'
// let currentBu = $scope.buFilter['bu'+i] = {}
// currentBu.active = data['isbu'+i] == '1'
// currentBu.show = data['bu'+i+'status'] == '1'
// currentBu.list = (data['bu'+i+'list'] != '') ? data['bu'+i+'list'].split(',') : []
// }
// }
// })
// }
// })
// $scope.filterBu = ($item) => {
// let chkBu = ($index) => {
// if ($index && !angular.equals($scope.buFilter, {})) {
// if ($scope.buFilter['bu'+$index].active) {
// if ($scope.buFilter['bu'+$index].list.length > 0) {
// if ($scope.buFilter['bu'+$index].show) {
// return $scope.buFilter['bu'+$index].list.includes($item['bu'+$index].id)
// } else {
// return !$scope.buFilter['bu'+$index].list.includes($item['bu'+$index].id)
// }
// } else {
// return true
// }
// } else {
// return true
// }
// }
// }
// if ($scope.buFilter.viewAll) {
// return true
// } else {
// return chkBu(1) && chkBu(2) && chkBu(3) && chkBu(4) && chkBu(5)
// }
// }
$scope.goPages = ($candidateid) => {
cscForm.action = "../RECRUIT/FillFormApplicant.jsp"
cscForm.__candidateid.value = $candidateid
cscForm.target = "_blank"
cscForm.submit()
}
$scope.sortByIn = function(propertyName) {
$scope.reverseIn = ($scope.propertyNameIn === propertyName) ? !$scope.reverseIn : false;
$scope.propertyNameIn = propertyName;
}
$scope.sortByEx = function(propertyName) {
$scope.reverseEx = ($scope.propertyNameEx === propertyName) ? !$scope.reverseEx : false;
$scope.propertyNameEx = propertyName;
}
$scope.availableRequest = ($app) => {
let result = false
const exist = $scope.openReqs.find(($item) => {
return $app.requestid === $item.requestid
})
if (exist) {
let today = new Date($scope.now);
let endDate = new Date(exist.lastDate)
result = daysBetween(today, endDate) >= 0
}
return result
}
RecService.RestMcandidate.getQuery().$promise.then(function ($res) {
$scope.applicants = $res.result
// console.log($res.result);
$scope.isReady = true
})
RecService.ManageConfig.query({cname: 'BASIC'}).$promise.then(function (data) {
$scope.basicConfig = data.result.object
})
$scope.updateWantInterview = ($applicantid, $event) => {
RecService.RestMapplicant.updateWantInterview({applicantid: $applicantid, wantinterview: $event.target.value}).$promise.then(function ($res) {
})
}
$scope.filterConditions = ($app) => {
return $app.applicantid === $scope.conditions.filter.applicantid &&
($app.personal.fname === $scope.conditions.filter.name || $app.personal.fname == $scope.conditions.filter.name) &&
$app.jobid === $scope.conditions.filter.jobid &&
$app.wantinterview === $scope.conditions.filter.wantinterview
}
$scope.filterInternal = ($app) => {
return $app.internal == '1'
}
$scope.filterExternal = ($app) => {
return $app.internal == '0'
}
// Jquery
}
])
\ No newline at end of file
.radio-inline {
color: black !important;
}
.sortorder:after {
content: '\25b2';
}
.sortorder.reverse:after {
content: '\25bc';
}
.table th, a {
color: white !important;
}
.input-group-addon {
color: #4d4d4d !important;
}
.loading-page{
position: absolute;
width: 100%;
height: 100%;
background-color: #f0f0f0;
z-index: 99;
display: block;
float: left;
}
.spiner {
margin-top: 5%;
margin-left: 45%;
height: 100px;
width: 100px;
animation: rotate 1.2s infinite linear;
border: 10px solid #0072C6;
border-right-color: transparent;
border-radius: 50%;
z-index: 100;
}
@keyframes rotate {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment