Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 1159 | Rev 1161 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1159 Rev 1160
Línea 296... Línea 296...
296
                CKEDITOR.instances.functions.setData('');
296
                CKEDITOR.instances.functions.setData('');
297
                CKEDITOR.instances.objectives.setData('');
297
                CKEDITOR.instances.objectives.setData('');
298
                $('#tableCompetencies tbody').empty();
298
                $('#tableCompetencies tbody').empty();
299
                var s = '';
299
                var s = '';
300
                var first = true;
300
                var first = true;
301
                $.each(response['data']['competency_types'], function(index, rowCompetencyType) {
-
 
302
                    first = true;
-
 
-
 
301
 
303
                    $.each(response['data']['competencies'], function(index, rowCompetency) {
302
                setCompetencySelect(response['data']['competencies']);
304
                        if (rowCompetencyType['competency_type_id'] == rowCompetency['competency_type_id']) {
-
 
305
                            if (first) {
-
 
306
                                first = false;
-
 
307
                                s = '<tr>' +
-
 
308
                                    '<td><big><b>' + rowCompetencyType['name'] + '</b></big></td>' +
-
 
309
                                    '</tr>';
-
 
310
                                $('#tableCompetencies tbody').append(s)
-
 
311
                            }
-
 
312
                            s = '<tr>' +
-
 
313
                                '<td> ' +
-
 
314
                                '<div class="custom-control custom-checkbox">' +
-
 
315
                                '<input class="custom-control-input" type="checkbox"  name="competency_level' + rowCompetency['competency_id'] + '" id="competency_level' + rowCompetency['competency_id'] + '" value="1">' +
-
 
316
                                '<label for="competency_level' + rowCompetency['competency_id'] + '" class="custom-control-label">' + rowCompetency['name'] + '</label>' +
-
 
317
                                '</div>' +
-
 
318
                                '<td>';
-
 
319
                            $('#tableCompetencies tbody').append(s)
-
 
320
                        }
-
 
321
                    });
-
 
322
                });
-
 
-
 
303
 
-
 
304
 
-
 
305
 
-
 
306
                
-
 
307
 
-
 
308
 
-
 
309
 
-
 
310
 
-
 
311
 
-
 
312
 
323
                $('#tableSubordinates tbody').empty();
313
                $('#tableSubordinates tbody').empty();
324
                $('#job_description_id_boss option:not(:first)').remove();
314
                $('#job_description_id_boss option:not(:first)').remove();
325
                $.each(response['data']['jobs_description'], function(index, rowJobDescription) {
315
                $.each(response['data']['jobs_description'], function(index, rowJobDescription) {
326
                    $('#job_description_id_boss').append(new Option(rowJobDescription['name'], rowJobDescription['job_description_id']));
316
                    $('#job_description_id_boss').append(new Option(rowJobDescription['name'], rowJobDescription['job_description_id']));
327
                    s = '<tr>' +
317
                    s = '<tr>' +
Línea 461... Línea 451...
461
        'width': '160px',
451
        'width': '160px',
462
        'height': '40px'
452
        'height': '40px'
463
    });
453
    });
464
    CKEDITOR.replace('functions');
454
    CKEDITOR.replace('functions');
465
    CKEDITOR.replace('objectives');
455
    CKEDITOR.replace('objectives');
-
 
456
 
-
 
457
 
-
 
458
    const setCompetencySelect = (data) =>{
-
 
459
        $.each(data, function(i, item) {
-
 
460
                if (filterItemById(item.competency_id).length <= 0) {
-
 
461
                    $('#select-competency').append($('<option>', {
-
 
462
                        value: item.competency_id,
-
 
463
                        text: item.name
-
 
464
                    }));
-
 
465
                }
-
 
466
            });
-
 
467
    }
-
 
468
 
-
 
469
    const filterItemById = (id) => [];
-
 
470
 
-
 
471
 
-
 
472
 
-
 
473
 
-
 
474
 
-
 
475
 
-
 
476
 
-
 
477
 
-
 
478
 
-
 
479
 
-
 
480
 
-
 
481
 
-
 
482
 
-
 
483
 
466
});
484
});
-
 
485
 
-
 
486
 
-
 
487
 
-
 
488
 
467
JS;
489
JS;
468
$this->inlineScript()->captureEnd();
490
$this->inlineScript()->captureEnd();
469
?>
491
?>
Línea 470... Línea 492...
470
 
492
 
Línea 618... Línea 640...
618
<div class="col-md-4 col-sm-4 col-xs-12">
640
<div class="col-md-4 col-sm-4 col-xs-12">
619
                              <select name="select-competency" id="select-competency" class="form-control">
641
                              <select name="select-competency" id="select-competency" class="form-control">
620
                              </select>
642
                              </select>
621
                           </div>
643
                           </div>
622
                           <div class="col-md-4 col-sm-4 col-xs-12">
644
                           <div class="col-md-4 col-sm-4 col-xs-12">
623
                              <button type="button" class="btn btn-primary" id="btn-select-competency" data-toggle="tooltip" title="LABEL_ADD LABEL_CONDUCT">LABEL_ADD LABEL_CONDUCT</button>
645
                              <button type="button" class="btn btn-primary" id="btn-select-competency" data-toggle="tooltip" title="LABEL_ADD LABEL_COMPETENCY">LABEL_ADD LABEL_COMPETENCY</button>
624
                           </div>
646
                           </div>
625
                           <div class="col-md-4 col-sm-4 col-xs-12"></div>
647
                           <div class="col-md-4 col-sm-4 col-xs-12"></div>
626
                    </div>
648
                    </div>
627
                    <div class="row">
649
                    <div class="row">
628
                    <div class="col-md-12 col-sm-12 col-xs-12">
650
                    <div class="col-md-12 col-sm-12 col-xs-12">