Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 15461 Rev 16804
Línea 61... Línea 61...
61
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-checkbox/awesome-bootstrap-checkbox.css'));
61
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-checkbox/awesome-bootstrap-checkbox.css'));
Línea 62... Línea 62...
62
 
62
 
Línea -... Línea 63...
-
 
63
 
-
 
64
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-input-number/input-number-format.jquery.js'));
-
 
65
 
-
 
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'));
63
 
69
 
64
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-input-number/input-number-format.jquery.js'));
70
$this->headLink()->appendStylesheet($this->basePath('css/activity-center-accordion.css'));
Línea 65... Línea 71...
65
 
71
 
Línea 88... Línea 94...
88
 
94
 
Línea 89... Línea 95...
89
    $.fn.renderCompetencies = function() {
95
    $.fn.renderCompetencies = function() {
Línea 90... Línea 96...
90
 
96
 
91
        if(competencies_selected.length > 0) {
97
        if(competencies_selected.length > 0) {
92
 
98
 
93
             $('#div-competencies').html($('#competencyTemplate').render(competencies_selected, {
99
             $('#accordion').html($('#competencyTemplate').render(competencies_selected, {
94
                getCompetencyType: (uuid) => competency_types.filter((item) => item.uuid == uuid ? item : false)[0],
100
                getCompetencyType: (uuid) => competency_types.filter((item) => item.uuid == uuid ? item : false)[0],
95
                getCompetency: (uuid) => competencies.filter((item) => item.uuid == uuid ? item : false)[0],
101
                getCompetency: (uuid) => competencies.filter((item) => item.uuid == uuid ? item : false)[0],
96
                getBehavior: (uuid) => behaviors.filter((item) => item.uuid == uuid ? item : false)[0]
-
 
97
            }));
-
 
98
        } else {
102
                getBehavior: (uuid) => behaviors.filter((item) => item.uuid == uuid ? item : false)[0]
99
 
103
            }));
-
 
104
        } else {
-
 
105
             $('#accordion').empty();
-
 
106
        }
-
 
107
 
-
 
108
    	$('.collapse.show').each(function(){
-
 
109
    		$(this).siblings('.card-header').find('.btn i').attr('class', 'fa fa-minus');
-
 
110
    	});
-
 
111
    	
-
 
112
    	$('.collapse').on('show.bs.collapse', function(){
-
 
113
        	$(this).parent().find('.card-header .btn i').attr('class', 'fa fa-minus');
100
 
114
    	}).on('hide.bs.collapse', function(){
Línea 101... Línea 115...
101
             $('#div-competencies').empty();
115
    		$(this).parent().find('.card-header .btn i').attr('class', 'fa fa-plus');
Línea 416... Línea 430...
416
                competencies_selected = response['data']['competencies_selected'];
430
                competencies_selected = response['data']['competencies_selected'];
417
                subordinates_selected = response['data']['subordinates_selected'];    
431
                subordinates_selected = response['data']['subordinates_selected'];    
Línea 418... Línea 432...
418
    
432
    
Línea -... Línea 433...
-
 
433
                $.fn.renderCompetencies();
Línea 419... Línea 434...
419
                $.fn.renderCompetencies();
434
 
420
 
435
                $('#form-title').html( response['data']['form'])
421
 
436
 
422
                var data = {
437
                var data = {
Línea 452... Línea 467...
452
                $('#points').val('');
467
                $('#points').val('');
453
                $('#row-header').hide();
468
                $('#row-header').hide();
454
                $('#row-table').hide();
469
                $('#row-table').hide();
455
                $('#row-test').show();
470
                $('#row-test').show();
Línea -... Línea 471...
-
 
471
 
-
 
472
                $('#stepwizard').smartWizard('reset');
Línea 456... Línea 473...
456
 
473
 
457
        
474
        
458
            } else {
475
            } else {
459
                $.fn.showError(response['data'])
476
                $.fn.showError(response['data'])
Línea 487... Línea 504...
487
                $(this).val('100');
504
                $(this).val('100');
488
            }
505
            }
489
        }
506
        }
490
    });
507
    });
Línea -... Línea 508...
-
 
508
 
-
 
