Commit b1f65d18 by Yvon Kerdoncuff

Merge branch '7699-add-info-text-for-admin' into 'sprint-2-montpellier'

add info text in admin adherent in case of simplified household but no household data set

See merge request !132
parents 350ba5cd 5240648a
...@@ -313,10 +313,20 @@ class AdherentAdmin extends AbstractAdmin ...@@ -313,10 +313,20 @@ class AdherentAdmin extends AbstractAdmin
->end(); ->end();
} }
$cotisSectionInfo = "";
if ($simplified_household_based_allowance && $this->tavCotisationUtils->getAppropriateAllocationMethod($adherent) == 'cotisation_profile') {
// Inform admin that this adherent cotisation method falls back to ProfilDeCotisation, as it has one defined and no household data yet defined
$cotisSectionInfo = $em->getRepository(GlobalParameter::class)->val(GlobalParameter::SSA_SIMPL_HOUSEHOLD_ADMIN_TEXT_INFO_ADHERENT_FALLBACKS_TO_PROFILECOTIS);
$cotisSectionInfo .= " " . $adherent->getProfilDeCotisation() . ".";
}
// Add cotisation info // Add cotisation info
$formMapper $formMapper
->tab('General') ->tab('General')
->with('Informations de cotisation', ['class' => 'col-md-5']) ->with('Informations de cotisation', [
'class' => 'col-md-5',
'description' => $cotisSectionInfo
])
->add('cotisationAmount', NumberType::class, [ ->add('cotisationAmount', NumberType::class, [
'label' => 'Montant de la cotisation (en €)', 'label' => 'Montant de la cotisation (en €)',
'help' => $simplified_household_based_allowance ? '' : 'Montant minimum : 10€ par foyer + 5€/personne supplémentaire du foyer', 'help' => $simplified_household_based_allowance ? '' : 'Montant minimum : 10€ par foyer + 5€/personne supplémentaire du foyer',
......
...@@ -58,6 +58,7 @@ class GlobalParameter ...@@ -58,6 +58,7 @@ class GlobalParameter
const SSA_ALLOW_COMPTOIR_TO_UPDATE_HOUSEHOLD_ALLOCATION_DATA = 'SSA_ALLOW_COMPTOIR_TO_UPDATE_HOUSEHOLD_ALLOCATION_DATA'; const SSA_ALLOW_COMPTOIR_TO_UPDATE_HOUSEHOLD_ALLOCATION_DATA = 'SSA_ALLOW_COMPTOIR_TO_UPDATE_HOUSEHOLD_ALLOCATION_DATA';
const SSA_HOUSEHOLD_ALLOCATION_MSG_FOR_COMPTOIR = 'SSA_HOUSEHOLD_ALLOCATION_MSG_FOR_COMPTOIR'; const SSA_HOUSEHOLD_ALLOCATION_MSG_FOR_COMPTOIR = 'SSA_HOUSEHOLD_ALLOCATION_MSG_FOR_COMPTOIR';
const ACTIVATE_ADHERENTS_BALANCE_CEILING = 'ACTIVATE_ADHERENTS_BALANCE_CEILING'; const ACTIVATE_ADHERENTS_BALANCE_CEILING = 'ACTIVATE_ADHERENTS_BALANCE_CEILING';
const SSA_SIMPL_HOUSEHOLD_ADMIN_TEXT_INFO_ADHERENT_FALLBACKS_TO_PROFILECOTIS = 'SSA_SIMPL_HOUSEHOLD_ADMIN_TEXT_INFO_ADHERENT_FALLBACKS_TO_PROFILECOTIS';
/** /**
* @var \Ramsey\Uuid\UuidInterface * @var \Ramsey\Uuid\UuidInterface
......
<?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 Version20250221115125 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("INSERT INTO global_parameter (id, name, description, value, mandatory) VALUES (UUID(), 'SSA_SIMPL_HOUSEHOLD_ADMIN_TEXT_INFO_ADHERENT_FALLBACKS_TO_PROFILECOTIS', 'Dans le cas de l\'allocation par foyer simplifiée, si l\'adhérent n\'a pas ses infos de foyer renseigné mais dispose d\'un profil de cotisation, définit un texte informatif pour l\'admin dans la section Cotisation de la fiche adhérent.', 'Informations de foyer manquantes, le profil de cotisation de l\'adhérent sera utilisé. ', '0')");
}
public function down(Schema $schema) : void
{
$this->addSql("DELETE FROM global_parameter where name='SSA_SIMPL_HOUSEHOLD_ADMIN_TEXT_INFO_ADHERENT_FALLBACKS_TO_PROFILECOTIS'");
// this down() migration is auto-generated, please modify it to your needs
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment