Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 4700 Rev 5050
Línea 23... Línea 23...
23
use LeadersLinked\Model\PerformanceEvaluationTest;
23
use LeadersLinked\Model\PerformanceEvaluationTest;
24
use LeadersLinked\Mapper\JobDescriptionMapper;
24
use LeadersLinked\Mapper\JobDescriptionMapper;
25
use LeadersLinked\Mapper\CompanyUserMapper;
25
use LeadersLinked\Mapper\CompanyUserMapper;
26
use LeadersLinked\Model\CompanyUser;
26
use LeadersLinked\Model\CompanyUser;
27
use LeadersLinked\Mapper\CompanyMapper;
27
use LeadersLinked\Mapper\CompanyMapper;
-
 
28
use LeadersLinked\Mapper\RecruitmentSelectionInterviewMapper;
-
 
29
use LeadersLinked\Mapper\RecruitmentSelectionApplicationMapper;
-
 
30
use LeadersLinked\Mapper\RecruitmentSelectionCandidateMapper;
-
 
31
use LeadersLinked\Mapper\RecruitmentSelectionVacancyMapper;
-
 
32
use LeadersLinked\Model\RecruitmentSelectionInterview;
Línea 28... Línea 33...
28
 
33
 
29
 
34
 
30
class CalendarController extends AbstractActionController
35
class CalendarController extends AbstractActionController
Línea 158... Línea 163...
158
            
163
            
-
 
164
            
-
 
165
 
-
 
166
    
-
 
167
            $zoomMeetingMapper = ZoomMeetingMapper::getInstance($this->adapter);
159
            
168
            $recruitmentSelectionCandidateMapper = RecruitmentSelectionCandidateMapper::getInstance($this->adapter);
160
 
169
            $recruitmentSelectionApplicationMapper = RecruitmentSelectionApplicationMapper::getInstance($this->adapter);
161
    
170
            $recruitmentSelectionVacancyMapper = RecruitmentSelectionVacancyMapper::getInstance($this->adapter);
162
            $zoomMeetingMapper = ZoomMeetingMapper::getInstance($this->adapter);
171
            $recruitmentSelectionInterviewMapper = RecruitmentSelectionInterviewMapper::getInstance($this->adapter);
Línea 169... Línea 178...
169
            $records = $calendarEventMapper->fetchAllByUserIdAndStartTimeAndEndTime($currentUser->id, $start, $end);
178
            $records = $calendarEventMapper->fetchAllByUserIdAndStartTimeAndEndTime($currentUser->id, $start, $end);
170
            foreach($records as $record) 
179
            foreach($records as $record) 
