Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 16817 Rev 16822
Línea 8... Línea 8...
8
 
8
 
9
 
9
 
Línea 10... Línea 10...
10
$allowTakeaTest = $acl->isAllowed($roleName, 'activities-center/performance-evaluation/take-a-test') ? 1 : 0;
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;
11
$allowReport =  $acl->isAllowed($roleName, 'activities-center/performance-evaluation/report') ? 1 : 0;
Línea 12... Línea 12...
12
 
12
 
Línea 13... Línea -...
13
$this->headLink()->appendStylesheet($this->basePath('plugins/nprogress/nprogress.css'));
-
 
Línea 14... Línea -...
14
$this->inlineScript()->appendFile($this->basePath('plugins/nprogress/nprogress.js'));
-
 
Línea -... Línea 13...
-
 
13
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/nprogress/nprogress.css'));
Línea 15... Línea -...
15
 
-
 
16
//$this->headLink()->appendStylesheet('https://fonts.googleapis.com/icon?family=Material+Icons');
-
 
17
 
-
 
Línea -... Línea 14...
-
 
14
$this->inlineScript()->appendFile($this->basePath('assets/vendors/nprogress/nprogress.js'));
18
$this->inlineScript()->appendFile($this->basePath('plugins/bootbox/bootbox.min.js'));
15
 
19
 
16
//$this->headLink()->appendStylesheet('https://fonts.googleapis.com/icon?family=Material+Icons');
Línea 20... Línea -...
20
 
-
 
21
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-maxlenght/bootstrap-maxlength.min.js'));
17
 
22
 
-
 
23
 
18
 
Línea -... Línea 19...
-
 
19
 
-
 
20
 
-
 
21
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-maxlenght/bootstrap-maxlength.min.js'));
-
 
22
 
Línea 24... Línea -...
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'));
-
 
Línea 27... Línea 23...
27
 
23
 
28
$this->headLink()->appendStylesheet($this->basePath('plugins/datatables-bs4/css/dataTables.bootstrap4.min.css'));
24
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/jquery.validate.js'));
29
$this->headLink()->appendStylesheet($this->basePath('plugins/datatables-responsive/css/responsive.bootstrap4.min.css'));
25
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/additional-methods.js'));
Línea -... Línea 26...
-
 
26
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/localization/messages_es.js'));
30
 
27
 
31
$this->inlineScript()->appendFile($this->basePath('plugins/datatables/jquery.dataTables.min.js'));
28
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/datatables.net-bs5/dataTables.bootstrap5.css'));
Línea -... Línea 29...
-
 
29
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/datatables.net-bs5-responsive/responsive.bootstrap5.css'));
-
 
30
 
Línea 32... Línea -...
32
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-bs4/js/dataTables.bootstrap4.min.js'));
-
 
Línea -... Línea 31...
-
 
31
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net/jquery.dataTables.js'));
-
 
32
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5/dataTables.bootstrap5.js'));
33
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/dataTables.responsive.min.js'));
33
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5-responsive/dataTables.responsive.min.js'));
34
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/responsive.bootstrap4.min.js'));
34
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5-responsive/responsive.bootstrap5.min.js'));
35
 
35
 
Línea 36... Línea 36...
36
 
36
 
37
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/jquery.validate.js'));
37
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/jquery.validate.js'));
-
 
38
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/additional-methods.js'));
-
 
39
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/localization/messages_es.js'));
-
 
40
 
Línea 38... Línea -...
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'));
-
 
Línea 40... Línea -...
40
 
-
 
41
$this->inlineScript()->appendFile($this->basePath('plugins/moment/moment-with-locales.min.js'));
-
 
Línea 42... Línea -...
42
//$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-datetimepicker/css/bootstrap-datetimepicker.css'));
-
 
Línea -... Línea 41...
-
 
41
$this->inlineScript()->appendFile($this->basePath('assets/vendors/moment/moment-with-locales.min.js'));
-
 
42
//$this->headLink()->appendStylesheet($this->basePath('assets/vendors/bootstrap-datetimepicker/css/bootstrap-datetimepicker.css'));
43
//$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js'));
43
//$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js'));
44
 
44
 
