Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 15450 Rev 16803
Línea 11... Línea 11...
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
 
13
$this->headLink()->appendStylesheet($this->basePath('plugins/nprogress/nprogress.css'));
13
$this->headLink()->appendStylesheet($this->basePath('plugins/nprogress/nprogress.css'));
Línea -... Línea 14...
-
 
14
$this->inlineScript()->appendFile($this->basePath('plugins/nprogress/nprogress.js'));
Línea 14... Línea 15...
14
$this->inlineScript()->appendFile($this->basePath('plugins/nprogress/nprogress.js'));
15
 
Línea 15... Línea 16...
15
 
16
//$this->headLink()->appendStylesheet('https://fonts.googleapis.com/icon?family=Material+Icons');
Línea 61... Línea 62...
61
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-checkbox/awesome-bootstrap-checkbox.css'));
62
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-checkbox/awesome-bootstrap-checkbox.css'));
Línea 62... Línea 63...
62
 
63
 
Línea -... Línea 64...
-
 
64
 
-
 
65
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-input-number/input-number-format.jquery.js'));
-
 
66
 
-
 
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
 
63
 
70
$this->headLink()->appendStylesheet($this->basePath('css/activity-center-accordion.css'));
64
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-input-number/input-number-format.jquery.js'));
71
 
Línea 65... Línea 72...
65
 
72
 
Línea 88... Línea 95...
88
 
95
 
Línea 89... Línea 96...
89
    $.fn.renderCompetencies = function() {
96
    $.fn.renderCompetencies = function() {
Línea 90... Línea 97...
90
 
97
 
91
        if(competencies_selected.length > 0) {
98
        if(competencies_selected.length > 0) {
92
 
99
 
93
             $('#div-competencies').html($('#competencyTemplate').render(competencies_selected, {
100
             $('#accordion').html($('#competencyTemplate').render(competencies_selected, {
94
                getCompetencyType: (uuid) => competency_types.filter((item) => item.uuid == uuid ? item : false)[0],
101
                getCompetencyType: (uuid) => competency_types.filter((item) => item.uuid == uuid ? item : false)[0],
95
                getCompetency: (uuid) => competencies.filter((item) => item.uuid == uuid ? item : false)[0],
102
                getCompetency: (uuid) => competencies.filter((item) => item.uuid == uuid ? item : false)[0],
Línea 96... Línea 103...
96
                getBehavior: (uuid) => behaviors.filter((item) => item.uuid == uuid ? item : false)[0]
103
                getBehavior: (uuid) => behaviors.filter((item) => item.uuid == uuid ? item : false)[0]
97
            }));
104
            }));
-
 
105
        } else {
-
 
106
 
-
 
107
 
-
 
108
             $('#accordion').empty();
-
 
109
        }
-
 
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(){
98
        } else {
117
        	$(this).parent().find('.card-header .btn i').attr('class', 'fa fa-minus');
Línea 99... Línea 118...
99
 
118
    	}).on('hide.bs.collapse', function(){
Línea 444... Línea 463...
444
                competencies_selected = response['data']['competencies_selected'];
463
                competencies_selected = response['data']['competencies_selected'];
445
                subordinates_selected = response['data']['subordinates_selected'];    
464
                subordinates_selected = response['data']['subordinates_selected'];    
Línea 446... Línea 465...
446
    
465
    
Línea -... Línea 466...
-
 
466
                $.fn.renderCompetencies();
-
 
467
 
Línea 447... Línea 468...
447
                $.fn.renderCompetencies();
468
                $('#form-title').html( response['data']['form'])
448
 
469
 
449
 
470
 
450
                var data = {
471
                var data = {
Línea 515... Línea 536...
515
                $(this).val('100');
536
                $(this).val('100');
516
            }
537
            }
517
        }
538
        }
518
    });
539
    });
Línea -... Línea 540...
-
 
540
 
-
 
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');
Línea 519... Línea 571...
519
 
571
 
520
   
572
   
521
});
573
});
522
JS;
574
JS;
Línea 565... Línea 617...
565
    </div>
617
    </div>
566
</section>
618
</section>
Línea 567... Línea 619...
567
 
619
 
568
 
620
 
569
<section id="row-test" style="display: none;">
621
<section id="row-test" style="display: none;">
570
        <div class="container-fluid">