171
            {
180
            {
172
                switch($record->type)
181
                switch($record->type)
173
                {
182
                {
-
 
183
                    case CalendarEvent::TYPE_RECRUITMENT_SELECTION_INTERVIEW  : 
-
 
184
                        $backgroundColor = $currentNetwork->css_calendar_recruitment_and_selection_bg_color ;
-
 
185
                        $textColor = $currentNetwork->css_calendar_recruitment_and_selection_text_color;
-
 
186
                        
-
 
187
                        
-
 
188
                        $recruitmentSelectionInterview = $recruitmentSelectionInterviewMapper->fetchOne($record->relational_id);
-
 
189
                        if($recruitmentSelectionInterview) {
-
 
190
                            
-
 
191
                            $recruitmentSelectionVacancy = $recruitmentSelectionVacancyMapper->fetchOne($recruitmentSelectionInterview->vacancy_id);
-
 
192
                            
-
 
193
                            
-
 
194
                            
-
 
195
                            $recruitmentSelectionCandidate = $recruitmentSelectionCandidateMapper->fetchOne($recruitmentSelectionInterview->candidate_id);
-
 
196
                            if($recruitmentSelectionVacancy && $recruitmentSelectionCandidate) {
-
 
197
                                $jobDescription = $jobDescriptionMapper->fetchOne($recruitmentSelectionVacancy->job_description_id);
-
 
198
                                if($jobDescription) {
-
 
199
                                    $hasLink = false;
-
 
200
                                    if(isset($companyUsers[$currentUser->id])) {
-
 
201
                                        if($companyUsers[$currentUser->id]) {
-
 
202
                                            $hasLink = true;
-
 
203
                                        }
-
 
204
                                    }
-
 
205
                                    
-
 
206
                                    if($hasLink) {
-
 
207
                                        
-
 
208
                                        if(!isset($companies[$recruitmentSelectionInterview->company_id])) {
-
 
209
                                            $company  = $companyMapper->fetchOne($recruitmentSelectionInterview->company_id);
-
 
210
                                            
-
 
211
                                            $companies[ $company->id ]  = $company;
-
 
212
                                        } else {
-
 
213
                                            $company = $companies[ $recruitmentSelectionInterview->company_id ];
-
 
214
                                        }
-
 
215
                                        
-
 
216
                                        
-
 
217
                                        $href = $this->url()->fromRoute('backend/signin-company', [
-
 
218
                                            'id' => $company->uuid,
-
 
219
                                            'relational' => $recruitmentSelectionInterview->uuid,
-
 
220
                                            'type' => CalendarEvent::TYPE_RECRUITMENT_SELECTION_INTERVIEW
-
 
221
                                        ]);
-
 
222
                                        
-
 
223
                                        
-
 
224
                                        $agenda = '<a href="'.$href.'" class="goto-backend"><br>';
-
 
225
                                    }
-
 
226
   
-
 
227
                                    $agenda .= " LABEL_RECRUITMENT_SELECTION_JOB_DESCRIPTION : " . $jobDescription->name . "<br>";
-
 
228
                                    switch($recruitmentSelectionInterview->type)
-
 
229
                                    {
-
 
230
                                        case RecruitmentSelectionInterview::TYPE_BOSS :
-
 
231
                                            $agenda .= " LABEL_RECRUITMENT_SELECTION_TYPE : LABEL_RECRUITMENT_SELECTION_TYPE_BOSS_INTERVIEW <br>";
-
 
232
                                            break;
-
 
233
                                            
-
 
234
                                        case RecruitmentSelectionInterview::TYPE_HUMAN_RESOURCE :
-
 
235
                                            $agenda .= " LABEL_RECRUITMENT_SELECTION_TYPE : LABEL_RECRUITMENT_SELECTION_TYPE_HUMAN_RESOURCE <br>";
-
 
236
                                            break;
-
 
237
                                    }
-
 
238
                                    
-
 
239
                                    $agenda .= " LABEL_RECRUITMENT_SELECTION_CANDIDATE : " . trim($recruitmentSelectionCandidate->first_name . ' ' . $recruitmentSelectionCandidate->last_name) . " <br>";
-
 
240
                                         
-
 
241
                                    
-
 
242
                                    
-
 
243
                                    $dtStart = \DateTime::createFromFormat('Y-m-d', $recruitmentSelectionInterview->last_date);
-
 
244
                                    $agenda .= " LABEL_PERFORMANCE_EVALUATION_LAST_DATE : " . $dtStart->format('Y-m-d') . "<br>" ;
-
 
245
                                    
-
 
246
                                    if($hasLink) {
-
 
247
                                        $agenda .= "</a><br>";
-
 
248
                                    }
-
 
249
                                    
-
 
250
                                    
-
 
251
                                    
-
 
252
                                    
-
 
253
                                    array_push($events, [
-
 
254
                                        'id'                => $recruitmentSelectionInterview->uuid,
-
 
255
                                        'title'             => $recruitmentSelectionVacancy->name,
-
 
256
                                        'agenda'            => $agenda,
-
 
257
                                        'start'             => $dtStart->format('Y-m-d'),
-
 
258
                                        'url'               => '',
-
 
259
                                        'backgroundColor'   => $backgroundColor,
-
 
260
                                        'textColor'         => $textColor,
-
 
261
                                        'allDay'            => true,
-
 
262
                                        'type'              => 'task',
-
 
263
                                    ]);
-
 
264
                                }
-
 
265
                            }
-
 
266
                        }
-
 
267
                        
174
                    
268
 
-
 
269
                        break;
Línea 175... Línea 270...
175
                    
270
                    
Línea 176... Línea 271...
176
                    case CalendarEvent::TYPE_PERFORMANCE_EVALUATION : 
271
                    case CalendarEvent::TYPE_PERFORMANCE_EVALUATION :