509
    $('#stepwizard').smartWizard({
-
 
510
        selected: 0,
-
 
511
        // autoAdjustHeight: false,
-
 
512
        theme: 'arrows', // basic, arrows, square, round, dots
-
 
513
        transition: {
-
 
514
            animation:'none'
-
 
515
        },
-
 
516
        lang: { 
-
 
517
            next: 'LABEL_NEXT',
-
 
518
            previous: 'LABEL_PREVIOUS',
-
 
519
        },
-
 
520
        toolbar: {
-
 
521
            showNextButton: true, // show/hide a Next button
-
 
522
            showPreviousButton: true, // show/hide a Previous button
-
 
523
            position: 'bottom', // none/ top/ both bottom
-
 
524
            extraHtml: `<button type="button" class="btn btn-primary btn-save">LABEL_SAVE</button>`
-
 
525
                + `<button type="button" class="btn btn-secondary btn-cancel">LABEL_CANCEL</button>`
-
 
526
        },
-
 
527
        anchor: {
-
 
528
            enableNavigation: true, // Enable/Disable anchor navigation 
-
 
529
            enableNavigationAlways: false, // Activates all anchors clickable always
-
 
530
            enableDoneState: true, // Add done state on visited steps
-
 
531
            markPreviousStepsAsDone: true, // When a step selected by url hash, all previous steps are marked done
-
 
532
            unDoneOnBackNavigation: true, // While navigate back, done state will be cleared
-
 
533
            enableDoneStateNavigation: true // Enable/Disable the done state navigation
-
 
534
        },
-
 
535
    });
-
 
536
 
-
 
537
    $('#stepwizard').smartWizard('reset');
Línea 491... Línea 538...
491
 
538
 
492
   
539
   
493
});
540
});
494
JS;
541
JS;
Línea 538... Línea 585...
538
    </div>
585
    </div>
539
</section>
586
</section>
Línea 540... Línea 587...
540
 
587
 
541
 
588
 
542
<section id="row-test" style="display: none;">
589
<section id="row-test" style="display: none;">
543
        <div class="container-fluid">
590
	<div class="container-fluid">
-
 
591
        <div class="row p-2">
544
        <div class="row p-2">
592
			<div class="col-12">
545
                <div class="col-12">
593
				<h4 class="text-center" id="form-title"></h4>
546
                   <?php
594
   				<?php
547
                       $form->setAttributes([
595
                $form->setAttributes([
548
                           'method' => 'post',
596
                    'method' => 'post',
549
                           'name' => 'form',
597
                    'name' => 'form',
550
                           'id' => 'form',
598
                    'id' => 'form',
551
                       ]);
599
                ]);
552
                       $form->prepare();
600
                $form->prepare();
-
 
601
                echo $this->form()->openTag($form);
-
 
602
                ?>
-
 
603
                   
553
                       echo $this->form()->openTag($form);
604
        		<div id="stepwizard" class="border border-gray p-4 mt-2">
554
                   ?>
605
            		<ul class="nav">
555
                        <div class="card">
606
                    	<li class="nav-item">
556
                           <ul class="nav nav-tabs" id="custom-tabs" role="tablist">
607
                        	<a class="nav-link" href="#step-1">
557
                               <li class="nav-item" role="presentation">
608
                            	<div class="num">1</div>
-
 
609
                              	LABEL_GENERAL
558
                                   <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>
610
                         	</a>
559
                               </li>
611
                    	</li>
560
                               <li class="nav-item" role="presentation">
612
                        <li class="nav-item">
561
                                   <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>
613
                        	<a class="nav-link" href="#step-2">
562
                               </li>
-
 
563
                               <li class="nav-item" role="presentation">
614
                            	<div class="num">2</div>
564
                                   <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>
615
                               	LABEL_COMPETENCIES
565
                               </li>
616
                            </a>
566
                           </ul>
617
                    	</li>
567
                                <div class="tab-content">
-
 
568
                               <div class="tab-pane fade show active" id="custom-tabs-general" role="tabpanel" aria-labelledby="custom-tabs-general-tab">
618
                        <li class="nav-item">
569
                               
619
                        	<a class="nav-link" href="#step-3">
570
                               <div class="p-2">
620
                            	<span class="num">3</span>
571
                                       <h5 id="interview"></h5>       
621
                              	LABEL_CONCLUTION
-
 
622
                            </a>
572
                                       <div id="div-job-description"></div>
623
                     	</li>
573
                                   </div>
624
  					</ul>
574
                               </div>
625
                    <div class="tab-content">
575
                               <div class="tab-pane fade" id="custom-tabs-compentencies" role="tabpanel" aria-labelledby="custom-tabs-compentencies-tab">
626
    					<div id="step-1" class="tab-pane" role="tabpanel" aria-labelledby="step-1">
-
 
627
                        	<div class="w-100">
-
 
628
                            	<div class="mf-field w-100 d-flex justify-content-between p-3 align-items-center">
576
                                   <div class="row p-2">
629
                            		<div class="form-group w-100">
577
                                      <div class="col-md-12 col-sm-12 col-xs-12" id="div-competencies" style="margin-top: 1px;">
630
    									<h5 id="interview"></h5>       
-
 
631
                                      	<div id="div-job-description"></div>
-
 
632
                                  	</div>
578
                                      </div>
633
    							</div>
579
                                   </div>
634
    						</div>
