| 15443 | efrain | 1 | <?php
 | 
        
           |  |  | 2 |   | 
        
           |  |  | 3 | $acl            = $this->viewModel()->getRoot()->getVariable('acl');
 | 
        
           |  |  | 4 | $currentUser    = $this->currentUserHelper();
 | 
        
           |  |  | 5 | $roleName       = $currentUser->getUserTypeId();
 | 
        
           |  |  | 6 |   | 
        
           |  |  | 7 | $routeDatatable = $this->url( 'activities-center/performance-evaluation');
 | 
        
           |  |  | 8 |   | 
        
           |  |  | 9 |   | 
        
           |  |  | 10 | $allowTakeaTest = $acl->isAllowed($roleName, 'activities-center/performance-evaluation/take-a-test') ? 1 : 0;
 | 
        
           |  |  | 11 | $allowReport =  $acl->isAllowed($roleName, 'activities-center/performance-evaluation/report') ? 1 : 0;
 | 
        
           |  |  | 12 |   | 
        
           |  |  | 13 | $this->headLink()->appendStylesheet($this->basePath('plugins/nprogress/nprogress.css'));
 | 
        
           |  |  | 14 | $this->inlineScript()->appendFile($this->basePath('plugins/nprogress/nprogress.js'));
 | 
        
           |  |  | 15 |   | 
        
           | 16803 | efrain | 16 | //$this->headLink()->appendStylesheet('https://fonts.googleapis.com/icon?family=Material+Icons');
 | 
        
           | 15443 | efrain | 17 |   | 
        
           |  |  | 18 | $this->inlineScript()->appendFile($this->basePath('plugins/bootbox/bootbox.min.js'));
 | 
        
           |  |  | 19 |   | 
        
           |  |  | 20 |   | 
        
           |  |  | 21 | $this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-maxlenght/bootstrap-maxlength.min.js'));
 | 
        
           |  |  | 22 |   | 
        
           |  |  | 23 |   | 
        
           |  |  | 24 | $this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/jquery.validate.js'));
 | 
        
           |  |  | 25 | $this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/additional-methods.js'));
 | 
        
           |  |  | 26 | $this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/localization/messages_es.js'));
 | 
        
           |  |  | 27 |   | 
        
           |  |  | 28 | $this->headLink()->appendStylesheet($this->basePath('plugins/datatables-bs4/css/dataTables.bootstrap4.min.css'));
 | 
        
           |  |  | 29 | $this->headLink()->appendStylesheet($this->basePath('plugins/datatables-responsive/css/responsive.bootstrap4.min.css'));
 | 
        
           |  |  | 30 |   | 
        
           |  |  | 31 | $this->inlineScript()->appendFile($this->basePath('plugins/datatables/jquery.dataTables.min.js'));
 | 
        
           |  |  | 32 | $this->inlineScript()->appendFile($this->basePath('plugins/datatables-bs4/js/dataTables.bootstrap4.min.js'));
 | 
        
           |  |  | 33 | $this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/dataTables.responsive.min.js'));
 | 
        
           |  |  | 34 | $this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/responsive.bootstrap4.min.js'));
 | 
        
           |  |  | 35 |   | 
        
           |  |  | 36 |   | 
        
           |  |  | 37 | $this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/jquery.validate.js'));
 | 
        
           |  |  | 38 | $this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/additional-methods.js'));
 | 
        
           |  |  | 39 | $this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/localization/messages_es.js'));
 | 
        
           |  |  | 40 |   | 
        
           |  |  | 41 | $this->inlineScript()->appendFile($this->basePath('plugins/moment/moment-with-locales.min.js'));
 | 
        
           |  |  | 42 | //$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-datetimepicker/css/bootstrap-datetimepicker.css'));
 | 
        
           |  |  | 43 | //$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js'));
 | 
        
           |  |  | 44 |   | 
        
           |  |  | 45 | $this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-datepicker/js/bootstrap-datepicker.js'));
 | 
        
           |  |  | 46 | $this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-datepicker/js/bootstrap-datepicker.es.js'));
 | 
        
           |  |  | 47 |   | 
        
           |  |  | 48 |   | 
        
           |  |  | 49 | $this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-datepicker/css/bootstrap-datepicker.css'));
 | 
        
           |  |  | 50 |   | 
        
           |  |  | 51 | $this->headLink()->appendStylesheet($this->basePath('plugins/select2/css/select2.min.css'));
 | 
        
           |  |  | 52 | $this->headLink()->appendStylesheet($this->basePath('plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css'));
 | 
        
           |  |  | 53 | $this->inlineScript()->appendFile($this->basePath('plugins/select2/js/select2.min.js'));
 | 
        
           |  |  | 54 |   | 
        
           |  |  | 55 | // JsRender //
 | 
        
           |  |  | 56 | $this->inlineScript()->appendFile($this->basePath('plugins/jsrender/jsrender.min.js'));
 | 
        
           |  |  | 57 |   | 
        
           |  |  | 58 | $this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap4-toggle/css/bootstrap4-toggle.min.css'));
 | 
        
           |  |  | 59 | $this->inlineScript()->appendFile($this->basePath('plugins/bootstrap4-toggle/js/bootstrap4-toggle.min.js'));
 | 
        
           |  |  | 60 |   | 
        
           |  |  | 61 | $this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-confirmation/dist/bootstrap-confirmation.js'));
 | 
        
           |  |  | 62 | $this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-checkbox/awesome-bootstrap-checkbox.css'));
 | 
        
           |  |  | 63 |   | 
        
           |  |  | 64 |   | 
        
           |  |  | 65 | $this->inlineScript()->appendFile($this->basePath('plugins/jquery-input-number/input-number-format.jquery.js'));
 | 
        
           |  |  | 66 |   | 
        
           | 16803 | efrain | 67 | $this->inlineScript()->appendFile($this->basePath('plugins/jquery-wizard/jquery.smartWizard.min.js'));
 | 
        
           |  |  | 68 | $this->headLink()->appendStylesheet($this->basePath('plugins/jquery-wizard/smart_wizard_all.min.css'));
 | 
        
           |  |  | 69 |   | 
        
           |  |  | 70 | $this->headLink()->appendStylesheet($this->basePath('css/activity-center-accordion.css'));
 | 
        
           |  |  | 71 |   | 
        
           |  |  | 72 |   | 
        
           | 15443 | efrain | 73 | $this->inlineScript()->captureStart();
 | 
        
           |  |  | 74 | echo <<<JS
 | 
        
           |  |  | 75 |   | 
        
           |  |  | 76 |   | 
        
           |  |  | 77 | jQuery( document ).ready(function( $ ) {
 | 
        
           |  |  | 78 |   | 
        
           |  |  | 79 |     var allowTakeaTest = $allowTakeaTest;
 | 
        
           |  |  | 80 |     var allowReport = $allowReport
 | 
        
           |  |  | 81 |   | 
        
           |  |  | 82 |     var competencies_selected = new Array();
 | 
        
           |  |  | 83 |     var subordinates_selected = new Array();
 | 
        
           |  |  | 84 |   | 
        
           |  |  | 85 |     var competency_types = new Array();
 | 
        
           |  |  | 86 |     var competencies = new Array();
 | 
        
           |  |  | 87 |     var behaviors = new Array();
 | 
        
           |  |  | 88 |   | 
        
           |  |  | 89 |   | 
        
           |  |  | 90 |     $.fn.renderJobDescription = function(data) {
 | 
        
           |  |  | 91 |   | 
        
           |  |  | 92 |         $('#div-job-description').html($('#job-description-template').render(data));
 | 
        
           |  |  | 93 |     }
 | 
        
           |  |  | 94 |   | 
        
           |  |  | 95 |   | 
        
           |  |  | 96 |     $.fn.renderCompetencies = function() {
 | 
        
           |  |  | 97 |   | 
        
           |  |  | 98 |         if(competencies_selected.length > 0) {
 | 
        
           |  |  | 99 |   | 
        
           | 16803 | efrain | 100 |              $('#accordion').html($('#competencyTemplate').render(competencies_selected, {
 | 
        
           | 15443 | efrain | 101 |                 getCompetencyType: (uuid) => competency_types.filter((item) => item.uuid == uuid ? item : false)[0],
 | 
        
           |  |  | 102 |                 getCompetency: (uuid) => competencies.filter((item) => item.uuid == uuid ? item : false)[0],
 | 
        
           |  |  | 103 |                 getBehavior: (uuid) => behaviors.filter((item) => item.uuid == uuid ? item : false)[0]
 | 
        
           |  |  | 104 |             }));
 | 
        
           |  |  | 105 |         } else {
 | 
        
           |  |  | 106 |   | 
        
           |  |  | 107 |   | 
        
           | 16803 | efrain | 108 |              $('#accordion').empty();
 | 
        
           | 15443 | efrain | 109 |         }
 | 
        
           | 16803 | efrain | 110 |   | 
        
           |  |  | 111 |   | 
        
           |  |  | 112 |     	$('.collapse.show').each(function(){
 | 
        
           |  |  | 113 |     		$(this).siblings('.card-header').find('.btn i').attr('class', 'fa fa-minus');
 | 
        
           |  |  | 114 |     	});
 | 
        
           |  |  | 115 |   | 
        
           |  |  | 116 |     	$('.collapse').on('show.bs.collapse', function(){
 | 
        
           |  |  | 117 |         	$(this).parent().find('.card-header .btn i').attr('class', 'fa fa-minus');
 | 
        
           |  |  | 118 |     	}).on('hide.bs.collapse', function(){
 | 
        
           |  |  | 119 |     		$(this).parent().find('.card-header .btn i').attr('class', 'fa fa-plus');
 | 
        
           |  |  | 120 |     	});
 | 
        
           |  |  | 121 |   | 
        
           | 15443 | efrain | 122 |     }
 | 
        
           |  |  | 123 |   | 
        
           |  |  | 124 |   | 
        
           |  |  | 125 |   | 
        
           |  |  | 126 |     $.validator.setDefaults({
 | 
        
           |  |  | 127 |         debug: true,
 | 
        
           |  |  | 128 |         highlight: function(element) {
 | 
        
           |  |  | 129 |             $(element).addClass('is-invalid');
 | 
        
           |  |  | 130 |         },
 | 
        
           |  |  | 131 |         unhighlight: function(element) {
 | 
        
           |  |  | 132 |             $(element).removeClass('is-invalid');
 | 
        
           |  |  | 133 |         },
 | 
        
           |  |  | 134 |         errorElement: 'span',
 | 
        
           |  |  | 135 |         errorClass: 'error invalid-feedback',
 | 
        
           |  |  | 136 |         errorPlacement: function(error, element) {
 | 
        
           |  |  | 137 |             if(element.parent('.form-group').length) {
 | 
        
           |  |  | 138 |                 error.insertAfter(element);
 | 
        
           |  |  | 139 |             } else if(element.parent('.toggle').length) {
 | 
        
           |  |  | 140 |                 error.insertAfter(element.parent().parent());
 | 
        
           |  |  | 141 |             } else {
 | 
        
           |  |  | 142 |                 error.insertAfter(element.parent());
 | 
        
           |  |  | 143 |             }
 | 
        
           |  |  | 144 |         }
 | 
        
           |  |  | 145 |     });
 | 
        
           |  |  | 146 |   | 
        
           |  |  | 147 |   | 
        
           |  |  | 148 |   | 
        
           |  |  | 149 |     $.fn.showFormErrorValidator = function(fieldname, errors) {
 | 
        
           |  |  | 150 |         var field = $(fieldname);
 | 
        
           |  |  | 151 |         if(field) {
 | 
        
           |  |  | 152 |             $(field).addClass('form-group-has-error');
 | 
        
           |  |  | 153 |   | 
        
           |  |  | 154 |             var error = $('<div id="' + fieldname +'-error" class="form-group-invalid-feedback">' + errors + '</div>');
 | 
        
           |  |  | 155 |             if(field.parent('.form-group').length) {
 | 
        
           |  |  | 156 |                 error.insertAfter(field.parent());
 | 
        
           |  |  | 157 |             } else {
 | 
        
           |  |  | 158 |                 error.insertAfter(field);
 | 
        
           |  |  | 159 |             }
 | 
        
           |  |  | 160 |         }
 | 
        
           |  |  | 161 |     };
 | 
        
           |  |  | 162 |   | 
        
           |  |  | 163 |   | 
        
           |  |  | 164 |   | 
        
           |  |  | 165 |         var gridTable = $('#gridTable').dataTable( {
 | 
        
           |  |  | 166 |             'processing': true,
 | 
        
           |  |  | 167 |             'serverSide': true,
 | 
        
           |  |  | 168 |             'searching': true,
 | 
        
           |  |  | 169 |             'search' : {
 | 
        
           |  |  | 170 |                 'search' : '$search',
 | 
        
           |  |  | 171 |             },
 | 
        
           |  |  | 172 |   | 
        
           |  |  | 173 |             'order': [[ 1, 'asc' ]],
 | 
        
           |  |  | 174 |             'ordering':  true,
 | 
        
           |  |  | 175 |             'ordenable' : true,
 | 
        
           |  |  | 176 |             'responsive': true,
 | 
        
           |  |  | 177 |             'select' : false,
 | 
        
           |  |  | 178 |                 'paging': true,
 | 
        
           |  |  | 179 |             'pagingType': 'simple_numbers',
 | 
        
           |  |  | 180 |             'lengthMenu': [ [10, 25, 50, -1], [10, 25, 50, 'All'] ],
 | 
        
           |  |  | 181 |   | 
        
           |  |  | 182 |                 'ajax': {
 | 
        
           |  |  | 183 |                         'url' : '$routeDatatable',
 | 
        
           |  |  | 184 |                         'type' : 'get',
 | 
        
           |  |  | 185 |                 'data': function ( d ) {
 | 
        
           |  |  | 186 |   | 
        
           |  |  | 187 |   | 
        
           |  |  | 188 |                 },
 | 
        
           |  |  | 189 |                 'beforeSend': function (request) {
 | 
        
           |  |  | 190 |                   NProgress.start();
 | 
        
           |  |  | 191 |                 },
 | 
        
           |  |  | 192 |                 'dataFilter': function(response) {
 | 
        
           |  |  | 193 |                     var response = jQuery.parseJSON( response );
 | 
        
           |  |  | 194 |   | 
        
           |  |  | 195 |                     var json                = {};
 | 
        
           |  |  | 196 |                     json.recordsTotal       = 0;
 | 
        
           |  |  | 197 |                     json.recordsFiltered    = 0;
 | 
        
           |  |  | 198 |                     json.data               = [];
 | 
        
           |  |  | 199 |   | 
        
           |  |  | 200 |                     if(response.success) {
 | 
        
           |  |  | 201 |                                                json.recordsTotal       = response.data.total;
 | 
        
           |  |  | 202 |                         json.recordsFiltered    = response.data.total;
 | 
        
           |  |  | 203 |                         json.data               = response.data.items;
 | 
        
           |  |  | 204 |                     } else {
 | 
        
           |  |  | 205 |                         $.fn.showError(response.data)
 | 
        
           |  |  | 206 |                     }
 | 
        
           |  |  | 207 |   | 
        
           |  |  | 208 |                     return JSON.stringify( json );
 | 
        
           |  |  | 209 |                 }
 | 
        
           |  |  | 210 |                 },
 | 
        
           |  |  | 211 |             'language' : {
 | 
        
           |  |  | 212 |                 'sProcessing':     'LABEL_DATATABLE_SPROCESSING',
 | 
        
           |  |  | 213 |                 'sLengthMenu':     'LABEL_DATATABLE_SLENGTHMENU',
 | 
        
           |  |  | 214 |                 'sZeroRecords':    'LABEL_DATATABLE_SZERORECORDS',
 | 
        
           |  |  | 215 |                 'sEmptyTable':     'LABEL_DATATABLE_SEMPTYTABLE',
 | 
        
           |  |  | 216 |                 'sInfo':           'LABEL_DATATABLE_SINFO',
 | 
        
           |  |  | 217 |                 'sInfoEmpty':      'LABEL_DATATABLE_SINFOEMPTY',
 | 
        
           |  |  | 218 |                 'sInfoFiltered':   'LABEL_DATATABLE_SINFOFILTERED',
 | 
        
           |  |  | 219 |                 'sInfoPostFix':    '',
 | 
        
           |  |  | 220 |                 'sSearch':         'LABEL_DATATABLE_SSEARCH',
 | 
        
           |  |  | 221 |                 'sUrl':            '',
 | 
        
           |  |  | 222 |                 'sInfoThousands':  ',',
 | 
        
           |  |  | 223 |                 'sLoadingRecords': 'LABEL_DATATABLE_SLOADINGRECORDS',
 | 
        
           |  |  | 224 |                 'oPaginate': {
 | 
        
           |  |  | 225 |                     'sFirst':    'LABEL_DATATABLE_SFIRST',
 | 
        
           |  |  | 226 |                     'sLast':     'LABEL_DATATABLE_SLAST',
 | 
        
           |  |  | 227 |                     'sNext':     'LABEL_DATATABLE_SNEXT',
 | 
        
           |  |  | 228 |                     'sPrevious': 'LABEL_DATATABLE_SPREVIOUS'
 | 
        
           |  |  | 229 |                 },
 | 
        
           |  |  | 230 |                 'oAria': {
 | 
        
           |  |  | 231 |                     'sSortAscending':  ': LABEL_DATATABLE_SSORTASCENDING',
 | 
        
           |  |  | 232 |                     'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
 | 
        
           |  |  | 233 |                 },
 | 
        
           |  |  | 234 |             },
 | 
        
           |  |  | 235 |             'drawCallback': function( settings ) {
 | 
        
           |  |  | 236 |                 NProgress.done();
 | 
        
           |  |  | 237 |                 $('button.btn-delete').confirmation({
 | 
        
           |  |  | 238 |                     rootSelector: 'button.btn-delete',
 | 
        
           |  |  | 239 |                     title : 'LABEL_ARE_YOU_SURE',
 | 
        
           |  |  | 240 |                     singleton : true,
 | 
        
           |  |  | 241 |                     btnOkLabel: 'LABEL_YES',
 | 
        
           |  |  | 242 |                     btnCancelLabel: 'LABEL_NO',
 | 
        
           |  |  | 243 |                     onConfirm: function(value) {
 | 
        
           |  |  | 244 |                         action = $(this).data('href');
 | 
        
           |  |  | 245 |                         NProgress.start();
 | 
        
           |  |  | 246 |                         $.ajax({
 | 
        
           |  |  | 247 |                             'dataType'  : 'json',
 | 
        
           |  |  | 248 |                             'accept'    : 'application/json',
 | 
        
           |  |  | 249 |                             'method'    : 'post',
 | 
        
           |  |  | 250 |                             'url'       :  action,
 | 
        
           |  |  | 251 |                         }).done(function(response) {
 | 
        
           |  |  | 252 |                             if(response['success']) {
 | 
        
           |  |  | 253 |                                 $.fn.showSuccess(response['data']);
 | 
        
           |  |  | 254 |                                 gridTable.api().ajax.reload(null, false);
 | 
        
           |  |  | 255 |                             } else {
 | 
        
           |  |  | 256 |                                 $.fn.showError(response['data']);
 | 
        
           |  |  | 257 |                             }
 | 
        
           |  |  | 258 |                         }).fail(function( jqXHR, textStatus, errorThrown) {
 | 
        
           |  |  | 259 |                             $.fn.showError(textStatus);
 | 
        
           |  |  | 260 |                         }).always(function() {
 | 
        
           |  |  | 261 |                             NProgress.done();
 | 
        
           |  |  | 262 |                         });
 | 
        
           |  |  | 263 |                     },
 | 
        
           |  |  | 264 |                 });
 | 
        
           |  |  | 265 |   | 
        
           |  |  | 266 |   | 
        
           |  |  | 267 |             },
 | 
        
           |  |  | 268 |             'aoColumns': [
 | 
        
           |  |  | 269 |                 { 'mDataProp': 'last_date' },
 | 
        
           |  |  | 270 |                 { 'mDataProp': 'form' },
 | 
        
           |  |  | 271 |                 { 'mDataProp': 'supervisor_first_name' },
 | 
        
           |  |  | 272 |                 { 'mDataProp': 'employee_last_name' },
 | 
        
           |  |  | 273 |                 { 'mDataProp': 'status' },
 | 
        
           |  |  | 274 |   | 
        
           |  |  | 275 |             ],
 | 
        
           |  |  | 276 |             'columnDefs': [
 | 
        
           |  |  | 277 |                 {
 | 
        
           |  |  | 278 |                     'targets': 0,
 | 
        
           |  |  | 279 |                     'render' : function ( data, type, row ) {
 | 
        
           |  |  | 280 |                         var s = row['last_date'] + '<br>' + row['type'];
 | 
        
           |  |  | 281 |   | 
        
           |  |  | 282 |                         return s;
 | 
        
           |  |  | 283 |   | 
        
           |  |  | 284 |   | 
        
           |  |  | 285 |                      }
 | 
        
           |  |  | 286 |                 },
 | 
        
           |  |  | 287 |                 {
 | 
        
           |  |  | 288 |                     'targets': 1,
 | 
        
           |  |  | 289 |                     'render' : function ( data, type, row ) {
 | 
        
           |  |  | 290 |                         var s = row['form'];
 | 
        
           |  |  | 291 |   | 
        
           |  |  | 292 |                         if (allowTakeaTest && row['actions']['link_take_a_test']) {
 | 
        
           |  |  | 293 |   | 
        
           |  |  | 294 |                             s = s + '<br><button class="btn btn-default btn-take-the-test" data-href="' + row['actions']['link_take_a_test'] + '" data-toggle="tooltip" title="LABEL_PERFORMANCE_EVALUATION_TAKE_TEST"><i class="fa fa-pencil"></i> LABEL_PERFORMANCE_EVALUATION_TAKE_TEST </button> ';
 | 
        
           |  |  | 295 |                         }
 | 
        
           |  |  | 296 |   | 
        
           |  |  | 297 |                         if (allowReport && row['actions']['link_pdf']) {
 | 
        
           |  |  | 298 |                             s = s + '<br><button class="btn btn-default btn-pdf" data-href="' + row['actions']['link_pdf'] + '" data-toggle="tooltip" title="LABEL_PDF"><i class="fa fa-pdf"></i> LABEL_PDF </button> ';
 | 
        
           |  |  | 299 |                         }
 | 
        
           |  |  | 300 |   | 
        
           |  |  | 301 |                         return s;
 | 
        
           |  |  | 302 |   | 
        
           |  |  | 303 |   | 
        
           |  |  | 304 |                      }
 | 
        
           |  |  | 305 |                 },
 | 
        
           |  |  | 306 |                 {
 | 
        
           |  |  | 307 |                     'targets': 2,
 | 
        
           |  |  | 308 |                     'render' : function ( data, type, row ) {
 | 
        
           |  |  | 309 |                         var s = row['supervisor_first_name'] + ' ' + row['supervisor_last_name'];
 | 
        
           |  |  | 310 |   | 
        
           |  |  | 311 |                         return s;
 | 
        
           |  |  | 312 |   | 
        
           |  |  | 313 |   | 
        
           |  |  | 314 |                      }
 | 
        
           |  |  | 315 |                 },
 | 
        
           |  |  | 316 |                 {
 | 
        
           |  |  | 317 |                     'targets': 3,
 | 
        
           |  |  | 318 |                     'render' : function ( data, type, row ) {
 | 
        
           |  |  | 319 |                         var s = row['employee_first_name'] + ' ' + row['employee_last_name'];
 | 
        
           |  |  | 320 |   | 
        
           |  |  | 321 |                         return s;
 | 
        
           |  |  | 322 |   | 
        
           |  |  | 323 |   | 
        
           |  |  | 324 |                      }
 | 
        
           |  |  | 325 |                 },
 | 
        
           |  |  | 326 |   | 
        
           |  |  | 327 |               ],
 | 
        
           |  |  | 328 |         });
 | 
        
           |  |  | 329 |   | 
        
           |  |  | 330 |   | 
        
           |  |  | 331 |   | 
        
           |  |  | 332 |     $('body').on('click', 'button.btn-save', function(e) {
 | 
        
           |  |  | 333 |         e.preventDefault();
 | 
        
           |  |  | 334 |   | 
        
           |  |  | 335 |         var ok = $('#comment').val().trim().length > 0
 | 
        
           |  |  | 336 |         $.each($('input.input-behavior-comment'), function(index, element) {
 | 
        
           |  |  | 337 |             ok = ok && $(element).val().trim().length > 0;
 | 
        
           |  |  | 338 |         });
 | 
        
           |  |  | 339 |   | 
        
           |  |  | 340 |         if(!ok) {
 | 
        
           |  |  | 341 |             $.fn.showError('ERROR_PERFORMANCE_SOMEONE_COMMENT_IS_EMPTY');
 | 
        
           |  |  | 342 |             return false;
 | 
        
           |  |  | 343 |         }
 | 
        
           |  |  | 344 |   | 
        
           |  |  | 345 |         bootbox.confirm({
 | 
        
           |  |  | 346 |             message: 'LABEL_PERFORMANCE_EVALUATION_TEST_IS_COMPLETED',
 | 
        
           |  |  | 347 |             buttons: {
 | 
        
           |  |  | 348 |                 confirm: {
 | 
        
           |  |  | 349 |                     label: 'LABEL_YES',
 | 
        
           |  |  | 350 |                     className: 'btn-success'
 | 
        
           |  |  | 351 |                 },
 | 
        
           |  |  | 352 |                 cancel: {
 | 
        
           |  |  | 353 |                     label: 'LABEL_NO',
 | 
        
           |  |  | 354 |                     className: 'btn-warning'
 | 
        
           |  |  | 355 |                 }
 | 
        
           |  |  | 356 |             },
 | 
        
           |  |  | 357 |             callback: function (result) {
 | 
        
           |  |  | 358 |                 if(result) {
 | 
        
           |  |  | 359 |                     var data = new Array()
 | 
        
           |  |  | 360 |                     data['comment'] = $('#comment').val().trim();
 | 
        
           |  |  | 361 |                     data['points'] = $('#points').val();
 | 
        
           |  |  | 362 |                     $.each($('input.input-behavior-comment'), function(index, element) {
 | 
        
           |  |  | 363 |                         k = $(this).attr('name');
 | 
        
           |  |  | 364 |                         v = $(this).val().trim();
 | 
        
           |  |  | 365 |   | 
        
           |  |  | 366 |                         data[k] = v;
 | 
        
           |  |  | 367 |                     });
 | 
        
           |  |  | 368 |                     $.each($('input.input-behavior-level'), function(index, element) {
 | 
        
           |  |  | 369 |                         k = $(this).attr('name');
 | 
        
           |  |  | 370 |                         v = $(this).val();
 | 
        
           |  |  | 371 |   | 
        
           |  |  | 372 |                         data[k] = v;
 | 
        
           |  |  | 373 |                     });
 | 
        
           |  |  | 374 |   | 
        
           |  |  | 375 |   | 
        
           |  |  | 376 |   | 
        
           |  |  | 377 |                     var action = $('#form').attr('action');
 | 
        
           |  |  | 378 |                     $.ajax({
 | 
        
           |  |  | 379 |                         'dataType': 'json',
 | 
        
           |  |  | 380 |                         'accept': 'application/json',
 | 
        
           |  |  | 381 |                         'method': 'post',
 | 
        
           |  |  | 382 |                         'url': action,
 | 
        
           |  |  | 383 |                         'data' : $('#form').serialize()
 | 
        
           |  |  | 384 |                     }).done(function(response) {
 | 
        
           |  |  | 385 |                         if (response['success']) {
 | 
        
           |  |  | 386 |                             $('#row-test').hide();
 | 
        
           |  |  | 387 |                             $('#row-header').show();
 | 
        
           |  |  | 388 |                             $('#row-table').show();
 | 
        
           |  |  | 389 |   | 
        
           |  |  | 390 |                             gridTable.api().ajax.reload(null, false);
 | 
        
           |  |  | 391 |                         } else {
 | 
        
           |  |  | 392 |                             $.fn.showError(response['data']);
 | 
        
           |  |  | 393 |                         }
 | 
        
           |  |  | 394 |                     }).fail(function(jqXHR, textStatus, errorThrown) {
 | 
        
           |  |  | 395 |                         $.fn.showError(textStatus);
 | 
        
           |  |  | 396 |                     });
 | 
        
           |  |  | 397 |                 }
 | 
        
           |  |  | 398 |             }
 | 
        
           |  |  | 399 |         });
 | 
        
           |  |  | 400 |   | 
        
           |  |  | 401 |   | 
        
           |  |  | 402 |     });
 | 
        
           |  |  | 403 |   | 
        
           |  |  | 404 |     $('body').on('click', 'button.btn-refresh', function(e) {
 | 
        
           |  |  | 405 |         e.preventDefault();
 | 
        
           |  |  | 406 |         gridTable.api().ajax.reload(null, false);
 | 
        
           |  |  | 407 |     });
 | 
        
           |  |  | 408 |   | 
        
           |  |  | 409 |   | 
        
           |  |  | 410 |    $('body').on('click', 'button.btn-pdf', function(e) {
 | 
        
           |  |  | 411 |         e.preventDefault();
 | 
        
           |  |  | 412 |         var action   = $(this).data('href');
 | 
        
           |  |  | 413 |   | 
        
           |  |  | 414 |   | 
        
           |  |  | 415 |         NProgress.start();
 | 
        
           |  |  | 416 |         $.ajax({
 | 
        
           |  |  | 417 |             'dataType'  : 'json',
 | 
        
           |  |  | 418 |             'method'    : 'get',
 | 
        
           |  |  | 419 |             'url'       :  action,
 | 
        
           |  |  | 420 |         }).done(function(response) {
 | 
        
           |  |  | 421 |             if(response['success']) {
 | 
        
           |  |  | 422 |                 var anchor = window.document.createElement("a");
 | 
        
           |  |  | 423 |                 anchor.href = 'data:application/octet-stream;charset=utf-8;base64,' + response['data']['content'] ;
 | 
        
           |  |  | 424 |                 anchor.download = response['data']['basename'];
 | 
        
           |  |  | 425 |                 document.body.appendChild(anchor);
 | 
        
           |  |  | 426 |                 anchor.click();  // IE: "Access is denied"; see: https://connect.microsoft.com/IE/feedback/details/797361/ie-10-treats-blob-url-as-cross-origin-and-denies-access
 | 
        
           |  |  | 427 |                 document.body.removeChild(anchor);
 | 
        
           |  |  | 428 |             } else {
 | 
        
           |  |  | 429 |                 $.fn.showError(response['data']);
 | 
        
           |  |  | 430 |             }
 | 
        
           |  |  | 431 |         }).fail(function( jqXHR, textStatus, errorThrown) {
 | 
        
           |  |  | 432 |             $.fn.showError(textStatus);
 | 
        
           |  |  | 433 |         }).always(function() {
 | 
        
           |  |  | 434 |             NProgress.done();
 | 
        
           |  |  | 435 |         });
 | 
        
           |  |  | 436 |   | 
        
           |  |  | 437 |   | 
        
           |  |  | 438 |   | 
        
           |  |  | 439 |     });
 | 
        
           |  |  | 440 |   | 
        
           |  |  | 441 |     $('body').on('click', 'button.btn-cancel', function(e) {
 | 
        
           |  |  | 442 |         e.preventDefault();
 | 
        
           |  |  | 443 |   | 
        
           |  |  | 444 |         $('#row-test').hide();
 | 
        
           |  |  | 445 |         $('#row-header').show();
 | 
        
           |  |  | 446 |         $('#row-table').show();
 | 
        
           |  |  | 447 |   | 
        
           |  |  | 448 |     });
 | 
        
           |  |  | 449 |   | 
        
           |  |  | 450 |   | 
        
           |  |  | 451 |     $('body').on('click', 'button.btn-take-the-test', function(e) {
 | 
        
           |  |  | 452 |         e.preventDefault();
 | 
        
           |  |  | 453 |   | 
        
           |  |  | 454 |         var action   = $(this).data('href');
 | 
        
           |  |  | 455 |         $.getJSON(action, function(response) {
 | 
        
           |  |  | 456 |             if(response['success']) {
 | 
        
           |  |  | 457 |   | 
        
           |  |  | 458 |                 $('#form').attr('action', action);
 | 
        
           |  |  | 459 |   | 
        
           |  |  | 460 |                 behaviors = response['data']['behaviors'];
 | 
        
           |  |  | 461 |                 competency_types = response['data']['competency_types'];
 | 
        
           |  |  | 462 |                 competencies = response['data']['competencies'];
 | 
        
           |  |  | 463 |                 competencies_selected = response['data']['competencies_selected'];
 | 
        
           |  |  | 464 |                 subordinates_selected = response['data']['subordinates_selected'];
 | 
        
           |  |  | 465 |   | 
        
           |  |  | 466 |                 $.fn.renderCompetencies();
 | 
        
           |  |  | 467 |   | 
        
           | 16803 | efrain | 468 |                 $('#form-title').html( response['data']['form'])
 | 
        
           | 15443 | efrain | 469 |   | 
        
           | 16803 | efrain | 470 |   | 
        
           | 15443 | efrain | 471 |                 var data = {
 | 
        
           |  |  | 472 |                     name: response['data']['name'],
 | 
        
           |  |  | 473 |                     functions : response['data']['functions'],
 | 
        
           |  |  | 474 |                     objectives : response['data']['objectives'],
 | 
        
           |  |  | 475 |                     form : response['data']['form'],
 | 
        
           |  |  | 476 |                     type : response['data']['type'],
 | 
        
           |  |  | 477 |                     supervisor : response['data']['supervisor'],
 | 
        
           |  |  | 478 |                     employee : response['data']['employee'],
 | 
        
           |  |  | 479 |                     last_date : response['data']['last_date'],
 | 
        
           |  |  | 480 |                 }
 | 
        
           |  |  | 481 |                 $.fn.renderJobDescription(data);
 | 
        
           |  |  | 482 |   | 
        
           |  |  | 483 |   | 
        
           |  |  | 484 |   | 
        
           |  |  | 485 |                 $('input.input-behavior-level').inputNumberFormat({decimal: 0});
 | 
        
           |  |  | 486 |                 $('input.input-behavior-level').change(function(e) {
 | 
        
           |  |  | 487 |                     e.preventDefault();
 | 
        
           |  |  | 488 |   | 
        
           |  |  | 489 |                     var v = parseInt($(this).val());
 | 
        
           |  |  | 490 |                     if(isNaN(v)) {
 | 
        
           |  |  | 491 |                         $(this).val('0');
 | 
        
           |  |  | 492 |                     } else {
 | 
        
           |  |  | 493 |                         if(v > 100) {
 | 
        
           |  |  | 494 |                             $(this).val('100');
 | 
        
           |  |  | 495 |                         }
 | 
        
           |  |  | 496 |                     }
 | 
        
           |  |  | 497 |                 });
 | 
        
           |  |  | 498 |   | 
        
           |  |  | 499 |   | 
        
           | 15450 | efrain | 500 |                 $('#comment').val('');
 | 
        
           |  |  | 501 |                 $('#points').val('');
 | 
        
           | 15443 | efrain | 502 |                 $('#row-header').hide();
 | 
        
           |  |  | 503 |                 $('#row-table').hide();
 | 
        
           |  |  | 504 |                 $('#row-test').show();
 | 
        
           |  |  | 505 |   | 
        
           |  |  | 506 |   | 
        
           |  |  | 507 |             } else {
 | 
        
           |  |  | 508 |                 $.fn.showError(response['data'])
 | 
        
           |  |  | 509 |             }
 | 
        
           |  |  | 510 |         }).fail(function( jqXHR, textStatus, errorThrown) {
 | 
        
           |  |  | 511 |                     $.fn.showError(textStatus);
 | 
        
           |  |  | 512 |                 }).always(function() {
 | 
        
           |  |  | 513 |                     NProgress.done();
 | 
        
           |  |  | 514 |                 });
 | 
        
           |  |  | 515 |   | 
        
           |  |  | 516 |   | 
        
           |  |  | 517 |     });
 | 
        
           |  |  | 518 |   | 
        
           |  |  | 519 |   | 
        
           |  |  | 520 |     $('#form #comment').maxlength({
 | 
        
           |  |  | 521 |         alwaysShow: true,
 | 
        
           |  |  | 522 |         validate: true
 | 
        
           |  |  | 523 |     });
 | 
        
           |  |  | 524 |   | 
        
           |  |  | 525 |   | 
        
           |  |  | 526 |   | 
        
           |  |  | 527 |     $('#points').inputNumberFormat({decimal: 0});
 | 
        
           |  |  | 528 |     $('#points').change(function(e) {
 | 
        
           |  |  | 529 |         e.preventDefault();
 | 
        
           |  |  | 530 |   | 
        
           |  |  | 531 |         var v = parseInt($(this).val());
 | 
        
           |  |  | 532 |         if(isNaN(v)) {
 | 
        
           |  |  | 533 |             $(this).val('0');
 | 
        
           |  |  | 534 |         } else {
 | 
        
           |  |  | 535 |             if(v > 100) {
 | 
        
           |  |  | 536 |                 $(this).val('100');
 | 
        
           |  |  | 537 |             }
 | 
        
           |  |  | 538 |         }
 | 
        
           |  |  | 539 |     });
 | 
        
           |  |  | 540 |   | 
        
           | 16803 | efrain | 541 |   | 
        
           |  |  | 542 |     $('#stepwizard').smartWizard({
 | 
        
           |  |  | 543 |         selected: 0,
 | 
        
           |  |  | 544 |         // autoAdjustHeight: false,
 | 
        
           |  |  | 545 |         theme: 'arrows', // basic, arrows, square, round, dots
 | 
        
           |  |  | 546 |         transition: {
 | 
        
           |  |  | 547 |             animation:'none'
 | 
        
           |  |  | 548 |         },
 | 
        
           |  |  | 549 |         lang: {
 | 
        
           |  |  | 550 |             next: 'LABEL_NEXT',
 | 
        
           |  |  | 551 |             previous: 'LABEL_PREVIOUS',
 | 
        
           |  |  | 552 |         },
 | 
        
           |  |  | 553 |         toolbar: {
 | 
        
           |  |  | 554 |             showNextButton: true, // show/hide a Next button
 | 
        
           |  |  | 555 |             showPreviousButton: true, // show/hide a Previous button
 | 
        
           |  |  | 556 |             position: 'bottom', // none/ top/ both bottom
 | 
        
           |  |  | 557 |             extraHtml: `<button type="button" class="btn btn-primary btn-save">LABEL_SAVE</button>`
 | 
        
           |  |  | 558 |                 + `<button type="button" class="btn btn-secondary btn-cancel">LABEL_CANCEL</button>`
 | 
        
           |  |  | 559 |         },
 | 
        
           |  |  | 560 |         anchor: {
 | 
        
           |  |  | 561 |             enableNavigation: true, // Enable/Disable anchor navigation
 | 
        
           |  |  | 562 |             enableNavigationAlways: false, // Activates all anchors clickable always
 | 
        
           |  |  | 563 |             enableDoneState: true, // Add done state on visited steps
 | 
        
           |  |  | 564 |             markPreviousStepsAsDone: true, // When a step selected by url hash, all previous steps are marked done
 | 
        
           |  |  | 565 |             unDoneOnBackNavigation: true, // While navigate back, done state will be cleared
 | 
        
           |  |  | 566 |             enableDoneStateNavigation: true // Enable/Disable the done state navigation
 | 
        
           |  |  | 567 |         },
 | 
        
           |  |  | 568 |     });
 | 
        
           |  |  | 569 |   | 
        
           |  |  | 570 |     $('#stepwizard').smartWizard('reset');
 | 
        
           |  |  | 571 |   | 
        
           | 15443 | efrain | 572 |   | 
        
           |  |  | 573 | });
 | 
        
           |  |  | 574 | JS;
 | 
        
           |  |  | 575 | $this->inlineScript()->captureEnd();
 | 
        
           |  |  | 576 | ?>
 | 
        
           |  |  | 577 |   | 
        
           |  |  | 578 | <!-- Content Header (Page header) -->
 | 
        
           |  |  | 579 | <section id="row-header" class="content-header">
 | 
        
           |  |  | 580 |     <div class="container-fluid">
 | 
        
           |  |  | 581 |         <div class="row mb-2">
 | 
        
           |  |  | 582 |             <div class="col-sm-12">
 | 
        
           |  |  | 583 |                 <h1>LABEL_PERFORMANCE_EVALUATIONS</h1>
 | 
        
           |  |  | 584 |             </div>
 | 
        
           |  |  | 585 |         </div>
 | 
        
           |  |  | 586 |     </div>
 | 
        
           |  |  | 587 |     <!-- /.container-fluid -->
 | 
        
           |  |  | 588 | </section>
 | 
        
           |  |  | 589 | <section id="row-table" class="content">
 | 
        
           |  |  | 590 |     <div class="container-fluid" id="row-lists">
 | 
        
           |  |  | 591 |         <div class="row">
 | 
        
           |  |  | 592 |             <div class="col-12">
 | 
        
           |  |  | 593 |                 <div class="card">
 | 
        
           |  |  | 594 |                     <div class="card-body">
 | 
        
           |  |  | 595 |                         <table id="gridTable" class="table   table-hover">
 | 
        
           |  |  | 596 |                             <thead>
 | 
        
           |  |  | 597 |                                 <tr>
 | 
        
           |  |  | 598 |                                     <th style="width:15%">LABEL_LAST_DATE</th>
 | 
        
           |  |  | 599 |                                     <th style="width:35%">LABEL_FORM_NAME</th>
 | 
        
           |  |  | 600 |                                     <th style="width:35%">LABEL_SUPERVISOR</th>
 | 
        
           |  |  | 601 |                                     <th style="width:35%">LABEL_EVALUATED</th>
 | 
        
           |  |  | 602 |                                     <th style="width:15%">LABEL_STATUS</th>
 | 
        
           |  |  | 603 |   | 
        
           |  |  | 604 |                                 </tr>
 | 
        
           |  |  | 605 |                             </thead>
 | 
        
           |  |  | 606 |                             <tbody></tbody>
 | 
        
           |  |  | 607 |                         </table>
 | 
        
           |  |  | 608 |                     </div>
 | 
        
           |  |  | 609 |                     <div class="card-footer clearfix">
 | 
        
           |  |  | 610 |                         <div style="float:right;">
 | 
        
           |  |  | 611 |                             <button type="button" class="btn btn-info btn-refresh"><i class="fa fa-refresh"></i> LABEL_REFRESH </button>
 | 
        
           |  |  | 612 |                         </div>
 | 
        
           |  |  | 613 |                     </div>
 | 
        
           |  |  | 614 |                 </div>
 | 
        
           |  |  | 615 |             </div>
 | 
        
           |  |  | 616 |         </div>
 | 
        
           |  |  | 617 |     </div>
 | 
        
           |  |  | 618 | </section>
 | 
        
           |  |  | 619 |   | 
        
           |  |  | 620 |   | 
        
           |  |  | 621 | <section id="row-test" style="display: none;">
 | 
        
           | 16803 | efrain | 622 | 	<div class="container-fluid">
 | 
        
           | 15443 | efrain | 623 |         <div class="row p-2">
 | 
        
           | 16803 | efrain | 624 | 			<div class="col-12">
 | 
        
           |  |  | 625 | 				<h4 class="text-center" id="form-title"></h4>
 | 
        
           |  |  | 626 | 				<?php
 | 
        
           |  |  | 627 |                 $form->setAttributes([
 | 
        
           |  |  | 628 |                     'method' => 'post',
 | 
        
           |  |  | 629 |                     'name' => 'form',
 | 
        
           |  |  | 630 |                     'id' => 'form',
 | 
        
           |  |  | 631 |                 ]);
 | 
        
           |  |  | 632 |                 $form->prepare();
 | 
        
           |  |  | 633 |                 echo $this->form()->openTag($form);
 | 
        
           |  |  | 634 |                 ?>
 | 
        
           |  |  | 635 |   | 
        
           |  |  | 636 |         		<div id="stepwizard" class="border border-gray p-4 mt-2">
 | 
        
           |  |  | 637 |             		<ul class="nav">
 | 
        
           |  |  | 638 |                     	<li class="nav-item">
 | 
        
           |  |  | 639 |                         	<a class="nav-link" href="#step-1">
 | 
        
           |  |  | 640 |                             	<div class="num">1</div>
 | 
        
           |  |  | 641 |                               	LABEL_GENERAL
 | 
        
           |  |  | 642 |                          	</a>
 | 
        
           |  |  | 643 |                     	</li>
 | 
        
           |  |  | 644 |                         <li class="nav-item">
 | 
        
           |  |  | 645 |                         	<a class="nav-link" href="#step-2">
 | 
        
           |  |  | 646 |                             	<div class="num">2</div>
 | 
        
           |  |  | 647 |                                	LABEL_COMPETENCIES
 | 
        
           |  |  | 648 |                             </a>
 | 
        
           |  |  | 649 |                     	</li>
 | 
        
           |  |  | 650 |                         <li class="nav-item">
 | 
        
           |  |  | 651 |                         	<a class="nav-link" href="#step-3">
 | 
        
           |  |  | 652 |                             	<span class="num">3</span>
 | 
        
           |  |  | 653 |                               	LABEL_CONCLUTION
 | 
        
           |  |  | 654 |                             </a>
 | 
        
           |  |  | 655 |                      	</li>
 | 
        
           |  |  | 656 |   					</ul>
 | 
        
           |  |  | 657 |                     <div class="tab-content">
 | 
        
           |  |  | 658 |     					<div id="step-1" class="tab-pane" role="tabpanel" aria-labelledby="step-1">
 | 
        
           |  |  | 659 |                         	<div class="w-100">
 | 
        
           |  |  | 660 |                             	<div class="mf-field w-100 d-flex justify-content-between p-3 align-items-center">
 | 
        
           |  |  | 661 |                             		<div class="form-group w-100">
 | 
        
           |  |  | 662 |     									<h5 id="interview"></h5>
 | 
        
           |  |  | 663 |                                       	<div id="div-job-description"></div>
 | 
        
           |  |  | 664 |                                   	</div>
 | 
        
           |  |  | 665 |     							</div>
 | 
        
           |  |  | 666 |     						</div>
 | 
        
           |  |  | 667 |             			</div>
 | 
        
           |  |  | 668 |             		    <div id="step-2" class="tab-pane" role="tabpanel" aria-labelledby="step-2">
 | 
        
           |  |  | 669 |                             <div class="w-100">
 | 
        
           |  |  | 670 |                          		 <div class="accordion mt-5 w-100" id="accordion" style="height: 500px; overflow-y: auto;">
 | 
        
           |  |  | 671 |                             	</div>
 | 
        
           |  |  | 672 |                           	</div>
 | 
        
           |  |  | 673 |     					</div>
 | 
        
           |  |  | 674 | 						<div id="step-3" class="tab-pane" role="tabpanel" aria-labelledby="step-3">
 | 
        
           |  |  | 675 | 							<div class="form-group w-100">
 | 
        
           |  |  | 676 |                             	<?php
 | 
        
           |  |  | 677 |                                 $element = $form->get('comment');
 | 
        
           |  |  | 678 |                                 $element->setOptions(['label' => 'LABEL_COMMENT']);
 | 
        
           |  |  | 679 |                                 $element->setAttributes(['class' => 'form-control']);
 | 
        
           |  |  | 680 |                                 echo $this->formLabel($element);
 | 
        
           |  |  | 681 |                                 echo $this->formTextArea($element);
 | 
        
           |  |  | 682 |                                 ?>
 | 
        
           |  |  | 683 |                      		</div>
 | 
        
           |  |  | 684 |                   			<div class="form-group w-100">
 | 
        
           |  |  | 685 |                           		<?php
 | 
        
           |  |  | 686 |                                 $element = $form->get('points');
 | 
        
           |  |  | 687 |                                 $element->setAttributes(['class' => 'form-control']);
 | 
        
           |  |  | 688 |                                 $element->setOptions(['label' => 'LABEL_EVALUATION']);
 | 
        
           |  |  | 689 |                                 echo $this->formLabel($element);
 | 
        
           |  |  | 690 |                                 echo $this->formNumber($element);
 | 
        
           |  |  | 691 |                                 ?>
 | 
        
           |  |  | 692 |                    			</div>
 | 
        
           |  |  | 693 | 						</div>
 | 
        
           |  |  | 694 | 					</div>
 | 
        
           |  |  | 695 |             	</div>
 | 
        
           |  |  | 696 |         	</div>
 | 
        
           |  |  | 697 | 			<?php echo $this->form()->closeTag($form); ?>
 | 
        
           |  |  | 698 |  		</div>
 | 
        
           |  |  | 699 | 	</div>
 | 
        
           |  |  | 700 | </section>
 | 
        
           | 15443 | efrain | 701 |   | 
        
           | 16803 | efrain | 702 |   | 
        
           | 15443 | efrain | 703 |   | 
        
           |  |  | 704 | <script id="job-description-template" type="text/x-jsrender">
 | 
        
           |  |  | 705 |     <div class="card">
 | 
        
           |  |  | 706 |         <div class="card-body">
 | 
        
           | 16803 | efrain | 707 |   | 
        
           | 15443 | efrain | 708 |             <table class="table table-bordered">
 | 
        
           |  |  | 709 |                 <tr>
 | 
        
           |  |  | 710 |                     <th>LABEL_LAST_DATE</th>
 | 
        
           |  |  | 711 |                     <th>LABEL_TYPE</th>
 | 
        
           |  |  | 712 |                 </tr>
 | 
        
           |  |  | 713 |                 <tr>
 | 
        
           |  |  | 714 |                     <td>{{:last_date}}</td>
 | 
        
           |  |  | 715 |                     <td>{{:type}}</td>
 | 
        
           |  |  | 716 |                 </tr>
 | 
        
           |  |  | 717 |   | 
        
           |  |  | 718 |                 <tr>
 | 
        
           |  |  | 719 |                     <th>LABEL_SUPERVISOR</th>
 | 
        
           |  |  | 720 |                     <th>LABEL_EMPLOYEE</th>
 | 
        
           |  |  | 721 |                 </tr>
 | 
        
           |  |  | 722 |                 <tr>
 | 
        
           |  |  | 723 |                     <td>{{:supervisor}}</td>
 | 
        
           |  |  | 724 |                     <td>{{:employee}}</td>
 | 
        
           |  |  | 725 |                 </tr>
 | 
        
           |  |  | 726 |             </table>
 | 
        
           |  |  | 727 |             <br/>
 | 
        
           |  |  | 728 |   | 
        
           |  |  | 729 |             <p class="card-text"><b>LABEL_OBJECTIVES</b></p>
 | 
        
           |  |  | 730 |             <p class="card-text">{{:objectives}}</p>
 | 
        
           |  |  | 731 |             <p class="card-text"><b>LABEL_FUNCTIONS</b></p>
 | 
        
           |  |  | 732 |             <p class="card-text">{{:functions}}</p>
 | 
        
           |  |  | 733 |   | 
        
           |  |  | 734 |         </div>
 | 
        
           |  |  | 735 |     </div>
 | 
        
           |  |  | 736 | </script>
 | 
        
           |  |  | 737 |   | 
        
           |  |  | 738 |   | 
        
           |  |  | 739 | <script id="competencyTemplate" type="text/x-jsrender">
 | 
        
           | 16803 | efrain | 740 | <div class="card">
 | 
        
           |  |  | 741 |     <div class="card-header" id="heading-{{:uuid}}">
 | 
        
           |  |  | 742 |         <h2 class="clearfix mb-0">
 | 
        
           |  |  | 743 |             <a class="btn btn-link" data-toggle="collapse" data-target="#collapse-{{:uuid}}" aria-expanded="true" aria-controls="collapse-{{:uuid}}">
 | 
        
           |  |  | 744 |                 <i class="fa fa-plus"></i> {{:~getCompetencyType(competency_type_uuid).name}} - {{:~getCompetency(uuid).name}}
 | 
        
           |  |  | 745 |             </a>
 | 
        
           |  |  | 746 |         </h2>
 | 
        
           |  |  | 747 |     </div>
 | 
        
           |  |  | 748 |     <div id="collapse-{{:uuid}}" class="collapse" aria-labelledby="heading-{{:uuid}}" data-parent="#accordion">
 | 
        
           |  |  | 749 |         <div class="card-body">
 | 
        
           |  |  | 750 |             <div class="table-responsive">
 | 
        
           |  |  | 751 |                 <table class="table table-bordered">
 | 
        
           |  |  | 752 |                     <thead>
 | 
        
           |  |  | 753 |                         <tr>
 | 
        
           |  |  | 754 |                             <th style="width: 30%;">LABEL_ELEMENT</th>
 | 
        
           |  |  | 755 |                             <th style="width: 50%;">LABEL_TITLE</th>
 | 
        
           |  |  | 756 |                             <th style="width: 10%;">LABEL_LEVEL</th>
 | 
        
           |  |  | 757 |                             <th style="width: 10%;">LABEL_POINTS</th>
 | 
        
           |  |  | 758 |                          </tr>
 | 
        
           |  |  | 759 |                     </thead>
 | 
        
           |  |  | 760 |                     <tbody>
 | 
        
           |  |  | 761 |                         <tr>
 | 
        
           |  |  | 762 |                             <td class="text-left">LABEL_COMPETENCY</td>
 | 
        
           |  |  | 763 |                             <td class="text-left">{{:name}}</td>
 | 
        
           |  |  | 764 |                             <td> </td>
 | 
        
           |  |  | 765 |                             <td> </td>
 | 
        
           |  |  | 766 |                         </tr>
 | 
        
           |  |  | 767 |                         {{for behaviors}}
 | 
        
           |  |  | 768 |                         <tr >
 | 
        
           |  |  | 769 |                             <td class="text-left">--LABEL_BEHAVIOR</td>
 | 
        
           |  |  | 770 |                                 <td class="text-left">
 | 
        
           |  |  | 771 |                             {{:~getBehavior(uuid).description}}
 | 
        
           |  |  | 772 |                             </td>
 | 
        
           |  |  | 773 |                             <td class="text-right">
 | 
        
           |  |  | 774 |                                 {{:level}}
 | 
        
           |  |  | 775 |                             </td>
 | 
        
           |  |  | 776 |                             <td class="text-right">
 | 
        
           |  |  | 777 |                                 <input type="number" class="form-control input-behavior-level " value="0" step="1" min="0" max="100" name="{{:competency_uuid}}-{{:uuid}}-points" id="{{:competency_uuid}}-{{:uuid}}-points" ></input>
 | 
        
           |  |  | 778 |                             </td>
 | 
        
           |  |  | 779 |                         </tr>
 | 
        
           |  |  | 780 |                         <tr >
 | 
        
           |  |  | 781 |                             <td colspan="4">
 | 
        
           |  |  | 782 |                                 LABEL_COMMENT
 | 
        
           |  |  | 783 |                                 <input type="text" class="form-control input-behavior-comment" value="" maxlength="128" name="{{:competency_uuid}}-{{:uuid}}-comment" id="{{:competency_uuid}}-{{:uuid}}-comment" ></input>
 | 
        
           |  |  | 784 |                             </td>
 | 
        
           |  |  | 785 |                         </tr >
 | 
        
           |  |  | 786 |                         {{/for}}
 | 
        
           |  |  | 787 |                     </tbody>
 | 
        
           |  |  | 788 |                 </table>
 | 
        
           |  |  | 789 |             </div>
 | 
        
           |  |  | 790 |         </div>
 | 
        
           |  |  | 791 |     </div>
 | 
        
           |  |  | 792 | </div>
 | 
        
           | 15443 | efrain | 793 |   | 
        
           |  |  | 794 | </script>
 | 
        
           |  |  | 795 |   | 
        
           |  |  | 796 |   |