Proyectos de Subversion LeadersLinked - Services

Rev

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

Rev 372 Rev 375
Línea 80... Línea 80...
80
            $currentUserPlugin = $this->plugin('currentUserPlugin');
80
            $currentUserPlugin = $this->plugin('currentUserPlugin');
81
            $currentUser = $currentUserPlugin->getUser();
81
            $currentUser = $currentUserPlugin->getUser();
Línea 82... Línea 82...
82
 
82
 
Línea 83... Línea 83...
83
            $habitReportMapper = \LeadersLinked\Mapper\HabitReportMapper::getInstance($this->adapter);
83
            $habitReportMapper = \LeadersLinked\Mapper\HabitReportMapper::getInstance($this->adapter);
84
 
84
 
85
            $userLogRecords = [];
85
            $listAccessDays = [];
Línea -... Línea 86...
-
 
86
            $dates = $habitReportMapper->validateAndAdjustDates($initialDate, $finalDate);
-
 
87
            $records = $habitReportMapper->fetchDaysIntervalsRegisterList($currentUser->id, $dates[0], $dates[1]);
86
            $dates = $habitReportMapper->validateAndAdjustDates($initialDate, $finalDate);
88
 
87
            $records = $habitReportMapper->fetchDaysIntervalsRegisterList($currentUser->id, $dates[0], $dates[1]);
89
            foreach ($records as $record) {
88
 
90
                $listAccessDays[] = $record["updated_on"];
89
 
91
            }
90
            return new JsonModel([
92
            return new JsonModel([
-
 
93
                'success' => true,
91
                'success' => true,
94
                'data' => [
92
                'data' => [
95
                    'total_days' => count($records),
93
                    'total_days' => count($records)
96
                    'list_access_days' => $listAccessDays
94
                ]
97
                ]
95
            ]);
98
            ]);