Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 1540 Rev 1541
Línea 121... Línea 121...
121
                $allowDelete = $acl->isAllowed($currentUser->usertype_id, 'recruitment-and-selection/vacancies/delete');
121
                $allowDelete = $acl->isAllowed($currentUser->usertype_id, 'recruitment-and-selection/vacancies/delete');
Línea 122... Línea 122...
122
               
122
               
Línea 123... Línea 123...
123
                $allowEdit = $acl->isAllowed($currentUser->usertype_id, 'recruitment-and-selection/vacancies/edit');
123
                $allowEdit = $acl->isAllowed($currentUser->usertype_id, 'recruitment-and-selection/vacancies/edit');
124
 
124
 
Línea 125... Línea 125...
125
                $recruitmentSelectionVacancyMapper = RecruitmentSelectionVacancyMapper::getInstance($this->adapter);
125
                $recruitmentSelectionVacancyMapper = RecruitmentSelectionVacancyMapper::getInstance($this->adapter);
126
                $paginator = $recruitmentSelectionVacancyMapper->fetchAllDataTableByCompanyId($currentCompany->id, $search, $page, $records_x_page, $order_field, $order_direction);
126
                $paginator = $recruitmentSelectionVacancyMapper->fetchAllDataTableByCompanyId($currentCompany->uuid, $search, $page, $records_x_page, $order_field, $order_direction);
127
 
127
 
Línea 158... Línea 158...
158
                        'total' => $paginator->getTotalItemCount(),
158
                        'total' => $paginator->getTotalItemCount(),
159
                    ]
159
                    ]
160
                ]);
160
                ]);
161
            } else {
161
            } else {
Línea 162... Línea 162...
162
 
162
 
Línea 163... Línea 163...
163
                $form = new RecruitmentSelectionVacancyForm($this->adapter, $currentCompany->id);
163
                $form = new RecruitmentSelectionVacancyForm($this->adapter, $currentCompany->uuid);
164
 
164
 
165
                $jobDescriptionMapper = JobDescriptionMapper::getInstance($this->adapter);
165
                $jobDescriptionMapper = JobDescriptionMapper::getInstance($this->adapter);
166
                $jobsDescription = $jobDescriptionMapper->fetchAllByCompanyId($currentCompany->id);
166
                $jobsDescription = $jobDescriptionMapper->fetchAllByCompanyId($currentCompany->uuid);
167
                $industryMapper = industryMapper::getInstance($this->adapter);
167
                $industryMapper = industryMapper::getInstance($this->adapter);
168
                $industry = $industryMapper->fetchAllActives($currentCompany->id);
168
                $industry = $industryMapper->fetchAllActives($currentCompany->uuid);
Línea 169... Línea 169...
169
                $jobCategoryMapper = JobCategoryMapper::getInstance($this->adapter);
169
                $jobCategoryMapper = JobCategoryMapper::getInstance($this->adapter);
170
                $jobCategory = $jobCategoryMapper->fetchAllActives($currentCompany->id);
170
                $jobCategory = $jobCategoryMapper->fetchAllActives($currentCompany->uuid);
171
                
171
                
172
                $this->layout()->setTemplate('layout/layout-backend');
172
                $this->layout()->setTemplate('layout/layout-backend');
Línea 196... Línea 196...
196
 
196
 
Línea 197... Línea 197...
197
        $request = $this->getRequest();
197
        $request = $this->getRequest();
198
 
198
 
199
 
199
 
Línea 200... Línea 200...
200
        if ($request->isPost()) {
200
        if ($request->isPost()) {
Línea 230... Línea 230...
230
 
230
 
231
                $vacancy = new RecruitmentSelectionVacancy();
231
                $vacancy = new RecruitmentSelectionVacancy();
Línea 232... Línea 232...
232
                $hydrator->hydrate($dataPost, $vacancy);
232
                $hydrator->hydrate($dataPost, $vacancy);
233
 
233
 
Línea 234... Línea 234...
234
                $vacancy->location_id = $location->id;
234
                $vacancy->location_id = $location->id;
235
                $vacancy->company_id = $currentCompany->id;
235
                $vacancy->company_id = $currentCompany->uuid;
236
 
236
 
Línea 327... Línea 327...
327
            ];
327
            ];
Línea 328... Línea 328...
328
 
328
 
329
            return new JsonModel($data);
329
            return new JsonModel($data);
Línea 330... Línea 330...
330
        }
330
        }
331
 
331
 
332
        if ($vacancyMapper->company_id != $currentCompany->id) {
332
        if ($vacancyMapper->company_id != $currentCompany->uuid) {
333
            return new JsonModel([
333
            return new JsonModel([
334
                'success' => false,
334
                'success' => false,
335
                'data' => 'ERROR_UNAUTHORIZED'
335
                'data' => 'ERROR_UNAUTHORIZED'
Línea 336... Línea 336...
336
            ]);
336
            ]);
337
        }
337
        }
338
 
338
 
339
 
339
 
Línea 340... Línea 340...
340
        if ($request->isPost()) {
340
        if ($request->isPost()) {
Línea 426... Línea 426...
426
            $data = [
426
            $data = [
427
                'success' => true,
427
                'success' => true,
428
                'data' => [
428
                'data' => [
429
                    'id' => $vacancyMapper->uuid,
429
                    'id' => $vacancyMapper->uuid,
430
                    'name' => $vacancyMapper->name,
430
                    'name' => $vacancyMapper->name,
431
                    'company'=>$currentCompany->id,
431
                    'company'=>$currentCompany->uuid,
432
                    'job_description_id' => $jobDescription->uuid,
432
                    'job_description_id' => $jobDescription->uuid,
433
                    'location_search' => $location->formatted_address,
433
                    'location_search' => $location->formatted_address,
434
                    'job_category_id' => $jobCategory->uuid,
434
                    'job_category_id' => $jobCategory->uuid,
435
                    'description' => $vacancyMapper->description,
435
                    'description' => $vacancyMapper->description,
436
                    'industry_id' => $industry->uuid, 
436
                    'industry_id' => $industry->uuid, 
Línea 480... Línea 480...
480
            ];
480
            ];
Línea 481... Línea 481...
481
 
481
 
482
            return new JsonModel($data);
482
            return new JsonModel($data);
Línea 483... Línea 483...
483
        }
483
        }
484
 
484
 
485
        if ($vacancyMapper->company_id != $currentCompany->id) {
485
        if ($vacancyMapper->company_id != $currentCompany->uuid) {
486
            return new JsonModel([
486
            return new JsonModel([
487
                'success' => false,
487
                'success' => false,
488
                'data' => 'ERROR_UNAUTHORIZED'
488
                'data' => 'ERROR_UNAUTHORIZED'