diff --git a/.idea/dataSources.xml b/.idea/dataSources.xml index 5511c4d..db83d2d 100644 --- a/.idea/dataSources.xml +++ b/.idea/dataSources.xml @@ -1,11 +1,64 @@ +<<<<<<< HEAD postgresql true org.postgresql.Driver jdbc:postgresql://172.20.96.1:5432/HegreEtConfort +======= +<<<<<<< HEAD + + postgresql + true + org.postgresql.Driver + jdbc:postgresql://172.20.96.1:5432/HegreEtConfort +======= +<<<<<<< HEAD +<<<<<<< HEAD + +======= +<<<<<<< HEAD + + postgresql + true + org.postgresql.Driver + jdbc:postgresql://172.20.96.1:5432/ + $ProjectFileDir$ + + + mariadb + true + org.mariadb.jdbc.Driver + jdbc:mariadb://127.0.0.1:3306/hegreconfort +======= + + postgresql + true + org.postgresql.Driver + jdbc:postgresql://172.20.96.1:5432/chauffageproj + $ProjectFileDir$ + + +>>>>>>> 6532d4d88b86c321a212cdc0ca43b2e4770db117 + postgresql + true + org.postgresql.Driver + jdbc:postgresql://172.20.96.1:5432/chauffageproj +>>>>>>> ee236ff74aaac1882a825817d5ce8f692d3bdd0f +======= + + mariadb + true + org.mariadb.jdbc.Driver + jdbc:mariadb://localhost:3306/HegreConfort + + + +>>>>>>> cc65343635c8771e56e2a3304b42ec32f4f91b97 +>>>>>>> d7375d330251cab10a2296bbb292fcdb7cd6e847 +>>>>>>> 05b64fc2b1e17491a87ea32353e6987b0e97bf50 $ProjectFileDir$ diff --git a/assets/styles/css/app.css b/assets/styles/css/app.css index dd6181a..de8f662 100644 --- a/assets/styles/css/app.css +++ b/assets/styles/css/app.css @@ -1,3 +1,3 @@ body { - background-color: skyblue; + background: url("../image/fond.png") center center / cover no-repeat !important; } diff --git a/assets/styles/css/intervention.css b/assets/styles/css/intervention.css index e69de29..07e7e76 100644 --- a/assets/styles/css/intervention.css +++ b/assets/styles/css/intervention.css @@ -0,0 +1,84 @@ +body { + background: #A6CD9E !important; +} + +.background { + background-color: #7D9599; + position: absolute; + width: 100%; + height: 87%; +} +.background-intervention { + background-color: #A0C2C8; + position: absolute; + box-shadow: 0 0 15px 0 black; + border-radius: 5%; + + margin: 7% 0 0 15%; + width: 70%; + height: 70%; +} + +.logoCalendar { + position: absolute; + margin: 1% 0 0 5%; + width: 5%; +} +.titre { + position: absolute; + margin: 2% 0 0 11%; + color: white; +} + +#nom { + position: absolute; + margin: 2% 0 0 5%; + width: 45%; +} +#echecs { + position: absolute; + margin: 6% 0 0 5%; +} +#employesCompetences { + position: absolute; + margin: 10% 0 0 5%; +} +#piece { + position: absolute; + margin: 14% 0 0 5%; +} + +#vehicule { + position: absolute; + margin: 18.5% 0 0 5%; +} +#vehicule1 { + position: absolute; + margin: 19% 0 0 21.5%; +} +#oui { + position: absolute; + margin: 18.5% 0 0 24%; +} +#vehicule2 { + position: absolute; + margin: 19% 0 0 30%; +} +#non { + position: absolute; + margin: 18.5% 0 0 33%; +} + +#date { + position: absolute; + margin: 2% 0 0 70%; +} +#calendar { + position: absolute; + margin: 18.5% 0 0 33%; +} + +.from { + position: absolute; + margin: 65% 15% 15% 15%; +} \ No newline at end of file diff --git a/assets/styles/css/login.css b/assets/styles/css/login.css index 2b86d9d..851c8d8 100644 --- a/assets/styles/css/login.css +++ b/assets/styles/css/login.css @@ -1,67 +1,86 @@ body { - width: 1500px; - height: 1000px; - - background: linear-gradient(#A0C2C8, #A6CD9E); + background: url("../image/fond.png") center center / cover no-repeat !important; } .logo { position: absolute; - margin: -3% 0 0 1%; - height: 30%; + margin: 0.5% 0 0 43.5%; + height: 25%; } -.titre { /*pas fini*/ - margin: 4% 10% 0 25%; - font-weight: 50; - font-size: 450%; + +.titre { + position: absolute; + color: white; + margin: 15% 0 0 38%; } + +.logoProfile { + position: absolute; + border-radius: 10%; + margin: 20% 0 0 36%; + height: 10%; +} +.logoPassword { + position: absolute; + border-radius: 10%; + margin: 27% 0 0 36%; + height: 10%; +} +#profile { + position: absolute; + border-radius: 2%; + margin: 20% 0 0 42%; + width: 22%; + height: 5%; +} +#password { + position: absolute; + border-radius: 2%; + margin: 27% 0 0 42%; + width: 22%; + height: 5%; +} + + +.forgot { + position: absolute; + font-style: italic; + margin: 30% 0 0 52%; + font-size: 100%; + color: white; +} +#remember { + position: absolute; + margin: 33% 0 0 38%; + font-size: 100%; + color: white; +} +.remember { + position: absolute; + margin: 32.7% 0 0 39.5%; + font-size: 100%; + color: white; +} +.login { + position: absolute; + margin: 37.5% 0 0 36.6%; + width: 27%; + background-color: #243C40; + color: white; +} + + .background { position: absolute; - width: 50%; - height: 50%; - left: 25%; - top: 25%; + box-shadow: 0 0 30px 1px black; + border-radius: 10%; + opacity: 85%; - background: rgba(36, 60, 64, 0.7); -} - - -.logoEmail { - position: absolute; - margin: 6.5% 0 0 31%; - height: 12%; - background: #243C40; -} -.email { - position: absolute; - margin: 7% 0 0 37.5%; + margin: 7% 0 0 35%; width: 30%; - height: 9.5%; - background-color: #f0f0f0; -} + height: 75%; -.logoPassword { - position: absolute; - margin: 16.5% 0 0 31%; - height: 12%; background: #243C40; -} -.password { - position: absolute; - margin: 17% 0 0 37.5%; - width: 30%; - height: 9.5%; - background-color: #f0f0f0; -} - -/*forgot password*/ -.forgot { - position: absolute; - margin: 23.5% 0 0 42.5%; - font-size: 130%; - color: #f0f0f0; -} - - +} \ No newline at end of file diff --git a/assets/styles/image/calendar.png b/assets/styles/image/calendar.png new file mode 100644 index 0000000..8dbf226 Binary files /dev/null and b/assets/styles/image/calendar.png differ diff --git a/assets/styles/image/fond.png b/assets/styles/image/fond.png new file mode 100644 index 0000000..fd4e838 Binary files /dev/null and b/assets/styles/image/fond.png differ diff --git a/assets/styles/image/2.png b/assets/styles/image/password.png similarity index 100% rename from assets/styles/image/2.png rename to assets/styles/image/password.png diff --git a/assets/styles/image/1.png b/assets/styles/image/profile.png similarity index 100% rename from assets/styles/image/1.png rename to assets/styles/image/profile.png diff --git a/migrations/Version20241114151456.php b/migrations/Version20241114151456.php deleted file mode 100644 index 34acab8..0000000 --- a/migrations/Version20241114151456.php +++ /dev/null @@ -1,43 +0,0 @@ -addSql('CREATE TABLE fault (id INT AUTO_INCREMENT NOT NULL, wording VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('CREATE TABLE intervention (id INT AUTO_INCREMENT NOT NULL, wording VARCHAR(255) NOT NULL, timestamp DATETIME NOT NULL, description VARCHAR(255) NOT NULL, address VARCHAR(255) NOT NULL, status VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('CREATE TABLE skill (id INT AUTO_INCREMENT NOT NULL, wording VARCHAR(255) NOT NULL, description VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('CREATE TABLE stock (id INT AUTO_INCREMENT NOT NULL, wording VARCHAR(255) NOT NULL, description VARCHAR(255) NOT NULL, quantity VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('CREATE TABLE `user` (id INT AUTO_INCREMENT NOT NULL, first_name VARCHAR(255) NOT NULL, last_name VARCHAR(255) NOT NULL, birth_date DATE NOT NULL, email VARCHAR(255) NOT NULL, phone VARCHAR(255) NOT NULL, type VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('CREATE TABLE vehicle (id INT AUTO_INCREMENT NOT NULL, license_plate VARCHAR(255) NOT NULL, brand VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('CREATE TABLE messenger_messages (id BIGINT AUTO_INCREMENT NOT NULL, body LONGTEXT NOT NULL, headers LONGTEXT NOT NULL, queue_name VARCHAR(190) NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', available_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', delivered_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_75EA56E0FB7336F0 (queue_name), INDEX IDX_75EA56E0E3BD61CE (available_at), INDEX IDX_75EA56E016BA31DB (delivered_at), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('DROP TABLE fault'); - $this->addSql('DROP TABLE intervention'); - $this->addSql('DROP TABLE skill'); - $this->addSql('DROP TABLE stock'); - $this->addSql('DROP TABLE `user`'); - $this->addSql('DROP TABLE vehicle'); - $this->addSql('DROP TABLE messenger_messages'); - } -} diff --git a/migrations/Version20241205162005.php b/migrations/Version20241205162005.php new file mode 100644 index 0000000..9f8bff3 --- /dev/null +++ b/migrations/Version20241205162005.php @@ -0,0 +1,50 @@ +addSql('CREATE SEQUENCE fault_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); + $this->addSql('CREATE SEQUENCE intervention_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); + $this->addSql('CREATE SEQUENCE skill_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); + $this->addSql('CREATE SEQUENCE stock_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); + $this->addSql('CREATE SEQUENCE user_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); + $this->addSql('CREATE SEQUENCE vehicle_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); + $this->addSql('ALTER TABLE "user" ADD roles JSON NOT NULL'); + $this->addSql('ALTER TABLE "user" ALTER email TYPE VARCHAR(180)'); + $this->addSql('ALTER TABLE "user" RENAME COLUMN type TO password'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_IDENTIFIER_EMAIL ON "user" (email)'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('CREATE SCHEMA public'); + $this->addSql('DROP SEQUENCE fault_id_seq CASCADE'); + $this->addSql('DROP SEQUENCE intervention_id_seq CASCADE'); + $this->addSql('DROP SEQUENCE skill_id_seq CASCADE'); + $this->addSql('DROP SEQUENCE stock_id_seq CASCADE'); + $this->addSql('DROP SEQUENCE user_id_seq CASCADE'); + $this->addSql('DROP SEQUENCE vehicle_id_seq CASCADE'); + $this->addSql('DROP INDEX UNIQ_IDENTIFIER_EMAIL'); + $this->addSql('ALTER TABLE "user" DROP roles'); + $this->addSql('ALTER TABLE "user" ALTER email TYPE VARCHAR(255)'); + $this->addSql('ALTER TABLE "user" RENAME COLUMN password TO type'); + } +} diff --git a/migrations/Version20241128141518.php b/migrations/Version20241212153452.php similarity index 91% rename from migrations/Version20241128141518.php rename to migrations/Version20241212153452.php index ffcd213..13cf6d3 100644 --- a/migrations/Version20241128141518.php +++ b/migrations/Version20241212153452.php @@ -10,7 +10,7 @@ use Doctrine\Migrations\AbstractMigration; /** * Auto-generated Migration: Please modify to your needs! */ -final class Version20241128141518 extends AbstractMigration +final class Version20241212153452 extends AbstractMigration { public function getDescription(): string { diff --git a/src/Controller/AuthenticationController.php b/src/Controller/AuthenticationController.php index 8cfbffa..b19aed1 100644 --- a/src/Controller/AuthenticationController.php +++ b/src/Controller/AuthenticationController.php @@ -18,7 +18,11 @@ class AuthenticationController extends AbstractController // last username entered by the user $lastUsername = $authenticationUtils->getLastUsername(); +<<<<<<< HEAD return $this->render('calendrier/index.html.twig', [ +======= + return $this->render('login/index.html.twig', [ +>>>>>>> 05b64fc2b1e17491a87ea32353e6987b0e97bf50 'last_username' => $lastUsername, 'error' => $error, ]); diff --git a/src/Entity/User.php b/src/Entity/User.php index 0be20f0..3ebcbae 100644 --- a/src/Entity/User.php +++ b/src/Entity/User.php @@ -18,7 +18,7 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface private ?int $id = null; #[ORM\Column(length: 180)] - private ?string $email = null; + private string $email; #[ORM\Column(length: 255)] private ?string $FirstName = null; @@ -29,9 +29,6 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface #[ORM\Column(type: Types::DATE_MUTABLE)] private ?\DateTimeInterface $BirthDate = null; - #[ORM\Column(length: 255)] - private ?string $Email = null; - #[ORM\Column(length: 255)] private ?string $Phone = null; /** diff --git a/templates/authentication/index.html.twig b/templates/authentication/index.html.twig deleted file mode 100644 index c40b41a..0000000 --- a/templates/authentication/index.html.twig +++ /dev/null @@ -1,35 +0,0 @@ - - -{% block title %}Log in!{% endblock %} - -{% block body %} -
- {% if error %} -
{{ error.messageKey|trans(error.messageData, 'security') }}
- {% endif %} - - {% if app.user %} -
- You are logged in as {{ app.user.userIdentifier }}, Logout -
- {% endif %} - -

