Merge branch 'Xbird/medicalContact' into 'main'

Add medical infos

See merge request gamexperience/vision!32
This commit is contained in:
Xbird
2022-06-15 17:53:51 +00:00
7 changed files with 112 additions and 1 deletions

View File

@@ -0,0 +1,39 @@
<?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 Version20220615174010 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE directory ADD medical_contact LONGTEXT DEFAULT NULL, ADD medicaltrusted LONGTEXT DEFAULT NULL');
$this->addSql('ALTER TABLE licencewithdrawal DROP FOREIGN KEY FK_CE2562292C94069F');
$this->addSql('DROP INDEX idx_ce2562292c94069f ON licencewithdrawal');
$this->addSql('CREATE INDEX IDX_94E8823A2C94069F ON licencewithdrawal (directory_id)');
$this->addSql('ALTER TABLE licencewithdrawal ADD CONSTRAINT FK_CE2562292C94069F FOREIGN KEY (directory_id) REFERENCES directory (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE directory DROP medical_contact, DROP medicaltrusted');
$this->addSql('ALTER TABLE licencewithdrawal DROP FOREIGN KEY FK_94E8823A2C94069F');
$this->addSql('DROP INDEX idx_94e8823a2c94069f ON licencewithdrawal');
$this->addSql('CREATE INDEX IDX_CE2562292C94069F ON licencewithdrawal (directory_id)');
$this->addSql('ALTER TABLE licencewithdrawal ADD CONSTRAINT FK_94E8823A2C94069F FOREIGN KEY (directory_id) REFERENCES directory (id)');
}
}

View File

@@ -1,3 +1,3 @@
{ {
"version": "0.2.1" "version": "0.2.2"
} }

View File

@@ -467,6 +467,16 @@ class Directory
*/ */
private $hasNoPapers = false; private $hasNoPapers = false;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $medicalContact;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $medicaltrusted;
public function __construct() public function __construct()
{ {
@@ -1472,4 +1482,28 @@ class Directory
return $this; return $this;
} }
public function getMedicalContact(): ?string
{
return $this->medicalContact;
}
public function setMedicalContact(?string $medicalContact): self
{
$this->medicalContact = $medicalContact;
return $this;
}
public function getMedicaltrusted(): ?string
{
return $this->medicaltrusted;
}
public function setMedicaltrusted(?string $medicaltrusted): self
{
$this->medicaltrusted = $medicaltrusted;
return $this;
}
} }

View File

