Commit 5360d855 authored by Antony Le Courtes's avatar Antony Le Courtes
Browse files

Nouveau paramètrage statut pour donner la possibilité à un statut de postuler à une offre d'emploi

parent 51dd4f78
Loading
Loading
Loading
Loading
+12 −0
Changes for data/ddl/table/STATUT.php: 12 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -705,6 +705,18 @@ return [
            'position'    => 84,
            'commentaire' => NULL,
        ],
        'OFFRE_EMPLOI_POSTULER'        => [
            'name'        => 'OFFRE_EMPLOI_POSTULER',
            'type'        => 'bool',
            'bdd-type'    => 'NUMBER',
            'length'      => 0,
            'scale'       => '0',
            'precision'   => 1,
            'nullable'    => FALSE,
            'default'     => '0',
            'position'    => 86,
            'commentaire' => NULL,
        ],
        'MODIF_SERVICE_DU'               => [
            'name'        => 'MODIF_SERVICE_DU',
            'type'        => 'bool',
+3 −3
Changes for front/Mission/ListeOffreEmploi.vue: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
<template>
    <div v-if="!extended" class="row row-cols-1 row-cols-md-2 g-4">
    <div v-if="!extended" class="row row-cols-1 row-cols-md-2 g-4 mb-3">
        <offreEmploi v-for="offre in offres" @supprimer="supprimer" @refresh="refresh" :key="offre.id" :offre="offre" :public="this.public"
                     :canModifier="this.canModifier"
                     :canValider="this.canValider"
                     :canSupprimer="this.canSupprimer"></offreEmploi>
        <a v-if="this.public && this.canModifier" class=" btn btn-primary" :href="ajoutUrl" @click.prevent="ajout">Ajouter une nouvelle offre</a>
    </div>
    <a v-if="!this.public && this.canModifier" class=" btn btn-primary" :href="ajoutUrl" @click.prevent="ajout">Ajouter une nouvelle offre</a>
    <div v-if="extended">
        <offreEmploi v-for="offre in offres" :key="offre.id" :offre="offre" :canPostuler="this.canPostuler" :extended="extended"
                     :public="this.public"></offreEmploi>
                     :public="this.public" :utilisateur="this.utilisateur"></offreEmploi>
    </div>
    <br/>
</template>
+34 −4
Changes for front/Mission/OffreEmploi.vue: 34 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -51,13 +51,26 @@
                    <a v-if="this.public"
                       :href="consulterUrl"
                       class="btn btn-primary"
                    >Consulter</a>
                    >Plus d'information</a>
                </div>
            </div>
        </div>
    </div>
    <div v-if="this.extended">
        <p class="bg-light" style="padding:5px;">
        <div v-if="!this.utilisateur" class="alert alert-primary d-flex align-items-center" role="alert">
            <i class="fa-solid fa-user"></i>
            <div class="ms-2">
                Vous devez <a :href="connectionLink" class="text-decoration-underline alert-link">être identifé</a> en tant qu'étudiant pour pouvoir
                postuler.
            </div>
        </div>
        <div v-if="!this.canPostuler && this.utilisateur" class="alert alert-primary d-flex align-items-center" role="alert">
            <i class="fa-solid fa-circle-xmark"></i>
            <div class="ms-2">
                Vous n'avez pas les droits pour postuler à cette offre, merci de contacter votre administration de rattachement.
            </div>
        </div>
        <p class="bg-light" style="padding:10px;">
            <b>Crée le : </b>
            <u-date :value="offre.histoCreation"/>
            par {{ offre.histoCreateur.displayName }}<br/>
@@ -76,12 +89,18 @@
            <br/>

        </p>

        {{ offre.description }}
        <div style="margin-top:20px;">


        <div class="mt-5">
            <a class="btn btn-primary" href="/offre-emploi/public">Retour aux offres</a>&nbsp;
            <a :class="isDisabled" href="/offre-emploi/postuler">Postuler</a>
            <a :class="isDisabled" :href="postulerUrl" data-bs-toggle="tooltip" data-bs-placement="top"
               data-bs-original-title="Vous devez être connecté pour postuler">Postuler</a>


        </div>

    </div>

</template>
@@ -93,6 +112,7 @@ export default {
    props: {
        offre: {required: true},
        public: {type: Boolean, required: false},
        utilisateur: {required: false},
        extended: {type: Boolean, required: false},
        canModifier: {type: Boolean, required: false},
        canPostuler: {type: Boolean, required: false},
@@ -109,6 +129,7 @@ export default {
            validerUrl: Util.url('offre-emploi/valider/:offre', {offre: this.offre.id}),
            devaliderUrl: Util.url('offre-emploi/devalider/:offre', {offre: this.offre.id}),
            consulterUrl: Util.url('offre-emploi/public/:offre', {offre: this.offre.id}),
            postulerUrl: Util.url('offre-emploi/postuler/:offre', {offre: this.offre.id})
        };
    },
    computed: {
@@ -133,6 +154,9 @@ export default {
                shorDesc += '...';
            }
            return shorDesc;
        },
        connectionLink: function () {
            return '/auth/connexion?redirect='+window.location.href;
        }
    },

@@ -158,6 +182,12 @@ export default {
                this.$emit('supprimer', this.offre);
            });
        },
        postuler(event)
        {
            popConfirm(event.target, (response) => {
                this.$emit('postuler', this.offre);
            });
        },
        valider(event)
        {
            popConfirm(event.currentTarget, (response) => {
+2 −0
Changes for module/Intervenant/src/Entity/Db/Mapping/Intervenant.Entity.Db.Statut.dcm.xml: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -88,6 +88,8 @@

        <field name="mission" type="boolean" column="MISSION" nullable="false"/>
        <field name="missionRealiseEdition" type="boolean" column="MISSION_REALISE_EDITION" nullable="false"/>
        <field name="offreEmploiPostuler" type="boolean" column="OFFRE_EMPLOI_POSTULER" nullable="false"/>


        <field name="cloture" type="boolean" column="CLOTURE" nullable="false"/>

+19 −0
Changes for module/Intervenant/src/Entity/Db/Statut.php: 19 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -180,6 +180,8 @@ class Statut implements ParametreEntityInterface, RoleInterface, ResourceInterfa

    private bool        $missionRealiseEdition              = false;

    private bool        $offreEmploiPostuler                = false;

    private ?TauxRemu   $tauxRemu                           = null;


@@ -1449,6 +1451,22 @@ class Statut implements ParametreEntityInterface, RoleInterface, ResourceInterfa



    public function getOffreEmploiPostuler(): bool
    {
        return $this->offreEmploiPostuler;
    }



    public function setOffreEmploiPostuler(bool $offreEmploiPostuler): Statut
    {
        $this->offreEmploiPostuler = $offreEmploiPostuler;

        return $this;
    }



    public function getTauxRemu(): ?TauxRemu
    {
        return $this->tauxRemu;
@@ -1530,6 +1548,7 @@ class Statut implements ParametreEntityInterface, RoleInterface, ResourceInterfa
            Privileges::MISE_EN_PAIEMENT_VISUALISATION_INTERVENANT => $this->paiementVisualisation,
            Privileges::CLOTURE_CLOTURE                            => $this->cloture && ($this->serviceRealiseEdition || $this->referentielRealiseEdition),
            Privileges::CONTRAT_CONTRAT_GENERATION                 => $this->contrat && $this->contratGeneration,
            Privileges::MISSION_OFFRE_EMPLOI_POSTULER              => $this->offreEmploiPostuler,
        ];

        return $privileges;
Loading