Please sign in

- - - - - - - -
- - -
- - - -
-{% endblock %} \ No newline at end of file diff --git a/templates/intervention/add.html.twig b/templates/intervention/add.html.twig index 72b0f43..c80727d 100644 --- a/templates/intervention/add.html.twig +++ b/templates/intervention/add.html.twig @@ -1,10 +1,39 @@ -{# templates/user/add.html.twig #} -{% extends 'base.html.twig' %} + + + + + Créer Une Intervention + + + -{% block title %}Ajouter une intervention {% endblock %} + -{% block body %} -

Ajouter une intervention

+ {% block stylesheets %} + {% endblock %} + + +
+ Logo Calendrier +

Créer Une Intervention

- {{ form(form) }} -{% endblock %} +
+ + + + +

Véhicule nécessaire

+ + + + +

Jour de l'intervention

+ + + +
{{ form(form) }}
+
+ + diff --git a/templates/login/index.html.twig b/templates/login/index.html.twig index 08c8f2d..46d3c81 100644 --- a/templates/login/index.html.twig +++ b/templates/login/index.html.twig @@ -2,30 +2,53 @@ - {% block title %}Authentification{% endblock %} - - - + Authentification + + + + + + {% block stylesheets %} {% endblock %} +
+
+
-
-
-

D'HEGRE ET CONFORT

+ +

D'Hegre Et Confort

+ + Logo Profil + Logo Password +
+ {% if error %} +
{{ error.messageKey|trans(error.messageData, 'security') }}
+ {% endif %} + + {% if app.user %} +
+ Vous êtes connecté en tant que {{ app.user.userIdentifier }}, Déconnexion +
+ {% endif %} + +
+ + + +

Mot de passe oublié ?

+
- -
-
- - - - - - -
- -

Mot de passe oublié ?