Adding a column for community work penalties on Criminal Documents
This commit is contained in:
29
migrations/Version20230705133033.php
Normal file
29
migrations/Version20230705133033.php
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace DoctrineMigrations;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Doctrine\Migrations\AbstractMigration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Auto-generated Migration: Please modify to your needs!
|
||||||
|
*/
|
||||||
|
final class Version20230705133033 extends AbstractMigration
|
||||||
|
{
|
||||||
|
public function getDescription(): string
|
||||||
|
{
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function up(Schema $schema): void
|
||||||
|
{
|
||||||
|
$this->addSql('ALTER TABLE criminal ADD amount_community_work INT AFTER amount_time');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
$this->addSql('ALTER TABLE criminal DROP amount_community_work');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -31,6 +31,12 @@ class Criminal extends Document
|
|||||||
*/
|
*/
|
||||||
private $amountTime;
|
private $amountTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="integer", nullable=true)
|
||||||
|
* @Gedmo\Versioned
|
||||||
|
*/
|
||||||
|
private $amountCommunityWork;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="text", length=4294967295, nullable=true)
|
* @ORM\Column(type="text", length=4294967295, nullable=true)
|
||||||
* @Gedmo\Versioned
|
* @Gedmo\Versioned
|
||||||
@@ -83,6 +89,18 @@ class Criminal extends Document
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getAmountCommunityWork(): ?int
|
||||||
|
{
|
||||||
|
return $this->amountCommunityWork;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setAmountCommunityWork(?int $amountCommunityWork): self
|
||||||
|
{
|
||||||
|
$this->amountCommunityWork = $amountCommunityWork;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
public function getContent(): ?string
|
public function getContent(): ?string
|
||||||
{
|
{
|
||||||
return $this->content;
|
return $this->content;
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ class CriminalType extends DocumentType
|
|||||||
->add('content', ContentType::class, ['label' => 'form_label_informations' ])
|
->add('content', ContentType::class, ['label' => 'form_label_informations' ])
|
||||||
->add('amountMoney', null, ['label' => 'form_label_amount', 'help' => 'form_help_amount'])
|
->add('amountMoney', null, ['label' => 'form_label_amount', 'help' => 'form_help_amount'])
|
||||||
->add('amountTime', null, ['label' => 'form_label_time', 'help' => 'form_help_time'])
|
->add('amountTime', null, ['label' => 'form_label_time', 'help' => 'form_help_time'])
|
||||||
|
->add('amountCommunityWork', null, ['label' => 'form_label_community_work', 'help' => 'form_help_community_work'])
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -84,6 +84,10 @@
|
|||||||
<br /><small>{% trans %}title_hours{% endtrans %}:</small>
|
<br /><small>{% trans %}title_hours{% endtrans %}:</small>
|
||||||
<small>{{ i.amountTime ? i.amountTime ~ ' h' :'value_no_value'|trans}}</small>
|
<small>{{ i.amountTime ? i.amountTime ~ ' h' :'value_no_value'|trans}}</small>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if i.amountCommunityWork is defined %}
|
||||||
|
<br /><small>{% trans %}title_community_work{% endtrans %}:</small>
|
||||||
|
<small>{{ i.amountCommunityWork ? i.amountCommunityWork ~ ' h' :'value_no_value'|trans}}</small>
|
||||||
|
{% endif %}
|
||||||
{% if i.accessorySentence is defined and i.accessorySentence is not null %}
|
{% if i.accessorySentence is defined and i.accessorySentence is not null %}
|
||||||
<br /><small data-bs-toggle="tooltip" data-placement="top" title="{{ i.accessorySentence|striptags }}">{% trans %}title_accessorySentence{% endtrans %} : {{ 'value_yes'|trans}}</small>
|
<br /><small data-bs-toggle="tooltip" data-placement="top" title="{{ i.accessorySentence|striptags }}">{% trans %}title_accessorySentence{% endtrans %} : {{ 'value_yes'|trans}}</small>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@@ -7,4 +7,5 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li>{% trans %}title_amount{% endtrans %} : {{ document.amountMoney }} {{'currency_symbol'|trans}}</li>
|
<li>{% trans %}title_amount{% endtrans %} : {{ document.amountMoney }} {{'currency_symbol'|trans}}</li>
|
||||||
<li>{% trans %}title_hours{% endtrans %} : {{ document.amountTime }} {{ 'title_hours'| trans }}</li>
|
<li>{% trans %}title_hours{% endtrans %} : {{ document.amountTime }} {{ 'title_hours'| trans }}</li>
|
||||||
|
<li>{% trans %}title_community_work{% endtrans %} : {{ document.amountCommunityWork }} {{ 'title_hours'| trans }}</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -257,6 +257,7 @@ form_help_cant_edit_lastname: You cannot edit your first last name
|
|||||||
form_help_checkbox_adminmode: Check the box to switch the user to admin mode
|
form_help_checkbox_adminmode: Check the box to switch the user to admin mode
|
||||||
form_help_checkbox_isdesactivated: Check the box to prevent the user from using their account, without deleting it
|
form_help_checkbox_isdesactivated: Check the box to prevent the user from using their account, without deleting it
|
||||||
form_help_checkbox_isverified: This box is automatically checked when the user validates his email address.
|
form_help_checkbox_isverified: This box is automatically checked when the user validates his email address.
|
||||||
|
form_help_community_work: Indicate the duration of community work retained on the criminal record
|
||||||
form_help_firstname: First name
|
form_help_firstname: First name
|
||||||
form_help_gang: Select an associated group
|
form_help_gang: Select an associated group
|
||||||
form_help_gender: Indicate the person's gender
|
form_help_gender: Indicate the person's gender
|
||||||
@@ -297,6 +298,7 @@ form_label_checkbox_adminmode: Admin Mode
|
|||||||
form_label_checkbox_isdesactivated: account Disabled
|
form_label_checkbox_isdesactivated: account Disabled
|
||||||
form_label_checkbox_isverified: Email verified
|
form_label_checkbox_isverified: Email verified
|
||||||
form_label_color: Color
|
form_label_color: Color
|
||||||
|
form_label_community_work: Total Community Work Duration
|
||||||
form_label_complaint_status: Complaint status
|
form_label_complaint_status: Complaint status
|
||||||
form_label_content: Content
|
form_label_content: Content
|
||||||
form_label_dead: Deceased
|
form_label_dead: Deceased
|
||||||
@@ -651,6 +653,7 @@ title_comment_add: Add a comment
|
|||||||
title_comment_belong_document: This belong to
|
title_comment_belong_document: This belong to
|
||||||
title_comment_edition: Edit a comment
|
title_comment_edition: Edit a comment
|
||||||
title_comments: Comments
|
title_comments: Comments
|
||||||
|
title_community_work: Hours of Community Work
|
||||||
title_complaint: Complaint
|
title_complaint: Complaint
|
||||||
title_complaints: Complaints
|
title_complaints: Complaints
|
||||||
title_count: total number
|
title_count: total number
|
||||||
|
|||||||
@@ -257,6 +257,7 @@ form_help_cant_edit_lastname: Vous ne pouvez pas éditer votre nom
|
|||||||
form_help_checkbox_adminmode: Cochez la case pour passer l'utilisateur en mode admin
|
form_help_checkbox_adminmode: Cochez la case pour passer l'utilisateur en mode admin
|
||||||
form_help_checkbox_isdesactivated: Cochez la case pour empêcher l'utilisateur d'utiliser son compte, sans l'effacer
|
form_help_checkbox_isdesactivated: Cochez la case pour empêcher l'utilisateur d'utiliser son compte, sans l'effacer
|
||||||
form_help_checkbox_isverified: Cette case est cochée automatiquement lorsque l'utilisateur valide son adresse email
|
form_help_checkbox_isverified: Cette case est cochée automatiquement lorsque l'utilisateur valide son adresse email
|
||||||
|
form_help_community_work: Indiquez le durée des travaux d'intérêt général retenus sur le casier
|
||||||
form_help_firstname: Prénom
|
form_help_firstname: Prénom
|
||||||
form_help_gang: Séléctionnez un groupe associé a cette personne
|
form_help_gang: Séléctionnez un groupe associé a cette personne
|
||||||
form_help_gender: Indiquez le genre de la personne
|
form_help_gender: Indiquez le genre de la personne
|
||||||
@@ -297,6 +298,7 @@ form_label_checkbox_adminmode: Mode Admin
|
|||||||
form_label_checkbox_isdesactivated: Compte désactivé
|
form_label_checkbox_isdesactivated: Compte désactivé
|
||||||
form_label_checkbox_isverified: Email vérifié
|
form_label_checkbox_isverified: Email vérifié
|
||||||
form_label_color: Couleur
|
form_label_color: Couleur
|
||||||
|
form_label_community_work: Durée totale TIG
|
||||||
form_label_complaint_status: Etat de la plainte
|
form_label_complaint_status: Etat de la plainte
|
||||||
form_label_content: Contenu
|
form_label_content: Contenu
|
||||||
form_label_dead: Individu décédé
|
form_label_dead: Individu décédé
|
||||||
@@ -650,6 +652,7 @@ title_comment_add: Ajouter un commentaire
|
|||||||
title_comment_belong_document: Ce document appartient
|
title_comment_belong_document: Ce document appartient
|
||||||
title_comment_edition: Éditer un commentaire
|
title_comment_edition: Éditer un commentaire
|
||||||
title_comments: Commentaires
|
title_comments: Commentaires
|
||||||
|
title_community_work: Heures de TIG
|
||||||
title_complaint: Plainte
|
title_complaint: Plainte
|
||||||
title_complaints: Plaintes
|
title_complaints: Plaintes
|
||||||
title_count: Nombre total
|
title_count: Nombre total
|
||||||
|
|||||||
Reference in New Issue
Block a user