Skip to content

Commit

Permalink
update acceptiw lincomming
Browse files Browse the repository at this point in the history
  • Loading branch information
azizgm1234 committed Dec 7, 2023
1 parent e62ba6a commit ef4be26
Show file tree
Hide file tree
Showing 13 changed files with 167 additions and 71 deletions.
55 changes: 42 additions & 13 deletions public/assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -121,21 +121,22 @@ 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;}

.header-top-left li,.header-top-right li {display: inline-block;}

/*.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;
Expand All @@ -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;



}


Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -339,32 +355,32 @@ 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;
align-items: center;
}
.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;
}
}*/



Expand Down Expand Up @@ -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;
}
4 changes: 2 additions & 2 deletions public/assets/css/styleaziz.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions public/assetsAdmin/dist/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -1809,6 +1809,7 @@ select{
}
.dropdown .dropdown-menu {
transform: translate3d(-10000px, 0px, 0px) !important;
color: rgb(212, 68, 68);
}
.dropdown-menu {
z-index: 9999;
Expand Down
Binary file added public/uploads/images/65723dcdf2e3e.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/uploads/images/65723dd732960.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/uploads/images/65723e02cb752.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 10 additions & 10 deletions src/Controller/ActivitesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand All @@ -112,15 +113,15 @@ public function getActivityCountByorg(ActivitesRepository $activitesRepository):
return new JsonResponse($activityCountByorg);
}

*/

#[Route('/abonner/{id}', name: 'abonner_activite', methods: ['GET'])]
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();
Expand All @@ -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;
Expand All @@ -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);
Expand Down
53 changes: 52 additions & 1 deletion src/Controller/UtilisateurController.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?php

namespace App\Controller;

use App\Entity\Activites;
use App\Form\ActivitesType;
use App\Entity\Utilisateur;
use App\Entity\Userr;
use App\Form\UtilisateurType;
Expand Down Expand Up @@ -54,6 +55,8 @@ public function index(
'users' => $pagination,
]);
}

/***************************************activite start********************************************************** */
#[Route('/backAct', name: 'activitesback_index', methods: ['GET'])]
public function backofficeact(ActivitesRepository $activitesRepository, InscriptionRepository $inscriptionRepository): Response
{
Expand All @@ -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
Expand Down
36 changes: 25 additions & 11 deletions src/Entity/Inscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down Expand Up @@ -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;




Expand Down Expand Up @@ -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
{
Expand All @@ -136,6 +134,9 @@ public function setActivite(?Activites $activite): static
return $this;
}






public function getTicketData(): string
Expand All @@ -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;
}

}


6 changes: 5 additions & 1 deletion templates/activites/_form.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,16 @@
<div class="form-group">
{{ form_row(form.user, {'attr': {'class': 'form-control'}}) }}
</div>
<br>
<div class="form-group">
<h4 style="font-size: 18px;">Choose an image</h4>
<br>
{{ form_row(form.images, {'attr': {'class': 'custom-file-input'}}) }}
</div>
</div>
</div>
<br>
<button class="btn btn-success btn1 text-white">{{ button_label|default('Save') }}</button>

<button class="btn1">{{ button_label|default('Save') }}</button>

{{ form_end(form) }}
Loading

0 comments on commit ef4be26

Please sign in to comment.