Línea 45... Línea 45...
45
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-datepicker/js/bootstrap-datepicker.js'));
45
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-datepicker/js/bootstrap-datepicker.js'));
Línea 46... Línea 46...
46
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-datepicker/js/bootstrap-datepicker.es.js'));
46
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-datepicker/js/bootstrap-datepicker.es.js'));
Línea 232... Línea 232...
232
                    'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
232
                    'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
233
                },
233
                },
234
            },
234
            },
235
            'drawCallback': function( settings ) {
235
            'drawCallback': function( settings ) {
236
                NProgress.done();
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',
-
 
-
 
237
                
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
                });
-
 
Línea 265... Línea 238...
265
 
238
 
266
 
239
 
267
            },
240
            },
Línea 340... Línea 313...
340
        if(!ok) {
313
        if(!ok) {
341
            $.fn.showError('ERROR_PERFORMANCE_SOMEONE_COMMENT_IS_EMPTY');
314
            $.fn.showError('ERROR_PERFORMANCE_SOMEONE_COMMENT_IS_EMPTY');
342
            return false;
315
            return false;
343
        }
316
        }
Línea 344... Línea 317...
344
 
317
 
-
 
318
          swal.fire({
345
        bootbox.confirm({
319
            title: 'LABEL_ARE_YOU_SURE',
346
            message: 'LABEL_PERFORMANCE_EVALUATION_TEST_IS_COMPLETED',
-
 
347
            buttons: {
320
            message: 'LABEL_PERFORMANCE_EVALUATION_TEST_IS_COMPLETED',
348
                confirm: {
321
            icon: 'question',
349
                    label: 'LABEL_YES',
-
 
350
                    className: 'btn-success'
-
 
351
                },
322
            cancelButtonText: 'LABEL_NO',
352
                cancel: {
323
            showCancelButton: true,
353
                    label: 'LABEL_NO',
-
 
354
                    className: 'btn-warning'
-
 
355
                }
-
 
356
            },
324
            confirmButtonText: 'LABEL_YES'
357
            callback: function (result) {
325
          }).then((result) => {
-
 
326
            if (result.isConfirmed) {
-
 
327
 
358
                if(result) {
328
       
359
                    var data = new Array()
329
                    var data = new Array()
360
                    data['comment'] = $('#comment').val().trim();
330
                    data['comment'] = $('#comment').val().trim();
361
                    data['points'] = $('#points').val();
331
                    data['points'] = $('#points').val();
362
                    $.each($('input.input-behavior-comment'), function(index, element) {
332
                    $.each($('input.input-behavior-comment'), function(index, element) {
Línea 521... Línea 491...
521
                });
491
                });
Línea 522... Línea 492...
522
 
492
 
Línea -... Línea 493...
-
 
493
 
-
 
494
    });
-
 
495
 
-
 
496
    $('body').on('click', 'button.btn-delete', function(e) { 
-
 
497
        e.preventDefault();
-
 
498
        var action = $(this).data('href');
-
 
499
 
-
 
500
 
-
 
501
          swal.fire({
-
 
502
            title: 'LABEL_ARE_YOU_SURE',
-
 
503
            icon: 'question',
-
 
504
            cancelButtonText: 'LABEL_NO',
-
 
505
            showCancelButton: true,
-
 
506
            confirmButtonText: 'LABEL_YES'
-
 
507
          }).then((result) => {
-
 
508
            if (result.isConfirmed) {
-
 
509
 
-
 
510
                    NProgress.start();
-
 
511
                    $.ajax({
-
 
512
                        'dataType'  : 'json',
-
 
513
                        'accept'    : 'application/json',
-
 
514
                        'method'    : 'post',
-
 
515
                        'url'       :  action,
-
 
516
                    }).done(function(response) {
-
 
517
                        if(response['success']) {
-
 
518
                            $.fn.showSuccess(response['data']);
-
 
519
                            gridTable.api().ajax.reload(null, false);
-
 
520
                        } else {
-
 
521
                            $.fn.showError(response['data']);
-
 
522
                        }
-
 
523
                    }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
524
                        $.fn.showError(textStatus);
-
 
525
                    }).always(function() {
-
 
526
                        NProgress.done();
-
 
527
                    });
-
 
528
            }
-
 
529
       });
Línea 523... Línea 530...
523
 
530
 
524
    });
531
    });
525
 
532
 
526
 
533
 
Línea 560... Línea 567...
560
        toolbar: {
567
        toolbar: {
561
            showNextButton: true, // show/hide a Next button
568
            showNextButton: true, // show/hide a Next button
562
            showPreviousButton: true, // show/hide a Previous button
569
            showPreviousButton: true, // show/hide a Previous button
563
            position: 'bottom', // none/ top/ both bottom
570
            position: 'bottom', // none/ top/ both bottom
564
            extraHtml: `<button type="button" class="btn btn-primary btn-save">LABEL_SAVE</button>`
571
            extraHtml: `<button type="button" class="btn btn-primary btn-save">LABEL_SAVE</button>`
565
                + `<button type="button" class="btn btn-secondary btn-cancel">LABEL_CANCEL</button>`
572
                + `<button type="button" class="btn btn-light btn-cancel">LABEL_CANCEL</button>`
566
        },
573
        },
567
        anchor: {
574
        anchor: {
568
            enableNavigation: true, // Enable/Disable anchor navigation 
575
            enableNavigation: true, // Enable/Disable anchor navigation 
569
            enableNavigationAlways: false, // Activates all anchors clickable always
576
            enableNavigationAlways: false, // Activates all anchors clickable always
570
            enableDoneState: true, // Add done state on visited steps
577
            enableDoneState: true, // Add done state on visited steps
Línea 580... Línea 587...
580
});
587
});
581
JS;
588
JS;
582
$this->inlineScript()->captureEnd();
589
$this->inlineScript()->captureEnd();
583
?>
590
?>
Línea 584... Línea -...
584
 
