REC_CANDIDATE.jsp 12.5 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
<!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");
  }
12 13
  String action = chk.chkNullString(request.getParameter("__action"), "view");

14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
%>
<html ng-app="RECRUIT">
<head>
  <title>Employee View</title>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<body>
<div class='bg-com'></div>
<jsp:include page="EMV_HEADMENU.jsp" flush="true"/>
<link rel="stylesheet" href="css/spinner.css"/>
<link rel="stylesheet" href="css/Recruit.css"/>
<link rel="stylesheet" href="../JS/jquery-ui-1.11.4.custom/jquery-ui.min.css"  type="text/css"/>

<script type="text/javascript" src='../public/lib/angular-resource/angular-resource.min.js'></script>
<script type='text/javascript' src='../public/lib/angular-sanitize/angular-sanitize.min.js'></script>
<script type="text/javascript" src="../public/lib/angular-material/angular-material.js"></script>
<script type="text/javascript" src="../public/lib/angular-animate/angular-animate.js"></script>
<script type="text/javascript" src="../public/lib/angular-aria/angular-aria.js"></script>
<script type="text/javascript" src="../public/lib/angular-messages/angular-messages.js"></script>

<script type='text/javascript' src='JS/REC_CANDIDATE/Module.Controller.js'></script>
<script type='text/javascript' src='../RECRUIT/js/services.js'></script>
<script type='text/javascript' src='JS/REC_CANDIDATE/REC_CANDIDATE.Controller.js'></script>
<script type='text/javascript'>
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
    setLang('<%=up.get("lang")%>');
    $(function () {
      let now = '<%=new CscCalendar().getYYYYMMDD()%>'
      let userJobid = '<%=up.get("job")%>'
      let userBu3 = '<%=up.get("bu3")%>'
      let action = '<%=action%>'
      let userBu2 = '<%=up.get("bu2")%>'
      let scope = angular.element(document.cscform).scope()
      scope.$apply(function () {
        scope.action = action
        scope.now = now
        scope.userJobid = userJobid
        scope.userBu3 = userBu3
        scope.userBu2 = userBu2
      })
53
    })
54 55 56 57 58 59 60 61 62 63 64 65 66
    function goHelp(helpName,inputName){
      with(document.cscform){
        var helpReturn="";
        var fcon=__fixCon.value;
        if (inputName=="__employeeid") {
          helpReturn = inputName+":employeeid,MEMPLOYEE_FULLNAME:fullname";
        } else if (inputName=="__requestid") {
          helpReturn = inputName+":requestid,MREQUEST_JOBDESC:MJOBCODE.tdesc";
        } else if (inputName=="__jobid") {
          helpReturn = inputName+":jobcodeid,MJOBCODE_TDESC:tdesc";
        }
        linkHelp_Return(helpName,helpReturn);
        __fixCon.value = "";
67 68
      }
    }
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
    $(document).ready(function(){
        //datepicker function 
				var myLang='<%=up.get("lang")%>';
				if (myLang=="tha"){
					$.datepicker.setDefaults($.datepicker.regional['tha']);
				}
				$("input[name=date_start]").hover(function(){
					$("input[name=date_start]").datepicker({
						dateFormat:"yy-mm-dd",
						maxDate:-1,
						defaultDate:-1,
						changeMonth: true,
						changeYear: true
					});
				
				});
			});
86 87 88 89 90 91 92 93 94
</script>
<section ng-controller="REC_CANDIDATE">
  <div class="container csc-content">
    <form name="cscform" class="form-horizontal" method="">
      <input type="hidden" name="__candidateid">
      <input type="hidden" name="__action" value="<%=action%>">
      <input type="hidden" name="__screen" value="">
      <input type="hidden" name="__fixCon" value="">
      <div ng-hide="isReady" class='loading-page'>
95
          <div class='spiner'></div>
96 97 98 99 100 101 102 103 104 105 106
      </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">
107
              <label class="control-label label-right">รหัสใบขออัตรากำลัง</label>
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
            </div>
            <div class="col-xs-8">
              <div class="col-xs-3">
                <div class="input-group">
                  <input class="form-control helpReturn" ng-model="search.requestid" name="__requestid" type="text"/>
                  <a class="input-group-addon" href="javascript:goHelp('MREQUESTHELP','__requestid')">
                    <i class="fa fa-search"></i>
                  </a>
                </div>
              </div>
              <div class="col-xs-5">
                <input class="form-control" readonly name="MREQUEST_JOBDESC" ng-model="helpDesc.MREQUEST_JOBDESC" type="text" value=""/>
              </div>
            </div>
          </div>
        </div>

        <%-- search job--%>
        <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">
                <div class="input-group">
                  <input class="form-control helpReturn" ng-model="search.jobid" name="__jobid" type="text"/>
                  <a class="input-group-addon" href="javascript:goHelp('MJOBCODEHELP','__jobid')">
                    <i class="fa fa-search"></i>
                  </a>
                </div>
              </div>
              <div class="col-xs-5">
                <input class="form-control" readonly name="MJOBCODE_TDESC" ng-model="helpDesc.MJOBCODE_TDESC" type="text" value=""/>
              </div>
            </div>
          </div>
        </div>

        <%-- search emploeeid--%>
        <div class="row">
          <div class="form-group">
            <div class="col-xs-4">
              <label class="control-label label-right" swlang code='SW000350'>Employee ID</label>
            </div>
            <div class="col-xs-8">
              <div class="col-xs-3">
                <div class="input-group">
156
                  <%-- <input class="form-control helpReturn" ng-model="search.employeeid" name="__employeeid" type="text"/>
