Proyectos de Subversion LeadersLinked - Services

Rev

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

Rev 308 Rev 309
Línea 221... Línea 221...
221
                    
221
                    
Línea -... Línea 222...
-
 
222
                    
-
 
223
                    
-
 
224
                    $this->logger->info('Se agrego el valor : ' . $habitGoal->name, ['user_id' => $currentUser->id, 'ip' => Functions::getUserIP()]);
-
 
225
                    
-
 
226
                    $habitGoal = $habitGoalMapper->fetchOne($habitGoal->id);
-
 
227
                    
222
                    
228
                    $acl            = $this->getEvent()->getViewModel()->getVariable('acl');
223
                    
229
                    $allowEdit      = $acl->isAllowed($currentUser->usertype_id, 'habits/goals/edit');
224
                    $this->logger->info('Se agrego el valor : ' . $habitGoal->name, ['user_id' => $currentUser->id, 'ip' => Functions::getUserIP()]);
230
                    $allowDelete    = $acl->isAllowed($currentUser->usertype_id, 'habits/goals/delete');
-
 
231
                    
-
 
232
                    $data = [
-
 
233
                        'success'   => true,
-
 
234
                        'message'   => 'LABEL_RECORD_ADDED',
-
 
235
                        'data'      => [
-
 
236
                            'id' => $habitGoal->uid,
-
 
237
                            'name' => $habitGoal->name,
-
 
238
                            'description' => $habitGoal->description,
-
 
239
                            
-
 
240
                            'actions' => [
225
                    
241
                                'link_edit' => $allowEdit ? $this->url()->fromRoute('habits/goals/edit', ['id' => $habitGoal->uuid ], ['force_canonical' => true]) : '',
-
 
242
                                'link_delete' => $allowDelete ? $this->url()->fromRoute('habits/goals/delete', ['id' => $habitGoal->uuid ],  ['force_canonical' => true]) : '',
226
                    $data = [
243
                            ]
227
                        'success'   => true,
244
                        ]
228
                        'data'   => 'LABEL_RECORD_ADDED'
245
                    ];
229
                    ];
246
    
230
                } else {
247
                } else {
Línea 376... Línea 393...
376
                        }
393
                        }
377
                    }
394
                    }
Línea 378... Línea 395...
378
                    
395
                    
Línea -... Línea 396...
-
 
396
                    $this->logger->info('Se edito el valor : ' . $habitGoal->name, ['user_id' => $currentUser->id, 'ip' => Functions::getUserIP()]);
-
 
397
                    
-
 
398
                    
-
 
399
                    $acl            = $this->getEvent()->getViewModel()->getVariable('acl');
-
 
400
                    $allowEdit      = $acl->isAllowed($currentUser->usertype_id, 'habits/goals/edit');
379
                    $this->logger->info('Se edito el valor : ' . $habitGoal->name, ['user_id' => $currentUser->id, 'ip' => Functions::getUserIP()]);
401
                    $allowDelete    = $acl->isAllowed($currentUser->usertype_id, 'habits/goals/delete');
380
                    
402
                    
381
                    $data = [
403
                    $data = [
-
 
404
                        'success'   => true,
-
 
405
                        'message'   => 'LABEL_RECORD_UPDATED',
-
 
406
                        'data'      => [
-
 
407
                            'id' => $habitGoal->uid,
-
 
408
                            'name' => $habitGoal->name,
-
 
409
                            'description' => $habitGoal->description,
-
 
410
                            
-
 
411
                            'actions' => [
-
 
412
                                'link_edit' => $allowEdit ? $this->url()->fromRoute('habits/goals/edit', ['id' => $habitGoal->uuid ], ['force_canonical' => true]) : '',
-
 
413
                                'link_delete' => $allowDelete ? $this->url()->fromRoute('habits/goals/delete', ['id' => $habitGoal->uuid ],  ['force_canonical' => true]) : '',
382
                        'success'   => true,
414
                            ]
-
 
415
                        ]
383
                        'data'   => 'LABEL_RECORD_UPDATED'
416
                    ];
384
                    ];
417
  
385
                } else {
418
                } else {
386
                    $data = [
419
                    $data = [
387
                        'success'   => false,
420
                        'success'   => false,