622
	<div class="container-fluid">
-
 
623
        <div class="row p-2">
571
        <div class="row p-2">
624
			<div class="col-12">
572
                <div class="col-12">
625
				<h4 class="text-center" id="form-title"></h4>
573
                   <?php
626
				<?php
574
                       $form->setAttributes([
627
                $form->setAttributes([
575
                           'method' => 'post',
628
                    'method' => 'post',
576
                           'name' => 'form',
629
                    'name' => 'form',
577
                           'id' => 'form',
630
                    'id' => 'form',
578
                       ]);
631
                ]);
579
                       $form->prepare();
632
                $form->prepare();
580
                       echo $this->form()->openTag($form);
-
 
-
 
633
                echo $this->form()->openTag($form);
581
                   ?>
634
                ?>
582
                        <div class="card">
635
                   
583
                           <ul class="nav nav-tabs" id="custom-tabs" role="tablist">
-
 
584
                               <li class="nav-item" role="presentation">
636
        		<div id="stepwizard" class="border border-gray p-4 mt-2">
585
                                   <a class="nav-link active" id="custom-tabs-general-tab" data-toggle="tab" href="#custom-tabs-general" role="tab" aria-controls="custom-tabs-general" aria-selected="true">LABEL_GENERAL</a>
637
            		<ul class="nav">
586
                               </li>
-
 
587
                               <li class="nav-item" role="presentation">
638
                    	<li class="nav-item">
588
                                   <a class="nav-link" id="custom-tabs-compentencies-tab" data-toggle="tab" href="#custom-tabs-compentencies" role="tab" aria-controls="custom-tabs-compentencies" aria-selected="false">LABEL_COMPETENCIES</a>
639
                        	<a class="nav-link" href="#step-1">
589
                               </li>
-
 
590
                               <li class="nav-item" role="presentation">
640
                            	<div class="num">1</div>
591
                                   <a class="nav-link" id="custom-tabs-evaluation-tab" data-toggle="tab" href="#custom-tabs-evaluation" role="tab" aria-controls="custom-tabs-evaluation" aria-selected="false">LABEL_CONCLUTION</a>
641
                              	LABEL_GENERAL
592
                               </li>
642
                         	</a>
593
                           </ul>
643
                    	</li>
594
                                <div class="tab-content">
-
 
595
                               <div class="tab-pane fade show active" id="custom-tabs-general" role="tabpanel" aria-labelledby="custom-tabs-general-tab">
644
                        <li class="nav-item">
596
                               
645
                        	<a class="nav-link" href="#step-2">
597
                               <div class="p-2">
646
                            	<div class="num">2</div>
598
                                       <h5 id="interview"></h5>       
647
                               	LABEL_COMPETENCIES
599
                                       <div id="div-job-description"></div>
648
                            </a>
600
                                   </div>
649
                    	</li>
601
                               </div>
650
                        <li class="nav-item">
602
                               <div class="tab-pane fade" id="custom-tabs-compentencies" role="tabpanel" aria-labelledby="custom-tabs-compentencies-tab">
651
                        	<a class="nav-link" href="#step-3">
603
                                   <div class="row p-2">
652
                            	<span class="num">3</span>
604
                                      <div class="col-md-12 col-sm-12 col-xs-12" id="div-competencies" style="margin-top: 1px;">
653
                              	LABEL_CONCLUTION
-
 
654
                            </a>
605
                                      </div>
655
                     	</li>
606
                                   </div>
656
  					</ul>
607
                               </div>
657
                    <div class="tab-content">
608
                               <div class="tab-pane fade" id="custom-tabs-evaluation" role="tabpanel" aria-labelledby="custom-tabs-evaluation-tab">
658
    					<div id="step-1" class="tab-pane" role="tabpanel" aria-labelledby="step-1">
609
                                   <div class="row p-2">
659
                        	<div class="w-100">
610
                                       <div class="col-12">
660
                            	<div class="mf-field w-100 d-flex justify-content-between p-3 align-items-center">
611
                                           <div class="form-group">
661
                            		<div class="form-group w-100">
612
                                               <?php
662
    									<h5 id="interview"></h5>       
-
 
663
                                      	<div id="div-job-description"></div>
-
 
