Commit 9ab3d847 by peema_phongam

previous interview score

parent 1326068f
......@@ -7,6 +7,7 @@ angular.module('APS_INTERVIEW').controller('APS_FORM_INTERVIEW_DHAS_DEPT', ['$sc
$scope.notedit = ($('input[name="notedit"]').val() == 'true')
$scope.lang = $('input[name="lang"]').val()
$scope.contextPath = ''
$scope.candidate = {}
$scope.headdata = {
fullname: '',
job: '',
......@@ -83,6 +84,109 @@ angular.module('APS_INTERVIEW').controller('APS_FORM_INTERVIEW_DHAS_DEPT', ['$sc
$scope.isReady = true
})
RecService.RestMcandidate.getQuery({id: $scope.candidateid}).$promise.then(function (data){
$scope.candidate = data.result;
setExamData1()
setExamScore2()
setExamScore3()
setExamScore4()
setExamScore5()
})
let setExamData1 = () => {
let data = $scope.candidate.jobrouter
let router = {}
let isReady = false
for(let x=0;x<data.length;x++){
if(data[x].examdata != null){
if(data[x].examdata.topic.tha.includes("Personality") ||
data[x].examdata.topic.eng.includes("Personality")){
router = data[x]
isReady = true
}
}
}
if(isReady){
$scope.examdata = question.getDHASPIT(router)
}
}
let setExamScore2 = () => {
let data = $scope.candidate.jobrouter
let router = {}
let isReady = false
for(let x=0;x<data.length;x++){
if(data[x].examdata != null){
if(data[x].examdata.topic.tha.includes("ความพร้อมหัวหน้างาน") ||
data[x].examdata.topic.eng.includes("ความพร้อมหัวหน้างาน")){
router = data[x]
isReady = true
}
}
}
if(isReady){
$scope.score2 = question.getRealScore(router.question)
}
}
let setExamScore3 = () => {
let data = $scope.candidate.jobrouter
let router = {}
let isReady = false
for(let x=0;x<data.length;x++){
if(data[x].examdata != null){
if(data[x].examdata.topic.tha.includes("ความถนัดเชิงเหตุผลนามธรรม") ||
data[x].examdata.topic.eng.includes("ความถนัดเชิงเหตุผลนามธรรม")){
router = data[x]
isReady = true
}
}
}
if(isReady){
$scope.score3 = question.getRealScore(router.question)
}
}
let setExamScore4 = () => {
let data = $scope.candidate.jobrouter
let router = {}
let isReady = false
for(let x=0;x<data.length;x++){
if(data[x].examdata != null){
if(data[x].examdata.topic.tha.includes("ADVANCE ENGLISH") ||
data[x].examdata.topic.eng.includes("ADVANCE ENGLISH")){
router = data[x]
isReady = true
}
}
}
if(isReady){
$scope.score4 = question.getRealScore(router.question)
}
}
let setExamScore5 = () => {
let data = $scope.candidate.jobrouter
let router = {}
let isReady = false
for(let x=0;x<data.length;x++){
if(data[x].examdata != null){
if(data[x].examdata.topic.tha.includes("คณิตศาสตร์") ||
data[x].examdata.topic.eng.includes("คณิตศาสตร์")){
router = data[x]
isReady = true
}
}
}
if(isReady){
$scope.score5 = question.getRealScore(router.question)
}
}
let setFormAPS = () => {
if($scope.formdata.form == ''){
......
......@@ -10,6 +10,7 @@ angular.module('APS_INTERVIEW').controller('APS_FORM_INTERVIEW_DHAS_RESULT', ['$
$scope.contextPath = ''
$scope.listJudge = []
$scope.jobDetail = {}
$scope.candidate = {}
$scope.headdata = {
fullname: '',
job: '',
......@@ -112,6 +113,7 @@ angular.module('APS_INTERVIEW').controller('APS_FORM_INTERVIEW_DHAS_RESULT', ['$
$scope.jobDetail = data.result
})
InterviewcandidateCtrl.manageInterviewForm.query($scope.myparam).$promise.then(function(data){
$scope.headdata = data.header
......@@ -121,6 +123,15 @@ angular.module('APS_INTERVIEW').controller('APS_FORM_INTERVIEW_DHAS_RESULT', ['$
$scope.isReady = true
})
RecService.RestMcandidate.getQuery({id: $scope.candidateid}).$promise.then(function (data){
$scope.candidate = data.result;
setExamData1()
setExamScore2()
setExamScore3()
setExamScore4()
setExamScore5()
})
// $scope.$watch('formdata.form', function (data) {
......@@ -130,6 +141,99 @@ angular.module('APS_INTERVIEW').controller('APS_FORM_INTERVIEW_DHAS_RESULT', ['$
// }
// })
let setExamData1 = () => {
let data = $scope.candidate.jobrouter
let router = {}
let isReady = false
for(let x=0;x<data.length;x++){
if(data[x].examdata != null){
if(data[x].examdata.topic.tha.includes("Personality") ||
data[x].examdata.topic.eng.includes("Personality")){
router = data[x]
isReady = true
}
}
}
if(isReady){
$scope.examdata = question.getDHASPIT(router)
}
}
let setExamScore2 = () => {
let data = $scope.candidate.jobrouter
let router = {}
let isReady = false
for(let x=0;x<data.length;x++){
if(data[x].examdata != null){
if(data[x].examdata.topic.tha.includes("ความพร้อมหัวหน้างาน") ||
data[x].examdata.topic.eng.includes("ความพร้อมหัวหน้างาน")){
router = data[x]
isReady = true
}
}
}
if(isReady){
$scope.score2 = question.getRealScore(router.question)
}
}
let setExamScore3 = () => {
let data = $scope.candidate.jobrouter
let router = {}
let isReady = false
for(let x=0;x<data.length;x++){
if(data[x].examdata != null){
if(data[x].examdata.topic.tha.includes("ความถนัดเชิงเหตุผลนามธรรม") ||
data[x].examdata.topic.eng.includes("ความถนัดเชิงเหตุผลนามธรรม")){
router = data[x]
isReady = true
}
}
}
if(isReady){
$scope.score3 = question.getRealScore(router.question)
}
}
let setExamScore4 = () => {
let data = $scope.candidate.jobrouter
let router = {}
let isReady = false
for(let x=0;x<data.length;x++){
if(data[x].examdata != null){
if(data[x].examdata.topic.tha.includes("ADVANCE ENGLISH") ||
data[x].examdata.topic.eng.includes("ADVANCE ENGLISH")){
router = data[x]
isReady = true
}
}
}
if(isReady){
$scope.score4 = question.getRealScore(router.question)
}
}
let setExamScore5 = () => {
let data = $scope.candidate.jobrouter
let router = {}
let isReady = false
for(let x=0;x<data.length;x++){
if(data[x].examdata != null){
if(data[x].examdata.topic.tha.includes("คณิตศาสตร์") ||
data[x].examdata.topic.eng.includes("คณิตศาสตร์")){
router = data[x]
isReady = true
}
}
}
if(isReady){
$scope.score5 = question.getRealScore(router.question)
}
}
$scope.getSumWorkCost = () => {
return parseInt($scope.jobDetail.workcost1) + parseInt($scope.jobDetail.workcost2)
......
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