580
                               </div>
635
            			</div>
-
 
636
            		    <div id="step-2" class="tab-pane" role="tabpanel" aria-labelledby="step-2">
581
                               <div class="tab-pane fade" id="custom-tabs-evaluation" role="tabpanel" aria-labelledby="custom-tabs-evaluation-tab">
637
                            <div class="w-100">
582
                                   <div class="row p-2">
638
                         		 <div class="accordion mt-5 w-100" id="accordion" style="height: 500px; overflow-y: auto;">
-
 
639
                            	</div>
-
 
640
                          	</div>
-
 
641
    					</div>
583
                                       <div class="col-12">
642
						<div id="step-3" class="tab-pane" role="tabpanel" aria-labelledby="step-3">
584
                                           <div class="form-group">
643
							<div class="form-group w-100">
585
                                               <?php
644
                            	<?php
586
                                               $element = $form->get('comment');
645
                                $element = $form->get('comment');
587
                                               $element->setOptions(['label' => 'LABEL_COMMENT']);
646
                                $element->setOptions(['label' => 'LABEL_COMMENT']);
588
                                               $element->setAttributes(['class' => 'form-control']);
647
                                $element->setAttributes(['class' => 'form-control']);
589
                                               echo $this->formLabel($element);
648
                                echo $this->formLabel($element);
590
                                               echo $this->formTextArea($element);
649
                                echo $this->formTextArea($element);
591
                                               ?>
650
                                ?>
592
                                           </div>
651
                     		</div>
593
                                           <div class="form-group">
652
                  			<div class="form-group w-100">
594
                                               <?php
653
                          		<?php
595
                                               $element = $form->get('points');
654
                                $element = $form->get('points');
596
                                               $element->setAttributes(['class' => 'form-control']);
655
                                $element->setAttributes(['class' => 'form-control']);
597
                                               $element->setOptions(['label' => 'LABEL_EVALUATION']);
656
                                $element->setOptions(['label' => 'LABEL_EVALUATION']);
598
                                               echo $this->formLabel($element);
657
                                echo $this->formLabel($element);
599
                                               echo $this->formNumber($element);
658
                                echo $this->formNumber($element);
600
                                               ?>
659
                                ?>
601
                                           </div>
660
                   			</div>
602
                                      		<div class="form-group">
661
                  			<div class="form-group w-100">
603
                                               <?php
662
                    			<?php
604
                                               $element = $form->get('status');
663
                                $element = $form->get('status');
605
                                               $element->setOptions(['label' => 'LABEL_STATUS']);
664
                                $element->setOptions(['label' => 'LABEL_STATUS']);
606
                                               $element->setAttributes(['class' => 'form-control']);
665
                                $element->setAttributes(['class' => 'form-control']);
607
                                               echo $this->formLabel($element);
-
 
608
                                               echo $this->formSelect($element);
-
 
609
                                               ?>
-
 
610
                                           </div>
666
                                echo $this->formLabel($element);
611
                                       </div>
667
                                echo $this->formSelect($element);
612
                                   </div>
-
 
613
                               </div>
-
 
614
                               <div class="card-footer clearfix">
-
 
615
                               	   <div class="text-right">
-
 
616
 
-
 
617
                                   	<button type="button" class="btn btn-primary btn-save">LABEL_SAVE</button>
668
                                ?>
618
                                   	<button type="button" class="btn btn-secondary btn-cancel">LABEL_CANCEL</button>
669
                   			</div>
619
                               		</div>
670
						</div>
620
                               </div>
671
					</div>
621
                      		</div>
672
            	</div>
622
                       </div>
-
 
-
 
673
        	</div>
-
 
674
			<?php echo $this->form()->closeTag($form); ?>
623
                   <?php echo $this->form()->closeTag($form); ?>
675
        
624
               </div>
676
       
625
           </div>    
677
		</div>    
Línea 626... Línea 678...
626
        </div>
678
	</div>
627
</section>
679
</section>
628
    
680
    
629
<script id="job-description-template" type="text/x-jsrender">
-
 
630
    <div class="card">
681
<script id="job-description-template" type="text/x-jsrender">
631
        <div class="card-body">
682
    <div class="card">
632
            <h4 class="text-center">{{:form}}</h4>
683
        <div class="card-body">
633
            <table class="table table-bordered">
684
            <table class="table table-bordered">
634
                <tr>
685
                <tr>
Línea 660... Línea 711...
660
    </div>
711
    </div>
661
</script>    
712
</script>    
Línea 662... Línea 713...
662
    
713
    
663
    
714
    
664
<script id="competencyTemplate" type="text/x-jsrender">
715
<script id="competencyTemplate" type="text/x-jsrender">
665
 <div class="panel panel-default panel-competency" id="panel-{{:uuid}}" data-competency="{{:uuid}}">
