diff --git a/migrations/Version20221007204956.php b/migrations/Version20221007204956.php new file mode 100644 index 0000000..6f21cfc --- /dev/null +++ b/migrations/Version20221007204956.php @@ -0,0 +1,32 @@ +addSql('CREATE TABLE wantedvehicle (id INT NOT NULL, type VARCHAR(255) NOT NULL, numberplate VARCHAR(255) DEFAULT NULL, model VARCHAR(255) DEFAULT NULL, content TEXT NOT NULL, color VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('ALTER TABLE wantedvehicle ADD CONSTRAINT FK_42BDD5B7BF396750 FOREIGN KEY (id) REFERENCES document (id) ON DELETE CASCADE'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('DROP TABLE wantedvehicle'); + } +} diff --git a/migrations/Version20221007210348.php b/migrations/Version20221007210348.php new file mode 100644 index 0000000..990885f --- /dev/null +++ b/migrations/Version20221007210348.php @@ -0,0 +1,31 @@ +addSql('ALTER TABLE wantedvehicle CHANGE content content TEXT DEFAULT NULL'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE wantedvehicle CHANGE content content TEXT CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`'); + } +} diff --git a/public/fonts/material/material-two-tones.woff2 b/public/fonts/material/material-two-tones.woff2 index de7b95a..8f79990 100644 Binary files a/public/fonts/material/material-two-tones.woff2 and b/public/fonts/material/material-two-tones.woff2 differ diff --git a/public/fonts/material/material.woff2 b/public/fonts/material/material.woff2 index 77fd18b..5492a6e 100644 Binary files a/public/fonts/material/material.woff2 and b/public/fonts/material/material.woff2 differ diff --git a/public/fonts/material/note.txt b/public/fonts/material/note.txt new file mode 100644 index 0000000..85d5fe9 --- /dev/null +++ b/public/fonts/material/note.txt @@ -0,0 +1 @@ +https://fonts.googleapis.com/css?family=Material+Icons+Two+Tone \ No newline at end of file diff --git a/src/Entity/Wantedvehicle.php b/src/Entity/Wantedvehicle.php new file mode 100644 index 0000000..acb5f26 --- /dev/null +++ b/src/Entity/Wantedvehicle.php @@ -0,0 +1,115 @@ +setNeedLegalAccess(true); + } + + public function getType(): ?string + { + return $this->type; + } + + public function setType(string $type): self + { + $this->type = $type; + + return $this; + } + + public function getNumberplate(): ?string + { + return $this->numberplate; + } + + public function setNumberplate(?string $numberplate): self + { + $this->numberplate = $numberplate; + + return $this; + } + + public function getModel(): ?string + { + return $this->model; + } + + public function setModel(?string $model): self + { + $this->model = $model; + + return $this; + } + + public function getContent(): ?string + { + return $this->content; + } + + public function setContent(?string $content): self + { + $this->content = $content; + + return $this; + } + + public function getColor(): ?string + { + return $this->color; + } + + public function setColor(?string $color): self + { + $this->color = $color; + + return $this; + } +} diff --git a/src/Form/WantedvehicleType.php b/src/Form/WantedvehicleType.php new file mode 100644 index 0000000..ea9d654 --- /dev/null +++ b/src/Form/WantedvehicleType.php @@ -0,0 +1,34 @@ +add('type', VehicleType::class) + ->add('numberplate', null, ['label' => 'form_label_numberplate']) + ->add('model', null, ['label' => 'form_label_model']) + ->add('color', null, ['label' => 'form_label_color']) + ->add('content', ContentType::class, ['label' => 'form_label_informations', 'required' => false]) + + ; + } + + public function configureOptions(OptionsResolver $resolver) + { + $resolver->setDefaults([ + 'data_class' => Wantedvehicle::class, + ]); + } +} diff --git a/src/Repository/WantedvehicleRepository.php b/src/Repository/WantedvehicleRepository.php new file mode 100644 index 0000000..e0e9702 --- /dev/null +++ b/src/Repository/WantedvehicleRepository.php @@ -0,0 +1,22 @@ +fields = ['type', 'numberplate','model', 'content', 'color']; //with title, list fields we can search in + } +} diff --git a/templates/base.html.twig b/templates/base.html.twig index ff1329e..f706353 100644 --- a/templates/base.html.twig +++ b/templates/base.html.twig @@ -145,7 +145,10 @@
  • taxi_alert{% trans %}title_stolen_vehicles{% endtrans %} -
  • + +
  • + minor_crash{% trans %}title_wanted_vehicles{% endtrans %} +
  • vaccines{% trans %}title_medicals{% endtrans %}
  • diff --git a/templates/document/types/Wantedvehicle.html.twig b/templates/document/types/Wantedvehicle.html.twig new file mode 100644 index 0000000..bd63494 --- /dev/null +++ b/templates/document/types/Wantedvehicle.html.twig @@ -0,0 +1,10 @@ + +
    {% trans %}title_informations{% endtrans %} :
    +
    + {{ document.content | raw }} +
    \ No newline at end of file diff --git a/translations/messages+intl-icu.en.yaml b/translations/messages+intl-icu.en.yaml index 273e9c1..70d918a 100644 --- a/translations/messages+intl-icu.en.yaml +++ b/translations/messages+intl-icu.en.yaml @@ -143,6 +143,7 @@ breadcrumb_Template: Template breadcrumb_Templates: Templates breadcrumb_Users: Phone book breadcrumb_view: View +breadcrumb_Wantedvehicles: Wanted vehicle button_add_comment: Add a comment button_add_group: Add Group button_add: Add @@ -194,6 +195,7 @@ documentType_Report: Report documentType_Sanction: Sanction documentType_Stolenvehicle: Stolen Vehicle documentType_Template: Template +documentType_Wantedvehicle: Wanted vehicle edited_your: edited your email_link_confirm_my_email: Confirm my email email_template_subtitle: Online Gestion @@ -817,6 +819,7 @@ title_value: Value title_verified: Verified title_versus: Versus title_wanted_directory: Wanted directories +title_wanted_vehicles: Wanted vehicles title_wanted: Wanted title_wanteds: Wanteds title_watchdog: Watchdog diff --git a/translations/messages+intl-icu.fr.yaml b/translations/messages+intl-icu.fr.yaml index cf7879b..28e2cec 100644 --- a/translations/messages+intl-icu.fr.yaml +++ b/translations/messages+intl-icu.fr.yaml @@ -143,6 +143,7 @@ breadcrumb_Template: Modèle breadcrumb_Templates: Modèles breadcrumb_Users: Annuaire breadcrumb_view: Voir +breadcrumb_Wantedvehicles: Véhicule recherché button_add_comment: Ajouter un commentaire button_add_group: Créer un groupe button_add: Ajouter @@ -194,6 +195,7 @@ documentType_Report: Rapport documentType_Sanction: Sanction documentType_Stolenvehicle: Déclaration de vol de véhicule documentType_Template: Modèle +documentType_Wantedvehicle: Véhicule recherché edited_your: a édité votre email_link_confirm_my_email: Confirmer mon adresse email email_template_subtitle: Gestion en ligne @@ -816,6 +818,7 @@ title_value: Valeur title_verified: Vérifié title_versus: Contre title_wanted_directory: Personnes recherchées +title_wanted_vehicles: Véhicules recherchés title_wanted: Personne Recherchée title_wanteds: Recherchés title_watchdog: Watchdog diff --git a/visionversion.json b/visionversion.json index 99abf88..779d61a 100644 --- a/visionversion.json +++ b/visionversion.json @@ -1,3 +1,3 @@ { - "version": "0.2.14" + "version": "0.2.15" }