mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-04 05:44:58 +00:00
make familial situations and professionnal situations configurable
This commit is contained in:
@@ -2,3 +2,5 @@ services:
|
||||
Chill\AMLI\FamilyMembersBundle\Config\ConfigRepository:
|
||||
arguments:
|
||||
$links: '%chill_family_members.links%'
|
||||
$professionnalSituations: '%chill_family_members.professionnal_situations%'
|
||||
$familialSituations: '%chill_family_members.familial_situations%'
|
||||
|
@@ -1,28 +0,0 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
|
||||
/**
|
||||
* Add `familial_situation` to family members
|
||||
*/
|
||||
final class Version20180723133605 extends AbstractMigration
|
||||
{
|
||||
public function up(Schema $schema) : void
|
||||
{
|
||||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
|
||||
|
||||
$this->addSql('ALTER TABLE chill_amli.associated_family_member ADD familial_situation VARCHAR(200) DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE chill_family.family_member ADD familial_situation VARCHAR(200) DEFAULT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema) : void
|
||||
{
|
||||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
|
||||
|
||||
$this->addSql('ALTER TABLE chill_family.family_member DROP familial_situation');
|
||||
$this->addSql('ALTER TABLE chill_amli.associated_family_member DROP familial_situation');
|
||||
}
|
||||
}
|
@@ -14,8 +14,12 @@
|
||||
{{ form_row(form.birthdate) }}
|
||||
{{ form_row(form.link) }}
|
||||
{{ form_row(form.gender) }}
|
||||
{% if form.familialSituation is defined %}
|
||||
{{ form_row(form.familialSituation) }}
|
||||
{% endif %}
|
||||
{% if form.professionnalSituation is defined -%}
|
||||
{{ form_row(form.professionnalSituation) }}
|
||||
{% endif -%}
|
||||
{{ form_row(form.maritalStatus) }}
|
||||
{{ form_row(form.startDate) }}
|
||||
{{ form_row(form.endDate) }}
|
||||
|
@@ -52,7 +52,7 @@
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{{ f.link|family_member_link_display }}
|
||||
{{ f.link|chill_family_member_link_display }}
|
||||
</td>
|
||||
<td>
|
||||
{% if f.endDate is not null %}
|
||||
|
@@ -14,8 +14,12 @@
|
||||
{{ form_row(form.birthdate) }}
|
||||
{{ form_row(form.link) }}
|
||||
{{ form_row(form.gender) }}
|
||||
{% if form.familialSituation is defined %}
|
||||
{{ form_row(form.familialSituation) }}
|
||||
{% endif %}
|
||||
{% if form.professionnalSituation is defined -%}
|
||||
{{ form_row(form.professionnalSituation) }}
|
||||
{% endif -%}
|
||||
{{ form_row(form.maritalStatus) }}
|
||||
{{ form_row(form.startDate) }}
|
||||
{{ form_row(form.endDate) }}
|
||||
|
@@ -14,7 +14,7 @@
|
||||
<dd>{{ familyMember.firstName ~ ' ' ~ familyMember.lastName }}</dd>
|
||||
|
||||
<dt>{{ 'family membership link'|trans }}</dt>
|
||||
<dd>{{ familyMember.link|family_member_link_display }}</dd>
|
||||
<dd>{{ familyMember.link|chill_family_member_link_display }}</dd>
|
||||
|
||||
<dt>{{ 'family membership period'|trans }}</dt>
|
||||
<dd>
|
||||
@@ -52,14 +52,23 @@
|
||||
{%- endif -%}
|
||||
</dd>
|
||||
|
||||
{% if chill_family_members_has_professionnal_situation() %}
|
||||
<dt>{{ 'Professionnal situation'|trans }}</dt>
|
||||
<dd>
|
||||
{%- if familyMember.professionnalSituation is not empty -%}
|
||||
{{ familyMember.professionnalSituation }}
|
||||
{{ familyMember.professionnalSituation|chill_family_member_professional_situation_display }}
|
||||
{%- else -%}
|
||||
<span class="chill-no-data-statement">{{ 'Not given'|trans }}</span>
|
||||
{%- endif -%}
|
||||
</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if chill_family_members_has_familial_situation() %}
|
||||
<dt>{{ 'Familial situation'|trans }}</dt>
|
||||
<dd>
|
||||
{{ familyMember.familialSituation|chill_family_member_familial_situation_display|chill_print_or_message('Not given') }}
|
||||
</dd>
|
||||
{% endif %}
|
||||
</dl>
|
||||
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
|
Reference in New Issue
Block a user