Commit a5496baa by peema_phongam

update : interview manger / Ex / seniorEx

parent 43b88a9f
......@@ -18254,7 +18254,31 @@ Terminate,พนักงานพ้นสภาพ]]>
<![CDATA[1]]>
</KEY>
<VALUE>
<![CDATA[ประธาน,ประธาน]]>
<![CDATA[ประธาน(ผู้บริหาร/ผู้จัดการฝ่าย),ประธาน(ผู้บริหาร/ผู้จัดการฝ่าย)]]>
</VALUE>
</DATA>
<DATA>
<KEY>
<![CDATA[2]]>
</KEY>
<VALUE>
<![CDATA[หน.ผ./ผจก.ฝ่ายบุคคล,หน.ผ./ผจก.ฝ่ายบุคคล]]>
</VALUE>
</DATA>
<DATA>
<KEY>
<![CDATA[3]]>
</KEY>
<VALUE>
<![CDATA[ผู้บริหาร BU,ผู้บริหาร BU]]>
</VALUE>
</DATA>
<DATA>
<KEY>
<![CDATA[4]]>
</KEY>
<VALUE>
<![CDATA[Senior Ex Director/COO BU,Senior Ex Director/COO BU]]>
</VALUE>
</DATA>
</REFEREE_LEVEL>
......
......@@ -289,7 +289,7 @@
<DESC_ENG>REFEREE_LEVEL</DESC_ENG>
<DESC_THAI>สถานะการประเมิน</DESC_THAI>
<DEFAULTVALUE>0</DEFAULTVALUE>
<COMPONENT type="radio">
<COMPONENT type="list">
<ALT_ENG>กำหนดสถานะการประเมิน</ALT_ENG>
<ALT_THAI>กำหนดสถานะการประเมิน</ALT_THAI>
<VALIDCODE>REFEREE_LEVEL</VALIDCODE>
......
......@@ -91,7 +91,9 @@ angular.module('APS_INTERVIEW').controller('APS_FORM_INTERVIEW_DHAS_RESULT', ['$
hr: '',
ex: '',
seniorEx: ''
}
},
appropriate: '',
job_other: ''
}]
$scope.myparam = {
......@@ -103,11 +105,20 @@ angular.module('APS_INTERVIEW').controller('APS_FORM_INTERVIEW_DHAS_RESULT', ['$
$scope.headdata = data.header
$scope.formdata = data.apsform
$scope.previous = data.previous
setFormAPS()
$scope.isReady = true
})
$scope.$watch('formdata.form', function (data) {
let listActor = ['manager', 'hr', 'ex', 'seniorEx']
if (data[0]) {
$scope.formdata.form[0].sign[listActor[parseInt('4')-1]] = $scope.headdata.committee_fullname
}
})
$scope.getResultHr = () => {
let result = 0
......@@ -128,7 +139,6 @@ angular.module('APS_INTERVIEW').controller('APS_FORM_INTERVIEW_DHAS_RESULT', ['$
let findHr = $scope.previous.find(($item) => {
return $item.header.dept.toUpperCase() === "DEPT" && $item.header.committeeid === $scope.committeeid
})
console.log(findHr)
if(findHr){
for(var i = 0; i < findHr.apsform.form.length; i++){
let form = findHr.apsform.form[i];
......
......@@ -166,7 +166,7 @@ angular.module('APS_INTERVIEW').controller('listCandidate', ['$scope', '$http',
if ($scope.dbName.toUpperCase() === ("STD_NEW")) {
pageName = "../APS_FORM_INTERVIEW_DHAS.jsp";
} else if ($scope.dbName.toUpperCase() === ("DHAS")) {
if (list.judge == '1') {
if (list.judge > 0) {
pageName = "../APS_FORM_INTERVIEW_DHAS_RESULT.jsp";
} else {
pageName = "../APS_FORM_INTERVIEW_DHAS_DEPT.jsp"
......
......@@ -158,7 +158,7 @@
<th><swaplang code="SW000057">Position</swaplang></th>
<th ng-hide="chkPage()"><swaplang code="SW000019">Status</swaplang></th>
<th><swaplang code="SW001055">Sequencing</swaplang></th>
<th class="text-center">ประธา</th>
<th class="text-center">สถานะการประเมิ</th>
</tr>
</thead>
<tbody>
......@@ -190,9 +190,16 @@
</select>
</td>
<td class="text-center">
<md-checkbox ng-if="committee.referee_level == '1'" ng-disabled="haveJudge() && committee.judge !== '1'" ng-model="committee.judge" ng-false-value="'0'" ng-true-value="'1'" aria-label="Judge" ng-change="changeJudge()">
<%-- <input type="text" ng-model="committee.judge">--%>
<%-- <i class="fa fa-2x fa-check-circle-o" ng-if="committee.referee_level == '1'"></i>--%>
<%-- <span ng-if="committee.referee_level > 1">--%>
<%-- {{refereeStatus[committee.referee_level]}}--%>
<%-- </span>--%>
<%-- <md-checkbox ng-if="committee.referee_level == '1'" ng-disabled="haveJudge() && committee.judge !== '1'" ng-model="committee.judge" ng-false-value="'0'" ng-true-value="'1'" aria-label="Judge" ng-change="changeJudge()">--%>
<select class="form-control" ng-model="committee.judge">
<option ng-repeat="item in refereeStatus | filter:{id:'0'}" value="{{item.id}}">{{ item.desc }}</option>
<option ng-if="committee.referee_level > '0'" ng-repeat="item in refereeStatus | filter:{id:committee.referee_level}" value="{{item.id}}">{{ item.desc }}</option>
</select>
</td>
</tr>
</tbody>
......
......@@ -21,7 +21,7 @@
<th><swaplang code="BU2">bu2</swaplang></th>
<th><swaplang code="BU3">bu3</swaplang></th>
<th><swaplang code="SW003545">job</swaplang></th>
<th>ประธา</th>
<th>สถานะการประเมิ</th>
</tr>
</thead>
<tfoot>
......@@ -32,7 +32,7 @@
<th><swaplang code="BU2">bu2</swaplang></th>
<th><swaplang code="BU3">bu3</swaplang></th>
<th><swaplang code="SW000057">Position</swaplang></th>
<th>ประธา</th>
<th>สถานะการประเมิ</th>
</tr>
</tfoot>
<tbody>
......@@ -43,7 +43,10 @@
<td>{{emp.bu2}}</td>
<td>{{emp.bu3}}</td>
<td>{{emp.position}}</td>
<td><i ng-if="emp.referee_level == '1'" class="fa fa-check-circle-o"></i></td>
<td>
<!-- <i ng-if="emp.referee_level == '1'" class="fa fa-check-circle-o"></i>-->
{{refereeStatus[emp.referee_level]}}
</td>
<td class='hide' ng-if='$last'>{{callDataTable()}}</td> <!--call function DataTable After Load Emplist Data-->
</tr>
</tbody>
......
......@@ -41,6 +41,20 @@ angular.module('RECRUIT').controller('CommitteeSetup', function ($scope, $mdDial
eng: 'Success'
}
}]
$scope.refereeStatus = [
{id:'0', desc:'กรรมการ'},
{id:'1', desc:'ประธาน(ผู้บริหาร/ผู้จัดการฝ่าย)'},
{id:'2', desc:'หน.ผ./ผจก.ฝ่ายบุคคล'},
{id:'3', desc:'ผู้บริหาร BU'},
{id:'4', desc:'Senior Ex Director/COO BU'},
]
// $scope.refereeStatus = [
// 'กรรมการ',
// 'ประธาน(ผู้บริหาร/ผู้จัดการฝ่าย)',
// 'หน.ผ./ผจก.ฝ่ายบุคคล',
// 'ผู้บริหาร BU',
// 'Senior Ex Director/COO BU'
// ]
let initSeqCommit = () =>{
$scope.seqlist = []
......@@ -136,6 +150,13 @@ angular.module('RECRUIT').controller('CommitteeSetup', function ($scope, $mdDial
// MD-Dialog Controller
$scope.searchCommitteeCtrl = ($scope, $mdDialog, RecService) => {
$scope.refereeStatus = [
'กรรมการ',
'ประธาน(ผู้บริหาร/ผู้จัดการฝ่าย)',
'หน.ผ./ผจก.ฝ่ายบุคคล',
'ผู้บริหาร BU',
'Senior Ex Director/COO BU'
]
$scope.referrelist = referrelist
$scope.hide = () => {
......@@ -154,13 +175,13 @@ angular.module('RECRUIT').controller('CommitteeSetup', function ($scope, $mdDial
let setEmptoCOmmitee = (empID, index, ev) => {
let empItem = $filter('filter')(referrelist, {employeeid:empID}, true)
angular.merge($scope.committee[index], empItem[0] )
if(chkDuplicateCommittee(empID)){
angular.merge($scope.committee[index], empItem[0] )
}else{
showAlert(ev)
}
// if(chkDuplicateCommittee(empID)){
// angular.merge($scope.committee[index], empItem[0] )
// }else{
// showAlert(ev)
// }
// console.log($scope.committee);
}
......@@ -211,7 +232,7 @@ angular.module('RECRUIT').controller('CommitteeSetup', function ($scope, $mdDial
});
}
}else{
alert('กรุณาเลือกกรรมการ')
// alert('กรุณาเลือกกรรมการ')
}
}
......@@ -219,9 +240,17 @@ angular.module('RECRUIT').controller('CommitteeSetup', function ($scope, $mdDial
let result = false
for(let i=0;i<$scope.committee.length;i++){
if($scope.committee[i].employeeid != ''){
let duplicate = $filter('filter')($scope.committee, {employeeid:$scope.committee[i].employeeid, judge:$scope.committee[i].judge}, true)
if (duplicate.length > 1) {
alert('รหัสกรรมการ ' + $scope.committee[i].employeeid + ' มีข้อมูลที่ซ้ำกัน')
result = false
break
}
result = true
}else{
alert('กรุณาเลือกกรรมการ')
result = false
break
}
}
return result
......@@ -250,7 +279,7 @@ angular.module('RECRUIT').controller('CommitteeSetup', function ($scope, $mdDial
savetype : save_type,
del_olddata : $scope.del_olddata
}
console.log(obj_param);
// console.log(obj_param);
return obj_param
}
......@@ -289,7 +318,7 @@ angular.module('RECRUIT').controller('CommitteeSetup', function ($scope, $mdDial
if ($scope.dbName.toUpperCase() === ("STD_NEW")) {
pageName = "../APS_FORM_INTERVIEW_DHAS.jsp";
} else if ($scope.dbName.toUpperCase() === ("DHAS")) {
if (judge == '1') {
if (judge && parseInt(judge) > 0) {
pageName = "../APS_FORM_INTERVIEW_DHAS_RESULT.jsp";
} else {
pageName = "../APS_FORM_INTERVIEW_DHAS_DEPT.jsp"
......
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