157 158
                  <a class="input-group-addon" href="javascript:goHelp('MEMPLOYEEHELP','__employeeid')">
                    <i class="fa fa-search"></i>
159 160
                  </a> --%>
                    <input class="form-control" name="date_start" type="text" ng-model="search.applicantdate" value="" size="10" maxlength="10" onKeyup = "formatDate(this)" onBlur = "chkInputDate2(this,date_end)" onKeypress = "chkIntegerOfDate(this.value)">
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200
                </div>
              </div>
              <div class="col-xs-5">
              </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.personal.fname.$" type="text"/>
              </div>
              <div class="col-xs-5">
                <input class="form-control helpReturn" placeholder="นามสกุล" ng-model="search.personal.lname.$" type="text"/>
              </div>
            </div>
          </div>
        </div>



        <div class="center">
          <button class="btn btn-primary" ng-click="search = {}; helpDesc = {}">ล้างข้อมูล</button>
        </div>
      </div>

      <%--Internal--%>
      <div class="table-responsive">
        <table class="table table-head table-hover table-bordered table-title-left">
          <tr>
            <th class='table-title' colspan='7'>รายชื่อผู้สมัครงาน (บุคคลภายใน)</th>
          </tr>
          <tr>
            <th>
201 202
              <a ng-click="sortByIn('applicantid')">เลขที่ใบสมัครงาน</a>
              <span class="sortorder" ng-show="propertyNameIn === 'applicantid'" ng-class="{reverse: reverseIn}"></span>
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218
            </th>
            <th>
              <a ng-click="sortByIn('employeeid')">รหัสพนักงาน</a>
              <span class="sortorder" ng-show="propertyNameIn === 'employeeid'" ng-class="{reverse: reverseIn}"></span>
            </th>
            <th>
              <a ng-click="sortByIn('personal.fname.$')">ชื่อ - นามสกุล</a>
              <span class="sortorder" ng-show="propertyNameIn === 'personal.fname.$'" ng-class="{reverse: reverseIn}"></span>
            </th>
            <th>ตำแหน่งเดิม</th>
            <th>ตำแหน่งที่สมัคร</th>
            <th>
              <a ng-click="sortByIn('applicantdate')">วันที่สมัคร</a>
              <span class="sortorder" ng-show="propertyNameIn === 'applicantdate'" ng-class="{reverse: reverseIn}"></span>
            </th>
          </tr>
219 220 221
          <tbody ng-repeat="app in applicants | filter: filterDirector | filter : filterInternal | filter : availableRequest | filter : search | orderBy:propertyNameIn:reverseIn">
          <%-- filter : availableRequest | filter: filterDirector | --%>
          <tbody ng-repeat="app in applicants | filter : filterInternal | filter : search | orderBy:propertyNameIn:reverseIn">
222
          <tr>
223
            <td class='center'>{{app.applicantid}}</td>
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241
            <td class='center'>{{app.employeeid}}</td>
            <td class='center'><a style="color: #4d4d4d !important;" ng-click="goPages(app.candidateid)"><master-prefix code="{{app.personal.prefixid}}"></master-prefix> {{app.personal.fname[lang]}} - {{app.personal.lname[lang]}}</a></td>
            <td class='center'><master-jobcode code="{{app.oldjobid}}"></master-jobcode></td>
            <td class='center'><master-jobcode code="{{app.jobid}}"></master-jobcode></td>
            <td class='center'>{{app.applicantdate | date: 'dd/MM/yyyy'}}</td>
          </tr>
          </tbody>
        </table>
      </div>

      <%--External--%>
      <div class="table-responsive">
        <table class="table table-head table-hover table-bordered table-title-left">
          <tr>
            <th class='table-title' colspan='5'>รายชื่อผู้สมัครงาน (บุคคลภายนอก)</th>
          </tr>
          <tr>
            <th>
242 243
              <a ng-click="sortByEx('applicantid')">เลขที่ใบสมัครงาน</a>
              <span class="sortorder" ng-show="propertyNameEx === 'applicantid'" ng-class="{reverse: reverseEx}"></span>
244 245 246 247 248 249 250 251 252 253 254
            </th>
            <th>
              <a ng-click="sortByEx('personal.fname.$')">ชื่อ - นามสกุล</a>
              <span class="sortorder" ng-show="propertyNameEx === 'personal.fname.$'" ng-class="{reverse: reverseEx}"></span>
            </th>
            <th>ตำแหน่งที่สมัคร</th>
            <th>
              <a ng-click="sortByEx('applicantdate')">วันที่สมัคร</a>
              <span class="sortorder" ng-show="propertyNameEx === 'applicantdate'" ng-class="{reverse: reverseEx}"></span>
            </th>
          </tr>
255 256 257
          <%-- <tbody ng-repeat="app in applicants | filter: filterDirector | filter : filterExternal | filter : availableRequest | filter : search | orderBy:propertyNameEx:reverseEx" > --%>
          <%-- filter : availableRequest | filter: filterDirector | --%>
          <tbody ng-repeat="app in applicants | filter : filterExternal |  filter : search | orderBy:propertyNameEx:reverseEx" >
258
          <tr>
259
            <td  class='center'>{{app.applicantid}}</td>
260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277
            <td class='center'><a style="color: #4d4d4d !important;" ng-click="goPages(app.candidateid)"><master-prefix code="{{app.personal.prefixid}}"></master-prefix> {{app.personal.fname[lang]}} - {{app.personal.lname[lang]}}</a></td>
            <td class='center'><master-jobcode code="{{app.jobid}}"></master-jobcode></td>
            <td class='center'>{{app.applicantdate | date: 'dd/MM/yyyy'}}</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>