diff --git a/Documents/Diagramme/BDD/MLD.plantuml b/Documents/Diagramme/BDD/MLD.plantuml index cdf6bec3..1830cff8 100755 --- a/Documents/Diagramme/BDD/MLD.plantuml +++ b/Documents/Diagramme/BDD/MLD.plantuml @@ -25,6 +25,7 @@ entity "Notification" as notif { date statut urgence + senderId #athleteId } diff --git a/Sources/src/app/controller/AthleteController.php b/Sources/src/app/controller/AthleteController.php index 24337566..d7b2a71c 100644 --- a/Sources/src/app/controller/AthleteController.php +++ b/Sources/src/app/controller/AthleteController.php @@ -207,6 +207,7 @@ class AthleteController extends BaseController 'ecartType' => $activity->getStandardDeviation(), 'moyenne' => $activity->getAverage(), 'max' => $activity->getMaximum(), 'min' => $activity->getMinimum(), 'temperature' => $activity->getAvrTemperature()]; } + //log::dd($listActivity); $response = $this->render('./page/activity.html.twig', [ 'css' => $this->preference->getCookie(), diff --git a/Sources/src/app/controller/SocialController.php b/Sources/src/app/controller/SocialController.php index f2867f55..765b8ca3 100644 --- a/Sources/src/app/controller/SocialController.php +++ b/Sources/src/app/controller/SocialController.php @@ -33,12 +33,13 @@ class SocialController extends BaseController $notificationEntity = $map->notificationSqlToEntity($listSearch); $listUsers = []; + //log::dd($notificationEntity); foreach ($notificationEntity as $entity) { $notification = $map->notificationEntityToModel($entity); $listUsers[] = ['idnotif' => $notification->getId(), 'message' => $notification->getMessage(), 'date' => $notification->getDate()->format("D j F Y"),'statut' => $notification->getStatut(), 'urgence' => $notification->getUrgence(), - 'idathlete' => $notification->getToUserId()]; + 'athleteId' => $notification->getToUserId()]; } $response = $this->render('./page/notification.html.twig',[ diff --git a/Sources/src/app/controller/UserController.php b/Sources/src/app/controller/UserController.php index c6301d5e..0c34e763 100644 --- a/Sources/src/app/controller/UserController.php +++ b/Sources/src/app/controller/UserController.php @@ -12,6 +12,8 @@ use Data\Core\Preferences; use Shared\Log; use Database\Athletegateway; use Database\Connexion; +use DateTime; +use DateInterval; class UserController extends BaseController { @@ -48,11 +50,10 @@ class UserController extends BaseController { $athleteGateway = new AthleteGateway(new Connexion(DSN, DB_USER, DB_PASSWORD)); $activity = $athleteGateway->getListActivity('1');//$currentUser->getId() -// Log::dd($activity); $chart = []; // PROBLEME AVEC LE GRAPHIQUE Soucis avec le graphique : Undefined array key "nbactivite" ligne 57 foreach($activity as $act){ - $chart[] = ['act' => $act['nbactivite'], 'mois' => date('m', $act['mois'])]; + $chart[] = ['act' => $act['nbActivite'], 'mois' => date('m', $act['mois'])]; } // $activityGateway = new ActivityGateway(new Connexion(DSN, DB_USER, DB_PASSWORD)); @@ -85,7 +86,6 @@ class UserController extends BaseController ]); } - #[Route(path: '/settings', name: 'settings', methods: ['GET'])] public function settings(IRequest $req): Response { diff --git a/Sources/src/app/views/Templates/page/activity.html.twig b/Sources/src/app/views/Templates/page/activity.html.twig index e14809bc..0d74e925 100644 --- a/Sources/src/app/views/Templates/page/activity.html.twig +++ b/Sources/src/app/views/Templates/page/activity.html.twig @@ -32,6 +32,7 @@