Commit f9738770 by peema_phongam

update interview

parent 2cea5f5b
......@@ -152,7 +152,7 @@
<MENU code="EM0410" group="EM0410" tname="Performance Evaluation For Manager" ename="Performance Evaluation For Manager" link="APS_JET_PER_MAN.jsp" target="" page="EMPVIEW/APS_JET_PER_MAN" activepermis="1" edit="0" save="0" delete="0" icon="fa-pencil-square-o"/>
<MENU code="EM0411" group="EM0411" tname="Performance Evaluation For Employee" ename="Performance Evaluation For Employee" link="APS_JET_PER_EMP.jsp" target="" page="EMPVIEW/APS_JET_PER_EMP" activepermis="1" edit="0" save="0" delete="0" icon="fa-pencil-square-o"/>
<!-- Appraisal Recruit DHAS -->
<MENU code="EM0412" group="EM0412" tname="ประเมินผลสัมภาษณ์งาน" ename="Interview" link="APS_INTERVIEW_DHAS.jsp" target="" page="EMPVIEW/APS_INTERVIEW_DHAS,APS_FORM_INTERVIEW_DHAS_EMP" activepermis="1" edit="0" save="0" delete="0" icon="fa-pencil-square-o"/>
<MENU code="EM0412" group="EM0412" tname="ประเมินผลสัมภาษณ์งาน" ename="Interview" link="APS_INTERVIEW.jsp" target="" page="EMPVIEW/APS_INTERVIEW,APS_FORM_INTERVIEW_DHAS_EMP" activepermis="1" edit="0" save="0" delete="0" icon="fa-pencil-square-o"/>
</MENU>
<MENU group="EMP03A10" code="EMP03A10" ename="User" tname="บัญชีผู้ใช้" link="javascript:;" icon="fa-user">
......
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" language="java" %>
<%@ page import="com.csc.library.database.*,com.csc.library.session.*,com.csc.library.utilities.*" %>
<%@ include file="../CHECKPROFILE.jsp" %>
<% request.setCharacterEncoding("UTF-8"); %>
<%
CheckNull chk = new CheckNull();
UProfile up = null;
if (session != null){
up = (UProfile)session.getAttribute("userprofile");
}
%>
<html ng-app='APS_INTERVIEW'>
<head>
<title>Employee View</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<style>
.csc-content .center{
padding-top: 5px !important;
padding-bottom: 5px !important;
}
</style>
</head>
<body>
<div class='bg-com'></div>
<jsp:include page="EMV_HEADMENU.jsp" flush="true" />
<link rel="stylesheet" href="css/Recruit.css"/>
<script type="text/javascript" src='../public/lib/angular-resource/angular-resource.min.js'></script>
<script type='text/javascript' src='JS/APS_INTERVIEW/Module.Controller.js'></script>
<script type='text/javascript' src='../RECRUIT/js/services.js'></script>
<script type='text/javascript' src='JS/APS_INTERVIEW/services.js'></script>
<script type='text/javascript' src='JS/APS_INTERVIEW/ListCandidate.Controller.js'></script>
<script type='text/javascript'>
setLang('<%=up.get("lang")%>')
$(function () {
let now = '<%=new CscCalendar().getYYYYMMDD()%>'
let user = '<%=up.get("user")%>'
let dbName = '<%=up.getDbName()%>'
let scope = angular.element(document.cscform).scope()
scope.$apply(function () {
scope.dbName = dbName
scope.now = now
scope.user = user
})
})
</script>
<section ng-controller='listCandidate'>
<div class="container csc-content">
<form name="cscform" class="form-horizontal" method="post">
<input type='hidden' name='candidateid'/>
<input type='hidden' name='committeeid' value='<%=up.get("employeeid")%>' />
<input type='hidden' name='lang' value="<%=up.get("lang")%>"/>
<input type="hidden" name="__applicantid">
<input type="hidden" name="__action">
<input type="hidden" name="__screen">
<input type="hidden" name="__fixCon">
<div class='loading-page'>
<div class='spiner'></div>
</div>
<div class="csc-block">
<div class="center">
<h2 class="csc-block-head">รายชื่อผู้สมัคร</h2>
</div>
<%-- search applicantid--%>
<div class="row">
<div class="form-group">
<div class="col-xs-4">
<label class="control-label label-right">เลขที่ผู้สมัครงาน</label>
</div>
<div class="col-xs-8">
<div class="col-xs-8">
<input class="form-control helpReturn" ng-model="search.candidateid" type="text"/>
</div>
</div>
</div>
</div>
<%-- search name--%>
<div class="row">
<div class="form-group">
<div class="col-xs-4">
<label class="control-label label-right">ชื่อ / นามสกุลผู้สมัครงาน</label>
</div>
<div class="col-xs-8">
<div class="col-xs-3">
<input class="form-control helpReturn" placeholder="ชื่อ" ng-model="search.fullname" type="text"/>
</div>
<div class="col-xs-5">
<input class="form-control helpReturn" placeholder="นามสกุล" ng-model="search.fullname" type="text"/>
</div>
</div>
</div>
</div>
<div class="center">
<button class="btn btn-primary" ng-click="search = {}; helpDesc = {}">ล้างข้อมูล</button>
</div>
</div>
<div class="table-responsive">
<table class="table table-head table-hover table-bordered table-title-left" >
<thead>
<tr>
<th class="table-title" colspan="11">รายชื่อผู้สมัครงาน</th>
</tr>
<tr>
<th swlang code='SW000193'>seq</th>
<th>
<a ng-click="sortBy('candidateid')" swlang code='SW002159'>candidateid</a>
<span class="sortorder" ng-show="propertyName === 'candidateid'" ng-class="{reverse: reverse}"></span>
</th>
<th>
<a swlang code='SW001984' ng-click="sortBy('fullname')">Fullname</a>
<span class="sortorder" ng-show="propertyName === 'fullname'" ng-class="{reverse: reverse}"></span>
</th>
<th swlang code='SW000057'>Position</th>
<th swlang code='SW000139'>Internal</th>
<th swlang code='SW000019'>Status</th>
<th>
<a swlang code='SW002381' ng-click="sortBy('apsdate')">Date of valuation</a>
<span class="sortorder" ng-show="propertyName === 'apsdate'" ng-class="{reverse: reverse}"></span>
</th>
<th swlang code='SW000639'>location</th>
<th swlang code='SW013315'>Assessor's Sequence</th>
<th swlang code='SW013316'>Previous Assessor Status</th>
<th swlang code='SW000302'>Remark</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="list in listcandidate | filter : search | orderBy:propertyNameIn:reverseIn">
<td class='center'>{{ $index+1 }}</td>
<td class='center'>{{list.candidateid}}</td>
<td>
<a style="color: #4d4d4d !important;" ng-click='goPage(list)' ng-hide='list.ispass == "0"'>{{ list.fullname }}</a>
<span ng-show='list.ispass == "0"'>{{ list.fullname }}</span>
</td>
<td class='center'>{{ list.job }}</td>
<td class='center'>{{ internal_desc[list.internal].desc[lang] }}</td>
<td class='center'>{{status_desc[list.status].desc[lang]}}</td>
<td class='center'>{{ list.apsdate }}</td>
<td class='center'><span ng-if="list.detail.hasOwnProperty('address')">{{list.detail.address}}</span></td>
<td class='center'>{{ list.state }}</td>
<td class='center'>{{p_status_desc[list.previous_status].desc[lang]}}</td>
<td class='center'>{{ ispass_desc[list.ispass].desc[lang] }}</td>
</tr>
</tbody>
</table>
</div>
</form>
</div>
<a href="#top" id="top-button">
<i class="fa fa-angle-up"></i>
<div class="top-word">Back to top</div>
</a>
</section>
<jsp:include page="FOOTER.jsp" flush="true" />
</body>
</html>
'use strict'
angular.module('APS_INTERVIEW').controller('listcandidate', ['$scope', '$http', '$sce', 'InterviewcandidateCtrl', function($scope, $http, $sce, InterviewcandidateCtrl){
angular.module('APS_INTERVIEW').controller('listCandidate', ['$scope', '$http', '$sce', 'InterviewcandidateCtrl', 'RecService', function($scope, $http, $sce, InterviewcandidateCtrl, RecService){
$scope.lang = $('input[name="lang"]').val()
$scope.now = ''
$scope.dbName = ''
$scope.user = ''
$scope.buFilter = {}
$scope.propertyName = ''
$scope.reverse = true
$scope.openReqs = []
$scope.listcandidate = []
$scope.status_desc = [{
status: '0',
desc:{
tha: 'ยังไม่ได้ประเมิน',
eng: 'Not Evaluated'
//master data
$scope.status_desc = {
'0': {
desc: {
tha: 'ยังไม่ได้ประเมิน',
eng: 'Not Evaluated'
}
},
'1': {
desc: {
tha: 'บันทึกร่าง',
eng: 'Save Draff'
}
},
'2': {
desc: {
tha: 'ประเมินแล้ว',
eng: 'Success'
}
}
},{
status: '1',
desc:{
tha: 'บันทึกร่าง',
eng: 'Save Draff'
}
$scope.p_status_desc = {
'0': {
desc: {
tha: 'กรรมการในลำดับก่อนหน้ายังไม่ได้ประเมิน (ไม่มีสิทธิ์ประเมิน)',
eng: 'Previous Not Approved'
}
},
'1': {
desc: {
tha: 'กรรมการในลำดับก่อนหน้าประเมินแล้ว',
eng: 'Previous Approved'
}
},
'2': {
desc: {
tha: 'คุณเป็นกรรมการชุดแรก',
eng: "You're First Referees"
}
}
},{
status: '2',
desc:{
tha: 'ประเมินแล้ว',
eng: 'Success'
}
$scope.ispass_desc = {
'0': {
desc: {
tha: 'ผู้สมัครไม่เหมาะสม',
eng: 'Unqualified'
}
},
'1': {
desc: {
tha: '',
eng: ''
}
}
}
$scope.internal_desc = {
'0': {
desc: {
tha: 'ผู้สมัครภายนอก',
eng: 'External'
}
},
'1': {
desc: {
tha: 'ผู้สมัครภายใน',
eng: 'Internal'
}
}
}]
}
RecService.RestMrequest.getManPowerRequest().$promise.then(function (data) {
$scope.openReqs = data.result.filter((item) => {
return item.requestStatus === "2"
})
})
$scope.p_status_desc = [{
status: '0',
desc:{
tha: 'กรรมการในลำดับก่อนหน้ายังไม่ได้ประเมิน (ไม่มีสิทธิ์ประเมิน)',
eng: 'Previous Not Approved'
$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]
// console.log(data)
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(',') : []
}
}
})
}
},{
status: '1',
desc:{
tha: 'กรรมการในลำดับก่อนหน้าประเมินแล้ว',
eng: 'Previous Approved'
})
$scope.filterBu = ($item) => {
let chkBu = ($index) => {
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
}
}
},{
status: '2',
desc:{
tha: 'คุณเป็นกรรมการชุดแรก',
eng: "You're First Referees"
if ($scope.buFilter.viewAll) {
return true
} else {
return chkBu(1) && chkBu(2) && chkBu(3) && chkBu(4) && chkBu(5)
}
}]
}
$scope.ispass_desc = [{
status: '0',
desc:{
tha: 'ผู้สมัครไม่เหมาะสม',
eng: 'Unqualified'
}
},{
status: '1',
desc:{
tha: '',
eng: ''
$scope.sortBy = function(propertyName) {
$scope.reverse = ($scope.propertyName === propertyName) ? !$scope.reverse : false;
$scope.propertyName = 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
}
InterviewcandidateCtrl.managelistcandidate.query().$promise.then(function(data){
$scope.listcandidate = data.listcandidateData;
console.log($scope.listcandidate);
// console.log($scope.listcandidate);
$('.loading-page').css('display', 'none')
})
$scope.goPage = function($index){
if($scope.listcandidate[$index].previous_status != 0){
$('input[name="candidateid"]').val($scope.listcandidate[$index].candidateid);
$scope.goPage = function (list) {
if(list.previous_status != 0){
let pageName = ''
let jobid = list.jobid
$('input[name="candidateid"]').val(list.candidateid);
$('form[name="cscform"]').attr('target','myform');
$('form[name="cscform"]').attr('action','APS_FORM_INTERVIEW_DHAS_EMP.jsp');
if ($scope.dbName.toUpperCase() === ("STD_NEW")) {
pageName = "../APS_FORM_INTERVIEW_DHAS.jsp";
} else if ($scope.dbName.toUpperCase() === ("DHAS")) {
pageName = "../APS_FORM_INTERVIEW_DHAS.jsp";
} else if ($scope.dbName.toUpperCase() === ("ITE")) {
pageName = "../APS_FORM_INTERVIEW_ITE.jsp";
} else if ($scope.dbName.toUpperCase() === ("KOKOTEL")) {
pageName = "../APS_FORM_INTERVIEW_KOKOTEL.jsp";
} else if ($scope.dbName.toUpperCase() === ("NHSO")) {
if (jobid.toUpperCase().includes() === ("S") || jobid.toUpperCase().includes() === ("E") || jobid.toUpperCase().includes() === ("O")) {
pageName = "../APS_FORM_INTERVIEW_NHSO.jsp";
} else {
pageName = "../APS_FORM_INTERVIEW_NHSO_MT.jsp";
}
} else {
pageName = "../APS_FORM_INTERVIEW_DHAS.jsp";
}
$('form[name="cscform"]').attr('action', pageName);
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();
......@@ -77,5 +187,8 @@ angular.module('APS_INTERVIEW').controller('listcandidate', ['$scope', '$http',
}else{
alert("ยังไม่มีสิทธิ์ประเมิน กรุณารอกรรมการชุดก่อนหน้าประเมินก่อน")
}
}
}]);
angular.module('RECRUIT', [])
angular.module('APS_INTERVIEW', [
'myHR'
,'ngResource'
'RECRUIT',
'myHR',
'ngResource'
]);
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