-
 
585
<!-- Content Header (Page header) -->
-
 
586
<section id="row-header" class="content-header">
-
 
587
    <div class="container-fluid">
-
 
588
        <div class="row mb-2">
-
 
589
            <div class="col-sm-12">
-
 
590
                <h1>LABEL_PERFORMANCE_EVALUATIONS</h1>
-
 
591
            </div>
-
 
592
        </div>
591
 
593
    </div>
-
 
594
    <!-- /.container-fluid -->
592
 
595
</section>
-
 
596
<section id="row-table" class="content">
-
 
597
    <div class="container-fluid" id="row-lists">
-
 
598
        <div class="row">
-
 
599
            <div class="col-12">
593
 
600
                <div class="card">
594
                <div class="card" id="row-lists">
-
 
595
                    <div class="card-body">
601
                    <div class="card-body">
596
                    <h6 class="card-title">card-title</h6>
602
                        <table id="gridTable" class="table   table-hover">
597
                        <table id="gridTable" class="table   table-hover">
603
                            <thead>
598
                            <thead>
604
                                <tr>
599
                                <tr>
605
                                    <th style="width:15%">LABEL_LAST_DATE</th>
600
                                    <th style="width:15%">LABEL_LAST_DATE</th>
Línea 617... Línea 612...
617
                        <div style="float:right;">
612
                        <div style="float:right;">
618
                            <button type="button" class="btn btn-info btn-refresh"><i class="fa fa-refresh"></i> LABEL_REFRESH </button>
613
                            <button type="button" class="btn btn-info btn-refresh"><i class="fa fa-refresh"></i> LABEL_REFRESH </button>
619
                        </div>
614
                        </div>
620
                    </div>
615
                    </div>
621
                </div>
616
                </div>
622
            </div>
-
 
623
        </div>
-
 
624
    </div>
-
 
625
</section>
-
 
Línea -... Línea 617...
-
 
617
 
-
 
618
 
626
 
619
 
627
 
-
 
628
<section id="row-test" style="display: none;">
-
 
629
	<div class="container-fluid">
620
 
630
        <div class="row p-2">
621
        <div class="row p-2"  id="row-test" style="display: none;">>
631
			<div class="col-12">
622
			<div class="col-12">
632
				<h4 class="text-center" id="form-title"></h4>
623
				<h4 class="text-center" id="form-title"></h4>
633
				<?php
624
				<?php
Línea 701... Línea 692...
701
					</div>
692
					</div>
702
            	</div>
693
            	</div>
703
        	</div>
694
        	</div>
704
			<?php echo $this->form()->closeTag($form); ?>
695
			<?php echo $this->form()->closeTag($form); ?>
705
 		</div>
696
 		</div>
706
	</div>    
697
 
707
</section>
-
 
Línea 708... Línea 698...
708
 
698
 
709
 
699