Project 'cooperatic/kohinos-tav' was moved to 'agplv3/kohinos-tav'. Please update any links and bookmarks that may still have the old path.
Commit 8cb62efb by Damien Moulard

Merge branch '6180-prestataire-ccas-ok' into 'ssa-gironde'

6180 prestataire ccas ok

See merge request cooperatic/kohinos-tav!91
parents b29dc3cb e3132d04
......@@ -378,6 +378,11 @@ class Prestataire extends AccountableObject implements AccountableInterface
*/
protected $conventionnement;
/**
* @ORM\Column(type="boolean", options={"default": false})
*/
private $ccasOk;
public function __construct()
{
......@@ -1284,4 +1289,16 @@ class Prestataire extends AccountableObject implements AccountableInterface
return $this;
}
public function getCcasOk(): ?bool
{
return $this->ccasOk;
}
public function setCcasOk(bool $ccasOk): self
{
$this->ccasOk = $ccasOk;
return $this;
}
}
......@@ -157,6 +157,15 @@ class PrestataireInfosFormType extends AbstractType
])
->add('save', SubmitType::class, ['label' => 'Valider les modifications'])
;
if ($this->container->getParameter('tav_env') && $this->container->getParameter('ccas_mode')) {
$builder
->add('ccasOk', CheckboxType::class, [
'label' => 'Si concerné : d\'accord pour la procédure des aides facultatives CCAS',
'required' => false,
'attr' => ['autocomplete' => 'off']
]);
}
}
public function configureOptions(OptionsResolver $resolver)
......
<?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 Version20240503094014 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 prestataire ADD ccas_ok TINYINT(1) DEFAULT \'0\' NOT NULL');
}
public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE prestataire DROP ccas_ok');
}
}
......@@ -96,6 +96,11 @@
<hr/>
{% endif %}
{{ form_row(form.acceptemlc) }}
{% if form.ccasOk is defined %}
{{ form_row(form.ccasOk) }}
{% endif %}
{{ form_row(form.save) }}
{{form_end(form)}}
{% endblock blockcontent %}
\ No newline at end of file
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