Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 215 Rev 216
Línea 189... Línea 189...
189
                $result = $companySelfEvaluationMapper->insert($companySelfEvaluation);
189
                $result = $companySelfEvaluationMapper->insert($companySelfEvaluation);
Línea 190... Línea 190...
190
 
190
 
191
                if ($result) {
191
                if ($result) {
Línea 192... Línea -...
192
                    $this->logger->info('Se agrego el tamaño de empresa ' . $companySelfEvaluation->name, ['user_id' => $currentUser->id, 'ip' => Functions::getUserIP()]);
-
 
193
 
192
                    $this->logger->info('Se agrego el tamaño de empresa ' . $companySelfEvaluation->name, ['user_id' => $currentUser->id, 'ip' => Functions::getUserIP()]);
194
                    
193
 
Línea 195... Línea 194...
195
                    // Get record by id
194
                    // Get record by id
-
 
195
                    $record = $companySelfEvaluationMapper->fetchOne($companySelfEvaluation->id);
196
                    $record = $companySelfEvaluationMapper->fetchOne($companySelfEvaluation->id);
196
 
197
 
197
                    if ($record) {
198
                    if ($record) {
198
                        
199
                        $data = [
199
                        $data = [
200
                            'success' => true,
200
                            'success' => true,
201
                            'id' => $record->id,
201
                            'id' => $record->id,
-
 
202
                            'action_edit' => $this->url()->fromRoute('self-evaluation/forms/edit', ['id' => $record->uuid]),
-
 
203
                            'data' => 'LABEL_RECORD_ADDED'
-
 
204
                        ];
-
 
205
                        
-
 
206
                    } else {
-
 
207
                        
-
 
208
                        $data = [
202
                            'action_edit' => $this->url()->fromRoute('self-evaluation/forms/edit', ['id' => $record->uuid]),
209
                            'success' => false,
Línea 203... Línea 210...
203
                            'data' => 'LABEL_RECORD_ADDED'
210
                            'data' => 'ERROR_RECORD_NOT_FOUND'
204
                        ];
211
                        ];
205
                    }
212
                    }
Línea 294... Línea 301...
294
 
301
 
Línea 295... Línea 302...
295
                $result = $companySelfEvaluationMapper->update($companySelfEvaluation);
302
                $result = $companySelfEvaluationMapper->update($companySelfEvaluation);
296
 
303
 
297
                if ($result) {
-
 
298
                    $this->logger->info('Se actualizo el tamaño de empresa ' . $companySelfEvaluation->name, ['user_id' => $currentUser->id, 'ip' => Functions::getUserIP()]);
-
 
299
 
304
                if ($result) {
300
 
305
                    $this->logger->info('Se actualizo el tamaño de empresa ' . $companySelfEvaluation->name, ['user_id' => $currentUser->id, 'ip' => Functions::getUserIP()]);
301
                    $data = [
306
                    $data = [
302
                        'success' => true,
307
                        'success' => true,
303
                        'id' => $companySelfEvaluation->id,
308
                        'id' => $companySelfEvaluation->id,
304
                        'action_edit' => $this->url()->fromRoute('self-evaluation/forms/edit', ['id' => $companySelfEvaluation->uuid]),
309
                        'action_edit' => $this->url()->fromRoute('self-evaluation/forms/edit', ['id' => $companySelfEvaluation->uuid]),
305
                        'data' => 'LABEL_RECORD_UPDATED'
310
                        'data' => 'LABEL_RECORD_UPDATED'
306
                    ];
311
                    ];
307
                } else {
312
                } else {
308
                    $data = [
313
                    $data = [
309
                        'success' => false,
314
                        'success' => false,
310
                        'data' => $companySelfEvaluationMapper->getErrno()
315
                        'data' => $companySelfEvaluationMapper->getError()
Línea 311... Línea 316...
311
                    ];
316
                    ];
312
                }
317
                }
Línea 387... Línea 392...
387
                'success' => false,
392
                'success' => false,
388
                'data' => 'ERROR_UNAUTHORIZED'
393
                'data' => 'ERROR_UNAUTHORIZED'
389
            ]);
394
            ]);
390
        }
395
        }
Línea 391... Línea -...
391
 
-
 
392
 
-
 
393
 
396
 
Línea 394... Línea -...
394
        if ($request->isPost()) {
-
 
395
 
397
        if ($request->isPost()) {
396
 
398
 
397
            //Falta borrar los test  primeramente
399
            //Falta borrar los test  primeramente