| 977 | geraldo | 1 | <?php
 | 
        
           |  |  | 2 | $acl = $this->viewModel()->getRoot()->getVariable('acl');
 | 
        
           |  |  | 3 | $currentUser = $this->currentUserHelper();
 | 
        
           |  |  | 4 |   | 
        
           |  |  | 5 | $roleName = $currentUser->getUserTypeId();
 | 
        
           |  |  | 6 |   | 
        
           | 985 | geraldo | 7 | $routeAdd = $this->url('performance-evaluation/forms/add');
 | 
        
           |  |  | 8 | $routeDatatable = $this->url('performance-evaluation/forms');
 | 
        
           | 977 | geraldo | 9 | $routeDashboard = $this->url('dashboard');
 | 
        
           |  |  | 10 |   | 
        
           | 985 | geraldo | 11 | $allowAdd = $acl->isAllowed($roleName, 'performance-evaluation/forms/add') ? 1 : 0;
 | 
        
           |  |  | 12 | $allowEdit = $acl->isAllowed($roleName, 'performance-evaluation/forms/edit') ? 1 : 0;
 | 
        
           |  |  | 13 | $allowDelete = $acl->isAllowed($roleName, 'performance-evaluation/forms/delete') ? 1 : 0;
 | 
        
           | 1263 | geraldo | 14 | $allowReport = $acl->isAllowed($roleName, 'performance-evaluation/forms/report') ? 1 : 0;
 | 
        
           | 977 | geraldo | 15 |   | 
        
           | 1088 | geraldo | 16 | // Page Styles
 | 
        
           |  |  | 17 | $this->headLink()->appendStylesheet($this->basePath('css/pages/self-evaluation.css'));
 | 
        
           |  |  | 18 |   | 
        
           | 15066 | stevensc | 19 | $jsonJobsDescription = json_encode($jobsDescription);
 | 
        
           | 12137 | stevensc | 20 |   | 
        
           | 15066 | stevensc | 21 | $js = <<<JS
 | 
        
           |  |  | 22 | 	const backendVariables= {
 | 
        
           |  |  | 23 |         add_link: "$routeAdd",
 | 
        
           |  |  | 24 |         table_link: "$routeDatatable",
 | 
        
           |  |  | 25 |         dashboard_link: "$routeDashboard",
 | 
        
           |  |  | 26 |         jobsDescription: $jsonJobsDescription,
 | 
        
           |  |  | 27 |         permisions: {
 | 
        
           |  |  | 28 |             allowAdd: $allowAdd,
 | 
        
           |  |  | 29 |             allowDelete: $allowDelete,
 | 
        
           |  |  | 30 |             allowEdit: $allowEdit,
 | 
        
           |  |  | 31 |             allowReport: $allowReport
 | 
        
           | 11960 | stevensc | 32 |         }
 | 
        
           | 15066 | stevensc | 33 | 	}
 | 
        
           | 11960 | stevensc | 34 | JS;
 | 
        
           |  |  | 35 |   | 
        
           | 15066 | stevensc | 36 | $this->inlineScript()->appendScript($js);
 | 
        
           |  |  | 37 | $this->headLink()->appendStylesheet('/react-bundles/performance_evaluations/forms/main.css');
 | 
        
           |  |  | 38 | $this->inlineScript()->appendFile('/react-bundles/performance_evaluations/forms/formsBundle.js');
 | 
        
           | 977 | geraldo | 39 | ?>
 | 
        
           | 11960 | stevensc | 40 |   | 
        
           | 15066 | stevensc | 41 | <div id="evaluations-forms">
 | 
        
           | 12154 | stevensc | 42 | </div>
 |