664
                                  	</div>
-
 
665
    							</div>
613
                                               $element = $form->get('comment');
666
    						</div>
614
                                               $element->setOptions(['label' => 'LABEL_COMMENT']);
667
            			</div>
615
                                               $element->setAttributes(['class' => 'form-control']);
668
            		    <div id="step-2" class="tab-pane" role="tabpanel" aria-labelledby="step-2">
616
                                               echo $this->formLabel($element);
669
                            <div class="w-100">
617
                                               echo $this->formTextArea($element);
670
                         		 <div class="accordion mt-5 w-100" id="accordion" style="height: 500px; overflow-y: auto;">
-
 
671
                            	</div>
-
 
672
                          	</div>
618
                                               ?>
673
    					</div>
619
                                           </div>
674
						<div id="step-3" class="tab-pane" role="tabpanel" aria-labelledby="step-3">
620
                                           <div class="form-group">
675
							<div class="form-group w-100">
621
                                               <?php
676
                            	<?php
622
                                               $element = $form->get('points');
677
                                $element = $form->get('comment');
623
                                               $element->setAttributes(['class' => 'form-control']);
678
                                $element->setOptions(['label' => 'LABEL_COMMENT']);
624
                                               $element->setOptions(['label' => 'LABEL_EVALUATION']);
679
                                $element->setAttributes(['class' => 'form-control']);
625
                                               echo $this->formLabel($element);
680
                                echo $this->formLabel($element);
626
                                               echo $this->formNumber($element);
-
 
627
                                               ?>
681
                                echo $this->formTextArea($element);
628
                                           </div>
682
                                ?>
629
                                       </div>
683
                     		</div>
630
                                   </div>
684
                  			<div class="form-group w-100">
631
                               </div>
685
                          		<?php
632
                               <div class="card-footer clearfix">
-
 
633
                               	   <div class="text-right">
686
                                $element = $form->get('points');
634
 
687
                                $element->setAttributes(['class' => 'form-control']);
635
                                   	<button type="button" class="btn btn-primary btn-save">LABEL_SAVE</button>
688
                                $element->setOptions(['label' => 'LABEL_EVALUATION']);
636
                                   	<button type="button" class="btn btn-secondary btn-cancel">LABEL_CANCEL</button>
689
                                echo $this->formLabel($element);
637
                               		</div>
690
                                echo $this->formNumber($element);
638
                               </div>
691
                                ?>
639
                      		</div>
692
                   			</div>
640
                       </div>
693
						</div>
641
                   <?php echo $this->form()->closeTag($form); ?>
694
					</div>
-
 
695
            	</div>
642
               </div>
696
        	</div>
-
 
697
			<?php echo $this->form()->closeTag($form); ?>
643
           </div>    
698
 		</div>
-
 
699
	</div>    
-
 
700
</section>
Línea 644... Línea 701...
644
        </div>
701
 
645
</section>
702
 
646
    
703
    
647
<script id="job-description-template" type="text/x-jsrender">
-
 
-
 
704
<script id="job-description-template" type="text/x-jsrender">
648
    <div class="card">
705
    <div class="card">
649
        <div class="card-body">
706
        <div class="card-body">
650
            <h4 class="text-center">{{:form}}</h4>
707
            
651
            <table class="table table-bordered">
708
            <table class="table table-bordered">
652
                <tr>
709
                <tr>
Línea 678... Línea 735...
678
    </div>
735
    </div>
679
</script>    
736
</script>    
Línea 680... Línea 737...
680
    
737
    
681
    
738
    
682
<script id="competencyTemplate" type="text/x-jsrender">
739
<script id="competencyTemplate" type="text/x-jsrender">
683
 <div class="panel panel-default panel-competency" id="panel-{{:uuid}}" data-competency="{{:uuid}}">
740
<div class="card">
684
   <div class="panel-heading">
741
    <div class="card-header" id="heading-{{:uuid}}">
685
      <h4 class="panel-title" style="    font-size: 18px;">
-
 
686
         <a class="accordion-toggle" data-toggle="collapse" aria-expanded="true" data-parent="#panel-{{:uuid}}" href="#collapse-{{:uuid}}">
742
        <h2 class="clearfix mb-0">
687
         <span class="section-name{{:uuid}}">