716
<div class="card">
666
   <div class="panel-heading">
717
    <div class="card-header" id="heading-{{:uuid}}">
667
      <h4 class="panel-title" style="    font-size: 18px;">
-
 
668
         <a class="accordion-toggle" data-toggle="collapse" aria-expanded="true" data-parent="#panel-{{:uuid}}" href="#collapse-{{:uuid}}">
718
        <h2 class="clearfix mb-0">
669
         <span class="section-name{{:uuid}}">
-
 
670
            {{:~getCompetencyType(competency_type_uuid).name}} - {{:~getCompetency(uuid).name}}
719
            <a class="btn btn-link" data-toggle="collapse" data-target="#collapse-{{:uuid}}" aria-expanded="true" aria-controls="collapse-{{:uuid}}">
671
         </span>
720
                <i class="fa fa-plus"></i> {{:~getCompetencyType(competency_type_uuid).name}} - {{:~getCompetency(uuid).name}}
672
         </a>
721
            </a>				
673
      </h4>
722
        </h2>
674
   </div>
723
    </div>
675
   <div id="collapse-{{:uuid}}" class="panel-collapse in collapse show">
724
    <div id="collapse-{{:uuid}}" class="collapse" aria-labelledby="heading-{{:uuid}}" data-parent="#accordion">
676
      <div class="panel-body">
725
        <div class="card-body">
677
         <div class="table-responsive">
726
            <div class="table-responsive">
678
            <table class="table table-bordered">
727
                <table class="table table-bordered">
679
               <thead>
728
                    <thead>
680
                  <tr>
729
                        <tr>
681
                     <th style="width: 30%;">LABEL_ELEMENT</th>
730
                            <th style="width: 30%;">LABEL_ELEMENT</th>
682
                     <th style="width: 50%;">LABEL_TITLE</th>
731
                            <th style="width: 50%;">LABEL_TITLE</th>
683
                     <th style="width: 10%;">LABEL_LEVEL</th>
-
 
684
                     <th style="width: 10%;">LABEL_POINTS</th>
732
                            <th style="width: 10%;">LABEL_LEVEL</th>
685
 
733
                            <th style="width: 10%;">LABEL_POINTS</th>
686
                  </tr>
734
                         </tr>
687
               </thead>
735
                    </thead>
688
               <tbody>
736
                    <tbody>
689
                  <tr>
737
                        <tr>
690
                     <td class="text-left">LABEL_COMPETENCY</td>
738
                            <td class="text-left">LABEL_COMPETENCY</td>
691
                     <td class="text-left">{{:name}}</td>
739
                            <td class="text-left">{{:name}}</td>
692
                     <td>&nbsp;</td>
-
 
693
                     <td>&nbsp;</td>
740
                            <td>&nbsp;</td>
694
 
741
                            <td>&nbsp;</td>
695
                  </tr>
742
                        </tr>
696
                  {{for behaviors}}
743
                        {{for behaviors}}
697
                  <tr >
744
                        <tr >
698
                     <td class="text-left">--LABEL_BEHAVIOR</td>
745
                            <td class="text-left">--LABEL_BEHAVIOR</td>
699
                     <td class="text-left">
746
                            <td class="text-left">
700
                       {{:~getBehavior(uuid).description}}
747
                                {{:~getBehavior(uuid).description}}
701
                     </td>
748
                            </td>
702
                     <td class="text-right">
749
                            <td class="text-right">
703
                        {{:level}}
750
                                {{:level}}
704
                     </td>
751
                            </td>
705
                     <td class="text-right">
752
                            <td class="text-right">
706
                        <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>
-
 
707
                     </td>
753
                                <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>
708
 
754
                            </td>
709
                  </tr>
755
                        </tr>
710
                  <tr >
756
                        <tr >
711
                    <td colspan="4">
757
                            <td colspan="4">
712
                     LABEL_COMMENT
758
                            LABEL_COMMENT
713
                     <input type="text" class="form-control input-behavior-comment" value="" maxlength="128" name="{{:competency_uuid}}-{{:uuid}}-comment" id="{{:competency_uuid}}-{{:uuid}}-comment" ></input>
759
                            <input type="text" class="form-control input-behavior-comment" value="" maxlength="128" name="{{:competency_uuid}}-{{:uuid}}-comment" id="{{:competency_uuid}}-{{:uuid}}-comment" ></input>
Línea 714... Línea 760...
714
                    </td>
760
                            </td>
715
                  </tr >
761
                        </tr >
716
     
762
     
717
                  {{/for}}
763
                        {{/for}}
718
               </tbody>
764
                    </tbody>
719
            </table>
765
                </table>
720
         </div>
766
            </div>
-
 
767
        </div>
721
      </div>
768
    </div>