Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 1426 Rev 1427
Línea 207... Línea 207...
207
 
207
 
Línea 208... Línea 208...
208
 
208
 
209
                $dataPost = (array) $form->getData();
-
 
210
 
-
 
Línea 211... Línea 209...
211
                $hydrator = new ObjectPropertyHydrator();
209
                $dataPost = (array) $form->getData();
212
                $recruitmentForm = new RecruitmentSelectionVacancy();
210
 
Línea 213... Línea 211...
213
                $hydrator->hydrate($dataPost, $recruitmentForm);
211
                $hydrator = new ObjectPropertyHydrator();
Línea 226... Línea 224...
226
                            'data' => 'ERROR_THERE_WAS_AN_ERROR'
224
                            'data' => 'ERROR_THERE_WAS_AN_ERROR'
227
                        ]
225
                        ]
228
                    ]);
226
                    ]);
229
                }
227
                }
Línea 230... Línea 228...
230
 
228
 
-
 
229
                $recruitmentForm = new RecruitmentSelectionVacancy();
Línea 231... Línea 230...
231
                $recruitmentForm->location_id = $location->id;
230
                $hydrator->hydrate($dataPost, $recruitmentForm);
232
 
-
 
233
                if (!$recruitmentForm->status) {
-
 
234
                    $recruitmentForm->status = RecruitmentSelectionVacancy::STATUS_INACTIVE;
231
 
-
 
232
                $recruitmentForm->location_id = $location->id;
235
                }
233
                $recruitmentForm->company_id = $currentCompany->id;
-
 
234
 
-
 
235
                $jobDescriptionMapper = JobDescriptionMapper::getInstance($this->adapter);
-
 
236
                $jobDescription = $jobDescriptionMapper->fetchOneByUuid($dataPost['job_description_id']);
-
 
237
                $recruitmentForm->job_description_id = $jobDescription->id;
-
 
238
 
-
 
239
                $jobCategoryMapper = JobCategoryMapper::getInstance($this->adapter);
Línea 236... Línea 240...
236
                $recruitmentForm->company_id = $currentCompany->id;
240
                $jobCategory = $jobCategoryMapper->fetchOneByUuid( $dataPost['job_category_id']);
237
                $recruitmentSelectionVacancyMapper = RecruitmentSelectionVacancyMapper::getInstance($this->adapter);
241
                $recruitmentForm->job_category_id = $jobCategory->id;
238
 
242
 
239
                return new JsonModel([
243
                return new JsonModel([
240
                    'success' => false,
244
                    'success' => false,
241
                    'data' => [
245
                    'data' => [
242
                        $request->getPost()->toArray(),
246
                        $request->getPost()->toArray(),
-
 
247
                        $dataPost,
243
                        $dataPost,
248
                        (array)$currentCompany,
244
                        (array)$currentCompany,
249
                        (array)$recruitmentForm,
Línea -... Línea 250...
-
 
250
                        (array)$result,
245
                        (array)$recruitmentForm,
251
                    ],
Línea 246... Línea -...
246
                    ],
-
 
247
                ]);
252
                ]);
248
 
253
 
Línea 249... Línea 254...
249
                $result = $recruitmentSelectionVacancyMapper->insert($recruitmentForm);
254
                $recruitmentSelectionVacancyMapper = RecruitmentSelectionVacancyMapper::getInstance($this->adapter);
250
 
255
                $result = $recruitmentSelectionVacancyMapper->insert($recruitmentForm);