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;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="integer", nullable=true)
|
||||
* @Gedmo\Versioned
|
||||
*/
|
||||
private $amountCommunityWork;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text", length=4294967295, nullable=true)
|
||||
* @Gedmo\Versioned
|
||||
@@ -83,6 +89,18 @@ class Criminal extends Document
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getAmountCommunityWork(): ?int
|
||||
{
|
||||
return $this->amountCommunityWork;
|
||||
}
|
||||
|
||||
public function setAmountCommunityWork(?int $amountCommunityWork): self
|
||||
{
|
||||
$this->amountCommunityWork = $amountCommunityWork;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getContent(): ?string
|
||||
{
|
||||
return $this->content;
|
||||
|
||||
@@ -20,6 +20,7 @@ class CriminalType extends DocumentType
|
||||
->add('content', ContentType::class, ['label' => 'form_label_informations' ])
|
||||
->add('amountMoney', null, ['label' => 'form_label_amount', 'help' => 'form_help_amount'])
|
||||
->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>
|
||||
<small>{{ i.amountTime ? i.amountTime ~ ' h' :'value_no_value'|trans}}</small>
|
||||
{% 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 %}
|
||||
<br /><small data-bs-toggle="tooltip" data-placement="top" title="{{ i.accessorySentence|striptags }}">{% trans %}title_accessorySentence{% endtrans %} : {{ 'value_yes'|trans}}</small>
|
||||
{% endif %}
|
||||
|
||||
@@ -7,4 +7,5 @@
|
||||
<ul>
|
||||
<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_community_work{% endtrans %} : {{ document.amountCommunityWork }} {{ 'title_hours'| trans }}</li>
|
||||
</ul>
|
||||
@@ -297,6 +297,7 @@ form_label_checkbox_adminmode: Admin Mode
|
||||
form_label_checkbox_isdesactivated: account Disabled
|
||||
form_label_checkbox_isverified: Email verified
|
||||
form_label_color: Color
|
||||
form_label_community_work: Total Community Work Duration
|
||||
form_label_complaint_status: Complaint status
|
||||
form_label_content: Content
|
||||
form_label_dead: Deceased
|
||||
@@ -651,6 +652,7 @@ title_comment_add: Add a comment
|
||||
title_comment_belong_document: This belong to
|
||||
title_comment_edition: Edit a comment
|
||||
title_comments: Comments
|
||||
title_community_work: Hours of Community Work
|
||||
title_complaint: Complaint
|
||||
title_complaints: Complaints
|
||||
title_count: total number
|
||||
|
||||
@@ -297,6 +297,7 @@ form_label_checkbox_adminmode: Mode Admin
|
||||
form_label_checkbox_isdesactivated: Compte désactivé
|
||||
form_label_checkbox_isverified: Email vérifié
|
||||
form_label_color: Couleur
|
||||
form_label_community_work: Durée totale TIG
|
||||
form_label_complaint_status: Etat de la plainte
|
||||
form_label_content: Contenu
|
||||
form_label_dead: Individu décédé
|
||||
@@ -650,6 +651,7 @@ title_comment_add: Ajouter un commentaire
|
||||
title_comment_belong_document: Ce document appartient
|
||||
title_comment_edition: Éditer un commentaire
|
||||
title_comments: Commentaires
|
||||
title_community_work: Heures de TIG
|
||||
title_complaint: Plainte
|
||||
title_complaints: Plaintes
|
||||
title_count: Nombre total
|
||||
|
||||
Reference in New Issue
Block a user