Commit 0ad3bc9b authored by Antony Le Courtes's avatar Antony Le Courtes
Browse files

Edition du numéro de prise en charge

parent fca16d08
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
@@ -310,6 +310,12 @@ class Intervenant implements HistoriqueAwareInterface, ResourceInterface, Import

    protected bool $irrecevable = false;

    /**
     * @var string|null
     */
    protected $numeroPec;




    /**
@@ -1652,6 +1658,23 @@ class Intervenant implements HistoriqueAwareInterface, ResourceInterface, Import



    public function getNumeroPec (): ?string
    {
        return $this->numeroPec;
    }



    public function setNumeroPec (?string $numeroPec): self
    {
        $this->numeroPec = $numeroPec;

        return $this;
    }




    /**
     * Get validation
     *
+2 −0
Original line number Diff line number Diff line
@@ -96,6 +96,8 @@
        <field name="syncStructure" type="boolean" column="SYNC_STRUCTURE" nullable="false"/>
        <field name="syncUtilisateurCode" type="boolean" column="SYNC_UTILISATEUR_CODE" nullable="false"/>
        <field name="irrecevable" type="boolean" column="IRRECEVABLE" nullable="true"/>
        <field name="numeroPec" type="string" column="NUMERO_PEC" length="255" nullable="true"/>


        <field name="histoCreation" type="datetime" column="HISTO_CREATION" nullable="false"/>
        <many-to-one field="histoCreateur" target-entity="Application\Entity\Db\Utilisateur">
+37 −1
Original line number Diff line number Diff line
@@ -50,6 +50,8 @@ class EditionForm extends AbstractForm
        'nomUsuel'           => ['type' => 'string'],
        'nomPatronymique'    => ['type' => 'string'],
        'prenom'             => ['type' => 'string'],
        'numeroInsee'        => ['type' => 'string'],
        'numeroPec'          => ['type' => 'string'],
        'dateNaissance'      => ['type' => \DateTime::class],
        'statut'             => ['type' => Statut::class],
        'structure'          => ['type' => Structure::class],
@@ -62,6 +64,7 @@ class EditionForm extends AbstractForm
        'sourceCode'         => ['type' => 'string'],
        'syncStatut'         => ['type' => 'bool'],
        'syncStructure'      => ['type' => 'bool'],
        'syncPec'            => ['type' => 'bool'],
        'irrecevable'        => ['type' => 'bool'],
        'montantIndemniteFc' => ['type' => 'float'],
        'validiteDebut'      => ['type' => \DateTime::class],
@@ -208,6 +211,26 @@ class EditionForm extends AbstractForm
            ],
        ]);

        $this->add([
            'name'    => 'numeroInsee',
            'type'    => 'Text',
            'options' => [
                'label'         => 'Numéro INSEE',
                'label_options' => ['disable_html_escape' => true],
            ],

        ]);

        $this->add([
            'name'    => 'numeroPec',
            'type'    => 'Text',
            'options' => [
                'label'         => 'Numéro de prise en charge',
                'label_options' => ['disable_html_escape' => true],
            ],

        ]);

        $utilisateur = new SearchAndSelect('utilisateur');
        $utilisateur->setRequired(false)
            ->setSelectionRequired(false)
@@ -322,6 +345,17 @@ class EditionForm extends AbstractForm
            'type'       => 'Checkbox',
        ]);

        $this->add([
            'name'       => 'syncPec',
            'options'    => [
                'label' => 'Synchronisation du numéro PEC',
            ],
            'attributes' => [
                'title' => 'Si pas coché, alors le numéro de prise en charge ne sera plus définie par le connecteur, ni par le chargement en masse des numéros de prise en charge',
            ],
            'type'       => 'Checkbox',
        ]);

        $this->add([
            'name'    => 'irrecevable',
            'options' => [
@@ -453,7 +487,7 @@ class EditionForm extends AbstractForm
                $element->setAttribute('disabled', true);
            }
        } else {
            $noImport = ['syncStatut', 'syncStructure', 'statut', 'structure', 'intervenant-edition-login', 'intervenant-edition-password'];
            $noImport = ['syncStatut', 'syncStructure', 'statut', 'structure', 'intervenant-edition-login', 'intervenant-edition-password', 'numeroInsee', 'numeroPec'];
            if ($object->getAnnee()->getId() < $this->getServiceContext()->getAnneeImport()->getId()) {
                $noImport[] = 'grade';
            }
@@ -519,6 +553,8 @@ class EditionForm extends AbstractForm
            'grade'                        => ['required' => false],
            'code'                         => ['required' => true],
            'codeRh'                       => ['required' => false],
            'numeroInsee'                  => ['required' => false],
            'numeroPec'                    => ['required' => false],
            'utilisateur'                  => ['required' => false],
            'intervenant-edition-login'    => ['required' => false],
            'validiteDebut'                => ['required' => false],
+16 −6
Original line number Diff line number Diff line
@@ -28,12 +28,10 @@ if ($errors) {
                <div class="card-header">Données essentielles</div>
                <div class="card-body">
                    <div class="row">
                        <div class="col-md-12">
                        <div class="col-md-6">
                            <?= $this->formControlGroup($form->get('nomUsuel')); ?>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-12">
                        <div class="col-md-6">
                            <?= $this->formControlGroup($form->get('prenom')); ?>
                        </div>
                    </div>
@@ -50,6 +48,17 @@ if ($errors) {
                            <?= $this->formControlGroup($form->get('codeRh')); ?>
                        </div>
                    </div>
                    <!--INSEE ET NUMERO DE PRISE EN CHARGE-->
                    <div class="row">

                        <div class="col-md-6">
                            <?= $this->formControlGroup($form->get('numeroInsee')); ?>
                        </div>
                        <div class="col-md-6">
                            <?= $this->formControlGroup($form->get('numeroPec')); ?>
                        </div>

                    </div>
                </div>
            </div>
        </div>
@@ -124,8 +133,9 @@ if ($errors) {
                        <div class="col-md-6"><?= $this->formControlGroup($form->get('sourceCode')); ?></div>
                    </div>
                    <div class="row">
                        <div class="col-md-6"><?= $this->formControlGroup($form->get('syncStatut')); ?></div>
                        <div class="col-md-6"><?= $this->formControlGroup($form->get('syncStructure')); ?></div>
                        <div class="col-md-4"><?= $this->formControlGroup($form->get('syncStatut')); ?></div>
                        <div class="col-md-4"><?= $this->formControlGroup($form->get('syncStructure')); ?></div>
                        <div class="col-md-4"><?= $this->formControlGroup($form->get('syncPec')); ?></div>
                    </div>
                </div>
            </div>