Create and submit your activity Now
-Create new activity
+ + ++ + +
You are using an outdated browser. Please upgrade your browser to improve your experience and security.
+ @@ -98,10 +98,14 @@- - Profile + Profile + +
- - Logout + Logout + +
diff --git a/public/assets/css/style.css b/public/assets/css/style.css index f3d807b..9c78460 100644 --- a/public/assets/css/style.css +++ b/public/assets/css/style.css @@ -121,7 +121,7 @@ html,body{height: 100%;} /*------------------------------------- 2. Header-top --------------------------------------*/ -.header-top{border-bottom:1px solid #f6f8fa;} +.header-top{border-bottom:1px solid #f6f8fa; height: 35px;} .header-top ul li {display: inline-block;} @@ -129,13 +129,14 @@ html,body{height: 100%;} /*.select-opt*/ .select-opt,.header-top-contact{ - padding: 10px 18px; + padding: 10px 10px 10px 10px; border-right: 1px solid #f6f8fa; } .header-top-contact{ border-right: 0; border-left: 1px solid #f6f8fa; font-size: 12px; + } .select-opt select { border: none; @@ -159,9 +160,24 @@ html,body{height: 100%;} /*.select-opt*/ .header-top-right ul li a{ - color:#a7b0ba; - font-size: 12px; - font-weight: 300; + color:#3a73b4; + font-size: 14px; + + font-weight: 600; + +} + +.header-top-right ul li a:hover{ + color:#2d9649; + + +} +.header-top-right #Logout{ + color:#962d2d; + font-weight: 600; + + + } @@ -309,7 +325,7 @@ nav.navbar.bootsnav .navbar-toggle i{color: #7FFF00;} text-transform: capitalize; font-weight: 500; } -/*.welcome-hero-form-icon { +.welcome-hero-form-icon { position: absolute; top: 20px; right: 30px; @@ -339,13 +355,13 @@ nav.navbar.bootsnav .navbar-toggle i{color: #7FFF00;} width: 14px; height: auto; margin-left: 12px; -}*/ - +} +/* .welcome-hero-btn { - background-color: #60941a; /* Vert */ + background-color: #60941a; color: #ffffff; border: none; - padding: 22px 38px; /* Ajustez la taille du bouton ici */ + padding: 22px 38px; cursor: pointer; border-radius: 8px; display: flex; @@ -353,18 +369,18 @@ nav.navbar.bootsnav .navbar-toggle i{color: #7FFF00;} } .welcome-hero-btn:hover { - background-color: #60941a; /* Couleur au survol */ + background-color: #60941a; } .welcome-hero-btn span { margin-right: 10px; } -/* Ajoutez ce style pour ajuster la taille de l'icĂ´ne */ + .welcome-hero-btn i { width: 20px; height: 20px; -} +}*/ @@ -703,3 +719,16 @@ height: 300px; background-color: #60941a; /* Slightly darker color on active/focus */ border-color: #60941a; } +.buttoons .btnnormale{ + color: #fff; + background-color: #60941a; + border-color: #60941a; + text-align: center; + padding-top: 5px; + width: 180px; + height: 30px; + border-radius: 10px; +} +.buttoons .btnnormale:hover{ + background-color: #79ab38; +} diff --git a/public/assets/css/styleaziz.css b/public/assets/css/styleaziz.css index 565288e..5fd1d5d 100644 --- a/public/assets/css/styleaziz.css +++ b/public/assets/css/styleaziz.css @@ -222,11 +222,11 @@ justify-content: center; } .titre{ height: 150px; - + font-size: 20px; padding-top: 30px; } .titre h1{ - font-size: 28px; + font-size: 40px; color: #fff; font-weight: 700; text-transform: uppercase; diff --git a/public/assetsAdmin/dist/css/app.css b/public/assetsAdmin/dist/css/app.css index 29d8875..592e143 100644 --- a/public/assetsAdmin/dist/css/app.css +++ b/public/assetsAdmin/dist/css/app.css @@ -1809,6 +1809,7 @@ select{ } .dropdown .dropdown-menu { transform: translate3d(-10000px, 0px, 0px) !important; + color: rgb(212, 68, 68); } .dropdown-menu { z-index: 9999; diff --git a/public/uploads/images/65723dcdf2e3e.jpg b/public/uploads/images/65723dcdf2e3e.jpg new file mode 100644 index 0000000..04c6f7d Binary files /dev/null and b/public/uploads/images/65723dcdf2e3e.jpg differ diff --git a/public/uploads/images/65723dd732960.jpg b/public/uploads/images/65723dd732960.jpg new file mode 100644 index 0000000..04c6f7d Binary files /dev/null and b/public/uploads/images/65723dd732960.jpg differ diff --git a/public/uploads/images/65723e02cb752.jpg b/public/uploads/images/65723e02cb752.jpg new file mode 100644 index 0000000..04c6f7d Binary files /dev/null and b/public/uploads/images/65723e02cb752.jpg differ diff --git a/src/Controller/ActivitesController.php b/src/Controller/ActivitesController.php index b841f99..a1fc40a 100644 --- a/src/Controller/ActivitesController.php +++ b/src/Controller/ActivitesController.php @@ -18,6 +18,7 @@ use Endroid\QrCode\Color\Color; use Endroid\QrCode\Encoding\Encoding; use Endroid\QrCode\ErrorCorrectionLevel; +use Symfony\Component\Security\Core\User\UserInterface; use Endroid\QrCode\Label\Label; use Endroid\QrCode\Logo\Logo; @@ -91,7 +92,7 @@ public function backofficeact(ActivitesRepository $activitesRepository, Inscript ]); } -*/ + #[Route('/statact', name: 'stat_activite', methods: ['GET'])] public function statact(ActivitesRepository $activitesRepository, InscriptionRepository $inscriptionRepository): Response @@ -112,7 +113,7 @@ public function getActivityCountByorg(ActivitesRepository $activitesRepository): return new JsonResponse($activityCountByorg); } - +*/ #[Route('/abonner/{id}', name: 'abonner_activite', methods: ['GET'])] public function Abonner_Activite($id): Response @@ -120,7 +121,7 @@ public function Abonner_Activite($id): Response return $this->redirectToRoute('app_inscription_new', ['id' => $id]); } - #[Route('/new', name: 'app_activites_new', methods: ['GET', 'POST'])] + /* #[Route('/new', name: 'app_activites_new', methods: ['GET', 'POST'])] public function new(Request $request, EntityManagerInterface $entityManager): Response { $activite = new Activites(); @@ -146,15 +147,14 @@ public function new(Request $request, EntityManagerInterface $entityManager): Re 'activite' => $activite, 'form' => $form, ]); - } + }*/ #[Route('/{idAct}', name: 'app_activites_show', methods: ['GET', 'POST'])] - public function show(ActivitesRepository $activitesRepository , Request $request, EntityManagerInterface $entityManager,$idAct): Response + public function show(ActivitesRepository $activitesRepository , Request $request, EntityManagerInterface $entityManager,$idAct, UserInterface $user): Response { - - + $activite = $activitesRepository->find($idAct); $isFormSubmitted = false; @@ -163,12 +163,12 @@ public function show(ActivitesRepository $activitesRepository , Request $request $prix = $activite->getPrixAct(); $form = $this->createForm(InscriptionType::class, $inscription); $form->handleRequest($request); - // $userId=app.user.idUser; - $userId=38; + $userId = $user->getIdUser(); if ($form->isSubmitted() && $form->isValid()) { $inscription->setActivite($activite); - $inscription -> setUserId(38); + + $inscription->setUserins($user); $nbrTicketValue = $form->get('nbrTickes')->getData(); $prix = $prix *$nbrTicketValue; $inscription -> setFraitAbonnement($prix); diff --git a/src/Controller/UtilisateurController.php b/src/Controller/UtilisateurController.php index 24f4d3b..5f7e587 100644 --- a/src/Controller/UtilisateurController.php +++ b/src/Controller/UtilisateurController.php @@ -1,7 +1,8 @@ $pagination, ]); } + + /***************************************activite start********************************************************** */ #[Route('/backAct', name: 'activitesback_index', methods: ['GET'])] public function backofficeact(ActivitesRepository $activitesRepository, InscriptionRepository $inscriptionRepository): Response { @@ -63,6 +66,54 @@ public function backofficeact(ActivitesRepository $activitesRepository, Inscript ]); } + #[Route('/newact', name: 'app_activites_new', methods: ['GET', 'POST'])] + public function newact(Request $request, EntityManagerInterface $entityManager): Response + { + $activite = new Activites(); + $form = $this->createForm(ActivitesType::class, $activite); + $form->handleRequest($request); + $imagedirectory = $this->getParameter('kernel.project_dir').'/public/uploads/images'; + if ($form->isSubmitted() && $form->isValid()) { + $imageFile = $form->get('images')->getData(); + if($imageFile){ + $newFilename = uniqid().'.'.$imageFile->guessExtension(); + $imageFile->move($imagedirectory,$newFilename); + $activite->setImages($newFilename); + + + } + $entityManager->persist($activite); + $entityManager->flush(); + + return $this->redirectToRoute('app_activites_new', [], Response::HTTP_SEE_OTHER); + } + + return $this->renderForm('activites/new.html.twig', [ + 'activite' => $activite, + 'form' => $form, + ]); + } + + #[Route('/statact', name: 'stat_activite', methods: ['GET'])] + public function statact(ActivitesRepository $activitesRepository, InscriptionRepository $inscriptionRepository): Response + { + return $this->render('activites/statactivite.html.twig'); + } + #[Route('/get-activity-count-by-place', name: 'app_get_activity_count_by_place', methods: ['GET'])] + public function getActivityCountByPlace(ActivitesRepository $activitesRepository): JsonResponse + { + $activityCountByPlace = $activitesRepository->getActivityCountByPlace(); + + return new JsonResponse($activityCountByPlace); + } + #[Route('/get-activity-count-by-org', name: 'app_get_activity_count_by_org', methods: ['GET'])] + public function getActivityCountByorg(ActivitesRepository $activitesRepository): JsonResponse + { + $activityCountByorg = $activitesRepository->getActivityCountByorg(); + + return new JsonResponse($activityCountByorg); + } + /******************************************activite end ***************************************************************************************/ #[Route('/backChat', name: 'app_channels_index', methods: ['GET'])] public function indexBack( PaginatorInterface $paginator, Request $request, ChannelRepository $channelRepository): Response diff --git a/src/Entity/Inscription.php b/src/Entity/Inscription.php index cffd490..ef7c5c9 100644 --- a/src/Entity/Inscription.php +++ b/src/Entity/Inscription.php @@ -7,6 +7,7 @@ use Symfony\Component\Validator\Constraints as Assert; use Doctrine\Common\Collections\Collection; +use Symfony\Component\Security\Core\User\UserInterface; #[ORM\Entity(repositoryClass: InscriptionRepository::class)] @@ -47,6 +48,10 @@ class Inscription #[ORM\JoinColumn(nullable: false, name: "activite_id", referencedColumnName: "id_act")] private ?Activites $activite=null; + #[ORM\OneToOne] + #[ORM\JoinColumn(nullable: false, name: "user_id", referencedColumnName: "id_user")] + private ?Userr $user=null; + @@ -109,20 +114,13 @@ public function setFraitAbonnement(float $fraitAbonnement): static return $this; } - - - public function getUserId(): ?int + public function setUserins(?Userr $user): static { - return $this->userId; - } - - public function setUserId(int $userId): static - { - $this->userId = $userId; - + $this->user = $user; + return $this; } - + public function getActivite(): ?Activites { @@ -136,6 +134,9 @@ public function setActivite(?Activites $activite): static return $this; } + + + public function getTicketData(): string @@ -151,6 +152,19 @@ public function getTicketData(): string return $data; } + + public function getUser(): ?UserInterface + { + return $this->user; + } + + public function setUser(?UserInterface $user): static + { + $this->user = $user; + + return $this; + } + } diff --git a/templates/activites/_form.html.twig b/templates/activites/_form.html.twig index 20aa03e..76cb0b3 100644 --- a/templates/activites/_form.html.twig +++ b/templates/activites/_form.html.twig @@ -49,12 +49,16 @@
You are using an outdated browser. Please upgrade your browser to improve your experience and security.
+ @@ -98,10 +98,14 @@