Commit 596bc0f8 by peema_phongam

commitee judge

parent 6585a31c
......@@ -18,6 +18,7 @@
<FIELD>EMPLOYEEID</FIELD>
<FIELD>EMAIL</FIELD>
<FIELD>MOBILE</FIELD>
<FIELD>REFEREE_LEVEL</FIELD>
<ORDER>
<FIELD>REFEREEID</FIELD>
</ORDER>
......
......@@ -41,6 +41,12 @@
<ALT_THAI>กรรมการ</ALT_THAI>
</COMPONENT>
</COMMITTEEID>
<JUDGE lang="A" encrypt="false" log="false" type="String">
<KEY>4</KEY>
<WIDTH>1</WIDTH>
<DESC_ENG>Judge</DESC_ENG>
<DESC_THAI>ประธาน</DESC_THAI>
</JUDGE>
<APSFORM lang="A" encrypt="false" log="false" type="Text">
<WIDTH>4000</WIDTH>
<DESC_ENG>Interview Form</DESC_ENG>
......
......@@ -79,8 +79,7 @@ angular.module('APS_INTERVIEW').controller('InterviewForm', ['$scope', '$http',
};
RecService.RestMcandidate.getQuery({id: $scope.candidateid}).$promise.then(function (data){
$scope.candidate = data.result[0];
console.log($scope.candidate.other.apsform)
$scope.candidate = data.result;
if ($scope.candidate.other.hasOwnProperty('apsform')) {
$scope.formdata = $scope.candidate.other.apsform
} else {
......
......@@ -103,6 +103,7 @@
<form ng-show="isReady && !showConfirm" name="cscform" method="post" action="Candidate.jsp">
<input type="hidden" name="__cmd">
<input type="hidden" name="__candidateid">
<input type="hidden" name="candidateid">
<input type="hidden" name="__employeeid">
<input type="hidden" name="__action" value="<%=action%>">
<input type="hidden" name="__requestid" value="<%=reqid%>">
......
......@@ -157,6 +157,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>
</tr>
</thead>
<tbody>
......@@ -187,6 +188,11 @@
<option ng-repeat='list in seqlist' value="{{list.value}}">{{list.value}}</option>
</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>--%>
</td>
</tr>
</tbody>
</table>
......
......@@ -21,6 +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>
</tr>
</thead>
<tfoot>
......@@ -31,6 +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>
</tr>
</tfoot>
<tbody>
......@@ -41,6 +43,7 @@
<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 class='hide' ng-if='$last'>{{callDataTable()}}</td> <!--call function DataTable After Load Emplist Data-->
</tr>
</tbody>
......
......@@ -90,7 +90,6 @@ angular.module('RECRUIT').controller('CommitteeSetup', function ($scope, $mdDial
RecService.ManageCommittee.query(param).$promise.then(function (data) {
angular.merge($scope.committee, data.committee)
//console.log(data);
initSeqCommit()
$scope.hascommittee = data.hascommittee
})
......@@ -108,7 +107,8 @@ angular.module('RECRUIT').controller('CommitteeSetup', function ($scope, $mdDial
position: '',
job: '',
seq: '1',
apsstatus: 'N'
apsstatus: 'N',
judge: '0'
}
$scope.committee.push(data)
initSeqCommit()
......@@ -154,6 +154,8 @@ angular.module('RECRUIT').controller('CommitteeSetup', function ($scope, $mdDial
let setEmptoCOmmitee = (empID, index, ev) => {
let empItem = $filter('filter')(referrelist, {employeeid:empID}, true)
if(chkDuplicateCommittee(empID)){
angular.merge($scope.committee[index], empItem[0] )
}else{
......@@ -165,9 +167,23 @@ angular.module('RECRUIT').controller('CommitteeSetup', function ($scope, $mdDial
let chkDuplicateCommittee = (empID) => {
let result = true
let finDuplicate = $filter('filter')($scope.committee, {employeeid:empID}, true)
if(finDuplicate.length > 0){
let isJudge = $filter('filter')(finDuplicate, {'judge':'1'}, true)
let isCom = $filter('filter')(finDuplicate, {'judge':'0'}, true)
if (isJudge.length > 0) {
if (isCom.length > 0) {
result = false
}
} else {
if (finDuplicate.length > 0) {
result = false
}
}
// if(finDuplicate.length > 0){
// result = false
// }
return result
}
......@@ -217,9 +233,14 @@ angular.module('RECRUIT').controller('CommitteeSetup', function ($scope, $mdDial
for(let i=0;i<$scope.committee.length;i++){
let data = {
committeeid : $scope.committee[i].employeeid,
seq : $scope.committee[i].seq
seq : $scope.committee[i].seq,
judge: $scope.committee[i].judge
}
arr_committeelist.push(data)
// if ($scope.committee[i].judge === '1') {
// data.judge = '0'
// arr_committeelist.push(data)
// }
}
let obj_param = {
......@@ -241,6 +262,19 @@ angular.module('RECRUIT').controller('CommitteeSetup', function ($scope, $mdDial
}
}
$scope.haveJudge = () => {
let result = false
let finDuplicate = $filter('filter')($scope.committee, {'judge':'1'}, true)
if(finDuplicate.length > 0){
result = true
}
return result
}
$scope.changeJudge = () => {
}
$scope.viewApsForm = (committeeid, state) =>{
let pageName = ''
let jobid = $scope.clsFormApplicant.formApplicant.jobid
......
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