Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 15892 Rev 15893
Línea 101... Línea 101...
101
                $endDate = $this->params()->fromQuery('endDate');
101
                $endDate = $this->params()->fromQuery('endDate');
102
                if (empty($endDate)) {
102
                if (empty($endDate)) {
103
                    $endDate = date('Y-m-d');
103
                    $endDate = date('Y-m-d');
104
                }
104
                }
Línea 105... Línea 105...
105
 
105
 
106
                $startDateA = '2023-01-01';
106
                $startDate = '2023-01-01';
Línea 107... Línea 107...
107
                $endDateB = '2023-05-15';
107
                $endDate = '2023-05-15';
108
 
108
 
Línea 109... Línea 109...
109
                $dtStartDate = \DateTime::createFromFormat('Y-n-d', $startDate);
109
                $dtStartDate = \DateTime::createFromFormat('Y-n-d', $startDate);
Línea 119... Línea 119...
119
                        $endDate = date('Y-m-d');
119
                        $endDate = date('Y-m-d');
120
                    }
120
                    }
121
                }
121
                }
Línea 122... Línea 122...
122
 
122
 
123
                $contactProgressRecordMapper = DiscoveryContactLogMapper::getInstance($this->adapter);
123
                $contactProgressRecordMapper = DiscoveryContactLogMapper::getInstance($this->adapter);
Línea 124... Línea 124...
124
                $dailyProgress = $contactProgressRecordMapper->fetchAllDataByDateRange($currentUser->id, $startDateA, $endDateB);
124
                $dailyProgress = $contactProgressRecordMapper->fetchAllDataByDateRange($currentUser->id, $startDate, $endDate);
125
 
125
 
126
                $total = count($dailyProgress);
126
                $total = count($dailyProgress);
127
                $data = [
127
                $data = [
128
                    'dailyProgress' => $dailyProgress,
128
                    'labels'             => [],
Línea -... Línea 129...
-
 
129
                    'dailyProgress' => [],
-
 
130
                ];
-
 
131
 
-
 
132
                $dt = \DateTime::createFromFormat('Y-m-d', $startDate);
-
 
133
 
-
 
134
                do {
-
 
135
                    $date = $dt->format('Y-m-d');
-
 
136
                    $label = $dt->format('d/m/Y');
Línea 129... Línea 137...
129
                    'total' => $total
137
                    array_push($data['labels'], $label);
130
                ];
138
                } while ($date < $endDate);
131
 
139
 
132
 
140