@@ -73,6 +73,24 @@ class DirectoryType extends AbstractType
if ($user->getAdminMode() || in_array('general_medical_view', $userPermissions)) { if ($user->getAdminMode() || in_array('general_medical_view', $userPermissions)) {
$builder $builder
->add('dead', null, ['label' => 'form_label_dead', 'help' => 'form_help_wanted']) ->add('dead', null, ['label' => 'form_label_dead', 'help' => 'form_help_wanted'])
->add(
'medicalContact',
ContentType::class,
['label' => 'form_label_medical_contact',
'help' => 'form_help_medical_contact',
'required' => false,
'attr' => ['style' => 'height: 400px;']
]
)
->add(
'medicalTrusted',
ContentType::class,
['label' => 'form_label_medical_trusted',
'help' => 'form_help_medical_trusted',
'required' => false,
'attr' => ['style' => 'height: 400px;']
]
)
->add( ->add(
'medicalFamilyHistory', 'medicalFamilyHistory',
ContentType::class, ContentType::class,

View File

@@ -6,6 +6,14 @@
</span> </span>
{% endif %}</div> {% endif %}</div>
<div class="card-body pb-0"> <div class="card-body pb-0">
<div class=" mb-2 p-2 border">
<p>{% trans %}title_medical_contact{% endtrans %}</p><hr>
{{ directory.medicalContact | raw }}
</div>
<div class=" mb-2 p-2 border">
<p>{% trans %}title_medical_trusted{% endtrans %}</p><hr>
{{ directory.medicalTrusted | raw }}
</div>
<div class=" mb-2 p-2 border"> <div class=" mb-2 p-2 border">
<p>{% trans %}title_medical_family_history{% endtrans %}</p><hr> <p>{% trans %}title_medical_family_history{% endtrans %}</p><hr>
{{ directory.medicalFamilyHistory | raw }} {{ directory.medicalFamilyHistory | raw }}

View File

@@ -259,10 +259,12 @@ form_help_lastname: Last name
form_help_medical_alcohol: Medical information on alcohol form_help_medical_alcohol: Medical information on alcohol
form_help_medical_allergies: Medical information on allergies form_help_medical_allergies: Medical information on allergies
form_help_medical_blood_group: Medical information on blood group form_help_medical_blood_group: Medical information on blood group
form_help_medical_contact: name and number of people contacted in emergency case
form_help_medical_drugs: Medical information on drugs form_help_medical_drugs: Medical information on drugs
form_help_medical_family_history: Family medical history medical information form_help_medical_family_history: Family medical history medical information
form_help_medical_history: Medical history information form_help_medical_history: Medical history information
form_help_medical_treatment: Medical information on current treatmentss form_help_medical_treatment: Medical information on current treatmentss
form_help_medical_trusted: Name and numbers of trusted people
form_help_phone: Enter the phone number form_help_phone: Enter the phone number
form_help_power: The power determines the level for the permissions (the higher the power, the more important it is) form_help_power: The power determines the level for the permissions (the higher the power, the more important it is)
form_help_search: Indicate the subject of your research. For a date, use the format DD / MM / YYYY form_help_search: Indicate the subject of your research. For a date, use the format DD / MM / YYYY
@@ -311,10 +313,12 @@ form_label_locale: Locale
form_label_medical_alcohol: Alcohol form_label_medical_alcohol: Alcohol
form_label_medical_allergies: Allergies form_label_medical_allergies: Allergies
form_label_medical_blood_group: Blood Group form_label_medical_blood_group: Blood Group
form_label_medical_contact: Emergency contact
form_label_medical_drugs: Drugs form_label_medical_drugs: Drugs
form_label_medical_family_history: Family history form_label_medical_family_history: Family history
form_label_medical_history: Medical background form_label_medical_history: Medical background
form_label_medical_treatment: Ongoing treatments form_label_medical_treatment: Ongoing treatments
form_label_medical_trusted: Trusted people
form_label_model: Template form_label_model: Template
form_label_motd: M.O.T.D. form_label_motd: M.O.T.D.
form_label_name: Name form_label_name: Name
@@ -742,11 +746,13 @@ title_management: Management
title_medical_alcohol: Alcohol title_medical_alcohol: Alcohol
title_medical_allergies: Allergies title_medical_allergies: Allergies
title_medical_blood: Blood group title_medical_blood: Blood group
title_medical_contact: Emergency contact
title_medical_drugs: Drugs title_medical_drugs: Drugs
title_medical_family_history: Family history title_medical_family_history: Family history
title_medical_history: Medical history title_medical_history: Medical history
title_medical_informations: Medical Informations title_medical_informations: Medical Informations
title_medical_treatment: Medical Treatment title_medical_treatment: Medical Treatment
title_medical_trusted: Trusted people
title_medicals: Medical visits title_medicals: Medical visits
title_members: Members title_members: Members
title_merge_directory: Merges directories title_merge_directory: Merges directories

View File

@@ -259,10 +259,12 @@ form_help_lastname: Nom de Famille
form_help_medical_alcohol: Informations médicales sur l'alcool form_help_medical_alcohol: Informations médicales sur l'alcool
form_help_medical_allergies: Informations médicales sur les allergies form_help_medical_allergies: Informations médicales sur les allergies
form_help_medical_blood_group: Informations médicales sur le groupe sanguin form_help_medical_blood_group: Informations médicales sur le groupe sanguin
form_help_medical_contact: Indiquer les personens à prevenir en cas d'urgence
form_help_medical_drugs: Informations médicales sur les drogues form_help_medical_drugs: Informations médicales sur les drogues
form_help_medical_family_history: Informations médicales sur les antécédents médicaux familiaux form_help_medical_family_history: Informations médicales sur les antécédents médicaux familiaux
form_help_medical_history: Informations médicales sur les antécédents médicaux form_help_medical_history: Informations médicales sur les antécédents médicaux
form_help_medical_treatment: Informations médicales sur les traitements en cours form_help_medical_treatment: Informations médicales sur les traitements en cours
form_help_medical_trusted: Indiquez les nom et numeros des personnes de confiance
form_help_phone: Indiquez le numéro de téléphone form_help_phone: Indiquez le numéro de téléphone
form_help_power: Le power détermine le niveau pour les permissions (plus le power est haut, plus il est important) form_help_power: Le power détermine le niveau pour les permissions (plus le power est haut, plus il est important)
form_help_search: Indiquez le sujet de votre recherche. Pour une date, utilisez le format JJ/MM/AAAA form_help_search: Indiquez le sujet de votre recherche. Pour une date, utilisez le format JJ/MM/AAAA
@@ -311,10 +313,12 @@ form_label_locale: Langue
form_label_medical_alcohol: Alcool form_label_medical_alcohol: Alcool
form_label_medical_allergies: Allergies form_label_medical_allergies: Allergies
form_label_medical_blood_group: Groupe Sanguin form_label_medical_blood_group: Groupe Sanguin
form_label_medical_contact: Contact en cas d'urgence
form_label_medical_drugs: Drogues form_label_medical_drugs: Drogues
form_label_medical_family_history: Antécédents Familiaux form_label_medical_family_history: Antécédents Familiaux
form_label_medical_history: Antécédents Médicaux form_label_medical_history: Antécédents Médicaux
form_label_medical_treatment: Traitements en cours form_label_medical_treatment: Traitements en cours
form_label_medical_trusted: Personnes de confiance
form_label_model: Modèle form_label_model: Modèle
form_label_motd: M.O.T.D. form_label_motd: M.O.T.D.
form_label_name: Nom form_label_name: Nom
@@ -741,11 +745,13 @@ title_management: Gestion
title_medical_alcohol: Alcool title_medical_alcohol: Alcool
title_medical_allergies: Allergies title_medical_allergies: Allergies
title_medical_blood: Groupe Sanguin title_medical_blood: Groupe Sanguin
title_medical_contact: Contact en cas d'urgence
title_medical_drugs: Drogues title_medical_drugs: Drogues
title_medical_family_history: Antécédents Familiaux title_medical_family_history: Antécédents Familiaux
title_medical_history: Antécédents Médicaux title_medical_history: Antécédents Médicaux
title_medical_informations: Informations médicales title_medical_informations: Informations médicales
title_medical_treatment: Traitements title_medical_treatment: Traitements
title_medical_trusted: Personnes de confiance
title_medicals: Visites médicales title_medicals: Visites médicales
title_members: Membres title_members: Membres
title_merge_directory: Fusionner les fiches title_merge_directory: Fusionner les fiches