From 3b353cde0bf5744c0e59298b9062ab325492673a Mon Sep 17 00:00:00 2001 From: Yann ASTIER Date: Thu, 24 Oct 2024 23:57:42 +0200 Subject: [PATCH 1/2] Finished RelationService --- src/Controller/EmployeeController.php | 18 ++++++++++++++++++ src/Service/RelationService.php | 1 + 2 files changed, 19 insertions(+) create mode 100644 src/Controller/EmployeeController.php create mode 100644 src/Service/RelationService.php diff --git a/src/Controller/EmployeeController.php b/src/Controller/EmployeeController.php new file mode 100644 index 0000000..36a4fdb --- /dev/null +++ b/src/Controller/EmployeeController.php @@ -0,0 +1,18 @@ +render('employee/index.html.twig', [ + 'controller_name' => 'EmployeeController', + ]); + } +} diff --git a/src/Service/RelationService.php b/src/Service/RelationService.php new file mode 100644 index 0000000..b3d9bbc --- /dev/null +++ b/src/Service/RelationService.php @@ -0,0 +1 @@ + Date: Thu, 24 Oct 2024 23:58:15 +0200 Subject: [PATCH 2/2] Finished RelationService.php --- src/Controller/DashboardController.php | 2 + src/Service/RelationService.php | 60 ++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) diff --git a/src/Controller/DashboardController.php b/src/Controller/DashboardController.php index e93d322..dead06a 100644 --- a/src/Controller/DashboardController.php +++ b/src/Controller/DashboardController.php @@ -14,4 +14,6 @@ class DashboardController extends AbstractController { return $this->render('dashboard/index.html.twig'); } + + } diff --git a/src/Service/RelationService.php b/src/Service/RelationService.php index b3d9bbc..223b5df 100644 --- a/src/Service/RelationService.php +++ b/src/Service/RelationService.php @@ -1 +1,61 @@ setEmployee($employee); + $assignment->setRide($ride); + $assignment->setStartHour($startHour); + $assignment->setEndHour($endHour); + } + + public function setEmployeeSkill(Skill $skill, Employee $employee ) + { + $employeeSkill = new EmployeeSkill(); + + $employeeSkill->setEmployee($employee); + $employeeSkill->setSkill($skill); + } + + public function setMissionCategory(Mission $mission, Category $category ) + { + $missionCategory = new MissionCategory(); + + $missionCategory->setMission($mission); + $missionCategory->setCategory($category); + } + + public function setRepresentation(Ride $ride, Employee $employee,int $count ,\DateTime $date ) + { + $representation = new Representation(); + + $representation->setRide($ride); + $representation->setEmployee($employee); + $representation->setCount($count); + $representation->setDate($date); + } + + public function setRequirement(Skill $skill, Mission $mission ) + { + $requirement = new Requirement(); + + $requirement->setSkill($skill); + $requirement->setMission($mission); + } +}