-
 
688
            {{:~getCompetencyType(competency_type_uuid).name}} - {{:~getCompetency(uuid).name}}
743
            <a class="btn btn-link" data-toggle="collapse" data-target="#collapse-{{:uuid}}" aria-expanded="true" aria-controls="collapse-{{:uuid}}">
689
         </span>
744
                <i class="fa fa-plus"></i> {{:~getCompetencyType(competency_type_uuid).name}} - {{:~getCompetency(uuid).name}}
690
         </a>
745
            </a>				
691
      </h4>
746
        </h2>
692
   </div>
747
    </div>
693
   <div id="collapse-{{:uuid}}" class="panel-collapse in collapse show">
748
    <div id="collapse-{{:uuid}}" class="collapse" aria-labelledby="heading-{{:uuid}}" data-parent="#accordion">
694
      <div class="panel-body">
749
        <div class="card-body">
695
         <div class="table-responsive">
750
            <div class="table-responsive">
696
            <table class="table table-bordered">
751
                <table class="table table-bordered">
697
               <thead>
752
                    <thead>
698
                  <tr>
753
                        <tr>
699
                     <th style="width: 30%;">LABEL_ELEMENT</th>
754
                            <th style="width: 30%;">LABEL_ELEMENT</th>
700
                     <th style="width: 50%;">LABEL_TITLE</th>
755
                            <th style="width: 50%;">LABEL_TITLE</th>
701
                     <th style="width: 10%;">LABEL_LEVEL</th>
-
 
702
                     <th style="width: 10%;">LABEL_POINTS</th>
756
                            <th style="width: 10%;">LABEL_LEVEL</th>
703
 
757
                            <th style="width: 10%;">LABEL_POINTS</th>
704
                  </tr>
758
                         </tr>
705
               </thead>
759
                    </thead>
706
               <tbody>
760
                    <tbody>
707
                  <tr>
761
                        <tr>
708
                     <td class="text-left">LABEL_COMPETENCY</td>
762
                            <td class="text-left">LABEL_COMPETENCY</td>
709
                     <td class="text-left">{{:name}}</td>
763
                            <td class="text-left">{{:name}}</td>
710
                     <td>&nbsp;</td>
-
 
711
                     <td>&nbsp;</td>
764
                            <td>&nbsp;</td>
712
 
765
                            <td>&nbsp;</td>
713
                  </tr>
766
                        </tr>
714
                  {{for behaviors}}
767
                        {{for behaviors}}
715
                  <tr >
768
                        <tr >
716
                     <td class="text-left">--LABEL_BEHAVIOR</td>
769
                            <td class="text-left">--LABEL_BEHAVIOR</td>
717
                     <td class="text-left">
770
                                <td class="text-left">
718
                       {{:~getBehavior(uuid).description}}
771
                            {{:~getBehavior(uuid).description}}
719
                     </td>
772
                            </td>
720
                     <td class="text-right">
773
                            <td class="text-right">
721
                        {{:level}}
774
                                {{:level}}
722
                     </td>
775
                            </td>
723
                     <td class="text-right">
776
                            <td class="text-right">
724
                        <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>
-
 
725
                     </td>
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>
726
 
778
                            </td>
727
                  </tr>
779
                        </tr>
728
                  <tr >
780
                        <tr >
729
                    <td colspan="4">
781
                            <td colspan="4">
730
                     LABEL_COMMENT
782
                                LABEL_COMMENT
731
                     <input type="text" class="form-control input-behavior-comment" value="" maxlength="128" name="{{:competency_uuid}}-{{:uuid}}-comment" id="{{:competency_uuid}}-{{:uuid}}-comment" ></input>
783
                                <input type="text" class="form-control input-behavior-comment" value="" maxlength="128" name="{{:competency_uuid}}-{{:uuid}}-comment" id="{{:competency_uuid}}-{{:uuid}}-comment" ></input>
732
                    </td>
-
 
733
                  </tr >
784
                            </td>
734
     
785
                        </tr >
735
                  {{/for}}
786
                        {{/for}}
736
               </tbody>
787
                    </tbody>
737
            </table>
788
                </table>
738
         </div>
789
            </div>
739
      </div>
790
        </div>
-
 
791
    </div>
740
   </div>
792
</div>